@uuv/assistant 2.63.0 → 2.64.0
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/README.md
CHANGED
|
@@ -145,6 +145,20 @@ The dictionary is available in french and english. It can be accessed with this
|
|
|
145
145
|
|
|
146
146
|
This project is licensed under the terms of the [MIT license](https://github.com/e2e-test-quest/uuv/blob/main/LICENSE).
|
|
147
147
|
|
|
148
|
+
## Support UUV through Open Collective
|
|
149
|
+
|
|
150
|
+
If you want to help UUV grow, you can fund the project directly via [Open Collective](https://opencollective.com/uuv).
|
|
151
|
+
Every contribution helps us dedicate more time and energy to improving this open-source tool.
|
|
152
|
+
|
|
153
|
+
<a href="https://opencollective.com/uuv/contribute" target="_blank">
|
|
154
|
+
<img src="https://opencollective.com/uuv/contribute/button@2x.png?color=blue" width=300 />
|
|
155
|
+
</a>
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
Interested in becoming a sponsor?
|
|
159
|
+
We welcome sponsorships of all sizes!
|
|
160
|
+
Contact us via [GitHub](https://github.com/e2e-test-quest/uuv/discussions) or through [Open Collective](https://opencollective.com/uuv) to discuss opportunities.
|
|
161
|
+
|
|
148
162
|
## Authors
|
|
149
163
|
|
|
150
164
|
- [@luifr10](https://github.com/luifr10)
|
package/dist/launcher/conf.json
CHANGED
|
@@ -328,7 +328,7 @@ html body {
|
|
|
328
328
|
`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new oX(this):new rX(this)}getCursor(e,n=0,r){let i=e.doc?e:$t.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Vl(this,i,n,r):Hl(this,i,n,r)}}class PR{constructor(e){this.spec=e}}function Hl(t,e,n,r){return new yc(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?nX(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function nX(t,e){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=t.sliceString(o,Math.min(t.length,r+2))),(e(Bg(i,n-o))!=yn.Word||e(Mg(i,n-o))!=yn.Word)&&(e(Mg(i,r-o))!=yn.Word||e(Bg(i,r-o))!=yn.Word))}class rX extends PR{constructor(e){super(e)}nextMatch(e,n,r){let i=Hl(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let o=Math.min(e.doc.length,n+this.spec.unquoted.length);i=Hl(this.spec,e,0,o).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let o=Math.max(n,i-1e4-this.spec.unquoted.length),s=Hl(this.spec,e,o,i),l=null;for(;!s.nextOverlapping().done;)l=s.value;if(l)return l;if(o==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=Hl(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Hl(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function Vl(t,e,n,r){return new OR(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?iX(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function Bg(t,e){return t.slice(Cr(t,e,!1),e)}function Mg(t,e){return t.slice(e,Cr(t,e))}function iX(t){return(e,n,r)=>!r[0].length||(t(Bg(r.input,r.index))!=yn.Word||t(Mg(r.input,r.index))!=yn.Word)&&(t(Mg(r.input,r.index+r[0].length))!=yn.Word||t(Bg(r.input,r.index+r[0].length))!=yn.Word)}class oX extends PR{nextMatch(e,n,r){let i=Vl(this.spec,e,r,e.doc.length).next();return i.done&&(i=Vl(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),s=Vl(this.spec,e,o,r),l=null;for(;!s.next().done;)l=s.value;if(l&&(o==n||l.from>o+10))return l;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let o=+r.slice(0,i);if(o>0&&o<e.match.length)return e.match[o]+r.slice(i)}return n})}matchAll(e,n){let r=Vl(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Vl(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const gd=gt.define(),Xb=gt.define(),ea=Sr.define({create(t){return new m0(py(t).create(),null)},update(t,e){for(let n of e.effects)n.is(gd)?t=new m0(n.value.create(),t.panel):n.is(Xb)&&(t=new m0(t.query,n.value?Jb:null));return t},provide:t=>ud.from(t,e=>e.panel)});class m0{constructor(e,n){this.query=e,this.panel=n}}const sX=rt.mark({class:"cm-searchMatch"}),aX=rt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),lX=jn.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(ea))}update(t){let e=t.state.field(ea);(e!=t.startState.field(ea)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return rt.none;let{view:n}=this,r=new vs;for(let i=0,o=n.visibleRanges,s=o.length;i<s;i++){let{from:l,to:c}=o[i];for(;i<s-1&&c>o[i+1].from-2*250;)c=o[++i].to;t.highlight(n.state,l,c,(d,f)=>{let g=n.state.selection.ranges.some(p=>p.from==d&&p.to==f);r.add(d,f,g?aX:sX)})}return r.finish()}},{decorations:t=>t.decorations});function Ld(t){return e=>{let n=e.state.field(ea,!1);return n&&n.query.spec.valid?t(e,n):LR(e)}}const Og=Ld((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=pe.single(r.from,r.to),o=t.state.facet($c);return t.dispatch({selection:i,effects:[qb(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),$R(t),!0}),Tg=Ld((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=pe.single(i.from,i.to),s=t.state.facet($c);return t.dispatch({selection:o,effects:[qb(t,i),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),$R(t),!0}),cX=Ld((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:pe.create(n.map(r=>pe.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),uX=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let l=new yc(t.doc,t.sliceDoc(r,i));!l.next().done;){if(o.length>1e3)return!1;l.value.from==r&&(s=o.length),o.push(pe.range(l.value.from,l.value.to))}return e(t.update({selection:pe.create(o,s),userEvent:"select.search.matches"})),!0},TI=Ld((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let s=o,l=[],c,d,f=[];s.from==r&&s.to==i&&(d=n.toText(e.getReplacement(s)),l.push({from:s.from,to:s.to,insert:d}),s=e.nextMatch(n,s.from,s.to),f.push(Me.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let g=t.state.changes(l);return s&&(c=pe.single(s.from,s.to).map(g),f.push(qb(t,s)),f.push(n.facet($c).scrollToMatch(c.main,t))),t.dispatch({changes:g,selection:c,effects:f,userEvent:"input.replace"}),!0}),dX=Ld((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:s}=i;return{from:o,to:s,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Me.announce.of(r),userEvent:"input.replace.all"}),!0});function Jb(t){return t.state.facet($c).createPanel(t)}function py(t,e){var n,r,i,o,s;let l=t.selection.main,c=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!c)return e;let d=t.facet($c);return new RR({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:d.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:d.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:d.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:d.regexp,wholeWord:(s=e==null?void 0:e.wholeWord)!==null&&s!==void 0?s:d.wholeWord})}function NR(t){let e=cd(t,Jb);return e&&e.dom.querySelector("[main-field]")}function $R(t){let e=NR(t);e&&e==t.root.activeElement&&e.select()}const LR=t=>{let e=t.state.field(ea,!1);if(e&&e.panel){let n=NR(t);if(n&&n!=t.root.activeElement){let r=py(t.state,e.query.spec);r.valid&&t.dispatch({effects:gd.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[Xb.of(!0),e?gd.of(py(t.state,e.query.spec)):gt.appendConfig.of(mX)]});return!0},DR=t=>{let e=t.state.field(ea,!1);if(!e||!e.panel)return!1;let n=cd(t,Jb);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Xb.of(!1)}),!0},fX=[{key:"Mod-f",run:LR,scope:"editor search-panel"},{key:"F3",run:Og,shift:Tg,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Og,shift:Tg,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:DR,scope:"editor search-panel"},{key:"Mod-Shift-l",run:uX},{key:"Mod-Alt-g",run:VK},{key:"Mod-d",run:tX,preventDefault:!0}];class hX{constructor(e){this.view=e;let n=this.query=e.state.field(ea).query.spec;this.commit=this.commit.bind(this),this.searchField=Zt("input",{value:n.search,placeholder:Ei(e,"Find"),"aria-label":Ei(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Zt("input",{value:n.replace,placeholder:Ei(e,"Replace"),"aria-label":Ei(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Zt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=Zt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=Zt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,s){return Zt("button",{class:"cm-button",name:i,onclick:o,type:"button"},s)}this.dom=Zt("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>Og(e),[Ei(e,"next")]),r("prev",()=>Tg(e),[Ei(e,"previous")]),r("select",()=>cX(e),[Ei(e,"all")]),Zt("label",null,[this.caseField,Ei(e,"match case")]),Zt("label",null,[this.reField,Ei(e,"regexp")]),Zt("label",null,[this.wordField,Ei(e,"by word")]),...e.state.readOnly?[]:[Zt("br"),this.replaceField,r("replace",()=>TI(e),[Ei(e,"replace")]),r("replaceAll",()=>dX(e),[Ei(e,"replace all")])],Zt("button",{name:"close",onclick:()=>DR(e),"aria-label":Ei(e,"close"),type:"button"},["×"])])}commit(){let e=new RR({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:gd.of(e)}))}keydown(e){v_(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Tg:Og)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),TI(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(gd)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet($c).top}}function Ei(t,e){return t.state.phrase(e)}const mh=30,ph=/[\s\.,:;?!]/;function qb(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-mh),s=Math.min(i,n+mh),l=t.state.sliceDoc(o,s);if(o!=r.from){for(let c=0;c<mh;c++)if(!ph.test(l[c+1])&&ph.test(l[c])){l=l.slice(c);break}}if(s!=i){for(let c=l.length-1;c>l.length-mh;c--)if(!ph.test(l[c-1])&&ph.test(l[c])){l=l.slice(0,c);break}}return Me.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${r.number}.`)}const gX=Me.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),mX=[ea,il.low(lX),gX];class FR{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Nr(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(jR(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function RI(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function pX(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;o<i.length;o++)n[i[o]]=!0}let r=RI(e)+RI(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function vX(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:pX(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}class PI{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function ja(t){return t.selection.main.from}function jR(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const QR=qo.define();function AX(t,e,n,r){let{main:i}=t.selection,o=n-i.from,s=r-i.from;return Object.assign(Object.assign({},t.changeByRange(l=>{if(l!=i&&n!=r&&t.sliceDoc(l.from+o,l.from+s)!=t.sliceDoc(n,r))return{range:l};let c=t.toText(e);return{changes:{from:l.from+o,to:r==i.from?l.to:l.from+s,insert:c},range:pe.cursor(l.from+o+c.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const NI=new WeakMap;function yX(t){if(!Array.isArray(t))return t;let e=NI.get(t);return e||NI.set(t,e=vX(t)),e}const Rg=gt.define(),md=gt.define();class bX{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let r=ii(e,n),i=Fo(r);this.chars.push(r);let o=e.slice(n,n+i),s=o.toUpperCase();this.folded.push(ii(s==o?o.toLowerCase():s,0)),n+=i}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:r,any:i,precise:o,byWord:s}=this;if(n.length==1){let E=ii(e,0),w=Fo(E),B=w==e.length?0:-100;if(E!=n[0])if(E==r[0])B+=-200;else return null;return this.ret(B,[0,w])}let l=e.indexOf(this.pattern);if(l==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=n.length,d=0;if(l<0){for(let E=0,w=Math.min(e.length,200);E<w&&d<c;){let B=ii(e,E);(B==n[d]||B==r[d])&&(i[d++]=E),E+=Fo(B)}if(d<c)return null}let f=0,g=0,p=!1,A=0,y=-1,C=-1,b=/[a-z]/.test(e),x=!0;for(let E=0,w=Math.min(e.length,200),B=0;E<w&&g<c;){let k=ii(e,E);l<0&&(f<c&&k==n[f]&&(o[f++]=E),A<c&&(k==n[A]||k==r[A]?(A==0&&(y=E),C=E+1,A++):A=0));let M,O=k<255?k>=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(M=Ab(k))!=M.toLowerCase()?1:M!=M.toUpperCase()?2:0;(!E||O==1&&b||B==0&&O!=0)&&(n[g]==k||r[g]==k&&(p=!0)?s[g++]=E:s.length&&(x=!1)),B=O,E+=Fo(k)}return g==c&&s[0]==0&&x?this.result(-100+(p?-200:0),s,e):A==c&&y==0?this.ret(-200-e.length+(C==e.length?0:-100),[0,C]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):A==c?this.ret(-900-e.length,[y,C]):g==c?this.result(-100+(p?-200:0)+-700+(x?0:-1100),s,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let s of n){let l=s+(this.astral?Fo(ii(r,s)):1);o&&i[o-1]==s?i[o-1]=l:(i[o++]=s,i[o++]=l)}return this.ret(e-r.length,i)}}class CX{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),r=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return r==null?null:(this.matched=[0,n.length],this.score=r+(e.length==this.pattern.length?0:-100),this)}}const dr=Fe.define({combine(t){return Yo(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:SX,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>$I(e(r),n(r)),optionClass:(e,n)=>r=>$I(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function $I(t,e){return t?e?t+" "+e:t:e}function SX(t,e,n,r,i,o){let s=t.textDirection==hn.RTL,l=s,c=!1,d="top",f,g,p=e.left-i.left,A=i.right-e.right,y=r.right-r.left,C=r.bottom-r.top;if(l&&p<Math.min(y,A)?l=!1:!l&&A<Math.min(y,p)&&(l=!0),y<=(l?p:A))f=Math.max(i.top,Math.min(n.top,i.bottom-C))-e.top,g=Math.min(400,l?p:A);else{c=!0,g=Math.min(400,(s?e.right:i.right-e.left)-30);let E=i.bottom-e.bottom;E>=C||E>e.top?f=n.bottom-e.top:(d="bottom",f=e.bottom-n.top)}let b=(e.bottom-e.top)/o.offsetHeight,x=(e.right-e.left)/o.offsetWidth;return{style:`${d}: ${f/b}px; max-width: ${g/x}px`,class:"cm-completionInfo-"+(c?s?"left-narrow":"right-narrow":l?"left":"right")}}function wX(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let s=document.createElement("span");s.className="cm-completionLabel";let l=n.displayLabel||n.label,c=0;for(let d=0;d<o.length;){let f=o[d++],g=o[d++];f>c&&s.appendChild(document.createTextNode(l.slice(c,f)));let p=s.appendChild(document.createElement("span"));p.appendChild(document.createTextNode(l.slice(f,g))),p.className="cm-completionMatchedText",c=g}return c<l.length&&s.appendChild(document.createTextNode(l.slice(c))),s},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),e.sort((n,r)=>n.position-r.position).map(n=>n.render)}function p0(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class xX{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:s}=i.open,l=e.state.facet(dr);this.optionContent=wX(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=p0(o.length,s,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",c=>{let{options:d}=e.state.field(n).open;for(let f=c.target,g;f&&f!=this.dom;f=f.parentNode)if(f.nodeName=="LI"&&(g=/-(\d+)$/.exec(f.id))&&+g[1]<d.length){this.applyCompletion(e,d[+g[1]]),c.preventDefault();return}}),this.dom.addEventListener("focusout",c=>{let d=e.state.field(this.stateField,!1);d&&d.tooltip&&e.state.facet(dr).closeOnBlur&&c.relatedTarget!=e.contentDOM&&e.dispatch({effects:md.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:s,disabled:l}=r.open;(!i.open||i.open.options!=o)&&(this.range=p0(o.length,s,e.state.facet(dr).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),l!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=p0(n.options.length,n.selected,this.view.state.facet(dr).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(s=>{s&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(s,r)}).catch(s=>ai(this.view.state,s,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&IX(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let s=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:s.clientWidth,bottom:s.clientHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom<Math.max(o.top,n.top)+10?null:this.view.state.facet(dr).positionInfo(this.view,n,i,r,o,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,r){const i=document.createElement("ul");i.id=n,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",s=>{s.target==i&&s.preventDefault()});let o=null;for(let s=r.from;s<r.to;s++){let{completion:l,match:c}=e[s],{section:d}=l;if(d){let p=typeof d=="string"?d:d.name;if(p!=o&&(s>r.from||r.from==0))if(o=p,typeof d!="string"&&d.header)i.appendChild(d.header(d));else{let A=i.appendChild(document.createElement("completion-section"));A.textContent=p}}const f=i.appendChild(document.createElement("li"));f.id=n+"-"+s,f.setAttribute("role","option");let g=this.optionClass(l);g&&(f.className=g);for(let p of this.optionContent){let A=p(l,this.view.state,this.view,c);A&&f.appendChild(A)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function EX(t,e){return n=>new xX(n,t,e)}function IX(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function LI(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function kX(t,e){let n=[],r=null,i=d=>{n.push(d);let{section:f}=d.completion;if(f){r||(r=[]);let g=typeof f=="string"?f:f.name;r.some(p=>p.name==g)||r.push(typeof f=="string"?{name:g}:f)}},o=e.facet(dr);for(let d of t)if(d.hasResult()){let f=d.result.getMatch;if(d.result.filter===!1)for(let g of d.result.options)i(new PI(g,d.source,f?f(g):[],1e9-n.length));else{let g=e.sliceDoc(d.from,d.to),p,A=o.filterStrict?new CX(g):new bX(g);for(let y of d.result.options)if(p=A.match(y.label)){let C=y.displayLabel?f?f(y,p.matched):[]:p.matched;i(new PI(y,d.source,C,p.score+(y.boost||0)))}}}if(r){let d=Object.create(null),f=0,g=(p,A)=>{var y,C;return((y=p.rank)!==null&&y!==void 0?y:1e9)-((C=A.rank)!==null&&C!==void 0?C:1e9)||(p.name<A.name?-1:1)};for(let p of r.sort(g))f-=1e5,d[p.name]=f;for(let p of n){let{section:A}=p.completion;A&&(p.score+=d[typeof A=="string"?A:A.name])}}let s=[],l=null,c=o.compareCompletions;for(let d of n.sort((f,g)=>g.score-f.score||c(f.completion,g.completion))){let f=d.completion;!l||l.label!=f.label||l.detail!=f.detail||l.type!=null&&f.type!=null&&l.type!=f.type||l.apply!=f.apply||l.boost!=f.boost?s.push(d):LI(d.completion)>LI(l)&&(s[s.length-1]=d),l=d.completion}return s}class Jl{constructor(e,n,r,i,o,s){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=s}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new Jl(this.options,DI(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o,s){if(i&&!s&&e.some(d=>d.isPending))return i.setDisabled();let l=kX(e,n);if(!l.length)return i&&e.some(d=>d.isPending)?i.setDisabled():null;let c=n.facet(dr).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let d=i.options[i.selected].completion;for(let f=0;f<l.length;f++)if(l[f].completion==d){c=f;break}}return new Jl(l,DI(r,c),{pos:e.reduce((d,f)=>f.hasResult()?Math.min(d,f.from):d,1e8),create:PX,above:o.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(e){return new Jl(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new Jl(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Pg{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new Pg(TX,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(dr),o=(r.override||n.languageDataAt("autocomplete",ja(n)).map(yX)).map(c=>(this.active.find(f=>f.source==c)||new Ji(c,this.active.some(f=>f.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((c,d)=>c==this.active[d])&&(o=this.active);let s=this.open,l=e.effects.some(c=>c.is(Yb));s&&e.docChanged&&(s=s.map(e.changes)),e.selection||o.some(c=>c.hasResult()&&e.changes.touchesRange(c.from,c.to))||!BX(o,this.active)||l?s=Jl.build(o,n,this.id,s,r,l):s&&s.disabled&&!o.some(c=>c.isPending)&&(s=null),!s&&o.every(c=>!c.isPending)&&o.some(c=>c.hasResult())&&(o=o.map(c=>c.hasResult()?new Ji(c.source,0):c));for(let c of e.effects)c.is(HR)&&(s=s&&s.setSelected(c.value,this.id));return o==this.active&&s==this.open?this:new Pg(o,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?MX:OX}}function BX(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,o=r==e.length;if(i||o)return i==o;if(t[n++].result!=e[r++].result)return!1}}const MX={"aria-autocomplete":"list"},OX={};function DI(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const TX=[];function zR(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(QR);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class Ji{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=zR(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new Ji(i.source,0)),r&4&&i.state==0&&(i=new Ji(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(Rg))i=new Ji(i.source,1,o.value);else if(o.is(md))i=new Ji(i.source,0);else if(o.is(Yb))for(let s of o.value)s.source==i.source&&(i=s);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(ja(e.state))}}class oc extends Ji{constructor(e,n,r,i,o,s){super(e,3,n),this.limit=r,this.result=i,this.from=o,this.to=s}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),l=ja(e.state);if(l>s||!i||n&2&&(ja(e.startState)==this.from||l<this.limit))return new Ji(this.source,n&4?1:0);let c=e.changes.mapPos(this.limit);return RX(i.validFor,e.state,o,s)?new oc(this.source,this.explicit,c,i,o,s):i.update&&(i=i.update(i,o,s,new FR(e.state,l,!1)))?new oc(this.source,this.explicit,c,i,i.from,(r=i.to)!==null&&r!==void 0?r:ja(e.state)):new Ji(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new oc(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Ji(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function RX(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):jR(t,!0).test(i)}const Yb=gt.define({map(t,e){return t.map(n=>n.map(e))}}),HR=gt.define(),si=Sr.define({create(){return Pg.start()},update(t,e){return t.update(e)},provide:t=>[Pb.from(t,e=>e.tooltip),Me.contentAttributes.from(t,e=>e.attrs)]});function Zb(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(si).active.find(i=>i.source==e.source);return r instanceof oc?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},AX(t.state,n,r.from,r.to)),{annotations:QR.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const PX=EX(si,Zb);function vh(t,e="option"){return n=>{let r=n.state.field(si,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(dr).interactionDelay)return!1;let i=1,o;e=="page"&&(o=CT(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,l=r.open.selected>-1?r.open.selected+i*(t?1:-1):t?0:s-1;return l<0?l=e=="page"?0:s-1:l>=s&&(l=e=="page"?s-1:0),n.dispatch({effects:HR.of(l)}),!0}}const NX=t=>{let e=t.state.field(si,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(dr).interactionDelay?!1:Zb(t,e.open.options[e.open.selected])},FI=t=>t.state.field(si,!1)?(t.dispatch({effects:Rg.of(!0)}),!0):!1,$X=t=>{let e=t.state.field(si,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:md.of(null)}),!0)};class LX{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const DX=50,FX=1e3,jX=jn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(si).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(si),n=t.state.facet(dr);if(!t.selectionSet&&!t.docChanged&&t.startState.field(si)==e)return;let r=t.transactions.some(o=>{let s=zR(o,n);return s&8||(o.selection||o.docChanged)&&!(s&3)});for(let o=0;o<this.running.length;o++){let s=this.running[o];if(r||s.context.abortOnDocChange&&t.docChanged||s.updates.length+t.transactions.length>DX&&Date.now()-s.time>FX){for(let l of s.context.abortListeners)try{l()}catch(c){ai(this.view.state,c)}s.context.abortListeners=null,this.running.splice(o--,1)}else s.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(s=>s.is(Rg)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(s=>s.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(si);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(dr).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=ja(e),r=new FR(e,n,t.explicit,this.view),i=new LX(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:md.of(null)}),ai(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(dr).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(dr),r=this.view.state.field(si);for(let i=0;i<this.running.length;i++){let o=this.running[i];if(o.done===void 0)continue;if(this.running.splice(i--,1),o.done){let l=ja(o.updates.length?o.updates[0].startState:this.view.state),c=Math.min(l,o.done.from+(o.active.explicit?0:1)),d=new oc(o.active.source,o.active.explicit,c,o.done,o.done.from,(t=o.done.to)!==null&&t!==void 0?t:l);for(let f of o.updates)d=d.update(f,n);if(d.hasResult()){e.push(d);continue}}let s=r.active.find(l=>l.source==o.active.source);if(s&&s.isPending)if(o.done==null){let l=new Ji(o.active.source,0);for(let c of o.updates)l=l.update(c,n);l.isPending||e.push(l)}else this.startQuery(s)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:Yb.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(si,!1);if(e&&e.tooltip&&this.view.state.facet(dr).closeOnBlur){let n=e.open&&CT(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:md.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Rg.of(!1)}),20),this.composing=0}}}),QX=typeof navigator=="object"&&/Win/.test(navigator.platform),zX=il.highest(Me.domEventHandlers({keydown(t,e){let n=e.state.field(si,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(QX&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(s=>s.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&Zb(e,r),!1}})),HX=Me.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),pd={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},La=gt.define({map(t,e){let n=e.mapPos(t,-1,Wr.TrackAfter);return n??void 0}}),eC=new class extends Ja{};eC.startSide=1;eC.endSide=-1;const VR=Sr.define({create(){return Dt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(La)&&(t=t.update({add:[eC.range(n.value,n.value+1)]}));return t}});function VX(){return[_X,VR]}const v0="()[]{}<>«»»«[]{}";function WR(t){for(let e=0;e<v0.length;e+=2)if(v0.charCodeAt(e)==t)return v0.charAt(e+1);return Ab(t<128?t:t+1)}function _R(t,e){return t.languageDataAt("closeBrackets",e)[0]||pd}const WX=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),_X=Me.inputHandler.of((t,e,n,r)=>{if((WX?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Fo(ii(r,0))==1||e!=i.from||n!=i.to)return!1;let o=KX(t.state,r);return o?(t.dispatch(o),!0):!1}),UX=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=_R(t,t.selection.main.head).brackets||pd.brackets,i=null,o=t.changeByRange(s=>{if(s.empty){let l=XX(t.doc,s.head);for(let c of r)if(c==l&&wm(t.doc,s.head)==WR(ii(c,0)))return{changes:{from:s.head-c.length,to:s.head+c.length},range:pe.cursor(s.head-c.length)}}return{range:i=s}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},GX=[{key:"Backspace",run:UX}];function KX(t,e){let n=_R(t,t.selection.main.head),r=n.brackets||pd.brackets;for(let i of r){let o=WR(ii(i,0));if(e==i)return o==i?YX(t,i,r.indexOf(i+i+i)>-1,n):JX(t,i,o,n.before||pd.before);if(e==o&&UR(t,t.selection.main.from))return qX(t,i,o)}return null}function UR(t,e){let n=!1;return t.field(VR).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function wm(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Fo(ii(n,0)))}function XX(t,e){let n=t.sliceString(e-2,e);return Fo(ii(n,0))==n.length?n:n.slice(1)}function JX(t,e,n,r){let i=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:n,from:s.to}],effects:La.of(s.to+e.length),range:pe.range(s.anchor+e.length,s.head+e.length)};let l=wm(t.doc,s.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:e+n,from:s.head},effects:La.of(s.head+e.length),range:pe.cursor(s.head+e.length)}:{range:i=s}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function qX(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&wm(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:pe.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function YX(t,e,n,r){let i=r.stringPrefixes||pd.stringPrefixes,o=null,s=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:La.of(l.to+e.length),range:pe.range(l.anchor+e.length,l.head+e.length)};let c=l.head,d=wm(t.doc,c),f;if(d==e){if(jI(t,c))return{changes:{insert:e+e,from:c},effects:La.of(c+e.length),range:pe.cursor(c+e.length)};if(UR(t,c)){let p=n&&t.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+p.length,insert:p},range:pe.cursor(c+p.length)}}}else{if(n&&t.sliceDoc(c-2*e.length,c)==e+e&&(f=QI(t,c-2*e.length,i))>-1&&jI(t,f))return{changes:{insert:e+e+e+e,from:c},effects:La.of(c+e.length),range:pe.cursor(c+e.length)};if(t.charCategorizer(c)(d)!=yn.Word&&QI(t,c,i)>-1&&!ZX(t,c,e,i))return{changes:{insert:e+e,from:c},effects:La.of(c+e.length),range:pe.cursor(c+e.length)}}return{range:o=l}});return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function jI(t,e){let n=Nr(t).resolveInner(e+1);return n.parent&&n.from==e}function ZX(t,e,n,r){let i=Nr(t).resolveInner(e,-1),o=r.reduce((s,l)=>Math.max(s,l.length),0);for(let s=0;s<5;s++){let l=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),c=l.indexOf(n);if(!c||c>-1&&r.indexOf(l.slice(0,c))>-1){let f=i.firstChild;for(;f&&f.from==i.from&&f.to-f.from>n.length+c;){if(t.sliceDoc(f.to-n.length,f.to)==n)return!1;f=f.firstChild}return!0}let d=i.to==e&&i.parent;if(!d)break;i=d}return!1}function QI(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=yn.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=yn.Word)return o}return-1}function eJ(t={}){return[zX,si,dr.of(t),jX,tJ,HX]}const GR=[{key:"Ctrl-Space",run:FI},{mac:"Alt-`",run:FI},{key:"Escape",run:$X},{key:"ArrowDown",run:vh(!0)},{key:"ArrowUp",run:vh(!1)},{key:"PageDown",run:vh(!0,"page")},{key:"PageUp",run:vh(!1,"page")},{key:"Enter",run:NX}],tJ=il.highest(gm.computeN([dr],t=>t.facet(dr).defaultKeymap?[GR]:[]));class zI{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Ra{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(vd).markerFilter;i&&(e=i(e,r));let o=e.slice().sort((f,g)=>f.from-g.from||f.to-g.to),s=new vs,l=[],c=0;for(let f=0;;){let g=f==o.length?null:o[f];if(!g&&!l.length)break;let p,A;for(l.length?(p=c,A=l.reduce((C,b)=>Math.min(C,b.to),g&&g.from>p?g.from:1e8)):(p=g.from,A=g.to,l.push(g),f++);f<o.length;){let C=o[f];if(C.from==p&&(C.to>C.from||C.to==p))l.push(C),f++,A=Math.min(C.to,A);else{A=Math.min(C.from,A);break}}let y=gJ(l);if(l.some(C=>C.from==C.to||C.from==C.to-1&&r.doc.lineAt(C.from).to==C.from))s.add(p,p,rt.widget({widget:new uJ(y),diagnostics:l.slice()}));else{let C=l.reduce((b,x)=>x.markClass?b+" "+x.markClass:b,"");s.add(p,A,rt.mark({class:"cm-lintRange cm-lintRange-"+y+C,diagnostics:l.slice(),inclusiveEnd:l.some(b=>b.to>A)}))}c=A;for(let C=0;C<l.length;C++)l[C].to<=c&&l.splice(C--,1)}let d=s.finish();return new Ra(d,n,bc(d))}}function bc(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:s})=>{if(!(e&&s.diagnostics.indexOf(e)<0))if(!r)r=new zI(i,o,e||s.diagnostics[0]);else{if(s.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new zI(r.from,o,r.diagnostic)}}),r}function nJ(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(vd).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(s=>s.is(KR))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function rJ(t,e){return t.field(Mi,!1)?e:e.concat(gt.appendConfig.of(mJ))}const KR=gt.define(),tC=gt.define(),XR=gt.define(),Mi=Sr.define({create(){return new Ra(rt.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=bc(n,t.selected.diagnostic,o)||bc(n,null,o)}!n.size&&i&&e.state.facet(vd).autoPanel&&(i=null),t=new Ra(n,i,r)}for(let n of e.effects)if(n.is(KR)){let r=e.state.facet(vd).autoPanel?n.value.length?Ad.open:null:t.panel;t=Ra.init(n.value,r,e.state)}else n.is(tC)?t=new Ra(t.diagnostics,n.value?Ad.open:null,t.selected):n.is(XR)&&(t=new Ra(t.diagnostics,t.panel,n.value));return t},provide:t=>[ud.from(t,e=>e.panel),Me.decorations.from(t,e=>e.diagnostics)]}),iJ=rt.mark({class:"cm-lintRange cm-lintRange-active"});function oJ(t,e,n){let{diagnostics:r}=t.state.field(Mi),i,o=-1,s=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(c,d,{spec:f})=>{if(e>=c&&e<=d&&(c==d||(e>c||n>0)&&(e<d||n<0)))return i=f.diagnostics,o=c,s=d,!1});let l=t.state.facet(vd).tooltipFilter;return i&&l&&(i=l(i,t.state)),i?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create(){return{dom:sJ(t,i)}}}:null}function sJ(t,e){return Zt("ul",{class:"cm-tooltip-lint"},e.map(n=>qR(t,n,!1)))}const aJ=t=>{let e=t.state.field(Mi,!1);(!e||!e.panel)&&t.dispatch({effects:rJ(t.state,[tC.of(!0)])});let n=cd(t,Ad.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},HI=t=>{let e=t.state.field(Mi,!1);return!e||!e.panel?!1:(t.dispatch({effects:tC.of(!1)}),!0)},lJ=t=>{let e=t.state.field(Mi,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},cJ=[{key:"Mod-Shift-m",run:aJ,preventDefault:!0},{key:"F8",run:lJ}],vd=Fe.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},Yo(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function JR(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;r<n.length;r++){let i=n[r];if(/[a-zA-Z]/.test(i)&&!e.some(o=>o.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function qR(t,e,n){var r;let i=n?JR(e.actions):[];return Zt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Zt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,s)=>{let l=!1,c=p=>{if(p.preventDefault(),l)return;l=!0;let A=bc(t.state.field(Mi).diagnostics,e);A&&o.apply(t,A.from,A.to)},{name:d}=o,f=i[s]?d.indexOf(i[s]):-1,g=f<0?d:[d.slice(0,f),Zt("u",d.slice(f,f+1)),d.slice(f+1)];return Zt("button",{type:"button",class:"cm-diagnosticAction",onclick:c,onmousedown:c,"aria-label":` Action: ${d}${f<0?"":` (access key "${i[s]})"`}.`},g)}),e.source&&Zt("div",{class:"cm-diagnosticSource"},e.source))}class uJ extends Cs{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Zt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class VI{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=qR(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Ad{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)HI(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],s=JR(o.actions);for(let l=0;l<s.length;l++)if(s[l].toUpperCase().charCodeAt(0)==i.keyCode){let c=bc(this.view.state.field(Mi).diagnostics,o);c&&o.actions[l].apply(e,c.from,c.to)}}else return;i.preventDefault()},r=i=>{for(let o=0;o<this.items.length;o++)this.items[o].dom.contains(i.target)&&this.moveSelection(o)};this.list=Zt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:r}),this.dom=Zt("div",{class:"cm-panel-lint"},this.list,Zt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>HI(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Mi).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Mi),r=0,i=!1,o=null,s=new Set;for(e.between(0,this.view.state.doc.length,(l,c,{spec:d})=>{for(let f of d.diagnostics){if(s.has(f))continue;s.add(f);let g=-1,p;for(let A=r;A<this.items.length;A++)if(this.items[A].diagnostic==f){g=A;break}g<0?(p=new VI(this.view,f),this.items.splice(r,0,p),i=!0):(p=this.items[g],g>r&&(this.items.splice(r,g-r),i=!0)),n&&p.diagnostic==n.diagnostic?p.dom.hasAttribute("aria-selected")||(p.dom.setAttribute("aria-selected","true"),o=p):p.dom.hasAttribute("aria-selected")&&p.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();this.items.length==0&&(this.items.push(new VI(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:c})=>{let d=c.height/this.list.offsetHeight;l.top<c.top?this.list.scrollTop-=(c.top-l.top)/d:l.bottom>c.bottom&&(this.list.scrollTop+=(l.bottom-c.bottom)/d)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Mi),r=bc(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:XR.of(r)})}static open(e){return new Ad(e)}}function dJ(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function Ah(t){return dJ(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const fJ=Me.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Ah("#d11")},".cm-lintRange-warning":{backgroundImage:Ah("orange")},".cm-lintRange-info":{backgroundImage:Ah("#999")},".cm-lintRange-hint":{backgroundImage:Ah("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function hJ(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function gJ(t){let e="hint",n=1;for(let r of t){let i=hJ(r.severity);i>n&&(n=i,e=r.severity)}return e}const mJ=[Mi,Me.decorations.compute([Mi],t=>{let{selected:e,panel:n}=t.field(Mi);return!e||!n||e.from==e.to?rt.none:rt.set([iJ.range(e.from,e.to)])}),oU(oJ,{hideOn:nJ}),fJ];var WI=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(GX)),e.defaultKeymap!==!1&&(r=r.concat(QK)),e.searchKeymap!==!1&&(r=r.concat(fX)),e.historyKeymap!==!1&&(r=r.concat(XG)),e.foldKeymap!==!1&&(r=r.concat(oG)),e.completionKeymap!==!1&&(r=r.concat(GR)),e.lintKeymap!==!1&&(r=r.concat(cJ));var i=[];return e.lineNumbers!==!1&&i.push(mU()),e.highlightActiveLineGutter!==!1&&i.push(AU()),e.highlightSpecialChars!==!1&&i.push(N_()),e.history!==!1&&i.push(QG()),e.foldGutter!==!1&&i.push(cG()),e.drawSelection!==!1&&i.push(w_()),e.dropCursor!==!1&&i.push(B_()),e.allowMultipleSelections!==!1&&i.push($t.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(XU()),e.syntaxHighlighting!==!1&&i.push(zb(hG,{fallback:!0})),e.bracketMatching!==!1&&i.push(bG()),e.closeBrackets!==!1&&i.push(VX()),e.autocompletion!==!1&&i.push(eJ()),e.rectangularSelection!==!1&&i.push(K_()),n!==!1&&i.push(q_()),e.highlightActiveLine!==!1&&i.push(Q_()),e.highlightSelectionMatches!==!1&&i.push(GK()),e.tabSize&&typeof e.tabSize=="number"&&i.push(pm.of(" ".repeat(e.tabSize))),i.concat([gm.of(r.flat())]).filter(Boolean)};const pJ="#e5c07b",_I="#e06c75",vJ="#56b6c2",AJ="#ffffff",_h="#abb2bf",vy="#7d8799",yJ="#61afef",bJ="#98c379",UI="#d19a66",CJ="#c678dd",SJ="#21252b",GI="#2c313a",KI="#282c34",A0="#353a42",wJ="#3E4451",XI="#528bff",xJ=Me.theme({"&":{color:_h,backgroundColor:KI},".cm-content":{caretColor:XI},".cm-cursor, .cm-dropCursor":{borderLeftColor:XI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:wJ},".cm-panels":{backgroundColor:SJ,color:_h},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:KI,color:vy,border:"none"},".cm-activeLineGutter":{backgroundColor:GI},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:A0},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:A0,borderBottomColor:A0},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:GI,color:_h}}},{dark:!0}),EJ=Pc.define([{tag:ee.keyword,color:CJ},{tag:[ee.name,ee.deleted,ee.character,ee.propertyName,ee.macroName],color:_I},{tag:[ee.function(ee.variableName),ee.labelName],color:yJ},{tag:[ee.color,ee.constant(ee.name),ee.standard(ee.name)],color:UI},{tag:[ee.definition(ee.name),ee.separator],color:_h},{tag:[ee.typeName,ee.className,ee.number,ee.changed,ee.annotation,ee.modifier,ee.self,ee.namespace],color:pJ},{tag:[ee.operator,ee.operatorKeyword,ee.url,ee.escape,ee.regexp,ee.link,ee.special(ee.string)],color:vJ},{tag:[ee.meta,ee.comment],color:vy},{tag:ee.strong,fontWeight:"bold"},{tag:ee.emphasis,fontStyle:"italic"},{tag:ee.strikethrough,textDecoration:"line-through"},{tag:ee.link,color:vy,textDecoration:"underline"},{tag:ee.heading,fontWeight:"bold",color:_I},{tag:[ee.atom,ee.bool,ee.special(ee.variableName)],color:UI},{tag:[ee.processingInstruction,ee.string,ee.inserted],color:bJ},{tag:ee.invalid,color:AJ}]),IJ=[xJ,zb(EJ)];var kJ=Me.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),BJ=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:s="",basicSetup:l=!0}=e,c=[];switch(n&&c.unshift(gm.of([zK])),l&&(typeof l=="boolean"?c.unshift(WI()):c.unshift(WI(l))),s&&c.unshift(W_(s)),o){case"light":c.push(kJ);break;case"dark":c.push(IJ);break;case"none":break;default:c.push(o);break}return r===!1&&c.push(Me.editable.of(!1)),i&&c.push($t.readOnly.of(!0)),[...c]},MJ=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)}),JI=qo.define(),OJ=[];function TJ(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:s,extensions:l=OJ,autoFocus:c,theme:d="light",height:f=null,minHeight:g=null,maxHeight:p=null,width:A=null,minWidth:y=null,maxWidth:C=null,placeholder:b="",editable:x=!0,readOnly:E=!1,indentWithTab:w=!0,basicSetup:B=!0,root:k,initialState:M}=t,[O,R]=m.useState(),[T,N]=m.useState(),[$,L]=m.useState(),F=Me.theme({"&":{height:f,minHeight:g,maxHeight:p,width:A,minWidth:y,maxWidth:C},"& .cm-scroller":{height:"100% !important"}}),D=Me.updateListener.of(H=>{if(H.docChanged&&typeof r=="function"&&!H.transactions.some(G=>G.annotation(JI))){var Q=H.state.doc,W=Q.toString();r(W,H)}i&&i(MJ(H))}),U=BJ({theme:d,editable:x,readOnly:E,placeholder:b,indentWithTab:w,basicSetup:B}),z=[D,F,...U];return s&&typeof s=="function"&&z.push(Me.updateListener.of(s)),z=z.concat(l),m.useLayoutEffect(()=>{if(O&&!$){var H={doc:e,selection:n,extensions:z},Q=M?$t.fromJSON(M.json,H,M.fields):$t.create(H);if(L(Q),!T){var W=new Me({state:Q,parent:O,root:k});N(W),o&&o(W,Q)}}return()=>{T&&(L(void 0),N(void 0))}},[O,$]),m.useEffect(()=>{t.container&&R(t.container)},[t.container]),m.useEffect(()=>()=>{T&&(T.destroy(),N(void 0))},[T]),m.useEffect(()=>{c&&T&&T.focus()},[c,T]),m.useEffect(()=>{T&&T.dispatch({effects:gt.reconfigure.of(z)})},[d,l,f,g,p,A,y,C,b,x,E,w,B,r,s]),m.useEffect(()=>{if(e!==void 0){var H=T?T.state.doc.toString():"";T&&e!==H&&T.dispatch({changes:{from:0,to:H.length,insert:e||""},annotations:[JI.of(!0)]})}},[e,T]),{state:$,setState:L,view:T,setView:N,container:O,setContainer:R}}var RJ=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],YR=m.forwardRef((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:s,onStatistics:l,onCreateEditor:c,onUpdate:d,autoFocus:f,theme:g="light",height:p,minHeight:A,maxHeight:y,width:C,minWidth:b,maxWidth:x,basicSetup:E,placeholder:w,indentWithTab:B,editable:k,readOnly:M,root:O,initialState:R}=t,T=Nk(t,RJ),N=m.useRef(null),{state:$,view:L,container:F,setContainer:D}=TJ({root:O,value:r,autoFocus:f,theme:g,height:p,minHeight:A,maxHeight:y,width:C,minWidth:b,maxWidth:x,basicSetup:E,placeholder:w,indentWithTab:B,editable:k,readOnly:M,selection:i,onChange:s,onStatistics:l,onCreateEditor:c,onUpdate:d,extensions:o,initialState:R});m.useImperativeHandle(e,()=>({editor:N.current,state:$,view:L}),[N,F,$,L]);var U=m.useCallback(H=>{N.current=H,D(H)},[D]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var z=typeof g=="string"?"cm-theme-"+g:"cm-theme";return Le.jsx("div",Pe({ref:U,className:""+z+(n?" "+n:"")},T))});YR.displayName="CodeMirror";const PJ={name:"gherkin",startState:function(){return{lineNumber:0,tableHeaderLine:!1,allowFeature:!0,allowBackground:!1,allowScenario:!1,allowSteps:!1,allowPlaceholders:!1,allowMultilineArgument:!1,inMultilineString:!1,inMultilineTable:!1,inKeywordLine:!1}},token:function(t,e){if(t.sol()&&(e.lineNumber++,e.inKeywordLine=!1,e.inMultilineTable&&(e.tableHeaderLine=!1,t.match(/\s*\|/,!1)||(e.allowMultilineArgument=!1,e.inMultilineTable=!1))),t.eatSpace(),e.allowMultilineArgument){if(e.inMultilineString)return t.match('"""')?(e.inMultilineString=!1,e.allowMultilineArgument=!1):t.match(/.*/),"string";if(e.inMultilineTable)return t.match(/\|\s*/)?"bracket":(t.match(/[^\|]*/),e.tableHeaderLine?"header":"string");if(t.match('"""'))return e.inMultilineString=!0,"string";if(t.match("|"))return e.inMultilineTable=!0,e.tableHeaderLine=!0,"bracket"}return t.match(/#.*/)?"comment":!e.inKeywordLine&&t.match(/@\S+/)?"tag":!e.inKeywordLine&&e.allowFeature&&t.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)?(e.allowScenario=!0,e.allowBackground=!0,e.allowPlaceholders=!1,e.allowSteps=!1,e.allowMultilineArgument=!1,e.inKeywordLine=!0,"keyword"):!e.inKeywordLine&&e.allowBackground&&t.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)?(e.allowPlaceholders=!1,e.allowSteps=!0,e.allowBackground=!1,e.allowMultilineArgument=!1,e.inKeywordLine=!0,"keyword"):!e.inKeywordLine&&e.allowScenario&&t.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)?(e.allowPlaceholders=!0,e.allowSteps=!0,e.allowMultilineArgument=!1,e.inKeywordLine=!0,"keyword"):e.allowScenario&&t.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)?(e.allowPlaceholders=!1,e.allowSteps=!0,e.allowBackground=!1,e.allowMultilineArgument=!0,"keyword"):!e.inKeywordLine&&e.allowScenario&&t.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)?(e.allowPlaceholders=!1,e.allowSteps=!0,e.allowBackground=!1,e.allowMultilineArgument=!1,e.inKeywordLine=!0,"keyword"):!e.inKeywordLine&&e.allowSteps&&t.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)?(e.inStep=!0,e.allowPlaceholders=!0,e.allowMultilineArgument=!0,e.inKeywordLine=!0,"keyword"):t.match(/"[^"]*"?/)?"string":e.allowPlaceholders&&t.match(/<[^>]*>?/)?"variable":(t.next(),t.eatWhile(/[^@"<#]/),null)}};var ZR=t=>{var{theme:e,settings:n={},styles:r=[]}=t,i={".cm-gutters":{}},o={};n.background&&(o.backgroundColor=n.background),n.backgroundImage&&(o.backgroundImage=n.backgroundImage),n.foreground&&(o.color=n.foreground),n.fontSize&&(o.fontSize=n.fontSize),(n.background||n.foreground)&&(i["&"]=o),n.fontFamily&&(i["&.cm-editor .cm-scroller"]={fontFamily:n.fontFamily}),n.gutterBackground&&(i[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(i[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(i[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(i[".cm-content"]={caretColor:n.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret});var s={};n.gutterActiveForeground&&(s.color=n.gutterActiveForeground),n.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:n.lineHighlight},s.backgroundColor=n.lineHighlight),i[".cm-activeLineGutter"]=s,n.selection&&(i["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:n.selection+" !important"}),n.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var l=Me.theme(i,{dark:e==="dark"}),c=Pc.define(r),d=[l,zb(c)];return d},NJ={background:"#fff",foreground:"#24292e",selection:"#BBDFFF",selectionMatch:"#BBDFFF",gutterBackground:"#fff",gutterForeground:"#6e7781"},$J=[{tag:[ee.standard(ee.tagName),ee.tagName],color:"#116329"},{tag:[ee.comment,ee.bracket],color:"#6a737d"},{tag:[ee.className,ee.propertyName],color:"#6f42c1"},{tag:[ee.variableName,ee.attributeName,ee.number,ee.operator],color:"#005cc5"},{tag:[ee.keyword,ee.typeName,ee.typeOperator,ee.typeName],color:"#d73a49"},{tag:[ee.string,ee.meta,ee.regexp],color:"#032f62"},{tag:[ee.name,ee.quote],color:"#22863a"},{tag:[ee.heading,ee.strong],color:"#24292e",fontWeight:"bold"},{tag:[ee.emphasis],color:"#24292e",fontStyle:"italic"},{tag:[ee.deleted],color:"#b31d28",backgroundColor:"ffeef0"},{tag:[ee.atom,ee.bool,ee.special(ee.variableName)],color:"#e36209"},{tag:[ee.url,ee.escape,ee.regexp,ee.link],color:"#032f62"},{tag:ee.link,textDecoration:"underline"},{tag:ee.strikethrough,textDecoration:"line-through"},{tag:ee.invalid,color:"#cb2431"}],LJ=t=>{var{theme:e="light",settings:n={},styles:r=[]}={};return ZR({theme:e,settings:Pe({},NJ,n),styles:[...$J,...r]})};LJ();var DJ={background:"#0d1117",foreground:"#c9d1d9",caret:"#c9d1d9",selection:"#003d73",selectionMatch:"#003d73",lineHighlight:"#36334280"},FJ=[{tag:[ee.standard(ee.tagName),ee.tagName],color:"#7ee787"},{tag:[ee.comment,ee.bracket],color:"#8b949e"},{tag:[ee.className,ee.propertyName],color:"#d2a8ff"},{tag:[ee.variableName,ee.attributeName,ee.number,ee.operator],color:"#79c0ff"},{tag:[ee.keyword,ee.typeName,ee.typeOperator,ee.typeName],color:"#ff7b72"},{tag:[ee.string,ee.meta,ee.regexp],color:"#a5d6ff"},{tag:[ee.name,ee.quote],color:"#7ee787"},{tag:[ee.heading,ee.strong],color:"#d2a8ff",fontWeight:"bold"},{tag:[ee.emphasis],color:"#d2a8ff",fontStyle:"italic"},{tag:[ee.deleted],color:"#ffdcd7",backgroundColor:"ffeef0"},{tag:[ee.atom,ee.bool,ee.special(ee.variableName)],color:"#ffab70"},{tag:ee.link,textDecoration:"underline"},{tag:ee.strikethrough,textDecoration:"line-through"},{tag:ee.invalid,color:"#f97583"}],jJ=t=>{var{theme:e="dark",settings:n={},styles:r=[]}={};return ZR({theme:e,settings:Pe({},DJ,n),styles:[...FJ,...r]})},QJ=jJ();/*!
|
|
329
329
|
* tabbable 6.2.0
|
|
330
330
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
331
|
-
*/var zJ=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ay=zJ.join(","),eP=typeof Element>"u",yd=eP?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ng=!eP&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},$g=function t(e,n){var r;n===void 0&&(n=!0);var i=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),o=i===""||i==="true",s=o||n&&e&&t(e.parentNode);return s},HJ=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},VJ=function(e,n,r){if($g(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Ay));return n&&yd.call(e,Ay)&&i.unshift(e),i=i.filter(r),i},WJ=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if(!$g(s,!1))if(s.tagName==="SLOT"){var l=s.assignedElements(),c=l.length?l:s.children,d=t(c,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:s,candidates:d})}else{var f=yd.call(s,Ay);f&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var g=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),p=!$g(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(g&&p){var A=t(g===!0?s.children:g.children,!0,r);r.flatten?i.push.apply(i,A):i.push({scopeParent:s,candidates:A})}else o.unshift.apply(o,s.children)}}return i},tP=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},nP=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||HJ(e))&&!tP(e)?0:e.tabIndex},_J=function(e,n){var r=nP(e);return r<0&&n&&!tP(e)?0:r},UJ=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},rP=function(e){return e.tagName==="INPUT"},GJ=function(e){return rP(e)&&e.type==="hidden"},KJ=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},XJ=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},JJ=function(e){if(!e.name)return!0;var n=e.form||Ng(e),r=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=XJ(i,e.form);return!o||o===e},qJ=function(e){return rP(e)&&e.type==="radio"},YJ=function(e){return qJ(e)&&!JJ(e)},ZJ=function(e){var n,r=e&&Ng(e),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==e){var s,l,c;for(o=!!((s=i)!==null&&s!==void 0&&(l=s.ownerDocument)!==null&&l!==void 0&&l.contains(i)||e!=null&&(c=e.ownerDocument)!==null&&c!==void 0&&c.contains(e));!o&&i;){var d,f,g;r=Ng(i),i=(d=r)===null||d===void 0?void 0:d.host,o=!!((f=i)!==null&&f!==void 0&&(g=f.ownerDocument)!==null&&g!==void 0&&g.contains(i))}}return o},qI=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},eq=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=yd.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(yd.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var l=e;e;){var c=e.parentElement,d=Ng(e);if(c&&!c.shadowRoot&&i(c)===!0)return qI(e);e.assignedSlot?e=e.assignedSlot:!c&&d!==e.ownerDocument?e=d.host:e=c}e=l}if(ZJ(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return qI(e);return!1},tq=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return yd.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},nq=function(e,n){return!(n.disabled||$g(n)||GJ(n)||eq(n,e)||KJ(n)||tq(n))},YI=function(e,n){return!(YJ(n)||nP(n)<0||!nq(e,n))},rq=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},iq=function t(e){var n=[],r=[];return e.forEach(function(i,o){var s=!!i.scopeParent,l=s?i.scopeParent:i,c=_J(l,s),d=s?t(i.candidates):l;c===0?s?n.push.apply(n,d):n.push(l):r.push({documentOrder:o,tabIndex:c,item:i,isScope:s,content:d})}),r.sort(UJ).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},oq=function(e,n){n=n||{};var r;return n.getShadowRoot?r=WJ([e],n.includeContainer,{filter:YI.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:rq}):r=VJ(e,n.includeContainer,YI.bind(null,n)),iq(r)};const iP=60;var Kt=(t=>(t.HIDE="hide",t.WITH_RESULT="withResult",t.WITHOUT_RESULT="withoutResult",t.SETTINGS="settings",t))(Kt||{}),bt=(t=>(t.NONE="No action",t.WITHIN="Within",t.EXPECT="Expect",t.CLICK="Click",t.TYPE="Type",t.KEYBOARD_GLOBAL_NAVIGATION="Keyboard Navigation",t.FORM_COMPLETION_MOUSE="Form Mouse Completion",t.TABLE_AND_GRID_EXPECT="Table and Grid Expect",t.FORM_COMPLETION_KEYBOARD="Form Keyboard Completion",t.RECORD="Record",t))(bt||{}),ka=(t=>(t.NONE="No navigation",t.CURRENT_NAVIGATION="currentNavigation",t.EXPECTED_NAVIGATION="expectedNavigation",t))(ka||{}),Tr=(t=>(t.CURRENT_NAVIGATION="keyboard-layer-current-navigation",t.EXPECTED_NAVIGATION="keyboard-layer-expected-navigation",t.FORM_COMPLETION="form-layer-completion",t.ARRAY_COMPLETION="array-layer-completion",t))(Tr||{});const Uh="uuv-is-disabled";var sq=Object.prototype.toString;function aq(t){return typeof t=="function"||sq.call(t)==="[object Function]"}function lq(t){var e=Number(t);return isNaN(e)?0:e===0||!isFinite(e)?e:(e>0?1:-1)*Math.floor(Math.abs(e))}var cq=Math.pow(2,53)-1;function uq(t){var e=lq(t);return Math.min(Math.max(e,0),cq)}function go(t,e){var n=Array,r=Object(t);if(t==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");for(var i=uq(r.length),o=aq(n)?Object(new n(i)):new Array(i),s=0,l;s<i;)l=r[s],o[s]=l,s+=1;return o.length=i,o}function bd(t){"@babel/helpers - typeof";return bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bd(t)}function dq(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fq(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,oP(r.key),r)}}function hq(t,e,n){return e&&fq(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function gq(t,e,n){return e=oP(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oP(t){var e=mq(t,"string");return bd(e)=="symbol"?e:e+""}function mq(t,e){if(bd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(bd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var pq=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];dq(this,t),gq(this,"items",void 0),this.items=e}return hq(t,[{key:"add",value:function(n){return this.has(n)===!1&&this.items.push(n),this}},{key:"clear",value:function(){this.items=[]}},{key:"delete",value:function(n){var r=this.items.length;return this.items=this.items.filter(function(i){return i!==n}),r!==this.items.length}},{key:"forEach",value:function(n){var r=this;this.items.forEach(function(i){n(i,i,r)})}},{key:"has",value:function(n){return this.items.indexOf(n)!==-1}},{key:"size",get:function(){return this.items.length}}])}();const vq=typeof Set>"u"?Set:pq;function $r(t){var e;return(e=t.localName)!==null&&e!==void 0?e:t.tagName.toLowerCase()}var Aq={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",form:"form",footer:"contentinfo",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",header:"banner",hr:"separator",html:"document",legend:"legend",li:"listitem",math:"math",main:"main",menu:"list",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",progress:"progressbar",section:"region",summary:"button",table:"table",tbody:"rowgroup",textarea:"textbox",tfoot:"rowgroup",td:"cell",th:"columnheader",thead:"rowgroup",tr:"row",ul:"list"},yq={caption:new Set(["aria-label","aria-labelledby"]),code:new Set(["aria-label","aria-labelledby"]),deletion:new Set(["aria-label","aria-labelledby"]),emphasis:new Set(["aria-label","aria-labelledby"]),generic:new Set(["aria-label","aria-labelledby","aria-roledescription"]),insertion:new Set(["aria-label","aria-labelledby"]),none:new Set(["aria-label","aria-labelledby"]),paragraph:new Set(["aria-label","aria-labelledby"]),presentation:new Set(["aria-label","aria-labelledby"]),strong:new Set(["aria-label","aria-labelledby"]),subscript:new Set(["aria-label","aria-labelledby"]),superscript:new Set(["aria-label","aria-labelledby"])};function bq(t,e){return["aria-atomic","aria-busy","aria-controls","aria-current","aria-description","aria-describedby","aria-details","aria-dropeffect","aria-flowto","aria-grabbed","aria-hidden","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"].some(function(n){var r;return t.hasAttribute(n)&&!((r=yq[e])!==null&&r!==void 0&&r.has(n))})}function sP(t,e){return bq(t,e)}function _i(t){var e=Sq(t);if(e===null||yy.indexOf(e)!==-1){var n=Cq(t);if(yy.indexOf(e||"")===-1||sP(t,n||""))return n}return e}function Cq(t){var e=Aq[$r(t)];if(e!==void 0)return e;switch($r(t)){case"a":case"area":case"link":if(t.hasAttribute("href"))return"link";break;case"img":return t.getAttribute("alt")===""&&!sP(t,"img")?"presentation":"img";case"input":{var n=t,r=n.type;switch(r){case"button":case"image":case"reset":case"submit":return"button";case"checkbox":case"radio":return r;case"range":return"slider";case"email":case"tel":case"text":case"url":return t.hasAttribute("list")?"combobox":"textbox";case"search":return t.hasAttribute("list")?"combobox":"searchbox";case"number":return"spinbutton";default:return null}}case"select":return t.hasAttribute("multiple")||t.size>1?"listbox":"combobox"}return null}function Sq(t){var e=t.getAttribute("role");if(e!==null){var n=e.trim().split(" ")[0];if(n.length>0)return n}return null}var yy=["presentation","none"];function An(t){return t!==null&&t.nodeType===t.ELEMENT_NODE}function aP(t){return An(t)&&$r(t)==="caption"}function Gh(t){return An(t)&&$r(t)==="input"}function wq(t){return An(t)&&$r(t)==="optgroup"}function xq(t){return An(t)&&$r(t)==="select"}function Eq(t){return An(t)&&$r(t)==="table"}function Iq(t){return An(t)&&$r(t)==="textarea"}function kq(t){var e=t.ownerDocument===null?t:t.ownerDocument,n=e.defaultView;if(n===null)throw new TypeError("no window available");return n}function Bq(t){return An(t)&&$r(t)==="fieldset"}function Mq(t){return An(t)&&$r(t)==="legend"}function Oq(t){return An(t)&&$r(t)==="slot"}function Tq(t){return An(t)&&t.ownerSVGElement!==void 0}function Rq(t){return An(t)&&$r(t)==="svg"}function Pq(t){return Tq(t)&&$r(t)==="title"}function by(t,e){if(An(t)&&t.hasAttribute(e)){var n=t.getAttribute(e).split(" "),r=t.getRootNode?t.getRootNode():t.ownerDocument;return n.map(function(i){return r.getElementById(i)}).filter(function(i){return i!==null})}return[]}function fs(t,e){return An(t)?e.indexOf(_i(t))!==-1:!1}function Nq(t){return t.trim().replace(/\s\s+/g," ")}function $q(t,e){if(!An(t))return!1;if(t.hasAttribute("hidden")||t.getAttribute("aria-hidden")==="true")return!0;var n=e(t);return n.getPropertyValue("display")==="none"||n.getPropertyValue("visibility")==="hidden"}function Lq(t){return fs(t,["button","combobox","listbox","textbox"])||lP(t,"range")}function lP(t,e){if(!An(t))return!1;switch(e){case"range":return fs(t,["meter","progressbar","scrollbar","slider","spinbutton"]);default:throw new TypeError("No knowledge about abstract role '".concat(e,"'. This is likely a bug :("))}}function ZI(t,e){var n=go(t.querySelectorAll(e));return by(t,"aria-owns").forEach(function(r){n.push.apply(n,go(r.querySelectorAll(e)))}),n}function Dq(t){return xq(t)?t.selectedOptions||ZI(t,"[selected]"):ZI(t,'[aria-selected="true"]')}function Fq(t){return fs(t,yy)}function jq(t){return aP(t)}function Qq(t){return fs(t,["button","cell","checkbox","columnheader","gridcell","heading","label","legend","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"])}function zq(t){return!1}function Hq(t){return Gh(t)||Iq(t)?t.value:t.textContent||""}function ek(t){var e=t.getPropertyValue("content");return/^["'].*["']$/.test(e)?e.slice(1,-1):""}function cP(t){var e=$r(t);return e==="button"||e==="input"&&t.getAttribute("type")!=="hidden"||e==="meter"||e==="output"||e==="progress"||e==="select"||e==="textarea"}function uP(t){if(cP(t))return t;var e=null;return t.childNodes.forEach(function(n){if(e===null&&An(n)){var r=uP(n);r!==null&&(e=r)}}),e}function Vq(t){if(t.control!==void 0)return t.control;var e=t.getAttribute("for");return e!==null?t.ownerDocument.getElementById(e):uP(t)}function Wq(t){var e=t.labels;if(e===null)return e;if(e!==void 0)return go(e);if(!cP(t))return null;var n=t.ownerDocument;return go(n.querySelectorAll("label")).filter(function(r){return Vq(r)===t})}function _q(t){var e=t.assignedNodes();return e.length===0?go(t.childNodes):e}function Uq(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new vq,r=typeof Map>"u"?void 0:new Map,i=kq(t),o=e.compute,s=o===void 0?"name":o,l=e.computedStyleSupportsPseudoElements,c=l===void 0?e.getComputedStyle!==void 0:l,d=e.getComputedStyle,f=d===void 0?i.getComputedStyle.bind(i):d,g=e.hidden,p=g===void 0?!1:g,A=function(B,k){if(k!==void 0)throw new Error("use uncachedGetComputedStyle directly for pseudo elements");if(r===void 0)return f(B);var M=r.get(B);if(M)return M;var O=f(B,k);return r.set(B,O),O};function y(w,B){var k="";if(An(w)&&c){var M=f(w,"::before"),O=ek(M);k="".concat(O," ").concat(k)}var R=Oq(w)?_q(w):go(w.childNodes).concat(by(w,"aria-owns"));if(R.forEach(function($){var L=E($,{isEmbeddedInLabel:B.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),F=An($)?A($).getPropertyValue("display"):"inline",D=F!=="inline"?" ":"";k+="".concat(D).concat(L).concat(D)}),An(w)&&c){var T=f(w,"::after"),N=ek(T);k="".concat(k," ").concat(N)}return k.trim()}function C(w,B){var k=w.getAttributeNode(B);return k!==null&&!n.has(k)&&k.value.trim()!==""?(n.add(k),k.value):null}function b(w){return An(w)?C(w,"title"):null}function x(w){if(!An(w))return null;if(Bq(w)){n.add(w);for(var B=go(w.childNodes),k=0;k<B.length;k+=1){var M=B[k];if(Mq(M))return E(M,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(Eq(w)){n.add(w);for(var O=go(w.childNodes),R=0;R<O.length;R+=1){var T=O[R];if(aP(T))return E(T,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(Rq(w)){n.add(w);for(var N=go(w.childNodes),$=0;$<N.length;$+=1){var L=N[$];if(Pq(L))return L.textContent}return null}else if($r(w)==="img"||$r(w)==="area"){var F=C(w,"alt");if(F!==null)return F}else if(wq(w)){var D=C(w,"label");if(D!==null)return D}if(Gh(w)&&(w.type==="button"||w.type==="submit"||w.type==="reset")){var U=C(w,"value");if(U!==null)return U;if(w.type==="submit")return"Submit";if(w.type==="reset")return"Reset"}var z=Wq(w);if(z!==null&&z.length!==0)return n.add(w),go(z).map(function(G){return E(G,{isEmbeddedInLabel:!0,isReferenced:!1,recursion:!0})}).filter(function(G){return G.length>0}).join(" ");if(Gh(w)&&w.type==="image"){var H=C(w,"alt");if(H!==null)return H;var Q=C(w,"title");return Q!==null?Q:"Submit Query"}if(fs(w,["button"])){var W=y(w,{isEmbeddedInLabel:!1});if(W!=="")return W}return null}function E(w,B){if(n.has(w))return"";if(!p&&$q(w,A)&&!B.isReferenced)return n.add(w),"";var k=An(w)?w.getAttributeNode("aria-labelledby"):null,M=k!==null&&!n.has(k)?by(w,"aria-labelledby"):[];if(s==="name"&&!B.isReferenced&&M.length>0)return n.add(k),M.map(function(F){return E(F,{isEmbeddedInLabel:B.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(" ");var O=B.recursion&&Lq(w)&&s==="name";if(!O){var R=(An(w)&&w.getAttribute("aria-label")||"").trim();if(R!==""&&s==="name")return n.add(w),R;if(!Fq(w)){var T=x(w);if(T!==null)return n.add(w),T}}if(fs(w,["menu"]))return n.add(w),"";if(O||B.isEmbeddedInLabel||B.isReferenced){if(fs(w,["combobox","listbox"])){n.add(w);var N=Dq(w);return N.length===0?Gh(w)?w.value:"":go(N).map(function(F){return E(F,{isEmbeddedInLabel:B.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(" ")}if(lP(w,"range"))return n.add(w),w.hasAttribute("aria-valuetext")?w.getAttribute("aria-valuetext"):w.hasAttribute("aria-valuenow")?w.getAttribute("aria-valuenow"):w.getAttribute("value")||"";if(fs(w,["textbox"]))return n.add(w),Hq(w)}if(Qq(w)||An(w)&&B.isReferenced||jq(w)||zq()){var $=y(w,{isEmbeddedInLabel:B.isEmbeddedInLabel});if($!=="")return n.add(w),$}if(w.nodeType===w.TEXT_NODE)return n.add(w),w.textContent||"";if(B.recursion)return n.add(w),y(w,{isEmbeddedInLabel:B.isEmbeddedInLabel});var L=b(w);return L!==null?(n.add(w),L):(n.add(w),"")}return Nq(E(t,{isEmbeddedInLabel:!1,isReferenced:s==="description",recursion:!1}))}function Gq(t){return fs(t,["caption","code","deletion","emphasis","generic","insertion","none","paragraph","presentation","strong","subscript","superscript"])}function nC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Gq(t)?"":Uq(t,e)}let zt=null;function Kq(t,e,n){switch(dP(),zt=document.createElement("div"),zt.className="tooltip-highlight",zt.innerHTML=e,zt.style.position="absolute",zt.style.border="2px solid black",n){case"good":zt.style.background="rgba(23,62,23,0.85)",zt.style.border="2px solid rgb(23,62,23)";break;case"warning":zt.style.background="rgba(87,65,18,0.85)",zt.style.border="2px solid rgb(87,65,18)";break;case"danger":zt.style.background="rgba(78,11,11,0.85)",zt.style.border="2px solid rgb(78,11,11)";break;default:zt.style.background="rgba(0,0,0, 0.85)",zt.style.border="2px solid black"}zt.style.color="#fff",zt.style.padding="6px 10px",zt.style.borderRadius="4px",zt.style.fontSize="14px",zt.style.zIndex="9999999",zt.style.whiteSpace="nowrap",zt.style.boxShadow="0 0 6px rgba(0,0,0,0.2)",zt.style.pointerEvents="none",zt.style.transition="opacity 0.2s",zt.style.width="300px",zt.style.maxWidth="300px",document.body.appendChild(zt),Xq(t)}function dP(){zt&&(zt.remove(),zt=null)}function Xq(t){const e=t.getBoundingClientRect(),n=zt.getBoundingClientRect();let r=e.top+window.scrollY-n.height,i=e.left+window.scrollX+(e.width-n.width)/2;r<window.scrollY&&(r=e.bottom+window.scrollY),i<8&&(i=8);const o=window.scrollX+document.documentElement.clientWidth-n.width;i>o&&(i=o),zt.style.left=`${i}px`,zt.style.top=`${r}px`}class Jq{constructor(e="",n="",r="",i=[]){this.accessibleAttribute=e,this.accessibleValue=n,this.code=r,this.sentenceAfterCorrection=i}}var Kr=(t=>(t.WHEN="When ",t.THEN="Then ",t.GIVEN="Given ",t.AND="And ",t))(Kr||{});class qq{constructor(){js(this,"id");js(this,"name");js(this,"shouldGenerateClickSentence");js(this,"shouldGenerateTypeSentence");js(this,"shouldGenerateContainsSentence");js(this,"shouldGenerateKeyboardSentence",!1);js(this,"shouldGenerateCheckedSentence",!1)}}class rC extends qq{constructor(e,n,r="the",i="a",o=!1,s=!0,l=!0,c=!1,d=!1){super(),this.id=e,this.name=n,this.definiteArticle=r,this.indefiniteArticle=i,this.shouldGenerateClickSentence=o,this.shouldGenerateTypeSentence=s,this.shouldGenerateContainsSentence=l,this.shouldGenerateKeyboardSentence=c,this.shouldGenerateCheckedSentence=d}static from(e){return new rC(e.id,e.name,e.definiteArticle,e.indefiniteArticle,e.shouldGenerateClickSentence,e.shouldGenerateTypeSentence,e.shouldGenerateContainsSentence,e.shouldGenerateKeyboardSentence,e.shouldGenerateCheckedSentence)}getDefiniteArticle(){return this.definiteArticle.toString()}getIndefiniteArticle(){return this.indefiniteArticle.toString()}getOfDefiniteArticle(){return`of ${this.definiteArticle}`}namedAdjective(){return"named"}}const Cd=[{id:"alert",name:"alert",indefiniteArticle:"an"},{id:"alertdialog",name:"alert dialog",indefiniteArticle:"an"},{id:"application",name:"application",indefiniteArticle:"an"},{id:"article",name:"article",indefiniteArticle:"an"},{id:"banner",name:"banner"},{id:"button",name:"button",shouldGenerateKeyboardSentence:!0,shouldGenerateClickSentence:!0},{id:"cell",name:"cell"},{id:"checkbox",name:"checkbox",shouldGenerateKeyboardSentence:!0,shouldGenerateCheckedSentence:!0,shouldGenerateClickSentence:!0},{id:"columnheader",name:"column header"},{id:"combobox",name:"combo box",shouldGenerateKeyboardSentence:!0,shouldGenerateClickSentence:!0},{id:"command",name:"command"},{id:"comment",name:"comment"},{id:"complementary",name:"complementary"},{id:"composite",name:"composite"},{id:"contentinfo",name:"contentinfo"},{id:"definition",name:"definition"},{id:"dialog",name:"dialog"},{id:"directory",name:"directory"},{id:"document",name:"document"},{id:"feed",name:"flow"},{id:"figure",name:"figure"},{id:"form",name:"form"},{id:"generic",name:"generic"},{id:"grid",name:"grid"},{id:"gridcell",name:"grid cell"},{id:"group",name:"group"},{id:"heading",name:"title"},{id:"img",name:"image",indefiniteArticle:"an"},{id:"landmark",name:"landmark"},{id:"link",name:"link",shouldGenerateKeyboardSentence:!0,shouldGenerateClickSentence:!0},{id:"list",name:"list",shouldGenerateContainsSentence:!1,shouldGenerateTypeSentence:!1},{id:"listbox",name:"list box",shouldGenerateKeyboardSentence:!0},{id:"listitem",name:"list item",shouldGenerateKeyboardSentence:!0,shouldGenerateClickSentence:!0},{id:"log",name:"log"},{id:"main",name:"main"},{id:"mark",name:"mark"},{id:"math",name:"math"},{id:"menu",name:"menu"},{id:"menubar",name:"menubar"},{id:"menuitem",name:"menuitem",shouldGenerateKeyboardSentence:!0,shouldGenerateClickSentence:!0},{id:"menuitemcheckbox",name:"menuitemcheckbox",shouldGenerateKeyboardSentence:!0},{id:"menuitemradio",name:"menuitemradio",shouldGenerateKeyboardSentence:!0,shouldGenerateCheckedSentence:!0},{id:"meter",name:"counter"},{id:"navigation",name:"navigation"},{id:"none",name:"no"},{id:"note",name:"note"},{id:"option",name:"option",indefiniteArticle:"an",shouldGenerateKeyboardSentence:!0,shouldGenerateClickSentence:!0},{id:"presentation",name:"presentation"},{id:"progressbar",name:"progress bar"},{id:"radio",name:"radio",shouldGenerateKeyboardSentence:!0,shouldGenerateCheckedSentence:!0,shouldGenerateClickSentence:!0},{id:"radiogroup",name:"radio group"},{id:"range",name:"range"},{id:"region",name:"region"},{id:"roletype",name:"role type"},{id:"row",name:"row"},{id:"rowgroup",name:"row group"},{id:"rowheader",name:"row header"},{id:"scrollbar",name:"scroll bar"},{id:"search",name:"search",shouldGenerateKeyboardSentence:!0},{id:"searchbox",name:"search box",shouldGenerateKeyboardSentence:!0},{id:"section",name:"section"},{id:"sectionhead",name:"section header"},{id:"select",name:"select",shouldGenerateKeyboardSentence:!0},{id:"separator",name:"separator"},{id:"slider",name:"slider",shouldGenerateKeyboardSentence:!0},{id:"spinbutton",name:"spin button",shouldGenerateKeyboardSentence:!0},{id:"status",name:"status"},{id:"structure",name:"structure"},{id:"suggestion",name:"suggestion"},{id:"switch",name:"switch",shouldGenerateKeyboardSentence:!0},{id:"tab",name:"tab",shouldGenerateKeyboardSentence:!0},{id:"table",name:"table"},{id:"tablist",name:"tablist"},{id:"tabpanel",name:"tabpanel"},{id:"term",name:"term"},{id:"textbox",name:"text box",shouldGenerateKeyboardSentence:!0},{id:"timer",name:"timer"},{id:"toolbar",name:"toolbar"},{id:"tooltip",name:"tooltip"},{id:"tree",name:"tree"},{id:"treegrid",name:"tree grid"},{id:"treeitem",name:"tree item"},{id:"widget",name:"widget",shouldGenerateKeyboardSentence:!0},{id:"window",name:"window"}].map(t=>rC.from(t)),Yq=JSON.parse(`[{"key":"key.when.click.withContext","description":"Triggers a click on the selected element.<br/>Make sure you've selected an element beforehand with the <strong>within...</strong> phrases.","wording":"I click"},{"key":"key.when.click.withRole","description":"Triggers a click on the element with given role and specific name","wording":"I click on element with role {string} and name {string}"},{"key":"key.when.headers.forUriAndMethod","description":"Sets one or more headers to the indicated http request and only for the Http method (GET / POST / etc...) passed as a argument.<i> If you use Playwright as execution engine, <b>method</b> isn't used.</i>","wording":"I set header(s) for uri {string} and method {string}"},{"key":"key.when.headers.forUri","description":"Sets one or more headers to the indicated http request","wording":"I set header(s) for uri {string}"},{"key":"key.when.resetContext","description":"Deletes selected element and timeout","wording":"I reset context"},{"key":"key.when.timeout","description":"Sets the timeout value (in millisecond) for finding element in the DOM <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it","wording":"I set timeout with value {int}"},{"key":"key.when.type.withContext","description":"Writes the sentence passed as a parameter (useful for example to fill in a form field).<br/>Make sure you've selected an element beforehand with the <strong>within...</strong> phrases.","wording":"I type the sentence {string}"},{"key":"key.when.enter.withContext","description":"Writes the sentence passed as a parameter (useful for example to fill in a form field).<br/>Make sure you've selected an element beforehand with the <strong>within...</strong> phrases.","wording":"I enter the value {string}"},{"key":"key.when.keyboard.press","description":"Press specified key: <table><thead><tr><th>Key</th><th>Description</th></tr></thead><tbody><tr><td>{tab}</td><td>Tabulation</td></tr><tr><td>{reverseTab}</td><td>Reverse tabulation</td></tr><tr><td>{down}</td><td>Arrow Down</td></tr><tr><td>{right}</td><td>Arrow Right</td></tr><tr><td>{left}</td><td>Arrow Left</td></tr><tr><td>{up}</td><td>Arrow Up</td></tr></tbody></table><br/>Make sure you've selected an element beforehand with the <strong>within...</strong> phrases.","wording":"I press {string}"},{"key":"key.when.keyboard.multiplePress","description":"Press specified key multiple times using | as: num|{key}","wording":"I press {int} times on {string}"},{"key":"key.when.keyboard.nextElement","description":"Move to the next html element that can be reached with Tab<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"I go to next keyboard element"},{"key":"key.when.keyboard.previousElement","description":"Move to the previous html element that can be reached with back Tab<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"I go to previous keyboard element"},{"key":"key.when.visit","description":"Navigate to the Uri passed as a argument (full url consisting of the BASE_URL + Uri) or navigate to Url if begin with http:// or https://","wording":"I visit path {string}"},{"key":"key.when.withinElement.ariaLabel","description":"Selects the element whose aria-label is specified <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it","wording":"within the element with aria-label {string}"},{"key":"key.when.withinElement.selector","description":"Selects the element whose selector is specified <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it","wording":"within the element with selector {string}"},{"key":"key.when.withinElement.roleAndName","description":"Selects the element whose [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and accessible [name](https://russmaxdesign.github.io/html-elements-names/) are specified <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it","wording":"within the element with role {string} and name {string}"},{"key":"key.when.withinElement.testId","description":"Selects the element whose data-testId attribute is specified <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it","wording":"within the element with testId {string}"},{"key":"key.when.mock.withBody","description":"Mock a named API response with body. <i>If you use Playwright as runtime engine, <b>request</b> and <b>named</b> are unused.</i>","wording":"I mock a request {} on url {string} named {string} with content {}"},{"key":"key.when.mock.withFixture","description":"Mock a named API response with file's extension .json, .js, .coffee, .html, .txt, .csv, .png, .jpg, .jpeg, .gif, .tif, .tiff, .zip","wording":"I mock a request {} on url {string} named {string} with fixture {}"},{"key":"key.when.mock.withStatusCode","description":"Mock a named API response with status code","wording":"I mock a request {} on url {string} named {string} with status code {int}"},{"key":"key.given.viewport.preset","description":"Sets the viewport dimensions with one of the presets defined by your runtime engine as Cypress: [Link](https://docs.cypress.io/api/commands/viewport#Arguments) or Playwright: [Link](https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json)","wording":"I set viewport to preset {string}"},{"key":"key.given.viewport.withWidthAndHeight","description":"Sets the viewport dimensions to the specified width and length","wording":"I set viewport with width {int} and height {int}"},{"key":"key.given.keyboard.startNavigationFromTheTop","description":"Start a keyboard navigation session from the top of the page<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"I start a keyboard navigation from the top of the page"},{"key":"key.then.page.withTitle","description":"Checks the current html page have the specified title","wording":"I should see the page title {string}"},{"key":"key.then.title.withNameAndLevel","description":"Checks that an Html element exists with [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) \`heading\`, the specified [name](https://russmaxdesign.github.io/html-elements-names/) and title level","wording":"I should see a title named {string} with level {int}"},{"key":"key.then.attributes.withValues","description":"Checks Html attributes of the selected element","wording":"I should see these attributes with values"},{"key":"key.then.element.withAriaLabelAndContent","description":"Checks that an Html element exists with the specified aria-label attribute and content","wording":"I should see an element with aria-label {string} and content {string}"},{"key":"key.then.element.withAriaLabel","description":"Checks that an Html element exists with the specified aria-label attribute","wording":"I should see an element with aria-label {string}"},{"key":"key.then.element.withContent","description":"Checks that an Html element exists with the specified content","wording":"I should see an element with content {string}"},{"key":"key.then.element.withSelector","description":"Checks that an Html element exists with the specified selector","wording":"I should see an element with selector {string}"},{"key":"key.then.element.withRoleAndNameAndContentDisabled","description":"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content, and with the disabled attribute set to true","wording":"I should see an element with role {string} and name {string} and content {string} disabled"},{"key":"key.then.element.withRoleAndNameAndContentEnabled","description":"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content, and with the disabled attribute set to false","wording":"I should see an element with role {string} and name {string} and content {string} enabled"},{"key":"key.then.element.withRoleAndNameAndContent","description":"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content","wording":"I should see an element with role {string} and name {string} and content {string}"},{"key":"key.then.element.withSelectorFocused","description":"Checks that the Html element with the specified selector is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"the element with selector {string} should be keyboard focused"},{"key":"key.then.element.withRoleAndNameFocused","description":"Checks that the Html element with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"the element with role {string} and name {string} should be keyboard focused"},{"key":"key.then.element.withRoleAndName","description":"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/)","wording":"I should see an element with role {string} and name {string}"},{"key":"key.then.element.withTestId","description":"Checks that an Html element exists with the specified data-testid attribute","wording":"I should see an element with testId {string}"},{"key":"key.then.list.withNameAndContent","description":"Checks that there is a list with the specified [name](https://russmaxdesign.github.io/html-elements-names/) containing list items.<br/> <u>Example</u>\\\\n\`\`\`gherkin\\\\nThen I should see a list named \\"test-list\\" and containing\\\\n| First element |\\\\n| Second element |\\\\n| Third element |\\\\n\`\`\`","wording":"I should see a list named {string} and containing"},{"key":"key.then.grid.withNameAndContent","description":"Checks that there is a grid with the specified [name](https://russmaxdesign.github.io/html-elements-names/) containing list items.<br/> <u>Example</u>\\\\n\`\`\`gherkin\\\\nWhen I visit path \\"https://e2e-test-quest.github.io/simple-webapp/grid.html\\"\\\\nThen I should see a grid named \\"HTML Grid Example\\" and containing\\\\n| Make | Model | Price |\\\\n| ------------ | ------- | ------ |\\\\n| Toyota | Celica | 35000 |\\\\n| Ford | Mondeo | 32000 |\\\\n| Porsche | Boxster | 72000 |\\\\n| BMW | M50 | 60000 |\\\\n| Aston Martin | DBX | 190000 |\\\\n\`\`\`","wording":"I should see a grid named {string} and containing"},{"key":"key.then.treegrid.withNameAndContent","description":"Checks that there is a treegrid with the specified [name](https://russmaxdesign.github.io/html-elements-names/) containing list items.<br/> <u>Example</u>\\\\n\`\`\`gherkin\\\\nWhen I visit path \\"https://e2e-test-quest.github.io/simple-webapp/treegrid.html\\"\\\\nThen I should see a treegrid named \\"HTML Treegrid Example\\" and containing\\\\n| Make | Model | Price |\\\\n| ------------ | ------- | ------ |\\\\n| Toyota | Celica | 35000 |\\\\n| Ford | Mondeo | 32000 |\\\\n| Porsche | Boxster | 72000 |\\\\n| BMW | M50 | 60000 |\\\\n| Aston Martin | DBX | 190000 |\\\\n\`\`\`","wording":"I should see a treegrid named {string} and containing"},{"key":"key.then.table.withNameAndContent","description":"Checks that there is a table with the specified [name](https://russmaxdesign.github.io/html-elements-names/) containing list items.<br/> <u>Example</u>\\\\n\`\`\`gherkin\\\\nWhen I visit path \\"https://e2e-test-quest.github.io/simple-webapp/table.html\\"\\\\nThen I should see a table named \\"test-list\\" and containing\\\\n| Company | Contact | Country |\\\\n| ----------------------------- | ---------------- | ------- |\\\\n| Alfreds Futterkiste | Maria Anders | Germany |\\\\n| Centro comercial Moctezuma | Francisco Chang | Mexico |\\\\n| Ernst Handel | Roland Mendel | Austria |\\\\n| Island Trading | Helen Bennett | UK |\\\\n| Laughing Bacchus Winecellars | Yoshi Tannamuri | Canada |\\\\n| Magazzini Alimentari Riuniti | Giovanni Rovelli | Italy |\\\\n\`\`\`","wording":"I should see a table named {string} and containing"},{"key":"key.then.element.not.withContent","description":"Checks that an Html element does not exists with the specified content","wording":"I should not see an element with content {string}"},{"key":"key.then.element.not.withTestId","description":"Checks that an Html element does not exists with the specified data-testid attribute","wording":"I should not see an element with testId {string}"},{"key":"key.then.element.not.withRoleAndName","description":"Checks that an Html element does not exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/)","wording":"I should not see an element with role {string} and name {string}"},{"key":"key.then.element.not.withAriaLabel","description":"Checks that an Html element does not exists with the specified aria-label attribute","wording":"I should not see an element with aria-label {string}"},{"key":"key.then.element.nextWithRoleAndNameFocused","description":"Move to the next html element that can be reached with Tab and checks that the Html element with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"the next keyboard element focused should have name {string} and role {string}","section":"keyboard"},{"key":"key.then.element.previousWithRoleAndNameFocused","description":"Move to the previous html element that can be reached with Tab and checks that the Html element with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"the previous keyboard element focused should have name {string} and role {string}","section":"keyboard"},{"key":"key.then.wait.mock","description":"Wait that a named mock has been consumed until timeout","wording":"I should consume a mock named {string}"},{"key":"key.then.wait.milliSeconds","description":"Wait milliseconds. <b>Warning:</b> use this sentence <b>in production</b> can make your <b>test flaky</b>.","wording":"I wait {int} ms"},{"key":"key.then.a11y.axecore.default","description":"Check that the current page have no accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md)","wording":"I should not have any axe-core accessibility issue"},{"key":"key.then.a11y.axecore.withFixtureContextAndFixtureOption","description":"Check that the current page have no accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md) [with an option](https://github.com/dequelabs/axe-core/blob/HEAD/doc/API.md#options-parameter) on the specific [context](https://github.com/dequelabs/axe-core/blob/HEAD/doc/API.md#context-parameter)","wording":"I should not have any axe-core accessibility issue with context json fixture {} and option json fixture {}"},{"key":"key.then.a11y.axecore.withFixtureOption","description":"Check that the current page have no accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md) [with an option](https://github.com/dequelabs/axe-core/blob/HEAD/doc/API.md#options-parameter)","wording":"I should not have any axe-core accessibility issue with option json fixture {}"},{"key":"key.then.a11y.axecore.onlyCritical","description":"Check that the current page have not critical accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md)","wording":"I should not have any axe-core critical accessibility issue"},{"key":"key.then.a11y.axecore.withImpacts","description":"Check that the current page have not accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md) with one or more impacts in: 'minor','moderate','serious','critical'","wording":"I should not have any axe-core accessibility issue with {} impact(s)"},{"key":"key.then.a11y.axecore.withTags","description":"Check that the current page have not accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md) [with one or more Accessibility Standards](https://github.com/dequelabs/axe-core/blob/HEAD/doc/API.md#axe-core-tags)","wording":"I should not have any axe-core accessibility issue with accessibility standard(s) {}"},{"key":"key.then.a11y.rgaa.default","description":"Check that the current page have no [accessibility issue](https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/) based on RGAA standards","wording":"I should not have any rgaa accessibility issue"},{"key":"key.then.a11y.rgaa.defaultWithResult","description":"Check that the current page have the following [result](https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/) based on RGAA standard","wording":"I should have the following result based on the rgaa reference"},{"key":"key.then.a11y.rgaa.defaultWithResultContaining","description":"Check that the current page have the following partial [result](https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/) based on RGAA standard","wording":"I should have the following partial result based on the rgaa reference"}]`),Zq=[{key:"key.when.withinElement.roleAndName",description:"Selects the element whose [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and accessible [name](https://russmaxdesign.github.io/html-elements-names/) are specified <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it",wording:"within $indefiniteArticle $roleName named {string}",section:"general"},{key:"key.then.element.withRoleAndName",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/)",wording:"I should see $indefiniteArticle $roleName named {string}",section:"general"},{key:"key.then.element.withRoleAndNameFocused",description:"Checks that the Html element with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>",wording:"I should see $indefiniteArticle $roleName named {string} keyboard focused",section:"keyboard"},{key:"key.then.element.nextWithRoleAndNameFocused",description:"Move to the next html element that can be reached with Tab and checks that the Html element with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>",wording:"the next keyboard element focused should be $indefiniteArticle $roleName named {string}",section:"keyboard"},{key:"key.then.element.previousWithRoleAndNameFocused",description:"Move to the previous html element that can be reached with Tab and checks that the Html element with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>",wording:"the previous keyboard element focused should be $indefiniteArticle $roleName named {string}",section:"keyboard"},{key:"key.then.element.not.withRoleAndName",description:"Checks that an Html element does not exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/)",wording:"I should not see $indefiniteArticle $roleName named {string}",section:"general"},{key:"key.then.element.withRoleAndNameAndContent",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content",wording:"I should see $indefiniteArticle $roleName named {string} and containing {string}",section:"contains"},{key:"key.then.element.withRoleAndNameAndContentDisabled",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content, and with the disabled attribute set to true",wording:"I should see $indefiniteArticle $roleName named {string} and containing {string} disabled",section:"contains"},{key:"key.then.element.withRoleAndNameAndContentEnabled",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content, and with the disabled attribute set to false",wording:"I should see $indefiniteArticle $roleName named {string} and containing {string} enabled",section:"contains"},{key:"key.then.element.withRoleAndNameDisabled",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/), and with the disabled attribute set to true",wording:"I should see $indefiniteArticle $roleName named {string} disabled",section:"contains"},{key:"key.then.element.withRoleAndNameEnabled",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/), and with the disabled attribute set to false",wording:"I should see $indefiniteArticle $roleName named {string} enabled",section:"contains"},{key:"key.when.type",description:"Writes the sentence given as a parameter inside the specified field (useful for example to fill in a form field)",wording:"I type the sentence {string} in $definiteArticle $roleName named {string}",section:"type"},{key:"key.then.element.withRoleAndNameAndChecked",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) and is checked",wording:"I should see $indefiniteArticle $roleName named {string} checked",section:"checkable"},{key:"key.then.element.withRoleAndNameAndUnchecked",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) and is unchecked",wording:"I should see $indefiniteArticle $roleName named {string} unchecked",section:"checkable"},{key:"key.when.enter",description:"Writes the sentence given as a parameter inside the specified field (useful for example to fill in a form field)",wording:"I enter the value {string} in $definiteArticle $roleName named {string}",section:"type"},{key:"key.when.click",description:"Triggers a click on the element with role $roleId and the specified name",wording:"I click on $roleName named {string}",section:"click"}],eY={enriched:Zq};class no{constructor(){this.jsonBase=Yq,this.jsonEnriched=eY}async translate(e){var o,s;const n=_i(e),r=nC(e);this.selectedHtmlElem=e;let i={suggestion:void 0,sentences:[]};if(e.getAttribute("type")!=="hidden")if(n&&r){const c=e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e.value:e.getAttribute("value")??((s=(o=e.firstChild)==null?void 0:o.textContent)==null?void 0:s.trim());c?i=this.getSentenceFromAccessibleRoleAndNameAndContent(n,r,c):i=this.getSentenceFromAccessibleRoleAndName(n,r)}else i=this.getSentenceFromDomSelector(e),i.suggestion=new Jq;return i}static getSelector(e){const n=[];for(;e.nodeType===Node.ELEMENT_NODE;){let r=e.nodeName.toLowerCase();if(e.id){r+="#"+e.id,n.unshift(r);break}else if(e.getAttribute("data-testid")){r+=`[data-testid=${e.getAttribute("data-testid")}]`,n.unshift(r);break}else{let i=e.previousSibling,o=1;for(;i;)i.nodeType===Node.ELEMENT_NODE&&i.nodeName.toLowerCase()===r&&o++,i=i.previousSibling;(o>1||e.nextSibling)&&(r+=":nth-of-type("+o+")")}n.unshift(r),e=e.parentNode}return n.join(" > ")}initResponse(){return{suggestion:void 0,sentences:[]}}computeSentenceFromKeyRoleAndName(e,n,r){return this.jsonEnriched.enriched.filter(i=>i.key===e).map(i=>{const o=i.wording,s=Cd.filter(l=>l.id===n)[0];return o.replaceAll("(n)","").replaceAll("$roleName",(s==null?void 0:s.name)??n).replaceAll("$definiteArticle",s==null?void 0:s.getDefiniteArticle()).replaceAll("$indefiniteArticle",s==null?void 0:s.getIndefiniteArticle()).replaceAll("$namedAdjective",s==null?void 0:s.namedAdjective()).replaceAll("$ofDefiniteArticle",s==null?void 0:s.getOfDefiniteArticle()).replace("{string}",`"${r}"`)})[0]}computeSentenceFromKeyRoleNameAndContent(e,n,r,i){return this.jsonEnriched.enriched.filter(o=>o.key===e).map(o=>{const s=o.wording,l=Cd.filter(c=>c.id===n)[0];return s.replaceAll("(n)","").replaceAll("$roleName",(l==null?void 0:l.name)??n).replaceAll("$definiteArticle",l==null?void 0:l.getDefiniteArticle()).replaceAll("$indefiniteArticle",l==null?void 0:l.getIndefiniteArticle()).replaceAll("$namedAdjective",l==null?void 0:l.namedAdjective()).replaceAll("$ofDefiniteArticle",l==null?void 0:l.getOfDefiniteArticle()).replace("{string}",`"${r}"`).replace("{string}",`"${i}"`)})[0]}computeSentenceFromKeyAndSelector(e,n){return this.jsonBase.filter(r=>r.key===e).map(r=>r.wording.replace("{string}",`"${n}"`))[0]}getSentenceFromKey(e){return this.jsonBase.filter(n=>n.key===e)[0]}}var tk={root:"body",outlineStyle:"5px solid rgba(204, 146, 62, 0.3)",onClick:t=>console.log("Element was clicked:",no.getSelector(t))},tY=(t={})=>{const{root:e,excluded:n,outlineStyle:r}={...tk,...t};let i=t.onClick||tk.onClick,o=t.onMouseOver,s=t.onMouseOut,l,c,d;const f=w=>{w.style.outline=r,w.style.outlineOffset=`-${w.style.outlineWidth}`,d&&nk(d),d=nY(w);const B=nC(w),k=_i(w),M=[];let O;B&&k?(M.push("✅ Good"),O="good"):B||k?(M.push("⚠️ Warning"),O="warning"):(M.push("❌ Danger"),O="danger");const R=`<label><b>Selector: </b></label><span style="text-wrap: wrap">${no.getSelector(w)}</span>`,T=`<label><b>Tag name: </b></label><span>${w.tagName.toLowerCase()}</span>`,N=w.type?`<div><label><b>Type: </b></label><span>${w.type}</span></div>`:"";M.push(`<p><div>${T}</div><div>${N}</div><div>${R}</div></p>`),M.push(`<div><div><label><b>Name: </b></label><span>${B}</span></div><div><label><b>Role: </b></label><span>${k||""}</span></div></div>`),Kq(w,M.join("<hr style='opacity: 0.3' />"),O)},g=w=>{w&&(w.style.outline="none",d&&(nk(d),d=null)),dP()},p=w=>{if(c&&c.length&&c.some(B=>B===w.target||B.contains(w.target)))return!0};let A=w=>{p(w)||(l=w.target,o(w.target))},y=w=>{p(w)||s(w.target)};const C=w=>{if(!p(w))return w.preventDefault(),w.stopPropagation(),i(w.target),!1},b=w=>{if(!n.length)return[];const B=n.flatMap(k=>{if(typeof k=="string"||k instanceof String)return Array.from(w.querySelectorAll(k));if(k instanceof Element)return[k];if(k.length>0&&k[0]instanceof Element)return Array.from(k)});return Array.from(B).flat()};return{enable:w=>{const B=document.querySelector(e);B&&(n&&(c=b(B)),B.addEventListener("mouseover",A,!0),B.addEventListener("mouseout",y,!0),B.addEventListener("click",C,!0),w&&(i=w))},cancel:()=>{const w=document.querySelector(e);w&&(w.removeEventListener("mouseover",A,!0),w.removeEventListener("mouseout",y,!0),w.removeEventListener("click",C,!0),g(l))},removeHighlight:g,highlight:f}};function nY(t){const e=t.getBoundingClientRect(),n=document.createElement("div");return n.style.position="absolute",n.style.top=`${e.top+window.scrollY}px`,n.style.left=`${e.left+window.scrollX}px`,n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n.style.background="rgba(255, 0, 0, 0.05)",n.style.pointerEvents="none",n.style.zIndex="9999998",document.body.appendChild(n),n}function nk(t){t&&t.remove()}class rY{constructor(){this.TAGS_WITH_NATIVE_ACCESSIBILITY_DATA=["article","aside","button","details","dialog","fieldset","figure","form","footer","h1","h2","h3","h4","h5","h6","header","hr","img","input","label","li","main","menu","nav","ol","ul","option","progress","section","select","summary","table","textarea","tbody","thead","tfoot","td","th","tr"];const e=this.TAGS_WITH_NATIVE_ACCESSIBILITY_DATA.join(",");this.candidatesWithNativeAccessibleData=document.querySelectorAll(e);const n=`*${this.TAGS_WITH_NATIVE_ACCESSIBILITY_DATA.map(s=>`:not(${s})`).join("")}`,r=document.querySelectorAll(n),i=[...r].filter(s=>this.hasInformativeAttributes(s)),o=[...r].flatMap(s=>Array.from(s.children));this.candidatesWithCustomAccessibleData=[...i,...o]}getAvailableNodes(){return[...this.candidatesWithNativeAccessibleData,...this.candidatesWithCustomAccessibleData]}hasInformativeAttributes(e){const n=e.attributes;if(n)for(const r of n){const i=r.name.toLowerCase();if(i==="role"||i==="alt"||i==="title"||i==="tabindex"||i==="lang"||i==="scope"||i==="for"||i.startsWith("aria-")||i==="data-testid")return!0}return!1}}const Ho={width:4,borderColor:"orange"};class iY{constructor(e){this.onSelect=e}createInspector(e,n){this.inspector=tY({root:"body",outlineStyle:"2px solid red",onClick:r=>{this.onSelect(r),this.inspector.cancel()},onMouseOver:e,onMouseOut:n})}enableBasicHighlight(){this.createInspector(e=>this.inspector.highlight(e),e=>this.inspector.removeHighlight(e)),this.inspector.enable()}enableRefinedHighlight(){const n=new rY().getAvailableNodes();this.createInspector(r=>{n.includes(r)&&this.inspector.highlight(r)},r=>{n.includes(r)&&this.inspector.removeHighlight(r)}),this.inspector.enable()}cancel(){this.inspector.cancel()}}const Lg="http://www.w3.org/2000/svg",fP={radius:12,linkWith:4};function oY(t){const e=t?0:iP;return`
|
|
331
|
+
*/var zJ=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ay=zJ.join(","),eP=typeof Element>"u",yd=eP?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ng=!eP&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},$g=function t(e,n){var r;n===void 0&&(n=!0);var i=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),o=i===""||i==="true",s=o||n&&e&&t(e.parentNode);return s},HJ=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},VJ=function(e,n,r){if($g(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Ay));return n&&yd.call(e,Ay)&&i.unshift(e),i=i.filter(r),i},WJ=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if(!$g(s,!1))if(s.tagName==="SLOT"){var l=s.assignedElements(),c=l.length?l:s.children,d=t(c,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:s,candidates:d})}else{var f=yd.call(s,Ay);f&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var g=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),p=!$g(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(g&&p){var A=t(g===!0?s.children:g.children,!0,r);r.flatten?i.push.apply(i,A):i.push({scopeParent:s,candidates:A})}else o.unshift.apply(o,s.children)}}return i},tP=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},nP=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||HJ(e))&&!tP(e)?0:e.tabIndex},_J=function(e,n){var r=nP(e);return r<0&&n&&!tP(e)?0:r},UJ=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},rP=function(e){return e.tagName==="INPUT"},GJ=function(e){return rP(e)&&e.type==="hidden"},KJ=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},XJ=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},JJ=function(e){if(!e.name)return!0;var n=e.form||Ng(e),r=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var o=XJ(i,e.form);return!o||o===e},qJ=function(e){return rP(e)&&e.type==="radio"},YJ=function(e){return qJ(e)&&!JJ(e)},ZJ=function(e){var n,r=e&&Ng(e),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==e){var s,l,c;for(o=!!((s=i)!==null&&s!==void 0&&(l=s.ownerDocument)!==null&&l!==void 0&&l.contains(i)||e!=null&&(c=e.ownerDocument)!==null&&c!==void 0&&c.contains(e));!o&&i;){var d,f,g;r=Ng(i),i=(d=r)===null||d===void 0?void 0:d.host,o=!!((f=i)!==null&&f!==void 0&&(g=f.ownerDocument)!==null&&g!==void 0&&g.contains(i))}}return o},qI=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},eq=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var o=yd.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(yd.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var l=e;e;){var c=e.parentElement,d=Ng(e);if(c&&!c.shadowRoot&&i(c)===!0)return qI(e);e.assignedSlot?e=e.assignedSlot:!c&&d!==e.ownerDocument?e=d.host:e=c}e=l}if(ZJ(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return qI(e);return!1},tq=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return yd.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},nq=function(e,n){return!(n.disabled||$g(n)||GJ(n)||eq(n,e)||KJ(n)||tq(n))},YI=function(e,n){return!(YJ(n)||nP(n)<0||!nq(e,n))},rq=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},iq=function t(e){var n=[],r=[];return e.forEach(function(i,o){var s=!!i.scopeParent,l=s?i.scopeParent:i,c=_J(l,s),d=s?t(i.candidates):l;c===0?s?n.push.apply(n,d):n.push(l):r.push({documentOrder:o,tabIndex:c,item:i,isScope:s,content:d})}),r.sort(UJ).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},oq=function(e,n){n=n||{};var r;return n.getShadowRoot?r=WJ([e],n.includeContainer,{filter:YI.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:rq}):r=VJ(e,n.includeContainer,YI.bind(null,n)),iq(r)};const iP=60;var Kt=(t=>(t.HIDE="hide",t.WITH_RESULT="withResult",t.WITHOUT_RESULT="withoutResult",t.SETTINGS="settings",t))(Kt||{}),bt=(t=>(t.NONE="No action",t.WITHIN="Within",t.EXPECT="Expect",t.CLICK="Click",t.TYPE="Type",t.KEYBOARD_GLOBAL_NAVIGATION="Keyboard Navigation",t.FORM_COMPLETION_MOUSE="Form Mouse Completion",t.TABLE_AND_GRID_EXPECT="Table and Grid Expect",t.FORM_COMPLETION_KEYBOARD="Form Keyboard Completion",t.RECORD="Record",t))(bt||{}),ka=(t=>(t.NONE="No navigation",t.CURRENT_NAVIGATION="currentNavigation",t.EXPECTED_NAVIGATION="expectedNavigation",t))(ka||{}),Tr=(t=>(t.CURRENT_NAVIGATION="keyboard-layer-current-navigation",t.EXPECTED_NAVIGATION="keyboard-layer-expected-navigation",t.FORM_COMPLETION="form-layer-completion",t.ARRAY_COMPLETION="array-layer-completion",t))(Tr||{});const Uh="uuv-is-disabled";var sq=Object.prototype.toString;function aq(t){return typeof t=="function"||sq.call(t)==="[object Function]"}function lq(t){var e=Number(t);return isNaN(e)?0:e===0||!isFinite(e)?e:(e>0?1:-1)*Math.floor(Math.abs(e))}var cq=Math.pow(2,53)-1;function uq(t){var e=lq(t);return Math.min(Math.max(e,0),cq)}function go(t,e){var n=Array,r=Object(t);if(t==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");for(var i=uq(r.length),o=aq(n)?Object(new n(i)):new Array(i),s=0,l;s<i;)l=r[s],o[s]=l,s+=1;return o.length=i,o}function bd(t){"@babel/helpers - typeof";return bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bd(t)}function dq(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fq(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,oP(r.key),r)}}function hq(t,e,n){return e&&fq(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function gq(t,e,n){return e=oP(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oP(t){var e=mq(t,"string");return bd(e)=="symbol"?e:e+""}function mq(t,e){if(bd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(bd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var pq=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];dq(this,t),gq(this,"items",void 0),this.items=e}return hq(t,[{key:"add",value:function(n){return this.has(n)===!1&&this.items.push(n),this}},{key:"clear",value:function(){this.items=[]}},{key:"delete",value:function(n){var r=this.items.length;return this.items=this.items.filter(function(i){return i!==n}),r!==this.items.length}},{key:"forEach",value:function(n){var r=this;this.items.forEach(function(i){n(i,i,r)})}},{key:"has",value:function(n){return this.items.indexOf(n)!==-1}},{key:"size",get:function(){return this.items.length}}])}();const vq=typeof Set>"u"?Set:pq;function $r(t){var e;return(e=t.localName)!==null&&e!==void 0?e:t.tagName.toLowerCase()}var Aq={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",form:"form",footer:"contentinfo",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",header:"banner",hr:"separator",html:"document",legend:"legend",li:"listitem",math:"math",main:"main",menu:"list",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",progress:"progressbar",section:"region",summary:"button",table:"table",tbody:"rowgroup",textarea:"textbox",tfoot:"rowgroup",td:"cell",th:"columnheader",thead:"rowgroup",tr:"row",ul:"list"},yq={caption:new Set(["aria-label","aria-labelledby"]),code:new Set(["aria-label","aria-labelledby"]),deletion:new Set(["aria-label","aria-labelledby"]),emphasis:new Set(["aria-label","aria-labelledby"]),generic:new Set(["aria-label","aria-labelledby","aria-roledescription"]),insertion:new Set(["aria-label","aria-labelledby"]),none:new Set(["aria-label","aria-labelledby"]),paragraph:new Set(["aria-label","aria-labelledby"]),presentation:new Set(["aria-label","aria-labelledby"]),strong:new Set(["aria-label","aria-labelledby"]),subscript:new Set(["aria-label","aria-labelledby"]),superscript:new Set(["aria-label","aria-labelledby"])};function bq(t,e){return["aria-atomic","aria-busy","aria-controls","aria-current","aria-description","aria-describedby","aria-details","aria-dropeffect","aria-flowto","aria-grabbed","aria-hidden","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"].some(function(n){var r;return t.hasAttribute(n)&&!((r=yq[e])!==null&&r!==void 0&&r.has(n))})}function sP(t,e){return bq(t,e)}function _i(t){var e=Sq(t);if(e===null||yy.indexOf(e)!==-1){var n=Cq(t);if(yy.indexOf(e||"")===-1||sP(t,n||""))return n}return e}function Cq(t){var e=Aq[$r(t)];if(e!==void 0)return e;switch($r(t)){case"a":case"area":case"link":if(t.hasAttribute("href"))return"link";break;case"img":return t.getAttribute("alt")===""&&!sP(t,"img")?"presentation":"img";case"input":{var n=t,r=n.type;switch(r){case"button":case"image":case"reset":case"submit":return"button";case"checkbox":case"radio":return r;case"range":return"slider";case"email":case"tel":case"text":case"url":return t.hasAttribute("list")?"combobox":"textbox";case"search":return t.hasAttribute("list")?"combobox":"searchbox";case"number":return"spinbutton";default:return null}}case"select":return t.hasAttribute("multiple")||t.size>1?"listbox":"combobox"}return null}function Sq(t){var e=t.getAttribute("role");if(e!==null){var n=e.trim().split(" ")[0];if(n.length>0)return n}return null}var yy=["presentation","none"];function An(t){return t!==null&&t.nodeType===t.ELEMENT_NODE}function aP(t){return An(t)&&$r(t)==="caption"}function Gh(t){return An(t)&&$r(t)==="input"}function wq(t){return An(t)&&$r(t)==="optgroup"}function xq(t){return An(t)&&$r(t)==="select"}function Eq(t){return An(t)&&$r(t)==="table"}function Iq(t){return An(t)&&$r(t)==="textarea"}function kq(t){var e=t.ownerDocument===null?t:t.ownerDocument,n=e.defaultView;if(n===null)throw new TypeError("no window available");return n}function Bq(t){return An(t)&&$r(t)==="fieldset"}function Mq(t){return An(t)&&$r(t)==="legend"}function Oq(t){return An(t)&&$r(t)==="slot"}function Tq(t){return An(t)&&t.ownerSVGElement!==void 0}function Rq(t){return An(t)&&$r(t)==="svg"}function Pq(t){return Tq(t)&&$r(t)==="title"}function by(t,e){if(An(t)&&t.hasAttribute(e)){var n=t.getAttribute(e).split(" "),r=t.getRootNode?t.getRootNode():t.ownerDocument;return n.map(function(i){return r.getElementById(i)}).filter(function(i){return i!==null})}return[]}function fs(t,e){return An(t)?e.indexOf(_i(t))!==-1:!1}function Nq(t){return t.trim().replace(/\s\s+/g," ")}function $q(t,e){if(!An(t))return!1;if(t.hasAttribute("hidden")||t.getAttribute("aria-hidden")==="true")return!0;var n=e(t);return n.getPropertyValue("display")==="none"||n.getPropertyValue("visibility")==="hidden"}function Lq(t){return fs(t,["button","combobox","listbox","textbox"])||lP(t,"range")}function lP(t,e){if(!An(t))return!1;switch(e){case"range":return fs(t,["meter","progressbar","scrollbar","slider","spinbutton"]);default:throw new TypeError("No knowledge about abstract role '".concat(e,"'. This is likely a bug :("))}}function ZI(t,e){var n=go(t.querySelectorAll(e));return by(t,"aria-owns").forEach(function(r){n.push.apply(n,go(r.querySelectorAll(e)))}),n}function Dq(t){return xq(t)?t.selectedOptions||ZI(t,"[selected]"):ZI(t,'[aria-selected="true"]')}function Fq(t){return fs(t,yy)}function jq(t){return aP(t)}function Qq(t){return fs(t,["button","cell","checkbox","columnheader","gridcell","heading","label","legend","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"])}function zq(t){return!1}function Hq(t){return Gh(t)||Iq(t)?t.value:t.textContent||""}function ek(t){var e=t.getPropertyValue("content");return/^["'].*["']$/.test(e)?e.slice(1,-1):""}function cP(t){var e=$r(t);return e==="button"||e==="input"&&t.getAttribute("type")!=="hidden"||e==="meter"||e==="output"||e==="progress"||e==="select"||e==="textarea"}function uP(t){if(cP(t))return t;var e=null;return t.childNodes.forEach(function(n){if(e===null&&An(n)){var r=uP(n);r!==null&&(e=r)}}),e}function Vq(t){if(t.control!==void 0)return t.control;var e=t.getAttribute("for");return e!==null?t.ownerDocument.getElementById(e):uP(t)}function Wq(t){var e=t.labels;if(e===null)return e;if(e!==void 0)return go(e);if(!cP(t))return null;var n=t.ownerDocument;return go(n.querySelectorAll("label")).filter(function(r){return Vq(r)===t})}function _q(t){var e=t.assignedNodes();return e.length===0?go(t.childNodes):e}function Uq(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new vq,r=typeof Map>"u"?void 0:new Map,i=kq(t),o=e.compute,s=o===void 0?"name":o,l=e.computedStyleSupportsPseudoElements,c=l===void 0?e.getComputedStyle!==void 0:l,d=e.getComputedStyle,f=d===void 0?i.getComputedStyle.bind(i):d,g=e.hidden,p=g===void 0?!1:g,A=function(B,k){if(k!==void 0)throw new Error("use uncachedGetComputedStyle directly for pseudo elements");if(r===void 0)return f(B);var M=r.get(B);if(M)return M;var O=f(B,k);return r.set(B,O),O};function y(w,B){var k="";if(An(w)&&c){var M=f(w,"::before"),O=ek(M);k="".concat(O," ").concat(k)}var R=Oq(w)?_q(w):go(w.childNodes).concat(by(w,"aria-owns"));if(R.forEach(function($){var L=E($,{isEmbeddedInLabel:B.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),F=An($)?A($).getPropertyValue("display"):"inline",D=F!=="inline"?" ":"";k+="".concat(D).concat(L).concat(D)}),An(w)&&c){var T=f(w,"::after"),N=ek(T);k="".concat(k," ").concat(N)}return k.trim()}function C(w,B){var k=w.getAttributeNode(B);return k!==null&&!n.has(k)&&k.value.trim()!==""?(n.add(k),k.value):null}function b(w){return An(w)?C(w,"title"):null}function x(w){if(!An(w))return null;if(Bq(w)){n.add(w);for(var B=go(w.childNodes),k=0;k<B.length;k+=1){var M=B[k];if(Mq(M))return E(M,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(Eq(w)){n.add(w);for(var O=go(w.childNodes),R=0;R<O.length;R+=1){var T=O[R];if(aP(T))return E(T,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(Rq(w)){n.add(w);for(var N=go(w.childNodes),$=0;$<N.length;$+=1){var L=N[$];if(Pq(L))return L.textContent}return null}else if($r(w)==="img"||$r(w)==="area"){var F=C(w,"alt");if(F!==null)return F}else if(wq(w)){var D=C(w,"label");if(D!==null)return D}if(Gh(w)&&(w.type==="button"||w.type==="submit"||w.type==="reset")){var U=C(w,"value");if(U!==null)return U;if(w.type==="submit")return"Submit";if(w.type==="reset")return"Reset"}var z=Wq(w);if(z!==null&&z.length!==0)return n.add(w),go(z).map(function(G){return E(G,{isEmbeddedInLabel:!0,isReferenced:!1,recursion:!0})}).filter(function(G){return G.length>0}).join(" ");if(Gh(w)&&w.type==="image"){var H=C(w,"alt");if(H!==null)return H;var Q=C(w,"title");return Q!==null?Q:"Submit Query"}if(fs(w,["button"])){var W=y(w,{isEmbeddedInLabel:!1});if(W!=="")return W}return null}function E(w,B){if(n.has(w))return"";if(!p&&$q(w,A)&&!B.isReferenced)return n.add(w),"";var k=An(w)?w.getAttributeNode("aria-labelledby"):null,M=k!==null&&!n.has(k)?by(w,"aria-labelledby"):[];if(s==="name"&&!B.isReferenced&&M.length>0)return n.add(k),M.map(function(F){return E(F,{isEmbeddedInLabel:B.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(" ");var O=B.recursion&&Lq(w)&&s==="name";if(!O){var R=(An(w)&&w.getAttribute("aria-label")||"").trim();if(R!==""&&s==="name")return n.add(w),R;if(!Fq(w)){var T=x(w);if(T!==null)return n.add(w),T}}if(fs(w,["menu"]))return n.add(w),"";if(O||B.isEmbeddedInLabel||B.isReferenced){if(fs(w,["combobox","listbox"])){n.add(w);var N=Dq(w);return N.length===0?Gh(w)?w.value:"":go(N).map(function(F){return E(F,{isEmbeddedInLabel:B.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(" ")}if(lP(w,"range"))return n.add(w),w.hasAttribute("aria-valuetext")?w.getAttribute("aria-valuetext"):w.hasAttribute("aria-valuenow")?w.getAttribute("aria-valuenow"):w.getAttribute("value")||"";if(fs(w,["textbox"]))return n.add(w),Hq(w)}if(Qq(w)||An(w)&&B.isReferenced||jq(w)||zq()){var $=y(w,{isEmbeddedInLabel:B.isEmbeddedInLabel});if($!=="")return n.add(w),$}if(w.nodeType===w.TEXT_NODE)return n.add(w),w.textContent||"";if(B.recursion)return n.add(w),y(w,{isEmbeddedInLabel:B.isEmbeddedInLabel});var L=b(w);return L!==null?(n.add(w),L):(n.add(w),"")}return Nq(E(t,{isEmbeddedInLabel:!1,isReferenced:s==="description",recursion:!1}))}function Gq(t){return fs(t,["caption","code","deletion","emphasis","generic","insertion","none","paragraph","presentation","strong","subscript","superscript"])}function nC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Gq(t)?"":Uq(t,e)}let zt=null;function Kq(t,e,n){switch(dP(),zt=document.createElement("div"),zt.className="tooltip-highlight",zt.innerHTML=e,zt.style.position="absolute",zt.style.border="2px solid black",n){case"good":zt.style.background="rgba(23,62,23,0.85)",zt.style.border="2px solid rgb(23,62,23)";break;case"warning":zt.style.background="rgba(87,65,18,0.85)",zt.style.border="2px solid rgb(87,65,18)";break;case"danger":zt.style.background="rgba(78,11,11,0.85)",zt.style.border="2px solid rgb(78,11,11)";break;default:zt.style.background="rgba(0,0,0, 0.85)",zt.style.border="2px solid black"}zt.style.color="#fff",zt.style.padding="6px 10px",zt.style.borderRadius="4px",zt.style.fontSize="14px",zt.style.zIndex="9999999",zt.style.whiteSpace="nowrap",zt.style.boxShadow="0 0 6px rgba(0,0,0,0.2)",zt.style.pointerEvents="none",zt.style.transition="opacity 0.2s",zt.style.width="300px",zt.style.maxWidth="300px",document.body.appendChild(zt),Xq(t)}function dP(){zt&&(zt.remove(),zt=null)}function Xq(t){const e=t.getBoundingClientRect(),n=zt.getBoundingClientRect();let r=e.top+window.scrollY-n.height,i=e.left+window.scrollX+(e.width-n.width)/2;r<window.scrollY&&(r=e.bottom+window.scrollY),i<8&&(i=8);const o=window.scrollX+document.documentElement.clientWidth-n.width;i>o&&(i=o),zt.style.left=`${i}px`,zt.style.top=`${r}px`}class Jq{constructor(e="",n="",r="",i=[]){this.accessibleAttribute=e,this.accessibleValue=n,this.code=r,this.sentenceAfterCorrection=i}}var Kr=(t=>(t.WHEN="When ",t.THEN="Then ",t.GIVEN="Given ",t.AND="And ",t))(Kr||{});class qq{constructor(){js(this,"id");js(this,"name");js(this,"shouldGenerateClickSentence");js(this,"shouldGenerateTypeSentence");js(this,"shouldGenerateContainsSentence");js(this,"shouldGenerateKeyboardSentence",!1);js(this,"shouldGenerateCheckedSentence",!1)}}class rC extends qq{constructor(e,n,r="the",i="a",o=!1,s=!0,l=!0,c=!1,d=!1){super(),this.id=e,this.name=n,this.definiteArticle=r,this.indefiniteArticle=i,this.shouldGenerateClickSentence=o,this.shouldGenerateTypeSentence=s,this.shouldGenerateContainsSentence=l,this.shouldGenerateKeyboardSentence=c,this.shouldGenerateCheckedSentence=d}static from(e){return new rC(e.id,e.name,e.definiteArticle,e.indefiniteArticle,e.shouldGenerateClickSentence,e.shouldGenerateTypeSentence,e.shouldGenerateContainsSentence,e.shouldGenerateKeyboardSentence,e.shouldGenerateCheckedSentence)}getDefiniteArticle(){return this.definiteArticle.toString()}getIndefiniteArticle(){return this.indefiniteArticle.toString()}getOfDefiniteArticle(){return`of ${this.definiteArticle}`}namedAdjective(){return"named"}}const Cd=[{id:"alert",name:"alert",indefiniteArticle:"an"},{id:"alertdialog",name:"alert dialog",indefiniteArticle:"an"},{id:"application",name:"application",indefiniteArticle:"an"},{id:"article",name:"article",indefiniteArticle:"an"},{id:"banner",name:"banner"},{id:"button",name:"button",shouldGenerateKeyboardSentence:!0,shouldGenerateClickSentence:!0},{id:"cell",name:"cell"},{id:"checkbox",name:"checkbox",shouldGenerateKeyboardSentence:!0,shouldGenerateCheckedSentence:!0,shouldGenerateClickSentence:!0},{id:"columnheader",name:"column header"},{id:"combobox",name:"combo box",shouldGenerateTypeSentence:!1,shouldGenerateKeyboardSentence:!0,shouldGenerateClickSentence:!0},{id:"command",name:"command"},{id:"comment",name:"comment"},{id:"complementary",name:"complementary"},{id:"composite",name:"composite"},{id:"contentinfo",name:"contentinfo"},{id:"definition",name:"definition"},{id:"dialog",name:"dialog"},{id:"directory",name:"directory"},{id:"document",name:"document"},{id:"feed",name:"flow"},{id:"figure",name:"figure"},{id:"form",name:"form"},{id:"generic",name:"generic"},{id:"grid",name:"grid"},{id:"gridcell",name:"grid cell"},{id:"group",name:"group"},{id:"heading",name:"title"},{id:"img",name:"image",indefiniteArticle:"an"},{id:"landmark",name:"landmark"},{id:"link",name:"link",shouldGenerateKeyboardSentence:!0,shouldGenerateClickSentence:!0},{id:"list",name:"list",shouldGenerateContainsSentence:!1,shouldGenerateTypeSentence:!1},{id:"listbox",name:"list box",shouldGenerateKeyboardSentence:!0},{id:"listitem",name:"list item",shouldGenerateKeyboardSentence:!0,shouldGenerateClickSentence:!0},{id:"log",name:"log"},{id:"main",name:"main"},{id:"mark",name:"mark"},{id:"math",name:"math"},{id:"menu",name:"menu"},{id:"menubar",name:"menubar"},{id:"menuitem",name:"menuitem",shouldGenerateKeyboardSentence:!0,shouldGenerateClickSentence:!0},{id:"menuitemcheckbox",name:"menuitemcheckbox",shouldGenerateKeyboardSentence:!0},{id:"menuitemradio",name:"menuitemradio",shouldGenerateKeyboardSentence:!0,shouldGenerateCheckedSentence:!0},{id:"meter",name:"counter"},{id:"navigation",name:"navigation"},{id:"none",name:"no"},{id:"note",name:"note"},{id:"option",name:"option",indefiniteArticle:"an",shouldGenerateKeyboardSentence:!0,shouldGenerateClickSentence:!0},{id:"presentation",name:"presentation"},{id:"progressbar",name:"progress bar"},{id:"radio",name:"radio",shouldGenerateKeyboardSentence:!0,shouldGenerateCheckedSentence:!0,shouldGenerateClickSentence:!0},{id:"radiogroup",name:"radio group"},{id:"range",name:"range"},{id:"region",name:"region"},{id:"roletype",name:"role type"},{id:"row",name:"row"},{id:"rowgroup",name:"row group"},{id:"rowheader",name:"row header"},{id:"scrollbar",name:"scroll bar"},{id:"search",name:"search",shouldGenerateKeyboardSentence:!0},{id:"searchbox",name:"search box",shouldGenerateKeyboardSentence:!0},{id:"section",name:"section"},{id:"sectionhead",name:"section header"},{id:"select",name:"select",shouldGenerateKeyboardSentence:!0},{id:"separator",name:"separator"},{id:"slider",name:"slider",shouldGenerateKeyboardSentence:!0},{id:"spinbutton",name:"spin button",shouldGenerateKeyboardSentence:!0},{id:"status",name:"status"},{id:"structure",name:"structure"},{id:"suggestion",name:"suggestion"},{id:"switch",name:"switch",shouldGenerateKeyboardSentence:!0},{id:"tab",name:"tab",shouldGenerateKeyboardSentence:!0},{id:"table",name:"table"},{id:"tablist",name:"tablist"},{id:"tabpanel",name:"tabpanel"},{id:"term",name:"term"},{id:"textbox",name:"text box",shouldGenerateKeyboardSentence:!0},{id:"timer",name:"timer"},{id:"toolbar",name:"toolbar"},{id:"tooltip",name:"tooltip"},{id:"tree",name:"tree"},{id:"treegrid",name:"tree grid"},{id:"treeitem",name:"tree item"},{id:"widget",name:"widget",shouldGenerateKeyboardSentence:!0},{id:"window",name:"window"}].map(t=>rC.from(t)),Yq=JSON.parse(`[{"key":"key.when.click.withContext","description":"Triggers a click on the selected element.<br/>Make sure you've selected an element beforehand with the <strong>within...</strong> phrases.","wording":"I click"},{"key":"key.when.click.withRole","description":"Triggers a click on the element with given role and specific name","wording":"I click on element with role {string} and name {string}"},{"key":"key.when.headers.forUriAndMethod","description":"Sets one or more headers to the indicated http request and only for the Http method (GET / POST / etc...) passed as a argument.<i> If you use Playwright as execution engine, <b>method</b> isn't used.</i>","wording":"I set header(s) for uri {string} and method {string}"},{"key":"key.when.headers.forUri","description":"Sets one or more headers to the indicated http request","wording":"I set header(s) for uri {string}"},{"key":"key.when.resetContext","description":"Deletes selected element and timeout","wording":"I reset context"},{"key":"key.when.timeout","description":"Sets the timeout value (in millisecond) for finding element in the DOM <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it","wording":"I set timeout with value {int}"},{"key":"key.when.type.withContext","description":"Writes the sentence passed as a parameter (useful for example to fill in a form field).<br/>Make sure you've selected an element beforehand with the <strong>within...</strong> phrases.","wording":"I type the sentence {string}"},{"key":"key.when.enter.withContext","description":"Writes the sentence passed as a parameter (useful for example to fill in a form field).<br/>Make sure you've selected an element beforehand with the <strong>within...</strong> phrases.","wording":"I enter the value {string}"},{"key":"key.when.select.withContext","description":"Select the combo box option passed as a parameter (useful for example to fill in a combobox form field).<br/>Make sure you've selected a combo box element beforehand with the <strong>within a combo box named 'yourComboboxNamee'</strong> phrases.","wording":"I select the value {string}"},{"key":"key.when.keyboard.press","description":"Press specified key: <table><thead><tr><th>Key</th><th>Description</th></tr></thead><tbody><tr><td>{tab}</td><td>Tabulation</td></tr><tr><td>{reverseTab}</td><td>Reverse tabulation</td></tr><tr><td>{down}</td><td>Arrow Down</td></tr><tr><td>{right}</td><td>Arrow Right</td></tr><tr><td>{left}</td><td>Arrow Left</td></tr><tr><td>{up}</td><td>Arrow Up</td></tr></tbody></table><br/>Make sure you've selected an element beforehand with the <strong>within...</strong> phrases.","wording":"I press {string}"},{"key":"key.when.keyboard.multiplePress","description":"Press specified key multiple times using | as: num|{key}","wording":"I press {int} times on {string}"},{"key":"key.when.keyboard.nextElement","description":"Move to the next html element that can be reached with Tab<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"I go to next keyboard element"},{"key":"key.when.keyboard.previousElement","description":"Move to the previous html element that can be reached with back Tab<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"I go to previous keyboard element"},{"key":"key.when.visit","description":"Navigate to the Uri passed as a argument (full url consisting of the BASE_URL + Uri) or navigate to Url if begin with http:// or https://","wording":"I visit path {string}"},{"key":"key.when.withinElement.ariaLabel","description":"Selects the element whose aria-label is specified <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it","wording":"within the element with aria-label {string}"},{"key":"key.when.withinElement.selector","description":"Selects the element whose selector is specified <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it","wording":"within the element with selector {string}"},{"key":"key.when.withinElement.roleAndName","description":"Selects the element whose [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and accessible [name](https://russmaxdesign.github.io/html-elements-names/) are specified <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it","wording":"within the element with role {string} and name {string}"},{"key":"key.when.withinElement.testId","description":"Selects the element whose data-testId attribute is specified <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it","wording":"within the element with testId {string}"},{"key":"key.when.mock.withBody","description":"Mock a named API response with body. <i>If you use Playwright as runtime engine, <b>request</b> and <b>named</b> are unused.</i>","wording":"I mock a request {} on url {string} named {string} with content {}"},{"key":"key.when.mock.withFixture","description":"Mock a named API response with file's extension .json, .js, .coffee, .html, .txt, .csv, .png, .jpg, .jpeg, .gif, .tif, .tiff, .zip","wording":"I mock a request {} on url {string} named {string} with fixture {}"},{"key":"key.when.mock.withStatusCode","description":"Mock a named API response with status code","wording":"I mock a request {} on url {string} named {string} with status code {int}"},{"key":"key.given.viewport.preset","description":"Sets the viewport dimensions with one of the presets defined by your runtime engine as Cypress: [Link](https://docs.cypress.io/api/commands/viewport#Arguments) or Playwright: [Link](https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json)","wording":"I set viewport to preset {string}"},{"key":"key.given.viewport.withWidthAndHeight","description":"Sets the viewport dimensions to the specified width and length","wording":"I set viewport with width {int} and height {int}"},{"key":"key.given.keyboard.startNavigationFromTheTop","description":"Start a keyboard navigation session from the top of the page<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"I start a keyboard navigation from the top of the page"},{"key":"key.then.page.withTitle","description":"Checks the current html page have the specified title","wording":"I should see the page title {string}"},{"key":"key.then.title.withNameAndLevel","description":"Checks that an Html element exists with [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) \`heading\`, the specified [name](https://russmaxdesign.github.io/html-elements-names/) and title level","wording":"I should see a title named {string} with level {int}"},{"key":"key.then.attributes.withValues","description":"Checks Html attributes of the selected element","wording":"I should see these attributes with values"},{"key":"key.then.element.withAriaLabelAndContent","description":"Checks that an Html element exists with the specified aria-label attribute and content","wording":"I should see an element with aria-label {string} and content {string}"},{"key":"key.then.element.withAriaLabel","description":"Checks that an Html element exists with the specified aria-label attribute","wording":"I should see an element with aria-label {string}"},{"key":"key.then.element.withContent","description":"Checks that an Html element exists with the specified content","wording":"I should see an element with content {string}"},{"key":"key.then.element.withSelector","description":"Checks that an Html element exists with the specified selector","wording":"I should see an element with selector {string}"},{"key":"key.then.element.withRoleAndNameAndContentDisabled","description":"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content, and with the disabled attribute set to true","wording":"I should see an element with role {string} and name {string} and content {string} disabled"},{"key":"key.then.element.withRoleAndNameAndContentEnabled","description":"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content, and with the disabled attribute set to false","wording":"I should see an element with role {string} and name {string} and content {string} enabled"},{"key":"key.then.element.withRoleAndNameAndContent","description":"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content","wording":"I should see an element with role {string} and name {string} and content {string}"},{"key":"key.then.element.withSelectorFocused","description":"Checks that the Html element with the specified selector is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"the element with selector {string} should be keyboard focused"},{"key":"key.then.element.withRoleAndNameFocused","description":"Checks that the Html element with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"the element with role {string} and name {string} should be keyboard focused"},{"key":"key.then.element.withRoleAndName","description":"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/)","wording":"I should see an element with role {string} and name {string}"},{"key":"key.then.element.withTestId","description":"Checks that an Html element exists with the specified data-testid attribute","wording":"I should see an element with testId {string}"},{"key":"key.then.list.withNameAndContent","description":"Checks that there is a list with the specified [name](https://russmaxdesign.github.io/html-elements-names/) containing list items.<br/> <u>Example</u>\\\\n\`\`\`gherkin\\\\nThen I should see a list named \\"test-list\\" and containing\\\\n| First element |\\\\n| Second element |\\\\n| Third element |\\\\n\`\`\`","wording":"I should see a list named {string} and containing"},{"key":"key.then.grid.withNameAndContent","description":"Checks that there is a grid with the specified [name](https://russmaxdesign.github.io/html-elements-names/) containing list items.<br/> <u>Example</u>\\\\n\`\`\`gherkin\\\\nWhen I visit path \\"https://e2e-test-quest.github.io/simple-webapp/grid.html\\"\\\\nThen I should see a grid named \\"HTML Grid Example\\" and containing\\\\n| Make | Model | Price |\\\\n| ------------ | ------- | ------ |\\\\n| Toyota | Celica | 35000 |\\\\n| Ford | Mondeo | 32000 |\\\\n| Porsche | Boxster | 72000 |\\\\n| BMW | M50 | 60000 |\\\\n| Aston Martin | DBX | 190000 |\\\\n\`\`\`","wording":"I should see a grid named {string} and containing"},{"key":"key.then.treegrid.withNameAndContent","description":"Checks that there is a treegrid with the specified [name](https://russmaxdesign.github.io/html-elements-names/) containing list items.<br/> <u>Example</u>\\\\n\`\`\`gherkin\\\\nWhen I visit path \\"https://e2e-test-quest.github.io/simple-webapp/treegrid.html\\"\\\\nThen I should see a treegrid named \\"HTML Treegrid Example\\" and containing\\\\n| Make | Model | Price |\\\\n| ------------ | ------- | ------ |\\\\n| Toyota | Celica | 35000 |\\\\n| Ford | Mondeo | 32000 |\\\\n| Porsche | Boxster | 72000 |\\\\n| BMW | M50 | 60000 |\\\\n| Aston Martin | DBX | 190000 |\\\\n\`\`\`","wording":"I should see a treegrid named {string} and containing"},{"key":"key.then.table.withNameAndContent","description":"Checks that there is a table with the specified [name](https://russmaxdesign.github.io/html-elements-names/) containing list items.<br/> <u>Example</u>\\\\n\`\`\`gherkin\\\\nWhen I visit path \\"https://e2e-test-quest.github.io/simple-webapp/table.html\\"\\\\nThen I should see a table named \\"test-list\\" and containing\\\\n| Company | Contact | Country |\\\\n| ----------------------------- | ---------------- | ------- |\\\\n| Alfreds Futterkiste | Maria Anders | Germany |\\\\n| Centro comercial Moctezuma | Francisco Chang | Mexico |\\\\n| Ernst Handel | Roland Mendel | Austria |\\\\n| Island Trading | Helen Bennett | UK |\\\\n| Laughing Bacchus Winecellars | Yoshi Tannamuri | Canada |\\\\n| Magazzini Alimentari Riuniti | Giovanni Rovelli | Italy |\\\\n\`\`\`","wording":"I should see a table named {string} and containing"},{"key":"key.then.element.not.withContent","description":"Checks that an Html element does not exists with the specified content","wording":"I should not see an element with content {string}"},{"key":"key.then.element.not.withTestId","description":"Checks that an Html element does not exists with the specified data-testid attribute","wording":"I should not see an element with testId {string}"},{"key":"key.then.element.not.withRoleAndName","description":"Checks that an Html element does not exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/)","wording":"I should not see an element with role {string} and name {string}"},{"key":"key.then.element.not.withAriaLabel","description":"Checks that an Html element does not exists with the specified aria-label attribute","wording":"I should not see an element with aria-label {string}"},{"key":"key.then.element.nextWithRoleAndNameFocused","description":"Move to the next html element that can be reached with Tab and checks that the Html element with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"the next keyboard element focused should have name {string} and role {string}","section":"keyboard"},{"key":"key.then.element.previousWithRoleAndNameFocused","description":"Move to the previous html element that can be reached with Tab and checks that the Html element with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>","wording":"the previous keyboard element focused should have name {string} and role {string}","section":"keyboard"},{"key":"key.then.wait.mock","description":"Wait that a named mock has been consumed until timeout","wording":"I should consume a mock named {string}"},{"key":"key.then.wait.milliSeconds","description":"Wait milliseconds. <b>Warning:</b> use this sentence <b>in production</b> can make your <b>test flaky</b>.","wording":"I wait {int} ms"},{"key":"key.then.a11y.axecore.default","description":"Check that the current page have no accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md)","wording":"I should not have any axe-core accessibility issue"},{"key":"key.then.a11y.axecore.withFixtureContextAndFixtureOption","description":"Check that the current page have no accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md) [with an option](https://github.com/dequelabs/axe-core/blob/HEAD/doc/API.md#options-parameter) on the specific [context](https://github.com/dequelabs/axe-core/blob/HEAD/doc/API.md#context-parameter)","wording":"I should not have any axe-core accessibility issue with context json fixture {} and option json fixture {}"},{"key":"key.then.a11y.axecore.withFixtureOption","description":"Check that the current page have no accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md) [with an option](https://github.com/dequelabs/axe-core/blob/HEAD/doc/API.md#options-parameter)","wording":"I should not have any axe-core accessibility issue with option json fixture {}"},{"key":"key.then.a11y.axecore.onlyCritical","description":"Check that the current page have not critical accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md)","wording":"I should not have any axe-core critical accessibility issue"},{"key":"key.then.a11y.axecore.withImpacts","description":"Check that the current page have not accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md) with one or more impacts in: 'minor','moderate','serious','critical'","wording":"I should not have any axe-core accessibility issue with {} impact(s)"},{"key":"key.then.a11y.axecore.withTags","description":"Check that the current page have not accessibility issue for [axe-core](https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md) [with one or more Accessibility Standards](https://github.com/dequelabs/axe-core/blob/HEAD/doc/API.md#axe-core-tags)","wording":"I should not have any axe-core accessibility issue with accessibility standard(s) {}"},{"key":"key.then.a11y.rgaa.default","description":"Check that the current page have no [accessibility issue](https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/) based on RGAA standards","wording":"I should not have any rgaa accessibility issue"},{"key":"key.then.a11y.rgaa.defaultWithResult","description":"Check that the current page have the following [result](https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/) based on RGAA standard","wording":"I should have the following result based on the rgaa reference"},{"key":"key.then.a11y.rgaa.defaultWithResultContaining","description":"Check that the current page have the following partial [result](https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/) based on RGAA standard","wording":"I should have the following partial result based on the rgaa reference"},{"key":"key.then.combobox.withNameValue","description":"Check that the current page have the following partial [result](https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/) based on RGAA standard","wording":"I should see a combo box named {string} with value {string}"},{"key":"key.then.combobox.selectValue","description":"Check that the current page have the following partial [result](https://accessibilite.numerique.gouv.fr/methode/criteres-et-tests/) based on RGAA standard","wording":"I select the value {string} in the combo box named {string}"}]`),Zq=[{key:"key.when.withinElement.roleAndName",description:"Selects the element whose [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and accessible [name](https://russmaxdesign.github.io/html-elements-names/) are specified <br />⚠ remember to deselect the element with <b>[I reset context](#i-reset-context)</b> if you're no longer acting on it",wording:"within $indefiniteArticle $roleName named {string}",section:"general"},{key:"key.then.element.withRoleAndName",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/)",wording:"I should see $indefiniteArticle $roleName named {string}",section:"general"},{key:"key.then.element.withRoleAndNameFocused",description:"Checks that the Html element with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>",wording:"I should see $indefiniteArticle $roleName named {string} keyboard focused",section:"keyboard"},{key:"key.then.element.nextWithRoleAndNameFocused",description:"Move to the next html element that can be reached with Tab and checks that the Html element with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>",wording:"the next keyboard element focused should be $indefiniteArticle $roleName named {string}",section:"keyboard"},{key:"key.then.element.previousWithRoleAndNameFocused",description:"Move to the previous html element that can be reached with Tab and checks that the Html element with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) is focused<br/><a target='_blank' href='https://github.com/e2e-test-quest/uuv/blob/main/example/en-keyboard.feature'>Examples</a>",wording:"the previous keyboard element focused should be $indefiniteArticle $roleName named {string}",section:"keyboard"},{key:"key.then.element.not.withRoleAndName",description:"Checks that an Html element does not exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/)",wording:"I should not see $indefiniteArticle $roleName named {string}",section:"general"},{key:"key.then.element.withRoleAndNameAndContent",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content",wording:"I should see $indefiniteArticle $roleName named {string} and containing {string}",section:"contains"},{key:"key.then.element.withRoleAndNameAndValue",description:"Checks that an Form element(input) exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and specified value",wording:"I should see $indefiniteArticle $roleName named {string} with value {string}",section:"contains"},{key:"key.then.element.withRoleAndNameAndContentDisabled",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content, and with the disabled attribute set to true",wording:"I should see $indefiniteArticle $roleName named {string} and containing {string} disabled",section:"contains"},{key:"key.then.element.withRoleAndNameAndContentEnabled",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/) and content, and with the disabled attribute set to false",wording:"I should see $indefiniteArticle $roleName named {string} and containing {string} enabled",section:"contains"},{key:"key.then.element.withRoleAndNameDisabled",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/), and with the disabled attribute set to true",wording:"I should see $indefiniteArticle $roleName named {string} disabled",section:"contains"},{key:"key.then.element.withRoleAndNameEnabled",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types), [name](https://russmaxdesign.github.io/html-elements-names/), and with the disabled attribute set to false",wording:"I should see $indefiniteArticle $roleName named {string} enabled",section:"contains"},{key:"key.when.type",description:"Writes the sentence given as a parameter inside the specified field (useful for example to fill in a form field)",wording:"I type the sentence {string} in $definiteArticle $roleName named {string}",section:"type"},{key:"key.then.element.withRoleAndNameAndChecked",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) and is checked",wording:"I should see $indefiniteArticle $roleName named {string} checked",section:"checkable"},{key:"key.then.element.withRoleAndNameAndUnchecked",description:"Checks that an Html element exists with the specified [accessible role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles#aria_role_types) and [name](https://russmaxdesign.github.io/html-elements-names/) and is unchecked",wording:"I should see $indefiniteArticle $roleName named {string} unchecked",section:"checkable"},{key:"key.when.enter",description:"Writes the sentence given as a parameter inside the specified field (useful for example to fill in a form field)",wording:"I enter the value {string} in $definiteArticle $roleName named {string}",section:"type"},{key:"key.when.click",description:"Triggers a click on the element with role $roleId and the specified name",wording:"I click on $roleName named {string}",section:"click"}],eY={enriched:Zq};class no{constructor(){this.jsonBase=Yq,this.jsonEnriched=eY}async translate(e){var o,s;const n=_i(e),r=nC(e);this.selectedHtmlElem=e;let i={suggestion:void 0,sentences:[]};if(e.getAttribute("type")!=="hidden")if(n&&r){const c=e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e.value:e.getAttribute("value")??((s=(o=e.firstChild)==null?void 0:o.textContent)==null?void 0:s.trim());c?i=this.getSentenceFromAccessibleRoleAndNameAndContent(n,r,c):i=this.getSentenceFromAccessibleRoleAndName(n,r)}else i=this.getSentenceFromDomSelector(e),i.suggestion=new Jq;return i}static getSelector(e){const n=[];for(;e.nodeType===Node.ELEMENT_NODE;){let r=e.nodeName.toLowerCase();if(e.id){r+="#"+e.id,n.unshift(r);break}else if(e.getAttribute("data-testid")){r+=`[data-testid=${e.getAttribute("data-testid")}]`,n.unshift(r);break}else{let i=e.previousSibling,o=1;for(;i;)i.nodeType===Node.ELEMENT_NODE&&i.nodeName.toLowerCase()===r&&o++,i=i.previousSibling;(o>1||e.nextSibling)&&(r+=":nth-of-type("+o+")")}n.unshift(r),e=e.parentNode}return n.join(" > ")}initResponse(){return{suggestion:void 0,sentences:[]}}computeSentenceFromKeyRoleAndName(e,n,r){return this.jsonEnriched.enriched.filter(i=>i.key===e).map(i=>{const o=i.wording,s=Cd.filter(l=>l.id===n)[0];return o.replaceAll("(n)","").replaceAll("$roleName",(s==null?void 0:s.name)??n).replaceAll("$definiteArticle",s==null?void 0:s.getDefiniteArticle()).replaceAll("$indefiniteArticle",s==null?void 0:s.getIndefiniteArticle()).replaceAll("$namedAdjective",s==null?void 0:s.namedAdjective()).replaceAll("$ofDefiniteArticle",s==null?void 0:s.getOfDefiniteArticle()).replace("{string}",`"${r}"`)})[0]}computeSentenceFromKeyRoleNameAndContent(e,n,r,i){return this.jsonEnriched.enriched.filter(o=>o.key===e).map(o=>{const s=o.wording,l=Cd.filter(c=>c.id===n)[0];return s.replaceAll("(n)","").replaceAll("$roleName",(l==null?void 0:l.name)??n).replaceAll("$definiteArticle",l==null?void 0:l.getDefiniteArticle()).replaceAll("$indefiniteArticle",l==null?void 0:l.getIndefiniteArticle()).replaceAll("$namedAdjective",l==null?void 0:l.namedAdjective()).replaceAll("$ofDefiniteArticle",l==null?void 0:l.getOfDefiniteArticle()).replace("{string}",`"${r}"`).replace("{string}",`"${i}"`)})[0]}computeSentenceFromKeyAndSelector(e,n){return this.jsonBase.filter(r=>r.key===e).map(r=>r.wording.replace("{string}",`"${n}"`))[0]}getSentenceFromKey(e){return this.jsonBase.filter(n=>n.key===e)[0]}}var tk={root:"body",outlineStyle:"5px solid rgba(204, 146, 62, 0.3)",onClick:t=>console.log("Element was clicked:",no.getSelector(t))},tY=(t={})=>{const{root:e,excluded:n,outlineStyle:r}={...tk,...t};let i=t.onClick||tk.onClick,o=t.onMouseOver,s=t.onMouseOut,l,c,d;const f=w=>{w.style.outline=r,w.style.outlineOffset=`-${w.style.outlineWidth}`,d&&nk(d),d=nY(w);const B=nC(w),k=_i(w),M=[];let O;B&&k?(M.push("✅ Good"),O="good"):B||k?(M.push("⚠️ Warning"),O="warning"):(M.push("❌ Danger"),O="danger");const R=`<label><b>Selector: </b></label><span style="text-wrap: wrap">${no.getSelector(w)}</span>`,T=`<label><b>Tag name: </b></label><span>${w.tagName.toLowerCase()}</span>`,N=w.type?`<div><label><b>Type: </b></label><span>${w.type}</span></div>`:"";M.push(`<p><div>${T}</div><div>${N}</div><div>${R}</div></p>`),M.push(`<div><div><label><b>Name: </b></label><span>${B}</span></div><div><label><b>Role: </b></label><span>${k||""}</span></div></div>`),Kq(w,M.join("<hr style='opacity: 0.3' />"),O)},g=w=>{w&&(w.style.outline="none",d&&(nk(d),d=null)),dP()},p=w=>{if(c&&c.length&&c.some(B=>B===w.target||B.contains(w.target)))return!0};let A=w=>{p(w)||(l=w.target,o(w.target))},y=w=>{p(w)||s(w.target)};const C=w=>{if(!p(w))return w.preventDefault(),w.stopPropagation(),i(w.target),!1},b=w=>{if(!n.length)return[];const B=n.flatMap(k=>{if(typeof k=="string"||k instanceof String)return Array.from(w.querySelectorAll(k));if(k instanceof Element)return[k];if(k.length>0&&k[0]instanceof Element)return Array.from(k)});return Array.from(B).flat()};return{enable:w=>{const B=document.querySelector(e);B&&(n&&(c=b(B)),B.addEventListener("mouseover",A,!0),B.addEventListener("mouseout",y,!0),B.addEventListener("click",C,!0),w&&(i=w))},cancel:()=>{const w=document.querySelector(e);w&&(w.removeEventListener("mouseover",A,!0),w.removeEventListener("mouseout",y,!0),w.removeEventListener("click",C,!0),g(l))},removeHighlight:g,highlight:f}};function nY(t){const e=t.getBoundingClientRect(),n=document.createElement("div");return n.style.position="absolute",n.style.top=`${e.top+window.scrollY}px`,n.style.left=`${e.left+window.scrollX}px`,n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n.style.background="rgba(255, 0, 0, 0.05)",n.style.pointerEvents="none",n.style.zIndex="9999998",document.body.appendChild(n),n}function nk(t){t&&t.remove()}class rY{constructor(){this.TAGS_WITH_NATIVE_ACCESSIBILITY_DATA=["article","aside","button","details","dialog","fieldset","figure","form","footer","h1","h2","h3","h4","h5","h6","header","hr","img","input","label","li","main","menu","nav","ol","ul","option","progress","section","select","summary","table","textarea","tbody","thead","tfoot","td","th","tr"];const e=this.TAGS_WITH_NATIVE_ACCESSIBILITY_DATA.join(",");this.candidatesWithNativeAccessibleData=document.querySelectorAll(e);const n=`*${this.TAGS_WITH_NATIVE_ACCESSIBILITY_DATA.map(s=>`:not(${s})`).join("")}`,r=document.querySelectorAll(n),i=[...r].filter(s=>this.hasInformativeAttributes(s)),o=[...r].flatMap(s=>Array.from(s.children));this.candidatesWithCustomAccessibleData=[...i,...o]}getAvailableNodes(){return[...this.candidatesWithNativeAccessibleData,...this.candidatesWithCustomAccessibleData]}hasInformativeAttributes(e){const n=e.attributes;if(n)for(const r of n){const i=r.name.toLowerCase();if(i==="role"||i==="alt"||i==="title"||i==="tabindex"||i==="lang"||i==="scope"||i==="for"||i.startsWith("aria-")||i==="data-testid")return!0}return!1}}const Ho={width:4,borderColor:"orange"};class iY{constructor(e){this.onSelect=e}createInspector(e,n){this.inspector=tY({root:"body",outlineStyle:"2px solid red",onClick:r=>{this.onSelect(r),this.inspector.cancel()},onMouseOver:e,onMouseOut:n})}enableBasicHighlight(){this.createInspector(e=>this.inspector.highlight(e),e=>this.inspector.removeHighlight(e)),this.inspector.enable()}enableRefinedHighlight(){const n=new rY().getAvailableNodes();this.createInspector(r=>{n.includes(r)&&this.inspector.highlight(r)},r=>{n.includes(r)&&this.inspector.removeHighlight(r)}),this.inspector.enable()}cancel(){this.inspector.cancel()}}const Lg="http://www.w3.org/2000/svg",fP={radius:12,linkWith:4};function oY(t){const e=t?0:iP;return`
|
|
332
332
|
.uvv-assistant-additional-layer-svg {
|
|
333
333
|
z-index: 9000;
|
|
334
334
|
position: absolute;
|
|
@@ -409,6 +409,6 @@ html body {
|
|
|
409
409
|
`;r=r+` Scenario: ${e}
|
|
410
410
|
`,r=r+` Given I visit path "${window.location.href}"
|
|
411
411
|
`;let i=!1,o=!1;return n.forEach(s=>{let l=s;i?l=l.replace(ck,Kr.AND):i=s.match(ck)!=null,o?l=l.replace(uk,Kr.AND):o=s.match(uk)!=null,r=r+` ${l}
|
|
412
|
-
`}),r}const BY=new class extends Go{toDOM(){const t=document.createElement("div");return t.innerHTML="<div class='uuv-gutter-warning'>⚠️</div>",t.setAttribute("title","Accessibility role and name must be defined"),t}};function MY(){return Nb({lineMarker(t,e){return t.state.doc.lineAt(e.from).text.includes("selector")?BY:null}})}const S0=Kr.WHEN;class OY extends no{getSentenceFromAccessibleRoleAndName(e,n){const r=this.initResponse(),o=this.computeSentenceFromKeyRoleAndName("key.when.withinElement.roleAndName",e,n);return r.sentences=[S0+o],r}getSentenceFromAccessibleRoleAndNameAndContent(e,n,r){const i=this.initResponse(),s=this.computeSentenceFromKeyRoleNameAndContent("key.when.withinElement.roleAndName",e,n,r);return i.sentences=[S0+s],i}getSentenceFromDomSelector(e){const n=this.initResponse(),i=this.computeSentenceFromKeyAndSelector("key.when.withinElement.selector",no.getSelector(e));return n.sentences=[S0+i],n}}class TY{constructor(e,n,r){this.onKeyDown=i=>{i.key==="Escape"&&(this.onReset(),this.highLightHelper.cancel(),this.revertDisabledField(),document.removeEventListener("keydown",this.onKeyDown))},this.highLightHelper=new iY(e),this.onReset=n,this.refineHighlight=r}startSelect(e){e&&this.enableDisabledField(),document.addEventListener("keydown",this.onKeyDown),this.refineHighlight?this.highLightHelper.enableRefinedHighlight():this.highLightHelper.enableBasicHighlight()}async buildResultSentence(e,n,r){let i;switch(n){case bt.WITHIN:i=new OY;break;case bt.EXPECT:i=new pP;break;case bt.CLICK:i=new gP;break;case bt.TYPE:i=new hP;break}return i.translate(e)}enableDisabledField(){document.querySelectorAll(":disabled").forEach(n=>{n.className=`${n.className} ${Uh}`,n.removeAttribute("disabled")})}revertDisabledField(){document.querySelectorAll(`.${Uh}`).forEach(n=>{n.className=n.className.replaceAll(Uh,""),n.setAttribute("disabled","true")})}}const{Sider:RY}=Oc,{Text:PY,Title:NY}=Tc;function $Y(t){const[e,n]=m.useState(""),[r,i]=m.useState(""),[o,s]=m.useState(bt.NONE),[l,c]=m.useState(bt.NONE),[d,f]=m.useState(Kt.WITHOUT_RESULT),[g,p]=m.useState(!0),[A,y]=m.useState(!1),[C,b]=m.useState(Nb({})),[x,E]=m.useState([]),[w,B]=m.useState([]),[k,M]=m.useState(ka.NONE),[O,R]=m.useState(!0),T=new TY(N,$,O);m.useEffect(()=>()=>{$()},[]),m.useEffect(()=>{b(MY())},[e]),m.useEffect(()=>{switch(ie(),o){case bt.WITHIN:case bt.EXPECT:case bt.CLICK:T.startSelect(!0);break;case bt.TYPE:T.startSelect(!1);break;case bt.KEYBOARD_GLOBAL_NAVIGATION:M(ka.NONE),fY().then(ne=>{B(ne.expected),E(ne.current),M(ka.CURRENT_NAVIGATION),f(Kt.WITH_RESULT),c(bt.KEYBOARD_GLOBAL_NAVIGATION),s(bt.NONE)});break;case bt.FORM_COMPLETION_MOUSE:yY(t.assistantAdditionalLayersRoot,Tr.FORM_COMPLETION,[].slice.call(document.forms),D,$);break;case bt.TABLE_AND_GRID_EXPECT:IY(t.assistantAdditionalLayersRoot,Tr.ARRAY_COMPLETION,[].slice.call(document.querySelectorAll("table, [role=grid], [role=treegrid]")),U,$);break;case bt.NONE:}},[o]),m.useEffect(()=>{if(k!==ka.NONE){let ne;k===ka.CURRENT_NAVIGATION?(sk(t.assistantAdditionalLayersRoot,Tr.CURRENT_NAVIGATION,x),ne=x):(sk(t.assistantAdditionalLayersRoot,Tr.EXPECTED_NAVIGATION,w),ne=w),hY(ne).then(oe=>{n(bh("Your amazing feature name","Keyboard Navigation",oe.map(ce=>ce.result))),Z()})}},[k]);function N(ne){console.debug("customTranslator",t.translator);let oe;t.translator?oe=Promise.resolve({sentences:[t.translator(ne)]}):oe=T.buildResultSentence(ne,o,r!==""),oe.then(ce=>{f(Kt.WITH_RESULT);const he=ce.sentences.map((ge,me)=>({key:me,result:ge}));n(bh("Your amazing feature name",`Action - ${o}`,he.map(ge=>ge.result))),c(o),s(bt.NONE),Z()})}function $(){c(o),s(bt.NONE),i(""),p(!0),f(Kt.WITHOUT_RESULT),Z()}const L=()=>{e.length>0&&(navigator.clipboard.writeText(e),VO.success({content:"Result copied to the clipboard"}))},F=()=>{ie(),R(!O)};async function D(ne){const oe=await bY(ne);n(bh("Your amazing feature name",`Action - ${o}`,oe)),ie(),f(Kt.WITH_RESULT),c(bt.FORM_COMPLETION_MOUSE),s(bt.NONE),Z()}async function U(ne){const oe=await kY(ne);n(bh("Your amazing feature name",`Action - ${o}`,oe)),ie(),f(Kt.WITH_RESULT),c(bt.TABLE_AND_GRID_EXPECT),s(bt.NONE),Z()}const z=ne=>{f(Kt.HIDE),y(!0),s(ne)};function H(){y(!0),M(ka.NONE),s(bt.KEYBOARD_GLOBAL_NAVIGATION)}function Q(){f(Kt.HIDE),y(!0),s(bt.FORM_COMPLETION_MOUSE)}function W(){f(Kt.HIDE),y(!0),s(bt.TABLE_AND_GRID_EXPECT)}function G(ne,oe,ce,he,ge,me,we){return{key:oe,icon:ge,disabled:ce,children:me,label:ne,onClick:he,onTitleClick:we}}function j(ne){let oe=ne.parentElement;for(;oe!==null;){if(oe.id==="uuvAssistantMenu")return oe;oe=oe.parentElement}return document.body}const V=()=>{d===Kt.SETTINGS?f(Kt.WITHOUT_RESULT):f(Kt.SETTINGS)},te=[G("Mouse actions","mouse-actions",!1,void 0,Le.jsx("div",{className:"menu-custom-svg-container",children:Le.jsx("img",{src:Oa.getBase64File(n$),"aria-label":"mouse selection",className:"menu-custom-svg-from-black-to-white"})}),[G(bt.EXPECT.toString(),bt.EXPECT,!1,()=>{z(bt.EXPECT)}),G(bt.CLICK.toString(),bt.CLICK,!1,()=>{z(bt.CLICK)}),G(bt.WITHIN.toString(),bt.WITHIN,!1,()=>{z(bt.WITHIN)}),G(bt.TYPE.toString(),bt.TYPE,!1,()=>{z(bt.TYPE)})],()=>z(bt.EXPECT)),G("Keyboard actions","keyboard-actions",!1,void 0,Le.jsx("div",{className:"menu-custom-svg-container",children:Le.jsx("img",{src:Oa.getBase64File(o$),"aria-label":"keyboard selection",className:"menu-custom-svg-from-black-to-white"})}),[G("Keyboard navigation","KeybNav",!1,()=>{H()})],()=>H()),G("Form actions","form-actions",!1,void 0,Le.jsx("div",{className:"menu-custom-svg-container",children:Le.jsx("img",{src:Oa.getBase64File(l$),"aria-label":"form selection",className:"menu-custom-svg-from-black-to-white"})}),[G("Form completion with mouse","FormCompletionMouse",!1,()=>{Q()})],()=>Q()),G("Array actions","array-actions",!1,void 0,Le.jsx("div",{className:"menu-custom-svg-container",children:Le.jsx("img",{src:Oa.getBase64File(d$),"aria-label":"array selection",className:"menu-custom-svg-from-black-to-white"})}),[G("Table and Grid Expect","TableAndGridExpect",!1,()=>{W()})],()=>W())];function Z(){setTimeout(()=>y(!1),100)}function J(){return d===Kt.WITH_RESULT?"Close result view":"Open result view"}function ie(){for(const ne in Tr){const oe=Tr[ne];Cy(t.assistantAdditionalLayersRoot,oe)}}return Le.jsx("div",{id:"uuvAssistantMenu",children:Le.jsx(gL,{container:t.assistantRoot,children:Le.jsxs(ca,{theme:{algorithm:g?Y1.darkAlgorithm:Y1.defaultAlgorithm,token:{fontSize:18,zIndexBase:9999999989,zIndexPopupBase:9999999999}},children:[d===Kt.WITH_RESULT?Le.jsxs(zs,{id:"uuvAssistantResultZone",vertical:!0,children:[Le.jsx("header",{children:Le.jsxs(zs,{justify:"space-between",align:"center",children:[Le.jsxs(Tc.Title,{level:2,children:["Result of"," ",Le.jsx("span",{className:"secondary",children:l.toString()})]}),Le.jsx(ki,{placement:"bottom",title:"Close",getPopupContainer:ne=>j(ne),children:Le.jsx(Ma,{type:"link",shape:"circle",icon:Le.jsx(Yl,{}),className:"primary",onClick:()=>{ie(),f(Kt.WITHOUT_RESULT)}})})]})}),Le.jsx("div",{id:"toolbar",children:Le.jsx(zs,{justify:"space-between",align:"center",children:Le.jsx(ki,{placement:"bottom",title:"Copy",getPopupContainer:ne=>j(ne),children:Le.jsx(Ma,{type:"link",shape:"circle",icon:Le.jsx(UO,{}),className:"primary",disabled:e.length===0,onClick:L})})})}),Le.jsx(YR,{readOnly:!0,indentWithTab:!0,value:e,height:"100%",extensions:[Hb.define(PJ),Me.lineWrapping,C,Me.contentAttributes.of({"aria-label":"Generated UUV Script"})],theme:QJ,"aria-label":"Generated UUV Script"})]}):"",d===Kt.SETTINGS?Le.jsxs(zs,{id:"uuvAssistantResultZone",vertical:!0,children:[Le.jsx("header",{children:Le.jsxs(zs,{justify:"space-between",align:"center",children:[Le.jsx(NY,{level:2,children:"Settings"}),Le.jsx(ki,{placement:"bottom",title:"Close",getPopupContainer:ne=>j(ne),children:Le.jsx(Ma,{type:"link",shape:"circle",icon:Le.jsx(Yl,{}),className:"primary",onClick:()=>{ie(),f(Kt.WITHOUT_RESULT)}})})]})}),Le.jsx("div",{children:Le.jsx(zs,{justify:"space-between",align:"center",children:Le.jsx(_o,{name:"basic",labelCol:{span:20},wrapperCol:{span:50},style:{maxWidth:600},size:"large",initialValues:{remember:!0},children:Le.jsxs(BO,{children:[Le.jsx(cg,{size:"small",className:"settings",variant:"borderless",title:"General",style:{width:"100%"},children:Le.jsx(cg.Meta,{title:Le.jsx(_o.Item,{label:"Intelligent Highlighter",labelAlign:"left",colon:!1,children:Le.jsx(KO,{title:`${O?"disable":"active"} intelligent highlight`,checkedChildren:Le.jsx(OM,{}),unCheckedChildren:Le.jsx(Yl,{}),defaultChecked:!0,onClick:F})}),description:Le.jsx("span",{children:"This intelligent highlighter help you to find only informative elements"})})}),Le.jsx(Gf,{})]})})})})]}):"",d!==Kt.HIDE?Le.jsx(RY,{reverseArrow:!0,defaultCollapsed:!0,id:"uuvAssistantMainBar",onCollapse:ne=>{f(ne?Kt.WITHOUT_RESULT:Kt.WITH_RESULT)},children:Le.jsxs(zs,{align:"center",vertical:!0,children:[Le.jsxs(zs,{align:"center",vertical:!0,className:"uuvAssistantAvatarContainer",children:[Le.jsx(WM,{className:"uuvAssistantAvatar",size:"large",children:Le.jsx(ki,{placement:"top",title:"Go to steps definition",getPopupContainer:ne=>j(ne),children:Le.jsx("a",{href:"https://e2e-test-quest.github.io/uuv/docs/category/description-of-sentences",children:Le.jsx("img",{src:Oa.getBase64File(ZN),alt:"UUV logo",className:"uuvAssistantIcon"})})})}),Le.jsx(PY,{className:"uuvAssistantTitle",children:"UUV"})]}),Le.jsx(Gf,{}),A?Le.jsx(HO,{tip:"Loading",size:"large",spinning:A}):Le.jsxs(fe.Fragment,{children:[Le.jsx(Md,{mode:"inline",items:te,getPopupContainer:ne=>j(ne)}),Le.jsx(Gf,{}),Le.jsx(ki,{placement:"bottom",title:`${d===Kt.SETTINGS?"Close":"Open"} settings module`,getPopupContainer:ne=>j(ne),children:Le.jsx(Ma,{type:d===Kt.SETTINGS?"primary":"link",onClick:V,icon:Le.jsx(wV,{}),shape:"circle",className:"primary","aria-pressed":d===Kt.SETTINGS})}),Le.jsx(Gf,{}),Le.jsx(ki,{placement:"left",title:J(),getPopupContainer:ne=>j(ne),children:Le.jsx(Ma,{size:"large",type:"link",block:!0,style:{background:"#001529",bottom:0},icon:d===Kt.WITH_RESULT?Le.jsx(j9,{"aria-hidden":!0}):Le.jsx(L9,{"aria-hidden":!0}),onClick:()=>f(d===Kt.WITH_RESULT?Kt.WITHOUT_RESULT:Kt.WITH_RESULT),"aria-label":J()})})]})]})}):""]})})})}var Ch={},dk;function LY(){if(dk)return Ch;dk=1;var t=pk();return Ch.createRoot=t.createRoot,Ch.hydrateRoot=t.hydrateRoot,Ch}var DY=LY();const FY=":host{--ua-color-primary: white;--ua-color-secondary: #1668dc;--ua-color-hover: #15417e;--ua-bg-color: #001529;--ua-menu-width: 60px;--ua-result-zone-light-opacity: .8;--ua-result-zone-no-opacity: 1}.primary{color:var(--ua-color-primary)}.secondary{color:var(--ua-color-secondary)}#uuvAssistantMenu{position:fixed;top:0;z-index:10000}#uuvAssistantMenu>*{z-index:10001}#uuvAssistantResultZone{background-color:var(--ua-bg-color);position:fixed;right:var(--ua-menu-width);height:100vh;top:0;width:550px;border-right:solid 1px var(--ua-color-primary);opacity:var(--ua-result-zone-no-opacity)}#uuvAssistantResultZone header,#uuvAssistantResultZone #toolbar{padding:10px;border-bottom:solid 1px var(--ua-color-primary)}#uuvAssistantResultZone header h2{font-size:25px;margin:0}#uuvAssistantResultZone .cm-theme{overflow-y:auto;flex:1 1 auto}#uuvAssistantMainBar{position:fixed;height:100vh;top:0;right:0;background-color:var(--ua-bg-color);min-width:var(--ua-menu-width)!important;width:var(--ua-menu-width)!important;box-shadow:-1px 0 3px #aaa!important;padding:20px 0 10px}#uuvAssistantMainBar .ant-menu{width:var(--ua-menu-width)}.uuvAssistantTitle{font-size:smaller;font-weight:bolder;text-align:center}.uuvAssistantAvatarContainer{padding-bottom:10px}.uuvAssistantAvatar{background-color:transparent;height:50px;width:50px;border:1.5px solid var(--ua-color-primary)}.uuvAssistantIcon{width:40px;height:40px}.CodeMirror{overflow-y:auto}.anticon{display:inline-flex!important}.keyboardicon:hover{color:var(--ua-color-hover)!important}.keyboardicon.active{color:var(--ua-color-secondary)!important}.ant-layout-sider-children{height:100%}.ant-layout-sider-children>.ant-flex{height:100%}.ant-layout-sider-children .ant-menu{flex:1 1 auto;background-color:var(--ua-bg-color)}.ant-layout-sider-children .ant-divider{border-color:#708090;margin:10px 0}.uuv-gutter-warning{cursor:pointer}#uuvAssistantMenu .menu-custom-svg-from-black-to-white{width:30px;-webkit-filter:invert(100%);filter:invert(100%);margin:0 auto}#uuvAssistantMenu .ant-menu-submenu-title{padding:0}#uuvAssistantMenu .menu-custom-svg-container{width:100%;padding:3px}#uuvAssistantMenu .ant-menu-submenu.ant-menu-submenu-vertical{margin:20px 0}#uuvAssistantMenu .settings{background-color:var(--ua-bg-color)}";document.addEventListener("UUVAssistantReadyToLoad",t=>{var r;console.log("event listened: UUVAssistantReadyToLoad"),document.body.style.marginRight=`${parseInt(window.getComputedStyle(document.body).marginRight)+iP}px`;const e=document.getElementById("uvv-assistant-root"),n=document.getElementById("uvv-assistant-additional-layers");if(e&&n){e.classList.add("react-container");const i=e.attachShadow({mode:"open"}),o=DY.createRoot(i),s=n.attachShadow({mode:"open"});o.render(Le.jsxs(Le.Fragment,{children:[Le.jsx("style",{children:FY.toString()}),Le.jsx("div",{children:Le.jsx($Y,{translator:(r=t==null?void 0:t.detail)==null?void 0:r.translator,assistantRoot:i,assistantAdditionalLayersRoot:s})})]}))}});
|
|
412
|
+
`}),r}const BY=new class extends Go{toDOM(){const t=document.createElement("div");return t.innerHTML="<div class='uuv-gutter-warning'>⚠️</div>",t.setAttribute("title","Accessibility role and name must be defined"),t}};function MY(){return Nb({lineMarker(t,e){return t.state.doc.lineAt(e.from).text.includes("selector")?BY:null}})}const S0=Kr.WHEN;class OY extends no{getSentenceFromAccessibleRoleAndName(e,n){const r=this.initResponse(),o=this.computeSentenceFromKeyRoleAndName("key.when.withinElement.roleAndName",e,n);return r.sentences=[S0+o],r}getSentenceFromAccessibleRoleAndNameAndContent(e,n,r){const i=this.initResponse(),s=this.computeSentenceFromKeyRoleNameAndContent("key.when.withinElement.roleAndName",e,n,r);return i.sentences=[S0+s],i}getSentenceFromDomSelector(e){const n=this.initResponse(),i=this.computeSentenceFromKeyAndSelector("key.when.withinElement.selector",no.getSelector(e));return n.sentences=[S0+i],n}}class TY{constructor(e,n,r){this.onKeyDown=i=>{i.key==="Escape"&&(this.onReset(),this.highLightHelper.cancel(),this.revertDisabledField(),document.removeEventListener("keydown",this.onKeyDown))},this.highLightHelper=new iY(e),this.onReset=n,this.intelligentHighlight=r}startSelect(e){e&&this.enableDisabledField(),document.addEventListener("keydown",this.onKeyDown),this.intelligentHighlight?this.highLightHelper.enableRefinedHighlight():this.highLightHelper.enableBasicHighlight()}async buildResultSentence(e,n,r){let i;switch(n){case bt.WITHIN:i=new OY;break;case bt.EXPECT:i=new pP;break;case bt.CLICK:i=new gP;break;case bt.TYPE:i=new hP;break}return i.translate(e)}enableDisabledField(){document.querySelectorAll(":disabled").forEach(n=>{n.className=`${n.className} ${Uh}`,n.removeAttribute("disabled")})}revertDisabledField(){document.querySelectorAll(`.${Uh}`).forEach(n=>{n.className=n.className.replaceAll(Uh,""),n.setAttribute("disabled","true")})}}const{Sider:RY}=Oc,{Text:PY,Title:NY}=Tc;function $Y(t){const[e,n]=m.useState(""),[r,i]=m.useState(""),[o,s]=m.useState(bt.NONE),[l,c]=m.useState(bt.NONE),[d,f]=m.useState(Kt.WITHOUT_RESULT),[g,p]=m.useState(!0),[A,y]=m.useState(!1),[C,b]=m.useState(Nb({})),[x,E]=m.useState([]),[w,B]=m.useState([]),[k,M]=m.useState(ka.NONE),[O,R]=m.useState(!0),T=new TY(N,$,O);m.useEffect(()=>()=>{$()},[]),m.useEffect(()=>{b(MY())},[e]),m.useEffect(()=>{switch(ie(),o){case bt.WITHIN:case bt.EXPECT:case bt.CLICK:T.startSelect(!0);break;case bt.TYPE:T.startSelect(!1);break;case bt.KEYBOARD_GLOBAL_NAVIGATION:M(ka.NONE),fY().then(ne=>{B(ne.expected),E(ne.current),M(ka.CURRENT_NAVIGATION),f(Kt.WITH_RESULT),c(bt.KEYBOARD_GLOBAL_NAVIGATION),s(bt.NONE)});break;case bt.FORM_COMPLETION_MOUSE:yY(t.assistantAdditionalLayersRoot,Tr.FORM_COMPLETION,[].slice.call(document.forms),D,$);break;case bt.TABLE_AND_GRID_EXPECT:IY(t.assistantAdditionalLayersRoot,Tr.ARRAY_COMPLETION,[].slice.call(document.querySelectorAll("table, [role=grid], [role=treegrid]")),U,$);break;case bt.NONE:}},[o]),m.useEffect(()=>{if(k!==ka.NONE){let ne;k===ka.CURRENT_NAVIGATION?(sk(t.assistantAdditionalLayersRoot,Tr.CURRENT_NAVIGATION,x),ne=x):(sk(t.assistantAdditionalLayersRoot,Tr.EXPECTED_NAVIGATION,w),ne=w),hY(ne).then(oe=>{n(bh("Your amazing feature name","Keyboard Navigation",oe.map(ce=>ce.result))),Z()})}},[k]);function N(ne){console.debug("customTranslator",t.translator);let oe;t.translator?oe=Promise.resolve({sentences:[t.translator(ne)]}):oe=T.buildResultSentence(ne,o,r!==""),oe.then(ce=>{f(Kt.WITH_RESULT);const he=ce.sentences.map((ge,me)=>({key:me,result:ge}));n(bh("Your amazing feature name",`Action - ${o}`,he.map(ge=>ge.result))),c(o),s(bt.NONE),Z()})}function $(){c(o),s(bt.NONE),i(""),p(!0),f(Kt.WITHOUT_RESULT),Z()}const L=()=>{e.length>0&&(navigator.clipboard.writeText(e),VO.success({content:"Result copied to the clipboard"}))},F=()=>{ie(),R(!O)};async function D(ne){const oe=await bY(ne);n(bh("Your amazing feature name",`Action - ${o}`,oe)),ie(),f(Kt.WITH_RESULT),c(bt.FORM_COMPLETION_MOUSE),s(bt.NONE),Z()}async function U(ne){const oe=await kY(ne);n(bh("Your amazing feature name",`Action - ${o}`,oe)),ie(),f(Kt.WITH_RESULT),c(bt.TABLE_AND_GRID_EXPECT),s(bt.NONE),Z()}const z=ne=>{f(Kt.HIDE),y(!0),s(ne)};function H(){y(!0),M(ka.NONE),s(bt.KEYBOARD_GLOBAL_NAVIGATION)}function Q(){f(Kt.HIDE),y(!0),s(bt.FORM_COMPLETION_MOUSE)}function W(){f(Kt.HIDE),y(!0),s(bt.TABLE_AND_GRID_EXPECT)}function G(ne,oe,ce,he,ge,me,we){return{key:oe,icon:ge,disabled:ce,children:me,label:ne,onClick:he,onTitleClick:we}}function j(ne){let oe=ne.parentElement;for(;oe!==null;){if(oe.id==="uuvAssistantMenu")return oe;oe=oe.parentElement}return document.body}const V=()=>{d===Kt.SETTINGS?f(Kt.WITHOUT_RESULT):f(Kt.SETTINGS)},te=[G("Mouse actions","mouse-actions",!1,void 0,Le.jsx("div",{className:"menu-custom-svg-container",children:Le.jsx("img",{src:Oa.getBase64File(n$),"aria-label":"mouse selection",className:"menu-custom-svg-from-black-to-white"})}),[G(bt.EXPECT.toString(),bt.EXPECT,!1,()=>{z(bt.EXPECT)}),G(bt.CLICK.toString(),bt.CLICK,!1,()=>{z(bt.CLICK)}),G(bt.WITHIN.toString(),bt.WITHIN,!1,()=>{z(bt.WITHIN)}),G(bt.TYPE.toString(),bt.TYPE,!1,()=>{z(bt.TYPE)})],()=>z(bt.EXPECT)),G("Keyboard actions","keyboard-actions",!1,void 0,Le.jsx("div",{className:"menu-custom-svg-container",children:Le.jsx("img",{src:Oa.getBase64File(o$),"aria-label":"keyboard selection",className:"menu-custom-svg-from-black-to-white"})}),[G("Keyboard navigation","KeybNav",!1,()=>{H()})],()=>H()),G("Form actions","form-actions",!1,void 0,Le.jsx("div",{className:"menu-custom-svg-container",children:Le.jsx("img",{src:Oa.getBase64File(l$),"aria-label":"form selection",className:"menu-custom-svg-from-black-to-white"})}),[G("Form completion with mouse","FormCompletionMouse",!1,()=>{Q()})],()=>Q()),G("Array actions","array-actions",!1,void 0,Le.jsx("div",{className:"menu-custom-svg-container",children:Le.jsx("img",{src:Oa.getBase64File(d$),"aria-label":"array selection",className:"menu-custom-svg-from-black-to-white"})}),[G("Table and Grid Expect","TableAndGridExpect",!1,()=>{W()})],()=>W())];function Z(){setTimeout(()=>y(!1),100)}function J(){return d===Kt.WITH_RESULT?"Close result view":"Open result view"}function ie(){for(const ne in Tr){const oe=Tr[ne];Cy(t.assistantAdditionalLayersRoot,oe)}}return Le.jsx("div",{id:"uuvAssistantMenu",children:Le.jsx(gL,{container:t.assistantRoot,children:Le.jsxs(ca,{theme:{algorithm:g?Y1.darkAlgorithm:Y1.defaultAlgorithm,token:{fontSize:18,zIndexBase:9999999989,zIndexPopupBase:9999999999}},children:[d===Kt.WITH_RESULT?Le.jsxs(zs,{id:"uuvAssistantResultZone",vertical:!0,children:[Le.jsx("header",{children:Le.jsxs(zs,{justify:"space-between",align:"center",children:[Le.jsxs(Tc.Title,{level:2,children:["Result of"," ",Le.jsx("span",{className:"secondary",children:l.toString()})]}),Le.jsx(ki,{placement:"bottom",title:"Close",getPopupContainer:ne=>j(ne),children:Le.jsx(Ma,{type:"link",shape:"circle",icon:Le.jsx(Yl,{}),className:"primary",onClick:()=>{ie(),f(Kt.WITHOUT_RESULT)}})})]})}),Le.jsx("div",{id:"toolbar",children:Le.jsx(zs,{justify:"space-between",align:"center",children:Le.jsx(ki,{placement:"bottom",title:"Copy",getPopupContainer:ne=>j(ne),children:Le.jsx(Ma,{type:"link",shape:"circle",icon:Le.jsx(UO,{}),className:"primary",disabled:e.length===0,onClick:L})})})}),Le.jsx(YR,{readOnly:!0,indentWithTab:!0,value:e,height:"100%",extensions:[Hb.define(PJ),Me.lineWrapping,C,Me.contentAttributes.of({"aria-label":"Generated UUV Script"})],theme:QJ,"aria-label":"Generated UUV Script"})]}):"",d===Kt.SETTINGS?Le.jsxs(zs,{id:"uuvAssistantResultZone",vertical:!0,children:[Le.jsx("header",{children:Le.jsxs(zs,{justify:"space-between",align:"center",children:[Le.jsx(NY,{level:2,children:"Settings"}),Le.jsx(ki,{placement:"bottom",title:"Close",getPopupContainer:ne=>j(ne),children:Le.jsx(Ma,{type:"link",shape:"circle",icon:Le.jsx(Yl,{}),className:"primary",onClick:()=>{ie(),f(Kt.WITHOUT_RESULT)}})})]})}),Le.jsx("div",{children:Le.jsx(zs,{justify:"space-between",align:"center",children:Le.jsx(_o,{name:"basic",labelCol:{span:20},wrapperCol:{span:50},style:{maxWidth:600},size:"large",initialValues:{remember:!0},children:Le.jsxs(BO,{children:[Le.jsx(cg,{size:"small",className:"settings",variant:"borderless",title:"General",style:{width:"100%"},children:Le.jsx(cg.Meta,{title:Le.jsx(_o.Item,{label:"Intelligent Highlighter",labelAlign:"left",colon:!1,children:Le.jsx(KO,{title:`${O?"disable":"active"} intelligent highlight`,checkedChildren:Le.jsx(OM,{}),unCheckedChildren:Le.jsx(Yl,{}),checked:O,onClick:F})}),description:Le.jsx("span",{children:"This intelligent highlighter help you to find only informative elements"})})}),Le.jsx(Gf,{})]})})})})]}):"",d!==Kt.HIDE?Le.jsx(RY,{reverseArrow:!0,defaultCollapsed:!0,id:"uuvAssistantMainBar",onCollapse:ne=>{f(ne?Kt.WITHOUT_RESULT:Kt.WITH_RESULT)},children:Le.jsxs(zs,{align:"center",vertical:!0,children:[Le.jsxs(zs,{align:"center",vertical:!0,className:"uuvAssistantAvatarContainer",children:[Le.jsx(WM,{className:"uuvAssistantAvatar",size:"large",children:Le.jsx(ki,{placement:"top",title:"Go to steps definition",getPopupContainer:ne=>j(ne),children:Le.jsx("a",{href:"https://e2e-test-quest.github.io/uuv/docs/category/description-of-sentences",children:Le.jsx("img",{src:Oa.getBase64File(ZN),alt:"UUV logo",className:"uuvAssistantIcon"})})})}),Le.jsx(PY,{className:"uuvAssistantTitle",children:"UUV"})]}),Le.jsx(Gf,{}),A?Le.jsx(HO,{tip:"Loading",size:"large",spinning:A}):Le.jsxs(fe.Fragment,{children:[Le.jsx(Md,{mode:"inline",items:te,getPopupContainer:ne=>j(ne)}),Le.jsx(Gf,{}),Le.jsx(ki,{placement:"bottom",title:`${d===Kt.SETTINGS?"Close":"Open"} settings module`,getPopupContainer:ne=>j(ne),children:Le.jsx(Ma,{type:d===Kt.SETTINGS?"primary":"link",onClick:V,icon:Le.jsx(wV,{}),shape:"circle",className:"primary","aria-pressed":d===Kt.SETTINGS})}),Le.jsx(Gf,{}),Le.jsx(ki,{placement:"left",title:J(),getPopupContainer:ne=>j(ne),children:Le.jsx(Ma,{size:"large",type:"link",block:!0,style:{background:"#001529",bottom:0},icon:d===Kt.WITH_RESULT?Le.jsx(j9,{"aria-hidden":!0}):Le.jsx(L9,{"aria-hidden":!0}),onClick:()=>f(d===Kt.WITH_RESULT?Kt.WITHOUT_RESULT:Kt.WITH_RESULT),"aria-label":J()})})]})]})}):""]})})})}var Ch={},dk;function LY(){if(dk)return Ch;dk=1;var t=pk();return Ch.createRoot=t.createRoot,Ch.hydrateRoot=t.hydrateRoot,Ch}var DY=LY();const FY=":host{--ua-color-primary: white;--ua-color-secondary: #1668dc;--ua-color-hover: #15417e;--ua-bg-color: #001529;--ua-menu-width: 60px;--ua-result-zone-light-opacity: .8;--ua-result-zone-no-opacity: 1}.primary{color:var(--ua-color-primary)}.secondary{color:var(--ua-color-secondary)}#uuvAssistantMenu{position:fixed;top:0;z-index:10000}#uuvAssistantMenu>*{z-index:10001}#uuvAssistantResultZone{background-color:var(--ua-bg-color);position:fixed;right:var(--ua-menu-width);height:100vh;top:0;width:550px;border-right:solid 1px var(--ua-color-primary);opacity:var(--ua-result-zone-no-opacity)}#uuvAssistantResultZone header,#uuvAssistantResultZone #toolbar{padding:10px;border-bottom:solid 1px var(--ua-color-primary)}#uuvAssistantResultZone header h2{font-size:25px;margin:0}#uuvAssistantResultZone .cm-theme{overflow-y:auto;flex:1 1 auto}#uuvAssistantMainBar{position:fixed;height:100vh;top:0;right:0;background-color:var(--ua-bg-color);min-width:var(--ua-menu-width)!important;width:var(--ua-menu-width)!important;box-shadow:-1px 0 3px #aaa!important;padding:20px 0 10px}#uuvAssistantMainBar .ant-menu{width:var(--ua-menu-width)}.uuvAssistantTitle{font-size:smaller;font-weight:bolder;text-align:center}.uuvAssistantAvatarContainer{padding-bottom:10px}.uuvAssistantAvatar{background-color:transparent;height:50px;width:50px;border:1.5px solid var(--ua-color-primary)}.uuvAssistantIcon{width:40px;height:40px}.CodeMirror{overflow-y:auto}.anticon{display:inline-flex!important}.keyboardicon:hover{color:var(--ua-color-hover)!important}.keyboardicon.active{color:var(--ua-color-secondary)!important}.ant-layout-sider-children{height:100%}.ant-layout-sider-children>.ant-flex{height:100%}.ant-layout-sider-children .ant-menu{flex:1 1 auto;background-color:var(--ua-bg-color)}.ant-layout-sider-children .ant-divider{border-color:#708090;margin:10px 0}.uuv-gutter-warning{cursor:pointer}#uuvAssistantMenu .menu-custom-svg-from-black-to-white{width:30px;-webkit-filter:invert(100%);filter:invert(100%);margin:0 auto}#uuvAssistantMenu .ant-menu-submenu-title{padding:0}#uuvAssistantMenu .menu-custom-svg-container{width:100%;padding:3px}#uuvAssistantMenu .ant-menu-submenu.ant-menu-submenu-vertical{margin:20px 0}#uuvAssistantMenu .settings{background-color:var(--ua-bg-color)}";document.addEventListener("UUVAssistantReadyToLoad",t=>{var r;console.log("event listened: UUVAssistantReadyToLoad"),document.body.style.marginRight=`${parseInt(window.getComputedStyle(document.body).marginRight)+iP}px`;const e=document.getElementById("uvv-assistant-root"),n=document.getElementById("uvv-assistant-additional-layers");if(e&&n){e.classList.add("react-container");const i=e.attachShadow({mode:"open"}),o=DY.createRoot(i),s=n.attachShadow({mode:"open"});o.render(Le.jsxs(Le.Fragment,{children:[Le.jsx("style",{children:FY.toString()}),Le.jsx("div",{children:Le.jsx($Y,{translator:(r=t==null?void 0:t.detail)==null?void 0:r.translator,assistantRoot:i,assistantAdditionalLayersRoot:s})})]}))}});
|
|
413
413
|
|
|
414
414
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uuv/assistant",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.64.0",
|
|
4
4
|
"author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
|
|
5
5
|
"description": "UUV Helper used to improve the life of testers and developers by generating cucumber phrases from the GUI.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@codemirror/view": "^6.26.3",
|
|
60
60
|
"@uiw/codemirror-theme-github": "^4.22.1",
|
|
61
61
|
"@uiw/react-codemirror": "^4.22.1",
|
|
62
|
-
"@uuv/runner-commons": "2.
|
|
62
|
+
"@uuv/runner-commons": "2.59.0",
|
|
63
63
|
"antd": "5.26.5",
|
|
64
64
|
"eslint-config-react-app": "7.0.1",
|
|
65
65
|
"figlet": "1.8.1",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@types/react-dom": "18.3.7",
|
|
91
91
|
"@types/styled-components": "5.1.34",
|
|
92
92
|
"@types/testing-library__jest-dom": "5.14.9",
|
|
93
|
-
"@uuv/playwright": "3.
|
|
93
|
+
"@uuv/playwright": "3.46.0",
|
|
94
94
|
"@vitejs/plugin-react": "4.5.0",
|
|
95
95
|
"dom-accessibility-api": "0.7.0",
|
|
96
96
|
"eslint-plugin-react": "7.37.5",
|
|
@@ -111,5 +111,9 @@
|
|
|
111
111
|
"dist/uuv-assistant-resources.bundle.js",
|
|
112
112
|
"dist/launcher/**/*",
|
|
113
113
|
"postinstall.js"
|
|
114
|
-
]
|
|
114
|
+
],
|
|
115
|
+
"funding": {
|
|
116
|
+
"type": "opencollective",
|
|
117
|
+
"url": "https://opencollective.com/uuv"
|
|
118
|
+
}
|
|
115
119
|
}
|