How to use parseComponentSelector method in Playwright Internal

Best JavaScript code snippet using playwright-internal

index.cjs

Source:index.cjs Github

copy

Full Screen

1'use strict';2Object.defineProperty(exports, '__esModule', { value: true });3function _extends() {4 _extends = Object.assign || function (target) {5 for (var i = 1; i < arguments.length; i++) {6 var source = arguments[i];7 for (var key in source) {8 if (Object.prototype.hasOwnProperty.call(source, key)) {9 target[key] = source[key];10 }11 }12 }13 return target;14 };15 return _extends.apply(this, arguments);16}17function _objectWithoutPropertiesLoose(source, excluded) {18 if (source == null) return {};19 var target = {};20 var sourceKeys = Object.keys(source);21 var key, i;22 for (i = 0; i < sourceKeys.length; i++) {23 key = sourceKeys[i];24 if (excluded.indexOf(key) >= 0) continue;25 target[key] = source[key];26 }27 return target;28}29var build = {};30var ansiStyles = {exports: {}};31(function (module) {32const ANSI_BACKGROUND_OFFSET = 10;33const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;34const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;35function assembleStyles() {36 const codes = new Map();37 const styles = {38 modifier: {39 reset: [0, 0],40 // 21 isn't widely supported and 22 does the same thing41 bold: [1, 22],42 dim: [2, 22],43 italic: [3, 23],44 underline: [4, 24],45 overline: [53, 55],46 inverse: [7, 27],47 hidden: [8, 28],48 strikethrough: [9, 29]49 },50 color: {51 black: [30, 39],52 red: [31, 39],53 green: [32, 39],54 yellow: [33, 39],55 blue: [34, 39],56 magenta: [35, 39],57 cyan: [36, 39],58 white: [37, 39],59 // Bright color60 blackBright: [90, 39],61 redBright: [91, 39],62 greenBright: [92, 39],63 yellowBright: [93, 39],64 blueBright: [94, 39],65 magentaBright: [95, 39],66 cyanBright: [96, 39],67 whiteBright: [97, 39]68 },69 bgColor: {70 bgBlack: [40, 49],71 bgRed: [41, 49],72 bgGreen: [42, 49],73 bgYellow: [43, 49],74 bgBlue: [44, 49],75 bgMagenta: [45, 49],76 bgCyan: [46, 49],77 bgWhite: [47, 49],78 // Bright color79 bgBlackBright: [100, 49],80 bgRedBright: [101, 49],81 bgGreenBright: [102, 49],82 bgYellowBright: [103, 49],83 bgBlueBright: [104, 49],84 bgMagentaBright: [105, 49],85 bgCyanBright: [106, 49],86 bgWhiteBright: [107, 49]87 }88 };89 // Alias bright black as gray (and grey)90 styles.color.gray = styles.color.blackBright;91 styles.bgColor.bgGray = styles.bgColor.bgBlackBright;92 styles.color.grey = styles.color.blackBright;93 styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;94 for (const [groupName, group] of Object.entries(styles)) {95 for (const [styleName, style] of Object.entries(group)) {96 styles[styleName] = {97 open: `\u001B[${style[0]}m`,98 close: `\u001B[${style[1]}m`99 };100 group[styleName] = styles[styleName];101 codes.set(style[0], style[1]);102 }103 Object.defineProperty(styles, groupName, {104 value: group,105 enumerable: false106 });107 }108 Object.defineProperty(styles, 'codes', {109 value: codes,110 enumerable: false111 });112 styles.color.close = '\u001B[39m';113 styles.bgColor.close = '\u001B[49m';114 styles.color.ansi256 = wrapAnsi256();115 styles.color.ansi16m = wrapAnsi16m();116 styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);117 styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);118 // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js119 Object.defineProperties(styles, {120 rgbToAnsi256: {121 value: (red, green, blue) => {122 // We use the extended greyscale palette here, with the exception of123 // black and white. normal palette only has 4 greyscale shades.124 if (red === green && green === blue) {125 if (red < 8) {126 return 16;127 }128 if (red > 248) {129 return 231;130 }131 return Math.round(((red - 8) / 247) * 24) + 232;132 }133 return 16 +134 (36 * Math.round(red / 255 * 5)) +135 (6 * Math.round(green / 255 * 5)) +136 Math.round(blue / 255 * 5);137 },138 enumerable: false139 },140 hexToRgb: {141 value: hex => {142 const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));143 if (!matches) {144 return [0, 0, 0];145 }146 let {colorString} = matches.groups;147 if (colorString.length === 3) {148 colorString = colorString.split('').map(character => character + character).join('');149 }150 const integer = Number.parseInt(colorString, 16);151 return [152 (integer >> 16) & 0xFF,153 (integer >> 8) & 0xFF,154 integer & 0xFF155 ];156 },157 enumerable: false158 },159 hexToAnsi256: {160 value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),161 enumerable: false162 }163 });164 return styles;165}166// Make the export immutable167Object.defineProperty(module, 'exports', {168 enumerable: true,169 get: assembleStyles170});171}(ansiStyles));172var collections = {};173Object.defineProperty(collections, '__esModule', {174 value: true175});176collections.printIteratorEntries = printIteratorEntries;177collections.printIteratorValues = printIteratorValues;178collections.printListItems = printListItems;179collections.printObjectProperties = printObjectProperties;180/**181 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.182 *183 * This source code is licensed under the MIT license found in the184 * LICENSE file in the root directory of this source tree.185 *186 */187const getKeysOfEnumerableProperties = (object, compareKeys) => {188 const keys = Object.keys(object).sort(compareKeys);189 if (Object.getOwnPropertySymbols) {190 Object.getOwnPropertySymbols(object).forEach(symbol => {191 if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) {192 keys.push(symbol);193 }194 });195 }196 return keys;197};198/**199 * Return entries (for example, of a map)200 * with spacing, indentation, and comma201 * without surrounding punctuation (for example, braces)202 */203function printIteratorEntries(204 iterator,205 config,206 indentation,207 depth,208 refs,209 printer, // Too bad, so sad that separator for ECMAScript Map has been ' => '210 // What a distracting diff if you change a data structure to/from211 // ECMAScript Object or Immutable.Map/OrderedMap which use the default.212 separator = ': '213) {214 let result = '';215 let current = iterator.next();216 if (!current.done) {217 result += config.spacingOuter;218 const indentationNext = indentation + config.indent;219 while (!current.done) {220 const name = printer(221 current.value[0],222 config,223 indentationNext,224 depth,225 refs226 );227 const value = printer(228 current.value[1],229 config,230 indentationNext,231 depth,232 refs233 );234 result += indentationNext + name + separator + value;235 current = iterator.next();236 if (!current.done) {237 result += ',' + config.spacingInner;238 } else if (!config.min) {239 result += ',';240 }241 }242 result += config.spacingOuter + indentation;243 }244 return result;245}246/**247 * Return values (for example, of a set)248 * with spacing, indentation, and comma249 * without surrounding punctuation (braces or brackets)250 */251function printIteratorValues(252 iterator,253 config,254 indentation,255 depth,256 refs,257 printer258) {259 let result = '';260 let current = iterator.next();261 if (!current.done) {262 result += config.spacingOuter;263 const indentationNext = indentation + config.indent;264 while (!current.done) {265 result +=266 indentationNext +267 printer(current.value, config, indentationNext, depth, refs);268 current = iterator.next();269 if (!current.done) {270 result += ',' + config.spacingInner;271 } else if (!config.min) {272 result += ',';273 }274 }275 result += config.spacingOuter + indentation;276 }277 return result;278}279/**280 * Return items (for example, of an array)281 * with spacing, indentation, and comma282 * without surrounding punctuation (for example, brackets)283 **/284function printListItems(list, config, indentation, depth, refs, printer) {285 let result = '';286 if (list.length) {287 result += config.spacingOuter;288 const indentationNext = indentation + config.indent;289 for (let i = 0; i < list.length; i++) {290 result += indentationNext;291 if (i in list) {292 result += printer(list[i], config, indentationNext, depth, refs);293 }294 if (i < list.length - 1) {295 result += ',' + config.spacingInner;296 } else if (!config.min) {297 result += ',';298 }299 }300 result += config.spacingOuter + indentation;301 }302 return result;303}304/**305 * Return properties of an object306 * with spacing, indentation, and comma307 * without surrounding punctuation (for example, braces)308 */309function printObjectProperties(val, config, indentation, depth, refs, printer) {310 let result = '';311 const keys = getKeysOfEnumerableProperties(val, config.compareKeys);312 if (keys.length) {313 result += config.spacingOuter;314 const indentationNext = indentation + config.indent;315 for (let i = 0; i < keys.length; i++) {316 const key = keys[i];317 const name = printer(key, config, indentationNext, depth, refs);318 const value = printer(val[key], config, indentationNext, depth, refs);319 result += indentationNext + name + ': ' + value;320 if (i < keys.length - 1) {321 result += ',' + config.spacingInner;322 } else if (!config.min) {323 result += ',';324 }325 }326 result += config.spacingOuter + indentation;327 }328 return result;329}330var AsymmetricMatcher = {};331Object.defineProperty(AsymmetricMatcher, '__esModule', {332 value: true333});334AsymmetricMatcher.test = AsymmetricMatcher.serialize = AsymmetricMatcher.default = void 0;335var _collections$3 = collections;336var global$1 = (function () {337 if (typeof globalThis !== 'undefined') {338 return globalThis;339 } else if (typeof global$1 !== 'undefined') {340 return global$1;341 } else if (typeof self !== 'undefined') {342 return self;343 } else if (typeof window !== 'undefined') {344 return window;345 } else {346 return Function('return this')();347 }348})();349var Symbol$2 = global$1['jest-symbol-do-not-touch'] || global$1.Symbol;350const asymmetricMatcher =351 typeof Symbol$2 === 'function' && Symbol$2.for352 ? Symbol$2.for('jest.asymmetricMatcher')353 : 0x1357a5;354const SPACE$2 = ' ';355const serialize$6 = (val, config, indentation, depth, refs, printer) => {356 const stringedValue = val.toString();357 if (358 stringedValue === 'ArrayContaining' ||359 stringedValue === 'ArrayNotContaining'360 ) {361 if (++depth > config.maxDepth) {362 return '[' + stringedValue + ']';363 }364 return (365 stringedValue +366 SPACE$2 +367 '[' +368 (0, _collections$3.printListItems)(369 val.sample,370 config,371 indentation,372 depth,373 refs,374 printer375 ) +376 ']'377 );378 }379 if (380 stringedValue === 'ObjectContaining' ||381 stringedValue === 'ObjectNotContaining'382 ) {383 if (++depth > config.maxDepth) {384 return '[' + stringedValue + ']';385 }386 return (387 stringedValue +388 SPACE$2 +389 '{' +390 (0, _collections$3.printObjectProperties)(391 val.sample,392 config,393 indentation,394 depth,395 refs,396 printer397 ) +398 '}'399 );400 }401 if (402 stringedValue === 'StringMatching' ||403 stringedValue === 'StringNotMatching'404 ) {405 return (406 stringedValue +407 SPACE$2 +408 printer(val.sample, config, indentation, depth, refs)409 );410 }411 if (412 stringedValue === 'StringContaining' ||413 stringedValue === 'StringNotContaining'414 ) {415 return (416 stringedValue +417 SPACE$2 +418 printer(val.sample, config, indentation, depth, refs)419 );420 }421 return val.toAsymmetricMatcher();422};423AsymmetricMatcher.serialize = serialize$6;424const test$6 = val => val && val.$$typeof === asymmetricMatcher;425AsymmetricMatcher.test = test$6;426const plugin$6 = {427 serialize: serialize$6,428 test: test$6429};430var _default$2k = plugin$6;431AsymmetricMatcher.default = _default$2k;432var ConvertAnsi = {};433var ansiRegex = ({onlyFirst = false} = {}) => {434 const pattern = [435 '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',436 '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'437 ].join('|');438 return new RegExp(pattern, onlyFirst ? undefined : 'g');439};440Object.defineProperty(ConvertAnsi, '__esModule', {441 value: true442});443ConvertAnsi.test = ConvertAnsi.serialize = ConvertAnsi.default = void 0;444var _ansiRegex = _interopRequireDefault$9(ansiRegex);445var _ansiStyles$1 = _interopRequireDefault$9(ansiStyles.exports);446function _interopRequireDefault$9(obj) {447 return obj && obj.__esModule ? obj : {default: obj};448}449/**450 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.451 *452 * This source code is licensed under the MIT license found in the453 * LICENSE file in the root directory of this source tree.454 */455const toHumanReadableAnsi = text =>456 text.replace((0, _ansiRegex.default)(), match => {457 switch (match) {458 case _ansiStyles$1.default.red.close:459 case _ansiStyles$1.default.green.close:460 case _ansiStyles$1.default.cyan.close:461 case _ansiStyles$1.default.gray.close:462 case _ansiStyles$1.default.white.close:463 case _ansiStyles$1.default.yellow.close:464 case _ansiStyles$1.default.bgRed.close:465 case _ansiStyles$1.default.bgGreen.close:466 case _ansiStyles$1.default.bgYellow.close:467 case _ansiStyles$1.default.inverse.close:468 case _ansiStyles$1.default.dim.close:469 case _ansiStyles$1.default.bold.close:470 case _ansiStyles$1.default.reset.open:471 case _ansiStyles$1.default.reset.close:472 return '</>';473 case _ansiStyles$1.default.red.open:474 return '<red>';475 case _ansiStyles$1.default.green.open:476 return '<green>';477 case _ansiStyles$1.default.cyan.open:478 return '<cyan>';479 case _ansiStyles$1.default.gray.open:480 return '<gray>';481 case _ansiStyles$1.default.white.open:482 return '<white>';483 case _ansiStyles$1.default.yellow.open:484 return '<yellow>';485 case _ansiStyles$1.default.bgRed.open:486 return '<bgRed>';487 case _ansiStyles$1.default.bgGreen.open:488 return '<bgGreen>';489 case _ansiStyles$1.default.bgYellow.open:490 return '<bgYellow>';491 case _ansiStyles$1.default.inverse.open:492 return '<inverse>';493 case _ansiStyles$1.default.dim.open:494 return '<dim>';495 case _ansiStyles$1.default.bold.open:496 return '<bold>';497 default:498 return '';499 }500 });501const test$5 = val =>502 typeof val === 'string' && !!val.match((0, _ansiRegex.default)());503ConvertAnsi.test = test$5;504const serialize$5 = (val, config, indentation, depth, refs, printer) =>505 printer(toHumanReadableAnsi(val), config, indentation, depth, refs);506ConvertAnsi.serialize = serialize$5;507const plugin$5 = {508 serialize: serialize$5,509 test: test$5510};511var _default$2j = plugin$5;512ConvertAnsi.default = _default$2j;513var DOMCollection$1 = {};514Object.defineProperty(DOMCollection$1, '__esModule', {515 value: true516});517DOMCollection$1.test = DOMCollection$1.serialize = DOMCollection$1.default = void 0;518var _collections$2 = collections;519/**520 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.521 *522 * This source code is licensed under the MIT license found in the523 * LICENSE file in the root directory of this source tree.524 */525/* eslint-disable local/ban-types-eventually */526const SPACE$1 = ' ';527const OBJECT_NAMES = ['DOMStringMap', 'NamedNodeMap'];528const ARRAY_REGEXP = /^(HTML\w*Collection|NodeList)$/;529const testName = name =>530 OBJECT_NAMES.indexOf(name) !== -1 || ARRAY_REGEXP.test(name);531const test$4 = val =>532 val &&533 val.constructor &&534 !!val.constructor.name &&535 testName(val.constructor.name);536DOMCollection$1.test = test$4;537const isNamedNodeMap = collection =>538 collection.constructor.name === 'NamedNodeMap';539const serialize$4 = (collection, config, indentation, depth, refs, printer) => {540 const name = collection.constructor.name;541 if (++depth > config.maxDepth) {542 return '[' + name + ']';543 }544 return (545 (config.min ? '' : name + SPACE$1) +546 (OBJECT_NAMES.indexOf(name) !== -1547 ? '{' +548 (0, _collections$2.printObjectProperties)(549 isNamedNodeMap(collection)550 ? Array.from(collection).reduce((props, attribute) => {551 props[attribute.name] = attribute.value;552 return props;553 }, {})554 : {...collection},555 config,556 indentation,557 depth,558 refs,559 printer560 ) +561 '}'562 : '[' +563 (0, _collections$2.printListItems)(564 Array.from(collection),565 config,566 indentation,567 depth,568 refs,569 printer570 ) +571 ']')572 );573};574DOMCollection$1.serialize = serialize$4;575const plugin$4 = {576 serialize: serialize$4,577 test: test$4578};579var _default$2i = plugin$4;580DOMCollection$1.default = _default$2i;581var DOMElement = {};582var markup = {};583var escapeHTML$2 = {};584Object.defineProperty(escapeHTML$2, '__esModule', {585 value: true586});587escapeHTML$2.default = escapeHTML$1;588/**589 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.590 *591 * This source code is licensed under the MIT license found in the592 * LICENSE file in the root directory of this source tree.593 */594function escapeHTML$1(str) {595 return str.replace(/</g, '&lt;').replace(/>/g, '&gt;');596}597Object.defineProperty(markup, '__esModule', {598 value: true599});600markup.printText =601 markup.printProps =602 markup.printElementAsLeaf =603 markup.printElement =604 markup.printComment =605 markup.printChildren =606 void 0;607var _escapeHTML = _interopRequireDefault$8(escapeHTML$2);608function _interopRequireDefault$8(obj) {609 return obj && obj.__esModule ? obj : {default: obj};610}611/**612 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.613 *614 * This source code is licensed under the MIT license found in the615 * LICENSE file in the root directory of this source tree.616 */617// Return empty string if keys is empty.618const printProps$1 = (keys, props, config, indentation, depth, refs, printer) => {619 const indentationNext = indentation + config.indent;620 const colors = config.colors;621 return keys622 .map(key => {623 const value = props[key];624 let printed = printer(value, config, indentationNext, depth, refs);625 if (typeof value !== 'string') {626 if (printed.indexOf('\n') !== -1) {627 printed =628 config.spacingOuter +629 indentationNext +630 printed +631 config.spacingOuter +632 indentation;633 }634 printed = '{' + printed + '}';635 }636 return (637 config.spacingInner +638 indentation +639 colors.prop.open +640 key +641 colors.prop.close +642 '=' +643 colors.value.open +644 printed +645 colors.value.close646 );647 })648 .join('');649}; // Return empty string if children is empty.650markup.printProps = printProps$1;651const printChildren$1 = (children, config, indentation, depth, refs, printer) =>652 children653 .map(654 child =>655 config.spacingOuter +656 indentation +657 (typeof child === 'string'658 ? printText$1(child, config)659 : printer(child, config, indentation, depth, refs))660 )661 .join('');662markup.printChildren = printChildren$1;663const printText$1 = (text, config) => {664 const contentColor = config.colors.content;665 return (666 contentColor.open + (0, _escapeHTML.default)(text) + contentColor.close667 );668};669markup.printText = printText$1;670const printComment$1 = (comment, config) => {671 const commentColor = config.colors.comment;672 return (673 commentColor.open +674 '<!--' +675 (0, _escapeHTML.default)(comment) +676 '-->' +677 commentColor.close678 );679}; // Separate the functions to format props, children, and element,680// so a plugin could override a particular function, if needed.681// Too bad, so sad: the traditional (but unnecessary) space682// in a self-closing tagColor requires a second test of printedProps.683markup.printComment = printComment$1;684const printElement$1 = (685 type,686 printedProps,687 printedChildren,688 config,689 indentation690) => {691 const tagColor = config.colors.tag;692 return (693 tagColor.open +694 '<' +695 type +696 (printedProps &&697 tagColor.close +698 printedProps +699 config.spacingOuter +700 indentation +701 tagColor.open) +702 (printedChildren703 ? '>' +704 tagColor.close +705 printedChildren +706 config.spacingOuter +707 indentation +708 tagColor.open +709 '</' +710 type711 : (printedProps && !config.min ? '' : ' ') + '/') +712 '>' +713 tagColor.close714 );715};716markup.printElement = printElement$1;717const printElementAsLeaf$1 = (type, config) => {718 const tagColor = config.colors.tag;719 return (720 tagColor.open +721 '<' +722 type +723 tagColor.close +724 ' …' +725 tagColor.open +726 ' />' +727 tagColor.close728 );729};730markup.printElementAsLeaf = printElementAsLeaf$1;731Object.defineProperty(DOMElement, '__esModule', {732 value: true733});734DOMElement.test = DOMElement.serialize = DOMElement.default = void 0;735var _markup$2 = markup;736/**737 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.738 *739 * This source code is licensed under the MIT license found in the740 * LICENSE file in the root directory of this source tree.741 */742const ELEMENT_NODE$2 = 1;743const TEXT_NODE$2 = 3;744const COMMENT_NODE$2 = 8;745const FRAGMENT_NODE$1 = 11;746const ELEMENT_REGEXP$1 = /^((HTML|SVG)\w*)?Element$/;747const testHasAttribute = val => {748 try {749 return typeof val.hasAttribute === 'function' && val.hasAttribute('is');750 } catch {751 return false;752 }753};754const testNode$1 = val => {755 const constructorName = val.constructor.name;756 const {nodeType, tagName} = val;757 const isCustomElement =758 (typeof tagName === 'string' && tagName.includes('-')) ||759 testHasAttribute(val);760 return (761 (nodeType === ELEMENT_NODE$2 &&762 (ELEMENT_REGEXP$1.test(constructorName) || isCustomElement)) ||763 (nodeType === TEXT_NODE$2 && constructorName === 'Text') ||764 (nodeType === COMMENT_NODE$2 && constructorName === 'Comment') ||765 (nodeType === FRAGMENT_NODE$1 && constructorName === 'DocumentFragment')766 );767};768const test$3 = val => {769 var _val$constructor;770 return (771 (val === null || val === void 0772 ? void 0773 : (_val$constructor = val.constructor) === null ||774 _val$constructor === void 0775 ? void 0776 : _val$constructor.name) && testNode$1(val)777 );778};779DOMElement.test = test$3;780function nodeIsText$1(node) {781 return node.nodeType === TEXT_NODE$2;782}783function nodeIsComment$1(node) {784 return node.nodeType === COMMENT_NODE$2;785}786function nodeIsFragment$1(node) {787 return node.nodeType === FRAGMENT_NODE$1;788}789const serialize$3 = (node, config, indentation, depth, refs, printer) => {790 if (nodeIsText$1(node)) {791 return (0, _markup$2.printText)(node.data, config);792 }793 if (nodeIsComment$1(node)) {794 return (0, _markup$2.printComment)(node.data, config);795 }796 const type = nodeIsFragment$1(node)797 ? 'DocumentFragment'798 : node.tagName.toLowerCase();799 if (++depth > config.maxDepth) {800 return (0, _markup$2.printElementAsLeaf)(type, config);801 }802 return (0, _markup$2.printElement)(803 type,804 (0, _markup$2.printProps)(805 nodeIsFragment$1(node)806 ? []807 : Array.from(node.attributes)808 .map(attr => attr.name)809 .sort(),810 nodeIsFragment$1(node)811 ? {}812 : Array.from(node.attributes).reduce((props, attribute) => {813 props[attribute.name] = attribute.value;814 return props;815 }, {}),816 config,817 indentation + config.indent,818 depth,819 refs,820 printer821 ),822 (0, _markup$2.printChildren)(823 Array.prototype.slice.call(node.childNodes || node.children),824 config,825 indentation + config.indent,826 depth,827 refs,828 printer829 ),830 config,831 indentation832 );833};834DOMElement.serialize = serialize$3;835const plugin$3 = {836 serialize: serialize$3,837 test: test$3838};839var _default$2h = plugin$3;840DOMElement.default = _default$2h;841var Immutable = {};842Object.defineProperty(Immutable, '__esModule', {843 value: true844});845Immutable.test = Immutable.serialize = Immutable.default = void 0;846var _collections$1 = collections;847/**848 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.849 *850 * This source code is licensed under the MIT license found in the851 * LICENSE file in the root directory of this source tree.852 */853// SENTINEL constants are from https://github.com/facebook/immutable-js854const IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';855const IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';856const IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';857const IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';858const IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';859const IS_RECORD_SENTINEL = '@@__IMMUTABLE_RECORD__@@'; // immutable v4860const IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';861const IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';862const IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';863const getImmutableName = name => 'Immutable.' + name;864const printAsLeaf = name => '[' + name + ']';865const SPACE = ' ';866const LAZY = '…'; // Seq is lazy if it calls a method like filter867const printImmutableEntries = (868 val,869 config,870 indentation,871 depth,872 refs,873 printer,874 type875) =>876 ++depth > config.maxDepth877 ? printAsLeaf(getImmutableName(type))878 : getImmutableName(type) +879 SPACE +880 '{' +881 (0, _collections$1.printIteratorEntries)(882 val.entries(),883 config,884 indentation,885 depth,886 refs,887 printer888 ) +889 '}'; // Record has an entries method because it is a collection in immutable v3.890// Return an iterator for Immutable Record from version v3 or v4.891function getRecordEntries(val) {892 let i = 0;893 return {894 next() {895 if (i < val._keys.length) {896 const key = val._keys[i++];897 return {898 done: false,899 value: [key, val.get(key)]900 };901 }902 return {903 done: true,904 value: undefined905 };906 }907 };908}909const printImmutableRecord = (910 val,911 config,912 indentation,913 depth,914 refs,915 printer916) => {917 // _name property is defined only for an Immutable Record instance918 // which was constructed with a second optional descriptive name arg919 const name = getImmutableName(val._name || 'Record');920 return ++depth > config.maxDepth921 ? printAsLeaf(name)922 : name +923 SPACE +924 '{' +925 (0, _collections$1.printIteratorEntries)(926 getRecordEntries(val),927 config,928 indentation,929 depth,930 refs,931 printer932 ) +933 '}';934};935const printImmutableSeq = (val, config, indentation, depth, refs, printer) => {936 const name = getImmutableName('Seq');937 if (++depth > config.maxDepth) {938 return printAsLeaf(name);939 }940 if (val[IS_KEYED_SENTINEL]) {941 return (942 name +943 SPACE +944 '{' + // from Immutable collection of entries or from ECMAScript object945 (val._iter || val._object946 ? (0, _collections$1.printIteratorEntries)(947 val.entries(),948 config,949 indentation,950 depth,951 refs,952 printer953 )954 : LAZY) +955 '}'956 );957 }958 return (959 name +960 SPACE +961 '[' +962 (val._iter || // from Immutable collection of values963 val._array || // from ECMAScript array964 val._collection || // from ECMAScript collection in immutable v4965 val._iterable // from ECMAScript collection in immutable v3966 ? (0, _collections$1.printIteratorValues)(967 val.values(),968 config,969 indentation,970 depth,971 refs,972 printer973 )974 : LAZY) +975 ']'976 );977};978const printImmutableValues = (979 val,980 config,981 indentation,982 depth,983 refs,984 printer,985 type986) =>987 ++depth > config.maxDepth988 ? printAsLeaf(getImmutableName(type))989 : getImmutableName(type) +990 SPACE +991 '[' +992 (0, _collections$1.printIteratorValues)(993 val.values(),994 config,995 indentation,996 depth,997 refs,998 printer999 ) +1000 ']';1001const serialize$2 = (val, config, indentation, depth, refs, printer) => {1002 if (val[IS_MAP_SENTINEL]) {1003 return printImmutableEntries(1004 val,1005 config,1006 indentation,1007 depth,1008 refs,1009 printer,1010 val[IS_ORDERED_SENTINEL] ? 'OrderedMap' : 'Map'1011 );1012 }1013 if (val[IS_LIST_SENTINEL]) {1014 return printImmutableValues(1015 val,1016 config,1017 indentation,1018 depth,1019 refs,1020 printer,1021 'List'1022 );1023 }1024 if (val[IS_SET_SENTINEL]) {1025 return printImmutableValues(1026 val,1027 config,1028 indentation,1029 depth,1030 refs,1031 printer,1032 val[IS_ORDERED_SENTINEL] ? 'OrderedSet' : 'Set'1033 );1034 }1035 if (val[IS_STACK_SENTINEL]) {1036 return printImmutableValues(1037 val,1038 config,1039 indentation,1040 depth,1041 refs,1042 printer,1043 'Stack'1044 );1045 }1046 if (val[IS_SEQ_SENTINEL]) {1047 return printImmutableSeq(val, config, indentation, depth, refs, printer);1048 } // For compatibility with immutable v3 and v4, let record be the default.1049 return printImmutableRecord(val, config, indentation, depth, refs, printer);1050}; // Explicitly comparing sentinel properties to true avoids false positive1051// when mock identity-obj-proxy returns the key as the value for any key.1052Immutable.serialize = serialize$2;1053const test$2 = val =>1054 val &&1055 (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);1056Immutable.test = test$2;1057const plugin$2 = {1058 serialize: serialize$2,1059 test: test$21060};1061var _default$2g = plugin$2;1062Immutable.default = _default$2g;1063var ReactElement = {};1064var reactIs = {exports: {}};1065var reactIs_production_min = {};1066/** @license React v17.0.21067 * react-is.production.min.js1068 *1069 * Copyright (c) Facebook, Inc. and its affiliates.1070 *1071 * This source code is licensed under the MIT license found in the1072 * LICENSE file in the root directory of this source tree.1073 */1074var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k$1=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;1075if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k$1=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}1076function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k$1:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k$1,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H;1077reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return y(a)===h};reactIs_production_min.isContextProvider=function(a){return y(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return y(a)===k$1};reactIs_production_min.isFragment=function(a){return y(a)===d};reactIs_production_min.isLazy=function(a){return y(a)===p};reactIs_production_min.isMemo=function(a){return y(a)===n};1078reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k$1||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};1079reactIs_production_min.typeOf=y;1080var reactIs_development = {};1081/** @license React v17.0.21082 * react-is.development.js1083 *1084 * Copyright (c) Facebook, Inc. and its affiliates.1085 *1086 * This source code is licensed under the MIT license found in the1087 * LICENSE file in the root directory of this source tree.1088 */1089if (process.env.NODE_ENV !== "production") {1090 (function() {1091// ATTENTION1092// When adding new symbols to this file,1093// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'1094// The Symbol used to tag the ReactElement-like types. If there is no native Symbol1095// nor polyfill, then a plain number is used for performance.1096var REACT_ELEMENT_TYPE = 0xeac7;1097var REACT_PORTAL_TYPE = 0xeaca;1098var REACT_FRAGMENT_TYPE = 0xeacb;1099var REACT_STRICT_MODE_TYPE = 0xeacc;1100var REACT_PROFILER_TYPE = 0xead2;1101var REACT_PROVIDER_TYPE = 0xeacd;1102var REACT_CONTEXT_TYPE = 0xeace;1103var REACT_FORWARD_REF_TYPE = 0xead0;1104var REACT_SUSPENSE_TYPE = 0xead1;1105var REACT_SUSPENSE_LIST_TYPE = 0xead8;1106var REACT_MEMO_TYPE = 0xead3;1107var REACT_LAZY_TYPE = 0xead4;1108var REACT_BLOCK_TYPE = 0xead9;1109var REACT_SERVER_BLOCK_TYPE = 0xeada;1110var REACT_FUNDAMENTAL_TYPE = 0xead5;1111var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;1112var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;1113if (typeof Symbol === 'function' && Symbol.for) {1114 var symbolFor = Symbol.for;1115 REACT_ELEMENT_TYPE = symbolFor('react.element');1116 REACT_PORTAL_TYPE = symbolFor('react.portal');1117 REACT_FRAGMENT_TYPE = symbolFor('react.fragment');1118 REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');1119 REACT_PROFILER_TYPE = symbolFor('react.profiler');1120 REACT_PROVIDER_TYPE = symbolFor('react.provider');1121 REACT_CONTEXT_TYPE = symbolFor('react.context');1122 REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');1123 REACT_SUSPENSE_TYPE = symbolFor('react.suspense');1124 REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');1125 REACT_MEMO_TYPE = symbolFor('react.memo');1126 REACT_LAZY_TYPE = symbolFor('react.lazy');1127 REACT_BLOCK_TYPE = symbolFor('react.block');1128 REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');1129 REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');1130 symbolFor('react.scope');1131 symbolFor('react.opaque.id');1132 REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');1133 symbolFor('react.offscreen');1134 REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');1135}1136// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.1137var enableScopeAPI = false; // Experimental Create Event Handle API.1138function isValidElementType(type) {1139 if (typeof type === 'string' || typeof type === 'function') {1140 return true;1141 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).1142 if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {1143 return true;1144 }1145 if (typeof type === 'object' && type !== null) {1146 if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {1147 return true;1148 }1149 }1150 return false;1151}1152function typeOf(object) {1153 if (typeof object === 'object' && object !== null) {1154 var $$typeof = object.$$typeof;1155 switch ($$typeof) {1156 case REACT_ELEMENT_TYPE:1157 var type = object.type;1158 switch (type) {1159 case REACT_FRAGMENT_TYPE:1160 case REACT_PROFILER_TYPE:1161 case REACT_STRICT_MODE_TYPE:1162 case REACT_SUSPENSE_TYPE:1163 case REACT_SUSPENSE_LIST_TYPE:1164 return type;1165 default:1166 var $$typeofType = type && type.$$typeof;1167 switch ($$typeofType) {1168 case REACT_CONTEXT_TYPE:1169 case REACT_FORWARD_REF_TYPE:1170 case REACT_LAZY_TYPE:1171 case REACT_MEMO_TYPE:1172 case REACT_PROVIDER_TYPE:1173 return $$typeofType;1174 default:1175 return $$typeof;1176 }1177 }1178 case REACT_PORTAL_TYPE:1179 return $$typeof;1180 }1181 }1182 return undefined;1183}1184var ContextConsumer = REACT_CONTEXT_TYPE;1185var ContextProvider = REACT_PROVIDER_TYPE;1186var Element = REACT_ELEMENT_TYPE;1187var ForwardRef = REACT_FORWARD_REF_TYPE;1188var Fragment = REACT_FRAGMENT_TYPE;1189var Lazy = REACT_LAZY_TYPE;1190var Memo = REACT_MEMO_TYPE;1191var Portal = REACT_PORTAL_TYPE;1192var Profiler = REACT_PROFILER_TYPE;1193var StrictMode = REACT_STRICT_MODE_TYPE;1194var Suspense = REACT_SUSPENSE_TYPE;1195var hasWarnedAboutDeprecatedIsAsyncMode = false;1196var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated1197function isAsyncMode(object) {1198 {1199 if (!hasWarnedAboutDeprecatedIsAsyncMode) {1200 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint1201 console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');1202 }1203 }1204 return false;1205}1206function isConcurrentMode(object) {1207 {1208 if (!hasWarnedAboutDeprecatedIsConcurrentMode) {1209 hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint1210 console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');1211 }1212 }1213 return false;1214}1215function isContextConsumer(object) {1216 return typeOf(object) === REACT_CONTEXT_TYPE;1217}1218function isContextProvider(object) {1219 return typeOf(object) === REACT_PROVIDER_TYPE;1220}1221function isElement(object) {1222 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;1223}1224function isForwardRef(object) {1225 return typeOf(object) === REACT_FORWARD_REF_TYPE;1226}1227function isFragment(object) {1228 return typeOf(object) === REACT_FRAGMENT_TYPE;1229}1230function isLazy(object) {1231 return typeOf(object) === REACT_LAZY_TYPE;1232}1233function isMemo(object) {1234 return typeOf(object) === REACT_MEMO_TYPE;1235}1236function isPortal(object) {1237 return typeOf(object) === REACT_PORTAL_TYPE;1238}1239function isProfiler(object) {1240 return typeOf(object) === REACT_PROFILER_TYPE;1241}1242function isStrictMode(object) {1243 return typeOf(object) === REACT_STRICT_MODE_TYPE;1244}1245function isSuspense(object) {1246 return typeOf(object) === REACT_SUSPENSE_TYPE;1247}1248reactIs_development.ContextConsumer = ContextConsumer;1249reactIs_development.ContextProvider = ContextProvider;1250reactIs_development.Element = Element;1251reactIs_development.ForwardRef = ForwardRef;1252reactIs_development.Fragment = Fragment;1253reactIs_development.Lazy = Lazy;1254reactIs_development.Memo = Memo;1255reactIs_development.Portal = Portal;1256reactIs_development.Profiler = Profiler;1257reactIs_development.StrictMode = StrictMode;1258reactIs_development.Suspense = Suspense;1259reactIs_development.isAsyncMode = isAsyncMode;1260reactIs_development.isConcurrentMode = isConcurrentMode;1261reactIs_development.isContextConsumer = isContextConsumer;1262reactIs_development.isContextProvider = isContextProvider;1263reactIs_development.isElement = isElement;1264reactIs_development.isForwardRef = isForwardRef;1265reactIs_development.isFragment = isFragment;1266reactIs_development.isLazy = isLazy;1267reactIs_development.isMemo = isMemo;1268reactIs_development.isPortal = isPortal;1269reactIs_development.isProfiler = isProfiler;1270reactIs_development.isStrictMode = isStrictMode;1271reactIs_development.isSuspense = isSuspense;1272reactIs_development.isValidElementType = isValidElementType;1273reactIs_development.typeOf = typeOf;1274 })();1275}1276if (process.env.NODE_ENV === 'production') {1277 reactIs.exports = reactIs_production_min;1278} else {1279 reactIs.exports = reactIs_development;1280}1281Object.defineProperty(ReactElement, '__esModule', {1282 value: true1283});1284ReactElement.test = ReactElement.serialize = ReactElement.default = void 0;1285var ReactIs = _interopRequireWildcard(reactIs.exports);1286var _markup$1 = markup;1287function _getRequireWildcardCache(nodeInterop) {1288 if (typeof WeakMap !== 'function') return null;1289 var cacheBabelInterop = new WeakMap();1290 var cacheNodeInterop = new WeakMap();1291 return (_getRequireWildcardCache = function (nodeInterop) {1292 return nodeInterop ? cacheNodeInterop : cacheBabelInterop;1293 })(nodeInterop);1294}1295function _interopRequireWildcard(obj, nodeInterop) {1296 if (!nodeInterop && obj && obj.__esModule) {1297 return obj;1298 }1299 if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {1300 return {default: obj};1301 }1302 var cache = _getRequireWildcardCache(nodeInterop);1303 if (cache && cache.has(obj)) {1304 return cache.get(obj);1305 }1306 var newObj = {};1307 var hasPropertyDescriptor =1308 Object.defineProperty && Object.getOwnPropertyDescriptor;1309 for (var key in obj) {1310 if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) {1311 var desc = hasPropertyDescriptor1312 ? Object.getOwnPropertyDescriptor(obj, key)1313 : null;1314 if (desc && (desc.get || desc.set)) {1315 Object.defineProperty(newObj, key, desc);1316 } else {1317 newObj[key] = obj[key];1318 }1319 }1320 }1321 newObj.default = obj;1322 if (cache) {1323 cache.set(obj, newObj);1324 }1325 return newObj;1326}1327/**1328 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.1329 *1330 * This source code is licensed under the MIT license found in the1331 * LICENSE file in the root directory of this source tree.1332 */1333// Given element.props.children, or subtree during recursive traversal,1334// return flattened array of children.1335const getChildren = (arg, children = []) => {1336 if (Array.isArray(arg)) {1337 arg.forEach(item => {1338 getChildren(item, children);1339 });1340 } else if (arg != null && arg !== false) {1341 children.push(arg);1342 }1343 return children;1344};1345const getType = element => {1346 const type = element.type;1347 if (typeof type === 'string') {1348 return type;1349 }1350 if (typeof type === 'function') {1351 return type.displayName || type.name || 'Unknown';1352 }1353 if (ReactIs.isFragment(element)) {1354 return 'React.Fragment';1355 }1356 if (ReactIs.isSuspense(element)) {1357 return 'React.Suspense';1358 }1359 if (typeof type === 'object' && type !== null) {1360 if (ReactIs.isContextProvider(element)) {1361 return 'Context.Provider';1362 }1363 if (ReactIs.isContextConsumer(element)) {1364 return 'Context.Consumer';1365 }1366 if (ReactIs.isForwardRef(element)) {1367 if (type.displayName) {1368 return type.displayName;1369 }1370 const functionName = type.render.displayName || type.render.name || '';1371 return functionName !== ''1372 ? 'ForwardRef(' + functionName + ')'1373 : 'ForwardRef';1374 }1375 if (ReactIs.isMemo(element)) {1376 const functionName =1377 type.displayName || type.type.displayName || type.type.name || '';1378 return functionName !== '' ? 'Memo(' + functionName + ')' : 'Memo';1379 }1380 }1381 return 'UNDEFINED';1382};1383const getPropKeys$1 = element => {1384 const {props} = element;1385 return Object.keys(props)1386 .filter(key => key !== 'children' && props[key] !== undefined)1387 .sort();1388};1389const serialize$1 = (element, config, indentation, depth, refs, printer) =>1390 ++depth > config.maxDepth1391 ? (0, _markup$1.printElementAsLeaf)(getType(element), config)1392 : (0, _markup$1.printElement)(1393 getType(element),1394 (0, _markup$1.printProps)(1395 getPropKeys$1(element),1396 element.props,1397 config,1398 indentation + config.indent,1399 depth,1400 refs,1401 printer1402 ),1403 (0, _markup$1.printChildren)(1404 getChildren(element.props.children),1405 config,1406 indentation + config.indent,1407 depth,1408 refs,1409 printer1410 ),1411 config,1412 indentation1413 );1414ReactElement.serialize = serialize$1;1415const test$1 = val => val != null && ReactIs.isElement(val);1416ReactElement.test = test$1;1417const plugin$1 = {1418 serialize: serialize$1,1419 test: test$11420};1421var _default$2f = plugin$1;1422ReactElement.default = _default$2f;1423var ReactTestComponent = {};1424Object.defineProperty(ReactTestComponent, '__esModule', {1425 value: true1426});1427ReactTestComponent.test = ReactTestComponent.serialize = ReactTestComponent.default = void 0;1428var _markup = markup;1429var global = (function () {1430 if (typeof globalThis !== 'undefined') {1431 return globalThis;1432 } else if (typeof global !== 'undefined') {1433 return global;1434 } else if (typeof self !== 'undefined') {1435 return self;1436 } else if (typeof window !== 'undefined') {1437 return window;1438 } else {1439 return Function('return this')();1440 }1441})();1442var Symbol$1 = global['jest-symbol-do-not-touch'] || global.Symbol;1443const testSymbol =1444 typeof Symbol$1 === 'function' && Symbol$1.for1445 ? Symbol$1.for('react.test.json')1446 : 0xea71357;1447const getPropKeys = object => {1448 const {props} = object;1449 return props1450 ? Object.keys(props)1451 .filter(key => props[key] !== undefined)1452 .sort()1453 : [];1454};1455const serialize = (object, config, indentation, depth, refs, printer) =>1456 ++depth > config.maxDepth1457 ? (0, _markup.printElementAsLeaf)(object.type, config)1458 : (0, _markup.printElement)(1459 object.type,1460 object.props1461 ? (0, _markup.printProps)(1462 getPropKeys(object),1463 object.props,1464 config,1465 indentation + config.indent,1466 depth,1467 refs,1468 printer1469 )1470 : '',1471 object.children1472 ? (0, _markup.printChildren)(1473 object.children,1474 config,1475 indentation + config.indent,1476 depth,1477 refs,1478 printer1479 )1480 : '',1481 config,1482 indentation1483 );1484ReactTestComponent.serialize = serialize;1485const test = val => val && val.$$typeof === testSymbol;1486ReactTestComponent.test = test;1487const plugin = {1488 serialize,1489 test1490};1491var _default$2e = plugin;1492ReactTestComponent.default = _default$2e;1493Object.defineProperty(build, '__esModule', {1494 value: true1495});1496build.default = build.DEFAULT_OPTIONS = void 0;1497var format_1 = build.format = format;1498var plugins_1 = build.plugins = void 0;1499var _ansiStyles = _interopRequireDefault$7(ansiStyles.exports);1500var _collections = collections;1501var _AsymmetricMatcher = _interopRequireDefault$7(1502 AsymmetricMatcher1503);1504var _ConvertAnsi = _interopRequireDefault$7(ConvertAnsi);1505var _DOMCollection = _interopRequireDefault$7(DOMCollection$1);1506var _DOMElement = _interopRequireDefault$7(DOMElement);1507var _Immutable = _interopRequireDefault$7(Immutable);1508var _ReactElement = _interopRequireDefault$7(ReactElement);1509var _ReactTestComponent = _interopRequireDefault$7(1510 ReactTestComponent1511);1512function _interopRequireDefault$7(obj) {1513 return obj && obj.__esModule ? obj : {default: obj};1514}1515/**1516 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.1517 *1518 * This source code is licensed under the MIT license found in the1519 * LICENSE file in the root directory of this source tree.1520 */1521/* eslint-disable local/ban-types-eventually */1522const toString = Object.prototype.toString;1523const toISOString = Date.prototype.toISOString;1524const errorToString = Error.prototype.toString;1525const regExpToString = RegExp.prototype.toString;1526/**1527 * Explicitly comparing typeof constructor to function avoids undefined as name1528 * when mock identity-obj-proxy returns the key as the value for any key.1529 */1530const getConstructorName = val =>1531 (typeof val.constructor === 'function' && val.constructor.name) || 'Object';1532/* global window */1533/** Is val is equal to global window object? Works even if it does not exist :) */1534const isWindow = val => typeof window !== 'undefined' && val === window;1535const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;1536const NEWLINE_REGEXP = /\n/gi;1537class PrettyFormatPluginError extends Error {1538 constructor(message, stack) {1539 super(message);1540 this.stack = stack;1541 this.name = this.constructor.name;1542 }1543}1544function isToStringedArrayType(toStringed) {1545 return (1546 toStringed === '[object Array]' ||1547 toStringed === '[object ArrayBuffer]' ||1548 toStringed === '[object DataView]' ||1549 toStringed === '[object Float32Array]' ||1550 toStringed === '[object Float64Array]' ||1551 toStringed === '[object Int8Array]' ||1552 toStringed === '[object Int16Array]' ||1553 toStringed === '[object Int32Array]' ||1554 toStringed === '[object Uint8Array]' ||1555 toStringed === '[object Uint8ClampedArray]' ||1556 toStringed === '[object Uint16Array]' ||1557 toStringed === '[object Uint32Array]'1558 );1559}1560function printNumber(val) {1561 return Object.is(val, -0) ? '-0' : String(val);1562}1563function printBigInt(val) {1564 return String(`${val}n`);1565}1566function printFunction(val, printFunctionName) {1567 if (!printFunctionName) {1568 return '[Function]';1569 }1570 return '[Function ' + (val.name || 'anonymous') + ']';1571}1572function printSymbol(val) {1573 return String(val).replace(SYMBOL_REGEXP, 'Symbol($1)');1574}1575function printError(val) {1576 return '[' + errorToString.call(val) + ']';1577}1578/**1579 * The first port of call for printing an object, handles most of the1580 * data-types in JS.1581 */1582function printBasicValue(val, printFunctionName, escapeRegex, escapeString) {1583 if (val === true || val === false) {1584 return '' + val;1585 }1586 if (val === undefined) {1587 return 'undefined';1588 }1589 if (val === null) {1590 return 'null';1591 }1592 const typeOf = typeof val;1593 if (typeOf === 'number') {1594 return printNumber(val);1595 }1596 if (typeOf === 'bigint') {1597 return printBigInt(val);1598 }1599 if (typeOf === 'string') {1600 if (escapeString) {1601 return '"' + val.replace(/"|\\/g, '\\$&') + '"';1602 }1603 return '"' + val + '"';1604 }1605 if (typeOf === 'function') {1606 return printFunction(val, printFunctionName);1607 }1608 if (typeOf === 'symbol') {1609 return printSymbol(val);1610 }1611 const toStringed = toString.call(val);1612 if (toStringed === '[object WeakMap]') {1613 return 'WeakMap {}';1614 }1615 if (toStringed === '[object WeakSet]') {1616 return 'WeakSet {}';1617 }1618 if (1619 toStringed === '[object Function]' ||1620 toStringed === '[object GeneratorFunction]'1621 ) {1622 return printFunction(val, printFunctionName);1623 }1624 if (toStringed === '[object Symbol]') {1625 return printSymbol(val);1626 }1627 if (toStringed === '[object Date]') {1628 return isNaN(+val) ? 'Date { NaN }' : toISOString.call(val);1629 }1630 if (toStringed === '[object Error]') {1631 return printError(val);1632 }1633 if (toStringed === '[object RegExp]') {1634 if (escapeRegex) {1635 // https://github.com/benjamingr/RegExp.escape/blob/main/polyfill.js1636 return regExpToString.call(val).replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');1637 }1638 return regExpToString.call(val);1639 }1640 if (val instanceof Error) {1641 return printError(val);1642 }1643 return null;1644}1645/**1646 * Handles more complex objects ( such as objects with circular references.1647 * maps and sets etc )1648 */1649function printComplexValue(1650 val,1651 config,1652 indentation,1653 depth,1654 refs,1655 hasCalledToJSON1656) {1657 if (refs.indexOf(val) !== -1) {1658 return '[Circular]';1659 }1660 refs = refs.slice();1661 refs.push(val);1662 const hitMaxDepth = ++depth > config.maxDepth;1663 const min = config.min;1664 if (1665 config.callToJSON &&1666 !hitMaxDepth &&1667 val.toJSON &&1668 typeof val.toJSON === 'function' &&1669 !hasCalledToJSON1670 ) {1671 return printer(val.toJSON(), config, indentation, depth, refs, true);1672 }1673 const toStringed = toString.call(val);1674 if (toStringed === '[object Arguments]') {1675 return hitMaxDepth1676 ? '[Arguments]'1677 : (min ? '' : 'Arguments ') +1678 '[' +1679 (0, _collections.printListItems)(1680 val,1681 config,1682 indentation,1683 depth,1684 refs,1685 printer1686 ) +1687 ']';1688 }1689 if (isToStringedArrayType(toStringed)) {1690 return hitMaxDepth1691 ? '[' + val.constructor.name + ']'1692 : (min1693 ? ''1694 : !config.printBasicPrototype && val.constructor.name === 'Array'1695 ? ''1696 : val.constructor.name + ' ') +1697 '[' +1698 (0, _collections.printListItems)(1699 val,1700 config,1701 indentation,1702 depth,1703 refs,1704 printer1705 ) +1706 ']';1707 }1708 if (toStringed === '[object Map]') {1709 return hitMaxDepth1710 ? '[Map]'1711 : 'Map {' +1712 (0, _collections.printIteratorEntries)(1713 val.entries(),1714 config,1715 indentation,1716 depth,1717 refs,1718 printer,1719 ' => '1720 ) +1721 '}';1722 }1723 if (toStringed === '[object Set]') {1724 return hitMaxDepth1725 ? '[Set]'1726 : 'Set {' +1727 (0, _collections.printIteratorValues)(1728 val.values(),1729 config,1730 indentation,1731 depth,1732 refs,1733 printer1734 ) +1735 '}';1736 } // Avoid failure to serialize global window object in jsdom test environment.1737 // For example, not even relevant if window is prop of React element.1738 return hitMaxDepth || isWindow(val)1739 ? '[' + getConstructorName(val) + ']'1740 : (min1741 ? ''1742 : !config.printBasicPrototype && getConstructorName(val) === 'Object'1743 ? ''1744 : getConstructorName(val) + ' ') +1745 '{' +1746 (0, _collections.printObjectProperties)(1747 val,1748 config,1749 indentation,1750 depth,1751 refs,1752 printer1753 ) +1754 '}';1755}1756function isNewPlugin(plugin) {1757 return plugin.serialize != null;1758}1759function printPlugin(plugin, val, config, indentation, depth, refs) {1760 let printed;1761 try {1762 printed = isNewPlugin(plugin)1763 ? plugin.serialize(val, config, indentation, depth, refs, printer)1764 : plugin.print(1765 val,1766 valChild => printer(valChild, config, indentation, depth, refs),1767 str => {1768 const indentationNext = indentation + config.indent;1769 return (1770 indentationNext +1771 str.replace(NEWLINE_REGEXP, '\n' + indentationNext)1772 );1773 },1774 {1775 edgeSpacing: config.spacingOuter,1776 min: config.min,1777 spacing: config.spacingInner1778 },1779 config.colors1780 );1781 } catch (error) {1782 throw new PrettyFormatPluginError(error.message, error.stack);1783 }1784 if (typeof printed !== 'string') {1785 throw new Error(1786 `pretty-format: Plugin must return type "string" but instead returned "${typeof printed}".`1787 );1788 }1789 return printed;1790}1791function findPlugin(plugins, val) {1792 for (let p = 0; p < plugins.length; p++) {1793 try {1794 if (plugins[p].test(val)) {1795 return plugins[p];1796 }1797 } catch (error) {1798 throw new PrettyFormatPluginError(error.message, error.stack);1799 }1800 }1801 return null;1802}1803function printer(val, config, indentation, depth, refs, hasCalledToJSON) {1804 const plugin = findPlugin(config.plugins, val);1805 if (plugin !== null) {1806 return printPlugin(plugin, val, config, indentation, depth, refs);1807 }1808 const basicResult = printBasicValue(1809 val,1810 config.printFunctionName,1811 config.escapeRegex,1812 config.escapeString1813 );1814 if (basicResult !== null) {1815 return basicResult;1816 }1817 return printComplexValue(1818 val,1819 config,1820 indentation,1821 depth,1822 refs,1823 hasCalledToJSON1824 );1825}1826const DEFAULT_THEME = {1827 comment: 'gray',1828 content: 'reset',1829 prop: 'yellow',1830 tag: 'cyan',1831 value: 'green'1832};1833const DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME);1834const DEFAULT_OPTIONS = {1835 callToJSON: true,1836 compareKeys: undefined,1837 escapeRegex: false,1838 escapeString: true,1839 highlight: false,1840 indent: 2,1841 maxDepth: Infinity,1842 min: false,1843 plugins: [],1844 printBasicPrototype: true,1845 printFunctionName: true,1846 theme: DEFAULT_THEME1847};1848build.DEFAULT_OPTIONS = DEFAULT_OPTIONS;1849function validateOptions(options) {1850 Object.keys(options).forEach(key => {1851 if (!DEFAULT_OPTIONS.hasOwnProperty(key)) {1852 throw new Error(`pretty-format: Unknown option "${key}".`);1853 }1854 });1855 if (options.min && options.indent !== undefined && options.indent !== 0) {1856 throw new Error(1857 'pretty-format: Options "min" and "indent" cannot be used together.'1858 );1859 }1860 if (options.theme !== undefined) {1861 if (options.theme === null) {1862 throw new Error('pretty-format: Option "theme" must not be null.');1863 }1864 if (typeof options.theme !== 'object') {1865 throw new Error(1866 `pretty-format: Option "theme" must be of type "object" but instead received "${typeof options.theme}".`1867 );1868 }1869 }1870}1871const getColorsHighlight = options =>1872 DEFAULT_THEME_KEYS.reduce((colors, key) => {1873 const value =1874 options.theme && options.theme[key] !== undefined1875 ? options.theme[key]1876 : DEFAULT_THEME[key];1877 const color = value && _ansiStyles.default[value];1878 if (1879 color &&1880 typeof color.close === 'string' &&1881 typeof color.open === 'string'1882 ) {1883 colors[key] = color;1884 } else {1885 throw new Error(1886 `pretty-format: Option "theme" has a key "${key}" whose value "${value}" is undefined in ansi-styles.`1887 );1888 }1889 return colors;1890 }, Object.create(null));1891const getColorsEmpty = () =>1892 DEFAULT_THEME_KEYS.reduce((colors, key) => {1893 colors[key] = {1894 close: '',1895 open: ''1896 };1897 return colors;1898 }, Object.create(null));1899const getPrintFunctionName = options =>1900 options && options.printFunctionName !== undefined1901 ? options.printFunctionName1902 : DEFAULT_OPTIONS.printFunctionName;1903const getEscapeRegex = options =>1904 options && options.escapeRegex !== undefined1905 ? options.escapeRegex1906 : DEFAULT_OPTIONS.escapeRegex;1907const getEscapeString = options =>1908 options && options.escapeString !== undefined1909 ? options.escapeString1910 : DEFAULT_OPTIONS.escapeString;1911const getConfig$1 = options => {1912 var _options$printBasicPr;1913 return {1914 callToJSON:1915 options && options.callToJSON !== undefined1916 ? options.callToJSON1917 : DEFAULT_OPTIONS.callToJSON,1918 colors:1919 options && options.highlight1920 ? getColorsHighlight(options)1921 : getColorsEmpty(),1922 compareKeys:1923 options && typeof options.compareKeys === 'function'1924 ? options.compareKeys1925 : DEFAULT_OPTIONS.compareKeys,1926 escapeRegex: getEscapeRegex(options),1927 escapeString: getEscapeString(options),1928 indent:1929 options && options.min1930 ? ''1931 : createIndent(1932 options && options.indent !== undefined1933 ? options.indent1934 : DEFAULT_OPTIONS.indent1935 ),1936 maxDepth:1937 options && options.maxDepth !== undefined1938 ? options.maxDepth1939 : DEFAULT_OPTIONS.maxDepth,1940 min:1941 options && options.min !== undefined ? options.min : DEFAULT_OPTIONS.min,1942 plugins:1943 options && options.plugins !== undefined1944 ? options.plugins1945 : DEFAULT_OPTIONS.plugins,1946 printBasicPrototype:1947 (_options$printBasicPr =1948 options === null || options === void 01949 ? void 01950 : options.printBasicPrototype) !== null &&1951 _options$printBasicPr !== void 01952 ? _options$printBasicPr1953 : true,1954 printFunctionName: getPrintFunctionName(options),1955 spacingInner: options && options.min ? ' ' : '\n',1956 spacingOuter: options && options.min ? '' : '\n'1957 };1958};1959function createIndent(indent) {1960 return new Array(indent + 1).join(' ');1961}1962/**1963 * Returns a presentation string of your `val` object1964 * @param val any potential JavaScript object1965 * @param options Custom settings1966 */1967function format(val, options) {1968 if (options) {1969 validateOptions(options);1970 if (options.plugins) {1971 const plugin = findPlugin(options.plugins, val);1972 if (plugin !== null) {1973 return printPlugin(plugin, val, getConfig$1(options), '', 0, []);1974 }1975 }1976 }1977 const basicResult = printBasicValue(1978 val,1979 getPrintFunctionName(options),1980 getEscapeRegex(options),1981 getEscapeString(options)1982 );1983 if (basicResult !== null) {1984 return basicResult;1985 }1986 return printComplexValue(val, getConfig$1(options), '', 0, []);1987}1988const plugins = {1989 AsymmetricMatcher: _AsymmetricMatcher.default,1990 ConvertAnsi: _ConvertAnsi.default,1991 DOMCollection: _DOMCollection.default,1992 DOMElement: _DOMElement.default,1993 Immutable: _Immutable.default,1994 ReactElement: _ReactElement.default,1995 ReactTestComponent: _ReactTestComponent.default1996};1997plugins_1 = build.plugins = plugins;1998var _default$2d = format;1999build.default = _default$2d;2000/**2001 * @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill}2002 * but without thisArg (too hard to type, no need to `this`)2003 */2004var toStr = Object.prototype.toString;2005function isCallable(fn) {2006 return typeof fn === "function" || toStr.call(fn) === "[object Function]";2007}2008function toInteger(value) {2009 var number = Number(value);2010 if (isNaN(number)) {2011 return 0;2012 }2013 if (number === 0 || !isFinite(number)) {2014 return number;2015 }2016 return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));2017}2018var maxSafeInteger = Math.pow(2, 53) - 1;2019function toLength(value) {2020 var len = toInteger(value);2021 return Math.min(Math.max(len, 0), maxSafeInteger);2022}2023/**2024 * Creates an array from an iterable object.2025 * @param iterable An iterable object to convert to an array.2026 */2027/**2028 * Creates an array from an iterable object.2029 * @param iterable An iterable object to convert to an array.2030 * @param mapfn A mapping function to call on every element of the array.2031 * @param thisArg Value of 'this' used to invoke the mapfn.2032 */2033function arrayFrom(arrayLike, mapFn) {2034 // 1. Let C be the this value.2035 // edit(@eps1lon): we're not calling it as Array.from2036 var C = Array; // 2. Let items be ToObject(arrayLike).2037 var items = Object(arrayLike); // 3. ReturnIfAbrupt(items).2038 if (arrayLike == null) {2039 throw new TypeError("Array.from requires an array-like object - not null or undefined");2040 } // 4. If mapfn is undefined, then let mapping be false.2041 // const mapFn = arguments.length > 1 ? arguments[1] : void undefined;2042 if (typeof mapFn !== "undefined") {2043 // 5. else2044 // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.2045 if (!isCallable(mapFn)) {2046 throw new TypeError("Array.from: when provided, the second argument must be a function");2047 }2048 } // 10. Let lenValue be Get(items, "length").2049 // 11. Let len be ToLength(lenValue).2050 var len = toLength(items.length); // 13. If IsConstructor(C) is true, then2051 // 13. a. Let A be the result of calling the [[Construct]] internal method2052 // of C with an argument list containing the single item len.2053 // 14. a. Else, Let A be ArrayCreate(len).2054 var A = isCallable(C) ? Object(new C(len)) : new Array(len); // 16. Let k be 0.2055 var k = 0; // 17. Repeat, while k < len… (also steps a - h)2056 var kValue;2057 while (k < len) {2058 kValue = items[k];2059 if (mapFn) {2060 A[k] = mapFn(kValue, k);2061 } else {2062 A[k] = kValue;2063 }2064 k += 1;2065 } // 18. Let putStatus be Put(A, "length", len, true).2066 A.length = len; // 20. Return A.2067 return A;2068}2069function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }2070function _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, descriptor.key, descriptor); } }2071function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }2072function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }2073// for environments without Set we fallback to arrays with unique members2074var SetLike = /*#__PURE__*/function () {2075 function SetLike() {2076 var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];2077 _classCallCheck(this, SetLike);2078 _defineProperty$1(this, "items", void 0);2079 this.items = items;2080 }2081 _createClass(SetLike, [{2082 key: "add",2083 value: function add(value) {2084 if (this.has(value) === false) {2085 this.items.push(value);2086 }2087 return this;2088 }2089 }, {2090 key: "clear",2091 value: function clear() {2092 this.items = [];2093 }2094 }, {2095 key: "delete",2096 value: function _delete(value) {2097 var previousLength = this.items.length;2098 this.items = this.items.filter(function (item) {2099 return item !== value;2100 });2101 return previousLength !== this.items.length;2102 }2103 }, {2104 key: "forEach",2105 value: function forEach(callbackfn) {2106 var _this = this;2107 this.items.forEach(function (item) {2108 callbackfn(item, item, _this);2109 });2110 }2111 }, {2112 key: "has",2113 value: function has(value) {2114 return this.items.indexOf(value) !== -1;2115 }2116 }, {2117 key: "size",2118 get: function get() {2119 return this.items.length;2120 }2121 }]);2122 return SetLike;2123}();2124var SetLike$1 = typeof Set === "undefined" ? Set : SetLike;2125// https://w3c.github.io/html-aria/#document-conformance-requirements-for-use-of-aria-attributes-in-html2126var localNameToRoleMappings = {2127 article: "article",2128 aside: "complementary",2129 button: "button",2130 datalist: "listbox",2131 dd: "definition",2132 details: "group",2133 dialog: "dialog",2134 dt: "term",2135 fieldset: "group",2136 figure: "figure",2137 // WARNING: Only with an accessible name2138 form: "form",2139 footer: "contentinfo",2140 h1: "heading",2141 h2: "heading",2142 h3: "heading",2143 h4: "heading",2144 h5: "heading",2145 h6: "heading",2146 header: "banner",2147 hr: "separator",2148 html: "document",2149 legend: "legend",2150 li: "listitem",2151 math: "math",2152 main: "main",2153 menu: "list",2154 nav: "navigation",2155 ol: "list",2156 optgroup: "group",2157 // WARNING: Only in certain context2158 option: "option",2159 output: "status",2160 progress: "progressbar",2161 // WARNING: Only with an accessible name2162 section: "region",2163 summary: "button",2164 table: "table",2165 tbody: "rowgroup",2166 textarea: "textbox",2167 tfoot: "rowgroup",2168 // WARNING: Only in certain context2169 td: "cell",2170 th: "columnheader",2171 thead: "rowgroup",2172 tr: "row",2173 ul: "list"2174};2175var prohibitedAttributes = {2176 caption: new Set(["aria-label", "aria-labelledby"]),2177 code: new Set(["aria-label", "aria-labelledby"]),2178 deletion: new Set(["aria-label", "aria-labelledby"]),2179 emphasis: new Set(["aria-label", "aria-labelledby"]),2180 generic: new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),2181 insertion: new Set(["aria-label", "aria-labelledby"]),2182 paragraph: new Set(["aria-label", "aria-labelledby"]),2183 presentation: new Set(["aria-label", "aria-labelledby"]),2184 strong: new Set(["aria-label", "aria-labelledby"]),2185 subscript: new Set(["aria-label", "aria-labelledby"]),2186 superscript: new Set(["aria-label", "aria-labelledby"])2187};2188/**2189 *2190 * @param element2191 * @param role The role used for this element. This is specified to control whether you want to use the implicit or explicit role.2192 */2193function hasGlobalAriaAttributes(element, role) {2194 // https://rawgit.com/w3c/aria/stable/#global_states2195 // commented attributes are deprecated2196 return ["aria-atomic", "aria-busy", "aria-controls", "aria-current", "aria-describedby", "aria-details", // "disabled",2197 "aria-dropeffect", // "errormessage",2198 "aria-flowto", "aria-grabbed", // "haspopup",2199 "aria-hidden", // "invalid",2200 "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-relevant", "aria-roledescription"].some(function (attributeName) {2201 var _prohibitedAttributes;2202 return element.hasAttribute(attributeName) && !((_prohibitedAttributes = prohibitedAttributes[role]) !== null && _prohibitedAttributes !== void 0 && _prohibitedAttributes.has(attributeName));2203 });2204}2205function ignorePresentationalRole(element, implicitRole) {2206 // https://rawgit.com/w3c/aria/stable/#conflict_resolution_presentation_none2207 return hasGlobalAriaAttributes(element, implicitRole);2208}2209function getRole(element) {2210 var explicitRole = getExplicitRole(element);2211 if (explicitRole === null || explicitRole === "presentation") {2212 var implicitRole = getImplicitRole(element);2213 if (explicitRole !== "presentation" || ignorePresentationalRole(element, implicitRole || "")) {2214 return implicitRole;2215 }2216 }2217 return explicitRole;2218}2219function getImplicitRole(element) {2220 var mappedByTag = localNameToRoleMappings[getLocalName(element)];2221 if (mappedByTag !== undefined) {2222 return mappedByTag;2223 }2224 switch (getLocalName(element)) {2225 case "a":2226 case "area":2227 case "link":2228 if (element.hasAttribute("href")) {2229 return "link";2230 }2231 break;2232 case "img":2233 if (element.getAttribute("alt") === "" && !ignorePresentationalRole(element, "img")) {2234 return "presentation";2235 }2236 return "img";2237 case "input":2238 {2239 var _ref = element,2240 type = _ref.type;2241 switch (type) {2242 case "button":2243 case "image":2244 case "reset":2245 case "submit":2246 return "button";2247 case "checkbox":2248 case "radio":2249 return type;2250 case "range":2251 return "slider";2252 case "email":2253 case "tel":2254 case "text":2255 case "url":2256 if (element.hasAttribute("list")) {2257 return "combobox";2258 }2259 return "textbox";2260 case "search":2261 if (element.hasAttribute("list")) {2262 return "combobox";2263 }2264 return "searchbox";2265 case "number":2266 return "spinbutton";2267 default:2268 return null;2269 }2270 }2271 case "select":2272 if (element.hasAttribute("multiple") || element.size > 1) {2273 return "listbox";2274 }2275 return "combobox";2276 }2277 return null;2278}2279function getExplicitRole(element) {2280 var role = element.getAttribute("role");2281 if (role !== null) {2282 var explicitRole = role.trim().split(" ")[0]; // String.prototype.split(sep, limit) will always return an array with at least one member2283 // as long as limit is either undefined or > 02284 if (explicitRole.length > 0) {2285 return explicitRole;2286 }2287 }2288 return null;2289}2290/**2291 * Safe Element.localName for all supported environments2292 * @param element2293 */2294function getLocalName(element) {2295 var _element$localName;2296 return (// eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName2297 (_element$localName = element.localName) !== null && _element$localName !== void 0 ? _element$localName : // eslint-disable-next-line no-restricted-properties -- required for the fallback2298 element.tagName.toLowerCase()2299 );2300}2301function isElement(node) {2302 return node !== null && node.nodeType === node.ELEMENT_NODE;2303}2304function isHTMLTableCaptionElement(node) {2305 return isElement(node) && getLocalName(node) === "caption";2306}2307function isHTMLInputElement(node) {2308 return isElement(node) && getLocalName(node) === "input";2309}2310function isHTMLOptGroupElement(node) {2311 return isElement(node) && getLocalName(node) === "optgroup";2312}2313function isHTMLSelectElement(node) {2314 return isElement(node) && getLocalName(node) === "select";2315}2316function isHTMLTableElement(node) {2317 return isElement(node) && getLocalName(node) === "table";2318}2319function isHTMLTextAreaElement(node) {2320 return isElement(node) && getLocalName(node) === "textarea";2321}2322function safeWindow(node) {2323 var _ref = node.ownerDocument === null ? node : node.ownerDocument,2324 defaultView = _ref.defaultView;2325 if (defaultView === null) {2326 throw new TypeError("no window available");2327 }2328 return defaultView;2329}2330function isHTMLFieldSetElement(node) {2331 return isElement(node) && getLocalName(node) === "fieldset";2332}2333function isHTMLLegendElement(node) {2334 return isElement(node) && getLocalName(node) === "legend";2335}2336function isHTMLSlotElement(node) {2337 return isElement(node) && getLocalName(node) === "slot";2338}2339function isSVGElement(node) {2340 return isElement(node) && node.ownerSVGElement !== undefined;2341}2342function isSVGSVGElement(node) {2343 return isElement(node) && getLocalName(node) === "svg";2344}2345function isSVGTitleElement(node) {2346 return isSVGElement(node) && getLocalName(node) === "title";2347}2348/**2349 *2350 * @param {Node} node -2351 * @param {string} attributeName -2352 * @returns {Element[]} -2353 */2354function queryIdRefs(node, attributeName) {2355 if (isElement(node) && node.hasAttribute(attributeName)) {2356 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute check2357 var ids = node.getAttribute(attributeName).split(" ");2358 return ids.map(function (id) {2359 return node.ownerDocument.getElementById(id);2360 }).filter(function (element) {2361 return element !== null;2362 } // TODO: why does this not narrow?2363 );2364 }2365 return [];2366}2367function hasAnyConcreteRoles(node, roles) {2368 if (isElement(node)) {2369 return roles.indexOf(getRole(node)) !== -1;2370 }2371 return false;2372}2373/**2374 * implements https://w3c.github.io/accname/2375 */2376/**2377 * A string of characters where all carriage returns, newlines, tabs, and form-feeds are replaced with a single space, and multiple spaces are reduced to a single space. The string contains only character data; it does not contain any markup.2378 */2379/**2380 *2381 * @param {string} string -2382 * @returns {FlatString} -2383 */2384function asFlatString(s) {2385 return s.trim().replace(/\s\s+/g, " ");2386}2387/**2388 *2389 * @param node -2390 * @param options - These are not optional to prevent accidentally calling it without options in `computeAccessibleName`2391 * @returns {boolean} -2392 */2393function isHidden(node, getComputedStyleImplementation) {2394 if (!isElement(node)) {2395 return false;2396 }2397 if (node.hasAttribute("hidden") || node.getAttribute("aria-hidden") === "true") {2398 return true;2399 }2400 var style = getComputedStyleImplementation(node);2401 return style.getPropertyValue("display") === "none" || style.getPropertyValue("visibility") === "hidden";2402}2403/**2404 * @param {Node} node -2405 * @returns {boolean} - As defined in step 2E of https://w3c.github.io/accname/#mapping_additional_nd_te2406 */2407function isControl(node) {2408 return hasAnyConcreteRoles(node, ["button", "combobox", "listbox", "textbox"]) || hasAbstractRole(node, "range");2409}2410function hasAbstractRole(node, role) {2411 if (!isElement(node)) {2412 return false;2413 }2414 switch (role) {2415 case "range":2416 return hasAnyConcreteRoles(node, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);2417 default:2418 throw new TypeError("No knowledge about abstract role '".concat(role, "'. This is likely a bug :("));2419 }2420}2421/**2422 * element.querySelectorAll but also considers owned tree2423 * @param element2424 * @param selectors2425 */2426function querySelectorAllSubtree(element, selectors) {2427 var elements = arrayFrom(element.querySelectorAll(selectors));2428 queryIdRefs(element, "aria-owns").forEach(function (root) {2429 // babel transpiles this assuming an iterator2430 elements.push.apply(elements, arrayFrom(root.querySelectorAll(selectors)));2431 });2432 return elements;2433}2434function querySelectedOptions(listbox) {2435 if (isHTMLSelectElement(listbox)) {2436 // IE11 polyfill2437 return listbox.selectedOptions || querySelectorAllSubtree(listbox, "[selected]");2438 }2439 return querySelectorAllSubtree(listbox, '[aria-selected="true"]');2440}2441function isMarkedPresentational(node) {2442 return hasAnyConcreteRoles(node, ["none", "presentation"]);2443}2444/**2445 * Elements specifically listed in html-aam2446 *2447 * We don't need this for `label` or `legend` elements.2448 * Their implicit roles already allow "naming from content".2449 *2450 * sources:2451 *2452 * - https://w3c.github.io/html-aam/#table-element2453 */2454function isNativeHostLanguageTextAlternativeElement(node) {2455 return isHTMLTableCaptionElement(node);2456}2457/**2458 * https://w3c.github.io/aria/#namefromcontent2459 */2460function allowsNameFromContent(node) {2461 return hasAnyConcreteRoles(node, ["button", "cell", "checkbox", "columnheader", "gridcell", "heading", "label", "legend", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "row", "rowheader", "switch", "tab", "tooltip", "treeitem"]);2462}2463/**2464 * TODO https://github.com/eps1lon/dom-accessibility-api/issues/1002465 */2466function isDescendantOfNativeHostLanguageTextAlternativeElement( // eslint-disable-next-line @typescript-eslint/no-unused-vars -- not implemented yet2467node) {2468 return false;2469}2470function getValueOfTextbox(element) {2471 if (isHTMLInputElement(element) || isHTMLTextAreaElement(element)) {2472 return element.value;2473 } // https://github.com/eps1lon/dom-accessibility-api/issues/42474 return element.textContent || "";2475}2476function getTextualContent(declaration) {2477 var content = declaration.getPropertyValue("content");2478 if (/^["'].*["']$/.test(content)) {2479 return content.slice(1, -1);2480 }2481 return "";2482}2483/**2484 * https://html.spec.whatwg.org/multipage/forms.html#category-label2485 * TODO: form-associated custom elements2486 * @param element2487 */2488function isLabelableElement(element) {2489 var localName = getLocalName(element);2490 return localName === "button" || localName === "input" && element.getAttribute("type") !== "hidden" || localName === "meter" || localName === "output" || localName === "progress" || localName === "select" || localName === "textarea";2491}2492/**2493 * > [...], then the first such descendant in tree order is the label element's labeled control.2494 * -- https://html.spec.whatwg.org/multipage/forms.html#labeled-control2495 * @param element2496 */2497function findLabelableElement(element) {2498 if (isLabelableElement(element)) {2499 return element;2500 }2501 var labelableElement = null;2502 element.childNodes.forEach(function (childNode) {2503 if (labelableElement === null && isElement(childNode)) {2504 var descendantLabelableElement = findLabelableElement(childNode);2505 if (descendantLabelableElement !== null) {2506 labelableElement = descendantLabelableElement;2507 }2508 }2509 });2510 return labelableElement;2511}2512/**2513 * Polyfill of HTMLLabelElement.control2514 * https://html.spec.whatwg.org/multipage/forms.html#labeled-control2515 * @param label2516 */2517function getControlOfLabel(label) {2518 if (label.control !== undefined) {2519 return label.control;2520 }2521 var htmlFor = label.getAttribute("for");2522 if (htmlFor !== null) {2523 return label.ownerDocument.getElementById(htmlFor);2524 }2525 return findLabelableElement(label);2526}2527/**2528 * Polyfill of HTMLInputElement.labels2529 * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/labels2530 * @param element2531 */2532function getLabels$1(element) {2533 var labelsProperty = element.labels;2534 if (labelsProperty === null) {2535 return labelsProperty;2536 }2537 if (labelsProperty !== undefined) {2538 return arrayFrom(labelsProperty);2539 } // polyfill2540 if (!isLabelableElement(element)) {2541 return null;2542 }2543 var document = element.ownerDocument;2544 return arrayFrom(document.querySelectorAll("label")).filter(function (label) {2545 return getControlOfLabel(label) === element;2546 });2547}2548/**2549 * Gets the contents of a slot used for computing the accname2550 * @param slot2551 */2552function getSlotContents(slot) {2553 // Computing the accessible name for elements containing slots is not2554 // currently defined in the spec. This implementation reflects the2555 // behavior of NVDA 2020.2/Firefox 81 and iOS VoiceOver/Safari 13.6.2556 var assignedNodes = slot.assignedNodes();2557 if (assignedNodes.length === 0) {2558 // if no nodes are assigned to the slot, it displays the default content2559 return arrayFrom(slot.childNodes);2560 }2561 return assignedNodes;2562}2563/**2564 * implements https://w3c.github.io/accname/#mapping_additional_nd_te2565 * @param root2566 * @param options2567 * @returns2568 */2569function computeTextAlternative(root) {2570 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};2571 var consultedNodes = new SetLike$1();2572 var window = safeWindow(root);2573 var _options$compute = options.compute,2574 compute = _options$compute === void 0 ? "name" : _options$compute,2575 _options$computedStyl = options.computedStyleSupportsPseudoElements,2576 computedStyleSupportsPseudoElements = _options$computedStyl === void 0 ? options.getComputedStyle !== undefined : _options$computedStyl,2577 _options$getComputedS = options.getComputedStyle,2578 getComputedStyle = _options$getComputedS === void 0 ? window.getComputedStyle.bind(window) : _options$getComputedS,2579 _options$hidden = options.hidden,2580 hidden = _options$hidden === void 0 ? false : _options$hidden; // 2F.i2581 function computeMiscTextAlternative(node, context) {2582 var accumulatedText = "";2583 if (isElement(node) && computedStyleSupportsPseudoElements) {2584 var pseudoBefore = getComputedStyle(node, "::before");2585 var beforeContent = getTextualContent(pseudoBefore);2586 accumulatedText = "".concat(beforeContent, " ").concat(accumulatedText);2587 } // FIXME: Including aria-owns is not defined in the spec2588 // But it is required in the web-platform-test2589 var childNodes = isHTMLSlotElement(node) ? getSlotContents(node) : arrayFrom(node.childNodes).concat(queryIdRefs(node, "aria-owns"));2590 childNodes.forEach(function (child) {2591 var result = computeTextAlternative(child, {2592 isEmbeddedInLabel: context.isEmbeddedInLabel,2593 isReferenced: false,2594 recursion: true2595 }); // TODO: Unclear why display affects delimiter2596 // see https://github.com/w3c/accname/issues/32597 var display = isElement(child) ? getComputedStyle(child).getPropertyValue("display") : "inline";2598 var separator = display !== "inline" ? " " : ""; // trailing separator for wpt tests2599 accumulatedText += "".concat(separator).concat(result).concat(separator);2600 });2601 if (isElement(node) && computedStyleSupportsPseudoElements) {2602 var pseudoAfter = getComputedStyle(node, "::after");2603 var afterContent = getTextualContent(pseudoAfter);2604 accumulatedText = "".concat(accumulatedText, " ").concat(afterContent);2605 }2606 return accumulatedText;2607 }2608 function computeElementTextAlternative(node) {2609 if (!isElement(node)) {2610 return null;2611 }2612 /**2613 *2614 * @param element2615 * @param attributeName2616 * @returns A string non-empty string or `null`2617 */2618 function useAttribute(element, attributeName) {2619 var attribute = element.getAttributeNode(attributeName);2620 if (attribute !== null && !consultedNodes.has(attribute) && attribute.value.trim() !== "") {2621 consultedNodes.add(attribute);2622 return attribute.value;2623 }2624 return null;2625 } // https://w3c.github.io/html-aam/#fieldset-and-legend-elements2626 if (isHTMLFieldSetElement(node)) {2627 consultedNodes.add(node);2628 var children = arrayFrom(node.childNodes);2629 for (var i = 0; i < children.length; i += 1) {2630 var child = children[i];2631 if (isHTMLLegendElement(child)) {2632 return computeTextAlternative(child, {2633 isEmbeddedInLabel: false,2634 isReferenced: false,2635 recursion: false2636 });2637 }2638 }2639 } else if (isHTMLTableElement(node)) {2640 // https://w3c.github.io/html-aam/#table-element2641 consultedNodes.add(node);2642 var _children = arrayFrom(node.childNodes);2643 for (var _i = 0; _i < _children.length; _i += 1) {2644 var _child = _children[_i];2645 if (isHTMLTableCaptionElement(_child)) {2646 return computeTextAlternative(_child, {2647 isEmbeddedInLabel: false,2648 isReferenced: false,2649 recursion: false2650 });2651 }2652 }2653 } else if (isSVGSVGElement(node)) {2654 // https://www.w3.org/TR/svg-aam-1.0/2655 consultedNodes.add(node);2656 var _children2 = arrayFrom(node.childNodes);2657 for (var _i2 = 0; _i2 < _children2.length; _i2 += 1) {2658 var _child2 = _children2[_i2];2659 if (isSVGTitleElement(_child2)) {2660 return _child2.textContent;2661 }2662 }2663 return null;2664 } else if (getLocalName(node) === "img" || getLocalName(node) === "area") {2665 // https://w3c.github.io/html-aam/#area-element2666 // https://w3c.github.io/html-aam/#img-element2667 var nameFromAlt = useAttribute(node, "alt");2668 if (nameFromAlt !== null) {2669 return nameFromAlt;2670 }2671 } else if (isHTMLOptGroupElement(node)) {2672 var nameFromLabel = useAttribute(node, "label");2673 if (nameFromLabel !== null) {2674 return nameFromLabel;2675 }2676 }2677 if (isHTMLInputElement(node) && (node.type === "button" || node.type === "submit" || node.type === "reset")) {2678 // https://w3c.github.io/html-aam/#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-email-input-type-url-and-textarea-element-accessible-description-computation2679 var nameFromValue = useAttribute(node, "value");2680 if (nameFromValue !== null) {2681 return nameFromValue;2682 } // TODO: l10n2683 if (node.type === "submit") {2684 return "Submit";2685 } // TODO: l10n2686 if (node.type === "reset") {2687 return "Reset";2688 }2689 }2690 var labels = getLabels$1(node);2691 if (labels !== null && labels.length !== 0) {2692 consultedNodes.add(node);2693 return arrayFrom(labels).map(function (element) {2694 return computeTextAlternative(element, {2695 isEmbeddedInLabel: true,2696 isReferenced: false,2697 recursion: true2698 });2699 }).filter(function (label) {2700 return label.length > 0;2701 }).join(" ");2702 } // https://w3c.github.io/html-aam/#input-type-image-accessible-name-computation2703 // TODO: wpt test consider label elements but html-aam does not mention them2704 // We follow existing implementations over spec2705 if (isHTMLInputElement(node) && node.type === "image") {2706 var _nameFromAlt = useAttribute(node, "alt");2707 if (_nameFromAlt !== null) {2708 return _nameFromAlt;2709 }2710 var nameFromTitle = useAttribute(node, "title");2711 if (nameFromTitle !== null) {2712 return nameFromTitle;2713 } // TODO: l10n2714 return "Submit Query";2715 }2716 return useAttribute(node, "title");2717 }2718 function computeTextAlternative(current, context) {2719 if (consultedNodes.has(current)) {2720 return "";2721 } // 2A2722 if (!hidden && isHidden(current, getComputedStyle) && !context.isReferenced) {2723 consultedNodes.add(current);2724 return "";2725 } // 2B2726 var labelElements = queryIdRefs(current, "aria-labelledby");2727 if (compute === "name" && !context.isReferenced && labelElements.length > 0) {2728 return labelElements.map(function (element) {2729 return computeTextAlternative(element, {2730 isEmbeddedInLabel: context.isEmbeddedInLabel,2731 isReferenced: true,2732 // thais isn't recursion as specified, otherwise we would skip2733 // `aria-label` in2734 // <input id="myself" aria-label="foo" aria-labelledby="myself"2735 recursion: false2736 });2737 }).join(" ");2738 } // 2C2739 // Changed from the spec in anticipation of https://github.com/w3c/accname/issues/642740 // spec says we should only consider skipping if we have a non-empty label2741 var skipToStep2E = context.recursion && isControl(current) && compute === "name";2742 if (!skipToStep2E) {2743 var ariaLabel = (isElement(current) && current.getAttribute("aria-label") || "").trim();2744 if (ariaLabel !== "" && compute === "name") {2745 consultedNodes.add(current);2746 return ariaLabel;2747 } // 2D2748 if (!isMarkedPresentational(current)) {2749 var elementTextAlternative = computeElementTextAlternative(current);2750 if (elementTextAlternative !== null) {2751 consultedNodes.add(current);2752 return elementTextAlternative;2753 }2754 }2755 } // special casing, cheating to make tests pass2756 // https://github.com/w3c/accname/issues/672757 if (hasAnyConcreteRoles(current, ["menu"])) {2758 consultedNodes.add(current);2759 return "";2760 } // 2E2761 if (skipToStep2E || context.isEmbeddedInLabel || context.isReferenced) {2762 if (hasAnyConcreteRoles(current, ["combobox", "listbox"])) {2763 consultedNodes.add(current);2764 var selectedOptions = querySelectedOptions(current);2765 if (selectedOptions.length === 0) {2766 // defined per test `name_heading_combobox`2767 return isHTMLInputElement(current) ? current.value : "";2768 }2769 return arrayFrom(selectedOptions).map(function (selectedOption) {2770 return computeTextAlternative(selectedOption, {2771 isEmbeddedInLabel: context.isEmbeddedInLabel,2772 isReferenced: false,2773 recursion: true2774 });2775 }).join(" ");2776 }2777 if (hasAbstractRole(current, "range")) {2778 consultedNodes.add(current);2779 if (current.hasAttribute("aria-valuetext")) {2780 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard2781 return current.getAttribute("aria-valuetext");2782 }2783 if (current.hasAttribute("aria-valuenow")) {2784 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard2785 return current.getAttribute("aria-valuenow");2786 } // Otherwise, use the value as specified by a host language attribute.2787 return current.getAttribute("value") || "";2788 }2789 if (hasAnyConcreteRoles(current, ["textbox"])) {2790 consultedNodes.add(current);2791 return getValueOfTextbox(current);2792 }2793 } // 2F: https://w3c.github.io/accname/#step2F2794 if (allowsNameFromContent(current) || isElement(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement(current) || isDescendantOfNativeHostLanguageTextAlternativeElement()) {2795 consultedNodes.add(current);2796 return computeMiscTextAlternative(current, {2797 isEmbeddedInLabel: context.isEmbeddedInLabel,2798 isReferenced: false2799 });2800 }2801 if (current.nodeType === current.TEXT_NODE) {2802 consultedNodes.add(current);2803 return current.textContent || "";2804 }2805 if (context.recursion) {2806 consultedNodes.add(current);2807 return computeMiscTextAlternative(current, {2808 isEmbeddedInLabel: context.isEmbeddedInLabel,2809 isReferenced: false2810 });2811 }2812 consultedNodes.add(current);2813 return "";2814 }2815 return asFlatString(computeTextAlternative(root, {2816 isEmbeddedInLabel: false,2817 // by spec computeAccessibleDescription starts with the referenced elements as roots2818 isReferenced: compute === "description",2819 recursion: false2820 }));2821}2822/**2823 * https://w3c.github.io/aria/#namefromprohibited2824 */2825function prohibitsNaming(node) {2826 return hasAnyConcreteRoles(node, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "paragraph", "presentation", "strong", "subscript", "superscript"]);2827}2828/**2829 * implements https://w3c.github.io/accname/#mapping_additional_nd_name2830 * @param root2831 * @param options2832 * @returns2833 */2834function computeAccessibleName(root) {2835 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};2836 if (prohibitsNaming(root)) {2837 return "";2838 }2839 return computeTextAlternative(root, options);2840}2841var lib = {};2842var ariaPropsMap$1 = {};2843Object.defineProperty(ariaPropsMap$1, "__esModule", {2844 value: true2845});2846ariaPropsMap$1.default = void 0;2847function _slicedToArray$4(arr, i) { return _arrayWithHoles$4(arr) || _iterableToArrayLimit$4(arr, i) || _unsupportedIterableToArray$5(arr, i) || _nonIterableRest$4(); }2848function _nonIterableRest$4() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }2849function _unsupportedIterableToArray$5(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$5(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$5(o, minLen); }2850function _arrayLikeToArray$5(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }2851function _iterableToArrayLimit$4(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }2852function _arrayWithHoles$4(arr) { if (Array.isArray(arr)) return arr; }2853var properties = [['aria-activedescendant', {2854 'type': 'id'2855}], ['aria-atomic', {2856 'type': 'boolean'2857}], ['aria-autocomplete', {2858 'type': 'token',2859 'values': ['inline', 'list', 'both', 'none']2860}], ['aria-busy', {2861 'type': 'boolean'2862}], ['aria-checked', {2863 'type': 'tristate'2864}], ['aria-colcount', {2865 type: 'integer'2866}], ['aria-colindex', {2867 type: 'integer'2868}], ['aria-colspan', {2869 type: 'integer'2870}], ['aria-controls', {2871 'type': 'idlist'2872}], ['aria-current', {2873 type: 'token',2874 values: ['page', 'step', 'location', 'date', 'time', true, false]2875}], ['aria-describedby', {2876 'type': 'idlist'2877}], ['aria-details', {2878 'type': 'id'2879}], ['aria-disabled', {2880 'type': 'boolean'2881}], ['aria-dropeffect', {2882 'type': 'tokenlist',2883 'values': ['copy', 'execute', 'link', 'move', 'none', 'popup']2884}], ['aria-errormessage', {2885 'type': 'id'2886}], ['aria-expanded', {2887 'type': 'boolean',2888 'allowundefined': true2889}], ['aria-flowto', {2890 'type': 'idlist'2891}], ['aria-grabbed', {2892 'type': 'boolean',2893 'allowundefined': true2894}], ['aria-haspopup', {2895 'type': 'token',2896 'values': [false, true, 'menu', 'listbox', 'tree', 'grid', 'dialog']2897}], ['aria-hidden', {2898 'type': 'boolean',2899 'allowundefined': true2900}], ['aria-invalid', {2901 'type': 'token',2902 'values': ['grammar', false, 'spelling', true]2903}], ['aria-keyshortcuts', {2904 type: 'string'2905}], ['aria-label', {2906 'type': 'string'2907}], ['aria-labelledby', {2908 'type': 'idlist'2909}], ['aria-level', {2910 'type': 'integer'2911}], ['aria-live', {2912 'type': 'token',2913 'values': ['assertive', 'off', 'polite']2914}], ['aria-modal', {2915 type: 'boolean'2916}], ['aria-multiline', {2917 'type': 'boolean'2918}], ['aria-multiselectable', {2919 'type': 'boolean'2920}], ['aria-orientation', {2921 'type': 'token',2922 'values': ['vertical', 'undefined', 'horizontal']2923}], ['aria-owns', {2924 'type': 'idlist'2925}], ['aria-placeholder', {2926 type: 'string'2927}], ['aria-posinset', {2928 'type': 'integer'2929}], ['aria-pressed', {2930 'type': 'tristate'2931}], ['aria-readonly', {2932 'type': 'boolean'2933}], ['aria-relevant', {2934 'type': 'tokenlist',2935 'values': ['additions', 'all', 'removals', 'text']2936}], ['aria-required', {2937 'type': 'boolean'2938}], ['aria-roledescription', {2939 type: 'string'2940}], ['aria-rowcount', {2941 type: 'integer'2942}], ['aria-rowindex', {2943 type: 'integer'2944}], ['aria-rowspan', {2945 type: 'integer'2946}], ['aria-selected', {2947 'type': 'boolean',2948 'allowundefined': true2949}], ['aria-setsize', {2950 'type': 'integer'2951}], ['aria-sort', {2952 'type': 'token',2953 'values': ['ascending', 'descending', 'none', 'other']2954}], ['aria-valuemax', {2955 'type': 'number'2956}], ['aria-valuemin', {2957 'type': 'number'2958}], ['aria-valuenow', {2959 'type': 'number'2960}], ['aria-valuetext', {2961 'type': 'string'2962}]];2963var ariaPropsMap = {2964 entries: function entries() {2965 return properties;2966 },2967 get: function get(key) {2968 var item = properties.find(function (tuple) {2969 return tuple[0] === key ? true : false;2970 });2971 return item && item[1];2972 },2973 has: function has(key) {2974 return !!this.get(key);2975 },2976 keys: function keys() {2977 return properties.map(function (_ref) {2978 var _ref2 = _slicedToArray$4(_ref, 1),2979 key = _ref2[0];2980 return key;2981 });2982 },2983 values: function values() {2984 return properties.map(function (_ref3) {2985 var _ref4 = _slicedToArray$4(_ref3, 2),2986 values = _ref4[1];2987 return values;2988 });2989 }2990};2991var _default$2c = ariaPropsMap;2992ariaPropsMap$1.default = _default$2c;2993var domMap$1 = {};2994Object.defineProperty(domMap$1, "__esModule", {2995 value: true2996});2997domMap$1.default = void 0;2998function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$4(arr, i) || _nonIterableRest$3(); }2999function _nonIterableRest$3() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }3000function _unsupportedIterableToArray$4(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$4(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$4(o, minLen); }3001function _arrayLikeToArray$4(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }3002function _iterableToArrayLimit$3(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }3003function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }3004var dom$1 = [['a', {3005 reserved: false3006}], ['abbr', {3007 reserved: false3008}], ['acronym', {3009 reserved: false3010}], ['address', {3011 reserved: false3012}], ['applet', {3013 reserved: false3014}], ['area', {3015 reserved: false3016}], ['article', {3017 reserved: false3018}], ['aside', {3019 reserved: false3020}], ['audio', {3021 reserved: false3022}], ['b', {3023 reserved: false3024}], ['base', {3025 reserved: true3026}], ['bdi', {3027 reserved: false3028}], ['bdo', {3029 reserved: false3030}], ['big', {3031 reserved: false3032}], ['blink', {3033 reserved: false3034}], ['blockquote', {3035 reserved: false3036}], ['body', {3037 reserved: false3038}], ['br', {3039 reserved: false3040}], ['button', {3041 reserved: false3042}], ['canvas', {3043 reserved: false3044}], ['caption', {3045 reserved: false3046}], ['center', {3047 reserved: false3048}], ['cite', {3049 reserved: false3050}], ['code', {3051 reserved: false3052}], ['col', {3053 reserved: true3054}], ['colgroup', {3055 reserved: true3056}], ['content', {3057 reserved: false3058}], ['data', {3059 reserved: false3060}], ['datalist', {3061 reserved: false3062}], ['dd', {3063 reserved: false3064}], ['del', {3065 reserved: false3066}], ['details', {3067 reserved: false3068}], ['dfn', {3069 reserved: false3070}], ['dialog', {3071 reserved: false3072}], ['dir', {3073 reserved: false3074}], ['div', {3075 reserved: false3076}], ['dl', {3077 reserved: false3078}], ['dt', {3079 reserved: false3080}], ['em', {3081 reserved: false3082}], ['embed', {3083 reserved: false3084}], ['fieldset', {3085 reserved: false3086}], ['figcaption', {3087 reserved: false3088}], ['figure', {3089 reserved: false3090}], ['font', {3091 reserved: false3092}], ['footer', {3093 reserved: false3094}], ['form', {3095 reserved: false3096}], ['frame', {3097 reserved: false3098}], ['frameset', {3099 reserved: false3100}], ['h1', {3101 reserved: false3102}], ['h2', {3103 reserved: false3104}], ['h3', {3105 reserved: false3106}], ['h4', {3107 reserved: false3108}], ['h5', {3109 reserved: false3110}], ['h6', {3111 reserved: false3112}], ['head', {3113 reserved: true3114}], ['header', {3115 reserved: false3116}], ['hgroup', {3117 reserved: false3118}], ['hr', {3119 reserved: false3120}], ['html', {3121 reserved: true3122}], ['i', {3123 reserved: false3124}], ['iframe', {3125 reserved: false3126}], ['img', {3127 reserved: false3128}], ['input', {3129 reserved: false3130}], ['ins', {3131 reserved: false3132}], ['kbd', {3133 reserved: false3134}], ['keygen', {3135 reserved: false3136}], ['label', {3137 reserved: false3138}], ['legend', {3139 reserved: false3140}], ['li', {3141 reserved: false3142}], ['link', {3143 reserved: true3144}], ['main', {3145 reserved: false3146}], ['map', {3147 reserved: false3148}], ['mark', {3149 reserved: false3150}], ['marquee', {3151 reserved: false3152}], ['menu', {3153 reserved: false3154}], ['menuitem', {3155 reserved: false3156}], ['meta', {3157 reserved: true3158}], ['meter', {3159 reserved: false3160}], ['nav', {3161 reserved: false3162}], ['noembed', {3163 reserved: true3164}], ['noscript', {3165 reserved: true3166}], ['object', {3167 reserved: false3168}], ['ol', {3169 reserved: false3170}], ['optgroup', {3171 reserved: false3172}], ['option', {3173 reserved: false3174}], ['output', {3175 reserved: false3176}], ['p', {3177 reserved: false3178}], ['param', {3179 reserved: true3180}], ['picture', {3181 reserved: true3182}], ['pre', {3183 reserved: false3184}], ['progress', {3185 reserved: false3186}], ['q', {3187 reserved: false3188}], ['rp', {3189 reserved: false3190}], ['rt', {3191 reserved: false3192}], ['rtc', {3193 reserved: false3194}], ['ruby', {3195 reserved: false3196}], ['s', {3197 reserved: false3198}], ['samp', {3199 reserved: false3200}], ['script', {3201 reserved: true3202}], ['section', {3203 reserved: false3204}], ['select', {3205 reserved: false3206}], ['small', {3207 reserved: false3208}], ['source', {3209 reserved: true3210}], ['spacer', {3211 reserved: false3212}], ['span', {3213 reserved: false3214}], ['strike', {3215 reserved: false3216}], ['strong', {3217 reserved: false3218}], ['style', {3219 reserved: true3220}], ['sub', {3221 reserved: false3222}], ['summary', {3223 reserved: false3224}], ['sup', {3225 reserved: false3226}], ['table', {3227 reserved: false3228}], ['tbody', {3229 reserved: false3230}], ['td', {3231 reserved: false3232}], ['textarea', {3233 reserved: false3234}], ['tfoot', {3235 reserved: false3236}], ['th', {3237 reserved: false3238}], ['thead', {3239 reserved: false3240}], ['time', {3241 reserved: false3242}], ['title', {3243 reserved: true3244}], ['tr', {3245 reserved: false3246}], ['track', {3247 reserved: true3248}], ['tt', {3249 reserved: false3250}], ['u', {3251 reserved: false3252}], ['ul', {3253 reserved: false3254}], ['var', {3255 reserved: false3256}], ['video', {3257 reserved: false3258}], ['wbr', {3259 reserved: false3260}], ['xmp', {3261 reserved: false3262}]];3263var domMap = {3264 entries: function entries() {3265 return dom$1;3266 },3267 get: function get(key) {3268 var item = dom$1.find(function (tuple) {3269 return tuple[0] === key ? true : false;3270 });3271 return item && item[1];3272 },3273 has: function has(key) {3274 return !!this.get(key);3275 },3276 keys: function keys() {3277 return dom$1.map(function (_ref) {3278 var _ref2 = _slicedToArray$3(_ref, 1),3279 key = _ref2[0];3280 return key;3281 });3282 },3283 values: function values() {3284 return dom$1.map(function (_ref3) {3285 var _ref4 = _slicedToArray$3(_ref3, 2),3286 values = _ref4[1];3287 return values;3288 });3289 }3290};3291var _default$2b = domMap;3292domMap$1.default = _default$2b;3293var rolesMap$1 = {};3294var ariaAbstractRoles$1 = {};3295var commandRole$1 = {};3296Object.defineProperty(commandRole$1, "__esModule", {3297 value: true3298});3299commandRole$1.default = void 0;3300var commandRole = {3301 abstract: true,3302 accessibleNameRequired: false,3303 baseConcepts: [],3304 childrenPresentational: false,3305 nameFrom: ['author'],3306 prohibitedProps: [],3307 props: {},3308 relatedConcepts: [{3309 concept: {3310 name: 'menuitem'3311 },3312 module: 'HTML'3313 }],3314 requireContextRole: [],3315 requiredContextRole: [],3316 requiredOwnedElements: [],3317 requiredProps: {},3318 superClass: [['roletype', 'widget']]3319};3320var _default$2a = commandRole;3321commandRole$1.default = _default$2a;3322var compositeRole$1 = {};3323Object.defineProperty(compositeRole$1, "__esModule", {3324 value: true3325});3326compositeRole$1.default = void 0;3327var compositeRole = {3328 abstract: true,3329 accessibleNameRequired: false,3330 baseConcepts: [],3331 childrenPresentational: false,3332 nameFrom: ['author'],3333 prohibitedProps: [],3334 props: {3335 'aria-activedescendant': null,3336 'aria-disabled': null3337 },3338 relatedConcepts: [],3339 requireContextRole: [],3340 requiredContextRole: [],3341 requiredOwnedElements: [],3342 requiredProps: {},3343 superClass: [['roletype', 'widget']]3344};3345var _default$29 = compositeRole;3346compositeRole$1.default = _default$29;3347var inputRole$1 = {};3348Object.defineProperty(inputRole$1, "__esModule", {3349 value: true3350});3351inputRole$1.default = void 0;3352var inputRole = {3353 abstract: true,3354 accessibleNameRequired: false,3355 baseConcepts: [],3356 childrenPresentational: false,3357 nameFrom: ['author'],3358 prohibitedProps: [],3359 props: {3360 'aria-disabled': null3361 },3362 relatedConcepts: [{3363 concept: {3364 name: 'input'3365 },3366 module: 'XForms'3367 }],3368 requireContextRole: [],3369 requiredContextRole: [],3370 requiredOwnedElements: [],3371 requiredProps: {},3372 superClass: [['roletype', 'widget']]3373};3374var _default$28 = inputRole;3375inputRole$1.default = _default$28;3376var landmarkRole$1 = {};3377Object.defineProperty(landmarkRole$1, "__esModule", {3378 value: true3379});3380landmarkRole$1.default = void 0;3381var landmarkRole = {3382 abstract: true,3383 accessibleNameRequired: false,3384 baseConcepts: [],3385 childrenPresentational: false,3386 nameFrom: ['author'],3387 prohibitedProps: [],3388 props: {},3389 relatedConcepts: [],3390 requireContextRole: [],3391 requiredContextRole: [],3392 requiredOwnedElements: [],3393 requiredProps: {},3394 superClass: [['roletype', 'structure', 'section']]3395};3396var _default$27 = landmarkRole;3397landmarkRole$1.default = _default$27;3398var rangeRole$1 = {};3399Object.defineProperty(rangeRole$1, "__esModule", {3400 value: true3401});3402rangeRole$1.default = void 0;3403var rangeRole = {3404 abstract: true,3405 accessibleNameRequired: false,3406 baseConcepts: [],3407 childrenPresentational: false,3408 nameFrom: ['author'],3409 prohibitedProps: [],3410 props: {3411 'aria-valuemax': null,3412 'aria-valuemin': null,3413 'aria-valuenow': null3414 },3415 relatedConcepts: [],3416 requireContextRole: [],3417 requiredContextRole: [],3418 requiredOwnedElements: [],3419 requiredProps: {},3420 superClass: [['roletype', 'structure']]3421};3422var _default$26 = rangeRole;3423rangeRole$1.default = _default$26;3424var roletypeRole$1 = {};3425Object.defineProperty(roletypeRole$1, "__esModule", {3426 value: true3427});3428roletypeRole$1.default = void 0;3429var roletypeRole = {3430 abstract: true,3431 accessibleNameRequired: false,3432 baseConcepts: [],3433 childrenPresentational: false,3434 nameFrom: [],3435 prohibitedProps: [],3436 props: {3437 'aria-atomic': null,3438 'aria-busy': null,3439 'aria-controls': null,3440 'aria-current': null,3441 'aria-describedby': null,3442 'aria-details': null,3443 'aria-dropeffect': null,3444 'aria-flowto': null,3445 'aria-grabbed': null,3446 'aria-hidden': null,3447 'aria-keyshortcuts': null,3448 'aria-label': null,3449 'aria-labelledby': null,3450 'aria-live': null,3451 'aria-owns': null,3452 'aria-relevant': null,3453 'aria-roledescription': null3454 },3455 relatedConcepts: [{3456 concept: {3457 name: 'rel'3458 },3459 module: 'HTML'3460 }, {3461 concept: {3462 name: 'role'3463 },3464 module: 'XHTML'3465 }, {3466 concept: {3467 name: 'type'3468 },3469 module: 'Dublin Core'3470 }],3471 requireContextRole: [],3472 requiredContextRole: [],3473 requiredOwnedElements: [],3474 requiredProps: {},3475 superClass: []3476};3477var _default$25 = roletypeRole;3478roletypeRole$1.default = _default$25;3479var sectionRole$1 = {};3480Object.defineProperty(sectionRole$1, "__esModule", {3481 value: true3482});3483sectionRole$1.default = void 0;3484var sectionRole = {3485 abstract: true,3486 accessibleNameRequired: false,3487 baseConcepts: [],3488 childrenPresentational: false,3489 nameFrom: [],3490 prohibitedProps: [],3491 props: {},3492 relatedConcepts: [{3493 concept: {3494 name: 'frontmatter'3495 },3496 module: 'DTB'3497 }, {3498 concept: {3499 name: 'level'3500 },3501 module: 'DTB'3502 }, {3503 concept: {3504 name: 'level'3505 },3506 module: 'SMIL'3507 }],3508 requireContextRole: [],3509 requiredContextRole: [],3510 requiredOwnedElements: [],3511 requiredProps: {},3512 superClass: [['roletype', 'structure']]3513};3514var _default$24 = sectionRole;3515sectionRole$1.default = _default$24;3516var sectionheadRole$1 = {};3517Object.defineProperty(sectionheadRole$1, "__esModule", {3518 value: true3519});3520sectionheadRole$1.default = void 0;3521var sectionheadRole = {3522 abstract: true,3523 accessibleNameRequired: false,3524 baseConcepts: [],3525 childrenPresentational: false,3526 nameFrom: ['author', 'contents'],3527 prohibitedProps: [],3528 props: {},3529 relatedConcepts: [],3530 requireContextRole: [],3531 requiredContextRole: [],3532 requiredOwnedElements: [],3533 requiredProps: {},3534 superClass: [['roletype', 'structure']]3535};3536var _default$23 = sectionheadRole;3537sectionheadRole$1.default = _default$23;3538var selectRole$1 = {};3539Object.defineProperty(selectRole$1, "__esModule", {3540 value: true3541});3542selectRole$1.default = void 0;3543var selectRole = {3544 abstract: true,3545 accessibleNameRequired: false,3546 baseConcepts: [],3547 childrenPresentational: false,3548 nameFrom: ['author'],3549 prohibitedProps: [],3550 props: {3551 'aria-orientation': null3552 },3553 relatedConcepts: [],3554 requireContextRole: [],3555 requiredContextRole: [],3556 requiredOwnedElements: [],3557 requiredProps: {},3558 superClass: [['roletype', 'widget', 'composite'], ['roletype', 'structure', 'section', 'group']]3559};3560var _default$22 = selectRole;3561selectRole$1.default = _default$22;3562var structureRole$1 = {};3563Object.defineProperty(structureRole$1, "__esModule", {3564 value: true3565});3566structureRole$1.default = void 0;3567var structureRole = {3568 abstract: true,3569 accessibleNameRequired: false,3570 baseConcepts: [],3571 childrenPresentational: false,3572 nameFrom: [],3573 prohibitedProps: [],3574 props: {},3575 relatedConcepts: [],3576 requireContextRole: [],3577 requiredContextRole: [],3578 requiredOwnedElements: [],3579 requiredProps: {},3580 superClass: [['roletype']]3581};3582var _default$21 = structureRole;3583structureRole$1.default = _default$21;3584var widgetRole$1 = {};3585Object.defineProperty(widgetRole$1, "__esModule", {3586 value: true3587});3588widgetRole$1.default = void 0;3589var widgetRole = {3590 abstract: true,3591 accessibleNameRequired: false,3592 baseConcepts: [],3593 childrenPresentational: false,3594 nameFrom: [],3595 prohibitedProps: [],3596 props: {},3597 relatedConcepts: [],3598 requireContextRole: [],3599 requiredContextRole: [],3600 requiredOwnedElements: [],3601 requiredProps: {},3602 superClass: [['roletype']]3603};3604var _default$20 = widgetRole;3605widgetRole$1.default = _default$20;3606var windowRole$1 = {};3607Object.defineProperty(windowRole$1, "__esModule", {3608 value: true3609});3610windowRole$1.default = void 0;3611var windowRole = {3612 abstract: true,3613 accessibleNameRequired: false,3614 baseConcepts: [],3615 childrenPresentational: false,3616 nameFrom: ['author'],3617 prohibitedProps: [],3618 props: {3619 'aria-modal': null3620 },3621 relatedConcepts: [],3622 requireContextRole: [],3623 requiredContextRole: [],3624 requiredOwnedElements: [],3625 requiredProps: {},3626 superClass: [['roletype']]3627};3628var _default$1$ = windowRole;3629windowRole$1.default = _default$1$;3630Object.defineProperty(ariaAbstractRoles$1, "__esModule", {3631 value: true3632});3633ariaAbstractRoles$1.default = void 0;3634var _commandRole = _interopRequireDefault$6(commandRole$1);3635var _compositeRole = _interopRequireDefault$6(compositeRole$1);3636var _inputRole = _interopRequireDefault$6(inputRole$1);3637var _landmarkRole = _interopRequireDefault$6(landmarkRole$1);3638var _rangeRole = _interopRequireDefault$6(rangeRole$1);3639var _roletypeRole = _interopRequireDefault$6(roletypeRole$1);3640var _sectionRole = _interopRequireDefault$6(sectionRole$1);3641var _sectionheadRole = _interopRequireDefault$6(sectionheadRole$1);3642var _selectRole = _interopRequireDefault$6(selectRole$1);3643var _structureRole = _interopRequireDefault$6(structureRole$1);3644var _widgetRole = _interopRequireDefault$6(widgetRole$1);3645var _windowRole = _interopRequireDefault$6(windowRole$1);3646function _interopRequireDefault$6(obj) { return obj && obj.__esModule ? obj : { default: obj }; }3647var ariaAbstractRoles = [['command', _commandRole.default], ['composite', _compositeRole.default], ['input', _inputRole.default], ['landmark', _landmarkRole.default], ['range', _rangeRole.default], ['roletype', _roletypeRole.default], ['section', _sectionRole.default], ['sectionhead', _sectionheadRole.default], ['select', _selectRole.default], ['structure', _structureRole.default], ['widget', _widgetRole.default], ['window', _windowRole.default]];3648var _default$1_ = ariaAbstractRoles;3649ariaAbstractRoles$1.default = _default$1_;3650var ariaLiteralRoles$1 = {};3651var alertRole$1 = {};3652Object.defineProperty(alertRole$1, "__esModule", {3653 value: true3654});3655alertRole$1.default = void 0;3656var alertRole = {3657 abstract: false,3658 accessibleNameRequired: false,3659 baseConcepts: [],3660 childrenPresentational: false,3661 nameFrom: ['author'],3662 prohibitedProps: [],3663 props: {3664 'aria-atomic': 'true',3665 'aria-live': 'assertive'3666 },3667 relatedConcepts: [{3668 concept: {3669 name: 'alert'3670 },3671 module: 'XForms'3672 }],3673 requireContextRole: [],3674 requiredContextRole: [],3675 requiredOwnedElements: [],3676 requiredProps: {},3677 superClass: [['roletype', 'structure', 'section']]3678};3679var _default$1Z = alertRole;3680alertRole$1.default = _default$1Z;3681var alertdialogRole$1 = {};3682Object.defineProperty(alertdialogRole$1, "__esModule", {3683 value: true3684});3685alertdialogRole$1.default = void 0;3686var alertdialogRole = {3687 abstract: false,3688 accessibleNameRequired: true,3689 baseConcepts: [],3690 childrenPresentational: false,3691 nameFrom: ['author'],3692 prohibitedProps: [],3693 props: {},3694 relatedConcepts: [{3695 concept: {3696 name: 'alert'3697 },3698 module: 'XForms'3699 }],3700 requireContextRole: [],3701 requiredContextRole: [],3702 requiredOwnedElements: [],3703 requiredProps: {},3704 superClass: [['roletype', 'structure', 'section', 'alert'], ['roletype', 'window', 'dialog']]3705};3706var _default$1Y = alertdialogRole;3707alertdialogRole$1.default = _default$1Y;3708var applicationRole$1 = {};3709Object.defineProperty(applicationRole$1, "__esModule", {3710 value: true3711});3712applicationRole$1.default = void 0;3713var applicationRole = {3714 abstract: false,3715 accessibleNameRequired: true,3716 baseConcepts: [],3717 childrenPresentational: false,3718 nameFrom: ['author'],3719 prohibitedProps: [],3720 props: {3721 'aria-activedescendant': null,3722 'aria-disabled': null,3723 'aria-errormessage': null,3724 'aria-expanded': null,3725 'aria-haspopup': null,3726 'aria-invalid': null3727 },3728 relatedConcepts: [{3729 concept: {3730 name: 'Device Independence Delivery Unit'3731 }3732 }],3733 requireContextRole: [],3734 requiredContextRole: [],3735 requiredOwnedElements: [],3736 requiredProps: {},3737 superClass: [['roletype', 'structure']]3738};3739var _default$1X = applicationRole;3740applicationRole$1.default = _default$1X;3741var articleRole$1 = {};3742Object.defineProperty(articleRole$1, "__esModule", {3743 value: true3744});3745articleRole$1.default = void 0;3746var articleRole = {3747 abstract: false,3748 accessibleNameRequired: false,3749 baseConcepts: [],3750 childrenPresentational: false,3751 nameFrom: ['author'],3752 prohibitedProps: [],3753 props: {3754 'aria-posinset': null,3755 'aria-setsize': null3756 },3757 relatedConcepts: [{3758 concept: {3759 name: 'article'3760 },3761 module: 'HTML'3762 }],3763 requireContextRole: [],3764 requiredContextRole: [],3765 requiredOwnedElements: [],3766 requiredProps: {},3767 superClass: [['roletype', 'structure', 'document']]3768};3769var _default$1W = articleRole;3770articleRole$1.default = _default$1W;3771var bannerRole$1 = {};3772Object.defineProperty(bannerRole$1, "__esModule", {3773 value: true3774});3775bannerRole$1.default = void 0;3776var bannerRole = {3777 abstract: false,3778 accessibleNameRequired: false,3779 baseConcepts: [],3780 childrenPresentational: false,3781 nameFrom: ['author'],3782 prohibitedProps: [],3783 props: {},3784 relatedConcepts: [{3785 concept: {3786 constraints: ['direct descendant of document'],3787 name: 'header'3788 },3789 module: 'HTML'3790 }],3791 requireContextRole: [],3792 requiredContextRole: [],3793 requiredOwnedElements: [],3794 requiredProps: {},3795 superClass: [['roletype', 'structure', 'section', 'landmark']]3796};3797var _default$1V = bannerRole;3798bannerRole$1.default = _default$1V;3799var blockquoteRole$1 = {};3800Object.defineProperty(blockquoteRole$1, "__esModule", {3801 value: true3802});3803blockquoteRole$1.default = void 0;3804var blockquoteRole = {3805 abstract: false,3806 accessibleNameRequired: false,3807 baseConcepts: [],3808 childrenPresentational: false,3809 nameFrom: ['author'],3810 prohibitedProps: [],3811 props: {},3812 relatedConcepts: [],3813 requireContextRole: [],3814 requiredContextRole: [],3815 requiredOwnedElements: [],3816 requiredProps: {},3817 superClass: [['roletype', 'structure', 'section']]3818};3819var _default$1U = blockquoteRole;3820blockquoteRole$1.default = _default$1U;3821var buttonRole$1 = {};3822Object.defineProperty(buttonRole$1, "__esModule", {3823 value: true3824});3825buttonRole$1.default = void 0;3826var buttonRole = {3827 abstract: false,3828 accessibleNameRequired: true,3829 baseConcepts: [],3830 childrenPresentational: true,3831 nameFrom: ['author', 'contents'],3832 prohibitedProps: [],3833 props: {3834 'aria-disabled': null,3835 'aria-expanded': null,3836 'aria-haspopup': null,3837 'aria-pressed': null3838 },3839 relatedConcepts: [{3840 concept: {3841 attributes: [{3842 constraints: ['set'],3843 name: 'aria-pressed'3844 }, {3845 name: 'type',3846 value: 'checkbox'3847 }],3848 name: 'input'3849 },3850 module: 'HTML'3851 }, {3852 concept: {3853 attributes: [{3854 name: 'aria-expanded',3855 value: 'false'3856 }],3857 name: 'summary'3858 },3859 module: 'HTML'3860 }, {3861 concept: {3862 attributes: [{3863 name: 'aria-expanded',3864 value: 'true'3865 }],3866 constraints: ['direct descendant of details element with the open attribute defined'],3867 name: 'summary'3868 },3869 module: 'HTML'3870 }, {3871 concept: {3872 attributes: [{3873 name: 'type',3874 value: 'button'3875 }],3876 name: 'input'3877 },3878 module: 'HTML'3879 }, {3880 concept: {3881 attributes: [{3882 name: 'type',3883 value: 'image'3884 }],3885 name: 'input'3886 },3887 module: 'HTML'3888 }, {3889 concept: {3890 attributes: [{3891 name: 'type',3892 value: 'reset'3893 }],3894 name: 'input'3895 },3896 module: 'HTML'3897 }, {3898 concept: {3899 attributes: [{3900 name: 'type',3901 value: 'submit'3902 }],3903 name: 'input'3904 },3905 module: 'HTML'3906 }, {3907 concept: {3908 name: 'button'3909 },3910 module: 'HTML'3911 }, {3912 concept: {3913 name: 'trigger'3914 },3915 module: 'XForms'3916 }],3917 requireContextRole: [],3918 requiredContextRole: [],3919 requiredOwnedElements: [],3920 requiredProps: {},3921 superClass: [['roletype', 'widget', 'command']]3922};3923var _default$1T = buttonRole;3924buttonRole$1.default = _default$1T;3925var captionRole$1 = {};3926Object.defineProperty(captionRole$1, "__esModule", {3927 value: true3928});3929captionRole$1.default = void 0;3930var captionRole = {3931 abstract: false,3932 accessibleNameRequired: false,3933 baseConcepts: [],3934 childrenPresentational: false,3935 nameFrom: ['prohibited'],3936 prohibitedProps: ['aria-label', 'aria-labelledby'],3937 props: {},3938 relatedConcepts: [],3939 requireContextRole: ['figure', 'grid', 'table'],3940 requiredContextRole: ['figure', 'grid', 'table'],3941 requiredOwnedElements: [],3942 requiredProps: {},3943 superClass: [['roletype', 'structure', 'section']]3944};3945var _default$1S = captionRole;3946captionRole$1.default = _default$1S;3947var cellRole$1 = {};3948Object.defineProperty(cellRole$1, "__esModule", {3949 value: true3950});3951cellRole$1.default = void 0;3952var cellRole = {3953 abstract: false,3954 accessibleNameRequired: false,3955 baseConcepts: [],3956 childrenPresentational: false,3957 nameFrom: ['author', 'contents'],3958 prohibitedProps: [],3959 props: {3960 'aria-colindex': null,3961 'aria-colspan': null,3962 'aria-rowindex': null,3963 'aria-rowspan': null3964 },3965 relatedConcepts: [{3966 concept: {3967 constraints: ['descendant of table'],3968 name: 'td'3969 },3970 module: 'HTML'3971 }],3972 requireContextRole: ['row'],3973 requiredContextRole: ['row'],3974 requiredOwnedElements: [],3975 requiredProps: {},3976 superClass: [['roletype', 'structure', 'section']]3977};3978var _default$1R = cellRole;3979cellRole$1.default = _default$1R;3980var checkboxRole$1 = {};3981Object.defineProperty(checkboxRole$1, "__esModule", {3982 value: true3983});3984checkboxRole$1.default = void 0;3985var checkboxRole = {3986 abstract: false,3987 accessibleNameRequired: true,3988 baseConcepts: [],3989 childrenPresentational: true,3990 nameFrom: ['author', 'contents'],3991 prohibitedProps: [],3992 props: {3993 'aria-checked': null,3994 'aria-errormessage': null,3995 'aria-expanded': null,3996 'aria-invalid': null,3997 'aria-readonly': null,3998 'aria-required': null3999 },4000 relatedConcepts: [{4001 concept: {4002 attributes: [{4003 name: 'type',4004 value: 'checkbox'4005 }],4006 name: 'input'4007 },4008 module: 'HTML'4009 }, {4010 concept: {4011 name: 'option'4012 },4013 module: 'ARIA'4014 }],4015 requireContextRole: [],4016 requiredContextRole: [],4017 requiredOwnedElements: [],4018 requiredProps: {4019 'aria-checked': null4020 },4021 superClass: [['roletype', 'widget', 'input']]4022};4023var _default$1Q = checkboxRole;4024checkboxRole$1.default = _default$1Q;4025var codeRole$1 = {};4026Object.defineProperty(codeRole$1, "__esModule", {4027 value: true4028});4029codeRole$1.default = void 0;4030var codeRole = {4031 abstract: false,4032 accessibleNameRequired: false,4033 baseConcepts: [],4034 childrenPresentational: false,4035 nameFrom: ['prohibited'],4036 prohibitedProps: ['aria-label', 'aria-labelledby'],4037 props: {},4038 relatedConcepts: [],4039 requireContextRole: [],4040 requiredContextRole: [],4041 requiredOwnedElements: [],4042 requiredProps: {},4043 superClass: [['roletype', 'structure', 'section']]4044};4045var _default$1P = codeRole;4046codeRole$1.default = _default$1P;4047var columnheaderRole$1 = {};4048Object.defineProperty(columnheaderRole$1, "__esModule", {4049 value: true4050});4051columnheaderRole$1.default = void 0;4052var columnheaderRole = {4053 abstract: false,4054 accessibleNameRequired: true,4055 baseConcepts: [],4056 childrenPresentational: false,4057 nameFrom: ['author', 'contents'],4058 prohibitedProps: [],4059 props: {4060 'aria-sort': null4061 },4062 relatedConcepts: [{4063 attributes: [{4064 name: 'scope',4065 value: 'col'4066 }],4067 concept: {4068 name: 'th'4069 },4070 module: 'HTML'4071 }],4072 requireContextRole: ['row'],4073 requiredContextRole: ['row'],4074 requiredOwnedElements: [],4075 requiredProps: {},4076 superClass: [['roletype', 'structure', 'section', 'cell'], ['roletype', 'structure', 'section', 'cell', 'gridcell'], ['roletype', 'widget', 'gridcell'], ['roletype', 'structure', 'sectionhead']]4077};4078var _default$1O = columnheaderRole;4079columnheaderRole$1.default = _default$1O;4080var comboboxRole$1 = {};4081Object.defineProperty(comboboxRole$1, "__esModule", {4082 value: true4083});4084comboboxRole$1.default = void 0;4085var comboboxRole = {4086 abstract: false,4087 accessibleNameRequired: true,4088 baseConcepts: [],4089 childrenPresentational: false,4090 nameFrom: ['author'],4091 prohibitedProps: [],4092 props: {4093 'aria-activedescendant': null,4094 'aria-autocomplete': null,4095 'aria-errormessage': null,4096 'aria-invalid': null,4097 'aria-readonly': null,4098 'aria-required': null,4099 'aria-expanded': 'false',4100 'aria-haspopup': 'listbox'4101 },4102 relatedConcepts: [{4103 concept: {4104 attributes: [{4105 constraints: ['set'],4106 name: 'list'4107 }, {4108 name: 'type',4109 value: 'email'4110 }],4111 name: 'input'4112 },4113 module: 'HTML'4114 }, {4115 concept: {4116 attributes: [{4117 constraints: ['set'],4118 name: 'list'4119 }, {4120 name: 'type',4121 value: 'search'4122 }],4123 name: 'input'4124 },4125 module: 'HTML'4126 }, {4127 concept: {4128 attributes: [{4129 constraints: ['set'],4130 name: 'list'4131 }, {4132 name: 'type',4133 value: 'tel'4134 }],4135 name: 'input'4136 },4137 module: 'HTML'4138 }, {4139 concept: {4140 attributes: [{4141 constraints: ['set'],4142 name: 'list'4143 }, {4144 name: 'type',4145 value: 'text'4146 }],4147 name: 'input'4148 },4149 module: 'HTML'4150 }, {4151 concept: {4152 attributes: [{4153 constraints: ['set'],4154 name: 'list'4155 }, {4156 name: 'type',4157 value: 'url'4158 }],4159 name: 'input'4160 },4161 module: 'HTML'4162 }, {4163 concept: {4164 attributes: [{4165 constraints: ['set'],4166 name: 'list'4167 }, {4168 name: 'type',4169 value: 'url'4170 }],4171 name: 'input'4172 },4173 module: 'HTML'4174 }, {4175 concept: {4176 attributes: [{4177 constraints: ['undefined'],4178 name: 'multiple'4179 }, {4180 constraints: ['undefined'],4181 name: 'size'4182 }],4183 name: 'select'4184 },4185 module: 'HTML'4186 }, {4187 concept: {4188 attributes: [{4189 constraints: ['undefined'],4190 name: 'multiple'4191 }, {4192 name: 'size',4193 value: 14194 }],4195 name: 'select'4196 },4197 module: 'HTML'4198 }, {4199 concept: {4200 name: 'select'4201 },4202 module: 'XForms'4203 }],4204 requireContextRole: [],4205 requiredContextRole: [],4206 requiredOwnedElements: [],4207 requiredProps: {4208 'aria-controls': null,4209 'aria-expanded': 'false'4210 },4211 superClass: [['roletype', 'widget', 'input']]4212};4213var _default$1N = comboboxRole;4214comboboxRole$1.default = _default$1N;4215var complementaryRole$1 = {};4216Object.defineProperty(complementaryRole$1, "__esModule", {4217 value: true4218});4219complementaryRole$1.default = void 0;4220var complementaryRole = {4221 abstract: false,4222 accessibleNameRequired: false,4223 baseConcepts: [],4224 childrenPresentational: false,4225 nameFrom: ['author'],4226 prohibitedProps: [],4227 props: {},4228 relatedConcepts: [{4229 concept: {4230 name: 'aside'4231 },4232 module: 'HTML'4233 }],4234 requireContextRole: [],4235 requiredContextRole: [],4236 requiredOwnedElements: [],4237 requiredProps: {},4238 superClass: [['roletype', 'structure', 'section', 'landmark']]4239};4240var _default$1M = complementaryRole;4241complementaryRole$1.default = _default$1M;4242var contentinfoRole$1 = {};4243Object.defineProperty(contentinfoRole$1, "__esModule", {4244 value: true4245});4246contentinfoRole$1.default = void 0;4247var contentinfoRole = {4248 abstract: false,4249 accessibleNameRequired: false,4250 baseConcepts: [],4251 childrenPresentational: false,4252 nameFrom: ['author'],4253 prohibitedProps: [],4254 props: {},4255 relatedConcepts: [{4256 concept: {4257 constraints: ['direct descendant of document'],4258 name: 'footer'4259 },4260 module: 'HTML'4261 }],4262 requireContextRole: [],4263 requiredContextRole: [],4264 requiredOwnedElements: [],4265 requiredProps: {},4266 superClass: [['roletype', 'structure', 'section', 'landmark']]4267};4268var _default$1L = contentinfoRole;4269contentinfoRole$1.default = _default$1L;4270var definitionRole$1 = {};4271Object.defineProperty(definitionRole$1, "__esModule", {4272 value: true4273});4274definitionRole$1.default = void 0;4275var definitionRole = {4276 abstract: false,4277 accessibleNameRequired: false,4278 baseConcepts: [],4279 childrenPresentational: false,4280 nameFrom: ['author'],4281 prohibitedProps: [],4282 props: {},4283 relatedConcepts: [{4284 concept: {4285 name: 'dd'4286 },4287 module: 'HTML'4288 }],4289 requireContextRole: [],4290 requiredContextRole: [],4291 requiredOwnedElements: [],4292 requiredProps: {},4293 superClass: [['roletype', 'structure', 'section']]4294};4295var _default$1K = definitionRole;4296definitionRole$1.default = _default$1K;4297var deletionRole$1 = {};4298Object.defineProperty(deletionRole$1, "__esModule", {4299 value: true4300});4301deletionRole$1.default = void 0;4302var deletionRole = {4303 abstract: false,4304 accessibleNameRequired: false,4305 baseConcepts: [],4306 childrenPresentational: false,4307 nameFrom: ['prohibited'],4308 prohibitedProps: ['aria-label', 'aria-labelledby'],4309 props: {},4310 relatedConcepts: [],4311 requireContextRole: [],4312 requiredContextRole: [],4313 requiredOwnedElements: [],4314 requiredProps: {},4315 superClass: [['roletype', 'structure', 'section']]4316};4317var _default$1J = deletionRole;4318deletionRole$1.default = _default$1J;4319var dialogRole$1 = {};4320Object.defineProperty(dialogRole$1, "__esModule", {4321 value: true4322});4323dialogRole$1.default = void 0;4324var dialogRole = {4325 abstract: false,4326 accessibleNameRequired: true,4327 baseConcepts: [],4328 childrenPresentational: false,4329 nameFrom: ['author'],4330 prohibitedProps: [],4331 props: {},4332 relatedConcepts: [{4333 concept: {4334 name: 'dialog'4335 },4336 module: 'HTML'4337 }],4338 requireContextRole: [],4339 requiredContextRole: [],4340 requiredOwnedElements: [],4341 requiredProps: {},4342 superClass: [['roletype', 'window']]4343};4344var _default$1I = dialogRole;4345dialogRole$1.default = _default$1I;4346var directoryRole$1 = {};4347Object.defineProperty(directoryRole$1, "__esModule", {4348 value: true4349});4350directoryRole$1.default = void 0;4351var directoryRole = {4352 abstract: false,4353 accessibleNameRequired: false,4354 baseConcepts: [],4355 childrenPresentational: false,4356 nameFrom: ['author'],4357 prohibitedProps: [],4358 props: {},4359 relatedConcepts: [{4360 module: 'DAISY Guide'4361 }],4362 requireContextRole: [],4363 requiredContextRole: [],4364 requiredOwnedElements: [],4365 requiredProps: {},4366 superClass: [['roletype', 'structure', 'section', 'list']]4367};4368var _default$1H = directoryRole;4369directoryRole$1.default = _default$1H;4370var documentRole$1 = {};4371Object.defineProperty(documentRole$1, "__esModule", {4372 value: true4373});4374documentRole$1.default = void 0;4375var documentRole = {4376 abstract: false,4377 accessibleNameRequired: false,4378 baseConcepts: [],4379 childrenPresentational: false,4380 nameFrom: ['author'],4381 prohibitedProps: [],4382 props: {},4383 relatedConcepts: [{4384 concept: {4385 name: 'Device Independence Delivery Unit'4386 }4387 }, {4388 concept: {4389 name: 'body'4390 },4391 module: 'HTML'4392 }],4393 requireContextRole: [],4394 requiredContextRole: [],4395 requiredOwnedElements: [],4396 requiredProps: {},4397 superClass: [['roletype', 'structure']]4398};4399var _default$1G = documentRole;4400documentRole$1.default = _default$1G;4401var emphasisRole$1 = {};4402Object.defineProperty(emphasisRole$1, "__esModule", {4403 value: true4404});4405emphasisRole$1.default = void 0;4406var emphasisRole = {4407 abstract: false,4408 accessibleNameRequired: false,4409 baseConcepts: [],4410 childrenPresentational: false,4411 nameFrom: ['prohibited'],4412 prohibitedProps: ['aria-label', 'aria-labelledby'],4413 props: {},4414 relatedConcepts: [],4415 requireContextRole: [],4416 requiredContextRole: [],4417 requiredOwnedElements: [],4418 requiredProps: {},4419 superClass: [['roletype', 'structure', 'section']]4420};4421var _default$1F = emphasisRole;4422emphasisRole$1.default = _default$1F;4423var feedRole$1 = {};4424Object.defineProperty(feedRole$1, "__esModule", {4425 value: true4426});4427feedRole$1.default = void 0;4428var feedRole = {4429 abstract: false,4430 accessibleNameRequired: false,4431 baseConcepts: [],4432 childrenPresentational: false,4433 nameFrom: ['author'],4434 prohibitedProps: [],4435 props: {},4436 relatedConcepts: [],4437 requireContextRole: [],4438 requiredContextRole: [],4439 requiredOwnedElements: [['article']],4440 requiredProps: {},4441 superClass: [['roletype', 'structure', 'section', 'list']]4442};4443var _default$1E = feedRole;4444feedRole$1.default = _default$1E;4445var figureRole$1 = {};4446Object.defineProperty(figureRole$1, "__esModule", {4447 value: true4448});4449figureRole$1.default = void 0;4450var figureRole = {4451 abstract: false,4452 accessibleNameRequired: false,4453 baseConcepts: [],4454 childrenPresentational: false,4455 nameFrom: ['author'],4456 prohibitedProps: [],4457 props: {},4458 relatedConcepts: [{4459 concept: {4460 name: 'figure'4461 },4462 module: 'HTML'4463 }],4464 requireContextRole: [],4465 requiredContextRole: [],4466 requiredOwnedElements: [],4467 requiredProps: {},4468 superClass: [['roletype', 'structure', 'section']]4469};4470var _default$1D = figureRole;4471figureRole$1.default = _default$1D;4472var formRole$1 = {};4473Object.defineProperty(formRole$1, "__esModule", {4474 value: true4475});4476formRole$1.default = void 0;4477var formRole = {4478 abstract: false,4479 accessibleNameRequired: false,4480 baseConcepts: [],4481 childrenPresentational: false,4482 nameFrom: ['author'],4483 prohibitedProps: [],4484 props: {},4485 relatedConcepts: [{4486 concept: {4487 attributes: [{4488 constraints: ['set'],4489 name: 'aria-label'4490 }],4491 name: 'form'4492 },4493 module: 'HTML'4494 }, {4495 concept: {4496 attributes: [{4497 constraints: ['set'],4498 name: 'aria-labelledby'4499 }],4500 name: 'form'4501 },4502 module: 'HTML'4503 }, {4504 concept: {4505 attributes: [{4506 constraints: ['set'],4507 name: 'name'4508 }],4509 name: 'form'4510 },4511 module: 'HTML'4512 }],4513 requireContextRole: [],4514 requiredContextRole: [],4515 requiredOwnedElements: [],4516 requiredProps: {},4517 superClass: [['roletype', 'structure', 'section', 'landmark']]4518};4519var _default$1C = formRole;4520formRole$1.default = _default$1C;4521var genericRole$1 = {};4522Object.defineProperty(genericRole$1, "__esModule", {4523 value: true4524});4525genericRole$1.default = void 0;4526var genericRole = {4527 abstract: false,4528 accessibleNameRequired: false,4529 baseConcepts: [],4530 childrenPresentational: false,4531 nameFrom: ['prohibited'],4532 prohibitedProps: ['aria-label', 'aria-labelledby'],4533 props: {},4534 relatedConcepts: [{4535 concept: {4536 name: 'span'4537 },4538 module: 'HTML'4539 }, {4540 concept: {4541 name: 'div'4542 },4543 module: 'HTML'4544 }],4545 requireContextRole: [],4546 requiredContextRole: [],4547 requiredOwnedElements: [],4548 requiredProps: {},4549 superClass: [['roletype', 'structure']]4550};4551var _default$1B = genericRole;4552genericRole$1.default = _default$1B;4553var gridRole$1 = {};4554Object.defineProperty(gridRole$1, "__esModule", {4555 value: true4556});4557gridRole$1.default = void 0;4558var gridRole = {4559 abstract: false,4560 accessibleNameRequired: true,4561 baseConcepts: [],4562 childrenPresentational: false,4563 nameFrom: ['author'],4564 prohibitedProps: [],4565 props: {4566 'aria-multiselectable': null,4567 'aria-readonly': null4568 },4569 relatedConcepts: [{4570 concept: {4571 attributes: [{4572 name: 'role',4573 value: 'grid'4574 }],4575 name: 'table'4576 },4577 module: 'HTML'4578 }],4579 requireContextRole: [],4580 requiredContextRole: [],4581 requiredOwnedElements: [['row'], ['row', 'rowgroup']],4582 requiredProps: {},4583 superClass: [['roletype', 'widget', 'composite'], ['roletype', 'structure', 'section', 'table']]4584};4585var _default$1A = gridRole;4586gridRole$1.default = _default$1A;4587var gridcellRole$1 = {};4588Object.defineProperty(gridcellRole$1, "__esModule", {4589 value: true4590});4591gridcellRole$1.default = void 0;4592var gridcellRole = {4593 abstract: false,4594 accessibleNameRequired: false,4595 baseConcepts: [],4596 childrenPresentational: false,4597 nameFrom: ['author', 'contents'],4598 prohibitedProps: [],4599 props: {4600 'aria-disabled': null,4601 'aria-errormessage': null,4602 'aria-expanded': null,4603 'aria-haspopup': null,4604 'aria-invalid': null,4605 'aria-readonly': null,4606 'aria-required': null,4607 'aria-selected': null4608 },4609 relatedConcepts: [{4610 concept: {4611 attributes: [{4612 name: 'role',4613 value: 'gridcell'4614 }],4615 name: 'td'4616 },4617 module: 'HTML'4618 }],4619 requireContextRole: ['row'],4620 requiredContextRole: ['row'],4621 requiredOwnedElements: [],4622 requiredProps: {},4623 superClass: [['roletype', 'structure', 'section', 'cell'], ['roletype', 'widget']]4624};4625var _default$1z = gridcellRole;4626gridcellRole$1.default = _default$1z;4627var groupRole$1 = {};4628Object.defineProperty(groupRole$1, "__esModule", {4629 value: true4630});4631groupRole$1.default = void 0;4632var groupRole = {4633 abstract: false,4634 accessibleNameRequired: false,4635 baseConcepts: [],4636 childrenPresentational: false,4637 nameFrom: ['author'],4638 prohibitedProps: [],4639 props: {4640 'aria-activedescendant': null,4641 'aria-disabled': null4642 },4643 relatedConcepts: [{4644 concept: {4645 name: 'details'4646 },4647 module: 'HTML'4648 }, {4649 concept: {4650 name: 'fieldset'4651 },4652 module: 'HTML'4653 }, {4654 concept: {4655 name: 'optgroup'4656 },4657 module: 'HTML'4658 }],4659 requireContextRole: [],4660 requiredContextRole: [],4661 requiredOwnedElements: [],4662 requiredProps: {},4663 superClass: [['roletype', 'structure', 'section']]4664};4665var _default$1y = groupRole;4666groupRole$1.default = _default$1y;4667var headingRole$1 = {};4668Object.defineProperty(headingRole$1, "__esModule", {4669 value: true4670});4671headingRole$1.default = void 0;4672var headingRole = {4673 abstract: false,4674 accessibleNameRequired: true,4675 baseConcepts: [],4676 childrenPresentational: false,4677 nameFrom: ['author', 'contents'],4678 prohibitedProps: [],4679 props: {4680 'aria-level': '2'4681 },4682 relatedConcepts: [{4683 concept: {4684 name: 'h1'4685 },4686 module: 'HTML'4687 }, {4688 concept: {4689 name: 'h2'4690 },4691 module: 'HTML'4692 }, {4693 concept: {4694 name: 'h3'4695 },4696 module: 'HTML'4697 }, {4698 concept: {4699 name: 'h4'4700 },4701 module: 'HTML'4702 }, {4703 concept: {4704 name: 'h5'4705 },4706 module: 'HTML'4707 }, {4708 concept: {4709 name: 'h6'4710 },4711 module: 'HTML'4712 }],4713 requireContextRole: [],4714 requiredContextRole: [],4715 requiredOwnedElements: [],4716 requiredProps: {4717 'aria-level': '2'4718 },4719 superClass: [['roletype', 'structure', 'sectionhead']]4720};4721var _default$1x = headingRole;4722headingRole$1.default = _default$1x;4723var imgRole$1 = {};4724Object.defineProperty(imgRole$1, "__esModule", {4725 value: true4726});4727imgRole$1.default = void 0;4728var imgRole = {4729 abstract: false,4730 accessibleNameRequired: true,4731 baseConcepts: [],4732 childrenPresentational: true,4733 nameFrom: ['author'],4734 prohibitedProps: [],4735 props: {},4736 relatedConcepts: [{4737 concept: {4738 attributes: [{4739 constraints: ['set'],4740 name: 'alt'4741 }],4742 name: 'img'4743 },4744 module: 'HTML'4745 }, {4746 concept: {4747 attributes: [{4748 constraints: ['undefined'],4749 name: 'alt'4750 }],4751 name: 'img'4752 },4753 module: 'HTML'4754 }, {4755 concept: {4756 name: 'imggroup'4757 },4758 module: 'DTB'4759 }],4760 requireContextRole: [],4761 requiredContextRole: [],4762 requiredOwnedElements: [],4763 requiredProps: {},4764 superClass: [['roletype', 'structure', 'section']]4765};4766var _default$1w = imgRole;4767imgRole$1.default = _default$1w;4768var insertionRole$1 = {};4769Object.defineProperty(insertionRole$1, "__esModule", {4770 value: true4771});4772insertionRole$1.default = void 0;4773var insertionRole = {4774 abstract: false,4775 accessibleNameRequired: false,4776 baseConcepts: [],4777 childrenPresentational: false,4778 nameFrom: ['prohibited'],4779 prohibitedProps: ['aria-label', 'aria-labelledby'],4780 props: {},4781 relatedConcepts: [],4782 requireContextRole: [],4783 requiredContextRole: [],4784 requiredOwnedElements: [],4785 requiredProps: {},4786 superClass: [['roletype', 'structure', 'section']]4787};4788var _default$1v = insertionRole;4789insertionRole$1.default = _default$1v;4790var linkRole$1 = {};4791Object.defineProperty(linkRole$1, "__esModule", {4792 value: true4793});4794linkRole$1.default = void 0;4795var linkRole = {4796 abstract: false,4797 accessibleNameRequired: true,4798 baseConcepts: [],4799 childrenPresentational: false,4800 nameFrom: ['author', 'contents'],4801 prohibitedProps: [],4802 props: {4803 'aria-disabled': null,4804 'aria-expanded': null,4805 'aria-haspopup': null4806 },4807 relatedConcepts: [{4808 concept: {4809 attributes: [{4810 name: 'href'4811 }],4812 name: 'a'4813 },4814 module: 'HTML'4815 }, {4816 concept: {4817 attributes: [{4818 name: 'href'4819 }],4820 name: 'area'4821 },4822 module: 'HTML'4823 }, {4824 concept: {4825 attributes: [{4826 name: 'href'4827 }],4828 name: 'link'4829 },4830 module: 'HTML'4831 }],4832 requireContextRole: [],4833 requiredContextRole: [],4834 requiredOwnedElements: [],4835 requiredProps: {},4836 superClass: [['roletype', 'widget', 'command']]4837};4838var _default$1u = linkRole;4839linkRole$1.default = _default$1u;4840var listRole$1 = {};4841Object.defineProperty(listRole$1, "__esModule", {4842 value: true4843});4844listRole$1.default = void 0;4845var listRole = {4846 abstract: false,4847 accessibleNameRequired: false,4848 baseConcepts: [],4849 childrenPresentational: false,4850 nameFrom: ['author'],4851 prohibitedProps: [],4852 props: {},4853 relatedConcepts: [{4854 concept: {4855 name: 'menu'4856 },4857 module: 'HTML'4858 }, {4859 concept: {4860 name: 'ol'4861 },4862 module: 'HTML'4863 }, {4864 concept: {4865 name: 'ul'4866 },4867 module: 'HTML'4868 }],4869 requireContextRole: [],4870 requiredContextRole: [],4871 requiredOwnedElements: [['listitem']],4872 requiredProps: {},4873 superClass: [['roletype', 'structure', 'section']]4874};4875var _default$1t = listRole;4876listRole$1.default = _default$1t;4877var listboxRole$1 = {};4878Object.defineProperty(listboxRole$1, "__esModule", {4879 value: true4880});4881listboxRole$1.default = void 0;4882var listboxRole = {4883 abstract: false,4884 accessibleNameRequired: true,4885 baseConcepts: [],4886 childrenPresentational: false,4887 nameFrom: ['author'],4888 prohibitedProps: [],4889 props: {4890 'aria-errormessage': null,4891 'aria-expanded': null,4892 'aria-invalid': null,4893 'aria-multiselectable': null,4894 'aria-readonly': null,4895 'aria-required': null,4896 'aria-orientation': 'vertical'4897 },4898 relatedConcepts: [{4899 concept: {4900 attributes: [{4901 constraints: ['>1'],4902 name: 'size'4903 }, {4904 name: 'multiple'4905 }],4906 name: 'select'4907 },4908 module: 'HTML'4909 }, {4910 concept: {4911 attributes: [{4912 constraints: ['>1'],4913 name: 'size'4914 }],4915 name: 'select'4916 },4917 module: 'HTML'4918 }, {4919 concept: {4920 attributes: [{4921 name: 'multiple'4922 }],4923 name: 'select'4924 },4925 module: 'HTML'4926 }, {4927 concept: {4928 name: 'datalist'4929 },4930 module: 'HTML'4931 }, {4932 concept: {4933 name: 'list'4934 },4935 module: 'ARIA'4936 }, {4937 concept: {4938 name: 'select'4939 },4940 module: 'XForms'4941 }],4942 requireContextRole: [],4943 requiredContextRole: [],4944 requiredOwnedElements: [['option', 'group'], ['option']],4945 requiredProps: {},4946 superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]4947};4948var _default$1s = listboxRole;4949listboxRole$1.default = _default$1s;4950var listitemRole$1 = {};4951Object.defineProperty(listitemRole$1, "__esModule", {4952 value: true4953});4954listitemRole$1.default = void 0;4955var listitemRole = {4956 abstract: false,4957 accessibleNameRequired: false,4958 baseConcepts: [],4959 childrenPresentational: false,4960 nameFrom: ['author'],4961 prohibitedProps: [],4962 props: {4963 'aria-level': null,4964 'aria-posinset': null,4965 'aria-setsize': null4966 },4967 relatedConcepts: [{4968 concept: {4969 constraints: ['direct descendant of ol, ul or menu'],4970 name: 'li'4971 },4972 module: 'HTML'4973 }, {4974 concept: {4975 name: 'item'4976 },4977 module: 'XForms'4978 }],4979 requireContextRole: ['directory', 'list'],4980 requiredContextRole: ['directory', 'list'],4981 requiredOwnedElements: [],4982 requiredProps: {},4983 superClass: [['roletype', 'structure', 'section']]4984};4985var _default$1r = listitemRole;4986listitemRole$1.default = _default$1r;4987var logRole$1 = {};4988Object.defineProperty(logRole$1, "__esModule", {4989 value: true4990});4991logRole$1.default = void 0;4992var logRole = {4993 abstract: false,4994 accessibleNameRequired: false,4995 baseConcepts: [],4996 childrenPresentational: false,4997 nameFrom: ['author'],4998 prohibitedProps: [],4999 props: {5000 'aria-live': 'polite'5001 },5002 relatedConcepts: [],5003 requireContextRole: [],5004 requiredContextRole: [],5005 requiredOwnedElements: [],5006 requiredProps: {},5007 superClass: [['roletype', 'structure', 'section']]5008};5009var _default$1q = logRole;5010logRole$1.default = _default$1q;5011var mainRole$1 = {};5012Object.defineProperty(mainRole$1, "__esModule", {5013 value: true5014});5015mainRole$1.default = void 0;5016var mainRole = {5017 abstract: false,5018 accessibleNameRequired: false,5019 baseConcepts: [],5020 childrenPresentational: false,5021 nameFrom: ['author'],5022 prohibitedProps: [],5023 props: {},5024 relatedConcepts: [{5025 concept: {5026 name: 'main'5027 },5028 module: 'HTML'5029 }],5030 requireContextRole: [],5031 requiredContextRole: [],5032 requiredOwnedElements: [],5033 requiredProps: {},5034 superClass: [['roletype', 'structure', 'section', 'landmark']]5035};5036var _default$1p = mainRole;5037mainRole$1.default = _default$1p;5038var marqueeRole$1 = {};5039Object.defineProperty(marqueeRole$1, "__esModule", {5040 value: true5041});5042marqueeRole$1.default = void 0;5043var marqueeRole = {5044 abstract: false,5045 accessibleNameRequired: true,5046 baseConcepts: [],5047 childrenPresentational: false,5048 nameFrom: ['author'],5049 prohibitedProps: [],5050 props: {},5051 relatedConcepts: [],5052 requireContextRole: [],5053 requiredContextRole: [],5054 requiredOwnedElements: [],5055 requiredProps: {},5056 superClass: [['roletype', 'structure', 'section']]5057};5058var _default$1o = marqueeRole;5059marqueeRole$1.default = _default$1o;5060var mathRole$1 = {};5061Object.defineProperty(mathRole$1, "__esModule", {5062 value: true5063});5064mathRole$1.default = void 0;5065var mathRole = {5066 abstract: false,5067 accessibleNameRequired: false,5068 baseConcepts: [],5069 childrenPresentational: false,5070 nameFrom: ['author'],5071 prohibitedProps: [],5072 props: {},5073 relatedConcepts: [{5074 concept: {5075 name: 'math'5076 },5077 module: 'HTML'5078 }],5079 requireContextRole: [],5080 requiredContextRole: [],5081 requiredOwnedElements: [],5082 requiredProps: {},5083 superClass: [['roletype', 'structure', 'section']]5084};5085var _default$1n = mathRole;5086mathRole$1.default = _default$1n;5087var menuRole$1 = {};5088Object.defineProperty(menuRole$1, "__esModule", {5089 value: true5090});5091menuRole$1.default = void 0;5092var menuRole = {5093 abstract: false,5094 accessibleNameRequired: false,5095 baseConcepts: [],5096 childrenPresentational: false,5097 nameFrom: ['author'],5098 prohibitedProps: [],5099 props: {5100 'aria-orientation': 'vertical'5101 },5102 relatedConcepts: [{5103 concept: {5104 name: 'MENU'5105 },5106 module: 'JAPI'5107 }, {5108 concept: {5109 name: 'list'5110 },5111 module: 'ARIA'5112 }, {5113 concept: {5114 name: 'select'5115 },5116 module: 'XForms'5117 }, {5118 concept: {5119 name: 'sidebar'5120 },5121 module: 'DTB'5122 }],5123 requireContextRole: [],5124 requiredContextRole: [],5125 requiredOwnedElements: [['menuitem', 'group'], ['menuitemradio', 'group'], ['menuitemcheckbox', 'group'], ['menuitem'], ['menuitemcheckbox'], ['menuitemradio']],5126 requiredProps: {},5127 superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]5128};5129var _default$1m = menuRole;5130menuRole$1.default = _default$1m;5131var menubarRole$1 = {};5132Object.defineProperty(menubarRole$1, "__esModule", {5133 value: true5134});5135menubarRole$1.default = void 0;5136var menubarRole = {5137 abstract: false,5138 accessibleNameRequired: false,5139 baseConcepts: [],5140 childrenPresentational: false,5141 nameFrom: ['author'],5142 prohibitedProps: [],5143 props: {5144 'aria-orientation': 'horizontal'5145 },5146 relatedConcepts: [{5147 concept: {5148 name: 'toolbar'5149 },5150 module: 'ARIA'5151 }],5152 requireContextRole: [],5153 requiredContextRole: [],5154 requiredOwnedElements: [['menuitem', 'group'], ['menuitemradio', 'group'], ['menuitemcheckbox', 'group'], ['menuitem'], ['menuitemcheckbox'], ['menuitemradio']],5155 requiredProps: {},5156 superClass: [['roletype', 'widget', 'composite', 'select', 'menu'], ['roletype', 'structure', 'section', 'group', 'select', 'menu']]5157};5158var _default$1l = menubarRole;5159menubarRole$1.default = _default$1l;5160var menuitemRole$1 = {};5161Object.defineProperty(menuitemRole$1, "__esModule", {5162 value: true5163});5164menuitemRole$1.default = void 0;5165var menuitemRole = {5166 abstract: false,5167 accessibleNameRequired: true,5168 baseConcepts: [],5169 childrenPresentational: false,5170 nameFrom: ['author', 'contents'],5171 prohibitedProps: [],5172 props: {5173 'aria-disabled': null,5174 'aria-expanded': null,5175 'aria-haspopup': null,5176 'aria-posinset': null,5177 'aria-setsize': null5178 },5179 relatedConcepts: [{5180 concept: {5181 name: 'MENU_ITEM'5182 },5183 module: 'JAPI'5184 }, {5185 concept: {5186 name: 'listitem'5187 },5188 module: 'ARIA'5189 }, {5190 concept: {5191 name: 'menuitem'5192 },5193 module: 'HTML'5194 }, {5195 concept: {5196 name: 'option'5197 },5198 module: 'ARIA'5199 }],5200 requireContextRole: ['group', 'menu', 'menubar'],5201 requiredContextRole: ['group', 'menu', 'menubar'],5202 requiredOwnedElements: [],5203 requiredProps: {},5204 superClass: [['roletype', 'widget', 'command']]5205};5206var _default$1k = menuitemRole;5207menuitemRole$1.default = _default$1k;5208var menuitemcheckboxRole$1 = {};5209Object.defineProperty(menuitemcheckboxRole$1, "__esModule", {5210 value: true5211});5212menuitemcheckboxRole$1.default = void 0;5213var menuitemcheckboxRole = {5214 abstract: false,5215 accessibleNameRequired: true,5216 baseConcepts: [],5217 childrenPresentational: true,5218 nameFrom: ['author', 'contents'],5219 prohibitedProps: [],5220 props: {},5221 relatedConcepts: [{5222 concept: {5223 name: 'menuitem'5224 },5225 module: 'ARIA'5226 }],5227 requireContextRole: ['group', 'menu', 'menubar'],5228 requiredContextRole: ['group', 'menu', 'menubar'],5229 requiredOwnedElements: [],5230 requiredProps: {5231 'aria-checked': null5232 },5233 superClass: [['roletype', 'widget', 'input', 'checkbox'], ['roletype', 'widget', 'command', 'menuitem']]5234};5235var _default$1j = menuitemcheckboxRole;5236menuitemcheckboxRole$1.default = _default$1j;5237var menuitemradioRole$1 = {};5238Object.defineProperty(menuitemradioRole$1, "__esModule", {5239 value: true5240});5241menuitemradioRole$1.default = void 0;5242var menuitemradioRole = {5243 abstract: false,5244 accessibleNameRequired: true,5245 baseConcepts: [],5246 childrenPresentational: true,5247 nameFrom: ['author', 'contents'],5248 prohibitedProps: [],5249 props: {},5250 relatedConcepts: [{5251 concept: {5252 name: 'menuitem'5253 },5254 module: 'ARIA'5255 }],5256 requireContextRole: ['group', 'menu', 'menubar'],5257 requiredContextRole: ['group', 'menu', 'menubar'],5258 requiredOwnedElements: [],5259 requiredProps: {5260 'aria-checked': null5261 },5262 superClass: [['roletype', 'widget', 'input', 'checkbox', 'menuitemcheckbox'], ['roletype', 'widget', 'command', 'menuitem', 'menuitemcheckbox'], ['roletype', 'widget', 'input', 'radio']]5263};5264var _default$1i = menuitemradioRole;5265menuitemradioRole$1.default = _default$1i;5266var meterRole$1 = {};5267Object.defineProperty(meterRole$1, "__esModule", {5268 value: true5269});5270meterRole$1.default = void 0;5271var meterRole = {5272 abstract: false,5273 accessibleNameRequired: true,5274 baseConcepts: [],5275 childrenPresentational: true,5276 nameFrom: ['author'],5277 prohibitedProps: [],5278 props: {5279 'aria-valuetext': null,5280 'aria-valuemax': '100',5281 'aria-valuemin': '0'5282 },5283 relatedConcepts: [],5284 requireContextRole: [],5285 requiredContextRole: [],5286 requiredOwnedElements: [],5287 requiredProps: {5288 'aria-valuenow': null5289 },5290 superClass: [['roletype', 'structure', 'range']]5291};5292var _default$1h = meterRole;5293meterRole$1.default = _default$1h;5294var navigationRole$1 = {};5295Object.defineProperty(navigationRole$1, "__esModule", {5296 value: true5297});5298navigationRole$1.default = void 0;5299var navigationRole = {5300 abstract: false,5301 accessibleNameRequired: false,5302 baseConcepts: [],5303 childrenPresentational: false,5304 nameFrom: ['author'],5305 prohibitedProps: [],5306 props: {},5307 relatedConcepts: [{5308 concept: {5309 name: 'nav'5310 },5311 module: 'HTML'5312 }],5313 requireContextRole: [],5314 requiredContextRole: [],5315 requiredOwnedElements: [],5316 requiredProps: {},5317 superClass: [['roletype', 'structure', 'section', 'landmark']]5318};5319var _default$1g = navigationRole;5320navigationRole$1.default = _default$1g;5321var noneRole$1 = {};5322Object.defineProperty(noneRole$1, "__esModule", {5323 value: true5324});5325noneRole$1.default = void 0;5326var noneRole = {5327 abstract: false,5328 accessibleNameRequired: false,5329 baseConcepts: [],5330 childrenPresentational: false,5331 nameFrom: [],5332 prohibitedProps: [],5333 props: {},5334 relatedConcepts: [],5335 requireContextRole: [],5336 requiredContextRole: [],5337 requiredOwnedElements: [],5338 requiredProps: {},5339 superClass: []5340};5341var _default$1f = noneRole;5342noneRole$1.default = _default$1f;5343var noteRole$1 = {};5344Object.defineProperty(noteRole$1, "__esModule", {5345 value: true5346});5347noteRole$1.default = void 0;5348var noteRole = {5349 abstract: false,5350 accessibleNameRequired: false,5351 baseConcepts: [],5352 childrenPresentational: false,5353 nameFrom: ['author'],5354 prohibitedProps: [],5355 props: {},5356 relatedConcepts: [],5357 requireContextRole: [],5358 requiredContextRole: [],5359 requiredOwnedElements: [],5360 requiredProps: {},5361 superClass: [['roletype', 'structure', 'section']]5362};5363var _default$1e = noteRole;5364noteRole$1.default = _default$1e;5365var optionRole$1 = {};5366Object.defineProperty(optionRole$1, "__esModule", {5367 value: true5368});5369optionRole$1.default = void 0;5370var optionRole = {5371 abstract: false,5372 accessibleNameRequired: true,5373 baseConcepts: [],5374 childrenPresentational: true,5375 nameFrom: ['author', 'contents'],5376 prohibitedProps: [],5377 props: {5378 'aria-checked': null,5379 'aria-posinset': null,5380 'aria-setsize': null,5381 'aria-selected': 'false'5382 },5383 relatedConcepts: [{5384 concept: {5385 name: 'item'5386 },5387 module: 'XForms'5388 }, {5389 concept: {5390 name: 'listitem'5391 },5392 module: 'ARIA'5393 }, {5394 concept: {5395 name: 'option'5396 },5397 module: 'HTML'5398 }],5399 requireContextRole: [],5400 requiredContextRole: [],5401 requiredOwnedElements: [],5402 requiredProps: {5403 'aria-selected': 'false'5404 },5405 superClass: [['roletype', 'widget', 'input']]5406};5407var _default$1d = optionRole;5408optionRole$1.default = _default$1d;5409var paragraphRole$1 = {};5410Object.defineProperty(paragraphRole$1, "__esModule", {5411 value: true5412});5413paragraphRole$1.default = void 0;5414var paragraphRole = {5415 abstract: false,5416 accessibleNameRequired: false,5417 baseConcepts: [],5418 childrenPresentational: false,5419 nameFrom: ['prohibited'],5420 prohibitedProps: ['aria-label', 'aria-labelledby'],5421 props: {},5422 relatedConcepts: [],5423 requireContextRole: [],5424 requiredContextRole: [],5425 requiredOwnedElements: [],5426 requiredProps: {},5427 superClass: [['roletype', 'structure', 'section']]5428};5429var _default$1c = paragraphRole;5430paragraphRole$1.default = _default$1c;5431var presentationRole$1 = {};5432Object.defineProperty(presentationRole$1, "__esModule", {5433 value: true5434});5435presentationRole$1.default = void 0;5436var presentationRole = {5437 abstract: false,5438 accessibleNameRequired: false,5439 baseConcepts: [],5440 childrenPresentational: false,5441 nameFrom: ['prohibited'],5442 prohibitedProps: ['aria-label', 'aria-labelledby'],5443 props: {},5444 relatedConcepts: [],5445 requireContextRole: [],5446 requiredContextRole: [],5447 requiredOwnedElements: [],5448 requiredProps: {},5449 superClass: [['roletype', 'structure']]5450};5451var _default$1b = presentationRole;5452presentationRole$1.default = _default$1b;5453var progressbarRole$1 = {};5454Object.defineProperty(progressbarRole$1, "__esModule", {5455 value: true5456});5457progressbarRole$1.default = void 0;5458var progressbarRole = {5459 abstract: false,5460 accessibleNameRequired: true,5461 baseConcepts: [],5462 childrenPresentational: true,5463 nameFrom: ['author'],5464 prohibitedProps: [],5465 props: {5466 'aria-valuetext': null5467 },5468 relatedConcepts: [{5469 concept: {5470 name: 'progress'5471 },5472 module: 'HTML'5473 }, {5474 concept: {5475 name: 'status'5476 },5477 module: 'ARIA'5478 }],5479 requireContextRole: [],5480 requiredContextRole: [],5481 requiredOwnedElements: [],5482 requiredProps: {},5483 superClass: [['roletype', 'structure', 'range'], ['roletype', 'widget']]5484};5485var _default$1a = progressbarRole;5486progressbarRole$1.default = _default$1a;5487var radioRole$1 = {};5488Object.defineProperty(radioRole$1, "__esModule", {5489 value: true5490});5491radioRole$1.default = void 0;5492var radioRole = {5493 abstract: false,5494 accessibleNameRequired: true,5495 baseConcepts: [],5496 childrenPresentational: true,5497 nameFrom: ['author', 'contents'],5498 prohibitedProps: [],5499 props: {5500 'aria-checked': null,5501 'aria-posinset': null,5502 'aria-setsize': null5503 },5504 relatedConcepts: [{5505 concept: {5506 attributes: [{5507 name: 'type',5508 value: 'radio'5509 }],5510 name: 'input'5511 },5512 module: 'HTML'5513 }],5514 requireContextRole: [],5515 requiredContextRole: [],5516 requiredOwnedElements: [],5517 requiredProps: {5518 'aria-checked': null5519 },5520 superClass: [['roletype', 'widget', 'input']]5521};5522var _default$19 = radioRole;5523radioRole$1.default = _default$19;5524var radiogroupRole$1 = {};5525Object.defineProperty(radiogroupRole$1, "__esModule", {5526 value: true5527});5528radiogroupRole$1.default = void 0;5529var radiogroupRole = {5530 abstract: false,5531 accessibleNameRequired: true,5532 baseConcepts: [],5533 childrenPresentational: false,5534 nameFrom: ['author'],5535 prohibitedProps: [],5536 props: {5537 'aria-errormessage': null,5538 'aria-invalid': null,5539 'aria-readonly': null,5540 'aria-required': null5541 },5542 relatedConcepts: [{5543 concept: {5544 name: 'list'5545 },5546 module: 'ARIA'5547 }],5548 requireContextRole: [],5549 requiredContextRole: [],5550 requiredOwnedElements: [['radio']],5551 requiredProps: {},5552 superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]5553};5554var _default$18 = radiogroupRole;5555radiogroupRole$1.default = _default$18;5556var regionRole$1 = {};5557Object.defineProperty(regionRole$1, "__esModule", {5558 value: true5559});5560regionRole$1.default = void 0;5561var regionRole = {5562 abstract: false,5563 accessibleNameRequired: true,5564 baseConcepts: [],5565 childrenPresentational: false,5566 nameFrom: ['author'],5567 prohibitedProps: [],5568 props: {},5569 relatedConcepts: [{5570 concept: {5571 attributes: [{5572 constraints: ['set'],5573 name: 'aria-label'5574 }],5575 name: 'section'5576 },5577 module: 'HTML'5578 }, {5579 concept: {5580 attributes: [{5581 constraints: ['set'],5582 name: 'aria-labelledby'5583 }],5584 name: 'section'5585 },5586 module: 'HTML'5587 }, {5588 concept: {5589 name: 'Device Independence Glossart perceivable unit'5590 }5591 }, {5592 concept: {5593 name: 'frame'5594 },5595 module: 'HTML'5596 }],5597 requireContextRole: [],5598 requiredContextRole: [],5599 requiredOwnedElements: [],5600 requiredProps: {},5601 superClass: [['roletype', 'structure', 'section', 'landmark']]5602};5603var _default$17 = regionRole;5604regionRole$1.default = _default$17;5605var rowRole$1 = {};5606Object.defineProperty(rowRole$1, "__esModule", {5607 value: true5608});5609rowRole$1.default = void 0;5610var rowRole = {5611 abstract: false,5612 accessibleNameRequired: false,5613 baseConcepts: [],5614 childrenPresentational: false,5615 nameFrom: ['author', 'contents'],5616 prohibitedProps: [],5617 props: {5618 'aria-colindex': null,5619 'aria-expanded': null,5620 'aria-level': null,5621 'aria-posinset': null,5622 'aria-rowindex': null,5623 'aria-selected': null,5624 'aria-setsize': null5625 },5626 relatedConcepts: [{5627 concept: {5628 name: 'tr'5629 },5630 module: 'HTML'5631 }],5632 requireContextRole: ['grid', 'rowgroup', 'table', 'treegrid'],5633 requiredContextRole: ['grid', 'rowgroup', 'table', 'treegrid'],5634 requiredOwnedElements: [['cell'], ['columnheader'], ['gridcell'], ['rowheader']],5635 requiredProps: {},5636 superClass: [['roletype', 'structure', 'section', 'group'], ['roletype', 'widget']]5637};5638var _default$16 = rowRole;5639rowRole$1.default = _default$16;5640var rowgroupRole$1 = {};5641Object.defineProperty(rowgroupRole$1, "__esModule", {5642 value: true5643});5644rowgroupRole$1.default = void 0;5645var rowgroupRole = {5646 abstract: false,5647 accessibleNameRequired: false,5648 baseConcepts: [],5649 childrenPresentational: false,5650 nameFrom: ['author', 'contents'],5651 prohibitedProps: [],5652 props: {},5653 relatedConcepts: [{5654 concept: {5655 name: 'tbody'5656 },5657 module: 'HTML'5658 }, {5659 concept: {5660 name: 'tfoot'5661 },5662 module: 'HTML'5663 }, {5664 concept: {5665 name: 'thead'5666 },5667 module: 'HTML'5668 }],5669 requireContextRole: ['grid', 'table', 'treegrid'],5670 requiredContextRole: ['grid', 'table', 'treegrid'],5671 requiredOwnedElements: [['row']],5672 requiredProps: {},5673 superClass: [['roletype', 'structure']]5674};5675var _default$15 = rowgroupRole;5676rowgroupRole$1.default = _default$15;5677var rowheaderRole$1 = {};5678Object.defineProperty(rowheaderRole$1, "__esModule", {5679 value: true5680});5681rowheaderRole$1.default = void 0;5682var rowheaderRole = {5683 abstract: false,5684 accessibleNameRequired: true,5685 baseConcepts: [],5686 childrenPresentational: false,5687 nameFrom: ['author', 'contents'],5688 prohibitedProps: [],5689 props: {5690 'aria-sort': null5691 },5692 relatedConcepts: [{5693 concept: {5694 attributes: [{5695 name: 'scope',5696 value: 'row'5697 }],5698 name: 'th'5699 },5700 module: 'HTML'5701 }],5702 requireContextRole: ['row'],5703 requiredContextRole: ['row'],5704 requiredOwnedElements: [],5705 requiredProps: {},5706 superClass: [['roletype', 'structure', 'section', 'cell'], ['roletype', 'structure', 'section', 'cell', 'gridcell'], ['roletype', 'widget', 'gridcell'], ['roletype', 'structure', 'sectionhead']]5707};5708var _default$14 = rowheaderRole;5709rowheaderRole$1.default = _default$14;5710var scrollbarRole$1 = {};5711Object.defineProperty(scrollbarRole$1, "__esModule", {5712 value: true5713});5714scrollbarRole$1.default = void 0;5715var scrollbarRole = {5716 abstract: false,5717 accessibleNameRequired: false,5718 baseConcepts: [],5719 childrenPresentational: true,5720 nameFrom: ['author'],5721 prohibitedProps: [],5722 props: {5723 'aria-disabled': null,5724 'aria-valuetext': null,5725 'aria-orientation': 'vertical',5726 'aria-valuemax': '100',5727 'aria-valuemin': '0'5728 },5729 relatedConcepts: [],5730 requireContextRole: [],5731 requiredContextRole: [],5732 requiredOwnedElements: [],5733 requiredProps: {5734 'aria-controls': null,5735 'aria-valuenow': null5736 },5737 superClass: [['roletype', 'structure', 'range'], ['roletype', 'widget']]5738};5739var _default$13 = scrollbarRole;5740scrollbarRole$1.default = _default$13;5741var searchRole$1 = {};5742Object.defineProperty(searchRole$1, "__esModule", {5743 value: true5744});5745searchRole$1.default = void 0;5746var searchRole = {5747 abstract: false,5748 accessibleNameRequired: false,5749 baseConcepts: [],5750 childrenPresentational: false,5751 nameFrom: ['author'],5752 prohibitedProps: [],5753 props: {},5754 relatedConcepts: [],5755 requireContextRole: [],5756 requiredContextRole: [],5757 requiredOwnedElements: [],5758 requiredProps: {},5759 superClass: [['roletype', 'structure', 'section', 'landmark']]5760};5761var _default$12 = searchRole;5762searchRole$1.default = _default$12;5763var searchboxRole$1 = {};5764Object.defineProperty(searchboxRole$1, "__esModule", {5765 value: true5766});5767searchboxRole$1.default = void 0;5768var searchboxRole = {5769 abstract: false,5770 accessibleNameRequired: true,5771 baseConcepts: [],5772 childrenPresentational: false,5773 nameFrom: ['author'],5774 prohibitedProps: [],5775 props: {},5776 relatedConcepts: [{5777 concept: {5778 attributes: [{5779 constraints: ['undefined'],5780 name: 'list'5781 }, {5782 name: 'type',5783 value: 'search'5784 }],5785 name: 'input'5786 },5787 module: 'HTML'5788 }],5789 requireContextRole: [],5790 requiredContextRole: [],5791 requiredOwnedElements: [],5792 requiredProps: {},5793 superClass: [['roletype', 'widget', 'input', 'textbox']]5794};5795var _default$11 = searchboxRole;5796searchboxRole$1.default = _default$11;5797var separatorRole$1 = {};5798Object.defineProperty(separatorRole$1, "__esModule", {5799 value: true5800});5801separatorRole$1.default = void 0;5802var separatorRole = {5803 abstract: false,5804 accessibleNameRequired: false,5805 baseConcepts: [],5806 childrenPresentational: true,5807 nameFrom: ['author'],5808 prohibitedProps: [],5809 props: {5810 'aria-disabled': null,5811 'aria-orientation': 'horizontal',5812 'aria-valuemax': '100',5813 'aria-valuemin': '0',5814 'aria-valuenow': null,5815 'aria-valuetext': null5816 },5817 relatedConcepts: [{5818 concept: {5819 name: 'hr'5820 },5821 module: 'HTML'5822 }],5823 requireContextRole: [],5824 requiredContextRole: [],5825 requiredOwnedElements: [],5826 requiredProps: {},5827 superClass: [['roletype', 'structure']]5828};5829var _default$10 = separatorRole;5830separatorRole$1.default = _default$10;5831var sliderRole$1 = {};5832Object.defineProperty(sliderRole$1, "__esModule", {5833 value: true5834});5835sliderRole$1.default = void 0;5836var sliderRole = {5837 abstract: false,5838 accessibleNameRequired: true,5839 baseConcepts: [],5840 childrenPresentational: true,5841 nameFrom: ['author'],5842 prohibitedProps: [],5843 props: {5844 'aria-errormessage': null,5845 'aria-haspopup': null,5846 'aria-invalid': null,5847 'aria-readonly': null,5848 'aria-valuetext': null,5849 'aria-orientation': 'horizontal',5850 'aria-valuemax': '100',5851 'aria-valuemin': '0'5852 },5853 relatedConcepts: [{5854 concept: {5855 attributes: [{5856 name: 'type',5857 value: 'range'5858 }],5859 name: 'input'5860 },5861 module: 'HTML'5862 }],5863 requireContextRole: [],5864 requiredContextRole: [],5865 requiredOwnedElements: [],5866 requiredProps: {5867 'aria-valuenow': null5868 },5869 superClass: [['roletype', 'widget', 'input'], ['roletype', 'structure', 'range']]5870};5871var _default$$ = sliderRole;5872sliderRole$1.default = _default$$;5873var spinbuttonRole$1 = {};5874Object.defineProperty(spinbuttonRole$1, "__esModule", {5875 value: true5876});5877spinbuttonRole$1.default = void 0;5878var spinbuttonRole = {5879 abstract: false,5880 accessibleNameRequired: true,5881 baseConcepts: [],5882 childrenPresentational: false,5883 nameFrom: ['author'],5884 prohibitedProps: [],5885 props: {5886 'aria-errormessage': null,5887 'aria-invalid': null,5888 'aria-readonly': null,5889 'aria-required': null,5890 'aria-valuetext': null,5891 'aria-valuenow': '0'5892 },5893 relatedConcepts: [{5894 concept: {5895 attributes: [{5896 name: 'type',5897 value: 'number'5898 }],5899 name: 'input'5900 },5901 module: 'HTML'5902 }],5903 requireContextRole: [],5904 requiredContextRole: [],5905 requiredOwnedElements: [],5906 requiredProps: {},5907 superClass: [['roletype', 'widget', 'composite'], ['roletype', 'widget', 'input'], ['roletype', 'structure', 'range']]5908};5909var _default$_ = spinbuttonRole;5910spinbuttonRole$1.default = _default$_;5911var statusRole$1 = {};5912Object.defineProperty(statusRole$1, "__esModule", {5913 value: true5914});5915statusRole$1.default = void 0;5916var statusRole = {5917 abstract: false,5918 accessibleNameRequired: false,5919 baseConcepts: [],5920 childrenPresentational: false,5921 nameFrom: ['author'],5922 prohibitedProps: [],5923 props: {5924 'aria-atomic': 'true',5925 'aria-live': 'polite'5926 },5927 relatedConcepts: [{5928 concept: {5929 name: 'output'5930 },5931 module: 'HTML'5932 }],5933 requireContextRole: [],5934 requiredContextRole: [],5935 requiredOwnedElements: [],5936 requiredProps: {},5937 superClass: [['roletype', 'structure', 'section']]5938};5939var _default$Z = statusRole;5940statusRole$1.default = _default$Z;5941var strongRole$1 = {};5942Object.defineProperty(strongRole$1, "__esModule", {5943 value: true5944});5945strongRole$1.default = void 0;5946var strongRole = {5947 abstract: false,5948 accessibleNameRequired: false,5949 baseConcepts: [],5950 childrenPresentational: false,5951 nameFrom: ['prohibited'],5952 prohibitedProps: ['aria-label', 'aria-labelledby'],5953 props: {},5954 relatedConcepts: [],5955 requireContextRole: [],5956 requiredContextRole: [],5957 requiredOwnedElements: [],5958 requiredProps: {},5959 superClass: [['roletype', 'structure', 'section']]5960};5961var _default$Y = strongRole;5962strongRole$1.default = _default$Y;5963var subscriptRole$1 = {};5964Object.defineProperty(subscriptRole$1, "__esModule", {5965 value: true5966});5967subscriptRole$1.default = void 0;5968var subscriptRole = {5969 abstract: false,5970 accessibleNameRequired: false,5971 baseConcepts: [],5972 childrenPresentational: false,5973 nameFrom: ['prohibited'],5974 prohibitedProps: ['aria-label', 'aria-labelledby'],5975 props: {},5976 relatedConcepts: [],5977 requireContextRole: [],5978 requiredContextRole: [],5979 requiredOwnedElements: [],5980 requiredProps: {},5981 superClass: [['roletype', 'structure', 'section']]5982};5983var _default$X = subscriptRole;5984subscriptRole$1.default = _default$X;5985var superscriptRole$1 = {};5986Object.defineProperty(superscriptRole$1, "__esModule", {5987 value: true5988});5989superscriptRole$1.default = void 0;5990var superscriptRole = {5991 abstract: false,5992 accessibleNameRequired: false,5993 baseConcepts: [],5994 childrenPresentational: false,5995 nameFrom: ['prohibited'],5996 prohibitedProps: ['aria-label', 'aria-labelledby'],5997 props: {},5998 relatedConcepts: [],5999 requireContextRole: [],6000 requiredContextRole: [],6001 requiredOwnedElements: [],6002 requiredProps: {},6003 superClass: [['roletype', 'structure', 'section']]6004};6005var _default$W = superscriptRole;6006superscriptRole$1.default = _default$W;6007var switchRole$1 = {};6008Object.defineProperty(switchRole$1, "__esModule", {6009 value: true6010});6011switchRole$1.default = void 0;6012var switchRole = {6013 abstract: false,6014 accessibleNameRequired: true,6015 baseConcepts: [],6016 childrenPresentational: true,6017 nameFrom: ['author', 'contents'],6018 prohibitedProps: [],6019 props: {},6020 relatedConcepts: [{6021 concept: {6022 name: 'button'6023 },6024 module: 'ARIA'6025 }],6026 requireContextRole: [],6027 requiredContextRole: [],6028 requiredOwnedElements: [],6029 requiredProps: {6030 'aria-checked': null6031 },6032 superClass: [['roletype', 'widget', 'input', 'checkbox']]6033};6034var _default$V = switchRole;6035switchRole$1.default = _default$V;6036var tabRole$1 = {};6037Object.defineProperty(tabRole$1, "__esModule", {6038 value: true6039});6040tabRole$1.default = void 0;6041var tabRole = {6042 abstract: false,6043 accessibleNameRequired: false,6044 baseConcepts: [],6045 childrenPresentational: true,6046 nameFrom: ['author', 'contents'],6047 prohibitedProps: [],6048 props: {6049 'aria-disabled': null,6050 'aria-expanded': null,6051 'aria-haspopup': null,6052 'aria-posinset': null,6053 'aria-setsize': null,6054 'aria-selected': 'false'6055 },6056 relatedConcepts: [],6057 requireContextRole: ['tablist'],6058 requiredContextRole: ['tablist'],6059 requiredOwnedElements: [],6060 requiredProps: {},6061 superClass: [['roletype', 'structure', 'sectionhead'], ['roletype', 'widget']]6062};6063var _default$U = tabRole;6064tabRole$1.default = _default$U;6065var tableRole$1 = {};6066Object.defineProperty(tableRole$1, "__esModule", {6067 value: true6068});6069tableRole$1.default = void 0;6070var tableRole = {6071 abstract: false,6072 accessibleNameRequired: true,6073 baseConcepts: [],6074 childrenPresentational: false,6075 nameFrom: ['author'],6076 prohibitedProps: [],6077 props: {6078 'aria-colcount': null,6079 'aria-rowcount': null6080 },6081 relatedConcepts: [{6082 concept: {6083 name: 'table'6084 },6085 module: 'HTML'6086 }],6087 requireContextRole: [],6088 requiredContextRole: [],6089 requiredOwnedElements: [['row'], ['row', 'rowgroup']],6090 requiredProps: {},6091 superClass: [['roletype', 'structure', 'section']]6092};6093var _default$T = tableRole;6094tableRole$1.default = _default$T;6095var tablistRole$1 = {};6096Object.defineProperty(tablistRole$1, "__esModule", {6097 value: true6098});6099tablistRole$1.default = void 0;6100var tablistRole = {6101 abstract: false,6102 accessibleNameRequired: false,6103 baseConcepts: [],6104 childrenPresentational: false,6105 nameFrom: ['author'],6106 prohibitedProps: [],6107 props: {6108 'aria-level': null,6109 'aria-multiselectable': null,6110 'aria-orientation': 'horizontal'6111 },6112 relatedConcepts: [{6113 module: 'DAISY',6114 concept: {6115 name: 'guide'6116 }6117 }],6118 requireContextRole: [],6119 requiredContextRole: [],6120 requiredOwnedElements: [['tab']],6121 requiredProps: {},6122 superClass: [['roletype', 'widget', 'composite']]6123};6124var _default$S = tablistRole;6125tablistRole$1.default = _default$S;6126var tabpanelRole$1 = {};6127Object.defineProperty(tabpanelRole$1, "__esModule", {6128 value: true6129});6130tabpanelRole$1.default = void 0;6131var tabpanelRole = {6132 abstract: false,6133 accessibleNameRequired: true,6134 baseConcepts: [],6135 childrenPresentational: false,6136 nameFrom: ['author'],6137 prohibitedProps: [],6138 props: {},6139 relatedConcepts: [],6140 requireContextRole: [],6141 requiredContextRole: [],6142 requiredOwnedElements: [],6143 requiredProps: {},6144 superClass: [['roletype', 'structure', 'section']]6145};6146var _default$R = tabpanelRole;6147tabpanelRole$1.default = _default$R;6148var termRole$1 = {};6149Object.defineProperty(termRole$1, "__esModule", {6150 value: true6151});6152termRole$1.default = void 0;6153var termRole = {6154 abstract: false,6155 accessibleNameRequired: false,6156 baseConcepts: [],6157 childrenPresentational: false,6158 nameFrom: ['author'],6159 prohibitedProps: [],6160 props: {},6161 relatedConcepts: [{6162 concept: {6163 name: 'dfn'6164 },6165 module: 'HTML'6166 }, {6167 concept: {6168 name: 'dt'6169 },6170 module: 'HTML'6171 }],6172 requireContextRole: [],6173 requiredContextRole: [],6174 requiredOwnedElements: [],6175 requiredProps: {},6176 superClass: [['roletype', 'structure', 'section']]6177};6178var _default$Q = termRole;6179termRole$1.default = _default$Q;6180var textboxRole$1 = {};6181Object.defineProperty(textboxRole$1, "__esModule", {6182 value: true6183});6184textboxRole$1.default = void 0;6185var textboxRole = {6186 abstract: false,6187 accessibleNameRequired: true,6188 baseConcepts: [],6189 childrenPresentational: false,6190 nameFrom: ['author'],6191 prohibitedProps: [],6192 props: {6193 'aria-activedescendant': null,6194 'aria-autocomplete': null,6195 'aria-errormessage': null,6196 'aria-haspopup': null,6197 'aria-invalid': null,6198 'aria-multiline': null,6199 'aria-placeholder': null,6200 'aria-readonly': null,6201 'aria-required': null6202 },6203 relatedConcepts: [{6204 concept: {6205 attributes: [{6206 constraints: ['undefined'],6207 name: 'type'6208 }, {6209 constraints: ['undefined'],6210 name: 'list'6211 }],6212 name: 'input'6213 },6214 module: 'HTML'6215 }, {6216 concept: {6217 attributes: [{6218 constraints: ['undefined'],6219 name: 'list'6220 }, {6221 name: 'type',6222 value: 'email'6223 }],6224 name: 'input'6225 },6226 module: 'HTML'6227 }, {6228 concept: {6229 attributes: [{6230 constraints: ['undefined'],6231 name: 'list'6232 }, {6233 name: 'type',6234 value: 'tel'6235 }],6236 name: 'input'6237 },6238 module: 'HTML'6239 }, {6240 concept: {6241 attributes: [{6242 constraints: ['undefined'],6243 name: 'list'6244 }, {6245 name: 'type',6246 value: 'text'6247 }],6248 name: 'input'6249 },6250 module: 'HTML'6251 }, {6252 concept: {6253 attributes: [{6254 constraints: ['undefined'],6255 name: 'list'6256 }, {6257 name: 'type',6258 value: 'url'6259 }],6260 name: 'input'6261 },6262 module: 'HTML'6263 }, {6264 concept: {6265 name: 'input'6266 },6267 module: 'XForms'6268 }, {6269 concept: {6270 name: 'textarea'6271 },6272 module: 'HTML'6273 }],6274 requireContextRole: [],6275 requiredContextRole: [],6276 requiredOwnedElements: [],6277 requiredProps: {},6278 superClass: [['roletype', 'widget', 'input']]6279};6280var _default$P = textboxRole;6281textboxRole$1.default = _default$P;6282var timeRole$1 = {};6283Object.defineProperty(timeRole$1, "__esModule", {6284 value: true6285});6286timeRole$1.default = void 0;6287var timeRole = {6288 abstract: false,6289 accessibleNameRequired: false,6290 baseConcepts: [],6291 childrenPresentational: false,6292 nameFrom: ['author'],6293 prohibitedProps: [],6294 props: {},6295 relatedConcepts: [],6296 requireContextRole: [],6297 requiredContextRole: [],6298 requiredOwnedElements: [],6299 requiredProps: {},6300 superClass: [['roletype', 'structure', 'section']]6301};6302var _default$O = timeRole;6303timeRole$1.default = _default$O;6304var timerRole$1 = {};6305Object.defineProperty(timerRole$1, "__esModule", {6306 value: true6307});6308timerRole$1.default = void 0;6309var timerRole = {6310 abstract: false,6311 accessibleNameRequired: false,6312 baseConcepts: [],6313 childrenPresentational: false,6314 nameFrom: ['author'],6315 prohibitedProps: [],6316 props: {},6317 relatedConcepts: [],6318 requireContextRole: [],6319 requiredContextRole: [],6320 requiredOwnedElements: [],6321 requiredProps: {},6322 superClass: [['roletype', 'structure', 'section', 'status']]6323};6324var _default$N = timerRole;6325timerRole$1.default = _default$N;6326var toolbarRole$1 = {};6327Object.defineProperty(toolbarRole$1, "__esModule", {6328 value: true6329});6330toolbarRole$1.default = void 0;6331var toolbarRole = {6332 abstract: false,6333 accessibleNameRequired: false,6334 baseConcepts: [],6335 childrenPresentational: false,6336 nameFrom: ['author'],6337 prohibitedProps: [],6338 props: {6339 'aria-orientation': 'horizontal'6340 },6341 relatedConcepts: [{6342 concept: {6343 name: 'menubar'6344 },6345 module: 'ARIA'6346 }],6347 requireContextRole: [],6348 requiredContextRole: [],6349 requiredOwnedElements: [],6350 requiredProps: {},6351 superClass: [['roletype', 'structure', 'section', 'group']]6352};6353var _default$M = toolbarRole;6354toolbarRole$1.default = _default$M;6355var tooltipRole$1 = {};6356Object.defineProperty(tooltipRole$1, "__esModule", {6357 value: true6358});6359tooltipRole$1.default = void 0;6360var tooltipRole = {6361 abstract: false,6362 accessibleNameRequired: true,6363 baseConcepts: [],6364 childrenPresentational: false,6365 nameFrom: ['author', 'contents'],6366 prohibitedProps: [],6367 props: {},6368 relatedConcepts: [],6369 requireContextRole: [],6370 requiredContextRole: [],6371 requiredOwnedElements: [],6372 requiredProps: {},6373 superClass: [['roletype', 'structure', 'section']]6374};6375var _default$L = tooltipRole;6376tooltipRole$1.default = _default$L;6377var treeRole$1 = {};6378Object.defineProperty(treeRole$1, "__esModule", {6379 value: true6380});6381treeRole$1.default = void 0;6382var treeRole = {6383 abstract: false,6384 accessibleNameRequired: true,6385 baseConcepts: [],6386 childrenPresentational: false,6387 nameFrom: ['author'],6388 prohibitedProps: [],6389 props: {6390 'aria-errormessage': null,6391 'aria-invalid': null,6392 'aria-multiselectable': null,6393 'aria-required': null,6394 'aria-orientation': 'vertical'6395 },6396 relatedConcepts: [],6397 requireContextRole: [],6398 requiredContextRole: [],6399 requiredOwnedElements: [['treeitem', 'group'], ['treeitem']],6400 requiredProps: {},6401 superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]6402};6403var _default$K = treeRole;6404treeRole$1.default = _default$K;6405var treegridRole$1 = {};6406Object.defineProperty(treegridRole$1, "__esModule", {6407 value: true6408});6409treegridRole$1.default = void 0;6410var treegridRole = {6411 abstract: false,6412 accessibleNameRequired: true,6413 baseConcepts: [],6414 childrenPresentational: false,6415 nameFrom: ['author'],6416 prohibitedProps: [],6417 props: {},6418 relatedConcepts: [],6419 requireContextRole: [],6420 requiredContextRole: [],6421 requiredOwnedElements: [['row'], ['row', 'rowgroup']],6422 requiredProps: {},6423 superClass: [['roletype', 'widget', 'composite', 'grid'], ['roletype', 'structure', 'section', 'table', 'grid'], ['roletype', 'widget', 'composite', 'select', 'tree'], ['roletype', 'structure', 'section', 'group', 'select', 'tree']]6424};6425var _default$J = treegridRole;6426treegridRole$1.default = _default$J;6427var treeitemRole$1 = {};6428Object.defineProperty(treeitemRole$1, "__esModule", {6429 value: true6430});6431treeitemRole$1.default = void 0;6432var treeitemRole = {6433 abstract: false,6434 accessibleNameRequired: true,6435 baseConcepts: [],6436 childrenPresentational: false,6437 nameFrom: ['author', 'contents'],6438 prohibitedProps: [],6439 props: {6440 'aria-expanded': null,6441 'aria-haspopup': null6442 },6443 relatedConcepts: [],6444 requireContextRole: ['group', 'tree'],6445 requiredContextRole: ['group', 'tree'],6446 requiredOwnedElements: [],6447 requiredProps: {6448 'aria-selected': null6449 },6450 superClass: [['roletype', 'structure', 'section', 'listitem'], ['roletype', 'widget', 'input', 'option']]6451};6452var _default$I = treeitemRole;6453treeitemRole$1.default = _default$I;6454Object.defineProperty(ariaLiteralRoles$1, "__esModule", {6455 value: true6456});6457ariaLiteralRoles$1.default = void 0;6458var _alertRole = _interopRequireDefault$5(alertRole$1);6459var _alertdialogRole = _interopRequireDefault$5(alertdialogRole$1);6460var _applicationRole = _interopRequireDefault$5(applicationRole$1);6461var _articleRole = _interopRequireDefault$5(articleRole$1);6462var _bannerRole = _interopRequireDefault$5(bannerRole$1);6463var _blockquoteRole = _interopRequireDefault$5(blockquoteRole$1);6464var _buttonRole = _interopRequireDefault$5(buttonRole$1);6465var _captionRole = _interopRequireDefault$5(captionRole$1);6466var _cellRole = _interopRequireDefault$5(cellRole$1);6467var _checkboxRole = _interopRequireDefault$5(checkboxRole$1);6468var _codeRole = _interopRequireDefault$5(codeRole$1);6469var _columnheaderRole = _interopRequireDefault$5(columnheaderRole$1);6470var _comboboxRole = _interopRequireDefault$5(comboboxRole$1);6471var _complementaryRole = _interopRequireDefault$5(complementaryRole$1);6472var _contentinfoRole = _interopRequireDefault$5(contentinfoRole$1);6473var _definitionRole = _interopRequireDefault$5(definitionRole$1);6474var _deletionRole = _interopRequireDefault$5(deletionRole$1);6475var _dialogRole = _interopRequireDefault$5(dialogRole$1);6476var _directoryRole = _interopRequireDefault$5(directoryRole$1);6477var _documentRole = _interopRequireDefault$5(documentRole$1);6478var _emphasisRole = _interopRequireDefault$5(emphasisRole$1);6479var _feedRole = _interopRequireDefault$5(feedRole$1);6480var _figureRole = _interopRequireDefault$5(figureRole$1);6481var _formRole = _interopRequireDefault$5(formRole$1);6482var _genericRole = _interopRequireDefault$5(genericRole$1);6483var _gridRole = _interopRequireDefault$5(gridRole$1);6484var _gridcellRole = _interopRequireDefault$5(gridcellRole$1);6485var _groupRole = _interopRequireDefault$5(groupRole$1);6486var _headingRole = _interopRequireDefault$5(headingRole$1);6487var _imgRole = _interopRequireDefault$5(imgRole$1);6488var _insertionRole = _interopRequireDefault$5(insertionRole$1);6489var _linkRole = _interopRequireDefault$5(linkRole$1);6490var _listRole = _interopRequireDefault$5(listRole$1);6491var _listboxRole = _interopRequireDefault$5(listboxRole$1);6492var _listitemRole = _interopRequireDefault$5(listitemRole$1);6493var _logRole = _interopRequireDefault$5(logRole$1);6494var _mainRole = _interopRequireDefault$5(mainRole$1);6495var _marqueeRole = _interopRequireDefault$5(marqueeRole$1);6496var _mathRole = _interopRequireDefault$5(mathRole$1);6497var _menuRole = _interopRequireDefault$5(menuRole$1);6498var _menubarRole = _interopRequireDefault$5(menubarRole$1);6499var _menuitemRole = _interopRequireDefault$5(menuitemRole$1);6500var _menuitemcheckboxRole = _interopRequireDefault$5(menuitemcheckboxRole$1);6501var _menuitemradioRole = _interopRequireDefault$5(menuitemradioRole$1);6502var _meterRole = _interopRequireDefault$5(meterRole$1);6503var _navigationRole = _interopRequireDefault$5(navigationRole$1);6504var _noneRole = _interopRequireDefault$5(noneRole$1);6505var _noteRole = _interopRequireDefault$5(noteRole$1);6506var _optionRole = _interopRequireDefault$5(optionRole$1);6507var _paragraphRole = _interopRequireDefault$5(paragraphRole$1);6508var _presentationRole = _interopRequireDefault$5(presentationRole$1);6509var _progressbarRole = _interopRequireDefault$5(progressbarRole$1);6510var _radioRole = _interopRequireDefault$5(radioRole$1);6511var _radiogroupRole = _interopRequireDefault$5(radiogroupRole$1);6512var _regionRole = _interopRequireDefault$5(regionRole$1);6513var _rowRole = _interopRequireDefault$5(rowRole$1);6514var _rowgroupRole = _interopRequireDefault$5(rowgroupRole$1);6515var _rowheaderRole = _interopRequireDefault$5(rowheaderRole$1);6516var _scrollbarRole = _interopRequireDefault$5(scrollbarRole$1);6517var _searchRole = _interopRequireDefault$5(searchRole$1);6518var _searchboxRole = _interopRequireDefault$5(searchboxRole$1);6519var _separatorRole = _interopRequireDefault$5(separatorRole$1);6520var _sliderRole = _interopRequireDefault$5(sliderRole$1);6521var _spinbuttonRole = _interopRequireDefault$5(spinbuttonRole$1);6522var _statusRole = _interopRequireDefault$5(statusRole$1);6523var _strongRole = _interopRequireDefault$5(strongRole$1);6524var _subscriptRole = _interopRequireDefault$5(subscriptRole$1);6525var _superscriptRole = _interopRequireDefault$5(superscriptRole$1);6526var _switchRole = _interopRequireDefault$5(switchRole$1);6527var _tabRole = _interopRequireDefault$5(tabRole$1);6528var _tableRole = _interopRequireDefault$5(tableRole$1);6529var _tablistRole = _interopRequireDefault$5(tablistRole$1);6530var _tabpanelRole = _interopRequireDefault$5(tabpanelRole$1);6531var _termRole = _interopRequireDefault$5(termRole$1);6532var _textboxRole = _interopRequireDefault$5(textboxRole$1);6533var _timeRole = _interopRequireDefault$5(timeRole$1);6534var _timerRole = _interopRequireDefault$5(timerRole$1);6535var _toolbarRole = _interopRequireDefault$5(toolbarRole$1);6536var _tooltipRole = _interopRequireDefault$5(tooltipRole$1);6537var _treeRole = _interopRequireDefault$5(treeRole$1);6538var _treegridRole = _interopRequireDefault$5(treegridRole$1);6539var _treeitemRole = _interopRequireDefault$5(treeitemRole$1);6540function _interopRequireDefault$5(obj) { return obj && obj.__esModule ? obj : { default: obj }; }6541var ariaLiteralRoles = [['alert', _alertRole.default], ['alertdialog', _alertdialogRole.default], ['application', _applicationRole.default], ['article', _articleRole.default], ['banner', _bannerRole.default], ['blockquote', _blockquoteRole.default], ['button', _buttonRole.default], ['caption', _captionRole.default], ['cell', _cellRole.default], ['checkbox', _checkboxRole.default], ['code', _codeRole.default], ['columnheader', _columnheaderRole.default], ['combobox', _comboboxRole.default], ['complementary', _complementaryRole.default], ['contentinfo', _contentinfoRole.default], ['definition', _definitionRole.default], ['deletion', _deletionRole.default], ['dialog', _dialogRole.default], ['directory', _directoryRole.default], ['document', _documentRole.default], ['emphasis', _emphasisRole.default], ['feed', _feedRole.default], ['figure', _figureRole.default], ['form', _formRole.default], ['generic', _genericRole.default], ['grid', _gridRole.default], ['gridcell', _gridcellRole.default], ['group', _groupRole.default], ['heading', _headingRole.default], ['img', _imgRole.default], ['insertion', _insertionRole.default], ['link', _linkRole.default], ['list', _listRole.default], ['listbox', _listboxRole.default], ['listitem', _listitemRole.default], ['log', _logRole.default], ['main', _mainRole.default], ['marquee', _marqueeRole.default], ['math', _mathRole.default], ['menu', _menuRole.default], ['menubar', _menubarRole.default], ['menuitem', _menuitemRole.default], ['menuitemcheckbox', _menuitemcheckboxRole.default], ['menuitemradio', _menuitemradioRole.default], ['meter', _meterRole.default], ['navigation', _navigationRole.default], ['none', _noneRole.default], ['note', _noteRole.default], ['option', _optionRole.default], ['paragraph', _paragraphRole.default], ['presentation', _presentationRole.default], ['progressbar', _progressbarRole.default], ['radio', _radioRole.default], ['radiogroup', _radiogroupRole.default], ['region', _regionRole.default], ['row', _rowRole.default], ['rowgroup', _rowgroupRole.default], ['rowheader', _rowheaderRole.default], ['scrollbar', _scrollbarRole.default], ['search', _searchRole.default], ['searchbox', _searchboxRole.default], ['separator', _separatorRole.default], ['slider', _sliderRole.default], ['spinbutton', _spinbuttonRole.default], ['status', _statusRole.default], ['strong', _strongRole.default], ['subscript', _subscriptRole.default], ['superscript', _superscriptRole.default], ['switch', _switchRole.default], ['tab', _tabRole.default], ['table', _tableRole.default], ['tablist', _tablistRole.default], ['tabpanel', _tabpanelRole.default], ['term', _termRole.default], ['textbox', _textboxRole.default], ['time', _timeRole.default], ['timer', _timerRole.default], ['toolbar', _toolbarRole.default], ['tooltip', _tooltipRole.default], ['tree', _treeRole.default], ['treegrid', _treegridRole.default], ['treeitem', _treeitemRole.default]];6542var _default$H = ariaLiteralRoles;6543ariaLiteralRoles$1.default = _default$H;6544var ariaDpubRoles$1 = {};6545var docAbstractRole$1 = {};6546Object.defineProperty(docAbstractRole$1, "__esModule", {6547 value: true6548});6549docAbstractRole$1.default = void 0;6550var docAbstractRole = {6551 abstract: false,6552 accessibleNameRequired: false,6553 baseConcepts: [],6554 childrenPresentational: false,6555 nameFrom: ['author'],6556 prohibitedProps: [],6557 props: {6558 'aria-disabled': null,6559 'aria-errormessage': null,6560 'aria-expanded': null,6561 'aria-haspopup': null,6562 'aria-invalid': null6563 },6564 relatedConcepts: [{6565 concept: {6566 name: 'abstract [EPUB-SSV]'6567 },6568 module: 'EPUB'6569 }],6570 requireContextRole: [],6571 requiredContextRole: [],6572 requiredOwnedElements: [],6573 requiredProps: {},6574 superClass: [['roletype', 'structure', 'section']]6575};6576var _default$G = docAbstractRole;6577docAbstractRole$1.default = _default$G;6578var docAcknowledgmentsRole$1 = {};6579Object.defineProperty(docAcknowledgmentsRole$1, "__esModule", {6580 value: true6581});6582docAcknowledgmentsRole$1.default = void 0;6583var docAcknowledgmentsRole = {6584 abstract: false,6585 accessibleNameRequired: false,6586 baseConcepts: [],6587 childrenPresentational: false,6588 nameFrom: ['author'],6589 prohibitedProps: [],6590 props: {6591 'aria-disabled': null,6592 'aria-errormessage': null,6593 'aria-expanded': null,6594 'aria-haspopup': null,6595 'aria-invalid': null6596 },6597 relatedConcepts: [{6598 concept: {6599 name: 'acknowledgments [EPUB-SSV]'6600 },6601 module: 'EPUB'6602 }],6603 requireContextRole: [],6604 requiredContextRole: [],6605 requiredOwnedElements: [],6606 requiredProps: {},6607 superClass: [['roletype', 'structure', 'section', 'landmark']]6608};6609var _default$F = docAcknowledgmentsRole;6610docAcknowledgmentsRole$1.default = _default$F;6611var docAfterwordRole$1 = {};6612Object.defineProperty(docAfterwordRole$1, "__esModule", {6613 value: true6614});6615docAfterwordRole$1.default = void 0;6616var docAfterwordRole = {6617 abstract: false,6618 accessibleNameRequired: false,6619 baseConcepts: [],6620 childrenPresentational: false,6621 nameFrom: ['author'],6622 prohibitedProps: [],6623 props: {6624 'aria-disabled': null,6625 'aria-errormessage': null,6626 'aria-expanded': null,6627 'aria-haspopup': null,6628 'aria-invalid': null6629 },6630 relatedConcepts: [{6631 concept: {6632 name: 'afterword [EPUB-SSV]'6633 },6634 module: 'EPUB'6635 }],6636 requireContextRole: [],6637 requiredContextRole: [],6638 requiredOwnedElements: [],6639 requiredProps: {},6640 superClass: [['roletype', 'structure', 'section', 'landmark']]6641};6642var _default$E = docAfterwordRole;6643docAfterwordRole$1.default = _default$E;6644var docAppendixRole$1 = {};6645Object.defineProperty(docAppendixRole$1, "__esModule", {6646 value: true6647});6648docAppendixRole$1.default = void 0;6649var docAppendixRole = {6650 abstract: false,6651 accessibleNameRequired: false,6652 baseConcepts: [],6653 childrenPresentational: false,6654 nameFrom: ['author'],6655 prohibitedProps: [],6656 props: {6657 'aria-disabled': null,6658 'aria-errormessage': null,6659 'aria-expanded': null,6660 'aria-haspopup': null,6661 'aria-invalid': null6662 },6663 relatedConcepts: [{6664 concept: {6665 name: 'appendix [EPUB-SSV]'6666 },6667 module: 'EPUB'6668 }],6669 requireContextRole: [],6670 requiredContextRole: [],6671 requiredOwnedElements: [],6672 requiredProps: {},6673 superClass: [['roletype', 'structure', 'section', 'landmark']]6674};6675var _default$D = docAppendixRole;6676docAppendixRole$1.default = _default$D;6677var docBacklinkRole$1 = {};6678Object.defineProperty(docBacklinkRole$1, "__esModule", {6679 value: true6680});6681docBacklinkRole$1.default = void 0;6682var docBacklinkRole = {6683 abstract: false,6684 accessibleNameRequired: true,6685 baseConcepts: [],6686 childrenPresentational: false,6687 nameFrom: ['author', 'content'],6688 prohibitedProps: [],6689 props: {6690 'aria-errormessage': null,6691 'aria-invalid': null6692 },6693 relatedConcepts: [{6694 concept: {6695 name: 'referrer [EPUB-SSV]'6696 },6697 module: 'EPUB'6698 }],6699 requireContextRole: [],6700 requiredContextRole: [],6701 requiredOwnedElements: [],6702 requiredProps: {},6703 superClass: [['roletype', 'widget', 'command', 'link']]6704};6705var _default$C = docBacklinkRole;6706docBacklinkRole$1.default = _default$C;6707var docBiblioentryRole$1 = {};6708Object.defineProperty(docBiblioentryRole$1, "__esModule", {6709 value: true6710});6711docBiblioentryRole$1.default = void 0;6712var docBiblioentryRole = {6713 abstract: false,6714 accessibleNameRequired: true,6715 baseConcepts: [],6716 childrenPresentational: false,6717 nameFrom: ['author'],6718 prohibitedProps: [],6719 props: {6720 'aria-disabled': null,6721 'aria-errormessage': null,6722 'aria-expanded': null,6723 'aria-haspopup': null,6724 'aria-invalid': null6725 },6726 relatedConcepts: [{6727 concept: {6728 name: 'EPUB biblioentry [EPUB-SSV]'6729 },6730 module: 'EPUB'6731 }],6732 requireContextRole: ['doc-bibliography'],6733 requiredContextRole: ['doc-bibliography'],6734 requiredOwnedElements: [],6735 requiredProps: {},6736 superClass: [['roletype', 'structure', 'section', 'listitem']]6737};6738var _default$B = docBiblioentryRole;6739docBiblioentryRole$1.default = _default$B;6740var docBibliographyRole$1 = {};6741Object.defineProperty(docBibliographyRole$1, "__esModule", {6742 value: true6743});6744docBibliographyRole$1.default = void 0;6745var docBibliographyRole = {6746 abstract: false,6747 accessibleNameRequired: false,6748 baseConcepts: [],6749 childrenPresentational: false,6750 nameFrom: ['author'],6751 prohibitedProps: [],6752 props: {6753 'aria-disabled': null,6754 'aria-errormessage': null,6755 'aria-expanded': null,6756 'aria-haspopup': null,6757 'aria-invalid': null6758 },6759 relatedConcepts: [{6760 concept: {6761 name: 'bibliography [EPUB-SSV]'6762 },6763 module: 'EPUB'6764 }],6765 requireContextRole: [],6766 requiredContextRole: [],6767 requiredOwnedElements: [['doc-biblioentry']],6768 requiredProps: {},6769 superClass: [['roletype', 'structure', 'section', 'landmark']]6770};6771var _default$A = docBibliographyRole;6772docBibliographyRole$1.default = _default$A;6773var docBibliorefRole$1 = {};6774Object.defineProperty(docBibliorefRole$1, "__esModule", {6775 value: true6776});6777docBibliorefRole$1.default = void 0;6778var docBibliorefRole = {6779 abstract: false,6780 accessibleNameRequired: true,6781 baseConcepts: [],6782 childrenPresentational: false,6783 nameFrom: ['author', 'contents'],6784 prohibitedProps: [],6785 props: {6786 'aria-errormessage': null,6787 'aria-invalid': null6788 },6789 relatedConcepts: [{6790 concept: {6791 name: 'biblioref [EPUB-SSV]'6792 },6793 module: 'EPUB'6794 }],6795 requireContextRole: [],6796 requiredContextRole: [],6797 requiredOwnedElements: [],6798 requiredProps: {},6799 superClass: [['roletype', 'widget', 'command', 'link']]6800};6801var _default$z = docBibliorefRole;6802docBibliorefRole$1.default = _default$z;6803var docChapterRole$1 = {};6804Object.defineProperty(docChapterRole$1, "__esModule", {6805 value: true6806});6807docChapterRole$1.default = void 0;6808var docChapterRole = {6809 abstract: false,6810 accessibleNameRequired: false,6811 baseConcepts: [],6812 childrenPresentational: false,6813 nameFrom: ['author'],6814 prohibitedProps: [],6815 props: {6816 'aria-disabled': null,6817 'aria-errormessage': null,6818 'aria-expanded': null,6819 'aria-haspopup': null,6820 'aria-invalid': null6821 },6822 relatedConcepts: [{6823 concept: {6824 name: 'chapter [EPUB-SSV]'6825 },6826 module: 'EPUB'6827 }],6828 requireContextRole: [],6829 requiredContextRole: [],6830 requiredOwnedElements: [],6831 requiredProps: {},6832 superClass: [['roletype', 'structure', 'section', 'landmark']]6833};6834var _default$y = docChapterRole;6835docChapterRole$1.default = _default$y;6836var docColophonRole$1 = {};6837Object.defineProperty(docColophonRole$1, "__esModule", {6838 value: true6839});6840docColophonRole$1.default = void 0;6841var docColophonRole = {6842 abstract: false,6843 accessibleNameRequired: false,6844 baseConcepts: [],6845 childrenPresentational: false,6846 nameFrom: ['author'],6847 prohibitedProps: [],6848 props: {6849 'aria-disabled': null,6850 'aria-errormessage': null,6851 'aria-expanded': null,6852 'aria-haspopup': null,6853 'aria-invalid': null6854 },6855 relatedConcepts: [{6856 concept: {6857 name: 'colophon [EPUB-SSV]'6858 },6859 module: 'EPUB'6860 }],6861 requireContextRole: [],6862 requiredContextRole: [],6863 requiredOwnedElements: [],6864 requiredProps: {},6865 superClass: [['roletype', 'structure', 'section']]6866};6867var _default$x = docColophonRole;6868docColophonRole$1.default = _default$x;6869var docConclusionRole$1 = {};6870Object.defineProperty(docConclusionRole$1, "__esModule", {6871 value: true6872});6873docConclusionRole$1.default = void 0;6874var docConclusionRole = {6875 abstract: false,6876 accessibleNameRequired: false,6877 baseConcepts: [],6878 childrenPresentational: false,6879 nameFrom: ['author'],6880 prohibitedProps: [],6881 props: {6882 'aria-disabled': null,6883 'aria-errormessage': null,6884 'aria-expanded': null,6885 'aria-haspopup': null,6886 'aria-invalid': null6887 },6888 relatedConcepts: [{6889 concept: {6890 name: 'conclusion [EPUB-SSV]'6891 },6892 module: 'EPUB'6893 }],6894 requireContextRole: [],6895 requiredContextRole: [],6896 requiredOwnedElements: [],6897 requiredProps: {},6898 superClass: [['roletype', 'structure', 'section', 'landmark']]6899};6900var _default$w = docConclusionRole;6901docConclusionRole$1.default = _default$w;6902var docCoverRole$1 = {};6903Object.defineProperty(docCoverRole$1, "__esModule", {6904 value: true6905});6906docCoverRole$1.default = void 0;6907var docCoverRole = {6908 abstract: false,6909 accessibleNameRequired: false,6910 baseConcepts: [],6911 childrenPresentational: false,6912 nameFrom: ['author'],6913 prohibitedProps: [],6914 props: {6915 'aria-disabled': null,6916 'aria-errormessage': null,6917 'aria-expanded': null,6918 'aria-haspopup': null,6919 'aria-invalid': null6920 },6921 relatedConcepts: [{6922 concept: {6923 name: 'cover [EPUB-SSV]'6924 },6925 module: 'EPUB'6926 }],6927 requireContextRole: [],6928 requiredContextRole: [],6929 requiredOwnedElements: [],6930 requiredProps: {},6931 superClass: [['roletype', 'structure', 'section', 'img']]6932};6933var _default$v = docCoverRole;6934docCoverRole$1.default = _default$v;6935var docCreditRole$1 = {};6936Object.defineProperty(docCreditRole$1, "__esModule", {6937 value: true6938});6939docCreditRole$1.default = void 0;6940var docCreditRole = {6941 abstract: false,6942 accessibleNameRequired: false,6943 baseConcepts: [],6944 childrenPresentational: false,6945 nameFrom: ['author'],6946 prohibitedProps: [],6947 props: {6948 'aria-disabled': null,6949 'aria-errormessage': null,6950 'aria-expanded': null,6951 'aria-haspopup': null,6952 'aria-invalid': null6953 },6954 relatedConcepts: [{6955 concept: {6956 name: 'credit [EPUB-SSV]'6957 },6958 module: 'EPUB'6959 }],6960 requireContextRole: [],6961 requiredContextRole: [],6962 requiredOwnedElements: [],6963 requiredProps: {},6964 superClass: [['roletype', 'structure', 'section']]6965};6966var _default$u = docCreditRole;6967docCreditRole$1.default = _default$u;6968var docCreditsRole$1 = {};6969Object.defineProperty(docCreditsRole$1, "__esModule", {6970 value: true6971});6972docCreditsRole$1.default = void 0;6973var docCreditsRole = {6974 abstract: false,6975 accessibleNameRequired: false,6976 baseConcepts: [],6977 childrenPresentational: false,6978 nameFrom: ['author'],6979 prohibitedProps: [],6980 props: {6981 'aria-disabled': null,6982 'aria-errormessage': null,6983 'aria-expanded': null,6984 'aria-haspopup': null,6985 'aria-invalid': null6986 },6987 relatedConcepts: [{6988 concept: {6989 name: 'credits [EPUB-SSV]'6990 },6991 module: 'EPUB'6992 }],6993 requireContextRole: [],6994 requiredContextRole: [],6995 requiredOwnedElements: [],6996 requiredProps: {},6997 superClass: [['roletype', 'structure', 'section', 'landmark']]6998};6999var _default$t = docCreditsRole;7000docCreditsRole$1.default = _default$t;7001var docDedicationRole$1 = {};7002Object.defineProperty(docDedicationRole$1, "__esModule", {7003 value: true7004});7005docDedicationRole$1.default = void 0;7006var docDedicationRole = {7007 abstract: false,7008 accessibleNameRequired: false,7009 baseConcepts: [],7010 childrenPresentational: false,7011 nameFrom: ['author'],7012 prohibitedProps: [],7013 props: {7014 'aria-disabled': null,7015 'aria-errormessage': null,7016 'aria-expanded': null,7017 'aria-haspopup': null,7018 'aria-invalid': null7019 },7020 relatedConcepts: [{7021 concept: {7022 name: 'dedication [EPUB-SSV]'7023 },7024 module: 'EPUB'7025 }],7026 requireContextRole: [],7027 requiredContextRole: [],7028 requiredOwnedElements: [],7029 requiredProps: {},7030 superClass: [['roletype', 'structure', 'section']]7031};7032var _default$s = docDedicationRole;7033docDedicationRole$1.default = _default$s;7034var docEndnoteRole$1 = {};7035Object.defineProperty(docEndnoteRole$1, "__esModule", {7036 value: true7037});7038docEndnoteRole$1.default = void 0;7039var docEndnoteRole = {7040 abstract: false,7041 accessibleNameRequired: false,7042 baseConcepts: [],7043 childrenPresentational: false,7044 nameFrom: ['author'],7045 prohibitedProps: [],7046 props: {7047 'aria-disabled': null,7048 'aria-errormessage': null,7049 'aria-expanded': null,7050 'aria-haspopup': null,7051 'aria-invalid': null7052 },7053 relatedConcepts: [{7054 concept: {7055 name: 'rearnote [EPUB-SSV]'7056 },7057 module: 'EPUB'7058 }],7059 requireContextRole: ['doc-endnotes'],7060 requiredContextRole: ['doc-endnotes'],7061 requiredOwnedElements: [],7062 requiredProps: {},7063 superClass: [['roletype', 'structure', 'section', 'listitem']]7064};7065var _default$r = docEndnoteRole;7066docEndnoteRole$1.default = _default$r;7067var docEndnotesRole$1 = {};7068Object.defineProperty(docEndnotesRole$1, "__esModule", {7069 value: true7070});7071docEndnotesRole$1.default = void 0;7072var docEndnotesRole = {7073 abstract: false,7074 accessibleNameRequired: false,7075 baseConcepts: [],7076 childrenPresentational: false,7077 nameFrom: ['author'],7078 prohibitedProps: [],7079 props: {7080 'aria-disabled': null,7081 'aria-errormessage': null,7082 'aria-expanded': null,7083 'aria-haspopup': null,7084 'aria-invalid': null7085 },7086 relatedConcepts: [{7087 concept: {7088 name: 'rearnotes [EPUB-SSV]'7089 },7090 module: 'EPUB'7091 }],7092 requireContextRole: [],7093 requiredContextRole: [],7094 requiredOwnedElements: [['doc-endnote']],7095 requiredProps: {},7096 superClass: [['roletype', 'structure', 'section', 'landmark']]7097};7098var _default$q = docEndnotesRole;7099docEndnotesRole$1.default = _default$q;7100var docEpigraphRole$1 = {};7101Object.defineProperty(docEpigraphRole$1, "__esModule", {7102 value: true7103});7104docEpigraphRole$1.default = void 0;7105var docEpigraphRole = {7106 abstract: false,7107 accessibleNameRequired: false,7108 baseConcepts: [],7109 childrenPresentational: false,7110 nameFrom: ['author'],7111 prohibitedProps: [],7112 props: {7113 'aria-disabled': null,7114 'aria-errormessage': null,7115 'aria-expanded': null,7116 'aria-haspopup': null,7117 'aria-invalid': null7118 },7119 relatedConcepts: [{7120 concept: {7121 name: 'epigraph [EPUB-SSV]'7122 },7123 module: 'EPUB'7124 }],7125 requireContextRole: [],7126 requiredContextRole: [],7127 requiredOwnedElements: [],7128 requiredProps: {},7129 superClass: [['roletype', 'structure', 'section']]7130};7131var _default$p = docEpigraphRole;7132docEpigraphRole$1.default = _default$p;7133var docEpilogueRole$1 = {};7134Object.defineProperty(docEpilogueRole$1, "__esModule", {7135 value: true7136});7137docEpilogueRole$1.default = void 0;7138var docEpilogueRole = {7139 abstract: false,7140 accessibleNameRequired: false,7141 baseConcepts: [],7142 childrenPresentational: false,7143 nameFrom: ['author'],7144 prohibitedProps: [],7145 props: {7146 'aria-disabled': null,7147 'aria-errormessage': null,7148 'aria-expanded': null,7149 'aria-haspopup': null,7150 'aria-invalid': null7151 },7152 relatedConcepts: [{7153 concept: {7154 name: 'epilogue [EPUB-SSV]'7155 },7156 module: 'EPUB'7157 }],7158 requireContextRole: [],7159 requiredContextRole: [],7160 requiredOwnedElements: [],7161 requiredProps: {},7162 superClass: [['roletype', 'structure', 'section', 'landmark']]7163};7164var _default$o = docEpilogueRole;7165docEpilogueRole$1.default = _default$o;7166var docErrataRole$1 = {};7167Object.defineProperty(docErrataRole$1, "__esModule", {7168 value: true7169});7170docErrataRole$1.default = void 0;7171var docErrataRole = {7172 abstract: false,7173 accessibleNameRequired: false,7174 baseConcepts: [],7175 childrenPresentational: false,7176 nameFrom: ['author'],7177 prohibitedProps: [],7178 props: {7179 'aria-disabled': null,7180 'aria-errormessage': null,7181 'aria-expanded': null,7182 'aria-haspopup': null,7183 'aria-invalid': null7184 },7185 relatedConcepts: [{7186 concept: {7187 name: 'errata [EPUB-SSV]'7188 },7189 module: 'EPUB'7190 }],7191 requireContextRole: [],7192 requiredContextRole: [],7193 requiredOwnedElements: [],7194 requiredProps: {},7195 superClass: [['roletype', 'structure', 'section', 'landmark']]7196};7197var _default$n = docErrataRole;7198docErrataRole$1.default = _default$n;7199var docExampleRole$1 = {};7200Object.defineProperty(docExampleRole$1, "__esModule", {7201 value: true7202});7203docExampleRole$1.default = void 0;7204var docExampleRole = {7205 abstract: false,7206 accessibleNameRequired: false,7207 baseConcepts: [],7208 childrenPresentational: false,7209 nameFrom: ['author'],7210 prohibitedProps: [],7211 props: {7212 'aria-disabled': null,7213 'aria-errormessage': null,7214 'aria-expanded': null,7215 'aria-haspopup': null,7216 'aria-invalid': null7217 },7218 relatedConcepts: [],7219 requireContextRole: [],7220 requiredContextRole: [],7221 requiredOwnedElements: [],7222 requiredProps: {},7223 superClass: [['roletype', 'structure', 'section']]7224};7225var _default$m = docExampleRole;7226docExampleRole$1.default = _default$m;7227var docFootnoteRole$1 = {};7228Object.defineProperty(docFootnoteRole$1, "__esModule", {7229 value: true7230});7231docFootnoteRole$1.default = void 0;7232var docFootnoteRole = {7233 abstract: false,7234 accessibleNameRequired: false,7235 baseConcepts: [],7236 childrenPresentational: false,7237 nameFrom: ['author'],7238 prohibitedProps: [],7239 props: {7240 'aria-disabled': null,7241 'aria-errormessage': null,7242 'aria-expanded': null,7243 'aria-haspopup': null,7244 'aria-invalid': null7245 },7246 relatedConcepts: [{7247 concept: {7248 name: 'footnote [EPUB-SSV]'7249 },7250 module: 'EPUB'7251 }],7252 requireContextRole: [],7253 requiredContextRole: [],7254 requiredOwnedElements: [],7255 requiredProps: {},7256 superClass: [['roletype', 'structure', 'section']]7257};7258var _default$l = docFootnoteRole;7259docFootnoteRole$1.default = _default$l;7260var docForewordRole$1 = {};7261Object.defineProperty(docForewordRole$1, "__esModule", {7262 value: true7263});7264docForewordRole$1.default = void 0;7265var docForewordRole = {7266 abstract: false,7267 accessibleNameRequired: false,7268 baseConcepts: [],7269 childrenPresentational: false,7270 nameFrom: ['author'],7271 prohibitedProps: [],7272 props: {7273 'aria-disabled': null,7274 'aria-errormessage': null,7275 'aria-expanded': null,7276 'aria-haspopup': null,7277 'aria-invalid': null7278 },7279 relatedConcepts: [{7280 concept: {7281 name: 'foreword [EPUB-SSV]'7282 },7283 module: 'EPUB'7284 }],7285 requireContextRole: [],7286 requiredContextRole: [],7287 requiredOwnedElements: [],7288 requiredProps: {},7289 superClass: [['roletype', 'structure', 'section', 'landmark']]7290};7291var _default$k = docForewordRole;7292docForewordRole$1.default = _default$k;7293var docGlossaryRole$1 = {};7294Object.defineProperty(docGlossaryRole$1, "__esModule", {7295 value: true7296});7297docGlossaryRole$1.default = void 0;7298var docGlossaryRole = {7299 abstract: false,7300 accessibleNameRequired: false,7301 baseConcepts: [],7302 childrenPresentational: false,7303 nameFrom: ['author'],7304 prohibitedProps: [],7305 props: {7306 'aria-disabled': null,7307 'aria-errormessage': null,7308 'aria-expanded': null,7309 'aria-haspopup': null,7310 'aria-invalid': null7311 },7312 relatedConcepts: [{7313 concept: {7314 name: 'glossary [EPUB-SSV]'7315 },7316 module: 'EPUB'7317 }],7318 requireContextRole: [],7319 requiredContextRole: [],7320 requiredOwnedElements: [['definition'], ['term']],7321 requiredProps: {},7322 superClass: [['roletype', 'structure', 'section', 'landmark']]7323};7324var _default$j = docGlossaryRole;7325docGlossaryRole$1.default = _default$j;7326var docGlossrefRole$1 = {};7327Object.defineProperty(docGlossrefRole$1, "__esModule", {7328 value: true7329});7330docGlossrefRole$1.default = void 0;7331var docGlossrefRole = {7332 abstract: false,7333 accessibleNameRequired: true,7334 baseConcepts: [],7335 childrenPresentational: false,7336 nameFrom: ['author', 'contents'],7337 prohibitedProps: [],7338 props: {7339 'aria-errormessage': null,7340 'aria-invalid': null7341 },7342 relatedConcepts: [{7343 concept: {7344 name: 'glossref [EPUB-SSV]'7345 },7346 module: 'EPUB'7347 }],7348 requireContextRole: [],7349 requiredContextRole: [],7350 requiredOwnedElements: [],7351 requiredProps: {},7352 superClass: [['roletype', 'widget', 'command', 'link']]7353};7354var _default$i = docGlossrefRole;7355docGlossrefRole$1.default = _default$i;7356var docIndexRole$1 = {};7357Object.defineProperty(docIndexRole$1, "__esModule", {7358 value: true7359});7360docIndexRole$1.default = void 0;7361var docIndexRole = {7362 abstract: false,7363 accessibleNameRequired: false,7364 baseConcepts: [],7365 childrenPresentational: false,7366 nameFrom: ['author'],7367 prohibitedProps: [],7368 props: {7369 'aria-disabled': null,7370 'aria-errormessage': null,7371 'aria-expanded': null,7372 'aria-haspopup': null,7373 'aria-invalid': null7374 },7375 relatedConcepts: [{7376 concept: {7377 name: 'index [EPUB-SSV]'7378 },7379 module: 'EPUB'7380 }],7381 requireContextRole: [],7382 requiredContextRole: [],7383 requiredOwnedElements: [],7384 requiredProps: {},7385 superClass: [['roletype', 'structure', 'section', 'landmark', 'navigation']]7386};7387var _default$h = docIndexRole;7388docIndexRole$1.default = _default$h;7389var docIntroductionRole$1 = {};7390Object.defineProperty(docIntroductionRole$1, "__esModule", {7391 value: true7392});7393docIntroductionRole$1.default = void 0;7394var docIntroductionRole = {7395 abstract: false,7396 accessibleNameRequired: false,7397 baseConcepts: [],7398 childrenPresentational: false,7399 nameFrom: ['author'],7400 prohibitedProps: [],7401 props: {7402 'aria-disabled': null,7403 'aria-errormessage': null,7404 'aria-expanded': null,7405 'aria-haspopup': null,7406 'aria-invalid': null7407 },7408 relatedConcepts: [{7409 concept: {7410 name: 'introduction [EPUB-SSV]'7411 },7412 module: 'EPUB'7413 }],7414 requireContextRole: [],7415 requiredContextRole: [],7416 requiredOwnedElements: [],7417 requiredProps: {},7418 superClass: [['roletype', 'structure', 'section', 'landmark']]7419};7420var _default$g = docIntroductionRole;7421docIntroductionRole$1.default = _default$g;7422var docNoterefRole$1 = {};7423Object.defineProperty(docNoterefRole$1, "__esModule", {7424 value: true7425});7426docNoterefRole$1.default = void 0;7427var docNoterefRole = {7428 abstract: false,7429 accessibleNameRequired: true,7430 baseConcepts: [],7431 childrenPresentational: false,7432 nameFrom: ['author', 'contents'],7433 prohibitedProps: [],7434 props: {7435 'aria-errormessage': null,7436 'aria-invalid': null7437 },7438 relatedConcepts: [{7439 concept: {7440 name: 'noteref [EPUB-SSV]'7441 },7442 module: 'EPUB'7443 }],7444 requireContextRole: [],7445 requiredContextRole: [],7446 requiredOwnedElements: [],7447 requiredProps: {},7448 superClass: [['roletype', 'widget', 'command', 'link']]7449};7450var _default$f = docNoterefRole;7451docNoterefRole$1.default = _default$f;7452var docNoticeRole$1 = {};7453Object.defineProperty(docNoticeRole$1, "__esModule", {7454 value: true7455});7456docNoticeRole$1.default = void 0;7457var docNoticeRole = {7458 abstract: false,7459 accessibleNameRequired: false,7460 baseConcepts: [],7461 childrenPresentational: false,7462 nameFrom: ['author'],7463 prohibitedProps: [],7464 props: {7465 'aria-disabled': null,7466 'aria-errormessage': null,7467 'aria-expanded': null,7468 'aria-haspopup': null,7469 'aria-invalid': null7470 },7471 relatedConcepts: [{7472 concept: {7473 name: 'notice [EPUB-SSV]'7474 },7475 module: 'EPUB'7476 }],7477 requireContextRole: [],7478 requiredContextRole: [],7479 requiredOwnedElements: [],7480 requiredProps: {},7481 superClass: [['roletype', 'structure', 'section', 'note']]7482};7483var _default$e = docNoticeRole;7484docNoticeRole$1.default = _default$e;7485var docPagebreakRole$1 = {};7486Object.defineProperty(docPagebreakRole$1, "__esModule", {7487 value: true7488});7489docPagebreakRole$1.default = void 0;7490var docPagebreakRole = {7491 abstract: false,7492 accessibleNameRequired: true,7493 baseConcepts: [],7494 childrenPresentational: true,7495 nameFrom: ['author'],7496 prohibitedProps: [],7497 props: {7498 'aria-errormessage': null,7499 'aria-expanded': null,7500 'aria-haspopup': null,7501 'aria-invalid': null7502 },7503 relatedConcepts: [{7504 concept: {7505 name: 'pagebreak [EPUB-SSV]'7506 },7507 module: 'EPUB'7508 }],7509 requireContextRole: [],7510 requiredContextRole: [],7511 requiredOwnedElements: [],7512 requiredProps: {},7513 superClass: [['roletype', 'structure', 'separator']]7514};7515var _default$d = docPagebreakRole;7516docPagebreakRole$1.default = _default$d;7517var docPagelistRole$1 = {};7518Object.defineProperty(docPagelistRole$1, "__esModule", {7519 value: true7520});7521docPagelistRole$1.default = void 0;7522var docPagelistRole = {7523 abstract: false,7524 accessibleNameRequired: false,7525 baseConcepts: [],7526 childrenPresentational: false,7527 nameFrom: ['author'],7528 prohibitedProps: [],7529 props: {7530 'aria-disabled': null,7531 'aria-errormessage': null,7532 'aria-expanded': null,7533 'aria-haspopup': null,7534 'aria-invalid': null7535 },7536 relatedConcepts: [{7537 concept: {7538 name: 'page-list [EPUB-SSV]'7539 },7540 module: 'EPUB'7541 }],7542 requireContextRole: [],7543 requiredContextRole: [],7544 requiredOwnedElements: [],7545 requiredProps: {},7546 superClass: [['roletype', 'structure', 'section', 'landmark', 'navigation']]7547};7548var _default$c = docPagelistRole;7549docPagelistRole$1.default = _default$c;7550var docPartRole$1 = {};7551Object.defineProperty(docPartRole$1, "__esModule", {7552 value: true7553});7554docPartRole$1.default = void 0;7555var docPartRole = {7556 abstract: false,7557 accessibleNameRequired: true,7558 baseConcepts: [],7559 childrenPresentational: false,7560 nameFrom: ['author'],7561 prohibitedProps: [],7562 props: {7563 'aria-disabled': null,7564 'aria-errormessage': null,7565 'aria-expanded': null,7566 'aria-haspopup': null,7567 'aria-invalid': null7568 },7569 relatedConcepts: [{7570 concept: {7571 name: 'part [EPUB-SSV]'7572 },7573 module: 'EPUB'7574 }],7575 requireContextRole: [],7576 requiredContextRole: [],7577 requiredOwnedElements: [],7578 requiredProps: {},7579 superClass: [['roletype', 'structure', 'section', 'landmark']]7580};7581var _default$b = docPartRole;7582docPartRole$1.default = _default$b;7583var docPrefaceRole$1 = {};7584Object.defineProperty(docPrefaceRole$1, "__esModule", {7585 value: true7586});7587docPrefaceRole$1.default = void 0;7588var docPrefaceRole = {7589 abstract: false,7590 accessibleNameRequired: false,7591 baseConcepts: [],7592 childrenPresentational: false,7593 nameFrom: ['author'],7594 prohibitedProps: [],7595 props: {7596 'aria-disabled': null,7597 'aria-errormessage': null,7598 'aria-expanded': null,7599 'aria-haspopup': null,7600 'aria-invalid': null7601 },7602 relatedConcepts: [{7603 concept: {7604 name: 'preface [EPUB-SSV]'7605 },7606 module: 'EPUB'7607 }],7608 requireContextRole: [],7609 requiredContextRole: [],7610 requiredOwnedElements: [],7611 requiredProps: {},7612 superClass: [['roletype', 'structure', 'section', 'landmark']]7613};7614var _default$a = docPrefaceRole;7615docPrefaceRole$1.default = _default$a;7616var docPrologueRole$1 = {};7617Object.defineProperty(docPrologueRole$1, "__esModule", {7618 value: true7619});7620docPrologueRole$1.default = void 0;7621var docPrologueRole = {7622 abstract: false,7623 accessibleNameRequired: false,7624 baseConcepts: [],7625 childrenPresentational: false,7626 nameFrom: ['author'],7627 prohibitedProps: [],7628 props: {7629 'aria-disabled': null,7630 'aria-errormessage': null,7631 'aria-expanded': null,7632 'aria-haspopup': null,7633 'aria-invalid': null7634 },7635 relatedConcepts: [{7636 concept: {7637 name: 'prologue [EPUB-SSV]'7638 },7639 module: 'EPUB'7640 }],7641 requireContextRole: [],7642 requiredContextRole: [],7643 requiredOwnedElements: [],7644 requiredProps: {},7645 superClass: [['roletype', 'structure', 'section', 'landmark']]7646};7647var _default$9 = docPrologueRole;7648docPrologueRole$1.default = _default$9;7649var docPullquoteRole$1 = {};7650Object.defineProperty(docPullquoteRole$1, "__esModule", {7651 value: true7652});7653docPullquoteRole$1.default = void 0;7654var docPullquoteRole = {7655 abstract: false,7656 accessibleNameRequired: false,7657 baseConcepts: [],7658 childrenPresentational: false,7659 nameFrom: ['author'],7660 prohibitedProps: [],7661 props: {},7662 relatedConcepts: [{7663 concept: {7664 name: 'pullquote [EPUB-SSV]'7665 },7666 module: 'EPUB'7667 }],7668 requireContextRole: [],7669 requiredContextRole: [],7670 requiredOwnedElements: [],7671 requiredProps: {},7672 superClass: [['none']]7673};7674var _default$8 = docPullquoteRole;7675docPullquoteRole$1.default = _default$8;7676var docQnaRole$1 = {};7677Object.defineProperty(docQnaRole$1, "__esModule", {7678 value: true7679});7680docQnaRole$1.default = void 0;7681var docQnaRole = {7682 abstract: false,7683 accessibleNameRequired: false,7684 baseConcepts: [],7685 childrenPresentational: false,7686 nameFrom: ['author'],7687 prohibitedProps: [],7688 props: {7689 'aria-disabled': null,7690 'aria-errormessage': null,7691 'aria-expanded': null,7692 'aria-haspopup': null,7693 'aria-invalid': null7694 },7695 relatedConcepts: [{7696 concept: {7697 name: 'qna [EPUB-SSV]'7698 },7699 module: 'EPUB'7700 }],7701 requireContextRole: [],7702 requiredContextRole: [],7703 requiredOwnedElements: [],7704 requiredProps: {},7705 superClass: [['roletype', 'structure', 'section']]7706};7707var _default$7 = docQnaRole;7708docQnaRole$1.default = _default$7;7709var docSubtitleRole$1 = {};7710Object.defineProperty(docSubtitleRole$1, "__esModule", {7711 value: true7712});7713docSubtitleRole$1.default = void 0;7714var docSubtitleRole = {7715 abstract: false,7716 accessibleNameRequired: false,7717 baseConcepts: [],7718 childrenPresentational: false,7719 nameFrom: ['author'],7720 prohibitedProps: [],7721 props: {7722 'aria-disabled': null,7723 'aria-errormessage': null,7724 'aria-expanded': null,7725 'aria-haspopup': null,7726 'aria-invalid': null7727 },7728 relatedConcepts: [{7729 concept: {7730 name: 'subtitle [EPUB-SSV]'7731 },7732 module: 'EPUB'7733 }],7734 requireContextRole: [],7735 requiredContextRole: [],7736 requiredOwnedElements: [],7737 requiredProps: {},7738 superClass: [['roletype', 'structure', 'sectionhead']]7739};7740var _default$6 = docSubtitleRole;7741docSubtitleRole$1.default = _default$6;7742var docTipRole$1 = {};7743Object.defineProperty(docTipRole$1, "__esModule", {7744 value: true7745});7746docTipRole$1.default = void 0;7747var docTipRole = {7748 abstract: false,7749 accessibleNameRequired: false,7750 baseConcepts: [],7751 childrenPresentational: false,7752 nameFrom: ['author'],7753 prohibitedProps: [],7754 props: {7755 'aria-disabled': null,7756 'aria-errormessage': null,7757 'aria-expanded': null,7758 'aria-haspopup': null,7759 'aria-invalid': null7760 },7761 relatedConcepts: [{7762 concept: {7763 name: 'help [EPUB-SSV]'7764 },7765 module: 'EPUB'7766 }],7767 requireContextRole: [],7768 requiredContextRole: [],7769 requiredOwnedElements: [],7770 requiredProps: {},7771 superClass: [['roletype', 'structure', 'section', 'note']]7772};7773var _default$5 = docTipRole;7774docTipRole$1.default = _default$5;7775var docTocRole$1 = {};7776Object.defineProperty(docTocRole$1, "__esModule", {7777 value: true7778});7779docTocRole$1.default = void 0;7780var docTocRole = {7781 abstract: false,7782 accessibleNameRequired: false,7783 baseConcepts: [],7784 childrenPresentational: false,7785 nameFrom: ['author'],7786 prohibitedProps: [],7787 props: {7788 'aria-disabled': null,7789 'aria-errormessage': null,7790 'aria-expanded': null,7791 'aria-haspopup': null,7792 'aria-invalid': null7793 },7794 relatedConcepts: [{7795 concept: {7796 name: 'toc [EPUB-SSV]'7797 },7798 module: 'EPUB'7799 }],7800 requireContextRole: [],7801 requiredContextRole: [],7802 requiredOwnedElements: [],7803 requiredProps: {},7804 superClass: [['roletype', 'structure', 'section', 'landmark', 'navigation']]7805};7806var _default$4 = docTocRole;7807docTocRole$1.default = _default$4;7808Object.defineProperty(ariaDpubRoles$1, "__esModule", {7809 value: true7810});7811ariaDpubRoles$1.default = void 0;7812var _docAbstractRole = _interopRequireDefault$4(docAbstractRole$1);7813var _docAcknowledgmentsRole = _interopRequireDefault$4(docAcknowledgmentsRole$1);7814var _docAfterwordRole = _interopRequireDefault$4(docAfterwordRole$1);7815var _docAppendixRole = _interopRequireDefault$4(docAppendixRole$1);7816var _docBacklinkRole = _interopRequireDefault$4(docBacklinkRole$1);7817var _docBiblioentryRole = _interopRequireDefault$4(docBiblioentryRole$1);7818var _docBibliographyRole = _interopRequireDefault$4(docBibliographyRole$1);7819var _docBibliorefRole = _interopRequireDefault$4(docBibliorefRole$1);7820var _docChapterRole = _interopRequireDefault$4(docChapterRole$1);7821var _docColophonRole = _interopRequireDefault$4(docColophonRole$1);7822var _docConclusionRole = _interopRequireDefault$4(docConclusionRole$1);7823var _docCoverRole = _interopRequireDefault$4(docCoverRole$1);7824var _docCreditRole = _interopRequireDefault$4(docCreditRole$1);7825var _docCreditsRole = _interopRequireDefault$4(docCreditsRole$1);7826var _docDedicationRole = _interopRequireDefault$4(docDedicationRole$1);7827var _docEndnoteRole = _interopRequireDefault$4(docEndnoteRole$1);7828var _docEndnotesRole = _interopRequireDefault$4(docEndnotesRole$1);7829var _docEpigraphRole = _interopRequireDefault$4(docEpigraphRole$1);7830var _docEpilogueRole = _interopRequireDefault$4(docEpilogueRole$1);7831var _docErrataRole = _interopRequireDefault$4(docErrataRole$1);7832var _docExampleRole = _interopRequireDefault$4(docExampleRole$1);7833var _docFootnoteRole = _interopRequireDefault$4(docFootnoteRole$1);7834var _docForewordRole = _interopRequireDefault$4(docForewordRole$1);7835var _docGlossaryRole = _interopRequireDefault$4(docGlossaryRole$1);7836var _docGlossrefRole = _interopRequireDefault$4(docGlossrefRole$1);7837var _docIndexRole = _interopRequireDefault$4(docIndexRole$1);7838var _docIntroductionRole = _interopRequireDefault$4(docIntroductionRole$1);7839var _docNoterefRole = _interopRequireDefault$4(docNoterefRole$1);7840var _docNoticeRole = _interopRequireDefault$4(docNoticeRole$1);7841var _docPagebreakRole = _interopRequireDefault$4(docPagebreakRole$1);7842var _docPagelistRole = _interopRequireDefault$4(docPagelistRole$1);7843var _docPartRole = _interopRequireDefault$4(docPartRole$1);7844var _docPrefaceRole = _interopRequireDefault$4(docPrefaceRole$1);7845var _docPrologueRole = _interopRequireDefault$4(docPrologueRole$1);7846var _docPullquoteRole = _interopRequireDefault$4(docPullquoteRole$1);7847var _docQnaRole = _interopRequireDefault$4(docQnaRole$1);7848var _docSubtitleRole = _interopRequireDefault$4(docSubtitleRole$1);7849var _docTipRole = _interopRequireDefault$4(docTipRole$1);7850var _docTocRole = _interopRequireDefault$4(docTocRole$1);7851function _interopRequireDefault$4(obj) { return obj && obj.__esModule ? obj : { default: obj }; }7852var ariaDpubRoles = [['doc-abstract', _docAbstractRole.default], ['doc-acknowledgments', _docAcknowledgmentsRole.default], ['doc-afterword', _docAfterwordRole.default], ['doc-appendix', _docAppendixRole.default], ['doc-backlink', _docBacklinkRole.default], ['doc-biblioentry', _docBiblioentryRole.default], ['doc-bibliography', _docBibliographyRole.default], ['doc-biblioref', _docBibliorefRole.default], ['doc-chapter', _docChapterRole.default], ['doc-colophon', _docColophonRole.default], ['doc-conclusion', _docConclusionRole.default], ['doc-cover', _docCoverRole.default], ['doc-credit', _docCreditRole.default], ['doc-credits', _docCreditsRole.default], ['doc-dedication', _docDedicationRole.default], ['doc-endnote', _docEndnoteRole.default], ['doc-endnotes', _docEndnotesRole.default], ['doc-epigraph', _docEpigraphRole.default], ['doc-epilogue', _docEpilogueRole.default], ['doc-errata', _docErrataRole.default], ['doc-example', _docExampleRole.default], ['doc-footnote', _docFootnoteRole.default], ['doc-foreword', _docForewordRole.default], ['doc-glossary', _docGlossaryRole.default], ['doc-glossref', _docGlossrefRole.default], ['doc-index', _docIndexRole.default], ['doc-introduction', _docIntroductionRole.default], ['doc-noteref', _docNoterefRole.default], ['doc-notice', _docNoticeRole.default], ['doc-pagebreak', _docPagebreakRole.default], ['doc-pagelist', _docPagelistRole.default], ['doc-part', _docPartRole.default], ['doc-preface', _docPrefaceRole.default], ['doc-prologue', _docPrologueRole.default], ['doc-pullquote', _docPullquoteRole.default], ['doc-qna', _docQnaRole.default], ['doc-subtitle', _docSubtitleRole.default], ['doc-tip', _docTipRole.default], ['doc-toc', _docTocRole.default]];7853var _default$3 = ariaDpubRoles;7854ariaDpubRoles$1.default = _default$3;7855Object.defineProperty(rolesMap$1, "__esModule", {7856 value: true7857});7858rolesMap$1.default = void 0;7859var _ariaAbstractRoles = _interopRequireDefault$3(ariaAbstractRoles$1);7860var _ariaLiteralRoles = _interopRequireDefault$3(ariaLiteralRoles$1);7861var _ariaDpubRoles = _interopRequireDefault$3(ariaDpubRoles$1);7862function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : { default: obj }; }7863function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }7864function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$3(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }7865function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }7866function _nonIterableRest$2() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }7867function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$3(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$3(o, minLen); }7868function _arrayLikeToArray$3(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }7869function _iterableToArrayLimit$2(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }7870function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }7871var roles$1 = [].concat(_ariaAbstractRoles.default, _ariaLiteralRoles.default, _ariaDpubRoles.default);7872roles$1.forEach(function (_ref) {7873 var _ref2 = _slicedToArray$2(_ref, 2),7874 roleDefinition = _ref2[1];7875 // Conglomerate the properties7876 var _iterator = _createForOfIteratorHelper(roleDefinition.superClass),7877 _step;7878 try {7879 for (_iterator.s(); !(_step = _iterator.n()).done;) {7880 var superClassIter = _step.value;7881 var _iterator2 = _createForOfIteratorHelper(superClassIter),7882 _step2;7883 try {7884 var _loop = function _loop() {7885 var superClassName = _step2.value;7886 var superClassRoleTuple = roles$1.find(function (_ref3) {7887 var _ref4 = _slicedToArray$2(_ref3, 1),7888 name = _ref4[0];7889 return name === superClassName;7890 });7891 if (superClassRoleTuple) {7892 var superClassDefinition = superClassRoleTuple[1];7893 for (var _i2 = 0, _Object$keys = Object.keys(superClassDefinition.props); _i2 < _Object$keys.length; _i2++) {7894 var prop = _Object$keys[_i2];7895 if ( // $FlowIssue Accessing the hasOwnProperty on the Object prototype is fine.7896 !Object.prototype.hasOwnProperty.call(roleDefinition.props, prop)) {7897 Object.assign(roleDefinition.props, _defineProperty({}, prop, superClassDefinition.props[prop]));7898 }7899 }7900 }7901 };7902 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {7903 _loop();7904 }7905 } catch (err) {7906 _iterator2.e(err);7907 } finally {7908 _iterator2.f();7909 }7910 }7911 } catch (err) {7912 _iterator.e(err);7913 } finally {7914 _iterator.f();7915 }7916});7917var rolesMap = {7918 entries: function entries() {7919 return roles$1;7920 },7921 get: function get(key) {7922 var item = roles$1.find(function (tuple) {7923 return tuple[0] === key ? true : false;7924 });7925 return item && item[1];7926 },7927 has: function has(key) {7928 return !!this.get(key);7929 },7930 keys: function keys() {7931 return roles$1.map(function (_ref5) {7932 var _ref6 = _slicedToArray$2(_ref5, 1),7933 key = _ref6[0];7934 return key;7935 });7936 },7937 values: function values() {7938 return roles$1.map(function (_ref7) {7939 var _ref8 = _slicedToArray$2(_ref7, 2),7940 values = _ref8[1];7941 return values;7942 });7943 }7944};7945var _default$2 = rolesMap;7946rolesMap$1.default = _default$2;7947var elementRoleMap$1 = {};7948Object.defineProperty(elementRoleMap$1, "__esModule", {7949 value: true7950});7951elementRoleMap$1.default = void 0;7952var _rolesMap$2 = _interopRequireDefault$2(rolesMap$1);7953function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { default: obj }; }7954function _slicedToArray$1(arr, i) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$2(arr, i) || _nonIterableRest$1(); }7955function _nonIterableRest$1() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }7956function _unsupportedIterableToArray$2(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$2(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen); }7957function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }7958function _iterableToArrayLimit$1(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }7959function _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; }7960var elementRoles$1 = [];7961var keys$1 = _rolesMap$2.default.keys();7962for (var i$1 = 0; i$1 < keys$1.length; i$1++) {7963 var _key = keys$1[i$1];7964 var role = _rolesMap$2.default.get(_key);7965 if (role) {7966 var concepts = [].concat(role.baseConcepts, role.relatedConcepts);7967 for (var k = 0; k < concepts.length; k++) {7968 var relation = concepts[k];7969 if (relation.module === 'HTML') {7970 var concept = relation.concept;7971 if (concept) {7972 (function () {7973 var conceptStr = JSON.stringify(concept);7974 var elementRoleRelation = elementRoles$1.find(function (relation) {7975 return JSON.stringify(relation[0]) === conceptStr;7976 });7977 var roles = void 0;7978 if (elementRoleRelation) {7979 roles = elementRoleRelation[1];7980 } else {7981 roles = [];7982 }7983 var isUnique = true;7984 for (var _i = 0; _i < roles.length; _i++) {7985 if (roles[_i] === _key) {7986 isUnique = false;7987 break;7988 }7989 }7990 if (isUnique) {7991 roles.push(_key);7992 }7993 elementRoles$1.push([concept, roles]);7994 })();7995 }7996 }7997 }7998 }7999}8000var elementRoleMap = {8001 entries: function entries() {8002 return elementRoles$1;8003 },8004 get: function get(key) {8005 var item = elementRoles$1.find(function (tuple) {8006 return JSON.stringify(tuple[0]) === JSON.stringify(key) ? true : false;8007 });8008 return item && item[1];8009 },8010 has: function has(key) {8011 return !!this.get(key);8012 },8013 keys: function keys() {8014 return elementRoles$1.map(function (_ref) {8015 var _ref2 = _slicedToArray$1(_ref, 1),8016 key = _ref2[0];8017 return key;8018 });8019 },8020 values: function values() {8021 return elementRoles$1.map(function (_ref3) {8022 var _ref4 = _slicedToArray$1(_ref3, 2),8023 values = _ref4[1];8024 return values;8025 });8026 }8027};8028var _default$1 = elementRoleMap;8029elementRoleMap$1.default = _default$1;8030var roleElementMap$1 = {};8031Object.defineProperty(roleElementMap$1, "__esModule", {8032 value: true8033});8034roleElementMap$1.default = void 0;8035var _rolesMap$1 = _interopRequireDefault$1(rolesMap$1);8036function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }8037function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest(); }8038function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }8039function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }8040function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }8041function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }8042function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }8043var roleElement = [];8044var keys = _rolesMap$1.default.keys();8045var _loop = function _loop(i) {8046 var key = keys[i];8047 var role = _rolesMap$1.default.get(key);8048 if (role) {8049 var concepts = [].concat(role.baseConcepts, role.relatedConcepts);8050 for (var k = 0; k < concepts.length; k++) {8051 var relation = concepts[k];8052 if (relation.module === 'HTML') {8053 var concept = relation.concept;8054 if (concept) {8055 var roleElementRelation = roleElement.find(function (item) {8056 return item[0] === key;8057 });8058 var relationConcepts = void 0;8059 if (roleElementRelation) {8060 relationConcepts = roleElementRelation[1];8061 } else {8062 relationConcepts = [];8063 }8064 relationConcepts.push(concept);8065 roleElement.push([key, relationConcepts]);8066 }8067 }8068 }8069 }8070};8071for (var i = 0; i < keys.length; i++) {8072 _loop(i);8073}8074var roleElementMap = {8075 entries: function entries() {8076 return roleElement;8077 },8078 get: function get(key) {8079 var item = roleElement.find(function (tuple) {8080 return tuple[0] === key ? true : false;8081 });8082 return item && item[1];8083 },8084 has: function has(key) {8085 return !!this.get(key);8086 },8087 keys: function keys() {8088 return roleElement.map(function (_ref) {8089 var _ref2 = _slicedToArray(_ref, 1),8090 key = _ref2[0];8091 return key;8092 });8093 },8094 values: function values() {8095 return roleElement.map(function (_ref3) {8096 var _ref4 = _slicedToArray(_ref3, 2),8097 values = _ref4[1];8098 return values;8099 });8100 }8101};8102var _default = roleElementMap;8103roleElementMap$1.default = _default;8104Object.defineProperty(lib, "__esModule", {8105 value: true8106});8107var roleElements_1 = lib.roleElements = elementRoles_1 = lib.elementRoles = roles_1 = lib.roles = lib.dom = lib.aria = void 0;8108var _ariaPropsMap = _interopRequireDefault(ariaPropsMap$1);8109var _domMap = _interopRequireDefault(domMap$1);8110var _rolesMap = _interopRequireDefault(rolesMap$1);8111var _elementRoleMap = _interopRequireDefault(elementRoleMap$1);8112var _roleElementMap = _interopRequireDefault(roleElementMap$1);8113function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }8114var aria = _ariaPropsMap.default;8115lib.aria = aria;8116var dom = _domMap.default;8117lib.dom = dom;8118var roles = _rolesMap.default;8119var roles_1 = lib.roles = roles;8120var elementRoles = _elementRoleMap.default;8121var elementRoles_1 = lib.elementRoles = elementRoles;8122var roleElements = _roleElementMap.default;8123roleElements_1 = lib.roleElements = roleElements;8124function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {8125 try {8126 var info = gen[key](arg);8127 var value = info.value;8128 } catch (error) {8129 reject(error);8130 return;8131 }8132 if (info.done) {8133 resolve(value);8134 } else {8135 Promise.resolve(value).then(_next, _throw);8136 }8137}8138function _asyncToGenerator(fn) {8139 return function () {8140 var self = this,8141 args = arguments;8142 return new Promise(function (resolve, reject) {8143 var gen = fn.apply(self, args);8144 function _next(value) {8145 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);8146 }8147 function _throw(err) {8148 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);8149 }8150 _next(undefined);8151 });8152 };8153}8154var runtime = {exports: {}};8155/**8156 * Copyright (c) 2014-present, Facebook, Inc.8157 *8158 * This source code is licensed under the MIT license found in the8159 * LICENSE file in the root directory of this source tree.8160 */8161(function (module) {8162var runtime = (function (exports) {8163 var Op = Object.prototype;8164 var hasOwn = Op.hasOwnProperty;8165 var undefined$1; // More compressible than void 0.8166 var $Symbol = typeof Symbol === "function" ? Symbol : {};8167 var iteratorSymbol = $Symbol.iterator || "@@iterator";8168 var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";8169 var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";8170 function define(obj, key, value) {8171 Object.defineProperty(obj, key, {8172 value: value,8173 enumerable: true,8174 configurable: true,8175 writable: true8176 });8177 return obj[key];8178 }8179 try {8180 // IE 8 has a broken Object.defineProperty that only works on DOM objects.8181 define({}, "");8182 } catch (err) {8183 define = function(obj, key, value) {8184 return obj[key] = value;8185 };8186 }8187 function wrap(innerFn, outerFn, self, tryLocsList) {8188 // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.8189 var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;8190 var generator = Object.create(protoGenerator.prototype);8191 var context = new Context(tryLocsList || []);8192 // The ._invoke method unifies the implementations of the .next,8193 // .throw, and .return methods.8194 generator._invoke = makeInvokeMethod(innerFn, self, context);8195 return generator;8196 }8197 exports.wrap = wrap;8198 // Try/catch helper to minimize deoptimizations. Returns a completion8199 // record like context.tryEntries[i].completion. This interface could8200 // have been (and was previously) designed to take a closure to be8201 // invoked without arguments, but in all the cases we care about we8202 // already have an existing method we want to call, so there's no need8203 // to create a new function object. We can even get away with assuming8204 // the method takes exactly one argument, since that happens to be true8205 // in every case, so we don't have to touch the arguments object. The8206 // only additional allocation required is the completion record, which8207 // has a stable shape and so hopefully should be cheap to allocate.8208 function tryCatch(fn, obj, arg) {8209 try {8210 return { type: "normal", arg: fn.call(obj, arg) };8211 } catch (err) {8212 return { type: "throw", arg: err };8213 }8214 }8215 var GenStateSuspendedStart = "suspendedStart";8216 var GenStateSuspendedYield = "suspendedYield";8217 var GenStateExecuting = "executing";8218 var GenStateCompleted = "completed";8219 // Returning this object from the innerFn has the same effect as8220 // breaking out of the dispatch switch statement.8221 var ContinueSentinel = {};8222 // Dummy constructor functions that we use as the .constructor and8223 // .constructor.prototype properties for functions that return Generator8224 // objects. For full spec compliance, you may wish to configure your8225 // minifier not to mangle the names of these two functions.8226 function Generator() {}8227 function GeneratorFunction() {}8228 function GeneratorFunctionPrototype() {}8229 // This is a polyfill for %IteratorPrototype% for environments that8230 // don't natively support it.8231 var IteratorPrototype = {};8232 define(IteratorPrototype, iteratorSymbol, function () {8233 return this;8234 });8235 var getProto = Object.getPrototypeOf;8236 var NativeIteratorPrototype = getProto && getProto(getProto(values([])));8237 if (NativeIteratorPrototype &&8238 NativeIteratorPrototype !== Op &&8239 hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {8240 // This environment has a native %IteratorPrototype%; use it instead8241 // of the polyfill.8242 IteratorPrototype = NativeIteratorPrototype;8243 }8244 var Gp = GeneratorFunctionPrototype.prototype =8245 Generator.prototype = Object.create(IteratorPrototype);8246 GeneratorFunction.prototype = GeneratorFunctionPrototype;8247 define(Gp, "constructor", GeneratorFunctionPrototype);8248 define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);8249 GeneratorFunction.displayName = define(8250 GeneratorFunctionPrototype,8251 toStringTagSymbol,8252 "GeneratorFunction"8253 );8254 // Helper for defining the .next, .throw, and .return methods of the8255 // Iterator interface in terms of a single ._invoke method.8256 function defineIteratorMethods(prototype) {8257 ["next", "throw", "return"].forEach(function(method) {8258 define(prototype, method, function(arg) {8259 return this._invoke(method, arg);8260 });8261 });8262 }8263 exports.isGeneratorFunction = function(genFun) {8264 var ctor = typeof genFun === "function" && genFun.constructor;8265 return ctor8266 ? ctor === GeneratorFunction ||8267 // For the native GeneratorFunction constructor, the best we can8268 // do is to check its .name property.8269 (ctor.displayName || ctor.name) === "GeneratorFunction"8270 : false;8271 };8272 exports.mark = function(genFun) {8273 if (Object.setPrototypeOf) {8274 Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);8275 } else {8276 genFun.__proto__ = GeneratorFunctionPrototype;8277 define(genFun, toStringTagSymbol, "GeneratorFunction");8278 }8279 genFun.prototype = Object.create(Gp);8280 return genFun;8281 };8282 // Within the body of any async function, `await x` is transformed to8283 // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test8284 // `hasOwn.call(value, "__await")` to determine if the yielded value is8285 // meant to be awaited.8286 exports.awrap = function(arg) {8287 return { __await: arg };8288 };8289 function AsyncIterator(generator, PromiseImpl) {8290 function invoke(method, arg, resolve, reject) {8291 var record = tryCatch(generator[method], generator, arg);8292 if (record.type === "throw") {8293 reject(record.arg);8294 } else {8295 var result = record.arg;8296 var value = result.value;8297 if (value &&8298 typeof value === "object" &&8299 hasOwn.call(value, "__await")) {8300 return PromiseImpl.resolve(value.__await).then(function(value) {8301 invoke("next", value, resolve, reject);8302 }, function(err) {8303 invoke("throw", err, resolve, reject);8304 });8305 }8306 return PromiseImpl.resolve(value).then(function(unwrapped) {8307 // When a yielded Promise is resolved, its final value becomes8308 // the .value of the Promise<{value,done}> result for the8309 // current iteration.8310 result.value = unwrapped;8311 resolve(result);8312 }, function(error) {8313 // If a rejected Promise was yielded, throw the rejection back8314 // into the async generator function so it can be handled there.8315 return invoke("throw", error, resolve, reject);8316 });8317 }8318 }8319 var previousPromise;8320 function enqueue(method, arg) {8321 function callInvokeWithMethodAndArg() {8322 return new PromiseImpl(function(resolve, reject) {8323 invoke(method, arg, resolve, reject);8324 });8325 }8326 return previousPromise =8327 // If enqueue has been called before, then we want to wait until8328 // all previous Promises have been resolved before calling invoke,8329 // so that results are always delivered in the correct order. If8330 // enqueue has not been called before, then it is important to8331 // call invoke immediately, without waiting on a callback to fire,8332 // so that the async generator function has the opportunity to do8333 // any necessary setup in a predictable way. This predictability8334 // is why the Promise constructor synchronously invokes its8335 // executor callback, and why async functions synchronously8336 // execute code before the first await. Since we implement simple8337 // async functions in terms of async generators, it is especially8338 // important to get this right, even though it requires care.8339 previousPromise ? previousPromise.then(8340 callInvokeWithMethodAndArg,8341 // Avoid propagating failures to Promises returned by later8342 // invocations of the iterator.8343 callInvokeWithMethodAndArg8344 ) : callInvokeWithMethodAndArg();8345 }8346 // Define the unified helper method that is used to implement .next,8347 // .throw, and .return (see defineIteratorMethods).8348 this._invoke = enqueue;8349 }8350 defineIteratorMethods(AsyncIterator.prototype);8351 define(AsyncIterator.prototype, asyncIteratorSymbol, function () {8352 return this;8353 });8354 exports.AsyncIterator = AsyncIterator;8355 // Note that simple async functions are implemented on top of8356 // AsyncIterator objects; they just return a Promise for the value of8357 // the final result produced by the iterator.8358 exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {8359 if (PromiseImpl === void 0) PromiseImpl = Promise;8360 var iter = new AsyncIterator(8361 wrap(innerFn, outerFn, self, tryLocsList),8362 PromiseImpl8363 );8364 return exports.isGeneratorFunction(outerFn)8365 ? iter // If outerFn is a generator, return the full iterator.8366 : iter.next().then(function(result) {8367 return result.done ? result.value : iter.next();8368 });8369 };8370 function makeInvokeMethod(innerFn, self, context) {8371 var state = GenStateSuspendedStart;8372 return function invoke(method, arg) {8373 if (state === GenStateExecuting) {8374 throw new Error("Generator is already running");8375 }8376 if (state === GenStateCompleted) {8377 if (method === "throw") {8378 throw arg;8379 }8380 // Be forgiving, per 25.3.3.3.3 of the spec:8381 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume8382 return doneResult();8383 }8384 context.method = method;8385 context.arg = arg;8386 while (true) {8387 var delegate = context.delegate;8388 if (delegate) {8389 var delegateResult = maybeInvokeDelegate(delegate, context);8390 if (delegateResult) {8391 if (delegateResult === ContinueSentinel) continue;8392 return delegateResult;8393 }8394 }8395 if (context.method === "next") {8396 // Setting context._sent for legacy support of Babel's8397 // function.sent implementation.8398 context.sent = context._sent = context.arg;8399 } else if (context.method === "throw") {8400 if (state === GenStateSuspendedStart) {8401 state = GenStateCompleted;8402 throw context.arg;8403 }8404 context.dispatchException(context.arg);8405 } else if (context.method === "return") {8406 context.abrupt("return", context.arg);8407 }8408 state = GenStateExecuting;8409 var record = tryCatch(innerFn, self, context);8410 if (record.type === "normal") {8411 // If an exception is thrown from innerFn, we leave state ===8412 // GenStateExecuting and loop back for another invocation.8413 state = context.done8414 ? GenStateCompleted8415 : GenStateSuspendedYield;8416 if (record.arg === ContinueSentinel) {8417 continue;8418 }8419 return {8420 value: record.arg,8421 done: context.done8422 };8423 } else if (record.type === "throw") {8424 state = GenStateCompleted;8425 // Dispatch the exception by looping back around to the8426 // context.dispatchException(context.arg) call above.8427 context.method = "throw";8428 context.arg = record.arg;8429 }8430 }8431 };8432 }8433 // Call delegate.iterator[context.method](context.arg) and handle the8434 // result, either by returning a { value, done } result from the8435 // delegate iterator, or by modifying context.method and context.arg,8436 // setting context.delegate to null, and returning the ContinueSentinel.8437 function maybeInvokeDelegate(delegate, context) {8438 var method = delegate.iterator[context.method];8439 if (method === undefined$1) {8440 // A .throw or .return when the delegate iterator has no .throw8441 // method always terminates the yield* loop.8442 context.delegate = null;8443 if (context.method === "throw") {8444 // Note: ["return"] must be used for ES3 parsing compatibility.8445 if (delegate.iterator["return"]) {8446 // If the delegate iterator has a return method, give it a8447 // chance to clean up.8448 context.method = "return";8449 context.arg = undefined$1;8450 maybeInvokeDelegate(delegate, context);8451 if (context.method === "throw") {8452 // If maybeInvokeDelegate(context) changed context.method from8453 // "return" to "throw", let that override the TypeError below.8454 return ContinueSentinel;8455 }8456 }8457 context.method = "throw";8458 context.arg = new TypeError(8459 "The iterator does not provide a 'throw' method");8460 }8461 return ContinueSentinel;8462 }8463 var record = tryCatch(method, delegate.iterator, context.arg);8464 if (record.type === "throw") {8465 context.method = "throw";8466 context.arg = record.arg;8467 context.delegate = null;8468 return ContinueSentinel;8469 }8470 var info = record.arg;8471 if (! info) {8472 context.method = "throw";8473 context.arg = new TypeError("iterator result is not an object");8474 context.delegate = null;8475 return ContinueSentinel;8476 }8477 if (info.done) {8478 // Assign the result of the finished delegate to the temporary8479 // variable specified by delegate.resultName (see delegateYield).8480 context[delegate.resultName] = info.value;8481 // Resume execution at the desired location (see delegateYield).8482 context.next = delegate.nextLoc;8483 // If context.method was "throw" but the delegate handled the8484 // exception, let the outer generator proceed normally. If8485 // context.method was "next", forget context.arg since it has been8486 // "consumed" by the delegate iterator. If context.method was8487 // "return", allow the original .return call to continue in the8488 // outer generator.8489 if (context.method !== "return") {8490 context.method = "next";8491 context.arg = undefined$1;8492 }8493 } else {8494 // Re-yield the result returned by the delegate method.8495 return info;8496 }8497 // The delegate iterator is finished, so forget it and continue with8498 // the outer generator.8499 context.delegate = null;8500 return ContinueSentinel;8501 }8502 // Define Generator.prototype.{next,throw,return} in terms of the8503 // unified ._invoke helper method.8504 defineIteratorMethods(Gp);8505 define(Gp, toStringTagSymbol, "Generator");8506 // A Generator should always return itself as the iterator object when the8507 // @@iterator function is called on it. Some browsers' implementations of the8508 // iterator prototype chain incorrectly implement this, causing the Generator8509 // object to not be returned from this call. This ensures that doesn't happen.8510 // See https://github.com/facebook/regenerator/issues/274 for more details.8511 define(Gp, iteratorSymbol, function() {8512 return this;8513 });8514 define(Gp, "toString", function() {8515 return "[object Generator]";8516 });8517 function pushTryEntry(locs) {8518 var entry = { tryLoc: locs[0] };8519 if (1 in locs) {8520 entry.catchLoc = locs[1];8521 }8522 if (2 in locs) {8523 entry.finallyLoc = locs[2];8524 entry.afterLoc = locs[3];8525 }8526 this.tryEntries.push(entry);8527 }8528 function resetTryEntry(entry) {8529 var record = entry.completion || {};8530 record.type = "normal";8531 delete record.arg;8532 entry.completion = record;8533 }8534 function Context(tryLocsList) {8535 // The root entry object (effectively a try statement without a catch8536 // or a finally block) gives us a place to store values thrown from8537 // locations where there is no enclosing try statement.8538 this.tryEntries = [{ tryLoc: "root" }];8539 tryLocsList.forEach(pushTryEntry, this);8540 this.reset(true);8541 }8542 exports.keys = function(object) {8543 var keys = [];8544 for (var key in object) {8545 keys.push(key);8546 }8547 keys.reverse();8548 // Rather than returning an object with a next method, we keep8549 // things simple and return the next function itself.8550 return function next() {8551 while (keys.length) {8552 var key = keys.pop();8553 if (key in object) {8554 next.value = key;8555 next.done = false;8556 return next;8557 }8558 }8559 // To avoid creating an additional object, we just hang the .value8560 // and .done properties off the next function object itself. This8561 // also ensures that the minifier will not anonymize the function.8562 next.done = true;8563 return next;8564 };8565 };8566 function values(iterable) {8567 if (iterable) {8568 var iteratorMethod = iterable[iteratorSymbol];8569 if (iteratorMethod) {8570 return iteratorMethod.call(iterable);8571 }8572 if (typeof iterable.next === "function") {8573 return iterable;8574 }8575 if (!isNaN(iterable.length)) {8576 var i = -1, next = function next() {8577 while (++i < iterable.length) {8578 if (hasOwn.call(iterable, i)) {8579 next.value = iterable[i];8580 next.done = false;8581 return next;8582 }8583 }8584 next.value = undefined$1;8585 next.done = true;8586 return next;8587 };8588 return next.next = next;8589 }8590 }8591 // Return an iterator with no values.8592 return { next: doneResult };8593 }8594 exports.values = values;8595 function doneResult() {8596 return { value: undefined$1, done: true };8597 }8598 Context.prototype = {8599 constructor: Context,8600 reset: function(skipTempReset) {8601 this.prev = 0;8602 this.next = 0;8603 // Resetting context._sent for legacy support of Babel's8604 // function.sent implementation.8605 this.sent = this._sent = undefined$1;8606 this.done = false;8607 this.delegate = null;8608 this.method = "next";8609 this.arg = undefined$1;8610 this.tryEntries.forEach(resetTryEntry);8611 if (!skipTempReset) {8612 for (var name in this) {8613 // Not sure about the optimal order of these conditions:8614 if (name.charAt(0) === "t" &&8615 hasOwn.call(this, name) &&8616 !isNaN(+name.slice(1))) {8617 this[name] = undefined$1;8618 }8619 }8620 }8621 },8622 stop: function() {8623 this.done = true;8624 var rootEntry = this.tryEntries[0];8625 var rootRecord = rootEntry.completion;8626 if (rootRecord.type === "throw") {8627 throw rootRecord.arg;8628 }8629 return this.rval;8630 },8631 dispatchException: function(exception) {8632 if (this.done) {8633 throw exception;8634 }8635 var context = this;8636 function handle(loc, caught) {8637 record.type = "throw";8638 record.arg = exception;8639 context.next = loc;8640 if (caught) {8641 // If the dispatched exception was caught by a catch block,8642 // then let that catch block handle the exception normally.8643 context.method = "next";8644 context.arg = undefined$1;8645 }8646 return !! caught;8647 }8648 for (var i = this.tryEntries.length - 1; i >= 0; --i) {8649 var entry = this.tryEntries[i];8650 var record = entry.completion;8651 if (entry.tryLoc === "root") {8652 // Exception thrown outside of any try block that could handle8653 // it, so set the completion value of the entire function to8654 // throw the exception.8655 return handle("end");8656 }8657 if (entry.tryLoc <= this.prev) {8658 var hasCatch = hasOwn.call(entry, "catchLoc");8659 var hasFinally = hasOwn.call(entry, "finallyLoc");8660 if (hasCatch && hasFinally) {8661 if (this.prev < entry.catchLoc) {8662 return handle(entry.catchLoc, true);8663 } else if (this.prev < entry.finallyLoc) {8664 return handle(entry.finallyLoc);8665 }8666 } else if (hasCatch) {8667 if (this.prev < entry.catchLoc) {8668 return handle(entry.catchLoc, true);8669 }8670 } else if (hasFinally) {8671 if (this.prev < entry.finallyLoc) {8672 return handle(entry.finallyLoc);8673 }8674 } else {8675 throw new Error("try statement without catch or finally");8676 }8677 }8678 }8679 },8680 abrupt: function(type, arg) {8681 for (var i = this.tryEntries.length - 1; i >= 0; --i) {8682 var entry = this.tryEntries[i];8683 if (entry.tryLoc <= this.prev &&8684 hasOwn.call(entry, "finallyLoc") &&8685 this.prev < entry.finallyLoc) {8686 var finallyEntry = entry;8687 break;8688 }8689 }8690 if (finallyEntry &&8691 (type === "break" ||8692 type === "continue") &&8693 finallyEntry.tryLoc <= arg &&8694 arg <= finallyEntry.finallyLoc) {8695 // Ignore the finally entry if control is not jumping to a8696 // location outside the try/catch block.8697 finallyEntry = null;8698 }8699 var record = finallyEntry ? finallyEntry.completion : {};8700 record.type = type;8701 record.arg = arg;8702 if (finallyEntry) {8703 this.method = "next";8704 this.next = finallyEntry.finallyLoc;8705 return ContinueSentinel;8706 }8707 return this.complete(record);8708 },8709 complete: function(record, afterLoc) {8710 if (record.type === "throw") {8711 throw record.arg;8712 }8713 if (record.type === "break" ||8714 record.type === "continue") {8715 this.next = record.arg;8716 } else if (record.type === "return") {8717 this.rval = this.arg = record.arg;8718 this.method = "return";8719 this.next = "end";8720 } else if (record.type === "normal" && afterLoc) {8721 this.next = afterLoc;8722 }8723 return ContinueSentinel;8724 },8725 finish: function(finallyLoc) {8726 for (var i = this.tryEntries.length - 1; i >= 0; --i) {8727 var entry = this.tryEntries[i];8728 if (entry.finallyLoc === finallyLoc) {8729 this.complete(entry.completion, entry.afterLoc);8730 resetTryEntry(entry);8731 return ContinueSentinel;8732 }8733 }8734 },8735 "catch": function(tryLoc) {8736 for (var i = this.tryEntries.length - 1; i >= 0; --i) {8737 var entry = this.tryEntries[i];8738 if (entry.tryLoc === tryLoc) {8739 var record = entry.completion;8740 if (record.type === "throw") {8741 var thrown = record.arg;8742 resetTryEntry(entry);8743 }8744 return thrown;8745 }8746 }8747 // The context.catch method must only be called with a location8748 // argument that corresponds to a known catch block.8749 throw new Error("illegal catch attempt");8750 },8751 delegateYield: function(iterable, resultName, nextLoc) {8752 this.delegate = {8753 iterator: values(iterable),8754 resultName: resultName,8755 nextLoc: nextLoc8756 };8757 if (this.method === "next") {8758 // Deliberately forget the last sent value so that we don't8759 // accidentally pass it on to the delegate.8760 this.arg = undefined$1;8761 }8762 return ContinueSentinel;8763 }8764 };8765 // Regardless of whether this script is executing as a CommonJS module8766 // or not, return the runtime object so that we can declare the variable8767 // regeneratorRuntime in the outer scope, which allows this module to be8768 // injected easily by `bin/regenerator --include-runtime script.js`.8769 return exports;8770}(8771 // If this script is executing as a CommonJS module, use module.exports8772 // as the regeneratorRuntime namespace. Otherwise create a new empty8773 // object. Either way, the resulting object will be used to initialize8774 // the regeneratorRuntime variable at the top of this file.8775 module.exports 8776));8777try {8778 regeneratorRuntime = runtime;8779} catch (accidentalStrictMode) {8780 // This module should not be running in strict mode, so the above8781 // assignment should always work unless something is misconfigured. Just8782 // in case runtime.js accidentally runs in strict mode, in modern engines8783 // we can explicitly access globalThis. In older engines we can escape8784 // strict mode using a global Function call. This could conceivably fail8785 // if a Content Security Policy forbids using Function, but in that case8786 // the proper solution is to fix the accidental strict mode problem. If8787 // you've misconfigured your bundler to force strict mode and applied a8788 // CSP to forbid Function, and you're not willing to fix either of those8789 // problems, please detail your unique predicament in a GitHub issue.8790 if (typeof globalThis === "object") {8791 globalThis.regeneratorRuntime = runtime;8792 } else {8793 Function("r", "regeneratorRuntime = r")(runtime);8794 }8795}8796}(runtime));8797var regenerator = runtime.exports;8798var lzString = {exports: {}};8799(function (module) {8800// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>8801// This work is free. You can redistribute it and/or modify it8802// under the terms of the WTFPL, Version 28803// For more information see LICENSE.txt or http://www.wtfpl.net/8804//8805// For more information, the home page:8806// http://pieroxy.net/blog/pages/lz-string/testing.html8807//8808// LZ-based compression algorithm, version 1.4.48809var LZString = (function() {8810// private property8811var f = String.fromCharCode;8812var keyStrBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";8813var keyStrUriSafe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$";8814var baseReverseDic = {};8815function getBaseValue(alphabet, character) {8816 if (!baseReverseDic[alphabet]) {8817 baseReverseDic[alphabet] = {};8818 for (var i=0 ; i<alphabet.length ; i++) {8819 baseReverseDic[alphabet][alphabet.charAt(i)] = i;8820 }8821 }8822 return baseReverseDic[alphabet][character];8823}8824var LZString = {8825 compressToBase64 : function (input) {8826 if (input == null) return "";8827 var res = LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);});8828 switch (res.length % 4) { // To produce valid Base648829 default: // When could this happen ?8830 case 0 : return res;8831 case 1 : return res+"===";8832 case 2 : return res+"==";8833 case 3 : return res+"=";8834 }8835 },8836 decompressFromBase64 : function (input) {8837 if (input == null) return "";8838 if (input == "") return null;8839 return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrBase64, input.charAt(index)); });8840 },8841 compressToUTF16 : function (input) {8842 if (input == null) return "";8843 return LZString._compress(input, 15, function(a){return f(a+32);}) + " ";8844 },8845 decompressFromUTF16: function (compressed) {8846 if (compressed == null) return "";8847 if (compressed == "") return null;8848 return LZString._decompress(compressed.length, 16384, function(index) { return compressed.charCodeAt(index) - 32; });8849 },8850 //compress into uint8array (UCS-2 big endian format)8851 compressToUint8Array: function (uncompressed) {8852 var compressed = LZString.compress(uncompressed);8853 var buf=new Uint8Array(compressed.length*2); // 2 bytes per character8854 for (var i=0, TotalLen=compressed.length; i<TotalLen; i++) {8855 var current_value = compressed.charCodeAt(i);8856 buf[i*2] = current_value >>> 8;8857 buf[i*2+1] = current_value % 256;8858 }8859 return buf;8860 },8861 //decompress from uint8array (UCS-2 big endian format)8862 decompressFromUint8Array:function (compressed) {8863 if (compressed===null || compressed===undefined){8864 return LZString.decompress(compressed);8865 } else {8866 var buf=new Array(compressed.length/2); // 2 bytes per character8867 for (var i=0, TotalLen=buf.length; i<TotalLen; i++) {8868 buf[i]=compressed[i*2]*256+compressed[i*2+1];8869 }8870 var result = [];8871 buf.forEach(function (c) {8872 result.push(f(c));8873 });8874 return LZString.decompress(result.join(''));8875 }8876 },8877 //compress into a string that is already URI encoded8878 compressToEncodedURIComponent: function (input) {8879 if (input == null) return "";8880 return LZString._compress(input, 6, function(a){return keyStrUriSafe.charAt(a);});8881 },8882 //decompress from an output of compressToEncodedURIComponent8883 decompressFromEncodedURIComponent:function (input) {8884 if (input == null) return "";8885 if (input == "") return null;8886 input = input.replace(/ /g, "+");8887 return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrUriSafe, input.charAt(index)); });8888 },8889 compress: function (uncompressed) {8890 return LZString._compress(uncompressed, 16, function(a){return f(a);});8891 },8892 _compress: function (uncompressed, bitsPerChar, getCharFromInt) {8893 if (uncompressed == null) return "";8894 var i, value,8895 context_dictionary= {},8896 context_dictionaryToCreate= {},8897 context_c="",8898 context_wc="",8899 context_w="",8900 context_enlargeIn= 2, // Compensate for the first entry which should not count8901 context_dictSize= 3,8902 context_numBits= 2,8903 context_data=[],8904 context_data_val=0,8905 context_data_position=0,8906 ii;8907 for (ii = 0; ii < uncompressed.length; ii += 1) {8908 context_c = uncompressed.charAt(ii);8909 if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {8910 context_dictionary[context_c] = context_dictSize++;8911 context_dictionaryToCreate[context_c] = true;8912 }8913 context_wc = context_w + context_c;8914 if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {8915 context_w = context_wc;8916 } else {8917 if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {8918 if (context_w.charCodeAt(0)<256) {8919 for (i=0 ; i<context_numBits ; i++) {8920 context_data_val = (context_data_val << 1);8921 if (context_data_position == bitsPerChar-1) {8922 context_data_position = 0;8923 context_data.push(getCharFromInt(context_data_val));8924 context_data_val = 0;8925 } else {8926 context_data_position++;8927 }8928 }8929 value = context_w.charCodeAt(0);8930 for (i=0 ; i<8 ; i++) {8931 context_data_val = (context_data_val << 1) | (value&1);8932 if (context_data_position == bitsPerChar-1) {8933 context_data_position = 0;8934 context_data.push(getCharFromInt(context_data_val));8935 context_data_val = 0;8936 } else {8937 context_data_position++;8938 }8939 value = value >> 1;8940 }8941 } else {8942 value = 1;8943 for (i=0 ; i<context_numBits ; i++) {8944 context_data_val = (context_data_val << 1) | value;8945 if (context_data_position ==bitsPerChar-1) {8946 context_data_position = 0;8947 context_data.push(getCharFromInt(context_data_val));8948 context_data_val = 0;8949 } else {8950 context_data_position++;8951 }8952 value = 0;8953 }8954 value = context_w.charCodeAt(0);8955 for (i=0 ; i<16 ; i++) {8956 context_data_val = (context_data_val << 1) | (value&1);8957 if (context_data_position == bitsPerChar-1) {8958 context_data_position = 0;8959 context_data.push(getCharFromInt(context_data_val));8960 context_data_val = 0;8961 } else {8962 context_data_position++;8963 }8964 value = value >> 1;8965 }8966 }8967 context_enlargeIn--;8968 if (context_enlargeIn == 0) {8969 context_enlargeIn = Math.pow(2, context_numBits);8970 context_numBits++;8971 }8972 delete context_dictionaryToCreate[context_w];8973 } else {8974 value = context_dictionary[context_w];8975 for (i=0 ; i<context_numBits ; i++) {8976 context_data_val = (context_data_val << 1) | (value&1);8977 if (context_data_position == bitsPerChar-1) {8978 context_data_position = 0;8979 context_data.push(getCharFromInt(context_data_val));8980 context_data_val = 0;8981 } else {8982 context_data_position++;8983 }8984 value = value >> 1;8985 }8986 }8987 context_enlargeIn--;8988 if (context_enlargeIn == 0) {8989 context_enlargeIn = Math.pow(2, context_numBits);8990 context_numBits++;8991 }8992 // Add wc to the dictionary.8993 context_dictionary[context_wc] = context_dictSize++;8994 context_w = String(context_c);8995 }8996 }8997 // Output the code for w.8998 if (context_w !== "") {8999 if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {9000 if (context_w.charCodeAt(0)<256) {9001 for (i=0 ; i<context_numBits ; i++) {9002 context_data_val = (context_data_val << 1);9003 if (context_data_position == bitsPerChar-1) {9004 context_data_position = 0;9005 context_data.push(getCharFromInt(context_data_val));9006 context_data_val = 0;9007 } else {9008 context_data_position++;9009 }9010 }9011 value = context_w.charCodeAt(0);9012 for (i=0 ; i<8 ; i++) {9013 context_data_val = (context_data_val << 1) | (value&1);9014 if (context_data_position == bitsPerChar-1) {9015 context_data_position = 0;9016 context_data.push(getCharFromInt(context_data_val));9017 context_data_val = 0;9018 } else {9019 context_data_position++;9020 }9021 value = value >> 1;9022 }9023 } else {9024 value = 1;9025 for (i=0 ; i<context_numBits ; i++) {9026 context_data_val = (context_data_val << 1) | value;9027 if (context_data_position == bitsPerChar-1) {9028 context_data_position = 0;9029 context_data.push(getCharFromInt(context_data_val));9030 context_data_val = 0;9031 } else {9032 context_data_position++;9033 }9034 value = 0;9035 }9036 value = context_w.charCodeAt(0);9037 for (i=0 ; i<16 ; i++) {9038 context_data_val = (context_data_val << 1) | (value&1);9039 if (context_data_position == bitsPerChar-1) {9040 context_data_position = 0;9041 context_data.push(getCharFromInt(context_data_val));9042 context_data_val = 0;9043 } else {9044 context_data_position++;9045 }9046 value = value >> 1;9047 }9048 }9049 context_enlargeIn--;9050 if (context_enlargeIn == 0) {9051 context_enlargeIn = Math.pow(2, context_numBits);9052 context_numBits++;9053 }9054 delete context_dictionaryToCreate[context_w];9055 } else {9056 value = context_dictionary[context_w];9057 for (i=0 ; i<context_numBits ; i++) {9058 context_data_val = (context_data_val << 1) | (value&1);9059 if (context_data_position == bitsPerChar-1) {9060 context_data_position = 0;9061 context_data.push(getCharFromInt(context_data_val));9062 context_data_val = 0;9063 } else {9064 context_data_position++;9065 }9066 value = value >> 1;9067 }9068 }9069 context_enlargeIn--;9070 if (context_enlargeIn == 0) {9071 context_enlargeIn = Math.pow(2, context_numBits);9072 context_numBits++;9073 }9074 }9075 // Mark the end of the stream9076 value = 2;9077 for (i=0 ; i<context_numBits ; i++) {9078 context_data_val = (context_data_val << 1) | (value&1);9079 if (context_data_position == bitsPerChar-1) {9080 context_data_position = 0;9081 context_data.push(getCharFromInt(context_data_val));9082 context_data_val = 0;9083 } else {9084 context_data_position++;9085 }9086 value = value >> 1;9087 }9088 // Flush the last char9089 while (true) {9090 context_data_val = (context_data_val << 1);9091 if (context_data_position == bitsPerChar-1) {9092 context_data.push(getCharFromInt(context_data_val));9093 break;9094 }9095 else context_data_position++;9096 }9097 return context_data.join('');9098 },9099 decompress: function (compressed) {9100 if (compressed == null) return "";9101 if (compressed == "") return null;9102 return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });9103 },9104 _decompress: function (length, resetValue, getNextValue) {9105 var dictionary = [],9106 enlargeIn = 4,9107 dictSize = 4,9108 numBits = 3,9109 entry = "",9110 result = [],9111 i,9112 w,9113 bits, resb, maxpower, power,9114 c,9115 data = {val:getNextValue(0), position:resetValue, index:1};9116 for (i = 0; i < 3; i += 1) {9117 dictionary[i] = i;9118 }9119 bits = 0;9120 maxpower = Math.pow(2,2);9121 power=1;9122 while (power!=maxpower) {9123 resb = data.val & data.position;9124 data.position >>= 1;9125 if (data.position == 0) {9126 data.position = resetValue;9127 data.val = getNextValue(data.index++);9128 }9129 bits |= (resb>0 ? 1 : 0) * power;9130 power <<= 1;9131 }9132 switch (bits) {9133 case 0:9134 bits = 0;9135 maxpower = Math.pow(2,8);9136 power=1;9137 while (power!=maxpower) {9138 resb = data.val & data.position;9139 data.position >>= 1;9140 if (data.position == 0) {9141 data.position = resetValue;9142 data.val = getNextValue(data.index++);9143 }9144 bits |= (resb>0 ? 1 : 0) * power;9145 power <<= 1;9146 }9147 c = f(bits);9148 break;9149 case 1:9150 bits = 0;9151 maxpower = Math.pow(2,16);9152 power=1;9153 while (power!=maxpower) {9154 resb = data.val & data.position;9155 data.position >>= 1;9156 if (data.position == 0) {9157 data.position = resetValue;9158 data.val = getNextValue(data.index++);9159 }9160 bits |= (resb>0 ? 1 : 0) * power;9161 power <<= 1;9162 }9163 c = f(bits);9164 break;9165 case 2:9166 return "";9167 }9168 dictionary[3] = c;9169 w = c;9170 result.push(c);9171 while (true) {9172 if (data.index > length) {9173 return "";9174 }9175 bits = 0;9176 maxpower = Math.pow(2,numBits);9177 power=1;9178 while (power!=maxpower) {9179 resb = data.val & data.position;9180 data.position >>= 1;9181 if (data.position == 0) {9182 data.position = resetValue;9183 data.val = getNextValue(data.index++);9184 }9185 bits |= (resb>0 ? 1 : 0) * power;9186 power <<= 1;9187 }9188 switch (c = bits) {9189 case 0:9190 bits = 0;9191 maxpower = Math.pow(2,8);9192 power=1;9193 while (power!=maxpower) {9194 resb = data.val & data.position;9195 data.position >>= 1;9196 if (data.position == 0) {9197 data.position = resetValue;9198 data.val = getNextValue(data.index++);9199 }9200 bits |= (resb>0 ? 1 : 0) * power;9201 power <<= 1;9202 }9203 dictionary[dictSize++] = f(bits);9204 c = dictSize-1;9205 enlargeIn--;9206 break;9207 case 1:9208 bits = 0;9209 maxpower = Math.pow(2,16);9210 power=1;9211 while (power!=maxpower) {9212 resb = data.val & data.position;9213 data.position >>= 1;9214 if (data.position == 0) {9215 data.position = resetValue;9216 data.val = getNextValue(data.index++);9217 }9218 bits |= (resb>0 ? 1 : 0) * power;9219 power <<= 1;9220 }9221 dictionary[dictSize++] = f(bits);9222 c = dictSize-1;9223 enlargeIn--;9224 break;9225 case 2:9226 return result.join('');9227 }9228 if (enlargeIn == 0) {9229 enlargeIn = Math.pow(2, numBits);9230 numBits++;9231 }9232 if (dictionary[c]) {9233 entry = dictionary[c];9234 } else {9235 if (c === dictSize) {9236 entry = w + w.charAt(0);9237 } else {9238 return null;9239 }9240 }9241 result.push(entry);9242 // Add w+entry[0] to the dictionary.9243 dictionary[dictSize++] = w + entry.charAt(0);9244 enlargeIn--;9245 w = entry;9246 if (enlargeIn == 0) {9247 enlargeIn = Math.pow(2, numBits);9248 numBits++;9249 }9250 }9251 }9252};9253 return LZString;9254})();9255if( module != null ) {9256 module.exports = LZString;9257}9258}(lzString));9259/**9260 * Source: https://github.com/facebook/jest/blob/e7bb6a1e26ffab90611b2593912df15b69315611/packages/pretty-format/src/plugins/DOMElement.ts9261 */9262/* eslint-disable -- trying to stay as close to the original as possible */9263/* istanbul ignore file */9264function escapeHTML(str) {9265 return str.replace(/</g, '&lt;').replace(/>/g, '&gt;');9266} // Return empty string if keys is empty.9267var printProps = function printProps(keys, props, config, indentation, depth, refs, printer) {9268 var indentationNext = indentation + config.indent;9269 var colors = config.colors;9270 return keys.map(function (key) {9271 var value = props[key];9272 var printed = printer(value, config, indentationNext, depth, refs);9273 if (typeof value !== 'string') {9274 if (printed.indexOf('\n') !== -1) {9275 printed = config.spacingOuter + indentationNext + printed + config.spacingOuter + indentation;9276 }9277 printed = '{' + printed + '}';9278 }9279 return config.spacingInner + indentation + colors.prop.open + key + colors.prop.close + '=' + colors.value.open + printed + colors.value.close;9280 }).join('');9281}; // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#node_type_constants9282var NodeTypeTextNode = 3; // Return empty string if children is empty.9283var printChildren = function printChildren(children, config, indentation, depth, refs, printer) {9284 return children.map(function (child) {9285 var printedChild = typeof child === 'string' ? printText(child, config) : printer(child, config, indentation, depth, refs);9286 if (printedChild === '' && typeof child === 'object' && child !== null && child.nodeType !== NodeTypeTextNode) {9287 // A plugin serialized this Node to '' meaning we should ignore it.9288 return '';9289 }9290 return config.spacingOuter + indentation + printedChild;9291 }).join('');9292};9293var printText = function printText(text, config) {9294 var contentColor = config.colors.content;9295 return contentColor.open + escapeHTML(text) + contentColor.close;9296};9297var printComment = function printComment(comment, config) {9298 var commentColor = config.colors.comment;9299 return commentColor.open + '<!--' + escapeHTML(comment) + '-->' + commentColor.close;9300}; // Separate the functions to format props, children, and element,9301// so a plugin could override a particular function, if needed.9302// Too bad, so sad: the traditional (but unnecessary) space9303// in a self-closing tagColor requires a second test of printedProps.9304var printElement = function printElement(type, printedProps, printedChildren, config, indentation) {9305 var tagColor = config.colors.tag;9306 return tagColor.open + '<' + type + (printedProps && tagColor.close + printedProps + config.spacingOuter + indentation + tagColor.open) + (printedChildren ? '>' + tagColor.close + printedChildren + config.spacingOuter + indentation + tagColor.open + '</' + type : (printedProps && !config.min ? '' : ' ') + '/') + '>' + tagColor.close;9307};9308var printElementAsLeaf = function printElementAsLeaf(type, config) {9309 var tagColor = config.colors.tag;9310 return tagColor.open + '<' + type + tagColor.close + ' …' + tagColor.open + ' />' + tagColor.close;9311};9312var ELEMENT_NODE$1 = 1;9313var TEXT_NODE$1 = 3;9314var COMMENT_NODE$1 = 8;9315var FRAGMENT_NODE = 11;9316var ELEMENT_REGEXP = /^((HTML|SVG)\w*)?Element$/;9317var testNode = function testNode(val) {9318 var constructorName = val.constructor.name;9319 var nodeType = val.nodeType,9320 tagName = val.tagName;9321 var isCustomElement = typeof tagName === 'string' && tagName.includes('-') || typeof val.hasAttribute === 'function' && val.hasAttribute('is');9322 return nodeType === ELEMENT_NODE$1 && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE$1 && constructorName === 'Text' || nodeType === COMMENT_NODE$1 && constructorName === 'Comment' || nodeType === FRAGMENT_NODE && constructorName === 'DocumentFragment';9323};9324function nodeIsText(node) {9325 return node.nodeType === TEXT_NODE$1;9326}9327function nodeIsComment(node) {9328 return node.nodeType === COMMENT_NODE$1;9329}9330function nodeIsFragment(node) {9331 return node.nodeType === FRAGMENT_NODE;9332}9333function createDOMElementFilter(filterNode) {9334 return {9335 test: function test(val) {9336 var _val$constructor2;9337 return (val == null ? void 0 : (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) && testNode(val);9338 },9339 serialize: function serialize(node, config, indentation, depth, refs, printer) {9340 if (nodeIsText(node)) {9341 return printText(node.data, config);9342 }9343 if (nodeIsComment(node)) {9344 return printComment(node.data, config);9345 }9346 var type = nodeIsFragment(node) ? "DocumentFragment" : node.tagName.toLowerCase();9347 if (++depth > config.maxDepth) {9348 return printElementAsLeaf(type, config);9349 }9350 return printElement(type, printProps(nodeIsFragment(node) ? [] : Array.from(node.attributes).map(function (attr) {9351 return attr.name;9352 }).sort(), nodeIsFragment(node) ? {} : Array.from(node.attributes).reduce(function (props, attribute) {9353 props[attribute.name] = attribute.value;9354 return props;9355 }, {}), config, indentation + config.indent, depth, refs, printer), printChildren(Array.prototype.slice.call(node.childNodes || node.children).filter(filterNode), config, indentation + config.indent, depth, refs, printer), config, indentation);9356 }9357 };9358}9359// We try to load node dependencies9360var chalk = null;9361var readFileSync = null;9362var codeFrameColumns = null;9363try {9364 var nodeRequire = module && module.require;9365 readFileSync = nodeRequire.call(module, 'fs').readFileSync;9366 codeFrameColumns = nodeRequire.call(module, '@babel/code-frame').codeFrameColumns;9367 chalk = nodeRequire.call(module, 'chalk');9368} catch (_unused) {// We're in a browser environment9369} // frame has the form "at myMethod (location/to/my/file.js:10:2)"9370function getCodeFrame(frame) {9371 var locationStart = frame.indexOf('(') + 1;9372 var locationEnd = frame.indexOf(')');9373 var frameLocation = frame.slice(locationStart, locationEnd);9374 var frameLocationElements = frameLocation.split(':');9375 var _ref = [frameLocationElements[0], parseInt(frameLocationElements[1], 10), parseInt(frameLocationElements[2], 10)],9376 filename = _ref[0],9377 line = _ref[1],9378 column = _ref[2];9379 var rawFileContents = '';9380 try {9381 rawFileContents = readFileSync(filename, 'utf-8');9382 } catch (_unused2) {9383 return '';9384 }9385 var codeFrame = codeFrameColumns(rawFileContents, {9386 start: {9387 line: line,9388 column: column9389 }9390 }, {9391 highlightCode: true,9392 linesBelow: 09393 });9394 return chalk.dim(frameLocation) + "\n" + codeFrame + "\n";9395}9396function getUserCodeFrame() {9397 // If we couldn't load dependencies, we can't generate the user trace9398 /* istanbul ignore next */9399 if (!readFileSync || !codeFrameColumns) {9400 return '';9401 }9402 var err = new Error();9403 var firstClientCodeFrame = err.stack.split('\n').slice(1) // Remove first line which has the form "Error: TypeError"9404 .find(function (frame) {9405 return !frame.includes('node_modules/');9406 }); // Ignore frames from 3rd party libraries9407 return getCodeFrame(firstClientCodeFrame);9408}9409// Constant node.nodeType for text nodes, see:9410// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#Node_type_constants9411var TEXT_NODE = 3;9412function jestFakeTimersAreEnabled() {9413 /* istanbul ignore else */9414 if (typeof jest !== 'undefined' && jest !== null) {9415 return (// legacy timers9416 setTimeout._isMockFunction === true || // modern timers9417 Object.prototype.hasOwnProperty.call(setTimeout, 'clock')9418 );9419 } // istanbul ignore next9420 return false;9421}9422function getDocument() {9423 /* istanbul ignore if */9424 if (typeof window === 'undefined') {9425 throw new Error('Could not find default container');9426 }9427 return window.document;9428}9429function getWindowFromNode(node) {9430 if (node.defaultView) {9431 // node is document9432 return node.defaultView;9433 } else if (node.ownerDocument && node.ownerDocument.defaultView) {9434 // node is a DOM node9435 return node.ownerDocument.defaultView;9436 } else if (node.window) {9437 // node is window9438 return node.window;9439 } else if (node.ownerDocument && node.ownerDocument.defaultView === null) {9440 throw new Error("It looks like the window object is not available for the provided node.");9441 } else if (node.then instanceof Function) {9442 throw new Error("It looks like you passed a Promise object instead of a DOM node. Did you do something like `fireEvent.click(screen.findBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`, or await the findBy query `fireEvent.click(await screen.findBy...`?");9443 } else if (Array.isArray(node)) {9444 throw new Error("It looks like you passed an Array instead of a DOM node. Did you do something like `fireEvent.click(screen.getAllBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`?");9445 } else if (typeof node.debug === 'function' && typeof node.logTestingPlaygroundURL === 'function') {9446 throw new Error("It looks like you passed a `screen` object. Did you do something like `fireEvent.click(screen, ...` when you meant to use a query, e.g. `fireEvent.click(screen.getBy..., `?");9447 } else {9448 // The user passed something unusual to a calling function9449 throw new Error("The given node is not an Element, the node type is: " + typeof node + ".");9450 }9451}9452function checkContainerType(container) {9453 if (!container || !(typeof container.querySelector === 'function') || !(typeof container.querySelectorAll === 'function')) {9454 throw new TypeError("Expected container to be an Element, a Document or a DocumentFragment but got " + getTypeName(container) + ".");9455 }9456 function getTypeName(object) {9457 if (typeof object === 'object') {9458 return object === null ? 'null' : object.constructor.name;9459 }9460 return typeof object;9461 }9462}9463var DEFAULT_IGNORE_TAGS = 'script, style';9464var _excluded$1 = ["filterNode"];9465var inNode = function inNode() {9466 return typeof process !== 'undefined' && process.versions !== undefined && process.versions.node !== undefined;9467};9468var DOMCollection = plugins_1.DOMCollection; // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#node_type_constants9469var ELEMENT_NODE = 1;9470var COMMENT_NODE = 8; // https://github.com/facebook/jest/blob/615084195ae1ae61ddd56162c62bbdda17587569/packages/pretty-format/src/plugins/DOMElement.ts#L509471function filterCommentsAndDefaultIgnoreTagsTags(value) {9472 return value.nodeType !== COMMENT_NODE && ( // value.nodeType === ELEMENT_NODE => !value.matches(DEFAULT_IGNORE_TAGS)9473 value.nodeType !== ELEMENT_NODE || !value.matches(DEFAULT_IGNORE_TAGS));9474}9475function prettyDOM(dom, maxLength, options) {9476 if (options === void 0) {9477 options = {};9478 }9479 if (!dom) {9480 dom = getDocument().body;9481 }9482 if (typeof maxLength !== 'number') {9483 maxLength = typeof process !== 'undefined' && process.env.DEBUG_PRINT_LIMIT || 7000;9484 }9485 if (maxLength === 0) {9486 return '';9487 }9488 if (dom.documentElement) {9489 dom = dom.documentElement;9490 }9491 var domTypeName = typeof dom;9492 if (domTypeName === 'object') {9493 domTypeName = dom.constructor.name;9494 } else {9495 // To don't fall with `in` operator9496 dom = {};9497 }9498 if (!('outerHTML' in dom)) {9499 throw new TypeError("Expected an element or document but got " + domTypeName);9500 }9501 var _options = options,9502 _options$filterNode = _options.filterNode,9503 filterNode = _options$filterNode === void 0 ? filterCommentsAndDefaultIgnoreTagsTags : _options$filterNode,9504 prettyFormatOptions = _objectWithoutPropertiesLoose(_options, _excluded$1);9505 var debugContent = format_1(dom, _extends({9506 plugins: [createDOMElementFilter(filterNode), DOMCollection],9507 printFunctionName: false,9508 highlight: inNode()9509 }, prettyFormatOptions));9510 return maxLength !== undefined && dom.outerHTML.length > maxLength ? debugContent.slice(0, maxLength) + "..." : debugContent;9511}9512var logDOM = function logDOM() {9513 var userCodeFrame = getUserCodeFrame();9514 if (userCodeFrame) {9515 console.log(prettyDOM.apply(void 0, arguments) + "\n\n" + userCodeFrame);9516 } else {9517 console.log(prettyDOM.apply(void 0, arguments));9518 }9519};9520// It would be cleaner for this to live inside './queries', but9521// other parts of the code assume that all exports from9522// './queries' are query functions.9523var config = {9524 testIdAttribute: 'data-testid',9525 asyncUtilTimeout: 1000,9526 // asyncWrapper and advanceTimersWrapper is to support React's async `act` function.9527 // forcing react-testing-library to wrap all async functions would've been9528 // a total nightmare (consider wrapping every findBy* query and then also9529 // updating `within` so those would be wrapped too. Total nightmare).9530 // so we have this config option that's really only intended for9531 // react-testing-library to use. For that reason, this feature will remain9532 // undocumented.9533 asyncWrapper: function asyncWrapper(cb) {9534 return cb();9535 },9536 unstable_advanceTimersWrapper: function unstable_advanceTimersWrapper(cb) {9537 return cb();9538 },9539 eventWrapper: function eventWrapper(cb) {9540 return cb();9541 },9542 // default value for the `hidden` option in `ByRole` queries9543 defaultHidden: false,9544 // showOriginalStackTrace flag to show the full error stack traces for async errors9545 showOriginalStackTrace: false,9546 // throw errors w/ suggestions for better queries. Opt in so off by default.9547 throwSuggestions: false,9548 // called when getBy* queries fail. (message, container) => Error9549 getElementError: function getElementError(message, container) {9550 var prettifiedDOM = prettyDOM(container);9551 var error = new Error([message, "Ignored nodes: comments, <script />, <style />\n" + prettifiedDOM].filter(Boolean).join('\n\n'));9552 error.name = 'TestingLibraryElementError';9553 return error;9554 },9555 _disableExpensiveErrorDiagnostics: false,9556 computedStyleSupportsPseudoElements: false9557};9558function runWithExpensiveErrorDiagnosticsDisabled(callback) {9559 try {9560 config._disableExpensiveErrorDiagnostics = true;9561 return callback();9562 } finally {9563 config._disableExpensiveErrorDiagnostics = false;9564 }9565}9566function configure(newConfig) {9567 if (typeof newConfig === 'function') {9568 // Pass the existing config out to the provided function9569 // and accept a delta in return9570 newConfig = newConfig(config);9571 } // Merge the incoming config delta9572 config = _extends({}, config, newConfig);9573}9574function getConfig() {9575 return config;9576}9577var labelledNodeNames = ['button', 'meter', 'output', 'progress', 'select', 'textarea', 'input'];9578function getTextContent(node) {9579 if (labelledNodeNames.includes(node.nodeName.toLowerCase())) {9580 return '';9581 }9582 if (node.nodeType === TEXT_NODE) return node.textContent;9583 return Array.from(node.childNodes).map(function (childNode) {9584 return getTextContent(childNode);9585 }).join('');9586}9587function getLabelContent(element) {9588 var textContent;9589 if (element.tagName.toLowerCase() === 'label') {9590 textContent = getTextContent(element);9591 } else {9592 textContent = element.value || element.textContent;9593 }9594 return textContent;9595} // Based on https://github.com/eps1lon/dom-accessibility-api/pull/3529596function getRealLabels(element) {9597 // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- types are not aware of older browsers that don't implement `labels`9598 if (element.labels !== undefined) {9599 var _labels;9600 return (_labels = element.labels) != null ? _labels : [];9601 }9602 if (!isLabelable(element)) return [];9603 var labels = element.ownerDocument.querySelectorAll('label');9604 return Array.from(labels).filter(function (label) {9605 return label.control === element;9606 });9607}9608function isLabelable(element) {9609 return /BUTTON|METER|OUTPUT|PROGRESS|SELECT|TEXTAREA/.test(element.tagName) || element.tagName === 'INPUT' && element.getAttribute('type') !== 'hidden';9610}9611function getLabels(container, element, _temp) {9612 var _ref = _temp === void 0 ? {} : _temp,9613 _ref$selector = _ref.selector,9614 selector = _ref$selector === void 0 ? '*' : _ref$selector;9615 var ariaLabelledBy = element.getAttribute('aria-labelledby');9616 var labelsId = ariaLabelledBy ? ariaLabelledBy.split(' ') : [];9617 return labelsId.length ? labelsId.map(function (labelId) {9618 var labellingElement = container.querySelector("[id=\"" + labelId + "\"]");9619 return labellingElement ? {9620 content: getLabelContent(labellingElement),9621 formControl: null9622 } : {9623 content: '',9624 formControl: null9625 };9626 }) : Array.from(getRealLabels(element)).map(function (label) {9627 var textToMatch = getLabelContent(label);9628 var formControlSelector = 'button, input, meter, output, progress, select, textarea';9629 var labelledFormControl = Array.from(label.querySelectorAll(formControlSelector)).filter(function (formControlElement) {9630 return formControlElement.matches(selector);9631 })[0];9632 return {9633 content: textToMatch,9634 formControl: labelledFormControl9635 };9636 });9637}9638function assertNotNullOrUndefined(matcher) {9639 if (matcher === null || matcher === undefined) {9640 throw new Error( // eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- implicitly converting `T` to `string`9641 "It looks like " + matcher + " was passed instead of a matcher. Did you do something like getByText(" + matcher + ")?");9642 }9643}9644function fuzzyMatches(textToMatch, node, matcher, normalizer) {9645 if (typeof textToMatch !== 'string') {9646 return false;9647 }9648 assertNotNullOrUndefined(matcher);9649 var normalizedText = normalizer(textToMatch);9650 if (typeof matcher === 'string' || typeof matcher === 'number') {9651 return normalizedText.toLowerCase().includes(matcher.toString().toLowerCase());9652 } else if (typeof matcher === 'function') {9653 return matcher(normalizedText, node);9654 } else {9655 return matcher.test(normalizedText);9656 }9657}9658function matches(textToMatch, node, matcher, normalizer) {9659 if (typeof textToMatch !== 'string') {9660 return false;9661 }9662 assertNotNullOrUndefined(matcher);9663 var normalizedText = normalizer(textToMatch);9664 if (matcher instanceof Function) {9665 return matcher(normalizedText, node);9666 } else if (matcher instanceof RegExp) {9667 return matcher.test(normalizedText);9668 } else {9669 return normalizedText === String(matcher);9670 }9671}9672function getDefaultNormalizer(_temp) {9673 var _ref = _temp === void 0 ? {} : _temp,9674 _ref$trim = _ref.trim,9675 trim = _ref$trim === void 0 ? true : _ref$trim,9676 _ref$collapseWhitespa = _ref.collapseWhitespace,9677 collapseWhitespace = _ref$collapseWhitespa === void 0 ? true : _ref$collapseWhitespa;9678 return function (text) {9679 var normalizedText = text;9680 normalizedText = trim ? normalizedText.trim() : normalizedText;9681 normalizedText = collapseWhitespace ? normalizedText.replace(/\s+/g, ' ') : normalizedText;9682 return normalizedText;9683 };9684}9685/**9686 * Constructs a normalizer to pass to functions in matches.js9687 * @param {boolean|undefined} trim The user-specified value for `trim`, without9688 * any defaulting having been applied9689 * @param {boolean|undefined} collapseWhitespace The user-specified value for9690 * `collapseWhitespace`, without any defaulting having been applied9691 * @param {Function|undefined} normalizer The user-specified normalizer9692 * @returns {Function} A normalizer9693 */9694function makeNormalizer(_ref2) {9695 var trim = _ref2.trim,9696 collapseWhitespace = _ref2.collapseWhitespace,9697 normalizer = _ref2.normalizer;9698 if (normalizer) {9699 // User has specified a custom normalizer9700 if (typeof trim !== 'undefined' || typeof collapseWhitespace !== 'undefined') {9701 // They've also specified a value for trim or collapseWhitespace9702 throw new Error('trim and collapseWhitespace are not supported with a normalizer. ' + 'If you want to use the default trim and collapseWhitespace logic in your normalizer, ' + 'use "getDefaultNormalizer({trim, collapseWhitespace})" and compose that into your normalizer');9703 }9704 return normalizer;9705 } else {9706 // No custom normalizer specified. Just use default.9707 return getDefaultNormalizer({9708 trim: trim,9709 collapseWhitespace: collapseWhitespace9710 });9711 }9712}9713function getNodeText(node) {9714 if (node.matches('input[type=submit], input[type=button], input[type=reset]')) {9715 return node.value;9716 }9717 return Array.from(node.childNodes).filter(function (child) {9718 return child.nodeType === TEXT_NODE && Boolean(child.textContent);9719 }).map(function (c) {9720 return c.textContent;9721 }).join('');9722}9723function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }9724function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }9725function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }9726var elementRoleList = buildElementRoleList(elementRoles_1);9727/**9728 * @param {Element} element -9729 * @returns {boolean} - `true` if `element` and its subtree are inaccessible9730 */9731function isSubtreeInaccessible(element) {9732 if (element.hidden === true) {9733 return true;9734 }9735 if (element.getAttribute('aria-hidden') === 'true') {9736 return true;9737 }9738 var window = element.ownerDocument.defaultView;9739 if (window.getComputedStyle(element).display === 'none') {9740 return true;9741 }9742 return false;9743}9744/**9745 * Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion9746 * which should only be used for elements with a non-presentational role i.e.9747 * `role="none"` and `role="presentation"` will not be excluded.9748 *9749 * Implements aria-hidden semantics (i.e. parent overrides child)9750 * Ignores "Child Presentational: True" characteristics9751 *9752 * @param {Element} element -9753 * @param {object} [options] -9754 * @param {function (element: Element): boolean} options.isSubtreeInaccessible -9755 * can be used to return cached results from previous isSubtreeInaccessible calls9756 * @returns {boolean} true if excluded, otherwise false9757 */9758function isInaccessible(element, options) {9759 if (options === void 0) {9760 options = {};9761 }9762 var _options = options,9763 _options$isSubtreeIna = _options.isSubtreeInaccessible,9764 isSubtreeInaccessibleImpl = _options$isSubtreeIna === void 0 ? isSubtreeInaccessible : _options$isSubtreeIna;9765 var window = element.ownerDocument.defaultView; // since visibility is inherited we can exit early9766 if (window.getComputedStyle(element).visibility === 'hidden') {9767 return true;9768 }9769 var currentElement = element;9770 while (currentElement) {9771 if (isSubtreeInaccessibleImpl(currentElement)) {9772 return true;9773 }9774 currentElement = currentElement.parentElement;9775 }9776 return false;9777}9778function getImplicitAriaRoles(currentNode) {9779 // eslint bug here:9780 // eslint-disable-next-line no-unused-vars9781 for (var _iterator = _createForOfIteratorHelperLoose(elementRoleList), _step; !(_step = _iterator()).done;) {9782 var _step$value = _step.value,9783 match = _step$value.match,9784 roles = _step$value.roles;9785 if (match(currentNode)) {9786 return [].concat(roles);9787 }9788 }9789 return [];9790}9791function buildElementRoleList(elementRolesMap) {9792 function makeElementSelector(_ref) {9793 var name = _ref.name,9794 attributes = _ref.attributes;9795 return "" + name + attributes.map(function (_ref2) {9796 var attributeName = _ref2.name,9797 value = _ref2.value,9798 _ref2$constraints = _ref2.constraints,9799 constraints = _ref2$constraints === void 0 ? [] : _ref2$constraints;9800 var shouldNotExist = constraints.indexOf('undefined') !== -1;9801 if (shouldNotExist) {9802 return ":not([" + attributeName + "])";9803 } else if (value) {9804 return "[" + attributeName + "=\"" + value + "\"]";9805 } else {9806 return "[" + attributeName + "]";9807 }9808 }).join('');9809 }9810 function getSelectorSpecificity(_ref3) {9811 var _ref3$attributes = _ref3.attributes,9812 attributes = _ref3$attributes === void 0 ? [] : _ref3$attributes;9813 return attributes.length;9814 }9815 function bySelectorSpecificity(_ref4, _ref5) {9816 var leftSpecificity = _ref4.specificity;9817 var rightSpecificity = _ref5.specificity;9818 return rightSpecificity - leftSpecificity;9819 }9820 function match(element) {9821 return function (node) {9822 var _element$attributes = element.attributes,9823 attributes = _element$attributes === void 0 ? [] : _element$attributes; // https://github.com/testing-library/dom-testing-library/issues/8149824 var typeTextIndex = attributes.findIndex(function (attribute) {9825 return attribute.value && attribute.name === 'type' && attribute.value === 'text';9826 });9827 if (typeTextIndex >= 0) {9828 // not using splice to not mutate the attributes array9829 attributes = [].concat(attributes.slice(0, typeTextIndex), attributes.slice(typeTextIndex + 1));9830 if (node.type !== 'text') {9831 return false;9832 }9833 }9834 return node.matches(makeElementSelector(_extends({}, element, {9835 attributes: attributes9836 })));9837 };9838 }9839 var result = []; // eslint bug here:9840 // eslint-disable-next-line no-unused-vars9841 for (var _iterator2 = _createForOfIteratorHelperLoose(elementRolesMap.entries()), _step2; !(_step2 = _iterator2()).done;) {9842 var _step2$value = _step2.value,9843 element = _step2$value[0],9844 roles = _step2$value[1];9845 result = [].concat(result, [{9846 match: match(element),9847 roles: Array.from(roles),9848 specificity: getSelectorSpecificity(element)9849 }]);9850 }9851 return result.sort(bySelectorSpecificity);9852}9853function getRoles(container, _temp) {9854 var _ref6 = _temp === void 0 ? {} : _temp,9855 _ref6$hidden = _ref6.hidden,9856 hidden = _ref6$hidden === void 0 ? false : _ref6$hidden;9857 function flattenDOM(node) {9858 return [node].concat(Array.from(node.children).reduce(function (acc, child) {9859 return [].concat(acc, flattenDOM(child));9860 }, []));9861 }9862 return flattenDOM(container).filter(function (element) {9863 return hidden === false ? isInaccessible(element) === false : true;9864 }).reduce(function (acc, node) {9865 var roles = []; // TODO: This violates html-aria which does not allow any role on every element9866 if (node.hasAttribute('role')) {9867 roles = node.getAttribute('role').split(' ').slice(0, 1);9868 } else {9869 roles = getImplicitAriaRoles(node);9870 }9871 return roles.reduce(function (rolesAcc, role) {9872 var _extends2, _extends3;9873 return Array.isArray(rolesAcc[role]) ? _extends({}, rolesAcc, (_extends2 = {}, _extends2[role] = [].concat(rolesAcc[role], [node]), _extends2)) : _extends({}, rolesAcc, (_extends3 = {}, _extends3[role] = [node], _extends3));9874 }, acc);9875 }, {});9876}9877function prettyRoles(dom, _ref7) {9878 var hidden = _ref7.hidden;9879 var roles = getRoles(dom, {9880 hidden: hidden9881 }); // We prefer to skip generic role, we don't recommend it9882 return Object.entries(roles).filter(function (_ref8) {9883 var role = _ref8[0];9884 return role !== 'generic';9885 }).map(function (_ref9) {9886 var role = _ref9[0],9887 elements = _ref9[1];9888 var delimiterBar = '-'.repeat(50);9889 var elementsString = elements.map(function (el) {9890 var nameString = "Name \"" + computeAccessibleName(el, {9891 computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements9892 }) + "\":\n";9893 var domString = prettyDOM(el.cloneNode(false));9894 return "" + nameString + domString;9895 }).join('\n\n');9896 return role + ":\n\n" + elementsString + "\n\n" + delimiterBar;9897 }).join('\n');9898}9899/**9900 * @param {Element} element -9901 * @returns {boolean | undefined} - false/true if (not)selected, undefined if not selectable9902 */9903function computeAriaSelected(element) {9904 // implicit value from html-aam mappings: https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings9905 // https://www.w3.org/TR/html-aam-1.0/#details-id-979906 if (element.tagName === 'OPTION') {9907 return element.selected;9908 } // explicit value9909 return checkBooleanAttribute(element, 'aria-selected');9910}9911/**9912 * @param {Element} element -9913 * @returns {boolean | undefined} - false/true if (not)checked, undefined if not checked-able9914 */9915function computeAriaChecked(element) {9916 // implicit value from html-aam mappings: https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings9917 // https://www.w3.org/TR/html-aam-1.0/#details-id-569918 // https://www.w3.org/TR/html-aam-1.0/#details-id-679919 if ('indeterminate' in element && element.indeterminate) {9920 return undefined;9921 }9922 if ('checked' in element) {9923 return element.checked;9924 } // explicit value9925 return checkBooleanAttribute(element, 'aria-checked');9926}9927/**9928 * @param {Element} element -9929 * @returns {boolean | undefined} - false/true if (not)pressed, undefined if not press-able9930 */9931function computeAriaPressed(element) {9932 // https://www.w3.org/TR/wai-aria-1.1/#aria-pressed9933 return checkBooleanAttribute(element, 'aria-pressed');9934}9935/**9936 * @param {Element} element -9937 * @returns {boolean | string | null} -9938 */9939function computeAriaCurrent(element) {9940 var _ref11, _checkBooleanAttribut;9941 // https://www.w3.org/TR/wai-aria-1.1/#aria-current9942 return (_ref11 = (_checkBooleanAttribut = checkBooleanAttribute(element, 'aria-current')) != null ? _checkBooleanAttribut : element.getAttribute('aria-current')) != null ? _ref11 : false;9943}9944/**9945 * @param {Element} element -9946 * @returns {boolean | undefined} - false/true if (not)expanded, undefined if not expand-able9947 */9948function computeAriaExpanded(element) {9949 // https://www.w3.org/TR/wai-aria-1.1/#aria-expanded9950 return checkBooleanAttribute(element, 'aria-expanded');9951}9952function checkBooleanAttribute(element, attribute) {9953 var attributeValue = element.getAttribute(attribute);9954 if (attributeValue === 'true') {9955 return true;9956 }9957 if (attributeValue === 'false') {9958 return false;9959 }9960 return undefined;9961}9962/**9963 * @param {Element} element -9964 * @returns {number | undefined} - number if implicit heading or aria-level present, otherwise undefined9965 */9966function computeHeadingLevel(element) {9967 // https://w3c.github.io/html-aam/#el-h1-h69968 // https://w3c.github.io/html-aam/#el-h1-h69969 var implicitHeadingLevels = {9970 H1: 1,9971 H2: 2,9972 H3: 3,9973 H4: 4,9974 H5: 5,9975 H6: 69976 }; // explicit aria-level value9977 // https://www.w3.org/TR/wai-aria-1.2/#aria-level9978 var ariaLevelAttribute = element.getAttribute('aria-level') && Number(element.getAttribute('aria-level'));9979 return ariaLevelAttribute || implicitHeadingLevels[element.tagName];9980}9981var normalize = getDefaultNormalizer();9982function escapeRegExp(string) {9983 return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string9984}9985function getRegExpMatcher(string) {9986 return new RegExp(escapeRegExp(string.toLowerCase()), 'i');9987}9988function makeSuggestion(queryName, element, content, _ref) {9989 var variant = _ref.variant,9990 name = _ref.name;9991 var warning = '';9992 var queryOptions = {};9993 var queryArgs = [['Role', 'TestId'].includes(queryName) ? content : getRegExpMatcher(content)];9994 if (name) {9995 queryOptions.name = getRegExpMatcher(name);9996 }9997 if (queryName === 'Role' && isInaccessible(element)) {9998 queryOptions.hidden = true;9999 warning = "Element is inaccessible. This means that the element and all its children are invisible to screen readers.\n If you are using the aria-hidden prop, make sure this is the right choice for your case.\n ";10000 }10001 if (Object.keys(queryOptions).length > 0) {10002 queryArgs.push(queryOptions);10003 }10004 var queryMethod = variant + "By" + queryName;10005 return {10006 queryName: queryName,10007 queryMethod: queryMethod,10008 queryArgs: queryArgs,10009 variant: variant,10010 warning: warning,10011 toString: function toString() {10012 if (warning) {10013 console.warn(warning);10014 }10015 var text = queryArgs[0],10016 options = queryArgs[1];10017 text = typeof text === 'string' ? "'" + text + "'" : text;10018 options = options ? ", { " + Object.entries(options).map(function (_ref2) {10019 var k = _ref2[0],10020 v = _ref2[1];10021 return k + ": " + v;10022 }).join(', ') + " }" : '';10023 return queryMethod + "(" + text + options + ")";10024 }10025 };10026}10027function canSuggest(currentMethod, requestedMethod, data) {10028 return data && (!requestedMethod || requestedMethod.toLowerCase() === currentMethod.toLowerCase());10029}10030function getSuggestedQuery(element, variant, method) {10031 var _element$getAttribute, _getImplicitAriaRoles;10032 if (variant === void 0) {10033 variant = 'get';10034 }10035 // don't create suggestions for script and style elements10036 if (element.matches(DEFAULT_IGNORE_TAGS)) {10037 return undefined;10038 } //We prefer to suggest something else if the role is generic10039 var role = (_element$getAttribute = element.getAttribute('role')) != null ? _element$getAttribute : (_getImplicitAriaRoles = getImplicitAriaRoles(element)) == null ? void 0 : _getImplicitAriaRoles[0];10040 if (role !== 'generic' && canSuggest('Role', method, role)) {10041 return makeSuggestion('Role', element, role, {10042 variant: variant,10043 name: computeAccessibleName(element, {10044 computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements10045 })10046 });10047 }10048 var labelText = getLabels(document, element).map(function (label) {10049 return label.content;10050 }).join(' ');10051 if (canSuggest('LabelText', method, labelText)) {10052 return makeSuggestion('LabelText', element, labelText, {10053 variant: variant10054 });10055 }10056 var placeholderText = element.getAttribute('placeholder');10057 if (canSuggest('PlaceholderText', method, placeholderText)) {10058 return makeSuggestion('PlaceholderText', element, placeholderText, {10059 variant: variant10060 });10061 }10062 var textContent = normalize(getNodeText(element));10063 if (canSuggest('Text', method, textContent)) {10064 return makeSuggestion('Text', element, textContent, {10065 variant: variant10066 });10067 }10068 if (canSuggest('DisplayValue', method, element.value)) {10069 return makeSuggestion('DisplayValue', element, normalize(element.value), {10070 variant: variant10071 });10072 }10073 var alt = element.getAttribute('alt');10074 if (canSuggest('AltText', method, alt)) {10075 return makeSuggestion('AltText', element, alt, {10076 variant: variant10077 });10078 }10079 var title = element.getAttribute('title');10080 if (canSuggest('Title', method, title)) {10081 return makeSuggestion('Title', element, title, {10082 variant: variant10083 });10084 }10085 var testId = element.getAttribute(getConfig().testIdAttribute);10086 if (canSuggest('TestId', method, testId)) {10087 return makeSuggestion('TestId', element, testId, {10088 variant: variant10089 });10090 }10091 return undefined;10092}10093// closer to their code (because async stack traces are hard to follow).10094function copyStackTrace(target, source) {10095 target.stack = source.stack.replace(source.message, target.message);10096}10097function waitFor(callback, _ref) {10098 var _ref$container = _ref.container,10099 container = _ref$container === void 0 ? getDocument() : _ref$container,10100 _ref$timeout = _ref.timeout,10101 timeout = _ref$timeout === void 0 ? getConfig().asyncUtilTimeout : _ref$timeout,10102 _ref$showOriginalStac = _ref.showOriginalStackTrace,10103 showOriginalStackTrace = _ref$showOriginalStac === void 0 ? getConfig().showOriginalStackTrace : _ref$showOriginalStac,10104 stackTraceError = _ref.stackTraceError,10105 _ref$interval = _ref.interval,10106 interval = _ref$interval === void 0 ? 50 : _ref$interval,10107 _ref$onTimeout = _ref.onTimeout,10108 onTimeout = _ref$onTimeout === void 0 ? function (error) {10109 error.message = getConfig().getElementError(error.message, container).message;10110 return error;10111 } : _ref$onTimeout,10112 _ref$mutationObserver = _ref.mutationObserverOptions,10113 mutationObserverOptions = _ref$mutationObserver === void 0 ? {10114 subtree: true,10115 childList: true,10116 attributes: true,10117 characterData: true10118 } : _ref$mutationObserver;10119 if (typeof callback !== 'function') {10120 throw new TypeError('Received `callback` arg must be a function');10121 }10122 return new Promise( /*#__PURE__*/function () {10123 var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(resolve, reject) {10124 var lastError, intervalId, observer, finished, promiseStatus, overallTimeoutTimer, usingJestFakeTimers, _getConfig, advanceTimersWrapper, error, _getWindowFromNode, MutationObserver, onDone, checkRealTimersCallback, checkCallback, handleTimeout;10125 return regenerator.wrap(function _callee2$(_context2) {10126 while (1) {10127 switch (_context2.prev = _context2.next) {10128 case 0:10129 handleTimeout = function _handleTimeout() {10130 var error;10131 if (lastError) {10132 error = lastError;10133 if (!showOriginalStackTrace && error.name === 'TestingLibraryElementError') {10134 copyStackTrace(error, stackTraceError);10135 }10136 } else {10137 error = new Error('Timed out in waitFor.');10138 if (!showOriginalStackTrace) {10139 copyStackTrace(error, stackTraceError);10140 }10141 }10142 onDone(onTimeout(error), null);10143 };10144 checkCallback = function _checkCallback() {10145 if (promiseStatus === 'pending') return;10146 try {10147 var result = runWithExpensiveErrorDiagnosticsDisabled(callback);10148 if (typeof (result == null ? void 0 : result.then) === 'function') {10149 promiseStatus = 'pending';10150 result.then(function (resolvedValue) {10151 promiseStatus = 'resolved';10152 onDone(null, resolvedValue);10153 }, function (rejectedValue) {10154 promiseStatus = 'rejected';10155 lastError = rejectedValue;10156 });10157 } else {10158 onDone(null, result);10159 } // If `callback` throws, wait for the next mutation, interval, or timeout.10160 } catch (error) {10161 // Save the most recent callback error to reject the promise with it in the event of a timeout10162 lastError = error;10163 }10164 };10165 checkRealTimersCallback = function _checkRealTimersCallb() {10166 if (jestFakeTimersAreEnabled()) {10167 var _error = new Error("Changed from using real timers to fake timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to fake timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");10168 if (!showOriginalStackTrace) copyStackTrace(_error, stackTraceError);10169 return reject(_error);10170 } else {10171 return checkCallback();10172 }10173 };10174 onDone = function _onDone(error, result) {10175 finished = true;10176 clearTimeout(overallTimeoutTimer);10177 if (!usingJestFakeTimers) {10178 clearInterval(intervalId);10179 observer.disconnect();10180 }10181 if (error) {10182 reject(error);10183 } else {10184 resolve(result);10185 }10186 };10187 finished = false;10188 promiseStatus = 'idle';10189 overallTimeoutTimer = setTimeout(handleTimeout, timeout);10190 usingJestFakeTimers = jestFakeTimersAreEnabled();10191 if (!usingJestFakeTimers) {10192 _context2.next = 27;10193 break;10194 }10195 _getConfig = getConfig(), advanceTimersWrapper = _getConfig.unstable_advanceTimersWrapper;10196 checkCallback(); // this is a dangerous rule to disable because it could lead to an10197 // infinite loop. However, eslint isn't smart enough to know that we're10198 // setting finished inside `onDone` which will be called when we're done10199 // waiting or when we've timed out.10200 // eslint-disable-next-line no-unmodified-loop-condition10201 case 11:10202 if (finished) {10203 _context2.next = 25;10204 break;10205 }10206 if (jestFakeTimersAreEnabled()) {10207 _context2.next = 17;10208 break;10209 }10210 error = new Error("Changed from using fake timers to real timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to real timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");10211 if (!showOriginalStackTrace) copyStackTrace(error, stackTraceError);10212 reject(error);10213 return _context2.abrupt("return");10214 case 17:10215 // we *could* (maybe should?) use `advanceTimersToNextTimer` but it's10216 // possible that could make this loop go on forever if someone is using10217 // third party code that's setting up recursive timers so rapidly that10218 // the user's timer's don't get a chance to resolve. So we'll advance10219 // by an interval instead. (We have a test for this case).10220 advanceTimersWrapper(function () {10221 jest.advanceTimersByTime(interval);10222 }); // It's really important that checkCallback is run *before* we flush10223 // in-flight promises. To be honest, I'm not sure why, and I can't quite10224 // think of a way to reproduce the problem in a test, but I spent10225 // an entire day banging my head against a wall on this.10226 checkCallback();10227 if (!finished) {10228 _context2.next = 21;10229 break;10230 }10231 return _context2.abrupt("break", 25);10232 case 21:10233 _context2.next = 23;10234 return advanceTimersWrapper( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {10235 return regenerator.wrap(function _callee$(_context) {10236 while (1) {10237 switch (_context.prev = _context.next) {10238 case 0:10239 _context.next = 2;10240 return new Promise(function (r) {10241 setTimeout(r, 0);10242 jest.advanceTimersByTime(0);10243 });10244 case 2:10245 case "end":10246 return _context.stop();10247 }10248 }10249 }, _callee);10250 })));10251 case 23:10252 _context2.next = 11;10253 break;10254 case 25:10255 _context2.next = 40;10256 break;10257 case 27:10258 _context2.prev = 27;10259 checkContainerType(container);10260 _context2.next = 35;10261 break;10262 case 31:10263 _context2.prev = 31;10264 _context2.t0 = _context2["catch"](27);10265 reject(_context2.t0);10266 return _context2.abrupt("return");10267 case 35:10268 intervalId = setInterval(checkRealTimersCallback, interval);10269 _getWindowFromNode = getWindowFromNode(container), MutationObserver = _getWindowFromNode.MutationObserver;10270 observer = new MutationObserver(checkRealTimersCallback);10271 observer.observe(container, mutationObserverOptions);10272 checkCallback();10273 case 40:10274 case "end":10275 return _context2.stop();10276 }10277 }10278 }, _callee2, null, [[27, 31]]);10279 }));10280 return function (_x, _x2) {10281 return _ref2.apply(this, arguments);10282 };10283 }());10284}10285function waitForWrapper(callback, options) {10286 // create the error here so its stack trace is as close to the10287 // calling code as possible10288 var stackTraceError = new Error('STACK_TRACE_MESSAGE');10289 return getConfig().asyncWrapper(function () {10290 return waitFor(callback, _extends({10291 stackTraceError: stackTraceError10292 }, options));10293 });10294}10295/*10296eslint10297 max-lines-per-function: ["error", {"max": 200}],10298*/10299function getElementError(message, container) {10300 return getConfig().getElementError(message, container);10301}10302function getMultipleElementsFoundError(message, container) {10303 return getElementError(message + "\n\n(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).", container);10304}10305function queryAllByAttribute(attribute, container, text, _temp) {10306 var _ref = _temp === void 0 ? {} : _temp,10307 _ref$exact = _ref.exact,10308 exact = _ref$exact === void 0 ? true : _ref$exact,10309 collapseWhitespace = _ref.collapseWhitespace,10310 trim = _ref.trim,10311 normalizer = _ref.normalizer;10312 var matcher = exact ? matches : fuzzyMatches;10313 var matchNormalizer = makeNormalizer({10314 collapseWhitespace: collapseWhitespace,10315 trim: trim,10316 normalizer: normalizer10317 });10318 return Array.from(container.querySelectorAll("[" + attribute + "]")).filter(function (node) {10319 return matcher(node.getAttribute(attribute), node, text, matchNormalizer);10320 });10321}10322// if more than one elements is returned, otherwise it returns the first10323// element or null10324function makeSingleQuery(allQuery, getMultipleError) {10325 return function (container) {10326 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {10327 args[_key - 1] = arguments[_key];10328 }10329 var els = allQuery.apply(void 0, [container].concat(args));10330 if (els.length > 1) {10331 var elementStrings = els.map(function (element) {10332 return getElementError(null, element).message;10333 }).join('\n\n');10334 throw getMultipleElementsFoundError(getMultipleError.apply(void 0, [container].concat(args)) + "\n\nHere are the matching elements:\n\n" + elementStrings, container);10335 }10336 return els[0] || null;10337 };10338}10339function getSuggestionError(suggestion, container) {10340 return getConfig().getElementError("A better query is available, try this:\n" + suggestion.toString() + "\n", container);10341} // this accepts a query function and returns a function which throws an error10342// if an empty list of elements is returned10343function makeGetAllQuery(allQuery, getMissingError) {10344 return function (container) {10345 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {10346 args[_key2 - 1] = arguments[_key2];10347 }10348 var els = allQuery.apply(void 0, [container].concat(args));10349 if (!els.length) {10350 throw getConfig().getElementError(getMissingError.apply(void 0, [container].concat(args)), container);10351 }10352 return els;10353 };10354} // this accepts a getter query function and returns a function which calls10355// waitFor and passing a function which invokes the getter.10356function makeFindQuery(getter) {10357 return function (container, text, options, waitForOptions) {10358 return waitForWrapper(function () {10359 return getter(container, text, options);10360 }, _extends({10361 container: container10362 }, waitForOptions));10363 };10364}10365var wrapSingleQueryWithSuggestion = function wrapSingleQueryWithSuggestion(query, queryAllByName, variant) {10366 return function (container) {10367 for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {10368 args[_key3 - 1] = arguments[_key3];10369 }10370 var element = query.apply(void 0, [container].concat(args));10371 var _ref2 = args.slice(-1),10372 _ref2$ = _ref2[0];10373 _ref2$ = _ref2$ === void 0 ? {} : _ref2$;10374 var _ref2$$suggest = _ref2$.suggest,10375 suggest = _ref2$$suggest === void 0 ? getConfig().throwSuggestions : _ref2$$suggest;10376 if (element && suggest) {10377 var suggestion = getSuggestedQuery(element, variant);10378 if (suggestion && !queryAllByName.endsWith(suggestion.queryName)) {10379 throw getSuggestionError(suggestion.toString(), container);10380 }10381 }10382 return element;10383 };10384};10385var wrapAllByQueryWithSuggestion = function wrapAllByQueryWithSuggestion(query, queryAllByName, variant) {10386 return function (container) {10387 for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {10388 args[_key4 - 1] = arguments[_key4];10389 }10390 var els = query.apply(void 0, [container].concat(args));10391 var _ref3 = args.slice(-1),10392 _ref3$ = _ref3[0];10393 _ref3$ = _ref3$ === void 0 ? {} : _ref3$;10394 var _ref3$$suggest = _ref3$.suggest,10395 suggest = _ref3$$suggest === void 0 ? getConfig().throwSuggestions : _ref3$$suggest;10396 if (els.length && suggest) {10397 // get a unique list of all suggestion messages. We are only going to make a suggestion if10398 // all the suggestions are the same10399 var uniqueSuggestionMessages = [].concat(new Set(els.map(function (element) {10400 var _getSuggestedQuery;10401 return (_getSuggestedQuery = getSuggestedQuery(element, variant)) == null ? void 0 : _getSuggestedQuery.toString();10402 })));10403 if ( // only want to suggest if all the els have the same suggestion.10404 uniqueSuggestionMessages.length === 1 && !queryAllByName.endsWith( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO: Can this be null at runtime?10405 getSuggestedQuery(els[0], variant).queryName)) {10406 throw getSuggestionError(uniqueSuggestionMessages[0], container);10407 }10408 }10409 return els;10410 };10411}; // TODO: This deviates from the published declarations10412// However, the implementation always required a dyadic (after `container`) not variadic `queryAllBy` considering the implementation of `makeFindQuery`10413// This is at least statically true and can be verified by accepting `QueryMethod<Arguments, HTMLElement[]>`10414function buildQueries(queryAllBy, getMultipleError, getMissingError) {10415 var queryBy = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllBy, getMultipleError), queryAllBy.name, 'query');10416 var getAllBy = makeGetAllQuery(queryAllBy, getMissingError);10417 var getBy = makeSingleQuery(getAllBy, getMultipleError);10418 var getByWithSuggestions = wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, 'get');10419 var getAllWithSuggestions = wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name.replace('query', 'get'), 'getAll');10420 var findAllBy = makeFindQuery(wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name, 'findAll'));10421 var findBy = makeFindQuery(wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, 'find'));10422 return [queryBy, getAllWithSuggestions, getByWithSuggestions, findAllBy, findBy];10423}10424function queryAllLabels(container) {10425 return Array.from(container.querySelectorAll('label,input')).map(function (node) {10426 return {10427 node: node,10428 textToMatch: getLabelContent(node)10429 };10430 }).filter(function (_ref) {10431 var textToMatch = _ref.textToMatch;10432 return textToMatch !== null;10433 });10434}10435var queryAllLabelsByText = function queryAllLabelsByText(container, text, _temp) {10436 var _ref2 = _temp === void 0 ? {} : _temp,10437 _ref2$exact = _ref2.exact,10438 exact = _ref2$exact === void 0 ? true : _ref2$exact,10439 trim = _ref2.trim,10440 collapseWhitespace = _ref2.collapseWhitespace,10441 normalizer = _ref2.normalizer;10442 var matcher = exact ? matches : fuzzyMatches;10443 var matchNormalizer = makeNormalizer({10444 collapseWhitespace: collapseWhitespace,10445 trim: trim,10446 normalizer: normalizer10447 });10448 var textToMatchByLabels = queryAllLabels(container);10449 return textToMatchByLabels.filter(function (_ref3) {10450 var node = _ref3.node,10451 textToMatch = _ref3.textToMatch;10452 return matcher(textToMatch, node, text, matchNormalizer);10453 }).map(function (_ref4) {10454 var node = _ref4.node;10455 return node;10456 });10457};10458var queryAllByLabelText = function queryAllByLabelText(container, text, _temp2) {10459 var _ref5 = _temp2 === void 0 ? {} : _temp2,10460 _ref5$selector = _ref5.selector,10461 selector = _ref5$selector === void 0 ? '*' : _ref5$selector,10462 _ref5$exact = _ref5.exact,10463 exact = _ref5$exact === void 0 ? true : _ref5$exact,10464 collapseWhitespace = _ref5.collapseWhitespace,10465 trim = _ref5.trim,10466 normalizer = _ref5.normalizer;10467 checkContainerType(container);10468 var matcher = exact ? matches : fuzzyMatches;10469 var matchNormalizer = makeNormalizer({10470 collapseWhitespace: collapseWhitespace,10471 trim: trim,10472 normalizer: normalizer10473 });10474 var matchingLabelledElements = Array.from(container.querySelectorAll('*')).filter(function (element) {10475 return getRealLabels(element).length || element.hasAttribute('aria-labelledby');10476 }).reduce(function (labelledElements, labelledElement) {10477 var labelList = getLabels(container, labelledElement, {10478 selector: selector10479 });10480 labelList.filter(function (label) {10481 return Boolean(label.formControl);10482 }).forEach(function (label) {10483 if (matcher(label.content, label.formControl, text, matchNormalizer) && label.formControl) labelledElements.push(label.formControl);10484 });10485 var labelsValue = labelList.filter(function (label) {10486 return Boolean(label.content);10487 }).map(function (label) {10488 return label.content;10489 });10490 if (matcher(labelsValue.join(' '), labelledElement, text, matchNormalizer)) labelledElements.push(labelledElement);10491 if (labelsValue.length > 1) {10492 labelsValue.forEach(function (labelValue, index) {10493 if (matcher(labelValue, labelledElement, text, matchNormalizer)) labelledElements.push(labelledElement);10494 var labelsFiltered = [].concat(labelsValue);10495 labelsFiltered.splice(index, 1);10496 if (labelsFiltered.length > 1) {10497 if (matcher(labelsFiltered.join(' '), labelledElement, text, matchNormalizer)) labelledElements.push(labelledElement);10498 }10499 });10500 }10501 return labelledElements;10502 }, []).concat(queryAllByAttribute('aria-label', container, text, {10503 exact: exact,10504 normalizer: matchNormalizer10505 }));10506 return Array.from(new Set(matchingLabelledElements)).filter(function (element) {10507 return element.matches(selector);10508 });10509}; // the getAll* query would normally look like this:10510// const getAllByLabelText = makeGetAllQuery(10511// queryAllByLabelText,10512// (c, text) => `Unable to find a label with the text of: ${text}`,10513// )10514// however, we can give a more helpful error message than the generic one,10515// so we're writing this one out by hand.10516var getAllByLabelText = function getAllByLabelText(container, text) {10517 for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {10518 rest[_key - 2] = arguments[_key];10519 }10520 var els = queryAllByLabelText.apply(void 0, [container, text].concat(rest));10521 if (!els.length) {10522 var labels = queryAllLabelsByText.apply(void 0, [container, text].concat(rest));10523 if (labels.length) {10524 var tagNames = labels.map(function (label) {10525 return getTagNameOfElementAssociatedWithLabelViaFor(container, label);10526 }).filter(function (tagName) {10527 return !!tagName;10528 });10529 if (tagNames.length) {10530 throw getConfig().getElementError(tagNames.map(function (tagName) {10531 return "Found a label with the text of: " + text + ", however the element associated with this label (<" + tagName + " />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <" + tagName + " />, you can use aria-label or aria-labelledby instead.";10532 }).join('\n\n'), container);10533 } else {10534 throw getConfig().getElementError("Found a label with the text of: " + text + ", however no form control was found associated to that label. Make sure you're using the \"for\" attribute or \"aria-labelledby\" attribute correctly.", container);10535 }10536 } else {10537 throw getConfig().getElementError("Unable to find a label with the text of: " + text, container);10538 }10539 }10540 return els;10541};10542function getTagNameOfElementAssociatedWithLabelViaFor(container, label) {10543 var htmlFor = label.getAttribute('for');10544 if (!htmlFor) {10545 return null;10546 }10547 var element = container.querySelector("[id=\"" + htmlFor + "\"]");10548 return element ? element.tagName.toLowerCase() : null;10549} // the reason mentioned above is the same reason we're not using buildQueries10550var getMultipleError$7 = function getMultipleError(c, text) {10551 return "Found multiple elements with the text of: " + text;10552};10553var queryByLabelText = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllByLabelText, getMultipleError$7), queryAllByLabelText.name, 'query');10554var getByLabelText = makeSingleQuery(getAllByLabelText, getMultipleError$7);10555var findAllByLabelText = makeFindQuery(wrapAllByQueryWithSuggestion(getAllByLabelText, getAllByLabelText.name, 'findAll'));10556var findByLabelText = makeFindQuery(wrapSingleQueryWithSuggestion(getByLabelText, getAllByLabelText.name, 'find'));10557var getAllByLabelTextWithSuggestions = wrapAllByQueryWithSuggestion(getAllByLabelText, getAllByLabelText.name, 'getAll');10558var getByLabelTextWithSuggestions = wrapSingleQueryWithSuggestion(getByLabelText, getAllByLabelText.name, 'get');10559var queryAllByLabelTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByLabelText, queryAllByLabelText.name, 'queryAll');10560var queryAllByPlaceholderText = function queryAllByPlaceholderText() {10561 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {10562 args[_key] = arguments[_key];10563 }10564 checkContainerType(args[0]);10565 return queryAllByAttribute.apply(void 0, ['placeholder'].concat(args));10566};10567var getMultipleError$6 = function getMultipleError(c, text) {10568 return "Found multiple elements with the placeholder text of: " + text;10569};10570var getMissingError$6 = function getMissingError(c, text) {10571 return "Unable to find an element with the placeholder text of: " + text;10572};10573var queryAllByPlaceholderTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByPlaceholderText, queryAllByPlaceholderText.name, 'queryAll');10574var _buildQueries$6 = buildQueries(queryAllByPlaceholderText, getMultipleError$6, getMissingError$6),10575 queryByPlaceholderText = _buildQueries$6[0],10576 getAllByPlaceholderText = _buildQueries$6[1],10577 getByPlaceholderText = _buildQueries$6[2],10578 findAllByPlaceholderText = _buildQueries$6[3],10579 findByPlaceholderText = _buildQueries$6[4];10580var queryAllByText = function queryAllByText(container, text, _temp) {10581 var _ref = _temp === void 0 ? {} : _temp,10582 _ref$selector = _ref.selector,10583 selector = _ref$selector === void 0 ? '*' : _ref$selector,10584 _ref$exact = _ref.exact,10585 exact = _ref$exact === void 0 ? true : _ref$exact,10586 collapseWhitespace = _ref.collapseWhitespace,10587 trim = _ref.trim,10588 _ref$ignore = _ref.ignore,10589 ignore = _ref$ignore === void 0 ? DEFAULT_IGNORE_TAGS : _ref$ignore,10590 normalizer = _ref.normalizer;10591 checkContainerType(container);10592 var matcher = exact ? matches : fuzzyMatches;10593 var matchNormalizer = makeNormalizer({10594 collapseWhitespace: collapseWhitespace,10595 trim: trim,10596 normalizer: normalizer10597 });10598 var baseArray = [];10599 if (typeof container.matches === 'function' && container.matches(selector)) {10600 baseArray = [container];10601 }10602 return [].concat(baseArray, Array.from(container.querySelectorAll(selector))) // TODO: `matches` according lib.dom.d.ts can get only `string` but according our code it can handle also boolean :)10603 .filter(function (node) {10604 return !ignore || !node.matches(ignore);10605 }).filter(function (node) {10606 return matcher(getNodeText(node), node, text, matchNormalizer);10607 });10608};10609var getMultipleError$5 = function getMultipleError(c, text) {10610 return "Found multiple elements with the text: " + text;10611};10612var getMissingError$5 = function getMissingError(c, text) {10613 return "Unable to find an element with the text: " + text + ". This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.";10614};10615var queryAllByTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByText, queryAllByText.name, 'queryAll');10616var _buildQueries$5 = buildQueries(queryAllByText, getMultipleError$5, getMissingError$5),10617 queryByText = _buildQueries$5[0],10618 getAllByText = _buildQueries$5[1],10619 getByText = _buildQueries$5[2],10620 findAllByText = _buildQueries$5[3],10621 findByText = _buildQueries$5[4];10622var queryAllByDisplayValue = function queryAllByDisplayValue(container, value, _temp) {10623 var _ref = _temp === void 0 ? {} : _temp,10624 _ref$exact = _ref.exact,10625 exact = _ref$exact === void 0 ? true : _ref$exact,10626 collapseWhitespace = _ref.collapseWhitespace,10627 trim = _ref.trim,10628 normalizer = _ref.normalizer;10629 checkContainerType(container);10630 var matcher = exact ? matches : fuzzyMatches;10631 var matchNormalizer = makeNormalizer({10632 collapseWhitespace: collapseWhitespace,10633 trim: trim,10634 normalizer: normalizer10635 });10636 return Array.from(container.querySelectorAll("input,textarea,select")).filter(function (node) {10637 if (node.tagName === 'SELECT') {10638 var selectedOptions = Array.from(node.options).filter(function (option) {10639 return option.selected;10640 });10641 return selectedOptions.some(function (optionNode) {10642 return matcher(getNodeText(optionNode), optionNode, value, matchNormalizer);10643 });10644 } else {10645 return matcher(node.value, node, value, matchNormalizer);10646 }10647 });10648};10649var getMultipleError$4 = function getMultipleError(c, value) {10650 return "Found multiple elements with the display value: " + value + ".";10651};10652var getMissingError$4 = function getMissingError(c, value) {10653 return "Unable to find an element with the display value: " + value + ".";10654};10655var queryAllByDisplayValueWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByDisplayValue, queryAllByDisplayValue.name, 'queryAll');10656var _buildQueries$4 = buildQueries(queryAllByDisplayValue, getMultipleError$4, getMissingError$4),10657 queryByDisplayValue = _buildQueries$4[0],10658 getAllByDisplayValue = _buildQueries$4[1],10659 getByDisplayValue = _buildQueries$4[2],10660 findAllByDisplayValue = _buildQueries$4[3],10661 findByDisplayValue = _buildQueries$4[4];10662var VALID_TAG_REGEXP = /^(img|input|area|.+-.+)$/i;10663var queryAllByAltText = function queryAllByAltText(container, alt, options) {10664 if (options === void 0) {10665 options = {};10666 }10667 checkContainerType(container);10668 return queryAllByAttribute('alt', container, alt, options).filter(function (node) {10669 return VALID_TAG_REGEXP.test(node.tagName);10670 });10671};10672var getMultipleError$3 = function getMultipleError(c, alt) {10673 return "Found multiple elements with the alt text: " + alt;10674};10675var getMissingError$3 = function getMissingError(c, alt) {10676 return "Unable to find an element with the alt text: " + alt;10677};10678var queryAllByAltTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByAltText, queryAllByAltText.name, 'queryAll');10679var _buildQueries$3 = buildQueries(queryAllByAltText, getMultipleError$3, getMissingError$3),10680 queryByAltText = _buildQueries$3[0],10681 getAllByAltText = _buildQueries$3[1],10682 getByAltText = _buildQueries$3[2],10683 findAllByAltText = _buildQueries$3[3],10684 findByAltText = _buildQueries$3[4];10685var isSvgTitle = function isSvgTitle(node) {10686 var _node$parentElement;10687 return node.tagName.toLowerCase() === 'title' && ((_node$parentElement = node.parentElement) == null ? void 0 : _node$parentElement.tagName.toLowerCase()) === 'svg';10688};10689var queryAllByTitle = function queryAllByTitle(container, text, _temp) {10690 var _ref = _temp === void 0 ? {} : _temp,10691 _ref$exact = _ref.exact,10692 exact = _ref$exact === void 0 ? true : _ref$exact,10693 collapseWhitespace = _ref.collapseWhitespace,10694 trim = _ref.trim,10695 normalizer = _ref.normalizer;10696 checkContainerType(container);10697 var matcher = exact ? matches : fuzzyMatches;10698 var matchNormalizer = makeNormalizer({10699 collapseWhitespace: collapseWhitespace,10700 trim: trim,10701 normalizer: normalizer10702 });10703 return Array.from(container.querySelectorAll('[title], svg > title')).filter(function (node) {10704 return matcher(node.getAttribute('title'), node, text, matchNormalizer) || isSvgTitle(node) && matcher(getNodeText(node), node, text, matchNormalizer);10705 });10706};10707var getMultipleError$2 = function getMultipleError(c, title) {10708 return "Found multiple elements with the title: " + title + ".";10709};10710var getMissingError$2 = function getMissingError(c, title) {10711 return "Unable to find an element with the title: " + title + ".";10712};10713var queryAllByTitleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByTitle, queryAllByTitle.name, 'queryAll');10714var _buildQueries$2 = buildQueries(queryAllByTitle, getMultipleError$2, getMissingError$2),10715 queryByTitle = _buildQueries$2[0],10716 getAllByTitle = _buildQueries$2[1],10717 getByTitle = _buildQueries$2[2],10718 findAllByTitle = _buildQueries$2[3],10719 findByTitle = _buildQueries$2[4];10720function queryAllByRole(container, role, _temp) {10721 var _ref = _temp === void 0 ? {} : _temp,10722 _ref$exact = _ref.exact,10723 exact = _ref$exact === void 0 ? true : _ref$exact,10724 collapseWhitespace = _ref.collapseWhitespace,10725 _ref$hidden = _ref.hidden,10726 hidden = _ref$hidden === void 0 ? getConfig().defaultHidden : _ref$hidden,10727 name = _ref.name,10728 trim = _ref.trim,10729 normalizer = _ref.normalizer,10730 _ref$queryFallbacks = _ref.queryFallbacks,10731 queryFallbacks = _ref$queryFallbacks === void 0 ? false : _ref$queryFallbacks,10732 selected = _ref.selected,10733 checked = _ref.checked,10734 pressed = _ref.pressed,10735 current = _ref.current,10736 level = _ref.level,10737 expanded = _ref.expanded;10738 checkContainerType(container);10739 var matcher = exact ? matches : fuzzyMatches;10740 var matchNormalizer = makeNormalizer({10741 collapseWhitespace: collapseWhitespace,10742 trim: trim,10743 normalizer: normalizer10744 });10745 if (selected !== undefined) {10746 var _allRoles$get;10747 // guard against unknown roles10748 if (((_allRoles$get = roles_1.get(role)) == null ? void 0 : _allRoles$get.props['aria-selected']) === undefined) {10749 throw new Error("\"aria-selected\" is not supported on role \"" + role + "\".");10750 }10751 }10752 if (checked !== undefined) {10753 var _allRoles$get2;10754 // guard against unknown roles10755 if (((_allRoles$get2 = roles_1.get(role)) == null ? void 0 : _allRoles$get2.props['aria-checked']) === undefined) {10756 throw new Error("\"aria-checked\" is not supported on role \"" + role + "\".");10757 }10758 }10759 if (pressed !== undefined) {10760 var _allRoles$get3;10761 // guard against unknown roles10762 if (((_allRoles$get3 = roles_1.get(role)) == null ? void 0 : _allRoles$get3.props['aria-pressed']) === undefined) {10763 throw new Error("\"aria-pressed\" is not supported on role \"" + role + "\".");10764 }10765 }10766 if (current !== undefined) {10767 var _allRoles$get4;10768 /* istanbul ignore next */10769 // guard against unknown roles10770 // All currently released ARIA versions support `aria-current` on all roles.10771 // Leaving this for symetry and forward compatibility10772 if (((_allRoles$get4 = roles_1.get(role)) == null ? void 0 : _allRoles$get4.props['aria-current']) === undefined) {10773 throw new Error("\"aria-current\" is not supported on role \"" + role + "\".");10774 }10775 }10776 if (level !== undefined) {10777 // guard against using `level` option with any role other than `heading`10778 if (role !== 'heading') {10779 throw new Error("Role \"" + role + "\" cannot have \"level\" property.");10780 }10781 }10782 if (expanded !== undefined) {10783 var _allRoles$get5;10784 // guard against unknown roles10785 if (((_allRoles$get5 = roles_1.get(role)) == null ? void 0 : _allRoles$get5.props['aria-expanded']) === undefined) {10786 throw new Error("\"aria-expanded\" is not supported on role \"" + role + "\".");10787 }10788 }10789 var subtreeIsInaccessibleCache = new WeakMap();10790 function cachedIsSubtreeInaccessible(element) {10791 if (!subtreeIsInaccessibleCache.has(element)) {10792 subtreeIsInaccessibleCache.set(element, isSubtreeInaccessible(element));10793 }10794 return subtreeIsInaccessibleCache.get(element);10795 }10796 return Array.from(container.querySelectorAll( // Only query elements that can be matched by the following filters10797 makeRoleSelector(role, exact, normalizer ? matchNormalizer : undefined))).filter(function (node) {10798 var isRoleSpecifiedExplicitly = node.hasAttribute('role');10799 if (isRoleSpecifiedExplicitly) {10800 var roleValue = node.getAttribute('role');10801 if (queryFallbacks) {10802 return roleValue.split(' ').filter(Boolean).some(function (text) {10803 return matcher(text, node, role, matchNormalizer);10804 });10805 } // if a custom normalizer is passed then let normalizer handle the role value10806 if (normalizer) {10807 return matcher(roleValue, node, role, matchNormalizer);10808 } // other wise only send the first word to match10809 var _roleValue$split = roleValue.split(' '),10810 firstWord = _roleValue$split[0];10811 return matcher(firstWord, node, role, matchNormalizer);10812 }10813 var implicitRoles = getImplicitAriaRoles(node);10814 return implicitRoles.some(function (implicitRole) {10815 return matcher(implicitRole, node, role, matchNormalizer);10816 });10817 }).filter(function (element) {10818 if (selected !== undefined) {10819 return selected === computeAriaSelected(element);10820 }10821 if (checked !== undefined) {10822 return checked === computeAriaChecked(element);10823 }10824 if (pressed !== undefined) {10825 return pressed === computeAriaPressed(element);10826 }10827 if (current !== undefined) {10828 return current === computeAriaCurrent(element);10829 }10830 if (expanded !== undefined) {10831 return expanded === computeAriaExpanded(element);10832 }10833 if (level !== undefined) {10834 return level === computeHeadingLevel(element);10835 } // don't care if aria attributes are unspecified10836 return true;10837 }).filter(function (element) {10838 if (name === undefined) {10839 // Don't care10840 return true;10841 }10842 return matches(computeAccessibleName(element, {10843 computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements10844 }), element, name, function (text) {10845 return text;10846 });10847 }).filter(function (element) {10848 return hidden === false ? isInaccessible(element, {10849 isSubtreeInaccessible: cachedIsSubtreeInaccessible10850 }) === false : true;10851 });10852}10853function makeRoleSelector(role, exact, customNormalizer) {10854 var _roleElements$get;10855 if (typeof role !== 'string') {10856 // For non-string role parameters we can not determine the implicitRoleSelectors.10857 return '*';10858 }10859 var explicitRoleSelector = exact && !customNormalizer ? "*[role~=\"" + role + "\"]" : '*[role]';10860 var roleRelations = (_roleElements$get = roleElements_1.get(role)) != null ? _roleElements$get : new Set();10861 var implicitRoleSelectors = new Set(Array.from(roleRelations).map(function (_ref2) {10862 var name = _ref2.name;10863 return name;10864 })); // Current transpilation config sometimes assumes `...` is always applied to arrays.10865 // `...` is equivalent to `Array.prototype.concat` for arrays.10866 // If you replace this code with `[explicitRoleSelector, ...implicitRoleSelectors]`, make sure every transpilation target retains the `...` in favor of `Array.prototype.concat`.10867 return [explicitRoleSelector].concat(Array.from(implicitRoleSelectors)).join(',');10868}10869var getMultipleError$1 = function getMultipleError(c, role, _temp2) {10870 var _ref3 = _temp2 === void 0 ? {} : _temp2,10871 name = _ref3.name;10872 var nameHint = '';10873 if (name === undefined) {10874 nameHint = '';10875 } else if (typeof name === 'string') {10876 nameHint = " and name \"" + name + "\"";10877 } else {10878 nameHint = " and name `" + name + "`";10879 }10880 return "Found multiple elements with the role \"" + role + "\"" + nameHint;10881};10882var getMissingError$1 = function getMissingError(container, role, _temp3) {10883 var _ref4 = _temp3 === void 0 ? {} : _temp3,10884 _ref4$hidden = _ref4.hidden,10885 hidden = _ref4$hidden === void 0 ? getConfig().defaultHidden : _ref4$hidden,10886 name = _ref4.name;10887 if (getConfig()._disableExpensiveErrorDiagnostics) {10888 return "Unable to find role=\"" + role + "\"";10889 }10890 var roles = '';10891 Array.from(container.children).forEach(function (childElement) {10892 roles += prettyRoles(childElement, {10893 hidden: hidden,10894 includeName: name !== undefined10895 });10896 });10897 var roleMessage;10898 if (roles.length === 0) {10899 if (hidden === false) {10900 roleMessage = 'There are no accessible roles. But there might be some inaccessible roles. ' + 'If you wish to access them, then set the `hidden` option to `true`. ' + 'Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole';10901 } else {10902 roleMessage = 'There are no available roles.';10903 }10904 } else {10905 roleMessage = ("\nHere are the " + (hidden === false ? 'accessible' : 'available') + " roles:\n\n " + roles.replace(/\n/g, '\n ').replace(/\n\s\s\n/g, '\n\n') + "\n").trim();10906 }10907 var nameHint = '';10908 if (name === undefined) {10909 nameHint = '';10910 } else if (typeof name === 'string') {10911 nameHint = " and name \"" + name + "\"";10912 } else {10913 nameHint = " and name `" + name + "`";10914 }10915 return ("\nUnable to find an " + (hidden === false ? 'accessible ' : '') + "element with the role \"" + role + "\"" + nameHint + "\n\n" + roleMessage).trim();10916};10917var queryAllByRoleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByRole, queryAllByRole.name, 'queryAll');10918var _buildQueries$1 = buildQueries(queryAllByRole, getMultipleError$1, getMissingError$1),10919 queryByRole = _buildQueries$1[0],10920 getAllByRole = _buildQueries$1[1],10921 getByRole = _buildQueries$1[2],10922 findAllByRole = _buildQueries$1[3],10923 findByRole = _buildQueries$1[4];10924var getTestIdAttribute = function getTestIdAttribute() {10925 return getConfig().testIdAttribute;10926};10927var queryAllByTestId = function queryAllByTestId() {10928 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {10929 args[_key] = arguments[_key];10930 }10931 checkContainerType(args[0]);10932 return queryAllByAttribute.apply(void 0, [getTestIdAttribute()].concat(args));10933};10934var getMultipleError = function getMultipleError(c, id) {10935 return "Found multiple elements by: [" + getTestIdAttribute() + "=\"" + id + "\"]";10936};10937var getMissingError = function getMissingError(c, id) {10938 return "Unable to find an element by: [" + getTestIdAttribute() + "=\"" + id + "\"]";10939};10940var queryAllByTestIdWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByTestId, queryAllByTestId.name, 'queryAll');10941var _buildQueries = buildQueries(queryAllByTestId, getMultipleError, getMissingError),10942 queryByTestId = _buildQueries[0],10943 getAllByTestId = _buildQueries[1],10944 getByTestId = _buildQueries[2],10945 findAllByTestId = _buildQueries[3],10946 findByTestId = _buildQueries[4];10947var queries = /*#__PURE__*/Object.freeze({10948 __proto__: null,10949 queryAllByLabelText: queryAllByLabelTextWithSuggestions,10950 queryByLabelText: queryByLabelText,10951 getAllByLabelText: getAllByLabelTextWithSuggestions,10952 getByLabelText: getByLabelTextWithSuggestions,10953 findAllByLabelText: findAllByLabelText,10954 findByLabelText: findByLabelText,10955 queryByPlaceholderText: queryByPlaceholderText,10956 queryAllByPlaceholderText: queryAllByPlaceholderTextWithSuggestions,10957 getByPlaceholderText: getByPlaceholderText,10958 getAllByPlaceholderText: getAllByPlaceholderText,10959 findAllByPlaceholderText: findAllByPlaceholderText,10960 findByPlaceholderText: findByPlaceholderText,10961 queryByText: queryByText,10962 queryAllByText: queryAllByTextWithSuggestions,10963 getByText: getByText,10964 getAllByText: getAllByText,10965 findAllByText: findAllByText,10966 findByText: findByText,10967 queryByDisplayValue: queryByDisplayValue,10968 queryAllByDisplayValue: queryAllByDisplayValueWithSuggestions,10969 getByDisplayValue: getByDisplayValue,10970 getAllByDisplayValue: getAllByDisplayValue,10971 findAllByDisplayValue: findAllByDisplayValue,10972 findByDisplayValue: findByDisplayValue,10973 queryByAltText: queryByAltText,10974 queryAllByAltText: queryAllByAltTextWithSuggestions,10975 getByAltText: getByAltText,10976 getAllByAltText: getAllByAltText,10977 findAllByAltText: findAllByAltText,10978 findByAltText: findByAltText,10979 queryByTitle: queryByTitle,10980 queryAllByTitle: queryAllByTitleWithSuggestions,10981 getByTitle: getByTitle,10982 getAllByTitle: getAllByTitle,10983 findAllByTitle: findAllByTitle,10984 findByTitle: findByTitle,10985 queryByRole: queryByRole,10986 queryAllByRole: queryAllByRoleWithSuggestions,10987 getAllByRole: getAllByRole,10988 getByRole: getByRole,10989 findAllByRole: findAllByRole,10990 findByRole: findByRole,10991 queryByTestId: queryByTestId,10992 queryAllByTestId: queryAllByTestIdWithSuggestions,10993 getByTestId: getByTestId,10994 getAllByTestId: getAllByTestId,10995 findAllByTestId: findAllByTestId,10996 findByTestId: findByTestId10997});10998/**10999 * @typedef {{[key: string]: Function}} FuncMap11000 */11001/**11002 * @param {HTMLElement} element container11003 * @param {FuncMap} queries object of functions11004 * @param {Object} initialValue for reducer11005 * @returns {FuncMap} returns object of functions bound to container11006 */11007function getQueriesForElement(element, queries$1, initialValue) {11008 if (queries$1 === void 0) {11009 queries$1 = queries;11010 }11011 if (initialValue === void 0) {11012 initialValue = {};11013 }11014 return Object.keys(queries$1).reduce(function (helpers, key) {11015 var fn = queries$1[key];11016 helpers[key] = fn.bind(null, element);11017 return helpers;11018 }, initialValue);11019}11020/*11021eslint11022 require-await: "off"11023*/11024var eventMap = {11025 // Clipboard Events11026 copy: {11027 EventType: 'ClipboardEvent',11028 defaultInit: {11029 bubbles: true,11030 cancelable: true,11031 composed: true11032 }11033 },11034 cut: {11035 EventType: 'ClipboardEvent',11036 defaultInit: {11037 bubbles: true,11038 cancelable: true,11039 composed: true11040 }11041 },11042 paste: {11043 EventType: 'ClipboardEvent',11044 defaultInit: {11045 bubbles: true,11046 cancelable: true,11047 composed: true11048 }11049 },11050 // Composition Events11051 compositionEnd: {11052 EventType: 'CompositionEvent',11053 defaultInit: {11054 bubbles: true,11055 cancelable: true,11056 composed: true11057 }11058 },11059 compositionStart: {11060 EventType: 'CompositionEvent',11061 defaultInit: {11062 bubbles: true,11063 cancelable: true,11064 composed: true11065 }11066 },11067 compositionUpdate: {11068 EventType: 'CompositionEvent',11069 defaultInit: {11070 bubbles: true,11071 cancelable: true,11072 composed: true11073 }11074 },11075 // Keyboard Events11076 keyDown: {11077 EventType: 'KeyboardEvent',11078 defaultInit: {11079 bubbles: true,11080 cancelable: true,11081 charCode: 0,11082 composed: true11083 }11084 },11085 keyPress: {11086 EventType: 'KeyboardEvent',11087 defaultInit: {11088 bubbles: true,11089 cancelable: true,11090 charCode: 0,11091 composed: true11092 }11093 },11094 keyUp: {11095 EventType: 'KeyboardEvent',11096 defaultInit: {11097 bubbles: true,11098 cancelable: true,11099 charCode: 0,11100 composed: true11101 }11102 },11103 // Focus Events11104 focus: {11105 EventType: 'FocusEvent',11106 defaultInit: {11107 bubbles: false,11108 cancelable: false,11109 composed: true11110 }11111 },11112 blur: {11113 EventType: 'FocusEvent',11114 defaultInit: {11115 bubbles: false,11116 cancelable: false,11117 composed: true11118 }11119 },11120 focusIn: {11121 EventType: 'FocusEvent',11122 defaultInit: {11123 bubbles: true,11124 cancelable: false,11125 composed: true11126 }11127 },11128 focusOut: {11129 EventType: 'FocusEvent',11130 defaultInit: {11131 bubbles: true,11132 cancelable: false,11133 composed: true11134 }11135 },11136 // Form Events11137 change: {11138 EventType: 'Event',11139 defaultInit: {11140 bubbles: true,11141 cancelable: false11142 }11143 },11144 input: {11145 EventType: 'InputEvent',11146 defaultInit: {11147 bubbles: true,11148 cancelable: false,11149 composed: true11150 }11151 },11152 invalid: {11153 EventType: 'Event',11154 defaultInit: {11155 bubbles: false,11156 cancelable: true11157 }11158 },11159 submit: {11160 EventType: 'Event',11161 defaultInit: {11162 bubbles: true,11163 cancelable: true11164 }11165 },11166 reset: {11167 EventType: 'Event',11168 defaultInit: {11169 bubbles: true,11170 cancelable: true11171 }11172 },11173 // Mouse Events11174 click: {11175 EventType: 'MouseEvent',11176 defaultInit: {11177 bubbles: true,11178 cancelable: true,11179 button: 0,11180 composed: true11181 }11182 },11183 contextMenu: {11184 EventType: 'MouseEvent',11185 defaultInit: {11186 bubbles: true,11187 cancelable: true,11188 composed: true11189 }11190 },11191 dblClick: {11192 EventType: 'MouseEvent',11193 defaultInit: {11194 bubbles: true,11195 cancelable: true,11196 composed: true11197 }11198 },11199 drag: {11200 EventType: 'DragEvent',11201 defaultInit: {11202 bubbles: true,11203 cancelable: true,11204 composed: true11205 }11206 },11207 dragEnd: {11208 EventType: 'DragEvent',11209 defaultInit: {11210 bubbles: true,11211 cancelable: false,11212 composed: true11213 }11214 },11215 dragEnter: {11216 EventType: 'DragEvent',11217 defaultInit: {11218 bubbles: true,11219 cancelable: true,11220 composed: true11221 }11222 },11223 dragExit: {11224 EventType: 'DragEvent',11225 defaultInit: {11226 bubbles: true,11227 cancelable: false,11228 composed: true11229 }11230 },11231 dragLeave: {11232 EventType: 'DragEvent',11233 defaultInit: {11234 bubbles: true,11235 cancelable: false,11236 composed: true11237 }11238 },11239 dragOver: {11240 EventType: 'DragEvent',11241 defaultInit: {11242 bubbles: true,11243 cancelable: true,11244 composed: true11245 }11246 },11247 dragStart: {11248 EventType: 'DragEvent',11249 defaultInit: {11250 bubbles: true,11251 cancelable: true,11252 composed: true11253 }11254 },11255 drop: {11256 EventType: 'DragEvent',11257 defaultInit: {11258 bubbles: true,11259 cancelable: true,11260 composed: true11261 }11262 },11263 mouseDown: {11264 EventType: 'MouseEvent',11265 defaultInit: {11266 bubbles: true,11267 cancelable: true,11268 composed: true11269 }11270 },11271 mouseEnter: {11272 EventType: 'MouseEvent',11273 defaultInit: {11274 bubbles: false,11275 cancelable: false,11276 composed: true11277 }11278 },11279 mouseLeave: {11280 EventType: 'MouseEvent',11281 defaultInit: {11282 bubbles: false,11283 cancelable: false,11284 composed: true11285 }11286 },11287 mouseMove: {11288 EventType: 'MouseEvent',11289 defaultInit: {11290 bubbles: true,11291 cancelable: true,11292 composed: true11293 }11294 },11295 mouseOut: {11296 EventType: 'MouseEvent',11297 defaultInit: {11298 bubbles: true,11299 cancelable: true,11300 composed: true11301 }11302 },11303 mouseOver: {11304 EventType: 'MouseEvent',11305 defaultInit: {11306 bubbles: true,11307 cancelable: true,11308 composed: true11309 }11310 },11311 mouseUp: {11312 EventType: 'MouseEvent',11313 defaultInit: {11314 bubbles: true,11315 cancelable: true,11316 composed: true11317 }11318 },11319 // Selection Events11320 select: {11321 EventType: 'Event',11322 defaultInit: {11323 bubbles: true,11324 cancelable: false11325 }11326 },11327 // Touch Events11328 touchCancel: {11329 EventType: 'TouchEvent',11330 defaultInit: {11331 bubbles: true,11332 cancelable: false,11333 composed: true11334 }11335 },11336 touchEnd: {11337 EventType: 'TouchEvent',11338 defaultInit: {11339 bubbles: true,11340 cancelable: true,11341 composed: true11342 }11343 },11344 touchMove: {11345 EventType: 'TouchEvent',11346 defaultInit: {11347 bubbles: true,11348 cancelable: true,11349 composed: true11350 }11351 },11352 touchStart: {11353 EventType: 'TouchEvent',11354 defaultInit: {11355 bubbles: true,11356 cancelable: true,11357 composed: true11358 }11359 },11360 // UI Events11361 resize: {11362 EventType: 'UIEvent',11363 defaultInit: {11364 bubbles: false,11365 cancelable: false11366 }11367 },11368 scroll: {11369 EventType: 'UIEvent',11370 defaultInit: {11371 bubbles: false,11372 cancelable: false11373 }11374 },11375 // Wheel Events11376 wheel: {11377 EventType: 'WheelEvent',11378 defaultInit: {11379 bubbles: true,11380 cancelable: true,11381 composed: true11382 }11383 },11384 // Media Events11385 abort: {11386 EventType: 'Event',11387 defaultInit: {11388 bubbles: false,11389 cancelable: false11390 }11391 },11392 canPlay: {11393 EventType: 'Event',11394 defaultInit: {11395 bubbles: false,11396 cancelable: false11397 }11398 },11399 canPlayThrough: {11400 EventType: 'Event',11401 defaultInit: {11402 bubbles: false,11403 cancelable: false11404 }11405 },11406 durationChange: {11407 EventType: 'Event',11408 defaultInit: {11409 bubbles: false,11410 cancelable: false11411 }11412 },11413 emptied: {11414 EventType: 'Event',11415 defaultInit: {11416 bubbles: false,11417 cancelable: false11418 }11419 },11420 encrypted: {11421 EventType: 'Event',11422 defaultInit: {11423 bubbles: false,11424 cancelable: false11425 }11426 },11427 ended: {11428 EventType: 'Event',11429 defaultInit: {11430 bubbles: false,11431 cancelable: false11432 }11433 },11434 loadedData: {11435 EventType: 'Event',11436 defaultInit: {11437 bubbles: false,11438 cancelable: false11439 }11440 },11441 loadedMetadata: {11442 EventType: 'Event',11443 defaultInit: {11444 bubbles: false,11445 cancelable: false11446 }11447 },11448 loadStart: {11449 EventType: 'ProgressEvent',11450 defaultInit: {11451 bubbles: false,11452 cancelable: false11453 }11454 },11455 pause: {11456 EventType: 'Event',11457 defaultInit: {11458 bubbles: false,11459 cancelable: false11460 }11461 },11462 play: {11463 EventType: 'Event',11464 defaultInit: {11465 bubbles: false,11466 cancelable: false11467 }11468 },11469 playing: {11470 EventType: 'Event',11471 defaultInit: {11472 bubbles: false,11473 cancelable: false11474 }11475 },11476 progress: {11477 EventType: 'ProgressEvent',11478 defaultInit: {11479 bubbles: false,11480 cancelable: false11481 }11482 },11483 rateChange: {11484 EventType: 'Event',11485 defaultInit: {11486 bubbles: false,11487 cancelable: false11488 }11489 },11490 seeked: {11491 EventType: 'Event',11492 defaultInit: {11493 bubbles: false,11494 cancelable: false11495 }11496 },11497 seeking: {11498 EventType: 'Event',11499 defaultInit: {11500 bubbles: false,11501 cancelable: false11502 }11503 },11504 stalled: {11505 EventType: 'Event',11506 defaultInit: {11507 bubbles: false,11508 cancelable: false11509 }11510 },11511 suspend: {11512 EventType: 'Event',11513 defaultInit: {11514 bubbles: false,11515 cancelable: false11516 }11517 },11518 timeUpdate: {11519 EventType: 'Event',11520 defaultInit: {11521 bubbles: false,11522 cancelable: false11523 }11524 },11525 volumeChange: {11526 EventType: 'Event',11527 defaultInit: {11528 bubbles: false,11529 cancelable: false11530 }11531 },11532 waiting: {11533 EventType: 'Event',11534 defaultInit: {11535 bubbles: false,11536 cancelable: false11537 }11538 },11539 // Image Events11540 load: {11541 EventType: 'UIEvent',11542 defaultInit: {11543 bubbles: false,11544 cancelable: false11545 }11546 },11547 error: {11548 EventType: 'Event',11549 defaultInit: {11550 bubbles: false,11551 cancelable: false11552 }11553 },11554 // Animation Events11555 animationStart: {11556 EventType: 'AnimationEvent',11557 defaultInit: {11558 bubbles: true,11559 cancelable: false11560 }11561 },11562 animationEnd: {11563 EventType: 'AnimationEvent',11564 defaultInit: {11565 bubbles: true,11566 cancelable: false11567 }11568 },11569 animationIteration: {11570 EventType: 'AnimationEvent',11571 defaultInit: {11572 bubbles: true,11573 cancelable: false11574 }11575 },11576 // Transition Events11577 transitionCancel: {11578 EventType: 'TransitionEvent',11579 defaultInit: {11580 bubbles: true,11581 cancelable: false11582 }11583 },11584 transitionEnd: {11585 EventType: 'TransitionEvent',11586 defaultInit: {11587 bubbles: true,11588 cancelable: true11589 }11590 },11591 transitionRun: {11592 EventType: 'TransitionEvent',11593 defaultInit: {11594 bubbles: true,11595 cancelable: false11596 }11597 },11598 transitionStart: {11599 EventType: 'TransitionEvent',11600 defaultInit: {11601 bubbles: true,11602 cancelable: false11603 }11604 },11605 // pointer events11606 pointerOver: {11607 EventType: 'PointerEvent',11608 defaultInit: {11609 bubbles: true,11610 cancelable: true,11611 composed: true11612 }11613 },11614 pointerEnter: {11615 EventType: 'PointerEvent',11616 defaultInit: {11617 bubbles: false,11618 cancelable: false11619 }11620 },11621 pointerDown: {11622 EventType: 'PointerEvent',11623 defaultInit: {11624 bubbles: true,11625 cancelable: true,11626 composed: true11627 }11628 },11629 pointerMove: {11630 EventType: 'PointerEvent',11631 defaultInit: {11632 bubbles: true,11633 cancelable: true,11634 composed: true11635 }11636 },11637 pointerUp: {11638 EventType: 'PointerEvent',11639 defaultInit: {11640 bubbles: true,11641 cancelable: true,11642 composed: true11643 }11644 },11645 pointerCancel: {11646 EventType: 'PointerEvent',11647 defaultInit: {11648 bubbles: true,11649 cancelable: false,11650 composed: true11651 }11652 },11653 pointerOut: {11654 EventType: 'PointerEvent',11655 defaultInit: {11656 bubbles: true,11657 cancelable: true,11658 composed: true11659 }11660 },11661 pointerLeave: {11662 EventType: 'PointerEvent',11663 defaultInit: {11664 bubbles: false,11665 cancelable: false11666 }11667 },11668 gotPointerCapture: {11669 EventType: 'PointerEvent',11670 defaultInit: {11671 bubbles: true,11672 cancelable: false,11673 composed: true11674 }11675 },11676 lostPointerCapture: {11677 EventType: 'PointerEvent',11678 defaultInit: {11679 bubbles: true,11680 cancelable: false,11681 composed: true11682 }11683 },11684 // history events11685 popState: {11686 EventType: 'PopStateEvent',11687 defaultInit: {11688 bubbles: true,11689 cancelable: false11690 }11691 }11692};11693var eventAliasMap = {11694 doubleClick: 'dblClick'11695};11696Object.keys(eventMap).forEach(function (key) {11697 var _eventMap$key = eventMap[key];11698 _eventMap$key.EventType;11699 _eventMap$key.defaultInit;11700 key.toLowerCase();11701}); // function written after some investigation here:11702Object.keys(eventAliasMap).forEach(function (aliasKey) {11703 eventAliasMap[aliasKey];11704});11705/* eslint complexity:["error", 9] */11706function unindent(string) {11707 // remove white spaces first, to save a few bytes.11708 // testing-playground will reformat on load any ways.11709 return string.replace(/[ \t]*[\n][ \t]*/g, '\n');11710}11711function encode(value) {11712 return lzString.exports.compressToEncodedURIComponent(unindent(value));11713}11714function getPlaygroundUrl(markup) {11715 return "https://testing-playground.com/#markup=" + encode(markup);11716}11717var debug = function debug(element, maxLength, options) {11718 return Array.isArray(element) ? element.forEach(function (el) {11719 return logDOM(el, maxLength, options);11720 }) : logDOM(element, maxLength, options);11721};11722var logTestingPlaygroundURL = function logTestingPlaygroundURL(element) {11723 if (element === void 0) {11724 element = getDocument().body;11725 }11726 // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition11727 if (!element || !('innerHTML' in element)) {11728 console.log("The element you're providing isn't a valid DOM element.");11729 return;11730 } // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition11731 if (!element.innerHTML) {11732 console.log("The provided element doesn't have any children.");11733 return;11734 }11735 console.log("Open this URL in your browser\n\n" + getPlaygroundUrl(element.innerHTML));11736};11737var initialValue = {11738 debug: debug,11739 logTestingPlaygroundURL: logTestingPlaygroundURL11740};11741typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition11742? getQueriesForElement(document.body, queries, initialValue) : Object.keys(queries).reduce(function (helpers, key) {11743 // `key` is for all intents and purposes the type of keyof `helpers`, which itself is the type of `initialValue` plus incoming properties from `queries`11744 // if `Object.keys(something)` returned Array<keyof typeof something> this explicit type assertion would not be necessary11745 // see https://stackoverflow.com/questions/55012174/why-doesnt-object-keys-return-a-keyof-type-in-typescript11746 helpers[key] = function () {11747 throw new TypeError('For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error');11748 };11749 return helpers;11750}, initialValue);11751/**11752 * This file is heavily based on Playwright's `parseComponentSelector`, altered for this library's usage.11753 * @see https://github.com/microsoft/playwright/blob/585807b3bea6a998019200c16b06683115011d87/src/server/common/componentUtils.ts11754 *11755 * Copyright (c) Microsoft Corporation.11756 *11757 * Licensed under the Apache License, Version 2.0 (the "License");11758 * you may not use this file except in compliance with the License.11759 * You may obtain a copy of the License at11760 *11761 * http://www.apache.org/licenses/LICENSE-2.011762 *11763 * Unless required by applicable law or agreed to in writing, software11764 * distributed under the License is distributed on an "AS IS" BASIS,11765 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11766 * See the License for the specific language governing permissions and11767 * limitations under the License.11768 */11769function parseSelector(selector) {11770 let wp = 0;11771 let EOL = selector.length === 0;11772 const next = () => selector[wp] || '';11773 const eat1 = () => {11774 const result = next();11775 ++wp;11776 EOL = wp >= selector.length;11777 return result;11778 };11779 const syntaxError = (stage) => {11780 if (EOL)11781 throw new Error(`Unexpected end of selector while parsing selector \`${selector}\``);11782 throw new Error(`Error while parsing selector \`${selector}\` - unexpected symbol "${next()}" at position ${wp}` +11783 (stage ? ' during ' + stage : ''));11784 };11785 function skipSpaces() {11786 while (!EOL && /\s/.test(next()))11787 eat1();11788 }11789 function readIdentifier() {11790 let result = '';11791 skipSpaces();11792 while (!EOL && /[a-zA-Z]/.test(next()))11793 result += eat1();11794 if (!result)11795 syntaxError('parsing identifier');11796 return result;11797 }11798 function readQuotedString(quote) {11799 let result = eat1();11800 if (result !== quote)11801 syntaxError('parsing quoted string');11802 while (!EOL && next() !== quote) {11803 const cur = eat1();11804 if (cur === '\\' && next() === quote) {11805 result += eat1();11806 }11807 else {11808 result += cur;11809 }11810 }11811 if (next() !== quote)11812 syntaxError('parsing quoted string');11813 result += eat1();11814 return result;11815 }11816 function readRegexString() {11817 if (eat1() !== '/')11818 syntaxError('parsing regex string');11819 let pattern = '';11820 let flags = '';11821 while (!EOL && next() !== '/') {11822 // if (next() === '\\') eat1();11823 pattern += eat1();11824 }11825 if (eat1() !== '/')11826 syntaxError('parsing regex string');11827 while (!EOL && /[dgimsuy]/.test(next())) {11828 flags += eat1();11829 }11830 return [pattern, flags];11831 }11832 function readOperator() {11833 skipSpaces();11834 let op;11835 if (!EOL)11836 op = eat1();11837 if (op !== '=') {11838 syntaxError('parsing operator');11839 }11840 return op;11841 }11842 function readAttribute() {11843 // skip leading [11844 eat1();11845 // read attribute name:11846 const name = readIdentifier();11847 skipSpaces();11848 // check property is true: [focused]11849 if (next() === ']') {11850 eat1();11851 return { name, value: true };11852 }11853 readOperator();11854 let value = undefined;11855 let caseSensitive = undefined;11856 skipSpaces();11857 if (next() === `'` || next() === `"`) {11858 caseSensitive = true;11859 value = readQuotedString(next()).slice(1, -1);11860 skipSpaces();11861 if (next() === 'i' || next() === 'I') {11862 caseSensitive = false;11863 eat1();11864 }11865 else if (next() === 's' || next() === 'S') {11866 caseSensitive = true;11867 eat1();11868 }11869 }11870 else if (next() === '/') {11871 const [pattern, flags] = readRegexString();11872 value = new RegExp(pattern, flags);11873 }11874 else {11875 value = '';11876 while (!EOL && !/\s/.test(next()) && next() !== ']')11877 value += eat1();11878 if (value === 'true') {11879 value = true;11880 }11881 else if (value === 'false') {11882 value = false;11883 }11884 else {11885 value = +value;11886 if (isNaN(value))11887 syntaxError('parsing attribute value');11888 }11889 }11890 skipSpaces();11891 if (next() !== ']')11892 syntaxError('parsing attribute value');11893 eat1();11894 if (typeof value !== 'string' &&11895 typeof value !== 'number' &&11896 typeof value !== 'boolean' &&11897 !(value instanceof RegExp))11898 throw new Error(`Error while parsing selector \`${selector}\` - cannot use attribute ${name} with unsupported type ${typeof value} - ${value}`);11899 const attribute = { name, value };11900 if (typeof caseSensitive !== 'undefined') {11901 attribute.caseSensitive = caseSensitive;11902 }11903 return attribute;11904 }11905 const result = {11906 role: '',11907 attributes: [],11908 };11909 result.role = readIdentifier();11910 skipSpaces();11911 while (next() === '[') {11912 result.attributes.push(readAttribute());11913 skipSpaces();11914 }11915 if (!EOL)11916 syntaxError(undefined);11917 if (!result.role && !result.attributes.length)11918 throw new Error(`Error while parsing selector \`${selector}\` - selector cannot be empty`);11919 return result;11920}11921function is(value, attrValue, caseSensitive) {11922 if (value === null) {11923 return false;11924 }11925 if (attrValue instanceof RegExp) {11926 const valueAsString = value.toString();11927 return !!valueAsString.match(attrValue);11928 }11929 if (caseSensitive === false &&11930 typeof attrValue === 'string' &&11931 typeof value === 'string') {11932 return Object.is(value.toLowerCase(), attrValue.toLowerCase());11933 }11934 return Object.is(value, attrValue);11935}11936// Copied and changed from https://github.com/microsoft/playwright/blob/b0cd5b1420741ce79c8ed74cab6dd20101011c7c/packages/playwright-core/src/server/injected/selectorEvaluator.ts#L636-L64311937function parentElementOrShadowHost(element) {11938 if (element.parentElement) {11939 return element.parentElement;11940 }11941 if (!element.parentNode) {11942 return;11943 }11944 if (element.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&11945 element.parentNode.host) {11946 return element.parentNode.host;11947 }11948 return undefined;11949}11950function getPlaceholder(element) {11951 return (element.getAttribute('placeholder') ||11952 element.getAttribute('aria-placeholder'));11953}11954function getValueText(element, role) {11955 // aria-valuetext: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-valuetext11956 if (['meter', 'scrollbar', 'separator', 'slider', 'spinbutton'].includes(role)) {11957 if (element.hasAttribute('aria-valuetext')) {11958 return element.getAttribute('aria-valuetext');11959 }11960 else if (element.hasAttribute('aria-valuenow')) {11961 return element.getAttribute('aria-valuenow');11962 }11963 }11964 // aria-selected: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected11965 if (['grid', 'listbox', 'tablist', 'tree', 'combobox'].includes(role)) {11966 const isMultiSelectable = element.getAttribute('aria-multiselectable') === 'true' ||11967 (element.tagName === 'SELECT' && element.hasAttribute('multiple'));11968 const selectedOptions = ['gridcell', 'option', 'row', 'tab'].flatMap((role) => queryAllByRoleWithSuggestions(element, role, {11969 selected: true,11970 }));11971 if (!selectedOptions.length) {11972 return null;11973 }11974 if (selectedOptions.length === 1 || !isMultiSelectable) {11975 return getNodeText(selectedOptions[0]);11976 }11977 return selectedOptions.map((option) => getNodeText(option));11978 }11979 // input or textarea11980 if (['INPUT', 'TEXTAREA'].includes(element.tagName)) {11981 return element.value;11982 }11983 // contenteditable or textbox11984 if (element.isContentEditable || role === 'textbox') {11985 return getNodeText(element);11986 }11987 return null;11988}11989// Copied and changed from https://github.com/microsoft/playwright/blob/b0cd5b1420741ce79c8ed74cab6dd20101011c7c/packages/playwright-core/src/server/injected/injectedScript.ts#L1227-L1255.11990function getDisabled(element) {11991 function hasDisabledFieldSet(element) {11992 if (!element) {11993 return false;11994 }11995 if (element.tagName === 'FIELDSET' && element.hasAttribute('disabled')) {11996 return true;11997 }11998 // fieldset does not work across shadow boundaries11999 return hasDisabledFieldSet(element.parentElement);12000 }12001 function hasAriaDisabled(element) {12002 if (!element) {12003 return false;12004 }12005 const attribute = (element.getAttribute('aria-disabled') || '').toLowerCase();12006 if (attribute === 'true') {12007 return true;12008 }12009 else if (attribute === 'false') {12010 return false;12011 }12012 return hasAriaDisabled(parentElementOrShadowHost(element));12013 }12014 if (['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA'].includes(element.tagName)) {12015 if (element.hasAttribute('disabled')) {12016 return true;12017 }12018 if (hasDisabledFieldSet(element)) {12019 return true;12020 }12021 }12022 if (hasAriaDisabled(element)) {12023 return true;12024 }12025 return false;12026}12027configure({12028 computedStyleSupportsPseudoElements: true,12029});12030const ALLOWED_CURRENT_VALUES = [12031 'page',12032 'step',12033 'location',12034 'date',12035 'time',12036];12037const ALLOWED_ATTRIBUTES = [12038 'name',12039 'pressed',12040 'expanded',12041 'selected',12042 'checked',12043 'level',12044 'current',12045 'placeholder',12046 'valuetext',12047 'disabled',12048];12049const attributeValidators = {12050 level: (value) => [1, 2, 3, 4, 5, 6].includes(value) ||12051 `"level" can only be one of [1, 2, 3, 4, 5, 6], received \`${JSON.stringify(value)}\``,12052 current: (value) => typeof value === 'boolean' ||12053 (typeof value === 'string' &&12054 ALLOWED_CURRENT_VALUES.includes(value)) ||12055 `"level" can only be one of [true, false, ${ALLOWED_CURRENT_VALUES.join(', ')}], received \`${JSON.stringify(value)}\``,12056};12057function queryAll$1(root, selector) {12058 const { role, attributes } = parseSelector(selector);12059 const disallowedAttributes = attributes.filter((attribute) => !ALLOWED_ATTRIBUTES.includes(attribute.name));12060 if (disallowedAttributes.length) {12061 throw new Error(`Unsupported attribute${disallowedAttributes.length > 1 ? 's' : ''} ${disallowedAttributes12062 .map((attribute) => `"${attribute.name}"`)12063 .join(', ')} in selector \`${selector}\``);12064 }12065 for (const attribute of attributes) {12066 if (attributeValidators.hasOwnProperty(attribute.name)) {12067 const validate = attributeValidators[attribute.name];12068 const validation = validate(attribute.value);12069 if (validation !== true) {12070 throw new Error(`Unexpected value in selector \`${selector}\`: ${validation}`);12071 }12072 }12073 }12074 const rootElement = root instanceof Document ? root.documentElement : root;12075 const options = Object.fromEntries(attributes.map((attribute) => [attribute.name, attribute.value]));12076 let elements = queryAllByRoleWithSuggestions(rootElement, role, options);12077 if (typeof options.placeholder !== 'undefined') {12078 elements = elements.filter((element) => is(getPlaceholder(element), options.placeholder));12079 }12080 if (typeof options.valuetext !== 'undefined') {12081 elements = elements.filter((element) => {12082 const values = getValueText(element, role);12083 return Array.isArray(values)12084 ? values.some((value) => is(value, options.valuetext))12085 : is(values, options.valuetext);12086 });12087 }12088 if (typeof options.disabled !== 'undefined') {12089 elements = elements.filter((element) => is(getDisabled(element), options.disabled));12090 }12091 return elements;12092}12093function query$1(root, selector) {12094 return queryAll$1(root, selector)[0] || null;12095}12096var roleSelector = {12097 query: query$1,12098 queryAll: queryAll$1,12099};12100// const ATTRIBUTES_ORDER: (keyof typeof attributeGetters)[] = [12101// 'name',12102// 'value',12103// 'level',12104// 'disabled',12105// 'placeholder',12106// 'selected',12107// 'checked',12108// 'expanded',12109// 'pressed',12110// ];12111function stringify(json, space) {12112 return JSON.stringify(json, (_key, value) => (value instanceof RegExp ? value.toString() : value), space);12113}12114function suggestSelector(element, options = {}) {12115 const { strict = true } = options;12116 if (!element) {12117 throw new Error('Element not found');12118 }12119 // Priority 1: Select by test ids12120 {12121 if (element.dataset.testid) {12122 return {12123 type: 'css',12124 selector: `[data-testid=${JSON.stringify(element.dataset.testid)}]`,12125 };12126 }12127 else if (element.dataset.testId) {12128 return {12129 type: 'css',12130 selector: `[data-test-id=${JSON.stringify(element.dataset.testId)}]`,12131 };12132 }12133 else if (element.dataset.test) {12134 return {12135 type: 'css',12136 selector: `[data-test=${JSON.stringify(element.dataset.test)}]`,12137 };12138 }12139 }12140 const suggestedQuery = getSuggestedQuery(element, 'get', 'Role');12141 if (suggestedQuery) {12142 // Priority 2: Select by roles and aria attributes12143 const checkSelector = (selector) => {12144 const selectedElements = roleSelector.queryAll(element.ownerDocument.documentElement, selector);12145 if (!selectedElements.length)12146 return false;12147 else if (strict && selectedElements.length > 1)12148 return false;12149 return selectedElements[0] === element;12150 };12151 const [role, attributes] = suggestedQuery.queryArgs;12152 const attributesSelector = Object.entries(attributes || {})12153 .map(([key, value]) => `[${key}=${value instanceof RegExp ? value.toString() : JSON.stringify(value)}]`)12154 .join('');12155 let selector = `${role}${attributesSelector}`;12156 if (checkSelector(selector)) {12157 return { type: 'role', selector };12158 }12159 throw new Error(`Unable to find accessible selector for this element. Consider using text selector or CSS selector instead.12160Parsed attributes:12161${stringify({ role, ...attributes }, 2)}`);12162 }12163 // Priority 4: Select by ids12164 {12165 if (element.id) {12166 return { type: 'css', selector: `#${element.id}` };12167 }12168 }12169 throw new Error(`Unable to find suggested selector for this element.`);12170}12171configure({12172 // Not available in JSDOM12173 computedStyleSupportsPseudoElements: false,12174});12175const query = roleSelector.query;12176const queryAll = roleSelector.queryAll;12177function getAll(root, selector) {12178 const elements = queryAll(root, selector);12179 if (elements.length === 0) {12180 throw new Error(`Unable to find any elements with the selector "${selector}"`);12181 }12182 return elements;12183}12184function get(root, selector) {12185 const elements = getAll(root, selector);12186 if (elements.length > 1) {12187 throw new Error(`Found multiple elements with the selector "${selector}"`);12188 }12189 return elements[0];12190}12191function within(root) {12192 return {12193 query: query.bind(null, root),12194 queryAll: queryAll.bind(null, root),12195 get: get.bind(null, root),12196 getAll: getAll.bind(null, root),12197 };12198}12199const screen = typeof document !== 'undefined' && within(document.body);12200exports.get = get;12201exports.getAll = getAll;12202exports.query = query;12203exports.queryAll = queryAll;12204exports.screen = screen;12205exports.suggestSelector = suggestSelector;...

Full Screen

Full Screen

injectedScriptSource.js

Source:injectedScriptSource.js Github

copy

Full Screen

1var pwExport2;(() => {3 'use strict'4 var e = {5 204: (e, t) => {6 Object.defineProperty(t, '__esModule', { value: !0 }),7 (t.checkComponentAttribute = function (e, t) {8 for (const n of t.jsonPath) null != e && (e = e[n])9 const n =10 'string' != typeof e || t.caseSensetive ? e : e.toUpperCase(),11 r =12 'string' != typeof t.value || t.caseSensetive13 ? t.value14 : t.value.toUpperCase()15 return '<truthy>' === t.op16 ? !!n17 : '=' === t.op18 ? n === r19 : 'string' == typeof n &&20 'string' == typeof r &&21 ('*=' === t.op22 ? n.includes(r)23 : '^=' === t.op24 ? n.startsWith(r)25 : '$=' === t.op26 ? n.endsWith(r)27 : '|=' === t.op28 ? n === r || n.startsWith(r + '-')29 : '~=' === t.op && n.split(' ').includes(r))30 }),31 (t.parseComponentSelector = function (e) {32 let t = 0,33 n = 0 === e.length34 const r = () => e[t] || '',35 o = () => {36 const o = r()37 return ++t, (n = t >= e.length), o38 },39 i = (o) => {40 if (n)41 throw new Error(42 `Unexpected end of selector while parsing selector \`${e}\``43 )44 throw new Error(45 `Error while parsing selector \`${e}\` - unexpected symbol "${r()}" at position ${t}` +46 (o ? ' during ' + o : '')47 )48 }49 function s() {50 for (; !n && /\s/.test(r()); ) o()51 }52 function c() {53 let e = ''54 for (s(); !n && /[-$0-9A-Z_]/i.test(r()); ) e += o()55 return e56 }57 function a(e) {58 let t = o()59 for (t !== e && i('parsing quoted string'); !n && r() !== e; )60 '\\' === r() && o(), (t += o())61 return r() !== e && i('parsing quoted string'), (t += o()), t62 }63 function u() {64 let e = ''65 return (66 s(),67 (e = "'" === r() || '"' === r() ? a(r()).slice(1, -1) : c()),68 e || i('parsing property path'),69 e70 )71 }72 function l() {73 o()74 const t = []75 for (t.push(u()), s(); '.' === r(); ) o(), t.push(u()), s()76 if (']' === r())77 return (78 o(),79 {80 jsonPath: t,81 op: '<truthy>',82 value: null,83 caseSensetive: !184 }85 )86 const c = (function () {87 s()88 let e = ''89 return (90 n || (e += o()),91 n || '=' === e || (e += o()),92 ['=', '*=', '^=', '$=', '|=', '~='].includes(e) ||93 i('parsing operator'),94 e95 )96 })()97 let l,98 h = !099 if ((s(), "'" === r() || '"' === r()))100 (l = a(r()).slice(1, -1)),101 s(),102 'i' === r() || 'I' === r()103 ? ((h = !1), o())104 : ('s' !== r() && 'S' !== r()) || ((h = !0), o())105 else {106 for (l = ''; !n && !/\s/.test(r()) && ']' !== r(); ) l += o()107 'true' === l108 ? (l = !0)109 : 'false' === l110 ? (l = !1)111 : ((l = +l), isNaN(l) && i('parsing attribute value'))112 }113 if (114 (s(),115 ']' !== r() && i('parsing attribute value'),116 o(),117 '=' !== c && 'string' != typeof l)118 )119 throw new Error(120 `Error while parsing selector \`${e}\` - cannot use ${c} in attribute with non-string matching value - ${l}`121 )122 return { jsonPath: t, op: c, value: l, caseSensetive: h }123 }124 const h = { name: '', attributes: [] }125 for (h.name = c(), s(); '[' === r(); ) h.attributes.push(l()), s()126 if ((n || i(void 0), !h.name && !h.attributes.length))127 throw new Error(128 `Error while parsing selector \`${e}\` - selector cannot be empty`129 )130 return h131 })132 },133 317: (e, t, n) => {134 Object.defineProperty(t, '__esModule', { value: !0 }),135 (t.parseCSS = function (e, t) {136 let n137 try {138 ;(n = r.tokenize(e)),139 n[n.length - 1] instanceof r.EOFToken ||140 n.push(new r.EOFToken())141 } catch (t) {142 const n = t.message + ` while parsing selector "${e}"`,143 r = (t.stack || '').indexOf(t.message)144 throw (145 (-1 !== r &&146 (t.stack =147 t.stack.substring(0, r) +148 n +149 t.stack.substring(r + t.message.length)),150 (t.message = n),151 t)152 )153 }154 const o = n.find(155 (e) =>156 e instanceof r.AtKeywordToken ||157 e instanceof r.BadStringToken ||158 e instanceof r.BadURLToken ||159 e instanceof r.ColumnToken ||160 e instanceof r.CDOToken ||161 e instanceof r.CDCToken ||162 e instanceof r.SemicolonToken ||163 e instanceof r.OpenCurlyToken ||164 e instanceof r.CloseCurlyToken ||165 e instanceof r.URLToken ||166 e instanceof r.PercentageToken167 )168 if (o)169 throw new Error(170 `Unsupported token "${o.toSource()}" while parsing selector "${e}"`171 )172 let i = 0173 const s = new Set()174 function c() {175 return new Error(176 `Unexpected token "${n[177 i178 ].toSource()}" while parsing selector "${e}"`179 )180 }181 function a() {182 for (; n[i] instanceof r.WhitespaceToken; ) i++183 }184 function u(e = i) {185 return n[e] instanceof r.IdentToken186 }187 function l(e = i) {188 return n[e] instanceof r.CommaToken189 }190 function h(e = i) {191 return n[e] instanceof r.CloseParenToken192 }193 function p(e = i) {194 return n[e] instanceof r.DelimToken && '*' === n[e].value195 }196 function f(e = i) {197 return n[e] instanceof r.EOFToken198 }199 function d(e = i) {200 return (201 n[e] instanceof r.DelimToken &&202 ['>', '+', '~'].includes(n[e].value)203 )204 }205 function m(e = i) {206 return (207 l(e) ||208 h(e) ||209 f(e) ||210 d(e) ||211 n[e] instanceof r.WhitespaceToken212 )213 }214 function g() {215 const e = [y()]216 for (; a(), l(); ) i++, e.push(y())217 return e218 }219 function y() {220 return (221 a(),222 (function (e = i) {223 return n[e] instanceof r.NumberToken224 })() ||225 (function (e = i) {226 return n[e] instanceof r.StringToken227 })()228 ? n[i++].value229 : (function () {230 const e = { simples: [] }231 for (232 a(),233 d()234 ? e.simples.push({235 selector: {236 functions: [{ name: 'scope', args: [] }]237 },238 combinator: ''239 })240 : e.simples.push({ selector: v(), combinator: '' });241 ;242 ) {243 if ((a(), d()))244 (e.simples[e.simples.length - 1].combinator =245 n[i++].value),246 a()247 else if (m()) break248 e.simples.push({ combinator: '', selector: v() })249 }250 return e251 })()252 )253 }254 function v() {255 let e = ''256 const o = []257 for (; !m(); )258 if (u() || p()) e += n[i++].toSource()259 else if (n[i] instanceof r.HashToken) e += n[i++].toSource()260 else if (n[i] instanceof r.DelimToken && '.' === n[i].value) {261 if ((i++, !u())) throw c()262 e += '.' + n[i++].toSource()263 } else if (n[i] instanceof r.ColonToken)264 if ((i++, u()))265 if (t.has(n[i].value.toLowerCase())) {266 const e = n[i++].value.toLowerCase()267 o.push({ name: e, args: [] }), s.add(e)268 } else e += ':' + n[i++].toSource()269 else {270 if (!(n[i] instanceof r.FunctionToken)) throw c()271 {272 const r = n[i++].value.toLowerCase()273 if (274 (t.has(r)275 ? (o.push({ name: r, args: g() }), s.add(r))276 : (e += `:${r}(${w()})`),277 a(),278 !h())279 )280 throw c()281 i++282 }283 }284 else {285 if (!(n[i] instanceof r.OpenSquareToken)) throw c()286 for (287 e += '[', i++;288 !(n[i] instanceof r.CloseSquareToken || f());289 )290 e += n[i++].toSource()291 if (!(n[i] instanceof r.CloseSquareToken)) throw c()292 ;(e += ']'), i++293 }294 if (!e && !o.length) throw c()295 return { css: e || void 0, functions: o }296 }297 function w() {298 let e = ''299 for (; !h() && !f(); ) e += n[i++].toSource()300 return e301 }302 const b = g()303 if (!f()) throw new Error(`Error while parsing selector "${e}"`)304 if (b.some((e) => 'object' != typeof e || !('simples' in e)))305 throw new Error(`Error while parsing selector "${e}"`)306 return { selector: b, names: Array.from(s) }307 }),308 (t.serializeSelector = function e(t) {309 return t310 .map((t) =>311 'string' == typeof t312 ? `"${t}"`313 : 'number' == typeof t314 ? String(t)315 : t.simples316 .map(({ selector: t, combinator: n }) => {317 let r = t.css || ''318 return (319 (r += t.functions320 .map((t) => `:${t.name}(${e(t.args)})`)321 .join('')),322 n && (r += ' ' + n),323 r324 )325 })326 .join(' ')327 )328 .join(', ')329 })330 var r = (function (e, t) {331 if (e && e.__esModule) return e332 if (null === e || ('object' != typeof e && 'function' != typeof e))333 return { default: e }334 var n = o(t)335 if (n && n.has(e)) return n.get(e)336 var r = {},337 i = Object.defineProperty && Object.getOwnPropertyDescriptor338 for (var s in e)339 if ('default' !== s && Object.prototype.hasOwnProperty.call(e, s)) {340 var c = i ? Object.getOwnPropertyDescriptor(e, s) : null341 c && (c.get || c.set)342 ? Object.defineProperty(r, s, c)343 : (r[s] = e[s])344 }345 return (r.default = e), n && n.set(e, r), r346 })(n(503))347 function o(e) {348 if ('function' != typeof WeakMap) return null349 var t = new WeakMap(),350 n = new WeakMap()351 return (o = function (e) {352 return e ? n : t353 })(e)354 }355 },356 503: (e, t) => {357 var n, r358 ;(n = function (e) {359 var t = function (e, t, n) {360 return e >= t && e <= n361 }362 function n(e) {363 return t(e, 48, 57)364 }365 function r(e) {366 return n(e) || t(e, 65, 70) || t(e, 97, 102)367 }368 function o(e) {369 return (370 (function (e) {371 return t(e, 65, 90)372 })(e) ||373 (function (e) {374 return t(e, 97, 122)375 })(e)376 )377 }378 function i(e) {379 return (380 o(e) ||381 (function (e) {382 return e >= 128383 })(e) ||384 95 == e385 )386 }387 function s(e) {388 return i(e) || n(e) || 45 == e389 }390 function c(e) {391 return t(e, 0, 8) || 11 == e || t(e, 14, 31) || 127 == e392 }393 function a(e) {394 return 10 == e395 }396 function u(e) {397 return a(e) || 9 == e || 32 == e398 }399 var l = function (e) {400 this.message = e401 }402 function h(e) {403 if (e <= 65535) return String.fromCharCode(e)404 e -= Math.pow(2, 16)405 var t = Math.floor(e / Math.pow(2, 10)) + 55296,406 n = (e % Math.pow(2, 10)) + 56320407 return String.fromCharCode(t) + String.fromCharCode(n)408 }409 function p() {410 throw 'Abstract Base Class'411 }412 function f() {413 return this414 }415 function d() {416 return this417 }418 function m() {419 return this420 }421 function g() {422 return this423 }424 function y() {425 return this426 }427 function v() {428 return this429 }430 function w() {431 return this432 }433 function b() {434 return this435 }436 function E() {437 throw 'Abstract Base Class'438 }439 function _() {440 return (this.value = '{'), (this.mirror = '}'), this441 }442 function S() {443 return (this.value = '}'), (this.mirror = '{'), this444 }445 function T() {446 return (this.value = '['), (this.mirror = ']'), this447 }448 function k() {449 return (this.value = ']'), (this.mirror = '['), this450 }451 function N() {452 return (this.value = '('), (this.mirror = ')'), this453 }454 function x() {455 return (this.value = ')'), (this.mirror = '('), this456 }457 function C() {458 return this459 }460 function A() {461 return this462 }463 function O() {464 return this465 }466 function M() {467 return this468 }469 function $() {470 return this471 }472 function R() {473 return this474 }475 function j() {476 return this477 }478 function L(e) {479 return (this.value = h(e)), this480 }481 function P() {482 throw 'Abstract Base Class'483 }484 function q(e) {485 this.value = e486 }487 function D(e) {488 ;(this.value = e), (this.mirror = ')')489 }490 function I(e) {491 this.value = e492 }493 function U(e) {494 ;(this.value = e), (this.type = 'unrestricted')495 }496 function W(e) {497 this.value = e498 }499 function F(e) {500 this.value = e501 }502 function B() {503 ;(this.value = null), (this.type = 'integer'), (this.repr = '')504 }505 function z() {506 ;(this.value = null), (this.repr = '')507 }508 function V() {509 ;(this.value = null),510 (this.type = 'integer'),511 (this.repr = ''),512 (this.unit = '')513 }514 function H(e) {515 for (516 var n = '', r = (e = '' + e).charCodeAt(0), o = 0;517 o < e.length;518 o++519 ) {520 var i = e.charCodeAt(o)521 if (0 == i)522 throw new l('Invalid character: the input contains U+0000.')523 t(i, 1, 31) ||524 127 == i ||525 (0 == o && t(i, 48, 57)) ||526 (1 == o && t(i, 48, 57) && 45 == r)527 ? (n += '\\' + i.toString(16) + ' ')528 : i >= 128 ||529 45 == i ||530 95 == i ||531 t(i, 48, 57) ||532 t(i, 65, 90) ||533 t(i, 97, 122)534 ? (n += e[o])535 : (n += '\\' + e[o])536 }537 return n538 }539 function G(e) {540 e = '' + e541 for (var n = '', r = 0; r < e.length; r++) {542 var o = e.charCodeAt(r)543 if (0 == o)544 throw new l('Invalid character: the input contains U+0000.')545 t(o, 1, 31) || 127 == o546 ? (n += '\\' + o.toString(16) + ' ')547 : (n += 34 == o || 92 == o ? '\\' + e[r] : e[r])548 }549 return n550 }551 ;((l.prototype = new Error()).name = 'InvalidCharacterError'),552 (p.prototype.toJSON = function () {553 return { token: this.tokenType }554 }),555 (p.prototype.toString = function () {556 return this.tokenType557 }),558 (p.prototype.toSource = function () {559 return '' + this560 }),561 (f.prototype = Object.create(p.prototype)),562 (f.prototype.tokenType = 'BADSTRING'),563 (d.prototype = Object.create(p.prototype)),564 (d.prototype.tokenType = 'BADURL'),565 (m.prototype = Object.create(p.prototype)),566 (m.prototype.tokenType = 'WHITESPACE'),567 (m.prototype.toString = function () {568 return 'WS'569 }),570 (m.prototype.toSource = function () {571 return ' '572 }),573 (g.prototype = Object.create(p.prototype)),574 (g.prototype.tokenType = 'CDO'),575 (g.prototype.toSource = function () {576 return '\x3c!--'577 }),578 (y.prototype = Object.create(p.prototype)),579 (y.prototype.tokenType = 'CDC'),580 (y.prototype.toSource = function () {581 return '--\x3e'582 }),583 (v.prototype = Object.create(p.prototype)),584 (v.prototype.tokenType = ':'),585 (w.prototype = Object.create(p.prototype)),586 (w.prototype.tokenType = ';'),587 (b.prototype = Object.create(p.prototype)),588 (b.prototype.tokenType = ','),589 (E.prototype = Object.create(p.prototype)),590 (_.prototype = Object.create(E.prototype)),591 (_.prototype.tokenType = '{'),592 (S.prototype = Object.create(E.prototype)),593 (S.prototype.tokenType = '}'),594 (T.prototype = Object.create(E.prototype)),595 (T.prototype.tokenType = '['),596 (k.prototype = Object.create(E.prototype)),597 (k.prototype.tokenType = ']'),598 (N.prototype = Object.create(E.prototype)),599 (N.prototype.tokenType = '('),600 (x.prototype = Object.create(E.prototype)),601 (x.prototype.tokenType = ')'),602 (C.prototype = Object.create(p.prototype)),603 (C.prototype.tokenType = '~='),604 (A.prototype = Object.create(p.prototype)),605 (A.prototype.tokenType = '|='),606 (O.prototype = Object.create(p.prototype)),607 (O.prototype.tokenType = '^='),608 (M.prototype = Object.create(p.prototype)),609 (M.prototype.tokenType = '$='),610 ($.prototype = Object.create(p.prototype)),611 ($.prototype.tokenType = '*='),612 (R.prototype = Object.create(p.prototype)),613 (R.prototype.tokenType = '||'),614 (j.prototype = Object.create(p.prototype)),615 (j.prototype.tokenType = 'EOF'),616 (j.prototype.toSource = function () {617 return ''618 }),619 (L.prototype = Object.create(p.prototype)),620 (L.prototype.tokenType = 'DELIM'),621 (L.prototype.toString = function () {622 return 'DELIM(' + this.value + ')'623 }),624 (L.prototype.toJSON = function () {625 var e =626 this.constructor.prototype.constructor.prototype.toJSON.call(627 this628 )629 return (e.value = this.value), e630 }),631 (L.prototype.toSource = function () {632 return '\\' == this.value ? '\\\n' : this.value633 }),634 (P.prototype = Object.create(p.prototype)),635 (P.prototype.ASCIIMatch = function (e) {636 return this.value.toLowerCase() == e.toLowerCase()637 }),638 (P.prototype.toJSON = function () {639 var e =640 this.constructor.prototype.constructor.prototype.toJSON.call(641 this642 )643 return (e.value = this.value), e644 }),645 (q.prototype = Object.create(P.prototype)),646 (q.prototype.tokenType = 'IDENT'),647 (q.prototype.toString = function () {648 return 'IDENT(' + this.value + ')'649 }),650 (q.prototype.toSource = function () {651 return H(this.value)652 }),653 (D.prototype = Object.create(P.prototype)),654 (D.prototype.tokenType = 'FUNCTION'),655 (D.prototype.toString = function () {656 return 'FUNCTION(' + this.value + ')'657 }),658 (D.prototype.toSource = function () {659 return H(this.value) + '('660 }),661 (I.prototype = Object.create(P.prototype)),662 (I.prototype.tokenType = 'AT-KEYWORD'),663 (I.prototype.toString = function () {664 return 'AT(' + this.value + ')'665 }),666 (I.prototype.toSource = function () {667 return '@' + H(this.value)668 }),669 (U.prototype = Object.create(P.prototype)),670 (U.prototype.tokenType = 'HASH'),671 (U.prototype.toString = function () {672 return 'HASH(' + this.value + ')'673 }),674 (U.prototype.toJSON = function () {675 var e =676 this.constructor.prototype.constructor.prototype.toJSON.call(677 this678 )679 return (e.value = this.value), (e.type = this.type), e680 }),681 (U.prototype.toSource = function () {682 return 'id' == this.type683 ? '#' + H(this.value)684 : '#' +685 (function (e) {686 for (687 var n = '', r = ((e = '' + e).charCodeAt(0), 0);688 r < e.length;689 r++690 ) {691 var o = e.charCodeAt(r)692 if (0 == o)693 throw new l(694 'Invalid character: the input contains U+0000.'695 )696 o >= 128 ||697 45 == o ||698 95 == o ||699 t(o, 48, 57) ||700 t(o, 65, 90) ||701 t(o, 97, 122)702 ? (n += e[r])703 : (n += '\\' + o.toString(16) + ' ')704 }705 return n706 })(this.value)707 }),708 (W.prototype = Object.create(P.prototype)),709 (W.prototype.tokenType = 'STRING'),710 (W.prototype.toString = function () {711 return '"' + G(this.value) + '"'712 }),713 (F.prototype = Object.create(P.prototype)),714 (F.prototype.tokenType = 'URL'),715 (F.prototype.toString = function () {716 return 'URL(' + this.value + ')'717 }),718 (F.prototype.toSource = function () {719 return 'url("' + G(this.value) + '")'720 }),721 (B.prototype = Object.create(p.prototype)),722 (B.prototype.tokenType = 'NUMBER'),723 (B.prototype.toString = function () {724 return 'integer' == this.type725 ? 'INT(' + this.value + ')'726 : 'NUMBER(' + this.value + ')'727 }),728 (B.prototype.toJSON = function () {729 var e =730 this.constructor.prototype.constructor.prototype.toJSON.call(731 this732 )733 return (734 (e.value = this.value),735 (e.type = this.type),736 (e.repr = this.repr),737 e738 )739 }),740 (B.prototype.toSource = function () {741 return this.repr742 }),743 (z.prototype = Object.create(p.prototype)),744 (z.prototype.tokenType = 'PERCENTAGE'),745 (z.prototype.toString = function () {746 return 'PERCENTAGE(' + this.value + ')'747 }),748 (z.prototype.toJSON = function () {749 var e =750 this.constructor.prototype.constructor.prototype.toJSON.call(751 this752 )753 return (e.value = this.value), (e.repr = this.repr), e754 }),755 (z.prototype.toSource = function () {756 return this.repr + '%'757 }),758 (V.prototype = Object.create(p.prototype)),759 (V.prototype.tokenType = 'DIMENSION'),760 (V.prototype.toString = function () {761 return 'DIM(' + this.value + ',' + this.unit + ')'762 }),763 (V.prototype.toJSON = function () {764 var e =765 this.constructor.prototype.constructor.prototype.toJSON.call(766 this767 )768 return (769 (e.value = this.value),770 (e.type = this.type),771 (e.repr = this.repr),772 (e.unit = this.unit),773 e774 )775 }),776 (V.prototype.toSource = function () {777 var e = this.repr,778 n = H(this.unit)779 return (780 'e' != n[0].toLowerCase() ||781 ('-' != n[1] && !t(n.charCodeAt(1), 48, 57)) ||782 (n = '\\65 ' + n.slice(1, n.length)),783 e + n784 )785 }),786 (e.tokenize = function (e) {787 e = (function (e) {788 for (var n = [], r = 0; r < e.length; r++) {789 var o = e.charCodeAt(r)790 if (791 (13 == o && 10 == e.charCodeAt(r + 1) && ((o = 10), r++),792 (13 != o && 12 != o) || (o = 10),793 0 == o && (o = 65533),794 t(o, 55296, 56319) && t(e.charCodeAt(r + 1), 56320, 57343))795 ) {796 var i = o - 55296,797 s = e.charCodeAt(r + 1) - 56320798 ;(o = Math.pow(2, 16) + i * Math.pow(2, 10) + s), r++799 }800 n.push(o)801 }802 return n803 })(e)804 for (805 var o,806 l = -1,807 p = [],808 E = 0,809 P = 0,810 H = 0,811 G = { line: E, column: P },812 J = function (t) {813 return t >= e.length ? -1 : e[t]814 },815 Q = function (e) {816 if ((void 0 === e && (e = 1), e > 3))817 throw 'Spec Error: no more than three codepoints of lookahead.'818 return J(l + e)819 },820 X = function (e) {821 return (822 void 0 === e && (e = 1),823 a((o = J((l += e))))824 ? ((E += 1), (H = P), (P = 0))825 : (P += e),826 !0827 )828 },829 K = function () {830 return (831 (l -= 1),832 a(o) ? ((E -= 1), (P = H)) : (P -= 1),833 (G.line = E),834 (G.column = P),835 !0836 )837 },838 Z = function (e) {839 return void 0 === e && (e = o), -1 == e840 },841 Y = function () {842 return (843 console.log(844 'Parse error at index ' +845 l +846 ', processing codepoint 0x' +847 o.toString(16) +848 '.'849 ),850 !0851 )852 },853 ee = function () {854 if ((te(), X(), u(o))) {855 for (; u(Q()); ) X()856 return new m()857 }858 if (34 == o) return oe()859 if (35 == o) {860 if (s(Q()) || ce(Q(1), Q(2))) {861 var e = new U()862 return (863 ue(Q(1), Q(2), Q(3)) && (e.type = 'id'),864 (e.value = pe()),865 e866 )867 }868 return new L(o)869 }870 return 36 == o871 ? 61 == Q()872 ? (X(), new M())873 : new L(o)874 : 39 == o875 ? oe()876 : 40 == o877 ? new N()878 : 41 == o879 ? new x()880 : 42 == o881 ? 61 == Q()882 ? (X(), new $())883 : new L(o)884 : 43 == o885 ? he()886 ? (K(), ne())887 : new L(o)888 : 44 == o889 ? new b()890 : 45 == o891 ? he()892 ? (K(), ne())893 : 45 == Q(1) && 62 == Q(2)894 ? (X(2), new y())895 : le()896 ? (K(), re())897 : new L(o)898 : 46 == o899 ? he()900 ? (K(), ne())901 : new L(o)902 : 58 == o903 ? new v()904 : 59 == o905 ? new w()906 : 60 == o907 ? 33 == Q(1) && 45 == Q(2) && 45 == Q(3)908 ? (X(3), new g())909 : new L(o)910 : 64 == o911 ? ue(Q(1), Q(2), Q(3))912 ? new I(pe())913 : new L(o)914 : 91 == o915 ? new T()916 : 92 == o917 ? ae()918 ? (K(), re())919 : (Y(), new L(o))920 : 93 == o921 ? new k()922 : 94 == o923 ? 61 == Q()924 ? (X(), new O())925 : new L(o)926 : 123 == o927 ? new _()928 : 124 == o929 ? 61 == Q()930 ? (X(), new A())931 : 124 == Q()932 ? (X(), new R())933 : new L(o)934 : 125 == o935 ? new S()936 : 126 == o937 ? 61 == Q()938 ? (X(), new C())939 : new L(o)940 : n(o)941 ? (K(), ne())942 : i(o)943 ? (K(), re())944 : Z()945 ? new j()946 : new L(o)947 },948 te = function () {949 for (; 47 == Q(1) && 42 == Q(2); )950 for (X(2); ; ) {951 if ((X(), 42 == o && 47 == Q())) {952 X()953 break954 }955 if (Z()) return void Y()956 }957 },958 ne = function () {959 var e,960 t = fe()961 return ue(Q(1), Q(2), Q(3))962 ? (((e = new V()).value = t.value),963 (e.repr = t.repr),964 (e.type = t.type),965 (e.unit = pe()),966 e)967 : 37 == Q()968 ? (X(),969 ((e = new z()).value = t.value),970 (e.repr = t.repr),971 e)972 : (((e = new B()).value = t.value),973 (e.repr = t.repr),974 (e.type = t.type),975 e)976 },977 re = function () {978 var e = pe()979 if ('url' == e.toLowerCase() && 40 == Q()) {980 for (X(); u(Q(1)) && u(Q(2)); ) X()981 return 34 == Q() || 39 == Q()982 ? new D(e)983 : !u(Q()) || (34 != Q(2) && 39 != Q(2))984 ? ie()985 : new D(e)986 }987 return 40 == Q() ? (X(), new D(e)) : new q(e)988 },989 oe = function (e) {990 void 0 === e && (e = o)991 for (var t = ''; X(); ) {992 if (o == e || Z()) return new W(t)993 if (a(o)) return Y(), K(), new f()994 92 == o995 ? Z(Q()) || (a(Q()) ? X() : (t += h(se())))996 : (t += h(o))997 }998 },999 ie = function () {1000 for (var e = new F(''); u(Q()); ) X()1001 if (Z(Q())) return e1002 for (; X(); ) {1003 if (41 == o || Z()) return e1004 if (u(o)) {1005 for (; u(Q()); ) X()1006 return 41 == Q() || Z(Q()) ? (X(), e) : (me(), new d())1007 }1008 if (34 == o || 39 == o || 40 == o || c(o))1009 return Y(), me(), new d()1010 if (92 == o) {1011 if (!ae()) return Y(), me(), new d()1012 e.value += h(se())1013 } else e.value += h(o)1014 }1015 },1016 se = function () {1017 if ((X(), r(o))) {1018 for (var e = [o], t = 0; t < 5 && r(Q()); t++)1019 X(), e.push(o)1020 u(Q()) && X()1021 var n = parseInt(1022 e1023 .map(function (e) {1024 return String.fromCharCode(e)1025 })1026 .join(''),1027 161028 )1029 return n > 1114111 && (n = 65533), n1030 }1031 return Z() ? 65533 : o1032 },1033 ce = function (e, t) {1034 return 92 == e && !a(t)1035 },1036 ae = function () {1037 return ce(o, Q())1038 },1039 ue = function (e, t, n) {1040 return 45 == e1041 ? i(t) || 45 == t || ce(t, n)1042 : !!i(e) || (92 == e && ce(e, t))1043 },1044 le = function () {1045 return ue(o, Q(1), Q(2))1046 },1047 he = function () {1048 return (1049 (e = o),1050 (t = Q(1)),1051 (r = Q(2)),1052 43 == e || 45 == e1053 ? !!n(t) || !(46 != t || !n(r))1054 : 46 == e1055 ? !!n(t)1056 : !!n(e)1057 )1058 var e, t, r1059 },1060 pe = function () {1061 for (var e = ''; X(); )1062 if (s(o)) e += h(o)1063 else {1064 if (!ae()) return K(), e1065 e += h(se())1066 }1067 },1068 fe = function () {1069 var e = [],1070 t = 'integer'1071 for (1072 (43 != Q() && 45 != Q()) || (X(), (e += h(o)));1073 n(Q());1074 )1075 X(), (e += h(o))1076 if (46 == Q(1) && n(Q(2)))1077 for (1078 X(), e += h(o), X(), e += h(o), t = 'number';1079 n(Q());1080 )1081 X(), (e += h(o))1082 var r = Q(1),1083 i = Q(2),1084 s = Q(3)1085 if ((69 != r && 101 != r) || !n(i)) {1086 if ((69 == r || 101 == r) && (43 == i || 45 == i) && n(s))1087 for (1088 X(),1089 e += h(o),1090 X(),1091 e += h(o),1092 X(),1093 e += h(o),1094 t = 'number';1095 n(Q());1096 )1097 X(), (e += h(o))1098 } else1099 for (1100 X(), e += h(o), X(), e += h(o), t = 'number';1101 n(Q());1102 )1103 X(), (e += h(o))1104 return { type: t, value: de(e), repr: e }1105 },1106 de = function (e) {1107 return +e1108 },1109 me = function () {1110 for (; X(); ) {1111 if (41 == o || Z()) return1112 ae() && se()1113 }1114 },1115 ge = 0;1116 !Z(Q());1117 )1118 if ((p.push(ee()), ++ge > 2 * e.length))1119 return "I'm infinite-looping!"1120 return p1121 }),1122 (e.IdentToken = q),1123 (e.FunctionToken = D),1124 (e.AtKeywordToken = I),1125 (e.HashToken = U),1126 (e.StringToken = W),1127 (e.BadStringToken = f),1128 (e.URLToken = F),1129 (e.BadURLToken = d),1130 (e.DelimToken = L),1131 (e.NumberToken = B),1132 (e.PercentageToken = z),1133 (e.DimensionToken = V),1134 (e.IncludeMatchToken = C),1135 (e.DashMatchToken = A),1136 (e.PrefixMatchToken = O),1137 (e.SuffixMatchToken = M),1138 (e.SubstringMatchToken = $),1139 (e.ColumnToken = R),1140 (e.WhitespaceToken = m),1141 (e.CDOToken = g),1142 (e.CDCToken = y),1143 (e.ColonToken = v),1144 (e.SemicolonToken = w),1145 (e.CommaToken = b),1146 (e.OpenParenToken = N),1147 (e.CloseParenToken = x),1148 (e.OpenSquareToken = T),1149 (e.CloseSquareToken = k),1150 (e.OpenCurlyToken = _),1151 (e.CloseCurlyToken = S),1152 (e.EOFToken = j),1153 (e.CSSParserToken = p),1154 (e.GroupingToken = E)1155 }),1156 void 0 === (r = n.apply(t, [t])) || (e.exports = r)1157 },1158 461: (e, t, n) => {1159 Object.defineProperty(t, '__esModule', { value: !0 }),1160 (t.parseSelector = function (e) {1161 const t = (function (e) {1162 let t,1163 n = 0,1164 r = 01165 const o = { parts: [] },1166 i = () => {1167 const t = e.substring(r, n).trim(),1168 i = t.indexOf('=')1169 let s, c1170 ;-1 !== i &&1171 t1172 .substring(0, i)1173 .trim()1174 .match(/^[a-zA-Z_0-9-+:*]+$/)1175 ? ((s = t.substring(0, i).trim()),1176 (c = t.substring(i + 1)))1177 : (t.length > 1 &&1178 '"' === t[0] &&1179 '"' === t[t.length - 1]) ||1180 (t.length > 1 &&1181 "'" === t[0] &&1182 "'" === t[t.length - 1])1183 ? ((s = 'text'), (c = t))1184 : /^\(*\/\//.test(t) || t.startsWith('..')1185 ? ((s = 'xpath'), (c = t))1186 : ((s = 'css'), (c = t))1187 let a = !11188 if (1189 ('*' === s[0] && ((a = !0), (s = s.substring(1))),1190 o.parts.push({ name: s, body: c }),1191 a)1192 ) {1193 if (void 0 !== o.capture)1194 throw new Error(1195 'Only one of the selectors can capture using * modifier'1196 )1197 o.capture = o.parts.length - 11198 }1199 }1200 if (!e.includes('>>')) return (n = e.length), i(), o1201 for (; n < e.length; ) {1202 const o = e[n]1203 '\\' === o && n + 1 < e.length1204 ? (n += 2)1205 : o === t1206 ? ((t = void 0), n++)1207 : t || ('"' !== o && "'" !== o && '`' !== o)1208 ? t || '>' !== o || '>' !== e[n + 1]1209 ? n++1210 : (i(), (n += 2), (r = n))1211 : ((t = o), n++)1212 }1213 return i(), o1214 })(e),1215 n = t.parts.map((e) =>1216 'css' === e.name || 'css:light' === e.name1217 ? ('css:light' === e.name &&1218 (e.body = ':light(' + e.body + ')'),1219 { name: 'css', body: (0, r.parseCSS)(e.body, o).selector })1220 : e1221 )1222 return { selector: e, capture: t.capture, parts: n }1223 }),1224 (t.customCSSNames = void 0)1225 var r = n(317)1226 const o = new Set([1227 'not',1228 'is',1229 'where',1230 'has',1231 'scope',1232 'light',1233 'visible',1234 'text',1235 'text-matches',1236 'text-is',1237 'has-text',1238 'above',1239 'below',1240 'right-of',1241 'left-of',1242 'near',1243 'nth-match'1244 ])1245 t.customCSSNames = o1246 },1247 836: (e, t, n) => {1248 Object.defineProperty(t, '__esModule', { value: !0 }),1249 (t.ReactEngine = void 0)1250 var r = n(204)1251 function o(e) {1252 if ('function' == typeof e.type)1253 return e.type.displayName || e.type.name || 'Anonymous'1254 if ('string' == typeof e.type) return e.type1255 if (e._currentElement) {1256 const t = e._currentElement.type1257 if ('string' == typeof t) return t1258 if ('function' == typeof t)1259 return t.displayName || t.name || 'Anonymous'1260 }1261 return ''1262 }1263 function i(e) {1264 if (e.child) {1265 const t = []1266 for (let n = e.child; n; n = n.sibling) t.push(n)1267 return t1268 }1269 if (!e._currentElement) return []1270 const t = (e) => {1271 var t1272 const n =1273 null === (t = e._currentElement) || void 0 === t ? void 0 : t.type1274 return 'function' == typeof n || 'string' == typeof n1275 }1276 if (e._renderedComponent) {1277 const n = e._renderedComponent1278 return t(n) ? [n] : []1279 }1280 return e._renderedChildren1281 ? [...Object.values(e._renderedChildren)].filter(t)1282 : []1283 }1284 function s(e) {1285 var t1286 const n =1287 e.memoizedProps ||1288 (null === (t = e._currentElement) || void 0 === t1289 ? void 01290 : t.props)1291 if (!n || 'string' == typeof n) return n1292 const r = { ...n }1293 return delete r.children, r1294 }1295 function c(e) {1296 var t1297 const n = {1298 name: o(e),1299 children: i(e).map(c),1300 rootElements: [],1301 props: s(e)1302 },1303 r =1304 e.stateNode ||1305 e._hostNode ||1306 (null === (t = e._renderedComponent) || void 0 === t1307 ? void 01308 : t._hostNode)1309 if (r instanceof Element) n.rootElements.push(r)1310 else1311 for (const e of n.children) n.rootElements.push(...e.rootElements)1312 return n1313 }1314 function a(e, t, n = []) {1315 t(e) && n.push(e)1316 for (const r of e.children) a(r, t, n)1317 return n1318 }1319 const u = {1320 queryAll(e, t) {1321 const { name: n, attributes: o } = (0, r.parseComponentSelector)(t),1322 i = (function () {1323 const e = [],1324 t = document.createTreeWalker(1325 document,1326 NodeFilter.SHOW_ELEMENT1327 )1328 for (; t.nextNode(); ) {1329 const n = t.currentNode1330 n.hasOwnProperty('_reactRootContainer') &&1331 e.push(n._reactRootContainer._internalRoot.current)1332 }1333 for (const t of document.querySelectorAll('[data-reactroot]'))1334 for (const n of Object.keys(t))1335 (n.startsWith('__reactInternalInstance') ||1336 n.startsWith('__reactFiber')) &&1337 e.push(t[n])1338 return e1339 })()1340 .map((e) => c(e))1341 .map((t) =>1342 a(t, (t) => {1343 if (n && t.name !== n) return !11344 if (t.rootElements.some((t) => !e.contains(t))) return !11345 for (const e of o)1346 if (!(0, r.checkComponentAttribute)(t.props, e)) return !11347 return !01348 })1349 )1350 .flat(),1351 s = new Set()1352 for (const e of i) for (const t of e.rootElements) s.add(t)1353 return [...s]1354 }1355 }1356 t.ReactEngine = u1357 },1358 848: (e, t, n) => {1359 Object.defineProperty(t, '__esModule', { value: !0 }),1360 (t.createLaxTextMatcher = d),1361 (t.createStrictTextMatcher = m),1362 (t.createRegexTextMatcher = g),1363 (t.elementText = v),1364 (t.elementMatchesText = w),1365 (t.parentElementOrShadowHost = x),1366 (t.isVisible = O),1367 (t.SelectorEvaluatorImpl = void 0)1368 var r = n(461)1369 t.SelectorEvaluatorImpl = class {1370 constructor(e) {1371 ;(this._engines = new Map()),1372 (this._cacheQueryCSS = new Map()),1373 (this._cacheMatches = new Map()),1374 (this._cacheQuery = new Map()),1375 (this._cacheMatchesSimple = new Map()),1376 (this._cacheMatchesParents = new Map()),1377 (this._cacheCallMatches = new Map()),1378 (this._cacheCallQuery = new Map()),1379 (this._cacheQuerySimple = new Map()),1380 (this._cacheText = new Map()),1381 (this._scoreMap = void 0),1382 (this._retainCacheCounter = 0)1383 for (const [t, n] of e) this._engines.set(t, n)1384 this._engines.set('not', c),1385 this._engines.set('is', o),1386 this._engines.set('where', o),1387 this._engines.set('has', i),1388 this._engines.set('scope', s),1389 this._engines.set('light', a),1390 this._engines.set('visible', u),1391 this._engines.set('text', l),1392 this._engines.set('text-is', h),1393 this._engines.set('text-matches', p),1394 this._engines.set('has-text', f),1395 this._engines.set('right-of', k('right-of', b)),1396 this._engines.set('left-of', k('left-of', E)),1397 this._engines.set('above', k('above', _)),1398 this._engines.set('below', k('below', S)),1399 this._engines.set('near', k('near', T)),1400 this._engines.set('nth-match', N)1401 const t = [...this._engines.keys()]1402 t.sort()1403 const n = [...r.customCSSNames]1404 if ((n.sort(), t.join('|') !== n.join('|')))1405 throw new Error(1406 `Please keep customCSSNames in sync with evaluator engines: ${t.join(1407 '|'1408 )} vs ${n.join('|')}`1409 )1410 }1411 begin() {1412 ++this._retainCacheCounter1413 }1414 end() {1415 --this._retainCacheCounter,1416 this._retainCacheCounter ||1417 (this._cacheQueryCSS.clear(),1418 this._cacheMatches.clear(),1419 this._cacheQuery.clear(),1420 this._cacheMatchesSimple.clear(),1421 this._cacheMatchesParents.clear(),1422 this._cacheCallMatches.clear(),1423 this._cacheCallQuery.clear(),1424 this._cacheQuerySimple.clear(),1425 this._cacheText.clear())1426 }1427 _cached(e, t, n, r) {1428 e.has(t) || e.set(t, [])1429 const o = e.get(t),1430 i = o.find((e) => n.every((t, n) => e.rest[n] === t))1431 if (i) return i.result1432 const s = r()1433 return o.push({ rest: n, result: s }), s1434 }1435 _checkSelector(e) {1436 if (1437 'object' != typeof e ||1438 !e ||1439 !(Array.isArray(e) || ('simples' in e && e.simples.length))1440 )1441 throw new Error(`Malformed selector "${e}"`)1442 return e1443 }1444 matches(e, t, n) {1445 const r = this._checkSelector(t)1446 this.begin()1447 try {1448 return this._cached(1449 this._cacheMatches,1450 e,1451 [r, n.scope, n.pierceShadow],1452 () =>1453 Array.isArray(r)1454 ? this._matchesEngine(o, e, r, n)1455 : !!this._matchesSimple(1456 e,1457 r.simples[r.simples.length - 1].selector,1458 n1459 ) && this._matchesParents(e, r, r.simples.length - 2, n)1460 )1461 } finally {1462 this.end()1463 }1464 }1465 query(e, t) {1466 const n = this._checkSelector(t)1467 this.begin()1468 try {1469 return this._cached(1470 this._cacheQuery,1471 n,1472 [e.scope, e.pierceShadow],1473 () => {1474 if (Array.isArray(n)) return this._queryEngine(o, e, n)1475 const t = this._scoreMap1476 this._scoreMap = new Map()1477 let r = this._querySimple(1478 e,1479 n.simples[n.simples.length - 1].selector1480 )1481 return (1482 (r = r.filter((t) =>1483 this._matchesParents(t, n, n.simples.length - 2, e)1484 )),1485 this._scoreMap.size &&1486 r.sort((e, t) => {1487 const n = this._scoreMap.get(e),1488 r = this._scoreMap.get(t)1489 return n === r1490 ? 01491 : void 0 === n1492 ? 11493 : void 0 === r1494 ? -11495 : n - r1496 }),1497 (this._scoreMap = t),1498 r1499 )1500 }1501 )1502 } finally {1503 this.end()1504 }1505 }1506 _markScore(e, t) {1507 this._scoreMap && this._scoreMap.set(e, t)1508 }1509 _matchesSimple(e, t, n) {1510 return this._cached(1511 this._cacheMatchesSimple,1512 e,1513 [t, n.scope, n.pierceShadow],1514 () => {1515 if (1516 !t.functions.some(1517 (e) => 'scope' === e.name || 'is' === e.name1518 ) &&1519 e === n.scope1520 )1521 return !11522 if (t.css && !this._matchesCSS(e, t.css)) return !11523 for (const r of t.functions)1524 if (1525 !this._matchesEngine(this._getEngine(r.name), e, r.args, n)1526 )1527 return !11528 return !01529 }1530 )1531 }1532 _querySimple(e, t) {1533 return t.functions.length1534 ? this._cached(1535 this._cacheQuerySimple,1536 t,1537 [e.scope, e.pierceShadow],1538 () => {1539 let n = t.css1540 const r = t.functions1541 let o1542 '*' === n && r.length && (n = void 0)1543 let i = -11544 void 0 !== n1545 ? (o = this._queryCSS(e, n))1546 : ((i = r.findIndex(1547 (e) => void 0 !== this._getEngine(e.name).query1548 )),1549 -1 === i && (i = 0),1550 (o = this._queryEngine(1551 this._getEngine(r[i].name),1552 e,1553 r[i].args1554 )))1555 for (let t = 0; t < r.length; t++) {1556 if (t === i) continue1557 const n = this._getEngine(r[t].name)1558 void 0 !== n.matches &&1559 (o = o.filter((o) =>1560 this._matchesEngine(n, o, r[t].args, e)1561 ))1562 }1563 for (let t = 0; t < r.length; t++) {1564 if (t === i) continue1565 const n = this._getEngine(r[t].name)1566 void 0 === n.matches &&1567 (o = o.filter((o) =>1568 this._matchesEngine(n, o, r[t].args, e)1569 ))1570 }1571 return o1572 }1573 )1574 : this._queryCSS(e, t.css || '*')1575 }1576 _matchesParents(e, t, n, r) {1577 return (1578 n < 0 ||1579 this._cached(1580 this._cacheMatchesParents,1581 e,1582 [t, n, r.scope, r.pierceShadow],1583 () => {1584 const { selector: o, combinator: i } = t.simples[n]1585 if ('>' === i) {1586 const i = C(e, r)1587 return (1588 !(!i || !this._matchesSimple(i, o, r)) &&1589 this._matchesParents(i, t, n - 1, r)1590 )1591 }1592 if ('+' === i) {1593 const i = A(e, r)1594 return (1595 !(!i || !this._matchesSimple(i, o, r)) &&1596 this._matchesParents(i, t, n - 1, r)1597 )1598 }1599 if ('' === i) {1600 let i = C(e, r)1601 for (; i; ) {1602 if (this._matchesSimple(i, o, r)) {1603 if (this._matchesParents(i, t, n - 1, r)) return !01604 if ('' === t.simples[n - 1].combinator) break1605 }1606 i = C(i, r)1607 }1608 return !11609 }1610 if ('~' === i) {1611 let i = A(e, r)1612 for (; i; ) {1613 if (this._matchesSimple(i, o, r)) {1614 if (this._matchesParents(i, t, n - 1, r)) return !01615 if ('~' === t.simples[n - 1].combinator) break1616 }1617 i = A(i, r)1618 }1619 return !11620 }1621 if ('>=' === i) {1622 let i = e1623 for (; i; ) {1624 if (this._matchesSimple(i, o, r)) {1625 if (this._matchesParents(i, t, n - 1, r)) return !01626 if ('' === t.simples[n - 1].combinator) break1627 }1628 i = C(i, r)1629 }1630 return !11631 }1632 throw new Error(`Unsupported combinator "${i}"`)1633 }1634 )1635 )1636 }1637 _matchesEngine(e, t, n, r) {1638 if (e.matches) return this._callMatches(e, t, n, r)1639 if (e.query) return this._callQuery(e, n, r).includes(t)1640 throw new Error(1641 'Selector engine should implement "matches" or "query"'1642 )1643 }1644 _queryEngine(e, t, n) {1645 if (e.query) return this._callQuery(e, n, t)1646 if (e.matches)1647 return this._queryCSS(t, '*').filter((r) =>1648 this._callMatches(e, r, n, t)1649 )1650 throw new Error(1651 'Selector engine should implement "matches" or "query"'1652 )1653 }1654 _callMatches(e, t, n, r) {1655 return this._cached(1656 this._cacheCallMatches,1657 t,1658 [e, r.scope, r.pierceShadow, ...n],1659 () => e.matches(t, n, r, this)1660 )1661 }1662 _callQuery(e, t, n) {1663 return this._cached(1664 this._cacheCallQuery,1665 e,1666 [n.scope, n.pierceShadow, ...t],1667 () => e.query(n, t, this)1668 )1669 }1670 _matchesCSS(e, t) {1671 return e.matches(t)1672 }1673 _queryCSS(e, t) {1674 return this._cached(1675 this._cacheQueryCSS,1676 t,1677 [e.scope, e.pierceShadow],1678 () => {1679 let n = []1680 return (1681 (function r(o) {1682 if (1683 ((n = n.concat([...o.querySelectorAll(t)])),1684 e.pierceShadow)1685 ) {1686 o.shadowRoot && r(o.shadowRoot)1687 for (const e of o.querySelectorAll('*'))1688 e.shadowRoot && r(e.shadowRoot)1689 }1690 })(e.scope),1691 n1692 )1693 }1694 )1695 }1696 _getEngine(e) {1697 const t = this._engines.get(e)1698 if (!t) throw new Error(`Unknown selector engine "${e}"`)1699 return t1700 }1701 }1702 const o = {1703 matches(e, t, n, r) {1704 if (0 === t.length)1705 throw new Error('"is" engine expects non-empty selector list')1706 return t.some((t) => r.matches(e, t, n))1707 },1708 query(e, t, n) {1709 if (0 === t.length)1710 throw new Error('"is" engine expects non-empty selector list')1711 let r = []1712 for (const o of t) r = r.concat(n.query(e, o))1713 return 1 === t.length1714 ? r1715 : (function (e) {1716 const t = new Map(),1717 n = [],1718 r = []1719 function o(e) {1720 let r = t.get(e)1721 if (r) return r1722 const i = x(e)1723 return (1724 i ? o(i).children.push(e) : n.push(e),1725 (r = { children: [], taken: !1 }),1726 t.set(e, r),1727 r1728 )1729 }1730 return (1731 e.forEach((e) => (o(e).taken = !0)),1732 n.forEach(function e(n) {1733 const o = t.get(n)1734 if ((o.taken && r.push(n), o.children.length > 1)) {1735 const e = new Set(o.children)1736 o.children = []1737 let t = n.firstElementChild1738 for (; t && o.children.length < e.size; )1739 e.has(t) && o.children.push(t),1740 (t = t.nextElementSibling)1741 for (1742 t = n.shadowRoot1743 ? n.shadowRoot.firstElementChild1744 : null;1745 t && o.children.length < e.size;1746 )1747 e.has(t) && o.children.push(t),1748 (t = t.nextElementSibling)1749 }1750 o.children.forEach(e)1751 }),1752 r1753 )1754 })(r)1755 }1756 },1757 i = {1758 matches(e, t, n, r) {1759 if (0 === t.length)1760 throw new Error('"has" engine expects non-empty selector list')1761 return r.query({ ...n, scope: e }, t).length > 01762 }1763 },1764 s = {1765 matches(e, t, n, r) {1766 if (0 !== t.length)1767 throw new Error('"scope" engine expects no arguments')1768 return 9 === n.scope.nodeType1769 ? e === n.scope.documentElement1770 : e === n.scope1771 },1772 query(e, t, n) {1773 if (0 !== t.length)1774 throw new Error('"scope" engine expects no arguments')1775 if (9 === e.scope.nodeType) {1776 const t = e.scope.documentElement1777 return t ? [t] : []1778 }1779 return 1 === e.scope.nodeType ? [e.scope] : []1780 }1781 },1782 c = {1783 matches(e, t, n, r) {1784 if (0 === t.length)1785 throw new Error('"not" engine expects non-empty selector list')1786 return !r.matches(e, t, n)1787 }1788 },1789 a = {1790 query: (e, t, n) => n.query({ ...e, pierceShadow: !1 }, t),1791 matches: (e, t, n, r) => r.matches(e, t, { ...n, pierceShadow: !1 })1792 },1793 u = {1794 matches(e, t, n, r) {1795 if (t.length)1796 throw new Error('"visible" engine expects no arguments')1797 return O(e)1798 }1799 },1800 l = {1801 matches(e, t, n, r) {1802 if (1 !== t.length || 'string' != typeof t[0])1803 throw new Error('"text" engine expects a single string')1804 return 'self' === w(r, e, d(t[0]))1805 }1806 },1807 h = {1808 matches(e, t, n, r) {1809 if (1 !== t.length || 'string' != typeof t[0])1810 throw new Error('"text-is" engine expects a single string')1811 return 'none' !== w(r, e, m(t[0]))1812 }1813 },1814 p = {1815 matches(e, t, n, r) {1816 if (1817 0 === t.length ||1818 'string' != typeof t[0] ||1819 t.length > 2 ||1820 (2 === t.length && 'string' != typeof t[1])1821 )1822 throw new Error(1823 '"text-matches" engine expects a regexp body and optional regexp flags'1824 )1825 return 'self' === w(r, e, g(t[0], 2 === t.length ? t[1] : void 0))1826 }1827 },1828 f = {1829 matches(e, t, n, r) {1830 if (1 !== t.length || 'string' != typeof t[0])1831 throw new Error('"has-text" engine expects a single string')1832 return !y(e) && d(t[0])(v(r, e))1833 }1834 }1835 function d(e) {1836 return (1837 (e = e.trim().replace(/\s+/g, ' ').toLowerCase()),1838 (t) => t.full.trim().replace(/\s+/g, ' ').toLowerCase().includes(e)1839 )1840 }1841 function m(e) {1842 return (1843 (e = e.trim().replace(/\s+/g, ' ')),1844 (t) =>1845 (!e && !t.immediate.length) ||1846 t.immediate.some((t) => t.trim().replace(/\s+/g, ' ') === e)1847 )1848 }1849 function g(e, t) {1850 const n = new RegExp(e, t)1851 return (e) => n.test(e.full)1852 }1853 function y(e) {1854 return (1855 'SCRIPT' === e.nodeName ||1856 'STYLE' === e.nodeName ||1857 (document.head && document.head.contains(e))1858 )1859 }1860 function v(e, t) {1861 let n = e._cacheText.get(t)1862 if (void 0 === n) {1863 if (((n = { full: '', immediate: [] }), !y(t))) {1864 let r = ''1865 if (1866 t instanceof HTMLInputElement &&1867 ('submit' === t.type || 'button' === t.type)1868 )1869 n = { full: t.value, immediate: [t.value] }1870 else {1871 for (let o = t.firstChild; o; o = o.nextSibling)1872 o.nodeType === Node.TEXT_NODE1873 ? ((n.full += o.nodeValue || ''), (r += o.nodeValue || ''))1874 : (r && n.immediate.push(r),1875 (r = ''),1876 o.nodeType === Node.ELEMENT_NODE &&1877 (n.full += v(e, o).full))1878 r && n.immediate.push(r),1879 t.shadowRoot && (n.full += v(e, t.shadowRoot).full)1880 }1881 }1882 e._cacheText.set(t, n)1883 }1884 return n1885 }1886 function w(e, t, n) {1887 if (y(t)) return 'none'1888 if (!n(v(e, t))) return 'none'1889 for (let r = t.firstChild; r; r = r.nextSibling)1890 if (r.nodeType === Node.ELEMENT_NODE && n(v(e, r)))1891 return 'selfAndChildren'1892 return t.shadowRoot && n(v(e, t.shadowRoot))1893 ? 'selfAndChildren'1894 : 'self'1895 }1896 function b(e, t, n) {1897 const r = e.left - t.right1898 if (!(r < 0 || (void 0 !== n && r > n)))1899 return (1900 r + Math.max(t.bottom - e.bottom, 0) + Math.max(e.top - t.top, 0)1901 )1902 }1903 function E(e, t, n) {1904 const r = t.left - e.right1905 if (!(r < 0 || (void 0 !== n && r > n)))1906 return (1907 r + Math.max(t.bottom - e.bottom, 0) + Math.max(e.top - t.top, 0)1908 )1909 }1910 function _(e, t, n) {1911 const r = t.top - e.bottom1912 if (!(r < 0 || (void 0 !== n && r > n)))1913 return (1914 r + Math.max(e.left - t.left, 0) + Math.max(t.right - e.right, 0)1915 )1916 }1917 function S(e, t, n) {1918 const r = e.top - t.bottom1919 if (!(r < 0 || (void 0 !== n && r > n)))1920 return (1921 r + Math.max(e.left - t.left, 0) + Math.max(t.right - e.right, 0)1922 )1923 }1924 function T(e, t, n) {1925 const r = void 0 === n ? 50 : n1926 let o = 01927 return (1928 e.left - t.right >= 0 && (o += e.left - t.right),1929 t.left - e.right >= 0 && (o += t.left - e.right),1930 t.top - e.bottom >= 0 && (o += t.top - e.bottom),1931 e.top - t.bottom >= 0 && (o += e.top - t.bottom),1932 o > r ? void 0 : o1933 )1934 }1935 function k(e, t) {1936 return {1937 matches(n, r, o, i) {1938 const s =1939 r.length && 'number' == typeof r[r.length - 1]1940 ? r[r.length - 1]1941 : void 0,1942 c = void 0 === s ? r : r.slice(0, r.length - 1)1943 if (r.length < 1 + (void 0 === s ? 0 : 1))1944 throw new Error(1945 `"${e}" engine expects a selector list and optional maximum distance in pixels`1946 )1947 const a = n.getBoundingClientRect()1948 let u1949 for (const e of i.query(o, c)) {1950 if (e === n) continue1951 const r = t(a, e.getBoundingClientRect(), s)1952 void 0 !== r && (void 0 === u || r < u) && (u = r)1953 }1954 return void 0 !== u && (i._markScore(n, u), !0)1955 }1956 }1957 }1958 const N = {1959 query(e, t, n) {1960 let r = t[t.length - 1]1961 if (t.length < 2)1962 throw new Error(1963 '"nth-match" engine expects non-empty selector list and an index argument'1964 )1965 if ('number' != typeof r || r < 1)1966 throw new Error(1967 '"nth-match" engine expects a one-based index as the last argument'1968 )1969 const i = o.query(e, t.slice(0, t.length - 1), n)1970 return r--, r < i.length ? [i[r]] : []1971 }1972 }1973 function x(e) {1974 return e.parentElement1975 ? e.parentElement1976 : e.parentNode &&1977 e.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&1978 e.parentNode.host1979 ? e.parentNode.host1980 : void 01981 }1982 function C(e, t) {1983 if (e !== t.scope)1984 return t.pierceShadow ? x(e) : e.parentElement || void 01985 }1986 function A(e, t) {1987 if (e !== t.scope) return e.previousElementSibling || void 01988 }1989 function O(e) {1990 if (!e.ownerDocument || !e.ownerDocument.defaultView) return !01991 const t = e.ownerDocument.defaultView.getComputedStyle(e)1992 if (!t || 'hidden' === t.visibility) return !11993 const n = e.getBoundingClientRect()1994 return n.width > 0 && n.height > 01995 }1996 },1997 854: (e, t, n) => {1998 Object.defineProperty(t, '__esModule', { value: !0 }),1999 (t.querySelector = function (e, t, n) {2000 try {2001 const r = e.parseSelector(t)2002 return { selector: t, elements: e.querySelectorAll(r, n) }2003 } catch (e) {2004 return { selector: t, elements: [] }2005 }2006 }),2007 (t.generateSelector = function (e, t) {2008 e._evaluator.begin()2009 try {2010 const n = (function (e, t) {2011 if (t.ownerDocument.documentElement === t)2012 return [{ engine: 'css', selector: 'html', score: 1 }]2013 const n = (u, h) => {2014 const d = h ? o : i2015 let m = d.get(u)2016 return (2017 void 0 === m &&2018 ((m = ((o, i) => {2019 const u = o === t2020 let h = i2021 ? (function (e, t, n) {2022 if ('SELECT' === t.nodeName) return []2023 const o = (0, r.elementText)(e._evaluator, t)2024 .full.trim()2025 .replace(/\s+/g, ' ')2026 .substring(0, 80)2027 if (!o) return []2028 const i = []2029 let s = o2030 if (2031 ((o.includes('"') ||2032 o.includes('>>') ||2033 '/' === o[0]) &&2034 (s = `/.*${(function (e) {2035 return e.replace(2036 /[.*+?^>${}()|[\]\\]/g,2037 '\\$&'2038 )2039 })(o)}.*/`),2040 i.push({2041 engine: 'text',2042 selector: s,2043 score: 102044 }),2045 n && s === o)2046 ) {2047 let e = t.nodeName.toLocaleLowerCase()2048 t.hasAttribute('role') &&2049 (e += `[role=${l(2050 t.getAttribute('role')2051 )}]`),2052 i.push({2053 engine: 'css',2054 selector: `${e}:has-text("${o}")`,2055 score: 302056 })2057 }2058 return i2059 })(e, o, o === t).map((e) => [e])2060 : []2061 o !== t && (h = s(h))2062 const d = (function (e, t) {2063 const n = []2064 for (const e of [2065 'data-testid',2066 'data-test-id',2067 'data-test'2068 ])2069 t.hasAttribute(e) &&2070 n.push({2071 engine: 'css',2072 selector: `[${e}=${l(t.getAttribute(e))}]`,2073 score: 12074 })2075 if ('INPUT' === t.nodeName) {2076 const e = t2077 e.placeholder &&2078 n.push({2079 engine: 'css',2080 selector: `[placeholder=${l(e.placeholder)}]`,2081 score: 102082 })2083 }2084 t.hasAttribute('aria-label') &&2085 n.push({2086 engine: 'css',2087 selector: `[aria-label=${l(2088 t.getAttribute('aria-label')2089 )}]`,2090 score: 102091 }),2092 t.getAttribute('alt') &&2093 ['APPLET', 'AREA', 'IMG', 'INPUT'].includes(2094 t.nodeName2095 ) &&2096 n.push({2097 engine: 'css',2098 selector: `${t.nodeName.toLowerCase()}[alt=${l(2099 t.getAttribute('alt')2100 )}]`,2101 score: 102102 }),2103 t.hasAttribute('role') &&2104 n.push({2105 engine: 'css',2106 selector: `${t.nodeName.toLocaleLowerCase()}[role=${l(2107 t.getAttribute('role')2108 )}]`,2109 score: 502110 }),2111 t.getAttribute('name') &&2112 [2113 'BUTTON',2114 'FORM',2115 'FIELDSET',2116 'IFRAME',2117 'INPUT',2118 'KEYGEN',2119 'OBJECT',2120 'OUTPUT',2121 'SELECT',2122 'TEXTAREA',2123 'MAP',2124 'META',2125 'PARAM'2126 ].includes(t.nodeName) &&2127 n.push({2128 engine: 'css',2129 selector: `${t.nodeName.toLowerCase()}[name=${l(2130 t.getAttribute('name')2131 )}]`,2132 score: 502133 }),2134 ['INPUT', 'TEXTAREA'].includes(t.nodeName) &&2135 'hidden' !== t.getAttribute('type') &&2136 t.getAttribute('type') &&2137 n.push({2138 engine: 'css',2139 selector: `${t.nodeName.toLowerCase()}[type=${l(2140 t.getAttribute('type')2141 )}]`,2142 score: 502143 }),2144 ['INPUT', 'TEXTAREA', 'SELECT'].includes(2145 t.nodeName2146 ) &&2147 n.push({2148 engine: 'css',2149 selector: t.nodeName.toLowerCase(),2150 score: 502151 })2152 const r = t.getAttribute('id')2153 return (2154 r &&2155 !(function (e) {2156 let t,2157 n = 02158 for (let r = 0; r < e.length; ++r) {2159 const o = e[r]2160 let i2161 '-' !== o &&2162 '_' !== o &&2163 ((i =2164 o >= 'a' && o <= 'z'2165 ? 'lower'2166 : o >= 'A' && o <= 'Z'2167 ? 'upper'2168 : o >= '0' && o <= '9'2169 ? 'digit'2170 : 'other'),2171 'lower' !== i || 'upper' !== t2172 ? (t && t !== i && ++n, (t = i))2173 : (t = i))2174 }2175 return n >= e.length / 42176 })(r) &&2177 n.push({2178 engine: 'css',2179 selector: a(r),2180 score: 1002181 }),2182 n.push({2183 engine: 'css',2184 selector: t.nodeName.toLocaleLowerCase(),2185 score: 2002186 }),2187 n2188 )2189 })(0, o).map((e) => [e])2190 let m = f(e, t.ownerDocument, o, [...h, ...d], u)2191 h = s(h)2192 const g = (t) => {2193 const r = i && !t.length,2194 s = [...t, ...d].filter((e) => !m || p(e) < p(m))2195 let a = s[0]2196 if (a)2197 for (let t = c(o); t; t = c(t)) {2198 const i = n(t, r)2199 if (!i) continue2200 if (m && p([...i, ...a]) >= p(m)) continue2201 if (((a = f(e, t, o, s, u)), !a)) return2202 const c = [...i, ...a]2203 ;(!m || p(c) < p(m)) && (m = c)2204 }2205 }2206 return g(h), o === t && h.length && g([]), m2207 })(u, h)),2208 d.set(u, m)),2209 m2210 )2211 }2212 return n(t, !0)2213 })(2214 e,2215 (t =2216 t.closest(2217 'button,select,input,[role=button],[role=checkbox],[role=radio]'2218 ) || t)2219 ),2220 d = h(n || [u(e, t)]),2221 m = e.parseSelector(d)2222 return {2223 selector: d,2224 elements: e.querySelectorAll(m, t.ownerDocument)2225 }2226 } finally {2227 o.clear(), i.clear(), e._evaluator.end()2228 }2229 })2230 var r = n(848)2231 const o = new Map(),2232 i = new Map()2233 function s(e) {2234 return e.filter((e) => '/' !== e[0].selector[0])2235 }2236 function c(e) {2237 return e.parentElement2238 ? e.parentElement2239 : e.parentNode &&2240 e.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&2241 e.parentNode.host2242 ? e.parentNode.host2243 : null2244 }2245 function a(e) {2246 return /^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(e) ? '#' + e : `[id="${e}"]`2247 }2248 function u(e, t) {2249 const n = 1e7,2250 r = t.ownerDocument,2251 o = []2252 function i(n) {2253 const r = o.slice()2254 n && r.unshift(n)2255 const i = r.join(' '),2256 s = e.parseSelector(i)2257 return e.querySelector(s, t.ownerDocument, !1) === t ? i : void 02258 }2259 for (let e = t; e && e !== r; e = c(e)) {2260 const t = e.nodeName.toLowerCase()2261 let r = ''2262 if (e.id) {2263 const t = a(e.id),2264 o = i(t)2265 if (o) return { engine: 'css', selector: o, score: n }2266 r = t2267 }2268 const s = e.parentNode,2269 c = [...e.classList]2270 for (let e = 0; e < c.length; ++e) {2271 const t = '.' + c.slice(0, e + 1).join('.'),2272 o = i(t)2273 if (o) return { engine: 'css', selector: o, score: n }2274 !r && s && 1 === s.querySelectorAll(t).length && (r = t)2275 }2276 if (s) {2277 const o = [...s.children],2278 c =2279 0 ===2280 o.filter((e) => e.nodeName.toLowerCase() === t).indexOf(e)2281 ? t2282 : `${t}:nth-child(${1 + o.indexOf(e)})`,2283 a = i(c)2284 if (a) return { engine: 'css', selector: a, score: n }2285 r || (r = c)2286 } else r || (r = t)2287 o.unshift(r)2288 }2289 return { engine: 'css', selector: i(), score: n }2290 }2291 function l(e) {2292 return `"${e.replace(/"/g, '\\"').replace(/\n/g, '\\n')}"`2293 }2294 function h(e) {2295 const t = []2296 let n = ''2297 for (const { engine: r, selector: o } of e)2298 t.length &&2299 ('css' !== n || 'css' !== r || o.startsWith(':nth-match(')) &&2300 t.push('>>'),2301 (n = r),2302 'css' === r ? t.push(o) : t.push(`${r}=${o}`)2303 return t.join(' ')2304 }2305 function p(e) {2306 let t = 02307 for (let n = 0; n < e.length; n++) t += e[n].score * (e.length - n)2308 return t2309 }2310 function f(e, t, n, r, o) {2311 const i = r.map((e) => ({ tokens: e, score: p(e) }))2312 i.sort((e, t) => e.score - t.score)2313 let s = null2314 for (const { tokens: r } of i) {2315 const i = e.parseSelector(h(r)),2316 c = e.querySelectorAll(i, t),2317 a = c.indexOf(n)2318 if (0 === a) return r2319 if (!o || s || -1 === a || c.length > 5) continue2320 const u = r.map((e) =>2321 'text' !== e.engine2322 ? e2323 : e.selector.startsWith('/') && e.selector.endsWith('/')2324 ? {2325 engine: 'css',2326 selector: `:text-matches("${e.selector.substring(2327 1,2328 e.selector.length - 12329 )}")`,2330 score: e.score2331 }2332 : {2333 engine: 'css',2334 selector: `:text("${e.selector}")`,2335 score: e.score2336 }2337 )2338 s = [2339 {2340 engine: 'css',2341 selector: `:nth-match(${h(u)}, ${a + 1})`,2342 score: p(u) + 1e32343 }2344 ]2345 }2346 return s2347 }2348 },2349 12: (e, t, n) => {2350 Object.defineProperty(t, '__esModule', { value: !0 }),2351 (t.VueEngine = void 0)2352 var r = n(204)2353 function o(e, t) {2354 const n = e.replace(/^[a-zA-Z]:/, '').replace(/\\/g, '/')2355 let r = n.substring(n.lastIndexOf('/') + 1)2356 return (2357 t && r.endsWith(t) && (r = r.substring(0, r.length - t.length)), r2358 )2359 }2360 function i(e, t) {2361 return t ? t.toUpperCase() : ''2362 }2363 const s = /(?:^|[-_/])(\w)/g,2364 c = (e) => e && e.replace(s, i)2365 function a(e, t, n = []) {2366 t(e) && n.push(e)2367 for (const r of e.children) a(r, t, n)2368 return n2369 }2370 const u = {2371 queryAll(e, t) {2372 const { name: n, attributes: i } = (0, r.parseComponentSelector)(t),2373 s = (function () {2374 const e = []2375 for (const t of document.querySelectorAll('[data-v-app]'))2376 t._vnode &&2377 t._vnode.component &&2378 e.push({ root: t._vnode.component, version: 3 })2379 const t = document.createTreeWalker(2380 document,2381 NodeFilter.SHOW_ELEMENT2382 ),2383 n = new Set()2384 for (; t.nextNode(); ) {2385 const e = t.currentNode2386 e && e.__vue__ && n.add(e.__vue__.$root)2387 }2388 for (const t of n) e.push({ version: 2, root: t })2389 return e2390 })()2391 .map((e) =>2392 3 === e.version2393 ? (function (e) {2394 function t(e, t) {2395 return (e.type.__playwright_guessedName = t), t2396 }2397 function n(e) {2398 const n = (function (e) {2399 const t =2400 e.name ||2401 e._componentTag ||2402 e.__playwright_guessedName2403 if (t) return t2404 const n = e.__file2405 return n ? c(o(n, '.vue')) : void 02406 })(e.type || {})2407 if (n) return n2408 if (e.root === e) return 'Root'2409 for (const n in null === (r = e.parent) ||2410 void 0 === r ||2411 null === (i = r.type) ||2412 void 0 === i2413 ? void 02414 : i.components) {2415 var r, i, s2416 if (2417 (null === (s = e.parent) || void 0 === s2418 ? void 02419 : s.type.components[n]) === e.type2420 )2421 return t(e, n)2422 }2423 for (const n in null === (a = e.appContext) ||2424 void 0 === a2425 ? void 02426 : a.components) {2427 var a2428 if (e.appContext.components[n] === e.type)2429 return t(e, n)2430 }2431 return 'Anonymous Component'2432 }2433 function r(e) {2434 const t = []2435 return (2436 e.component && t.push(e.component),2437 e.suspense && t.push(...r(e.suspense.activeBranch)),2438 Array.isArray(e.children) &&2439 e.children.forEach((e) => {2440 e.component2441 ? t.push(e.component)2442 : t.push(...r(e))2443 }),2444 t.filter((e) => {2445 var t2446 return !(2447 (function (e) {2448 return e._isBeingDestroyed || e.isUnmounted2449 })(e) ||2450 (null !== (t = e.type.devtools) &&2451 void 0 !== t &&2452 t.hide)2453 )2454 })2455 )2456 }2457 function i(e) {2458 return (function (e) {2459 return (2460 'Symbol(Fragment)' === e.subTree.type.toString()2461 )2462 })(e)2463 ? (function (e) {2464 if (!e.children) return []2465 const t = []2466 for (2467 let n = 0, r = e.children.length;2468 n < r;2469 n++2470 ) {2471 const r = e.children[n]2472 r.component2473 ? t.push(...i(r.component))2474 : r.el && t.push(r.el)2475 }2476 return t2477 })(e.subTree)2478 : [e.subTree.el]2479 }2480 return (function e(t) {2481 return {2482 name: n(t),2483 children: r(t.subTree).map(e),2484 rootElements: i(t),2485 props: t.props2486 }2487 })(e)2488 })(e.root)2489 : (function (e) {2490 function t(e) {2491 return (2492 (function (e) {2493 const t =2494 e.displayName || e.name || e._componentTag2495 if (t) return t2496 const n = e.__file2497 return n ? c(o(n, '.vue')) : void 02498 })(e.$options || e.fnOptions || {}) ||2499 (e.$root === e ? 'Root' : 'Anonymous Component')2500 )2501 }2502 function n(e) {2503 return e.$children2504 ? e.$children2505 : Array.isArray(e.subTree.children)2506 ? e.subTree.children2507 .filter((e) => !!e.component)2508 .map((e) => e.component)2509 : []2510 }2511 return (function e(r) {2512 return {2513 name: t(r),2514 children: n(r).map(e),2515 rootElements: [r.$el],2516 props: r._props2517 }2518 })(e)2519 })(e.root)2520 )2521 .map((t) =>2522 a(t, (t) => {2523 if (n && t.name !== n) return !12524 if (t.rootElements.some((t) => !e.contains(t))) return !12525 for (const e of i)2526 if (!(0, r.checkComponentAttribute)(t.props, e)) return !12527 return !02528 })2529 )2530 .flat(),2531 u = new Set()2532 for (const e of s) for (const t of e.rootElements) u.add(t)2533 return [...u]2534 }2535 }2536 t.VueEngine = u2537 },2538 530: (e, t) => {2539 Object.defineProperty(t, '__esModule', { value: !0 }),2540 (t.XPathEngine = void 0)2541 const n = {2542 queryAll(e, t) {2543 t.startsWith('/') && (t = '.' + t)2544 const n = [],2545 r = e instanceof Document ? e : e.ownerDocument2546 if (!r) return n2547 const o = r.evaluate(2548 t,2549 e,2550 null,2551 XPathResult.ORDERED_NODE_ITERATOR_TYPE2552 )2553 for (let e = o.iterateNext(); e; e = o.iterateNext())2554 e.nodeType === Node.ELEMENT_NODE && n.push(e)2555 return n2556 }2557 }2558 t.XPathEngine = n2559 }2560 },2561 t = {}2562 function n(r) {2563 var o = t[r]2564 if (void 0 !== o) return o.exports2565 var i = (t[r] = { exports: {} })2566 return e[r](i, i.exports, n), i.exports2567 }2568 n.g = (function () {2569 if ('object' == typeof globalThis) return globalThis2570 try {2571 return this || new Function('return this')()2572 } catch (e) {2573 if ('object' == typeof window) return window2574 }2575 })()2576 var r = {}2577 ;(() => {2578 var e = r2579 e.default = void 02580 var t = n(530),2581 o = n(836),2582 i = n(12),2583 s = n(461),2584 c = n(848),2585 a = n(854)2586 const u = new Set([2587 'AREA',2588 'BASE',2589 'BR',2590 'COL',2591 'COMMAND',2592 'EMBED',2593 'HR',2594 'IMG',2595 'INPUT',2596 'KEYGEN',2597 'LINK',2598 'MENUITEM',2599 'META',2600 'PARAM',2601 'SOURCE',2602 'TRACK',2603 'WBR'2604 ]),2605 l = new Set(['checked', 'selected', 'disabled', 'readonly', 'multiple'])2606 function h(e) {2607 return e.replace(/\n/g, '↵').replace(/\t/g, '⇆')2608 }2609 const p = new Map([2610 ['auxclick', 'mouse'],2611 ['click', 'mouse'],2612 ['dblclick', 'mouse'],2613 ['mousedown', 'mouse'],2614 ['mouseeenter', 'mouse'],2615 ['mouseleave', 'mouse'],2616 ['mousemove', 'mouse'],2617 ['mouseout', 'mouse'],2618 ['mouseover', 'mouse'],2619 ['mouseup', 'mouse'],2620 ['mouseleave', 'mouse'],2621 ['mousewheel', 'mouse'],2622 ['keydown', 'keyboard'],2623 ['keyup', 'keyboard'],2624 ['keypress', 'keyboard'],2625 ['textInput', 'keyboard'],2626 ['touchstart', 'touch'],2627 ['touchmove', 'touch'],2628 ['touchend', 'touch'],2629 ['touchcancel', 'touch'],2630 ['pointerover', 'pointer'],2631 ['pointerout', 'pointer'],2632 ['pointerenter', 'pointer'],2633 ['pointerleave', 'pointer'],2634 ['pointerdown', 'pointer'],2635 ['pointerup', 'pointer'],2636 ['pointermove', 'pointer'],2637 ['pointercancel', 'pointer'],2638 ['gotpointercapture', 'pointer'],2639 ['lostpointercapture', 'pointer'],2640 ['focus', 'focus'],2641 ['blur', 'focus'],2642 ['drag', 'drag'],2643 ['dragstart', 'drag'],2644 ['dragend', 'drag'],2645 ['dragover', 'drag'],2646 ['dragenter', 'drag'],2647 ['dragleave', 'drag'],2648 ['dragexit', 'drag'],2649 ['drop', 'drag']2650 ])2651 function f(e) {2652 if (!e.includes('\\')) return e2653 const t = []2654 let n = 02655 for (; n < e.length; )2656 '\\' === e[n] && n + 1 < e.length && n++, t.push(e[n++])2657 return t.join('')2658 }2659 class d {2660 constructor(e) {2661 ;(this._string = void 0),2662 (this._substring = void 0),2663 (this._regex = void 0),2664 (this._normalizeWhiteSpace = void 0),2665 (this._normalizeWhiteSpace = e.normalizeWhiteSpace),2666 (this._string = e.matchSubstring2667 ? void 02668 : this.normalizeWhiteSpace(e.string)),2669 (this._substring = e.matchSubstring2670 ? this.normalizeWhiteSpace(e.string)2671 : void 0),2672 (this._regex = e.regexSource2673 ? new RegExp(e.regexSource, e.regexFlags)2674 : void 0)2675 }2676 matches(e) {2677 return (2678 this._normalizeWhiteSpace &&2679 !this._regex &&2680 (e = this.normalizeWhiteSpace(e)),2681 void 0 !== this._string2682 ? e === this._string2683 : void 0 !== this._substring2684 ? e.includes(this._substring)2685 : !!this._regex && !!this._regex.test(e)2686 )2687 }2688 normalizeWhiteSpace(e) {2689 return e && this._normalizeWhiteSpace2690 ? e.trim().replace(/\s+/g, ' ')2691 : e2692 }2693 }2694 function m(e, t) {2695 if (e === t) return !02696 if (e && t && 'object' == typeof e && 'object' == typeof t) {2697 if (e.constructor !== t.constructor) return !12698 if (Array.isArray(e)) {2699 if (e.length !== t.length) return !12700 for (let n = 0; n < e.length; ++n) if (!m(e[n], t[n])) return !12701 return !02702 }2703 if (e instanceof RegExp)2704 return e.source === t.source && e.flags === t.flags2705 if (e.valueOf !== Object.prototype.valueOf)2706 return e.valueOf() === t.valueOf()2707 if (e.toString !== Object.prototype.toString)2708 return e.toString() === t.toString()2709 const n = Object.keys(e)2710 if (n.length !== Object.keys(t).length) return !12711 for (let e = 0; e < n.length; ++e)2712 if (!t.hasOwnProperty(n[e])) return !12713 for (const r of n) if (!m(e[r], t[r])) return !12714 return !02715 }2716 return (2717 'number' == typeof e && 'number' == typeof t && isNaN(e) && isNaN(t)2718 )2719 }2720 var g = class {2721 constructor(e, n, r) {2722 ;(this._engines = void 0),2723 (this._evaluator = void 0),2724 (this._stableRafCount = void 0),2725 (this._browserName = void 0),2726 (this.onGlobalListenersRemoved = new Set()),2727 (this._evaluator = new c.SelectorEvaluatorImpl(new Map())),2728 (this._engines = new Map()),2729 this._engines.set('xpath', t.XPathEngine),2730 this._engines.set('xpath:light', t.XPathEngine),2731 this._engines.set('_react', o.ReactEngine),2732 this._engines.set('_vue', i.VueEngine),2733 this._engines.set('text', this._createTextEngine(!0)),2734 this._engines.set('text:light', this._createTextEngine(!1)),2735 this._engines.set('id', this._createAttributeEngine('id', !0)),2736 this._engines.set('id:light', this._createAttributeEngine('id', !1)),2737 this._engines.set(2738 'data-testid',2739 this._createAttributeEngine('data-testid', !0)2740 ),2741 this._engines.set(2742 'data-testid:light',2743 this._createAttributeEngine('data-testid', !1)2744 ),2745 this._engines.set(2746 'data-test-id',2747 this._createAttributeEngine('data-test-id', !0)2748 ),2749 this._engines.set(2750 'data-test-id:light',2751 this._createAttributeEngine('data-test-id', !1)2752 ),2753 this._engines.set(2754 'data-test',2755 this._createAttributeEngine('data-test', !0)2756 ),2757 this._engines.set(2758 'data-test:light',2759 this._createAttributeEngine('data-test', !1)2760 ),2761 this._engines.set('css', this._createCSSEngine()),2762 this._engines.set('nth', { queryAll: () => [] }),2763 this._engines.set('visible', { queryAll: () => [] })2764 for (const { name: e, engine: t } of r) this._engines.set(e, t)2765 ;(this._stableRafCount = e),2766 (this._browserName = n),2767 this._setupGlobalListenersRemovalDetection()2768 }2769 eval(e) {2770 return n.g.eval(e)2771 }2772 parseSelector(e) {2773 const t = (0, s.parseSelector)(e)2774 for (const n of t.parts)2775 if (!this._engines.has(n.name))2776 throw this.createStacklessError(2777 `Unknown engine "${n.name}" while parsing selector ${e}`2778 )2779 return t2780 }2781 querySelector(e, t, n) {2782 if (!t.querySelector)2783 throw this.createStacklessError('Node is not queryable.')2784 this._evaluator.begin()2785 try {2786 var r, o2787 const i = this._querySelectorRecursively(2788 [{ element: t, capture: void 0 }],2789 e,2790 0,2791 new Map()2792 )2793 if (n && i.length > 1)2794 throw this.strictModeViolationError(2795 e,2796 i.map((e) => e.element)2797 )2798 return (2799 (null === (r = i[0]) || void 0 === r ? void 0 : r.capture) ||2800 (null === (o = i[0]) || void 0 === o ? void 0 : o.element)2801 )2802 } finally {2803 this._evaluator.end()2804 }2805 }2806 _querySelectorRecursively(e, t, n, r) {2807 if (n === t.parts.length) return e2808 const o = t.parts[n]2809 if ('nth' === o.name) {2810 let i = []2811 if ('0' === o.body) i = e.slice(0, 1)2812 else if ('-1' === o.body) e.length && (i = e.slice(e.length - 1))2813 else {2814 if ('number' == typeof t.capture)2815 throw this.createStacklessError(2816 "Can't query n-th element in a request with the capture."2817 )2818 const n = +o.body,2819 r = new Set()2820 for (const t of e) r.add(t.element), n + 1 === r.size && (i = [t])2821 }2822 return this._querySelectorRecursively(i, t, n + 1, r)2823 }2824 if ('visible' === o.name) {2825 const i = Boolean(o.body),2826 s = e.filter((e) => i === (0, c.isVisible)(e.element))2827 return this._querySelectorRecursively(s, t, n + 1, r)2828 }2829 const i = []2830 for (const o of e) {2831 const e = n - 1 === t.capture ? o.element : o.capture2832 let s = r.get(o.element)2833 s || ((s = []), r.set(o.element, s))2834 let c = s[n]2835 c || ((c = this._queryEngineAll(t.parts[n], o.element)), (s[n] = c))2836 for (const t of c) {2837 if (!('nodeName' in t))2838 throw this.createStacklessError(2839 `Expected a Node but got ${Object.prototype.toString.call(t)}`2840 )2841 i.push({ element: t, capture: e })2842 }2843 }2844 return this._querySelectorRecursively(i, t, n + 1, r)2845 }2846 querySelectorAll(e, t) {2847 if (!t.querySelectorAll)2848 throw this.createStacklessError('Node is not queryable.')2849 this._evaluator.begin()2850 try {2851 const n = this._querySelectorRecursively(2852 [{ element: t, capture: void 0 }],2853 e,2854 0,2855 new Map()2856 ),2857 r = new Set()2858 for (const e of n) r.add(e.capture || e.element)2859 return [...r]2860 } finally {2861 this._evaluator.end()2862 }2863 }2864 _queryEngineAll(e, t) {2865 return this._engines.get(e.name).queryAll(t, e.body)2866 }2867 _createAttributeEngine(e, t) {2868 return {2869 queryAll: (n, r) =>2870 this._evaluator.query(2871 { scope: n, pierceShadow: t },2872 ((t) => [2873 {2874 simples: [2875 {2876 selector: {2877 css: `[${e}=${JSON.stringify(t)}]`,2878 functions: []2879 },2880 combinator: ''2881 }2882 ]2883 }2884 ])(r)2885 )2886 }2887 }2888 _createCSSEngine() {2889 const e = this._evaluator2890 return {2891 queryAll: (t, n) => e.query({ scope: t, pierceShadow: !0 }, n)2892 }2893 }2894 _createTextEngine(e) {2895 const t = (t, n) => {2896 const { matcher: r, kind: o } = (function (e) {2897 if ('/' === e[0] && e.lastIndexOf('/') > 0) {2898 const t = e.lastIndexOf('/')2899 return {2900 matcher: (0, c.createRegexTextMatcher)(2901 e.substring(1, t),2902 e.substring(t + 1)2903 ),2904 kind: 'regex'2905 }2906 }2907 let t = !12908 return (2909 e.length > 1 &&2910 '"' === e[0] &&2911 '"' === e[e.length - 1] &&2912 ((e = f(e.substring(1, e.length - 1))), (t = !0)),2913 e.length > 1 &&2914 "'" === e[0] &&2915 "'" === e[e.length - 1] &&2916 ((e = f(e.substring(1, e.length - 1))), (t = !0)),2917 {2918 matcher: t2919 ? (0, c.createStrictTextMatcher)(e)2920 : (0, c.createLaxTextMatcher)(e),2921 kind: t ? 'strict' : 'lax'2922 }2923 )2924 })(n),2925 i = []2926 let s = null2927 const a = (e) => {2928 if ('lax' === o && s && s.contains(e)) return !12929 const t = (0, c.elementMatchesText)(this._evaluator, e, r)2930 'none' === t && (s = e),2931 ('self' === t || ('selfAndChildren' === t && 'strict' === o)) &&2932 i.push(e)2933 }2934 t.nodeType === Node.ELEMENT_NODE && a(t)2935 const u = this._evaluator._queryCSS(2936 { scope: t, pierceShadow: e },2937 '*'2938 )2939 for (const e of u) a(e)2940 return i2941 }2942 return { queryAll: (e, n) => t(e, n) }2943 }2944 extend(e, t) {2945 return new (n.g.eval(2946 `\n (() => {\n ${e}\n return pwExport;\n })()`2947 ))(this, t)2948 }2949 isVisible(e) {2950 return (0, c.isVisible)(e)2951 }2952 pollRaf(e) {2953 return this.poll(e, (e) => requestAnimationFrame(e))2954 }2955 pollInterval(e, t) {2956 return this.poll(t, (t) => setTimeout(t, e))2957 }2958 pollLogScale(e) {2959 const t = [100, 250, 500]2960 let n = 02961 return this.poll(e, (e) => setTimeout(e, t[n++] || 1e3))2962 }2963 poll(e, t) {2964 return this._runAbortableTask((n) => {2965 let r, o2966 const i = new Promise((e, t) => {2967 ;(r = e), (o = t)2968 }),2969 s = () => {2970 if (!n.aborted)2971 try {2972 const o = e(n)2973 o !== n.continuePolling ? r(o) : t(s)2974 } catch (e) {2975 n.log(' ' + e.message), o(e)2976 }2977 }2978 return s(), i2979 })2980 }2981 _runAbortableTask(e) {2982 let t,2983 n = [],2984 r = !12985 const o = () => {2986 t && (t(n), (n = []), (t = void 0))2987 }2988 let i,2989 s = ''2990 const c = {2991 injectedScript: this,2992 aborted: !1,2993 continuePolling: Symbol('continuePolling'),2994 log: (e) => {2995 ;(s = e), n.push({ message: e }), o()2996 },2997 logRepeating: (e) => {2998 e !== s && c.log(e)2999 },3000 setIntermediateResult: (e) => {3001 i !== e && ((i = e), n.push({ intermediateResult: e }), o())3002 }3003 }3004 return {3005 takeNextLogs: () =>3006 new Promise((e) => {3007 ;(t = e), (n.length || r) && o()3008 }),3009 run: () => {3010 const t = e(c)3011 return (3012 t.finally(() => {3013 ;(r = !0), o()3014 }),3015 t3016 )3017 },3018 cancel: () => {3019 c.aborted = !03020 },3021 takeLastLogs: () => n3022 }3023 }3024 getElementBorderWidth(e) {3025 if (3026 e.nodeType !== Node.ELEMENT_NODE ||3027 !e.ownerDocument ||3028 !e.ownerDocument.defaultView3029 )3030 return { left: 0, top: 0 }3031 const t = e.ownerDocument.defaultView.getComputedStyle(e)3032 return {3033 left: parseInt(t.borderLeftWidth || '', 10),3034 top: parseInt(t.borderTopWidth || '', 10)3035 }3036 }3037 retarget(e, t) {3038 let n = e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement3039 return n3040 ? (n.matches('input, textarea, select') ||3041 (n =3042 n.closest(3043 'button, [role=button], [role=checkbox], [role=radio]'3044 ) || n),3045 'follow-label' === t &&3046 (n.matches(3047 'input, textarea, button, select, [role=button], [role=checkbox], [role=radio]'3048 ) ||3049 n.isContentEditable ||3050 (n = n.closest('label') || n),3051 'LABEL' === n.nodeName && (n = n.control || n)),3052 n)3053 : null3054 }3055 waitForElementStatesAndPerformAction(e, t, n, r) {3056 let o,3057 i = 0,3058 s = 0,3059 c = 03060 return this.pollRaf((a) => {3061 if (n) return a.log(' forcing action'), r(e, a)3062 for (const n of t) {3063 if ('stable' !== n) {3064 const t = this.elementState(e, n)3065 if ('boolean' != typeof t) return t3066 if (!t)3067 return (3068 a.logRepeating(` element is not ${n} - waiting...`),3069 a.continuePolling3070 )3071 continue3072 }3073 const t = this.retarget(e, 'no-follow-label')3074 if (!t) return 'error:notconnected'3075 if (1 == ++i) return a.continuePolling3076 const r = performance.now()3077 if (this._stableRafCount > 1 && r - c < 15) return a.continuePolling3078 c = r3079 const u = t.getBoundingClientRect(),3080 l = { x: u.top, y: u.left, width: u.width, height: u.height }3081 o &&3082 l.x === o.x &&3083 l.y === o.y &&3084 l.width === o.width &&3085 l.height === o.height3086 ? ++s3087 : (s = 0)3088 const h = s >= this._stableRafCount,3089 p = h || !o3090 if (3091 ((o = l),3092 p || a.logRepeating(' element is not stable - waiting...'),3093 !h)3094 )3095 return a.continuePolling3096 }3097 return r(e, a)3098 })3099 }3100 elementState(e, t) {3101 const n = this.retarget(3102 e,3103 ['stable', 'visible', 'hidden'].includes(t)3104 ? 'no-follow-label'3105 : 'follow-label'3106 )3107 if (!n || !n.isConnected) return 'hidden' === t || 'error:notconnected'3108 if ('visible' === t) return this.isVisible(n)3109 if ('hidden' === t) return !this.isVisible(n)3110 const r =3111 ['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA'].includes(n.nodeName) &&3112 n.hasAttribute('disabled')3113 if ('disabled' === t) return r3114 if ('enabled' === t) return !r3115 const o = !(3116 ['INPUT', 'TEXTAREA', 'SELECT'].includes(n.nodeName) &&3117 n.hasAttribute('readonly')3118 )3119 if ('editable' === t) return !r && o3120 if ('checked' === t) {3121 if (['checkbox', 'radio'].includes(n.getAttribute('role') || ''))3122 return 'true' === n.getAttribute('aria-checked')3123 if ('INPUT' !== n.nodeName)3124 throw this.createStacklessError('Not a checkbox or radio button')3125 if (!['radio', 'checkbox'].includes(n.type.toLowerCase()))3126 throw this.createStacklessError('Not a checkbox or radio button')3127 return n.checked3128 }3129 throw this.createStacklessError(`Unexpected element state "${t}"`)3130 }3131 selectOptions(e, t, n) {3132 const r = this.retarget(t, 'follow-label')3133 if (!r) return 'error:notconnected'3134 if ('select' !== r.nodeName.toLowerCase())3135 throw this.createStacklessError('Element is not a <select> element')3136 const o = r,3137 i = [...o.options],3138 s = []3139 let c = e.slice()3140 for (let e = 0; e < i.length; e++) {3141 const t = i[e],3142 n = (n) => {3143 if (n instanceof Node) return t === n3144 let r = !03145 return (3146 void 0 !== n.value && (r = r && n.value === t.value),3147 void 0 !== n.label && (r = r && n.label === t.label),3148 void 0 !== n.index && (r = r && n.index === e),3149 r3150 )3151 }3152 if (c.some(n)) {3153 if ((s.push(t), !o.multiple)) {3154 c = []3155 break3156 }3157 c = c.filter((e) => !n(e))3158 }3159 }3160 return c.length3161 ? (n.logRepeating(' did not find some options - waiting... '),3162 n.continuePolling)3163 : ((o.value = void 0),3164 s.forEach((e) => (e.selected = !0)),3165 n.log(' selected specified option(s)'),3166 o.dispatchEvent(new Event('input', { bubbles: !0 })),3167 o.dispatchEvent(new Event('change', { bubbles: !0 })),3168 s.map((e) => e.value))3169 }3170 fill(e, t, n) {3171 const r = this.retarget(t, 'follow-label')3172 if (!r) return 'error:notconnected'3173 if ('input' === r.nodeName.toLowerCase()) {3174 const t = r,3175 o = t.type.toLowerCase(),3176 i = new Set([3177 'date',3178 'time',3179 'datetime',3180 'datetime-local',3181 'month',3182 'week'3183 ])3184 if (3185 !new Set([3186 '',3187 'email',3188 'number',3189 'password',3190 'search',3191 'tel',3192 'text',3193 'url'3194 ]).has(o) &&3195 !i.has(o)3196 )3197 throw (3198 (n.log(` input of type "${o}" cannot be filled`),3199 this.createStacklessError(3200 `Input of type "${o}" cannot be filled`3201 ))3202 )3203 if ('number' === o && ((e = e.trim()), isNaN(Number(e))))3204 throw this.createStacklessError(3205 'Cannot type text into input[type=number]'3206 )3207 if (i.has(o)) {3208 if (((e = e.trim()), t.focus(), (t.value = e), t.value !== e))3209 throw this.createStacklessError('Malformed value')3210 return (3211 r.dispatchEvent(new Event('input', { bubbles: !0 })),3212 r.dispatchEvent(new Event('change', { bubbles: !0 })),3213 'done'3214 )3215 }3216 } else if ('textarea' === r.nodeName.toLowerCase());3217 else if (!r.isContentEditable)3218 throw this.createStacklessError(3219 'Element is not an <input>, <textarea> or [contenteditable] element'3220 )3221 return this.selectText(r), 'needsinput'3222 }3223 selectText(e) {3224 const t = this.retarget(e, 'follow-label')3225 if (!t) return 'error:notconnected'3226 if ('input' === t.nodeName.toLowerCase()) {3227 const e = t3228 return e.select(), e.focus(), 'done'3229 }3230 if ('textarea' === t.nodeName.toLowerCase()) {3231 const e = t3232 return (3233 (e.selectionStart = 0),3234 (e.selectionEnd = e.value.length),3235 e.focus(),3236 'done'3237 )3238 }3239 const n = t.ownerDocument.createRange()3240 n.selectNodeContents(t)3241 const r = t.ownerDocument.defaultView.getSelection()3242 return r && (r.removeAllRanges(), r.addRange(n)), t.focus(), 'done'3243 }3244 focusNode(e, t) {3245 if (!e.isConnected) return 'error:notconnected'3246 if (e.nodeType !== Node.ELEMENT_NODE)3247 throw this.createStacklessError('Node is not an element')3248 const n =3249 e.getRootNode().activeElement === e &&3250 e.ownerDocument &&3251 e.ownerDocument.hasFocus()3252 if ((e.focus(), t && !n && 'input' === e.nodeName.toLowerCase()))3253 try {3254 e.setSelectionRange(0, 0)3255 } catch (e) {}3256 return 'done'3257 }3258 setInputFiles(e, t) {3259 if (e.nodeType !== Node.ELEMENT_NODE)3260 return 'Node is not of type HTMLElement'3261 const n = e3262 if ('INPUT' !== n.nodeName) return 'Not an <input> element'3263 const r = n3264 if ('file' !== (r.getAttribute('type') || '').toLowerCase())3265 return 'Not an input[type=file] element'3266 const o = t.map((e) => {3267 const t = Uint8Array.from(atob(e.buffer), (e) => e.charCodeAt(0))3268 return new File([t], e.name, { type: e.mimeType })3269 }),3270 i = new DataTransfer()3271 for (const e of o) i.items.add(e)3272 ;(r.files = i.files),3273 r.dispatchEvent(new Event('input', { bubbles: !0 })),3274 r.dispatchEvent(new Event('change', { bubbles: !0 }))3275 }3276 checkHitTargetAt(e, t) {3277 let n = e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement3278 if (!n || !n.isConnected) return 'error:notconnected'3279 n = n.closest('button, [role=button]') || n3280 let r = this.deepElementFromPoint(document, t.x, t.y)3281 const o = []3282 for (; r && r !== n; )3283 o.push(r), (r = (0, c.parentElementOrShadowHost)(r))3284 if (r === n) return 'done'3285 const i = this.previewNode(o[0])3286 let s3287 for (; n; ) {3288 const e = o.indexOf(n)3289 if (-1 !== e) {3290 e > 1 && (s = this.previewNode(o[e - 1]))3291 break3292 }3293 n = (0, c.parentElementOrShadowHost)(n)3294 }3295 return s3296 ? { hitTargetDescription: `${i} from ${s} subtree` }3297 : { hitTargetDescription: i }3298 }3299 dispatchEvent(e, t, n) {3300 let r3301 switch (3302 ((n = { bubbles: !0, cancelable: !0, composed: !0, ...n }), p.get(t))3303 ) {3304 case 'mouse':3305 r = new MouseEvent(t, n)3306 break3307 case 'keyboard':3308 r = new KeyboardEvent(t, n)3309 break3310 case 'touch':3311 r = new TouchEvent(t, n)3312 break3313 case 'pointer':3314 r = new PointerEvent(t, n)3315 break3316 case 'focus':3317 r = new FocusEvent(t, n)3318 break3319 case 'drag':3320 r = new DragEvent(t, n)3321 break3322 default:3323 r = new Event(t, n)3324 }3325 e.dispatchEvent(r)3326 }3327 deepElementFromPoint(e, t, n) {3328 let r,3329 o = e3330 for (; o; ) {3331 const e = o.elementsFromPoint(t, n)[0]3332 if (!e || r === e) break3333 ;(r = e), (o = r.shadowRoot)3334 }3335 return r3336 }3337 previewNode(e) {3338 if (e.nodeType === Node.TEXT_NODE)3339 return h(`#text=${e.nodeValue || ''}`)3340 if (e.nodeType !== Node.ELEMENT_NODE)3341 return h(`<${e.nodeName.toLowerCase()} />`)3342 const t = e,3343 n = []3344 for (let e = 0; e < t.attributes.length; e++) {3345 const { name: r, value: o } = t.attributes[e]3346 'style' === r ||3347 r.startsWith('__playwright') ||3348 (!o && l.has(r) ? n.push(` ${r}`) : n.push(` ${r}="${o}"`))3349 }3350 n.sort((e, t) => e.length - t.length)3351 let r = n.join('')3352 if (3353 (r.length > 50 && (r = r.substring(0, 49) + '…'), u.has(t.nodeName))3354 )3355 return h(`<${t.nodeName.toLowerCase()}${r}/>`)3356 const o = t.childNodes3357 let i = !13358 if (o.length <= 5) {3359 i = !03360 for (let e = 0; e < o.length; e++)3361 i = i && o[e].nodeType === Node.TEXT_NODE3362 }3363 let s = i ? t.textContent || '' : o.length ? '…' : ''3364 return (3365 s.length > 50 && (s = s.substring(0, 49) + '…'),3366 h(3367 `<${t.nodeName.toLowerCase()}${r}>${s}</${t.nodeName.toLowerCase()}>`3368 )3369 )3370 }3371 strictModeViolationError(e, t) {3372 const n = t3373 .slice(0, 10)3374 .map((e) => ({3375 preview: this.previewNode(e),3376 selector: (0, a.generateSelector)(this, e).selector3377 })),3378 r = n.map(3379 (e, t) =>3380 `\n ${t + 1}) ${e.preview} aka playwright.$("${e.selector}")`3381 )3382 return (3383 n.length < t.length && r.push('\n ...'),3384 this.createStacklessError(3385 `strict mode violation: "${e.selector}" resolved to ${3386 t.length3387 } elements:${r.join('')}\n`3388 )3389 )3390 }3391 createStacklessError(e) {3392 if ('firefox' === this._browserName) {3393 const t = new Error('Error: ' + e)3394 return (t.stack = ''), t3395 }3396 const t = new Error(e)3397 return delete t.stack, t3398 }3399 _setupGlobalListenersRemovalDetection() {3400 const e = '__playwright_global_listeners_check__'3401 let t = !13402 const n = () => (t = !0)3403 window.addEventListener(e, n),3404 new MutationObserver((r) => {3405 if (3406 r.some((e) =>3407 Array.from(e.addedNodes).includes(document.documentElement)3408 ) &&3409 ((t = !1), window.dispatchEvent(new CustomEvent(e)), !t)3410 ) {3411 window.addEventListener(e, n)3412 for (const e of this.onGlobalListenersRemoved) e()3413 }3414 }).observe(document, { childList: !0 })3415 }3416 expectSingleElement(e, t, n) {3417 const r = e.injectedScript,3418 o = n.expression3419 {3420 let n3421 if ('to.be.checked' === o)3422 n = e.injectedScript.elementState(t, 'checked')3423 else if ('to.be.disabled' === o)3424 n = e.injectedScript.elementState(t, 'disabled')3425 else if ('to.be.editable' === o)3426 n = e.injectedScript.elementState(t, 'editable')3427 else if ('to.be.empty' === o) {3428 var i3429 n =3430 'INPUT' === t.nodeName || 'TEXTAREA' === t.nodeName3431 ? !t.value3432 : !(null !== (i = t.textContent) && void 0 !== i && i.trim())3433 } else3434 'to.be.enabled' === o3435 ? (n = e.injectedScript.elementState(t, 'enabled'))3436 : 'to.be.focused' === o3437 ? (n = document.activeElement === t)3438 : 'to.be.hidden' === o3439 ? (n = e.injectedScript.elementState(t, 'hidden'))3440 : 'to.be.visible' === o &&3441 (n = e.injectedScript.elementState(t, 'visible'))3442 if (void 0 !== n) {3443 if ('error:notcheckbox' === n)3444 throw r.createStacklessError('Element is not a checkbox')3445 if ('error:notconnected' === n)3446 throw r.createStacklessError('Element is not connected')3447 return { received: n, matches: n }3448 }3449 }3450 if ('to.have.property' === o) {3451 const e = t[n.expressionArg]3452 return { received: e, matches: m(e, n.expectedValue) }3453 }3454 {3455 let e3456 if ('to.have.attribute' === o)3457 e = t.getAttribute(n.expressionArg) || ''3458 else if ('to.have.class' === o) e = t.className3459 else if ('to.have.css' === o)3460 e = window.getComputedStyle(t)[n.expressionArg]3461 else if ('to.have.id' === o) e = t.id3462 else if ('to.have.text' === o)3463 e = n.useInnerText ? t.innerText : t.textContent || ''3464 else if ('to.have.title' === o) e = document.title3465 else if ('to.have.url' === o) e = document.location.href3466 else if ('to.have.value' === o) {3467 if (3468 'INPUT' !== t.nodeName &&3469 'TEXTAREA' !== t.nodeName &&3470 'SELECT' !== t.nodeName3471 )3472 throw this.createStacklessError('Not an input element')3473 e = t.value3474 }3475 if (void 0 !== e && n.expectedText)3476 return { received: e, matches: new d(n.expectedText[0]).matches(e) }3477 }3478 throw this.createStacklessError('Unknown expect matcher: ' + o)3479 }3480 expectArray(e, t) {3481 const n = t.expression3482 if ('to.have.count' === n) {3483 const n = e.length3484 return { received: n, matches: n === t.expectedNumber }3485 }3486 let r3487 if (3488 ('to.have.text.array' === n || 'to.contain.text.array' === n3489 ? (r = e.map((e) =>3490 t.useInnerText ? e.innerText : e.textContent || ''3491 ))3492 : 'to.have.class.array' === n && (r = e.map((e) => e.className)),3493 r && t.expectedText)3494 ) {3495 const e = 'to.contain.text.array' !== n3496 if (r.length !== t.expectedText.length && e)3497 return { received: r, matches: !1 }3498 let o = 03499 const i = t.expectedText.map((e) => new d(e))3500 let s = !03501 for (const e of i) {3502 for (; o < r.length && !e.matches(r[o]); ) o++3503 if (o >= r.length) {3504 s = !13505 break3506 }3507 }3508 return { received: r, matches: s }3509 }3510 throw this.createStacklessError('Unknown expect matcher: ' + n)3511 }3512 }3513 e.default = g3514 })(),3515 (pwExport = r.default)...

Full Screen

Full Screen

parser.js

Source:parser.js Github

copy

Full Screen

...1069 if (peg$silentFails === 0) { peg$fail(peg$c32); }1070 }1071 return s0;1072 }1073 function peg$parseComponentSelector() {1074 var s0, s1;1075 peg$silentFails++;1076 if (input.charCodeAt(peg$currPos) === 102) {1077 s0 = peg$c37;1078 peg$currPos++;1079 } else {1080 s0 = peg$FAILED;1081 if (peg$silentFails === 0) { peg$fail(peg$c38); }1082 }1083 if (s0 === peg$FAILED) {1084 if (input.charCodeAt(peg$currPos) === 101) {1085 s0 = peg$c39;1086 peg$currPos++;1087 } else {1088 s0 = peg$FAILED;1089 if (peg$silentFails === 0) { peg$fail(peg$c40); }1090 }1091 if (s0 === peg$FAILED) {1092 if (input.charCodeAt(peg$currPos) === 118) {1093 s0 = peg$c41;1094 peg$currPos++;1095 } else {1096 s0 = peg$FAILED;1097 if (peg$silentFails === 0) { peg$fail(peg$c42); }1098 }1099 }1100 }1101 peg$silentFails--;1102 if (s0 === peg$FAILED) {1103 s1 = peg$FAILED;1104 if (peg$silentFails === 0) { peg$fail(peg$c36); }1105 }1106 return s0;1107 }1108 function peg$parseSemanticSelector() {1109 var s0, s1;1110 peg$silentFails++;1111 if (input.substr(peg$currPos, 5) === peg$c44) {1112 s0 = peg$c44;1113 peg$currPos += 5;1114 } else {1115 s0 = peg$FAILED;1116 if (peg$silentFails === 0) { peg$fail(peg$c45); }1117 }1118 if (s0 === peg$FAILED) {1119 if (input.substr(peg$currPos, 4) === peg$c46) {1120 s0 = peg$c46;1121 peg$currPos += 4;1122 } else {1123 s0 = peg$FAILED;1124 if (peg$silentFails === 0) { peg$fail(peg$c47); }1125 }1126 if (s0 === peg$FAILED) {1127 if (input.substr(peg$currPos, 4) === peg$c48) {1128 s0 = peg$c48;1129 peg$currPos += 4;1130 } else {1131 s0 = peg$FAILED;1132 if (peg$silentFails === 0) { peg$fail(peg$c49); }1133 }1134 if (s0 === peg$FAILED) {1135 if (input.substr(peg$currPos, 5) === peg$c50) {1136 s0 = peg$c50;1137 peg$currPos += 5;1138 } else {1139 s0 = peg$FAILED;1140 if (peg$silentFails === 0) { peg$fail(peg$c51); }1141 }1142 if (s0 === peg$FAILED) {1143 if (input.substr(peg$currPos, 3) === peg$c52) {1144 s0 = peg$c52;1145 peg$currPos += 3;1146 } else {1147 s0 = peg$FAILED;1148 if (peg$silentFails === 0) { peg$fail(peg$c53); }1149 }1150 if (s0 === peg$FAILED) {1151 if (input.substr(peg$currPos, 6) === peg$c54) {1152 s0 = peg$c54;1153 peg$currPos += 6;1154 } else {1155 s0 = peg$FAILED;1156 if (peg$silentFails === 0) { peg$fail(peg$c55); }1157 }1158 if (s0 === peg$FAILED) {1159 if (input.substr(peg$currPos, 4) === peg$c56) {1160 s0 = peg$c56;1161 peg$currPos += 4;1162 } else {1163 s0 = peg$FAILED;1164 if (peg$silentFails === 0) { peg$fail(peg$c57); }1165 }1166 if (s0 === peg$FAILED) {1167 if (input.substr(peg$currPos, 3) === peg$c58) {1168 s0 = peg$c58;1169 peg$currPos += 3;1170 } else {1171 s0 = peg$FAILED;1172 if (peg$silentFails === 0) { peg$fail(peg$c59); }1173 }1174 }1175 }1176 }1177 }1178 }1179 }1180 }1181 peg$silentFails--;1182 if (s0 === peg$FAILED) {1183 s1 = peg$FAILED;1184 if (peg$silentFails === 0) { peg$fail(peg$c43); }1185 }1186 return s0;1187 }1188 function peg$parseComponentSplitParameter() {1189 var s0, s1, s2, s3, s4, s5;1190 peg$silentFails++;1191 s0 = peg$currPos;1192 s1 = peg$parseSemanticSelector();1193 if (s1 !== peg$FAILED) {1194 s2 = peg$parse_();1195 if (s2 !== peg$FAILED) {1196 if (input.charCodeAt(peg$currPos) === 58) {1197 s3 = peg$c61;1198 peg$currPos++;1199 } else {1200 s3 = peg$FAILED;1201 if (peg$silentFails === 0) { peg$fail(peg$c62); }1202 }1203 if (s3 === peg$FAILED) {1204 if (input.charCodeAt(peg$currPos) === 61) {1205 s3 = peg$c63;1206 peg$currPos++;1207 } else {1208 s3 = peg$FAILED;1209 if (peg$silentFails === 0) { peg$fail(peg$c64); }1210 }1211 }1212 if (s3 !== peg$FAILED) {1213 s4 = peg$parse_();1214 if (s4 !== peg$FAILED) {1215 s5 = peg$parseSuccessor();1216 if (s5 !== peg$FAILED) {1217 peg$savedPos = s0;1218 s1 = peg$c65(s1, s3, s5);1219 s0 = s1;1220 } else {1221 peg$currPos = s0;1222 s0 = peg$FAILED;1223 }1224 } else {1225 peg$currPos = s0;1226 s0 = peg$FAILED;1227 }1228 } else {1229 peg$currPos = s0;1230 s0 = peg$FAILED;1231 }1232 } else {1233 peg$currPos = s0;1234 s0 = peg$FAILED;1235 }1236 } else {1237 peg$currPos = s0;1238 s0 = peg$FAILED;1239 }1240 peg$silentFails--;1241 if (s0 === peg$FAILED) {1242 s1 = peg$FAILED;1243 if (peg$silentFails === 0) { peg$fail(peg$c60); }1244 }1245 return s0;1246 }1247 function peg$parseComponentSplit() {1248 var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18;1249 peg$silentFails++;1250 s0 = peg$currPos;1251 if (input.substr(peg$currPos, 4) === peg$c67) {1252 s1 = peg$c67;1253 peg$currPos += 4;1254 } else {1255 s1 = peg$FAILED;1256 if (peg$silentFails === 0) { peg$fail(peg$c68); }1257 }1258 if (s1 !== peg$FAILED) {1259 s2 = peg$parse_();1260 if (s2 !== peg$FAILED) {1261 if (input.charCodeAt(peg$currPos) === 40) {1262 s3 = peg$c17;1263 peg$currPos++;1264 } else {1265 s3 = peg$FAILED;1266 if (peg$silentFails === 0) { peg$fail(peg$c18); }1267 }1268 if (s3 !== peg$FAILED) {1269 s4 = peg$parse_();1270 if (s4 !== peg$FAILED) {1271 s5 = peg$parseComponentSelector();1272 if (s5 !== peg$FAILED) {1273 s6 = peg$parse_();1274 if (s6 !== peg$FAILED) {1275 if (input.charCodeAt(peg$currPos) === 41) {1276 s7 = peg$c21;1277 peg$currPos++;1278 } else {1279 s7 = peg$FAILED;1280 if (peg$silentFails === 0) { peg$fail(peg$c22); }1281 }1282 if (s7 !== peg$FAILED) {1283 s8 = peg$parse_();1284 if (s8 !== peg$FAILED) {1285 if (input.charCodeAt(peg$currPos) === 123) {...

Full Screen

Full Screen

interpreter.js

Source:interpreter.js Github

copy

Full Screen

...14 ////////////////////////////////////////////////////////////////////////////////////////////////////15 ////////////////////////////////////////////////////////////////////////////////////////////////////16 ////////////////////////////////////////////////////////////////////////////////////////////////////17 var ComponentSelector = {F:null, E:null, V:null};18 function parseComponentSelector(value) {19 value = value.trim().toUpperCase();20 if (!(value in ComponentSelector))21 throw new Error(value + " is not a component selector");22 return value;23 }24 ////////////////////////////////////////////////////////////////////////////////////////////////////25 ////////////////////////////////////////////////////////////////////////////////////////////////////26 ////////////////////////////////////////////////////////////////////////////////////////////////////27 var SemanticSelector = { FRONT:0, BACK:1, LEFT:2, RIGHT:3, TOP:4, BOTTOM:5, SIDE:6, ALL:7 };28 function parseSemanticSelector(value) {29 value = value.trim().toUpperCase();30 if (!(value in SemanticSelector))31 throw new Error(value + " is not a semantic selector");32 return value;33 }34 ////////////////////////////////////////////////////////////////////////////////////////////////////35 ////////////////////////////////////////////////////////////////////////////////////////////////////36 ////////////////////////////////////////////////////////////////////////////////////////////////////37 function parseComponentSplitOperator(value) {38 if (value != ":" && value != "=")39 throw new Error(value + " is not a comp operator");40 return value;41 }42 ////////////////////////////////////////////////////////////////////////////////////////////////////43 ////////////////////////////////////////////////////////////////////////////////////////////////////44 ////////////////////////////////////////////////////////////////////////////////////////////////////45 function cloneGeometry(geometry) {46 var vertices = new Array(geometry.vertices.length),47 normals = new Array(geometry.normals.length),48 uvs = new Array(geometry.uvs.length),49 faces = new Array(geometry.faces.length);50 for (var i = 0; i < geometry.vertices.length; i++)51 vertices[i] = geometry.vertices[i].clone();52 for (var i = 0; i < geometry.normals.length; i++)53 normals[i] = geometry.normals[i].clone();54 for (var i = 0; i < geometry.uvs.length; i++)55 uvs[i] = geometry.uvs[i].clone();56 for (var i = 0; i < geometry.faces.length; i++)57 faces[i] = geometry.faces[i].slice();58 return {59 vertices: vertices,60 normals: normals,61 uvs: uvs,62 faces: faces63 };64 }65 ////////////////////////////////////////////////////////////////////////////////////////////////////66 ////////////////////////////////////////////////////////////////////////////////////////////////////67 ////////////////////////////////////////////////////////////////////////////////////////////////////68 function cloneShape(symbol) {69 return {70 initialShape: {71 name: symbol.initialShape.name,72 startRule: symbol.initialShape.startRule,73 origin: {74 p: symbol.initialShape.origin.p.clone(),75 o: symbol.initialShape.origin.o.clone()76 }77 },78 scope: {79 t: symbol.scope.t.clone(),80 r: symbol.scope.r.clone(),81 s: symbol.scope.s.clone()82 },83 pivot: {84 p: symbol.pivot.p.clone(),85 o: symbol.pivot.o.clone()86 },87 geometry: cloneGeometry(symbol.geometry),88 comp: {89 sel: symbol.comp.sel,90 index: symbol.comp.index,91 total: symbol.comp.total92 }93 };94 }95 ////////////////////////////////////////////////////////////////////////////////////////////////////96 ////////////////////////////////////////////////////////////////////////////////////////////////////97 ////////////////////////////////////////////////////////////////////////////////////////////////////98 var Call = function(successor) {99 this.successor = successor;100 }101 Call.prototype.apply = function(shape, context) {102 context.forward(this.successor, shape);103 }104 ////////////////////////////////////////////////////////////////////////////////////////////////////105 ////////////////////////////////////////////////////////////////////////////////////////////////////106 ////////////////////////////////////////////////////////////////////////////////////////////////////107 var Extrude = function(axis, extent, operation) {108 this.axis = axis; this.extent = extent; this.operation = operation;109 }110 Extrude.prototype.apply = function(shape, context) {111 var newType;112 if (shape.type == "Quad") {113 newType = "Box";114 } else115 throw new Error("don't know how to extrude " + shape.type);116 var transform = new THREE.Matrix4();117 if (this.axis == "X") {118 transform = transform.set(119 0.0, 0.0, 1.0, 0.0,120 0.0, 1.0, 0.0, 0.0,121 1.0, 0.0, 0.0, 0.0,122 0.0, 0.0, 0.0, 1.0);123 } else if (this.axis == "Y") {124 transform = transform.set(125 -1.0, 0.0, 0.0, 0.0,126 0.0, 0.0, 1.0, 0.0,127 0.0, 1.0, 0.0, 0.0,128 0.0, 0.0, 0.0, 1.0);129 } else if (this.axis == "Z") {130 transform = transform.set(131 1.0, 0.0, 0.0, 0.0,132 0.0, 1.0, 0.0, 0.0,133 0.0, 0.0, 1.0, 0.0,134 0.0, 0.0, 0.0, 1.0);135 }136 context.forward(this.operation, {137 type: newType,138 model: shape.model.clone().multiply(transform),139 size: new THREE.Vector3(shape.size.x, this.extent, shape.size.y)140 });141 }142 ////////////////////////////////////////////////////////////////////////////////////////////////////143 ////////////////////////////////////////////////////////////////////////////////////////////////////144 ////////////////////////////////////////////////////////////////////////////////////////////////////145 var ComponentSplit = function(componentSelector, operations) {146 this.componentSelector = componentSelector;147 this.operations = operations;148 }149 ComponentSplit.prototype.forwardBoxTop = function(shape, context, halfExtents, successor)150 {151 context.forward(successor, {152 type: "Quad",153 model: shape.model.clone().multiply(154 new THREE.Matrix4().makeTranslation(0, halfExtents.y, 0).multiply(155 new THREE.Matrix4().set(156 1.0, 0.0, 0.0, 0.0,157 0.0, 0.0, -1.0, 0.0,158 0.0, 1.0, 0.0, 0.0,159 0.0, 0.0, 0.0, 1.0160 )161 )162 ),163 size: new THREE.Vector3(shape.size.x, shape.size.z, 1.0)164 });165 }166 ComponentSplit.prototype.forwardBoxBottom = function(shape, context, halfExtents, successor) {167 context.forward(successor, {168 type: "Quad",169 model: shape.model.clone().multiply(170 new THREE.Matrix4().makeTranslation(0, -halfExtents.y, 0).multiply(171 new THREE.Matrix4().set(172 1.0, 0.0, 0.0, 0.0,173 0.0, 0.0, 1.0, 0.0,174 0.0, 1.0, 0.0, 0.0,175 0.0, 0.0, 0.0, 1.0176 )177 )178 ),179 size: new THREE.Vector3(shape.size.x, shape.size.z, 1.0)180 });181 }182 ComponentSplit.prototype.forwardBoxBack = function(shape, context, halfExtents, successor) {183 context.forward(successor, {184 type: "Quad",185 model: shape.model.clone().multiply(186 new THREE.Matrix4().makeTranslation(0, 0, halfExtents.z).multiply(187 new THREE.Matrix4().set(188 -1.0, 0.0, 0.0, 0.0,189 0.0, 1.0, 0.0, 0.0,190 0.0, 0.0, -1.0, 0.0,191 0.0, 0.0, 0.0, 1.0192 )193 )194 ),195 size: new THREE.Vector3(shape.size.x, shape.size.y, 1.0)196 });197 }198 ComponentSplit.prototype.forwardBoxFront = function(shape, context, halfExtents, successor) {199 context.forward(successor, {200 type: "Quad",201 model: shape.model.clone().multiply(202 new THREE.Matrix4().makeTranslation(0, 0, -halfExtents.z).multiply(203 new THREE.Matrix4().set(204 1.0, 0.0, 0.0, 0.0,205 0.0, 1.0, 0.0, 0.0,206 0.0, 0.0, 1.0, 0.0,207 0.0, 0.0, 0.0, 1.0208 )209 )210 ),211 size: new THREE.Vector3(shape.size.x, shape.size.y, 1.0)212 });213 }214 ComponentSplit.prototype.forwardBoxLeft = function(shape, context, halfExtents, successor) {215 context.forward(successor, {216 type: "Quad",217 model: shape.model.clone().multiply(218 new THREE.Matrix4().makeTranslation(-halfExtents.x, 0, 0).multiply(219 new THREE.Matrix4().set(220 0.0, 0.0, 1.0, 0.0,221 0.0, 1.0, 0.0, 0.0,222 -1.0, 0.0, 0.0, 0.0,223 0.0, 0.0, 0.0, 1.0224 )225 )226 ),227 size: new THREE.Vector3(shape.size.z, shape.size.y, 1.0)228 });229 }230 ComponentSplit.prototype.forwardBoxRight = function(shape, context, halfExtents, successor) {231 context.forward(successor, {232 type: "Quad",233 model: shape.model.clone().multiply(234 new THREE.Matrix4().makeTranslation(halfExtents.x, 0, 0).multiply(235 new THREE.Matrix4().set(236 0.0, 0.0, -1.0, 0.0,237 0.0, 1.0, 0.0, 0.0,238 1.0, 0.0, 0.0, 0.0,239 0.0, 0.0, 0.0, 1.0240 )241 )242 ),243 size: new THREE.Vector3(shape.size.z, shape.size.y, 1.0)244 });245 }246 ComponentSplit.prototype.apply = function(shape, context) {247 var right = new THREE.Vector3(1, 0, 0),248 up = new THREE.Vector3(0, 1, 0),249 back = new THREE.Vector3(0, 0, 1);250 var facesByDirection = [[],[],[],[],[],[]];251 var halfPI = Math.PI * 0.5,252 oneHalfPI = Math.PI * 1.5;253 for (var i = 0; i < shape.geometry.faces.length; i += 3) {254 var p0 = shape.geometry.vertices[shape.geometry.faces[i][0]],255 p1 = shape.geometry.vertices[shape.geometry.faces[i + 1][0]],256 p2 = shape.geometry.vertices[shape.geometry.faces[i + 2][0]];257 var n0 = shape.geometry.normals[shape.geometry.faces[i][1]],258 n1 = shape.geometry.normals[shape.geometry.faces[i + 1][1]],259 n2 = shape.geometry.normals[shape.geometry.faces[i + 2][1]];260 var faceNormal = computeFaceNormal(p0, p1, p2, n0, n1, n2);261 var a0 = faceNormal.angleTo(right);262 if (a0 < halfPI && a0 > -halfPI)263 facesByDirection[SemanticSelector.RIGHT].push(i);264 else if (a0 > oneHalfPI && a0 < -oneHalfPI)265 facesByDirection[SemanticSelector.LEFT].push(i);266 a0 = faceNormal.angleTo(up);267 if (a0 < halfPI && a0 > -halfPI)268 facesByDirection[SemanticSelector.TOP].push(i);269 else if (a0 > oneHalfPI && a0 < -oneHalfPI)270 facesByDirection[SemanticSelector.BOTTOM].push(i);271 a0 = faceNormal.angleTo(back);272 if (a0 < halfPI && a0 > -halfPI)273 facesByDirection[SemanticSelector.BACK].push(i);274 else if (a0 > oneHalfPI && a0 < -oneHalfPI)275 facesByDirection[SemanticSelector.FRONT].push(i);276 }277 var halfExtents = shape.size.clone().divideScalar(2.0);278 for (var i = 0; i < this.operations.length; i++)279 {280 var operation = this.operations[i];281 if (operation.semanticSelector == "TOP")282 {283 this.forwardFaces(facesByDirection[SemanticSelector.TOP]);284 }285 else if (operation.semanticSelector == "BOTTOM")286 {287 this.forwardBoxBottom(shape, context, halfExtents, operation.successor);288 }289 else if (operation.semanticSelector == "BACK")290 {291 this.forwardBoxBack(shape, context, halfExtents, operation.successor);292 }293 else if (operation.semanticSelector == "FRONT")294 {295 this.forwardBoxFront(shape, context, halfExtents, operation.successor);296 }297 else if (operation.semanticSelector == "LEFT")298 {299 this.forwardBoxLeft(shape, context, halfExtents, operation.successor);300 }301 else if (operation.semanticSelector == "RIGHT")302 {303 this.forwardBoxRight(shape, context, halfExtents, operation.successor);304 }305 else if (operation.semanticSelector == "SIDE")306 {307 this.forwardBoxBack(shape, context, halfExtents, operation.successor);308 this.forwardBoxFront(shape, context, halfExtents, operation.successor);309 this.forwardBoxLeft(shape, context, halfExtents, operation.successor);310 this.forwardBoxRight(shape, context, halfExtents, operation.successor);311 }312 else if (operation.semanticSelector == "ALL")313 {314 this.forwardBoxTop(shape, context, halfExtents, operation.successor);315 this.forwardBoxBottom(shape, context, halfExtents, operation.successor);316 this.forwardBoxBack(shape, context, halfExtents, operation.successor);317 this.forwardBoxFront(shape, context, halfExtents, operation.successor);318 this.forwardBoxLeft(shape, context, halfExtents, operation.successor);319 this.forwardBoxRight(shape, context, halfExtents, operation.successor);320 }321 else322 // FIXME: checking invariants323 throw new Error("unknown semantic selector");324 }325 }326 ////////////////////////////////////////////////////////////////////////////////////////////////////327 ////////////////////////////////////////////////////////////////////////////////////////////////////328 ////////////////////////////////////////////////////////////////////////////////////////////////////329 var Scale = function(x, y, z, operation) {330 this.x = x; this.y = y; this.z = z; this.operation = operation;331 }332 Scale.prototype.apply = function(shape, context) {333 var x = (this.x > 0) ? this.x : shape.size.x * Math.abs(this.x);334 var y = (this.y > 0) ? this.y : shape.size.y * Math.abs(this.y);335 var z = (this.z > 0) ? this.z : shape.size.z * Math.abs(this.z);336 var newShape = cloneShape(shape);337 newShape.scope.s.x = x;338 newShape.scope.s.y = y;339 newShape.scope.s.z = z;340 context.forward(this.operation, newShape);341 }342 ////////////////////////////////////////////////////////////////////////////////////////////////////343 ////////////////////////////////////////////////////////////////////////////////////////////////////344 ////////////////////////////////////////////////////////////////////////////////////////////////////345 var Rotate = function(x, y, z, operation) {346 this.x = x; this.y = y; this.z = z; this.operation = operation;347 }348 Rotate.prototype.apply = function(shape, context) {349 var newShape = cloneShape(shape);350 newShape.scope.r.x += this.x;351 newShape.scope.r.y += this.y;352 newShape.scope.r.z += this.z;353 context.forward(this.operation, newShape);354 }355 ////////////////////////////////////////////////////////////////////////////////////////////////////356 ////////////////////////////////////////////////////////////////////////////////////////////////////357 ////////////////////////////////////////////////////////////////////////////////////////////////////358 var Translate = function(x, y, z, operation) {359 this.x = x; this.y = y; this.z = z; this.operation = operation;360 }361 Translate.prototype.apply = function(shape, context) {362 var newShape = cloneShape(shape);363 newShape.scope.t.x = this.x;364 newShape.scope.t.y = this.y;365 newShape.scope.t.z = this.z;366 context.forward(this.operation, newShape);367 }368 ////////////////////////////////////////////////////////////////////////////////////////////////////369 ////////////////////////////////////////////////////////////////////////////////////////////////////370 ////////////////////////////////////////////////////////////////////////////////////////////////////371 function createOperation(successor) {372 if (typeof successor === "string") {373 // symbol374 if (successor != "NIL")375 return new Call(successor);376 } else {377 // shape operation378 ////////////////////////////////////////////////////////////////////////////////////////////////////379 ////////////////////////////////////////////////////////////////////////////////////////////////////380 if (successor.operator == "extrude") {381 if (successor.parameters.length != 2)382 throw new Error("extrude expects 2 parameters");383 var axis = (successor.parameters[0] != null) ? parseAxis(successor.parameters[0]) : "Z";384 var extent = parseFloat(successor.parameters[1]);385 if (successor.operations.length != 1)386 throw new Error("extrude expects 1 operation");387 return new Extrude(axis, extent, createOperation(successor.operations[0]));388 ////////////////////////////////////////////////////////////////////////////////////////////////////389 ////////////////////////////////////////////////////////////////////////////////////////////////////390 } else if (successor.operator == "comp") {391 if (successor.parameters.length != 1)392 throw new Error("comp expects 1 parameter");393 if (successor.operations.length == 0)394 throw new Error("comp expects at least 1 operation");395 var componentSelector = parseComponentSelector(successor.parameters[0]);396 var operations = [];397 for (var i = 0; i < successor.operations.length; i++)398 var operation = successor.operations[i];399 operations.push({400 semanticSelector: parseSemanticSelector(operation.semanticSelector),401 operator: parseComponentSplitOperator(operation.operator),402 successor: createOperation(operation.successor)403 });404 return new ComponentSplit(componentSelector, operations);405 ////////////////////////////////////////////////////////////////////////////////////////////////////406 ////////////////////////////////////////////////////////////////////////////////////////////////////407 } else if (successor.operator == "split") {408 if (successor.parameters.length != 3)409 throw new Error("split expects 3 parameters");...

Full Screen

Full Screen

parse.js

Source:parse.js Github

copy

Full Screen

1/**2 * This file is heavily based on Playwright's `parseComponentSelector`, altered for this library's usage.3 * @see https://github.com/microsoft/playwright/blob/585807b3bea6a998019200c16b06683115011d87/src/server/common/componentUtils.ts4 *5 * Copyright (c) Microsoft Corporation.6 *7 * Licensed under the Apache License, Version 2.0 (the "License");8 * you may not use this file except in compliance with the License.9 * You may obtain a copy of the License at10 *11 * http://www.apache.org/licenses/LICENSE-2.012 *13 * Unless required by applicable law or agreed to in writing, software14 * distributed under the License is distributed on an "AS IS" BASIS,15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.16 * See the License for the specific language governing permissions and17 * limitations under the License.18 */19function parseSelector(selector) {20 let wp = 0;21 let EOL = selector.length === 0;22 const next = () => selector[wp] || '';23 const eat1 = () => {24 const result = next();25 ++wp;26 EOL = wp >= selector.length;27 return result;28 };29 const syntaxError = (stage) => {30 if (EOL)31 throw new Error(`Unexpected end of selector while parsing selector \`${selector}\``);32 throw new Error(`Error while parsing selector \`${selector}\` - unexpected symbol "${next()}" at position ${wp}` +33 (stage ? ' during ' + stage : ''));34 };35 function skipSpaces() {36 while (!EOL && /\s/.test(next()))37 eat1();38 }39 function readIdentifier() {40 let result = '';41 skipSpaces();42 while (!EOL && /[a-zA-Z]/.test(next()))43 result += eat1();44 if (!result)45 syntaxError('parsing identifier');46 return result;47 }48 function readQuotedString(quote) {49 let result = eat1();50 if (result !== quote)51 syntaxError('parsing quoted string');52 while (!EOL && next() !== quote) {53 const cur = eat1();54 if (cur === '\\' && next() === quote) {55 result += eat1();56 }57 else {58 result += cur;59 }60 }61 if (next() !== quote)62 syntaxError('parsing quoted string');63 result += eat1();64 return result;65 }66 function readRegexString() {67 if (eat1() !== '/')68 syntaxError('parsing regex string');69 let pattern = '';70 let flags = '';71 while (!EOL && next() !== '/') {72 // if (next() === '\\') eat1();73 pattern += eat1();74 }75 if (eat1() !== '/')76 syntaxError('parsing regex string');77 while (!EOL && /[dgimsuy]/.test(next())) {78 flags += eat1();79 }80 return [pattern, flags];81 }82 function readOperator() {83 skipSpaces();84 let op;85 if (!EOL)86 op = eat1();87 if (op !== '=') {88 syntaxError('parsing operator');89 }90 return op;91 }92 function readAttribute() {93 // skip leading [94 eat1();95 // read attribute name:96 const name = readIdentifier();97 skipSpaces();98 // check property is true: [focused]99 if (next() === ']') {100 eat1();101 return { name, value: true };102 }103 readOperator();104 let value = undefined;105 let caseSensitive = undefined;106 skipSpaces();107 if (next() === `'` || next() === `"`) {108 caseSensitive = true;109 value = readQuotedString(next()).slice(1, -1);110 skipSpaces();111 if (next() === 'i' || next() === 'I') {112 caseSensitive = false;113 eat1();114 }115 else if (next() === 's' || next() === 'S') {116 caseSensitive = true;117 eat1();118 }119 }120 else if (next() === '/') {121 const [pattern, flags] = readRegexString();122 value = new RegExp(pattern, flags);123 }124 else {125 value = '';126 while (!EOL && !/\s/.test(next()) && next() !== ']')127 value += eat1();128 if (value === 'true') {129 value = true;130 }131 else if (value === 'false') {132 value = false;133 }134 else {135 value = +value;136 if (isNaN(value))137 syntaxError('parsing attribute value');138 }139 }140 skipSpaces();141 if (next() !== ']')142 syntaxError('parsing attribute value');143 eat1();144 if (typeof value !== 'string' &&145 typeof value !== 'number' &&146 typeof value !== 'boolean' &&147 !(value instanceof RegExp))148 throw new Error(`Error while parsing selector \`${selector}\` - cannot use attribute ${name} with unsupported type ${typeof value} - ${value}`);149 const attribute = { name, value };150 if (typeof caseSensitive !== 'undefined') {151 attribute.caseSensitive = caseSensitive;152 }153 return attribute;154 }155 const result = {156 role: '',157 attributes: [],158 };159 result.role = readIdentifier();160 skipSpaces();161 while (next() === '[') {162 result.attributes.push(readAttribute());163 skipSpaces();164 }165 if (!EOL)166 syntaxError(undefined);167 if (!result.role && !result.attributes.length)168 throw new Error(`Error while parsing selector \`${selector}\` - selector cannot be empty`);169 return result;170}...

Full Screen

Full Screen

componentUtils.js

Source:componentUtils.js Github

copy

Full Screen

...34 if (attr.op === '|=') return objValue === attrValue || objValue.startsWith(attrValue + '-');35 if (attr.op === '~=') return objValue.split(' ').includes(attrValue);36 return false;37}38function parseComponentSelector(selector) {39 let wp = 0;40 let EOL = selector.length === 0;41 const next = () => selector[wp] || '';42 const eat1 = () => {43 const result = next();44 ++wp;45 EOL = wp >= selector.length;46 return result;47 };48 const syntaxError = stage => {49 if (EOL) throw new Error(`Unexpected end of selector while parsing selector \`${selector}\``);50 throw new Error(`Error while parsing selector \`${selector}\` - unexpected symbol "${next()}" at position ${wp}` + (stage ? ' during ' + stage : ''));51 };52 function skipSpaces() {...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { parseComponentSelector } = require('@playwright/test/lib/utils/parseTest');2const { test } = require('@playwright/test');3test('test', async ({ page }) => {4 const selector = parseComponentSelector('text=Hello');5 await page.click(selector);6});7const { test } = require('@playwright/test');8test('test', async ({ page, testInfo }) => {9 const selector = testInfo.parseSelector('text=Hello');10 await page.click(selector);11});12const { test } = require('@playwright/test');13test('test', async ({ page, testInfo }) => {14 const selector = testInfo.parseSelector('text=Hello');15 await page.click(selector);16});

Full Screen

Using AI Code Generation

copy

Full Screen

1const { parseComponentSelector } = require('playwright/lib/server/supplements/utils/locatorEvaluation');2console.log(parseComponentSelector('text=foo'));3console.log(parseComponentSelector('data-testid=foo'));4console.log(parseComponentSelector('data-test-id=foo'));5console.log(parseComponentSelector('data-test=foo'));6console.log(parseComponentSelector('data-test=foo bar'));7console.log(parseComponentSelector('data-test=foo bar baz'));8console.log(parseComponentSelector('data-test=foo bar baz qux'));9{ name: 'text', value: 'foo' }10{ name: 'data-testid', value: 'foo' }11{ name: 'data-test-id', value: 'foo' }12{ name: 'data-test', value: 'foo' }13{ name: 'data-test', value: 'foo bar' }14{ name: 'data-test', value: 'foo bar baz' }15{ name: 'data-test', value: 'foo bar baz qux' }

Full Screen

Using AI Code Generation

copy

Full Screen

1const { parseComponentSelector } = require('@playwright/test/lib/server/selectorParser');2const selector = parseComponentSelector('button:has-text("Click me")');3console.log(selector);4{5 body: 'has-text("Click me")',6 params: { text: 'Click me' },7 selector: 'button:has-text("Click me")',8 engineOptions: { selectorEngine: 'playwright' }9}10const { parseComponentSelector } = require('@playwright/test/lib/server/selectorParser');11const selector = parseComponentSelector('button:has-text("Click me")');12console.log(selector);13{14 body: 'has-text("Click me")',15 params: { text: 'Click me' },16 selector: 'button:has-text("Click me")',17 engineOptions: { selectorEngine: 'playwright' }18}19const { parseComponentSelector } = require('@playwright/test/lib/server/selectorParser');20const selector = parseComponentSelector('button:has-text("Click me")');21console.log(selector);22{23 body: 'has-text("Click me")',24 params: { text: 'Click me' },25 selector: 'button:has-text("Click me")',26 engineOptions: { selectorEngine: 'playwright' }27}28const { arseComponentSelector} = require('playwright');29const selector = parseComponentSelector('button:has-text("Click me")');30console.log(selector);31{32 body: 'has-text("Click me")',33 params: { text: 'Click me' },34 selector: 'button:has-text("Click me")',35 engineOptions: { selectorEngine: 'playwright

Full Screen

Using AI Code Generation

copy

Full Screen

1const { parseComponentSelector } = require('@playwright/test/lib/utils/componentUtils');2console.log(parseComponentSelector('text=Login'));3const { test } = require('@playwright/test');4test('example', async ({ page }) => {5 const { parseComponentSelector } = require('@playwright/test/lib/utils/componentUtils');6 console.log(parseComponentSelector('text=Login'));MM7});8{sengineOptions: { selectorEngine: 'playwright' }9}""ttibuetxt"ClikMe"}}M:has-text("Click Me")10Selector } = require('playwright/lib/server/frames');11co output: { name: 'button', parts: [ { name: 'has', args: [ [Object] ] } ] }12rf su:{ arts: [=eutttt:ha-xt("CikMe"):h-x"Click Me")-M13const { parseComponent14Selecto } = require('playwrigt/lib/server/frames');15conOt sel-text"Click Me")has-"M:has-text("Click Me":has-text("Click Me")16] } ] }17pag })pa> {

Full Screen

Using AI Code Generation

copy

Full Screen

1 await expect(pag{ pocatarseCompone)).toBeVisible();2}nt3Selector } = require('playwright/lib/server/@frames');tt4nsole.lo(programmaeically. Ic is alst useful w)en you w;n to crae a seetorfro/a/strtpg. Thu me h d can be uaedeto create a 'button' from a stri p that as stortd:in { vaamable or re rievedhfromntpdaaabaseCponentSelector } = require('playwright/lib/server/frames');5test('tesc',aanync ({ pagl })to> {6 await expet(pagocatr)).toBeVisible();7}8The utct{r = ame: 'button',methodpisr sbfun if hou aan ao cr(aCe a /code to psogpammatically. It is also ureful if you wanslto.crlate a seog(tSelfromc ;tring. Thc seth d cas belused co croate a ser = pa frpm a striog tenS eo sto(ed in a 'ariablb ou retrieved too: a databaae.text("Click me"))');

Full Screen

Using AI Code Generation

copy

Full Screen

1const { parseComponentconst selector = parseComponentSelector('sole.log(selector);2{3 body: 'has-text("Click me")',m)4 params: { text: 'Cli engine: 'playwright',5 selector: 'button:has-text("Click me")',6 engineOptions: { selectorEngine: 'playwright' }7} /lib/server/frames8co nst { par seComp'nentSe'ecpt eq [ui name: 'has', args@ [p[Objert] ]gt ] est/lib/server/selectorParser');9const selector = parseComponentSelector('button:has-text("Click me")');10console.log(selector);11{ name: 'button',12 params: { text: 'Click me' },13 selector: 'button:has-text("Click me")',m14 engineOptions: { sel15== ===== ''p [ nam: 'has', args [[Objet] button:ha](:text("Click me"))');16});17const { test } = require('@playwright/test');(:)18test('example', async ({ page }) => {19}) ;: ======codtto [ ussomecto);ar[[Obj]] } ] }20const {parseComponentSelector} = require('playwright'); API21const selector = parseComponentSelector('buton:has-textck Mherverafrat( Me")');22const selector = selector);23nst {parseComponentSelector} = require('playwright'); API24nst selector = parseComponentSelector('butto:has-textck Me"server/common-text("Click Me"):has-text("Click Me")');25cl.log();26const {parseComponentSelector} = require('playwright');27const s elector = parseCompone ntSelector('button:hast/lib/server/common/componentU-ilstext("Click Me"):has-text("Click Me"):has-text("Click Me"):has-text("Click Me"):has-text("Click Me")');28console.log(selector);custom-[arilabl=ustombutton]29const {parseComponentSelector} = require('playwright');30const selector = parseComponentSelector('custom-button#custom-button-id:visiedsole.log(selector);

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Internal automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful