diff --git a/.gitignore b/.gitignore index a547bf3..5815b67 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* - +coverage node_modules dist dist-ssr diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100644 index 0000000..57e971a --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1 @@ +npm run coverage \ No newline at end of file diff --git a/coverage/App.tsx.html b/coverage/App.tsx.html new file mode 100644 index 0000000..8cf4d9a --- /dev/null +++ b/coverage/App.tsx.html @@ -0,0 +1,460 @@ + + + + + + Code coverage report for App.tsx + + + + + + + + + +
+
+

All files App.tsx

+
+ +
+ 95.29% + Statements + 81/85 +
+ + +
+ 95.83% + Branches + 23/24 +
+ + +
+ 88.88% + Functions + 8/9 +
+ + +
+ 95.29% + Lines + 81/85 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +1261x +1x +1x +1x +1x +1x +1x +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +13x +  +13x +14x +14x +14x +14x +14x +14x +14x +14x +14x +  +13x +  +  +  +13x +2x +2x +  +13x +16x +16x +16x +16x +4x +12x +1x +1x +1x +  +  +1x +1x +16x +  +13x +3x +3x +3x +  +13x +13x +13x +13x +13x +13x +  +13x +37x +37x +  +13x +74x +  +74x +4x +4x +  +70x +70x +70x +70x +1x +69x +74x +74x +74x +74x +74x +45x +  +25x +25x +4x +  +21x +21x +11x +21x +21x +  +25x +  +74x +74x +  +74x +13x +  +1x + 
import React from "react";
+import "./App.css";
+import ErrorButton from "./ErrorButton";
+import Button from "./Button";
+import Input from "./Input";
+import PlanetCard from "./PlanetCard";
+import Spinner from "./Spinner";
+import { PlanetApi } from "./PlanetFetch";
+interface PlanetProperties {
+  name?: string;
+  diameter: string;
+  rotation_period: string;
+  orbital_period: string;
+  population: string;
+  climate: string;
+  terrain: string;
+}
+ 
+interface Planet {
+  uid?: string;
+  name?: string;
+  properties: PlanetProperties;
+}
+ 
+interface AppState {
+  inputValue: string;
+  searchResults: Planet[];
+  isLoading: boolean;
+  error: string | null;
+  throwBoolean: boolean;
+}
+ 
+class App extends React.Component<object, AppState> {
+  localStorageKey: string = "starWarsQuery";
+ 
+  constructor(props: object) {
+    super(props);
+    this.state = {
+      inputValue: localStorage.getItem(this.localStorageKey) || "",
+      searchResults: [],
+      isLoading: false,
+      error: null,
+      throwBoolean: false,
+    };
+  }
+ 
+  resetErrorState = () => {
+    this.setState({ throwBoolean: false });
+  };
+ 
+  triggerError = () => {
+    this.setState({ throwBoolean: true });
+  };
+ 
+  fetchPlanets = async (searchQuery: string = "") => {
+    let errorMessage = "Unknown error";
+    this.setState({ isLoading: true, error: null });
+    try {
+      const planets = await PlanetApi.fetchPlanets(searchQuery);
+      this.setState({ searchResults: planets, isLoading: false });
+    } catch (error) {
+      if (error instanceof Error) {
+        errorMessage = error.message;
+      } else if (typeof error === "string") {
+        errorMessage = error;
+      }
+      this.setState({ error: errorMessage, isLoading: false });
+    }
+  };
+ 
+  handleSearch = () => {
+    localStorage.setItem(this.localStorageKey, this.state.inputValue.trim());
+    this.fetchPlanets(this.state.inputValue);
+  };
+ 
+  componentDidMount() {
+    this.setState({
+      inputValue: localStorage.getItem(this.localStorageKey) || "",
+    });
+    this.fetchPlanets(this.state.inputValue);
+  }
+ 
+  handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
+    this.setState({ inputValue: e.target.value });
+  };
+ 
+  render() {
+    const { inputValue, searchResults, isLoading, throwBoolean } = this.state;
+ 
+    if (throwBoolean) {
+      throw new Error("Test error");
+    }
+ 
+    return (
+      <div className="app-container" data-testid="app">
+        <h1 className="title">Star Wars Planets</h1>
+        {this.state.error ? (
+          <div data-testid="error-message">{this.state.error}</div>
+        ) : null}
+        <div className="search-container">
+          <Input value={inputValue} onChange={this.handleInputChange} />
+          <Button onClick={this.handleSearch}>{"Search"}</Button>
+        </div>
+        {isLoading ? (
+          <Spinner />
+        ) : (
+          <div className="results-container">
+            {inputValue.trim() !== "" && searchResults.length === 0 ? (
+              <div className="nothing">Nothing</div>
+            ) : (
+              <div className="results-grid">
+                {searchResults.map((planet: Planet) => (
+                  <PlanetCard key={planet.uid} planet={planet} />
+                ))}
+              </div>
+            )}
+          </div>
+        )}
+        <ErrorButton onClick={this.triggerError} />
+      </div>
+    );
+  }
+}
+ 
+export default App;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/coverage/Button.tsx.html b/coverage/Button.tsx.html new file mode 100644 index 0000000..8093bb6 --- /dev/null +++ b/coverage/Button.tsx.html @@ -0,0 +1,127 @@ + + + + + + Code coverage report for Button.tsx + + + + + + + + + +
+
+

All files Button.tsx

+
+ +
+ 100% + Statements + 7/7 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 7/7 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +151x +  +  +  +  +  +  +1x +1x +70x +70x +1x +  +1x + 
import React from "react";
+ 
+interface ButtonProps {
+  onClick: () => void;
+  children: React.ReactNode;
+}
+ 
+class Button extends React.Component<ButtonProps> {
+  render() {
+    return <button onClick={this.props.onClick}>{this.props.children}</button>;
+  }
+}
+ 
+export default Button;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/coverage/ErrorBoundary.tsx.html b/coverage/ErrorBoundary.tsx.html new file mode 100644 index 0000000..e804134 --- /dev/null +++ b/coverage/ErrorBoundary.tsx.html @@ -0,0 +1,232 @@ + + + + + + Code coverage report for ErrorBoundary.tsx + + + + + + + + + +
+
+

All files ErrorBoundary.tsx

+
+ +
+ 100% + Statements + 31/31 +
+ + +
+ 100% + Branches + 8/8 +
+ + +
+ 100% + Functions + 6/6 +
+ + +
+ 100% + Lines + 31/31 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +501x +  +  +  +  +  +  +  +  +  +  +1x +2x +3x +3x +3x +3x +3x +3x +  +2x +4x +4x +  +2x +2x +2x +  +2x +1x +1x +  +2x +9x +6x +6x +6x +6x +  +6x +6x +  +6x +  +3x +9x +2x +  +1x + 
import React from "react";
+ 
+interface Props {
+  children: React.ReactNode;
+}
+ 
+interface State {
+  hasError: boolean;
+  error: Error | null;
+}
+ 
+class ErrorBoundary extends React.Component<Props, State> {
+  constructor(props: Props) {
+    super(props);
+    this.state = {
+      hasError: false,
+      error: null,
+    };
+  }
+ 
+  static getDerivedStateFromError(error: Error): State {
+    return { hasError: true, error: error };
+  }
+ 
+  componentDidCatch(error: Error) {
+    this.setState({ error });
+  }
+ 
+  resetError = () => {
+    this.setState({ hasError: false, error: null });
+  };
+ 
+  render() {
+    if (this.state.hasError) {
+      return (
+        <div className="error-boundary">
+          <p className="error-message">{this.state.error?.toString()}</p>
+          <button className="error-test-button" onClick={this.resetError}>
+            Reboot
+          </button>
+        </div>
+      );
+    }
+ 
+    return this.props.children;
+  }
+}
+ 
+export default ErrorBoundary;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/coverage/ErrorButton.tsx.html b/coverage/ErrorButton.tsx.html new file mode 100644 index 0000000..39f7534 --- /dev/null +++ b/coverage/ErrorButton.tsx.html @@ -0,0 +1,136 @@ + + + + + + Code coverage report for ErrorButton.tsx + + + + + + + + + +
+
+

All files ErrorButton.tsx

+
+ +
+ 100% + Statements + 10/10 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +181x +  +  +  +  +  +1x +1x +70x +70x +70x +  +70x +  +70x +1x +1x + 
import React from "react";
+ 
+interface ErrorButtonProps {
+  onClick: () => void;
+}
+ 
+class ErrorButton extends React.Component<ErrorButtonProps> {
+  render() {
+    const { onClick } = this.props;
+    return (
+      <button onClick={onClick} className="error-test-button">
+        Test Error
+      </button>
+    );
+  }
+}
+export default ErrorButton;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/coverage/Input.tsx.html b/coverage/Input.tsx.html new file mode 100644 index 0000000..dae4f6c --- /dev/null +++ b/coverage/Input.tsx.html @@ -0,0 +1,142 @@ + + + + + + Code coverage report for Input.tsx + + + + + + + + + +
+
+

All files Input.tsx

+
+ +
+ 100% + Statements + 12/12 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 12/12 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +201x +  +  +  +  +  +1x +1x +70x +70x +70x +70x +70x +70x +  +70x +1x +  +1x + 
import React from "react";
+ 
+interface InputProps {
+  value: string;
+  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
+}
+class Input extends React.Component<InputProps> {
+  render() {
+    return (
+      <input
+        type="text"
+        value={this.props.value}
+        onChange={this.props.onChange}
+      />
+    );
+  }
+}
+ 
+export default Input;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/coverage/PlanetCard.tsx.html b/coverage/PlanetCard.tsx.html new file mode 100644 index 0000000..755bd21 --- /dev/null +++ b/coverage/PlanetCard.tsx.html @@ -0,0 +1,265 @@ + + + + + + Code coverage report for PlanetCard.tsx + + + + + + + + + +
+
+

All files PlanetCard.tsx

