diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/getRole.mjs.map b/tools/ui/node_modules/dom-accessibility-api/dist/getRole.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..f9bedd06e45bec02130dabc6e850141449978b0b --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/getRole.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"getRole.mjs","names":["getLocalName","element","localName","tagName","toLowerCase","localNameToRoleMappings","article","aside","button","datalist","dd","details","dialog","dt","fieldset","figure","form","footer","h1","h2","h3","h4","h5","h6","header","hr","html","legend","li","math","main","menu","nav","ol","optgroup","option","output","progress","section","summary","table","tbody","textarea","tfoot","td","th","thead","tr","ul","prohibitedAttributes","caption","Set","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript","hasGlobalAriaAttributes","role","some","attributeName","hasAttribute","has","ignorePresentationalRole","implicitRole","getRole","explicitRole","getExplicitRole","getImplicitRole","mappedByTag","undefined","getAttribute","type","size","trim","split","length"],"sources":["../sources/getRole.ts"],"sourcesContent":["// https://w3c.github.io/html-aria/#document-conformance-requirements-for-use-of-aria-attributes-in-html\n\n/**\n * Safe Element.localName for all supported environments\n * @param element\n */\nexport function getLocalName(element: Element): string {\n\treturn (\n\t\t// eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName\n\t\telement.localName ??\n\t\t// eslint-disable-next-line no-restricted-properties -- required for the fallback\n\t\telement.tagName.toLowerCase()\n\t);\n}\n\nconst localNameToRoleMappings: Record = {\n\tarticle: \"article\",\n\taside: \"complementary\",\n\tbutton: \"button\",\n\tdatalist: \"listbox\",\n\tdd: \"definition\",\n\tdetails: \"group\",\n\tdialog: \"dialog\",\n\tdt: \"term\",\n\tfieldset: \"group\",\n\tfigure: \"figure\",\n\t// WARNING: Only with an accessible name\n\tform: \"form\",\n\tfooter: \"contentinfo\",\n\th1: \"heading\",\n\th2: \"heading\",\n\th3: \"heading\",\n\th4: \"heading\",\n\th5: \"heading\",\n\th6: \"heading\",\n\theader: \"banner\",\n\thr: \"separator\",\n\thtml: \"document\",\n\tlegend: \"legend\",\n\tli: \"listitem\",\n\tmath: \"math\",\n\tmain: \"main\",\n\tmenu: \"list\",\n\tnav: \"navigation\",\n\tol: \"list\",\n\toptgroup: \"group\",\n\t// WARNING: Only in certain context\n\toption: \"option\",\n\toutput: \"status\",\n\tprogress: \"progressbar\",\n\t// WARNING: Only with an accessible name\n\tsection: \"region\",\n\tsummary: \"button\",\n\ttable: \"table\",\n\ttbody: \"rowgroup\",\n\ttextarea: \"textbox\",\n\ttfoot: \"rowgroup\",\n\t// WARNING: Only in certain context\n\ttd: \"cell\",\n\tth: \"columnheader\",\n\tthead: \"rowgroup\",\n\ttr: \"row\",\n\tul: \"list\",\n};\n\nconst prohibitedAttributes: Record> = {\n\tcaption: new Set([\"aria-label\", \"aria-labelledby\"]),\n\tcode: new Set([\"aria-label\", \"aria-labelledby\"]),\n\tdeletion: new Set([\"aria-label\", \"aria-labelledby\"]),\n\temphasis: new Set([\"aria-label\", \"aria-labelledby\"]),\n\tgeneric: new Set([\"aria-label\", \"aria-labelledby\", \"aria-roledescription\"]),\n\tinsertion: new Set([\"aria-label\", \"aria-labelledby\"]),\n\tparagraph: new Set([\"aria-label\", \"aria-labelledby\"]),\n\tpresentation: new Set([\"aria-label\", \"aria-labelledby\"]),\n\tstrong: new Set([\"aria-label\", \"aria-labelledby\"]),\n\tsubscript: new Set([\"aria-label\", \"aria-labelledby\"]),\n\tsuperscript: new Set([\"aria-label\", \"aria-labelledby\"]),\n};\n\n/**\n *\n * @param element\n * @param role The role used for this element. This is specified to control whether you want to use the implicit or explicit role.\n */\nfunction hasGlobalAriaAttributes(element: Element, role: string): boolean {\n\t// https://rawgit.com/w3c/aria/stable/#global_states\n\t// commented attributes are deprecated\n\treturn [\n\t\t\"aria-atomic\",\n\t\t\"aria-busy\",\n\t\t\"aria-controls\",\n\t\t\"aria-current\",\n\t\t\"aria-describedby\",\n\t\t\"aria-details\",\n\t\t// \"disabled\",\n\t\t\"aria-dropeffect\",\n\t\t// \"errormessage\",\n\t\t\"aria-flowto\",\n\t\t\"aria-grabbed\",\n\t\t// \"haspopup\",\n\t\t\"aria-hidden\",\n\t\t// \"invalid\",\n\t\t\"aria-keyshortcuts\",\n\t\t\"aria-label\",\n\t\t\"aria-labelledby\",\n\t\t\"aria-live\",\n\t\t\"aria-owns\",\n\t\t\"aria-relevant\",\n\t\t\"aria-roledescription\",\n\t].some((attributeName) => {\n\t\treturn (\n\t\t\telement.hasAttribute(attributeName) &&\n\t\t\t!prohibitedAttributes[role]?.has(attributeName)\n\t\t);\n\t});\n}\n\nfunction ignorePresentationalRole(\n\telement: Element,\n\timplicitRole: string\n): boolean {\n\t// https://rawgit.com/w3c/aria/stable/#conflict_resolution_presentation_none\n\treturn hasGlobalAriaAttributes(element, implicitRole);\n}\n\nexport default function getRole(element: Element): string | null {\n\tconst explicitRole = getExplicitRole(element);\n\tif (explicitRole === null || explicitRole === \"presentation\") {\n\t\tconst implicitRole = getImplicitRole(element);\n\t\tif (\n\t\t\texplicitRole !== \"presentation\" ||\n\t\t\tignorePresentationalRole(element, implicitRole || \"\")\n\t\t) {\n\t\t\treturn implicitRole;\n\t\t}\n\t}\n\n\treturn explicitRole;\n}\n\nfunction getImplicitRole(element: Element): string | null {\n\tconst mappedByTag = localNameToRoleMappings[getLocalName(element)];\n\tif (mappedByTag !== undefined) {\n\t\treturn mappedByTag;\n\t}\n\n\tswitch (getLocalName(element)) {\n\t\tcase \"a\":\n\t\tcase \"area\":\n\t\tcase \"link\":\n\t\t\tif (element.hasAttribute(\"href\")) {\n\t\t\t\treturn \"link\";\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"img\":\n\t\t\tif (\n\t\t\t\telement.getAttribute(\"alt\") === \"\" &&\n\t\t\t\t!ignorePresentationalRole(element, \"img\")\n\t\t\t) {\n\t\t\t\treturn \"presentation\";\n\t\t\t}\n\t\t\treturn \"img\";\n\t\tcase \"input\": {\n\t\t\tconst { type } = element as HTMLInputElement;\n\t\t\tswitch (type) {\n\t\t\t\tcase \"button\":\n\t\t\t\tcase \"image\":\n\t\t\t\tcase \"reset\":\n\t\t\t\tcase \"submit\":\n\t\t\t\t\treturn \"button\";\n\t\t\t\tcase \"checkbox\":\n\t\t\t\tcase \"radio\":\n\t\t\t\t\treturn type;\n\t\t\t\tcase \"range\":\n\t\t\t\t\treturn \"slider\";\n\t\t\t\tcase \"email\":\n\t\t\t\tcase \"tel\":\n\t\t\t\tcase \"text\":\n\t\t\t\tcase \"url\":\n\t\t\t\t\tif (element.hasAttribute(\"list\")) {\n\t\t\t\t\t\treturn \"combobox\";\n\t\t\t\t\t}\n\t\t\t\t\treturn \"textbox\";\n\n\t\t\t\tcase \"search\":\n\t\t\t\t\tif (element.hasAttribute(\"list\")) {\n\t\t\t\t\t\treturn \"combobox\";\n\t\t\t\t\t}\n\t\t\t\t\treturn \"searchbox\";\n\t\t\t\tcase \"number\":\n\t\t\t\t\treturn \"spinbutton\";\n\t\t\t\tdefault:\n\t\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tcase \"select\":\n\t\t\tif (\n\t\t\t\telement.hasAttribute(\"multiple\") ||\n\t\t\t\t(element as HTMLSelectElement).size > 1\n\t\t\t) {\n\t\t\t\treturn \"listbox\";\n\t\t\t}\n\t\t\treturn \"combobox\";\n\t}\n\treturn null;\n}\n\nfunction getExplicitRole(element: Element): string | null {\n\tconst role = element.getAttribute(\"role\");\n\tif (role !== null) {\n\t\tconst explicitRole = role.trim().split(\" \")[0];\n\t\t// String.prototype.split(sep, limit) will always return an array with at least one member\n\t\t// as long as limit is either undefined or > 0\n\t\tif (explicitRole.length > 0) {\n\t\t\treturn explicitRole;\n\t\t}\n\t}\n\n\treturn null;\n}\n"],"mappings":"AAAA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASA,YAAY,CAACC,OAAgB,EAAU;EAAA;EACtD,OACC;IAAA,sBACAA,OAAO,CAACC,SAAS;IACjB;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AAJA,IAAI;QACZ,QAAQA,IAAI;UACX,KAAK,QAAQ;UACb,KAAK,OAAO;UACZ,KAAK,OAAO;UACZ,KAAK,QAAQ;YACZ,OAAO,QAAQ;UAChB,KAAK,UAAU;UACf,KAAK,OAAO;YACX,OAAOA,IAAI;UACZ,KAAK,OAAO;YACX,OAAO,QAAQ;UAChB,KAAK,OAAO;UACZ,KAAK,KAAK;UACV,KAAK,MAAM;UACX,KAAK,KAAK;YACT,IAAI5E,OAAO,CAACiE,YAAY,CAAC,MAAM,CAAC,EAAE;cACjC,OAAO,UAAU;YAClB;YACA,OAAO,SAAS;UAEjB,KAAK,QAAQ;YACZ,IAAIjE,OAAO,CAACiE,YAAY,CAAC,MAAM,CAAC,EAAE;cACjC,OAAO,UAAU;YAClB;YACA,OAAO,WAAW;UACnB,KAAK,QAAQ;YACZ,OAAO,YAAY;UACpB;YACC,OAAO,IAAI;QAAC;MAEf;IACA,KAAK,QAAQ;MACZ,IACCjE,OAAO,CAACiE,YAAY,CAAC,UAAU,CAAC,IAC/BjE,OAAO,CAAuB6E,IAAI,GAAG,CAAC,EACtC;QACD,OAAO,SAAS;MACjB;MACA,OAAO,UAAU;EAAC;EAEpB,OAAO,IAAI;AACZ;AAEA,SAASN,eAAe,CAACvE,OAAgB,EAAiB;EACzD,IAAM8D,IAAI,GAAG9D,OAAO,CAAC2E,YAAY,CAAC,MAAM,CAAC;EACzC,IAAIb,IAAI,KAAK,IAAI,EAAE;IAClB,IAAMQ,YAAY,GAAGR,IAAI,CAACgB,IAAI,EAAE,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC9C;IACA;IACA,IAAIT,YAAY,CAACU,MAAM,GAAG,CAAC,EAAE;MAC5B,OAAOV,YAAY;IACpB;EACD;EAEA,OAAO,IAAI;AACZ"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/index.d.ts b/tools/ui/node_modules/dom-accessibility-api/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a21366a1c108850b3ee93edbefd23e9c624dc7dd --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/index.d.ts @@ -0,0 +1,5 @@ +export { computeAccessibleDescription } from "./accessible-description"; +export { computeAccessibleName } from "./accessible-name"; +export { default as getRole } from "./getRole"; +export * from "./is-inaccessible"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/index.d.ts.map b/tools/ui/node_modules/dom-accessibility-api/dist/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..a6cb30a9c6036229844d93467e78e57eb35c6f3e --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,cAAc,mBAAmB,CAAC"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/index.js b/tools/ui/node_modules/dom-accessibility-api/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..4297184ca3a5e3e5b3b80f898762ba83230468ec --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/index.js @@ -0,0 +1,24 @@ +"use strict"; + +exports.__esModule = true; +var _exportNames = { + computeAccessibleDescription: true, + computeAccessibleName: true, + getRole: true +}; +exports.getRole = exports.computeAccessibleName = exports.computeAccessibleDescription = void 0; +var _accessibleDescription = require("./accessible-description"); +exports.computeAccessibleDescription = _accessibleDescription.computeAccessibleDescription; +var _accessibleName = require("./accessible-name"); +exports.computeAccessibleName = _accessibleName.computeAccessibleName; +var _getRole = _interopRequireDefault(require("./getRole")); +exports.getRole = _getRole.default; +var _isInaccessible = require("./is-inaccessible"); +Object.keys(_isInaccessible).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _isInaccessible[key]) return; + exports[key] = _isInaccessible[key]; +}); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/index.js.map b/tools/ui/node_modules/dom-accessibility-api/dist/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..8d5e459d051b6768ed7986ae456235f66cd9f8d4 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","names":[],"sources":["../sources/index.ts"],"sourcesContent":["export { computeAccessibleDescription } from \"./accessible-description\";\nexport { computeAccessibleName } from \"./accessible-name\";\nexport { default as getRole } from \"./getRole\";\nexport * from \"./is-inaccessible\";\n"],"mappings":";;;;;;;;;AAAA;AAAwE;AACxE;AAA0D;AAC1D;AAA+C;AAC/C;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAkC"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/index.mjs b/tools/ui/node_modules/dom-accessibility-api/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c5449362770ea789842483c15e574096852d484a --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/index.mjs @@ -0,0 +1,5 @@ +export { computeAccessibleDescription } from "./accessible-description.mjs"; +export { computeAccessibleName } from "./accessible-name.mjs"; +export { default as getRole } from "./getRole.mjs"; +export * from "./is-inaccessible.mjs"; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/index.mjs.map b/tools/ui/node_modules/dom-accessibility-api/dist/index.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..9c94762c2bda8aa44d095e61d91e34979e74c07e --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","names":["computeAccessibleDescription","computeAccessibleName","default","getRole"],"sources":["../sources/index.ts"],"sourcesContent":["export { computeAccessibleDescription } from \"./accessible-description\";\nexport { computeAccessibleName } from \"./accessible-name\";\nexport { default as getRole } from \"./getRole\";\nexport * from \"./is-inaccessible\";\n"],"mappings":"AAAA,SAASA,4BAA4B,QAAQ,8BAA0B;AACvE,SAASC,qBAAqB,QAAQ,uBAAmB;AACzD,SAASC,OAAO,IAAIC,OAAO,QAAQ,eAAW;AAC9C,cAAc,uBAAmB"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.d.ts b/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b1041f6d8de87b01e894250366d284d34f0c0ddd --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.d.ts @@ -0,0 +1,31 @@ +export interface IsInaccessibleOptions { + getComputedStyle?: typeof window.getComputedStyle; + /** + * Can be used to return cached results from previous isSubtreeInaccessible calls. + */ + isSubtreeInaccessible?: (element: Element) => boolean; +} +/** + * Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion + * which should only be used for elements with a non-presentational role i.e. + * `role="none"` and `role="presentation"` will not be excluded. + * + * Implements aria-hidden semantics (i.e. parent overrides child) + * Ignores "Child Presentational: True" characteristics + * + * @param element + * @param options + * @returns {boolean} true if excluded, otherwise false + */ +export declare function isInaccessible(element: Element, options?: IsInaccessibleOptions): boolean; +export interface IsSubtreeInaccessibleOptions { + getComputedStyle?: typeof window.getComputedStyle; +} +/** + * + * @param element + * @param options + * @returns {boolean} - `true` if every child of the element is inaccessible + */ +export declare function isSubtreeInaccessible(element: Element, options?: IsSubtreeInaccessibleOptions): boolean; +//# sourceMappingURL=is-inaccessible.d.ts.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.d.ts.map b/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f59d3bc041638529d898dbc3d7c01269fc96fc54 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"is-inaccessible.d.ts","sourceRoot":"","sources":["../sources/is-inaccessible.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACrC,gBAAgB,CAAC,EAAE,OAAO,MAAM,CAAC,gBAAgB,CAAC;IAClD;;OAEG;IACH,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;CACtD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC7B,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE,qBAA0B,GACjC,OAAO,CAyBT;AAED,MAAM,WAAW,4BAA4B;IAC5C,gBAAgB,CAAC,EAAE,OAAO,MAAM,CAAC,gBAAgB,CAAC;CAClD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE,4BAAiC,GACxC,OAAO,CAuBT"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.js b/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.js new file mode 100644 index 0000000000000000000000000000000000000000..bb0c6476f23f76e4f4ed1d17ddc1136dd9180fd8 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.js @@ -0,0 +1,68 @@ +"use strict"; + +exports.__esModule = true; +exports.isInaccessible = isInaccessible; +exports.isSubtreeInaccessible = isSubtreeInaccessible; +/** + * Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion + * which should only be used for elements with a non-presentational role i.e. + * `role="none"` and `role="presentation"` will not be excluded. + * + * Implements aria-hidden semantics (i.e. parent overrides child) + * Ignores "Child Presentational: True" characteristics + * + * @param element + * @param options + * @returns {boolean} true if excluded, otherwise false + */ +function isInaccessible(element) { + var _element$ownerDocumen; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _options$getComputedS = options.getComputedStyle, + getComputedStyle = _options$getComputedS === void 0 ? (_element$ownerDocumen = element.ownerDocument.defaultView) === null || _element$ownerDocumen === void 0 ? void 0 : _element$ownerDocumen.getComputedStyle : _options$getComputedS, + _options$isSubtreeIna = options.isSubtreeInaccessible, + isSubtreeInaccessibleImpl = _options$isSubtreeIna === void 0 ? isSubtreeInaccessible : _options$isSubtreeIna; + if (typeof getComputedStyle !== "function") { + throw new TypeError("Owner document of the element needs to have an associated window."); + } + // since visibility is inherited we can exit early + if (getComputedStyle(element).visibility === "hidden") { + return true; + } + var currentElement = element; + while (currentElement) { + if (isSubtreeInaccessibleImpl(currentElement, { + getComputedStyle: getComputedStyle + })) { + return true; + } + currentElement = currentElement.parentElement; + } + return false; +} +/** + * + * @param element + * @param options + * @returns {boolean} - `true` if every child of the element is inaccessible + */ +function isSubtreeInaccessible(element) { + var _element$ownerDocumen2; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _options$getComputedS2 = options.getComputedStyle, + getComputedStyle = _options$getComputedS2 === void 0 ? (_element$ownerDocumen2 = element.ownerDocument.defaultView) === null || _element$ownerDocumen2 === void 0 ? void 0 : _element$ownerDocumen2.getComputedStyle : _options$getComputedS2; + if (typeof getComputedStyle !== "function") { + throw new TypeError("Owner document of the element needs to have an associated window."); + } + if (element.hidden === true) { + return true; + } + if (element.getAttribute("aria-hidden") === "true") { + return true; + } + if (getComputedStyle(element).display === "none") { + return true; + } + return false; +} +//# sourceMappingURL=is-inaccessible.js.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.js.map b/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.js.map new file mode 100644 index 0000000000000000000000000000000000000000..13a788d1a1545083afe7bcc62e2f88373f18bce2 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.js.map @@ -0,0 +1 @@ +{"version":3,"file":"is-inaccessible.js","names":["isInaccessible","element","options","getComputedStyle","ownerDocument","defaultView","isSubtreeInaccessible","isSubtreeInaccessibleImpl","TypeError","visibility","currentElement","parentElement","hidden","getAttribute","display"],"sources":["../sources/is-inaccessible.ts"],"sourcesContent":["export interface IsInaccessibleOptions {\n\tgetComputedStyle?: typeof window.getComputedStyle;\n\t/**\n\t * Can be used to return cached results from previous isSubtreeInaccessible calls.\n\t */\n\tisSubtreeInaccessible?: (element: Element) => boolean;\n}\n\n/**\n * Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion\n * which should only be used for elements with a non-presentational role i.e.\n * `role=\"none\"` and `role=\"presentation\"` will not be excluded.\n *\n * Implements aria-hidden semantics (i.e. parent overrides child)\n * Ignores \"Child Presentational: True\" characteristics\n *\n * @param element\n * @param options\n * @returns {boolean} true if excluded, otherwise false\n */\nexport function isInaccessible(\n\telement: Element,\n\toptions: IsInaccessibleOptions = {}\n): boolean {\n\tconst {\n\t\tgetComputedStyle = element.ownerDocument.defaultView?.getComputedStyle,\n\t\tisSubtreeInaccessible: isSubtreeInaccessibleImpl = isSubtreeInaccessible,\n\t} = options;\n\tif (typeof getComputedStyle !== \"function\") {\n\t\tthrow new TypeError(\n\t\t\t\"Owner document of the element needs to have an associated window.\"\n\t\t);\n\t}\n\t// since visibility is inherited we can exit early\n\tif (getComputedStyle(element).visibility === \"hidden\") {\n\t\treturn true;\n\t}\n\n\tlet currentElement: Element | null = element;\n\twhile (currentElement) {\n\t\tif (isSubtreeInaccessibleImpl(currentElement, { getComputedStyle })) {\n\t\t\treturn true;\n\t\t}\n\n\t\tcurrentElement = currentElement.parentElement;\n\t}\n\n\treturn false;\n}\n\nexport interface IsSubtreeInaccessibleOptions {\n\tgetComputedStyle?: typeof window.getComputedStyle;\n}\n\n/**\n *\n * @param element\n * @param options\n * @returns {boolean} - `true` if every child of the element is inaccessible\n */\nexport function isSubtreeInaccessible(\n\telement: Element,\n\toptions: IsSubtreeInaccessibleOptions = {}\n): boolean {\n\tconst {\n\t\tgetComputedStyle = element.ownerDocument.defaultView?.getComputedStyle,\n\t} = options;\n\tif (typeof getComputedStyle !== \"function\") {\n\t\tthrow new TypeError(\n\t\t\t\"Owner document of the element needs to have an associated window.\"\n\t\t);\n\t}\n\n\tif ((element as HTMLElement).hidden === true) {\n\t\treturn true;\n\t}\n\n\tif (element.getAttribute(\"aria-hidden\") === \"true\") {\n\t\treturn true;\n\t}\n\n\tif (getComputedStyle(element).display === \"none\") {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n"],"mappings":";;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAc,CAC7BC,OAAgB,EAEN;EAAA;EAAA,IADVC,OAA8B,uEAAG,CAAC,CAAC;EAEnC,4BAGIA,OAAO,CAFVC,gBAAgB;IAAhBA,gBAAgB,+DAAGF,OAAO,CAACG,aAAa,CAACC,WAAW,0DAAjC,sBAAmCF,gBAAgB;IAAA,wBAEnED,OAAO,CADVI,qBAAqB;IAAEC,yBAAyB,sCAAGD,qBAAqB;EAEzE,IAAI,OAAOH,gBAAgB,KAAK,UAAU,EAAE;IAC3C,MAAM,IAAIK,SAAS,CAClB,mEAAmE,CACnE;EACF;EACA;EACA,IAAIL,gBAAgB,CAACF,OAAO,CAAC,CAACQ,UAAU,KAAK,QAAQ,EAAE;IACtD,OAAO,IAAI;EACZ;EAEA,IAAIC,cAA8B,GAAGT,OAAO;EAC5C,OAAOS,cAAc,EAAE;IACtB,IAAIH,yBAAyB,CAACG,cAAc,EAAE;MAAEP,gBAAgB,EAAhBA;IAAiB,CAAC,CAAC,EAAE;MACpE,OAAO,IAAI;IACZ;IAEAO,cAAc,GAAGA,cAAc,CAACC,aAAa;EAC9C;EAEA,OAAO,KAAK;AACb;AAMA;AACA;AACA;AACA;AACA;AACA;AACO,SAASL,qBAAqB,CACpCL,OAAgB,EAEN;EAAA;EAAA,IADVC,OAAqC,uEAAG,CAAC,CAAC;EAE1C,6BAEIA,OAAO,CADVC,gBAAgB;IAAhBA,gBAAgB,iEAAGF,OAAO,CAACG,aAAa,CAACC,WAAW,2DAAjC,uBAAmCF,gBAAgB;EAEvE,IAAI,OAAOA,gBAAgB,KAAK,UAAU,EAAE;IAC3C,MAAM,IAAIK,SAAS,CAClB,mEAAmE,CACnE;EACF;EAEA,IAAKP,OAAO,CAAiBW,MAAM,KAAK,IAAI,EAAE;IAC7C,OAAO,IAAI;EACZ;EAEA,IAAIX,OAAO,CAACY,YAAY,CAAC,aAAa,CAAC,KAAK,MAAM,EAAE;IACnD,OAAO,IAAI;EACZ;EAEA,IAAIV,gBAAgB,CAACF,OAAO,CAAC,CAACa,OAAO,KAAK,MAAM,EAAE;IACjD,OAAO,IAAI;EACZ;EAEA,OAAO,KAAK;AACb"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.mjs b/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d9847faf8e98cab95785cb71c28dd4fe43a0c4bc --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.mjs @@ -0,0 +1,63 @@ +/** + * Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion + * which should only be used for elements with a non-presentational role i.e. + * `role="none"` and `role="presentation"` will not be excluded. + * + * Implements aria-hidden semantics (i.e. parent overrides child) + * Ignores "Child Presentational: True" characteristics + * + * @param element + * @param options + * @returns {boolean} true if excluded, otherwise false + */ +export function isInaccessible(element) { + var _element$ownerDocumen; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _options$getComputedS = options.getComputedStyle, + getComputedStyle = _options$getComputedS === void 0 ? (_element$ownerDocumen = element.ownerDocument.defaultView) === null || _element$ownerDocumen === void 0 ? void 0 : _element$ownerDocumen.getComputedStyle : _options$getComputedS, + _options$isSubtreeIna = options.isSubtreeInaccessible, + isSubtreeInaccessibleImpl = _options$isSubtreeIna === void 0 ? isSubtreeInaccessible : _options$isSubtreeIna; + if (typeof getComputedStyle !== "function") { + throw new TypeError("Owner document of the element needs to have an associated window."); + } + // since visibility is inherited we can exit early + if (getComputedStyle(element).visibility === "hidden") { + return true; + } + var currentElement = element; + while (currentElement) { + if (isSubtreeInaccessibleImpl(currentElement, { + getComputedStyle: getComputedStyle + })) { + return true; + } + currentElement = currentElement.parentElement; + } + return false; +} +/** + * + * @param element + * @param options + * @returns {boolean} - `true` if every child of the element is inaccessible + */ +export function isSubtreeInaccessible(element) { + var _element$ownerDocumen2; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _options$getComputedS2 = options.getComputedStyle, + getComputedStyle = _options$getComputedS2 === void 0 ? (_element$ownerDocumen2 = element.ownerDocument.defaultView) === null || _element$ownerDocumen2 === void 0 ? void 0 : _element$ownerDocumen2.getComputedStyle : _options$getComputedS2; + if (typeof getComputedStyle !== "function") { + throw new TypeError("Owner document of the element needs to have an associated window."); + } + if (element.hidden === true) { + return true; + } + if (element.getAttribute("aria-hidden") === "true") { + return true; + } + if (getComputedStyle(element).display === "none") { + return true; + } + return false; +} +//# sourceMappingURL=is-inaccessible.mjs.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.mjs.map b/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..bda9f5dc3af89b62a457d6a960f94f6ab25c5264 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/is-inaccessible.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"is-inaccessible.mjs","names":["isInaccessible","element","options","getComputedStyle","ownerDocument","defaultView","isSubtreeInaccessible","isSubtreeInaccessibleImpl","TypeError","visibility","currentElement","parentElement","hidden","getAttribute","display"],"sources":["../sources/is-inaccessible.ts"],"sourcesContent":["export interface IsInaccessibleOptions {\n\tgetComputedStyle?: typeof window.getComputedStyle;\n\t/**\n\t * Can be used to return cached results from previous isSubtreeInaccessible calls.\n\t */\n\tisSubtreeInaccessible?: (element: Element) => boolean;\n}\n\n/**\n * Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion\n * which should only be used for elements with a non-presentational role i.e.\n * `role=\"none\"` and `role=\"presentation\"` will not be excluded.\n *\n * Implements aria-hidden semantics (i.e. parent overrides child)\n * Ignores \"Child Presentational: True\" characteristics\n *\n * @param element\n * @param options\n * @returns {boolean} true if excluded, otherwise false\n */\nexport function isInaccessible(\n\telement: Element,\n\toptions: IsInaccessibleOptions = {}\n): boolean {\n\tconst {\n\t\tgetComputedStyle = element.ownerDocument.defaultView?.getComputedStyle,\n\t\tisSubtreeInaccessible: isSubtreeInaccessibleImpl = isSubtreeInaccessible,\n\t} = options;\n\tif (typeof getComputedStyle !== \"function\") {\n\t\tthrow new TypeError(\n\t\t\t\"Owner document of the element needs to have an associated window.\"\n\t\t);\n\t}\n\t// since visibility is inherited we can exit early\n\tif (getComputedStyle(element).visibility === \"hidden\") {\n\t\treturn true;\n\t}\n\n\tlet currentElement: Element | null = element;\n\twhile (currentElement) {\n\t\tif (isSubtreeInaccessibleImpl(currentElement, { getComputedStyle })) {\n\t\t\treturn true;\n\t\t}\n\n\t\tcurrentElement = currentElement.parentElement;\n\t}\n\n\treturn false;\n}\n\nexport interface IsSubtreeInaccessibleOptions {\n\tgetComputedStyle?: typeof window.getComputedStyle;\n}\n\n/**\n *\n * @param element\n * @param options\n * @returns {boolean} - `true` if every child of the element is inaccessible\n */\nexport function isSubtreeInaccessible(\n\telement: Element,\n\toptions: IsSubtreeInaccessibleOptions = {}\n): boolean {\n\tconst {\n\t\tgetComputedStyle = element.ownerDocument.defaultView?.getComputedStyle,\n\t} = options;\n\tif (typeof getComputedStyle !== \"function\") {\n\t\tthrow new TypeError(\n\t\t\t\"Owner document of the element needs to have an associated window.\"\n\t\t);\n\t}\n\n\tif ((element as HTMLElement).hidden === true) {\n\t\treturn true;\n\t}\n\n\tif (element.getAttribute(\"aria-hidden\") === \"true\") {\n\t\treturn true;\n\t}\n\n\tif (getComputedStyle(element).display === \"none\") {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n"],"mappings":"AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,cAAc,CAC7BC,OAAgB,EAEN;EAAA;EAAA,IADVC,OAA8B,uEAAG,CAAC,CAAC;EAEnC,4BAGIA,OAAO,CAFVC,gBAAgB;IAAhBA,gBAAgB,+DAAGF,OAAO,CAACG,aAAa,CAACC,WAAW,0DAAjC,sBAAmCF,gBAAgB;IAAA,wBAEnED,OAAO,CADVI,qBAAqB;IAAEC,yBAAyB,sCAAGD,qBAAqB;EAEzE,IAAI,OAAOH,gBAAgB,KAAK,UAAU,EAAE;IAC3C,MAAM,IAAIK,SAAS,CAClB,mEAAmE,CACnE;EACF;EACA;EACA,IAAIL,gBAAgB,CAACF,OAAO,CAAC,CAACQ,UAAU,KAAK,QAAQ,EAAE;IACtD,OAAO,IAAI;EACZ;EAEA,IAAIC,cAA8B,GAAGT,OAAO;EAC5C,OAAOS,cAAc,EAAE;IACtB,IAAIH,yBAAyB,CAACG,cAAc,EAAE;MAAEP,gBAAgB,EAAhBA;IAAiB,CAAC,CAAC,EAAE;MACpE,OAAO,IAAI;IACZ;IAEAO,cAAc,GAAGA,cAAc,CAACC,aAAa;EAC9C;EAEA,OAAO,KAAK;AACb;AAMA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASL,qBAAqB,CACpCL,OAAgB,EAEN;EAAA;EAAA,IADVC,OAAqC,uEAAG,CAAC,CAAC;EAE1C,6BAEIA,OAAO,CADVC,gBAAgB;IAAhBA,gBAAgB,iEAAGF,OAAO,CAACG,aAAa,CAACC,WAAW,2DAAjC,uBAAmCF,gBAAgB;EAEvE,IAAI,OAAOA,gBAAgB,KAAK,UAAU,EAAE;IAC3C,MAAM,IAAIK,SAAS,CAClB,mEAAmE,CACnE;EACF;EAEA,IAAKP,OAAO,CAAiBW,MAAM,KAAK,IAAI,EAAE;IAC7C,OAAO,IAAI;EACZ;EAEA,IAAIX,OAAO,CAACY,YAAY,CAAC,aAAa,CAAC,KAAK,MAAM,EAAE;IACnD,OAAO,IAAI;EACZ;EAEA,IAAIV,gBAAgB,CAACF,OAAO,CAAC,CAACa,OAAO,KAAK,MAAM,EAAE;IACjD,OAAO,IAAI;EACZ;EAEA,OAAO,KAAK;AACb"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.d.ts b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8d80ca2601db67a57eb960a30d2d8f43b0b93b65 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.d.ts @@ -0,0 +1,14 @@ +declare global { + class Set { + constructor(items?: T[]); + add(value: T): this; + clear(): void; + delete(value: T): boolean; + forEach(callbackfn: (value: T, value2: T, set: Set) => void, thisArg?: unknown): void; + has(value: T): boolean; + readonly size: number; + } +} +declare const _default: typeof Set; +export default _default; +//# sourceMappingURL=SetLike.d.ts.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.d.ts.map b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..77e79dd0c1f2dd7ebf3d97de23abb5fec7d4df6e --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SetLike.d.ts","sourceRoot":"","sources":["../../sources/polyfills/SetLike.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACd,MAAM,GAAG,CAAC,CAAC;oBAEE,KAAK,CAAC,EAAE,CAAC,EAAE;QACvB,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;QACnB,KAAK,IAAI,IAAI;QACb,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO;QACzB,OAAO,CACN,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,EACtD,OAAO,CAAC,EAAE,OAAO,GACf,IAAI;QACP,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO;QACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;KAItB;CACD;;AAuCD,wBAA0D"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.js b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.js new file mode 100644 index 0000000000000000000000000000000000000000..58aa8cd2fdbd2bd2f3fcc70f1666533ad5264a57 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.js @@ -0,0 +1,65 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +// for environments without Set we fallback to arrays with unique members +var SetLike = /*#__PURE__*/function () { + function SetLike() { + var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + _classCallCheck(this, SetLike); + _defineProperty(this, "items", void 0); + this.items = items; + } + _createClass(SetLike, [{ + key: "add", + value: function add(value) { + if (this.has(value) === false) { + this.items.push(value); + } + return this; + } + }, { + key: "clear", + value: function clear() { + this.items = []; + } + }, { + key: "delete", + value: function _delete(value) { + var previousLength = this.items.length; + this.items = this.items.filter(function (item) { + return item !== value; + }); + return previousLength !== this.items.length; + } + }, { + key: "forEach", + value: function forEach(callbackfn) { + var _this = this; + this.items.forEach(function (item) { + callbackfn(item, item, _this); + }); + } + }, { + key: "has", + value: function has(value) { + return this.items.indexOf(value) !== -1; + } + }, { + key: "size", + get: function get() { + return this.items.length; + } + }]); + return SetLike; +}(); +var _default = typeof Set === "undefined" ? Set : SetLike; +exports.default = _default; +//# sourceMappingURL=SetLike.js.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.js.map b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.js.map new file mode 100644 index 0000000000000000000000000000000000000000..e1aa583465356eb485759524712314191e2329f9 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SetLike.js","names":["SetLike","items","value","has","push","previousLength","length","filter","item","callbackfn","forEach","indexOf","Set"],"sources":["../../sources/polyfills/SetLike.ts"],"sourcesContent":["declare global {\n\tclass Set {\n\t\t// es2015.collection.d.ts\n\t\tconstructor(items?: T[]);\n\t\tadd(value: T): this;\n\t\tclear(): void;\n\t\tdelete(value: T): boolean;\n\t\tforEach(\n\t\t\tcallbackfn: (value: T, value2: T, set: Set) => void,\n\t\t\tthisArg?: unknown\n\t\t): void;\n\t\thas(value: T): boolean;\n\t\treadonly size: number;\n\n\t\t// es2015.iterable.d.ts\n\t\t// no implemennted\n\t}\n}\n\n// for environments without Set we fallback to arrays with unique members\nclass SetLike implements Set {\n\tprivate items: T[];\n\n\tconstructor(items: T[] = []) {\n\t\tthis.items = items;\n\t}\n\n\tadd(value: T): this {\n\t\tif (this.has(value) === false) {\n\t\t\tthis.items.push(value);\n\t\t}\n\t\treturn this;\n\t}\n\tclear(): void {\n\t\tthis.items = [];\n\t}\n\tdelete(value: T): boolean {\n\t\tconst previousLength = this.items.length;\n\t\tthis.items = this.items.filter((item) => item !== value);\n\n\t\treturn previousLength !== this.items.length;\n\t}\n\tforEach(callbackfn: (value: T, value2: T, set: Set) => void): void {\n\t\tthis.items.forEach((item) => {\n\t\t\tcallbackfn(item, item, this);\n\t\t});\n\t}\n\thas(value: T): boolean {\n\t\treturn this.items.indexOf(value) !== -1;\n\t}\n\n\tget size(): number {\n\t\treturn this.items.length;\n\t}\n}\n\nexport default typeof Set === \"undefined\" ? Set : SetLike;\n"],"mappings":";;;;;;;;;;;AAmBA;AAAA,IACMA,OAAO;EAGZ,mBAA6B;IAAA,IAAjBC,KAAU,uEAAG,EAAE;IAAA;IAAA;IAC1B,IAAI,CAACA,KAAK,GAAGA,KAAK;EACnB;EAAC;IAAA;IAAA,OAED,aAAIC,KAAQ,EAAQ;MACnB,IAAI,IAAI,CAACC,GAAG,CAACD,KAAK,CAAC,KAAK,KAAK,EAAE;QAC9B,IAAI,CAACD,KAAK,CAACG,IAAI,CAACF,KAAK,CAAC;MACvB;MACA,OAAO,IAAI;IACZ;EAAC;IAAA;IAAA,OACD,iBAAc;MACb,IAAI,CAACD,KAAK,GAAG,EAAE;IAChB;EAAC;IAAA;IAAA,OACD,iBAAOC,KAAQ,EAAW;MACzB,IAAMG,cAAc,GAAG,IAAI,CAACJ,KAAK,CAACK,MAAM;MACxC,IAAI,CAACL,KAAK,GAAG,IAAI,CAACA,KAAK,CAACM,MAAM,CAAC,UAACC,IAAI;QAAA,OAAKA,IAAI,KAAKN,KAAK;MAAA,EAAC;MAExD,OAAOG,cAAc,KAAK,IAAI,CAACJ,KAAK,CAACK,MAAM;IAC5C;EAAC;IAAA;IAAA,OACD,iBAAQG,UAAsD,EAAQ;MAAA;MACrE,IAAI,CAACR,KAAK,CAACS,OAAO,CAAC,UAACF,IAAI,EAAK;QAC5BC,UAAU,CAACD,IAAI,EAAEA,IAAI,EAAE,KAAI,CAAC;MAC7B,CAAC,CAAC;IACH;EAAC;IAAA;IAAA,OACD,aAAIN,KAAQ,EAAW;MACtB,OAAO,IAAI,CAACD,KAAK,CAACU,OAAO,CAACT,KAAK,CAAC,KAAK,CAAC,CAAC;IACxC;EAAC;IAAA;IAAA,KAED,eAAmB;MAClB,OAAO,IAAI,CAACD,KAAK,CAACK,MAAM;IACzB;EAAC;EAAA;AAAA;AAAA,eAGa,OAAOM,GAAG,KAAK,WAAW,GAAGA,GAAG,GAAGZ,OAAO;AAAA"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d3241b539d00343e323671633438da217c13b18d --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs @@ -0,0 +1,60 @@ +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } +function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +// for environments without Set we fallback to arrays with unique members +var SetLike = /*#__PURE__*/function () { + function SetLike() { + var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + _classCallCheck(this, SetLike); + _defineProperty(this, "items", void 0); + this.items = items; + } + _createClass(SetLike, [{ + key: "add", + value: function add(value) { + if (this.has(value) === false) { + this.items.push(value); + } + return this; + } + }, { + key: "clear", + value: function clear() { + this.items = []; + } + }, { + key: "delete", + value: function _delete(value) { + var previousLength = this.items.length; + this.items = this.items.filter(function (item) { + return item !== value; + }); + return previousLength !== this.items.length; + } + }, { + key: "forEach", + value: function forEach(callbackfn) { + var _this = this; + this.items.forEach(function (item) { + callbackfn(item, item, _this); + }); + } + }, { + key: "has", + value: function has(value) { + return this.items.indexOf(value) !== -1; + } + }, { + key: "size", + get: function get() { + return this.items.length; + } + }]); + return SetLike; +}(); +export default typeof Set === "undefined" ? Set : SetLike; +//# sourceMappingURL=SetLike.mjs.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs.map b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..4f944a89d6258cd9073143dc4d5e826df5906e11 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"SetLike.mjs","names":["SetLike","items","value","has","push","previousLength","length","filter","item","callbackfn","forEach","indexOf","Set"],"sources":["../../sources/polyfills/SetLike.ts"],"sourcesContent":["declare global {\n\tclass Set {\n\t\t// es2015.collection.d.ts\n\t\tconstructor(items?: T[]);\n\t\tadd(value: T): this;\n\t\tclear(): void;\n\t\tdelete(value: T): boolean;\n\t\tforEach(\n\t\t\tcallbackfn: (value: T, value2: T, set: Set) => void,\n\t\t\tthisArg?: unknown\n\t\t): void;\n\t\thas(value: T): boolean;\n\t\treadonly size: number;\n\n\t\t// es2015.iterable.d.ts\n\t\t// no implemennted\n\t}\n}\n\n// for environments without Set we fallback to arrays with unique members\nclass SetLike implements Set {\n\tprivate items: T[];\n\n\tconstructor(items: T[] = []) {\n\t\tthis.items = items;\n\t}\n\n\tadd(value: T): this {\n\t\tif (this.has(value) === false) {\n\t\t\tthis.items.push(value);\n\t\t}\n\t\treturn this;\n\t}\n\tclear(): void {\n\t\tthis.items = [];\n\t}\n\tdelete(value: T): boolean {\n\t\tconst previousLength = this.items.length;\n\t\tthis.items = this.items.filter((item) => item !== value);\n\n\t\treturn previousLength !== this.items.length;\n\t}\n\tforEach(callbackfn: (value: T, value2: T, set: Set) => void): void {\n\t\tthis.items.forEach((item) => {\n\t\t\tcallbackfn(item, item, this);\n\t\t});\n\t}\n\thas(value: T): boolean {\n\t\treturn this.items.indexOf(value) !== -1;\n\t}\n\n\tget size(): number {\n\t\treturn this.items.length;\n\t}\n}\n\nexport default typeof Set === \"undefined\" ? Set : SetLike;\n"],"mappings":";;;;;;;AAmBA;AAAA,IACMA,OAAO;EAGZ,mBAA6B;IAAA,IAAjBC,KAAU,uEAAG,EAAE;IAAA;IAAA;IAC1B,IAAI,CAACA,KAAK,GAAGA,KAAK;EACnB;EAAC;IAAA;IAAA,OAED,aAAIC,KAAQ,EAAQ;MACnB,IAAI,IAAI,CAACC,GAAG,CAACD,KAAK,CAAC,KAAK,KAAK,EAAE;QAC9B,IAAI,CAACD,KAAK,CAACG,IAAI,CAACF,KAAK,CAAC;MACvB;MACA,OAAO,IAAI;IACZ;EAAC;IAAA;IAAA,OACD,iBAAc;MACb,IAAI,CAACD,KAAK,GAAG,EAAE;IAChB;EAAC;IAAA;IAAA,OACD,iBAAOC,KAAQ,EAAW;MACzB,IAAMG,cAAc,GAAG,IAAI,CAACJ,KAAK,CAACK,MAAM;MACxC,IAAI,CAACL,KAAK,GAAG,IAAI,CAACA,KAAK,CAACM,MAAM,CAAC,UAACC,IAAI;QAAA,OAAKA,IAAI,KAAKN,KAAK;MAAA,EAAC;MAExD,OAAOG,cAAc,KAAK,IAAI,CAACJ,KAAK,CAACK,MAAM;IAC5C;EAAC;IAAA;IAAA,OACD,iBAAQG,UAAsD,EAAQ;MAAA;MACrE,IAAI,CAACR,KAAK,CAACS,OAAO,CAAC,UAACF,IAAI,EAAK;QAC5BC,UAAU,CAACD,IAAI,EAAEA,IAAI,EAAE,KAAI,CAAC;MAC7B,CAAC,CAAC;IACH;EAAC;IAAA;IAAA,OACD,aAAIN,KAAQ,EAAW;MACtB,OAAO,IAAI,CAACD,KAAK,CAACU,OAAO,CAACT,KAAK,CAAC,KAAK,CAAC,CAAC;IACxC;EAAC;IAAA;IAAA,KAED,eAAmB;MAClB,OAAO,IAAI,CAACD,KAAK,CAACK,MAAM;IACzB;EAAC;EAAA;AAAA;AAGF,eAAe,OAAOM,GAAG,KAAK,WAAW,GAAGA,GAAG,GAAGZ,OAAO"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.d.ts b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3b225d0c31d3876ec183fe2245b1523df5037e2b --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.d.ts @@ -0,0 +1,6 @@ +/** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + */ +export default function arrayFrom(iterable: Iterable | ArrayLike): T[]; +//# sourceMappingURL=array.from.d.ts.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.d.ts.map b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b53d7900d222c953242b66617f94a09183a65f4d --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"array.from.d.ts","sourceRoot":"","sources":["../../sources/polyfills/array.from.ts"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.js b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.js new file mode 100644 index 0000000000000000000000000000000000000000..5b64ebf00f7ef1f5eb400023a568df48d8d02f27 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.js @@ -0,0 +1,91 @@ +"use strict"; + +exports.__esModule = true; +exports.default = arrayFrom; +/** + * @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill} + * but without thisArg (too hard to type, no need to `this`) + */ +var toStr = Object.prototype.toString; +function isCallable(fn) { + return typeof fn === "function" || toStr.call(fn) === "[object Function]"; +} +function toInteger(value) { + var number = Number(value); + if (isNaN(number)) { + return 0; + } + if (number === 0 || !isFinite(number)) { + return number; + } + return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number)); +} +var maxSafeInteger = Math.pow(2, 53) - 1; +function toLength(value) { + var len = toInteger(value); + return Math.min(Math.max(len, 0), maxSafeInteger); +} +/** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + */ + +/** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ +function arrayFrom(arrayLike, mapFn) { + // 1. Let C be the this value. + // edit(@eps1lon): we're not calling it as Array.from + var C = Array; + + // 2. Let items be ToObject(arrayLike). + var items = Object(arrayLike); + + // 3. ReturnIfAbrupt(items). + if (arrayLike == null) { + throw new TypeError("Array.from requires an array-like object - not null or undefined"); + } + + // 4. If mapfn is undefined, then let mapping be false. + // const mapFn = arguments.length > 1 ? arguments[1] : void undefined; + + if (typeof mapFn !== "undefined") { + // 5. else + // 5. a If IsCallable(mapfn) is false, throw a TypeError exception. + if (!isCallable(mapFn)) { + throw new TypeError("Array.from: when provided, the second argument must be a function"); + } + } + + // 10. Let lenValue be Get(items, "length"). + // 11. Let len be ToLength(lenValue). + var len = toLength(items.length); + + // 13. If IsConstructor(C) is true, then + // 13. a. Let A be the result of calling the [[Construct]] internal method + // of C with an argument list containing the single item len. + // 14. a. Else, Let A be ArrayCreate(len). + var A = isCallable(C) ? Object(new C(len)) : new Array(len); + + // 16. Let k be 0. + var k = 0; + // 17. Repeat, while k < len… (also steps a - h) + var kValue; + while (k < len) { + kValue = items[k]; + if (mapFn) { + A[k] = mapFn(kValue, k); + } else { + A[k] = kValue; + } + k += 1; + } + // 18. Let putStatus be Put(A, "length", len, true). + A.length = len; + // 20. Return A. + return A; +} +//# sourceMappingURL=array.from.js.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.js.map b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.js.map new file mode 100644 index 0000000000000000000000000000000000000000..561fed7d2e6564e1ab2d6cfc0961ff63ec45a0dd --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.js.map @@ -0,0 +1 @@ +{"version":3,"file":"array.from.js","names":["toStr","Object","prototype","toString","isCallable","fn","call","toInteger","value","number","Number","isNaN","isFinite","Math","floor","abs","maxSafeInteger","pow","toLength","len","min","max","arrayFrom","arrayLike","mapFn","C","Array","items","TypeError","length","A","k","kValue"],"sources":["../../sources/polyfills/array.from.ts"],"sourcesContent":["/**\n * @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill}\n * but without thisArg (too hard to type, no need to `this`)\n */\nconst toStr = Object.prototype.toString;\nfunction isCallable(fn: unknown): boolean {\n\treturn typeof fn === \"function\" || toStr.call(fn) === \"[object Function]\";\n}\nfunction toInteger(value: unknown): number {\n\tconst number = Number(value);\n\tif (isNaN(number)) {\n\t\treturn 0;\n\t}\n\tif (number === 0 || !isFinite(number)) {\n\t\treturn number;\n\t}\n\treturn (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n}\nconst maxSafeInteger = Math.pow(2, 53) - 1;\nfunction toLength(value: unknown): number {\n\tconst len = toInteger(value);\n\treturn Math.min(Math.max(len, 0), maxSafeInteger);\n}\n/**\n * Creates an array from an iterable object.\n * @param iterable An iterable object to convert to an array.\n */\nexport default function arrayFrom(iterable: Iterable | ArrayLike): T[];\n/**\n * Creates an array from an iterable object.\n * @param iterable An iterable object to convert to an array.\n * @param mapfn A mapping function to call on every element of the array.\n * @param thisArg Value of 'this' used to invoke the mapfn.\n */\nexport default function arrayFrom(\n\tarrayLike: Iterable | ArrayLike,\n\tmapFn?: (v: T, k: number) => U\n): U[] {\n\t// 1. Let C be the this value.\n\t// edit(@eps1lon): we're not calling it as Array.from\n\tconst C = Array;\n\n\t// 2. Let items be ToObject(arrayLike).\n\tconst items = Object(arrayLike);\n\n\t// 3. ReturnIfAbrupt(items).\n\tif (arrayLike == null) {\n\t\tthrow new TypeError(\n\t\t\t\"Array.from requires an array-like object - not null or undefined\"\n\t\t);\n\t}\n\n\t// 4. If mapfn is undefined, then let mapping be false.\n\t// const mapFn = arguments.length > 1 ? arguments[1] : void undefined;\n\n\tif (typeof mapFn !== \"undefined\") {\n\t\t// 5. else\n\t\t// 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\n\t\tif (!isCallable(mapFn)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t\"Array.from: when provided, the second argument must be a function\"\n\t\t\t);\n\t\t}\n\t}\n\n\t// 10. Let lenValue be Get(items, \"length\").\n\t// 11. Let len be ToLength(lenValue).\n\tconst len = toLength(items.length);\n\n\t// 13. If IsConstructor(C) is true, then\n\t// 13. a. Let A be the result of calling the [[Construct]] internal method\n\t// of C with an argument list containing the single item len.\n\t// 14. a. Else, Let A be ArrayCreate(len).\n\tconst A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n\t// 16. Let k be 0.\n\tlet k = 0;\n\t// 17. Repeat, while k < len… (also steps a - h)\n\tlet kValue;\n\twhile (k < len) {\n\t\tkValue = items[k];\n\t\tif (mapFn) {\n\t\t\tA[k] = mapFn(kValue, k);\n\t\t} else {\n\t\t\tA[k] = kValue;\n\t\t}\n\t\tk += 1;\n\t}\n\t// 18. Let putStatus be Put(A, \"length\", len, true).\n\tA.length = len;\n\t// 20. Return A.\n\treturn A;\n}\n"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA,IAAMA,KAAK,GAAGC,MAAM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,UAAU,CAACoB,KAAK,CAAC,EAAE;MACvB,MAAM,IAAII,SAAS,CAClB,mEAAmE,CACnE;IACF;EACD;;EAEA;EACA;EACA,IAAMT,GAAG,GAAGD,QAAQ,CAACS,KAAK,CAACE,MAAM,CAAC;;EAElC;EACA;EACA;EACA;EACA,IAAMC,CAAC,GAAG1B,UAAU,CAACqB,CAAC,CAAC,GAAGxB,MAAM,CAAC,IAAIwB,CAAC,CAACN,GAAG,CAAC,CAAC,GAAG,IAAIO,KAAK,CAACP,GAAG,CAAC;;EAE7D;EACA,IAAIY,CAAC,GAAG,CAAC;EACT;EACA,IAAIC,MAAM;EACV,OAAOD,CAAC,GAAGZ,GAAG,EAAE;IACfa,MAAM,GAAGL,KAAK,CAACI,CAAC,CAAC;IACjB,IAAIP,KAAK,EAAE;MACVM,CAAC,CAACC,CAAC,CAAC,GAAGP,KAAK,CAACQ,MAAM,EAAED,CAAC,CAAC;IACxB,CAAC,MAAM;MACND,CAAC,CAACC,CAAC,CAAC,GAAGC,MAAM;IACd;IACAD,CAAC,IAAI,CAAC;EACP;EACA;EACAD,CAAC,CAACD,MAAM,GAAGV,GAAG;EACd;EACA,OAAOW,CAAC;AACT"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c1fa6ac3baeefcd2ac981648245f1edec368d83f --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs @@ -0,0 +1,87 @@ +/** + * @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill} + * but without thisArg (too hard to type, no need to `this`) + */ +var toStr = Object.prototype.toString; +function isCallable(fn) { + return typeof fn === "function" || toStr.call(fn) === "[object Function]"; +} +function toInteger(value) { + var number = Number(value); + if (isNaN(number)) { + return 0; + } + if (number === 0 || !isFinite(number)) { + return number; + } + return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number)); +} +var maxSafeInteger = Math.pow(2, 53) - 1; +function toLength(value) { + var len = toInteger(value); + return Math.min(Math.max(len, 0), maxSafeInteger); +} +/** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + */ + +/** + * Creates an array from an iterable object. + * @param iterable An iterable object to convert to an array. + * @param mapfn A mapping function to call on every element of the array. + * @param thisArg Value of 'this' used to invoke the mapfn. + */ +export default function arrayFrom(arrayLike, mapFn) { + // 1. Let C be the this value. + // edit(@eps1lon): we're not calling it as Array.from + var C = Array; + + // 2. Let items be ToObject(arrayLike). + var items = Object(arrayLike); + + // 3. ReturnIfAbrupt(items). + if (arrayLike == null) { + throw new TypeError("Array.from requires an array-like object - not null or undefined"); + } + + // 4. If mapfn is undefined, then let mapping be false. + // const mapFn = arguments.length > 1 ? arguments[1] : void undefined; + + if (typeof mapFn !== "undefined") { + // 5. else + // 5. a If IsCallable(mapfn) is false, throw a TypeError exception. + if (!isCallable(mapFn)) { + throw new TypeError("Array.from: when provided, the second argument must be a function"); + } + } + + // 10. Let lenValue be Get(items, "length"). + // 11. Let len be ToLength(lenValue). + var len = toLength(items.length); + + // 13. If IsConstructor(C) is true, then + // 13. a. Let A be the result of calling the [[Construct]] internal method + // of C with an argument list containing the single item len. + // 14. a. Else, Let A be ArrayCreate(len). + var A = isCallable(C) ? Object(new C(len)) : new Array(len); + + // 16. Let k be 0. + var k = 0; + // 17. Repeat, while k < len… (also steps a - h) + var kValue; + while (k < len) { + kValue = items[k]; + if (mapFn) { + A[k] = mapFn(kValue, k); + } else { + A[k] = kValue; + } + k += 1; + } + // 18. Let putStatus be Put(A, "length", len, true). + A.length = len; + // 20. Return A. + return A; +} +//# sourceMappingURL=array.from.mjs.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs.map b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..e93d17fa92c19cf51bc64c8ce331912f351b02d0 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"array.from.mjs","names":["toStr","Object","prototype","toString","isCallable","fn","call","toInteger","value","number","Number","isNaN","isFinite","Math","floor","abs","maxSafeInteger","pow","toLength","len","min","max","arrayFrom","arrayLike","mapFn","C","Array","items","TypeError","length","A","k","kValue"],"sources":["../../sources/polyfills/array.from.ts"],"sourcesContent":["/**\n * @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill}\n * but without thisArg (too hard to type, no need to `this`)\n */\nconst toStr = Object.prototype.toString;\nfunction isCallable(fn: unknown): boolean {\n\treturn typeof fn === \"function\" || toStr.call(fn) === \"[object Function]\";\n}\nfunction toInteger(value: unknown): number {\n\tconst number = Number(value);\n\tif (isNaN(number)) {\n\t\treturn 0;\n\t}\n\tif (number === 0 || !isFinite(number)) {\n\t\treturn number;\n\t}\n\treturn (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n}\nconst maxSafeInteger = Math.pow(2, 53) - 1;\nfunction toLength(value: unknown): number {\n\tconst len = toInteger(value);\n\treturn Math.min(Math.max(len, 0), maxSafeInteger);\n}\n/**\n * Creates an array from an iterable object.\n * @param iterable An iterable object to convert to an array.\n */\nexport default function arrayFrom(iterable: Iterable | ArrayLike): T[];\n/**\n * Creates an array from an iterable object.\n * @param iterable An iterable object to convert to an array.\n * @param mapfn A mapping function to call on every element of the array.\n * @param thisArg Value of 'this' used to invoke the mapfn.\n */\nexport default function arrayFrom(\n\tarrayLike: Iterable | ArrayLike,\n\tmapFn?: (v: T, k: number) => U\n): U[] {\n\t// 1. Let C be the this value.\n\t// edit(@eps1lon): we're not calling it as Array.from\n\tconst C = Array;\n\n\t// 2. Let items be ToObject(arrayLike).\n\tconst items = Object(arrayLike);\n\n\t// 3. ReturnIfAbrupt(items).\n\tif (arrayLike == null) {\n\t\tthrow new TypeError(\n\t\t\t\"Array.from requires an array-like object - not null or undefined\"\n\t\t);\n\t}\n\n\t// 4. If mapfn is undefined, then let mapping be false.\n\t// const mapFn = arguments.length > 1 ? arguments[1] : void undefined;\n\n\tif (typeof mapFn !== \"undefined\") {\n\t\t// 5. else\n\t\t// 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\n\t\tif (!isCallable(mapFn)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t\"Array.from: when provided, the second argument must be a function\"\n\t\t\t);\n\t\t}\n\t}\n\n\t// 10. Let lenValue be Get(items, \"length\").\n\t// 11. Let len be ToLength(lenValue).\n\tconst len = toLength(items.length);\n\n\t// 13. If IsConstructor(C) is true, then\n\t// 13. a. Let A be the result of calling the [[Construct]] internal method\n\t// of C with an argument list containing the single item len.\n\t// 14. a. Else, Let A be ArrayCreate(len).\n\tconst A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n\t// 16. Let k be 0.\n\tlet k = 0;\n\t// 17. Repeat, while k < len… (also steps a - h)\n\tlet kValue;\n\twhile (k < len) {\n\t\tkValue = items[k];\n\t\tif (mapFn) {\n\t\t\tA[k] = mapFn(kValue, k);\n\t\t} else {\n\t\t\tA[k] = kValue;\n\t\t}\n\t\tk += 1;\n\t}\n\t// 18. Let putStatus be Put(A, \"length\", len, true).\n\tA.length = len;\n\t// 20. Return A.\n\treturn A;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA,IAAMA,KAAK,GAAGC,MAAM,CAACC,SAAS,CAACC,QAAQ;AACvC,SAASC,UAAU,CAACC,EAAW,EAAW;EACzC,OAAO,OAAOA,EAAE,KAAK,UAAU,IAAIL,KAAK,CAACM,IAAI,CAACD,EAAE,CAAC,KAAK,mBAAmB;AAC1E;AACA,SAASE,SAAS,CAACC,KAAc,EAAU;EAC1C,IAAMC,MAAM,GAAGC,MAAM,CAACF,KAAK,CAAC;EAC5B,IAAIG,KAAK,CAACF,MAAM,CAAC,EAAE;IAClB,O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G,IAAIO,KAAK,CAACP,GAAG,CAAC;;EAE7D;EACA,IAAIY,CAAC,GAAG,CAAC;EACT;EACA,IAAIC,MAAM;EACV,OAAOD,CAAC,GAAGZ,GAAG,EAAE;IACfa,MAAM,GAAGL,KAAK,CAACI,CAAC,CAAC;IACjB,IAAIP,KAAK,EAAE;MACVM,CAAC,CAACC,CAAC,CAAC,GAAGP,KAAK,CAACQ,MAAM,EAAED,CAAC,CAAC;IACxB,CAAC,MAAM;MACND,CAAC,CAACC,CAAC,CAAC,GAAGC,MAAM;IACd;IACAD,CAAC,IAAI,CAAC;EACP;EACA;EACAD,CAAC,CAACD,MAAM,GAAGV,GAAG;EACd;EACA,OAAOW,CAAC;AACT"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.js b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.js new file mode 100644 index 0000000000000000000000000000000000000000..f643194f0c3561c5e490be52d62852f60e001779 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=iterator.d.js.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.js.map b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2d3bef3abf1b1ddc76c4fade29634ef9db4c1de8 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.js.map @@ -0,0 +1 @@ +{"version":3,"file":"iterator.d.js","names":[],"sources":["../../sources/polyfills/iterator.d.ts"],"sourcesContent":["// copied from https://github.com/microsoft/TypeScript/blob/eaeee9cc31bdc3a16f982a2e7b784573c977fdfa/lib/\n// but with `unknown` instead of `any`\ninterface IteratorYieldResult {\n\tdone?: false;\n\tvalue: TYield;\n}\n\ninterface IteratorReturnResult {\n\tdone: true;\n\tvalue: TReturn;\n}\n\ntype IteratorResult =\n\t| IteratorYieldResult\n\t| IteratorReturnResult;\n\ninterface Iterator {\n\t// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.\n\tnext(...args: [] | [TNext]): IteratorResult;\n\treturn?(value?: TReturn): IteratorResult;\n\tthrow?(e?: unknown): IteratorResult;\n}\n\ninterface Iterable {\n\t[Symbol.iterator](): Iterator;\n}\n\ninterface IterableIterator extends Iterator {\n\t[Symbol.iterator](): IterableIterator;\n}\ninterface SymbolConstructor {\n\t/**\n\t * A method that returns the default iterator for an object. Called by the semantics of the\n\t * for-of statement.\n\t */\n\treadonly iterator: symbol;\n}\n\ndeclare const Symbol: SymbolConstructor;\n"],"mappings":""} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.mjs b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cbd6c36525dc44f0be73aa18c6eda8fdf0bea4d7 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.mjs @@ -0,0 +1,2 @@ + +//# sourceMappingURL=iterator.d.mjs.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.mjs.map b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..aa2c0ecd90ce1d8e4fc0fcb0934783c3e116eda9 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"iterator.d.mjs","names":[],"sources":["../../sources/polyfills/iterator.d.ts"],"sourcesContent":["// copied from https://github.com/microsoft/TypeScript/blob/eaeee9cc31bdc3a16f982a2e7b784573c977fdfa/lib/\n// but with `unknown` instead of `any`\ninterface IteratorYieldResult {\n\tdone?: false;\n\tvalue: TYield;\n}\n\ninterface IteratorReturnResult {\n\tdone: true;\n\tvalue: TReturn;\n}\n\ntype IteratorResult =\n\t| IteratorYieldResult\n\t| IteratorReturnResult;\n\ninterface Iterator {\n\t// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.\n\tnext(...args: [] | [TNext]): IteratorResult;\n\treturn?(value?: TReturn): IteratorResult;\n\tthrow?(e?: unknown): IteratorResult;\n}\n\ninterface Iterable {\n\t[Symbol.iterator](): Iterator;\n}\n\ninterface IterableIterator extends Iterator {\n\t[Symbol.iterator](): IterableIterator;\n}\ninterface SymbolConstructor {\n\t/**\n\t * A method that returns the default iterator for an object. Called by the semantics of the\n\t * for-of statement.\n\t */\n\treadonly iterator: symbol;\n}\n\ndeclare const Symbol: SymbolConstructor;\n"],"mappings":""} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/util.d.ts b/tools/ui/node_modules/dom-accessibility-api/dist/util.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bb185c16560ba8df35dcfb582ff6ed31866767b8 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/util.d.ts @@ -0,0 +1,24 @@ +export { getLocalName } from "./getRole"; +export declare function isElement(node: Node | null): node is Element; +export declare function isHTMLTableCaptionElement(node: Node | null): node is HTMLTableCaptionElement; +export declare function isHTMLInputElement(node: Node | null): node is HTMLInputElement; +export declare function isHTMLOptGroupElement(node: Node | null): node is HTMLOptGroupElement; +export declare function isHTMLSelectElement(node: Node | null): node is HTMLSelectElement; +export declare function isHTMLTableElement(node: Node | null): node is HTMLTableElement; +export declare function isHTMLTextAreaElement(node: Node | null): node is HTMLTextAreaElement; +export declare function safeWindow(node: Node): Window; +export declare function isHTMLFieldSetElement(node: Node | null): node is HTMLFieldSetElement; +export declare function isHTMLLegendElement(node: Node | null): node is HTMLLegendElement; +export declare function isHTMLSlotElement(node: Node | null): node is HTMLSlotElement; +export declare function isSVGElement(node: Node | null): node is SVGElement; +export declare function isSVGSVGElement(node: Node | null): node is SVGSVGElement; +export declare function isSVGTitleElement(node: Node | null): node is SVGTitleElement; +/** + * + * @param {Node} node - + * @param {string} attributeName - + * @returns {Element[]} - + */ +export declare function queryIdRefs(node: Node, attributeName: string): Element[]; +export declare function hasAnyConcreteRoles(node: Node, roles: Array): node is Element; +//# sourceMappingURL=util.d.ts.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/util.d.ts.map b/tools/ui/node_modules/dom-accessibility-api/dist/util.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f0c3ae8d3ab75c88ae650c518b28d7eff8be0eb4 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/util.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../sources/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,OAAO,CAE5D;AAED,wBAAgB,yBAAyB,CACxC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,uBAAuB,CAEjC;AAED,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,gBAAgB,CAE1B;AAED,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,mBAAmB,CAE7B;AAED,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,iBAAiB,CAE3B;AAED,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,gBAAgB,CAE1B;AAED,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,mBAAmB,CAE7B;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAQ7C;AAED,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,mBAAmB,CAE7B;AAED,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,iBAAiB,CAE3B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,eAAe,CAE5E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,UAAU,CAElE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,aAAa,CAExE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,eAAe,CAE5E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,EAAE,CAmBxE;AAED,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,GACzB,IAAI,IAAI,OAAO,CAKjB"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/util.js b/tools/ui/node_modules/dom-accessibility-api/dist/util.js new file mode 100644 index 0000000000000000000000000000000000000000..c0de61be78228989c706b7493b5de9f1c504441d --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/util.js @@ -0,0 +1,103 @@ +"use strict"; + +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +exports.__esModule = true; +exports.hasAnyConcreteRoles = hasAnyConcreteRoles; +exports.isElement = isElement; +exports.isHTMLFieldSetElement = isHTMLFieldSetElement; +exports.isHTMLInputElement = isHTMLInputElement; +exports.isHTMLLegendElement = isHTMLLegendElement; +exports.isHTMLOptGroupElement = isHTMLOptGroupElement; +exports.isHTMLSelectElement = isHTMLSelectElement; +exports.isHTMLSlotElement = isHTMLSlotElement; +exports.isHTMLTableCaptionElement = isHTMLTableCaptionElement; +exports.isHTMLTableElement = isHTMLTableElement; +exports.isHTMLTextAreaElement = isHTMLTextAreaElement; +exports.isSVGElement = isSVGElement; +exports.isSVGSVGElement = isSVGSVGElement; +exports.isSVGTitleElement = isSVGTitleElement; +exports.queryIdRefs = queryIdRefs; +exports.safeWindow = safeWindow; +var _getRole = _interopRequireWildcard(require("./getRole")); +exports.getLocalName = _getRole.getLocalName; +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function isElement(node) { + return node !== null && node.nodeType === node.ELEMENT_NODE; +} +function isHTMLTableCaptionElement(node) { + return isElement(node) && (0, _getRole.getLocalName)(node) === "caption"; +} +function isHTMLInputElement(node) { + return isElement(node) && (0, _getRole.getLocalName)(node) === "input"; +} +function isHTMLOptGroupElement(node) { + return isElement(node) && (0, _getRole.getLocalName)(node) === "optgroup"; +} +function isHTMLSelectElement(node) { + return isElement(node) && (0, _getRole.getLocalName)(node) === "select"; +} +function isHTMLTableElement(node) { + return isElement(node) && (0, _getRole.getLocalName)(node) === "table"; +} +function isHTMLTextAreaElement(node) { + return isElement(node) && (0, _getRole.getLocalName)(node) === "textarea"; +} +function safeWindow(node) { + var _ref = node.ownerDocument === null ? node : node.ownerDocument, + defaultView = _ref.defaultView; + if (defaultView === null) { + throw new TypeError("no window available"); + } + return defaultView; +} +function isHTMLFieldSetElement(node) { + return isElement(node) && (0, _getRole.getLocalName)(node) === "fieldset"; +} +function isHTMLLegendElement(node) { + return isElement(node) && (0, _getRole.getLocalName)(node) === "legend"; +} +function isHTMLSlotElement(node) { + return isElement(node) && (0, _getRole.getLocalName)(node) === "slot"; +} +function isSVGElement(node) { + return isElement(node) && node.ownerSVGElement !== undefined; +} +function isSVGSVGElement(node) { + return isElement(node) && (0, _getRole.getLocalName)(node) === "svg"; +} +function isSVGTitleElement(node) { + return isSVGElement(node) && (0, _getRole.getLocalName)(node) === "title"; +} + +/** + * + * @param {Node} node - + * @param {string} attributeName - + * @returns {Element[]} - + */ +function queryIdRefs(node, attributeName) { + if (isElement(node) && node.hasAttribute(attributeName)) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute check + var ids = node.getAttribute(attributeName).split(" "); + + // Browsers that don't support shadow DOM won't have getRootNode + var root = node.getRootNode ? node.getRootNode() : node.ownerDocument; + return ids.map(function (id) { + return root.getElementById(id); + }).filter(function (element) { + return element !== null; + } + // TODO: why does this not narrow? + ); + } + + return []; +} +function hasAnyConcreteRoles(node, roles) { + if (isElement(node)) { + return roles.indexOf((0, _getRole.default)(node)) !== -1; + } + return false; +} +//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/util.js.map b/tools/ui/node_modules/dom-accessibility-api/dist/util.js.map new file mode 100644 index 0000000000000000000000000000000000000000..70f82e9418706cb54ba271a6a156f088f9bc3a23 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/util.js.map @@ -0,0 +1 @@ +{"version":3,"file":"util.js","names":["isElement","node","nodeType","ELEMENT_NODE","isHTMLTableCaptionElement","getLocalName","isHTMLInputElement","isHTMLOptGroupElement","isHTMLSelectElement","isHTMLTableElement","isHTMLTextAreaElement","safeWindow","ownerDocument","defaultView","TypeError","isHTMLFieldSetElement","isHTMLLegendElement","isHTMLSlotElement","isSVGElement","ownerSVGElement","undefined","isSVGSVGElement","isSVGTitleElement","queryIdRefs","attributeName","hasAttribute","ids","getAttribute","split","root","getRootNode","map","id","getElementById","filter","element","hasAnyConcreteRoles","roles","indexOf","getRole"],"sources":["../sources/util.ts"],"sourcesContent":["export { getLocalName } from \"./getRole\";\nimport getRole, { getLocalName } from \"./getRole\";\n\nexport function isElement(node: Node | null): node is Element {\n\treturn node !== null && node.nodeType === node.ELEMENT_NODE;\n}\n\nexport function isHTMLTableCaptionElement(\n\tnode: Node | null\n): node is HTMLTableCaptionElement {\n\treturn isElement(node) && getLocalName(node) === \"caption\";\n}\n\nexport function isHTMLInputElement(\n\tnode: Node | null\n): node is HTMLInputElement {\n\treturn isElement(node) && getLocalName(node) === \"input\";\n}\n\nexport function isHTMLOptGroupElement(\n\tnode: Node | null\n): node is HTMLOptGroupElement {\n\treturn isElement(node) && getLocalName(node) === \"optgroup\";\n}\n\nexport function isHTMLSelectElement(\n\tnode: Node | null\n): node is HTMLSelectElement {\n\treturn isElement(node) && getLocalName(node) === \"select\";\n}\n\nexport function isHTMLTableElement(\n\tnode: Node | null\n): node is HTMLTableElement {\n\treturn isElement(node) && getLocalName(node) === \"table\";\n}\n\nexport function isHTMLTextAreaElement(\n\tnode: Node | null\n): node is HTMLTextAreaElement {\n\treturn isElement(node) && getLocalName(node) === \"textarea\";\n}\n\nexport function safeWindow(node: Node): Window {\n\tconst { defaultView } =\n\t\tnode.ownerDocument === null ? (node as Document) : node.ownerDocument;\n\n\tif (defaultView === null) {\n\t\tthrow new TypeError(\"no window available\");\n\t}\n\treturn defaultView;\n}\n\nexport function isHTMLFieldSetElement(\n\tnode: Node | null\n): node is HTMLFieldSetElement {\n\treturn isElement(node) && getLocalName(node) === \"fieldset\";\n}\n\nexport function isHTMLLegendElement(\n\tnode: Node | null\n): node is HTMLLegendElement {\n\treturn isElement(node) && getLocalName(node) === \"legend\";\n}\n\nexport function isHTMLSlotElement(node: Node | null): node is HTMLSlotElement {\n\treturn isElement(node) && getLocalName(node) === \"slot\";\n}\n\nexport function isSVGElement(node: Node | null): node is SVGElement {\n\treturn isElement(node) && (node as SVGElement).ownerSVGElement !== undefined;\n}\n\nexport function isSVGSVGElement(node: Node | null): node is SVGSVGElement {\n\treturn isElement(node) && getLocalName(node) === \"svg\";\n}\n\nexport function isSVGTitleElement(node: Node | null): node is SVGTitleElement {\n\treturn isSVGElement(node) && getLocalName(node) === \"title\";\n}\n\n/**\n *\n * @param {Node} node -\n * @param {string} attributeName -\n * @returns {Element[]} -\n */\nexport function queryIdRefs(node: Node, attributeName: string): Element[] {\n\tif (isElement(node) && node.hasAttribute(attributeName)) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute check\n\t\tconst ids = node.getAttribute(attributeName)!.split(\" \");\n\n\t\t// Browsers that don't support shadow DOM won't have getRootNode\n\t\tconst root = node.getRootNode\n\t\t\t? (node.getRootNode() as Document | ShadowRoot)\n\t\t\t: node.ownerDocument;\n\n\t\treturn ids\n\t\t\t.map((id) => root.getElementById(id))\n\t\t\t.filter(\n\t\t\t\t(element: Element | null): element is Element => element !== null\n\t\t\t\t// TODO: why does this not narrow?\n\t\t\t) as Element[];\n\t}\n\n\treturn [];\n}\n\nexport function hasAnyConcreteRoles(\n\tnode: Node,\n\troles: Array\n): node is Element {\n\tif (isElement(node)) {\n\t\treturn roles.indexOf(getRole(node)) !== -1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C6B,WAAW,EAAE,GACnB7B,IAAI,CAACW,aAAa;IAErB,OAAOc,GAAG,CACRK,GAAG,CAAC,UAACC,EAAE;MAAA,OAAKH,IAAI,CAACI,cAAc,CAACD,EAAE,CAAC;IAAA,EAAC,CACpCE,MAAM,CACN,UAACC,OAAuB;MAAA,OAAyBA,OAAO,KAAK,IAAI;IAAA;IACjE;IAAA,CACA;EACH;;EAEA,OAAO,EAAE;AACV;AAEO,SAASC,mBAAmB,CAClCnC,IAAU,EACVoC,KAA2B,EACT;EAClB,IAAIrC,SAAS,CAACC,IAAI,CAAC,EAAE;IACpB,OAAOoC,KAAK,CAACC,OAAO,CAAC,IAAAC,gBAAO,EAACtC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;EAC3C;EACA,OAAO,KAAK;AACb"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/util.mjs b/tools/ui/node_modules/dom-accessibility-api/dist/util.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f0fd1fc83b6d05cda4e7b830337aeff9fe92bb7d --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/util.mjs @@ -0,0 +1,81 @@ +export { getLocalName } from "./getRole.mjs"; +import getRole, { getLocalName } from "./getRole.mjs"; +export function isElement(node) { + return node !== null && node.nodeType === node.ELEMENT_NODE; +} +export function isHTMLTableCaptionElement(node) { + return isElement(node) && getLocalName(node) === "caption"; +} +export function isHTMLInputElement(node) { + return isElement(node) && getLocalName(node) === "input"; +} +export function isHTMLOptGroupElement(node) { + return isElement(node) && getLocalName(node) === "optgroup"; +} +export function isHTMLSelectElement(node) { + return isElement(node) && getLocalName(node) === "select"; +} +export function isHTMLTableElement(node) { + return isElement(node) && getLocalName(node) === "table"; +} +export function isHTMLTextAreaElement(node) { + return isElement(node) && getLocalName(node) === "textarea"; +} +export function safeWindow(node) { + var _ref = node.ownerDocument === null ? node : node.ownerDocument, + defaultView = _ref.defaultView; + if (defaultView === null) { + throw new TypeError("no window available"); + } + return defaultView; +} +export function isHTMLFieldSetElement(node) { + return isElement(node) && getLocalName(node) === "fieldset"; +} +export function isHTMLLegendElement(node) { + return isElement(node) && getLocalName(node) === "legend"; +} +export function isHTMLSlotElement(node) { + return isElement(node) && getLocalName(node) === "slot"; +} +export function isSVGElement(node) { + return isElement(node) && node.ownerSVGElement !== undefined; +} +export function isSVGSVGElement(node) { + return isElement(node) && getLocalName(node) === "svg"; +} +export function isSVGTitleElement(node) { + return isSVGElement(node) && getLocalName(node) === "title"; +} + +/** + * + * @param {Node} node - + * @param {string} attributeName - + * @returns {Element[]} - + */ +export function queryIdRefs(node, attributeName) { + if (isElement(node) && node.hasAttribute(attributeName)) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute check + var ids = node.getAttribute(attributeName).split(" "); + + // Browsers that don't support shadow DOM won't have getRootNode + var root = node.getRootNode ? node.getRootNode() : node.ownerDocument; + return ids.map(function (id) { + return root.getElementById(id); + }).filter(function (element) { + return element !== null; + } + // TODO: why does this not narrow? + ); + } + + return []; +} +export function hasAnyConcreteRoles(node, roles) { + if (isElement(node)) { + return roles.indexOf(getRole(node)) !== -1; + } + return false; +} +//# sourceMappingURL=util.mjs.map \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/dist/util.mjs.map b/tools/ui/node_modules/dom-accessibility-api/dist/util.mjs.map new file mode 100644 index 0000000000000000000000000000000000000000..72fa3072ba69defa33188bf0d66742e1131e0f45 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/dist/util.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"util.mjs","names":["getLocalName","getRole","isElement","node","nodeType","ELEMENT_NODE","isHTMLTableCaptionElement","isHTMLInputElement","isHTMLOptGroupElement","isHTMLSelectElement","isHTMLTableElement","isHTMLTextAreaElement","safeWindow","ownerDocument","defaultView","TypeError","isHTMLFieldSetElement","isHTMLLegendElement","isHTMLSlotElement","isSVGElement","ownerSVGElement","undefined","isSVGSVGElement","isSVGTitleElement","queryIdRefs","attributeName","hasAttribute","ids","getAttribute","split","root","getRootNode","map","id","getElementById","filter","element","hasAnyConcreteRoles","roles","indexOf"],"sources":["../sources/util.ts"],"sourcesContent":["export { getLocalName } from \"./getRole\";\nimport getRole, { getLocalName } from \"./getRole\";\n\nexport function isElement(node: Node | null): node is Element {\n\treturn node !== null && node.nodeType === node.ELEMENT_NODE;\n}\n\nexport function isHTMLTableCaptionElement(\n\tnode: Node | null\n): node is HTMLTableCaptionElement {\n\treturn isElement(node) && getLocalName(node) === \"caption\";\n}\n\nexport function isHTMLInputElement(\n\tnode: Node | null\n): node is HTMLInputElement {\n\treturn isElement(node) && getLocalName(node) === \"input\";\n}\n\nexport function isHTMLOptGroupElement(\n\tnode: Node | null\n): node is HTMLOptGroupElement {\n\treturn isElement(node) && getLocalName(node) === \"optgroup\";\n}\n\nexport function isHTMLSelectElement(\n\tnode: Node | null\n): node is HTMLSelectElement {\n\treturn isElement(node) && getLocalName(node) === \"select\";\n}\n\nexport function isHTMLTableElement(\n\tnode: Node | null\n): node is HTMLTableElement {\n\treturn isElement(node) && getLocalName(node) === \"table\";\n}\n\nexport function isHTMLTextAreaElement(\n\tnode: Node | null\n): node is HTMLTextAreaElement {\n\treturn isElement(node) && getLocalName(node) === \"textarea\";\n}\n\nexport function safeWindow(node: Node): Window {\n\tconst { defaultView } =\n\t\tnode.ownerDocument === null ? (node as Document) : node.ownerDocument;\n\n\tif (defaultView === null) {\n\t\tthrow new TypeError(\"no window available\");\n\t}\n\treturn defaultView;\n}\n\nexport function isHTMLFieldSetElement(\n\tnode: Node | null\n): node is HTMLFieldSetElement {\n\treturn isElement(node) && getLocalName(node) === \"fieldset\";\n}\n\nexport function isHTMLLegendElement(\n\tnode: Node | null\n): node is HTMLLegendElement {\n\treturn isElement(node) && getLocalName(node) === \"legend\";\n}\n\nexport function isHTMLSlotElement(node: Node | null): node is HTMLSlotElement {\n\treturn isElement(node) && getLocalName(node) === \"slot\";\n}\n\nexport function isSVGElement(node: Node | null): node is SVGElement {\n\treturn isElement(node) && (node as SVGElement).ownerSVGElement !== undefined;\n}\n\nexport function isSVGSVGElement(node: Node | null): node is SVGSVGElement {\n\treturn isElement(node) && getLocalName(node) === \"svg\";\n}\n\nexport function isSVGTitleElement(node: Node | null): node is SVGTitleElement {\n\treturn isSVGElement(node) && getLocalName(node) === \"title\";\n}\n\n/**\n *\n * @param {Node} node -\n * @param {string} attributeName -\n * @returns {Element[]} -\n */\nexport function queryIdRefs(node: Node, attributeName: string): Element[] {\n\tif (isElement(node) && node.hasAttribute(attributeName)) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute check\n\t\tconst ids = node.getAttribute(attributeName)!.split(\" \");\n\n\t\t// Browsers that don't support shadow DOM won't have getRootNode\n\t\tconst root = node.getRootNode\n\t\t\t? (node.getRootNode() as Document | ShadowRoot)\n\t\t\t: node.ownerDocument;\n\n\t\treturn ids\n\t\t\t.map((id) => root.getElementById(id))\n\t\t\t.filter(\n\t\t\t\t(element: Element | null): element is Element => element !== null\n\t\t\t\t// TODO: why does this not narrow?\n\t\t\t) as Element[];\n\t}\n\n\treturn [];\n}\n\nexport function hasAnyConcreteRoles(\n\tnode: Node,\n\troles: Array\n): node is Element {\n\tif (isElement(node)) {\n\t\treturn roles.indexOf(getRole(node)) !== -1;\n\t}\n\treturn false;\n}\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,eAAW;AACxC,OAAOC,OAAO,IAAID,YAAY,QAAQ,eAAW;AAEjD,OAAO,SAASE,SAAS,CAACC,IAAiB,EAAmB;EAC7D,OAAOA,IAAI,KAAK,IAAI,IAAIA,IAAI,CAACC,QAAQ,KAAKD,IAAI,CAACE,YAAY;AAC5D;AAEA,OAAO,SAASC,yBAAyB,CACxCH,IAAiB,EACiB;EAClC,OAAOD,SAAS,CAACC,IAAI,CAAC,IAAIH,YAAY,CAACG,IAAI,CAAC,KAAK,SAAS;AAC3D;AAEA,OAAO,SAASI,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pB,OAAOmC,KAAK,CAACC,OAAO,CAACtC,OAAO,CAACE,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;EAC3C;EACA,OAAO,KAAK;AACb"} \ No newline at end of file diff --git a/tools/ui/node_modules/dom-accessibility-api/package.json b/tools/ui/node_modules/dom-accessibility-api/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a1139213d27609786be13de4a6cd8d667e174520 --- /dev/null +++ b/tools/ui/node_modules/dom-accessibility-api/package.json @@ -0,0 +1,92 @@ +{ + "name": "dom-accessibility-api", + "description": "Implements https://w3c.github.io/accname/", + "version": "0.5.16", + "main": "dist/index.js", + "module": "dist/index.mjs", + "type": "commonjs", + "exports": { + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/eps1lon/dom-accessibility-api.git" + }, + "files": [ + ".browserslistrc", + "dist/" + ], + "scripts": { + "build": "yarn build:clean && yarn build:source && yarn build:source:cjs && yarn build:types", + "build:clean": "rimraf dist", + "build:source": "cross-env BABEL_ENV=esm babel sources --extensions \".ts\" --ignore \"**/__tests__/**/*\" --out-dir dist/ --out-file-extension=.mjs --source-maps", + "build:source:cjs": "cross-env BABEL_ENV=cjs babel sources --extensions \".ts\" --ignore \"**/__tests__/**/*\" --out-dir dist/ --out-file-extension=.js --source-maps", + "build:types": "tsc -p tsconfig.json --emitDeclarationOnly", + "format": "prettier \"**/*.{json,js,md,ts,yml}\" --write --ignore-path .prettierignore", + "lint": "eslint --report-unused-disable-directives \"{scripts,sources}/**/*.{js,ts}\"", + "release": "yarn build && yarn changeset publish", + "test": "jest --config scripts/jest/jest.config.js", + "test:ci": "jest --ci --config scripts/jest/jest.ci.config.js --runInBand", + "test:coverage": "jest --config scripts/jest/jest.coverage.config.js", + "test:types": "tsc -p tsconfig.json --noEmit", + "test:wpt:jsdom": "mocha tests/wpt-jsdom/run-wpts.js", + "test:wpt:browser": "concurrently --success first --kill-others \"yarn test:wpt:browser:run\" \"yarn test:wpt:browser:server\"", + "test:wpt:browser:run": "cypress run --project tests", + "test:wpt:browser:server": "serve tests/wpt", + "test:wpt:browser:open": "cypress open --project tests", + "wpt:init": "git submodule update --init --recursive", + "wpt:reset": "rimraf ./tests/wpt && yarn wpt:init", + "wpt:update": "git submodule update --recursive --remote && cd tests/wpt && python wpt.py manifest --path ../wpt-jsdom/wpt-manifest.json" + }, + "devDependencies": { + "@babel/cli": "^7.14.3", + "@babel/core": "^7.14.3", + "@babel/plugin-proposal-class-properties": "^7.13.0", + "@babel/preset-env": "^7.14.4", + "@babel/preset-typescript": "^7.13.0", + "@changesets/changelog-github": "^0.4.0", + "@changesets/cli": "^2.16.0", + "@testing-library/dom": "^8.0.0", + "@types/jest": "^29.0.0", + "@typescript-eslint/eslint-plugin": "^5.0.0", + "@typescript-eslint/parser": "^5.0.0", + "concurrently": "^7.0.0", + "cross-env": "^7.0.3", + "cypress": "^12.0.0", + "eslint": "^7.27.0", + "eslint-plugin-jest": "^27.0.0", + "jest": "^29.0.0", + "jest-diff": "^29.0.0", + "jest-environment-jsdom": "^29.0.0", + "jest-junit": "^15.0.0", + "js-yaml": "^4.1.0", + "jsdom": "^20.0.0", + "minimatch": "^6.0.0", + "mocha": "^10.0.0", + "mocha-sugar-free": "^1.4.0", + "prettier": "^2.3.0", + "q": "^1.5.1", + "request": "^2.88", + "request-promise-native": "^1.0.9", + "rimraf": "^4.0.0", + "serve": "^14.0.0", + "typescript": "^4.3.2" + }, + "resolutions": { + "**/kind-of": "^6.0.3", + "**/minimist": "^1.2.2" + }, + "prettier": { + "useTabs": true + }, + "keywords": [ + "accessibility", + "ARIA", + "accname" + ], + "publishConfig": { + "access": "public" + } +} diff --git a/tools/ui/node_modules/dompurify/LICENSE b/tools/ui/node_modules/dompurify/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7 --- /dev/null +++ b/tools/ui/node_modules/dompurify/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/tools/ui/node_modules/dompurify/LICENSE-MPL b/tools/ui/node_modules/dompurify/LICENSE-MPL new file mode 100644 index 0000000000000000000000000000000000000000..14e2f777f6c395e7e04ab4aa306bbcc4b0c1120e --- /dev/null +++ b/tools/ui/node_modules/dompurify/LICENSE-MPL @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/tools/ui/node_modules/dompurify/README.md b/tools/ui/node_modules/dompurify/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8cbc60aaec2e6d44c68e283aaca9924a451d0e50 --- /dev/null +++ b/tools/ui/node_modules/dompurify/README.md @@ -0,0 +1,568 @@ +# DOMPurify + +[![npm](https://img.shields.io/npm/v/dompurify.svg)](https://www.npmjs.com/package/dompurify) [![License](https://img.shields.io/badge/license-MPL--2.0%20OR%20Apache--2.0-blue.svg)](https://github.com/cure53/DOMPurify/blob/main/LICENSE) [![Downloads](https://img.shields.io/npm/dm/dompurify.svg)](https://www.npmjs.com/package/dompurify) [![dependents](https://badgen.net/github/dependents-repo/cure53/dompurify?color=green&label=dependents)](https://github.com/cure53/DOMPurify/network/dependents) ![npm package minimized gzipped size (select exports)](https://img.shields.io/bundlejs/size/dompurify?color=%233C1&label=gzip) [![Cloudback](https://app.cloudback.it/badge/cure53/DOMPurify)](https://cloudback.it) + +[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/12162/badge)](https://www.bestpractices.dev/projects/12162) [![Build & Test](https://github.com/cure53/DOMPurify/actions/workflows/build-and-test.yml/badge.svg?branch=main)](https://github.com/cure53/DOMPurify/actions/workflows/build-and-test.yml) [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/cure53/DOMPurify/badge)](https://scorecard.dev/viewer/?uri=github.com/cure53/DOMPurify) [![Socket Badge](https://badge.socket.dev/npm/package/dompurify/latest)](https://badge.socket.dev/npm/package/dompurify/latest) [![snyk.io package health](https://img.shields.io/badge/snyk.io%20package%20health-97%2F100-brightgreen)](https://security.snyk.io/package/npm/dompurify) + +DOMPurify is a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. + +It's also very simple to use and get started with. DOMPurify was [started in February 2014](https://github.com/cure53/DOMPurify/commit/a630922616927373485e0e787ab19e73e3691b2b) and, meanwhile, has reached version **v3.4.13**. + +DOMPurify runs as JavaScript and works in all modern browsers (Safari (10+), Opera (15+), Edge, Firefox and Chrome - as well as almost anything else using Blink, Gecko or WebKit). It doesn't break on MSIE or other legacy browsers. It simply does nothing. + +**Note that [DOMPurify v2.5.9](https://github.com/cure53/DOMPurify/releases/tag/2.5.9) is the latest version supporting MSIE. For important security updates compatible with MSIE, please use the [2.x branch](https://github.com/cure53/DOMPurify/tree/2.x).** + +Our automated tests cover 9 browser/OS combinations on the current engines (Chromium, Firefox, and WebKit across Ubuntu, macOS, and Windows) on every push, and a separate matrix re-runs the suite on older engine snapshots (back to roughly Chromium 110, Firefox 108 and WebKit 16.4, around three years old) so regressions on outdated browsers get caught too. We also run Node.js v20, v22, v24, v25 and v26 with DOMPurify on [jsdom](https://github.com/jsdom/jsdom). Older Node versions are known to work as well, but hey... no guarantees. + +DOMPurify is written by security people who have vast background in web attacks and XSS. Fear not. For more details please also read about our [Security Goals & Threat Model](https://github.com/cure53/DOMPurify/wiki/Security-Goals-&-Threat-Model). Please, read it. Like, really. And if you enjoy the gory details, the [Attack Classes & Bypass History](https://github.com/cure53/DOMPurify/wiki/Attack-Classes-&-Bypass-History) page catalogs the parser-mutation, namespace, clobbering, and template tricks DOMPurify defends against. + +The DOMPurify project inspired the creation of the [HTML Sanitizer API](https://wicg.github.io/sanitizer-api/#sanitizer), which is already shipping in [many browsers](https://developer.mozilla.org/en-US/docs/Web/API/HTML_Sanitizer_API#browser_compatibility). The same capability is now being standardized directly in the [WHATWG HTML specification](https://html.spec.whatwg.org/#html-sanitization). + +## Table of Contents + +- [What does it do?](#what-does-it-do) +- [How do I use it?](#how-do-i-use-it) +- [Is there a demo?](#is-there-a-demo) +- [What if I find a _security_ bug?](#what-if-i-find-a-security-bug) +- [Some purification samples please?](#some-purification-samples-please) +- [What is supported?](#what-is-supported) +- [What about legacy browsers like Internet Explorer?](#what-about-legacy-browsers-like-internet-explorer) +- [What about DOMPurify and Trusted Types?](#what-about-dompurify-and-trusted-types) +- [Can I configure DOMPurify?](#can-i-configure-dompurify) +- [Persistent Configuration](#persistent-configuration) +- [Hooks](#hooks) +- [Removed Configuration](#removed-configuration) +- [Continuous Integration](#continuous-integration) +- [Security Mailing List](#security-mailing-list) +- [Who contributed?](#who-contributed) + +## What does it do? + +DOMPurify sanitizes HTML and prevents XSS attacks. You can feed DOMPurify with e.g. a string full of dirty HTML and it will return a string (unless configured otherwise) with clean HTML. DOMPurify will strip out everything that contains dangerous HTML and thereby prevent XSS attacks and other nastiness. It's also damn bloody fast. We use the technologies the browser provides and turn them into an XSS filter. The faster your browser, the faster DOMPurify will be. + +## How do I use it? + +It's easy. Just include DOMPurify on your website. + +### Using the unminified version (source-map available) + +```html + +``` + +### Using the minified and tested production version (source-map available) + +```html + +``` + +Afterwards you can sanitize strings by executing the following code: + +```js +const clean = DOMPurify.sanitize(dirty); +``` + +Or maybe this, if you love working with Angular or alike: + +```js +import DOMPurify from 'dompurify'; + +const clean = DOMPurify.sanitize('hello there'); +``` + +The resulting HTML can be written into a DOM element using `innerHTML` or the DOM using `document.write()`. That is fully up to you. +Note that by default, we permit HTML, SVG **and** MathML. If you only need HTML, which might be a very common use-case, you can easily set that up as well: + +```js +const clean = DOMPurify.sanitize(dirty, { USE_PROFILES: { html: true } }); +``` + +### Is there any foot-gun potential? + +Well, please note, if you _first_ sanitize HTML and then modify it _afterwards_, you might easily **void the effects of sanitization**. If you feed the sanitized markup to another library _after_ sanitization, please be certain that the library doesn't mess around with the HTML on its own. See the [Security Goals & Threat Model](https://github.com/cure53/DOMPurify/wiki/Security-Goals-&-Threat-Model) for safe-usage recipes and the tags/attributes worth thinking twice about, and [Attack Classes & Bypass History](https://github.com/cure53/DOMPurify/wiki/Attack-Classes-&-Bypass-History) for why post-processing and changing the markup context defeat sanitization. + +### Okay, makes sense, let's move on + +After sanitizing your markup, you can also have a look at the property `DOMPurify.removed` and find out, what elements and attributes were thrown out. Please **do not use** this property for making any security critical decisions. This is just a little helper for curious minds. + +### Running DOMPurify on the server + +DOMPurify technically also works server-side with Node.js. Our support strives to follow the [Node.js release cycle](https://nodejs.org/en/about/previous-releases). + +Running DOMPurify on the server requires a DOM to be present, which is probably no surprise. Usually, [jsdom](https://github.com/jsdom/jsdom) is the tool of choice and we **strongly recommend** to use the latest version of _jsdom_. + +Why? Because older versions of _jsdom_ are known to be buggy in ways that result in XSS _even if_ DOMPurify does everything 100% correctly. There are **known attack vectors** in, e.g. _jsdom v19.0.0_ that are fixed in _jsdom v20.0.0_ - and we really recommend to keep _jsdom_ up to date because of that. + +Please also be aware that tools like [happy-dom](https://github.com/capricorn86/happy-dom) exist but **are not considered safe** at this point. Combining DOMPurify with _happy-dom_ is currently not recommended and will likely lead to XSS. For background on why the server-side DOM you choose is part of your trusted computing base, see [Attack Classes & Bypass History](https://github.com/cure53/DOMPurify/wiki/Attack-Classes-&-Bypass-History). + +Other than that, you are fine to use DOMPurify on the server. Probably. This really depends on _jsdom_ or whatever DOM you utilize server-side. If you can live with that, this is how you get it to work: + +```bash +npm install dompurify +npm install jsdom +``` + +For _jsdom_ (please use an up-to-date version), this should do the trick: + +```js +const createDOMPurify = require('dompurify'); +const { JSDOM } = require('jsdom'); + +const window = new JSDOM('').window; +const DOMPurify = createDOMPurify(window); +const clean = DOMPurify.sanitize('hello there'); +``` + +Or even this, if you prefer working with imports: + +```js +import { JSDOM } from 'jsdom'; +import DOMPurify from 'dompurify'; + +const window = new JSDOM('').window; +const purify = DOMPurify(window); +const clean = purify.sanitize('hello there'); +``` + +If you have problems making it work in your specific setup, consider looking at the amazing [isomorphic-dompurify](https://github.com/kkomelin/isomorphic-dompurify) project which solves lots of problems people might run into. + +```bash +npm install isomorphic-dompurify +``` + +```js +import DOMPurify from 'isomorphic-dompurify'; + +const clean = DOMPurify.sanitize('hello'); +``` + +## Is there a demo? + +Of course there is a demo! [Play with DOMPurify](https://cure53.de/purify) + +## What if I find a security bug? + +First of all, please immediately contact us via [email](mailto:mario@cure53.de) so we can work on a fix. [PGP key](https://keyserver.ubuntu.com/pks/lookup?op=vindex&search=0xC26C858090F70ADA) + +Also, you probably qualify for a bug bounty! The fine folks over at [Fastmail](https://www.fastmail.com/) use DOMPurify for their services and added our library to their bug bounty scope. So, if you find a way to bypass or weaken DOMPurify, please also have a look at their website and the [bug bounty info](https://www.fastmail.com/about/bugbounty/). + +## Some purification samples please? + +How does purified markup look like? Well, [the demo](https://cure53.de/purify) shows it for a big bunch of nasty elements. But let's also show some smaller examples! + +```js +DOMPurify.sanitize(''); // becomes +DOMPurify.sanitize(''); // becomes +DOMPurify.sanitize('

abc