@dev-blinq/cucumber_client 1.0.1451-dev → 1.0.1453-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/assets/bundled_scripts/recorder.js +1 -1
- package/bin/assets/preload/css_gen.js +10 -10
- package/bin/assets/preload/toolbar.js +27 -29
- package/bin/assets/preload/unique_locators.js +1 -1
- package/bin/assets/preload/yaml.js +288 -275
- package/bin/assets/scripts/aria_snapshot.js +223 -220
- package/bin/assets/scripts/dom_attr.js +329 -329
- package/bin/assets/scripts/dom_parent.js +169 -174
- package/bin/assets/scripts/event_utils.js +94 -94
- package/bin/assets/scripts/pw.js +2050 -1949
- package/bin/assets/scripts/recorder.js +3 -3
- package/bin/assets/scripts/snapshot_capturer.js +153 -146
- package/bin/assets/scripts/unique_locators.js +1 -2
- package/bin/assets/scripts/yaml.js +796 -783
- package/bin/client/code_cleanup/find_step_definition_references.js +0 -1
- package/bin/client/code_gen/api_codegen.js +2 -2
- package/bin/client/code_gen/code_inversion.js +4 -2
- package/bin/client/cucumber/feature_data.js +2 -2
- package/bin/client/cucumber/project_to_document.js +8 -2
- package/bin/client/cucumber/steps_definitions.js +6 -3
- package/bin/client/parse_feature_file.js +23 -26
- package/bin/client/playground/projects/env.json +2 -2
- package/bin/client/recorderv3/bvt_recorder.js +1 -0
- package/bin/client/recorderv3/scriptTest.js +1 -1
- package/bin/client/recorderv3/step_runner.js +2 -3
- package/bin/client/upload-service.js +2 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ar=class{getActualParent(t){if(!t||!(t instanceof Element))throw new Error("Invalid element provided");if(t.assignedSlot)return t.assignedSlot;let n=t.parentElement;if(n)return n;let r=t.parentNode;return r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host||null}getFullAncestorChain(t){if(!t||!(t instanceof Element))throw new Error("Invalid element provided");let n=[],r=t;for(;r;)n.push(r),r=this.getActualParent(r);return n}getFullAncestorChainToRoot(t,n){if(!t||!(t instanceof Element))throw new Error("Invalid element provided");if(!n||!(n instanceof Element))throw new Error("Invalid root provided");if(!this.containsElementCrossShadow(n,t))throw new Error("Root does not contain the element");let r=[],o=t;for(;o&&o!==n&&this.containsElementCrossShadow(n,o);)r.push(o),o=this.getActualParent(o);return o===n&&r.push(o),r}getClimbCountToParent(t,n){if(!t||!(t instanceof Element))throw new Error("Invalid element provided");if(!n||!(n instanceof Element))throw new Error("Invalid target parent provided");let r=0,o=t;for(;o&&o!==n;)o=this.getActualParent(o),r++;return o===n?r:-1}containsElementCrossShadow(t,n){if(!t||!(t instanceof Element))throw new Error("Invalid element provided");if(!n||!(n instanceof Element))throw new Error("Invalid target provided");let r=n;for(;r;){if(r===t)return!0;r=this.getActualParent(r)}return!1}findLowestCommonAncestor(t){if(!Array.isArray(t)||t.length===0)throw new Error("Invalid elements array provided");for(let r of t)if(!(r instanceof Element))throw new Error("All items in the array must be DOM Elements");let n=this.getFullAncestorChain(t[0]);n.reverse();for(let r=1;r<t.length;r++){let o=this.getFullAncestorChain(t[r]);o.reverse(),n=n.filter(u=>o.includes(u))}return n.length>0?n[n.length-1]:null}findBranchingParent(t,n){if(!Array.isArray(t)||t.length===0)throw new Error("Invalid elements array provided");if(!(n instanceof Element))throw new Error("Target must be a DOM Element");for(let u of t)if(!(u instanceof Element))throw new Error("All items in the array must be DOM Elements");if(!t.includes(n))return console.warn("Target element must be included in the elements array, returning null"),null;let r=this.getFullAncestorChain(n);r.reverse();let o=null;for(let u of r){let l=t.filter(h=>this.containsElementCrossShadow(u,h));if(l.length===1&&l[0]===n){o=u;break}}return o||null}},Ai=Ar;var Ha=Object.defineProperty;var Nt=(e,t)=>{for(var n in t)Ha(e,n,{get:t[n],enumerable:!0})};var Wa={};Nt(Wa,{__PW:()=>Me});var zi={};Nt(zi,{elementMatchesText:()=>an,elementText:()=>Se,getElementLabels:()=>bs,matchesAttributePart:()=>ys,matchesComponentAttribute:()=>ms,shouldSkipForTextMatching:()=>er});var Ji={};Nt(Ji,{cacheNormalizedWhitespaces:()=>Yi,escapeForAttributeSelector:()=>Ne,escapeForTextSelector:()=>Ae,escapeHTML:()=>za,escapeHTMLAttribute:()=>Ga,escapeRegExp:()=>Zt,escapeTemplateString:()=>Ka,escapeWithQuotes:()=>nn,isString:()=>Va,longestCommonSubstring:()=>eo,normalizeEscapedRegexQuotes:()=>rn,normalizeWhiteSpace:()=>we,quoteCSSAttributeValue:()=>et,toSnakeCase:()=>Wr,toTitleCase:()=>Xt,trimString:()=>Xi,trimStringWithEllipsis:()=>Mr});function nn(e,t="'"){let n=JSON.stringify(e),r=n.substring(1,n.length-1).replace(/\\"/g,'"');if(t==="'")return t+r.replace(/[']/g,"\\'")+t;if(t==='"')return t+r.replace(/["]/g,'\\"')+t;if(t==="`")return t+r.replace(/[`]/g,"`")+t;throw new Error("Invalid escape char")}function Ka(e){return e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}function Va(e){return typeof e=="string"||e instanceof String}function Xt(e){return e.charAt(0).toUpperCase()+e.substring(1)}function Wr(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function et(e){return`"${e.replace(/["\\]/g,t=>"\\"+t)}"`}var Kt;function Yi(){Kt=new Map}function we(e){let t=Kt?.get(e);return t===void 0&&(t=e.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),Kt?.set(e,t)),t}function rn(e){return e.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function Qi(e){return e.unicode||e.unicodeSets?String(e):String(e).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Ae(e,t){return typeof e!="string"?Qi(e):`${JSON.stringify(e)}${t?"s":"i"}`}function Ne(e,t){return typeof e!="string"?Qi(e):`"${e.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${t?"s":"i"}`}function Xi(e,t,n=""){if(e.length<=t)return e;let r=[...e];return r.length>t?r.slice(0,t-n.length).join("")+n:r.join("")}function Mr(e,t){return Xi(e,t,"\u2026")}function Zt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Zi={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ga(e){return e.replace(/[&<>"']/ug,t=>Zi[t])}function za(e){return e.replace(/[&<]/ug,t=>Zi[t])}function eo(e,t){let n=e.length,r=t.length,o=0,u=0,l=Array(n+1).fill(null).map(()=>Array(r+1).fill(0));for(let h=1;h<=n;h++)for(let p=1;p<=r;p++)e[h-1]===t[p-1]&&(l[h][p]=l[h-1][p-1]+1,l[h][p]>o&&(o=l[h][p],u=h));return e.slice(u-o,u)}var to={};Nt(to,{beginAriaCaches:()=>Xn,endAriaCaches:()=>Zn,getAriaChecked:()=>ns,getAriaDisabled:()=>tn,getAriaExpanded:()=>is,getAriaLabelledByElements:()=>es,getAriaLevel:()=>os,getAriaPressed:()=>ss,getAriaRole:()=>ue,getAriaSelected:()=>ts,getCSSContent:()=>_t,getCheckedAllowMixed:()=>Io,getCheckedWithoutMixed:()=>Lo,getElementAccessibleDescription:()=>Rr,getElementAccessibleErrorMessage:()=>Co,getElementAccessibleName:()=>At,getReadonly:()=>Oo,isElementHiddenForAria:()=>Ce,isElementIgnoredForAria:()=>Zr,kAriaCheckedRoles:()=>zn,kAriaDisabledRoles:()=>as,kAriaExpandedRoles:()=>Yn,kAriaLevelRoles:()=>Qn,kAriaPressedRoles:()=>Jn,kAriaSelectedRoles:()=>Gn,receivesPointerEvents:()=>Po});var ce=function(e,t,n){return e>=t&&e<=n};function Te(e){return ce(e,48,57)}function Ni(e){return Te(e)||ce(e,65,70)||ce(e,97,102)}function Ja(e){return ce(e,65,90)}function Ya(e){return ce(e,97,122)}function Qa(e){return Ja(e)||Ya(e)}function Xa(e){return e>=128}function Un(e){return Qa(e)||Xa(e)||e===95}function Ci(e){return Un(e)||Te(e)||e===45}function Za(e){return ce(e,0,8)||e===11||ce(e,14,31)||e===127}function Et(e){return e===10}function De(e){return Et(e)||e===9||e===32}var ec=1114111,Kr=class extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}};function tc(e){let t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===13&&e.charCodeAt(n+1)===10&&(r=10,n++),(r===13||r===12)&&(r=10),r===0&&(r=65533),ce(r,55296,56319)&&ce(e.charCodeAt(n+1),56320,57343)){let o=r-55296,u=e.charCodeAt(n+1)-56320;r=Math.pow(2,16)+o*Math.pow(2,10)+u,n++}t.push(r)}return t}function le(e){if(e<=65535)return String.fromCharCode(e);e-=Math.pow(2,16);let t=Math.floor(e/Math.pow(2,10))+55296,n=e%Math.pow(2,10)+56320;return String.fromCharCode(t)+String.fromCharCode(n)}function no(e){let t=tc(e),n=-1,r=[],o,u=0,l=0,h=0,p=function(){u+=1,h=l,l=0},y={line:u,column:l},v=function(B){return B>=t.length?-1:t[B]},b=function(B){if(B===void 0&&(B=1),B>3)throw"Spec Error: no more than three codepoints of lookahead.";return v(n+B)},m=function(B){return B===void 0&&(B=1),n+=B,o=v(n),Et(o)?p():l+=B,!0},E=function(){return n-=1,Et(o)?(u-=1,l=h):l-=1,y.line=u,y.column=l,!0},A=function(B){return B===void 0&&(B=o),B===-1},I=function(){},P=function(){},q=function(){if(U(),m(),De(o)){for(;De(b());)m();return new Wn}else{if(o===34)return se();if(o===35)if(Ci(b())||he(b(1),b(2))){let B=new mo("");return ie(b(1),b(2),b(3))&&(B.type="id"),B.value=ze(),B}else return new de(o);else return o===36?b()===61?(m(),new ic):new de(o):o===39?se():o===40?new fo:o===41?new Vr:o===42?b()===61?(m(),new oc):new de(o):o===43?rt()?(E(),G()):new de(o):o===44?new co:o===45?rt()?(E(),G()):b(1)===45&&b(2)===62?(m(2),new io):Ee()?(E(),Z()):new de(o):o===46?rt()?(E(),G()):new de(o):o===58?new oo:o===59?new ao:o===60?b(1)===33&&b(2)===45&&b(3)===45?(m(3),new so):new de(o):o===64?ie(b(1),b(2),b(3))?new go(ze()):new de(o):o===91?new ho:o===92?D()?(E(),Z()):(P(),new de(o)):o===93?new Pr:o===94?b()===61?(m(),new sc):new de(o):o===123?new lo:o===124?b()===61?(m(),new rc):b()===124?(m(),new po):new de(o):o===125?new uo:o===126?b()===61?(m(),new nc):new de(o):Te(o)?(E(),G()):Un(o)?(E(),Z()):A()?new jn:new de(o)}},U=function(){for(;b(1)===47&&b(2)===42;)for(m(2);;)if(m(),o===42&&b()===47){m();break}else if(A()){P();return}},G=function(){let B=ln();if(ie(b(1),b(2),b(3))){let z=new ac;return z.value=B.value,z.repr=B.repr,z.type=B.type,z.unit=ze(),z}else if(b()===37){m();let z=new vo;return z.value=B.value,z.repr=B.repr,z}else{let z=new bo;return z.value=B.value,z.repr=B.repr,z.type=B.type,z}},Z=function(){let B=ze();if(B.toLowerCase()==="url"&&b()===40){for(m();De(b(1))&&De(b(2));)m();return b()===34||b()===39?new zt(B):De(b())&&(b(2)===34||b(2)===39)?new zt(B):ee()}else return b()===40?(m(),new zt(B)):new Gr(B)},se=function(B){B===void 0&&(B=o);let z="";for(;m();){if(o===B||A())return new zr(z);if(Et(o))return P(),E(),new ro;o===92?A(b())?I():Et(b())?m():z+=le(ne()):z+=le(o)}throw new Error("Internal error")},ee=function(){let B=new yo("");for(;De(b());)m();if(A(b()))return B;for(;m();){if(o===41||A())return B;if(De(o)){for(;De(b());)m();return b()===41||A(b())?(m(),B):(ye(),new Bn)}else{if(o===34||o===39||o===40||Za(o))return P(),ye(),new Bn;if(o===92)if(D())B.value+=le(ne());else return P(),ye(),new Bn;else B.value+=le(o)}}throw new Error("Internal error")},ne=function(){if(m(),Ni(o)){let B=[o];for(let be=0;be<5&&Ni(b());be++)m(),B.push(o);De(b())&&m();let z=parseInt(B.map(function(be){return String.fromCharCode(be)}).join(""),16);return z>ec&&(z=65533),z}else return A()?65533:o},he=function(B,z){return!(B!==92||Et(z))},D=function(){return he(o,b())},ie=function(B,z,be){return B===45?Un(z)||z===45||he(z,be):Un(B)?!0:B===92?he(B,z):!1},Ee=function(){return ie(o,b(1),b(2))},fe=function(B,z,be){return B===43||B===45?!!(Te(z)||z===46&&Te(be)):B===46?!!Te(z):!!Te(B)},rt=function(){return fe(o,b(1),b(2))},ze=function(){let B="";for(;m();)if(Ci(o))B+=le(o);else if(D())B+=le(ne());else return E(),B;throw new Error("Internal parse error")},ln=function(){let B="",z="integer";for((b()===43||b()===45)&&(m(),B+=le(o));Te(b());)m(),B+=le(o);if(b(1)===46&&Te(b(2)))for(m(),B+=le(o),m(),B+=le(o),z="number";Te(b());)m(),B+=le(o);let be=b(1),V=b(2),Je=b(3);if((be===69||be===101)&&Te(V))for(m(),B+=le(o),m(),B+=le(o),z="number";Te(b());)m(),B+=le(o);else if((be===69||be===101)&&(V===43||V===45)&&Te(Je))for(m(),B+=le(o),m(),B+=le(o),m(),B+=le(o),z="number";Te(b());)m(),B+=le(o);let it=He(B);return{type:z,value:it,repr:B}},He=function(B){return+B},ye=function(){for(;m();){if(o===41||A())return;D()&&ne(),I()}},st=0;for(;!A(b());)if(r.push(q()),st++,st>t.length*2)throw new Error("I'm infinite-looping!");return r}var ae=class{tokenType="";value;toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}},ro=class extends ae{tokenType="BADSTRING"},Bn=class extends ae{tokenType="BADURL"},Wn=class extends ae{tokenType="WHITESPACE";toString(){return"WS"}toSource(){return" "}},so=class extends ae{tokenType="CDO";toSource(){return"<!--"}},io=class extends ae{tokenType="CDC";toSource(){return"-->"}},oo=class extends ae{tokenType=":"},ao=class extends ae{tokenType=";"},co=class extends ae{tokenType=","},Ct=class extends ae{value="";mirror=""},lo=class extends Ct{tokenType="{";constructor(){super(),this.value="{",this.mirror="}"}},uo=class extends Ct{tokenType="}";constructor(){super(),this.value="}",this.mirror="{"}},ho=class extends Ct{tokenType="[";constructor(){super(),this.value="[",this.mirror="]"}},Pr=class extends Ct{tokenType="]";constructor(){super(),this.value="]",this.mirror="["}},fo=class extends Ct{tokenType="(";constructor(){super(),this.value="(",this.mirror=")"}},Vr=class extends Ct{tokenType=")";constructor(){super(),this.value=")",this.mirror="("}},nc=class extends ae{tokenType="~="},rc=class extends ae{tokenType="|="},sc=class extends ae{tokenType="^="},ic=class extends ae{tokenType="$="},oc=class extends ae{tokenType="*="},po=class extends ae{tokenType="||"},jn=class extends ae{tokenType="EOF";toSource(){return""}},de=class extends ae{tokenType="DELIM";value="";constructor(e){super(),this.value=le(e)}toString(){return"DELIM("+this.value+")"}toJSON(){let e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}toSource(){return this.value==="\\"?`\\
|
|
1
|
+
var Ar=class{getActualParent(t){if(!t||!(t instanceof Element))throw new Error("Invalid element provided");if(t.assignedSlot)return t.assignedSlot;let n=t.parentElement;if(n)return n;let r=t.parentNode;return r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host||null}getFullAncestorChain(t){if(!t||!(t instanceof Element))throw new Error("Invalid element provided");let n=[],r=t;for(;r;)n.push(r),r=this.getActualParent(r);return n}getFullAncestorChainToRoot(t,n){if(!t||!(t instanceof Element))throw new Error("Invalid element provided");if(!n||!(n instanceof Element))throw new Error("Invalid root provided");if(!this.containsElementCrossShadow(n,t))throw new Error("Root does not contain the element");let r=[],o=t;for(;o&&o!==n&&this.containsElementCrossShadow(n,o);)r.push(o),o=this.getActualParent(o);return o===n&&r.push(o),r}getClimbCountToParent(t,n){if(!t||!(t instanceof Element))throw new Error("Invalid element provided");if(!n||!(n instanceof Element))throw new Error("Invalid target parent provided");let r=0,o=t;for(;o&&o!==n;)o=this.getActualParent(o),r++;return o===n?r:-1}containsElementCrossShadow(t,n){if(!t||!(t instanceof Element))throw new Error("Invalid element provided");if(!n||!(n instanceof Element))throw new Error("Invalid target provided");let r=n;for(;r;){if(r===t)return!0;r=this.getActualParent(r)}return!1}findLowestCommonAncestor(t){if(!Array.isArray(t)||t.length===0)throw new Error("Invalid elements array provided");for(let r of t)if(!(r instanceof Element))throw new Error("All items in the array must be DOM Elements");let n=this.getFullAncestorChain(t[0]);n.reverse();for(let r=1;r<t.length;r++){let o=this.getFullAncestorChain(t[r]);o.reverse(),n=n.filter(u=>o.includes(u))}return n.length>0?n[n.length-1]:null}findBranchingParent(t,n){if(!Array.isArray(t)||t.length===0)throw new Error("Invalid elements array provided");if(!(n instanceof Element))throw new Error("Target must be a DOM Element");for(let u of t)if(!(u instanceof Element))throw new Error("All items in the array must be DOM Elements");if(!t.includes(n))return console.warn("Target element must be included in the elements array, returning null"),null;let r=this.getFullAncestorChain(n);r.reverse();let o=null;for(let u of r){let l=t.filter(h=>this.containsElementCrossShadow(u,h));if(l.length===1&&l[0]===n){o=u;break}}return o||null}},Ai=Ar;var Ha=Object.defineProperty;var Nt=(e,t)=>{for(var n in t)Ha(e,n,{get:t[n],enumerable:!0})};var Wa={};Nt(Wa,{__PW:()=>Me});var zi={};Nt(zi,{elementMatchesText:()=>an,elementText:()=>Se,getElementLabels:()=>bs,matchesAttributePart:()=>ys,matchesComponentAttribute:()=>ms,shouldSkipForTextMatching:()=>er});var Ji={};Nt(Ji,{cacheNormalizedWhitespaces:()=>Yi,escapeForAttributeSelector:()=>Ne,escapeForTextSelector:()=>Ae,escapeHTML:()=>za,escapeHTMLAttribute:()=>Ga,escapeRegExp:()=>Zt,escapeTemplateString:()=>Ka,escapeWithQuotes:()=>nn,isString:()=>Va,longestCommonSubstring:()=>eo,normalizeEscapedRegexQuotes:()=>rn,normalizeWhiteSpace:()=>we,quoteCSSAttributeValue:()=>et,toSnakeCase:()=>Wr,toTitleCase:()=>Xt,trimString:()=>Xi,trimStringWithEllipsis:()=>Mr});function nn(e,t="'"){let n=JSON.stringify(e),r=n.substring(1,n.length-1).replace(/\\"/g,'"');if(t==="'")return t+r.replace(/[']/g,"\\'")+t;if(t==='"')return t+r.replace(/["]/g,'\\"')+t;if(t==="`")return t+r.replace(/[`]/g,"`")+t;throw new Error("Invalid escape char")}function Ka(e){return e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}function Va(e){return typeof e=="string"||e instanceof String}function Xt(e){return e.charAt(0).toUpperCase()+e.substring(1)}function Wr(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function et(e){return`"${e.replace(/["\\]/g,t=>"\\"+t)}"`}var Kt;function Yi(){Kt=new Map}function we(e){let t=Kt?.get(e);return t===void 0&&(t=e.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),Kt?.set(e,t)),t}function rn(e){return e.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function Qi(e){return e.unicode||e.unicodeSets?String(e):String(e).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Ae(e,t){return typeof e!="string"?Qi(e):`${JSON.stringify(e)}${t?"s":"i"}`}function Ne(e,t){return typeof e!="string"?Qi(e):`"${e.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${t?"s":"i"}`}function Xi(e,t,n=""){if(e.length<=t)return e;let r=[...e];return r.length>t?r.slice(0,t-n.length).join("")+n:r.join("")}function Mr(e,t){return Xi(e,t,"\u2026")}function Zt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Zi={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ga(e){return e.replace(/[&<>"']/gu,t=>Zi[t])}function za(e){return e.replace(/[&<]/gu,t=>Zi[t])}function eo(e,t){let n=e.length,r=t.length,o=0,u=0,l=Array(n+1).fill(null).map(()=>Array(r+1).fill(0));for(let h=1;h<=n;h++)for(let p=1;p<=r;p++)e[h-1]===t[p-1]&&(l[h][p]=l[h-1][p-1]+1,l[h][p]>o&&(o=l[h][p],u=h));return e.slice(u-o,u)}var to={};Nt(to,{beginAriaCaches:()=>Xn,endAriaCaches:()=>Zn,getAriaChecked:()=>ns,getAriaDisabled:()=>tn,getAriaExpanded:()=>is,getAriaLabelledByElements:()=>es,getAriaLevel:()=>os,getAriaPressed:()=>ss,getAriaRole:()=>ue,getAriaSelected:()=>ts,getCSSContent:()=>_t,getCheckedAllowMixed:()=>Io,getCheckedWithoutMixed:()=>Lo,getElementAccessibleDescription:()=>Rr,getElementAccessibleErrorMessage:()=>Co,getElementAccessibleName:()=>At,getReadonly:()=>Oo,isElementHiddenForAria:()=>Ce,isElementIgnoredForAria:()=>Zr,kAriaCheckedRoles:()=>zn,kAriaDisabledRoles:()=>as,kAriaExpandedRoles:()=>Yn,kAriaLevelRoles:()=>Qn,kAriaPressedRoles:()=>Jn,kAriaSelectedRoles:()=>Gn,receivesPointerEvents:()=>Po});var ce=function(e,t,n){return e>=t&&e<=n};function Te(e){return ce(e,48,57)}function Ni(e){return Te(e)||ce(e,65,70)||ce(e,97,102)}function Ja(e){return ce(e,65,90)}function Ya(e){return ce(e,97,122)}function Qa(e){return Ja(e)||Ya(e)}function Xa(e){return e>=128}function Un(e){return Qa(e)||Xa(e)||e===95}function Ci(e){return Un(e)||Te(e)||e===45}function Za(e){return ce(e,0,8)||e===11||ce(e,14,31)||e===127}function Et(e){return e===10}function De(e){return Et(e)||e===9||e===32}var ec=1114111,Kr=class extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}};function tc(e){let t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===13&&e.charCodeAt(n+1)===10&&(r=10,n++),(r===13||r===12)&&(r=10),r===0&&(r=65533),ce(r,55296,56319)&&ce(e.charCodeAt(n+1),56320,57343)){let o=r-55296,u=e.charCodeAt(n+1)-56320;r=Math.pow(2,16)+o*Math.pow(2,10)+u,n++}t.push(r)}return t}function le(e){if(e<=65535)return String.fromCharCode(e);e-=Math.pow(2,16);let t=Math.floor(e/Math.pow(2,10))+55296,n=e%Math.pow(2,10)+56320;return String.fromCharCode(t)+String.fromCharCode(n)}function no(e){let t=tc(e),n=-1,r=[],o,u=0,l=0,h=0,p=function(){u+=1,h=l,l=0},y={line:u,column:l},v=function(B){return B>=t.length?-1:t[B]},b=function(B){if(B===void 0&&(B=1),B>3)throw"Spec Error: no more than three codepoints of lookahead.";return v(n+B)},m=function(B){return B===void 0&&(B=1),n+=B,o=v(n),Et(o)?p():l+=B,!0},E=function(){return n-=1,Et(o)?(u-=1,l=h):l-=1,y.line=u,y.column=l,!0},A=function(B){return B===void 0&&(B=o),B===-1},I=function(){},P=function(){},q=function(){if(U(),m(),De(o)){for(;De(b());)m();return new Wn}else{if(o===34)return se();if(o===35)if(Ci(b())||he(b(1),b(2))){let B=new mo("");return ie(b(1),b(2),b(3))&&(B.type="id"),B.value=ze(),B}else return new de(o);else return o===36?b()===61?(m(),new ic):new de(o):o===39?se():o===40?new fo:o===41?new Vr:o===42?b()===61?(m(),new oc):new de(o):o===43?rt()?(E(),G()):new de(o):o===44?new co:o===45?rt()?(E(),G()):b(1)===45&&b(2)===62?(m(2),new io):Ee()?(E(),Z()):new de(o):o===46?rt()?(E(),G()):new de(o):o===58?new oo:o===59?new ao:o===60?b(1)===33&&b(2)===45&&b(3)===45?(m(3),new so):new de(o):o===64?ie(b(1),b(2),b(3))?new go(ze()):new de(o):o===91?new ho:o===92?D()?(E(),Z()):(P(),new de(o)):o===93?new Pr:o===94?b()===61?(m(),new sc):new de(o):o===123?new lo:o===124?b()===61?(m(),new rc):b()===124?(m(),new po):new de(o):o===125?new uo:o===126?b()===61?(m(),new nc):new de(o):Te(o)?(E(),G()):Un(o)?(E(),Z()):A()?new jn:new de(o)}},U=function(){for(;b(1)===47&&b(2)===42;)for(m(2);;)if(m(),o===42&&b()===47){m();break}else if(A()){P();return}},G=function(){let B=ln();if(ie(b(1),b(2),b(3))){let z=new ac;return z.value=B.value,z.repr=B.repr,z.type=B.type,z.unit=ze(),z}else if(b()===37){m();let z=new vo;return z.value=B.value,z.repr=B.repr,z}else{let z=new bo;return z.value=B.value,z.repr=B.repr,z.type=B.type,z}},Z=function(){let B=ze();if(B.toLowerCase()==="url"&&b()===40){for(m();De(b(1))&&De(b(2));)m();return b()===34||b()===39?new zt(B):De(b())&&(b(2)===34||b(2)===39)?new zt(B):ee()}else return b()===40?(m(),new zt(B)):new Gr(B)},se=function(B){B===void 0&&(B=o);let z="";for(;m();){if(o===B||A())return new zr(z);if(Et(o))return P(),E(),new ro;o===92?A(b())?I():Et(b())?m():z+=le(ne()):z+=le(o)}throw new Error("Internal error")},ee=function(){let B=new yo("");for(;De(b());)m();if(A(b()))return B;for(;m();){if(o===41||A())return B;if(De(o)){for(;De(b());)m();return b()===41||A(b())?(m(),B):(ye(),new Bn)}else{if(o===34||o===39||o===40||Za(o))return P(),ye(),new Bn;if(o===92)if(D())B.value+=le(ne());else return P(),ye(),new Bn;else B.value+=le(o)}}throw new Error("Internal error")},ne=function(){if(m(),Ni(o)){let B=[o];for(let be=0;be<5&&Ni(b());be++)m(),B.push(o);De(b())&&m();let z=parseInt(B.map(function(be){return String.fromCharCode(be)}).join(""),16);return z>ec&&(z=65533),z}else return A()?65533:o},he=function(B,z){return!(B!==92||Et(z))},D=function(){return he(o,b())},ie=function(B,z,be){return B===45?Un(z)||z===45||he(z,be):Un(B)?!0:B===92?he(B,z):!1},Ee=function(){return ie(o,b(1),b(2))},fe=function(B,z,be){return B===43||B===45?!!(Te(z)||z===46&&Te(be)):B===46?!!Te(z):!!Te(B)},rt=function(){return fe(o,b(1),b(2))},ze=function(){let B="";for(;m();)if(Ci(o))B+=le(o);else if(D())B+=le(ne());else return E(),B;throw new Error("Internal parse error")},ln=function(){let B="",z="integer";for((b()===43||b()===45)&&(m(),B+=le(o));Te(b());)m(),B+=le(o);if(b(1)===46&&Te(b(2)))for(m(),B+=le(o),m(),B+=le(o),z="number";Te(b());)m(),B+=le(o);let be=b(1),V=b(2),Je=b(3);if((be===69||be===101)&&Te(V))for(m(),B+=le(o),m(),B+=le(o),z="number";Te(b());)m(),B+=le(o);else if((be===69||be===101)&&(V===43||V===45)&&Te(Je))for(m(),B+=le(o),m(),B+=le(o),m(),B+=le(o),z="number";Te(b());)m(),B+=le(o);let it=He(B);return{type:z,value:it,repr:B}},He=function(B){return+B},ye=function(){for(;m();){if(o===41||A())return;D()&&ne(),I()}},st=0;for(;!A(b());)if(r.push(q()),st++,st>t.length*2)throw new Error("I'm infinite-looping!");return r}var ae=class{tokenType="";value;toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}},ro=class extends ae{tokenType="BADSTRING"},Bn=class extends ae{tokenType="BADURL"},Wn=class extends ae{tokenType="WHITESPACE";toString(){return"WS"}toSource(){return" "}},so=class extends ae{tokenType="CDO";toSource(){return"<!--"}},io=class extends ae{tokenType="CDC";toSource(){return"-->"}},oo=class extends ae{tokenType=":"},ao=class extends ae{tokenType=";"},co=class extends ae{tokenType=","},Ct=class extends ae{value="";mirror=""},lo=class extends Ct{tokenType="{";constructor(){super(),this.value="{",this.mirror="}"}},uo=class extends Ct{tokenType="}";constructor(){super(),this.value="}",this.mirror="{"}},ho=class extends Ct{tokenType="[";constructor(){super(),this.value="[",this.mirror="]"}},Pr=class extends Ct{tokenType="]";constructor(){super(),this.value="]",this.mirror="["}},fo=class extends Ct{tokenType="(";constructor(){super(),this.value="(",this.mirror=")"}},Vr=class extends Ct{tokenType=")";constructor(){super(),this.value=")",this.mirror="("}},nc=class extends ae{tokenType="~="},rc=class extends ae{tokenType="|="},sc=class extends ae{tokenType="^="},ic=class extends ae{tokenType="$="},oc=class extends ae{tokenType="*="},po=class extends ae{tokenType="||"},jn=class extends ae{tokenType="EOF";toSource(){return""}},de=class extends ae{tokenType="DELIM";value="";constructor(e){super(),this.value=le(e)}toString(){return"DELIM("+this.value+")"}toJSON(){let e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}toSource(){return this.value==="\\"?`\\
|
|
2
2
|
`:this.value}},It=class extends ae{value="";ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){let e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}},Gr=class extends It{constructor(e){super(),this.value=e}tokenType="IDENT";toString(){return"IDENT("+this.value+")"}toSource(){return sn(this.value)}},zt=class extends It{tokenType="FUNCTION";mirror;constructor(e){super(),this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return sn(this.value)+"("}},go=class extends It{tokenType="AT-KEYWORD";constructor(e){super(),this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+sn(this.value)}},mo=class extends It{tokenType="HASH";type;constructor(e){super(),this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){let e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+sn(this.value):"#"+cc(this.value)}},zr=class extends It{tokenType="STRING";constructor(e){super(),this.value=e}toString(){return'"'+wo(this.value)+'"'}},yo=class extends It{tokenType="URL";constructor(e){super(),this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+wo(this.value)+'")'}},bo=class extends ae{tokenType="NUMBER";type;repr;constructor(){super(),this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){let e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}},vo=class extends ae{tokenType="PERCENTAGE";repr;constructor(){super(),this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){let e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}},ac=class extends ae{tokenType="DIMENSION";type;repr;unit;constructor(){super(),this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){let 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(){let e=this.repr,t=sn(this.unit);return t[0].toLowerCase()==="e"&&(t[1]==="-"||ce(t.charCodeAt(1),48,57))&&(t="\\65 "+t.slice(1,t.length)),e+t}};function sn(e){e=""+e;let t="",n=e.charCodeAt(0);for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===0)throw new Kr("Invalid character: the input contains U+0000.");ce(o,1,31)||o===127||r===0&&ce(o,48,57)||r===1&&ce(o,48,57)&&n===45?t+="\\"+o.toString(16)+" ":o>=128||o===45||o===95||ce(o,48,57)||ce(o,65,90)||ce(o,97,122)?t+=e[r]:t+="\\"+e[r]}return t}function cc(e){e=""+e;let t="";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===0)throw new Kr("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||ce(r,48,57)||ce(r,65,90)||ce(r,97,122)?t+=e[n]:t+="\\"+r.toString(16)+" "}return t}function wo(e){e=""+e;let t="";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===0)throw new Kr("Invalid character: the input contains U+0000.");ce(r,1,31)||r===127?t+="\\"+r.toString(16)+" ":r===34||r===92?t+="\\"+e[n]:t+=e[n]}return t}var Eo={};Nt(Eo,{box:()=>en,closestCrossShadow:()=>xt,elementSafeTagName:()=>pe,enclosingElement:()=>lc,enclosingShadowRootOrDocument:()=>Yr,getElementComputedStyle:()=>Fe,getGlobalOptions:()=>Vn,isElementStyleVisibilityVisible:()=>Qr,isElementVisible:()=>Ge,isInsideScope:()=>on,isVisibleTextNode:()=>Xr,parentElementOrShadowHost:()=>me,setGlobalOptions:()=>So});var Jr={};function So(e){Jr=e}function Vn(){return Jr}function on(e,t){for(;t;){if(e.contains(t))return!0;t=xo(t)}return!1}function lc(e){return e.nodeType===1?e:e.parentElement??void 0}function me(e){if(e.parentElement)return e.parentElement;if(e.parentNode&&e.parentNode.nodeType===11&&e.parentNode.host)return e.parentNode.host}function Yr(e){let t=e;for(;t.parentNode;)t=t.parentNode;if(t.nodeType===11||t.nodeType===9)return t}function xo(e){for(;e.parentElement;)e=e.parentElement;return me(e)}function xt(e,t,n){for(;e;){let r=e.closest(t);if(n&&r!==n&&r?.contains(n))return;if(r)return r;e=xo(e)}}function Fe(e,t){return e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,t):void 0}function Qr(e,t){if(t=t??Fe(e),!t)return!0;if(Element.prototype.checkVisibility&&Jr.browserNameForWorkarounds!=="webkit"){if(!e.checkVisibility())return!1}else{let n=e.closest("details,summary");if(n!==e&&n?.nodeName==="DETAILS"&&!n.open)return!1}return t.visibility==="visible"}function en(e){let t=Fe(e);if(!t)return{visible:!0};if(t.display==="contents"){for(let r=e.firstChild;r;r=r.nextSibling){if(r.nodeType===1&&Ge(r))return{visible:!0,style:t};if(r.nodeType===3&&Xr(r))return{visible:!0,style:t}}return{visible:!1,style:t}}if(!Qr(e,t))return{style:t,visible:!1};let n=e.getBoundingClientRect();return{rect:n,style:t,visible:n.width>0&&n.height>0}}function Ge(e){return en(e).visible}function Xr(e){let t=e.ownerDocument.createRange();t.selectNode(e);let n=t.getBoundingClientRect();return n.width>0&&n.height>0}function pe(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function Ii(e){return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")}var Li="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]",uc=[["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 To(e,t){return uc.some(([n,r])=>!r?.includes(t||"")&&e.hasAttribute(n))}function ko(e){return!Number.isNaN(Number(String(e.getAttribute("tabindex"))))}function hc(e){return!$o(e)&&(fc(e)||ko(e))}function fc(e){let t=pe(e);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(t)?!0:t==="A"||t==="AREA"?e.hasAttribute("href"):t==="INPUT"?!e.hidden:!1}var Oi={A:e=>e.hasAttribute("href")?"link":null,AREA:e=>e.hasAttribute("href")?"link":null,ARTICLE:()=>"article",ASIDE:()=>"complementary",BLOCKQUOTE:()=>"blockquote",BUTTON:()=>"button",CAPTION:()=>"caption",CODE:()=>"code",DATALIST:()=>"listbox",DD:()=>"definition",DEL:()=>"deletion",DETAILS:()=>"group",DFN:()=>"term",DIALOG:()=>"dialog",DT:()=>"term",EM:()=>"emphasis",FIELDSET:()=>"group",FIGURE:()=>"figure",FOOTER:e=>xt(e,Li)?null:"contentinfo",FORM:e=>Ii(e)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:e=>xt(e,Li)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:e=>e.getAttribute("alt")===""&&!e.getAttribute("title")&&!To(e)&&!ko(e)?"presentation":"img",INPUT:e=>{let t=e.type.toLowerCase();if(t==="search")return e.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(t)){let n=Lt(e,e.getAttribute("list"))[0];return n&&pe(n)==="DATALIST"?"combobox":"textbox"}return t==="hidden"?null:t==="file"&&!Vn().inputFileRoleTextbox?"button":Sc[t]||"textbox"},INS:()=>"insertion",LI:()=>"listitem",MAIN:()=>"main",MARK:()=>"mark",MATH:()=>"math",MENU:()=>"list",METER:()=>"meter",NAV:()=>"navigation",OL:()=>"list",OPTGROUP:()=>"group",OPTION:()=>"option",OUTPUT:()=>"status",P:()=>"paragraph",PROGRESS:()=>"progressbar",SECTION:e=>Ii(e)?"region":null,SELECT:e=>e.hasAttribute("multiple")||e.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:e=>{let t=xt(e,"table"),n=t?Kn(t):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:e=>{if(e.getAttribute("scope")==="col")return"columnheader";if(e.getAttribute("scope")==="row")return"rowheader";let t=xt(e,"table"),n=t?Kn(t):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},dc={DD:["DL","DIV"],DIV:["DL"],DT:["DL","DIV"],LI:["OL","UL"],TBODY:["TABLE"],TD:["TR"],TFOOT:["TABLE"],TH:["TR"],THEAD:["TABLE"],TR:["THEAD","TBODY","TFOOT","TABLE"]};function $i(e){var t;let n=((t=Oi[pe(e)])==null?void 0:t.call(Oi,e))||"";if(!n)return null;let r=e;for(;r;){let o=me(r),u=dc[pe(r)];if(!u||!o||!u.includes(pe(o)))break;let l=Kn(o);if((l==="none"||l==="presentation")&&!_o(o,l))return l;r=o}return n}var pc=["alert","alertdialog","application","article","banner","blockquote","button","caption","cell","checkbox","code","columnheader","combobox","complementary","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","grid","gridcell","group","heading","img","insertion","link","list","listbox","listitem","log","main","mark","marquee","math","meter","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","paragraph","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","strong","subscript","superscript","switch","tab","table","tablist","tabpanel","term","textbox","time","timer","toolbar","tooltip","tree","treegrid","treeitem"];function Kn(e){return(e.getAttribute("role")||"").split(" ").map(n=>n.trim()).find(n=>pc.includes(n))||null}function _o(e,t){return To(e,t)||hc(e)}function ue(e){let t=Kn(e);if(!t)return $i(e);if(t==="none"||t==="presentation"){let n=$i(e);if(_o(e,n))return n}return t}function Ao(e){return e===null?void 0:e.toLowerCase()==="true"}function Zr(e){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(pe(e))}function Ce(e){if(Zr(e))return!0;let t=Fe(e),n=e.nodeName==="SLOT";if(t?.display==="contents"&&!n){for(let o=e.firstChild;o;o=o.nextSibling)if(o.nodeType===1&&!Ce(o)||o.nodeType===3&&Xr(o))return!1;return!0}return!(e.nodeName==="OPTION"&&!!e.closest("select"))&&!n&&!Qr(e,t)?!0:No(e)}function No(e){let t=Tt?.get(e);if(t===void 0){if(t=!1,e.parentElement&&e.parentElement.shadowRoot&&!e.assignedSlot&&(t=!0),!t){let n=Fe(e);t=!n||n.display==="none"||Ao(e.getAttribute("aria-hidden"))===!0}if(!t){let n=me(e);n&&(t=No(n))}Tt?.set(e,t)}return t}function Lt(e,t){if(!t)return[];let n=Yr(e);if(!n)return[];try{let r=t.split(" ").filter(u=>!!u),o=[];for(let u of r){let l=n.querySelector("#"+CSS.escape(u));l&&!o.includes(l)&&o.push(l)}return o}catch{return[]}}function Ue(e){return e.trim()}function Jt(e){return e.split("\xA0").map(t=>t.replace(/\r\n/g,`
|
|
3
3
|
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join("\xA0").trim()}function Mi(e,t){let n=[...e.querySelectorAll(t)];for(let r of Lt(e,e.getAttribute("aria-owns")))r.matches(t)&&n.push(r),n.push(...r.querySelectorAll(t));return n}function _t(e,t){let n=t==="::before"?ds:t==="::after"?ps:fs;if(n?.has(e))return n?.get(e);let r=Fe(e,t),o;return r&&r.display!=="none"&&r.visibility!=="hidden"&&(o=gc(e,r.content,!!t)),t&&o!==void 0&&(r?.display||"inline")!=="inline"&&(o=" "+o+" "),n&&n.set(e,o),o}function gc(e,t,n){if(!(!t||t==="none"||t==="normal"))try{let r=no(t).filter(h=>!(h instanceof Wn)),o=r.findIndex(h=>h instanceof de&&h.value==="/");if(o!==-1)r=r.slice(o+1);else if(!n)return;let u=[],l=0;for(;l<r.length;)if(r[l]instanceof zr)u.push(r[l].value),l++;else if(l+2<r.length&&r[l]instanceof zt&&r[l].value==="attr"&&r[l+1]instanceof Gr&&r[l+2]instanceof Vr){let h=r[l+1].value;u.push(e.getAttribute(h)||""),l+=3}else return;return u.join("")}catch{}}function es(e){let t=e.getAttribute("aria-labelledby");if(t===null)return null;let n=Lt(e,t);return n.length?n:null}function mc(e,t){let n=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(e),r=t&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(e);return n||r}function At(e,t){let n=t?ls:cs,r=n?.get(e);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(ue(e)||"")||(r=Jt($e(e,{includeHidden:t,visitedElements:new Set,embeddedInTargetElement:"self"}))),n?.set(e,r)),r}function Rr(e,t){let n=t?hs:us,r=n?.get(e);if(r===void 0){if(r="",e.hasAttribute("aria-describedby")){let o=Lt(e,e.getAttribute("aria-describedby"));r=Jt(o.map(u=>$e(u,{includeHidden:t,visitedElements:new Set,embeddedInDescribedBy:{element:u,hidden:Ce(u)}})).join(" "))}else e.hasAttribute("aria-description")?r=Jt(e.getAttribute("aria-description")||""):r=Jt(e.getAttribute("title")||"");n?.set(e,r)}return r}function yc(e){let t=e.getAttribute("aria-invalid");return!t||t.trim()===""||t.toLocaleLowerCase()==="false"?"false":t==="true"||t==="grammar"||t==="spelling"?t:"true"}function bc(e){if("validity"in e){let t=e.validity;return t?.valid===!1}return!1}function Co(e){let t=Yt,n=Yt?.get(e);if(n===void 0){n="";let r=yc(e)!=="false",o=bc(e);if(r||o){let u=e.getAttribute("aria-errormessage");n=Lt(e,u).map(p=>Jt($e(p,{visitedElements:new Set,embeddedInDescribedBy:{element:p,hidden:Ce(p)}}))).join(" ").trim()}t?.set(e,n)}return n}function $e(e,t){var n,r,o,u;if(t.visitedElements.has(e))return"";let l={...t,embeddedInTargetElement:t.embeddedInTargetElement==="self"?"descendant":t.embeddedInTargetElement};if(!t.includeHidden){let m=!!((n=t.embeddedInLabelledBy)!=null&&n.hidden)||!!((r=t.embeddedInDescribedBy)!=null&&r.hidden)||!!((o=t.embeddedInNativeTextAlternative)!=null&&o.hidden)||!!((u=t.embeddedInLabel)!=null&&u.hidden);if(Zr(e)||!m&&Ce(e))return t.visitedElements.add(e),""}let h=es(e);if(!t.embeddedInLabelledBy){let m=(h||[]).map(E=>$e(E,{...t,embeddedInLabelledBy:{element:E,hidden:Ce(E)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(m)return m}let p=ue(e)||"",y=pe(e);if(t.embeddedInLabel||t.embeddedInLabelledBy||t.embeddedInTargetElement==="descendant"){let m=[...e.labels||[]].includes(e),E=(h||[]).includes(e);if(!m&&!E){if(p==="textbox")return t.visitedElements.add(e),y==="INPUT"||y==="TEXTAREA"?e.value:e.textContent||"";if(["combobox","listbox"].includes(p)){t.visitedElements.add(e);let A;if(y==="SELECT")A=[...e.selectedOptions],!A.length&&e.options.length&&A.push(e.options[0]);else{let I=p==="combobox"?Mi(e,"*").find(P=>ue(P)==="listbox"):e;A=I?Mi(I,'[aria-selected="true"]').filter(P=>ue(P)==="option"):[]}return!A.length&&y==="INPUT"?e.value:A.map(I=>$e(I,l)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(p))return t.visitedElements.add(e),e.hasAttribute("aria-valuetext")?e.getAttribute("aria-valuetext")||"":e.hasAttribute("aria-valuenow")?e.getAttribute("aria-valuenow")||"":e.getAttribute("value")||"";if(["menu"].includes(p))return t.visitedElements.add(e),""}}let v=e.getAttribute("aria-label")||"";if(Ue(v))return t.visitedElements.add(e),v;if(!["presentation","none"].includes(p)){if(y==="INPUT"&&["button","submit","reset"].includes(e.type)){t.visitedElements.add(e);let m=e.value||"";return Ue(m)?m:e.type==="submit"?"Submit":e.type==="reset"?"Reset":e.getAttribute("title")||""}if(!Vn().inputFileRoleTextbox&&y==="INPUT"&&e.type==="file"){t.visitedElements.add(e);let m=e.labels||[];return m.length&&!t.embeddedInLabelledBy?jt(m,t):"Choose File"}if(y==="INPUT"&&e.type==="image"){t.visitedElements.add(e);let m=e.labels||[];if(m.length&&!t.embeddedInLabelledBy)return jt(m,t);let E=e.getAttribute("alt")||"";if(Ue(E))return E;let A=e.getAttribute("title")||"";return Ue(A)?A:"Submit"}if(!h&&y==="BUTTON"){t.visitedElements.add(e);let m=e.labels||[];if(m.length)return jt(m,t)}if(!h&&y==="OUTPUT"){t.visitedElements.add(e);let m=e.labels||[];return m.length?jt(m,t):e.getAttribute("title")||""}if(!h&&(y==="TEXTAREA"||y==="SELECT"||y==="INPUT")){t.visitedElements.add(e);let m=e.labels||[];if(m.length)return jt(m,t);let E=y==="INPUT"&&["text","password","search","tel","email","url"].includes(e.type)||y==="TEXTAREA",A=e.getAttribute("placeholder")||"",I=e.getAttribute("title")||"";return!E||I?I:A}if(!h&&y==="FIELDSET"){t.visitedElements.add(e);for(let E=e.firstElementChild;E;E=E.nextElementSibling)if(pe(E)==="LEGEND")return $e(E,{...l,embeddedInNativeTextAlternative:{element:E,hidden:Ce(E)}});return e.getAttribute("title")||""}if(!h&&y==="FIGURE"){t.visitedElements.add(e);for(let E=e.firstElementChild;E;E=E.nextElementSibling)if(pe(E)==="FIGCAPTION")return $e(E,{...l,embeddedInNativeTextAlternative:{element:E,hidden:Ce(E)}});return e.getAttribute("title")||""}if(y==="IMG"){t.visitedElements.add(e);let m=e.getAttribute("alt")||"";return Ue(m)?m:e.getAttribute("title")||""}if(y==="TABLE"){t.visitedElements.add(e);for(let E=e.firstElementChild;E;E=E.nextElementSibling)if(pe(E)==="CAPTION")return $e(E,{...l,embeddedInNativeTextAlternative:{element:E,hidden:Ce(E)}});let m=e.getAttribute("summary")||"";if(m)return m}if(y==="AREA"){t.visitedElements.add(e);let m=e.getAttribute("alt")||"";return Ue(m)?m:e.getAttribute("title")||""}if(y==="SVG"||e.ownerSVGElement){t.visitedElements.add(e);for(let m=e.firstElementChild;m;m=m.nextElementSibling)if(pe(m)==="TITLE"&&m.ownerSVGElement)return $e(m,{...l,embeddedInLabelledBy:{element:m,hidden:Ce(m)}})}if(e.ownerSVGElement&&y==="A"){let m=e.getAttribute("xlink:title")||"";if(Ue(m))return t.visitedElements.add(e),m}}let b=y==="SUMMARY"&&!["presentation","none"].includes(p);if(mc(p,t.embeddedInTargetElement==="descendant")||b||t.embeddedInLabelledBy||t.embeddedInDescribedBy||t.embeddedInLabel||t.embeddedInNativeTextAlternative){t.visitedElements.add(e);let m=vc(e,l);if(t.embeddedInTargetElement==="self"?Ue(m):m)return m}if(!["presentation","none"].includes(p)||y==="IFRAME"){t.visitedElements.add(e);let m=e.getAttribute("title")||"";if(Ue(m))return m}return t.visitedElements.add(e),""}function vc(e,t){let n=[],r=(u,l)=>{var h;if(!(l&&u.assignedSlot))if(u.nodeType===1){let p=((h=Fe(u))==null?void 0:h.display)||"inline",y=$e(u,t);(p!=="inline"||u.nodeName==="BR")&&(y=" "+y+" "),n.push(y)}else u.nodeType===3&&n.push(u.textContent||"")};n.push(_t(e,"::before")||"");let o=_t(e);if(o!==void 0)n.push(o);else{let u=e.nodeName==="SLOT"?e.assignedNodes():[];if(u.length)for(let l of u)r(l,!1);else{for(let l=e.firstChild;l;l=l.nextSibling)r(l,!0);if(e.shadowRoot)for(let l=e.shadowRoot.firstChild;l;l=l.nextSibling)r(l,!0);for(let l of Lt(e,e.getAttribute("aria-owns")))r(l,!0)}}return n.push(_t(e,"::after")||""),n.join("")}var Gn=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function ts(e){return pe(e)==="OPTION"?e.selected:Gn.includes(ue(e)||"")?Ao(e.getAttribute("aria-selected"))===!0:!1}var zn=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function ns(e){let t=rs(e,!0);return t==="error"?!1:t}function Io(e){return rs(e,!0)}function Lo(e){return rs(e,!1)}function rs(e,t){let n=pe(e);if(t&&n==="INPUT"&&e.indeterminate)return"mixed";if(n==="INPUT"&&["checkbox","radio"].includes(e.type))return e.checked;if(zn.includes(ue(e)||"")){let r=e.getAttribute("aria-checked");return r==="true"?!0:t&&r==="mixed"?"mixed":!1}return"error"}var wc=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function Oo(e){let t=pe(e);return["INPUT","TEXTAREA","SELECT"].includes(t)?e.hasAttribute("readonly"):wc.includes(ue(e)||"")?e.getAttribute("aria-readonly")==="true":e.isContentEditable?!1:"error"}var Jn=["button"];function ss(e){if(Jn.includes(ue(e)||"")){let t=e.getAttribute("aria-pressed");if(t==="true")return!0;if(t==="mixed")return"mixed"}return!1}var Yn=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function is(e){if(pe(e)==="DETAILS")return e.open;if(Yn.includes(ue(e)||"")){let t=e.getAttribute("aria-expanded");return t===null?void 0:t==="true"}}var Qn=["heading","listitem","row","treeitem"];function os(e){let t={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[pe(e)];if(t)return t;if(Qn.includes(ue(e)||"")){let n=e.getAttribute("aria-level"),r=n===null?Number.NaN:Number(n);if(Number.isInteger(r)&&r>=1)return r}return 0}var as=["application","button","composite","gridcell","group","input","link","menuitem","scrollbar","separator","tab","checkbox","columnheader","combobox","grid","listbox","menu","menubar","menuitemcheckbox","menuitemradio","option","radio","radiogroup","row","rowheader","searchbox","select","slider","spinbutton","switch","tablist","textbox","toolbar","tree","treegrid","treeitem"];function tn(e){return $o(e)||Mo(e)}function $o(e){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(e.tagName)&&(e.hasAttribute("disabled")||Ec(e))}function Ec(e){let t=e?.closest("FIELDSET[DISABLED]");if(!t)return!1;let n=t.querySelector(":scope > LEGEND");return!n||!n.contains(e)}function Mo(e,t=!1){if(!e)return!1;if(t||as.includes(ue(e)||"")){let n=(e.getAttribute("aria-disabled")||"").toLowerCase();return n==="true"?!0:n==="false"?!1:Mo(me(e),!0)}return!1}function jt(e,t){return[...e].map(n=>$e(n,{...t,embeddedInLabel:{element:n,hidden:Ce(n)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(n=>!!n).join(" ")}function Po(e){let t=gs,n=e,r,o=[];for(;n;n=me(n)){let u=t.get(n);if(u!==void 0){r=u;break}o.push(n);let l=Fe(n);if(!l){r=!0;break}let h=l.pointerEvents;if(h){r=h!=="none";break}}r===void 0&&(r=!0);for(let u of o)t.set(u,r);return r}var cs,ls,us,hs,Yt,Tt,fs,ds,ps,gs,Ro=0;function Xn(){++Ro,cs??=new Map,ls??=new Map,us??=new Map,hs??=new Map,Yt??=new Map,Tt??=new Map,fs??=new Map,ds??=new Map,ps??=new Map,gs??=new Map}function Zn(){--Ro||(cs=void 0,ls=void 0,us=void 0,hs=void 0,Yt=void 0,Tt=void 0,fs=void 0,ds=void 0,ps=void 0,gs=void 0)}var Sc={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function ms(e,t){for(let n of t.jsonPath)e!=null&&(e=e[n]);return ys(e,t)}function ys(e,t){let n=typeof e=="string"&&!t.caseSensitive?e.toUpperCase():e,r=typeof t.value=="string"&&!t.caseSensitive?t.value.toUpperCase():t.value;return t.op==="<truthy>"?!!n:t.op==="="?r instanceof RegExp?typeof n=="string"&&!!n.match(r):n===r:typeof n!="string"||typeof r!="string"?!1:t.op==="*="?n.includes(r):t.op==="^="?n.startsWith(r):t.op==="$="?n.endsWith(r):t.op==="|="?n===r||n.startsWith(r+"-"):t.op==="~="?n.split(" ").includes(r):!1}function er(e){let t=e.ownerDocument;return e.nodeName==="SCRIPT"||e.nodeName==="NOSCRIPT"||e.nodeName==="STYLE"||t.head&&t.head.contains(e)}function Se(e,t){let n=e.get(t);if(n===void 0){if(n={full:"",normalized:"",immediate:[]},!er(t)){let r="";if(t instanceof HTMLInputElement&&(t.type==="submit"||t.type==="button"))n={full:t.value,normalized:we(t.value),immediate:[t.value]};else{for(let o=t.firstChild;o;o=o.nextSibling)if(o.nodeType===Node.TEXT_NODE)n.full+=o.nodeValue||"",r+=o.nodeValue||"";else{if(o.nodeType===Node.COMMENT_NODE)continue;r&&n.immediate.push(r),r="",o.nodeType===Node.ELEMENT_NODE&&(n.full+=Se(e,o).full)}r&&n.immediate.push(r),t.shadowRoot&&(n.full+=Se(e,t.shadowRoot).full),n.full&&(n.normalized=we(n.full))}}e.set(t,n)}return n}function an(e,t,n){if(er(t)||!n(Se(e,t)))return"none";for(let r=t.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&n(Se(e,r)))return"selfAndChildren";return t.shadowRoot&&n(Se(e,t.shadowRoot))?"selfAndChildren":"self"}function bs(e,t){let n=es(t);if(n)return n.map(u=>Se(e,u));let r=t.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:we(r),immediate:[r]}];let o=t.nodeName==="INPUT"&&t.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(t.nodeName)||o){let u=t.labels;if(u)return[...u].map(l=>Se(e,l))}return[]}var qo={};Nt(qo,{buildNoTextCandidates:()=>Go,buildTextCandidates:()=>zo,generateSelector:()=>qr});var Do=10,Ot=Do/2,Pi=1,xc=2,Tc=10,kc=50,Uo=100,Bo=120,jo=140,Fo=160,Fn=180,Ho=200,Ri=250,_c=Bo+Ot,Ac=jo+Ot,Nc=Uo+Ot,Cc=Fo+Ot,Ic=Fn+Ot,Lc=Ho+Ot,Oc=300,$c=500,Wo=510,Nr=520,Ko=530,Vo=1e4,Mc=1e7,Pc=1e3;function qr(e,t,n){e._evaluator.begin();let r={allowText:new Map,disallowText:new Map};Xn();try{let o=[];if(n.forTextExpect){let h=$n(e,t.ownerDocument.documentElement,n);for(let p=t;p;p=me(p)){let y=yt(r,e,p,{...n,noText:!0});if(!y)continue;if(Ve(y)<=Pc){h=y;break}}o=[Hn(h)]}else{if(!t.matches("input,textarea,select")&&!t.isContentEditable){let h=xt(t,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",n.root);h&&Ge(h)&&(t=h)}if(n.multiple){let h=yt(r,e,t,n),p=yt(r,e,t,{...n,noText:!0}),y=[h,p];if(r.allowText.clear(),r.disallowText.clear(),h&&Cr(h)&&y.push(yt(r,e,t,{...n,noCSSId:!0})),p&&Cr(p)&&y.push(yt(r,e,t,{...n,noText:!0,noCSSId:!0})),y=y.filter(Boolean),!y.length){let v=$n(e,t,n);y.push(v),Cr(v)&&y.push($n(e,t,{...n,noCSSId:!0}))}o=[...new Set(y.map(v=>Hn(v)))]}else{let h=yt(r,e,t,n)||$n(e,t,n);o=[Hn(h)]}}let u=o[0],l=e.parseSelector(u);return{selector:u,selectors:o,elements:e.querySelectorAll(l,n.root??t.ownerDocument)}}finally{Zn(),e._evaluator.end()}}function qi(e){return e.filter(t=>t[0].selector[0]!=="/")}function yt(e,t,n,r){if(r.root&&!on(r.root,n))throw new Error("Target element must belong to the root's subtree");if(n===r.root)return[{engine:"css",selector:":scope",score:1}];if(n.ownerDocument.documentElement===n)return[{engine:"css",selector:"html",score:1}];let o=(l,h)=>{let p=l===n,y=h?zo(t,l,l===n):[];l!==n&&(y=qi(y));let v=Go(t,l,r).filter(E=>!r.omitInternalEngines||!E.engine.startsWith("internal:")).map(E=>[E]),b=Di(t,r.root??n.ownerDocument,l,[...y,...v],p);y=qi(y);let m=E=>{let A=h&&!E.length,I=[...E,...v].filter(q=>b?Ve(q)<Ve(b):!0),P=I[0];if(P)for(let q=me(l);q&&q!==r.root;q=me(q)){let U=u(q,A);if(!U||b&&Ve([...U,...P])>=Ve(b))continue;if(P=Di(t,q,l,I,p),!P)return;let G=[...U,...P];(!b||Ve(G)<Ve(b))&&(b=G)}};return m(y),l===n&&y.length&&m([]),b},u=(l,h)=>{let p=h?e.allowText:e.disallowText,y=p.get(l);return y===void 0&&(y=o(l,h),p.set(l,y)),y};return o(n,!r.noText)}function Go(e,t,n){let r=[];{for(let l of["data-testid","data-test-id","data-test"])l!==n.testIdAttributeName&&t.getAttribute(l)&&r.push({engine:"css",selector:`[${l}=${et(t.getAttribute(l))}]`,score:xc});if(!n.noCSSId){let l=t.getAttribute("id");l&&!Rc(l)&&r.push({engine:"css",selector:Jo(l),score:$c})}r.push({engine:"css",selector:Be(t),score:Ko})}if(t.nodeName==="IFRAME"){for(let l of["name","title"])t.getAttribute(l)&&r.push({engine:"css",selector:`${Be(t)}[${l}=${et(t.getAttribute(l))}]`,score:Tc});return t.getAttribute(n.testIdAttributeName)&&r.push({engine:"css",selector:`[${n.testIdAttributeName}=${et(t.getAttribute(n.testIdAttributeName))}]`,score:Pi}),Dr([r]),r}if(t.getAttribute(n.testIdAttributeName)&&r.push({engine:"internal:testid",selector:`[${n.testIdAttributeName}=${Ne(t.getAttribute(n.testIdAttributeName),!0)}]`,score:Pi}),t.nodeName==="INPUT"||t.nodeName==="TEXTAREA"){let l=t;if(l.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${Ne(l.placeholder,!0)}]`,score:_c});for(let h of kt(l.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${Ne(h.text,!1)}]`,score:Bo-h.scoreBonus})}}let o=bs(e._evaluator._cacheText,t);for(let l of o){let h=l.normalized;r.push({engine:"internal:label",selector:Ae(h,!0),score:Ac});for(let p of kt(h))r.push({engine:"internal:label",selector:Ae(p.text,!1),score:jo-p.scoreBonus})}let u=ue(t);return u&&!["none","presentation"].includes(u)&&r.push({engine:"internal:role",selector:u,score:Wo}),t.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(t.nodeName)&&r.push({engine:"css",selector:`${Be(t)}[name=${et(t.getAttribute("name"))}]`,score:Nr}),["INPUT","TEXTAREA"].includes(t.nodeName)&&t.getAttribute("type")!=="hidden"&&t.getAttribute("type")&&r.push({engine:"css",selector:`${Be(t)}[type=${et(t.getAttribute("type"))}]`,score:Nr}),["INPUT","TEXTAREA","SELECT"].includes(t.nodeName)&&t.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:Be(t),score:Nr+1}),Dr([r]),r}function zo(e,t,n){if(t.nodeName==="SELECT")return[];let r=[],o=t.getAttribute("title");if(o){r.push([{engine:"internal:attr",selector:`[title=${Ne(o,!0)}]`,score:Lc}]);for(let y of kt(o))r.push([{engine:"internal:attr",selector:`[title=${Ne(y.text,!1)}]`,score:Ho-y.scoreBonus}])}let u=t.getAttribute("alt");if(u&&["APPLET","AREA","IMG","INPUT"].includes(t.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${Ne(u,!0)}]`,score:Cc}]);for(let y of kt(u))r.push([{engine:"internal:attr",selector:`[alt=${Ne(y.text,!1)}]`,score:Fo-y.scoreBonus}])}let l=Se(e._evaluator._cacheText,t).normalized,h=l?kt(l):[];if(l){if(n){l.length<=80&&r.push([{engine:"internal:text",selector:Ae(l,!0),score:Ic}]);for(let v of h)r.push([{engine:"internal:text",selector:Ae(v.text,!1),score:Fn-v.scoreBonus}])}let y={engine:"css",selector:Be(t),score:Ko};for(let v of h)r.push([y,{engine:"internal:has-text",selector:Ae(v.text,!1),score:Fn-v.scoreBonus}]);if(l.length<=80){let v=new RegExp("^"+Zt(l)+"$");r.push([y,{engine:"internal:has-text",selector:Ae(v,!1),score:Ri}])}}let p=ue(t);if(p&&!["none","presentation"].includes(p)){let y=At(t,!1);if(y){let v={engine:"internal:role",selector:`${p}[name=${Ne(y,!0)}]`,score:Nc};r.push([v]);for(let b of kt(y))r.push([{engine:"internal:role",selector:`${p}[name=${Ne(b.text,!1)}]`,score:Uo-b.scoreBonus}])}else{let v={engine:"internal:role",selector:`${p}`,score:Wo};for(let b of h)r.push([v,{engine:"internal:has-text",selector:Ae(b.text,!1),score:Fn-b.scoreBonus}]);if(l.length<=80){let b=new RegExp("^"+Zt(l)+"$");r.push([v,{engine:"internal:has-text",selector:Ae(b,!1),score:Ri}])}}}return Dr(r),r}function Jo(e){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(e)?"#"+e:`[id=${et(e)}]`}function Cr(e){return e.some(t=>t.engine==="css"&&(t.selector.startsWith("#")||t.selector.startsWith('[id="')))}function $n(e,t,n){let r=n.root??t.ownerDocument,o=[];function u(h){let p=o.slice();h&&p.unshift(h);let y=p.join(" > "),v=e.parseSelector(y);return e.querySelector(v,r,!1)===t?y:void 0}function l(h){let p={engine:"css",selector:h,score:Mc},y=e.parseSelector(h),v=e.querySelectorAll(y,r);if(v.length===1)return[p];let b={engine:"nth",selector:String(v.indexOf(t)),score:Vo};return[p,b]}for(let h=t;h&&h!==r;h=me(h)){let p="";if(h.id&&!n.noCSSId){let b=Jo(h.id),m=u(b);if(m)return l(m);p=b}let y=h.parentNode,v=[...h.classList].map(qc);for(let b=0;b<v.length;++b){let m="."+v.slice(0,b+1).join("."),E=u(m);if(E)return l(E);!p&&y&&y.querySelectorAll(m).length===1&&(p=m)}if(y){let b=[...y.children],m=h.nodeName,A=b.filter(P=>P.nodeName===m).indexOf(h)===0?Be(h):`${Be(h)}:nth-child(${1+b.indexOf(h)})`,I=u(A);if(I)return l(I);p||(p=A)}else p||(p=Be(h));o.unshift(p)}return l(u())}function Dr(e){for(let t of e)for(let n of t)n.score>kc&&n.score<Oc&&(n.score+=Math.min(Do,n.selector.length/10|0))}function Hn(e){let t=[],n="";for(let{engine:r,selector:o}of e)t.length&&(n!=="css"||r!=="css"||o.startsWith(":nth-match("))&&t.push(">>"),n=r,r==="css"?t.push(o):t.push(`${r}=${o}`);return t.join(" ")}function Ve(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n].score*(e.length-n);return t}function Di(e,t,n,r,o){let u=r.map(h=>({tokens:h,score:Ve(h)}));u.sort((h,p)=>h.score-p.score);let l=null;for(let{tokens:h}of u){let p=e.parseSelector(Hn(h)),y=e.querySelectorAll(p,t);if(y[0]===n&&y.length===1)return h;let v=y.indexOf(n);if(!o||l||v===-1||y.length>5)continue;let b={engine:"nth",selector:String(v),score:Vo};l=[...h,b]}return l}function Rc(e){let t,n=0;for(let r=0;r<e.length;++r){let o=e[r],u;if(!(o==="-"||o==="_")){if(o>="a"&&o<="z"?u="lower":o>="A"&&o<="Z"?u="upper":o>="0"&&o<="9"?u="digit":u="other",u==="lower"&&t==="upper"){t=u;continue}t&&t!==u&&++n,t=u}}return n>=e.length/4}function Mn(e,t){if(e.length<=t)return e;e=e.substring(0,t);let n=e.match(/^(.*)\b(.+?)$/);return n?n[1].trimEnd():""}function kt(e){let t=[];{let n=e.match(/^([\d.,]+)[^.,\w]/),r=n?n[1].length:0;if(r){let o=Mn(e.substring(r).trimStart(),80);t.push({text:o,scoreBonus:o.length<=30?2:1})}}{let n=e.match(/[^.,\w]([\d.,]+)$/),r=n?n[1].length:0;if(r){let o=Mn(e.substring(0,e.length-r).trimEnd(),80);t.push({text:o,scoreBonus:o.length<=30?2:1})}}return e.length<=30?t.push({text:e,scoreBonus:0}):(t.push({text:Mn(e,80),scoreBonus:0}),t.push({text:Mn(e,30),scoreBonus:1})),t=t.filter(n=>n.text),t.length||t.push({text:e.substring(0,80),scoreBonus:0}),t}function Be(e){return e.nodeName.toLocaleLowerCase().replace(/[:\.]/g,t=>"\\"+t)}function qc(e){let t="";for(let n=0;n<e.length;n++)t+=Dc(e,n);return t}function Dc(e,t){let n=e.charCodeAt(t);return n===0?"\uFFFD":n>=1&&n<=31||n>=48&&n<=57&&(t===0||t===1&&e.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":t===0&&n===45&&e.length===1?"\\"+e.charAt(t):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?e.charAt(t):"\\"+e.charAt(t)}function Uc(e,t,n={}){var r;let o=new e.LineCounter,u={keepSourceTokens:!0,lineCounter:o,...n},l=e.parseDocument(t,u),h=[],p=E=>[o.linePos(E[0]),o.linePos(E[1])],y=E=>{h.push({message:E.message,range:[o.linePos(E.pos[0]),o.linePos(E.pos[1])]})},v=(E,A)=>{for(let I of A.items){if(I instanceof e.Scalar&&typeof I.value=="string"){let U=Ui.parse(I,u,h);U&&(E.children=E.children||[],E.children.push(U));continue}if(I instanceof e.YAMLMap){b(E,I);continue}h.push({message:"Sequence items should be strings or maps",range:p(I.range||A.range)})}},b=(E,A)=>{for(let I of A.items){if(E.children=E.children||[],!(I.key instanceof e.Scalar&&typeof I.key.value=="string")){h.push({message:"Only string keys are supported",range:p(I.key.range||A.range)});continue}let q=I.key,U=I.value;if(q.value==="text"){if(!(U instanceof e.Scalar&&typeof U.value=="string")){h.push({message:"Text value should be a string",range:p(I.value.range||A.range)});continue}E.children.push({kind:"text",text:Ir(U.value)});continue}if(q.value==="/children"){if(!(U instanceof e.Scalar&&typeof U.value=="string")||U.value!=="contain"&&U.value!=="equal"&&U.value!=="deep-equal"){h.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:p(I.value.range||A.range)});continue}E.containerMode=U.value;continue}if(q.value.startsWith("/")){if(!(U instanceof e.Scalar&&typeof U.value=="string")){h.push({message:"Property value should be a string",range:p(I.value.range||A.range)});continue}E.props=E.props??{},E.props[q.value.slice(1)]=Ir(U.value);continue}let G=Ui.parse(q,u,h);if(!G)continue;if(U instanceof e.Scalar){let ee=typeof U.value;if(ee!=="string"&&ee!=="number"&&ee!=="boolean"){h.push({message:"Node value should be a string or a sequence",range:p(I.value.range||A.range)});continue}E.children.push({...G,children:[{kind:"text",text:Ir(String(U.value))}]});continue}if(U instanceof e.YAMLSeq){E.children.push(G),v(G,U);continue}h.push({message:"Map values should be strings or sequences",range:p(I.value.range||A.range)})}},m={kind:"role",role:"fragment"};return l.errors.forEach(y),h.length?{errors:h,fragment:m}:(l.contents instanceof e.YAMLSeq||h.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:l.contents?p(l.contents.range):[{line:0,col:0},{line:0,col:0}]}),h.length?{errors:h,fragment:m}:(v(m,l.contents),h.length?{errors:h,fragment:Bc}:((r=m.children)==null?void 0:r.length)===1?{fragment:m.children[0],errors:h}:{fragment:m,errors:h}))}var Bc={kind:"role",role:"fragment"};function Yo(e){return e.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function Ir(e){return e.startsWith("/")&&e.endsWith("/")&&e.length>1?{pattern:e.slice(1,-1)}:Yo(e)}var Ui=class Qo{_input;_pos;_length;static parse(t,n,r){try{return new Qo(t.value)._parse()}catch(o){if(o instanceof Bi){let u=n.prettyErrors===!1?o.message:o.message+`:
|
|
4
4
|
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
},
|
|
16
16
|
o: (t, e) => Object.prototype.hasOwnProperty.call(t, e),
|
|
17
17
|
r: (t) => {
|
|
18
|
-
"undefined" != typeof Symbol &&
|
|
18
|
+
("undefined" != typeof Symbol &&
|
|
19
19
|
Symbol.toStringTag &&
|
|
20
20
|
Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }),
|
|
21
|
-
Object.defineProperty(t, "__esModule", { value: !0 });
|
|
21
|
+
Object.defineProperty(t, "__esModule", { value: !0 }));
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
e = {};
|
|
25
25
|
function n(t) {
|
|
26
26
|
return "object" == typeof t && null !== t && t.nodeType === Node.ELEMENT_NODE;
|
|
27
27
|
}
|
|
28
|
-
t.r(e), t.d(e, { default: () => Q, getCssSelector: () => K });
|
|
28
|
+
(t.r(e), t.d(e, { default: () => Q, getCssSelector: () => K }));
|
|
29
29
|
const r = { NONE: "", DESCENDANT: " ", CHILD: " > " },
|
|
30
30
|
o = {
|
|
31
31
|
id: "id",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
e = null != e ? e : S(t);
|
|
137
137
|
const r = [];
|
|
138
138
|
let o = t;
|
|
139
|
-
for (; n(o) && o !== e; ) r.push(o), (o = o.parentElement);
|
|
139
|
+
for (; n(o) && o !== e; ) (r.push(o), (o = o.parentElement));
|
|
140
140
|
return r;
|
|
141
141
|
}
|
|
142
142
|
function N(t, e) {
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
for (; r.length <= t.length && n < e; ) {
|
|
223
223
|
n += 1;
|
|
224
224
|
const e = r.map((e) => t[e]);
|
|
225
|
-
yield e, (r = L(r, t.length - 1));
|
|
225
|
+
(yield e, (r = L(r, t.length - 1)));
|
|
226
226
|
}
|
|
227
227
|
})(t, { maxResults: e })
|
|
228
228
|
);
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
for (let t = n - 1; t >= 0; t--)
|
|
236
236
|
if (r[t] > e) {
|
|
237
237
|
if (0 === t) return M(n + 1);
|
|
238
|
-
r[t - 1]++, (r[t] = r[t - 1] + 1);
|
|
238
|
+
(r[t - 1]++, (r[t] = r[t - 1] + 1));
|
|
239
239
|
}
|
|
240
240
|
return r[n - 1] > e ? M(n + 1) : r;
|
|
241
241
|
}
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
return (function (t) {
|
|
305
305
|
const { selectors: e, includeTag: n } = t,
|
|
306
306
|
r = [...e];
|
|
307
|
-
return n && !r.includes("tag") && r.push("tag"), r;
|
|
307
|
+
return (n && !r.includes("tag") && r.push("tag"), r);
|
|
308
308
|
})(e).reduce((e, n) => {
|
|
309
309
|
const r = (function (t, e) {
|
|
310
310
|
return (0, W[e])(t);
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
return r && !o ? -1 : !r && o ? 1 : 0;
|
|
320
320
|
});
|
|
321
321
|
})(s, u);
|
|
322
|
-
return (e[n] = o ? k(a, { maxResults: i }) : a.map((t) => [t])), e;
|
|
322
|
+
return ((e[n] = o ? k(a, { maxResults: i }) : a.map((t) => [t])), e);
|
|
323
323
|
}, {});
|
|
324
324
|
})(t, n),
|
|
325
325
|
o = (function (t, e) {
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
((r = n.selectors),
|
|
425
425
|
Array.isArray(r)
|
|
426
426
|
? r.filter((t) => {
|
|
427
|
-
return (e = o), (n = t), Object.values(e).includes(n);
|
|
427
|
+
return ((e = o), (n = t), Object.values(e).includes(n));
|
|
428
428
|
var e, n;
|
|
429
429
|
})
|
|
430
430
|
: []),
|
|
@@ -457,7 +457,7 @@
|
|
|
457
457
|
for (; g; ) {
|
|
458
458
|
const { foundElements: t, selector: e } = g;
|
|
459
459
|
if (b(i, e, s)) return e;
|
|
460
|
-
(f = t[0]), (a = e), (g = p());
|
|
460
|
+
((f = t[0]), (a = e), (g = p()));
|
|
461
461
|
}
|
|
462
462
|
return i.length > 1
|
|
463
463
|
? i.map((t) => K(t, c)).join(E)
|
|
@@ -86,7 +86,7 @@ class BVTTool extends HTMLElement {
|
|
|
86
86
|
const tooltip = this.#tooltip;
|
|
87
87
|
|
|
88
88
|
tooltip.style.opacity = "0"; // hide before measuring
|
|
89
|
-
tooltip.style.left = "0px";
|
|
89
|
+
tooltip.style.left = "0px"; // reset for accurate width calc
|
|
90
90
|
tooltip.style.top = "0px";
|
|
91
91
|
tooltip.style.transform = "none"; // remove old transform
|
|
92
92
|
|
|
@@ -106,7 +106,6 @@ class BVTTool extends HTMLElement {
|
|
|
106
106
|
tooltip.style.top = `${rect.bottom + 20}px`;
|
|
107
107
|
tooltip.style.opacity = "1";
|
|
108
108
|
});
|
|
109
|
-
|
|
110
109
|
}
|
|
111
110
|
hideTooltip() {
|
|
112
111
|
if (this.#tooltip) {
|
|
@@ -129,7 +128,7 @@ class BVTTool extends HTMLElement {
|
|
|
129
128
|
// this.#tooltip.style.top = `${rect.top - tooltipRect.height - 8}px`; // 8px gap above button
|
|
130
129
|
// }
|
|
131
130
|
// }
|
|
132
|
-
|
|
131
|
+
|
|
133
132
|
reset() {
|
|
134
133
|
this.selected = false;
|
|
135
134
|
}
|
|
@@ -168,36 +167,35 @@ class BVTToolBar extends HTMLElement {
|
|
|
168
167
|
|
|
169
168
|
dragHandler.addEventListener("mousedown", (event) => {
|
|
170
169
|
event.preventDefault(); // Prevent text selection
|
|
171
|
-
|
|
170
|
+
|
|
172
171
|
if (dragHandler.hideTooltip) {
|
|
173
172
|
dragHandler.hideTooltip(); // Hide tooltip while dragging
|
|
174
173
|
}
|
|
175
174
|
|
|
176
175
|
document.body.style.userSelect = "none";
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
);
|
|
176
|
+
// const toolbar = this;
|
|
177
|
+
// const rect = toolbar.getBoundingClientRect();
|
|
178
|
+
// const offsetX = event.clientX - rect.left;
|
|
179
|
+
// const offsetY = event.clientY - rect.top;
|
|
180
|
+
|
|
181
|
+
// const moveHandler = (event) => {
|
|
182
|
+
// const left = event.clientX - offsetX;
|
|
183
|
+
// const top = event.clientY - offsetY;
|
|
184
|
+
// if (left < 0 || top < 0 || left + rect.width > window.innerWidth || top + rect.height > window.innerHeight) {
|
|
185
|
+
// return;
|
|
186
|
+
// }
|
|
187
|
+
// toolbar.style.left = `${left}px`;
|
|
188
|
+
// toolbar.style.top = `${top}px`;
|
|
189
|
+
// };
|
|
190
|
+
|
|
191
|
+
// const upHandler = () => {
|
|
192
|
+
// document.removeEventListener("mousemove", moveHandler);
|
|
193
|
+
// document.removeEventListener("mouseup", upHandler);
|
|
194
|
+
// };
|
|
195
|
+
|
|
196
|
+
// document.addEventListener("mousemove", moveHandler);
|
|
197
|
+
// document.addEventListener("mouseup", upHandler);
|
|
198
|
+
});
|
|
201
199
|
return dragHandler;
|
|
202
200
|
}
|
|
203
201
|
getHoverTool() {
|
|
@@ -205,7 +203,7 @@ class BVTToolBar extends HTMLElement {
|
|
|
205
203
|
const hoverTool = document.createElement("x-bvt-tool");
|
|
206
204
|
hoverTool.name = "hover";
|
|
207
205
|
hoverTool.tooltipText = "Record hover over an element";
|
|
208
|
-
hoverTool.innerHTML = `<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M13.999 17.175l-3.452.774a.391.391 0 00-.245.172l-1.664 2.6c-.809 1.265-2.743.924-3.072-.541L3.71 10.963C3.38 9.493 4.99 8.36 6.263 9.167l8.271 4.933c1.27.805.933 2.746-.535 3.075z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="stroke: currentColor; fill: none;" /><rect x="11" y="3" width="12" height="2" rx="1" fill="currentColor" style="fill: currentColor;"/><rect x="11" y="7" width="9" height="2" rx="1" fill="currentColor" style="fill: currentColor;"/><rect x="11" y="11" width="12" height="2" rx="1" fill="currentColor" style="fill: currentColor;"/><circle cx="9" cy="4" r="1" fill="currentColor" style="fill: currentColor;"/><circle cx="9" cy="8" r="1" fill="currentColor" style="fill: currentColor;"/></svg
|
|
206
|
+
hoverTool.innerHTML = `<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M13.999 17.175l-3.452.774a.391.391 0 00-.245.172l-1.664 2.6c-.809 1.265-2.743.924-3.072-.541L3.71 10.963C3.38 9.493 4.99 8.36 6.263 9.167l8.271 4.933c1.27.805.933 2.746-.535 3.075z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="stroke: currentColor; fill: none;" /><rect x="11" y="3" width="12" height="2" rx="1" fill="currentColor" style="fill: currentColor;"/><rect x="11" y="7" width="9" height="2" rx="1" fill="currentColor" style="fill: currentColor;"/><rect x="11" y="11" width="12" height="2" rx="1" fill="currentColor" style="fill: currentColor;"/><circle cx="9" cy="4" r="1" fill="currentColor" style="fill: currentColor;"/><circle cx="9" cy="8" r="1" fill="currentColor" style="fill: currentColor;"/></svg>`;
|
|
209
207
|
// hoverTool.addEventListener("click", this.onHoverMode);
|
|
210
208
|
return hoverTool;
|
|
211
209
|
}
|
|
@@ -365,7 +365,7 @@ function generateUniqueCSSSelector(element, options) {
|
|
|
365
365
|
|
|
366
366
|
let selector = "";
|
|
367
367
|
const id = element.getAttribute("id");
|
|
368
|
-
if (id && !/\d/.test(id) &&
|
|
368
|
+
if (id && !/\d/.test(id) && !noCSSId) {
|
|
369
369
|
selector = "#" + cssEscape(id);
|
|
370
370
|
if (isUnique(selector)) return selector;
|
|
371
371
|
}
|