+
+ +
+ 100% + Statements + 41/41 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 41/41 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +611x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +1x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +11x +  +11x +1x +  +1x + 
import React from "react";
+ 
+interface Planet {
+  uid?: string;
+  name?: string;
+  properties: PlanetProperties;
+}
+ 
+interface PlanetProperties {
+  name?: string;
+  diameter: string;
+  rotation_period: string;
+  orbital_period: string;
+  population: string;
+  climate: string;
+  terrain: string;
+}
+ 
+class PlanetCard extends React.Component<{ planet: Planet }> {
+  render() {
+    const { planet } = this.props;
+    return (
+      <div className="planet-card" role="article">
+        <div className="planet-details">
+          <h3 className="planet-name">{planet.name}</h3>
+          <div className="detail-row">
+            <span className="detail-label">Diameter:</span>
+            <span className="prop_planet">{planet.properties.diameter}</span>
+          </div>
+          <div className="detail-row">
+            <span className="detail-label">Climate:</span>
+            <span className="prop_planet">{planet.properties.climate}</span>
+          </div>
+          <div className="detail-row">
+            <span className="detail-label">Terrain:</span>
+            <span className="prop_planet">{planet.properties.terrain}</span>
+          </div>
+          <div className="detail-row">
+            <span className="detail-label">Population:</span>
+            <span className="prop_planet">{planet.properties.population}</span>
+          </div>
+          <div className="detail-row">
+            <span className="detail-label">Rotation Period:</span>
+            <span className="prop_planet">
+              {planet.properties.rotation_period}
+            </span>
+          </div>
+          <div className="detail-row">
+            <span className="detail-label">Orbital Period:</span>
+            <span className="prop_planet">
+              {planet.properties.orbital_period}
+            </span>
+          </div>
+        </div>
+      </div>
+    );
+  }
+}
+ 
+export default PlanetCard;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/coverage/Spinner.tsx.html b/coverage/Spinner.tsx.html new file mode 100644 index 0000000..450a9f4 --- /dev/null +++ b/coverage/Spinner.tsx.html @@ -0,0 +1,124 @@ + + + + + + Code coverage report for Spinner.tsx + + + + + + + + + +
+
+

All files Spinner.tsx

