@burdenoff/ui-engine 2026.1127.4 → 2026.1129.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.
Files changed (77) hide show
  1. package/README.md +68 -4
  2. package/dist/analyze/analyze.d.ts +19 -0
  3. package/dist/analyze/context.d.ts +40 -0
  4. package/dist/analyze/index.d.ts +10 -0
  5. package/dist/analyze/messages.d.ts +46 -0
  6. package/dist/analyze/rules/fixed-wait.d.ts +6 -0
  7. package/dist/analyze/rules/hardware-input.d.ts +2 -0
  8. package/dist/analyze/rules/heal-consequential.d.ts +2 -0
  9. package/dist/analyze/rules/index.d.ts +3 -0
  10. package/dist/analyze/rules/inline-target.d.ts +2 -0
  11. package/dist/analyze/rules/masked-value.d.ts +8 -0
  12. package/dist/analyze/rules/no-cleanup.d.ts +2 -0
  13. package/dist/analyze/rules/plain-text-secret.d.ts +2 -0
  14. package/dist/analyze/rules/popup-handler-loop.d.ts +2 -0
  15. package/dist/analyze/rules/rule.d.ts +15 -0
  16. package/dist/analyze/rules/secret-origin.d.ts +7 -0
  17. package/dist/analyze/rules/sensitive-screenshot.d.ts +2 -0
  18. package/dist/analyze/rules/single-method-target.d.ts +2 -0
  19. package/dist/analyze/rules/unknown-variable.d.ts +2 -0
  20. package/dist/analyze/rules/unused-value.d.ts +2 -0
  21. package/dist/analyze/sensitive.d.ts +14 -0
  22. package/dist/analyze/types.d.ts +89 -0
  23. package/dist/analyze.d.ts +2 -0
  24. package/dist/analyze.js +26 -0
  25. package/dist/dom-runtime.iife.js +1 -1
  26. package/dist/dom-runtime.js +2 -2
  27. package/dist/drivers.js +13 -9
  28. package/dist/heal/answer.d.ts +26 -0
  29. package/dist/heal/consequence.d.ts +74 -0
  30. package/dist/heal/index.d.ts +19 -0
  31. package/dist/heal/modes.d.ts +25 -0
  32. package/dist/heal/popup-limits.d.ts +11 -0
  33. package/dist/heal/popup.d.ts +48 -0
  34. package/dist/heal/question.d.ts +41 -0
  35. package/dist/heal/target-from-node.d.ts +9 -0
  36. package/dist/heal/types.d.ts +134 -0
  37. package/dist/heal/verify-rules.d.ts +19 -0
  38. package/dist/heal/verify.d.ts +52 -0
  39. package/dist/heal.d.ts +2 -0
  40. package/dist/heal.js +106 -0
  41. package/dist/index-20bbwwc9.js +37 -0
  42. package/dist/{index-pm13mvvc.js → index-2g060ryg.js} +3 -196
  43. package/dist/index-6h7ah1dw.js +328 -0
  44. package/dist/{index-h88y5qgv.js → index-6kva2gvd.js} +6 -4
  45. package/dist/{index-ct2xctrq.js → index-70vm0qz8.js} +2 -2
  46. package/dist/{index-3f1j8386.js → index-8w31tpfq.js} +38 -19
  47. package/dist/{index-zzhysbkj.js → index-eff47v1g.js} +436 -20
  48. package/dist/{index-3jymbm5t.js → index-g7724awk.js} +1 -92
  49. package/dist/index-gvavb597.js +195 -0
  50. package/dist/index-hw5npwsv.js +63 -0
  51. package/dist/{index-ycs2bz1a.js → index-mhv6a02p.js} +11 -166
  52. package/dist/index-p5823rpv.js +0 -0
  53. package/dist/{index-5k26keah.js → index-qg9yfr7r.js} +16 -67
  54. package/dist/{index-895kscx3.js → index-qmv3ar39.js} +7 -5
  55. package/dist/index-t55wvhvh.js +229 -0
  56. package/dist/{index-77pcz6n3.js → index-vnv9tp11.js} +4 -2
  57. package/dist/index-w9jc25y9.js +306 -0
  58. package/dist/index-xdtanv9b.js +843 -0
  59. package/dist/{index-vg8r40y7.js → index-yc0jgph6.js} +7 -0
  60. package/dist/index-zhbwhdya.js +407 -0
  61. package/dist/index.d.ts +2 -0
  62. package/dist/index.js +156 -26
  63. package/dist/interpret/driver.d.ts +14 -0
  64. package/dist/interpret/errors.d.ts +11 -2
  65. package/dist/interpret/events.d.ts +4 -0
  66. package/dist/interpret/run.d.ts +33 -0
  67. package/dist/interpret.js +5 -4
  68. package/dist/script.js +29 -23
  69. package/dist/target/index.d.ts +2 -0
  70. package/dist/target/roles.d.ts +11 -0
  71. package/dist/target/snapshot-mask.d.ts +49 -0
  72. package/dist/target/snapshot-tree.d.ts +65 -0
  73. package/dist/target/snapshot-url.d.ts +6 -0
  74. package/dist/target/snapshot.d.ts +1 -6
  75. package/dist/target.js +55 -13
  76. package/dist/testing.js +2 -2
  77. package/package.json +11 -3
