diff options
Diffstat (limited to 'node_modules/istanbul-reports')
41 files changed, 4226 insertions, 0 deletions
diff --git a/node_modules/istanbul-reports/CHANGELOG.md b/node_modules/istanbul-reports/CHANGELOG.md new file mode 100644 index 0000000..439f860 --- /dev/null +++ b/node_modules/istanbul-reports/CHANGELOG.md @@ -0,0 +1,442 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +### [3.1.4](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports-v3.1.3...istanbul-reports-v3.1.4) (2022-01-17) + + +### Bug Fixes + +* "E" is not showing in the HTML reporter for "implicit else" branches after pull 633 ([#663](https://github.com/istanbuljs/istanbuljs/issues/663)) ([7818922](https://github.com/istanbuljs/istanbuljs/commit/7818922fd7229c4eee12b1407b5a13020f5d34de)) + +### [3.1.3](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports-v3.1.2...istanbul-reports-v3.1.3) (2021-12-29) + + +### Bug Fixes + +* reverse tabnabbing vulnerability in URLs ([#591](https://github.com/istanbuljs/istanbuljs/issues/591)) ([4eceb9e](https://github.com/istanbuljs/istanbuljs/commit/4eceb9eb8b3169b882d74ecc526fb5837ebc6205)) + +### [3.1.2](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports-v3.1.1...istanbul-reports-v3.1.2) (2021-12-23) + + +### Bug Fixes + +* remove stray div tag from HTML report ([68d9c74](https://github.com/istanbuljs/istanbuljs/commit/68d9c7469927ddcf15346307eacea8fd7104086c)) + +### [3.1.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports-v3.1.0...istanbul-reports-v3.1.1) (2021-12-01) + + +### Bug Fixes + +* rel="noopener" to the link in the generated html reports ([f234bb3](https://github.com/istanbuljs/istanbuljs/commit/f234bb321421e7312a83595934a1abf81c7af70c)) + +## [3.1.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports-v3.0.5...istanbul-reports-v3.1.0) (2021-11-30) + + +### Features + +* add filter to HTML report ([#650](https://github.com/istanbuljs/istanbuljs/issues/650)) ([eab47f7](https://github.com/istanbuljs/istanbuljs/commit/eab47f76be90343f679ef0e5567a21447a4995dc)) + +### [3.0.5](https://www.github.com/istanbuljs/istanbuljs/compare/istanbul-reports-v3.0.4...istanbul-reports-v3.0.5) (2021-10-13) + + +### Bug Fixes + +* cobertura reports in root folder ([#571](https://www.github.com/istanbuljs/istanbuljs/issues/571)) ([596f6ff](https://www.github.com/istanbuljs/istanbuljs/commit/596f6ff1342ae4baa6688bf3ee7786c75d4df947)) + +### [3.0.4](https://www.github.com/istanbuljs/istanbuljs/compare/istanbul-reports-v3.0.3...istanbul-reports-v3.0.4) (2021-10-12) + + +### Bug Fixes + +* handle reports with "loc" but no "decl" ([#637](https://www.github.com/istanbuljs/istanbuljs/issues/637)) ([cdc28f3](https://www.github.com/istanbuljs/istanbuljs/commit/cdc28f3a1e80e786eaab3b7d3b8b9b558fc2d3c8)), closes [#322](https://www.github.com/istanbuljs/istanbuljs/issues/322) + +### [3.0.3](https://www.github.com/istanbuljs/istanbuljs/compare/istanbul-reports-v3.0.2...istanbul-reports-v3.0.3) (2021-10-06) + + +### Bug Fixes + +* lcov reporter crash when missing branches ([#613](https://www.github.com/istanbuljs/istanbuljs/issues/613)) ([d34981c](https://www.github.com/istanbuljs/istanbuljs/commit/d34981c8131e2ecbff6fc02ffd8702fd9808e241)) + +## [3.0.2](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@3.0.1...istanbul-reports@3.0.2) (2020-04-01) + + +### Bug Fixes + +* Ignore insignificant lines when coalesce ([#525](https://github.com/istanbuljs/istanbuljs/issues/525)) ([d7d7cfa](https://github.com/istanbuljs/istanbuljs/commit/d7d7cfa1301f0dde2ff19078c31235ffd55c01ef)) + + + + + +## [3.0.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@3.0.0...istanbul-reports@3.0.1) (2020-03-26) + + +### Bug Fixes + +* cobertura should escape invalid characters ([#534](https://github.com/istanbuljs/istanbuljs/issues/534)) ([4fd5114](https://github.com/istanbuljs/istanbuljs/commit/4fd5114a0926d20e4e1e3055323c44281f0af6cd)) + + + + + +# [3.0.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@3.0.0-alpha.6...istanbul-reports@3.0.0) (2019-12-20) + + +### Features + +* **text:** Coalesce ranges of missing lines ([#511](https://github.com/istanbuljs/istanbuljs/issues/511)) ([54636fc](https://github.com/istanbuljs/istanbuljs/commit/54636fc9acbb53e5724fe9018837d0d205413194)) + + + + + +# [3.0.0-alpha.6](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@3.0.0-alpha.5...istanbul-reports@3.0.0-alpha.6) (2019-12-07) + + +### Bug Fixes + +* Add favicon to html report ([#493](https://github.com/istanbuljs/istanbuljs/issues/493)) ([5afe203](https://github.com/istanbuljs/istanbuljs/commit/5afe20347dd3ae954b31707a67f381f87920797f)) + + + + + +# [3.0.0-alpha.5](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@3.0.0-alpha.4...istanbul-reports@3.0.0-alpha.5) (2019-11-22) + + +### Features + +* Add support for projectRoot option ([#492](https://github.com/istanbuljs/istanbuljs/issues/492)) ([177fd45](https://github.com/istanbuljs/istanbuljs/commit/177fd45ebd7e505e79120995d937d40f965bad79)) + + + + + +# [3.0.0-alpha.4](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@3.0.0-alpha.3...istanbul-reports@3.0.0-alpha.4) (2019-11-18) + + +### Bug Fixes + +* Remove handlebars ([#503](https://github.com/istanbuljs/istanbuljs/issues/503)) ([aa8ae7f](https://github.com/istanbuljs/istanbuljs/commit/aa8ae7fe42ef9c8aeaa193309bafb22ad725bc3d)), closes [#476](https://github.com/istanbuljs/istanbuljs/issues/476) + + + + + +# [3.0.0-alpha.3](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@3.0.0-alpha.2...istanbul-reports@3.0.0-alpha.3) (2019-10-19) + + +### Bug Fixes + +* Add missing dependency on istanbul-lib-report ([#490](https://github.com/istanbuljs/istanbuljs/issues/490)) ([95a2b2f](https://github.com/istanbuljs/istanbuljs/commit/95a2b2f)), closes [istanbuljs/nyc#1204](https://github.com/istanbuljs/nyc/issues/1204) + + + + + +# [3.0.0-alpha.2](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@3.0.0-alpha.1...istanbul-reports@3.0.0-alpha.2) (2019-10-06) + + +### Bug Fixes + +* Use path.posix.relative to generate URL's for html reports ([#472](https://github.com/istanbuljs/istanbuljs/issues/472)) ([05dc22c](https://github.com/istanbuljs/istanbuljs/commit/05dc22c)) +* **html-spa:** Filter only exact paths ([#431](https://github.com/istanbuljs/istanbuljs/issues/431)) ([bbc85f6](https://github.com/istanbuljs/istanbuljs/commit/bbc85f6)), closes [#426](https://github.com/istanbuljs/istanbuljs/issues/426) + + + + + +# [3.0.0-alpha.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@3.0.0-alpha.0...istanbul-reports@3.0.0-alpha.1) (2019-06-20) + + +### Bug Fixes + +* Set `opts.file = '-'` on text-lcov ([#424](https://github.com/istanbuljs/istanbuljs/issues/424)) ([4be56b2](https://github.com/istanbuljs/istanbuljs/commit/4be56b2)) + + + + + +# [3.0.0-alpha.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.2.5...istanbul-reports@3.0.0-alpha.0) (2019-06-19) + + +### Features + +* Refactor istanbul-lib-report so report can choose summarizer ([#408](https://github.com/istanbuljs/istanbuljs/issues/408)) ([0f328fd](https://github.com/istanbuljs/istanbuljs/commit/0f328fd)) +* **text report:** Optimize output to show more missing lines ([#341](https://github.com/istanbuljs/istanbuljs/issues/341)) ([c4e8b8e](https://github.com/istanbuljs/istanbuljs/commit/c4e8b8e)) +* Modern html report ([#345](https://github.com/istanbuljs/istanbuljs/issues/345)) ([95ebaf1](https://github.com/istanbuljs/istanbuljs/commit/95ebaf1)) +* Update dependencies, require Node.js 8 ([#401](https://github.com/istanbuljs/istanbuljs/issues/401)) ([bf3a539](https://github.com/istanbuljs/istanbuljs/commit/bf3a539)) + + +### BREAKING CHANGES + +* Existing istanbul-lib-report API's have been changed +* Node.js 8 is now required + + + + + +## [2.2.5](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.2.4...istanbul-reports@2.2.5) (2019-05-02) + + +### Bug Fixes + +* **istanbul-reports:** Remove isRoot check causing incorrect report formatting ([#66](https://github.com/istanbuljs/istanbuljs/issues/66)). ([#382](https://github.com/istanbuljs/istanbuljs/issues/382)) ([df6e994](https://github.com/istanbuljs/istanbuljs/commit/df6e994)) + + + + + +## [2.2.4](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.2.3...istanbul-reports@2.2.4) (2019-04-24) + +**Note:** Version bump only for package istanbul-reports + + + + + +## [2.2.3](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.2.2...istanbul-reports@2.2.3) (2019-04-17) + + +### Bug Fixes + +* Initialize cols for HTML report sorting ([#369](https://github.com/istanbuljs/istanbuljs/issues/369)) ([28f61de](https://github.com/istanbuljs/istanbuljs/commit/28f61de)) + + + + + +## [2.2.2](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.2.1...istanbul-reports@2.2.2) (2019-04-09) + +**Note:** Version bump only for package istanbul-reports + + + + + +## [2.2.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.2.0...istanbul-reports@2.2.1) (2019-04-03) + +**Note:** Version bump only for package istanbul-reports + + + + + +# [2.2.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.1.1...istanbul-reports@2.2.0) (2019-03-12) + + +### Features + +* set medium colour to yellow ([#306](https://github.com/istanbuljs/istanbuljs/issues/306)) ([ed40be7](https://github.com/istanbuljs/istanbuljs/commit/ed40be7)) + + + + + +## [2.1.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.1.0...istanbul-reports@2.1.1) (2019-02-14) + + +### Bug Fixes + +* update dependendencies due to vulnerabilities ([#294](https://github.com/istanbuljs/istanbuljs/issues/294)) ([4c14fed](https://github.com/istanbuljs/istanbuljs/commit/4c14fed)) + + + + + +# [2.1.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.0.3...istanbul-reports@2.1.0) (2019-01-26) + + +### Features + +* **istanbul-reports:** Enable keyboard shortcuts on HTML report file listing view ([#265](https://github.com/istanbuljs/istanbuljs/issues/265)) ([f49b355](https://github.com/istanbuljs/istanbuljs/commit/f49b355)) + + + + + +<a name="2.0.3"></a> +## [2.0.3](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.0.2...istanbul-reports@2.0.3) (2018-12-25) + + +### Bug Fixes + +* functionMap is sometimes missing a key from functions ([#253](https://github.com/istanbuljs/istanbuljs/issues/253)) ([399f215](https://github.com/istanbuljs/istanbuljs/commit/399f215)) + + + + +<a name="2.0.2"></a> +## [2.0.2](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.0.1...istanbul-reports@2.0.2) (2018-12-19) + + +### Bug Fixes + +* clover report metrics must be an inline xml element ([#226](https://github.com/istanbuljs/istanbuljs/issues/226)) ([e290c95](https://github.com/istanbuljs/istanbuljs/commit/e290c95)), closes [#13](https://github.com/istanbuljs/istanbuljs/issues/13) + + + + +<a name="2.0.1"></a> +## [2.0.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@2.0.0...istanbul-reports@2.0.1) (2018-09-06) + + + + +**Note:** Version bump only for package istanbul-reports + +<a name="2.0.0"></a> +# [2.0.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@1.5.0...istanbul-reports@2.0.0) (2018-07-07) + + +### Chores + +* Specify node >= 6 in istanbul-reports. ([#197](https://github.com/istanbuljs/istanbuljs/issues/197)) ([5810c38](https://github.com/istanbuljs/istanbuljs/commit/5810c38)) + + +### BREAKING CHANGES + +* Requires node >= 6. + + + + +<a name="1.5.0"></a> +# [1.5.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@1.4.1...istanbul-reports@1.5.0) (2018-06-06) + + +### Features + +* ability to skip rows with full coverage ([#170](https://github.com/istanbuljs/istanbuljs/issues/170)) ([bbcdc07](https://github.com/istanbuljs/istanbuljs/commit/bbcdc07)) + + + + +<a name="1.4.1"></a> +## [1.4.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@1.4.0...istanbul-reports@1.4.1) (2018-05-31) + + +### Bug Fixes + +* ensure using correct context ([#168](https://github.com/istanbuljs/istanbuljs/issues/168)) ([df102fd](https://github.com/istanbuljs/istanbuljs/commit/df102fd)) + + + + +<a name="1.4.0"></a> +# [1.4.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@1.3.0...istanbul-reports@1.4.0) (2018-04-17) + + +### Features + +* allow custom reporters to be loaded ([#155](https://github.com/istanbuljs/istanbuljs/issues/155)) ([6d89cca](https://github.com/istanbuljs/istanbuljs/commit/6d89cca)) + + + + +<a name="1.3.0"></a> +# [1.3.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@1.2.0...istanbul-reports@1.3.0) (2018-03-09) + + +### Features + +* added named anchors to code coverage line numbers. ([#149](https://github.com/istanbuljs/istanbuljs/issues/149)) ([98e1c50](https://github.com/istanbuljs/istanbuljs/commit/98e1c50)) + + + + +<a name="1.2.0"></a> +# [1.2.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@1.1.4...istanbul-reports@1.2.0) (2018-03-04) + + +### Bug Fixes + +* update fixtures to reflect new heading ([36801d3](https://github.com/istanbuljs/istanbuljs/commit/36801d3)) + + +### Features + +* add skip-empty option for html & text reports ([#140](https://github.com/istanbuljs/istanbuljs/issues/140)) ([d2a4262](https://github.com/istanbuljs/istanbuljs/commit/d2a4262)) +* add uncovered block navigation ([#136](https://github.com/istanbuljs/istanbuljs/issues/136)) ([c798930](https://github.com/istanbuljs/istanbuljs/commit/c798930)) + + + + +<a name="1.1.4"></a> +## [1.1.4](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@1.1.3...istanbul-reports@1.1.4) (2018-02-13) + + +### Bug Fixes + +* changed column header from "Uncovered Lines" to "Uncovered Line #s" ([#138](https://github.com/istanbuljs/istanbuljs/issues/138)) ([7ba7760](https://github.com/istanbuljs/istanbuljs/commit/7ba7760)) + + + + +<a name="1.1.3"></a> +## [1.1.3](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@1.1.2...istanbul-reports@1.1.3) (2017-10-21) + + + + +**Note:** Version bump only for package istanbul-reports + +<a name="1.1.2"></a> +## [1.1.2](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@1.1.1...istanbul-reports@1.1.2) (2017-08-26) + + +### Bug Fixes + +* prevent branch highlighting from extending pass the end of a line ([#80](https://github.com/istanbuljs/istanbuljs/issues/80)) ([f490377](https://github.com/istanbuljs/istanbuljs/commit/f490377)) + + + + +<a name="1.1.1"></a> +## [1.1.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@1.1.0...istanbul-reports@1.1.1) (2017-05-27) + + + + +<a name="1.1.0"></a> +# [1.1.0](https://github.com/istanbuljs/istanbul-reports/compare/istanbul-reports@1.0.2...istanbul-reports@1.1.0) (2017-04-29) + + +### Features + +* once 100% line coverage is achieved, missing branch coverage is now shown in text report ([#45](https://github.com/istanbuljs/istanbuljs/issues/45)) ([8a809f8](https://github.com/istanbuljs/istanbul-reports/commit/8a809f8)) + + + + +<a name="1.0.2"></a> +## [1.0.2](https://github.com/istanbuljs/istanbul-reports/compare/istanbul-reports@1.0.1...istanbul-reports@1.0.2) (2017-03-27) + + +### Bug Fixes + +* **windows:** preserve escape char of json-summary key path ([4d71d5e](https://github.com/istanbuljs/istanbul-reports/commit/4d71d5e)) + +<a name="1.0.1"></a> +## [1.0.1](https://github.com/istanbuljs/istanbul-reports/compare/v1.0.0...v1.0.1) (2017-01-29) + + +### Bug Fixes + +* add files key to package.json ([#17](https://github.com/istanbuljs/istanbul-reports/issues/17)) ([141f801](https://github.com/istanbuljs/istanbul-reports/commit/141f801)) + + + +<a name="1.0.0"></a> +# [1.0.0](https://github.com/istanbuljs/istanbul-reports/compare/v1.0.0-alpha.8...v1.0.0) (2016-10-17) + + +### Bug Fixes + +* fail gracefully if structuredText[startLine] is undefined ([#10](https://github.com/istanbuljs/istanbul-reports/issues/10)) ([bed1d13](https://github.com/istanbuljs/istanbul-reports/commit/bed1d13)) +* preserve escape char of json key path on Windows ([#12](https://github.com/istanbuljs/istanbul-reports/issues/12)) ([4e5266e](https://github.com/istanbuljs/istanbul-reports/commit/4e5266e)) +* skip branch if meta does not exist (fixes speedskater/babel-plugin-rewire[#165](https://github.com/istanbuljs/istanbul-reports/issues/165)) ([#11](https://github.com/istanbuljs/istanbul-reports/issues/11)) ([62bae2f](https://github.com/istanbuljs/istanbul-reports/commit/62bae2f)) +* Teamcity reporter modified to send proper coverage values ([#8](https://github.com/istanbuljs/istanbul-reports/issues/8)) ([4147f50](https://github.com/istanbuljs/istanbul-reports/commit/4147f50)) diff --git a/node_modules/istanbul-reports/LICENSE b/node_modules/istanbul-reports/LICENSE new file mode 100644 index 0000000..d55d291 --- /dev/null +++ b/node_modules/istanbul-reports/LICENSE @@ -0,0 +1,24 @@ +Copyright 2012-2015 Yahoo! Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Yahoo! Inc. nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/istanbul-reports/README.md b/node_modules/istanbul-reports/README.md new file mode 100644 index 0000000..09b6428 --- /dev/null +++ b/node_modules/istanbul-reports/README.md @@ -0,0 +1,13 @@ +# istanbul-reports + +[![Greenkeeper badge](https://badges.greenkeeper.io/istanbuljs/istanbul-reports.svg)](https://greenkeeper.io/) +[![Build Status](https://travis-ci.org/istanbuljs/istanbul-reports.svg?branch=master)](https://travis-ci.org/istanbuljs/istanbul-reports) + +- node.getRelativeName + +- context.getSource(filePath) +- context.classForPercent(type, percent) +- context.console.colorize(str, class) +- context.writer +- context.console.write +- context.console.println diff --git a/node_modules/istanbul-reports/index.js b/node_modules/istanbul-reports/index.js new file mode 100644 index 0000000..f0a7aa3 --- /dev/null +++ b/node_modules/istanbul-reports/index.js @@ -0,0 +1,24 @@ +'use strict'; +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +const path = require('path'); + +module.exports = { + create(name, cfg) { + cfg = cfg || {}; + let Cons; + try { + Cons = require(path.join(__dirname, 'lib', name)); + } catch (e) { + if (e.code !== 'MODULE_NOT_FOUND') { + throw e; + } + + Cons = require(name); + } + + return new Cons(cfg); + } +}; diff --git a/node_modules/istanbul-reports/lib/clover/index.js b/node_modules/istanbul-reports/lib/clover/index.js new file mode 100644 index 0000000..eeacb6e --- /dev/null +++ b/node_modules/istanbul-reports/lib/clover/index.js @@ -0,0 +1,164 @@ +'use strict'; +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +const { ReportBase } = require('istanbul-lib-report'); + +class CloverReport extends ReportBase { + constructor(opts) { + super(); + + this.cw = null; + this.xml = null; + this.projectRoot = opts.projectRoot || process.cwd(); + this.file = opts.file || 'clover.xml'; + } + + onStart(root, context) { + this.cw = context.writer.writeFile(this.file); + this.xml = context.getXMLWriter(this.cw); + this.writeRootStats(root, context); + } + + onEnd() { + this.xml.closeAll(); + this.cw.close(); + } + + getTreeStats(node, context) { + const state = { + packages: 0, + files: 0, + classes: 0 + }; + const visitor = { + onSummary(node, state) { + const metrics = node.getCoverageSummary(true); + if (metrics) { + state.packages += 1; + } + }, + onDetail(node, state) { + state.classes += 1; + state.files += 1; + } + }; + node.visit(context.getVisitor(visitor), state); + return state; + } + + writeRootStats(node, context) { + this.cw.println('<?xml version="1.0" encoding="UTF-8"?>'); + this.xml.openTag('coverage', { + generated: Date.now().toString(), + clover: '3.2.0' + }); + + this.xml.openTag('project', { + timestamp: Date.now().toString(), + name: 'All files' + }); + + const metrics = node.getCoverageSummary(); + this.xml.inlineTag('metrics', { + statements: metrics.lines.total, + coveredstatements: metrics.lines.covered, + conditionals: metrics.branches.total, + coveredconditionals: metrics.branches.covered, + methods: metrics.functions.total, + coveredmethods: metrics.functions.covered, + elements: + metrics.lines.total + + metrics.branches.total + + metrics.functions.total, + coveredelements: + metrics.lines.covered + + metrics.branches.covered + + metrics.functions.covered, + complexity: 0, + loc: metrics.lines.total, + ncloc: metrics.lines.total, // what? copied as-is from old report + ...this.getTreeStats(node, context) + }); + } + + writeMetrics(metrics) { + this.xml.inlineTag('metrics', { + statements: metrics.lines.total, + coveredstatements: metrics.lines.covered, + conditionals: metrics.branches.total, + coveredconditionals: metrics.branches.covered, + methods: metrics.functions.total, + coveredmethods: metrics.functions.covered + }); + } + + onSummary(node) { + if (node.isRoot()) { + return; + } + const metrics = node.getCoverageSummary(true); + if (!metrics) { + return; + } + + this.xml.openTag('package', { + name: asJavaPackage(node) + }); + this.writeMetrics(metrics); + } + + onSummaryEnd(node) { + if (node.isRoot()) { + return; + } + this.xml.closeTag('package'); + } + + onDetail(node) { + const fileCoverage = node.getFileCoverage(); + const metrics = node.getCoverageSummary(); + const branchByLine = fileCoverage.getBranchCoverageByLine(); + + this.xml.openTag('file', { + name: asClassName(node), + path: fileCoverage.path + }); + + this.writeMetrics(metrics); + + const lines = fileCoverage.getLineCoverage(); + Object.entries(lines).forEach(([k, count]) => { + const attrs = { + num: k, + count, + type: 'stmt' + }; + const branchDetail = branchByLine[k]; + + if (branchDetail) { + attrs.type = 'cond'; + attrs.truecount = branchDetail.covered; + attrs.falsecount = branchDetail.total - branchDetail.covered; + } + this.xml.inlineTag('line', attrs); + }); + + this.xml.closeTag('file'); + } +} + +function asJavaPackage(node) { + return node + .getRelativeName() + .replace(/\//g, '.') + .replace(/\\/g, '.') + .replace(/\.$/, ''); +} + +function asClassName(node) { + return node.getRelativeName().replace(/.*[\\/]/, ''); +} + +module.exports = CloverReport; diff --git a/node_modules/istanbul-reports/lib/cobertura/index.js b/node_modules/istanbul-reports/lib/cobertura/index.js new file mode 100644 index 0000000..e5574fa --- /dev/null +++ b/node_modules/istanbul-reports/lib/cobertura/index.js @@ -0,0 +1,151 @@ +'use strict'; +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +const path = require('path'); +const { escape } = require('html-escaper'); +const { ReportBase } = require('istanbul-lib-report'); + +class CoberturaReport extends ReportBase { + constructor(opts) { + super(); + + opts = opts || {}; + + this.cw = null; + this.xml = null; + this.timestamp = opts.timestamp || Date.now().toString(); + this.projectRoot = opts.projectRoot || process.cwd(); + this.file = opts.file || 'cobertura-coverage.xml'; + } + + onStart(root, context) { + this.cw = context.writer.writeFile(this.file); + this.xml = context.getXMLWriter(this.cw); + this.writeRootStats(root); + } + + onEnd() { + this.xml.closeAll(); + this.cw.close(); + } + + writeRootStats(node) { + const metrics = node.getCoverageSummary(); + this.cw.println('<?xml version="1.0" ?>'); + this.cw.println( + '<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">' + ); + this.xml.openTag('coverage', { + 'lines-valid': metrics.lines.total, + 'lines-covered': metrics.lines.covered, + 'line-rate': metrics.lines.pct / 100.0, + 'branches-valid': metrics.branches.total, + 'branches-covered': metrics.branches.covered, + 'branch-rate': metrics.branches.pct / 100.0, + timestamp: this.timestamp, + complexity: '0', + version: '0.1' + }); + this.xml.openTag('sources'); + this.xml.inlineTag('source', null, this.projectRoot); + this.xml.closeTag('sources'); + this.xml.openTag('packages'); + } + + onSummary(node) { + const metrics = node.getCoverageSummary(true); + if (!metrics) { + return; + } + this.xml.openTag('package', { + name: node.isRoot() ? 'main' : escape(asJavaPackage(node)), + 'line-rate': metrics.lines.pct / 100.0, + 'branch-rate': metrics.branches.pct / 100.0 + }); + this.xml.openTag('classes'); + } + + onSummaryEnd(node) { + const metrics = node.getCoverageSummary(true); + if (!metrics) { + return; + } + this.xml.closeTag('classes'); + this.xml.closeTag('package'); + } + + onDetail(node) { + const fileCoverage = node.getFileCoverage(); + const metrics = node.getCoverageSummary(); + const branchByLine = fileCoverage.getBranchCoverageByLine(); + + this.xml.openTag('class', { + name: escape(asClassName(node)), + filename: path.relative(this.projectRoot, fileCoverage.path), + 'line-rate': metrics.lines.pct / 100.0, + 'branch-rate': metrics.branches.pct / 100.0 + }); + + this.xml.openTag('methods'); + const fnMap = fileCoverage.fnMap; + Object.entries(fnMap).forEach(([k, { name, decl }]) => { + const hits = fileCoverage.f[k]; + this.xml.openTag('method', { + name: escape(name), + hits, + signature: '()V' //fake out a no-args void return + }); + this.xml.openTag('lines'); + //Add the function definition line and hits so that jenkins cobertura plugin records method hits + this.xml.inlineTag('line', { + number: decl.start.line, + hits + }); + this.xml.closeTag('lines'); + this.xml.closeTag('method'); + }); + this.xml.closeTag('methods'); + + this.xml.openTag('lines'); + const lines = fileCoverage.getLineCoverage(); + Object.entries(lines).forEach(([k, hits]) => { + const attrs = { + number: k, + hits, + branch: 'false' + }; + const branchDetail = branchByLine[k]; + + if (branchDetail) { + attrs.branch = true; + attrs['condition-coverage'] = + branchDetail.coverage + + '% (' + + branchDetail.covered + + '/' + + branchDetail.total + + ')'; + } + this.xml.inlineTag('line', attrs); + }); + + this.xml.closeTag('lines'); + this.xml.closeTag('class'); + } +} + +function asJavaPackage(node) { + return node + .getRelativeName() + .replace(/\//g, '.') + .replace(/\\/g, '.') + .replace(/\.$/, ''); +} + +function asClassName(node) { + return node.getRelativeName().replace(/.*[\\/]/, ''); +} + +module.exports = CoberturaReport; diff --git a/node_modules/istanbul-reports/lib/html-spa/.babelrc b/node_modules/istanbul-reports/lib/html-spa/.babelrc new file mode 100644 index 0000000..f995d68 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": [["@babel/preset-env", { "modules": "commonjs" }], "@babel/preset-react"] +} diff --git a/node_modules/istanbul-reports/lib/html-spa/assets/bundle.js b/node_modules/istanbul-reports/lib/html-spa/assets/bundle.js new file mode 100644 index 0000000..444f863 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/assets/bundle.js @@ -0,0 +1,30 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var l=t[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,n),l.l=!0,l.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(r,l,function(t){return e[t]}.bind(null,l));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";e.exports=n(3)},function(e,t,n){"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var r=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,o,u=a(e),c=1;c<arguments.length;c++){for(var s in n=Object(arguments[c]))l.call(n,s)&&(u[s]=n[s]);if(r){o=r(n);for(var f=0;f<o.length;f++)i.call(n,o[f])&&(u[o[f]]=n[o[f]])}}return u}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,l,i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){o=!0,l=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw l}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}for(var a=n(0),o=n(4),u=n(8),c=n(9),s=n(10),f=n(11),d=n(12),p=n(13),m=n(14),h=n(15),v=h.setLocation,y=h.decodeLocation,g=a.useState,b=a.useMemo,w=a.useEffect,E=window.data,k={},x=0;x<window.metricsToShow.length;x++)k[window.metricsToShow[x]]=!0;var S=!0;function T(){var e=y(),t=l(g(e&&e.activeSort||{sortKey:"file",order:"desc"}),2),n=t[0],i=t[1],h=l(g(e&&e.isFlat||!1),2),x=h[0],T=h[1],C=l(g(e&&e.activeFilters||{low:!0,medium:!0,high:!0}),2),_=C[0],P=C[1],N=l(g(e&&e.expandedLines||[]),2),O=N[0],F=N[1],z=l(g(e&&e.fileFilter||""),2),I=z[0],M=z[1],R=b((function(){return f(E,k,n,x,_,I)}),[n,x,_,I]),L=E.metrics;return w((function(){v(S,n,x,_,I,O),S=!1}),[n,x,_,I,O]),w((function(){window.onpopstate=function(){var e=y();e&&o.unstable_batchedUpdates((function(){P(e.activeFilters),i(e.activeSort),T(e.isFlat),F(e.expandedLines),M(e.fileFilter)}))}}),[]),a.createElement("div",{className:"layout"},a.createElement("div",{className:"layout__section"},a.createElement(s,{metrics:L,metricsToShow:k})),a.createElement("div",{className:"layout__section"},a.createElement("div",{className:"toolbar"},a.createElement("div",{className:"toolbar__item"},a.createElement(d,{setIsFlat:T,isFlat:x})),a.createElement("div",{className:"toolbar__item"},a.createElement(p,{activeFilters:_,setFilters:P})))),a.createElement("div",{className:"layout__section"},a.createElement("h1",null,a.createElement(m,{fileFilter:I,setFileFilter:M}))),a.createElement("div",{className:"layout__section layout__section--fill"},a.createElement("table",{className:"coverage-summary"},a.createElement(u,{onSort:function(e){i(e)},activeSort:n,metricsToShow:k}),a.createElement("tbody",null,R.map((function(e){return a.createElement(c,r({},e,{key:e.file,metricsToShow:k,expandedLines:O,setExpandedLines:F,fileFilter:I,setFileFilter:M}))}))))),a.createElement("div",{className:"layout__section center small quiet"},"Code coverage generated by"," ",a.createElement("a",{href:"https://istanbul.js.org/",target:"_blank",rel:"noopener noreferrer"},"istanbul")," ","at ",window.generatedDatetime))}o.render(a.createElement(T,null),document.getElementById("app"))},function(e,t,n){"use strict"; +/** @license React v16.14.0 + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r=n(1),l="function"==typeof Symbol&&Symbol.for,i=l?Symbol.for("react.element"):60103,a=l?Symbol.for("react.portal"):60106,o=l?Symbol.for("react.fragment"):60107,u=l?Symbol.for("react.strict_mode"):60108,c=l?Symbol.for("react.profiler"):60114,s=l?Symbol.for("react.provider"):60109,f=l?Symbol.for("react.context"):60110,d=l?Symbol.for("react.forward_ref"):60112,p=l?Symbol.for("react.suspense"):60113,m=l?Symbol.for("react.memo"):60115,h=l?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||g}function E(){}function k(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||g}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(y(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},E.prototype=w.prototype;var x=k.prototype=new E;x.constructor=k,r(x,w.prototype),x.isPureReactComponent=!0;var S={current:null},T=Object.prototype.hasOwnProperty,C={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,n){var r,l={},a=null,o=null;if(null!=t)for(r in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(a=""+t.key),t)T.call(t,r)&&!C.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(1===u)l.children=n;else if(1<u){for(var c=Array(u),s=0;s<u;s++)c[s]=arguments[s+2];l.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===l[r]&&(l[r]=u[r]);return{$$typeof:i,type:e,key:a,ref:o,props:l,_owner:S.current}}function P(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var N=/\/+/g,O=[];function F(e,t,n,r){if(O.length){var l=O.pop();return l.result=e,l.keyPrefix=t,l.func=n,l.context=r,l.count=0,l}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function z(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>O.length&&O.push(e)}function I(e,t,n){return null==e?0:function e(t,n,r,l){var o=typeof t;"undefined"!==o&&"boolean"!==o||(t=null);var u=!1;if(null===t)u=!0;else switch(o){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case a:u=!0}}if(u)return r(l,t,""===n?"."+M(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var s=n+M(o=t[c],c);u+=e(o,s,r,l)}else if(null===t||"object"!=typeof t?s=null:s="function"==typeof(s=v&&t[v]||t["@@iterator"])?s:null,"function"==typeof s)for(t=s.call(t),c=0;!(o=t.next()).done;)u+=e(o=o.value,s=n+M(o,c++),r,l);else if("object"===o)throw r=""+t,Error(y(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return u}(e,"",t,n)}function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function R(e,t){e.func.call(e.context,t,e.count++)}function L(e,t,n){var r=e.result,l=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?D(e,r,n,(function(e){return e})):null!=e&&(P(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,l+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(N,"$&/")+"/")+n)),r.push(e))}function D(e,t,n,r,l){var i="";null!=n&&(i=(""+n).replace(N,"$&/")+"/"),I(e,L,t=F(t,i,r,l)),z(t)}var j={current:null};function A(){var e=j.current;if(null===e)throw Error(y(321));return e}var U={ReactCurrentDispatcher:j,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return D(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;I(e,R,t=F(null,null,t,n)),z(t)},count:function(e){return I(e,(function(){return null}),null)},toArray:function(e){var t=[];return D(e,t,null,(function(e){return e})),t},only:function(e){if(!P(e))throw Error(y(143));return e}},t.Component=w,t.Fragment=o,t.Profiler=c,t.PureComponent=k,t.StrictMode=u,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,t.cloneElement=function(e,t,n){if(null==e)throw Error(y(267,e));var l=r({},e.props),a=e.key,o=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,u=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(s in t)T.call(t,s)&&!C.hasOwnProperty(s)&&(l[s]=void 0===t[s]&&void 0!==c?c[s]:t[s])}var s=arguments.length-2;if(1===s)l.children=n;else if(1<s){c=Array(s);for(var f=0;f<s;f++)c[f]=arguments[f+2];l.children=c}return{$$typeof:i,type:e.type,key:a,ref:o,props:l,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=_,t.createFactory=function(e){var t=_.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=P,t.lazy=function(e){return{$$typeof:h,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return A().useCallback(e,t)},t.useContext=function(e,t){return A().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return A().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return A().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return A().useLayoutEffect(e,t)},t.useMemo=function(e,t){return A().useMemo(e,t)},t.useReducer=function(e,t,n){return A().useReducer(e,t,n)},t.useRef=function(e){return A().useRef(e)},t.useState=function(e){return A().useState(e)},t.version="16.14.0"},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(5)},function(e,t,n){"use strict"; +/** @license React v16.14.0 + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r=n(0),l=n(1),i=n(6);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function o(e,t,n,r,l,i,a,o,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var u=!1,c=null,s=!1,f=null,d={onError:function(e){u=!0,c=e}};function p(e,t,n,r,l,i,a,s,f){u=!1,c=null,o.apply(d,arguments)}var m=null,h=null,v=null;function y(e,t,n){var r=e.type||"unknown-event";e.currentTarget=v(n),function(e,t,n,r,l,i,o,d,m){if(p.apply(this,arguments),u){if(!u)throw Error(a(198));var h=c;u=!1,c=null,s||(s=!0,f=h)}}(r,t,void 0,e),e.currentTarget=null}var g=null,b={};function w(){if(g)for(var e in b){var t=b[e],n=g.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!k[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in k[n]=t,n=t.eventTypes){var l=void 0,i=n[r],o=t,u=r;if(x.hasOwnProperty(u))throw Error(a(99,u));x[u]=i;var c=i.phasedRegistrationNames;if(c){for(l in c)c.hasOwnProperty(l)&&E(c[l],o,u);l=!0}else i.registrationName?(E(i.registrationName,o,u),l=!0):l=!1;if(!l)throw Error(a(98,r,e))}}}}function E(e,t,n){if(S[e])throw Error(a(100,e));S[e]=t,T[e]=t.eventTypes[n].dependencies}var k=[],x={},S={},T={};function C(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&w()}var _=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),P=null,N=null,O=null;function F(e){if(e=h(e)){if("function"!=typeof P)throw Error(a(280));var t=e.stateNode;t&&(t=m(t),P(e.stateNode,e.type,t))}}function z(e){N?O?O.push(e):O=[e]:N=e}function I(){if(N){var e=N,t=O;if(O=N=null,F(e),t)for(e=0;e<t.length;e++)F(t[e])}}function M(e,t){return e(t)}function R(e,t,n,r,l){return e(t,n,r,l)}function L(){}var D=M,j=!1,A=!1;function U(){null===N&&null===O||(L(),I())}function V(e,t,n){if(A)return e(t,n);A=!0;try{return D(e,t,n)}finally{A=!1,U()}}var W=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Q=Object.prototype.hasOwnProperty,$={},B={};function H(e,t,n,r,l,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var K={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){K[e]=new H(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];K[t]=new H(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){K[e]=new H(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){K[e]=new H(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){K[e]=new H(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){K[e]=new H(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){K[e]=new H(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){K[e]=new H(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){K[e]=new H(e,5,!1,e.toLowerCase(),null,!1)}));var q=/[\-:]([a-z])/g;function Y(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(q,Y);K[t]=new H(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(q,Y);K[t]=new H(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(q,Y);K[t]=new H(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){K[e]=new H(e,1,!1,e.toLowerCase(),null,!1)})),K.xlinkHref=new H("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){K[e]=new H(e,1,!1,e.toLowerCase(),null,!0)}));var X=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function G(e,t,n,r){var l=K.hasOwnProperty(t)?K[t]:null;(null!==l?0===l.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,l,r)&&(n=null),r||null===l?function(e){return!!Q.call(B,e)||!Q.call($,e)&&(W.test(e)?B[e]=!0:($[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=null===n?3!==l.type&&"":n:(t=l.attributeName,r=l.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(l=l.type)||4===l&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}X.hasOwnProperty("ReactCurrentDispatcher")||(X.ReactCurrentDispatcher={current:null}),X.hasOwnProperty("ReactCurrentBatchConfig")||(X.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,Z="function"==typeof Symbol&&Symbol.for,ee=Z?Symbol.for("react.element"):60103,te=Z?Symbol.for("react.portal"):60106,ne=Z?Symbol.for("react.fragment"):60107,re=Z?Symbol.for("react.strict_mode"):60108,le=Z?Symbol.for("react.profiler"):60114,ie=Z?Symbol.for("react.provider"):60109,ae=Z?Symbol.for("react.context"):60110,oe=Z?Symbol.for("react.concurrent_mode"):60111,ue=Z?Symbol.for("react.forward_ref"):60112,ce=Z?Symbol.for("react.suspense"):60113,se=Z?Symbol.for("react.suspense_list"):60120,fe=Z?Symbol.for("react.memo"):60115,de=Z?Symbol.for("react.lazy"):60116,pe=Z?Symbol.for("react.block"):60121,me="function"==typeof Symbol&&Symbol.iterator;function he(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=me&&e[me]||e["@@iterator"])?e:null}function ve(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case le:return"Profiler";case re:return"StrictMode";case ce:return"Suspense";case se:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case ue:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return ve(e.type);case pe:return ve(e.render);case de:if(e=1===e._status?e._result:null)return ve(e)}return null}function ye(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,l=e._debugSource,i=ve(e.type);n=null,r&&(n=ve(r.type)),r=i,i="",l?i=" (at "+l.fileName.replace(J,"")+":"+l.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function ge(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ee(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function ke(e,t){var n=t.checked;return l({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function xe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ge(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Se(e,t){null!=(t=t.checked)&&G(e,"checked",t,!1)}function Te(e,t){Se(e,t);var n=ge(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?_e(e,t.type,n):t.hasOwnProperty("defaultValue")&&_e(e,t.type,ge(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ce(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function _e(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Pe(e,t){return e=l({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Ne(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ge(n),t=null,l=0;l<e.length;l++){if(e[l].value===n)return e[l].selected=!0,void(r&&(e[l].defaultSelected=!0));null!==t||e[l].disabled||(t=e[l])}null!==t&&(t.selected=!0)}}function Oe(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return l({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Fe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ge(n)}}function ze(e,t){var n=ge(t.value),r=ge(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Me="http://www.w3.org/1999/xhtml",Re="http://www.w3.org/2000/svg";function Le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function De(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Le(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var je,Ae=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==Re||"innerHTML"in e)e.innerHTML=t;else{for((je=je||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=je.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function Ue(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ve(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var We={animationend:Ve("Animation","AnimationEnd"),animationiteration:Ve("Animation","AnimationIteration"),animationstart:Ve("Animation","AnimationStart"),transitionend:Ve("Transition","TransitionEnd")},Qe={},$e={};function Be(e){if(Qe[e])return Qe[e];if(!We[e])return e;var t,n=We[e];for(t in n)if(n.hasOwnProperty(t)&&t in $e)return Qe[e]=n[t];return e}_&&($e=document.createElement("div").style,"AnimationEvent"in window||(delete We.animationend.animation,delete We.animationiteration.animation,delete We.animationstart.animation),"TransitionEvent"in window||delete We.transitionend.transition);var He=Be("animationend"),Ke=Be("animationiteration"),qe=Be("animationstart"),Ye=Be("transitionend"),Xe="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ge=new("function"==typeof WeakMap?WeakMap:Map);function Je(e){var t=Ge.get(e);return void 0===t&&(t=new Map,Ge.set(e,t)),t}function Ze(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function et(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function tt(e){if(Ze(e)!==e)throw Error(a(188))}function nt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ze(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(null===l)break;var i=l.alternate;if(null===i){if(null!==(r=l.return)){n=r;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return tt(l),e;if(i===r)return tt(l),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=l,r=i;else{for(var o=!1,u=l.child;u;){if(u===n){o=!0,n=l,r=i;break}if(u===r){o=!0,r=l,n=i;break}u=u.sibling}if(!o){for(u=i.child;u;){if(u===n){o=!0,n=i,r=l;break}if(u===r){o=!0,r=i,n=l;break}u=u.sibling}if(!o)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function rt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function lt(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var it=null;function at(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)y(e,t[r],n[r]);else t&&y(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function ot(e){if(null!==e&&(it=rt(it,e)),e=it,it=null,e){if(lt(e,at),it)throw Error(a(95));if(s)throw e=f,s=!1,f=null,e}}function ut(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ct(e){if(!_)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var st=[];function ft(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>st.length&&st.push(e)}function dt(e,t,n,r){if(st.length){var l=st.pop();return l.topLevelType=e,l.eventSystemFlags=r,l.nativeEvent=t,l.targetInst=n,l}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function pt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=_n(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var l=ut(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var o=null,u=0;u<k.length;u++){var c=k[u];c&&(c=c.extractEvents(r,t,i,l,a))&&(o=rt(o,c))}ot(o)}}function mt(e,t,n){if(!n.has(e)){switch(e){case"scroll":qt(t,"scroll",!0);break;case"focus":case"blur":qt(t,"focus",!0),qt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ct(e)&&qt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Xe.indexOf(e)&&Kt(e,t)}n.set(e,null)}}var ht,vt,yt,gt=!1,bt=[],wt=null,Et=null,kt=null,xt=new Map,St=new Map,Tt=[],Ct="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),_t="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Pt(e,t,n,r,l){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:l,container:r}}function Nt(e,t){switch(e){case"focus":case"blur":wt=null;break;case"dragenter":case"dragleave":Et=null;break;case"mouseover":case"mouseout":kt=null;break;case"pointerover":case"pointerout":xt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":St.delete(t.pointerId)}}function Ot(e,t,n,r,l,i){return null===e||e.nativeEvent!==i?(e=Pt(t,n,r,l,i),null!==t&&(null!==(t=Pn(t))&&vt(t)),e):(e.eventSystemFlags|=r,e)}function Ft(e){var t=_n(e.target);if(null!==t){var n=Ze(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=et(n)))return e.blockedOn=t,void i.unstable_runWithPriority(e.priority,(function(){yt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function zt(e){if(null!==e.blockedOn)return!1;var t=Jt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=Pn(t);return null!==n&&vt(n),e.blockedOn=t,!1}return!0}function It(e,t,n){zt(e)&&n.delete(t)}function Mt(){for(gt=!1;0<bt.length;){var e=bt[0];if(null!==e.blockedOn){null!==(e=Pn(e.blockedOn))&&ht(e);break}var t=Jt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:bt.shift()}null!==wt&&zt(wt)&&(wt=null),null!==Et&&zt(Et)&&(Et=null),null!==kt&&zt(kt)&&(kt=null),xt.forEach(It),St.forEach(It)}function Rt(e,t){e.blockedOn===t&&(e.blockedOn=null,gt||(gt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Mt)))}function Lt(e){function t(t){return Rt(t,e)}if(0<bt.length){Rt(bt[0],e);for(var n=1;n<bt.length;n++){var r=bt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==wt&&Rt(wt,e),null!==Et&&Rt(Et,e),null!==kt&&Rt(kt,e),xt.forEach(t),St.forEach(t),n=0;n<Tt.length;n++)(r=Tt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Tt.length&&null===(n=Tt[0]).blockedOn;)Ft(n),null===n.blockedOn&&Tt.shift()}var Dt={},jt=new Map,At=new Map,Ut=["abort","abort",He,"animationEnd",Ke,"animationIteration",qe,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ye,"transitionEnd","waiting","waiting"];function Vt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],l=e[n+1],i="on"+(l[0].toUpperCase()+l.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},At.set(r,t),jt.set(r,i),Dt[l]=i}}Vt("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Vt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Vt(Ut,2);for(var Wt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Qt=0;Qt<Wt.length;Qt++)At.set(Wt[Qt],0);var $t=i.unstable_UserBlockingPriority,Bt=i.unstable_runWithPriority,Ht=!0;function Kt(e,t){qt(t,e,!1)}function qt(e,t,n){var r=At.get(t);switch(void 0===r?2:r){case 0:r=Yt.bind(null,t,1,e);break;case 1:r=Xt.bind(null,t,1,e);break;default:r=Gt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Yt(e,t,n,r){j||L();var l=Gt,i=j;j=!0;try{R(l,e,t,n,r)}finally{(j=i)||U()}}function Xt(e,t,n,r){Bt($t,Gt.bind(null,e,t,n,r))}function Gt(e,t,n,r){if(Ht)if(0<bt.length&&-1<Ct.indexOf(e))e=Pt(null,e,t,n,r),bt.push(e);else{var l=Jt(e,t,n,r);if(null===l)Nt(e,r);else if(-1<Ct.indexOf(e))e=Pt(l,e,t,n,r),bt.push(e);else if(!function(e,t,n,r,l){switch(t){case"focus":return wt=Ot(wt,e,t,n,r,l),!0;case"dragenter":return Et=Ot(Et,e,t,n,r,l),!0;case"mouseover":return kt=Ot(kt,e,t,n,r,l),!0;case"pointerover":var i=l.pointerId;return xt.set(i,Ot(xt.get(i)||null,e,t,n,r,l)),!0;case"gotpointercapture":return i=l.pointerId,St.set(i,Ot(St.get(i)||null,e,t,n,r,l)),!0}return!1}(l,e,t,n,r)){Nt(e,r),e=dt(e,r,null,t);try{V(pt,e)}finally{ft(e)}}}}function Jt(e,t,n,r){if(null!==(n=_n(n=ut(r)))){var l=Ze(n);if(null===l)n=null;else{var i=l.tag;if(13===i){if(null!==(n=et(l)))return n;n=null}else if(3===i){if(l.stateNode.hydrate)return 3===l.tag?l.stateNode.containerInfo:null;n=null}else l!==n&&(n=null)}}e=dt(e,r,n,t);try{V(pt,e)}finally{ft(e)}return null}var Zt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},en=["Webkit","ms","Moz","O"];function tn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Zt.hasOwnProperty(e)&&Zt[e]?(""+t).trim():t+"px"}function nn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),l=tn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}Object.keys(Zt).forEach((function(e){en.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zt[t]=Zt[e]}))}));var rn=l({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ln(e,t){if(t){if(rn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function an(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var on=Me;function un(e,t){var n=Je(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=T[t];for(var r=0;r<t.length;r++)mt(t[r],e,n)}function cn(){}function sn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function fn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dn(e,t){var n,r=fn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fn(r)}}function pn(){for(var e=window,t=sn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=sn((e=t.contentWindow).document)}return t}function mn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var hn=null,vn=null;function yn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function gn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var bn="function"==typeof setTimeout?setTimeout:void 0,wn="function"==typeof clearTimeout?clearTimeout:void 0;function En(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function kn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var xn=Math.random().toString(36).slice(2),Sn="__reactInternalInstance$"+xn,Tn="__reactEventHandlers$"+xn,Cn="__reactContainere$"+xn;function _n(e){var t=e[Sn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cn]||n[Sn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=kn(e);null!==e;){if(n=e[Sn])return n;e=kn(e)}return t}n=(e=n).parentNode}return null}function Pn(e){return!(e=e[Sn]||e[Cn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Nn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function On(e){return e[Tn]||null}function Fn(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function zn(e,t){var n=e.stateNode;if(!n)return null;var r=m(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function In(e,t,n){(t=zn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Mn(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Fn(t);for(t=n.length;0<t--;)In(n[t],"captured",e);for(t=0;t<n.length;t++)In(n[t],"bubbled",e)}}function Rn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=zn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Ln(e){e&&e.dispatchConfig.registrationName&&Rn(e._targetInst,null,e)}function Dn(e){lt(e,Mn)}var jn=null,An=null,Un=null;function Vn(){if(Un)return Un;var e,t,n=An,r=n.length,l="value"in jn?jn.value:jn.textContent,i=l.length;for(e=0;e<r&&n[e]===l[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===l[i-t];t++);return Un=l.slice(e,1<t?1-t:void 0)}function Wn(){return!0}function Qn(){return!1}function $n(e,t,n,r){for(var l in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(l)&&((t=e[l])?this[l]=t(n):"target"===l?this.target=r:this[l]=n[l]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Wn:Qn,this.isPropagationStopped=Qn,this}function Bn(e,t,n,r){if(this.eventPool.length){var l=this.eventPool.pop();return this.call(l,e,t,n,r),l}return new this(e,t,n,r)}function Hn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Kn(e){e.eventPool=[],e.getPooled=Bn,e.release=Hn}l($n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Wn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Wn)},persist:function(){this.isPersistent=Wn},isPersistent:Qn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Qn,this._dispatchInstances=this._dispatchListeners=null}}),$n.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},$n.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return l(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=l({},r.Interface,e),n.extend=r.extend,Kn(n),n},Kn($n);var qn=$n.extend({data:null}),Yn=$n.extend({data:null}),Xn=[9,13,27,32],Gn=_&&"CompositionEvent"in window,Jn=null;_&&"documentMode"in document&&(Jn=document.documentMode);var Zn=_&&"TextEvent"in window&&!Jn,er=_&&(!Gn||Jn&&8<Jn&&11>=Jn),tr=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function lr(e,t){switch(e){case"keyup":return-1!==Xn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ir(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ar=!1;var or={eventTypes:nr,extractEvents:function(e,t,n,r){var l;if(Gn)e:{switch(e){case"compositionstart":var i=nr.compositionStart;break e;case"compositionend":i=nr.compositionEnd;break e;case"compositionupdate":i=nr.compositionUpdate;break e}i=void 0}else ar?lr(e,n)&&(i=nr.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=nr.compositionStart);return i?(er&&"ko"!==n.locale&&(ar||i!==nr.compositionStart?i===nr.compositionEnd&&ar&&(l=Vn()):(An="value"in(jn=r)?jn.value:jn.textContent,ar=!0)),i=qn.getPooled(i,t,n,r),l?i.data=l:null!==(l=ir(n))&&(i.data=l),Dn(i),l=i):l=null,(e=Zn?function(e,t){switch(e){case"compositionend":return ir(t);case"keypress":return 32!==t.which?null:(rr=!0,tr);case"textInput":return(e=t.data)===tr&&rr?null:e;default:return null}}(e,n):function(e,t){if(ar)return"compositionend"===e||!Gn&&lr(e,t)?(e=Vn(),Un=An=jn=null,ar=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return er&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=Yn.getPooled(nr.beforeInput,t,n,r)).data=e,Dn(t)):t=null,null===l?t:null===t?l:[l,t]}},ur={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ur[e.type]:"textarea"===t}var sr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function fr(e,t,n){return(e=$n.getPooled(sr.change,e,t,n)).type="change",z(n),Dn(e),e}var dr=null,pr=null;function mr(e){ot(e)}function hr(e){if(Ee(Nn(e)))return e}function vr(e,t){if("change"===e)return t}var yr=!1;function gr(){dr&&(dr.detachEvent("onpropertychange",br),pr=dr=null)}function br(e){if("value"===e.propertyName&&hr(pr))if(e=fr(pr,e,ut(e)),j)ot(e);else{j=!0;try{M(mr,e)}finally{j=!1,U()}}}function wr(e,t,n){"focus"===e?(gr(),pr=n,(dr=t).attachEvent("onpropertychange",br)):"blur"===e&&gr()}function Er(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return hr(pr)}function kr(e,t){if("click"===e)return hr(t)}function xr(e,t){if("input"===e||"change"===e)return hr(t)}_&&(yr=ct("input")&&(!document.documentMode||9<document.documentMode));var Sr={eventTypes:sr,_isInputEventSupported:yr,extractEvents:function(e,t,n,r){var l=t?Nn(t):window,i=l.nodeName&&l.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===l.type)var a=vr;else if(cr(l))if(yr)a=xr;else{a=Er;var o=wr}else(i=l.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(a=kr);if(a&&(a=a(e,t)))return fr(a,n,r);o&&o(e,l,t),"blur"===e&&(e=l._wrapperState)&&e.controlled&&"number"===l.type&&_e(l,"number",l.value)}},Tr=$n.extend({view:null,detail:null}),Cr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _r(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Cr[e])&&!!t[e]}function Pr(){return _r}var Nr=0,Or=0,Fr=!1,zr=!1,Ir=Tr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Pr,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Nr;return Nr=e.screenX,Fr?"mousemove"===e.type?e.screenX-t:0:(Fr=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Or;return Or=e.screenY,zr?"mousemove"===e.type?e.screenY-t:0:(zr=!0,0)}}),Mr=Ir.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Rr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Lr={eventTypes:Rr,extractEvents:function(e,t,n,r,l){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&l)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a)?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?_n(t):null)&&(t!==Ze(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null;if(a===t)return null;if("mouseout"===e||"mouseover"===e)var o=Ir,u=Rr.mouseLeave,c=Rr.mouseEnter,s="mouse";else"pointerout"!==e&&"pointerover"!==e||(o=Mr,u=Rr.pointerLeave,c=Rr.pointerEnter,s="pointer");if(e=null==a?i:Nn(a),i=null==t?i:Nn(t),(u=o.getPooled(u,a,n,r)).type=s+"leave",u.target=e,u.relatedTarget=i,(n=o.getPooled(c,t,n,r)).type=s+"enter",n.target=i,n.relatedTarget=e,s=t,(r=a)&&s)e:{for(c=s,a=0,e=o=r;e;e=Fn(e))a++;for(e=0,t=c;t;t=Fn(t))e++;for(;0<a-e;)o=Fn(o),a--;for(;0<e-a;)c=Fn(c),e--;for(;a--;){if(o===c||o===c.alternate)break e;o=Fn(o),c=Fn(c)}o=null}else o=null;for(c=o,o=[];r&&r!==c&&(null===(a=r.alternate)||a!==c);)o.push(r),r=Fn(r);for(r=[];s&&s!==c&&(null===(a=s.alternate)||a!==c);)r.push(s),s=Fn(s);for(s=0;s<o.length;s++)Rn(o[s],"bubbled",u);for(s=r.length;0<s--;)Rn(r[s],"captured",n);return 0==(64&l)?[u]:[u,n]}};var Dr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},jr=Object.prototype.hasOwnProperty;function Ar(e,t){if(Dr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!jr.call(t,n[r])||!Dr(e[n[r]],t[n[r]]))return!1;return!0}var Ur=_&&"documentMode"in document&&11>=document.documentMode,Vr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Wr=null,Qr=null,$r=null,Br=!1;function Hr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Br||null==Wr||Wr!==sn(n)?null:("selectionStart"in(n=Wr)&&mn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},$r&&Ar($r,n)?null:($r=n,(e=$n.getPooled(Vr.select,Qr,e,t)).type="select",e.target=Wr,Dn(e),e))}var Kr={eventTypes:Vr,extractEvents:function(e,t,n,r,l,i){if(!(i=!(l=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{l=Je(l),i=T.onSelect;for(var a=0;a<i.length;a++)if(!l.has(i[a])){l=!1;break e}l=!0}i=!l}if(i)return null;switch(l=t?Nn(t):window,e){case"focus":(cr(l)||"true"===l.contentEditable)&&(Wr=l,Qr=t,$r=null);break;case"blur":$r=Qr=Wr=null;break;case"mousedown":Br=!0;break;case"contextmenu":case"mouseup":case"dragend":return Br=!1,Hr(n,r);case"selectionchange":if(Ur)break;case"keydown":case"keyup":return Hr(n,r)}return null}},qr=$n.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Yr=$n.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Xr=Tr.extend({relatedTarget:null});function Gr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Jr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},el=Tr.extend({key:function(e){if(e.key){var t=Jr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Gr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Zr[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Pr,charCode:function(e){return"keypress"===e.type?Gr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Gr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),tl=Ir.extend({dataTransfer:null}),nl=Tr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Pr}),rl=$n.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ll=Ir.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),il={eventTypes:Dt,extractEvents:function(e,t,n,r){var l=jt.get(e);if(!l)return null;switch(e){case"keypress":if(0===Gr(n))return null;case"keydown":case"keyup":e=el;break;case"blur":case"focus":e=Xr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Ir;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=tl;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=nl;break;case He:case Ke:case qe:e=qr;break;case Ye:e=rl;break;case"scroll":e=Tr;break;case"wheel":e=ll;break;case"copy":case"cut":case"paste":e=Yr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Mr;break;default:e=$n}return Dn(t=e.getPooled(l,t,n,r)),t}};if(g)throw Error(a(101));g=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),m=On,h=Pn,v=Nn,C({SimpleEventPlugin:il,EnterLeaveEventPlugin:Lr,ChangeEventPlugin:Sr,SelectEventPlugin:Kr,BeforeInputEventPlugin:or});var al=[],ol=-1;function ul(e){0>ol||(e.current=al[ol],al[ol]=null,ol--)}function cl(e,t){ol++,al[ol]=e.current,e.current=t}var sl={},fl={current:sl},dl={current:!1},pl=sl;function ml(e,t){var n=e.type.contextTypes;if(!n)return sl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l,i={};for(l in n)i[l]=t[l];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function hl(e){return null!=(e=e.childContextTypes)}function vl(){ul(dl),ul(fl)}function yl(e,t,n){if(fl.current!==sl)throw Error(a(168));cl(fl,t),cl(dl,n)}function gl(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,ve(t)||"Unknown",i));return l({},n,{},r)}function bl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sl,pl=fl.current,cl(fl,e),cl(dl,dl.current),!0}function wl(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=gl(e,t,pl),r.__reactInternalMemoizedMergedChildContext=e,ul(dl),ul(fl),cl(fl,e)):ul(dl),cl(dl,n)}var El=i.unstable_runWithPriority,kl=i.unstable_scheduleCallback,xl=i.unstable_cancelCallback,Sl=i.unstable_requestPaint,Tl=i.unstable_now,Cl=i.unstable_getCurrentPriorityLevel,_l=i.unstable_ImmediatePriority,Pl=i.unstable_UserBlockingPriority,Nl=i.unstable_NormalPriority,Ol=i.unstable_LowPriority,Fl=i.unstable_IdlePriority,zl={},Il=i.unstable_shouldYield,Ml=void 0!==Sl?Sl:function(){},Rl=null,Ll=null,Dl=!1,jl=Tl(),Al=1e4>jl?Tl:function(){return Tl()-jl};function Ul(){switch(Cl()){case _l:return 99;case Pl:return 98;case Nl:return 97;case Ol:return 96;case Fl:return 95;default:throw Error(a(332))}}function Vl(e){switch(e){case 99:return _l;case 98:return Pl;case 97:return Nl;case 96:return Ol;case 95:return Fl;default:throw Error(a(332))}}function Wl(e,t){return e=Vl(e),El(e,t)}function Ql(e,t,n){return e=Vl(e),kl(e,t,n)}function $l(e){return null===Rl?(Rl=[e],Ll=kl(_l,Hl)):Rl.push(e),zl}function Bl(){if(null!==Ll){var e=Ll;Ll=null,xl(e)}Hl()}function Hl(){if(!Dl&&null!==Rl){Dl=!0;var e=0;try{var t=Rl;Wl(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Rl=null}catch(t){throw null!==Rl&&(Rl=Rl.slice(e+1)),kl(_l,Bl),t}finally{Dl=!1}}}function Kl(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function ql(e,t){if(e&&e.defaultProps)for(var n in t=l({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Yl={current:null},Xl=null,Gl=null,Jl=null;function Zl(){Jl=Gl=Xl=null}function ei(e){var t=Yl.current;ul(Yl),e.type._context._currentValue=t}function ti(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ni(e,t){Xl=e,Jl=Gl=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Na=!0),e.firstContext=null)}function ri(e,t){if(Jl!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Jl=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Gl){if(null===Xl)throw Error(a(308));Gl=t,Xl.dependencies={expirationTime:0,firstContext:t,responders:null}}else Gl=Gl.next=t;return e._currentValue}var li=!1;function ii(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ai(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function oi(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function ui(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function ci(e,t){var n=e.alternate;null!==n&&ai(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function si(e,t,n,r){var i=e.updateQueue;li=!1;var a=i.baseQueue,o=i.shared.pending;if(null!==o){if(null!==a){var u=a.next;a.next=o.next,o.next=u}a=o,i.shared.pending=null,null!==(u=e.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=o))}if(null!==a){u=a.next;var c=i.baseState,s=0,f=null,d=null,p=null;if(null!==u)for(var m=u;;){if((o=m.expirationTime)<r){var h={expirationTime:m.expirationTime,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,callback:m.callback,next:null};null===p?(d=p=h,f=c):p=p.next=h,o>s&&(s=o)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,callback:m.callback,next:null}),iu(o,m.suspenseConfig);e:{var v=e,y=m;switch(o=t,h=n,y.tag){case 1:if("function"==typeof(v=y.payload)){c=v.call(h,c,o);break e}c=v;break e;case 3:v.effectTag=-4097&v.effectTag|64;case 0:if(null==(o="function"==typeof(v=y.payload)?v.call(h,c,o):v))break e;c=l({},c,o);break e;case 2:li=!0}}null!==m.callback&&(e.effectTag|=32,null===(o=i.effects)?i.effects=[m]:o.push(m))}if(null===(m=m.next)||m===u){if(null===(o=i.shared.pending))break;m=a.next=o.next,o.next=u,i.baseQueue=a=o,i.shared.pending=null}}null===p?f=c:p.next=d,i.baseState=f,i.baseQueue=p,au(s),e.expirationTime=s,e.memoizedState=c}}function fi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(null!==l){if(r.callback=null,r=l,l=n,"function"!=typeof r)throw Error(a(191,r));r.call(l)}}}var di=X.ReactCurrentBatchConfig,pi=(new r.Component).refs;function mi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:l({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var hi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Ze(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Ho(),l=di.suspense;(l=oi(r=Ko(r,e,l),l)).payload=t,null!=n&&(l.callback=n),ui(e,l),qo(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Ho(),l=di.suspense;(l=oi(r=Ko(r,e,l),l)).tag=1,l.payload=t,null!=n&&(l.callback=n),ui(e,l),qo(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Ho(),r=di.suspense;(r=oi(n=Ko(n,e,r),r)).tag=2,null!=t&&(r.callback=t),ui(e,r),qo(e,n)}};function vi(e,t,n,r,l,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!Ar(n,r)||!Ar(l,i))}function yi(e,t,n){var r=!1,l=sl,i=t.contextType;return"object"==typeof i&&null!==i?i=ri(i):(l=hl(t)?pl:fl.current,i=(r=null!=(r=t.contextTypes))?ml(e,l):sl),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=hi,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function gi(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&hi.enqueueReplaceState(t,t.state,null)}function bi(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs=pi,ii(e);var i=t.contextType;"object"==typeof i&&null!==i?l.context=ri(i):(i=hl(t)?pl:fl.current,l.context=ml(e,i)),si(e,n,l,r),l.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(mi(e,t,i,n),l.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof l.getSnapshotBeforeUpdate||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||(t=l.state,"function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount(),t!==l.state&&hi.enqueueReplaceState(l,l.state,null),si(e,n,l,r),l.state=e.memoizedState),"function"==typeof l.componentDidMount&&(e.effectTag|=4)}var wi=Array.isArray;function Ei(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var l=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===l?t.ref:((t=function(e){var t=r.refs;t===pi&&(t=r.refs={}),null===e?delete t[l]:t[l]=e})._stringRef=l,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ki(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function xi(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function l(e,t){return(e=Cu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function o(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Nu(n,e.mode,r)).return=e,t):((t=l(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=l(t,n.props)).ref=Ei(e,t,n),r.return=e,r):((r=_u(n.type,n.key,n.props,null,e.mode,r)).ref=Ei(e,t,n),r.return=e,r)}function s(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ou(n,e.mode,r)).return=e,t):((t=l(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Pu(n,e.mode,r,i)).return=e,t):((t=l(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Nu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=_u(t.type,t.key,t.props,null,e.mode,n)).ref=Ei(e,null,t),n.return=e,n;case te:return(t=Ou(t,e.mode,n)).return=e,t}if(wi(t)||he(t))return(t=Pu(t,e.mode,n,null)).return=e,t;ki(e,t)}return null}function p(e,t,n,r){var l=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==l?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===l?n.type===ne?f(e,t,n.props.children,r,l):c(e,t,n,r):null;case te:return n.key===l?s(e,t,n,r):null}if(wi(n)||he(n))return null!==l?null:f(e,t,n,r,null);ki(e,n)}return null}function m(e,t,n,r,l){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,l);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?f(t,e,r.props.children,l,r.key):c(t,e,r,l);case te:return s(t,e=e.get(null===r.key?n:r.key)||null,r,l)}if(wi(r)||he(r))return f(t,e=e.get(n)||null,r,l,null);ki(t,r)}return null}function h(l,a,o,u){for(var c=null,s=null,f=a,h=a=0,v=null;null!==f&&h<o.length;h++){f.index>h?(v=f,f=null):v=f.sibling;var y=p(l,f,o[h],u);if(null===y){null===f&&(f=v);break}e&&f&&null===y.alternate&&t(l,f),a=i(y,a,h),null===s?c=y:s.sibling=y,s=y,f=v}if(h===o.length)return n(l,f),c;if(null===f){for(;h<o.length;h++)null!==(f=d(l,o[h],u))&&(a=i(f,a,h),null===s?c=f:s.sibling=f,s=f);return c}for(f=r(l,f);h<o.length;h++)null!==(v=m(f,l,h,o[h],u))&&(e&&null!==v.alternate&&f.delete(null===v.key?h:v.key),a=i(v,a,h),null===s?c=v:s.sibling=v,s=v);return e&&f.forEach((function(e){return t(l,e)})),c}function v(l,o,u,c){var s=he(u);if("function"!=typeof s)throw Error(a(150));if(null==(u=s.call(u)))throw Error(a(151));for(var f=s=null,h=o,v=o=0,y=null,g=u.next();null!==h&&!g.done;v++,g=u.next()){h.index>v?(y=h,h=null):y=h.sibling;var b=p(l,h,g.value,c);if(null===b){null===h&&(h=y);break}e&&h&&null===b.alternate&&t(l,h),o=i(b,o,v),null===f?s=b:f.sibling=b,f=b,h=y}if(g.done)return n(l,h),s;if(null===h){for(;!g.done;v++,g=u.next())null!==(g=d(l,g.value,c))&&(o=i(g,o,v),null===f?s=g:f.sibling=g,f=g);return s}for(h=r(l,h);!g.done;v++,g=u.next())null!==(g=m(h,l,v,g.value,c))&&(e&&null!==g.alternate&&h.delete(null===g.key?v:g.key),o=i(g,o,v),null===f?s=g:f.sibling=g,f=g);return e&&h.forEach((function(e){return t(l,e)})),s}return function(e,r,i,u){var c="object"==typeof i&&null!==i&&i.type===ne&&null===i.key;c&&(i=i.props.children);var s="object"==typeof i&&null!==i;if(s)switch(i.$$typeof){case ee:e:{for(s=i.key,c=r;null!==c;){if(c.key===s){switch(c.tag){case 7:if(i.type===ne){n(e,c.sibling),(r=l(c,i.props.children)).return=e,e=r;break e}break;default:if(c.elementType===i.type){n(e,c.sibling),(r=l(c,i.props)).ref=Ei(e,c,i),r.return=e,e=r;break e}}n(e,c);break}t(e,c),c=c.sibling}i.type===ne?((r=Pu(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=_u(i.type,i.key,i.props,null,e.mode,u)).ref=Ei(e,r,i),u.return=e,e=u)}return o(e);case te:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=l(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ou(i,e.mode,u)).return=e,e=r}return o(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=l(r,i)).return=e,e=r):(n(e,r),(r=Nu(i,e.mode,u)).return=e,e=r),o(e);if(wi(i))return h(e,r,i,u);if(he(i))return v(e,r,i,u);if(s&&ki(e,i),void 0===i&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Si=xi(!0),Ti=xi(!1),Ci={},_i={current:Ci},Pi={current:Ci},Ni={current:Ci};function Oi(e){if(e===Ci)throw Error(a(174));return e}function Fi(e,t){switch(cl(Ni,t),cl(Pi,e),cl(_i,Ci),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:De(null,"");break;default:t=De(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ul(_i),cl(_i,t)}function zi(){ul(_i),ul(Pi),ul(Ni)}function Ii(e){Oi(Ni.current);var t=Oi(_i.current),n=De(t,e.type);t!==n&&(cl(Pi,e),cl(_i,n))}function Mi(e){Pi.current===e&&(ul(_i),ul(Pi))}var Ri={current:0};function Li(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Di(e,t){return{responder:e,props:t}}var ji=X.ReactCurrentDispatcher,Ai=X.ReactCurrentBatchConfig,Ui=0,Vi=null,Wi=null,Qi=null,$i=!1;function Bi(){throw Error(a(321))}function Hi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Dr(e[n],t[n]))return!1;return!0}function Ki(e,t,n,r,l,i){if(Ui=i,Vi=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,ji.current=null===e||null===e.memoizedState?va:ya,e=n(r,l),t.expirationTime===Ui){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(a(301));i+=1,Qi=Wi=null,t.updateQueue=null,ji.current=ga,e=n(r,l)}while(t.expirationTime===Ui)}if(ji.current=ha,t=null!==Wi&&null!==Wi.next,Ui=0,Qi=Wi=Vi=null,$i=!1,t)throw Error(a(300));return e}function qi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Qi?Vi.memoizedState=Qi=e:Qi=Qi.next=e,Qi}function Yi(){if(null===Wi){var e=Vi.alternate;e=null!==e?e.memoizedState:null}else e=Wi.next;var t=null===Qi?Vi.memoizedState:Qi.next;if(null!==t)Qi=t,Wi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Wi=e).memoizedState,baseState:Wi.baseState,baseQueue:Wi.baseQueue,queue:Wi.queue,next:null},null===Qi?Vi.memoizedState=Qi=e:Qi=Qi.next=e}return Qi}function Xi(e,t){return"function"==typeof t?t(e):t}function Gi(e){var t=Yi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Wi,l=r.baseQueue,i=n.pending;if(null!==i){if(null!==l){var o=l.next;l.next=i.next,i.next=o}r.baseQueue=l=i,n.pending=null}if(null!==l){l=l.next,r=r.baseState;var u=o=i=null,c=l;do{var s=c.expirationTime;if(s<Ui){var f={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(o=u=f,i=r):u=u.next=f,s>Vi.expirationTime&&(Vi.expirationTime=s,au(s))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),iu(s,c.suspenseConfig),r=c.eagerReducer===e?c.eagerState:e(r,c.action);c=c.next}while(null!==c&&c!==l);null===u?i=r:u.next=o,Dr(r,t.memoizedState)||(Na=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Ji(e){var t=Yi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,i=t.memoizedState;if(null!==l){n.pending=null;var o=l=l.next;do{i=e(i,o.action),o=o.next}while(o!==l);Dr(i,t.memoizedState)||(Na=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Zi(e){var t=qi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Xi,lastRenderedState:e}).dispatch=ma.bind(null,Vi,e),[t.memoizedState,e]}function ea(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Vi.updateQueue)?(t={lastEffect:null},Vi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ta(){return Yi().memoizedState}function na(e,t,n,r){var l=qi();Vi.effectTag|=e,l.memoizedState=ea(1|t,n,void 0,void 0===r?null:r)}function ra(e,t,n,r){var l=Yi();r=void 0===r?null:r;var i=void 0;if(null!==Wi){var a=Wi.memoizedState;if(i=a.destroy,null!==r&&Hi(r,a.deps))return void ea(t,n,i,r)}Vi.effectTag|=e,l.memoizedState=ea(1|t,n,i,r)}function la(e,t){return na(516,4,e,t)}function ia(e,t){return ra(516,4,e,t)}function aa(e,t){return ra(4,2,e,t)}function oa(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ua(e,t,n){return n=null!=n?n.concat([e]):null,ra(4,2,oa.bind(null,t,e),n)}function ca(){}function sa(e,t){return qi().memoizedState=[e,void 0===t?null:t],e}function fa(e,t){var n=Yi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Hi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function da(e,t){var n=Yi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Hi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function pa(e,t,n){var r=Ul();Wl(98>r?98:r,(function(){e(!0)})),Wl(97<r?97:r,(function(){var r=Ai.suspense;Ai.suspense=void 0===t?null:t;try{e(!1),n()}finally{Ai.suspense=r}}))}function ma(e,t,n){var r=Ho(),l=di.suspense;l={expirationTime:r=Ko(r,e,l),suspenseConfig:l,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?l.next=l:(l.next=i.next,i.next=l),t.pending=l,i=e.alternate,e===Vi||null!==i&&i===Vi)$i=!0,l.expirationTime=Ui,Vi.expirationTime=Ui;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,o=i(a,n);if(l.eagerReducer=i,l.eagerState=o,Dr(o,a))return}catch(e){}qo(e,r)}}var ha={readContext:ri,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useResponder:Bi,useDeferredValue:Bi,useTransition:Bi},va={readContext:ri,useCallback:sa,useContext:ri,useEffect:la,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,na(4,2,oa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return na(4,2,e,t)},useMemo:function(e,t){var n=qi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=qi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ma.bind(null,Vi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},qi().memoizedState=e},useState:Zi,useDebugValue:ca,useResponder:Di,useDeferredValue:function(e,t){var n=Zi(e),r=n[0],l=n[1];return la((function(){var n=Ai.suspense;Ai.suspense=void 0===t?null:t;try{l(e)}finally{Ai.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Zi(!1),n=t[0];return t=t[1],[sa(pa.bind(null,t,e),[t,e]),n]}},ya={readContext:ri,useCallback:fa,useContext:ri,useEffect:ia,useImperativeHandle:ua,useLayoutEffect:aa,useMemo:da,useReducer:Gi,useRef:ta,useState:function(){return Gi(Xi)},useDebugValue:ca,useResponder:Di,useDeferredValue:function(e,t){var n=Gi(Xi),r=n[0],l=n[1];return ia((function(){var n=Ai.suspense;Ai.suspense=void 0===t?null:t;try{l(e)}finally{Ai.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Gi(Xi),n=t[0];return t=t[1],[fa(pa.bind(null,t,e),[t,e]),n]}},ga={readContext:ri,useCallback:fa,useContext:ri,useEffect:ia,useImperativeHandle:ua,useLayoutEffect:aa,useMemo:da,useReducer:Ji,useRef:ta,useState:function(){return Ji(Xi)},useDebugValue:ca,useResponder:Di,useDeferredValue:function(e,t){var n=Ji(Xi),r=n[0],l=n[1];return ia((function(){var n=Ai.suspense;Ai.suspense=void 0===t?null:t;try{l(e)}finally{Ai.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Ji(Xi),n=t[0];return t=t[1],[fa(pa.bind(null,t,e),[t,e]),n]}},ba=null,wa=null,Ea=!1;function ka(e,t){var n=Su(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function xa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Sa(e){if(Ea){var t=wa;if(t){var n=t;if(!xa(e,t)){if(!(t=En(n.nextSibling))||!xa(e,t))return e.effectTag=-1025&e.effectTag|2,Ea=!1,void(ba=e);ka(ba,n)}ba=e,wa=En(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Ea=!1,ba=e}}function Ta(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ba=e}function Ca(e){if(e!==ba)return!1;if(!Ea)return Ta(e),Ea=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!gn(t,e.memoizedProps))for(t=wa;t;)ka(e,t),t=En(t.nextSibling);if(Ta(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){wa=En(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}wa=null}}else wa=ba?En(e.stateNode.nextSibling):null;return!0}function _a(){wa=ba=null,Ea=!1}var Pa=X.ReactCurrentOwner,Na=!1;function Oa(e,t,n,r){t.child=null===e?Ti(t,null,n,r):Si(t,e.child,n,r)}function Fa(e,t,n,r,l){n=n.render;var i=t.ref;return ni(t,l),r=Ki(e,t,n,r,i,l),null===e||Na?(t.effectTag|=1,Oa(e,t,r,l),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=l&&(e.expirationTime=0),Ka(e,t,l))}function za(e,t,n,r,l,i){if(null===e){var a=n.type;return"function"!=typeof a||Tu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=_u(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ia(e,t,a,r,l,i))}return a=e.child,l<i&&(l=a.memoizedProps,(n=null!==(n=n.compare)?n:Ar)(l,r)&&e.ref===t.ref)?Ka(e,t,i):(t.effectTag|=1,(e=Cu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ia(e,t,n,r,l,i){return null!==e&&Ar(e.memoizedProps,r)&&e.ref===t.ref&&(Na=!1,l<i)?(t.expirationTime=e.expirationTime,Ka(e,t,i)):Ra(e,t,n,r,i)}function Ma(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Ra(e,t,n,r,l){var i=hl(n)?pl:fl.current;return i=ml(t,i),ni(t,l),n=Ki(e,t,n,r,i,l),null===e||Na?(t.effectTag|=1,Oa(e,t,n,l),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=l&&(e.expirationTime=0),Ka(e,t,l))}function La(e,t,n,r,l){if(hl(n)){var i=!0;bl(t)}else i=!1;if(ni(t,l),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),yi(t,n,r),bi(t,n,r,l),r=!0;else if(null===e){var a=t.stateNode,o=t.memoizedProps;a.props=o;var u=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=ri(c):c=ml(t,c=hl(n)?pl:fl.current);var s=n.getDerivedStateFromProps,f="function"==typeof s||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==r||u!==c)&&gi(t,a,r,c),li=!1;var d=t.memoizedState;a.state=d,si(t,r,a,l),u=t.memoizedState,o!==r||d!==u||dl.current||li?("function"==typeof s&&(mi(t,n,s,r),u=t.memoizedState),(o=li||vi(t,n,o,r,d,u,c))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=o):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,ai(e,t),o=t.memoizedProps,a.props=t.type===t.elementType?o:ql(t.type,o),u=a.context,"object"==typeof(c=n.contextType)&&null!==c?c=ri(c):c=ml(t,c=hl(n)?pl:fl.current),(f="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==r||u!==c)&&gi(t,a,r,c),li=!1,u=t.memoizedState,a.state=u,si(t,r,a,l),d=t.memoizedState,o!==r||u!==d||dl.current||li?("function"==typeof s&&(mi(t,n,s,r),d=t.memoizedState),(s=li||vi(t,n,o,r,u,d,c))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,d,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,d,c)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=d),a.props=r,a.state=d,a.context=c,r=s):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return Da(e,t,n,r,i,l)}function Da(e,t,n,r,l,i){Ma(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return l&&wl(t,n,!1),Ka(e,t,i);r=t.stateNode,Pa.current=t;var o=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Si(t,e.child,null,i),t.child=Si(t,null,o,i)):Oa(e,t,o,i),t.memoizedState=r.state,l&&wl(t,n,!0),t.child}function ja(e){var t=e.stateNode;t.pendingContext?yl(0,t.pendingContext,t.pendingContext!==t.context):t.context&&yl(0,t.context,!1),Fi(e,t.containerInfo)}var Aa,Ua,Va,Wa={dehydrated:null,retryTime:0};function Qa(e,t,n){var r,l=t.mode,i=t.pendingProps,a=Ri.current,o=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(o=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),cl(Ri,1&a),null===e){if(void 0!==i.fallback&&Sa(t),o){if(o=i.fallback,(i=Pu(null,l,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Pu(o,l,n,null)).return=t,i.sibling=n,t.memoizedState=Wa,t.child=i,n}return l=i.children,t.memoizedState=null,t.child=Ti(t,null,l,n)}if(null!==e.memoizedState){if(l=(e=e.child).sibling,o){if(i=i.fallback,(n=Cu(e,e.pendingProps)).return=t,0==(2&t.mode)&&(o=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=o;null!==o;)o.return=n,o=o.sibling;return(l=Cu(l,i)).return=t,n.sibling=l,n.childExpirationTime=0,t.memoizedState=Wa,t.child=n,l}return n=Si(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,o){if(o=i.fallback,(i=Pu(null,l,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Pu(o,l,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=Wa,t.child=i,n}return t.memoizedState=null,t.child=Si(t,e,i.children,n)}function $a(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),ti(e.return,t)}function Ba(e,t,n,r,l,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:l,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=l,a.lastEffect=i)}function Ha(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(Oa(e,t,r.children,n),0!=(2&(r=Ri.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&$a(e,n);else if(19===e.tag)$a(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(cl(Ri,r),0==(2&t.mode))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;null!==n;)null!==(e=n.alternate)&&null===Li(e)&&(l=n),n=n.sibling;null===(n=l)?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Ba(t,!1,l,n,i,t.lastEffect);break;case"backwards":for(n=null,l=t.child,t.child=null;null!==l;){if(null!==(e=l.alternate)&&null===Li(e)){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Ba(t,!0,n,null,i,t.lastEffect);break;case"together":Ba(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Ka(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&au(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Cu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Cu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function qa(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ya(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return hl(t.type)&&vl(),null;case 3:return zi(),ul(dl),ul(fl),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Ca(t)||(t.effectTag|=4),null;case 5:Mi(t),n=Oi(Ni.current);var i=t.type;if(null!==e&&null!=t.stateNode)Ua(e,t,i,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Oi(_i.current),Ca(t)){r=t.stateNode,i=t.type;var o=t.memoizedProps;switch(r[Sn]=t,r[Tn]=o,i){case"iframe":case"object":case"embed":Kt("load",r);break;case"video":case"audio":for(e=0;e<Xe.length;e++)Kt(Xe[e],r);break;case"source":Kt("error",r);break;case"img":case"image":case"link":Kt("error",r),Kt("load",r);break;case"form":Kt("reset",r),Kt("submit",r);break;case"details":Kt("toggle",r);break;case"input":xe(r,o),Kt("invalid",r),un(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Kt("invalid",r),un(n,"onChange");break;case"textarea":Fe(r,o),Kt("invalid",r),un(n,"onChange")}for(var u in ln(i,o),e=null,o)if(o.hasOwnProperty(u)){var c=o[u];"children"===u?"string"==typeof c?r.textContent!==c&&(e=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(e=["children",""+c]):S.hasOwnProperty(u)&&null!=c&&un(n,u)}switch(i){case"input":we(r),Ce(r,o,!0);break;case"textarea":we(r),Ie(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=cn)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,e===on&&(e=Le(i)),e===on?"script"===i?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(i,{is:r.is}):(e=u.createElement(i),"select"===i&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,i),e[Sn]=t,e[Tn]=r,Aa(e,t),t.stateNode=e,u=an(i,r),i){case"iframe":case"object":case"embed":Kt("load",e),c=r;break;case"video":case"audio":for(c=0;c<Xe.length;c++)Kt(Xe[c],e);c=r;break;case"source":Kt("error",e),c=r;break;case"img":case"image":case"link":Kt("error",e),Kt("load",e),c=r;break;case"form":Kt("reset",e),Kt("submit",e),c=r;break;case"details":Kt("toggle",e),c=r;break;case"input":xe(e,r),c=ke(e,r),Kt("invalid",e),un(n,"onChange");break;case"option":c=Pe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},c=l({},r,{value:void 0}),Kt("invalid",e),un(n,"onChange");break;case"textarea":Fe(e,r),c=Oe(e,r),Kt("invalid",e),un(n,"onChange");break;default:c=r}ln(i,c);var s=c;for(o in s)if(s.hasOwnProperty(o)){var f=s[o];"style"===o?nn(e,f):"dangerouslySetInnerHTML"===o?null!=(f=f?f.__html:void 0)&&Ae(e,f):"children"===o?"string"==typeof f?("textarea"!==i||""!==f)&&Ue(e,f):"number"==typeof f&&Ue(e,""+f):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(S.hasOwnProperty(o)?null!=f&&un(n,o):null!=f&&G(e,o,f,u))}switch(i){case"input":we(e),Ce(e,r,!1);break;case"textarea":we(e),Ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ge(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?Ne(e,!!r.multiple,n,!1):null!=r.defaultValue&&Ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=cn)}yn(i,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Va(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Oi(Ni.current),Oi(_i.current),Ca(t)?(n=t.stateNode,r=t.memoizedProps,n[Sn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Sn]=t,t.stateNode=n)}return null;case 13:return ul(Ri),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&Ca(t):(r=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(o=t.firstEffect)?(t.firstEffect=i,i.nextEffect=o):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ri.current)?_o===wo&&(_o=Eo):(_o!==wo&&_o!==Eo||(_o=ko),0!==zo&&null!==So&&(Iu(So,Co),Mu(So,zo)))),(n||r)&&(t.effectTag|=4),null);case 4:return zi(),null;case 10:return ei(t),null;case 17:return hl(t.type)&&vl(),null;case 19:if(ul(Ri),null===(r=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(o=r.rendering)){if(i)qa(r,!1);else if(_o!==wo||null!==e&&0!=(64&e.effectTag))for(o=t.child;null!==o;){if(null!==(e=Li(o))){for(t.effectTag|=64,qa(r,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)o=n,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=o,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,o=e.dependencies,i.dependencies=null===o?null:{expirationTime:o.expirationTime,firstContext:o.firstContext,responders:o.responders}),r=r.sibling;return cl(Ri,1&Ri.current|2),t.child}o=o.sibling}}else{if(!i)if(null!==(e=Li(o))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),qa(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Al()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,qa(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(n=r.last)?n.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Al()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Al(),n.sibling=null,t=Ri.current,cl(Ri,i?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Xa(e){switch(e.tag){case 1:hl(e.type)&&vl();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(zi(),ul(dl),ul(fl),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return Mi(e),null;case 13:return ul(Ri),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return ul(Ri),null;case 4:return zi(),null;case 10:return ei(e),null;default:return null}}function Ga(e,t){return{value:e,source:t,stack:ye(t)}}Aa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ua=function(e,t,n,r,i){var a=e.memoizedProps;if(a!==r){var o,u,c=t.stateNode;switch(Oi(_i.current),e=null,n){case"input":a=ke(c,a),r=ke(c,r),e=[];break;case"option":a=Pe(c,a),r=Pe(c,r),e=[];break;case"select":a=l({},a,{value:void 0}),r=l({},r,{value:void 0}),e=[];break;case"textarea":a=Oe(c,a),r=Oe(c,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(c.onclick=cn)}for(o in ln(n,r),n=null,a)if(!r.hasOwnProperty(o)&&a.hasOwnProperty(o)&&null!=a[o])if("style"===o)for(u in c=a[o])c.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==o&&"children"!==o&&"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(S.hasOwnProperty(o)?e||(e=[]):(e=e||[]).push(o,null));for(o in r){var s=r[o];if(c=null!=a?a[o]:void 0,r.hasOwnProperty(o)&&s!==c&&(null!=s||null!=c))if("style"===o)if(c){for(u in c)!c.hasOwnProperty(u)||s&&s.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in s)s.hasOwnProperty(u)&&c[u]!==s[u]&&(n||(n={}),n[u]=s[u])}else n||(e||(e=[]),e.push(o,n)),n=s;else"dangerouslySetInnerHTML"===o?(s=s?s.__html:void 0,c=c?c.__html:void 0,null!=s&&c!==s&&(e=e||[]).push(o,s)):"children"===o?c===s||"string"!=typeof s&&"number"!=typeof s||(e=e||[]).push(o,""+s):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&(S.hasOwnProperty(o)?(null!=s&&un(i,o),e||c===s||(e=[])):(e=e||[]).push(o,s))}n&&(e=e||[]).push("style",n),i=e,(t.updateQueue=i)&&(t.effectTag|=4)}},Va=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var Ja="function"==typeof WeakSet?WeakSet:Set;function Za(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ye(n)),null!==n&&ve(n.type),t=t.value,null!==e&&1===e.tag&&ve(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function eo(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){gu(e,t)}else t.current=null}function to(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:ql(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(a(163))}function no(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function ro(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function lo(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void ro(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:ql(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&fi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}fi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&yn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Lt(n)))));case 19:case 17:case 20:case 21:return}throw Error(a(163))}function io(e,t,n){switch("function"==typeof ku&&ku(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Wl(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var l=t;try{n()}catch(e){gu(l,e)}}e=e.next}while(e!==r)}))}break;case 1:eo(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){gu(e,t)}}(t,n);break;case 5:eo(t);break;case 4:co(e,t,n)}}function ao(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&ao(t)}function oo(e){return 5===e.tag||3===e.tag||4===e.tag}function uo(e){e:{for(var t=e.return;null!==t;){if(oo(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Ue(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||oo(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var l=t.tag,i=5===l||6===l;if(i)t=i?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=cn));else if(4!==l&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var l=t.tag,i=5===l||6===l;if(i)t=i?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==l&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function co(e,t,n){for(var r,l,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(r=o.stateNode,o.tag){case 5:l=!1;break e;case 3:case 4:r=r.containerInfo,l=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var u=e,c=i,s=n,f=c;;)if(io(u,f,s),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===c)break e;for(;null===f.sibling;){if(null===f.return||f.return===c)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}l?(u=r,c=i.stateNode,8===u.nodeType?u.parentNode.removeChild(c):u.removeChild(c)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,l=!0,i.child.return=i,i=i.child;continue}}else if(io(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function so(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void no(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,l=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Tn]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Se(n,r),an(e,l),t=an(e,r),l=0;l<i.length;l+=2){var o=i[l],u=i[l+1];"style"===o?nn(n,u):"dangerouslySetInnerHTML"===o?Ae(n,u):"children"===o?Ue(n,u):G(n,o,u,t)}switch(e){case"input":Te(n,r);break;case"textarea":ze(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Ne(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Ne(n,!!r.multiple,r.defaultValue,!0):Ne(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Lt(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Mo=Al()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,l=null!=(l=e.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,i.style.display=tn("display",l));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void fo(t);case 19:return void fo(t);case 17:return}throw Error(a(163))}function fo(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ja),t.forEach((function(t){var r=wu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var po="function"==typeof WeakMap?WeakMap:Map;function mo(e,t,n){(n=oi(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Lo||(Lo=!0,Do=r),Za(e,t)},n}function ho(e,t,n){(n=oi(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var l=t.value;n.payload=function(){return Za(e,t),r(l)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===jo?jo=new Set([this]):jo.add(this),Za(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var vo,yo=Math.ceil,go=X.ReactCurrentDispatcher,bo=X.ReactCurrentOwner,wo=0,Eo=3,ko=4,xo=0,So=null,To=null,Co=0,_o=wo,Po=null,No=1073741823,Oo=1073741823,Fo=null,zo=0,Io=!1,Mo=0,Ro=null,Lo=!1,Do=null,jo=null,Ao=!1,Uo=null,Vo=90,Wo=null,Qo=0,$o=null,Bo=0;function Ho(){return 0!=(48&xo)?1073741821-(Al()/10|0):0!==Bo?Bo:Bo=1073741821-(Al()/10|0)}function Ko(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Ul();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&xo))return Co;if(null!==n)e=Kl(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Kl(e,150,100);break;case 97:case 96:e=Kl(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==So&&e===Co&&--e,e}function qo(e,t){if(50<Qo)throw Qo=0,$o=null,Error(a(185));if(null!==(e=Yo(e,t))){var n=Ul();1073741823===t?0!=(8&xo)&&0==(48&xo)?Zo(e):(Go(e),0===xo&&Bl()):Go(e),0==(4&xo)||98!==n&&99!==n||(null===Wo?Wo=new Map([[e,t]]):(void 0===(n=Wo.get(e))||n>t)&&Wo.set(e,t))}}function Yo(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,l=null;if(null===r&&3===e.tag)l=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){l=r.stateNode;break}r=r.return}return null!==l&&(So===l&&(au(t),_o===ko&&Iu(l,Co)),Mu(l,t)),l}function Xo(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!zu(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Go(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=$l(Zo.bind(null,e));else{var t=Xo(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Ho();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var l=e.callbackPriority;if(e.callbackExpirationTime===t&&l>=r)return;n!==zl&&xl(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?$l(Zo.bind(null,e)):Ql(r,Jo.bind(null,e),{timeout:10*(1073741821-t)-Al()}),e.callbackNode=t}}}function Jo(e,t){if(Bo=0,t)return Ru(e,t=Ho()),Go(e),null;var n=Xo(e);if(0!==n){if(t=e.callbackNode,0!=(48&xo))throw Error(a(327));if(hu(),e===So&&n===Co||nu(e,n),null!==To){var r=xo;xo|=16;for(var l=lu();;)try{uu();break}catch(t){ru(e,t)}if(Zl(),xo=r,go.current=l,1===_o)throw t=Po,nu(e,n),Iu(e,n),Go(e),t;if(null===To)switch(l=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=_o,So=null,r){case wo:case 1:throw Error(a(345));case 2:Ru(e,2<n?2:n);break;case Eo:if(Iu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fu(l)),1073741823===No&&10<(l=Mo+500-Al())){if(Io){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,nu(e,n);break}}if(0!==(i=Xo(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=bn(du.bind(null,e),l);break}du(e);break;case ko:if(Iu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fu(l)),Io&&(0===(l=e.lastPingedTime)||l>=n)){e.lastPingedTime=n,nu(e,n);break}if(0!==(l=Xo(e))&&l!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Oo?r=10*(1073741821-Oo)-Al():1073741823===No?r=0:(r=10*(1073741821-No)-5e3,0>(r=(l=Al())-r)&&(r=0),(n=10*(1073741821-n)-l)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yo(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=bn(du.bind(null,e),r);break}du(e);break;case 5:if(1073741823!==No&&null!==Fo){i=No;var o=Fo;if(0>=(r=0|o.busyMinDurationMs)?r=0:(l=0|o.busyDelayMs,r=(i=Al()-(10*(1073741821-i)-(0|o.timeoutMs||5e3)))<=l?0:l+r-i),10<r){Iu(e,n),e.timeoutHandle=bn(du.bind(null,e),r);break}}du(e);break;default:throw Error(a(329))}if(Go(e),e.callbackNode===t)return Jo.bind(null,e)}}return null}function Zo(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&xo))throw Error(a(327));if(hu(),e===So&&t===Co||nu(e,t),null!==To){var n=xo;xo|=16;for(var r=lu();;)try{ou();break}catch(t){ru(e,t)}if(Zl(),xo=n,go.current=r,1===_o)throw n=Po,nu(e,t),Iu(e,t),Go(e),n;if(null!==To)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,So=null,du(e),Go(e)}return null}function eu(e,t){var n=xo;xo|=1;try{return e(t)}finally{0===(xo=n)&&Bl()}}function tu(e,t){var n=xo;xo&=-2,xo|=8;try{return e(t)}finally{0===(xo=n)&&Bl()}}function nu(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,wn(n)),null!==To)for(n=To.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&vl();break;case 3:zi(),ul(dl),ul(fl);break;case 5:Mi(r);break;case 4:zi();break;case 13:case 19:ul(Ri);break;case 10:ei(r)}n=n.return}So=e,To=Cu(e.current,null),Co=t,_o=wo,Po=null,Oo=No=1073741823,Fo=null,zo=0,Io=!1}function ru(e,t){for(;;){try{if(Zl(),ji.current=ha,$i)for(var n=Vi.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Ui=0,Qi=Wi=Vi=null,$i=!1,null===To||null===To.return)return _o=1,Po=t,To=null;e:{var l=e,i=To.return,a=To,o=t;if(t=Co,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==o&&"object"==typeof o&&"function"==typeof o.then){var u=o;if(0==(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var s=0!=(1&Ri.current),f=i;do{var d;if(d=13===f.tag){var p=f.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var m=f.memoizedProps;d=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!s)}}if(d){var h=f.updateQueue;if(null===h){var v=new Set;v.add(u),f.updateQueue=v}else h.add(u);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var y=oi(1073741823,null);y.tag=2,ui(a,y)}a.expirationTime=1073741823;break e}o=void 0,a=t;var g=l.pingCache;if(null===g?(g=l.pingCache=new po,o=new Set,g.set(u,o)):void 0===(o=g.get(u))&&(o=new Set,g.set(u,o)),!o.has(a)){o.add(a);var b=bu.bind(null,l,u,a);u.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);o=Error((ve(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ye(a))}5!==_o&&(_o=2),o=Ga(o,a),f=i;do{switch(f.tag){case 3:u=o,f.effectTag|=4096,f.expirationTime=t,ci(f,mo(f,u,t));break e;case 1:u=o;var w=f.type,E=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==E&&"function"==typeof E.componentDidCatch&&(null===jo||!jo.has(E)))){f.effectTag|=4096,f.expirationTime=t,ci(f,ho(f,u,t));break e}}f=f.return}while(null!==f)}To=su(To)}catch(e){t=e;continue}break}}function lu(){var e=go.current;return go.current=ha,null===e?ha:e}function iu(e,t){e<No&&2<e&&(No=e),null!==t&&e<Oo&&2<e&&(Oo=e,Fo=t)}function au(e){e>zo&&(zo=e)}function ou(){for(;null!==To;)To=cu(To)}function uu(){for(;null!==To&&!Il();)To=cu(To)}function cu(e){var t=vo(e.alternate,e,Co);return e.memoizedProps=e.pendingProps,null===t&&(t=su(e)),bo.current=null,t}function su(e){To=e;do{var t=To.alternate;if(e=To.return,0==(2048&To.effectTag)){if(t=Ya(t,To,Co),1===Co||1!==To.childExpirationTime){for(var n=0,r=To.child;null!==r;){var l=r.expirationTime,i=r.childExpirationTime;l>n&&(n=l),i>n&&(n=i),r=r.sibling}To.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=To.firstEffect),null!==To.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=To.firstEffect),e.lastEffect=To.lastEffect),1<To.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=To:e.firstEffect=To,e.lastEffect=To))}else{if(null!==(t=Xa(To)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=To.sibling))return t;To=e}while(null!==To);return _o===wo&&(_o=5),null}function fu(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function du(e){var t=Ul();return Wl(99,pu.bind(null,e,t)),null}function pu(e,t){do{hu()}while(null!==Uo);if(0!=(48&xo))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var l=fu(n);if(e.firstPendingTime=l,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===So&&(To=So=null,Co=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,l=n.firstEffect):l=n:l=n.firstEffect,null!==l){var i=xo;xo|=32,bo.current=null,hn=Ht;var o=pn();if(mn(o)){if("selectionStart"in o)var u={start:o.selectionStart,end:o.selectionEnd};else e:{var c=(u=(u=o.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(c&&0!==c.rangeCount){u=c.anchorNode;var s=c.anchorOffset,f=c.focusNode;c=c.focusOffset;try{u.nodeType,f.nodeType}catch(e){u=null;break e}var d=0,p=-1,m=-1,h=0,v=0,y=o,g=null;t:for(;;){for(var b;y!==u||0!==s&&3!==y.nodeType||(p=d+s),y!==f||0!==c&&3!==y.nodeType||(m=d+c),3===y.nodeType&&(d+=y.nodeValue.length),null!==(b=y.firstChild);)g=y,y=b;for(;;){if(y===o)break t;if(g===u&&++h===s&&(p=d),g===f&&++v===c&&(m=d),null!==(b=y.nextSibling))break;g=(y=g).parentNode}y=b}u=-1===p||-1===m?null:{start:p,end:m}}else u=null}u=u||{start:0,end:0}}else u=null;vn={activeElementDetached:null,focusedElem:o,selectionRange:u},Ht=!1,Ro=l;do{try{mu()}catch(e){if(null===Ro)throw Error(a(330));gu(Ro,e),Ro=Ro.nextEffect}}while(null!==Ro);Ro=l;do{try{for(o=e,u=t;null!==Ro;){var w=Ro.effectTag;if(16&w&&Ue(Ro.stateNode,""),128&w){var E=Ro.alternate;if(null!==E){var k=E.ref;null!==k&&("function"==typeof k?k(null):k.current=null)}}switch(1038&w){case 2:uo(Ro),Ro.effectTag&=-3;break;case 6:uo(Ro),Ro.effectTag&=-3,so(Ro.alternate,Ro);break;case 1024:Ro.effectTag&=-1025;break;case 1028:Ro.effectTag&=-1025,so(Ro.alternate,Ro);break;case 4:so(Ro.alternate,Ro);break;case 8:co(o,s=Ro,u),ao(s)}Ro=Ro.nextEffect}}catch(e){if(null===Ro)throw Error(a(330));gu(Ro,e),Ro=Ro.nextEffect}}while(null!==Ro);if(k=vn,E=pn(),w=k.focusedElem,u=k.selectionRange,E!==w&&w&&w.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(w.ownerDocument.documentElement,w)){null!==u&&mn(w)&&(E=u.start,void 0===(k=u.end)&&(k=E),"selectionStart"in w?(w.selectionStart=E,w.selectionEnd=Math.min(k,w.value.length)):(k=(E=w.ownerDocument||document)&&E.defaultView||window).getSelection&&(k=k.getSelection(),s=w.textContent.length,o=Math.min(u.start,s),u=void 0===u.end?o:Math.min(u.end,s),!k.extend&&o>u&&(s=u,u=o,o=s),s=dn(w,o),f=dn(w,u),s&&f&&(1!==k.rangeCount||k.anchorNode!==s.node||k.anchorOffset!==s.offset||k.focusNode!==f.node||k.focusOffset!==f.offset)&&((E=E.createRange()).setStart(s.node,s.offset),k.removeAllRanges(),o>u?(k.addRange(E),k.extend(f.node,f.offset)):(E.setEnd(f.node,f.offset),k.addRange(E))))),E=[];for(k=w;k=k.parentNode;)1===k.nodeType&&E.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<E.length;w++)(k=E[w]).element.scrollLeft=k.left,k.element.scrollTop=k.top}Ht=!!hn,vn=hn=null,e.current=n,Ro=l;do{try{for(w=e;null!==Ro;){var x=Ro.effectTag;if(36&x&&lo(w,Ro.alternate,Ro),128&x){E=void 0;var S=Ro.ref;if(null!==S){var T=Ro.stateNode;switch(Ro.tag){case 5:E=T;break;default:E=T}"function"==typeof S?S(E):S.current=E}}Ro=Ro.nextEffect}}catch(e){if(null===Ro)throw Error(a(330));gu(Ro,e),Ro=Ro.nextEffect}}while(null!==Ro);Ro=null,Ml(),xo=i}else e.current=n;if(Ao)Ao=!1,Uo=e,Vo=t;else for(Ro=l;null!==Ro;)t=Ro.nextEffect,Ro.nextEffect=null,Ro=t;if(0===(t=e.firstPendingTime)&&(jo=null),1073741823===t?e===$o?Qo++:(Qo=0,$o=e):Qo=0,"function"==typeof Eu&&Eu(n.stateNode,r),Go(e),Lo)throw Lo=!1,e=Do,Do=null,e;return 0!=(8&xo)||Bl(),null}function mu(){for(;null!==Ro;){var e=Ro.effectTag;0!=(256&e)&&to(Ro.alternate,Ro),0==(512&e)||Ao||(Ao=!0,Ql(97,(function(){return hu(),null}))),Ro=Ro.nextEffect}}function hu(){if(90!==Vo){var e=97<Vo?97:Vo;return Vo=90,Wl(e,vu)}}function vu(){if(null===Uo)return!1;var e=Uo;if(Uo=null,0!=(48&xo))throw Error(a(331));var t=xo;for(xo|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:no(5,n),ro(5,n)}}catch(t){if(null===e)throw Error(a(330));gu(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return xo=t,Bl(),!0}function yu(e,t,n){ui(e,t=mo(e,t=Ga(n,t),1073741823)),null!==(e=Yo(e,1073741823))&&Go(e)}function gu(e,t){if(3===e.tag)yu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){yu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===jo||!jo.has(r))){ui(n,e=ho(n,e=Ga(t,e),1073741823)),null!==(n=Yo(n,1073741823))&&Go(n);break}}n=n.return}}function bu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),So===e&&Co===n?_o===ko||_o===Eo&&1073741823===No&&Al()-Mo<500?nu(e,Co):Io=!0:zu(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Go(e)))}function wu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Ko(t=Ho(),e,null)),null!==(e=Yo(e,t))&&Go(e)}vo=function(e,t,n){var r=t.expirationTime;if(null!==e){var l=t.pendingProps;if(e.memoizedProps!==l||dl.current)Na=!0;else{if(r<n){switch(Na=!1,t.tag){case 3:ja(t),_a();break;case 5:if(Ii(t),4&t.mode&&1!==n&&l.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:hl(t.type)&&bl(t);break;case 4:Fi(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,l=t.type._context,cl(Yl,l._currentValue),l._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?Qa(e,t,n):(cl(Ri,1&Ri.current),null!==(t=Ka(e,t,n))?t.sibling:null);cl(Ri,1&Ri.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Ha(e,t,n);t.effectTag|=64}if(null!==(l=t.memoizedState)&&(l.rendering=null,l.tail=null),cl(Ri,Ri.current),!r)return null}return Ka(e,t,n)}Na=!1}}else Na=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,l=ml(t,fl.current),ni(t,n),l=Ki(null,t,r,e,l,n),t.effectTag|=1,"object"==typeof l&&null!==l&&"function"==typeof l.render&&void 0===l.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,hl(r)){var i=!0;bl(t)}else i=!1;t.memoizedState=null!==l.state&&void 0!==l.state?l.state:null,ii(t);var o=r.getDerivedStateFromProps;"function"==typeof o&&mi(t,r,o,e),l.updater=hi,t.stateNode=l,l._reactInternalFiber=t,bi(t,r,e,n),t=Da(null,t,r,!0,i,n)}else t.tag=0,Oa(null,t,l,n),t=t.child;return t;case 16:e:{if(l=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(l),1!==l._status)throw l._result;switch(l=l._result,t.type=l,i=t.tag=function(e){if("function"==typeof e)return Tu(e)?1:0;if(null!=e){if((e=e.$$typeof)===ue)return 11;if(e===fe)return 14}return 2}(l),e=ql(l,e),i){case 0:t=Ra(null,t,l,e,n);break e;case 1:t=La(null,t,l,e,n);break e;case 11:t=Fa(null,t,l,e,n);break e;case 14:t=za(null,t,l,ql(l.type,e),r,n);break e}throw Error(a(306,l,""))}return t;case 0:return r=t.type,l=t.pendingProps,Ra(e,t,r,l=t.elementType===r?l:ql(r,l),n);case 1:return r=t.type,l=t.pendingProps,La(e,t,r,l=t.elementType===r?l:ql(r,l),n);case 3:if(ja(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,l=null!==(l=t.memoizedState)?l.element:null,ai(e,t),si(t,r,null,n),(r=t.memoizedState.element)===l)_a(),t=Ka(e,t,n);else{if((l=t.stateNode.hydrate)&&(wa=En(t.stateNode.containerInfo.firstChild),ba=t,l=Ea=!0),l)for(n=Ti(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Oa(e,t,r,n),_a();t=t.child}return t;case 5:return Ii(t),null===e&&Sa(t),r=t.type,l=t.pendingProps,i=null!==e?e.memoizedProps:null,o=l.children,gn(r,l)?o=null:null!==i&&gn(r,i)&&(t.effectTag|=16),Ma(e,t),4&t.mode&&1!==n&&l.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Oa(e,t,o,n),t=t.child),t;case 6:return null===e&&Sa(t),null;case 13:return Qa(e,t,n);case 4:return Fi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Si(t,null,r,n):Oa(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,Fa(e,t,r,l=t.elementType===r?l:ql(r,l),n);case 7:return Oa(e,t,t.pendingProps,n),t.child;case 8:case 12:return Oa(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value;var u=t.type._context;if(cl(Yl,u._currentValue),u._currentValue=i,null!==o)if(u=o.value,0===(i=Dr(u,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(o.children===l.children&&!dl.current){t=Ka(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){o=u.child;for(var s=c.firstContext;null!==s;){if(s.context===r&&0!=(s.observedBits&i)){1===u.tag&&((s=oi(n,null)).tag=2,ui(u,s)),u.expirationTime<n&&(u.expirationTime=n),null!==(s=u.alternate)&&s.expirationTime<n&&(s.expirationTime=n),ti(u.return,n),c.expirationTime<n&&(c.expirationTime=n);break}s=s.next}}else o=10===u.tag&&u.type===t.type?null:u.child;if(null!==o)o.return=u;else for(o=u;null!==o;){if(o===t){o=null;break}if(null!==(u=o.sibling)){u.return=o.return,o=u;break}o=o.return}u=o}Oa(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=(i=t.pendingProps).children,ni(t,n),r=r(l=ri(l,i.unstable_observedBits)),t.effectTag|=1,Oa(e,t,r,n),t.child;case 14:return i=ql(l=t.type,t.pendingProps),za(e,t,l,i=ql(l.type,i),r,n);case 15:return Ia(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ql(r,l),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,hl(r)?(e=!0,bl(t)):e=!1,ni(t,n),yi(t,r,l),bi(t,r,l,n),Da(null,t,r,!0,e,n);case 19:return Ha(e,t,n)}throw Error(a(156,t.tag))};var Eu=null,ku=null;function xu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Su(e,t,n,r){return new xu(e,t,n,r)}function Tu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Cu(e,t){var n=e.alternate;return null===n?((n=Su(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function _u(e,t,n,r,l,i){var o=2;if(r=e,"function"==typeof e)Tu(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case ne:return Pu(n.children,l,i,t);case oe:o=8,l|=7;break;case re:o=8,l|=1;break;case le:return(e=Su(12,n,t,8|l)).elementType=le,e.type=le,e.expirationTime=i,e;case ce:return(e=Su(13,n,t,l)).type=ce,e.elementType=ce,e.expirationTime=i,e;case se:return(e=Su(19,n,t,l)).elementType=se,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ie:o=10;break e;case ae:o=9;break e;case ue:o=11;break e;case fe:o=14;break e;case de:o=16,r=null;break e;case pe:o=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Su(o,n,t,l)).elementType=e,t.type=r,t.expirationTime=i,t}function Pu(e,t,n,r){return(e=Su(7,e,r,t)).expirationTime=n,e}function Nu(e,t,n){return(e=Su(6,e,null,t)).expirationTime=n,e}function Ou(e,t,n){return(t=Su(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fu(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function zu(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Iu(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Mu(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Ru(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Lu(e,t,n,r){var l=t.current,i=Ho(),o=di.suspense;i=Ko(i,l,o);e:if(n){t:{if(Ze(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(hl(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(hl(c)){n=gl(n,c,u);break e}}n=u}else n=sl;return null===t.context?t.context=n:t.pendingContext=n,(t=oi(i,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),ui(l,t),qo(l,i),i}function Du(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function ju(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Au(e,t){ju(e,t),(e=e.alternate)&&ju(e,t)}function Uu(e,t,n){var r=new Fu(e,t,n=null!=n&&!0===n.hydrate),l=Su(3,null,null,2===t?7:1===t?3:0);r.current=l,l.stateNode=r,ii(l),e[Cn]=r.current,n&&0!==t&&function(e,t){var n=Je(t);Ct.forEach((function(e){mt(e,t,n)})),_t.forEach((function(e){mt(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Vu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Wu(e,t,n,r,l){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof l){var o=l;l=function(){var e=Du(a);o.call(e)}}Lu(t,a,e,l)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Uu(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof l){var u=l;l=function(){var e=Du(a);u.call(e)}}tu((function(){Lu(t,a,e,l)}))}return Du(a)}function Qu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function $u(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Vu(t))throw Error(a(200));return Qu(e,t,null,n)}Uu.prototype.render=function(e){Lu(e,this._internalRoot,null,null)},Uu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Lu(null,e,null,(function(){t[Cn]=null}))},ht=function(e){if(13===e.tag){var t=Kl(Ho(),150,100);qo(e,t),Au(e,t)}},vt=function(e){13===e.tag&&(qo(e,3),Au(e,3))},yt=function(e){if(13===e.tag){var t=Ho();qo(e,t=Ko(t,e,null)),Au(e,t)}},P=function(e,t,n){switch(t){case"input":if(Te(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=On(r);if(!l)throw Error(a(90));Ee(r),Te(r,l)}}}break;case"textarea":ze(e,n);break;case"select":null!=(t=n.value)&&Ne(e,!!n.multiple,t,!1)}},M=eu,R=function(e,t,n,r,l){var i=xo;xo|=4;try{return Wl(98,e.bind(null,t,n,r,l))}finally{0===(xo=i)&&Bl()}},L=function(){0==(49&xo)&&(function(){if(null!==Wo){var e=Wo;Wo=null,e.forEach((function(e,t){Ru(t,e),Go(t)})),Bl()}}(),hu())},D=function(e,t){var n=xo;xo|=2;try{return e(t)}finally{0===(xo=n)&&Bl()}};var Bu,Hu,Ku={Events:[Pn,Nn,On,C,x,Dn,function(e){lt(e,Ln)},z,I,Gt,ot,hu,{current:!1}]};Hu=(Bu={findFiberByHostInstance:_n,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Eu=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},ku=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(l({},Bu,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:X.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=nt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Hu?Hu(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ku,t.createPortal=$u,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=nt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&xo))throw Error(a(187));var n=xo;xo|=1;try{return Wl(99,e.bind(null,t))}finally{xo=n,Bl()}},t.hydrate=function(e,t,n){if(!Vu(t))throw Error(a(200));return Wu(null,e,t,!0,n)},t.render=function(e,t,n){if(!Vu(t))throw Error(a(200));return Wu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Vu(e))throw Error(a(40));return!!e._reactRootContainer&&(tu((function(){Wu(null,null,e,!1,(function(){e._reactRootContainer=null,e[Cn]=null}))})),!0)},t.unstable_batchedUpdates=eu,t.unstable_createPortal=function(e,t){return $u(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Vu(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Wu(e,t,n,!1,r)},t.version="16.14.0"},function(e,t,n){"use strict";e.exports=n(7)},function(e,t,n){"use strict"; +/** @license React v0.19.1 + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r,l,i,a,o;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,s=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(s,0),e}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(s,0))},l=function(e,t){c=setTimeout(e,t)},i=function(){clearTimeout(c)},a=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,p=window.Date,m=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)t.unstable_now=function(){return d.now()};else{var y=p.now();t.unstable_now=function(){return p.now()-y}}var g=!1,b=null,w=-1,E=5,k=0;a=function(){return t.unstable_now()>=k},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):E=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,S=x.port2;x.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();k=e+E;try{b(!0,e)?S.postMessage(null):(g=!1,b=null)}catch(e){throw S.postMessage(null),e}}else g=!1},r=function(e){b=e,g||(g=!0,S.postMessage(null))},l=function(e,n){w=m((function(){e(t.unstable_now())}),n)},i=function(){h(w),w=-1}}function T(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,l=e[r];if(!(void 0!==l&&0<P(l,t)))break e;e[r]=t,e[n]=l,n=r}}function C(e){return void 0===(e=e[0])?null:e}function _(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,l=e.length;r<l;){var i=2*(r+1)-1,a=e[i],o=i+1,u=e[o];if(void 0!==a&&0>P(a,n))void 0!==u&&0>P(u,a)?(e[r]=u,e[o]=n,r=o):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>P(u,n)))break e;e[r]=u,e[o]=n,r=o}}}return t}return null}function P(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var N=[],O=[],F=1,z=null,I=3,M=!1,R=!1,L=!1;function D(e){for(var t=C(O);null!==t;){if(null===t.callback)_(O);else{if(!(t.startTime<=e))break;_(O),t.sortIndex=t.expirationTime,T(N,t)}t=C(O)}}function j(e){if(L=!1,D(e),!R)if(null!==C(N))R=!0,r(A);else{var t=C(O);null!==t&&l(j,t.startTime-e)}}function A(e,n){R=!1,L&&(L=!1,i()),M=!0;var r=I;try{for(D(n),z=C(N);null!==z&&(!(z.expirationTime>n)||e&&!a());){var o=z.callback;if(null!==o){z.callback=null,I=z.priorityLevel;var u=o(z.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?z.callback=u:z===C(N)&&_(N),D(n)}else _(N);z=C(N)}if(null!==z)var c=!0;else{var s=C(O);null!==s&&l(j,s.startTime-n),c=!1}return c}finally{z=null,I=r,M=!1}}function U(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var V=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||M||(R=!0,r(A))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return C(N)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=V,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,n,a){var o=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0<u?o+u:o,a="number"==typeof a.timeout?a.timeout:U(e)}else a=U(e),u=o;return e={id:F++,callback:n,priorityLevel:e,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>o?(e.sortIndex=u,T(O,e),null===C(N)&&e===C(O)&&(L?i():L=!0,l(j,u-o))):(e.sortIndex=a,T(N,e),R||M||(R=!0,r(A))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();D(e);var n=C(N);return n!==z&&null!==z&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<z.expirationTime||a()},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}}},function(e,t,n){"use strict";var r=n(0);function l(e,t){var n={sortKey:e,order:"desc"},r="";return t&&t.sortKey===e&&(r="sorted","desc"===t.order?(r+="-desc",n.order="asc"):"file"!==e&&(n={sortKey:"file",order:"desc"})),{newSort:n,sortClass:r}}function i(e){var t=e.name,n=e.onSort,i=l(e.sortKey,e.activeSort),a=i.newSort,o=i.sortClass;return r.createElement("th",{className:"sortable headercell "+o,onClick:function(){return n(a)}},t,r.createElement("span",{className:"sorter"}))}function a(e){var t=e.onSort,n=l("file",e.activeSort),i=n.newSort,a=n.sortClass;return r.createElement("th",{className:"sortable file "+a,onClick:function(){return t(i)}},"File",r.createElement("span",{className:"sorter"}))}function o(e){var t=e.sortKeyPrefix,n=e.onSort,l=e.activeSort;return r.createElement(r.Fragment,null,r.createElement(i,{name:"%",onSort:n,sortKey:t+".pct",activeSort:l}),r.createElement("th",{className:"headercell"}),r.createElement(i,{name:"Covered",onSort:n,sortKey:t+".covered",activeSort:l}),r.createElement(i,{name:"Missed",onSort:n,sortKey:t+".missed",activeSort:l}),r.createElement(i,{name:"Total",onSort:n,sortKey:t+".total",activeSort:l}))}e.exports=function(e){var t=e.onSort,n=e.activeSort,l=e.metricsToShow;return r.createElement("thead",null,r.createElement("tr",{className:"topheading"},r.createElement("th",null),l.statements&&r.createElement("th",{colSpan:4},"Statements"),l.branches&&r.createElement("th",{colSpan:4},"Branches"),l.functions&&r.createElement("th",{colSpan:4},"Functions"),l.lines&&r.createElement("th",{colSpan:4},"Lines")),r.createElement("tr",{className:"subheading"},r.createElement(a,{onSort:t,activeSort:n}),l.statements&&r.createElement(o,{sortKeyPrefix:"statements",onSort:t,activeSort:n}),l.branches&&r.createElement(o,{sortKeyPrefix:"branches",onSort:t,activeSort:n}),l.functions&&r.createElement(o,{sortKeyPrefix:"functions",onSort:t,activeSort:n}),l.lines&&r.createElement(o,{sortKeyPrefix:"lines",onSort:t,activeSort:n})))}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var a=n(0);function o(e){var t=e.metrics,n=t.classForPercent,r=t.pct,l=t.covered,i=t.missed,o=t.total;return a.createElement(a.Fragment,null,a.createElement("td",{className:"pct "+n},Math.round(r),"% "),a.createElement("td",{className:n},a.createElement("div",{className:"bar"},a.createElement("div",{className:"bar__data ".concat(n," ").concat(n,"--dark"),style:{width:r+"%"}}))),a.createElement("td",{className:"abs "+n},l),a.createElement("td",{className:"abs "+n},i),a.createElement("td",{className:"abs "+n},o))}function u(e){var t=e.file,n=e.prefix,r=e.expandedLines,i=e.setExpandedLines,o=e.hasChildren,u=e.setFileFilter;if(o){var c=r.indexOf(n+t),s=c>=0,f=s?[].concat(l(r.slice(0,c)),l(r.slice(c+1))):[].concat(l(r),[n+t]);return a.createElement(a.Fragment,null,a.createElement("button",{type:"button",onClick:function(){return i(f)},className:"expandbutton"},s?String.fromCharCode(8211):"+"),a.createElement("a",{href:"javascript:void(0)",onClick:function(){return u(n+t)}},t))}return a.createElement("a",{href:"./".concat(n).concat(t,".html")},t)}function c(e,t){var n="none";for(var r in e)if(e[r]){var l=t[r].classForPercent;if("none"===l)continue;("low"==l||"medium"===l&&"low"!==n||"high"===l&&"low"!==n&&"medium"!==n)&&(n=l)}return n}e.exports=function e(t){var n=t.prefix,l=t.metrics,i=t.file,s=t.children,f=t.tabSize,d=t.metricsToShow,p=t.expandedLines,m=t.setExpandedLines,h=t.fileFilter,v=t.setFileFilter;return f=f||0,s&&f>0&&f--,n=(h?h+"/":"")+(n||""),a.createElement(a.Fragment,null,a.createElement("tr",null,a.createElement("td",{className:"file "+c(d,l)},Array.apply(null,{length:f}).map((function(e,t){return a.createElement("span",{className:"filetab",key:t})})),a.createElement(u,{file:i,prefix:n,expandedLines:p,setExpandedLines:m,hasChildren:Boolean(s),setFileFilter:v})),d.statements&&a.createElement(o,{metrics:l.statements}),d.branches&&a.createElement(o,{metrics:l.branches}),d.functions&&a.createElement(o,{metrics:l.functions}),d.lines&&a.createElement(o,{metrics:l.lines})),s&&p.indexOf(n+i)>=0&&s.map((function(t){return a.createElement(e,r({},t,{tabSize:f+2,key:t.file,prefix:n+i+"/",metricsToShow:d,expandedLines:p,setExpandedLines:m,setFileFilter:v}))})))}},function(e,t,n){"use strict";var r=n(0);function l(e){for(var t=e.metrics,n=e.metricsToShow,l=Object.keys(n),i=[],a=0;a<l.length;a++){var o=l[a];if(n[o]){var u=t[o].skipped;u>0&&i.push("".concat(u," ").concat(o).concat(1===u?"":"branch"===o?"es":"s"))}}return 0!==i.length&&r.createElement("div",{className:"toolbar__item"},r.createElement("span",{className:"strong"},i.join(", ")),r.createElement("span",{className:"quiet"},"Ignored"))}function i(e){var t=e.data,n=e.name;return r.createElement("div",{className:"toolbar__item"},r.createElement("span",{className:"strong"},t.pct,"%")," ",r.createElement("span",{className:"quiet"},n)," ",r.createElement("span",{className:"fraction "+t.classForPercent},t.covered,"/",t.total))}e.exports=function(e){var t=e.metrics,n=e.metricsToShow;return r.createElement("div",{className:"toolbar"},n.statements&&r.createElement(i,{data:t.statements,name:"Statements"}),n.branches&&r.createElement(i,{data:t.branches,name:"Branches"}),n.functions&&r.createElement(i,{data:t.functions,name:"Functions"}),n.lines&&r.createElement(i,{data:t.lines,name:"Lines"}),r.createElement(l,{metrics:t,metricsToShow:n}))}},function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,l,i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){o=!0,l=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw l}}return i}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return t?u(u({},e),{},{file:t+"/"+e.file}):e}e.exports=function(e,t,n,i,a,o){var c=e.children;return i&&(c=function e(t,n){for(var r=[],i=0;i<t.length;i++){var a=t[i];a.children?r=[].concat(l(r),l(e(a.children,(n?n+"/":"")+a.file))):r.push(s(a,n))}return r}(c.slice(0))),o&&(c=function e(t,n,r){for(var i=[],a=0;a<t.length;a++){var o=t[a],c=(r?r+"/":"")+o.file,s=n===c||0===n.indexOf(c+"/"),f=0===c.indexOf(n+"/");if(s)i=[].concat(l(i),l(e(o.children,n,c)));else if(f){var d=n.length-(r?r.length:0),p=o.file.slice(d);"/"===p[0]&&(p=p.slice(1)),i.push(u(u({},o),{},{file:p}))}}return i}(c,o)),a.low&&(a=u(u({},a),{},{empty:!0})),c=function e(t,n,r){for(var l=[],i=0;i<t.length;i++){var a=t[i];if(a.children){var o=e(a.children,n,r);o.length&&(a=u(u({},a),{},{children:o}),l.push(a))}else(n.statements&&r[a.metrics.statements.classForPercent]||n.branches&&r[a.metrics.branches.classForPercent]||n.functions&&r[a.metrics.functions.classForPercent]||n.lines&&r[a.metrics.lines.classForPercent])&&l.push(a)}return l}(c,t,a),n&&(c=function e(t,n){var l="asc"===n.order?1:-1,i="asc"===n.order?-1:1;t.sort((function(e,t){var a,o;if("file"===n.sortKey)a=e.file,o=t.file;else{var u=r(n.sortKey.split("."),2),c=u[0],s=u[1];a=e.metrics[c][s],o=t.metrics[c][s]}return a===o?0:a<o?l:i}));for(var a=0;a<t.length;a++){var o=t[a];o.children&&(t[a]=u(u({},o),{},{children:e(o.children,n)}))}return t}(c,n)),c}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e){var t=e.setIsFlat,n=e.isFlat;return r.createElement("div",{className:"toggle"},r.createElement("div",{className:"toggle__label"},"Files:"),r.createElement("div",{className:"toggle__options"},r.createElement("button",{onClick:function(){return t(!n)},className:"toggle__option "+(n?"":"is-toggled")},"Tree"),r.createElement("button",{onClick:function(){return t(!n)},className:"toggle__option "+(n?"is-toggled":"")},"Flat"))," ")}},function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(0);function o(e){var t=e.children,n=e.filter,r=e.activeFilters,o=e.setFilters;return a.createElement("button",{className:"toggle__option "+(r[n]?"is-toggled":""),onClick:function(){return o(l(l({},r),{},i({},n,!r[n])))}},t)}e.exports=function(e){var t=e.activeFilters,n=e.setFilters;return a.createElement("div",{className:"toggle"},a.createElement("div",{className:"toggle__label"},"Filter:"),a.createElement("div",{className:"toggle__options"},a.createElement(o,{filter:"low",activeFilters:t,setFilters:n},"Low"),a.createElement(o,{filter:"medium",activeFilters:t,setFilters:n},"Medium"),a.createElement(o,{filter:"high",activeFilters:t,setFilters:n},"High")))}},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i=n(0);e.exports=function(e){var t=e.fileFilter,n=void 0===t?"":t,l=e.setFileFilter,a=n.split("/");return[{path:"",name:"all files"}].concat(r(a.map((function(e,t){return{path:a.slice(0,t+1).join("/"),name:e}})))).map((function(e){var t=e.path,r=e.name;return t===n?r:i.createElement(i.Fragment,null,i.createElement("a",{href:"javascript:void(0)",onClick:function(){return l(t)}},r),"/")}))}},function(e,t,n){"use strict";t.setLocation=function(e,t,n,r,l,i){var a=[t.sortKey,t.order,n,r.low,r.medium,r.high,encodeURIComponent(l),i.map(encodeURIComponent).join(",")],o="#".concat(a.join("/"));o!==location.hash&&window.history[e?"replaceState":"pushState"](null,"",o)},t.decodeLocation=function(){var e=location.hash.substr(1).split("/");if(8!==e.length)return null;try{return{activeSort:{sortKey:e[0],order:e[1]},isFlat:JSON.parse(e[2]),activeFilters:{low:JSON.parse(e[3]),medium:JSON.parse(e[4]),high:JSON.parse(e[5])},fileFilter:decodeURIComponent(e[6]),expandedLines:e[7].split(",").map(decodeURIComponent)}}catch(e){return null}}}]);
\ No newline at end of file diff --git a/node_modules/istanbul-reports/lib/html-spa/assets/sort-arrow-sprite.png b/node_modules/istanbul-reports/lib/html-spa/assets/sort-arrow-sprite.png Binary files differnew file mode 100644 index 0000000..03f704a --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/assets/sort-arrow-sprite.png diff --git a/node_modules/istanbul-reports/lib/html-spa/assets/spa.css b/node_modules/istanbul-reports/lib/html-spa/assets/spa.css new file mode 100644 index 0000000..8176b5b --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/assets/spa.css @@ -0,0 +1,298 @@ +/* Base */ + +body, +html { + margin: 0; + padding: 0; + height: 100%; +} + +body { + color: #333; + background-color: #fcfcfc; + font: 14px/14px -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', + Roboto, 'Helvetica Neue', Arial, sans-serif; +} + +button { + margin: 0; + border: none; + font: inherit; + color: inherit; +} + +button:focus { + outline: none; +} + +*, +*:after, +*:before { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* Typography */ + +h1 { + font-size: 20px; + line-height: 20px; + margin: 0; +} + +a { + color: #0074d9; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.small { + font-size: 12px; +} + +.strong { + font-weight: bold; +} + +.center { + text-align: center; +} + +.quiet { + opacity: 0.7; +} + +/* Colors */ + +.low { + background: #fce1e5; +} + +.low--dark { + background: #c21f39; +} + +.medium { + background: #fff4c2; +} + +.medium--dark { + background: #f9cd0b; +} + +.high { + background: rgb(230, 245, 208); +} + +.high--dark { + background: rgb(77, 146, 33); +} + +/* App */ + +.app { + height: 100%; +} + +/* Layout */ + +.layout { + display: flex; + flex-direction: column; + min-height: 100%; + padding: 20px; +} + +.layout__section { + flex-grow: 0; +} + +.layout__section--fill { + flex-grow: 1; +} + +.layout__section + .layout__section { + margin-top: 20px; +} + +@media only screen and (max-width: 640px) { + .col3 { + width: 100%; + max-width: 100%; + } + .hide-mobile { + display: none !important; + } +} + +/* Toolbar */ + +.toolbar { + display: flex; + flex-wrap: wrap; +} + +.toolbar__item { + margin-right: 40px; + margin-bottom: 10px; +} + +/* Toggle */ + +.toggle { + display: inline-flex; + align-items: center; +} + +.toggle__label { + margin-right: 0.5em; +} + +.toggle__options { + display: inline-block; + border: 1px solid #0074d9; + border-radius: 4px; + color: #0074d9; + overflow: hidden; + white-space: nowrap; +} + +.toggle__option { + padding: 4px 8px; + background: #fcfcfc; +} + +.toggle__option + .toggle__option { + border-left: 1px solid #0074d9; +} + +.toggle__option.is-toggled { + color: #fff; + background: #0074d9; + border-left-color: #fcfcfc; +} + +/* Expand */ + +.expandbutton { + display: inline-block; + width: 1em; + margin-right: 0.25em; + padding: 0; + background-color: transparent; + font-weight: bold; +} + +/* Fraction */ + +.fraction { + font-size: 12px; + color: #666; + padding: 2px 4px; + border-radius: 4px; +} + +/* Coverage */ + +.coverage-summary { + border-collapse: collapse; +} + +.coverage-summary tbody tr { + border-bottom: 1px solid #fff; +} + +.coverage-summary td, +.coverage-summary th { + padding: 5px; +} + +.coverage-summary th { + text-align: center; + font-weight: normal; + white-space: nowrap; +} + +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { + text-align: right; +} + +.coverage-summary th.file { + min-width: 300px; + text-align: left; +} + +.coverage-summary td.file { + white-space: nowrap; +} + +.coverage-summary td.pct { + font-weight: 400; +} + +.coverage-summary td.abs { + color: #666; + font-size: 12px; +} + +.coverage-summary td.empty { + opacity: 0.5; +} + +.coverage-summary .headercell { + border-top: 1px solid #eee; + text-align: right; + font-size: 12px; + color: #666; +} + +.coverage-summary .headercell:nth-child(5n - 2), +.coverage-summary td:nth-child(5n - 2) { + border-left: 2px solid #fcfcfc; + padding-left: 2em; +} + +.filetab { + display: inline-block; + width: 1em; +} + +/* Sorter */ + +.sorter { + display: inline-block; + width: 7px; + height: 10px; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} + +.sorted .sorter { + background-position: 0 -20px; +} + +.sorted-desc .sorter { + background-position: 0 -10px; +} + +.sortable { + cursor: pointer; +} + +/* Bar */ + +.bar { + width: 50px; + height: 5px; + background: #fff; +} + +.bar__data { + height: 100%; +} diff --git a/node_modules/istanbul-reports/lib/html-spa/index.js b/node_modules/istanbul-reports/lib/html-spa/index.js new file mode 100644 index 0000000..4ce9d7e --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/index.js @@ -0,0 +1,176 @@ +'use strict'; +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +const fs = require('fs'); +const path = require('path'); +const { ReportBase } = require('istanbul-lib-report'); +const HtmlReport = require('../html'); + +const standardLinkMapper = { + getPath(node) { + if (typeof node === 'string') { + return node; + } + let filePath = node.getQualifiedName(); + if (node.isSummary()) { + if (filePath !== '') { + filePath += '/index.html'; + } else { + filePath = 'index.html'; + } + } else { + filePath += '.html'; + } + return filePath; + }, + + relativePath(source, target) { + const targetPath = this.getPath(target); + const sourcePath = path.dirname(this.getPath(source)); + return path.relative(sourcePath, targetPath); + }, + + assetPath(node, name) { + return this.relativePath(this.getPath(node), name); + } +}; + +class HtmlSpaReport extends ReportBase { + constructor(opts = {}) { + super({ + // force the summarizer to nested for html-spa + summarizer: 'nested' + }); + + this.verbose = opts.verbose || false; + this.linkMapper = opts.linkMapper || standardLinkMapper; + this.subdir = opts.subdir || ''; + this.date = Date(); + this.skipEmpty = opts.skipEmpty; + this.htmlReport = new HtmlReport(opts); + this.htmlReport.getBreadcrumbHtml = function() { + return '<a href="javascript:history.back()">Back</a>'; + }; + + this.metricsToShow = opts.metricsToShow || [ + 'lines', + 'branches', + 'functions' + ]; + } + + getWriter(context) { + if (!this.subdir) { + return context.writer; + } + return context.writer.writerForDir(this.subdir); + } + + onStart(root, context) { + this.htmlReport.onStart(root, context); + + const writer = this.getWriter(context); + const srcDir = path.resolve(__dirname, './assets'); + fs.readdirSync(srcDir).forEach(f => { + const resolvedSource = path.resolve(srcDir, f); + const resolvedDestination = '.'; + const stat = fs.statSync(resolvedSource); + let dest; + + if (stat.isFile()) { + dest = resolvedDestination + '/' + f; + if (this.verbose) { + console.log('Write asset: ' + dest); + } + writer.copyFile(resolvedSource, dest); + } + }); + } + + onDetail(node, context) { + this.htmlReport.onDetail(node, context); + } + + getMetric(metric, type, context) { + const isEmpty = metric.total === 0; + return { + total: metric.total, + covered: metric.covered, + skipped: metric.skipped, + missed: metric.total - metric.covered, + pct: isEmpty ? 0 : metric.pct, + classForPercent: isEmpty + ? 'empty' + : context.classForPercent(type, metric.pct) + }; + } + + toDataStructure(node, context) { + const coverageSummary = node.getCoverageSummary(); + const metrics = { + statements: this.getMetric( + coverageSummary.statements, + 'statements', + context + ), + branches: this.getMetric( + coverageSummary.branches, + 'branches', + context + ), + functions: this.getMetric( + coverageSummary.functions, + 'functions', + context + ), + lines: this.getMetric(coverageSummary.lines, 'lines', context) + }; + + return { + file: node.getRelativeName(), + isEmpty: coverageSummary.isEmpty(), + metrics, + children: + node.isSummary() && + node + .getChildren() + .map(child => this.toDataStructure(child, context)) + }; + } + + onEnd(rootNode, context) { + const data = this.toDataStructure(rootNode, context); + + const cw = this.getWriter(context).writeFile( + this.linkMapper.getPath(rootNode) + ); + + cw.write( + `<!doctype html> + <html lang="en"> + <head> + <link rel="stylesheet" href="spa.css" /> + <meta name="viewport" content="width=device-width, initial-scale=1"> + </head> + <body> + <div id="app" class="app"></div> + <script> + window.data = ${JSON.stringify(data)}; + window.generatedDatetime = ${JSON.stringify( + String(Date()) + )}; + window.metricsToShow = ${JSON.stringify( + this.metricsToShow + )}; + </script> + <script src="bundle.js"></script> + </body> + </html>` + ); + cw.close(); + } +} + +module.exports = HtmlSpaReport; diff --git a/node_modules/istanbul-reports/lib/html-spa/src/fileBreadcrumbs.js b/node_modules/istanbul-reports/lib/html-spa/src/fileBreadcrumbs.js new file mode 100644 index 0000000..b123d37 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/src/fileBreadcrumbs.js @@ -0,0 +1,31 @@ +const React = require('react'); + +module.exports = function FileBreadcrumbs({ fileFilter = '', setFileFilter }) { + const parts = fileFilter.split('/'); + const breadcrumbs = [ + { + path: '', + name: 'all files' + }, + ...parts.map((part, i) => ({ + path: parts.slice(0, i + 1).join('/'), + name: part + })) + ]; + + return breadcrumbs.map(({ path, name }) => + path === fileFilter ? ( + name + ) : ( + <> + <a + href="javascript:void(0)" + onClick={() => setFileFilter(path)} + > + {name} + </a> + / + </> + ) + ); +}; diff --git a/node_modules/istanbul-reports/lib/html-spa/src/filterToggle.js b/node_modules/istanbul-reports/lib/html-spa/src/filterToggle.js new file mode 100644 index 0000000..b636b53 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/src/filterToggle.js @@ -0,0 +1,50 @@ +const React = require('react'); + +function ToggleOption({ children, filter, activeFilters, setFilters }) { + return ( + <button + className={ + 'toggle__option ' + (activeFilters[filter] ? 'is-toggled' : '') + } + onClick={() => + setFilters({ + ...activeFilters, + [filter]: !activeFilters[filter] + }) + } + > + {children} + </button> + ); +} + +module.exports = function FilterToggle({ activeFilters, setFilters }) { + return ( + <div className="toggle"> + <div className="toggle__label">Filter:</div> + <div className="toggle__options"> + <ToggleOption + filter="low" + activeFilters={activeFilters} + setFilters={setFilters} + > + Low + </ToggleOption> + <ToggleOption + filter="medium" + activeFilters={activeFilters} + setFilters={setFilters} + > + Medium + </ToggleOption> + <ToggleOption + filter="high" + activeFilters={activeFilters} + setFilters={setFilters} + > + High + </ToggleOption> + </div> + </div> + ); +}; diff --git a/node_modules/istanbul-reports/lib/html-spa/src/flattenToggle.js b/node_modules/istanbul-reports/lib/html-spa/src/flattenToggle.js new file mode 100644 index 0000000..8bb6ea3 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/src/flattenToggle.js @@ -0,0 +1,25 @@ +const React = require('react'); + +module.exports = function FlattenButton({ setIsFlat, isFlat }) { + return ( + <div className="toggle"> + <div className="toggle__label">Files:</div> + <div className="toggle__options"> + <button + onClick={() => setIsFlat(!isFlat)} + className={ + 'toggle__option ' + (!isFlat ? 'is-toggled' : '') + } + > + Tree + </button> + <button + onClick={() => setIsFlat(!isFlat)} + className={'toggle__option ' + (isFlat ? 'is-toggled' : '')} + > + Flat + </button> + </div>{' '} + </div> + ); +}; diff --git a/node_modules/istanbul-reports/lib/html-spa/src/getChildData.js b/node_modules/istanbul-reports/lib/html-spa/src/getChildData.js new file mode 100644 index 0000000..eff5d31 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/src/getChildData.js @@ -0,0 +1,155 @@ +function addPath(node, parentPath) { + if (!parentPath) { + return node; + } + return { ...node, file: parentPath + '/' + node.file }; +} + +function flatten(nodes, parentPath) { + let children = []; + for (let i = 0; i < nodes.length; i++) { + const child = nodes[i]; + if (child.children) { + children = [ + ...children, + ...flatten( + child.children, + (parentPath ? parentPath + '/' : '') + child.file + ) + ]; + } else { + children.push(addPath(child, parentPath)); + } + } + return children; +} + +function filterByFile(nodes, fileFilter, parentPath) { + let children = []; + + for (let i = 0; i < nodes.length; i++) { + const child = nodes[i]; + const childFullPath = (parentPath ? parentPath + '/' : '') + child.file; + + const isChildUnderFilter = + fileFilter === childFullPath || + fileFilter.indexOf(childFullPath + '/') === 0; + const isChildAboveFilter = + childFullPath.indexOf(fileFilter + '/') === 0; + + if (isChildUnderFilter) { + // flatten and continue looking underneath + children = [ + ...children, + ...filterByFile(child.children, fileFilter, childFullPath) + ]; + } else if (isChildAboveFilter) { + // remove the parent path and add everything underneath + const charsToRemoveFromFile = + fileFilter.length - (parentPath ? parentPath.length : 0); + let childFilename = child.file.slice(charsToRemoveFromFile); + if (childFilename[0] === '/') { + childFilename = childFilename.slice(1); + } + children.push({ + ...child, + file: childFilename + }); + } + } + return children; +} + +function sort(childData, activeSort) { + const top = activeSort.order === 'asc' ? 1 : -1; + const bottom = activeSort.order === 'asc' ? -1 : 1; + childData.sort((a, b) => { + let valueA; + let valueB; + if (activeSort.sortKey === 'file') { + valueA = a.file; + valueB = b.file; + } else { + const [metricType, valueType] = activeSort.sortKey.split('.'); + valueA = a.metrics[metricType][valueType]; + valueB = b.metrics[metricType][valueType]; + } + + if (valueA === valueB) { + return 0; + } + return valueA < valueB ? top : bottom; + }); + + for (let i = 0; i < childData.length; i++) { + const child = childData[i]; + if (child.children) { + childData[i] = { + ...child, + children: sort(child.children, activeSort) + }; + } + } + return childData; +} + +function filter(nodes, metricsMap, activeFilters) { + const children = []; + for (let i = 0; i < nodes.length; i++) { + let child = nodes[i]; + if (child.children) { + const newSubChildren = filter( + child.children, + metricsMap, + activeFilters + ); + if (newSubChildren.length) { + child = { ...child, children: newSubChildren }; + children.push(child); + } + } else { + if ( + (metricsMap.statements && + activeFilters[child.metrics.statements.classForPercent]) || + (metricsMap.branches && + activeFilters[child.metrics.branches.classForPercent]) || + (metricsMap.functions && + activeFilters[child.metrics.functions.classForPercent]) || + (metricsMap.lines && + activeFilters[child.metrics.lines.classForPercent]) + ) { + children.push(child); + } + } + } + return children; +} + +module.exports = function getChildData( + sourceData, + metricsToShow, + activeSort, + isFlat, + activeFilters, + fileFilter +) { + let childData = sourceData.children; + + if (isFlat) { + childData = flatten(childData.slice(0)); + } + + if (fileFilter) { + childData = filterByFile(childData, fileFilter); + } + + if (activeFilters.low) { + activeFilters = { ...activeFilters, empty: true }; + } + childData = filter(childData, metricsToShow, activeFilters); + + if (activeSort) { + childData = sort(childData, activeSort); + } + return childData; +}; diff --git a/node_modules/istanbul-reports/lib/html-spa/src/index.js b/node_modules/istanbul-reports/lib/html-spa/src/index.js new file mode 100644 index 0000000..c89c416 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/src/index.js @@ -0,0 +1,160 @@ +// The index file for the spa running on the summary page +const React = require('react'); +const ReactDOM = require('react-dom'); +const SummaryTableHeader = require('./summaryTableHeader'); +const SummaryTableLine = require('./summaryTableLine'); +const SummaryHeader = require('./summaryHeader'); +const getChildData = require('./getChildData'); +const FlattenToggle = require('./flattenToggle'); +const FilterToggle = require('./filterToggle'); +const FileBreadcrumbs = require('./fileBreadcrumbs'); +const { setLocation, decodeLocation } = require('./routing'); + +const { useState, useMemo, useEffect } = React; + +const sourceData = window.data; +const metricsToShow = {}; +for (let i = 0; i < window.metricsToShow.length; i++) { + metricsToShow[window.metricsToShow[i]] = true; +} + +let firstMount = true; + +function App() { + const routingDefaults = decodeLocation(); + + const [activeSort, setSort] = useState( + (routingDefaults && routingDefaults.activeSort) || { + sortKey: 'file', + order: 'desc' + } + ); + const [isFlat, setIsFlat] = useState( + (routingDefaults && routingDefaults.isFlat) || false + ); + const [activeFilters, setFilters] = useState( + (routingDefaults && routingDefaults.activeFilters) || { + low: true, + medium: true, + high: true + } + ); + const [expandedLines, setExpandedLines] = useState( + (routingDefaults && routingDefaults.expandedLines) || [] + ); + const [fileFilter, setFileFilter] = useState( + (routingDefaults && routingDefaults.fileFilter) || '' + ); + const childData = useMemo( + () => + getChildData( + sourceData, + metricsToShow, + activeSort, + isFlat, + activeFilters, + fileFilter + ), + [activeSort, isFlat, activeFilters, fileFilter] + ); + const overallMetrics = sourceData.metrics; + + useEffect(() => { + setLocation( + firstMount, + activeSort, + isFlat, + activeFilters, + fileFilter, + expandedLines + ); + firstMount = false; + }, [activeSort, isFlat, activeFilters, fileFilter, expandedLines]); + + useEffect(() => { + window.onpopstate = () => { + const routingState = decodeLocation(); + if (routingState) { + // make sure all the state is set before rendering to avoid url updates + // alternative is to merge all the states into one so it can be set in one go + // https://github.com/facebook/react/issues/14259 + ReactDOM.unstable_batchedUpdates(() => { + setFilters(routingState.activeFilters); + setSort(routingState.activeSort); + setIsFlat(routingState.isFlat); + setExpandedLines(routingState.expandedLines); + setFileFilter(routingState.fileFilter); + }); + } + }; + }, []); + + return ( + <div className="layout"> + <div className="layout__section"> + <SummaryHeader + metrics={overallMetrics} + metricsToShow={metricsToShow} + /> + </div> + <div className="layout__section"> + <div className="toolbar"> + <div className="toolbar__item"> + <FlattenToggle setIsFlat={setIsFlat} isFlat={isFlat} /> + </div> + <div className="toolbar__item"> + <FilterToggle + activeFilters={activeFilters} + setFilters={setFilters} + /> + </div> + </div> + </div> + <div className="layout__section"> + <h1> + <FileBreadcrumbs + fileFilter={fileFilter} + setFileFilter={setFileFilter} + /> + </h1> + </div> + <div className="layout__section layout__section--fill"> + <table className="coverage-summary"> + <SummaryTableHeader + onSort={newSort => { + setSort(newSort); + }} + activeSort={activeSort} + metricsToShow={metricsToShow} + /> + <tbody> + {childData.map(child => ( + <SummaryTableLine + {...child} + key={child.file} + metricsToShow={metricsToShow} + expandedLines={expandedLines} + setExpandedLines={setExpandedLines} + fileFilter={fileFilter} + setFileFilter={setFileFilter} + /> + ))} + </tbody> + </table> + </div> + <div className="layout__section center small quiet"> + Code coverage generated by{' '} + <a + href="https://istanbul.js.org/" + target="_blank" + rel="noopener noreferrer" + > + istanbul + </a>{' '} + at {window.generatedDatetime} + </div> + </div> + ); +} + +ReactDOM.render(<App />, document.getElementById('app')); diff --git a/node_modules/istanbul-reports/lib/html-spa/src/routing.js b/node_modules/istanbul-reports/lib/html-spa/src/routing.js new file mode 100644 index 0000000..a4d0bc7 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/src/routing.js @@ -0,0 +1,52 @@ +exports.setLocation = function setLocation( + isReplace, + activeSort, + isFlat, + activeFilters, + fileFilter, + expandedLines +) { + const params = [ + activeSort.sortKey, + activeSort.order, + isFlat, + activeFilters.low, + activeFilters.medium, + activeFilters.high, + encodeURIComponent(fileFilter), + expandedLines.map(encodeURIComponent).join(',') + ]; + const newUrl = `#${params.join('/')}`; + + if (newUrl === location.hash) { + return; + } + + window.history[isReplace ? 'replaceState' : 'pushState'](null, '', newUrl); +}; + +exports.decodeLocation = function decodeLocation() { + const items = location.hash.substr(1).split('/'); + if (items.length !== 8) { + return null; + } + + try { + return { + activeSort: { + sortKey: items[0], + order: items[1] + }, + isFlat: JSON.parse(items[2]), + activeFilters: { + low: JSON.parse(items[3]), + medium: JSON.parse(items[4]), + high: JSON.parse(items[5]) + }, + fileFilter: decodeURIComponent(items[6]), + expandedLines: items[7].split(',').map(decodeURIComponent) + }; + } catch (e) { + return null; + } +}; diff --git a/node_modules/istanbul-reports/lib/html-spa/src/summaryHeader.js b/node_modules/istanbul-reports/lib/html-spa/src/summaryHeader.js new file mode 100644 index 0000000..3bdd8ff --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/src/summaryHeader.js @@ -0,0 +1,63 @@ +const React = require('react'); + +function Ignores({ metrics, metricsToShow }) { + const metricKeys = Object.keys(metricsToShow); + const result = []; + + for (let i = 0; i < metricKeys.length; i++) { + const metricKey = metricKeys[i]; + if (metricsToShow[metricKey]) { + const skipped = metrics[metricKey].skipped; + if (skipped > 0) { + result.push( + `${skipped} ${metricKey}${ + skipped === 1 ? '' : metricKey === 'branch' ? 'es' : 's' + }` + ); + } + } + } + + if (result.length === 0) { + return false; + } + + return ( + <div className="toolbar__item"> + <span className="strong">{result.join(', ')}</span> + <span className="quiet">Ignored</span> + </div> + ); +} + +function StatusMetric({ data, name }) { + return ( + <div className="toolbar__item"> + <span className="strong">{data.pct}%</span>{' '} + <span className="quiet">{name}</span>{' '} + <span className={'fraction ' + data.classForPercent}> + {data.covered}/{data.total} + </span> + </div> + ); +} + +module.exports = function SummaryHeader({ metrics, metricsToShow }) { + return ( + <div className="toolbar"> + {metricsToShow.statements && ( + <StatusMetric data={metrics.statements} name="Statements" /> + )} + {metricsToShow.branches && ( + <StatusMetric data={metrics.branches} name="Branches" /> + )} + {metricsToShow.functions && ( + <StatusMetric data={metrics.functions} name="Functions" /> + )} + {metricsToShow.lines && ( + <StatusMetric data={metrics.lines} name="Lines" /> + )} + <Ignores metrics={metrics} metricsToShow={metricsToShow} /> + </div> + ); +}; diff --git a/node_modules/istanbul-reports/lib/html-spa/src/summaryTableHeader.js b/node_modules/istanbul-reports/lib/html-spa/src/summaryTableHeader.js new file mode 100644 index 0000000..7cf964e --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/src/summaryTableHeader.js @@ -0,0 +1,130 @@ +const React = require('react'); + +function getSortDetails(sortKey, activeSort) { + let newSort = { sortKey, order: 'desc' }; + let sortClass = ''; + if (activeSort && activeSort.sortKey === sortKey) { + sortClass = 'sorted'; + if (activeSort.order === 'desc') { + sortClass += '-desc'; + newSort.order = 'asc'; + } else { + if (sortKey !== 'file') { + newSort = { sortKey: 'file', order: 'desc' }; + } + } + } + + return { + newSort, + sortClass + }; +} + +function SummaryTableHeaderCell({ name, onSort, sortKey, activeSort }) { + const { newSort, sortClass } = getSortDetails(sortKey, activeSort); + return ( + <th + className={'sortable headercell ' + sortClass} + onClick={() => onSort(newSort)} + > + {name} + <span className="sorter" /> + </th> + ); +} + +function FileHeaderCell({ onSort, activeSort }) { + const { newSort, sortClass } = getSortDetails('file', activeSort); + + return ( + <th + className={'sortable file ' + sortClass} + onClick={() => onSort(newSort)} + > + File + <span className="sorter" /> + </th> + ); +} + +function SubHeadings({ sortKeyPrefix, onSort, activeSort }) { + return ( + <> + <SummaryTableHeaderCell + name="%" + onSort={onSort} + sortKey={sortKeyPrefix + '.pct'} + activeSort={activeSort} + /> + <th className="headercell"></th> + <SummaryTableHeaderCell + name="Covered" + onSort={onSort} + sortKey={sortKeyPrefix + '.covered'} + activeSort={activeSort} + /> + <SummaryTableHeaderCell + name="Missed" + onSort={onSort} + sortKey={sortKeyPrefix + '.missed'} + activeSort={activeSort} + /> + <SummaryTableHeaderCell + name="Total" + onSort={onSort} + sortKey={sortKeyPrefix + '.total'} + activeSort={activeSort} + /> + </> + ); +} + +module.exports = function SummaryTableHeader({ + onSort, + activeSort, + metricsToShow +}) { + return ( + <thead> + <tr className="topheading"> + <th></th> + {metricsToShow.statements && <th colSpan={4}>Statements</th>} + {metricsToShow.branches && <th colSpan={4}>Branches</th>} + {metricsToShow.functions && <th colSpan={4}>Functions</th>} + {metricsToShow.lines && <th colSpan={4}>Lines</th>} + </tr> + <tr className="subheading"> + <FileHeaderCell onSort={onSort} activeSort={activeSort} /> + {metricsToShow.statements && ( + <SubHeadings + sortKeyPrefix="statements" + onSort={onSort} + activeSort={activeSort} + /> + )} + {metricsToShow.branches && ( + <SubHeadings + sortKeyPrefix="branches" + onSort={onSort} + activeSort={activeSort} + /> + )} + {metricsToShow.functions && ( + <SubHeadings + sortKeyPrefix="functions" + onSort={onSort} + activeSort={activeSort} + /> + )} + {metricsToShow.lines && ( + <SubHeadings + sortKeyPrefix="lines" + onSort={onSort} + activeSort={activeSort} + /> + )} + </tr> + </thead> + ); +}; diff --git a/node_modules/istanbul-reports/lib/html-spa/src/summaryTableLine.js b/node_modules/istanbul-reports/lib/html-spa/src/summaryTableLine.js new file mode 100644 index 0000000..6dc56e6 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/src/summaryTableLine.js @@ -0,0 +1,159 @@ +const React = require('react'); + +function MetricCells({ metrics }) { + const { classForPercent, pct, covered, missed, total } = metrics; + + return ( + <> + <td className={'pct ' + classForPercent}>{Math.round(pct)}% </td> + <td className={classForPercent}> + <div className="bar"> + <div + className={`bar__data ${classForPercent} ${classForPercent}--dark`} + style={{ width: pct + '%' }} + ></div> + </div> + </td> + <td className={'abs ' + classForPercent}>{covered}</td> + <td className={'abs ' + classForPercent}>{missed}</td> + <td className={'abs ' + classForPercent}>{total}</td> + </> + ); +} + +function FileCell({ + file, + prefix, + expandedLines, + setExpandedLines, + hasChildren, + setFileFilter +}) { + if (hasChildren) { + const expandedIndex = expandedLines.indexOf(prefix + file); + const isExpanded = expandedIndex >= 0; + const newExpandedLines = isExpanded + ? [ + ...expandedLines.slice(0, expandedIndex), + ...expandedLines.slice(expandedIndex + 1) + ] + : [...expandedLines, prefix + file]; + + return ( + <> + <button + type="button" + onClick={() => setExpandedLines(newExpandedLines)} + className="expandbutton" + > + {isExpanded ? String.fromCharCode(0x2013) : '+'} + </button> + <a + href="javascript:void(0)" + onClick={() => setFileFilter(prefix + file)} + > + {file} + </a> + </> + ); + } else { + return <a href={`./${prefix}${file}.html`}>{file}</a>; + } +} + +function getWorstMetricClassForPercent(metricsToShow, metrics) { + let classForPercent = 'none'; + for (const metricToShow in metricsToShow) { + if (metricsToShow[metricToShow]) { + const metricClassForPercent = metrics[metricToShow].classForPercent; + + // ignore none metrics so they don't change whats shown + if (metricClassForPercent === 'none') { + continue; + } + + // if the metric low or lower than whats currently being used, replace it + if ( + metricClassForPercent == 'low' || + (metricClassForPercent === 'medium' && + classForPercent !== 'low') || + (metricClassForPercent === 'high' && + classForPercent !== 'low' && + classForPercent !== 'medium') + ) { + classForPercent = metricClassForPercent; + } + } + } + return classForPercent; +} + +module.exports = function SummaryTableLine({ + prefix, + metrics, + file, + children, + tabSize, + metricsToShow, + expandedLines, + setExpandedLines, + fileFilter, + setFileFilter +}) { + tabSize = tabSize || 0; + if (children && tabSize > 0) { + tabSize--; + } + prefix = (fileFilter ? fileFilter + '/' : '') + (prefix || ''); + + return ( + <> + <tr> + <td + className={ + 'file ' + + getWorstMetricClassForPercent(metricsToShow, metrics) + } + > + {/* eslint-disable-line prefer-spread */ Array.apply(null, { + length: tabSize + }).map((nothing, index) => ( + <span className="filetab" key={index} /> + ))} + <FileCell + file={file} + prefix={prefix} + expandedLines={expandedLines} + setExpandedLines={setExpandedLines} + hasChildren={Boolean(children)} + setFileFilter={setFileFilter} + /> + </td> + {metricsToShow.statements && ( + <MetricCells metrics={metrics.statements} /> + )} + {metricsToShow.branches && ( + <MetricCells metrics={metrics.branches} /> + )} + {metricsToShow.functions && ( + <MetricCells metrics={metrics.functions} /> + )} + {metricsToShow.lines && <MetricCells metrics={metrics.lines} />} + </tr> + {children && + expandedLines.indexOf(prefix + file) >= 0 && + children.map(child => ( + <SummaryTableLine + {...child} + tabSize={tabSize + 2} + key={child.file} + prefix={prefix + file + '/'} + metricsToShow={metricsToShow} + expandedLines={expandedLines} + setExpandedLines={setExpandedLines} + setFileFilter={setFileFilter} + /> + ))} + </> + ); +}; diff --git a/node_modules/istanbul-reports/lib/html-spa/webpack.config.js b/node_modules/istanbul-reports/lib/html-spa/webpack.config.js new file mode 100644 index 0000000..02a2d6c --- /dev/null +++ b/node_modules/istanbul-reports/lib/html-spa/webpack.config.js @@ -0,0 +1,22 @@ +'use strict'; + +const path = require('path'); + +module.exports = { + entry: path.resolve(__dirname, 'src/index.js'), + output: { + path: path.resolve(__dirname, 'assets'), + filename: 'bundle.js' + }, + module: { + rules: [ + { + test: /\.js$/, + exclude: /node_modules/, + use: { + loader: 'babel-loader' + } + } + ] + } +}; diff --git a/node_modules/istanbul-reports/lib/html/annotator.js b/node_modules/istanbul-reports/lib/html/annotator.js new file mode 100644 index 0000000..84d8fc3 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html/annotator.js @@ -0,0 +1,288 @@ +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +'use strict'; + +const InsertionText = require('./insertion-text'); +const lt = '\u0001'; +const gt = '\u0002'; +const RE_LT = /</g; +const RE_GT = />/g; +const RE_AMP = /&/g; +// eslint-disable-next-line +var RE_lt = /\u0001/g; +// eslint-disable-next-line +var RE_gt = /\u0002/g; + +function title(str) { + return ' title="' + str + '" '; +} + +function customEscape(text) { + text = String(text); + return text + .replace(RE_AMP, '&') + .replace(RE_LT, '<') + .replace(RE_GT, '>') + .replace(RE_lt, '<') + .replace(RE_gt, '>'); +} + +function annotateLines(fileCoverage, structuredText) { + const lineStats = fileCoverage.getLineCoverage(); + if (!lineStats) { + return; + } + Object.entries(lineStats).forEach(([lineNumber, count]) => { + if (structuredText[lineNumber]) { + structuredText[lineNumber].covered = count > 0 ? 'yes' : 'no'; + structuredText[lineNumber].hits = count; + } + }); +} + +function annotateStatements(fileCoverage, structuredText) { + const statementStats = fileCoverage.s; + const statementMeta = fileCoverage.statementMap; + Object.entries(statementStats).forEach(([stName, count]) => { + const meta = statementMeta[stName]; + const type = count > 0 ? 'yes' : 'no'; + const startCol = meta.start.column; + let endCol = meta.end.column + 1; + const startLine = meta.start.line; + const endLine = meta.end.line; + const openSpan = + lt + + 'span class="' + + (meta.skip ? 'cstat-skip' : 'cstat-no') + + '"' + + title('statement not covered') + + gt; + const closeSpan = lt + '/span' + gt; + let text; + + if (type === 'no' && structuredText[startLine]) { + if (endLine !== startLine) { + endCol = structuredText[startLine].text.originalLength(); + } + text = structuredText[startLine].text; + text.wrap( + startCol, + openSpan, + startCol < endCol ? endCol : text.originalLength(), + closeSpan + ); + } + }); +} + +function annotateFunctions(fileCoverage, structuredText) { + const fnStats = fileCoverage.f; + const fnMeta = fileCoverage.fnMap; + if (!fnStats) { + return; + } + Object.entries(fnStats).forEach(([fName, count]) => { + const meta = fnMeta[fName]; + const type = count > 0 ? 'yes' : 'no'; + // Some versions of the instrumenter in the wild populate 'func' + // but not 'decl': + const decl = meta.decl || meta.loc; + const startCol = decl.start.column; + let endCol = decl.end.column + 1; + const startLine = decl.start.line; + const endLine = decl.end.line; + const openSpan = + lt + + 'span class="' + + (meta.skip ? 'fstat-skip' : 'fstat-no') + + '"' + + title('function not covered') + + gt; + const closeSpan = lt + '/span' + gt; + let text; + + if (type === 'no' && structuredText[startLine]) { + if (endLine !== startLine) { + endCol = structuredText[startLine].text.originalLength(); + } + text = structuredText[startLine].text; + text.wrap( + startCol, + openSpan, + startCol < endCol ? endCol : text.originalLength(), + closeSpan + ); + } + }); +} + +function annotateBranches(fileCoverage, structuredText) { + const branchStats = fileCoverage.b; + const branchMeta = fileCoverage.branchMap; + if (!branchStats) { + return; + } + + Object.entries(branchStats).forEach(([branchName, branchArray]) => { + const sumCount = branchArray.reduce((p, n) => p + n, 0); + const metaArray = branchMeta[branchName].locations; + let i; + let count; + let meta; + let startCol; + let endCol; + let startLine; + let endLine; + let openSpan; + let closeSpan; + let text; + + // only highlight if partial branches are missing or if there is a + // single uncovered branch. + if (sumCount > 0 || (sumCount === 0 && branchArray.length === 1)) { + for ( + i = 0; + i < branchArray.length && i < metaArray.length; + i += 1 + ) { + count = branchArray[i]; + meta = metaArray[i]; + startCol = meta.start.column; + endCol = meta.end.column + 1; + startLine = meta.start.line; + endLine = meta.end.line; + openSpan = + lt + + 'span class="branch-' + + i + + ' ' + + (meta.skip ? 'cbranch-skip' : 'cbranch-no') + + '"' + + title('branch not covered') + + gt; + closeSpan = lt + '/span' + gt; + + // If the branch is an implicit else from an if statement, + // then the coverage report won't show a statistic. + // Therefore, the previous branch will be used to report that + // there is no coverage on that implicit branch. + if ( + count === 0 && + startLine === undefined && + branchMeta[branchName].type === 'if' + ) { + const prevMeta = metaArray[i - 1]; + startCol = prevMeta.start.column; + endCol = prevMeta.end.column + 1; + startLine = prevMeta.start.line; + endLine = prevMeta.end.line; + } + + if (count === 0 && structuredText[startLine]) { + //skip branches taken + if (endLine !== startLine) { + endCol = structuredText[ + startLine + ].text.originalLength(); + } + text = structuredText[startLine].text; + if (branchMeta[branchName].type === 'if') { + // 'if' is a special case + // since the else branch might not be visible, being non-existent + text.insertAt( + startCol, + lt + + 'span class="' + + (meta.skip + ? 'skip-if-branch' + : 'missing-if-branch') + + '"' + + title( + (i === 0 ? 'if' : 'else') + + ' path not taken' + ) + + gt + + (i === 0 ? 'I' : 'E') + + lt + + '/span' + + gt, + true, + false + ); + } else { + text.wrap( + startCol, + openSpan, + startCol < endCol ? endCol : text.originalLength(), + closeSpan + ); + } + } + } + } + }); +} + +function annotateSourceCode(fileCoverage, sourceStore) { + let codeArray; + let lineCoverageArray; + try { + const sourceText = sourceStore.getSource(fileCoverage.path); + const code = sourceText.split(/(?:\r?\n)|\r/); + let count = 0; + const structured = code.map(str => { + count += 1; + return { + line: count, + covered: 'neutral', + hits: 0, + text: new InsertionText(str, true) + }; + }); + structured.unshift({ + line: 0, + covered: null, + text: new InsertionText('') + }); + annotateLines(fileCoverage, structured); + //note: order is important, since statements typically result in spanning the whole line and doing branches late + //causes mismatched tags + annotateBranches(fileCoverage, structured); + annotateFunctions(fileCoverage, structured); + annotateStatements(fileCoverage, structured); + structured.shift(); + + codeArray = structured.map( + item => customEscape(item.text.toString()) || ' ' + ); + + lineCoverageArray = structured.map(item => ({ + covered: item.covered, + hits: item.hits > 0 ? item.hits + 'x' : ' ' + })); + + return { + annotatedCode: codeArray, + lineCoverage: lineCoverageArray, + maxLines: structured.length + }; + } catch (ex) { + codeArray = [ex.message]; + lineCoverageArray = [{ covered: 'no', hits: 0 }]; + String(ex.stack || '') + .split(/\r?\n/) + .forEach(line => { + codeArray.push(line); + lineCoverageArray.push({ covered: 'no', hits: 0 }); + }); + return { + annotatedCode: codeArray, + lineCoverage: lineCoverageArray, + maxLines: codeArray.length + }; + } +} + +module.exports = annotateSourceCode; diff --git a/node_modules/istanbul-reports/lib/html/assets/base.css b/node_modules/istanbul-reports/lib/html/assets/base.css new file mode 100644 index 0000000..f418035 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html/assets/base.css @@ -0,0 +1,224 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* yellow */ +.cbranch-no { background: yellow !important; color: #111; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +.highlighted, +.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ + background: #C21F39 !important; +} +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } +/* dark yellow (gold) */ +.status-line.medium, .medium .cover-fill { background: #f9cd0b; } +.medium .chart { border:1px solid #f9cd0b; } +/* light yellow */ +.medium { background: #fff4c2; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +span.cline-neutral { background: #eaeaea; } + +.coverage-summary td.empty { + opacity: .5; + padding-top: 4px; + padding-bottom: 4px; + line-height: 1; + color: #888; +} + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/node_modules/istanbul-reports/lib/html/assets/block-navigation.js b/node_modules/istanbul-reports/lib/html/assets/block-navigation.js new file mode 100644 index 0000000..d58c460 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html/assets/block-navigation.js @@ -0,0 +1,86 @@ +var jumpToCode = (function init() { + // Classes of code we would like to highlight in the file view + var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; + + // Elements to highlight in the file listing view + var fileListingElements = ['td.pct.low']; + + // We don't want to select elements that are direct descendants of another match + var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` + + // Selecter that finds elements on the page to which we can jump + var selector = + fileListingElements.join(', ') + + ', ' + + notSelector + + missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` + + // The NodeList of matching elements + var missingCoverageElements = document.querySelectorAll(selector); + + var currentIndex; + + function toggleClass(index) { + missingCoverageElements + .item(currentIndex) + .classList.remove('highlighted'); + missingCoverageElements.item(index).classList.add('highlighted'); + } + + function makeCurrent(index) { + toggleClass(index); + currentIndex = index; + missingCoverageElements.item(index).scrollIntoView({ + behavior: 'smooth', + block: 'center', + inline: 'center' + }); + } + + function goToPrevious() { + var nextIndex = 0; + if (typeof currentIndex !== 'number' || currentIndex === 0) { + nextIndex = missingCoverageElements.length - 1; + } else if (missingCoverageElements.length > 1) { + nextIndex = currentIndex - 1; + } + + makeCurrent(nextIndex); + } + + function goToNext() { + var nextIndex = 0; + + if ( + typeof currentIndex === 'number' && + currentIndex < missingCoverageElements.length - 1 + ) { + nextIndex = currentIndex + 1; + } + + makeCurrent(nextIndex); + } + + return function jump(event) { + if ( + document.getElementById('fileSearch') === document.activeElement && + document.activeElement != null + ) { + // if we're currently focused on the search input, we don't want to navigate + return; + } + + switch (event.which) { + case 78: // n + case 74: // j + goToNext(); + break; + case 66: // b + case 75: // k + case 80: // p + goToPrevious(); + break; + } + }; +})(); +window.addEventListener('keydown', jumpToCode); diff --git a/node_modules/istanbul-reports/lib/html/assets/favicon.png b/node_modules/istanbul-reports/lib/html/assets/favicon.png Binary files differnew file mode 100644 index 0000000..6691817 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html/assets/favicon.png diff --git a/node_modules/istanbul-reports/lib/html/assets/sort-arrow-sprite.png b/node_modules/istanbul-reports/lib/html/assets/sort-arrow-sprite.png Binary files differnew file mode 100644 index 0000000..03f704a --- /dev/null +++ b/node_modules/istanbul-reports/lib/html/assets/sort-arrow-sprite.png diff --git a/node_modules/istanbul-reports/lib/html/assets/sorter.js b/node_modules/istanbul-reports/lib/html/assets/sorter.js new file mode 100644 index 0000000..5ab961d --- /dev/null +++ b/node_modules/istanbul-reports/lib/html/assets/sorter.js @@ -0,0 +1,195 @@ +var addSorting = (function() { + 'use strict'; + var cols, + currentSort = { + index: 0, + desc: false + }; + + // returns the summary table element + function getTable() { + return document.querySelector('.coverage-summary'); + } + // returns the thead element of the summary table + function getTableHeader() { + return getTable().querySelector('thead tr'); + } + // returns the tbody element of the summary table + function getTableBody() { + return getTable().querySelector('tbody'); + } + // returns the th element for nth column + function getNthColumn(n) { + return getTableHeader().querySelectorAll('th')[n]; + } + + function onFilterInput() { + const searchValue = document.getElementById('fileSearch').value; + const rows = document.getElementsByTagName('tbody')[0].children; + for (let i = 0; i < rows.length; i++) { + const row = rows[i]; + if ( + row.textContent + .toLowerCase() + .includes(searchValue.toLowerCase()) + ) { + row.style.display = ''; + } else { + row.style.display = 'none'; + } + } + } + + // loads the search box + function addSearchBox() { + var template = document.getElementById('filterTemplate'); + var templateClone = template.content.cloneNode(true); + templateClone.getElementById('fileSearch').oninput = onFilterInput; + template.parentElement.appendChild(templateClone); + } + + // loads all columns + function loadColumns() { + var colNodes = getTableHeader().querySelectorAll('th'), + colNode, + cols = [], + col, + i; + + for (i = 0; i < colNodes.length; i += 1) { + colNode = colNodes[i]; + col = { + key: colNode.getAttribute('data-col'), + sortable: !colNode.getAttribute('data-nosort'), + type: colNode.getAttribute('data-type') || 'string' + }; + cols.push(col); + if (col.sortable) { + col.defaultDescSort = col.type === 'number'; + colNode.innerHTML = + colNode.innerHTML + '<span class="sorter"></span>'; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function(a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function(a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc + ? ' sorted-desc' + : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function() { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i = 0; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function() { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(); + addSearchBox(); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/node_modules/istanbul-reports/lib/html/assets/vendor/prettify.css b/node_modules/istanbul-reports/lib/html/assets/vendor/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/node_modules/istanbul-reports/lib/html/assets/vendor/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/node_modules/istanbul-reports/lib/html/assets/vendor/prettify.js b/node_modules/istanbul-reports/lib/html/assets/vendor/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html/assets/vendor/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V<U;++V){var ae=Z[V];if(ae.ignoreCase){ac=true}else{if(/[a-z]/i.test(ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){S=true;ac=false;break}}}var Y={b:8,t:9,n:10,v:11,f:12,r:13};function ab(ah){var ag=ah.charCodeAt(0);if(ag!==92){return ag}var af=ah.charAt(1);ag=Y[af];if(ag){return ag}else{if("0"<=af&&af<="7"){return parseInt(ah.substring(1),8)}else{if(af==="u"||af==="x"){return parseInt(ah.substring(2),16)}else{return ah.charCodeAt(1)}}}}function T(af){if(af<32){return(af<16?"\\x0":"\\x")+af.toString(16)}var ag=String.fromCharCode(af);if(ag==="\\"||ag==="-"||ag==="["||ag==="]"){ag="\\"+ag}return ag}function X(am){var aq=am.substring(1,am.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));var ak=[];var af=[];var ao=aq[0]==="^";for(var ar=ao?1:0,aj=aq.length;ar<aj;++ar){var ah=aq[ar];if(/\\[bdsw]/i.test(ah)){ak.push(ah)}else{var ag=ab(ah);var al;if(ar+2<aj&&"-"===aq[ar+1]){al=ab(aq[ar+2]);ar+=2}else{al=ag}af.push([ag,al]);if(!(al<65||ag>122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;ar<af.length;++ar){var at=af[ar];if(at[0]<=ap[1]+1){ap[1]=Math.max(ap[1],at[1])}else{ai.push(ap=at)}}var an=["["];if(ao){an.push("^")}an.push.apply(an,ak);for(var ar=0;ar<ai.length;++ar){var at=ai[ar];an.push(T(at[0]));if(at[1]>at[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak<ah;++ak){var ag=aj[ak];if(ag==="("){++am}else{if("\\"===ag.charAt(0)){var af=+ag.substring(1);if(af&&af<=am){an[af]=-1}}}}for(var ak=1;ak<an.length;++ak){if(-1===an[ak]){an[ak]=++ad}}for(var ak=0,am=0;ak<ah;++ak){var ag=aj[ak];if(ag==="("){++am;if(an[am]===undefined){aj[ak]="(?:"}}else{if("\\"===ag.charAt(0)){var af=+ag.substring(1);if(af&&af<=am){aj[ak]="\\"+an[am]}}}}for(var ak=0,am=0;ak<ah;++ak){if("^"===aj[ak]&&"^"!==aj[ak+1]){aj[ak]=""}}if(al.ignoreCase&&S){for(var ak=0;ak<ah;++ak){var ag=aj[ak];var ai=ag.charAt(0);if(ag.length>=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V<U;++V){var ae=Z[V];if(ae.global||ae.multiline){throw new Error(""+ae)}aa.push("(?:"+W(ae)+")")}return new RegExp(aa.join("|"),ac?"gi":"g")}function a(V){var U=/(?:^|\s)nocode(?:\s|$)/;var X=[];var T=0;var Z=[];var W=0;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=document.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Y=S&&"pre"===S.substring(0,3);function aa(ab){switch(ab.nodeType){case 1:if(U.test(ab.className)){return}for(var ae=ab.firstChild;ae;ae=ae.nextSibling){aa(ae)}var ad=ab.nodeName;if("BR"===ad||"LI"===ad){X[W]="\n";Z[W<<1]=T++;Z[(W++<<1)|1]=ab}break;case 3:case 4:var ac=ab.nodeValue;if(ac.length){if(!Y){ac=ac.replace(/[ \t\r\n]+/g," ")}else{ac=ac.replace(/\r\n?/g,"\n")}X[W]=ac;Z[W<<1]=T;T+=ac.length;Z[(W++<<1)|1]=ab}break}}aa(V);return{sourceCode:X.join("").replace(/\n$/,""),spans:Z}}function B(S,U,W,T){if(!U){return}var V={sourceCode:U,basePos:S};W(V);T.push.apply(T,V.decorations)}var v=/\S/;function o(S){var V=undefined;for(var U=S.firstChild;U;U=U.nextSibling){var T=U.nodeType;V=(T===1)?(V?S:U):(T===3)?(v.test(U.nodeValue)?S:V):V}return V===S?undefined:V}function g(U,T){var S={};var V;(function(){var ad=U.concat(T);var ah=[];var ag={};for(var ab=0,Z=ad.length;ab<Z;++ab){var Y=ad[ab];var ac=Y[3];if(ac){for(var ae=ac.length;--ae>=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae<aq;++ae){var ag=an[ae];var ap=aj[ag];var ai=void 0;var am;if(typeof ap==="string"){am=false}else{var aa=S[ag.charAt(0)];if(aa){ai=ag.match(aa[1]);ap=aa[0]}else{for(var ao=0;ao<X;++ao){aa=T[ao];ai=ag.match(aa[1]);if(ai){ap=aa[0];break}}if(!ai){ap=F}}am=ap.length>=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y<W.length;++Y){ae(W[Y])}if(ag===(ag|0)){W[0].setAttribute("value",ag)}var aa=ac.createElement("OL");aa.className="linenums";var X=Math.max(0,((ag-1))|0)||0;for(var Y=0,T=W.length;Y<T;++Y){af=W[Y];af.className="L"+((Y+X)%10);if(!af.firstChild){af.appendChild(ac.createTextNode("\xA0"))}aa.appendChild(af)}V.appendChild(aa)}function D(ac){var aj=/\bMSIE\b/.test(navigator.userAgent);var am=/\n/g;var al=ac.sourceCode;var an=al.length;var V=0;var aa=ac.spans;var T=aa.length;var ah=0;var X=ac.decorations;var Y=X.length;var Z=0;X[Y]=an;var ar,aq;for(aq=ar=0;aq<Y;){if(X[aq]!==X[aq+2]){X[ar++]=X[aq++];X[ar++]=X[aq++]}else{aq+=2}}Y=ar;for(aq=ar=0;aq<Y;){var at=X[aq];var ab=X[aq+1];var W=aq+2;while(W+2<=Y&&X[W+1]===ab){W+=2}X[ar++]=at;X[ar++]=ab;aq=W}Y=X.length=ar;var ae=null;while(ah<T){var af=aa[ah];var S=aa[ah+2]||an;var ag=X[Z];var ap=X[Z+2]||an;var W=Math.min(S,ap);var ak=aa[ah+1];var U;if(ak.nodeType!==1&&(U=al.substring(V,W))){if(aj){U=U.replace(am,"\r")}ak.nodeValue=U;var ai=ak.ownerDocument;var ao=ai.createElement("SPAN");ao.className=X[Z+1];var ad=ak.parentNode;ad.replaceChild(ao,ak);ao.appendChild(ak);if(V<S){aa[ah+1]=ak=ai.createTextNode(al.substring(W,S));ad.insertBefore(ak,ao.nextSibling)}}V=W;if(V>=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*</.test(S)?"default-markup":"default-code"}return t[T]}c(K,["default-code"]);c(g([],[[F,/^[^<?]+/],[E,/^<!\w[^>]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa<ac.length;++aa){for(var Z=0,V=ac[aa].length;Z<V;++Z){T.push(ac[aa][Z])}}ac=null;var W=Date;if(!W.now){W={now:function(){return +(new Date)}}}var X=0;var S;var ab=/\blang(?:uage)?-([\w.]+)(?!\S)/;var ae=/\bprettyprint\b/;function U(){var ag=(window.PR_SHOULD_USE_CONTINUATION?W.now()+250:Infinity);for(;X<T.length&&W.now()<ag;X++){var aj=T[X];var ai=aj.className;if(ai.indexOf("prettyprint")>=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X<T.length){setTimeout(U,250)}else{if(ad){ad()}}}U()}window.prettyPrintOne=y;window.prettyPrint=b;window.PR={createSimpleLexer:g,registerLangHandler:c,sourceDecorator:i,PR_ATTRIB_NAME:P,PR_ATTRIB_VALUE:n,PR_COMMENT:j,PR_DECLARATION:E,PR_KEYWORD:z,PR_LITERAL:G,PR_NOCODE:N,PR_PLAIN:F,PR_PUNCTUATION:L,PR_SOURCE:J,PR_STRING:C,PR_TAG:m,PR_TYPE:O}})();PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_DECLARATION,/^<!\w[^>]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^<script\b[^>]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:<!--|-->)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/node_modules/istanbul-reports/lib/html/index.js b/node_modules/istanbul-reports/lib/html/index.js new file mode 100644 index 0000000..0c279b9 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html/index.js @@ -0,0 +1,421 @@ +'use strict'; +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +const fs = require('fs'); +const path = require('path'); +const html = require('html-escaper'); +const { ReportBase } = require('istanbul-lib-report'); +const annotator = require('./annotator'); + +function htmlHead(details) { + return ` +<head> + <title>Code coverage report for ${html.escape(details.entity)}</title> + <meta charset="utf-8" /> + <link rel="stylesheet" href="${html.escape(details.prettify.css)}" /> + <link rel="stylesheet" href="${html.escape(details.base.css)}" /> + <link rel="shortcut icon" type="image/x-icon" href="${html.escape( + details.favicon + )}" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <style type='text/css'> + .coverage-summary .sorter { + background-image: url(${html.escape(details.sorter.image)}); + } + </style> +</head> + `; +} + +function headerTemplate(details) { + function metricsTemplate({ pct, covered, total }, kind) { + return ` + <div class='fl pad1y space-right2'> + <span class="strong">${pct}% </span> + <span class="quiet">${kind}</span> + <span class='fraction'>${covered}/${total}</span> + </div> + `; + } + + function skipTemplate(metrics) { + const statements = metrics.statements.skipped; + const branches = metrics.branches.skipped; + const functions = metrics.functions.skipped; + + const countLabel = (c, label, plural) => + c === 0 ? [] : `${c} ${label}${c === 1 ? '' : plural}`; + const skips = [].concat( + countLabel(statements, 'statement', 's'), + countLabel(functions, 'function', 's'), + countLabel(branches, 'branch', 'es') + ); + + if (skips.length === 0) { + return ''; + } + + return ` + <div class='fl pad1y'> + <span class="strong">${skips.join(', ')}</span> + <span class="quiet">Ignored</span> + </div> + `; + } + + return ` +<!doctype html> +<html lang="en"> +${htmlHead(details)} +<body> +<div class='wrapper'> + <div class='pad1'> + <h1>${details.pathHtml}</h1> + <div class='clearfix'> + ${metricsTemplate(details.metrics.statements, 'Statements')} + ${metricsTemplate(details.metrics.branches, 'Branches')} + ${metricsTemplate(details.metrics.functions, 'Functions')} + ${metricsTemplate(details.metrics.lines, 'Lines')} + ${skipTemplate(details.metrics)} + </div> + <p class="quiet"> + Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block. + </p> + <template id="filterTemplate"> + <div class="quiet"> + Filter: + <input oninput="onInput()" type="search" id="fileSearch"> + </div> + </template> + </div> + <div class='status-line ${details.reportClass}'></div> + `; +} + +function footerTemplate(details) { + return ` + <div class='push'></div><!-- for sticky footer --> + </div><!-- /wrapper --> + <div class='footer quiet pad2 space-top1 center small'> + Code coverage generated by + <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a> + at ${html.escape(details.datetime)} + </div> + <script src="${html.escape(details.prettify.js)}"></script> + <script> + window.onload = function () { + prettyPrint(); + }; + </script> + <script src="${html.escape(details.sorter.js)}"></script> + <script src="${html.escape(details.blockNavigation.js)}"></script> + </body> +</html> + `; +} + +function detailTemplate(data) { + const lineNumbers = new Array(data.maxLines).fill().map((_, i) => i + 1); + const lineLink = num => + `<a name='L${num}'></a><a href='#L${num}'>${num}</a>`; + const lineCount = line => + `<span class="cline-any cline-${line.covered}">${line.hits}</span>`; + + /* This is rendered in a `<pre>`, need control of all whitespace. */ + return [ + '<tr>', + `<td class="line-count quiet">${lineNumbers + .map(lineLink) + .join('\n')}</td>`, + `<td class="line-coverage quiet">${data.lineCoverage + .map(lineCount) + .join('\n')}</td>`, + `<td class="text"><pre class="prettyprint lang-js">${data.annotatedCode.join( + '\n' + )}</pre></td>`, + '</tr>' + ].join(''); +} +const summaryTableHeader = [ + '<div class="pad1">', + '<table class="coverage-summary">', + '<thead>', + '<tr>', + ' <th data-col="file" data-fmt="html" data-html="true" class="file">File</th>', + ' <th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>', + ' <th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>', + ' <th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>', + ' <th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>', + ' <th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>', + ' <th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>', + ' <th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>', + ' <th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>', + ' <th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>', + '</tr>', + '</thead>', + '<tbody>' +].join('\n'); + +function summaryLineTemplate(details) { + const { reportClasses, metrics, file, output } = details; + const percentGraph = pct => { + if (!isFinite(pct)) { + return ''; + } + + const cls = ['cover-fill']; + if (pct === 100) { + cls.push('cover-full'); + } + + pct = Math.floor(pct); + return [ + `<div class="${cls.join(' ')}" style="width: ${pct}%"></div>`, + `<div class="cover-empty" style="width: ${100 - pct}%"></div>` + ].join(''); + }; + const summaryType = (type, showGraph = false) => { + const info = metrics[type]; + const reportClass = reportClasses[type]; + const result = [ + `<td data-value="${info.pct}" class="pct ${reportClass}">${info.pct}%</td>`, + `<td data-value="${info.total}" class="abs ${reportClass}">${info.covered}/${info.total}</td>` + ]; + if (showGraph) { + result.unshift( + `<td data-value="${info.pct}" class="pic ${reportClass}">`, + `<div class="chart">${percentGraph(info.pct)}</div>`, + `</td>` + ); + } + + return result; + }; + + return [] + .concat( + '<tr>', + `<td class="file ${ + reportClasses.statements + }" data-value="${html.escape(file)}"><a href="${html.escape( + output + )}">${html.escape(file)}</a></td>`, + summaryType('statements', true), + summaryType('branches'), + summaryType('functions'), + summaryType('lines'), + '</tr>\n' + ) + .join('\n\t'); +} + +const summaryTableFooter = ['</tbody>', '</table>', '</div>'].join('\n'); +const emptyClasses = { + statements: 'empty', + lines: 'empty', + functions: 'empty', + branches: 'empty' +}; + +const standardLinkMapper = { + getPath(node) { + if (typeof node === 'string') { + return node; + } + let filePath = node.getQualifiedName(); + if (node.isSummary()) { + if (filePath !== '') { + filePath += '/index.html'; + } else { + filePath = 'index.html'; + } + } else { + filePath += '.html'; + } + return filePath; + }, + + relativePath(source, target) { + const targetPath = this.getPath(target); + const sourcePath = path.dirname(this.getPath(source)); + return path.posix.relative(sourcePath, targetPath); + }, + + assetPath(node, name) { + return this.relativePath(this.getPath(node), name); + } +}; + +function fixPct(metrics) { + Object.keys(emptyClasses).forEach(key => { + metrics[key].pct = 0; + }); + return metrics; +} + +class HtmlReport extends ReportBase { + constructor(opts) { + super(); + + this.verbose = opts.verbose; + this.linkMapper = opts.linkMapper || standardLinkMapper; + this.subdir = opts.subdir || ''; + this.date = Date(); + this.skipEmpty = opts.skipEmpty; + } + + getBreadcrumbHtml(node) { + let parent = node.getParent(); + const nodePath = []; + + while (parent) { + nodePath.push(parent); + parent = parent.getParent(); + } + + const linkPath = nodePath.map(ancestor => { + const target = this.linkMapper.relativePath(node, ancestor); + const name = ancestor.getRelativeName() || 'All files'; + return '<a href="' + target + '">' + name + '</a>'; + }); + + linkPath.reverse(); + return linkPath.length > 0 + ? linkPath.join(' / ') + ' ' + node.getRelativeName() + : 'All files'; + } + + fillTemplate(node, templateData, context) { + const linkMapper = this.linkMapper; + const summary = node.getCoverageSummary(); + templateData.entity = node.getQualifiedName() || 'All files'; + templateData.metrics = summary; + templateData.reportClass = context.classForPercent( + 'statements', + summary.statements.pct + ); + templateData.pathHtml = this.getBreadcrumbHtml(node); + templateData.base = { + css: linkMapper.assetPath(node, 'base.css') + }; + templateData.sorter = { + js: linkMapper.assetPath(node, 'sorter.js'), + image: linkMapper.assetPath(node, 'sort-arrow-sprite.png') + }; + templateData.blockNavigation = { + js: linkMapper.assetPath(node, 'block-navigation.js') + }; + templateData.prettify = { + js: linkMapper.assetPath(node, 'prettify.js'), + css: linkMapper.assetPath(node, 'prettify.css') + }; + templateData.favicon = linkMapper.assetPath(node, 'favicon.png'); + } + + getTemplateData() { + return { datetime: this.date }; + } + + getWriter(context) { + if (!this.subdir) { + return context.writer; + } + return context.writer.writerForDir(this.subdir); + } + + onStart(root, context) { + const assetHeaders = { + '.js': '/* eslint-disable */\n' + }; + + ['.', 'vendor'].forEach(subdir => { + const writer = this.getWriter(context); + const srcDir = path.resolve(__dirname, 'assets', subdir); + fs.readdirSync(srcDir).forEach(f => { + const resolvedSource = path.resolve(srcDir, f); + const resolvedDestination = '.'; + const stat = fs.statSync(resolvedSource); + let dest; + + if (stat.isFile()) { + dest = resolvedDestination + '/' + f; + if (this.verbose) { + console.log('Write asset: ' + dest); + } + writer.copyFile( + resolvedSource, + dest, + assetHeaders[path.extname(f)] + ); + } + }); + }); + } + + onSummary(node, context) { + const linkMapper = this.linkMapper; + const templateData = this.getTemplateData(); + const children = node.getChildren(); + const skipEmpty = this.skipEmpty; + + this.fillTemplate(node, templateData, context); + const cw = this.getWriter(context).writeFile(linkMapper.getPath(node)); + cw.write(headerTemplate(templateData)); + cw.write(summaryTableHeader); + children.forEach(child => { + const metrics = child.getCoverageSummary(); + const isEmpty = metrics.isEmpty(); + if (skipEmpty && isEmpty) { + return; + } + const reportClasses = isEmpty + ? emptyClasses + : { + statements: context.classForPercent( + 'statements', + metrics.statements.pct + ), + lines: context.classForPercent( + 'lines', + metrics.lines.pct + ), + functions: context.classForPercent( + 'functions', + metrics.functions.pct + ), + branches: context.classForPercent( + 'branches', + metrics.branches.pct + ) + }; + const data = { + metrics: isEmpty ? fixPct(metrics) : metrics, + reportClasses, + file: child.getRelativeName(), + output: linkMapper.relativePath(node, child) + }; + cw.write(summaryLineTemplate(data) + '\n'); + }); + cw.write(summaryTableFooter); + cw.write(footerTemplate(templateData)); + cw.close(); + } + + onDetail(node, context) { + const linkMapper = this.linkMapper; + const templateData = this.getTemplateData(); + + this.fillTemplate(node, templateData, context); + const cw = this.getWriter(context).writeFile(linkMapper.getPath(node)); + cw.write(headerTemplate(templateData)); + cw.write('<pre><table class="coverage">\n'); + cw.write(detailTemplate(annotator(node.getFileCoverage(), context))); + cw.write('</table></pre>\n'); + cw.write(footerTemplate(templateData)); + cw.close(); + } +} + +module.exports = HtmlReport; diff --git a/node_modules/istanbul-reports/lib/html/insertion-text.js b/node_modules/istanbul-reports/lib/html/insertion-text.js new file mode 100644 index 0000000..6f80642 --- /dev/null +++ b/node_modules/istanbul-reports/lib/html/insertion-text.js @@ -0,0 +1,114 @@ +'use strict'; +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +function InsertionText(text, consumeBlanks) { + this.text = text; + this.origLength = text.length; + this.offsets = []; + this.consumeBlanks = consumeBlanks; + this.startPos = this.findFirstNonBlank(); + this.endPos = this.findLastNonBlank(); +} + +const WHITE_RE = /[ \f\n\r\t\v\u00A0\u2028\u2029]/; + +InsertionText.prototype = { + findFirstNonBlank() { + let pos = -1; + const text = this.text; + const len = text.length; + let i; + for (i = 0; i < len; i += 1) { + if (!text.charAt(i).match(WHITE_RE)) { + pos = i; + break; + } + } + return pos; + }, + findLastNonBlank() { + const text = this.text; + const len = text.length; + let pos = text.length + 1; + let i; + for (i = len - 1; i >= 0; i -= 1) { + if (!text.charAt(i).match(WHITE_RE)) { + pos = i; + break; + } + } + return pos; + }, + originalLength() { + return this.origLength; + }, + + insertAt(col, str, insertBefore, consumeBlanks) { + consumeBlanks = + typeof consumeBlanks === 'undefined' + ? this.consumeBlanks + : consumeBlanks; + col = col > this.originalLength() ? this.originalLength() : col; + col = col < 0 ? 0 : col; + + if (consumeBlanks) { + if (col <= this.startPos) { + col = 0; + } + if (col > this.endPos) { + col = this.origLength; + } + } + + const len = str.length; + const offset = this.findOffset(col, len, insertBefore); + const realPos = col + offset; + const text = this.text; + this.text = text.substring(0, realPos) + str + text.substring(realPos); + return this; + }, + + findOffset(pos, len, insertBefore) { + const offsets = this.offsets; + let offsetObj; + let cumulativeOffset = 0; + let i; + + for (i = 0; i < offsets.length; i += 1) { + offsetObj = offsets[i]; + if ( + offsetObj.pos < pos || + (offsetObj.pos === pos && !insertBefore) + ) { + cumulativeOffset += offsetObj.len; + } + if (offsetObj.pos >= pos) { + break; + } + } + if (offsetObj && offsetObj.pos === pos) { + offsetObj.len += len; + } else { + offsets.splice(i, 0, { pos, len }); + } + return cumulativeOffset; + }, + + wrap(startPos, startText, endPos, endText, consumeBlanks) { + this.insertAt(startPos, startText, true, consumeBlanks); + this.insertAt(endPos, endText, false, consumeBlanks); + return this; + }, + + wrapLine(startText, endText) { + this.wrap(0, startText, this.originalLength(), endText); + }, + + toString() { + return this.text; + } +}; + +module.exports = InsertionText; diff --git a/node_modules/istanbul-reports/lib/json-summary/index.js b/node_modules/istanbul-reports/lib/json-summary/index.js new file mode 100644 index 0000000..318a47f --- /dev/null +++ b/node_modules/istanbul-reports/lib/json-summary/index.js @@ -0,0 +1,56 @@ +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +'use strict'; +const { ReportBase } = require('istanbul-lib-report'); + +class JsonSummaryReport extends ReportBase { + constructor(opts) { + super(); + + this.file = opts.file || 'coverage-summary.json'; + this.contentWriter = null; + this.first = true; + } + + onStart(root, context) { + this.contentWriter = context.writer.writeFile(this.file); + this.contentWriter.write('{'); + } + + writeSummary(filePath, sc) { + const cw = this.contentWriter; + if (this.first) { + this.first = false; + } else { + cw.write(','); + } + cw.write(JSON.stringify(filePath)); + cw.write(': '); + cw.write(JSON.stringify(sc)); + cw.println(''); + } + + onSummary(node) { + if (!node.isRoot()) { + return; + } + this.writeSummary('total', node.getCoverageSummary()); + } + + onDetail(node) { + this.writeSummary( + node.getFileCoverage().path, + node.getCoverageSummary() + ); + } + + onEnd() { + const cw = this.contentWriter; + cw.println('}'); + cw.close(); + } +} + +module.exports = JsonSummaryReport; diff --git a/node_modules/istanbul-reports/lib/json/index.js b/node_modules/istanbul-reports/lib/json/index.js new file mode 100644 index 0000000..bcae6ae --- /dev/null +++ b/node_modules/istanbul-reports/lib/json/index.js @@ -0,0 +1,44 @@ +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +'use strict'; +const { ReportBase } = require('istanbul-lib-report'); + +class JsonReport extends ReportBase { + constructor(opts) { + super(); + + this.file = opts.file || 'coverage-final.json'; + this.first = true; + } + + onStart(root, context) { + this.contentWriter = context.writer.writeFile(this.file); + this.contentWriter.write('{'); + } + + onDetail(node) { + const fc = node.getFileCoverage(); + const key = fc.path; + const cw = this.contentWriter; + + if (this.first) { + this.first = false; + } else { + cw.write(','); + } + cw.write(JSON.stringify(key)); + cw.write(': '); + cw.write(JSON.stringify(fc)); + cw.println(''); + } + + onEnd() { + const cw = this.contentWriter; + cw.println('}'); + cw.close(); + } +} + +module.exports = JsonReport; diff --git a/node_modules/istanbul-reports/lib/lcov/index.js b/node_modules/istanbul-reports/lib/lcov/index.js new file mode 100644 index 0000000..383c202 --- /dev/null +++ b/node_modules/istanbul-reports/lib/lcov/index.js @@ -0,0 +1,33 @@ +'use strict'; +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +const { ReportBase } = require('istanbul-lib-report'); +const LcovOnlyReport = require('../lcovonly'); +const HtmlReport = require('../html'); + +class LcovReport extends ReportBase { + constructor(opts) { + super(); + this.lcov = new LcovOnlyReport({ file: 'lcov.info', ...opts }); + this.html = new HtmlReport({ subdir: 'lcov-report' }); + } +} + +['Start', 'End', 'Summary', 'SummaryEnd', 'Detail'].forEach(what => { + const meth = 'on' + what; + LcovReport.prototype[meth] = function(...args) { + const lcov = this.lcov; + const html = this.html; + + if (lcov[meth]) { + lcov[meth](...args); + } + if (html[meth]) { + html[meth](...args); + } + }; +}); + +module.exports = LcovReport; diff --git a/node_modules/istanbul-reports/lib/lcovonly/index.js b/node_modules/istanbul-reports/lib/lcovonly/index.js new file mode 100644 index 0000000..0720e46 --- /dev/null +++ b/node_modules/istanbul-reports/lib/lcovonly/index.js @@ -0,0 +1,77 @@ +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +'use strict'; +const { ReportBase } = require('istanbul-lib-report'); + +class LcovOnlyReport extends ReportBase { + constructor(opts) { + super(); + opts = opts || {}; + this.file = opts.file || 'lcov.info'; + this.projectRoot = opts.projectRoot || process.cwd(); + this.contentWriter = null; + } + + onStart(root, context) { + this.contentWriter = context.writer.writeFile(this.file); + } + + onDetail(node) { + const fc = node.getFileCoverage(); + const writer = this.contentWriter; + const functions = fc.f; + const functionMap = fc.fnMap; + const lines = fc.getLineCoverage(); + const branches = fc.b; + const branchMap = fc.branchMap; + const summary = node.getCoverageSummary(); + const path = require('path'); + + writer.println('TN:'); + const fileName = path.relative(this.projectRoot, fc.path); + writer.println('SF:' + fileName); + + Object.values(functionMap).forEach(meta => { + // Some versions of the instrumenter in the wild populate 'loc' + // but not 'decl': + const decl = meta.decl || meta.loc; + writer.println('FN:' + [decl.start.line, meta.name].join(',')); + }); + writer.println('FNF:' + summary.functions.total); + writer.println('FNH:' + summary.functions.covered); + + Object.entries(functionMap).forEach(([key, meta]) => { + const stats = functions[key]; + writer.println('FNDA:' + [stats, meta.name].join(',')); + }); + + Object.entries(lines).forEach(entry => { + writer.println('DA:' + entry.join(',')); + }); + writer.println('LF:' + summary.lines.total); + writer.println('LH:' + summary.lines.covered); + + Object.entries(branches).forEach(([key, branchArray]) => { + const meta = branchMap[key]; + if (meta) { + const { line } = meta.loc.start; + branchArray.forEach((b, i) => { + writer.println('BRDA:' + [line, key, i, b].join(',')); + }); + } else { + console.warn('Missing coverage entries in', fileName, key); + } + }); + writer.println('BRF:' + summary.branches.total); + writer.println('BRH:' + summary.branches.covered); + writer.println('end_of_record'); + } + + onEnd() { + this.contentWriter.close(); + } +} + +module.exports = LcovOnlyReport; diff --git a/node_modules/istanbul-reports/lib/none/index.js b/node_modules/istanbul-reports/lib/none/index.js new file mode 100644 index 0000000..81c1408 --- /dev/null +++ b/node_modules/istanbul-reports/lib/none/index.js @@ -0,0 +1,10 @@ +'use strict'; +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +const { ReportBase } = require('istanbul-lib-report'); + +class NoneReport extends ReportBase {} + +module.exports = NoneReport; diff --git a/node_modules/istanbul-reports/lib/teamcity/index.js b/node_modules/istanbul-reports/lib/teamcity/index.js new file mode 100644 index 0000000..2bca26a --- /dev/null +++ b/node_modules/istanbul-reports/lib/teamcity/index.js @@ -0,0 +1,67 @@ +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +'use strict'; +const { ReportBase } = require('istanbul-lib-report'); + +class TeamcityReport extends ReportBase { + constructor(opts) { + super(); + + opts = opts || {}; + this.file = opts.file || null; + this.blockName = opts.blockName || 'Code Coverage Summary'; + } + + onStart(node, context) { + const metrics = node.getCoverageSummary(); + const cw = context.writer.writeFile(this.file); + + cw.println(''); + cw.println("##teamcity[blockOpened name='" + this.blockName + "']"); + + //Statements Covered + cw.println( + lineForKey(metrics.statements.covered, 'CodeCoverageAbsBCovered') + ); + cw.println( + lineForKey(metrics.statements.total, 'CodeCoverageAbsBTotal') + ); + + //Branches Covered + cw.println( + lineForKey(metrics.branches.covered, 'CodeCoverageAbsRCovered') + ); + cw.println(lineForKey(metrics.branches.total, 'CodeCoverageAbsRTotal')); + + //Functions Covered + cw.println( + lineForKey(metrics.functions.covered, 'CodeCoverageAbsMCovered') + ); + cw.println( + lineForKey(metrics.functions.total, 'CodeCoverageAbsMTotal') + ); + + //Lines Covered + cw.println( + lineForKey(metrics.lines.covered, 'CodeCoverageAbsLCovered') + ); + cw.println(lineForKey(metrics.lines.total, 'CodeCoverageAbsLTotal')); + + cw.println("##teamcity[blockClosed name='" + this.blockName + "']"); + cw.close(); + } +} + +function lineForKey(value, teamcityVar) { + return ( + "##teamcity[buildStatisticValue key='" + + teamcityVar + + "' value='" + + value + + "']" + ); +} + +module.exports = TeamcityReport; diff --git a/node_modules/istanbul-reports/lib/text-lcov/index.js b/node_modules/istanbul-reports/lib/text-lcov/index.js new file mode 100644 index 0000000..847aedf --- /dev/null +++ b/node_modules/istanbul-reports/lib/text-lcov/index.js @@ -0,0 +1,17 @@ +'use strict'; +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +const LcovOnly = require('../lcovonly'); + +class TextLcov extends LcovOnly { + constructor(opts) { + super({ + ...opts, + file: '-' + }); + } +} + +module.exports = TextLcov; diff --git a/node_modules/istanbul-reports/lib/text-summary/index.js b/node_modules/istanbul-reports/lib/text-summary/index.js new file mode 100644 index 0000000..a9e6eab --- /dev/null +++ b/node_modules/istanbul-reports/lib/text-summary/index.js @@ -0,0 +1,62 @@ +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +'use strict'; +const { ReportBase } = require('istanbul-lib-report'); + +class TextSummaryReport extends ReportBase { + constructor(opts) { + super(); + + opts = opts || {}; + this.file = opts.file || null; + } + + onStart(node, context) { + const summary = node.getCoverageSummary(); + const cw = context.writer.writeFile(this.file); + const printLine = function(key) { + const str = lineForKey(summary, key); + const clazz = context.classForPercent(key, summary[key].pct); + cw.println(cw.colorize(str, clazz)); + }; + + cw.println(''); + cw.println( + '=============================== Coverage summary ===============================' + ); + printLine('statements'); + printLine('branches'); + printLine('functions'); + printLine('lines'); + cw.println( + '================================================================================' + ); + cw.close(); + } +} + +function lineForKey(summary, key) { + const metrics = summary[key]; + + key = key.substring(0, 1).toUpperCase() + key.substring(1); + if (key.length < 12) { + key += ' '.substring(0, 12 - key.length); + } + const result = [ + key, + ':', + metrics.pct + '%', + '(', + metrics.covered + '/' + metrics.total, + ')' + ].join(' '); + const skipped = metrics.skipped; + if (skipped > 0) { + return result + ', ' + skipped + ' ignored'; + } + return result; +} + +module.exports = TextSummaryReport; diff --git a/node_modules/istanbul-reports/lib/text/index.js b/node_modules/istanbul-reports/lib/text/index.js new file mode 100644 index 0000000..c28cedb --- /dev/null +++ b/node_modules/istanbul-reports/lib/text/index.js @@ -0,0 +1,298 @@ +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE + file for terms. + */ +'use strict'; +const { ReportBase } = require('istanbul-lib-report'); + +const NAME_COL = 4; +const PCT_COLS = 7; +const MISSING_COL = 17; +const TAB_SIZE = 1; +const DELIM = ' | '; + +function padding(num, ch) { + let str = ''; + let i; + ch = ch || ' '; + for (i = 0; i < num; i += 1) { + str += ch; + } + return str; +} + +function fill(str, width, right, tabs) { + tabs = tabs || 0; + str = String(str); + + const leadingSpaces = tabs * TAB_SIZE; + const remaining = width - leadingSpaces; + const leader = padding(leadingSpaces); + let fmtStr = ''; + + if (remaining > 0) { + const strlen = str.length; + let fillStr; + + if (remaining >= strlen) { + fillStr = padding(remaining - strlen); + } else { + fillStr = '...'; + const length = remaining - fillStr.length; + + str = str.substring(strlen - length); + right = true; + } + fmtStr = right ? fillStr + str : str + fillStr; + } + + return leader + fmtStr; +} + +function formatName(name, maxCols, level) { + return fill(name, maxCols, false, level); +} + +function formatPct(pct, width) { + return fill(pct, width || PCT_COLS, true, 0); +} + +function nodeMissing(node) { + if (node.isSummary()) { + return ''; + } + + const metrics = node.getCoverageSummary(); + const isEmpty = metrics.isEmpty(); + const lines = isEmpty ? 0 : metrics.lines.pct; + + let coveredLines; + + const fileCoverage = node.getFileCoverage(); + if (lines === 100) { + const branches = fileCoverage.getBranchCoverageByLine(); + coveredLines = Object.entries(branches).map(([key, { coverage }]) => [ + key, + coverage === 100 + ]); + } else { + coveredLines = Object.entries(fileCoverage.getLineCoverage()); + } + + let newRange = true; + const ranges = coveredLines + .reduce((acum, [line, hit]) => { + if (hit) newRange = true; + else { + line = parseInt(line); + if (newRange) { + acum.push([line]); + newRange = false; + } else acum[acum.length - 1][1] = line; + } + + return acum; + }, []) + .map(range => { + const { length } = range; + + if (length === 1) return range[0]; + + return `${range[0]}-${range[1]}`; + }); + + return [].concat(...ranges).join(','); +} + +function nodeName(node) { + return node.getRelativeName() || 'All files'; +} + +function depthFor(node) { + let ret = 0; + node = node.getParent(); + while (node) { + ret += 1; + node = node.getParent(); + } + return ret; +} + +function nullDepthFor() { + return 0; +} + +function findWidth(node, context, nodeExtractor, depthFor = nullDepthFor) { + let last = 0; + function compareWidth(node) { + last = Math.max( + last, + TAB_SIZE * depthFor(node) + nodeExtractor(node).length + ); + } + const visitor = { + onSummary: compareWidth, + onDetail: compareWidth + }; + node.visit(context.getVisitor(visitor)); + return last; +} + +function makeLine(nameWidth, missingWidth) { + const name = padding(nameWidth, '-'); + const pct = padding(PCT_COLS, '-'); + const elements = []; + + elements.push(name); + elements.push(pct); + elements.push(padding(PCT_COLS + 1, '-')); + elements.push(pct); + elements.push(pct); + elements.push(padding(missingWidth, '-')); + return elements.join(DELIM.replace(/ /g, '-')) + '-'; +} + +function tableHeader(maxNameCols, missingWidth) { + const elements = []; + elements.push(formatName('File', maxNameCols, 0)); + elements.push(formatPct('% Stmts')); + elements.push(formatPct('% Branch', PCT_COLS + 1)); + elements.push(formatPct('% Funcs')); + elements.push(formatPct('% Lines')); + elements.push(formatName('Uncovered Line #s', missingWidth)); + return elements.join(DELIM) + ' '; +} + +function isFull(metrics) { + return ( + metrics.statements.pct === 100 && + metrics.branches.pct === 100 && + metrics.functions.pct === 100 && + metrics.lines.pct === 100 + ); +} + +function tableRow( + node, + context, + colorizer, + maxNameCols, + level, + skipEmpty, + skipFull, + missingWidth +) { + const name = nodeName(node); + const metrics = node.getCoverageSummary(); + const isEmpty = metrics.isEmpty(); + if (skipEmpty && isEmpty) { + return ''; + } + if (skipFull && isFull(metrics)) { + return ''; + } + + const mm = { + statements: isEmpty ? 0 : metrics.statements.pct, + branches: isEmpty ? 0 : metrics.branches.pct, + functions: isEmpty ? 0 : metrics.functions.pct, + lines: isEmpty ? 0 : metrics.lines.pct + }; + const colorize = isEmpty + ? function(str) { + return str; + } + : function(str, key) { + return colorizer(str, context.classForPercent(key, mm[key])); + }; + const elements = []; + + elements.push(colorize(formatName(name, maxNameCols, level), 'statements')); + elements.push(colorize(formatPct(mm.statements), 'statements')); + elements.push(colorize(formatPct(mm.branches, PCT_COLS + 1), 'branches')); + elements.push(colorize(formatPct(mm.functions), 'functions')); + elements.push(colorize(formatPct(mm.lines), 'lines')); + elements.push( + colorizer( + formatName(nodeMissing(node), missingWidth), + mm.lines === 100 ? 'medium' : 'low' + ) + ); + + return elements.join(DELIM) + ' '; +} + +class TextReport extends ReportBase { + constructor(opts) { + super(opts); + + opts = opts || {}; + const { maxCols } = opts; + + this.file = opts.file || null; + this.maxCols = maxCols != null ? maxCols : process.stdout.columns || 80; + this.cw = null; + this.skipEmpty = opts.skipEmpty; + this.skipFull = opts.skipFull; + } + + onStart(root, context) { + this.cw = context.writer.writeFile(this.file); + this.nameWidth = Math.max( + NAME_COL, + findWidth(root, context, nodeName, depthFor) + ); + this.missingWidth = Math.max( + MISSING_COL, + findWidth(root, context, nodeMissing) + ); + + if (this.maxCols > 0) { + const pct_cols = DELIM.length + 4 * (PCT_COLS + DELIM.length) + 2; + + const maxRemaining = this.maxCols - (pct_cols + MISSING_COL); + if (this.nameWidth > maxRemaining) { + this.nameWidth = maxRemaining; + this.missingWidth = MISSING_COL; + } else if (this.nameWidth < maxRemaining) { + const maxRemaining = this.maxCols - (this.nameWidth + pct_cols); + if (this.missingWidth > maxRemaining) { + this.missingWidth = maxRemaining; + } + } + } + const line = makeLine(this.nameWidth, this.missingWidth); + this.cw.println(line); + this.cw.println(tableHeader(this.nameWidth, this.missingWidth)); + this.cw.println(line); + } + + onSummary(node, context) { + const nodeDepth = depthFor(node); + const row = tableRow( + node, + context, + this.cw.colorize.bind(this.cw), + this.nameWidth, + nodeDepth, + this.skipEmpty, + this.skipFull, + this.missingWidth + ); + if (row) { + this.cw.println(row); + } + } + + onDetail(node, context) { + return this.onSummary(node, context); + } + + onEnd() { + this.cw.println(makeLine(this.nameWidth, this.missingWidth)); + this.cw.close(); + } +} + +module.exports = TextReport; diff --git a/node_modules/istanbul-reports/package.json b/node_modules/istanbul-reports/package.json new file mode 100644 index 0000000..1fdf9c5 --- /dev/null +++ b/node_modules/istanbul-reports/package.json @@ -0,0 +1,60 @@ +{ + "name": "istanbul-reports", + "version": "3.1.4", + "description": "istanbul reports", + "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>", + "main": "index.js", + "files": [ + "index.js", + "lib" + ], + "scripts": { + "test": "nyc mocha --recursive", + "prepare": "webpack --config lib/html-spa/webpack.config.js --mode production", + "prepare:watch": "webpack --config lib/html-spa/webpack.config.js --watch --mode development" + }, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "devDependencies": { + "@babel/core": "^7.7.5", + "@babel/preset-env": "^7.7.5", + "@babel/preset-react": "^7.7.4", + "babel-loader": "^8.0.6", + "chai": "^4.2.0", + "is-windows": "^1.0.2", + "istanbul-lib-coverage": "^3.0.0", + "mocha": "^6.2.2", + "nyc": "^15.0.0-beta.2", + "react": "^16.12.0", + "react-dom": "^16.12.0", + "webpack": "^4.41.2", + "webpack-cli": "^3.3.10" + }, + "license": "BSD-3-Clause", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/istanbuljs/istanbuljs.git", + "directory": "packages/istanbul-reports" + }, + "keywords": [ + "istanbul", + "reports" + ], + "bugs": { + "url": "https://github.com/istanbuljs/istanbuljs/issues" + }, + "homepage": "https://istanbul.js.org/", + "nyc": { + "exclude": [ + "lib/html/assets/**", + "lib/html-spa/assets/**", + "lib/html-spa/rollup.config.js", + "test/**" + ] + }, + "engines": { + "node": ">=8" + } +} |