+
+ +
+ 100% + Statements + 10/10 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 10/10 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +141x +  +1x +1x +45x +45x +45x +45x +  +45x +1x +  +1x + 
import React from "react";
+ 
+class Spinner extends React.Component {
+  render() {
+    return (
+      <div className="spinner-container">
+        <div className="spinner"></div>
+      </div>
+    );
+  }
+}
+ 
+export default Spinner;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/coverage/base.css b/coverage/base.css new file mode 100644 index 0000000..f418035 --- /dev/null +++ b/coverage/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/coverage/block-navigation.js b/coverage/block-navigation.js new file mode 100644 index 0000000..cc12130 --- /dev/null +++ b/coverage/block-navigation.js @@ -0,0 +1,87 @@ +/* eslint-disable */ +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/coverage/clover.xml b/coverage/clover.xml new file mode 100644 index 0000000..186d5cc --- /dev/null +++ b/coverage/clover.xml @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json new file mode 100644 index 0000000..193d87a --- /dev/null +++ b/coverage/coverage-final.json @@ -0,0 +1,10 @@ +{"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\App.tsx": {"path":"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\App.tsx","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":19}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":40}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":30}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":28}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":38}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":32}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":42}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":53}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":44}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":30}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":17}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":18}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":67}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":24}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":23}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":18}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":26}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":6}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":3}},"46":{"start":{"line":47,"column":0},"end":{"line":47,"column":27}},"47":{"start":{"line":48,"column":0},"end":{"line":48,"column":43}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":4}},"50":{"start":{"line":51,"column":0},"end":{"line":51,"column":24}},"51":{"start":{"line":52,"column":0},"end":{"line":52,"column":42}},"52":{"start":{"line":53,"column":0},"end":{"line":53,"column":4}},"54":{"start":{"line":55,"column":0},"end":{"line":55,"column":54}},"55":{"start":{"line":56,"column":0},"end":{"line":56,"column":39}},"56":{"start":{"line":57,"column":0},"end":{"line":57,"column":52}},"57":{"start":{"line":58,"column":0},"end":{"line":58,"column":9}},"58":{"start":{"line":59,"column":0},"end":{"line":59,"column":64}},"59":{"start":{"line":60,"column":0},"end":{"line":60,"column":66}},"60":{"start":{"line":61,"column":0},"end":{"line":61,"column":21}},"61":{"start":{"line":62,"column":0},"end":{"line":62,"column":35}},"62":{"start":{"line":63,"column":0},"end":{"line":63,"column":37}},"63":{"start":{"line":64,"column":0},"end":{"line":64,"column":45}},"64":{"start":{"line":65,"column":0},"end":{"line":65,"column":29}},"65":{"start":{"line":66,"column":0},"end":{"line":66,"column":7}},"66":{"start":{"line":67,"column":0},"end":{"line":67,"column":63}},"67":{"start":{"line":68,"column":0},"end":{"line":68,"column":5}},"68":{"start":{"line":69,"column":0},"end":{"line":69,"column":4}},"70":{"start":{"line":71,"column":0},"end":{"line":71,"column":24}},"71":{"start":{"line":72,"column":0},"end":{"line":72,"column":77}},"72":{"start":{"line":73,"column":0},"end":{"line":73,"column":45}},"73":{"start":{"line":74,"column":0},"end":{"line":74,"column":4}},"75":{"start":{"line":76,"column":0},"end":{"line":76,"column":23}},"76":{"start":{"line":77,"column":0},"end":{"line":77,"column":19}},"77":{"start":{"line":78,"column":0},"end":{"line":78,"column":67}},"78":{"start":{"line":79,"column":0},"end":{"line":79,"column":7}},"79":{"start":{"line":80,"column":0},"end":{"line":80,"column":45}},"80":{"start":{"line":81,"column":0},"end":{"line":81,"column":3}},"82":{"start":{"line":83,"column":0},"end":{"line":83,"column":67}},"83":{"start":{"line":84,"column":0},"end":{"line":84,"column":50}},"84":{"start":{"line":85,"column":0},"end":{"line":85,"column":4}},"86":{"start":{"line":87,"column":0},"end":{"line":87,"column":12}},"87":{"start":{"line":88,"column":0},"end":{"line":88,"column":78}},"89":{"start":{"line":90,"column":0},"end":{"line":90,"column":23}},"90":{"start":{"line":91,"column":0},"end":{"line":91,"column":36}},"91":{"start":{"line":92,"column":0},"end":{"line":92,"column":5}},"93":{"start":{"line":94,"column":0},"end":{"line":94,"column":12}},"94":{"start":{"line":95,"column":0},"end":{"line":95,"column":55}},"95":{"start":{"line":96,"column":0},"end":{"line":96,"column":52}},"96":{"start":{"line":97,"column":0},"end":{"line":97,"column":29}},"97":{"start":{"line":98,"column":0},"end":{"line":98,"column":67}},"98":{"start":{"line":99,"column":0},"end":{"line":99,"column":17}},"99":{"start":{"line":100,"column":0},"end":{"line":100,"column":42}},"100":{"start":{"line":101,"column":0},"end":{"line":101,"column":72}},"101":{"start":{"line":102,"column":0},"end":{"line":102,"column":65}},"102":{"start":{"line":103,"column":0},"end":{"line":103,"column":14}},"103":{"start":{"line":104,"column":0},"end":{"line":104,"column":22}},"104":{"start":{"line":105,"column":0},"end":{"line":105,"column":21}},"106":{"start":{"line":107,"column":0},"end":{"line":107,"column":45}},"107":{"start":{"line":108,"column":0},"end":{"line":108,"column":71}},"108":{"start":{"line":109,"column":0},"end":{"line":109,"column":52}},"110":{"start":{"line":111,"column":0},"end":{"line":111,"column":44}},"111":{"start":{"line":112,"column":0},"end":{"line":112,"column":56}},"112":{"start":{"line":113,"column":0},"end":{"line":113,"column":65}},"113":{"start":{"line":114,"column":0},"end":{"line":114,"column":19}},"114":{"start":{"line":115,"column":0},"end":{"line":115,"column":20}},"116":{"start":{"line":117,"column":0},"end":{"line":117,"column":16}},"118":{"start":{"line":119,"column":0},"end":{"line":119,"column":51}},"119":{"start":{"line":120,"column":0},"end":{"line":120,"column":12}},"121":{"start":{"line":122,"column":0},"end":{"line":122,"column":3}},"122":{"start":{"line":123,"column":0},"end":{"line":123,"column":1}},"124":{"start":{"line":125,"column":0},"end":{"line":125,"column":19}}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"32":1,"33":13,"35":13,"36":14,"37":14,"38":14,"39":14,"40":14,"41":14,"42":14,"43":14,"44":14,"46":13,"47":0,"48":0,"50":13,"51":2,"52":2,"54":13,"55":16,"56":16,"57":16,"58":16,"59":4,"60":12,"61":1,"62":1,"63":1,"64":0,"65":0,"66":1,"67":1,"68":16,"70":13,"71":3,"72":3,"73":3,"75":13,"76":13,"77":13,"78":13,"79":13,"80":13,"82":13,"83":37,"84":37,"86":13,"87":74,"89":74,"90":4,"91":4,"93":70,"94":70,"95":70,"96":70,"97":1,"98":69,"99":74,"100":74,"101":74,"102":74,"103":74,"104":45,"106":25,"107":25,"108":4,"110":21,"111":21,"112":11,"113":21,"114":21,"116":25,"118":74,"119":74,"121":74,"122":13,"124":1},"branchMap":{"0":{"type":"branch","line":33,"loc":{"start":{"line":33,"column":52},"end":{"line":123,"column":1}},"locations":[{"start":{"line":33,"column":52},"end":{"line":123,"column":1}}]},"1":{"type":"branch","line":36,"loc":{"start":{"line":36,"column":2},"end":{"line":45,"column":3}},"locations":[{"start":{"line":36,"column":2},"end":{"line":45,"column":3}}]},"2":{"type":"branch","line":39,"loc":{"start":{"line":39,"column":59},"end":{"line":39,"column":67}},"locations":[{"start":{"line":39,"column":59},"end":{"line":39,"column":67}}]},"3":{"type":"branch","line":51,"loc":{"start":{"line":51,"column":17},"end":{"line":53,"column":4}},"locations":[{"start":{"line":51,"column":17},"end":{"line":53,"column":4}}]},"4":{"type":"branch","line":55,"loc":{"start":{"line":55,"column":17},"end":{"line":69,"column":4}},"locations":[{"start":{"line":55,"column":17},"end":{"line":69,"column":4}}]},"5":{"type":"branch","line":59,"loc":{"start":{"line":59,"column":62},"end":{"line":68,"column":5}},"locations":[{"start":{"line":59,"column":62},"end":{"line":68,"column":5}}]},"6":{"type":"branch","line":59,"loc":{"start":{"line":59,"column":62},"end":{"line":61,"column":13}},"locations":[{"start":{"line":59,"column":62},"end":{"line":61,"column":13}}]},"7":{"type":"branch","line":61,"loc":{"start":{"line":61,"column":4},"end":{"line":68,"column":5}},"locations":[{"start":{"line":61,"column":4},"end":{"line":68,"column":5}}]},"8":{"type":"branch","line":64,"loc":{"start":{"line":64,"column":6},"end":{"line":66,"column":7}},"locations":[{"start":{"line":64,"column":6},"end":{"line":66,"column":7}}]},"9":{"type":"branch","line":71,"loc":{"start":{"line":71,"column":17},"end":{"line":74,"column":4}},"locations":[{"start":{"line":71,"column":17},"end":{"line":74,"column":4}}]},"10":{"type":"branch","line":76,"loc":{"start":{"line":76,"column":2},"end":{"line":81,"column":3}},"locations":[{"start":{"line":76,"column":2},"end":{"line":81,"column":3}}]},"11":{"type":"branch","line":78,"loc":{"start":{"line":78,"column":59},"end":{"line":78,"column":67}},"locations":[{"start":{"line":78,"column":59},"end":{"line":78,"column":67}}]},"12":{"type":"branch","line":83,"loc":{"start":{"line":83,"column":22},"end":{"line":85,"column":4}},"locations":[{"start":{"line":83,"column":22},"end":{"line":85,"column":4}}]},"13":{"type":"branch","line":87,"loc":{"start":{"line":87,"column":2},"end":{"line":122,"column":3}},"locations":[{"start":{"line":87,"column":2},"end":{"line":122,"column":3}}]},"14":{"type":"branch","line":90,"loc":{"start":{"line":90,"column":22},"end":{"line":92,"column":5}},"locations":[{"start":{"line":90,"column":22},"end":{"line":92,"column":5}}]},"15":{"type":"branch","line":92,"loc":{"start":{"line":92,"column":4},"end":{"line":97,"column":29}},"locations":[{"start":{"line":92,"column":4},"end":{"line":97,"column":29}}]},"16":{"type":"branch","line":97,"loc":{"start":{"line":97,"column":20},"end":{"line":98,"column":67}},"locations":[{"start":{"line":97,"column":20},"end":{"line":98,"column":67}}]},"17":{"type":"branch","line":98,"loc":{"start":{"line":98,"column":61},"end":{"line":99,"column":17}},"locations":[{"start":{"line":98,"column":61},"end":{"line":99,"column":17}}]},"18":{"type":"branch","line":104,"loc":{"start":{"line":104,"column":9},"end":{"line":105,"column":21}},"locations":[{"start":{"line":104,"column":9},"end":{"line":105,"column":21}}]},"19":{"type":"branch","line":105,"loc":{"start":{"line":105,"column":19},"end":{"line":117,"column":16}},"locations":[{"start":{"line":105,"column":19},"end":{"line":117,"column":16}}]},"20":{"type":"branch","line":108,"loc":{"start":{"line":108,"column":35},"end":{"line":108,"column":71}},"locations":[{"start":{"line":108,"column":35},"end":{"line":108,"column":71}}]},"21":{"type":"branch","line":108,"loc":{"start":{"line":108,"column":66},"end":{"line":109,"column":52}},"locations":[{"start":{"line":108,"column":66},"end":{"line":109,"column":52}}]},"22":{"type":"branch","line":109,"loc":{"start":{"line":109,"column":46},"end":{"line":115,"column":20}},"locations":[{"start":{"line":109,"column":46},"end":{"line":115,"column":20}}]},"23":{"type":"branch","line":112,"loc":{"start":{"line":112,"column":35},"end":{"line":113,"column":65}},"locations":[{"start":{"line":112,"column":35},"end":{"line":113,"column":65}}]}},"b":{"0":[13],"1":[14],"2":[10],"3":[2],"4":[16],"5":[12],"6":[4],"7":[1],"8":[0],"9":[3],"10":[13],"11":[10],"12":[37],"13":[74],"14":[4],"15":[70],"16":[1],"17":[69],"18":[45],"19":[25],"20":[14],"21":[4],"22":[21],"23":[11]},"fnMap":{"0":{"name":"","decl":{"start":{"line":33,"column":52},"end":{"line":123,"column":1}},"loc":{"start":{"line":33,"column":52},"end":{"line":123,"column":1}},"line":33},"1":{"name":"App","decl":{"start":{"line":36,"column":2},"end":{"line":45,"column":3}},"loc":{"start":{"line":36,"column":2},"end":{"line":45,"column":3}},"line":36},"2":{"name":"resetErrorState","decl":{"start":{"line":47,"column":20},"end":{"line":49,"column":4}},"loc":{"start":{"line":47,"column":20},"end":{"line":49,"column":4}},"line":47},"3":{"name":"triggerError","decl":{"start":{"line":51,"column":17},"end":{"line":53,"column":4}},"loc":{"start":{"line":51,"column":17},"end":{"line":53,"column":4}},"line":51},"4":{"name":"fetchPlanets","decl":{"start":{"line":55,"column":17},"end":{"line":69,"column":4}},"loc":{"start":{"line":55,"column":17},"end":{"line":69,"column":4}},"line":55},"5":{"name":"handleSearch","decl":{"start":{"line":71,"column":17},"end":{"line":74,"column":4}},"loc":{"start":{"line":71,"column":17},"end":{"line":74,"column":4}},"line":71},"6":{"name":"componentDidMount","decl":{"start":{"line":76,"column":2},"end":{"line":81,"column":3}},"loc":{"start":{"line":76,"column":2},"end":{"line":81,"column":3}},"line":76},"7":{"name":"handleInputChange","decl":{"start":{"line":83,"column":22},"end":{"line":85,"column":4}},"loc":{"start":{"line":83,"column":22},"end":{"line":85,"column":4}},"line":83},"8":{"name":"render","decl":{"start":{"line":87,"column":2},"end":{"line":122,"column":3}},"loc":{"start":{"line":87,"column":2},"end":{"line":122,"column":3}},"line":87}},"f":{"0":13,"1":14,"2":0,"3":2,"4":16,"5":3,"6":13,"7":37,"8":74}} +,"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\Button.tsx": {"path":"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\Button.tsx","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":51}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":12}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":79}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":3}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":1}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":22}}},"s":{"0":1,"7":1,"8":1,"9":70,"10":70,"11":1,"13":1},"branchMap":{"0":{"type":"branch","line":9,"loc":{"start":{"line":9,"column":2},"end":{"line":11,"column":3}},"locations":[{"start":{"line":9,"column":2},"end":{"line":11,"column":3}}]}},"b":{"0":[70]},"fnMap":{"0":{"name":"render","decl":{"start":{"line":9,"column":2},"end":{"line":11,"column":3}},"loc":{"start":{"line":9,"column":2},"end":{"line":11,"column":3}},"line":9}},"f":{"0":70}} +,"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\ErrorBoundary.tsx": {"path":"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\ErrorBoundary.tsx","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":59}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":29}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":17}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":18}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":22}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":18}},"17":{"start":{"line":18,"column":0},"end":{"line":18,"column":6}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":3}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":56}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":44}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":3}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":35}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":29}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":3}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":22}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":52}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":4}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":12}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":30}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":14}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":40}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":73}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":74}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":19}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":14}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":5}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":31}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":3}},"46":{"start":{"line":47,"column":0},"end":{"line":47,"column":1}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":29}}},"s":{"0":1,"11":1,"12":2,"13":3,"14":3,"15":3,"16":3,"17":3,"18":3,"20":2,"21":4,"22":4,"24":2,"25":2,"26":2,"28":2,"29":1,"30":1,"32":2,"33":9,"34":6,"35":6,"36":6,"37":6,"39":6,"40":6,"42":6,"44":3,"45":9,"46":2,"48":1},"branchMap":{"0":{"type":"branch","line":12,"loc":{"start":{"line":12,"column":58},"end":{"line":47,"column":1}},"locations":[{"start":{"line":12,"column":58},"end":{"line":47,"column":1}}]},"1":{"type":"branch","line":13,"loc":{"start":{"line":13,"column":2},"end":{"line":19,"column":3}},"locations":[{"start":{"line":13,"column":2},"end":{"line":19,"column":3}}]},"2":{"type":"branch","line":21,"loc":{"start":{"line":21,"column":9},"end":{"line":23,"column":3}},"locations":[{"start":{"line":21,"column":9},"end":{"line":23,"column":3}}]},"3":{"type":"branch","line":25,"loc":{"start":{"line":25,"column":2},"end":{"line":27,"column":3}},"locations":[{"start":{"line":25,"column":2},"end":{"line":27,"column":3}}]},"4":{"type":"branch","line":29,"loc":{"start":{"line":29,"column":15},"end":{"line":31,"column":4}},"locations":[{"start":{"line":29,"column":15},"end":{"line":31,"column":4}}]},"5":{"type":"branch","line":33,"loc":{"start":{"line":33,"column":2},"end":{"line":46,"column":3}},"locations":[{"start":{"line":33,"column":2},"end":{"line":46,"column":3}}]},"6":{"type":"branch","line":34,"loc":{"start":{"line":34,"column":29},"end":{"line":43,"column":5}},"locations":[{"start":{"line":34,"column":29},"end":{"line":43,"column":5}}]},"7":{"type":"branch","line":43,"loc":{"start":{"line":43,"column":4},"end":{"line":45,"column":31}},"locations":[{"start":{"line":43,"column":4},"end":{"line":45,"column":31}}]}},"b":{"0":[2],"1":[3],"2":[4],"3":[2],"4":[1],"5":[9],"6":[6],"7":[3]},"fnMap":{"0":{"name":"","decl":{"start":{"line":12,"column":58},"end":{"line":47,"column":1}},"loc":{"start":{"line":12,"column":58},"end":{"line":47,"column":1}},"line":12},"1":{"name":"ErrorBoundary","decl":{"start":{"line":13,"column":2},"end":{"line":19,"column":3}},"loc":{"start":{"line":13,"column":2},"end":{"line":19,"column":3}},"line":13},"2":{"name":"getDerivedStateFromError","decl":{"start":{"line":21,"column":9},"end":{"line":23,"column":3}},"loc":{"start":{"line":21,"column":9},"end":{"line":23,"column":3}},"line":21},"3":{"name":"componentDidCatch","decl":{"start":{"line":25,"column":2},"end":{"line":27,"column":3}},"loc":{"start":{"line":25,"column":2},"end":{"line":27,"column":3}},"line":25},"4":{"name":"resetError","decl":{"start":{"line":29,"column":15},"end":{"line":31,"column":4}},"loc":{"start":{"line":29,"column":15},"end":{"line":31,"column":4}},"line":29},"5":{"name":"render","decl":{"start":{"line":33,"column":2},"end":{"line":46,"column":3}},"loc":{"start":{"line":33,"column":2},"end":{"line":46,"column":3}},"line":33}},"f":{"0":2,"1":3,"2":4,"3":2,"4":1,"5":9}} +,"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\ErrorButton.tsx": {"path":"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\ErrorButton.tsx","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":61}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":12}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":35}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":12}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":62}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":15}},"14":{"start":{"line":15,"column":0},"end":{"line":15,"column":3}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":1}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":27}}},"s":{"0":1,"6":1,"7":1,"8":70,"9":70,"10":70,"12":70,"14":70,"15":1,"16":1},"branchMap":{"0":{"type":"branch","line":8,"loc":{"start":{"line":8,"column":2},"end":{"line":15,"column":3}},"locations":[{"start":{"line":8,"column":2},"end":{"line":15,"column":3}}]}},"b":{"0":[70]},"fnMap":{"0":{"name":"render","decl":{"start":{"line":8,"column":2},"end":{"line":15,"column":3}},"loc":{"start":{"line":8,"column":2},"end":{"line":15,"column":3}},"line":8}},"f":{"0":70}} +,"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\Input.tsx": {"path":"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\Input.tsx","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":49}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":12}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":12}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":12}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":19}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":32}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":38}},"13":{"start":{"line":14,"column":0},"end":{"line":14,"column":8}},"15":{"start":{"line":16,"column":0},"end":{"line":16,"column":3}},"16":{"start":{"line":17,"column":0},"end":{"line":17,"column":1}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":21}}},"s":{"0":1,"6":1,"7":1,"8":70,"9":70,"10":70,"11":70,"12":70,"13":70,"15":70,"16":1,"18":1},"branchMap":{"0":{"type":"branch","line":8,"loc":{"start":{"line":8,"column":2},"end":{"line":16,"column":3}},"locations":[{"start":{"line":8,"column":2},"end":{"line":16,"column":3}}]}},"b":{"0":[70]},"fnMap":{"0":{"name":"render","decl":{"start":{"line":8,"column":2},"end":{"line":16,"column":3}},"loc":{"start":{"line":8,"column":2},"end":{"line":16,"column":3}},"line":8}},"f":{"0":70}} +,"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\PlanetCard.tsx": {"path":"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\PlanetCard.tsx","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},"18":{"start":{"line":19,"column":0},"end":{"line":19,"column":62}},"19":{"start":{"line":20,"column":0},"end":{"line":20,"column":12}},"20":{"start":{"line":21,"column":0},"end":{"line":21,"column":34}},"21":{"start":{"line":22,"column":0},"end":{"line":22,"column":12}},"22":{"start":{"line":23,"column":0},"end":{"line":23,"column":50}},"23":{"start":{"line":24,"column":0},"end":{"line":24,"column":40}},"24":{"start":{"line":25,"column":0},"end":{"line":25,"column":56}},"25":{"start":{"line":26,"column":0},"end":{"line":26,"column":38}},"26":{"start":{"line":27,"column":0},"end":{"line":27,"column":59}},"27":{"start":{"line":28,"column":0},"end":{"line":28,"column":77}},"28":{"start":{"line":29,"column":0},"end":{"line":29,"column":16}},"29":{"start":{"line":30,"column":0},"end":{"line":30,"column":38}},"30":{"start":{"line":31,"column":0},"end":{"line":31,"column":58}},"31":{"start":{"line":32,"column":0},"end":{"line":32,"column":76}},"32":{"start":{"line":33,"column":0},"end":{"line":33,"column":16}},"33":{"start":{"line":34,"column":0},"end":{"line":34,"column":38}},"34":{"start":{"line":35,"column":0},"end":{"line":35,"column":58}},"35":{"start":{"line":36,"column":0},"end":{"line":36,"column":76}},"36":{"start":{"line":37,"column":0},"end":{"line":37,"column":16}},"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":38}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":61}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":79}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":16}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":38}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":66}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":42}},"44":{"start":{"line":45,"column":0},"end":{"line":45,"column":49}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":19}},"46":{"start":{"line":47,"column":0},"end":{"line":47,"column":16}},"47":{"start":{"line":48,"column":0},"end":{"line":48,"column":38}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":65}},"49":{"start":{"line":50,"column":0},"end":{"line":50,"column":42}},"50":{"start":{"line":51,"column":0},"end":{"line":51,"column":48}},"51":{"start":{"line":52,"column":0},"end":{"line":52,"column":19}},"52":{"start":{"line":53,"column":0},"end":{"line":53,"column":16}},"53":{"start":{"line":54,"column":0},"end":{"line":54,"column":14}},"54":{"start":{"line":55,"column":0},"end":{"line":55,"column":12}},"56":{"start":{"line":57,"column":0},"end":{"line":57,"column":3}},"57":{"start":{"line":58,"column":0},"end":{"line":58,"column":1}},"59":{"start":{"line":60,"column":0},"end":{"line":60,"column":26}}},"s":{"0":1,"18":1,"19":1,"20":11,"21":11,"22":11,"23":11,"24":11,"25":11,"26":11,"27":11,"28":11,"29":11,"30":11,"31":11,"32":11,"33":11,"34":11,"35":11,"36":11,"37":11,"38":11,"39":11,"40":11,"41":11,"42":11,"43":11,"44":11,"45":11,"46":11,"47":11,"48":11,"49":11,"50":11,"51":11,"52":11,"53":11,"54":11,"56":11,"57":1,"59":1},"branchMap":{"0":{"type":"branch","line":20,"loc":{"start":{"line":20,"column":2},"end":{"line":57,"column":3}},"locations":[{"start":{"line":20,"column":2},"end":{"line":57,"column":3}}]}},"b":{"0":[11]},"fnMap":{"0":{"name":"render","decl":{"start":{"line":20,"column":2},"end":{"line":57,"column":3}},"loc":{"start":{"line":20,"column":2},"end":{"line":57,"column":3}},"line":20}},"f":{"0":11}} +,"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\PlanetFetch.ts": {"path":"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\PlanetFetch.ts","all":false,"statementMap":{"37":{"start":{"line":38,"column":0},"end":{"line":38,"column":74}},"38":{"start":{"line":39,"column":0},"end":{"line":39,"column":44}},"39":{"start":{"line":40,"column":0},"end":{"line":40,"column":21}},"40":{"start":{"line":41,"column":0},"end":{"line":41,"column":40}},"41":{"start":{"line":42,"column":0},"end":{"line":42,"column":3}},"42":{"start":{"line":43,"column":0},"end":{"line":43,"column":25}},"43":{"start":{"line":44,"column":0},"end":{"line":44,"column":1}},"45":{"start":{"line":46,"column":0},"end":{"line":46,"column":30}},"48":{"start":{"line":49,"column":0},"end":{"line":49,"column":15}},"49":{"start":{"line":50,"column":0},"end":{"line":50,"column":10}},"50":{"start":{"line":51,"column":0},"end":{"line":51,"column":18}},"51":{"start":{"line":52,"column":0},"end":{"line":52,"column":31}},"52":{"start":{"line":53,"column":0},"end":{"line":53,"column":17}},"53":{"start":{"line":54,"column":0},"end":{"line":54,"column":33}},"54":{"start":{"line":55,"column":0},"end":{"line":55,"column":41}},"55":{"start":{"line":56,"column":0},"end":{"line":56,"column":55}},"56":{"start":{"line":57,"column":0},"end":{"line":57,"column":53}},"57":{"start":{"line":58,"column":0},"end":{"line":58,"column":45}},"58":{"start":{"line":59,"column":0},"end":{"line":59,"column":39}},"59":{"start":{"line":60,"column":0},"end":{"line":60,"column":39}},"60":{"start":{"line":61,"column":0},"end":{"line":61,"column":6}},"61":{"start":{"line":62,"column":0},"end":{"line":62,"column":4}},"62":{"start":{"line":63,"column":0},"end":{"line":63,"column":2}},"64":{"start":{"line":65,"column":0},"end":{"line":65,"column":26}},"65":{"start":{"line":66,"column":0},"end":{"line":66,"column":48}},"66":{"start":{"line":67,"column":0},"end":{"line":67,"column":60}},"67":{"start":{"line":68,"column":0},"end":{"line":68,"column":20}},"68":{"start":{"line":69,"column":0},"end":{"line":69,"column":31}},"69":{"start":{"line":70,"column":0},"end":{"line":70,"column":22}},"70":{"start":{"line":71,"column":0},"end":{"line":71,"column":71}},"71":{"start":{"line":72,"column":0},"end":{"line":72,"column":73}},"72":{"start":{"line":73,"column":0},"end":{"line":73,"column":71}},"73":{"start":{"line":74,"column":0},"end":{"line":74,"column":12}},"74":{"start":{"line":75,"column":0},"end":{"line":75,"column":68}},"75":{"start":{"line":76,"column":0},"end":{"line":76,"column":47}},"76":{"start":{"line":77,"column":0},"end":{"line":77,"column":38}},"77":{"start":{"line":78,"column":0},"end":{"line":78,"column":53}},"78":{"start":{"line":79,"column":0},"end":{"line":79,"column":10}},"79":{"start":{"line":80,"column":0},"end":{"line":80,"column":8}},"80":{"start":{"line":81,"column":0},"end":{"line":81,"column":77}},"81":{"start":{"line":82,"column":0},"end":{"line":82,"column":5}},"82":{"start":{"line":83,"column":0},"end":{"line":83,"column":19}},"83":{"start":{"line":84,"column":0},"end":{"line":84,"column":4}},"84":{"start":{"line":85,"column":0},"end":{"line":85,"column":2}}},"s":{"37":42,"38":42,"39":38,"40":0,"41":0,"42":4,"43":4,"45":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"64":1,"65":1,"66":12,"67":12,"68":12,"69":12,"70":3,"71":3,"72":1,"73":12,"74":9,"75":3,"76":3,"77":30,"78":3,"79":3,"80":0,"81":0,"82":1,"83":12,"84":1},"branchMap":{"0":{"type":"branch","line":38,"loc":{"start":{"line":38,"column":0},"end":{"line":44,"column":1}},"locations":[{"start":{"line":38,"column":0},"end":{"line":44,"column":1}}]},"1":{"type":"branch","line":39,"loc":{"start":{"line":39,"column":42},"end":{"line":44,"column":1}},"locations":[{"start":{"line":39,"column":42},"end":{"line":44,"column":1}}]},"2":{"type":"branch","line":39,"loc":{"start":{"line":39,"column":42},"end":{"line":40,"column":20}},"locations":[{"start":{"line":39,"column":42},"end":{"line":40,"column":20}}]},"3":{"type":"branch","line":40,"loc":{"start":{"line":40,"column":20},"end":{"line":42,"column":3}},"locations":[{"start":{"line":40,"column":20},"end":{"line":42,"column":3}}]},"4":{"type":"branch","line":42,"loc":{"start":{"line":42,"column":2},"end":{"line":44,"column":1}},"locations":[{"start":{"line":42,"column":2},"end":{"line":44,"column":1}}]},"5":{"type":"branch","line":46,"loc":{"start":{"line":46,"column":22},"end":{"line":63,"column":2}},"locations":[{"start":{"line":46,"column":22},"end":{"line":63,"column":2}}]},"6":{"type":"branch","line":66,"loc":{"start":{"line":66,"column":2},"end":{"line":84,"column":4}},"locations":[{"start":{"line":66,"column":2},"end":{"line":84,"column":4}}]},"7":{"type":"branch","line":70,"loc":{"start":{"line":70,"column":21},"end":{"line":74,"column":11}},"locations":[{"start":{"line":70,"column":21},"end":{"line":74,"column":11}}]},"8":{"type":"branch","line":72,"loc":{"start":{"line":72,"column":71},"end":{"line":74,"column":11}},"locations":[{"start":{"line":72,"column":71},"end":{"line":74,"column":11}}]},"9":{"type":"branch","line":74,"loc":{"start":{"line":74,"column":4},"end":{"line":82,"column":5}},"locations":[{"start":{"line":74,"column":4},"end":{"line":82,"column":5}}]},"10":{"type":"branch","line":75,"loc":{"start":{"line":75,"column":66},"end":{"line":82,"column":5}},"locations":[{"start":{"line":75,"column":66},"end":{"line":82,"column":5}}]},"11":{"type":"branch","line":75,"loc":{"start":{"line":75,"column":66},"end":{"line":80,"column":8}},"locations":[{"start":{"line":75,"column":66},"end":{"line":80,"column":8}}]},"12":{"type":"branch","line":80,"loc":{"start":{"line":80,"column":6},"end":{"line":82,"column":5}},"locations":[{"start":{"line":80,"column":6},"end":{"line":82,"column":5}}]},"13":{"type":"branch","line":82,"loc":{"start":{"line":82,"column":4},"end":{"line":83,"column":19}},"locations":[{"start":{"line":82,"column":4},"end":{"line":83,"column":19}}]},"14":{"type":"branch","line":73,"loc":{"start":{"line":73,"column":36},"end":{"line":73,"column":69}},"locations":[{"start":{"line":73,"column":36},"end":{"line":73,"column":69}}]},"15":{"type":"branch","line":77,"loc":{"start":{"line":77,"column":29},"end":{"line":78,"column":53}},"locations":[{"start":{"line":77,"column":29},"end":{"line":78,"column":53}}]}},"b":{"0":[42],"1":[38],"2":[4],"3":[0],"4":[4],"5":[1],"6":[12],"7":[3],"8":[1],"9":[9],"10":[5],"11":[3],"12":[0],"13":[1],"14":[1],"15":[30]},"fnMap":{"0":{"name":"fetchData","decl":{"start":{"line":38,"column":0},"end":{"line":44,"column":1}},"loc":{"start":{"line":38,"column":0},"end":{"line":44,"column":1}},"line":38},"1":{"name":"ArrayToPlanet","decl":{"start":{"line":46,"column":22},"end":{"line":63,"column":2}},"loc":{"start":{"line":46,"column":22},"end":{"line":63,"column":2}},"line":46},"2":{"name":"fetchPlanets","decl":{"start":{"line":66,"column":2},"end":{"line":84,"column":4}},"loc":{"start":{"line":66,"column":2},"end":{"line":84,"column":4}},"line":66}},"f":{"0":42,"1":1,"2":12}} +,"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\Spinner.tsx": {"path":"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\Spinner.tsx","all":false,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":26}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":39}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":12}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":12}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":41}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":39}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":12}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":3}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":1}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":23}}},"s":{"0":1,"2":1,"3":1,"4":45,"5":45,"6":45,"7":45,"9":45,"10":1,"12":1},"branchMap":{"0":{"type":"branch","line":4,"loc":{"start":{"line":4,"column":2},"end":{"line":10,"column":3}},"locations":[{"start":{"line":4,"column":2},"end":{"line":10,"column":3}}]}},"b":{"0":[45]},"fnMap":{"0":{"name":"render","decl":{"start":{"line":4,"column":2},"end":{"line":10,"column":3}},"loc":{"start":{"line":4,"column":2},"end":{"line":10,"column":3}},"line":4}},"f":{"0":45}} +,"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\main.tsx": {"path":"C:\\Users\\oreo\\Desktop\\unit\\rs_react\\src\\main.tsx","all":true,"statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":35}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":46}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":44}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":21}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":28}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":66}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":14}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":19}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":13}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":20}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":16}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":2}}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},"branchMap":{"0":{"type":"branch","line":1,"loc":{"start":{"line":1,"column":288},"end":{"line":13,"column":-207}},"locations":[{"start":{"line":1,"column":288},"end":{"line":13,"column":-207}}]}},"b":{"0":[0]},"fnMap":{"0":{"name":"(empty-report)","decl":{"start":{"line":1,"column":288},"end":{"line":13,"column":-207}},"loc":{"start":{"line":1,"column":288},"end":{"line":13,"column":-207}},"line":1}},"f":{"0":0}} +} diff --git a/coverage/favicon.png b/coverage/favicon.png new file mode 100644 index 0000000..c1525b8 Binary files /dev/null and b/coverage/favicon.png differ diff --git a/coverage/index.html b/coverage/index.html new file mode 100644 index 0000000..36ff281 --- /dev/null +++ b/coverage/index.html @@ -0,0 +1,236 @@ + + + + + + Code coverage report for All files + + + + + + + + + +
+
+

