{"version":3,"file":"is-disabled.js","names":["_getRole","require","elementsSupportingDisabledAttribute","Set","isDisabled","element","localName","getLocalName","has","hasAttribute","getAttribute"],"sources":["../sources/is-disabled.ts"],"sourcesContent":["import { getLocalName } from \"./getRole\";\n\nconst elementsSupportingDisabledAttribute = new Set([\n\t\"button\",\n\t\"fieldset\",\n\t\"input\",\n\t\"optgroup\",\n\t\"option\",\n\t\"select\",\n\t\"textarea\",\n]);\n\n/**\n * Check if an element is disabled\n * https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings\n * https://www.w3.org/TR/wai-aria-1.1/#aria-disabled\n *\n * @param element\n * @returns {boolean} true if disabled, otherwise false\n */\nexport function isDisabled(element: Element): boolean {\n\tconst localName = getLocalName(element);\n\treturn elementsSupportingDisabledAttribute.has(localName) &&\n\t\telement.hasAttribute(\"disabled\")\n\t\t? true\n\t\t: element.getAttribute(\"aria-disabled\") === \"true\";\n}\n"],"mappings":";;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAMC,mCAAmC,GAAG,IAAIC,GAAG,CAAC,CACnD,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,CACV,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAACC,OAAgB,EAAW;EACrD,IAAMC,SAAS,GAAG,IAAAC,qBAAY,EAACF,OAAO,CAAC;EACvC,OAAOH,mCAAmC,CAACM,GAAG,CAACF,SAAS,CAAC,IACxDD,OAAO,CAACI,YAAY,CAAC,UAAU,CAAC,GAC9B,IAAI,GACJJ,OAAO,CAACK,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM;AACpD"}