@burdenoff/ui-engine 2026.1202.2 → 2026.1204.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/analyze.js +1 -1
- package/dist/dom-runtime.iife.js +1 -1
- package/dist/dom-runtime.js +1 -1
- package/dist/drivers.js +9 -9
- package/dist/heal.js +4 -4
- package/dist/{index-yc0jgph6.js → index-0tfzfxx9.js} +5 -0
- package/dist/{index-8w31tpfq.js → index-3r2y0mnc.js} +4 -4
- package/dist/index-5pv673wd.js +1122 -0
- package/dist/{index-pfdm8evf.js → index-8eb4xd1j.js} +433 -2
- package/dist/{index-6h7ah1dw.js → index-9xgz8dxt.js} +1 -1
- package/dist/{index-g7724awk.js → index-axph39g0.js} +22 -0
- package/dist/{index-xdtanv9b.js → index-dwp10g62.js} +1 -1
- package/dist/{index-qg9yfr7r.js → index-n7ah1jn7.js} +144 -3
- package/dist/{index-qm9nd548.js → index-ptrmf779.js} +3 -3
- package/dist/{index-3hsp44k5.js → index-vpm1gnmy.js} +6 -6
- package/dist/{index-rs3yzt5q.js → index-wnch00m6.js} +4 -4
- package/dist/{index-70vm0qz8.js → index-zagmp5ya.js} +1 -1
- package/dist/{index-hw5npwsv.js → index-zpxk3fzd.js} +1 -1
- package/dist/index.js +105 -11
- package/dist/interpret/errors.d.ts +7 -1
- package/dist/interpret.js +5 -5
- package/dist/script/desktop-capabilities.d.ts +120 -0
- package/dist/script/desktop-schema.d.ts +279 -0
- package/dist/script/desktop-types.d.ts +265 -0
- package/dist/script/fingerprint.d.ts +10 -1
- package/dist/script/hash.d.ts +9 -0
- package/dist/script/index.d.ts +12 -4
- package/dist/script/json-schema.d.ts +8 -0
- package/dist/script/parse.d.ts +29 -0
- package/dist/script/schema.d.ts +2098 -1
- package/dist/script/walk.d.ts +18 -4
- package/dist/script.js +99 -5
- package/dist/target/container.d.ts +47 -0
- package/dist/target/index.d.ts +1 -0
- package/dist/target/methods.d.ts +2 -0
- package/dist/target/types.d.ts +18 -1
- package/dist/target.js +19 -1
- package/dist/testing.js +2 -2
- package/package.json +4 -2
- package/schema/ui-script-desktop-v1.schema.json +12181 -0
- package/dist/index-68x61c7a.js +0 -743
package/README.md
CHANGED
|
@@ -94,6 +94,8 @@ The resolver and the runtime implement spec 05 section 3 for web pages (plan P1-
|
|
|
94
94
|
|
|
95
95
|
A candidate carries `role`, `name` (cut to 200 characters; empty for sensitive elements; for typed content, an editor or a text area or anything inside one, only the name its labels give), `bounds` (CSS pixels in the top viewport) and the matching `method` and `methodIndex`. The interpreter maps the codes to node error families (see below).
|
|
96
96
|
|
|
97
|
+
**Containers of ambiguous candidates** (BOFF-17588). An `ELEMENT_AMBIGUOUS` candidate can also carry `container: { anchor, role }`: the nearest labelled container or landmark around it that tells it apart. `anchor` is a `UiAnchor`, so the proposal for "use this one" is the method `{ kind: 'anchor', anchor, relation: 'inside', role: <the candidate's role> }`; `role` is the container's own role for display (`''` when it has none). Two kinds are described, nearest first: a landmark or named grouping (`CONTAINER_ROLES`: `region`, `form`, `navigation`, `group`, `dialog`, `row`, `listitem` and others; a `fieldset`, `table` or `figure` is named by its legend or caption) as a `role` anchor with its accessible name, and an element titled by its first visible heading-like child: a heading as the role anchor `{ kind: 'role', role: 'heading', name }` (checking it reads the names of headings only), a `summary` or `dt` as a `text` anchor on its text. An `inside` method filters by role, not by name, so a container is found only when it holds no other element of the candidate's role in the required state: a Save button next to a Cancel button in the same titled section gets no container (the UI script schema has no way to say both, and it does not change here). The engine reports a container only after running that `inside` method on the same page, in the resolution's state, and finding this candidate and nothing else, so a proposal can be offered as it is (a caller replaying on a stored snapshot should still check it there). The field is absent when no container within 12 ancestors (`MAX_CONTAINER_DEPTH`) tells the candidate apart, for a candidate with no role, for a sensitive candidate, and on every other code and on found elements. **Cost limits.** An ambiguous target is polled until its wait runs out, and every poll resolves it again, so the work is bounded per resolution: at most 3 checks per candidate (`MAX_CONTAINER_CHECKS`), 8 for all candidates together (`MAX_CONTAINER_CHECKS_PER_RESOLUTION`), no new check and no further walking after 25 ms (`CONTAINER_TIME_BUDGET_MS`), at most two names read per ancestor, and none at all when the search root holds more than 5,000 elements (`MAX_CONTAINER_PAGE_ELEMENTS`). Candidates of one resolution share the answers of the checks already run, which cost nothing again. A candidate past those limits simply has no container. **Size.** Names and titles longer than 200 characters, or holding a control character, are skipped, never cut, and nothing is read from a sensitive element or from typed content. A container is at most about 700 bytes of JSON (200 UTF-16 code units at up to 3 bytes each, plus its role and keys), so it adds at most about 3.5 KB to five candidates. The UI script schema and its hash do not change. `describeContainer(element, root, keep, probe?, budget?)` and `createContainerBudget(now?)` are exported from `./target` for callers that want the same answer for an element they hold; a budget belongs to one resolution of one page state and must not be kept longer.
|
|
98
|
+
|
|
97
99
|
**Methods on the web.** `role` compares the computed role and accessible name (a compact accname subset; form fields never take a name from their value) after NFKC, whitespace and case normalisation; `app` and `window` are desktop fields and are ignored. `css` and `xpath` use the page's engines (`xpath` is `unsupported` where the DOM has none). `testId` compares an attribute (default `data-testid`). `fuzzy` scores the edit-distance similarity of names (threshold 0.8 by default, never below 0.5). `anchor` finds a text or role anchor, then the element `inside` it (or inside the heading's container) or the nearest element `leftOf`, `rightOf`, `above`, `below` or on the `sameRow`, from element bounds. `text` matches the innermost element whose visible text contains (or, with `exact`, equals) the text.
|
|
98
100
|
|
|
99
101
|
**The runtime.** `createDomRuntime(document)` returns `{ version, resolve, act, highlight, clearHighlight, snapshot }`; every result is plain JSON. `act(target, action)` resolves first and acts only on exactly one element: `click` (left, middle, right), `doubleClick`, `hover`, `focus`, `type` (through the value setter, with `input` and `change`; `append` optional), `clear`, `select` (by value, effective label or index), `check` (confirmed afterwards), `pressKey` (with the browser's defaults: Enter activates a button, link or summary or performs implicit submission through the default button; Space activates a button, checkbox, radio or summary), `scroll`, `scrollIntoView`, `getText`, `getValue`, `getAttribute` and `exists`. Pointer events follow a real mouse: entry events on every element entered, the held button in `buttons` on press, the click count in `detail`, the element centre as coordinates, focus moved to the nearest focusable element, and cancelled `pointerdown` or `mousedown` honoured. Action problems are `INVALID_ACTION`, `NOT_EDITABLE`, `NOT_SELECTABLE`, `NOT_CHECKABLE`, `OPTION_NOT_FOUND`, `STATE_NOT_CHANGED` (a handler cancelled a `check`) and `SENSITIVE_ELEMENT` (reads of password, one-time-code, card and secret-named fields, of content inside them, and of elements under `data-sensitive`, `data-private` or `data-fg-sensitive`, across shadow roots, slots and frames, are refused). Typed text and read values never appear in a result's report fields. `highlight` outlines the element, or numbers the candidates of an ambiguous target, in a closed shadow root using the system `Highlight` colour; the overlay is removed before every resolve, act or snapshot.
|
package/dist/analyze.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
UI_ANALYZER_RULE_IDS2,
|
|
11
11
|
UI_ANALYZER_DEFAULT_SEVERITY2,
|
|
12
12
|
analyzeUiScript2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-dwp10g62.js";
|
|
14
14
|
export {
|
|
15
15
|
UI_ANALYZER_DEFAULT_SEVERITY2 as UI_ANALYZER_DEFAULT_SEVERITY,
|
|
16
16
|
UI_ANALYZER_RULES2 as UI_ANALYZER_RULES,
|
package/dist/dom-runtime.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var U=["data-fg-sensitive","data-sensitive","data-private"];function Z(e){return U.some((t)=>e.hasAttribute(t))}function _(e){let t=e.assignedSlot;if(t!==void 0)return t;let n=e.parentElement?.shadowRoot;if(!n)return null;for(let o of Array.from(n.querySelectorAll("slot")))if((typeof o.assignedNodes==="function"?o.assignedNodes():[]).includes(e))return o;return null}function x(e){let t=_(e);if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();if(n&&"host"in n)return n.host;try{return e.ownerDocument.defaultView?.frameElement??null}catch{return null}}function y(e){for(let t=e;t;t=x(t))if(Z(t))return!0;return!1}var me={button:"button",submit:"button",reset:"button",image:"button",checkbox:"checkbox",radio:"radio",range:"slider",number:"spinbutton",search:"searchbox",email:"textbox",tel:"textbox",text:"textbox",url:"textbox",password:"textbox",date:"textbox","datetime-local":"textbox",month:"textbox",time:"textbox",week:"textbox",color:"textbox",file:"button"},pe={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",hr:"separator",li:"listitem",main:"main",menu:"list",meter:"meter",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",p:"paragraph",progress:"progressbar",summary:"button",table:"table",tbody:"rowgroup",td:"cell",textarea:"textbox",tfoot:"rowgroup",thead:"rowgroup",tr:"row",ul:"list"},be=new Set(["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"]);var Y=256;function g(e){return(e??"").normalize("NFKC").replace(/\s+/g," ").trim().toLowerCase()}function P(e,t){return g(e)===g(t)}function he(e,t){let n=g(t);return n.length>0&&g(e).includes(n)}function Ye(e,t){if(e===t)return 0;if(e.length===0)return t.length;if(t.length===0)return e.length;let n=Array.from({length:t.length+1},(o,r)=>r);for(let o=1;o<=e.length;o+=1){let r=[o];for(let i=1;i<=t.length;i+=1){let s=e[o-1]===t[i-1]?0:1;r[i]=Math.min((n[i]??0)+1,(r[i-1]??0)+1,(n[i-1]??0)+s)}n=r}return n[t.length]??0}function Ee(e,t){let n=g(e).slice(0,256),o=g(t).slice(0,256),r=Math.max(n.length,o.length);if(r===0)return 0;return 1-Ye(n,o)/r}function v(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}var Q=512,Je=65536,Qe=new Set(["button","input","meter","output","progress","select","textarea"]),et=new Set(["script","style","noscript","template","head","title","meta","link"]);function A(e){return e.localName.toLowerCase()}function ge(e){return e.parentElement?.closest("article, aside, main, nav, section")!=null}function tt(e){let t=A(e);switch(t){case"a":case"area":return e.hasAttribute("href")?"link":"";case"input":{let n=(e.getAttribute("type")??"text").toLowerCase();if(n==="hidden")return"";if(e.hasAttribute("list")&&["text","search","email","tel","url"].includes(n))return"combobox";return me[n]??"textbox"}case"select":{let n=Number(e.getAttribute("size")??"0");return e.hasAttribute("multiple")||n>1?"listbox":"combobox"}case"img":return e.getAttribute("alt")===""?"presentation":"img";case"th":return e.getAttribute("scope")==="row"?"rowheader":"columnheader";case"header":return ge(e)?"":"banner";case"footer":return ge(e)?"":"contentinfo";case"section":case"form":return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?t==="form"?"form":"region":"";default:return pe[t]??""}}function R(e){let t=e.getAttribute("role")?.trim().split(/\s+/)[0];return t?t.toLowerCase():tt(e)}function nt(e,t){let n=e.getRootNode();return typeof n.getElementById==="function"?n.getElementById(t):null}function ot(e){return e.hasAttribute("hidden")||e.getAttribute("aria-hidden")==="true"}function rt(e){let t=e.ownerDocument.defaultView;if(!t)return"none";let n=t.getComputedStyle(e);if(n.display==="none")return"subtree";return n.visibility==="hidden"||n.visibility==="collapse"?"self":"none"}function I(e){let t=e.getAttribute("contenteditable");if(t===null)return!1;let n=t.trim().toLowerCase();return n===""||n==="true"||n==="plaintext-only"}function it(e){if(e.shadowRoot)return Array.from(e.shadowRoot.childNodes);if(A(e)==="slot"){let t=e,n=typeof t.assignedNodes==="function"?t.assignedNodes({flatten:!0}):[];if(n.length>0)return n}return Array.from(e.childNodes)}var st=/^(div|p|li|tr|td|th|br|h[1-6]|section|article|header|footer)$/;function O(e,t){if(e.remaining<=0||t.length===0)return;let n=t.slice(0,e.remaining);e.parts.push(n),e.remaining-=n.length}function Te(e,t,n,o,r,i=!1){if(t>32||n.remaining<=0)return;if(e.nodeType===3){if(!i)O(n,e.textContent??"");return}if(e.nodeType!==1)return;let s=e,a=A(s);if(et.has(a)||Z(s))return;if(!r&&ot(s))return;let l=!1;if(t>0&&!r){let d=o?.isVisible?.(s);if(d===!1)l=!0;else if(d===void 0){let c=rt(s);if(c==="subtree")return;l=c==="self"}}let u=s.getAttribute("aria-label")?.trim();if(u&&t>0&&!l){O(n,` ${u} `);return}if(a==="img"||a==="input"&&s.getAttribute("type")==="image"){if(!l)O(n,` ${s.getAttribute("alt")??""} `);return}if(a==="input"||a==="textarea"||a==="select")return;if(t>0&&I(s))return;let f=t>0&&st.test(a);if(f)O(n," ");for(let d of it(s))Te(d,t+1,n,o,r,l);if(f)O(n," ")}function xe(e){if(A(e)==="textarea"||I(e))return!0;for(let n=x(e);n;n=x(n))if(A(n)==="textarea"||I(n))return!0;return!1}function Ae(e){for(let t=x(e);t;t=x(t)){let n=A(t);if(n==="textarea"||n==="select"||I(t))return!0}return!1}function H(e,t,n=!1){let o=A(e);if(o==="textarea"||o==="select"||I(e)||Ae(e)||y(e))return"";return E(e.getAttribute("aria-label")??"")||V(e,t,Q,n)}function V(e,t,n=Q,o=!1){if(e.nodeType===1&&y(e))return"";let r={parts:[],remaining:n*2+64};return Te(e,0,r,t,o),E(r.parts.join(""),n)}function E(e,t=Q){return e.replace(/\s+/g," ").trim().slice(0,t)}function at(e,t){let n=[],o=e.getAttribute("id");if(o){let i=e.getRootNode();for(let s of Array.from(i.querySelectorAll("label")))if(s.getAttribute("for")===o)n.push(H(s,t,!0))}let r=e.closest("label");if(r&&!r.hasAttribute("for"))n.push(H(r,t,!0));return E(n.join(" "))}function J(e,t,n){let o=Array.from(e.children).find((r)=>A(r)===t);return o?H(o,n):""}function k(e,t){return Se(e,t,!0)}function ye(e,t){return Se(e,t,!1)}function lt(e,t){let n=Array.from(e.children).find((o)=>A(o)==="title");if(!n||y(n)||Ae(n))return"";return E(Array.from(n.childNodes).map((o)=>V(o,t)).join(" "))}function Se(e,t,n){let o=e.getAttribute("aria-labelledby");if(o){let l=o.split(/\s+/).filter(Boolean).map((u)=>nt(e,u)).filter((u)=>u!==null).map((u)=>H(u,t,!0)).join(" ");if(E(l))return E(l)}let r=e.getAttribute("aria-label");if(r&&E(r))return E(r);let i=A(e);if(Qe.has(i)){let l=at(e,t);if(l)return l}if(i==="input"){let l=(e.getAttribute("type")??"text").toLowerCase();if(l==="button"||l==="submit"||l==="reset"){let u=e.getAttribute("value");if(u!==null)return E(u);return l==="submit"?"Submit":l==="reset"?"Reset":""}if(l==="image")return E(e.getAttribute("alt")??"")}if(i==="img"||i==="area"){let l=e.getAttribute("alt");if(l)return E(l)}if(i==="svg"){let l=lt(e,t);if(l)return l}if(i==="fieldset"){let l=J(e,"legend",t);if(l)return l}if(i==="table"){let l=J(e,"caption",t);if(l)return l}if(i==="option"){let l=E(e.getAttribute("label")??"");if(l)return l}if(i==="figure"){let l=J(e,"figcaption",t);if(l)return l}if(n&&be.has(R(e))){let l=V(e,t);if(l)return l}let s=e.getAttribute("title");if(s&&E(s))return E(s);let a=e.getAttribute("placeholder");if(a&&E(a))return E(a);return""}function F(e,t){if(A(e)==="input"){let o=(e.getAttribute("type")??"text").toLowerCase();return o==="button"||o==="submit"||o==="reset"?k(e,t):""}return V(e,t,Je)}function ee(e,t,n,o){return R(e)===t.trim().toLowerCase()&&g(k(e,o))===g(n)}function ut(e){return e.ownerDocument.defaultView}function B(e){let t=_(e);if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n&&"host"in n?n.host:null}function N(e,t){let n=t?.isVisible?.(e);if(n!==void 0)return n;if(!e.isConnected)return!1;let o=ut(e),r=e;while(r){if(r.hasAttribute("hidden"))return!1;if(r.localName==="input"&&r.getAttribute("type")?.toLowerCase()==="hidden")return!1;if(o&&o.getComputedStyle(r).display==="none")return!1;r=B(r)}if(o){let s=o.getComputedStyle(e);if(s.visibility==="hidden"||s.visibility==="collapse")return!1;if(s.display==="contents")return!0}let i=e.checkVisibility;return typeof i==="function"?i.call(e):!0}function w(e){for(let n=e;n;n=x(n))if(n.getAttribute("aria-disabled")==="true"||n.hasAttribute("inert"))return!1;if(!ct.has(e.localName)){let n=e.parentElement?.closest("button, select, option, optgroup, textarea");return n?w(n):!0}if(e.hasAttribute("disabled"))return!1;let t=e.parentElement?.closest("fieldset[disabled]");if(t){if(!Array.from(t.children).find((o)=>o.localName==="legend")?.contains(e))return!1}try{return!e.matches(":disabled")}catch{return!0}}var ct=new Set(["button","input","select","textarea","optgroup","option","fieldset"]);function D(e,t,n){let r=t?.rectOf?.(e)??e.getBoundingClientRect();return{x:Math.round(r.x+(n?.x??0)),y:Math.round(r.y+(n?.y??0)),width:Math.round(r.width),height:Math.round(r.height)}}function C(e){let t=Array.from(e.querySelectorAll("*"));return e.nodeType===1?[e,...t]:t}var dt=/password|passcode|passwd|\bpin\b|otp|one[\s-]?time|verification|security code|auth(?:entication)? code|\bcvv\b|\bcvc\b|card number|secret|token|recovery/i,ft=/password|one-time-code|^cc-/i;function mt(e){return dt.test(e)}function S(e){if(y(e))return!0;if(Me(e))return!0;for(let t=x(e);t;t=x(t))if(Me(t))return!0;return!1}function Me(e){let t=e.localName,n=e.getAttribute("contenteditable"),o=n!==null&&n.trim().toLowerCase()!=="false";if(t!=="input"&&t!=="textarea"&&t!=="select"&&!o)return!1;if(e.getAttribute("type")?.toLowerCase()==="password")return!0;if((e.getAttribute("autocomplete")??"").trim().split(/\s+/).filter(Boolean).some((i)=>ft.test(i)))return!0;return pt(e).some((i)=>i.length>0&&mt(i.replace(/[-_]/g," ")))}function pt(e){let t=(a)=>(a??"").slice(0,512),n=[k(e),t(e.getAttribute("aria-label")),t(e.getAttribute("placeholder")),t(e.getAttribute("title")),t(e.getAttribute("name")),t(e.getAttribute("id"))],o=e.getRootNode(),r=(a)=>typeof o.getElementById==="function"?o.getElementById(a):null;for(let a of(e.getAttribute("aria-labelledby")??"").split(/\s+/).filter(Boolean)){let l=r(a);if(l)n.push(t(l.getAttribute("aria-label")),t(l.textContent))}let i=e.getAttribute("id"),s=Array.from(o.querySelectorAll("label")).filter((a)=>i!==null&&a.getAttribute("for")===i||!a.hasAttribute("for")&&a.contains(e));for(let a of s)n.push(t(a.getAttribute("aria-label")),t(a.textContent));return n}var bt=0.8,ht=0.05,Et=4,Re=1000,z=2,gt=new Set(["button","checkbox","combobox","link","listbox","menuitem","menuitemcheckbox","menuitemradio","option","radio","searchbox","slider","spinbutton","switch","tab","textbox","treeitem"]),Tt=/^[A-Za-z_][\w:.-]{0,127}$/;function xt(e){return e.nodeType===9?e:e.ownerDocument}function At(e,t){return{kind:"list",elements:C(t.root).filter((o)=>ee(o,e.role,e.name,t.probe)),...e.nth!==void 0?{nth:e.nth}:{}}}function yt(e,t){try{return{kind:"list",elements:Array.from(t.root.querySelectorAll(e))}}catch{return{kind:"invalid"}}}function St(e,t){let n=e.attribute??"data-testid";if(!Tt.test(n))return{kind:"invalid"};return{kind:"list",elements:C(t.root).filter((r)=>r.getAttribute(n)===e.value)}}function Mt(e,t){if(e.nodeType===9)return t.ownerDocument===e&&t.getRootNode()===e;return e===t||e.contains(t)}function Rt(e,t){let n=xt(t.root);if(typeof n.evaluate!=="function")return{kind:"unsupported"};let o;try{o=n.evaluate(e.xpath,t.root,null,7,null)}catch{return{kind:"invalid"}}let r=[],i=Math.min(o.snapshotLength,Re);for(let s=0;s<i;s+=1){let a=o.snapshotItem(s);if(a&&a.nodeType===1&&Mt(t.root,a))r.push(a)}return{kind:"list",elements:r,...o.snapshotLength>Re?{overflow:!0}:{}}}function kt(e,t,n){let o=Math.min(g(e).length,Y),r=Math.max(o,t);return r>0&&Math.abs(o-t)<=(1-n)*r}function Nt(e,t){let n=Math.min(1,Math.max(0.5,e.threshold??bt)),o=e.role?.trim().toLowerCase(),r=Math.min(g(e.name).length,Y),i=[];for(let s of C(t.root)){let a=R(s);if(o?a!==o:a==="")continue;let l=k(s,t.probe);if(!kt(l,r,n))continue;let u=Ee(l,e.name);if(u>=n)i.push({element:s,score:u})}return{kind:"ranked",scored:i,margin:ht}}function we(e,t){let n=C(e.root).filter((i)=>t(F(i,e.probe))),o=e.keep??(()=>!0),r=n.filter(o);return n.filter((i)=>!r.some((s)=>s!==i&&i.contains(s)))}function wt(e,t){let n=e.exact?(o)=>P(o,e.text):(o)=>he(o,e.text);if(g(e.text).length===0)return{kind:"list",elements:[]};return{kind:"list",elements:we(t,n),...e.nth!==void 0?{nth:e.nth}:{}}}function te(e){return g(e).replace(/[\s:*]+$/u,"")}function Ct(e,t){return(e.kind==="role"?C(t.root).filter((o)=>ee(o,e.role,e.name,t.probe)):we(t,(o)=>te(o)===te(e.text)&&te(o)!=="")).filter((o)=>N(o,t.probe))}function Ce(e,t,n){let o=e.role?.trim().toLowerCase();return C(t.root).filter((r)=>{let i=R(r);if(o?i!==o:!gt.has(i))return!1;return!n.some((s)=>s===r||r.contains(s))})}var vt=new Set(["h1","h2","h3","h4","h5","h6","legend","caption","figcaption","summary","dt"]);function Dt(e){return vt.has(e.localName)||R(e)==="heading"}function _t(e){for(let t=e;t;t=t.parentElement)if(Dt(t))return t;return null}function Ot(e,t,n){let o=Ce(e,t,n),r=new Set;for(let i of n){let a=_t(i)?.parentElement??i;for(let l of o)if(a.contains(l))r.add(l)}return{kind:"list",elements:o.filter((i)=>r.has(i))}}function ke(e,t,n,o){return e<o&&n<t}function It(e,t,n){let o=t.x+t.width,r=t.y+t.height,i=n.x+n.width,s=n.y+n.height,a=ke(t.y,r,n.y,s),l=ke(t.x,o,n.x,i);switch(e){case"rightOf":return a&&n.x>=o-z?Math.max(0,n.x-o):null;case"leftOf":return a&&i<=t.x+z?Math.max(0,t.x-i):null;case"below":return l&&n.y>=r-z?Math.max(0,n.y-r):null;case"above":return l&&s<=t.y+z?Math.max(0,t.y-s):null;case"sameRow":return a?Math.abs(n.x+n.width/2-(t.x+t.width/2)):null;default:return null}}function Ne(e){return e.width>0&&e.height>0}function Lt(e,t){let n=Ct(e.anchor,t);if(n.length===0)return{kind:"list",elements:[]};if(e.relation==="inside")return Ot(e,t,n);let o=n.map((i)=>D(i,t.probe)).filter(Ne);if(o.length===0)return{kind:"unsupported"};let r=[];for(let i of Ce(e,t,n)){let s=D(i,t.probe);if(!Ne(s))continue;let a=null;for(let l of o){let u=It(e.relation,l,s);if(u!==null&&(a===null||u<a))a=u}if(a!==null)r.push({element:i,score:-a})}return{kind:"ranked",scored:r,margin:Et}}function ve(e,t){switch(e.kind){case"role":return At(e,t);case"css":return yt(e.selector,t);case"testId":return St(e,t);case"xpath":return Rt(e,t);case"fuzzy":return Nt(e,t);case"anchor":return Lt(e,t);case"text":return wt(e,t);default:return{kind:"unsupported"}}}var De=5,_e=200;var Wt={x:0,y:0,width:0,height:0};function Ut(e,t,n){let o={root:e,offset:Wt,hidden:!1,disabled:!1};for(let[r,i]of(t??[]).entries()){let s;try{s=Array.from(o.root.querySelectorAll(i))}catch{return{index:r,reason:"invalid"}}if(s.length===0)return{index:r,reason:"notFound"};if(s.length>1)return{index:r,reason:"ambiguous"};let a=s[0],l=a.localName;if(l==="iframe"||l==="frame"){let u=a,f=null;try{f=u.contentDocument}catch{f=null}if(!f)return{index:r,reason:"inaccessible"};let d=D(a,n,o.offset);o={root:f,offset:{x:d.x+u.clientLeft,y:d.y+u.clientTop,width:0,height:0},hidden:o.hidden||!N(a,n),disabled:o.disabled||!w(a)}}else if(a.shadowRoot)o={root:a.shadowRoot,offset:o.offset,hidden:o.hidden,disabled:o.disabled};else return{index:r,reason:"notAFrame"}}return o}function Pt(e,t,n,o){if(t==="attached")return!0;if(n.hidden||!N(e,o))return!1;return t==="visible"||!n.disabled&&w(e)}function Oe(e,t,n,o,r){return{role:R(e),name:S(e)?"":v(xe(e)?ye(e,r):k(e,r),_e),bounds:D(e,r,o),method:t.kind,methodIndex:n}}function Ht(e,t,n,o=!1){if(t.length===0)return e.length>0?{outcome:"notInteractable",elements:e,matches:0}:{outcome:"none",elements:[],matches:0};if(o)return{outcome:"ambiguous",elements:t,matches:t.length};if(n!==void 0){let r=t[n];return r?{outcome:"found",element:r,matches:t.length}:{outcome:"none",elements:[],matches:t.length}}return t.length===1?{outcome:"found",element:t[0],matches:1}:{outcome:"ambiguous",elements:t,matches:t.length}}function Vt(e,t,n){if(t.length===0)return e.length>0?{outcome:"notInteractable",elements:e.map((a)=>a.element),matches:0}:{outcome:"none",elements:[],matches:0};let o=[...t].sort((a,l)=>l.score-a.score),r=o[0],i=o[1];if(!i||r.score-i.score>=n)return{outcome:"found",element:r.element,matches:t.length};let s=o.filter((a)=>r.score-a.score<n).map((a)=>a.element);return{outcome:"ambiguous",elements:s,matches:s.length}}function Ft(e,t){switch(e.kind){case"invalid":case"unsupported":return e.kind;case"list":return Ht(e.elements,e.elements.filter(t),e.nth,e.overflow);case"ranked":return Vt(e.scored,e.scored.filter((n)=>t(n.element)),e.margin)}}function X(e,t,n=[],o=0,r){return{status:"failed",code:e,candidates:n,candidateCount:o,attempts:t,...r?{frame:r}:{}}}function Ie(e,t,n={}){let o=n.state??"interactable",r=Ut(e,t.frame,n);if(!("root"in r)){let d=t.methods.map((c,p)=>({index:p,method:c.kind,outcome:"notTried",matches:0}));return X("ELEMENT_NOT_FOUND",d,[],0,r)}let i=[],s=t.methods.findIndex((d)=>d.enabled!==!1),a,l,u;for(let[d,c]of t.methods.entries()){if(u){i.push({index:d,method:c.kind,outcome:"notTried",matches:0});continue}if(c.enabled===!1){i.push({index:d,method:c.kind,outcome:"disabled",matches:0});continue}let p=(b)=>Pt(b,o,r,n),m=Ft(ve(c,{root:r.root,probe:n,keep:p}),p);if(m==="invalid"||m==="unsupported"){i.push({index:d,method:c.kind,outcome:m,matches:0});continue}if(i.push({index:d,method:c.kind,outcome:m.outcome,matches:m.matches}),m.outcome==="found")u={element:m.element,method:c,index:d};else if(m.outcome==="ambiguous"&&!a)a={elements:m.elements,method:c,index:d,count:m.matches};else if(m.outcome==="notInteractable"&&!l)l={elements:m.elements,method:c,index:d}}if(u)return{status:"found",element:u.element,method:u.method.kind,methodIndex:u.index,fallback:u.index!==s,candidate:Oe(u.element,u.method,u.index,r.offset,n),attempts:i};let f=(d)=>d.elements.slice(0,De).map((c)=>Oe(c,d.method,d.index,r.offset,n));if(a)return X("ELEMENT_AMBIGUOUS",i,f(a),a.count);if(l)return X("ELEMENT_NOT_INTERACTABLE",i,f(l),l.elements.length);return X("ELEMENT_NOT_FOUND",i)}var ne="[REDACTED]",Bt=[/\b(?:Bearer|Basic)\s+[^\s"'`,;)\]}]+/gi,/\b(?:sk|pk|rk|xai)-[^\s"'`,;)\]}]+/gi,/\b(?:gsk|hf|ghp|gho|ghs|ghu|glpat)_[^\s"'`,;)\]}]+/gi,/\bAIza[\w-]{10,}/g,/\b(?:AKIA|ASIA)[0-9A-Z]{12,}/g],zt=/([\s"'`,;:=()[\]{}]+)/,Xt=/^(?:api[_-]?key|access[_-]?key|secret|secret[_-]?key|client[_-]?secret|token|password)$/i;function Kt(e){let t=e.indexOf("…");return e.includes("***")||t!==-1&&t<e.length-1}function jt(e){let t=e.split(zt);for(let n=0;n<t.length;n+=2){let o=t[n]??"";if(o&&o!=="[REDACTED]"&&Kt(o))t[n]="[REDACTED]";let r=t[n+1]??"";if(t[n+2]&&Xt.test(o)&&/[:=]/.test(r))t[n+2]="[REDACTED]"}return t.join("")}function oe(e){if(!e)return e;let t=e;for(let n of Bt)t=t.replace(n,"[REDACTED]");return t=jt(t),t.replace(/(?:\[REDACTED\]){2,}/g,"[REDACTED]")}var Le="";function K(e){if(!e)return!1;let t=e.replaceAll("[REDACTED]",Le);return oe(t).replaceAll(Le,"[REDACTED]")!==e}function re(e){try{return decodeURIComponent(e.replaceAll("+"," "))}catch{return e}}function We(e){return K(re(e).replace(/[/?&#]/g," "))}var $t=500,Ue=/reset|recover|verify|verification|magic|confirm|activate|invite|unsubscribe/i;function Gt(e){let t=e;for(let n=0;n<3;n+=1){let o=re(t);if(o===t)break;t=o}return t}function qt(e){let t=e.split(/[/?#;]/),n=t.findIndex((r)=>Ue.test(r));return t.slice(0,n+1).map((r)=>K(r)?ne:r).join("/")}function ie(e){let t=e.trim();if(t==="")return null;let n=/^[a-z][a-z0-9+.-]*:/i.test(t)||t.startsWith("//"),o="",r;if(n){let f;try{f=new URL(t.startsWith("//")?`https:${t}`:t)}catch{return null}if(f.protocol!=="http:"&&f.protocol!=="https:")return null;o=t.startsWith("//")?`//${f.host}`:f.origin,r=f.pathname}else r=t.split(/[?#]/)[0]??"";let i=r.split("/"),s=i.map(Gt),a=s.findIndex((f)=>Ue.test(f)),u=(a>=0?i.slice(0,a+1):i).map((f,d)=>{let c=s[d]??f;if(d===a)return qt(c);return K(c)||We(f)?ne:f}).join("/");return v(`${o}${u}`,$t)}var Zt=1,Yt=5000,Jt=64,Qt=500,en=new Set(["script","style","noscript","template","link","meta","base","head","object","embed"]),tn=new Set(["textarea"]),nn=new Set(["id","class","role","name","type","for","title","alt","placeholder","label","autocomplete","tabindex","disabled","readonly","hidden","inert","contenteditable","list","multiple","size","scope","slot","part","lang","dir","data-testid","data-test","data-test-id","data-qa","data-cy","data-automation-id",...U]),on=new Set(["aria-valuenow","aria-valuetext","aria-checked","aria-selected","aria-pressed"]),rn=new Set(["button","submit","reset"]),sn=/^[a-z][a-z0-9-]{0,63}$/;var an=/^[a-z][a-z0-9_:.-]{0,127}$/;function He(e){let t=e.getAttribute("contenteditable");return t!==null&&t.trim().toLowerCase()!=="false"}function Ve(e){for(let t=x(e);t;t=x(t))if(t.localName==="textarea"||He(t))return!0;return!1}function ln(e){if(!e.parentElement?.shadowRoot)return!1;let t=_(e);return t!==null&&(S(t)||Ve(t))}function j(e){return v(oe(e),Qt)}var un=new Set(["alt","label","title","placeholder","value","aria-label","aria-description","aria-roledescription","aria-placeholder"]),cn=new Set(["aria-hidden","aria-disabled","aria-expanded","aria-haspopup","aria-controls","aria-owns","aria-labelledby","aria-describedby","aria-level","aria-current","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-readonly","aria-required","aria-invalid","aria-busy","aria-live","aria-atomic","aria-posinset","aria-setsize","aria-colcount","aria-colindex","aria-colspan","aria-rowcount","aria-rowindex","aria-rowspan","aria-sort"]);function dn(e,t){let n={},o=e.localName;for(let r of Array.from(e.attributes)){let i=r.name.toLowerCase();if(i.startsWith("on")||!an.test(i))continue;if(t&&(un.has(i)||i==="href"||i.startsWith("aria-")&&!cn.has(i)))continue;if(nn.has(i)||i.startsWith("aria-")&&!on.has(i))n[i]=j(r.value);else if(i==="href"&&(o==="a"||o==="area")){let s=ie(r.value);if(s!==null)n[i]=s}else if(i==="value"&&o==="input"&&rn.has((e.getAttribute("type")??"").toLowerCase()))n[i]=j(r.value)}return Object.keys(n).length>0?n:void 0}function fn(e,t){let n=t?.rectOf?.(e)??e.getBoundingClientRect(),o=[Math.round(n.x),Math.round(n.y),Math.round(n.width),Math.round(n.height)];return o[2]>0||o[3]>0?o:void 0}function Pe(e,t,n,o,r){let i=[];for(let s of Array.from(e.childNodes)){if(t.count>=t.max){t.truncated=!0;break}if(s.nodeType===3){if(!o||ln(s))continue;let a=s.textContent??"";if(a.length===0)continue;let l=a.trim()===""?" ":j(a);t.count+=1,i.push(l)}else if(s.nodeType===1){let a=G(s,t,n+1,o,r);if(a)i.push(a)}}return i}function G(e,t,n,o,r){let i=e.localName.toLowerCase();if(en.has(i)||!sn.test(i))return null;if(n>Jt)return t.truncated=!0,null;t.count+=1;let s={t:i},a=Ve(e),l=r||a||y(e),u=dn(e,l);if(u)s.a=u;if(N(e,t.probe)){let b=fn(e,t.probe);if(b)s.r=b}else s.h=1;let f=S(e),d=o&&!a&&!f&&!tn.has(i)&&!He(e),c=l||!d;if(i==="svg"){let b=Array.from(e.children).find((T)=>T.localName==="title"),h=b?G(b,t,n+1,d,c):null;if(h)s.c=[h];return s}if(i==="iframe"||i==="frame"){let b=null;try{b=e.contentDocument}catch{b=null}let h=b?.documentElement;if(h){let T=G(h,t,n+1,d,c);if(T)s.f=T}return s}let p=Pe(e,t,n,d,c);if(p.length>0)s.c=p;let m=e.shadowRoot;if(m){let b=Pe(m,t,n,d,c);if(b.length>0)s.s=b}return s}function mn(e){let t=e.querySelector("title");if(t&&y(t))return"";return j(e.title??"")}function Fe(e,t={}){let n={count:0,max:Math.max(1,t.maxNodes??Yt),truncated:!1,probe:t},o=G(e.documentElement,n,0,!0,!1)??{t:"html"},r=e.defaultView;return{snapshotVersion:Zt,url:ie(e.URL)??"",title:mn(e),viewport:{width:Math.round(r?.innerWidth??0),height:Math.round(r?.innerHeight??0)},root:o,nodeCount:n.count,truncated:n.truncated}}var se=65536,pn=65536,ze=new Set(["getText","getValue","getAttribute","exists"]),Xe=new Set(["click","doubleClick","hover","check"]);function bn(e){return e.ownerDocument.defaultView}var hn={left:0,middle:1,right:2},En={left:1,middle:4,right:2};function ae(e,t,n){let o=e.getBoundingClientRect();return{bubbles:!0,cancelable:!0,composed:!0,view:t,button:hn[n],buttons:0,clientX:o.x+o.width/2,clientY:o.y+o.height/2,pointerId:1,pointerType:"mouse",isPrimary:!0}}function Ke(e,t,n){let o=typeof t.PointerEvent==="function"?t.PointerEvent:t.MouseEvent,r=[];for(let s=e;s;s=B(s))r.unshift(s);let i={...n,bubbles:!1};e.dispatchEvent(new o("pointerover",n));for(let s of r)s.dispatchEvent(new o("pointerenter",i));e.dispatchEvent(new t.MouseEvent("mouseover",n));for(let s of r)s.dispatchEvent(new t.MouseEvent("mouseenter",i))}var gn='a[href], area[href], button, input, select, textarea, iframe, summary, [tabindex], [contenteditable]:not([contenteditable="false"])';function Tn(e,t){for(let o=e;o;o=B(o))if(o.matches(gn)&&w(o)&&o instanceof t.HTMLElement){o.focus();return}let n=e.ownerDocument.activeElement;if(n instanceof t.HTMLElement&&n!==e.ownerDocument.body)n.blur()}function xn(e,t,n,o,r){let i=typeof t.PointerEvent==="function"?t.PointerEvent:t.MouseEvent,s={...n,buttons:En[o],detail:r},a={...n,detail:r};Ke(e,t,n);let l=e.dispatchEvent(new i("pointerdown",s));if(l&&e.dispatchEvent(new t.MouseEvent("mousedown",s)))Tn(e,t);if(e.dispatchEvent(new i("pointerup",a)),l)e.dispatchEvent(new t.MouseEvent("mouseup",a))}function L(e,t,n,o=1){let r=ae(e,t,n);xn(e,t,r,n,o);let i=n==="left"?"click":n==="right"?"contextmenu":"auxclick";e.dispatchEvent(new t.MouseEvent(i,{...r,detail:o}))}function je(e,t){if(e instanceof t.HTMLTextAreaElement)return!0;if(!(e instanceof t.HTMLInputElement))return!1;return!["button","submit","reset","image","checkbox","radio","file","range","color","hidden"].includes(e.type)}function An(e,t,n){let o=e instanceof t.HTMLTextAreaElement?t.HTMLTextAreaElement.prototype:t.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(o,"value")?.set;if(r)r.call(e,n);else e.value=n;e.dispatchEvent(new t.Event("input",{bubbles:!0,composed:!0})),e.dispatchEvent(new t.Event("change",{bubbles:!0}))}function yn(e,t){if(!(e instanceof t.HTMLElement))return!1;if(e.isContentEditable)return!0;let n=e.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return n===""||n==="true"||n==="plaintext-only"}function Be(e,t,n,o){if(n.length>pn)return{ok:!1,problem:"INVALID_ACTION"};if(je(e,t)){if(e.readOnly)return{ok:!1,problem:"NOT_EDITABLE"};return e.focus(),An(e,t,o?`${e.value}${n}`:n),{ok:!0}}if(yn(e,t))return e.focus(),e.textContent=o?`${e.textContent??""}${n}`:n,e.dispatchEvent(new t.Event("input",{bubbles:!0,composed:!0})),{ok:!0};return{ok:!1,problem:"NOT_EDITABLE"}}function Sn(e){let t=e.getAttribute("label");return t!==null&&t.trim()!==""?t:e.textContent??""}function Mn(e,t,n){if(!(e instanceof t.HTMLSelectElement))return{ok:!1,problem:"NOT_SELECTABLE"};let o=Array.from(e.options),r=n.value!==void 0?o.find((i)=>i.value===n.value):n.label!==void 0?o.find((i)=>P(Sn(i),n.label)):n.index!==void 0?o[n.index]:void 0;if(!r||r.disabled||r.closest("optgroup")?.hasAttribute("disabled"))return{ok:!1,problem:"OPTION_NOT_FOUND"};return e.focus(),r.selected=!0,e.dispatchEvent(new t.Event("input",{bubbles:!0,composed:!0})),e.dispatchEvent(new t.Event("change",{bubbles:!0})),{ok:!0}}function Rn(e,t,n){if(e instanceof t.HTMLInputElement&&(e.type==="checkbox"||e.type==="radio")){if(e.checked!==n){if(e.type==="radio"&&!n)return{ok:!1,problem:"NOT_CHECKABLE"};L(e,t,"left")}return e.checked===n?{ok:!0}:{ok:!1,problem:"STATE_NOT_CHANGED"}}let o=e.getAttribute("role");if(o==="checkbox"||o==="switch"||o==="radio"||o==="menuitemcheckbox"){let r=()=>e.getAttribute("aria-checked")==="true";if(r()!==n)L(e,t,"left");return r()===n?{ok:!0}:{ok:!1,problem:"STATE_NOT_CHANGED"}}return{ok:!1,problem:"NOT_CHECKABLE"}}var kn=/^(?:[\s\S]|[A-Z][A-Za-z0-9]{1,23})$/u;function Nn(e,t){if(e instanceof t.HTMLButtonElement)return!0;if(e instanceof t.HTMLInputElement)return["submit","button","reset","image"].includes(e.type);let n=e.localName;return n==="a"&&e.hasAttribute("href")||n==="summary"}function wn(e,t){if(e instanceof t.HTMLButtonElement)return!0;if(e instanceof t.HTMLInputElement)return["submit","button","reset","image","checkbox","radio"].includes(e.type);return e.localName==="summary"}function le(e,t){e.dispatchEvent(new t.MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0,view:t,detail:0}))}function Cn(e,t,n){if(!kn.test(n))return{ok:!1,problem:"INVALID_ACTION"};let o=n==="Space"?" ":n;if(e instanceof t.HTMLElement)e.focus();let r={key:o,bubbles:!0,cancelable:!0,composed:!0},i=e.dispatchEvent(new t.KeyboardEvent("keydown",r));if(o==="Enter"&&i){if(Nn(e,t))le(e,t);else if(e instanceof t.HTMLInputElement&&je(e,t)&&e.form)_n(e.form,t)}let s=e.dispatchEvent(new t.KeyboardEvent("keyup",r));if(o===" "&&i&&s&&wn(e,t))le(e,t);return{ok:!0}}var vn=new Set(["submit","image"]),Dn=new Set(["text","search","url","tel","email","password","date","month","week","time","datetime-local","number"]);function _n(e,t){let n=Array.from(e.elements),o=e.getRootNode(),r=Array.from(o.querySelectorAll("button, input")).find((s)=>(s instanceof t.HTMLButtonElement&&s.type==="submit"||s instanceof t.HTMLInputElement&&vn.has(s.type))&&s.form===e);if(r){if(w(r))le(r,t);return}if(n.filter((s)=>s instanceof t.HTMLInputElement&&Dn.has(s.type)).length===1)e.requestSubmit()}function On(e,t){if(e instanceof t.HTMLInputElement&&(e.type==="checkbox"||e.type==="radio"))return e.checked;if(e instanceof t.HTMLInputElement||e instanceof t.HTMLTextAreaElement||e instanceof t.HTMLSelectElement)return e.value.slice(0,se);let n=e.getAttribute("aria-checked");if(n==="true"||n==="false")return n==="true";return e.getAttribute("aria-valuenow")??e.getAttribute("aria-valuetext")}var In=/^[A-Za-z_][\w:.-]{0,127}$/;function $e(e,t){let n=bn(e);if(!n)return{ok:!1,problem:"INVALID_ACTION"};switch(t.kind){case"click":return L(e,n,t.button??"left"),{ok:!0};case"doubleClick":return L(e,n,"left",1),L(e,n,"left",2),e.dispatchEvent(new n.MouseEvent("dblclick",{...ae(e,n,"left"),detail:2})),{ok:!0};case"hover":{let o=ae(e,n,"left"),r=typeof n.PointerEvent==="function"?n.PointerEvent:n.MouseEvent;return Ke(e,n,o),e.dispatchEvent(new r("pointermove",o)),e.dispatchEvent(new n.MouseEvent("mousemove",o)),{ok:!0}}case"focus":if(e instanceof n.HTMLElement)e.focus();return{ok:!0};case"type":return typeof t.text==="string"?Be(e,n,t.text,t.append===!0):{ok:!1,problem:"INVALID_ACTION"};case"clear":return Be(e,n,"",!1);case"select":return Mn(e,n,t);case"check":return Rn(e,n,t.checked===!0);case"pressKey":return typeof t.key==="string"?Cn(e,n,t.key):{ok:!1,problem:"INVALID_ACTION"};case"scroll":return e.scrollBy?.({left:Number(t.dx??0)||0,top:Number(t.dy??0)||0}),{ok:!0};case"scrollIntoView":return e.scrollIntoView?.({block:"center",inline:"nearest"}),{ok:!0};case"getText":if(S(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:F(e).slice(0,se)};case"getValue":if(S(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:On(e,n)};case"getAttribute":{if(typeof t.name!=="string"||!In.test(t.name))return{ok:!1,problem:"INVALID_ACTION"};let o=t.name.toLowerCase();if(S(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:e.getAttribute(o)?.slice(0,se)??null}}case"exists":return{ok:!0,value:!0};default:return{ok:!1,problem:"INVALID_ACTION"}}}var qe=1,Ge="__burdenoffUiRuntime",Ln=60000,Wn="fg-ui-highlight",Un=new Set(["role","css","testId","xpath","fuzzy","anchor","text"]);function ue(e){if(!e||typeof e!=="object")return!1;let t=e;if(!Array.isArray(t.methods)||t.methods.length===0||t.methods.length>8)return!1;if(t.frame!==void 0&&!(Array.isArray(t.frame)&&t.frame.every((n)=>typeof n==="string")))return!1;return t.methods.every((n)=>!!n&&typeof n==="object"&&Un.has(String(n.kind)))}function ce(){return{status:"failed",code:"ELEMENT_NOT_FOUND",candidates:[],candidateCount:0,attempts:[]}}function de(e){return{status:e.status,method:e.method,methodIndex:e.methodIndex,fallback:e.fallback,candidate:e.candidate,attempts:e.attempts}}function Pn(e){try{return e.defaultView?.frameElement??null}catch{return null}}function Hn(e,t,n,o){let r=e.getRootNode();if(typeof r.elementFromPoint!=="function")return null;let i=r.elementFromPoint(t,n);if(!i)return"offscreen";if(i===e||e.contains(i))return null;return o.some((s)=>s.contains(i))?null:"covered"}function Vn(e,t){let n=t.x+t.width/2,o=t.y+t.height/2,r=Array.from(e.labels??[]),i=e;for(let s=0;s<32;s+=1){let a=Hn(i,n,o,s===0?r:[]);if(a)return a;let l=i.getRootNode();if(l&&"host"in l){i=l.host;continue}let u=Pn(i.ownerDocument);if(!u)return null;let f=u.getBoundingClientRect();n+=f.x+u.clientLeft,o+=f.y+u.clientTop,i=u}return null}function Fn(e,t){let n=e.ownerDocument.defaultView;if(!n)return!1;let o=t.x+t.width/2,r=t.y+t.height/2;return o<0||r<0||o>=n.innerWidth||r>=n.innerHeight}function Bn(e){let t=e.ownerDocument.defaultView;if(t&&t.getComputedStyle(e).pointerEvents==="none")return"noPointerEvents";let n=e.getBoundingClientRect();if(n.width<=0||n.height<=0)return null;if(Fn(e,n)&&typeof e.scrollIntoView==="function")e.scrollIntoView({block:"center",inline:"center"}),n=e.getBoundingClientRect();return Vn(e,n)}function zn(e,t={}){let n=t.root??e,o={...t.rectOf?{rectOf:t.rectOf}:{},...t.isVisible?{isVisible:t.isVisible}:{}},r=null,i=null,s=()=>{if(i!==null)clearTimeout(i),i=null;r?.remove(),r=null},a=(c,p)=>(s(),Ie(n,c,{...o,...p?{state:p}:{}})),l=(c,p={})=>{if(!ue(c))return ce();let m=a(c,p.state);return m.status==="found"?de(m):m},u=(c,p,m={})=>{if(!p||typeof p!=="object"||typeof p.kind!=="string")return{ok:!1,code:"INVALID_ACTION"};if(!ue(c))return{ok:!1,code:"ELEMENT_NOT_FOUND",resolution:ce()};let b=m.state??(ze.has(p.kind)?"visible":"interactable"),h=a(c,b);if(h.status!=="found"){if(p.kind==="exists"&&h.code==="ELEMENT_NOT_FOUND")return{ok:!0,value:!1,resolution:h};return{ok:!1,code:h.code,resolution:h}}let T=de(h),W=Xe.has(p.kind)?Bn(h.element):null;if(W)return{ok:!1,code:"ELEMENT_NOT_INTERACTABLE",reason:W,resolution:{status:"failed",code:"ELEMENT_NOT_INTERACTABLE",candidates:[h.candidate],candidateCount:1,attempts:h.attempts}};let M=$e(h.element,p);if(!M.ok)return{ok:!1,code:M.problem,resolution:T};return M.value===void 0?{ok:!0,resolution:T}:{ok:!0,resolution:T,value:M.value}},f=(c,p,m)=>{let b=e.createElement(Wn);b.setAttribute("aria-hidden","true"),b.setAttribute("style","all: initial; position: fixed; inset: 0; pointer-events: none; z-index: 2147483647;");let h=b.attachShadow({mode:"closed"});c.forEach((T,W)=>{let M=e.createElement("div");M.setAttribute("style",`position: fixed; left: ${T.bounds.x-3}px; top: ${T.bounds.y-3}px; width: ${T.bounds.width+6}px; height: ${T.bounds.height+6}px; outline: 3px solid Highlight; border-radius: 4px; box-sizing: border-box;`);let fe=m?`${W+1}${p?` ${p}`:""}`:p;if(fe){let q=e.createElement("span");q.textContent=fe.slice(0,120),q.setAttribute("style","position: absolute; left: 0; top: 100%; margin-top: 4px; padding: 2px 6px; font: 600 11px system-ui, sans-serif; background: Highlight; color: HighlightText; border-radius: 3px; white-space: nowrap;"),M.appendChild(q)}h.appendChild(M)}),e.documentElement.appendChild(b),r=b};return{version:qe,resolve:l,act:u,highlight:(c,p={})=>{if(!ue(c))return ce();let m=a(c,p.state??"visible");if(m.status==="found")f([m.candidate],p.label,!1);else if(m.candidates.length>0)f(m.candidates,p.label,!0);let b=Math.min(Ln,Math.max(0,Number(p.durationMs??0)||0));if(r&&b>0)i=setTimeout(s,b);return m.status==="found"?de(m):m},clearHighlight:s,snapshot:(c={})=>(s(),Fe(e,{...o,...c.maxNodes?{maxNodes:c.maxNodes}:{}}))}}function Ze(e,t){let n=Reflect.get(e,Ge);if(n&&typeof n==="object"&&typeof n.version==="number"&&n.version>=qe)return n;let o=Object.freeze(zn(t));return Object.defineProperty(e,Ge,{value:o,configurable:!0,enumerable:!1,writable:!1}),o}Ze(globalThis,globalThis.document);})();
|
|
1
|
+
(()=>{var H=["data-fg-sensitive","data-sensitive","data-private"];function Q(e){return H.some((t)=>e.hasAttribute(t))}function I(e){let t=e.assignedSlot;if(t!==void 0)return t;let n=e.parentElement?.shadowRoot;if(!n)return null;for(let o of Array.from(n.querySelectorAll("slot")))if((typeof o.assignedNodes==="function"?o.assignedNodes():[]).includes(e))return o;return null}function x(e){let t=I(e);if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();if(n&&"host"in n)return n.host;try{return e.ownerDocument.defaultView?.frameElement??null}catch{return null}}function k(e){for(let t=e;t;t=x(t))if(Q(t))return!0;return!1}var ge={button:"button",submit:"button",reset:"button",image:"button",checkbox:"checkbox",radio:"radio",range:"slider",number:"spinbutton",search:"searchbox",email:"textbox",tel:"textbox",text:"textbox",url:"textbox",password:"textbox",date:"textbox","datetime-local":"textbox",month:"textbox",time:"textbox",week:"textbox",color:"textbox",file:"button"},Te={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",hr:"separator",li:"listitem",main:"main",menu:"list",meter:"meter",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",p:"paragraph",progress:"progressbar",summary:"button",table:"table",tbody:"rowgroup",td:"cell",textarea:"textbox",tfoot:"rowgroup",thead:"rowgroup",tr:"row",ul:"list"},xe=new Set(["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"]);var ee=256;function T(e){return(e??"").normalize("NFKC").replace(/\s+/g," ").trim().toLowerCase()}function V(e,t){return T(e)===T(t)}function Ae(e,t){let n=T(t);return n.length>0&&T(e).includes(n)}function rt(e,t){if(e===t)return 0;if(e.length===0)return t.length;if(t.length===0)return e.length;let n=Array.from({length:t.length+1},(o,r)=>r);for(let o=1;o<=e.length;o+=1){let r=[o];for(let i=1;i<=t.length;i+=1){let s=e[o-1]===t[i-1]?0:1;r[i]=Math.min((n[i]??0)+1,(r[i-1]??0)+1,(n[i-1]??0)+s)}n=r}return n[t.length]??0}function ye(e,t){let n=T(e).slice(0,256),o=T(t).slice(0,256),r=Math.max(n.length,o.length);if(r===0)return 0;return 1-rt(n,o)/r}function v(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}var ne=512,it=65536,st=new Set(["button","input","meter","output","progress","select","textarea"]),at=new Set(["script","style","noscript","template","head","title","meta","link"]);function M(e){return e.localName.toLowerCase()}function Se(e){return e.parentElement?.closest("article, aside, main, nav, section")!=null}function lt(e){let t=M(e);switch(t){case"a":case"area":return e.hasAttribute("href")?"link":"";case"input":{let n=(e.getAttribute("type")??"text").toLowerCase();if(n==="hidden")return"";if(e.hasAttribute("list")&&["text","search","email","tel","url"].includes(n))return"combobox";return ge[n]??"textbox"}case"select":{let n=Number(e.getAttribute("size")??"0");return e.hasAttribute("multiple")||n>1?"listbox":"combobox"}case"img":return e.getAttribute("alt")===""?"presentation":"img";case"th":return e.getAttribute("scope")==="row"?"rowheader":"columnheader";case"header":return Se(e)?"":"banner";case"footer":return Se(e)?"":"contentinfo";case"section":case"form":return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?t==="form"?"form":"region":"";default:return Te[t]??""}}function A(e){let t=e.getAttribute("role")?.trim().split(/\s+/)[0];return t?t.toLowerCase():lt(e)}function ut(e,t){let n=e.getRootNode();return typeof n.getElementById==="function"?n.getElementById(t):null}function ct(e){return e.hasAttribute("hidden")||e.getAttribute("aria-hidden")==="true"}function dt(e){let t=e.ownerDocument.defaultView;if(!t)return"none";let n=t.getComputedStyle(e);if(n.display==="none")return"subtree";return n.visibility==="hidden"||n.visibility==="collapse"?"self":"none"}function W(e){let t=e.getAttribute("contenteditable");if(t===null)return!1;let n=t.trim().toLowerCase();return n===""||n==="true"||n==="plaintext-only"}function ft(e){if(e.shadowRoot)return Array.from(e.shadowRoot.childNodes);if(M(e)==="slot"){let t=e,n=typeof t.assignedNodes==="function"?t.assignedNodes({flatten:!0}):[];if(n.length>0)return n}return Array.from(e.childNodes)}var mt=/^(div|p|li|tr|td|th|br|h[1-6]|section|article|header|footer)$/;function L(e,t){if(e.remaining<=0||t.length===0)return;let n=t.slice(0,e.remaining);e.parts.push(n),e.remaining-=n.length}function Me(e,t,n,o,r,i=!1){if(t>32||n.remaining<=0)return;if(e.nodeType===3){if(!i)L(n,e.textContent??"");return}if(e.nodeType!==1)return;let s=e,a=M(s);if(at.has(a)||Q(s))return;if(!r&&ct(s))return;let l=!1;if(t>0&&!r){let d=o?.isVisible?.(s);if(d===!1)l=!0;else if(d===void 0){let c=dt(s);if(c==="subtree")return;l=c==="self"}}let u=s.getAttribute("aria-label")?.trim();if(u&&t>0&&!l){L(n,` ${u} `);return}if(a==="img"||a==="input"&&s.getAttribute("type")==="image"){if(!l)L(n,` ${s.getAttribute("alt")??""} `);return}if(a==="input"||a==="textarea"||a==="select")return;if(t>0&&W(s))return;let f=t>0&&mt.test(a);if(f)L(n," ");for(let d of ft(s))Me(d,t+1,n,o,r,l);if(f)L(n," ")}function F(e){if(M(e)==="textarea"||W(e))return!0;for(let n=x(e);n;n=x(n))if(M(n)==="textarea"||W(n))return!0;return!1}function Re(e){for(let t=x(e);t;t=x(t)){let n=M(t);if(n==="textarea"||n==="select"||W(t))return!0}return!1}function B(e,t,n=!1){let o=M(e);if(o==="textarea"||o==="select"||W(e)||Re(e)||k(e))return"";return E(e.getAttribute("aria-label")??"")||X(e,t,ne,n)}function X(e,t,n=ne,o=!1){if(e.nodeType===1&&k(e))return"";let r={parts:[],remaining:n*2+64};return Me(e,0,r,t,o),E(r.parts.join(""),n)}function E(e,t=ne){return e.replace(/\s+/g," ").trim().slice(0,t)}function pt(e,t){let n=[],o=e.getAttribute("id");if(o){let i=e.getRootNode();for(let s of Array.from(i.querySelectorAll("label")))if(s.getAttribute("for")===o)n.push(B(s,t,!0))}let r=e.closest("label");if(r&&!r.hasAttribute("for"))n.push(B(r,t,!0));return E(n.join(" "))}function te(e,t,n){let o=Array.from(e.children).find((r)=>M(r)===t);return o?B(o,n):""}function R(e,t){return Ne(e,t,!0)}function ke(e,t){return Ne(e,t,!1)}function ht(e,t){let n=Array.from(e.children).find((o)=>M(o)==="title");if(!n||k(n)||Re(n))return"";return E(Array.from(n.childNodes).map((o)=>X(o,t)).join(" "))}function Ne(e,t,n){let o=e.getAttribute("aria-labelledby");if(o){let l=o.split(/\s+/).filter(Boolean).map((u)=>ut(e,u)).filter((u)=>u!==null).map((u)=>B(u,t,!0)).join(" ");if(E(l))return E(l)}let r=e.getAttribute("aria-label");if(r&&E(r))return E(r);let i=M(e);if(st.has(i)){let l=pt(e,t);if(l)return l}if(i==="input"){let l=(e.getAttribute("type")??"text").toLowerCase();if(l==="button"||l==="submit"||l==="reset"){let u=e.getAttribute("value");if(u!==null)return E(u);return l==="submit"?"Submit":l==="reset"?"Reset":""}if(l==="image")return E(e.getAttribute("alt")??"")}if(i==="img"||i==="area"){let l=e.getAttribute("alt");if(l)return E(l)}if(i==="svg"){let l=ht(e,t);if(l)return l}if(i==="fieldset"){let l=te(e,"legend",t);if(l)return l}if(i==="table"){let l=te(e,"caption",t);if(l)return l}if(i==="option"){let l=E(e.getAttribute("label")??"");if(l)return l}if(i==="figure"){let l=te(e,"figcaption",t);if(l)return l}if(n&&xe.has(A(e))){let l=X(e,t);if(l)return l}let s=e.getAttribute("title");if(s&&E(s))return E(s);let a=e.getAttribute("placeholder");if(a&&E(a))return E(a);return""}function O(e,t){if(M(e)==="input"){let o=(e.getAttribute("type")??"text").toLowerCase();return o==="button"||o==="submit"||o==="reset"?R(e,t):""}return X(e,t,it)}function oe(e,t,n,o){return A(e)===t.trim().toLowerCase()&&T(R(e,o))===T(n)}function bt(e){return e.ownerDocument.defaultView}function z(e){let t=I(e);if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n&&"host"in n?n.host:null}function N(e,t){let n=t?.isVisible?.(e);if(n!==void 0)return n;if(!e.isConnected)return!1;let o=bt(e),r=e;while(r){if(r.hasAttribute("hidden"))return!1;if(r.localName==="input"&&r.getAttribute("type")?.toLowerCase()==="hidden")return!1;if(o&&o.getComputedStyle(r).display==="none")return!1;r=z(r)}if(o){let s=o.getComputedStyle(e);if(s.visibility==="hidden"||s.visibility==="collapse")return!1;if(s.display==="contents")return!0}let i=e.checkVisibility;return typeof i==="function"?i.call(e):!0}function C(e){for(let n=e;n;n=x(n))if(n.getAttribute("aria-disabled")==="true"||n.hasAttribute("inert"))return!1;if(!Et.has(e.localName)){let n=e.parentElement?.closest("button, select, option, optgroup, textarea");return n?C(n):!0}if(e.hasAttribute("disabled"))return!1;let t=e.parentElement?.closest("fieldset[disabled]");if(t){if(!Array.from(t.children).find((o)=>o.localName==="legend")?.contains(e))return!1}try{return!e.matches(":disabled")}catch{return!0}}var Et=new Set(["button","input","select","textarea","optgroup","option","fieldset"]);function D(e,t,n){let r=t?.rectOf?.(e)??e.getBoundingClientRect();return{x:Math.round(r.x+(n?.x??0)),y:Math.round(r.y+(n?.y??0)),width:Math.round(r.width),height:Math.round(r.height)}}function w(e){let t=Array.from(e.querySelectorAll("*"));return e.nodeType===1?[e,...t]:t}var gt=/password|passcode|passwd|\bpin\b|otp|one[\s-]?time|verification|security code|auth(?:entication)? code|\bcvv\b|\bcvc\b|card number|secret|token|recovery/i,Tt=/password|one-time-code|^cc-/i;function xt(e){return gt.test(e)}function y(e){if(k(e))return!0;if(Ce(e))return!0;for(let t=x(e);t;t=x(t))if(Ce(t))return!0;return!1}function Ce(e){let t=e.localName,n=e.getAttribute("contenteditable"),o=n!==null&&n.trim().toLowerCase()!=="false";if(t!=="input"&&t!=="textarea"&&t!=="select"&&!o)return!1;if(e.getAttribute("type")?.toLowerCase()==="password")return!0;if((e.getAttribute("autocomplete")??"").trim().split(/\s+/).filter(Boolean).some((i)=>Tt.test(i)))return!0;return At(e).some((i)=>i.length>0&&xt(i.replace(/[-_]/g," ")))}function At(e){let t=(a)=>(a??"").slice(0,512),n=[R(e),t(e.getAttribute("aria-label")),t(e.getAttribute("placeholder")),t(e.getAttribute("title")),t(e.getAttribute("name")),t(e.getAttribute("id"))],o=e.getRootNode(),r=(a)=>typeof o.getElementById==="function"?o.getElementById(a):null;for(let a of(e.getAttribute("aria-labelledby")??"").split(/\s+/).filter(Boolean)){let l=r(a);if(l)n.push(t(l.getAttribute("aria-label")),t(l.textContent))}let i=e.getAttribute("id"),s=Array.from(o.querySelectorAll("label")).filter((a)=>i!==null&&a.getAttribute("for")===i||!a.hasAttribute("for")&&a.contains(e));for(let a of s)n.push(t(a.getAttribute("aria-label")),t(a.textContent));return n}var yt=0.8,St=0.05,Mt=4,we=1000,K=2,Rt=new Set(["button","checkbox","combobox","link","listbox","menuitem","menuitemcheckbox","menuitemradio","option","radio","searchbox","slider","spinbutton","switch","tab","textbox","treeitem"]),kt=/^[A-Za-z_][\w:.-]{0,127}$/;function Nt(e){return e.nodeType===9?e:e.ownerDocument}function Ct(e,t){return{kind:"list",elements:w(t.root).filter((o)=>oe(o,e.role,e.name,t.probe)),...e.nth!==void 0?{nth:e.nth}:{}}}function wt(e,t){try{return{kind:"list",elements:Array.from(t.root.querySelectorAll(e))}}catch{return{kind:"invalid"}}}function _t(e,t){let n=e.attribute??"data-testid";if(!kt.test(n))return{kind:"invalid"};return{kind:"list",elements:w(t.root).filter((r)=>r.getAttribute(n)===e.value)}}function vt(e,t){if(e.nodeType===9)return t.ownerDocument===e&&t.getRootNode()===e;return e===t||e.contains(t)}function Ot(e,t){let n=Nt(t.root);if(typeof n.evaluate!=="function")return{kind:"unsupported"};let o;try{o=n.evaluate(e.xpath,t.root,null,7,null)}catch{return{kind:"invalid"}}let r=[],i=Math.min(o.snapshotLength,we);for(let s=0;s<i;s+=1){let a=o.snapshotItem(s);if(a&&a.nodeType===1&&vt(t.root,a))r.push(a)}return{kind:"list",elements:r,...o.snapshotLength>we?{overflow:!0}:{}}}function Dt(e,t,n){let o=Math.min(T(e).length,ee),r=Math.max(o,t);return r>0&&Math.abs(o-t)<=(1-n)*r}function It(e,t){let n=Math.min(1,Math.max(0.5,e.threshold??yt)),o=e.role?.trim().toLowerCase(),r=Math.min(T(e.name).length,ee),i=[];for(let s of w(t.root)){let a=A(s);if(o?a!==o:a==="")continue;let l=R(s,t.probe);if(!Dt(l,r,n))continue;let u=ye(l,e.name);if(u>=n)i.push({element:s,score:u})}return{kind:"ranked",scored:i,margin:St}}function Oe(e,t){let n=w(e.root).filter((i)=>t(O(i,e.probe))),o=e.keep??(()=>!0),r=n.filter(o);return n.filter((i)=>!r.some((s)=>s!==i&&i.contains(s)))}function Lt(e,t){let n=e.exact?(o)=>V(o,e.text):(o)=>Ae(o,e.text);if(T(e.text).length===0)return{kind:"list",elements:[]};return{kind:"list",elements:Oe(t,n),...e.nth!==void 0?{nth:e.nth}:{}}}function re(e){return T(e).replace(/[\s:*]+$/u,"")}function Wt(e,t){return(e.kind==="role"?w(t.root).filter((o)=>oe(o,e.role,e.name,t.probe)):Oe(t,(o)=>re(o)===re(e.text)&&re(o)!=="")).filter((o)=>N(o,t.probe))}function De(e,t,n){let o=e.role?.trim().toLowerCase();return w(t.root).filter((r)=>{let i=A(r);if(o?i!==o:!Rt.has(i))return!1;return!n.some((s)=>s===r||r.contains(s))})}var Ut=new Set(["h1","h2","h3","h4","h5","h6","legend","caption","figcaption","summary","dt"]);function ie(e){return Ut.has(e.localName)||A(e)==="heading"}function Pt(e){for(let t=e;t;t=t.parentElement)if(ie(t))return t;return null}function Ht(e,t,n){let o=De(e,t,n),r=new Set;for(let i of n){let a=Pt(i)?.parentElement??i;for(let l of o)if(a.contains(l))r.add(l)}return{kind:"list",elements:o.filter((i)=>r.has(i))}}function _e(e,t,n,o){return e<o&&n<t}function Vt(e,t,n){let o=t.x+t.width,r=t.y+t.height,i=n.x+n.width,s=n.y+n.height,a=_e(t.y,r,n.y,s),l=_e(t.x,o,n.x,i);switch(e){case"rightOf":return a&&n.x>=o-K?Math.max(0,n.x-o):null;case"leftOf":return a&&i<=t.x+K?Math.max(0,t.x-i):null;case"below":return l&&n.y>=r-K?Math.max(0,n.y-r):null;case"above":return l&&s<=t.y+K?Math.max(0,t.y-s):null;case"sameRow":return a?Math.abs(n.x+n.width/2-(t.x+t.width/2)):null;default:return null}}function ve(e){return e.width>0&&e.height>0}function Bt(e,t){let n=Wt(e.anchor,t);if(n.length===0)return{kind:"list",elements:[]};if(e.relation==="inside")return Ht(e,t,n);let o=n.map((i)=>D(i,t.probe)).filter(ve);if(o.length===0)return{kind:"unsupported"};let r=[];for(let i of De(e,t,n)){let s=D(i,t.probe);if(!ve(s))continue;let a=null;for(let l of o){let u=Vt(e.relation,l,s);if(u!==null&&(a===null||u<a))a=u}if(a!==null)r.push({element:i,score:-a})}return{kind:"ranked",scored:r,margin:Mt}}function j(e,t){switch(e.kind){case"role":return Ct(e,t);case"css":return wt(e.selector,t);case"testId":return _t(e,t);case"xpath":return Ot(e,t);case"fuzzy":return It(e,t);case"anchor":return Bt(e,t);case"text":return Lt(e,t);default:return{kind:"unsupported"}}}var Ie=5,G=200;var Ft=12,Xt=3,zt=8,Kt=25,jt=5000,Gt=new Set(["alertdialog","article","banner","complementary","contentinfo","dialog","figure","form","grid","group","list","listitem","main","menu","menubar","navigation","radiogroup","region","row","search","tablist","table","tabpanel","toolbar","tree","treegrid"]);function $t(){return typeof performance>"u"?Date.now():performance.now()}function se(e=$t){return{answers:new Map,checksLeft:zt,now:e,deadline:e()+Kt}}function qt(e){return e.replace(/\s+/g," ").trim()}function Zt(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n<32||n>=127&&n<=159)return!0}return!1}function Le(e){let t=qt(e);return t.length>0&&t.length<=G&&!Zt(t)?t:void 0}function We(e){return y(e)||F(e)}function Yt(e,t){for(let n of Array.from(e.children))if(ie(n)&&!We(n)&&N(n,t))return n;return}function*Jt(e,t){if(We(e))return;let n=A(e),o=Gt.has(n)?Le(R(e,t)):void 0;if(o)yield{anchor:{kind:"role",role:n,name:o},role:n};let r=Yt(e,t);if(!r)return;let i=A(r)==="heading",s=Le(i?R(r,t):O(r,t));if(!s)return;yield{anchor:i?{kind:"role",role:"heading",name:s}:{kind:"text",text:s},role:n}}function Qt(e,t){return JSON.stringify([e,t])}function en(e,t,n,o,r){let s=j({kind:"anchor",anchor:e,relation:"inside",role:t},{root:n,keep:o,...r?{probe:r}:{}});return s.kind==="list"?s.elements.filter(o):[]}function tn(e,t){return e.nodeType!==1||e===t||e.contains(t)}function Ue(e,t,n,o,r=se()){let i=A(e);if(i===""||y(e))return;let s=0,a=0;for(let l=e.parentElement;l&&a<Ft&&tn(t,l);l=l.parentElement){a+=1;for(let u of Jt(l,o)){let f=Qt(u.anchor,i),d=r.answers.get(f);if(!d){if(r.now()>=r.deadline)return;if(s>=Xt||r.checksLeft<=0)continue;s+=1,r.checksLeft-=1,d=en(u.anchor,i,t,n,o),r.answers.set(f,d)}if(d.length===1&&d[0]===e)return u}}return}function Pe(e){return e.querySelectorAll("*").length<=jt}var nn={x:0,y:0,width:0,height:0};function on(e,t,n){let o={root:e,offset:nn,hidden:!1,disabled:!1};for(let[r,i]of(t??[]).entries()){let s;try{s=Array.from(o.root.querySelectorAll(i))}catch{return{index:r,reason:"invalid"}}if(s.length===0)return{index:r,reason:"notFound"};if(s.length>1)return{index:r,reason:"ambiguous"};let a=s[0],l=a.localName;if(l==="iframe"||l==="frame"){let u=a,f=null;try{f=u.contentDocument}catch{f=null}if(!f)return{index:r,reason:"inaccessible"};let d=D(a,n,o.offset);o={root:f,offset:{x:d.x+u.clientLeft,y:d.y+u.clientTop,width:0,height:0},hidden:o.hidden||!N(a,n),disabled:o.disabled||!C(a)}}else if(a.shadowRoot)o={root:a.shadowRoot,offset:o.offset,hidden:o.hidden,disabled:o.disabled};else return{index:r,reason:"notAFrame"}}return o}function He(e,t,n,o){if(t==="attached")return!0;if(n.hidden||!N(e,o))return!1;return t==="visible"||!n.disabled&&C(e)}function Ve(e,t,n,o,r){return{role:A(e),name:y(e)?"":v(F(e)?ke(e,r):R(e,r),G),bounds:D(e,r,o),method:t.kind,methodIndex:n}}function rn(e,t,n,o=!1){if(t.length===0)return e.length>0?{outcome:"notInteractable",elements:e,matches:0}:{outcome:"none",elements:[],matches:0};if(o)return{outcome:"ambiguous",elements:t,matches:t.length};if(n!==void 0){let r=t[n];return r?{outcome:"found",element:r,matches:t.length}:{outcome:"none",elements:[],matches:t.length}}return t.length===1?{outcome:"found",element:t[0],matches:1}:{outcome:"ambiguous",elements:t,matches:t.length}}function sn(e,t,n){if(t.length===0)return e.length>0?{outcome:"notInteractable",elements:e.map((a)=>a.element),matches:0}:{outcome:"none",elements:[],matches:0};let o=[...t].sort((a,l)=>l.score-a.score),r=o[0],i=o[1];if(!i||r.score-i.score>=n)return{outcome:"found",element:r.element,matches:t.length};let s=o.filter((a)=>r.score-a.score<n).map((a)=>a.element);return{outcome:"ambiguous",elements:s,matches:s.length}}function an(e,t){switch(e.kind){case"invalid":case"unsupported":return e.kind;case"list":return rn(e.elements,e.elements.filter(t),e.nth,e.overflow);case"ranked":return sn(e.scored,e.scored.filter((n)=>t(n.element)),e.margin)}}function U(e,t,n=[],o=0,r){return{status:"failed",code:e,candidates:n,candidateCount:o,attempts:t,...r?{frame:r}:{}}}function Be(e,t,n={}){let o=n.state??"interactable",r=on(e,t.frame,n);if(!("root"in r)){let d=t.methods.map((c,p)=>({index:p,method:c.kind,outcome:"notTried",matches:0}));return U("ELEMENT_NOT_FOUND",d,[],0,r)}let i=[],s=t.methods.findIndex((d)=>d.enabled!==!1),a,l,u;for(let[d,c]of t.methods.entries()){if(u){i.push({index:d,method:c.kind,outcome:"notTried",matches:0});continue}if(c.enabled===!1){i.push({index:d,method:c.kind,outcome:"disabled",matches:0});continue}let p=(h)=>He(h,o,r,n),m=an(j(c,{root:r.root,probe:n,keep:p}),p);if(m==="invalid"||m==="unsupported"){i.push({index:d,method:c.kind,outcome:m,matches:0});continue}if(i.push({index:d,method:c.kind,outcome:m.outcome,matches:m.matches}),m.outcome==="found")u={element:m.element,method:c,index:d};else if(m.outcome==="ambiguous"&&!a)a={elements:m.elements,method:c,index:d,count:m.matches};else if(m.outcome==="notInteractable"&&!l)l={elements:m.elements,method:c,index:d}}if(u)return{status:"found",element:u.element,method:u.method.kind,methodIndex:u.index,fallback:u.index!==s,candidate:Ve(u.element,u.method,u.index,r.offset,n),attempts:i};let f=(d)=>d.elements.slice(0,Ie).map((c)=>Ve(c,d.method,d.index,r.offset,n));if(a){let d=(b)=>He(b,o,r,n),c=f(a);if(!Pe(r.root))return U("ELEMENT_AMBIGUOUS",i,c,a.count);let p=se(),{elements:m}=a,h=c.map((b,g)=>{let _=m[g],S=Ue(_,r.root,d,n,p);return S?{...b,container:S}:b});return U("ELEMENT_AMBIGUOUS",i,h,a.count)}if(l)return U("ELEMENT_NOT_INTERACTABLE",i,f(l),l.elements.length);return U("ELEMENT_NOT_FOUND",i)}var ae="[REDACTED]",ln=[/\b(?:Bearer|Basic)\s+[^\s"'`,;)\]}]+/gi,/\b(?:sk|pk|rk|xai)-[^\s"'`,;)\]}]+/gi,/\b(?:gsk|hf|ghp|gho|ghs|ghu|glpat)_[^\s"'`,;)\]}]+/gi,/\bAIza[\w-]{10,}/g,/\b(?:AKIA|ASIA)[0-9A-Z]{12,}/g],un=/([\s"'`,;:=()[\]{}]+)/,cn=/^(?:api[_-]?key|access[_-]?key|secret|secret[_-]?key|client[_-]?secret|token|password)$/i;function dn(e){let t=e.indexOf("…");return e.includes("***")||t!==-1&&t<e.length-1}function fn(e){let t=e.split(un);for(let n=0;n<t.length;n+=2){let o=t[n]??"";if(o&&o!=="[REDACTED]"&&dn(o))t[n]="[REDACTED]";let r=t[n+1]??"";if(t[n+2]&&cn.test(o)&&/[:=]/.test(r))t[n+2]="[REDACTED]"}return t.join("")}function le(e){if(!e)return e;let t=e;for(let n of ln)t=t.replace(n,"[REDACTED]");return t=fn(t),t.replace(/(?:\[REDACTED\]){2,}/g,"[REDACTED]")}var Fe="";function q(e){if(!e)return!1;let t=e.replaceAll("[REDACTED]",Fe);return le(t).replaceAll(Fe,"[REDACTED]")!==e}function ue(e){try{return decodeURIComponent(e.replaceAll("+"," "))}catch{return e}}function Xe(e){return q(ue(e).replace(/[/?&#]/g," "))}var mn=500,ze=/reset|recover|verify|verification|magic|confirm|activate|invite|unsubscribe/i;function pn(e){let t=e;for(let n=0;n<3;n+=1){let o=ue(t);if(o===t)break;t=o}return t}function hn(e){let t=e.split(/[/?#;]/),n=t.findIndex((r)=>ze.test(r));return t.slice(0,n+1).map((r)=>q(r)?ae:r).join("/")}function ce(e){let t=e.trim();if(t==="")return null;let n=/^[a-z][a-z0-9+.-]*:/i.test(t)||t.startsWith("//"),o="",r;if(n){let f;try{f=new URL(t.startsWith("//")?`https:${t}`:t)}catch{return null}if(f.protocol!=="http:"&&f.protocol!=="https:")return null;o=t.startsWith("//")?`//${f.host}`:f.origin,r=f.pathname}else r=t.split(/[?#]/)[0]??"";let i=r.split("/"),s=i.map(pn),a=s.findIndex((f)=>ze.test(f)),u=(a>=0?i.slice(0,a+1):i).map((f,d)=>{let c=s[d]??f;if(d===a)return hn(c);return q(c)||Xe(f)?ae:f}).join("/");return v(`${o}${u}`,mn)}var bn=1,En=5000,gn=64,Tn=500,xn=new Set(["script","style","noscript","template","link","meta","base","head","object","embed"]),An=new Set(["textarea"]),yn=new Set(["id","class","role","name","type","for","title","alt","placeholder","label","autocomplete","tabindex","disabled","readonly","hidden","inert","contenteditable","list","multiple","size","scope","slot","part","lang","dir","data-testid","data-test","data-test-id","data-qa","data-cy","data-automation-id",...H]),Sn=new Set(["aria-valuenow","aria-valuetext","aria-checked","aria-selected","aria-pressed"]),Mn=new Set(["button","submit","reset"]),Rn=/^[a-z][a-z0-9-]{0,63}$/;var kn=/^[a-z][a-z0-9_:.-]{0,127}$/;function je(e){let t=e.getAttribute("contenteditable");return t!==null&&t.trim().toLowerCase()!=="false"}function Ge(e){for(let t=x(e);t;t=x(t))if(t.localName==="textarea"||je(t))return!0;return!1}function Nn(e){if(!e.parentElement?.shadowRoot)return!1;let t=I(e);return t!==null&&(y(t)||Ge(t))}function Z(e){return v(le(e),Tn)}var Cn=new Set(["alt","label","title","placeholder","value","aria-label","aria-description","aria-roledescription","aria-placeholder"]),wn=new Set(["aria-hidden","aria-disabled","aria-expanded","aria-haspopup","aria-controls","aria-owns","aria-labelledby","aria-describedby","aria-level","aria-current","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-readonly","aria-required","aria-invalid","aria-busy","aria-live","aria-atomic","aria-posinset","aria-setsize","aria-colcount","aria-colindex","aria-colspan","aria-rowcount","aria-rowindex","aria-rowspan","aria-sort"]);function _n(e,t){let n={},o=e.localName;for(let r of Array.from(e.attributes)){let i=r.name.toLowerCase();if(i.startsWith("on")||!kn.test(i))continue;if(t&&(Cn.has(i)||i==="href"||i.startsWith("aria-")&&!wn.has(i)))continue;if(yn.has(i)||i.startsWith("aria-")&&!Sn.has(i))n[i]=Z(r.value);else if(i==="href"&&(o==="a"||o==="area")){let s=ce(r.value);if(s!==null)n[i]=s}else if(i==="value"&&o==="input"&&Mn.has((e.getAttribute("type")??"").toLowerCase()))n[i]=Z(r.value)}return Object.keys(n).length>0?n:void 0}function vn(e,t){let n=t?.rectOf?.(e)??e.getBoundingClientRect(),o=[Math.round(n.x),Math.round(n.y),Math.round(n.width),Math.round(n.height)];return o[2]>0||o[3]>0?o:void 0}function Ke(e,t,n,o,r){let i=[];for(let s of Array.from(e.childNodes)){if(t.count>=t.max){t.truncated=!0;break}if(s.nodeType===3){if(!o||Nn(s))continue;let a=s.textContent??"";if(a.length===0)continue;let l=a.trim()===""?" ":Z(a);t.count+=1,i.push(l)}else if(s.nodeType===1){let a=Y(s,t,n+1,o,r);if(a)i.push(a)}}return i}function Y(e,t,n,o,r){let i=e.localName.toLowerCase();if(xn.has(i)||!Rn.test(i))return null;if(n>gn)return t.truncated=!0,null;t.count+=1;let s={t:i},a=Ge(e),l=r||a||k(e),u=_n(e,l);if(u)s.a=u;if(N(e,t.probe)){let h=vn(e,t.probe);if(h)s.r=h}else s.h=1;let f=y(e),d=o&&!a&&!f&&!An.has(i)&&!je(e),c=l||!d;if(i==="svg"){let h=Array.from(e.children).find((g)=>g.localName==="title"),b=h?Y(h,t,n+1,d,c):null;if(b)s.c=[b];return s}if(i==="iframe"||i==="frame"){let h=null;try{h=e.contentDocument}catch{h=null}let b=h?.documentElement;if(b){let g=Y(b,t,n+1,d,c);if(g)s.f=g}return s}let p=Ke(e,t,n,d,c);if(p.length>0)s.c=p;let m=e.shadowRoot;if(m){let h=Ke(m,t,n,d,c);if(h.length>0)s.s=h}return s}function On(e){let t=e.querySelector("title");if(t&&k(t))return"";return Z(e.title??"")}function $e(e,t={}){let n={count:0,max:Math.max(1,t.maxNodes??En),truncated:!1,probe:t},o=Y(e.documentElement,n,0,!0,!1)??{t:"html"},r=e.defaultView;return{snapshotVersion:bn,url:ce(e.URL)??"",title:On(e),viewport:{width:Math.round(r?.innerWidth??0),height:Math.round(r?.innerHeight??0)},root:o,nodeCount:n.count,truncated:n.truncated}}var de=65536,Dn=65536,Ze=new Set(["getText","getValue","getAttribute","exists"]),Ye=new Set(["click","doubleClick","hover","check"]);function In(e){return e.ownerDocument.defaultView}var Ln={left:0,middle:1,right:2},Wn={left:1,middle:4,right:2};function fe(e,t,n){let o=e.getBoundingClientRect();return{bubbles:!0,cancelable:!0,composed:!0,view:t,button:Ln[n],buttons:0,clientX:o.x+o.width/2,clientY:o.y+o.height/2,pointerId:1,pointerType:"mouse",isPrimary:!0}}function Je(e,t,n){let o=typeof t.PointerEvent==="function"?t.PointerEvent:t.MouseEvent,r=[];for(let s=e;s;s=z(s))r.unshift(s);let i={...n,bubbles:!1};e.dispatchEvent(new o("pointerover",n));for(let s of r)s.dispatchEvent(new o("pointerenter",i));e.dispatchEvent(new t.MouseEvent("mouseover",n));for(let s of r)s.dispatchEvent(new t.MouseEvent("mouseenter",i))}var Un='a[href], area[href], button, input, select, textarea, iframe, summary, [tabindex], [contenteditable]:not([contenteditable="false"])';function Pn(e,t){for(let o=e;o;o=z(o))if(o.matches(Un)&&C(o)&&o instanceof t.HTMLElement){o.focus();return}let n=e.ownerDocument.activeElement;if(n instanceof t.HTMLElement&&n!==e.ownerDocument.body)n.blur()}function Hn(e,t,n,o,r){let i=typeof t.PointerEvent==="function"?t.PointerEvent:t.MouseEvent,s={...n,buttons:Wn[o],detail:r},a={...n,detail:r};Je(e,t,n);let l=e.dispatchEvent(new i("pointerdown",s));if(l&&e.dispatchEvent(new t.MouseEvent("mousedown",s)))Pn(e,t);if(e.dispatchEvent(new i("pointerup",a)),l)e.dispatchEvent(new t.MouseEvent("mouseup",a))}function P(e,t,n,o=1){let r=fe(e,t,n);Hn(e,t,r,n,o);let i=n==="left"?"click":n==="right"?"contextmenu":"auxclick";e.dispatchEvent(new t.MouseEvent(i,{...r,detail:o}))}function Qe(e,t){if(e instanceof t.HTMLTextAreaElement)return!0;if(!(e instanceof t.HTMLInputElement))return!1;return!["button","submit","reset","image","checkbox","radio","file","range","color","hidden"].includes(e.type)}function Vn(e,t,n){let o=e instanceof t.HTMLTextAreaElement?t.HTMLTextAreaElement.prototype:t.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(o,"value")?.set;if(r)r.call(e,n);else e.value=n;e.dispatchEvent(new t.Event("input",{bubbles:!0,composed:!0})),e.dispatchEvent(new t.Event("change",{bubbles:!0}))}function Bn(e,t){if(!(e instanceof t.HTMLElement))return!1;if(e.isContentEditable)return!0;let n=e.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return n===""||n==="true"||n==="plaintext-only"}function qe(e,t,n,o){if(n.length>Dn)return{ok:!1,problem:"INVALID_ACTION"};if(Qe(e,t)){if(e.readOnly)return{ok:!1,problem:"NOT_EDITABLE"};return e.focus(),Vn(e,t,o?`${e.value}${n}`:n),{ok:!0}}if(Bn(e,t))return e.focus(),e.textContent=o?`${e.textContent??""}${n}`:n,e.dispatchEvent(new t.Event("input",{bubbles:!0,composed:!0})),{ok:!0};return{ok:!1,problem:"NOT_EDITABLE"}}function Fn(e){let t=e.getAttribute("label");return t!==null&&t.trim()!==""?t:e.textContent??""}function Xn(e,t,n){if(!(e instanceof t.HTMLSelectElement))return{ok:!1,problem:"NOT_SELECTABLE"};let o=Array.from(e.options),r=n.value!==void 0?o.find((i)=>i.value===n.value):n.label!==void 0?o.find((i)=>V(Fn(i),n.label)):n.index!==void 0?o[n.index]:void 0;if(!r||r.disabled||r.closest("optgroup")?.hasAttribute("disabled"))return{ok:!1,problem:"OPTION_NOT_FOUND"};return e.focus(),r.selected=!0,e.dispatchEvent(new t.Event("input",{bubbles:!0,composed:!0})),e.dispatchEvent(new t.Event("change",{bubbles:!0})),{ok:!0}}function zn(e,t,n){if(e instanceof t.HTMLInputElement&&(e.type==="checkbox"||e.type==="radio")){if(e.checked!==n){if(e.type==="radio"&&!n)return{ok:!1,problem:"NOT_CHECKABLE"};P(e,t,"left")}return e.checked===n?{ok:!0}:{ok:!1,problem:"STATE_NOT_CHANGED"}}let o=e.getAttribute("role");if(o==="checkbox"||o==="switch"||o==="radio"||o==="menuitemcheckbox"){let r=()=>e.getAttribute("aria-checked")==="true";if(r()!==n)P(e,t,"left");return r()===n?{ok:!0}:{ok:!1,problem:"STATE_NOT_CHANGED"}}return{ok:!1,problem:"NOT_CHECKABLE"}}var Kn=/^(?:[\s\S]|[A-Z][A-Za-z0-9]{1,23})$/u;function jn(e,t){if(e instanceof t.HTMLButtonElement)return!0;if(e instanceof t.HTMLInputElement)return["submit","button","reset","image"].includes(e.type);let n=e.localName;return n==="a"&&e.hasAttribute("href")||n==="summary"}function Gn(e,t){if(e instanceof t.HTMLButtonElement)return!0;if(e instanceof t.HTMLInputElement)return["submit","button","reset","image","checkbox","radio"].includes(e.type);return e.localName==="summary"}function me(e,t){e.dispatchEvent(new t.MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0,view:t,detail:0}))}function $n(e,t,n){if(!Kn.test(n))return{ok:!1,problem:"INVALID_ACTION"};let o=n==="Space"?" ":n;if(e instanceof t.HTMLElement)e.focus();let r={key:o,bubbles:!0,cancelable:!0,composed:!0},i=e.dispatchEvent(new t.KeyboardEvent("keydown",r));if(o==="Enter"&&i){if(jn(e,t))me(e,t);else if(e instanceof t.HTMLInputElement&&Qe(e,t)&&e.form)Yn(e.form,t)}let s=e.dispatchEvent(new t.KeyboardEvent("keyup",r));if(o===" "&&i&&s&&Gn(e,t))me(e,t);return{ok:!0}}var qn=new Set(["submit","image"]),Zn=new Set(["text","search","url","tel","email","password","date","month","week","time","datetime-local","number"]);function Yn(e,t){let n=Array.from(e.elements),o=e.getRootNode(),r=Array.from(o.querySelectorAll("button, input")).find((s)=>(s instanceof t.HTMLButtonElement&&s.type==="submit"||s instanceof t.HTMLInputElement&&qn.has(s.type))&&s.form===e);if(r){if(C(r))me(r,t);return}if(n.filter((s)=>s instanceof t.HTMLInputElement&&Zn.has(s.type)).length===1)e.requestSubmit()}function Jn(e,t){if(e instanceof t.HTMLInputElement&&(e.type==="checkbox"||e.type==="radio"))return e.checked;if(e instanceof t.HTMLInputElement||e instanceof t.HTMLTextAreaElement||e instanceof t.HTMLSelectElement)return e.value.slice(0,de);let n=e.getAttribute("aria-checked");if(n==="true"||n==="false")return n==="true";return e.getAttribute("aria-valuenow")??e.getAttribute("aria-valuetext")}var Qn=/^[A-Za-z_][\w:.-]{0,127}$/;function et(e,t){let n=In(e);if(!n)return{ok:!1,problem:"INVALID_ACTION"};switch(t.kind){case"click":return P(e,n,t.button??"left"),{ok:!0};case"doubleClick":return P(e,n,"left",1),P(e,n,"left",2),e.dispatchEvent(new n.MouseEvent("dblclick",{...fe(e,n,"left"),detail:2})),{ok:!0};case"hover":{let o=fe(e,n,"left"),r=typeof n.PointerEvent==="function"?n.PointerEvent:n.MouseEvent;return Je(e,n,o),e.dispatchEvent(new r("pointermove",o)),e.dispatchEvent(new n.MouseEvent("mousemove",o)),{ok:!0}}case"focus":if(e instanceof n.HTMLElement)e.focus();return{ok:!0};case"type":return typeof t.text==="string"?qe(e,n,t.text,t.append===!0):{ok:!1,problem:"INVALID_ACTION"};case"clear":return qe(e,n,"",!1);case"select":return Xn(e,n,t);case"check":return zn(e,n,t.checked===!0);case"pressKey":return typeof t.key==="string"?$n(e,n,t.key):{ok:!1,problem:"INVALID_ACTION"};case"scroll":return e.scrollBy?.({left:Number(t.dx??0)||0,top:Number(t.dy??0)||0}),{ok:!0};case"scrollIntoView":return e.scrollIntoView?.({block:"center",inline:"nearest"}),{ok:!0};case"getText":if(y(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:O(e).slice(0,de)};case"getValue":if(y(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:Jn(e,n)};case"getAttribute":{if(typeof t.name!=="string"||!Qn.test(t.name))return{ok:!1,problem:"INVALID_ACTION"};let o=t.name.toLowerCase();if(y(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:e.getAttribute(o)?.slice(0,de)??null}}case"exists":return{ok:!0,value:!0};default:return{ok:!1,problem:"INVALID_ACTION"}}}var nt=1,tt="__burdenoffUiRuntime",eo=60000,to="fg-ui-highlight",no=new Set(["role","css","testId","xpath","fuzzy","anchor","text"]);function pe(e){if(!e||typeof e!=="object")return!1;let t=e;if(!Array.isArray(t.methods)||t.methods.length===0||t.methods.length>8)return!1;if(t.frame!==void 0&&!(Array.isArray(t.frame)&&t.frame.every((n)=>typeof n==="string")))return!1;return t.methods.every((n)=>!!n&&typeof n==="object"&&no.has(String(n.kind)))}function he(){return{status:"failed",code:"ELEMENT_NOT_FOUND",candidates:[],candidateCount:0,attempts:[]}}function be(e){return{status:e.status,method:e.method,methodIndex:e.methodIndex,fallback:e.fallback,candidate:e.candidate,attempts:e.attempts}}function oo(e){try{return e.defaultView?.frameElement??null}catch{return null}}function ro(e,t,n,o){let r=e.getRootNode();if(typeof r.elementFromPoint!=="function")return null;let i=r.elementFromPoint(t,n);if(!i)return"offscreen";if(i===e||e.contains(i))return null;return o.some((s)=>s.contains(i))?null:"covered"}function io(e,t){let n=t.x+t.width/2,o=t.y+t.height/2,r=Array.from(e.labels??[]),i=e;for(let s=0;s<32;s+=1){let a=ro(i,n,o,s===0?r:[]);if(a)return a;let l=i.getRootNode();if(l&&"host"in l){i=l.host;continue}let u=oo(i.ownerDocument);if(!u)return null;let f=u.getBoundingClientRect();n+=f.x+u.clientLeft,o+=f.y+u.clientTop,i=u}return null}function so(e,t){let n=e.ownerDocument.defaultView;if(!n)return!1;let o=t.x+t.width/2,r=t.y+t.height/2;return o<0||r<0||o>=n.innerWidth||r>=n.innerHeight}function ao(e){let t=e.ownerDocument.defaultView;if(t&&t.getComputedStyle(e).pointerEvents==="none")return"noPointerEvents";let n=e.getBoundingClientRect();if(n.width<=0||n.height<=0)return null;if(so(e,n)&&typeof e.scrollIntoView==="function")e.scrollIntoView({block:"center",inline:"center"}),n=e.getBoundingClientRect();return io(e,n)}function lo(e,t={}){let n=t.root??e,o={...t.rectOf?{rectOf:t.rectOf}:{},...t.isVisible?{isVisible:t.isVisible}:{}},r=null,i=null,s=()=>{if(i!==null)clearTimeout(i),i=null;r?.remove(),r=null},a=(c,p)=>(s(),Be(n,c,{...o,...p?{state:p}:{}})),l=(c,p={})=>{if(!pe(c))return he();let m=a(c,p.state);return m.status==="found"?be(m):m},u=(c,p,m={})=>{if(!p||typeof p!=="object"||typeof p.kind!=="string")return{ok:!1,code:"INVALID_ACTION"};if(!pe(c))return{ok:!1,code:"ELEMENT_NOT_FOUND",resolution:he()};let h=m.state??(Ze.has(p.kind)?"visible":"interactable"),b=a(c,h);if(b.status!=="found"){if(p.kind==="exists"&&b.code==="ELEMENT_NOT_FOUND")return{ok:!0,value:!1,resolution:b};return{ok:!1,code:b.code,resolution:b}}let g=be(b),_=Ye.has(p.kind)?ao(b.element):null;if(_)return{ok:!1,code:"ELEMENT_NOT_INTERACTABLE",reason:_,resolution:{status:"failed",code:"ELEMENT_NOT_INTERACTABLE",candidates:[b.candidate],candidateCount:1,attempts:b.attempts}};let S=et(b.element,p);if(!S.ok)return{ok:!1,code:S.problem,resolution:g};return S.value===void 0?{ok:!0,resolution:g}:{ok:!0,resolution:g,value:S.value}},f=(c,p,m)=>{let h=e.createElement(to);h.setAttribute("aria-hidden","true"),h.setAttribute("style","all: initial; position: fixed; inset: 0; pointer-events: none; z-index: 2147483647;");let b=h.attachShadow({mode:"closed"});c.forEach((g,_)=>{let S=e.createElement("div");S.setAttribute("style",`position: fixed; left: ${g.bounds.x-3}px; top: ${g.bounds.y-3}px; width: ${g.bounds.width+6}px; height: ${g.bounds.height+6}px; outline: 3px solid Highlight; border-radius: 4px; box-sizing: border-box;`);let Ee=m?`${_+1}${p?` ${p}`:""}`:p;if(Ee){let J=e.createElement("span");J.textContent=Ee.slice(0,120),J.setAttribute("style","position: absolute; left: 0; top: 100%; margin-top: 4px; padding: 2px 6px; font: 600 11px system-ui, sans-serif; background: Highlight; color: HighlightText; border-radius: 3px; white-space: nowrap;"),S.appendChild(J)}b.appendChild(S)}),e.documentElement.appendChild(h),r=h};return{version:nt,resolve:l,act:u,highlight:(c,p={})=>{if(!pe(c))return he();let m=a(c,p.state??"visible");if(m.status==="found")f([m.candidate],p.label,!1);else if(m.candidates.length>0)f(m.candidates,p.label,!0);let h=Math.min(eo,Math.max(0,Number(p.durationMs??0)||0));if(r&&h>0)i=setTimeout(s,h);return m.status==="found"?be(m):m},clearHighlight:s,snapshot:(c={})=>(s(),$e(e,{...o,...c.maxNodes?{maxNodes:c.maxNodes}:{}}))}}function ot(e,t){let n=Reflect.get(e,tt);if(n&&typeof n==="object"&&typeof n.version==="number"&&n.version>=nt)return n;let o=Object.freeze(lo(t));return Object.defineProperty(e,tt,{value:o,configurable:!0,enumerable:!1,writable:!1}),o}ot(globalThis,globalThis.document);})();
|
package/dist/dom-runtime.js
CHANGED
package/dist/drivers.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import"./index-dcs2pe49.js";
|
|
2
1
|
import {
|
|
3
2
|
parseUiScript2
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
3
|
+
} from "./index-5pv673wd.js";
|
|
4
|
+
import"./index-dcs2pe49.js";
|
|
5
|
+
import"./index-ptrmf779.js";
|
|
6
6
|
import {
|
|
7
7
|
DOM_DRIVER_CAPABILITIES2,
|
|
8
8
|
safePageText2,
|
|
9
9
|
safePageHtml2,
|
|
10
10
|
createDomDriver2
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-3r2y0mnc.js";
|
|
12
12
|
import {
|
|
13
13
|
runUiScript2
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-vpm1gnmy.js";
|
|
15
15
|
import {
|
|
16
16
|
UiDriverError2,
|
|
17
17
|
createVirtualClock2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-0tfzfxx9.js";
|
|
19
19
|
import {
|
|
20
20
|
CAPABILITY_IDS2
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-zpxk3fzd.js";
|
|
22
22
|
import {
|
|
23
23
|
walkSteps2,
|
|
24
24
|
stepTargets2
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-axph39g0.js";
|
|
26
26
|
import {
|
|
27
27
|
hydrateTreeSnapshot2
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-n7ah1jn7.js";
|
|
29
29
|
// src/drivers/snapshot-driver.ts
|
|
30
30
|
var SNAPSHOT_DRIVER_CAPABILITIES = CAPABILITY_IDS2.filter((id) => id !== "action:focusWindow");
|
|
31
31
|
var ignore = () => {
|
package/dist/heal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import"./index-5pv673wd.js";
|
|
1
2
|
import"./index-dcs2pe49.js";
|
|
2
|
-
import"./index-68x61c7a.js";
|
|
3
3
|
import {
|
|
4
4
|
UI_HEAL_MODES2,
|
|
5
5
|
UI_HEAL_MODE_RANK2,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
matchesUrlPattern2,
|
|
18
18
|
HEAL_POSITION_TOLERANCE_PX2,
|
|
19
19
|
verifyHealCandidate2
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-ptrmf779.js";
|
|
21
21
|
import {
|
|
22
22
|
MAX_HEAL_QUESTION_NODES2,
|
|
23
23
|
MAX_HEAL_NODE_NAME2,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
targetFromSnapshotNode2,
|
|
27
27
|
MAX_HEAL_ANSWER_LENGTH2,
|
|
28
28
|
parseHealAnswer2
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-9xgz8dxt.js";
|
|
30
30
|
import {
|
|
31
31
|
MAX_HEAL_KEYWORDS2,
|
|
32
32
|
MAX_HEAL_KEYWORD_LENGTH2,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
MAX_POPUP_HANDLER_STEPS2,
|
|
44
44
|
MAX_POPUP_URL_PATTERN2,
|
|
45
45
|
POPUP_HANDLER_STEP_WAIT_MS2
|
|
46
|
-
} from "./index-
|
|
46
|
+
} from "./index-dwp10g62.js";
|
|
47
47
|
import {
|
|
48
48
|
SNAPSHOT_ROOT_PATH2,
|
|
49
49
|
MAX_SNAPSHOT_PATH_LENGTH2,
|
|
@@ -142,6 +142,11 @@ var UI_ERROR_CODES2 = {
|
|
|
142
142
|
family: "DEPENDENCY",
|
|
143
143
|
preflight: false,
|
|
144
144
|
meaning: "Healing found and checked a new target, but a person must approve it first (heal with approval, an always-ask step or keyword, or a consequential control); the run stops with the candidate in error.heal and the desk parks it for approval. Never retried in the script"
|
|
145
|
+
},
|
|
146
|
+
SHELL_NOT_ALLOWED: {
|
|
147
|
+
family: "VALIDATION",
|
|
148
|
+
preflight: true,
|
|
149
|
+
meaning: "The script has Run command or file-write steps and the pool or grant, or the machine (desk.allow-shell), does not allow them; no step ran"
|
|
145
150
|
}
|
|
146
151
|
};
|
|
147
152
|
var UI_ERROR_CODE_LIST2 = Object.keys(UI_ERROR_CODES2);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UiDriverError2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-0tfzfxx9.js";
|
|
4
4
|
import {
|
|
5
5
|
CAPABILITY_IDS2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-zpxk3fzd.js";
|
|
7
7
|
import {
|
|
8
8
|
MAX_LIST_ITEMS2
|
|
9
9
|
} from "./index-20bbwwc9.js";
|
|
10
10
|
import {
|
|
11
11
|
createDomRuntime2
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-zagmp5ya.js";
|
|
13
13
|
import {
|
|
14
14
|
MAX_READ_TEXT2,
|
|
15
15
|
performDomAction2
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
resolveWebTarget2,
|
|
21
21
|
resolveAllWebTargets2,
|
|
22
22
|
serializeTreeSnapshot2
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-n7ah1jn7.js";
|
|
24
24
|
import {
|
|
25
25
|
isElementVisible2,
|
|
26
26
|
isSensitiveElement2
|