All files

+
+ +
+ 92.06% + Statements + 232/252 +
+ + +
+ 92.59% + Branches + 50/54 +
+ + +
+ 91.66% + Functions + 22/24 +
+ + +
+ 92.06% + Lines + 232/252 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
App.tsx +
+
95.29%81/8595.83%23/2488.88%8/995.29%81/85
Button.tsx +
+
100%7/7100%1/1100%1/1100%7/7
ErrorBoundary.tsx +
+
100%31/31100%8/8100%6/6100%31/31
ErrorButton.tsx +
+
100%10/10100%1/1100%1/1100%10/10
Input.tsx +
+
100%12/12100%1/1100%1/1100%12/12
PlanetCard.tsx +
+
100%41/41100%1/1100%1/1100%41/41
PlanetFetch.ts +
+
90.9%40/4487.5%14/16100%3/390.9%40/44
Spinner.tsx +
+
100%10/10100%1/1100%1/1100%10/10
main.tsx +
+
0%0/120%0/10%0/10%0/12
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/coverage/main.tsx.html b/coverage/main.tsx.html new file mode 100644 index 0000000..120a76d --- /dev/null +++ b/coverage/main.tsx.html @@ -0,0 +1,124 @@ + + + + + + Code coverage report for main.tsx + + + + + + + + + +
+
+