@@ -1 +1 @@
1
- (()=>{var U=["data-fg-sensitive","data-sensitive","data-private"];function Z(e){return U.some((t)=>e.hasAttribute(t))}function D(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=D(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 Y=256;function g(e){return(e??"").normalize("NFKC").replace(/\s+/g," ").trim().toLowerCase()}function P(e,t){return g(e)===g(t)}function fe(e,t){let n=g(t);return n.length>0&&g(e).includes(n)}function qe(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 me(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-qe(n,o)/r}function _(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}var Q=512,Ze=65536,Ye={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"},Je={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"},Qe=new Set(["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"]),et=new Set(["button","input","meter","output","progress","select","textarea"]),tt=new Set(["script","style","noscript","template","head","title","meta","link"]);function A(e){return e.localName.toLowerCase()}function be(e){return e.parentElement?.closest("article, aside, main, nav, section")!=null}function nt(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 Ye[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 be(e)?"":"banner";case"footer":return be(e)?"":"contentinfo";case"section":case"form":return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?t==="form"?"form":"region":"";default:return Je[t]??""}}function R(e){let t=e.getAttribute("role")?.trim().split(/\s+/)[0];return t?t.toLowerCase():nt(e)}function ot(e,t){let n=e.getRootNode();return typeof n.getElementById==="function"?n.getElementById(t):null}function rt(e){return e.hasAttribute("hidden")||e.getAttribute("aria-hidden")==="true"}function it(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 st(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 at=/^(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 pe(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(tt.has(a)||Z(s))return;if(!r&&rt(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=it(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&&at.test(a);if(f)O(n," ");for(let d of st(s))pe(d,t+1,n,o,r,l);if(f)O(n," ")}function he(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 Ee(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)||Ee(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 pe(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 lt(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 Te(e,t,!0)}function ge(e,t){return Te(e,t,!1)}function ut(e,t){let n=Array.from(e.children).find((o)=>A(o)==="title");if(!n||y(n)||Ee(n))return"";return E(Array.from(n.childNodes).map((o)=>V(o,t)).join(" "))}function Te(e,t,n){let o=e.getAttribute("aria-labelledby");if(o){let l=o.split(/\s+/).filter(Boolean).map((u)=>ot(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(et.has(i)){let l=lt(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=ut(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&&Qe.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,Ze)}function ee(e,t,n,o){return R(e)===t.trim().toLowerCase()&&g(k(e,o))===g(n)}function ct(e){return e.ownerDocument.defaultView}function B(e){let t=D(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=ct(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(!dt.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 dt=new Set(["button","input","select","textarea","optgroup","option","fieldset"]);function C(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 v(e){let t=Array.from(e.querySelectorAll("*"));return e.nodeType===1?[e,...t]:t}var ft=/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,mt=/password|one-time-code|^cc-/i;function bt(e){return ft.test(e)}function S(e){if(y(e))return!0;if(xe(e))return!0;for(let t=x(e);t;t=x(t))if(xe(t))return!0;return!1}function xe(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)=>mt.test(i)))return!0;return pt(e).some((i)=>i.length>0&&bt(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 ht=0.8,Et=0.05,gt=4,Ae=1000,z=2,Tt=new Set(["button","checkbox","combobox","link","listbox","menuitem","menuitemcheckbox","menuitemradio","option","radio","searchbox","slider","spinbutton","switch","tab","textbox","treeitem"]),xt=/^[A-Za-z_][\w:.-]{0,127}$/;function At(e){return e.nodeType===9?e:e.ownerDocument}function yt(e,t){return{kind:"list",elements:v(t.root).filter((o)=>ee(o,e.role,e.name,t.probe)),...e.nth!==void 0?{nth:e.nth}:{}}}function St(e,t){try{return{kind:"list",elements:Array.from(t.root.querySelectorAll(e))}}catch{return{kind:"invalid"}}}function Mt(e,t){let n=e.attribute??"data-testid";if(!xt.test(n))return{kind:"invalid"};return{kind:"list",elements:v(t.root).filter((r)=>r.getAttribute(n)===e.value)}}function Rt(e,t){if(e.nodeType===9)return t.ownerDocument===e&&t.getRootNode()===e;return e===t||e.contains(t)}function kt(e,t){let n=At(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,Ae);for(let s=0;s<i;s+=1){let a=o.snapshotItem(s);if(a&&a.nodeType===1&&Rt(t.root,a))r.push(a)}return{kind:"list",elements:r,...o.snapshotLength>Ae?{overflow:!0}:{}}}function Nt(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 wt(e,t){let n=Math.min(1,Math.max(0.5,e.threshold??ht)),o=e.role?.trim().toLowerCase(),r=Math.min(g(e.name).length,Y),i=[];for(let s of v(t.root)){let a=R(s);if(o?a!==o:a==="")continue;let l=k(s,t.probe);if(!Nt(l,r,n))continue;let u=me(l,e.name);if(u>=n)i.push({element:s,score:u})}return{kind:"ranked",scored:i,margin:Et}}function Me(e,t){let n=v(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 vt(e,t){let n=e.exact?(o)=>P(o,e.text):(o)=>fe(o,e.text);if(g(e.text).length===0)return{kind:"list",elements:[]};return{kind:"list",elements:Me(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"?v(t.root).filter((o)=>ee(o,e.role,e.name,t.probe)):Me(t,(o)=>te(o)===te(e.text)&&te(o)!=="")).filter((o)=>N(o,t.probe))}function Re(e,t,n){let o=e.role?.trim().toLowerCase();return v(t.root).filter((r)=>{let i=R(r);if(o?i!==o:!Tt.has(i))return!1;return!n.some((s)=>s===r||r.contains(s))})}var Dt=new Set(["h1","h2","h3","h4","h5","h6","legend","caption","figcaption","summary","dt"]);function _t(e){return Dt.has(e.localName)||R(e)==="heading"}function Ot(e){for(let t=e;t;t=t.parentElement)if(_t(t))return t;return null}function It(e,t,n){let o=Re(e,t,n),r=new Set;for(let i of n){let a=Ot(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 ye(e,t,n,o){return e<o&&n<t}function Lt(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=ye(t.y,r,n.y,s),l=ye(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 Se(e){return e.width>0&&e.height>0}function Wt(e,t){let n=Ct(e.anchor,t);if(n.length===0)return{kind:"list",elements:[]};if(e.relation==="inside")return It(e,t,n);let o=n.map((i)=>C(i,t.probe)).filter(Se);if(o.length===0)return{kind:"unsupported"};let r=[];for(let i of Re(e,t,n)){let s=C(i,t.probe);if(!Se(s))continue;let a=null;for(let l of o){let u=Lt(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:gt}}function ke(e,t){switch(e.kind){case"role":return yt(e,t);case"css":return St(e.selector,t);case"testId":return Mt(e,t);case"xpath":return kt(e,t);case"fuzzy":return wt(e,t);case"anchor":return Wt(e,t);case"text":return vt(e,t);default:return{kind:"unsupported"}}}var Ne=5,we=200;var Ut={x:0,y:0,width:0,height:0};function Pt(e,t,n){let o={root:e,offset:Ut,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=C(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 Ht(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 ve(e,t,n,o,r){return{role:R(e),name:S(e)?"":_(he(e)?ge(e,r):k(e,r),we),bounds:C(e,r,o),method:t.kind,methodIndex:n}}function Vt(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 Ft(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 Bt(e,t){switch(e.kind){case"invalid":case"unsupported":return e.kind;case"list":return Vt(e.elements,e.elements.filter(t),e.nth,e.overflow);case"ranked":return Ft(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 Ce(e,t,n={}){let o=n.state??"interactable",r=Pt(e,t.frame,n);if(!("root"in r)){let d=t.methods.map((c,b)=>({index:b,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 b=(p)=>Ht(p,o,r,n),m=Bt(ke(c,{root:r.root,probe:n,keep:b}),b);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,Ne).map((c)=>ve(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]",zt=[/\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],Xt=/([\s"'`,;:=()[\]{}]+)/,Kt=/^(?:api[_-]?key|access[_-]?key|secret|secret[_-]?key|client[_-]?secret|token|password)$/i;function jt(e){let t=e.indexOf("…");return e.includes("***")||t!==-1&&t<e.length-1}function $t(e){let t=e.split(Xt);for(let n=0;n<t.length;n+=2){let o=t[n]??"";if(o&&o!=="[REDACTED]"&&jt(o))t[n]="[REDACTED]";let r=t[n+1]??"";if(t[n+2]&&Kt.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 zt)t=t.replace(n,"[REDACTED]");return t=$t(t),t.replace(/(?:\[REDACTED\]){2,}/g,"[REDACTED]")}var De="";function K(e){if(!e)return!1;let t=e.replaceAll("[REDACTED]",De);return oe(t).replaceAll(De,"[REDACTED]")!==e}function re(e){try{return decodeURIComponent(e.replaceAll("+"," "))}catch{return e}}function _e(e){return K(re(e).replace(/[/?&#]/g," "))}var Gt=1,qt=5000,Zt=64,Ie=500,Yt=new Set(["script","style","noscript","template","link","meta","base","head","object","embed"]),Jt=new Set(["textarea"]),Qt=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]),en=new Set(["aria-valuenow","aria-valuetext","aria-checked","aria-selected","aria-pressed"]),tn=new Set(["button","submit","reset"]),Le=/reset|recover|verify|verification|magic|confirm|activate|invite|unsubscribe/i,nn=/^[a-z][a-z0-9-]{0,63}$/;var on=/^[a-z][a-z0-9_:.-]{0,127}$/;function We(e){let t=e.getAttribute("contenteditable");return t!==null&&t.trim().toLowerCase()!=="false"}function Ue(e){for(let t=x(e);t;t=x(t))if(t.localName==="textarea"||We(t))return!0;return!1}function rn(e){if(!e.parentElement?.shadowRoot)return!1;let t=D(e);return t!==null&&(S(t)||Ue(t))}function j(e){return _(oe(e),Ie)}function sn(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 an(e){let t=e.split(/[/?#;]/),n=t.findIndex((r)=>Le.test(r));return t.slice(0,n+1).map((r)=>K(r)?ne:r).join("/")}function Pe(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(sn),a=s.findIndex((f)=>Le.test(f)),u=(a>=0?i.slice(0,a+1):i).map((f,d)=>{let c=s[d]??f;if(d===a)return an(c);return K(c)||_e(f)?ne:f}).join("/");return _(`${o}${u}`,Ie)}var ln=new Set(["alt","label","title","placeholder","value","aria-label","aria-description","aria-roledescription","aria-placeholder"]),un=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 cn(e,t){let n={},o=e.localName;for(let r of Array.from(e.attributes)){let i=r.name.toLowerCase();if(i.startsWith("on")||!on.test(i))continue;if(t&&(ln.has(i)||i==="href"||i.startsWith("aria-")&&!un.has(i)))continue;if(Qt.has(i)||i.startsWith("aria-")&&!en.has(i))n[i]=j(r.value);else if(i==="href"&&(o==="a"||o==="area")){let s=Pe(r.value);if(s!==null)n[i]=s}else if(i==="value"&&o==="input"&&tn.has((e.getAttribute("type")??"").toLowerCase()))n[i]=j(r.value)}return Object.keys(n).length>0?n:void 0}function dn(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 Oe(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||rn(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(Yt.has(i)||!nn.test(i))return null;if(n>Zt)return t.truncated=!0,null;t.count+=1;let s={t:i},a=Ue(e),l=r||a||y(e),u=cn(e,l);if(u)s.a=u;if(N(e,t.probe)){let p=dn(e,t.probe);if(p)s.r=p}else s.h=1;let f=S(e),d=o&&!a&&!f&&!Jt.has(i)&&!We(e),c=l||!d;if(i==="svg"){let p=Array.from(e.children).find((T)=>T.localName==="title"),h=p?G(p,t,n+1,d,c):null;if(h)s.c=[h];return s}if(i==="iframe"||i==="frame"){let p=null;try{p=e.contentDocument}catch{p=null}let h=p?.documentElement;if(h){let T=G(h,t,n+1,d,c);if(T)s.f=T}return s}let b=Oe(e,t,n,d,c);if(b.length>0)s.c=b;let m=e.shadowRoot;if(m){let p=Oe(m,t,n,d,c);if(p.length>0)s.s=p}return s}function fn(e){let t=e.querySelector("title");if(t&&y(t))return"";return j(e.title??"")}function He(e,t={}){let n={count:0,max:Math.max(1,t.maxNodes??qt),truncated:!1,probe:t},o=G(e.documentElement,n,0,!0,!1)??{t:"html"},r=e.defaultView;return{snapshotVersion:Gt,url:Pe(e.URL)??"",title:fn(e),viewport:{width:Math.round(r?.innerWidth??0),height:Math.round(r?.innerHeight??0)},root:o,nodeCount:n.count,truncated:n.truncated}}var ie=65536,mn=65536,Fe=new Set(["getText","getValue","getAttribute","exists"]),Be=new Set(["click","doubleClick","hover","check"]);function bn(e){return e.ownerDocument.defaultView}var pn={left:0,middle:1,right:2},hn={left:1,middle:4,right:2};function se(e,t,n){let o=e.getBoundingClientRect();return{bubbles:!0,cancelable:!0,composed:!0,view:t,button:pn[n],buttons:0,clientX:o.x+o.width/2,clientY:o.y+o.height/2,pointerId:1,pointerType:"mouse",isPrimary:!0}}function ze(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 En='a[href], area[href], button, input, select, textarea, iframe, summary, [tabindex], [contenteditable]:not([contenteditable="false"])';function gn(e,t){for(let o=e;o;o=B(o))if(o.matches(En)&&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 Tn(e,t,n,o,r){let i=typeof t.PointerEvent==="function"?t.PointerEvent:t.MouseEvent,s={...n,buttons:hn[o],detail:r},a={...n,detail:r};ze(e,t,n);let l=e.dispatchEvent(new i("pointerdown",s));if(l&&e.dispatchEvent(new t.MouseEvent("mousedown",s)))gn(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=se(e,t,n);Tn(e,t,r,n,o);let i=n==="left"?"click":n==="right"?"contextmenu":"auxclick";e.dispatchEvent(new t.MouseEvent(i,{...r,detail:o}))}function Xe(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 xn(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 An(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 Ve(e,t,n,o){if(n.length>mn)return{ok:!1,problem:"INVALID_ACTION"};if(Xe(e,t)){if(e.readOnly)return{ok:!1,problem:"NOT_EDITABLE"};return e.focus(),xn(e,t,o?`${e.value}${n}`:n),{ok:!0}}if(An(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 yn(e){let t=e.getAttribute("label");return t!==null&&t.trim()!==""?t:e.textContent??""}function Sn(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(yn(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 Mn(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 Rn=/^(?:[\s\S]|[A-Z][A-Za-z0-9]{1,23})$/u;function kn(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 Nn(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 ae(e,t){e.dispatchEvent(new t.MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0,view:t,detail:0}))}function wn(e,t,n){if(!Rn.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(kn(e,t))ae(e,t);else if(e instanceof t.HTMLInputElement&&Xe(e,t)&&e.form)Dn(e.form,t)}let s=e.dispatchEvent(new t.KeyboardEvent("keyup",r));if(o===" "&&i&&s&&Nn(e,t))ae(e,t);return{ok:!0}}var vn=new Set(["submit","image"]),Cn=new Set(["text","search","url","tel","email","password","date","month","week","time","datetime-local","number"]);function Dn(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))ae(r,t);return}if(n.filter((s)=>s instanceof t.HTMLInputElement&&Cn.has(s.type)).length===1)e.requestSubmit()}function _n(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,ie);let n=e.getAttribute("aria-checked");if(n==="true"||n==="false")return n==="true";return e.getAttribute("aria-valuenow")??e.getAttribute("aria-valuetext")}var On=/^[A-Za-z_][\w:.-]{0,127}$/;function Ke(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",{...se(e,n,"left"),detail:2})),{ok:!0};case"hover":{let o=se(e,n,"left"),r=typeof n.PointerEvent==="function"?n.PointerEvent:n.MouseEvent;return ze(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"?Ve(e,n,t.text,t.append===!0):{ok:!1,problem:"INVALID_ACTION"};case"clear":return Ve(e,n,"",!1);case"select":return Sn(e,n,t);case"check":return Mn(e,n,t.checked===!0);case"pressKey":return typeof t.key==="string"?wn(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,ie)};case"getValue":if(S(e))return{ok:!1,problem:"SENSITIVE_ELEMENT"};return{ok:!0,value:_n(e,n)};case"getAttribute":{if(typeof t.name!=="string"||!On.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,ie)??null}}case"exists":return{ok:!0,value:!0};default:return{ok:!1,problem:"INVALID_ACTION"}}}var $e=1,je="__burdenoffUiRuntime",In=60000,Ln="fg-ui-highlight",Wn=new Set(["role","css","testId","xpath","fuzzy","anchor","text"]);function le(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"&&Wn.has(String(n.kind)))}function ue(){return{status:"failed",code:"ELEMENT_NOT_FOUND",candidates:[],candidateCount:0,attempts:[]}}function ce(e){return{status:e.status,method:e.method,methodIndex:e.methodIndex,fallback:e.fallback,candidate:e.candidate,attempts:e.attempts}}function Un(e){try{return e.defaultView?.frameElement??null}catch{return null}}function Pn(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 Hn(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=Pn(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=Un(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 Vn(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 Fn(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(Vn(e,n)&&typeof e.scrollIntoView==="function")e.scrollIntoView({block:"center",inline:"center"}),n=e.getBoundingClientRect();return Hn(e,n)}function Bn(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,b)=>(s(),Ce(n,c,{...o,...b?{state:b}:{}})),l=(c,b={})=>{if(!le(c))return ue();let m=a(c,b.state);return m.status==="found"?ce(m):m},u=(c,b,m={})=>{if(!b||typeof b!=="object"||typeof b.kind!=="string")return{ok:!1,code:"INVALID_ACTION"};if(!le(c))return{ok:!1,code:"ELEMENT_NOT_FOUND",resolution:ue()};let p=m.state??(Fe.has(b.kind)?"visible":"interactable"),h=a(c,p);if(h.status!=="found"){if(b.kind==="exists"&&h.code==="ELEMENT_NOT_FOUND")return{ok:!0,value:!1,resolution:h};return{ok:!1,code:h.code,resolution:h}}let T=ce(h),W=Be.has(b.kind)?Fn(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=Ke(h.element,b);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,b,m)=>{let p=e.createElement(Ln);p.setAttribute("aria-hidden","true"),p.setAttribute("style","all: initial; position: fixed; inset: 0; pointer-events: none; z-index: 2147483647;");let h=p.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 de=m?`${W+1}${b?` ${b}`:""}`:b;if(de){let q=e.createElement("span");q.textContent=de.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(p),r=p};return{version:$e,resolve:l,act:u,highlight:(c,b={})=>{if(!le(c))return ue();let m=a(c,b.state??"visible");if(m.status==="found")f([m.candidate],b.label,!1);else if(m.candidates.length>0)f(m.candidates,b.label,!0);let p=Math.min(In,Math.max(0,Number(b.durationMs??0)||0));if(r&&p>0)i=setTimeout(s,p);return m.status==="found"?ce(m):m},clearHighlight:s,snapshot:(c={})=>(s(),He(e,{...o,...c.maxNodes?{maxNodes:c.maxNodes}:{}}))}}function Ge(e,t){let n=Reflect.get(e,je);if(n&&typeof n==="object"&&typeof n.version==="number"&&n.version>=$e)return n;let o=Object.freeze(Bn(t));return Object.defineProperty(e,je,{value:o,configurable:!0,enumerable:!1,writable:!1}),o}Ge(globalThis,globalThis.document);})();
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);})();
@@ -6,14 +6,14 @@ import {
6
6
  isRuntimeTarget2,
7
7
  createDomRuntime2,
8
8
  installDomRuntime2
9
- } from "./index-ct2xctrq.js";
9
+ } from "./index-70vm0qz8.js";
10
10
  import {
11
11
  MAX_READ_TEXT2,
12
12
  MAX_TYPED_TEXT2,
13
13
  READ_ACTIONS2,
14
14
  POINTER_ACTIONS2,
15
15
  performDomAction2
16
- } from "./index-77pcz6n3.js";
16
+ } from "./index-vnv9tp11.js";
17
17
  export {
18
18
  DOM_RUNTIME_GLOBAL2 as DOM_RUNTIME_GLOBAL,
19
19
  DOM_RUNTIME_VERSION2 as DOM_RUNTIME_VERSION,
package/dist/drivers.js CHANGED
@@ -1,28 +1,31 @@
1
1
  import"./index-cs6acyjn.js";
2
2
  import {
3
3
  parseUiScript2
4
- } from "./index-895kscx3.js";
4
+ } from "./index-qmv3ar39.js";
5
+ import"./index-w9jc25y9.js";
5
6
  import {
6
7
  DOM_DRIVER_CAPABILITIES2,
7
8
  safePageText2,
8
9
  safePageHtml2,
9
10
  createDomDriver2
10
- } from "./index-3f1j8386.js";
11
+ } from "./index-8w31tpfq.js";
11
12
  import {
12
13
  runUiScript2
13
- } from "./index-zzhysbkj.js";
14
+ } from "./index-eff47v1g.js";
14
15
  import {
15
16
  UiDriverError2,
16
17
  createVirtualClock2
17
- } from "./index-vg8r40y7.js";
18
+ } from "./index-yc0jgph6.js";
18
19
  import {
19
- walkSteps2,
20
- stepTargets2,
21
20
  CAPABILITY_IDS2
22
- } from "./index-3jymbm5t.js";
21
+ } from "./index-hw5npwsv.js";
22
+ import {
23
+ walkSteps2,
24
+ stepTargets2
25
+ } from "./index-g7724awk.js";
23
26
  import {
24
27
  hydrateTreeSnapshot2
25
- } from "./index-5k26keah.js";
28
+ } from "./index-qg9yfr7r.js";
26
29
  // src/drivers/snapshot-driver.ts
27
30
  var SNAPSHOT_DRIVER_CAPABILITIES = CAPABILITY_IDS2.filter((id) => id !== "action:focusWindow");
28
31
  var ignore = () => {
@@ -96,7 +99,8 @@ function createSnapshotDriver(options) {
96
99
  });
97
100
  }
98
101
  }
99
- }
102
+ },
103
+ treeSnapshot: async () => options.snapshot
100
104
  };
101
105
  }
102
106
  async function replayUiScriptOnSnapshot(script, options) {
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `parseHealAnswer` (plan P4-06a, threat R3 of document 24): reading a
3
+ * model's answer to a heal question strictly.
4
+ *
5
+ * The only answers are `{"nodePath": "<path>", "confidence": <0..1>}` and
6
+ * `{"notPresent": true}`, as one JSON object (a single surrounding code fence
7
+ * is tolerated, nothing else). The path must be a path of the snapshot that
8
+ * names a visible element, and, when the question's listed paths are given,
9
+ * one of them. Anything else (prose, unknown keys, an unknown or hidden path,
10
+ * a path that cannot become a target) is `not_present`: an answer can never
11
+ * carry an action, a value or an address, and R2's checks still run on a
12
+ * candidate it names.
13
+ */
14
+ import type { UiTreeSnapshot } from '../target/snapshot.js';
15
+ import { type SnapshotIndex } from '../target/snapshot-tree.js';
16
+ import type { UiHealAnswer } from './types.js';
17
+ /** Longest answer text read. */
18
+ export declare const MAX_HEAL_ANSWER_LENGTH = 4096;
19
+ export interface ParseHealAnswerOptions {
20
+ /** The paths the question listed (`buildHealQuestion(...).nodes`); an answer naming another path is refused. */
21
+ listedPaths?: readonly string[];
22
+ /** A prepared index of the snapshot. */
23
+ index?: SnapshotIndex;
24
+ }
25
+ /** Parse a model's answer to a heal question against the (masked) snapshot the question was built from. */
26
+ export declare function parseHealAnswer(text: unknown, snapshot: Pick<UiTreeSnapshot, 'root'>, options?: ParseHealAnswerOptions): UiHealAnswer;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * The consequence classifier (plan P4-06a, threat R2 of document 24): what
3
+ * acting on a healed element could cause. A consequential candidate is never
4
+ * used without a person's approval, whatever the mode (`decideHeal`).
5
+ *
6
+ * The built-in lists are English keyword phrases, matched as whole words over
7
+ * the element's accessible name, its role, the words of its link and its form
8
+ * (name, id, label, action) and any hint words the caller adds. A submit
9
+ * button takes the class of its form, so "OK" in a payment form is a payment.
10
+ * The workspace adds its own phrases (`alwaysAskPatterns`, decision D-P4-12):
11
+ * case-folded keyword phrases, never regular expressions, at most 50 of at most
12
+ * 100 characters (threat C4); further or longer phrases are ignored.
13
+ *
14
+ * Accepted residual risk (document 24 section 8): a control labelled in
15
+ * another language may not be classified; Suggest stays the default mode and
16
+ * workspaces add their own phrases.
17
+ */
18
+ import type { UiStepAction, UiTarget } from '../script/types.js';
19
+ import type { UiConsequence } from './types.js';
20
+ /** Most workspace keyword phrases used. */
21
+ export declare const MAX_HEAL_KEYWORDS = 50;
22
+ /** Longest workspace keyword phrase used. */
23
+ export declare const MAX_HEAL_KEYWORD_LENGTH = 100;
24
+ /** The built-in keyword phrases, by consequence. Checked in this order. */
25
+ export declare const CONSEQUENCE_KEYWORDS: Readonly<Record<UiConsequence, readonly string[]>>;
26
+ /** What the classifier reads about an element. Every field is optional text; nothing is read from the page here. */
27
+ export interface UiHealElementInfo {
28
+ role?: string;
29
+ name?: string;
30
+ /** The element's tag (`button`, `input`), to tell submit buttons. */
31
+ tag?: string;
32
+ /** The `type` attribute (`submit`, `button`). */
33
+ type?: string;
34
+ /** The link's address (path only). */
35
+ href?: string;
36
+ /** Words of the element's form: its name, id, label and action. */
37
+ formWords?: string;
38
+ /** Other words the caller knows (selectors, test ids). */
39
+ hints?: readonly string[];
40
+ }
41
+ /** The classifier's answer. */
42
+ export interface UiConsequenceVerdict {
43
+ /** The built-in class, or null. */
44
+ consequence: UiConsequence | null;
45
+ /** The workspace phrase that matched, when one did: the step must always ask. */
46
+ keyword: string | null;
47
+ }
48
+ /** Text as a list of lower-case words: camel case, punctuation, `-` and `_` split words. */
49
+ export declare function keywordWords(text: string): string[];
50
+ /**
51
+ * The workspace phrases the classifier uses: trimmed, non-empty, at most
52
+ * `MAX_HEAL_KEYWORD_LENGTH` characters, the first `MAX_HEAL_KEYWORDS` of them.
53
+ */
54
+ export declare function usableKeywords(keywords: readonly unknown[] | undefined): string[];
55
+ /** True for a step that can set something off: a click, a check, a choice, a key, or typing that presses Enter. */
56
+ export declare function isActingStep(step: {
57
+ action: UiStepAction;
58
+ pressEnter?: boolean;
59
+ }): boolean;
60
+ /**
61
+ * Classify an element for a step. Only steps that can set something off are
62
+ * classified: clicks, checks, choices, keys, and a `type` step that presses
63
+ * Enter. Reads, waits, hovers and plain typing are never consequential.
64
+ */
65
+ export declare function classifyConsequence(element: UiHealElementInfo, step: {
66
+ action: UiStepAction;
67
+ pressEnter?: boolean;
68
+ }, extraKeywords?: readonly unknown[]): UiConsequenceVerdict;
69
+ /**
70
+ * What a stored target says about its element, for classifying a step before
71
+ * it runs (the analyzer): the role of its first role method, its names and
72
+ * texts, and its selectors and test ids as hints.
73
+ */
74
+ export declare function elementInfoFromTarget(target: UiTarget, elementName?: string): UiHealElementInfo;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * `@burdenoff/ui-engine/heal`: UI step healing (plan P4-06a, spec 10 section
3
+ * 3): the heal request and answer types, the question builder and the strict
4
+ * answer parser, the deterministic candidate check, the consequence
5
+ * classifier, targets from snapshot nodes, snapshot masking, and pop-up
6
+ * handlers. Everything here is pure except `verifyHealCandidate`, which asks
7
+ * the desk driver; none of it needs a DOM, so the workflow service uses it too.
8
+ */
9
+ export { UI_CONSEQUENCES, UI_HEAL_CHECK_REASONS, UI_HEAL_FAILURE_CODES, UI_HEAL_MODES, UI_HEAL_MODE_RANK, type UiConsequence, type UiHealAnswer, type UiHealCandidate, type UiHealCheckReason, type UiHealDecision, type UiHealElementRef, type UiHealFailureCode, type UiHealHook, type UiHealHookResult, type UiHealMode, type UiHealOutcome, type UiHealReport, type UiHealRequest, type UiHealSettings, } from './types.js';
10
+ export { capHealMode, decideHeal, parseHealMode } from './modes.js';
11
+ export { CONSEQUENCE_KEYWORDS, MAX_HEAL_KEYWORDS, MAX_HEAL_KEYWORD_LENGTH, type UiConsequenceVerdict, type UiHealElementInfo, classifyConsequence, elementInfoFromTarget, keywordWords, usableKeywords, } from './consequence.js';
12
+ export { HEALABLE_ACTIONS, VALUE_ACTIONS, compatibleRoles } from './verify-rules.js';
13
+ export { HEAL_SYSTEM_PROMPT, MAX_HEAL_NODE_NAME, MAX_HEAL_QUESTION_NODES, type UiHealQuestion, type UiHealQuestionInput, type UiHealQuestionNode, buildHealQuestion, } from './question.js';
14
+ export { MAX_HEAL_ANSWER_LENGTH, type ParseHealAnswerOptions, parseHealAnswer } from './answer.js';
15
+ export { HEAL_POSITION_TOLERANCE_PX, type UiHealCheck, type VerifyHealContext, verifyHealCandidate } from './verify.js';
16
+ export { targetFromSnapshotNode } from './target-from-node.js';
17
+ export { MAX_POPUP_HANDLERS_PER_APPLICATION, MAX_POPUP_HANDLERS_PER_STEP, MAX_POPUP_HANDLER_STEPS, MAX_POPUP_URL_PATTERN, POPUP_HANDLER_ACTIONS, POPUP_HANDLER_STEP_WAIT_MS, type UiPopupHandler, type UiPopupHandlerMatch, type UiPopupHandlerRejection, analyzeUiPopupHandler, matchesUrlPattern, parseUiPopupHandler, popupHandlerScript, usablePopupHandlers, } from './popup.js';
18
+ export { MASKED_MARKER, MAX_MASKED_PATHS, type MaskSnapshotOptions, type MaskedSnapshot, maskSnapshot, } from '../target/snapshot-mask.js';
19
+ export { MAX_SNAPSHOT_PATH_LENGTH, SNAPSHOT_ROOT_PATH, type SnapshotEdge, type SnapshotEntry, type SnapshotIndex, indexSnapshot, isSnapshotPath, snapshotNodeAt, walkSnapshot, } from '../target/snapshot-tree.js';
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Healing modes: reading a mode from stored data, the production cap, and the
3
+ * decision a verified candidate leads to (contract README section 22.2,
4
+ * decision D-P4-11).
5
+ */
6
+ import { type UiConsequence, type UiHealDecision, type UiHealMode } from './types.js';
7
+ /**
8
+ * A mode from stored or transported data: the node-data names, or the
9
+ * GraphQL enum names in capitals. Anything else is undefined.
10
+ */
11
+ export declare function parseHealMode(value: unknown): UiHealMode | undefined;
12
+ /** The lower of a mode and a cap, by rank: a production run never heals above `healingMaxModeProd`. */
13
+ export declare function capHealMode(mode: UiHealMode, max: UiHealMode): UiHealMode;
14
+ /**
15
+ * What a verified candidate leads to:
16
+ * - `off`: no decision (the step fails as it does without healing);
17
+ * - `suggest`: stop and report the candidate;
18
+ * - `heal_with_approval`: stop and ask a person (the run parks, D-P4-11);
19
+ * - `heal_and_continue`: continue with the candidate, unless the element is
20
+ * consequential or the step or a keyword always asks, which asks instead.
21
+ */
22
+ export declare function decideHeal(mode: UiHealMode, verdict: {
23
+ consequence?: UiConsequence | null;
24
+ alwaysAsk?: boolean;
25
+ }): UiHealDecision | undefined;
@@ -0,0 +1,11 @@
1
+ /** Limits of pop-up handlers (plan P4-06a, threats R7 and C4 of document 24). */
2
+ /** Most handlers tried for one step. */
3
+ export declare const MAX_POPUP_HANDLERS_PER_STEP = 2;
4
+ /** Most handlers an application may hold (the service's limit; the interpreter takes no more). */
5
+ export declare const MAX_POPUP_HANDLERS_PER_APPLICATION = 50;
6
+ /** Most steps of one handler. */
7
+ export declare const MAX_POPUP_HANDLER_STEPS = 10;
8
+ /** Longest URL pattern. */
9
+ export declare const MAX_POPUP_URL_PATTERN = 500;
10
+ /** The wait of a handler step that sets none: a pop-up handler never waits long. */
11
+ export declare const POPUP_HANDLER_STEP_WAIT_MS = 5000;
@@ -0,0 +1,48 @@
1
+ import type { UiScriptProblem } from '../analyze/types.js';
2
+ import type { UiScript, UiStep, UiTarget } from '../script/types.js';
3
+ export { MAX_POPUP_HANDLERS_PER_APPLICATION, MAX_POPUP_HANDLERS_PER_STEP, MAX_POPUP_HANDLER_STEPS, MAX_POPUP_URL_PATTERN, POPUP_HANDLER_STEP_WAIT_MS, } from './popup-limits.js';
4
+ /** The actions a handler step may take: it clicks, checks, presses keys, scrolls, hovers or waits. */
5
+ export declare const POPUP_HANDLER_ACTIONS: readonly ["click", "doubleClick", "hover", "check", "pressKey", "scroll", "waitFor"];
6
+ export interface UiPopupHandlerMatch {
7
+ urlPattern?: string;
8
+ target: UiTarget;
9
+ }
10
+ export interface UiPopupHandler {
11
+ id: string;
12
+ match: UiPopupHandlerMatch;
13
+ steps: UiStep[];
14
+ }
15
+ /** A handler's steps as a script, so the parser's checks and the analyzer apply to them. */
16
+ export declare function popupHandlerScript(handler: Pick<UiPopupHandler, 'steps'>): UiScript;
17
+ /**
18
+ * Parse a stored handler. Throws `UiScriptError` when the shape is wrong, a
19
+ * step does not parse (the script parser's checks apply: unique ids,
20
+ * fingerprints, no credentials), or a step uses a library element (handlers
21
+ * carry inline targets only).
22
+ */
23
+ export declare function parseUiPopupHandler(value: unknown): UiPopupHandler;
24
+ /** The `popupHandlerLoop` problems of a parsed handler; empty means the interpreter may run it. */
25
+ export declare function analyzeUiPopupHandler(handler: UiPopupHandler): UiScriptProblem[];
26
+ /** Why a handler given to a run was not used. */
27
+ export interface UiPopupHandlerRejection {
28
+ index: number;
29
+ id?: string;
30
+ reason: 'INVALID' | 'LOOP_RULE' | 'DUPLICATE_ID' | 'LIMIT';
31
+ }
32
+ /**
33
+ * The handlers a run may use, in the order given: each parsed and checked by
34
+ * the `popupHandlerLoop` rule, ids unique, at most 50. The rest are reported.
35
+ */
36
+ export declare function usablePopupHandlers(values: readonly unknown[]): {
37
+ handlers: UiPopupHandler[];
38
+ rejected: UiPopupHandlerRejection[];
39
+ };
40
+ /**
41
+ * True when an address matches a `*` wildcard pattern, compared without case
42
+ * against the address without query or fragment. A pattern with `scheme://`
43
+ * is matched in parts: the scheme exactly, the host label by label (see
44
+ * `hostMatches`), and the path with `*` matching anything. A pattern without
45
+ * it is matched against the whole address. No regular expression is built,
46
+ * and the work is linear in the address length per pattern part.
47
+ */
48
+ export declare function matchesUrlPattern(url: string, pattern: string): boolean;
@@ -0,0 +1,41 @@
1
+ import type { UiStepAction, UiTarget } from '../script/types.js';
2
+ import type { UiTreeSnapshot } from '../target/snapshot.js';
3
+ /** Most elements a heal question lists (document 24 C4). */
4
+ export declare const MAX_HEAL_QUESTION_NODES = 400;
5
+ /** Longest element name a heal question shows. */
6
+ export declare const MAX_HEAL_NODE_NAME = 100;
7
+ /** One element as the question lists it. */
8
+ export interface UiHealQuestionNode {
9
+ path: string;
10
+ role: string;
11
+ name: string;
12
+ /** `hidden` for a form field (its value is never sent), `masked` for a masked element. */
13
+ value?: 'hidden' | 'masked';
14
+ masked?: true;
15
+ /** `[x, y, width, height]` in CSS pixels, when the snapshot recorded bounds. */
16
+ bbox?: [number, number, number, number];
17
+ }
18
+ /** The question: a system message, a user message, and the listed elements. */
19
+ export interface UiHealQuestion {
20
+ system: string;
21
+ prompt: string;
22
+ nodes: UiHealQuestionNode[];
23
+ /** Elements that could have been listed. */
24
+ candidateCount: number;
25
+ /** True when more elements qualified than the question lists. */
26
+ truncated: boolean;
27
+ }
28
+ /** What the question needs from a heal request. */
29
+ export interface UiHealQuestionInput {
30
+ action: UiStepAction;
31
+ stepSentence?: string;
32
+ description?: string;
33
+ target: UiTarget;
34
+ snapshot: Pick<UiTreeSnapshot, 'root' | 'url' | 'title'>;
35
+ }
36
+ /** The system message: what the model is, what it may answer, and that page text is data. */
37
+ export declare const HEAL_SYSTEM_PROMPT: string;
38
+ /** Build the heal question. `maxNodes` can only lower the cap of 400. */
39
+ export declare function buildHealQuestion(input: UiHealQuestionInput, options?: {
40
+ maxNodes?: number;
41
+ }): UiHealQuestion;
@@ -0,0 +1,9 @@
1
+ import type { UiTarget } from '../script/types.js';
2
+ import type { UiTreeSnapshot } from '../target/snapshot.js';
3
+ import { type SnapshotIndex } from '../target/snapshot-tree.js';
4
+ /**
5
+ * A target for the element at `path`, or null when the path names no
6
+ * element, or no method or frame selector can name it alone. Pass an index
7
+ * from `indexSnapshot` when building several targets from one snapshot.
8
+ */
9
+ export declare function targetFromSnapshotNode(path: string, snapshot: Pick<UiTreeSnapshot, 'root'>, index?: SnapshotIndex): UiTarget | null;