Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1"use strict";2 3exports.__esModule = true;4exports.default = getRole;5exports.getLocalName = getLocalName;6// https://w3c.github.io/html-aria/#document-conformance-requirements-for-use-of-aria-attributes-in-html7 8/**9 * Safe Element.localName for all supported environments10 * @param element11 */12function getLocalName(element) {13 var _element$localName;14 return (// eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName15 (_element$localName = element.localName) !== null && _element$localName !== void 0 ? _element$localName :16 // eslint-disable-next-line no-restricted-properties -- required for the fallback17 element.tagName.toLowerCase()18 );19}20var localNameToRoleMappings = {21 article: "article",22 aside: "complementary",23 button: "button",24 datalist: "listbox",25 dd: "definition",26 details: "group",27 dialog: "dialog",28 dt: "term",29 fieldset: "group",30 figure: "figure",31 // WARNING: Only with an accessible name32 form: "form",33 footer: "contentinfo",34 h1: "heading",35 h2: "heading",36 h3: "heading",37 h4: "heading",38 h5: "heading",39 h6: "heading",40 header: "banner",41 hr: "separator",42 html: "document",43 legend: "legend",44 li: "listitem",45 math: "math",46 main: "main",47 menu: "list",48 nav: "navigation",49 ol: "list",50 optgroup: "group",51 // WARNING: Only in certain context52 option: "option",53 output: "status",54 progress: "progressbar",55 // WARNING: Only with an accessible name56 section: "region",57 summary: "button",58 table: "table",59 tbody: "rowgroup",60 textarea: "textbox",61 tfoot: "rowgroup",62 // WARNING: Only in certain context63 td: "cell",64 th: "columnheader",65 thead: "rowgroup",66 tr: "row",67 ul: "list"68};69var prohibitedAttributes = {70 caption: new Set(["aria-label", "aria-labelledby"]),71 code: new Set(["aria-label", "aria-labelledby"]),72 deletion: new Set(["aria-label", "aria-labelledby"]),73 emphasis: new Set(["aria-label", "aria-labelledby"]),74 generic: new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),75 insertion: new Set(["aria-label", "aria-labelledby"]),76 paragraph: new Set(["aria-label", "aria-labelledby"]),77 presentation: new Set(["aria-label", "aria-labelledby"]),78 strong: new Set(["aria-label", "aria-labelledby"]),79 subscript: new Set(["aria-label", "aria-labelledby"]),80 superscript: new Set(["aria-label", "aria-labelledby"])81};82 83/**84 *85 * @param element86 * @param role The role used for this element. This is specified to control whether you want to use the implicit or explicit role.87 */88function hasGlobalAriaAttributes(element, role) {89 // https://rawgit.com/w3c/aria/stable/#global_states90 // commented attributes are deprecated91 return ["aria-atomic", "aria-busy", "aria-controls", "aria-current", "aria-describedby", "aria-details",92 // "disabled",93 "aria-dropeffect",94 // "errormessage",95 "aria-flowto", "aria-grabbed",96 // "haspopup",97 "aria-hidden",98 // "invalid",99 "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-relevant", "aria-roledescription"].some(function (attributeName) {100 var _prohibitedAttributes;101 return element.hasAttribute(attributeName) && !((_prohibitedAttributes = prohibitedAttributes[role]) !== null && _prohibitedAttributes !== void 0 && _prohibitedAttributes.has(attributeName));102 });103}104function ignorePresentationalRole(element, implicitRole) {105 // https://rawgit.com/w3c/aria/stable/#conflict_resolution_presentation_none106 return hasGlobalAriaAttributes(element, implicitRole);107}108function getRole(element) {109 var explicitRole = getExplicitRole(element);110 if (explicitRole === null || explicitRole === "presentation") {111 var implicitRole = getImplicitRole(element);112 if (explicitRole !== "presentation" || ignorePresentationalRole(element, implicitRole || "")) {113 return implicitRole;114 }115 }116 return explicitRole;117}118function getImplicitRole(element) {119 var mappedByTag = localNameToRoleMappings[getLocalName(element)];120 if (mappedByTag !== undefined) {121 return mappedByTag;122 }123 switch (getLocalName(element)) {124 case "a":125 case "area":126 case "link":127 if (element.hasAttribute("href")) {128 return "link";129 }130 break;131 case "img":132 if (element.getAttribute("alt") === "" && !ignorePresentationalRole(element, "img")) {133 return "presentation";134 }135 return "img";136 case "input":137 {138 var _ref = element,139 type = _ref.type;140 switch (type) {141 case "button":142 case "image":143 case "reset":144 case "submit":145 return "button";146 case "checkbox":147 case "radio":148 return type;149 case "range":150 return "slider";151 case "email":152 case "tel":153 case "text":154 case "url":155 if (element.hasAttribute("list")) {156 return "combobox";157 }158 return "textbox";159 case "search":160 if (element.hasAttribute("list")) {161 return "combobox";162 }163 return "searchbox";164 case "number":165 return "spinbutton";166 default:167 return null;168 }169 }170 case "select":171 if (element.hasAttribute("multiple") || element.size > 1) {172 return "listbox";173 }174 return "combobox";175 }176 return null;177}178function getExplicitRole(element) {179 var role = element.getAttribute("role");180 if (role !== null) {181 var explicitRole = role.trim().split(" ")[0];182 // String.prototype.split(sep, limit) will always return an array with at least one member183 // as long as limit is either undefined or > 0184 if (explicitRole.length > 0) {185 return explicitRole;186 }187 }188 return null;189}190//# sourceMappingURL=getRole.js.map