patchright-core 1.50.1 → 1.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ThirdPartyNotices.txt +1 -43
- package/browsers.json +22 -10
- package/index.js +0 -1
- package/lib/androidServerImpl.js +4 -4
- package/lib/browserServerImpl.js +18 -9
- package/lib/cli/driver.js +6 -6
- package/lib/cli/program.js +9 -9
- package/lib/cli/programWithTestStub.js +2 -1
- package/lib/client/android.js +37 -58
- package/lib/client/artifact.js +4 -7
- package/lib/client/browser.js +10 -15
- package/lib/client/browserContext.js +77 -73
- package/lib/client/browserType.js +30 -64
- package/lib/client/channelOwner.js +23 -20
- package/lib/client/clientHelper.js +5 -7
- package/lib/client/clientStackTrace.js +65 -0
- package/lib/client/connection.js +46 -39
- package/lib/client/consoleMessage.js +4 -7
- package/lib/client/electron.js +10 -10
- package/lib/client/elementHandle.js +32 -33
- package/lib/client/errors.js +2 -2
- package/lib/client/eventEmitter.js +5 -8
- package/lib/client/fetch.js +60 -61
- package/lib/client/fileUtils.js +31 -0
- package/lib/client/frame.js +30 -29
- package/lib/client/harRouter.js +7 -9
- package/lib/client/jsHandle.js +3 -4
- package/lib/client/localUtils.js +24 -0
- package/lib/client/locator.js +37 -18
- package/lib/client/network.js +40 -40
- package/lib/client/page.js +59 -55
- package/lib/client/platform.js +71 -0
- package/lib/client/playwright.js +21 -1
- package/lib/client/selectors.js +8 -2
- package/lib/client/stream.js +2 -21
- package/lib/client/timeoutSettings.js +65 -0
- package/lib/client/tracing.js +10 -7
- package/lib/client/video.js +2 -2
- package/lib/client/waiter.js +5 -6
- package/lib/client/webSocket.js +106 -0
- package/lib/client/worker.js +12 -10
- package/lib/client/writableStream.js +2 -21
- package/lib/generated/consoleApiSource.js +1 -1
- package/lib/generated/injectedScriptSource.js +1 -1
- package/lib/inProcessFactory.js +6 -3
- package/lib/outofprocess.js +12 -8
- package/lib/protocol/validator.js +64 -13
- package/lib/protocol/validatorPrimitives.js +1 -2
- package/lib/remote/playwrightConnection.js +18 -10
- package/lib/remote/playwrightServer.js +20 -7
- package/lib/server/android/android.js +17 -14
- package/lib/server/android/backendAdb.js +14 -14
- package/lib/server/artifact.js +3 -3
- package/lib/server/bidi/bidiBrowser.js +2 -2
- package/lib/server/bidi/bidiChromium.js +4 -3
- package/lib/server/bidi/bidiConnection.js +1 -1
- package/lib/server/bidi/bidiExecutionContext.js +70 -40
- package/lib/server/bidi/bidiFirefox.js +4 -3
- package/lib/server/bidi/bidiInput.js +5 -8
- package/lib/server/bidi/bidiNetworkManager.js +3 -3
- package/lib/server/bidi/bidiOverCdp.js +2 -2
- package/lib/server/bidi/bidiPage.js +30 -46
- package/lib/server/bidi/third_party/firefoxPrefs.js +19 -3
- package/lib/server/browser.js +2 -2
- package/lib/server/browserContext.js +37 -40
- package/lib/server/browserType.js +18 -17
- package/lib/{utils/sequence.js → server/callLog.js} +18 -3
- package/lib/server/chromium/chromium.js +14 -14
- package/lib/server/chromium/chromiumSwitches.js +32 -1
- package/lib/server/chromium/crBrowser.js +15 -14
- package/lib/server/chromium/crConnection.js +2 -2
- package/lib/server/chromium/crCoverage.js +1 -1
- package/lib/server/chromium/crDevTools.js +1 -1
- package/lib/server/chromium/crDragDrop.js +1 -1
- package/lib/server/chromium/crExecutionContext.js +25 -17
- package/lib/server/chromium/crInput.js +2 -2
- package/lib/server/chromium/crNetworkManager.js +73 -26
- package/lib/server/chromium/crPage.js +22 -23
- package/lib/server/chromium/crPdf.js +1 -1
- package/lib/server/chromium/crProtocolHelper.js +3 -3
- package/lib/server/chromium/crServiceWorker.js +2 -2
- package/lib/server/chromium/videoRecorder.js +2 -2
- package/lib/server/clock.js +1 -1
- package/lib/server/codegen/javascript.js +1 -1
- package/lib/server/codegen/languages.js +2 -2
- package/lib/server/debugController.js +3 -3
- package/lib/server/deviceDescriptors.js +1 -1
- package/lib/server/deviceDescriptorsSource.json +131 -131
- package/lib/server/dispatchers/androidDispatcher.js +1 -1
- package/lib/server/dispatchers/artifactDispatcher.js +3 -3
- package/lib/server/dispatchers/browserContextDispatcher.js +19 -19
- package/lib/server/dispatchers/browserTypeDispatcher.js +1 -1
- package/lib/server/dispatchers/cdpSessionDispatcher.js +1 -1
- package/lib/server/dispatchers/dispatcher.js +27 -25
- package/lib/server/dispatchers/electronDispatcher.js +3 -3
- package/lib/server/dispatchers/elementHandlerDispatcher.js +7 -2
- package/lib/server/dispatchers/frameDispatcher.js +4 -4
- package/lib/server/dispatchers/jsHandleDispatcher.js +2 -2
- package/lib/server/dispatchers/jsonPipeDispatcher.js +2 -2
- package/lib/server/dispatchers/localUtilsDispatcher.js +25 -298
- package/lib/server/dispatchers/networkDispatchers.js +3 -3
- package/lib/server/dispatchers/pageDispatcher.js +11 -9
- package/lib/server/dispatchers/playwrightDispatcher.js +5 -5
- package/lib/server/dispatchers/streamDispatcher.js +4 -3
- package/lib/server/dispatchers/webSocketRouteDispatcher.js +8 -7
- package/lib/server/dispatchers/writableStreamDispatcher.js +5 -6
- package/lib/server/dom.js +18 -12
- package/lib/server/download.js +1 -1
- package/lib/server/electron/electron.js +17 -16
- package/lib/server/errors.js +1 -1
- package/lib/server/fetch.js +36 -25
- package/lib/server/fileUploadUtils.js +7 -4
- package/lib/server/firefox/ffBrowser.js +8 -2
- package/lib/server/firefox/ffConnection.js +1 -1
- package/lib/server/firefox/ffExecutionContext.js +25 -17
- package/lib/server/firefox/ffNetworkManager.js +2 -2
- package/lib/server/firefox/ffPage.js +15 -21
- package/lib/server/firefox/firefox.js +7 -9
- package/lib/server/frameSelectors.js +1 -1
- package/lib/server/frames.js +366 -209
- package/lib/server/har/harRecorder.js +4 -4
- package/lib/server/har/harTracer.js +7 -8
- package/lib/server/harBackend.js +157 -0
- package/lib/server/helper.js +2 -2
- package/lib/server/index.js +1 -8
- package/lib/server/input.js +1 -1
- package/lib/server/instrumentation.js +2 -2
- package/lib/server/isomorphic/utilityScriptSerializers.js +3 -0
- package/lib/server/javascript.js +46 -33
- package/lib/server/launchApp.js +2 -2
- package/lib/server/localUtils.js +203 -0
- package/lib/server/network.js +3 -3
- package/lib/server/page.js +41 -22
- package/lib/server/pipeTransport.js +1 -1
- package/lib/server/playwright.js +5 -5
- package/lib/server/progress.js +1 -1
- package/lib/server/protocolError.js +1 -1
- package/lib/server/recorder/contextRecorder.js +3 -3
- package/lib/server/recorder/recorderApp.js +18 -12
- package/lib/server/recorder/recorderCollection.js +3 -3
- package/lib/server/recorder/throttledFile.js +3 -4
- package/lib/server/recorder.js +7 -5
- package/lib/server/registry/browserFetcher.js +9 -7
- package/lib/server/registry/dependencies.js +15 -15
- package/lib/server/registry/index.js +38 -44
- package/lib/server/registry/oopDownloadBrowserMain.js +3 -3
- package/lib/server/screenshotter.js +1 -1
- package/lib/server/selectors.js +3 -3
- package/lib/server/socksClientCertificatesInterceptor.js +8 -8
- package/lib/server/socksInterceptor.js +8 -5
- package/lib/server/storageScript.js +160 -0
- package/lib/{common → server}/timeoutSettings.js +6 -5
- package/lib/server/trace/recorder/snapshotter.js +9 -8
- package/lib/server/trace/recorder/tracing.js +40 -31
- package/lib/server/trace/test/inMemorySnapshotter.js +4 -4
- package/lib/server/trace/viewer/traceViewer.js +13 -5
- package/lib/server/transport.js +2 -2
- package/lib/{utils → server/utils}/comparators.js +4 -4
- package/lib/{utils → server/utils}/crypto.js +4 -4
- package/lib/{utils → server/utils}/debug.js +4 -12
- package/lib/{utils → server/utils}/debugLogger.js +2 -2
- package/lib/{utils → server/utils}/env.js +4 -0
- package/lib/{utils → server/utils}/expectUtils.js +1 -1
- package/lib/{utils → server/utils}/fileUtils.js +4 -5
- package/lib/{utils/happy-eyeballs.js → server/utils/happyEyeballs.js} +22 -24
- package/lib/{utils → server/utils}/hostPlatform.js +1 -1
- package/lib/{utils → server/utils}/httpServer.js +8 -8
- package/lib/{utils → server/utils}/linuxUtils.js +3 -23
- package/lib/{utils → server/utils}/network.js +4 -4
- package/lib/server/utils/nodePlatform.js +140 -0
- package/lib/{protocol/transport.js → server/utils/pipeTransport.js} +2 -2
- package/lib/{utils → server/utils}/processLauncher.js +5 -5
- package/lib/{utils → server/utils}/profiler.js +5 -6
- package/lib/{common → server/utils}/socksProxy.js +10 -9
- package/lib/{utils → server/utils}/userAgent.js +2 -16
- package/lib/{utils → server/utils}/wsServer.js +3 -3
- package/lib/{utils → server/utils}/zipFile.js +1 -1
- package/lib/{utils → server/utils}/zones.js +9 -24
- package/lib/server/webkit/webkit.js +4 -4
- package/lib/server/webkit/wkBrowser.js +4 -4
- package/lib/server/webkit/wkConnection.js +1 -1
- package/lib/server/webkit/wkExecutionContext.js +25 -17
- package/lib/server/webkit/wkInput.js +2 -2
- package/lib/server/webkit/wkInterceptableRequest.js +2 -2
- package/lib/server/webkit/wkPage.js +41 -40
- package/lib/server/webkit/wkProvisionalPage.js +1 -1
- package/lib/server/webkit/wkWorkers.js +2 -2
- package/lib/utils/isomorphic/ariaSnapshot.js +2 -1
- package/lib/utils/isomorphic/assert.js +25 -0
- package/lib/utils/isomorphic/colors.js +65 -0
- package/lib/utils/isomorphic/cssParser.js +1 -1
- package/lib/utils/isomorphic/locatorGenerators.js +13 -1
- package/lib/utils/isomorphic/locatorParser.js +2 -2
- package/lib/utils/{manualPromise.js → isomorphic/manualPromise.js} +3 -5
- package/lib/utils/isomorphic/mimeType.js +11 -3
- package/lib/utils/{multimap.js → isomorphic/multimap.js} +1 -3
- package/lib/utils/{rtti.js → isomorphic/rtti.js} +2 -5
- package/lib/utils/isomorphic/stackTrace.js +169 -0
- package/lib/utils/isomorphic/stringUtils.js +1 -1
- package/lib/utils/{time.js → isomorphic/time.js} +1 -13
- package/lib/utils/{timeoutRunner.js → isomorphic/timeoutRunner.js} +4 -4
- package/lib/utils/isomorphic/traceUtils.js +23 -0
- package/lib/{utils/index.js → utils.js} +200 -121
- package/lib/utilsBundle.js +1 -25
- package/lib/utilsBundleImpl/index.js +114 -116
- package/lib/vite/htmlReport/index.html +20 -20
- package/lib/vite/recorder/assets/codeMirrorModule-B9YMkrwa.js +24 -0
- package/lib/vite/recorder/assets/index-ELPgmkwA.js +184 -0
- package/lib/vite/recorder/index.html +1 -1
- package/lib/vite/traceViewer/assets/codeMirrorModule-DpJ-EmBQ.js +24 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-DTenqiGw.js +259 -0
- package/lib/vite/traceViewer/assets/{xtermModule-c-SNdYZy.js → xtermModule-BoAIEibi.js} +7 -7
- package/lib/vite/traceViewer/defaultSettingsView.5fN5lw10.css +1 -0
- package/lib/vite/traceViewer/index.CUq7VgrV.js +2 -0
- package/lib/vite/traceViewer/index.html +3 -3
- package/lib/vite/traceViewer/sw.bundle.js +3 -3
- package/lib/vite/traceViewer/uiMode.CHJSAD7F.js +5 -0
- package/lib/vite/traceViewer/uiMode.html +3 -3
- package/lib/zipBundleImpl.js +4 -4
- package/package.json +7 -7
- package/types/protocol.d.ts +123 -99
- package/types/types.d.ts +91 -37
- package/lib/utils/stackTrace.js +0 -134
- package/lib/utils/traceUtils.js +0 -44
- package/lib/vite/recorder/assets/codeMirrorModule-CNAqJrkA.js +0 -24
- package/lib/vite/recorder/assets/index-DGS0JLxS.js +0 -184
- package/lib/vite/traceViewer/assets/codeMirrorModule-D55P_UuL.js +0 -24
- package/lib/vite/traceViewer/assets/defaultSettingsView-B-uNoFsX.js +0 -243
- package/lib/vite/traceViewer/defaultSettingsView.2xeEXCXv.css +0 -1
- package/lib/vite/traceViewer/index.BfvuujqP.js +0 -2
- package/lib/vite/traceViewer/uiMode.CStJu6jo.js +0 -5
- /package/lib/{utils → server/utils}/ascii.js +0 -0
- /package/lib/{utils → server/utils}/eventsHelper.js +0 -0
- /package/lib/{image_tools → server/utils/image_tools}/colorUtils.js +0 -0
- /package/lib/{image_tools → server/utils/image_tools}/compare.js +0 -0
- /package/lib/{image_tools → server/utils/image_tools}/imageChannel.js +0 -0
- /package/lib/{image_tools → server/utils/image_tools}/stats.js +0 -0
- /package/lib/{utils → server/utils}/spawnAsync.js +0 -0
- /package/lib/{utils → server/utils}/task.js +0 -0
- /package/lib/utils/{headers.js → isomorphic/headers.js} +0 -0
- /package/lib/utils/{semaphore.js → isomorphic/semaphore.js} +0 -0
- /package/lib/{common → utils/isomorphic}/types.js +0 -0
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-D55P_UuL.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
var Y0=Object.defineProperty;var Z0=(t,e,n)=>e in t?Y0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var W=(t,e,n)=>Z0(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var mb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ev(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fh={exports:{}},ll={},zh={exports:{}},z={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var pi=Symbol.for("react.element"),tv=Symbol.for("react.portal"),nv=Symbol.for("react.fragment"),rv=Symbol.for("react.strict_mode"),sv=Symbol.for("react.profiler"),iv=Symbol.for("react.provider"),ov=Symbol.for("react.context"),lv=Symbol.for("react.forward_ref"),av=Symbol.for("react.suspense"),cv=Symbol.for("react.memo"),uv=Symbol.for("react.lazy"),jf=Symbol.iterator;function fv(t){return t===null||typeof t!="object"?null:(t=jf&&t[jf]||t["@@iterator"],typeof t=="function"?t:null)}var Bh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Uh=Object.assign,Hh={};function Xr(t,e,n){this.props=t,this.context=e,this.refs=Hh,this.updater=n||Bh}Xr.prototype.isReactComponent={};Xr.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Xr.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Vh(){}Vh.prototype=Xr.prototype;function Xc(t,e,n){this.props=t,this.context=e,this.refs=Hh,this.updater=n||Bh}var Gc=Xc.prototype=new Vh;Gc.constructor=Xc;Uh(Gc,Xr.prototype);Gc.isPureReactComponent=!0;var Mf=Array.isArray,qh=Object.prototype.hasOwnProperty,Jc={current:null},Wh={key:!0,ref:!0,__self:!0,__source:!0};function Kh(t,e,n){var r,s={},i=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)qh.call(e,r)&&!Wh.hasOwnProperty(r)&&(s[r]=e[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var a=Array(l),c=0;c<l;c++)a[c]=arguments[c+2];s.children=a}if(t&&t.defaultProps)for(r in l=t.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:pi,type:t,key:i,ref:o,props:s,_owner:Jc.current}}function dv(t,e){return{$$typeof:pi,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Yc(t){return typeof t=="object"&&t!==null&&t.$$typeof===pi}function hv(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Of=/\/+/g;function Wl(t,e){return typeof t=="object"&&t!==null&&t.key!=null?hv(""+t.key):e.toString(36)}function Yi(t,e,n,r,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case pi:case tv:o=!0}}if(o)return o=t,s=s(o),t=r===""?"."+Wl(o,0):r,Mf(s)?(n="",t!=null&&(n=t.replace(Of,"$&/")+"/"),Yi(s,e,n,"",function(c){return c})):s!=null&&(Yc(s)&&(s=dv(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Of,"$&/")+"/")+t)),e.push(s)),1;if(o=0,r=r===""?".":r+":",Mf(t))for(var l=0;l<t.length;l++){i=t[l];var a=r+Wl(i,l);o+=Yi(i,e,n,a,s)}else if(a=fv(t),typeof a=="function")for(t=a.call(t),l=0;!(i=t.next()).done;)i=i.value,a=r+Wl(i,l++),o+=Yi(i,e,n,a,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function Ei(t,e,n){if(t==null)return t;var r=[],s=0;return Yi(t,r,"","",function(i){return e.call(n,i,s++)}),r}function pv(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Fe={current:null},Zi={transition:null},mv={ReactCurrentDispatcher:Fe,ReactCurrentBatchConfig:Zi,ReactCurrentOwner:Jc};z.Children={map:Ei,forEach:function(t,e,n){Ei(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Ei(t,function(){e++}),e},toArray:function(t){return Ei(t,function(e){return e})||[]},only:function(t){if(!Yc(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};z.Component=Xr;z.Fragment=nv;z.Profiler=sv;z.PureComponent=Xc;z.StrictMode=rv;z.Suspense=av;z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mv;z.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=Uh({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=Jc.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(a in e)qh.call(e,a)&&!Wh.hasOwnProperty(a)&&(r[a]=e[a]===void 0&&l!==void 0?l[a]:e[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:pi,type:t.type,key:s,ref:i,props:r,_owner:o}};z.createContext=function(t){return t={$$typeof:ov,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:iv,_context:t},t.Consumer=t};z.createElement=Kh;z.createFactory=function(t){var e=Kh.bind(null,t);return e.type=t,e};z.createRef=function(){return{current:null}};z.forwardRef=function(t){return{$$typeof:lv,render:t}};z.isValidElement=Yc;z.lazy=function(t){return{$$typeof:uv,_payload:{_status:-1,_result:t},_init:pv}};z.memo=function(t,e){return{$$typeof:cv,type:t,compare:e===void 0?null:e}};z.startTransition=function(t){var e=Zi.transition;Zi.transition={};try{t()}finally{Zi.transition=e}};z.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};z.useCallback=function(t,e){return Fe.current.useCallback(t,e)};z.useContext=function(t){return Fe.current.useContext(t)};z.useDebugValue=function(){};z.useDeferredValue=function(t){return Fe.current.useDeferredValue(t)};z.useEffect=function(t,e){return Fe.current.useEffect(t,e)};z.useId=function(){return Fe.current.useId()};z.useImperativeHandle=function(t,e,n){return Fe.current.useImperativeHandle(t,e,n)};z.useInsertionEffect=function(t,e){return Fe.current.useInsertionEffect(t,e)};z.useLayoutEffect=function(t,e){return Fe.current.useLayoutEffect(t,e)};z.useMemo=function(t,e){return Fe.current.useMemo(t,e)};z.useReducer=function(t,e,n){return Fe.current.useReducer(t,e,n)};z.useRef=function(t){return Fe.current.useRef(t)};z.useState=function(t){return Fe.current.useState(t)};z.useSyncExternalStore=function(t,e,n){return Fe.current.useSyncExternalStore(t,e,n)};z.useTransition=function(){return Fe.current.useTransition()};z.version="18.2.0";zh.exports=z;var N=zh.exports;const tt=ev(N);/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-jsx-runtime.production.min.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var gv=N,yv=Symbol.for("react.element"),vv=Symbol.for("react.fragment"),wv=Object.prototype.hasOwnProperty,Sv=gv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xv={key:!0,ref:!0,__self:!0,__source:!0};function Qh(t,e,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)wv.call(e,r)&&!xv.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:yv,type:t,key:i,ref:o,props:s,_owner:Sv.current}}ll.Fragment=vv;ll.jsx=Qh;ll.jsxs=Qh;Fh.exports=ll;var p=Fh.exports;function _v(t,e,n,r){const[s,i]=tt.useState(n);return tt.useEffect(()=>{let o=!1;return t().then(l=>{o||i(l)}),()=>{o=!0}},e),s}function Xn(){const t=tt.useRef(null),[e,n]=tt.useState(new DOMRect(0,0,10,10));return tt.useLayoutEffect(()=>{const r=t.current;if(!r)return;const s=r.getBoundingClientRect();n(new DOMRect(0,0,s.width,s.height));const i=new ResizeObserver(o=>{const l=o[o.length-1];l&&l.contentRect&&n(l.contentRect)});return i.observe(r),()=>i.disconnect()},[t]),[e,t]}function Pe(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0)+"ms";const e=t/1e3;if(e<60)return e.toFixed(1)+"s";const n=e/60;if(n<60)return n.toFixed(1)+"m";const r=n/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function kv(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0);const e=t/1024;if(e<1e3)return e.toFixed(1)+"K";const n=e/1024;return n<1e3?n.toFixed(1)+"M":(n/1024).toFixed(1)+"G"}function Xh(t,e,n,r,s){let i=0,o=s!==void 0?s:t.length;for(;i<o;){const l=i+o>>1;n(e,t[l])>=0?i=l+1:o=l}return o}function $f(t){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function Dr(t,e){t&&(e=jn.getObject(t,e));const[n,r]=tt.useState(e),s=tt.useCallback(i=>{t?jn.setObject(t,i):r(i)},[t,r]);return tt.useEffect(()=>{if(t){const i=()=>r(jn.getObject(t,e));return jn.onChangeEmitter.addEventListener(t,i),()=>jn.onChangeEmitter.removeEventListener(t,i)}},[e,t]),[n,s]}class Ev{constructor(){this.onChangeEmitter=new EventTarget}getString(e,n){return localStorage[e]||n}setString(e,n){var r;localStorage[e]=n,this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}getObject(e,n){if(!localStorage[e])return n;try{return JSON.parse(localStorage[e])}catch{return n}}setObject(e,n){var r;localStorage[e]=JSON.stringify(n),this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}}const jn=new Ev;function le(...t){return t.filter(Boolean).join(" ")}function Gh(t){t&&(t!=null&&t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t==null||t.scrollIntoView())}const Pf="\\u0000-\\u0020\\u007f-\\u009f",Jh=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Pf+'"]{2,}[^\\s'+Pf+`"')}\\],:;.!?]`,"ug");function bv(){const[t,e]=tt.useState(!1),n=tt.useCallback(()=>{const r=[];return e(s=>(r.push(setTimeout(()=>e(!1),1e3)),s?(r.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>r.forEach(clearTimeout)},[e]);return[t,n]}function gb(){if(document.playwrightThemeInitialized)return;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);const t=jn.getString("theme","light-mode"),e=window.matchMedia("(prefers-color-scheme: dark)");(t==="dark-mode"||e.matches)&&document.body.classList.add("dark-mode")}const Zc=new Set;function Tv(){const t=za(),e=t==="dark-mode"?"light-mode":"dark-mode";t&&document.body.classList.remove(t),document.body.classList.add(e),jn.setString("theme",e);for(const n of Zc)n(e)}function yb(t){Zc.add(t)}function vb(t){Zc.delete(t)}function za(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}function Nv(){const[t,e]=tt.useState(za()==="dark-mode");return[t,n=>{za()==="dark-mode"!==n&&Tv(),e(n)}]}var Yh={exports:{}},st={},Zh={exports:{}},ep={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.min.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/(function(t){function e(j,$){var D=j.length;j.push($);e:for(;0<D;){var q=D-1>>>1,ce=j[q];if(0<s(ce,$))j[q]=$,j[D]=ce,D=q;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var $=j[0],D=j.pop();if(D!==$){j[0]=D;e:for(var q=0,ce=j.length,Rt=ce>>>1;q<Rt;){var Ie=2*(q+1)-1,as=j[Ie],Ct=Ie+1,ke=j[Ct];if(0>s(as,D))Ct<ce&&0>s(ke,as)?(j[q]=ke,j[Ct]=D,q=Ct):(j[q]=as,j[Ie]=D,q=Ie);else if(Ct<ce&&0>s(ke,D))j[q]=ke,j[Ct]=D,q=Ct;else break e}}return $}function s(j,$){var D=j.sortIndex-$.sortIndex;return D!==0?D:j.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var a=[],c=[],u=1,f=null,d=3,h=!1,v=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(j){for(var $=n(c);$!==null;){if($.callback===null)r(c);else if($.startTime<=j)r(c),$.sortIndex=$.expirationTime,e(a,$);else break;$=n(c)}}function x(j){if(m=!1,S(j),!v)if(n(a)!==null)v=!0,Be(_);else{var $=n(c);$!==null&&Le(x,$.startTime-j)}}function _(j,$){v=!1,m&&(m=!1,y(E),E=-1),h=!0;var D=d;try{for(S($),f=n(a);f!==null&&(!(f.expirationTime>$)||j&&!L());){var q=f.callback;if(typeof q=="function"){f.callback=null,d=f.priorityLevel;var ce=q(f.expirationTime<=$);$=t.unstable_now(),typeof ce=="function"?f.callback=ce:f===n(a)&&r(a),S($)}else r(a);f=n(a)}if(f!==null)var Rt=!0;else{var Ie=n(c);Ie!==null&&Le(x,Ie.startTime-$),Rt=!1}return Rt}finally{f=null,d=D,h=!1}}var b=!1,T=null,E=-1,k=5,A=-1;function L(){return!(t.unstable_now()-A<k)}function C(){if(T!==null){var j=t.unstable_now();A=j;var $=!0;try{$=T(!0,j)}finally{$?M():(b=!1,T=null)}}else b=!1}var M;if(typeof g=="function")M=function(){g(C)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,Z=F.port2;F.port1.onmessage=C,M=function(){Z.postMessage(null)}}else M=function(){w(C,0)};function Be(j){T=j,b||(b=!0,M())}function Le(j,$){E=w(function(){j(t.unstable_now())},$)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(j){j.callback=null},t.unstable_continueExecution=function(){v||h||(v=!0,Be(_))},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return n(a)},t.unstable_next=function(j){switch(d){case 1:case 2:case 3:var $=3;break;default:$=d}var D=d;d=$;try{return j()}finally{d=D}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(j,$){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var D=d;d=j;try{return $()}finally{d=D}},t.unstable_scheduleCallback=function(j,$,D){var q=t.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?q+D:q):D=q,j){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=D+ce,j={id:u++,callback:$,priorityLevel:j,startTime:D,expirationTime:ce,sortIndex:-1},D>q?(j.sortIndex=D,e(c,j),n(a)===null&&j===n(c)&&(m?(y(E),E=-1):m=!0,Le(x,D-q))):(j.sortIndex=ce,e(a,j),v||h||(v=!0,Be(_))),j},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(j){var $=d;return function(){var D=d;d=$;try{return j.apply(this,arguments)}finally{d=D}}}})(ep);Zh.exports=ep;var Cv=Zh.exports;/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.min.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var tp=N,rt=Cv;function I(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var np=new Set,Ws={};function Gn(t,e){Fr(t,e),Fr(t+"Capture",e)}function Fr(t,e){for(Ws[t]=e,t=0;t<e.length;t++)np.add(e[t])}var Gt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ba=Object.prototype.hasOwnProperty,Av=/^[: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]*$/,Rf={},Df={};function Lv(t){return Ba.call(Df,t)?!0:Ba.call(Rf,t)?!1:Av.test(t)?Df[t]=!0:(Rf[t]=!0,!1)}function Iv(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function jv(t,e,n,r){if(e===null||typeof e>"u"||Iv(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ze(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var _e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){_e[t]=new ze(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];_e[e]=new ze(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){_e[t]=new ze(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){_e[t]=new ze(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){_e[t]=new ze(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){_e[t]=new ze(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){_e[t]=new ze(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){_e[t]=new ze(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){_e[t]=new ze(t,5,!1,t.toLowerCase(),null,!1,!1)});var eu=/[\-:]([a-z])/g;function tu(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(eu,tu);_e[e]=new ze(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(eu,tu);_e[e]=new ze(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(eu,tu);_e[e]=new ze(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){_e[t]=new ze(t,1,!1,t.toLowerCase(),null,!1,!1)});_e.xlinkHref=new ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){_e[t]=new ze(t,1,!1,t.toLowerCase(),null,!0,!0)});function nu(t,e,n,r){var s=_e.hasOwnProperty(e)?_e[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(jv(e,n,s,r)&&(n=null),r||s===null?Lv(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var en=tp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,bi=Symbol.for("react.element"),fr=Symbol.for("react.portal"),dr=Symbol.for("react.fragment"),ru=Symbol.for("react.strict_mode"),Ua=Symbol.for("react.profiler"),rp=Symbol.for("react.provider"),sp=Symbol.for("react.context"),su=Symbol.for("react.forward_ref"),Ha=Symbol.for("react.suspense"),Va=Symbol.for("react.suspense_list"),iu=Symbol.for("react.memo"),rn=Symbol.for("react.lazy"),ip=Symbol.for("react.offscreen"),Ff=Symbol.iterator;function us(t){return t===null||typeof t!="object"?null:(t=Ff&&t[Ff]||t["@@iterator"],typeof t=="function"?t:null)}var se=Object.assign,Kl;function bs(t){if(Kl===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Kl=e&&e[1]||""}return`
|
|
35
|
-
`+Kl+t}var Ql=!1;function Xl(t,e){if(!t||Ql)return"";Ql=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
|
|
36
|
-
`),i=r.stack.split(`
|
|
37
|
-
`),o=s.length-1,l=i.length-1;1<=o&&0<=l&&s[o]!==i[l];)l--;for(;1<=o&&0<=l;o--,l--)if(s[o]!==i[l]){if(o!==1||l!==1)do if(o--,l--,0>l||s[o]!==i[l]){var a=`
|
|
38
|
-
`+s[o].replace(" at new "," at ");return t.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",t.displayName)),a}while(1<=o&&0<=l);break}}}finally{Ql=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?bs(t):""}function Mv(t){switch(t.tag){case 5:return bs(t.type);case 16:return bs("Lazy");case 13:return bs("Suspense");case 19:return bs("SuspenseList");case 0:case 2:case 15:return t=Xl(t.type,!1),t;case 11:return t=Xl(t.type.render,!1),t;case 1:return t=Xl(t.type,!0),t;default:return""}}function qa(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case dr:return"Fragment";case fr:return"Portal";case Ua:return"Profiler";case ru:return"StrictMode";case Ha:return"Suspense";case Va:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case sp:return(t.displayName||"Context")+".Consumer";case rp:return(t._context.displayName||"Context")+".Provider";case su:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case iu:return e=t.displayName||null,e!==null?e:qa(t.type)||"Memo";case rn:e=t._payload,t=t._init;try{return qa(t(e))}catch{}}return null}function Ov(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return qa(e);case 8:return e===ru?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function _n(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function op(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function $v(t){var e=op(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ti(t){t._valueTracker||(t._valueTracker=$v(t))}function lp(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=op(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function ko(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}}function Wa(t,e){var n=e.checked;return se({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function zf(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=_n(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function ap(t,e){e=e.checked,e!=null&&nu(t,"checked",e,!1)}function Ka(t,e){ap(t,e);var n=_n(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Qa(t,e.type,n):e.hasOwnProperty("defaultValue")&&Qa(t,e.type,_n(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Bf(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Qa(t,e,n){(e!=="number"||ko(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Ts=Array.isArray;function Ar(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+_n(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function Xa(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(I(91));return se({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Uf(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(I(92));if(Ts(n)){if(1<n.length)throw Error(I(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:_n(n)}}function cp(t,e){var n=_n(e.value),r=_n(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function Hf(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function up(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ga(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?up(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Ni,fp=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Ni=Ni||document.createElement("div"),Ni.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Ni.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ks(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Os={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pv=["Webkit","ms","Moz","O"];Object.keys(Os).forEach(function(t){Pv.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Os[e]=Os[t]})});function dp(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Os.hasOwnProperty(t)&&Os[t]?(""+e).trim():e+"px"}function hp(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=dp(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var Rv=se({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ja(t,e){if(e){if(Rv[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(I(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(I(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(I(61))}if(e.style!=null&&typeof e.style!="object")throw Error(I(62))}}function Ya(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";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 Za=null;function ou(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ec=null,Lr=null,Ir=null;function Vf(t){if(t=yi(t)){if(typeof ec!="function")throw Error(I(280));var e=t.stateNode;e&&(e=dl(e),ec(t.stateNode,t.type,e))}}function pp(t){Lr?Ir?Ir.push(t):Ir=[t]:Lr=t}function mp(){if(Lr){var t=Lr,e=Ir;if(Ir=Lr=null,Vf(t),e)for(t=0;t<e.length;t++)Vf(e[t])}}function gp(t,e){return t(e)}function yp(){}var Gl=!1;function vp(t,e,n){if(Gl)return t(e,n);Gl=!0;try{return gp(t,e,n)}finally{Gl=!1,(Lr!==null||Ir!==null)&&(yp(),mp())}}function Qs(t,e){var n=t.stateNode;if(n===null)return null;var r=dl(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(I(231,e,typeof n));return n}var tc=!1;if(Gt)try{var fs={};Object.defineProperty(fs,"passive",{get:function(){tc=!0}}),window.addEventListener("test",fs,fs),window.removeEventListener("test",fs,fs)}catch{tc=!1}function Dv(t,e,n,r,s,i,o,l,a){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var $s=!1,Eo=null,bo=!1,nc=null,Fv={onError:function(t){$s=!0,Eo=t}};function zv(t,e,n,r,s,i,o,l,a){$s=!1,Eo=null,Dv.apply(Fv,arguments)}function Bv(t,e,n,r,s,i,o,l,a){if(zv.apply(this,arguments),$s){if($s){var c=Eo;$s=!1,Eo=null}else throw Error(I(198));bo||(bo=!0,nc=c)}}function Jn(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function wp(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function qf(t){if(Jn(t)!==t)throw Error(I(188))}function Uv(t){var e=t.alternate;if(!e){if(e=Jn(t),e===null)throw Error(I(188));return e!==t?null:t}for(var n=t,r=e;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return qf(s),t;if(i===r)return qf(s),e;i=i.sibling}throw Error(I(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o)throw Error(I(189))}}if(n.alternate!==r)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?t:e}function Sp(t){return t=Uv(t),t!==null?xp(t):null}function xp(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=xp(t);if(e!==null)return e;t=t.sibling}return null}var _p=rt.unstable_scheduleCallback,Wf=rt.unstable_cancelCallback,Hv=rt.unstable_shouldYield,Vv=rt.unstable_requestPaint,oe=rt.unstable_now,qv=rt.unstable_getCurrentPriorityLevel,lu=rt.unstable_ImmediatePriority,kp=rt.unstable_UserBlockingPriority,To=rt.unstable_NormalPriority,Wv=rt.unstable_LowPriority,Ep=rt.unstable_IdlePriority,al=null,Mt=null;function Kv(t){if(Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(al,t,void 0,(t.current.flags&128)===128)}catch{}}var kt=Math.clz32?Math.clz32:Gv,Qv=Math.log,Xv=Math.LN2;function Gv(t){return t>>>=0,t===0?32:31-(Qv(t)/Xv|0)|0}var Ci=64,Ai=4194304;function Ns(t){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function No(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var l=o&~s;l!==0?r=Ns(l):(i&=o,i!==0&&(r=Ns(i)))}else o=n&~s,o!==0?r=Ns(o):i!==0&&(r=Ns(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-kt(e),s=1<<n,r|=t[n],e&=~s;return r}function Jv(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Yv(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-kt(i),l=1<<o,a=s[o];a===-1?(!(l&n)||l&r)&&(s[o]=Jv(l,e)):a<=e&&(t.expiredLanes|=l),i&=~l}}function rc(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function bp(){var t=Ci;return Ci<<=1,!(Ci&4194240)&&(Ci=64),t}function Jl(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function mi(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-kt(e),t[e]=n}function Zv(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-kt(n),i=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~i}}function au(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-kt(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var U=0;function Tp(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Np,cu,Cp,Ap,Lp,sc=!1,Li=[],dn=null,hn=null,pn=null,Xs=new Map,Gs=new Map,an=[],ew="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Kf(t,e){switch(t){case"focusin":case"focusout":dn=null;break;case"dragenter":case"dragleave":hn=null;break;case"mouseover":case"mouseout":pn=null;break;case"pointerover":case"pointerout":Xs.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gs.delete(e.pointerId)}}function ds(t,e,n,r,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},e!==null&&(e=yi(e),e!==null&&cu(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function tw(t,e,n,r,s){switch(e){case"focusin":return dn=ds(dn,t,e,n,r,s),!0;case"dragenter":return hn=ds(hn,t,e,n,r,s),!0;case"mouseover":return pn=ds(pn,t,e,n,r,s),!0;case"pointerover":var i=s.pointerId;return Xs.set(i,ds(Xs.get(i)||null,t,e,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Gs.set(i,ds(Gs.get(i)||null,t,e,n,r,s)),!0}return!1}function Ip(t){var e=On(t.target);if(e!==null){var n=Jn(e);if(n!==null){if(e=n.tag,e===13){if(e=wp(n),e!==null){t.blockedOn=e,Lp(t.priority,function(){Cp(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function eo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=ic(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Za=r,n.target.dispatchEvent(r),Za=null}else return e=yi(n),e!==null&&cu(e),t.blockedOn=n,!1;e.shift()}return!0}function Qf(t,e,n){eo(t)&&n.delete(e)}function nw(){sc=!1,dn!==null&&eo(dn)&&(dn=null),hn!==null&&eo(hn)&&(hn=null),pn!==null&&eo(pn)&&(pn=null),Xs.forEach(Qf),Gs.forEach(Qf)}function hs(t,e){t.blockedOn===e&&(t.blockedOn=null,sc||(sc=!0,rt.unstable_scheduleCallback(rt.unstable_NormalPriority,nw)))}function Js(t){function e(s){return hs(s,t)}if(0<Li.length){hs(Li[0],t);for(var n=1;n<Li.length;n++){var r=Li[n];r.blockedOn===t&&(r.blockedOn=null)}}for(dn!==null&&hs(dn,t),hn!==null&&hs(hn,t),pn!==null&&hs(pn,t),Xs.forEach(e),Gs.forEach(e),n=0;n<an.length;n++)r=an[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<an.length&&(n=an[0],n.blockedOn===null);)Ip(n),n.blockedOn===null&&an.shift()}var jr=en.ReactCurrentBatchConfig,Co=!0;function rw(t,e,n,r){var s=U,i=jr.transition;jr.transition=null;try{U=1,uu(t,e,n,r)}finally{U=s,jr.transition=i}}function sw(t,e,n,r){var s=U,i=jr.transition;jr.transition=null;try{U=4,uu(t,e,n,r)}finally{U=s,jr.transition=i}}function uu(t,e,n,r){if(Co){var s=ic(t,e,n,r);if(s===null)la(t,e,r,Ao,n),Kf(t,r);else if(tw(s,t,e,n,r))r.stopPropagation();else if(Kf(t,r),e&4&&-1<ew.indexOf(t)){for(;s!==null;){var i=yi(s);if(i!==null&&Np(i),i=ic(t,e,n,r),i===null&&la(t,e,r,Ao,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else la(t,e,r,null,n)}}var Ao=null;function ic(t,e,n,r){if(Ao=null,t=ou(r),t=On(t),t!==null)if(e=Jn(t),e===null)t=null;else if(n=e.tag,n===13){if(t=wp(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Ao=t,null}function jp(t){switch(t){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(qv()){case lu:return 1;case kp:return 4;case To:case Wv:return 16;case Ep:return 536870912;default:return 16}default:return 16}}var un=null,fu=null,to=null;function Mp(){if(to)return to;var t,e=fu,n=e.length,r,s="value"in un?un.value:un.textContent,i=s.length;for(t=0;t<n&&e[t]===s[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===s[i-r];r++);return to=s.slice(t,1<r?1-r:void 0)}function no(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Ii(){return!0}function Xf(){return!1}function it(t){function e(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(n=t[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ii:Xf,this.isPropagationStopped=Xf,this}return se(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ii)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ii)},persist:function(){},isPersistent:Ii}),e}var Gr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},du=it(Gr),gi=se({},Gr,{view:0,detail:0}),iw=it(gi),Yl,Zl,ps,cl=se({},gi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hu,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!==ps&&(ps&&t.type==="mousemove"?(Yl=t.screenX-ps.screenX,Zl=t.screenY-ps.screenY):Zl=Yl=0,ps=t),Yl)},movementY:function(t){return"movementY"in t?t.movementY:Zl}}),Gf=it(cl),ow=se({},cl,{dataTransfer:0}),lw=it(ow),aw=se({},gi,{relatedTarget:0}),ea=it(aw),cw=se({},Gr,{animationName:0,elapsedTime:0,pseudoElement:0}),uw=it(cw),fw=se({},Gr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),dw=it(fw),hw=se({},Gr,{data:0}),Jf=it(hw),pw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mw={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"},gw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yw(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=gw[t])?!!e[t]:!1}function hu(){return yw}var vw=se({},gi,{key:function(t){if(t.key){var e=pw[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=no(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?mw[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hu,charCode:function(t){return t.type==="keypress"?no(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?no(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),ww=it(vw),Sw=se({},cl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yf=it(Sw),xw=se({},gi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hu}),_w=it(xw),kw=se({},Gr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ew=it(kw),bw=se({},cl,{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}),Tw=it(bw),Nw=[9,13,27,32],pu=Gt&&"CompositionEvent"in window,Ps=null;Gt&&"documentMode"in document&&(Ps=document.documentMode);var Cw=Gt&&"TextEvent"in window&&!Ps,Op=Gt&&(!pu||Ps&&8<Ps&&11>=Ps),Zf=" ",ed=!1;function $p(t,e){switch(t){case"keyup":return Nw.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var hr=!1;function Aw(t,e){switch(t){case"compositionend":return Pp(e);case"keypress":return e.which!==32?null:(ed=!0,Zf);case"textInput":return t=e.data,t===Zf&&ed?null:t;default:return null}}function Lw(t,e){if(hr)return t==="compositionend"||!pu&&$p(t,e)?(t=Mp(),to=fu=un=null,hr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Op&&e.locale!=="ko"?null:e.data;default:return null}}var Iw={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 td(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Iw[t.type]:e==="textarea"}function Rp(t,e,n,r){pp(r),e=Lo(e,"onChange"),0<e.length&&(n=new du("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Rs=null,Ys=null;function jw(t){Qp(t,0)}function ul(t){var e=gr(t);if(lp(e))return t}function Mw(t,e){if(t==="change")return e}var Dp=!1;if(Gt){var ta;if(Gt){var na="oninput"in document;if(!na){var nd=document.createElement("div");nd.setAttribute("oninput","return;"),na=typeof nd.oninput=="function"}ta=na}else ta=!1;Dp=ta&&(!document.documentMode||9<document.documentMode)}function rd(){Rs&&(Rs.detachEvent("onpropertychange",Fp),Ys=Rs=null)}function Fp(t){if(t.propertyName==="value"&&ul(Ys)){var e=[];Rp(e,Ys,t,ou(t)),vp(jw,e)}}function Ow(t,e,n){t==="focusin"?(rd(),Rs=e,Ys=n,Rs.attachEvent("onpropertychange",Fp)):t==="focusout"&&rd()}function $w(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ul(Ys)}function Pw(t,e){if(t==="click")return ul(e)}function Rw(t,e){if(t==="input"||t==="change")return ul(e)}function Dw(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var bt=typeof Object.is=="function"?Object.is:Dw;function Zs(t,e){if(bt(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Ba.call(e,s)||!bt(t[s],e[s]))return!1}return!0}function sd(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function id(t,e){var n=sd(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sd(n)}}function zp(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?zp(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Bp(){for(var t=window,e=ko();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ko(t.document)}return e}function mu(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Fw(t){var e=Bp(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&zp(n.ownerDocument.documentElement,n)){if(r!==null&&mu(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=id(n,i);var o=id(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var zw=Gt&&"documentMode"in document&&11>=document.documentMode,pr=null,oc=null,Ds=null,lc=!1;function od(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;lc||pr==null||pr!==ko(r)||(r=pr,"selectionStart"in r&&mu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ds&&Zs(Ds,r)||(Ds=r,r=Lo(oc,"onSelect"),0<r.length&&(e=new du("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=pr)))}function ji(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var mr={animationend:ji("Animation","AnimationEnd"),animationiteration:ji("Animation","AnimationIteration"),animationstart:ji("Animation","AnimationStart"),transitionend:ji("Transition","TransitionEnd")},ra={},Up={};Gt&&(Up=document.createElement("div").style,"AnimationEvent"in window||(delete mr.animationend.animation,delete mr.animationiteration.animation,delete mr.animationstart.animation),"TransitionEvent"in window||delete mr.transitionend.transition);function fl(t){if(ra[t])return ra[t];if(!mr[t])return t;var e=mr[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Up)return ra[t]=e[n];return t}var Hp=fl("animationend"),Vp=fl("animationiteration"),qp=fl("animationstart"),Wp=fl("transitionend"),Kp=new Map,ld="abort auxClick 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(" ");function Tn(t,e){Kp.set(t,e),Gn(e,[t])}for(var sa=0;sa<ld.length;sa++){var ia=ld[sa],Bw=ia.toLowerCase(),Uw=ia[0].toUpperCase()+ia.slice(1);Tn(Bw,"on"+Uw)}Tn(Hp,"onAnimationEnd");Tn(Vp,"onAnimationIteration");Tn(qp,"onAnimationStart");Tn("dblclick","onDoubleClick");Tn("focusin","onFocus");Tn("focusout","onBlur");Tn(Wp,"onTransitionEnd");Fr("onMouseEnter",["mouseout","mouseover"]);Fr("onMouseLeave",["mouseout","mouseover"]);Fr("onPointerEnter",["pointerout","pointerover"]);Fr("onPointerLeave",["pointerout","pointerover"]);Gn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cs="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(" "),Hw=new Set("cancel close invalid load scroll toggle".split(" ").concat(Cs));function ad(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,Bv(r,e,void 0,t),t.currentTarget=null}function Qp(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var i=void 0;if(e)for(var o=r.length-1;0<=o;o--){var l=r[o],a=l.instance,c=l.currentTarget;if(l=l.listener,a!==i&&s.isPropagationStopped())break e;ad(s,l,c),i=a}else for(o=0;o<r.length;o++){if(l=r[o],a=l.instance,c=l.currentTarget,l=l.listener,a!==i&&s.isPropagationStopped())break e;ad(s,l,c),i=a}}}if(bo)throw t=nc,bo=!1,nc=null,t}function K(t,e){var n=e[dc];n===void 0&&(n=e[dc]=new Set);var r=t+"__bubble";n.has(r)||(Xp(e,t,2,!1),n.add(r))}function oa(t,e,n){var r=0;e&&(r|=4),Xp(n,t,r,e)}var Mi="_reactListening"+Math.random().toString(36).slice(2);function ei(t){if(!t[Mi]){t[Mi]=!0,np.forEach(function(n){n!=="selectionchange"&&(Hw.has(n)||oa(n,!1,t),oa(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Mi]||(e[Mi]=!0,oa("selectionchange",!1,e))}}function Xp(t,e,n,r){switch(jp(e)){case 1:var s=rw;break;case 4:s=sw;break;default:s=uu}n=s.bind(null,e,n,t),s=void 0,!tc||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function la(t,e,n,r,s){var i=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var a=o.tag;if((a===3||a===4)&&(a=o.stateNode.containerInfo,a===s||a.nodeType===8&&a.parentNode===s))return;o=o.return}for(;l!==null;){if(o=On(l),o===null)return;if(a=o.tag,a===5||a===6){r=i=o;continue e}l=l.parentNode}}r=r.return}vp(function(){var c=i,u=ou(n),f=[];e:{var d=Kp.get(t);if(d!==void 0){var h=du,v=t;switch(t){case"keypress":if(no(n)===0)break e;case"keydown":case"keyup":h=ww;break;case"focusin":v="focus",h=ea;break;case"focusout":v="blur",h=ea;break;case"beforeblur":case"afterblur":h=ea;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Gf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=lw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=_w;break;case Hp:case Vp:case qp:h=uw;break;case Wp:h=Ew;break;case"scroll":h=iw;break;case"wheel":h=Tw;break;case"copy":case"cut":case"paste":h=dw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Yf}var m=(e&4)!==0,w=!m&&t==="scroll",y=m?d!==null?d+"Capture":null:d;m=[];for(var g=c,S;g!==null;){S=g;var x=S.stateNode;if(S.tag===5&&x!==null&&(S=x,y!==null&&(x=Qs(g,y),x!=null&&m.push(ti(g,x,S)))),w)break;g=g.return}0<m.length&&(d=new h(d,v,null,n,u),f.push({event:d,listeners:m}))}}if(!(e&7)){e:{if(d=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",d&&n!==Za&&(v=n.relatedTarget||n.fromElement)&&(On(v)||v[Jt]))break e;if((h||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=c,v=v?On(v):null,v!==null&&(w=Jn(v),v!==w||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=c),h!==v)){if(m=Gf,x="onMouseLeave",y="onMouseEnter",g="mouse",(t==="pointerout"||t==="pointerover")&&(m=Yf,x="onPointerLeave",y="onPointerEnter",g="pointer"),w=h==null?d:gr(h),S=v==null?d:gr(v),d=new m(x,g+"leave",h,n,u),d.target=w,d.relatedTarget=S,x=null,On(u)===c&&(m=new m(y,g+"enter",v,n,u),m.target=S,m.relatedTarget=w,x=m),w=x,h&&v)t:{for(m=h,y=v,g=0,S=m;S;S=rr(S))g++;for(S=0,x=y;x;x=rr(x))S++;for(;0<g-S;)m=rr(m),g--;for(;0<S-g;)y=rr(y),S--;for(;g--;){if(m===y||y!==null&&m===y.alternate)break t;m=rr(m),y=rr(y)}m=null}else m=null;h!==null&&cd(f,d,h,m,!1),v!==null&&w!==null&&cd(f,w,v,m,!0)}}e:{if(d=c?gr(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var _=Mw;else if(td(d))if(Dp)_=Rw;else{_=$w;var b=Ow}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(_=Pw);if(_&&(_=_(t,c))){Rp(f,_,n,u);break e}b&&b(t,d,c),t==="focusout"&&(b=d._wrapperState)&&b.controlled&&d.type==="number"&&Qa(d,"number",d.value)}switch(b=c?gr(c):window,t){case"focusin":(td(b)||b.contentEditable==="true")&&(pr=b,oc=c,Ds=null);break;case"focusout":Ds=oc=pr=null;break;case"mousedown":lc=!0;break;case"contextmenu":case"mouseup":case"dragend":lc=!1,od(f,n,u);break;case"selectionchange":if(zw)break;case"keydown":case"keyup":od(f,n,u)}var T;if(pu)e:{switch(t){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else hr?$p(t,n)&&(E="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(Op&&n.locale!=="ko"&&(hr||E!=="onCompositionStart"?E==="onCompositionEnd"&&hr&&(T=Mp()):(un=u,fu="value"in un?un.value:un.textContent,hr=!0)),b=Lo(c,E),0<b.length&&(E=new Jf(E,t,null,n,u),f.push({event:E,listeners:b}),T?E.data=T:(T=Pp(n),T!==null&&(E.data=T)))),(T=Cw?Aw(t,n):Lw(t,n))&&(c=Lo(c,"onBeforeInput"),0<c.length&&(u=new Jf("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:c}),u.data=T))}Qp(f,e)})}function ti(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Lo(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Qs(t,n),i!=null&&r.unshift(ti(t,i,s)),i=Qs(t,e),i!=null&&r.push(ti(t,i,s))),t=t.return}return r}function rr(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function cd(t,e,n,r,s){for(var i=e._reactName,o=[];n!==null&&n!==r;){var l=n,a=l.alternate,c=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&c!==null&&(l=c,s?(a=Qs(n,i),a!=null&&o.unshift(ti(n,a,l))):s||(a=Qs(n,i),a!=null&&o.push(ti(n,a,l)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var Vw=/\r\n?/g,qw=/\u0000|\uFFFD/g;function ud(t){return(typeof t=="string"?t:""+t).replace(Vw,`
|
|
39
|
-
`).replace(qw,"")}function Oi(t,e,n){if(e=ud(e),ud(t)!==e&&n)throw Error(I(425))}function Io(){}var ac=null,cc=null;function uc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var fc=typeof setTimeout=="function"?setTimeout:void 0,Ww=typeof clearTimeout=="function"?clearTimeout:void 0,fd=typeof Promise=="function"?Promise:void 0,Kw=typeof queueMicrotask=="function"?queueMicrotask:typeof fd<"u"?function(t){return fd.resolve(null).then(t).catch(Qw)}:fc;function Qw(t){setTimeout(function(){throw t})}function aa(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),Js(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Js(e)}function mn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function dd(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Jr=Math.random().toString(36).slice(2),jt="__reactFiber$"+Jr,ni="__reactProps$"+Jr,Jt="__reactContainer$"+Jr,dc="__reactEvents$"+Jr,Xw="__reactListeners$"+Jr,Gw="__reactHandles$"+Jr;function On(t){var e=t[jt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Jt]||n[jt]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=dd(t);t!==null;){if(n=t[jt])return n;t=dd(t)}return e}t=n,n=t.parentNode}return null}function yi(t){return t=t[jt]||t[Jt],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function gr(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(I(33))}function dl(t){return t[ni]||null}var hc=[],yr=-1;function Nn(t){return{current:t}}function Q(t){0>yr||(t.current=hc[yr],hc[yr]=null,yr--)}function V(t,e){yr++,hc[yr]=t.current,t.current=e}var kn={},Ae=Nn(kn),Xe=Nn(!1),Hn=kn;function zr(t,e){var n=t.type.contextTypes;if(!n)return kn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Ge(t){return t=t.childContextTypes,t!=null}function jo(){Q(Xe),Q(Ae)}function hd(t,e,n){if(Ae.current!==kn)throw Error(I(168));V(Ae,e),V(Xe,n)}function Gp(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(I(108,Ov(t)||"Unknown",s));return se({},n,r)}function Mo(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||kn,Hn=Ae.current,V(Ae,t),V(Xe,Xe.current),!0}function pd(t,e,n){var r=t.stateNode;if(!r)throw Error(I(169));n?(t=Gp(t,e,Hn),r.__reactInternalMemoizedMergedChildContext=t,Q(Xe),Q(Ae),V(Ae,t)):Q(Xe),V(Xe,n)}var Ht=null,hl=!1,ca=!1;function Jp(t){Ht===null?Ht=[t]:Ht.push(t)}function Jw(t){hl=!0,Jp(t)}function Cn(){if(!ca&&Ht!==null){ca=!0;var t=0,e=U;try{var n=Ht;for(U=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Ht=null,hl=!1}catch(s){throw Ht!==null&&(Ht=Ht.slice(t+1)),_p(lu,Cn),s}finally{U=e,ca=!1}}return null}var vr=[],wr=0,Oo=null,$o=0,lt=[],at=0,Vn=null,Vt=1,qt="";function An(t,e){vr[wr++]=$o,vr[wr++]=Oo,Oo=t,$o=e}function Yp(t,e,n){lt[at++]=Vt,lt[at++]=qt,lt[at++]=Vn,Vn=t;var r=Vt;t=qt;var s=32-kt(r)-1;r&=~(1<<s),n+=1;var i=32-kt(e)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Vt=1<<32-kt(e)+s|n<<s|r,qt=i+t}else Vt=1<<i|n<<s|r,qt=t}function gu(t){t.return!==null&&(An(t,1),Yp(t,1,0))}function yu(t){for(;t===Oo;)Oo=vr[--wr],vr[wr]=null,$o=vr[--wr],vr[wr]=null;for(;t===Vn;)Vn=lt[--at],lt[at]=null,qt=lt[--at],lt[at]=null,Vt=lt[--at],lt[at]=null}var nt=null,et=null,J=!1,xt=null;function Zp(t,e){var n=ft(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function md(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,nt=t,et=mn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,nt=t,et=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Vn!==null?{id:Vt,overflow:qt}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=ft(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,nt=t,et=null,!0):!1;default:return!1}}function pc(t){return(t.mode&1)!==0&&(t.flags&128)===0}function mc(t){if(J){var e=et;if(e){var n=e;if(!md(t,e)){if(pc(t))throw Error(I(418));e=mn(n.nextSibling);var r=nt;e&&md(t,e)?Zp(r,n):(t.flags=t.flags&-4097|2,J=!1,nt=t)}}else{if(pc(t))throw Error(I(418));t.flags=t.flags&-4097|2,J=!1,nt=t}}}function gd(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;nt=t}function $i(t){if(t!==nt)return!1;if(!J)return gd(t),J=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!uc(t.type,t.memoizedProps)),e&&(e=et)){if(pc(t))throw em(),Error(I(418));for(;e;)Zp(t,e),e=mn(e.nextSibling)}if(gd(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(I(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){et=mn(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}et=null}}else et=nt?mn(t.stateNode.nextSibling):null;return!0}function em(){for(var t=et;t;)t=mn(t.nextSibling)}function Br(){et=nt=null,J=!1}function vu(t){xt===null?xt=[t]:xt.push(t)}var Yw=en.ReactCurrentBatchConfig;function wt(t,e){if(t&&t.defaultProps){e=se({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}var Po=Nn(null),Ro=null,Sr=null,wu=null;function Su(){wu=Sr=Ro=null}function xu(t){var e=Po.current;Q(Po),t._currentValue=e}function gc(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Mr(t,e){Ro=t,wu=Sr=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Qe=!0),t.firstContext=null)}function pt(t){var e=t._currentValue;if(wu!==t)if(t={context:t,memoizedValue:e,next:null},Sr===null){if(Ro===null)throw Error(I(308));Sr=t,Ro.dependencies={lanes:0,firstContext:t}}else Sr=Sr.next=t;return e}var $n=null;function _u(t){$n===null?$n=[t]:$n.push(t)}function tm(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,_u(e)):(n.next=s.next,s.next=n),e.interleaved=n,Yt(t,r)}function Yt(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var sn=!1;function ku(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nm(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Qt(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function gn(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,B&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,Yt(t,n)}return s=r.interleaved,s===null?(e.next=e,_u(r)):(e.next=s.next,s.next=e),r.interleaved=e,Yt(t,n)}function ro(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,au(t,n)}}function yd(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Do(t,e,n,r){var s=t.updateQueue;sn=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var a=l,c=a.next;a.next=null,o===null?i=c:o.next=c,o=a;var u=t.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==o&&(l===null?u.firstBaseUpdate=c:l.next=c,u.lastBaseUpdate=a))}if(i!==null){var f=s.baseState;o=0,u=c=a=null,l=i;do{var d=l.lane,h=l.eventTime;if((r&d)===d){u!==null&&(u=u.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=t,m=l;switch(d=e,h=n,m.tag){case 1:if(v=m.payload,typeof v=="function"){f=v.call(h,f,d);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,d=typeof v=="function"?v.call(h,f,d):v,d==null)break e;f=se({},f,d);break e;case 2:sn=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,d=s.effects,d===null?s.effects=[l]:d.push(l))}else h={eventTime:h,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(c=u=h,a=f):u=u.next=h,o|=d;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;d=l,l=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(!0);if(u===null&&(a=f),s.baseState=a,s.firstBaseUpdate=c,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);Wn|=o,t.lanes=o,t.memoizedState=f}}function vd(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(I(191,s));s.call(r)}}}var rm=new tp.Component().refs;function yc(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:se({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var pl={isMounted:function(t){return(t=t._reactInternals)?Jn(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Re(),s=vn(t),i=Qt(r,s);i.payload=e,n!=null&&(i.callback=n),e=gn(t,i,s),e!==null&&(Et(e,t,s,r),ro(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Re(),s=vn(t),i=Qt(r,s);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=gn(t,i,s),e!==null&&(Et(e,t,s,r),ro(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Re(),r=vn(t),s=Qt(n,r);s.tag=2,e!=null&&(s.callback=e),e=gn(t,s,r),e!==null&&(Et(e,t,r,n),ro(e,t,r))}};function wd(t,e,n,r,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,i,o):e.prototype&&e.prototype.isPureReactComponent?!Zs(n,r)||!Zs(s,i):!0}function sm(t,e,n){var r=!1,s=kn,i=e.contextType;return typeof i=="object"&&i!==null?i=pt(i):(s=Ge(e)?Hn:Ae.current,r=e.contextTypes,i=(r=r!=null)?zr(t,s):kn),e=new e(n,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=pl,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function Sd(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&pl.enqueueReplaceState(e,e.state,null)}function vc(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs=rm,ku(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=pt(i):(i=Ge(e)?Hn:Ae.current,s.context=zr(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(yc(t,e,i,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&pl.enqueueReplaceState(s,s.state,null),Do(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function ms(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(I(309));var r=n.stateNode}if(!r)throw Error(I(147,t));var s=r,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var l=s.refs;l===rm&&(l=s.refs={}),o===null?delete l[i]:l[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(I(284));if(!n._owner)throw Error(I(290,t))}return t}function Pi(t,e){throw t=Object.prototype.toString.call(e),Error(I(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function xd(t){var e=t._init;return e(t._payload)}function im(t){function e(y,g){if(t){var S=y.deletions;S===null?(y.deletions=[g],y.flags|=16):S.push(g)}}function n(y,g){if(!t)return null;for(;g!==null;)e(y,g),g=g.sibling;return null}function r(y,g){for(y=new Map;g!==null;)g.key!==null?y.set(g.key,g):y.set(g.index,g),g=g.sibling;return y}function s(y,g){return y=wn(y,g),y.index=0,y.sibling=null,y}function i(y,g,S){return y.index=S,t?(S=y.alternate,S!==null?(S=S.index,S<g?(y.flags|=2,g):S):(y.flags|=2,g)):(y.flags|=1048576,g)}function o(y){return t&&y.alternate===null&&(y.flags|=2),y}function l(y,g,S,x){return g===null||g.tag!==6?(g=ga(S,y.mode,x),g.return=y,g):(g=s(g,S),g.return=y,g)}function a(y,g,S,x){var _=S.type;return _===dr?u(y,g,S.props.children,x,S.key):g!==null&&(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===rn&&xd(_)===g.type)?(x=s(g,S.props),x.ref=ms(y,g,S),x.return=y,x):(x=co(S.type,S.key,S.props,null,y.mode,x),x.ref=ms(y,g,S),x.return=y,x)}function c(y,g,S,x){return g===null||g.tag!==4||g.stateNode.containerInfo!==S.containerInfo||g.stateNode.implementation!==S.implementation?(g=ya(S,y.mode,x),g.return=y,g):(g=s(g,S.children||[]),g.return=y,g)}function u(y,g,S,x,_){return g===null||g.tag!==7?(g=Bn(S,y.mode,x,_),g.return=y,g):(g=s(g,S),g.return=y,g)}function f(y,g,S){if(typeof g=="string"&&g!==""||typeof g=="number")return g=ga(""+g,y.mode,S),g.return=y,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case bi:return S=co(g.type,g.key,g.props,null,y.mode,S),S.ref=ms(y,null,g),S.return=y,S;case fr:return g=ya(g,y.mode,S),g.return=y,g;case rn:var x=g._init;return f(y,x(g._payload),S)}if(Ts(g)||us(g))return g=Bn(g,y.mode,S,null),g.return=y,g;Pi(y,g)}return null}function d(y,g,S,x){var _=g!==null?g.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return _!==null?null:l(y,g,""+S,x);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case bi:return S.key===_?a(y,g,S,x):null;case fr:return S.key===_?c(y,g,S,x):null;case rn:return _=S._init,d(y,g,_(S._payload),x)}if(Ts(S)||us(S))return _!==null?null:u(y,g,S,x,null);Pi(y,S)}return null}function h(y,g,S,x,_){if(typeof x=="string"&&x!==""||typeof x=="number")return y=y.get(S)||null,l(g,y,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case bi:return y=y.get(x.key===null?S:x.key)||null,a(g,y,x,_);case fr:return y=y.get(x.key===null?S:x.key)||null,c(g,y,x,_);case rn:var b=x._init;return h(y,g,S,b(x._payload),_)}if(Ts(x)||us(x))return y=y.get(S)||null,u(g,y,x,_,null);Pi(g,x)}return null}function v(y,g,S,x){for(var _=null,b=null,T=g,E=g=0,k=null;T!==null&&E<S.length;E++){T.index>E?(k=T,T=null):k=T.sibling;var A=d(y,T,S[E],x);if(A===null){T===null&&(T=k);break}t&&T&&A.alternate===null&&e(y,T),g=i(A,g,E),b===null?_=A:b.sibling=A,b=A,T=k}if(E===S.length)return n(y,T),J&&An(y,E),_;if(T===null){for(;E<S.length;E++)T=f(y,S[E],x),T!==null&&(g=i(T,g,E),b===null?_=T:b.sibling=T,b=T);return J&&An(y,E),_}for(T=r(y,T);E<S.length;E++)k=h(T,y,E,S[E],x),k!==null&&(t&&k.alternate!==null&&T.delete(k.key===null?E:k.key),g=i(k,g,E),b===null?_=k:b.sibling=k,b=k);return t&&T.forEach(function(L){return e(y,L)}),J&&An(y,E),_}function m(y,g,S,x){var _=us(S);if(typeof _!="function")throw Error(I(150));if(S=_.call(S),S==null)throw Error(I(151));for(var b=_=null,T=g,E=g=0,k=null,A=S.next();T!==null&&!A.done;E++,A=S.next()){T.index>E?(k=T,T=null):k=T.sibling;var L=d(y,T,A.value,x);if(L===null){T===null&&(T=k);break}t&&T&&L.alternate===null&&e(y,T),g=i(L,g,E),b===null?_=L:b.sibling=L,b=L,T=k}if(A.done)return n(y,T),J&&An(y,E),_;if(T===null){for(;!A.done;E++,A=S.next())A=f(y,A.value,x),A!==null&&(g=i(A,g,E),b===null?_=A:b.sibling=A,b=A);return J&&An(y,E),_}for(T=r(y,T);!A.done;E++,A=S.next())A=h(T,y,E,A.value,x),A!==null&&(t&&A.alternate!==null&&T.delete(A.key===null?E:A.key),g=i(A,g,E),b===null?_=A:b.sibling=A,b=A);return t&&T.forEach(function(C){return e(y,C)}),J&&An(y,E),_}function w(y,g,S,x){if(typeof S=="object"&&S!==null&&S.type===dr&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case bi:e:{for(var _=S.key,b=g;b!==null;){if(b.key===_){if(_=S.type,_===dr){if(b.tag===7){n(y,b.sibling),g=s(b,S.props.children),g.return=y,y=g;break e}}else if(b.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===rn&&xd(_)===b.type){n(y,b.sibling),g=s(b,S.props),g.ref=ms(y,b,S),g.return=y,y=g;break e}n(y,b);break}else e(y,b);b=b.sibling}S.type===dr?(g=Bn(S.props.children,y.mode,x,S.key),g.return=y,y=g):(x=co(S.type,S.key,S.props,null,y.mode,x),x.ref=ms(y,g,S),x.return=y,y=x)}return o(y);case fr:e:{for(b=S.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===S.containerInfo&&g.stateNode.implementation===S.implementation){n(y,g.sibling),g=s(g,S.children||[]),g.return=y,y=g;break e}else{n(y,g);break}else e(y,g);g=g.sibling}g=ya(S,y.mode,x),g.return=y,y=g}return o(y);case rn:return b=S._init,w(y,g,b(S._payload),x)}if(Ts(S))return v(y,g,S,x);if(us(S))return m(y,g,S,x);Pi(y,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,g!==null&&g.tag===6?(n(y,g.sibling),g=s(g,S),g.return=y,y=g):(n(y,g),g=ga(S,y.mode,x),g.return=y,y=g),o(y)):n(y,g)}return w}var Ur=im(!0),om=im(!1),vi={},Ot=Nn(vi),ri=Nn(vi),si=Nn(vi);function Pn(t){if(t===vi)throw Error(I(174));return t}function Eu(t,e){switch(V(si,e),V(ri,t),V(Ot,vi),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ga(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ga(e,t)}Q(Ot),V(Ot,e)}function Hr(){Q(Ot),Q(ri),Q(si)}function lm(t){Pn(si.current);var e=Pn(Ot.current),n=Ga(e,t.type);e!==n&&(V(ri,t),V(Ot,n))}function bu(t){ri.current===t&&(Q(Ot),Q(ri))}var ee=Nn(0);function Fo(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var ua=[];function Tu(){for(var t=0;t<ua.length;t++)ua[t]._workInProgressVersionPrimary=null;ua.length=0}var so=en.ReactCurrentDispatcher,fa=en.ReactCurrentBatchConfig,qn=0,ne=null,he=null,me=null,zo=!1,Fs=!1,ii=0,Zw=0;function Ee(){throw Error(I(321))}function Nu(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!bt(t[n],e[n]))return!1;return!0}function Cu(t,e,n,r,s,i){if(qn=i,ne=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,so.current=t===null||t.memoizedState===null?r1:s1,t=n(r,s),Fs){i=0;do{if(Fs=!1,ii=0,25<=i)throw Error(I(301));i+=1,me=he=null,e.updateQueue=null,so.current=i1,t=n(r,s)}while(Fs)}if(so.current=Bo,e=he!==null&&he.next!==null,qn=0,me=he=ne=null,zo=!1,e)throw Error(I(300));return t}function Au(){var t=ii!==0;return ii=0,t}function It(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return me===null?ne.memoizedState=me=t:me=me.next=t,me}function mt(){if(he===null){var t=ne.alternate;t=t!==null?t.memoizedState:null}else t=he.next;var e=me===null?ne.memoizedState:me.next;if(e!==null)me=e,he=t;else{if(t===null)throw Error(I(310));he=t,t={memoizedState:he.memoizedState,baseState:he.baseState,baseQueue:he.baseQueue,queue:he.queue,next:null},me===null?ne.memoizedState=me=t:me=me.next=t}return me}function oi(t,e){return typeof e=="function"?e(t):e}function da(t){var e=mt(),n=e.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=t;var r=he,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var l=o=null,a=null,c=i;do{var u=c.lane;if((qn&u)===u)a!==null&&(a=a.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};a===null?(l=a=f,o=r):a=a.next=f,ne.lanes|=u,Wn|=u}c=c.next}while(c!==null&&c!==i);a===null?o=r:a.next=l,bt(r,e.memoizedState)||(Qe=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=a,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do i=s.lane,ne.lanes|=i,Wn|=i,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function ha(t){var e=mt(),n=e.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,i=e.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);bt(i,e.memoizedState)||(Qe=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,r]}function am(){}function cm(t,e){var n=ne,r=mt(),s=e(),i=!bt(r.memoizedState,s);if(i&&(r.memoizedState=s,Qe=!0),r=r.queue,Lu(dm.bind(null,n,r,t),[t]),r.getSnapshot!==e||i||me!==null&&me.memoizedState.tag&1){if(n.flags|=2048,li(9,fm.bind(null,n,r,s,e),void 0,null),ge===null)throw Error(I(349));qn&30||um(n,e,s)}return s}function um(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ne.updateQueue,e===null?(e={lastEffect:null,stores:null},ne.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function fm(t,e,n,r){e.value=n,e.getSnapshot=r,hm(e)&&pm(t)}function dm(t,e,n){return n(function(){hm(e)&&pm(t)})}function hm(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!bt(t,n)}catch{return!0}}function pm(t){var e=Yt(t,1);e!==null&&Et(e,t,1,-1)}function _d(t){var e=It();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:t},e.queue=t,t=t.dispatch=n1.bind(null,ne,t),[e.memoizedState,t]}function li(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=ne.updateQueue,e===null?(e={lastEffect:null,stores:null},ne.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function mm(){return mt().memoizedState}function io(t,e,n,r){var s=It();ne.flags|=t,s.memoizedState=li(1|e,n,void 0,r===void 0?null:r)}function ml(t,e,n,r){var s=mt();r=r===void 0?null:r;var i=void 0;if(he!==null){var o=he.memoizedState;if(i=o.destroy,r!==null&&Nu(r,o.deps)){s.memoizedState=li(e,n,i,r);return}}ne.flags|=t,s.memoizedState=li(1|e,n,i,r)}function kd(t,e){return io(8390656,8,t,e)}function Lu(t,e){return ml(2048,8,t,e)}function gm(t,e){return ml(4,2,t,e)}function ym(t,e){return ml(4,4,t,e)}function vm(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function wm(t,e,n){return n=n!=null?n.concat([t]):null,ml(4,4,vm.bind(null,e,t),n)}function Iu(){}function Sm(t,e){var n=mt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Nu(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function xm(t,e){var n=mt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Nu(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function _m(t,e,n){return qn&21?(bt(n,e)||(n=bp(),ne.lanes|=n,Wn|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Qe=!0),t.memoizedState=n)}function e1(t,e){var n=U;U=n!==0&&4>n?n:4,t(!0);var r=fa.transition;fa.transition={};try{t(!1),e()}finally{U=n,fa.transition=r}}function km(){return mt().memoizedState}function t1(t,e,n){var r=vn(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Em(t))bm(e,n);else if(n=tm(t,e,n,r),n!==null){var s=Re();Et(n,t,r,s),Tm(n,e,r)}}function n1(t,e,n){var r=vn(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Em(t))bm(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,bt(l,o)){var a=e.interleaved;a===null?(s.next=s,_u(e)):(s.next=a.next,a.next=s),e.interleaved=s;return}}catch{}finally{}n=tm(t,e,s,r),n!==null&&(s=Re(),Et(n,t,r,s),Tm(n,e,r))}}function Em(t){var e=t.alternate;return t===ne||e!==null&&e===ne}function bm(t,e){Fs=zo=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Tm(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,au(t,n)}}var Bo={readContext:pt,useCallback:Ee,useContext:Ee,useEffect:Ee,useImperativeHandle:Ee,useInsertionEffect:Ee,useLayoutEffect:Ee,useMemo:Ee,useReducer:Ee,useRef:Ee,useState:Ee,useDebugValue:Ee,useDeferredValue:Ee,useTransition:Ee,useMutableSource:Ee,useSyncExternalStore:Ee,useId:Ee,unstable_isNewReconciler:!1},r1={readContext:pt,useCallback:function(t,e){return It().memoizedState=[t,e===void 0?null:e],t},useContext:pt,useEffect:kd,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,io(4194308,4,vm.bind(null,e,t),n)},useLayoutEffect:function(t,e){return io(4194308,4,t,e)},useInsertionEffect:function(t,e){return io(4,2,t,e)},useMemo:function(t,e){var n=It();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=It();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=t1.bind(null,ne,t),[r.memoizedState,t]},useRef:function(t){var e=It();return t={current:t},e.memoizedState=t},useState:_d,useDebugValue:Iu,useDeferredValue:function(t){return It().memoizedState=t},useTransition:function(){var t=_d(!1),e=t[0];return t=e1.bind(null,t[1]),It().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ne,s=It();if(J){if(n===void 0)throw Error(I(407));n=n()}else{if(n=e(),ge===null)throw Error(I(349));qn&30||um(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,kd(dm.bind(null,r,i,t),[t]),r.flags|=2048,li(9,fm.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=It(),e=ge.identifierPrefix;if(J){var n=qt,r=Vt;n=(r&~(1<<32-kt(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=ii++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=Zw++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},s1={readContext:pt,useCallback:Sm,useContext:pt,useEffect:Lu,useImperativeHandle:wm,useInsertionEffect:gm,useLayoutEffect:ym,useMemo:xm,useReducer:da,useRef:mm,useState:function(){return da(oi)},useDebugValue:Iu,useDeferredValue:function(t){var e=mt();return _m(e,he.memoizedState,t)},useTransition:function(){var t=da(oi)[0],e=mt().memoizedState;return[t,e]},useMutableSource:am,useSyncExternalStore:cm,useId:km,unstable_isNewReconciler:!1},i1={readContext:pt,useCallback:Sm,useContext:pt,useEffect:Lu,useImperativeHandle:wm,useInsertionEffect:gm,useLayoutEffect:ym,useMemo:xm,useReducer:ha,useRef:mm,useState:function(){return ha(oi)},useDebugValue:Iu,useDeferredValue:function(t){var e=mt();return he===null?e.memoizedState=t:_m(e,he.memoizedState,t)},useTransition:function(){var t=ha(oi)[0],e=mt().memoizedState;return[t,e]},useMutableSource:am,useSyncExternalStore:cm,useId:km,unstable_isNewReconciler:!1};function Vr(t,e){try{var n="",r=e;do n+=Mv(r),r=r.return;while(r);var s=n}catch(i){s=`
|
|
40
|
-
Error generating stack: `+i.message+`
|
|
41
|
-
`+i.stack}return{value:t,source:e,stack:s,digest:null}}function pa(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function wc(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var o1=typeof WeakMap=="function"?WeakMap:Map;function Nm(t,e,n){n=Qt(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Ho||(Ho=!0,Ac=r),wc(t,e)},n}function Cm(t,e,n){n=Qt(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){wc(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){wc(t,e),typeof r!="function"&&(yn===null?yn=new Set([this]):yn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Ed(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new o1;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=S1.bind(null,t,e,n),e.then(t,t))}function bd(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Td(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Qt(-1,1),e.tag=2,gn(n,e,1))),n.lanes|=1),t)}var l1=en.ReactCurrentOwner,Qe=!1;function je(t,e,n,r){e.child=t===null?om(e,null,n,r):Ur(e,t.child,n,r)}function Nd(t,e,n,r,s){n=n.render;var i=e.ref;return Mr(e,s),r=Cu(t,e,n,r,i,s),n=Au(),t!==null&&!Qe?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Zt(t,e,s)):(J&&n&&gu(e),e.flags|=1,je(t,e,r,s),e.child)}function Cd(t,e,n,r,s){if(t===null){var i=n.type;return typeof i=="function"&&!Fu(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,Am(t,e,i,r,s)):(t=co(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Zs,n(o,r)&&t.ref===e.ref)return Zt(t,e,s)}return e.flags|=1,t=wn(i,r),t.ref=e.ref,t.return=e,e.child=t}function Am(t,e,n,r,s){if(t!==null){var i=t.memoizedProps;if(Zs(i,r)&&t.ref===e.ref)if(Qe=!1,e.pendingProps=r=i,(t.lanes&s)!==0)t.flags&131072&&(Qe=!0);else return e.lanes=t.lanes,Zt(t,e,s)}return Sc(t,e,n,r,s)}function Lm(t,e,n){var r=e.pendingProps,s=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},V(_r,Ye),Ye|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,V(_r,Ye),Ye|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,V(_r,Ye),Ye|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,V(_r,Ye),Ye|=r;return je(t,e,s,n),e.child}function Im(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Sc(t,e,n,r,s){var i=Ge(n)?Hn:Ae.current;return i=zr(e,i),Mr(e,s),n=Cu(t,e,n,r,i,s),r=Au(),t!==null&&!Qe?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Zt(t,e,s)):(J&&r&&gu(e),e.flags|=1,je(t,e,n,s),e.child)}function Ad(t,e,n,r,s){if(Ge(n)){var i=!0;Mo(e)}else i=!1;if(Mr(e,s),e.stateNode===null)oo(t,e),sm(e,n,r),vc(e,n,r,s),r=!0;else if(t===null){var o=e.stateNode,l=e.memoizedProps;o.props=l;var a=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=pt(c):(c=Ge(n)?Hn:Ae.current,c=zr(e,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||a!==c)&&Sd(e,o,r,c),sn=!1;var d=e.memoizedState;o.state=d,Do(e,r,o,s),a=e.memoizedState,l!==r||d!==a||Xe.current||sn?(typeof u=="function"&&(yc(e,n,u,r),a=e.memoizedState),(l=sn||wd(e,n,l,r,d,a,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=a),o.props=r,o.state=a,o.context=c,r=l):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,nm(t,e),l=e.memoizedProps,c=e.type===e.elementType?l:wt(e.type,l),o.props=c,f=e.pendingProps,d=o.context,a=n.contextType,typeof a=="object"&&a!==null?a=pt(a):(a=Ge(n)?Hn:Ae.current,a=zr(e,a));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||d!==a)&&Sd(e,o,r,a),sn=!1,d=e.memoizedState,o.state=d,Do(e,r,o,s);var v=e.memoizedState;l!==f||d!==v||Xe.current||sn?(typeof h=="function"&&(yc(e,n,h,r),v=e.memoizedState),(c=sn||wd(e,n,c,r,d,v,a)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,a)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=v),o.props=r,o.state=v,o.context=a,r=c):(typeof o.componentDidUpdate!="function"||l===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return xc(t,e,n,r,i,s)}function xc(t,e,n,r,s,i){Im(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return s&&pd(e,n,!1),Zt(t,e,i);r=e.stateNode,l1.current=e;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=Ur(e,t.child,null,i),e.child=Ur(e,null,l,i)):je(t,e,l,i),e.memoizedState=r.state,s&&pd(e,n,!0),e.child}function jm(t){var e=t.stateNode;e.pendingContext?hd(t,e.pendingContext,e.pendingContext!==e.context):e.context&&hd(t,e.context,!1),Eu(t,e.containerInfo)}function Ld(t,e,n,r,s){return Br(),vu(s),e.flags|=256,je(t,e,n,r),e.child}var _c={dehydrated:null,treeContext:null,retryLane:0};function kc(t){return{baseLanes:t,cachePool:null,transitions:null}}function Mm(t,e,n){var r=e.pendingProps,s=ee.current,i=!1,o=(e.flags&128)!==0,l;if((l=o)||(l=t!==null&&t.memoizedState===null?!1:(s&2)!==0),l?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),V(ee,s&1),t===null)return mc(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,i?(r=e.mode,i=e.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=vl(o,r,0,null),t=Bn(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=kc(n),e.memoizedState=_c,t):ju(e,o));if(s=t.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return a1(t,e,o,r,l,s,n);if(i){i=r.fallback,o=e.mode,s=t.child,l=s.sibling;var a={mode:"hidden",children:r.children};return!(o&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=a,e.deletions=null):(r=wn(s,a),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=wn(l,i):(i=Bn(i,o,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,o=t.child.memoizedState,o=o===null?kc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~n,e.memoizedState=_c,r}return i=t.child,t=i.sibling,r=wn(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function ju(t,e){return e=vl({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Ri(t,e,n,r){return r!==null&&vu(r),Ur(e,t.child,null,n),t=ju(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function a1(t,e,n,r,s,i,o){if(n)return e.flags&256?(e.flags&=-257,r=pa(Error(I(422))),Ri(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,s=e.mode,r=vl({mode:"visible",children:r.children},s,0,null),i=Bn(i,s,o,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&Ur(e,t.child,null,o),e.child.memoizedState=kc(o),e.memoizedState=_c,i);if(!(e.mode&1))return Ri(t,e,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(I(419)),r=pa(i,r,void 0),Ri(t,e,o,r)}if(l=(o&t.childLanes)!==0,Qe||l){if(r=ge,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Yt(t,s),Et(r,t,s,-1))}return Du(),r=pa(Error(I(421))),Ri(t,e,o,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=x1.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,et=mn(s.nextSibling),nt=e,J=!0,xt=null,t!==null&&(lt[at++]=Vt,lt[at++]=qt,lt[at++]=Vn,Vt=t.id,qt=t.overflow,Vn=e),e=ju(e,r.children),e.flags|=4096,e)}function Id(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),gc(t.return,e,n)}function ma(t,e,n,r,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Om(t,e,n){var r=e.pendingProps,s=r.revealOrder,i=r.tail;if(je(t,e,r.children,n),r=ee.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Id(t,n,e);else if(t.tag===19)Id(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(V(ee,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&Fo(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),ma(e,!1,s,n,i);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Fo(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}ma(e,!0,n,null,i);break;case"together":ma(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function oo(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Zt(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Wn|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(I(153));if(e.child!==null){for(t=e.child,n=wn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=wn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function c1(t,e,n){switch(e.tag){case 3:jm(e),Br();break;case 5:lm(e);break;case 1:Ge(e.type)&&Mo(e);break;case 4:Eu(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;V(Po,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(V(ee,ee.current&1),e.flags|=128,null):n&e.child.childLanes?Mm(t,e,n):(V(ee,ee.current&1),t=Zt(t,e,n),t!==null?t.sibling:null);V(ee,ee.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return Om(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),V(ee,ee.current),r)break;return null;case 22:case 23:return e.lanes=0,Lm(t,e,n)}return Zt(t,e,n)}var $m,Ec,Pm,Rm;$m=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ec=function(){};Pm=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,Pn(Ot.current);var i=null;switch(n){case"input":s=Wa(t,s),r=Wa(t,r),i=[];break;case"select":s=se({},s,{value:void 0}),r=se({},r,{value:void 0}),i=[];break;case"textarea":s=Xa(t,s),r=Xa(t,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Io)}Ja(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var l=s[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ws.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var a=r[c];if(l=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&a!==l&&(a!=null||l!=null))if(c==="style")if(l){for(o in l)!l.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in a)a.hasOwnProperty(o)&&l[o]!==a[o]&&(n||(n={}),n[o]=a[o])}else n||(i||(i=[]),i.push(c,n)),n=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(i=i||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ws.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&K("scroll",t),i||l===a||(i=[])):(i=i||[]).push(c,a))}n&&(i=i||[]).push("style",n);var c=i;(e.updateQueue=c)&&(e.flags|=4)}};Rm=function(t,e,n,r){n!==r&&(e.flags|=4)};function gs(t,e){if(!J)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function be(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function u1(t,e,n){var r=e.pendingProps;switch(yu(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return be(e),null;case 1:return Ge(e.type)&&jo(),be(e),null;case 3:return r=e.stateNode,Hr(),Q(Xe),Q(Ae),Tu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&($i(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,xt!==null&&(jc(xt),xt=null))),Ec(t,e),be(e),null;case 5:bu(e);var s=Pn(si.current);if(n=e.type,t!==null&&e.stateNode!=null)Pm(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(I(166));return be(e),null}if(t=Pn(Ot.current),$i(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;switch(r[jt]=e,r[ni]=i,t=(e.mode&1)!==0,n){case"dialog":K("cancel",r),K("close",r);break;case"iframe":case"object":case"embed":K("load",r);break;case"video":case"audio":for(s=0;s<Cs.length;s++)K(Cs[s],r);break;case"source":K("error",r);break;case"img":case"image":case"link":K("error",r),K("load",r);break;case"details":K("toggle",r);break;case"input":zf(r,i),K("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},K("invalid",r);break;case"textarea":Uf(r,i),K("invalid",r)}Ja(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var l=i[o];o==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&Oi(r.textContent,l,t),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Oi(r.textContent,l,t),s=["children",""+l]):Ws.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&K("scroll",r)}switch(n){case"input":Ti(r),Bf(r,i,!0);break;case"textarea":Ti(r),Hf(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Io)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=up(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[jt]=e,t[ni]=r,$m(t,e,!1,!1),e.stateNode=t;e:{switch(o=Ya(n,r),n){case"dialog":K("cancel",t),K("close",t),s=r;break;case"iframe":case"object":case"embed":K("load",t),s=r;break;case"video":case"audio":for(s=0;s<Cs.length;s++)K(Cs[s],t);s=r;break;case"source":K("error",t),s=r;break;case"img":case"image":case"link":K("error",t),K("load",t),s=r;break;case"details":K("toggle",t),s=r;break;case"input":zf(t,r),s=Wa(t,r),K("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=se({},r,{value:void 0}),K("invalid",t);break;case"textarea":Uf(t,r),s=Xa(t,r),K("invalid",t);break;default:s=r}Ja(n,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var a=l[i];i==="style"?hp(t,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&fp(t,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Ks(t,a):typeof a=="number"&&Ks(t,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ws.hasOwnProperty(i)?a!=null&&i==="onScroll"&&K("scroll",t):a!=null&&nu(t,i,a,o))}switch(n){case"input":Ti(t),Bf(t,r,!1);break;case"textarea":Ti(t),Hf(t);break;case"option":r.value!=null&&t.setAttribute("value",""+_n(r.value));break;case"select":t.multiple=!!r.multiple,i=r.value,i!=null?Ar(t,!!r.multiple,i,!1):r.defaultValue!=null&&Ar(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Io)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return be(e),null;case 6:if(t&&e.stateNode!=null)Rm(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(I(166));if(n=Pn(si.current),Pn(Ot.current),$i(e)){if(r=e.stateNode,n=e.memoizedProps,r[jt]=e,(i=r.nodeValue!==n)&&(t=nt,t!==null))switch(t.tag){case 3:Oi(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Oi(r.nodeValue,n,(t.mode&1)!==0)}i&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[jt]=e,e.stateNode=r}return be(e),null;case 13:if(Q(ee),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(J&&et!==null&&e.mode&1&&!(e.flags&128))em(),Br(),e.flags|=98560,i=!1;else if(i=$i(e),r!==null&&r.dehydrated!==null){if(t===null){if(!i)throw Error(I(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(I(317));i[jt]=e}else Br(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;be(e),i=!1}else xt!==null&&(jc(xt),xt=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||ee.current&1?pe===0&&(pe=3):Du())),e.updateQueue!==null&&(e.flags|=4),be(e),null);case 4:return Hr(),Ec(t,e),t===null&&ei(e.stateNode.containerInfo),be(e),null;case 10:return xu(e.type._context),be(e),null;case 17:return Ge(e.type)&&jo(),be(e),null;case 19:if(Q(ee),i=e.memoizedState,i===null)return be(e),null;if(r=(e.flags&128)!==0,o=i.rendering,o===null)if(r)gs(i,!1);else{if(pe!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Fo(t),o!==null){for(e.flags|=128,gs(i,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)i=n,t=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return V(ee,ee.current&1|2),e.child}t=t.sibling}i.tail!==null&&oe()>qr&&(e.flags|=128,r=!0,gs(i,!1),e.lanes=4194304)}else{if(!r)if(t=Fo(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),gs(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!J)return be(e),null}else 2*oe()-i.renderingStartTime>qr&&n!==1073741824&&(e.flags|=128,r=!0,gs(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=oe(),e.sibling=null,n=ee.current,V(ee,r?n&1|2:n&1),e):(be(e),null);case 22:case 23:return Ru(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Ye&1073741824&&(be(e),e.subtreeFlags&6&&(e.flags|=8192)):be(e),null;case 24:return null;case 25:return null}throw Error(I(156,e.tag))}function f1(t,e){switch(yu(e),e.tag){case 1:return Ge(e.type)&&jo(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Hr(),Q(Xe),Q(Ae),Tu(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return bu(e),null;case 13:if(Q(ee),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(I(340));Br()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Q(ee),null;case 4:return Hr(),null;case 10:return xu(e.type._context),null;case 22:case 23:return Ru(),null;case 24:return null;default:return null}}var Di=!1,Ne=!1,d1=typeof WeakSet=="function"?WeakSet:Set,O=null;function xr(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ie(t,e,r)}else n.current=null}function bc(t,e,n){try{n()}catch(r){ie(t,e,r)}}var jd=!1;function h1(t,e){if(ac=Co,t=Bp(),mu(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,c=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==n||s!==0&&f.nodeType!==3||(l=o+s),f!==i||r!==0&&f.nodeType!==3||(a=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===n&&++c===s&&(l=o),d===i&&++u===r&&(a=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(cc={focusedElem:t,selectionRange:n},Co=!1,O=e;O!==null;)if(e=O,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,O=t;else for(;O!==null;){e=O;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,w=v.memoizedState,y=e.stateNode,g=y.getSnapshotBeforeUpdate(e.elementType===e.type?m:wt(e.type,m),w);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(x){ie(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,O=t;break}O=e.return}return v=jd,jd=!1,v}function zs(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&bc(e,n,i)}s=s.next}while(s!==r)}}function gl(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Tc(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Dm(t){var e=t.alternate;e!==null&&(t.alternate=null,Dm(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[jt],delete e[ni],delete e[dc],delete e[Xw],delete e[Gw])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Fm(t){return t.tag===5||t.tag===3||t.tag===4}function Md(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Fm(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.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 Nc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Io));else if(r!==4&&(t=t.child,t!==null))for(Nc(t,e,n),t=t.sibling;t!==null;)Nc(t,e,n),t=t.sibling}function Cc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Cc(t,e,n),t=t.sibling;t!==null;)Cc(t,e,n),t=t.sibling}var ve=null,St=!1;function nn(t,e,n){for(n=n.child;n!==null;)zm(t,e,n),n=n.sibling}function zm(t,e,n){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(al,n)}catch{}switch(n.tag){case 5:Ne||xr(n,e);case 6:var r=ve,s=St;ve=null,nn(t,e,n),ve=r,St=s,ve!==null&&(St?(t=ve,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):ve.removeChild(n.stateNode));break;case 18:ve!==null&&(St?(t=ve,n=n.stateNode,t.nodeType===8?aa(t.parentNode,n):t.nodeType===1&&aa(t,n),Js(t)):aa(ve,n.stateNode));break;case 4:r=ve,s=St,ve=n.stateNode.containerInfo,St=!0,nn(t,e,n),ve=r,St=s;break;case 0:case 11:case 14:case 15:if(!Ne&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&bc(n,e,o),s=s.next}while(s!==r)}nn(t,e,n);break;case 1:if(!Ne&&(xr(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ie(n,e,l)}nn(t,e,n);break;case 21:nn(t,e,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,nn(t,e,n),Ne=r):nn(t,e,n);break;default:nn(t,e,n)}}function Od(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new d1),e.forEach(function(r){var s=_1.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function yt(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=t,o=e,l=o;e:for(;l!==null;){switch(l.tag){case 5:ve=l.stateNode,St=!1;break e;case 3:ve=l.stateNode.containerInfo,St=!0;break e;case 4:ve=l.stateNode.containerInfo,St=!0;break e}l=l.return}if(ve===null)throw Error(I(160));zm(i,o,s),ve=null,St=!1;var a=s.alternate;a!==null&&(a.return=null),s.return=null}catch(c){ie(s,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Bm(e,t),e=e.sibling}function Bm(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(yt(e,t),At(t),r&4){try{zs(3,t,t.return),gl(3,t)}catch(m){ie(t,t.return,m)}try{zs(5,t,t.return)}catch(m){ie(t,t.return,m)}}break;case 1:yt(e,t),At(t),r&512&&n!==null&&xr(n,n.return);break;case 5:if(yt(e,t),At(t),r&512&&n!==null&&xr(n,n.return),t.flags&32){var s=t.stateNode;try{Ks(s,"")}catch(m){ie(t,t.return,m)}}if(r&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=n!==null?n.memoizedProps:i,l=t.type,a=t.updateQueue;if(t.updateQueue=null,a!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&ap(s,i),Ya(l,o);var c=Ya(l,i);for(o=0;o<a.length;o+=2){var u=a[o],f=a[o+1];u==="style"?hp(s,f):u==="dangerouslySetInnerHTML"?fp(s,f):u==="children"?Ks(s,f):nu(s,u,f,c)}switch(l){case"input":Ka(s,i);break;case"textarea":cp(s,i);break;case"select":var d=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?Ar(s,!!i.multiple,h,!1):d!==!!i.multiple&&(i.defaultValue!=null?Ar(s,!!i.multiple,i.defaultValue,!0):Ar(s,!!i.multiple,i.multiple?[]:"",!1))}s[ni]=i}catch(m){ie(t,t.return,m)}}break;case 6:if(yt(e,t),At(t),r&4){if(t.stateNode===null)throw Error(I(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(m){ie(t,t.return,m)}}break;case 3:if(yt(e,t),At(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Js(e.containerInfo)}catch(m){ie(t,t.return,m)}break;case 4:yt(e,t),At(t);break;case 13:yt(e,t),At(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||($u=oe())),r&4&&Od(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(Ne=(c=Ne)||u,yt(e,t),Ne=c):yt(e,t),At(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(O=t,u=t.child;u!==null;){for(f=O=u;O!==null;){switch(d=O,h=d.child,d.tag){case 0:case 11:case 14:case 15:zs(4,d,d.return);break;case 1:xr(d,d.return);var v=d.stateNode;if(typeof v.componentWillUnmount=="function"){r=d,n=d.return;try{e=r,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(m){ie(r,n,m)}}break;case 5:xr(d,d.return);break;case 22:if(d.memoizedState!==null){Pd(f);continue}}h!==null?(h.return=d,O=h):Pd(f)}u=u.sibling}e:for(u=null,f=t;;){if(f.tag===5){if(u===null){u=f;try{s=f.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=f.stateNode,a=f.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=dp("display",o))}catch(m){ie(t,t.return,m)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(m){ie(t,t.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:yt(e,t),At(t),r&4&&Od(t);break;case 21:break;default:yt(e,t),At(t)}}function At(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(Fm(n)){var r=n;break e}n=n.return}throw Error(I(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ks(s,""),r.flags&=-33);var i=Md(t);Cc(t,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,l=Md(t);Nc(t,l,o);break;default:throw Error(I(161))}}catch(a){ie(t,t.return,a)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function p1(t,e,n){O=t,Um(t)}function Um(t,e,n){for(var r=(t.mode&1)!==0;O!==null;){var s=O,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Di;if(!o){var l=s.alternate,a=l!==null&&l.memoizedState!==null||Ne;l=Di;var c=Ne;if(Di=o,(Ne=a)&&!c)for(O=s;O!==null;)o=O,a=o.child,o.tag===22&&o.memoizedState!==null?Rd(s):a!==null?(a.return=o,O=a):Rd(s);for(;i!==null;)O=i,Um(i),i=i.sibling;O=s,Di=l,Ne=c}$d(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,O=i):$d(t)}}function $d(t){for(;O!==null;){var e=O;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ne||gl(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Ne)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:wt(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&vd(e,i,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}vd(e,o,n)}break;case 5:var l=e.stateNode;if(n===null&&e.flags&4){n=l;var a=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&Js(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}Ne||e.flags&512&&Tc(e)}catch(d){ie(e,e.return,d)}}if(e===t){O=null;break}if(n=e.sibling,n!==null){n.return=e.return,O=n;break}O=e.return}}function Pd(t){for(;O!==null;){var e=O;if(e===t){O=null;break}var n=e.sibling;if(n!==null){n.return=e.return,O=n;break}O=e.return}}function Rd(t){for(;O!==null;){var e=O;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{gl(4,e)}catch(a){ie(e,n,a)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(a){ie(e,s,a)}}var i=e.return;try{Tc(e)}catch(a){ie(e,i,a)}break;case 5:var o=e.return;try{Tc(e)}catch(a){ie(e,o,a)}}}catch(a){ie(e,e.return,a)}if(e===t){O=null;break}var l=e.sibling;if(l!==null){l.return=e.return,O=l;break}O=e.return}}var m1=Math.ceil,Uo=en.ReactCurrentDispatcher,Mu=en.ReactCurrentOwner,dt=en.ReactCurrentBatchConfig,B=0,ge=null,fe=null,xe=0,Ye=0,_r=Nn(0),pe=0,ai=null,Wn=0,yl=0,Ou=0,Bs=null,He=null,$u=0,qr=1/0,Ut=null,Ho=!1,Ac=null,yn=null,Fi=!1,fn=null,Vo=0,Us=0,Lc=null,lo=-1,ao=0;function Re(){return B&6?oe():lo!==-1?lo:lo=oe()}function vn(t){return t.mode&1?B&2&&xe!==0?xe&-xe:Yw.transition!==null?(ao===0&&(ao=bp()),ao):(t=U,t!==0||(t=window.event,t=t===void 0?16:jp(t.type)),t):1}function Et(t,e,n,r){if(50<Us)throw Us=0,Lc=null,Error(I(185));mi(t,n,r),(!(B&2)||t!==ge)&&(t===ge&&(!(B&2)&&(yl|=n),pe===4&&cn(t,xe)),Je(t,r),n===1&&B===0&&!(e.mode&1)&&(qr=oe()+500,hl&&Cn()))}function Je(t,e){var n=t.callbackNode;Yv(t,e);var r=No(t,t===ge?xe:0);if(r===0)n!==null&&Wf(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Wf(n),e===1)t.tag===0?Jw(Dd.bind(null,t)):Jp(Dd.bind(null,t)),Kw(function(){!(B&6)&&Cn()}),n=null;else{switch(Tp(r)){case 1:n=lu;break;case 4:n=kp;break;case 16:n=To;break;case 536870912:n=Ep;break;default:n=To}n=Gm(n,Hm.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Hm(t,e){if(lo=-1,ao=0,B&6)throw Error(I(327));var n=t.callbackNode;if(Or()&&t.callbackNode!==n)return null;var r=No(t,t===ge?xe:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=qo(t,r);else{e=r;var s=B;B|=2;var i=qm();(ge!==t||xe!==e)&&(Ut=null,qr=oe()+500,zn(t,e));do try{v1();break}catch(l){Vm(t,l)}while(!0);Su(),Uo.current=i,B=s,fe!==null?e=0:(ge=null,xe=0,e=pe)}if(e!==0){if(e===2&&(s=rc(t),s!==0&&(r=s,e=Ic(t,s))),e===1)throw n=ai,zn(t,0),cn(t,r),Je(t,oe()),n;if(e===6)cn(t,r);else{if(s=t.current.alternate,!(r&30)&&!g1(s)&&(e=qo(t,r),e===2&&(i=rc(t),i!==0&&(r=i,e=Ic(t,i))),e===1))throw n=ai,zn(t,0),cn(t,r),Je(t,oe()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(I(345));case 2:Ln(t,He,Ut);break;case 3:if(cn(t,r),(r&130023424)===r&&(e=$u+500-oe(),10<e)){if(No(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){Re(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=fc(Ln.bind(null,t,He,Ut),e);break}Ln(t,He,Ut);break;case 4:if(cn(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var o=31-kt(r);i=1<<o,o=e[o],o>s&&(s=o),r&=~i}if(r=s,r=oe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*m1(r/1960))-r,10<r){t.timeoutHandle=fc(Ln.bind(null,t,He,Ut),r);break}Ln(t,He,Ut);break;case 5:Ln(t,He,Ut);break;default:throw Error(I(329))}}}return Je(t,oe()),t.callbackNode===n?Hm.bind(null,t):null}function Ic(t,e){var n=Bs;return t.current.memoizedState.isDehydrated&&(zn(t,e).flags|=256),t=qo(t,e),t!==2&&(e=He,He=n,e!==null&&jc(e)),t}function jc(t){He===null?He=t:He.push.apply(He,t)}function g1(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!bt(i(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function cn(t,e){for(e&=~Ou,e&=~yl,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-kt(e),r=1<<n;t[n]=-1,e&=~r}}function Dd(t){if(B&6)throw Error(I(327));Or();var e=No(t,0);if(!(e&1))return Je(t,oe()),null;var n=qo(t,e);if(t.tag!==0&&n===2){var r=rc(t);r!==0&&(e=r,n=Ic(t,r))}if(n===1)throw n=ai,zn(t,0),cn(t,e),Je(t,oe()),n;if(n===6)throw Error(I(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Ln(t,He,Ut),Je(t,oe()),null}function Pu(t,e){var n=B;B|=1;try{return t(e)}finally{B=n,B===0&&(qr=oe()+500,hl&&Cn())}}function Kn(t){fn!==null&&fn.tag===0&&!(B&6)&&Or();var e=B;B|=1;var n=dt.transition,r=U;try{if(dt.transition=null,U=1,t)return t()}finally{U=r,dt.transition=n,B=e,!(B&6)&&Cn()}}function Ru(){Ye=_r.current,Q(_r)}function zn(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,Ww(n)),fe!==null)for(n=fe.return;n!==null;){var r=n;switch(yu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&jo();break;case 3:Hr(),Q(Xe),Q(Ae),Tu();break;case 5:bu(r);break;case 4:Hr();break;case 13:Q(ee);break;case 19:Q(ee);break;case 10:xu(r.type._context);break;case 22:case 23:Ru()}n=n.return}if(ge=t,fe=t=wn(t.current,null),xe=Ye=e,pe=0,ai=null,Ou=yl=Wn=0,He=Bs=null,$n!==null){for(e=0;e<$n.length;e++)if(n=$n[e],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}$n=null}return t}function Vm(t,e){do{var n=fe;try{if(Su(),so.current=Bo,zo){for(var r=ne.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}zo=!1}if(qn=0,me=he=ne=null,Fs=!1,ii=0,Mu.current=null,n===null||n.return===null){pe=1,ai=e,fe=null;break}e:{var i=t,o=n.return,l=n,a=e;if(e=xe,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var c=a,u=l,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var d=u.alternate;d?(u.updateQueue=d.updateQueue,u.memoizedState=d.memoizedState,u.lanes=d.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=bd(o);if(h!==null){h.flags&=-257,Td(h,o,l,i,e),h.mode&1&&Ed(i,c,e),e=h,a=c;var v=e.updateQueue;if(v===null){var m=new Set;m.add(a),e.updateQueue=m}else v.add(a);break e}else{if(!(e&1)){Ed(i,c,e),Du();break e}a=Error(I(426))}}else if(J&&l.mode&1){var w=bd(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Td(w,o,l,i,e),vu(Vr(a,l));break e}}i=a=Vr(a,l),pe!==4&&(pe=2),Bs===null?Bs=[i]:Bs.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var y=Nm(i,a,e);yd(i,y);break e;case 1:l=a;var g=i.type,S=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(yn===null||!yn.has(S)))){i.flags|=65536,e&=-e,i.lanes|=e;var x=Cm(i,l,e);yd(i,x);break e}}i=i.return}while(i!==null)}Km(n)}catch(_){e=_,fe===n&&n!==null&&(fe=n=n.return);continue}break}while(!0)}function qm(){var t=Uo.current;return Uo.current=Bo,t===null?Bo:t}function Du(){(pe===0||pe===3||pe===2)&&(pe=4),ge===null||!(Wn&268435455)&&!(yl&268435455)||cn(ge,xe)}function qo(t,e){var n=B;B|=2;var r=qm();(ge!==t||xe!==e)&&(Ut=null,zn(t,e));do try{y1();break}catch(s){Vm(t,s)}while(!0);if(Su(),B=n,Uo.current=r,fe!==null)throw Error(I(261));return ge=null,xe=0,pe}function y1(){for(;fe!==null;)Wm(fe)}function v1(){for(;fe!==null&&!Hv();)Wm(fe)}function Wm(t){var e=Xm(t.alternate,t,Ye);t.memoizedProps=t.pendingProps,e===null?Km(t):fe=e,Mu.current=null}function Km(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=f1(n,e),n!==null){n.flags&=32767,fe=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{pe=6,fe=null;return}}else if(n=u1(n,e,Ye),n!==null){fe=n;return}if(e=e.sibling,e!==null){fe=e;return}fe=e=t}while(e!==null);pe===0&&(pe=5)}function Ln(t,e,n){var r=U,s=dt.transition;try{dt.transition=null,U=1,w1(t,e,n,r)}finally{dt.transition=s,U=r}return null}function w1(t,e,n,r){do Or();while(fn!==null);if(B&6)throw Error(I(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(I(177));t.callbackNode=null,t.callbackPriority=0;var i=n.lanes|n.childLanes;if(Zv(t,i),t===ge&&(fe=ge=null,xe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Fi||(Fi=!0,Gm(To,function(){return Or(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=dt.transition,dt.transition=null;var o=U;U=1;var l=B;B|=4,Mu.current=null,h1(t,n),Bm(n,t),Fw(cc),Co=!!ac,cc=ac=null,t.current=n,p1(n),Vv(),B=l,U=o,dt.transition=i}else t.current=n;if(Fi&&(Fi=!1,fn=t,Vo=s),i=t.pendingLanes,i===0&&(yn=null),Kv(n.stateNode),Je(t,oe()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ho)throw Ho=!1,t=Ac,Ac=null,t;return Vo&1&&t.tag!==0&&Or(),i=t.pendingLanes,i&1?t===Lc?Us++:(Us=0,Lc=t):Us=0,Cn(),null}function Or(){if(fn!==null){var t=Tp(Vo),e=dt.transition,n=U;try{if(dt.transition=null,U=16>t?16:t,fn===null)var r=!1;else{if(t=fn,fn=null,Vo=0,B&6)throw Error(I(331));var s=B;for(B|=4,O=t.current;O!==null;){var i=O,o=i.child;if(O.flags&16){var l=i.deletions;if(l!==null){for(var a=0;a<l.length;a++){var c=l[a];for(O=c;O!==null;){var u=O;switch(u.tag){case 0:case 11:case 15:zs(8,u,i)}var f=u.child;if(f!==null)f.return=u,O=f;else for(;O!==null;){u=O;var d=u.sibling,h=u.return;if(Dm(u),u===c){O=null;break}if(d!==null){d.return=h,O=d;break}O=h}}}var v=i.alternate;if(v!==null){var m=v.child;if(m!==null){v.child=null;do{var w=m.sibling;m.sibling=null,m=w}while(m!==null)}}O=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,O=o;else e:for(;O!==null;){if(i=O,i.flags&2048)switch(i.tag){case 0:case 11:case 15:zs(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,O=y;break e}O=i.return}}var g=t.current;for(O=g;O!==null;){o=O;var S=o.child;if(o.subtreeFlags&2064&&S!==null)S.return=o,O=S;else e:for(o=g;O!==null;){if(l=O,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:gl(9,l)}}catch(_){ie(l,l.return,_)}if(l===o){O=null;break e}var x=l.sibling;if(x!==null){x.return=l.return,O=x;break e}O=l.return}}if(B=s,Cn(),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(al,t)}catch{}r=!0}return r}finally{U=n,dt.transition=e}}return!1}function Fd(t,e,n){e=Vr(n,e),e=Nm(t,e,1),t=gn(t,e,1),e=Re(),t!==null&&(mi(t,1,e),Je(t,e))}function ie(t,e,n){if(t.tag===3)Fd(t,t,n);else for(;e!==null;){if(e.tag===3){Fd(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r))){t=Vr(n,t),t=Cm(e,t,1),e=gn(e,t,1),t=Re(),e!==null&&(mi(e,1,t),Je(e,t));break}}e=e.return}}function S1(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Re(),t.pingedLanes|=t.suspendedLanes&n,ge===t&&(xe&n)===n&&(pe===4||pe===3&&(xe&130023424)===xe&&500>oe()-$u?zn(t,0):Ou|=n),Je(t,e)}function Qm(t,e){e===0&&(t.mode&1?(e=Ai,Ai<<=1,!(Ai&130023424)&&(Ai=4194304)):e=1);var n=Re();t=Yt(t,e),t!==null&&(mi(t,e,n),Je(t,n))}function x1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Qm(t,n)}function _1(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(e),Qm(t,n)}var Xm;Xm=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Xe.current)Qe=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Qe=!1,c1(t,e,n);Qe=!!(t.flags&131072)}else Qe=!1,J&&e.flags&1048576&&Yp(e,$o,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;oo(t,e),t=e.pendingProps;var s=zr(e,Ae.current);Mr(e,n),s=Cu(null,e,r,t,s,n);var i=Au();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ge(r)?(i=!0,Mo(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ku(e),s.updater=pl,e.stateNode=s,s._reactInternals=e,vc(e,r,t,n),e=xc(null,e,r,!0,i,n)):(e.tag=0,J&&i&&gu(e),je(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(oo(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=E1(r),t=wt(r,t),s){case 0:e=Sc(null,e,r,t,n);break e;case 1:e=Ad(null,e,r,t,n);break e;case 11:e=Nd(null,e,r,t,n);break e;case 14:e=Cd(null,e,r,wt(r.type,t),n);break e}throw Error(I(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:wt(r,s),Sc(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:wt(r,s),Ad(t,e,r,s,n);case 3:e:{if(jm(e),t===null)throw Error(I(387));r=e.pendingProps,i=e.memoizedState,s=i.element,nm(t,e),Do(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Vr(Error(I(423)),e),e=Ld(t,e,r,n,s);break e}else if(r!==s){s=Vr(Error(I(424)),e),e=Ld(t,e,r,n,s);break e}else for(et=mn(e.stateNode.containerInfo.firstChild),nt=e,J=!0,xt=null,n=om(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Br(),r===s){e=Zt(t,e,n);break e}je(t,e,r,n)}e=e.child}return e;case 5:return lm(e),t===null&&mc(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,uc(r,s)?o=null:i!==null&&uc(r,i)&&(e.flags|=32),Im(t,e),je(t,e,o,n),e.child;case 6:return t===null&&mc(e),null;case 13:return Mm(t,e,n);case 4:return Eu(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Ur(e,null,r,n):je(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:wt(r,s),Nd(t,e,r,s,n);case 7:return je(t,e,e.pendingProps,n),e.child;case 8:return je(t,e,e.pendingProps.children,n),e.child;case 12:return je(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,V(Po,r._currentValue),r._currentValue=o,i!==null)if(bt(i.value,o)){if(i.children===s.children&&!Xe.current){e=Zt(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Qt(-1,n&-n),a.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?a.next=a:(a.next=u.next,u.next=a),c.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),gc(i.return,n,e),l.lanes|=n;break}a=a.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(I(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),gc(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}je(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,Mr(e,n),s=pt(s),r=r(s),e.flags|=1,je(t,e,r,n),e.child;case 14:return r=e.type,s=wt(r,e.pendingProps),s=wt(r.type,s),Cd(t,e,r,s,n);case 15:return Am(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:wt(r,s),oo(t,e),e.tag=1,Ge(r)?(t=!0,Mo(e)):t=!1,Mr(e,n),sm(e,r,s),vc(e,r,s,n),xc(null,e,r,!0,t,n);case 19:return Om(t,e,n);case 22:return Lm(t,e,n)}throw Error(I(156,e.tag))};function Gm(t,e){return _p(t,e)}function k1(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ft(t,e,n,r){return new k1(t,e,n,r)}function Fu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function E1(t){if(typeof t=="function")return Fu(t)?1:0;if(t!=null){if(t=t.$$typeof,t===su)return 11;if(t===iu)return 14}return 2}function wn(t,e){var n=t.alternate;return n===null?(n=ft(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function co(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")Fu(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case dr:return Bn(n.children,s,i,e);case ru:o=8,s|=8;break;case Ua:return t=ft(12,n,e,s|2),t.elementType=Ua,t.lanes=i,t;case Ha:return t=ft(13,n,e,s),t.elementType=Ha,t.lanes=i,t;case Va:return t=ft(19,n,e,s),t.elementType=Va,t.lanes=i,t;case ip:return vl(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case rp:o=10;break e;case sp:o=9;break e;case su:o=11;break e;case iu:o=14;break e;case rn:o=16,r=null;break e}throw Error(I(130,t==null?t:typeof t,""))}return e=ft(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function Bn(t,e,n,r){return t=ft(7,t,r,e),t.lanes=n,t}function vl(t,e,n,r){return t=ft(22,t,r,e),t.elementType=ip,t.lanes=n,t.stateNode={isHidden:!1},t}function ga(t,e,n){return t=ft(6,t,null,e),t.lanes=n,t}function ya(t,e,n){return e=ft(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function b1(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jl(0),this.expirationTimes=Jl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function zu(t,e,n,r,s,i,o,l,a){return t=new b1(t,e,n,l,a),e===1?(e=1,i===!0&&(e|=8)):e=0,i=ft(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ku(i),t}function T1(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fr,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function Jm(t){if(!t)return kn;t=t._reactInternals;e:{if(Jn(t)!==t||t.tag!==1)throw Error(I(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Ge(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(I(171))}if(t.tag===1){var n=t.type;if(Ge(n))return Gp(t,n,e)}return e}function Ym(t,e,n,r,s,i,o,l,a){return t=zu(n,r,!0,t,s,i,o,l,a),t.context=Jm(null),n=t.current,r=Re(),s=vn(n),i=Qt(r,s),i.callback=e??null,gn(n,i,s),t.current.lanes=s,mi(t,s,r),Je(t,r),t}function wl(t,e,n,r){var s=e.current,i=Re(),o=vn(s);return n=Jm(n),e.context===null?e.context=n:e.pendingContext=n,e=Qt(i,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=gn(s,e,o),t!==null&&(Et(t,s,o,i),ro(t,s,o)),o}function Wo(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function zd(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Bu(t,e){zd(t,e),(t=t.alternate)&&zd(t,e)}function N1(){return null}var Zm=typeof reportError=="function"?reportError:function(t){console.error(t)};function Uu(t){this._internalRoot=t}Sl.prototype.render=Uu.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(I(409));wl(t,e,null,null)};Sl.prototype.unmount=Uu.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Kn(function(){wl(null,t,null,null)}),e[Jt]=null}};function Sl(t){this._internalRoot=t}Sl.prototype.unstable_scheduleHydration=function(t){if(t){var e=Ap();t={blockedOn:null,target:t,priority:e};for(var n=0;n<an.length&&e!==0&&e<an[n].priority;n++);an.splice(n,0,t),n===0&&Ip(t)}};function Hu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function xl(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Bd(){}function C1(t,e,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=Wo(o);i.call(c)}}var o=Ym(e,r,t,0,null,!1,!1,"",Bd);return t._reactRootContainer=o,t[Jt]=o.current,ei(t.nodeType===8?t.parentNode:t),Kn(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var c=Wo(a);l.call(c)}}var a=zu(t,0,!1,null,null,!1,!1,"",Bd);return t._reactRootContainer=a,t[Jt]=a.current,ei(t.nodeType===8?t.parentNode:t),Kn(function(){wl(e,a,n,r)}),a}function _l(t,e,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var l=s;s=function(){var a=Wo(o);l.call(a)}}wl(e,o,t,s)}else o=C1(n,e,t,s,r);return Wo(o)}Np=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Ns(e.pendingLanes);n!==0&&(au(e,n|1),Je(e,oe()),!(B&6)&&(qr=oe()+500,Cn()))}break;case 13:Kn(function(){var r=Yt(t,1);if(r!==null){var s=Re();Et(r,t,1,s)}}),Bu(t,1)}};cu=function(t){if(t.tag===13){var e=Yt(t,134217728);if(e!==null){var n=Re();Et(e,t,134217728,n)}Bu(t,134217728)}};Cp=function(t){if(t.tag===13){var e=vn(t),n=Yt(t,e);if(n!==null){var r=Re();Et(n,t,e,r)}Bu(t,e)}};Ap=function(){return U};Lp=function(t,e){var n=U;try{return U=t,e()}finally{U=n}};ec=function(t,e,n){switch(e){case"input":if(Ka(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=dl(r);if(!s)throw Error(I(90));lp(r),Ka(r,s)}}}break;case"textarea":cp(t,n);break;case"select":e=n.value,e!=null&&Ar(t,!!n.multiple,e,!1)}};gp=Pu;yp=Kn;var A1={usingClientEntryPoint:!1,Events:[yi,gr,dl,pp,mp,Pu]},ys={findFiberByHostInstance:On,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},L1={bundleType:ys.bundleType,version:ys.version,rendererPackageName:ys.rendererPackageName,rendererConfig:ys.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:en.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Sp(t),t===null?null:t.stateNode},findFiberByHostInstance:ys.findFiberByHostInstance||N1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zi.isDisabled&&zi.supportsFiber)try{al=zi.inject(L1),Mt=zi}catch{}}st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A1;st.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Hu(e))throw Error(I(200));return T1(t,e,null,n)};st.createRoot=function(t,e){if(!Hu(t))throw Error(I(299));var n=!1,r="",s=Zm;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=zu(t,1,!1,null,null,n,!1,r,s),t[Jt]=e.current,ei(t.nodeType===8?t.parentNode:t),new Uu(e)};st.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(I(188)):(t=Object.keys(t).join(","),Error(I(268,t)));return t=Sp(e),t=t===null?null:t.stateNode,t};st.flushSync=function(t){return Kn(t)};st.hydrate=function(t,e,n){if(!xl(e))throw Error(I(200));return _l(null,t,e,!0,n)};st.hydrateRoot=function(t,e,n){if(!Hu(t))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Zm;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=Ym(e,null,t,1,n??null,s,!1,i,o),t[Jt]=e.current,ei(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new Sl(e)};st.render=function(t,e,n){if(!xl(e))throw Error(I(200));return _l(null,t,e,!1,n)};st.unmountComponentAtNode=function(t){if(!xl(t))throw Error(I(40));return t._reactRootContainer?(Kn(function(){_l(null,null,t,!1,function(){t._reactRootContainer=null,t[Jt]=null})}),!0):!1};st.unstable_batchedUpdates=Pu;st.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!xl(n))throw Error(I(200));if(t==null||t._reactInternals===void 0)throw Error(I(38));return _l(t,e,n,!1,r)};st.version="18.2.0-next-9e3b772b8-20220608";function eg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eg)}catch(t){console.error(t)}}eg(),Yh.exports=st;var I1=Yh.exports,j1,Ud=I1;j1=Ud.createRoot,Ud.hydrateRoot;const As=Symbol("context"),tg=Symbol("next"),ng=Symbol("prev"),Hd=Symbol("events");class wb{constructor(e){W(this,"startTime");W(this,"endTime");W(this,"browserName");W(this,"channel");W(this,"platform");W(this,"wallTime");W(this,"title");W(this,"options");W(this,"pages");W(this,"actions");W(this,"events");W(this,"stdio");W(this,"errors");W(this,"errorDescriptors");W(this,"hasSource");W(this,"hasStepData");W(this,"sdkLanguage");W(this,"testIdAttributeName");W(this,"sources");W(this,"resources");e.forEach(r=>M1(r));const n=e.find(r=>r.origin==="library");this.browserName=(n==null?void 0:n.browserName)||"",this.sdkLanguage=n==null?void 0:n.sdkLanguage,this.channel=n==null?void 0:n.channel,this.testIdAttributeName=n==null?void 0:n.testIdAttributeName,this.platform=(n==null?void 0:n.platform)||"",this.title=(n==null?void 0:n.title)||"",this.options=(n==null?void 0:n.options)||{},this.actions=O1(e),this.pages=[].concat(...e.map(r=>r.pages)),this.wallTime=e.map(r=>r.wallTime).reduce((r,s)=>Math.min(r||Number.MAX_VALUE,s),Number.MAX_VALUE),this.startTime=e.map(r=>r.startTime).reduce((r,s)=>Math.min(r,s),Number.MAX_VALUE),this.endTime=e.map(r=>r.endTime).reduce((r,s)=>Math.max(r,s),Number.MIN_VALUE),this.events=[].concat(...e.map(r=>r.events)),this.stdio=[].concat(...e.map(r=>r.stdio)),this.errors=[].concat(...e.map(r=>r.errors)),this.hasSource=e.some(r=>r.hasSource),this.hasStepData=e.some(r=>r.origin==="testRunner"),this.resources=[...e.map(r=>r.resources)].flat(),this.events.sort((r,s)=>r.time-s.time),this.resources.sort((r,s)=>r._monotonicTime-s._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=V1(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(e=>e.error)}_errorDescriptorsFromActions(){var n;const e=[];for(const r of this.actions||[])(n=r.error)!=null&&n.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){const e=[];for(const n of this.errors||[])n.message&&e.push({stack:n.stack,message:n.message});return e}}function M1(t){for(const n of t.pages)n[As]=t;for(let n=0;n<t.actions.length;++n){const r=t.actions[n];r[As]=t}let e;for(let n=t.actions.length-1;n>=0;n--){const r=t.actions[n];r[tg]=e,r.apiName.includes("route.")||(e=r)}for(const n of t.events)n[As]=t;for(const n of t.resources)n[As]=t}function O1(t){const e=new Map;for(const s of t){const i=s.traceUrl;let o=e.get(i);o||(o=[],e.set(i,o)),o.push(s)}const n=[];let r=0;for(const[,s]of e){e.size>1&&$1(s,++r);const i=P1(s);n.push(...i)}n.sort((s,i)=>i.parentId===s.callId?-1:s.parentId===i.callId?1:s.startTime-i.startTime);for(let s=1;s<n.length;++s)n[s][ng]=n[s-1];return n}function $1(t,e){for(const n of t)for(const r of n.actions)r.callId&&(r.callId=`${e}:${r.callId}`),r.parentId&&(r.parentId=`${e}:${r.parentId}`)}function P1(t){const e=new Map,n=t.filter(l=>l.origin==="library"),r=t.filter(l=>l.origin==="testRunner");if(!r.length||!n.length)return t.map(l=>l.actions.map(a=>({...a,context:l}))).flat();const s=n.some(l=>l.actions.some(a=>!!a.stepId));for(const l of n)for(const a of l.actions){const c=s?a.stepId:`${a.apiName}@${a.wallTime}`;e.set(c,{...a,context:l})}const i=D1(r,e,s);i&&R1(n,i);const o=new Map;for(const l of r)for(const a of l.actions){const c=s?a.callId:`${a.apiName}@${a.wallTime}`,u=e.get(c);if(u){o.set(a.callId,u.callId),a.error&&(u.error=a.error),a.attachments&&(u.attachments=a.attachments),a.parentId&&(u.parentId=o.get(a.parentId)??a.parentId),u.startTime=a.startTime,u.endTime=a.endTime;continue}a.parentId&&(a.parentId=o.get(a.parentId)??a.parentId),e.set(c,{...a,context:l})}return[...e.values()]}function R1(t,e){for(const n of t){n.startTime+=e,n.endTime+=e;for(const r of n.actions)r.startTime&&(r.startTime+=e),r.endTime&&(r.endTime+=e);for(const r of n.events)r.time+=e;for(const r of n.stdio)r.timestamp+=e;for(const r of n.pages)for(const s of r.screencastFrames)s.timestamp+=e;for(const r of n.resources)r._monotonicTime&&(r._monotonicTime+=e)}}function D1(t,e,n){for(const r of t)for(const s of r.actions){if(!s.startTime)continue;const i=n?s.callId:`${s.apiName}@${s.wallTime}`,o=e.get(i);if(o)return s.startTime-o.startTime}return 0}function F1(t){const e=new Map;for(const r of t)e.set(r.callId,{id:r.callId,parent:void 0,children:[],action:r});const n={id:"",parent:void 0,children:[]};for(const r of e.values()){const s=r.action.parentId&&e.get(r.action.parentId)||n;s.children.push(r),r.parent=s}return{rootItem:n,itemMap:e}}function Ko(t){return t[As]}function z1(t){return t[tg]}function B1(t){return t[ng]}function U1(t){let e=0,n=0;for(const r of H1(t)){if(r.type==="console"){const s=r.messageType;s==="warning"?++n:s==="error"&&++e}r.type==="event"&&r.method==="pageError"&&++e}return{errors:e,warnings:n}}function H1(t){let e=t[Hd];if(e)return e;const n=z1(t);return e=Ko(t).events.filter(r=>r.time>=t.startTime&&(!n||r.time<n.startTime)),t[Hd]=e,e}function V1(t,e){var r;const n=new Map;for(const s of t)for(const i of s.stack||[]){let o=n.get(i.file);o||(o={errors:[],content:void 0},n.set(i.file,o))}for(const s of e){const{action:i,stack:o,message:l}=s;!i||!o||(r=n.get(o[0].file))==null||r.errors.push({line:o[0].line||0,message:l})}return n}const va=new Set(["page.route","page.routefromhar","page.unroute","page.unrouteall","browsercontext.route","browsercontext.routefromhar","browsercontext.unroute","browsercontext.unrouteall"]);{for(const t of[...va])va.add(t+"async");for(const t of["page.route_from_har","page.unroute_all","context.route_from_har","context.unroute_all"])va.add(t)}const q1=50,Qo=({sidebarSize:t,sidebarHidden:e=!1,sidebarIsFirst:n=!1,orientation:r="vertical",minSidebarSize:s=q1,settingName:i,sidebar:o,main:l})=>{const a=Math.max(s,t)*window.devicePixelRatio,[c,u]=Dr(i?i+"."+r+":size":void 0,a),[f,d]=Dr(i?i+"."+r+":size":void 0,a),[h,v]=N.useState(null),[m,w]=Xn();let y;r==="vertical"?(y=f/window.devicePixelRatio,m&&m.height<y&&(y=m.height-10)):(y=c/window.devicePixelRatio,m&&m.width<y&&(y=m.width-10)),document.body.style.userSelect=h?"none":"inherit";let g={};return r==="vertical"?n?g={top:h?0:y-4,bottom:h?0:void 0,height:h?"initial":8}:g={bottom:h?0:y-4,top:h?0:void 0,height:h?"initial":8}:n?g={left:h?0:y-4,right:h?0:void 0,width:h?"initial":8}:g={right:h?0:y-4,left:h?0:void 0,width:h?"initial":8},p.jsxs("div",{className:le("split-view",r,n&&"sidebar-first"),ref:w,children:[p.jsx("div",{className:"split-view-main",children:l}),!e&&p.jsx("div",{style:{flexBasis:y},className:"split-view-sidebar",children:o}),!e&&p.jsx("div",{style:g,className:"split-view-resizer",onMouseDown:S=>v({offset:r==="vertical"?S.clientY:S.clientX,size:y}),onMouseUp:()=>v(null),onMouseMove:S=>{if(!S.buttons)v(null);else if(h){const _=(r==="vertical"?S.clientY:S.clientX)-h.offset,b=n?h.size+_:h.size-_,E=S.target.parentElement.getBoundingClientRect(),k=Math.min(Math.max(s,b),(r==="vertical"?E.height:E.width)-s);r==="vertical"?d(k*window.devicePixelRatio):u(k*window.devicePixelRatio)}}})]})};function kl(t,e="'"){const n=JSON.stringify(t),r=n.substring(1,n.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 Xo(t){return t.charAt(0).toUpperCase()+t.substring(1)}function rg(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function ut(t){let e="";for(let n=0;n<t.length;n++)e+=W1(t,n);return e}function vs(t){return`"${ut(t).replace(/\\ /g," ")}"`}function W1(t,e){const n=t.charCodeAt(e);return n===0?"�":n>=1&&n<=31||n>=48&&n<=57&&(e===0||e===1&&t.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":e===0&&n===45&&t.length===1?"\\"+t.charAt(e):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?t.charAt(e):"\\"+t.charAt(e)}let In;function K1(){In=new Map}function De(t){let e=In==null?void 0:In.get(t);return e===void 0&&(e=t.replace(/\u200b/g,"").trim().replace(/\s+/g," "),In==null||In.set(t,e)),e}function El(t){return t.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function sg(t){return t.unicode||t.unicodeSets?String(t):String(t).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Ve(t,e){return typeof t!="string"?sg(t):`${JSON.stringify(t)}${e?"s":"i"}`}function Oe(t,e){return typeof t!="string"?sg(t):`"${t.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function Q1(t,e,n=""){if(t.length<=e)return t;const r=[...t];return r.length>e?r.slice(0,e-n.length).join("")+n:r.join("")}function Vd(t,e){return Q1(t,e,"…")}function Go(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function X1(t,e){const n=t.length,r=e.length;let s=0,i=0;const o=Array(n+1).fill(null).map(()=>Array(r+1).fill(0));for(let l=1;l<=n;l++)for(let a=1;a<=r;a++)t[l-1]===e[a-1]&&(o[l][a]=o[l-1][a-1]+1,o[l][a]>s&&(s=o[l][a],i=l));return t.slice(i-s,i)}const ue=function(t,e,n){return t>=e&&t<=n};function Ue(t){return ue(t,48,57)}function qd(t){return Ue(t)||ue(t,65,70)||ue(t,97,102)}function G1(t){return ue(t,65,90)}function J1(t){return ue(t,97,122)}function Y1(t){return G1(t)||J1(t)}function Z1(t){return t>=128}function uo(t){return Y1(t)||Z1(t)||t===95}function Wd(t){return uo(t)||Ue(t)||t===45}function eS(t){return ue(t,0,8)||t===11||ue(t,14,31)||t===127}function fo(t){return t===10}function Ft(t){return fo(t)||t===9||t===32}const tS=1114111;class Vu extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function nS(t){const e=[];for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(r===13&&t.charCodeAt(n+1)===10&&(r=10,n++),(r===13||r===12)&&(r=10),r===0&&(r=65533),ue(r,55296,56319)&&ue(t.charCodeAt(n+1),56320,57343)){const s=r-55296,i=t.charCodeAt(n+1)-56320;r=Math.pow(2,16)+s*Math.pow(2,10)+i,n++}e.push(r)}return e}function de(t){if(t<=65535)return String.fromCharCode(t);t-=Math.pow(2,16);const e=Math.floor(t/Math.pow(2,10))+55296,n=t%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(n)}function rS(t){const e=nS(t);let n=-1;const r=[];let s;const i=function(C){return C>=e.length?-1:e[C]},o=function(C){if(C===void 0&&(C=1),C>3)throw"Spec Error: no more than three codepoints of lookahead.";return i(n+C)},l=function(C){return C===void 0&&(C=1),n+=C,s=i(n),!0},a=function(){return n-=1,!0},c=function(C){return C===void 0&&(C=s),C===-1},u=function(){if(f(),l(),Ft(s)){for(;Ft(o());)l();return new Mc}else{if(s===34)return v();if(s===35)if(Wd(o())||y(o(1),o(2))){const C=new wg("");return S(o(1),o(2),o(3))&&(C.type="id"),C.value=T(),C}else return new Te(s);else return s===36?o()===61?(l(),new lS):new Te(s):s===39?v():s===40?new pg:s===41?new mg:s===42?o()===61?(l(),new aS):new Te(s):s===43?b()?(a(),d()):new Te(s):s===44?new ug:s===45?b()?(a(),d()):o(1)===45&&o(2)===62?(l(2),new lg):x()?(a(),h()):new Te(s):s===46?b()?(a(),d()):new Te(s):s===58?new ag:s===59?new cg:s===60?o(1)===33&&o(2)===45&&o(3)===45?(l(3),new og):new Te(s):s===64?S(o(1),o(2),o(3))?new vg(T()):new Te(s):s===91?new hg:s===92?g()?(a(),h()):new Te(s):s===93?new Oc:s===94?o()===61?(l(),new oS):new Te(s):s===123?new fg:s===124?o()===61?(l(),new iS):o()===124?(l(),new gg):new Te(s):s===125?new dg:s===126?o()===61?(l(),new sS):new Te(s):Ue(s)?(a(),d()):uo(s)?(a(),h()):c()?new po:new Te(s)}},f=function(){for(;o(1)===47&&o(2)===42;)for(l(2);;)if(l(),s===42&&o()===47){l();break}else if(c())return},d=function(){const C=E();if(S(o(1),o(2),o(3))){const M=new cS;return M.value=C.value,M.repr=C.repr,M.type=C.type,M.unit=T(),M}else if(o()===37){l();const M=new kg;return M.value=C.value,M.repr=C.repr,M}else{const M=new _g;return M.value=C.value,M.repr=C.repr,M.type=C.type,M}},h=function(){const C=T();if(C.toLowerCase()==="url"&&o()===40){for(l();Ft(o(1))&&Ft(o(2));)l();return o()===34||o()===39?new mo(C):Ft(o())&&(o(2)===34||o(2)===39)?new mo(C):m()}else return o()===40?(l(),new mo(C)):new yg(C)},v=function(C){C===void 0&&(C=s);let M="";for(;l();){if(s===C||c())return new Sg(M);if(fo(s))return a(),new ig;s===92?c(o())||(fo(o())?l():M+=de(w())):M+=de(s)}throw new Error("Internal error")},m=function(){const C=new xg("");for(;Ft(o());)l();if(c(o()))return C;for(;l();){if(s===41||c())return C;if(Ft(s)){for(;Ft(o());)l();return o()===41||c(o())?(l(),C):(A(),new ho)}else{if(s===34||s===39||s===40||eS(s))return A(),new ho;if(s===92)if(g())C.value+=de(w());else return A(),new ho;else C.value+=de(s)}}throw new Error("Internal error")},w=function(){if(l(),qd(s)){const C=[s];for(let F=0;F<5&&qd(o());F++)l(),C.push(s);Ft(o())&&l();let M=parseInt(C.map(function(F){return String.fromCharCode(F)}).join(""),16);return M>tS&&(M=65533),M}else return c()?65533:s},y=function(C,M){return!(C!==92||fo(M))},g=function(){return y(s,o())},S=function(C,M,F){return C===45?uo(M)||M===45||y(M,F):uo(C)?!0:C===92?y(C,M):!1},x=function(){return S(s,o(1),o(2))},_=function(C,M,F){return C===43||C===45?!!(Ue(M)||M===46&&Ue(F)):C===46?!!Ue(M):!!Ue(C)},b=function(){return _(s,o(1),o(2))},T=function(){let C="";for(;l();)if(Wd(s))C+=de(s);else if(g())C+=de(w());else return a(),C;throw new Error("Internal parse error")},E=function(){let C="",M="integer";for((o()===43||o()===45)&&(l(),C+=de(s));Ue(o());)l(),C+=de(s);if(o(1)===46&&Ue(o(2)))for(l(),C+=de(s),l(),C+=de(s),M="number";Ue(o());)l(),C+=de(s);const F=o(1),Z=o(2),Be=o(3);if((F===69||F===101)&&Ue(Z))for(l(),C+=de(s),l(),C+=de(s),M="number";Ue(o());)l(),C+=de(s);else if((F===69||F===101)&&(Z===43||Z===45)&&Ue(Be))for(l(),C+=de(s),l(),C+=de(s),l(),C+=de(s),M="number";Ue(o());)l(),C+=de(s);const Le=k(C);return{type:M,value:Le,repr:C}},k=function(C){return+C},A=function(){for(;l();){if(s===41||c())return;g()&&w()}};let L=0;for(;!c(o());)if(r.push(u()),L++,L>e.length*2)throw new Error("I'm infinite-looping!");return r}class ae{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class ig extends ae{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class ho extends ae{constructor(){super(...arguments),this.tokenType="BADURL"}}class Mc extends ae{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class og extends ae{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class lg extends ae{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class ag extends ae{constructor(){super(...arguments),this.tokenType=":"}}class cg extends ae{constructor(){super(...arguments),this.tokenType=";"}}class ug extends ae{constructor(){super(...arguments),this.tokenType=","}}class Yr extends ae{constructor(){super(...arguments),this.value="",this.mirror=""}}class fg extends Yr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class dg extends Yr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class hg extends Yr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Oc extends Yr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class pg extends Yr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class mg extends Yr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class sS extends ae{constructor(){super(...arguments),this.tokenType="~="}}class iS extends ae{constructor(){super(...arguments),this.tokenType="|="}}class oS extends ae{constructor(){super(...arguments),this.tokenType="^="}}class lS extends ae{constructor(){super(...arguments),this.tokenType="$="}}class aS extends ae{constructor(){super(...arguments),this.tokenType="*="}}class gg extends ae{constructor(){super(...arguments),this.tokenType="||"}}class po extends ae{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class Te extends ae{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=de(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==="\\"?`\\
|
|
42
|
-
`:this.value}}class Zr extends ae{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 yg extends Zr{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return wi(this.value)}}class mo extends Zr{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return wi(this.value)+"("}}class vg extends Zr{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+wi(this.value)}}class wg extends Zr{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"?"#"+wi(this.value):"#"+uS(this.value)}}class Sg extends Zr{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+Eg(this.value)+'"'}}class xg extends Zr{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+Eg(this.value)+'")'}}class _g extends ae{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 kg extends ae{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 cS extends ae{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 n=wi(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||ue(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),e+n}}function wi(t){t=""+t;let e="";const n=t.charCodeAt(0);for(let r=0;r<t.length;r++){const s=t.charCodeAt(r);if(s===0)throw new Vu("Invalid character: the input contains U+0000.");ue(s,1,31)||s===127||r===0&&ue(s,48,57)||r===1&&ue(s,48,57)&&n===45?e+="\\"+s.toString(16)+" ":s>=128||s===45||s===95||ue(s,48,57)||ue(s,65,90)||ue(s,97,122)?e+=t[r]:e+="\\"+t[r]}return e}function uS(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new Vu("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||ue(r,48,57)||ue(r,65,90)||ue(r,97,122)?e+=t[n]:e+="\\"+r.toString(16)+" "}return e}function Eg(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new Vu("Invalid character: the input contains U+0000.");ue(r,1,31)||r===127?e+="\\"+r.toString(16)+" ":r===34||r===92?e+="\\"+t[n]:e+=t[n]}return e}class qe extends Error{}function fS(t,e){let n;try{n=rS(t),n[n.length-1]instanceof po||n.push(new po)}catch(k){const A=k.message+` while parsing css selector "${t}". Did you mean to CSS.escape it?`,L=(k.stack||"").indexOf(k.message);throw L!==-1&&(k.stack=k.stack.substring(0,L)+A+k.stack.substring(L+k.message.length)),k.message=A,k}const r=n.find(k=>k instanceof vg||k instanceof ig||k instanceof ho||k instanceof gg||k instanceof og||k instanceof lg||k instanceof cg||k instanceof fg||k instanceof dg||k instanceof xg||k instanceof kg);if(r)throw new qe(`Unsupported token "${r.toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`);let s=0;const i=new Set;function o(){return new qe(`Unexpected token "${n[s].toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`)}function l(){for(;n[s]instanceof Mc;)s++}function a(k=s){return n[k]instanceof yg}function c(k=s){return n[k]instanceof Sg}function u(k=s){return n[k]instanceof _g}function f(k=s){return n[k]instanceof ug}function d(k=s){return n[k]instanceof pg}function h(k=s){return n[k]instanceof mg}function v(k=s){return n[k]instanceof mo}function m(k=s){return n[k]instanceof Te&&n[k].value==="*"}function w(k=s){return n[k]instanceof po}function y(k=s){return n[k]instanceof Te&&[">","+","~"].includes(n[k].value)}function g(k=s){return f(k)||h(k)||w(k)||y(k)||n[k]instanceof Mc}function S(){const k=[x()];for(;l(),!!f();)s++,k.push(x());return k}function x(){return l(),u()||c()?n[s++].value:_()}function _(){const k={simples:[]};for(l(),y()?k.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):k.simples.push({selector:b(),combinator:""});;){if(l(),y())k.simples[k.simples.length-1].combinator=n[s++].value,l();else if(g())break;k.simples.push({combinator:"",selector:b()})}return k}function b(){let k="";const A=[];for(;!g();)if(a()||m())k+=n[s++].toSource();else if(n[s]instanceof wg)k+=n[s++].toSource();else if(n[s]instanceof Te&&n[s].value===".")if(s++,a())k+="."+n[s++].toSource();else throw o();else if(n[s]instanceof ag)if(s++,a())if(!e.has(n[s].value.toLowerCase()))k+=":"+n[s++].toSource();else{const L=n[s++].value.toLowerCase();A.push({name:L,args:[]}),i.add(L)}else if(v()){const L=n[s++].value.toLowerCase();if(e.has(L)?(A.push({name:L,args:S()}),i.add(L)):k+=`:${L}(${T()})`,l(),!h())throw o();s++}else throw o();else if(n[s]instanceof hg){for(k+="[",s++;!(n[s]instanceof Oc)&&!w();)k+=n[s++].toSource();if(!(n[s]instanceof Oc))throw o();k+="]",s++}else throw o();if(!k&&!A.length)throw o();return{css:k||void 0,functions:A}}function T(){let k="",A=1;for(;!w()&&((d()||v())&&A++,h()&&A--,!!A);)k+=n[s++].toSource();return k}const E=S();if(!w())throw o();if(E.some(k=>typeof k!="object"||!("simples"in k)))throw new qe(`Error while parsing css selector "${t}". Did you mean to CSS.escape it?`);return{selector:E,names:Array.from(i)}}const $c=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),dS=new Set(["left-of","right-of","above","below","near"]),bg=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 bl(t){const e=mS(t),n=[];for(const r of e.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const s=fS(r.body,bg);n.push({name:"css",body:s.selector,source:r.body});continue}if($c.has(r.name)){let s,i;try{const c=JSON.parse("["+r.body+"]");if(!Array.isArray(c)||c.length<1||c.length>2||typeof c[0]!="string")throw new qe(`Malformed selector: ${r.name}=`+r.body);if(s=c[0],c.length===2){if(typeof c[1]!="number"||!dS.has(r.name))throw new qe(`Malformed selector: ${r.name}=`+r.body);i=c[1]}}catch{throw new qe(`Malformed selector: ${r.name}=`+r.body)}const o={name:r.name,source:r.body,body:{parsed:bl(s),distance:i}},l=[...o.body.parsed.parts].reverse().find(c=>c.name==="internal:control"&&c.body==="enter-frame"),a=l?o.body.parsed.parts.indexOf(l):-1;a!==-1&&hS(o.body.parsed.parts.slice(0,a+1),n.slice(0,a+1))&&o.body.parsed.parts.splice(0,a+1),n.push(o);continue}n.push({...r,source:r.body})}if($c.has(n[0].name))throw new qe(`"${n[0].name}" selector cannot be first`);return{capture:e.capture,parts:n}}function hS(t,e){return Wt({parts:t})===Wt({parts:e})}function Wt(t,e){return typeof t=="string"?t:t.parts.map((n,r)=>{let s=!0;!e&&r!==t.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(s=!1);const i=s?n.name+"=":"";return`${r===t.capture?"*":""}${i}${n.source}`}).join(" >> ")}function pS(t,e){const n=(r,s)=>{for(const i of r.parts)e(i,s),$c.has(i.name)&&n(i.body.parsed,!0)};n(t,!1)}function mS(t){let e=0,n,r=0;const s={parts:[]},i=()=>{const l=t.substring(r,e).trim(),a=l.indexOf("=");let c,u;a!==-1&&l.substring(0,a).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(c=l.substring(0,a).trim(),u=l.substring(a+1)):l.length>1&&l[0]==='"'&&l[l.length-1]==='"'||l.length>1&&l[0]==="'"&&l[l.length-1]==="'"?(c="text",u=l):/^\(*\/\//.test(l)||l.startsWith("..")?(c="xpath",u=l):(c="css",u=l);let f=!1;if(c[0]==="*"&&(f=!0,c=c.substring(1)),s.parts.push({name:c,body:u}),f){if(s.capture!==void 0)throw new qe("Only one of the selectors can capture using * modifier");s.capture=s.parts.length-1}};if(!t.includes(">>"))return e=t.length,i(),s;const o=()=>{const a=t.substring(r,e).match(/^\s*text\s*=(.*)$/);return!!a&&!!a[1]};for(;e<t.length;){const l=t[e];l==="\\"&&e+1<t.length?e+=2:l===n?(n=void 0,e++):!n&&(l==='"'||l==="'"||l==="`")&&!o()?(n=l,e++):!n&&l===">"&&t[e+1]===">"?(i(),e+=2,r=e):e++}return i(),s}function Un(t,e){let n=0,r=t.length===0;const s=()=>t[n]||"",i=()=>{const w=s();return++n,r=n>=t.length,w},o=w=>{throw r?new qe(`Unexpected end of selector while parsing selector \`${t}\``):new qe(`Error while parsing selector \`${t}\` - unexpected symbol "${s()}" at position ${n}`+(w?" during "+w:""))};function l(){for(;!r&&/\s/.test(s());)i()}function a(w){return w>=""||w>="0"&&w<="9"||w>="A"&&w<="Z"||w>="a"&&w<="z"||w>="0"&&w<="9"||w==="_"||w==="-"}function c(){let w="";for(l();!r&&a(s());)w+=i();return w}function u(w){let y=i();for(y!==w&&o("parsing quoted string");!r&&s()!==w;)s()==="\\"&&i(),y+=i();return s()!==w&&o("parsing quoted string"),y+=i(),y}function f(){i()!=="/"&&o("parsing regular expression");let w="",y=!1;for(;!r;){if(s()==="\\")w+=i(),r&&o("parsing regular expression");else if(y&&s()==="]")y=!1;else if(!y&&s()==="[")y=!0;else if(!y&&s()==="/")break;w+=i()}i()!=="/"&&o("parsing regular expression");let g="";for(;!r&&s().match(/[dgimsuy]/);)g+=i();try{return new RegExp(w,g)}catch(S){throw new qe(`Error while parsing selector \`${t}\`: ${S.message}`)}}function d(){let w="";return l(),s()==="'"||s()==='"'?w=u(s()).slice(1,-1):w=c(),w||o("parsing property path"),w}function h(){l();let w="";return r||(w+=i()),!r&&w!=="="&&(w+=i()),["=","*=","^=","$=","|=","~="].includes(w)||o("parsing operator"),w}function v(){i();const w=[];for(w.push(d()),l();s()===".";)i(),w.push(d()),l();if(s()==="]")return i(),{name:w.join("."),jsonPath:w,op:"<truthy>",value:null,caseSensitive:!1};const y=h();let g,S=!0;if(l(),s()==="/"){if(y!=="=")throw new qe(`Error while parsing selector \`${t}\` - cannot use ${y} in attribute with regular expression`);g=f()}else if(s()==="'"||s()==='"')g=u(s()).slice(1,-1),l(),s()==="i"||s()==="I"?(S=!1,i()):(s()==="s"||s()==="S")&&(S=!0,i());else{for(g="";!r&&(a(s())||s()==="+"||s()===".");)g+=i();g==="true"?g=!0:g==="false"?g=!1:e||(g=+g,Number.isNaN(g)&&o("parsing attribute value"))}if(l(),s()!=="]"&&o("parsing attribute value"),i(),y!=="="&&typeof g!="string")throw new qe(`Error while parsing selector \`${t}\` - cannot use ${y} in attribute with non-string matching value - ${g}`);return{name:w.join("."),jsonPath:w,op:y,value:g,caseSensitive:S}}const m={name:"",attributes:[]};for(m.name=c(),l();s()==="[";)m.attributes.push(v()),l();if(r||o(void 0),!m.name&&!m.attributes.length)throw new qe(`Error while parsing selector \`${t}\` - selector cannot be empty`);return m}function Sn(t,e,n=!1){return Tg(t,e,n,1)[0]}function Tg(t,e,n=!1,r=20,s){try{return cr(new _S[t](s),bl(e),n,r)}catch{return[e]}}function cr(t,e,n=!1,r=20){const s=[...e.parts],i=[];let o=n?"frame-locator":"page";for(let l=0;l<s.length;l++){const a=s[l],c=o;if(o="locator",a.name==="nth"){a.body==="0"?i.push([t.generateLocator(c,"first",""),t.generateLocator(c,"nth","0")]):a.body==="-1"?i.push([t.generateLocator(c,"last",""),t.generateLocator(c,"nth","-1")]):i.push([t.generateLocator(c,"nth",a.body)]);continue}if(a.name==="internal:text"){const{exact:v,text:m}=ws(a.body);i.push([t.generateLocator(c,"text",m,{exact:v})]);continue}if(a.name==="internal:has-text"){const{exact:v,text:m}=ws(a.body);if(!v){i.push([t.generateLocator(c,"has-text",m,{exact:v})]);continue}}if(a.name==="internal:has-not-text"){const{exact:v,text:m}=ws(a.body);if(!v){i.push([t.generateLocator(c,"has-not-text",m,{exact:v})]);continue}}if(a.name==="internal:has"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"has",m)));continue}if(a.name==="internal:has-not"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"hasNot",m)));continue}if(a.name==="internal:and"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"and",m)));continue}if(a.name==="internal:or"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"or",m)));continue}if(a.name==="internal:chain"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"chain",m)));continue}if(a.name==="internal:label"){const{exact:v,text:m}=ws(a.body);i.push([t.generateLocator(c,"label",m,{exact:v})]);continue}if(a.name==="internal:role"){const v=Un(a.body,!0),m={attrs:[]};for(const w of v.attributes)w.name==="name"?(m.exact=w.caseSensitive,m.name=w.value):(w.name==="level"&&typeof w.value=="string"&&(w.value=+w.value),m.attrs.push({name:w.name==="include-hidden"?"includeHidden":w.name,value:w.value}));i.push([t.generateLocator(c,"role",v.name,m)]);continue}if(a.name==="internal:testid"){const v=Un(a.body,!0),{value:m}=v.attributes[0];i.push([t.generateLocator(c,"test-id",m)]);continue}if(a.name==="internal:attr"){const v=Un(a.body,!0),{name:m,value:w,caseSensitive:y}=v.attributes[0],g=w,S=!!y;if(m==="placeholder"){i.push([t.generateLocator(c,"placeholder",g,{exact:S})]);continue}if(m==="alt"){i.push([t.generateLocator(c,"alt",g,{exact:S})]);continue}if(m==="title"){i.push([t.generateLocator(c,"title",g,{exact:S})]);continue}}if(a.name==="internal:control"&&a.body==="enter-frame"){const v=i[i.length-1],m=s[l-1],w=v.map(y=>t.chainLocators([y,t.generateLocator(c,"frame","")]));["xpath","css"].includes(m.name)&&w.push(t.generateLocator(c,"frame-locator",Wt({parts:[m]})),t.generateLocator(c,"frame-locator",Wt({parts:[m]},!0))),v.splice(0,v.length,...w),o="frame-locator";continue}const u=s[l+1],f=Wt({parts:[a]}),d=t.generateLocator(c,"default",f);if(u&&["internal:has-text","internal:has-not-text"].includes(u.name)){const{exact:v,text:m}=ws(u.body);if(!v){const w=t.generateLocator("locator",u.name==="internal:has-text"?"has-text":"has-not-text",m,{exact:v}),y={};u.name==="internal:has-text"?y.hasText=m:y.hasNotText=m;const g=t.generateLocator(c,"default",f,y);i.push([t.chainLocators([d,w]),g]),l++;continue}}let h;if(["xpath","css"].includes(a.name)){const v=Wt({parts:[a]},!0);h=t.generateLocator(c,"default",v)}i.push([d,h].filter(Boolean))}return gS(t,i,r)}function gS(t,e,n){const r=e.map(()=>""),s=[],i=o=>{if(o===e.length)return s.push(t.chainLocators(r)),s.length<n;for(const l of e[o])if(r[o]=l,!i(o+1))return!1;return!0};return i(0),s}function ws(t){let e=!1;const n=t.match(/^\/(.*)\/([igm]*)$/);return n?{text:new RegExp(n[1],n[2])}:(t.endsWith('"')?(t=JSON.parse(t),e=!0):t.endsWith('"s')?(t=JSON.parse(t.substring(0,t.length-1)),e=!0):t.endsWith('"i')&&(t=JSON.parse(t.substring(0,t.length-1)),e=!1),{exact:e,text:t})}class yS{constructor(e){this.preferredQuote=e}generateLocator(e,n,r,s={}){switch(n){case"default":return s.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(s.hasText)} })`:s.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(s.hasNotText)} })`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"role":const i=[];we(s.name)?i.push(`name: ${this.regexToSourceString(s.name)}`):typeof s.name=="string"&&(i.push(`name: ${this.quote(s.name)}`),s.exact&&i.push("exact: true"));for(const{name:l,value:a}of s.attrs)i.push(`${l}: ${typeof a=="string"?this.quote(a):a}`);const o=i.length?`, { ${i.join(", ")} }`:"";return`getByRole(${this.quote(r)}${o})`;case"has-text":return`filter({ hasText: ${this.toHasText(r)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(r)} })`;case"has":return`filter({ has: ${r} })`;case"hasNot":return`filter({ hasNot: ${r} })`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("getByText",r,!!s.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!s.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!s.exact);case"label":return this.toCallWithExact("getByLabel",r,!!s.exact);case"title":return this.toCallWithExact("getByTitle",r,!!s.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return El(String(e))}toCallWithExact(e,n,r){return we(n)?`${e}(${this.regexToSourceString(n)})`:r?`${e}(${this.quote(n)}, { exact: true })`:`${e}(${this.quote(n)})`}toHasText(e){return we(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return we(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return kl(e,this.preferredQuote??"'")}}class vS{generateLocator(e,n,r,s={}){switch(n){case"default":return s.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(s.hasText)})`:s.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(s.hasNotText)})`:`locator(${this.quote(r)})`;case"frame-locator":return`frame_locator(${this.quote(r)})`;case"frame":return"content_frame";case"nth":return`nth(${r})`;case"first":return"first";case"last":return"last";case"role":const i=[];we(s.name)?i.push(`name=${this.regexToString(s.name)}`):typeof s.name=="string"&&(i.push(`name=${this.quote(s.name)}`),s.exact&&i.push("exact=True"));for(const{name:l,value:a}of s.attrs){let c=typeof a=="string"?this.quote(a):a;typeof a=="boolean"&&(c=a?"True":"False"),i.push(`${rg(l)}=${c}`)}const o=i.length?`, ${i.join(", ")}`:"";return`get_by_role(${this.quote(r)}${o})`;case"has-text":return`filter(has_text=${this.toHasText(r)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(r)})`;case"has":return`filter(has=${r})`;case"hasNot":return`filter(has_not=${r})`;case"and":return`and_(${r})`;case"or":return`or_(${r})`;case"chain":return`locator(${r})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("get_by_text",r,!!s.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!s.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!s.exact);case"label":return this.toCallWithExact("get_by_label",r,!!s.exact);case"title":return this.toCallWithExact("get_by_title",r,!!s.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${El(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${n})`}toCallWithExact(e,n,r){return we(n)?`${e}(${this.regexToString(n)})`:r?`${e}(${this.quote(n)}, exact=True)`:`${e}(${this.quote(n)})`}toHasText(e){return we(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return we(e)?this.regexToString(e):this.quote(e)}quote(e){return kl(e,'"')}}class wS{generateLocator(e,n,r,s={}){let i;switch(e){case"page":i="Page";break;case"frame-locator":i="FrameLocator";break;case"locator":i="Locator";break}switch(n){case"default":return s.hasText!==void 0?`locator(${this.quote(r)}, new ${i}.LocatorOptions().setHasText(${this.toHasText(s.hasText)}))`:s.hasNotText!==void 0?`locator(${this.quote(r)}, new ${i}.LocatorOptions().setHasNotText(${this.toHasText(s.hasNotText)}))`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"role":const o=[];we(s.name)?o.push(`.setName(${this.regexToString(s.name)})`):typeof s.name=="string"&&(o.push(`.setName(${this.quote(s.name)})`),s.exact&&o.push(".setExact(true)"));for(const{name:a,value:c}of s.attrs)o.push(`.set${Xo(a)}(${typeof c=="string"?this.quote(c):c})`);const l=o.length?`, new ${i}.GetByRoleOptions()${o.join("")}`:"";return`getByRole(AriaRole.${rg(r).toUpperCase()}${l})`;case"has-text":return`filter(new ${i}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${i}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${i}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${i}.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(i,"getByText",r,!!s.exact);case"alt":return this.toCallWithExact(i,"getByAltText",r,!!s.exact);case"placeholder":return this.toCallWithExact(i,"getByPlaceholder",r,!!s.exact);case"label":return this.toCallWithExact(i,"getByLabel",r,!!s.exact);case"title":return this.toCallWithExact(i,"getByTitle",r,!!s.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(El(e.source))}${n})`}toCallWithExact(e,n,r,s){return we(r)?`${n}(${this.regexToString(r)})`:s?`${n}(${this.quote(r)}, new ${e}.${Xo(n)}Options().setExact(true))`:`${n}(${this.quote(r)})`}toHasText(e){return we(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return we(e)?this.regexToString(e):this.quote(e)}quote(e){return kl(e,'"')}}class SS{generateLocator(e,n,r,s={}){switch(n){case"default":return s.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(s.hasText)} })`:s.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(s.hasNotText)} })`:`Locator(${this.quote(r)})`;case"frame-locator":return`FrameLocator(${this.quote(r)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${r})`;case"first":return"First";case"last":return"Last";case"role":const i=[];we(s.name)?i.push(`NameRegex = ${this.regexToString(s.name)}`):typeof s.name=="string"&&(i.push(`Name = ${this.quote(s.name)}`),s.exact&&i.push("Exact = true"));for(const{name:l,value:a}of s.attrs)i.push(`${Xo(l)} = ${typeof a=="string"?this.quote(a):a}`);const o=i.length?`, new() { ${i.join(", ")} }`:"";return`GetByRole(AriaRole.${Xo(r)}${o})`;case"has-text":return`Filter(new() { ${this.toHasText(r)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(r)} })`;case"has":return`Filter(new() { Has = ${r} })`;case"hasNot":return`Filter(new() { HasNot = ${r} })`;case"and":return`And(${r})`;case"or":return`Or(${r})`;case"chain":return`Locator(${r})`;case"test-id":return`GetByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("GetByText",r,!!s.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!s.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!s.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!s.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!s.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(e){return e.join(".")}regexToString(e){const n=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(El(e.source))}${n})`}toCallWithExact(e,n,r){return we(n)?`${e}(${this.regexToString(n)})`:r?`${e}(${this.quote(n)}, new() { Exact = true })`:`${e}(${this.quote(n)})`}toHasText(e){return we(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return we(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return we(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return kl(e,'"')}}class xS{generateLocator(e,n,r,s={}){return JSON.stringify({kind:n,body:r,options:s})}chainLocators(e){const n=e.map(r=>JSON.parse(r));for(let r=0;r<n.length-1;++r)n[r].next=n[r+1];return JSON.stringify(n[0])}}const _S={javascript:yS,python:vS,java:wS,csharp:SS,jsonl:xS};function we(t){return t instanceof RegExp}const Kd=new Map;function kS({name:t,rootItem:e,render:n,title:r,icon:s,isError:i,isVisible:o,selectedItem:l,onAccepted:a,onSelected:c,onHighlighted:u,treeState:f,setTreeState:d,noItemsMessage:h,dataTestId:v,autoExpandDepth:m}){const w=N.useMemo(()=>ES(e,l,f.expandedItems,m||0,o),[e,l,f,m,o]),y=N.useRef(null),[g,S]=N.useState(),[x,_]=N.useState(!1);N.useEffect(()=>{u==null||u(g)},[u,g]),N.useEffect(()=>{const T=y.current;if(!T)return;const E=()=>{Kd.set(t,T.scrollTop)};return T.addEventListener("scroll",E,{passive:!0}),()=>T.removeEventListener("scroll",E)},[t]),N.useEffect(()=>{y.current&&(y.current.scrollTop=Kd.get(t)||0)},[t]);const b=N.useCallback(T=>{const{expanded:E}=w.get(T);if(E){for(let k=l;k;k=k.parent)if(k===T){c==null||c(T);break}f.expandedItems.set(T.id,!1)}else f.expandedItems.set(T.id,!0);d({...f})},[w,l,c,f,d]);return p.jsx("div",{className:le("tree-view vbox",t+"-tree-view"),role:"tree","data-testid":v||t+"-tree",children:p.jsxs("div",{className:le("tree-view-content"),tabIndex:0,onKeyDown:T=>{if(l&&T.key==="Enter"){a==null||a(l);return}if(T.key!=="ArrowDown"&&T.key!=="ArrowUp"&&T.key!=="ArrowLeft"&&T.key!=="ArrowRight")return;if(T.stopPropagation(),T.preventDefault(),l&&T.key==="ArrowLeft"){const{expanded:k,parent:A}=w.get(l);k?(f.expandedItems.set(l.id,!1),d({...f})):A&&(c==null||c(A));return}if(l&&T.key==="ArrowRight"){l.children.length&&(f.expandedItems.set(l.id,!0),d({...f}));return}let E=l;if(T.key==="ArrowDown"&&(l?E=w.get(l).next:w.size&&(E=[...w.keys()][0])),T.key==="ArrowUp"){if(l)E=w.get(l).prev;else if(w.size){const k=[...w.keys()];E=k[k.length-1]}}u==null||u(void 0),E&&(_(!0),c==null||c(E)),S(void 0)},ref:y,children:[h&&w.size===0&&p.jsx("div",{className:"tree-view-empty",children:h}),e.children.map(T=>w.get(T)&&p.jsx(Ng,{item:T,treeItems:w,selectedItem:l,onSelected:c,onAccepted:a,isError:i,toggleExpanded:b,highlightedItem:g,setHighlightedItem:S,render:n,icon:s,title:r,isKeyboardNavigation:x,setIsKeyboardNavigation:_},T.id))]})})}function Ng({item:t,treeItems:e,selectedItem:n,onSelected:r,highlightedItem:s,setHighlightedItem:i,isError:o,onAccepted:l,toggleExpanded:a,render:c,title:u,icon:f,isKeyboardNavigation:d,setIsKeyboardNavigation:h}){const v=N.useId(),m=N.useRef(null);N.useEffect(()=>{n===t&&d&&m.current&&(Gh(m.current),h(!1))},[t,n,d,h]);const w=e.get(t),y=w.depth,g=w.expanded;let S="codicon-blank";typeof g=="boolean"&&(S=g?"codicon-chevron-down":"codicon-chevron-right");const x=c(t),_=g&&t.children.length?t.children:[],b=u==null?void 0:u(t),T=(f==null?void 0:f(t))||"codicon-blank";return p.jsxs("div",{ref:m,role:"treeitem","aria-selected":t===n,"aria-expanded":g,"aria-controls":v,title:b,className:"vbox",style:{flex:"none"},children:[p.jsxs("div",{onDoubleClick:()=>l==null?void 0:l(t),className:le("tree-view-entry",n===t&&"selected",s===t&&"highlighted",(o==null?void 0:o(t))&&"error"),onClick:()=>r==null?void 0:r(t),onMouseEnter:()=>i(t),onMouseLeave:()=>i(void 0),children:[y?new Array(y).fill(0).map((E,k)=>p.jsx("div",{className:"tree-view-indent"},"indent-"+k)):void 0,p.jsx("div",{"aria-hidden":"true",className:"codicon "+S,style:{minWidth:16,marginRight:4},onDoubleClick:E=>{E.preventDefault(),E.stopPropagation()},onClick:E=>{E.stopPropagation(),E.preventDefault(),a(t)}}),f&&p.jsx("div",{className:"codicon "+T,style:{minWidth:16,marginRight:4},"aria-label":"["+T.replace("codicon","icon")+"]"}),typeof x=="string"?p.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:x}):x]}),!!_.length&&p.jsx("div",{id:v,role:"group",children:_.map(E=>e.get(E)&&p.jsx(Ng,{item:E,treeItems:e,selectedItem:n,onSelected:r,onAccepted:l,isError:o,toggleExpanded:a,highlightedItem:s,setHighlightedItem:i,render:c,title:u,icon:f,isKeyboardNavigation:d,setIsKeyboardNavigation:h},E.id))})]})}function ES(t,e,n,r,s=()=>!0){if(!s(t))return new Map;const i=new Map,o=new Set;for(let c=e==null?void 0:e.parent;c;c=c.parent)o.add(c.id);let l=null;const a=(c,u)=>{for(const f of c.children){if(!s(f))continue;const d=o.has(f.id)||n.get(f.id),h=r>u&&i.size<25&&d!==!1,v=f.children.length?d??h:void 0,m={depth:u,expanded:v,parent:t===c?null:c,next:null,prev:l};l&&(i.get(l).next=f),l=f,i.set(f,m),v&&a(f,u+1)}};return a(t,0),i}const Tt=N.forwardRef(function({children:e,title:n="",icon:r,disabled:s=!1,toggled:i=!1,onClick:o=()=>{},style:l,testId:a,className:c,ariaLabel:u},f){return p.jsxs("button",{ref:f,className:le(c,"toolbar-button",r,i&&"toggled"),onMouseDown:Qd,onClick:o,onDoubleClick:Qd,title:n,disabled:!!s,style:l,"data-testid":a,"aria-label":u||n,children:[r&&p.jsx("span",{className:`codicon codicon-${r}`,style:e?{marginRight:5}:{}}),e]})}),Qd=t=>{t.stopPropagation(),t.preventDefault()};function Cg(t){return t==="scheduled"?"codicon-clock":t==="running"?"codicon-loading":t==="failed"?"codicon-error":t==="passed"?"codicon-check":t==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function bS(t){return t==="scheduled"?"Pending":t==="running"?"Running":t==="failed"?"Failed":t==="passed"?"Passed":t==="skipped"?"Skipped":"Did not run"}const TS=kS,NS=({actions:t,selectedAction:e,selectedTime:n,setSelectedTime:r,sdkLanguage:s,onSelected:i,onHighlighted:o,revealConsole:l,revealAttachment:a,isLive:c})=>{const[u,f]=N.useState({expandedItems:new Map}),{rootItem:d,itemMap:h}=N.useMemo(()=>F1(t),[t]),{selectedItem:v}=N.useMemo(()=>({selectedItem:e?h.get(e.callId):void 0}),[h,e]),m=N.useCallback(_=>{var b,T;return!!((T=(b=_.action)==null?void 0:b.error)!=null&&T.message)},[]),w=N.useCallback(_=>r({minimum:_.action.startTime,maximum:_.action.endTime}),[r]),y=N.useCallback(_=>qu(_.action,{sdkLanguage:s,revealConsole:l,revealAttachment:a,isLive:c,showDuration:!0,showBadges:!0}),[c,l,a,s]),g=N.useCallback(_=>!n||!_.action||_.action.startTime<=n.maximum&&_.action.endTime>=n.minimum,[n]),S=N.useCallback(_=>{i==null||i(_.action)},[i]),x=N.useCallback(_=>{o==null||o(_==null?void 0:_.action)},[o]);return p.jsxs("div",{className:"vbox",children:[n&&p.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[p.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),p.jsx(TS,{name:"actions",rootItem:d,treeState:u,setTreeState:f,selectedItem:v,onSelected:S,onHighlighted:x,onAccepted:w,isError:m,isVisible:g,render:y})]})},qu=(t,e)=>{var v;const{sdkLanguage:n,revealConsole:r,revealAttachment:s,isLive:i,showDuration:o,showBadges:l}=e,{errors:a,warnings:c}=U1(t),u=!!((v=t.attachments)!=null&&v.length)&&!!s,f=Ag(t,n||"javascript"),d=t.class==="Test"&&t.method==="test.step.skip";let h="";return t.endTime?h=Pe(t.endTime-t.startTime):t.error?h="Timed out":i||(h="-"),p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"action-title",title:t.apiName,children:[p.jsx("span",{children:t.apiName}),f&&(f.type==="locator"?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"action-parameter action-locator-parameter",children:f.value}),f.childDisplayString&&p.jsx("span",{className:"action-parameter action-generic-parameter",children:f.childDisplayString.value})]}):p.jsx("span",{className:"action-parameter action-generic-parameter",children:f.value})),t.method==="goto"&&t.params.url&&p.jsx("div",{className:"action-url",title:t.params.url,children:t.params.url}),t.class==="APIRequestContext"&&t.params.url&&p.jsx("div",{className:"action-url",title:t.params.url,children:CS(t.params.url)})]}),(o||l||u||d)&&p.jsx("div",{className:"spacer"}),u&&p.jsx(Tt,{icon:"attach",title:"Open Attachment",onClick:()=>s(t.attachments[0])}),o&&!d&&p.jsx("div",{className:"action-duration",children:h||p.jsx("span",{className:"codicon codicon-loading"})}),d&&p.jsx("span",{className:le("action-skipped","codicon",Cg("skipped")),title:"skipped"}),l&&p.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!a&&p.jsxs("div",{className:"action-icon",children:[p.jsx("span",{className:"codicon codicon-error"}),p.jsx("span",{className:"action-icon-value",children:a})]}),!!c&&p.jsxs("div",{className:"action-icon",children:[p.jsx("span",{className:"codicon codicon-warning"}),p.jsx("span",{className:"action-icon-value",children:c})]})]})]})};function CS(t){try{const e=new URL(t);return e.pathname+e.search}catch{return t}}const AS=t=>{switch(t.method){case"clockPauseAt":case"clockSetFixedTime":case"clockSetSystemTime":return t.params.timeString===void 0&&t.params.timeNumber===void 0?void 0:{type:"generic",value:new Date(t.params.timeString??t.params.timeNumber).toLocaleString(void 0,{timeZone:"UTC"})};case"clockFastForward":case"clockRunFor":return t.params.ticksNumber===void 0&&t.params.ticksString===void 0?void 0:{type:"generic",value:t.params.ticksString??`${t.params.ticksNumber}ms`}}},LS=t=>{switch(t.method){case"press":case"keyboardPress":case"keyboardDown":case"keyboardUp":return t.params.key===void 0?void 0:{type:"generic",value:t.params.key};case"type":case"fill":case"keyboardType":case"keyboardInsertText":{const e=t.params.text??t.params.value;return e===void 0?void 0:{type:"generic",value:`"${e}"`}}}},IS=t=>{switch(t.method){case"click":case"dblclick":case"mouseClick":case"mouseMove":return t.params.x===void 0||t.params.y===void 0?void 0:{type:"generic",value:`(${t.params.x}, ${t.params.y})`};case"mouseWheel":return t.params.deltaX===void 0||t.params.deltaY===void 0?void 0:{type:"generic",value:`(${t.params.deltaX}, ${t.params.deltaY})`}}},jS=t=>{switch(t.method){case"tap":return t.params.x===void 0||t.params.y===void 0?void 0:{type:"generic",value:`(${t.params.x}, ${t.params.y})`}}},Ag=(t,e,n=!1)=>{const r=t.params;if(!n&&r.selector!==void 0)return{type:"locator",value:Sn(e,r.selector),childDisplayString:Ag(t,e,!0)};switch(t.class.toLowerCase()){case"browsercontext":return AS(t);case"page":case"frame":case"elementhandle":return LS(t)??IS(t)??jS(t)}},Lg=({value:t,description:e})=>{const[n,r]=N.useState("copy"),s=N.useCallback(()=>{(typeof t=="function"?t():Promise.resolve(t)).then(o=>{navigator.clipboard.writeText(o).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[t]);return p.jsx(Tt,{title:e||"Copy",icon:n,onClick:s})},wa=({value:t,description:e})=>{const n=N.useCallback(async()=>{const r=typeof t=="function"?await t():t;await navigator.clipboard.writeText(r)},[t]);return p.jsx(Tt,{title:e,onClick:n,className:"copy-to-clipboard-text-button",children:e})},Yn=({text:t})=>p.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:t}),MS=({action:t,startTimeOffset:e,sdkLanguage:n})=>{const r=N.useMemo(()=>Object.keys((t==null?void 0:t.params)??{}).filter(l=>l!=="info"),[t]);if(!t)return p.jsx(Yn,{text:"No action selected"});const s=t.startTime-e,i=Pe(s),o=t.endTime?Pe(t.endTime-t.startTime):"Timed Out";return p.jsxs("div",{className:"call-tab",children:[p.jsx("div",{className:"call-line",children:t.apiName}),p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"call-section",children:"Time"}),p.jsx(Xd,{name:"start:",value:i}),p.jsx(Xd,{name:"duration:",value:o})]}),!!r.length&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"call-section",children:"Parameters"}),r.map(l=>Gd(Jd(t,l,t.params[l],n)))]}),!!t.result&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(t.result).map(l=>Gd(Jd(t,l,t.result[l],n)))]})]})},Xd=({name:t,value:e})=>p.jsxs("div",{className:"call-line",children:[t,p.jsx("span",{className:"call-value datetime",title:e,children:e})]});function Gd(t){let e=t.text.replace(/\n/g,"↵");return t.type==="string"&&(e=`"${e}"`),p.jsxs("div",{className:"call-line",children:[t.name,":",p.jsx("span",{className:le("call-value",t.type),title:t.text,children:e}),["string","number","object","locator"].includes(t.type)&&p.jsx(Lg,{value:t.text})]},t.name)}function Jd(t,e,n,r){const s=t.method.includes("eval")||t.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&s)&&(n=Jo(n.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&s||e==="received"&&t.method==="expect")&&(n=Jo(n,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:Sn(r||"javascript",t.params.selector),type:"locator",name:"locator"};const i=typeof n;return i!=="object"||n===null?{text:String(n),type:i,name:e}:n.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(n).slice(0,1e3),type:"object",name:e}}function Jo(t,e){if(t.n!==void 0)return t.n;if(t.s!==void 0)return t.s;if(t.b!==void 0)return t.b;if(t.v!==void 0){if(t.v==="undefined")return;if(t.v==="null")return null;if(t.v==="NaN")return NaN;if(t.v==="Infinity")return 1/0;if(t.v==="-Infinity")return-1/0;if(t.v==="-0")return-0}if(t.d!==void 0)return new Date(t.d);if(t.r!==void 0)return new RegExp(t.r.p,t.r.f);if(t.a!==void 0)return t.a.map(n=>Jo(n,e));if(t.o!==void 0){const n={};for(const{k:r,v:s}of t.o)n[r]=Jo(s,e);return n}return t.h!==void 0?e===void 0?"<object>":e[t.h]:"<object>"}const Yd=new Map;function Tl({name:t,items:e=[],id:n,render:r,icon:s,isError:i,isWarning:o,isInfo:l,selectedItem:a,onAccepted:c,onSelected:u,onHighlighted:f,onIconClicked:d,noItemsMessage:h,dataTestId:v,notSelectable:m}){const w=N.useRef(null),[y,g]=N.useState();return N.useEffect(()=>{f==null||f(y)},[f,y]),N.useEffect(()=>{const S=w.current;if(!S)return;const x=()=>{Yd.set(t,S.scrollTop)};return S.addEventListener("scroll",x,{passive:!0}),()=>S.removeEventListener("scroll",x)},[t]),N.useEffect(()=>{w.current&&(w.current.scrollTop=Yd.get(t)||0)},[t]),p.jsx("div",{className:le("list-view vbox",t+"-list-view"),role:e.length>0?"list":void 0,"data-testid":v||t+"-list",children:p.jsxs("div",{className:le("list-view-content",m&&"not-selectable"),tabIndex:0,onKeyDown:S=>{var T;if(a&&S.key==="Enter"){c==null||c(a,e.indexOf(a));return}if(S.key!=="ArrowDown"&&S.key!=="ArrowUp")return;S.stopPropagation(),S.preventDefault();const x=a?e.indexOf(a):-1;let _=x;S.key==="ArrowDown"&&(x===-1?_=0:_=Math.min(x+1,e.length-1)),S.key==="ArrowUp"&&(x===-1?_=e.length-1:_=Math.max(x-1,0));const b=(T=w.current)==null?void 0:T.children.item(_);Gh(b||void 0),f==null||f(void 0),u==null||u(e[_],_),g(void 0)},ref:w,children:[h&&e.length===0&&p.jsx("div",{className:"list-view-empty",children:h}),e.map((S,x)=>{const _=r(S,x);return p.jsxs("div",{onDoubleClick:()=>c==null?void 0:c(S,x),role:"listitem",className:le("list-view-entry",a===S&&"selected",!m&&y===S&&"highlighted",(i==null?void 0:i(S,x))&&"error",(o==null?void 0:o(S,x))&&"warning",(l==null?void 0:l(S,x))&&"info"),onClick:()=>u==null?void 0:u(S,x),onMouseEnter:()=>g(S),onMouseLeave:()=>g(void 0),children:[s&&p.jsx("div",{className:"codicon "+(s(S,x)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:b=>{b.preventDefault(),b.stopPropagation()},onClick:b=>{b.stopPropagation(),b.preventDefault(),d==null||d(S,x)}}),typeof _=="string"?p.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:_}):_]},(n==null?void 0:n(S,x))||x)})]})})}const OS=Tl,$S=({action:t,isLive:e})=>{const n=N.useMemo(()=>{var o;if(!t||!t.log.length)return[];const r=t.log,s=t.context.wallTime-t.context.startTime,i=[];for(let l=0;l<r.length;++l){let a="";if(r[l].time!==-1){const c=(o=r[l])==null?void 0:o.time;l+1<r.length?a=Pe(r[l+1].time-c):t.endTime>0?a=Pe(t.endTime-c):e?a=Pe(Date.now()-s-c):a="-"}i.push({message:r[l].message,time:a})}return i},[t,e]);return n.length?p.jsx(OS,{name:"log",items:n,render:r=>p.jsxs("div",{className:"log-list-item",children:[p.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):p.jsx(Yn,{text:"No log entries"})};function ci(t,e){const n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let s,i={},o=!1,l=e==null?void 0:e.fg,a=e==null?void 0:e.bg;for(;(s=n.exec(t))!==null;){const[,,c,,u]=s;if(c){const f=+c;switch(f){case 0:i={};break;case 1:i["font-weight"]="bold";break;case 2:i.opacity="0.8";break;case 3:i["font-style"]="italic";break;case 4:i["text-decoration"]="underline";break;case 7:o=!0;break;case 8:i.display="none";break;case 9:i["text-decoration"]="line-through";break;case 22:delete i["font-weight"],delete i["font-style"],delete i.opacity,delete i["text-decoration"];break;case 23:delete i["font-weight"],delete i["font-style"],delete i.opacity;break;case 24:delete i["text-decoration"];break;case 27:o=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:l=Zd[f-30];break;case 39:l=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:a=Zd[f-40];break;case 49:a=e==null?void 0:e.bg;break;case 53:i["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:l=eh[f-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:a=eh[f-100];break}}else if(u){const f={...i},d=o?a:l;d!==void 0&&(f.color=d);const h=o?l:a;h!==void 0&&(f["background-color"]=h),r.push(`<span style="${RS(f)}">${PS(u)}</span>`)}}return r.join("")}const Zd={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)"},eh={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 PS(t){return t.replace(/[&"<>]/g,e=>({"&":"&",'"':""","<":"<",">":">"})[e])}function RS(t){return Object.entries(t).map(([e,n])=>`${e}: ${n}`).join("; ")}const DS=({error:t})=>{const e=N.useMemo(()=>ci(t),[t]);return p.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})};function FS(t){return N.useMemo(()=>{if(!t)return{errors:new Map};const e=new Map;for(const n of t.errorDescriptors)e.set(n.message,n);return{errors:e}},[t])}const zS=({errorsModel:t,sdkLanguage:e,revealInSource:n})=>t.errors.size?p.jsx("div",{className:"fill",style:{overflow:"auto"},children:[...t.errors.entries()].map(([r,s])=>{var a;let i,o;const l=(a=s.stack)==null?void 0:a[0];return l&&(i=l.file.replace(/.*[/\\](.*)/,"$1")+":"+l.line,o=l.file+":"+l.line),p.jsxs("div",{children:[p.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)"},children:[s.action&&qu(s.action,{sdkLanguage:e}),i&&p.jsxs("div",{className:"action-location",children:["@ ",p.jsx("span",{title:o,onClick:()=>n(s),children:i})]})]}),p.jsx(DS,{error:r})]},r)})}):p.jsx(Yn,{text:"No errors"}),BS=Tl;function US(t,e){const{entries:n}=N.useMemo(()=>{if(!t)return{entries:[]};const s=[];for(const i of t.events){if(i.type==="console"){const o=i.args&&i.args.length?VS(i.args):Ig(i.text),l=i.location.url,c=`${l?l.substring(l.lastIndexOf("/")+1):"<anonymous>"}:${i.location.lineNumber}`;s.push({browserMessage:{body:o,location:c},isError:i.messageType==="error",isWarning:i.messageType==="warning",timestamp:i.time})}i.type==="event"&&i.method==="pageError"&&s.push({browserError:i.params.error,isError:!0,isWarning:!1,timestamp:i.time})}for(const i of t.stdio){let o="";i.text&&(o=ci(i.text.trim())||""),i.base64&&(o=ci(atob(i.base64).trim())||""),s.push({nodeMessage:{html:o},isError:i.type==="stderr",isWarning:!1,timestamp:i.timestamp})}return s.sort((i,o)=>i.timestamp-o.timestamp),{entries:s}},[t]);return{entries:N.useMemo(()=>e?n.filter(s=>s.timestamp>=e.minimum&&s.timestamp<=e.maximum):n,[n,e])}}const HS=({consoleModel:t,boundaries:e,onEntryHovered:n,onAccepted:r})=>t.entries.length?p.jsx("div",{className:"console-tab",children:p.jsx(BS,{name:"console",onAccepted:r,onHighlighted:n,items:t.entries,isError:s=>s.isError,isWarning:s=>s.isWarning,render:s=>{const i=Pe(s.timestamp-e.minimum),o=p.jsx("span",{className:"console-time",children:i}),l=s.isError?"status-error":s.isWarning?"status-warning":"status-none",a=s.browserMessage||s.browserError?p.jsx("span",{className:le("codicon","codicon-browser",l),title:"Browser message"}):p.jsx("span",{className:le("codicon","codicon-file",l),title:"Runner message"});let c,u,f,d;const{browserMessage:h,browserError:v,nodeMessage:m}=s;if(h&&(c=h.location,u=h.body),v){const{error:w,value:y}=v;w?(u=w.message,d=w.stack):u=String(y)}return m&&(f=m.html),p.jsxs("div",{className:"console-line",children:[o,a,c&&p.jsx("span",{className:"console-location",children:c}),u&&p.jsx("span",{className:"console-line-message",children:u}),f&&p.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:f}}),d&&p.jsx("div",{className:"console-stack",children:d})]})}})}):p.jsx(Yn,{text:"No console entries"});function VS(t){if(t.length===1)return Ig(t[0].preview);const e=typeof t[0].value=="string"&&t[0].value.includes("%"),n=e?t[0].value:"",r=e?t.slice(1):t;let s=0;const i=/%([%sdifoOc])/g;let o;const l=[];let a=[];l.push(p.jsx("span",{children:a}));let c=0;for(;(o=i.exec(n))!==null;){const u=n.substring(c,o.index);a.push(p.jsx("span",{children:u})),c=o.index+2;const f=o[0][1];if(f==="%")a.push(p.jsx("span",{children:"%"}));else if(f==="s"||f==="o"||f==="O"||f==="d"||f==="i"||f==="f"){const d=r[s++],h={};typeof(d==null?void 0:d.value)!="string"&&(h.color="var(--vscode-debugTokenExpression-number)"),a.push(p.jsx("span",{style:h,children:(d==null?void 0:d.preview)||""}))}else if(f==="c"){a=[];const d=r[s++],h=d?qS(d.preview):{};l.push(p.jsx("span",{style:h,children:a}))}}for(c<n.length&&a.push(p.jsx("span",{children:n.substring(c)}));s<r.length;s++){const u=r[s],f={};a.length&&a.push(p.jsx("span",{children:" "})),typeof(u==null?void 0:u.value)!="string"&&(f.color="var(--vscode-debugTokenExpression-number)"),a.push(p.jsx("span",{style:f,children:(u==null?void 0:u.preview)||""}))}return l}function Ig(t){return[p.jsx("span",{dangerouslySetInnerHTML:{__html:ci(t.trim())}})]}function qS(t){try{const e={},n=t.split(";");for(const r of n){const s=r.trim();if(!s)continue;let[i,o]=s.split(":");if(i=i.trim(),o=o.trim(),!WS(i))continue;const l=i.replace(/-([a-z])/g,a=>a[1].toUpperCase());e[l]=o}return e}catch{return{}}}function WS(t){return["background","border","color","font","line","margin","padding","text"].some(n=>t.startsWith(n))}const Wu=({noShadow:t,children:e,noMinHeight:n,className:r,sidebarBackground:s,onClick:i})=>p.jsx("div",{className:le("toolbar",t&&"no-shadow",n&&"no-min-height",r,s&&"toolbar-sidebar-background"),onClick:i,children:e}),Pc=({tabs:t,selectedTab:e,setSelectedTab:n,leftToolbar:r,rightToolbar:s,dataTestId:i,mode:o})=>{const l=N.useId();return e||(e=t[0].id),o||(o="default"),p.jsx("div",{className:"tabbed-pane","data-testid":i,children:p.jsxs("div",{className:"vbox",children:[p.jsxs(Wu,{children:[r&&p.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),o==="default"&&p.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...t.map(a=>p.jsx(jg,{id:a.id,ariaControls:`${l}-${a.id}`,title:a.title,count:a.count,errorCount:a.errorCount,selected:e===a.id,onSelect:n},a.id))]}),o==="select"&&p.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:p.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},onChange:a=>{n==null||n(t[a.currentTarget.selectedIndex].id)},children:t.map(a=>{let c="";return a.count&&(c=` (${a.count})`),a.errorCount&&(c=` (${a.errorCount})`),p.jsxs("option",{value:a.id,selected:a.id===e,role:"tab","aria-controls":`${l}-${a.id}`,children:[a.title,c]},a.id)})})}),s&&p.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...s]})]}),t.map(a=>{const c="tab-content tab-"+a.id;if(a.component)return p.jsx("div",{id:`${l}-${a.id}`,role:"tabpanel","aria-label":a.title,className:c,style:{display:e===a.id?"inherit":"none"},children:a.component},a.id);if(e===a.id)return p.jsx("div",{id:`${l}-${a.id}`,role:"tabpanel","aria-label":a.title,className:c,children:a.render()},a.id)})]})})},jg=({id:t,title:e,count:n,errorCount:r,selected:s,onSelect:i,ariaControls:o})=>p.jsxs("div",{className:le("tabbed-pane-tab",s&&"selected"),onClick:()=>i==null?void 0:i(t),role:"tab",title:e,"aria-controls":o,children:[p.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!n&&p.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&p.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]}),KS="modulepreload",QS=function(t,e){return new URL(t,e).href},th={},XS=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));s=Promise.allSettled(n.map(c=>{if(c=QS(c,r),c in th)return;th[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(!!r)for(let v=o.length-1;v>=0;v--){const m=o[v];if(m.href===c&&(!u||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":KS,u||(h.as="script"),h.crossOrigin="",h.href=c,a&&h.setAttribute("nonce",a),document.head.appendChild(h),u)return new Promise((v,m)=>{h.addEventListener("load",v),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return e().catch(i)})},GS=20,Wr=({text:t,language:e,mimeType:n,linkify:r,readOnly:s,highlight:i,revealLine:o,lineNumbers:l,isFocused:a,focusOnChange:c,wrapLines:u,onChange:f,dataTestId:d,placeholder:h})=>{const[v,m]=Xn(),[w]=N.useState(XS(()=>import("./codeMirrorModule-D55P_UuL.js"),__vite__mapDeps([0,1]),import.meta.url).then(x=>x.default)),y=N.useRef(null),[g,S]=N.useState();return N.useEffect(()=>{(async()=>{var E,k;const x=await w;YS(x);const _=m.current;if(!_)return;const b=ex(e)||ZS(n)||(r?"text/linkified":"");if(y.current&&b===y.current.cm.getOption("mode")&&!!s===y.current.cm.getOption("readOnly")&&l===y.current.cm.getOption("lineNumbers")&&u===y.current.cm.getOption("lineWrapping")&&h===y.current.cm.getOption("placeholder"))return;(k=(E=y.current)==null?void 0:E.cm)==null||k.getWrapperElement().remove();const T=x(_,{value:"",mode:b,readOnly:!!s,lineNumbers:l,lineWrapping:u,placeholder:h});return y.current={cm:T},a&&T.focus(),S(T),T})()},[w,g,m,e,n,r,l,u,s,a,h]),N.useEffect(()=>{y.current&&y.current.cm.setSize(v.width,v.height)},[v]),N.useLayoutEffect(()=>{var b;if(!g)return;let x=!1;if(g.getValue()!==t&&(g.setValue(t),x=!0,c&&(g.execCommand("selectAll"),g.focus())),x||JSON.stringify(i)!==JSON.stringify(y.current.highlight)){for(const k of y.current.highlight||[])g.removeLineClass(k.line-1,"wrap");for(const k of i||[])g.addLineClass(k.line-1,"wrap",`source-line-${k.type}`);for(const k of y.current.widgets||[])g.removeLineWidget(k);for(const k of y.current.markers||[])k.clear();const T=[],E=[];for(const k of i||[]){if(k.type!=="subtle-error"&&k.type!=="error")continue;const A=(b=y.current)==null?void 0:b.cm.getLine(k.line-1);if(A){const L={};L.title=k.message||"",E.push(g.markText({line:k.line-1,ch:0},{line:k.line-1,ch:k.column||A.length},{className:"source-line-error-underline",attributes:L}))}if(k.type==="error"){const L=document.createElement("div");L.innerHTML=ci(k.message||""),L.className="source-line-error-widget",T.push(g.addLineWidget(k.line,L,{above:!0,coverGutter:!1}))}}y.current.highlight=i,y.current.widgets=T,y.current.markers=E}typeof o=="number"&&y.current.cm.lineCount()>=o&&g.scrollIntoView({line:Math.max(0,o-1),ch:0},50);let _;return f&&(_=()=>f(g.getValue()),g.on("change",_)),()=>{_&&g.off("change",_)}},[g,t,i,o,c,f]),p.jsx("div",{"data-testid":d,className:"cm-wrapper",ref:m,onClick:JS})};function JS(t){var n;if(!(t.target instanceof HTMLElement))return;let e;t.target.classList.contains("cm-linkified")?e=t.target.textContent:t.target.classList.contains("cm-link")&&((n=t.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(e=t.target.nextElementSibling.textContent.slice(1,-1)),e&&(t.preventDefault(),t.stopPropagation(),window.open(e,"_blank"))}let nh=!1;function YS(t){nh||(nh=!0,t.defineSimpleMode("text/linkified",{start:[{regex:Jh,token:"linkified"}]}))}function ZS(t){if(t){if(t.includes("javascript")||t.includes("json"))return"javascript";if(t.includes("python"))return"python";if(t.includes("csharp"))return"text/x-csharp";if(t.includes("java"))return"text/x-java";if(t.includes("markdown"))return"markdown";if(t.includes("html")||t.includes("svg"))return"htmlmixed";if(t.includes("css"))return"css"}}function ex(t){if(t)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[t]}async function tx(t){const e=navigator.platform.includes("Win")?"win":"unix";let n=[];const r=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function s(f){const d='^"';return d+f.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^
|
|
43
|
-
|
|
44
|
-
`)+d}function i(f){function d(h){let m=h.charCodeAt(0).toString(16);for(;m.length<4;)m="0"+m;return"\\u"+m}return/[\0-\x1F\x7F-\x9F!]|\'/.test(f)?"$'"+f.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,d)+"'":"'"+f+"'"}const o=e==="win"?s:i;n.push(o(t.request.url).replace(/[[{}\]]/g,"\\$&"));let l="GET";const a=[],c=await Mg(t);c&&(a.push("--data-raw "+o(c)),r.add("content-length"),l="POST"),t.request.method!==l&&n.push("-X "+o(t.request.method));const u=t.request.headers;for(let f=0;f<u.length;f++){const d=u[f],h=d.name.replace(/^:/,"");r.has(h.toLowerCase())||(d.value.trim()?n.push("-H "+o(h+": "+d.value)):n.push("-H "+o(h+";")))}return n=n.concat(a),"curl "+n.join(n.length>=3?e==="win"?` ^
|
|
45
|
-
`:` \\
|
|
46
|
-
`:" ")}async function nx(t,e=0){const n=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"]),r=new Set(["cookie","authorization"]),s=JSON.stringify(t.request.url),i=t.request.headers,o=i.reduce((v,m)=>{const w=m.name;return!n.has(w.toLowerCase())&&!w.includes(":")&&v.append(w,m.value),v},new Headers),l={};for(const v of o)l[v[0]]=v[1];const a=t.request.cookies.length||i.some(({name:v})=>r.has(v.toLowerCase()))?"include":"omit",c=i.find(({name:v})=>v.toLowerCase()==="referer"),u=c?c.value:void 0,f=await Mg(t),d={headers:Object.keys(l).length?l:void 0,referrer:u,body:f,method:t.request.method,mode:"cors"};if(e===1){const v=i.find(w=>w.name.toLowerCase()==="cookie"),m={};delete d.mode,v&&(m.cookie=v.value),u&&(delete d.referrer,m.Referer=u),Object.keys(m).length&&(d.headers={...l,...m})}else d.credentials=a;const h=JSON.stringify(d,null,2);return`fetch(${s}, ${h});`}async function Mg(t){var e,n;return(e=t.request.postData)!=null&&e._sha1?await fetch(`sha1/${t.request.postData._sha1}`).then(r=>r.text()):(n=t.request.postData)==null?void 0:n.text}class rx{generatePlaywrightRequestCall(e,n){let r=e.method.toLowerCase();const s=new URL(e.url),i=`${s.origin}${s.pathname}`,o={};["delete","get","head","post","put","patch"].includes(r)||(o.method=r,r="fetch"),s.searchParams.size&&(o.params=Object.fromEntries(s.searchParams.entries())),n&&(o.data=n),e.headers.length&&(o.headers=Object.fromEntries(e.headers.map(c=>[c.name,c.value])));const l=[`'${i}'`];return Object.keys(o).length>0&&l.push(this.prettyPrintObject(o)),`await page.request.${r}(${l.join(", ")});`}prettyPrintObject(e,n=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 l=" ".repeat(r*n),a=" ".repeat((r+1)*n);return`[
|
|
47
|
-
${e.map(u=>`${a}${this.prettyPrintObject(u,n,r+1)}`).join(`,
|
|
48
|
-
`)}
|
|
49
|
-
${l}]`}if(Object.keys(e).length===0)return"{}";const s=" ".repeat(r*n),i=" ".repeat((r+1)*n);return`{
|
|
50
|
-
${Object.entries(e).map(([l,a])=>{const c=this.prettyPrintObject(a,n,r+1),u=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(l)?l:this.stringLiteral(l);return`${i}${u}: ${c}`}).join(`,
|
|
51
|
-
`)}
|
|
52
|
-
${s}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
|
|
53
|
-
`)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class sx{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),i=[`"${`${r.origin}${r.pathname}`}"`];let o=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(o)||(i.push(`method="${o}"`),o="fetch"),r.searchParams.size&&i.push(`params=${this.prettyPrintObject(Object.fromEntries(r.searchParams.entries()))}`),n&&i.push(`data=${this.prettyPrintObject(n)}`),e.headers.length&&i.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(a=>[a.name,a.value])))}`);const l=i.length===1?i[0]:`
|
|
54
|
-
${i.map(a=>this.indent(a,2)).join(`,
|
|
55
|
-
`)}
|
|
56
|
-
`;return`await page.request.${o}(${l})`}indent(e,n){return e.split(`
|
|
57
|
-
`).map(r=>" ".repeat(n)+r).join(`
|
|
58
|
-
`)}prettyPrintObject(e,n=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 l=" ".repeat(r*n),a=" ".repeat((r+1)*n);return`[
|
|
59
|
-
${e.map(u=>`${a}${this.prettyPrintObject(u,n,r+1)}`).join(`,
|
|
60
|
-
`)}
|
|
61
|
-
${l}]`}if(Object.keys(e).length===0)return"{}";const s=" ".repeat(r*n),i=" ".repeat((r+1)*n);return`{
|
|
62
|
-
${Object.entries(e).map(([l,a])=>{const c=this.prettyPrintObject(a,n,r+1);return`${i}${this.stringLiteral(l)}: ${c}`}).join(`,
|
|
63
|
-
`)}
|
|
64
|
-
${s}}`}stringLiteral(e){return JSON.stringify(e)}}class ix{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),s=`${r.origin}${r.pathname}`,i={},o=[];let l=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(l)||(i.Method=l,l="fetch"),r.searchParams.size&&(i.Params=Object.fromEntries(r.searchParams.entries())),n&&(i.Data=n),e.headers.length&&(i.Headers=Object.fromEntries(e.headers.map(u=>[u.name,u.value])));const a=[`"${s}"`];return Object.keys(i).length>0&&a.push(this.prettyPrintObject(i)),`${o.join(`
|
|
65
|
-
`)}${o.length?`
|
|
66
|
-
`:""}await request.${this.toFunctionName(l)}(${a.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,n=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 l=" ".repeat(r*n),a=" ".repeat((r+1)*n);return`new object[] {
|
|
67
|
-
${e.map(u=>`${a}${this.prettyPrintObject(u,n,r+1)}`).join(`,
|
|
68
|
-
`)}
|
|
69
|
-
${l}}`}if(Object.keys(e).length===0)return"new {}";const s=" ".repeat(r*n),i=" ".repeat((r+1)*n);return`new() {
|
|
70
|
-
${Object.entries(e).map(([l,a])=>{const c=this.prettyPrintObject(a,n,r+1),u=r===0?l:`[${this.stringLiteral(l)}]`;return`${i}${u} = ${c}`}).join(`,
|
|
71
|
-
`)}
|
|
72
|
-
${s}}`}stringLiteral(e){return JSON.stringify(e)}}class ox{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),s=[`"${r.origin}${r.pathname}"`],i=[];let o=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(o)||(i.push(`setMethod("${o}")`),o="fetch");for(const[l,a]of r.searchParams)i.push(`setQueryParam(${this.stringLiteral(l)}, ${this.stringLiteral(a)})`);n&&i.push(`setData(${this.stringLiteral(n)})`);for(const l of e.headers)i.push(`setHeader(${this.stringLiteral(l.name)}, ${this.stringLiteral(l.value)})`);return i.length>0&&s.push(`RequestOptions.create()
|
|
73
|
-
.${i.join(`
|
|
74
|
-
.`)}
|
|
75
|
-
`),`request.${o}(${s.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function lx(t){if(t==="javascript")return new rx;if(t==="python")return new sx;if(t==="csharp")return new ix;if(t==="java")return new ox;throw new Error("Unsupported language: "+t)}const ax=({resource:t,sdkLanguage:e,startTimeOffset:n,onClose:r})=>{const[s,i]=N.useState("request");return p.jsx(Pc,{dataTestId:"network-request-details",leftToolbar:[p.jsx(Tt,{icon:"close",title:"Close",onClick:r},"close")],tabs:[{id:"request",title:"Request",render:()=>p.jsx(cx,{resource:t,sdkLanguage:e,startTimeOffset:n})},{id:"response",title:"Response",render:()=>p.jsx(ux,{resource:t})},{id:"body",title:"Body",render:()=>p.jsx(fx,{resource:t})}],selectedTab:s,setSelectedTab:i})},cx=({resource:t,sdkLanguage:e,startTimeOffset:n})=>{const[r,s]=N.useState(null);return N.useEffect(()=>{(async()=>{if(t.request.postData){const o=t.request.headers.find(a=>a.name.toLowerCase()==="content-type"),l=o?o.value:"";if(t.request.postData._sha1){const a=await fetch(`sha1/${t.request.postData._sha1}`);s({text:Rc(await a.text(),l),mimeType:l})}else s({text:Rc(t.request.postData.text,l),mimeType:l})}else s(null)})()},[t]),p.jsxs("div",{className:"network-request-details-tab",children:[p.jsx("div",{className:"network-request-details-header",children:"General"}),p.jsx("div",{className:"network-request-details-url",children:`URL: ${t.request.url}`}),p.jsx("div",{className:"network-request-details-general",children:`Method: ${t.request.method}`}),t.response.status!==-1&&p.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",p.jsx("span",{className:hx(t.response.status),style:{display:"inline-flex"},children:`${t.response.status} ${t.response.statusText}`})]}),t.request.queryString.length?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),p.jsx("div",{className:"network-request-details-headers",children:t.request.queryString.map(i=>`${i.name}: ${i.value}`).join(`
|
|
76
|
-
`)})]}):null,p.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),p.jsx("div",{className:"network-request-details-headers",children:t.request.headers.map(i=>`${i.name}: ${i.value}`).join(`
|
|
77
|
-
`)}),p.jsx("div",{className:"network-request-details-header",children:"Time"}),p.jsx("div",{className:"network-request-details-general",children:`Start: ${Pe(n)}`}),p.jsx("div",{className:"network-request-details-general",children:`Duration: ${Pe(t.time)}`}),p.jsxs("div",{className:"network-request-details-copy",children:[p.jsx(wa,{description:"Copy as cURL",value:()=>tx(t)}),p.jsx(wa,{description:"Copy as Fetch",value:()=>nx(t)}),p.jsx(wa,{description:"Copy as Playwright",value:async()=>lx(e).generatePlaywrightRequestCall(t.request,r==null?void 0:r.text)})]}),r&&p.jsx("div",{className:"network-request-details-header",children:"Request Body"}),r&&p.jsx(Wr,{text:r.text,mimeType:r.mimeType,readOnly:!0,lineNumbers:!0})]})},ux=({resource:t})=>p.jsxs("div",{className:"network-request-details-tab",children:[p.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),p.jsx("div",{className:"network-request-details-headers",children:t.response.headers.map(e=>`${e.name}: ${e.value}`).join(`
|
|
78
|
-
`)})]}),fx=({resource:t})=>{const[e,n]=N.useState(null);return N.useEffect(()=>{(async()=>{if(t.response.content._sha1){const s=t.response.content.mimeType.includes("image"),i=t.response.content.mimeType.includes("font"),o=await fetch(`sha1/${t.response.content._sha1}`);if(s){const l=await o.blob(),a=new FileReader,c=new Promise(u=>a.onload=u);a.readAsDataURL(l),n({dataUrl:(await c).target.result})}else if(i){const l=await o.arrayBuffer();n({font:l})}else{const l=Rc(await o.text(),t.response.content.mimeType);n({text:l,mimeType:t.response.content.mimeType})}}else n(null)})()},[t]),p.jsxs("div",{className:"network-request-details-tab",children:[!t.response.content._sha1&&p.jsx("div",{children:"Response body is not available for this request."}),e&&e.font&&p.jsx(dx,{font:e.font}),e&&e.dataUrl&&p.jsx("img",{draggable:"false",src:e.dataUrl}),e&&e.text&&p.jsx(Wr,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})]})},dx=({font:t})=>{const[e,n]=N.useState(!1);return N.useEffect(()=>{let r;try{r=new FontFace("font-preview",t),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&n(!0)}catch{n(!0)}return()=>{document.fonts.delete(r)}},[t]),e?p.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):p.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",p.jsx("br",{}),"NOPQRSTUVWXYZ",p.jsx("br",{}),"abcdefghijklm",p.jsx("br",{}),"nopqrstuvwxyz",p.jsx("br",{}),"1234567890"]})};function hx(t){return t<300||t===304?"green-circle":t<400?"yellow-circle":"red-circle"}function Rc(t,e){if(t===null)return"Loading...";const n=t;if(n==="")return"<Empty>";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(n),null,2)}catch{return n}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(n):n}const Og=({cursor:t,onPaneMouseMove:e,onPaneMouseUp:n,onPaneDoubleClick:r})=>(tt.useEffect(()=>{const s=document.createElement("div");return s.style.position="fixed",s.style.top="0",s.style.right="0",s.style.bottom="0",s.style.left="0",s.style.zIndex="9999",s.style.cursor=t,document.body.appendChild(s),e&&s.addEventListener("mousemove",e),n&&s.addEventListener("mouseup",n),r&&document.body.addEventListener("dblclick",r),()=>{e&&s.removeEventListener("mousemove",e),n&&s.removeEventListener("mouseup",n),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(s)}},[t,e,n,r]),p.jsx(p.Fragment,{})),px={position:"absolute",top:0,right:0,bottom:0,left:0},$g=({orientation:t,offsets:e,setOffsets:n,resizerColor:r,resizerWidth:s,minColumnWidth:i})=>{const o=i||0,[l,a]=tt.useState(null),[c,u]=Xn(),f={position:"absolute",right:t==="horizontal"?void 0:0,bottom:t==="horizontal"?0:void 0,width:t==="horizontal"?7:void 0,height:t==="horizontal"?void 0:7,borderTopWidth:t==="horizontal"?void 0:(7-s)/2,borderRightWidth:t==="horizontal"?(7-s)/2:void 0,borderBottomWidth:t==="horizontal"?void 0:(7-s)/2,borderLeftWidth:t==="horizontal"?(7-s)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:t==="horizontal"?"ew-resize":"ns-resize"};return p.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-s)/2,zIndex:100,pointerEvents:"none"},ref:u,children:[!!l&&p.jsx(Og,{cursor:t==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>a(null),onPaneMouseMove:d=>{if(!d.buttons)a(null);else if(l){const h=t==="horizontal"?d.clientX-l.clientX:d.clientY-l.clientY,v=l.offset+h,m=l.index>0?e[l.index-1]:0,w=t==="horizontal"?c.width:c.height,y=Math.min(Math.max(m+o,v),w-o)-e[l.index];for(let g=l.index;g<e.length;++g)e[g]=e[g]+y;n([...e])}}}),e.map((d,h)=>p.jsx("div",{style:{...f,top:t==="horizontal"?0:d,left:t==="horizontal"?d:0,pointerEvents:"initial"},onMouseDown:v=>a({clientX:v.clientX,clientY:v.clientY,offset:d,index:h}),children:p.jsx("div",{style:{...px,background:r}})},h))]})};function mx(t){const[e,n]=N.useState([]);N.useEffect(()=>{const i=[];for(let o=0;o<t.columns.length-1;++o){const l=t.columns[o];i[o]=(i[o-1]||0)+t.columnWidths.get(l)}n(i)},[t.columns,t.columnWidths]);function r(i){const o=new Map(t.columnWidths.entries());for(let l=0;l<i.length;++l){const a=i[l]-(i[l-1]||0),c=t.columns[l];o.set(c,a)}t.setColumnWidths(o)}const s=N.useCallback(i=>{var o,l;(l=t.setSorting)==null||l.call(t,{by:i,negate:((o=t.sorting)==null?void 0:o.by)===i?!t.sorting.negate:!1})},[t]);return p.jsxs("div",{className:`grid-view ${t.name}-grid-view`,children:[p.jsx($g,{orientation:"horizontal",offsets:e,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),p.jsxs("div",{className:"vbox",children:[p.jsx("div",{className:"grid-view-header",children:t.columns.map((i,o)=>p.jsxs("div",{className:"grid-view-header-cell "+gx(i,t.sorting),style:{width:o<t.columns.length-1?t.columnWidths.get(i):void 0},onClick:()=>t.setSorting&&s(i),children:[p.jsx("span",{className:"grid-view-header-cell-title",children:t.columnTitle(i)}),p.jsx("span",{className:"codicon codicon-triangle-up"}),p.jsx("span",{className:"codicon codicon-triangle-down"})]},t.columnTitle(i)))}),p.jsx(Tl,{name:t.name,items:t.items,id:t.id,render:(i,o)=>p.jsx(p.Fragment,{children:t.columns.map((l,a)=>{const{body:c,title:u}=t.render(i,l,o);return p.jsx("div",{className:`grid-view-cell grid-view-column-${String(l)}`,title:u,style:{width:a<t.columns.length-1?t.columnWidths.get(l):void 0},children:c},t.columnTitle(l))})}),icon:t.icon,isError:t.isError,isWarning:t.isWarning,isInfo:t.isInfo,selectedItem:t.selectedItem,onAccepted:t.onAccepted,onSelected:t.onSelected,onHighlighted:t.onHighlighted,onIconClicked:t.onIconClicked,noItemsMessage:t.noItemsMessage,dataTestId:t.dataTestId,notSelectable:t.notSelectable})]})]})}function gx(t,e){return t===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const yx=["All","Fetch","HTML","JS","CSS","Font","Image"],vx={searchValue:"",resourceType:"All"},wx=({filterState:t,onFilterStateChange:e})=>p.jsxs("div",{className:"network-filters",children:[p.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:t.searchValue,onChange:n=>e({...t,searchValue:n.target.value})}),p.jsx("div",{className:"network-filters-resource-types",children:yx.map(n=>p.jsx("div",{title:n,onClick:()=>e({...t,resourceType:n}),className:`network-filters-resource-type ${t.resourceType===n?"selected":""}`,children:n},n))})]}),Sx=mx;function xx(t,e){const n=N.useMemo(()=>((t==null?void 0:t.resources)||[]).filter(o=>e?!!o._monotonicTime&&o._monotonicTime>=e.minimum&&o._monotonicTime<=e.maximum:!0),[t,e]),r=N.useMemo(()=>new Nx(t),[t]);return{resources:n,contextIdMap:r}}const _x=({boundaries:t,networkModel:e,onEntryHovered:n,sdkLanguage:r})=>{const[s,i]=N.useState(void 0),[o,l]=N.useState(void 0),[a,c]=N.useState(vx),{renderedEntries:u}=N.useMemo(()=>{const m=e.resources.map(w=>Cx(w,t,e.contextIdMap)).filter(Mx(a));return s&&Lx(m,s),{renderedEntries:m}},[e.resources,e.contextIdMap,a,s,t]),[f,d]=N.useState(()=>new Map(Pg().map(m=>[m,Ex(m)]))),h=N.useCallback(m=>{c(m),l(void 0)},[]);if(!e.resources.length)return p.jsx(Yn,{text:"No network calls"});const v=p.jsx(Sx,{name:"network",items:u,selectedItem:o,onSelected:m=>l(m),onHighlighted:m=>n==null?void 0:n(m==null?void 0:m.resource),columns:bx(!!o,u),columnTitle:kx,columnWidths:f,setColumnWidths:d,isError:m=>m.status.code>=400||m.status.code===-1,isInfo:m=>!!m.route,render:(m,w)=>Tx(m,w),sorting:s,setSorting:i});return p.jsxs(p.Fragment,{children:[p.jsx(wx,{filterState:a,onFilterStateChange:h}),!o&&v,o&&p.jsx(Qo,{sidebarSize:f.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:p.jsx(ax,{resource:o.resource,sdkLanguage:r,startTimeOffset:o.start,onClose:()=>l(void 0)}),sidebar:v})]})},kx=t=>t==="contextId"?"Source":t==="name"?"Name":t==="method"?"Method":t==="status"?"Status":t==="contentType"?"Content Type":t==="duration"?"Duration":t==="size"?"Size":t==="start"?"Start":t==="route"?"Route":"",Ex=t=>t==="name"?200:t==="method"||t==="status"?60:t==="contentType"?200:t==="contextId"?60:100;function bx(t,e){if(t){const r=["name"];return rh(e)&&r.unshift("contextId"),r}let n=Pg();return rh(e)||(n=n.filter(r=>r!=="contextId")),n}function Pg(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const Tx=(t,e)=>e==="contextId"?{body:t.contextId,title:t.name.url}:e==="name"?{body:t.name.name,title:t.name.url}:e==="method"?{body:t.method}:e==="status"?{body:t.status.code>0?t.status.code:"",title:t.status.text}:e==="contentType"?{body:t.contentType}:e==="duration"?{body:Pe(t.duration)}:e==="size"?{body:kv(t.size)}:e==="start"?{body:Pe(t.start)}:e==="route"?{body:t.route}:{body:""};class Nx{constructor(e){W(this,"_pagerefToShortId",new Map);W(this,"_contextToId",new Map);W(this,"_lastPageId",0);W(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let n=this._pagerefToShortId.get(e);return n||(++this._lastPageId,n="page#"+this._lastPageId,this._pagerefToShortId.set(e,n)),n}_apiRequestContextId(e){const n=Ko(e);if(!n)return"";let r=this._contextToId.get(n);return r||(++this._lastApiRequestContextId,r="api#"+this._lastApiRequestContextId,this._contextToId.set(n,r)),r}}function rh(t){const e=new Set;for(const n of t)if(e.add(n.contextId),e.size>1)return!0;return!1}const Cx=(t,e,n)=>{const r=Ax(t);let s;try{const l=new URL(t.request.url);s=l.pathname.substring(l.pathname.lastIndexOf("/")+1),s||(s=l.host)}catch{s=t.request.url}let i=t.response.content.mimeType;const o=i.match(/^(.*);\s*charset=.*$/);return o&&(i=o[1]),{name:{name:s,url:t.request.url},method:t.request.method,status:{code:t.response.status,text:t.response.statusText},contentType:i,duration:t.time,size:t.response._transferSize>0?t.response._transferSize:t.response.bodySize,start:t._monotonicTime-e.minimum,route:r,resource:t,contextId:n.contextId(t)}};function Ax(t){return t._wasAborted?"aborted":t._wasContinued?"continued":t._wasFulfilled?"fulfilled":t._apiRequest?"api":""}function Lx(t,e){const n=Ix(e==null?void 0:e.by);n&&t.sort(n),e.negate&&t.reverse()}function Ix(t){if(t==="start")return(e,n)=>e.start-n.start;if(t==="duration")return(e,n)=>e.duration-n.duration;if(t==="status")return(e,n)=>e.status.code-n.status.code;if(t==="method")return(e,n)=>{const r=e.method,s=n.method;return r.localeCompare(s)};if(t==="size")return(e,n)=>e.size-n.size;if(t==="contentType")return(e,n)=>e.contentType.localeCompare(n.contentType);if(t==="name")return(e,n)=>e.name.name.localeCompare(n.name.name);if(t==="route")return(e,n)=>e.route.localeCompare(n.route);if(t==="contextId")return(e,n)=>e.contextId.localeCompare(n.contextId)}const jx={All:()=>!0,Fetch:t=>t==="application/json",HTML:t=>t==="text/html",CSS:t=>t==="text/css",JS:t=>t.includes("javascript"),Font:t=>t.includes("font"),Image:t=>t.includes("image")};function Mx({searchValue:t,resourceType:e}){return n=>{const r=jx[e];return r(n.contentType)&&n.name.url.toLowerCase().includes(t.toLowerCase())}}const sh={queryAll(t,e){e.startsWith("/")&&t.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const n=[],r=t.ownerDocument||t;if(!r)return n;const s=r.evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let i=s.iterateNext();i;i=s.iterateNext())i.nodeType===Node.ELEMENT_NODE&&n.push(i);return n}};let Rg="";function Ox(t){Rg=t}function Nl(t,e){for(;e;){if(t.contains(e))return!0;e=Fg(e)}return!1}function $e(t){if(t.parentElement)return t.parentElement;if(t.parentNode&&t.parentNode.nodeType===11&&t.parentNode.host)return t.parentNode.host}function Dg(t){let e=t;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Fg(t){for(;t.parentElement;)t=t.parentElement;return $e(t)}function Ls(t,e,n){for(;t;){const r=t.closest(e);if(n&&r!==n&&(r!=null&&r.contains(n)))return;if(r)return r;t=Fg(t)}}function Zn(t,e){return t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,e):void 0}function zg(t,e){if(e=e??Zn(t),!e)return!0;if(Element.prototype.checkVisibility&&Rg!=="webkit"){if(!t.checkVisibility())return!1}else{const n=t.closest("details,summary");if(n!==t&&(n==null?void 0:n.nodeName)==="DETAILS"&&!n.open)return!1}return e.visibility==="visible"}function $r(t){const e=Zn(t);if(!e)return!0;if(e.display==="contents"){for(let r=t.firstChild;r;r=r.nextSibling)if(r.nodeType===1&&$r(r)||r.nodeType===3&&Bg(r))return!0;return!1}if(!zg(t,e))return!1;const n=t.getBoundingClientRect();return n.width>0&&n.height>0}function Bg(t){const e=t.ownerDocument.createRange();e.selectNode(t);const n=e.getBoundingClientRect();return n.width>0&&n.height>0}function Se(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function ih(t){return t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")}const oh="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]",$x=new Map([["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",new Set(["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])],["aria-labelledby",new Set(["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",new Set(["generic"])]]);function Ug(t,e){return[...$x].some(([n,r])=>!(r!=null&&r.has(e||""))&&t.hasAttribute(n))}function Hg(t){return!Number.isNaN(Number(String(t.getAttribute("tabindex"))))}function Px(t){return!ty(t)&&(Rx(t)||Hg(t))}function Rx(t){const e=Se(t);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?t.hasAttribute("href"):e==="INPUT"?!t.hidden:!1}const Sa={A:t=>t.hasAttribute("href")?"link":null,AREA:t=>t.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:t=>Ls(t,oh)?null:"contentinfo",FORM:t=>ih(t)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:t=>Ls(t,oh)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:t=>t.getAttribute("alt")===""&&!t.getAttribute("title")&&!Ug(t)&&!Hg(t)?"presentation":"img",INPUT:t=>{const e=t.type.toLowerCase();if(e==="search")return t.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const n=es(t,t.getAttribute("list"))[0];return n&&Se(n)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:Jx[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",SECTION:t=>ih(t)?"region":null,SELECT:t=>t.hasAttribute("multiple")||t.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:t=>{const e=Ls(t,"table"),n=e?Yo(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:t=>{if(t.getAttribute("scope")==="col")return"columnheader";if(t.getAttribute("scope")==="row")return"rowheader";const e=Ls(t,"table"),n=e?Yo(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},Dx={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 lh(t){var r;const e=((r=Sa[Se(t)])==null?void 0:r.call(Sa,t))||"";if(!e)return null;let n=t;for(;n;){const s=$e(n),i=Dx[Se(n)];if(!i||!s||!i.includes(Se(s)))break;const o=Yo(s);if((o==="none"||o==="presentation")&&!Vg(s,o))return o;n=s}return e}const Fx=["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 Yo(t){return(t.getAttribute("role")||"").split(" ").map(n=>n.trim()).find(n=>Fx.includes(n))||null}function Vg(t,e){return Ug(t,e)||Px(t)}function ye(t){const e=Yo(t);if(!e)return lh(t);if(e==="none"||e==="presentation"){const n=lh(t);if(Vg(t,n))return n}return e}function qg(t){return t===null?void 0:t.toLowerCase()==="true"}function Wg(t){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Se(t))}function ct(t){if(Wg(t))return!0;const e=Zn(t),n=t.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!n){for(let s=t.firstChild;s;s=s.nextSibling)if(s.nodeType===1&&!ct(s)||s.nodeType===3&&Bg(s))return!1;return!0}return!(t.nodeName==="OPTION"&&!!t.closest("select"))&&!n&&!zg(t,e)?!0:Kg(t)}function Kg(t){let e=on==null?void 0:on.get(t);if(e===void 0){if(e=!1,t.parentElement&&t.parentElement.shadowRoot&&!t.assignedSlot&&(e=!0),!e){const n=Zn(t);e=!n||n.display==="none"||qg(t.getAttribute("aria-hidden"))===!0}if(!e){const n=$e(t);n&&(e=Kg(n))}on==null||on.set(t,e)}return e}function es(t,e){if(!e)return[];const n=Dg(t);if(!n)return[];try{const r=e.split(" ").filter(i=>!!i),s=new Set;for(const i of r){const o=n.querySelector("#"+CSS.escape(i));o&&s.add(o)}return[...s]}catch{return[]}}function zt(t){return t.trim()}function Hs(t){return t.split(" ").map(e=>e.replace(/\r\n/g,`
|
|
79
|
-
`).replace(/\s\s*/g," ")).join(" ").trim()}function ah(t,e){const n=[...t.querySelectorAll(e)];for(const r of es(t,t.getAttribute("aria-owns")))r.matches(e)&&n.push(r),n.push(...r.querySelectorAll(e));return n}function Zo(t,e){const n=e==="::before"?rf:sf;if(n!=null&&n.has(t))return(n==null?void 0:n.get(t))||"";const r=Zn(t,e),s=zx(t,r);return n&&n.set(t,s),s}function zx(t,e){if(!e||e.display==="none"||e.visibility==="hidden")return"";const n=e.content;let r;if(n[0]==="'"&&n[n.length-1]==="'"||n[0]==='"'&&n[n.length-1]==='"')r=n.substring(1,n.length-1);else if(n.startsWith("attr(")&&n.endsWith(")")){const s=n.substring(5,n.length-1).trim();r=t.getAttribute(s)||""}return r!==void 0?(e.display||"inline")!=="inline"?" "+r+" ":r:""}function Qg(t){const e=t.getAttribute("aria-labelledby");if(e===null)return null;const n=es(t,e);return n.length?n:null}function Bx(t,e){const n=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(t),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(t);return n||r}function ui(t,e){const n=e?ef:Zu;let r=n==null?void 0:n.get(t);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(ye(t)||"")||(r=Hs(_t(t,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),n==null||n.set(t,r)),r}function ch(t,e){const n=e?nf:tf;let r=n==null?void 0:n.get(t);if(r===void 0){if(r="",t.hasAttribute("aria-describedby")){const s=es(t,t.getAttribute("aria-describedby"));r=Hs(s.map(i=>_t(i,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:i,hidden:ct(i)}})).join(" "))}else t.hasAttribute("aria-description")?r=Hs(t.getAttribute("aria-description")||""):r=Hs(t.getAttribute("title")||"");n==null||n.set(t,r)}return r}const Ux=["application","checkbox","combobox","gridcell","listbox","radiogroup","slider","spinbutton","textbox","tree","columnheader","rowheader","searchbox","switch","treegrid"];function Hx(t){const e=ye(t)||"";if(!e||!Ux.includes(e))return"false";const n=t.getAttribute("aria-invalid");return!n||n.trim()===""||n.toLocaleLowerCase()==="false"?"false":n==="true"||n==="grammar"||n==="spelling"?n:"true"}function Vx(t){if("validity"in t){const e=t.validity;return(e==null?void 0:e.valid)===!1}return!1}function qx(t){const e=kr;let n=kr==null?void 0:kr.get(t);if(n===void 0){n="";const r=Hx(t)!=="false",s=Vx(t);if(r||s){const i=t.getAttribute("aria-errormessage");n=es(t,i).map(a=>Hs(_t(a,{visitedElements:new Set,embeddedInDescribedBy:{element:a,hidden:ct(a)}}))).join(" ").trim()}e==null||e.set(t,n)}return n}function _t(t,e){var a,c,u,f;if(e.visitedElements.has(t))return"";const n={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const d=!!((a=e.embeddedInLabelledBy)!=null&&a.hidden)||!!((c=e.embeddedInDescribedBy)!=null&&c.hidden)||!!((u=e.embeddedInNativeTextAlternative)!=null&&u.hidden)||!!((f=e.embeddedInLabel)!=null&&f.hidden);if(Wg(t)||!d&&ct(t))return e.visitedElements.add(t),""}const r=Qg(t);if(!e.embeddedInLabelledBy){const d=(r||[]).map(h=>_t(h,{...e,embeddedInLabelledBy:{element:h,hidden:ct(h)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(d)return d}const s=ye(t)||"",i=Se(t);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const d=[...t.labels||[]].includes(t),h=(r||[]).includes(t);if(!d&&!h){if(s==="textbox")return e.visitedElements.add(t),i==="INPUT"||i==="TEXTAREA"?t.value:t.textContent||"";if(["combobox","listbox"].includes(s)){e.visitedElements.add(t);let v;if(i==="SELECT")v=[...t.selectedOptions],!v.length&&t.options.length&&v.push(t.options[0]);else{const m=s==="combobox"?ah(t,"*").find(w=>ye(w)==="listbox"):t;v=m?ah(m,'[aria-selected="true"]').filter(w=>ye(w)==="option"):[]}return!v.length&&i==="INPUT"?t.value:v.map(m=>_t(m,n)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(s))return e.visitedElements.add(t),t.hasAttribute("aria-valuetext")?t.getAttribute("aria-valuetext")||"":t.hasAttribute("aria-valuenow")?t.getAttribute("aria-valuenow")||"":t.getAttribute("value")||"";if(["menu"].includes(s))return e.visitedElements.add(t),""}}const o=t.getAttribute("aria-label")||"";if(zt(o))return e.visitedElements.add(t),o;if(!["presentation","none"].includes(s)){if(i==="INPUT"&&["button","submit","reset"].includes(t.type)){e.visitedElements.add(t);const d=t.value||"";return zt(d)?d:t.type==="submit"?"Submit":t.type==="reset"?"Reset":t.getAttribute("title")||""}if(i==="INPUT"&&t.type==="image"){e.visitedElements.add(t);const d=t.labels||[];if(d.length&&!e.embeddedInLabelledBy)return Bi(d,e);const h=t.getAttribute("alt")||"";if(zt(h))return h;const v=t.getAttribute("title")||"";return zt(v)?v:"Submit"}if(!r&&i==="BUTTON"){e.visitedElements.add(t);const d=t.labels||[];if(d.length)return Bi(d,e)}if(!r&&i==="OUTPUT"){e.visitedElements.add(t);const d=t.labels||[];return d.length?Bi(d,e):t.getAttribute("title")||""}if(!r&&(i==="TEXTAREA"||i==="SELECT"||i==="INPUT")){e.visitedElements.add(t);const d=t.labels||[];if(d.length)return Bi(d,e);const h=i==="INPUT"&&["text","password","search","tel","email","url"].includes(t.type)||i==="TEXTAREA",v=t.getAttribute("placeholder")||"",m=t.getAttribute("title")||"";return!h||m?m:v}if(!r&&i==="FIELDSET"){e.visitedElements.add(t);for(let h=t.firstElementChild;h;h=h.nextElementSibling)if(Se(h)==="LEGEND")return _t(h,{...n,embeddedInNativeTextAlternative:{element:h,hidden:ct(h)}});return t.getAttribute("title")||""}if(!r&&i==="FIGURE"){e.visitedElements.add(t);for(let h=t.firstElementChild;h;h=h.nextElementSibling)if(Se(h)==="FIGCAPTION")return _t(h,{...n,embeddedInNativeTextAlternative:{element:h,hidden:ct(h)}});return t.getAttribute("title")||""}if(i==="IMG"){e.visitedElements.add(t);const d=t.getAttribute("alt")||"";return zt(d)?d:t.getAttribute("title")||""}if(i==="TABLE"){e.visitedElements.add(t);for(let h=t.firstElementChild;h;h=h.nextElementSibling)if(Se(h)==="CAPTION")return _t(h,{...n,embeddedInNativeTextAlternative:{element:h,hidden:ct(h)}});const d=t.getAttribute("summary")||"";if(d)return d}if(i==="AREA"){e.visitedElements.add(t);const d=t.getAttribute("alt")||"";return zt(d)?d:t.getAttribute("title")||""}if(i==="SVG"||t.ownerSVGElement){e.visitedElements.add(t);for(let d=t.firstElementChild;d;d=d.nextElementSibling)if(Se(d)==="TITLE"&&d.ownerSVGElement)return _t(d,{...n,embeddedInLabelledBy:{element:d,hidden:ct(d)}})}if(t.ownerSVGElement&&i==="A"){const d=t.getAttribute("xlink:title")||"";if(zt(d))return e.visitedElements.add(t),d}}const l=i==="SUMMARY"&&!["presentation","none"].includes(s);if(Bx(s,e.embeddedInTargetElement==="descendant")||l||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(t);const d=Wx(t,n);if(e.embeddedInTargetElement==="self"?zt(d):d)return d}if(!["presentation","none"].includes(s)||i==="IFRAME"){e.visitedElements.add(t);const d=t.getAttribute("title")||"";if(zt(d))return d}return e.visitedElements.add(t),""}function Wx(t,e){const n=[],r=(i,o)=>{var l;if(!(o&&i.assignedSlot))if(i.nodeType===1){const a=((l=Zn(i))==null?void 0:l.display)||"inline";let c=_t(i,e);(a!=="inline"||i.nodeName==="BR")&&(c=" "+c+" "),n.push(c)}else i.nodeType===3&&n.push(i.textContent||"")};n.push(Zo(t,"::before"));const s=t.nodeName==="SLOT"?t.assignedNodes():[];if(s.length)for(const i of s)r(i,!1);else{for(let i=t.firstChild;i;i=i.nextSibling)r(i,!0);if(t.shadowRoot)for(let i=t.shadowRoot.firstChild;i;i=i.nextSibling)r(i,!0);for(const i of es(t,t.getAttribute("aria-owns")))r(i,!0)}return n.push(Zo(t,"::after")),n.join("")}const Ku=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function Xg(t){return Se(t)==="OPTION"?t.selected:Ku.includes(ye(t)||"")?qg(t.getAttribute("aria-selected"))===!0:!1}const Qu=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function Gg(t){const e=Xu(t,!0);return e==="error"?!1:e}function Kx(t){return Xu(t,!0)}function Qx(t){return Xu(t,!1)}function Xu(t,e){const n=Se(t);if(e&&n==="INPUT"&&t.indeterminate)return"mixed";if(n==="INPUT"&&["checkbox","radio"].includes(t.type))return t.checked;if(Qu.includes(ye(t)||"")){const r=t.getAttribute("aria-checked");return r==="true"?!0:e&&r==="mixed"?"mixed":!1}return"error"}const Xx=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function Gx(t){const e=Se(t);return["INPUT","TEXTAREA","SELECT"].includes(e)?t.hasAttribute("readonly"):Xx.includes(ye(t)||"")?t.getAttribute("aria-readonly")==="true":t.isContentEditable?!1:"error"}const Gu=["button"];function Jg(t){if(Gu.includes(ye(t)||"")){const e=t.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const Ju=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function Yg(t){if(Se(t)==="DETAILS")return t.open;if(Ju.includes(ye(t)||"")){const e=t.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const Yu=["heading","listitem","row","treeitem"];function Zg(t){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Se(t)];if(e)return e;if(Yu.includes(ye(t)||"")){const n=t.getAttribute("aria-level"),r=n===null?Number.NaN:Number(n);if(Number.isInteger(r)&&r>=1)return r}return 0}const ey=["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 el(t){return ty(t)||ry(t)}function ty(t){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(t.tagName)&&(t.hasAttribute("disabled")||ny(t))}function ny(t){return t?Se(t)==="FIELDSET"&&t.hasAttribute("disabled")?!0:ny(t.parentElement):!1}function ry(t){if(!t)return!1;if(ey.includes(ye(t)||"")){const e=(t.getAttribute("aria-disabled")||"").toLowerCase();if(e==="true")return!0;if(e==="false")return!1}return ry($e(t))}function Bi(t,e){return[...t].map(n=>_t(n,{...e,embeddedInLabel:{element:n,hidden:ct(n)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(n=>!!n).join(" ")}let Zu,ef,tf,nf,kr,on,rf,sf,sy=0;function of(){++sy,Zu??(Zu=new Map),ef??(ef=new Map),tf??(tf=new Map),nf??(nf=new Map),kr??(kr=new Map),on??(on=new Map),rf??(rf=new Map),sf??(sf=new Map)}function lf(){--sy||(Zu=void 0,ef=void 0,tf=void 0,nf=void 0,kr=void 0,on=void 0,rf=void 0,sf=void 0)}const Jx={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function iy(t,e){for(const n of e.jsonPath)t!=null&&(t=t[n]);return oy(t,e)}function oy(t,e){const n=typeof t=="string"&&!e.caseSensitive?t.toUpperCase():t,r=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!n:e.op==="="?r instanceof RegExp?typeof n=="string"&&!!n.match(r):n===r:typeof n!="string"||typeof r!="string"?!1:e.op==="*="?n.includes(r):e.op==="^="?n.startsWith(r):e.op==="$="?n.endsWith(r):e.op==="|="?n===r||n.startsWith(r+"-"):e.op==="~="?n.split(" ").includes(r):!1}function af(t){const e=t.ownerDocument;return t.nodeName==="SCRIPT"||t.nodeName==="NOSCRIPT"||t.nodeName==="STYLE"||e.head&&e.head.contains(t)}function Ke(t,e){let n=t.get(e);if(n===void 0){if(n={full:"",normalized:"",immediate:[]},!af(e)){let r="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))n={full:e.value,normalized:De(e.value),immediate:[e.value]};else{for(let s=e.firstChild;s;s=s.nextSibling)if(s.nodeType===Node.TEXT_NODE)n.full+=s.nodeValue||"",r+=s.nodeValue||"";else{if(s.nodeType===Node.COMMENT_NODE)continue;r&&n.immediate.push(r),r="",s.nodeType===Node.ELEMENT_NODE&&(n.full+=Ke(t,s).full)}r&&n.immediate.push(r),e.shadowRoot&&(n.full+=Ke(t,e.shadowRoot).full),n.full&&(n.normalized=De(n.full))}}t.set(e,n)}return n}function Cl(t,e,n){if(af(e)||!n(Ke(t,e)))return"none";for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&n(Ke(t,r)))return"selfAndChildren";return e.shadowRoot&&n(Ke(t,e.shadowRoot))?"selfAndChildren":"self"}function ly(t,e){const n=Qg(e);if(n)return n.map(i=>Ke(t,i));const r=e.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:De(r),immediate:[r]}];const s=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||s){const i=e.labels;if(i)return[...i].map(o=>Ke(t,o))}return[]}function uh(t){return t.displayName||t.name||"Anonymous"}function Yx(t){if(t.type)switch(typeof t.type){case"function":return uh(t.type);case"string":return t.type;case"object":return t.type.displayName||(t.type.render?uh(t.type.render):"")}if(t._currentElement){const e=t._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function Zx(t){var e;return t.key??((e=t._currentElement)==null?void 0:e.key)}function e_(t){if(t.child){const n=[];for(let r=t.child;r;r=r.sibling)n.push(r);return n}if(!t._currentElement)return[];const e=n=>{var s;const r=(s=n._currentElement)==null?void 0:s.type;return typeof r=="function"||typeof r=="string"};if(t._renderedComponent){const n=t._renderedComponent;return e(n)?[n]:[]}return t._renderedChildren?[...Object.values(t._renderedChildren)].filter(e):[]}function t_(t){var r;const e=t.memoizedProps||((r=t._currentElement)==null?void 0:r.props);if(!e||typeof e=="string")return e;const n={...e};return delete n.children,n}function ay(t){var r;const e={key:Zx(t),name:Yx(t),children:e_(t).map(ay),rootElements:[],props:t_(t)},n=t.stateNode||t._hostNode||((r=t._renderedComponent)==null?void 0:r._hostNode);if(n instanceof Element)e.rootElements.push(n);else for(const s of e.children)e.rootElements.push(...s.rootElements);return e}function cy(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)cy(r,e,n);return n}function uy(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);do{const s=r.currentNode,i=s,o=Object.keys(i).find(a=>a.startsWith("__reactContainer")&&i[a]!==null);if(o)e.push(i[o].stateNode.current);else{const a="_reactRootContainer";i.hasOwnProperty(a)&&i[a]!==null&&e.push(i[a]._internalRoot.current)}if(s instanceof Element&&s.hasAttribute("data-reactroot"))for(const a of Object.keys(s))(a.startsWith("__reactInternalInstance")||a.startsWith("__reactFiber"))&&e.push(s[a]);const l=s instanceof Element?s.shadowRoot:null;l&&uy(l,e)}while(r.nextNode());return e}const n_={queryAll(t,e){const{name:n,attributes:r}=Un(e,!1),o=uy(t.ownerDocument||t).map(a=>ay(a)).map(a=>cy(a,c=>{const u=c.props??{};if(c.key!==void 0&&(u.key=c.key),n&&c.name!==n||c.rootElements.some(f=>!Nl(t,f)))return!1;for(const f of r)if(!iy(u,f))return!1;return!0})).flat(),l=new Set;for(const a of o)for(const c of a.rootElements)l.add(c);return[...l]}};function fy(t,e){const n=t.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let r=n.substring(n.lastIndexOf("/")+1);return r.endsWith(e)&&(r=r.substring(0,r.length-e.length)),r}function r_(t,e){return e?e.toUpperCase():""}const s_=/(?:^|[-_/])(\w)/g,dy=t=>t&&t.replace(s_,r_);function i_(t){function e(u){const f=u.name||u._componentTag||u.__playwright_guessedName;if(f)return f;const d=u.__file;if(d)return dy(fy(d,".vue"))}function n(u,f){return u.type.__playwright_guessedName=f,f}function r(u){var d,h,v,m;const f=e(u.type||{});if(f)return f;if(u.root===u)return"Root";for(const w in(h=(d=u.parent)==null?void 0:d.type)==null?void 0:h.components)if(((v=u.parent)==null?void 0:v.type.components[w])===u.type)return n(u,w);for(const w in(m=u.appContext)==null?void 0:m.components)if(u.appContext.components[w]===u.type)return n(u,w);return"Anonymous Component"}function s(u){return u._isBeingDestroyed||u.isUnmounted}function i(u){return u.subTree.type.toString()==="Symbol(Fragment)"}function o(u){const f=[];return u.component&&f.push(u.component),u.suspense&&f.push(...o(u.suspense.activeBranch)),Array.isArray(u.children)&&u.children.forEach(d=>{d.component?f.push(d.component):f.push(...o(d))}),f.filter(d=>{var h;return!s(d)&&!((h=d.type.devtools)!=null&&h.hide)})}function l(u){return i(u)?a(u.subTree):[u.subTree.el]}function a(u){if(!u.children)return[];const f=[];for(let d=0,h=u.children.length;d<h;d++){const v=u.children[d];v.component?f.push(...l(v.component)):v.el&&f.push(v.el)}return f}function c(u){return{name:r(u),children:o(u.subTree).map(c),rootElements:l(u),props:u.props}}return c(t)}function o_(t){function e(i){const o=i.displayName||i.name||i._componentTag;if(o)return o;const l=i.__file;if(l)return dy(fy(l,".vue"))}function n(i){const o=e(i.$options||i.fnOptions||{});return o||(i.$root===i?"Root":"Anonymous Component")}function r(i){return i.$children?i.$children:Array.isArray(i.subTree.children)?i.subTree.children.filter(o=>!!o.component).map(o=>o.component):[]}function s(i){return{name:n(i),children:r(i).map(s),rootElements:[i.$el],props:i._props}}return s(t)}function hy(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)hy(r,e,n);return n}function py(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT),s=new Set;do{const i=r.currentNode;i.__vue__&&s.add(i.__vue__.$root),i.__vue_app__&&i._vnode&&i._vnode.component&&e.push({root:i._vnode.component,version:3});const o=i instanceof Element?i.shadowRoot:null;o&&py(o,e)}while(r.nextNode());for(const i of s)e.push({version:2,root:i});return e}const l_={queryAll(t,e){const n=t.ownerDocument||t,{name:r,attributes:s}=Un(e,!1),l=py(n).map(c=>c.version===3?i_(c.root):o_(c.root)).map(c=>hy(c,u=>{if(r&&u.name!==r||u.rootElements.some(f=>!Nl(t,f)))return!1;for(const f of s)if(!iy(u.props,f))return!1;return!0})).flat(),a=new Set;for(const c of l)for(const u of c.rootElements)a.add(u);return[...a]}},my=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];my.sort();function Ss(t,e,n){if(!e.includes(n))throw new Error(`"${t}" attribute is only supported for roles: ${e.slice().sort().map(r=>`"${r}"`).join(", ")}`)}function sr(t,e){if(t.op!=="<truthy>"&&!e.includes(t.value))throw new Error(`"${t.name}" must be one of ${e.map(n=>JSON.stringify(n)).join(", ")}`)}function ir(t,e){if(!e.includes(t.op))throw new Error(`"${t.name}" does not support "${t.op}" matcher`)}function a_(t,e){const n={role:e};for(const r of t)switch(r.name){case"checked":{Ss(r.name,Qu,e),sr(r,[!0,!1,"mixed"]),ir(r,["<truthy>","="]),n.checked=r.op==="<truthy>"?!0:r.value;break}case"pressed":{Ss(r.name,Gu,e),sr(r,[!0,!1,"mixed"]),ir(r,["<truthy>","="]),n.pressed=r.op==="<truthy>"?!0:r.value;break}case"selected":{Ss(r.name,Ku,e),sr(r,[!0,!1]),ir(r,["<truthy>","="]),n.selected=r.op==="<truthy>"?!0:r.value;break}case"expanded":{Ss(r.name,Ju,e),sr(r,[!0,!1]),ir(r,["<truthy>","="]),n.expanded=r.op==="<truthy>"?!0:r.value;break}case"level":{if(Ss(r.name,Yu,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');n.level=r.value;break}case"disabled":{sr(r,[!0,!1]),ir(r,["<truthy>","="]),n.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');n.name=r.value,n.nameOp=r.op,n.exact=r.caseSensitive;break}case"include-hidden":{sr(r,[!0,!1]),ir(r,["<truthy>","="]),n.includeHidden=r.op==="<truthy>"?!0:r.value;break}default:throw new Error(`Unknown attribute "${r.name}", must be one of ${my.map(s=>`"${s}"`).join(", ")}.`)}return n}function c_(t,e,n){const r=[],s=o=>{if(ye(o)===e.role&&!(e.selected!==void 0&&Xg(o)!==e.selected)&&!(e.checked!==void 0&&Gg(o)!==e.checked)&&!(e.pressed!==void 0&&Jg(o)!==e.pressed)&&!(e.expanded!==void 0&&Yg(o)!==e.expanded)&&!(e.level!==void 0&&Zg(o)!==e.level)&&!(e.disabled!==void 0&&el(o)!==e.disabled)&&!(!e.includeHidden&&ct(o))){if(e.name!==void 0){const l=De(ui(o,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=De(e.name)),n&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!oy(l,{name:"",jsonPath:[],op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}r.push(o)}},i=o=>{const l=[];o.shadowRoot&&l.push(o.shadowRoot);for(const a of o.querySelectorAll("*"))s(a),a.shadowRoot&&l.push(a.shadowRoot);l.forEach(i)};return i(t),r}function fh(t){return{queryAll:(e,n)=>{const r=Un(n,!0),s=r.name.toLowerCase();if(!s)throw new Error("Role must not be empty");const i=a_(r.attributes,s);of();try{return c_(e,i,t)}finally{lf()}}}}function u_(t,e,n){const r=t.left-e.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function f_(t,e,n){const r=e.left-t.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function d_(t,e,n){const r=e.top-t.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function h_(t,e,n){const r=t.top-e.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function p_(t,e,n){const r=n===void 0?50:n;let s=0;return t.left-e.right>=0&&(s+=t.left-e.right),e.left-t.right>=0&&(s+=e.left-t.right),e.top-t.bottom>=0&&(s+=e.top-t.bottom),t.top-e.bottom>=0&&(s+=t.top-e.bottom),s>r?void 0:s}const m_=["left-of","right-of","above","below","near"];function gy(t,e,n,r){const s=e.getBoundingClientRect(),i={"left-of":f_,"right-of":u_,above:d_,below:h_,near:p_}[t];let o;for(const l of n){if(l===e)continue;const a=i(s,l.getBoundingClientRect(),r);a!==void 0&&(o===void 0||a<o)&&(o=a)}return o}class g_{constructor(e){this._engines=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._cacheText=new Map,this._retainCacheCounter=0;for(const[s,i]of e)this._engines.set(s,i);this._engines.set("not",w_),this._engines.set("is",Is),this._engines.set("where",Is),this._engines.set("has",y_),this._engines.set("scope",v_),this._engines.set("light",S_),this._engines.set("visible",x_),this._engines.set("text",__),this._engines.set("text-is",k_),this._engines.set("text-matches",E_),this._engines.set("has-text",b_),this._engines.set("right-of",xs("right-of")),this._engines.set("left-of",xs("left-of")),this._engines.set("above",xs("above")),this._engines.set("below",xs("below")),this._engines.set("near",xs("near")),this._engines.set("nth-match",T_);const n=[...this._engines.keys()];n.sort();const r=[...bg];if(r.sort(),n.join("|")!==r.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${n.join("|")} vs ${r.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,n,r,s){e.has(n)||e.set(n,[]);const i=e.get(n),o=i.find(a=>r.every((c,u)=>a.rest[u]===c));if(o)return o.result;const l=s();return i.push({rest:r,result:l}),l}_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,n,r){const s=this._checkSelector(n);this.begin();try{return this._cached(this._cacheMatches,e,[s,r.scope,r.pierceShadow,r.originalScope],()=>Array.isArray(s)?this._matchesEngine(Is,e,s,r):(this._hasScopeClause(s)&&(r=this._expandContextForScopeMatching(r)),this._matchesSimple(e,s.simples[s.simples.length-1].selector,r)?this._matchesParents(e,s,s.simples.length-2,r):!1))}finally{this.end()}}query(e,n){const r=this._checkSelector(n);this.begin();try{return this._cached(this._cacheQuery,r,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(r))return this._queryEngine(Is,e,r);this._hasScopeClause(r)&&(e=this._expandContextForScopeMatching(e));const s=this._scoreMap;this._scoreMap=new Map;let i=this._querySimple(e,r.simples[r.simples.length-1].selector);return i=i.filter(o=>this._matchesParents(o,r,r.simples.length-2,e)),this._scoreMap.size&&i.sort((o,l)=>{const a=this._scoreMap.get(o),c=this._scoreMap.get(l);return a===c?0:a===void 0?1:c===void 0?-1:a-c}),this._scoreMap=s,i})}finally{this.end()}}_markScore(e,n){this._scoreMap&&this._scoreMap.set(e,n)}_hasScopeClause(e){return e.simples.some(n=>n.selector.functions.some(r=>r.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const n=$e(e.scope);return n?{...e,scope:n,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,n,r){return this._cached(this._cacheMatchesSimple,e,[n,r.scope,r.pierceShadow,r.originalScope],()=>{if(e===r.scope||n.css&&!this._matchesCSS(e,n.css))return!1;for(const s of n.functions)if(!this._matchesEngine(this._getEngine(s.name),e,s.args,r))return!1;return!0})}_querySimple(e,n){return n.functions.length?this._cached(this._cacheQuerySimple,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=n.css;const s=n.functions;r==="*"&&s.length&&(r=void 0);let i,o=-1;r!==void 0?i=this._queryCSS(e,r):(o=s.findIndex(l=>this._getEngine(l.name).query!==void 0),o===-1&&(o=0),i=this._queryEngine(this._getEngine(s[o].name),e,s[o].args));for(let l=0;l<s.length;l++){if(l===o)continue;const a=this._getEngine(s[l].name);a.matches!==void 0&&(i=i.filter(c=>this._matchesEngine(a,c,s[l].args,e)))}for(let l=0;l<s.length;l++){if(l===o)continue;const a=this._getEngine(s[l].name);a.matches===void 0&&(i=i.filter(c=>this._matchesEngine(a,c,s[l].args,e)))}return i}):this._queryCSS(e,n.css||"*")}_matchesParents(e,n,r,s){return r<0?!0:this._cached(this._cacheMatchesParents,e,[n,r,s.scope,s.pierceShadow,s.originalScope],()=>{const{selector:i,combinator:o}=n.simples[r];if(o===">"){const l=Ui(e,s);return!l||!this._matchesSimple(l,i,s)?!1:this._matchesParents(l,n,r-1,s)}if(o==="+"){const l=xa(e,s);return!l||!this._matchesSimple(l,i,s)?!1:this._matchesParents(l,n,r-1,s)}if(o===""){let l=Ui(e,s);for(;l;){if(this._matchesSimple(l,i,s)){if(this._matchesParents(l,n,r-1,s))return!0;if(n.simples[r-1].combinator==="")break}l=Ui(l,s)}return!1}if(o==="~"){let l=xa(e,s);for(;l;){if(this._matchesSimple(l,i,s)){if(this._matchesParents(l,n,r-1,s))return!0;if(n.simples[r-1].combinator==="~")break}l=xa(l,s)}return!1}if(o===">="){let l=e;for(;l;){if(this._matchesSimple(l,i,s)){if(this._matchesParents(l,n,r-1,s))return!0;if(n.simples[r-1].combinator==="")break}l=Ui(l,s)}return!1}throw new Error(`Unsupported combinator "${o}"`)})}_matchesEngine(e,n,r,s){if(e.matches)return this._callMatches(e,n,r,s);if(e.query)return this._callQuery(e,r,s).includes(n);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,n,r){if(e.query)return this._callQuery(e,r,n);if(e.matches)return this._queryCSS(n,"*").filter(s=>this._callMatches(e,s,r,n));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,n,r,s){return this._cached(this._cacheCallMatches,n,[e,s.scope,s.pierceShadow,s.originalScope,...r],()=>e.matches(n,r,s,this))}_callQuery(e,n,r){return this._cached(this._cacheCallQuery,e,[r.scope,r.pierceShadow,r.originalScope,...n],()=>e.query(r,n,this))}_matchesCSS(e,n){return e.matches(n)}_queryCSS(e,n){return this._cached(this._cacheQueryCSS,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=[];function s(i){if(r=r.concat([...i.querySelectorAll(n)]),!!e.pierceShadow){i.shadowRoot&&s(i.shadowRoot);for(const o of i.querySelectorAll("*"))o.shadowRoot&&s(o.shadowRoot)}}return s(e.scope),r})}_getEngine(e){const n=this._engines.get(e);if(!n)throw new Error(`Unknown selector engine "${e}"`);return n}}const Is={matches(t,e,n,r){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(s=>r.matches(t,s,n))},query(t,e,n){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let r=[];for(const s of e)r=r.concat(n.query(t,s));return e.length===1?r:yy(r)}},y_={matches(t,e,n,r){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return r.query({...n,scope:t},e).length>0}},v_={matches(t,e,n,r){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const s=n.originalScope||n.scope;return s.nodeType===9?t===s.documentElement:t===s},query(t,e,n){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const r=t.originalScope||t.scope;if(r.nodeType===9){const s=r.documentElement;return s?[s]:[]}return r.nodeType===1?[r]:[]}},w_={matches(t,e,n,r){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!r.matches(t,e,n)}},S_={query(t,e,n){return n.query({...t,pierceShadow:!1},e)},matches(t,e,n,r){return r.matches(t,e,{...n,pierceShadow:!1})}},x_={matches(t,e,n,r){if(e.length)throw new Error('"visible" engine expects no arguments');return $r(t)}},__={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const s=De(e[0]).toLowerCase(),i=o=>o.normalized.toLowerCase().includes(s);return Cl(r._cacheText,t,i)==="self"}},k_={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const s=De(e[0]),i=o=>!s&&!o.immediate.length?!0:o.immediate.some(l=>De(l)===s);return Cl(r._cacheText,t,i)!=="none"}},E_={matches(t,e,n,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 s=new RegExp(e[0],e.length===2?e[1]:void 0),i=o=>s.test(o.full);return Cl(r._cacheText,t,i)==="self"}},b_={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(af(t))return!1;const s=De(e[0]).toLowerCase();return(o=>o.normalized.toLowerCase().includes(s))(Ke(r._cacheText,t))}};function xs(t){return{matches(e,n,r,s){const i=n.length&&typeof n[n.length-1]=="number"?n[n.length-1]:void 0,o=i===void 0?n:n.slice(0,n.length-1);if(n.length<1+(i===void 0?0:1))throw new Error(`"${t}" engine expects a selector list and optional maximum distance in pixels`);const l=s.query(r,o),a=gy(t,e,l,i);return a===void 0?!1:(s._markScore(e,a),!0)}}}const T_={query(t,e,n){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 s=Is.query(t,e.slice(0,e.length-1),n);return r--,r<s.length?[s[r]]:[]}};function Ui(t,e){if(t!==e.scope)return e.pierceShadow?$e(t):t.parentElement||void 0}function xa(t,e){if(t!==e.scope)return t.previousElementSibling||void 0}function yy(t){const e=new Map,n=[],r=[];function s(o){let l=e.get(o);if(l)return l;const a=$e(o);return a?s(a).children.push(o):n.push(o),l={children:[],taken:!1},e.set(o,l),l}for(const o of t)s(o).taken=!0;function i(o){const l=e.get(o);if(l.taken&&r.push(o),l.children.length>1){const a=new Set(l.children);l.children=[];let c=o.firstElementChild;for(;c&&l.children.length<a.size;)a.has(c)&&l.children.push(c),c=c.nextElementSibling;for(c=o.shadowRoot?o.shadowRoot.firstElementChild:null;c&&l.children.length<a.size;)a.has(c)&&l.children.push(c),c=c.nextElementSibling}l.children.forEach(i)}return n.forEach(i),r}const Dc=new Map,Fc=new Map,vy=10,ts=vy/2,dh=1,N_=2,C_=10,A_=50,wy=100,Sy=120,xy=140,_y=160,go=180,ky=200,hh=250,L_=Sy+ts,I_=xy+ts,j_=wy+ts,M_=_y+ts,O_=go+ts,$_=ky+ts,P_=300,R_=500,Ey=510,_a=520,by=530,Ty=1e4,D_=1e7,F_=1e3;function ph(t,e,n){t._evaluator.begin(),of();try{let r=[];if(n.forTextExpect){let o=Hi(t,e.ownerDocument.documentElement,n);for(let l=e;l;l=$e(l)){const a=or(t,l,{...n,noText:!0});if(!a)continue;if(ln(a)<=F_){o=a;break}}r=[yo(o)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const o=Ls(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",n.root);o&&$r(o)&&(e=o)}if(n.multiple){const o=or(t,e,n),l=or(t,e,{...n,noText:!0});let a=[o,l];if(Dc.clear(),Fc.clear(),o&&ka(o)&&a.push(or(t,e,{...n,noCSSId:!0})),l&&ka(l)&&a.push(or(t,e,{...n,noText:!0,noCSSId:!0})),a=a.filter(Boolean),!a.length){const c=Hi(t,e,n);a.push(c),ka(c)&&a.push(Hi(t,e,{...n,noCSSId:!0}))}r=[...new Set(a.map(c=>yo(c)))]}else{const o=or(t,e,n)||Hi(t,e,n);r=[yo(o)]}}const s=r[0],i=t.parseSelector(s);return{selector:s,selectors:r,elements:t.querySelectorAll(i,n.root??e.ownerDocument)}}finally{Dc.clear(),Fc.clear(),lf(),t._evaluator.end()}}function mh(t){return t.filter(e=>e[0].selector[0]!=="/")}function or(t,e,n){if(n.root&&!Nl(n.root,e))throw new Error("Target element must belong to the root's subtree");if(e===n.root)return[{engine:"css",selector:":scope",score:1}];if(e.ownerDocument.documentElement===e)return[{engine:"css",selector:"html",score:1}];const r=(i,o)=>{const l=i===e;let a=o?B_(t,i,i===e):[];i!==e&&(a=mh(a));const c=z_(t,i,n).filter(d=>!n.omitInternalEngines||!d.engine.startsWith("internal:")).map(d=>[d]);let u=gh(t,n.root??e.ownerDocument,i,[...a,...c],l);a=mh(a);const f=d=>{const h=o&&!d.length,v=[...d,...c].filter(w=>u?ln(w)<ln(u):!0);let m=v[0];if(m)for(let w=$e(i);w&&w!==n.root;w=$e(w)){const y=s(w,h);if(!y||u&&ln([...y,...m])>=ln(u))continue;if(m=gh(t,w,i,v,l),!m)return;const g=[...y,...m];(!u||ln(g)<ln(u))&&(u=g)}};return f(a),i===e&&a.length&&f([]),u},s=(i,o)=>{const l=o?Dc:Fc;let a=l.get(i);return a===void 0&&(a=r(i,o),l.set(i,a)),a};return r(e,!n.noText)}function z_(t,e,n){const r=[];{for(const o of["data-testid","data-test-id","data-test"])o!==n.testIdAttributeName&&e.getAttribute(o)&&r.push({engine:"css",selector:`[${o}=${vs(e.getAttribute(o))}]`,score:N_});if(!n.noCSSId){const o=e.getAttribute("id");o&&!U_(o)&&r.push({engine:"css",selector:Ny(o),score:R_})}r.push({engine:"css",selector:ut(e.nodeName.toLowerCase()),score:by})}if(e.nodeName==="IFRAME"){for(const o of["name","title"])e.getAttribute(o)&&r.push({engine:"css",selector:`${ut(e.nodeName.toLowerCase())}[${o}=${vs(e.getAttribute(o))}]`,score:C_});return e.getAttribute(n.testIdAttributeName)&&r.push({engine:"css",selector:`[${n.testIdAttributeName}=${vs(e.getAttribute(n.testIdAttributeName))}]`,score:dh}),zc([r]),r}if(e.getAttribute(n.testIdAttributeName)&&r.push({engine:"internal:testid",selector:`[${n.testIdAttributeName}=${Oe(e.getAttribute(n.testIdAttributeName),!0)}]`,score:dh}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const o=e;if(o.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${Oe(o.placeholder,!0)}]`,score:L_});for(const l of Er(o.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${Oe(l.text,!1)}]`,score:Sy-l.scoreBonus})}}const s=ly(t._evaluator._cacheText,e);for(const o of s){const l=o.normalized;r.push({engine:"internal:label",selector:Ve(l,!0),score:I_});for(const a of Er(l))r.push({engine:"internal:label",selector:Ve(a.text,!1),score:xy-a.scoreBonus})}const i=ye(e);return i&&!["none","presentation"].includes(i)&&r.push({engine:"internal:role",selector:i,score:Ey}),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:`${ut(e.nodeName.toLowerCase())}[name=${vs(e.getAttribute("name"))}]`,score:_a}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&r.push({engine:"css",selector:`${ut(e.nodeName.toLowerCase())}[type=${vs(e.getAttribute("type"))}]`,score:_a}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:ut(e.nodeName.toLowerCase()),score:_a+1}),zc([r]),r}function B_(t,e,n){if(e.nodeName==="SELECT")return[];const r=[],s=e.getAttribute("title");if(s){r.push([{engine:"internal:attr",selector:`[title=${Oe(s,!0)}]`,score:$_}]);for(const c of Er(s))r.push([{engine:"internal:attr",selector:`[title=${Oe(c.text,!1)}]`,score:ky-c.scoreBonus}])}const i=e.getAttribute("alt");if(i&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${Oe(i,!0)}]`,score:M_}]);for(const c of Er(i))r.push([{engine:"internal:attr",selector:`[alt=${Oe(c.text,!1)}]`,score:_y-c.scoreBonus}])}const o=Ke(t._evaluator._cacheText,e).normalized,l=o?Er(o):[];if(o){if(n){o.length<=80&&r.push([{engine:"internal:text",selector:Ve(o,!0),score:O_}]);for(const u of l)r.push([{engine:"internal:text",selector:Ve(u.text,!1),score:go-u.scoreBonus}])}const c={engine:"css",selector:ut(e.nodeName.toLowerCase()),score:by};for(const u of l)r.push([c,{engine:"internal:has-text",selector:Ve(u.text,!1),score:go-u.scoreBonus}]);if(o.length<=80){const u=new RegExp("^"+Go(o)+"$");r.push([c,{engine:"internal:has-text",selector:Ve(u,!1),score:hh}])}}const a=ye(e);if(a&&!["none","presentation"].includes(a)){const c=ui(e,!1);if(c){const u={engine:"internal:role",selector:`${a}[name=${Oe(c,!0)}]`,score:j_};r.push([u]);for(const f of Er(c))r.push([{engine:"internal:role",selector:`${a}[name=${Oe(f.text,!1)}]`,score:wy-f.scoreBonus}])}else{const u={engine:"internal:role",selector:`${a}`,score:Ey};for(const f of l)r.push([u,{engine:"internal:has-text",selector:Ve(f.text,!1),score:go-f.scoreBonus}]);if(o.length<=80){const f=new RegExp("^"+Go(o)+"$");r.push([u,{engine:"internal:has-text",selector:Ve(f,!1),score:hh}])}}}return zc(r),r}function Ny(t){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(t)?"#"+t:`[id="${ut(t)}"]`}function ka(t){return t.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function Hi(t,e,n){const r=n.root??e.ownerDocument,s=[];function i(l){const a=s.slice();l&&a.unshift(l);const c=a.join(" > "),u=t.parseSelector(c);return t.querySelector(u,r,!1)===e?c:void 0}function o(l){const a={engine:"css",selector:l,score:D_},c=t.parseSelector(l),u=t.querySelectorAll(c,r);if(u.length===1)return[a];const f={engine:"nth",selector:String(u.indexOf(e)),score:Ty};return[a,f]}for(let l=e;l&&l!==r;l=$e(l)){const a=l.nodeName.toLowerCase();let c="";if(l.id&&!n.noCSSId){const d=Ny(l.id),h=i(d);if(h)return o(h);c=d}const u=l.parentNode,f=[...l.classList];for(let d=0;d<f.length;++d){const h="."+ut(f.slice(0,d+1).join(".")),v=i(h);if(v)return o(v);!c&&u&&u.querySelectorAll(h).length===1&&(c=h)}if(u){const d=[...u.children],v=d.filter(w=>w.nodeName.toLowerCase()===a).indexOf(l)===0?ut(a):`${ut(a)}:nth-child(${1+d.indexOf(l)})`,m=i(v);if(m)return o(m);c||(c=v)}else c||(c=ut(a));s.unshift(c)}return o(i())}function zc(t){for(const e of t)for(const n of e)n.score>A_&&n.score<P_&&(n.score+=Math.min(vy,n.selector.length/10|0))}function yo(t){const e=[];let n="";for(const{engine:r,selector:s}of t)e.length&&(n!=="css"||r!=="css"||s.startsWith(":nth-match("))&&e.push(">>"),n=r,r==="css"?e.push(s):e.push(`${r}=${s}`);return e.join(" ")}function ln(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n].score*(t.length-n);return e}function gh(t,e,n,r,s){const i=r.map(l=>({tokens:l,score:ln(l)}));i.sort((l,a)=>l.score-a.score);let o=null;for(const{tokens:l}of i){const a=t.parseSelector(yo(l)),c=t.querySelectorAll(a,e);if(c[0]===n&&c.length===1)return l;const u=c.indexOf(n);if(!s||o||u===-1||c.length>5)continue;const f={engine:"nth",selector:String(u),score:Ty};o=[...l,f]}return o}function U_(t){let e,n=0;for(let r=0;r<t.length;++r){const s=t[r];let i;if(!(s==="-"||s==="_")){if(s>="a"&&s<="z"?i="lower":s>="A"&&s<="Z"?i="upper":s>="0"&&s<="9"?i="digit":i="other",i==="lower"&&e==="upper"){e=i;continue}e&&e!==i&&++n,e=i}}return n>=t.length/4}function Vi(t,e){if(t.length<=e)return t;t=t.substring(0,e);const n=t.match(/^(.*)\b(.+?)$/);return n?n[1].trimEnd():""}function Er(t){let e=[];{const n=t.match(/^([\d.,]+)[^.,\w]/),r=n?n[1].length:0;if(r){const s=Vi(t.substring(r).trimStart(),80);e.push({text:s,scoreBonus:s.length<=30?2:1})}}{const n=t.match(/[^.,\w]([\d.,]+)$/),r=n?n[1].length:0;if(r){const s=Vi(t.substring(0,t.length-r).trimEnd(),80);e.push({text:s,scoreBonus:s.length<=30?2:1})}}return t.length<=30?e.push({text:t,scoreBonus:0}):(e.push({text:Vi(t,80),scoreBonus:0}),e.push({text:Vi(t,30),scoreBonus:1})),e=e.filter(n=>n.text),e.length||e.push({text:t.substring(0,80),scoreBonus:0}),e}const yh=":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-line.selectable:hover{background-color:#f2f2f2;overflow:hidden}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;width:400px;height:150px;z-index:10;font-size:13px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.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}";class Ea{constructor(e){this._highlightEntries=[],this._highlightOptions={},this._language="javascript",this._injectedScript=e;const n=e.document;this._isUnderTest=e.isUnderTest,this._glassPaneElement=n.createElement("x-pw-glass"),this._glassPaneElement.style.position="fixed",this._glassPaneElement.style.top="0",this._glassPaneElement.style.right="0",this._glassPaneElement.style.bottom="0",this._glassPaneElement.style.left="0",this._glassPaneElement.style.zIndex="2147483646",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent";for(const r of["click","auxclick","dragstart","input","keydown","keyup","pointerdown","pointerup","mousedown","mouseup","mouseleave","focus","scroll"])this._glassPaneElement.addEventListener(r,s=>{s.stopPropagation(),s.stopImmediatePropagation(),s.type==="click"&&s.button===0&&this._highlightOptions.tooltipListItemSelected&&this._highlightOptions.tooltipListItemSelected(void 0)});if(this._actionPointElement=n.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const r=new this._injectedScript.window.CSSStyleSheet;r.replaceSync(yh),this._glassPaneShadow.adoptedStyleSheets.push(r)}else{const r=this._injectedScript.document.createElement("style");r.textContent=yh,this._glassPaneShadow.appendChild(r)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&!this._injectedScript.document.documentElement.contains(this._glassPaneElement)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&cancelAnimationFrame(this._rafRequest),this.updateHighlight(this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),{tooltipText:Sn(this._language,Wt(e))}),this._rafRequest=this._injectedScript.builtinRequestAnimationFrame(()=>this.runHighlightOnRaf(e))}uninstall(){this._rafRequest&&cancelAnimationFrame(this._rafRequest),this._glassPaneElement.remove()}showActionPoint(e,n){this._actionPointElement.style.top=n+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,n;for(const r of this._highlightEntries)(e=r.highlightElement)==null||e.remove(),(n=r.tooltipElement)==null||n.remove();this._highlightEntries=[],this._highlightOptions={},this._glassPaneElement.style.pointerEvents="none"}updateHighlight(e,n){this._innerUpdateHighlight(e,n)}maskElements(e,n){this._innerUpdateHighlight(e,{color:n})}_innerUpdateHighlight(e,n){let r=n.color;if(r||(r=e.length>1?"#f6b26b7f":"#6fa8dc7f"),!this._highlightIsUpToDate(e,n)){this.clearHighlight(),this._highlightOptions=n,this._glassPaneElement.style.pointerEvents=n.tooltipListItemSelected?"initial":"none";for(let s=0;s<e.length;++s){const i=this._createHighlightElement();this._glassPaneShadow.appendChild(i);let o;if(n.tooltipList||n.tooltipText||n.tooltipFooter){o=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(o),o.style.top="0",o.style.left="0",o.style.display="flex";let l=[];if(n.tooltipList)l=n.tooltipList;else if(n.tooltipText){const a=e.length>1?` [${s+1} of ${e.length}]`:"";l=[n.tooltipText+a]}for(let a=0;a<l.length;a++){const c=this._injectedScript.document.createElement("x-pw-tooltip-line");c.textContent=l[a],o.appendChild(c),n.tooltipListItemSelected&&(c.classList.add("selectable"),c.addEventListener("click",()=>{var u;return(u=n.tooltipListItemSelected)==null?void 0:u.call(n,a)}))}if(n.tooltipFooter){const a=this._injectedScript.document.createElement("x-pw-tooltip-footer");a.textContent=n.tooltipFooter,o.appendChild(a)}}this._highlightEntries.push({targetElement:e[s],tooltipElement:o,highlightElement:i})}for(const s of this._highlightEntries){if(s.box=s.targetElement.getBoundingClientRect(),!s.tooltipElement)continue;const{anchorLeft:i,anchorTop:o}=this.tooltipPosition(s.box,s.tooltipElement);s.tooltipTop=o,s.tooltipLeft=i}for(const s of this._highlightEntries){s.tooltipElement&&(s.tooltipElement.style.top=s.tooltipTop+"px",s.tooltipElement.style.left=s.tooltipLeft+"px");const i=s.box;s.highlightElement.style.backgroundColor=r,s.highlightElement.style.left=i.x+"px",s.highlightElement.style.top=i.y+"px",s.highlightElement.style.width=i.width+"px",s.highlightElement.style.height=i.height+"px",s.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:i.x,y:i.y,width:i.width,height:i.height}))}}}firstBox(){var e;return(e=this._highlightEntries[0])==null?void 0:e.box}tooltipPosition(e,n){const r=n.offsetWidth,s=n.offsetHeight,i=this._glassPaneElement.offsetWidth,o=this._glassPaneElement.offsetHeight;let l=e.left;l+r>i-5&&(l=i-r-5);let a=e.bottom+5;return a+s>o-5&&(e.top>s+5?a=e.top-s-5:a=o-5-s),{anchorLeft:l,anchorTop:a}}_highlightIsUpToDate(e,n){var r,s;if(n.tooltipText!==this._highlightOptions.tooltipText||n.tooltipListItemSelected!==this._highlightOptions.tooltipListItemSelected||n.tooltipFooter!==this._highlightOptions.tooltipFooter||((r=n.tooltipList)==null?void 0:r.length)!==((s=this._highlightOptions.tooltipList)==null?void 0:s.length))return!1;if(n.tooltipList&&this._highlightOptions.tooltipList){for(let i=0;i<n.tooltipList.length;i++)if(n.tooltipList[i]!==this._highlightOptions.tooltipList[i])return!1}if(e.length!==this._highlightEntries.length)return!1;for(let i=0;i<this._highlightEntries.length;++i){if(e[i]!==this._highlightEntries[i].targetElement)return!1;const o=this._highlightEntries[i].box;if(!o)return!1;const l=e[i].getBoundingClientRect();if(l.top!==o.top||l.right!==o.right||l.bottom!==o.bottom||l.left!==o.left)return!1}return!0}_createHighlightElement(){return this._injectedScript.document.createElement("x-pw-highlight")}appendChild(e){this._glassPaneShadow.appendChild(e)}}function H_(t){return Cy(t)?"'"+t.replace(/'/g,"''")+"'":t}function vh(t){return Cy(t)?'"'+t.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
|
|
80
|
-
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':t}function Cy(t){return!!(t.length===0||/^\s|\s$/.test(t)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(t)||/^-/.test(t)||/[\n:](\s|$)/.test(t)||/\s#/.test(t)||/[\n\r]/.test(t)||/^[&*\],?!>|@"'#%]/.test(t)||/[{}`]/.test(t)||/^\[/.test(t)||!isNaN(Number(t))||["y","n","yes","no","true","false","on","off","null"].includes(t.toLowerCase()))}function tl(t){const e=new Set,n={root:{role:"fragment",name:"",children:[],element:t},elements:new Map,ids:new Map},r=o=>{const l=n.elements.size+1;n.elements.set(l,o),n.ids.set(o,l)};r(t);const s=(o,l)=>{if(e.has(l))return;if(e.add(l),l.nodeType===Node.TEXT_NODE&&l.nodeValue){const f=l.nodeValue;o.role!=="textbox"&&f&&o.children.push(l.nodeValue||"");return}if(l.nodeType!==Node.ELEMENT_NODE)return;const a=l;if(ct(a))return;const c=[];if(a.hasAttribute("aria-owns")){const f=a.getAttribute("aria-owns").split(/\s+/);for(const d of f){const h=t.ownerDocument.getElementById(d);h&&c.push(h)}}r(a);const u=V_(a);u&&o.children.push(u),i(u||o,a,c)};function i(o,l,a=[]){var d;const u=(((d=Zn(l))==null?void 0:d.display)||"inline")!=="inline"||l.nodeName==="BR"?" ":"";u&&o.children.push(u),o.children.push(Zo(l,"::before"));const f=l.nodeName==="SLOT"?l.assignedNodes():[];if(f.length)for(const h of f)s(o,h);else{for(let h=l.firstChild;h;h=h.nextSibling)h.assignedSlot||s(o,h);if(l.shadowRoot)for(let h=l.shadowRoot.firstChild;h;h=h.nextSibling)s(o,h)}for(const h of a)s(o,h);o.children.push(Zo(l,"::after")),u&&o.children.push(u),o.children.length===1&&o.name===o.children[0]&&(o.children=[])}of();try{s(n.root,t)}finally{lf()}return q_(n.root),n}function V_(t){const e=ye(t);if(!e||e==="presentation"||e==="none")return null;const n=De(ui(t,!1)||""),r={role:e,name:n,children:[],element:t};return Qu.includes(e)&&(r.checked=Gg(t)),ey.includes(e)&&(r.disabled=el(t)),Ju.includes(e)&&(r.expanded=Yg(t)),Yu.includes(e)&&(r.level=Zg(t)),Gu.includes(e)&&(r.pressed=Jg(t)),Ku.includes(e)&&(r.selected=Xg(t)),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.type!=="checkbox"&&t.type!=="radio"&&(r.children=[t.value]),r}function q_(t){const e=(r,s)=>{if(!r.length)return;const i=De(r.join(""));i&&s.push(i),r.length=0},n=r=>{const s=[],i=[];for(const o of r.children||[])typeof o=="string"?i.push(o):(e(i,s),n(o),s.push(o));e(i,s),r.children=s.length?s:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};n(t)}function Ay(t,e){return e?t?typeof e=="string"?t===e:!!t.match(new RegExp(e.pattern)):!1:!0}function W_(t,e){return Ay(t,e.text)}function K_(t,e){return Ay(t,e.name)}function Q_(t,e){const n=tl(t).root;return{matches:Iy(n,e,!1),received:{raw:Vs(n,{mode:"raw"}),regex:Vs(n,{mode:"regex"})}}}function X_(t,e){const n=tl(t).root;return Iy(n,e,!0).map(s=>s.element)}function Ly(t,e,n){return typeof t=="string"&&e.kind==="text"?W_(t,e):t!==null&&typeof t=="object"&&e.kind==="role"?!(e.role!=="fragment"&&e.role!==t.role||e.checked!==void 0&&e.checked!==t.checked||e.disabled!==void 0&&e.disabled!==t.disabled||e.expanded!==void 0&&e.expanded!==t.expanded||e.level!==void 0&&e.level!==t.level||e.pressed!==void 0&&e.pressed!==t.pressed||e.selected!==void 0&&e.selected!==t.selected||!K_(t.name,e)||!G_(t.children||[],e.children||[])):!1}function G_(t,e,n){if(e.length>t.length)return!1;const r=t.slice(),s=e.slice();for(const i of s){let o=r.shift();for(;o&&!Ly(o,i);)o=r.shift();if(!o)return!1}return!0}function Iy(t,e,n){const r=[],s=(i,o)=>{if(Ly(i,e)){const l=typeof i=="string"?o:i;return l&&r.push(l),!n}if(typeof i=="string")return!1;for(const l of i.children||[])if(s(l,i))return!0;return!1};return s(t,null),r}function Vs(t,e){const n=[],r=(e==null?void 0:e.mode)==="regex"?Y_:()=>!0,s=(e==null?void 0:e.mode)==="regex"?J_:o=>o,i=(o,l,a)=>{if(typeof o=="string"){if(l&&!r(l,o))return;const f=vh(s(o));f&&n.push(a+"- text: "+f);return}let c=o.role;if(o.name&&o.name.length<=900){const f=s(o.name);if(f){const d=f.startsWith("/")&&f.endsWith("/")?f:JSON.stringify(f);c+=" "+d}}if(o.checked==="mixed"&&(c+=" [checked=mixed]"),o.checked===!0&&(c+=" [checked]"),o.disabled&&(c+=" [disabled]"),o.expanded&&(c+=" [expanded]"),o.level&&(c+=` [level=${o.level}]`),o.pressed==="mixed"&&(c+=" [pressed=mixed]"),o.pressed===!0&&(c+=" [pressed]"),o.selected===!0&&(c+=" [selected]"),e!=null&&e.ids){const f=e==null?void 0:e.ids.get(o.element);f&&(c+=` [id=${f}]`)}const u=a+"- "+H_(c);if(!o.children.length)n.push(u);else if(o.children.length===1&&typeof o.children[0]=="string"){const f=r(o,o.children[0])?s(o.children[0]):null;f?n.push(u+": "+vh(f)):n.push(u)}else{n.push(u+":");for(const f of o.children||[])i(f,o,a+" ")}};if(t.role==="fragment")for(const o of t.children||[])i(o,t,"");else i(t,null,"");return n.join(`
|
|
81
|
-
`)}function J_(t){const e=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let n="",r=0;const s=new RegExp(e.map(i=>"("+i.regex.source+")").join("|"),"g");return t.replace(s,(i,...o)=>{const l=o[o.length-2],a=o.slice(0,-2);n+=Go(t.slice(r,l));for(let c=0;c<a.length;c++)if(a[c]){const{replacement:u}=e[c];n+=u;break}return r=l+i.length,i}),n?(n+=Go(t.slice(r)),String(new RegExp(n))):t}function Y_(t,e){if(!e.length)return!1;if(!t.name)return!0;if(t.name.length>e.length)return!1;const n=e.length<=200&&t.name.length<=200?X1(e,t.name):"";let r=e;for(;n&&r.includes(n);)r=r.replace(n,"");return r.trim().length/e.length>.1}function cf(t,e,n={}){var d;const r=new t.LineCounter,s={keepSourceTokens:!0,lineCounter:r,...n},i=t.parseDocument(e,s),o=[],l=h=>[r.linePos(h[0]),r.linePos(h[1])],a=h=>{o.push({message:h.message,range:[r.linePos(h.pos[0]),r.linePos(h.pos[1])]})},c=(h,v)=>{for(const m of v.items){if(m instanceof t.Scalar&&typeof m.value=="string"){const g=nl.parse(m,s,o);g&&(h.children=h.children||[],h.children.push(g));continue}if(m instanceof t.YAMLMap){u(h,m);continue}o.push({message:"Sequence items should be strings or maps",range:l(m.range||v.range)})}},u=(h,v)=>{for(const m of v.items){if(h.children=h.children||[],!(m.key instanceof t.Scalar&&typeof m.key.value=="string")){o.push({message:"Only string keys are supported",range:l(m.key.range||v.range)});continue}const y=m.key,g=m.value;if(y.value==="text"){if(!(g instanceof t.Scalar&&typeof g.value=="string")){o.push({message:"Text value should be a string",range:l(m.value.range||v.range)});continue}h.children.push({kind:"text",text:wh(g.value)});continue}const S=nl.parse(y,s,o);if(!S)continue;if(g instanceof t.Scalar){const b=typeof g.value;if(b!=="string"&&b!=="number"&&b!=="boolean"){o.push({message:"Node value should be a string or a sequence",range:l(m.value.range||v.range)});continue}h.children.push({...S,children:[{kind:"text",text:wh(String(g.value))}]});continue}if(g instanceof t.YAMLSeq){h.children.push(S),c(S,g);continue}o.push({message:"Map values should be strings or sequences",range:l(m.value.range||v.range)})}},f={kind:"role",role:"fragment"};return i.errors.forEach(a),o.length?{errors:o,fragment:f}:(i.contents instanceof t.YAMLSeq||o.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:i.contents?l(i.contents.range):[{line:0,col:0},{line:0,col:0}]}),o.length?{errors:o,fragment:f}:(c(f,i.contents),o.length?{errors:o,fragment:Z_}:((d=f.children)==null?void 0:d.length)===1?{fragment:f.children[0],errors:o}:{fragment:f,errors:o}))}const Z_={kind:"role",role:"fragment"};function jy(t){return t.replace(/[\r\n\s\t]+/g," ").trim()}function wh(t){return t.startsWith("/")&&t.endsWith("/")&&t.length>1?{pattern:t.slice(1,-1)}:jy(t)}class nl{static parse(e,n,r){try{return new nl(e.value)._parse()}catch(s){if(s instanceof Sh){const i=n.prettyErrors===!1?s.message:s.message+`:
|
|
82
|
-
|
|
83
|
-
`+e.value+`
|
|
84
|
-
`+" ".repeat(s.pos)+`^
|
|
85
|
-
`;return r.push({message:i,range:[n.lineCounter.linePos(e.range[0]),n.lineCounter.linePos(e.range[0]+s.pos)]}),null}throw s}}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 n=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(n,this._pos)}_readString(){let e="",n=!1;for(;!this._eof();){const r=this._next();if(n)e+=r,n=!1;else if(r==="\\")n=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,n=0){throw new Sh(e,n||this._pos)}_readRegex(){let e="",n=!1,r=!1;for(;!this._eof();){const s=this._next();if(n)e+=s,n=!1;else if(s==="\\")n=!0,e+=s;else{if(s==="/"&&!r)return{pattern:e};s==="["?(r=!0,e+=s):s==="]"&&r?(e+=s,r=!1):e+=s}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),jy(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let n=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),n=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let s="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),n=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)s+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,r,s||"true",n)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const n=this._readStringOrRegex()||"",r={kind:"role",role:e,name:n};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,n,r,s){if(n==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',s),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',s),e.disabled=r==="true";return}if(n==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',s),e.expanded=r==="true";return}if(n==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',s),e.level=Number(r);return}if(n==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',s),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',s),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${n}]`,s)}_assert(e,n,r){e||this._throwError(n||"Assertion error",r)}}class Sh extends Error{constructor(e,n){super(e),this.pos=n}}class My{constructor(e,n,r,s,i,o,l){this.onGlobalListenersRemoved=new Set,this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Sn,cacheNormalizedWhitespaces:K1,elementText:Ke,getAriaRole:ye,getElementAccessibleDescription:ch,getElementAccessibleName:ui,isElementVisible:$r,isInsideScope:Nl,normalizeWhiteSpace:De,parseAriaSnapshot:cf},this.window=e,this.document=e.document,this.isUnderTest=n,this._sdkLanguage=r,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=s,this._evaluator=new g_(new Map),this._engines=new Map,this._engines.set("xpath",sh),this._engines.set("xpath:light",sh),this._engines.set("_react",n_),this._engines.set("_vue",l_),this._engines.set("role",fh(!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",fh(!0));for(const{name:a,engine:c}of l)this._engines.set(a,c);this._stableRafCount=i,this._browserName=o,Ox(o),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),n&&(this.window.__injectedScript=this)}builtinSetTimeout(e,n){var r;return(r=this.window.__pwClock)!=null&&r.builtin?this.window.__pwClock.builtin.setTimeout(e,n):this.window.setTimeout(e,n)}builtinClearTimeout(e){var n;return(n=this.window.__pwClock)!=null&&n.builtin?this.window.__pwClock.builtin.clearTimeout(e):this.window.clearTimeout(e)}builtinRequestAnimationFrame(e){var n;return(n=this.window.__pwClock)!=null&&n.builtin?this.window.__pwClock.builtin.requestAnimationFrame(e):this.window.requestAnimationFrame(e)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){const n=bl(e);return pS(n,r=>{if(!this._engines.has(r.name))throw this.createStacklessError(`Unknown engine "${r.name}" while parsing selector ${e}`)}),n}generateSelector(e,n){return ph(this,e,n)}generateSelectorSimple(e,n){return ph(this,e,{...n,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,n,r){const s=this.querySelectorAll(e,n);if(r&&s.length>1)throw this.strictModeViolationError(e,s);return s[0]}_queryNth(e,n){const r=[...e];let s=+n.body;return s===-1&&(s=r.length-1),new Set(r.slice(s,s+1))}_queryLayoutSelector(e,n,r){const s=n.name,i=n.body,o=[],l=this.querySelectorAll(i.parsed,r);for(const a of e){const c=gy(s,a,l,i.distance);c!==void 0&&o.push({element:a,score:c})}return o.sort((a,c)=>a.score-c.score),new Set(o.map(a=>a.element))}ariaSnapshot(e,n){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const r=tl(e);return Vs(r.root,n)}ariaSnapshotAsObject(e){return tl(e)}ariaSnapshotElement(e,n){return e.elements.get(n)||null}renderAriaTree(e,n){return Vs(e,n)}renderAriaSnapshotWithIds(e){return Vs(e.root,{ids:e.ids})}getAllByAria(e,n){return X_(e.documentElement,n)}querySelectorAll(e,n){if(e.capture!==void 0){if(e.parts.some(s=>s.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 s={parts:e.parts.slice(e.capture+1)},i={name:"internal:has",body:{parsed:s},source:Wt(s)};r.parts.push(i)}return this.querySelectorAll(r,n)}if(!n.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(n.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[n];this._evaluator.begin();try{let r=new Set([n]);for(const s of e.parts)if(s.name==="nth")r=this._queryNth(r,s);else if(s.name==="internal:and"){const i=this.querySelectorAll(s.body.parsed,n);r=new Set(i.filter(o=>r.has(o)))}else if(s.name==="internal:or"){const i=this.querySelectorAll(s.body.parsed,n);r=new Set(yy(new Set([...r,...i])))}else if(m_.includes(s.name))r=this._queryLayoutSelector(r,s,n);else{const i=new Set;for(const o of r){const l=this._queryEngineAll(s,o);for(const a of l)i.add(a)}r=i}return[...r]}finally{this._evaluator.end()}}_queryEngineAll(e,n){const r=this._engines.get(e.name).queryAll(n,e.body);for(const s of r)if(!("nodeName"in s))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(s)}`);return r}_createAttributeEngine(e,n){const r=s=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(s)}]`,functions:[]},combinator:""}]}];return{queryAll:(s,i)=>this._evaluator.query({scope:s,pierceShadow:n},r(i))}}_createCSSEngine(){return{queryAll:(e,n)=>this._evaluator.query({scope:e,pierceShadow:!0},n)}}_createTextEngine(e,n){return{queryAll:(s,i)=>{const{matcher:o,kind:l}=Wi(i,n),a=[];let c=null;const u=d=>{if(l==="lax"&&c&&c.contains(d))return!1;const h=Cl(this._evaluator._cacheText,d,o);h==="none"&&(c=d),(h==="self"||h==="selfAndChildren"&&l==="strict"&&!n)&&a.push(d)};s.nodeType===Node.ELEMENT_NODE&&u(s);const f=this._evaluator._queryCSS({scope:s,pierceShadow:e},"*");for(const d of f)u(d);return a}}}_createInternalHasTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,s=Ke(this._evaluator._cacheText,r),{matcher:i}=Wi(n,!0);return i(s)?[r]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,s=Ke(this._evaluator._cacheText,r),{matcher:i}=Wi(n,!0);return i(s)?[]:[r]}}}_createInternalLabelEngine(){return{queryAll:(e,n)=>{const{matcher:r}=Wi(n,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(i=>ly(this._evaluator._cacheText,i).some(o=>r(o)))}}}_createNamedAttributeEngine(){return{queryAll:(n,r)=>{const s=Un(r,!0);if(s.name||s.attributes.length!==1)throw new Error("Malformed attribute selector: "+r);const{name:i,value:o,caseSensitive:l}=s.attributes[0],a=l?null:o.toLowerCase();let c;return o instanceof RegExp?c=f=>!!f.match(o):l?c=f=>f===o:c=f=>f.toLowerCase().includes(a),this._evaluator._queryCSS({scope:n,pierceShadow:!0},`[${i}]`).filter(f=>c(f.getAttribute(i)))}}}_createControlEngine(){return{queryAll(e,n){if(n==="enter-frame")return[];if(n==="return-empty")return[];if(n==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${n}`)}}}_createHasEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[n]:[]}}_createHasNotEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[]:[n]}}_createVisibleEngine(){return{queryAll:(n,r)=>{if(n.nodeType!==1)return[];const s=r==="true";return $r(n)===s?[n]:[]}}}_createInternalChainEngine(){return{queryAll:(n,r)=>this.querySelectorAll(r.parsed,n)}}extend(e,n){const r=this.window.eval(`
|
|
86
|
-
(() => {
|
|
87
|
-
const module = {};
|
|
88
|
-
${e}
|
|
89
|
-
return module.exports.default();
|
|
90
|
-
})()`);return new r(this,n)}async viewportRatio(e){return await new Promise(n=>{const r=new IntersectionObserver(s=>{n(s[0].intersectionRatio),r.disconnect()});r.observe(e),this.builtinRequestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const n=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(n.borderLeftWidth||"",10),top:parseInt(n.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const n=e.ownerDocument.defaultView;for(let s=e;s;s=$e(s))if(n.getComputedStyle(s).transform!=="none")return"transformed";const r=n.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,n){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(n==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(n==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),n==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const s=r.closest("label");s&&s.control&&(r=s.control)}return r}async checkElementStates(e,n){if(n.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 n)if(r!=="stable"){const s=this.elementState(e,r);if(s.received==="error:notconnected")return"error:notconnected";if(!s.matches)return{missingState:r}}}async _checkElementIsStable(e){const n=Symbol("continuePolling");let r,s=0,i=0;const o=()=>{const f=this.retarget(e,"no-follow-label");if(!f)return"error:notconnected";const d=performance.now();if(this._stableRafCount>1&&d-i<15)return n;i=d;const h=f.getBoundingClientRect(),v={x:h.top,y:h.left,width:h.width,height:h.height};if(r){if(!(v.x===r.x&&v.y===r.y&&v.width===r.width&&v.height===r.height))return!1;if(++s>=this._stableRafCount)return!0}return r=v,n};let l,a;const c=new Promise((f,d)=>{l=f,a=d}),u=()=>{try{const f=o();f!==n?l(f):this.builtinRequestAnimationFrame(u)}catch(f){a(f)}};return this.builtinRequestAnimationFrame(u),c}elementState(e,n){const r=this.retarget(e,["visible","hidden"].includes(n)?"none":"follow-label");if(!r||!r.isConnected)return n==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(n==="visible"||n==="hidden"){const s=$r(r);return{matches:n==="visible"?s:!s,received:s?"visible":"hidden"}}if(n==="disabled"||n==="enabled"){const s=el(r);return{matches:n==="disabled"?s:!s,received:s?"disabled":"enabled"}}if(n==="editable"){const s=el(r),i=Gx(r);if(i==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!s&&!i,received:s?"disabled":i?"readOnly":"editable"}}if(n==="checked"||n==="unchecked"){const s=n==="checked",i=Qx(r);if(i==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:s===i,received:i?"checked":"unchecked"}}if(n==="indeterminate"){const s=Kx(r);if(s==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:s==="mixed",received:s===!0?"checked":s===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${n}"`)}selectOptions(e,n){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 s=r,i=[...s.options],o=[];let l=n.slice();for(let a=0;a<i.length;a++){const c=i[a],u=f=>{if(f instanceof Node)return c===f;let d=!0;return f.valueOrLabel!==void 0&&(d=d&&(f.valueOrLabel===c.value||f.valueOrLabel===c.label)),f.value!==void 0&&(d=d&&f.value===c.value),f.label!==void 0&&(d=d&&f.label===c.label),f.index!==void 0&&(d=d&&f.index===a),d};if(l.some(u))if(o.push(c),s.multiple)l=l.filter(f=>!u(f));else{l=[];break}}return l.length?"error:optionsnotfound":(s.value=void 0,o.forEach(a=>a.selected=!0),s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})),o.map(a=>a.value))}fill(e,n){const r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()==="input"){const s=r,i=s.type.toLowerCase(),o=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(i)&&!o.has(i))throw this.createStacklessError(`Input of type "${i}" cannot be filled`);if(i==="number"&&(n=n.trim(),isNaN(Number(n))))throw this.createStacklessError("Cannot type text into input[type=number]");if(o.has(i)){if(n=n.trim(),s.focus(),s.value=n,s.value!==n)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 n=this.retarget(e,"follow-label");if(!n)return"error:notconnected";if(n.nodeName.toLowerCase()==="input"){const i=n;return i.select(),i.focus(),"done"}if(n.nodeName.toLowerCase()==="textarea"){const i=n;return i.selectionStart=0,i.selectionEnd=i.value.length,i.focus(),"done"}const r=n.ownerDocument.createRange();r.selectNodeContents(n);const s=n.ownerDocument.defaultView.getSelection();return s&&(s.removeAllRanges(),s.addRange(r)),n.focus(),"done"}_activelyFocused(e){const n=e.getRootNode().activeElement,r=n===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:n,isFocused:r}}focusNode(e,n){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:r,isFocused:s}=this._activelyFocused(e);if(e.isContentEditable&&!s&&r&&r.blur&&r.blur(),e.focus(),e.focus(),n&&!s&&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,n){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 s=r;if((s.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const o=n.map(a=>{const c=Uint8Array.from(atob(a.buffer),u=>u.charCodeAt(0));return new File([c],a.name,{type:a.mimeType,lastModified:a.lastModifiedMs})}),l=new DataTransfer;for(const a of o)l.items.add(a);s.files=l.files,s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),s.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,n){const r=[];let s=n;for(;s;){const u=Dg(s);if(!u||(r.push(u),u.nodeType===9))break;s=u.host}let i;for(let u=r.length-1;u>=0;u--){const f=r[u],d=f.elementsFromPoint(e.x,e.y),h=f.elementFromPoint(e.x,e.y);if(h&&d[0]&&$e(h)===d[0]){const m=this.window.getComputedStyle(h);(m==null?void 0:m.display)==="contents"&&d.unshift(h)}d[0]&&d[0].shadowRoot===f&&d[1]===h&&d.shift();const v=d[0];if(!v||(i=v,u&&v!==r[u-1].host))break}const o=[];for(;i&&i!==n;)o.push(i),i=$e(i);if(i===n)return"done";const l=this.previewNode(o[0]||this.document.documentElement);let a,c=n;for(;c;){const u=o.indexOf(c);if(u!==-1){u>1&&(a=this.previewNode(o[u-1]));break}c=$e(c)}return a?{hitTargetDescription:`${l} from ${a} subtree`}:{hitTargetDescription:l}}setupHitTargetInterceptor(e,n,r,s){const i=this.retarget(e,"button-link");if(!i||!i.isConnected)return"error:notconnected";if(r){const u=this.expectHitTarget(r,i);if(u!=="done")return u.hitTargetDescription}if(n==="drag")return{stop:()=>"done"};const o={hover:Oy,tap:$y,mouse:Py}[n];let l;const a=u=>{if(!o.has(u.type)||!u.isTrusted)return;const f=this.window.TouchEvent&&u instanceof this.window.TouchEvent?u.touches[0]:u;l===void 0&&f&&(l=this.expectHitTarget({x:f.clientX,y:f.clientY},i)),(s||l!=="done"&&l!==void 0)&&(u.preventDefault(),u.stopPropagation(),u.stopImmediatePropagation())},c=()=>(this._hitTargetInterceptor===a&&(this._hitTargetInterceptor=void 0),l||"done");return this._hitTargetInterceptor=a,{stop:c}}dispatchEvent(e,n,r){var o,l,a;let s;const i={bubbles:!0,cancelable:!0,composed:!0,...r};switch(nk.get(n)){case"mouse":s=new MouseEvent(n,i);break;case"keyboard":s=new KeyboardEvent(n,i);break;case"touch":{if(this._browserName==="webkit"){const c=f=>{var v,m;if(f instanceof Touch)return f;let d=f.pageX;d===void 0&&f.clientX!==void 0&&(d=f.clientX+(((v=this.document.scrollingElement)==null?void 0:v.scrollLeft)||0));let h=f.pageY;return h===void 0&&f.clientY!==void 0&&(h=f.clientY+(((m=this.document.scrollingElement)==null?void 0:m.scrollTop)||0)),this.document.createTouch(this.window,f.target??e,f.identifier,d,h,f.screenX,f.screenY,f.radiusX,f.radiusY,f.rotationAngle,f.force)},u=f=>f instanceof TouchList||!f?f:this.document.createTouchList(...f.map(c));i.target??(i.target=e),i.touches=u(i.touches),i.targetTouches=u(i.targetTouches),i.changedTouches=u(i.changedTouches),s=new TouchEvent(n,i)}else i.target??(i.target=e),i.touches=(o=i.touches)==null?void 0:o.map(c=>c instanceof Touch?c:new Touch({...c,target:c.target??e})),i.targetTouches=(l=i.targetTouches)==null?void 0:l.map(c=>c instanceof Touch?c:new Touch({...c,target:c.target??e})),i.changedTouches=(a=i.changedTouches)==null?void 0:a.map(c=>c instanceof Touch?c:new Touch({...c,target:c.target??e})),s=new TouchEvent(n,i);break}case"pointer":s=new PointerEvent(n,i);break;case"focus":s=new FocusEvent(n,i);break;case"drag":s=new DragEvent(n,i);break;case"wheel":s=new WheelEvent(n,i);break;case"deviceorientation":try{s=new DeviceOrientationEvent(n,i)}catch{const{bubbles:c,cancelable:u,alpha:f,beta:d,gamma:h,absolute:v}=i;s=this.document.createEvent("DeviceOrientationEvent"),s.initDeviceOrientationEvent(n,c,u,f,d,h,v)}break;case"devicemotion":try{s=new DeviceMotionEvent(n,i)}catch{const{bubbles:c,cancelable:u,acceleration:f,accelerationIncludingGravity:d,rotationRate:h,interval:v}=i;s=this.document.createEvent("DeviceMotionEvent"),s.initDeviceMotionEvent(n,c,u,f,d,h,v)}break;default:s=new Event(n,i);break}e.dispatchEvent(s)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return qi(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return qi(`<${e.nodeName.toLowerCase()} />`);const n=e,r=[];for(let a=0;a<n.attributes.length;a++){const{name:c,value:u}=n.attributes[a];c!=="style"&&(!u&&tk.has(c)?r.push(` ${c}`):r.push(` ${c}="${u}"`))}r.sort((a,c)=>a.length-c.length);const s=Vd(r.join(""),500);if(ek.has(n.nodeName))return qi(`<${n.nodeName.toLowerCase()}${s}/>`);const i=n.childNodes;let o=!1;if(i.length<=5){o=!0;for(let a=0;a<i.length;a++)o=o&&i[a].nodeType===Node.TEXT_NODE}const l=o?n.textContent||"":i.length?"…":"";return qi(`<${n.nodeName.toLowerCase()}${s}>${Vd(l,50)}</${n.nodeName.toLowerCase()}>`)}strictModeViolationError(e,n){const r=n.slice(0,10).map(i=>({preview:this.previewNode(i),selector:this.generateSelectorSimple(i)})),s=r.map((i,o)=>`
|
|
91
|
-
${o+1}) ${i.preview} aka ${Sn(this._sdkLanguage,i.selector)}`);return r.length<n.length&&s.push(`
|
|
92
|
-
...`),this.createStacklessError(`strict mode violation: ${Sn(this._sdkLanguage,Wt(e))} resolved to ${n.length} elements:${s.join("")}
|
|
93
|
-
`)}createStacklessError(e){if(this._browserName==="firefox"){const r=new Error("Error: "+e);return r.stack="",r}const n=new Error(e);return delete n.stack,n}createHighlight(){return new Ea(this)}maskSelectors(e,n){this._highlight&&this.hideHighlight(),this._highlight=new Ea(this),this._highlight.install();const r=[];for(const s of e)r.push(this.querySelectorAll(s,this.document.documentElement));this._highlight.maskElements(r.flat(),n)}highlight(e){this._highlight||(this._highlight=new Ea(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,n){var o,l;((o=this._markedElements)==null?void 0:o.callId)!==n&&(this._markedElements=void 0);const r=((l=this._markedElements)==null?void 0:l.elements)||new Set,s=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:n,composed:!0});for(const a of r)e.has(a)||a.dispatchEvent(s);const i=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:n,composed:!0});for(const a of e)r.has(a)||a.dispatchEvent(i);this._markedElements={callId:n,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let n=!1;const r=()=>n=!0;this.window.addEventListener(e,r),new MutationObserver(s=>{if(s.some(o=>Array.from(o.addedNodes).includes(this.document.documentElement))&&(n=!1,this.window.dispatchEvent(new CustomEvent(e)),!n)){this.window.addEventListener(e,r);for(const o of this.onGlobalListenersRemoved)o()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=r=>{var s;return(s=this._hitTargetInterceptor)==null?void 0:s.call(this,r)},n=()=>{for(const r of rk)this.window.addEventListener(r,e,{capture:!0,passive:!1})};n(),this.onGlobalListenersRemoved.add(n)}async expect(e,n,r){return n.expression==="to.have.count"||n.expression.endsWith(".array")?this.expectArray(r,n):e?await this.expectSingleElement(e,n):!n.isNot&&n.expression==="to.be.hidden"?{matches:!0}:n.isNot&&n.expression==="to.be.visible"?{matches:!1}:!n.isNot&&n.expression==="to.be.detached"?{matches:!0}:n.isNot&&n.expression==="to.be.attached"?{matches:!1}:n.isNot&&n.expression==="to.be.in.viewport"?{matches:!1}:{matches:n.isNot,missingReceived:!0}}async expectSingleElement(e,n){var s;const r=n.expression;{let i;if(r==="to.have.attribute"){const o=e.hasAttribute(n.expressionArg);i={matches:o,received:o?"attribute present":"attribute not present"}}else if(r==="to.be.checked"){const{checked:o,indeterminate:l}=n.expectedValue;if(l){if(o!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");i=this.elementState(e,"indeterminate")}else i=this.elementState(e,o===!1?"unchecked":"checked")}else if(r==="to.be.disabled")i=this.elementState(e,"disabled");else if(r==="to.be.editable")i=this.elementState(e,"editable");else if(r==="to.be.readonly")i=this.elementState(e,"editable"),i.matches=!i.matches;else if(r==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const o=e.value;i={matches:!o,received:o?"notEmpty":"empty"}}else{const o=(s=e.textContent)==null?void 0:s.trim();i={matches:!o,received:o?"notEmpty":"empty"}}else if(r==="to.be.enabled")i=this.elementState(e,"enabled");else if(r==="to.be.focused"){const o=this._activelyFocused(e).isFocused;i={matches:o,received:o?"focused":"inactive"}}else r==="to.be.hidden"?i=this.elementState(e,"hidden"):r==="to.be.visible"?i=this.elementState(e,"visible"):r==="to.be.attached"?i={matches:!0,received:"attached"}:r==="to.be.detached"&&(i={matches:!1,received:"attached"});if(i){if(i.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return i}}if(r==="to.have.property"){let i=e;const o=n.expressionArg.split(".");for(let c=0;c<o.length-1;c++){if(typeof i!="object"||!(o[c]in i))return{received:void 0,matches:!1};i=i[o[c]]}const l=i[o[o.length-1]],a=Bc(l,n.expectedValue);return{received:l,matches:a}}if(r==="to.be.in.viewport"){const i=await this.viewportRatio(e);return{received:`viewport ratio ${i}`,matches:i>0&&i>(n.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 i=[...e.selectedOptions].map(o=>o.value);return i.length!==n.expectedText.length?{received:i,matches:!1}:{received:i,matches:i.map((o,l)=>new ba(n.expectedText[l]).matches(o)).every(Boolean)}}if(r==="to.match.aria"){const i=Q_(e,n.expectedValue);return{received:i.received,matches:!!i.matches.length}}{let i;if(r==="to.have.attribute.value"){const o=e.getAttribute(n.expressionArg);if(o===null)return{received:null,matches:!1};i=o}else if(r==="to.have.class")i=e.classList.toString();else if(r==="to.have.css")i=this.window.getComputedStyle(e).getPropertyValue(n.expressionArg);else if(r==="to.have.id")i=e.id;else if(r==="to.have.text")i=n.useInnerText?e.innerText:Ke(new Map,e).full;else if(r==="to.have.accessible.name")i=ui(e,!1);else if(r==="to.have.accessible.description")i=ch(e,!1);else if(r==="to.have.accessible.error.message")i=qx(e);else if(r==="to.have.role")i=ye(e)||"";else if(r==="to.have.title")i=this.document.title;else if(r==="to.have.url")i=this.document.location.href;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");i=e.value}if(i!==void 0&&n.expectedText){const o=new ba(n.expectedText[0]);return{received:i,matches:o.matches(i)}}}throw this.createStacklessError("Unknown expect matcher: "+r)}expectArray(e,n){const r=n.expression;if(r==="to.have.count"){const i=e.length,o=i===n.expectedNumber;return{received:i,matches:o}}let s;if(r==="to.have.text.array"||r==="to.contain.text.array"?s=e.map(i=>n.useInnerText?i.innerText:Ke(new Map,i).full):r==="to.have.class.array"&&(s=e.map(i=>i.classList.toString())),s&&n.expectedText){const i=r!=="to.contain.text.array";if(!(s.length===n.expectedText.length||!i))return{received:s,matches:!1};const l=n.expectedText.map(u=>new ba(u));let a=0,c=0;for(;a<l.length&&c<s.length;)l[a].matches(s[c])&&++a,++c;return{received:s,matches:a===l.length}}throw this.createStacklessError("Unknown expect matcher: "+r)}}const ek=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]),tk=new Set(["checked","selected","disabled","readonly","multiple"]);function qi(t){return t.replace(/\n/g,"↵").replace(/\t/g,"⇆")}const nk=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"]]),Oy=new Set(["mousemove"]),$y=new Set(["pointerdown","pointerup","touchstart","touchend","touchcancel"]),Py=new Set(["mousedown","mouseup","pointerdown","pointerup","click","auxclick","dblclick","contextmenu"]),rk=new Set([...Oy,...$y,...Py]);function sk(t){if(t=t.substring(1,t.length-1),!t.includes("\\"))return t;const e=[];let n=0;for(;n<t.length;)t[n]==="\\"&&n+1<t.length&&n++,e.push(t[n++]);return e.join("")}function Wi(t,e){if(t[0]==="/"&&t.lastIndexOf("/")>0){const s=t.lastIndexOf("/"),i=new RegExp(t.substring(1,s),t.substring(s+1));return{matcher:o=>i.test(o.full),kind:"regex"}}const n=e?JSON.parse.bind(JSON):sk;let r=!1;return t.length>1&&t[0]==='"'&&t[t.length-1]==='"'?(t=n(t),r=!0):e&&t.length>1&&t[0]==='"'&&t[t.length-2]==='"'&&t[t.length-1]==="i"?(t=n(t.substring(0,t.length-1)),r=!1):e&&t.length>1&&t[0]==='"'&&t[t.length-2]==='"'&&t[t.length-1]==="s"?(t=n(t.substring(0,t.length-1)),r=!0):t.length>1&&t[0]==="'"&&t[t.length-1]==="'"&&(t=n(t),r=!0),t=De(t),r?e?{kind:"strict",matcher:i=>i.normalized===t}:{matcher:i=>!t&&!i.immediate.length?!0:i.immediate.some(o=>De(o)===t),kind:"strict"}:(t=t.toLowerCase(),{kind:"lax",matcher:s=>s.normalized.toLowerCase().includes(t)})}class ba{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 n=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&n.delete("i"),e.ignoreCase===!0&&n.add("i"),this._regex=new RegExp(e.regexSource,[...n].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}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=De(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function Bc(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!Bc(t[r],e[r]))return!1;return!0}if(t instanceof RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(let r=0;r<n.length;++r)if(!e.hasOwnProperty(n[r]))return!1;for(const r of n)if(!Bc(t[r],e[r]))return!1;return!0}return typeof t=="number"&&typeof e=="number"?isNaN(t)&&isNaN(e):!1}const ik={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-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"}}]}]}]};class xh{cursor(){return"default"}}class Ta{constructor(e,n){this._hoveredModel=null,this._hoveredElement=null,this._hoveredSelectors=null,this._recorder=e,this._assertVisibility=n}cursor(){return"pointer"}cleanup(){this._hoveredModel=null,this._hoveredElement=null,this._hoveredSelectors=null}onClick(e){var n;G(e),e.button===0&&(n=this._hoveredModel)!=null&&n.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onContextMenu(e){if(this._hoveredModel&&!this._hoveredModel.tooltipListItemSelected&&this._hoveredSelectors&&this._hoveredSelectors.length>1){G(e);const n=this._hoveredSelectors,r=this._hoveredModel;this._hoveredModel.tooltipFooter=void 0,this._hoveredModel.tooltipList=n.map(s=>this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,s)),this._hoveredModel.tooltipListItemSelected=s=>{s===void 0?this._reset(!0):this._commit(n[s],r)},this._recorder.updateHighlight(this._hoveredModel,!0)}}onPointerDown(e){G(e)}onPointerUp(e){G(e)}onMouseDown(e){G(e)}onMouseUp(e){G(e)}onMouseMove(e){var i;G(e);let n=this._recorder.deepEventTarget(e);if(n.isConnected||(n=null),this._hoveredElement===n)return;this._hoveredElement=n;let r=null,s=[];if(this._hoveredElement){const o=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});s=o.selectors,r={selector:o.selector,elements:o.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,o.selector),tooltipFooter:s.length>1?"Click to select, right-click for more options":void 0,color:this._assertVisibility?"#8acae480":void 0}}((i=this._hoveredModel)==null?void 0:i.selector)!==(r==null?void 0:r.selector)&&(this._hoveredModel=r,this._hoveredSelectors=s,this._recorder.updateHighlight(r,!0))}onMouseEnter(e){G(e)}onMouseLeave(e){G(e);const n=this._recorder.injectedScript.window;n.top!==n&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){var n;G(e),e.key==="Escape"&&((n=this._hoveredModel)!=null&&n.tooltipListItemSelected?this._reset(!0):this._assertVisibility&&this._recorder.setMode("recording"))}onKeyUp(e){G(e)}onScroll(e){this._reset(!1)}_commit(e,n){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,n)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._hoveredSelectors=null,this._recorder.updateHighlight(null,e)}}class ok{constructor(e){this._performingActions=new Set,this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._recorder=e}cursor(){return"pointer"}cleanup(){this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1}onClick(e){if(Ia(this._hoveredElement)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel))return;const n=La(this._recorder.deepEventTarget(e));if(n){this._performAction({name:n.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[]});return}this._cancelPendingClickAction(),e.detail===1&&(this._pendingClickAction={action:{name:"click",selector:this._hoveredModel.selector,position:Aa(e),signals:[],button:_h(e),modifiers:Ca(e),clickCount:e.detail},timeout:this._recorder.injectedScript.builtinSetTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){Ia(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:Aa(e),signals:[],button:_h(e),modifiers:Ca(e),clickCount:e.detail}))}_commitPendingClickAction(){this._pendingClickAction&&this._performAction(this._pendingClickAction.action),this._cancelPendingClickAction()}_cancelPendingClickAction(){this._pendingClickAction&&clearTimeout(this._pendingClickAction.timeout),this._pendingClickAction=void 0}onContextMenu(e){this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||this._performAction({name:"click",selector:this._hoveredModel.selector,position:Aa(e),signals:[],button:"right",modifiers:0,clickCount:0})}onPointerDown(e){this._shouldIgnoreMouseEvent(e)||this._performingActions.size||G(e)}onPointerUp(e){this._shouldIgnoreMouseEvent(e)||this._performingActions.size||G(e)}onMouseDown(e){this._shouldIgnoreMouseEvent(e)||(this._performingActions.size||G(e),this._activeModel=this._hoveredModel)}onMouseUp(e){this._shouldIgnoreMouseEvent(e)||this._performingActions.size||G(e)}onMouseMove(e){const n=this._recorder.deepEventTarget(e);this._hoveredElement!==n&&(this._hoveredElement=n,this._updateModelForHoveredElement())}onMouseLeave(e){const n=this._recorder.injectedScript.window;n.top!==n&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredElement=null,this._updateModelForHoveredElement())}onFocus(e){this._onFocus(!0)}onInput(e){const n=this._recorder.deepEventTarget(e);if(n.nodeName==="INPUT"&&n.type.toLowerCase()==="file"){this._recorder.recordAction({name:"setInputFiles",selector:this._activeModel.selector,signals:[],files:[...n.files||[]].map(r=>r.name)});return}if(Ia(n)){this._recorder.recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:n.value});return}if(["INPUT","TEXTAREA"].includes(n.nodeName)||n.isContentEditable){if(n.nodeName==="INPUT"&&["checkbox","radio"].includes(n.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recorder.recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:n.isContentEditable?n.innerText:n.value})}if(n.nodeName==="SELECT"){const r=n;if(this._actionInProgress(e))return;this._performAction({name:"select",selector:this._activeModel.selector,options:[...r.selectedOptions].map(s=>s.value),signals:[]})}}onKeyDown(e){if(this._shouldGenerateKeyPressFor(e)){if(this._actionInProgress(e)){this._expectProgrammaticKeyUp=!0;return}if(!this._consumedDueWrongTarget(e)){if(e.key===" "){const n=La(this._recorder.deepEventTarget(e));if(n){this._performAction({name:n.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[]});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:Ca(e)})}}}onKeyUp(e){if(this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){G(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._hoveredModel=null,this._hoveredElement=null,this._recorder.updateHighlight(null,!1)}_onFocus(e){const n=uk(this._recorder.document);if(e&&n===this._recorder.document.body)return;const r=n?this._recorder.injectedScript.generateSelector(n,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=r&&r.selector?r:null,e&&(this._hoveredElement=n,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const n=this._recorder.deepEventTarget(e),r=n.nodeName;return!!(r==="SELECT"||r==="OPTION"||r==="INPUT"&&["date","range"].includes(n.type))}_actionInProgress(e){const n=e instanceof KeyboardEvent,r=e instanceof MouseEvent||e instanceof PointerEvent;for(const s of this._performingActions)if(n&&s.name==="press"&&e.key===s.key||r&&(s.name==="click"||s.name==="check"||s.name==="uncheck"))return!0;return G(e),!1}_consumedDueToNoModel(e,n){return n?!1:(G(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(G(e),!0)}_performAction(e){this._hoveredElement=null,this._hoveredModel=null,this._activeModel=null,this._recorder.updateHighlight(null,!1),this._performingActions.add(e),this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1),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}))})}_shouldGenerateKeyPressFor(e){if(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 n=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!n?!!La(this._recorder.deepEventTarget(e)):!0}_updateModelForHoveredElement(){if(this._performingActions.size)return;if(!this._hoveredElement||!this._hoveredElement.isConnected){this._hoveredModel=null,this._hoveredElement=null,this._recorder.updateHighlight(null,!0);return}const{selector:e,elements:n}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoveredModel&&this._hoveredModel.selector===e||(this._hoveredModel=e?{selector:e,elements:n,color:"#dc6f6f7f"}:null,this._recorder.updateHighlight(this._hoveredModel,!0))}}class Na{constructor(e,n){this._hoverHighlight=null,this._action=null,this._textCache=new Map,this._recorder=e,this._kind=n,this._dialog=new ck(e)}cursor(){return"pointer"}cleanup(){this._dialog.close(),this._hoverHighlight=null}onClick(e){G(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const n=this._recorder.deepEventTarget(e);this._elementHasValue(n)&&e.preventDefault()}onPointerUp(e){var r;const n=(r=this._hoverHighlight)==null?void 0:r.elements[0];this._kind==="value"&&n&&(n.nodeName==="INPUT"||n.nodeName==="SELECT")&&n.disabled&&this._commitAssertValue()}onMouseMove(e){var r;if(this._dialog.isShowing())return;const n=this._recorder.deepEventTarget(e);((r=this._hoverHighlight)==null?void 0:r.elements[0])!==n&&(this._kind==="text"||this._kind==="snapshot"?this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,n).full?{elements:[n],selector:""}:null:this._hoverHighlight=this._elementHasValue(n)?this._recorder.injectedScript.generateSelector(n,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null,this._hoverHighlight&&(this._hoverHighlight.color="#8acae480"),this._recorder.updateHighlight(this._hoverHighlight,!0))}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),G(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 n;this._textCache.clear();const e=(n=this._hoverHighlight)==null?void 0:n.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 return this._kind==="snapshot"?(this._hoverHighlight=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0}),this._hoverHighlight.color="#8acae480",this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],snapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"regex"})}):(this._hoverHighlight=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0}),this._hoverHighlight.color="#8acae480",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.snapshot:""}_commit(){!this._action||!this._dialog.isShowing()||(this._dialog.close(),this._recorder.recordAction(this._action),this._recorder.setMode("recording"))}_showDialog(){var e,n,r,s;(e=this._hoverHighlight)!=null&&e.elements[0]&&(this._action=this._generateAction(),((n=this._action)==null?void 0:n.name)==="assertText"?this._showTextDialog(this._action):((r=this._action)==null?void 0:r.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(s=this._recorder.overlay)==null||s.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const n=this._recorder.document.createElement("textarea");n.setAttribute("spellcheck","false"),n.value=this._renderValue(e),n.classList.add("text-editor");const r=()=>{var f;const l=this._recorder.injectedScript.utils.normalizeWhiteSpace(n.value),a=(f=this._hoverHighlight)==null?void 0:f.elements[0];if(!a)return;e.text=l;const c=this._recorder.injectedScript.utils.elementText(this._textCache,a).normalized,u=l&&c.includes(l);n.classList.toggle("does-not-match",!u)};n.addEventListener("input",r);const i=this._dialog.show({label:"Assert that element contains text",body:n,onCommit:()=>this._commit()}),o=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),i);this._dialog.moveTo(o.anchorTop,o.anchorLeft),n.focus()}_commitAssertValue(){var n;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(n=this._recorder.overlay)==null||n.flashToolSucceeded("assertingValue"))}}class lk{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._recorder=e;const n=this._recorder.document;this._overlayElement=n.createElement("x-pw-overlay");const r=n.createElement("x-pw-tools-list");this._overlayElement.appendChild(r),this._dragHandle=n.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(n.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(){Ry(this._listeners),this._listeners=[X(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),X(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")}),X(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])}),X(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),X(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),X(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),X(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){this._recordToggle.classList.toggle("toggled",e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="recording-inspecting"),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 n;e==="assertingVisibility"?n=this._assertVisibilityToggle:e==="assertingSnapshot"?n=this._assertSnapshotToggle:n=this._assertValuesToggle,n.classList.add("succeeded"),this._recorder.injectedScript.builtinSetTimeout(()=>n.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 n=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-n,Math.min(n,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),G(e),!0}return!1}onMouseUp(e){return this._dragState?(G(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,G(e),!0):!1}onDblClick(e){return!1}}class ak{constructor(e){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 xh,standby:new xh,inspecting:new Ta(this,!1),recording:new ok(this),"recording-inspecting":new Ta(this,!1),assertingText:new Na(this,"text"),assertingVisibility:new Ta(this,!0),assertingValue:new Na(this,"value"),assertingSnapshot:new Na(this,"snapshot")},this._currentTool=this._tools.none,e.window.top===e.window&&(this.overlay=new lk(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
|
|
94
|
-
body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
|
|
95
|
-
body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
|
|
96
|
-
`),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test")}installListeners(){var r;Ry(this._listeners),this._listeners=[X(this.document,"click",s=>this._onClick(s),!0),X(this.document,"auxclick",s=>this._onClick(s),!0),X(this.document,"dblclick",s=>this._onDblClick(s),!0),X(this.document,"contextmenu",s=>this._onContextMenu(s),!0),X(this.document,"dragstart",s=>this._onDragStart(s),!0),X(this.document,"input",s=>this._onInput(s),!0),X(this.document,"keydown",s=>this._onKeyDown(s),!0),X(this.document,"keyup",s=>this._onKeyUp(s),!0),X(this.document,"pointerdown",s=>this._onPointerDown(s),!0),X(this.document,"pointerup",s=>this._onPointerUp(s),!0),X(this.document,"mousedown",s=>this._onMouseDown(s),!0),X(this.document,"mouseup",s=>this._onMouseUp(s),!0),X(this.document,"mousemove",s=>this._onMouseMove(s),!0),X(this.document,"mouseleave",s=>this._onMouseLeave(s),!0),X(this.document,"mouseenter",s=>this._onMouseEnter(s),!0),X(this.document,"focus",s=>this._onFocus(s),!0),X(this.document,"scroll",s=>this._onScroll(s),!0)],this.highlight.install();let e;const n=()=>{this.highlight.install(),e=this.injectedScript.builtinSetTimeout(n,500)};e=this.injectedScript.builtinSetTimeout(n,500),this._listeners.push(()=>this.injectedScript.builtinClearTimeout(e)),this.highlight.appendChild(Dy(this.document,ik)),(r=this.overlay)==null||r.install(),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var n,r,s;const e=this._tools[this.state.mode];e!==this._currentTool&&((r=(n=this._currentTool).cleanup)==null||r.call(n),this.clearHighlight(),this._currentTool=e,(s=this.injectedScript.document.body)==null||s.setAttribute("data-pw-cursor",e.cursor()))}setUIState(e,n){var i;this._delegate=n,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(),(i=this.overlay)==null||i.setUIState(e);let r="noop";if(e.actionSelector!==this._lastHighlightedSelector){const o=e.actionSelector?fk(this.injectedScript,e.actionSelector,this.document):null;r=o!=null&&o.elements.length?o:"clear",this._lastHighlightedSelector=o!=null&&o.elements.length?e.actionSelector:void 0}const s=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==s){const o=e.ariaTemplate?this.injectedScript.getAllByAria(this.document,e.ariaTemplate):[];o.length?(r={elements:o},this._lastHighlightedAriaTemplateJSON=s):(this._lastHighlightedSelector||(r="clear"),this._lastHighlightedAriaTemplateJSON="undefined")}r==="clear"?this.clearHighlight():r!=="noop"&&this._updateHighlight(r,!1)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var n,r,s;e.isTrusted&&((n=this.overlay)!=null&&n.onClick(e)||this._ignoreOverlayEvent(e)||(s=(r=this._currentTool).onClick)==null||s.call(r,e))}_onDblClick(e){var n,r,s;e.isTrusted&&((n=this.overlay)!=null&&n.onDblClick(e)||this._ignoreOverlayEvent(e)||(s=(r=this._currentTool).onDblClick)==null||s.call(r,e))}_onContextMenu(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onContextMenu)==null||r.call(n,e))}_onDragStart(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onDragStart)==null||r.call(n,e))}_onPointerDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onPointerDown)==null||r.call(n,e))}_onPointerUp(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onPointerUp)==null||r.call(n,e))}_onMouseDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseDown)==null||r.call(n,e))}_onMouseUp(e){var n,r,s;e.isTrusted&&((n=this.overlay)!=null&&n.onMouseUp(e)||this._ignoreOverlayEvent(e)||(s=(r=this._currentTool).onMouseUp)==null||s.call(r,e))}_onMouseMove(e){var n,r,s;e.isTrusted&&((n=this.overlay)!=null&&n.onMouseMove(e)||this._ignoreOverlayEvent(e)||(s=(r=this._currentTool).onMouseMove)==null||s.call(r,e))}_onMouseEnter(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseEnter)==null||r.call(n,e))}_onMouseLeave(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseLeave)==null||r.call(n,e))}_onFocus(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onFocus)==null||r.call(n,e))}_onScroll(e){var n,r;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(r=(n=this._currentTool).onScroll)==null||r.call(n,e))}_onInput(e){var n,r;this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onInput)==null||r.call(n,e)}_onKeyDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onKeyDown)==null||r.call(n,e))}_onKeyUp(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onKeyUp)==null||r.call(n,e))}updateHighlight(e,n){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,n)}_updateHighlight(e,n){var s,i;let r=e==null?void 0:e.tooltipText;r===void 0&&!(e!=null&&e.tooltipList)&&(e!=null&&e.selector)&&(r=this.injectedScript.utils.asLocator(this.state.language,e.selector)),this.highlight.updateHighlight((e==null?void 0:e.elements)||[],{...e,tooltipText:r}),n&&((i=(s=this._delegate).highlightUpdated)==null||i.call(s))}_ignoreOverlayEvent(e){return e.composedPath().some(n=>(n.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var n;for(const r of e.composedPath())if(!((n=this.overlay)!=null&&n.contains(r)))return r;return e.composedPath()[0]}setMode(e){var n,r;(r=(n=this._delegate).setMode)==null||r.call(n,e)}async performAction(e){var n,r;await((r=(n=this._delegate).performAction)==null?void 0:r.call(n,e).catch(()=>{}))}recordAction(e){var n,r;(r=(n=this._delegate).recordAction)==null||r.call(n,e)}setOverlayState(e){var n,r;(r=(n=this._delegate).setOverlayState)==null||r.call(n,e)}elementPicked(e,n){var s,i;const r=this.injectedScript.ariaSnapshot(n.elements[0]);(i=(s=this._delegate).elementPicked)==null||i.call(s,{selector:e,ariaSnapshot:r})}}class ck{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const n=this._recorder.document.createElement("x-pw-tool-item");n.title="Accept",n.classList.add("accept"),n.appendChild(this._recorder.document.createElement("x-div")),n.addEventListener("click",()=>e.onCommit());const r=this._recorder.document.createElement("x-pw-tool-item");r.title="Close",r.classList.add("cancel"),r.appendChild(this._recorder.document.createElement("x-div")),r.addEventListener("click",()=>{var l;this.close(),(l=e.onCancel)==null||l.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),this._keyboardListener=l=>{var a;if(l.key==="Escape"){this.close(),(a=e.onCancel)==null||a.call(e);return}if(l.key==="Enter"&&(l.ctrlKey||l.metaKey)){this._dialogElement&&e.onCommit();return}},this._recorder.document.addEventListener("keydown",this._keyboardListener,!0);const s=this._recorder.document.createElement("x-pw-tools-list"),i=this._recorder.document.createElement("label");i.textContent=e.label,s.appendChild(i),s.appendChild(this._recorder.document.createElement("x-spacer")),s.appendChild(n),s.appendChild(r),this._dialogElement.appendChild(s);const o=this._recorder.document.createElement("x-pw-dialog-body");return o.appendChild(e.body),this._dialogElement.appendChild(o),this._recorder.highlight.appendChild(this._dialogElement),this._dialogElement}moveTo(e,n){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=n+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}}function uk(t){let e=t.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function Ca(t){return(t.altKey?1:0)|(t.ctrlKey?2:0)|(t.metaKey?4:0)|(t.shiftKey?8:0)}function _h(t){switch(t.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function Aa(t){if(t.target.nodeName==="CANVAS")return{x:t.offsetX,y:t.offsetY}}function G(t){t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()}function La(t){if(!t||t.nodeName!=="INPUT")return null;const e=t;return["checkbox","radio"].includes(e.type)?e:null}function Ia(t){return!t||t.nodeName!=="INPUT"?!1:t.type.toLowerCase()==="range"}function X(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function Ry(t){for(const e of t)e();t.splice(0,t.length)}function fk(t,e,n){try{const r=t.parseSelector(e);return{selector:e,elements:t.querySelectorAll(r,n)}}catch{return{selector:e,elements:[]}}}function Dy(t,{tagName:e,attrs:n,children:r}){const s=t.createElementNS("http://www.w3.org/2000/svg",e);if(n)for(const[i,o]of Object.entries(n))s.setAttribute(i,o);if(r)for(const i of r)s.appendChild(Dy(t,i));return s}function uf(t,e,n){return`internal:attr=[${t}=${Oe(e,(n==null?void 0:n.exact)||!1)}]`}function dk(t,e){return`internal:testid=[${t}=${Oe(e,!0)}]`}function hk(t,e){return"internal:label="+Ve(t,!!(e!=null&&e.exact))}function pk(t,e){return uf("alt",t,e)}function mk(t,e){return uf("title",t,e)}function gk(t,e){return uf("placeholder",t,e)}function yk(t,e){return"internal:text="+Ve(t,!!(e!=null&&e.exact))}function vk(t,e={}){const n=[];return e.checked!==void 0&&n.push(["checked",String(e.checked)]),e.disabled!==void 0&&n.push(["disabled",String(e.disabled)]),e.selected!==void 0&&n.push(["selected",String(e.selected)]),e.expanded!==void 0&&n.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&n.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&n.push(["level",String(e.level)]),e.name!==void 0&&n.push(["name",Oe(e.name,!!e.exact)]),e.pressed!==void 0&&n.push(["pressed",String(e.pressed)]),`internal:role=${t}${n.map(([r,s])=>`[${r}=${s}]`).join("")}`}const _s=Symbol("selector"),wk=class js{constructor(e,n,r){if(r!=null&&r.hasText&&(n+=` >> internal:has-text=${Ve(r.hasText,!1)}`),r!=null&&r.hasNotText&&(n+=` >> internal:has-not-text=${Ve(r.hasNotText,!1)}`),r!=null&&r.has&&(n+=" >> internal:has="+JSON.stringify(r.has[_s])),r!=null&&r.hasNot&&(n+=" >> internal:has-not="+JSON.stringify(r.hasNot[_s])),this[_s]=n,n){const o=e.parseSelector(n);this.element=e.querySelector(o,e.document,!1),this.elements=e.querySelectorAll(o,e.document)}const s=n,i=this;i.locator=(o,l)=>new js(e,s?s+" >> "+o:o,l),i.getByTestId=o=>i.locator(dk(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),o)),i.getByAltText=(o,l)=>i.locator(pk(o,l)),i.getByLabel=(o,l)=>i.locator(hk(o,l)),i.getByPlaceholder=(o,l)=>i.locator(gk(o,l)),i.getByText=(o,l)=>i.locator(yk(o,l)),i.getByTitle=(o,l)=>i.locator(mk(o,l)),i.getByRole=(o,l={})=>i.locator(vk(o,l)),i.filter=o=>new js(e,n,o),i.first=()=>i.locator("nth=0"),i.last=()=>i.locator("nth=-1"),i.nth=o=>i.locator(`nth=${o}`),i.and=o=>new js(e,s+" >> internal:and="+JSON.stringify(o[_s])),i.or=o=>new js(e,s+" >> internal:or="+JSON.stringify(o[_s]))}};let Sk=wk;class xk{constructor(e){this._injectedScript=e,!this._injectedScript.window.playwright&&(this._injectedScript.window.playwright={$:(n,r)=>this._querySelector(n,!!r),$$:n=>this._querySelectorAll(n),inspect:n=>this._inspect(n),selector:n=>this._selector(n),generateLocator:(n,r)=>this._generateLocator(n,r),ariaSnapshot:n=>{const r=this._injectedScript.ariaSnapshot(n||this._injectedScript.document.body);console.log(r)},resume:()=>this._resume(),...new Sk(e,"")},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,n){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,n)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const n=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(n,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,n){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const r=this._injectedScript.generateSelectorSimple(e);return Sn(n||"javascript",r)}_resume(){this._injectedScript.window.__pw_resume().catch(()=>{})}}function _k(t,e){t=t.replace(/AriaRole\s*\.\s*([\w]+)/g,(i,o)=>o.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(i,o,l)=>`${o}(${l.toLowerCase()}`);const n=[];let r="";for(let i=0;i<t.length;++i){const o=t[i];if(o!=='"'&&o!=="'"&&o!=="`"&&o!=="/"){r+=o;continue}const l=t[i-1]==="r"||t[i]==="/";++i;let a="";for(;i<t.length;){if(t[i]==="\\"){l?(t[i+1]!==o&&(a+=t[i]),++i,a+=t[i]):(++i,t[i]==="n"?a+=`
|
|
97
|
-
`:t[i]==="r"?a+="\r":t[i]==="t"?a+=" ":a+=t[i]),++i;continue}if(t[i]!==o){a+=t[i++];continue}break}n.push({quote:o,text:a}),r+=(o==="/"?"r":"")+"$"+n.length}r=r.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",").replace(/,\)/g,")");const s=n.map(i=>i.quote).filter(i=>"'\"`".includes(i))[0];return{selector:Fy(r,n,e),preferredQuote:s}}function kh(t){return[...t.matchAll(/\$\d+/g)].length}function Eh(t,e){return t.replace(/\$(\d+)/g,(n,r)=>`$${r-e}`)}function Fy(t,e,n){for(;;){const s=t.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!s)break;const i=s.index+s[0].length;let o=0,l=i;for(;l<t.length&&(t[l]==="("?o++:t[l]===")"&&o--,!(o<0));l++);let a=t.substring(0,i),c=0;["sethas(","sethasnot("].includes(s[1])&&(c=1,a=a.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const u=kh(t.substring(0,i)),f=Eh(t.substring(i,l),u),d=kh(f),h=e.slice(u,u+d),v=JSON.stringify(Fy(f,h,n));t=a.replace(/=$/,"2=")+`$${u+1}`+Eh(t.substring(l+c),d-1);const m=e.slice(0,u),w=e.slice(u+d);e=m.concat([{quote:'"',text:v}]).concat(w)}t=t.replace(/\,set([\w]+)\(([^)]+)\)/g,(s,i,o)=>","+i.toLowerCase()+"="+o.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${n}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const r=t.split(".");for(let s=0;s<r.length-1;s++)if(r[s]==="internal:control=enter-frame"&&r[s+1].startsWith("nth=")){const[i]=r.splice(s,1);r.splice(s+1,0,i)}return r.map(s=>!s.startsWith("internal:")||s==="internal:control"?s.replace(/\$(\d+)/g,(i,o)=>e[+o-1].text):(s=s.includes("[")?s.replace(/\]/,"")+"]":s,s=s.replace(/(?:r)\$(\d+)(i)?/g,(i,o,l)=>{const a=e[+o-1];return s.startsWith("internal:attr")||s.startsWith("internal:testid")||s.startsWith("internal:role")?Oe(new RegExp(a.text),!1)+(l||""):Ve(new RegExp(a.text,l),!1)}).replace(/\$(\d+)(i|s)?/g,(i,o,l)=>{const a=e[+o-1];return s.startsWith("internal:has=")||s.startsWith("internal:has-not=")?a.text:s.startsWith("internal:testid")?Oe(a.text,!0):s.startsWith("internal:attr")||s.startsWith("internal:role")?Oe(a.text,l==="s"):Ve(a.text,l==="s")}),s)).join(" >> ")}function kk(t,e,n){try{return Ek(t,e,n)}catch{return""}}function Ek(t,e,n){try{return bl(e),e}catch{}const{selector:r,preferredQuote:s}=_k(e,n),i=Tg(t,r,void 0,void 0,s),o=bh(t,e);return i.some(l=>bh(t,l)===o)?r:""}function bh(t,e){return e=e.replace(/\s/g,""),t==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const bk=({url:t})=>p.jsxs("div",{className:"browser-frame-header",children:[p.jsxs("div",{style:{whiteSpace:"nowrap"},children:[p.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),p.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),p.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),p.jsx("div",{className:"browser-frame-address-bar",title:t||"about:blank",children:t||"about:blank"}),p.jsx("div",{style:{marginLeft:"auto"},children:p.jsxs("div",{children:[p.jsx("span",{className:"browser-frame-menu-bar"}),p.jsx("span",{className:"browser-frame-menu-bar"}),p.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),ff=Symbol.for("yaml.alias"),Uc=Symbol.for("yaml.document"),xn=Symbol.for("yaml.map"),zy=Symbol.for("yaml.pair"),Pt=Symbol.for("yaml.scalar"),ns=Symbol.for("yaml.seq"),gt=Symbol.for("yaml.node.type"),er=t=>!!t&&typeof t=="object"&&t[gt]===ff,tr=t=>!!t&&typeof t=="object"&&t[gt]===Uc,rs=t=>!!t&&typeof t=="object"&&t[gt]===xn,Y=t=>!!t&&typeof t=="object"&&t[gt]===zy,H=t=>!!t&&typeof t=="object"&&t[gt]===Pt,ss=t=>!!t&&typeof t=="object"&&t[gt]===ns;function te(t){if(t&&typeof t=="object")switch(t[gt]){case xn:case ns:return!0}return!1}function re(t){if(t&&typeof t=="object")switch(t[gt]){case ff:case xn:case Pt:case ns:return!0}return!1}const Tk=t=>(H(t)||te(t))&&!!t.anchor,We=Symbol("break visit"),By=Symbol("skip children"),$t=Symbol("remove node");function En(t,e){const n=Uy(e);tr(t)?br(null,t.contents,n,Object.freeze([t]))===$t&&(t.contents=null):br(null,t,n,Object.freeze([]))}En.BREAK=We;En.SKIP=By;En.REMOVE=$t;function br(t,e,n,r){const s=Hy(t,e,n,r);if(re(s)||Y(s))return Vy(t,r,s),br(t,s,n,r);if(typeof s!="symbol"){if(te(e)){r=Object.freeze(r.concat(e));for(let i=0;i<e.items.length;++i){const o=br(i,e.items[i],n,r);if(typeof o=="number")i=o-1;else{if(o===We)return We;o===$t&&(e.items.splice(i,1),i-=1)}}}else if(Y(e)){r=Object.freeze(r.concat(e));const i=br("key",e.key,n,r);if(i===We)return We;i===$t&&(e.key=null);const o=br("value",e.value,n,r);if(o===We)return We;o===$t&&(e.value=null)}}return s}async function Al(t,e){const n=Uy(e);tr(t)?await Tr(null,t.contents,n,Object.freeze([t]))===$t&&(t.contents=null):await Tr(null,t,n,Object.freeze([]))}Al.BREAK=We;Al.SKIP=By;Al.REMOVE=$t;async function Tr(t,e,n,r){const s=await Hy(t,e,n,r);if(re(s)||Y(s))return Vy(t,r,s),Tr(t,s,n,r);if(typeof s!="symbol"){if(te(e)){r=Object.freeze(r.concat(e));for(let i=0;i<e.items.length;++i){const o=await Tr(i,e.items[i],n,r);if(typeof o=="number")i=o-1;else{if(o===We)return We;o===$t&&(e.items.splice(i,1),i-=1)}}}else if(Y(e)){r=Object.freeze(r.concat(e));const i=await Tr("key",e.key,n,r);if(i===We)return We;i===$t&&(e.key=null);const o=await Tr("value",e.value,n,r);if(o===We)return We;o===$t&&(e.value=null)}}return s}function Uy(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Hy(t,e,n,r){var s,i,o,l,a;if(typeof n=="function")return n(t,e,r);if(rs(e))return(s=n.Map)==null?void 0:s.call(n,t,e,r);if(ss(e))return(i=n.Seq)==null?void 0:i.call(n,t,e,r);if(Y(e))return(o=n.Pair)==null?void 0:o.call(n,t,e,r);if(H(e))return(l=n.Scalar)==null?void 0:l.call(n,t,e,r);if(er(e))return(a=n.Alias)==null?void 0:a.call(n,t,e,r)}function Vy(t,e,n){const r=e[e.length-1];if(te(r))r.items[t]=n;else if(Y(r))t==="key"?r.key=n:r.value=n;else if(tr(r))r.contents=n;else{const s=er(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const Nk={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Ck=t=>t.replace(/[!,[\]{}]/g,e=>Nk[e]);class Me{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Me.defaultYaml,e),this.tags=Object.assign({},Me.defaultTags,n)}clone(){const e=new Me(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Me(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Me.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Me.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:Me.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Me.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),s=r.shift();switch(s){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[i,o]=r;return this.tags[i]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{const o=/^\d+\.\d+$/.test(i);return n(6,`Unsupported YAML version ${i}`,o),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}const[,r,s]=e.match(/^(.*!)([^!]*)$/s);s||n(`The ${e} tag has no suffix`);const i=this.tags[r];if(i)try{return i+decodeURIComponent(s)}catch(o){return n(String(o)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+Ck(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let s;if(e&&r.length>0&&re(e.contents)){const i={};En(e.contents,(o,l)=>{re(l)&&l.tag&&(i[l.tag]=!0)}),s=Object.keys(i)}else s=[];for(const[i,o]of r)i==="!!"&&o==="tag:yaml.org,2002:"||(!e||s.some(l=>l.startsWith(o)))&&n.push(`%TAG ${i} ${o}`);return n.join(`
|
|
98
|
-
`)}}Me.defaultYaml={explicit:!1,version:"1.2"};Me.defaultTags={"!!":"tag:yaml.org,2002:"};function qy(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function Wy(t){const e=new Set;return En(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function Ky(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function Ak(t,e){const n=[],r=new Map;let s=null;return{onAnchor:i=>{n.push(i),s||(s=Wy(t));const o=Ky(e,s);return s.add(o),o},setAnchors:()=>{for(const i of n){const o=r.get(i);if(typeof o=="object"&&o.anchor&&(H(o.node)||te(o.node)))o.node.anchor=o.anchor;else{const l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=i,l}}},sourceObjects:r}}function Nr(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,i=r.length;s<i;++s){const o=r[s],l=Nr(t,r,String(s),o);l===void 0?delete r[s]:l!==o&&(r[s]=l)}else if(r instanceof Map)for(const s of Array.from(r.keys())){const i=r.get(s),o=Nr(t,r,s,i);o===void 0?r.delete(s):o!==i&&r.set(s,o)}else if(r instanceof Set)for(const s of Array.from(r)){const i=Nr(t,r,s,s);i===void 0?r.delete(s):i!==s&&(r.delete(s),r.add(i))}else for(const[s,i]of Object.entries(r)){const o=Nr(t,r,s,i);o===void 0?delete r[s]:o!==i&&(r[s]=o)}return t.call(e,n,r)}function ht(t,e,n){if(Array.isArray(t))return t.map((r,s)=>ht(r,String(s),n));if(t&&typeof t.toJSON=="function"){if(!n||!Tk(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=i=>{r.res=i,delete n.onCreate};const s=t.toJSON(e,n);return n.onCreate&&n.onCreate(s),s}return typeof t=="bigint"&&!(n!=null&&n.keep)?Number(t):t}class df{constructor(e){Object.defineProperty(this,gt,{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:n,maxAliasCount:r,onAnchor:s,reviver:i}={}){if(!tr(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},l=ht(this,"",o);if(typeof s=="function")for(const{count:a,res:c}of o.anchors.values())s(c,a);return typeof i=="function"?Nr(i,{"":l},"",l):l}}class Ll extends df{constructor(e){super(ff),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return En(e,{Node:(r,s)=>{if(s===this)return En.BREAK;s.anchor===this.source&&(n=s)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:s,maxAliasCount:i}=n,o=this.resolve(s);if(!o){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let l=r.get(o);if(l||(ht(o,null,n),l=r.get(o)),!l||l.res===void 0){const a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(i>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=vo(s,o,r)),l.count*l.aliasCount>i)){const a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return l.res}toString(e,n,r){const s=`*${this.source}`;if(e){if(qy(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${s} `}return s}}function vo(t,e,n){if(er(e)){const r=e.resolve(t),s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(te(e)){let r=0;for(const s of e.items){const i=vo(t,s,n);i>r&&(r=i)}return r}else if(Y(e)){const r=vo(t,e.key,n),s=vo(t,e.value,n);return Math.max(r,s)}return 1}const Qy=t=>!t||typeof t!="function"&&typeof t!="object";class R extends df{constructor(e){super(Pt),this.value=e}toJSON(e,n){return n!=null&&n.keep?this.value:ht(this.value,e,n)}toString(){return String(this.value)}}R.BLOCK_FOLDED="BLOCK_FOLDED";R.BLOCK_LITERAL="BLOCK_LITERAL";R.PLAIN="PLAIN";R.QUOTE_DOUBLE="QUOTE_DOUBLE";R.QUOTE_SINGLE="QUOTE_SINGLE";const Lk="tag:yaml.org,2002:";function Ik(t,e,n){if(e){const r=n.filter(i=>i.tag===e),s=r.find(i=>!i.format)??r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>{var s;return((s=r.identify)==null?void 0:s.call(r,t))&&!r.format})}function fi(t,e,n){var f,d,h;if(tr(t)&&(t=t.contents),re(t))return t;if(Y(t)){const v=(d=(f=n.schema[xn]).createNode)==null?void 0:d.call(f,n.schema,null,n);return v.items.push(t),v}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:s,onTagObj:i,schema:o,sourceObjects:l}=n;let a;if(r&&t&&typeof t=="object"){if(a=l.get(t),a)return a.anchor||(a.anchor=s(t)),new Ll(a.anchor);a={anchor:null,node:null},l.set(t,a)}e!=null&&e.startsWith("!!")&&(e=Lk+e.slice(2));let c=Ik(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const v=new R(t);return a&&(a.node=v),v}c=t instanceof Map?o[xn]:Symbol.iterator in Object(t)?o[ns]:o[xn]}i&&(i(c),delete n.onTagObj);const u=c!=null&&c.createNode?c.createNode(n.schema,t,n):typeof((h=c==null?void 0:c.nodeClass)==null?void 0:h.from)=="function"?c.nodeClass.from(n.schema,t,n):new R(t);return e?u.tag=e:c.default||(u.tag=c.tag),a&&(a.node=u),u}function rl(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){const i=e[s];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){const o=[];o[i]=r,r=o}else r=new Map([[i,r]])}return fi(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const Ms=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class Xy extends df{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>re(r)||Y(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(Ms(e))this.add(n);else{const[r,...s]=e,i=this.get(r,!0);if(te(i))i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,rl(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const s=this.get(n,!0);if(te(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...s]=e,i=this.get(r,!0);return s.length===0?!n&&H(i)?i.value:i:te(i)?i.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!Y(n))return!1;const r=n.value;return r==null||e&&H(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const s=this.get(n,!0);return te(s)?s.hasIn(r):!1}setIn(e,n){const[r,...s]=e;if(s.length===0)this.set(r,n);else{const i=this.get(r,!0);if(te(i))i.setIn(s,n);else if(i===void 0&&this.schema)this.set(r,rl(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}}const jk=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Kt(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const Rn=(t,e,n)=>t.endsWith(`
|
|
99
|
-
`)?Kt(n,e):n.includes(`
|
|
100
|
-
`)?`
|
|
101
|
-
`+Kt(n,e):(t.endsWith(" ")?"":" ")+n,Gy="flow",Hc="block",wo="quoted";function Il(t,e,n="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:l}={}){if(!s||s<0)return t;s<i&&(i=0);const a=Math.max(1+i,1+s-e.length);if(t.length<=a)return t;const c=[],u={};let f=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?c.push(0):f=s-r);let d,h,v=!1,m=-1,w=-1,y=-1;n===Hc&&(m=Th(t,m,e.length),m!==-1&&(f=m+a));for(let S;S=t[m+=1];){if(n===wo&&S==="\\"){switch(w=m,t[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}y=m}if(S===`
|
|
102
|
-
`)n===Hc&&(m=Th(t,m,e.length)),f=m+e.length+a,d=void 0;else{if(S===" "&&h&&h!==" "&&h!==`
|
|
103
|
-
`&&h!==" "){const x=t[m+1];x&&x!==" "&&x!==`
|
|
104
|
-
`&&x!==" "&&(d=m)}if(m>=f)if(d)c.push(d),f=d+a,d=void 0;else if(n===wo){for(;h===" "||h===" ";)h=S,S=t[m+=1],v=!0;const x=m>y+1?m-2:w-1;if(u[x])return t;c.push(x),u[x]=!0,f=x+a,d=void 0}else v=!0}h=S}if(v&&l&&l(),c.length===0)return t;o&&o();let g=t.slice(0,c[0]);for(let S=0;S<c.length;++S){const x=c[S],_=c[S+1]||t.length;x===0?g=`
|
|
105
|
-
${e}${t.slice(0,_)}`:(n===wo&&u[x]&&(g+=`${t[x]}\\`),g+=`
|
|
106
|
-
${e}${t.slice(x+1,_)}`)}return g}function Th(t,e,n){let r=e,s=e+1,i=t[s];for(;i===" "||i===" ";)if(e<s+n)i=t[++e];else{do i=t[++e];while(i&&i!==`
|
|
107
|
-
`);r=e,s=e+1,i=t[s]}return r}const jl=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Ml=t=>/^(%|---|\.\.\.)/m.test(t);function Mk(t,e,n){if(!e||e<0)return!1;const r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;i<s;++i)if(t[i]===`
|
|
108
|
-
`){if(i-o>r)return!0;if(o=i+1,s-o<=r)return!1}return!0}function qs(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=e,s=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(Ml(t)?" ":"");let o="",l=0;for(let a=0,c=n[a];c;c=n[++a])if(c===" "&&n[a+1]==="\\"&&n[a+2]==="n"&&(o+=n.slice(l,a)+"\\ ",a+=1,l=a,c="\\"),c==="\\")switch(n[a+1]){case"u":{o+=n.slice(l,a);const u=n.substr(a+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=n.substr(a,6)}a+=5,l=a+1}break;case"n":if(r||n[a+2]==='"'||n.length<s)a+=1;else{for(o+=n.slice(l,a)+`
|
|
109
|
-
|
|
110
|
-
`;n[a+2]==="\\"&&n[a+3]==="n"&&n[a+4]!=='"';)o+=`
|
|
111
|
-
`,a+=2;o+=i,n[a+2]===" "&&(o+="\\"),a+=1,l=a+1}break;default:a+=1}return o=l?o+n.slice(l):n,r?o:Il(o,i,wo,jl(e,!1))}function Vc(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
|
112
|
-
`)||/[ \t]\n|\n[ \t]/.test(t))return qs(t,e);const n=e.indent||(Ml(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
113
|
-
${n}`)+"'";return e.implicitKey?r:Il(r,n,Gy,jl(e,!1))}function Cr(t,e){const{singleQuote:n}=e.options;let r;if(n===!1)r=qs;else{const s=t.includes('"'),i=t.includes("'");s&&!i?r=Vc:i&&!s?r=qs:r=n?Vc:qs}return r(t,e)}let qc;try{qc=new RegExp(`(^|(?<!
|
|
114
|
-
))
|
|
115
|
-
+(?!
|
|
116
|
-
|$)`,"g")}catch{qc=/\n+(?!\n|$)/g}function So({comment:t,type:e,value:n},r,s,i){const{blockQuote:o,commentString:l,lineWidth:a}=r.options;if(!o||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return Cr(n,r);const c=r.indent||(r.forceBlockIndent||Ml(n)?" ":""),u=o==="literal"?!0:o==="folded"||e===R.BLOCK_FOLDED?!1:e===R.BLOCK_LITERAL?!0:!Mk(n,a,c.length);if(!n)return u?`|
|
|
117
|
-
`:`>
|
|
118
|
-
`;let f,d;for(d=n.length;d>0;--d){const b=n[d-1];if(b!==`
|
|
119
|
-
`&&b!==" "&&b!==" ")break}let h=n.substring(d);const v=h.indexOf(`
|
|
120
|
-
`);v===-1?f="-":n===h||v!==h.length-1?(f="+",i&&i()):f="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
|
|
121
|
-
`&&(h=h.slice(0,-1)),h=h.replace(qc,`$&${c}`));let m=!1,w,y=-1;for(w=0;w<n.length;++w){const b=n[w];if(b===" ")m=!0;else if(b===`
|
|
122
|
-
`)y=w;else break}let g=n.substring(0,y<w?y+1:w);g&&(n=n.substring(g.length),g=g.replace(/\n+/g,`$&${c}`));let x=(u?"|":">")+(m?c?"2":"1":"")+f;if(t&&(x+=" "+l(t.replace(/ ?[\r\n]+/g," ")),s&&s()),u)return n=n.replace(/\n+/g,`$&${c}`),`${x}
|
|
123
|
-
${c}${g}${n}${h}`;n=n.replace(/\n+/g,`
|
|
124
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);const _=Il(`${g}${n}${h}`,c,Hc,jl(r,!0));return`${x}
|
|
125
|
-
${c}${_}`}function Ok(t,e,n,r){const{type:s,value:i}=t,{actualString:o,implicitKey:l,indent:a,indentStep:c,inFlow:u}=e;if(l&&i.includes(`
|
|
126
|
-
`)||u&&/[[\]{},]/.test(i))return Cr(i,e);if(!i||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return l||u||!i.includes(`
|
|
127
|
-
`)?Cr(i,e):So(t,e,n,r);if(!l&&!u&&s!==R.PLAIN&&i.includes(`
|
|
128
|
-
`))return So(t,e,n,r);if(Ml(i)){if(a==="")return e.forceBlockIndent=!0,So(t,e,n,r);if(l&&a===c)return Cr(i,e)}const f=i.replace(/\n+/g,`$&
|
|
129
|
-
${a}`);if(o){const d=m=>{var w;return m.default&&m.tag!=="tag:yaml.org,2002:str"&&((w=m.test)==null?void 0:w.test(f))},{compat:h,tags:v}=e.doc.schema;if(v.some(d)||h!=null&&h.some(d))return Cr(i,e)}return l?f:Il(f,a,Gy,jl(e,!1))}function Si(t,e,n,r){const{implicitKey:s,inFlow:i}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:l}=t;l!==R.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=R.QUOTE_DOUBLE);const a=u=>{switch(u){case R.BLOCK_FOLDED:case R.BLOCK_LITERAL:return s||i?Cr(o.value,e):So(o,e,n,r);case R.QUOTE_DOUBLE:return qs(o.value,e);case R.QUOTE_SINGLE:return Vc(o.value,e);case R.PLAIN:return Ok(o,e,n,r);default:return null}};let c=a(l);if(c===null){const{defaultKeyType:u,defaultStringType:f}=e.options,d=s&&u||f;if(c=a(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}function Jy(t,e){const n=Object.assign({blockQuote:!0,commentString:jk,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function $k(t,e){var s;if(e.tag){const i=t.filter(o=>o.tag===e.tag);if(i.length>0)return i.find(o=>o.format===e.format)??i[0]}let n,r;if(H(e)){r=e.value;let i=t.filter(o=>{var l;return(l=o.identify)==null?void 0:l.call(o,r)});if(i.length>1){const o=i.filter(l=>l.test);o.length>0&&(i=o)}n=i.find(o=>o.format===e.format)??i.find(o=>!o.format)}else r=e,n=t.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){const i=((s=r==null?void 0:r.constructor)==null?void 0:s.name)??typeof r;throw new Error(`Tag not resolved for ${i} value`)}return n}function Pk(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const s=[],i=(H(t)||te(t))&&t.anchor;i&&qy(i)&&(n.add(i),s.push(`&${i}`));const o=t.tag?t.tag:e.default?null:e.tag;return o&&s.push(r.directives.tagString(o)),s.join(" ")}function Kr(t,e,n,r){var a;if(Y(t))return t.toString(e,n,r);if(er(t)){if(e.doc.directives)return t.toString(e);if((a=e.resolvedAliases)!=null&&a.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let s;const i=re(t)?t:e.doc.createNode(t,{onTagObj:c=>s=c});s||(s=$k(e.doc.schema.tags,i));const o=Pk(i,s,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const l=typeof s.stringify=="function"?s.stringify(i,e,n,r):H(i)?Si(i,e,n,r):i.toString(e,n,r);return o?H(i)||l[0]==="{"||l[0]==="["?`${o} ${l}`:`${o}
|
|
130
|
-
${e.indent}${l}`:l}function Rk({key:t,value:e},n,r,s){const{allNullValues:i,doc:o,indent:l,indentStep:a,options:{commentString:c,indentSeq:u,simpleKeys:f}}=n;let d=re(t)&&t.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(te(t)||!re(t)&&typeof t=="object"){const T="With simple keys, collection cannot be used as a key value";throw new Error(T)}}let h=!f&&(!t||d&&e==null&&!n.inFlow||te(t)||(H(t)?t.type===R.BLOCK_FOLDED||t.type===R.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(f||!i),indent:l+a});let v=!1,m=!1,w=Kr(t,n,()=>v=!0,()=>m=!0);if(!h&&!n.inFlow&&w.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(i||e==null)return v&&r&&r(),w===""?"?":h?`? ${w}`:w}else if(i&&!f||e==null&&h)return w=`? ${w}`,d&&!v?w+=Rn(w,n.indent,c(d)):m&&s&&s(),w;v&&(d=null),h?(d&&(w+=Rn(w,n.indent,c(d))),w=`? ${w}
|
|
131
|
-
${l}:`):(w=`${w}:`,d&&(w+=Rn(w,n.indent,c(d))));let y,g,S;re(e)?(y=!!e.spaceBefore,g=e.commentBefore,S=e.comment):(y=!1,g=null,S=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!h&&!d&&H(e)&&(n.indentAtStart=w.length+1),m=!1,!u&&a.length>=2&&!n.inFlow&&!h&&ss(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let x=!1;const _=Kr(e,n,()=>x=!0,()=>m=!0);let b=" ";if(d||y||g){if(b=y?`
|
|
132
|
-
`:"",g){const T=c(g);b+=`
|
|
133
|
-
${Kt(T,n.indent)}`}_===""&&!n.inFlow?b===`
|
|
134
|
-
`&&(b=`
|
|
135
|
-
|
|
136
|
-
`):b+=`
|
|
137
|
-
${n.indent}`}else if(!h&&te(e)){const T=_[0],E=_.indexOf(`
|
|
138
|
-
`),k=E!==-1,A=n.inFlow??e.flow??e.items.length===0;if(k||!A){let L=!1;if(k&&(T==="&"||T==="!")){let C=_.indexOf(" ");T==="&"&&C!==-1&&C<E&&_[C+1]==="!"&&(C=_.indexOf(" ",C+1)),(C===-1||E<C)&&(L=!0)}L||(b=`
|
|
139
|
-
${n.indent}`)}}else(_===""||_[0]===`
|
|
140
|
-
`)&&(b="");return w+=b+_,n.inFlow?x&&r&&r():S&&!x?w+=Rn(w,n.indent,c(S)):m&&s&&s(),w}function Yy(t,e){(t==="debug"||t==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const Ki="<<",Xt={identify:t=>t===Ki||typeof t=="symbol"&&t.description===Ki,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new R(Symbol(Ki)),{addToJSMap:Zy}),stringify:()=>Ki},Dk=(t,e)=>(Xt.identify(e)||H(e)&&(!e.type||e.type===R.PLAIN)&&Xt.identify(e.value))&&(t==null?void 0:t.doc.schema.tags.some(n=>n.tag===Xt.tag&&n.default));function Zy(t,e,n){if(n=t&&er(n)?n.resolve(t.doc):n,ss(n))for(const r of n.items)ja(t,e,r);else if(Array.isArray(n))for(const r of n)ja(t,e,r);else ja(t,e,n)}function ja(t,e,n){const r=t&&er(n)?n.resolve(t.doc):n;if(!rs(r))throw new Error("Merge sources must be maps or map aliases");const s=r.toJSON(null,t,Map);for(const[i,o]of s)e instanceof Map?e.has(i)||e.set(i,o):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function e0(t,e,{key:n,value:r}){if(re(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(Dk(t,n))Zy(t,e,r);else{const s=ht(n,"",t);if(e instanceof Map)e.set(s,ht(r,s,t));else if(e instanceof Set)e.add(s);else{const i=Fk(n,s,t),o=ht(r,i,t);i in e?Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[i]=o}}return e}function Fk(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(re(t)&&(n!=null&&n.doc)){const r=Jy(n.doc,{});r.anchors=new Set;for(const i of n.anchors.keys())r.anchors.add(i.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=t.toString(r);if(!n.mapKeyWarned){let i=JSON.stringify(s);i.length>40&&(i=i.substring(0,36)+'..."'),Yy(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(e)}function hf(t,e,n){const r=fi(t,void 0,n),s=fi(e,void 0,n);return new Ce(r,s)}class Ce{constructor(e,n=null){Object.defineProperty(this,gt,{value:zy}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return re(n)&&(n=n.clone(e)),re(r)&&(r=r.clone(e)),new Ce(n,r)}toJSON(e,n){const r=n!=null&&n.mapAsMap?new Map:{};return e0(n,r,this)}toString(e,n,r){return e!=null&&e.doc?Rk(this,e,n,r):JSON.stringify(this)}}function t0(t,e,n){return(e.inFlow??t.flow?Bk:zk)(t,e,n)}function zk({comment:t,items:e},n,{blockItemPrefix:r,flowChars:s,itemIndent:i,onChompKeep:o,onComment:l}){const{indent:a,options:{commentString:c}}=n,u=Object.assign({},n,{indent:i,type:null});let f=!1;const d=[];for(let v=0;v<e.length;++v){const m=e[v];let w=null;if(re(m))!f&&m.spaceBefore&&d.push(""),sl(n,d,m.commentBefore,f),m.comment&&(w=m.comment);else if(Y(m)){const g=re(m.key)?m.key:null;g&&(!f&&g.spaceBefore&&d.push(""),sl(n,d,g.commentBefore,f))}f=!1;let y=Kr(m,u,()=>w=null,()=>f=!0);w&&(y+=Rn(y,i,c(w))),f&&w&&(f=!1),d.push(r+y)}let h;if(d.length===0)h=s.start+s.end;else{h=d[0];for(let v=1;v<d.length;++v){const m=d[v];h+=m?`
|
|
141
|
-
${a}${m}`:`
|
|
142
|
-
`}}return t?(h+=`
|
|
143
|
-
`+Kt(c(t),a),l&&l()):f&&o&&o(),h}function Bk({items:t},e,{flowChars:n,itemIndent:r}){const{indent:s,indentStep:i,flowCollectionPadding:o,options:{commentString:l}}=e;r+=i;const a=Object.assign({},e,{indent:r,inFlow:!0,type:null});let c=!1,u=0;const f=[];for(let v=0;v<t.length;++v){const m=t[v];let w=null;if(re(m))m.spaceBefore&&f.push(""),sl(e,f,m.commentBefore,!1),m.comment&&(w=m.comment);else if(Y(m)){const g=re(m.key)?m.key:null;g&&(g.spaceBefore&&f.push(""),sl(e,f,g.commentBefore,!1),g.comment&&(c=!0));const S=re(m.value)?m.value:null;S?(S.comment&&(w=S.comment),S.commentBefore&&(c=!0)):m.value==null&&(g!=null&&g.comment)&&(w=g.comment)}w&&(c=!0);let y=Kr(m,a,()=>w=null);v<t.length-1&&(y+=","),w&&(y+=Rn(y,r,l(w))),!c&&(f.length>u||y.includes(`
|
|
144
|
-
`))&&(c=!0),f.push(y),u=f.length}const{start:d,end:h}=n;if(f.length===0)return d+h;if(!c){const v=f.reduce((m,w)=>m+w.length+2,2);c=e.options.lineWidth>0&&v>e.options.lineWidth}if(c){let v=d;for(const m of f)v+=m?`
|
|
145
|
-
${i}${s}${m}`:`
|
|
146
|
-
`;return`${v}
|
|
147
|
-
${s}${h}`}else return`${d}${o}${f.join(" ")}${o}${h}`}function sl({indent:t,options:{commentString:e}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){const i=Kt(e(r),t);n.push(i.trimStart())}}function Dn(t,e){const n=H(e)?e.value:e;for(const r of t)if(Y(r)&&(r.key===e||r.key===n||H(r.key)&&r.key.value===n))return r}class Ze extends Xy{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(xn,e),this.items=[]}static from(e,n,r){const{keepUndefined:s,replacer:i}=r,o=new this(e),l=(a,c)=>{if(typeof i=="function")c=i.call(n,a,c);else if(Array.isArray(i)&&!i.includes(a))return;(c!==void 0||s)&&o.items.push(hf(a,c,r))};if(n instanceof Map)for(const[a,c]of n)l(a,c);else if(n&&typeof n=="object")for(const a of Object.keys(n))l(a,n[a]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){var o;let r;Y(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new Ce(e,e==null?void 0:e.value):r=new Ce(e.key,e.value);const s=Dn(this.items,r.key),i=(o=this.schema)==null?void 0:o.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);H(s.value)&&Qy(r.value)?s.value.value=r.value:s.value=r.value}else if(i){const l=this.items.findIndex(a=>i(r,a)<0);l===-1?this.items.push(r):this.items.splice(l,0,r)}else this.items.push(r)}delete(e){const n=Dn(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const r=Dn(this.items,e),s=r==null?void 0:r.value;return(!n&&H(s)?s.value:s)??void 0}has(e){return!!Dn(this.items,e)}set(e,n){this.add(new Ce(e,n),!0)}toJSON(e,n,r){const s=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(s);for(const i of this.items)e0(n,s,i);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(const s of this.items)if(!Y(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),t0(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const is={collection:"map",default:!0,nodeClass:Ze,tag:"tag:yaml.org,2002:map",resolve(t,e){return rs(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>Ze.from(t,e,n)};class bn extends Xy{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(ns,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=Qi(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=Qi(e);if(typeof r!="number")return;const s=this.items[r];return!n&&H(s)?s.value:s}has(e){const n=Qi(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=Qi(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const s=this.items[r];H(s)&&Qy(n)?s.value=n:this.items[r]=n}toJSON(e,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let s=0;for(const i of this.items)r.push(ht(i,String(s++),n));return r}toString(e,n,r){return e?t0(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:s}=r,i=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let l of n){if(typeof s=="function"){const a=n instanceof Set?l:String(o++);l=s.call(n,a,l)}i.items.push(fi(l,void 0,r))}}return i}}function Qi(t){let e=H(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const os={collection:"seq",default:!0,nodeClass:bn,tag:"tag:yaml.org,2002:seq",resolve(t,e){return ss(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>bn.from(t,e,n)},Ol={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Si(t,e,n,r)}},$l={identify:t=>t==null,createNode:()=>new R(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new R(null),stringify:({source:t},e)=>typeof t=="string"&&$l.test.test(t)?t:e.options.nullStr},pf={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new R(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&pf.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function Nt({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const s=typeof r=="number"?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let o=i.indexOf(".");o<0&&(o=i.length,i+=".");let l=e-(i.length-o-1);for(;l-- >0;)i+="0"}return i}const n0={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Nt},r0={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Nt(t)}},s0={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new R(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:Nt},Pl=t=>typeof t=="bigint"||Number.isInteger(t),mf=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function i0(t,e,n){const{value:r}=t;return Pl(r)&&r>=0?n+r.toString(e):Nt(t)}const o0={identify:t=>Pl(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>mf(t,2,8,n),stringify:t=>i0(t,8,"0o")},l0={identify:Pl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>mf(t,0,10,n),stringify:Nt},a0={identify:t=>Pl(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>mf(t,2,16,n),stringify:t=>i0(t,16,"0x")},Uk=[is,os,Ol,$l,pf,o0,l0,a0,n0,r0,s0];function Nh(t){return typeof t=="bigint"||Number.isInteger(t)}const Xi=({value:t})=>JSON.stringify(t),Hk=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Xi},{identify:t=>t==null,createNode:()=>new R(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Xi},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:Xi},{identify:Nh,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>Nh(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Xi}],Vk={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},qk=[is,os].concat(Hk,Vk),gf={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof Buffer=="function")return Buffer.from(t,"base64");if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let s=0;s<n.length;++s)r[s]=n.charCodeAt(s);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,s,i){const o=n;let l;if(typeof Buffer=="function")l=o instanceof Buffer?o.toString("base64"):Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c<o.length;++c)a+=String.fromCharCode(o[c]);l=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=R.BLOCK_LITERAL),e!==R.QUOTE_DOUBLE){const a=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(l.length/a),u=new Array(c);for(let f=0,d=0;f<c;++f,d+=a)u[f]=l.substr(d,a);l=u.join(e===R.BLOCK_LITERAL?`
|
|
148
|
-
`:" ")}return Si({comment:t,type:e,value:l},r,s,i)}};function c0(t,e){if(ss(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!Y(r)){if(rs(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const s=r.items[0]||new Ce(new R(null));if(r.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${r.commentBefore}
|
|
149
|
-
${s.key.commentBefore}`:r.commentBefore),r.comment){const i=s.value??s.key;i.comment=i.comment?`${r.comment}
|
|
150
|
-
${i.comment}`:r.comment}r=s}t.items[n]=Y(r)?r:new Ce(r)}}else e("Expected a sequence for this tag");return t}function u0(t,e,n){const{replacer:r}=n,s=new bn(t);s.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(i++),o));let l,a;if(Array.isArray(o))if(o.length===2)l=o[0],a=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const c=Object.keys(o);if(c.length===1)l=c[0],a=o[l];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else l=o;s.items.push(hf(l,a,n))}return s}const yf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:c0,createNode:u0};class Pr extends bn{constructor(){super(),this.add=Ze.prototype.add.bind(this),this.delete=Ze.prototype.delete.bind(this),this.get=Ze.prototype.get.bind(this),this.has=Ze.prototype.has.bind(this),this.set=Ze.prototype.set.bind(this),this.tag=Pr.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const s of this.items){let i,o;if(Y(s)?(i=ht(s.key,"",n),o=ht(s.value,i,n)):i=ht(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}static from(e,n,r){const s=u0(e,n,r),i=new this;return i.items=s.items,i}}Pr.tag="tag:yaml.org,2002:omap";const vf={collection:"seq",identify:t=>t instanceof Map,nodeClass:Pr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=c0(t,e),r=[];for(const{key:s}of n.items)H(s)&&(r.includes(s.value)?e(`Ordered maps must not include duplicate keys: ${s.value}`):r.push(s.value));return Object.assign(new Pr,n)},createNode:(t,e,n)=>Pr.from(t,e,n)};function f0({value:t,source:e},n){return e&&(t?d0:h0).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const d0={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new R(!0),stringify:f0},h0={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new R(!1),stringify:f0},Wk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Nt},Kk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():Nt(t)}},Qk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new R(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Nt},xi=t=>typeof t=="bigint"||Number.isInteger(t);function Rl(t,e,n,{intAsBigInt:r}){const s=t[0];if((s==="-"||s==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return s==="-"?BigInt(-1)*o:o}const i=parseInt(t,n);return s==="-"?-1*i:i}function wf(t,e,n){const{value:r}=t;if(xi(r)){const s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return Nt(t)}const Xk={identify:xi,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Rl(t,2,2,n),stringify:t=>wf(t,2,"0b")},Gk={identify:xi,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Rl(t,1,8,n),stringify:t=>wf(t,8,"0")},Jk={identify:xi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Rl(t,0,10,n),stringify:Nt},Yk={identify:xi,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Rl(t,2,16,n),stringify:t=>wf(t,16,"0x")};class Rr extends Ze{constructor(e){super(e),this.tag=Rr.tag}add(e){let n;Y(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new Ce(e.key,null):n=new Ce(e,null),Dn(this.items,n.key)||this.items.push(n)}get(e,n){const r=Dn(this.items,e);return!n&&Y(r)?H(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Dn(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new Ce(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:s}=r,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof s=="function"&&(o=s.call(n,o,o)),i.items.push(hf(o,null,r));return i}}Rr.tag="tag:yaml.org,2002:set";const Sf={collection:"map",identify:t=>t instanceof Set,nodeClass:Rr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>Rr.from(t,e,n),resolve(t,e){if(rs(t)){if(t.hasAllNullValues(!0))return Object.assign(new Rr,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function xf(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,s=o=>e?BigInt(o):Number(o),i=r.replace(/_/g,"").split(":").reduce((o,l)=>o*s(60)+s(l),s(0));return n==="-"?s(-1)*i:i}function p0(t){let{value:e}=t,n=o=>o;if(typeof e=="bigint")n=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Nt(t);let r="";e<0&&(r="-",e*=n(-1));const s=n(60),i=[e%s];return e<60?i.unshift(0):(e=(e-i[0])/s,i.unshift(e%s),e>=60&&(e=(e-i[0])/s,i.unshift(e))),r+i.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const m0={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>xf(t,n),stringify:p0},g0={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>xf(t,!1),stringify:p0},Dl={identify:t=>t 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(t){const e=t.match(Dl.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,s,i,o,l]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(n,r-1,s,i||0,o||0,l||0,a);const u=e[8];if(u&&u!=="Z"){let f=xf(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Ch=[is,os,Ol,$l,d0,h0,Xk,Gk,Jk,Yk,Wk,Kk,Qk,gf,Xt,vf,yf,Sf,m0,g0,Dl],Ah=new Map([["core",Uk],["failsafe",[is,os,Ol]],["json",qk],["yaml11",Ch],["yaml-1.1",Ch]]),Lh={binary:gf,bool:pf,float:s0,floatExp:r0,floatNaN:n0,floatTime:g0,int:l0,intHex:a0,intOct:o0,intTime:m0,map:is,merge:Xt,null:$l,omap:vf,pairs:yf,seq:os,set:Sf,timestamp:Dl},Zk={"tag:yaml.org,2002:binary":gf,"tag:yaml.org,2002:merge":Xt,"tag:yaml.org,2002:omap":vf,"tag:yaml.org,2002:pairs":yf,"tag:yaml.org,2002:set":Sf,"tag:yaml.org,2002:timestamp":Dl};function Ma(t,e,n){const r=Ah.get(e);if(r&&!t)return n&&!r.includes(Xt)?r.concat(Xt):r.slice();let s=r;if(!s)if(Array.isArray(t))s=[];else{const i=Array.from(Ah.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(t))for(const i of t)s=s.concat(i);else typeof t=="function"&&(s=t(s.slice()));return n&&(s=s.concat(Xt)),s.reduce((i,o)=>{const l=typeof o=="string"?Lh[o]:o;if(!l){const a=JSON.stringify(o),c=Object.keys(Lh).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${c}`)}return i.includes(l)||i.push(l),i},[])}const eE=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class Fl{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:s,schema:i,sortMapEntries:o,toStringDefaults:l}){this.compat=Array.isArray(e)?Ma(e,"compat"):e?Ma(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=s?Zk:{},this.tags=Ma(n,this.name,r),this.toStringOptions=l??null,Object.defineProperty(this,xn,{value:is}),Object.defineProperty(this,Pt,{value:Ol}),Object.defineProperty(this,ns,{value:os}),this.sortMapEntries=typeof o=="function"?o:o===!0?eE:null}clone(){const e=Object.create(Fl.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function tE(t,e){var a;const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const c=t.directives.toString(t);c?(n.push(c),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const s=Jy(t,e),{commentString:i}=s.options;if(t.commentBefore){n.length!==1&&n.unshift("");const c=i(t.commentBefore);n.unshift(Kt(c,""))}let o=!1,l=null;if(t.contents){if(re(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const f=i(t.contents.commentBefore);n.push(Kt(f,""))}s.forceBlockIndent=!!t.comment,l=t.contents.comment}const c=l?void 0:()=>o=!0;let u=Kr(t.contents,s,()=>l=null,c);l&&(u+=Rn(u,"",i(l))),(u[0]==="|"||u[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${u}`:n.push(u)}else n.push(Kr(t.contents,s));if((a=t.directives)!=null&&a.docEnd)if(t.comment){const c=i(t.comment);c.includes(`
|
|
151
|
-
`)?(n.push("..."),n.push(Kt(c,""))):n.push(`... ${c}`)}else n.push("...");else{let c=t.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||l)&&n[n.length-1]!==""&&n.push(""),n.push(Kt(i(c),"")))}return n.join(`
|
|
152
|
-
`)+`
|
|
153
|
-
`}class ls{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,gt,{value:Uc});let s=null;typeof n=="function"||Array.isArray(n)?s=n:r===void 0&&n&&(r=n,n=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:o}=i;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Me({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,s,r)}clone(){const e=Object.create(ls.prototype,{[gt]:{value:Uc}});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=re(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){lr(this.contents)&&this.contents.add(e)}addIn(e,n){lr(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=Wy(this);e.anchor=!n||r.has(n)?Ky(n||"a",r):n}return new Ll(e.anchor)}createNode(e,n,r){let s;if(typeof n=="function")e=n.call({"":e},"",e),s=n;else if(Array.isArray(n)){const w=g=>typeof g=="number"||g instanceof String||g instanceof Number,y=n.filter(w).map(String);y.length>0&&(n=n.concat(y)),s=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:l,keepUndefined:a,onTagObj:c,tag:u}=r??{},{onAnchor:f,setAnchors:d,sourceObjects:h}=Ak(this,o||"a"),v={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:f,onTagObj:c,replacer:s,schema:this.schema,sourceObjects:h},m=fi(e,u,v);return l&&te(m)&&(m.flow=!0),d(),m}createPair(e,n,r={}){const s=this.createNode(e,null,r),i=this.createNode(n,null,r);return new Ce(s,i)}delete(e){return lr(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ms(e)?this.contents==null?!1:(this.contents=null,!0):lr(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return te(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Ms(e)?!n&&H(this.contents)?this.contents.value:this.contents:te(this.contents)?this.contents.getIn(e,n):void 0}has(e){return te(this.contents)?this.contents.has(e):!1}hasIn(e){return Ms(e)?this.contents!==void 0:te(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=rl(this.schema,[e],n):lr(this.contents)&&this.contents.set(e,n)}setIn(e,n){Ms(e)?this.contents=n:this.contents==null?this.contents=rl(this.schema,Array.from(e),n):lr(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Me({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 Me({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const s=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new Fl(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:s,onAnchor:i,reviver:o}={}){const l={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},a=ht(this.contents,n??"",l);if(typeof i=="function")for(const{count:c,res:u}of l.anchors.values())i(u,c);return typeof o=="function"?Nr(o,{"":a},"",a):a}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}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 n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return tE(this,e)}}function lr(t){if(te(t))return!0;throw new Error("Expected a YAML collection as document contents")}class _f extends Error{constructor(e,n,r,s){super(),this.name=e,this.code=r,this.message=s,this.pos=n}}class Fn extends _f{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class y0 extends _f{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const il=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(l=>e.linePos(l));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1,o=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const l=Math.min(i-39,o.length-79);o="…"+o.substring(l),i-=l-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,i))){let l=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);l.length>80&&(l=l.substring(0,79)+`…
|
|
154
|
-
`),o=l+o}if(/[^ ]/.test(o)){let l=1;const a=n.linePos[1];a&&a.line===r&&a.col>s&&(l=Math.max(1,Math.min(a.col-s,80-i)));const c=" ".repeat(i)+"^".repeat(l);n.message+=`:
|
|
155
|
-
|
|
156
|
-
${o}
|
|
157
|
-
${c}
|
|
158
|
-
`}};function Qr(t,{flow:e,indicator:n,next:r,offset:s,onError:i,parentIndent:o,startOnNewline:l}){let a=!1,c=l,u=l,f="",d="",h=!1,v=!1,m=null,w=null,y=null,g=null,S=null,x=null,_=null;for(const E of t)switch(v&&(E.type!=="space"&&E.type!=="newline"&&E.type!=="comma"&&i(E.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),v=!1),m&&(c&&E.type!=="comment"&&E.type!=="newline"&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),E.type){case"space":!e&&(n!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&E.source.includes(" ")&&(m=E),u=!0;break;case"comment":{u||i(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const k=E.source.substring(1)||" ";f?f+=d+k:f=k,d="",c=!1;break}case"newline":c?f?f+=E.source:a=!0:d+=E.source,c=!0,h=!0,(w||y)&&(g=E),u=!0;break;case"anchor":w&&i(E,"MULTIPLE_ANCHORS","A node can have at most one anchor"),E.source.endsWith(":")&&i(E.offset+E.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),w=E,_===null&&(_=E.offset),c=!1,u=!1,v=!0;break;case"tag":{y&&i(E,"MULTIPLE_TAGS","A node can have at most one tag"),y=E,_===null&&(_=E.offset),c=!1,u=!1,v=!0;break}case n:(w||y)&&i(E,"BAD_PROP_ORDER",`Anchors and tags must be after the ${E.source} indicator`),x&&i(E,"UNEXPECTED_TOKEN",`Unexpected ${E.source} in ${e??"collection"}`),x=E,c=n==="seq-item-ind"||n==="explicit-key-ind",u=!1;break;case"comma":if(e){S&&i(E,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),S=E,c=!1,u=!1;break}default:i(E,"UNEXPECTED_TOKEN",`Unexpected ${E.type} token`),c=!1,u=!1}const b=t[t.length-1],T=b?b.offset+b.source.length:s;return v&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=o||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:S,found:x,spaceBefore:a,comment:f,hasNewline:h,anchor:w,tag:y,newlineAfterProp:g,end:T,start:_??T}}function di(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
159
|
-
`))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(di(e.key)||di(e.value))return!0}return!1;default:return!0}}function Wc(t,e,n){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&di(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function v0(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const s=typeof r=="function"?r:(i,o)=>i===o||H(i)&&H(o)&&i.value===o.value;return e.some(i=>s(i.key,n))}const Ih="All mapping items must start at the same column";function nE({composeNode:t,composeEmptyNode:e},n,r,s,i){var u;const o=(i==null?void 0:i.nodeClass)??Ze,l=new o(n.schema);n.atRoot&&(n.atRoot=!1);let a=r.offset,c=null;for(const f of r.items){const{start:d,key:h,sep:v,value:m}=f,w=Qr(d,{indicator:"explicit-key-ind",next:h??(v==null?void 0:v[0]),offset:a,onError:s,parentIndent:r.indent,startOnNewline:!0}),y=!w.found;if(y){if(h&&(h.type==="block-seq"?s(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==r.indent&&s(a,"BAD_INDENT",Ih)),!w.anchor&&!w.tag&&!v){c=w.end,w.comment&&(l.comment?l.comment+=`
|
|
160
|
-
`+w.comment:l.comment=w.comment);continue}(w.newlineAfterProp||di(h))&&s(h??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((u=w.found)==null?void 0:u.indent)!==r.indent&&s(a,"BAD_INDENT",Ih);n.atKey=!0;const g=w.end,S=h?t(n,h,w,s):e(n,g,d,null,w,s);n.schema.compat&&Wc(r.indent,h,s),n.atKey=!1,v0(n,l.items,S)&&s(g,"DUPLICATE_KEY","Map keys must be unique");const x=Qr(v??[],{indicator:"map-value-ind",next:m,offset:S.range[2],onError:s,parentIndent:r.indent,startOnNewline:!h||h.type==="block-scalar"});if(a=x.end,x.found){y&&((m==null?void 0:m.type)==="block-map"&&!x.hasNewline&&s(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&w.start<x.found.offset-1024&&s(S.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const _=m?t(n,m,x,s):e(n,a,v,null,x,s);n.schema.compat&&Wc(r.indent,m,s),a=_.range[2];const b=new Ce(S,_);n.options.keepSourceTokens&&(b.srcToken=f),l.items.push(b)}else{y&&s(S.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),x.comment&&(S.comment?S.comment+=`
|
|
161
|
-
`+x.comment:S.comment=x.comment);const _=new Ce(S);n.options.keepSourceTokens&&(_.srcToken=f),l.items.push(_)}}return c&&c<a&&s(c,"IMPOSSIBLE","Map comment with trailing content"),l.range=[r.offset,a,c??a],l}function rE({composeNode:t,composeEmptyNode:e},n,r,s,i){const o=(i==null?void 0:i.nodeClass)??bn,l=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let a=r.offset,c=null;for(const{start:u,value:f}of r.items){const d=Qr(u,{indicator:"seq-item-ind",next:f,offset:a,onError:s,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||f)f&&f.type==="block-seq"?s(d.end,"BAD_INDENT","All sequence items must start at the same column"):s(a,"MISSING_CHAR","Sequence item without - indicator");else{c=d.end,d.comment&&(l.comment=d.comment);continue}const h=f?t(n,f,d,s):e(n,d.end,u,null,d,s);n.schema.compat&&Wc(r.indent,f,s),a=h.range[2],l.items.push(h)}return l.range=[r.offset,a,c??a],l}function _i(t,e,n,r){let s="";if(t){let i=!1,o="";for(const l of t){const{source:a,type:c}=l;switch(c){case"space":i=!0;break;case"comment":{n&&!i&&r(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const u=a.substring(1)||" ";s?s+=o+u:s=u,o="";break}case"newline":s&&(o+=a),i=!0;break;default:r(l,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=a.length}}return{comment:s,offset:e}}const Oa="Block collections are not allowed within flow collections",$a=t=>t&&(t.type==="block-map"||t.type==="block-seq");function sE({composeNode:t,composeEmptyNode:e},n,r,s,i){const o=r.start.source==="{",l=o?"flow map":"flow sequence",a=(i==null?void 0:i.nodeClass)??(o?Ze:bn),c=new a(n.schema);c.flow=!0;const u=n.atRoot;u&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset+r.start.source.length;for(let w=0;w<r.items.length;++w){const y=r.items[w],{start:g,key:S,sep:x,value:_}=y,b=Qr(g,{flow:l,indicator:"explicit-key-ind",next:S??(x==null?void 0:x[0]),offset:f,onError:s,parentIndent:r.indent,startOnNewline:!1});if(!b.found){if(!b.anchor&&!b.tag&&!x&&!_){w===0&&b.comma?s(b.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):w<r.items.length-1&&s(b.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),b.comment&&(c.comment?c.comment+=`
|
|
162
|
-
`+b.comment:c.comment=b.comment),f=b.end;continue}!o&&n.options.strict&&di(S)&&s(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(w===0)b.comma&&s(b.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(b.comma||s(b.start,"MISSING_CHAR",`Missing , between ${l} items`),b.comment){let T="";e:for(const E of g)switch(E.type){case"comma":case"space":break;case"comment":T=E.source.substring(1);break e;default:break e}if(T){let E=c.items[c.items.length-1];Y(E)&&(E=E.value??E.key),E.comment?E.comment+=`
|
|
163
|
-
`+T:E.comment=T,b.comment=b.comment.substring(T.length+1)}}if(!o&&!x&&!b.found){const T=_?t(n,_,b,s):e(n,b.end,x,null,b,s);c.items.push(T),f=T.range[2],$a(_)&&s(T.range,"BLOCK_IN_FLOW",Oa)}else{n.atKey=!0;const T=b.end,E=S?t(n,S,b,s):e(n,T,g,null,b,s);$a(S)&&s(E.range,"BLOCK_IN_FLOW",Oa),n.atKey=!1;const k=Qr(x??[],{flow:l,indicator:"map-value-ind",next:_,offset:E.range[2],onError:s,parentIndent:r.indent,startOnNewline:!1});if(k.found){if(!o&&!b.found&&n.options.strict){if(x)for(const C of x){if(C===k.found)break;if(C.type==="newline"){s(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}b.start<k.found.offset-1024&&s(k.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&_.source&&_.source[0]===":"?s(_,"MISSING_CHAR",`Missing space after : in ${l}`):s(k.start,"MISSING_CHAR",`Missing , or : between ${l} items`));const A=_?t(n,_,k,s):k.found?e(n,k.end,x,null,k,s):null;A?$a(_)&&s(A.range,"BLOCK_IN_FLOW",Oa):k.comment&&(E.comment?E.comment+=`
|
|
164
|
-
`+k.comment:E.comment=k.comment);const L=new Ce(E,A);if(n.options.keepSourceTokens&&(L.srcToken=y),o){const C=c;v0(n,C.items,E)&&s(T,"DUPLICATE_KEY","Map keys must be unique"),C.items.push(L)}else{const C=new Ze(n.schema);C.flow=!0,C.items.push(L);const M=(A??E).range;C.range=[E.range[0],M[1],M[2]],c.items.push(C)}f=A?A.range[2]:k.end}}const d=o?"}":"]",[h,...v]=r.end;let m=f;if(h&&h.source===d)m=h.offset+h.source.length;else{const w=l[0].toUpperCase()+l.substring(1),y=u?`${w} must end with a ${d}`:`${w} in block collection must be sufficiently indented and end with a ${d}`;s(f,u?"MISSING_CHAR":"BAD_INDENT",y),h&&h.source.length!==1&&v.unshift(h)}if(v.length>0){const w=_i(v,m,n.options.strict,s);w.comment&&(c.comment?c.comment+=`
|
|
165
|
-
`+w.comment:c.comment=w.comment),c.range=[r.offset,m,w.offset]}else c.range=[r.offset,m,m];return c}function Pa(t,e,n,r,s,i){const o=n.type==="block-map"?nE(t,e,n,r,i):n.type==="block-seq"?rE(t,e,n,r,i):sE(t,e,n,r,i),l=o.constructor;return s==="!"||s===l.tagName?(o.tag=l.tagName,o):(s&&(o.tag=s),o)}function iE(t,e,n,r,s){var d;const i=r.tag,o=i?e.directives.tagName(i.source,h=>s(i,"TAG_RESOLVE_FAILED",h)):null;if(n.type==="block-seq"){const{anchor:h,newlineAfterProp:v}=r,m=h&&i?h.offset>i.offset?h:i:h??i;m&&(!v||v.offset<m.offset)&&s(m,"MISSING_CHAR","Missing newline after block sequence props")}const l=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===Ze.tagName&&l==="map"||o===bn.tagName&&l==="seq")return Pa(t,e,n,s,o);let a=e.schema.tags.find(h=>h.tag===o&&h.collection===l);if(!a){const h=e.schema.knownTags[o];if(h&&h.collection===l)e.schema.tags.push(Object.assign({},h,{default:!1})),a=h;else return h!=null&&h.collection?s(i,"BAD_COLLECTION_TYPE",`${h.tag} used for ${l} collection, but expects ${h.collection}`,!0):s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Pa(t,e,n,s,o)}const c=Pa(t,e,n,s,o,a),u=((d=a.resolve)==null?void 0:d.call(a,c,h=>s(i,"TAG_RESOLVE_FAILED",h),e.options))??c,f=re(u)?u:new R(u);return f.range=c.range,f.tag=o,a!=null&&a.format&&(f.format=a.format),f}function w0(t,e,n){const r=e.offset,s=oE(e,t.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[r,r,r]};const i=s.mode===">"?R.BLOCK_FOLDED:R.BLOCK_LITERAL,o=e.source?lE(e.source):[];let l=o.length;for(let m=o.length-1;m>=0;--m){const w=o[m][1];if(w===""||w==="\r")l=m;else break}if(l===0){const m=s.chomp==="+"&&o.length>0?`
|
|
166
|
-
`.repeat(Math.max(1,o.length-1)):"";let w=r+s.length;return e.source&&(w+=e.source.length),{value:m,type:i,comment:s.comment,range:[r,w,w]}}let a=e.indent+s.indent,c=e.offset+s.length,u=0;for(let m=0;m<l;++m){const[w,y]=o[m];if(y===""||y==="\r")s.indent===0&&w.length>a&&(a=w.length);else{w.length<a&&n(c+w.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(a=w.length),u=m,a===0&&!t.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=w.length+y.length+1}for(let m=o.length-1;m>=l;--m)o[m][0].length>a&&(l=m+1);let f="",d="",h=!1;for(let m=0;m<u;++m)f+=o[m][0].slice(a)+`
|
|
167
|
-
`;for(let m=u;m<l;++m){let[w,y]=o[m];c+=w.length+y.length+1;const g=y[y.length-1]==="\r";if(g&&(y=y.slice(0,-1)),y&&w.length<a){const x=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(c-y.length-(g?2:1),"BAD_INDENT",x),w=""}i===R.BLOCK_LITERAL?(f+=d+w.slice(a)+y,d=`
|
|
168
|
-
`):w.length>a||y[0]===" "?(d===" "?d=`
|
|
169
|
-
`:!h&&d===`
|
|
170
|
-
`&&(d=`
|
|
171
|
-
|
|
172
|
-
`),f+=d+w.slice(a)+y,d=`
|
|
173
|
-
`,h=!0):y===""?d===`
|
|
174
|
-
`?f+=`
|
|
175
|
-
`:d=`
|
|
176
|
-
`:(f+=d+y,d=" ",h=!1)}switch(s.chomp){case"-":break;case"+":for(let m=l;m<o.length;++m)f+=`
|
|
177
|
-
`+o[m][0].slice(a);f[f.length-1]!==`
|
|
178
|
-
`&&(f+=`
|
|
179
|
-
`);break;default:f+=`
|
|
180
|
-
`}const v=r+s.length+e.source.length;return{value:f,type:i,comment:s.comment,range:[r,v,v]}}function oE({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=e[0],i=s[0];let o=0,l="",a=-1;for(let d=1;d<s.length;++d){const h=s[d];if(!l&&(h==="-"||h==="+"))l=h;else{const v=Number(h);!o&&v?o=v:a===-1&&(a=t+d)}}a!==-1&&r(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let c=!1,u="",f=s.length;for(let d=1;d<e.length;++d){const h=e[d];switch(h.type){case"space":c=!0;case"newline":f+=h.source.length;break;case"comment":n&&!c&&r(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,u=h.source.substring(1);break;case"error":r(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{const v=`Unexpected token in block scalar header: ${h.type}`;r(h,"UNEXPECTED_TOKEN",v);const m=h.source;m&&typeof m=="string"&&(f+=m.length)}}}return{mode:i,indent:o,chomp:l,comment:u,length:f}}function lE(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),i=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)i.push([e[o],e[o+1]]);return i}function S0(t,e,n){const{offset:r,type:s,source:i,end:o}=t;let l,a;const c=(d,h,v)=>n(r+d,h,v);switch(s){case"scalar":l=R.PLAIN,a=aE(i,c);break;case"single-quoted-scalar":l=R.QUOTE_SINGLE,a=cE(i,c);break;case"double-quoted-scalar":l=R.QUOTE_DOUBLE,a=uE(i,c);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[r,r+i.length,r+i.length]}}const u=r+i.length,f=_i(o,u,e,n);return{value:a,type:l,comment:f.comment,range:[r,u,f.offset]}}function aE(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),x0(t)}function cE(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),x0(t.slice(1,-1)).replace(/''/g,"'")}function x0(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
181
|
-
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
182
|
-
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let s=r[1],i=" ",o=e.lastIndex;for(n.lastIndex=o;r=n.exec(t);)r[1]===""?i===`
|
|
183
|
-
`?s+=i:i=`
|
|
184
|
-
`:(s+=i+r[1],i=" "),o=n.lastIndex;const l=/[ \t]*(.*)/sy;return l.lastIndex=o,r=l.exec(t),s+i+((r==null?void 0:r[1])??"")}function uE(t,e){let n="";for(let r=1;r<t.length-1;++r){const s=t[r];if(!(s==="\r"&&t[r+1]===`
|
|
185
|
-
`))if(s===`
|
|
186
|
-
`){const{fold:i,offset:o}=fE(t,r);n+=i,r=o}else if(s==="\\"){let i=t[++r];const o=dE[i];if(o)n+=o;else if(i===`
|
|
187
|
-
`)for(i=t[r+1];i===" "||i===" ";)i=t[++r+1];else if(i==="\r"&&t[r+1]===`
|
|
188
|
-
`)for(i=t[++r+1];i===" "||i===" ";)i=t[++r+1];else if(i==="x"||i==="u"||i==="U"){const l={x:2,u:4,U:8}[i];n+=hE(t,r+1,l,e),r+=l}else{const l=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),n+=l}}else if(s===" "||s===" "){const i=r;let o=t[r+1];for(;o===" "||o===" ";)o=t[++r+1];o!==`
|
|
189
|
-
`&&!(o==="\r"&&t[r+2]===`
|
|
190
|
-
`)&&(n+=r>i?t.slice(i,r+1):s)}else n+=s}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function fE(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
|
|
191
|
-
`||r==="\r")&&!(r==="\r"&&t[e+2]!==`
|
|
192
|
-
`);)r===`
|
|
193
|
-
`&&(n+=`
|
|
194
|
-
`),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const dE={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
195
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function hE(t,e,n,r){const s=t.substr(e,n),o=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(o)){const l=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}return String.fromCodePoint(o)}function _0(t,e,n,r){const{value:s,type:i,comment:o,range:l}=e.type==="block-scalar"?w0(t,e,r):S0(e,t.options.strict,r),a=n?t.directives.tagName(n.source,f=>r(n,"TAG_RESOLVE_FAILED",f)):null;let c;t.options.stringKeys&&t.atKey?c=t.schema[Pt]:a?c=pE(t.schema,s,a,n,r):e.type==="scalar"?c=mE(t,s,e,r):c=t.schema[Pt];let u;try{const f=c.resolve(s,d=>r(n??e,"TAG_RESOLVE_FAILED",d),t.options);u=H(f)?f:new R(f)}catch(f){const d=f instanceof Error?f.message:String(f);r(n??e,"TAG_RESOLVE_FAILED",d),u=new R(s)}return u.range=l,u.source=s,i&&(u.type=i),a&&(u.tag=a),c.format&&(u.format=c.format),o&&(u.comment=o),u}function pE(t,e,n,r,s){var l;if(n==="!")return t[Pt];const i=[];for(const a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)i.push(a);else return a;for(const a of i)if((l=a.test)!=null&&l.test(e))return a;const o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(s(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[Pt])}function mE({atKey:t,directives:e,schema:n},r,s,i){const o=n.tags.find(l=>{var a;return(l.default===!0||t&&l.default==="key")&&((a=l.test)==null?void 0:a.test(r))})||n[Pt];if(n.compat){const l=n.compat.find(a=>{var c;return a.default&&((c=a.test)==null?void 0:c.test(r))})??n[Pt];if(o.tag!==l.tag){const a=e.tagString(o.tag),c=e.tagString(l.tag),u=`Value may be parsed as either ${a} or ${c}`;i(s,"TAG_RESOLVE_FAILED",u,!0)}}return o}function gE(t,e,n){if(e){n===null&&(n=e.length);for(let r=n-1;r>=0;--r){let s=e[r];switch(s.type){case"space":case"comment":case"newline":t-=s.source.length;continue}for(s=e[++r];(s==null?void 0:s.type)==="space";)t+=s.source.length,s=e[++r];break}}return t}const yE={composeNode:k0,composeEmptyNode:kf};function k0(t,e,n,r){const s=t.atKey,{spaceBefore:i,comment:o,anchor:l,tag:a}=n;let c,u=!0;switch(e.type){case"alias":c=vE(t,e,r),(l||a)&&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":c=_0(t,e,a,r),l&&(c.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=iE(yE,t,e,n,r),l&&(c.anchor=l.source.substring(1));break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),c=kf(t,e.offset,void 0,null,n,r),u=!1}}return l&&c.anchor===""&&r(l,"BAD_ALIAS","Anchor cannot be an empty string"),s&&t.options.stringKeys&&(!H(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(a??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function kf(t,e,n,r,{spaceBefore:s,comment:i,anchor:o,tag:l,end:a},c){const u={type:"scalar",offset:gE(e,n,r),indent:-1,source:""},f=_0(t,u,l,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=a),f}function vE({options:t},{offset:e,source:n,end:r},s){const i=new Ll(n.substring(1));i.source===""&&s(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&s(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+n.length,l=_i(r,o,t.strict,s);return i.range=[e,o,l.offset],l.comment&&(i.comment=l.comment),i}function wE(t,e,{offset:n,start:r,value:s,end:i},o){const l=Object.assign({_directives:e},t),a=new ls(void 0,l),c={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},u=Qr(r,{indicator:"doc-start",next:s??(i==null?void 0:i[0]),offset:n,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(a.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=s?k0(c,s,u,o):kf(c,u.end,r,null,u,o);const f=a.contents.range[2],d=_i(i,f,!1,o);return d.comment&&(a.comment=d.comment),a.range=[n,f,d.offset],a}function ks(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function jh(t){var s;let e="",n=!1,r=!1;for(let i=0;i<t.length;++i){const o=t[i];switch(o[0]){case"#":e+=(e===""?"":r?`
|
|
196
|
-
|
|
197
|
-
`:`
|
|
198
|
-
`)+(o.substring(1)||" "),n=!0,r=!1;break;case"%":((s=t[i+1])==null?void 0:s[0])!=="#"&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}class Ef{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,s,i)=>{const o=ks(n);i?this.warnings.push(new y0(o,r,s)):this.errors.push(new Fn(o,r,s))},this.directives=new Me({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:r,afterEmptyLine:s}=jh(this.prelude);if(r){const i=e.contents;if(n)e.comment=e.comment?`${e.comment}
|
|
199
|
-
${r}`:r;else if(s||e.directives.docStart||!i)e.commentBefore=r;else if(te(i)&&!i.flow&&i.items.length>0){let o=i.items[0];Y(o)&&(o=o.key);const l=o.commentBefore;o.commentBefore=l?`${r}
|
|
200
|
-
${l}`:r}else{const o=i.commentBefore;i.commentBefore=o?`${r}
|
|
201
|
-
${o}`:r}}n?(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:jh(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const s of e)yield*this.next(s);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,s)=>{const i=ks(e);i[0]+=n,this.onError(i,"BAD_DIRECTIVE",r,s)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=wE(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Fn(ks(e),"UNEXPECTED_TOKEN",n);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 Fn(ks(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=_i(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
|
|
202
|
-
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Fn(ks(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-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),s=new ls(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}}function SE(t,e=!0,n){if(t){const r=(s,i,o)=>{const l=typeof s=="number"?s:Array.isArray(s)?s[0]:s.offset;if(n)n(l,i,o);else throw new Fn([l,l+1],i,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return S0(t,e,r);case"block-scalar":return w0({options:{strict:e}},t,r)}}return null}function xE(t,e){const{implicitKey:n=!1,indent:r,inFlow:s=!1,offset:i=-1,type:o="PLAIN"}=e,l=Si({type:o,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),a=e.end??[{type:"newline",offset:-1,indent:r,source:`
|
|
203
|
-
`}];switch(l[0]){case"|":case">":{const c=l.indexOf(`
|
|
204
|
-
`),u=l.substring(0,c),f=l.substring(c+1)+`
|
|
205
|
-
`,d=[{type:"block-scalar-header",offset:i,indent:r,source:u}];return E0(d,a)||d.push({type:"newline",offset:-1,indent:r,source:`
|
|
206
|
-
`}),{type:"block-scalar",offset:i,indent:r,props:d,source:f}}case'"':return{type:"double-quoted-scalar",offset:i,indent:r,source:l,end:a};case"'":return{type:"single-quoted-scalar",offset:i,indent:r,source:l,end:a};default:return{type:"scalar",offset:i,indent:r,source:l,end:a}}}function _E(t,e,n={}){let{afterKey:r=!1,implicitKey:s=!1,inFlow:i=!1,type:o}=n,l="indent"in t?t.indent:null;if(r&&typeof l=="number"&&(l+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const c=t.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const a=Si({type:o,value:e},{implicitKey:s||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":kE(t,a);break;case'"':Ra(t,a,"double-quoted-scalar");break;case"'":Ra(t,a,"single-quoted-scalar");break;default:Ra(t,a,"scalar")}}function kE(t,e){const n=e.indexOf(`
|
|
207
|
-
`),r=e.substring(0,n),s=e.substring(n+1)+`
|
|
208
|
-
`;if(t.type==="block-scalar"){const i=t.props[0];if(i.type!=="block-scalar-header")throw new Error("Invalid block scalar header");i.source=r,t.source=s}else{const{offset:i}=t,o="indent"in t?t.indent:-1,l=[{type:"block-scalar-header",offset:i,indent:o,source:r}];E0(l,"end"in t?t.end:void 0)||l.push({type:"newline",offset:-1,indent:o,source:`
|
|
209
|
-
`});for(const a of Object.keys(t))a!=="type"&&a!=="offset"&&delete t[a];Object.assign(t,{type:"block-scalar",indent:o,props:l,source:s})}}function E0(t,e){if(e)for(const n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function Ra(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{const r=t.props.slice(1);let s=e.length;t.props[0].type==="block-scalar-header"&&(s-=t.props[0].source.length);for(const i of r)i.offset+=s;delete t.props,Object.assign(t,{type:n,source:e,end:r});break}case"block-map":case"block-seq":{const s={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
|
|
210
|
-
`};delete t.items,Object.assign(t,{type:n,source:e,end:[s]});break}default:{const r="indent"in t?t.indent:-1,s="end"in t&&Array.isArray(t.end)?t.end.filter(i=>i.type==="space"||i.type==="comment"||i.type==="newline"):[];for(const i of Object.keys(t))i!=="type"&&i!=="offset"&&delete t[i];Object.assign(t,{type:n,indent:r,source:e,end:s})}}}const EE=t=>"type"in t?ol(t):xo(t);function ol(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=ol(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=xo(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=xo(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=xo(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function xo({start:t,key:e,sep:n,value:r}){let s="";for(const i of t)s+=i.source;if(e&&(s+=ol(e)),n)for(const i of n)s+=i.source;return r&&(s+=ol(r)),s}const Kc=Symbol("break visit"),bE=Symbol("skip children"),b0=Symbol("remove item");function Qn(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),T0(Object.freeze([]),t,e)}Qn.BREAK=Kc;Qn.SKIP=bE;Qn.REMOVE=b0;Qn.itemAtPath=(t,e)=>{let n=t;for(const[r,s]of e){const i=n==null?void 0:n[r];if(i&&"items"in i)n=i.items[s];else return}return n};Qn.parentCollection=(t,e)=>{const n=Qn.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],s=n==null?void 0:n[r];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function T0(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const s of["key","value"]){const i=e[s];if(i&&"items"in i){for(let o=0;o<i.items.length;++o){const l=T0(Object.freeze(t.concat([[s,o]])),i.items[o],n);if(typeof l=="number")o=l-1;else{if(l===Kc)return Kc;l===b0&&(i.items.splice(o,1),o-=1)}}typeof r=="function"&&s==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}const zl="\uFEFF",Bl="",Ul="",hi="",TE=t=>!!t&&"items"in t,NE=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function CE(t){switch(t){case zl:return"<BOM>";case Bl:return"<DOC>";case Ul:return"<FLOW_END>";case hi:return"<SCALAR>";default:return JSON.stringify(t)}}function N0(t){switch(t){case zl:return"byte-order-mark";case Bl:return"doc-mode";case Ul:return"flow-error-end";case hi:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
211
|
-
`:case`\r
|
|
212
|
-
`: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(t[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 AE=Object.freeze(Object.defineProperty({__proto__:null,BOM:zl,DOCUMENT:Bl,FLOW_END:Ul,SCALAR:hi,createScalarToken:xE,isCollection:TE,isScalar:NE,prettyToken:CE,resolveAsScalar:SE,setScalarValue:_E,stringify:EE,tokenType:N0,visit:Qn},Symbol.toStringTag,{value:"Module"}));function vt(t){switch(t){case void 0:case" ":case`
|
|
213
|
-
`:case"\r":case" ":return!0;default:return!1}}const Mh=new Set("0123456789ABCDEFabcdef"),LE=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Gi=new Set(",[]{}"),IE=new Set(` ,[]{}
|
|
214
|
-
\r `),Da=t=>!t||IE.has(t);class C0{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,n=!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=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
|
|
215
|
-
`?!0:n==="\r"?this.buffer[e+1]===`
|
|
216
|
-
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){const s=this.buffer[r+e+1];if(s===`
|
|
217
|
-
`||!s&&!this.atEnd)return e+r+1}return n===`
|
|
218
|
-
`||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&vt(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(`
|
|
219
|
-
`,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]===zl&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){const i=e[r-1];if(i===" "||i===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const i=e[n-1];if(i===" "||i===" ")n-=1;else break}const s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield Bl,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 n=this.peek(3);if((n==="---"||n==="...")&&vt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!vt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&vt(n)){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 n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);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(Da),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&s[0]!=="#"||r===0&&(s.startsWith("---")||s.startsWith("..."))&&vt(s[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield Ul,yield*this.parseLineStart();let i=0;for(;s[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),s[i]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Da),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||vt(o)||o===",")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 n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let i=0;for(;this.buffer[n-1-i]==="\\";)i+=1;if(i%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let s=r.indexOf(`
|
|
220
|
-
`,this.pos);if(s!==-1){for(;s!==-1;){const i=this.continueScalar(s+1);if(i===-1)break;s=r.indexOf(`
|
|
221
|
-
`,i)}s!==-1&&(n=s-(r[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>vt(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":n+=1;break;case`
|
|
222
|
-
`:e=i,n=0;break;case"\r":{const o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|
223
|
-
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
|
|
224
|
-
`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let s=e+1;for(r=this.buffer[s];r===" ";)r=this.buffer[++s];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
225
|
-
`;)r=this.buffer[++s];e=s-1}else if(!this.blockScalarKeep)do{let i=e-1,o=this.buffer[i];o==="\r"&&(o=this.buffer[--i]);const l=i;for(;o===" ";)o=this.buffer[--i];if(o===`
|
|
226
|
-
`&&i>=this.pos&&i+1+n>l)e=i;else break}while(!0);return yield hi,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,s;for(;s=this.buffer[++r];)if(s===":"){const i=this.buffer[r+1];if(vt(i)||e&&Gi.has(i))break;n=r}else if(vt(s)){let i=this.buffer[r+1];if(s==="\r"&&(i===`
|
|
227
|
-
`?(r+=1,s=`
|
|
228
|
-
`,i=this.buffer[r+1]):n=r),i==="#"||e&&Gi.has(i))break;if(s===`
|
|
229
|
-
`){const o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&Gi.has(s))break;n=r}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield hi,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Da))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(vt(n)||e&&Gi.has(n))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,n=this.buffer[e];for(;!vt(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(LE.has(n))n=this.buffer[++e];else if(n==="%"&&Mh.has(this.buffer[e+1])&&Mh.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
|
|
230
|
-
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
231
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class A0{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){const i=n+r>>1;this.lineStarts[i]<e?n=i+1:r=i}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const s=this.lineStarts[n-1];return{line:n,col:e-s+1}}}}function Mn(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Oh(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function L0(t){switch(t==null?void 0:t.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ji(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function ar(t){var n;if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=t[++e])==null?void 0:n.type)==="space";);return t.splice(e,t.length)}function $h(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!Mn(e.start,"explicit-key-ind")&&!Mn(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,L0(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 bf{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 C0,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=N0(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){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||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 n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&$h(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const s=r.items[r.items.length-1];if(s.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=r.items[r.items.length-1];s.value?r.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{const s=r.items[r.items.length-1];!s||s.value?r.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&Oh(s.start)===-1&&(n.indent===0||s.start.every(i=>i.type!=="comment"||i.indent<n.indent))&&(r.type==="document"?r.end=s.start:r.items.push({start:s.start}),n.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":{Oh(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 n=this.startBlockValue(e);n?this.stack.push(n):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 n=Ji(this.peek(2)),r=ar(n);let s;e.end?(s=e.end,s.push(this.sourceToken),delete e.end):s=[this.sourceToken];const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}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 n=this.source.indexOf(`
|
|
232
|
-
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
233
|
-
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const s="end"in n.value?n.value.end:void 0,i=Array.isArray(s)?s[s.length-1]:void 0;(i==null?void 0:i.type)==="comment"?s==null||s.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const s=e.items[e.items.length-2],i=(r=s==null?void 0:s.value)==null?void 0:r.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const s=!this.onKeyLine&&this.indent===e.indent,i=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let o=[];if(i&&n.sep&&!n.value){const l=[];for(let a=0;a<n.sep.length;++a){const c=n.sep[a];switch(c.type){case"newline":l.push(a);break;case"space":break;case"comment":c.indent>e.indent&&(l.length=0);break;default:l.length=0}}l.length>=2&&(o=n.sep.splice(l[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):i||n.value?(o.push(this.sourceToken),e.items.push({start:o,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(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Mn(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(L0(n.key)&&!Mn(n.sep,"newline")){const l=ar(n.start),a=n.key,c=n.sep;c.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:a,sep:c}]})}else o.length>0?n.sep=n.sep.concat(o,this.sourceToken):n.sep.push(this.sourceToken);else if(Mn(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const l=ar(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?e.items.push({start:o,key:null,sep:[this.sourceToken]}):Mn(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const l=this.flowScalar(this.type);i||n.value?(e.items.push({start:o,key:l,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(l):(Object.assign(n,{key:l,sep:[]}),this.onKeyLine=!0);return}default:{const l=this.startBlockValue(e);if(l){s&&l.type!=="block-seq"&&e.items.push({start:o}),this.stack.push(l);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const s="end"in n.value?n.value.end:void 0,i=Array.isArray(s)?s[s.length-1]:void 0;(i==null?void 0:i.type)==="comment"?s==null||s.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const s=e.items[e.items.length-2],i=(r=s==null?void 0:s.value)==null?void 0:r.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Mn(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,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 s=Ji(r),i=ar(s);$h(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
|
|
234
|
-
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
235
|
-
`,n)+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 n=Ji(e),r=ar(n);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 n=Ji(e),r=ar(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!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 I0(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new A0||null,prettyErrors:e}}function jE(t,e={}){const{lineCounter:n,prettyErrors:r}=I0(e),s=new bf(n==null?void 0:n.addNewLine),i=new Ef(e),o=Array.from(i.compose(s.parse(t)));if(r&&n)for(const l of o)l.errors.forEach(il(t,n)),l.warnings.forEach(il(t,n));return o.length>0?o:Object.assign([],{empty:!0},i.streamInfo())}function j0(t,e={}){const{lineCounter:n,prettyErrors:r}=I0(e),s=new bf(n==null?void 0:n.addNewLine),i=new Ef(e);let o=null;for(const l of i.compose(s.parse(t),!0,t.length))if(!o)o=l;else if(o.options.logLevel!=="silent"){o.errors.push(new Fn(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(o.errors.forEach(il(t,n)),o.warnings.forEach(il(t,n))),o}function ME(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const s=j0(t,n);if(!s)return null;if(s.warnings.forEach(i=>Yy(s.options.logLevel,i)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:r},n))}function OE(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(t===void 0){const{keepUndefined:s}=n??e??{};if(!s)return}return tr(t)&&!r?t.toString(n):new ls(t,r,n).toString(n)}const M0=Object.freeze(Object.defineProperty({__proto__:null,Alias:Ll,CST:AE,Composer:Ef,Document:ls,Lexer:C0,LineCounter:A0,Pair:Ce,Parser:bf,Scalar:R,Schema:Fl,YAMLError:_f,YAMLMap:Ze,YAMLParseError:Fn,YAMLSeq:bn,YAMLWarning:y0,isAlias:er,isCollection:te,isDocument:tr,isMap:rs,isNode:re,isPair:Y,isScalar:H,isSeq:ss,parse:ME,parseAllDocuments:jE,parseDocument:j0,stringify:OE,visit:En,visitAsync:Al},Symbol.toStringTag,{value:"Module"})),$E=({action:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:s,highlightedElement:i,setHighlightedElement:o})=>{const[l,a]=N.useState("action"),[c,u]=Dr("shouldPopulateCanvasFromScreenshot",!1),f=N.useMemo(()=>FE(t),[t]),d=N.useMemo(()=>{const h=f[l];return h?BE(h,c):void 0},[f,l,c]);return p.jsxs("div",{className:"snapshot-tab vbox",children:[p.jsxs(Wu,{children:[p.jsx(Tt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:r,onClick:()=>s(!r)}),["action","before","after"].map(h=>p.jsx(jg,{id:h,title:DE(h),selected:l===h,onSelect:()=>a(h)},h)),p.jsx("div",{style:{flex:"auto"}}),p.jsx(Tt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(d!=null&&d.popoutUrl),onClick:()=>{const h=window.open((d==null?void 0:d.popoutUrl)||"","_blank");h==null||h.addEventListener("DOMContentLoaded",()=>{const v=new My(h,!1,e,n,1,"chromium",[]);new xk(v)})}})]}),p.jsx(PE,{snapshotUrls:d,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:s,highlightedElement:i,setHighlightedElement:o})]})},PE=({snapshotUrls:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:s,highlightedElement:i,setHighlightedElement:o})=>{const l=N.useRef(null),a=N.useRef(null),[c,u]=N.useState({viewport:$0,url:""}),f=N.useRef({iteration:0,visibleIframe:0});return N.useEffect(()=>{(async()=>{const d=f.current.iteration+1,h=1-f.current.visibleIframe;f.current.iteration=d;const v=await UE(t==null?void 0:t.snapshotInfoUrl);if(f.current.iteration!==d)return;const m=[l,a][h].current;if(m){let w=()=>{};const y=new Promise(g=>w=g);try{m.addEventListener("load",w),m.addEventListener("error",w);const g=(t==null?void 0:t.snapshotUrl)||HE;m.contentWindow?m.contentWindow.location.replace(g):m.src=g,await y}catch{}finally{m.removeEventListener("load",w),m.removeEventListener("error",w)}}f.current.iteration===d&&(f.current.visibleIframe=h,u(v))})()},[t]),p.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:d=>{d.key==="Escape"&&r&&s(!1)},children:[p.jsx(Ph,{isInspecting:r,sdkLanguage:e,testIdAttributeName:n,highlightedElement:i,setHighlightedElement:o,iframe:l.current,iteration:f.current.iteration}),p.jsx(Ph,{isInspecting:r,sdkLanguage:e,testIdAttributeName:n,highlightedElement:i,setHighlightedElement:o,iframe:a.current,iteration:f.current.iteration}),p.jsx(RE,{snapshotInfo:c,children:p.jsxs("div",{className:"snapshot-switcher",children:[p.jsx("iframe",{ref:l,name:"snapshot",title:"DOM Snapshot",className:le(f.current.visibleIframe===0&&"snapshot-visible")}),p.jsx("iframe",{ref:a,name:"snapshot",title:"DOM Snapshot",className:le(f.current.visibleIframe===1&&"snapshot-visible")})]})})]})},RE=({snapshotInfo:t,children:e})=>{const[n,r]=Xn(),i={width:t.viewport.width,height:t.viewport.height+40},o=Math.min(n.width/i.width,n.height/i.height,1),l={x:(n.width-i.width)/2,y:(n.height-i.height)/2};return p.jsx("div",{ref:r,className:"snapshot-wrapper",children:p.jsxs("div",{className:"snapshot-container",style:{width:i.width+"px",height:i.height+"px",transform:`translate(${l.x}px, ${l.y}px) scale(${o})`},children:[p.jsx(bk,{url:t.url}),e]})})};function DE(t){return t==="before"?"Before":t==="after"?"After":t==="action"?"Action":t}const Ph=({iframe:t,isInspecting:e,sdkLanguage:n,testIdAttributeName:r,highlightedElement:s,setHighlightedElement:i,iteration:o})=>(N.useEffect(()=>{const l=[],a=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{O0(l,n,r,a,"",t==null?void 0:t.contentWindow)}catch{}const c=s.lastEdited==="ariaSnapshot"&&s.ariaSnapshot?cf(M0,s.ariaSnapshot):void 0,u=s.lastEdited==="locator"&&s.locator?kk(n,s.locator,r):void 0;for(const{recorder:f,frameSelector:d}of l){const h=u!=null&&u.startsWith(d)?u.substring(d.length).trim():void 0,v=(c==null?void 0:c.errors.length)===0?c.fragment:void 0;f.setUIState({mode:e?"inspecting":"none",actionSelector:h,ariaTemplate:v,language:n,testIdAttributeName:r,overlay:{offsetX:0}},{async elementPicked(m){i({locator:Sn(n,d+m.selector),ariaSnapshot:m.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const m of l)m.recorder!==f&&m.recorder.clearHighlight()}})}},[t,e,s,i,n,r,o]),p.jsx(p.Fragment,{}));function O0(t,e,n,r,s,i){if(!i)return;const o=i;if(!o._recorder){const l=new My(i,r,e,n,1,"chromium",[]),a=new ak(l);o._injectedScript=l,o._recorder={recorder:a,frameSelector:s},r&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(a)))}t.push(o._recorder);for(let l=0;l<i.frames.length;++l){const a=i.frames[l],c=a.frameElement?o._injectedScript.generateSelectorSimple(a.frameElement,{omitInternalEngines:!0,testIdAttributeName:n})+" >> internal:control=enter-frame >> ":"";O0(t,e,n,r,s+c,a)}}function FE(t){if(!t)return{};let e=t.beforeSnapshot?{action:t,snapshotName:t.beforeSnapshot}:void 0,n=t;for(;!e&&n;)n=B1(n),e=n!=null&&n.afterSnapshot?{action:n,snapshotName:n==null?void 0:n.afterSnapshot}:void 0;const r=t.afterSnapshot?{action:t,snapshotName:t.afterSnapshot}:e,s=t.inputSnapshot?{action:t,snapshotName:t.inputSnapshot,hasInputTarget:!0}:r;return s&&(s.point=t.point),{action:s,before:e,after:r}}const zE=new URLSearchParams(window.location.search).has("isUnderTest"),Rh=new URLSearchParams(window.location.search).get("server");function BE(t,e){const n=new URLSearchParams;n.set("trace",Ko(t.action).traceUrl),n.set("name",t.snapshotName),zE&&n.set("isUnderTest","true"),t.point&&(n.set("pointX",String(t.point.x)),n.set("pointY",String(t.point.y)),t.hasInputTarget&&n.set("hasInputTarget","1")),e&&n.set("shouldPopulateCanvasFromScreenshot","1");const r=new URL(`snapshot/${t.action.pageId}?${n.toString()}`,window.location.href).toString(),s=new URL(`snapshotInfo/${t.action.pageId}?${n.toString()}`,window.location.href).toString(),i=new URLSearchParams;i.set("r",r),Rh&&i.set("server",Rh),i.set("trace",Ko(t.action).traceUrl),t.point&&(i.set("pointX",String(t.point.x)),i.set("pointY",String(t.point.y)),t.hasInputTarget&&n.set("hasInputTarget","1"));const o=new URL(`snapshot.html?${i.toString()}`,window.location.href).toString();return{snapshotInfoUrl:s,snapshotUrl:r,popoutUrl:o}}async function UE(t){const e={url:"",viewport:$0,timestamp:void 0,wallTime:void 0};if(t){const r=await(await fetch(t)).json();r.error||(e.url=r.url,e.viewport=r.viewport,e.timestamp=r.timestamp,e.wallTime=r.wallTime)}return e}const $0={width:1280,height:720},HE='data:text/html,<body style="background: #ddd"></body>',VE=Tl,qE=({stack:t,setSelectedFrame:e,selectedFrame:n})=>{const r=t||[];return p.jsx(VE,{name:"stack-trace",items:r,selectedItem:r[n],render:s=>{const i=s.file[1]===":"?"\\":"/";return p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"stack-trace-frame-function",children:s.function||"(anonymous)"}),p.jsx("span",{className:"stack-trace-frame-location",children:s.file.split(i).pop()}),p.jsx("span",{className:"stack-trace-frame-line",children:":"+s.line})]})},onSelected:s=>e(r.indexOf(s))})},WE=({stack:t,sources:e,rootDir:n,fallbackLocation:r,stackFrameLocation:s,onOpenExternally:i})=>{const[o,l]=N.useState(),[a,c]=N.useState(0);N.useEffect(()=>{o!==t&&(l(t),c(0))},[t,o,l,c]);const{source:u,highlight:f,targetLine:d,fileName:h,location:v}=_v(async()=>{var A,L,C,M;const g=t==null?void 0:t[a],S=!(g!=null&&g.file);if(S&&!r)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const x=S?r.file:g.file;let _=e.get(x);_||(_={errors:((A=r==null?void 0:r.source)==null?void 0:A.errors)||[],content:(L=r==null?void 0:r.source)==null?void 0:L.content},e.set(x,_));const b=S?r:g,T=S?(r==null?void 0:r.line)||((C=_.errors[0])==null?void 0:C.line)||0:g.line,E=n&&x.startsWith(n)?x.substring(n.length+1):x,k=_.errors.map(F=>({type:"error",line:F.line,message:F.message}));if(k.push({line:T,type:"running"}),((M=r==null?void 0:r.source)==null?void 0:M.content)!==void 0)_.content=r.source.content;else if(_.content===void 0||S){const F=await KE(x);try{let Z=await fetch(`sha1/src@${F}.txt`);Z.status===404&&(Z=await fetch(`file?path=${encodeURIComponent(x)}`)),Z.status>=400?_.content=`<Unable to read "${x}">`:_.content=await Z.text()}catch{_.content=`<Unable to read "${x}">`}}return{source:_,highlight:k,targetLine:T,fileName:E,location:b}},[t,a,n,r],{source:{errors:[],content:"Loading…"},highlight:[]}),m=N.useCallback(()=>{v&&(i?i(v):window.location.href=`vscode://file//${v.file}:${v.line}`)},[i,v]),w=((t==null?void 0:t.length)??0)>1,y=QE(h);return p.jsx(Qo,{sidebarSize:200,orientation:s==="bottom"?"vertical":"horizontal",sidebarHidden:!w,main:p.jsxs("div",{className:"vbox","data-testid":"source-code",children:[h&&p.jsxs(Wu,{children:[p.jsx("div",{className:"source-tab-file-name",title:h,children:p.jsx("div",{children:y})}),p.jsx(Lg,{description:"Copy filename",value:y}),v&&p.jsx(Tt,{icon:"link-external",title:"Open in VS Code",onClick:m})]}),p.jsx(Wr,{text:u.content||"",language:"javascript",highlight:f,revealLine:d,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:p.jsx(qE,{stack:t,selectedFrame:a,setSelectedFrame:c})})};async function KE(t){const e=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-1",e),r=[],s=new DataView(n);for(let i=0;i<s.byteLength;i+=1){const o=s.getUint8(i).toString(16).padStart(2,"0");r.push(o)}return r.join("")}function QE(t){if(!t)return"";const e=t!=null&&t.includes("/")?"/":"\\";return(t==null?void 0:t.split(e).pop())??""}const P0={width:200,height:45},ur=2.5,XE=P0.height+ur*2,GE=({model:t,boundaries:e,previewPoint:n})=>{var u,f;const[r,s]=Xn(),i=N.useRef(null);let o=0;if(i.current&&n){const d=i.current.getBoundingClientRect();o=(n.clientY-d.top+i.current.scrollTop)/XE|0}const l=(f=(u=t==null?void 0:t.pages)==null?void 0:u[o])==null?void 0:f.screencastFrames;let a,c;if(n!==void 0&&l&&l.length){const d=e.minimum+(e.maximum-e.minimum)*n.x/r.width;a=l[Xh(l,d,R0)-1];const h={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};c=a?D0({width:a.width,height:a.height},h):void 0}return p.jsxs("div",{className:"film-strip",ref:s,children:[p.jsx("div",{className:"film-strip-lanes",ref:i,children:t==null?void 0:t.pages.map((d,h)=>d.screencastFrames.length?p.jsx(JE,{boundaries:e,page:d,width:r.width},h):null)}),(n==null?void 0:n.x)!==void 0&&p.jsxs("div",{className:"film-strip-hover",style:{top:r.bottom+5,left:Math.min(n.x,r.width-(c?c.width:0)-10)},children:[n.action&&p.jsx("div",{className:"film-strip-hover-title",children:qu(n.action,n)}),a&&c&&p.jsx("div",{style:{width:c.width,height:c.height},children:p.jsx("img",{src:`sha1/${a.sha1}`,width:c.width,height:c.height})})]})]})},JE=({boundaries:t,page:e,width:n})=>{const r={width:0,height:0},s=e.screencastFrames;for(const m of s)r.width=Math.max(r.width,m.width),r.height=Math.max(r.height,m.height);const i=D0(r,P0),o=s[0].timestamp,l=s[s.length-1].timestamp,a=t.maximum-t.minimum,c=(o-t.minimum)/a*n,u=(t.maximum-l)/a*n,d=(l-o)/a*n/(i.width+2*ur)|0,h=(l-o)/d,v=[];for(let m=0;o&&h&&m<d;++m){const w=o+h*m,y=Xh(s,w,R0)-1;v.push(p.jsx("div",{className:"film-strip-frame",style:{width:i.width,height:i.height,backgroundImage:`url(sha1/${s[y].sha1})`,backgroundSize:`${i.width}px ${i.height}px`,margin:ur,marginRight:ur}},m))}return v.push(p.jsx("div",{className:"film-strip-frame",style:{width:i.width,height:i.height,backgroundImage:`url(sha1/${s[s.length-1].sha1})`,backgroundSize:`${i.width}px ${i.height}px`,margin:ur,marginRight:ur}},v.length)),p.jsx("div",{className:"film-strip-lane",style:{marginLeft:c+"px",marginRight:u+"px"},children:v})};function R0(t,e){return t-e.timestamp}function D0(t,e){const n=Math.max(t.width/e.width,t.height/e.height);return{width:t.width/n|0,height:t.height/n|0}}const YE=({model:t,boundaries:e,consoleEntries:n,onSelected:r,highlightedAction:s,highlightedEntry:i,highlightedConsoleEntry:o,selectedTime:l,setSelectedTime:a,sdkLanguage:c})=>{const[u,f]=Xn(),[d,h]=N.useState(),[v,m]=N.useState(),{offsets:w,curtainLeft:y,curtainRight:g}=N.useMemo(()=>{let A=l||e;if(d&&d.startX!==d.endX){const F=Lt(u.width,e,d.startX),Z=Lt(u.width,e,d.endX);A={minimum:Math.min(F,Z),maximum:Math.max(F,Z)}}const L=ot(u.width,e,A.minimum),M=ot(u.width,e,e.maximum)-ot(u.width,e,A.maximum);return{offsets:ZE(u.width,e),curtainLeft:L,curtainRight:M}},[l,e,d,u]),S=N.useMemo(()=>{const A=[];for(const L of(t==null?void 0:t.actions)||[])L.class!=="Test"&&A.push({action:L,leftTime:L.startTime,rightTime:L.endTime||e.maximum,leftPosition:ot(u.width,e,L.startTime),rightPosition:ot(u.width,e,L.endTime||e.maximum),active:!1,error:!!L.error});for(const L of(t==null?void 0:t.resources)||[]){const C=L._monotonicTime,M=L._monotonicTime+L.time;A.push({resource:L,leftTime:C,rightTime:M,leftPosition:ot(u.width,e,C),rightPosition:ot(u.width,e,M),active:!1,error:!1})}for(const L of n||[])A.push({consoleMessage:L,leftTime:L.timestamp,rightTime:L.timestamp,leftPosition:ot(u.width,e,L.timestamp),rightPosition:ot(u.width,e,L.timestamp),active:!1,error:L.isError});return A},[t,n,e,u]);N.useMemo(()=>{for(const A of S)s?A.active=A.action===s:i?A.active=A.resource===i:o?A.active=A.consoleMessage===o:A.active=!1},[S,s,i,o]);const x=N.useCallback(A=>{if(m(void 0),!f.current)return;const L=A.clientX-f.current.getBoundingClientRect().left,C=Lt(u.width,e,L),M=l?ot(u.width,e,l.minimum):0,F=l?ot(u.width,e,l.maximum):0;l&&Math.abs(L-M)<10?h({startX:F,endX:L,type:"resize"}):l&&Math.abs(L-F)<10?h({startX:M,endX:L,type:"resize"}):l&&C>l.minimum&&C<l.maximum&&A.clientY-f.current.getBoundingClientRect().top<20?h({startX:M,endX:F,pivot:L,type:"move"}):h({startX:L,endX:L,type:"resize"})},[e,u,f,l]),_=N.useCallback(A=>{if(!f.current)return;const L=A.clientX-f.current.getBoundingClientRect().left,C=Lt(u.width,e,L),M=t==null?void 0:t.actions.findLast(Le=>Le.startTime<=C);if(!A.buttons){h(void 0);return}if(M&&r(M),!d)return;let F=d;if(d.type==="resize")F={...d,endX:L};else{const Le=L-d.pivot;let j=d.startX+Le,$=d.endX+Le;j<0&&(j=0,$=j+(d.endX-d.startX)),$>u.width&&($=u.width,j=$-(d.endX-d.startX)),F={...d,startX:j,endX:$,pivot:L}}h(F);const Z=Lt(u.width,e,F.startX),Be=Lt(u.width,e,F.endX);Z!==Be&&a({minimum:Math.min(Z,Be),maximum:Math.max(Z,Be)})},[e,d,u,t,r,f,a]),b=N.useCallback(()=>{if(m(void 0),!!d){if(d.startX!==d.endX){const A=Lt(u.width,e,d.startX),L=Lt(u.width,e,d.endX);a({minimum:Math.min(A,L),maximum:Math.max(A,L)})}else{const A=Lt(u.width,e,d.startX),L=t==null?void 0:t.actions.findLast(C=>C.startTime<=A);L&&r(L),a(void 0)}h(void 0)}},[e,d,u,t,a,r]),T=N.useCallback(A=>{if(!f.current)return;const L=A.clientX-f.current.getBoundingClientRect().left,C=Lt(u.width,e,L),M=t==null?void 0:t.actions.findLast(F=>F.startTime<=C);m({x:L,clientY:A.clientY,action:M,sdkLanguage:c})},[e,u,t,f,c]),E=N.useCallback(()=>{m(void 0)},[]),k=N.useCallback(()=>{a(void 0)},[a]);return p.jsxs("div",{style:{flex:"none",borderBottom:"1px solid var(--vscode-panel-border)"},children:[!!d&&p.jsx(Og,{cursor:(d==null?void 0:d.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:b,onPaneMouseMove:_,onPaneDoubleClick:k}),p.jsxs("div",{ref:f,className:"timeline-view",onMouseDown:x,onMouseMove:T,onMouseLeave:E,children:[p.jsx("div",{className:"timeline-grid",children:w.map((A,L)=>p.jsx("div",{className:"timeline-divider",style:{left:A.position+"px"},children:p.jsx("div",{className:"timeline-time",children:Pe(A.time-e.minimum)})},L))}),p.jsx("div",{style:{height:8}}),p.jsx(GE,{model:t,boundaries:e,previewPoint:v}),p.jsx("div",{className:"timeline-bars",children:S.map((A,L)=>p.jsx("div",{className:le("timeline-bar",A.action&&"action",A.resource&&"network",A.consoleMessage&&"console-message",A.active&&"active",A.error&&"error"),style:{left:A.leftPosition,width:Math.max(5,A.rightPosition-A.leftPosition),top:eb(A),bottom:0}},L))}),p.jsx("div",{className:"timeline-marker",style:{display:v!==void 0?"block":"none",left:((v==null?void 0:v.x)||0)+"px"}}),l&&p.jsxs("div",{className:"timeline-window",children:[p.jsx("div",{className:"timeline-window-curtain left",style:{width:y}}),p.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),p.jsx("div",{className:"timeline-window-center",children:p.jsx("div",{className:"timeline-window-drag"})}),p.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),p.jsx("div",{className:"timeline-window-curtain right",style:{width:g}})]})]})]})};function ZE(t,e){let r=t/64;const s=e.maximum-e.minimum,i=t/s;let o=s/r;const l=Math.ceil(Math.log(o)/Math.LN10);o=Math.pow(10,l),o*i>=5*64&&(o=o/5),o*i>=2*64&&(o=o/2);const a=e.minimum;let c=e.maximum;c+=64/i,r=Math.ceil((c-a)/o),o||(r=0);const u=[];for(let f=0;f<r;++f){const d=a+o*f;u.push({position:ot(t,e,d),time:d})}return u}function ot(t,e,n){return(n-e.minimum)/(e.maximum-e.minimum)*t}function Lt(t,e,n){return n/t*(e.maximum-e.minimum)+e.minimum}function eb(t){return t.resource?25:20}const tb=({model:t})=>{var n,r;if(!t)return p.jsx(p.Fragment,{});const e=t.wallTime!==void 0?new Date(t.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return p.jsxs("div",{"data-testid":"metadata-view",className:"vbox",style:{flexShrink:0},children:[p.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&p.jsxs("div",{className:"call-line",children:["start time:",p.jsx("span",{className:"call-value datetime",title:e,children:e})]}),p.jsxs("div",{className:"call-line",children:["duration:",p.jsx("span",{className:"call-value number",title:Pe(t.endTime-t.startTime),children:Pe(t.endTime-t.startTime)})]}),p.jsx("div",{className:"call-section",children:"Browser"}),p.jsxs("div",{className:"call-line",children:["engine:",p.jsx("span",{className:"call-value string",title:t.browserName,children:t.browserName})]}),t.channel&&p.jsxs("div",{className:"call-line",children:["channel:",p.jsx("span",{className:"call-value string",title:t.channel,children:t.channel})]}),t.platform&&p.jsxs("div",{className:"call-line",children:["platform:",p.jsx("span",{className:"call-value string",title:t.platform,children:t.platform})]}),t.options.userAgent&&p.jsxs("div",{className:"call-line",children:["user agent:",p.jsx("span",{className:"call-value datetime",title:t.options.userAgent,children:t.options.userAgent})]}),t.options.baseURL&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),p.jsxs("div",{className:"call-line",children:["baseURL:",p.jsx("a",{className:"call-value string",href:t.options.baseURL,title:t.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:t.options.baseURL})]})]}),p.jsx("div",{className:"call-section",children:"Viewport"}),t.options.viewport&&p.jsxs("div",{className:"call-line",children:["width:",p.jsx("span",{className:"call-value number",title:String(!!((n=t.options.viewport)!=null&&n.width)),children:t.options.viewport.width})]}),t.options.viewport&&p.jsxs("div",{className:"call-line",children:["height:",p.jsx("span",{className:"call-value number",title:String(!!((r=t.options.viewport)!=null&&r.height)),children:t.options.viewport.height})]}),p.jsxs("div",{className:"call-line",children:["is mobile:",p.jsx("span",{className:"call-value boolean",title:String(!!t.options.isMobile),children:String(!!t.options.isMobile)})]}),t.options.deviceScaleFactor&&p.jsxs("div",{className:"call-line",children:["device scale:",p.jsx("span",{className:"call-value number",title:String(t.options.deviceScaleFactor),children:String(t.options.deviceScaleFactor)})]}),p.jsx("div",{className:"call-section",children:"Counts"}),p.jsxs("div",{className:"call-line",children:["pages:",p.jsx("span",{className:"call-value number",children:t.pages.length})]}),p.jsxs("div",{className:"call-line",children:["actions:",p.jsx("span",{className:"call-value number",children:t.actions.length})]}),p.jsxs("div",{className:"call-line",children:["events:",p.jsx("span",{className:"call-value number",children:t.events.length})]})]})};async function Fa(t){const e=new Image;return t&&(e.src=t,await new Promise((n,r)=>{e.onload=n,e.onerror=n})),e}const Qc={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
|
|
236
|
-
linear-gradient(-45deg, #80808020 25%, transparent 25%),
|
|
237
|
-
linear-gradient(45deg, transparent 75%, #80808020 75%),
|
|
238
|
-
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,
|
|
239
|
-
rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
|
|
240
|
-
rgb(0 0 0 / 10%) 0px -2px 4px,
|
|
241
|
-
rgb(0 0 0 / 15%) 0px -6.1px 12px,
|
|
242
|
-
rgb(0 0 0 / 25%) 0px 6px 12px`},nb=({diff:t,noTargetBlank:e,hideDetails:n})=>{const[r,s]=N.useState(t.diff?"diff":"actual"),[i,o]=N.useState(!1),[l,a]=N.useState(null),[c,u]=N.useState("Expected"),[f,d]=N.useState(null),[h,v]=N.useState(null),[m,w]=Xn();N.useEffect(()=>{(async()=>{var k,A,L,C;a(await Fa((k=t.expected)==null?void 0:k.attachment.path)),u(((A=t.expected)==null?void 0:A.title)||"Expected"),d(await Fa((L=t.actual)==null?void 0:L.attachment.path)),v(await Fa((C=t.diff)==null?void 0:C.attachment.path))})()},[t]);const y=l&&f&&h,g=y?Math.max(l.naturalWidth,f.naturalWidth,200):500,S=y?Math.max(l.naturalHeight,f.naturalHeight,200):500,x=Math.min(1,(m.width-30)/g),_=Math.min(1,(m.width-50)/g/2),b=g*x,T=S*x,E={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return p.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:w,children:y&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[t.diff&&p.jsx("div",{style:{...E,fontWeight:r==="diff"?600:"initial"},onClick:()=>s("diff"),children:"Diff"}),p.jsx("div",{style:{...E,fontWeight:r==="actual"?600:"initial"},onClick:()=>s("actual"),children:"Actual"}),p.jsx("div",{style:{...E,fontWeight:r==="expected"?600:"initial"},onClick:()=>s("expected"),children:c}),p.jsx("div",{style:{...E,fontWeight:r==="sxs"?600:"initial"},onClick:()=>s("sxs"),children:"Side by side"}),p.jsx("div",{style:{...E,fontWeight:r==="slider"?600:"initial"},onClick:()=>s("slider"),children:"Slider"})]}),p.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:T+60},children:[t.diff&&r==="diff"&&p.jsx(Bt,{image:h,alt:"Diff",hideSize:n,canvasWidth:b,canvasHeight:T,scale:x}),t.diff&&r==="actual"&&p.jsx(Bt,{image:f,alt:"Actual",hideSize:n,canvasWidth:b,canvasHeight:T,scale:x}),t.diff&&r==="expected"&&p.jsx(Bt,{image:l,alt:c,hideSize:n,canvasWidth:b,canvasHeight:T,scale:x}),t.diff&&r==="slider"&&p.jsx(rb,{expectedImage:l,actualImage:f,hideSize:n,canvasWidth:b,canvasHeight:T,scale:x,expectedTitle:c}),t.diff&&r==="sxs"&&p.jsxs("div",{style:{display:"flex"},children:[p.jsx(Bt,{image:l,title:c,hideSize:n,canvasWidth:_*g,canvasHeight:_*S,scale:_}),p.jsx(Bt,{image:i?h:f,title:i?"Diff":"Actual",onClick:()=>o(!i),hideSize:n,canvasWidth:_*g,canvasHeight:_*S,scale:_})]}),!t.diff&&r==="actual"&&p.jsx(Bt,{image:f,title:"Actual",hideSize:n,canvasWidth:b,canvasHeight:T,scale:x}),!t.diff&&r==="expected"&&p.jsx(Bt,{image:l,title:c,hideSize:n,canvasWidth:b,canvasHeight:T,scale:x}),!t.diff&&r==="sxs"&&p.jsxs("div",{style:{display:"flex"},children:[p.jsx(Bt,{image:l,title:c,canvasWidth:_*g,canvasHeight:_*S,scale:_}),p.jsx(Bt,{image:f,title:"Actual",canvasWidth:_*g,canvasHeight:_*S,scale:_})]})]}),!n&&p.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[p.jsx("div",{children:t.diff&&p.jsx("a",{target:"_blank",href:t.diff.attachment.path,rel:"noreferrer",children:t.diff.attachment.name})}),p.jsx("div",{children:p.jsx("a",{target:e?"":"_blank",href:t.actual.attachment.path,rel:"noreferrer",children:t.actual.attachment.name})}),p.jsx("div",{children:p.jsx("a",{target:e?"":"_blank",href:t.expected.attachment.path,rel:"noreferrer",children:t.expected.attachment.name})})]})]})})},rb=({expectedImage:t,actualImage:e,canvasWidth:n,canvasHeight:r,scale:s,expectedTitle:i,hideSize:o})=>{const l={position:"absolute",top:0,left:0},[a,c]=N.useState(n/2),u=t.naturalWidth===e.naturalWidth&&t.naturalHeight===e.naturalHeight;return p.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!o&&p.jsxs("div",{style:{margin:5},children:[!u&&p.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),p.jsx("span",{children:t.naturalWidth}),p.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),p.jsx("span",{children:t.naturalHeight}),!u&&p.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!u&&p.jsx("span",{children:e.naturalWidth}),!u&&p.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!u&&p.jsx("span",{children:e.naturalHeight})]}),p.jsxs("div",{style:{position:"relative",width:n,height:r,margin:15,...Qc},children:[p.jsx($g,{orientation:"horizontal",offsets:[a],setOffsets:f=>c(f[0]),resizerColor:"#57606a80",resizerWidth:6}),p.jsx("img",{alt:i,style:{width:t.naturalWidth*s,height:t.naturalHeight*s},draggable:"false",src:t.src}),p.jsx("div",{style:{...l,bottom:0,overflow:"hidden",width:a,...Qc},children:p.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*s,height:e.naturalHeight*s},draggable:"false",src:e.src})})]})]})},Bt=({image:t,title:e,alt:n,hideSize:r,canvasWidth:s,canvasHeight:i,scale:o,onClick:l})=>p.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&p.jsxs("div",{style:{margin:5},children:[e&&p.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),p.jsx("span",{children:t.naturalWidth}),p.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),p.jsx("span",{children:t.naturalHeight})]}),p.jsx("div",{style:{display:"flex",flex:"none",width:s,height:i,margin:15,...Qc},children:p.jsx("img",{width:t.naturalWidth*o,height:t.naturalHeight*o,alt:e||n,style:{cursor:l?"pointer":"initial"},draggable:"false",src:t.src,onClick:l})})]});function sb(t){return!!t.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const ib=({title:t,children:e,setExpanded:n,expanded:r,expandOnTitleClick:s})=>{const i=N.useId();return p.jsxs("div",{className:le("expandable",r&&"expanded"),children:[p.jsxs("div",{role:"button","aria-expanded":r,"aria-controls":i,className:"expandable-title",onClick:()=>s&&n(!r),children:[p.jsx("div",{className:le("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:()=>!s&&n(!r)}),t]}),r&&p.jsx("div",{id:i,role:"region",style:{marginLeft:25},children:e})]})};function F0(t){const e=[];let n=0,r;for(;(r=Jh.exec(t))!==null;){const i=t.substring(n,r.index);i&&e.push(i);const o=r[0];e.push(ob(o)),n=r.index+o.length}const s=t.substring(n);return s&&e.push(s),e}function ob(t){let e=t;return e.startsWith("www.")&&(e="https://"+e),p.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})}const lb=({attachment:t,reveal:e})=>{const[n,r]=N.useState(!1),[s,i]=N.useState(null),[o,l]=N.useState(null),[a,c]=bv(),u=N.useRef(null),f=sb(t.contentType),d=!!t.sha1||!!t.path;N.useEffect(()=>{var m;if(e)return(m=u.current)==null||m.scrollIntoView({behavior:"smooth"}),c()},[e,c]),N.useEffect(()=>{n&&s===null&&o===null&&(l("Loading ..."),fetch(Tf(t)).then(m=>m.text()).then(m=>{i(m),l(null)}).catch(m=>{l("Failed to load: "+m.message)}))},[n,s,o,t]);const h=N.useMemo(()=>{const m=s?s.split(`
|
|
243
|
-
`).length:0;return Math.min(Math.max(5,m),20)*GS},[s]),v=p.jsxs("span",{style:{marginLeft:5},ref:u,"aria-label":t.name,children:[p.jsx("span",{children:F0(t.name)}),d&&p.jsx("a",{style:{marginLeft:5},href:_o(t),children:"download"})]});return!f||!d?p.jsx("div",{style:{marginLeft:20},children:v}):p.jsxs("div",{className:le(a&&"yellow-flash"),children:[p.jsx(ib,{title:v,expanded:n,setExpanded:r,expandOnTitleClick:!0,children:o&&p.jsx("i",{children:o})}),n&&s!==null&&p.jsx("div",{className:"vbox",style:{height:h},children:p.jsx(Wr,{text:s,readOnly:!0,mimeType:t.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},ab=({model:t,revealedAttachment:e})=>{const{diffMap:n,screenshots:r,attachments:s}=N.useMemo(()=>{const i=new Set,o=new Set;for(const a of(t==null?void 0:t.actions)||[]){const c=a.context.traceUrl;for(const u of a.attachments||[])i.add({...u,traceUrl:c})}const l=new Map;for(const a of i){if(!a.path&&!a.sha1)continue;const c=a.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(c){const u=c[1],f=c[2],d=l.get(u)||{expected:void 0,actual:void 0,diff:void 0};d[f]=a,l.set(u,d),i.delete(a)}else a.contentType.startsWith("image/")&&(o.add(a),i.delete(a))}return{diffMap:l,attachments:i,screenshots:o}},[t]);return!n.size&&!r.size&&!s.size?p.jsx(Yn,{text:"No attachments"}):p.jsxs("div",{className:"attachments-tab",children:[[...n.values()].map(({expected:i,actual:o,diff:l})=>p.jsxs(p.Fragment,{children:[i&&o&&p.jsx("div",{className:"attachments-section",children:"Image diff"}),i&&o&&p.jsx(nb,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...i,path:_o(i)},title:"Expected"},actual:{attachment:{...o,path:_o(o)}},diff:l?{attachment:{...l,path:_o(l)}}:void 0}})]})),r.size?p.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((i,o)=>{const l=Tf(i);return p.jsxs("div",{className:"attachment-item",children:[p.jsx("div",{children:p.jsx("img",{draggable:"false",src:l})}),p.jsx("div",{children:p.jsx("a",{target:"_blank",href:l,rel:"noreferrer",children:i.name})})]},`screenshot-${o}`)}),s.size?p.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...s.values()].map((i,o)=>p.jsx("div",{className:"attachment-item",children:p.jsx(lb,{attachment:i,reveal:e&&cb(i,e[0])?e:void 0})},ub(i,o)))]})};function cb(t,e){return t.name===e.name&&t.path===e.path&&t.sha1===e.sha1}function Tf(t,e={}){const n=new URLSearchParams(e);return t.sha1?(n.set("trace",t.traceUrl),"sha1/"+t.sha1+"?"+n.toString()):(n.set("path",t.path),"file?"+n.toString())}function _o(t){const e={dn:t.name};return t.contentType&&(e.dct=t.contentType),Tf(t,e)}function ub(t,e){return e+"-"+(t.sha1?"sha1-"+t.sha1:"path-"+t.path)}const fb=({annotations:t})=>t.length?p.jsx("div",{className:"annotations-tab",children:t.map((e,n)=>p.jsxs("div",{className:"annotation-item",children:[p.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&p.jsxs("span",{children:[": ",F0(e.description)]})]},`annotation-${n}`))}):p.jsx(Yn,{text:"No annotations"}),db=({sdkLanguage:t,setIsInspecting:e,highlightedElement:n,setHighlightedElement:r})=>{const[s,i]=N.useState(),o=N.useCallback(l=>{const{errors:a}=cf(M0,l,{prettyErrors:!1}),c=a.map(u=>({message:u.message,line:u.range[1].line,column:u.range[1].col,type:"subtle-error"}));i(c),r({...n,ariaSnapshot:l,lastEdited:"ariaSnapshot"}),e(!1)},[n,r,e]);return p.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[p.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[p.jsx("div",{style:{flex:"auto"},children:"Locator"}),p.jsx(Tt,{icon:"files",title:"Copy locator",onClick:()=>{$f(n.locator||"")}})]}),p.jsx("div",{style:{height:50},children:p.jsx(Wr,{text:n.locator||"",language:t,isFocused:!0,wrapLines:!0,onChange:l=>{r({...n,locator:l,lastEdited:"locator"}),e(!1)}})}),p.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[p.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),p.jsx(Tt,{icon:"files",title:"Copy snapshot",onClick:()=>{$f(n.ariaSnapshot||"")}})]}),p.jsx("div",{style:{height:150},children:p.jsx(Wr,{text:n.ariaSnapshot||"",language:"yaml",wrapLines:!1,highlight:s,onChange:o})})]})},Sb=({model:t,showSourcesFirst:e,rootDir:n,fallbackLocation:r,isLive:s,hideTimeline:i,status:o,annotations:l,inert:a,onOpenExternally:c,revealSource:u})=>{var If;const[f,d]=N.useState(void 0),[h,v]=N.useState(void 0),[m,w]=N.useState(void 0),[y,g]=N.useState(),[S,x]=N.useState(),[_,b]=N.useState(),[T,E]=N.useState("actions"),[k,A]=Dr("propertiesTab",e?"source":"call"),[L,C]=N.useState(!1),[M,F]=N.useState({lastEdited:"none"}),[Z,Be]=N.useState(),[Le,j]=Dr("propertiesSidebarLocation","bottom"),$=N.useCallback(P=>{d(P==null?void 0:P.callId),v(void 0)},[]),D=N.useMemo(()=>t==null?void 0:t.actions.find(P=>P.callId===y),[t,y]),q=N.useCallback(P=>{g(P==null?void 0:P.callId)},[]),ce=N.useMemo(()=>(t==null?void 0:t.sources)||new Map,[t]);N.useEffect(()=>{Be(void 0),v(void 0)},[t]);const Rt=N.useMemo(()=>{if(f){const tn=t==null?void 0:t.actions.find(Dt=>Dt.callId===f);if(tn)return tn}const P=t==null?void 0:t.failedAction();if(P)return P;if(t!=null&&t.actions.length){let tn=t.actions.length-1;for(let Dt=0;Dt<t.actions.length;++Dt)if(t.actions[Dt].apiName==="After Hooks"&&Dt){tn=Dt-1;break}return t.actions[tn]}},[t,f]),Ie=N.useMemo(()=>D||Rt,[Rt,D]),as=N.useMemo(()=>h?h.stack:Ie==null?void 0:Ie.stack,[Ie,h]),Ct=N.useCallback(P=>{$(P),q(void 0)},[$,q]),ke=N.useCallback(P=>{A(P),P!=="inspector"&&C(!1)},[A]),Nf=N.useCallback(P=>{!L&&P&&ke("inspector"),C(P)},[C,ke,L]),z0=N.useCallback(P=>{F(P),ke("inspector")},[ke]),B0=N.useCallback(P=>{ke("attachments"),w(tn=>{if(!tn)return[P,0];const Dt=tn[1];return[P,Dt+1]})},[ke]);N.useEffect(()=>{u&&ke("source")},[u,ke]);const Hl=US(t,Z),Cf=xx(t,Z),Af=FS(t),U0=N.useMemo(()=>(t==null?void 0:t.actions.map(P=>P.attachments||[]).flat())||[],[t]),nr=(t==null?void 0:t.sdkLanguage)||"javascript",H0={id:"inspector",title:"Locator",render:()=>p.jsx(db,{sdkLanguage:nr,setIsInspecting:Nf,highlightedElement:M,setHighlightedElement:F})},V0={id:"call",title:"Call",render:()=>p.jsx(MS,{action:Ie,startTimeOffset:(t==null?void 0:t.startTime)??0,sdkLanguage:nr})},q0={id:"log",title:"Log",render:()=>p.jsx($S,{action:Ie,isLive:s})},W0={id:"errors",title:"Errors",errorCount:Af.errors.size,render:()=>p.jsx(zS,{errorsModel:Af,sdkLanguage:nr,revealInSource:P=>{P.action?$(P.action):v(P),ke("source")}})};let Lf;!Rt&&r&&(Lf=(If=r.source)==null?void 0:If.errors.length);const Vl={id:"source",title:"Source",errorCount:Lf,render:()=>p.jsx(WE,{stack:as,sources:ce,rootDir:n,stackFrameLocation:Le==="bottom"?"right":"bottom",fallbackLocation:r,onOpenExternally:c})},K0={id:"console",title:"Console",count:Hl.entries.length,render:()=>p.jsx(HS,{consoleModel:Hl,boundaries:ql,selectedTime:Z,onAccepted:P=>Be({minimum:P.timestamp,maximum:P.timestamp}),onEntryHovered:b})},Q0={id:"network",title:"Network",count:Cf.resources.length,render:()=>p.jsx(_x,{boundaries:ql,networkModel:Cf,onEntryHovered:x,sdkLanguage:(t==null?void 0:t.sdkLanguage)??"javascript"})},X0={id:"attachments",title:"Attachments",count:U0.length,render:()=>p.jsx(ab,{model:t,revealedAttachment:m})},cs=[H0,V0,q0,W0,K0,Q0,Vl,X0];if(l!==void 0){const P={id:"annotations",title:"Annotations",count:l.length,render:()=>p.jsx(fb,{annotations:l})};cs.push(P)}if(e){const P=cs.indexOf(Vl);cs.splice(P,1),cs.splice(1,0,Vl)}const{boundaries:ql}=N.useMemo(()=>{const P={minimum:(t==null?void 0:t.startTime)||0,maximum:(t==null?void 0:t.endTime)||3e4};return P.minimum>P.maximum&&(P.minimum=0,P.maximum=3e4),P.maximum+=(P.maximum-P.minimum)/20,{boundaries:P}},[t]);let ki=0;!s&&t&&t.endTime>=0?ki=t.endTime-t.startTime:t&&t.wallTime&&(ki=Date.now()-t.wallTime);const G0={id:"actions",title:"Actions",component:p.jsxs("div",{className:"vbox",children:[o&&p.jsxs("div",{className:"workbench-run-status",children:[p.jsx("span",{className:le("codicon",Cg(o))}),p.jsx("div",{children:bS(o)}),p.jsx("div",{className:"spacer"}),p.jsx("div",{className:"workbench-run-duration",children:ki?Pe(ki):""})]}),p.jsx(NS,{sdkLanguage:nr,actions:(t==null?void 0:t.actions)||[],selectedAction:t?Rt:void 0,selectedTime:Z,setSelectedTime:Be,onSelected:Ct,onHighlighted:q,revealAttachment:B0,revealConsole:()=>ke("console"),isLive:s})]})},J0={id:"metadata",title:"Metadata",component:p.jsx(tb,{model:t})};return p.jsxs("div",{className:"vbox workbench",...a?{inert:"true"}:{},children:[!i&&p.jsx(YE,{model:t,consoleEntries:Hl.entries,boundaries:ql,highlightedAction:D,highlightedEntry:S,highlightedConsoleEntry:_,onSelected:Ct,sdkLanguage:nr,selectedTime:Z,setSelectedTime:Be}),p.jsx(Qo,{sidebarSize:250,orientation:Le==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:p.jsx(Qo,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:p.jsx($E,{action:Ie,model:t,sdkLanguage:nr,testIdAttributeName:(t==null?void 0:t.testIdAttributeName)||"data-testid",isInspecting:L,setIsInspecting:Nf,highlightedElement:M,setHighlightedElement:z0}),sidebar:p.jsx(Pc,{tabs:[G0,J0],selectedTab:T,setSelectedTab:E})}),sidebar:p.jsx(Pc,{tabs:cs,selectedTab:k,setSelectedTab:ke,rightToolbar:[Le==="bottom"?p.jsx(Tt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{j("right")}}):p.jsx(Tt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{j("bottom")}})],mode:Le==="bottom"?"default":"select"})})]})};var Dh;(t=>{function e(n){for(const r of n.splice(0))r.dispose()}t.disposeAll=e})(Dh||(Dh={}));class Es{constructor(){this._listeners=new Set,this.event=(e,n)=>{this._listeners.add(e);let r=!1;const s=this,i={dispose(){r||(r=!0,s._listeners.delete(e))}};return n&&n.push(i),i}}fire(e){const n=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const r of this._listeners)this._deliveryQueue.push({listener:r,event:e});if(n){for(let r=0;r<this._deliveryQueue.length;r++){const{listener:s,event:i}=this._deliveryQueue[r];s.call(null,i)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class xb{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",n=>e(n.data))}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 _b{constructor(e){this._onCloseEmitter=new Es,this._onReportEmitter=new Es,this._onStdioEmitter=new Es,this._onTestFilesChangedEmitter=new Es,this._onLoadTraceRequestedEmitter=new Es,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this._transport=e,this._transport.onmessage(r=>{const s=JSON.parse(r),{id:i,result:o,error:l,method:a,params:c}=s;if(i){const u=this._callbacks.get(i);if(!u)return;this._callbacks.delete(i),l?u.reject(new Error(l)):u.resolve(o)}else this._dispatchEvent(a,c)});const n=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((r,s)=>{this._transport.onopen(r),this._transport.onerror(s)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(n)})}isClosed(){return this._isClosed}async _sendMessage(e,n){const r=globalThis.__logForTest;r==null||r({method:e,params:n}),await this._connectedPromise;const s=++this._lastId,i={id:s,method:e,params:n};return this._transport.send(JSON.stringify(i)),new Promise((o,l)=>{this._callbacks.set(s,{resolve:o,reject:l})})}_sendMessageNoReply(e,n){this._sendMessage(e,n).catch(()=>{})}_dispatchEvent(e,n){e==="report"?this._onReportEmitter.fire(n):e==="stdio"?this._onStdioEmitter.fire(n):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(n):e==="loadTraceRequested"&&this._onLoadTraceRequestedEmitter.fire(n)}async initialize(e){await this._sendMessage("initialize",e)}async ping(e){await this._sendMessage("ping",e)}async pingNoReply(e){this._sendMessageNoReply("ping",e)}async watch(e){await this._sendMessage("watch",e)}watchNoReply(e){this._sendMessageNoReply("watch",e)}async open(e){await this._sendMessage("open",e)}openNoReply(e){this._sendMessageNoReply("open",e)}async resizeTerminal(e){await this._sendMessage("resizeTerminal",e)}resizeTerminalNoReply(e){this._sendMessageNoReply("resizeTerminal",e)}async checkBrowsers(e){return await this._sendMessage("checkBrowsers",e)}async installBrowsers(e){await this._sendMessage("installBrowsers",e)}async runGlobalSetup(e){return await this._sendMessage("runGlobalSetup",e)}async runGlobalTeardown(e){return await this._sendMessage("runGlobalTeardown",e)}async startDevServer(e){return await this._sendMessage("startDevServer",e)}async stopDevServer(e){return await this._sendMessage("stopDevServer",e)}async clearCache(e){return await this._sendMessage("clearCache",e)}async listFiles(e){return await this._sendMessage("listFiles",e)}async listTests(e){return await this._sendMessage("listTests",e)}async runTests(e){return await this._sendMessage("runTests",e)}async findRelatedTestFiles(e){return await this._sendMessage("findRelatedTestFiles",e)}async stopTests(e){await this._sendMessage("stopTests",e)}stopTestsNoReply(e){this._sendMessageNoReply("stopTests",e)}async closeGracefully(e){await this._sendMessage("closeGracefully",e)}close(){try{this._transport.close()}catch{}}}const hb=({settings:t})=>p.jsx("div",{className:"vbox settings-view",children:t.map(({value:e,set:n,name:r,title:s})=>{const i=`setting-${r}`;return p.jsxs("div",{className:"setting",title:s,children:[p.jsx("input",{type:"checkbox",id:i,checked:e,onChange:()=>n(!e)}),p.jsx("label",{htmlFor:i,children:r})]},r)})}),kb=()=>{const[t,e]=Dr("shouldPopulateCanvasFromScreenshot",!1),[n,r]=Nv();return p.jsx(hb,{settings:[{value:n,set:r,name:"Dark mode"},{value:t,set:e,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{kb as D,ib as E,wb as M,tt as R,Qo as S,Tt as T,xb as W,XS as _,_b as a,Sb as b,gb as c,j1 as d,za as e,yb as f,vb as g,le as h,Wu as i,p as j,kS as k,Dr as l,Pe as m,ev as n,mb as o,N as r,jn as s,Cg as t,Xn as u};
|