267 lines
626 KiB
JavaScript
267 lines
626 KiB
JavaScript
|
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-a5XoALAZ.js","../codeMirrorModule.DYBRYzYX.css"])))=>i.map(i=>d[i]);
|
|||
|
|
var rx=Object.defineProperty;var ax=(n,e,i)=>e in n?rx(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var Ma=(n,e,i)=>ax(n,typeof e!="symbol"?e+"":e,i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function lx(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var th={exports:{}},Oa={};/**
|
|||
|
|
* @license React
|
|||
|
|
* react-jsx-runtime.production.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var Hy;function ox(){if(Hy)return Oa;Hy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(r,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:n,type:r,key:u,ref:l!==void 0?l:null,props:o}}return Oa.Fragment=e,Oa.jsx=i,Oa.jsxs=i,Oa}var qy;function cx(){return qy||(qy=1,th.exports=ox()),th.exports}var S=cx(),nh={exports:{}},fe={};/**
|
|||
|
|
* @license React
|
|||
|
|
* react.production.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var $y;function ux(){if($y)return fe;$y=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),w=Symbol.iterator;function v(k){return k===null||typeof k!="object"?null:(k=w&&k[w]||k["@@iterator"],typeof k=="function"?k:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function N(k,Y,Z){this.props=k,this.context=Y,this.refs=_,this.updater=Z||E}N.prototype.isReactComponent={},N.prototype.setState=function(k,Y){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,Y,"setState")},N.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function C(){}C.prototype=N.prototype;function $(k,Y,Z){this.props=k,this.context=Y,this.refs=_,this.updater=Z||E}var I=$.prototype=new C;I.constructor=$,x(I,N.prototype),I.isPureReactComponent=!0;var D=Array.isArray;function K(){}var Q={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function j(k,Y,Z){var ee=Z.ref;return{$$typeof:n,type:k,key:Y,ref:ee!==void 0?ee:null,props:Z}}function ne(k,Y){return j(k.type,Y,k.props)}function le(k){return typeof k=="object"&&k!==null&&k.$$typeof===n}function V(k){var Y={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(Z){return Y[Z]})}var J=/\/+/g;function W(k,Y){return typeof k=="object"&&k!==null&&k.key!=null?V(""+k.key):Y.toString(36)}function Ae(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(K,K):(k.status="pending",k.then(function(Y){k.status==="pending"&&(k.status="fulfilled",k.value=Y)},function(Y){k.status==="pending"&&(k.status="rejected",k.reason=Y)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function B(k,Y,Z,ee,ue){var re=typeof k;(re==="undefined"||re==="boolean")&&(k=null);var xe=!1;if(k===null)xe=!0;else switch(re){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(k.$$typeof){case n:case e:xe=!0;break;case y:return xe=k._init,B(xe(k._payload),Y,Z,ee,ue)}}if(xe)return ue=ue(k),xe=ee===""?"."+W(k,0):ee,D(ue)?(Z="",xe!=null&&(Z=xe.replace(J,"$&/")+"/"),B(ue,Y,Z,"",function(Bi){return Bi})):ue!=null&&(le(ue)&&(ue=ne(ue,Z+(ue.key==null||k&&k.key===ue.key?"":(""+ue.key).replace(J,"$&/")+"/")+xe)),Y.push(ue)),1;xe=0;var tt=ee===""?".":ee+":";if(D(k))for(var Re=0;Re<k.length;Re++)ee=k[Re],re=tt+W(ee,Re),xe+=B(ee,Y,Z,re,ue);else if(Re=v(k),typeof Re=="function")for(k=Re.call(k),Re=0;!(ee=k.next()).done;)ee=ee.value,re=tt+W(ee,Re++),xe+=B(ee,Y,Z,re,ue);else if(re==="object"){if(typeof k.then=="function")return B(Ae(k),Y,Z,ee,ue);throw Y=String(k),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return xe}function P(k,Y,Z){if(k==null)return k;var ee=[],ue=0;return B(k,ee,"","",function(re){return Y.call(Z,re,ue++)}),ee}function se(k){if(k._status===-1){var Y=k._result;Y=Y(),Y.then(function(Z){(k._status===0||k._status===-1)&&(k._status=1,k._result=Z)},function(Z){(k._status===0||k._status===-1)&&(k._status=2,k._result=Z)}),k._status===-1&&(k._status=0,k._result=Y)}if(k._status===1)return k._result.default;throw k._result}var Se=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!win
|
|||
|
|
* @license React
|
|||
|
|
* scheduler.production.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var Ky;function vx(){return Ky||(Ky=1,(function(n){function e(B,P){var se=B.length;B.push(P);e:for(;0<se;){var Se=se-1>>>1,we=B[Se];if(0<l(we,P))B[Se]=P,B[se]=we,se=Se;else break e}}function i(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var P=B[0],se=B.pop();if(se!==P){B[0]=se;e:for(var Se=0,we=B.length,k=we>>>1;Se<k;){var Y=2*(Se+1)-1,Z=B[Y],ee=Y+1,ue=B[ee];if(0>l(Z,se))ee<we&&0>l(ue,Z)?(B[Se]=ue,B[ee]=se,Se=ee):(B[Se]=Z,B[Y]=se,Se=Y);else if(ee<we&&0>l(ue,se))B[Se]=ue,B[ee]=se,Se=ee;else break e}}return P}function l(B,P){var se=B.sortIndex-P.sortIndex;return se!==0?se:B.id-P.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,f=u.now();n.unstable_now=function(){return u.now()-f}}var h=[],g=[],y=1,m=null,w=3,v=!1,E=!1,x=!1,_=!1,N=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function I(B){for(var P=i(g);P!==null;){if(P.callback===null)r(g);else if(P.startTime<=B)r(g),P.sortIndex=P.expirationTime,e(h,P);else break;P=i(g)}}function D(B){if(x=!1,I(B),!E)if(i(h)!==null)E=!0,K||(K=!0,V());else{var P=i(g);P!==null&&Ae(D,P.startTime-B)}}var K=!1,Q=-1,q=5,j=-1;function ne(){return _?!0:!(n.unstable_now()-j<q)}function le(){if(_=!1,K){var B=n.unstable_now();j=B;var P=!0;try{e:{E=!1,x&&(x=!1,C(Q),Q=-1),v=!0;var se=w;try{t:{for(I(B),m=i(h);m!==null&&!(m.expirationTime>B&&ne());){var Se=m.callback;if(typeof Se=="function"){m.callback=null,w=m.priorityLevel;var we=Se(m.expirationTime<=B);if(B=n.unstable_now(),typeof we=="function"){m.callback=we,I(B),P=!0;break t}m===i(h)&&r(h),I(B)}else r(h);m=i(h)}if(m!==null)P=!0;else{var k=i(g);k!==null&&Ae(D,k.startTime-B),P=!1}}break e}finally{m=null,w=se,v=!1}P=void 0}}finally{P?V():K=!1}}}var V;if(typeof $=="function")V=function(){$(le)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,W=J.port2;J.port1.onmessage=le,V=function(){W.postMessage(null)}}else V=function(){N(le,0)};function Ae(B,P){Q=N(function(){B(n.unstable_now())},P)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(B){B.callback=null},n.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<B?Math.floor(1e3/B):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(B){switch(w){case 1:case 2:case 3:var P=3;break;default:P=w}var se=w;w=P;try{return B()}finally{w=se}},n.unstable_requestPaint=function(){_=!0},n.unstable_runWithPriority=function(B,P){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var se=w;w=B;try{return P()}finally{w=se}},n.unstable_scheduleCallback=function(B,P,se){var Se=n.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?Se+se:Se):se=Se,B){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=se+we,B={id:y++,callback:P,priorityLevel:B,startTime:se,expirationTime:we,sortIndex:-1},se>Se?(B.sortIndex=se,e(g,B),i(h)===null&&B===i(g)&&(x?(C(Q),Q=-1):x=!0,Ae(D,se-Se))):(B.sortIndex=we,e(h,B),E||v||(E=!0,K||(K=!0,V()))),B},n.unstable_shouldYield=ne,n.unstable_wrapCallback=function(B){var P=w;return function(){var se=w;w=P;try{return B.apply(this,arguments)}finally{w=se}}}})(rh)),rh}var Yy;function Sx(){return Yy||(Yy=1,sh.exports=vx()),sh.exports}var ah={exports:{}},yt={};/**
|
|||
|
|
* @license React
|
|||
|
|
* react-dom.production.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var Xy;function wx(){if(Xy)return yt;Xy=1;var n=Xh();function e(h){var g="https://react.dev/errors/"+h;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},l=Symbol.for("react.portal");function o(h,g,y){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:m==null?null:""+m,children:h,containerInfo:g,implementation:y}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,yt.createPortal=function(h,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(e(299));return o(h,g,null,y)},yt.flushSync=function(h){var g=u.T,y=r.p;try{if(u.T=null,r.p=2,h)return h()}finally{u.T=g,r.p=y,r.d.f()}},yt.preconnect=function(h,g){typeof h=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(h,g))},yt.prefetchDNS=function(h){typeof h=="string"&&r.d.D(h)},yt.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var y=g.as,m=f(y,g.crossOrigin),w=typeof g.integrity=="string"?g.integrity:void 0,v=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?r.d.S(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:m,integrity:w,fetchPriority:v}):y==="script"&&r.d.X(h,{crossOrigin:m,integrity:w,fetchPriority:v,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},yt.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=f(g.as,g.crossOrigin);r.d.M(h,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(h)},yt.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,m=f(y,g.crossOrigin);r.d.L(h,y,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},yt.preloadModule=function(h,g){if(typeof h=="string")if(g){var y=f(g.as,g.crossOrigin);r.d.m(h,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(h)},yt.requestFormReset=function(h){r.d.r(h)},yt.unstable_batchedUpdates=function(h,g){return h(g)},yt.useFormState=function(h,g,y){return u.H.useFormState(h,g,y)},yt.useFormStatus=function(){return u.H.useHostTransitionStatus()},yt.version="19.2.1",yt}var Fy;function xx(){if(Fy)return ah.exports;Fy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),ah.exports=wx(),ah.exports}/**
|
|||
|
|
* @license React
|
|||
|
|
* react-dom-client.production.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var Qy;function _x(){if(Qy)return ja;Qy=1;var n=Sx(),e=Xh(),i=xx();function r(t){var s="https://react.dev/errors/"+t;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var s=t,a=t;if(t.alternate)for(;s.return;)s=s.return;else{t=s;do s=t,(s.flags&4098)!==0&&(a=s.return),t=s.return;while(t)}return s.tag===3?a:null}function u(t){if(t.tag===13){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function f(t){if(t.tag===31){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function h(t){if(o(t)!==t)throw Error(r(188))}function g(t){var s=t.alternate;if(!s){if(s=o(t),s===null)throw Error(r(188));return s!==t?null:t}for(var a=t,c=s;;){var d=a.return;if(d===null)break;var p=d.alternate;if(p===null){if(c=d.return,c!==null){a=c;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===a)return h(d),t;if(p===c)return h(d),s;p=p.sibling}throw Error(r(188))}if(a.return!==c.return)a=d,c=p;else{for(var b=!1,T=d.child;T;){if(T===a){b=!0,a=d,c=p;break}if(T===c){b=!0,c=d,a=p;break}T=T.sibling}if(!b){for(T=p.child;T;){if(T===a){b=!0,a=p,c=d;break}if(T===c){b=!0,c=p,a=d;break}T=T.sibling}if(!b)throw Error(r(189))}}if(a.alternate!==c)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?t:s}function y(t){var s=t.tag;if(s===5||s===26||s===27||s===6)return t;for(t=t.child;t!==null;){if(s=y(t),s!==null)return s;t=t.sibling}return null}var m=Object.assign,w=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),$=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function V(t){return t===null||typeof t!="object"?null:(t=le&&t[le]||t["@@iterator"],typeof t=="function"?t:null)}var J=Symbol.for("react.client.reference");function W(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===J?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case x:return"Fragment";case N:return"Profiler";case _:return"StrictMode";case D:return"Suspense";case K:return"SuspenseList";case j:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case E:return"Portal";case $:return t.displayName||"Context";case C:return(t._context.displayName||"Context")+".Consumer";case I:var s=t.render;return t=t.displayName,t||(t=s.displayName||s.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Q:return s=t.displayName||null,s!==null?s:W(t.type)||"Memo";case q:s=t._payload,t=t._init;try{return W(t(s))}catch{}}return null}var Ae=Array.isArray,B=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},Se=[],we=-1;function k(t){return{current:t}}function Y(t){0>we||(t.current=Se[we],Se[we]=null,we--)}function Z(t,s){we++,Se[we]=t.current,t.current=s}var ee=k(null),ue=k(null),re=k(null),xe=k(null);function tt(t,s){switch(Z(re,s),Z(ue,t),Z(ee,null),s.nodeType){case 9:case 11:t=(t=s.documentElement)&&(t=t.namespaceURI)?oy(t):0;break;default:if(t=s.tagName,s=s.namespaceURI)s=oy(s),t=cy(s,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Y(ee),Z(ee,t)}function Re(){Y(ee),Y(ue),Y(re)}function Bi(t){t.memoizedState!==null&&Z(xe,t);var s=ee.current,a=cy(s,t.type);s!==a&&(Z(ue,t),Z(ee,a))}function
|
|||
|
|
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|||
|
|
`+hn+t+Dr}var vs=!1;function zr(t,s){if(!t||vs)return"";vs=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(s){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(H){var z=H}Reflect.construct(t,[],F)}else{try{F.call()}catch(H){z=H}t.call(F.prototype)}}else{try{throw Error()}catch(H){z=H}(F=t())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(H){if(H&&z&&typeof H.stack=="string")return[H.stack,z.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=c.DetermineComponentFrameRoot(),b=p[0],T=p[1];if(b&&T){var A=b.split(`
|
|||
|
|
`),R=T.split(`
|
|||
|
|
`);for(d=c=0;c<A.length&&!A[c].includes("DetermineComponentFrameRoot");)c++;for(;d<R.length&&!R[d].includes("DetermineComponentFrameRoot");)d++;if(c===A.length||d===R.length)for(c=A.length-1,d=R.length-1;1<=c&&0<=d&&A[c]!==R[d];)d--;for(;1<=c&&0<=d;c--,d--)if(A[c]!==R[d]){if(c!==1||d!==1)do if(c--,d--,0>d||A[c]!==R[d]){var G=`
|
|||
|
|
`+A[c].replace(" at new "," at ");return t.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",t.displayName)),G}while(1<=c&&0<=d);break}}}finally{vs=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?nt(a):""}function zc(t,s){switch(t.tag){case 26:case 27:case 5:return nt(t.type);case 16:return nt("Lazy");case 13:return t.child!==s&&s!==null?nt("Suspense Fallback"):nt("Suspense");case 19:return nt("SuspenseList");case 0:case 15:return zr(t.type,!1);case 11:return zr(t.type.render,!1);case 1:return zr(t.type,!0);case 31:return nt("Activity");default:return""}}function Ss(t){try{var s="",a=null;do s+=zc(t,a),a=t,t=t.return;while(t);return s}catch(c){return`
|
|||
|
|
Error generating stack: `+c.message+`
|
|||
|
|
`+c.stack}}var Ui=Object.prototype.hasOwnProperty,ni=n.unstable_scheduleCallback,Br=n.unstable_cancelCallback,ii=n.unstable_shouldYield,Bc=n.unstable_requestPaint,St=n.unstable_now,Uc=n.unstable_getCurrentPriorityLevel,dl=n.unstable_ImmediatePriority,Ur=n.unstable_UserBlockingPriority,si=n.unstable_NormalPriority,Hc=n.unstable_LowPriority,pl=n.unstable_IdlePriority,qc=n.log,Hi=n.unstable_setDisableYieldValue,Mn=null,rt=null;function vn(t){if(typeof qc=="function"&&Hi(t),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode(Mn,t)}catch{}}var wt=Math.clz32?Math.clz32:ce,$c=Math.log,gl=Math.LN2;function ce(t){return t>>>=0,t===0?32:31-($c(t)/gl|0)|0}var Sn=256,Ft=262144,ml=4194304;function qi(t){var s=t&42;if(s!==0)return s;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function yl(t,s,a){var c=t.pendingLanes;if(c===0)return 0;var d=0,p=t.suspendedLanes,b=t.pingedLanes;t=t.warmLanes;var T=c&134217727;return T!==0?(c=T&~p,c!==0?d=qi(c):(b&=T,b!==0?d=qi(b):a||(a=T&~t,a!==0&&(d=qi(a))))):(T=c&~p,T!==0?d=qi(T):b!==0?d=qi(b):a||(a=c&~t,a!==0&&(d=qi(a)))),d===0?0:s!==0&&s!==d&&(s&p)===0&&(p=d&-d,a=s&-s,p>=a||p===32&&(a&4194048)!==0)?s:d}function Hr(t,s){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&s)===0}function YS(t,s){switch(t){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vd(){var t=ml;return ml<<=1,(ml&62914560)===0&&(ml=4194304),t}function Ic(t){for(var s=[],a=0;31>a;a++)s.push(t);return s}function qr(t,s){t.pendingLanes|=s,s!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function XS(t,s,a,c,d,p){var b=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var T=t.entanglements,A=t.expirationTimes,R=t.hiddenUpdates;for(a=b&~a;0<a;){var G=31-wt(a),F=1<<G;T[G]=0,A[G]=-1;var z=R[G];if(z!==null)for(R[G]=null,G=0;G<z.length;G++){var H=z[G];H!==null&&(H.lane&=-536870913)}a&=~F}c!==0&&Gd(t,c,0),p!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=p&~(b&~s))}function Gd(t,s,a){t.pendingLanes|=s,t.suspendedLanes&=~s;var c=31-wt(s);t.entangledLanes|=s,t.entanglements[c]=t.entanglements[c]|1073741824|a&261930}function Kd(t,s){var a=t.entangledLanes|=s;for(t=t.entanglements;a;){var c=31-wt(a),d=1<<c;d&s|t[c]&s&&(t[c]|=s),a&=~d}}function Yd(t,s){var a=s&-s;return a=(a&42)!==0?1:Vc(a),(a&(t.suspendedLanes|s))!==0?0:a}function Vc(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Gc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Xd(){var t=P.p;return t!==0?t:(t=window.event,t===void 0?32:jy(t.type))}function Fd(t,s){var a=P.p;try{return P.p=t,s()}finally{P.p=a}}var ri=Math.random().toString(36).slice(2),ot="__reactFiber$"+ri,Nt="__reactProps$"+ri,ws="__reactContainer$"+ri,Kc="__reactEvents$"+ri,FS="__reactListeners$"+ri,QS="__reactHandles$"+ri,Qd="__reactResources$"+ri,$r="__reactMarker$"+ri;function
|
|||
|
|
`).replace(Nw,"")}function ay(t,s){return s=ry(s),ry(t)===s}function Me(t,s,a,c,d,p){switch(a){case"children":typeof c=="string"?s==="body"||s==="textarea"&&c===""||Ns(t,c):(typeof c=="number"||typeof c=="bigint")&&s!=="body"&&Ns(t,""+c);break;case"className":vl(t,"class",c);break;case"tabIndex":vl(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":vl(t,a,c);break;case"style":ap(t,c,p);break;case"data":if(s!=="object"){vl(t,"data",c);break}case"src":case"href":if(c===""&&(s!=="a"||a!=="href")){t.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=wl(""+c),t.setAttribute(a,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(a==="formAction"?(s!=="input"&&Me(t,s,"name",d.name,d,null),Me(t,s,"formEncType",d.formEncType,d,null),Me(t,s,"formMethod",d.formMethod,d,null),Me(t,s,"formTarget",d.formTarget,d,null)):(Me(t,s,"encType",d.encType,d,null),Me(t,s,"method",d.method,d,null),Me(t,s,"target",d.target,d,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=wl(""+c),t.setAttribute(a,c);break;case"onClick":c!=null&&(t.onclick=jn);break;case"onScroll":c!=null&&me("scroll",t);break;case"onScrollEnd":c!=null&&me("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(a=c.__html,a!=null){if(d.children!=null)throw Error(r(60));t.innerHTML=a}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}a=wl(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,""+c):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":c===!0?t.setAttribute(a,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,c):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(a,c):t.removeAttribute(a);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(a):t.setAttribute(a,c);break;case"popover":me("beforetoggle",t),me("toggle",t),bl(t,"popover",c);break;case"xlinkActuate":On(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":On(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":On(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":On(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":On(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":On(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":On(t,"http://www.w3.org/XML/1998/namespace","xml:ba
|
|||
|
|
`,"\\n")}function Ex(n,e){if(n)for(const i of e.split("|")){if(i==="url")try{const l=new URL(n[i]);return l.protocol==="data:"?l.protocol:l.protocol==="about:"?n[i]:l.pathname+l.search}catch{if(n[i]!==void 0)return n[i]}if(i==="timeNumber"&&n[i]!==void 0)return new Date(n[i]).toString();const r=Ax(n,i);if(r!==void 0)return r}}function Ax(n,e){const i=e.split(".");let r=n;for(const l of i){if(typeof r!="object"||r===null)return;r=r[l]}if(r!==void 0)return String(r)}function Nx(n){var i;return(n.title??((i=Qh.get(n.type+"."+n.method))==null?void 0:i.title)??n.method).replace(/\{([^}]+)\}/g,(r,l)=>eb(n.params,l)??r)}function Cx(n){var e;return(e=Qh.get(n.type+"."+n.method))==null?void 0:e.group}const qa=Symbol("context"),tb=Symbol("nextInContext"),nb=Symbol("prevByEndTime"),ib=Symbol("nextByStartTime"),Py=Symbol("events");class BC{constructor(e,i){var l;i.forEach(o=>kx(o));const r=i.find(o=>o.origin==="library");this.traceUri=e,this.browserName=(r==null?void 0:r.browserName)||"",this.sdkLanguage=r==null?void 0:r.sdkLanguage,this.channel=r==null?void 0:r.channel,this.testIdAttributeName=r==null?void 0:r.testIdAttributeName,this.platform=(r==null?void 0:r.platform)||"",this.playwrightVersion=(l=i.find(o=>o.playwrightVersion))==null?void 0:l.playwrightVersion,this.title=(r==null?void 0:r.title)||"",this.options=(r==null?void 0:r.options)||{},this.actions=Mx(i),this.pages=[].concat(...i.map(o=>o.pages)),this.wallTime=i.map(o=>o.wallTime).reduce((o,u)=>Math.min(o||Number.MAX_VALUE,u),Number.MAX_VALUE),this.startTime=i.map(o=>o.startTime).reduce((o,u)=>Math.min(o,u),Number.MAX_VALUE),this.endTime=i.map(o=>o.endTime).reduce((o,u)=>Math.max(o,u),Number.MIN_VALUE),this.events=[].concat(...i.map(o=>o.events)),this.stdio=[].concat(...i.map(o=>o.stdio)),this.errors=[].concat(...i.map(o=>o.errors)),this.hasSource=i.some(o=>o.hasSource),this.hasStepData=i.some(o=>o.origin==="testRunner"),this.resources=[...i.map(o=>o.resources)].flat(),this.attachments=this.actions.flatMap(o=>{var u;return((u=o.attachments)==null?void 0:u.map(f=>({...f,callId:o.callId,traceUri:e})))??[]}),this.visibleAttachments=this.attachments.filter(o=>!o.name.startsWith("_")),this.events.sort((o,u)=>o.time-u.time),this.resources.sort((o,u)=>o._monotonicTime-u._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Bx(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const o of this.actions)o.group=o.group??Cx({type:o.class,method:o.method}),o.group&&this.actionCounters.set(o.group,1+(this.actionCounters.get(o.group)||0))}createRelativeUrl(e){const i=new URL("http://localhost/"+e);return i.searchParams.set("trace",this.traceUri),i.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const i=new Set(e);return this.actions.filter(r=>!r.group||i.has(r.group))}renderActionTree(e){const i=this.filteredActions(e??[]),{rootItem:r}=sb(i),l=[],o=(u,f)=>{const h=Nx({...u.action,type:u.action.class});l.push(`${f}${h||u.id}`);for(const g of u.children)o(g,f+" ")};return r.children.forEach(u=>o(u,"")),l}_errorDescriptorsFromActions(){var i;const e=[];for(const r of this.actions||[])(i=r.error)!=null&&i.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,i)=>({stack:e.stack,message:e.message}))}}function kx(n){for(const i of n.pages)i[qa]=n;for(let i=0;i<n.actions.length;++i){const r=n.actions[i];r[qa]=n}let e;for(let i=n.actions.length-1;i>=0;i--){const r=n.actions[i];r[tb]=e,r.class!=="Route"&&(e=r)}for(const i of n.events)i[qa]=n;for(const i of n.resources)i[qa]=n}function Mx(n){const e=[],i=Ox(n);e.push(...i),e.sort((r,l)=>l.parentId===r.callId?1:r.parentId===l.callId?-1:r.endTime-l.endTime);for(let r=1;r<e.length;++r)e[r][nb]=e[r-1];e.sort((r,l)=>l.parentId===r.callId?-1:r.parentId===l.callId?1:r.startTime-l.startTime);for(let r=0;r+1<e.length;++r)e[r][ib]=e[r+1];return e}let Zy=0;function Ox(n){const e=new Map,i=n.filter
|
|||
|
|
`:this.value}}class Ar extends Qe{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 Zh extends Ar{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return ol(this.value)}}class Ya extends Ar{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return ol(this.value)+"("}}class bb extends Ar{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+ol(this.value)}}class vb extends Ar{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"?"#"+ol(this.value):"#"+Wx(this.value)}}class Wh extends Ar{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+_b(this.value)+'"'}}class Sb extends Ar{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+_b(this.value)+'")'}}class wb extends Qe{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 xb extends Qe{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}}class Zx extends Qe{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){const e=this.repr;let i=ol(this.unit);return i[0].toLowerCase()==="e"&&(i[1]==="-"||et(i.charCodeAt(1),48,57))&&(i="\\65 "+i.slice(1,i.length)),e+i}}function ol(n){n=""+n;let e="";const i=n.charCodeAt(0);for(let r=0;r<n.length;r++){const l=n.charCodeAt(r);if(l===0)throw new Jh("Invalid character: the input contains U+0000.");et(l,1,31)||l===127||r===0&&et(l,48,57)||r===1&&et(l,48,57)&&i===45?e+="\\"+l.toString(16)+" ":l>=128||l===45||l===95||et(l,48,57)||et(l,65,90)||et(l,97,122)?e+=n[r]:e+="\\"+n[r]}return e}function Wx(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const r=n.charCodeAt(i);if(r===0)throw new Jh("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||et(r,48,57)||et(r,65,90)||et(r,97,122)?e+=n[i]:e+="\\"+r.toString(16)+" "}return e}function _b(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const r=n.charCodeAt(i);if(r===0)throw new Jh("Invalid character: the input contains U+0000.");et(r,1,31)||r===127?e+="\\"+r.toString(16)+" ":r===34||r===92?e+="\\"+n[i]:e+=n[i]}return e}class Dt extends Error{}function e_(n,e){let i;try{i=ab(n),i[i.length-1]instanceof Go||i.push(new Go)}catch(j){const ne=j.message+` while parsing css selector "${n}". Did you mean to CSS.escape it?`,le=(j.stack||"").indexOf(j.message);throw le!==-1&&(j.stack=j.stack.substring(0,le)+ne+j.stack.substring(le+j.message.length)),j.message=ne,j}const r=i.find(j=>j instanceof bb||j instanceof lb||j instanceof Vo||j instanceof yb||j instanceof ob||j instanceof cb||j instanceof fb||j instanceof db||j instanceof pb||j instanceof Sb||j instanceof xb);if(r)throw new Dt(`Unsupported token "${r.toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`);let l=0;const o=new Set;function u(){return new Dt(`Unexpected token "${i[l].toSo
|
|||
|
|
linear-gradient(-45deg, #80808020 25%, transparent 25%),
|
|||
|
|
linear-gradient(45deg, transparent 75%, #80808020 75%),
|
|||
|
|
linear-gradient(-45deg, transparent 75%, #80808020 75%)`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px",boxShadow:`rgb(0 0 0 / 10%) 0px 1.8px 1.9px,
|
|||
|
|
rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
|
|||
|
|
rgb(0 0 0 / 10%) 0px -2px 4px,
|
|||
|
|
rgb(0 0 0 / 15%) 0px -6.1px 12px,
|
|||
|
|
rgb(0 0 0 / 25%) 0px 6px 12px`},k_=({diff:n,noTargetBlank:e,hideDetails:i})=>{const[r,l]=U.useState(n.diff?"diff":"actual"),[o,u]=U.useState(!1),[f,h]=U.useState(null),[g,y]=U.useState("Expected"),[m,w]=U.useState(null),[v,E]=U.useState(null),[x,_]=gs();U.useEffect(()=>{(async()=>{var j,ne,le,V;h(await lh((j=n.expected)==null?void 0:j.attachment.path)),y(((ne=n.expected)==null?void 0:ne.title)||"Expected"),w(await lh((le=n.actual)==null?void 0:le.attachment.path)),E(await lh((V=n.diff)==null?void 0:V.attachment.path))})()},[n]);const N=f&&m&&v,C=N?Math.max(f.naturalWidth,m.naturalWidth,200):500,$=N?Math.max(f.naturalHeight,m.naturalHeight,200):500,I=Math.min(1,(x.width-30)/C),D=Math.min(1,(x.width-50)/C/2),K=C*I,Q=$*I,q={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return S.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:_,children:N&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[n.diff&&S.jsx("div",{style:{...q,fontWeight:r==="diff"?600:"initial"},onClick:()=>l("diff"),children:"Diff"}),S.jsx("div",{style:{...q,fontWeight:r==="actual"?600:"initial"},onClick:()=>l("actual"),children:"Actual"}),S.jsx("div",{style:{...q,fontWeight:r==="expected"?600:"initial"},onClick:()=>l("expected"),children:g}),S.jsx("div",{style:{...q,fontWeight:r==="sxs"?600:"initial"},onClick:()=>l("sxs"),children:"Side by side"}),S.jsx("div",{style:{...q,fontWeight:r==="slider"?600:"initial"},onClick:()=>l("slider"),children:"Slider"})]}),S.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:Q+60},children:[n.diff&&r==="diff"&&S.jsx(Jn,{image:v,alt:"Diff",hideSize:i,canvasWidth:K,canvasHeight:Q,scale:I}),n.diff&&r==="actual"&&S.jsx(Jn,{image:m,alt:"Actual",hideSize:i,canvasWidth:K,canvasHeight:Q,scale:I}),n.diff&&r==="expected"&&S.jsx(Jn,{image:f,alt:g,hideSize:i,canvasWidth:K,canvasHeight:Q,scale:I}),n.diff&&r==="slider"&&S.jsx(M_,{expectedImage:f,actualImage:m,hideSize:i,canvasWidth:K,canvasHeight:Q,scale:I,expectedTitle:g}),n.diff&&r==="sxs"&&S.jsxs("div",{style:{display:"flex"},children:[S.jsx(Jn,{image:f,title:g,hideSize:i,canvasWidth:D*C,canvasHeight:D*$,scale:D}),S.jsx(Jn,{image:o?v:m,title:o?"Diff":"Actual",onClick:()=>u(!o),hideSize:i,canvasWidth:D*C,canvasHeight:D*$,scale:D})]}),!n.diff&&r==="actual"&&S.jsx(Jn,{image:m,title:"Actual",hideSize:i,canvasWidth:K,canvasHeight:Q,scale:I}),!n.diff&&r==="expected"&&S.jsx(Jn,{image:f,title:g,hideSize:i,canvasWidth:K,canvasHeight:Q,scale:I}),!n.diff&&r==="sxs"&&S.jsxs("div",{style:{display:"flex"},children:[S.jsx(Jn,{image:f,title:g,canvasWidth:D*C,canvasHeight:D*$,scale:D}),S.jsx(Jn,{image:m,title:"Actual",canvasWidth:D*C,canvasHeight:D*$,scale:D})]})]}),!i&&S.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[S.jsx("div",{children:n.diff&&S.jsx("a",{target:"_blank",href:n.diff.attachment.path,rel:"noreferrer",children:n.diff.attachment.name})}),S.jsx("div",{children:S.jsx("a",{target:e?"":"_blank",href:n.actual.attachment.path,rel:"noreferrer",children:n.actual.attachment.name})}),S.jsx("div",{children:S.jsx("a",{target:e?"":"_blank",href:n.expected.attachment.path,rel:"noreferrer",children:n.expected.attachment.name})})]})]})})},M_=({expectedImage:n,actualImage:e,canvasWidth:i,canvasHeight:r,scale:l,expectedTitle:o,hideSize:u})=>{const f={position:"absolute",top:0,left:0},[h,g]=U.useState(i/2),y=n.naturalWidth===e.naturalWidth&&n.naturalHeight===e.naturalHeight;return S.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!u&&S.jsxs("div",{style:{margin:5},children:[!y&&S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),S.jsx("span",{children:n.naturalWidth}),S.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),S.jsx("span",{children:n.naturalHeight}),!y&&S.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Act
|
|||
|
|
`).length:0;return Math.min(Math.max(5,_),20)*R_},[o]),x=S.jsxs("span",{style:{marginLeft:5},ref:m,"aria-label":n.name,children:[S.jsx("span",{children:Db(n.name)}),v&&S.jsx("a",{style:{marginLeft:5},href:Yo(i,n),children:"download"})]});return!w||!v?S.jsx("div",{style:{marginLeft:20},children:x}):S.jsxs("div",{className:Fe(g&&"yellow-flash"),children:[S.jsx(Rb,{title:x,expanded:r,setExpanded:l,expandOnTitleClick:!0,children:f&&S.jsx("i",{children:f})}),r&&o!==null&&S.jsx("div",{className:"vbox",style:{height:E},children:S.jsx(xr,{text:o,readOnly:!0,mimeType:n.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},V_=({revealedAttachmentCallId:n})=>{const e=ti(),{diffMap:i,screenshots:r,attachments:l}=U.useMemo(()=>{const o=new Set((e==null?void 0:e.visibleAttachments)??[]),u=new Set,f=new Map;for(const h of o){if(!h.path&&!h.sha1)continue;const g=h.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(g){const y=g[1],m=g[2],w=f.get(y)||{expected:void 0,actual:void 0,diff:void 0};w[m]=h,f.set(y,w),o.delete(h)}else h.contentType.startsWith("image/")&&(u.add(h),o.delete(h))}return{diffMap:f,attachments:o,screenshots:u}},[e]);return!i.size&&!r.size&&!l.size?S.jsx(ms,{text:"No attachments"}):S.jsxs("div",{className:"attachments-tab",children:[[...i.values()].map(({expected:o,actual:u,diff:f})=>S.jsxs(S.Fragment,{children:[o&&u&&S.jsx("div",{className:"attachments-section",children:"Image diff"}),o&&u&&S.jsx(k_,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:Yo(e,o)},title:"Expected"},actual:{attachment:{...u,path:Yo(e,u)}},diff:f?{attachment:{...f,path:Yo(e,f)}}:void 0}})]})),r.size?S.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((o,u)=>{const f=bc(e,o);return S.jsxs("div",{className:"attachment-item",children:[S.jsx("div",{children:S.jsx("img",{draggable:"false",src:f})}),S.jsx("div",{children:S.jsx("a",{target:"_blank",href:f,rel:"noreferrer",children:o.name})})]},`screenshot-${u}`)}),l.size?S.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...l.values()].map((o,u)=>S.jsx("div",{className:"attachment-item",children:S.jsx(I_,{attachment:o,reveal:n&&o.callId===n.callId?n:void 0})},G_(o,u)))]})};function bc(n,e){return n&&e.sha1?n.createRelativeUrl(`sha1/${e.sha1}`):`file?path=${encodeURIComponent(e.path)}`}function Yo(n,e){let i=e.contentType?`&dn=${encodeURIComponent(e.name)}`:"";return e.contentType&&(i+=`&dct=${encodeURIComponent(e.contentType)}`),bc(n,e)+i}function G_(n,e){return e+"-"+(n.sha1?"sha1-"+n.sha1:"path-"+n.path)}const K_=`
|
|||
|
|
# Instructions
|
|||
|
|
|
|||
|
|
- Following Playwright test failed.
|
|||
|
|
- Explain why, be concise, respect Playwright best practices.
|
|||
|
|
- Provide a snippet of code with the fix, if possible.
|
|||
|
|
`.trimStart();async function Y_({testInfo:n,metadata:e,errorContext:i,errors:r,buildCodeFrame:l,stdout:o,stderr:u}){var m;const f=new Set(r.filter(w=>w.message&&!w.message.includes(`
|
|||
|
|
`)).map(w=>w.message));for(const w of r)for(const v of f.keys())(m=w.message)!=null&&m.includes(v)&&f.delete(v);const h=r.filter(w=>!(!w.message||!w.message.includes(`
|
|||
|
|
`)&&!f.has(w.message)));if(!h.length)return;const g=[K_,"# Test info","",n];o&&g.push("","# Stdout","","```",Xo(o),"```"),u&&g.push("","# Stderr","","```",Xo(u),"```"),g.push("","# Error details");for(const w of h)g.push("","```",Xo(w.message||""),"```");i&&g.push(i);const y=await l(h[h.length-1]);return y&&g.push("","# Test source","","```ts",y,"```"),e!=null&&e.gitDiff&&g.push("","# Local changes","","```diff",e.gitDiff,"```"),g.join(`
|
|||
|
|
`)}const X_=new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))","g");function Xo(n){return n.replace(X_,"")}const F_=yc,Q_=({stack:n,setSelectedFrame:e,selectedFrame:i})=>{const r=n||[];return S.jsx(F_,{name:"stack-trace",ariaLabel:"Stack trace",items:r,selectedItem:r[i],render:l=>{const o=l.file[1]===":"?"\\":"/";return S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"stack-trace-frame-function",children:l.function||"(anonymous)"}),S.jsx("span",{className:"stack-trace-frame-location",children:l.file.split(o).pop()}),S.jsx("span",{className:"stack-trace-frame-line",children:":"+l.line})]})},onSelected:l=>e(r.indexOf(l))})},nd=({noShadow:n,children:e,noMinHeight:i,className:r,sidebarBackground:l,onClick:o})=>S.jsx("div",{className:Fe("toolbar",n&&"no-shadow",i&&"no-min-height",r,l&&"toolbar-sidebar-background"),onClick:o,children:e});function J_(n,e,i,r,l){const o=ti();return ec(async()=>{var v,E,x,_;const u=n==null?void 0:n[e],f=u!=null&&u.file?u:l;if(!f)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const h=f.file;let g=i.get(h);g||(g={errors:((v=l==null?void 0:l.source)==null?void 0:v.errors)||[],content:(E=l==null?void 0:l.source)==null?void 0:E.content},i.set(h,g));const y=(f==null?void 0:f.line)||((x=g.errors[0])==null?void 0:x.line)||0,m=r&&h.startsWith(r)?h.substring(r.length+1):h,w=g.errors.map(N=>({type:"error",line:N.line,message:N.message}));if(w.push({line:y,type:"running"}),((_=l==null?void 0:l.source)==null?void 0:_.content)!==void 0)g.content=l.source.content;else if(g.content===void 0||f===l){const N=await Bb(h);try{let C=o?await fetch(o.createRelativeUrl(`sha1/src@${N}.txt`)):void 0;(!C||C.status===404)&&(C=await fetch(`file?path=${encodeURIComponent(h)}`)),C.status>=400?g.content="":g.content=await C.text()}catch{g.content=`<Unable to read "${h}">`}}return{model:o,source:g,highlight:w,targetLine:y,fileName:m,location:f}},[n,e,r,l],{source:{errors:[],content:"Loading…"},highlight:[]})}const P_=({stack:n,sources:e,rootDir:i,fallbackLocation:r,stackFrameLocation:l,onOpenExternally:o})=>{const[u,f]=U.useState(),[h,g]=U.useState(0);U.useEffect(()=>{u!==n&&(f(n),g(0))},[n,u,f,g]);const{source:y,highlight:m,targetLine:w,fileName:v,location:E}=J_(n,h,e,i,r),x=U.useCallback(()=>{E&&(o?o(E):window.location.href=`vscode://file//${E.file}:${E.line}`)},[o,E]),_=((n==null?void 0:n.length)??0)>1,N=Z_(v),C=N.endsWith(".md")?"markdown":"javascript";return S.jsx(nc,{sidebarSize:200,orientation:l==="bottom"?"vertical":"horizontal",sidebarHidden:!_,main:S.jsxs("div",{className:"vbox","data-testid":"source-code",children:[v&&S.jsxs(nd,{children:[S.jsx("div",{className:"source-tab-file-name",title:v,children:S.jsx("div",{children:N})}),S.jsx(td,{description:"Copy filename",value:N}),E&&S.jsx(Ht,{icon:"link-external",title:"Open in VS Code",onClick:x})]}),S.jsx(xr,{text:y.content||"",highlighter:C,highlight:m,revealLine:w,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:S.jsx(Q_,{stack:n,selectedFrame:h,setSelectedFrame:g})})};async function Bb(n){const e=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-1",e),r=[],l=new DataView(i);for(let o=0;o<l.byteLength;o+=1){const u=l.getUint8(o).toString(16).padStart(2,"0");r.push(u)}return r.join("")}function Z_(n){if(!n)return"";const e=n!=null&&n.includes("/")?"/":"\\";return(n==null?void 0:n.split(e).pop())??""}const W_=({prompt:n})=>S.jsx(Ko,{value:n,description:"Copy prompt",copiedDescription:S.jsxs(S.Fragment,{children:["Copied ",S.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function eT(n){return U.useMemo(()=>{if(!n)return{errors:new Map};const e=new Map;for(const i of n.errorDescriptors)e.set(i.message,i);return{errors:e}},[n])}function tT({message:n,error:e,sdkLanguage:i,revealInSource:r}){var f;let l,o;const u=(f=e.stack)==null?void 0:f[0];return u&&(l=u.file.replace(/.*[/\\](.*)/,"$1")+":"+u.line,o=u.file+":"+u.lin
|
|||
|
|
`)[0]||void 0,location:y,linesAbove:100,linesBelow:100})},[o]),h=ec(()=>Y_({testInfo:(o==null?void 0:o.title)??"",metadata:l,errorContext:u,errors:(o==null?void 0:o.errorDescriptors)??[],buildCodeFrame:f}),[u,l,o,f],void 0);return n.errors.size?S.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[S.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:h&&S.jsx(W_,{prompt:h})}),[...n.errors.entries()].map(([g,y])=>{const m=`error-${r}-${g}`;return S.jsx(tT,{message:g,error:y,revealInSource:i,sdkLanguage:e},m)})]}):S.jsx(ms,{text:"No errors"})};function iT({source:n,message:e,location:i,linesAbove:r,linesBelow:l}){const o=n.split(`
|
|||
|
|
`).slice(),u=Math.max(0,i.line-r-1),f=Math.min(o.length,i.line+l),h=o.slice(u,f),g=String(f).length,y=h.map((m,w)=>`${u+w+1===i.line?"> ":" "}${(u+w+1).toString().padEnd(g," ")} | ${m}`);return e&&y.splice(i.line-u,0,`${" ".repeat(g+2)} | ${" ".repeat(i.column-2)} ^ ${e}`),y.join(`
|
|||
|
|
`)}const sT=yc;function rT(n,e){const{entries:i}=U.useMemo(()=>{if(!n)return{entries:[]};const l=[];function o(f){var y,m,w,v,E,x;const h=l[l.length-1];h&&((y=f.browserMessage)==null?void 0:y.bodyString)===((m=h.browserMessage)==null?void 0:m.bodyString)&&((w=f.browserMessage)==null?void 0:w.location)===((v=h.browserMessage)==null?void 0:v.location)&&f.browserError===h.browserError&&((E=f.nodeMessage)==null?void 0:E.html)===((x=h.nodeMessage)==null?void 0:x.html)&&f.isError===h.isError&&f.isWarning===h.isWarning&&f.timestamp-h.timestamp<1e3?h.repeat++:l.push({...f,repeat:1})}const u=[...n.events,...n.stdio].sort((f,h)=>{const g="time"in f?f.time:f.timestamp,y="time"in h?h.time:h.timestamp;return g-y});for(const f of u){if(f.type==="console"){const h=f.args&&f.args.length?lT(f.args):Ub(f.text),g=f.location.url,m=`${g?g.substring(g.lastIndexOf("/")+1):"<anonymous>"}:${f.location.lineNumber}`;o({browserMessage:{body:h,bodyString:f.text,location:m},isError:f.messageType==="error",isWarning:f.messageType==="warning",timestamp:f.time})}if(f.type==="event"&&f.method==="pageError"&&o({browserError:f.params.error,isError:!0,isWarning:!1,timestamp:f.time}),f.type==="stderr"||f.type==="stdout"){let h="";f.text&&(h=nl(f.text.trim())||""),f.base64&&(h=nl(atob(f.base64).trim())||""),o({nodeMessage:{html:h},isError:f.type==="stderr",isWarning:!1,timestamp:f.timestamp})}}return{entries:l}},[n]);return{entries:U.useMemo(()=>e?i.filter(l=>l.timestamp>=e.minimum&&l.timestamp<=e.maximum):i,[i,e])}}const aT=({consoleModel:n,boundaries:e,onEntryHovered:i,onAccepted:r})=>n.entries.length?S.jsx("div",{className:"console-tab",children:S.jsx(sT,{name:"console",onAccepted:r,onHighlighted:l=>i==null?void 0:i(l?n.entries.indexOf(l):void 0),items:n.entries,isError:l=>l.isError,isWarning:l=>l.isWarning,render:l=>{const o=Et(l.timestamp-e.minimum),u=S.jsx("span",{className:"console-time",children:o}),f=l.isError?"status-error":l.isWarning?"status-warning":"status-none",h=l.browserMessage||l.browserError?S.jsx("span",{className:Fe("codicon","codicon-browser",f),title:"Browser message"}):S.jsx("span",{className:Fe("codicon","codicon-file",f),title:"Runner message"});let g,y,m,w;const{browserMessage:v,browserError:E,nodeMessage:x}=l;if(v&&(g=v.location,y=v.body),E){const{error:_,value:N}=E;_?(y=_.message,w=_.stack):y=String(N)}return x&&(m=x.html),S.jsxs("div",{className:"console-line",children:[u,h,g&&S.jsx("span",{className:"console-location",children:g}),l.repeat>1&&S.jsx("span",{className:"console-repeat",children:l.repeat}),y&&S.jsx("span",{className:"console-line-message",children:y}),m&&S.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:m}}),w&&S.jsx("div",{className:"console-stack",children:w})]})}})}):S.jsx(ms,{text:"No console entries"});function lT(n){if(n.length===1)return Ub(n[0].preview);const e=typeof n[0].value=="string"&&n[0].value.includes("%"),i=e?n[0].value:"",r=e?n.slice(1):n;let l=0;const o=/%([%sdifoOc])/g;let u;const f=[];let h=[];f.push(S.jsx("span",{children:h},f.length+1));let g=0;for(;(u=o.exec(i))!==null;){const y=i.substring(g,u.index);h.push(S.jsx("span",{children:y},h.length+1)),g=u.index+2;const m=u[0][1];if(m==="%")h.push(S.jsx("span",{children:"%"},h.length+1));else if(m==="s"||m==="o"||m==="O"||m==="d"||m==="i"||m==="f"){const w=r[l++],v={};typeof(w==null?void 0:w.value)!="string"&&(v.color="var(--vscode-debugTokenExpression-number)"),h.push(S.jsx("span",{style:v,children:(w==null?void 0:w.preview)||""},h.length+1))}else if(m==="c"){h=[];const w=r[l++],v=w?oT(w.preview):{};f.push(S.jsx("span",{style:v,children:h},f.length+1))}}for(g<i.length&&h.push(S.jsx("span",{children:i.substring(g)},h.length+1));l<r.length;l++){const y=r[l],m={};h.length&&h.push(S.jsx("span",{children:" "},h.length+1)),typeof(y==null?void 0:y.value)!="string"&&(m.color="var(--vscode-debugTokenExpression-number)"),h.push(S.jsx("span",{style:m,children:(y==null?void 0:y.preview)||""},h.length+1))}return f}function Ub(n){return[S.jsx("span",{dangerouslySetInnerHTML:{__html:nl(n.trim())}})]}function oT(n){try{const e={},i=n
|
|||
|
|
|
|||
|
|
`)+'^"'}function u(w){function v(E){let _=E.charCodeAt(0).toString(16);for(;_.length<4;)_="0"+_;return"\\u"+_}return/[\0-\x1F\x7F-\x9F!]|\'/.test(w)?"$'"+w.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,v)+"'":"'"+w+"'"}const f=i==="win"?o:u;r.push(f(e.request.url).replace(/[[{}\]]/g,"\\$&"));let h="GET";const g=[],y=await qb(n,e);y&&(g.push("--data-raw "+f(y)),l.add("content-length"),h="POST"),e.request.method!==h&&r.push("-X "+f(e.request.method));const m=e.request.headers;for(let w=0;w<m.length;w++){const v=m[w],E=v.name.replace(/^:/,"");if(l.has(E.toLowerCase()))continue;const x=v.value;x.trim()?E.toLowerCase()==="cookie"?r.push("-b "+f(x)):r.push("-H "+f(E+": "+x)):r.push("-H "+f(E+";"))}return r=r.concat(g),"curl "+r.join(r.length>=3?i==="win"?` ^
|
|||
|
|
`:` \\
|
|||
|
|
`:" ")}async function fT(n,e,i=0){const r=new Set(["method","path","scheme","version","accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via","user-agent"]),l=new Set(["cookie","authorization"]),o=JSON.stringify(e.request.url),u=e.request.headers,f=u.reduce((x,_)=>{const N=_.name;return!r.has(N.toLowerCase())&&!N.includes(":")&&x.append(N,_.value),x},new Headers),h={};for(const x of f)h[x[0]]=x[1];const g=e.request.cookies.length||u.some(({name:x})=>l.has(x.toLowerCase()))?"include":"omit",y=u.find(({name:x})=>x.toLowerCase()==="referer"),m=y?y.value:void 0,w=await qb(n,e),v={headers:Object.keys(h).length?h:void 0,referrer:m,body:w,method:e.request.method,mode:"cors"};if(i===1){const x=u.find(N=>N.name.toLowerCase()==="cookie"),_={};delete v.mode,x&&(_.cookie=x.value),m&&(delete v.referrer,_.Referer=m),Object.keys(_).length&&(v.headers={...h,..._})}else v.credentials=g;const E=JSON.stringify(v,null,2);return`fetch(${o}, ${E});`}async function qb(n,e){var i,r;return n&&((i=e.request.postData)!=null&&i._sha1)?await fetch(n.createRelativeUrl(`sha1/${e.request.postData._sha1}`)).then(l=>l.text()):(r=e.request.postData)==null?void 0:r.text}class hT{generatePlaywrightRequestCall(e,i){let r=e.method.toLowerCase();const l=new URL(e.url),o=`${l.origin}${l.pathname}`,u={};["delete","get","head","post","put","patch"].includes(r)||(u.method=r,r="fetch"),l.searchParams.size&&(u.params=Object.fromEntries(l.searchParams.entries())),i&&(u.data=i),e.headers.length&&(u.headers=Object.fromEntries(e.headers.map(g=>[g.name,g.value])));const f=[`'${o}'`];return Object.keys(u).length>0&&f.push(this.prettyPrintObject(u)),`await page.request.${r}(${f.join(", ")});`}prettyPrintObject(e,i=2,r=0){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const f=" ".repeat(r*i),h=" ".repeat((r+1)*i);return`[
|
|||
|
|
${e.map(y=>`${h}${this.prettyPrintObject(y,i,r+1)}`).join(`,
|
|||
|
|
`)}
|
|||
|
|
${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`{
|
|||
|
|
${Object.entries(e).map(([f,h])=>{const g=this.prettyPrintObject(h,i,r+1),y=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(f)?f:this.stringLiteral(f);return`${o}${y}: ${g}`}).join(`,
|
|||
|
|
`)}
|
|||
|
|
${l}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
|
|||
|
|
`)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class dT{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),o=[`"${`${r.origin}${r.pathname}`}"`];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`method="${u}"`),u="fetch"),r.searchParams.size&&o.push(`params=${this.prettyPrintObject(Object.fromEntries(r.searchParams.entries()))}`),i&&o.push(`data=${this.prettyPrintObject(i)}`),e.headers.length&&o.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(h=>[h.name,h.value])))}`);const f=o.length===1?o[0]:`
|
|||
|
|
${o.map(h=>this.indent(h,2)).join(`,
|
|||
|
|
`)}
|
|||
|
|
`;return`await page.request.${u}(${f})`}indent(e,i){return e.split(`
|
|||
|
|
`).map(r=>" ".repeat(i)+r).join(`
|
|||
|
|
`)}prettyPrintObject(e,i=2,r=0){if(e===null||e===void 0)return"None";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"True":"False":String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const f=" ".repeat(r*i),h=" ".repeat((r+1)*i);return`[
|
|||
|
|
${e.map(y=>`${h}${this.prettyPrintObject(y,i,r+1)}`).join(`,
|
|||
|
|
`)}
|
|||
|
|
${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`{
|
|||
|
|
${Object.entries(e).map(([f,h])=>{const g=this.prettyPrintObject(h,i,r+1);return`${o}${this.stringLiteral(f)}: ${g}`}).join(`,
|
|||
|
|
`)}
|
|||
|
|
${l}}`}stringLiteral(e){return JSON.stringify(e)}}class pT{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),l=`${r.origin}${r.pathname}`,o={},u=[];let f=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(f)||(o.Method=f,f="fetch"),r.searchParams.size&&(o.Params=Object.fromEntries(r.searchParams.entries())),i&&(o.Data=i),e.headers.length&&(o.Headers=Object.fromEntries(e.headers.map(y=>[y.name,y.value])));const h=[`"${l}"`];return Object.keys(o).length>0&&h.push(this.prettyPrintObject(o)),`${u.join(`
|
|||
|
|
`)}${u.length?`
|
|||
|
|
`:""}await request.${this.toFunctionName(f)}(${h.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,i=2,r=0){if(e===null||e===void 0)return"null";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"true":"false":String(e);if(Array.isArray(e)){if(e.length===0)return"new object[] {}";const f=" ".repeat(r*i),h=" ".repeat((r+1)*i);return`new object[] {
|
|||
|
|
${e.map(y=>`${h}${this.prettyPrintObject(y,i,r+1)}`).join(`,
|
|||
|
|
`)}
|
|||
|
|
${f}}`}if(Object.keys(e).length===0)return"new {}";const l=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`new() {
|
|||
|
|
${Object.entries(e).map(([f,h])=>{const g=this.prettyPrintObject(h,i,r+1),y=r===0?f:`[${this.stringLiteral(f)}]`;return`${o}${y} = ${g}`}).join(`,
|
|||
|
|
`)}
|
|||
|
|
${l}}`}stringLiteral(e){return JSON.stringify(e)}}class gT{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),l=[`"${r.origin}${r.pathname}"`],o=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`setMethod("${u}")`),u="fetch");for(const[f,h]of r.searchParams)o.push(`setQueryParam(${this.stringLiteral(f)}, ${this.stringLiteral(h)})`);i&&o.push(`setData(${this.stringLiteral(i)})`);for(const f of e.headers)o.push(`setHeader(${this.stringLiteral(f.name)}, ${this.stringLiteral(f.value)})`);return o.length>0&&l.push(`RequestOptions.create()
|
|||
|
|
.${o.join(`
|
|||
|
|
.`)}
|
|||
|
|
`),`request.${u}(${l.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function mT(n){if(n==="javascript")return new hT;if(n==="python")return new dT;if(n==="csharp")return new pT;if(n==="java")return new gT;throw new Error("Unsupported language: "+n)}const yT=({resource:n,sdkLanguage:e,startTimeOffset:i,onClose:r})=>{const[l,o]=U.useState("headers"),u=ti(),f=ec(async()=>{if(u&&n.request.postData){const h=n.request.headers.find(y=>y.name.toLowerCase()==="content-type"),g=h?h.value:"";if(n.request.postData._sha1){const y=await fetch(u.createRelativeUrl(`sha1/${n.request.postData._sha1}`));return{text:Lh(await y.text(),g),mimeType:g}}else return{text:Lh(n.request.postData.text,g),mimeType:g}}else return null},[n],null);return S.jsx(jh,{leftToolbar:[S.jsx(Ht,{icon:"close",title:"Close",onClick:r},"close")],rightToolbar:[S.jsx(bT,{requestBody:f,resource:n,sdkLanguage:e},"dropdown")],tabs:[{id:"headers",title:"Headers",render:()=>S.jsx(vT,{resource:n,startTimeOffset:i})},{id:"payload",title:"Payload",render:()=>S.jsx(ST,{resource:n,requestBody:f})},{id:"response",title:"Response",render:()=>S.jsx(wT,{resource:n})}],selectedTab:l,setSelectedTab:o})},bT=({resource:n,sdkLanguage:e,requestBody:i})=>{const r=ti(),l=S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>mT(e).generatePlaywrightRequestCall(n.request,i==null?void 0:i.text);return S.jsxs("div",{className:"copy-request-dropdown",children:[S.jsxs(Ht,{className:"copy-request-dropdown-toggle",children:[S.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",S.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),S.jsxs("div",{className:"copy-request-dropdown-menu",children:[S.jsx(Ko,{description:"Copy as cURL",copiedDescription:l,value:()=>uT(r,n)}),S.jsx(Ko,{description:"Copy as Fetch",copiedDescription:l,value:()=>fT(r,n)}),S.jsx(Ko,{description:"Copy as Playwright",copiedDescription:l,value:o})]})]})},Xa=({title:n,data:e,showCount:i,children:r,className:l})=>{const[o,u]=on(`trace-viewer-network-details-${n.replaceAll(" ","-")}`,!0);return S.jsxs(Rb,{expanded:o,setExpanded:u,expandOnTitleClick:!0,title:S.jsxs("span",{className:"network-request-details-header",children:[n,i&&S.jsxs("span",{className:"network-request-details-header-count",children:[" × ",(e==null?void 0:e.length)??0]})]}),className:l,children:[e&&S.jsx("table",{className:"network-request-details-table",children:S.jsx("tbody",{children:e.map(({name:f,value:h},g)=>h!==null&&S.jsxs("tr",{children:[S.jsx("td",{children:f}),S.jsx("td",{children:h})]},g))})}),r]})},vT=({resource:n,startTimeOffset:e})=>{const i=U.useMemo(()=>Object.entries({URL:n.request.url,Method:n.request.method,"Status Code":n.response.status!==-1&&S.jsxs("span",{className:_T(n.response.status),children:[" ",n.response.status," ",n.response.statusText]}),Start:Et(e),Duration:Et(n.time)}).map(([r,l])=>({name:r,value:l})),[n,e]);return S.jsxs("div",{className:"vbox network-request-details-tab",children:[S.jsx(Xa,{title:"General",data:i}),S.jsx(Xa,{title:"Request Headers",showCount:!0,data:n.request.headers}),S.jsx(Xa,{title:"Response Headers",showCount:!0,data:n.response.headers})]})},ST=({resource:n,requestBody:e})=>S.jsxs("div",{className:"vbox network-request-details-tab",children:[n.request.queryString.length===0&&!e&&S.jsx("em",{className:"network-request-no-payload",children:"No payload for this request."}),n.request.queryString.length>0&&S.jsx(Xa,{title:"Query String Parameters",showCount:!0,data:n.request.queryString}),e&&S.jsx(Xa,{title:"Request Body",className:"network-request-request-body",children:S.jsx(xr,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})})]}),wT=({resource:n})=>{const e=ti(),[i,r]=U.useState(null);return U.useEffect(()=>{(async()=>{if(e&&n.response.content._sha1){const o=n.response.content.mimeType.includes("image"),u=n.response.content.mimeType.includes("font"),f=await fetch(e.createRelativeUrl(`sha1/${n.response.content._sha1}`));if(o){const h=await f.blo
|
|||
|
|
|
|||
|
|
`+e.value+`
|
|||
|
|
`+" ".repeat(l.pos)+`^
|
|||
|
|
`;return r.push({message:o,range:[i.lineCounter.linePos(e.range[0]),i.lineCounter.linePos(e.range[0]+l.pos)]}),null}throw l}}constructor(e){this._input=e,this._pos=0,this._length=e.length}_peek(){return this._input[this._pos]||""}_next(){return this._pos<this._length?this._input[this._pos++]:null}_eof(){return this._pos>=this._length}_isWhitespace(){return!this._eof()&&/\s/.test(this._peek())}_skipWhitespace(){for(;this._isWhitespace();)this._pos++}_readIdentifier(e){this._eof()&&this._throwError(`Unexpected end of input when expecting ${e}`);const i=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(i,this._pos)}_readString(){let e="",i=!1;for(;!this._eof();){const r=this._next();if(i)e+=r,i=!1;else if(r==="\\")i=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,i=0){throw new d0(e,i||this._pos)}_readRegex(){let e="",i=!1,r=!1;for(;!this._eof();){const l=this._next();if(i)e+=l,i=!1;else if(l==="\\")i=!0,e+=l;else{if(l==="/"&&!r)return{pattern:e};l==="["?(r=!0,e+=l):l==="]"&&r?(e+=l,r=!1):e+=l}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),Ib(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let i=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),i=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let l="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),i=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)l+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,r,l||"true",i)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const i=this._readStringOrRegex()||"",r={kind:"role",role:e,name:i};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,i,r,l){if(i==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',l),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(i==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',l),e.disabled=r==="true";return}if(i==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',l),e.expanded=r==="true";return}if(i==="active"){this._assert(r==="true"||r==="false",'Value of "active" attribute must be a boolean',l),e.active=r==="true";return}if(i==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',l),e.level=Number(r);return}if(i==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',l),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(i==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',l),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${i}]`,l)}_assert(e,i,r){e||this._throwError(i||"Assertion error",r)}}class d0 extends Error{constructor(e,i){super(e),this.pos=i}}function YT(n,e){var u,f;function i(h,g,y){let m=1,w=y+m;for(const v of h.children||[])typeof v=="string"?(m++,w++):(m+=i(v,g,w),w+=m);if(!["none","presentation","fragment","iframe","generic"].includes(h.role)&&h.name){let v=g.get(h.role);v||(v=new Map,g.set(h.role,v));const E=v.get(h.name),x=m*100-y;(!E||E.sizeAndPosition<x)&&v.set(h.name,{node:h,sizeAndPosition:x})}return m}const r=new Map;n&&i(n,r,0);const l=new Map;i(e,l,0);const o=[];for(const[h,g]of l)for(const[y,m]of g)((u=r.get(h))==null?void 0:u.get(y))||o.push(m);return o.sort((h,g)=>g.sizeAndPosition-h.sizeAndPosition),(f=o[0])==null?void 0:f.node}function XT(n){return Vb(n)?"'"+n.replace(/'/g,"''")+"'":n}function ch(n){return Vb(n)?'"'+n.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";c
|
|||
|
|
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':n}function Vb(n){return!!(n.length===0||/^\s|\s$/.test(n)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(n)||/^-/.test(n)||/[\n:](\s|$)/.test(n)||/\s#/.test(n)||/[\n\r]/.test(n)||/^[&*\],?!>|@"'#%]/.test(n)||/[{}`]/.test(n)||/^\[/.test(n)||!isNaN(Number(n))||["y","n","yes","no","true","false","on","off","null"].includes(n.toLowerCase()))}let Gb={};function FT(n){Gb=n}function il(n,e){for(;e;){if(n.contains(e))return!0;e=Yb(e)}return!1}function bt(n){if(n.parentElement)return n.parentElement;if(n.parentNode&&n.parentNode.nodeType===11&&n.parentNode.host)return n.parentNode.host}function Kb(n){let e=n;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Yb(n){for(;n.parentElement;)n=n.parentElement;return bt(n)}function $a(n,e,i){for(;n;){const r=n.closest(e);if(i&&r!==i&&(r!=null&&r.contains(i)))return;if(r)return r;n=Yb(n)}}function zi(n,e){const i=e==="::before"?rd:e==="::after"?ad:sd;if(i&&i.has(n))return i.get(n);const r=n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView.getComputedStyle(n,e):void 0;return i==null||i.set(n,r),r}function Xb(n,e){if(e=e??zi(n),!e)return!0;if(Element.prototype.checkVisibility&&Gb.browserNameForWorkarounds!=="webkit"){if(!n.checkVisibility())return!1}else{const i=n.closest("details,summary");if(i!==n&&(i==null?void 0:i.nodeName)==="DETAILS"&&!i.open)return!1}return e.visibility==="visible"}function cc(n){const e=zi(n);if(!e)return{visible:!0,inline:!1};const i=e.cursor;if(e.display==="contents"){for(let l=n.firstChild;l;l=l.nextSibling){if(l.nodeType===1&&ji(l))return{visible:!0,inline:!1,cursor:i};if(l.nodeType===3&&Fb(l))return{visible:!0,inline:!0,cursor:i}}return{visible:!1,inline:!1,cursor:i}}if(!Xb(n,e))return{cursor:i,visible:!1,inline:!1};const r=n.getBoundingClientRect();return{cursor:i,visible:r.width>0&&r.height>0,inline:e.display==="inline"}}function ji(n){return cc(n).visible}function Fb(n){const e=n.ownerDocument.createRange();e.selectNode(n);const i=e.getBoundingClientRect();return i.width>0&&i.height>0}function Xe(n){const e=n.tagName;return typeof e=="string"?e.toUpperCase():n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}let sd,rd,ad,Qb=0;function ld(){++Qb,sd??(sd=new Map),rd??(rd=new Map),ad??(ad=new Map)}function od(){--Qb||(sd=void 0,rd=void 0,ad=void 0)}function p0(n){return n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")}const g0="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]",QT=[["aria-atomic",void 0],["aria-busy",void 0],["aria-controls",void 0],["aria-current",void 0],["aria-describedby",void 0],["aria-details",void 0],["aria-dropeffect",void 0],["aria-flowto",void 0],["aria-grabbed",void 0],["aria-hidden",void 0],["aria-keyshortcuts",void 0],["aria-label",["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"]],["aria-labelledby",["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"]],["aria-live",void 0],["aria-owns",void 0],["aria-relevant",void 0],["aria-roledescription",["generic"]]];function Jb(n,e){return QT.some(([i,r])=>!(r!=null&&r.includes(e||""))&&n.hasAttribute(i))}function Pb(n){return!Number.isNaN(Number(String(n.getAttribute("tabindex"))))}function JT(n){return!cv(n)&&(PT(n)||Pb(n))}function PT(n){const e=Xe(n);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?n.hasAttribute("href"):e==="INPUT"?!n.hidden:!1}const uh={A:n=>n.hasAttribute("href")?"link":null,AREA:n=>n.hasAttribute("href")?"link":null,ARTICLE:()=>"article",ASIDE:()=>"complementary",BLOCKQUOTE:()=>"blockquote",BUTTON:()=>"button",CAPTION:()=>"caption",CODE:()=>"code",DATALIST:()=>"listbox",DD:()=>"definition",DEL:()=>"deletion",DETAILS:()=>"group",DFN:()=>"term",DIALOG:()=>"di
|
|||
|
|
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function v0(n,e){const i=[...n.querySelectorAll(e)];for(const r of Nr(n,n.getAttribute("aria-owns")))r.matches(e)&&i.push(r),i.push(...r.querySelectorAll(e));return i}function Qa(n,e){const i=e==="::before"?wd:e==="::after"?xd:Sd;if(i!=null&&i.has(n))return i==null?void 0:i.get(n);const r=zi(n,e);let l;if(r){const o=r.content;o&&o!=="none"&&o!=="normal"&&r.display!=="none"&&r.visibility!=="hidden"&&(l=eE(n,o,!!e))}return e&&l!==void 0&&((r==null?void 0:r.display)||"inline")!=="inline"&&(l=" "+l+" "),i&&i.set(n,l),l}function eE(n,e,i){if(!(!e||e==="none"||e==="normal"))try{let r=ab(e).filter(f=>!(f instanceof ic));const l=r.findIndex(f=>f instanceof dt&&f.value==="/");if(l!==-1)r=r.slice(l+1);else if(!i)return;const o=[];let u=0;for(;u<r.length;)if(r[u]instanceof Wh)o.push(r[u].value),u++;else if(u+2<r.length&&r[u]instanceof Ya&&r[u].value==="attr"&&r[u+1]instanceof Zh&&r[u+2]instanceof Ph){const f=r[u+1].value;o.push(n.getAttribute(f)||""),u+=3}else return;return o.join("")}catch{}}function nv(n){const e=n.getAttribute("aria-labelledby");if(e===null)return null;const i=Nr(n,e);return i.length?i:null}function tE(n,e){const i=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(n),r=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(n);return i||r}function sl(n,e){const i=e?yd:md;let r=i==null?void 0:i.get(n);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(mt(n)||"")||(r=Fa(yn(n,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),i==null||i.set(n,r)),r}function S0(n,e){const i=e?vd:bd;let r=i==null?void 0:i.get(n);if(r===void 0){if(r="",n.hasAttribute("aria-describedby")){const l=Nr(n,n.getAttribute("aria-describedby"));r=Fa(l.map(o=>yn(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:ln(o)}})).join(" "))}else n.hasAttribute("aria-description")?r=Fa(n.getAttribute("aria-description")||""):r=Fa(n.getAttribute("title")||"");i==null||i.set(n,r)}return r}function nE(n){const e=n.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function iE(n){if("validity"in n){const e=n.validity;return(e==null?void 0:e.valid)===!1}return!1}function sE(n){const e=dr;let i=dr==null?void 0:dr.get(n);if(i===void 0){i="";const r=nE(n)!=="false",l=iE(n);if(r||l){const o=n.getAttribute("aria-errormessage");i=Nr(n,o).map(h=>Fa(yn(h,{visitedElements:new Set,embeddedInDescribedBy:{element:h,hidden:ln(h)}}))).join(" ").trim()}e==null||e.set(n,i)}return i}function yn(n,e){var h,g,y,m;if(e.visitedElements.has(n))return"";const i={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const w=!!((h=e.embeddedInLabelledBy)!=null&&h.hidden)||!!((g=e.embeddedInDescribedBy)!=null&&g.hidden)||!!((y=e.embeddedInNativeTextAlternative)!=null&&y.hidden)||!!((m=e.embeddedInLabel)!=null&&m.hidden);if(ev(n)||!w&&ln(n))return e.visitedElements.add(n),""}const r=nv(n);if(!e.embeddedInLabelledBy){const w=(r||[]).map(v=>yn(v,{...e,embeddedInLabelledBy:{element:v,hidden:ln(v)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(w)return w}const l=mt(n)||"",o=Xe(n);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const w=[...n.labels||[]].includes(n),v=(r||[]).includes(n);if(!w&&!v){if(l==="textbox")return e.visitedElements.add(n),o==="INPUT"||o==="TEXTAREA"?n.value:n.t
|
|||
|
|
`)}function TE(n){const e=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let i="",r=0;const l=new RegExp(e.map(o=>"("+o.regex.source+")").join("|"),"g");return n.replace(l,(o,...u)=>{const f=u[u.length-2],h=u.slice(0,-2);i+=rc(n.slice(r,f));for(let g=0;g<h.length;g++)if(h[g]){const{replacement:y}=e[g];i+=y;break}return r=f+o.length,o}),i?(i+=rc(n.slice(r)),String(new RegExp(i))):n}function EE(n,e){if(!e.length)return!1;if(!n.name)return!0;if(n.name.length>e.length)return!1;const i=e.length<=200&&n.name.length<=200?l_(e,n.name):"";let r=e;for(;i&&r.includes(i);)r=r.replace(i,"");return r.trim().length/e.length>.1}const gv=Symbol("element");function Ed(n){return n[gv]}function Rh(n,e){n[gv]=e}function AE(n,e){const i=YT(n,e);return i?Ed(i):void 0}const E0=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;z-index:10;font-size:13px}x-pw-dialog:not(.autosize){width:400px;height:150px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.record.toggled>x-div{clip-path:url(#icon-stop-circle)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-ite
|
|||
|
|
${n.stack}`,{e:{n:n.name,m:n.message,s:u}}}if(OA(n))return{d:n.toJSON()};if(jA(n))return{u:n.toJSON()};if(MA(n))return{r:{p:n.source,f:n.flags}};for(const[u,f]of Object.entries(Uv))if(RA(n,f))return{ta:{b:DA(n),k:u}};const l=i.visited.get(n);if(l)return{ref:l};if(Array.isArray(n)){const u=[],f=++i.lastId;i.visited.set(n,f);for(let h=0;h<n.length;++h)u.push(Uh(n[h],e,i));return{a:u,id:f}}if(typeof n=="object"){const u=[],f=++i.lastId;i.visited.set(n,f);for(const g of Object.keys(n)){let y;try{y=n[g]}catch{continue}g==="toJSON"&&typeof y=="function"?u.push({k:g,v:{o:[],id:0}}):u.push({k:g,v:Uh(y,e,i)})}let h;try{u.length===0&&n.toJSON&&typeof n.toJSON=="function"&&(h={value:n.toJSON()})}catch{}return h?Hv(h.value,e,i):{o:u,id:f}}}class UA{constructor(e,i){var r,l,o,u,f,h,g,y;this.global=e,this.isUnderTest=i,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(r=e.setTimeout)==null?void 0:r.bind(e),clearTimeout:(l=e.clearTimeout)==null?void 0:l.bind(e),setInterval:(o=e.setInterval)==null?void 0:o.bind(e),clearInterval:(u=e.clearInterval)==null?void 0:u.bind(e),requestAnimationFrame:(f=e.requestAnimationFrame)==null?void 0:f.bind(e),cancelAnimationFrame:(h=e.cancelAnimationFrame)==null?void 0:h.bind(e),requestIdleCallback:(g=e.requestIdleCallback)==null?void 0:g.bind(e),cancelIdleCallback:(y=e.cancelIdleCallback)==null?void 0:y.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,i,r,l,...o){const u=o.slice(0,l),f=o.slice(l),h=[];for(let y=0;y<u.length;y++)h[y]=Bh(u[y],f);let g=this.global.eval(r);return e===!0?g=g(...h):e===!1?g=g:typeof g=="function"&&(g=g(...h)),i?this._promiseAwareJsonValueNoThrow(g):g}jsonValue(e,i){if(i!==void 0)return BA(i,r=>({fallThrough:r}))}_promiseAwareJsonValueNoThrow(e){const i=r=>{try{return this.jsonValue(!0,r)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const r=await e;return i(r)})():i(e)}}class qv{constructor(e,i){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this._lastAriaSnapshotForTrack=new Map,this.utils={asLocator:Oi,cacheNormalizedWhitespaces:r_,elementText:Ut,getAriaRole:mt,getElementAccessibleDescription:S0,getElementAccessibleName:sl,isElementVisible:ji,isInsideScope:il,normalizeWhiteSpace:At,parseAriaSnapshot:id,generateAriaTree:Ja,findNewElement:AE,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=i.isUnderTest,this.utils.builtins=new UA(e,i.isUnderTest).builtins,this._sdkLanguage=i.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=i.testIdAttributeName,this._evaluator=new qE,this.consoleApi=new kA(this),this.onGlobalListenersRemoved=new Set,this._autoClosingTags=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]),this._booleanAttributes=new Set(["checked","selected","disabled","readonly","multiple"]),this._eventTypes=new Map([["auxclick","mouse"],["click","mouse"],["dblclick","mouse"],["mousedown","mouse"],["mouseeenter","mouse"],["mouseleave","mouse"],["mousemove","mouse"],["mouseout","mouse"],["mouseover","mouse"],["mouseup","mouse"],["mouseleave","mouse"],["mousewheel","mouse"],["keydown","keyboard"],["keyup","keyboard"],["keypress","keyboard"],["textInput","keyboard"],["touchstart","touch"],["touchmove","touch"],["touchend","touch"],["touchcancel","touch"],["pointerover","pointer"],["pointerout","pointer"],["pointerenter","pointer"],["pointerleave","pointer"],["pointerdown","pointer"],["pointerup","pointer"],["pointermove","pointer"],["pointercancel","pointer"],["gotpointercapture","pointer"],["lostpointercapture","pointer"],["focus","focus"],["blur","focus"],["drag","drag"],["dragstart","drag"],["dragend","drag"],["dragover","drag"],["dragenter","drag"],["dragleave","drag"],["dragexit","drag"],["drop","drag"],["wheel","wheel"],["deviceorientation","deviceorientation"],["deviceorientationabsolute","deviceorientation"],["devicemotion","devicemotion"]]),this._hoverHitTargetInterceptorEvents=new Set(["mousemo
|
|||
|
|
(() => {
|
|||
|
|
const module = {};
|
|||
|
|
${e}
|
|||
|
|
return module.exports.default();
|
|||
|
|
})()`);return new r(this,i)}async viewportRatio(e){return await new Promise(i=>{const r=new IntersectionObserver(l=>{i(l[0].intersectionRatio),r.disconnect()});r.observe(e),this.utils.builtins.requestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const i=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(i.borderLeftWidth||"",10),top:parseInt(i.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const i=e.ownerDocument.defaultView;for(let l=e;l;l=bt(l))if(i.getComputedStyle(l).transform!=="none")return"transformed";const r=i.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,i){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(i==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(i==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),i==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const l=r.closest("label");l&&l.control&&(r=l.control)}return r}async checkElementStates(e,i){if(i.includes("stable")){const r=await this._checkElementIsStable(e);if(r===!1)return{missingState:"stable"};if(r==="error:notconnected")return"error:notconnected"}for(const r of i)if(r!=="stable"){const l=this.elementState(e,r);if(l.received==="error:notconnected")return"error:notconnected";if(!l.matches)return{missingState:r}}}async _checkElementIsStable(e){const i=Symbol("continuePolling");let r,l=0,o=0;const u=()=>{const m=this.retarget(e,"no-follow-label");if(!m)return"error:notconnected";const w=this.utils.builtins.performance.now();if(this._stableRafCount>1&&w-o<15)return i;o=w;const v=m.getBoundingClientRect(),E={x:v.top,y:v.left,width:v.width,height:v.height};if(r){if(!(E.x===r.x&&E.y===r.y&&E.width===r.width&&E.height===r.height))return!1;if(++l>=this._stableRafCount)return!0}return r=E,i};let f,h;const g=new Promise((m,w)=>{f=m,h=w}),y=()=>{try{const m=u();m!==i?f(m):this.utils.builtins.requestAnimationFrame(y)}catch(m){h(m)}};return this.utils.builtins.requestAnimationFrame(y),g}_createAriaRefEngine(){return{queryAll:(i,r)=>{var o,u;const l=(u=(o=this._lastAriaSnapshotForQuery)==null?void 0:o.elements)==null?void 0:u.get(r);return l&&l.isConnected?[l]:[]}}}elementState(e,i){const r=this.retarget(e,["visible","hidden"].includes(i)?"none":"follow-label");if(!r||!r.isConnected)return i==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(i==="visible"||i==="hidden"){const l=ji(r);return{matches:i==="visible"?l:!l,received:l?"visible":"hidden"}}if(i==="disabled"||i==="enabled"){const l=uc(r);return{matches:i==="disabled"?l:!l,received:l?"disabled":"enabled"}}if(i==="editable"){const l=uc(r),o=cE(r);if(o==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!l&&!o,received:l?"disabled":o?"readOnly":"editable"}}if(i==="checked"||i==="unchecked"){const l=i==="checked",o=lE(r);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");const u=r.nodeName==="INPUT"&&r.type==="radio";return{matches:l===o,received:o?"checked":"unchecked",isRadio:u}}if(i==="indeterminate"){const l=aE(r);if(l==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:l==="mixed",received:l===!0?"checked":l===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${i}"`)}selectOptions(e,i){const r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element")
|
|||
|
|
`+l);return r.length<i.length&&r.push(`
|
|||
|
|
...`),this.createStacklessError(`strict mode violation: ${Oi(this._sdkLanguage,An(e))} resolved to ${i.length} elements:${r.join("")}
|
|||
|
|
`)}checkDeprecatedSelectorUsage(e,i){const r=new Set(["_react","_vue","xpath:light","text:light","id:light","data-testid:light","data-test-id:light","data-test:light"]);if(!i.length)return;const l=e.parts.find(u=>r.has(u.name));if(!l)return;const o=this._generateSelectors(i).map(u=>`
|
|||
|
|
`+u);throw o.length<i.length&&o.push(`
|
|||
|
|
...`),this.createStacklessError(`"${l.name}" selector is not supported: ${Oi(this._sdkLanguage,An(e))} resolved to ${i.length} element${i.length===1?"":"s"}:${o.join("")}
|
|||
|
|
`)}createStacklessError(e){if(this._browserName==="firefox"){const r=new Error("Error: "+e);return r.stack="",r}const i=new Error(e);return delete i.stack,i}createHighlight(){return new hh(this)}maskSelectors(e,i){this._highlight&&this.hideHighlight(),this._highlight=new hh(this),this._highlight.install();const r=[];for(const l of e)r.push(this.querySelectorAll(l,this.document.documentElement));this._highlight.maskElements(r.flat(),i)}highlight(e){this._highlight||(this._highlight=new hh(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,i){var u,f;((u=this._markedElements)==null?void 0:u.callId)!==i&&(this._markedElements=void 0);const r=((f=this._markedElements)==null?void 0:f.elements)||new Set,l=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const h of r)e.has(h)||h.dispatchEvent(l);const o=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const h of e)r.has(h)||h.dispatchEvent(o);this._markedElements={callId:i,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let i=!1;const r=()=>i=!0;this.window.addEventListener(e,r),new MutationObserver(l=>{if(l.some(u=>Array.from(u.addedNodes).includes(this.document.documentElement))&&(i=!1,this.window.dispatchEvent(new CustomEvent(e)),!i)){this.window.addEventListener(e,r);for(const u of this.onGlobalListenersRemoved)u()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=r=>{var l;return(l=this._hitTargetInterceptor)==null?void 0:l.call(this,r)},i=()=>{for(const r of this._allHitTargetInterceptorEvents)this.window.addEventListener(r,e,{capture:!0,passive:!1})};i(),this.onGlobalListenersRemoved.add(i)}async expect(e,i,r){var o,u;if(i.expression==="to.have.count"||i.expression.endsWith(".array"))return this.expectArray(r,i);if(!e){if(!i.isNot&&i.expression==="to.be.hidden")return{matches:!0};if(i.isNot&&i.expression==="to.be.visible")return{matches:!1};if(!i.isNot&&i.expression==="to.be.detached")return{matches:!0};if(i.isNot&&i.expression==="to.be.attached")return{matches:!1};if(i.isNot&&i.expression==="to.be.in.viewport")return{matches:!1};if(i.expression==="to.have.title"&&((o=i==null?void 0:i.expectedText)!=null&&o[0])){const f=new lr(i.expectedText[0]),h=this.document.title;return{received:h,matches:f.matches(h)}}if(i.expression==="to.have.url"&&((u=i==null?void 0:i.expectedText)!=null&&u[0])){const f=new lr(i.expectedText[0]),h=this.document.location.href;return{received:h,matches:f.matches(h)}}return{matches:i.isNot,missingReceived:!0}}return await this.expectSingleElement(e,i)}async expectSingleElement(e,i){var l;const r=i.expression;{let o;if(r==="to.have.attribute"){const u=e.hasAttribute(i.expressionArg);o={matches:u,received:u?"attribute present":"attribute not present"}}else if(r==="to.be.checked"){const{checked:u,indeterminate:f}=i.expectedValue;if(f){if(u!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");o=this.elementState(e,"indeterminate")}else o=this.elementState(e,u===!1?"unchecked":"checked")}else if(r==="to.be.disabled")o=this.elementState(e,"disabled");else if(r==="to.be.editable")o=this.elementState(e,"editable");else if(r==="to.be.readonly")o=this.elementState(e,"editable"),o.matches=!o.matches;else if(r==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e.value;o={matches:!u,received:u?"notEmpty":"empty"}}else{const u=(l=e.textContent)==null?void 0:l.trim();o={matches:!u,received:u?"notEmpty":"empty"}}else if(r==="to.be.enabled")o=this.elementState(e,"enabled");else if(r==="to.be.focused"){const u=this._activelyFocused(e).isFocused;o={matches:u,received:u?"focused":"inactive"}}else r==="to.be.hidden"?o=this.elementState(e,"hidden"):r==="to.be.visible"?o=this.elementState(e,"visible"):r==="to.be.attached"?o={matches:!0,received:"attached"}:r==="to.be.detached"&&(o={matches:!1,received
|
|||
|
|
body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
|
|||
|
|
body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
|
|||
|
|
`),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var r,l,o;Iv(this._listeners),this._listeners=[Ue(this.document,"click",u=>this._onClick(u),!0),Ue(this.document,"auxclick",u=>this._onClick(u),!0),Ue(this.document,"dblclick",u=>this._onDblClick(u),!0),Ue(this.document,"contextmenu",u=>this._onContextMenu(u),!0),Ue(this.document,"dragstart",u=>this._onDragStart(u),!0),Ue(this.document,"input",u=>this._onInput(u),!0),Ue(this.document,"keydown",u=>this._onKeyDown(u),!0),Ue(this.document,"keyup",u=>this._onKeyUp(u),!0),Ue(this.document,"pointerdown",u=>this._onPointerDown(u),!0),Ue(this.document,"pointerup",u=>this._onPointerUp(u),!0),Ue(this.document,"mousedown",u=>this._onMouseDown(u),!0),Ue(this.document,"mouseup",u=>this._onMouseUp(u),!0),Ue(this.document,"mousemove",u=>this._onMouseMove(u),!0),Ue(this.document,"mouseleave",u=>this._onMouseLeave(u),!0),Ue(this.document,"mouseenter",u=>this._onMouseEnter(u),!0),Ue(this.document,"focus",u=>this._onFocus(u),!0),Ue(this.document,"scroll",u=>this._onScroll(u),!0)],this.highlight.install();let e;const i=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(i,500)};e=this.injectedScript.utils.builtins.setTimeout(i,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(Vv(this.document,qA)),(r=this.overlay)==null||r.install(),(o=(l=this._currentTool)==null?void 0:l.install)==null||o.call(l),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var r,l,o,u,f,h;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(l=(r=this._currentTool).uninstall)==null||l.call(r),this.clearHighlight(),this._currentTool=e,(u=(o=this._currentTool).install)==null||u.call(o);const i=(f=e.cursor)==null?void 0:f.call(e);i&&((h=this.injectedScript.document.body)==null||h.setAttribute("data-pw-cursor",i))}setUIState(e,i){var o;this._delegate=i,e.actionPoint&&this.state.actionPoint&&e.actionPoint.x===this.state.actionPoint.x&&e.actionPoint.y===this.state.actionPoint.y||!e.actionPoint&&!this.state.actionPoint||(e.actionPoint?this.highlight.showActionPoint(e.actionPoint.x,e.actionPoint.y):this.highlight.hideActionPoint()),this.state=e,this.highlight.setLanguage(e.language),this._switchCurrentTool(),(o=this.overlay)==null||o.setUIState(e);let r="noop";if(e.actionSelector!==this._lastHighlightedSelector){const u=e.actionSelector?YA(this.injectedScript,e.language,e.actionSelector,this.document):null;r=u!=null&&u.length?u:"clear",this._lastHighlightedSelector=u!=null&&u.length?e.actionSelector:void 0}const l=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==l){const u=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(u.length){const f=u.length>1?cn.multiple:cn.single;r=u.map(h=>({element:h,color:f})),this._lastHighlightedAriaTemplateJSON=l}else this._lastHighlightedSelector||(r="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}r==="clear"?this.highlight.clearHighlight():r!=="noop"&&this.highlight.updateHighlight(r)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var i,r,l;e.isTrusted&&((i=this.overlay)!=null&&i.onClick(e)||this._ignoreOverlayEvent(e)||(l=(r=this._currentTool).onClick)==null||l.call(r,e))}_onDblClick(e){var i,r,l;e.isTrusted&&((i=this.overlay)!=null&&i.onDblClick(e)||this._ignoreOverlayEvent(e)||(l=(r=this._currentTool).onDblClick)==null||l.call(r,e))}_onContextMenu(e){var i,r;e.isTrusted&&((r=(i=this._currentTool).onContextMenu)==null||r.call(i,e))}_onDragStart(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onDragStart)==null||r.call(i,e))}_onPointerDown(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onPointerDown)==null||r.call(i,e))}_onPointerUp(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onPointerUp)==null||r.call(i,e))}_onMouseDown(e){var i,r;e.isTrus
|
|||
|
|
`:n[o]==="r"?h+="\r":n[o]==="t"?h+=" ":h+=n[o]),++o;continue}if(n[o]!==u){h+=n[o++];continue}break}i.push({quote:u,text:h}),r+=(u==="/"?"r":"")+"$"+i.length}r=r.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",").replace(/,\)/g,")");const l=i.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:Gv(r,i,e),preferredQuote:l}}function L0(n){return[...n.matchAll(/\$\d+/g)].length}function R0(n,e){return n.replace(/\$(\d+)/g,(i,r)=>`$${r-e}`)}function Gv(n,e,i){for(;;){const l=n.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!l)break;const o=l.index+l[0].length;let u=0,f=o;for(;f<n.length&&(n[f]==="("?u++:n[f]===")"&&u--,!(u<0));f++);let h=n.substring(0,o),g=0;["sethas(","sethasnot("].includes(l[1])&&(g=1,h=h.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const y=L0(n.substring(0,o)),m=R0(n.substring(o,f),y),w=L0(m),v=e.slice(y,y+w),E=JSON.stringify(Gv(m,v,i));n=h.replace(/=$/,"2=")+`$${y+1}`+R0(n.substring(f+g),w-1);const x=e.slice(0,y),_=e.slice(y+w);e=x.concat([{quote:'"',text:E}]).concat(_)}n=n.replace(/\,set([\w]+)\(([^)]+)\)/g,(l,o,u)=>","+o.toLowerCase()+"="+u.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${i}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?visible=true\)/g,"visible=true").replace(/filter\(,?visible=false\)/g,"visible=false").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const r=n.split(".");for(let l=0;l<r.length-1;l++)if(r[l]==="internal:control=enter-frame"&&r[l+1].startsWith("nth=")){const[o]=r.splice(l,1);r.splice(l+1,0,o)}return r.map(l=>!l.startsWith("internal:")||l==="internal:control"?l.replace(/\$(\d+)/g,(o,u)=>e[+u-1].text):(l=l.includes("[")?l.replace(/\]/,"")+"]":l,l=l.replace(/(?:r)\$(\d+)(i)?/g,(o,u,f)=>{const h=e[+u-1];return l.startsWith("internal:attr")||l.startsWith("internal:testid")||l.startsWith("internal:role")?Tt(new RegExp(h.text),!1)+(f||""):zt(new RegExp(h.text,f),!1)}).replace(/\$(\d+)(i|s)?/g,(o,u,f)=>{const h=e[+u-1];return l.startsWith("internal:has=")||l.startsWith("internal:has-not=")?h.text:l.startsWith("internal:testid")?Tt(h.text,!0):l.startsWith("internal:attr")||l.startsWith("internal:role")?Tt(h.text,f==="s"):zt(h.text,f==="s")}),l)).join(" >> ")}function QA(n,e,i){try{return JA(n,e,i)}catch{return""}}function JA(n,e
|
|||
|
|
`)}}_t.defaultYaml={explicit:!1,version:"1.2"};_t.defaultTags={"!!":"tag:yaml.org,2002:"};function Jv(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){const i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(i)}return!0}function Pv(n){const e=new Set;return Ri(n,{Value(i,r){r.anchor&&e.add(r.anchor)}}),e}function Zv(n,e){for(let i=1;;++i){const r=`${n}${i}`;if(!e.has(r))return r}}function tN(n,e){const i=[],r=new Map;let l=null;return{onAnchor:o=>{i.push(o),l||(l=Pv(n));const u=Zv(e,l);return l.add(u),u},setAnchors:()=>{for(const o of i){const u=r.get(o);if(typeof u=="object"&&u.anchor&&(Le(u.node)||$e(u.node)))u.node.anchor=u.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=o,f}}},sourceObjects:r}}function yr(n,e,i,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let l=0,o=r.length;l<o;++l){const u=r[l],f=yr(n,r,String(l),u);f===void 0?delete r[l]:f!==u&&(r[l]=f)}else if(r instanceof Map)for(const l of Array.from(r.keys())){const o=r.get(l),u=yr(n,r,l,o);u===void 0?r.delete(l):u!==o&&r.set(l,u)}else if(r instanceof Set)for(const l of Array.from(r)){const o=yr(n,r,l,l);o===void 0?r.delete(l):o!==l&&(r.delete(l),r.add(o))}else for(const[l,o]of Object.entries(r)){const u=yr(n,r,l,o);u===void 0?delete r[l]:u!==o&&(r[l]=u)}return n.call(e,i,r)}function un(n,e,i){if(Array.isArray(n))return n.map((r,l)=>un(r,String(l),i));if(n&&typeof n.toJSON=="function"){if(!i||!ZA(n))return n.toJSON(e,i);const r={aliasCount:0,count:1,res:void 0};i.anchors.set(n,r),i.onCreate=o=>{r.res=o,delete i.onCreate};const l=n.toJSON(e,i);return i.onCreate&&i.onCreate(l),l}return typeof n=="bigint"&&!(i!=null&&i.keep)?Number(n):n}class kd{constructor(e){Object.defineProperty(this,fn,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:i,maxAliasCount:r,onAnchor:l,reviver:o}={}){if(!bs(e))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:e,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},f=un(this,"",u);if(typeof l=="function")for(const{count:h,res:g}of u.anchors.values())l(g,h);return typeof o=="function"?yr(o,{"":f},"",f):f}}class _c extends kd{constructor(e){super(Cd),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let i;return Ri(e,{Node:(r,l)=>{if(l===this)return Ri.BREAK;l.anchor===this.source&&(i=l)}}),i}toJSON(e,i){if(!i)return{source:this.source};const{anchors:r,doc:l,maxAliasCount:o}=i,u=this.resolve(l);if(!u){const h=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(h)}let f=r.get(u);if(f||(un(u,null,i),f=r.get(u)),!f||f.res===void 0){const h="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(h)}if(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=Jo(l,u,r)),f.count*f.aliasCount>o)){const h="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(h)}return f.res}toString(e,i,r){const l=`*${this.source}`;if(e){if(Jv(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${l} `}return l}}function Jo(n,e,i){if(ys(e)){const r=e.resolve(n),l=i&&r&&i.get(r);return l?l.count*l.aliasCount:0}else if($e(e)){let r=0;for(const l of e.items){const o=Jo(n,l,i);o>r&&(r=o)}return r}else if(He(e)){const r=Jo(n,e.key,i),l=Jo(n,e.value,i);return Math.max(r,l)}return 1}const Wv=n=>!n||typeof n!="function"&&typeof n!="object";class he extends kd{constructor(e){super(Cn),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:un(this.value,e,i)}toString(){return String(this.value)}}he.BLOCK_FOLDED="BLOCK_FOLDED";he.BLOCK_LITERAL="BLOCK_LITERAL";he.PLAIN="PLAIN";he.QUOTE_DOUBLE="QUOTE_DOUBLE";he.QUOTE_SINGLE="QUOTE_SINGLE";const nN="tag:yaml.org,2002:";function i
|
|||
|
|
`)?Wn(i,e):i.includes(`
|
|||
|
|
`)?`
|
|||
|
|
`+Wn(i,e):(n.endsWith(" ")?"":" ")+i,tS="flow",Ih="block",Po="quoted";function Tc(n,e,i="flow",{indentAtStart:r,lineWidth:l=80,minContentWidth:o=20,onFold:u,onOverflow:f}={}){if(!l||l<0)return n;l<o&&(o=0);const h=Math.max(1+o,1+l-e.length);if(n.length<=h)return n;const g=[],y={};let m=l-e.length;typeof r=="number"&&(r>l-Math.max(2,o)?g.push(0):m=l-r);let w,v,E=!1,x=-1,_=-1,N=-1;i===Ih&&(x=z0(n,x,e.length),x!==-1&&(m=x+h));for(let $;$=n[x+=1];){if(i===Po&&$==="\\"){switch(_=x,n[x+1]){case"x":x+=3;break;case"u":x+=5;break;case"U":x+=9;break;default:x+=1}N=x}if($===`
|
|||
|
|
`)i===Ih&&(x=z0(n,x,e.length)),m=x+e.length+h,w=void 0;else{if($===" "&&v&&v!==" "&&v!==`
|
|||
|
|
`&&v!==" "){const I=n[x+1];I&&I!==" "&&I!==`
|
|||
|
|
`&&I!==" "&&(w=x)}if(x>=m)if(w)g.push(w),m=w+h,w=void 0;else if(i===Po){for(;v===" "||v===" ";)v=$,$=n[x+=1],E=!0;const I=x>N+1?x-2:_-1;if(y[I])return n;g.push(I),y[I]=!0,m=I+h,w=void 0}else E=!0}v=$}if(E&&f&&f(),g.length===0)return n;u&&u();let C=n.slice(0,g[0]);for(let $=0;$<g.length;++$){const I=g[$],D=g[$+1]||n.length;I===0?C=`
|
|||
|
|
${e}${n.slice(0,D)}`:(i===Po&&y[I]&&(C+=`${n[I]}\\`),C+=`
|
|||
|
|
${e}${n.slice(I+1,D)}`)}return C}function z0(n,e,i){let r=e,l=e+1,o=n[l];for(;o===" "||o===" ";)if(e<l+i)o=n[++e];else{do o=n[++e];while(o&&o!==`
|
|||
|
|
`);r=e,l=e+1,o=n[l]}return r}const Ec=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),Ac=n=>/^(%|---|\.\.\.)/m.test(n);function rN(n,e,i){if(!e||e<0)return!1;const r=e-i,l=n.length;if(l<=r)return!1;for(let o=0,u=0;o<l;++o)if(n[o]===`
|
|||
|
|
`){if(o-u>r)return!0;if(u=o+1,l-u<=r)return!1}return!0}function tl(n,e){const i=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return i;const{implicitKey:r}=e,l=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Ac(n)?" ":"");let u="",f=0;for(let h=0,g=i[h];g;g=i[++h])if(g===" "&&i[h+1]==="\\"&&i[h+2]==="n"&&(u+=i.slice(f,h)+"\\ ",h+=1,f=h,g="\\"),g==="\\")switch(i[h+1]){case"u":{u+=i.slice(f,h);const y=i.substr(h+2,4);switch(y){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:y.substr(0,2)==="00"?u+="\\x"+y.substr(2):u+=i.substr(h,6)}h+=5,f=h+1}break;case"n":if(r||i[h+2]==='"'||i.length<l)h+=1;else{for(u+=i.slice(f,h)+`
|
|||
|
|
|
|||
|
|
`;i[h+2]==="\\"&&i[h+3]==="n"&&i[h+4]!=='"';)u+=`
|
|||
|
|
`,h+=2;u+=o,i[h+2]===" "&&(u+="\\"),h+=1,f=h+1}break;default:h+=1}return u=f?u+i.slice(f):i,r?u:Tc(u,o,Po,Ec(e,!1))}function Vh(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
|
|||
|
|
`)||/[ \t]\n|\n[ \t]/.test(n))return tl(n,e);const i=e.indent||(Ac(n)?" ":""),r="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
|
|||
|
|
${i}`)+"'";return e.implicitKey?r:Tc(r,i,tS,Ec(e,!1))}function br(n,e){const{singleQuote:i}=e.options;let r;if(i===!1)r=tl;else{const l=n.includes('"'),o=n.includes("'");l&&!o?r=Vh:o&&!l?r=tl:r=i?Vh:tl}return r(n,e)}let Gh;try{Gh=new RegExp(`(^|(?<!
|
|||
|
|
))
|
|||
|
|
+(?!
|
|||
|
|
|$)`,"g")}catch{Gh=/\n+(?!\n|$)/g}function Zo({comment:n,type:e,value:i},r,l,o){const{blockQuote:u,commentString:f,lineWidth:h}=r.options;if(!u||/\n[\t ]+$/.test(i)||/^\s*$/.test(i))return br(i,r);const g=r.indent||(r.forceBlockIndent||Ac(i)?" ":""),y=u==="literal"?!0:u==="folded"||e===he.BLOCK_FOLDED?!1:e===he.BLOCK_LITERAL?!0:!rN(i,h,g.length);if(!i)return y?`|
|
|||
|
|
`:`>
|
|||
|
|
`;let m,w;for(w=i.length;w>0;--w){const K=i[w-1];if(K!==`
|
|||
|
|
`&&K!==" "&&K!==" ")break}let v=i.substring(w);const E=v.indexOf(`
|
|||
|
|
`);E===-1?m="-":i===v||E!==v.length-1?(m="+",o&&o()):m="",v&&(i=i.slice(0,-v.length),v[v.length-1]===`
|
|||
|
|
`&&(v=v.slice(0,-1)),v=v.replace(Gh,`$&${g}`));let x=!1,_,N=-1;for(_=0;_<i.length;++_){const K=i[_];if(K===" ")x=!0;else if(K===`
|
|||
|
|
`)N=_;else break}let C=i.substring(0,N<_?N+1:_);C&&(i=i.substring(C.length),C=C.replace(/\n+/g,`$&${g}`));let I=(y?"|":">")+(x?g?"2":"1":"")+m;if(n&&(I+=" "+f(n.replace(/ ?[\r\n]+/g," ")),l&&l()),y)return i=i.replace(/\n+/g,`$&${g}`),`${I}
|
|||
|
|
${g}${C}${i}${v}`;i=i.replace(/\n+/g,`
|
|||
|
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);const D=Tc(`${C}${i}${v}`,g,Ih,Ec(r,!0));return`${I}
|
|||
|
|
${g}${D}`}function aN(n,e,i,r){const{type:l,value:o}=n,{actualString:u,implicitKey:f,indent:h,indentStep:g,inFlow:y}=e;if(f&&o.includes(`
|
|||
|
|
`)||y&&/[[\]{},]/.test(o))return br(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||y||!o.includes(`
|
|||
|
|
`)?br(o,e):Zo(n,e,i,r);if(!f&&!y&&l!==he.PLAIN&&o.includes(`
|
|||
|
|
`))return Zo(n,e,i,r);if(Ac(o)){if(h==="")return e.forceBlockIndent=!0,Zo(n,e,i,r);if(f&&h===g)return br(o,e)}const m=o.replace(/\n+/g,`$&
|
|||
|
|
${h}`);if(u){const w=x=>{var _;return x.default&&x.tag!=="tag:yaml.org,2002:str"&&((_=x.test)==null?void 0:_.test(m))},{compat:v,tags:E}=e.doc.schema;if(E.some(w)||v!=null&&v.some(w))return br(o,e)}return f?m:Tc(m,h,tS,Ec(e,!1))}function ul(n,e,i,r){const{implicitKey:l,inFlow:o}=e,u=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:f}=n;f!==he.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(f=he.QUOTE_DOUBLE);const h=y=>{switch(y){case he.BLOCK_FOLDED:case he.BLOCK_LITERAL:return l||o?br(u.value,e):Zo(u,e,i,r);case he.QUOTE_DOUBLE:return tl(u.value,e);case he.QUOTE_SINGLE:return Vh(u.value,e);case he.PLAIN:return aN(u,e,i,r);default:return null}};let g=h(f);if(g===null){const{defaultKeyType:y,defaultStringType:m}=e.options,w=l&&y||m;if(g=h(w),g===null)throw new Error(`Unsupported default string type ${w}`)}return g}function nS(n,e){const i=Object.assign({blockQuote:!0,commentString:sN,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e);let r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:n,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:r,options:i}}function lN(n,e){var l;if(e.tag){const o=n.filter(u=>u.tag===e.tag);if(o.length>0)return o.find(u=>u.format===e.format)??o[0]}let i,r;if(Le(e)){r=e.value;let o=n.filter(u=>{var f;return(f=u.identify)==null?void 0:f.call(u,r)});if(o.length>1){const u=o.filter(f=>f.test);u.length>0&&(o=u)}i=o.find(u=>u.format===e.format)??o.find(u=>!u.format)}else r=e,i=n.find(o=>o.nodeClass&&r instanceof o.nodeClass);if(!i){const o=((l=r==null?void 0:r.constructor)==null?void 0:l.name)??typeof r;throw new Error(`Tag not resolved for ${o} value`)}return i}function oN(n,e,{anchors:i,doc:r}){if(!r.directives)return"";const l=[],o=(Le(n)||$e(n))&&n.anchor;o&&Jv(o)&&(i.add(o),l.push(`&${o}`));const u=n.tag?n.tag:e.default?null:e.tag;return u&&l.push(r.directives.tagString(u)),l.join(" ")}function _r(n,e,i,r){var h;if(He(n))return n.toString(e,i,r);if(ys(n)){if(e.doc.directives)return n.toString(e);if((h=e.resolvedAliases)!=null&&h.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let l;const o=Ie(n)?n:e.doc.createNode(n,{onTagObj:g=>l=g});l||(l=lN(e.doc.schema.tags,o));const u=oN(o,l,e);u.length>0&&(e.indentAtStart=(e.indentAtStart??0)+u.length+1);const f=typeof l.stringify=="function"?l.stringify(o,e,i,r):Le(o)?ul(o,e,i,r):o.toString(e,i,r);return u?Le(o)||f[0]==="{"||f[0]==="["?`${u} ${f}`:`${u}
|
|||
|
|
${e.indent}${f}`:f}function cN({key:n,value:e},i,r,l){const{allNullValues:o,doc:u,indent:f,indentStep:h,options:{commentString:g,indentSeq:y,simpleKeys:m}}=i;let w=Ie(n)&&n.comment||null;if(m){if(w)throw new Error("With simple keys, key nodes cannot have comments");if($e(n)||!Ie(n)&&typeof n=="object"){const Q="With simple keys, collection cannot be used as a key value";throw new Error(Q)}}let v=!m&&(!n||w&&e==null&&!i.inFlow||$e(n)||(Le(n)?n.type===he.BLOCK_FOLDED||n.type===he.BLOCK_LITERAL:typeof n=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!v&&(m||!o),indent:f+h});let E=!1,x=!1,_=_r(n,i,()=>E=!0,()=>x=!0);if(!v&&!i.inFlow&&_.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(i.inFlow){if(o||e==null)return E&&r&&r(),_===""?"?":v?`? ${_}`:_}else if(o&&!m||e==null&&v)return _=`? ${_}`,w&&!E?_+=us(_,i.indent,g(w)):x&&l&&l(),_;E&&(w=null),v?(w&&(_+=us(_,i.indent,g(w))),_=`? ${_}
|
|||
|
|
${f}:`):(_=`${_}:`,w&&(_+=us(_,i.indent,g(w))));let N,C,$;Ie(e)?(N=!!e.spaceBefore,C=e.commentBefore,$=e.comment):(N=!1,C=null,$=null,e&&typeof e=="object"&&(e=u.createNode(e))),i.implicitKey=!1,!v&&!w&&Le(e)&&(i.indentAtStart=_.length+1),x=!1,!y&&h.length>=2&&!i.inFlow&&!v&&Or(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let I=!1;const D=_r(e,i,()=>I=!0,()=>x=!0);let K=" ";if(w||N||C){if(K=N?`
|
|||
|
|
`:"",C){const Q=g(C);K+=`
|
|||
|
|
${Wn(Q,i.indent)}`}D===""&&!i.inFlow?K===`
|
|||
|
|
`&&(K=`
|
|||
|
|
|
|||
|
|
`):K+=`
|
|||
|
|
${i.indent}`}else if(!v&&$e(e)){const Q=D[0],q=D.indexOf(`
|
|||
|
|
`),j=q!==-1,ne=i.inFlow??e.flow??e.items.length===0;if(j||!ne){let le=!1;if(j&&(Q==="&"||Q==="!")){let V=D.indexOf(" ");Q==="&"&&V!==-1&&V<q&&D[V+1]==="!"&&(V=D.indexOf(" ",V+1)),(V===-1||q<V)&&(le=!0)}le||(K=`
|
|||
|
|
${i.indent}`)}}else(D===""||D[0]===`
|
|||
|
|
`)&&(K="");return _+=K+D,i.inFlow?I&&r&&r():$&&!I?_+=us(_,i.indent,g($)):x&&l&&l(),_}function iS(n,e){(n==="debug"||n==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const zo="<<",ei={identify:n=>n===zo||typeof n=="symbol"&&n.description===zo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new he(Symbol(zo)),{addToJSMap:sS}),stringify:()=>zo},uN=(n,e)=>(ei.identify(e)||Le(e)&&(!e.type||e.type===he.PLAIN)&&ei.identify(e.value))&&(n==null?void 0:n.doc.schema.tags.some(i=>i.tag===ei.tag&&i.default));function sS(n,e,i){if(i=n&&ys(i)?i.resolve(n.doc):i,Or(i))for(const r of i.items)bh(n,e,r);else if(Array.isArray(i))for(const r of i)bh(n,e,r);else bh(n,e,i)}function bh(n,e,i){const r=n&&ys(i)?i.resolve(n.doc):i;if(!Mr(r))throw new Error("Merge sources must be maps or map aliases");const l=r.toJSON(null,n,Map);for(const[o,u]of l)e instanceof Map?e.has(o)||e.set(o,u):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0});return e}function rS(n,e,{key:i,value:r}){if(Ie(i)&&i.addToJSMap)i.addToJSMap(n,e,r);else if(uN(n,i))sS(n,e,r);else{const l=un(i,"",n);if(e instanceof Map)e.set(l,un(r,l,n));else if(e instanceof Set)e.add(l);else{const o=fN(i,l,n),u=un(r,o,n);o in e?Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[o]=u}}return e}function fN(n,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(Ie(n)&&(i!=null&&i.doc)){const r=nS(i.doc,{});r.anchors=new Set;for(const o of i.anchors.keys())r.anchors.add(o.anchor);r.inFlow=!0,r.inStringifyKey=!0;const l=n.toString(r);if(!i.mapKeyWarned){let o=JSON.stringify(l);o.length>40&&(o=o.substring(0,36)+'..."'),iS(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return l}return JSON.stringify(e)}function Md(n,e,i){const r=rl(n,void 0,i),l=rl(e,void 0,i);return new vt(r,l)}class vt{constructor(e,i=null){Object.defineProperty(this,fn,{value:Kv}),this.key=e,this.value=i}clone(e){let{key:i,value:r}=this;return Ie(i)&&(i=i.clone(e)),Ie(r)&&(r=r.clone(e)),new vt(i,r)}toJSON(e,i){const r=i!=null&&i.mapAsMap?new Map:{};return rS(i,r,this)}toString(e,i,r){return e!=null&&e.doc?cN(this,e,i,r):JSON.stringify(this)}}function aS(n,e,i){return(e.inFlow??n.flow?dN:hN)(n,e,i)}function hN({comment:n,items:e},i,{blockItemPrefix:r,flowChars:l,itemIndent:o,onChompKeep:u,onComment:f}){const{indent:h,options:{commentString:g}}=i,y=Object.assign({},i,{indent:o,type:null});let m=!1;const w=[];for(let E=0;E<e.length;++E){const x=e[E];let _=null;if(Ie(x))!m&&x.spaceBefore&&w.push(""),hc(i,w,x.commentBefore,m),x.comment&&(_=x.comment);else if(He(x)){const C=Ie(x.key)?x.key:null;C&&(!m&&C.spaceBefore&&w.push(""),hc(i,w,C.commentBefore,m))}m=!1;let N=_r(x,y,()=>_=null,()=>m=!0);_&&(N+=us(N,o,g(_))),m&&_&&(m=!1),w.push(r+N)}let v;if(w.length===0)v=l.start+l.end;else{v=w[0];for(let E=1;E<w.length;++E){const x=w[E];v+=x?`
|
|||
|
|
${h}${x}`:`
|
|||
|
|
`}}return n?(v+=`
|
|||
|
|
`+Wn(g(n),h),f&&f()):m&&u&&u(),v}function dN({items:n},e,{flowChars:i,itemIndent:r}){const{indent:l,indentStep:o,flowCollectionPadding:u,options:{commentString:f}}=e;r+=o;const h=Object.assign({},e,{indent:r,inFlow:!0,type:null});let g=!1,y=0;const m=[];for(let E=0;E<n.length;++E){const x=n[E];let _=null;if(Ie(x))x.spaceBefore&&m.push(""),hc(e,m,x.commentBefore,!1),x.comment&&(_=x.comment);else if(He(x)){const C=Ie(x.key)?x.key:null;C&&(C.spaceBefore&&m.push(""),hc(e,m,C.commentBefore,!1),C.comment&&(g=!0));const $=Ie(x.value)?x.value:null;$?($.comment&&(_=$.comment),$.commentBefore&&(g=!0)):x.value==null&&(C!=null&&C.comment)&&(_=C.comment)}_&&(g=!0);let N=_r(x,h,()=>_=null);E<n.length-1&&(N+=","),_&&(N+=us(N,r,f(_))),!g&&(m.length>y||N.includes(`
|
|||
|
|
`))&&(g=!0),m.push(N),y=m.length}const{start:w,end:v}=i;if(m.length===0)return w+v;if(!g){const E=m.reduce((x,_)=>x+_.length+2,2);g=e.options.lineWidth>0&&E>e.options.lineWidth}if(g){let E=w;for(const x of m)E+=x?`
|
|||
|
|
${o}${l}${x}`:`
|
|||
|
|
`;return`${E}
|
|||
|
|
${l}${v}`}else return`${w}${u}${m.join(" ")}${u}${v}`}function hc({indent:n,options:{commentString:e}},i,r,l){if(r&&l&&(r=r.replace(/^\n+/,"")),r){const o=Wn(e(r),n);i.push(o.trimStart())}}function fs(n,e){const i=Le(e)?e.value:e;for(const r of n)if(He(r)&&(r.key===e||r.key===i||Le(r.key)&&r.key.value===i))return r}class Xt extends eS{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Li,e),this.items=[]}static from(e,i,r){const{keepUndefined:l,replacer:o}=r,u=new this(e),f=(h,g)=>{if(typeof o=="function")g=o.call(i,h,g);else if(Array.isArray(o)&&!o.includes(h))return;(g!==void 0||l)&&u.items.push(Md(h,g,r))};if(i instanceof Map)for(const[h,g]of i)f(h,g);else if(i&&typeof i=="object")for(const h of Object.keys(i))f(h,i[h]);return typeof e.sortMapEntries=="function"&&u.items.sort(e.sortMapEntries),u}add(e,i){var u;let r;He(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new vt(e,e==null?void 0:e.value):r=new vt(e.key,e.value);const l=fs(this.items,r.key),o=(u=this.schema)==null?void 0:u.sortMapEntries;if(l){if(!i)throw new Error(`Key ${r.key} already set`);Le(l.value)&&Wv(r.value)?l.value.value=r.value:l.value=r.value}else if(o){const f=this.items.findIndex(h=>o(r,h)<0);f===-1?this.items.push(r):this.items.splice(f,0,r)}else this.items.push(r)}delete(e){const i=fs(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){const r=fs(this.items,e),l=r==null?void 0:r.value;return(!i&&Le(l)?l.value:l)??void 0}has(e){return!!fs(this.items,e)}set(e,i){this.add(new vt(e,i),!0)}toJSON(e,i,r){const l=r?new r:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(l);for(const o of this.items)rS(i,l,o);return l}toString(e,i,r){if(!e)return JSON.stringify(this);for(const l of this.items)if(!He(l))throw new Error(`Map items must all be pairs; found ${JSON.stringify(l)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),aS(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:i})}}const jr={collection:"map",default:!0,nodeClass:Xt,tag:"tag:yaml.org,2002:map",resolve(n,e){return Mr(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,i)=>Xt.from(n,e,i)};class Di extends eS{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(kr,e),this.items=[]}add(e){this.items.push(e)}delete(e){const i=Bo(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){const r=Bo(e);if(typeof r!="number")return;const l=this.items[r];return!i&&Le(l)?l.value:l}has(e){const i=Bo(e);return typeof i=="number"&&i<this.items.length}set(e,i){const r=Bo(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const l=this.items[r];Le(l)&&Wv(i)?l.value=i:this.items[r]=i}toJSON(e,i){const r=[];i!=null&&i.onCreate&&i.onCreate(r);let l=0;for(const o of this.items)r.push(un(o,String(l++),i));return r}toString(e,i,r){return e?aS(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:i}):JSON.stringify(this)}static from(e,i,r){const{replacer:l}=r,o=new this(e);if(i&&Symbol.iterator in Object(i)){let u=0;for(let f of i){if(typeof l=="function"){const h=i instanceof Set?f:String(u++);f=l.call(i,h,f)}o.items.push(rl(f,void 0,r))}}return o}}function Bo(n){let e=Le(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Lr={collection:"seq",default:!0,nodeClass:Di,tag:"tag:yaml.org,2002:seq",resolve(n,e){return Or(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,i)=>Di.from(n,e,i)},Nc={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,i,r){return e=Object.assign({actualString:!0},e),ul(n,e,i,r)}},Cc={identify:n=>n==null,createNode:()=>new he(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new he(null),stringify:({source:n},e)=>typeof n=="string"&&Cc.test.test(n)?n:e.options.nullStr},Od={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,
|
|||
|
|
`:" ")}return ul({comment:n,type:e,value:f},r,l,o)}};function pS(n,e){if(Or(n))for(let i=0;i<n.items.length;++i){let r=n.items[i];if(!He(r)){if(Mr(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const l=r.items[0]||new vt(new he(null));if(r.commentBefore&&(l.key.commentBefore=l.key.commentBefore?`${r.commentBefore}
|
|||
|
|
${l.key.commentBefore}`:r.commentBefore),r.comment){const o=l.value??l.key;o.comment=o.comment?`${r.comment}
|
|||
|
|
${o.comment}`:r.comment}r=l}n.items[i]=He(r)?r:new vt(r)}}else e("Expected a sequence for this tag");return n}function gS(n,e,i){const{replacer:r}=i,l=new Di(n);l.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let u of e){typeof r=="function"&&(u=r.call(e,String(o++),u));let f,h;if(Array.isArray(u))if(u.length===2)f=u[0],h=u[1];else throw new TypeError(`Expected [key, value] tuple: ${u}`);else if(u&&u instanceof Object){const g=Object.keys(u);if(g.length===1)f=g[0],h=u[f];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else f=u;l.items.push(Md(f,h,i))}return l}const Rd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:pS,createNode:gS};class Sr extends Di{constructor(){super(),this.add=Xt.prototype.add.bind(this),this.delete=Xt.prototype.delete.bind(this),this.get=Xt.prototype.get.bind(this),this.has=Xt.prototype.has.bind(this),this.set=Xt.prototype.set.bind(this),this.tag=Sr.tag}toJSON(e,i){if(!i)return super.toJSON(e);const r=new Map;i!=null&&i.onCreate&&i.onCreate(r);for(const l of this.items){let o,u;if(He(l)?(o=un(l.key,"",i),u=un(l.value,o,i)):o=un(l,"",i),r.has(o))throw new Error("Ordered maps must not include duplicate keys");r.set(o,u)}return r}static from(e,i,r){const l=gS(e,i,r),o=new this;return o.items=l.items,o}}Sr.tag="tag:yaml.org,2002:omap";const Dd={collection:"seq",identify:n=>n instanceof Map,nodeClass:Sr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const i=pS(n,e),r=[];for(const{key:l}of i.items)Le(l)&&(r.includes(l.value)?e(`Ordered maps must not include duplicate keys: ${l.value}`):r.push(l.value));return Object.assign(new Sr,i)},createNode:(n,e,i)=>Sr.from(n,e,i)};function mS({value:n,source:e},i){return e&&(n?yS:bS).test.test(e)?e:n?i.options.trueStr:i.options.falseStr}const yS={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new he(!0),stringify:mS},bS={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new he(!1),stringify:mS},bN={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:bn},vN={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():bn(n)}},SN={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){const e=new he(parseFloat(n.replace(/_/g,""))),i=n.indexOf(".");if(i!==-1){const r=n.substring(i+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:bn},fl=n=>typeof n=="bigint"||Number.isInteger(n);function Mc(n,e,i,{intAsBigInt:r}){const l=n[0];if((l==="-"||l==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),r){switch(i){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const u=BigInt(n);return l==="-"?BigInt(-1)*u:u}const o=parseInt(n,i);return l==="-"?-1*o:o}function zd(n,e,i){const{value:r}=n;if(fl(r)){const l=r.toString(e);return r<0?"-"+i+l.substr(1):i+l}return bn(n)}const wN={identify:fl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,i)=>Mc(n,2,2,i),stringify:n=>zd(n,2,"0b")},xN={identify:fl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,i)=>Mc(n,1,8,i),stringify:n=>zd(n,8,"0")},_N={identify:fl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,i)=>Mc(n,0,10,i),stringify:bn},TN={identify:fl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,i)=>Mc(n,2,16,i),stringify:n=>zd(n,16,"0x")};class wr extends Xt{constructor(e){super(e),this.tag=wr.tag}add(e){let i;He(e)?i=e:e&&typeof e=="o
|
|||
|
|
`)?(i.push("..."),i.push(Wn(g,""))):i.push(`... ${g}`)}else i.push("...");else{let g=n.comment;g&&u&&(g=g.replace(/^\n+/,"")),g&&((!u||f)&&i[i.length-1]!==""&&i.push(""),i.push(Wn(o(g),"")))}return i.join(`
|
|||
|
|
`)+`
|
|||
|
|
`}class Rr{constructor(e,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,fn,{value:$h});let l=null;typeof i=="function"||Array.isArray(i)?l=i:r===void 0&&i&&(r=i,i=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:u}=o;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new _t({version:u}),this.setSchema(u,r),this.contents=e===void 0?null:this.createNode(e,l,r)}clone(){const e=Object.create(Rr.prototype,{[fn]:{value:$h}});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=Ie(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){or(this.contents)&&this.contents.add(e)}addIn(e,i){or(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){const r=Pv(this);e.anchor=!i||r.has(i)?Zv(i||"a",r):i}return new _c(e.anchor)}createNode(e,i,r){let l;if(typeof i=="function")e=i.call({"":e},"",e),l=i;else if(Array.isArray(i)){const _=C=>typeof C=="number"||C instanceof String||C instanceof Number,N=i.filter(_).map(String);N.length>0&&(i=i.concat(N)),l=i}else r===void 0&&i&&(r=i,i=void 0);const{aliasDuplicateObjects:o,anchorPrefix:u,flow:f,keepUndefined:h,onTagObj:g,tag:y}=r??{},{onAnchor:m,setAnchors:w,sourceObjects:v}=tN(this,u||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:h??!1,onAnchor:m,onTagObj:g,replacer:l,schema:this.schema,sourceObjects:v},x=rl(e,y,E);return f&&$e(x)&&(x.flow=!0),w(),x}createPair(e,i,r={}){const l=this.createNode(e,null,r),o=this.createNode(i,null,r);return new vt(l,o)}delete(e){return or(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ka(e)?this.contents==null?!1:(this.contents=null,!0):or(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return $e(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return Ka(e)?!i&&Le(this.contents)?this.contents.value:this.contents:$e(this.contents)?this.contents.getIn(e,i):void 0}has(e){return $e(this.contents)?this.contents.has(e):!1}hasIn(e){return Ka(e)?this.contents!==void 0:$e(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=fc(this.schema,[e],i):or(this.contents)&&this.contents.set(e,i)}setIn(e,i){Ka(e)?this.contents=i:this.contents==null?this.contents=fc(this.schema,Array.from(e),i):or(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new _t({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 _t({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const l=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${l}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(r)this.schema=new jc(Object.assign(r,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:r,maxAliasCount:l,onAnchor:o,reviver:u}={}){const f={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},h=un(this.contents,i??"",f);if(typeof o=="function")for(const{count:g,res:y}of f.anchors.values())o(y,g);return typeof u=="function"?yr(u,{"":h},"",h):h}toJSON(e,i){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:i})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const i=JSON.stringify(e
|
|||
|
|
`),u=f+u}if(/[^ ]/.test(u)){let f=1;const h=i.linePos[1];h&&h.line===r&&h.col>l&&(f=Math.max(1,Math.min(h.col-l,80-o)));const g=" ".repeat(o)+"^".repeat(f);i.message+=`:
|
|||
|
|
|
|||
|
|
${u}
|
|||
|
|
${g}
|
|||
|
|
`}};function Tr(n,{flow:e,indicator:i,next:r,offset:l,onError:o,parentIndent:u,startOnNewline:f}){let h=!1,g=f,y=f,m="",w="",v=!1,E=!1,x=null,_=null,N=null,C=null,$=null,I=null,D=null;for(const q of n)switch(E&&(q.type!=="space"&&q.type!=="newline"&&q.type!=="comma"&&o(q.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),x&&(g&&q.type!=="comment"&&q.type!=="newline"&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),x=null),q.type){case"space":!e&&(i!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&q.source.includes(" ")&&(x=q),y=!0;break;case"comment":{y||o(q,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const j=q.source.substring(1)||" ";m?m+=w+j:m=j,w="",g=!1;break}case"newline":g?m?m+=q.source:h=!0:w+=q.source,g=!0,v=!0,(_||N)&&(C=q),y=!0;break;case"anchor":_&&o(q,"MULTIPLE_ANCHORS","A node can have at most one anchor"),q.source.endsWith(":")&&o(q.offset+q.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),_=q,D===null&&(D=q.offset),g=!1,y=!1,E=!0;break;case"tag":{N&&o(q,"MULTIPLE_TAGS","A node can have at most one tag"),N=q,D===null&&(D=q.offset),g=!1,y=!1,E=!0;break}case i:(_||N)&&o(q,"BAD_PROP_ORDER",`Anchors and tags must be after the ${q.source} indicator`),I&&o(q,"UNEXPECTED_TOKEN",`Unexpected ${q.source} in ${e??"collection"}`),I=q,g=i==="seq-item-ind"||i==="explicit-key-ind",y=!1;break;case"comma":if(e){$&&o(q,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),$=q,g=!1,y=!1;break}default:o(q,"UNEXPECTED_TOKEN",`Unexpected ${q.type} token`),g=!1,y=!1}const K=n[n.length-1],Q=K?K.offset+K.source.length:l;return E&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),x&&(g&&x.indent<=u||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:$,found:I,spaceBefore:h,comment:m,hasNewline:v,anchor:_,tag:N,newlineAfterProp:C,end:Q,start:D??Q}}function al(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
|
|||
|
|
`))return!0;if(n.end){for(const e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of n.items){for(const i of e.start)if(i.type==="newline")return!0;if(e.sep){for(const i of e.sep)if(i.type==="newline")return!0}if(al(e.key)||al(e.value))return!0}return!1;default:return!0}}function Kh(n,e,i){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===n&&(r.source==="]"||r.source==="}")&&al(e)&&i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function _S(n,e,i){const{uniqueKeys:r}=n.options;if(r===!1)return!1;const l=typeof r=="function"?r:(o,u)=>o===u||Le(o)&&Le(u)&&o.value===u.value;return e.some(o=>l(o.key,i))}const $0="All mapping items must start at the same column";function CN({composeNode:n,composeEmptyNode:e},i,r,l,o){var y;const u=(o==null?void 0:o.nodeClass)??Xt,f=new u(i.schema);i.atRoot&&(i.atRoot=!1);let h=r.offset,g=null;for(const m of r.items){const{start:w,key:v,sep:E,value:x}=m,_=Tr(w,{indicator:"explicit-key-ind",next:v??(E==null?void 0:E[0]),offset:h,onError:l,parentIndent:r.indent,startOnNewline:!0}),N=!_.found;if(N){if(v&&(v.type==="block-seq"?l(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in v&&v.indent!==r.indent&&l(h,"BAD_INDENT",$0)),!_.anchor&&!_.tag&&!E){g=_.end,_.comment&&(f.comment?f.comment+=`
|
|||
|
|
`+_.comment:f.comment=_.comment);continue}(_.newlineAfterProp||al(v))&&l(v??w[w.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((y=_.found)==null?void 0:y.indent)!==r.indent&&l(h,"BAD_INDENT",$0);i.atKey=!0;const C=_.end,$=v?n(i,v,_,l):e(i,C,w,null,_,l);i.schema.compat&&Kh(r.indent,v,l),i.atKey=!1,_S(i,f.items,$)&&l(C,"DUPLICATE_KEY","Map keys must be unique");const I=Tr(E??[],{indicator:"map-value-ind",next:x,offset:$.range[2],onError:l,parentIndent:r.indent,startOnNewline:!v||v.type==="block-scalar"});if(h=I.end,I.found){N&&((x==null?void 0:x.type)==="block-map"&&!I.hasNewline&&l(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&_.start<I.found.offset-1024&&l($.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const D=x?n(i,x,I,l):e(i,h,E,null,I,l);i.schema.compat&&Kh(r.indent,x,l),h=D.range[2];const K=new vt($,D);i.options.keepSourceTokens&&(K.srcToken=m),f.items.push(K)}else{N&&l($.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),I.comment&&($.comment?$.comment+=`
|
|||
|
|
`+I.comment:$.comment=I.comment);const D=new vt($);i.options.keepSourceTokens&&(D.srcToken=m),f.items.push(D)}}return g&&g<h&&l(g,"IMPOSSIBLE","Map comment with trailing content"),f.range=[r.offset,h,g??h],f}function kN({composeNode:n,composeEmptyNode:e},i,r,l,o){const u=(o==null?void 0:o.nodeClass)??Di,f=new u(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let h=r.offset,g=null;for(const{start:y,value:m}of r.items){const w=Tr(y,{indicator:"seq-item-ind",next:m,offset:h,onError:l,parentIndent:r.indent,startOnNewline:!0});if(!w.found)if(w.anchor||w.tag||m)m&&m.type==="block-seq"?l(w.end,"BAD_INDENT","All sequence items must start at the same column"):l(h,"MISSING_CHAR","Sequence item without - indicator");else{g=w.end,w.comment&&(f.comment=w.comment);continue}const v=m?n(i,m,w,l):e(i,w.end,y,null,w,l);i.schema.compat&&Kh(r.indent,m,l),h=v.range[2],f.items.push(v)}return f.range=[r.offset,h,g??h],f}function hl(n,e,i,r){let l="";if(n){let o=!1,u="";for(const f of n){const{source:h,type:g}=f;switch(g){case"space":o=!0;break;case"comment":{i&&!o&&r(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const y=h.substring(1)||" ";l?l+=u+y:l=y,u="";break}case"newline":l&&(u+=h),o=!0;break;default:r(f,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}e+=h.length}}return{comment:l,offset:e}}const Sh="Block collections are not allowed within flow collections",wh=n=>n&&(n.type==="block-map"||n.type==="block-seq");function MN({composeNode:n,composeEmptyNode:e},i,r,l,o){const u=r.start.source==="{",f=u?"flow map":"flow sequence",h=(o==null?void 0:o.nodeClass)??(u?Xt:Di),g=new h(i.schema);g.flow=!0;const y=i.atRoot;y&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let m=r.offset+r.start.source.length;for(let _=0;_<r.items.length;++_){const N=r.items[_],{start:C,key:$,sep:I,value:D}=N,K=Tr(C,{flow:f,indicator:"explicit-key-ind",next:$??(I==null?void 0:I[0]),offset:m,onError:l,parentIndent:r.indent,startOnNewline:!1});if(!K.found){if(!K.anchor&&!K.tag&&!I&&!D){_===0&&K.comma?l(K.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):_<r.items.length-1&&l(K.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),K.comment&&(g.comment?g.comment+=`
|
|||
|
|
`+K.comment:g.comment=K.comment),m=K.end;continue}!u&&i.options.strict&&al($)&&l($,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)K.comma&&l(K.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(K.comma||l(K.start,"MISSING_CHAR",`Missing , between ${f} items`),K.comment){let Q="";e:for(const q of C)switch(q.type){case"comma":case"space":break;case"comment":Q=q.source.substring(1);break e;default:break e}if(Q){let q=g.items[g.items.length-1];He(q)&&(q=q.value??q.key),q.comment?q.comment+=`
|
|||
|
|
`+Q:q.comment=Q,K.comment=K.comment.substring(Q.length+1)}}if(!u&&!I&&!K.found){const Q=D?n(i,D,K,l):e(i,K.end,I,null,K,l);g.items.push(Q),m=Q.range[2],wh(D)&&l(Q.range,"BLOCK_IN_FLOW",Sh)}else{i.atKey=!0;const Q=K.end,q=$?n(i,$,K,l):e(i,Q,C,null,K,l);wh($)&&l(q.range,"BLOCK_IN_FLOW",Sh),i.atKey=!1;const j=Tr(I??[],{flow:f,indicator:"map-value-ind",next:D,offset:q.range[2],onError:l,parentIndent:r.indent,startOnNewline:!1});if(j.found){if(!u&&!K.found&&i.options.strict){if(I)for(const V of I){if(V===j.found)break;if(V.type==="newline"){l(V,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}K.start<j.found.offset-1024&&l(j.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else D&&("source"in D&&D.source&&D.source[0]===":"?l(D,"MISSING_CHAR",`Missing space after : in ${f}`):l(j.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const ne=D?n(i,D,j,l):j.found?e(i,j.end,I,null,j,l):null;ne?wh(D)&&l(ne.range,"BLOCK_IN_FLOW",Sh):j.comment&&(q.comment?q.comment+=`
|
|||
|
|
`+j.comment:q.comment=j.comment);const le=new vt(q,ne);if(i.options.keepSourceTokens&&(le.srcToken=N),u){const V=g;_S(i,V.items,q)&&l(Q,"DUPLICATE_KEY","Map keys must be unique"),V.items.push(le)}else{const V=new Xt(i.schema);V.flow=!0,V.items.push(le);const J=(ne??q).range;V.range=[q.range[0],J[1],J[2]],g.items.push(V)}m=ne?ne.range[2]:j.end}}const w=u?"}":"]",[v,...E]=r.end;let x=m;if(v&&v.source===w)x=v.offset+v.source.length;else{const _=f[0].toUpperCase()+f.substring(1),N=y?`${_} must end with a ${w}`:`${_} in block collection must be sufficiently indented and end with a ${w}`;l(m,y?"MISSING_CHAR":"BAD_INDENT",N),v&&v.source.length!==1&&E.unshift(v)}if(E.length>0){const _=hl(E,x,i.options.strict,l);_.comment&&(g.comment?g.comment+=`
|
|||
|
|
`+_.comment:g.comment=_.comment),g.range=[r.offset,x,_.offset]}else g.range=[r.offset,x,x];return g}function xh(n,e,i,r,l,o){const u=i.type==="block-map"?CN(n,e,i,r,o):i.type==="block-seq"?kN(n,e,i,r,o):MN(n,e,i,r,o),f=u.constructor;return l==="!"||l===f.tagName?(u.tag=f.tagName,u):(l&&(u.tag=l),u)}function ON(n,e,i,r,l){var w;const o=r.tag,u=o?e.directives.tagName(o.source,v=>l(o,"TAG_RESOLVE_FAILED",v)):null;if(i.type==="block-seq"){const{anchor:v,newlineAfterProp:E}=r,x=v&&o?v.offset>o.offset?v:o:v??o;x&&(!E||E.offset<x.offset)&&l(x,"MISSING_CHAR","Missing newline after block sequence props")}const f=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!o||!u||u==="!"||u===Xt.tagName&&f==="map"||u===Di.tagName&&f==="seq")return xh(n,e,i,l,u);let h=e.schema.tags.find(v=>v.tag===u&&v.collection===f);if(!h){const v=e.schema.knownTags[u];if(v&&v.collection===f)e.schema.tags.push(Object.assign({},v,{default:!1})),h=v;else return v!=null&&v.collection?l(o,"BAD_COLLECTION_TYPE",`${v.tag} used for ${f} collection, but expects ${v.collection}`,!0):l(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),xh(n,e,i,l,u)}const g=xh(n,e,i,l,u,h),y=((w=h.resolve)==null?void 0:w.call(h,g,v=>l(o,"TAG_RESOLVE_FAILED",v),e.options))??g,m=Ie(y)?y:new he(y);return m.range=g.range,m.tag=u,h!=null&&h.format&&(m.format=h.format),m}function TS(n,e,i){const r=e.offset,l=jN(e,n.options.strict,i);if(!l)return{value:"",type:null,comment:"",range:[r,r,r]};const o=l.mode===">"?he.BLOCK_FOLDED:he.BLOCK_LITERAL,u=e.source?LN(e.source):[];let f=u.length;for(let x=u.length-1;x>=0;--x){const _=u[x][1];if(_===""||_==="\r")f=x;else break}if(f===0){const x=l.chomp==="+"&&u.length>0?`
|
|||
|
|
`.repeat(Math.max(1,u.length-1)):"";let _=r+l.length;return e.source&&(_+=e.source.length),{value:x,type:o,comment:l.comment,range:[r,_,_]}}let h=e.indent+l.indent,g=e.offset+l.length,y=0;for(let x=0;x<f;++x){const[_,N]=u[x];if(N===""||N==="\r")l.indent===0&&_.length>h&&(h=_.length);else{_.length<h&&i(g+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),l.indent===0&&(h=_.length),y=x,h===0&&!n.atRoot&&i(g,"BAD_INDENT","Block scalar values in collections must be indented");break}g+=_.length+N.length+1}for(let x=u.length-1;x>=f;--x)u[x][0].length>h&&(f=x+1);let m="",w="",v=!1;for(let x=0;x<y;++x)m+=u[x][0].slice(h)+`
|
|||
|
|
`;for(let x=y;x<f;++x){let[_,N]=u[x];g+=_.length+N.length+1;const C=N[N.length-1]==="\r";if(C&&(N=N.slice(0,-1)),N&&_.length<h){const I=`Block scalar lines must not be less indented than their ${l.indent?"explicit indentation indicator":"first line"}`;i(g-N.length-(C?2:1),"BAD_INDENT",I),_=""}o===he.BLOCK_LITERAL?(m+=w+_.slice(h)+N,w=`
|
|||
|
|
`):_.length>h||N[0]===" "?(w===" "?w=`
|
|||
|
|
`:!v&&w===`
|
|||
|
|
`&&(w=`
|
|||
|
|
|
|||
|
|
`),m+=w+_.slice(h)+N,w=`
|
|||
|
|
`,v=!0):N===""?w===`
|
|||
|
|
`?m+=`
|
|||
|
|
`:w=`
|
|||
|
|
`:(m+=w+N,w=" ",v=!1)}switch(l.chomp){case"-":break;case"+":for(let x=f;x<u.length;++x)m+=`
|
|||
|
|
`+u[x][0].slice(h);m[m.length-1]!==`
|
|||
|
|
`&&(m+=`
|
|||
|
|
`);break;default:m+=`
|
|||
|
|
`}const E=r+l.length+e.source.length;return{value:m,type:o,comment:l.comment,range:[r,E,E]}}function jN({offset:n,props:e},i,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:l}=e[0],o=l[0];let u=0,f="",h=-1;for(let w=1;w<l.length;++w){const v=l[w];if(!f&&(v==="-"||v==="+"))f=v;else{const E=Number(v);!u&&E?u=E:h===-1&&(h=n+w)}}h!==-1&&r(h,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${l}`);let g=!1,y="",m=l.length;for(let w=1;w<e.length;++w){const v=e[w];switch(v.type){case"space":g=!0;case"newline":m+=v.source.length;break;case"comment":i&&!g&&r(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),m+=v.source.length,y=v.source.substring(1);break;case"error":r(v,"UNEXPECTED_TOKEN",v.message),m+=v.source.length;break;default:{const E=`Unexpected token in block scalar header: ${v.type}`;r(v,"UNEXPECTED_TOKEN",E);const x=v.source;x&&typeof x=="string"&&(m+=x.length)}}}return{mode:o,indent:u,chomp:f,comment:y,length:m}}function LN(n){const e=n.split(/\n( *)/),i=e[0],r=i.match(/^( *)/),o=[r!=null&&r[1]?[r[1],i.slice(r[1].length)]:["",i]];for(let u=1;u<e.length;u+=2)o.push([e[u],e[u+1]]);return o}function ES(n,e,i){const{offset:r,type:l,source:o,end:u}=n;let f,h;const g=(w,v,E)=>i(r+w,v,E);switch(l){case"scalar":f=he.PLAIN,h=RN(o,g);break;case"single-quoted-scalar":f=he.QUOTE_SINGLE,h=DN(o,g);break;case"double-quoted-scalar":f=he.QUOTE_DOUBLE,h=zN(o,g);break;default:return i(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[r,r+o.length,r+o.length]}}const y=r+o.length,m=hl(u,y,e,i);return{value:h,type:f,comment:m.comment,range:[r,y,m.offset]}}function RN(n,e){let i="";switch(n[0]){case" ":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${n[0]}`;break}case"@":case"`":{i=`reserved character ${n[0]}`;break}}return i&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),AS(n)}function DN(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),AS(n.slice(1,-1)).replace(/''/g,"'")}function AS(n){let e,i;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|||
|
|
`,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|||
|
|
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(n);if(!r)return n;let l=r[1],o=" ",u=e.lastIndex;for(i.lastIndex=u;r=i.exec(n);)r[1]===""?o===`
|
|||
|
|
`?l+=o:o=`
|
|||
|
|
`:(l+=o+r[1],o=" "),u=i.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=u,r=f.exec(n),l+o+((r==null?void 0:r[1])??"")}function zN(n,e){let i="";for(let r=1;r<n.length-1;++r){const l=n[r];if(!(l==="\r"&&n[r+1]===`
|
|||
|
|
`))if(l===`
|
|||
|
|
`){const{fold:o,offset:u}=BN(n,r);i+=o,r=u}else if(l==="\\"){let o=n[++r];const u=UN[o];if(u)i+=u;else if(o===`
|
|||
|
|
`)for(o=n[r+1];o===" "||o===" ";)o=n[++r+1];else if(o==="\r"&&n[r+1]===`
|
|||
|
|
`)for(o=n[++r+1];o===" "||o===" ";)o=n[++r+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];i+=HN(n,r+1,f,e),r+=f}else{const f=n.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),i+=f}}else if(l===" "||l===" "){const o=r;let u=n[r+1];for(;u===" "||u===" ";)u=n[++r+1];u!==`
|
|||
|
|
`&&!(u==="\r"&&n[r+2]===`
|
|||
|
|
`)&&(i+=r>o?n.slice(o,r+1):l)}else i+=l}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),i}function BN(n,e){let i="",r=n[e+1];for(;(r===" "||r===" "||r===`
|
|||
|
|
`||r==="\r")&&!(r==="\r"&&n[e+2]!==`
|
|||
|
|
`);)r===`
|
|||
|
|
`&&(i+=`
|
|||
|
|
`),e+=1,r=n[e+1];return i||(i=" "),{fold:i,offset:e}}const UN={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|||
|
|
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function HN(n,e,i,r){const l=n.substr(e,i),u=l.length===i&&/^[0-9a-fA-F]+$/.test(l)?parseInt(l,16):NaN;if(isNaN(u)){const f=n.substr(e-2,i+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(u)}function NS(n,e,i,r){const{value:l,type:o,comment:u,range:f}=e.type==="block-scalar"?TS(n,e,r):ES(e,n.options.strict,r),h=i?n.directives.tagName(i.source,m=>r(i,"TAG_RESOLVE_FAILED",m)):null;let g;n.options.stringKeys&&n.atKey?g=n.schema[Cn]:h?g=qN(n.schema,l,h,i,r):e.type==="scalar"?g=$N(n,l,e,r):g=n.schema[Cn];let y;try{const m=g.resolve(l,w=>r(i??e,"TAG_RESOLVE_FAILED",w),n.options);y=Le(m)?m:new he(m)}catch(m){const w=m instanceof Error?m.message:String(m);r(i??e,"TAG_RESOLVE_FAILED",w),y=new he(l)}return y.range=f,y.source=l,o&&(y.type=o),h&&(y.tag=h),g.format&&(y.format=g.format),u&&(y.comment=u),y}function qN(n,e,i,r,l){var f;if(i==="!")return n[Cn];const o=[];for(const h of n.tags)if(!h.collection&&h.tag===i)if(h.default&&h.test)o.push(h);else return h;for(const h of o)if((f=h.test)!=null&&f.test(e))return h;const u=n.knownTags[i];return u&&!u.collection?(n.tags.push(Object.assign({},u,{default:!1,test:void 0})),u):(l(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),n[Cn])}function $N({atKey:n,directives:e,schema:i},r,l,o){const u=i.tags.find(f=>{var h;return(f.default===!0||n&&f.default==="key")&&((h=f.test)==null?void 0:h.test(r))})||i[Cn];if(i.compat){const f=i.compat.find(h=>{var g;return h.default&&((g=h.test)==null?void 0:g.test(r))})??i[Cn];if(u.tag!==f.tag){const h=e.tagString(u.tag),g=e.tagString(f.tag),y=`Value may be parsed as either ${h} or ${g}`;o(l,"TAG_RESOLVE_FAILED",y,!0)}}return u}function IN(n,e,i){if(e){i===null&&(i=e.length);for(let r=i-1;r>=0;--r){let l=e[r];switch(l.type){case"space":case"comment":case"newline":n-=l.source.length;continue}for(l=e[++r];(l==null?void 0:l.type)==="space";)n+=l.source.length,l=e[++r];break}}return n}const VN={composeNode:CS,composeEmptyNode:qd};function CS(n,e,i,r){const l=n.atKey,{spaceBefore:o,comment:u,anchor:f,tag:h}=i;let g,y=!0;switch(e.type){case"alias":g=GN(n,e,r),(f||h)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=NS(n,e,h,r),f&&(g.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=ON(VN,n,e,i,r),f&&(g.anchor=f.source.substring(1));break;default:{const m=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",m),g=qd(n,e.offset,void 0,null,i,r),y=!1}}return f&&g.anchor===""&&r(f,"BAD_ALIAS","Anchor cannot be an empty string"),l&&n.options.stringKeys&&(!Le(g)||typeof g.value!="string"||g.tag&&g.tag!=="tag:yaml.org,2002:str")&&r(h??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(g.spaceBefore=!0),u&&(e.type==="scalar"&&e.source===""?g.comment=u:g.commentBefore=u),n.options.keepSourceTokens&&y&&(g.srcToken=e),g}function qd(n,e,i,r,{spaceBefore:l,comment:o,anchor:u,tag:f,end:h},g){const y={type:"scalar",offset:IN(e,i,r),indent:-1,source:""},m=NS(n,y,f,g);return u&&(m.anchor=u.source.substring(1),m.anchor===""&&g(u,"BAD_ALIAS","Anchor cannot be an empty string")),l&&(m.spaceBefore=!0),o&&(m.comment=o,m.range[2]=h),m}function GN({options:n},{offset:e,source:i,end:r},l){const o=new _c(i.substring(1));o.source===""&&l(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&l(e+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const u=e+i.length,f=hl(r,u,n.strict,l);return o.range=[e,u,f.offset],f.comment&&(o.comment=f.comment),o}function KN(n,e,{offset:i,start:r,value:l,end:o},u){const f=Object.assign({_directives:e},n),h=new Rr(void 0,f),g={atKey:!1,atRoot:!0,directives:h.directives,options:h.options,schema:h.schema},y=Tr(r,{indicator:"doc-start",next:l??(o==null?void 0:o[0]),offset:i,onError:u,parentIndent:0,startOnNewline:!0});y.found&&(h.directives.docStart=!0,l&&(l.
|
|||
|
|
|
|||
|
|
`:`
|
|||
|
|
`)+(u.substring(1)||" "),i=!0,r=!1;break;case"%":((l=n[o+1])==null?void 0:l[0])!=="#"&&(o+=1),i=!1;break;default:i||(r=!0),i=!1}}return{comment:e,afterEmptyLine:r}}class $d{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,r,l,o)=>{const u=Ua(i);o?this.warnings.push(new xS(u,r,l)):this.errors.push(new hs(u,r,l))},this.directives=new _t({version:e.version||"1.2"}),this.options=e}decorate(e,i){const{comment:r,afterEmptyLine:l}=I0(this.prelude);if(r){const o=e.contents;if(i)e.comment=e.comment?`${e.comment}
|
|||
|
|
${r}`:r;else if(l||e.directives.docStart||!o)e.commentBefore=r;else if($e(o)&&!o.flow&&o.items.length>0){let u=o.items[0];He(u)&&(u=u.key);const f=u.commentBefore;u.commentBefore=f?`${r}
|
|||
|
|
${f}`:r}else{const u=o.commentBefore;o.commentBefore=u?`${r}
|
|||
|
|
${u}`:r}}i?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:I0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,r=-1){for(const l of e)yield*this.next(l);yield*this.end(i,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(i,r,l)=>{const o=Ua(e);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",r,l)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const i=KN(this.options,this.directives,e,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const i=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new hs(Ua(e),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new hs(Ua(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const i=hl(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
|
|||
|
|
${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new hs(Ua(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,i=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),l=new Rr(void 0,r);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),l.range=[0,i,i],this.decorate(l,!1),yield l}}}function YN(n,e=!0,i){if(n){const r=(l,o,u)=>{const f=typeof l=="number"?l:Array.isArray(l)?l[0]:l.offset;if(i)i(f,o,u);else throw new hs([f,f+1],o,u)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return ES(n,e,r);case"block-scalar":return TS({options:{strict:e}},n,r)}}return null}function XN(n,e){const{implicitKey:i=!1,indent:r,inFlow:l=!1,offset:o=-1,type:u="PLAIN"}=e,f=ul({type:u,value:n},{implicitKey:i,indent:r>0?" ".repeat(r):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}}),h=e.end??[{type:"newline",offset:-1,indent:r,source:`
|
|||
|
|
`}];switch(f[0]){case"|":case">":{const g=f.indexOf(`
|
|||
|
|
`),y=f.substring(0,g),m=f.substring(g+1)+`
|
|||
|
|
`,w=[{type:"block-scalar-header",offset:o,indent:r,source:y}];return kS(w,h)||w.push({type:"newline",offset:-1,indent:r,source:`
|
|||
|
|
`}),{type:"block-scalar",offset:o,indent:r,props:w,source:m}}case'"':return{type:"double-quoted-scalar",offset:o,indent:r,source:f,end:h};case"'":return{type:"single-quoted-scalar",offset:o,indent:r,source:f,end:h};default:return{type:"scalar",offset:o,indent:r,source:f,end:h}}}function FN(n,e,i={}){let{afterKey:r=!1,implicitKey:l=!1,inFlow:o=!1,type:u}=i,f="indent"in n?n.indent:null;if(r&&typeof f=="number"&&(f+=2),!u)switch(n.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const g=n.props[0];if(g.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u=g.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const h=ul({type:u,value:e},{implicitKey:l||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(h[0]){case"|":case">":QN(n,h);break;case'"':_h(n,h,"double-quoted-scalar");break;case"'":_h(n,h,"single-quoted-scalar");break;default:_h(n,h,"scalar")}}function QN(n,e){const i=e.indexOf(`
|
|||
|
|
`),r=e.substring(0,i),l=e.substring(i+1)+`
|
|||
|
|
`;if(n.type==="block-scalar"){const o=n.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=r,n.source=l}else{const{offset:o}=n,u="indent"in n?n.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:u,source:r}];kS(f,"end"in n?n.end:void 0)||f.push({type:"newline",offset:-1,indent:u,source:`
|
|||
|
|
`});for(const h of Object.keys(n))h!=="type"&&h!=="offset"&&delete n[h];Object.assign(n,{type:"block-scalar",indent:u,props:f,source:l})}}function kS(n,e){if(e)for(const i of e)switch(i.type){case"space":case"comment":n.push(i);break;case"newline":return n.push(i),!0}return!1}function _h(n,e,i){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=i,n.source=e;break;case"block-scalar":{const r=n.props.slice(1);let l=e.length;n.props[0].type==="block-scalar-header"&&(l-=n.props[0].source.length);for(const o of r)o.offset+=l;delete n.props,Object.assign(n,{type:i,source:e,end:r});break}case"block-map":case"block-seq":{const l={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
|
|||
|
|
`};delete n.items,Object.assign(n,{type:i,source:e,end:[l]});break}default:{const r="indent"in n?n.indent:-1,l="end"in n&&Array.isArray(n.end)?n.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(n))o!=="type"&&o!=="offset"&&delete n[o];Object.assign(n,{type:i,indent:r,source:e,end:l})}}}const JN=n=>"type"in n?pc(n):Wo(n);function pc(n){switch(n.type){case"block-scalar":{let e="";for(const i of n.props)e+=pc(i);return e+n.source}case"block-map":case"block-seq":{let e="";for(const i of n.items)e+=Wo(i);return e}case"flow-collection":{let e=n.start.source;for(const i of n.items)e+=Wo(i);for(const i of n.end)e+=i.source;return e}case"document":{let e=Wo(n);if(n.end)for(const i of n.end)e+=i.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const i of n.end)e+=i.source;return e}}}function Wo({start:n,key:e,sep:i,value:r}){let l="";for(const o of n)l+=o.source;if(e&&(l+=pc(e)),i)for(const o of i)l+=o.source;return r&&(l+=pc(r)),l}const Yh=Symbol("break visit"),PN=Symbol("skip children"),MS=Symbol("remove item");function ps(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),OS(Object.freeze([]),n,e)}ps.BREAK=Yh;ps.SKIP=PN;ps.REMOVE=MS;ps.itemAtPath=(n,e)=>{let i=n;for(const[r,l]of e){const o=i==null?void 0:i[r];if(o&&"items"in o)i=o.items[l];else return}return i};ps.parentCollection=(n,e)=>{const i=ps.itemAtPath(n,e.slice(0,-1)),r=e[e.length-1][0],l=i==null?void 0:i[r];if(l&&"items"in l)return l;throw new Error("Parent collection not found")};function OS(n,e,i){let r=i(e,n);if(typeof r=="symbol")return r;for(const l of["key","value"]){const o=e[l];if(o&&"items"in o){for(let u=0;u<o.items.length;++u){const f=OS(Object.freeze(n.concat([[l,u]])),o.items[u],i);if(typeof f=="number")u=f-1;else{if(f===Yh)return Yh;f===MS&&(o.items.splice(u,1),u-=1)}}typeof r=="function"&&l==="key"&&(r=r(e,n))}}return typeof r=="function"?r(e,n):r}const Lc="\uFEFF",Rc="",Dc="",ll="",ZN=n=>!!n&&"items"in n,WN=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function eC(n){switch(n){case Lc:return"<BOM>";case Rc:return"<DOC>";case Dc:return"<FLOW_END>";case ll:return"<SCALAR>";default:return JSON.stringify(n)}}function jS(n){switch(n){case Lc:return"byte-order-mark";case Rc:return"doc-mode";case Dc:return"flow-error-end";case ll:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|||
|
|
`:case`\r
|
|||
|
|
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(n[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const tC=Object.freeze(Object.defineProperty({__proto__:null,BOM:Lc,DOCUMENT:Rc,FLOW_END:Dc,SCALAR:ll,createScalarToken:XN,isCollection:ZN,isScalar:WN,prettyToken:eC,resolveAsScalar:YN,setScalarValue:FN,stringify:JN,tokenType:jS,visit:ps},Symbol.toStringTag,{value:"Module"}));function mn(n){switch(n){case void 0:case" ":case`
|
|||
|
|
`:case"\r":case" ":return!0;default:return!1}}const V0=new Set("0123456789ABCDEFabcdef"),nC=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ho=new Set(",[]{}"),iC=new Set(` ,[]{}
|
|||
|
|
\r `),Th=n=>!n||iC.has(n);class LS{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,i=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!i;let r=this.next??"stream";for(;r&&(i||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,i=this.buffer[e];for(;i===" "||i===" ";)i=this.buffer[++e];return!i||i==="#"||i===`
|
|||
|
|
`?!0:i==="\r"?this.buffer[e+1]===`
|
|||
|
|
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let i=this.buffer[e];if(this.indentNext>0){let r=0;for(;i===" ";)i=this.buffer[++r+e];if(i==="\r"){const l=this.buffer[r+e+1];if(l===`
|
|||
|
|
`||!l&&!this.atEnd)return e+r+1}return i===`
|
|||
|
|
`||r>=this.indentNext||!i&&!this.atEnd?e+r:-1}if(i==="-"||i==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&mn(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|||
|
|
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Lc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let i=e.length,r=e.indexOf("#");for(;r!==-1;){const o=e[r-1];if(o===" "||o===" "){i=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const o=e[i-1];if(o===" "||o===" ")i-=1;else break}const l=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-l),this.pushNewline(),"stream"}if(this.atLineEnd()){const i=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-i),yield*this.pushNewline(),"stream"}return yield Rc,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const i=this.peek(3);if((i==="---"||i==="...")&&mn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,i==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!mn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&mn(i)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let i=yield*this.pushIndicators();switch(e[i]){case"#":yield*this.pushCount(e.length-i);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Th),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return i+=yield*this.parseBlockScalarHeader(),i+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-i),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,i,r=-1;do e=yield*this.pushNewline(),e>0?(i=yield*this.pushSpaces(!1),this.indentValue=r=i):i=0,i+=yield*this.pushSpaces(!0);while(e+i>0);const l=this.getLine();if(l===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&l[0]!=="#"||r===0&&(l.startsWith("---")||l.startsWith("..."))&&mn(l[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(l[0]==="]"||l[0]==="}")))return this.flowLevel=0,yield Dc,yield*this.parseLineStart();let o=0;for(;l[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),l[o]){case void 0:return"flow";case"#":return yield*this.pushCount(l.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Th),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const u=this.charAt(1);if(this.flowKey||mn(u)||u===",")return this.flowKey=!1,yield*this.pushCount(1),yield*th
|
|||
|
|
`,this.pos);if(l!==-1){for(;l!==-1;){const o=this.continueScalar(l+1);if(o===-1)break;l=r.indexOf(`
|
|||
|
|
`,o)}l!==-1&&(i=l-(r[l-1]==="\r"?2:1))}if(i===-1){if(!this.atEnd)return this.setNext("quoted-scalar");i=this.buffer.length}return yield*this.pushToIndex(i+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const i=this.buffer[++e];if(i==="+")this.blockScalarKeep=!0;else if(i>"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>mn(i)||i==="#")}*parseBlockScalar(){let e=this.pos-1,i=0,r;e:for(let o=this.pos;r=this.buffer[o];++o)switch(r){case" ":i+=1;break;case`
|
|||
|
|
`:e=o,i=0;break;case"\r":{const u=this.buffer[o+1];if(!u&&!this.atEnd)return this.setNext("block-scalar");if(u===`
|
|||
|
|
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=i:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(e+1);if(o===-1)break;e=this.buffer.indexOf(`
|
|||
|
|
`,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let l=e+1;for(r=this.buffer[l];r===" ";)r=this.buffer[++l];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|||
|
|
`;)r=this.buffer[++l];e=l-1}else if(!this.blockScalarKeep)do{let o=e-1,u=this.buffer[o];u==="\r"&&(u=this.buffer[--o]);const f=o;for(;u===" ";)u=this.buffer[--o];if(u===`
|
|||
|
|
`&&o>=this.pos&&o+1+i>f)e=o;else break}while(!0);return yield ll,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let i=this.pos-1,r=this.pos-1,l;for(;l=this.buffer[++r];)if(l===":"){const o=this.buffer[r+1];if(mn(o)||e&&Ho.has(o))break;i=r}else if(mn(l)){let o=this.buffer[r+1];if(l==="\r"&&(o===`
|
|||
|
|
`?(r+=1,l=`
|
|||
|
|
`,o=this.buffer[r+1]):i=r),o==="#"||e&&Ho.has(o))break;if(l===`
|
|||
|
|
`){const u=this.continueScalar(r+1);if(u===-1)break;r=Math.max(r,u-2)}}else{if(e&&Ho.has(l))break;i=r}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield ll,yield*this.pushToIndex(i+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,i){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Th))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,i=this.charAt(1);if(mn(i)||e&&Ho.has(i))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,i=this.buffer[e];for(;!mn(i)&&i!==">";)i=this.buffer[++e];return yield*this.pushToIndex(i===">"?e+1:e,!1)}else{let e=this.pos+1,i=this.buffer[e];for(;i;)if(nC.has(i))i=this.buffer[++e];else if(i==="%"&&V0.has(this.buffer[e+1])&&V0.has(this.buffer[e+2]))i=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
|
|||
|
|
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|||
|
|
`?yield*this.pushCount(2):0}*pushSpaces(e){let i=this.pos-1,r;do r=this.buffer[++i];while(r===" "||e&&r===" ");const l=i-this.pos;return l>0&&(yield this.buffer.substr(this.pos,l),this.pos=i),l}*pushUntil(e){let i=this.pos,r=this.buffer[i];for(;!e(r);)r=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class RS{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,r=this.lineStarts.length;for(;i<r;){const o=i+r>>1;this.lineStarts[o]<e?i=o+1:r=o}if(this.lineStarts[i]===e)return{line:i+1,col:1};if(i===0)return{line:0,col:e};const l=this.lineStarts[i-1];return{line:i,col:e-l+1}}}}function cs(n,e){for(let i=0;i<n.length;++i)if(n[i].type===e)return!0;return!1}function G0(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function DS(n){switch(n==null?void 0:n.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function qo(n){switch(n.type){case"document":return n.start;case"block-map":{const e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function cr(n){var i;if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((i=n[++e])==null?void 0:i.type)==="space";);return n.splice(e,n.length)}function K0(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!cs(e.start,"explicit-key-ind")&&!cs(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,DS(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Id{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new LS,this.onNewLine=e}*parse(e,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,i))yield*this.next(r);i||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const i=jS(e);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const i=e??this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield i;else{const r=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in r?r.indent:0:i.type==="flow-collection"&&r.type==="document"&&(i.indent=0),i.type==="f
|
|||
|
|
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
|
|||
|
|
`,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){const l="end"in i.value?i.value.end:void 0,o=Array.isArray(l)?l[l.length-1]:void 0;(o==null?void 0:o.type)==="comment"?l==null||l.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,e.indent)){const l=e.items[e.items.length-2],o=(r=l==null?void 0:l.value)==null?void 0:r.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const l=!this.onKeyLine&&this.indent===e.indent,o=l&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(o&&i.sep&&!i.value){const f=[];for(let h=0;h<i.sep.length;++h){const g=i.sep[h];switch(g.type){case"newline":f.push(h);break;case"space":break;case"comment":g.indent>e.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(u=i.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||i.value?(u.push(this.sourceToken),e.items.push({start:u}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):o||i.value?(u.push(this.sourceToken),e.items.push({start:u,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(i.explicitKey)if(i.sep)if(i.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(cs(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(DS(i.key)&&!cs(i.sep,"newline")){const f=cr(i.start),h=i.key,g=i.sep;g.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:h,sep:g}]})}else u.length>0?i.sep=i.sep.concat(u,this.sourceToken):i.sep.push(this.sourceToken);else if(cs(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const f=cr(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||o?e.items.push({start:u,key:null,sep:[this.sourceToken]}):cs(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);o||i.value?(e.items.push({start:u,key:f,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(f):(Object.assign(i,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(e);if(f){l&&f.type!=="block-seq"&&e.items.push({start:u}),this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(i.value){const l="end"in i.value?i.value.end:void 0,o=Array.isArray(l)?l[l.length-1]:void 0;(o==null?void 0:o.type)==="comment"?l==null||l.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,e.indent)){const l=e.items[e.items.length-2],o=(r=l==null?void 0:l.value)==null?void 0:r.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=e.indent
|
|||
|
|
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
|
|||
|
|
`,i)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const i=qo(e),r=cr(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=qo(e),r=cr(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function zS(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new RS||null,prettyErrors:e}}function sC(n,e={}){const{lineCounter:i,prettyErrors:r}=zS(e),l=new Id(i==null?void 0:i.addNewLine),o=new $d(e),u=Array.from(o.compose(l.parse(n)));if(r&&i)for(const f of u)f.errors.forEach(dc(n,i)),f.warnings.forEach(dc(n,i));return u.length>0?u:Object.assign([],{empty:!0},o.streamInfo())}function BS(n,e={}){const{lineCounter:i,prettyErrors:r}=zS(e),l=new Id(i==null?void 0:i.addNewLine),o=new $d(e);let u=null;for(const f of o.compose(l.parse(n),!0,n.length))if(!u)u=f;else if(u.options.logLevel!=="silent"){u.errors.push(new hs(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&i&&(u.errors.forEach(dc(n,i)),u.warnings.forEach(dc(n,i))),u}function rC(n,e,i){let r;typeof e=="function"?r=e:i===void 0&&e&&typeof e=="object"&&(i=e);const l=BS(n,i);if(!l)return null;if(l.warnings.forEach(o=>iS(l.options.logLevel,o)),l.errors.length>0){if(l.options.logLevel!=="silent")throw l.errors[0];l.errors=[]}return l.toJS(Object.assign({reviver:r},i))}function aC(n,e,i){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:i===void 0&&e&&(i=e),typeof i=="string"&&(i=i.length),typeof i=="number"){const l=Math.round(i);i=l<1?void 0:l>8?{indent:8}:{indent:l}}if(n===void 0){const{keepUndefined:l}=i??e??{};if(!l)return}return bs(n)&&!r?n.toString(i):new Rr(n,r,i).toString(i)}const US=Object.freeze(Object.defineProperty({__proto__:null,Alias:_c,CST:tC,Composer:$d,Document:Rr,Lexer:LS,LineCounter:RS,Pair:vt,Parser:Id,Scalar:he,Schema:jc,YAMLError:Hd,YAMLMap:Xt,YAMLParseError:hs,YAMLSeq:Di,YAMLWarning:xS,isAlias:ys,isCollection:$e,isDocument:bs,isMap:Mr,isNode:Ie,isPair:He,isScalar:Le,isSeq:Or,parse:rC,parseAllDocuments:sC,parseDocument:BS,stringify:aC,visit:Ri,visitAsync:xc},Symbol.toStringTag,{value:"Module"})),lC=({action:n,model:e,sdkLanguage:i,testIdAttributeName:r,isInspecting:l,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})=>{const[h,g]=U.useState("action"),[y]=on("shouldPopulateCanvasFromScreenshot",!1),m=U.useMemo(()=>fC(n),[n]),{snapshotInfoUrl:w,snapshotUrl:v,popoutUrl:E}=U.useMemo(()=>{const _=m[h];return e&&_?hC(e.traceUri,_,y):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[m,h,y,e]),x=U.useMemo(()=>w!==void 0?{snapshotInfoUrl:w,snapshotUrl:v,popoutUrl:E}:void 0,[w,v,E]);return S.jsxs("div",{className:"snapshot-tab vbox",children:[S.jsxs(nd,{chil
|