All files main.tsx

+
+ +
+ 0% + Statements + 0/12 +
+ + +
+ 0% + Branches + 0/1 +
+ + +
+ 0% + Functions + 0/1 +
+ + +
+ 0% + Lines + 0/12 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14  +  +  +  +  +  +  +  +  +  +  +  +  + 
import { StrictMode } from "react";
+import { createRoot } from "react-dom/client";
+import ErrorBoundary from "./ErrorBoundary";
+import "./index.css";
+import App from "./App.tsx";
+ 
+createRoot(document.getElementById("root") as HTMLElement).render(
+  <StrictMode>
+    <ErrorBoundary>
+      <App />
+    </ErrorBoundary>
+  </StrictMode>,
+);
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/coverage/prettify.css b/coverage/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/coverage/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/coverage/prettify.js b/coverage/prettify.js new file mode 100644 index 0000000..b322523 --- /dev/null +++ b/coverage/prettify.js @@ -0,0 +1,2 @@ +/* eslint-disable */ +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;V122)){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;arat[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=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=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=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=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*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\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=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]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\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/coverage/sort-arrow-sprite.png b/coverage/sort-arrow-sprite.png new file mode 100644 index 0000000..6ed6831 Binary files /dev/null and b/coverage/sort-arrow-sprite.png differ diff --git a/coverage/sorter.js b/coverage/sorter.js new file mode 100644 index 0000000..2bb296a --- /dev/null +++ b/coverage/sorter.js @@ -0,0 +1,196 @@ +/* eslint-disable */ +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 + ''; + } + } + 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/package-lock.json b/package-lock.json index 74bf157..fe475d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,9 +13,14 @@ }, "devDependencies": { "@eslint/js": "^9.30.1", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.3.0", + "@testing-library/user-event": "^14.6.1", "@types/react": "^19.1.8", "@types/react-dom": "^19.1.6", + "@types/testing-library__user-event": "^4.2.0", "@vitejs/plugin-react": "^4.6.0", + "@vitest/coverage-v8": "^3.2.4", "eslint": "^9.30.1", "eslint-config-prettier": "^10.1.5", "eslint-plugin-prettier": "^5.5.1", @@ -25,12 +30,20 @@ "eslint-plugin-react-refresh": "^0.4.20", "globals": "^16.3.0", "husky": "^9.1.7", + "jsdom": "^26.1.0", "prettier": "3.6.2", "typescript": "~5.8.3", "typescript-eslint": "^8.35.1", - "vite": "^7.0.3" + "vite": "^7.0.3", + "vitest": "^3.2.4" } }, + "node_modules/@adobe/css-tools": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.3.tgz", + "integrity": "sha512-VQKMkwriZbaOgVCby1UDY/LDk5fIjhQicCvVPFqfe+69fWaPWydbWJ3wRt59/YzIwda1I81loas3oCoHxnqvdA==", + "dev": true + }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", @@ -44,6 +57,25 @@ "node": ">=6.0.0" } }, + "node_modules/@asamuzakjp/css-color": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-3.2.0.tgz", + "integrity": "sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==", + "dev": true, + "dependencies": { + "@csstools/css-calc": "^2.1.3", + "@csstools/css-color-parser": "^3.0.9", + "@csstools/css-parser-algorithms": "^3.0.4", + "@csstools/css-tokenizer": "^3.0.3", + "lru-cache": "^10.4.3" + } + }, + "node_modules/@asamuzakjp/css-color/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, "node_modules/@babel/code-frame": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", @@ -367,6 +399,15 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/runtime": { + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz", + "integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.27.2", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", @@ -412,6 +453,125 @@ "node": ">=6.9.0" } }, + "node_modules/@bcoe/v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", + "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/@csstools/color-helpers": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.0.2.tgz", + "integrity": "sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@csstools/css-calc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-2.1.4.tgz", + "integrity": "sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-color-parser": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.0.10.tgz", + "integrity": "sha512-TiJ5Ajr6WRd1r8HSiwJvZBiJOqtH86aHpUjq5aEKWHiII2Qfjqd/HCWKPOW8EP4vcspXbHnXrwIDlu5savQipg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "dependencies": { + "@csstools/color-helpers": "^5.0.2", + "@csstools/css-calc": "^2.1.4" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-parser-algorithms": "^3.0.5", + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.5.tgz", + "integrity": "sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^3.0.4" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.4.tgz", + "integrity": "sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.6", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.6.tgz", @@ -1044,6 +1204,32 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.12", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", @@ -1114,6 +1300,16 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@pkgr/core": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.7.tgz", @@ -1392,6 +1588,112 @@ "win32" ] }, + "node_modules/@testing-library/dom": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", + "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", + "dev": true, + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.3.0", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@testing-library/jest-dom": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.6.3.tgz", + "integrity": "sha512-IteBhl4XqYNkM54f4ejhLRJiZNqcSCoXUOG2CPK7qbD322KjQozM4kHQOfkG2oln9b9HTYqs+Sae8vBATubxxA==", + "dev": true, + "dependencies": { + "@adobe/css-tools": "^4.4.0", + "aria-query": "^5.0.0", + "chalk": "^3.0.0", + "css.escape": "^1.5.1", + "dom-accessibility-api": "^0.6.3", + "lodash": "^4.17.21", + "redent": "^3.0.0" + }, + "engines": { + "node": ">=14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz", + "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", + "dev": true + }, + "node_modules/@testing-library/react": { + "version": "16.3.0", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.3.0.tgz", + "integrity": "sha512-kFSyxiEDwv1WLl2fgsq6pPBbw5aWKrsY2/noi1Id0TK0UParSF62oFQFGHXIyaG4pp2tEub/Zlel+fjjZILDsw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@testing-library/dom": "^10.0.0", + "@types/react": "^18.0.0 || ^19.0.0", + "@types/react-dom": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@testing-library/user-event": { + "version": "14.6.1", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.6.1.tgz", + "integrity": "sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==", + "dev": true, + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "peerDependencies": { + "@testing-library/dom": ">=7.21.4" + } + }, + "node_modules/@types/aria-query": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", + "dev": true, + "peer": true + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1433,6 +1735,21 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/chai": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.2.tgz", + "integrity": "sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==", + "dev": true, + "dependencies": { + "@types/deep-eql": "*" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true + }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", @@ -1463,6 +1780,16 @@ "@types/react": "^19.0.0" } }, + "node_modules/@types/testing-library__user-event": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@types/testing-library__user-event/-/testing-library__user-event-4.2.0.tgz", + "integrity": "sha512-vHuDMJY+UooghUtgFX+OucrhQWLLNUwgSOyvVkHNr+5gYag3a7xVkWNF0hyZID/+qHNw87wFqM/5uagFZ5eQIg==", + "deprecated": "This is a stub types definition. testing-library__user-event provides its own type definitions, so you do not need this installed.", + "dev": true, + "dependencies": { + "@testing-library/user-event": "*" + } + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.36.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.36.0.tgz", @@ -1739,6 +2066,147 @@ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0" } }, + "node_modules/@vitest/coverage-v8": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-3.2.4.tgz", + "integrity": "sha512-EyF9SXU6kS5Ku/U82E259WSnvg6c8KTjppUncuNdm5QHpe17mwREHnjDzozC8x9MZ0xfBUFSaLkRv4TMA75ALQ==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "@bcoe/v8-coverage": "^1.0.2", + "ast-v8-to-istanbul": "^0.3.3", + "debug": "^4.4.1", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-report": "^3.0.1", + "istanbul-lib-source-maps": "^5.0.6", + "istanbul-reports": "^3.1.7", + "magic-string": "^0.30.17", + "magicast": "^0.3.5", + "std-env": "^3.9.0", + "test-exclude": "^7.0.1", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@vitest/browser": "3.2.4", + "vitest": "3.2.4" + }, + "peerDependenciesMeta": { + "@vitest/browser": { + "optional": true + } + } + }, + "node_modules/@vitest/expect": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", + "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", + "dev": true, + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", + "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", + "dev": true, + "dependencies": { + "@vitest/spy": "3.2.4", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", + "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", + "dev": true, + "dependencies": { + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", + "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", + "dev": true, + "dependencies": { + "@vitest/utils": "3.2.4", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", + "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", + "dev": true, + "dependencies": { + "@vitest/pretty-format": "3.2.4", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", + "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", + "dev": true, + "dependencies": { + "tinyspy": "^4.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", + "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", + "dev": true, + "dependencies": { + "@vitest/pretty-format": "3.2.4", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -1760,6 +2228,15 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1776,6 +2253,15 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -1797,6 +2283,15 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, "node_modules/array-buffer-byte-length": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", @@ -1928,10 +2423,36 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/async-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", - "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/ast-v8-to-istanbul": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-0.3.3.tgz", + "integrity": "sha512-MuXMrSLVVoA6sYN/6Hke18vMzrT4TZNbZIj/hvh0fnYFpO+/kFXcLIaiPwXXWaQUPg4yJD8fj+lfJ7/1EBconw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "estree-walker": "^3.0.3", + "js-tokens": "^9.0.1" + } + }, + "node_modules/ast-v8-to-istanbul/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true + }, + "node_modules/async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", "dev": true, "engines": { "node": ">= 0.4" @@ -2012,6 +2533,15 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/call-bind": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", @@ -2088,6 +2618,22 @@ } ] }, + "node_modules/chai": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.1.tgz", + "integrity": "sha512-5nFxhUrX0PqtyogoYOA8IPswy5sZFTOsBFl/9bNsmDLgsxYTzSZQJDPppDnZPTQbzSEm0hqGjWPzRemQCYbD6A==", + "dev": true, + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -2104,6 +2650,15 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "engines": { + "node": ">= 16" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2148,12 +2703,44 @@ "node": ">= 8" } }, + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "dev": true + }, + "node_modules/cssstyle": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.6.0.tgz", + "integrity": "sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg==", + "dev": true, + "dependencies": { + "@asamuzakjp/css-color": "^3.2.0", + "rrweb-cssom": "^0.8.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "dev": true }, + "node_modules/data-urls": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", + "dev": true, + "dependencies": { + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/data-view-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", @@ -2222,6 +2809,21 @@ } } }, + "node_modules/decimal.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "dev": true + }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -2262,6 +2864,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -2274,6 +2885,13 @@ "node": ">=0.10.0" } }, + "node_modules/dom-accessibility-api": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", + "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", + "dev": true, + "peer": true + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -2288,12 +2906,36 @@ "node": ">= 0.4" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/electron-to-chromium": { "version": "1.5.181", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.181.tgz", "integrity": "sha512-+ISMj8OIQ+0qEeDj14Rt8WwcTOiqHyAB+5bnK1K7xNNLjBJ4hRCQfUkw8RWtcLbfBzDwc15ZnKH0c7SNOfwiyA==", "dev": true }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/es-abstract": { "version": "1.24.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", @@ -2407,6 +3049,12 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true + }, "node_modules/es-object-atoms": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", @@ -2781,6 +3429,15 @@ "node": ">=4.0" } }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0" + } + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -2790,6 +3447,15 @@ "node": ">=0.10.0" } }, + "node_modules/expect-type": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz", + "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==", + "dev": true, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2925,6 +3591,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -3040,6 +3722,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -3052,6 +3754,30 @@ "node": ">=10.13.0" } }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/globals": { "version": "16.3.0", "resolved": "https://registry.npmjs.org/globals/-/globals-16.3.0.tgz", @@ -3200,6 +3926,50 @@ "hermes-estree": "0.25.1" } }, + "node_modules/html-encoding-sniffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", + "dev": true, + "dependencies": { + "whatwg-encoding": "^3.1.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/husky": { "version": "9.1.7", "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", @@ -3215,6 +3985,18 @@ "url": "https://github.com/sponsors/typicode" } }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -3249,6 +4031,15 @@ "node": ">=0.8.19" } }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/internal-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", @@ -3414,6 +4205,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-generator-function": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", @@ -3493,6 +4293,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true + }, "node_modules/is-regex": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", @@ -3641,6 +4447,56 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/iterator.prototype": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", @@ -3658,6 +4514,21 @@ "node": ">= 0.4" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3676,6 +4547,45 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsdom": { + "version": "26.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.1.0.tgz", + "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", + "dev": true, + "dependencies": { + "cssstyle": "^4.2.1", + "data-urls": "^5.0.0", + "decimal.js": "^10.5.0", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.6", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.16", + "parse5": "^7.2.1", + "rrweb-cssom": "^0.8.0", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^5.1.1", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.1.1", + "ws": "^8.18.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "canvas": "^3.0.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -3770,6 +4680,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -3788,6 +4704,12 @@ "loose-envify": "cli.js" } }, + "node_modules/loupe": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.4.tgz", + "integrity": "sha512-wJzkKwJrheKtknCOKNEtDK4iqg/MxmZheEMtSTYvnzRdEYaZzmgH976nenp8WdJRdx5Vc1X/9MO0Oszl6ezeXg==", + "dev": true + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -3797,37 +4719,103 @@ "yallist": "^3.0.2" } }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "node_modules/lz-string": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, - "engines": { - "node": ">= 0.4" + "peer": true, + "bin": { + "lz-string": "bin/bin.js" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", "dev": true, - "engines": { - "node": ">= 8" + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" } }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "node_modules/magicast": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", "dev": true, "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", + "source-map-js": "^1.2.0" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { "node": ">=8.6" } }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3840,6 +4828,15 @@ "node": "*" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -3876,6 +4873,12 @@ "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "dev": true }, + "node_modules/nwsapi": { + "version": "2.2.20", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.20.tgz", + "integrity": "sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==", + "dev": true + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -4041,6 +5044,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4053,6 +5062,18 @@ "node": ">=6" } }, + "node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "dev": true, + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -4077,6 +5098,43 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true + }, + "node_modules/pathval": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", + "dev": true, + "engines": { + "node": ">= 14.16" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -4168,6 +5226,41 @@ "node": ">=6.0.0" } }, + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/pretty-format/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true, + "peer": true + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -4242,6 +5335,19 @@ "node": ">=0.10.0" } }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", @@ -4359,6 +5465,12 @@ "fsevents": "~2.3.2" } }, + "node_modules/rrweb-cssom": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.8.0.tgz", + "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==", + "dev": true + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -4434,6 +5546,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/saxes": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", + "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "dev": true, + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=v12.22.7" + } + }, "node_modules/scheduler": { "version": "0.26.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz", @@ -4587,6 +5717,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -4596,6 +5744,18 @@ "node": ">=0.10.0" } }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true + }, + "node_modules/std-env": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", + "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "dev": true + }, "node_modules/stop-iteration-iterator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", @@ -4609,6 +5769,56 @@ "node": ">= 0.4" } }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.matchall": { "version": "4.0.12", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", @@ -4702,6 +5912,58 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -4714,6 +5976,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strip-literal": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "dev": true, + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -4738,6 +6018,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, "node_modules/synckit": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.8.tgz", @@ -4753,6 +6039,56 @@ "url": "https://opencollective.com/synckit" } }, + "node_modules/test-exclude": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^10.4.1", + "minimatch": "^9.0.4" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true + }, "node_modules/tinyglobby": { "version": "0.2.14", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", @@ -4795,6 +6131,51 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.3.tgz", + "integrity": "sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tldts": { + "version": "6.1.86", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.86.tgz", + "integrity": "sha512-WMi/OQ2axVTf/ykqCQgXiIct+mSQDFdH2fkwhPwgEwvJ1kSzZRiinb0zF2Xb8u4+OqPChmyI6MEu4EezNJz+FQ==", + "dev": true, + "dependencies": { + "tldts-core": "^6.1.86" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "6.1.86", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.86.tgz", + "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==", + "dev": true + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -4807,6 +6188,30 @@ "node": ">=8.0" } }, + "node_modules/tough-cookie": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.1.2.tgz", + "integrity": "sha512-FVDYdxtnj0G6Qm/DhNPSb8Ju59ULcup3tuJxkFb5K8Bv2pUXILbf0xZWU8PX8Ov19OXljbUyveOFwRMwkXzO+A==", + "dev": true, + "dependencies": { + "tldts": "^6.1.32" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/tr46": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz", + "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==", + "dev": true, + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/ts-api-utils": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", @@ -5071,6 +6476,28 @@ } } }, + "node_modules/vite-node": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", + "dev": true, + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, "node_modules/vite/node_modules/fdir": { "version": "6.4.6", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", @@ -5097,6 +6524,145 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/vitest": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", + "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", + "dev": true, + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.4", + "@vitest/mocker": "3.2.4", + "@vitest/pretty-format": "^3.2.4", + "@vitest/runner": "3.2.4", + "@vitest/snapshot": "3.2.4", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.4", + "@vitest/ui": "3.2.4", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "dev": true, + "dependencies": { + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "dev": true, + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-url": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz", + "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", + "dev": true, + "dependencies": { + "tr46": "^5.1.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -5197,6 +6763,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -5206,6 +6788,121 @@ "node": ">=0.10.0" } }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml-name-validator": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", diff --git a/package.json b/package.json index ac14517..eaa9e46 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,9 @@ "lint": "eslint .", "preview": "vite preview", "format:fix": "prettier --write .", - "prepare": "husky" + "prepare": "husky", + "test": "vitest", + "coverage": "vitest run --coverage" }, "dependencies": { "react": "^19.1.0", @@ -17,9 +19,14 @@ }, "devDependencies": { "@eslint/js": "^9.30.1", + "@testing-library/jest-dom": "^6.6.3", + "@testing-library/react": "^16.3.0", + "@testing-library/user-event": "^14.6.1", "@types/react": "^19.1.8", "@types/react-dom": "^19.1.6", + "@types/testing-library__user-event": "^4.2.0", "@vitejs/plugin-react": "^4.6.0", + "@vitest/coverage-v8": "^3.2.4", "eslint": "^9.30.1", "eslint-config-prettier": "^10.1.5", "eslint-plugin-prettier": "^5.5.1", @@ -29,9 +36,11 @@ "eslint-plugin-react-refresh": "^0.4.20", "globals": "^16.3.0", "husky": "^9.1.7", + "jsdom": "^26.1.0", "prettier": "3.6.2", "typescript": "~5.8.3", "typescript-eslint": "^8.35.1", - "vite": "^7.0.3" + "vite": "^7.0.3", + "vitest": "^3.2.4" } } diff --git a/src/App.tsx b/src/App.tsx index b7facbb..b5ada5c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -5,7 +5,7 @@ import Button from "./Button"; import Input from "./Input"; import PlanetCard from "./PlanetCard"; import Spinner from "./Spinner"; - +import { PlanetApi } from "./PlanetFetch"; interface PlanetProperties { name?: string; diameter: string; @@ -22,16 +22,6 @@ interface Planet { properties: PlanetProperties; } -interface PlanetsListItem { - uid: string; - name: string; - url: string; -} - -interface PlanetsListResponse { - results: PlanetsListItem[]; -} - interface AppState { inputValue: string; searchResults: Planet[]; @@ -40,24 +30,7 @@ interface AppState { throwBoolean: boolean; } -interface PlanetDetailsResponse { - result: { - properties: PlanetProperties; - uid: string; - }; -} - -interface PlanetDetailsResponseSearch { - result: []; -} - -interface PlanetDetailsResponseSearchSolo { - uid: string; - properties: PlanetProperties; -} - class App extends React.Component { - apiUrl: string = "https://swapi.tech/api/planets"; localStorageKey: string = "starWarsQuery"; constructor(props: object) { @@ -80,67 +53,23 @@ class App extends React.Component { }; fetchPlanets = async (searchQuery: string = "") => { + let errorMessage = "Unknown error"; this.setState({ isLoading: true, error: null }); - let url: string; - let planets: Planet[] = []; - if (searchQuery) { - url = this.apiUrl + "?name=" + encodeURIComponent(searchQuery); - const listResponse = await fetch(url); - if (!listResponse.ok) { - throw new Error("Error in request"); - } - const listData: PlanetDetailsResponseSearch = await listResponse.json(); - if (listData.result) { - console.log(listData.result); - } - planets = listData.result.map( - (planet: PlanetDetailsResponseSearchSolo) => { - return { - uid: planet.uid, - name: planet.properties.name, - properties: { - diameter: planet.properties.diameter, - rotation_period: planet.properties.rotation_period, - orbital_period: planet.properties.orbital_period, - population: planet.properties.population, - climate: planet.properties.climate, - terrain: planet.properties.terrain, - }, - }; - }, - ); - } else { - url = this.apiUrl; - const listResponse = await fetch(url); - const listData: PlanetsListResponse = await listResponse.json(); - - for (const planet of listData.results) { - const detailsResponse = await fetch(planet.url); - if (!detailsResponse.ok) { - throw new Error(`Failed`); - } - - const detailsData: PlanetDetailsResponse = await detailsResponse.json(); - planets.push({ - uid: detailsData.result.uid, - name: detailsData.result.properties.name, - properties: { - name: detailsData.result.properties.name, - diameter: detailsData.result.properties.diameter, - rotation_period: detailsData.result.properties.rotation_period, - orbital_period: detailsData.result.properties.orbital_period, - population: detailsData.result.properties.population, - climate: detailsData.result.properties.climate, - terrain: detailsData.result.properties.terrain, - }, - }); + try { + const planets = await PlanetApi.fetchPlanets(searchQuery); + this.setState({ searchResults: planets, isLoading: false }); + } catch (error) { + if (error instanceof Error) { + errorMessage = error.message; + } else if (typeof error === "string") { + errorMessage = error; } + this.setState({ error: errorMessage, isLoading: false }); } - this.setState({ searchResults: planets, isLoading: false }); }; handleSearch = () => { - localStorage.setItem(this.localStorageKey, this.state.inputValue); + localStorage.setItem(this.localStorageKey, this.state.inputValue.trim()); this.fetchPlanets(this.state.inputValue); }; @@ -163,9 +92,11 @@ class App extends React.Component { } return ( -
+

