const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-Ds_H_9Yq.js","./urlMatch-BYQrIQwR.js","../codeMirrorModule.DYBRYzYX.css"])))=>i.map(i=>d[i]);
import{i as rx}from"./urlMatch-BYQrIQwR.js";function ax(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var nh={exports:{}},ja={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Vy;function lx(){if(Vy)return ja;Vy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(r,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:r,key:u,ref:l!==void 0?l:null,props:o}}return ja.Fragment=e,ja.jsx=i,ja.jsxs=i,ja}var Gy;function ox(){return Gy||(Gy=1,nh.exports=lx()),nh.exports}var v=ox(),ih={exports:{}},ce={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ky;function cx(){if(Ky)return ce;Ky=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=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"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),S=Symbol.iterator;function w(M){return M===null||typeof M!="object"?null:(M=S&&M[S]||M["@@iterator"],typeof M=="function"?M:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function A(M,Y,Z){this.props=M,this.context=Y,this.refs=_,this.updater=Z||E}A.prototype.isReactComponent={},A.prototype.setState=function(M,Y){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,Y,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function N(){}N.prototype=A.prototype;function $(M,Y,Z){this.props=M,this.context=Y,this.refs=_,this.updater=Z||E}var G=$.prototype=new N;G.constructor=$,x(G,A.prototype),G.isPureReactComponent=!0;var X=Array.isArray;function U(){}var L={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function O(M,Y,Z){var P=Z.ref;return{$$typeof:n,type:M,key:Y,ref:P!==void 0?P:null,props:Z}}function ne(M,Y){return O(M.type,Y,M.props)}function te(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}function V(M){var Y={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(Z){return Y[Z]})}var W=/\/+/g;function ge(M,Y){return typeof M=="object"&&M!==null&&M.key!=null?V(""+M.key):Y.toString(36)}function Ue(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(U,U):(M.status="pending",M.then(function(Y){M.status==="pending"&&(M.status="fulfilled",M.value=Y)},function(Y){M.status==="pending"&&(M.status="rejected",M.reason=Y)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function I(M,Y,Z,P,oe){var he=typeof M;(he==="undefined"||he==="boolean")&&(M=null);var be=!1;if(M===null)be=!0;else switch(he){case"bigint":case"string":case"number":be=!0;break;case"object":switch(M.$$typeof){case n:case e:be=!0;break;case b:return be=M._init,I(be(M._payload),Y,Z,P,oe)}}if(be)return oe=oe(M),be=P===""?"."+ge(M,0):P,X(oe)?(Z="",be!=null&&(Z=be.replace(W,"$&/")+"/"),I(oe,Y,Z,"",function(At){return At})):oe!=null&&(te(oe)&&(oe=ne(oe,Z+(oe.key==null||M&&M.key===oe.key?"":(""+oe.key).replace(W,"$&/")+"/")+be)),Y.push(oe)),1;be=0;var lt=P===""?".":P+":";if(X(M))for(var ke=0;ke<M.length;ke++)P=M[ke],he=lt+ge(P,ke),be+=I(P,Y,Z,he,oe);else if(ke=w(M),typeof ke=="function")for(M=ke.call(M),ke=0;!(P=M.next()).done;)P=P.value,he=lt+ge(P,ke++),be+=I(P,Y,Z,he,oe);else if(he==="object"){if(typeof M.then=="function")return I(Ue(M),Y,Z,P,oe);throw Y=String(M),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return be}function J(M,Y,Z){if(M==null)return M;var P=[],oe=0;return I(M,P,"","",function(he){return Y.call(Z,he,oe++)}),P}function re(M){if(M._status===-1){var Y=M._result;Y=Y(),Y.then(function(Z){(M._status===0||M._status===-1)&&(M._status=1,M._result=Z)},function(Z){(M._status===0||M._status===-1)&&(M._status=2,M._result=Z)}),M._status===-1&&(M._status=0,M._result=Y)}if(M._status===1)return M._result.default;throw M._result}var xe=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},_e={map:J,forEach:function(M,Y,Z){J(M,function(){Y.apply(this,arguments)},Z)},count:function(M){var Y=0;return J(M,function(){Y++}),Y},toArray:function(M){return J(M,function(Y){return Y})||[]},only:function(M){if(!te(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return ce.Activity=m,ce.Children=_e,ce.Component=A,ce.Fragment=i,ce.Profiler=l,ce.PureComponent=$,ce.StrictMode=r,ce.Suspense=d,ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,ce.__COMPILER_RUNTIME={__proto__:null,c:function(M){return L.H.useMemoCache(M)}},ce.cache=function(M){return function(){return M.apply(null,arguments)}},ce.cacheSignal=function(){return null},ce.cloneElement=function(M,Y,Z){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var P=x({},M.props),oe=M.key;if(Y!=null)for(he in Y.key!==void 0&&(oe=""+Y.key),Y)!B.call(Y,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&Y.ref===void 0||(P[he]=Y[he]);var he=arguments.length-2;if(he===1)P.children=Z;else if(1<he){for(var be=Array(he),lt=0;lt<he;lt++)be[lt]=arguments[lt+2];P.children=be}return O(M.type,oe,P)},ce.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:o,_context:M},M},ce.createElement=function(M,Y,Z){var P,oe={},he=null;if(Y!=null)for(P in Y.key!==void 0&&(he=""+Y.key),Y)B.call(Y,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(oe[P]=Y[P]);var be=arguments.length-2;if(be===1)oe.children=Z;else if(1<be){for(var lt=Array(be),ke=0;ke<be;ke++)lt[ke]=arguments[ke+2];oe.children=lt}if(M&&M.defaultProps)for(P in be=M.defaultProps,be)oe[P]===void 0&&(oe[P]=be[P]);return O(M,he,oe)},ce.createRef=function(){return{current:null}},ce.forwardRef=function(M){return{$$typeof:f,render:M}},ce.isValidElement=te,ce.lazy=function(M){return{$$typeof:b,_payload:{_status:-1,_result:M},_init:re}},ce.memo=function(M,Y){return{$$typeof:g,type:M,compare:Y===void 0?null:Y}},ce.startTransition=function(M){var Y=L.T,Z={};L.T=Z;try{var P=M(),oe=L.S;oe!==null&&oe(Z,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(U,xe)}catch(he){xe(he)}finally{Y!==null&&Z.types!==null&&(Y.types=Z.types),L.T=Y}},ce.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},ce.use=function(M){return L.H.use(M)},ce.useActionState=function(M,Y,Z){return L.H.useActionState(M,Y,Z)},ce.useCallback=function(M,Y){return L.H.useCallback(M,Y)},ce.useContext=function(M){return L.H.useContext(M)},ce.useDebugValue=function(){},ce.useDeferredValue=function(M,Y){return L.H.useDeferredValue(M,Y)},ce.useEffect=function(M,Y){return L.H.useEffect(M,Y)},ce.useEffectEvent=function(M){return L.H.useEffectEvent(M)},ce.useId=function(){return L.H.useId()},ce.useImperativeHandle=function(M,Y,Z){return L.H.useImperativeHandle(M,Y,Z)},ce.useInsertionEffect=function(M,Y){return L.H.useInsertionEffect(M,Y)},ce.useLayoutEffect=function(M,Y){return L.H.useLayoutEffect(M,Y)},ce.useMemo=function(M,Y){return L.H.useMemo(M,Y)},ce.useOptimistic=function(M,Y){return L.H.useOptimistic(M,Y)},ce.useReducer=function(M,Y,Z){return L.H.useReducer(M,Y,Z)},ce.useRef=function(M){return L.H.useRef(M)},ce.useState=function(M){return L.H.useState(M)},ce.useSyncExternalStore=function(M,Y,Z){return L.H.useSyncExternalStore(M,Y,Z)},ce.useTransition=function(){return L.H.useTransition()},ce.version="19.2.1",ce}var Xy;function Jh(){return Xy||(Xy=1,ih.exports=cx()),ih.exports}var R=Jh();const wt=ax(R);function Zh(n,e,i,r){const[l,o]=wt.useState(i);return wt.useEffect(()=>{let u=!1;return n().then(f=>{u||o(f)}),()=>{u=!0}},e),l}function ys(){const n=wt.useRef(null),[e]=Ah(n);return[e,n]}function Ah(n){const[e,i]=wt.useState(new DOMRect(0,0,10,10)),r=wt.useCallback(()=>{const l=n==null?void 0:n.current;l&&i(l.getBoundingClientRect())},[n]);return wt.useLayoutEffect(()=>{const l=n==null?void 0:n.current;if(!l)return;r();const o=new ResizeObserver(r);return o.observe(l),window.addEventListener("resize",r),()=>{o.disconnect(),window.removeEventListener("resize",r)}},[r,n]),[e,r]}function i0(n,e,i,r,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 Yy(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 Gt(n,e){n&&(e=us.getObject(n,e));const[i,r]=wt.useState(e),l=wt.useCallback(o=>{n?us.setObject(n,o):r(o)},[n,r]);return wt.useEffect(()=>{if(n){const o=()=>r(us.getObject(n,e));return us.onChangeEmitter.addEventListener(n,o),()=>us.onChangeEmitter.removeEventListener(n,o)}},[e,n]),[i,l]}const Ch=new Map,s0=new Map;let ic;function ar(n,e){const[i,r]=wt.useState();s0.set(n,{setter:r,defaultValue:e});const l=wt.useCallback(o=>{const u=Ch.get(ic||"default")||{};u[n]=o,Ch.set(ic||"default",u),r(o)},[n]);return[i,l]}function ux(n){if(ic===n)return;ic=n;const e=Ch.get(n)||{};for(const[i,r]of s0.entries())r.setter(e[i]||r.defaultValue)}class fx{constructor(){this.onChangeEmitter=new EventTarget}getString(e,i){return localStorage[e]||i}setString(e,i){var r;localStorage[e]=i,this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}getObject(e,i){if(!localStorage[e])return i;try{return JSON.parse(localStorage[e])}catch{return i}}setObject(e,i){var r;localStorage[e]=JSON.stringify(i),this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}}const us=new fx;function at(...n){return n.filter(Boolean).join(" ")}function r0(n){n&&(n!=null&&n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n==null||n.scrollIntoView())}const Fy="\\u0000-\\u0020\\u007f-\\u009f",a0=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Fy+'"]{2,}[^\\s'+Fy+`"')}\\],:;.!?]`,"ug");function hx(){const[n,e]=wt.useState(!1),i=wt.useCallback(()=>{const r=[];return e(l=>(r.push(setTimeout(()=>e(!1),1e3)),l?(r.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>r.forEach(clearTimeout)},[e]);return[n,i]}const dx="system",l0="theme",px=[{label:"Dark mode",value:"dark-mode"},{label:"Light mode",value:"light-mode"},{label:"System",value:"system"}],o0=window.matchMedia("(prefers-color-scheme: dark)");function w2(){document.playwrightThemeInitialized||(document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",n=>{n.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",n=>{document.body.classList.add("inactive")},!1),Nh(kh()),o0.addEventListener("change",()=>{Nh(kh())}))}const Wh=new Set;function Nh(n){const e=gx(),i=n==="system"?o0.matches?"dark-mode":"light-mode":n;if(e!==i){e&&document.documentElement.classList.remove(e),document.documentElement.classList.add(i);for(const r of Wh)r(i)}}function x2(n){Wh.add(n)}function _2(n){Wh.delete(n)}function kh(){return us.getString(l0,dx)}function gx(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":document.documentElement.classList.contains("light-mode")?"light-mode":null}function mx(){const[n,e]=wt.useState(kh());return wt.useEffect(()=>{us.setString(l0,n),Nh(n)},[n]),[n,e]}var sh={exports:{}},La={},rh={exports:{}},ah={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Qy;function yx(){return Qy||(Qy=1,(function(n){function e(I,J){var re=I.length;I.push(J);e:for(;0<re;){var xe=re-1>>>1,_e=I[xe];if(0<l(_e,J))I[xe]=J,I[re]=_e,re=xe;else break e}}function i(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var J=I[0],re=I.pop();if(re!==J){I[0]=re;e:for(var xe=0,_e=I.length,M=_e>>>1;xe<M;){var Y=2*(xe+1)-1,Z=I[Y],P=Y+1,oe=I[P];if(0>l(Z,re))P<_e&&0>l(oe,Z)?(I[xe]=oe,I[P]=re,xe=P):(I[xe]=Z,I[Y]=re,xe=Y);else if(P<_e&&0>l(oe,re))I[xe]=oe,I[P]=re,xe=P;else break e}}return J}function l(I,J){var re=I.sortIndex-J.sortIndex;return re!==0?re:I.id-J.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=[],g=[],b=1,m=null,S=3,w=!1,E=!1,x=!1,_=!1,A=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function G(I){for(var J=i(g);J!==null;){if(J.callback===null)r(g);else if(J.startTime<=I)r(g),J.sortIndex=J.expirationTime,e(d,J);else break;J=i(g)}}function X(I){if(x=!1,G(I),!E)if(i(d)!==null)E=!0,U||(U=!0,V());else{var J=i(g);J!==null&&Ue(X,J.startTime-I)}}var U=!1,L=-1,B=5,O=-1;function ne(){return _?!0:!(n.unstable_now()-O<B)}function te(){if(_=!1,U){var I=n.unstable_now();O=I;var J=!0;try{e:{E=!1,x&&(x=!1,N(L),L=-1),w=!0;var re=S;try{t:{for(G(I),m=i(d);m!==null&&!(m.expirationTime>I&&ne());){var xe=m.callback;if(typeof xe=="function"){m.callback=null,S=m.priorityLevel;var _e=xe(m.expirationTime<=I);if(I=n.unstable_now(),typeof _e=="function"){m.callback=_e,G(I),J=!0;break t}m===i(d)&&r(d),G(I)}else r(d);m=i(d)}if(m!==null)J=!0;else{var M=i(g);M!==null&&Ue(X,M.startTime-I),J=!1}}break e}finally{m=null,S=re,w=!1}J=void 0}}finally{J?V():U=!1}}}var V;if(typeof $=="function")V=function(){$(te)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,ge=W.port2;W.port1.onmessage=te,V=function(){ge.postMessage(null)}}else V=function(){A(te,0)};function Ue(I,J){L=A(function(){I(n.unstable_now())},J)}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(I){I.callback=null},n.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<I?Math.floor(1e3/I):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(I){switch(S){case 1:case 2:case 3:var J=3;break;default:J=S}var re=S;S=J;try{return I()}finally{S=re}},n.unstable_requestPaint=function(){_=!0},n.unstable_runWithPriority=function(I,J){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var re=S;S=I;try{return J()}finally{S=re}},n.unstable_scheduleCallback=function(I,J,re){var xe=n.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?xe+re:xe):re=xe,I){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=re+_e,I={id:b++,callback:J,priorityLevel:I,startTime:re,expirationTime:_e,sortIndex:-1},re>xe?(I.sortIndex=re,e(g,I),i(d)===null&&I===i(g)&&(x?(N(L),L=-1):x=!0,Ue(X,re-xe))):(I.sortIndex=_e,e(d,I),E||w||(E=!0,U||(U=!0,V()))),I},n.unstable_shouldYield=ne,n.unstable_wrapCallback=function(I){var J=S;return function(){var re=S;S=J;try{return I.apply(this,arguments)}finally{S=re}}}})(ah)),ah}var Py;function bx(){return Py||(Py=1,rh.exports=yx()),rh.exports}var lh={exports:{}},_t={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Jy;function vx(){if(Jy)return _t;Jy=1;var n=Jh();function e(d){var g="https://react.dev/errors/"+d;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+d+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={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,g,b){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:m==null?null:""+m,children:d,containerInfo:g,implementation:b}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,g){if(d==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,_t.createPortal=function(d,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(e(299));return o(d,g,null,b)},_t.flushSync=function(d){var g=u.T,b=r.p;try{if(u.T=null,r.p=2,d)return d()}finally{u.T=g,r.p=b,r.d.f()}},_t.preconnect=function(d,g){typeof d=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(d,g))},_t.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},_t.preinit=function(d,g){if(typeof d=="string"&&g&&typeof g.as=="string"){var b=g.as,m=f(b,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?r.d.S(d,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:m,integrity:S,fetchPriority:w}):b==="script"&&r.d.X(d,{crossOrigin:m,integrity:S,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},_t.preinitModule=function(d,g){if(typeof d=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=f(g.as,g.crossOrigin);r.d.M(d,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(d)},_t.preload=function(d,g){if(typeof d=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,m=f(b,g.crossOrigin);r.d.L(d,b,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},_t.preloadModule=function(d,g){if(typeof d=="string")if(g){var b=f(g.as,g.crossOrigin);r.d.m(d,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(d)},_t.requestFormReset=function(d){r.d.r(d)},_t.unstable_batchedUpdates=function(d,g){return d(g)},_t.useFormState=function(d,g,b){return u.H.useFormState(d,g,b)},_t.useFormStatus=function(){return u.H.useHostTransitionStatus()},_t.version="19.2.1",_t}var Zy;function Sx(){if(Zy)return lh.exports;Zy=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(),lh.exports=vx(),lh.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Wy;function wx(){if(Wy)return La;Wy=1;var n=bx(),e=Jh(),i=Sx();function r(t){var s="https://react.dev/errors/"+t;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+s+" 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 s=t,a=t;if(t.alternate)for(;s.return;)s=s.return;else{t=s;do s=t,(s.flags&4098)!==0&&(a=s.return),t=s.return;while(t)}return s.tag===3?a:null}function u(t){if(t.tag===13){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function f(t){if(t.tag===31){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function d(t){if(o(t)!==t)throw Error(r(188))}function g(t){var s=t.alternate;if(!s){if(s=o(t),s===null)throw Error(r(188));return s!==t?null:t}for(var a=t,c=s;;){var h=a.return;if(h===null)break;var p=h.alternate;if(p===null){if(c=h.return,c!==null){a=c;continue}break}if(h.child===p.child){for(p=h.child;p;){if(p===a)return d(h),t;if(p===c)return d(h),s;p=p.sibling}throw Error(r(188))}if(a.return!==c.return)a=h,c=p;else{for(var y=!1,T=h.child;T;){if(T===a){y=!0,a=h,c=p;break}if(T===c){y=!0,c=h,a=p;break}T=T.sibling}if(!y){for(T=p.child;T;){if(T===a){y=!0,a=p,c=h;break}if(T===c){y=!0,c=p,a=h;break}T=T.sibling}if(!y)throw Error(r(189))}}if(a.alternate!==c)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?t:s}function b(t){var s=t.tag;if(s===5||s===26||s===27||s===6)return t;for(t=t.child;t!==null;){if(s=b(t),s!==null)return s;t=t.sibling}return null}var m=Object.assign,S=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),$=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function V(t){return t===null||typeof t!="object"?null:(t=te&&t[te]||t["@@iterator"],typeof t=="function"?t:null)}var W=Symbol.for("react.client.reference");function ge(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===W?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case x:return"Fragment";case A:return"Profiler";case _:return"StrictMode";case X:return"Suspense";case U:return"SuspenseList";case O:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case E:return"Portal";case $:return t.displayName||"Context";case N:return(t._context.displayName||"Context")+".Consumer";case G:var s=t.render;return t=t.displayName,t||(t=s.displayName||s.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case L:return s=t.displayName||null,s!==null?s:ge(t.type)||"Memo";case B:s=t._payload,t=t._init;try{return ge(t(s))}catch{}}return null}var Ue=Array.isArray,I=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},xe=[],_e=-1;function M(t){return{current:t}}function Y(t){0>_e||(t.current=xe[_e],xe[_e]=null,_e--)}function Z(t,s){_e++,xe[_e]=t.current,t.current=s}var P=M(null),oe=M(null),he=M(null),be=M(null);function lt(t,s){switch(Z(he,s),Z(oe,t),Z(P,null),s.nodeType){case 9:case 11:t=(t=s.documentElement)&&(t=t.namespaceURI)?hy(t):0;break;default:if(t=s.tagName,s=s.namespaceURI)s=hy(s),t=dy(s,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Y(P),Z(P,t)}function ke(){Y(P),Y(oe),Y(he)}function At(t){t.memoizedState!==null&&Z(be,t);var s=P.current,a=dy(s,t.type);s!==a&&(Z(oe,t),Z(P,a))}function fe(t){oe.current===t&&(Y(P),Y(oe)),be.current===t&&(Y(be),Na._currentValue=re)}var Ne,qe;function Ee(t){if(Ne===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);Ne=s&&s[1]||"",qe=-1<a.stack.indexOf(`
    at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Ne+t+qe}var Kt=!1;function en(t,s){if(!t||Kt)return"";Kt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(s){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(q){var H=q}Reflect.construct(t,[],Q)}else{try{Q.call()}catch(q){H=q}t.call(Q.prototype)}}else{try{throw Error()}catch(q){H=q}(Q=t())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(q){if(q&&H&&typeof q.stack=="string")return[q.stack,H.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 p=c.DetermineComponentFrameRoot(),y=p[0],T=p[1];if(y&&T){var C=y.split(`
`),z=T.split(`
`);for(h=c=0;c<C.length&&!C[c].includes("DetermineComponentFrameRoot");)c++;for(;h<z.length&&!z[h].includes("DetermineComponentFrameRoot");)h++;if(c===C.length||h===z.length)for(c=C.length-1,h=z.length-1;1<=c&&0<=h&&C[c]!==z[h];)h--;for(;1<=c&&0<=h;c--,h--)if(C[c]!==z[h]){if(c!==1||h!==1)do if(c--,h--,0>h||C[c]!==z[h]){var K=`
`+C[c].replace(" at new "," at ");return t.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",t.displayName)),K}while(1<=c&&0<=h);break}}}finally{Kt=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Ee(a):""}function tn(t,s){switch(t.tag){case 26:case 27:case 5:return Ee(t.type);case 16:return Ee("Lazy");case 13:return t.child!==s&&s!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return en(t.type,!1);case 11:return en(t.type.render,!1);case 1:return en(t.type,!0);case 31:return Ee("Activity");default:return""}}function qi(t){try{var s="",a=null;do s+=tn(t,a),a=t,t=t.return;while(t);return s}catch(c){return`
Error generating stack: `+c.message+`
`+c.stack}}var ws=Object.prototype.hasOwnProperty,ai=n.unstable_scheduleCallback,Br=n.unstable_cancelCallback,li=n.unstable_shouldYield,Bc=n.unstable_requestPaint,Ct=n.unstable_now,qc=n.unstable_getCurrentPriorityLevel,gl=n.unstable_ImmediatePriority,qr=n.unstable_UserBlockingPriority,oi=n.unstable_NormalPriority,$c=n.unstable_LowPriority,ml=n.unstable_IdlePriority,Ic=n.log,$i=n.unstable_setDisableYieldValue,Tn=null,Nt=null;function An(t){if(typeof Ic=="function"&&$i(t),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Tn,t)}catch{}}var kt=Math.clz32?Math.clz32:Ii,yl=Math.log,ae=Math.LN2;function Ii(t){return t>>>=0,t===0?32:31-(yl(t)/ae|0)|0}var nn=256,bl=262144,vl=4194304;function Vi(t){var s=t&42;if(s!==0)return s;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:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;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 Sl(t,s,a){var c=t.pendingLanes;if(c===0)return 0;var h=0,p=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var T=c&134217727;return T!==0?(c=T&~p,c!==0?h=Vi(c):(y&=T,y!==0?h=Vi(y):a||(a=T&~t,a!==0&&(h=Vi(a))))):(T=c&~p,T!==0?h=Vi(T):y!==0?h=Vi(y):a||(a=c&~t,a!==0&&(h=Vi(a)))),h===0?0:s!==0&&s!==h&&(s&p)===0&&(p=h&-h,a=s&-s,p>=a||p===32&&(a&4194048)!==0)?s:h}function $r(t,s){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&s)===0}function XS(t,s){switch(t){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 Yd(){var t=vl;return vl<<=1,(vl&62914560)===0&&(vl=4194304),t}function Vc(t){for(var s=[],a=0;31>a;a++)s.push(t);return s}function Ir(t,s){t.pendingLanes|=s,s!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function YS(t,s,a,c,h,p){var y=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=t.entanglements,C=t.expirationTimes,z=t.hiddenUpdates;for(a=y&~a;0<a;){var K=31-kt(a),Q=1<<K;T[K]=0,C[K]=-1;var H=z[K];if(H!==null)for(z[K]=null,K=0;K<H.length;K++){var q=H[K];q!==null&&(q.lane&=-536870913)}a&=~Q}c!==0&&Fd(t,c,0),p!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=p&~(y&~s))}function Fd(t,s,a){t.pendingLanes|=s,t.suspendedLanes&=~s;var c=31-kt(s);t.entangledLanes|=s,t.entanglements[c]=t.entanglements[c]|1073741824|a&261930}function Qd(t,s){var a=t.entangledLanes|=s;for(t=t.entanglements;a;){var c=31-kt(a),h=1<<c;h&s|t[c]&s&&(t[c]|=s),a&=~h}}function Pd(t,s){var a=s&-s;return a=(a&42)!==0?1:Gc(a),(a&(t.suspendedLanes|s))!==0?0:a}function Gc(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 Jd(){var t=J.p;return t!==0?t:(t=window.event,t===void 0?32:zy(t.type))}function Zd(t,s){var a=J.p;try{return J.p=t,s()}finally{J.p=a}}var ci=Math.random().toString(36).slice(2),pt="__reactFiber$"+ci,jt="__reactProps$"+ci,xs="__reactContainer$"+ci,Xc="__reactEvents$"+ci,FS="__reactListeners$"+ci,QS="__reactHandles$"+ci,Wd="__reactResources$"+ci,Vr="__reactMarker$"+ci;function Yc(t){delete t[pt],delete t[jt],delete t[Xc],delete t[FS],delete t[QS]}function _s(t){var s=t[pt];if(s)return s;for(var a=t.parentNode;a;){if(s=a[xs]||a[pt]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(t=Sy(t);t!==null;){if(a=t[pt])return a;t=Sy(t)}return s}t=a,a=t.parentNode}return null}function Es(t){if(t=t[pt]||t[xs]){var s=t.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return t}return null}function Gr(t){var s=t.tag;if(s===5||s===26||s===27||s===6)return t.stateNode;throw Error(r(33))}function Ts(t){var s=t[Wd];return s||(s=t[Wd]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function ht(t){t[Vr]=!0}var ep=new Set,tp={};function Gi(t,s){As(t,s),As(t+"Capture",s)}function As(t,s){for(tp[t]=s,t=0;t<s.length;t++)ep.add(s[t])}var PS=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]*$"),np={},ip={};function JS(t){return ws.call(ip,t)?!0:ws.call(np,t)?!1:PS.test(t)?ip[t]=!0:(np[t]=!0,!1)}function wl(t,s,a){if(JS(s))if(a===null)t.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(s);return;case"boolean":var c=s.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(s);return}}t.setAttribute(s,""+a)}}function xl(t,s,a){if(a===null)t.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttribute(s,""+a)}}function Rn(t,s,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(s,a,""+c)}}function sn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function sp(t){var s=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ZS(t,s,a){var c=Object.getOwnPropertyDescriptor(t.constructor.prototype,s);if(!t.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var h=c.get,p=c.set;return Object.defineProperty(t,s,{configurable:!0,get:function(){return h.call(this)},set:function(y){a=""+y,p.call(this,y)}}),Object.defineProperty(t,s,{enumerable:c.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){t._valueTracker=null,delete t[s]}}}}function Fc(t){if(!t._valueTracker){var s=sp(t)?"checked":"value";t._valueTracker=ZS(t,s,""+t[s])}}function rp(t){if(!t)return!1;var s=t._valueTracker;if(!s)return!0;var a=s.getValue(),c="";return t&&(c=sp(t)?t.checked?"true":"false":t.value),t=c,t!==a?(s.setValue(t),!0):!1}function _l(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 WS=/[\n"\\]/g;function rn(t){return t.replace(WS,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Qc(t,s,a,c,h,p,y,T){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),s!=null?y==="number"?(s===0&&t.value===""||t.value!=s)&&(t.value=""+sn(s)):t.value!==""+sn(s)&&(t.value=""+sn(s)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),s!=null?Pc(t,y,sn(s)):a!=null?Pc(t,y,sn(a)):c!=null&&t.removeAttribute("value"),h==null&&p!=null&&(t.defaultChecked=!!p),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?t.name=""+sn(T):t.removeAttribute("name")}function ap(t,s,a,c,h,p,y,T){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(t.type=p),s!=null||a!=null){if(!(p!=="submit"&&p!=="reset"||s!=null)){Fc(t);return}a=a!=null?""+sn(a):"",s=s!=null?""+sn(s):a,T||s===t.value||(t.value=s),t.defaultValue=s}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=T?t.checked:!!c,t.defaultChecked=!!c,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),Fc(t)}function Pc(t,s,a){s==="number"&&_l(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Cs(t,s,a,c){if(t=t.options,s){s={};for(var h=0;h<a.length;h++)s["$"+a[h]]=!0;for(a=0;a<t.length;a++)h=s.hasOwnProperty("$"+t[a].value),t[a].selected!==h&&(t[a].selected=h),h&&c&&(t[a].defaultSelected=!0)}else{for(a=""+sn(a),s=null,h=0;h<t.length;h++){if(t[h].value===a){t[h].selected=!0,c&&(t[h].defaultSelected=!0);return}s!==null||t[h].disabled||(s=t[h])}s!==null&&(s.selected=!0)}}function lp(t,s,a){if(s!=null&&(s=""+sn(s),s!==t.value&&(t.value=s),a==null)){t.defaultValue!==s&&(t.defaultValue=s);return}t.defaultValue=a!=null?""+sn(a):""}function op(t,s,a,c){if(s==null){if(c!=null){if(a!=null)throw Error(r(92));if(Ue(c)){if(1<c.length)throw Error(r(93));c=c[0]}a=c}a==null&&(a=""),s=a}a=sn(s),t.defaultValue=a,c=t.textContent,c===a&&c!==""&&c!==null&&(t.value=c),Fc(t)}function Ns(t,s){if(s){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=s;return}}t.textContent=s}var e1=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 cp(t,s,a){var c=s.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?c?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="":c?t.setProperty(s,a):typeof a!="number"||a===0||e1.has(s)?s==="float"?t.cssFloat=a:t[s]=(""+a).trim():t[s]=a+"px"}function up(t,s,a){if(s!=null&&typeof s!="object")throw Error(r(62));if(t=t.style,a!=null){for(var c in a)!a.hasOwnProperty(c)||s!=null&&s.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var h in s)c=s[h],s.hasOwnProperty(h)&&a[h]!==c&&cp(t,h,c)}else for(var p in s)s.hasOwnProperty(p)&&cp(t,p,s[p])}function Jc(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 t1=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"]]),n1=/^[\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 El(t){return n1.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Dn(){}var Zc=null;function Wc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ks=null,Ms=null;function fp(t){var s=Es(t);if(s&&(t=s.stateNode)){var a=t[jt]||null;e:switch(t=s.stateNode,s.type){case"input":if(Qc(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),s=a.name,a.type==="radio"&&s!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+rn(""+s)+'"][type="radio"]'),s=0;s<a.length;s++){var c=a[s];if(c!==t&&c.form===t.form){var h=c[jt]||null;if(!h)throw Error(r(90));Qc(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(s=0;s<a.length;s++)c=a[s],c.form===t.form&&rp(c)}break e;case"textarea":lp(t,a.value,a.defaultValue);break e;case"select":s=a.value,s!=null&&Cs(t,!!a.multiple,s,!1)}}}var eu=!1;function hp(t,s,a){if(eu)return t(s,a);eu=!0;try{var c=t(s);return c}finally{if(eu=!1,(ks!==null||Ms!==null)&&(fo(),ks&&(s=ks,t=Ms,Ms=ks=null,fp(s),t)))for(s=0;s<t.length;s++)fp(t[s])}}function Kr(t,s){var a=t.stateNode;if(a===null)return null;var c=a[jt]||null;if(c===null)return null;a=c[s];e:switch(s){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(r(231,s,typeof a));return a}var zn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tu=!1;if(zn)try{var Xr={};Object.defineProperty(Xr,"passive",{get:function(){tu=!0}}),window.addEventListener("test",Xr,Xr),window.removeEventListener("test",Xr,Xr)}catch{tu=!1}var ui=null,nu=null,Tl=null;function dp(){if(Tl)return Tl;var t,s=nu,a=s.length,c,h="value"in ui?ui.value:ui.textContent,p=h.length;for(t=0;t<a&&s[t]===h[t];t++);var y=a-t;for(c=1;c<=y&&s[a-c]===h[p-c];c++);return Tl=h.slice(t,1<c?1-c:void 0)}function Al(t){var s=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&s===13&&(t=13)):t=s,t===10&&(t=13),32<=t||t===13?t:0}function Cl(){return!0}function pp(){return!1}function Lt(t){function s(a,c,h,p,y){this._reactName=a,this._targetInst=h,this.type=c,this.nativeEvent=p,this.target=y,this.currentTarget=null;for(var T in t)t.hasOwnProperty(T)&&(a=t[T],this[T]=a?a(p):p[T]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Cl:pp,this.isPropagationStopped=pp,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Cl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Cl)},persist:function(){},isPersistent:Cl}),s}var Ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nl=Lt(Ki),Yr=m({},Ki,{view:0,detail:0}),i1=Lt(Yr),iu,su,Fr,kl=m({},Yr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:au,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!==Fr&&(Fr&&t.type==="mousemove"?(iu=t.screenX-Fr.screenX,su=t.screenY-Fr.screenY):su=iu=0,Fr=t),iu)},movementY:function(t){return"movementY"in t?t.movementY:su}}),gp=Lt(kl),s1=m({},kl,{dataTransfer:0}),r1=Lt(s1),a1=m({},Yr,{relatedTarget:0}),ru=Lt(a1),l1=m({},Ki,{animationName:0,elapsedTime:0,pseudoElement:0}),o1=Lt(l1),c1=m({},Ki,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),u1=Lt(c1),f1=m({},Ki,{data:0}),mp=Lt(f1),h1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},d1={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"},p1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function g1(t){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(t):(t=p1[t])?!!s[t]:!1}function au(){return g1}var m1=m({},Yr,{key:function(t){if(t.key){var s=h1[t.key]||t.key;if(s!=="Unidentified")return s}return t.type==="keypress"?(t=Al(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?d1[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:au,charCode:function(t){return t.type==="keypress"?Al(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Al(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),y1=Lt(m1),b1=m({},kl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yp=Lt(b1),v1=m({},Yr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:au}),S1=Lt(v1),w1=m({},Ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),x1=Lt(w1),_1=m({},kl,{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}),E1=Lt(_1),T1=m({},Ki,{newState:0,oldState:0}),A1=Lt(T1),C1=[9,13,27,32],lu=zn&&"CompositionEvent"in window,Qr=null;zn&&"documentMode"in document&&(Qr=document.documentMode);var N1=zn&&"TextEvent"in window&&!Qr,bp=zn&&(!lu||Qr&&8<Qr&&11>=Qr),vp=" ",Sp=!1;function wp(t,s){switch(t){case"keyup":return C1.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Os=!1;function k1(t,s){switch(t){case"compositionend":return xp(s);case"keypress":return s.which!==32?null:(Sp=!0,vp);case"textInput":return t=s.data,t===vp&&Sp?null:t;default:return null}}function M1(t,s){if(Os)return t==="compositionend"||!lu&&wp(t,s)?(t=dp(),Tl=nu=ui=null,Os=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return bp&&s.locale!=="ko"?null:s.data;default:return null}}var O1={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 _p(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s==="input"?!!O1[t.type]:s==="textarea"}function Ep(t,s,a,c){ks?Ms?Ms.push(c):Ms=[c]:ks=c,s=vo(s,"onChange"),0<s.length&&(a=new Nl("onChange","change",null,a,c),t.push({event:a,listeners:s}))}var Pr=null,Jr=null;function j1(t){ay(t,0)}function Ml(t){var s=Gr(t);if(rp(s))return t}function Tp(t,s){if(t==="change")return s}var Ap=!1;if(zn){var ou;if(zn){var cu="oninput"in document;if(!cu){var Cp=document.createElement("div");Cp.setAttribute("oninput","return;"),cu=typeof Cp.oninput=="function"}ou=cu}else ou=!1;Ap=ou&&(!document.documentMode||9<document.documentMode)}function Np(){Pr&&(Pr.detachEvent("onpropertychange",kp),Jr=Pr=null)}function kp(t){if(t.propertyName==="value"&&Ml(Jr)){var s=[];Ep(s,Jr,t,Wc(t)),hp(j1,s)}}function L1(t,s,a){t==="focusin"?(Np(),Pr=s,Jr=a,Pr.attachEvent("onpropertychange",kp)):t==="focusout"&&Np()}function R1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ml(Jr)}function D1(t,s){if(t==="click")return Ml(s)}function z1(t,s){if(t==="input"||t==="change")return Ml(s)}function U1(t,s){return t===s&&(t!==0||1/t===1/s)||t!==t&&s!==s}var Xt=typeof Object.is=="function"?Object.is:U1;function Zr(t,s){if(Xt(t,s))return!0;if(typeof t!="object"||t===null||typeof s!="object"||s===null)return!1;var a=Object.keys(t),c=Object.keys(s);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var h=a[c];if(!ws.call(s,h)||!Xt(t[h],s[h]))return!1}return!0}function Mp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Op(t,s){var a=Mp(t);t=0;for(var c;a;){if(a.nodeType===3){if(c=t+a.textContent.length,t<=s&&c>=s)return{node:a,offset:s-t};t=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Mp(a)}}function jp(t,s){return t&&s?t===s?!0:t&&t.nodeType===3?!1:s&&s.nodeType===3?jp(t,s.parentNode):"contains"in t?t.contains(s):t.compareDocumentPosition?!!(t.compareDocumentPosition(s)&16):!1:!1}function Lp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var s=_l(t.document);s instanceof t.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)t=s.contentWindow;else break;s=_l(t.document)}return s}function uu(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s&&(s==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||s==="textarea"||t.contentEditable==="true")}var H1=zn&&"documentMode"in document&&11>=document.documentMode,js=null,fu=null,Wr=null,hu=!1;function Rp(t,s,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;hu||js==null||js!==_l(c)||(c=js,"selectionStart"in c&&uu(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}),Wr&&Zr(Wr,c)||(Wr=c,c=vo(fu,"onSelect"),0<c.length&&(s=new Nl("onSelect","select",null,s,a),t.push({event:s,listeners:c}),s.target=js)))}function Xi(t,s){var a={};return a[t.toLowerCase()]=s.toLowerCase(),a["Webkit"+t]="webkit"+s,a["Moz"+t]="moz"+s,a}var Ls={animationend:Xi("Animation","AnimationEnd"),animationiteration:Xi("Animation","AnimationIteration"),animationstart:Xi("Animation","AnimationStart"),transitionrun:Xi("Transition","TransitionRun"),transitionstart:Xi("Transition","TransitionStart"),transitioncancel:Xi("Transition","TransitionCancel"),transitionend:Xi("Transition","TransitionEnd")},du={},Dp={};zn&&(Dp=document.createElement("div").style,"AnimationEvent"in window||(delete Ls.animationend.animation,delete Ls.animationiteration.animation,delete Ls.animationstart.animation),"TransitionEvent"in window||delete Ls.transitionend.transition);function Yi(t){if(du[t])return du[t];if(!Ls[t])return t;var s=Ls[t],a;for(a in s)if(s.hasOwnProperty(a)&&a in Dp)return du[t]=s[a];return t}var zp=Yi("animationend"),Up=Yi("animationiteration"),Hp=Yi("animationstart"),B1=Yi("transitionrun"),q1=Yi("transitionstart"),$1=Yi("transitioncancel"),Bp=Yi("transitionend"),qp=new Map,pu="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(" ");pu.push("scrollEnd");function vn(t,s){qp.set(t,s),Gi(s,[t])}var Ol=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=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(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},an=[],Rs=0,gu=0;function jl(){for(var t=Rs,s=gu=Rs=0;s<t;){var a=an[s];an[s++]=null;var c=an[s];an[s++]=null;var h=an[s];an[s++]=null;var p=an[s];if(an[s++]=null,c!==null&&h!==null){var y=c.pending;y===null?h.next=h:(h.next=y.next,y.next=h),c.pending=h}p!==0&&$p(a,h,p)}}function Ll(t,s,a,c){an[Rs++]=t,an[Rs++]=s,an[Rs++]=a,an[Rs++]=c,gu|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function mu(t,s,a,c){return Ll(t,s,a,c),Rl(t)}function Fi(t,s){return Ll(t,null,null,s),Rl(t)}function $p(t,s,a){t.lanes|=a;var c=t.alternate;c!==null&&(c.lanes|=a);for(var h=!1,p=t.return;p!==null;)p.childLanes|=a,c=p.alternate,c!==null&&(c.childLanes|=a),p.tag===22&&(t=p.stateNode,t===null||t._visibility&1||(h=!0)),t=p,p=p.return;return t.tag===3?(p=t.stateNode,h&&s!==null&&(h=31-kt(a),t=p.hiddenUpdates,c=t[h],c===null?t[h]=[s]:c.push(s),s.lane=a|536870912),p):null}function Rl(t){if(50<wa)throw wa=0,Af=null,Error(r(185));for(var s=t.return;s!==null;)t=s,s=t.return;return t.tag===3?t.stateNode:null}var Ds={};function I1(t,s,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=s,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 Yt(t,s,a,c){return new I1(t,s,a,c)}function yu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Un(t,s){var a=t.alternate;return a===null?(a=Yt(t.tag,s,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=s,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,s=t.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Ip(t,s){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=s,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,s=a.dependencies,t.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),t}function Dl(t,s,a,c,h,p){var y=0;if(c=t,typeof t=="function")yu(t)&&(y=1);else if(typeof t=="string")y=Yw(t,a,P.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case O:return t=Yt(31,a,s,h),t.elementType=O,t.lanes=p,t;case x:return Qi(a.children,h,p,s);case _:y=8,h|=24;break;case A:return t=Yt(12,a,s,h|2),t.elementType=A,t.lanes=p,t;case X:return t=Yt(13,a,s,h),t.elementType=X,t.lanes=p,t;case U:return t=Yt(19,a,s,h),t.elementType=U,t.lanes=p,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case $:y=10;break e;case N:y=9;break e;case G:y=11;break e;case L:y=14;break e;case B:y=16,c=null;break e}y=29,a=Error(r(130,t===null?"null":typeof t,"")),c=null}return s=Yt(y,a,s,h),s.elementType=t,s.type=c,s.lanes=p,s}function Qi(t,s,a,c){return t=Yt(7,t,c,s),t.lanes=a,t}function bu(t,s,a){return t=Yt(6,t,null,s),t.lanes=a,t}function Vp(t){var s=Yt(18,null,null,0);return s.stateNode=t,s}function vu(t,s,a){return s=Yt(4,t.children!==null?t.children:[],t.key,s),s.lanes=a,s.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},s}var Gp=new WeakMap;function ln(t,s){if(typeof t=="object"&&t!==null){var a=Gp.get(t);return a!==void 0?a:(s={value:t,source:s,stack:qi(s)},Gp.set(t,s),s)}return{value:t,source:s,stack:qi(s)}}var zs=[],Us=0,zl=null,ea=0,on=[],cn=0,fi=null,Cn=1,Nn="";function Hn(t,s){zs[Us++]=ea,zs[Us++]=zl,zl=t,ea=s}function Kp(t,s,a){on[cn++]=Cn,on[cn++]=Nn,on[cn++]=fi,fi=t;var c=Cn;t=Nn;var h=32-kt(c)-1;c&=~(1<<h),a+=1;var p=32-kt(s)+h;if(30<p){var y=h-h%5;p=(c&(1<<y)-1).toString(32),c>>=y,h-=y,Cn=1<<32-kt(s)+h|a<<h|c,Nn=p+t}else Cn=1<<p|a<<h|c,Nn=t}function Su(t){t.return!==null&&(Hn(t,1),Kp(t,1,0))}function wu(t){for(;t===zl;)zl=zs[--Us],zs[Us]=null,ea=zs[--Us],zs[Us]=null;for(;t===fi;)fi=on[--cn],on[cn]=null,Nn=on[--cn],on[cn]=null,Cn=on[--cn],on[cn]=null}function Xp(t,s){on[cn++]=Cn,on[cn++]=Nn,on[cn++]=fi,Cn=s.id,Nn=s.overflow,fi=t}var gt=null,He=null,we=!1,hi=null,un=!1,xu=Error(r(519));function di(t){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ta(ln(s,t)),xu}function Yp(t){var s=t.stateNode,a=t.type,c=t.memoizedProps;switch(s[pt]=t,s[jt]=c,a){case"dialog":ye("cancel",s),ye("close",s);break;case"iframe":case"object":case"embed":ye("load",s);break;case"video":case"audio":for(a=0;a<_a.length;a++)ye(_a[a],s);break;case"source":ye("error",s);break;case"img":case"image":case"link":ye("error",s),ye("load",s);break;case"details":ye("toggle",s);break;case"input":ye("invalid",s),ap(s,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":ye("invalid",s);break;case"textarea":ye("invalid",s),op(s,c.value,c.defaultValue,c.children)}a=c.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||s.textContent===""+a||c.suppressHydrationWarning===!0||uy(s.textContent,a)?(c.popover!=null&&(ye("beforetoggle",s),ye("toggle",s)),c.onScroll!=null&&ye("scroll",s),c.onScrollEnd!=null&&ye("scrollend",s),c.onClick!=null&&(s.onclick=Dn),s=!0):s=!1,s||di(t,!0)}function Fp(t){for(gt=t.return;gt;)switch(gt.tag){case 5:case 31:case 13:un=!1;return;case 27:case 3:un=!0;return;default:gt=gt.return}}function Hs(t){if(t!==gt)return!1;if(!we)return Fp(t),we=!0,!1;var s=t.tag,a;if((a=s!==3&&s!==27)&&((a=s===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||$f(t.type,t.memoizedProps)),a=!a),a&&He&&di(t),Fp(t),s===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));He=vy(t)}else if(s===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));He=vy(t)}else s===27?(s=He,Ci(t.type)?(t=Xf,Xf=null,He=t):He=s):He=gt?hn(t.stateNode.nextSibling):null;return!0}function Pi(){He=gt=null,we=!1}function _u(){var t=hi;return t!==null&&(Ut===null?Ut=t:Ut.push.apply(Ut,t),hi=null),t}function ta(t){hi===null?hi=[t]:hi.push(t)}var Eu=M(null),Ji=null,Bn=null;function pi(t,s,a){Z(Eu,s._currentValue),s._currentValue=a}function qn(t){t._currentValue=Eu.current,Y(Eu)}function Tu(t,s,a){for(;t!==null;){var c=t.alternate;if((t.childLanes&s)!==s?(t.childLanes|=s,c!==null&&(c.childLanes|=s)):c!==null&&(c.childLanes&s)!==s&&(c.childLanes|=s),t===a)break;t=t.return}}function Au(t,s,a,c){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var p=h.dependencies;if(p!==null){var y=h.child;p=p.firstContext;e:for(;p!==null;){var T=p;p=h;for(var C=0;C<s.length;C++)if(T.context===s[C]){p.lanes|=a,T=p.alternate,T!==null&&(T.lanes|=a),Tu(p.return,a,t),c||(y=null);break e}p=T.next}}else if(h.tag===18){if(y=h.return,y===null)throw Error(r(341));y.lanes|=a,p=y.alternate,p!==null&&(p.lanes|=a),Tu(y,a,t),y=null}else y=h.child;if(y!==null)y.return=h;else for(y=h;y!==null;){if(y===t){y=null;break}if(h=y.sibling,h!==null){h.return=y.return,y=h;break}y=y.return}h=y}}function Bs(t,s,a,c){t=null;for(var h=s,p=!1;h!==null;){if(!p){if((h.flags&524288)!==0)p=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var y=h.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var T=h.type;Xt(h.pendingProps.value,y.value)||(t!==null?t.push(T):t=[T])}}else if(h===be.current){if(y=h.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Na):t=[Na])}h=h.return}t!==null&&Au(s,t,a,c),s.flags|=262144}function Ul(t){for(t=t.firstContext;t!==null;){if(!Xt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Zi(t){Ji=t,Bn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function mt(t){return Qp(Ji,t)}function Hl(t,s){return Ji===null&&Zi(t),Qp(t,s)}function Qp(t,s){var a=s._currentValue;if(s={context:s,memoizedValue:a,next:null},Bn===null){if(t===null)throw Error(r(308));Bn=s,t.dependencies={lanes:0,firstContext:s},t.flags|=524288}else Bn=Bn.next=s;return a}var V1=typeof AbortController<"u"?AbortController:function(){var t=[],s=this.signal={aborted:!1,addEventListener:function(a,c){t.push(c)}};this.abort=function(){s.aborted=!0,t.forEach(function(a){return a()})}},G1=n.unstable_scheduleCallback,K1=n.unstable_NormalPriority,tt={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cu(){return{controller:new V1,data:new Map,refCount:0}}function na(t){t.refCount--,t.refCount===0&&G1(K1,function(){t.controller.abort()})}var ia=null,Nu=0,qs=0,$s=null;function X1(t,s){if(ia===null){var a=ia=[];Nu=0,qs=jf(),$s={status:"pending",value:void 0,then:function(c){a.push(c)}}}return Nu++,s.then(Pp,Pp),s}function Pp(){if(--Nu===0&&ia!==null){$s!==null&&($s.status="fulfilled");var t=ia;ia=null,qs=0,$s=null;for(var s=0;s<t.length;s++)(0,t[s])()}}function Y1(t,s){var a=[],c={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return t.then(function(){c.status="fulfilled",c.value=s;for(var h=0;h<a.length;h++)(0,a[h])(s)},function(h){for(c.status="rejected",c.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),c}var Jp=I.S;I.S=function(t,s){Rm=Ct(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&X1(t,s),Jp!==null&&Jp(t,s)};var Wi=M(null);function ku(){var t=Wi.current;return t!==null?t:De.pooledCache}function Bl(t,s){s===null?Z(Wi,Wi.current):Z(Wi,s.pool)}function Zp(){var t=ku();return t===null?null:{parent:tt._currentValue,pool:t}}var Is=Error(r(460)),Mu=Error(r(474)),ql=Error(r(542)),$l={then:function(){}};function Wp(t){return t=t.status,t==="fulfilled"||t==="rejected"}function eg(t,s,a){switch(a=t[a],a===void 0?t.push(s):a!==s&&(s.then(Dn,Dn),s=a),s.status){case"fulfilled":return s.value;case"rejected":throw t=s.reason,ng(t),t;default:if(typeof s.status=="string")s.then(Dn,Dn);else{if(t=De,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=s,t.status="pending",t.then(function(c){if(s.status==="pending"){var h=s;h.status="fulfilled",h.value=c}},function(c){if(s.status==="pending"){var h=s;h.status="rejected",h.reason=c}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw t=s.reason,ng(t),t}throw ts=s,Is}}function es(t){try{var s=t._init;return s(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ts=a,Is):a}}var ts=null;function tg(){if(ts===null)throw Error(r(459));var t=ts;return ts=null,t}function ng(t){if(t===Is||t===ql)throw Error(r(483))}var Vs=null,sa=0;function Il(t){var s=sa;return sa+=1,Vs===null&&(Vs=[]),eg(Vs,t,s)}function ra(t,s){s=s.props.ref,t.ref=s!==void 0?s:null}function Vl(t,s){throw s.$$typeof===S?Error(r(525)):(t=Object.prototype.toString.call(s),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":t)))}function ig(t){function s(j,k){if(t){var D=j.deletions;D===null?(j.deletions=[k],j.flags|=16):D.push(k)}}function a(j,k){if(!t)return null;for(;k!==null;)s(j,k),k=k.sibling;return null}function c(j){for(var k=new Map;j!==null;)j.key!==null?k.set(j.key,j):k.set(j.index,j),j=j.sibling;return k}function h(j,k){return j=Un(j,k),j.index=0,j.sibling=null,j}function p(j,k,D){return j.index=D,t?(D=j.alternate,D!==null?(D=D.index,D<k?(j.flags|=67108866,k):D):(j.flags|=67108866,k)):(j.flags|=1048576,k)}function y(j){return t&&j.alternate===null&&(j.flags|=67108866),j}function T(j,k,D,F){return k===null||k.tag!==6?(k=bu(D,j.mode,F),k.return=j,k):(k=h(k,D),k.return=j,k)}function C(j,k,D,F){var se=D.type;return se===x?K(j,k,D.props.children,F,D.key):k!==null&&(k.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===B&&es(se)===k.type)?(k=h(k,D.props),ra(k,D),k.return=j,k):(k=Dl(D.type,D.key,D.props,null,j.mode,F),ra(k,D),k.return=j,k)}function z(j,k,D,F){return k===null||k.tag!==4||k.stateNode.containerInfo!==D.containerInfo||k.stateNode.implementation!==D.implementation?(k=vu(D,j.mode,F),k.return=j,k):(k=h(k,D.children||[]),k.return=j,k)}function K(j,k,D,F,se){return k===null||k.tag!==7?(k=Qi(D,j.mode,F,se),k.return=j,k):(k=h(k,D),k.return=j,k)}function Q(j,k,D){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=bu(""+k,j.mode,D),k.return=j,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case w:return D=Dl(k.type,k.key,k.props,null,j.mode,D),ra(D,k),D.return=j,D;case E:return k=vu(k,j.mode,D),k.return=j,k;case B:return k=es(k),Q(j,k,D)}if(Ue(k)||V(k))return k=Qi(k,j.mode,D,null),k.return=j,k;if(typeof k.then=="function")return Q(j,Il(k),D);if(k.$$typeof===$)return Q(j,Hl(j,k),D);Vl(j,k)}return null}function H(j,k,D,F){var se=k!==null?k.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return se!==null?null:T(j,k,""+D,F);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case w:return D.key===se?C(j,k,D,F):null;case E:return D.key===se?z(j,k,D,F):null;case B:return D=es(D),H(j,k,D,F)}if(Ue(D)||V(D))return se!==null?null:K(j,k,D,F,null);if(typeof D.then=="function")return H(j,k,Il(D),F);if(D.$$typeof===$)return H(j,k,Hl(j,D),F);Vl(j,D)}return null}function q(j,k,D,F,se){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return j=j.get(D)||null,T(k,j,""+F,se);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case w:return j=j.get(F.key===null?D:F.key)||null,C(k,j,F,se);case E:return j=j.get(F.key===null?D:F.key)||null,z(k,j,F,se);case B:return F=es(F),q(j,k,D,F,se)}if(Ue(F)||V(F))return j=j.get(D)||null,K(k,j,F,se,null);if(typeof F.then=="function")return q(j,k,D,Il(F),se);if(F.$$typeof===$)return q(j,k,D,Hl(k,F),se);Vl(k,F)}return null}function ee(j,k,D,F){for(var se=null,Te=null,ie=k,pe=k=0,Se=null;ie!==null&&pe<D.length;pe++){ie.index>pe?(Se=ie,ie=null):Se=ie.sibling;var Ae=H(j,ie,D[pe],F);if(Ae===null){ie===null&&(ie=Se);break}t&&ie&&Ae.alternate===null&&s(j,ie),k=p(Ae,k,pe),Te===null?se=Ae:Te.sibling=Ae,Te=Ae,ie=Se}if(pe===D.length)return a(j,ie),we&&Hn(j,pe),se;if(ie===null){for(;pe<D.length;pe++)ie=Q(j,D[pe],F),ie!==null&&(k=p(ie,k,pe),Te===null?se=ie:Te.sibling=ie,Te=ie);return we&&Hn(j,pe),se}for(ie=c(ie);pe<D.length;pe++)Se=q(ie,j,pe,D[pe],F),Se!==null&&(t&&Se.alternate!==null&&ie.delete(Se.key===null?pe:Se.key),k=p(Se,k,pe),Te===null?se=Se:Te.sibling=Se,Te=Se);return t&&ie.forEach(function(ji){return s(j,ji)}),we&&Hn(j,pe),se}function le(j,k,D,F){if(D==null)throw Error(r(151));for(var se=null,Te=null,ie=k,pe=k=0,Se=null,Ae=D.next();ie!==null&&!Ae.done;pe++,Ae=D.next()){ie.index>pe?(Se=ie,ie=null):Se=ie.sibling;var ji=H(j,ie,Ae.value,F);if(ji===null){ie===null&&(ie=Se);break}t&&ie&&ji.alternate===null&&s(j,ie),k=p(ji,k,pe),Te===null?se=ji:Te.sibling=ji,Te=ji,ie=Se}if(Ae.done)return a(j,ie),we&&Hn(j,pe),se;if(ie===null){for(;!Ae.done;pe++,Ae=D.next())Ae=Q(j,Ae.value,F),Ae!==null&&(k=p(Ae,k,pe),Te===null?se=Ae:Te.sibling=Ae,Te=Ae);return we&&Hn(j,pe),se}for(ie=c(ie);!Ae.done;pe++,Ae=D.next())Ae=q(ie,j,pe,Ae.value,F),Ae!==null&&(t&&Ae.alternate!==null&&ie.delete(Ae.key===null?pe:Ae.key),k=p(Ae,k,pe),Te===null?se=Ae:Te.sibling=Ae,Te=Ae);return t&&ie.forEach(function(sx){return s(j,sx)}),we&&Hn(j,pe),se}function Re(j,k,D,F){if(typeof D=="object"&&D!==null&&D.type===x&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case w:e:{for(var se=D.key;k!==null;){if(k.key===se){if(se=D.type,se===x){if(k.tag===7){a(j,k.sibling),F=h(k,D.props.children),F.return=j,j=F;break e}}else if(k.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===B&&es(se)===k.type){a(j,k.sibling),F=h(k,D.props),ra(F,D),F.return=j,j=F;break e}a(j,k);break}else s(j,k);k=k.sibling}D.type===x?(F=Qi(D.props.children,j.mode,F,D.key),F.return=j,j=F):(F=Dl(D.type,D.key,D.props,null,j.mode,F),ra(F,D),F.return=j,j=F)}return y(j);case E:e:{for(se=D.key;k!==null;){if(k.key===se)if(k.tag===4&&k.stateNode.containerInfo===D.containerInfo&&k.stateNode.implementation===D.implementation){a(j,k.sibling),F=h(k,D.children||[]),F.return=j,j=F;break e}else{a(j,k);break}else s(j,k);k=k.sibling}F=vu(D,j.mode,F),F.return=j,j=F}return y(j);case B:return D=es(D),Re(j,k,D,F)}if(Ue(D))return ee(j,k,D,F);if(V(D)){if(se=V(D),typeof se!="function")throw Error(r(150));return D=se.call(D),le(j,k,D,F)}if(typeof D.then=="function")return Re(j,k,Il(D),F);if(D.$$typeof===$)return Re(j,k,Hl(j,D),F);Vl(j,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,k!==null&&k.tag===6?(a(j,k.sibling),F=h(k,D),F.return=j,j=F):(a(j,k),F=bu(D,j.mode,F),F.return=j,j=F),y(j)):a(j,k)}return function(j,k,D,F){try{sa=0;var se=Re(j,k,D,F);return Vs=null,se}catch(ie){if(ie===Is||ie===ql)throw ie;var Te=Yt(29,ie,null,j.mode);return Te.lanes=F,Te.return=j,Te}finally{}}}var ns=ig(!0),sg=ig(!1),gi=!1;function Ou(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ju(t,s){t=t.updateQueue,s.updateQueue===t&&(s.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function mi(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function yi(t,s,a){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Ce&2)!==0){var h=c.pending;return h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s,s=Rl(t),$p(t,null,a),s}return Ll(t,c,s,a),Rl(t)}function aa(t,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194048)!==0)){var c=s.lanes;c&=t.pendingLanes,a|=c,s.lanes=a,Qd(t,a)}}function Lu(t,s){var a=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};p===null?h=p=y:p=p.next=y,a=a.next}while(a!==null);p===null?h=p=s:p=p.next=s}else h=p=s;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:p,shared:c.shared,callbacks:c.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=s:t.next=s,a.lastBaseUpdate=s}var Ru=!1;function la(){if(Ru){var t=$s;if(t!==null)throw t}}function oa(t,s,a,c){Ru=!1;var h=t.updateQueue;gi=!1;var p=h.firstBaseUpdate,y=h.lastBaseUpdate,T=h.shared.pending;if(T!==null){h.shared.pending=null;var C=T,z=C.next;C.next=null,y===null?p=z:y.next=z,y=C;var K=t.alternate;K!==null&&(K=K.updateQueue,T=K.lastBaseUpdate,T!==y&&(T===null?K.firstBaseUpdate=z:T.next=z,K.lastBaseUpdate=C))}if(p!==null){var Q=h.baseState;y=0,K=z=C=null,T=p;do{var H=T.lane&-536870913,q=H!==T.lane;if(q?(ve&H)===H:(c&H)===H){H!==0&&H===qs&&(Ru=!0),K!==null&&(K=K.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var ee=t,le=T;H=s;var Re=a;switch(le.tag){case 1:if(ee=le.payload,typeof ee=="function"){Q=ee.call(Re,Q,H);break e}Q=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=le.payload,H=typeof ee=="function"?ee.call(Re,Q,H):ee,H==null)break e;Q=m({},Q,H);break e;case 2:gi=!0}}H=T.callback,H!==null&&(t.flags|=64,q&&(t.flags|=8192),q=h.callbacks,q===null?h.callbacks=[H]:q.push(H))}else q={lane:H,tag:T.tag,payload:T.payload,callback:T.callback,next:null},K===null?(z=K=q,C=Q):K=K.next=q,y|=H;if(T=T.next,T===null){if(T=h.shared.pending,T===null)break;q=T,T=q.next,q.next=null,h.lastBaseUpdate=q,h.shared.pending=null}}while(!0);K===null&&(C=Q),h.baseState=C,h.firstBaseUpdate=z,h.lastBaseUpdate=K,p===null&&(h.shared.lanes=0),xi|=y,t.lanes=y,t.memoizedState=Q}}function rg(t,s){if(typeof t!="function")throw Error(r(191,t));t.call(s)}function ag(t,s){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)rg(a[t],s)}var Gs=M(null),Gl=M(0);function lg(t,s){t=Qn,Z(Gl,t),Z(Gs,s),Qn=t|s.baseLanes}function Du(){Z(Gl,Qn),Z(Gs,Gs.current)}function zu(){Qn=Gl.current,Y(Gs),Y(Gl)}var Ft=M(null),fn=null;function bi(t){var s=t.alternate;Z(Qe,Qe.current&1),Z(Ft,t),fn===null&&(s===null||Gs.current!==null||s.memoizedState!==null)&&(fn=t)}function Uu(t){Z(Qe,Qe.current),Z(Ft,t),fn===null&&(fn=t)}function og(t){t.tag===22?(Z(Qe,Qe.current),Z(Ft,t),fn===null&&(fn=t)):vi()}function vi(){Z(Qe,Qe.current),Z(Ft,Ft.current)}function Qt(t){Y(Ft),fn===t&&(fn=null),Y(Qe)}var Qe=M(0);function Kl(t){for(var s=t;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Gf(a)||Kf(a)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var $n=0,de=null,je=null,nt=null,Xl=!1,Ks=!1,is=!1,Yl=0,ca=0,Xs=null,F1=0;function Ye(){throw Error(r(321))}function Hu(t,s){if(s===null)return!1;for(var a=0;a<s.length&&a<t.length;a++)if(!Xt(t[a],s[a]))return!1;return!0}function Bu(t,s,a,c,h,p){return $n=p,de=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,I.H=t===null||t.memoizedState===null?Kg:ef,is=!1,p=a(c,h),is=!1,Ks&&(p=ug(s,a,c,h)),cg(t),p}function cg(t){I.H=ha;var s=je!==null&&je.next!==null;if($n=0,nt=je=de=null,Xl=!1,ca=0,Xs=null,s)throw Error(r(300));t===null||it||(t=t.dependencies,t!==null&&Ul(t)&&(it=!0))}function ug(t,s,a,c){de=t;var h=0;do{if(Ks&&(Xs=null),ca=0,Ks=!1,25<=h)throw Error(r(301));if(h+=1,nt=je=null,t.updateQueue!=null){var p=t.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}I.H=Xg,p=s(a,c)}while(Ks);return p}function Q1(){var t=I.H,s=t.useState()[0];return s=typeof s.then=="function"?ua(s):s,t=t.useState()[0],(je!==null?je.memoizedState:null)!==t&&(de.flags|=1024),s}function qu(){var t=Yl!==0;return Yl=0,t}function $u(t,s,a){s.updateQueue=t.updateQueue,s.flags&=-2053,t.lanes&=~a}function Iu(t){if(Xl){for(t=t.memoizedState;t!==null;){var s=t.queue;s!==null&&(s.pending=null),t=t.next}Xl=!1}$n=0,nt=je=de=null,Ks=!1,ca=Yl=0,Xs=null}function Mt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?de.memoizedState=nt=t:nt=nt.next=t,nt}function Pe(){if(je===null){var t=de.alternate;t=t!==null?t.memoizedState:null}else t=je.next;var s=nt===null?de.memoizedState:nt.next;if(s!==null)nt=s,je=t;else{if(t===null)throw de.alternate===null?Error(r(467)):Error(r(310));je=t,t={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},nt===null?de.memoizedState=nt=t:nt=nt.next=t}return nt}function Fl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ua(t){var s=ca;return ca+=1,Xs===null&&(Xs=[]),t=eg(Xs,t,s),s=de,(nt===null?s.memoizedState:nt.next)===null&&(s=s.alternate,I.H=s===null||s.memoizedState===null?Kg:ef),t}function Ql(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ua(t);if(t.$$typeof===$)return mt(t)}throw Error(r(438,String(t)))}function Vu(t){var s=null,a=de.updateQueue;if(a!==null&&(s=a.memoCache),s==null){var c=de.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(s={data:c.data.map(function(h){return h.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),a===null&&(a=Fl(),de.updateQueue=a),a.memoCache=s,a=s.data[s.index],a===void 0)for(a=s.data[s.index]=Array(t),c=0;c<t;c++)a[c]=ne;return s.index++,a}function In(t,s){return typeof s=="function"?s(t):s}function Pl(t){var s=Pe();return Gu(s,je,t)}function Gu(t,s,a){var c=t.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=a;var h=t.baseQueue,p=c.pending;if(p!==null){if(h!==null){var y=h.next;h.next=p.next,p.next=y}s.baseQueue=h=p,c.pending=null}if(p=t.baseState,h===null)t.memoizedState=p;else{s=h.next;var T=y=null,C=null,z=s,K=!1;do{var Q=z.lane&-536870913;if(Q!==z.lane?(ve&Q)===Q:($n&Q)===Q){var H=z.revertLane;if(H===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),Q===qs&&(K=!0);else if(($n&H)===H){z=z.next,H===qs&&(K=!0);continue}else Q={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},C===null?(T=C=Q,y=p):C=C.next=Q,de.lanes|=H,xi|=H;Q=z.action,is&&a(p,Q),p=z.hasEagerState?z.eagerState:a(p,Q)}else H={lane:Q,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},C===null?(T=C=H,y=p):C=C.next=H,de.lanes|=Q,xi|=Q;z=z.next}while(z!==null&&z!==s);if(C===null?y=p:C.next=T,!Xt(p,t.memoizedState)&&(it=!0,K&&(a=$s,a!==null)))throw a;t.memoizedState=p,t.baseState=y,t.baseQueue=C,c.lastRenderedState=p}return h===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Ku(t){var s=Pe(),a=s.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=t;var c=a.dispatch,h=a.pending,p=s.memoizedState;if(h!==null){a.pending=null;var y=h=h.next;do p=t(p,y.action),y=y.next;while(y!==h);Xt(p,s.memoizedState)||(it=!0),s.memoizedState=p,s.baseQueue===null&&(s.baseState=p),a.lastRenderedState=p}return[p,c]}function fg(t,s,a){var c=de,h=Pe(),p=we;if(p){if(a===void 0)throw Error(r(407));a=a()}else a=s();var y=!Xt((je||h).memoizedState,a);if(y&&(h.memoizedState=a,it=!0),h=h.queue,Fu(pg.bind(null,c,h,t),[t]),h.getSnapshot!==s||y||nt!==null&&nt.memoizedState.tag&1){if(c.flags|=2048,Ys(9,{destroy:void 0},dg.bind(null,c,h,a,s),null),De===null)throw Error(r(349));p||($n&127)!==0||hg(c,s,a)}return a}function hg(t,s,a){t.flags|=16384,t={getSnapshot:s,value:a},s=de.updateQueue,s===null?(s=Fl(),de.updateQueue=s,s.stores=[t]):(a=s.stores,a===null?s.stores=[t]:a.push(t))}function dg(t,s,a,c){s.value=a,s.getSnapshot=c,gg(s)&&mg(t)}function pg(t,s,a){return a(function(){gg(s)&&mg(t)})}function gg(t){var s=t.getSnapshot;t=t.value;try{var a=s();return!Xt(t,a)}catch{return!0}}function mg(t){var s=Fi(t,2);s!==null&&Ht(s,t,2)}function Xu(t){var s=Mt();if(typeof t=="function"){var a=t;if(t=a(),is){An(!0);try{a()}finally{An(!1)}}}return s.memoizedState=s.baseState=t,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:t},s}function yg(t,s,a,c){return t.baseState=a,Gu(t,je,typeof c=="function"?c:In)}function P1(t,s,a,c,h){if(Wl(t))throw Error(r(485));if(t=s.action,t!==null){var p={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){p.listeners.push(y)}};I.T!==null?a(!0):p.isTransition=!1,c(p),a=s.pending,a===null?(p.next=s.pending=p,bg(s,p)):(p.next=a.next,s.pending=a.next=p)}}function bg(t,s){var a=s.action,c=s.payload,h=t.state;if(s.isTransition){var p=I.T,y={};I.T=y;try{var T=a(h,c),C=I.S;C!==null&&C(y,T),vg(t,s,T)}catch(z){Yu(t,s,z)}finally{p!==null&&y.types!==null&&(p.types=y.types),I.T=p}}else try{p=a(h,c),vg(t,s,p)}catch(z){Yu(t,s,z)}}function vg(t,s,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(c){Sg(t,s,c)},function(c){return Yu(t,s,c)}):Sg(t,s,a)}function Sg(t,s,a){s.status="fulfilled",s.value=a,wg(s),t.state=a,s=t.pending,s!==null&&(a=s.next,a===s?t.pending=null:(a=a.next,s.next=a,bg(t,a)))}function Yu(t,s,a){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do s.status="rejected",s.reason=a,wg(s),s=s.next;while(s!==c)}t.action=null}function wg(t){t=t.listeners;for(var s=0;s<t.length;s++)(0,t[s])()}function xg(t,s){return s}function _g(t,s){if(we){var a=De.formState;if(a!==null){e:{var c=de;if(we){if(He){t:{for(var h=He,p=un;h.nodeType!==8;){if(!p){h=null;break t}if(h=hn(h.nextSibling),h===null){h=null;break t}}p=h.data,h=p==="F!"||p==="F"?h:null}if(h){He=hn(h.nextSibling),c=h.data==="F!";break e}}di(c)}c=!1}c&&(s=a[0])}}return a=Mt(),a.memoizedState=a.baseState=s,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xg,lastRenderedState:s},a.queue=c,a=Ig.bind(null,de,c),c.dispatch=a,c=Xu(!1),p=Wu.bind(null,de,!1,c.queue),c=Mt(),h={state:s,dispatch:null,action:t,pending:null},c.queue=h,a=P1.bind(null,de,h,p,a),h.dispatch=a,c.memoizedState=t,[s,a,!1]}function Eg(t){var s=Pe();return Tg(s,je,t)}function Tg(t,s,a){if(s=Gu(t,s,xg)[0],t=Pl(In)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var c=ua(s)}catch(y){throw y===Is?ql:y}else c=s;s=Pe();var h=s.queue,p=h.dispatch;return a!==s.memoizedState&&(de.flags|=2048,Ys(9,{destroy:void 0},J1.bind(null,h,a),null)),[c,p,t]}function J1(t,s){t.action=s}function Ag(t){var s=Pe(),a=je;if(a!==null)return Tg(s,a,t);Pe(),s=s.memoizedState,a=Pe();var c=a.queue.dispatch;return a.memoizedState=t,[s,c,!1]}function Ys(t,s,a,c){return t={tag:t,create:a,deps:c,inst:s,next:null},s=de.updateQueue,s===null&&(s=Fl(),de.updateQueue=s),a=s.lastEffect,a===null?s.lastEffect=t.next=t:(c=a.next,a.next=t,t.next=c,s.lastEffect=t),t}function Cg(){return Pe().memoizedState}function Jl(t,s,a,c){var h=Mt();de.flags|=t,h.memoizedState=Ys(1|s,{destroy:void 0},a,c===void 0?null:c)}function Zl(t,s,a,c){var h=Pe();c=c===void 0?null:c;var p=h.memoizedState.inst;je!==null&&c!==null&&Hu(c,je.memoizedState.deps)?h.memoizedState=Ys(s,p,a,c):(de.flags|=t,h.memoizedState=Ys(1|s,p,a,c))}function Ng(t,s){Jl(8390656,8,t,s)}function Fu(t,s){Zl(2048,8,t,s)}function Z1(t){de.flags|=4;var s=de.updateQueue;if(s===null)s=Fl(),de.updateQueue=s,s.events=[t];else{var a=s.events;a===null?s.events=[t]:a.push(t)}}function kg(t){var s=Pe().memoizedState;return Z1({ref:s,nextImpl:t}),function(){if((Ce&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function Mg(t,s){return Zl(4,2,t,s)}function Og(t,s){return Zl(4,4,t,s)}function jg(t,s){if(typeof s=="function"){t=t();var a=s(t);return function(){typeof a=="function"?a():s(null)}}if(s!=null)return t=t(),s.current=t,function(){s.current=null}}function Lg(t,s,a){a=a!=null?a.concat([t]):null,Zl(4,4,jg.bind(null,s,t),a)}function Qu(){}function Rg(t,s){var a=Pe();s=s===void 0?null:s;var c=a.memoizedState;return s!==null&&Hu(s,c[1])?c[0]:(a.memoizedState=[t,s],t)}function Dg(t,s){var a=Pe();s=s===void 0?null:s;var c=a.memoizedState;if(s!==null&&Hu(s,c[1]))return c[0];if(c=t(),is){An(!0);try{t()}finally{An(!1)}}return a.memoizedState=[c,s],c}function Pu(t,s,a){return a===void 0||($n&1073741824)!==0&&(ve&261930)===0?t.memoizedState=s:(t.memoizedState=a,t=zm(),de.lanes|=t,xi|=t,a)}function zg(t,s,a,c){return Xt(a,s)?a:Gs.current!==null?(t=Pu(t,a,c),Xt(t,s)||(it=!0),t):($n&42)===0||($n&1073741824)!==0&&(ve&261930)===0?(it=!0,t.memoizedState=a):(t=zm(),de.lanes|=t,xi|=t,s)}function Ug(t,s,a,c,h){var p=J.p;J.p=p!==0&&8>p?p:8;var y=I.T,T={};I.T=T,Wu(t,!1,s,a);try{var C=h(),z=I.S;if(z!==null&&z(T,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var K=Y1(C,c);fa(t,s,K,Zt(t))}else fa(t,s,c,Zt(t))}catch(Q){fa(t,s,{then:function(){},status:"rejected",reason:Q},Zt())}finally{J.p=p,y!==null&&T.types!==null&&(y.types=T.types),I.T=y}}function W1(){}function Ju(t,s,a,c){if(t.tag!==5)throw Error(r(476));var h=Hg(t).queue;Ug(t,h,s,re,a===null?W1:function(){return Bg(t),a(c)})}function Hg(t){var s=t.memoizedState;if(s!==null)return s;s={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:re},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:a},next:null},t.memoizedState=s,t=t.alternate,t!==null&&(t.memoizedState=s),s}function Bg(t){var s=Hg(t);s.next===null&&(s=t.alternate.memoizedState),fa(t,s.next.queue,{},Zt())}function Zu(){return mt(Na)}function qg(){return Pe().memoizedState}function $g(){return Pe().memoizedState}function ew(t){for(var s=t.return;s!==null;){switch(s.tag){case 24:case 3:var a=Zt();t=mi(a);var c=yi(s,t,a);c!==null&&(Ht(c,s,a),aa(c,s,a)),s={cache:Cu()},t.payload=s;return}s=s.return}}function tw(t,s,a){var c=Zt();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Wl(t)?Vg(s,a):(a=mu(t,s,a,c),a!==null&&(Ht(a,t,c),Gg(a,s,c)))}function Ig(t,s,a){var c=Zt();fa(t,s,a,c)}function fa(t,s,a,c){var h={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Wl(t))Vg(s,h);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=s.lastRenderedReducer,p!==null))try{var y=s.lastRenderedState,T=p(y,a);if(h.hasEagerState=!0,h.eagerState=T,Xt(T,y))return Ll(t,s,h,0),De===null&&jl(),!1}catch{}finally{}if(a=mu(t,s,h,c),a!==null)return Ht(a,t,c),Gg(a,s,c),!0}return!1}function Wu(t,s,a,c){if(c={lane:2,revertLane:jf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Wl(t)){if(s)throw Error(r(479))}else s=mu(t,a,c,2),s!==null&&Ht(s,t,2)}function Wl(t){var s=t.alternate;return t===de||s!==null&&s===de}function Vg(t,s){Ks=Xl=!0;var a=t.pending;a===null?s.next=s:(s.next=a.next,a.next=s),t.pending=s}function Gg(t,s,a){if((a&4194048)!==0){var c=s.lanes;c&=t.pendingLanes,a|=c,s.lanes=a,Qd(t,a)}}var ha={readContext:mt,use:Ql,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};ha.useEffectEvent=Ye;var Kg={readContext:mt,use:Ql,useCallback:function(t,s){return Mt().memoizedState=[t,s===void 0?null:s],t},useContext:mt,useEffect:Ng,useImperativeHandle:function(t,s,a){a=a!=null?a.concat([t]):null,Jl(4194308,4,jg.bind(null,s,t),a)},useLayoutEffect:function(t,s){return Jl(4194308,4,t,s)},useInsertionEffect:function(t,s){Jl(4,2,t,s)},useMemo:function(t,s){var a=Mt();s=s===void 0?null:s;var c=t();if(is){An(!0);try{t()}finally{An(!1)}}return a.memoizedState=[c,s],c},useReducer:function(t,s,a){var c=Mt();if(a!==void 0){var h=a(s);if(is){An(!0);try{a(s)}finally{An(!1)}}}else h=s;return c.memoizedState=c.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},c.queue=t,t=t.dispatch=tw.bind(null,de,t),[c.memoizedState,t]},useRef:function(t){var s=Mt();return t={current:t},s.memoizedState=t},useState:function(t){t=Xu(t);var s=t.queue,a=Ig.bind(null,de,s);return s.dispatch=a,[t.memoizedState,a]},useDebugValue:Qu,useDeferredValue:function(t,s){var a=Mt();return Pu(a,t,s)},useTransition:function(){var t=Xu(!1);return t=Ug.bind(null,de,t.queue,!0,!1),Mt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,s,a){var c=de,h=Mt();if(we){if(a===void 0)throw Error(r(407));a=a()}else{if(a=s(),De===null)throw Error(r(349));(ve&127)!==0||hg(c,s,a)}h.memoizedState=a;var p={value:a,getSnapshot:s};return h.queue=p,Ng(pg.bind(null,c,p,t),[t]),c.flags|=2048,Ys(9,{destroy:void 0},dg.bind(null,c,p,a,s),null),a},useId:function(){var t=Mt(),s=De.identifierPrefix;if(we){var a=Nn,c=Cn;a=(c&~(1<<32-kt(c)-1)).toString(32)+a,s="_"+s+"R_"+a,a=Yl++,0<a&&(s+="H"+a.toString(32)),s+="_"}else a=F1++,s="_"+s+"r_"+a.toString(32)+"_";return t.memoizedState=s},useHostTransitionStatus:Zu,useFormState:_g,useActionState:_g,useOptimistic:function(t){var s=Mt();s.memoizedState=s.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=a,s=Wu.bind(null,de,!0,a),a.dispatch=s,[t,s]},useMemoCache:Vu,useCacheRefresh:function(){return Mt().memoizedState=ew.bind(null,de)},useEffectEvent:function(t){var s=Mt(),a={impl:t};return s.memoizedState=a,function(){if((Ce&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},ef={readContext:mt,use:Ql,useCallback:Rg,useContext:mt,useEffect:Fu,useImperativeHandle:Lg,useInsertionEffect:Mg,useLayoutEffect:Og,useMemo:Dg,useReducer:Pl,useRef:Cg,useState:function(){return Pl(In)},useDebugValue:Qu,useDeferredValue:function(t,s){var a=Pe();return zg(a,je.memoizedState,t,s)},useTransition:function(){var t=Pl(In)[0],s=Pe().memoizedState;return[typeof t=="boolean"?t:ua(t),s]},useSyncExternalStore:fg,useId:qg,useHostTransitionStatus:Zu,useFormState:Eg,useActionState:Eg,useOptimistic:function(t,s){var a=Pe();return yg(a,je,t,s)},useMemoCache:Vu,useCacheRefresh:$g};ef.useEffectEvent=kg;var Xg={readContext:mt,use:Ql,useCallback:Rg,useContext:mt,useEffect:Fu,useImperativeHandle:Lg,useInsertionEffect:Mg,useLayoutEffect:Og,useMemo:Dg,useReducer:Ku,useRef:Cg,useState:function(){return Ku(In)},useDebugValue:Qu,useDeferredValue:function(t,s){var a=Pe();return je===null?Pu(a,t,s):zg(a,je.memoizedState,t,s)},useTransition:function(){var t=Ku(In)[0],s=Pe().memoizedState;return[typeof t=="boolean"?t:ua(t),s]},useSyncExternalStore:fg,useId:qg,useHostTransitionStatus:Zu,useFormState:Ag,useActionState:Ag,useOptimistic:function(t,s){var a=Pe();return je!==null?yg(a,je,t,s):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Vu,useCacheRefresh:$g};Xg.useEffectEvent=kg;function tf(t,s,a,c){s=t.memoizedState,a=a(c,s),a=a==null?s:m({},s,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var nf={enqueueSetState:function(t,s,a){t=t._reactInternals;var c=Zt(),h=mi(c);h.payload=s,a!=null&&(h.callback=a),s=yi(t,h,c),s!==null&&(Ht(s,t,c),aa(s,t,c))},enqueueReplaceState:function(t,s,a){t=t._reactInternals;var c=Zt(),h=mi(c);h.tag=1,h.payload=s,a!=null&&(h.callback=a),s=yi(t,h,c),s!==null&&(Ht(s,t,c),aa(s,t,c))},enqueueForceUpdate:function(t,s){t=t._reactInternals;var a=Zt(),c=mi(a);c.tag=2,s!=null&&(c.callback=s),s=yi(t,c,a),s!==null&&(Ht(s,t,a),aa(s,t,a))}};function Yg(t,s,a,c,h,p,y){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,p,y):s.prototype&&s.prototype.isPureReactComponent?!Zr(a,c)||!Zr(h,p):!0}function Fg(t,s,a,c){t=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,c),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,c),s.state!==t&&nf.enqueueReplaceState(s,s.state,null)}function ss(t,s){var a=s;if("ref"in s){a={};for(var c in s)c!=="ref"&&(a[c]=s[c])}if(t=t.defaultProps){a===s&&(a=m({},a));for(var h in t)a[h]===void 0&&(a[h]=t[h])}return a}function Qg(t){Ol(t)}function Pg(t){console.error(t)}function Jg(t){Ol(t)}function eo(t,s){try{var a=t.onUncaughtError;a(s.value,{componentStack:s.stack})}catch(c){setTimeout(function(){throw c})}}function Zg(t,s,a){try{var c=t.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function sf(t,s,a){return a=mi(a),a.tag=3,a.payload={element:null},a.callback=function(){eo(t,s)},a}function Wg(t){return t=mi(t),t.tag=3,t}function em(t,s,a,c){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var p=c.value;t.payload=function(){return h(p)},t.callback=function(){Zg(s,a,c)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(t.callback=function(){Zg(s,a,c),typeof h!="function"&&(_i===null?_i=new Set([this]):_i.add(this));var T=c.stack;this.componentDidCatch(c.value,{componentStack:T!==null?T:""})})}function nw(t,s,a,c,h){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(s=a.alternate,s!==null&&Bs(s,a,h,!0),a=Ft.current,a!==null){switch(a.tag){case 31:case 13:return fn===null?ho():a.alternate===null&&Fe===0&&(Fe=3),a.flags&=-257,a.flags|=65536,a.lanes=h,c===$l?a.flags|=16384:(s=a.updateQueue,s===null?a.updateQueue=new Set([c]):s.add(c),kf(t,c,h)),!1;case 22:return a.flags|=65536,c===$l?a.flags|=16384:(s=a.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=s):(a=s.retryQueue,a===null?s.retryQueue=new Set([c]):a.add(c)),kf(t,c,h)),!1}throw Error(r(435,a.tag))}return kf(t,c,h),ho(),!1}if(we)return s=Ft.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=h,c!==xu&&(t=Error(r(422),{cause:c}),ta(ln(t,a)))):(c!==xu&&(s=Error(r(423),{cause:c}),ta(ln(s,a))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,c=ln(c,a),h=sf(t.stateNode,c,h),Lu(t,h),Fe!==4&&(Fe=2)),!1;var p=Error(r(520),{cause:c});if(p=ln(p,a),Sa===null?Sa=[p]:Sa.push(p),Fe!==4&&(Fe=2),s===null)return!0;c=ln(c,a),a=s;do{switch(a.tag){case 3:return a.flags|=65536,t=h&-h,a.lanes|=t,t=sf(a.stateNode,c,t),Lu(a,t),!1;case 1:if(s=a.type,p=a.stateNode,(a.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(_i===null||!_i.has(p))))return a.flags|=65536,h&=-h,a.lanes|=h,h=Wg(h),em(h,t,a,c),Lu(a,h),!1}a=a.return}while(a!==null);return!1}var rf=Error(r(461)),it=!1;function yt(t,s,a,c){s.child=t===null?sg(s,null,a,c):ns(s,t.child,a,c)}function tm(t,s,a,c,h){a=a.render;var p=s.ref;if("ref"in c){var y={};for(var T in c)T!=="ref"&&(y[T]=c[T])}else y=c;return Zi(s),c=Bu(t,s,a,y,p,h),T=qu(),t!==null&&!it?($u(t,s,h),Vn(t,s,h)):(we&&T&&Su(s),s.flags|=1,yt(t,s,c,h),s.child)}function nm(t,s,a,c,h){if(t===null){var p=a.type;return typeof p=="function"&&!yu(p)&&p.defaultProps===void 0&&a.compare===null?(s.tag=15,s.type=p,im(t,s,p,c,h)):(t=Dl(a.type,null,c,s,s.mode,h),t.ref=s.ref,t.return=s,s.child=t)}if(p=t.child,!df(t,h)){var y=p.memoizedProps;if(a=a.compare,a=a!==null?a:Zr,a(y,c)&&t.ref===s.ref)return Vn(t,s,h)}return s.flags|=1,t=Un(p,c),t.ref=s.ref,t.return=s,s.child=t}function im(t,s,a,c,h){if(t!==null){var p=t.memoizedProps;if(Zr(p,c)&&t.ref===s.ref)if(it=!1,s.pendingProps=c=p,df(t,h))(t.flags&131072)!==0&&(it=!0);else return s.lanes=t.lanes,Vn(t,s,h)}return af(t,s,a,c,h)}function sm(t,s,a,c){var h=c.children,p=t!==null?t.memoizedState:null;if(t===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((s.flags&128)!==0){if(p=p!==null?p.baseLanes|a:a,t!==null){for(c=s.child=t.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;c=h&~p}else c=0,s.child=null;return rm(t,s,p,a,c)}if((a&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},t!==null&&Bl(s,p!==null?p.cachePool:null),p!==null?lg(s,p):Du(),og(s);else return c=s.lanes=536870912,rm(t,s,p!==null?p.baseLanes|a:a,a,c)}else p!==null?(Bl(s,p.cachePool),lg(s,p),vi(),s.memoizedState=null):(t!==null&&Bl(s,null),Du(),vi());return yt(t,s,h,a),s.child}function da(t,s){return t!==null&&t.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function rm(t,s,a,c,h){var p=ku();return p=p===null?null:{parent:tt._currentValue,pool:p},s.memoizedState={baseLanes:a,cachePool:p},t!==null&&Bl(s,null),Du(),og(s),t!==null&&Bs(t,s,c,!0),s.childLanes=h,null}function to(t,s){return s=io({mode:s.mode,children:s.children},t.mode),s.ref=t.ref,t.child=s,s.return=t,s}function am(t,s,a){return ns(s,t.child,null,a),t=to(s,s.pendingProps),t.flags|=2,Qt(s),s.memoizedState=null,t}function iw(t,s,a){var c=s.pendingProps,h=(s.flags&128)!==0;if(s.flags&=-129,t===null){if(we){if(c.mode==="hidden")return t=to(s,c),s.lanes=536870912,da(null,t);if(Uu(s),(t=He)?(t=by(t,un),t=t!==null&&t.data==="&"?t:null,t!==null&&(s.memoizedState={dehydrated:t,treeContext:fi!==null?{id:Cn,overflow:Nn}:null,retryLane:536870912,hydrationErrors:null},a=Vp(t),a.return=s,s.child=a,gt=s,He=null)):t=null,t===null)throw di(s);return s.lanes=536870912,null}return to(s,c)}var p=t.memoizedState;if(p!==null){var y=p.dehydrated;if(Uu(s),h)if(s.flags&256)s.flags&=-257,s=am(t,s,a);else if(s.memoizedState!==null)s.child=t.child,s.flags|=128,s=null;else throw Error(r(558));else if(it||Bs(t,s,a,!1),h=(a&t.childLanes)!==0,it||h){if(c=De,c!==null&&(y=Pd(c,a),y!==0&&y!==p.retryLane))throw p.retryLane=y,Fi(t,y),Ht(c,t,y),rf;ho(),s=am(t,s,a)}else t=p.treeContext,He=hn(y.nextSibling),gt=s,we=!0,hi=null,un=!1,t!==null&&Xp(s,t),s=to(s,c),s.flags|=4096;return s}return t=Un(t.child,{mode:c.mode,children:c.children}),t.ref=s.ref,s.child=t,t.return=s,t}function no(t,s){var a=s.ref;if(a===null)t!==null&&t.ref!==null&&(s.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(t===null||t.ref!==a)&&(s.flags|=4194816)}}function af(t,s,a,c,h){return Zi(s),a=Bu(t,s,a,c,void 0,h),c=qu(),t!==null&&!it?($u(t,s,h),Vn(t,s,h)):(we&&c&&Su(s),s.flags|=1,yt(t,s,a,h),s.child)}function lm(t,s,a,c,h,p){return Zi(s),s.updateQueue=null,a=ug(s,c,a,h),cg(t),c=qu(),t!==null&&!it?($u(t,s,p),Vn(t,s,p)):(we&&c&&Su(s),s.flags|=1,yt(t,s,a,p),s.child)}function om(t,s,a,c,h){if(Zi(s),s.stateNode===null){var p=Ds,y=a.contextType;typeof y=="object"&&y!==null&&(p=mt(y)),p=new a(c,p),s.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=nf,s.stateNode=p,p._reactInternals=s,p=s.stateNode,p.props=c,p.state=s.memoizedState,p.refs={},Ou(s),y=a.contextType,p.context=typeof y=="object"&&y!==null?mt(y):Ds,p.state=s.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(tf(s,a,y,c),p.state=s.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(y=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),y!==p.state&&nf.enqueueReplaceState(p,p.state,null),oa(s,c,p,h),la(),p.state=s.memoizedState),typeof p.componentDidMount=="function"&&(s.flags|=4194308),c=!0}else if(t===null){p=s.stateNode;var T=s.memoizedProps,C=ss(a,T);p.props=C;var z=p.context,K=a.contextType;y=Ds,typeof K=="object"&&K!==null&&(y=mt(K));var Q=a.getDerivedStateFromProps;K=typeof Q=="function"||typeof p.getSnapshotBeforeUpdate=="function",T=s.pendingProps!==T,K||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(T||z!==y)&&Fg(s,p,c,y),gi=!1;var H=s.memoizedState;p.state=H,oa(s,c,p,h),la(),z=s.memoizedState,T||H!==z||gi?(typeof Q=="function"&&(tf(s,a,Q,c),z=s.memoizedState),(C=gi||Yg(s,a,C,c,H,z,y))?(K||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(s.flags|=4194308)):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=c,s.memoizedState=z),p.props=c,p.state=z,p.context=y,c=C):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),c=!1)}else{p=s.stateNode,ju(t,s),y=s.memoizedProps,K=ss(a,y),p.props=K,Q=s.pendingProps,H=p.context,z=a.contextType,C=Ds,typeof z=="object"&&z!==null&&(C=mt(z)),T=a.getDerivedStateFromProps,(z=typeof T=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(y!==Q||H!==C)&&Fg(s,p,c,C),gi=!1,H=s.memoizedState,p.state=H,oa(s,c,p,h),la();var q=s.memoizedState;y!==Q||H!==q||gi||t!==null&&t.dependencies!==null&&Ul(t.dependencies)?(typeof T=="function"&&(tf(s,a,T,c),q=s.memoizedState),(K=gi||Yg(s,a,K,c,H,q,C)||t!==null&&t.dependencies!==null&&Ul(t.dependencies))?(z||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(c,q,C),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(c,q,C)),typeof p.componentDidUpdate=="function"&&(s.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof p.componentDidUpdate!="function"||y===t.memoizedProps&&H===t.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&H===t.memoizedState||(s.flags|=1024),s.memoizedProps=c,s.memoizedState=q),p.props=c,p.state=q,p.context=C,c=K):(typeof p.componentDidUpdate!="function"||y===t.memoizedProps&&H===t.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&H===t.memoizedState||(s.flags|=1024),c=!1)}return p=c,no(t,s),c=(s.flags&128)!==0,p||c?(p=s.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:p.render(),s.flags|=1,t!==null&&c?(s.child=ns(s,t.child,null,h),s.child=ns(s,null,a,h)):yt(t,s,a,h),s.memoizedState=p.state,t=s.child):t=Vn(t,s,h),t}function cm(t,s,a,c){return Pi(),s.flags|=256,yt(t,s,a,c),s.child}var lf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function of(t){return{baseLanes:t,cachePool:Zp()}}function cf(t,s,a){return t=t!==null?t.childLanes&~a:0,s&&(t|=Jt),t}function um(t,s,a){var c=s.pendingProps,h=!1,p=(s.flags&128)!==0,y;if((y=p)||(y=t!==null&&t.memoizedState===null?!1:(Qe.current&2)!==0),y&&(h=!0,s.flags&=-129),y=(s.flags&32)!==0,s.flags&=-33,t===null){if(we){if(h?bi(s):vi(),(t=He)?(t=by(t,un),t=t!==null&&t.data!=="&"?t:null,t!==null&&(s.memoizedState={dehydrated:t,treeContext:fi!==null?{id:Cn,overflow:Nn}:null,retryLane:536870912,hydrationErrors:null},a=Vp(t),a.return=s,s.child=a,gt=s,He=null)):t=null,t===null)throw di(s);return Kf(t)?s.lanes=32:s.lanes=536870912,null}var T=c.children;return c=c.fallback,h?(vi(),h=s.mode,T=io({mode:"hidden",children:T},h),c=Qi(c,h,a,null),T.return=s,c.return=s,T.sibling=c,s.child=T,c=s.child,c.memoizedState=of(a),c.childLanes=cf(t,y,a),s.memoizedState=lf,da(null,c)):(bi(s),uf(s,T))}var C=t.memoizedState;if(C!==null&&(T=C.dehydrated,T!==null)){if(p)s.flags&256?(bi(s),s.flags&=-257,s=ff(t,s,a)):s.memoizedState!==null?(vi(),s.child=t.child,s.flags|=128,s=null):(vi(),T=c.fallback,h=s.mode,c=io({mode:"visible",children:c.children},h),T=Qi(T,h,a,null),T.flags|=2,c.return=s,T.return=s,c.sibling=T,s.child=c,ns(s,t.child,null,a),c=s.child,c.memoizedState=of(a),c.childLanes=cf(t,y,a),s.memoizedState=lf,s=da(null,c));else if(bi(s),Kf(T)){if(y=T.nextSibling&&T.nextSibling.dataset,y)var z=y.dgst;y=z,c=Error(r(419)),c.stack="",c.digest=y,ta({value:c,source:null,stack:null}),s=ff(t,s,a)}else if(it||Bs(t,s,a,!1),y=(a&t.childLanes)!==0,it||y){if(y=De,y!==null&&(c=Pd(y,a),c!==0&&c!==C.retryLane))throw C.retryLane=c,Fi(t,c),Ht(y,t,c),rf;Gf(T)||ho(),s=ff(t,s,a)}else Gf(T)?(s.flags|=192,s.child=t.child,s=null):(t=C.treeContext,He=hn(T.nextSibling),gt=s,we=!0,hi=null,un=!1,t!==null&&Xp(s,t),s=uf(s,c.children),s.flags|=4096);return s}return h?(vi(),T=c.fallback,h=s.mode,C=t.child,z=C.sibling,c=Un(C,{mode:"hidden",children:c.children}),c.subtreeFlags=C.subtreeFlags&65011712,z!==null?T=Un(z,T):(T=Qi(T,h,a,null),T.flags|=2),T.return=s,c.return=s,c.sibling=T,s.child=c,da(null,c),c=s.child,T=t.child.memoizedState,T===null?T=of(a):(h=T.cachePool,h!==null?(C=tt._currentValue,h=h.parent!==C?{parent:C,pool:C}:h):h=Zp(),T={baseLanes:T.baseLanes|a,cachePool:h}),c.memoizedState=T,c.childLanes=cf(t,y,a),s.memoizedState=lf,da(t.child,c)):(bi(s),a=t.child,t=a.sibling,a=Un(a,{mode:"visible",children:c.children}),a.return=s,a.sibling=null,t!==null&&(y=s.deletions,y===null?(s.deletions=[t],s.flags|=16):y.push(t)),s.child=a,s.memoizedState=null,a)}function uf(t,s){return s=io({mode:"visible",children:s},t.mode),s.return=t,t.child=s}function io(t,s){return t=Yt(22,t,null,s),t.lanes=0,t}function ff(t,s,a){return ns(s,t.child,null,a),t=uf(s,s.pendingProps.children),t.flags|=2,s.memoizedState=null,t}function fm(t,s,a){t.lanes|=s;var c=t.alternate;c!==null&&(c.lanes|=s),Tu(t.return,s,a)}function hf(t,s,a,c,h,p){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:h,treeForkCount:p}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=c,y.tail=a,y.tailMode=h,y.treeForkCount=p)}function hm(t,s,a){var c=s.pendingProps,h=c.revealOrder,p=c.tail;c=c.children;var y=Qe.current,T=(y&2)!==0;if(T?(y=y&1|2,s.flags|=128):y&=1,Z(Qe,y),yt(t,s,c,a),c=we?ea:0,!T&&t!==null&&(t.flags&128)!==0)e:for(t=s.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&fm(t,a,s);else if(t.tag===19)fm(t,a,s);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===s)break e;for(;t.sibling===null;){if(t.return===null||t.return===s)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(h){case"forwards":for(a=s.child,h=null;a!==null;)t=a.alternate,t!==null&&Kl(t)===null&&(h=a),a=a.sibling;a=h,a===null?(h=s.child,s.child=null):(h=a.sibling,a.sibling=null),hf(s,!1,h,a,p,c);break;case"backwards":case"unstable_legacy-backwards":for(a=null,h=s.child,s.child=null;h!==null;){if(t=h.alternate,t!==null&&Kl(t)===null){s.child=h;break}t=h.sibling,h.sibling=a,a=h,h=t}hf(s,!0,a,null,p,c);break;case"together":hf(s,!1,null,null,void 0,c);break;default:s.memoizedState=null}return s.child}function Vn(t,s,a){if(t!==null&&(s.dependencies=t.dependencies),xi|=s.lanes,(a&s.childLanes)===0)if(t!==null){if(Bs(t,s,a,!1),(a&s.childLanes)===0)return null}else return null;if(t!==null&&s.child!==t.child)throw Error(r(153));if(s.child!==null){for(t=s.child,a=Un(t,t.pendingProps),s.child=a,a.return=s;t.sibling!==null;)t=t.sibling,a=a.sibling=Un(t,t.pendingProps),a.return=s;a.sibling=null}return s.child}function df(t,s){return(t.lanes&s)!==0?!0:(t=t.dependencies,!!(t!==null&&Ul(t)))}function sw(t,s,a){switch(s.tag){case 3:lt(s,s.stateNode.containerInfo),pi(s,tt,t.memoizedState.cache),Pi();break;case 27:case 5:At(s);break;case 4:lt(s,s.stateNode.containerInfo);break;case 10:pi(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Uu(s),null;break;case 13:var c=s.memoizedState;if(c!==null)return c.dehydrated!==null?(bi(s),s.flags|=128,null):(a&s.child.childLanes)!==0?um(t,s,a):(bi(s),t=Vn(t,s,a),t!==null?t.sibling:null);bi(s);break;case 19:var h=(t.flags&128)!==0;if(c=(a&s.childLanes)!==0,c||(Bs(t,s,a,!1),c=(a&s.childLanes)!==0),h){if(c)return hm(t,s,a);s.flags|=128}if(h=s.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Z(Qe,Qe.current),c)break;return null;case 22:return s.lanes=0,sm(t,s,a,s.pendingProps);case 24:pi(s,tt,t.memoizedState.cache)}return Vn(t,s,a)}function dm(t,s,a){if(t!==null)if(t.memoizedProps!==s.pendingProps)it=!0;else{if(!df(t,a)&&(s.flags&128)===0)return it=!1,sw(t,s,a);it=(t.flags&131072)!==0}else it=!1,we&&(s.flags&1048576)!==0&&Kp(s,ea,s.index);switch(s.lanes=0,s.tag){case 16:e:{var c=s.pendingProps;if(t=es(s.elementType),s.type=t,typeof t=="function")yu(t)?(c=ss(t,c),s.tag=1,s=om(null,s,t,c,a)):(s.tag=0,s=af(null,s,t,c,a));else{if(t!=null){var h=t.$$typeof;if(h===G){s.tag=11,s=tm(null,s,t,c,a);break e}else if(h===L){s.tag=14,s=nm(null,s,t,c,a);break e}}throw s=ge(t)||t,Error(r(306,s,""))}}return s;case 0:return af(t,s,s.type,s.pendingProps,a);case 1:return c=s.type,h=ss(c,s.pendingProps),om(t,s,c,h,a);case 3:e:{if(lt(s,s.stateNode.containerInfo),t===null)throw Error(r(387));c=s.pendingProps;var p=s.memoizedState;h=p.element,ju(t,s),oa(s,c,null,a);var y=s.memoizedState;if(c=y.cache,pi(s,tt,c),c!==p.cache&&Au(s,[tt],a,!0),la(),c=y.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:y.cache},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){s=cm(t,s,c,a);break e}else if(c!==h){h=ln(Error(r(424)),s),ta(h),s=cm(t,s,c,a);break e}else{switch(t=s.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(He=hn(t.firstChild),gt=s,we=!0,hi=null,un=!0,a=sg(s,null,c,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Pi(),c===h){s=Vn(t,s,a);break e}yt(t,s,c,a)}s=s.child}return s;case 26:return no(t,s),t===null?(a=Ey(s.type,null,s.pendingProps,null))?s.memoizedState=a:we||(a=s.type,t=s.pendingProps,c=So(he.current).createElement(a),c[pt]=s,c[jt]=t,bt(c,a,t),ht(c),s.stateNode=c):s.memoizedState=Ey(s.type,t.memoizedProps,s.pendingProps,t.memoizedState),null;case 27:return At(s),t===null&&we&&(c=s.stateNode=wy(s.type,s.pendingProps,he.current),gt=s,un=!0,h=He,Ci(s.type)?(Xf=h,He=hn(c.firstChild)):He=h),yt(t,s,s.pendingProps.children,a),no(t,s),t===null&&(s.flags|=4194304),s.child;case 5:return t===null&&we&&((h=c=He)&&(c=Rw(c,s.type,s.pendingProps,un),c!==null?(s.stateNode=c,gt=s,He=hn(c.firstChild),un=!1,h=!0):h=!1),h||di(s)),At(s),h=s.type,p=s.pendingProps,y=t!==null?t.memoizedProps:null,c=p.children,$f(h,p)?c=null:y!==null&&$f(h,y)&&(s.flags|=32),s.memoizedState!==null&&(h=Bu(t,s,Q1,null,null,a),Na._currentValue=h),no(t,s),yt(t,s,c,a),s.child;case 6:return t===null&&we&&((t=a=He)&&(a=Dw(a,s.pendingProps,un),a!==null?(s.stateNode=a,gt=s,He=null,t=!0):t=!1),t||di(s)),null;case 13:return um(t,s,a);case 4:return lt(s,s.stateNode.containerInfo),c=s.pendingProps,t===null?s.child=ns(s,null,c,a):yt(t,s,c,a),s.child;case 11:return tm(t,s,s.type,s.pendingProps,a);case 7:return yt(t,s,s.pendingProps,a),s.child;case 8:return yt(t,s,s.pendingProps.children,a),s.child;case 12:return yt(t,s,s.pendingProps.children,a),s.child;case 10:return c=s.pendingProps,pi(s,s.type,c.value),yt(t,s,c.children,a),s.child;case 9:return h=s.type._context,c=s.pendingProps.children,Zi(s),h=mt(h),c=c(h),s.flags|=1,yt(t,s,c,a),s.child;case 14:return nm(t,s,s.type,s.pendingProps,a);case 15:return im(t,s,s.type,s.pendingProps,a);case 19:return hm(t,s,a);case 31:return iw(t,s,a);case 22:return sm(t,s,a,s.pendingProps);case 24:return Zi(s),c=mt(tt),t===null?(h=ku(),h===null&&(h=De,p=Cu(),h.pooledCache=p,p.refCount++,p!==null&&(h.pooledCacheLanes|=a),h=p),s.memoizedState={parent:c,cache:h},Ou(s),pi(s,tt,h)):((t.lanes&a)!==0&&(ju(t,s),oa(s,null,null,a),la()),h=t.memoizedState,p=s.memoizedState,h.parent!==c?(h={parent:c,cache:c},s.memoizedState=h,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=h),pi(s,tt,c)):(c=p.cache,pi(s,tt,c),c!==h.cache&&Au(s,[tt],a,!0))),yt(t,s,s.pendingProps.children,a),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Gn(t){t.flags|=4}function pf(t,s,a,c,h){if((s=(t.mode&32)!==0)&&(s=!1),s){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(qm())t.flags|=8192;else throw ts=$l,Mu}else t.flags&=-16777217}function pm(t,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!ky(s))if(qm())t.flags|=8192;else throw ts=$l,Mu}function so(t,s){s!==null&&(t.flags|=4),t.flags&16384&&(s=t.tag!==22?Yd():536870912,t.lanes|=s,Js|=s)}function pa(t,s){if(!we)switch(t.tailMode){case"hidden":s=t.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.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?s||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Be(t){var s=t.alternate!==null&&t.alternate.child===t.child,a=0,c=0;if(s)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,s}function rw(t,s,a){var c=s.pendingProps;switch(wu(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(s),null;case 1:return Be(s),null;case 3:return a=s.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),qn(tt),ke(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Hs(s)?Gn(s):t===null||t.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,_u())),Be(s),null;case 26:var h=s.type,p=s.memoizedState;return t===null?(Gn(s),p!==null?(Be(s),pm(s,p)):(Be(s),pf(s,h,null,c,a))):p?p!==t.memoizedState?(Gn(s),Be(s),pm(s,p)):(Be(s),s.flags&=-16777217):(t=t.memoizedProps,t!==c&&Gn(s),Be(s),pf(s,h,t,c,a)),null;case 27:if(fe(s),a=he.current,h=s.type,t!==null&&s.stateNode!=null)t.memoizedProps!==c&&Gn(s);else{if(!c){if(s.stateNode===null)throw Error(r(166));return Be(s),null}t=P.current,Hs(s)?Yp(s):(t=wy(h,c,a),s.stateNode=t,Gn(s))}return Be(s),null;case 5:if(fe(s),h=s.type,t!==null&&s.stateNode!=null)t.memoizedProps!==c&&Gn(s);else{if(!c){if(s.stateNode===null)throw Error(r(166));return Be(s),null}if(p=P.current,Hs(s))Yp(s);else{var y=So(he.current);switch(p){case 1:p=y.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:p=y.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":p=y.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":p=y.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":p=y.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof c.is=="string"?y.createElement("select",{is:c.is}):y.createElement("select"),c.multiple?p.multiple=!0:c.size&&(p.size=c.size);break;default:p=typeof c.is=="string"?y.createElement(h,{is:c.is}):y.createElement(h)}}p[pt]=s,p[jt]=c;e:for(y=s.child;y!==null;){if(y.tag===5||y.tag===6)p.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===s)break e;for(;y.sibling===null;){if(y.return===null||y.return===s)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}s.stateNode=p;e:switch(bt(p,h,c),h){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Gn(s)}}return Be(s),pf(s,s.type,t===null?null:t.memoizedProps,s.pendingProps,a),null;case 6:if(t&&s.stateNode!=null)t.memoizedProps!==c&&Gn(s);else{if(typeof c!="string"&&s.stateNode===null)throw Error(r(166));if(t=he.current,Hs(s)){if(t=s.stateNode,a=s.memoizedProps,c=null,h=gt,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}t[pt]=s,t=!!(t.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||uy(t.nodeValue,a)),t||di(s,!0)}else t=So(t).createTextNode(c),t[pt]=s,s.stateNode=t}return Be(s),null;case 31:if(a=s.memoizedState,t===null||t.memoizedState!==null){if(c=Hs(s),a!==null){if(t===null){if(!c)throw Error(r(318));if(t=s.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[pt]=s}else Pi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Be(s),t=!1}else a=_u(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return s.flags&256?(Qt(s),s):(Qt(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Be(s),null;case 13:if(c=s.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Hs(s),c!==null&&c.dehydrated!==null){if(t===null){if(!h)throw Error(r(318));if(h=s.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(r(317));h[pt]=s}else Pi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Be(s),h=!1}else h=_u(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return s.flags&256?(Qt(s),s):(Qt(s),null)}return Qt(s),(s.flags&128)!==0?(s.lanes=a,s):(a=c!==null,t=t!==null&&t.memoizedState!==null,a&&(c=s.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool),p=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(p=c.memoizedState.cachePool.pool),p!==h&&(c.flags|=2048)),a!==t&&a&&(s.child.flags|=8192),so(s,s.updateQueue),Be(s),null);case 4:return ke(),t===null&&zf(s.stateNode.containerInfo),Be(s),null;case 10:return qn(s.type),Be(s),null;case 19:if(Y(Qe),c=s.memoizedState,c===null)return Be(s),null;if(h=(s.flags&128)!==0,p=c.rendering,p===null)if(h)pa(c,!1);else{if(Fe!==0||t!==null&&(t.flags&128)!==0)for(t=s.child;t!==null;){if(p=Kl(t),p!==null){for(s.flags|=128,pa(c,!1),t=p.updateQueue,s.updateQueue=t,so(s,t),s.subtreeFlags=0,t=a,a=s.child;a!==null;)Ip(a,t),a=a.sibling;return Z(Qe,Qe.current&1|2),we&&Hn(s,c.treeForkCount),s.child}t=t.sibling}c.tail!==null&&Ct()>co&&(s.flags|=128,h=!0,pa(c,!1),s.lanes=4194304)}else{if(!h)if(t=Kl(p),t!==null){if(s.flags|=128,h=!0,t=t.updateQueue,s.updateQueue=t,so(s,t),pa(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!we)return Be(s),null}else 2*Ct()-c.renderingStartTime>co&&a!==536870912&&(s.flags|=128,h=!0,pa(c,!1),s.lanes=4194304);c.isBackwards?(p.sibling=s.child,s.child=p):(t=c.last,t!==null?t.sibling=p:s.child=p,c.last=p)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Ct(),t.sibling=null,a=Qe.current,Z(Qe,h?a&1|2:a&1),we&&Hn(s,c.treeForkCount),t):(Be(s),null);case 22:case 23:return Qt(s),zu(),c=s.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(s.flags|=8192):c&&(s.flags|=8192),c?(a&536870912)!==0&&(s.flags&128)===0&&(Be(s),s.subtreeFlags&6&&(s.flags|=8192)):Be(s),a=s.updateQueue,a!==null&&so(s,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==a&&(s.flags|=2048),t!==null&&Y(Wi),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),s.memoizedState.cache!==a&&(s.flags|=2048),qn(tt),Be(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function aw(t,s){switch(wu(s),s.tag){case 1:return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 3:return qn(tt),ke(),t=s.flags,(t&65536)!==0&&(t&128)===0?(s.flags=t&-65537|128,s):null;case 26:case 27:case 5:return fe(s),null;case 31:if(s.memoizedState!==null){if(Qt(s),s.alternate===null)throw Error(r(340));Pi()}return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 13:if(Qt(s),t=s.memoizedState,t!==null&&t.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Pi()}return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 19:return Y(Qe),null;case 4:return ke(),null;case 10:return qn(s.type),null;case 22:case 23:return Qt(s),zu(),t!==null&&Y(Wi),t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 24:return qn(tt),null;case 25:return null;default:return null}}function gm(t,s){switch(wu(s),s.tag){case 3:qn(tt),ke();break;case 26:case 27:case 5:fe(s);break;case 4:ke();break;case 31:s.memoizedState!==null&&Qt(s);break;case 13:Qt(s);break;case 19:Y(Qe);break;case 10:qn(s.type);break;case 22:case 23:Qt(s),zu(),t!==null&&Y(Wi);break;case 24:qn(tt)}}function ga(t,s){try{var a=s.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 p=a.create,y=a.inst;c=p(),y.destroy=c}a=a.next}while(a!==h)}}catch(T){Oe(s,s.return,T)}}function Si(t,s,a){try{var c=s.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var p=h.next;c=p;do{if((c.tag&t)===t){var y=c.inst,T=y.destroy;if(T!==void 0){y.destroy=void 0,h=s;var C=a,z=T;try{z()}catch(K){Oe(h,C,K)}}}c=c.next}while(c!==p)}}catch(K){Oe(s,s.return,K)}}function mm(t){var s=t.updateQueue;if(s!==null){var a=t.stateNode;try{ag(s,a)}catch(c){Oe(t,t.return,c)}}}function ym(t,s,a){a.props=ss(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(c){Oe(t,s,c)}}function ma(t,s){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){Oe(t,s,h)}}function kn(t,s){var a=t.ref,c=t.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(h){Oe(t,s,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){Oe(t,s,h)}else a.current=null}function bm(t){var s=t.type,a=t.memoizedProps,c=t.stateNode;try{e:switch(s){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){Oe(t,t.return,h)}}function gf(t,s,a){try{var c=t.stateNode;Nw(c,t.type,a,s),c[jt]=s}catch(h){Oe(t,t.return,h)}}function vm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ci(t.type)||t.tag===4}function mf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||vm(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&&Ci(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 yf(t,s,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,s?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,s):(s=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,s.appendChild(t),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=Dn));else if(c!==4&&(c===27&&Ci(t.type)&&(a=t.stateNode,s=null),t=t.child,t!==null))for(yf(t,s,a),t=t.sibling;t!==null;)yf(t,s,a),t=t.sibling}function ro(t,s,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,s?a.insertBefore(t,s):a.appendChild(t);else if(c!==4&&(c===27&&Ci(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(ro(t,s,a),t=t.sibling;t!==null;)ro(t,s,a),t=t.sibling}function Sm(t){var s=t.stateNode,a=t.memoizedProps;try{for(var c=t.type,h=s.attributes;h.length;)s.removeAttributeNode(h[0]);bt(s,c,a),s[pt]=t,s[jt]=a}catch(p){Oe(t,t.return,p)}}var Kn=!1,st=!1,bf=!1,wm=typeof WeakSet=="function"?WeakSet:Set,dt=null;function lw(t,s){if(t=t.containerInfo,Bf=Co,t=Lp(t),uu(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,p=c.focusNode;c=c.focusOffset;try{a.nodeType,p.nodeType}catch{a=null;break e}var y=0,T=-1,C=-1,z=0,K=0,Q=t,H=null;t:for(;;){for(var q;Q!==a||h!==0&&Q.nodeType!==3||(T=y+h),Q!==p||c!==0&&Q.nodeType!==3||(C=y+c),Q.nodeType===3&&(y+=Q.nodeValue.length),(q=Q.firstChild)!==null;)H=Q,Q=q;for(;;){if(Q===t)break t;if(H===a&&++z===h&&(T=y),H===p&&++K===c&&(C=y),(q=Q.nextSibling)!==null)break;Q=H,H=Q.parentNode}Q=q}a=T===-1||C===-1?null:{start:T,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(qf={focusedElem:t,selectionRange:a},Co=!1,dt=s;dt!==null;)if(s=dt,t=s.child,(s.subtreeFlags&1028)!==0&&t!==null)t.return=s,dt=t;else for(;dt!==null;){switch(s=dt,p=s.alternate,t=s.flags,s.tag){case 0:if((t&4)!==0&&(t=s.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)h=t[a],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&p!==null){t=void 0,a=s,h=p.memoizedProps,p=p.memoizedState,c=a.stateNode;try{var ee=ss(a.type,h);t=c.getSnapshotBeforeUpdate(ee,p),c.__reactInternalSnapshotBeforeUpdate=t}catch(le){Oe(a,a.return,le)}}break;case 3:if((t&1024)!==0){if(t=s.stateNode.containerInfo,a=t.nodeType,a===9)Vf(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Vf(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(r(163))}if(t=s.sibling,t!==null){t.return=s.return,dt=t;break}dt=s.return}}function xm(t,s,a){var c=a.flags;switch(a.tag){case 0:case 11:case 15:Yn(t,a),c&4&&ga(5,a);break;case 1:if(Yn(t,a),c&4)if(t=a.stateNode,s===null)try{t.componentDidMount()}catch(y){Oe(a,a.return,y)}else{var h=ss(a.type,s.memoizedProps);s=s.memoizedState;try{t.componentDidUpdate(h,s,t.__reactInternalSnapshotBeforeUpdate)}catch(y){Oe(a,a.return,y)}}c&64&&mm(a),c&512&&ma(a,a.return);break;case 3:if(Yn(t,a),c&64&&(t=a.updateQueue,t!==null)){if(s=null,a.child!==null)switch(a.child.tag){case 27:case 5:s=a.child.stateNode;break;case 1:s=a.child.stateNode}try{ag(t,s)}catch(y){Oe(a,a.return,y)}}break;case 27:s===null&&c&4&&Sm(a);case 26:case 5:Yn(t,a),s===null&&c&4&&bm(a),c&512&&ma(a,a.return);break;case 12:Yn(t,a);break;case 31:Yn(t,a),c&4&&Tm(t,a);break;case 13:Yn(t,a),c&4&&Am(t,a),c&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=mw.bind(null,a),zw(t,a))));break;case 22:if(c=a.memoizedState!==null||Kn,!c){s=s!==null&&s.memoizedState!==null||st,h=Kn;var p=st;Kn=c,(st=s)&&!p?Fn(t,a,(a.subtreeFlags&8772)!==0):Yn(t,a),Kn=h,st=p}break;case 30:break;default:Yn(t,a)}}function _m(t){var s=t.alternate;s!==null&&(t.alternate=null,_m(s)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(s=t.stateNode,s!==null&&Yc(s)),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 $e=null,Rt=!1;function Xn(t,s,a){for(a=a.child;a!==null;)Em(t,s,a),a=a.sibling}function Em(t,s,a){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(Tn,a)}catch{}switch(a.tag){case 26:st||kn(a,s),Xn(t,s,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:st||kn(a,s);var c=$e,h=Rt;Ci(a.type)&&($e=a.stateNode,Rt=!1),Xn(t,s,a),Ta(a.stateNode),$e=c,Rt=h;break;case 5:st||kn(a,s);case 6:if(c=$e,h=Rt,$e=null,Xn(t,s,a),$e=c,Rt=h,$e!==null)if(Rt)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(a.stateNode)}catch(p){Oe(a,s,p)}else try{$e.removeChild(a.stateNode)}catch(p){Oe(a,s,p)}break;case 18:$e!==null&&(Rt?(t=$e,my(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),rr(t)):my($e,a.stateNode));break;case 4:c=$e,h=Rt,$e=a.stateNode.containerInfo,Rt=!0,Xn(t,s,a),$e=c,Rt=h;break;case 0:case 11:case 14:case 15:Si(2,a,s),st||Si(4,a,s),Xn(t,s,a);break;case 1:st||(kn(a,s),c=a.stateNode,typeof c.componentWillUnmount=="function"&&ym(a,s,c)),Xn(t,s,a);break;case 21:Xn(t,s,a);break;case 22:st=(c=st)||a.memoizedState!==null,Xn(t,s,a),st=c;break;default:Xn(t,s,a)}}function Tm(t,s){if(s.memoizedState===null&&(t=s.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{rr(t)}catch(a){Oe(s,s.return,a)}}}function Am(t,s){if(s.memoizedState===null&&(t=s.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{rr(t)}catch(a){Oe(s,s.return,a)}}function ow(t){switch(t.tag){case 31:case 13:case 19:var s=t.stateNode;return s===null&&(s=t.stateNode=new wm),s;case 22:return t=t.stateNode,s=t._retryCache,s===null&&(s=t._retryCache=new wm),s;default:throw Error(r(435,t.tag))}}function ao(t,s){var a=ow(t);s.forEach(function(c){if(!a.has(c)){a.add(c);var h=yw.bind(null,t,c);c.then(h,h)}})}function Dt(t,s){var a=s.deletions;if(a!==null)for(var c=0;c<a.length;c++){var h=a[c],p=t,y=s,T=y;e:for(;T!==null;){switch(T.tag){case 27:if(Ci(T.type)){$e=T.stateNode,Rt=!1;break e}break;case 5:$e=T.stateNode,Rt=!1;break e;case 3:case 4:$e=T.stateNode.containerInfo,Rt=!0;break e}T=T.return}if($e===null)throw Error(r(160));Em(p,y,h),$e=null,Rt=!1,p=h.alternate,p!==null&&(p.return=null),h.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Cm(s,t),s=s.sibling}var Sn=null;function Cm(t,s){var a=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Dt(s,t),zt(t),c&4&&(Si(3,t,t.return),ga(3,t),Si(5,t,t.return));break;case 1:Dt(s,t),zt(t),c&512&&(st||a===null||kn(a,a.return)),c&64&&Kn&&(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=Sn;if(Dt(s,t),zt(t),c&512&&(st||a===null||kn(a,a.return)),c&4){var p=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":p=h.getElementsByTagName("title")[0],(!p||p[Vr]||p[pt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=h.createElement(c),h.head.insertBefore(p,h.querySelector("head > title"))),bt(p,c,a),p[pt]=t,ht(p),c=p;break e;case"link":var y=Cy("link","href",h).get(c+(a.href||""));if(y){for(var T=0;T<y.length;T++)if(p=y[T],p.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&p.getAttribute("rel")===(a.rel==null?null:a.rel)&&p.getAttribute("title")===(a.title==null?null:a.title)&&p.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(T,1);break t}}p=h.createElement(c),bt(p,c,a),h.head.appendChild(p);break;case"meta":if(y=Cy("meta","content",h).get(c+(a.content||""))){for(T=0;T<y.length;T++)if(p=y[T],p.getAttribute("content")===(a.content==null?null:""+a.content)&&p.getAttribute("name")===(a.name==null?null:a.name)&&p.getAttribute("property")===(a.property==null?null:a.property)&&p.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&p.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(T,1);break t}}p=h.createElement(c),bt(p,c,a),h.head.appendChild(p);break;default:throw Error(r(468,c))}p[pt]=t,ht(p),c=p}t.stateNode=c}else Ny(h,t.type,t.stateNode);else t.stateNode=Ay(h,c,t.memoizedProps);else p!==c?(p===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):p.count--,c===null?Ny(h,t.type,t.stateNode):Ay(h,c,t.memoizedProps)):c===null&&t.stateNode!==null&&gf(t,t.memoizedProps,a.memoizedProps)}break;case 27:Dt(s,t),zt(t),c&512&&(st||a===null||kn(a,a.return)),a!==null&&c&4&&gf(t,t.memoizedProps,a.memoizedProps);break;case 5:if(Dt(s,t),zt(t),c&512&&(st||a===null||kn(a,a.return)),t.flags&32){h=t.stateNode;try{Ns(h,"")}catch(ee){Oe(t,t.return,ee)}}c&4&&t.stateNode!=null&&(h=t.memoizedProps,gf(t,h,a!==null?a.memoizedProps:h)),c&1024&&(bf=!0);break;case 6:if(Dt(s,t),zt(t),c&4){if(t.stateNode===null)throw Error(r(162));c=t.memoizedProps,a=t.stateNode;try{a.nodeValue=c}catch(ee){Oe(t,t.return,ee)}}break;case 3:if(_o=null,h=Sn,Sn=wo(s.containerInfo),Dt(s,t),Sn=h,zt(t),c&4&&a!==null&&a.memoizedState.isDehydrated)try{rr(s.containerInfo)}catch(ee){Oe(t,t.return,ee)}bf&&(bf=!1,Nm(t));break;case 4:c=Sn,Sn=wo(t.stateNode.containerInfo),Dt(s,t),zt(t),Sn=c;break;case 12:Dt(s,t),zt(t);break;case 31:Dt(s,t),zt(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,ao(t,c)));break;case 13:Dt(s,t),zt(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(oo=Ct()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,ao(t,c)));break;case 22:h=t.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,z=Kn,K=st;if(Kn=z||h,st=K||C,Dt(s,t),st=K,Kn=z,zt(t),c&8192)e:for(s=t.stateNode,s._visibility=h?s._visibility&-2:s._visibility|1,h&&(a===null||C||Kn||st||rs(t)),a=null,s=t;;){if(s.tag===5||s.tag===26){if(a===null){C=a=s;try{if(p=C.stateNode,h)y=p.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{T=C.stateNode;var Q=C.memoizedProps.style,H=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;T.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(ee){Oe(C,C.return,ee)}}}else if(s.tag===6){if(a===null){C=s;try{C.stateNode.nodeValue=h?"":C.memoizedProps}catch(ee){Oe(C,C.return,ee)}}}else if(s.tag===18){if(a===null){C=s;try{var q=C.stateNode;h?yy(q,!0):yy(C.stateNode,!1)}catch(ee){Oe(C,C.return,ee)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===t)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;a===s&&(a=null),s=s.return}a===s&&(a=null),s.sibling.return=s.return,s=s.sibling}c&4&&(c=t.updateQueue,c!==null&&(a=c.retryQueue,a!==null&&(c.retryQueue=null,ao(t,a))));break;case 19:Dt(s,t),zt(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,ao(t,c)));break;case 30:break;case 21:break;default:Dt(s,t),zt(t)}}function zt(t){var s=t.flags;if(s&2){try{for(var a,c=t.return;c!==null;){if(vm(c)){a=c;break}c=c.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var h=a.stateNode,p=mf(t);ro(t,p,h);break;case 5:var y=a.stateNode;a.flags&32&&(Ns(y,""),a.flags&=-33);var T=mf(t);ro(t,T,y);break;case 3:case 4:var C=a.stateNode.containerInfo,z=mf(t);yf(t,z,C);break;default:throw Error(r(161))}}catch(K){Oe(t,t.return,K)}t.flags&=-3}s&4096&&(t.flags&=-4097)}function Nm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var s=t;Nm(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),t=t.sibling}}function Yn(t,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)xm(t,s.alternate,s),s=s.sibling}function rs(t){for(t=t.child;t!==null;){var s=t;switch(s.tag){case 0:case 11:case 14:case 15:Si(4,s,s.return),rs(s);break;case 1:kn(s,s.return);var a=s.stateNode;typeof a.componentWillUnmount=="function"&&ym(s,s.return,a),rs(s);break;case 27:Ta(s.stateNode);case 26:case 5:kn(s,s.return),rs(s);break;case 22:s.memoizedState===null&&rs(s);break;case 30:rs(s);break;default:rs(s)}t=t.sibling}}function Fn(t,s,a){for(a=a&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var c=s.alternate,h=t,p=s,y=p.flags;switch(p.tag){case 0:case 11:case 15:Fn(h,p,a),ga(4,p);break;case 1:if(Fn(h,p,a),c=p,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(z){Oe(c,c.return,z)}if(c=p,h=c.updateQueue,h!==null){var T=c.stateNode;try{var C=h.shared.hiddenCallbacks;if(C!==null)for(h.shared.hiddenCallbacks=null,h=0;h<C.length;h++)rg(C[h],T)}catch(z){Oe(c,c.return,z)}}a&&y&64&&mm(p),ma(p,p.return);break;case 27:Sm(p);case 26:case 5:Fn(h,p,a),a&&c===null&&y&4&&bm(p),ma(p,p.return);break;case 12:Fn(h,p,a);break;case 31:Fn(h,p,a),a&&y&4&&Tm(h,p);break;case 13:Fn(h,p,a),a&&y&4&&Am(h,p);break;case 22:p.memoizedState===null&&Fn(h,p,a),ma(p,p.return);break;case 30:break;default:Fn(h,p,a)}s=s.sibling}}function vf(t,s){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(t=s.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&na(a))}function Sf(t,s){t=null,s.alternate!==null&&(t=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==t&&(s.refCount++,t!=null&&na(t))}function wn(t,s,a,c){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)km(t,s,a,c),s=s.sibling}function km(t,s,a,c){var h=s.flags;switch(s.tag){case 0:case 11:case 15:wn(t,s,a,c),h&2048&&ga(9,s);break;case 1:wn(t,s,a,c);break;case 3:wn(t,s,a,c),h&2048&&(t=null,s.alternate!==null&&(t=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==t&&(s.refCount++,t!=null&&na(t)));break;case 12:if(h&2048){wn(t,s,a,c),t=s.stateNode;try{var p=s.memoizedProps,y=p.id,T=p.onPostCommit;typeof T=="function"&&T(y,s.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(C){Oe(s,s.return,C)}}else wn(t,s,a,c);break;case 31:wn(t,s,a,c);break;case 13:wn(t,s,a,c);break;case 23:break;case 22:p=s.stateNode,y=s.alternate,s.memoizedState!==null?p._visibility&2?wn(t,s,a,c):ya(t,s):p._visibility&2?wn(t,s,a,c):(p._visibility|=2,Fs(t,s,a,c,(s.subtreeFlags&10256)!==0||!1)),h&2048&&vf(y,s);break;case 24:wn(t,s,a,c),h&2048&&Sf(s.alternate,s);break;default:wn(t,s,a,c)}}function Fs(t,s,a,c,h){for(h=h&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var p=t,y=s,T=a,C=c,z=y.flags;switch(y.tag){case 0:case 11:case 15:Fs(p,y,T,C,h),ga(8,y);break;case 23:break;case 22:var K=y.stateNode;y.memoizedState!==null?K._visibility&2?Fs(p,y,T,C,h):ya(p,y):(K._visibility|=2,Fs(p,y,T,C,h)),h&&z&2048&&vf(y.alternate,y);break;case 24:Fs(p,y,T,C,h),h&&z&2048&&Sf(y.alternate,y);break;default:Fs(p,y,T,C,h)}s=s.sibling}}function ya(t,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var a=t,c=s,h=c.flags;switch(c.tag){case 22:ya(a,c),h&2048&&vf(c.alternate,c);break;case 24:ya(a,c),h&2048&&Sf(c.alternate,c);break;default:ya(a,c)}s=s.sibling}}var ba=8192;function Qs(t,s,a){if(t.subtreeFlags&ba)for(t=t.child;t!==null;)Mm(t,s,a),t=t.sibling}function Mm(t,s,a){switch(t.tag){case 26:Qs(t,s,a),t.flags&ba&&t.memoizedState!==null&&Fw(a,Sn,t.memoizedState,t.memoizedProps);break;case 5:Qs(t,s,a);break;case 3:case 4:var c=Sn;Sn=wo(t.stateNode.containerInfo),Qs(t,s,a),Sn=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=ba,ba=16777216,Qs(t,s,a),ba=c):Qs(t,s,a));break;default:Qs(t,s,a)}}function Om(t){var s=t.alternate;if(s!==null&&(t=s.child,t!==null)){s.child=null;do s=t.sibling,t.sibling=null,t=s;while(t!==null)}}function va(t){var s=t.deletions;if((t.flags&16)!==0){if(s!==null)for(var a=0;a<s.length;a++){var c=s[a];dt=c,Lm(c,t)}Om(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jm(t),t=t.sibling}function jm(t){switch(t.tag){case 0:case 11:case 15:va(t),t.flags&2048&&Si(9,t,t.return);break;case 3:va(t);break;case 12:va(t);break;case 22:var s=t.stateNode;t.memoizedState!==null&&s._visibility&2&&(t.return===null||t.return.tag!==13)?(s._visibility&=-3,lo(t)):va(t);break;default:va(t)}}function lo(t){var s=t.deletions;if((t.flags&16)!==0){if(s!==null)for(var a=0;a<s.length;a++){var c=s[a];dt=c,Lm(c,t)}Om(t)}for(t=t.child;t!==null;){switch(s=t,s.tag){case 0:case 11:case 15:Si(8,s,s.return),lo(s);break;case 22:a=s.stateNode,a._visibility&2&&(a._visibility&=-3,lo(s));break;default:lo(s)}t=t.sibling}}function Lm(t,s){for(;dt!==null;){var a=dt;switch(a.tag){case 0:case 11:case 15:Si(8,a,s);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:na(a.memoizedState.cache)}if(c=a.child,c!==null)c.return=a,dt=c;else e:for(a=t;dt!==null;){c=dt;var h=c.sibling,p=c.return;if(_m(c),c===a){dt=null;break e}if(h!==null){h.return=p,dt=h;break e}dt=p}}}var cw={getCacheForType:function(t){var s=mt(tt),a=s.data.get(t);return a===void 0&&(a=t(),s.data.set(t,a)),a},cacheSignal:function(){return mt(tt).controller.signal}},uw=typeof WeakMap=="function"?WeakMap:Map,Ce=0,De=null,me=null,ve=0,Me=0,Pt=null,wi=!1,Ps=!1,wf=!1,Qn=0,Fe=0,xi=0,as=0,xf=0,Jt=0,Js=0,Sa=null,Ut=null,_f=!1,oo=0,Rm=0,co=1/0,uo=null,_i=null,ot=0,Ei=null,Zs=null,Pn=0,Ef=0,Tf=null,Dm=null,wa=0,Af=null;function Zt(){return(Ce&2)!==0&&ve!==0?ve&-ve:I.T!==null?jf():Jd()}function zm(){if(Jt===0)if((ve&536870912)===0||we){var t=bl;bl<<=1,(bl&3932160)===0&&(bl=262144),Jt=t}else Jt=536870912;return t=Ft.current,t!==null&&(t.flags|=32),Jt}function Ht(t,s,a){(t===De&&(Me===2||Me===9)||t.cancelPendingCommit!==null)&&(Ws(t,0),Ti(t,ve,Jt,!1)),Ir(t,a),((Ce&2)===0||t!==De)&&(t===De&&((Ce&2)===0&&(as|=a),Fe===4&&Ti(t,ve,Jt,!1)),Mn(t))}function Um(t,s,a){if((Ce&6)!==0)throw Error(r(327));var c=!a&&(s&127)===0&&(s&t.expiredLanes)===0||$r(t,s),h=c?dw(t,s):Nf(t,s,!0),p=c;do{if(h===0){Ps&&!c&&Ti(t,s,0,!1);break}else{if(a=t.current.alternate,p&&!fw(a)){h=Nf(t,s,!1),p=!1;continue}if(h===2){if(p=s,t.errorRecoveryDisabledLanes&p)var y=0;else y=t.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){s=y;e:{var T=t;h=Sa;var C=T.current.memoizedState.isDehydrated;if(C&&(Ws(T,y).flags|=256),y=Nf(T,y,!1),y!==2){if(wf&&!C){T.errorRecoveryDisabledLanes|=p,as|=p,h=4;break e}p=Ut,Ut=h,p!==null&&(Ut===null?Ut=p:Ut.push.apply(Ut,p))}h=y}if(p=!1,h!==2)continue}}if(h===1){Ws(t,0),Ti(t,s,0,!0);break}e:{switch(c=t,p=h,p){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:Ti(c,s,Jt,!wi);break e;case 2:Ut=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(h=oo+300-Ct(),10<h)){if(Ti(c,s,Jt,!wi),Sl(c,0,!0)!==0)break e;Pn=s,c.timeoutHandle=py(Hm.bind(null,c,a,Ut,uo,_f,s,Jt,as,Js,wi,p,"Throttled",-0,0),h);break e}Hm(c,a,Ut,uo,_f,s,Jt,as,Js,wi,p,null,-0,0)}}break}while(!0);Mn(t)}function Hm(t,s,a,c,h,p,y,T,C,z,K,Q,H,q){if(t.timeoutHandle=-1,Q=s.subtreeFlags,Q&8192||(Q&16785408)===16785408){Q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Dn},Mm(s,p,Q);var ee=(p&62914560)===p?oo-Ct():(p&4194048)===p?Rm-Ct():0;if(ee=Qw(Q,ee),ee!==null){Pn=p,t.cancelPendingCommit=ee(Xm.bind(null,t,s,p,a,c,h,y,T,C,K,Q,null,H,q)),Ti(t,p,y,!z);return}}Xm(t,s,p,a,c,h,y,T,C)}function fw(t){for(var s=t;;){var a=s.tag;if((a===0||a===11||a===15)&&s.flags&16384&&(a=s.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var c=0;c<a.length;c++){var h=a[c],p=h.getSnapshot;h=h.value;try{if(!Xt(p(),h))return!1}catch{return!1}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;else{if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ti(t,s,a,c){s&=~xf,s&=~as,t.suspendedLanes|=s,t.pingedLanes&=~s,c&&(t.warmLanes|=s),c=t.expirationTimes;for(var h=s;0<h;){var p=31-kt(h),y=1<<p;c[p]=-1,h&=~y}a!==0&&Fd(t,a,s)}function fo(){return(Ce&6)===0?(xa(0),!1):!0}function Cf(){if(me!==null){if(Me===0)var t=me.return;else t=me,Bn=Ji=null,Iu(t),Vs=null,sa=0,t=me;for(;t!==null;)gm(t.alternate,t),t=t.return;me=null}}function Ws(t,s){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,Ow(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),Pn=0,Cf(),De=t,me=a=Un(t.current,null),ve=s,Me=0,Pt=null,wi=!1,Ps=$r(t,s),wf=!1,Js=Jt=xf=as=xi=Fe=0,Ut=Sa=null,_f=!1,(s&8)!==0&&(s|=s&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=s;0<c;){var h=31-kt(c),p=1<<h;s|=t[h],c&=~p}return Qn=s,jl(),a}function Bm(t,s){de=null,I.H=ha,s===Is||s===ql?(s=tg(),Me=3):s===Mu?(s=tg(),Me=4):Me=s===rf?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Pt=s,me===null&&(Fe=1,eo(t,ln(s,t.current)))}function qm(){var t=Ft.current;return t===null?!0:(ve&4194048)===ve?fn===null:(ve&62914560)===ve||(ve&536870912)!==0?t===fn:!1}function $m(){var t=I.H;return I.H=ha,t===null?ha:t}function Im(){var t=I.A;return I.A=cw,t}function ho(){Fe=4,wi||(ve&4194048)!==ve&&Ft.current!==null||(Ps=!0),(xi&134217727)===0&&(as&134217727)===0||De===null||Ti(De,ve,Jt,!1)}function Nf(t,s,a){var c=Ce;Ce|=2;var h=$m(),p=Im();(De!==t||ve!==s)&&(uo=null,Ws(t,s)),s=!1;var y=Fe;e:do try{if(Me!==0&&me!==null){var T=me,C=Pt;switch(Me){case 8:Cf(),y=6;break e;case 3:case 2:case 9:case 6:Ft.current===null&&(s=!0);var z=Me;if(Me=0,Pt=null,er(t,T,C,z),a&&Ps){y=0;break e}break;default:z=Me,Me=0,Pt=null,er(t,T,C,z)}}hw(),y=Fe;break}catch(K){Bm(t,K)}while(!0);return s&&t.shellSuspendCounter++,Bn=Ji=null,Ce=c,I.H=h,I.A=p,me===null&&(De=null,ve=0,jl()),y}function hw(){for(;me!==null;)Vm(me)}function dw(t,s){var a=Ce;Ce|=2;var c=$m(),h=Im();De!==t||ve!==s?(uo=null,co=Ct()+500,Ws(t,s)):Ps=$r(t,s);e:do try{if(Me!==0&&me!==null){s=me;var p=Pt;t:switch(Me){case 1:Me=0,Pt=null,er(t,s,p,1);break;case 2:case 9:if(Wp(p)){Me=0,Pt=null,Gm(s);break}s=function(){Me!==2&&Me!==9||De!==t||(Me=7),Mn(t)},p.then(s,s);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:Wp(p)?(Me=0,Pt=null,Gm(s)):(Me=0,Pt=null,er(t,s,p,7));break;case 5:var y=null;switch(me.tag){case 26:y=me.memoizedState;case 5:case 27:var T=me;if(y?ky(y):T.stateNode.complete){Me=0,Pt=null;var C=T.sibling;if(C!==null)me=C;else{var z=T.return;z!==null?(me=z,po(z)):me=null}break t}}Me=0,Pt=null,er(t,s,p,5);break;case 6:Me=0,Pt=null,er(t,s,p,6);break;case 8:Cf(),Fe=6;break e;default:throw Error(r(462))}}pw();break}catch(K){Bm(t,K)}while(!0);return Bn=Ji=null,I.H=c,I.A=h,Ce=a,me!==null?0:(De=null,ve=0,jl(),Fe)}function pw(){for(;me!==null&&!li();)Vm(me)}function Vm(t){var s=dm(t.alternate,t,Qn);t.memoizedProps=t.pendingProps,s===null?po(t):me=s}function Gm(t){var s=t,a=s.alternate;switch(s.tag){case 15:case 0:s=lm(a,s,s.pendingProps,s.type,void 0,ve);break;case 11:s=lm(a,s,s.pendingProps,s.type.render,s.ref,ve);break;case 5:Iu(s);default:gm(a,s),s=me=Ip(s,Qn),s=dm(a,s,Qn)}t.memoizedProps=t.pendingProps,s===null?po(t):me=s}function er(t,s,a,c){Bn=Ji=null,Iu(s),Vs=null,sa=0;var h=s.return;try{if(nw(t,h,s,a,ve)){Fe=1,eo(t,ln(a,t.current)),me=null;return}}catch(p){if(h!==null)throw me=h,p;Fe=1,eo(t,ln(a,t.current)),me=null;return}s.flags&32768?(we||c===1?t=!0:Ps||(ve&536870912)!==0?t=!1:(wi=t=!0,(c===2||c===9||c===3||c===6)&&(c=Ft.current,c!==null&&c.tag===13&&(c.flags|=16384))),Km(s,t)):po(s)}function po(t){var s=t;do{if((s.flags&32768)!==0){Km(s,wi);return}t=s.return;var a=rw(s.alternate,s,Qn);if(a!==null){me=a;return}if(s=s.sibling,s!==null){me=s;return}me=s=t}while(s!==null);Fe===0&&(Fe=5)}function Km(t,s){do{var a=aw(t.alternate,t);if(a!==null){a.flags&=32767,me=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!s&&(t=t.sibling,t!==null)){me=t;return}me=t=a}while(t!==null);Fe=6,me=null}function Xm(t,s,a,c,h,p,y,T,C){t.cancelPendingCommit=null;do go();while(ot!==0);if((Ce&6)!==0)throw Error(r(327));if(s!==null){if(s===t.current)throw Error(r(177));if(p=s.lanes|s.childLanes,p|=gu,YS(t,a,p,y,T,C),t===De&&(me=De=null,ve=0),Zs=s,Ei=t,Pn=a,Ef=p,Tf=h,Dm=c,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,bw(oi,function(){return Jm(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||c){c=I.T,I.T=null,h=J.p,J.p=2,y=Ce,Ce|=4;try{lw(t,s,a)}finally{Ce=y,J.p=h,I.T=c}}ot=1,Ym(),Fm(),Qm()}}function Ym(){if(ot===1){ot=0;var t=Ei,s=Zs,a=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||a){a=I.T,I.T=null;var c=J.p;J.p=2;var h=Ce;Ce|=4;try{Cm(s,t);var p=qf,y=Lp(t.containerInfo),T=p.focusedElem,C=p.selectionRange;if(y!==T&&T&&T.ownerDocument&&jp(T.ownerDocument.documentElement,T)){if(C!==null&&uu(T)){var z=C.start,K=C.end;if(K===void 0&&(K=z),"selectionStart"in T)T.selectionStart=z,T.selectionEnd=Math.min(K,T.value.length);else{var Q=T.ownerDocument||document,H=Q&&Q.defaultView||window;if(H.getSelection){var q=H.getSelection(),ee=T.textContent.length,le=Math.min(C.start,ee),Re=C.end===void 0?le:Math.min(C.end,ee);!q.extend&&le>Re&&(y=Re,Re=le,le=y);var j=Op(T,le),k=Op(T,Re);if(j&&k&&(q.rangeCount!==1||q.anchorNode!==j.node||q.anchorOffset!==j.offset||q.focusNode!==k.node||q.focusOffset!==k.offset)){var D=Q.createRange();D.setStart(j.node,j.offset),q.removeAllRanges(),le>Re?(q.addRange(D),q.extend(k.node,k.offset)):(D.setEnd(k.node,k.offset),q.addRange(D))}}}}for(Q=[],q=T;q=q.parentNode;)q.nodeType===1&&Q.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<Q.length;T++){var F=Q[T];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}Co=!!Bf,qf=Bf=null}finally{Ce=h,J.p=c,I.T=a}}t.current=s,ot=2}}function Fm(){if(ot===2){ot=0;var t=Ei,s=Zs,a=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||a){a=I.T,I.T=null;var c=J.p;J.p=2;var h=Ce;Ce|=4;try{xm(t,s.alternate,s)}finally{Ce=h,J.p=c,I.T=a}}ot=3}}function Qm(){if(ot===4||ot===3){ot=0,Bc();var t=Ei,s=Zs,a=Pn,c=Dm;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?ot=5:(ot=0,Zs=Ei=null,Pm(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(_i=null),Kc(a),s=s.stateNode,Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(Tn,s,void 0,(s.current.flags&128)===128)}catch{}if(c!==null){s=I.T,h=J.p,J.p=2,I.T=null;try{for(var p=t.onRecoverableError,y=0;y<c.length;y++){var T=c[y];p(T.value,{componentStack:T.stack})}}finally{I.T=s,J.p=h}}(Pn&3)!==0&&go(),Mn(t),h=t.pendingLanes,(a&261930)!==0&&(h&42)!==0?t===Af?wa++:(wa=0,Af=t):wa=0,xa(0)}}function Pm(t,s){(t.pooledCacheLanes&=s)===0&&(s=t.pooledCache,s!=null&&(t.pooledCache=null,na(s)))}function go(){return Ym(),Fm(),Qm(),Jm()}function Jm(){if(ot!==5)return!1;var t=Ei,s=Ef;Ef=0;var a=Kc(Pn),c=I.T,h=J.p;try{J.p=32>a?32:a,I.T=null,a=Tf,Tf=null;var p=Ei,y=Pn;if(ot=0,Zs=Ei=null,Pn=0,(Ce&6)!==0)throw Error(r(331));var T=Ce;if(Ce|=4,jm(p.current),km(p,p.current,y,a),Ce=T,xa(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Tn,p)}catch{}return!0}finally{J.p=h,I.T=c,Pm(t,s)}}function Zm(t,s,a){s=ln(a,s),s=sf(t.stateNode,s,2),t=yi(t,s,2),t!==null&&(Ir(t,2),Mn(t))}function Oe(t,s,a){if(t.tag===3)Zm(t,t,a);else for(;s!==null;){if(s.tag===3){Zm(s,t,a);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(_i===null||!_i.has(c))){t=ln(a,t),a=Wg(2),c=yi(s,a,2),c!==null&&(em(a,c,s,t),Ir(c,2),Mn(c));break}}s=s.return}}function kf(t,s,a){var c=t.pingCache;if(c===null){c=t.pingCache=new uw;var h=new Set;c.set(s,h)}else h=c.get(s),h===void 0&&(h=new Set,c.set(s,h));h.has(a)||(wf=!0,h.add(a),t=gw.bind(null,t,s,a),s.then(t,t))}function gw(t,s,a){var c=t.pingCache;c!==null&&c.delete(s),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,De===t&&(ve&a)===a&&(Fe===4||Fe===3&&(ve&62914560)===ve&&300>Ct()-oo?(Ce&2)===0&&Ws(t,0):xf|=a,Js===ve&&(Js=0)),Mn(t)}function Wm(t,s){s===0&&(s=Yd()),t=Fi(t,s),t!==null&&(Ir(t,s),Mn(t))}function mw(t){var s=t.memoizedState,a=0;s!==null&&(a=s.retryLane),Wm(t,a)}function yw(t,s){var a=0;switch(t.tag){case 31: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(r(314))}c!==null&&c.delete(s),Wm(t,a)}function bw(t,s){return ai(t,s)}var mo=null,tr=null,Mf=!1,yo=!1,Of=!1,Ai=0;function Mn(t){t!==tr&&t.next===null&&(tr===null?mo=tr=t:tr=tr.next=t),yo=!0,Mf||(Mf=!0,Sw())}function xa(t,s){if(!Of&&yo){Of=!0;do for(var a=!1,c=mo;c!==null;){if(t!==0){var h=c.pendingLanes;if(h===0)var p=0;else{var y=c.suspendedLanes,T=c.pingedLanes;p=(1<<31-kt(42|t)+1)-1,p&=h&~(y&~T),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(a=!0,iy(c,p))}else p=ve,p=Sl(c,c===De?p:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(p&3)===0||$r(c,p)||(a=!0,iy(c,p));c=c.next}while(a);Of=!1}}function vw(){ey()}function ey(){yo=Mf=!1;var t=0;Ai!==0&&Mw()&&(t=Ai);for(var s=Ct(),a=null,c=mo;c!==null;){var h=c.next,p=ty(c,s);p===0?(c.next=null,a===null?mo=h:a.next=h,h===null&&(tr=a)):(a=c,(t!==0||(p&3)!==0)&&(yo=!0)),c=h}ot!==0&&ot!==5||xa(t),Ai!==0&&(Ai=0)}function ty(t,s){for(var a=t.suspendedLanes,c=t.pingedLanes,h=t.expirationTimes,p=t.pendingLanes&-62914561;0<p;){var y=31-kt(p),T=1<<y,C=h[y];C===-1?((T&a)===0||(T&c)!==0)&&(h[y]=XS(T,s)):C<=s&&(t.expiredLanes|=T),p&=~T}if(s=De,a=ve,a=Sl(t,t===s?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,a===0||t===s&&(Me===2||Me===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&Br(c),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||$r(t,a)){if(s=a&-a,s===t.callbackPriority)return s;switch(c!==null&&Br(c),Kc(a)){case 2:case 8:a=qr;break;case 32:a=oi;break;case 268435456:a=ml;break;default:a=oi}return c=ny.bind(null,t),a=ai(a,c),t.callbackPriority=s,t.callbackNode=a,s}return c!==null&&c!==null&&Br(c),t.callbackPriority=2,t.callbackNode=null,2}function ny(t,s){if(ot!==0&&ot!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(go()&&t.callbackNode!==a)return null;var c=ve;return c=Sl(t,t===De?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(Um(t,c,s),ty(t,Ct()),t.callbackNode!=null&&t.callbackNode===a?ny.bind(null,t):null)}function iy(t,s){if(go())return null;Um(t,s,!0)}function Sw(){jw(function(){(Ce&6)!==0?ai(gl,vw):ey()})}function jf(){if(Ai===0){var t=qs;t===0&&(t=nn,nn<<=1,(nn&261888)===0&&(nn=256)),Ai=t}return Ai}function sy(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:El(""+t)}function ry(t,s){var a=s.ownerDocument.createElement("input");return a.name=s.name,a.value=s.value,t.id&&a.setAttribute("form",t.id),s.parentNode.insertBefore(a,s),t=new FormData(t),a.parentNode.removeChild(a),t}function ww(t,s,a,c,h){if(s==="submit"&&a&&a.stateNode===h){var p=sy((h[jt]||null).action),y=c.submitter;y&&(s=(s=y[jt]||null)?sy(s.formAction):y.getAttribute("formAction"),s!==null&&(p=s,y=null));var T=new Nl("action","action",null,c,h);t.push({event:T,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Ai!==0){var C=y?ry(h,y):new FormData(h);Ju(a,{pending:!0,data:C,method:h.method,action:p},null,C)}}else typeof p=="function"&&(T.preventDefault(),C=y?ry(h,y):new FormData(h),Ju(a,{pending:!0,data:C,method:h.method,action:p},p,C))},currentTarget:h}]})}}for(var Lf=0;Lf<pu.length;Lf++){var Rf=pu[Lf],xw=Rf.toLowerCase(),_w=Rf[0].toUpperCase()+Rf.slice(1);vn(xw,"on"+_w)}vn(zp,"onAnimationEnd"),vn(Up,"onAnimationIteration"),vn(Hp,"onAnimationStart"),vn("dblclick","onDoubleClick"),vn("focusin","onFocus"),vn("focusout","onBlur"),vn(B1,"onTransitionRun"),vn(q1,"onTransitionStart"),vn($1,"onTransitionCancel"),vn(Bp,"onTransitionEnd"),As("onMouseEnter",["mouseout","mouseover"]),As("onMouseLeave",["mouseout","mouseover"]),As("onPointerEnter",["pointerout","pointerover"]),As("onPointerLeave",["pointerout","pointerover"]),Gi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Gi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Gi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Gi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Gi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Gi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _a="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(" "),Ew=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_a));function ay(t,s){s=(s&4)!==0;for(var a=0;a<t.length;a++){var c=t[a],h=c.event;c=c.listeners;e:{var p=void 0;if(s)for(var y=c.length-1;0<=y;y--){var T=c[y],C=T.instance,z=T.currentTarget;if(T=T.listener,C!==p&&h.isPropagationStopped())break e;p=T,h.currentTarget=z;try{p(h)}catch(K){Ol(K)}h.currentTarget=null,p=C}else for(y=0;y<c.length;y++){if(T=c[y],C=T.instance,z=T.currentTarget,T=T.listener,C!==p&&h.isPropagationStopped())break e;p=T,h.currentTarget=z;try{p(h)}catch(K){Ol(K)}h.currentTarget=null,p=C}}}}function ye(t,s){var a=s[Xc];a===void 0&&(a=s[Xc]=new Set);var c=t+"__bubble";a.has(c)||(ly(s,t,2,!1),a.add(c))}function Df(t,s,a){var c=0;s&&(c|=4),ly(a,t,c,s)}var bo="_reactListening"+Math.random().toString(36).slice(2);function zf(t){if(!t[bo]){t[bo]=!0,ep.forEach(function(a){a!=="selectionchange"&&(Ew.has(a)||Df(a,!1,t),Df(a,!0,t))});var s=t.nodeType===9?t:t.ownerDocument;s===null||s[bo]||(s[bo]=!0,Df("selectionchange",!1,s))}}function ly(t,s,a,c){switch(zy(s)){case 2:var h=Zw;break;case 8:h=Ww;break;default:h=Jf}a=h.bind(null,s,a,t),h=void 0,!tu||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(h=!0),c?h!==void 0?t.addEventListener(s,a,{capture:!0,passive:h}):t.addEventListener(s,a,!0):h!==void 0?t.addEventListener(s,a,{passive:h}):t.addEventListener(s,a,!1)}function Uf(t,s,a,c,h){var p=c;if((s&1)===0&&(s&2)===0&&c!==null)e:for(;;){if(c===null)return;var y=c.tag;if(y===3||y===4){var T=c.stateNode.containerInfo;if(T===h)break;if(y===4)for(y=c.return;y!==null;){var C=y.tag;if((C===3||C===4)&&y.stateNode.containerInfo===h)return;y=y.return}for(;T!==null;){if(y=_s(T),y===null)return;if(C=y.tag,C===5||C===6||C===26||C===27){c=p=y;continue e}T=T.parentNode}}c=c.return}hp(function(){var z=p,K=Wc(a),Q=[];e:{var H=qp.get(t);if(H!==void 0){var q=Nl,ee=t;switch(t){case"keypress":if(Al(a)===0)break e;case"keydown":case"keyup":q=y1;break;case"focusin":ee="focus",q=ru;break;case"focusout":ee="blur",q=ru;break;case"beforeblur":case"afterblur":q=ru;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":q=gp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=r1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=S1;break;case zp:case Up:case Hp:q=o1;break;case Bp:q=x1;break;case"scroll":case"scrollend":q=i1;break;case"wheel":q=E1;break;case"copy":case"cut":case"paste":q=u1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=yp;break;case"toggle":case"beforetoggle":q=A1}var le=(s&4)!==0,Re=!le&&(t==="scroll"||t==="scrollend"),j=le?H!==null?H+"Capture":null:H;le=[];for(var k=z,D;k!==null;){var F=k;if(D=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||D===null||j===null||(F=Kr(k,j),F!=null&&le.push(Ea(k,F,D))),Re)break;k=k.return}0<le.length&&(H=new q(H,ee,null,a,K),Q.push({event:H,listeners:le}))}}if((s&7)===0){e:{if(H=t==="mouseover"||t==="pointerover",q=t==="mouseout"||t==="pointerout",H&&a!==Zc&&(ee=a.relatedTarget||a.fromElement)&&(_s(ee)||ee[xs]))break e;if((q||H)&&(H=K.window===K?K:(H=K.ownerDocument)?H.defaultView||H.parentWindow:window,q?(ee=a.relatedTarget||a.toElement,q=z,ee=ee?_s(ee):null,ee!==null&&(Re=o(ee),le=ee.tag,ee!==Re||le!==5&&le!==27&&le!==6)&&(ee=null)):(q=null,ee=z),q!==ee)){if(le=gp,F="onMouseLeave",j="onMouseEnter",k="mouse",(t==="pointerout"||t==="pointerover")&&(le=yp,F="onPointerLeave",j="onPointerEnter",k="pointer"),Re=q==null?H:Gr(q),D=ee==null?H:Gr(ee),H=new le(F,k+"leave",q,a,K),H.target=Re,H.relatedTarget=D,F=null,_s(K)===z&&(le=new le(j,k+"enter",ee,a,K),le.target=D,le.relatedTarget=Re,F=le),Re=F,q&&ee)t:{for(le=Tw,j=q,k=ee,D=0,F=j;F;F=le(F))D++;F=0;for(var se=k;se;se=le(se))F++;for(;0<D-F;)j=le(j),D--;for(;0<F-D;)k=le(k),F--;for(;D--;){if(j===k||k!==null&&j===k.alternate){le=j;break t}j=le(j),k=le(k)}le=null}else le=null;q!==null&&oy(Q,H,q,le,!1),ee!==null&&Re!==null&&oy(Q,Re,ee,le,!0)}}e:{if(H=z?Gr(z):window,q=H.nodeName&&H.nodeName.toLowerCase(),q==="select"||q==="input"&&H.type==="file")var Te=Tp;else if(_p(H))if(Ap)Te=z1;else{Te=R1;var ie=L1}else q=H.nodeName,!q||q.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?z&&Jc(z.elementType)&&(Te=Tp):Te=D1;if(Te&&(Te=Te(t,z))){Ep(Q,Te,a,K);break e}ie&&ie(t,H,z),t==="focusout"&&z&&H.type==="number"&&z.memoizedProps.value!=null&&Pc(H,"number",H.value)}switch(ie=z?Gr(z):window,t){case"focusin":(_p(ie)||ie.contentEditable==="true")&&(js=ie,fu=z,Wr=null);break;case"focusout":Wr=fu=js=null;break;case"mousedown":hu=!0;break;case"contextmenu":case"mouseup":case"dragend":hu=!1,Rp(Q,a,K);break;case"selectionchange":if(H1)break;case"keydown":case"keyup":Rp(Q,a,K)}var pe;if(lu)e:{switch(t){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Os?wp(t,a)&&(Se="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Se="onCompositionStart");Se&&(bp&&a.locale!=="ko"&&(Os||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Os&&(pe=dp()):(ui=K,nu="value"in ui?ui.value:ui.textContent,Os=!0)),ie=vo(z,Se),0<ie.length&&(Se=new mp(Se,t,null,a,K),Q.push({event:Se,listeners:ie}),pe?Se.data=pe:(pe=xp(a),pe!==null&&(Se.data=pe)))),(pe=N1?k1(t,a):M1(t,a))&&(Se=vo(z,"onBeforeInput"),0<Se.length&&(ie=new mp("onBeforeInput","beforeinput",null,a,K),Q.push({event:ie,listeners:Se}),ie.data=pe)),ww(Q,t,z,a,K)}ay(Q,s)})}function Ea(t,s,a){return{instance:t,listener:s,currentTarget:a}}function vo(t,s){for(var a=s+"Capture",c=[];t!==null;){var h=t,p=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||p===null||(h=Kr(t,a),h!=null&&c.unshift(Ea(t,h,p)),h=Kr(t,s),h!=null&&c.push(Ea(t,h,p))),t.tag===3)return c;t=t.return}return[]}function Tw(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function oy(t,s,a,c,h){for(var p=s._reactName,y=[];a!==null&&a!==c;){var T=a,C=T.alternate,z=T.stateNode;if(T=T.tag,C!==null&&C===c)break;T!==5&&T!==26&&T!==27||z===null||(C=z,h?(z=Kr(a,p),z!=null&&y.unshift(Ea(a,z,C))):h||(z=Kr(a,p),z!=null&&y.push(Ea(a,z,C)))),a=a.return}y.length!==0&&t.push({event:s,listeners:y})}var Aw=/\r\n?/g,Cw=/\u0000|\uFFFD/g;function cy(t){return(typeof t=="string"?t:""+t).replace(Aw,`
`).replace(Cw,"")}function uy(t,s){return s=cy(s),cy(t)===s}function Le(t,s,a,c,h,p){switch(a){case"children":typeof c=="string"?s==="body"||s==="textarea"&&c===""||Ns(t,c):(typeof c=="number"||typeof c=="bigint")&&s!=="body"&&Ns(t,""+c);break;case"className":xl(t,"class",c);break;case"tabIndex":xl(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":xl(t,a,c);break;case"style":up(t,c,p);break;case"data":if(s!=="object"){xl(t,"data",c);break}case"src":case"href":if(c===""&&(s!=="a"||a!=="href")){t.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=El(""+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 p=="function"&&(a==="formAction"?(s!=="input"&&Le(t,s,"name",h.name,h,null),Le(t,s,"formEncType",h.formEncType,h,null),Le(t,s,"formMethod",h.formMethod,h,null),Le(t,s,"formTarget",h.formTarget,h,null)):(Le(t,s,"encType",h.encType,h,null),Le(t,s,"method",h.method,h,null),Le(t,s,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=El(""+c),t.setAttribute(a,c);break;case"onClick":c!=null&&(t.onclick=Dn);break;case"onScroll":c!=null&&ye("scroll",t);break;case"onScrollEnd":c!=null&&ye("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(a=c.__html,a!=null){if(h.children!=null)throw Error(r(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=El(""+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":ye("beforetoggle",t),ye("toggle",t),wl(t,"popover",c);break;case"xlinkActuate":Rn(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Rn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Rn(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Rn(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Rn(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Rn(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Rn(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Rn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Rn(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":wl(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=t1.get(a)||a,wl(t,a,c))}}function Hf(t,s,a,c,h,p){switch(a){case"style":up(t,c,p);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(a=c.__html,a!=null){if(h.children!=null)throw Error(r(60));t.innerHTML=a}}break;case"children":typeof c=="string"?Ns(t,c):(typeof c=="number"||typeof c=="bigint")&&Ns(t,""+c);break;case"onScroll":c!=null&&ye("scroll",t);break;case"onScrollEnd":c!=null&&ye("scrollend",t);break;case"onClick":c!=null&&(t.onclick=Dn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!tp.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),s=a.slice(2,h?a.length-7:void 0),p=t[jt]||null,p=p!=null?p[a]:null,typeof p=="function"&&t.removeEventListener(s,p,h),typeof c=="function")){typeof p!="function"&&p!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(s,c,h);break e}a in t?t[a]=c:c===!0?t.setAttribute(a,""):wl(t,a,c)}}}function bt(t,s,a){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",t),ye("load",t);var c=!1,h=!1,p;for(p in a)if(a.hasOwnProperty(p)){var y=a[p];if(y!=null)switch(p){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Le(t,s,p,y,a,null)}}h&&Le(t,s,"srcSet",a.srcSet,a,null),c&&Le(t,s,"src",a.src,a,null);return;case"input":ye("invalid",t);var T=p=y=h=null,C=null,z=null;for(c in a)if(a.hasOwnProperty(c)){var K=a[c];if(K!=null)switch(c){case"name":h=K;break;case"type":y=K;break;case"checked":C=K;break;case"defaultChecked":z=K;break;case"value":p=K;break;case"defaultValue":T=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(r(137,s));break;default:Le(t,s,c,K,a,null)}}ap(t,p,T,C,z,y,h,!1);return;case"select":ye("invalid",t),c=y=p=null;for(h in a)if(a.hasOwnProperty(h)&&(T=a[h],T!=null))switch(h){case"value":p=T;break;case"defaultValue":y=T;break;case"multiple":c=T;default:Le(t,s,h,T,a,null)}s=p,a=y,t.multiple=!!c,s!=null?Cs(t,!!c,s,!1):a!=null&&Cs(t,!!c,a,!0);return;case"textarea":ye("invalid",t),p=h=c=null;for(y in a)if(a.hasOwnProperty(y)&&(T=a[y],T!=null))switch(y){case"value":c=T;break;case"defaultValue":h=T;break;case"children":p=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(91));break;default:Le(t,s,y,T,a,null)}op(t,c,h,p);return;case"option":for(C in a)if(a.hasOwnProperty(C)&&(c=a[C],c!=null))switch(C){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Le(t,s,C,c,a,null)}return;case"dialog":ye("beforetoggle",t),ye("toggle",t),ye("cancel",t),ye("close",t);break;case"iframe":case"object":ye("load",t);break;case"video":case"audio":for(c=0;c<_a.length;c++)ye(_a[c],t);break;case"image":ye("error",t),ye("load",t);break;case"details":ye("toggle",t);break;case"embed":case"source":case"link":ye("error",t),ye("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(z in a)if(a.hasOwnProperty(z)&&(c=a[z],c!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Le(t,s,z,c,a,null)}return;default:if(Jc(s)){for(K in a)a.hasOwnProperty(K)&&(c=a[K],c!==void 0&&Hf(t,s,K,c,a,void 0));return}}for(T in a)a.hasOwnProperty(T)&&(c=a[T],c!=null&&Le(t,s,T,c,a,null))}function Nw(t,s,a,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,p=null,y=null,T=null,C=null,z=null,K=null;for(q in a){var Q=a[q];if(a.hasOwnProperty(q)&&Q!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":C=Q;default:c.hasOwnProperty(q)||Le(t,s,q,null,c,Q)}}for(var H in c){var q=c[H];if(Q=a[H],c.hasOwnProperty(H)&&(q!=null||Q!=null))switch(H){case"type":p=q;break;case"name":h=q;break;case"checked":z=q;break;case"defaultChecked":K=q;break;case"value":y=q;break;case"defaultValue":T=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,s));break;default:q!==Q&&Le(t,s,H,q,c,Q)}}Qc(t,y,T,C,z,K,p,h);return;case"select":q=y=T=H=null;for(p in a)if(C=a[p],a.hasOwnProperty(p)&&C!=null)switch(p){case"value":break;case"multiple":q=C;default:c.hasOwnProperty(p)||Le(t,s,p,null,c,C)}for(h in c)if(p=c[h],C=a[h],c.hasOwnProperty(h)&&(p!=null||C!=null))switch(h){case"value":H=p;break;case"defaultValue":T=p;break;case"multiple":y=p;default:p!==C&&Le(t,s,h,p,c,C)}s=T,a=y,c=q,H!=null?Cs(t,!!a,H,!1):!!c!=!!a&&(s!=null?Cs(t,!!a,s,!0):Cs(t,!!a,a?[]:"",!1));return;case"textarea":q=H=null;for(T in a)if(h=a[T],a.hasOwnProperty(T)&&h!=null&&!c.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Le(t,s,T,null,c,h)}for(y in c)if(h=c[y],p=a[y],c.hasOwnProperty(y)&&(h!=null||p!=null))switch(y){case"value":H=h;break;case"defaultValue":q=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:h!==p&&Le(t,s,y,h,c,p)}lp(t,H,q);return;case"option":for(var ee in a)if(H=a[ee],a.hasOwnProperty(ee)&&H!=null&&!c.hasOwnProperty(ee))switch(ee){case"selected":t.selected=!1;break;default:Le(t,s,ee,null,c,H)}for(C in c)if(H=c[C],q=a[C],c.hasOwnProperty(C)&&H!==q&&(H!=null||q!=null))switch(C){case"selected":t.selected=H&&typeof H!="function"&&typeof H!="symbol";break;default:Le(t,s,C,H,c,q)}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 le in a)H=a[le],a.hasOwnProperty(le)&&H!=null&&!c.hasOwnProperty(le)&&Le(t,s,le,null,c,H);for(z in c)if(H=c[z],q=a[z],c.hasOwnProperty(z)&&H!==q&&(H!=null||q!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,s));break;default:Le(t,s,z,H,c,q)}return;default:if(Jc(s)){for(var Re in a)H=a[Re],a.hasOwnProperty(Re)&&H!==void 0&&!c.hasOwnProperty(Re)&&Hf(t,s,Re,void 0,c,H);for(K in c)H=c[K],q=a[K],!c.hasOwnProperty(K)||H===q||H===void 0&&q===void 0||Hf(t,s,K,H,c,q);return}}for(var j in a)H=a[j],a.hasOwnProperty(j)&&H!=null&&!c.hasOwnProperty(j)&&Le(t,s,j,null,c,H);for(Q in c)H=c[Q],q=a[Q],!c.hasOwnProperty(Q)||H===q||H==null&&q==null||Le(t,s,Q,H,c,q)}function fy(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kw(){if(typeof performance.getEntriesByType=="function"){for(var t=0,s=0,a=performance.getEntriesByType("resource"),c=0;c<a.length;c++){var h=a[c],p=h.transferSize,y=h.initiatorType,T=h.duration;if(p&&T&&fy(y)){for(y=0,T=h.responseEnd,c+=1;c<a.length;c++){var C=a[c],z=C.startTime;if(z>T)break;var K=C.transferSize,Q=C.initiatorType;K&&fy(Q)&&(C=C.responseEnd,y+=K*(C<T?1:(T-z)/(C-z)))}if(--c,s+=8*(p+y)/(h.duration/1e3),t++,10<t)break}}if(0<t)return s/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Bf=null,qf=null;function So(t){return t.nodeType===9?t:t.ownerDocument}function hy(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 dy(t,s){if(t===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&s==="foreignObject"?0:t}function $f(t,s){return t==="textarea"||t==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var If=null;function Mw(){var t=window.event;return t&&t.type==="popstate"?t===If?!1:(If=t,!0):(If=null,!1)}var py=typeof setTimeout=="function"?setTimeout:void 0,Ow=typeof clearTimeout=="function"?clearTimeout:void 0,gy=typeof Promise=="function"?Promise:void 0,jw=typeof queueMicrotask=="function"?queueMicrotask:typeof gy<"u"?function(t){return gy.resolve(null).then(t).catch(Lw)}:py;function Lw(t){setTimeout(function(){throw t})}function Ci(t){return t==="head"}function my(t,s){var a=s,c=0;do{var h=a.nextSibling;if(t.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"||a==="/&"){if(c===0){t.removeChild(h),rr(s);return}c--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")c++;else if(a==="html")Ta(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,Ta(a);for(var p=a.firstChild;p;){var y=p.nextSibling,T=p.nodeName;p[Vr]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=y}}else a==="body"&&Ta(t.ownerDocument.body);a=h}while(a);rr(s)}function yy(t,s){var a=t;t=0;do{var c=a.nextSibling;if(a.nodeType===1?s?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(s?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=c}while(a)}function Vf(t){var s=t.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var a=s;switch(s=s.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Vf(a),Yc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function Rw(t,s,a,c){for(;t.nodeType===1;){var h=a;if(t.nodeName.toLowerCase()!==s.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[Vr])switch(s){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(p=t.getAttribute("rel"),p==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(p!==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(p=t.getAttribute("src"),(p!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&p&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(s==="input"&&t.type==="hidden"){var p=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===p)return t}else return t;if(t=hn(t.nextSibling),t===null)break}return null}function Dw(t,s,a){if(s==="")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 by(t,s){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=hn(t.nextSibling),t===null))return null;return t}function Gf(t){return t.data==="$?"||t.data==="$~"}function Kf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function zw(t,s){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=s;else if(t.data!=="$?"||a.readyState!=="loading")s();else{var c=function(){s(),a.removeEventListener("DOMContentLoaded",c)};a.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function hn(t){for(;t!=null;t=t.nextSibling){var s=t.nodeType;if(s===1||s===3)break;if(s===8){if(s=t.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return t}var Xf=null;function vy(t){t=t.nextSibling;for(var s=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(s===0)return hn(t.nextSibling);s--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||s++}t=t.nextSibling}return null}function Sy(t){t=t.previousSibling;for(var s=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(s===0)return t;s--}else a!=="/$"&&a!=="/&"||s++}t=t.previousSibling}return null}function wy(t,s,a){switch(s=So(a),t){case"html":if(t=s.documentElement,!t)throw Error(r(452));return t;case"head":if(t=s.head,!t)throw Error(r(453));return t;case"body":if(t=s.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function Ta(t){for(var s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Yc(t)}var dn=new Map,xy=new Set;function wo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Jn=J.d;J.d={f:Uw,r:Hw,D:Bw,C:qw,L:$w,m:Iw,X:Gw,S:Vw,M:Kw};function Uw(){var t=Jn.f(),s=fo();return t||s}function Hw(t){var s=Es(t);s!==null&&s.tag===5&&s.type==="form"?Bg(s):Jn.r(t)}var nr=typeof document>"u"?null:document;function _y(t,s,a){var c=nr;if(c&&typeof s=="string"&&s){var h=rn(s);h='link[rel="'+t+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),xy.has(h)||(xy.add(h),t={rel:t,crossOrigin:a,href:s},c.querySelector(h)===null&&(s=c.createElement("link"),bt(s,"link",t),ht(s),c.head.appendChild(s)))}}function Bw(t){Jn.D(t),_y("dns-prefetch",t,null)}function qw(t,s){Jn.C(t,s),_y("preconnect",t,s)}function $w(t,s,a){Jn.L(t,s,a);var c=nr;if(c&&t&&s){var h='link[rel="preload"][as="'+rn(s)+'"]';s==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+rn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+rn(a.imageSizes)+'"]')):h+='[href="'+rn(t)+'"]';var p=h;switch(s){case"style":p=ir(t);break;case"script":p=sr(t)}dn.has(p)||(t=m({rel:"preload",href:s==="image"&&a&&a.imageSrcSet?void 0:t,as:s},a),dn.set(p,t),c.querySelector(h)!==null||s==="style"&&c.querySelector(Aa(p))||s==="script"&&c.querySelector(Ca(p))||(s=c.createElement("link"),bt(s,"link",t),ht(s),c.head.appendChild(s)))}}function Iw(t,s){Jn.m(t,s);var a=nr;if(a&&t){var c=s&&typeof s.as=="string"?s.as:"script",h='link[rel="modulepreload"][as="'+rn(c)+'"][href="'+rn(t)+'"]',p=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=sr(t)}if(!dn.has(p)&&(t=m({rel:"modulepreload",href:t},s),dn.set(p,t),a.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ca(p)))return}c=a.createElement("link"),bt(c,"link",t),ht(c),a.head.appendChild(c)}}}function Vw(t,s,a){Jn.S(t,s,a);var c=nr;if(c&&t){var h=Ts(c).hoistableStyles,p=ir(t);s=s||"default";var y=h.get(p);if(!y){var T={loading:0,preload:null};if(y=c.querySelector(Aa(p)))T.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":s},a),(a=dn.get(p))&&Yf(t,a);var C=y=c.createElement("link");ht(C),bt(C,"link",t),C._p=new Promise(function(z,K){C.onload=z,C.onerror=K}),C.addEventListener("load",function(){T.loading|=1}),C.addEventListener("error",function(){T.loading|=2}),T.loading|=4,xo(y,s,c)}y={type:"stylesheet",instance:y,count:1,state:T},h.set(p,y)}}}function Gw(t,s){Jn.X(t,s);var a=nr;if(a&&t){var c=Ts(a).hoistableScripts,h=sr(t),p=c.get(h);p||(p=a.querySelector(Ca(h)),p||(t=m({src:t,async:!0},s),(s=dn.get(h))&&Ff(t,s),p=a.createElement("script"),ht(p),bt(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(h,p))}}function Kw(t,s){Jn.M(t,s);var a=nr;if(a&&t){var c=Ts(a).hoistableScripts,h=sr(t),p=c.get(h);p||(p=a.querySelector(Ca(h)),p||(t=m({src:t,async:!0,type:"module"},s),(s=dn.get(h))&&Ff(t,s),p=a.createElement("script"),ht(p),bt(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(h,p))}}function Ey(t,s,a,c){var h=(h=he.current)?wo(h):null;if(!h)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(s=ir(a.href),a=Ts(h).hoistableStyles,c=a.get(s),c||(c={type:"style",instance:null,count:0,state:null},a.set(s,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=ir(a.href);var p=Ts(h).hoistableStyles,y=p.get(t);if(y||(h=h.ownerDocument||h,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(t,y),(p=h.querySelector(Aa(t)))&&!p._p&&(y.instance=p,y.state.loading=5),dn.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},dn.set(t,a),p||Xw(h,t,a,y.state))),s&&c===null)throw Error(r(528,""));return y}if(s&&c!==null)throw Error(r(529,""));return null;case"script":return s=a.async,a=a.src,typeof a=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=sr(a),a=Ts(h).hoistableScripts,c=a.get(s),c||(c={type:"script",instance:null,count:0,state:null},a.set(s,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function ir(t){return'href="'+rn(t)+'"'}function Aa(t){return'link[rel="stylesheet"]['+t+"]"}function Ty(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function Xw(t,s,a,c){t.querySelector('link[rel="preload"][as="style"]['+s+"]")?c.loading=1:(s=t.createElement("link"),c.preload=s,s.addEventListener("load",function(){return c.loading|=1}),s.addEventListener("error",function(){return c.loading|=2}),bt(s,"link",a),ht(s),t.head.appendChild(s))}function sr(t){return'[src="'+rn(t)+'"]'}function Ca(t){return"script[async]"+t}function Ay(t,s,a){if(s.count++,s.instance===null)switch(s.type){case"style":var c=t.querySelector('style[data-href~="'+rn(a.href)+'"]');if(c)return s.instance=c,ht(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"),ht(c),bt(c,"style",h),xo(c,a.precedence,t),s.instance=c;case"stylesheet":h=ir(a.href);var p=t.querySelector(Aa(h));if(p)return s.state.loading|=4,s.instance=p,ht(p),p;c=Ty(a),(h=dn.get(h))&&Yf(c,h),p=(t.ownerDocument||t).createElement("link"),ht(p);var y=p;return y._p=new Promise(function(T,C){y.onload=T,y.onerror=C}),bt(p,"link",c),s.state.loading|=4,xo(p,a.precedence,t),s.instance=p;case"script":return p=sr(a.src),(h=t.querySelector(Ca(p)))?(s.instance=h,ht(h),h):(c=a,(h=dn.get(p))&&(c=m({},a),Ff(c,h)),t=t.ownerDocument||t,h=t.createElement("script"),ht(h),bt(h,"link",c),t.head.appendChild(h),s.instance=h);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(c=s.instance,s.state.loading|=4,xo(c,a.precedence,t));return s.instance}function xo(t,s,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,p=h,y=0;y<c.length;y++){var T=c[y];if(T.dataset.precedence===s)p=T;else if(p!==h)break}p?p.parentNode.insertBefore(t,p.nextSibling):(s=a.nodeType===9?a.head:a,s.insertBefore(t,s.firstChild))}function Yf(t,s){t.crossOrigin==null&&(t.crossOrigin=s.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=s.referrerPolicy),t.title==null&&(t.title=s.title)}function Ff(t,s){t.crossOrigin==null&&(t.crossOrigin=s.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=s.referrerPolicy),t.integrity==null&&(t.integrity=s.integrity)}var _o=null;function Cy(t,s,a){if(_o===null){var c=new Map,h=_o=new Map;h.set(a,c)}else h=_o,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 p=a[h];if(!(p[Vr]||p[pt]||t==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var y=p.getAttribute(s)||"";y=t+y;var T=c.get(y);T?T.push(p):c.set(y,[p])}}return c}function Ny(t,s,a){t=t.ownerDocument||t,t.head.insertBefore(a,s==="title"?t.querySelector("head > title"):null)}function Yw(t,s,a){if(a===1||s.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return t=s.disabled,typeof s.precedence=="string"&&t==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function ky(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Fw(t,s,a,c){if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var h=ir(c.href),p=s.querySelector(Aa(h));if(p){s=p._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(t.count++,t=Eo.bind(t),s.then(t,t)),a.state.loading|=4,a.instance=p,ht(p);return}p=s.ownerDocument||s,c=Ty(c),(h=dn.get(h))&&Yf(c,h),p=p.createElement("link"),ht(p);var y=p;y._p=new Promise(function(T,C){y.onload=T,y.onerror=C}),bt(p,"link",c),a.instance=p}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,s),(s=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=Eo.bind(t),s.addEventListener("load",a),s.addEventListener("error",a))}}var Qf=0;function Qw(t,s){return t.stylesheets&&t.count===0&&Ao(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var c=setTimeout(function(){if(t.stylesheets&&Ao(t,t.stylesheets),t.unsuspend){var p=t.unsuspend;t.unsuspend=null,p()}},6e4+s);0<t.imgBytes&&Qf===0&&(Qf=62500*kw());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Ao(t,t.stylesheets),t.unsuspend)){var p=t.unsuspend;t.unsuspend=null,p()}},(t.imgBytes>Qf?50:800)+s);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(h)}}:null}function Eo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ao(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var To=null;function Ao(t,s){t.stylesheets=null,t.unsuspend!==null&&(t.count++,To=new Map,s.forEach(Pw,t),To=null,Eo.call(t))}function Pw(t,s){if(!(s.state.loading&4)){var a=To.get(t);if(a)var c=a.get(null);else{a=new Map,To.set(t,a);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<h.length;p++){var y=h[p];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),c=y)}c&&a.set(null,c)}h=s.instance,y=h.getAttribute("data-precedence"),p=a.get(y)||c,p===c&&a.set(null,h),a.set(y,h),this.count++,c=Eo.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),p?p.parentNode.insertBefore(h,p.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),s.state.loading|=4}}var Na={$$typeof:$,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function Jw(t,s,a,c,h,p,y,T,C){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=Vc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vc(0),this.hiddenUpdates=Vc(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=p,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function My(t,s,a,c,h,p,y,T,C,z,K,Q){return t=new Jw(t,s,a,y,C,z,K,Q,T),s=1,p===!0&&(s|=24),p=Yt(3,null,null,s),t.current=p,p.stateNode=t,s=Cu(),s.refCount++,t.pooledCache=s,s.refCount++,p.memoizedState={element:c,isDehydrated:a,cache:s},Ou(p),t}function Oy(t){return t?(t=Ds,t):Ds}function jy(t,s,a,c,h,p){h=Oy(h),c.context===null?c.context=h:c.pendingContext=h,c=mi(s),c.payload={element:a},p=p===void 0?null:p,p!==null&&(c.callback=p),a=yi(t,c,s),a!==null&&(Ht(a,t,s),aa(a,t,s))}function Ly(t,s){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<s?a:s}}function Pf(t,s){Ly(t,s),(t=t.alternate)&&Ly(t,s)}function Ry(t){if(t.tag===13||t.tag===31){var s=Fi(t,67108864);s!==null&&Ht(s,t,67108864),Pf(t,67108864)}}function Dy(t){if(t.tag===13||t.tag===31){var s=Zt();s=Gc(s);var a=Fi(t,s);a!==null&&Ht(a,t,s),Pf(t,s)}}var Co=!0;function Zw(t,s,a,c){var h=I.T;I.T=null;var p=J.p;try{J.p=2,Jf(t,s,a,c)}finally{J.p=p,I.T=h}}function Ww(t,s,a,c){var h=I.T;I.T=null;var p=J.p;try{J.p=8,Jf(t,s,a,c)}finally{J.p=p,I.T=h}}function Jf(t,s,a,c){if(Co){var h=Zf(c);if(h===null)Uf(t,s,c,No,a),Uy(t,c);else if(tx(h,t,s,a,c))c.stopPropagation();else if(Uy(t,c),s&4&&-1<ex.indexOf(t)){for(;h!==null;){var p=Es(h);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var y=Vi(p.pendingLanes);if(y!==0){var T=p;for(T.pendingLanes|=2,T.entangledLanes|=2;y;){var C=1<<31-kt(y);T.entanglements[1]|=C,y&=~C}Mn(p),(Ce&6)===0&&(co=Ct()+500,xa(0))}}break;case 31:case 13:T=Fi(p,2),T!==null&&Ht(T,p,2),fo(),Pf(p,2)}if(p=Zf(c),p===null&&Uf(t,s,c,No,a),p===h)break;h=p}h!==null&&c.stopPropagation()}else Uf(t,s,c,null,a)}}function Zf(t){return t=Wc(t),Wf(t)}var No=null;function Wf(t){if(No=null,t=_s(t),t!==null){var s=o(t);if(s===null)t=null;else{var a=s.tag;if(a===13){if(t=u(s),t!==null)return t;t=null}else if(a===31){if(t=f(s),t!==null)return t;t=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;t=null}else s!==t&&(t=null)}}return No=t,null}function zy(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(qc()){case gl:return 2;case qr:return 8;case oi:case $c:return 32;case ml:return 268435456;default:return 32}default:return 32}}var eh=!1,Ni=null,ki=null,Mi=null,ka=new Map,Ma=new Map,Oi=[],ex="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 Uy(t,s){switch(t){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":ki=null;break;case"mouseover":case"mouseout":Mi=null;break;case"pointerover":case"pointerout":ka.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ma.delete(s.pointerId)}}function Oa(t,s,a,c,h,p){return t===null||t.nativeEvent!==p?(t={blockedOn:s,domEventName:a,eventSystemFlags:c,nativeEvent:p,targetContainers:[h]},s!==null&&(s=Es(s),s!==null&&Ry(s)),t):(t.eventSystemFlags|=c,s=t.targetContainers,h!==null&&s.indexOf(h)===-1&&s.push(h),t)}function tx(t,s,a,c,h){switch(s){case"focusin":return Ni=Oa(Ni,t,s,a,c,h),!0;case"dragenter":return ki=Oa(ki,t,s,a,c,h),!0;case"mouseover":return Mi=Oa(Mi,t,s,a,c,h),!0;case"pointerover":var p=h.pointerId;return ka.set(p,Oa(ka.get(p)||null,t,s,a,c,h)),!0;case"gotpointercapture":return p=h.pointerId,Ma.set(p,Oa(Ma.get(p)||null,t,s,a,c,h)),!0}return!1}function Hy(t){var s=_s(t.target);if(s!==null){var a=o(s);if(a!==null){if(s=a.tag,s===13){if(s=u(a),s!==null){t.blockedOn=s,Zd(t.priority,function(){Dy(a)});return}}else if(s===31){if(s=f(a),s!==null){t.blockedOn=s,Zd(t.priority,function(){Dy(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ko(t){if(t.blockedOn!==null)return!1;for(var s=t.targetContainers;0<s.length;){var a=Zf(t.nativeEvent);if(a===null){a=t.nativeEvent;var c=new a.constructor(a.type,a);Zc=c,a.target.dispatchEvent(c),Zc=null}else return s=Es(a),s!==null&&Ry(s),t.blockedOn=a,!1;s.shift()}return!0}function By(t,s,a){ko(t)&&a.delete(s)}function nx(){eh=!1,Ni!==null&&ko(Ni)&&(Ni=null),ki!==null&&ko(ki)&&(ki=null),Mi!==null&&ko(Mi)&&(Mi=null),ka.forEach(By),Ma.forEach(By)}function Mo(t,s){t.blockedOn===s&&(t.blockedOn=null,eh||(eh=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,nx)))}var Oo=null;function qy(t){Oo!==t&&(Oo=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Oo===t&&(Oo=null);for(var s=0;s<t.length;s+=3){var a=t[s],c=t[s+1],h=t[s+2];if(typeof c!="function"){if(Wf(c||a)===null)continue;break}var p=Es(a);p!==null&&(t.splice(s,3),s-=3,Ju(p,{pending:!0,data:h,method:a.method,action:c},c,h))}}))}function rr(t){function s(C){return Mo(C,t)}Ni!==null&&Mo(Ni,t),ki!==null&&Mo(ki,t),Mi!==null&&Mo(Mi,t),ka.forEach(s),Ma.forEach(s);for(var a=0;a<Oi.length;a++){var c=Oi[a];c.blockedOn===t&&(c.blockedOn=null)}for(;0<Oi.length&&(a=Oi[0],a.blockedOn===null);)Hy(a),a.blockedOn===null&&Oi.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(c=0;c<a.length;c+=3){var h=a[c],p=a[c+1],y=h[jt]||null;if(typeof p=="function")y||qy(a);else if(y){var T=null;if(p&&p.hasAttribute("formAction")){if(h=p,y=p[jt]||null)T=y.formAction;else if(Wf(h)!==null)continue}else T=y.action;typeof T=="function"?a[c+1]=T:(a.splice(c,3),c-=3),qy(a)}}}function $y(){function t(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(y){return h=y})},focusReset:"manual",scroll:"manual"})}function s(){h!==null&&(h(),h=null),c||setTimeout(a,20)}function a(){if(!c&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(a,100),function(){c=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),h!==null&&(h(),h=null)}}}function th(t){this._internalRoot=t}jo.prototype.render=th.prototype.render=function(t){var s=this._internalRoot;if(s===null)throw Error(r(409));var a=s.current,c=Zt();jy(a,c,t,s,null,null)},jo.prototype.unmount=th.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var s=t.containerInfo;jy(t.current,2,null,t,null,null),fo(),s[xs]=null}};function jo(t){this._internalRoot=t}jo.prototype.unstable_scheduleHydration=function(t){if(t){var s=Jd();t={blockedOn:null,target:t,priority:s};for(var a=0;a<Oi.length&&s!==0&&s<Oi[a].priority;a++);Oi.splice(a,0,t),a===0&&Hy(t)}};var Iy=e.version;if(Iy!=="19.2.1")throw Error(r(527,Iy,"19.2.1"));J.findDOMNode=function(t){var s=t._reactInternals;if(s===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=g(s),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var ix={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lo.isDisabled&&Lo.supportsFiber)try{Tn=Lo.inject(ix),Nt=Lo}catch{}}return La.createRoot=function(t,s){if(!l(t))throw Error(r(299));var a=!1,c="",h=Qg,p=Pg,y=Jg;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(h=s.onUncaughtError),s.onCaughtError!==void 0&&(p=s.onCaughtError),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),s=My(t,1,!1,null,null,a,c,null,h,p,y,$y),t[xs]=s.current,zf(t),new th(s)},La.hydrateRoot=function(t,s,a){if(!l(t))throw Error(r(299));var c=!1,h="",p=Qg,y=Pg,T=Jg,C=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError),a.formState!==void 0&&(C=a.formState)),s=My(t,1,!0,s,a??null,c,h,C,p,y,T,$y),s.context=Oy(null),a=s.current,c=Zt(),c=Gc(c),h=mi(c),h.callback=null,yi(a,h,c),a=c,s.current.lanes=a,Ir(s,a),Mn(s),t[xs]=s.current,zf(t),new jo(s)},La.version="19.2.1",La}var eb;function xx(){if(eb)return sh.exports;eb=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(),sh.exports=wx(),sh.exports}var E2=xx();const _x=new Map([["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{title:"Wait"}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{title:"Execute shell command",group:"configuration"}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{title:"Connect to Web View"}],["AndroidDevice.close",{internal:!0}],["APIRequestContext.fetch",{title:'{method} "{url}"'}],["APIRequestContext.fetchResponseBody",{title:"Get response body",group:"getter"}],["APIRequestContext.fetchLog",{internal:!0}],["APIRequestContext.storageState",{title:"Get storage state",group:"configuration"}],["APIRequestContext.disposeAPIResponse",{internal:!0}],["APIRequestContext.dispose",{internal:!0}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["Browser.startServer",{title:"Start server"}],["Browser.stopServer",{title:"Stop server"}],["Browser.close",{title:"Close browser",pause:!0}],["Browser.killForTests",{internal:!0}],["Browser.defaultUserAgentForTest",{internal:!0}],["Browser.newContext",{title:"Create context"}],["Browser.newContextForReuse",{internal:!0}],["Browser.disconnectFromReusedContext",{internal:!0}],["Browser.newBrowserCDPSession",{title:"Create CDP session",group:"configuration"}],["Browser.startTracing",{title:"Start browser tracing",group:"configuration"}],["Browser.stopTracing",{title:"Stop browser tracing",group:"configuration"}],["BrowserContext.addCookies",{title:"Add cookies",group:"configuration"}],["BrowserContext.addInitScript",{title:"Add init script",group:"configuration"}],["BrowserContext.clearCookies",{title:"Clear cookies",group:"configuration"}],["BrowserContext.clearPermissions",{title:"Clear permissions",group:"configuration"}],["BrowserContext.close",{title:"Close context",pause:!0}],["BrowserContext.cookies",{title:"Get cookies",group:"getter"}],["BrowserContext.exposeBinding",{title:"Expose binding",group:"configuration"}],["BrowserContext.grantPermissions",{title:"Grant permissions",group:"configuration"}],["BrowserContext.newPage",{title:"Create page"}],["BrowserContext.registerSelectorEngine",{internal:!0}],["BrowserContext.setTestIdAttributeName",{internal:!0}],["BrowserContext.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["BrowserContext.setGeolocation",{title:"Set geolocation",group:"configuration"}],["BrowserContext.setHTTPCredentials",{title:"Set HTTP credentials",group:"configuration"}],["BrowserContext.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["BrowserContext.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["BrowserContext.setOffline",{title:"Set offline mode"}],["BrowserContext.storageState",{title:"Get storage state",group:"configuration"}],["BrowserContext.setStorageState",{title:"Set storage state",group:"configuration"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.exposeConsoleApi",{internal:!0}],["BrowserContext.newCDPSession",{title:"Create CDP session",group:"configuration"}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["BrowserType.launch",{title:"Launch browser"}],["BrowserType.launchPersistentContext",{title:"Launch persistent context"}],["BrowserType.connectOverCDP",{title:"Connect over CDP"}],["BrowserType.connectToWorker",{title:"Connect to worker"}],["Disposable.dispose",{internal:!0}],["EventTarget.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Page.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Debugger.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Worker.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0,pause:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pause:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0,pause:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0,pause:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",group:"getter"}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0,pause:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.content",{title:"Get content",snapshot:!0,pause:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.drop",{title:"Drop files or data onto an element",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0,pause:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0,pause:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pause:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0,pause:!0}],["Frame.frameElement",{title:"Get frame element",group:"getter"}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{internal:!0}],["Frame.hideHighlight",{internal:!0}],["Frame.getAttribute",{title:'Get attribute "{name}"',snapshot:!0,pause:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0,pause:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,pause:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,pause:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,pause:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,pause:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,pause:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,pause:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,pause:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,pause:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,pause:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0,pause:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.setContent",{title:"Set content",snapshot:!0,pause:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,pause:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0,pause:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0,pause:!0}],["JSHandle.dispose",{internal:!0}],["ElementHandle.dispose",{internal:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pause:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pause:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pause:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pause:!0}],["JSHandle.getPropertyList",{title:"Get property list",group:"getter"}],["ElementHandle.getPropertyList",{title:"Get property list",group:"getter"}],["JSHandle.getProperty",{title:"Get JS property",group:"getter"}],["ElementHandle.getProperty",{title:"Get JS property",group:"getter"}],["JSHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0,pause:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pause:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0,pause:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.contentFrame",{title:"Get content frame",group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0,pause:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0,pause:!0}],["ElementHandle.getAttribute",{title:"Get attribute",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0,pause:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0,pause:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0,pause:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0,pause:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["LocalUtils.zip",{internal:!0}],["LocalUtils.harOpen",{internal:!0}],["LocalUtils.harLookup",{internal:!0}],["LocalUtils.harClose",{internal:!0}],["LocalUtils.harUnzip",{internal:!0}],["LocalUtils.connect",{internal:!0}],["LocalUtils.tracingStarted",{internal:!0}],["LocalUtils.addStackToTracingNoReply",{internal:!0}],["LocalUtils.traceDiscarded",{internal:!0}],["LocalUtils.globToRegex",{internal:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{title:"Abort request",group:"route"}],["Route.continue",{title:"Continue request",group:"route"}],["Route.fulfill",{title:"Fulfill request",group:"route"}],["WebSocketRoute.connect",{title:"Connect WebSocket to server",group:"route"}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.sendToServer",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{title:"Get response body",group:"getter"}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.httpVersion",{internal:!0}],["Response.sizes",{internal:!0}],["Page.addInitScript",{title:"Add init script",group:"configuration"}],["Page.close",{title:"Close page",pause:!0}],["Page.clearConsoleMessages",{title:"Clear console messages"}],["Page.consoleMessages",{title:"Get console messages",group:"getter"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0,pause:!0}],["Page.exposeBinding",{title:"Expose binding",group:"configuration"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0,pause:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0,pause:!0}],["Page.requestGC",{title:"Request garbage collection",group:"configuration"}],["Page.registerLocatorHandler",{title:"Register locator handler"}],["Page.resolveLocatorHandlerNoReply",{internal:!0}],["Page.unregisterLocatorHandler",{title:"Unregister locator handler"}],["Page.reload",{title:"Reload",slowMo:!0,snapshot:!0,pause:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0,pause:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0,pause:!0}],["Page.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["Page.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["Page.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["Page.setViewportSize",{title:"Set viewport size",snapshot:!0,pause:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.clearPageErrors",{title:"Clear page errors"}],["Page.pageErrors",{title:"Get page errors",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.requests",{title:"Get network requests",group:"getter"}],["Page.startJSCoverage",{title:"Start JS coverage",group:"configuration"}],["Page.stopJSCoverage",{title:"Stop JS coverage",group:"configuration"}],["Page.startCSSCoverage",{title:"Start CSS coverage",group:"configuration"}],["Page.stopCSSCoverage",{title:"Stop CSS coverage",group:"configuration"}],["Page.bringToFront",{title:"Bring to front"}],["Page.pickLocator",{title:"Pick locator",group:"configuration"}],["Page.cancelPickLocator",{title:"Cancel pick locator",group:"configuration"}],["Page.hideHighlight",{title:"Hide all element highlights",group:"configuration"}],["Page.screencastShowOverlay",{title:"Show overlay",group:"configuration"}],["Page.screencastRemoveOverlay",{title:"Remove overlay",group:"configuration"}],["Page.screencastChapter",{title:"Show chapter overlay",group:"configuration"}],["Page.screencastSetOverlayVisible",{title:"Set overlay visibility",group:"configuration"}],["Page.screencastShowActions",{title:"Show actions",group:"configuration"}],["Page.screencastHideActions",{title:"Remove actions",group:"configuration"}],["Page.screencastStart",{title:"Start screencast",group:"configuration"}],["Page.screencastStop",{title:"Stop screencast",group:"configuration"}],["Page.updateSubscription",{internal:!0}],["Page.setDockTile",{internal:!0}],["Root.initialize",{internal:!0}],["Playwright.newRequest",{title:"Create request context"}],["DebugController.initialize",{internal:!0}],["DebugController.setReportStateChanged",{internal:!0}],["DebugController.setRecorderMode",{internal:!0}],["DebugController.highlight",{internal:!0}],["DebugController.hideHighlight",{internal:!0}],["DebugController.resume",{internal:!0}],["DebugController.kill",{internal:!0}],["SocksSupport.socksConnected",{internal:!0}],["SocksSupport.socksFailed",{internal:!0}],["SocksSupport.socksData",{internal:!0}],["SocksSupport.socksError",{internal:!0}],["SocksSupport.socksEnd",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}],["CDPSession.send",{title:"Send CDP command",group:"configuration"}],["CDPSession.detach",{title:"Detach CDP session",group:"configuration"}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Debugger.requestPause",{title:"Pause on next call",group:"configuration"}],["Debugger.resume",{title:"Resume",group:"configuration"}],["Debugger.next",{title:"Step to next call",group:"configuration"}],["Debugger.runTo",{title:"Run to location",group:"configuration"}],["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"}],["Tracing.harStart",{internal:!0}],["Tracing.harExport",{internal:!0}],["Worker.disconnect",{title:"Disconnect from worker"}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["Worker.updateSubscription",{internal:!0}]]);function ed(n){return _x.get(n.type+"."+n.method)}function c0(n,e){var i;return(i=Ex(n,e))==null?void 0:i.replaceAll(`
`,"\\n")}function Ex(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:["about:","chrome:","edge:"].includes(l.protocol)?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 r=Tx(n,i);if(r!==void 0)return r}}function Tx(n,e){const i=e.split(".");let r=n;for(const l of i){if(typeof r!="object"||r===null)return;r=r[l]}if(r!==void 0)return String(r)}function Ax(n){var i;return(n.title??((i=ed(n))==null?void 0:i.title)??n.method).replace(/\{([^}]+)\}/g,(r,l)=>c0(n.params,l)??r)}function Cx(n){var e;return(e=ed(n))==null?void 0:e.group}const Ia=Symbol("context"),u0=Symbol("nextInContext"),f0=Symbol("prevByEndTime"),h0=Symbol("nextByStartTime"),tb=Symbol("events");class T2{constructor(e,i){var l,o;i.forEach(u=>Nx(u));const r=i.find(u=>u.origin==="library");this.traceUri=e,this.browserName=(r==null?void 0:r.browserName)||"",this.sdkLanguage=r==null?void 0:r.sdkLanguage,this.channel=r==null?void 0:r.channel,this.testIdAttributeName=r==null?void 0:r.testIdAttributeName,this.platform=(r==null?void 0:r.platform)||"",this.playwrightVersion=(l=i.find(u=>u.playwrightVersion))==null?void 0:l.playwrightVersion,this.title=(r==null?void 0:r.title)||"",this.options=(r==null?void 0:r.options)||{},this.testTimeout=(o=i.find(u=>u.origin==="testRunner"))==null?void 0:o.testTimeout,this.actions=kx(i),this.pages=[].concat(...i.map(u=>u.pages)),this.wallTime=i.map(u=>u.wallTime).reduce((u,f)=>Math.min(u||Number.MAX_VALUE,f),Number.MAX_VALUE),this.startTime=i.map(u=>u.startTime).reduce((u,f)=>Math.min(u,f),Number.MAX_VALUE),this.endTime=i.map(u=>u.endTime).reduce((u,f)=>Math.max(u,f),Number.MIN_VALUE),this.events=[].concat(...i.map(u=>u.events)),this.stdio=[].concat(...i.map(u=>u.stdio)),this.errors=[].concat(...i.map(u=>u.errors)),this.hasSource=i.some(u=>u.hasSource),this.hasStepData=i.some(u=>u.origin==="testRunner"),this.resources=[...i.map(u=>u.resources)].flat().map(u=>({...u,id:`${u.pageref}-${u.startedDateTime}-${u.request.url}`})),this.attachments=this.actions.flatMap(u=>{var f;return((f=u.attachments)==null?void 0:f.map(d=>({...d,callId:u.callId,traceUri:e})))??[]}),this.visibleAttachments=this.attachments.filter(u=>!u.name.startsWith("_")),this.events.sort((u,f)=>u.time-f.time),this.resources.sort((u,f)=>u._monotonicTime-f._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=zx(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const u of this.actions)u.group=u.group??Cx({type:u.class,method:u.method}),u.group&&this.actionCounters.set(u.group,1+(this.actionCounters.get(u.group)||0))}createRelativeUrl(e){const i=new URL("http://localhost/"+e);return i.searchParams.set("trace",this.traceUri),i.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const i=new Set(e);return this.actions.filter(r=>!r.group||i.has(r.group))}renderActionTree(e){const i=this.filteredActions(e??[]),{rootItem:r}=d0(i),l=[],o=(u,f)=>{const d=Ax({...u.action,type:u.action.class});l.push(`${f}${d||u.id}`);for(const g of u.children)o(g,f+"  ")};return r.children.forEach(u=>o(u,"")),l}_errorDescriptorsFromActions(){var i;const e=[];for(const r of this.actions||[])(i=r.error)!=null&&i.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,i)=>({stack:e.stack,message:e.message}))}}function Nx(n){for(const i of n.pages)i[Ia]=n;for(let i=0;i<n.actions.length;++i){const r=n.actions[i];r[Ia]=n}let e;for(let i=n.actions.length-1;i>=0;i--){const r=n.actions[i];r[u0]=e,r.class!=="Route"&&(e=r)}for(const i of n.events)i[Ia]=n;for(const i of n.resources)i[Ia]=n}function kx(n){const e=[],i=Mx(n);e.push(...i),e.sort((r,l)=>l.parentId===r.callId?1:r.parentId===l.callId?-1:r.endTime-l.endTime);for(let r=1;r<e.length;++r)e[r][f0]=e[r-1];e.sort((r,l)=>l.parentId===r.callId?-1:r.parentId===l.callId?1:r.startTime-l.startTime);for(let r=0;r+1<e.length;++r)e[r][h0]=e[r+1];return e}let nb=0;function Mx(n){const e=new Map,i=n.filter(u=>u.origin==="library"),r=n.filter(u=>u.origin==="testRunner");if(!r.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@${++nb}`,{...f,context:u});const l=jx(r,e);l&&Ox(i,l);const o=new Map;for(const u of r)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@${++nb}`,{...f,context:u})}return[...e.values()]}function Ox(n,e){for(const i of n){i.startTime+=e,i.endTime+=e;for(const r of i.actions)r.startTime&&(r.startTime+=e),r.endTime&&(r.endTime+=e);for(const r of i.events)r.time+=e;for(const r of i.stdio)r.timestamp+=e;for(const r of i.pages)for(const l of r.screencastFrames)l.timestamp+=e;for(const r of i.resources)r._monotonicTime&&(r._monotonicTime+=e)}}function jx(n,e){for(const i of n)for(const r of i.actions){if(!r.startTime)continue;const l=r.stepId?e.get(r.stepId):void 0;if(l)return r.startTime-l.startTime}return 0}function d0(n){const e=new Map;for(const l of n)e.set(l.callId,{id:l.callId,parent:void 0,children:[],action:l});const i={action:{...Ux},id:"",parent:void 0,children:[]};for(const l of e.values()){i.action.startTime=Math.min(i.action.startTime,l.action.startTime),i.action.endTime=Math.max(i.action.endTime,l.action.endTime);const o=l.action.parentId&&e.get(l.action.parentId)||i;o.children.push(l),l.parent=o}const r=l=>{for(const o of l.children)o.action.stack=o.action.stack??l.action.stack,r(o)};return r(i),{rootItem:i,itemMap:e}}function p0(n){return n[Ia]}function Lx(n){return n[u0]}function ib(n){return n[f0]}function sb(n){return n[h0]}function Rx(n){let e=0,i=0;for(const r of Dx(n)){if(r.type==="console"){const l=r.messageType;l==="warning"?++i:l==="error"&&++e}r.type==="event"&&r.method==="pageError"&&++e}return{errors:e,warnings:i}}function Dx(n){let e=n[tb];if(e)return e;const i=Lx(n);return e=p0(n).events.filter(r=>r.time>=n.startTime&&(!i||r.time<i.startTime)),n[tb]=e,e}function zx(n,e){var r;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||(r=i.get(u[0].file))==null||r.errors.push({line:u[0].line||0,message:f})}return i}const Ux={type:"action",callId:"",startTime:0,endTime:0,class:"",method:"",params:{},log:[],context:{origin:"library",startTime:0,endTime:0,browserName:"",wallTime:0,options:{},pages:[],resources:[],actions:[],events:[],stdio:[],errors:[],hasSource:!1,contextId:""}},Hx=50,sc=({sidebarSize:n,sidebarHidden:e=!1,sidebarIsFirst:i=!1,orientation:r="vertical",minSidebarSize:l=Hx,settingName:o,sidebar:u,main:f})=>{const d=Math.max(l,n)*window.devicePixelRatio,[g,b]=Gt(o?o+"."+r+":size":void 0,d),[m,S]=Gt(o?o+"."+r+":size":void 0,d),[w,E]=R.useState(null),[x,_]=ys();let A;r==="vertical"?(A=m/window.devicePixelRatio,x&&x.height<A&&(A=x.height-10)):(A=g/window.devicePixelRatio,x&&x.width<A&&(A=x.width-10)),document.body.style.userSelect=w?"none":"inherit";let N={};return r==="vertical"?i?N={top:w?0:A-4,bottom:w?0:void 0,height:w?"initial":8}:N={bottom:w?0:A-4,top:w?0:void 0,height:w?"initial":8}:i?N={left:w?0:A-4,right:w?0:void 0,width:w?"initial":8}:N={right:w?0:A-4,left:w?0:void 0,width:w?"initial":8},v.jsxs("div",{className:at("split-view",r,i&&"sidebar-first"),ref:_,children:[v.jsx("div",{className:"split-view-main",children:f}),!e&&v.jsx("div",{style:{flexBasis:A},className:"split-view-sidebar",children:u}),!e&&v.jsx("div",{style:N,className:"split-view-resizer",onMouseDown:$=>E({offset:r==="vertical"?$.clientY:$.clientX,size:A}),onMouseUp:()=>E(null),onMouseMove:$=>{if(!$.buttons)E(null);else if(w){const X=(r==="vertical"?$.clientY:$.clientX)-w.offset,U=i?w.size+X:w.size-X,B=$.target.parentElement.getBoundingClientRect(),O=Math.min(Math.max(l,U),(r==="vertical"?B.height:B.width)-l);r==="vertical"?S(O*window.devicePixelRatio):b(O*window.devicePixelRatio)}}})]})};function St(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0ms";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 r=i/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function Bx(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"}const rt=function(n,e,i){return n>=e&&n<=i};function Bt(n){return rt(n,48,57)}function rb(n){return Bt(n)||rt(n,65,70)||rt(n,97,102)}function qx(n){return rt(n,65,90)}function $x(n){return rt(n,97,122)}function Ix(n){return qx(n)||$x(n)}function Vx(n){return n>=128}function Ko(n){return Ix(n)||Vx(n)||n===95}function ab(n){return Ko(n)||Bt(n)||n===45}function Gx(n){return rt(n,0,8)||n===11||rt(n,14,31)||n===127}function Xo(n){return n===10}function Zn(n){return Xo(n)||n===9||n===32}const Kx=1114111;class td extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function Xx(n){const e=[];for(let i=0;i<n.length;i++){let r=n.charCodeAt(i);if(r===13&&n.charCodeAt(i+1)===10&&(r=10,i++),(r===13||r===12)&&(r=10),r===0&&(r=65533),rt(r,55296,56319)&&rt(n.charCodeAt(i+1),56320,57343)){const l=r-55296,o=n.charCodeAt(i+1)-56320;r=Math.pow(2,16)+l*Math.pow(2,10)+o,i++}e.push(r)}return e}function ct(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 g0(n){const e=Xx(n);let i=-1;const r=[];let l;const o=function(V){return V>=e.length?-1:e[V]},u=function(V){if(V===void 0&&(V=1),V>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(i+V)},f=function(V){return V===void 0&&(V=1),i+=V,l=o(i),!0},d=function(){return i-=1,!0},g=function(V){return V===void 0&&(V=l),V===-1},b=function(){if(m(),f(),Zn(l)){for(;Zn(u());)f();return new rc}else{if(l===34)return E();if(l===35)if(ab(u())||A(u(1),u(2))){const V=new N0("");return $(u(1),u(2),u(3))&&(V.type="id"),V.value=L(),V}else return new vt(l);else return l===36?u()===61?(f(),new Px):new vt(l):l===39?E():l===40?new T0:l===41?new nd:l===42?u()===61?(f(),new Jx):new vt(l):l===43?U()?(d(),S()):new vt(l):l===44?new w0:l===45?U()?(d(),S()):u(1)===45&&u(2)===62?(f(2),new b0):G()?(d(),w()):new vt(l):l===46?U()?(d(),S()):new vt(l):l===58?new v0:l===59?new S0:l===60?u(1)===33&&u(2)===45&&u(3)===45?(f(3),new y0):new vt(l):l===64?$(u(1),u(2),u(3))?new C0(L()):new vt(l):l===91?new E0:l===92?N()?(d(),w()):new vt(l):l===93?new Mh:l===94?u()===61?(f(),new Qx):new vt(l):l===123?new x0:l===124?u()===61?(f(),new Fx):u()===124?(f(),new A0):new vt(l):l===125?new _0:l===126?u()===61?(f(),new Yx):new vt(l):Bt(l)?(d(),S()):Ko(l)?(d(),w()):g()?new Fo:new vt(l)}},m=function(){for(;u(1)===47&&u(2)===42;)for(f(2);;)if(f(),l===42&&u()===47){f();break}else if(g())return},S=function(){const V=B();if($(u(1),u(2),u(3))){const W=new Zx;return W.value=V.value,W.repr=V.repr,W.type=V.type,W.unit=L(),W}else if(u()===37){f();const W=new O0;return W.value=V.value,W.repr=V.repr,W}else{const W=new M0;return W.value=V.value,W.repr=V.repr,W.type=V.type,W}},w=function(){const V=L();if(V.toLowerCase()==="url"&&u()===40){for(f();Zn(u(1))&&Zn(u(2));)f();return u()===34||u()===39?new Fa(V):Zn(u())&&(u(2)===34||u(2)===39)?new Fa(V):x()}else return u()===40?(f(),new Fa(V)):new id(V)},E=function(V){V===void 0&&(V=l);let W="";for(;f();){if(l===V||g())return new sd(W);if(Xo(l))return d(),new m0;l===92?g(u())||(Xo(u())?f():W+=ct(_())):W+=ct(l)}throw new Error("Internal error")},x=function(){const V=new k0("");for(;Zn(u());)f();if(g(u()))return V;for(;f();){if(l===41||g())return V;if(Zn(l)){for(;Zn(u());)f();return u()===41||g(u())?(f(),V):(ne(),new Yo)}else{if(l===34||l===39||l===40||Gx(l))return ne(),new Yo;if(l===92)if(N())V.value+=ct(_());else return ne(),new Yo;else V.value+=ct(l)}}throw new Error("Internal error")},_=function(){if(f(),rb(l)){const V=[l];for(let ge=0;ge<5&&rb(u());ge++)f(),V.push(l);Zn(u())&&f();let W=parseInt(V.map(function(ge){return String.fromCharCode(ge)}).join(""),16);return W>Kx&&(W=65533),W}else return g()?65533:l},A=function(V,W){return!(V!==92||Xo(W))},N=function(){return A(l,u())},$=function(V,W,ge){return V===45?Ko(W)||W===45||A(W,ge):Ko(V)?!0:V===92?A(V,W):!1},G=function(){return $(l,u(1),u(2))},X=function(V,W,ge){return V===43||V===45?!!(Bt(W)||W===46&&Bt(ge)):V===46?!!Bt(W):!!Bt(V)},U=function(){return X(l,u(1),u(2))},L=function(){let V="";for(;f();)if(ab(l))V+=ct(l);else if(N())V+=ct(_());else return d(),V;throw new Error("Internal parse error")},B=function(){let V="",W="integer";for((u()===43||u()===45)&&(f(),V+=ct(l));Bt(u());)f(),V+=ct(l);if(u(1)===46&&Bt(u(2)))for(f(),V+=ct(l),f(),V+=ct(l),W="number";Bt(u());)f(),V+=ct(l);const ge=u(1),Ue=u(2),I=u(3);if((ge===69||ge===101)&&Bt(Ue))for(f(),V+=ct(l),f(),V+=ct(l),W="number";Bt(u());)f(),V+=ct(l);else if((ge===69||ge===101)&&(Ue===43||Ue===45)&&Bt(I))for(f(),V+=ct(l),f(),V+=ct(l),f(),V+=ct(l),W="number";Bt(u());)f(),V+=ct(l);const J=O(V);return{type:W,value:J,repr:V}},O=function(V){return+V},ne=function(){for(;f();){if(l===41||g())return;N()&&_()}};let te=0;for(;!g(u());)if(r.push(b()),te++,te>e.length*2)throw new Error("I'm infinite-looping!");return r}class et{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class m0 extends et{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Yo extends et{constructor(){super(...arguments),this.tokenType="BADURL"}}class rc extends et{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class y0 extends et{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class b0 extends et{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class v0 extends et{constructor(){super(...arguments),this.tokenType=":"}}class S0 extends et{constructor(){super(...arguments),this.tokenType=";"}}class w0 extends et{constructor(){super(...arguments),this.tokenType=","}}class kr extends et{constructor(){super(...arguments),this.value="",this.mirror=""}}class x0 extends kr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class _0 extends kr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class E0 extends kr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Mh extends kr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class T0 extends kr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class nd extends kr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class Yx extends et{constructor(){super(...arguments),this.tokenType="~="}}class Fx extends et{constructor(){super(...arguments),this.tokenType="|="}}class Qx extends et{constructor(){super(...arguments),this.tokenType="^="}}class Px extends et{constructor(){super(...arguments),this.tokenType="$="}}class Jx extends et{constructor(){super(...arguments),this.tokenType="*="}}class A0 extends et{constructor(){super(...arguments),this.tokenType="||"}}class Fo extends et{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class vt extends et{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=ct(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==="\\"?`\\
`:this.value}}class Mr extends et{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 id extends Mr{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return ul(this.value)}}class Fa extends Mr{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return ul(this.value)+"("}}class C0 extends Mr{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+ul(this.value)}}class N0 extends Mr{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"?"#"+ul(this.value):"#"+Wx(this.value)}}class sd extends Mr{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+j0(this.value)+'"'}}class k0 extends Mr{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+j0(this.value)+'")'}}class M0 extends et{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 O0 extends et{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 Zx extends et{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=ul(this.unit);return i[0].toLowerCase()==="e"&&(i[1]==="-"||rt(i.charCodeAt(1),48,57))&&(i="\\65 "+i.slice(1,i.length)),e+i}}function ul(n){n=""+n;let e="";const i=n.charCodeAt(0);for(let r=0;r<n.length;r++){const l=n.charCodeAt(r);if(l===0)throw new td("Invalid character: the input contains U+0000.");rt(l,1,31)||l===127||r===0&&rt(l,48,57)||r===1&&rt(l,48,57)&&i===45?e+="\\"+l.toString(16)+" ":l>=128||l===45||l===95||rt(l,48,57)||rt(l,65,90)||rt(l,97,122)?e+=n[r]:e+="\\"+n[r]}return e}function Wx(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const r=n.charCodeAt(i);if(r===0)throw new td("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||rt(r,48,57)||rt(r,65,90)||rt(r,97,122)?e+=n[i]:e+="\\"+r.toString(16)+" "}return e}function j0(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const r=n.charCodeAt(i);if(r===0)throw new td("Invalid character: the input contains U+0000.");rt(r,1,31)||r===127?e+="\\"+r.toString(16)+" ":r===34||r===92?e+="\\"+n[i]:e+=n[i]}return e}class qt extends Error{}function e_(n,e){let i;try{i=g0(n),i[i.length-1]instanceof Fo||i.push(new Fo)}catch(O){const ne=O.message+` while parsing css selector "${n}". Did you mean to CSS.escape it?`,te=(O.stack||"").indexOf(O.message);throw te!==-1&&(O.stack=O.stack.substring(0,te)+ne+O.stack.substring(te+O.message.length)),O.message=ne,O}const r=i.find(O=>O instanceof C0||O instanceof m0||O instanceof Yo||O instanceof A0||O instanceof y0||O instanceof b0||O instanceof S0||O instanceof x0||O instanceof _0||O instanceof k0||O instanceof O0);if(r)throw new qt(`Unsupported token "${r.toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`);let l=0;const o=new Set;function u(){return new qt(`Unexpected token "${i[l].toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`)}function f(){for(;i[l]instanceof rc;)l++}function d(O=l){return i[O]instanceof id}function g(O=l){return i[O]instanceof sd}function b(O=l){return i[O]instanceof M0}function m(O=l){return i[O]instanceof w0}function S(O=l){return i[O]instanceof T0}function w(O=l){return i[O]instanceof nd}function E(O=l){return i[O]instanceof Fa}function x(O=l){return i[O]instanceof vt&&i[O].value==="*"}function _(O=l){return i[O]instanceof Fo}function A(O=l){return i[O]instanceof vt&&[">","+","~"].includes(i[O].value)}function N(O=l){return m(O)||w(O)||_(O)||A(O)||i[O]instanceof rc}function $(){const O=[G()];for(;f(),!!m();)l++,O.push(G());return O}function G(){return f(),b()||g()?i[l++].value:X()}function X(){const O={simples:[]};for(f(),A()?O.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):O.simples.push({selector:U(),combinator:""});;){if(f(),A())O.simples[O.simples.length-1].combinator=i[l++].value,f();else if(N())break;O.simples.push({combinator:"",selector:U()})}return O}function U(){let O="";const ne=[];for(;!N();)if(d()||x())O+=i[l++].toSource();else if(i[l]instanceof N0)O+=i[l++].toSource();else if(i[l]instanceof vt&&i[l].value===".")if(l++,d())O+="."+i[l++].toSource();else throw u();else if(i[l]instanceof v0)if(l++,d())if(!e.has(i[l].value.toLowerCase()))O+=":"+i[l++].toSource();else{const te=i[l++].value.toLowerCase();ne.push({name:te,args:[]}),o.add(te)}else if(E()){const te=i[l++].value.toLowerCase();if(e.has(te)?(ne.push({name:te,args:$()}),o.add(te)):O+=`:${te}(${L()})`,f(),!w())throw u();l++}else throw u();else if(i[l]instanceof E0){for(O+="[",l++;!(i[l]instanceof Mh)&&!_();)O+=i[l++].toSource();if(!(i[l]instanceof Mh))throw u();O+="]",l++}else throw u();if(!O&&!ne.length)throw u();return{css:O||void 0,functions:ne}}function L(){let O="",ne=1;for(;!_()&&((S()||E())&&ne++,w()&&ne--,!!ne);)O+=i[l++].toSource();return O}const B=$();if(!_())throw u();if(B.some(O=>typeof O!="object"||!("simples"in O)))throw new qt(`Error while parsing css selector "${n}". Did you mean to CSS.escape it?`);return{selector:B,names:Array.from(o)}}const Oh=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),t_=new Set(["left-of","right-of","above","below","near"]),L0=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 fl(n){const e=s_(n),i=[];for(const r of e.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const l=e_(r.body,L0);i.push({name:"css",body:l.selector,source:r.body});continue}if(Oh.has(r.name)){let l,o;try{const g=JSON.parse("["+r.body+"]");if(!Array.isArray(g)||g.length<1||g.length>2||typeof g[0]!="string")throw new qt(`Malformed selector: ${r.name}=`+r.body);if(l=g[0],g.length===2){if(typeof g[1]!="number"||!t_.has(r.name))throw new qt(`Malformed selector: ${r.name}=`+r.body);o=g[1]}}catch{throw new qt(`Malformed selector: ${r.name}=`+r.body)}const u={name:r.name,source:r.body,body:{parsed:fl(l),distance:o}},f=[...u.body.parsed.parts].reverse().find(g=>g.name==="internal:control"&&g.body==="enter-frame"),d=f?u.body.parsed.parts.indexOf(f):-1;d!==-1&&n_(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({...r,source:r.body})}if(Oh.has(i[0].name))throw new qt(`"${i[0].name}" selector cannot be first`);return{capture:e.capture,parts:i}}function n_(n,e){return gn({parts:n})===gn({parts:e})}function gn(n,e){return typeof n=="string"?n:n.parts.map((i,r)=>{let l=!0;!e&&r!==n.capture&&(i.name==="css"||i.name==="xpath"&&i.source.startsWith("//")||i.source.startsWith(".."))&&(l=!1);const o=l?i.name+"=":"";return`${r===n.capture?"*":""}${o}${i.source}`}).join(" >> ")}function i_(n,e){const i=(r,l)=>{for(const o of r.parts)e(o,l),Oh.has(o.name)&&i(o.body.parsed,!0)};i(n,!1)}function s_(n){let e=0,i,r=0;const l={parts:[]},o=()=>{const f=n.substring(r,e).trim(),d=f.indexOf("=");let g,b;d!==-1&&f.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(g=f.substring(0,d).trim(),b=f.substring(d+1)):f.length>1&&f[0]==='"'&&f[f.length-1]==='"'||f.length>1&&f[0]==="'"&&f[f.length-1]==="'"?(g="text",b=f):/^\(*\/\//.test(f)||f.startsWith("..")?(g="xpath",b=f):(g="css",b=f);let m=!1;if(g[0]==="*"&&(m=!0,g=g.substring(1)),l.parts.push({name:g,body:b}),m){if(l.capture!==void 0)throw new qt("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(r,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,r=e):e++}return o(),l}function Qa(n,e){let i=0,r=n.length===0;const l=()=>n[i]||"",o=()=>{const _=l();return++i,r=i>=n.length,_},u=_=>{throw r?new qt(`Unexpected end of selector while parsing selector \`${n}\``):new qt(`Error while parsing selector \`${n}\` - unexpected symbol "${l()}" at position ${i}`+(_?" during "+_:""))};function f(){for(;!r&&/\s/.test(l());)o()}function d(_){return _>=""||_>="0"&&_<="9"||_>="A"&&_<="Z"||_>="a"&&_<="z"||_>="0"&&_<="9"||_==="_"||_==="-"}function g(){let _="";for(f();!r&&d(l());)_+=o();return _}function b(_){let A=o();for(A!==_&&u("parsing quoted string");!r&&l()!==_;)l()==="\\"&&o(),A+=o();return l()!==_&&u("parsing quoted string"),A+=o(),A}function m(){o()!=="/"&&u("parsing regular expression");let _="",A=!1;for(;!r;){if(l()==="\\")_+=o(),r&&u("parsing regular expression");else if(A&&l()==="]")A=!1;else if(!A&&l()==="[")A=!0;else if(!A&&l()==="/")break;_+=o()}o()!=="/"&&u("parsing regular expression");let N="";for(;!r&&l().match(/[dgimsuy]/);)N+=o();try{return new RegExp(_,N)}catch($){throw new qt(`Error while parsing selector \`${n}\`: ${$.message}`)}}function S(){let _="";return f(),l()==="'"||l()==='"'?_=b(l()).slice(1,-1):_=g(),_||u("parsing property path"),_}function w(){f();let _="";return r||(_+=o()),!r&&_!=="="&&(_+=o()),["=","*=","^=","$=","|=","~="].includes(_)||u("parsing operator"),_}function E(){o();const _=[];for(_.push(S()),f();l()===".";)o(),_.push(S()),f();if(l()==="]")return o(),{name:_.join("."),jsonPath:_,op:"<truthy>",value:null,caseSensitive:!1};const A=w();let N,$=!0;if(f(),l()==="/"){if(A!=="=")throw new qt(`Error while parsing selector \`${n}\` - cannot use ${A} in attribute with regular expression`);N=m()}else if(l()==="'"||l()==='"')N=b(l()).slice(1,-1),f(),l()==="i"||l()==="I"?($=!1,o()):(l()==="s"||l()==="S")&&($=!0,o());else{for(N="";!r&&(d(l())||l()==="+"||l()===".");)N+=o();N==="true"?N=!0:N==="false"&&(N=!1)}if(f(),l()!=="]"&&u("parsing attribute value"),o(),A!=="="&&typeof N!="string")throw new qt(`Error while parsing selector \`${n}\` - cannot use ${A} in attribute with non-string matching value - ${N}`);return{name:_.join("."),jsonPath:_,op:A,value:N,caseSensitive:$}}const x={name:"",attributes:[]};for(x.name=g(),f();l()==="[";)x.attributes.push(E()),f();if(r||u(void 0),!x.name&&!x.attributes.length)throw new qt(`Error while parsing selector \`${n}\` - selector cannot be empty`);return x}function mc(n,e="'"){const i=JSON.stringify(n),r=i.substring(1,i.length-1).replace(/\\"/g,'"');if(e==="'")return e+r.replace(/[']/g,"\\'")+e;if(e==='"')return e+r.replace(/["]/g,'\\"')+e;if(e==="`")return e+r.replace(/[`]/g,"\\`")+e;throw new Error("Invalid escape char")}function ac(n){return n.charAt(0).toUpperCase()+n.substring(1)}function R0(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function dr(n){return`"${n.replace(/["\\]/g,e=>"\\"+e)}"`}let ls;function r_(){ls=new Map}function ut(n){let e=ls==null?void 0:ls.get(n);return e===void 0&&(e=n.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),ls==null||ls.set(n,e)),e}function yc(n){return n.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function D0(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function $t(n,e){return typeof n!="string"?D0(n):`${JSON.stringify(n)}${e?"s":"i"}`}function Je(n,e){return typeof n!="string"?D0(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function a_(n,e,i=""){if(n.length<=e)return n;const r=[...n];return r.length>e?r.slice(0,e-i.length).join("")+i:r.join("")}function lb(n,e){return a_(n,e,"…")}function lc(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function l_(n,e){const i=n.length,r=e.length;let l=0,o=0;const u=Array(i+1).fill(null).map(()=>Array(r+1).fill(0));for(let f=1;f<=i;f++)for(let d=1;d<=r;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 z0(n,e){try{const i=fl(e),r=o_(i);return r||fs(new H0[n],i,!1,1)[0]}catch{return e}}function o_(n){const e=n.parts[n.parts.length-1];if((e==null?void 0:e.name)==="internal:describe"){const i=JSON.parse(e.body);if(typeof i=="string")return i}}function Di(n,e,i=!1){return U0(n,e,i,1)[0]}function U0(n,e,i=!1,r=20,l){try{return fs(new H0[n](l),fl(e),i,r)}catch{return[e]}}function fs(n,e,i=!1,r=20){const l=[...e.parts],o=[];let u=i?"frame-locator":"page";for(let f=0;f<l.length;f++){const d=l[f],g=u;if(u="locator",d.name==="internal:describe")continue;if(d.name==="nth"){d.body==="0"?o.push([n.generateLocator(g,"first",""),n.generateLocator(g,"nth","0")]):d.body==="-1"?o.push([n.generateLocator(g,"last",""),n.generateLocator(g,"nth","-1")]):o.push([n.generateLocator(g,"nth",d.body)]);continue}if(d.name==="visible"){o.push([n.generateLocator(g,"visible",d.body),n.generateLocator(g,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:E,text:x}=Ra(d.body);o.push([n.generateLocator(g,"text",x,{exact:E})]);continue}if(d.name==="internal:has-text"){const{exact:E,text:x}=Ra(d.body);if(!E){o.push([n.generateLocator(g,"has-text",x,{exact:E})]);continue}}if(d.name==="internal:has-not-text"){const{exact:E,text:x}=Ra(d.body);if(!E){o.push([n.generateLocator(g,"has-not-text",x,{exact:E})]);continue}}if(d.name==="internal:has"){const E=fs(n,d.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"has",x)));continue}if(d.name==="internal:has-not"){const E=fs(n,d.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"hasNot",x)));continue}if(d.name==="internal:and"){const E=fs(n,d.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"and",x)));continue}if(d.name==="internal:or"){const E=fs(n,d.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"or",x)));continue}if(d.name==="internal:chain"){const E=fs(n,d.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"chain",x)));continue}if(d.name==="internal:label"){const{exact:E,text:x}=Ra(d.body);o.push([n.generateLocator(g,"label",x,{exact:E})]);continue}if(d.name==="internal:role"){const E=Qa(d.body),x={attrs:[]};for(const _ of E.attributes)_.name==="name"?(x.exact=_.caseSensitive,x.name=_.value):_.name==="description"?(x.exact=_.caseSensitive,x.description=_.value):(_.name==="level"&&typeof _.value=="string"&&(_.value=+_.value),x.attrs.push({name:_.name==="include-hidden"?"includeHidden":_.name,value:_.value}));o.push([n.generateLocator(g,"role",E.name,x)]);continue}if(d.name==="internal:testid"){const E=Qa(d.body),{value:x}=E.attributes[0];o.push([n.generateLocator(g,"test-id",x)]);continue}if(d.name==="internal:attr"){const E=Qa(d.body),{name:x,value:_,caseSensitive:A}=E.attributes[0],N=_,$=!!A;if(x==="placeholder"){o.push([n.generateLocator(g,"placeholder",N,{exact:$})]);continue}if(x==="alt"){o.push([n.generateLocator(g,"alt",N,{exact:$})]);continue}if(x==="title"){o.push([n.generateLocator(g,"title",N,{exact:$})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const E=o[o.length-1],x=l[f-1],_=E.map(A=>n.chainLocators([A,n.generateLocator(g,"frame","")]));["xpath","css"].includes(x.name)&&_.push(n.generateLocator(g,"frame-locator",gn({parts:[x]})),n.generateLocator(g,"frame-locator",gn({parts:[x]},!0))),E.splice(0,E.length,..._),u="frame-locator";continue}const b=l[f+1],m=gn({parts:[d]}),S=n.generateLocator(g,"default",m);if(b&&["internal:has-text","internal:has-not-text"].includes(b.name)){const{exact:E,text:x}=Ra(b.body);if(!E){const _=n.generateLocator("locator",b.name==="internal:has-text"?"has-text":"has-not-text",x,{exact:E}),A={};b.name==="internal:has-text"?A.hasText=x:A.hasNotText=x;const N=n.generateLocator(g,"default",m,A);o.push([n.chainLocators([S,_]),N]),f++;continue}}let w;if(["xpath","css"].includes(d.name)){const E=gn({parts:[d]},!0);w=n.generateLocator(g,"default",E)}o.push([S,w].filter(Boolean))}return c_(n,o,r)}function c_(n,e,i){const r=e.map(()=>""),l=[],o=u=>{if(u===e.length)return l.push(n.chainLocators(r)),l.length<i;for(const f of e[u])if(r[u]=f,!o(u+1))return!1;return!0};return o(0),l}function Ra(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 u_{constructor(e){this.preferredQuote=e}generateLocator(e,i,r,l={}){switch(i){case"default":return l.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(l.hasText)} })`:l.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(l.hasNotText)} })`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${r==="true"?"true":"false"} })`;case"role":const o=[];Ze(l.name)?o.push(`name: ${this.regexToSourceString(l.name)}`):typeof l.name=="string"&&o.push(`name: ${this.quote(l.name)}`),Ze(l.description)?o.push(`description: ${this.regexToSourceString(l.description)}`):typeof l.description=="string"&&o.push(`description: ${this.quote(l.description)}`),l.exact&&(typeof l.name=="string"||typeof l.description=="string")&&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(r)}${u})`;case"has-text":return`filter({ hasText: ${this.toHasText(r)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(r)} })`;case"has":return`filter({ has: ${r} })`;case"hasNot":return`filter({ hasNot: ${r} })`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("getByText",r,!!l.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!l.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!l.exact);case"label":return this.toCallWithExact("getByLabel",r,!!l.exact);case"title":return this.toCallWithExact("getByTitle",r,!!l.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return yc(String(e))}toCallWithExact(e,i,r){return Ze(i)?`${e}(${this.regexToSourceString(i)})`:r?`${e}(${this.quote(i)}, { exact: true })`:`${e}(${this.quote(i)})`}toHasText(e){return Ze(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return Ze(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return mc(e,this.preferredQuote??"'")}}class f_{generateLocator(e,i,r,l={}){switch(i){case"default":return l.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(l.hasText)})`:l.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(l.hasNotText)})`:`locator(${this.quote(r)})`;case"frame-locator":return`frame_locator(${this.quote(r)})`;case"frame":return"content_frame";case"nth":return`nth(${r})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${r==="true"?"True":"False"})`;case"role":const o=[];Ze(l.name)?o.push(`name=${this.regexToString(l.name)}`):typeof l.name=="string"&&o.push(`name=${this.quote(l.name)}`),Ze(l.description)?o.push(`description=${this.regexToString(l.description)}`):typeof l.description=="string"&&o.push(`description=${this.quote(l.description)}`),l.exact&&(typeof l.name=="string"||typeof l.description=="string")&&o.push("exact=True");for(const{name:f,value:d}of l.attrs){let g=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(g=d?"True":"False"),o.push(`${R0(f)}=${g}`)}const u=o.length?`, ${o.join(", ")}`:"";return`get_by_role(${this.quote(r)}${u})`;case"has-text":return`filter(has_text=${this.toHasText(r)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(r)})`;case"has":return`filter(has=${r})`;case"hasNot":return`filter(has_not=${r})`;case"and":return`and_(${r})`;case"or":return`or_(${r})`;case"chain":return`locator(${r})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("get_by_text",r,!!l.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!l.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!l.exact);case"label":return this.toCallWithExact("get_by_label",r,!!l.exact);case"title":return this.toCallWithExact("get_by_title",r,!!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"${yc(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${i})`}toCallWithExact(e,i,r){return Ze(i)?`${e}(${this.regexToString(i)})`:r?`${e}(${this.quote(i)}, exact=True)`:`${e}(${this.quote(i)})`}toHasText(e){return Ze(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return Ze(e)?this.regexToString(e):this.quote(e)}quote(e){return mc(e,'"')}}class h_{generateLocator(e,i,r,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(r)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(l.hasText)}))`:l.hasNotText!==void 0?`locator(${this.quote(r)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(l.hasNotText)}))`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${o}.FilterOptions().setVisible(${r==="true"?"true":"false"}))`;case"role":const u=[];Ze(l.name)?u.push(`.setName(${this.regexToString(l.name)})`):typeof l.name=="string"&&u.push(`.setName(${this.quote(l.name)})`),Ze(l.description)?u.push(`.setDescription(${this.regexToString(l.description)})`):typeof l.description=="string"&&u.push(`.setDescription(${this.quote(l.description)})`),l.exact&&(typeof l.name=="string"||typeof l.description=="string")&&u.push(".setExact(true)");for(const{name:d,value:g}of l.attrs)u.push(`.set${ac(d)}(${typeof g=="string"?this.quote(g):g})`);const f=u.length?`, new ${o}.GetByRoleOptions()${u.join("")}`:"";return`getByRole(AriaRole.${R0(r).toUpperCase()}${f})`;case"has-text":return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${o}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${o}.FilterOptions().setHasNot(${r}))`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact(o,"getByText",r,!!l.exact);case"alt":return this.toCallWithExact(o,"getByAltText",r,!!l.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",r,!!l.exact);case"label":return this.toCallWithExact(o,"getByLabel",r,!!l.exact);case"title":return this.toCallWithExact(o,"getByTitle",r,!!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(yc(e.source))}${i})`}toCallWithExact(e,i,r,l){return Ze(r)?`${i}(${this.regexToString(r)})`:l?`${i}(${this.quote(r)}, new ${e}.${ac(i)}Options().setExact(true))`:`${i}(${this.quote(r)})`}toHasText(e){return Ze(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return Ze(e)?this.regexToString(e):this.quote(e)}quote(e){return mc(e,'"')}}class d_{generateLocator(e,i,r,l={}){switch(i){case"default":return l.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(l.hasText)} })`:l.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(l.hasNotText)} })`:`Locator(${this.quote(r)})`;case"frame-locator":return`FrameLocator(${this.quote(r)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${r})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${r==="true"?"true":"false"} })`;case"role":const o=[];Ze(l.name)?o.push(`NameRegex = ${this.regexToString(l.name)}`):typeof l.name=="string"&&o.push(`Name = ${this.quote(l.name)}`),Ze(l.description)?o.push(`DescriptionRegex = ${this.regexToString(l.description)}`):typeof l.description=="string"&&o.push(`Description = ${this.quote(l.description)}`),l.exact&&(typeof l.name=="string"||typeof l.description=="string")&&o.push("Exact = true");for(const{name:f,value:d}of l.attrs)o.push(`${ac(f)} = ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${ac(r)}${u})`;case"has-text":return`Filter(new() { ${this.toHasText(r)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(r)} })`;case"has":return`Filter(new() { Has = ${r} })`;case"hasNot":return`Filter(new() { HasNot = ${r} })`;case"and":return`And(${r})`;case"or":return`Or(${r})`;case"chain":return`Locator(${r})`;case"test-id":return`GetByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("GetByText",r,!!l.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!l.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!l.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!l.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!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(yc(e.source))}${i})`}toCallWithExact(e,i,r){return Ze(i)?`${e}(${this.regexToString(i)})`:r?`${e}(${this.quote(i)}, new() { Exact = true })`:`${e}(${this.quote(i)})`}toHasText(e){return Ze(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return Ze(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return Ze(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return mc(e,'"')}}class p_{generateLocator(e,i,r,l={}){return JSON.stringify({kind:i,body:r,options:l})}chainLocators(e){const i=e.map(r=>JSON.parse(r));for(let r=0;r<i.length-1;++r)i[r].next=i[r+1];return JSON.stringify(i[0])}}const H0={javascript:u_,python:f_,java:h_,csharp:d_,jsonl:p_};function Ze(n){return n instanceof RegExp}const ob=new Map;function g_({name:n,rootItem:e,render:i,title:r,icon:l,isError:o,isVisible:u,selectedItem:f,onAccepted:d,onSelected:g,onHighlighted:b,treeState:m,setTreeState:S,noItemsMessage:w,dataTestId:E,autoExpandDepth:x}){const _=R.useMemo(()=>m_(e,f,m.expandedItems,x||0,u),[e,f,m,x,u]),A=R.useRef(null),[N,$]=R.useState();R.useEffect(()=>{b==null||b(N)},[b,N]),R.useEffect(()=>{const U=A.current;if(!U)return;const L=()=>{ob.set(n,U.scrollTop)};return U.addEventListener("scroll",L,{passive:!0}),()=>U.removeEventListener("scroll",L)},[n]),R.useEffect(()=>{A.current&&(A.current.scrollTop=ob.get(n)||0)},[n]);const G=R.useCallback(U=>{const{expanded:L}=_.get(U);if(L){for(let B=f;B;B=B.parent)if(B===U){g==null||g(U);break}m.expandedItems.set(U.id,!1)}else m.expandedItems.set(U.id,!0);S({...m})},[_,f,g,m,S]),X=R.useCallback(U=>{const{expanded:L}=_.get(U),B=[U];for(;B.length;){const O=B.pop();B.push(...O.children),m.expandedItems.set(O.id,!L)}S({...m})},[_,m,S]);return v.jsx("div",{className:at("tree-view vbox",n+"-tree-view"),"data-testid":E||n+"-tree",children:v.jsxs("div",{className:at("tree-view-content"),role:_.size>0?"tree":void 0,tabIndex:0,onKeyDown:U=>{if(f&&U.key==="Enter"){d==null||d(f);return}if(U.key!=="ArrowDown"&&U.key!=="ArrowUp"&&U.key!=="ArrowLeft"&&U.key!=="ArrowRight")return;if(U.stopPropagation(),U.preventDefault(),f&&U.key==="ArrowLeft"){const{expanded:B,parent:O}=_.get(f);B?(m.expandedItems.set(f.id,!1),S({...m})):O&&(g==null||g(O));return}if(f&&U.key==="ArrowRight"){f.children.length&&(m.expandedItems.set(f.id,!0),S({...m}));return}let L=f;if(U.key==="ArrowDown"&&(f?L=_.get(f).next:_.size&&(L=[..._.keys()][0])),U.key==="ArrowUp"){if(f)L=_.get(f).prev;else if(_.size){const B=[..._.keys()];L=B[B.length-1]}}b==null||b(void 0),L&&(g==null||g(L)),$(void 0)},ref:A,children:[w&&_.size===0&&v.jsx("div",{className:"tree-view-empty",children:w}),e.children.map(U=>_.get(U)&&v.jsx(B0,{item:U,treeItems:_,selectedItem:f,onSelected:g,onAccepted:d,isError:o,toggleExpanded:G,toggleSubtree:X,highlightedItem:N,setHighlightedItem:$,render:i,icon:l,title:r},U.id))]})})}function B0({item:n,treeItems:e,selectedItem:i,onSelected:r,highlightedItem:l,setHighlightedItem:o,isError:u,onAccepted:f,toggleExpanded:d,toggleSubtree:g,render:b,title:m,icon:S}){const w=R.useId(),E=R.useRef(null);R.useEffect(()=>{(i==null?void 0:i.id)===n.id&&E.current&&r0(E.current)},[n.id,i==null?void 0:i.id]);const x=e.get(n),_=x.depth,A=x.expanded;let N="codicon-blank";typeof A=="boolean"&&(N=A?"codicon-chevron-down":"codicon-chevron-right");const $=b(n),G=A&&n.children.length?n.children:[],X=m==null?void 0:m(n),U=(S==null?void 0:S(n))||"codicon-blank";return v.jsxs("div",{ref:E,role:"treeitem","aria-selected":n===i,"aria-expanded":A,"aria-controls":w,title:X,className:"vbox",style:{flex:"none"},children:[v.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(n),className:at("tree-view-entry",i===n&&"selected",l===n&&"highlighted",(u==null?void 0:u(n))&&"error"),onClick:()=>r==null?void 0:r(n),onMouseEnter:()=>o(n),onMouseLeave:()=>o(void 0),children:[_?new Array(_).fill(0).map((L,B)=>v.jsx("div",{className:"tree-view-indent"},"indent-"+B)):void 0,v.jsx("div",{"aria-hidden":"true",className:"codicon "+N,style:{minWidth:16,marginRight:4},onDoubleClick:L=>{L.preventDefault(),L.stopPropagation()},onClick:L=>{L.stopPropagation(),L.preventDefault(),L.altKey?g(n):d(n)}}),S&&v.jsx("div",{className:"codicon "+U,style:{minWidth:16,marginRight:4},"aria-label":"["+U.replace("codicon","icon")+"]"}),typeof $=="string"?v.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:$}):$]}),!!G.length&&v.jsx("div",{id:w,role:"group",children:G.map(L=>e.get(L)&&v.jsx(B0,{item:L,treeItems:e,selectedItem:i,onSelected:r,onAccepted:f,isError:u,toggleExpanded:d,toggleSubtree:g,highlightedItem:l,setHighlightedItem:o,render:b,title:m,icon:S},L.id))})]})}function jh(n,e,i){const r=i.get(n.id);if(r!==void 0)return r;const l=e(n),o=l==="if-needed"?n.children.some(u=>jh(u,e,i)):l;return i.set(n.id,o),o}function m_(n,e,i,r,l=()=>!0){const o=new Map;if(!jh(n,l,o))return new Map;const u=new Map,f=new Set;for(let b=e==null?void 0:e.parent;b;b=b.parent)f.add(b.id);let d=null;const g=(b,m)=>{for(const S of b.children){if(!jh(S,l,o))continue;const w=f.has(S.id)||i.get(S.id),E=r>m&&u.size<25&&w!==!1,x=S.children.length?w??E:void 0,_={depth:m,expanded:x,parent:n===b?null:b,next:null,prev:d};d&&(u.get(d).next=S),d=S,u.set(S,_),x&&g(S,m+1)}};return g(n,0),u}const ft=R.forwardRef(function({children:e,title:i="",icon:r,disabled:l=!1,toggled:o=!1,onClick:u=()=>{},style:f,testId:d,className:g,ariaLabel:b,errorBadge:m},S){const w=R.useId();return v.jsxs("button",{ref:S,className:at(g,"toolbar-button",r,o&&"toggled"),onMouseDown:cb,onClick:u,onDoubleClick:cb,title:i,disabled:!!l,style:f,"data-testid":d,"aria-label":b||i,"aria-describedby":m?w:void 0,children:[r&&v.jsx("span",{className:`codicon codicon-${r}`,style:e?{marginRight:5}:{}}),e,m&&v.jsx("span",{id:w,className:"toolbar-button-error-badge",title:m,"aria-label":m})]})}),cb=n=>{n.stopPropagation(),n.preventDefault()};function q0(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 y_(n){return n==="scheduled"?"Pending":n==="running"?"Running":n==="failed"?"Failed":n==="passed"?"Passed":n==="skipped"?"Skipped":"Did not run"}const b_=g_,v_=({actions:n,selectedAction:e,selectedTime:i,setSelectedTime:r,treeState:l,setTreeState:o,sdkLanguage:u,onSelected:f,onHighlighted:d,revealConsole:g,revealActionAttachment:b,isLive:m,actionFilterText:S})=>{const{rootItem:w,itemMap:E}=R.useMemo(()=>d0(n),[n]),{selectedItem:x}=R.useMemo(()=>({selectedItem:e?E.get(e.callId):void 0}),[E,e]),_=R.useCallback(U=>{var L;return!!((L=U.action.error)!=null&&L.message)},[]),A=R.useCallback(U=>r({minimum:U.action.startTime,maximum:U.action.endTime}),[r]),N=R.useCallback(U=>{var B;const L=!!b&&!!((B=U.action.attachments)!=null&&B.length);return rd(U.action,{sdkLanguage:u,revealConsole:g,revealActionAttachment:()=>b==null?void 0:b(U.action.callId),isLive:m,showDuration:!0,showBadges:!0,showAttachments:L})},[m,g,b,u]),$=R.useCallback(U=>{if(!(!i||!U.action||U.action.startTime<=i.maximum&&U.action.endTime>=i.minimum))return!1;const B=ad(U.action).title;return S?B.toLowerCase().includes(S.toLowerCase())?!0:"if-needed":!0},[i,S]),G=R.useCallback(U=>{f==null||f(U.action)},[f]),X=R.useCallback(U=>{d==null||d(U==null?void 0:U.action)},[d]);return v.jsxs("div",{className:"vbox action-list-container",children:[i&&v.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[v.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),v.jsx(b_,{name:"actions",rootItem:w,treeState:l,setTreeState:o,selectedItem:x,onSelected:G,onHighlighted:X,onAccepted:A,isError:_,isVisible:$,render:N,autoExpandDepth:S!=null&&S.trim()?5:0})]})},rd=(n,e)=>{var _;const{sdkLanguage:i,revealConsole:r,revealActionAttachment:l,isLive:o,showDuration:u,showBadges:f,showAttachments:d}=e,{errors:g,warnings:b}=Rx(n),m=n.params.selector?z0(i||"javascript",n.params.selector):void 0,S=n.class==="Test"&&n.method==="test.step"&&((_=n.annotations)==null?void 0:_.some(A=>A.type==="skip"));let w="";n.endTime?w=St(n.endTime-n.startTime):n.error?w="Timed out":o||(w="-");const{elements:E,title:x}=ad(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||d||S)&&v.jsx("div",{className:"spacer"}),d&&v.jsx(ft,{icon:"attach",title:"Open Attachment",onClick:()=>l==null?void 0:l()}),u&&!S&&v.jsx("div",{className:"action-duration",children:w||v.jsx("span",{className:"codicon codicon-loading"})}),S&&v.jsx("span",{className:at("action-skipped","codicon",q0("skipped")),title:"skipped"}),f&&v.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!g&&v.jsxs("div",{className:"action-icon",children:[v.jsx("span",{className:"codicon codicon-error"}),v.jsx("span",{className:"action-icon-value",children:g})]}),!!b&&v.jsxs("div",{className:"action-icon",children:[v.jsx("span",{className:"codicon codicon-warning"}),v.jsx("span",{className:"action-icon-value",children:b})]})]})]}),m&&v.jsx("div",{className:"action-title-selector",title:m,children:m})]})};function ad(n,e){var g;let i=n.title??((g=ed({type:n.class,method:n.method}))==null?void 0:g.title)??n.method;i=i.replace(/\n/g," ");const r=[],l=[];let o=0;const u=/\{([^}]+)\}/g;let f;for(;(f=u.exec(i))!==null;){const[b,m]=f,S=i.slice(o,f.index);r.push(S),l.push(S);const w=c0(n.params,m);w===void 0?(r.push(b),l.push(b)):f.index===0?(r.push(w),l.push(w)):(r.push(v.jsx("span",{className:"action-title-param",children:w},r.length)),l.push(w)),o=f.index+b.length}if(o<i.length){const b=i.slice(o);r.push(b),l.push(b)}const d=n.params.selector?z0("javascript",n.params.selector):void 0;return d&&(l.push(" "),l.push(d)),{elements:r,title:l.join("")}}const ld=({value:n,description:e})=>{const[i,r]=R.useState("copy"),l=R.useCallback(()=>{(typeof n=="function"?n():Promise.resolve(n)).then(u=>{navigator.clipboard.writeText(u).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[n]);return v.jsx(ft,{title:e||"Copy",icon:i,onClick:l})},Qo=({value:n,description:e,copiedDescription:i=e,style:r})=>{const[l,o]=R.useState(!1),u=R.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(ft,{style:r,title:e,onClick:u,className:"copy-to-clipboard-text-button",children:l?i:e})},bs=({text:n})=>v.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:n}),S_=({action:n,startTimeOffset:e,sdkLanguage:i})=>{const r=R.useMemo(()=>Object.keys((n==null?void 0:n.params)??{}).filter(f=>f!=="info"),[n]);if(!n)return v.jsx(bs,{text:"No action selected"});const l=n.startTime-e,o=St(l),{title:u}=ad(n);return v.jsxs("div",{className:"call-tab",children:[v.jsx("div",{className:"call-line",children:u}),v.jsx("div",{className:"call-section",children:"Time"}),Ro({name:"start",type:"literal",text:o}),Ro({name:"duration",type:"literal",text:w_(n)}),!!r.length&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"call-section",children:"Parameters"}),r.map(f=>Ro(ub(n,f,n.params[f],i)))]}),!!n.result&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(n.result).map(f=>Ro(ub(n,f,n.result[f],i)))]})]})};function w_(n){return n.endTime?St(n.endTime-n.startTime):n.error?"Timed Out":"Running"}function Ro(n){let e=n.text;return e.length>1e3&&(e=e.slice(0,1e3)+"…"),e=e.replace(/\n/g,"↵"),n.type==="string"&&(e=`"${e}"`),v.jsxs("div",{className:"call-line",children:[n.name,":",v.jsx("span",{className:at("call-value",n.type),title:e,children:e}),["literal","string","number","object","locator"].includes(n.type)&&v.jsx(ld,{value:n.text})]},n.name)}function ub(n,e,i,r){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=Pa(i.value,new Array(10).fill({handle:"<handle>"}))),e==="value"&&l&&(i=Pa(i,new Array(10).fill({handle:"<handle>"}))),e==="received"&&n.method==="expect"){const f=i&&typeof i=="object"&&("value"in i||"ariaSnapshot"in i)?i.value:i;i=f!==void 0?Pa(f,new Array(10).fill({handle:"<handle>"})):void 0}if(e==="selector")return{text:Di(r||"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),type:"object",name:e}}function Pa(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=>Pa(i,e));if(n.o!==void 0){const i={};for(const{k:r,v:l}of n.o)i[r]=Pa(l,e);return i}return n.h!==void 0?e===void 0?"<object>":e[n.h]:"<object>"}const fb=new Map;function bc({name:n,items:e=[],id:i,render:r,icon:l,isError:o,isWarning:u,isInfo:f,selectedItem:d,onAccepted:g,onSelected:b,onHighlighted:m,onIconClicked:S,noItemsMessage:w,dataTestId:E,notSelectable:x,ariaLabel:_}){const A=R.useRef(null),[N,$]=R.useState();return R.useEffect(()=>{m==null||m(N)},[m,N]),R.useEffect(()=>{const G=A.current;if(!G)return;const X=()=>{fb.set(n,G.scrollTop)};return G.addEventListener("scroll",X,{passive:!0}),()=>G.removeEventListener("scroll",X)},[n]),R.useEffect(()=>{A.current&&(A.current.scrollTop=fb.get(n)||0)},[n]),v.jsx("div",{className:at("list-view vbox",n+"-list-view"),role:e.length>0?"listbox":void 0,"aria-label":_,children:v.jsxs("div",{className:at("list-view-content",x&&"not-selectable"),tabIndex:0,onKeyDown:G=>{var B;if(d&&G.key==="Enter"){g==null||g(d,e.indexOf(d));return}if(G.key!=="ArrowDown"&&G.key!=="ArrowUp")return;G.stopPropagation(),G.preventDefault();const X=d?e.indexOf(d):-1;let U=X;G.key==="ArrowDown"&&(X===-1?U=0:U=Math.min(X+1,e.length-1)),G.key==="ArrowUp"&&(X===-1?U=e.length-1:U=Math.max(X-1,0));const L=(B=A.current)==null?void 0:B.children.item(U);r0(L||void 0),m==null||m(void 0),b==null||b(e[U],U),$(void 0)},ref:A,children:[w&&e.length===0&&v.jsx("div",{className:"list-view-empty",children:w}),e.map((G,X)=>{const U=r(G,X);return v.jsxs("div",{onDoubleClick:()=>g==null?void 0:g(G,X),role:"option",className:at("list-view-entry",d===G&&"selected",!x&&N===G&&"highlighted",(o==null?void 0:o(G,X))&&"error",(u==null?void 0:u(G,X))&&"warning",(f==null?void 0:f(G,X))&&"info"),"aria-selected":d===G,onClick:()=>b==null?void 0:b(G,X),onMouseEnter:()=>$(G),onMouseLeave:()=>$(void 0),children:[l&&v.jsx("div",{className:"codicon "+(l(G,X)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:L=>{L.preventDefault(),L.stopPropagation()},onClick:L=>{L.stopPropagation(),L.preventDefault(),S==null||S(G,X)}}),typeof U=="string"?v.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:U}):U]},(i==null?void 0:i(G,X))||X)})]})})}const x_=bc,__=({action:n,isLive:e})=>{const i=R.useMemo(()=>{var u;if(!n||!n.log.length)return[];const r=n.log,l=n.context.wallTime-n.context.startTime,o=[];for(let f=0;f<r.length;++f){let d="";if(r[f].time!==-1){const g=(u=r[f])==null?void 0:u.time;f+1<r.length?d=St(r[f+1].time-g):n.endTime>0?d=St(n.endTime-g):e?d=St(Date.now()-l-g):d="-"}o.push({message:r[f].message,time:d})}return o},[n,e]);return i.length?v.jsx(x_,{name:"log",ariaLabel:"Log entries",items:i,render:r=>v.jsxs("div",{className:"log-list-item",children:[v.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):v.jsx(bs,{text:"No log entries"})};function sl(n,e){const i=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];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[,,g,,b]=l;if(g){const m=+g;switch(m){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=hb[m-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=hb[m-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=db[m-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=db[m-100];break}}else if(b){const m={...o},S=u?d:f;S!==void 0&&(m.color=S),u&&f&&(m["background-color"]=f),r.push(`<span style="${T_(m)}">${E_(b)}</span>`)}}return r.join("")}const hb={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)"},db={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 E_(n){return n.replace(/[&"<>]/g,e=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[e])}function T_(n){return Object.entries(n).map(([e,i])=>`${e}: ${i}`).join("; ")}const A_=({error:n})=>{const e=R.useMemo(()=>sl(n,{bg:"var(--vscode-editor-background)",fg:"var(--vscode-editor-foreground)"}),[n]);return v.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},$0=({cursor:n,onPaneMouseMove:e,onPaneMouseUp:i,onPaneDoubleClick:r})=>(wt.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),r&&document.body.addEventListener("dblclick",r),()=>{e&&l.removeEventListener("mousemove",e),i&&l.removeEventListener("mouseup",i),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(l)}},[n,e,i,r]),v.jsx(v.Fragment,{})),C_={position:"absolute",top:0,right:0,bottom:0,left:0},I0=({orientation:n,offsets:e,setOffsets:i,resizerColor:r,resizerWidth:l,minColumnWidth:o})=>{const u=o||0,[f,d]=wt.useState(null),[g,b]=ys(),m={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:b,children:[!!f&&v.jsx($0,{cursor:n==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:S=>{if(!S.buttons)d(null);else if(f){const w=n==="horizontal"?S.clientX-f.clientX:S.clientY-f.clientY,E=f.offset+w,x=f.index>0?e[f.index-1]:0,_=n==="horizontal"?g.width:g.height,A=Math.min(Math.max(x+u,E),_-u)-e[f.index];for(let N=f.index;N<e.length;++N)e[N]=e[N]+A;i([...e])}}}),e.map((S,w)=>v.jsx("div",{style:{...m,top:n==="horizontal"?0:S,left:n==="horizontal"?S:0,pointerEvents:"initial"},onMouseDown:E=>d({clientX:E.clientX,clientY:E.clientY,offset:S,index:w}),children:v.jsx("div",{style:{...C_,background:r}})},w))]})};async function oh(n){const e=new Image;return n&&(e.src=n,await new Promise((i,r)=>{e.onload=i,e.onerror=i})),e}const Lh={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
                    linear-gradient(-45deg, #80808020 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #80808020 75%),
                    linear-gradient(-45deg, transparent 75%, #80808020 75%)`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px",boxShadow:`rgb(0 0 0 / 10%) 0px 1.8px 1.9px,
              rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
              rgb(0 0 0 / 10%) 0px -2px 4px,
              rgb(0 0 0 / 15%) 0px -6.1px 12px,
              rgb(0 0 0 / 25%) 0px 6px 12px`},N_=({diff:n,noTargetBlank:e,hideDetails:i})=>{const[r,l]=R.useState(n.diff?"diff":"actual"),[o,u]=R.useState(!1),[f,d]=R.useState(null),[g,b]=R.useState("Expected"),[m,S]=R.useState(null),[w,E]=R.useState(null),[x,_]=ys();R.useEffect(()=>{(async()=>{var O,ne,te,V;d(await oh((O=n.expected)==null?void 0:O.attachment.path)),b(((ne=n.expected)==null?void 0:ne.title)||"Expected"),S(await oh((te=n.actual)==null?void 0:te.attachment.path)),E(await oh((V=n.diff)==null?void 0:V.attachment.path))})()},[n]);const A=f&&m&&w,N=A?Math.max(f.naturalWidth,m.naturalWidth,200):500,$=A?Math.max(f.naturalHeight,m.naturalHeight,200):500,G=Math.min(1,(x.width-30)/N),X=Math.min(1,(x.width-50)/N/2),U=N*G,L=$*G,B={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:_,children:A&&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:{...B,fontWeight:r==="diff"?600:"initial"},onClick:()=>l("diff"),children:"Diff"}),v.jsx("div",{style:{...B,fontWeight:r==="actual"?600:"initial"},onClick:()=>l("actual"),children:"Actual"}),v.jsx("div",{style:{...B,fontWeight:r==="expected"?600:"initial"},onClick:()=>l("expected"),children:g}),v.jsx("div",{style:{...B,fontWeight:r==="sxs"?600:"initial"},onClick:()=>l("sxs"),children:"Side by side"}),v.jsx("div",{style:{...B,fontWeight:r==="slider"?600:"initial"},onClick:()=>l("slider"),children:"Slider"})]}),v.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:L+60},children:[n.diff&&r==="diff"&&v.jsx(Wn,{image:w,alt:"Diff",hideSize:i,canvasWidth:U,canvasHeight:L,scale:G}),n.diff&&r==="actual"&&v.jsx(Wn,{image:m,alt:"Actual",hideSize:i,canvasWidth:U,canvasHeight:L,scale:G}),n.diff&&r==="expected"&&v.jsx(Wn,{image:f,alt:g,hideSize:i,canvasWidth:U,canvasHeight:L,scale:G}),n.diff&&r==="slider"&&v.jsx(k_,{expectedImage:f,actualImage:m,hideSize:i,canvasWidth:U,canvasHeight:L,scale:G,expectedTitle:g}),n.diff&&r==="sxs"&&v.jsxs("div",{style:{display:"flex"},children:[v.jsx(Wn,{image:f,title:g,hideSize:i,canvasWidth:X*N,canvasHeight:X*$,scale:X}),v.jsx(Wn,{image:o?w:m,title:o?"Diff":"Actual",onClick:()=>u(!o),hideSize:i,canvasWidth:X*N,canvasHeight:X*$,scale:X})]}),!n.diff&&r==="actual"&&v.jsx(Wn,{image:m,title:"Actual",hideSize:i,canvasWidth:U,canvasHeight:L,scale:G}),!n.diff&&r==="expected"&&v.jsx(Wn,{image:f,title:g,hideSize:i,canvasWidth:U,canvasHeight:L,scale:G}),!n.diff&&r==="sxs"&&v.jsxs("div",{style:{display:"flex"},children:[v.jsx(Wn,{image:f,title:g,canvasWidth:X*N,canvasHeight:X*$,scale:X}),v.jsx(Wn,{image:m,title:"Actual",canvasWidth:X*N,canvasHeight:X*$,scale:X})]})]}),!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})})]})]})})},k_=({expectedImage:n,actualImage:e,canvasWidth:i,canvasHeight:r,scale:l,expectedTitle:o,hideSize:u})=>{const f={position:"absolute",top:0,left:0},[d,g]=R.useState(i/2),b=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:[!b&&v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Actual "}),!b&&v.jsx("span",{children:e.naturalWidth}),!b&&v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!b&&v.jsx("span",{children:e.naturalHeight}),!b&&v.jsxs("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:[o," "]}),v.jsx("span",{children:n.naturalWidth}),v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),v.jsx("span",{children:n.naturalHeight})]}),v.jsxs("div",{style:{position:"relative",width:i,height:r,margin:15,...Lh},children:[v.jsx(I0,{orientation:"horizontal",offsets:[d],setOffsets:m=>g(m[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,...Lh},children:v.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*l,height:e.naturalHeight*l},draggable:"false",src:e.src})})]})]})},Wn=({image:n,title:e,alt:i,hideSize:r,canvasWidth:l,canvasHeight:o,scale:u,onClick:f})=>v.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&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,...Lh},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})})]}),M_="modulepreload",O_=function(n,e){return new URL(n,e).href},pb={},j_=function(e,i,r){let l=Promise.resolve();if(i&&i.length>0){let u=function(b){return Promise.all(b.map(m=>Promise.resolve(m).then(S=>({status:"fulfilled",value:S}),S=>({status:"rejected",reason:S}))))};const f=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),g=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));l=u(i.map(b=>{if(b=O_(b,r),b in pb)return;pb[b]=!0;const m=b.endsWith(".css"),S=m?'[rel="stylesheet"]':"";if(!!r)for(let x=f.length-1;x>=0;x--){const _=f[x];if(_.href===b&&(!m||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${b}"]${S}`))return;const E=document.createElement("link");if(E.rel=m?"stylesheet":M_,m||(E.as="script"),E.crossOrigin="",E.href=b,g&&E.setAttribute("nonce",g),document.head.appendChild(E),m)return new Promise((x,_)=>{E.addEventListener("load",x),E.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${b}`)))})}))}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)})},L_=20,Ar=({text:n,highlighter:e,mimeType:i,linkify:r,readOnly:l,highlight:o,revealLine:u,lineNumbers:f,isFocused:d,focusOnChange:g,wrapLines:b,onChange:m,dataTestId:S,placeholder:w})=>{const[E,x]=ys(),[_]=R.useState(j_(()=>import("./codeMirrorModule-Ds_H_9Yq.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(G=>G.default)),A=R.useRef(null),[N,$]=R.useState();return R.useEffect(()=>{(async()=>{var B,O;const G=await _;D_(G);const X=x.current;if(!X)return;const U=U_(e)||z_(i)||(r?"text/linkified":"");if(A.current&&U===A.current.cm.getOption("mode")&&!!l===A.current.cm.getOption("readOnly")&&f===A.current.cm.getOption("lineNumbers")&&b===A.current.cm.getOption("lineWrapping")&&w===A.current.cm.getOption("placeholder"))return;(O=(B=A.current)==null?void 0:B.cm)==null||O.getWrapperElement().remove();const L=G(X,{value:"",mode:U,readOnly:!!l,lineNumbers:f,lineWrapping:b,placeholder:w,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-F":"findPersistent","Cmd-F":"findPersistent"}});return A.current={cm:L},d&&L.focus(),$(L),L})()},[_,N,x,e,i,r,f,b,l,d,w]),R.useEffect(()=>{A.current&&A.current.cm.setSize(E.width,E.height)},[E]),R.useLayoutEffect(()=>{var U;if(!N)return;let G=!1;if(N.getValue()!==n&&(N.setValue(n),G=!0,g&&(N.execCommand("selectAll"),N.focus())),G||JSON.stringify(o)!==JSON.stringify(A.current.highlight)){for(const O of A.current.highlight||[])N.removeLineClass(O.line-1,"wrap");for(const O of o||[])N.addLineClass(O.line-1,"wrap",`source-line-${O.type}`);for(const O of A.current.widgets||[])N.removeLineWidget(O);for(const O of A.current.markers||[])O.clear();const L=[],B=[];for(const O of o||[]){if(O.type!=="subtle-error"&&O.type!=="error")continue;const ne=(U=A.current)==null?void 0:U.cm.getLine(O.line-1);if(ne){const te={};te.title=O.message||"",B.push(N.markText({line:O.line-1,ch:0},{line:O.line-1,ch:O.column||ne.length},{className:"source-line-error-underline",attributes:te}))}if(O.type==="error"){const te=document.createElement("div");te.innerHTML=sl(O.message||"",{bg:"var(--vscode-inputValidation-errorBackground)",fg:"var(--vscode-editor-foreground)"}),te.className="source-line-error-widget",L.push(N.addLineWidget(O.line,te,{above:!0,coverGutter:!1}))}}A.current.highlight=o,A.current.widgets=L,A.current.markers=B}typeof u=="number"&&A.current.cm.lineCount()>=u&&N.scrollIntoView({line:Math.max(0,u-1),ch:0},50);let X;return m&&(X=()=>m(N.getValue()),N.on("change",X)),()=>{X&&N.off("change",X)}},[N,n,o,u,g,m]),v.jsx("div",{"data-testid":S,className:"cm-wrapper",ref:x,onClick:R_})};function R_(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 gb=!1;function D_(n){gb||(gb=!0,n.defineSimpleMode("text/linkified",{start:[{regex:a0,token:"linkified"}]}))}function z_(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 U_(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 H_(n){return!!n.match(/^(application\/json|application\/.*?\+json|text\/(x-)?json)(;\s*charset=.*)?$/)}function B_(n){return!!n.match(/^(application\/xml|application\/.*?\+xml|text\/xml)(;\s*charset=.*)?$/)}function q_(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 V0=({title:n,children:e,setExpanded:i,expanded:r,expandOnTitleClick:l,className:o})=>{const u=R.useId(),f=R.useId(),d=R.useCallback(()=>i(!r),[r,i]),g=v.jsx("div",{className:at("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:l?void 0:d});return v.jsxs("div",{className:at("expandable",r&&"expanded",o),children:[l?v.jsxs("div",{id:u,role:"button","aria-expanded":r,"aria-controls":f,className:"expandable-title",onClick:d,children:[g,n]}):v.jsxs("div",{className:"expandable-title",children:[g,n]}),r&&v.jsx("div",{id:f,"aria-labelledby":u,role:"region",className:"expandable-content",children:e})]})};function G0(n){const e=[];let i=0,r;for(;(r=a0.exec(n))!==null;){const o=n.substring(i,r.index);o&&e.push(o);const u=r[0];e.push($_(u)),i=r.index+u.length}const l=n.substring(i);return l&&e.push(l),e}function $_(n){let e=n;return e.startsWith("www.")&&(e="https://"+e),v.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:n})}const K0=R.createContext(void 0),ri=()=>R.useContext(K0),I_=({attachment:n,reveal:e})=>{const i=ri(),[r,l]=R.useState(!1),[o,u]=R.useState(null),[f,d]=R.useState(null),[g,b]=hx(),m=R.useRef(null),S=q_(n.contentType),w=!!n.sha1||!!n.path;R.useEffect(()=>{var _;if(e)return(_=m.current)==null||_.scrollIntoView({behavior:"smooth"}),b()},[e,b]),R.useEffect(()=>{r&&o===null&&f===null&&(d("Loading ..."),fetch(vc(i,n)).then(_=>_.text()).then(_=>{u(_),d(null)}).catch(_=>{d("Failed to load: "+_.message)}))},[i,r,o,f,n]);const E=R.useMemo(()=>{const _=o?o.split(`
`).length:0;return Math.min(Math.max(5,_),20)*L_},[o]),x=v.jsxs("span",{style:{marginLeft:5},ref:m,"aria-label":n.name,children:[v.jsx("span",{children:G0(n.name)}),w&&v.jsx("a",{style:{marginLeft:5},href:Po(i,n),children:"download"})]});return!S||!w?v.jsx("div",{style:{marginLeft:20},children:x}):v.jsxs("div",{className:at(g&&"yellow-flash"),children:[v.jsx(V0,{title:x,expanded:r,setExpanded:l,expandOnTitleClick:!0,children:f&&v.jsx("i",{children:f})}),r&&o!==null&&v.jsx("div",{className:"vbox",style:{height:E},children:v.jsx(Ar,{text:o,readOnly:!0,mimeType:n.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},V_=({revealedAttachmentCallId:n})=>{const e=ri(),{diffMap:i,screenshots:r,attachments:l}=R.useMemo(()=>{const o=new Set((e==null?void 0:e.visibleAttachments)??[]),u=new Set,f=new Map;for(const d of o){if(!d.path&&!d.sha1)continue;const g=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(g){const b=g[1],m=g[2],S=f.get(b)||{expected:void 0,actual:void 0,diff:void 0};S[m]=d,f.set(b,S),o.delete(d)}else d.contentType.startsWith("image/")&&(u.add(d),o.delete(d))}return{diffMap:f,attachments:o,screenshots:u}},[e]);return!i.size&&!r.size&&!l.size?v.jsx(bs,{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(N_,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:Po(e,o)},title:"Expected"},actual:{attachment:{...u,path:Po(e,u)}},diff:f?{attachment:{...f,path:Po(e,f)}}:void 0}})]})),r.size?v.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((o,u)=>{const f=vc(e,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(I_,{attachment:o,reveal:n&&o.callId===n.callId?n:void 0})},G_(o,u)))]})};function vc(n,e){return n&&e.sha1?n.createRelativeUrl(`sha1/${e.sha1}`):`file?path=${encodeURIComponent(e.path)}`}function Po(n,e){let i=e.contentType?`&dn=${encodeURIComponent(e.name)}`:"";return e.contentType&&(i+=`&dct=${encodeURIComponent(e.contentType)}`),vc(n,e)+i}function G_(n,e){return e+"-"+(n.sha1?"sha1-"+n.sha1:"path-"+n.path)}const K_=({prompt:n})=>v.jsx(Qo,{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 X_(n){return R.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 Y_({message:n,error:e,sdkLanguage:i,revealInSource:r}){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&&rd(e.action,{sdkLanguage:i}),l&&v.jsxs("div",{className:"action-location",children:["@ ",v.jsx("span",{title:o,onClick:()=>r(e),children:l})]})]}),v.jsx(A_,{error:n})]})}const F_=({errorsModel:n,sdkLanguage:e,revealInSource:i,wallTime:r,testRunMetadata:l})=>{const o=ri(),u=Zh(async()=>{const f=o==null?void 0:o.attachments.find(g=>g.name==="error-context");if(!f)return;let d=await fetch(vc(o,f)).then(g=>g.text());if(d)return l!=null&&l.gitDiff&&(d+=`

# Local changes

\`\`\`diff
`+l.gitDiff+"\n```"),d},[o,l],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:u&&v.jsx(K_,{prompt:u})}),[...n.errors.entries()].map(([f,d])=>{const g=`error-${r}-${f}`;return v.jsx(Y_,{message:f,error:d,revealInSource:i,sdkLanguage:e},g)})]}):v.jsx(bs,{text:"No errors"})},Q_=bc,Da={log:{bg:"var(--vscode-editor-background)",fg:"var(--vscode-editor-foreground)"},warning:{fg:"var(--vscode-list-warningForeground)",bg:"var(--vscode-inputValidation-warningBackground)"},error:{fg:"var(--vscode-list-errorForeground)",bg:"var(--vscode-inputValidation-errorBackground)"}};function P_(n,e,i){const{entries:r}=R.useMemo(()=>{if(!n)return{entries:[]};const o=[];function u(d){var m,S,w,E,x,_;const g=o[o.length-1];g&&((m=d.browserMessage)==null?void 0:m.bodyString)===((S=g.browserMessage)==null?void 0:S.bodyString)&&((w=d.browserMessage)==null?void 0:w.location)===((E=g.browserMessage)==null?void 0:E.location)&&d.browserError===g.browserError&&((x=d.nodeMessage)==null?void 0:x.html)===((_=g.nodeMessage)==null?void 0:_.html)&&d.isError===g.isError&&d.isWarning===g.isWarning&&d.timestamp-g.timestamp<1e3?g.repeat++:o.push({...d,repeat:1})}const f=[...n.events,...n.stdio].sort((d,g)=>{const b="time"in d?d.time:d.timestamp,m="time"in g?g.time:g.timestamp;return b-m});for(const d of f){if(d.type==="console"){const g=d.messageType==="error"?Da.error:d.messageType==="warning"?Da.warning:Da.log,b=d.args&&d.args.length?Z_(d.args,g):X0(d.text,g),m=d.location.url,w=`${m?m.substring(m.lastIndexOf("/")+1):"<anonymous>"}:${d.location.lineNumber}`;u({browserMessage:{body:b,bodyString:d.text,location:w},isError:d.messageType==="error",isWarning:d.messageType==="warning",timestamp:d.time})}if(d.type==="event"&&d.method==="pageError"&&u({browserError:d.params.error,isError:!0,isWarning:!1,timestamp:d.time}),d.type==="stderr"||d.type==="stdout"){let g="";const b=d.type==="stderr"?Da.error:Da.log;d.text&&(g=sl(d.text.trim(),b)||""),d.base64&&(g=sl(atob(d.base64).trim(),b)||""),u({nodeMessage:{html:g},isError:d.type==="stderr",isWarning:!1,timestamp:d.timestamp})}}return{entries:o}},[n,i]);return{entries:R.useMemo(()=>e?r.filter(o=>o.timestamp>=e.minimum&&o.timestamp<=e.maximum):r,[r,e])}}const J_=({consoleModel:n,boundaries:e,onEntryHovered:i,onAccepted:r})=>n.entries.length?v.jsx("div",{className:"console-tab",children:v.jsx(Q_,{name:"console",onAccepted:r,onHighlighted:l=>i==null?void 0:i(l?n.entries.indexOf(l):void 0),items:n.entries,isError:l=>l.isError,isWarning:l=>l.isWarning,render:l=>{const o=St(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:at("codicon","codicon-browser",f),title:"Browser message"}):v.jsx("span",{className:at("codicon","codicon-file",f),title:"Runner message"});let g,b,m,S;const{browserMessage:w,browserError:E,nodeMessage:x}=l;if(w&&(g=w.location,b=w.body),E){const{error:_,value:A}=E;_?(b=_.message,S=_.stack):b=String(A)}return x&&(m=x.html),v.jsxs("div",{className:"console-line",children:[u,d,g&&v.jsx("span",{className:"console-location",children:g}),l.repeat>1&&v.jsx("span",{className:"console-repeat",children:l.repeat}),b&&v.jsx("span",{className:"console-line-message",children:b}),m&&v.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:m}}),S&&v.jsx("div",{className:"console-stack",children:S})]})}})}):v.jsx(bs,{text:"No console entries"});function Z_(n,e){if(n.length===1)return X0(n[0].preview,e);const i=typeof n[0].value=="string"&&n[0].value.includes("%"),r=i?n[0].value:"",l=i?n.slice(1):n;let o=0;const u=/%([%sdifoOc])/g;let f;const d=[];let g=[];d.push(v.jsx("span",{children:g},d.length+1));let b=0;for(;(f=u.exec(r))!==null;){const m=r.substring(b,f.index);g.push(v.jsx("span",{children:m},g.length+1)),b=f.index+2;const S=f[0][1];if(S==="%")g.push(v.jsx("span",{children:"%"},g.length+1));else if(S==="s"||S==="o"||S==="O"||S==="d"||S==="i"||S==="f"){const w=l[o++],E={};typeof(w==null?void 0:w.value)!="string"&&(E.color="var(--vscode-debugTokenExpression-number)"),g.push(v.jsx("span",{style:E,children:(w==null?void 0:w.preview)||""},g.length+1))}else if(S==="c"){g=[];const w=l[o++],E=w?W_(w.preview):{};d.push(v.jsx("span",{style:E,children:g},d.length+1))}}for(b<r.length&&g.push(v.jsx("span",{children:r.substring(b)},g.length+1));o<l.length;o++){const m=l[o],S={};g.length&&g.push(v.jsx("span",{children:" "},g.length+1)),typeof(m==null?void 0:m.value)!="string"&&(S.color="var(--vscode-debugTokenExpression-number)"),g.push(v.jsx("span",{style:S,children:(m==null?void 0:m.preview)||""},g.length+1))}return d}function X0(n,e){return[v.jsx("span",{dangerouslySetInnerHTML:{__html:sl(n.trim(),e)}})]}function W_(n){try{const e={},i=n.split(";");for(const r of i){const l=r.trim();if(!l)continue;let[o,u]=l.split(":");if(o=o.trim(),u=u.trim(),!eE(o))continue;const f=o.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[f]=u}return e}catch{return{}}}function eE(n){return["background","border","color","font","line","margin","padding","text"].some(i=>n.startsWith(i))}const Sc=({noShadow:n,children:e,noMinHeight:i,className:r,sidebarBackground:l,onClick:o})=>v.jsx("div",{className:at("toolbar",n&&"no-shadow",i&&"no-min-height",r,l&&"toolbar-sidebar-background"),onClick:o,children:e}),Rh=({tabs:n,selectedTab:e,setSelectedTab:i,leftToolbar:r,rightToolbar:l,dataTestId:o,mode:u})=>{const f=R.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(Sc,{children:[r&&v.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),u==="default"&&v.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...n.map(d=>v.jsx(Y0,{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 g="";return d.count&&(g=` (${d.count})`),d.errorCount&&(g=` (${d.errorCount})`),v.jsxs("option",{value:d.id,role:"tab","aria-controls":`${f}-${d.id}`,children:[d.title,g]},d.id)})})}),l&&v.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...l]})]}),n.map(d=>{const g="tab-content tab-"+d.id;if(d.component)return v.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:g,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:g,children:d.render()},d.id)})]})})},Y0=({id:n,title:e,count:i,errorCount:r,selected:l,onSelect:o,ariaControls:u})=>v.jsxs("div",{className:at("tabbed-pane-tab",l&&"selected"),onClick:()=>o==null?void 0:o(n),role:"tab",title:e,"aria-controls":u,"aria-selected":l,children:[v.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!i&&v.jsx("div",{className:"tabbed-pane-tab-counter",children:i}),!!r&&v.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]});async function tE(n,e){const i=navigator.platform.includes("Win")?"win":"unix";let r=[];const l=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function o(S){return'^"'+S.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/[^ -~\r\n]/g," ").replace(/\r?\n|\r/g,`^

`)+'^"'}function u(S){function w(E){let _=E.charCodeAt(0).toString(16);for(;_.length<4;)_="0"+_;return"\\u"+_}return/[\0-\x1F\x7F-\x9F!]|\'/.test(S)?"$'"+S.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,w)+"'":"'"+S+"'"}const f=i==="win"?o:u;r.push(f(e.request.url).replace(/[[{}\]]/g,"\\$&"));let d="GET";const g=[],b=await F0(n,e);b&&(g.push("--data-raw "+f(b)),l.add("content-length"),d="POST"),e.request.method!==d&&r.push("-X "+f(e.request.method));const m=e.request.headers;for(let S=0;S<m.length;S++){const w=m[S],E=w.name.replace(/^:/,"");if(l.has(E.toLowerCase()))continue;const x=w.value;x.trim()?E.toLowerCase()==="cookie"?r.push("-b "+f(x)):r.push("-H "+f(E+": "+x)):r.push("-H "+f(E+";"))}return r=r.concat(g),"curl "+r.join(r.length>=3?i==="win"?` ^
  `:` \\
  `:" ")}async function nE(n,e,i=0){const r=new Set(["method","path","scheme","version","accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via","user-agent"]),l=new Set(["cookie","authorization"]),o=JSON.stringify(e.request.url),u=e.request.headers,f=u.reduce((x,_)=>{const A=_.name;return!r.has(A.toLowerCase())&&!A.includes(":")&&x.append(A,_.value),x},new Headers),d={};for(const x of f)d[x[0]]=x[1];const g=e.request.cookies.length||u.some(({name:x})=>l.has(x.toLowerCase()))?"include":"omit",b=u.find(({name:x})=>x.toLowerCase()==="referer"),m=b?b.value:void 0,S=await F0(n,e),w={headers:Object.keys(d).length?d:void 0,referrer:m,body:S,method:e.request.method,mode:"cors"};if(i===1){const x=u.find(A=>A.name.toLowerCase()==="cookie"),_={};delete w.mode,x&&(_.cookie=x.value),m&&(delete w.referrer,_.Referer=m),Object.keys(_).length&&(w.headers={...d,..._})}else w.credentials=g;const E=JSON.stringify(w,null,2);return`fetch(${o}, ${E});`}async function F0(n,e){var i,r;return n&&((i=e.request.postData)!=null&&i._sha1)?await fetch(n.createRelativeUrl(`sha1/${e.request.postData._sha1}`)).then(l=>l.text()):(r=e.request.postData)==null?void 0:r.text}class iE{generatePlaywrightRequestCall(e,i){let r=e.method.toLowerCase();const l=new URL(e.url),o=`${l.origin}${l.pathname}`,u={};["delete","get","head","post","put","patch"].includes(r)||(u.method=r,r="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(g=>[g.name,g.value])));const f=[`'${o}'`];return Object.keys(u).length>0&&f.push(this.prettyPrintObject(u)),`await page.request.${r}(${f.join(", ")});`}prettyPrintObject(e,i=2,r=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(r*i),d=" ".repeat((r+1)*i);return`[
${e.map(b=>`${d}${this.prettyPrintObject(b,i,r+1)}`).join(`,
`)}
${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`{
${Object.entries(e).map(([f,d])=>{const g=this.prettyPrintObject(d,i,r+1),b=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(f)?f:this.stringLiteral(f);return`${o}${b}: ${g}`}).join(`,
`)}
${l}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
`)||e.includes("\r")||e.includes("	")?"`"+e+"`":`'${e}'`}}class sE{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),o=[`"${`${r.origin}${r.pathname}`}"`];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`method="${u}"`),u="fetch"),r.searchParams.size&&o.push(`params=${this.prettyPrintObject(Object.fromEntries(r.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]:`
${o.map(d=>this.indent(d,2)).join(`,
`)}
`;return`await page.request.${u}(${f})`}indent(e,i){return e.split(`
`).map(r=>" ".repeat(i)+r).join(`
`)}prettyPrintObject(e,i=2,r=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(r*i),d=" ".repeat((r+1)*i);return`[
${e.map(b=>`${d}${this.prettyPrintObject(b,i,r+1)}`).join(`,
`)}
${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`{
${Object.entries(e).map(([f,d])=>{const g=this.prettyPrintObject(d,i,r+1);return`${o}${this.stringLiteral(f)}: ${g}`}).join(`,
`)}
${l}}`}stringLiteral(e){return JSON.stringify(e)}}class rE{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),l=`${r.origin}${r.pathname}`,o={},u=[];let f=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(f)||(o.Method=f,f="fetch"),r.searchParams.size&&(o.Params=Object.fromEntries(r.searchParams.entries())),i&&(o.Data=i),e.headers.length&&(o.Headers=Object.fromEntries(e.headers.map(b=>[b.name,b.value])));const d=[`"${l}"`];return Object.keys(o).length>0&&d.push(this.prettyPrintObject(o)),`${u.join(`
`)}${u.length?`
`:""}await request.${this.toFunctionName(f)}(${d.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,i=2,r=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(r*i),d=" ".repeat((r+1)*i);return`new object[] {
${e.map(b=>`${d}${this.prettyPrintObject(b,i,r+1)}`).join(`,
`)}
${f}}`}if(Object.keys(e).length===0)return"new {}";const l=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`new() {
${Object.entries(e).map(([f,d])=>{const g=this.prettyPrintObject(d,i,r+1),b=r===0?f:`[${this.stringLiteral(f)}]`;return`${o}${b} = ${g}`}).join(`,
`)}
${l}}`}stringLiteral(e){return JSON.stringify(e)}}class aE{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),l=[`"${r.origin}${r.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 r.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()
  .${o.join(`
  .`)}
`),`request.${u}(${l.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function lE(n){if(n==="javascript")return new iE;if(n==="python")return new sE;if(n==="csharp")return new rE;if(n==="java")return new aE;throw new Error("Unsupported language: "+n)}const oE=({resource:n,sdkLanguage:e,startTimeOffset:i,onClose:r})=>{const[l,o]=R.useState("headers"),u=ri(),f=Zh(async()=>{if(u&&n.request.postData){const d=n.request.headers.find(b=>b.name.toLowerCase()==="content-type"),g=d?d.value:"";return n.request.postData._sha1?{text:await(await fetch(u.createRelativeUrl(`sha1/${n.request.postData._sha1}`))).text(),mimeType:g}:{text:n.request.postData.text,mimeType:g}}else return null},[n],null);return v.jsx(Rh,{leftToolbar:[v.jsx(ft,{icon:"close",title:"Close",onClick:r},"close")],rightToolbar:[v.jsx(cE,{requestBody:f,resource:n,sdkLanguage:e},"dropdown")],tabs:[{id:"headers",title:"Headers",render:()=>v.jsx(uE,{resource:n,startTimeOffset:i})},{id:"payload",title:"Payload",render:()=>v.jsx(fE,{resource:n,requestBody:f})},{id:"response",title:"Response",render:()=>v.jsx(hE,{resource:n})}],selectedTab:l,setSelectedTab:o})},cE=({resource:n,sdkLanguage:e,requestBody:i})=>{const r=ri(),l=v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>lE(e).generatePlaywrightRequestCall(n.request,i==null?void 0:i.text);return v.jsxs("div",{className:"copy-request-dropdown",children:[v.jsxs(ft,{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(Qo,{description:"Copy as cURL",copiedDescription:l,value:()=>tE(r,n)}),v.jsx(Qo,{description:"Copy as Fetch",copiedDescription:l,value:()=>nE(r,n)}),v.jsx(Qo,{description:"Copy as Playwright",copiedDescription:l,value:o})]})]})},Q0=({toggled:n,error:e,onToggle:i})=>v.jsx(ft,{icon:"json",title:"Pretty print",toggled:n,errorBadge:e?"Formatting failed":void 0,onClick:r=>{r.stopPropagation(),i()}}),Ja=({title:n,data:e,showCount:i,children:r,titleChildren:l,className:o})=>{const[u,f]=Gt(`trace-viewer-network-details-${n.replaceAll(" ","-")}`,!0);return v.jsxs(V0,{expanded:u,setExpanded:f,expandOnTitleClick:!0,title:v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"network-request-details-header",children:[n,i&&v.jsxs("span",{className:"network-request-details-header-count",children:[" × ",(e==null?void 0:e.length)??0]})]}),l]}),className:o,children:[e&&v.jsx("table",{className:"network-request-details-table",children:v.jsx("tbody",{children:e.map(({name:d,value:g},b)=>g!==null&&v.jsxs("tr",{children:[v.jsx("td",{children:d}),v.jsx("td",{children:g})]},b))})}),r]})},uE=({resource:n,startTimeOffset:e})=>{const i=R.useMemo(()=>Object.entries({URL:n.request.url,Method:n.request.method,"Status Code":n.response.status===-1?"canceled":n.response.status>0&&v.jsxs("span",{className:pE(n.response.status),children:[" ",n.response.status," ",n.response.statusText]}),Start:St(e),Duration:St(n.time)}).map(([r,l])=>({name:r,value:l})),[n,e]);return v.jsxs("div",{className:"vbox network-request-details-tab",children:[v.jsx(Ja,{title:"General",data:i}),v.jsx(Ja,{title:"Request Headers",showCount:!0,data:n.request.headers}),v.jsx(Ja,{title:"Response Headers",showCount:!0,data:n.response.headers})]})},fE=({resource:n,requestBody:e})=>{const[i,r]=Gt("trace-viewer-network-details-show-formatted-payload",!0),l=n.request.queryString.length>0,o=!!(e||n.request.postData),u=P0(e,i);return v.jsxs("div",{className:"vbox network-request-details-tab",children:[!l&&!o&&v.jsx("em",{className:"network-request-no-payload",children:"No payload for this request."}),l&&v.jsx(Ja,{title:"Query String Parameters",showCount:!0,data:n.request.queryString}),e&&v.jsx(Ja,{title:"Request Body",className:"network-request-request-body",titleChildren:v.jsxs(v.Fragment,{children:[v.jsx("div",{style:{margin:"auto"}}),v.jsx(Q0,{toggled:i,error:u.error,onToggle:()=>r(!i)})]}),children:v.jsx(Ar,{text:u.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})})]})},hE=({resource:n})=>{const e=ri(),[i,r]=R.useState(null);R.useEffect(()=>{(async()=>{if(e&&n.response.content._sha1){const d=n.response.content.mimeType.includes("image"),g=n.response.content.mimeType.includes("font"),b=await fetch(e.createRelativeUrl(`sha1/${n.response.content._sha1}`));if(d){const m=await b.blob(),S=new FileReader,w=new Promise(E=>S.onload=E);S.readAsDataURL(m),r({dataUrl:(await w).target.result})}else if(g){const m=await b.arrayBuffer();r({font:m})}else r({text:await b.text(),mimeType:n.response.content.mimeType})}else r(null)})()},[n,e]);const[l,o]=Gt("trace-viewer-network-details-show-formatted-response",!0),u=P0(i,l);return v.jsxs("div",{className:"vbox network-request-details-tab",children:[!n.response.content._sha1&&v.jsx("div",{children:"Response body is not available for this request."}),i&&i.font&&v.jsx(dE,{font:i.font}),i&&i.dataUrl&&v.jsx("div",{children:v.jsx("img",{draggable:"false",src:i.dataUrl})}),i&&i.text!==void 0&&v.jsxs("div",{className:"vbox network-response-body",children:[v.jsx(Ar,{text:u.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0}),v.jsxs(Sc,{noShadow:!0,noMinHeight:!0,className:"network-response-toolbar",children:[v.jsx("div",{style:{margin:"auto"}}),v.jsx(Q0,{toggled:l,error:u.error,onToggle:()=>o(!l)})]})]})]})},dE=({font:n})=>{const[e,i]=R.useState(!1);return R.useEffect(()=>{let r;try{r=new FontFace("font-preview",n),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&i(!0)}catch{i(!0)}return()=>{document.fonts.delete(r)}},[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 pE(n){return n<300||n===304?"green-circle":n<400?"yellow-circle":"red-circle"}const gE=/<[^>]+>[^<]*<\//;function mE(n,e="  "){let i=0;const r=[],l=n.replace(/>\s*</g,`>
<`).split(`
`);for(const o of l){const u=o.trim();u&&(u.startsWith("</")?(i=Math.max(i-1,0),r.push(e.repeat(i)+u)):u.endsWith("/>")||u.startsWith("<?")||gE.test(u)?r.push(e.repeat(i)+u):u.startsWith("<")?(r.push(e.repeat(i)+u),i++):r.push(e.repeat(i)+u))}return r.join(`
`)}function yE(n,e){return!n.trim()||!e?n:H_(e)?JSON.stringify(JSON.parse(n),null,2):B_(e)?mE(n):e.includes("application/x-www-form-urlencoded")?decodeURIComponent(n):n}const P0=(n,e)=>R.useMemo(()=>{if((n==null?void 0:n.text)===void 0)return{text:""};if(!e)return{text:n.text};try{return{text:yE(n.text,n.mimeType)}}catch{return{text:n.text,error:!0}}},[n,e]);function bE(n){const[e,i]=R.useState([]);R.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 r(o){const u=new Map(n.columnWidths.entries());for(let f=0;f<o.length;++f){const d=o[f]-(o[f-1]||0),g=n.columns[f];u.set(g,d)}n.setColumnWidths(u)}const l=R.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(I0,{orientation:"horizontal",offsets:e,setOffsets:r,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 "+vE(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(bc,{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:g,title:b}=n.render(o,f,u);return v.jsx("div",{className:`grid-view-cell grid-view-column-${String(f)}`,title:b,style:{width:d<n.columns.length-1?n.columnWidths.get(f):void 0},children:g},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 vE(n,e){return n===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const SE=["Fetch","HTML","JS","CSS","Font","Image"],wE={searchValue:"",resourceTypes:new Set},xE=({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.jsxs("div",{className:"network-filters-resource-types",role:"tablist","aria-multiselectable":"true",children:[v.jsx("div",{title:"All",onClick:()=>e({...n,resourceTypes:new Set}),className:`network-filters-resource-type ${n.resourceTypes.size===0?"selected":""}`,children:"All"}),SE.map(i=>v.jsx("div",{title:i,onClick:r=>{let l;r.ctrlKey||r.metaKey?l=n.resourceTypes.symmetricDifference(new Set([i])):l=new Set([i]),e({...n,resourceTypes:l})},className:`network-filters-resource-type ${n.resourceTypes.has(i)?"selected":""}`,role:"tab","aria-selected":n.resourceTypes.has(i),children:i},i))]})]}),_E=bE;function EE(n,e,i){const r=R.useMemo(()=>((n==null?void 0:n.resources)||[]).filter(f=>e?!!f._monotonicTime&&f._monotonicTime>=e.minimum&&f._monotonicTime<=e.maximum:!0),[n,e,i]),l=R.useMemo(()=>new ME(n),[n]);return{resources:r,contextIdMap:l}}const TE=({boundaries:n,networkModel:e,onResourceHovered:i,sdkLanguage:r})=>{const[l,o]=R.useState(void 0),[u,f]=R.useState(void 0),[d,g]=R.useState(wE),{renderedEntries:b}=R.useMemo(()=>{const _=e.resources.map(A=>OE(A,n,e.contextIdMap)).filter(zE(d));return l&&LE(_,l),{renderedEntries:_}},[e.resources,e.contextIdMap,d,l,n]),m=R.useMemo(()=>u?b.find(_=>_.resource.id===u):void 0,[u,b]),[S,w]=R.useState(()=>new Map(J0().map(_=>[_,CE(_)]))),E=R.useCallback(_=>{g(_),f(void 0)},[]);if(!e.resources.length)return v.jsx(bs,{text:"No network calls"});const x=v.jsx(_E,{name:"network",ariaLabel:"Network requests",items:b,selectedItem:m,onSelected:_=>f(_.resource.id),onHighlighted:_=>i==null?void 0:i(_==null?void 0:_.resource.id),columns:NE(!!m,b),columnTitle:AE,columnWidths:S,setColumnWidths:w,isError:_=>_.status.code>=400||_.status.code===-1,isInfo:_=>!!_.route,render:(_,A)=>kE(_,A),sorting:l,setSorting:o});return v.jsxs(v.Fragment,{children:[v.jsx(xE,{filterState:d,onFilterStateChange:E}),!m&&x,m&&v.jsx(sc,{sidebarSize:S.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:v.jsx(oE,{resource:m.resource,sdkLanguage:r,startTimeOffset:m.start,onClose:()=>f(void 0)}),sidebar:x})]})},AE=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":"",CE=n=>n==="name"?200:n==="method"||n==="status"?60:n==="contentType"?200:n==="contextId"?60:100;function NE(n,e){if(n){const r=["name"];return mb(e)&&r.unshift("contextId"),r}let i=J0();return mb(e)||(i=i.filter(r=>r!=="contextId")),i}function J0(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const kE=(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===-1?"canceled":n.status.code>0?n.status.code:"",title:n.status.code===-1?"canceled":n.status.text}:e==="contentType"?{body:n.contentType}:e==="duration"?{body:St(n.duration)}:e==="size"?{body:Bx(n.size)}:e==="start"?{body:St(n.start)}:e==="route"?{body:n.route}:{body:""};class ME{constructor(e){this._pagerefToShortId=new Map,this._contextToId=new Map,this._lastPageId=0,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=p0(e);if(!i)return"";let r=this._contextToId.get(i);return r||(++this._lastApiRequestContextId,r="api#"+this._lastApiRequestContextId,this._contextToId.set(i,r)),r}}function mb(n){const e=new Set;for(const i of n)if(e.add(i.contextId),e.size>1)return!0;return!1}const OE=(n,e,i)=>{const r=jE(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:r,resource:n,contextId:i.contextId(n)}};function jE(n){return n._wasAborted?"aborted":n._wasContinued?"continued":n._wasFulfilled?"fulfilled":n._apiRequest?"api":""}function LE(n,e){const i=RE(e==null?void 0:e.by);i&&n.sort(i),e.negate&&n.reverse()}function RE(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 r=e.method,l=i.method;return r.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 DE={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 zE({searchValue:n,resourceTypes:e}){return i=>(e.size===0||Array.from(e).some(l=>DE[l](i.contentType)))&&i.name.url.toLowerCase().includes(n.toLowerCase())}function UE(n,e){if(n.role!==e.role||n.name!==e.name||!HE(n,e)||oc(n)!==oc(e))return!1;const i=Object.keys(n.props),r=Object.keys(e.props);return i.length===r.length&&i.every(l=>n.props[l]===e.props[l])}function oc(n){return n.box.cursor==="pointer"}function HE(n,e){return n.active===e.active&&n.checked===e.checked&&n.disabled===e.disabled&&n.expanded===e.expanded&&n.selected===e.selected&&n.level===e.level&&n.pressed===e.pressed}function od(n,e,i={}){var S;const r=new n.LineCounter,l={keepSourceTokens:!0,lineCounter:r,...i},o=n.parseDocument(e,l),u=[],f=w=>[r.linePos(w[0]),r.linePos(w[1])],d=w=>{u.push({message:w.message,range:[r.linePos(w.pos[0]),r.linePos(w.pos[1])]})},g=(w,E)=>{for(const x of E.items){if(x instanceof n.Scalar&&typeof x.value=="string"){const N=cc.parse(x,l,u);N&&(w.children=w.children||[],w.children.push(N));continue}if(x instanceof n.YAMLMap){b(w,x);continue}u.push({message:"Sequence items should be strings or maps",range:f(x.range||E.range)})}},b=(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 A=x.key,N=x.value;if(A.value==="text"){if(!(N instanceof n.Scalar&&typeof N.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:ch(N.value)});continue}if(A.value==="/children"){if(!(N instanceof n.Scalar&&typeof N.value=="string")||N.value!=="contain"&&N.value!=="equal"&&N.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=N.value;continue}if(A.value.startsWith("/")){if(!(N instanceof n.Scalar&&typeof N.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[A.value.slice(1)]=ch(N.value);continue}const $=cc.parse(A,l,u);if(!$)continue;if(N instanceof n.Scalar){const U=typeof N.value;if(U!=="string"&&U!=="number"&&U!=="boolean"){u.push({message:"Node value should be a string or a sequence",range:f(x.value.range||E.range)});continue}w.children.push({...$,children:[{kind:"text",text:ch(String(N.value))}]});continue}if(N instanceof n.YAMLSeq){w.children.push($),g($,N);continue}u.push({message:"Map values should be strings or sequences",range:f(x.value.range||E.range)})}},m={kind:"role",role:"fragment"};return o.errors.forEach(d),u.length?{errors:u,fragment:m}:(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:m}:(g(m,o.contents),u.length?{errors:u,fragment:BE}:((S=m.children)==null?void 0:S.length)===1&&(!m.containerMode||m.containerMode==="contain")?{fragment:m.children[0],errors:[]}:{fragment:m,errors:[]}))}const BE={kind:"role",role:"fragment"};function Z0(n){return n.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function ch(n){return{raw:n,normalized:Z0(n)}}class cc{static parse(e,i,r){try{return new cc(e.value)._parse()}catch(l){if(l instanceof yb){const o=i.prettyErrors===!1?l.message:l.message+`:

`+e.value+`
`+" ".repeat(l.pos)+`^
`;return r.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 r=this._next();if(i)e+=r,i=!1;else if(r==="\\")i=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,i=0){throw new yb(e,i||this._pos)}_readRegex(){let e="",i=!1,r=!1;for(;!this._eof();){const l=this._next();if(i)e+=l,i=!1;else if(l==="\\")i=!0,e+=l;else{if(l==="/"&&!r)return{pattern:e};l==="["?(r=!0,e+=l):l==="]"&&r?(e+=l,r=!1):e+=l}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),Z0(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 r=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,r,l||"true",i)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const i=this._readStringOrRegex()||"",r={kind:"role",role:e,name:i};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,i,r,l){if(i==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',l),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(i==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',l),e.disabled=r==="true";return}if(i==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',l),e.expanded=r==="true";return}if(i==="active"){this._assert(r==="true"||r==="false",'Value of "active" attribute must be a boolean',l),e.active=r==="true";return}if(i==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',l),e.level=Number(r);return}if(i==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',l),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(i==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',l),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${i}]`,l)}_assert(e,i,r){e||this._throwError(i||"Assertion error",r)}}class yb extends Error{constructor(e,i){super(e),this.pos=i}}function qE(n,e){var u,f;function i(d,g,b){let m=1,S=b+m;for(const w of d.children||[])typeof w=="string"?(m++,S++):(m+=i(w,g,S),S+=m);if(!["none","presentation","fragment","iframe","generic"].includes(d.role)&&d.name){let w=g.get(d.role);w||(w=new Map,g.set(d.role,w));const E=w.get(d.name),x=m*100-b;(!E||E.sizeAndPosition<x)&&w.set(d.name,{node:d,sizeAndPosition:x})}return m}const r=new Map;n&&i(n,r,0);const l=new Map;i(e,l,0);const o=[];for(const[d,g]of l)for(const[b,m]of g)((u=r.get(d))==null?void 0:u.get(b))||o.push(m);return o.sort((d,g)=>g.sizeAndPosition-d.sizeAndPosition),(f=o[0])==null?void 0:f.node}function $E(n){return W0(n)?"'"+n.replace(/'/g,"''")+"'":n}function uh(n){return W0(n)?'"'+n.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
`:return"\\n";case"\r":return"\\r";case"	":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':n}function W0(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 ev={};function IE(n){ev=n}function Dh(n,e){for(;e;){if(n.contains(e))return!0;e=nv(e)}return!1}function Et(n){if(n.parentElement)return n.parentElement;if(n.parentNode&&n.parentNode.nodeType===11&&n.parentNode.host)return n.parentNode.host}function tv(n){let e=n;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function nv(n){for(;n.parentElement;)n=n.parentElement;return Et(n)}function Va(n,e,i){for(;n;){const r=n.closest(e);if(i&&r!==i&&(r!=null&&r.contains(i)))return;if(r)return r;n=nv(n)}}function Hi(n,e){const i=e==="::before"?ud:e==="::after"?fd:cd;if(i&&i.has(n))return i.get(n);const r=n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView.getComputedStyle(n,e):void 0;return i==null||i.set(n,r),r}function iv(n,e){if(e=e??Hi(n),!e)return!0;if(Element.prototype.checkVisibility&&ev.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 uc(n){const e=Hi(n);if(!e)return{visible:!0,inline:!1};const i=e.cursor;if(e.display==="contents"){for(let l=n.firstChild;l;l=l.nextSibling){if(l.nodeType===1&&ni(l))return{visible:!0,inline:!1,cursor:i};if(l.nodeType===3&&sv(l))return{visible:!0,inline:!0,cursor:i}}return{visible:!1,inline:!1,cursor:i}}if(!iv(n,e))return{cursor:i,visible:!1,inline:!1};const r=n.getBoundingClientRect();return{cursor:i,visible:r.width>0&&r.height>0,inline:e.display==="inline"}}function ni(n){return uc(n).visible}function sv(n){const e=n.ownerDocument.createRange();e.selectNode(n);const i=e.getBoundingClientRect();return i.width>0&&i.height>0}function We(n){const e=n.tagName;return typeof e=="string"?e.toUpperCase():n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}let cd,ud,fd,rv=0;function hd(){++rv,cd??(cd=new Map),ud??(ud=new Map),fd??(fd=new Map)}function dd(){--rv||(cd=void 0,ud=void 0,fd=void 0)}function bb(n){return n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")}const vb="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]",VE=[["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 av(n,e){return VE.some(([i,r])=>!(r!=null&&r.includes(e||""))&&n.hasAttribute(i))}function lv(n){return!Number.isNaN(Number(String(n.getAttribute("tabindex"))))}function GE(n){return!vv(n)&&(KE(n)||lv(n))}function KE(n){const e=We(n);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?n.hasAttribute("href"):e==="INPUT"?!n.hidden:!1}const fh={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=>Va(n,vb)?null:"contentinfo",FORM:n=>bb(n)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:n=>Va(n,vb)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:n=>n.getAttribute("alt")===""&&!n.getAttribute("title")&&!av(n)&&!lv(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=Or(n,n.getAttribute("list"))[0];return i&&We(i)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":lT[e]||"textbox"},INS:()=>"insertion",LI:()=>"listitem",MAIN:()=>"main",MARK:()=>"mark",MATH:()=>"math",MENU:()=>"list",METER:()=>"meter",NAV:()=>"navigation",OL:()=>"list",OPTGROUP:()=>"group",OPTION:()=>"option",OUTPUT:()=>"status",P:()=>"paragraph",PROGRESS:()=>"progressbar",SEARCH:()=>"search",SECTION:n=>bb(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=Va(n,"table"),i=e?pd(e):"";return i==="grid"||i==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:n=>{const e=n.getAttribute("scope");if(e==="col"||e==="colgroup")return"columnheader";if(e==="row"||e==="rowgroup")return"rowheader";const i=n.nextElementSibling,r=n.previousElementSibling,l=n.parentElement&&We(n.parentElement)==="TR"?n.parentElement:void 0;if(!i&&!r){if(l){const o=Va(l,"table");if(o&&o.rows.length<=1)return null}return"columnheader"}return Sb(i)&&Sb(r)?"columnheader":wb(i)||wb(r)?"rowheader":"columnheader"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"};function Sb(n){return!!n&&We(n)==="TH"}function wb(n){var e;return!n||We(n)!=="TD"?!1:!!((e=n.textContent)!=null&&e.trim()||n.children.length>0)}const XE={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 xb(n){var r;const e=((r=fh[We(n)])==null?void 0:r.call(fh,n))||"";if(!e)return null;let i=n;for(;i;){const l=Et(i),o=XE[We(i)];if(!o||!l||!o.includes(We(l)))break;const u=pd(l);if((u==="none"||u==="presentation")&&!ov(l,u))return u;i=l}return e}const YE=["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 pd(n){return(n.getAttribute("role")||"").split(" ").map(i=>i.trim()).find(i=>YE.includes(i))||null}function ov(n,e){return av(n,e)||GE(n)}function xt(n){const e=pd(n);if(!e)return xb(n);if(e==="none"||e==="presentation"){const i=xb(n);if(ov(n,i))return i}return e}function cv(n){return n===null?void 0:n.toLowerCase()==="true"}function uv(n){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(We(n))}function pn(n){if(uv(n))return!0;const e=Hi(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&&!pn(l)||l.nodeType===3&&sv(l))return!1;return!0}return!(n.nodeName==="OPTION"&&!!n.closest("select"))&&!i&&!iv(n,e)?!0:fv(n)}function fv(n){let e=Li==null?void 0:Li.get(n);if(e===void 0){if(e=!1,n.parentElement&&n.parentElement.shadowRoot&&!n.assignedSlot&&(e=!0),!e){const i=Hi(n);e=!i||i.display==="none"||cv(n.getAttribute("aria-hidden"))===!0}if(!e){const i=Et(n);i&&(e=fv(i))}Li==null||Li.set(n,e)}return e}function Or(n,e){if(!e)return[];const i=tv(n);if(!i)return[];try{const r=e.split(" ").filter(o=>!!o),l=[];for(const o of r){const u=i.querySelector("#"+CSS.escape(o));u&&!l.includes(u)&&l.push(u)}return l}catch{return[]}}function ei(n){return n.trim()}function Za(n){return n.split(" ").map(e=>e.replace(/\r\n/g,`
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function _b(n,e){const i=[...n.querySelectorAll(e)];for(const r of Or(n,n.getAttribute("aria-owns")))r.matches(e)&&i.push(r),i.push(...r.querySelectorAll(e));return i}function Wa(n,e){const i=e==="::before"?Ad:e==="::after"?Cd:Td;if(i!=null&&i.has(n))return i==null?void 0:i.get(n);const r=Hi(n,e);let l;if(r){const o=r.content;o&&o!=="none"&&o!=="normal"&&r.display!=="none"&&r.visibility!=="hidden"&&(l=FE(n,o,!!e))}return e&&l!==void 0&&((r==null?void 0:r.display)||"inline")!=="inline"&&(l=" "+l+" "),i&&i.set(n,l),l}function FE(n,e,i){if(!(!e||e==="none"||e==="normal"))try{let r=g0(e).filter(f=>!(f instanceof rc));const l=r.findIndex(f=>f instanceof vt&&f.value==="/");if(l!==-1)r=r.slice(l+1);else if(!i)return;const o=[];let u=0;for(;u<r.length;)if(r[u]instanceof sd)o.push(r[u].value),u++;else if(u+2<r.length&&r[u]instanceof Fa&&r[u].value==="attr"&&r[u+1]instanceof id&&r[u+2]instanceof nd){const f=r[u+1].value;o.push(n.getAttribute(f)||""),u+=3}else return;return o.join("")}catch{}}function hv(n){const e=n.getAttribute("aria-labelledby");if(e===null)return null;const i=Or(n,e);return i.length?i:null}function QE(n,e){const i=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(n),r=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||r}function rl(n,e){const i=e?xd:wd;let r=i==null?void 0:i.get(n);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(xt(n)||"")||(r=Za(_n(n,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),i==null||i.set(n,r)),r}function al(n,e){const i=e?Ed:_d;let r=i==null?void 0:i.get(n);if(r===void 0){if(r="",n.hasAttribute("aria-describedby")){const l=Or(n,n.getAttribute("aria-describedby"));r=Za(l.map(o=>_n(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:pn(o)}})).join(" "))}else n.hasAttribute("aria-description")?r=Za(n.getAttribute("aria-description")||""):r=Za(n.getAttribute("title")||"");i==null||i.set(n,r)}return r}function PE(n){const e=n.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function JE(n){if("validity"in n){const e=n.validity;return(e==null?void 0:e.valid)===!1}return!1}function ZE(n){const e=mr;let i=mr==null?void 0:mr.get(n);if(i===void 0){i="";const r=PE(n)!=="false",l=JE(n);if(r||l){const o=n.getAttribute("aria-errormessage");i=Or(n,o).map(d=>Za(_n(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:pn(d)}}))).join(" ").trim()}e==null||e.set(n,i)}return i}function _n(n,e){var d,g,b,m;if(e.visitedElements.has(n))return"";const i={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const S=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((g=e.embeddedInDescribedBy)!=null&&g.hidden)||!!((b=e.embeddedInNativeTextAlternative)!=null&&b.hidden)||!!((m=e.embeddedInLabel)!=null&&m.hidden);if(uv(n)||!S&&pn(n))return e.visitedElements.add(n),""}const r=hv(n);if(!e.embeddedInLabelledBy){const S=(r||[]).map(w=>_n(w,{...e,embeddedInLabelledBy:{element:w,hidden:pn(w)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(S)return S}const l=xt(n)||"",o=We(n);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const S=[...n.labels||[]].includes(n),w=(r||[]).includes(n);if(!S&&!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"?_b(n,"*").find(_=>xt(_)==="listbox"):n;E=x?_b(x,'[aria-selected="true"]').filter(_=>xt(_)==="option"):[]}return!E.length&&o==="INPUT"?n.value:E.map(x=>_n(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(ei(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 S=n.value||"";return ei(S)?S:n.type==="submit"?"Submit":n.type==="reset"?"Reset":n.getAttribute("title")||""}if(o==="INPUT"&&n.type==="file"){e.visitedElements.add(n);const S=n.labels||[];return S.length&&!e.embeddedInLabelledBy?za(S,e):"Choose File"}if(o==="INPUT"&&n.type==="image"){e.visitedElements.add(n);const S=n.labels||[];if(S.length&&!e.embeddedInLabelledBy)return za(S,e);const w=n.getAttribute("alt")||"";if(ei(w))return w;const E=n.getAttribute("title")||"";return ei(E)?E:"Submit"}if(!r&&o==="BUTTON"){e.visitedElements.add(n);const S=n.labels||[];if(S.length)return za(S,e)}if(!r&&o==="OUTPUT"){e.visitedElements.add(n);const S=n.labels||[];return S.length?za(S,e):n.getAttribute("title")||""}if(!r&&(o==="TEXTAREA"||o==="SELECT"||o==="INPUT")){e.visitedElements.add(n);const S=n.labels||[];if(S.length)return za(S,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(!r&&o==="FIELDSET"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(We(w)==="LEGEND")return _n(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:pn(w)}});return n.getAttribute("title")||""}if(!r&&o==="FIGURE"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(We(w)==="FIGCAPTION")return _n(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:pn(w)}});return n.getAttribute("title")||""}if(o==="IMG"){e.visitedElements.add(n);const S=n.getAttribute("alt")||"";return ei(S)?S:n.getAttribute("title")||""}if(o==="TABLE"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(We(w)==="CAPTION")return _n(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:pn(w)}});const S=n.getAttribute("summary")||"";if(S)return S}if(o==="AREA"){e.visitedElements.add(n);const S=n.getAttribute("alt")||"";return ei(S)?S:n.getAttribute("title")||""}if(o==="SVG"||n.ownerSVGElement){e.visitedElements.add(n);for(let S=n.firstElementChild;S;S=S.nextElementSibling)if(We(S)==="TITLE"&&S.ownerSVGElement)return _n(S,{...i,embeddedInLabelledBy:{element:S,hidden:pn(S)}})}if(n.ownerSVGElement&&o==="A"){const S=n.getAttribute("xlink:title")||"";if(ei(S))return e.visitedElements.add(n),S}}const f=o==="SUMMARY"&&!["presentation","none"].includes(l);if(QE(l,e.embeddedInTargetElement==="descendant")||f||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(n);const S=WE(n,i);if(e.embeddedInTargetElement==="self"?ei(S):S)return S}if(!["presentation","none"].includes(l)||o==="IFRAME"){e.visitedElements.add(n);const S=n.getAttribute("title")||"";if(ei(S))return S}return e.visitedElements.add(n),""}function WE(n,e){const i=[],r=(o,u)=>{var f;if(!(u&&o.assignedSlot))if(o.nodeType===1){const d=((f=Hi(o))==null?void 0:f.display)||"inline";let g=_n(o,e);(d!=="inline"||o.nodeName==="BR")&&(g=" "+g+" "),i.push(g)}else o.nodeType===3&&i.push(o.textContent||"")};i.push(Wa(n,"::before")||"");const l=Wa(n);if(l!==void 0)i.push(l);else{const o=n.nodeName==="SLOT"?n.assignedNodes():[];if(o.length)for(const u of o)r(u,!1);else{for(let u=n.firstChild;u;u=u.nextSibling)r(u,!0);if(n.shadowRoot)for(let u=n.shadowRoot.firstChild;u;u=u.nextSibling)r(u,!0);for(const u of Or(n,n.getAttribute("aria-owns")))r(u,!0)}}return i.push(Wa(n,"::after")||""),i.join("")}const gd=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function dv(n){return We(n)==="OPTION"?n.selected:gd.includes(xt(n)||"")?cv(n.getAttribute("aria-selected"))===!0:!1}const md=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function pv(n){const e=yd(n,!0);return e==="error"?!1:e}function eT(n){return yd(n,!0)}function tT(n){return yd(n,!1)}function yd(n,e){const i=We(n);if(e&&i==="INPUT"&&n.indeterminate)return"mixed";if(i==="INPUT"&&["checkbox","radio"].includes(n.type))return n.checked;if(md.includes(xt(n)||"")){const r=n.getAttribute("aria-checked");return r==="true"?!0:e&&r==="mixed"?"mixed":!1}return"error"}const nT=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function iT(n){const e=We(n);return["INPUT","TEXTAREA","SELECT"].includes(e)?n.hasAttribute("readonly"):nT.includes(xt(n)||"")?n.getAttribute("aria-readonly")==="true":n.isContentEditable?!1:"error"}const bd=["button"];function gv(n){if(bd.includes(xt(n)||"")){const e=n.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const vd=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function mv(n){if(We(n)==="DETAILS")return n.open;if(vd.includes(xt(n)||"")){const e=n.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const Sd=["heading","listitem","row","treeitem"];function yv(n){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[We(n)];if(e)return e;if(Sd.includes(xt(n)||"")){const i=n.getAttribute("aria-level"),r=i===null?Number.NaN:Number(i);if(Number.isInteger(r)&&r>=1)return r}return 0}const bv=["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 fc(n){return vv(n)||Sv(n)}function vv(n){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(We(n))&&(n.hasAttribute("disabled")||sT(n)||rT(n))}function sT(n){return We(n)==="OPTION"&&!!n.closest("OPTGROUP[DISABLED]")}function rT(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 Sv(n,e=!1){if(!n)return!1;if(e||bv.includes(xt(n)||"")){const i=(n.getAttribute("aria-disabled")||"").toLowerCase();return i==="true"?!0:i==="false"?!1:Sv(Et(n),!0)}return!1}function za(n,e){return[...n].map(i=>_n(i,{...e,embeddedInLabel:{element:i,hidden:pn(i)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(i=>!!i).join(" ")}function aT(n){const e=Nd;let i=n,r;const l=[];for(;i;i=Et(i)){const o=e.get(i);if(o!==void 0){r=o;break}l.push(i);const u=Hi(i);if(!u){r=!0;break}const f=u.pointerEvents;if(f){r=f!=="none";break}}r===void 0&&(r=!0);for(const o of l)e.set(o,r);return r}let wd,xd,_d,Ed,mr,Li,Td,Ad,Cd,Nd,wv=0;function wc(){hd(),++wv,wd??(wd=new Map),xd??(xd=new Map),_d??(_d=new Map),Ed??(Ed=new Map),mr??(mr=new Map),Li??(Li=new Map),Td??(Td=new Map),Ad??(Ad=new Map),Cd??(Cd=new Map),Nd??(Nd=new Map)}function xc(){--wv||(wd=void 0,xd=void 0,_d=void 0,Ed=void 0,mr=void 0,Li=void 0,Td=void 0,Ad=void 0,Cd=void 0,Nd=void 0),dd()}const lT={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};let oT=0;function xv(n){const e=n.boxes;return n.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:n.refPrefix,includeGenericRole:!0,renderActive:!n.doNotRenderActive,renderCursorPointer:!0,renderBoxes:e}:n.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none",renderBoxes:e}:n.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0,renderBoxes:e}:{visibility:"aria",refs:"none",renderBoxes:e}}function yr(n,e){const i=xv(e),r=new Set,l={root:{role:"fragment",name:"",children:[],props:{},box:uc(n),receivesPointerEvents:!0},elements:new Map,refs:new Map,iframeRefs:[]};zh(l.root,n);const o=(f,d,g)=>{if(r.has(d))return;if(r.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!g)return;const x=d.nodeValue;f.role!=="textbox"&&x&&f.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const b=d,m=!pn(b);let S=m;if(i.visibility==="ariaOrVisible"&&(S=m||ni(b)),i.visibility==="ariaAndVisible"&&(S=m&&ni(b)),i.visibility==="aria"&&!S)return;const w=[];if(b.hasAttribute("aria-owns")){const x=b.getAttribute("aria-owns").split(/\s+/);for(const _ of x){const A=n.ownerDocument.getElementById(_);A&&w.push(A)}}const E=S?cT(b,i):null;E&&(E.ref&&(l.elements.set(E.ref,b),l.refs.set(b,E.ref),E.role==="iframe"&&l.iframeRefs.push(E.ref)),f.children.push(E)),u(E||f,b,w,S)};function u(f,d,g,b){var E;const S=(((E=Hi(d))==null?void 0:E.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";S&&f.children.push(S),f.children.push(Wa(d,"::before")||"");const w=d.nodeName==="SLOT"?d.assignedNodes():[];if(w.length)for(const x of w)o(f,x,b);else{for(let x=d.firstChild;x;x=x.nextSibling)x.assignedSlot||o(f,x,b);if(d.shadowRoot)for(let x=d.shadowRoot.firstChild;x;x=x.nextSibling)o(f,x,b)}for(const x of g)o(f,x,b);if(f.children.push(Wa(d,"::after")||""),S&&f.children.push(S),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}}wc();try{o(l.root,n,!0)}finally{xc()}return fT(l.root),uT(l.root),l}function Eb(n,e){if(e.refs==="none"||e.refs==="interactable"&&(!n.box.visible||!n.receivesPointerEvents))return;const i=_c(n);let r=i._ariaRef;(!r||r.role!==n.role||r.name!==n.name)&&(r={role:n.role,name:n.name,ref:(e.refPrefix??"")+"e"+ ++oT},i._ariaRef=r),n.ref=r.ref}function cT(n,e){const i=n.ownerDocument.activeElement===n;if(n.nodeName==="IFRAME"){const g={role:"iframe",name:"",children:[],props:{},box:uc(n),receivesPointerEvents:!0,active:i};return zh(g,n),Eb(g,e),g}const r=e.includeGenericRole?"generic":null,l=xt(n)??r;if(!l||l==="presentation"||l==="none")return null;const o=ut(rl(n,!1)||""),u=aT(n),f=uc(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:{},box:f,receivesPointerEvents:u,active:i};return zh(d,n),Eb(d,e),md.includes(l)&&(d.checked=pv(n)),bv.includes(l)&&(d.disabled=fc(n)),vd.includes(l)&&(d.expanded=mv(n)),Sd.includes(l)&&(d.level=yv(n)),bd.includes(l)&&(d.pressed=gv(n)),gd.includes(l)&&(d.selected=dv(n)),(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.type!=="checkbox"&&n.type!=="radio"&&n.type!=="file"&&(d.children=[n.value]),d}function uT(n){const e=i=>{const r=[];for(const o of i.children||[]){if(typeof o=="string"){r.push(o);continue}const u=e(o);r.push(...u)}return i.role==="generic"&&!i.name&&r.length<=1&&r.every(o=>typeof o!="string"&&!!o.ref)?r:(i.children=r,[i])};e(n)}function fT(n){const e=(r,l)=>{if(!r.length)return;const o=ut(r.join(""));o&&l.push(o),r.length=0},i=r=>{const l=[],o=[];for(const u of r.children||[])typeof u=="string"?o.push(u):(e(o,l),i(u),l.push(u));e(o,l),r.children=l.length?l:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};i(n)}function hT(n,e){return e?n?typeof e=="string"?n===e:!!n.match(new RegExp(e.pattern)):!1:!0}function Tb(n,e){if(!(e!=null&&e.normalized))return!0;if(!n)return!1;if(n===e.normalized||n===e.raw)return!0;const i=dT(e);return i?!!n.match(i):!1}const hh=Symbol("cachedRegex");function dT(n){if(n[hh]!==void 0)return n[hh];const{raw:e}=n,i=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let r;try{r=i?new RegExp(e.slice(1,-1)):null}catch{r=null}return n[hh]=r,r}function Ab(n,e){const i=yr(n,{mode:"default"});return{matches:_v(i.root,e,!1,!1),received:{raw:br(i,{mode:"default"}).text,regex:br(i,{mode:"codegen"}).text}}}function pT(n,e){const i=yr(n,{mode:"default"}).root;return _v(i,e,!0,!1).map(l=>_c(l))}function kd(n,e,i){var r;return typeof n=="string"&&e.kind==="text"?Tb(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||!hT(n.name,e.name)||!Tb(n.props.url,(r=e.props)==null?void 0:r.url)?!1:e.containerMode==="contain"?Nb(n.children||[],e.children||[]):e.containerMode==="equal"?Cb(n.children||[],e.children||[],!1):e.containerMode==="deep-equal"||i?Cb(n.children||[],e.children||[],!0):Nb(n.children||[],e.children||[])}function Cb(n,e,i){if(e.length!==n.length)return!1;for(let r=0;r<e.length;++r)if(!kd(n[r],e[r],i))return!1;return!0}function Nb(n,e){if(e.length>n.length)return!1;const i=n.slice(),r=e.slice();for(const l of r){let o=i.shift();for(;o&&!kd(o,l,!1);)o=i.shift();if(!o)return!1}return!0}function _v(n,e,i,r){const l=[],o=(u,f)=>{if(kd(u,e,r)){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 Ev(n,e=new Map){n!=null&&n.ref&&e.set(n.ref,n);for(const i of(n==null?void 0:n.children)||[])typeof i!="string"&&Ev(i,e);return e}function gT(n,e){var o;const i=Ev(e==null?void 0:e.root),r=new Map,l=(u,f)=>{let d=u.children.length===(f==null?void 0:f.children.length)&&UE(u,f),g=d;for(let b=0;b<u.children.length;b++){const m=u.children[b],S=f==null?void 0:f.children[b];if(typeof m=="string")d&&(d=m===S),g&&(g=m===S);else{let w=typeof S!="string"?S:void 0;m.ref&&(w=i.get(m.ref));const E=l(m,w);(!w||!E&&!m.ref||w!==S)&&(g=!1),d&&(d=E&&w===S)}}return r.set(u,d?"same":g?"skip":"changed"),d};return l(n.root,i.get((o=e==null?void 0:e.root)==null?void 0:o.ref)),r}function mT(n,e){const i=[],r=l=>{const o=e.get(l);if(o!=="same")if(o==="skip")for(const u of l.children)typeof u!="string"&&r(u);else i.push(l)};for(const l of n)typeof l=="string"?i.push(l):r(l);return i}function Do(n){return"  ".repeat(n)}function br(n,e,i){const r=xv(e),l=[],o={},u=r.renderStringsAsRegex?bT:()=>!0,f=r.renderStringsAsRegex?yT:E=>E;let d=n.root.role==="fragment"?n.root.children:[n.root];const g=gT(n,i);i&&(d=mT(d,g));const b=(E,x)=>{if(e.depth&&x>e.depth)return;const _=uh(f(E));_&&l.push(Do(x)+"- text: "+_)},m=(E,x)=>{let _=E.role;if(E.name&&E.name.length<=900){const A=f(E.name);if(A){const N=A.startsWith("/")&&A.endsWith("/")?A:JSON.stringify(A);_+=" "+N}}if(E.checked==="mixed"&&(_+=" [checked=mixed]"),E.checked===!0&&(_+=" [checked]"),E.disabled&&(_+=" [disabled]"),E.expanded&&(_+=" [expanded]"),E.active&&r.renderActive&&(_+=" [active]"),E.level&&(_+=` [level=${E.level}]`),E.pressed==="mixed"&&(_+=" [pressed=mixed]"),E.pressed===!0&&(_+=" [pressed]"),E.selected===!0&&(_+=" [selected]"),E.ref&&(_+=` [ref=${E.ref}]`,x&&oc(E)&&(_+=" [cursor=pointer]")),r.renderBoxes){const A=_c(E);if(A){const N=A.getBoundingClientRect();_+=` [box=${Math.round(N.x)},${Math.round(N.y)},${Math.round(N.width)},${Math.round(N.height)}]`}}return _},S=E=>(E==null?void 0:E.children.length)===1&&typeof E.children[0]=="string"&&!Object.keys(E.props).length?E.children[0]:void 0,w=(E,x,_)=>{if(e.depth&&x>e.depth)return;if(E.role==="iframe"&&E.ref&&(o[E.ref]=x),g.get(E)==="same"&&E.ref){l.push(Do(x)+`- ref=${E.ref} [unchanged]`);return}const A=!!i&&!x,N=Do(x)+"- "+(A?"<changed> ":"")+$E(m(E,_)),$=S(E),G=!!e.depth&&x===e.depth;if(!$&&(!E.children.length||G)&&!Object.keys(E.props).length)l.push(N);else if($!==void 0)u(E,$)?l.push(N+": "+uh(f($))):l.push(N);else{l.push(N+":");for(const[L,B]of Object.entries(E.props))l.push(Do(x+1)+"- /"+L+": "+uh(B));const U=!!E.ref&&_&&oc(E);for(const L of E.children)typeof L=="string"?b(u(E,L)?L:"",x+1):w(L,x+1,_&&!U)}};for(const E of d)typeof E=="string"?b(E,0):w(E,0,!!r.renderCursorPointer);return{text:l.join(`
`),iframeDepths:o}}function yT(n){const e=[{regex:/\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b/,replacement:"[0-9a-fA-F-]+"},{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let i="",r=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+=lc(n.slice(r,f));for(let g=0;g<d.length;g++)if(d[g]){const{replacement:b}=e[g];i+=b;break}return r=f+o.length,o}),i?(i+=lc(n.slice(r)),String(new RegExp(i))):n}function bT(n,e){if(!e.length)return!1;if(!n.name)return!0;const i=e.length<=200&&n.name.length<=200?l_(e,n.name):"";let r=e;for(;i&&r.includes(i);)r=r.replace(i,"");return r.trim().length/e.length>.1}const Tv=Symbol("element");function _c(n){return n[Tv]}function zh(n,e){n[Tv]=e}function vT(n,e){const i=qE(n,e);return i?_c(i):void 0}const kb=":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-title{position:absolute;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#00000080;color:#fff;border-radius:6px;padding:6px;font-size:24px;line-height:1.4;white-space:nowrap;-webkit-user-select:none;user-select:none;z-index:3}x-pw-user-overlays,x-pw-user-overlay{position:absolute;top:0;right:0;bottom:0;left:0}@keyframes pw-fade-out{0%{opacity:1}to{opacity:0}}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 dh{constructor(e){this._renderedEntries=[],this._userOverlays=new Map,this._userOverlayHidden=!1,this._language="javascript",this._elementHighlightSelectors=new Map,this._injectedScript=e;const i=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=i.createElement("x-pw-glass"),this._glassPaneElement.setAttribute("popover","manual"),this._glassPaneElement.style.inset="0",this._glassPaneElement.style.width="100%",this._glassPaneElement.style.height="100%",this._glassPaneElement.style.maxWidth="none",this._glassPaneElement.style.maxHeight="none",this._glassPaneElement.style.padding="0",this._glassPaneElement.style.margin="0",this._glassPaneElement.style.border="none",this._glassPaneElement.style.overflow="visible",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent",this._actionPointElement=i.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._titleElement=i.createElement("x-pw-title"),this._titleElement.setAttribute("hidden","true"),this._userOverlayContainer=i.createElement("x-pw-user-overlays"),this._userOverlayContainer.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const r=new this._injectedScript.window.CSSStyleSheet;r.replaceSync(kb),this._glassPaneShadow.adoptedStyleSheets.push(r)}else{const r=this._injectedScript.document.createElement("style");r.textContent=kb,this._glassPaneShadow.appendChild(r)}this._glassPaneShadow.appendChild(this._actionPointElement),this._glassPaneShadow.appendChild(this._titleElement),this._glassPaneShadow.appendChild(this._userOverlayContainer)}install(){this._injectedScript.document.documentElement&&((!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement),this._bringToFront())}_bringToFront(){this._glassPaneElement.hidePopover(),this._glassPaneElement.showPopover()}setLanguage(e){this._language=e}addElementHighlight(e,i){const r=gn(e);this._elementHighlightSelectors.set(r,{selector:e,cssStyle:i}),this._ensureElementHighlightRaf()}removeElementHighlight(e){const i=gn(e);this._elementHighlightSelectors.delete(i)&&this._elementHighlightSelectors.size===0&&(this._rafRequest&&(this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),this._rafRequest=void 0),this.clearHighlight())}_ensureElementHighlightRaf(){if(this._rafRequest)return;const e=()=>{const i=[];for(const{selector:r,cssStyle:l}of this._elementHighlightSelectors.values()){const o=this._injectedScript.querySelectorAll(r,this._injectedScript.document.documentElement),u=Di(this._language,gn(r)),f=o.length>1?"#f6b26b7f":"#6fa8dc7f";for(let d=0;d<o.length;++d){const g=o.length>1?` [${d+1} of ${o.length}]`:"";i.push({element:o[d],color:f,tooltipText:u+g,cssStyle:l})}}this.updateHighlight(i),this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(e)};this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(e)}uninstall(){this._rafRequest&&(this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),this._rafRequest=void 0),this._elementHighlightSelectors.clear(),this._glassPaneElement.remove()}showActionPoint(e,i,r){this._actionPointElement.style.top=i+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1,r?this._actionPointElement.style.animation=`pw-fade-out ${r}ms ease-out forwards`:this._actionPointElement.style.animation=""}hideActionPoint(){this._actionPointElement.hidden=!0}showActionTitle(e,i,r,l){if(this._titleElement.textContent=e,this._titleElement.hidden=!1,i){const o=i/4;this._titleElement.style.animation=`pw-fade-out ${o}ms ease-out ${i-o}ms forwards`}else this._titleElement.style.animation="";switch(this._titleElement.style.top="",this._titleElement.style.bottom="",this._titleElement.style.left="",this._titleElement.style.right="",this._titleElement.style.transform="",r){case"top-left":this._titleElement.style.top="6px",this._titleElement.style.left="6px";break;case"top":this._titleElement.style.top="6px",this._titleElement.style.left="50%",this._titleElement.style.transform="translateX(-50%)";break;case"bottom-left":this._titleElement.style.bottom="6px",this._titleElement.style.left="6px";break;case"bottom":this._titleElement.style.bottom="6px",this._titleElement.style.left="50%",this._titleElement.style.transform="translateX(-50%)";break;case"bottom-right":this._titleElement.style.bottom="6px",this._titleElement.style.right="6px";break;case"top-right":default:this._titleElement.style.top="6px",this._titleElement.style.right="6px";break}l&&(this._titleElement.style.fontSize=l+"px")}hideActionTitle(){this._titleElement.hidden=!0}addUserOverlay(e,i){const r=this._injectedScript.document.createElement("div");r.className="x-pw-user-overlay",r.innerHTML=i;for(const l of r.querySelectorAll("script"))l.remove();for(const l of r.querySelectorAll("*"))for(const o of[...l.attributes])o.name.startsWith("on")&&l.removeAttribute(o.name);return this._userOverlays.set(e,r),this._userOverlayContainer.appendChild(r),this._userOverlayContainer.hidden=this._userOverlayHidden,e}getUserOverlay(e){return this._userOverlays.get(e)}removeUserOverlay(e){const i=this._userOverlays.get(e);i&&(i.remove(),this._userOverlays.delete(e)),this._userOverlays.size===0&&(this._userOverlayContainer.hidden=!0)}setUserOverlaysVisible(e){this._userOverlayHidden=!e,this._userOverlayContainer.hidden=!e||this._userOverlays.size===0}clearHighlight(){var e,i;for(const r of this._renderedEntries)(e=r.highlightElement)==null||e.remove(),(i=r.tooltipElement)==null||i.remove();this._renderedEntries=[]}maskElements(e,i){this.updateHighlight(e.map(r=>({element:r,color:i})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const i of e){const r=this._createHighlightElement();this._glassPaneShadow.appendChild(r);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,box:Mb(i.box),color:i.color,borderColor:i.borderColor,fadeDuration:i.fadeDuration,cssStyle:i.cssStyle,tooltipElement:l,highlightElement:r})}for(const i of this._renderedEntries){if(!i.box&&!i.targetElement||(i.box=i.box||i.targetElement.getBoundingClientRect(),!i.tooltipElement))continue;const{anchorLeft:r,anchorTop:l}=this.tooltipPosition(i.box,i.tooltipElement);i.tooltipTop=l,i.tooltipLeft=r}for(const i of this._renderedEntries){i.tooltipElement&&(i.tooltipElement.style.top=i.tooltipTop+"px",i.tooltipElement.style.left=i.tooltipLeft+"px");const r=i.box;i.highlightElement.style.backgroundColor=i.color,i.highlightElement.style.left=r.x+"px",i.highlightElement.style.top=r.y+"px",i.highlightElement.style.width=r.width+"px",i.highlightElement.style.height=r.height+"px",i.highlightElement.style.display="block",i.borderColor&&(i.highlightElement.style.border="2px solid "+i.borderColor),i.fadeDuration&&(i.highlightElement.style.animation=`pw-fade-out ${i.fadeDuration}ms ease-out forwards`),i.cssStyle&&(i.highlightElement.style.cssText+=";"+i.cssStyle),this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:r.x,y:r.y,width:r.width,height:r.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 r=i.offsetWidth,l=i.offsetHeight,o=this._glassPaneElement.offsetWidth,u=this._glassPaneElement.offsetHeight;let f=Math.max(5,e.left);f+r>o-5&&(f=o-r-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||e[i].cssStyle!==this._renderedEntries[i].cssStyle)return!1;const r=this._renderedEntries[i].box;if(!r)return!1;const l=e[i].box?Mb(e[i].box):e[i].element.getBoundingClientRect();if(l.top!==r.top||l.right!==r.right||l.bottom!==r.bottom||l.left!==r.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 Mb(n){if(n)return new DOMRect(n.x,n.y,n.width,n.height)}function ST(n,e,i){const r=n.left-e.right;if(!(r<0||i!==void 0&&r>i))return r+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function wT(n,e,i){const r=e.left-n.right;if(!(r<0||i!==void 0&&r>i))return r+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function xT(n,e,i){const r=e.top-n.bottom;if(!(r<0||i!==void 0&&r>i))return r+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function _T(n,e,i){const r=n.top-e.bottom;if(!(r<0||i!==void 0&&r>i))return r+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function ET(n,e,i){const r=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>r?void 0:l}const TT=["left-of","right-of","above","below","near"];function Av(n,e,i,r){const l=e.getBoundingClientRect(),o={"left-of":wT,"right-of":ST,above:xT,below:_T,near:ET}[n];let u;for(const f of i){if(f===e)continue;const d=o(l,f.getBoundingClientRect(),r);d!==void 0&&(u===void 0||d<u)&&(u=d)}return u}function Ob(n,e){const i=typeof n=="string"&&!e.caseSensitive?n.toUpperCase():n,r=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!i:e.op==="="?r instanceof RegExp?typeof i=="string"&&!!i.match(r):i===r:typeof i!="string"||typeof r!="string"?!1:e.op==="*="?i.includes(r):e.op==="^="?i.startsWith(r):e.op==="$="?i.endsWith(r):e.op==="|="?i===r||i.startsWith(r+"-"):e.op==="~="?i.split(" ").includes(r):!1}function Md(n){const e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}function Vt(n,e){let i=n.get(e);if(i===void 0){if(i={full:"",normalized:"",immediate:[]},!Md(e)){let r="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))i={full:e.value,normalized:ut(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||"",r+=l.nodeValue||"";else{if(l.nodeType===Node.COMMENT_NODE)continue;r&&i.immediate.push(r),r="",l.nodeType===Node.ELEMENT_NODE&&(i.full+=Vt(n,l).full)}r&&i.immediate.push(r),e.shadowRoot&&(i.full+=Vt(n,e.shadowRoot).full),i.full&&(i.normalized=ut(i.full))}}n.set(e,i)}return i}function Ec(n,e,i){if(Md(e)||!i(Vt(n,e)))return"none";for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&i(Vt(n,r)))return"selfAndChildren";return e.shadowRoot&&i(Vt(n,e.shadowRoot))?"selfAndChildren":"self"}function Cv(n,e){const i=hv(e);if(i)return i.map(o=>Vt(n,o));const r=e.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:ut(r),immediate:[r]}];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=>Vt(n,u))}return[]}const Nv=["selected","checked","pressed","expanded","level","disabled","name","description","include-hidden"];Nv.sort();function Ua(n,e,i){if(!e.includes(i))throw new Error(`"${n}" attribute is only supported for roles: ${e.slice().sort().map(r=>`"${r}"`).join(", ")}`)}function lr(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 or(n,e){if(!e.includes(n.op))throw new Error(`"${n.name}" does not support "${n.op}" matcher`)}function AT(n,e){const i={role:e};for(const r of n)switch(r.name){case"checked":{Ua(r.name,md,e),lr(r,[!0,!1,"mixed"]),or(r,["<truthy>","="]),i.checked=r.op==="<truthy>"?!0:r.value;break}case"pressed":{Ua(r.name,bd,e),lr(r,[!0,!1,"mixed"]),or(r,["<truthy>","="]),i.pressed=r.op==="<truthy>"?!0:r.value;break}case"selected":{Ua(r.name,gd,e),lr(r,[!0,!1]),or(r,["<truthy>","="]),i.selected=r.op==="<truthy>"?!0:r.value;break}case"expanded":{Ua(r.name,vd,e),lr(r,[!0,!1]),or(r,["<truthy>","="]),i.expanded=r.op==="<truthy>"?!0:r.value;break}case"level":{if(Ua(r.name,Sd,e),typeof r.value=="string"&&(r.value=+r.value),r.op!=="="||typeof r.value!="number"||Number.isNaN(r.value))throw new Error('"level" attribute must be compared to a number');i.level=r.value;break}case"disabled":{lr(r,[!0,!1]),or(r,["<truthy>","="]),i.disabled=r.op==="<truthy>"?!0:r.value;break}case"name":{if(r.op==="<truthy>")throw new Error('"name" attribute must have a value');if(typeof r.value!="string"&&!(r.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');i.name=r.value,i.nameOp=r.op,i.nameExact=r.caseSensitive;break}case"description":{if(r.op==="<truthy>")throw new Error('"description" attribute must have a value');if(typeof r.value!="string"&&!(r.value instanceof RegExp))throw new Error('"description" attribute must be a string or a regular expression');i.description=r.value,i.descriptionOp=r.op,i.descriptionExact=r.caseSensitive;break}case"include-hidden":{lr(r,[!0,!1]),or(r,["<truthy>","="]),i.includeHidden=r.op==="<truthy>"?!0:r.value;break}default:throw new Error(`Unknown attribute "${r.name}", must be one of ${Nv.map(l=>`"${l}"`).join(", ")}.`)}return i}function CT(n,e,i){const r=[],l=u=>{if(xt(u)===e.role&&!(e.selected!==void 0&&dv(u)!==e.selected)&&!(e.checked!==void 0&&pv(u)!==e.checked)&&!(e.pressed!==void 0&&gv(u)!==e.pressed)&&!(e.expanded!==void 0&&mv(u)!==e.expanded)&&!(e.level!==void 0&&yv(u)!==e.level)&&!(e.disabled!==void 0&&fc(u)!==e.disabled)&&!(!e.includeHidden&&pn(u))){if(e.name!==void 0){const f=ut(rl(u,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=ut(e.name)),i&&!e.nameExact&&e.nameOp==="="&&(e.nameOp="*="),!Ob(f,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.nameExact}))return}if(e.description!==void 0){const f=ut(al(u,!!e.includeHidden));if(typeof e.description=="string"&&(e.description=ut(e.description)),i&&!e.descriptionExact&&e.descriptionOp==="="&&(e.descriptionOp="*="),!Ob(f,{op:e.descriptionOp||"=",value:e.description,caseSensitive:!!e.descriptionExact}))return}r.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),r}function jb(n){return{queryAll:(e,i)=>{const r=Qa(i),l=r.name.toLowerCase();if(!l)throw new Error("Role must not be empty");const o=AT(r.attributes,l);wc();try{return CT(e,o,n)}finally{xc()}}}}class NT{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",OT),this._engines.set("is",Ga),this._engines.set("where",Ga),this._engines.set("has",kT),this._engines.set("scope",MT),this._engines.set("light",jT),this._engines.set("visible",LT),this._engines.set("text",RT),this._engines.set("text-is",DT),this._engines.set("text-matches",zT),this._engines.set("has-text",UT),this._engines.set("right-of",Ha("right-of")),this._engines.set("left-of",Ha("left-of")),this._engines.set("above",Ha("above")),this._engines.set("below",Ha("below")),this._engines.set("near",Ha("near")),this._engines.set("nth-match",HT);const e=[...this._engines.keys()];e.sort();const i=[...L0];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,r,l){e.has(i)||e.set(i,[]);const o=e.get(i),u=o.find(d=>r.every((g,b)=>d.rest[b]===g));if(u)return u.result;const f=l();return o.push({rest:r,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,r){const l=this._checkSelector(i);this.begin();try{return this._cached(this._cacheMatches,e,[l,r.scope,r.pierceShadow,r.originalScope],()=>Array.isArray(l)?this._matchesEngine(Ga,e,l,r):(this._hasScopeClause(l)&&(r=this._expandContextForScopeMatching(r)),this._matchesSimple(e,l.simples[l.simples.length-1].selector,r)?this._matchesParents(e,l,l.simples.length-2,r):!1))}finally{this.end()}}query(e,i){const r=this._checkSelector(i);this.begin();try{return this._cached(this._cacheQuery,r,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(r))return this._queryEngine(Ga,e,r);this._hasScopeClause(r)&&(e=this._expandContextForScopeMatching(e));const l=this._scoreMap;this._scoreMap=new Map;let o=this._querySimple(e,r.simples[r.simples.length-1].selector);return o=o.filter(u=>this._matchesParents(u,r,r.simples.length-2,e)),this._scoreMap.size&&o.sort((u,f)=>{const d=this._scoreMap.get(u),g=this._scoreMap.get(f);return d===g?0:d===void 0?1:g===void 0?-1:d-g}),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(r=>r.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const i=Et(e.scope);return i?{...e,scope:i,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,i,r){return this._cached(this._cacheMatchesSimple,e,[i,r.scope,r.pierceShadow,r.originalScope],()=>{if(e===r.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,r))return!1;return!0})}_querySimple(e,i){return i.functions.length?this._cached(this._cacheQuerySimple,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=i.css;const l=i.functions;r==="*"&&l.length&&(r=void 0);let o,u=-1;r!==void 0?o=this._queryCSS(e,r):(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(g=>this._matchesEngine(d,g,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(g=>this._matchesEngine(d,g,l[f].args,e)))}return o}):this._queryCSS(e,i.css||"*")}_matchesParents(e,i,r,l){return r<0?!0:this._cached(this._cacheMatchesParents,e,[i,r,l.scope,l.pierceShadow,l.originalScope],()=>{const{selector:o,combinator:u}=i.simples[r];if(u===">"){const f=zo(e,l);return!f||!this._matchesSimple(f,o,l)?!1:this._matchesParents(f,i,r-1,l)}if(u==="+"){const f=ph(e,l);return!f||!this._matchesSimple(f,o,l)?!1:this._matchesParents(f,i,r-1,l)}if(u===""){let f=zo(e,l);for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,r-1,l))return!0;if(i.simples[r-1].combinator==="")break}f=zo(f,l)}return!1}if(u==="~"){let f=ph(e,l);for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,r-1,l))return!0;if(i.simples[r-1].combinator==="~")break}f=ph(f,l)}return!1}if(u===">="){let f=e;for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,r-1,l))return!0;if(i.simples[r-1].combinator==="")break}f=zo(f,l)}return!1}throw new Error(`Unsupported combinator "${u}"`)})}_matchesEngine(e,i,r,l){if(e.matches)return this._callMatches(e,i,r,l);if(e.query)return this._callQuery(e,r,l).includes(i);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,i,r){if(e.query)return this._callQuery(e,r,i);if(e.matches)return this._queryCSS(i,"*").filter(l=>this._callMatches(e,l,r,i));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,i,r,l){return this._cached(this._cacheCallMatches,i,[e,l.scope,l.pierceShadow,l.originalScope,...r],()=>e.matches(i,r,l,this))}_callQuery(e,i,r){return this._cached(this._cacheCallQuery,e,[r.scope,r.pierceShadow,r.originalScope,...i],()=>e.query(r,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 r=[];function l(o){if(r=r.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),r})}_getEngine(e){const i=this._engines.get(e);if(!i)throw new Error(`Unknown selector engine "${e}"`);return i}}const Ga={matches(n,e,i,r){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(l=>r.matches(n,l,i))},query(n,e,i){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let r=[];for(const l of e)r=r.concat(i.query(n,l));return e.length===1?r:kv(r)}},kT={matches(n,e,i,r){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return r.query({...i,scope:n},e).length>0}},MT={matches(n,e,i,r){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 r=n.originalScope||n.scope;if(r.nodeType===9){const l=r.documentElement;return l?[l]:[]}return r.nodeType===1?[r]:[]}},OT={matches(n,e,i,r){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!r.matches(n,e,i)}},jT={query(n,e,i){return i.query({...n,pierceShadow:!1},e)},matches(n,e,i,r){return r.matches(n,e,{...i,pierceShadow:!1})}},LT={matches(n,e,i,r){if(e.length)throw new Error('"visible" engine expects no arguments');return ni(n)}},RT={matches(n,e,i,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const l=ut(e[0]).toLowerCase(),o=u=>u.normalized.toLowerCase().includes(l);return Ec(r._cacheText,n,o)==="self"}},DT={matches(n,e,i,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const l=ut(e[0]),o=u=>!l&&!u.immediate.length?!0:u.immediate.some(f=>ut(f)===l);return Ec(r._cacheText,n,o)!=="none"}},zT={matches(n,e,i,r){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 Ec(r._cacheText,n,o)==="self"}},UT={matches(n,e,i,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(Md(n))return!1;const l=ut(e[0]).toLowerCase();return(u=>u.normalized.toLowerCase().includes(l))(Vt(r._cacheText,n))}};function Ha(n){return{matches(e,i,r,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(r,u),d=Av(n,e,f,o);return d===void 0?!1:(l._markScore(e,d),!0)}}}const HT={query(n,e,i){let r=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 r!="number"||r<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const l=Ga.query(n,e.slice(0,e.length-1),i);return r--,r<l.length?[l[r]]:[]}};function zo(n,e){if(n!==e.scope)return e.pierceShadow?Et(n):n.parentElement||void 0}function ph(n,e){if(n!==e.scope)return n.previousElementSibling||void 0}function kv(n){const e=new Map,i=[],r=[];function l(u){let f=e.get(u);if(f)return f;const d=Et(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&&r.push(u),f.children.length>1){const d=new Set(f.children);f.children=[];let g=u.firstElementChild;for(;g&&f.children.length<d.size;)d.has(g)&&f.children.push(g),g=g.nextElementSibling;for(g=u.shadowRoot?u.shadowRoot.firstElementChild:null;g&&f.children.length<d.size;)d.has(g)&&f.children.push(g),g=g.nextElementSibling}f.children.forEach(o)}return i.forEach(o),r}const Mv=10,jr=Mv/2,Lb=1,BT=2,qT=10,$T=50,Uh=100,Ov=120,jv=140,Lv=160,Jo=180,Rv=200,Rb=250,IT=Ov+jr,VT=jv+jr,Db=Uh+jr,GT=Lv+jr,KT=Jo+jr,XT=Rv+jr,YT=300,FT=500,Hh=510,gh=520,Dv=530,Bh=1e4,QT=1e7,PT=1e3;function zb(n,e,i){n._evaluator.begin();const r={allowText:new Map,disallowText:new Map};wc(),hd();try{let l=[];if(i.forTextExpect){let f=Ka(n,e.ownerDocument.documentElement,i);for(let d=e;d;d=Et(d)){const g=os(r,n,d,{...i,noText:!0});if(!g)continue;if(cs(g)<=PT){f=g;break}}l=[Zo(f)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const f=Va(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",i.root);f&&ni(f)&&(e=f)}if(i.multiple){const f=os(r,n,e,i),d=os(r,n,e,{...i,noText:!0});let g=[f,d];if(r.allowText.clear(),r.disallowText.clear(),f&&mh(f)&&g.push(os(r,n,e,{...i,noCSSId:!0})),d&&mh(d)&&g.push(os(r,n,e,{...i,noText:!0,noCSSId:!0})),g=g.filter(Boolean),!g.length){const b=Ka(n,e,i);g.push(b),mh(b)&&g.push(Ka(n,e,{...i,noCSSId:!0}))}l=[...new Set(g.map(b=>Zo(b)))]}else{const f=os(r,n,e,i)||Ka(n,e,i);l=[Zo(f)]}}const o=l[0],u=n.parseSelector(o);return{selector:o,selectors:l,elements:n.querySelectorAll(u,i.root??e.ownerDocument)}}finally{dd(),xc(),n._evaluator.end()}}function os(n,e,i,r){if(r.root&&!Dh(r.root,i))throw new Error("Target element must belong to the root's subtree");if(i===r.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||cs(f)<cs(l))&&(l=f)},u=[];if(!r.noText)for(const f of ZT(e,i,!r.isRecursive))u.push({candidate:f,isTextCandidate:!0});for(const f of JT(e,i,r))r.omitInternalEngines&&f.engine.startsWith("internal:")||u.push({candidate:[f],isTextCandidate:!1});u.sort((f,d)=>cs(f.candidate)-cs(d.candidate));for(const{candidate:f,isTextCandidate:d}of u){const g=e.querySelectorAll(e.parseSelector(Zo(f)),r.root??i.ownerDocument);if(!g.includes(i))continue;if(g.length===1){o(f);break}const b=g.indexOf(i);if(!(b>5)&&(o([...f,{engine:"nth",selector:String(b),score:Bh}]),!r.isRecursive))for(let m=Et(i);m&&m!==r.root;m=Et(m)){const S=g.filter($=>Dh(m,$)&&$!==m),w=S.indexOf(i);if(S.length>5||w===-1||w===b&&S.length>1)continue;const E=S.length===1?f:[...f,{engine:"nth",selector:String(w),score:Bh}];if(l&&cs([{engine:"",selector:"",score:1},...E])>=cs(l))continue;const _=!!r.noText||d,A=_?n.disallowText:n.allowText;let N=A.get(m);N===void 0&&(N=os(n,e,m,{...r,isRecursive:!0,noText:_})||Ka(e,m,r),A.set(m,N)),N&&o([...N,...E])}}return l}function JT(n,e,i){const r=[];{for(const u of["data-testid","data-test-id","data-test"])u!==i.testIdAttributeName&&e.getAttribute(u)&&r.push({engine:"css",selector:`[${u}=${dr(e.getAttribute(u))}]`,score:BT});if(!i.noCSSId){const u=e.getAttribute("id");u&&!WT(u)&&r.push({engine:"css",selector:zv(u),score:FT})}r.push({engine:"css",selector:ti(e),score:Dv})}if(e.nodeName==="IFRAME"){for(const u of["name","title"])e.getAttribute(u)&&r.push({engine:"css",selector:`${ti(e)}[${u}=${dr(e.getAttribute(u))}]`,score:qT});return e.getAttribute(i.testIdAttributeName)&&r.push({engine:"css",selector:`[${i.testIdAttributeName}=${dr(e.getAttribute(i.testIdAttributeName))}]`,score:Lb}),qh([r]),r}if(e.getAttribute(i.testIdAttributeName)&&r.push({engine:"internal:testid",selector:`[${i.testIdAttributeName}=${Je(e.getAttribute(i.testIdAttributeName),!0)}]`,score:Lb}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e;if(u.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${Je(u.placeholder,!0)}]`,score:IT});for(const f of hs(u.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${Je(f.text,!1)}]`,score:Ov-f.scoreBonus})}}const l=Cv(n._evaluator._cacheText,e);for(const u of l){const f=u.normalized;r.push({engine:"internal:label",selector:$t(f,!0),score:VT});for(const d of hs(f))r.push({engine:"internal:label",selector:$t(d.text,!1),score:jv-d.scoreBonus})}const o=xt(e);return o&&!["none","presentation"].includes(o)&&r.push({engine:"internal:role",selector:o,score:Hh}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&r.push({engine:"css",selector:`${ti(e)}[name=${dr(e.getAttribute("name"))}]`,score:gh}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&r.push({engine:"css",selector:`${ti(e)}[type=${dr(e.getAttribute("type"))}]`,score:gh}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:ti(e),score:gh+1}),qh([r]),r}function ZT(n,e,i){if(e.nodeName==="SELECT")return[];const r=[],l=e.getAttribute("title");if(l){r.push([{engine:"internal:attr",selector:`[title=${Je(l,!0)}]`,score:XT}]);for(const g of hs(l))r.push([{engine:"internal:attr",selector:`[title=${Je(g.text,!1)}]`,score:Rv-g.scoreBonus}])}const o=e.getAttribute("alt");if(o&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${Je(o,!0)}]`,score:GT}]);for(const g of hs(o))r.push([{engine:"internal:attr",selector:`[alt=${Je(g.text,!1)}]`,score:Lv-g.scoreBonus}])}const u=Vt(n._evaluator._cacheText,e).normalized,f=u?hs(u):[];if(u){if(i){u.length<=80&&r.push([{engine:"internal:text",selector:$t(u,!0),score:KT}]);for(const b of f)r.push([{engine:"internal:text",selector:$t(b.text,!1),score:Jo-b.scoreBonus}])}const g={engine:"css",selector:ti(e),score:Dv};for(const b of f)r.push([g,{engine:"internal:has-text",selector:$t(b.text,!1),score:Jo-b.scoreBonus}]);if(i&&u.length<=80){const b=new RegExp("^"+lc(u)+"$");r.push([g,{engine:"internal:has-text",selector:$t(b,!1),score:Rb}])}}const d=xt(e);if(d&&!["none","presentation"].includes(d)){const g=rl(e,!1);if(g&&!g.match(new RegExp("^\\p{Co}+$","u"))){const b={engine:"internal:role",selector:`${d}[name=${Je(g,!0)}]`,score:Db};r.push([b]);for(const S of hs(g))r.push([{engine:"internal:role",selector:`${d}[name=${Je(S.text,!1)}]`,score:Uh-S.scoreBonus}]);const m=al(e,!1);if(m){r.push([{engine:"internal:role",selector:`${d}[name=${Je(g,!0)}][description=${Je(m,!0)}]`,score:Db+1}]);for(const S of hs(g))r.push([{engine:"internal:role",selector:`${d}[name=${Je(S.text,!1)}][description=${Je(m,!0)}]`,score:Uh-S.scoreBonus+1}])}}else{const b={engine:"internal:role",selector:`${d}`,score:Hh},m=al(e,!1);m&&r.push([{engine:"internal:role",selector:`${d}[description=${Je(m,!0)}]`,score:Hh+1}]);for(const S of f)r.push([b,{engine:"internal:has-text",selector:$t(S.text,!1),score:Jo-S.scoreBonus}]);if(i&&u.length<=80){const S=new RegExp("^"+lc(u)+"$");r.push([b,{engine:"internal:has-text",selector:$t(S,!1),score:Rb}])}}}return qh(r),r}function zv(n){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(n)?"#"+n:`[id=${dr(n)}]`}function mh(n){return n.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function Ka(n,e,i){const r=i.root??e.ownerDocument,l=[];function o(f){const d=l.slice();f&&d.unshift(f);const g=d.join(" > "),b=n.parseSelector(g);return n.querySelector(b,r,!1)===e?g:void 0}function u(f){const d={engine:"css",selector:f,score:QT},g=n.parseSelector(f),b=n.querySelectorAll(g,r);if(b.length===1)return[d];const m={engine:"nth",selector:String(b.indexOf(e)),score:Bh};return[d,m]}for(let f=e;f&&f!==r;f=Et(f)){let d="";if(f.id&&!i.noCSSId){const m=zv(f.id),S=o(m);if(S)return u(S);d=m}const g=f.parentNode,b=[...f.classList].map(eA);for(let m=0;m<b.length;++m){const S="."+b.slice(0,m+1).join("."),w=o(S);if(w)return u(w);!d&&g&&g.querySelectorAll(S).length===1&&(d=S)}if(g){const m=[...g.children],S=f.nodeName,E=m.filter(_=>_.nodeName===S).indexOf(f)===0?ti(f):`${ti(f)}:nth-child(${1+m.indexOf(f)})`,x=o(E);if(x)return u(x);d||(d=E)}else d||(d=ti(f));l.unshift(d)}return u(o())}function qh(n){for(const e of n)for(const i of e)i.score>$T&&i.score<YT&&(i.score+=Math.min(Mv,i.selector.length/10|0))}function Zo(n){const e=[];let i="";for(const{engine:r,selector:l}of n)e.length&&(i!=="css"||r!=="css"||l.startsWith(":nth-match("))&&e.push(">>"),i=r,r==="css"?e.push(l):e.push(`${r}=${l}`);return e.join(" ")}function cs(n){let e=0;for(let i=0;i<n.length;i++)e+=n[i].score*(n.length-i);return e}function WT(n){let e,i=0;for(let r=0;r<n.length;++r){const l=n[r];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 Uo(n,e){if(n.length<=e)return n;n=n.substring(0,e);const i=n.match(/^(.*)\b(.+?)$/);return i?i[1].trimEnd():""}function hs(n){let e=[];{const i=n.match(/^([\d.,]+)[^.,\w]/),r=i?i[1].length:0;if(r){const l=Uo(n.substring(r).trimStart(),80);e.push({text:l,scoreBonus:l.length<=30?2:1})}}{const i=n.match(/[^.,\w]([\d.,]+)$/),r=i?i[1].length:0;if(r){const l=Uo(n.substring(0,n.length-r).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:Uo(n,80),scoreBonus:0}),e.push({text:Uo(n,30),scoreBonus:1})),e=e.filter(i=>i.text),e.length||e.push({text:n.substring(0,80),scoreBonus:0}),e}function ti(n){return n.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function eA(n){let e="";for(let i=0;i<n.length;i++)e+=tA(n,i);return e}function tA(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)}const Ub={queryAll(n,e){e.startsWith("/")&&n.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const i=[],r=n.ownerDocument||n;if(!r)return i;const l=r.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 Od(n,e,i){return`internal:attr=[${n}=${Je(e,(i==null?void 0:i.exact)||!1)}]`}function nA(n,e){return`internal:testid=[${n}=${Je(e,!0)}]`}function iA(n,e){return"internal:label="+$t(n,!!(e!=null&&e.exact))}function sA(n,e){return Od("alt",n,e)}function rA(n,e){return Od("title",n,e)}function aA(n,e){return Od("placeholder",n,e)}function lA(n,e){return"internal:text="+$t(n,!!(e!=null&&e.exact))}function oA(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",Je(e.name,!!e.exact)]),e.description!==void 0&&i.push(["description",Je(e.description,!!e.exact)]),e.pressed!==void 0&&i.push(["pressed",String(e.pressed)]),`internal:role=${n}${i.map(([r,l])=>`[${r}=${l}]`).join("")}`}const Ba=Symbol("selector"),cA=class Xa{constructor(e,i,r){if(r!=null&&r.hasText&&(i+=` >> internal:has-text=${$t(r.hasText,!1)}`),r!=null&&r.hasNotText&&(i+=` >> internal:has-not-text=${$t(r.hasNotText,!1)}`),r!=null&&r.has&&(i+=" >> internal:has="+JSON.stringify(r.has[Ba])),r!=null&&r.hasNot&&(i+=" >> internal:has-not="+JSON.stringify(r.hasNot[Ba])),(r==null?void 0:r.visible)!==void 0&&(i+=` >> visible=${r.visible?"true":"false"}`),this[Ba]=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 Xa(e,l?l+" >> "+u:u,f),o.getByTestId=u=>o.locator(nA(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),u)),o.getByAltText=(u,f)=>o.locator(sA(u,f)),o.getByLabel=(u,f)=>o.locator(iA(u,f)),o.getByPlaceholder=(u,f)=>o.locator(aA(u,f)),o.getByText=(u,f)=>o.locator(lA(u,f)),o.getByTitle=(u,f)=>o.locator(rA(u,f)),o.getByRole=(u,f={})=>o.locator(oA(u,f)),o.filter=u=>new Xa(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 Xa(e,l+" >> internal:and="+JSON.stringify(u[Ba])),o.or=u=>new Xa(e,l+" >> internal:or="+JSON.stringify(u[Ba]))}};let uA=cA;class fA{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:"default"}),resume:()=>this._resume(),...new uA(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 r=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(r,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 r=this._injectedScript.generateSelectorSimple(e);return Di(i||"javascript",r)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function hA(n){try{return n instanceof RegExp||Object.prototype.toString.call(n)==="[object RegExp]"}catch{return!1}}function dA(n){try{return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}catch{return!1}}function pA(n){try{return n instanceof URL||Object.prototype.toString.call(n)==="[object URL]"}catch{return!1}}function gA(n){var e;try{return n instanceof Error||n&&((e=Object.getPrototypeOf(n))==null?void 0:e.name)==="Error"}catch{return!1}}function mA(n,e){try{return n instanceof e||Object.prototype.toString.call(n)===`[object ${e.name}]`}catch{return!1}}function yA(n){try{return n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]"}catch{return!1}}const Uv={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function Hb(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 Bb(n,e){const i=atob(n),r=new Uint8Array(i.length);for(let l=0;l<i.length;l++)r[l]=i.charCodeAt(l);return new e(r.buffer)}function $h(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 r=new Error(n.e.m);return r.name=n.e.n,r.stack=n.e.s,r}if("r"in n)return new RegExp(n.r.p,n.r.f);if("a"in n){const r=[];i.set(n.id,r);for(const l of n.a)r.push($h(l,e,i));return r}if("o"in n){const r={};i.set(n.id,r);for(const{k:l,v:o}of n.o)l!=="__proto__"&&(r[l]=$h(o,e,i));return r}if("h"in n)return e[n.h];if("ta"in n)return Bb(n.ta.b,Uv[n.ta.k]);if("ab"in n)return Bb(n.ab.b,Uint8Array).buffer}return n}}function bA(n,e){return Ih(n,e,{visited:new Map,lastId:0})}function Ih(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 Hv(n,e,i)}function Hv(n,e,i){var o;const r=e(n);if("fallThrough"in r)n=r.fallThrough;else return r;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(gA(n)){let u;return(o=n.stack)!=null&&o.startsWith(n.name+": "+n.message)?u=n.stack:u=`${n.name}: ${n.message}
${n.stack}`,{e:{n:n.name,m:n.message,s:u}}}if(dA(n))return{d:n.toJSON()};if(pA(n))return{u:n.toJSON()};if(hA(n))return{r:{p:n.source,f:n.flags}};for(const[u,f]of Object.entries(Uv))if(mA(n,f))return{ta:{b:Hb(n),k:u}};if(yA(n))return{ab:{b:Hb(new Uint8Array(n))}};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(Ih(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 g of Object.keys(n)){let b;try{b=n[g]}catch{continue}g==="toJSON"&&typeof b=="function"?u.push({k:g,v:{o:[],id:0}}):u.push({k:g,v:Ih(b,e,i)})}let d;try{u.length===0&&n.toJSON&&typeof n.toJSON=="function"&&(d={value:n.toJSON()})}catch{}return d?Hv(d.value,e,i):{o:u,id:f}}}class vA{constructor(e,i){var r,l,o,u,f,d,g,b;this.global=e,this.isUnderTest=i,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(r=e.setTimeout)==null?void 0:r.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:(g=e.requestIdleCallback)==null?void 0:g.bind(e),cancelIdleCallback:(b=e.cancelIdleCallback)==null?void 0:b.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date,AbortSignal:e.AbortSignal},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,i,r,l,...o){const u=o.slice(0,l),f=o.slice(l),d=[];for(let b=0;b<u.length;b++)d[b]=$h(u[b],f);let g=this.global.eval(r);return e===!0?g=g(...d):e===!1?g=g:typeof g=="function"&&(g=g(...d)),i?this._promiseAwareJsonValueNoThrow(g):g}jsonValue(e,i){if(i!==void 0)return bA(i,r=>({fallThrough:r}))}_promiseAwareJsonValueNoThrow(e){const i=r=>{try{return this.jsonValue(!0,r)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const r=await e;return i(r)})():i(e)}}class Bv{constructor(e,i){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this._lastAriaSnapshotForTrack=new Map,this.utils={asLocator:Di,cacheNormalizedWhitespaces:r_,elementText:Vt,getAriaRole:xt,getElementAccessibleDescription:al,getElementAccessibleName:rl,isElementVisible:ni,isInsideScope:Dh,normalizeWhiteSpace:ut,parseAriaSnapshot:od,generateAriaTree:yr,findNewElement:vT,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=i.isUnderTest,this.utils.builtins=new vA(e,i.isUnderTest).builtins,this._sdkLanguage=i.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=i.testIdAttributeName,this._evaluator=new NT,this.consoleApi=new fA(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",Ub),this._engines.set("xpath:light",Ub),this._engines.set("role",jb(!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",jb(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:r,source:l}of i.customEngines)this._engines.set(r,this.eval(l));this._stableRafCount=i.stableRafCount,this._browserName=i.browserName,this._shouldPrependErrorPrefix=!!i.shouldPrependErrorPrefix,this._isUtilityWorld=!!i.isUtilityWorld,IE({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=fl(e);return i_(i,r=>{if(!this._engines.has(r.name))throw this.createStacklessError(`Unknown engine "${r.name}" while parsing selector ${e}`)}),i}generateSelector(e,i){return zb(this,e,i)}generateSelectorSimple(e,i){return zb(this,e,{...i,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,i,r){const l=this.querySelectorAll(e,i);if(r&&l.length>1)throw this.strictModeViolationError(e,l);return this.checkDeprecatedSelectorUsage(e,l),l[0]}_queryNth(e,i){const r=[...e];let l=+i.body;return l===-1&&(l=r.length-1),new Set(r.slice(l,l+1))}_queryLayoutSelector(e,i,r){const l=i.name,o=i.body,u=[],f=this.querySelectorAll(o.parsed,r);for(const d of e){const g=Av(l,d,f,o.distance);g!==void 0&&u.push({element:d,score:g})}return u.sort((d,g)=>d.score-g.score),new Set(u.map(d=>d.element))}ariaSnapshot(e,i){return this.incrementalAriaSnapshot(e,i).full}incrementalAriaSnapshot(e,i){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const r=yr(e,i),l=br(r,i);let o;if(i.track){const u=this._lastAriaSnapshotForTrack.get(i.track);u&&(o=br(r,i,u).text),this._lastAriaSnapshotForTrack.set(i.track,r)}return this._lastAriaSnapshotForQuery=r,{full:l.text,incremental:o,iframeRefs:r.iframeRefs,iframeDepths:l.iframeDepths}}ariaSnapshotForRecorder(){const e=yr(this.document.body,{mode:"ai"}),{text:i}=br(e,{mode:"ai"});return{ariaSnapshot:i,refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,i){return pT(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 r={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:gn(l)};r.parts.push(o)}return this.querySelectorAll(r,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 r=new Set([i]);for(const l of e.parts)if(l.name==="nth")r=this._queryNth(r,l);else if(l.name==="internal:and"){const o=this.querySelectorAll(l.body.parsed,i);r=new Set(o.filter(u=>r.has(u)))}else if(l.name==="internal:or"){const o=this.querySelectorAll(l.body.parsed,i);r=new Set(kv(new Set([...r,...o])))}else if(TT.includes(l.name))r=this._queryLayoutSelector(r,l,i);else{const o=new Set;for(const u of r){const f=this._queryEngineAll(l,u);for(const d of f)o.add(d)}r=o}return[...r]}finally{this._evaluator.end()}}_queryEngineAll(e,i){const r=this._engines.get(e.name).queryAll(i,e.body);for(const l of r)if(!("nodeName"in l))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(l)}`);return r}_createAttributeEngine(e,i){const r=l=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(l)}]`,functions:[]},combinator:""}]}];return{queryAll:(l,o)=>this._evaluator.query({scope:l,pierceShadow:i},r(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}=Bo(o,i),d=[];let g=null;const b=S=>{if(f==="lax"&&g&&g.contains(S))return!1;const w=Ec(this._evaluator._cacheText,S,u);w==="none"&&(g=S),(w==="self"||w==="selfAndChildren"&&f==="strict"&&!i)&&d.push(S)};l.nodeType===Node.ELEMENT_NODE&&b(l);const m=this._evaluator._queryCSS({scope:l,pierceShadow:e},"*");for(const S of m)b(S);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const r=e,l=Vt(this._evaluator._cacheText,r),{matcher:o}=Bo(i,!0);return o(l)?[r]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const r=e,l=Vt(this._evaluator._cacheText,r),{matcher:o}=Bo(i,!0);return o(l)?[]:[r]}}}_createInternalLabelEngine(){return{queryAll:(e,i)=>{const{matcher:r}=Bo(i,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(o=>Cv(this._evaluator._cacheText,o).some(u=>r(u)))}}}_createNamedAttributeEngine(){return{queryAll:(i,r)=>{const l=Qa(r);if(l.name||l.attributes.length!==1)throw new Error("Malformed attribute selector: "+r);const{name:o,value:u,caseSensitive:f}=l.attributes[0],d=f?null:u.toLowerCase();let g;return u instanceof RegExp?g=m=>!!m.match(u):f?g=m=>m===u:g=m=>m.toLowerCase().includes(d),this._evaluator._queryCSS({scope:i,pierceShadow:!0},`[${o}]`).filter(m=>g(m.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,r)=>i.nodeType!==1?[]:!!this.querySelector(r.parsed,i,!1)?[i]:[]}}_createHasNotEngine(){return{queryAll:(i,r)=>i.nodeType!==1?[]:!!this.querySelector(r.parsed,i,!1)?[]:[i]}}_createVisibleEngine(){return{queryAll:(i,r)=>{if(i.nodeType!==1)return[];const l=r==="true";return ni(i)===l?[i]:[]}}}_createInternalChainEngine(){return{queryAll:(i,r)=>this.querySelectorAll(r.parsed,i)}}extend(e,i){const r=this.window.eval(`
    (() => {
      const module = {};
      ${e}
      return module.exports.default();
    })()`);return new r(this,i)}async viewportRatio(e){return await new Promise(i=>{const r=new IntersectionObserver(l=>{i(l[0].intersectionRatio),r.disconnect()});r.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=Et(l))if(i.getComputedStyle(l).transform!=="none")return"transformed";const r=i.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,i){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(i==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(i==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),i==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const l=r.closest("label");l&&l.control&&(r=l.control)}return r}async checkElementStates(e,i){if(i.includes("stable")){const r=await this._checkElementIsStable(e);if(r===!1)return{missingState:"stable"};if(r==="error:notconnected")return"error:notconnected"}for(const r of i)if(r!=="stable"){const l=this.elementState(e,r);if(l.received==="error:notconnected")return"error:notconnected";if(!l.matches)return{missingState:r}}}async _checkElementIsStable(e){const i=Symbol("continuePolling");let r,l=0,o=0;const u=()=>{const m=this.retarget(e,"no-follow-label");if(!m)return"error:notconnected";const S=this.utils.builtins.performance.now();if(this._stableRafCount>1&&S-o<15)return i;o=S;const w=m.getBoundingClientRect(),E={x:w.top,y:w.left,width:w.width,height:w.height};if(r){if(!(E.x===r.x&&E.y===r.y&&E.width===r.width&&E.height===r.height))return!1;if(++l>=this._stableRafCount)return!0}return r=E,i};let f,d;const g=new Promise((m,S)=>{f=m,d=S}),b=()=>{try{const m=u();m!==i?f(m):this.utils.builtins.requestAnimationFrame(b)}catch(m){d(m)}};return this.utils.builtins.requestAnimationFrame(b),g}_createAriaRefEngine(){return{queryAll:(i,r)=>{var o,u;const l=(u=(o=this._lastAriaSnapshotForQuery)==null?void 0:o.elements)==null?void 0:u.get(r);return l&&l.isConnected?[l]:[]}}}elementState(e,i){const r=this.retarget(e,["visible","hidden"].includes(i)?"none":"follow-label");if(!r||!r.isConnected)return i==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(i==="visible"||i==="hidden"){const l=ni(r);return{matches:i==="visible"?l:!l,received:l?"visible":"hidden"}}if(i==="disabled"||i==="enabled"){const l=fc(r);return{matches:i==="disabled"?l:!l,received:l?"disabled":"enabled"}}if(i==="editable"){const l=fc(r),o=iT(r);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=tT(r);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");const u=r.nodeName==="INPUT"&&r.type==="radio";return{matches:l===o,received:o?"checked":"unchecked",isRadio:u}}if(i==="indeterminate"){const l=eT(r);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 r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const l=r,o=[...l.options],u=[];let f=i.slice();for(let d=0;d<o.length;d++){const g=o[d],b=ut(g.label),m=S=>{if(S instanceof Node)return g===S;const w=x=>x===g.label||ut(x)===b;let E=!0;return S.valueOrLabel!==void 0&&(E=E&&(S.valueOrLabel===g.value||w(S.valueOrLabel))),S.value!==void 0&&(E=E&&S.value===g.value),S.label!==void 0&&(E=E&&w(S.label)),S.index!==void 0&&(E=E&&S.index===d),E};if(f.some(m)){if(!this.elementState(g,"enabled").matches)return"error:optionnotenabled";if(u.push(g),l.multiple)f=f.filter(S=>!m(S));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 r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()==="input"){const l=r,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(o==="color"&&(i=i.toLowerCase()),u.has(o)){if(i=i.trim(),l.focus(),l.value=i,l.value!==i)throw this.createStacklessError("Malformed value");return r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),r.dispatchEvent(new Event("change",{bubbles:!0})),"done"}}else if(r.nodeName.toLowerCase()!=="textarea"){if(!r.isContentEditable)throw this.createStacklessError("Element is not an <input>, <textarea> or [contenteditable] element")}return this.selectText(r),"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"}i.focus();const r=i.ownerDocument.createRange();r.selectNodeContents(i);const l=i.ownerDocument.defaultView.getSelection();return l&&(l.removeAllRanges(),l.addRange(r)),"done"}_activelyFocused(e){const i=e.getRootNode().activeElement,r=i===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:i,isFocused:r}}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:r,isFocused:l}=this._activelyFocused(e);if(e.isContentEditable&&!l&&r&&r.blur&&r.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 r=e;if(r.nodeName!=="INPUT")return"Not an <input> element";const l=r;if((l.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const u=i.map(d=>{const g=Uint8Array.from(atob(d.buffer),b=>b.charCodeAt(0));return new File([g],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 r=[];let l=i;for(;l;){const b=tv(l);if(!b||(r.push(b),b.nodeType===9))break;l=b.host}let o;for(let b=r.length-1;b>=0;b--){const m=r[b],S=m.elementsFromPoint(e.x,e.y),w=m.elementFromPoint(e.x,e.y);if(w&&S[0]&&Et(w)===S[0]){const x=this.window.getComputedStyle(w);(x==null?void 0:x.display)==="contents"&&S.unshift(w)}S[0]&&S[0].shadowRoot===m&&S[1]===w&&S.shift();const E=S[0];if(!E||(o=E,b&&E!==r[b-1].host))break}const u=[];for(;o&&o!==i;)u.push(o),o=o.assignedSlot??Et(o);if(o===i)return"done";const f=this.previewNode(u[0]||this.document.documentElement);let d,g=i;for(;g;){const b=u.indexOf(g);if(b!==-1){b>1&&(d=this.previewNode(u[b-1]));break}g=Et(g)}return d?{hitTargetDescription:`${f} from ${d} subtree`}:{hitTargetDescription:f}}setupHitTargetInterceptor(e,i,r,l){const o=this.retarget(e,"button-link");if(!o||!o.isConnected)return"error:notconnected";if(r){const b=this.expectHitTarget(r,o);if(b!=="done")return b.hitTargetDescription}if(i==="drag")return{stop:()=>"done"};const u={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[i];let f;const d=b=>{if(!u.has(b.type)||!b.isTrusted)return;const m=this.window.TouchEvent&&b instanceof this.window.TouchEvent?b.touches[0]:b;f===void 0&&m&&(f=this.expectHitTarget({x:m.clientX,y:m.clientY},o)),(l||f!=="done"&&f!==void 0)&&(b.preventDefault(),b.stopPropagation(),b.stopImmediatePropagation())},g=()=>(this._hitTargetInterceptor===d&&(this._hitTargetInterceptor=void 0),f||"done");return this._hitTargetInterceptor=d,{stop:g}}dispatchEvent(e,i,r){var u,f,d;let l;const o={bubbles:!0,cancelable:!0,composed:!0,...r};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 g=m=>{var E,x;if(m instanceof Touch)return m;let S=m.pageX;S===void 0&&m.clientX!==void 0&&(S=m.clientX+(((E=this.document.scrollingElement)==null?void 0:E.scrollLeft)||0));let w=m.pageY;return w===void 0&&m.clientY!==void 0&&(w=m.clientY+(((x=this.document.scrollingElement)==null?void 0:x.scrollTop)||0)),this.document.createTouch(this.window,m.target??e,m.identifier,S,w,m.screenX,m.screenY,m.radiusX,m.radiusY,m.rotationAngle,m.force)},b=m=>m instanceof TouchList||!m?m:this.document.createTouchList(...m.map(g));o.target??(o.target=e),o.touches=b(o.touches),o.targetTouches=b(o.targetTouches),o.changedTouches=b(o.changedTouches),l=new TouchEvent(i,o)}else o.target??(o.target=e),o.touches=(u=o.touches)==null?void 0:u.map(g=>g instanceof Touch?g:new Touch({...g,target:g.target??e})),o.targetTouches=(f=o.targetTouches)==null?void 0:f.map(g=>g instanceof Touch?g:new Touch({...g,target:g.target??e})),o.changedTouches=(d=o.changedTouches)==null?void 0:d.map(g=>g instanceof Touch?g:new Touch({...g,target:g.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:g,cancelable:b,alpha:m,beta:S,gamma:w,absolute:E}=o;l=this.document.createEvent("DeviceOrientationEvent"),l.initDeviceOrientationEvent(i,g,b,m,S,w,E)}break;case"devicemotion":try{l=new DeviceMotionEvent(i,o)}catch{const{bubbles:g,cancelable:b,acceleration:m,accelerationIncludingGravity:S,rotationRate:w,interval:E}=o;l=this.document.createEvent("DeviceMotionEvent"),l.initDeviceMotionEvent(i,g,b,m,S,w,E)}break;default:l=new Event(i,o);break}e.dispatchEvent(l)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return Ho(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return Ho(`<${e.nodeName.toLowerCase()} />`);const i=e,r=[];for(let d=0;d<i.attributes.length;d++){const{name:g,value:b}=i.attributes[d];g!=="style"&&(!b&&this._booleanAttributes.has(g)?r.push(` ${g}`):r.push(` ${g}="${b}"`))}r.sort((d,g)=>d.length-g.length);const l=lb(r.join(""),500);if(this._autoClosingTags.has(i.nodeName))return Ho(`<${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 Ho(`<${i.nodeName.toLowerCase()}${l}>${lb(f,50)}</${i.nodeName.toLowerCase()}>`)}_generateSelectors(e){this._evaluator.begin(),wc(),hd();try{const i=this._isUtilityWorld&&this._browserName==="firefox"?2:10;return e.slice(0,i).map(l=>({preview:this.previewNode(l),selector:this.generateSelectorSimple(l)})).map((l,o)=>`${o+1}) ${l.preview} aka ${Di(this._sdkLanguage,l.selector)}`)}finally{dd(),xc(),this._evaluator.end()}}strictModeViolationError(e,i){const r=this._generateSelectors(i).map(l=>`
    `+l);return r.length<i.length&&r.push(`
    ...`),this.createStacklessError(`strict mode violation: ${Di(this._sdkLanguage,gn(e))} resolved to ${i.length} elements:${r.join("")}
`)}checkDeprecatedSelectorUsage(e,i){const r=new Set(["_react","_vue","xpath:light","text:light","id:light","data-testid:light","data-test-id:light","data-test:light"]);if(!i.length)return;const l=e.parts.find(u=>r.has(u.name));if(!l)return;const o=this._generateSelectors(i).map(u=>`
    `+u);throw o.length<i.length&&o.push(`
    ...`),this.createStacklessError(`"${l.name}" selector is not supported: ${Di(this._sdkLanguage,gn(e))} resolved to ${i.length} element${i.length===1?"":"s"}:${o.join("")}
`)}createStacklessError(e){const i=this._shouldPrependErrorPrefix?new Error("Error: "+e):new Error(e);return this._browserName==="firefox"?(i.stack="",i):(delete i.stack,i)}createHighlight(){return new dh(this)}maskSelectors(e,i){const r=this._createHighlight(),l=[];for(const o of e)l.push(this.querySelectorAll(o,this.document.documentElement));r.maskElements(l.flat(),i)}_createHighlight(){return this._highlight&&this.hideHighlight(),this._highlight=new dh(this),this._highlight.install(),this._highlight}_ensureHighlight(){return this._highlight||(this._highlight=new dh(this),this._highlight.install()),this._highlight}addHighlight(e,i){this._ensureHighlight().addElementHighlight(e,i)}removeHighlight(e){this._ensureHighlight().removeElementHighlight(e)}setScreencastAnnotation(e){const i=this._ensureHighlight();if(!e){i.updateHighlight([]),i.hideActionPoint(),i.hideActionTitle();return}const r=e.duration??500;e.box&&i.updateHighlight([{box:e.box,color:"rgba(0, 128, 255, 0.15)",borderColor:"rgba(0, 128, 255, 0.6)",fadeDuration:r}]),e.point&&i.showActionPoint(e.point.x,e.point.y,r),e.actionTitle&&i.showActionTitle(e.actionTitle,r,e.position,e.fontSize)}addUserOverlay(e,i){this._ensureHighlight().addUserOverlay(e,i)}getUserOverlay(e){return this._ensureHighlight().getUserOverlay(e)}removeUserOverlay(e){this._ensureHighlight().removeUserOverlay(e)}setUserOverlaysVisible(e){this._ensureHighlight().setUserOverlaysVisible(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,i){var u,f;((u=this._markedElements)==null?void 0:u.callId)!==i&&(this._markedElements=void 0);const r=((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 r)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)r.has(d)||d.dispatchEvent(o);this._markedElements={callId:i,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let i=!1;const r=()=>i=!0;this.window.addEventListener(e,r),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,r);for(const u of this.onGlobalListenersRemoved)u()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=r=>{var l;return(l=this._hitTargetInterceptor)==null?void 0:l.call(this,r)},i=()=>{for(const r of this._allHitTargetInterceptorEvents)this.window.addEventListener(r,e,{capture:!0,passive:!1})};i(),this.onGlobalListenersRemoved.add(i)}async expect(e,i,r){const l=await this._expectCore(e,i,r),o=this._ariaSnapshotForExpect(e,i);return l.received===void 0&&o===void 0?{matches:l.matches,missingReceived:l.missingReceived}:{matches:l.matches,received:{value:l.received,ariaSnapshot:o},missingReceived:l.missingReceived}}_ariaSnapshotForExpect(e,i){const r=i.expression;if(!(r==="to.have.count"||r.endsWith(".array"))&&r!=="to.match.aria"){if(e&&ni(e)){const l=r==="to.have.text";return this._renderAriaSnapshot(e,{mode:"default",depth:l?void 0:1})}if(this.document.body)return this._renderAriaSnapshot(this.document.body,{mode:"default"})}}_renderAriaSnapshot(e,i){return br(yr(e,i),i).text}async _expectCore(e,i,r){var o,u;if(i.expression==="to.have.count"||i.expression.endsWith(".array"))return this.expectArray(r,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 cr(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 cr(i.expectedText[0]),d=this.document.location.href;return{received:d,matches:f.matches(d)}}if(i.expression==="to.match.aria"&&!i.selector){if(!this.document.body)return{matches:i.isNot,missingReceived:!0};const f=Ab(this.document.body,i.expectedValue);return{received:f.received,matches:!!f.matches.length}}return{matches:i.isNot,missingReceived:!0}}return await this.expectSingleElement(e,i)}async expectSingleElement(e,i){var l;const r=i.expression;{let o;if(r==="to.have.attribute"){const u=e.hasAttribute(i.expressionArg);o={matches:u,received:u?"attribute present":"attribute not present"}}else if(r==="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(r==="to.be.disabled")o=this.elementState(e,"disabled");else if(r==="to.be.editable")o=this.elementState(e,"editable");else if(r==="to.be.readonly")o=this.elementState(e,"editable"),o.matches=!o.matches;else if(r==="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(r==="to.be.enabled")o=this.elementState(e,"enabled");else if(r==="to.be.focused"){const u=this._activelyFocused(e).isFocused;o={matches:u,received:u?"focused":"inactive"}}else r==="to.be.hidden"?o=this.elementState(e,"hidden"):r==="to.be.visible"?o=this.elementState(e,"visible"):r==="to.be.attached"?o={matches:!0,received:"attached"}:r==="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(r==="to.have.property"){let o=e;const u=i.expressionArg.split(".");for(let g=0;g<u.length-1;g++){if(typeof o!="object"||!(u[g]in o))return{received:void 0,matches:!1};o=o[u[g]]}const f=o[u[u.length-1]],d=Vh(f,i.expectedValue);return{received:f,matches:d}}if(r==="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(r==="to.have.values"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="SELECT"||!e.multiple)throw this.createStacklessError("Not a select element with a multiple attribute");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 cr(i.expectedText[f]).matches(u)).every(Boolean)}}if(r==="to.match.aria"){const o=Ab(e,i.expectedValue);return{received:o.received,matches:!!o.matches.length}}{let o;if(r==="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(r)){if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+r);return{received:e.classList.toString(),matches:new cr(i.expectedText[0]).matchesClassList(this,e.classList,r==="to.contain.class")}}else if(r==="to.have.css")o=this.window.getComputedStyle(e,i.pseudo?`::${i.pseudo}`:void 0).getPropertyValue(i.expressionArg);else if(r==="to.have.id")o=e.id;else if(r==="to.have.text")o=i.useInnerText?e.innerText:Vt(new Map,e).full;else if(r==="to.have.accessible.name")o=rl(e,!1);else if(r==="to.have.accessible.description")o=al(e,!1);else if(r==="to.have.accessible.error.message")o=ZE(e);else if(r==="to.have.role")o=xt(e)||"";else if(r==="to.have.value"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"&&e.nodeName!=="SELECT")throw this.createStacklessError("Not an input element");o=e.value}if(o!==void 0&&i.expectedText){const u=new cr(i.expectedText[0]);return{received:o,matches:u.matches(o)}}}throw this.createStacklessError("Unknown expect matcher: "+r)}expectArray(e,i){const r=i.expression;if(r==="to.have.count"){const d=e.length,g=d===i.expectedNumber;return{received:d,matches:g}}if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+r);if(["to.have.class.array","to.contain.class.array"].includes(r)){const d=e.map(m=>m.classList),g=d.map(String);if(d.length!==i.expectedText.length)return{received:g,matches:!1};const b=this._matchSequentially(i.expectedText,d,(m,S)=>m.matchesClassList(this,S,r==="to.contain.class.array"));return{received:g,matches:b}}if(!["to.contain.text.array","to.have.text.array"].includes(r))throw this.createStacklessError("Unknown expect matcher: "+r);const l=e.map(d=>i.useInnerText?d.innerText:Vt(new Map,d).full),o=r!=="to.contain.text.array";if(!(l.length===i.expectedText.length||!o))return{received:l,matches:!1};const f=this._matchSequentially(i.expectedText,l,(d,g)=>d.matches(g));return{received:l,matches:f}}_matchSequentially(e,i,r){const l=e.map(f=>new cr(f));let o=0,u=0;for(;o<l.length&&u<i.length;)r(l[o],i[u])&&++o,++u;return o===l.length}}function Ho(n){return n.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function SA(n){if(n=n.substring(1,n.length-1),!n.includes("\\"))return n;const e=[];let i=0;for(;i<n.length;)n[i]==="\\"&&i+1<n.length&&i++,e.push(n[i++]);return e.join("")}function Bo(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):SA;let r=!1;return n.length>1&&n[0]==='"'&&n[n.length-1]==='"'?(n=i(n),r=!0):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="i"?(n=i(n.substring(0,n.length-1)),r=!1):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="s"?(n=i(n.substring(0,n.length-1)),r=!0):n.length>1&&n[0]==="'"&&n[n.length-1]==="'"&&(n=i(n),r=!0),n=ut(n),r?e?{kind:"strict",matcher:o=>o.normalized===n}:{matcher:o=>!n&&!o.immediate.length?!0:o.immediate.some(u=>ut(u)===n),kind:"strict"}:(n=n.toLowerCase(),{kind:"lax",matcher:l=>l.normalized.toLowerCase().includes(n)})}class cr{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,r){if(r){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=ut(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 r=0;r<n.length;++r)if(!Vh(n[r],e[r]))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 r=0;r<i.length;++r)if(!e.hasOwnProperty(i[r]))return!1;for(const r of i)if(!Vh(n[r],e[r]))return!1;return!0}return typeof n=="number"&&typeof e=="number"?isNaN(n)&&isNaN(e):!1}const wA={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"}}]}]}]},mn={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f"};class qb{}class yh{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;Ge(e),e.button===0&&(i=this._hoveredModel)!=null&&i.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){Ge(e)}onPointerUp(e){Ge(e)}onMouseDown(e){Ge(e)}onMouseUp(e){Ge(e)}onMouseMove(e){var l;Ge(e);let i=this._recorder.deepEventTarget(e);if(i.isConnected||(i=null),this._hoveredElement===i)return;this._hoveredElement=i;let r=null;if(this._hoveredElement){const o=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});r={selector:o.selector,elements:o.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,o.selector),color:this._assertVisibility?mn.assert:mn.single}}((l=this._hoveredModel)==null?void 0:l.selector)!==(r==null?void 0:r.selector)&&(this._hoveredModel=r,this._recorder.updateHighlight(r,!0))}onMouseEnter(e){Ge(e)}onMouseLeave(e){Ge(e);const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){Ge(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){Ge(e)}onScroll(e){this._reset(!1)}_commit(e,i){var r;this._assertVisibility?(this._recorder.recordAction({name:"assertVisible",selector:e,signals:[]}),this._recorder.setMode("recording"),(r=this._recorder.overlay)==null||r.flashToolSucceeded("assertingVisibility")):this._recorder.elementPicked(e,i)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class xA{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 qv(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 r of i)for(const l of r.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"&&Ge(e);return}if(nl(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=tl(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:el(e),signals:[],button:Gh(e),modifiers:_r(e),clickCount:e.detail},timeout:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){this._dialog.isShowing()||nl(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:el(e),signals:[],button:Gh(e),modifiers:_r(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()){Ge(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(r=>r.name)});return}if(nl(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 r=i;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...r.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=tl(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:_r(e)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){Ge(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,i){Ge(i);const r=el(i),l=[{title:"Click",cb:()=>this._performAction({name:"click",selector:e.selector,position:r,signals:[],button:"left",modifiers:0,clickCount:0})},{title:"Right click",cb:()=>this._performAction({name:"click",selector:e.selector,position:r,signals:[],button:"right",modifiers:0,clickCount:0})},{title:"Double click",cb:()=>this._performAction({name:"click",selector:e.selector,position:r,signals:[],button:"left",modifiers:0,clickCount:2})},{title:"Hover",cb:()=>this._performAction({name:"hover",selector:e.selector,position:r,signals:[]})},{title:"Pick locator",cb:()=>this._recorder.elementPicked(e.selector,e)}],o=this._recorder.document.createElement("x-pw-action-list");o.setAttribute("role","list"),o.setAttribute("aria-label","Choose action");for(const g of l){const b=this._recorder.document.createElement("x-pw-action-item");b.setAttribute("role","listitem"),b.textContent=g.title,b.setAttribute("aria-label",g.title),b.addEventListener("click",()=>{this._dialog.close(),g.cb()}),o.appendChild(b)}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=AA(this._recorder.document);if(e&&i===this._recorder.document.body)return;const r=i?this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=r&&r.selector?{...r,color:mn.action}:null,e&&(this._hoveredElement=i,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),r=i.nodeName;return!!(r==="SELECT"||r==="OPTION"||r==="INPUT"&&["date","range"].includes(i.type))}_actionInProgress(e){const i=e instanceof KeyboardEvent,r=e instanceof MouseEvent||e instanceof PointerEvent;for(const l of this._performingActions)if(i&&l.name==="press"&&e.key===l.key||r&&(l.name==="click"||l.name==="hover"||l.name==="check"||l.name==="uncheck"))return!0;return Ge(e),!1}_consumedDueToNoModel(e,i){return i?!1:(Ge(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(Ge(e),!0)}_consumeWhenAboutToPerform(e){this._performingActions.size||Ge(e)}_reportPerformedActionForTests(){this._recorder.injectedScript.isUnderTest&&console.error("Action performed for test: "+JSON.stringify({hovered:this._hoveredModel?this._hoveredModel.selector:null,active:this._activeModel?this._activeModel.selector:null}))}_recordAction(e){this._recorder.recordAction(e).then(()=>this._reportPerformedActionForTests())}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e),this._recorder.performAction(e).finally(()=>{this._performingActions.delete(e),this._onFocus(!1)}).then(()=>this._reportPerformedActionForTests())}_shouldGenerateKeyPressFor(e){if(typeof e.key!="string"||e.key==="Enter"&&(this._recorder.deepEventTarget(e).nodeName==="TEXTAREA"||this._recorder.deepEventTarget(e).isContentEditable)||["Backspace","Delete","AltGraph"].includes(e.key)||e.key==="@"&&e.code==="KeyL")return!1;if(navigator.platform.includes("Mac")){if(e.key==="v"&&e.metaKey)return!1}else if(e.key==="v"&&e.ctrlKey||e.key==="Insert"&&e.shiftKey)return!1;if(["Shift","Control","Meta","Alt","Process"].includes(e.key))return!1;const i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!!tl(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:mn.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class _A{constructor(e){this._recorder=e}install(){this._recorder.highlight.uninstall()}uninstall(){this._recorder.highlight.install()}onClick(e){const i=this._recorder.deepEventTarget(e);if(nl(i)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const r=tl(i),{ariaSnapshot:l,selector:o,ref:u}=this._ariaSnapshot(i);if(r&&e.detail===1){this._recorder.recordAction({name:r.checked?"check":"uncheck",selector:o,ref:u,signals:[],ariaSnapshot:l});return}this._recorder.recordAction({name:"click",selector:o,ref:u,ariaSnapshot:l,position:el(e),signals:[],button:Gh(e),modifiers:_r(e),clickCount:e.detail})}onContextMenu(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:l,ref:o}=this._ariaSnapshot(i);this._recorder.recordAction({name:"click",selector:l,ref:o,ariaSnapshot:r,position:el(e),signals:[],button:"right",modifiers:_r(e),clickCount:1})}onInput(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:l,ref:o}=this._ariaSnapshot(i);if(nl(i)){this._recorder.recordAction({name:"fill",selector:l,ref:o,ariaSnapshot:r,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:r,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:r,options:[...u.selectedOptions].map(f=>f.value),signals:[]});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const i=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:l,ref:o}=this._ariaSnapshot(i);if(e.key===" "){const u=tl(i);if(u&&e.detail===0){this._recorder.recordAction({name:u.checked?"uncheck":"check",selector:l,ref:o,ariaSnapshot:r,signals:[]});return}}this._recorder.recordAction({name:"press",selector:l,ref:o,ariaSnapshot:r,signals:[],key:e.key,modifiers:_r(e)})}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),r=i.nodeName;return!!(r==="SELECT"||r==="OPTION"||r==="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:r}=this._recorder.injectedScript.ariaSnapshotForRecorder(),l=e?r.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 bh{constructor(e,i){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=i,this._dialog=new qv(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){Ge(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 r;const i=(r=this._hoverHighlight)==null?void 0:r.elements[0];this._kind==="value"&&i&&(i.nodeName==="INPUT"||i.nodeName==="SELECT")&&i.disabled&&this._commitAssertValue()}onMouseMove(e){var r;if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);if(((r=this._hoverHighlight)==null?void 0:r.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:mn.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:mn.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),Ge(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:r}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName==="INPUT"&&["checkbox","radio"].includes(e.type.toLowerCase())?{name:"assertChecked",selector:r,signals:[],checked:!e.checked}:{name:"assertValue",selector:r,signals:[],value:e.value}}else if(this._kind==="snapshot"){const r=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:r.selector,elements:r.elements,color:mn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"codegen"})}}else{const r=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:r.selector,elements:r.elements,color:mn.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,r,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):((r=this._action)==null?void 0:r.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 r=()=>{var m;const f=this._recorder.injectedScript.utils.normalizeWhiteSpace(i.value),d=(m=this._hoverHighlight)==null?void 0:m.elements[0];if(!d)return;e.text=f;const g=this._recorder.injectedScript.utils.elementText(this._textCache,d).normalized,b=f&&g.includes(f);i.classList.toggle("does-not-match",!b)};i.addEventListener("input",r);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 EA{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 r=i.createElement("x-pw-tools-list");this._overlayElement.appendChild(r),this._dragHandle=i.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(i.createElement("x-div")),r.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")),r.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")),r.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")),r.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")),r.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")),r.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")),r.appendChild(this._assertSnapshotToggle),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){$v(this._listeners),this._listeners=[Ie(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),Ie(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")}),Ie(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])}),Ie(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),Ie(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),Ie(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),Ie(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}),Ge(e),!0}return!1}onMouseUp(e){return this._dragState?(Ge(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,Ge(e),!0):!1}onDblClick(e){return!1}}class TA{constructor(e,i){var r,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 qb,standby:new qb,inspecting:new yh(this,!1),recording:(i==null?void 0:i.recorderMode)==="api"?new _A(this):new xA(this),"recording-inspecting":new yh(this,!1),assertingText:new bh(this,"text"),assertingVisibility:new yh(this,!0),assertingValue:new bh(this,"value"),assertingSnapshot:new bh(this,"snapshot")},this._currentTool=this._tools.none,(l=(r=this._currentTool).install)==null||l.call(r),e.window.top===e.window&&!(i!=null&&i.hideToolbar)&&(this.overlay=new EA(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
      body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
      body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
    `),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var r,l,o;$v(this._listeners),this._listeners=[Ie(this.document,"click",u=>this._onClick(u),!0),Ie(this.document,"auxclick",u=>this._onClick(u),!0),Ie(this.document,"dblclick",u=>this._onDblClick(u),!0),Ie(this.document,"contextmenu",u=>this._onContextMenu(u),!0),Ie(this.document,"dragstart",u=>this._onDragStart(u),!0),Ie(this.document,"input",u=>this._onInput(u),!0),Ie(this.document,"keydown",u=>this._onKeyDown(u),!0),Ie(this.document,"keyup",u=>this._onKeyUp(u),!0),Ie(this.document,"pointerdown",u=>this._onPointerDown(u),!0),Ie(this.document,"pointerup",u=>this._onPointerUp(u),!0),Ie(this.document,"mousedown",u=>this._onMouseDown(u),!0),Ie(this.document,"mouseup",u=>this._onMouseUp(u),!0),Ie(this.document,"mousemove",u=>this._onMouseMove(u),!0),Ie(this.document,"mouseleave",u=>this._onMouseLeave(u),!0),Ie(this.document,"mouseenter",u=>this._onMouseEnter(u),!0),Ie(this.document,"focus",u=>this._onFocus(u),!0),Ie(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(Iv(this.document,wA)),(r=this.overlay)==null||r.install(),(o=(l=this._currentTool)==null?void 0:l.install)==null||o.call(l),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var r,l,o,u,f,d;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(l=(r=this._currentTool).uninstall)==null||l.call(r),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 r="noop";if(e.actionSelector!==this._lastHighlightedSelector){const u=e.actionSelector?CA(this.injectedScript,e.language,e.actionSelector,this.document):null;r=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?mn.multiple:mn.single;r=u.map(d=>({element:d,color:f})),this._lastHighlightedAriaTemplateJSON=l}else this._lastHighlightedSelector||(r="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}r==="clear"?this.highlight.clearHighlight():r!=="noop"&&this.highlight.updateHighlight(r)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var i,r,l;e.isTrusted&&((i=this.overlay)!=null&&i.onClick(e)||this._ignoreOverlayEvent(e)||(l=(r=this._currentTool).onClick)==null||l.call(r,e))}_onDblClick(e){var i,r,l;e.isTrusted&&((i=this.overlay)!=null&&i.onDblClick(e)||this._ignoreOverlayEvent(e)||(l=(r=this._currentTool).onDblClick)==null||l.call(r,e))}_onContextMenu(e){var i,r;e.isTrusted&&((r=(i=this._currentTool).onContextMenu)==null||r.call(i,e))}_onDragStart(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onDragStart)==null||r.call(i,e))}_onPointerDown(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onPointerDown)==null||r.call(i,e))}_onPointerUp(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onPointerUp)==null||r.call(i,e))}_onMouseDown(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onMouseDown)==null||r.call(i,e))}_onMouseUp(e){var i,r,l;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseUp(e)||this._ignoreOverlayEvent(e)||(l=(r=this._currentTool).onMouseUp)==null||l.call(r,e))}_onMouseMove(e){var i,r,l;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseMove(e)||this._ignoreOverlayEvent(e)||(l=(r=this._currentTool).onMouseMove)==null||l.call(r,e))}_onMouseEnter(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onMouseEnter)==null||r.call(i,e))}_onMouseLeave(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onMouseLeave)==null||r.call(i,e))}_onFocus(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onFocus)==null||r.call(i,e))}_onScroll(e){var i,r;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(r=(i=this._currentTool).onScroll)==null||r.call(i,e))}_onInput(e){var i,r;this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onInput)==null||r.call(i,e)}_onKeyDown(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onKeyDown)==null||r.call(i,e))}_onKeyUp(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onKeyUp)==null||r.call(i,e))}updateHighlight(e,i){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,i)}_updateHighlight(e,i){var l,o;let r=e==null?void 0:e.tooltipText;r===void 0&&(e!=null&&e.selector)&&(r=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(u=>({element:u,color:e.color,tooltipText:r}))):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 r of e.composedPath())if(!((i=this.overlay)!=null&&i.contains(r)))return r;return e.composedPath()[0]}setMode(e){var i,r;(r=(i=this._delegate).setMode)==null||r.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 r,l,o;const i=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),!NA(e)&&this._lastActionAutoexpectSnapshot){const u=this.injectedScript.utils.findNewElement(i==null?void 0:i.root,(r=this._lastActionAutoexpectSnapshot)==null?void 0:r.root);e.preconditionSelector=u?this.injectedScript.generateSelector(u,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,e.preconditionSelector===e.selector&&(e.preconditionSelector=void 0)}await((o=(l=this._delegate).performAction)==null?void 0:o.call(l,e).catch(()=>{}))}async recordAction(e){var i,r;this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),await((r=(i=this._delegate).recordAction)==null?void 0:r.call(i,e))}setOverlayState(e){var i,r;(r=(i=this._delegate).setOverlayState)==null||r.call(i,e)}elementPicked(e,i){var l,o;const r=this.injectedScript.ariaSnapshot(i.elements[0],{mode:"default"});(o=(l=this._delegate).elementPicked)==null||o.call(l,{selector:e,ariaSnapshot:r})}}let qv=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 r=this._recorder.document.createElement("x-pw-tool-item");r.title="Close",r.classList.add("cancel"),r.appendChild(this._recorder.document.createElement("x-div")),r.addEventListener("click",()=>{var f;this.close(),(f=e.onCancel)==null||f.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),e.autosize&&this._dialogElement.classList.add("autosize"),this._keyboardListener=f=>{var d;if(f.key==="Escape"){this.close(),(d=e.onCancel)==null||d.call(e);return}if(e.onCommit&&f.key==="Enter"&&(f.ctrlKey||f.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=f=>{var d;this.close(),(d=e.onCancel)==null||d.call(e)},this._dialogElement.addEventListener("click",f=>f.stopPropagation());const 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(r),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 AA(n){let e=n.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function _r(n){return(n.altKey?1:0)|(n.ctrlKey?2:0)|(n.metaKey?4:0)|(n.shiftKey?8:0)}function Gh(n){switch(n.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function el(n){if(n.target.nodeName==="CANVAS")return{x:n.offsetX,y:n.offsetY}}function Ge(n){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}function tl(n){if(!n||n.nodeName!=="INPUT")return null;const e=n;return["checkbox","radio"].includes(e.type)?e:null}function nl(n){return!n||n.nodeName!=="INPUT"?!1:n.type.toLowerCase()==="range"}function Ie(n,e,i,r){return n.addEventListener(e,i,r),()=>{n.removeEventListener(e,i,r)}}function $v(n){for(const e of n)e();n.splice(0,n.length)}function CA(n,e,i,r){try{const l=n.parseSelector(i),o=n.querySelectorAll(l,r),u=o.length>1?mn.multiple:mn.single,f=n.utils.asLocator(e,i);return o.map((d,g)=>{const b=o.length>1?` [${g+1} of ${o.length}]`:"";return{element:d,color:u,tooltipText:f+b}})}catch{return[]}}function Iv(n,{tagName:e,attrs:i,children:r}){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(r)for(const o of r)l.appendChild(Iv(n,o));return l}function NA(n){return n.name.startsWith("assert")}const kA="data:text/html;base64,"+btoa("<body></body><style>body { color-scheme: light dark; background: light-dark(white, #333) }</style>");function MA(n,e){n=n.replace(/AriaRole\s*\.\s*([\w]+)/g,(o,u)=>u.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(o,u,f)=>`${u}(${f.toLowerCase()}`);const i=[];let r="";for(let o=0;o<n.length;++o){const u=n[o];if(u!=='"'&&u!=="'"&&u!=="`"&&u!=="/"){r+=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+=`
`: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}),r+=(u==="/"?"r":"")+"$"+i.length}r=r.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",").replace(/,\)/g,")");const l=i.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:Vv(r,i,e),preferredQuote:l}}function $b(n){return[...n.matchAll(/\$\d+/g)].length}function Ib(n,e){return n.replace(/\$(\d+)/g,(i,r)=>`$${r-e}`)}function Vv(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),g=0;["sethas(","sethasnot("].includes(l[1])&&(g=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const b=$b(n.substring(0,o)),m=Ib(n.substring(o,f),b),S=$b(m),w=e.slice(b,b+S),E=JSON.stringify(Vv(m,w,i));n=d.replace(/=$/,"2=")+`$${b+1}`+Ib(n.substring(f+g),S-1);const x=e.slice(0,b),_=e.slice(b+S);e=x.concat([{quote:'"',text:E}]).concat(_)}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(/(,name=\$\d+)(,description=\$\d+),exact=true/g,"$1s$2s").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const r=n.split(".");for(let l=0;l<r.length-1;l++)if(r[l]==="internal:control=enter-frame"&&r[l+1].startsWith("nth=")){const[o]=r.splice(l,1);r.splice(l+1,0,o)}return r.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")?Je(new RegExp(d.text),!1)+(f||""):$t(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")?Je(d.text,!0):l.startsWith("internal:attr")||l.startsWith("internal:role")?Je(d.text,f==="s"):$t(d.text,f==="s")}),l)).join(" >> ")}function OA(n,e,i){try{return jA(n,e,i)}catch{return""}}function jA(n,e,i){try{return fl(e),e}catch{}const{selector:r,preferredQuote:l}=MA(e,i),o=U0(n,r,void 0,void 0,l),u=Vb(n,e);return o.some(f=>Vb(n,f)===u)?r:""}function Vb(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:[v.jsx("span",{className:"browser-frame-address",children:n||"about:blank"}),n&&v.jsx(ld,{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"})]})})]}),jd=Symbol.for("yaml.alias"),Kh=Symbol.for("yaml.document"),zi=Symbol.for("yaml.map"),Gv=Symbol.for("yaml.pair"),Ln=Symbol.for("yaml.scalar"),Lr=Symbol.for("yaml.seq"),bn=Symbol.for("yaml.node.type"),Bi=n=>!!n&&typeof n=="object"&&n[bn]===jd,vs=n=>!!n&&typeof n=="object"&&n[bn]===Kh,Rr=n=>!!n&&typeof n=="object"&&n[bn]===zi,Ve=n=>!!n&&typeof n=="object"&&n[bn]===Gv,ze=n=>!!n&&typeof n=="object"&&n[bn]===Ln,Dr=n=>!!n&&typeof n=="object"&&n[bn]===Lr;function Ke(n){if(n&&typeof n=="object")switch(n[bn]){case zi:case Lr:return!0}return!1}function Xe(n){if(n&&typeof n=="object")switch(n[bn]){case jd:case zi:case Ln:case Lr:return!0}return!1}const Kv=n=>(ze(n)||Ke(n))&&!!n.anchor,It=Symbol("break visit"),Xv=Symbol("skip children"),jn=Symbol("remove node");function Ss(n,e){const i=Yv(e);vs(n)?vr(null,n.contents,i,Object.freeze([n]))===jn&&(n.contents=null):vr(null,n,i,Object.freeze([]))}Ss.BREAK=It;Ss.SKIP=Xv;Ss.REMOVE=jn;function vr(n,e,i,r){const l=Fv(n,e,i,r);if(Xe(l)||Ve(l))return Qv(n,r,l),vr(n,l,i,r);if(typeof l!="symbol"){if(Ke(e)){r=Object.freeze(r.concat(e));for(let o=0;o<e.items.length;++o){const u=vr(o,e.items[o],i,r);if(typeof u=="number")o=u-1;else{if(u===It)return It;u===jn&&(e.items.splice(o,1),o-=1)}}}else if(Ve(e)){r=Object.freeze(r.concat(e));const o=vr("key",e.key,i,r);if(o===It)return It;o===jn&&(e.key=null);const u=vr("value",e.value,i,r);if(u===It)return It;u===jn&&(e.value=null)}}return l}async function Tc(n,e){const i=Yv(e);vs(n)?await Sr(null,n.contents,i,Object.freeze([n]))===jn&&(n.contents=null):await Sr(null,n,i,Object.freeze([]))}Tc.BREAK=It;Tc.SKIP=Xv;Tc.REMOVE=jn;async function Sr(n,e,i,r){const l=await Fv(n,e,i,r);if(Xe(l)||Ve(l))return Qv(n,r,l),Sr(n,l,i,r);if(typeof l!="symbol"){if(Ke(e)){r=Object.freeze(r.concat(e));for(let o=0;o<e.items.length;++o){const u=await Sr(o,e.items[o],i,r);if(typeof u=="number")o=u-1;else{if(u===It)return It;u===jn&&(e.items.splice(o,1),o-=1)}}}else if(Ve(e)){r=Object.freeze(r.concat(e));const o=await Sr("key",e.key,i,r);if(o===It)return It;o===jn&&(e.key=null);const u=await Sr("value",e.value,i,r);if(u===It)return It;u===jn&&(e.value=null)}}return l}function Yv(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function Fv(n,e,i,r){var l,o,u,f,d;if(typeof i=="function")return i(n,e,r);if(Rr(e))return(l=i.Map)==null?void 0:l.call(i,n,e,r);if(Dr(e))return(o=i.Seq)==null?void 0:o.call(i,n,e,r);if(Ve(e))return(u=i.Pair)==null?void 0:u.call(i,n,e,r);if(ze(e))return(f=i.Scalar)==null?void 0:f.call(i,n,e,r);if(Bi(e))return(d=i.Alias)==null?void 0:d.call(i,n,e,r)}function Qv(n,e,i){const r=e[e.length-1];if(Ke(r))r.items[n]=i;else if(Ve(r))n==="key"?r.key=i:r.value=i;else if(vs(r))r.contents=i;else{const l=Bi(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${l} parent`)}}const RA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},DA=n=>n.replace(/[!,[\]{}]/g,e=>RA[e]);class Ot{constructor(e,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ot.defaultYaml,e),this.tags=Object.assign({},Ot.defaultTags,i)}clone(){const e=new Ot(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Ot(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ot.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ot.defaultTags);break}return e}add(e,i){this.atNextDocument&&(this.yaml={explicit:Ot.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ot.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),l=r.shift();switch(l){case"%TAG":{if(r.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[o,u]=r;return this.tags[o]=u,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[o]=r;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[,r,l]=e.match(/^(.*!)([^!]*)$/s);l||i(`The ${e} tag has no suffix`);const o=this.tags[r];if(o)try{return o+decodeURIComponent(l)}catch(u){return i(String(u)),null}return r==="!"?e:(i(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[i,r]of Object.entries(this.tags))if(e.startsWith(r))return i+DA(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let l;if(e&&r.length>0&&Xe(e.contents)){const o={};Ss(e.contents,(u,f)=>{Xe(f)&&f.tag&&(o[f.tag]=!0)}),l=Object.keys(o)}else l=[];for(const[o,u]of r)o==="!!"&&u==="tag:yaml.org,2002:"||(!e||l.some(f=>f.startsWith(u)))&&i.push(`%TAG ${o} ${u}`);return i.join(`
`)}}Ot.defaultYaml={explicit:!1,version:"1.2"};Ot.defaultTags={"!!":"tag:yaml.org,2002:"};function Pv(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 Jv(n){const e=new Set;return Ss(n,{Value(i,r){r.anchor&&e.add(r.anchor)}}),e}function Zv(n,e){for(let i=1;;++i){const r=`${n}${i}`;if(!e.has(r))return r}}function zA(n,e){const i=[],r=new Map;let l=null;return{onAnchor:o=>{i.push(o),l??(l=Jv(n));const u=Zv(e,l);return l.add(u),u},setAnchors:()=>{for(const o of i){const u=r.get(o);if(typeof u=="object"&&u.anchor&&(ze(u.node)||Ke(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:r}}function wr(n,e,i,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let l=0,o=r.length;l<o;++l){const u=r[l],f=wr(n,r,String(l),u);f===void 0?delete r[l]:f!==u&&(r[l]=f)}else if(r instanceof Map)for(const l of Array.from(r.keys())){const o=r.get(l),u=wr(n,r,l,o);u===void 0?r.delete(l):u!==o&&r.set(l,u)}else if(r instanceof Set)for(const l of Array.from(r)){const o=wr(n,r,l,l);o===void 0?r.delete(l):o!==l&&(r.delete(l),r.add(o))}else for(const[l,o]of Object.entries(r)){const u=wr(n,r,l,o);u===void 0?delete r[l]:u!==o&&(r[l]=u)}return n.call(e,i,r)}function yn(n,e,i){if(Array.isArray(n))return n.map((r,l)=>yn(r,String(l),i));if(n&&typeof n.toJSON=="function"){if(!i||!Kv(n))return n.toJSON(e,i);const r={aliasCount:0,count:1,res:void 0};i.anchors.set(n,r),i.onCreate=o=>{r.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 Ld{constructor(e){Object.defineProperty(this,bn,{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:r,onAnchor:l,reviver:o}={}){if(!vs(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 r=="number"?r:100},f=yn(this,"",u);if(typeof l=="function")for(const{count:d,res:g}of u.anchors.values())l(g,d);return typeof o=="function"?wr(o,{"":f},"",f):f}}class Ac extends Ld{constructor(e){super(jd),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,i){let r;i!=null&&i.aliasResolveCache?r=i.aliasResolveCache:(r=[],Ss(e,{Node:(o,u)=>{(Bi(u)||Kv(u))&&r.push(u)}}),i&&(i.aliasResolveCache=r));let l;for(const o of r){if(o===this)break;o.anchor===this.source&&(l=o)}return l}toJSON(e,i){if(!i)return{source:this.source};const{anchors:r,doc:l,maxAliasCount:o}=i,u=this.resolve(l,i);if(!u){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let f=r.get(u);if(f||(yn(u,null,i),f=r.get(u)),(f==null?void 0: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=Wo(l,u,r)),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,r){const l=`*${this.source}`;if(e){if(Pv(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 Wo(n,e,i){if(Bi(e)){const r=e.resolve(n),l=i&&r&&i.get(r);return l?l.count*l.aliasCount:0}else if(Ke(e)){let r=0;for(const l of e.items){const o=Wo(n,l,i);o>r&&(r=o)}return r}else if(Ve(e)){const r=Wo(n,e.key,i),l=Wo(n,e.value,i);return Math.max(r,l)}return 1}const Wv=n=>!n||typeof n!="function"&&typeof n!="object";class ue extends Ld{constructor(e){super(Ln),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:yn(this.value,e,i)}toString(){return String(this.value)}}ue.BLOCK_FOLDED="BLOCK_FOLDED";ue.BLOCK_LITERAL="BLOCK_LITERAL";ue.PLAIN="PLAIN";ue.QUOTE_DOUBLE="QUOTE_DOUBLE";ue.QUOTE_SINGLE="QUOTE_SINGLE";const UA="tag:yaml.org,2002:";function HA(n,e,i){if(e){const r=i.filter(o=>o.tag===e),l=r.find(o=>!o.format)??r[0];if(!l)throw new Error(`Tag ${e} not found`);return l}return i.find(r=>{var l;return((l=r.identify)==null?void 0:l.call(r,n))&&!r.format})}function ll(n,e,i){var m,S,w;if(vs(n)&&(n=n.contents),Xe(n))return n;if(Ve(n)){const E=(S=(m=i.schema[zi]).createNode)==null?void 0:S.call(m,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:r,onAnchor:l,onTagObj:o,schema:u,sourceObjects:f}=i;let d;if(r&&n&&typeof n=="object"){if(d=f.get(n),d)return d.anchor??(d.anchor=l(n)),new Ac(d.anchor);d={anchor:null,node:null},f.set(n,d)}e!=null&&e.startsWith("!!")&&(e=UA+e.slice(2));let g=HA(n,e,u.tags);if(!g){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const E=new ue(n);return d&&(d.node=E),E}g=n instanceof Map?u[zi]:Symbol.iterator in Object(n)?u[Lr]:u[zi]}o&&(o(g),delete i.onTagObj);const b=g!=null&&g.createNode?g.createNode(i.schema,n,i):typeof((w=g==null?void 0:g.nodeClass)==null?void 0:w.from)=="function"?g.nodeClass.from(i.schema,n,i):new ue(n);return e?b.tag=e:g.default||(b.tag=g.tag),d&&(d.node=b),b}function hc(n,e,i){let r=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]=r,r=u}else r=new Map([[o,r]])}return ll(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const Ya=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class eS extends Ld{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(r=>Xe(r)||Ve(r)?r.clone(e):r),this.range&&(i.range=this.range.slice()),i}addIn(e,i){if(Ya(e))this.add(i);else{const[r,...l]=e,o=this.get(r,!0);if(Ke(o))o.addIn(l,i);else if(o===void 0&&this.schema)this.set(r,hc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}deleteIn(e){const[i,...r]=e;if(r.length===0)return this.delete(i);const l=this.get(i,!0);if(Ke(l))return l.deleteIn(r);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}getIn(e,i){const[r,...l]=e,o=this.get(r,!0);return l.length===0?!i&&ze(o)?o.value:o:Ke(o)?o.getIn(l,i):void 0}hasAllNullValues(e){return this.items.every(i=>{if(!Ve(i))return!1;const r=i.value;return r==null||e&&ze(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[i,...r]=e;if(r.length===0)return this.has(i);const l=this.get(i,!0);return Ke(l)?l.hasIn(r):!1}setIn(e,i){const[r,...l]=e;if(l.length===0)this.set(r,i);else{const o=this.get(r,!0);if(Ke(o))o.setIn(l,i);else if(o===void 0&&this.schema)this.set(r,hc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}}const BA=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function ii(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const ds=(n,e,i)=>n.endsWith(`
`)?ii(i,e):i.includes(`
`)?`
`+ii(i,e):(n.endsWith(" ")?"":" ")+i,tS="flow",Xh="block",ec="quoted";function Cc(n,e,i="flow",{indentAtStart:r,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 g=[],b={};let m=l-e.length;typeof r=="number"&&(r>l-Math.max(2,o)?g.push(0):m=l-r);let S,w,E=!1,x=-1,_=-1,A=-1;i===Xh&&(x=Gb(n,x,e.length),x!==-1&&(m=x+d));for(let $;$=n[x+=1];){if(i===ec&&$==="\\"){switch(_=x,n[x+1]){case"x":x+=3;break;case"u":x+=5;break;case"U":x+=9;break;default:x+=1}A=x}if($===`
`)i===Xh&&(x=Gb(n,x,e.length)),m=x+e.length+d,S=void 0;else{if($===" "&&w&&w!==" "&&w!==`
`&&w!=="	"){const G=n[x+1];G&&G!==" "&&G!==`
`&&G!=="	"&&(S=x)}if(x>=m)if(S)g.push(S),m=S+d,S=void 0;else if(i===ec){for(;w===" "||w==="	";)w=$,$=n[x+=1],E=!0;const G=x>A+1?x-2:_-1;if(b[G])return n;g.push(G),b[G]=!0,m=G+d,S=void 0}else E=!0}w=$}if(E&&f&&f(),g.length===0)return n;u&&u();let N=n.slice(0,g[0]);for(let $=0;$<g.length;++$){const G=g[$],X=g[$+1]||n.length;G===0?N=`
${e}${n.slice(0,X)}`:(i===ec&&b[G]&&(N+=`${n[G]}\\`),N+=`
${e}${n.slice(G+1,X)}`)}return N}function Gb(n,e,i){let r=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!==`
`);r=e,l=e+1,o=n[l]}return r}const Nc=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),kc=n=>/^(%|---|\.\.\.)/m.test(n);function qA(n,e,i){if(!e||e<0)return!1;const r=e-i,l=n.length;if(l<=r)return!1;for(let o=0,u=0;o<l;++o)if(n[o]===`
`){if(o-u>r)return!0;if(u=o+1,l-u<=r)return!1}return!0}function il(n,e){const i=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return i;const{implicitKey:r}=e,l=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(kc(n)?"  ":"");let u="",f=0;for(let d=0,g=i[d];g;g=i[++d])if(g===" "&&i[d+1]==="\\"&&i[d+2]==="n"&&(u+=i.slice(f,d)+"\\ ",d+=1,f=d,g="\\"),g==="\\")switch(i[d+1]){case"u":{u+=i.slice(f,d);const b=i.substr(d+2,4);switch(b){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:b.substr(0,2)==="00"?u+="\\x"+b.substr(2):u+=i.substr(d,6)}d+=5,f=d+1}break;case"n":if(r||i[d+2]==='"'||i.length<l)d+=1;else{for(u+=i.slice(f,d)+`

`;i[d+2]==="\\"&&i[d+3]==="n"&&i[d+4]!=='"';)u+=`
`,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,r?u:Cc(u,o,ec,Nc(e,!1))}function Yh(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
`)||/[ \t]\n|\n[ \t]/.test(n))return il(n,e);const i=e.indent||(kc(n)?"  ":""),r="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
${i}`)+"'";return e.implicitKey?r:Cc(r,i,tS,Nc(e,!1))}function xr(n,e){const{singleQuote:i}=e.options;let r;if(i===!1)r=il;else{const l=n.includes('"'),o=n.includes("'");l&&!o?r=Yh:o&&!l?r=il:r=i?Yh:il}return r(n,e)}let Fh;try{Fh=new RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{Fh=/\n+(?!\n|$)/g}function tc({comment:n,type:e,value:i},r,l,o){const{blockQuote:u,commentString:f,lineWidth:d}=r.options;if(!u||/\n[\t ]+$/.test(i))return xr(i,r);const g=r.indent||(r.forceBlockIndent||kc(i)?"  ":""),b=u==="literal"?!0:u==="folded"||e===ue.BLOCK_FOLDED?!1:e===ue.BLOCK_LITERAL?!0:!qA(i,d,g.length);if(!i)return b?`|
`:`>
`;let m,S;for(S=i.length;S>0;--S){const X=i[S-1];if(X!==`
`&&X!=="	"&&X!==" ")break}let w=i.substring(S);const E=w.indexOf(`
`);E===-1?m="-":i===w||E!==w.length-1?(m="+",o&&o()):m="",w&&(i=i.slice(0,-w.length),w[w.length-1]===`
`&&(w=w.slice(0,-1)),w=w.replace(Fh,`$&${g}`));let x=!1,_,A=-1;for(_=0;_<i.length;++_){const X=i[_];if(X===" ")x=!0;else if(X===`
`)A=_;else break}let N=i.substring(0,A<_?A+1:_);N&&(i=i.substring(N.length),N=N.replace(/\n+/g,`$&${g}`));let G=(x?g?"2":"1":"")+m;if(n&&(G+=" "+f(n.replace(/ ?[\r\n]+/g," ")),l&&l()),!b){const X=i.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);let U=!1;const L=Nc(r,!0);u!=="folded"&&e!==ue.BLOCK_FOLDED&&(L.onOverflow=()=>{U=!0});const B=Cc(`${N}${X}${w}`,g,Xh,L);if(!U)return`>${G}
${g}${B}`}return i=i.replace(/\n+/g,`$&${g}`),`|${G}
${g}${N}${i}${w}`}function $A(n,e,i,r){const{type:l,value:o}=n,{actualString:u,implicitKey:f,indent:d,indentStep:g,inFlow:b}=e;if(f&&o.includes(`
`)||b&&/[[\]{},]/.test(o))return xr(o,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||b||!o.includes(`
`)?xr(o,e):tc(n,e,i,r);if(!f&&!b&&l!==ue.PLAIN&&o.includes(`
`))return tc(n,e,i,r);if(kc(o)){if(d==="")return e.forceBlockIndent=!0,tc(n,e,i,r);if(f&&d===g)return xr(o,e)}const m=o.replace(/\n+/g,`$&
${d}`);if(u){const S=x=>{var _;return x.default&&x.tag!=="tag:yaml.org,2002:str"&&((_=x.test)==null?void 0:_.test(m))},{compat:w,tags:E}=e.doc.schema;if(E.some(S)||w!=null&&w.some(S))return xr(o,e)}return f?m:Cc(m,d,tS,Nc(e,!1))}function hl(n,e,i,r){const{implicitKey:l,inFlow:o}=e,u=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:f}=n;f!==ue.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(f=ue.QUOTE_DOUBLE);const d=b=>{switch(b){case ue.BLOCK_FOLDED:case ue.BLOCK_LITERAL:return l||o?xr(u.value,e):tc(u,e,i,r);case ue.QUOTE_DOUBLE:return il(u.value,e);case ue.QUOTE_SINGLE:return Yh(u.value,e);case ue.PLAIN:return $A(u,e,i,r);default:return null}};let g=d(f);if(g===null){const{defaultKeyType:b,defaultStringType:m}=e.options,S=l&&b||m;if(g=d(S),g===null)throw new Error(`Unsupported default string type ${S}`)}return g}function nS(n,e){const i=Object.assign({blockQuote:!0,commentString:BA,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e);let r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:n,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):"  ",inFlow:r,options:i}}function IA(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,r;if(ze(e)){r=e.value;let o=n.filter(u=>{var f;return(f=u.identify)==null?void 0:f.call(u,r)});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 r=e,i=n.find(o=>o.nodeClass&&r instanceof o.nodeClass);if(!i){const o=((l=r==null?void 0:r.constructor)==null?void 0:l.name)??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${o} value`)}return i}function VA(n,e,{anchors:i,doc:r}){if(!r.directives)return"";const l=[],o=(ze(n)||Ke(n))&&n.anchor;o&&Pv(o)&&(i.add(o),l.push(`&${o}`));const u=n.tag??(e.default?null:e.tag);return u&&l.push(r.directives.tagString(u)),l.join(" ")}function Cr(n,e,i,r){var d;if(Ve(n))return n.toString(e,i,r);if(Bi(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=Xe(n)?n:e.doc.createNode(n,{onTagObj:g=>l=g});l??(l=IA(e.doc.schema.tags,o));const u=VA(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,r):ze(o)?hl(o,e,i,r):o.toString(e,i,r);return u?ze(o)||f[0]==="{"||f[0]==="["?`${u} ${f}`:`${u}
${e.indent}${f}`:f}function GA({key:n,value:e},i,r,l){const{allNullValues:o,doc:u,indent:f,indentStep:d,options:{commentString:g,indentSeq:b,simpleKeys:m}}=i;let S=Xe(n)&&n.comment||null;if(m){if(S)throw new Error("With simple keys, key nodes cannot have comments");if(Ke(n)||!Xe(n)&&typeof n=="object"){const L="With simple keys, collection cannot be used as a key value";throw new Error(L)}}let w=!m&&(!n||S&&e==null&&!i.inFlow||Ke(n)||(ze(n)?n.type===ue.BLOCK_FOLDED||n.type===ue.BLOCK_LITERAL:typeof n=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!w&&(m||!o),indent:f+d});let E=!1,x=!1,_=Cr(n,i,()=>E=!0,()=>x=!0);if(!w&&!i.inFlow&&_.length>1024){if(m)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&&r&&r(),_===""?"?":w?`? ${_}`:_}else if(o&&!m||e==null&&w)return _=`? ${_}`,S&&!E?_+=ds(_,i.indent,g(S)):x&&l&&l(),_;E&&(S=null),w?(S&&(_+=ds(_,i.indent,g(S))),_=`? ${_}
${f}:`):(_=`${_}:`,S&&(_+=ds(_,i.indent,g(S))));let A,N,$;Xe(e)?(A=!!e.spaceBefore,N=e.commentBefore,$=e.comment):(A=!1,N=null,$=null,e&&typeof e=="object"&&(e=u.createNode(e))),i.implicitKey=!1,!w&&!S&&ze(e)&&(i.indentAtStart=_.length+1),x=!1,!b&&d.length>=2&&!i.inFlow&&!w&&Dr(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let G=!1;const X=Cr(e,i,()=>G=!0,()=>x=!0);let U=" ";if(S||A||N){if(U=A?`
`:"",N){const L=g(N);U+=`
${ii(L,i.indent)}`}X===""&&!i.inFlow?U===`
`&&$&&(U=`

`):U+=`
${i.indent}`}else if(!w&&Ke(e)){const L=X[0],B=X.indexOf(`
`),O=B!==-1,ne=i.inFlow??e.flow??e.items.length===0;if(O||!ne){let te=!1;if(O&&(L==="&"||L==="!")){let V=X.indexOf(" ");L==="&"&&V!==-1&&V<B&&X[V+1]==="!"&&(V=X.indexOf(" ",V+1)),(V===-1||B<V)&&(te=!0)}te||(U=`
${i.indent}`)}}else(X===""||X[0]===`
`)&&(U="");return _+=U+X,i.inFlow?G&&r&&r():$&&!G?_+=ds(_,i.indent,g($)):x&&l&&l(),_}function iS(n,e){(n==="debug"||n==="warn")&&console.warn(e)}const qo="<<",si={identify:n=>n===qo||typeof n=="symbol"&&n.description===qo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ue(Symbol(qo)),{addToJSMap:sS}),stringify:()=>qo},KA=(n,e)=>(si.identify(e)||ze(e)&&(!e.type||e.type===ue.PLAIN)&&si.identify(e.value))&&(n==null?void 0:n.doc.schema.tags.some(i=>i.tag===si.tag&&i.default));function sS(n,e,i){if(i=n&&Bi(i)?i.resolve(n.doc):i,Dr(i))for(const r of i.items)vh(n,e,r);else if(Array.isArray(i))for(const r of i)vh(n,e,r);else vh(n,e,i)}function vh(n,e,i){const r=n&&Bi(i)?i.resolve(n.doc):i;if(!Rr(r))throw new Error("Merge sources must be maps or map aliases");const l=r.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 rS(n,e,{key:i,value:r}){if(Xe(i)&&i.addToJSMap)i.addToJSMap(n,e,r);else if(KA(n,i))sS(n,e,r);else{const l=yn(i,"",n);if(e instanceof Map)e.set(l,yn(r,l,n));else if(e instanceof Set)e.add(l);else{const o=XA(i,l,n),u=yn(r,o,n);o in e?Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[o]=u}}return e}function XA(n,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(Xe(n)&&(i!=null&&i.doc)){const r=nS(i.doc,{});r.anchors=new Set;for(const o of i.anchors.keys())r.anchors.add(o.anchor);r.inFlow=!0,r.inStringifyKey=!0;const l=n.toString(r);if(!i.mapKeyWarned){let o=JSON.stringify(l);o.length>40&&(o=o.substring(0,36)+'..."'),iS(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 Rd(n,e,i){const r=ll(n,void 0,i),l=ll(e,void 0,i);return new Tt(r,l)}class Tt{constructor(e,i=null){Object.defineProperty(this,bn,{value:Gv}),this.key=e,this.value=i}clone(e){let{key:i,value:r}=this;return Xe(i)&&(i=i.clone(e)),Xe(r)&&(r=r.clone(e)),new Tt(i,r)}toJSON(e,i){const r=i!=null&&i.mapAsMap?new Map:{};return rS(i,r,this)}toString(e,i,r){return e!=null&&e.doc?GA(this,e,i,r):JSON.stringify(this)}}function aS(n,e,i){return(e.inFlow??n.flow?FA:YA)(n,e,i)}function YA({comment:n,items:e},i,{blockItemPrefix:r,flowChars:l,itemIndent:o,onChompKeep:u,onComment:f}){const{indent:d,options:{commentString:g}}=i,b=Object.assign({},i,{indent:o,type:null});let m=!1;const S=[];for(let E=0;E<e.length;++E){const x=e[E];let _=null;if(Xe(x))!m&&x.spaceBefore&&S.push(""),dc(i,S,x.commentBefore,m),x.comment&&(_=x.comment);else if(Ve(x)){const N=Xe(x.key)?x.key:null;N&&(!m&&N.spaceBefore&&S.push(""),dc(i,S,N.commentBefore,m))}m=!1;let A=Cr(x,b,()=>_=null,()=>m=!0);_&&(A+=ds(A,o,g(_))),m&&_&&(m=!1),S.push(r+A)}let w;if(S.length===0)w=l.start+l.end;else{w=S[0];for(let E=1;E<S.length;++E){const x=S[E];w+=x?`
${d}${x}`:`
`}}return n?(w+=`
`+ii(g(n),d),f&&f()):m&&u&&u(),w}function FA({items:n},e,{flowChars:i,itemIndent:r}){const{indent:l,indentStep:o,flowCollectionPadding:u,options:{commentString:f}}=e;r+=o;const d=Object.assign({},e,{indent:r,inFlow:!0,type:null});let g=!1,b=0;const m=[];for(let E=0;E<n.length;++E){const x=n[E];let _=null;if(Xe(x))x.spaceBefore&&m.push(""),dc(e,m,x.commentBefore,!1),x.comment&&(_=x.comment);else if(Ve(x)){const N=Xe(x.key)?x.key:null;N&&(N.spaceBefore&&m.push(""),dc(e,m,N.commentBefore,!1),N.comment&&(g=!0));const $=Xe(x.value)?x.value:null;$?($.comment&&(_=$.comment),$.commentBefore&&(g=!0)):x.value==null&&(N!=null&&N.comment)&&(_=N.comment)}_&&(g=!0);let A=Cr(x,d,()=>_=null);g||(g=m.length>b||A.includes(`
`)),E<n.length-1?A+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(g||(g=m.reduce((N,$)=>N+$.length+2,2)+(A.length+2)>e.options.lineWidth)),g&&(A+=",")),_&&(A+=ds(A,r,f(_))),m.push(A),b=m.length}const{start:S,end:w}=i;if(m.length===0)return S+w;if(!g){const E=m.reduce((x,_)=>x+_.length+2,2);g=e.options.lineWidth>0&&E>e.options.lineWidth}if(g){let E=S;for(const x of m)E+=x?`
${o}${l}${x}`:`
`;return`${E}
${l}${w}`}else return`${S}${u}${m.join(" ")}${u}${w}`}function dc({indent:n,options:{commentString:e}},i,r,l){if(r&&l&&(r=r.replace(/^\n+/,"")),r){const o=ii(e(r),n);i.push(o.trimStart())}}function ps(n,e){const i=ze(e)?e.value:e;for(const r of n)if(Ve(r)&&(r.key===e||r.key===i||ze(r.key)&&r.key.value===i))return r}class Wt extends eS{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(zi,e),this.items=[]}static from(e,i,r){const{keepUndefined:l,replacer:o}=r,u=new this(e),f=(d,g)=>{if(typeof o=="function")g=o.call(i,d,g);else if(Array.isArray(o)&&!o.includes(d))return;(g!==void 0||l)&&u.items.push(Rd(d,g,r))};if(i instanceof Map)for(const[d,g]of i)f(d,g);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 r;Ve(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new Tt(e,e==null?void 0:e.value):r=new Tt(e.key,e.value);const l=ps(this.items,r.key),o=(u=this.schema)==null?void 0:u.sortMapEntries;if(l){if(!i)throw new Error(`Key ${r.key} already set`);ze(l.value)&&Wv(r.value)?l.value.value=r.value:l.value=r.value}else if(o){const f=this.items.findIndex(d=>o(r,d)<0);f===-1?this.items.push(r):this.items.splice(f,0,r)}else this.items.push(r)}delete(e){const i=ps(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){const r=ps(this.items,e),l=r==null?void 0:r.value;return(!i&&ze(l)?l.value:l)??void 0}has(e){return!!ps(this.items,e)}set(e,i){this.add(new Tt(e,i),!0)}toJSON(e,i,r){const l=r?new r:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(l);for(const o of this.items)rS(i,l,o);return l}toString(e,i,r){if(!e)return JSON.stringify(this);for(const l of this.items)if(!Ve(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})),aS(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:i})}}const zr={collection:"map",default:!0,nodeClass:Wt,tag:"tag:yaml.org,2002:map",resolve(n,e){return Rr(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,i)=>Wt.from(n,e,i)};class Ui extends eS{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Lr,e),this.items=[]}add(e){this.items.push(e)}delete(e){const i=$o(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){const r=$o(e);if(typeof r!="number")return;const l=this.items[r];return!i&&ze(l)?l.value:l}has(e){const i=$o(e);return typeof i=="number"&&i<this.items.length}set(e,i){const r=$o(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const l=this.items[r];ze(l)&&Wv(i)?l.value=i:this.items[r]=i}toJSON(e,i){const r=[];i!=null&&i.onCreate&&i.onCreate(r);let l=0;for(const o of this.items)r.push(yn(o,String(l++),i));return r}toString(e,i,r){return e?aS(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+"  ",onChompKeep:r,onComment:i}):JSON.stringify(this)}static from(e,i,r){const{replacer:l}=r,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(ll(f,void 0,r))}}return o}}function $o(n){let e=ze(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Ur={collection:"seq",default:!0,nodeClass:Ui,tag:"tag:yaml.org,2002:seq",resolve(n,e){return Dr(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,i)=>Ui.from(n,e,i)},Mc={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,i,r){return e=Object.assign({actualString:!0},e),hl(n,e,i,r)}},Oc={identify:n=>n==null,createNode:()=>new ue(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ue(null),stringify:({source:n},e)=>typeof n=="string"&&Oc.test.test(n)?n:e.options.nullStr},Dd={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new ue(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},i){if(n&&Dd.test.test(n)){const r=n[0]==="t"||n[0]==="T";if(e===r)return n}return e?i.options.trueStr:i.options.falseStr}};function En({format:n,minFractionDigits:e,tag:i,value:r}){if(typeof r=="bigint")return String(r);const l=typeof r=="number"?r:Number(r);if(!isFinite(l))return isNaN(l)?".nan":l<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);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 lS={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:En},oS={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():En(n)}},cS={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 ue(parseFloat(n)),i=n.indexOf(".");return i!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-i-1),e},stringify:En},jc=n=>typeof n=="bigint"||Number.isInteger(n),zd=(n,e,i,{intAsBigInt:r})=>r?BigInt(n):parseInt(n.substring(e),i);function uS(n,e,i){const{value:r}=n;return jc(r)&&r>=0?i+r.toString(e):En(n)}const fS={identify:n=>jc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,i)=>zd(n,2,8,i),stringify:n=>uS(n,8,"0o")},hS={identify:jc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,i)=>zd(n,0,10,i),stringify:En},dS={identify:n=>jc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,i)=>zd(n,2,16,i),stringify:n=>uS(n,16,"0x")},QA=[zr,Ur,Mc,Oc,Dd,fS,hS,dS,lS,oS,cS];function Kb(n){return typeof n=="bigint"||Number.isInteger(n)}const Io=({value:n})=>JSON.stringify(n),PA=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:Io},{identify:n=>n==null,createNode:()=>new ue(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Io},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:n=>n==="true",stringify:Io},{identify:Kb,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})=>Kb(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:Io}],JA={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},ZA=[zr,Ur].concat(PA,JA),Ud={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof atob=="function"){const i=atob(n.replace(/[\n\r]/g,"")),r=new Uint8Array(i.length);for(let l=0;l<i.length;++l)r[l]=i.charCodeAt(l);return r}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},r,l,o){if(!i)return"";const u=i;let f;if(typeof btoa=="function"){let d="";for(let g=0;g<u.length;++g)d+=String.fromCharCode(u[g]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=ue.BLOCK_LITERAL),e!==ue.QUOTE_DOUBLE){const d=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),g=Math.ceil(f.length/d),b=new Array(g);for(let m=0,S=0;m<g;++m,S+=d)b[m]=f.substr(S,d);f=b.join(e===ue.BLOCK_LITERAL?`
`:" ")}return hl({comment:n,type:e,value:f},r,l,o)}};function pS(n,e){if(Dr(n))for(let i=0;i<n.items.length;++i){let r=n.items[i];if(!Ve(r)){if(Rr(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const l=r.items[0]||new Tt(new ue(null));if(r.commentBefore&&(l.key.commentBefore=l.key.commentBefore?`${r.commentBefore}
${l.key.commentBefore}`:r.commentBefore),r.comment){const o=l.value??l.key;o.comment=o.comment?`${r.comment}
${o.comment}`:r.comment}r=l}n.items[i]=Ve(r)?r:new Tt(r)}}else e("Expected a sequence for this tag");return n}function gS(n,e,i){const{replacer:r}=i,l=new Ui(n);l.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let u of e){typeof r=="function"&&(u=r.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 g=Object.keys(u);if(g.length===1)f=g[0],d=u[f];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else f=u;l.items.push(Rd(f,d,i))}return l}const Hd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:pS,createNode:gS};class Er extends Ui{constructor(){super(),this.add=Wt.prototype.add.bind(this),this.delete=Wt.prototype.delete.bind(this),this.get=Wt.prototype.get.bind(this),this.has=Wt.prototype.has.bind(this),this.set=Wt.prototype.set.bind(this),this.tag=Er.tag}toJSON(e,i){if(!i)return super.toJSON(e);const r=new Map;i!=null&&i.onCreate&&i.onCreate(r);for(const l of this.items){let o,u;if(Ve(l)?(o=yn(l.key,"",i),u=yn(l.value,o,i)):o=yn(l,"",i),r.has(o))throw new Error("Ordered maps must not include duplicate keys");r.set(o,u)}return r}static from(e,i,r){const l=gS(e,i,r),o=new this;return o.items=l.items,o}}Er.tag="tag:yaml.org,2002:omap";const Bd={collection:"seq",identify:n=>n instanceof Map,nodeClass:Er,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const i=pS(n,e),r=[];for(const{key:l}of i.items)ze(l)&&(r.includes(l.value)?e(`Ordered maps must not include duplicate keys: ${l.value}`):r.push(l.value));return Object.assign(new Er,i)},createNode:(n,e,i)=>Er.from(n,e,i)};function mS({value:n,source:e},i){return e&&(n?yS:bS).test.test(e)?e:n?i.options.trueStr:i.options.falseStr}const yS={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 ue(!0),stringify:mS},bS={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 ue(!1),stringify:mS},WA={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:En},eC={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():En(n)}},tC={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 ue(parseFloat(n.replace(/_/g,""))),i=n.indexOf(".");if(i!==-1){const r=n.substring(i+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:En},dl=n=>typeof n=="bigint"||Number.isInteger(n);function Lc(n,e,i,{intAsBigInt:r}){const l=n[0];if((l==="-"||l==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),r){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 qd(n,e,i){const{value:r}=n;if(dl(r)){const l=r.toString(e);return r<0?"-"+i+l.substr(1):i+l}return En(n)}const nC={identify:dl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,i)=>Lc(n,2,2,i),stringify:n=>qd(n,2,"0b")},iC={identify:dl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,i)=>Lc(n,1,8,i),stringify:n=>qd(n,8,"0")},sC={identify:dl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,i)=>Lc(n,0,10,i),stringify:En},rC={identify:dl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,i)=>Lc(n,2,16,i),stringify:n=>qd(n,16,"0x")};class Tr extends Wt{constructor(e){super(e),this.tag=Tr.tag}add(e){let i;Ve(e)?i=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?i=new Tt(e.key,null):i=new Tt(e,null),ps(this.items,i.key)||this.items.push(i)}get(e,i){const r=ps(this.items,e);return!i&&Ve(r)?ze(r.key)?r.key.value:r.key:r}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 r=ps(this.items,e);r&&!i?this.items.splice(this.items.indexOf(r),1):!r&&i&&this.items.push(new Tt(e))}toJSON(e,i){return super.toJSON(e,i,Set)}toString(e,i,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),i,r);throw new Error("Set items must all have null values")}static from(e,i,r){const{replacer:l}=r,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(Rd(u,null,r));return o}}Tr.tag="tag:yaml.org,2002:set";const $d={collection:"map",identify:n=>n instanceof Set,nodeClass:Tr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,i)=>Tr.from(n,e,i),resolve(n,e){if(Rr(n)){if(n.hasAllNullValues(!0))return Object.assign(new Tr,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function Id(n,e){const i=n[0],r=i==="-"||i==="+"?n.substring(1):n,l=u=>e?BigInt(u):Number(u),o=r.replace(/_/g,"").split(":").reduce((u,f)=>u*l(60)+l(f),l(0));return i==="-"?l(-1)*o:o}function vS(n){let{value:e}=n,i=u=>u;if(typeof e=="bigint")i=u=>BigInt(u);else if(isNaN(e)||!isFinite(e))return En(n);let r="";e<0&&(r="-",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))),r+o.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const SS={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})=>Id(n,i),stringify:vS},wS={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=>Id(n,!1),stringify:vS},Rc={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(Rc.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,r,l,o,u,f]=e.map(Number),d=e[7]?Number((e[7]+"00").substr(1,3)):0;let g=Date.UTC(i,r-1,l,o||0,u||0,f||0,d);const b=e[8];if(b&&b!=="Z"){let m=Id(b,!1);Math.abs(m)<30&&(m*=60),g-=6e4*m}return new Date(g)},stringify:({value:n})=>(n==null?void 0:n.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Xb=[zr,Ur,Mc,Oc,yS,bS,nC,iC,sC,rC,WA,eC,tC,Ud,si,Bd,Hd,$d,SS,wS,Rc],Yb=new Map([["core",QA],["failsafe",[zr,Ur,Mc]],["json",ZA],["yaml11",Xb],["yaml-1.1",Xb]]),Fb={binary:Ud,bool:Dd,float:cS,floatExp:oS,floatNaN:lS,floatTime:wS,int:hS,intHex:dS,intOct:fS,intTime:SS,map:zr,merge:si,null:Oc,omap:Bd,pairs:Hd,seq:Ur,set:$d,timestamp:Rc},aC={"tag:yaml.org,2002:binary":Ud,"tag:yaml.org,2002:merge":si,"tag:yaml.org,2002:omap":Bd,"tag:yaml.org,2002:pairs":Hd,"tag:yaml.org,2002:set":$d,"tag:yaml.org,2002:timestamp":Rc};function Sh(n,e,i){const r=Yb.get(e);if(r&&!n)return i&&!r.includes(si)?r.concat(si):r.slice();let l=r;if(!l)if(Array.isArray(n))l=[];else{const o=Array.from(Yb.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(si)),l.reduce((o,u)=>{const f=typeof u=="string"?Fb[u]:u;if(!f){const d=JSON.stringify(u),g=Object.keys(Fb).map(b=>JSON.stringify(b)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${g}`)}return o.includes(f)||o.push(f),o},[])}const lC=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;class Dc{constructor({compat:e,customTags:i,merge:r,resolveKnownTags:l,schema:o,sortMapEntries:u,toStringDefaults:f}){this.compat=Array.isArray(e)?Sh(e,"compat"):e?Sh(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=l?aC:{},this.tags=Sh(i,this.name,r),this.toStringOptions=f??null,Object.defineProperty(this,zi,{value:zr}),Object.defineProperty(this,Ln,{value:Mc}),Object.defineProperty(this,Lr,{value:Ur}),this.sortMapEntries=typeof u=="function"?u:u===!0?lC:null}clone(){const e=Object.create(Dc.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function oC(n,e){var d;const i=[];let r=e.directives===!0;if(e.directives!==!1&&n.directives){const g=n.directives.toString(n);g?(i.push(g),r=!0):n.directives.docStart&&(r=!0)}r&&i.push("---");const l=nS(n,e),{commentString:o}=l.options;if(n.commentBefore){i.length!==1&&i.unshift("");const g=o(n.commentBefore);i.unshift(ii(g,""))}let u=!1,f=null;if(n.contents){if(Xe(n.contents)){if(n.contents.spaceBefore&&r&&i.push(""),n.contents.commentBefore){const m=o(n.contents.commentBefore);i.push(ii(m,""))}l.forceBlockIndent=!!n.comment,f=n.contents.comment}const g=f?void 0:()=>u=!0;let b=Cr(n.contents,l,()=>f=null,g);f&&(b+=ds(b,"",o(f))),(b[0]==="|"||b[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${b}`:i.push(b)}else i.push(Cr(n.contents,l));if((d=n.directives)!=null&&d.docEnd)if(n.comment){const g=o(n.comment);g.includes(`
`)?(i.push("..."),i.push(ii(g,""))):i.push(`... ${g}`)}else i.push("...");else{let g=n.comment;g&&u&&(g=g.replace(/^\n+/,"")),g&&((!u||f)&&i[i.length-1]!==""&&i.push(""),i.push(ii(o(g),"")))}return i.join(`
`)+`
`}class Hr{constructor(e,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,bn,{value:Kh});let l=null;typeof i=="function"||Array.isArray(i)?l=i:r===void 0&&i&&(r=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"},r);this.options=o;let{version:u}=o;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new Ot({version:u}),this.setSchema(u,r),this.contents=e===void 0?null:this.createNode(e,l,r)}clone(){const e=Object.create(Hr.prototype,{[bn]:{value:Kh}});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=Xe(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ur(this.contents)&&this.contents.add(e)}addIn(e,i){ur(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){const r=Jv(this);e.anchor=!i||r.has(i)?Zv(i||"a",r):i}return new Ac(e.anchor)}createNode(e,i,r){let l;if(typeof i=="function")e=i.call({"":e},"",e),l=i;else if(Array.isArray(i)){const _=N=>typeof N=="number"||N instanceof String||N instanceof Number,A=i.filter(_).map(String);A.length>0&&(i=i.concat(A)),l=i}else r===void 0&&i&&(r=i,i=void 0);const{aliasDuplicateObjects:o,anchorPrefix:u,flow:f,keepUndefined:d,onTagObj:g,tag:b}=r??{},{onAnchor:m,setAnchors:S,sourceObjects:w}=zA(this,u||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:m,onTagObj:g,replacer:l,schema:this.schema,sourceObjects:w},x=ll(e,b,E);return f&&Ke(x)&&(x.flow=!0),S(),x}createPair(e,i,r={}){const l=this.createNode(e,null,r),o=this.createNode(i,null,r);return new Tt(l,o)}delete(e){return ur(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ya(e)?this.contents==null?!1:(this.contents=null,!0):ur(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return Ke(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return Ya(e)?!i&&ze(this.contents)?this.contents.value:this.contents:Ke(this.contents)?this.contents.getIn(e,i):void 0}has(e){return Ke(this.contents)?this.contents.has(e):!1}hasIn(e){return Ya(e)?this.contents!==void 0:Ke(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=hc(this.schema,[e],i):ur(this.contents)&&this.contents.set(e,i)}setIn(e,i){Ya(e)?this.contents=i:this.contents==null?this.contents=hc(this.schema,Array.from(e),i):ur(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Ot({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Ot({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=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(r)this.schema=new Dc(Object.assign(r,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:r,maxAliasCount:l,onAnchor:o,reviver:u}={}){const f={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},d=yn(this.contents,i??"",f);if(typeof o=="function")for(const{count:g,res:b}of f.anchors.values())o(b,g);return typeof u=="function"?wr(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 oC(this,e)}}function ur(n){if(Ke(n))return!0;throw new Error("Expected a YAML collection as document contents")}class Vd extends Error{constructor(e,i,r,l){super(),this.name=e,this.code=r,this.message=l,this.pos=i}}class gs extends Vd{constructor(e,i,r){super("YAMLParseError",e,i,r)}}class xS extends Vd{constructor(e,i,r){super("YAMLWarning",e,i,r)}}const pc=(n,e)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(f=>e.linePos(f));const{line:r,col:l}=i.linePos[0];i.message+=` at line ${r}, column ${l}`;let o=l-1,u=n.substring(e.lineStarts[r-1],e.lineStarts[r]).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)+"…"),r>1&&/^ *$/.test(u.substring(0,o))){let f=n.substring(e.lineStarts[r-2],e.lineStarts[r-1]);f.length>80&&(f=f.substring(0,79)+`…
`),u=f+u}if(/[^ ]/.test(u)){let f=1;const d=i.linePos[1];(d==null?void 0:d.line)===r&&d.col>l&&(f=Math.max(1,Math.min(d.col-l,80-o)));const g=" ".repeat(o)+"^".repeat(f);i.message+=`:

${u}
${g}
`}};function Nr(n,{flow:e,indicator:i,next:r,offset:l,onError:o,parentIndent:u,startOnNewline:f}){let d=!1,g=f,b=f,m="",S="",w=!1,E=!1,x=null,_=null,A=null,N=null,$=null,G=null,X=null;for(const B of n)switch(E&&(B.type!=="space"&&B.type!=="newline"&&B.type!=="comma"&&o(B.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),x&&(g&&B.type!=="comment"&&B.type!=="newline"&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),x=null),B.type){case"space":!e&&(i!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&B.source.includes("	")&&(x=B),b=!0;break;case"comment":{b||o(B,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const O=B.source.substring(1)||" ";m?m+=S+O:m=O,S="",g=!1;break}case"newline":g?m?m+=B.source:(!G||i!=="seq-item-ind")&&(d=!0):S+=B.source,g=!0,w=!0,(_||A)&&(N=B),b=!0;break;case"anchor":_&&o(B,"MULTIPLE_ANCHORS","A node can have at most one anchor"),B.source.endsWith(":")&&o(B.offset+B.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),_=B,X??(X=B.offset),g=!1,b=!1,E=!0;break;case"tag":{A&&o(B,"MULTIPLE_TAGS","A node can have at most one tag"),A=B,X??(X=B.offset),g=!1,b=!1,E=!0;break}case i:(_||A)&&o(B,"BAD_PROP_ORDER",`Anchors and tags must be after the ${B.source} indicator`),G&&o(B,"UNEXPECTED_TOKEN",`Unexpected ${B.source} in ${e??"collection"}`),G=B,g=i==="seq-item-ind"||i==="explicit-key-ind",b=!1;break;case"comma":if(e){$&&o(B,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),$=B,g=!1,b=!1;break}default:o(B,"UNEXPECTED_TOKEN",`Unexpected ${B.type} token`),g=!1,b=!1}const U=n[n.length-1],L=U?U.offset+U.source.length:l;return E&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),x&&(g&&x.indent<=u||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:$,found:G,spaceBefore:d,comment:m,hasNewline:w,anchor:_,tag:A,newlineAfterProp:N,end:L,start:X??L}}function ol(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
`))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(ol(e.key)||ol(e.value))return!0}return!1;default:return!0}}function Qh(n,e,i){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===n&&(r.source==="]"||r.source==="}")&&ol(e)&&i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function _S(n,e,i){const{uniqueKeys:r}=n.options;if(r===!1)return!1;const l=typeof r=="function"?r:(o,u)=>o===u||ze(o)&&ze(u)&&o.value===u.value;return e.some(o=>l(o.key,i))}const Qb="All mapping items must start at the same column";function cC({composeNode:n,composeEmptyNode:e},i,r,l,o){var b;const u=(o==null?void 0:o.nodeClass)??Wt,f=new u(i.schema);i.atRoot&&(i.atRoot=!1);let d=r.offset,g=null;for(const m of r.items){const{start:S,key:w,sep:E,value:x}=m,_=Nr(S,{indicator:"explicit-key-ind",next:w??(E==null?void 0:E[0]),offset:d,onError:l,parentIndent:r.indent,startOnNewline:!0}),A=!_.found;if(A){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!==r.indent&&l(d,"BAD_INDENT",Qb)),!_.anchor&&!_.tag&&!E){g=_.end,_.comment&&(f.comment?f.comment+=`
`+_.comment:f.comment=_.comment);continue}(_.newlineAfterProp||ol(w))&&l(w??S[S.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((b=_.found)==null?void 0:b.indent)!==r.indent&&l(d,"BAD_INDENT",Qb);i.atKey=!0;const N=_.end,$=w?n(i,w,_,l):e(i,N,S,null,_,l);i.schema.compat&&Qh(r.indent,w,l),i.atKey=!1,_S(i,f.items,$)&&l(N,"DUPLICATE_KEY","Map keys must be unique");const G=Nr(E??[],{indicator:"map-value-ind",next:x,offset:$.range[2],onError:l,parentIndent:r.indent,startOnNewline:!w||w.type==="block-scalar"});if(d=G.end,G.found){A&&((x==null?void 0:x.type)==="block-map"&&!G.hasNewline&&l(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&_.start<G.found.offset-1024&&l($.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const X=x?n(i,x,G,l):e(i,d,E,null,G,l);i.schema.compat&&Qh(r.indent,x,l),d=X.range[2];const U=new Tt($,X);i.options.keepSourceTokens&&(U.srcToken=m),f.items.push(U)}else{A&&l($.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),G.comment&&($.comment?$.comment+=`
`+G.comment:$.comment=G.comment);const X=new Tt($);i.options.keepSourceTokens&&(X.srcToken=m),f.items.push(X)}}return g&&g<d&&l(g,"IMPOSSIBLE","Map comment with trailing content"),f.range=[r.offset,d,g??d],f}function uC({composeNode:n,composeEmptyNode:e},i,r,l,o){const u=(o==null?void 0:o.nodeClass)??Ui,f=new u(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let d=r.offset,g=null;for(const{start:b,value:m}of r.items){const S=Nr(b,{indicator:"seq-item-ind",next:m,offset:d,onError:l,parentIndent:r.indent,startOnNewline:!0});if(!S.found)if(S.anchor||S.tag||m)(m==null?void 0:m.type)==="block-seq"?l(S.end,"BAD_INDENT","All sequence items must start at the same column"):l(d,"MISSING_CHAR","Sequence item without - indicator");else{g=S.end,S.comment&&(f.comment=S.comment);continue}const w=m?n(i,m,S,l):e(i,S.end,b,null,S,l);i.schema.compat&&Qh(r.indent,m,l),d=w.range[2],f.items.push(w)}return f.range=[r.offset,d,g??d],f}function pl(n,e,i,r){let l="";if(n){let o=!1,u="";for(const f of n){const{source:d,type:g}=f;switch(g){case"space":o=!0;break;case"comment":{i&&!o&&r(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const b=d.substring(1)||" ";l?l+=u+b:l=b,u="";break}case"newline":l&&(u+=d),o=!0;break;default:r(f,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}e+=d.length}}return{comment:l,offset:e}}const wh="Block collections are not allowed within flow collections",xh=n=>n&&(n.type==="block-map"||n.type==="block-seq");function fC({composeNode:n,composeEmptyNode:e},i,r,l,o){var _;const u=r.start.source==="{",f=u?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(u?Wt:Ui),g=new d(i.schema);g.flow=!0;const b=i.atRoot;b&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let m=r.offset+r.start.source.length;for(let A=0;A<r.items.length;++A){const N=r.items[A],{start:$,key:G,sep:X,value:U}=N,L=Nr($,{flow:f,indicator:"explicit-key-ind",next:G??(X==null?void 0:X[0]),offset:m,onError:l,parentIndent:r.indent,startOnNewline:!1});if(!L.found){if(!L.anchor&&!L.tag&&!X&&!U){A===0&&L.comma?l(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):A<r.items.length-1&&l(L.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),L.comment&&(g.comment?g.comment+=`
`+L.comment:g.comment=L.comment),m=L.end;continue}!u&&i.options.strict&&ol(G)&&l(G,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(A===0)L.comma&&l(L.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(L.comma||l(L.start,"MISSING_CHAR",`Missing , between ${f} items`),L.comment){let B="";e:for(const O of $)switch(O.type){case"comma":case"space":break;case"comment":B=O.source.substring(1);break e;default:break e}if(B){let O=g.items[g.items.length-1];Ve(O)&&(O=O.value??O.key),O.comment?O.comment+=`
`+B:O.comment=B,L.comment=L.comment.substring(B.length+1)}}if(!u&&!X&&!L.found){const B=U?n(i,U,L,l):e(i,L.end,X,null,L,l);g.items.push(B),m=B.range[2],xh(U)&&l(B.range,"BLOCK_IN_FLOW",wh)}else{i.atKey=!0;const B=L.end,O=G?n(i,G,L,l):e(i,B,$,null,L,l);xh(G)&&l(O.range,"BLOCK_IN_FLOW",wh),i.atKey=!1;const ne=Nr(X??[],{flow:f,indicator:"map-value-ind",next:U,offset:O.range[2],onError:l,parentIndent:r.indent,startOnNewline:!1});if(ne.found){if(!u&&!L.found&&i.options.strict){if(X)for(const W of X){if(W===ne.found)break;if(W.type==="newline"){l(W,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}L.start<ne.found.offset-1024&&l(ne.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else U&&("source"in U&&((_=U.source)==null?void 0:_[0])===":"?l(U,"MISSING_CHAR",`Missing space after : in ${f}`):l(ne.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const te=U?n(i,U,ne,l):ne.found?e(i,ne.end,X,null,ne,l):null;te?xh(U)&&l(te.range,"BLOCK_IN_FLOW",wh):ne.comment&&(O.comment?O.comment+=`
`+ne.comment:O.comment=ne.comment);const V=new Tt(O,te);if(i.options.keepSourceTokens&&(V.srcToken=N),u){const W=g;_S(i,W.items,O)&&l(B,"DUPLICATE_KEY","Map keys must be unique"),W.items.push(V)}else{const W=new Wt(i.schema);W.flow=!0,W.items.push(V);const ge=(te??O).range;W.range=[O.range[0],ge[1],ge[2]],g.items.push(W)}m=te?te.range[2]:ne.end}}const S=u?"}":"]",[w,...E]=r.end;let x=m;if((w==null?void 0:w.source)===S)x=w.offset+w.source.length;else{const A=f[0].toUpperCase()+f.substring(1),N=b?`${A} must end with a ${S}`:`${A} in block collection must be sufficiently indented and end with a ${S}`;l(m,b?"MISSING_CHAR":"BAD_INDENT",N),w&&w.source.length!==1&&E.unshift(w)}if(E.length>0){const A=pl(E,x,i.options.strict,l);A.comment&&(g.comment?g.comment+=`
`+A.comment:g.comment=A.comment),g.range=[r.offset,x,A.offset]}else g.range=[r.offset,x,x];return g}function _h(n,e,i,r,l,o){const u=i.type==="block-map"?cC(n,e,i,r,o):i.type==="block-seq"?uC(n,e,i,r,o):fC(n,e,i,r,o),f=u.constructor;return l==="!"||l===f.tagName?(u.tag=f.tagName,u):(l&&(u.tag=l),u)}function hC(n,e,i,r,l){var S;const o=r.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}=r,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===Wt.tagName&&f==="map"||u===Ui.tagName&&f==="seq")return _h(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==null?void 0:w.collection)===f)e.schema.tags.push(Object.assign({},w,{default:!1})),d=w;else return w?l(o,"BAD_COLLECTION_TYPE",`${w.tag} used for ${f} collection, but expects ${w.collection??"scalar"}`,!0):l(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),_h(n,e,i,l,u)}const g=_h(n,e,i,l,u,d),b=((S=d.resolve)==null?void 0:S.call(d,g,w=>l(o,"TAG_RESOLVE_FAILED",w),e.options))??g,m=Xe(b)?b:new ue(b);return m.range=g.range,m.tag=u,d!=null&&d.format&&(m.format=d.format),m}function ES(n,e,i){const r=e.offset,l=dC(e,n.options.strict,i);if(!l)return{value:"",type:null,comment:"",range:[r,r,r]};const o=l.mode===">"?ue.BLOCK_FOLDED:ue.BLOCK_LITERAL,u=e.source?pC(e.source):[];let f=u.length;for(let x=u.length-1;x>=0;--x){const _=u[x][1];if(_===""||_==="\r")f=x;else break}if(f===0){const x=l.chomp==="+"&&u.length>0?`
`.repeat(Math.max(1,u.length-1)):"";let _=r+l.length;return e.source&&(_+=e.source.length),{value:x,type:o,comment:l.comment,range:[r,_,_]}}let d=e.indent+l.indent,g=e.offset+l.length,b=0;for(let x=0;x<f;++x){const[_,A]=u[x];if(A===""||A==="\r")l.indent===0&&_.length>d&&(d=_.length);else{_.length<d&&i(g+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),l.indent===0&&(d=_.length),b=x,d===0&&!n.atRoot&&i(g,"BAD_INDENT","Block scalar values in collections must be indented");break}g+=_.length+A.length+1}for(let x=u.length-1;x>=f;--x)u[x][0].length>d&&(f=x+1);let m="",S="",w=!1;for(let x=0;x<b;++x)m+=u[x][0].slice(d)+`
`;for(let x=b;x<f;++x){let[_,A]=u[x];g+=_.length+A.length+1;const N=A[A.length-1]==="\r";if(N&&(A=A.slice(0,-1)),A&&_.length<d){const G=`Block scalar lines must not be less indented than their ${l.indent?"explicit indentation indicator":"first line"}`;i(g-A.length-(N?2:1),"BAD_INDENT",G),_=""}o===ue.BLOCK_LITERAL?(m+=S+_.slice(d)+A,S=`
`):_.length>d||A[0]==="	"?(S===" "?S=`
`:!w&&S===`
`&&(S=`

`),m+=S+_.slice(d)+A,S=`
`,w=!0):A===""?S===`
`?m+=`
`:S=`
`:(m+=S+A,S=" ",w=!1)}switch(l.chomp){case"-":break;case"+":for(let x=f;x<u.length;++x)m+=`
`+u[x][0].slice(d);m[m.length-1]!==`
`&&(m+=`
`);break;default:m+=`
`}const E=r+l.length+e.source.length;return{value:m,type:o,comment:l.comment,range:[r,E,E]}}function dC({offset:n,props:e},i,r){if(e[0].type!=="block-scalar-header")return r(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 S=1;S<l.length;++S){const w=l[S];if(!f&&(w==="-"||w==="+"))f=w;else{const E=Number(w);!u&&E?u=E:d===-1&&(d=n+S)}}d!==-1&&r(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${l}`);let g=!1,b="",m=l.length;for(let S=1;S<e.length;++S){const w=e[S];switch(w.type){case"space":g=!0;case"newline":m+=w.source.length;break;case"comment":i&&!g&&r(w,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),m+=w.source.length,b=w.source.substring(1);break;case"error":r(w,"UNEXPECTED_TOKEN",w.message),m+=w.source.length;break;default:{const E=`Unexpected token in block scalar header: ${w.type}`;r(w,"UNEXPECTED_TOKEN",E);const x=w.source;x&&typeof x=="string"&&(m+=x.length)}}}return{mode:o,indent:u,chomp:f,comment:b,length:m}}function pC(n){const e=n.split(/\n( *)/),i=e[0],r=i.match(/^( *)/),o=[r!=null&&r[1]?[r[1],i.slice(r[1].length)]:["",i]];for(let u=1;u<e.length;u+=2)o.push([e[u],e[u+1]]);return o}function TS(n,e,i){const{offset:r,type:l,source:o,end:u}=n;let f,d;const g=(S,w,E)=>i(r+S,w,E);switch(l){case"scalar":f=ue.PLAIN,d=gC(o,g);break;case"single-quoted-scalar":f=ue.QUOTE_SINGLE,d=mC(o,g);break;case"double-quoted-scalar":f=ue.QUOTE_DOUBLE,d=yC(o,g);break;default:return i(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[r,r+o.length,r+o.length]}}const b=r+o.length,m=pl(u,b,e,i);return{value:d,type:f,comment:m.comment,range:[r,b,m.offset]}}function gC(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}`),AS(n)}function mC(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),AS(n.slice(1,-1)).replace(/''/g,"'")}function AS(n){let e,i;try{e=new RegExp(`(.*?)(?<![ 	])[ 	]*\r?
`,"sy"),i=new RegExp(`[ 	]*(.*?)(?:(?<![ 	])[ 	]*)?\r?
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(n);if(!r)return n;let l=r[1],o=" ",u=e.lastIndex;for(i.lastIndex=u;r=i.exec(n);)r[1]===""?o===`
`?l+=o:o=`
`:(l+=o+r[1],o=" "),u=i.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=u,r=f.exec(n),l+o+((r==null?void 0:r[1])??"")}function yC(n,e){let i="";for(let r=1;r<n.length-1;++r){const l=n[r];if(!(l==="\r"&&n[r+1]===`
`))if(l===`
`){const{fold:o,offset:u}=bC(n,r);i+=o,r=u}else if(l==="\\"){let o=n[++r];const u=vC[o];if(u)i+=u;else if(o===`
`)for(o=n[r+1];o===" "||o==="	";)o=n[++r+1];else if(o==="\r"&&n[r+1]===`
`)for(o=n[++r+1];o===" "||o==="	";)o=n[++r+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];i+=SC(n,r+1,f,e),r+=f}else{const f=n.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),i+=f}}else if(l===" "||l==="	"){const o=r;let u=n[r+1];for(;u===" "||u==="	";)u=n[++r+1];u!==`
`&&!(u==="\r"&&n[r+2]===`
`)&&(i+=r>o?n.slice(o,r+1):l)}else i+=l}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),i}function bC(n,e){let i="",r=n[e+1];for(;(r===" "||r==="	"||r===`
`||r==="\r")&&!(r==="\r"&&n[e+2]!==`
`);)r===`
`&&(i+=`
`),e+=1,r=n[e+1];return i||(i=" "),{fold:i,offset:e}}const vC={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:"	",v:"\v",N:"",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","	":"	"};function SC(n,e,i,r){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 r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(u)}function CS(n,e,i,r){const{value:l,type:o,comment:u,range:f}=e.type==="block-scalar"?ES(n,e,r):TS(e,n.options.strict,r),d=i?n.directives.tagName(i.source,m=>r(i,"TAG_RESOLVE_FAILED",m)):null;let g;n.options.stringKeys&&n.atKey?g=n.schema[Ln]:d?g=wC(n.schema,l,d,i,r):e.type==="scalar"?g=xC(n,l,e,r):g=n.schema[Ln];let b;try{const m=g.resolve(l,S=>r(i??e,"TAG_RESOLVE_FAILED",S),n.options);b=ze(m)?m:new ue(m)}catch(m){const S=m instanceof Error?m.message:String(m);r(i??e,"TAG_RESOLVE_FAILED",S),b=new ue(l)}return b.range=f,b.source=l,o&&(b.type=o),d&&(b.tag=d),g.format&&(b.format=g.format),u&&(b.comment=u),b}function wC(n,e,i,r,l){var f;if(i==="!")return n[Ln];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(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),n[Ln])}function xC({atKey:n,directives:e,schema:i},r,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(r))})||i[Ln];if(i.compat){const f=i.compat.find(d=>{var g;return d.default&&((g=d.test)==null?void 0:g.test(r))})??i[Ln];if(u.tag!==f.tag){const d=e.tagString(u.tag),g=e.tagString(f.tag),b=`Value may be parsed as either ${d} or ${g}`;o(l,"TAG_RESOLVE_FAILED",b,!0)}}return u}function _C(n,e,i){if(e){i??(i=e.length);for(let r=i-1;r>=0;--r){let l=e[r];switch(l.type){case"space":case"comment":case"newline":n-=l.source.length;continue}for(l=e[++r];(l==null?void 0:l.type)==="space";)n+=l.source.length,l=e[++r];break}}return n}const EC={composeNode:NS,composeEmptyNode:Gd};function NS(n,e,i,r){const l=n.atKey,{spaceBefore:o,comment:u,anchor:f,tag:d}=i;let g,b=!0;switch(e.type){case"alias":g=TC(n,e,r),(f||d)&&r(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":g=CS(n,e,d,r),f&&(g.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{g=hC(EC,n,e,i,r),f&&(g.anchor=f.source.substring(1))}catch(m){const S=m instanceof Error?m.message:String(m);r(e,"RESOURCE_EXHAUSTION",S)}break;default:{const m=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",m),b=!1}}return g??(g=Gd(n,e.offset,void 0,null,i,r)),f&&g.anchor===""&&r(f,"BAD_ALIAS","Anchor cannot be an empty string"),l&&n.options.stringKeys&&(!ze(g)||typeof g.value!="string"||g.tag&&g.tag!=="tag:yaml.org,2002:str")&&r(d??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(g.spaceBefore=!0),u&&(e.type==="scalar"&&e.source===""?g.comment=u:g.commentBefore=u),n.options.keepSourceTokens&&b&&(g.srcToken=e),g}function Gd(n,e,i,r,{spaceBefore:l,comment:o,anchor:u,tag:f,end:d},g){const b={type:"scalar",offset:_C(e,i,r),indent:-1,source:""},m=CS(n,b,f,g);return u&&(m.anchor=u.source.substring(1),m.anchor===""&&g(u,"BAD_ALIAS","Anchor cannot be an empty string")),l&&(m.spaceBefore=!0),o&&(m.comment=o,m.range[2]=d),m}function TC({options:n},{offset:e,source:i,end:r},l){const o=new Ac(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=pl(r,u,n.strict,l);return o.range=[e,u,f.offset],f.comment&&(o.comment=f.comment),o}function AC(n,e,{offset:i,start:r,value:l,end:o},u){const f=Object.assign({_directives:e},n),d=new Hr(void 0,f),g={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},b=Nr(r,{indicator:"doc-start",next:l??(o==null?void 0:o[0]),offset:i,onError:u,parentIndent:0,startOnNewline:!0});b.found&&(d.directives.docStart=!0,l&&(l.type==="block-map"||l.type==="block-seq")&&!b.hasNewline&&u(b.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=l?NS(g,l,b,u):Gd(g,b.end,r,null,b,u);const m=d.contents.range[2],S=pl(o,m,!1,u);return S.comment&&(d.comment=S.comment),d.range=[i,m,S.offset],d}function qa(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 Pb(n){var l;let e="",i=!1,r=!1;for(let o=0;o<n.length;++o){const u=n[o];switch(u[0]){case"#":e+=(e===""?"":r?`

`:`
`)+(u.substring(1)||" "),i=!0,r=!1;break;case"%":((l=n[o+1])==null?void 0:l[0])!=="#"&&(o+=1),i=!1;break;default:i||(r=!0),i=!1}}return{comment:e,afterEmptyLine:r}}class Kd{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,r,l,o)=>{const u=qa(i);o?this.warnings.push(new xS(u,r,l)):this.errors.push(new gs(u,r,l))},this.directives=new Ot({version:e.version||"1.2"}),this.options=e}decorate(e,i){const{comment:r,afterEmptyLine:l}=Pb(this.prelude);if(r){const o=e.contents;if(i)e.comment=e.comment?`${e.comment}
${r}`:r;else if(l||e.directives.docStart||!o)e.commentBefore=r;else if(Ke(o)&&!o.flow&&o.items.length>0){let u=o.items[0];Ve(u)&&(u=u.key);const f=u.commentBefore;u.commentBefore=f?`${r}
${f}`:r}else{const u=o.commentBefore;o.commentBefore=u?`${r}
${u}`:r}}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:Pb(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,r=-1){for(const l of e)yield*this.next(l);yield*this.end(i,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(i,r,l)=>{const o=qa(e);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",r,l)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const i=AC(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,r=new gs(qa(e),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new gs(qa(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const i=pl(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new gs(qa(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 r=Object.assign({_directives:this.directives},this.options),l=new Hr(void 0,r);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),l.range=[0,i,i],this.decorate(l,!1),yield l}}}function CC(n,e=!0,i){if(n){const r=(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 gs([f,f+1],o,u)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return TS(n,e,r);case"block-scalar":return ES({options:{strict:e}},n,r)}}return null}function NC(n,e){const{implicitKey:i=!1,indent:r,inFlow:l=!1,offset:o=-1,type:u="PLAIN"}=e,f=hl({type:u,value:n},{implicitKey:i,indent:r>0?" ".repeat(r):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:r,source:`
`}];switch(f[0]){case"|":case">":{const g=f.indexOf(`
`),b=f.substring(0,g),m=f.substring(g+1)+`
`,S=[{type:"block-scalar-header",offset:o,indent:r,source:b}];return kS(S,d)||S.push({type:"newline",offset:-1,indent:r,source:`
`}),{type:"block-scalar",offset:o,indent:r,props:S,source:m}}case'"':return{type:"double-quoted-scalar",offset:o,indent:r,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:o,indent:r,source:f,end:d};default:return{type:"scalar",offset:o,indent:r,source:f,end:d}}}function kC(n,e,i={}){let{afterKey:r=!1,implicitKey:l=!1,inFlow:o=!1,type:u}=i,f="indent"in n?n.indent:null;if(r&&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 g=n.props[0];if(g.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u=g.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const d=hl({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">":MC(n,d);break;case'"':Eh(n,d,"double-quoted-scalar");break;case"'":Eh(n,d,"single-quoted-scalar");break;default:Eh(n,d,"scalar")}}function MC(n,e){const i=e.indexOf(`
`),r=e.substring(0,i),l=e.substring(i+1)+`
`;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=r,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:r}];kS(f,"end"in n?n.end:void 0)||f.push({type:"newline",offset:-1,indent:u,source:`
`});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 kS(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 Eh(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 r=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 r)o.offset+=l;delete n.props,Object.assign(n,{type:i,source:e,end:r});break}case"block-map":case"block-seq":{const l={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
`};delete n.items,Object.assign(n,{type:i,source:e,end:[l]});break}default:{const r="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:r,source:e,end:l})}}}const OC=n=>"type"in n?gc(n):nc(n);function gc(n){switch(n.type){case"block-scalar":{let e="";for(const i of n.props)e+=gc(i);return e+n.source}case"block-map":case"block-seq":{let e="";for(const i of n.items)e+=nc(i);return e}case"flow-collection":{let e=n.start.source;for(const i of n.items)e+=nc(i);for(const i of n.end)e+=i.source;return e}case"document":{let e=nc(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 nc({start:n,key:e,sep:i,value:r}){let l="";for(const o of n)l+=o.source;if(e&&(l+=gc(e)),i)for(const o of i)l+=o.source;return r&&(l+=gc(r)),l}const Ph=Symbol("break visit"),jC=Symbol("skip children"),MS=Symbol("remove item");function ms(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),OS(Object.freeze([]),n,e)}ms.BREAK=Ph;ms.SKIP=jC;ms.REMOVE=MS;ms.itemAtPath=(n,e)=>{let i=n;for(const[r,l]of e){const o=i==null?void 0:i[r];if(o&&"items"in o)i=o.items[l];else return}return i};ms.parentCollection=(n,e)=>{const i=ms.itemAtPath(n,e.slice(0,-1)),r=e[e.length-1][0],l=i==null?void 0:i[r];if(l&&"items"in l)return l;throw new Error("Parent collection not found")};function OS(n,e,i){let r=i(e,n);if(typeof r=="symbol")return r;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=OS(Object.freeze(n.concat([[l,u]])),o.items[u],i);if(typeof f=="number")u=f-1;else{if(f===Ph)return Ph;f===MS&&(o.items.splice(u,1),u-=1)}}typeof r=="function"&&l==="key"&&(r=r(e,n))}}return typeof r=="function"?r(e,n):r}const zc="\uFEFF",Uc="",Hc="",cl="",LC=n=>!!n&&"items"in n,RC=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function DC(n){switch(n){case zc:return"<BOM>";case Uc:return"<DOC>";case Hc:return"<FLOW_END>";case cl:return"<SCALAR>";default:return JSON.stringify(n)}}function jS(n){switch(n){case zc:return"byte-order-mark";case Uc:return"doc-mode";case Hc:return"flow-error-end";case cl:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(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 zC=Object.freeze(Object.defineProperty({__proto__:null,BOM:zc,DOCUMENT:Uc,FLOW_END:Hc,SCALAR:cl,createScalarToken:NC,isCollection:LC,isScalar:RC,prettyToken:DC,resolveAsScalar:CC,setScalarValue:kC,stringify:OC,tokenType:jS,visit:ms},Symbol.toStringTag,{value:"Module"}));function xn(n){switch(n){case void 0:case" ":case`
`:case"\r":case"	":return!0;default:return!1}}const Jb=new Set("0123456789ABCDEFabcdef"),UC=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Vo=new Set(",[]{}"),HC=new Set(` ,[]{}
\r	`),Th=n=>!n||HC.has(n);class LS{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 r=this.next??"stream";for(;r&&(i||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,i=this.buffer[e];for(;i===" "||i==="	";)i=this.buffer[++e];return!i||i==="#"||i===`
`?!0:i==="\r"?this.buffer[e+1]===`
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let i=this.buffer[e];if(this.indentNext>0){let r=0;for(;i===" ";)i=this.buffer[++r+e];if(i==="\r"){const l=this.buffer[r+e+1];if(l===`
`||!l&&!this.atEnd)return e+r+1}return i===`
`||r>=this.indentNext||!i&&!this.atEnd?e+r:-1}if(i==="-"||i==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&xn(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=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]===zc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let i=e.length,r=e.indexOf("#");for(;r!==-1;){const o=e[r-1];if(o===" "||o==="	"){i=r-1;break}else r=e.indexOf("#",r+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 Uc,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==="...")&&xn(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&&!xn(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===":")&&xn(i)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,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(Th),"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,r=-1;do e=yield*this.pushNewline(),e>0?(i=yield*this.pushSpaces(!1),this.indentValue=r=i):i=0,i+=yield*this.pushSpaces(!0);while(e+i>0);const l=this.getLine();if(l===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&l[0]!=="#"||r===0&&(l.startsWith("---")||l.startsWith("..."))&&xn(l[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(l[0]==="]"||l[0]==="}")))return this.flowLevel=0,yield Hc,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(Th),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const u=this.charAt(1);if(this.flowKey||xn(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 r=this.buffer.substring(0,i);let l=r.indexOf(`
`,this.pos);if(l!==-1){for(;l!==-1;){const o=this.continueScalar(l+1);if(o===-1)break;l=r.indexOf(`
`,o)}l!==-1&&(i=l-(r[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=>xn(i)||i==="#")}*parseBlockScalar(){let e=this.pos-1,i=0,r;e:for(let o=this.pos;r=this.buffer[o];++o)switch(r){case" ":i+=1;break;case`
`:e=o,i=0;break;case"\r":{const u=this.buffer[o+1];if(!u&&!this.atEnd)return this.setNext("block-scalar");if(u===`
`)break}default:break e}if(!r&&!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(`
`,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let l=e+1;for(r=this.buffer[l];r===" ";)r=this.buffer[++l];if(r==="	"){for(;r==="	"||r===" "||r==="\r"||r===`
`;)r=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===`
`&&o>=this.pos&&o+1+i>f)e=o;else break}while(!0);return yield cl,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let i=this.pos-1,r=this.pos-1,l;for(;l=this.buffer[++r];)if(l===":"){const o=this.buffer[r+1];if(xn(o)||e&&Vo.has(o))break;i=r}else if(xn(l)){let o=this.buffer[r+1];if(l==="\r"&&(o===`
`?(r+=1,l=`
`,o=this.buffer[r+1]):i=r),o==="#"||e&&Vo.has(o))break;if(l===`
`){const u=this.continueScalar(r+1);if(u===-1)break;r=Math.max(r,u-2)}}else{if(e&&Vo.has(l))break;i=r}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield cl,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 r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.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(Th))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,i=this.charAt(1);if(xn(i)||e&&Vo.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(;!xn(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(UC.has(i))i=this.buffer[++e];else if(i==="%"&&Jb.has(this.buffer[e+1])&&Jb.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===`
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(e){let i=this.pos-1,r;do r=this.buffer[++i];while(r===" "||e&&r==="	");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,r=this.buffer[i];for(;!e(r);)r=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class RS{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,r=this.lineStarts.length;for(;i<r;){const o=i+r>>1;this.lineStarts[o]<e?i=o+1:r=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 Ri(n,e){for(let i=0;i<n.length;++i)if(n[i].type===e)return!0;return!1}function Zb(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 DS(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 Go(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 fr(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 Wb(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!Ri(e.start,"explicit-key-ind")&&!Ri(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,DS(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 Xd{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 LS,this.onNewLine=e}*parse(e,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,i))yield*this.next(r);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=jS(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 r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,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==null?void 0: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 r=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in r?r.indent:0:i.type==="flow-collection"&&r.type==="document"&&(i.indent=0),i.type==="flow-collection"&&Wb(i),r.type){case"document":r.value=i;break;case"block-scalar":r.props.push(i);break;case"block-map":{const l=r.items[r.items.length-1];if(l.value){r.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=r.items[r.items.length-1];l.value?r.items.push({start:[],value:i}):l.value=i;break}case"flow-collection":{const l=r.items[r.items.length-1];!l||l.value?r.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((r.type==="document"||r.type==="block-map"||r.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&&Zb(l.start)===-1&&(i.indent===0||l.start.every(o=>o.type!=="comment"||o.indent<i.indent))&&(r.type==="document"?r.end=l.start:r.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":{Zb(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=Go(this.peek(2)),r=fr(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:r,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(`
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
`,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;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=(r=l==null?void 0:l.value)==null?void 0:r.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 g=i.sep[d];switch(g.type){case"newline":f.push(d);break;case"space":break;case"comment":g.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(Ri(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(DS(i.key)&&!Ri(i.sep,"newline")){const f=fr(i.start),d=i.key,g=i.sep;g.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:g}]})}else u.length>0?i.sep=i.sep.concat(u,this.sourceToken):i.sep.push(this.sourceToken);else if(Ri(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const f=fr(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]}):Ri(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){if(f.type==="block-seq"){if(!i.explicitKey&&i.sep&&!Ri(i.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else l&&e.items.push({start:u});this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;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=(r=l==null?void 0:l.value)==null?void 0:r.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||Ri(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 r;do yield*this.pop(),r=this.peek(1);while((r==null?void 0:r.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 r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const l=Go(r),o=fr(l);Wb(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(`
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
`,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=Go(e),r=fr(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=Go(e),r=fr(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function zS(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new RS||null,prettyErrors:e}}function BC(n,e={}){const{lineCounter:i,prettyErrors:r}=zS(e),l=new Xd(i==null?void 0:i.addNewLine),o=new Kd(e),u=Array.from(o.compose(l.parse(n)));if(r&&i)for(const f of u)f.errors.forEach(pc(n,i)),f.warnings.forEach(pc(n,i));return u.length>0?u:Object.assign([],{empty:!0},o.streamInfo())}function US(n,e={}){const{lineCounter:i,prettyErrors:r}=zS(e),l=new Xd(i==null?void 0:i.addNewLine),o=new Kd(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 gs(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&i&&(u.errors.forEach(pc(n,i)),u.warnings.forEach(pc(n,i))),u}function qC(n,e,i){let r;typeof e=="function"?r=e:i===void 0&&e&&typeof e=="object"&&(i=e);const l=US(n,i);if(!l)return null;if(l.warnings.forEach(o=>iS(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:r},i))}function $C(n,e,i){let r=null;if(typeof e=="function"||Array.isArray(e)?r=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 vs(n)&&!r?n.toString(i):new Hr(n,r,i).toString(i)}const HS=Object.freeze(Object.defineProperty({__proto__:null,Alias:Ac,CST:zC,Composer:Kd,Document:Hr,Lexer:LS,LineCounter:RS,Pair:Tt,Parser:Xd,Scalar:ue,Schema:Dc,YAMLError:Vd,YAMLMap:Wt,YAMLParseError:gs,YAMLSeq:Ui,YAMLWarning:xS,isAlias:Bi,isCollection:Ke,isDocument:vs,isMap:Rr,isNode:Xe,isPair:Ve,isScalar:ze,isSeq:Dr,parse:qC,parseAllDocuments:BC,parseDocument:US,stringify:$C,visit:Ss,visitAsync:Tc},Symbol.toStringTag,{value:"Module"})),e0=[.5,1,2];function IC(n,e,i,r,l){const[o,u]=R.useState(!1),[f,d]=R.useState(1),[g,b]=R.useState(!1),[m,S]=R.useState(void 0),[w,E]=R.useState(void 0),x=e0[f],_=e?n.indexOf(e):-1,A=l.minimum,N=l.maximum,$=N-A||1,G=r?r.minimum:A,X=r?r.maximum:N,U=R.useMemo(()=>r?n.filter(fe=>fe.startTime>=r.minimum&&fe.startTime<=r.maximum):n,[n,r]),L=U.length?n.indexOf(U[0]):0,B=U.length?n.indexOf(U[U.length-1]):n.length-1,O=R.useRef(n);O.current=n;const ne=R.useRef(i);ne.current=i;const te=R.useRef(null),V=R.useCallback(fe=>{let Ne=0,qe=n.length-1;for(;Ne<qe;){const Ee=Ne+qe+1>>1;n[Ee].startTime<=fe?Ne=Ee:qe=Ee-1}if(Ne<n.length-1){const Ee=fe-n[Ne].startTime;n[Ne+1].startTime-fe<Ee&&(Ne=Ne+1)}return Math.max(L,Math.min(B,Ne))},[n,L,B]),W=e?e.startTime:A;let ge;g&&m!==void 0?ge=m*100:o&&w!==void 0?ge=Math.max(0,Math.min(100,(w-A)/$*100)):ge=Math.max(0,Math.min(100,(W-A)/$*100));const Ue=R.useRef(G);Ue.current=G;const I=R.useRef(X);I.current=X,R.useEffect(()=>{if(!o)return;let fe,Ne,qe=W;qe<Ue.current&&(qe=Ue.current);let Ee=_;E(qe);const Kt=en=>{if(Ne!==void 0){const qi=(en-Ne)*x;qe=Math.min(qe+qi,I.current)}Ne=en,E(qe);const tn=V(qe);if(tn!==Ee&&(Ee=tn,ne.current(O.current[tn])),qe>=I.current){u(!1);return}fe=requestAnimationFrame(Kt)};return fe=requestAnimationFrame(Kt),()=>cancelAnimationFrame(fe)},[o,x]),R.useEffect(()=>{o||E(void 0)},[o]);const J=R.useCallback(()=>{if(!n.length)return;const fe=_>=B;!o&&fe&&i(n[L]),u(!o)},[o,n,_,i,L,B]),re=R.useCallback(()=>{u(!1),n.length&&i(n[L])},[n,i,L]),xe=R.useCallback(()=>{const fe=Math.max(_-1,L);fe!==_&&i(n[fe])},[n,_,i,L]),_e=R.useCallback(()=>{const fe=Math.min(_+1,B);fe!==_&&i(n[fe])},[n,_,i,B]),M=R.useCallback(()=>{d(fe=>(fe+1)%e0.length)},[]);R.useEffect(()=>{u(!1)},[n]);const Y=R.useCallback(fe=>{const Ne=te.current.getBoundingClientRect();return Math.max(0,Math.min(1,(fe.clientX-Ne.left)/Ne.width))},[]),Z=R.useCallback(fe=>{if(!n.length)return;const Ne=A+fe*$,qe=V(Ne);ne.current(O.current[qe])},[n,A,$,V]),P=R.useRef(null);R.useEffect(()=>()=>{var fe;return(fe=P.current)==null?void 0:fe.call(P)},[]);const oe=R.useCallback(fe=>{var Kt;if(!n.length||fe.button!==0)return;fe.preventDefault(),fe.stopPropagation(),(Kt=te.current)==null||Kt.focus(),b(!0),u(!1);const Ne=Y(fe);S(Ne),Z(Ne);const qe=en=>{const tn=Y(en);S(tn),Z(tn)},Ee=en=>{document.removeEventListener("mousemove",qe),document.removeEventListener("mouseup",Ee),P.current=null;const tn=Y(en);Z(tn),S(void 0),b(!1)};document.addEventListener("mousemove",qe),document.addEventListener("mouseup",Ee),P.current=()=>{document.removeEventListener("mousemove",qe),document.removeEventListener("mouseup",Ee)}},[n,Z,Y]),he=!o&&!g,be=n.length>0&&n.length<=200?n.map(fe=>(fe.startTime-A)/$*100):void 0,lt=_>L,ke=_<B,At=o||_>L;return{playing:o,speed:x,currentIndex:_,percent:ge,animating:he,togglePlay:J,stop:re,prev:xe,next:_e,cycleSpeed:M,onScrubberMouseDown:oe,scrubberRef:te,actionsLength:n.length,canPrev:lt,canNext:ke,canStop:At,ticks:be}}const VC=({playback:n})=>v.jsxs(v.Fragment,{children:[v.jsx(ft,{icon:"chevron-left",title:"Previous action",onClick:n.prev,disabled:!n.canPrev}),v.jsx(ft,{icon:n.playing?"debug-pause":"play",disabled:!n.actionsLength,title:n.playing?"Pause":"Play",onClick:n.togglePlay}),v.jsx(ft,{icon:"debug-stop",title:"Stop",onClick:n.stop,disabled:!n.canStop}),v.jsx(ft,{icon:"chevron-right",title:"Next action",onClick:n.next,disabled:!n.canNext}),v.jsxs("button",{className:"playback-speed",onClick:n.cycleSpeed,title:"Playback speed",children:[n.speed,"x"]})]}),GC=({playback:n})=>{var i;const e=R.useCallback(r=>{r.key==="ArrowLeft"?(r.preventDefault(),n.prev()):r.key==="ArrowRight"&&(r.preventDefault(),n.next())},[n]);return v.jsxs("div",{className:"playback-scrubber",ref:n.scrubberRef,onMouseDown:n.onScrubberMouseDown,onKeyDown:e,tabIndex:0,role:"slider","aria-label":"Playback position","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(n.percent),children:[v.jsx("div",{className:"playback-track"}),v.jsx("div",{className:"playback-track-filled"+(n.animating?" animated":""),style:{width:`${n.percent}%`}}),(i=n.ticks)==null?void 0:i.map((r,l)=>v.jsx("div",{className:"playback-tick",style:{left:`${r}%`}},l)),v.jsx("div",{className:"playback-thumb"+(n.animating?" animated":""),style:{left:`${n.percent}%`}})]})},KC=({action:n,model:e,sdkLanguage:i,testIdAttributeName:r,isInspecting:l,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f,playback:d})=>{const[g,b]=R.useState("action"),[m]=Gt("shouldPopulateCanvasFromScreenshot",!1),S=R.useMemo(()=>QC(n),[n]),{snapshotInfoUrl:w,snapshotUrl:E,popoutUrl:x}=R.useMemo(()=>{const A=S[g];return e&&A?PC(e.traceUri,A,m):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[S,g,m,e]),_=R.useMemo(()=>w!==void 0?{snapshotInfoUrl:w,snapshotUrl:E,popoutUrl:x}:void 0,[w,E,x]);return v.jsxs("div",{className:"snapshot-tab vbox",children:[v.jsxs(Sc,{children:[v.jsx(ft,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:l,onClick:()=>o(!l)}),v.jsx("div",{className:"hbox",style:{height:"100%"},role:"tablist",children:["action","before","after"].map(A=>v.jsx(Y0,{id:A,title:FC(A),selected:g===A,onSelect:()=>b(A)},A))}),v.jsx("div",{style:{flex:"auto"}}),v.jsx(VC,{playback:d}),v.jsx(ft,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(_!=null&&_.popoutUrl),onClick:()=>{const A=window.open((_==null?void 0:_.popoutUrl)||"","_blank");A==null||A.addEventListener("DOMContentLoaded",()=>{new Bv(A,{isUnderTest:qS,sdkLanguage:i,testIdAttributeName:r,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),v.jsx(XC,{snapshotUrls:_,sdkLanguage:i,testIdAttributeName:r,isInspecting:l,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})]})},XC=({snapshotUrls:n,sdkLanguage:e,testIdAttributeName:i,isInspecting:r,setIsInspecting:l,highlightedElement:o,setHighlightedElement:u})=>{const f=R.useRef(null),d=R.useRef(null),[g,b]=R.useState({viewport:$S,url:""}),m=R.useRef({iteration:0,visibleIframe:0});return R.useEffect(()=>{(async()=>{const S=m.current.iteration+1,w=1-m.current.visibleIframe;m.current.iteration=S;const E=await JC(n==null?void 0:n.snapshotInfoUrl);if(m.current.iteration!==S)return;const x=[f,d][w].current;if(x){let _=()=>{};const A=new Promise(N=>_=N);try{x.addEventListener("load",_),x.addEventListener("error",_);const N=(n==null?void 0:n.snapshotUrl)||kA;x.contentWindow?x.contentWindow.location.replace(N):x.src=N,await A}catch{}finally{x.removeEventListener("load",_),x.removeEventListener("error",_)}}m.current.iteration===S&&(m.current.visibleIframe=w,b(E))})()},[n]),v.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:S=>{S.key==="Escape"&&r&&l(!1)},children:[v.jsx(t0,{isInspecting:r,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:f.current,iteration:m.current.iteration}),v.jsx(t0,{isInspecting:r,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:d.current,iteration:m.current.iteration}),v.jsx(YC,{snapshotInfo:g,children:v.jsxs("div",{className:"snapshot-switcher",children:[v.jsx("iframe",{ref:f,name:"snapshot",title:"DOM Snapshot",sandbox:"allow-same-origin allow-scripts",className:at(m.current.visibleIframe===0&&"snapshot-visible")}),v.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",sandbox:"allow-same-origin allow-scripts",className:at(m.current.visibleIframe===1&&"snapshot-visible")})]})})]})},YC=({snapshotInfo:n,children:e})=>{const[i,r]=ys(),l=40,o={width:n.viewport.width,height:n.viewport.height},u={width:Math.max(o.width,480),height:Math.max(o.height+l,320)},f=Math.min(i.width/u.width,i.height/u.height,1),d={x:(i.width-u.width)/2,y:(i.height-u.height)/2};return v.jsx("div",{ref:r,className:"snapshot-wrapper",children:v.jsxs("div",{className:"snapshot-container",style:{width:u.width+"px",height:u.height+"px",transform:`translate(${d.x}px, ${d.y}px) scale(${f})`},children:[v.jsx(LA,{url:n.url}),v.jsx("div",{className:"snapshot-browser-body",children:v.jsx("div",{style:{width:o.width+"px",height:o.height+"px"},children:e})})]})})};function FC(n){return n==="before"?"Before":n==="after"?"After":n==="action"?"Action":n}const t0=({iframe:n,isInspecting:e,sdkLanguage:i,testIdAttributeName:r,highlightedElement:l,setHighlightedElement:o,iteration:u})=>(R.useEffect(()=>{const f=l.lastEdited==="ariaSnapshot"?l.ariaSnapshot:void 0,d=l.lastEdited==="locator"?l.locator:void 0,g=!!f||!!d||e,b=[],m=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{BS(b,g,i,r,m,"",n==null?void 0:n.contentWindow)}catch{}const S=f?od(HS,f):void 0,w=d?OA(i,d,r):void 0;for(const{recorder:E,frameSelector:x}of b){const _=w!=null&&w.startsWith(x)?w.substring(x.length).trim():void 0,A=(S==null?void 0:S.errors.length)===0?S.fragment:void 0;E.setUIState({mode:e?"inspecting":"none",actionSelector:_,ariaTemplate:A,language:i,testIdAttributeName:r,overlay:{offsetX:0}},{async elementPicked(N){o({locator:Di(i,x+N.selector),ariaSnapshot:N.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const N of b)N.recorder!==E&&N.recorder.clearHighlight()}})}},[n,e,l,o,i,r,u]),v.jsx(v.Fragment,{}));function BS(n,e,i,r,l,o,u){if(!u)return;const f=u;if(!f._recorder&&e){const d=new Bv(u,{isUnderTest:l,sdkLanguage:i,testIdAttributeName:r,stableRafCount:1,browserName:"chromium",customEngines:[]}),g=new TA(d);f._injectedScript=d,f._recorder={recorder:g,frameSelector:o},l&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(g)))}f._recorder&&n.push(f._recorder);for(let d=0;d<u.frames.length;++d){const g=u.frames[d],b=g.frameElement?f._injectedScript.generateSelectorSimple(g.frameElement,{omitInternalEngines:!0,testIdAttributeName:r})+" >> internal:control=enter-frame >> ":"";BS(n,e,i,r,l,o+b,g)}}const $a=(n,e)=>{if(!n)return;const i=n[e];if(i){if(!n.pageId){console.error("snapshot action must have a pageId");return}return{action:n,snapshotName:i,pageId:n.pageId,point:n.point}}};function QC(n){if(!n)return{};let e=$a(n,"beforeSnapshot");if(!e){for(let l=ib(n);l;l=ib(l))if(l.endTime<=n.startTime&&l.afterSnapshot){e=$a(l,"afterSnapshot");break}}let i=$a(n,"afterSnapshot");if(!i){let l;for(let o=sb(n);o&&o.startTime<=n.endTime;o=sb(o))o.endTime>n.endTime||!o.afterSnapshot||l&&l.endTime>o.endTime||(l=o);l?i=$a(l,"afterSnapshot"):i=e}const r=$a(n,"inputSnapshot")??i;return r&&(r.point=n.point),{action:r,before:e,after:i}}const qS=new URLSearchParams(window.location.search).has("isUnderTest");function PC(n,e,i){const r=new URLSearchParams;r.set("trace",n),r.set("name",e.snapshotName),qS&&r.set("isUnderTest","true"),e.point&&(r.set("pointX",String(e.point.x)),r.set("pointY",String(e.point.y))),i&&r.set("shouldPopulateCanvasFromScreenshot","1");const l=new URL(`snapshot/${e.pageId}?${r.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${e.pageId}?${r.toString()}`,window.location.href).toString(),u=new URLSearchParams;u.set("r",l),u.set("trace",n);const f=new URL(`snapshot.html?${u.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:l,popoutUrl:f}}async function JC(n){const e={url:"",viewport:$S,timestamp:void 0,wallTime:void 0};if(n){const r=await(await fetch(n)).json();r.error||(e.url=r.url,e.viewport=r.viewport,e.timestamp=r.timestamp,e.wallTime=r.wallTime)}return e}const $S={width:1280,height:720},ZC=bc,WC=({stack:n,setSelectedFrame:e,selectedFrame:i})=>{const r=n||[];return v.jsx(ZC,{name:"stack-trace",ariaLabel:"Stack trace",items:r,selectedItem:r[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(r.indexOf(l))})};function e2(n,e,i,r,l){const o=ri();return Zh(async()=>{var w,E,x,_;const u=n==null?void 0:n[e],f=u!=null&&u.file?u:l;if(!f)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const d=f.file;let g=i.get(d);g||(g={errors:((w=l==null?void 0:l.source)==null?void 0:w.errors)||[],content:(E=l==null?void 0:l.source)==null?void 0:E.content},i.set(d,g));const b=(f==null?void 0:f.line)||((x=g.errors[0])==null?void 0:x.line)||0,m=r&&d.startsWith(r)?d.substring(r.length+1):d,S=g.errors.map(A=>({type:"error",line:A.line,message:A.message}));if(S.push({line:b,type:"running"}),((_=l==null?void 0:l.source)==null?void 0:_.content)!==void 0)g.content=l.source.content;else if(g.content===void 0||f===l){const A=await n2(d);try{let N=o?await fetch(o.createRelativeUrl(`sha1/src@${A}.txt`)):void 0;(!N||N.status===404)&&(N=await fetch(`file?path=${encodeURIComponent(d)}`)),N.status>=400?g.content="":g.content=await N.text()}catch{g.content=`<Unable to read "${d}">`}}return{model:o,source:g,highlight:S,targetLine:b,fileName:m,location:f}},[n,e,r,l],{source:{errors:[],content:"Loading…"},highlight:[]})}const t2=({stack:n,sources:e,rootDir:i,fallbackLocation:r,stackFrameLocation:l,onOpenExternally:o})=>{const[u,f]=R.useState(),[d,g]=R.useState(0);R.useEffect(()=>{u!==n&&(f(n),g(0))},[n,u,f,g]);const{source:b,highlight:m,targetLine:S,fileName:w,location:E}=e2(n,d,e,i,r),x=R.useCallback(()=>{E&&(o?o(E):window.location.href=`vscode://file//${E.file}:${E.line}`)},[o,E]),_=((n==null?void 0:n.length)??0)>1,A=i2(w),N=A.endsWith(".md")?"markdown":"javascript";return v.jsx(sc,{sidebarSize:200,orientation:l==="bottom"?"vertical":"horizontal",sidebarHidden:!_,main:v.jsxs("div",{className:"vbox","data-testid":"source-code",children:[w&&v.jsxs(Sc,{children:[v.jsx("div",{className:"source-tab-file-name",title:w,children:v.jsx("div",{children:A})}),v.jsx(ld,{description:"Copy filename",value:A}),E&&v.jsx(ft,{icon:"link-external",title:"Open in VS Code",onClick:x})]}),v.jsx(Ar,{text:b.content||"",highlighter:N,highlight:m,revealLine:S,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:v.jsx(WC,{stack:n,selectedFrame:d,setSelectedFrame:g})})};async function n2(n){const e=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-1",e),r=[],l=new DataView(i);for(let o=0;o<l.byteLength;o+=1){const u=l.getUint8(o).toString(16).padStart(2,"0");r.push(u)}return r.join("")}function i2(n){if(!n)return"";const e=n!=null&&n.includes("/")?"/":"\\";return(n==null?void 0:n.split(e).pop())??""}const IS={width:200,height:45},pr=2.5,s2=IS.height+pr*2,r2=({boundaries:n,previewPoint:e})=>{var b,m;const i=ri(),[r,l]=ys(),o=R.useRef(null);let u=0;if(o.current&&e){const S=o.current.getBoundingClientRect();u=(e.clientY-S.top+o.current.scrollTop)/s2|0}const f=(m=(b=i==null?void 0:i.pages)==null?void 0:b[u])==null?void 0:m.screencastFrames;let d,g;if(e!==void 0&&f&&f.length){const S=n.minimum+(n.maximum-n.minimum)*e.x/r.width;d=f[i0(f,S,VS)-1];const w={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};g=d?GS({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:i==null?void 0:i.pages.map((S,w)=>S.screencastFrames.length?v.jsx(a2,{boundaries:n,page:S,width:r.width},w):null)}),i&&(e==null?void 0:e.x)!==void 0&&v.jsxs("div",{className:"film-strip-hover",style:{top:r.bottom+5,left:Math.min(e.x,r.width-(g?g.width:0)-10)},children:[d&&g&&v.jsx("div",{style:{width:g.width,height:g.height},children:v.jsx("img",{src:i.createRelativeUrl(`sha1/${d.sha1}`),width:g.width,height:g.height})}),e.action&&v.jsx("div",{className:"film-strip-hover-title",children:rd(e.action,e)})]})]})},a2=({boundaries:n,page:e,width:i})=>{const r=ri(),l={width:0,height:0},o=e.screencastFrames;for(const _ of o)l.width=Math.max(l.width,_.width),l.height=Math.max(l.height,_.height);const u=GS(l,IS),f=o[0].timestamp,d=o[o.length-1].timestamp,g=n.maximum-n.minimum,b=(f-n.minimum)/g*i,m=(n.maximum-d)/g*i,w=(d-f)/g*i/(u.width+2*pr)|0,E=(d-f)/w,x=[];for(let _=0;f&&E&&_<w;++_){const A=f+E*_,N=i0(o,A,VS)-1;x.push(v.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${r==null?void 0:r.createRelativeUrl("sha1/"+o[N].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:pr,marginRight:pr}},_))}return x.push(v.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${r==null?void 0:r.createRelativeUrl("sha1/"+o[o.length-1].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:pr,marginRight:pr}},x.length)),v.jsx("div",{className:"film-strip-lane",style:{marginLeft:b+"px",marginRight:m+"px"},children:x})};function VS(n,e){return n-e.timestamp}function GS(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 l2=({model:n,boundaries:e,onSelected:i,selectedTime:r,setSelectedTime:l,sdkLanguage:o,scrubber:u})=>{const[f,d]=ys(),[g,b]=R.useState(),[m,S]=R.useState(),[w]=Gt("actionsFilter",[]),{offsets:E,curtainLeft:x,curtainRight:_}=R.useMemo(()=>{let B=r||e;if(g&&g.startX!==g.endX){const V=On(f.width,e,g.startX),W=On(f.width,e,g.endX);B={minimum:Math.min(V,W),maximum:Math.max(V,W)}}const O=gr(f.width,e,B.minimum),te=gr(f.width,e,e.maximum)-gr(f.width,e,B.maximum);return{offsets:o2(f.width,e),curtainLeft:O,curtainRight:te}},[r,e,g,f]),A=R.useMemo(()=>n==null?void 0:n.filteredActions(w),[n,w]),N=R.useCallback(B=>{if(S(void 0),!d.current)return;const O=B.clientX-d.current.getBoundingClientRect().left,ne=On(f.width,e,O),te=r?gr(f.width,e,r.minimum):0,V=r?gr(f.width,e,r.maximum):0;r&&Math.abs(O-te)<10?b({startX:V,endX:O,type:"resize"}):r&&Math.abs(O-V)<10?b({startX:te,endX:O,type:"resize"}):r&&ne>r.minimum&&ne<r.maximum&&B.clientY-d.current.getBoundingClientRect().top<20?b({startX:te,endX:V,pivot:O,type:"move"}):b({startX:O,endX:O,type:"resize"})},[e,f,d,r]),$=R.useCallback(B=>{if(!d.current)return;const O=B.clientX-d.current.getBoundingClientRect().left,ne=On(f.width,e,O),te=A==null?void 0:A.findLast(Ue=>Ue.startTime<=ne);if(!B.buttons){b(void 0);return}if(te&&i(te),!g)return;let V=g;if(g.type==="resize")V={...g,endX:O};else{const Ue=O-g.pivot;let I=g.startX+Ue,J=g.endX+Ue;I<0&&(I=0,J=I+(g.endX-g.startX)),J>f.width&&(J=f.width,I=J-(g.endX-g.startX)),V={...g,startX:I,endX:J,pivot:O}}b(V);const W=On(f.width,e,V.startX),ge=On(f.width,e,V.endX);W!==ge&&l({minimum:Math.min(W,ge),maximum:Math.max(W,ge)})},[e,g,f,A,i,d,l]),G=R.useCallback(()=>{if(S(void 0),!!g){if(g.startX!==g.endX){const B=On(f.width,e,g.startX),O=On(f.width,e,g.endX);l({minimum:Math.min(B,O),maximum:Math.max(B,O)})}else{const B=On(f.width,e,g.startX),O=A==null?void 0:A.findLast(ne=>ne.startTime<=B);O&&i(O),l(void 0)}b(void 0)}},[e,g,f,A,l,i]),X=R.useCallback(B=>{if(!d.current)return;const O=B.clientX-d.current.getBoundingClientRect().left,ne=On(f.width,e,O),te=A==null?void 0:A.findLast(V=>V.startTime<=ne);S({x:O,clientY:B.clientY,action:te,sdkLanguage:o})},[e,f,A,d,o]),U=R.useCallback(()=>{S(void 0)},[]),L=R.useCallback(()=>{l(void 0)},[l]);return v.jsxs("div",{className:"timeline-view-container",children:[!!g&&v.jsx($0,{cursor:(g==null?void 0:g.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:G,onPaneMouseMove:$,onPaneDoubleClick:L}),v.jsxs("div",{ref:d,className:"timeline-view",onMouseDown:N,onMouseMove:X,onMouseLeave:U,children:[v.jsx("div",{className:"timeline-grid",children:E.map((B,O)=>v.jsx("div",{className:"timeline-divider",style:{left:B.position+"px"},children:v.jsx("div",{className:"timeline-time",children:St(B.time-e.minimum)})},O))}),v.jsx(r2,{boundaries:e,previewPoint:m}),u,r&&v.jsxs("div",{className:"timeline-window",children:[v.jsx("div",{className:"timeline-window-curtain left",style:{width:x}}),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:_}})]})]})]})};function o2(n,e){let r=n/64;const l=e.maximum-e.minimum,o=n/l;let u=l/r;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 g=e.maximum;g+=64/o,r=Math.ceil((g-d)/u),u||(r=0);const b=[];for(let m=0;m<r;++m){const S=d+u*m;b.push({position:gr(n,e,S),time:S})}return b}function gr(n,e,i){return(i-e.minimum)/(e.maximum-e.minimum)*n}function On(n,e,i){return i/n*(e.maximum-e.minimum)+e.minimum}const c2=({model:n})=>{var i,r;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",{style:{flex:"auto",display:"block",overflow:"hidden auto"},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:St(n.endTime-n.startTime),children:St(n.endTime-n.startTime)})]}),n.testTimeout!==void 0&&v.jsxs("div",{className:"call-line",children:["test timeout:",v.jsx("span",{className:"call-value number",title:St(n.testTimeout),children:St(n.testTimeout)})]}),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.playwrightVersion&&v.jsxs("div",{className:"call-line",children:["playwright version:",v.jsx("span",{className:"call-value string",title:n.playwrightVersion,children:n.playwrightVersion})]}),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:",rx(n.options.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("span",{className:"call-value string",title:n.options.baseURL,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(!!((r=n.options.viewport)!=null&&r.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})]})]})},u2=({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:[": ",G0(e.description)]})]},`annotation-${i}`))}):v.jsx(bs,{text:"No annotations"}),f2=({sdkLanguage:n,isInspecting:e,setIsInspecting:i,highlightedElement:r,setHighlightedElement:l})=>{const[o,u]=R.useState(),f=R.useCallback(d=>{const{errors:g}=od(HS,d,{prettyErrors:!1}),b=g.map(m=>({message:m.message,line:m.range[1].line,column:m.range[1].col,type:"subtle-error"}));u(b),l({...r,ariaSnapshot:d,lastEdited:"ariaSnapshot"}),i(!1)},[r,l,i]);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",{children:"Locator"}),v.jsx(ft,{style:{margin:"0 4px"},title:"Pick locator",icon:"target",toggled:e,onClick:()=>i(!e)}),v.jsx("div",{style:{flex:"auto"}}),v.jsx(ft,{icon:"files",title:"Copy locator",onClick:()=>{Yy(r.locator||"")}})]}),v.jsx("div",{style:{height:50},children:v.jsx(Ar,{text:r.locator||"",highlighter:n,isFocused:!0,wrapLines:!0,onChange:d=>{l({...r,locator:d,lastEdited:"locator"}),i(!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(ft,{icon:"files",title:"Copy snapshot",onClick:()=>{Yy(r.ariaSnapshot||"")}})]}),v.jsx("div",{style:{height:150},children:v.jsx(Ar,{text:r.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:o,onChange:f})})]})},h2=({className:n,style:e,open:i,isModal:r,minWidth:l,verticalOffset:o,requestClose:u,anchor:f,dataTestId:d,children:g})=>{const b=R.useRef(null),[m,S]=R.useState(0),[w]=Ah(b),[E,x]=Ah(f),_=f?d2(w,E,o):void 0;return R.useEffect(()=>{const A=$=>{!b.current||!($.target instanceof Node)||b.current.contains($.target)||u==null||u()},N=$=>{$.key==="Escape"&&(u==null||u())};return i?(document.addEventListener("mousedown",A),document.addEventListener("keydown",N),()=>{document.removeEventListener("mousedown",A),document.removeEventListener("keydown",N)}):()=>{}},[i,u]),R.useLayoutEffect(()=>x(),[i,x]),R.useEffect(()=>{const A=()=>S(N=>N+1);return window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}},[]),R.useLayoutEffect(()=>{b.current&&(i?r?b.current.showModal():b.current.show():b.current.close())},[i,r]),v.jsx("dialog",{ref:b,style:{position:"fixed",margin:_?0:void 0,zIndex:110,top:_==null?void 0:_.top,left:_==null?void 0:_.left,minWidth:l||0,...e},className:n,"data-testid":d,children:g})};function d2(n,e,i=4,r=4){let l=Math.max(r,e.left);l+n.width>window.innerWidth-r&&(l=window.innerWidth-n.width-r);let o=Math.max(0,e.bottom)+i;return o+n.height>window.innerHeight-i&&(Math.max(0,e.top)>n.height+i?o=Math.max(0,e.top)-n.height-i:o=window.innerHeight-i-n.height),{left:l,top:o}}const p2=({title:n,icon:e,buttonChildren:i,anchorRef:r,dialogDataTestId:l,children:o})=>{const u=R.useRef(null),f=r??u,[d,g]=R.useState(!1);return v.jsxs(v.Fragment,{children:[v.jsx(ft,{ref:u,icon:e,title:n,onClick:()=>g(b=>!b),children:i}),v.jsx(h2,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:d,verticalOffset:8,requestClose:()=>g(!1),anchor:f,dataTestId:l,children:o})]})},KS=({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:g2(e,i)},e.name)})}),g2=(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.jsxs("label",{htmlFor:e,children:[n.name,!!n.count&&v.jsx("span",{className:"setting-counter",children:n.count})]})]});case"select":return v.jsxs(v.Fragment,{children:[v.jsxs("label",{htmlFor:e,children:[n.name,":",!!n.count&&v.jsx("span",{className:"setting-counter",children:n.count})]}),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}},C2=n=>{var i;const e=b2((i=n.model)==null?void 0:i.traceUri);return v.jsx(K0.Provider,{value:n.model,children:v.jsx(m2,{partition:e,...n})})},m2=n=>{var yl;const{partition:e,model:i,showSourcesFirst:r,rootDir:l,fallbackLocation:o,isLive:u,hideTimeline:f,status:d,annotations:g,inert:b,onOpenExternally:m,revealSource:S,testRunMetadata:w}=n,[E,x]=Gt("navigatorTab","actions"),[_,A]=Gt("propertiesTab",r?"source":"call"),[N,$]=Gt("propertiesSidebarLocation","bottom"),[G]=Gt("actionsFilter",[]),[X,U]=ar("selectedCallId"),[L,B]=ar("selectedTime"),[O,ne]=ar("highlightedCallId"),[te,V]=ar("revealedErrorKey"),[W,ge]=ar("revealedAttachmentCallId"),[Ue,I]=ar("treeState",{expandedItems:new Map}),[J,re]=R.useState("");ux(e);const[xe,_e]=R.useState({lastEdited:"none"}),[M,Y]=R.useState(!1),Z=R.useCallback(ae=>{U(ae==null?void 0:ae.callId),V(void 0)},[U,V]),P=R.useMemo(()=>i==null?void 0:i.filteredActions(G),[i,G]),oe=((i==null?void 0:i.actions.length)??0)-((P==null?void 0:P.length)??0),he=R.useMemo(()=>P==null?void 0:P.find(ae=>ae.callId===O),[P,O]),be=R.useCallback(ae=>{ne(ae==null?void 0:ae.callId)},[ne]),lt=R.useMemo(()=>(i==null?void 0:i.sources)||new Map,[i]);R.useEffect(()=>{B(void 0),V(void 0)},[i,B,V]);const ke=R.useMemo(()=>{if(X){const Ii=P==null?void 0:P.find(nn=>nn.callId===X);if(Ii)return Ii}const ae=i==null?void 0:i.failedAction();if(ae)return ae;if(P!=null&&P.length){let Ii=P.length-1;for(let nn=0;nn<P.length;++nn)if(P[nn].title==="After Hooks"&&nn){Ii=nn-1;break}return P[Ii]}},[i,P,X]),At=R.useMemo(()=>he||ke,[ke,he]),fe=R.useCallback(ae=>{Z(ae),be(void 0)},[Z,be]),{boundaries:Ne}=R.useMemo(()=>{const ae={minimum:(i==null?void 0:i.startTime)||0,maximum:(i==null?void 0:i.endTime)||3e4};return ae.minimum>ae.maximum&&(ae.minimum=0,ae.maximum=3e4),ae.maximum+=(ae.maximum-ae.minimum)/20,{boundaries:ae}},[i]),qe=IC(P||[],ke,fe,L,Ne),Ee=R.useCallback(ae=>{A(ae),ae!=="inspector"&&Y(!1)},[A]),Kt=R.useCallback(ae=>{!M&&ae&&Ee("inspector"),Y(ae)},[Y,Ee,M]),en=R.useCallback(ae=>{_e(ae),Ee("inspector")},[Ee]),tn=R.useCallback(ae=>{Ee("attachments"),ge({callId:ae})},[Ee,ge]);R.useEffect(()=>{S&&Ee("source")},[S,Ee]);const qi=P_(i,L),ws=EE(i,L),ai=X_(i),Br=R.useMemo(()=>{var ae;return te!==void 0?(ae=ai.errors.get(te))==null?void 0:ae.stack:At==null?void 0:At.stack},[At,te,ai]),li=(i==null?void 0:i.sdkLanguage)||"javascript",Bc={id:"inspector",title:"Locator",render:()=>v.jsx(f2,{sdkLanguage:li,isInspecting:M,setIsInspecting:Kt,highlightedElement:xe,setHighlightedElement:_e})},Ct={id:"call",title:"Call",render:()=>v.jsx(S_,{action:At,startTimeOffset:(i==null?void 0:i.startTime)??0,sdkLanguage:li})},qc={id:"log",title:"Log",render:()=>v.jsx(__,{action:At,isLive:u})},gl={id:"errors",title:"Errors",errorCount:ai.errors.size,render:()=>v.jsx(F_,{errorsModel:ai,testRunMetadata:w,sdkLanguage:li,revealInSource:ae=>{ae.action?Z(ae.action):V(ae.message),Ee("source")},wallTime:(i==null?void 0:i.wallTime)??0})};let qr;!ke&&o&&(qr=(yl=o.source)==null?void 0:yl.errors.length);const oi={id:"source",title:"Source",errorCount:qr,render:()=>v.jsx(t2,{stack:Br,sources:lt,rootDir:l,stackFrameLocation:N==="bottom"?"right":"bottom",fallbackLocation:o,onOpenExternally:m})},$c={id:"console",title:"Console",count:qi.entries.length,render:()=>v.jsx(J_,{consoleModel:qi,boundaries:Ne,selectedTime:L,onAccepted:ae=>B({minimum:ae.timestamp,maximum:ae.timestamp})})},ml={id:"network",title:"Network",count:ws.resources.length,render:()=>v.jsx(TE,{boundaries:Ne,networkModel:ws,sdkLanguage:(i==null?void 0:i.sdkLanguage)??"javascript"})},Ic={id:"attachments",title:"Attachments",count:i==null?void 0:i.visibleAttachments.length,render:()=>v.jsx(V_,{revealedAttachmentCallId:W})},$i=[Bc,Ct,qc,gl,$c,ml,oi,Ic];if(g!==void 0){const ae={id:"annotations",title:"Annotations",count:g.length,render:()=>v.jsx(u2,{annotations:g})};$i.push(ae)}if(r){const ae=$i.indexOf(oi);$i.splice(ae,1),$i.splice(1,0,oi)}let Tn=0;!u&&i&&i.endTime>=0?Tn=i.endTime-i.startTime:i&&i.wallTime&&(Tn=Date.now()-i.wallTime);const Nt={id:"actions",title:"Actions",component:v.jsxs("div",{className:"vbox",children:[d&&v.jsxs("div",{className:"workbench-run-status","data-testid":"workbench-run-status",children:[v.jsx("span",{className:at("codicon",q0(d))}),v.jsx("div",{children:y_(d)}),v.jsx("div",{className:"spacer"}),v.jsx("div",{className:"workbench-run-duration",children:Tn?St(Tn):""})]}),v.jsx("div",{className:"workbench-action-filter",children:v.jsx("input",{type:"search",placeholder:"Filter actions","aria-label":"Filter actions",spellCheck:!1,value:J,onChange:ae=>re(ae.target.value)})}),v.jsx(v_,{sdkLanguage:li,actions:P||[],selectedAction:i?ke:void 0,selectedTime:L,setSelectedTime:B,treeState:Ue,setTreeState:I,onSelected:fe,onHighlighted:be,revealActionAttachment:tn,revealConsole:()=>Ee("console"),isLive:u,actionFilterText:J})]})},An={id:"metadata",title:"Metadata",component:v.jsx(c2,{model:i})},kt=E==="actions"&&v.jsx(y2,{counters:i==null?void 0:i.actionCounters,hiddenActionsCount:oe});return v.jsxs("div",{className:"vbox workbench",...b?{inert:!0}:{},children:[!f&&v.jsx(l2,{model:i,boundaries:Ne,onSelected:fe,sdkLanguage:li,selectedTime:L,setSelectedTime:B,scrubber:v.jsx(GC,{playback:qe})}),v.jsx(sc,{sidebarSize:250,orientation:N==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:v.jsx(sc,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:v.jsx(KC,{action:At,model:i,sdkLanguage:li,testIdAttributeName:(i==null?void 0:i.testIdAttributeName)||"data-testid",isInspecting:M,setIsInspecting:Kt,highlightedElement:xe,setHighlightedElement:en,playback:qe}),sidebar:v.jsx(Rh,{tabs:[Nt,An],rightToolbar:[kt],selectedTab:E,setSelectedTab:x})}),sidebar:v.jsx(Rh,{tabs:$i,selectedTab:_,setSelectedTab:Ee,rightToolbar:[N==="bottom"?v.jsx(ft,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{$("right")}}):v.jsx(ft,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{$("bottom")}})],mode:N==="bottom"?"default":"select"})})]})},y2=({counters:n,hiddenActionsCount:e})=>{const[i,r]=Gt("actionsFilter",[]),l=R.useRef(null),o=v.jsxs(v.Fragment,{children:[e>0&&v.jsxs("span",{className:"workbench-actions-hidden-count",title:e+" actions hidden by filters",children:[e," hidden"]}),v.jsx("span",{ref:l,className:"codicon codicon-filter"})]});return v.jsx(p2,{title:"Filter actions",dialogDataTestId:"actions-filter-dialog",buttonChildren:o,anchorRef:l,children:v.jsx(KS,{settings:[{type:"check",value:i.includes("getter"),set:u=>r(u?[...i,"getter"]:i.filter(f=>f!=="getter")),name:"Getters",count:n==null?void 0:n.get("getter")},{type:"check",value:i.includes("route"),set:u=>r(u?[...i,"route"]:i.filter(f=>f!=="route")),name:"Network routes",count:n==null?void 0:n.get("route")},{type:"check",value:i.includes("configuration"),set:u=>r(u?[...i,"configuration"]:i.filter(f=>f!=="configuration")),name:"Configuration",count:n==null?void 0:n.get("configuration")}]})})};function b2(n){if(!n)return"default";const e=new URL(n,"http://localhost");return e.searchParams.delete("timestamp"),e.toString()}var n0;(n=>{function e(i){for(const r of i.splice(0))r.dispose()}n.disposeAll=e})(n0||(n0={}));class hr{constructor(){this._listeners=new Set,this.event=(e,i)=>{this._listeners.add(e);let r=!1;const l=this,o={dispose(){r||(r=!0,l._listeners.delete(e))}};return i&&i.push(o),o}}fire(e){const i=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const r of this._listeners)this._deliveryQueue.push({listener:r,event:e});if(i){for(let r=0;r<this._deliveryQueue.length;r++){const{listener:l,event:o}=this._deliveryQueue[r];l.call(null,o)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class v2 extends Error{}class N2{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 k2{constructor(e){this._onCloseEmitter=new hr,this._onReportEmitter=new hr,this._onStdioEmitter=new hr,this._onTestFilesChangedEmitter=new hr,this._onLoadTraceRequestedEmitter=new hr,this._onTestPausedEmitter=new hr,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this.onTestPaused=this._onTestPausedEmitter.event,this._transport=e,this._transport.onmessage(r=>{const l=JSON.parse(r),{id:o,result:u,error:f,method:d,params:g}=l;if(o){const b=this._callbacks.get(o);if(!b)return;this._callbacks.delete(o),f?b.reject(new Error(f)):b.resolve(u)}else this._dispatchEvent(d,g)});const i=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((r,l)=>{this._transport.onopen(r),this._transport.onerror(l)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(i);for(const r of this._callbacks.values())r.reject(r.error);this._callbacks.clear()})}isClosed(){return this._isClosed}async _sendMessage(e,i){const r=globalThis.__logForTest;r==null||r({method:e,params:i}),await this._connectedPromise;const l=++this._lastId,o={id:l,method:e,params:i},u=new v2(`${e}: test server connection closed`);return this._transport.send(JSON.stringify(o)),new Promise((f,d)=>{this._callbacks.set(l,{resolve:f,reject:d,error:u})})}_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):e==="testPaused"&&this._onTestPausedEmitter.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 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 M2=({location:n})=>{const[e,i]=Gt("shouldPopulateCanvasFromScreenshot",!1),[r,l]=mx(),[o,u]=Gt("mergeFiles",!1);return v.jsx(KS,{settings:[{type:"select",value:r,set:l,name:"Theme",options:px},...n==="ui-mode"?[{type:"check",value:o,set:u,name:"Merge files"}]:[],{type:"check",value:e,set:i,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{p2 as D,V0 as E,wt as R,sc as S,T2 as T,N2 as W,j_ as _,k2 as a,M2 as b,C2 as c,h2 as d,w2 as e,E2 as f,gx as g,x2 as h,_2 as i,v as j,at as k,g_ as l,St as m,Sc as n,ft as o,Gt as p,KS as q,R as r,us as s,q0 as t,ys as u,ax as v};
