"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./dom.js");let t=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function r(r){var l,u;let i=null!=(l=r.innerText)?l:"",n=r.cloneNode(!0);if(!e.isHTMLElement(n))return i;let o=!1;for(let e of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),o=!0;let a=o?null!=(u=n.innerText)?u:"":i;return t.test(a)&&(a=a.replace(t,"")),a}exports.getTextValue=function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let l=e.getAttribute("aria-labelledby");if(l){let e=l.split(" ").map((e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():r(t).trim()}return null})).filter(Boolean);if(e.length>0)return e.join(", ")}return r(e).trim()};
//# sourceMappingURL=get-text-value.js.map