Star Wars Planets

- + {this.state.error ? ( +
{this.state.error}
+ ) : null}
diff --git a/src/ErrorButton.tsx b/src/ErrorButton.tsx index 1b82082..a5430ed 100644 --- a/src/ErrorButton.tsx +++ b/src/ErrorButton.tsx @@ -4,12 +4,14 @@ interface ErrorButtonProps { onClick: () => void; } -const ErrorButton: React.FC = ({ onClick }) => { - return ( - - ); -}; - +class ErrorButton extends React.Component { + render() { + const { onClick } = this.props; + return ( + + ); + } +} export default ErrorButton; diff --git a/src/PlanetCard.tsx b/src/PlanetCard.tsx index b44e991..34c30b9 100644 --- a/src/PlanetCard.tsx +++ b/src/PlanetCard.tsx @@ -20,7 +20,7 @@ class PlanetCard extends React.Component<{ planet: Planet }> { render() { const { planet } = this.props; return ( -
+

{planet.name}

diff --git a/src/PlanetFetch.ts b/src/PlanetFetch.ts new file mode 100644 index 0000000..eae43a2 --- /dev/null +++ b/src/PlanetFetch.ts @@ -0,0 +1,85 @@ +interface Planet { + uid?: string; + name?: string; + properties: PlanetProperties; +} + +interface PlanetProperties { + name?: string; + diameter: string; + rotation_period: string; + orbital_period: string; + population: string; + climate: string; + terrain: string; +} + +interface PlanetsListItem { + uid: string; + name: string; + url: string; +} + +interface PlanetsListResponse { + results: PlanetsListItem[]; +} + +interface PlanetDetailsResponse { + result: { + properties: PlanetProperties; + uid: string; + }; +} + +interface PlanetDetailsResponseSearch { + result: []; +} + +async function fetchData(searchQuery: string): Promise { + const response = await fetch(searchQuery); + if (!response.ok) { + throw new Error("Error in request"); + } + return response.json(); +} + +const ArrayToPlanet = (data: { + uid: string; + properties: PlanetProperties; +}): Planet => { + return { + uid: data.uid, + name: data.properties.name, + properties: { + name: data.properties.name, + diameter: data.properties.diameter, + rotation_period: data.properties.rotation_period, + orbital_period: data.properties.orbital_period, + population: data.properties.population, + climate: data.properties.climate, + terrain: data.properties.terrain, + }, + }; +}; + +export const PlanetApi = { + async fetchPlanets(searchQuery: string = "") { + const apiUrl: string = "https://swapi.tech/api/planets"; + let url: string; + let planets: Planet[] = []; + if (searchQuery) { + url = apiUrl + "?name=" + encodeURIComponent(searchQuery.trim()); + const listData = await fetchData(url); + planets = listData.result.map((planet) => ArrayToPlanet(planet)); + } else { + const listData = await fetchData(apiUrl); + const planetsDetails = await Promise.all( + listData.results.map((item) => + fetchData(item.url), + ), + ); + planets = planetsDetails.map((detail) => ArrayToPlanet(detail.result)); + } + return planets; + }, +}; diff --git a/src/__tests__/App_test1.test.tsx b/src/__tests__/App_test1.test.tsx new file mode 100644 index 0000000..3d78b5d --- /dev/null +++ b/src/__tests__/App_test1.test.tsx @@ -0,0 +1,15 @@ +import { screen, render } from "@testing-library/react"; +import App from "../App"; + +describe("App tests render", () => { + test("should render the title", () => { + render(); + + expect( + screen.getByRole("heading", { + level: 1, + }), + ).toHaveTextContent("Star Wars Planets"); + expect(screen.getByTestId("app")).toBeInTheDocument(); + }); +}); diff --git a/src/__tests__/CardList_Component_Tests.test.tsx b/src/__tests__/CardList_Component_Tests.test.tsx new file mode 100644 index 0000000..bfdc62c --- /dev/null +++ b/src/__tests__/CardList_Component_Tests.test.tsx @@ -0,0 +1,86 @@ +import { describe, test, expect } from "vitest"; +import { render, screen } from "@testing-library/react"; +import userEvent from "@testing-library/user-event"; +import App from "../App"; +import { PlanetApi } from "../PlanetFetch"; + +vi.mock("../PlanetFetch", () => ({ + PlanetApi: { + fetchPlanets: vi.fn(), + }, +})); + +interface Planet { + uid?: string; + name: string; + properties: PlanetProperties; +} + +interface PlanetProperties { + name?: string; + diameter: string; + rotation_period: string; + orbital_period: string; + population: string; + climate: string; + terrain: string; +} + +const mockPlanet: Planet[] = [ + { + name: "Tatooine", + properties: { + name: "Tatooine", + diameter: "10465", + rotation_period: "23", + orbital_period: "304", + population: "200000", + climate: "arid", + terrain: "desert", + }, + }, +]; +describe("Planet Cards Rendering", () => { + beforeEach(() => { + vi.clearAllMocks(); + }); + + test("should render 1 planet cards", async () => { + const user = userEvent.setup(); + vi.mocked(PlanetApi.fetchPlanets).mockResolvedValue(mockPlanet); + render(); + + const inputElement = screen.getByRole("textbox"); + await user.type(inputElement, "Tatooine"); + const buttonElement = screen.getByRole("button", { name: /Search/ }); + expect(inputElement).toHaveValue("Tatooine"); + await user.click(buttonElement); + + const cards = await screen.findAllByRole("article"); + expect(cards).toHaveLength(1); + expect(screen.getByRole("article")).toBeInTheDocument(); + expect(screen.getByText(mockPlanet[0].name)).toBeInTheDocument(); + expect( + screen.getByText(mockPlanet[0].properties.diameter), + ).toBeInTheDocument(); + }); + + test("should render all planet cards", async () => { + vi.mocked(PlanetApi.fetchPlanets).mockResolvedValue(mockPlanet); + render(); + expect(await screen.findByRole("article")).toBeInTheDocument(); + expect(screen.getByText(mockPlanet[0].name)).toBeInTheDocument(); + expect( + screen.getByText(mockPlanet[0].properties.diameter), + ).toBeInTheDocument(); + }); + test("should handle fetch errors", async () => { + vi.mocked(PlanetApi.fetchPlanets).mockRejectedValueOnce( + new Error("Error in request"), + ); + render(); + + const error = await screen.findByTestId("error-message"); + expect(error).toBeInTheDocument(); + }); +}); diff --git a/src/__tests__/Error.test.tsx b/src/__tests__/Error.test.tsx new file mode 100644 index 0000000..0b911a6 --- /dev/null +++ b/src/__tests__/Error.test.tsx @@ -0,0 +1,44 @@ +import { render, screen } from "@testing-library/react"; +import App from "../App"; +import ErrorBoundary from "../ErrorBoundary"; +import { describe, it, expect, vi } from "vitest"; +import userEvent from "@testing-library/user-event"; + +describe("Error component", () => { + it("should throw error", async () => { + const ErrorSpy = vi.spyOn(console, "error").mockImplementation(() => {}); + + render( + + + , + ); + + const errorButton = screen.getByRole("button", { name: /Error/ }); + await userEvent.click(errorButton); + + expect(screen.getByText(/Test error/)).toBeInTheDocument(); + expect(ErrorSpy).toHaveBeenCalled(); + + const errorCalls = ErrorSpy.mock.calls; + expect(errorCalls[0][1].toString()).toContain("Error: Test error"); + ErrorSpy.mockRestore(); + }); + + it("should click reboot button", async () => { + render( + + + , + ); + + const errorButton = screen.getByRole("button", { name: /Error/ }); + await userEvent.click(errorButton); + + const rebootButton = screen.getByRole("button", { name: /Reboot/ }); + await userEvent.click(rebootButton); + + expect(screen.queryByText(/Test error/)).not.toBeInTheDocument(); + expect(screen.getByRole("button", { name: /Error/ })).toBeInTheDocument(); + }); +}); diff --git "a/src/__tests__/Search_\320\241omponent_Tests.test.tsx" "b/src/__tests__/Search_\320\241omponent_Tests.test.tsx" new file mode 100644 index 0000000..d200a63 --- /dev/null +++ "b/src/__tests__/Search_\320\241omponent_Tests.test.tsx" @@ -0,0 +1,91 @@ +import { describe, test, expect, vi, beforeEach } from "vitest"; +import { render, screen } from "@testing-library/react"; +import App from "../App"; +import userEvent from "@testing-library/user-event"; +describe("Search Component Tests", () => { + const localStorageMock = { + getItem: vi.fn(), + setItem: vi.fn(), + }; + + beforeEach(() => { + vi.stubGlobal("localStorage", localStorageMock); + }); + + test("should render Input and Button elements", () => { + render(); + + const inputElement = screen.getByRole("textbox"); + expect(inputElement).toBeVisible(); + expect(inputElement).toBeInTheDocument(); + const buttonElement = screen.getByRole("button", { name: /Search/ }); + expect(buttonElement).toBeInTheDocument(); + }); + + test("test text from localstorage", () => { + const testQuery = "Tatooine"; + localStorageMock.getItem.mockImplementation((key: string) => { + if (key === "starWarsQuery") { + return testQuery; + } else { + return null; + } + }); + render(); + expect(screen.getByRole("textbox")).toHaveValue(testQuery); + expect(localStorageMock.getItem).toHaveBeenCalledWith("starWarsQuery"); + }); + + test("shows empty input", () => { + localStorageMock.getItem.mockImplementation(() => { + return null; + }); + render(); + expect(screen.getByRole("textbox")).toHaveValue(""); + expect(localStorageMock.getItem).toHaveBeenCalledWith("starWarsQuery"); + }); + + test("should update input value when typing", async () => { + const user = userEvent.setup(); + render(); + + const inputElement = screen.getByRole("textbox"); + await user.type(inputElement, "Alderaan"); + + expect(inputElement).toHaveValue("Alderaan"); + }); + + test("save to localStorage", async () => { + const user = userEvent.setup(); + + render(); + + const inputElement = screen.getByRole("textbox"); + const buttonElement = screen.getByRole("button", { name: /Search/ }); + + await user.type(inputElement, "Coruscant"); + await user.click(buttonElement); + + expect(localStorageMock.setItem).toHaveBeenCalledWith( + "starWarsQuery", + "Coruscant", + ); + }); + + test("should trim whitespace", async () => { + const user = userEvent.setup(); + + render(); + + const inputElement = screen.getByRole("textbox"); + const searchButton = screen.getByRole("button", { name: /Search/ }); + + await user.type(inputElement, " Tatooine "); + await user.click(searchButton); + + expect(localStorageMock.setItem).toHaveBeenCalledWith( + "starWarsQuery", + "Tatooine", + ); + }); +}); diff --git a/src/setupTests.ts b/src/setupTests.ts new file mode 100644 index 0000000..ba8a818 --- /dev/null +++ b/src/setupTests.ts @@ -0,0 +1,9 @@ +import * as matchers from "@testing-library/jest-dom/matchers"; +import { cleanup } from "@testing-library/react"; +import { expect } from "vitest"; + +expect.extend(matchers); + +afterEach(() => { + cleanup(); +}); diff --git a/tsconfig.app.json b/tsconfig.app.json index 227a6c6..3eccf2a 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -6,6 +6,11 @@ "lib": ["ES2022", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true, + "types": [ + "vitest/globals", + "@testing-library/jest-dom", + "@testing-library/user-event" + ], /* Bundler mode */ "moduleResolution": "bundler", diff --git a/vite.config.ts b/vite.config.ts index 4e714d7..dede908 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,8 +1,31 @@ -import { defineConfig } from "vite"; +import { defineConfig } from "vitest/config"; import react from "@vitejs/plugin-react"; // https://vite.dev/config/ export default defineConfig({ plugins: [react()], resolve: { preserveSymlinks: true }, + test: { + globals: true, + environment: "jsdom", + setupFiles: ["./src/setupTests.ts"], + coverage: { + provider: "v8", + ignoreEmptyLines: true, + thresholds: { + statements: 80, + branches: 50, + functions: 50, + lines: 50, + }, + include: ["src/**/*.{js,jsx,ts,tsx}"], + exclude: [ + "src/**/*.test.{js,jsx,ts,tsx}", + "src/**/*.spec.{js,jsx,ts,tsx}", + "src/index.{js,jsx,ts,tsx}", + "src/setupTests.{js,ts}", + "src/**/*.d.ts", + ], + }, + }, });