diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 27cfbc62..728a8c1c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -9,8 +9,8 @@ # This also holds true for GitHub teams. # Rescript -*.res @OAGr @quinn-dougherty -*.resi @OAGr @quinn-dougherty +*.res @OAGr +*.resi @OAGr # Typescript *.tsx @Hazelfire @OAGr diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94e5c796..a7dff9d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,8 @@ jobs: should_skip_lang: ${{ steps.skip_lang_check.outputs.should_skip }} should_skip_components: ${{ steps.skip_components_check.outputs.should_skip }} should_skip_website: ${{ steps.skip_website_check.outputs.should_skip }} + should_skip_vscodeext: ${{ steps.skip_vscodeext_check.outputs.should_skip }} + should_skip_cli: ${{ steps.skip_cli_check.outputs.should_skip }} steps: - id: skip_lang_check name: Check if the changes are about squiggle-lang src files @@ -35,6 +37,16 @@ jobs: uses: fkirc/skip-duplicate-actions@v3.4.1 with: paths: '["packages/website/**"]' + - id: skip_vscodeext_check + name: Check if the changes are about vscode extension src files + uses: fkirc/skip-duplicate-actions@v3.4.1 + with: + paths: '["packages/vscode-ext/**"]' + - id: skip_cli_check + name: Check if the changes are about cli src files + uses: fkirc/skip-duplicate-actions@v3.4.1 + with: + paths: '["packages/cli/**"]' lang-lint: name: Language lint @@ -158,3 +170,52 @@ jobs: run: cd ../components && yarn build - name: Build website assets run: yarn build + + vscode-ext-lint: + name: VS Code extension lint + runs-on: ubuntu-latest + needs: pre_check + if: ${{ needs.pre_check.outputs.should_skip_vscodeext != 'true' }} + defaults: + run: + shell: bash + working-directory: packages/vscode-ext + steps: + - uses: actions/checkout@v2 + - name: Install dependencies from monorepo level + run: cd ../../ && yarn + - name: Lint the VSCode Extension source code + run: yarn lint + + vscode-ext-build: + name: VS Code extension build + runs-on: ubuntu-latest + needs: pre_check + if: ${{ (needs.pre_check.outputs.should_skip_components != 'true') || (needs.pre_check.outputs.should_skip_lang != 'true') }} || (needs.pre_check.outputs.should_skip_vscodeext != 'true') }} + defaults: + run: + shell: bash + working-directory: packages/vscode-ext + steps: + - uses: actions/checkout@v2 + - name: Install dependencies from monorepo level + run: cd ../../ && yarn + - name: Build + run: yarn compile + + cli-lint: + name: CLI lint + runs-on: ubuntu-latest + needs: pre_check + if: ${{ needs.pre_check.outputs.should_skip_cli != 'true' }} + defaults: + run: + shell: bash + working-directory: packages/cli + steps: + - uses: actions/checkout@v2 + - name: Check javascript, typescript, and markdown lint + uses: creyD/prettier_action@v4.2 + with: + dry: true + prettier_options: --check packages/cli diff --git a/.prettierignore b/.prettierignore index 903390ad..8090b3f3 100644 --- a/.prettierignore +++ b/.prettierignore @@ -12,3 +12,4 @@ packages/squiggle-lang/coverage/ packages/squiggle-lang/.cache/ packages/website/build/ packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.js +packages/vscode-ext/media/vendor/ diff --git a/README.md b/README.md index dafdc4cc..cdc73c28 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ _An estimation language_. - [Known bugs](https://www.squiggle-language.com/docs/Discussions/Bugs) - [Original lesswrong sequence](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3) - [Author your squiggle models as Observable notebooks](https://observablehq.com/@hazelfire/squiggle) +- [Use squiggle in VS Code](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle) ## Our deployments @@ -39,6 +40,8 @@ the packages can be found in `packages`. of the calculation. - `packages/website` is the main descriptive website for squiggle, it is hosted at `squiggle-language.com`. +- `packages/vscode-ext` is the VS Code extension for writing estimation functions. +- `packages/cli` is an experimental way of using imports in squiggle, which is also on [npm](https://www.npmjs.com/package/squiggle-cli-experimental). # Develop diff --git a/package.json b/package.json index 9db41bf5..dcab983e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "lint:all": "prettier --check . && cd packages/squiggle-lang && yarn lint:rescript" }, "devDependencies": { - "prettier": "^2.6.2" + "prettier": "^2.7.1" }, "workspaces": [ "packages/*" diff --git a/packages/cli/.gitignore b/packages/cli/.gitignore new file mode 100644 index 00000000..03087060 --- /dev/null +++ b/packages/cli/.gitignore @@ -0,0 +1,4 @@ +## Artifacts +*.swp +/node_modules/ +yarn-error.log \ No newline at end of file diff --git a/packages/cli/README.md b/packages/cli/README.md new file mode 100644 index 00000000..7b0d0038 --- /dev/null +++ b/packages/cli/README.md @@ -0,0 +1,22 @@ +## Squiggle CLI + +This package can be used to incorporate a very simple `import` system into Squiggle. + +To use, write special files with a `.squiggleU` file type. In these files, you can write lines like, + +``` +@import(models/gdp_over_time.squiggle, gdpOverTime) +gdpOverTime(2.5) +``` + +The imports will be replaced with the contents of the file in `models/gdp_over_time.squiggle` upon compilation. The `.squiggleU` file will be converted into a `.squiggle` file with the `import` statement having this replacement. + +## Running + +### `npx squiggle-cli-experimental compile` + +Runs compilation in the current directory and all of its subdirectories. + +### `npx squiggle-cli-experimental watch` + +Watches `.squiggleU` files in the current directory (and subdirectories) and rebuilds them when they are saved. Note that this will _not_ rebuild files when their dependencies are changed, just when they are changed directly. diff --git a/packages/cli/index.js b/packages/cli/index.js new file mode 100755 index 00000000..95956b86 --- /dev/null +++ b/packages/cli/index.js @@ -0,0 +1,96 @@ +#!/usr/bin/env node + +import fs from "fs"; +import path from "path"; +import indentString from "indent-string"; +import chokidar from "chokidar"; +import chalk from "chalk"; +import { Command } from "commander"; +import glob from "glob"; + +const processFile = (fileName, seen = []) => { + const normalizedFileName = path.resolve(fileName); + if (seen.includes(normalizedFileName)) { + throw new Error(`Recursive dependency for file ${fileName}`); + } + + const fileContents = fs.readFileSync(fileName, "utf-8"); + if (!fileName.endsWith(".squiggleU")) { + return fileContents; + } + + const regex = /\@import\(\s*([^)]+?)\s*\)/g; + const matches = Array.from(fileContents.matchAll(regex)).map((r) => + r[1].split(/\s*,\s*/) + ); + const newContent = fileContents.replaceAll(regex, ""); + const appendings = []; + + matches.forEach((r) => { + const importFileName = r[0]; + const rename = r[1]; + const item = fs.statSync(importFileName); + if (item.isFile()) { + const data = processFile(importFileName, [...seen, normalizedFileName]); + if (data) { + const importString = `${rename} = {\n${indentString(data, 2)}\n}\n`; + appendings.push(importString); + } + } else { + console.log( + chalk.red(`Import Error`) + + `: ` + + chalk.cyan(importFileName) + + ` not found in file ` + + chalk.cyan(fileName) + + `. Make sure the @import file names all exist in this repo.` + ); + } + }); + const imports = appendings.join("\n"); + + const newerContent = imports.concat(newContent); + return newerContent; +}; + +const run = (fileName) => { + const content = processFile(fileName); + const parsedPath = path.parse(path.resolve(fileName)); + const newFilename = `${parsedPath.dir}/${parsedPath.name}.squiggle`; + fs.writeFileSync(newFilename, content); + console.log(chalk.cyan(`Updated ${fileName} -> ${newFilename}`)); +}; + +const compile = () => { + glob("**/*.squiggleU", (_err, files) => { + files.forEach(run); + }); +}; + +const watch = () => { + chokidar + .watch("**.squiggleU") + .on("ready", () => console.log(chalk.green("Ready!"))) + .on("change", (event, _) => { + run(event); + }); +}; + +const program = new Command(); + +program + .name("squiggle-utils") + .description("CLI to transform squiggle files with @imports") + .version("0.0.1"); + +program + .command("watch") + .description("watch files and compile on the fly") + .action(watch); + +program + .command("compile") + .description("compile all .squiggleU files into .squiggle files") + .action(compile); + +program.parse(); diff --git a/packages/cli/package.json b/packages/cli/package.json new file mode 100644 index 00000000..2890d2a4 --- /dev/null +++ b/packages/cli/package.json @@ -0,0 +1,21 @@ +{ + "name": "squiggle-cli-experimental", + "version": "0.0.3", + "main": "index.js", + "homepage": "https://squiggle-language.com", + "author": "Quantified Uncertainty Research Institute", + "bin": "index.js", + "type": "module", + "scripts": { + "start": "node ." + }, + "license": "MIT", + "dependencies": { + "chalk": "^5.0.1", + "chokidar": "^3.5.3", + "commander": "^9.4.0", + "fs": "^0.0.1-security", + "glob": "^8.0.3", + "indent-string": "^5.0.0" + } +} diff --git a/packages/components/README.md b/packages/components/README.md index 38e019a1..2b911caa 100644 --- a/packages/components/README.md +++ b/packages/components/README.md @@ -20,11 +20,47 @@ Add to `App.js`: ```jsx import { SquiggleEditor } from "@quri/squiggle-components"; ; ``` +# Usage in a Nextjs project + +For now, `squiggle-components` requires the `window` property, so using the package in nextjs requires dynamic loading: + +``` + +import React from "react"; +import { SquiggleChart } from "@quri/squiggle-components"; + +import dynamic from "next/dynamic"; + +const SquiggleChart = dynamic( + () => import("@quri/squiggle-components").then((mod) => mod.SquiggleChart), + { + loading: () =>

Loading...

, + ssr: false, + } +); + +export function DynamicSquiggleChart({ squiggleString }) { + if (squiggleString == "") { + return null; + } else { + return ( + + ); + } +} + +``` + # Build storybook for development We assume that you had run `yarn` at monorepo level, installing dependencies. diff --git a/packages/components/package.json b/packages/components/package.json index c7ef4dc8..24d2fa85 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,65 +1,75 @@ { "name": "@quri/squiggle-components", - "version": "0.2.20", + "version": "0.2.24", "license": "MIT", "dependencies": { - "@headlessui/react": "^1.6.4", + "@floating-ui/react-dom": "^0.7.2", + "@floating-ui/react-dom-interactions": "^0.6.6", + "@headlessui/react": "^1.6.6", "@heroicons/react": "^1.0.6", - "@hookform/resolvers": "^2.9.1", + "@hookform/resolvers": "^2.9.6", "@quri/squiggle-lang": "^0.2.8", "@react-hook/size": "^2.1.2", - "clsx": "^1.1.1", + "clsx": "^1.2.1", + "framer-motion": "^6.5.1", "lodash": "^4.17.21", "react": "^18.1.0", "react-ace": "^10.1.0", - "react-dom": "^18.1.0", - "react-hook-form": "^7.32.0", + "react-hook-form": "^7.33.1", "react-use": "^17.4.0", - "react-vega": "^7.5.1", + "react-vega": "^7.6.0", "vega": "^5.22.1", - "vega-embed": "^6.20.6", - "vega-lite": "^5.2.0", + "vega-embed": "^6.21.0", + "vega-lite": "^5.3.0", + "vscode-uri": "^3.0.3", "yup": "^0.32.11" }, "devDependencies": { - "@babel/plugin-proposal-private-property-in-object": "^7.17.12", - "@storybook/addon-actions": "^6.5.8", - "@storybook/addon-essentials": "^6.5.8", - "@storybook/addon-links": "^6.5.8", - "@storybook/builder-webpack5": "^6.5.8", - "@storybook/manager-webpack5": "^6.5.8", - "@storybook/node-logger": "^6.5.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@storybook/addon-actions": "^6.5.9", + "@storybook/addon-essentials": "^6.5.9", + "@storybook/addon-links": "^6.5.9", + "@storybook/builder-webpack5": "^6.5.9", + "@storybook/manager-webpack5": "^6.5.9", + "@storybook/node-logger": "^6.5.9", "@storybook/preset-create-react-app": "^4.1.2", - "@storybook/react": "^6.5.8", + "@storybook/react": "^6.5.9", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", - "@testing-library/user-event": "^14.2.0", + "@testing-library/user-event": "^14.3.0", "@types/jest": "^27.5.0", "@types/lodash": "^4.14.182", - "@types/node": "^17.0.42", + "@types/node": "^18.6.1", "@types/react": "^18.0.9", - "@types/react-dom": "^18.0.5", "@types/styled-components": "^5.1.24", "@types/webpack": "^5.28.0", "cross-env": "^7.0.3", - "mini-css-extract-plugin": "^2.6.0", - "postcss-cli": "^9.1.0", + "mini-css-extract-plugin": "^2.6.1", + "postcss-cli": "^10.0.0", "postcss-import": "^14.1.0", - "postcss-loader": "^7.0.0", + "postcss-loader": "^7.0.1", + "react": "^18.1.0", "react-scripts": "^5.0.1", "style-loader": "^3.3.1", - "tailwindcss": "^3.1.2", + "tailwindcss": "^3.1.6", "ts-loader": "^9.3.0", "tsconfig-paths-webpack-plugin": "^3.5.2", - "typescript": "^4.7.3", + "typescript": "^4.7.4", "web-vitals": "^2.1.4", - "webpack": "^5.73.0", + "webpack": "^5.74.0", "webpack-cli": "^4.10.0", - "webpack-dev-server": "^4.9.2" + "webpack-dev-server": "^4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17 || ^18", + "react-dom": "^16.8.0 || ^17 || ^18" }, "scripts": { "start": "cross-env REACT_APP_FAST_REFRESH=false && start-storybook -p 6006 -s public", - "build": "tsc -b && postcss ./src/styles/main.css -o ./dist/main.css && build-storybook -s public", + "build:cjs": "tsc -b", + "build:css": "postcss ./src/styles/main.css -o ./dist/main.css", + "build:storybook": "build-storybook -s public", + "build": "yarn run build:cjs && yarn run build:css && yarn run build:storybook", "bundle": "webpack", "all": "yarn bundle && yarn build", "lint": "prettier --check .", diff --git a/packages/components/src/components/CodeEditor.tsx b/packages/components/src/components/CodeEditor.tsx index 5d9340b8..15802131 100644 --- a/packages/components/src/components/CodeEditor.tsx +++ b/packages/components/src/components/CodeEditor.tsx @@ -1,5 +1,5 @@ import _ from "lodash"; -import React, { FC } from "react"; +import React, { FC, useMemo, useRef } from "react"; import AceEditor from "react-ace"; import "ace-builds/src-noconflict/mode-golang"; @@ -8,6 +8,7 @@ import "ace-builds/src-noconflict/theme-github"; interface CodeEditorProps { value: string; onChange: (value: string) => void; + onSubmit?: () => void; oneLine?: boolean; width?: number; height: number; @@ -17,18 +18,24 @@ interface CodeEditorProps { export const CodeEditor: FC = ({ value, onChange, + onSubmit, oneLine = false, showGutter = false, height, }) => { - let lineCount = value.split("\n").length; - let id = _.uniqueId(); + const lineCount = value.split("\n").length; + const id = useMemo(() => _.uniqueId(), []); + + // this is necessary because AceEditor binds commands on mount, see https://github.com/securingsincity/react-ace/issues/684 + const onSubmitRef = useRef(null); + onSubmitRef.current = onSubmit; + return ( = ({ enableBasicAutocompletion: false, enableLiveAutocompletion: false, }} + commands={[ + { + name: "submit", + bindKey: { mac: "Cmd-Enter", win: "Ctrl-Enter" }, + exec: () => onSubmitRef.current?.(), + }, + ]} /> ); }; diff --git a/packages/components/src/components/DistributionChart.tsx b/packages/components/src/components/DistributionChart.tsx index f2ca811b..1e1c3822 100644 --- a/packages/components/src/components/DistributionChart.tsx +++ b/packages/components/src/components/DistributionChart.tsx @@ -5,39 +5,38 @@ import { distributionError, distributionErrorToString, } from "@quri/squiggle-lang"; -import { Vega, VisualizationSpec } from "react-vega"; -import * as chartSpecification from "../vega-specs/spec-distributions.json"; +import { Vega } from "react-vega"; import { ErrorAlert } from "./Alert"; import { useSize } from "react-use"; -import clsx from "clsx"; import { - linearXScale, - logXScale, - linearYScale, - expYScale, -} from "./DistributionVegaScales"; + buildVegaSpec, + DistributionChartSpecOptions, +} from "../lib/distributionSpecBuilder"; import { NumberShower } from "./NumberShower"; +import { hasMassBelowZero } from "../lib/distributionUtils"; -type DistributionChartProps = { +export type DistributionPlottingSettings = { + /** Whether to show a summary of means, stdev, percentiles etc */ + showSummary: boolean; + actions?: boolean; +} & DistributionChartSpecOptions; + +export type DistributionChartProps = { distribution: Distribution; width?: number; height: number; - /** Whether to show a summary of means, stdev, percentiles etc */ - showSummary: boolean; - /** Whether to show the user graph controls (scale etc) */ - showControls?: boolean; -}; +} & DistributionPlottingSettings; -export const DistributionChart: React.FC = ({ - distribution, - height, - showSummary, - width, - showControls = false, -}) => { - const [isLogX, setLogX] = React.useState(false); - const [isExpY, setExpY] = React.useState(false); +export const DistributionChart: React.FC = (props) => { + const { + distribution, + height, + showSummary, + width, + logX, + actions = false, + } = props; const shape = distribution.pointSet(); const [sized] = useSize((size) => { if (shape.tag === "Error") { @@ -48,10 +47,7 @@ export const DistributionChart: React.FC = ({ ); } - const massBelow0 = - shape.value.continuous.some((x) => x.x <= 0) || - shape.value.discrete.some((x) => x.x <= 0); - const spec = buildVegaSpec(isLogX, isExpY); + const spec = buildVegaSpec(props); let widthProp = width ? width : size.width; if (widthProp < 20) { @@ -63,79 +59,28 @@ export const DistributionChart: React.FC = ({ return (
- + {logX && hasMassBelowZero(shape.value) ? ( + + Cannot graph distribution with negative values on logarithmic scale. + + ) : ( + + )}
{showSummary && }
- {showControls && ( -
- - -
- )}
); }); return sized; }; -function buildVegaSpec(isLogX: boolean, isExpY: boolean): VisualizationSpec { - return { - ...chartSpecification, - scales: [ - isLogX ? logXScale : linearXScale, - isExpY ? expYScale : linearYScale, - ], - } as VisualizationSpec; -} - -interface CheckBoxProps { - label: string; - onChange: (x: boolean) => void; - value: boolean; - disabled?: boolean; - tooltip?: string; -} - -export const CheckBox: React.FC = ({ - label, - onChange, - value, - disabled = false, - tooltip, -}) => { - return ( - - onChange(!value)} - disabled={disabled} - className="form-checkbox" - /> - - - ); -}; - const TableHeadCell: React.FC<{ children: React.ReactNode }> = ({ children, }) => ( diff --git a/packages/components/src/components/FunctionChart.tsx b/packages/components/src/components/FunctionChart.tsx index 7e8749a3..73378cd8 100644 --- a/packages/components/src/components/FunctionChart.tsx +++ b/packages/components/src/components/FunctionChart.tsx @@ -1,7 +1,13 @@ import * as React from "react"; -import { lambdaValue, environment, runForeign } from "@quri/squiggle-lang"; +import { + lambdaValue, + environment, + runForeign, + errorValueToString, +} from "@quri/squiggle-lang"; import { FunctionChart1Dist } from "./FunctionChart1Dist"; import { FunctionChart1Number } from "./FunctionChart1Number"; +import { DistributionPlottingSettings } from "./DistributionChart"; import { ErrorAlert, MessageAlert } from "./Alert"; export type FunctionChartSettings = { @@ -13,6 +19,7 @@ export type FunctionChartSettings = { interface FunctionChartProps { fn: lambdaValue; chartSettings: FunctionChartSettings; + distributionPlotSettings: DistributionPlottingSettings; environment: environment; height: number; } @@ -21,6 +28,7 @@ export const FunctionChart: React.FC = ({ fn, chartSettings, environment, + distributionPlotSettings, height, }) => { if (fn.parameters.length > 1) { @@ -42,10 +50,16 @@ export const FunctionChart: React.FC = ({ } }; const validResult = getValidResult(); - const resultType = - validResult.tag === "Ok" ? validResult.value.tag : ("Error" as const); - switch (resultType) { + if (validResult.tag === "Error") { + return ( + + {errorValueToString(validResult.value)} + + ); + } + + switch (validResult.value.tag) { case "distribution": return ( = ({ chartSettings={chartSettings} environment={environment} height={height} + distributionPlotSettings={distributionPlotSettings} /> ); case "number": @@ -64,15 +79,11 @@ export const FunctionChart: React.FC = ({ height={height} /> ); - case "Error": - return ( - The function failed to be run - ); default: return ( There is no function visualization for this type of output:{" "} - {resultType} + {validResult.value.tag} ); } diff --git a/packages/components/src/components/FunctionChart1Dist.tsx b/packages/components/src/components/FunctionChart1Dist.tsx index 6c8b2766..f8d072d7 100644 --- a/packages/components/src/components/FunctionChart1Dist.tsx +++ b/packages/components/src/components/FunctionChart1Dist.tsx @@ -13,7 +13,10 @@ import { } from "@quri/squiggle-lang"; import { createClassFromSpec } from "react-vega"; import * as percentilesSpec from "../vega-specs/spec-percentiles.json"; -import { DistributionChart } from "./DistributionChart"; +import { + DistributionChart, + DistributionPlottingSettings, +} from "./DistributionChart"; import { NumberShower } from "./NumberShower"; import { ErrorAlert } from "./Alert"; @@ -44,6 +47,7 @@ export type FunctionChartSettings = { interface FunctionChart1DistProps { fn: lambdaValue; chartSettings: FunctionChartSettings; + distributionPlotSettings: DistributionPlottingSettings; environment: environment; height: number; } @@ -84,7 +88,7 @@ let getPercentiles = ({ chartSettings, fn, environment }) => { let chartPointsData: point[] = chartPointsToRender.map((x) => { let result = runForeign(fn, [x], environment); if (result.tag === "Ok") { - if (result.value.tag == "distribution") { + if (result.value.tag === "distribution") { return { x, value: { tag: "Ok", value: result.value.value } }; } else { return { @@ -150,6 +154,7 @@ export const FunctionChart1Dist: React.FC = ({ fn, chartSettings, environment, + distributionPlotSettings, height, }) => { let [mouseOverlay, setMouseOverlay] = React.useState(0); @@ -160,12 +165,14 @@ export const FunctionChart1Dist: React.FC = ({ setMouseOverlay(NaN); } const signalListeners = { mousemove: handleHover, mouseout: handleOut }; + + //TODO: This custom error handling is a bit hacky and should be improved. let mouseItem: result = !!mouseOverlay ? runForeign(fn, [mouseOverlay], environment) : { tag: "Error", value: { - tag: "REExpectedType", + tag: "RETodo", value: "Hover x-coordinate returned NaN. Expected a number.", }, }; @@ -175,7 +182,7 @@ export const FunctionChart1Dist: React.FC = ({ distribution={mouseItem.value.value} width={400} height={50} - showSummary={false} + {...distributionPlotSettings} /> ) : null; diff --git a/packages/components/src/components/SquiggleChart.tsx b/packages/components/src/components/SquiggleChart.tsx index 8bedd265..86b2b078 100644 --- a/packages/components/src/components/SquiggleChart.tsx +++ b/packages/components/src/components/SquiggleChart.tsx @@ -1,7 +1,5 @@ import * as React from "react"; import { - run, - errorValueToString, squiggleExpression, bindings, environment, @@ -9,265 +7,27 @@ import { defaultImports, defaultBindings, defaultEnvironment, - declaration, } from "@quri/squiggle-lang"; -import { NumberShower } from "./NumberShower"; -import { DistributionChart } from "./DistributionChart"; -import { ErrorAlert } from "./Alert"; -import { FunctionChart, FunctionChartSettings } from "./FunctionChart"; - -function getRange(x: declaration) { - let first = x.args[0]; - switch (first.tag) { - case "Float": { - return { floats: { min: first.value.min, max: first.value.max } }; - } - case "Date": { - return { time: { min: first.value.min, max: first.value.max } }; - } - } -} - -function getChartSettings(x: declaration): FunctionChartSettings { - let range = getRange(x); - let min = range.floats ? range.floats.min : 0; - let max = range.floats ? range.floats.max : 10; - return { - start: min, - stop: max, - count: 20, - }; -} - -interface VariableBoxProps { - heading: string; - children: React.ReactNode; - showTypes: boolean; -} - -export const VariableBox: React.FC = ({ - heading = "Error", - children, - showTypes = false, -}) => { - if (showTypes) { - return ( -
-
-
{heading}
-
-
{children}
-
- ); - } else { - return
{children}
; - } -}; - -export interface SquiggleItemProps { - /** The input string for squiggle */ - expression: squiggleExpression; - width?: number; - height: number; - /** Whether to show a summary of statistics for distributions */ - showSummary: boolean; - /** Whether to show type information */ - showTypes: boolean; - /** Whether to show users graph controls (scale etc) */ - showControls: boolean; - /** Settings for displaying functions */ - chartSettings: FunctionChartSettings; - /** Environment for further function executions */ - environment: environment; -} - -const SquiggleItem: React.FC = ({ - expression, - width, - height, - showSummary, - showTypes = false, - showControls = false, - chartSettings, - environment, -}) => { - switch (expression.tag) { - case "number": - return ( - -
- -
-
- ); - case "distribution": { - let distType = expression.value.type(); - return ( - - {distType === "Symbolic" && showTypes ? ( -
{expression.value.toString()}
- ) : null} - -
- ); - } - case "string": - return ( - - " - - {expression.value} - - " - - ); - case "boolean": - return ( - - {expression.value.toString()} - - ); - case "symbol": - return ( - - Undefined Symbol: - {expression.value} - - ); - case "call": - return ( - - {expression.value} - - ); - case "array": - return ( - - {expression.value.map((r, i) => ( -
-
-
{i}
-
-
- -
-
- ))} -
- ); - case "record": - return ( - -
- {Object.entries(expression.value).map(([key, r]) => ( -
-
-
{key}:
-
-
- -
-
- ))} -
-
- ); - case "arraystring": - return ( - - {expression.value.map((r) => `"${r}"`).join(", ")} - - ); - case "date": - return ( - - {expression.value.toDateString()} - - ); - case "timeDuration": { - return ( - - - - ); - } - case "lambda": - return ( - -
{`function(${expression.value.parameters.join( - "," - )})`}
- -
- ); - case "lambdaDeclaration": { - return ( - - - - ); - } - default: { - return <>Should be unreachable; - } - } -}; +import { useSquiggle } from "../lib/hooks"; +import { SquiggleViewer } from "./SquiggleViewer"; export interface SquiggleChartProps { /** The input string for squiggle */ - squiggleString?: string; + code?: string; + /** Allows to re-run the code if code hasn't changed */ + executionId?: number; /** If the output requires monte carlo sampling, the amount of samples */ sampleCount?: number; /** The amount of points returned to draw the distribution */ environment?: environment; - /** If the result is a function, where the function starts, ends and the amount of stops */ - chartSettings?: FunctionChartSettings; - /** When the environment changes */ - onChange?(expr: squiggleExpression): void; + /** If the result is a function, where the function domain starts */ + diagramStart?: number; + /** If the result is a function, where the function domain ends */ + diagramStop?: number; + /** If the result is a function, the amount of stops sampled */ + diagramCount?: number; + /** When the squiggle code gets reevaluated */ + onChange?(expr: squiggleExpression | undefined): void; /** CSS width of the element */ width?: number; height?: number; @@ -275,51 +35,90 @@ export interface SquiggleChartProps { bindings?: bindings; /** JS imported parameters */ jsImports?: jsImports; - /** Whether to show a summary of the distirbution */ + /** Whether to show a summary of the distribution */ showSummary?: boolean; - /** Whether to show type information about returns, default false */ - showTypes?: boolean; - /** Whether to show graph controls (scale etc)*/ - showControls?: boolean; + /** Set the x scale to be logarithmic by deault */ + logX?: boolean; + /** Set the y scale to be exponential by deault */ + expY?: boolean; + /** How to format numbers on the x axis */ + tickFormat?: string; + /** Title of the graphed distribution */ + title?: string; + /** Color of the graphed distribution */ + color?: string; + /** Specify the lower bound of the x scale */ + minX?: number; + /** Specify the upper bound of the x scale */ + maxX?: number; + /** Whether to show vega actions to the user, so they can copy the chart spec */ + distributionChartActions?: boolean; + enableLocalSettings?: boolean; } -const defaultChartSettings = { start: 0, stop: 10, count: 20 }; +const defaultOnChange = () => {}; + +export const SquiggleChart: React.FC = React.memo( + ({ + code = "", + executionId = 0, + environment, + onChange = defaultOnChange, // defaultOnChange must be constant, don't move its definition here + height = 200, + bindings = defaultBindings, + jsImports = defaultImports, + showSummary = false, + width, + logX = false, + expY = false, + diagramStart = 0, + diagramStop = 10, + diagramCount = 100, + tickFormat, + minX, + maxX, + color, + title, + distributionChartActions, + enableLocalSettings = false, + }) => { + const result = useSquiggle({ + code, + bindings, + environment, + jsImports, + onChange, + executionId, + }); + + const distributionPlotSettings = { + showSummary, + logX, + expY, + format: tickFormat, + minX, + maxX, + color, + title, + actions: distributionChartActions, + }; + + const chartSettings = { + start: diagramStart, + stop: diagramStop, + count: diagramCount, + }; -export const SquiggleChart: React.FC = ({ - squiggleString = "", - environment, - onChange = () => {}, - height = 200, - bindings = defaultBindings, - jsImports = defaultImports, - showSummary = false, - width, - showTypes = false, - showControls = false, - chartSettings = defaultChartSettings, -}) => { - let expressionResult = run(squiggleString, bindings, environment, jsImports); - if (expressionResult.tag !== "Ok") { return ( - - {errorValueToString(expressionResult.value)} - + ); } - - let e = environment ?? defaultEnvironment; - let expression = expressionResult.value; - onChange(expression); - return ( - - ); -}; +); diff --git a/packages/components/src/components/SquiggleContainer.tsx b/packages/components/src/components/SquiggleContainer.tsx index 63dbb54a..bb3f1db4 100644 --- a/packages/components/src/components/SquiggleContainer.tsx +++ b/packages/components/src/components/SquiggleContainer.tsx @@ -13,6 +13,7 @@ const SquiggleContext = React.createContext({ export const SquiggleContainer: React.FC = ({ children }) => { const context = useContext(SquiggleContext); + if (context.containerized) { return <>{children}; } else { diff --git a/packages/components/src/components/SquiggleEditor.tsx b/packages/components/src/components/SquiggleEditor.tsx index a8db78af..027eecb9 100644 --- a/packages/components/src/components/SquiggleEditor.tsx +++ b/packages/components/src/components/SquiggleEditor.tsx @@ -1,212 +1,92 @@ -import * as React from "react"; -import * as ReactDOM from "react-dom"; -import { SquiggleChart } from "./SquiggleChart"; +import React from "react"; import { CodeEditor } from "./CodeEditor"; -import type { - squiggleExpression, - environment, - bindings, - jsImports, -} from "@quri/squiggle-lang"; -import { - runPartial, - errorValueToString, - defaultImports, - defaultBindings, -} from "@quri/squiggle-lang"; -import { ErrorAlert } from "./Alert"; +import { environment, bindings, jsImports } from "@quri/squiggle-lang"; +import { defaultImports, defaultBindings } from "@quri/squiggle-lang"; import { SquiggleContainer } from "./SquiggleContainer"; +import { SquiggleChart, SquiggleChartProps } from "./SquiggleChart"; +import { useSquigglePartial, useMaybeControlledValue } from "../lib/hooks"; +import { SquiggleErrorAlert } from "./SquiggleErrorAlert"; -export interface SquiggleEditorProps { - /** The input string for squiggle */ - initialSquiggleString?: string; - /** If the output requires monte carlo sampling, the amount of samples */ - environment?: environment; - /** If the result is a function, where the function starts */ - diagramStart?: number; - /** If the result is a function, where the function ends */ - diagramStop?: number; - /** If the result is a function, how many points along the function it samples */ - diagramCount?: number; - /** when the environment changes. Used again for notebook magic*/ - onChange?(expr: squiggleExpression): void; - /** The width of the element */ - width?: number; - /** Previous variable declarations */ - bindings?: bindings; - /** JS Imports */ - jsImports?: jsImports; - /** Whether to show detail about types of the returns, default false */ - showTypes?: boolean; - /** Whether to give users access to graph controls */ - showControls?: boolean; - /** Whether to show a summary table */ - showSummary?: boolean; -} +const WrappedCodeEditor: React.FC<{ + code: string; + setCode: (code: string) => void; +}> = ({ code, setCode }) => ( +
+ +
+); -export let SquiggleEditor: React.FC = ({ - initialSquiggleString = "", - width, - environment, - diagramStart = 0, - diagramStop = 10, - diagramCount = 20, - onChange, - bindings = defaultBindings, - jsImports = defaultImports, - showTypes = false, - showControls = false, - showSummary = false, -}: SquiggleEditorProps) => { - const [expression, setExpression] = React.useState(initialSquiggleString); - const chartSettings = { - start: diagramStart, - stop: diagramStop, - count: diagramCount, - }; +export type SquiggleEditorProps = SquiggleChartProps & { + defaultCode?: string; + onCodeChange?: (code: string) => void; +}; + +export const SquiggleEditor: React.FC = (props) => { + const [code, setCode] = useMaybeControlledValue({ + value: props.code, + defaultValue: props.defaultCode ?? "", + onChange: props.onCodeChange, + }); + + let chartProps = { ...props, code }; return ( -
-
- -
- -
+ +
); }; -export function renderSquiggleEditorToDom(props: SquiggleEditorProps) { - let parent = document.createElement("div"); - ReactDOM.render( - { - // Typescript complains on two levels here. - // - Div elements don't have a value property - // - Even if it did (like it was an input element), it would have to - // be a string - // - // Which are reasonable in most web contexts. - // - // However we're using observable, neither of those things have to be - // true there. div elements can contain the value property, and can have - // the value be any datatype they wish. - // - // This is here to get the 'viewof' part of: - // viewof env = cell('normal(0,1)') - // to work - // @ts-ignore - parent.value = expr; - - parent.dispatchEvent(new CustomEvent("input")); - if (props.onChange) props.onChange(expr); - }} - />, - parent - ); - return parent; -} - export interface SquigglePartialProps { - /** The input string for squiggle */ - initialSquiggleString?: string; - /** If the output requires monte carlo sampling, the amount of samples */ - environment?: environment; - /** If the result is a function, where the function starts */ - diagramStart?: number; - /** If the result is a function, where the function ends */ - diagramStop?: number; - /** If the result is a function, how many points along the function it samples */ - diagramCount?: number; + /** The text inside the input (controlled) */ + code?: string; + /** The default text inside the input (unControlled) */ + defaultCode?: string; /** when the environment changes. Used again for notebook magic*/ - onChange?(expr: bindings): void; + onChange?(expr: bindings | undefined): void; + /** When the code changes */ + onCodeChange?(code: string): void; /** Previously declared variables */ bindings?: bindings; + /** If the output requires monte carlo sampling, the amount of samples */ + environment?: environment; /** Variables imported from js */ jsImports?: jsImports; - /** Whether to give users access to graph controls */ - showControls?: boolean; } -export let SquigglePartial: React.FC = ({ - initialSquiggleString = "", +export const SquigglePartial: React.FC = ({ + code: controlledCode, + defaultCode = "", onChange, + onCodeChange, bindings = defaultBindings, environment, jsImports = defaultImports, }: SquigglePartialProps) => { - const [expression, setExpression] = React.useState(initialSquiggleString); - const [error, setError] = React.useState(null); + const [code, setCode] = useMaybeControlledValue({ + value: controlledCode, + defaultValue: defaultCode, + onChange: onCodeChange, + }); - const runSquiggleAndUpdateBindings = () => { - const squiggleResult = runPartial( - expression, - bindings, - environment, - jsImports - ); - if (squiggleResult.tag === "Ok") { - if (onChange) onChange(squiggleResult.value); - setError(null); - } else { - setError(errorValueToString(squiggleResult.value)); - } - }; - - React.useEffect(runSquiggleAndUpdateBindings, [expression]); + const result = useSquigglePartial({ + code, + bindings, + environment, + jsImports, + onChange, + }); return ( -
-
- -
- {error !== null ? ( - {error} - ) : null} -
+ + {result.tag !== "Ok" ? : null}
); }; - -export function renderSquigglePartialToDom(props: SquigglePartialProps) { - let parent = document.createElement("div"); - ReactDOM.render( - { - // @ts-ignore - parent.value = bindings; - - parent.dispatchEvent(new CustomEvent("input")); - if (props.onChange) props.onChange(bindings); - }} - />, - parent - ); - return parent; -} diff --git a/packages/components/src/components/SquiggleEditorWithImportedBindings.tsx b/packages/components/src/components/SquiggleEditorWithImportedBindings.tsx new file mode 100644 index 00000000..5dcc3241 --- /dev/null +++ b/packages/components/src/components/SquiggleEditorWithImportedBindings.tsx @@ -0,0 +1,52 @@ +import React from "react"; +import { SquiggleEditor } from "./SquiggleEditor"; +import type { SquiggleEditorProps } from "./SquiggleEditor"; +import { runPartial, defaultBindings } from "@quri/squiggle-lang"; +import type { + result, + errorValue, + bindings as bindingsType, +} from "@quri/squiggle-lang"; + +function resultDefault(x: result): bindingsType { + switch (x.tag) { + case "Ok": + return x.value; + case "Error": + return defaultBindings; + } +} + +export type SquiggleEditorWithImportedBindingsProps = SquiggleEditorProps & { + bindingsImportUrl: string; +}; + +export const SquiggleEditorWithImportedBindings: React.FC< + SquiggleEditorWithImportedBindingsProps +> = (props) => { + const { bindingsImportUrl, ...editorProps } = props; + const [bindingsResult, setBindingsResult] = React.useState({ + tag: "Ok", + value: defaultBindings, + } as result); + React.useEffect(() => { + async function retrieveBindings(fileName: string) { + let contents = await fetch(fileName).then((response) => { + return response.text(); + }); + setBindingsResult( + runPartial( + contents, + editorProps.bindings, + editorProps.environment, + editorProps.jsImports + ) + ); + } + retrieveBindings(bindingsImportUrl); + }, [bindingsImportUrl]); + const deliveredBindings = resultDefault(bindingsResult); + return ( + + ); +}; diff --git a/packages/components/src/components/SquiggleErrorAlert.tsx b/packages/components/src/components/SquiggleErrorAlert.tsx new file mode 100644 index 00000000..31d7e352 --- /dev/null +++ b/packages/components/src/components/SquiggleErrorAlert.tsx @@ -0,0 +1,11 @@ +import { errorValue, errorValueToString } from "@quri/squiggle-lang"; +import React from "react"; +import { ErrorAlert } from "./Alert"; + +type Props = { + error: errorValue; +}; + +export const SquiggleErrorAlert: React.FC = ({ error }) => { + return {errorValueToString(error)}; +}; diff --git a/packages/components/src/components/SquigglePlayground.tsx b/packages/components/src/components/SquigglePlayground.tsx index a0615ca4..626fc354 100644 --- a/packages/components/src/components/SquigglePlayground.tsx +++ b/packages/components/src/components/SquigglePlayground.tsx @@ -1,40 +1,62 @@ -import React, { FC, Fragment, useState } from "react"; -import ReactDOM from "react-dom"; -import { Path, useForm, UseFormRegister, useWatch } from "react-hook-form"; +import React, { + FC, + useState, + useEffect, + useMemo, + useRef, + useCallback, +} from "react"; +import { useForm, UseFormRegister, useWatch } from "react-hook-form"; import * as yup from "yup"; +import { useMaybeControlledValue, useRunnerState } from "../lib/hooks"; import { yupResolver } from "@hookform/resolvers/yup"; -import { Tab } from "@headlessui/react"; import { ChartSquareBarIcon, + CheckCircleIcon, + ClipboardCopyIcon, CodeIcon, CogIcon, CurrencyDollarIcon, + EyeIcon, + PauseIcon, + PlayIcon, + RefreshIcon, } from "@heroicons/react/solid"; import clsx from "clsx"; import { defaultBindings, environment } from "@quri/squiggle-lang"; -import { SquiggleChart } from "./SquiggleChart"; +import { SquiggleChart, SquiggleChartProps } from "./SquiggleChart"; import { CodeEditor } from "./CodeEditor"; import { JsonEditor } from "./JsonEditor"; import { ErrorAlert, SuccessAlert } from "./Alert"; import { SquiggleContainer } from "./SquiggleContainer"; +import { Toggle } from "./ui/Toggle"; +import { StyledTab } from "./ui/StyledTab"; +import { InputItem } from "./ui/InputItem"; +import { Text } from "./ui/Text"; +import { ViewSettings, viewSettingsSchema } from "./ViewSettings"; +import { HeadedSection } from "./ui/HeadedSection"; +import { + defaultColor, + defaultTickFormat, +} from "../lib/distributionSpecBuilder"; +import { Button } from "./ui/Button"; -interface PlaygroundProps { +type PlaygroundProps = SquiggleChartProps & { /** The initial squiggle string to put in the playground */ - initialSquiggleString?: string; - /** How many pixels high is the playground */ - height?: number; - /** Whether to show the types of outputs in the playground */ - showTypes?: boolean; - /** Whether to show the log scale controls in the playground */ - showControls?: boolean; - /** Whether to show the summary table in the playground */ - showSummary?: boolean; -} + defaultCode?: string; + onCodeChange?(expr: string): void; + /* When settings change */ + onSettingsChange?(settings: any): void; + /** Should we show the editor? */ + showEditor?: boolean; + /** Useful for playground on squiggle website, where we update the anchor link based on current code and settings */ + showShareButton?: boolean; +}; const schema = yup - .object() + .object({}) .shape({ sampleCount: yup .number() @@ -52,297 +74,68 @@ const schema = yup .default(1000) .min(10) .max(10000), - chartHeight: yup.number().required().positive().integer().default(350), - leftSizePercent: yup - .number() - .required() - .positive() - .integer() - .min(10) - .max(100) - .default(50), - showTypes: yup.boolean(), - showControls: yup.boolean(), - showSummary: yup.boolean(), - showSettingsPage: yup.boolean().default(false), - diagramStart: yup - .number() - .required() - .positive() - .integer() - .default(0) - .min(0), - diagramStop: yup - .number() - .required() - .positive() - .integer() - .default(10) - .min(0), - diagramCount: yup - .number() - .required() - .positive() - .integer() - .default(20) - .min(2), }) - .required(); + .concat(viewSettingsSchema); -type StyledTabProps = { - name: string; - icon: (props: React.ComponentProps<"svg">) => JSX.Element; -}; +type FormFields = yup.InferType; -const StyledTab: React.FC = ({ name, icon: Icon }) => { - return ( - - {({ selected }) => ( - - )} - - ); -}; - -const HeadedSection: FC<{ title: string; children: React.ReactNode }> = ({ - title, - children, +const SamplingSettings: React.FC<{ register: UseFormRegister }> = ({ + register, }) => ( -
-
- {title} -
-
{children}
+
+
+ +
+ + How many samples to use for Monte Carlo simulations. This can + occasionally be overridden by specific Squiggle programs. + +
+
+
+ +
+ + When distributions are converted into PointSet shapes, we need to know + how many coordinates to use. + +
+
); -const Text: FC<{ children: React.ReactNode }> = ({ children }) => ( -

{children}

-); - -function InputItem({ - name, - label, - type, - register, -}: { - name: Path; - label: string; - type: "number"; - register: UseFormRegister; -}) { - return ( - +const InputVariablesSettings: React.FC<{ + initialImports: any; // TODO - any json type + setImports: (imports: any) => void; +}> = ({ initialImports, setImports }) => { + const [importString, setImportString] = useState(() => + JSON.stringify(initialImports) ); -} - -function Checkbox({ - name, - label, - register, -}: { - name: Path; - label: string; - register: UseFormRegister; -}) { - return ( - - ); -} - -const SquigglePlayground: FC = ({ - initialSquiggleString = "", - height = 500, - showTypes = false, - showControls = false, - showSummary = false, -}) => { - const [squiggleString, setSquiggleString] = useState(initialSquiggleString); - const [importString, setImportString] = useState("{}"); - const [imports, setImports] = useState({}); const [importsAreValid, setImportsAreValid] = useState(true); - const { register, control } = useForm({ - resolver: yupResolver(schema), - defaultValues: { - sampleCount: 1000, - xyPointLength: 1000, - chartHeight: 150, - showTypes: showTypes, - showControls: showControls, - showSummary: showSummary, - leftSizePercent: 50, - showSettingsPage: false, - diagramStart: 0, - diagramStop: 10, - diagramCount: 20, - }, - }); - const vars = useWatch({ - control, - }); - const chartSettings = { - start: Number(vars.diagramStart), - stop: Number(vars.diagramStop), - count: Number(vars.diagramCount), - }; - const env: environment = { - sampleCount: Number(vars.sampleCount), - xyPointLength: Number(vars.xyPointLength), - }; - const getChangeJson = (r: string) => { - setImportString(r); + + const onChange = (value: string) => { + setImportString(value); + let imports = {} as any; try { - setImports(JSON.parse(r)); + imports = JSON.parse(value); setImportsAreValid(true); } catch (e) { setImportsAreValid(false); } + setImports(imports); }; - const samplingSettings = ( -
-
- -
- - How many samples to use for Monte Carlo simulations. This can - occasionally be overridden by specific Squiggle programs. - -
-
-
- -
- - When distributions are converted into PointSet shapes, we need to - know how many coordinates to use. - -
-
-
- ); - - const viewSettings = ( -
- -
- - -
-
- -
- -
- - -
-
-
- -
- -
- - When displaying functions of single variables that return numbers - or distributions, we need to use defaults for the x-axis. We need - to select a minimum and maximum value of x to sample, and a number - n of the number of points to sample. - -
- - - -
-
-
-
-
- ); - - const inputVariableSettings = ( + return (
@@ -354,7 +147,7 @@ const SquigglePlayground: FC = ({
= ({
); +}; + +const RunControls: React.FC<{ + autorunMode: boolean; + isRunning: boolean; + isStale: boolean; + onAutorunModeChange: (value: boolean) => void; + run: () => void; +}> = ({ autorunMode, isRunning, isStale, onAutorunModeChange, run }) => { + const CurrentPlayIcon = isRunning ? RefreshIcon : PlayIcon; return ( - - -
- - - - - - -
-
-
- - -
- -
-
- {samplingSettings} - {viewSettings} - {inputVariableSettings} -
-
- -
-
- -
-
-
-
-
+
+ {autorunMode ? null : ( + + )} + +
); }; -export default SquigglePlayground; -export function renderSquigglePlaygroundToDom(props: PlaygroundProps) { - const parent = document.createElement("div"); - ReactDOM.render(, parent); - return parent; -} +const ShareButton: React.FC = () => { + const [isCopied, setIsCopied] = useState(false); + const copy = () => { + navigator.clipboard.writeText((window.top || window).location.href); + setIsCopied(true); + setTimeout(() => setIsCopied(false), 1000); + }; + return ( +
+ +
+ ); +}; + +type PlaygroundContextShape = { + getLeftPanelElement: () => HTMLDivElement | undefined; +}; +export const PlaygroundContext = React.createContext({ + getLeftPanelElement: () => undefined, +}); + +export const SquigglePlayground: FC = ({ + defaultCode = "", + height = 500, + showSummary = false, + logX = false, + expY = false, + title, + minX, + maxX, + color = defaultColor, + tickFormat = defaultTickFormat, + distributionChartActions, + code: controlledCode, + onCodeChange, + onSettingsChange, + showEditor = true, + showShareButton = false, +}) => { + const [code, setCode] = useMaybeControlledValue({ + value: controlledCode, + defaultValue: defaultCode, + onChange: onCodeChange, + }); + + const [imports, setImports] = useState({}); + + const { register, control } = useForm({ + resolver: yupResolver(schema), + defaultValues: { + sampleCount: 1000, + xyPointLength: 1000, + chartHeight: 150, + logX, + expY, + title, + minX, + maxX, + color, + tickFormat, + distributionChartActions, + showSummary, + showEditor, + diagramStart: 0, + diagramStop: 10, + diagramCount: 20, + }, + }); + const vars = useWatch({ + control, + }); + + useEffect(() => { + onSettingsChange?.(vars); + }, [vars, onSettingsChange]); + + const env: environment = useMemo( + () => ({ + sampleCount: Number(vars.sampleCount), + xyPointLength: Number(vars.xyPointLength), + }), + [vars.sampleCount, vars.xyPointLength] + ); + + const { + run, + autorunMode, + setAutorunMode, + isRunning, + renderedCode, + executionId, + } = useRunnerState(code); + + const squiggleChart = + renderedCode === "" ? null : ( +
+ {isRunning ? ( +
+ ) : null} + +
+ ); + + const firstTab = vars.showEditor ? ( +
+ +
+ ) : ( + squiggleChart + ); + + const tabs = ( + + {firstTab} + + + + + + > + } + /> + + + + + + ); + + const leftPanelRef = useRef(null); + + const withEditor = ( +
+
+ {tabs} +
+
{squiggleChart}
+
+ ); + + const withoutEditor =
{tabs}
; + + const getLeftPanelElement = useCallback(() => { + return leftPanelRef.current ?? undefined; + }, []); + + return ( + + + +
+
+ + + + + + +
+ + {showShareButton && } +
+
+ {vars.showEditor ? withEditor : withoutEditor} +
+
+
+
+ ); +}; diff --git a/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx b/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx new file mode 100644 index 00000000..1417fb28 --- /dev/null +++ b/packages/components/src/components/SquiggleViewer/ExpressionViewer.tsx @@ -0,0 +1,291 @@ +import React from "react"; +import { squiggleExpression, declaration } from "@quri/squiggle-lang"; +import { NumberShower } from "../NumberShower"; +import { DistributionChart } from "../DistributionChart"; +import { FunctionChart, FunctionChartSettings } from "../FunctionChart"; +import clsx from "clsx"; +import { VariableBox } from "./VariableBox"; +import { ItemSettingsMenu } from "./ItemSettingsMenu"; +import { hasMassBelowZero } from "../../lib/distributionUtils"; +import { MergedItemSettings } from "./utils"; + +function getRange
(x: declaration) { + const first = x.args[0]; + switch (first.tag) { + case "Float": { + return { floats: { min: first.value.min, max: first.value.max } }; + } + case "Date": { + return { time: { min: first.value.min, max: first.value.max } }; + } + } +} + +function getChartSettings(x: declaration): FunctionChartSettings { + const range = getRange(x); + const min = range.floats ? range.floats.min : 0; + const max = range.floats ? range.floats.max : 10; + return { + start: min, + stop: max, + count: 20, + }; +} + +const VariableList: React.FC<{ + path: string[]; + heading: string; + children: (settings: MergedItemSettings) => React.ReactNode; +}> = ({ path, heading, children }) => ( + + {(settings) => ( +
+ {children(settings)} +
+ )} +
+); + +export interface Props { + /** The output of squiggle's run */ + expression: squiggleExpression; + /** Path to the current item, e.g. `['foo', 'bar', '3']` for `foo.bar[3]`; can be empty on the top-level item. */ + path: string[]; + width?: number; +} + +export const ExpressionViewer: React.FC = ({ + path, + expression, + width, +}) => { + switch (expression.tag) { + case "number": + return ( + + {() => ( +
+ +
+ )} +
+ ); + case "distribution": { + const distType = expression.value.type(); + return ( + { + const shape = expression.value.pointSet(); + return ( + + ); + }} + > + {(settings) => { + return ( + + ); + }} + + ); + } + case "string": + return ( + + {() => ( + <> + " + + {expression.value} + + " + + )} + + ); + case "boolean": + return ( + + {() => expression.value.toString()} + + ); + case "symbol": + return ( + + {() => ( + <> + Undefined Symbol: + {expression.value} + + )} + + ); + case "call": + return ( + + {() => expression.value} + + ); + case "arraystring": + return ( + + {() => expression.value.map((r) => `"${r}"`).join(", ")} + + ); + case "date": + return ( + + {() => expression.value.toDateString()} + + ); + case "void": + return ( + + {() => "Void"} + + ); + case "timeDuration": { + return ( + + {() => } + + ); + } + case "lambda": + return ( + { + return ( + + ); + }} + > + {(settings) => ( + <> +
{`function(${expression.value.parameters.join( + "," + )})`}
+ + + )} +
+ ); + case "lambdaDeclaration": { + return ( + { + return ( + + ); + }} + > + {(settings) => ( + + )} + + ); + } + case "module": { + return ( + + {(settings) => + Object.entries(expression.value) + .filter(([key, r]) => !key.match(/^(Math|System)\./)) + .map(([key, r]) => ( + + )) + } + + ); + } + case "record": + return ( + + {(settings) => + Object.entries(expression.value).map(([key, r]) => ( + + )) + } + + ); + case "array": + return ( + + {(settings) => + expression.value.map((r, i) => ( + + )) + } + + ); + default: { + return ( +
+ No display for type: {" "} + {expression.tag} +
+ ); + } + } +}; diff --git a/packages/components/src/components/SquiggleViewer/ItemSettingsMenu.tsx b/packages/components/src/components/SquiggleViewer/ItemSettingsMenu.tsx new file mode 100644 index 00000000..2c26b9aa --- /dev/null +++ b/packages/components/src/components/SquiggleViewer/ItemSettingsMenu.tsx @@ -0,0 +1,168 @@ +import { CogIcon } from "@heroicons/react/solid"; +import React, { useContext, useRef, useState, useEffect } from "react"; +import { useForm } from "react-hook-form"; +import { yupResolver } from "@hookform/resolvers/yup"; +import { Modal } from "../ui/Modal"; +import { ViewSettings, viewSettingsSchema } from "../ViewSettings"; +import { Path, pathAsString } from "./utils"; +import { ViewerContext } from "./ViewerContext"; +import { + defaultColor, + defaultTickFormat, +} from "../../lib/distributionSpecBuilder"; +import { PlaygroundContext } from "../SquigglePlayground"; + +type Props = { + path: Path; + onChange: () => void; + disableLogX?: boolean; + withFunctionSettings: boolean; +}; + +const ItemSettingsModal: React.FC< + Props & { close: () => void; resetScroll: () => void } +> = ({ + path, + onChange, + disableLogX, + withFunctionSettings, + close, + resetScroll, +}) => { + const { setSettings, getSettings, getMergedSettings } = + useContext(ViewerContext); + + const mergedSettings = getMergedSettings(path); + + const { register, watch } = useForm({ + resolver: yupResolver(viewSettingsSchema), + defaultValues: { + // this is a mess and should be fixed + showEditor: true, // doesn't matter + chartHeight: mergedSettings.height, + showSummary: mergedSettings.distributionPlotSettings.showSummary, + logX: mergedSettings.distributionPlotSettings.logX, + expY: mergedSettings.distributionPlotSettings.expY, + tickFormat: + mergedSettings.distributionPlotSettings.format || defaultTickFormat, + title: mergedSettings.distributionPlotSettings.title, + color: mergedSettings.distributionPlotSettings.color || defaultColor, + minX: mergedSettings.distributionPlotSettings.minX, + maxX: mergedSettings.distributionPlotSettings.maxX, + distributionChartActions: mergedSettings.distributionPlotSettings.actions, + diagramStart: mergedSettings.chartSettings.start, + diagramStop: mergedSettings.chartSettings.stop, + diagramCount: mergedSettings.chartSettings.count, + }, + }); + useEffect(() => { + const subscription = watch((vars) => { + const settings = getSettings(path); // get the latest version + setSettings(path, { + ...settings, + distributionPlotSettings: { + showSummary: vars.showSummary, + logX: vars.logX, + expY: vars.expY, + format: vars.tickFormat, + title: vars.title, + color: vars.color, + minX: vars.minX, + maxX: vars.maxX, + actions: vars.distributionChartActions, + }, + chartSettings: { + start: vars.diagramStart, + stop: vars.diagramStop, + count: vars.diagramCount, + }, + }); + onChange(); + }); + return () => subscription.unsubscribe(); + }, [getSettings, setSettings, onChange, path, watch]); + + const { getLeftPanelElement } = useContext(PlaygroundContext); + + return ( + + + Chart settings + {path.length ? ( + <> + {" for "} + + {pathAsString(path)} + {" "} + + ) : ( + "" + )} + + + + + + ); +}; + +export const ItemSettingsMenu: React.FC = (props) => { + const [isOpen, setIsOpen] = useState(false); + const { enableLocalSettings, setSettings, getSettings } = + useContext(ViewerContext); + + const ref = useRef(null); + + if (!enableLocalSettings) { + return null; + } + const settings = getSettings(props.path); + + const resetScroll = () => { + if (!ref.current) return; + window.scroll({ + top: ref.current.getBoundingClientRect().y + window.scrollY, + behavior: "smooth", + }); + }; + + return ( +
+ setIsOpen(!isOpen)} + /> + {settings.distributionPlotSettings || settings.chartSettings ? ( + + ) : null} + {isOpen ? ( + setIsOpen(false)} + resetScroll={resetScroll} + /> + ) : null} +
+ ); +}; diff --git a/packages/components/src/components/SquiggleViewer/VariableBox.tsx b/packages/components/src/components/SquiggleViewer/VariableBox.tsx new file mode 100644 index 00000000..97c31d45 --- /dev/null +++ b/packages/components/src/components/SquiggleViewer/VariableBox.tsx @@ -0,0 +1,79 @@ +import React, { useContext, useReducer } from "react"; +import { Tooltip } from "../ui/Tooltip"; +import { LocalItemSettings, MergedItemSettings } from "./utils"; +import { ViewerContext } from "./ViewerContext"; + +type SettingsMenuParams = { + onChange: () => void; // used to notify VariableBox that settings have changed, so that VariableBox could re-render itself +}; + +type VariableBoxProps = { + path: string[]; + heading: string; + renderSettingsMenu?: (params: SettingsMenuParams) => React.ReactNode; + children: (settings: MergedItemSettings) => React.ReactNode; +}; + +export const VariableBox: React.FC = ({ + path, + heading = "Error", + renderSettingsMenu, + children, +}) => { + const { setSettings, getSettings, getMergedSettings } = + useContext(ViewerContext); + + // Since ViewerContext doesn't keep the actual settings, VariableBox won't rerender when setSettings is called. + // So we use `forceUpdate` to force rerendering. + const [_, forceUpdate] = useReducer((x) => x + 1, 0); + + const settings = getSettings(path); + + const setSettingsAndUpdate = (newSettings: LocalItemSettings) => { + setSettings(path, newSettings); + forceUpdate(); + }; + + const toggleCollapsed = () => { + setSettingsAndUpdate({ ...settings, collapsed: !settings.collapsed }); + }; + + const isTopLevel = path.length === 0; + const name = isTopLevel ? "Result" : path[path.length - 1]; + + return ( +
+
+ + + {name}: + + + {settings.collapsed ? ( + + ... + + ) : renderSettingsMenu ? ( + renderSettingsMenu({ onChange: forceUpdate }) + ) : null} +
+ {settings.collapsed ? null : ( +
+ {path.length ? ( +
+ ) : null} +
{children(getMergedSettings(path))}
+
+ )} +
+ ); +}; diff --git a/packages/components/src/components/SquiggleViewer/ViewerContext.ts b/packages/components/src/components/SquiggleViewer/ViewerContext.ts new file mode 100644 index 00000000..0769f3b1 --- /dev/null +++ b/packages/components/src/components/SquiggleViewer/ViewerContext.ts @@ -0,0 +1,35 @@ +import { defaultEnvironment } from "@quri/squiggle-lang"; +import React from "react"; +import { LocalItemSettings, MergedItemSettings, Path } from "./utils"; + +type ViewerContextShape = { + // Note that we don't store settings themselves in the context (that would cause rerenders of the entire tree on each settings update). + // Instead, we keep settings in local state and notify the global context via setSettings to pass them down the component tree again if it got rebuilt from scratch. + // See ./SquiggleViewer.tsx and ./VariableBox.tsx for other implementation details on this. + getSettings(path: Path): LocalItemSettings; + getMergedSettings(path: Path): MergedItemSettings; + setSettings(path: Path, value: LocalItemSettings): void; + enableLocalSettings: boolean; // show local settings icon in the UI +}; + +export const ViewerContext = React.createContext({ + getSettings: () => ({ collapsed: false }), + getMergedSettings: () => ({ + collapsed: false, + // copy-pasted from SquiggleChart + chartSettings: { + start: 0, + stop: 10, + count: 100, + }, + distributionPlotSettings: { + showSummary: false, + logX: false, + expY: false, + }, + environment: defaultEnvironment, + height: 150, + }), + setSettings() {}, + enableLocalSettings: false, +}); diff --git a/packages/components/src/components/SquiggleViewer/index.tsx b/packages/components/src/components/SquiggleViewer/index.tsx new file mode 100644 index 00000000..6feb3cad --- /dev/null +++ b/packages/components/src/components/SquiggleViewer/index.tsx @@ -0,0 +1,100 @@ +import React, { useCallback, useRef } from "react"; +import { environment } from "@quri/squiggle-lang"; +import { DistributionPlottingSettings } from "../DistributionChart"; +import { FunctionChartSettings } from "../FunctionChart"; +import { ExpressionViewer } from "./ExpressionViewer"; +import { ViewerContext } from "./ViewerContext"; +import { + LocalItemSettings, + MergedItemSettings, + Path, + pathAsString, +} from "./utils"; +import { useSquiggle } from "../../lib/hooks"; +import { SquiggleErrorAlert } from "../SquiggleErrorAlert"; + +type Props = { + /** The output of squiggle's run */ + result: ReturnType; + width?: number; + height: number; + distributionPlotSettings: DistributionPlottingSettings; + /** Settings for displaying functions */ + chartSettings: FunctionChartSettings; + /** Environment for further function executions */ + environment: environment; + enableLocalSettings?: boolean; +}; + +type Settings = { + [k: string]: LocalItemSettings; +}; + +const defaultSettings: LocalItemSettings = { collapsed: false }; + +export const SquiggleViewer: React.FC = ({ + result, + width, + height, + distributionPlotSettings, + chartSettings, + environment, + enableLocalSettings = false, +}) => { + // can't store settings in the state because we don't want to rerender the entire tree on every change + const settingsRef = useRef({}); + + const getSettings = useCallback( + (path: Path) => { + return settingsRef.current[pathAsString(path)] || defaultSettings; + }, + [settingsRef] + ); + + const setSettings = useCallback( + (path: Path, value: LocalItemSettings) => { + settingsRef.current[pathAsString(path)] = value; + }, + [settingsRef] + ); + + const getMergedSettings = useCallback( + (path: Path) => { + const localSettings = getSettings(path); + const result: MergedItemSettings = { + distributionPlotSettings: { + ...distributionPlotSettings, + ...(localSettings.distributionPlotSettings || {}), + }, + chartSettings: { + ...chartSettings, + ...(localSettings.chartSettings || {}), + }, + environment: { + ...environment, + ...(localSettings.environment || {}), + }, + height: localSettings.height || height, + }; + return result; + }, + [distributionPlotSettings, chartSettings, environment, height, getSettings] + ); + + return ( + + {result.tag === "Ok" ? ( + + ) : ( + + )} + + ); +}; diff --git a/packages/components/src/components/SquiggleViewer/utils.ts b/packages/components/src/components/SquiggleViewer/utils.ts new file mode 100644 index 00000000..3053966b --- /dev/null +++ b/packages/components/src/components/SquiggleViewer/utils.ts @@ -0,0 +1,22 @@ +import { DistributionPlottingSettings } from "../DistributionChart"; +import { FunctionChartSettings } from "../FunctionChart"; +import { environment } from "@quri/squiggle-lang"; + +export type LocalItemSettings = { + collapsed: boolean; + distributionPlotSettings?: Partial; + chartSettings?: Partial; + height?: number; + environment?: Partial; +}; + +export type MergedItemSettings = { + distributionPlotSettings: DistributionPlottingSettings; + chartSettings: FunctionChartSettings; + height: number; + environment: environment; +}; + +export type Path = string[]; + +export const pathAsString = (path: Path) => path.join("."); diff --git a/packages/components/src/components/ViewSettings.tsx b/packages/components/src/components/ViewSettings.tsx new file mode 100644 index 00000000..9a2ce562 --- /dev/null +++ b/packages/components/src/components/ViewSettings.tsx @@ -0,0 +1,163 @@ +import React from "react"; +import * as yup from "yup"; +import { UseFormRegister } from "react-hook-form"; +import { InputItem } from "./ui/InputItem"; +import { Checkbox } from "./ui/Checkbox"; +import { HeadedSection } from "./ui/HeadedSection"; +import { Text } from "./ui/Text"; +import { + defaultColor, + defaultTickFormat, +} from "../lib/distributionSpecBuilder"; + +export const viewSettingsSchema = yup.object({}).shape({ + chartHeight: yup.number().required().positive().integer().default(350), + showSummary: yup.boolean().required(), + showEditor: yup.boolean().required(), + logX: yup.boolean().required(), + expY: yup.boolean().required(), + tickFormat: yup.string().default(defaultTickFormat), + title: yup.string(), + color: yup.string().default(defaultColor).required(), + minX: yup.number(), + maxX: yup.number(), + distributionChartActions: yup.boolean(), + diagramStart: yup.number().required().positive().integer().default(0).min(0), + diagramStop: yup.number().required().positive().integer().default(10).min(0), + diagramCount: yup.number().required().positive().integer().default(20).min(2), +}); + +type FormFields = yup.InferType; + +// This component is used in two places: for global settings in SquigglePlayground, and for item-specific settings in modal dialogs. +export const ViewSettings: React.FC<{ + withShowEditorSetting?: boolean; + withFunctionSettings?: boolean; + disableLogXSetting?: boolean; + register: UseFormRegister; +}> = ({ + withShowEditorSetting = true, + withFunctionSettings = true, + disableLogXSetting, + register, +}) => { + return ( +
+ +
+ {withShowEditorSetting ? ( + + ) : null} + +
+
+ +
+ +
+ + + + + + + + + +
+
+
+ + {withFunctionSettings ? ( +
+ +
+ + When displaying functions of single variables that return + numbers or distributions, we need to use defaults for the + x-axis. We need to select a minimum and maximum value of x to + sample, and a number n of the number of points to sample. + +
+ + + +
+
+
+
+ ) : null} +
+ ); +}; diff --git a/packages/components/src/components/ui/Button.tsx b/packages/components/src/components/ui/Button.tsx new file mode 100644 index 00000000..008b2084 --- /dev/null +++ b/packages/components/src/components/ui/Button.tsx @@ -0,0 +1,22 @@ +import clsx from "clsx"; +import React from "react"; + +type Props = { + onClick: () => void; + children: React.ReactNode; + wide?: boolean; // stretch the button horizontally +}; + +export const Button: React.FC = ({ onClick, wide, children }) => { + return ( + + ); +}; diff --git a/packages/components/src/components/ui/Checkbox.tsx b/packages/components/src/components/ui/Checkbox.tsx new file mode 100644 index 00000000..36ab68d9 --- /dev/null +++ b/packages/components/src/components/ui/Checkbox.tsx @@ -0,0 +1,37 @@ +import clsx from "clsx"; +import React from "react"; +import { Path, UseFormRegister } from "react-hook-form"; + +export function Checkbox({ + name, + label, + register, + disabled, + tooltip, +}: { + name: Path; + label: string; + register: UseFormRegister; + disabled?: boolean; + tooltip?: string; +}) { + return ( + + ); +} diff --git a/packages/components/src/components/ui/HeadedSection.tsx b/packages/components/src/components/ui/HeadedSection.tsx new file mode 100644 index 00000000..e4389814 --- /dev/null +++ b/packages/components/src/components/ui/HeadedSection.tsx @@ -0,0 +1,13 @@ +import React from "react"; + +export const HeadedSection: React.FC<{ + title: string; + children: React.ReactNode; +}> = ({ title, children }) => ( +
+
+ {title} +
+
{children}
+
+); diff --git a/packages/components/src/components/ui/InputItem.tsx b/packages/components/src/components/ui/InputItem.tsx new file mode 100644 index 00000000..5d0ca613 --- /dev/null +++ b/packages/components/src/components/ui/InputItem.tsx @@ -0,0 +1,25 @@ +import React from "react"; +import { Path, UseFormRegister } from "react-hook-form"; + +export function InputItem({ + name, + label, + type, + register, +}: { + name: Path; + label: string; + type: "number" | "text" | "color"; + register: UseFormRegister; +}) { + return ( + + ); +} diff --git a/packages/components/src/components/ui/Modal.tsx b/packages/components/src/components/ui/Modal.tsx new file mode 100644 index 00000000..e18631cb --- /dev/null +++ b/packages/components/src/components/ui/Modal.tsx @@ -0,0 +1,184 @@ +import { motion } from "framer-motion"; +import React, { useContext } from "react"; +import * as ReactDOM from "react-dom"; +import { XIcon } from "@heroicons/react/solid"; +import clsx from "clsx"; +import { useWindowScroll, useWindowSize } from "react-use"; + +type ModalContextShape = { + close: () => void; +}; +const ModalContext = React.createContext({ + close: () => undefined, +}); + +const Overlay: React.FC = () => { + const { close } = useContext(ModalContext); + return ( + + ); +}; + +const ModalHeader: React.FC<{ + children: React.ReactNode; +}> = ({ children }) => { + const { close } = useContext(ModalContext); + return ( +
+
{children}
+ +
+ ); +}; + +// TODO - get rid of forwardRef, support `focus` and `{...hotkeys}` via smart props +const ModalBody = React.forwardRef< + HTMLDivElement, + JSX.IntrinsicElements["div"] +>(function ModalBody(props, ref) { + return
; +}); + +const ModalFooter: React.FC<{ children: React.ReactNode }> = ({ children }) => ( +
{children}
+); + +const ModalWindow: React.FC<{ + children: React.ReactNode; + container?: HTMLElement; +}> = ({ children, container }) => { + // This component works in two possible modes: + // 1. container mode - the modal is rendered inside a container element + // 2. centered mode - the modal is rendered in the middle of the screen + // The mode is determined by the presence of the `container` prop and by whether the available space is large enough to fit the modal. + + // Necessary for container mode - need to reposition the modal on scroll and resize events. + useWindowSize(); + useWindowScroll(); + + let position: + | { + left: number; + top: number; + maxWidth: number; + maxHeight: number; + transform: string; + } + | undefined; + + // If available space in `visibleRect` is smaller than these, fallback to positioning in the middle of the screen. + const minWidth = 384; + const minHeight = 300; + const offset = 8; + const naturalWidth = 576; // maximum possible width; modal tries to take this much space, but can be smaller + + if (container) { + const { clientWidth: screenWidth, clientHeight: screenHeight } = + document.documentElement; + const rect = container?.getBoundingClientRect(); + + const visibleRect = { + left: Math.max(rect.left, 0), + right: Math.min(rect.right, screenWidth), + top: Math.max(rect.top, 0), + bottom: Math.min(rect.bottom, screenHeight), + }; + const maxWidth = visibleRect.right - visibleRect.left - 2 * offset; + const maxHeight = visibleRect.bottom - visibleRect.top - 2 * offset; + + const center = { + left: visibleRect.left + (visibleRect.right - visibleRect.left) / 2, + top: visibleRect.top + (visibleRect.bottom - visibleRect.top) / 2, + }; + position = { + left: center.left, + top: center.top, + transform: "translate(-50%, -50%)", + maxWidth, + maxHeight, + }; + if (maxWidth < minWidth || maxHeight < minHeight) { + position = undefined; // modal is hard to fit in the container, fallback to positioning it in the middle of the screen + } + } + return ( +
+ {children} +
+ ); +}; + +type ModalType = React.FC<{ + children: React.ReactNode; + container?: HTMLElement; // if specified, modal will be positioned over the visible part of the container, if it's not too small + close: () => void; +}> & { + Body: typeof ModalBody; + Footer: typeof ModalFooter; + Header: typeof ModalHeader; +}; + +export const Modal: ModalType = ({ children, container, close }) => { + const [el] = React.useState(() => document.createElement("div")); + + React.useEffect(() => { + document.body.appendChild(el); + return () => { + document.body.removeChild(el); + }; + }, [el]); + + React.useEffect(() => { + const handleEscape = (e: KeyboardEvent) => { + if (e.key === "Escape") { + close(); + } + }; + document.addEventListener("keydown", handleEscape); + + return () => { + document.removeEventListener("keydown", handleEscape); + }; + }, [close]); + + const modal = ( + +
+
+ + {children} +
+
+
+ ); + + return ReactDOM.createPortal(modal, container || el); +}; + +Modal.Body = ModalBody; +Modal.Footer = ModalFooter; +Modal.Header = ModalHeader; diff --git a/packages/components/src/components/ui/StyledTab.tsx b/packages/components/src/components/ui/StyledTab.tsx new file mode 100644 index 00000000..66e11869 --- /dev/null +++ b/packages/components/src/components/ui/StyledTab.tsx @@ -0,0 +1,60 @@ +import React, { Fragment } from "react"; +import { Tab } from "@headlessui/react"; +import clsx from "clsx"; + +type StyledTabProps = { + name: string; + icon: (props: React.ComponentProps<"svg">) => JSX.Element; +}; + +type StyledTabType = React.FC & { + List: React.FC<{ children: React.ReactNode }>; + Group: typeof Tab.Group; + Panels: typeof Tab.Panels; + Panel: typeof Tab.Panel; +}; + +export const StyledTab: StyledTabType = ({ name, icon: Icon }) => { + return ( + + {({ selected }) => ( + + )} + + ); +}; + +StyledTab.List = ({ children }) => ( + + {children} + +); + +StyledTab.Group = Tab.Group; +StyledTab.Panels = Tab.Panels; +StyledTab.Panel = Tab.Panel; diff --git a/packages/components/src/components/ui/Text.tsx b/packages/components/src/components/ui/Text.tsx new file mode 100644 index 00000000..edf9471f --- /dev/null +++ b/packages/components/src/components/ui/Text.tsx @@ -0,0 +1,5 @@ +import React from "react"; + +export const Text: React.FC<{ children: React.ReactNode }> = ({ children }) => ( +

{children}

+); diff --git a/packages/components/src/components/ui/Toggle.tsx b/packages/components/src/components/ui/Toggle.tsx new file mode 100644 index 00000000..bbf9a5ee --- /dev/null +++ b/packages/components/src/components/ui/Toggle.tsx @@ -0,0 +1,47 @@ +import { RefreshIcon } from "@heroicons/react/solid"; +import clsx from "clsx"; +import React from "react"; + +type IconType = (props: React.ComponentProps<"svg">) => JSX.Element; + +type Props = { + status: boolean; + onChange: (status: boolean) => void; + texts: [string, string]; + icons: [IconType, IconType]; + spinIcon?: boolean; +}; + +export const Toggle: React.FC = ({ + status, + onChange, + texts: [onText, offText], + icons: [OnIcon, OffIcon], + spinIcon, +}) => { + const CurrentIcon = status ? OnIcon : OffIcon; + return ( + + ); +}; diff --git a/packages/components/src/components/ui/Tooltip.tsx b/packages/components/src/components/ui/Tooltip.tsx new file mode 100644 index 00000000..4eefa448 --- /dev/null +++ b/packages/components/src/components/ui/Tooltip.tsx @@ -0,0 +1,64 @@ +import React, { cloneElement, useState } from "react"; +import { AnimatePresence, motion } from "framer-motion"; +import { + flip, + shift, + useDismiss, + useFloating, + useHover, + useInteractions, + useRole, +} from "@floating-ui/react-dom-interactions"; + +interface Props { + text: string; + children: JSX.Element; +} + +export const Tooltip: React.FC = ({ text, children }) => { + const [isOpen, setIsOpen] = useState(false); + + const { x, y, reference, floating, strategy, context } = useFloating({ + placement: "top", + open: isOpen, + onOpenChange: setIsOpen, + middleware: [shift(), flip()], + }); + + const { getReferenceProps, getFloatingProps } = useInteractions([ + useHover(context), + useRole(context, { role: "tooltip" }), + useDismiss(context), + ]); + + return ( + <> + {cloneElement( + children, + getReferenceProps({ ref: reference, ...children.props }) + )} + + {isOpen && ( + +
{text}
+
+ )} +
+ + ); +}; diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index 7a7751a2..f51ab57a 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -1,14 +1,7 @@ export { SquiggleChart } from "./components/SquiggleChart"; -export { - SquiggleEditor, - SquigglePartial, - renderSquiggleEditorToDom, - renderSquigglePartialToDom, -} from "./components/SquiggleEditor"; -export { - default as SquigglePlayground, - renderSquigglePlaygroundToDom, -} from "./components/SquigglePlayground"; +export { SquiggleEditor, SquigglePartial } from "./components/SquiggleEditor"; +export { SquigglePlayground } from "./components/SquigglePlayground"; export { SquiggleContainer } from "./components/SquiggleContainer"; +export { SquiggleEditorWithImportedBindings } from "./components/SquiggleEditorWithImportedBindings"; export { mergeBindings } from "@quri/squiggle-lang"; diff --git a/packages/components/src/lib/distributionSpecBuilder.ts b/packages/components/src/lib/distributionSpecBuilder.ts new file mode 100644 index 00000000..4dc87baa --- /dev/null +++ b/packages/components/src/lib/distributionSpecBuilder.ts @@ -0,0 +1,259 @@ +import { VisualizationSpec } from "react-vega"; +import type { LogScale, LinearScale, PowScale } from "vega"; + +export type DistributionChartSpecOptions = { + /** Set the x scale to be logarithmic by deault */ + logX: boolean; + /** Set the y scale to be exponential by deault */ + expY: boolean; + /** The minimum x coordinate shown on the chart */ + minX?: number; + /** The maximum x coordinate shown on the chart */ + maxX?: number; + /** The color of the chart */ + color?: string; + /** The title of the chart */ + title?: string; + /** The formatting of the ticks */ + format?: string; +}; + +export let linearXScale: LinearScale = { + name: "xscale", + clamp: true, + type: "linear", + range: "width", + zero: false, + nice: false, + domain: { + fields: [ + { + data: "con", + field: "x", + }, + { + data: "dis", + field: "x", + }, + ], + }, +}; +export let linearYScale: LinearScale = { + name: "yscale", + type: "linear", + range: "height", + zero: true, + domain: { + fields: [ + { + data: "con", + field: "y", + }, + { + data: "dis", + field: "y", + }, + ], + }, +}; + +export let logXScale: LogScale = { + name: "xscale", + type: "log", + range: "width", + zero: false, + base: 10, + nice: false, + clamp: true, + domain: { + fields: [ + { + data: "con", + field: "x", + }, + { + data: "dis", + field: "x", + }, + ], + }, +}; + +export let expYScale: PowScale = { + name: "yscale", + type: "pow", + exponent: 0.1, + range: "height", + zero: true, + nice: false, + domain: { + fields: [ + { + data: "con", + field: "y", + }, + { + data: "dis", + field: "y", + }, + ], + }, +}; + +export const defaultTickFormat = ".9~s"; +export const defaultColor = "#739ECC"; + +export function buildVegaSpec( + specOptions: DistributionChartSpecOptions +): VisualizationSpec { + let { + format = defaultTickFormat, + color = defaultColor, + title, + minX, + maxX, + logX, + expY, + } = specOptions; + + let xScale = logX ? logXScale : linearXScale; + if (minX !== undefined && Number.isFinite(minX)) { + xScale = { ...xScale, domainMin: minX }; + } + + if (maxX !== undefined && Number.isFinite(maxX)) { + xScale = { ...xScale, domainMax: maxX }; + } + + let spec: VisualizationSpec = { + $schema: "https://vega.github.io/schema/vega/v5.json", + description: "A basic area chart example", + width: 500, + height: 100, + padding: 5, + data: [ + { + name: "con", + }, + { + name: "dis", + }, + ], + signals: [], + scales: [xScale, expY ? expYScale : linearYScale], + axes: [ + { + orient: "bottom", + scale: "xscale", + labelColor: "#727d93", + tickColor: "#fff", + tickOpacity: 0.0, + domainColor: "#fff", + domainOpacity: 0.0, + format: format, + tickCount: 10, + }, + ], + marks: [ + { + type: "area", + from: { + data: "con", + }, + encode: { + update: { + interpolate: { value: "linear" }, + x: { + scale: "xscale", + field: "x", + }, + y: { + scale: "yscale", + field: "y", + }, + y2: { + scale: "yscale", + value: 0, + }, + fill: { + value: color, + }, + fillOpacity: { + value: 1, + }, + }, + }, + }, + { + type: "rect", + from: { + data: "dis", + }, + encode: { + enter: { + width: { + value: 1, + }, + }, + update: { + x: { + scale: "xscale", + field: "x", + }, + y: { + scale: "yscale", + field: "y", + }, + y2: { + scale: "yscale", + value: 0, + }, + fill: { + value: "#2f65a7", + }, + }, + }, + }, + { + type: "symbol", + from: { + data: "dis", + }, + encode: { + enter: { + shape: { + value: "circle", + }, + size: [{ value: 100 }], + tooltip: { + signal: "{ probability: datum.y, value: datum.x }", + }, + }, + update: { + x: { + scale: "xscale", + field: "x", + }, + y: { + scale: "yscale", + field: "y", + }, + fill: { + value: "#1e4577", + }, + }, + }, + }, + ], + }; + if (title) { + spec = { + ...spec, + title: { + text: title, + }, + }; + } + + return spec; +} diff --git a/packages/components/src/lib/distributionUtils.ts b/packages/components/src/lib/distributionUtils.ts new file mode 100644 index 00000000..086aac42 --- /dev/null +++ b/packages/components/src/lib/distributionUtils.ts @@ -0,0 +1,5 @@ +import { shape } from "@quri/squiggle-lang"; + +export const hasMassBelowZero = (shape: shape) => + shape.continuous.some((x) => x.x <= 0) || + shape.discrete.some((x) => x.x <= 0); diff --git a/packages/components/src/lib/hooks/index.ts b/packages/components/src/lib/hooks/index.ts new file mode 100644 index 00000000..01fb46f9 --- /dev/null +++ b/packages/components/src/lib/hooks/index.ts @@ -0,0 +1,3 @@ +export { useMaybeControlledValue } from "./useMaybeControlledValue"; +export { useSquiggle, useSquigglePartial } from "./useSquiggle"; +export { useRunnerState } from "./useRunnerState"; diff --git a/packages/components/src/lib/hooks/useMaybeControlledValue.ts b/packages/components/src/lib/hooks/useMaybeControlledValue.ts new file mode 100644 index 00000000..aa7abc50 --- /dev/null +++ b/packages/components/src/lib/hooks/useMaybeControlledValue.ts @@ -0,0 +1,22 @@ +import { useState } from "react"; + +type ControlledValueArgs = { + value?: T; + defaultValue: T; + onChange?: (x: T) => void; +}; + +export function useMaybeControlledValue( + args: ControlledValueArgs +): [T, (x: T) => void] { + let [uncontrolledValue, setUncontrolledValue] = useState(args.defaultValue); + let value = args.value ?? uncontrolledValue; + let onChange = (newValue: T) => { + if (args.value === undefined) { + // uncontrolled mode + setUncontrolledValue(newValue); + } + args.onChange?.(newValue); + }; + return [value, onChange]; +} diff --git a/packages/components/src/lib/hooks/useRunnerState.ts b/packages/components/src/lib/hooks/useRunnerState.ts new file mode 100644 index 00000000..ff148d69 --- /dev/null +++ b/packages/components/src/lib/hooks/useRunnerState.ts @@ -0,0 +1,100 @@ +import { useLayoutEffect, useReducer } from "react"; + +type State = { + autorunMode: boolean; + renderedCode: string; + // "prepared" is for rendering a spinner; "run" for executing squiggle code; then it gets back to "none" on the next render + runningState: "none" | "prepared" | "run"; + executionId: number; +}; + +const buildInitialState = (code: string): State => ({ + autorunMode: true, + renderedCode: "", + runningState: "none", + executionId: 1, +}); + +type Action = + | { + type: "SET_AUTORUN_MODE"; + value: boolean; + code: string; + } + | { + type: "PREPARE_RUN"; + } + | { + type: "RUN"; + code: string; + } + | { + type: "STOP_RUN"; + }; + +const reducer = (state: State, action: Action): State => { + switch (action.type) { + case "SET_AUTORUN_MODE": + return { + ...state, + autorunMode: action.value, + }; + case "PREPARE_RUN": + return { + ...state, + runningState: "prepared", + }; + case "RUN": + return { + ...state, + runningState: "run", + renderedCode: action.code, + executionId: state.executionId + 1, + }; + case "STOP_RUN": + return { + ...state, + runningState: "none", + }; + } +}; + +export const useRunnerState = (code: string) => { + const [state, dispatch] = useReducer(reducer, buildInitialState(code)); + + useLayoutEffect(() => { + if (state.runningState === "prepared") { + // this is necessary for async playground loading - otherwise it executes the code synchronously on the initial load + // (it's surprising that this is necessary, but empirically it _is_ necessary, both with `useEffect` and `useLayoutEffect`) + setTimeout(() => { + dispatch({ type: "RUN", code }); + }, 0); + } else if (state.runningState === "run") { + dispatch({ type: "STOP_RUN" }); + } + }, [state.runningState, code]); + + const run = () => { + // The rest will be handled by dispatches above on following renders, but we need to update the spinner first. + dispatch({ type: "PREPARE_RUN" }); + }; + + if ( + state.autorunMode && + state.renderedCode !== code && + state.runningState === "none" + ) { + run(); + } + + return { + run, + autorunMode: state.autorunMode, + renderedCode: state.renderedCode, + isRunning: state.runningState !== "none", + executionId: state.executionId, + setAutorunMode: (newValue: boolean) => { + dispatch({ type: "SET_AUTORUN_MODE", value: newValue, code }); + }, + }; +}; diff --git a/packages/components/src/lib/hooks/useSquiggle.ts b/packages/components/src/lib/hooks/useSquiggle.ts new file mode 100644 index 00000000..4165a7be --- /dev/null +++ b/packages/components/src/lib/hooks/useSquiggle.ts @@ -0,0 +1,53 @@ +import { + bindings, + environment, + jsImports, + run, + runPartial, +} from "@quri/squiggle-lang"; +import { useEffect, useMemo } from "react"; + +type SquiggleArgs> = { + code: string; + executionId?: number; + bindings?: bindings; + jsImports?: jsImports; + environment?: environment; + onChange?: (expr: Extract["value"] | undefined) => void; +}; + +const useSquiggleAny = >( + args: SquiggleArgs, + f: (...args: Parameters) => T +) => { + const result: T = useMemo( + () => f(args.code, args.bindings, args.environment, args.jsImports), + // eslint-disable-next-line react-hooks/exhaustive-deps + [ + f, + args.code, + args.bindings, + args.environment, + args.jsImports, + args.executionId, + ] + ); + + const { onChange } = args; + + useEffect(() => { + onChange?.(result.tag === "Ok" ? result.value : undefined); + }, [result, onChange]); + + return result; +}; + +export const useSquigglePartial = ( + args: SquiggleArgs> +) => { + return useSquiggleAny(args, runPartial); +}; + +export const useSquiggle = (args: SquiggleArgs>) => { + return useSquiggleAny(args, run); +}; diff --git a/packages/components/src/stories/SquiggleChart.stories.mdx b/packages/components/src/stories/SquiggleChart.stories.mdx index bce22c1c..bc289c36 100644 --- a/packages/components/src/stories/SquiggleChart.stories.mdx +++ b/packages/components/src/stories/SquiggleChart.stories.mdx @@ -3,7 +3,7 @@ import { Canvas, Meta, Story, Props } from "@storybook/addon-docs"; -export const Template = SquiggleChart; +export const Template = (props) => ; /* We have to hardcode a width here, because otherwise some interaction with Storybook creates an infinite loop with the internal width @@ -29,7 +29,7 @@ could be continuous, discrete or mixed. @@ -43,7 +43,7 @@ could be continuous, discrete or mixed. @@ -57,7 +57,7 @@ could be continuous, discrete or mixed. @@ -71,7 +71,7 @@ could be continuous, discrete or mixed. @@ -85,8 +85,7 @@ could be continuous, discrete or mixed. @@ -103,7 +102,7 @@ to allow large and small numbers being printed cleanly. @@ -117,7 +116,7 @@ to allow large and small numbers being printed cleanly. @@ -131,7 +130,7 @@ to allow large and small numbers being printed cleanly. @@ -145,7 +144,7 @@ to allow large and small numbers being printed cleanly. @@ -159,7 +158,7 @@ to allow large and small numbers being printed cleanly. @@ -173,7 +172,7 @@ to allow large and small numbers being printed cleanly. @@ -187,7 +186,7 @@ to allow large and small numbers being printed cleanly. @@ -201,7 +200,7 @@ to allow large and small numbers being printed cleanly. diff --git a/packages/components/src/stories/SquiggleEditor.stories.mdx b/packages/components/src/stories/SquiggleEditor.stories.mdx index 3ae37bb3..086614c6 100644 --- a/packages/components/src/stories/SquiggleEditor.stories.mdx +++ b/packages/components/src/stories/SquiggleEditor.stories.mdx @@ -14,7 +14,20 @@ the distribution. + {Template.bind({})} + + + +It's also possible to create a controlled version of the same component + + + {Template.bind({})} @@ -27,7 +40,7 @@ You can also name variables like so: {Template.bind({})} diff --git a/packages/components/src/stories/SquigglePartial.stories.mdx b/packages/components/src/stories/SquigglePartial.stories.mdx index b4446402..3305586b 100644 --- a/packages/components/src/stories/SquigglePartial.stories.mdx +++ b/packages/components/src/stories/SquigglePartial.stories.mdx @@ -15,7 +15,7 @@ instead returns bindings that can be used by further Squiggle Editors. {Template.bind({})} @@ -36,12 +36,12 @@ instead returns bindings that can be used by further Squiggle Editors. <> diff --git a/packages/components/src/stories/SquigglePlayground.stories.mdx b/packages/components/src/stories/SquigglePlayground.stories.mdx index 5e869633..c9c7c3eb 100644 --- a/packages/components/src/stories/SquigglePlayground.stories.mdx +++ b/packages/components/src/stories/SquigglePlayground.stories.mdx @@ -1,4 +1,4 @@ -import SquigglePlayground from "../components/SquigglePlayground"; +import { SquigglePlayground } from "../components/SquigglePlayground"; import { Canvas, Meta, Story, Props } from "@storybook/addon-docs"; @@ -14,10 +14,23 @@ including sampling settings, in squiggle. {Template.bind({})} + + + + {Template.bind({})} + + diff --git a/packages/components/src/styles/base.css b/packages/components/src/styles/base.css index e0a33a56..a5922d5e 100644 --- a/packages/components/src/styles/base.css +++ b/packages/components/src/styles/base.css @@ -1,5 +1,5 @@ .squiggle { -/* + /* This file contains: 1) Base Tailwind preflight styles 2) Base https://github.com/tailwindlabs/tailwindcss-forms styles @@ -7,365 +7,390 @@ This file contains: (Both are wrapped in .squiggle) */ -/* + /* 1. Use a consistent sensible line-height in all browsers. 2. Prevent adjustments of font size after orientation changes in iOS. 3. Use a more readable tab size. 4. Use the user's configured `sans` font-family by default. */ -/* html { */ + /* html { */ line-height: 1.5; /* 1 */ -webkit-text-size-adjust: 100%; /* 2 */ -moz-tab-size: 4; /* 3 */ tab-size: 4; /* 3 */ - font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */ -/* } */ + font-family: theme( + "fontFamily.sans", + ui-sans-serif, + system-ui, + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + Roboto, + "Helvetica Neue", + Arial, + "Noto Sans", + sans-serif, + "Apple Color Emoji", + "Segoe UI Emoji", + "Segoe UI Symbol", + "Noto Color Emoji" + ); /* 4 */ + /* } */ -/* + /* 1. Remove the margin in all browsers. 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. */ -/* body { */ + /* body { */ margin: 0; /* 1 */ line-height: inherit; /* 2 */ -/* } */ + /* } */ - -/* + /* 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) */ -*, -::before, -::after { - box-sizing: border-box; /* 1 */ - border-width: 0; /* 2 */ - border-style: solid; /* 2 */ - border-color: theme('borderColor.DEFAULT', currentColor); /* 2 */ -} + *, + ::before, + ::after { + box-sizing: border-box; /* 1 */ + border-width: 0; /* 2 */ + border-style: solid; /* 2 */ + border-color: theme("borderColor.DEFAULT", currentColor); /* 2 */ + } -::before, -::after { - --tw-content: ''; -} + ::before, + ::after { + --tw-content: ""; + } -/* + /* 1. Add the correct height in Firefox. 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) 3. Ensure horizontal rules are visible by default. */ -hr { - height: 0; /* 1 */ - color: inherit; /* 2 */ - border-top-width: 1px; /* 3 */ -} + hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ + } -/* + /* Add the correct text decoration in Chrome, Edge, and Safari. */ -abbr:where([title]) { - text-decoration: underline dotted; -} + abbr:where([title]) { + text-decoration: underline dotted; + } -/* + /* Remove the default font size and weight for headings. */ -h1, -h2, -h3, -h4, -h5, -h6 { - font-size: inherit; - font-weight: inherit; -} + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } -/* + /* Reset links to optimize for opt-in styling instead of opt-out. */ -a { - color: inherit; - text-decoration: inherit; -} + a { + color: inherit; + text-decoration: inherit; + } -/* + /* Add the correct font weight in Edge and Safari. */ -b, -strong { - font-weight: bolder; -} + b, + strong { + font-weight: bolder; + } -/* + /* 1. Use the user's configured `mono` font family by default. 2. Correct the odd `em` font sizing in all browsers. */ -code, -kbd, -samp, -pre { - font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */ - font-size: 1em; /* 2 */ -} + code, + kbd, + samp, + pre { + font-family: theme( + "fontFamily.mono", + ui-monospace, + SFMono-Regular, + Menlo, + Monaco, + Consolas, + "Liberation Mono", + "Courier New", + monospace + ); /* 1 */ + font-size: 1em; /* 2 */ + } -/* + /* Add the correct font size in all browsers. */ -small { - font-size: 80%; -} + small { + font-size: 80%; + } -/* + /* Prevent `sub` and `sup` elements from affecting the line height in all browsers. */ -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } -sub { - bottom: -0.25em; -} + sub { + bottom: -0.25em; + } -sup { - top: -0.5em; -} + sup { + top: -0.5em; + } -/* + /* 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) 3. Remove gaps between table borders by default. */ -table { - text-indent: 0; /* 1 */ - border-color: inherit; /* 2 */ - border-collapse: collapse; /* 3 */ -} + table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ + } -/* + /* 1. Change the font styles in all browsers. 2. Remove the margin in Firefox and Safari. 3. Remove default padding in all browsers. */ -button, -input, -optgroup, -select, -textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 1 */ - font-weight: inherit; /* 1 */ - line-height: inherit; /* 1 */ - color: inherit; /* 1 */ - margin: 0; /* 2 */ - padding: 0; /* 3 */ -} + button, + input, + optgroup, + select, + textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + font-weight: inherit; /* 1 */ + line-height: inherit; /* 1 */ + color: inherit; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 3 */ + } -/* + /* Remove the inheritance of text transform in Edge and Firefox. */ -button, -select { - text-transform: none; -} + button, + select { + text-transform: none; + } -/* + /* 1. Correct the inability to style clickable types in iOS and Safari. 2. Remove default button styles. */ -button, -[type='button'], -[type='reset'], -[type='submit'] { - -webkit-appearance: button; /* 1 */ - background-color: transparent; /* 2 */ - background-image: none; /* 2 */ -} + button, + [type="button"], + [type="reset"], + [type="submit"] { + -webkit-appearance: button; /* 1 */ + background-color: transparent; /* 2 */ + background-image: none; /* 2 */ + } -/* + /* Use the modern Firefox focus style for all focusable elements. */ -:-moz-focusring { - outline: auto; -} + :-moz-focusring { + outline: auto; + } -/* + /* Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) */ -:-moz-ui-invalid { - box-shadow: none; -} + :-moz-ui-invalid { + box-shadow: none; + } -/* + /* Add the correct vertical alignment in Chrome and Firefox. */ -progress { - vertical-align: baseline; -} + progress { + vertical-align: baseline; + } -/* + /* Correct the cursor style of increment and decrement buttons in Safari. */ -::-webkit-inner-spin-button, -::-webkit-outer-spin-button { - height: auto; -} + ::-webkit-inner-spin-button, + ::-webkit-outer-spin-button { + height: auto; + } -/* + /* 1. Correct the odd appearance in Chrome and Safari. 2. Correct the outline style in Safari. */ -[type='search'] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ -} + [type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ + } -/* + /* Remove the inner padding in Chrome and Safari on macOS. */ -::-webkit-search-decoration { - -webkit-appearance: none; -} + ::-webkit-search-decoration { + -webkit-appearance: none; + } -/* + /* 1. Correct the inability to style clickable types in iOS and Safari. 2. Change font properties to `inherit` in Safari. */ -::-webkit-file-upload-button { - -webkit-appearance: button; /* 1 */ - font: inherit; /* 2 */ -} + ::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ + } -/* + /* Add the correct display in Chrome and Safari. */ -summary { - display: list-item; -} + summary { + display: list-item; + } -/* + /* Removes the default spacing and border for appropriate elements. */ -blockquote, -dl, -dd, -h1, -h2, -h3, -h4, -h5, -h6, -hr, -figure, -p, -pre { - margin: 0; -} + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } -fieldset { - margin: 0; - padding: 0; -} + fieldset { + margin: 0; + padding: 0; + } -legend { - padding: 0; -} + legend { + padding: 0; + } -ol, -ul, -menu { - list-style: none; - margin: 0; - padding: 0; -} + ol, + ul, + menu { + list-style: none; + margin: 0; + padding: 0; + } -/* + /* Prevent resizing textareas horizontally by default. */ -textarea { - resize: vertical; -} + textarea { + resize: vertical; + } -/* + /* 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) 2. Set the default placeholder color to the user's configured gray 400 color. */ -input::placeholder, -textarea::placeholder { - opacity: 1; /* 1 */ - color: theme('colors.gray.400', #9ca3af); /* 2 */ -} + input::placeholder, + textarea::placeholder { + opacity: 1; /* 1 */ + color: theme("colors.gray.400", #9ca3af); /* 2 */ + } -/* + /* Set the default cursor for buttons. */ -button, -[role="button"] { - cursor: pointer; -} + button, + [role="button"] { + cursor: pointer; + } -/* + /* Make sure disabled buttons don't get the pointer cursor. */ -:disabled { - cursor: default; -} + :disabled { + cursor: default; + } -/* + /* 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) This can trigger a poorly considered lint error in some tools but is included by design. */ -img, -svg, -video, -canvas, -audio, -iframe, -embed, -object { - display: block; /* 1 */ - vertical-align: middle; /* 2 */ -} + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; /* 1 */ + vertical-align: middle; /* 2 */ + } -/* + /* Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) */ -img, -video { - max-width: 100%; - height: auto; -} + img, + video { + max-width: 100%; + height: auto; + } } diff --git a/packages/components/src/styles/forms.css b/packages/components/src/styles/forms.css index 60b4075d..0a54ab22 100644 --- a/packages/components/src/styles/forms.css +++ b/packages/components/src/styles/forms.css @@ -1,102 +1,130 @@ /* Fork of https://github.com/tailwindlabs/tailwindcss-forms styles, see the comment in main.css for details. */ .squiggle { -.form-input,.form-textarea,.form-select,.form-multiselect { -appearance: none; -background-color: #fff; -border-color: #6b7280; -border-width: 1px; -border-radius: 0px; -padding-top: 0.5rem; -padding-right: 0.75rem; -padding-bottom: 0.5rem; -padding-left: 0.75rem; -font-size: 1rem; -line-height: 1.5rem; ---tw-shadow: 0 0 #0000; -} -.form-input:focus, .form-textarea:focus, .form-select:focus, .form-multiselect:focus { -outline: 2px solid transparent; -outline-offset: 2px; ---tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); ---tw-ring-offset-width: 0px; ---tw-ring-offset-color: #fff; ---tw-ring-color: #2563eb; ---tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); ---tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); -box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); -border-color: #2563eb; -} -.form-input::placeholder,.form-textarea::placeholder { -color: #6b7280; -opacity: 1; -} -.form-input::-webkit-datetime-edit-fields-wrapper { -padding: 0; -} -.form-input::-webkit-date-and-time-value { -min-height: 1.5em; -} -.form-input::-webkit-datetime-edit,.form-input::-webkit-datetime-edit-year-field,.form-input::-webkit-datetime-edit-month-field,.form-input::-webkit-datetime-edit-day-field,.form-input::-webkit-datetime-edit-hour-field,.form-input::-webkit-datetime-edit-minute-field,.form-input::-webkit-datetime-edit-second-field,.form-input::-webkit-datetime-edit-millisecond-field,.form-input::-webkit-datetime-edit-meridiem-field { -padding-top: 0; -padding-bottom: 0; -} -.form-checkbox,.form-radio { -appearance: none; -padding: 0; --webkit-print-color-adjust: exact; - print-color-adjust: exact; -display: inline-block; -vertical-align: middle; -background-origin: border-box; --webkit-user-select: none; - user-select: none; -flex-shrink: 0; -height: 1rem; -width: 1rem; -color: #2563eb; -background-color: #fff; -border-color: #6b7280; -border-width: 1px; ---tw-shadow: 0 0 #0000; -} -.form-checkbox { -border-radius: 0px; -} -.form-checkbox:focus,.form-radio:focus { -outline: 2px solid transparent; -outline-offset: 2px; ---tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); ---tw-ring-offset-width: 2px; ---tw-ring-offset-color: #fff; ---tw-ring-color: #2563eb; ---tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); ---tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); -box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); -} -.form-checkbox:checked,.form-radio:checked { -border-color: transparent; -background-color: currentColor; -background-size: 100% 100%; -background-position: center; -background-repeat: no-repeat; -} -.form-checkbox:checked { -background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); -} -.form-checkbox:checked:hover,.form-checkbox:checked:focus,.form-radio:checked:hover,.form-radio:checked:focus { -border-color: transparent; -background-color: currentColor; -} -.form-checkbox:indeterminate { -background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e"); -border-color: transparent; -background-color: currentColor; -background-size: 100% 100%; -background-position: center; -background-repeat: no-repeat; -} -.form-checkbox:indeterminate:hover,.form-checkbox:indeterminate:focus { -border-color: transparent; -background-color: currentColor; -} + .form-input, + .form-textarea, + .form-select, + .form-multiselect { + appearance: none; + background-color: #fff; + border-color: #6b7280; + border-width: 1px; + border-radius: 0px; + padding-top: 0.5rem; + padding-right: 0.75rem; + padding-bottom: 0.5rem; + padding-left: 0.75rem; + font-size: 1rem; + line-height: 1.5rem; + --tw-shadow: 0 0 #0000; + } + .form-input:focus, + .form-textarea:focus, + .form-select:focus, + .form-multiselect:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty, /*!*/ /*!*/); + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #2563eb; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 + var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 + calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), + var(--tw-shadow); + border-color: #2563eb; + } + .form-input::placeholder, + .form-textarea::placeholder { + color: #6b7280; + opacity: 1; + } + .form-input::-webkit-datetime-edit-fields-wrapper { + padding: 0; + } + .form-input::-webkit-date-and-time-value { + min-height: 1.5em; + } + .form-input::-webkit-datetime-edit, + .form-input::-webkit-datetime-edit-year-field, + .form-input::-webkit-datetime-edit-month-field, + .form-input::-webkit-datetime-edit-day-field, + .form-input::-webkit-datetime-edit-hour-field, + .form-input::-webkit-datetime-edit-minute-field, + .form-input::-webkit-datetime-edit-second-field, + .form-input::-webkit-datetime-edit-millisecond-field, + .form-input::-webkit-datetime-edit-meridiem-field { + padding-top: 0; + padding-bottom: 0; + } + .form-checkbox, + .form-radio { + appearance: none; + padding: 0; + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + display: inline-block; + vertical-align: middle; + background-origin: border-box; + -webkit-user-select: none; + user-select: none; + flex-shrink: 0; + height: 1rem; + width: 1rem; + color: #2563eb; + background-color: #fff; + border-color: #6b7280; + border-width: 1px; + --tw-shadow: 0 0 #0000; + } + .form-checkbox { + border-radius: 0px; + } + .form-checkbox:focus, + .form-radio:focus { + outline: 2px solid transparent; + outline-offset: 2px; + --tw-ring-inset: var(--tw-empty, /*!*/ /*!*/); + --tw-ring-offset-width: 2px; + --tw-ring-offset-color: #fff; + --tw-ring-color: #2563eb; + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 + var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 + calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), + var(--tw-shadow); + } + .form-checkbox:checked, + .form-radio:checked { + border-color: transparent; + background-color: currentColor; + background-size: 100% 100%; + background-position: center; + background-repeat: no-repeat; + } + .form-checkbox:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); + } + .form-checkbox:checked:hover, + .form-checkbox:checked:focus, + .form-radio:checked:hover, + .form-radio:checked:focus { + border-color: transparent; + background-color: currentColor; + } + .form-checkbox:indeterminate { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e"); + border-color: transparent; + background-color: currentColor; + background-size: 100% 100%; + background-position: center; + background-repeat: no-repeat; + } + .form-checkbox:indeterminate:hover, + .form-checkbox:indeterminate:focus { + border-color: transparent; + background-color: currentColor; + } } diff --git a/packages/components/tailwind.config.js b/packages/components/tailwind.config.js index f059a98e..b49e3366 100644 --- a/packages/components/tailwind.config.js +++ b/packages/components/tailwind.config.js @@ -5,6 +5,27 @@ module.exports = { }, important: ".squiggle", theme: { - extend: {}, + extend: { + animation: { + "appear-and-spin": + "spin 1s linear infinite, squiggle-appear 0.2s forwards", + "semi-appear": "squiggle-semi-appear 0.2s forwards", + hide: "squiggle-hide 0.2s forwards", + }, + keyframes: { + "squiggle-appear": { + from: { opacity: 0 }, + to: { opacity: 1 }, + }, + "squiggle-semi-appear": { + from: { opacity: 0 }, + to: { opacity: 0.5 }, + }, + "squiggle-hide": { + from: { opacity: 1 }, + to: { opacity: 0 }, + }, + }, + }, }, }; diff --git a/packages/components/webpack.config.js b/packages/components/webpack.config.js index 74165daf..06980076 100644 --- a/packages/components/webpack.config.js +++ b/packages/components/webpack.config.js @@ -1,11 +1,10 @@ const path = require("path"); -const MiniCssExtractPlugin = require("mini-css-extract-plugin"); module.exports = { mode: "production", devtool: "source-map", profile: true, - entry: ["./src/index.ts", "./src/styles/main.css"], + entry: "./src/index.ts", module: { rules: [ { @@ -14,13 +13,8 @@ module.exports = { options: { projectReferences: true }, exclude: /node_modules/, }, - { - test: /\.css$/i, - use: [MiniCssExtractPlugin.loader, "css-loader", "postcss-loader"], - }, ], }, - plugins: [new MiniCssExtractPlugin()], resolve: { extensions: [".js", ".tsx", ".ts"], alias: { @@ -42,4 +36,18 @@ module.exports = { compress: true, port: 9000, }, + externals: { + react: { + commonjs: "react", + commonjs2: "react", + amd: "react", + root: "React", + }, + "react-dom": { + commonjs: "react-dom", + commonjs2: "react-dom", + amd: "react-dom", + root: "ReactDOM", + }, + }, }; diff --git a/packages/squiggle-lang/.gitignore b/packages/squiggle-lang/.gitignore index 1449d5f3..034f263d 100644 --- a/packages/squiggle-lang/.gitignore +++ b/packages/squiggle-lang/.gitignore @@ -22,3 +22,4 @@ _coverage coverage .nyc_output/ src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.js +src/rescript/Reducer/Reducer_Peggy/helpers.js diff --git a/packages/squiggle-lang/__tests__/Distributions/AlgebraicShapeCombination_test.res b/packages/squiggle-lang/__tests__/Distributions/AlgebraicShapeCombination_test.res index 702b67a4..552799ac 100644 --- a/packages/squiggle-lang/__tests__/Distributions/AlgebraicShapeCombination_test.res +++ b/packages/squiggle-lang/__tests__/Distributions/AlgebraicShapeCombination_test.res @@ -14,4 +14,16 @@ describe("Combining Continuous and Discrete Distributions", () => { ), // Multiply distribution by -1 true, ) + makeTest( + "keep order of xs when first number is discrete and adding", + AlgebraicShapeCombination.isOrdered( + AlgebraicShapeCombination.combineShapesContinuousDiscrete( + #Add, + {xs: [0., 1.], ys: [1., 1.]}, + {xs: [1.], ys: [1.]}, + ~discretePosition=First, + ), + ), // 1 + distribution + true, + ) }) diff --git a/packages/squiggle-lang/__tests__/Distributions/DistributionOperation_test.res b/packages/squiggle-lang/__tests__/Distributions/DistributionOperation_test.res index 60e74d74..5af6f8e0 100644 --- a/packages/squiggle-lang/__tests__/Distributions/DistributionOperation_test.res +++ b/packages/squiggle-lang/__tests__/Distributions/DistributionOperation_test.res @@ -1,7 +1,7 @@ open Jest open Expect -let env: DistributionOperation.env = { +let env: GenericDist.env = { sampleCount: 100, xyPointLength: 100, } @@ -34,7 +34,7 @@ describe("sparkline", () => { expected: DistributionOperation.outputType, ) => { test(name, () => { - let result = DistributionOperation.run(~env, FromDist(ToString(ToSparkline(20)), dist)) + let result = DistributionOperation.run(~env, FromDist(#ToString(ToSparkline(20)), dist)) expect(result)->toEqual(expected) }) } @@ -81,8 +81,8 @@ describe("sparkline", () => { describe("toPointSet", () => { test("on symbolic normal distribution", () => { let result = - run(FromDist(ToDist(ToPointSet), normalDist5)) - ->outputMap(FromDist(ToFloat(#Mean))) + run(FromDist(#ToDist(ToPointSet), normalDist5)) + ->outputMap(FromDist(#ToFloat(#Mean))) ->toFloat ->toExt expect(result)->toBeSoCloseTo(5.0, ~digits=0) @@ -90,10 +90,10 @@ describe("toPointSet", () => { test("on sample set", () => { let result = - run(FromDist(ToDist(ToPointSet), normalDist5)) - ->outputMap(FromDist(ToDist(ToSampleSet(1000)))) - ->outputMap(FromDist(ToDist(ToPointSet))) - ->outputMap(FromDist(ToFloat(#Mean))) + run(FromDist(#ToDist(ToPointSet), normalDist5)) + ->outputMap(FromDist(#ToDist(ToSampleSet(1000)))) + ->outputMap(FromDist(#ToDist(ToPointSet))) + ->outputMap(FromDist(#ToFloat(#Mean))) ->toFloat ->toExt expect(result)->toBeSoCloseTo(5.0, ~digits=-1) diff --git a/packages/squiggle-lang/__tests__/Distributions/GenericDist_Fixtures.res b/packages/squiggle-lang/__tests__/Distributions/GenericDist_Fixtures.res index d184b61b..440d7681 100644 --- a/packages/squiggle-lang/__tests__/Distributions/GenericDist_Fixtures.res +++ b/packages/squiggle-lang/__tests__/Distributions/GenericDist_Fixtures.res @@ -19,7 +19,6 @@ exception MixtureFailed let float1 = 1.0 let float2 = 2.0 let float3 = 3.0 -let {mkDelta} = module(TestHelpers) -let point1 = mkDelta(float1) -let point2 = mkDelta(float2) -let point3 = mkDelta(float3) +let point1 = TestHelpers.mkDelta(float1) +let point2 = TestHelpers.mkDelta(float2) +let point3 = TestHelpers.mkDelta(float3) diff --git a/packages/squiggle-lang/__tests__/Distributions/Mixture_test.res b/packages/squiggle-lang/__tests__/Distributions/Mixture_test.res index ee048853..7dc1f5df 100644 --- a/packages/squiggle-lang/__tests__/Distributions/Mixture_test.res +++ b/packages/squiggle-lang/__tests__/Distributions/Mixture_test.res @@ -11,7 +11,7 @@ describe("mixture", () => { let (mean1, mean2) = tup let meanValue = { run(Mixture([(mkNormal(mean1, 9e-1), 0.5), (mkNormal(mean2, 9e-1), 0.5)]))->outputMap( - FromDist(ToFloat(#Mean)), + FromDist(#ToFloat(#Mean)), ) } meanValue->unpackFloat->expect->toBeSoCloseTo((mean1 +. mean2) /. 2.0, ~digits=-1) @@ -28,7 +28,7 @@ describe("mixture", () => { let meanValue = { run( Mixture([(mkBeta(alpha, beta), betaWeight), (mkExponential(rate), exponentialWeight)]), - )->outputMap(FromDist(ToFloat(#Mean))) + )->outputMap(FromDist(#ToFloat(#Mean))) } let betaMean = 1.0 /. (1.0 +. beta /. alpha) let exponentialMean = 1.0 /. rate @@ -52,7 +52,7 @@ describe("mixture", () => { (mkUniform(low, high), uniformWeight), (mkLognormal(mu, sigma), lognormalWeight), ]), - )->outputMap(FromDist(ToFloat(#Mean))) + )->outputMap(FromDist(#ToFloat(#Mean))) } let uniformMean = (low +. high) /. 2.0 let lognormalMean = mu +. sigma ** 2.0 /. 2.0 diff --git a/packages/squiggle-lang/__tests__/Distributions/KlDivergence_test.res b/packages/squiggle-lang/__tests__/Distributions/Scoring/KlDivergence_test.res similarity index 93% rename from packages/squiggle-lang/__tests__/Distributions/KlDivergence_test.res rename to packages/squiggle-lang/__tests__/Distributions/Scoring/KlDivergence_test.res index fc528e08..f8793dc9 100644 --- a/packages/squiggle-lang/__tests__/Distributions/KlDivergence_test.res +++ b/packages/squiggle-lang/__tests__/Distributions/Scoring/KlDivergence_test.res @@ -3,6 +3,7 @@ open Expect open TestHelpers open GenericDist_Fixtures +let klDivergence = DistributionOperation.Constructors.LogScore.distEstimateDistAnswer(~env) // integral from low to high of 1 / (high - low) log(normal(mean, stdev)(x) / (1 / (high - low))) dx let klNormalUniform = (mean, stdev, low, high): float => -.Js.Math.log((high -. low) /. Js.Math.sqrt(2.0 *. MagicNumbers.Math.pi *. stdev ** 2.0)) +. @@ -11,8 +12,6 @@ let klNormalUniform = (mean, stdev, low, high): float => (mean ** 2.0 -. (high +. low) *. mean +. (low ** 2.0 +. high *. low +. high ** 2.0) /. 3.0) describe("klDivergence: continuous -> continuous -> float", () => { - let klDivergence = DistributionOperation.Constructors.klDivergence(~env) - let testUniform = (lowAnswer, highAnswer, lowPrediction, highPrediction) => { test("of two uniforms is equal to the analytic expression", () => { let answer = @@ -58,7 +57,7 @@ describe("klDivergence: continuous -> continuous -> float", () => { let kl = E.R.liftJoin2(klDivergence, prediction, answer) switch kl { - | Ok(kl') => kl'->expect->toBeSoCloseTo(analyticalKl, ~digits=3) + | Ok(kl') => kl'->expect->toBeSoCloseTo(analyticalKl, ~digits=2) | Error(err) => { Js.Console.log(DistributionTypes.Error.toString(err)) raise(KlFailed) @@ -82,7 +81,6 @@ describe("klDivergence: continuous -> continuous -> float", () => { }) describe("klDivergence: discrete -> discrete -> float", () => { - let klDivergence = DistributionOperation.Constructors.klDivergence(~env) let mixture = a => DistributionTypes.DistributionOperation.Mixture(a) let a' = [(point1, 1e0), (point2, 1e0)]->mixture->run let b' = [(point1, 1e0), (point2, 1e0), (point3, 1e0)]->mixture->run @@ -117,7 +115,6 @@ describe("klDivergence: discrete -> discrete -> float", () => { }) describe("klDivergence: mixed -> mixed -> float", () => { - let klDivergence = DistributionOperation.Constructors.klDivergence(~env) let mixture' = a => DistributionTypes.DistributionOperation.Mixture(a) let mixture = a => { let dist' = a->mixture'->run @@ -189,15 +186,15 @@ describe("combineAlongSupportOfSecondArgument0", () => { uniformMakeR(lowPrediction, highPrediction)->E.R2.errMap(s => DistributionTypes.ArgumentError( s, )) - let answerWrapped = E.R.fmap(a => run(FromDist(ToDist(ToPointSet), a)), answer) - let predictionWrapped = E.R.fmap(a => run(FromDist(ToDist(ToPointSet), a)), prediction) + let answerWrapped = E.R.fmap(a => run(FromDist(#ToDist(ToPointSet), a)), answer) + let predictionWrapped = E.R.fmap(a => run(FromDist(#ToDist(ToPointSet), a)), prediction) let interpolator = XYShape.XtoY.continuousInterpolator(#Stepwise, #UseZero) - let integrand = PointSetDist_Scoring.KLDivergence.integrand + let integrand = PointSetDist_Scoring.WithDistAnswer.integrand let result = switch (answerWrapped, predictionWrapped) { | (Ok(Dist(PointSet(Continuous(a)))), Ok(Dist(PointSet(Continuous(b))))) => - Some(combineAlongSupportOfSecondArgument(integrand, interpolator, a.xyShape, b.xyShape)) + Some(combineAlongSupportOfSecondArgument(interpolator, integrand, a.xyShape, b.xyShape)) | _ => None } result diff --git a/packages/squiggle-lang/__tests__/Distributions/Scoring/WithScalarAnswer_test.res b/packages/squiggle-lang/__tests__/Distributions/Scoring/WithScalarAnswer_test.res new file mode 100644 index 00000000..f899f30d --- /dev/null +++ b/packages/squiggle-lang/__tests__/Distributions/Scoring/WithScalarAnswer_test.res @@ -0,0 +1,68 @@ +open Jest +open Expect +open TestHelpers +open GenericDist_Fixtures +exception ScoreFailed + +describe("WithScalarAnswer: discrete -> scalar -> score", () => { + let mixture = a => DistributionTypes.DistributionOperation.Mixture(a) + let pointA = mkDelta(3.0) + let pointB = mkDelta(2.0) + let pointC = mkDelta(1.0) + let pointD = mkDelta(0.0) + + test("score: agrees with analytical answer when finite", () => { + let prediction' = [(pointA, 0.25), (pointB, 0.25), (pointC, 0.25), (pointD, 0.25)]->mixture->run + let prediction = switch prediction' { + | Dist(PointSet(p)) => p + | _ => raise(MixtureFailed) + } + + let answer = 2.0 // So this is: assigning 100% probability to 2.0 + let result = PointSetDist_Scoring.WithScalarAnswer.score(~estimate=prediction, ~answer) + switch result { + | Ok(x) => x->expect->toEqual(-.Js.Math.log(0.25 /. 1.0)) + | _ => raise(ScoreFailed) + } + }) + + test("score: agrees with analytical answer when finite", () => { + let prediction' = [(pointA, 0.75), (pointB, 0.25)]->mixture->run + let prediction = switch prediction' { + | Dist(PointSet(p)) => p + | _ => raise(MixtureFailed) + } + let answer = 3.0 // So this is: assigning 100% probability to 2.0 + let result = PointSetDist_Scoring.WithScalarAnswer.score(~estimate=prediction, ~answer) + switch result { + | Ok(x) => x->expect->toEqual(-.Js.Math.log(0.75 /. 1.0)) + | _ => raise(ScoreFailed) + } + }) + + test("scoreWithPrior: agrees with analytical answer when finite", () => { + let prior' = [(pointA, 0.5), (pointB, 0.5)]->mixture->run + let prediction' = [(pointA, 0.75), (pointB, 0.25)]->mixture->run + + let prediction = switch prediction' { + | Dist(PointSet(p)) => p + | _ => raise(MixtureFailed) + } + + let prior = switch prior' { + | Dist(PointSet(p)) => p + | _ => raise(MixtureFailed) + } + + let answer = 3.0 // So this is: assigning 100% probability to 2.0 + let result = PointSetDist_Scoring.WithScalarAnswer.scoreWithPrior( + ~estimate=prediction, + ~answer, + ~prior, + ) + switch result { + | Ok(x) => x->expect->toEqual(-.Js.Math.log(0.75 /. 1.0) -. -.Js.Math.log(0.5 /. 1.0)) + | _ => raise(ScoreFailed) + } + }) +}) diff --git a/packages/squiggle-lang/__tests__/Distributions/Symbolic_test.res b/packages/squiggle-lang/__tests__/Distributions/Symbolic_test.res index 6ee9ffc8..976ee09f 100644 --- a/packages/squiggle-lang/__tests__/Distributions/Symbolic_test.res +++ b/packages/squiggle-lang/__tests__/Distributions/Symbolic_test.res @@ -8,34 +8,34 @@ let mkNormal = (mean, stdev) => DistributionTypes.Symbolic(#Normal({mean: mean, describe("(Symbolic) normalize", () => { testAll("has no impact on normal distributions", list{-1e8, -1e-2, 0.0, 1e-4, 1e16}, mean => { let normalValue = mkNormal(mean, 2.0) - let normalizedValue = run(FromDist(ToDist(Normalize), normalValue)) + let normalizedValue = run(FromDist(#ToDist(Normalize), normalValue)) normalizedValue->unpackDist->expect->toEqual(normalValue) }) }) describe("(Symbolic) mean", () => { testAll("of normal distributions", list{-1e8, -16.0, -1e-2, 0.0, 1e-4, 32.0, 1e16}, mean => { - run(FromDist(ToFloat(#Mean), mkNormal(mean, 4.0)))->unpackFloat->expect->toBeCloseTo(mean) + run(FromDist(#ToFloat(#Mean), mkNormal(mean, 4.0)))->unpackFloat->expect->toBeCloseTo(mean) }) Skip.test("of normal(0, -1) (it NaNs out)", () => { - run(FromDist(ToFloat(#Mean), mkNormal(1e1, -1e0)))->unpackFloat->expect->ExpectJs.toBeFalsy + run(FromDist(#ToFloat(#Mean), mkNormal(1e1, -1e0)))->unpackFloat->expect->ExpectJs.toBeFalsy }) test("of normal(0, 1e-8) (it doesn't freak out at tiny stdev)", () => { - run(FromDist(ToFloat(#Mean), mkNormal(0.0, 1e-8)))->unpackFloat->expect->toBeCloseTo(0.0) + run(FromDist(#ToFloat(#Mean), mkNormal(0.0, 1e-8)))->unpackFloat->expect->toBeCloseTo(0.0) }) testAll("of exponential distributions", list{1e-7, 2.0, 10.0, 100.0}, rate => { let meanValue = run( - FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Exponential({rate: rate}))), + FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Exponential({rate: rate}))), ) meanValue->unpackFloat->expect->toBeCloseTo(1.0 /. rate) // https://en.wikipedia.org/wiki/Exponential_distribution#Mean,_variance,_moments,_and_median }) test("of a cauchy distribution", () => { let meanValue = run( - FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Cauchy({local: 1.0, scale: 1.0}))), + FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Cauchy({local: 1.0, scale: 1.0}))), ) meanValue->unpackFloat->expect->toBeSoCloseTo(1.0098094001641797, ~digits=5) //-> toBe(GenDistError(Other("Cauchy distributions may have no mean value."))) @@ -48,7 +48,7 @@ describe("(Symbolic) mean", () => { let (low, medium, high) = tup let meanValue = run( FromDist( - ToFloat(#Mean), + #ToFloat(#Mean), DistributionTypes.Symbolic(#Triangular({low: low, medium: medium, high: high})), ), ) @@ -63,7 +63,7 @@ describe("(Symbolic) mean", () => { tup => { let (alpha, beta) = tup let meanValue = run( - FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Beta({alpha: alpha, beta: beta}))), + FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Beta({alpha: alpha, beta: beta}))), ) meanValue->unpackFloat->expect->toBeCloseTo(1.0 /. (1.0 +. beta /. alpha)) // https://en.wikipedia.org/wiki/Beta_distribution#Mean }, @@ -72,18 +72,35 @@ describe("(Symbolic) mean", () => { // TODO: When we have our theory of validators we won't want this to be NaN but to be an error. test("of beta(0, 0)", () => { let meanValue = run( - FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Beta({alpha: 0.0, beta: 0.0}))), + FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Beta({alpha: 0.0, beta: 0.0}))), ) meanValue->unpackFloat->expect->ExpectJs.toBeFalsy }) + testAll( + "of beta distributions from mean and standard dev", + list{(0.39, 0.1), (0.08, 0.1), (0.8, 0.3)}, + tup => { + let (mean, stdev) = tup + let betaDistribution = SymbolicDist.Beta.fromMeanAndStdev(mean, stdev) + let meanValue = + betaDistribution->E.R2.fmap(d => + run(FromDist(#ToFloat(#Mean), d->DistributionTypes.Symbolic)) + ) + switch meanValue { + | Ok(value) => value->unpackFloat->expect->toBeCloseTo(mean) + | Error(err) => err->expect->toBe("shouldn't happen") + } + }, + ) + testAll( "of lognormal distributions", list{(2.0, 4.0), (1e-7, 1e-2), (-1e6, 10.0), (1e3, -1e2), (-1e8, -1e4), (1e2, 1e-5)}, tup => { let (mu, sigma) = tup let meanValue = run( - FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Lognormal({mu: mu, sigma: sigma}))), + FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Lognormal({mu: mu, sigma: sigma}))), ) meanValue->unpackFloat->expect->toBeCloseTo(Js.Math.exp(mu +. sigma ** 2.0 /. 2.0)) // https://brilliant.org/wiki/log-normal-distribution/ }, @@ -95,14 +112,14 @@ describe("(Symbolic) mean", () => { tup => { let (low, high) = tup let meanValue = run( - FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Uniform({low: low, high: high}))), + FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Uniform({low: low, high: high}))), ) meanValue->unpackFloat->expect->toBeCloseTo((low +. high) /. 2.0) // https://en.wikipedia.org/wiki/Continuous_uniform_distribution#Moments }, ) test("of a float", () => { - let meanValue = run(FromDist(ToFloat(#Mean), DistributionTypes.Symbolic(#Float(7.7)))) + let meanValue = run(FromDist(#ToFloat(#Mean), DistributionTypes.Symbolic(#Float(7.7)))) meanValue->unpackFloat->expect->toBeCloseTo(7.7) }) }) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Category/Reducer_Category_Module_TypeChecker_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Category/Reducer_Category_Module_TypeChecker_test.res new file mode 100644 index 00000000..b5351787 --- /dev/null +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Category/Reducer_Category_Module_TypeChecker_test.res @@ -0,0 +1,4 @@ +open Jest +open Expect + +test("todo", () => expect("1")->toBe("1")) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros_test.res index 4b506a15..84659ed7 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros_test.res @@ -19,23 +19,23 @@ describe("bindStatement", () => { testMacro( [], eBindStatement(eBindings([]), exampleStatementY), - "Ok((:$_setBindings_$ {} :y 1) context: {})", + "Ok((:$_setBindings_$ @{} :y 1) context: @{})", ) // Then it answers the bindings for the next statement when reduced - testMacroEval([], eBindStatement(eBindings([]), exampleStatementY), "Ok({y: 1})") + testMacroEval([], eBindStatement(eBindings([]), exampleStatementY), "Ok(@{y: 1})") // Now let's feed a binding to see what happens testMacro( [], - eBindStatement(eBindings([("x", EvNumber(2.))]), exampleStatementX), - "Ok((:$_setBindings_$ {x: 2} :y 2) context: {x: 2})", + eBindStatement(eBindings([("x", IEvNumber(2.))]), exampleStatementX), + "Ok((:$_setBindings_$ @{x: 2} :y 2) context: @{x: 2})", ) // An expression does not return a binding, thus error testMacro([], eBindStatement(eBindings([]), exampleExpression), "Assignment expected") // When bindings from previous statement are missing the context is injected. This must be the first statement of a block testMacro( - [("z", EvNumber(99.))], + [("z", IEvNumber(99.))], eBindStatementDefault(exampleStatementY), - "Ok((:$_setBindings_$ {z: 99} :y 1) context: {z: 99})", + "Ok((:$_setBindings_$ @{z: 99} :y 1) context: @{z: 99})", ) }) @@ -43,26 +43,26 @@ describe("bindExpression", () => { // x is simply bound in the expression testMacro( [], - eBindExpression(eBindings([("x", EvNumber(2.))]), eSymbol("x")), - "Ok(2 context: {x: 2})", + eBindExpression(eBindings([("x", IEvNumber(2.))]), eSymbol("x")), + "Ok(2 context: @{x: 2})", ) // When an let statement is the end expression then bindings are returned testMacro( [], - eBindExpression(eBindings([("x", EvNumber(2.))]), exampleStatementY), - "Ok((:$_exportBindings_$ (:$_setBindings_$ {x: 2} :y 1)) context: {x: 2})", + eBindExpression(eBindings([("x", IEvNumber(2.))]), exampleStatementY), + "Ok((:$_exportBindings_$ (:$_setBindings_$ @{x: 2} :y 1)) context: @{x: 2})", ) // Now let's reduce that expression testMacroEval( [], - eBindExpression(eBindings([("x", EvNumber(2.))]), exampleStatementY), - "Ok({x: 2,y: 1})", + eBindExpression(eBindings([("x", IEvNumber(2.))]), exampleStatementY), + "Ok(@{x: 2,y: 1})", ) // When bindings are missing the context is injected. This must be the first and last statement of a block testMacroEval( - [("z", EvNumber(99.))], + [("z", IEvNumber(99.))], eBindExpressionDefault(exampleStatementY), - "Ok({y: 1,z: 99})", + "Ok(@{y: 1,z: 99})", ) }) @@ -72,7 +72,7 @@ describe("block", () => { testMacroEval([], eBlock(list{exampleExpression}), "Ok(1)") // Block with a single statement testMacro([], eBlock(list{exampleStatementY}), "Ok((:$$_bindExpression_$$ (:$_let_$ :y 1)))") - testMacroEval([], eBlock(list{exampleStatementY}), "Ok({y: 1})") + testMacroEval([], eBlock(list{exampleStatementY}), "Ok(@{y: 1})") // Block with a statement and an expression testMacro( [], @@ -86,7 +86,7 @@ describe("block", () => { eBlock(list{exampleStatementY, exampleStatementZ}), "Ok((:$$_bindExpression_$$ (:$$_bindStatement_$$ (:$_let_$ :y 1)) (:$_let_$ :z :y)))", ) - testMacroEval([], eBlock(list{exampleStatementY, exampleStatementZ}), "Ok({y: 1,z: 1})") + testMacroEval([], eBlock(list{exampleStatementY, exampleStatementZ}), "Ok(@{y: 1,z: 1})") // Block inside a block testMacro([], eBlock(list{eBlock(list{exampleExpression})}), "Ok((:$$_bindExpression_$$ {1}))") testMacroEval([], eBlock(list{eBlock(list{exampleExpression})}), "Ok(1)") @@ -99,7 +99,7 @@ describe("block", () => { testMacroEval( [], eBlock(list{eLetStatement("z", eBlock(list{eBlock(list{exampleExpressionY})}))}), - "Ok({z: :y})", + "Ok(@{z: :y})", ) // Empty block testMacro([], eBlock(list{}), "Ok(:undefined block)") //TODO: should be an error @@ -115,7 +115,7 @@ describe("block", () => { "Ok((:$$_bindExpression_$$ {(:$_let_$ :y (:add :x 1)); :y}))", ) testMacroEval( - [("x", EvNumber(1.))], + [("x", IEvNumber(1.))], eBlock(list{ eBlock(list{ eLetStatement("y", eFunction("add", list{eSymbol("x"), eNumber(1.)})), @@ -135,12 +135,12 @@ describe("lambda", () => { testMacro([], callLambdaExpression, "Ok(((:$$_lambda_$$ [y] :y) 1))") testMacroEval([], callLambdaExpression, "Ok(1)") // Parameters shadow the outer scope - testMacroEval([("y", EvNumber(666.))], callLambdaExpression, "Ok(1)") + testMacroEval([("y", IEvNumber(666.))], callLambdaExpression, "Ok(1)") // When not shadowed by the parameters, the outer scope variables are available let lambdaExpression = eFunction( "$$_lambda_$$", list{eArrayString(["z"]), eFunction("add", list{eSymbol("y"), eSymbol("z")})}, ) let callLambdaExpression = eList(list{lambdaExpression, eNumber(1.)}) - testMacroEval([("y", EvNumber(666.))], callLambdaExpression, "Ok(667)") + testMacroEval([("y", IEvNumber(666.))], callLambdaExpression, "Ok(667)") }) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn_test.res index fb891bb3..f3c92f78 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn_test.res @@ -1,4 +1,4 @@ -module ExpressionValue = ReducerInterface.ExpressionValue +module ExpressionValue = ReducerInterface.ExternalExpressionValue open Jest open Expect @@ -17,10 +17,6 @@ describe("builtin", () => { testEval("1-1", "Ok(0)") testEval("2>1", "Ok(true)") testEval("concat('a','b')", "Ok('ab')") - testEval( - "addOne(t)=t+1; toList(mapSamples(fromSamples([1,2,3,4,5,6]), addOne))", - "Ok([2,3,4,5,6,7])", - ) }) describe("builtin exception", () => { diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Helpers.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Helpers.res index 47fd5895..05eb1b01 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Helpers.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Helpers.res @@ -1,19 +1,22 @@ -module ExpressionT = Reducer_Expression_T -module ExpressionValue = ReducerInterface.ExpressionValue +// Reducer_Helpers module ErrorValue = Reducer_ErrorValue -module Bindings = Reducer_Category_Bindings +module ExternalExpressionValue = ReducerInterface.ExternalExpressionValue +module InternalExpressionValue = ReducerInterface.InternalExpressionValue +module Bindings = Reducer_Bindings -let removeDefaults = (ev: ExpressionT.expressionValue): ExpressionT.expressionValue => - switch ev { - | EvRecord(extbindings) => { - let bindings: Bindings.t = Bindings.fromRecord(extbindings) - let keys = Js.Dict.keys(Reducer.defaultExternalBindings) - Belt.Map.String.keep(bindings, (key, _value) => { - let removeThis = Js.Array2.includes(keys, key) - !removeThis - })->Bindings.toExpressionValue - } +let removeDefaultsInternal = (iev: InternalExpressionValue.t) => { + switch iev { + | InternalExpressionValue.IEvBindings(nameSpace) => + Bindings.removeOther( + nameSpace, + ReducerInterface.StdLib.internalStdLib, + )->InternalExpressionValue.IEvBindings | value => value } +} -let rRemoveDefaults = r => Belt.Result.map(r, ev => removeDefaults(ev)) +let removeDefaultsExternal = (ev: ExternalExpressionValue.t): ExternalExpressionValue.t => + ev->InternalExpressionValue.toInternal->removeDefaultsInternal->InternalExpressionValue.toExternal + +let rRemoveDefaultsInternal = r => Belt.Result.map(r, removeDefaultsInternal) +let rRemoveDefaultsExternal = r => Belt.Result.map(r, removeDefaultsExternal) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_MathJs/Reducer_MathJsEval_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_MathJs/Reducer_MathJsEval_test.res index 6f232d0e..ed00e957 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_MathJs/Reducer_MathJsEval_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_MathJs/Reducer_MathJsEval_test.res @@ -1,4 +1,3 @@ -open ReducerInterface.ExpressionValue module MathJs = Reducer_MathJs module ErrorValue = Reducer.ErrorValue @@ -6,14 +5,14 @@ open Jest open ExpectJs describe("eval", () => { - test("Number", () => expect(MathJs.Eval.eval("1"))->toEqual(Ok(EvNumber(1.)))) - test("Number expr", () => expect(MathJs.Eval.eval("1-1"))->toEqual(Ok(EvNumber(0.)))) - test("String", () => expect(MathJs.Eval.eval("'hello'"))->toEqual(Ok(EvString("hello")))) + test("Number", () => expect(MathJs.Eval.eval("1"))->toEqual(Ok(IEvNumber(1.)))) + test("Number expr", () => expect(MathJs.Eval.eval("1-1"))->toEqual(Ok(IEvNumber(0.)))) + test("String", () => expect(MathJs.Eval.eval("'hello'"))->toEqual(Ok(IEvString("hello")))) test("String expr", () => - expect(MathJs.Eval.eval("concat('hello ','world')"))->toEqual(Ok(EvString("hello world"))) + expect(MathJs.Eval.eval("concat('hello ','world')"))->toEqual(Ok(IEvString("hello world"))) ) - test("Boolean", () => expect(MathJs.Eval.eval("true"))->toEqual(Ok(EvBool(true)))) - test("Boolean expr", () => expect(MathJs.Eval.eval("2>1"))->toEqual(Ok(EvBool(true)))) + test("Boolean", () => expect(MathJs.Eval.eval("true"))->toEqual(Ok(IEvBool(true)))) + test("Boolean expr", () => expect(MathJs.Eval.eval("2>1"))->toEqual(Ok(IEvBool(true)))) }) describe("errors", () => { diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res index 4bf3747f..f17fe9aa 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res @@ -236,7 +236,8 @@ describe("Peggy parse", () => { testParse("1m+2cm", "{(::add (::fromUnit_m 1) (::fromUnit_cm 2))}") }) describe("Module", () => { - testParse("Math.pi", "{(::$_atIndex_$ @Math 'pi')}") + testParse("x", "{:x}") + testParse("Math.pi", "{:Math.pi}") }) }) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_type_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_type_test.res index ea18effc..4f7dabdc 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_type_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_type_test.res @@ -20,7 +20,7 @@ describe("Peggy parse type", () => { "{(::$_typeOf_$ :f (::$_typeFunction_$ (::$_constructArray_$ (#number #number #number))))}", ) }) - describe("high priority modifier", () => { + describe("high priority contract", () => { testParse( "answer: number<-min<-max(100)|string", "{(::$_typeOf_$ :answer (::$_typeOr_$ (::$_constructArray_$ ((::$_typeModifier_max_$ (::$_typeModifier_min_$ #number) 100) #string))))}", @@ -30,7 +30,7 @@ describe("Peggy parse type", () => { "{(::$_typeOf_$ :answer (::$_typeModifier_memberOf_$ #number (::$_constructArray_$ (1 3 5))))}", ) }) - describe("low priority modifier", () => { + describe("low priority contract", () => { testParse( "answer: number | string $ opaque", "{(::$_typeOf_$ :answer (::$_typeModifier_opaque_$ (::$_typeOr_$ (::$_constructArray_$ (#number #string)))))}", @@ -63,14 +63,14 @@ describe("Peggy parse type", () => { "{(::$_typeOf_$ :weekend (::$_typeOr_$ (::$_constructArray_$ ((::$_typeConstructor_$ #Saturday (::$_constructArray_$ ())) (::$_typeConstructor_$ #Sunday (::$_constructArray_$ ()))))))}", ) }) - describe("type paranthesis", () => { - //$ is introduced to avoid paranthesis + describe("type parenthesis", () => { + //$ is introduced to avoid parenthesis testParse( "answer: (number|string)<-opaque", "{(::$_typeOf_$ :answer (::$_typeModifier_opaque_$ (::$_typeOr_$ (::$_constructArray_$ (#number #string)))))}", ) }) - describe("squiggle expressions in type modifiers", () => { + describe("squiggle expressions in type contracts", () => { testParse( "odds1 = [1,3,5]; odds2 = [7, 9]; type odds = number<-memberOf(concat(odds1, odds2))", "{:odds1 = {(::$_constructArray_$ (1 3 5))}; :odds2 = {(::$_constructArray_$ (7 9))}; (::$_typeAlias_$ #odds (::$_typeModifier_memberOf_$ #number (::concat :odds1 :odds2)))}", diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_TestHelpers.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_TestHelpers.res index 39c3492e..b434fdb9 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_TestHelpers.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_TestHelpers.res @@ -1,9 +1,10 @@ module Expression = Reducer_Expression module ExpressionT = Reducer_Expression_T -module ExpressionValue = ReducerInterface_ExpressionValue +module ExpressionValue = ReducerInterface.InternalExpressionValue module Parse = Reducer_Peggy_Parse module Result = Belt.Result module ToExpression = Reducer_Peggy_ToExpression +module Bindings = Reducer_Bindings open Jest open Expect @@ -29,7 +30,7 @@ let expectToExpressionToBe = (expr, answer, ~v="_", ()) => { ExpressionValue.defaultEnvironment, ) ) - ->Reducer_Helpers.rRemoveDefaults + ->Reducer_Helpers.rRemoveDefaultsInternal ->ExpressionValue.toStringResultOkless (a1, a2)->expect->toEqual((answer, v)) } diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res index 92491e8f..b8a81f25 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_test.res @@ -1,9 +1,12 @@ +module Bindings = Reducer_Bindings +module InternalExpressionValue = ReducerInterface_InternalExpressionValue + open Jest open Reducer_Peggy_TestHelpers describe("Peggy to Expression", () => { describe("literals operators parenthesis", () => { - // Note that there is always an outer block. Otherwise, external bindings are ignrored at the first statement + // Note that there is always an outer block. Otherwise, external bindings are ignored at the first statement testToExpression("1", "{1}", ~v="1", ()) testToExpression("'hello'", "{'hello'}", ~v="'hello'", ()) testToExpression("true", "{true}", ~v="true", ()) @@ -22,11 +25,11 @@ describe("Peggy to Expression", () => { describe("multi-line", () => { testToExpression("x=1; 2", "{(:$_let_$ :x {1}); 2}", ~v="2", ()) - testToExpression("x=1; y=2", "{(:$_let_$ :x {1}); (:$_let_$ :y {2})}", ~v="{x: 1,y: 2}", ()) + testToExpression("x=1; y=2", "{(:$_let_$ :x {1}); (:$_let_$ :y {2})}", ~v="@{x: 1,y: 2}", ()) }) describe("variables", () => { - testToExpression("x = 1", "{(:$_let_$ :x {1})}", ~v="{x: 1}", ()) + testToExpression("x = 1", "{(:$_let_$ :x {1})}", ~v="@{x: 1}", ()) testToExpression("x", "{:x}", ~v=":x", ()) //TODO: value should return error testToExpression("x = 1; x", "{(:$_let_$ :x {1}); :x}", ~v="1", ()) }) @@ -35,7 +38,7 @@ describe("Peggy to Expression", () => { testToExpression( "identity(x) = x", "{(:$_let_$ :identity (:$$_lambda_$$ [x] {:x}))}", - ~v="{identity: lambda(x=>internal code)}", + ~v="@{identity: lambda(x=>internal code)}", (), ) // Function definitions become lambda assignments testToExpression("identity(x)", "{(:identity :x)}", ()) // Note value returns error properly @@ -155,7 +158,7 @@ describe("Peggy to Expression", () => { testToExpression( "y=99; x={y=1; y}", "{(:$_let_$ :y {99}); (:$_let_$ :x {(:$_let_$ :y {1}); :y})}", - ~v="{x: 1,y: 99}", + ~v="@{x: 1,y: 99}", (), ) }) @@ -165,24 +168,32 @@ describe("Peggy to Expression", () => { testToExpression( "f={|x| x}", "{(:$_let_$ :f {(:$$_lambda_$$ [x] {:x})})}", - ~v="{f: lambda(x=>internal code)}", + ~v="@{f: lambda(x=>internal code)}", (), ) testToExpression( "f(x)=x", "{(:$_let_$ :f (:$$_lambda_$$ [x] {:x}))}", - ~v="{f: lambda(x=>internal code)}", + ~v="@{f: lambda(x=>internal code)}", (), ) // Function definitions are lambda assignments testToExpression( "f(x)=x ? 1 : 0", "{(:$_let_$ :f (:$$_lambda_$$ [x] {(:$$_ternary_$$ :x 1 0)}))}", - ~v="{f: lambda(x=>internal code)}", + ~v="@{f: lambda(x=>internal code)}", (), ) }) describe("module", () => { - testToExpression("Math.pi", "{(:$_atIndex_$ :Math 'pi')}", ~v="3.141592653589793", ()) + // testToExpression("Math.pi", "{:Math.pi}", ~v="3.141592653589793", ()) + // Only.test("stdlibrary", () => { + // ReducerInterface_StdLib.internalStdLib + // ->IEvBindings + // ->InternalExpressionValue.toString + // ->expect + // ->toBe("") + // }) + testToExpression("Math.pi", "{:Math.pi}", ~v="3.141592653589793", ()) }) }) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_type_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_type_test.res index e5609aea..9849adb0 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_type_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_type_test.res @@ -6,7 +6,7 @@ describe("Peggy Types to Expression", () => { testToExpression( "p: number", "{(:$_typeOf_$ :p #number)}", - ~v="{_typeReferences_: {p: #number}}", + ~v="@{_typeReferences_: {p: #number}}", (), ) }) @@ -14,7 +14,7 @@ describe("Peggy Types to Expression", () => { testToExpression( "type index=number", "{(:$_typeAlias_$ #index #number)}", - ~v="{_typeAliases_: {index: #number}}", + ~v="@{_typeAliases_: {index: #number}}", (), ) }) @@ -22,7 +22,7 @@ describe("Peggy Types to Expression", () => { testToExpression( "answer: number|string|distribution", "{(:$_typeOf_$ :answer (:$_typeOr_$ (:$_constructArray_$ (#number #string #distribution))))}", - ~v="{_typeReferences_: {answer: {typeTag: 'typeOr',typeOr: [#number,#string,#distribution]}}}", + ~v="@{_typeReferences_: {answer: {typeOr: [#number,#string,#distribution],typeTag: 'typeOr'}}}", (), ) }) @@ -30,67 +30,67 @@ describe("Peggy Types to Expression", () => { testToExpression( "f: number=>number=>number", "{(:$_typeOf_$ :f (:$_typeFunction_$ (:$_constructArray_$ (#number #number #number))))}", - ~v="{_typeReferences_: {f: {typeTag: 'typeFunction',inputs: [#number,#number],output: #number}}}", + ~v="@{_typeReferences_: {f: {inputs: [#number,#number],output: #number,typeTag: 'typeFunction'}}}", (), ) testToExpression( "f: number=>number", "{(:$_typeOf_$ :f (:$_typeFunction_$ (:$_constructArray_$ (#number #number))))}", - ~v="{_typeReferences_: {f: {typeTag: 'typeFunction',inputs: [#number],output: #number}}}", + ~v="@{_typeReferences_: {f: {inputs: [#number],output: #number,typeTag: 'typeFunction'}}}", (), ) }) - describe("high priority modifier", () => { + describe("high priority contract", () => { testToExpression( "answer: number<-min(1)<-max(100)|string", "{(:$_typeOf_$ :answer (:$_typeOr_$ (:$_constructArray_$ ((:$_typeModifier_max_$ (:$_typeModifier_min_$ #number 1) 100) #string))))}", - ~v="{_typeReferences_: {answer: {typeTag: 'typeOr',typeOr: [{typeTag: 'typeIdentifier',typeIdentifier: #number,min: 1,max: 100},#string]}}}", + ~v="@{_typeReferences_: {answer: {typeOr: [{max: 100,min: 1,typeIdentifier: #number,typeTag: 'typeIdentifier'},#string],typeTag: 'typeOr'}}}", (), ) testToExpression( "answer: number<-memberOf([1,3,5])", "{(:$_typeOf_$ :answer (:$_typeModifier_memberOf_$ #number (:$_constructArray_$ (1 3 5))))}", - ~v="{_typeReferences_: {answer: {typeTag: 'typeIdentifier',typeIdentifier: #number,memberOf: [1,3,5]}}}", + ~v="@{_typeReferences_: {answer: {memberOf: [1,3,5],typeIdentifier: #number,typeTag: 'typeIdentifier'}}}", (), ) testToExpression( "answer: number<-min(1)", "{(:$_typeOf_$ :answer (:$_typeModifier_min_$ #number 1))}", - ~v="{_typeReferences_: {answer: {typeTag: 'typeIdentifier',typeIdentifier: #number,min: 1}}}", + ~v="@{_typeReferences_: {answer: {min: 1,typeIdentifier: #number,typeTag: 'typeIdentifier'}}}", (), ) testToExpression( "answer: number<-max(10)", "{(:$_typeOf_$ :answer (:$_typeModifier_max_$ #number 10))}", - ~v="{_typeReferences_: {answer: {typeTag: 'typeIdentifier',typeIdentifier: #number,max: 10}}}", + ~v="@{_typeReferences_: {answer: {max: 10,typeIdentifier: #number,typeTag: 'typeIdentifier'}}}", (), ) testToExpression( "answer: number<-min(1)<-max(10)", "{(:$_typeOf_$ :answer (:$_typeModifier_max_$ (:$_typeModifier_min_$ #number 1) 10))}", - ~v="{_typeReferences_: {answer: {typeTag: 'typeIdentifier',typeIdentifier: #number,min: 1,max: 10}}}", + ~v="@{_typeReferences_: {answer: {max: 10,min: 1,typeIdentifier: #number,typeTag: 'typeIdentifier'}}}", (), ) testToExpression( "answer: number<-max(10)<-min(1)", "{(:$_typeOf_$ :answer (:$_typeModifier_min_$ (:$_typeModifier_max_$ #number 10) 1))}", - ~v="{_typeReferences_: {answer: {typeTag: 'typeIdentifier',typeIdentifier: #number,max: 10,min: 1}}}", + ~v="@{_typeReferences_: {answer: {max: 10,min: 1,typeIdentifier: #number,typeTag: 'typeIdentifier'}}}", (), ) }) - describe("low priority modifier", () => { + describe("low priority contract", () => { testToExpression( "answer: number | string $ opaque", "{(:$_typeOf_$ :answer (:$_typeModifier_opaque_$ (:$_typeOr_$ (:$_constructArray_$ (#number #string)))))}", - ~v="{_typeReferences_: {answer: {typeTag: 'typeOr',typeOr: [#number,#string],opaque: true}}}", + ~v="@{_typeReferences_: {answer: {opaque: true,typeOr: [#number,#string],typeTag: 'typeOr'}}}", (), ) }) - describe("squiggle expressions in type modifiers", () => { + describe("squiggle expressions in type contracts", () => { testToExpression( "odds1 = [1,3,5]; odds2 = [7, 9]; type odds = number<-memberOf(concat(odds1, odds2))", "{(:$_let_$ :odds1 {(:$_constructArray_$ (1 3 5))}); (:$_let_$ :odds2 {(:$_constructArray_$ (7 9))}); (:$_typeAlias_$ #odds (:$_typeModifier_memberOf_$ #number (:concat :odds1 :odds2)))}", - ~v="{_typeAliases_: {odds: {typeTag: 'typeIdentifier',typeIdentifier: #number,memberOf: [1,3,5,7,9]}},odds1: [1,3,5],odds2: [7,9]}", + ~v="@{_typeAliases_: {odds: {memberOf: [1,3,5,7,9],typeIdentifier: #number,typeTag: 'typeIdentifier'}},odds1: [1,3,5],odds2: [7,9]}", (), ) }) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_void_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_void_test.res new file mode 100644 index 00000000..a106a188 --- /dev/null +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression_void_test.res @@ -0,0 +1,20 @@ +open Jest +open Reducer_Peggy_TestHelpers + +describe("Peggy void", () => { + //literal + testToExpression("()", "{()}", ~v="()", ()) + testToExpression( + "fn()=1", + "{(:$_let_$ :fn (:$$_lambda_$$ [_] {1}))}", + ~v="@{fn: lambda(_=>internal code)}", + (), + ) + testToExpression("fn()=1; fn()", "{(:$_let_$ :fn (:$$_lambda_$$ [_] {1})); (:fn ())}", ~v="1", ()) + testToExpression( + "fn(a)=(); call fn(1)", + "{(:$_let_$ :fn (:$$_lambda_$$ [a] {()})); (:$_let_$ :_ {(:fn 1)})}", + ~v="@{_: (),fn: lambda(a=>internal code)}", + (), + ) +}) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_TestHelpers.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_TestHelpers.res index 2c7dfb21..736c9c2f 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_TestHelpers.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_TestHelpers.res @@ -1,7 +1,6 @@ module ExpressionT = Reducer_Expression_T -module ExpressionValue = ReducerInterface.ExpressionValue +module ExternalExpressionValue = ReducerInterface.ExternalExpressionValue module ErrorValue = Reducer_ErrorValue -module Bindings = Reducer_Category_Bindings open Jest open Expect @@ -9,7 +8,7 @@ open Expect let unwrapRecord = rValue => rValue->Belt.Result.flatMap(value => switch value { - | ExpressionValue.EvRecord(aRecord) => Ok(aRecord) + | ExternalExpressionValue.EvRecord(aRecord) => Ok(aRecord) | _ => ErrorValue.RETodo("TODO: External bindings must be returned")->Error } ) @@ -19,18 +18,18 @@ let expectParseToBe = (expr: string, answer: string) => let expectEvalToBe = (expr: string, answer: string) => Reducer.evaluate(expr) - ->Reducer_Helpers.rRemoveDefaults - ->ExpressionValue.toStringResult + ->Reducer_Helpers.rRemoveDefaultsExternal + ->ExternalExpressionValue.toStringResult ->expect ->toBe(answer) let expectEvalError = (expr: string) => - Reducer.evaluate(expr)->ExpressionValue.toStringResult->expect->toMatch("Error\(") + Reducer.evaluate(expr)->ExternalExpressionValue.toStringResult->expect->toMatch("Error\(") let expectEvalBindingsToBe = (expr: string, bindings: Reducer.externalBindings, answer: string) => Reducer.evaluateUsingOptions(expr, ~externalBindings=Some(bindings), ~environment=None) - ->Reducer_Helpers.rRemoveDefaults - ->ExpressionValue.toStringResult + ->Reducer_Helpers.rRemoveDefaultsExternal + ->ExternalExpressionValue.toStringResult ->expect ->toBe(answer) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_TestMacroHelpers.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_TestMacroHelpers.res index 330f7da0..ffd5d964 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_TestMacroHelpers.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_TestMacroHelpers.res @@ -1,25 +1,27 @@ open Jest open Expect -module Bindings = Reducer_Expression_Bindings +module BindingsReplacer = Reducer_Expression_BindingsReplacer module Expression = Reducer_Expression -module ExpressionValue = ReducerInterface_ExpressionValue +// module ExpressionValue = ReducerInterface.ExpressionValue +module InternalExpressionValue = ReducerInterface.InternalExpressionValue module ExpressionWithContext = Reducer_ExpressionWithContext module Macro = Reducer_Expression_Macro module T = Reducer_Expression_T +module Bindings = Reducer_Bindings let testMacro_ = ( tester, - bindArray: array<(string, ExpressionValue.expressionValue)>, + bindArray: array<(string, InternalExpressionValue.t)>, expr: T.expression, expectedCode: string, ) => { - let bindings = Belt.Map.String.fromArray(bindArray) + let bindings = Bindings.fromArray(bindArray) tester(expr->T.toString, () => expr ->Macro.expandMacroCall( bindings, - ExpressionValue.defaultEnvironment, + InternalExpressionValue.defaultEnvironment, Expression.reduceExpression, ) ->ExpressionWithContext.toStringResult @@ -30,39 +32,43 @@ let testMacro_ = ( let testMacroEval_ = ( tester, - bindArray: array<(string, ExpressionValue.expressionValue)>, + bindArray: array<(string, InternalExpressionValue.t)>, expr: T.expression, expectedValue: string, ) => { - let bindings = Belt.Map.String.fromArray(bindArray) + let bindings = Bindings.fromArray(bindArray) tester(expr->T.toString, () => expr - ->Macro.doMacroCall(bindings, ExpressionValue.defaultEnvironment, Expression.reduceExpression) - ->ExpressionValue.toStringResult + ->Macro.doMacroCall( + bindings, + InternalExpressionValue.defaultEnvironment, + Expression.reduceExpression, + ) + ->InternalExpressionValue.toStringResult ->expect ->toEqual(expectedValue) ) } let testMacro = ( - bindArray: array<(string, ExpressionValue.expressionValue)>, + bindArray: array<(string, InternalExpressionValue.t)>, expr: T.expression, expectedExpr: string, ) => testMacro_(test, bindArray, expr, expectedExpr) let testMacroEval = ( - bindArray: array<(string, ExpressionValue.expressionValue)>, + bindArray: array<(string, InternalExpressionValue.t)>, expr: T.expression, expectedValue: string, ) => testMacroEval_(test, bindArray, expr, expectedValue) module MySkip = { let testMacro = ( - bindArray: array<(string, ExpressionValue.expressionValue)>, + bindArray: array<(string, InternalExpressionValue.t)>, expr: T.expression, expectedExpr: string, ) => testMacro_(Skip.test, bindArray, expr, expectedExpr) let testMacroEval = ( - bindArray: array<(string, ExpressionValue.expressionValue)>, + bindArray: array<(string, InternalExpressionValue.t)>, expr: T.expression, expectedValue: string, ) => testMacroEval_(Skip.test, bindArray, expr, expectedValue) @@ -70,12 +76,12 @@ module MySkip = { module MyOnly = { let testMacro = ( - bindArray: array<(string, ExpressionValue.expressionValue)>, + bindArray: array<(string, InternalExpressionValue.t)>, expr: T.expression, expectedExpr: string, ) => testMacro_(Only.test, bindArray, expr, expectedExpr) let testMacroEval = ( - bindArray: array<(string, ExpressionValue.expressionValue)>, + bindArray: array<(string, InternalExpressionValue.t)>, expr: T.expression, expectedValue: string, ) => testMacroEval_(Only.test, bindArray, expr, expectedValue) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_Compile_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_Compile_test.res new file mode 100644 index 00000000..71f90373 --- /dev/null +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_Compile_test.res @@ -0,0 +1,52 @@ +module Expression = Reducer_Expression +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module Bindings = Reducer_Bindings +module T = Reducer_Type_T +module TypeCompile = Reducer_Type_Compile + +open Jest +open Expect + +let myIevEval = (aTypeSourceCode: string) => + TypeCompile.ievFromTypeExpression(aTypeSourceCode, Expression.reduceExpression) +let myIevEvalToString = (aTypeSourceCode: string) => + myIevEval(aTypeSourceCode)->InternalExpressionValue.toStringResult + +let myIevExpectEqual = (aTypeSourceCode, answer) => + expect(myIevEvalToString(aTypeSourceCode))->toEqual(answer) + +let myIevTest = (test, aTypeSourceCode, answer) => + test(aTypeSourceCode, () => myIevExpectEqual(aTypeSourceCode, answer)) + +let myTypeEval = (aTypeSourceCode: string) => + TypeCompile.fromTypeExpression(aTypeSourceCode, Expression.reduceExpression) +let myTypeEvalToString = (aTypeSourceCode: string) => myTypeEval(aTypeSourceCode)->T.toStringResult + +let myTypeExpectEqual = (aTypeSourceCode, answer) => + expect(myTypeEvalToString(aTypeSourceCode))->toEqual(answer) + +let myTypeTest = (test, aTypeSourceCode, answer) => + test(aTypeSourceCode, () => myTypeExpectEqual(aTypeSourceCode, answer)) + +// | ItTypeIdentifier(string) +myTypeTest(test, "number", "number") +myTypeTest(test, "(number)", "number") +// | ItModifiedType({modifiedType: iType}) +myIevTest(test, "number<-min(0)", "Ok({min: 0,typeIdentifier: #number,typeTag: 'typeIdentifier'})") +myTypeTest(test, "number<-min(0)", "number<-min(0)") +// | ItTypeOr({typeOr: array}) +myTypeTest(test, "number | string", "(number | string)") +// | ItTypeFunction({inputs: array, output: iType}) +myTypeTest(test, "number => number => number", "(number => number => number)") +// | ItTypeArray({element: iType}) +myIevTest(test, "[number]", "Ok({element: #number,typeTag: 'typeArray'})") +myTypeTest(test, "[number]", "[number]") +// | ItTypeTuple({elements: array}) +myTypeTest(test, "[number, string]", "[number, string]") +// | ItTypeRecord({properties: Belt.Map.String.t}) +myIevTest( + test, + "{age: number, name: string}", + "Ok({properties: {age: #number,name: #string},typeTag: 'typeRecord'})", +) +myTypeTest(test, "{age: number, name: string}", "{age: number, name: string}") diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_TypeChecker_arguments_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_TypeChecker_arguments_test.res new file mode 100644 index 00000000..07da15bb --- /dev/null +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_TypeChecker_arguments_test.res @@ -0,0 +1,41 @@ +module Expression = Reducer_Expression +module ExpressionT = Reducer_Expression_T +module ErrorValue = Reducer_ErrorValue +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module Bindings = Reducer_Bindings +module T = Reducer_Type_T +module TypeChecker = Reducer_Type_TypeChecker + +open Jest +open Expect + +let checkArgumentsSourceCode = (aTypeSourceCode: string, sourceCode: string): result< + 'v, + ErrorValue.t, +> => { + let reducerFn = Expression.reduceExpression + let rResult = + Reducer.parse(sourceCode)->Belt.Result.flatMap(expr => + reducerFn(expr, Bindings.emptyBindings, InternalExpressionValue.defaultEnvironment) + ) + rResult->Belt.Result.flatMap(result => + switch result { + | IEvArray(args) => TypeChecker.checkArguments(aTypeSourceCode, args, reducerFn) + | _ => Js.Exn.raiseError("Arguments has to be an array") + } + ) +} + +let myCheckArguments = (aTypeSourceCode: string, sourceCode: string): string => + switch checkArgumentsSourceCode(aTypeSourceCode, sourceCode) { + | Ok(_) => "Ok" + | Error(error) => ErrorValue.errorToString(error) + } + +let myCheckArgumentsExpectEqual = (aTypeSourceCode, sourceCode, answer) => + expect(myCheckArguments(aTypeSourceCode, sourceCode))->toEqual(answer) + +let myCheckArgumentsTest = (test, aTypeSourceCode, sourceCode, answer) => + test(aTypeSourceCode, () => myCheckArgumentsExpectEqual(aTypeSourceCode, sourceCode, answer)) + +myCheckArgumentsTest(test, "number=>number=>number", "[1,2]", "Ok") diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_TypeChecker_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_TypeChecker_test.res new file mode 100644 index 00000000..efd9bb18 --- /dev/null +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Type/Reducer_Type_TypeChecker_test.res @@ -0,0 +1,70 @@ +module Expression = Reducer_Expression +module ExpressionT = Reducer_Expression_T +module ErrorValue = Reducer_ErrorValue +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module Bindings = Reducer_Bindings +module T = Reducer_Type_T +module TypeChecker = Reducer_Type_TypeChecker + +open Jest +open Expect + +// In development, you are expected to use TypeChecker.isTypeOf(aTypeSourceCode, result, reducerFn). +// isTypeOfSourceCode is written to use strings instead of expression values. + +let isTypeOfSourceCode = (aTypeSourceCode: string, sourceCode: string): result< + 'v, + ErrorValue.t, +> => { + let reducerFn = Expression.reduceExpression + let rResult = + Reducer.parse(sourceCode)->Belt.Result.flatMap(expr => + reducerFn(expr, Bindings.emptyBindings, InternalExpressionValue.defaultEnvironment) + ) + rResult->Belt.Result.flatMap(result => TypeChecker.isTypeOf(aTypeSourceCode, result, reducerFn)) +} + +let myTypeCheck = (aTypeSourceCode: string, sourceCode: string): string => + switch isTypeOfSourceCode(aTypeSourceCode, sourceCode) { + | Ok(_) => "Ok" + | Error(error) => ErrorValue.errorToString(error) + } + +let myTypeCheckExpectEqual = (aTypeSourceCode, sourceCode, answer) => + expect(myTypeCheck(aTypeSourceCode, sourceCode))->toEqual(answer) + +let myTypeCheckTest = (test, aTypeSourceCode, sourceCode, answer) => + test(aTypeSourceCode, () => myTypeCheckExpectEqual(aTypeSourceCode, sourceCode, answer)) + +myTypeCheckTest(test, "number", "1", "Ok") +myTypeCheckTest(test, "number", "'2'", "Expected type: number but got: '2'") +myTypeCheckTest(test, "string", "3", "Expected type: string but got: 3") +myTypeCheckTest(test, "string", "'a'", "Ok") +myTypeCheckTest(test, "[number]", "[1,2,3]", "Ok") +myTypeCheckTest(test, "[number]", "['a','a','a']", "Expected type: number but got: 'a'") +myTypeCheckTest(test, "[number]", "[1,'a',3]", "Expected type: number but got: 'a'") +myTypeCheckTest(test, "[number, string]", "[1,'a']", "Ok") +myTypeCheckTest(test, "[number, string]", "[1, 2]", "Expected type: string but got: 2") +myTypeCheckTest( + test, + "[number, string, string]", + "[1,'a']", + "Expected type: [number, string, string] but got: [1,'a']", +) +myTypeCheckTest( + test, + "[number, string]", + "[1,'a', 3]", + "Expected type: [number, string] but got: [1,'a',3]", +) +myTypeCheckTest(test, "{age: number, name: string}", "{age: 1, name: 'a'}", "Ok") +myTypeCheckTest( + test, + "{age: number, name: string}", + "{age: 1, name: 'a', job: 'IT'}", + "Expected type: {age: number, name: string} but got: {age: 1,job: 'IT',name: 'a'}", +) +myTypeCheckTest(test, "number | string", "1", "Ok") +myTypeCheckTest(test, "date | string", "1", "Expected type: (date | string) but got: 1") +myTypeCheckTest(test, "number<-min(10)", "10", "Ok") +myTypeCheckTest(test, "number<-min(10)", "0", "Expected type: number<-min(10) but got: 0") diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_externalBindings_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_externalBindings_test.res index 1fcd3fbf..bb1a4d35 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_externalBindings_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_externalBindings_test.res @@ -1,11 +1,14 @@ -// TODO: Reimplement with usual parse open Jest open Reducer_TestHelpers describe("Eval with Bindings", () => { - testEvalBindingsToBe("x", list{("x", ExpressionValue.EvNumber(1.))}, "Ok(1)") - testEvalBindingsToBe("x+1", list{("x", ExpressionValue.EvNumber(1.))}, "Ok(2)") + testEvalBindingsToBe("x", list{("x", ExternalExpressionValue.EvNumber(1.))}, "Ok(1)") + testEvalBindingsToBe("x+1", list{("x", ExternalExpressionValue.EvNumber(1.))}, "Ok(2)") testParseToBe("y = x+1; y", "Ok({(:$_let_$ :y {(:add :x 1)}); :y})") - testEvalBindingsToBe("y = x+1; y", list{("x", ExpressionValue.EvNumber(1.))}, "Ok(2)") - testEvalBindingsToBe("y = x+1", list{("x", ExpressionValue.EvNumber(1.))}, "Ok({x: 1,y: 2})") + testEvalBindingsToBe("y = x+1; y", list{("x", ExternalExpressionValue.EvNumber(1.))}, "Ok(2)") + testEvalBindingsToBe( + "y = x+1", + list{("x", ExternalExpressionValue.EvNumber(1.))}, + "Ok(@{x: 1,y: 2})", + ) }) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_functionTricks_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_functionTricks_test.res index ca6f0399..68614f89 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_functionTricks_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_functionTricks_test.res @@ -39,15 +39,15 @@ describe("symbol not defined", () => { }) describe("call and bindings", () => { - testEvalToBe("f(x)=x+1", "Ok({f: lambda(x=>internal code)})") + testEvalToBe("f(x)=x+1", "Ok(@{f: lambda(x=>internal code)})") testEvalToBe("f(x)=x+1; f(1)", "Ok(2)") - testEvalToBe("f=1;y=2", "Ok({f: 1,y: 2})") - testEvalToBe("f(x)=x+1; y=f(1)", "Ok({f: lambda(x=>internal code),y: 2})") + testEvalToBe("f=1;y=2", "Ok(@{f: 1,y: 2})") + testEvalToBe("f(x)=x+1; y=f(1)", "Ok(@{f: lambda(x=>internal code),y: 2})") testEvalToBe("f(x)=x+1; y=f(1); f(1)", "Ok(2)") - testEvalToBe("f(x)=x+1; y=f(1); z=f(1)", "Ok({f: lambda(x=>internal code),y: 2,z: 2})") + testEvalToBe("f(x)=x+1; y=f(1); z=f(1)", "Ok(@{f: lambda(x=>internal code),y: 2,z: 2})") testEvalToBe( "f(x)=x+1; g(x)=f(x)+1", - "Ok({f: lambda(x=>internal code),g: lambda(x=>internal code)})", + "Ok(@{f: lambda(x=>internal code),g: lambda(x=>internal code)})", ) testParseToBe( "f=99; g(x)=f; g(2)", @@ -57,7 +57,7 @@ describe("call and bindings", () => { testEvalToBe("f(x)=x; g(x)=f(x); g(2)", "Ok(2)") testEvalToBe( "f(x)=x+1; g(x)=f(x)+1; y=g(2)", - "Ok({f: lambda(x=>internal code),g: lambda(x=>internal code),y: 4})", + "Ok(@{f: lambda(x=>internal code),g: lambda(x=>internal code),y: 4})", ) testEvalToBe("f(x)=x+1; g(x)=f(x)+1; g(2)", "Ok(4)") }) @@ -65,7 +65,7 @@ describe("call and bindings", () => { describe("function tricks", () => { testEvalError("f(x)=f(y)=2; f(2)") //Error because chain assignment is not allowed testEvalToBe("y=2;g(x)=y+1;g(2)", "Ok(3)") - testEvalToBe("y=2;g(x)=inspect(y)+1", "Ok({g: lambda(x=>internal code),y: 2})") + testEvalToBe("y=2;g(x)=inspect(y)+1", "Ok(@{g: lambda(x=>internal code),y: 2})") MySkip.testEvalToBe("f(x) = x(x); f(f)", "????") // TODO: Infinite loop. Any solution? Catching proper exception or timeout? MySkip.testEvalToBe("f(x, x)=x+x; f(1,2)", "????") // TODO: Duplicate parameters testEvalToBe("myadd(x,y)=x+y; z=myadd; z", "Ok(lambda(x,y=>internal code))") @@ -75,7 +75,7 @@ describe("function tricks", () => { describe("lambda in structures", () => { testEvalToBe( "myadd(x,y)=x+y; z=[myadd]", - "Ok({myadd: lambda(x,y=>internal code),z: [lambda(x,y=>internal code)]})", + "Ok(@{myadd: lambda(x,y=>internal code),z: [lambda(x,y=>internal code)]})", ) testEvalToBe("myadd(x,y)=x+y; z=[myadd]; z[0]", "Ok(lambda(x,y=>internal code))") testEvalToBe("myadd(x,y)=x+y; z=[myadd]; z[0](3,2)", "Ok(5)") diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_mapReduce_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_mapReduce_test.res index f3df0962..f89173d5 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_mapReduce_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_mapReduce_test.res @@ -1,15 +1,6 @@ open Jest open Reducer_TestHelpers -describe("map reduce", () => { - testEvalToBe("double(x)=2*x; arr=[1,2,3]; map(arr, double)", "Ok([2,4,6])") - testEvalToBe("myadd(acc,x)=acc+x; arr=[1,2,3]; reduce(arr, 0, myadd)", "Ok(6)") - testEvalToBe("change(acc,x)=acc*x+x; arr=[1,2,3]; reduce(arr, 0, change)", "Ok(15)") - testEvalToBe("change(acc,x)=acc*x+x; arr=[1,2,3]; reduceReverse(arr, 0, change)", "Ok(9)") - testEvalToBe("arr=[1,2,3]; reverse(arr)", "Ok([3,2,1])") - testEvalToBe("check(x)=(x==2);arr=[1,2,3]; filter(arr,check)", "Ok([2])") -}) - Skip.describe("map reduce (sam)", () => { testEvalToBe("addone(x)=x+1; map(2, addone)", "Error???") testEvalToBe("addone(x)=x+1; map(2, {x: addone})", "Error???") diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_ternaryOperator_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_ternaryOperator_test.res index 25353e89..22fa8328 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_ternaryOperator_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_ternaryOperator_test.res @@ -10,5 +10,5 @@ describe("Evaluate ternary operator", () => { testEvalToBe("false ? 'YES' : 'NO'", "Ok('NO')") testEvalToBe("2 > 1 ? 'YES' : 'NO'", "Ok('YES')") testEvalToBe("2 <= 1 ? 'YES' : 'NO'", "Ok('NO')") - testEvalToBe("1+1 ? 'YES' : 'NO'", "Error(Expected type: Boolean)") + testEvalToBe("1+1 ? 'YES' : 'NO'", "Error(Expected type: Boolean but got: )") }) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_test.res index 32aad5d3..39f387a1 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_test.res @@ -39,7 +39,7 @@ describe("eval", () => { testEvalToBe("x=1; y=x+1; y+1", "Ok(3)") testEvalError("1; x=1") testEvalError("1; 1") - testEvalToBe("x=1; x=1", "Ok({x: 1})") + testEvalToBe("x=1; x=1", "Ok(@{x: 1})") }) }) diff --git a/packages/squiggle-lang/__tests__/ReducerInterface/ReducerInterface_Distribution_test.res b/packages/squiggle-lang/__tests__/ReducerInterface/ReducerInterface_Distribution_test.res index ecc07bfa..3083b71b 100644 --- a/packages/squiggle-lang/__tests__/ReducerInterface/ReducerInterface_Distribution_test.res +++ b/packages/squiggle-lang/__tests__/ReducerInterface/ReducerInterface_Distribution_test.res @@ -41,12 +41,6 @@ describe("eval on distribution functions", () => { describe("normalize", () => { testEval("normalize(normal(5,2))", "Ok(Normal(5,2))") }) - describe("toPointSet", () => { - testEval("toPointSet(normal(5,2))", "Ok(Point Set Distribution)") - }) - describe("toSampleSet", () => { - testEval("toSampleSet(normal(5,2), 100)", "Ok(Sample Set Distribution)") - }) describe("add", () => { testEval("add(normal(5,2), normal(10,2))", "Ok(Normal(15,2.8284271247461903))") testEval("add(normal(5,2), lognormal(10,2))", "Ok(Sample Set Distribution)") diff --git a/packages/squiggle-lang/__tests__/ReducerInterface/ReducerInterface_ExpressionValue_test.res b/packages/squiggle-lang/__tests__/ReducerInterface/ReducerInterface_ExpressionValue_test.res index 888aca7e..b09e20ae 100644 --- a/packages/squiggle-lang/__tests__/ReducerInterface/ReducerInterface_ExpressionValue_test.res +++ b/packages/squiggle-lang/__tests__/ReducerInterface/ReducerInterface_ExpressionValue_test.res @@ -1,4 +1,4 @@ -open ReducerInterface.ExpressionValue +open ReducerInterface.ExternalExpressionValue open Jest open Expect diff --git a/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_FunctionRegistryLibrary_test.res b/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_FunctionRegistryLibrary_test.res new file mode 100644 index 00000000..2418b4d8 --- /dev/null +++ b/packages/squiggle-lang/__tests__/SquiggleLibrary/SquiggleLibrary_FunctionRegistryLibrary_test.res @@ -0,0 +1,98 @@ +open Jest +open Expect +open Reducer_TestHelpers + +let expectEvalToBeOk = (expr: string) => + Reducer.evaluate(expr)->Reducer_Helpers.rRemoveDefaultsExternal->E.R.isOk->expect->toBe(true) + +let registry = FunctionRegistry_Library.registry +let examples = E.A.to_list(FunctionRegistry_Core.Registry.allExamples(registry)) + +describe("FunctionRegistry Library", () => { + describe("Regular tests", () => { + testEvalToBe("List.make(3, 'HI')", "Ok(['HI','HI','HI'])") + testEvalToBe("make(3, 'HI')", "Error(Function not found: make(Number,String))") + testEvalToBe("List.upTo(1,3)", "Ok([1,2,3])") + testEvalToBe("List.first([3,5,8])", "Ok(3)") + testEvalToBe("List.last([3,5,8])", "Ok(8)") + testEvalToBe("List.reverse([3,5,8])", "Ok([8,5,3])") + testEvalToBe("double(x)=2*x; arr=[1,2,3]; List.map(arr, double)", "Ok([2,4,6])") + testEvalToBe("double(x)=2*x; arr=[1,2,3]; map(arr, double)", "Ok([2,4,6])") + testEvalToBe("myadd(acc,x)=acc+x; arr=[1,2,3]; List.reduce(arr, 0, myadd)", "Ok(6)") + testEvalToBe("change(acc,x)=acc*x+x; arr=[1,2,3]; List.reduce(arr, 0, change)", "Ok(15)") + testEvalToBe("change(acc,x)=acc*x+x; arr=[1,2,3]; List.reduceReverse(arr, 0, change)", "Ok(9)") + testEvalToBe("check(x)=(x==2);arr=[1,2,3]; List.filter(arr,check)", "Ok([2])") + testEvalToBe("arr=[1,2,3]; List.reverse(arr)", "Ok([3,2,1])") + testEvalToBe("Dist.normal(5,2)", "Ok(Normal(5,2))") + testEvalToBe("normal(5,2)", "Ok(Normal(5,2))") + testEvalToBe("normal({mean:5,stdev:2})", "Ok(Normal(5,2))") + testEvalToBe("-2 to 4", "Ok(Normal(1,1.8238704957353074))") + testEvalToBe("pointMass(5)", "Ok(PointMass(5))") + testEvalToBe("Number.floor(5.5)", "Ok(5)") + testEvalToBe("Number.ceil(5.5)", "Ok(6)") + testEvalToBe("floor(5.5)", "Ok(5)") + testEvalToBe("ceil(5.5)", "Ok(6)") + testEvalToBe("Number.abs(5.5)", "Ok(5.5)") + testEvalToBe("abs(5.5)", "Ok(5.5)") + testEvalToBe("Number.exp(10)", "Ok(22026.465794806718)") + testEvalToBe("Number.log10(10)", "Ok(1)") + testEvalToBe("Number.log2(10)", "Ok(3.321928094887362)") + testEvalToBe("Number.sum([2,5,3])", "Ok(10)") + testEvalToBe("sum([2,5,3])", "Ok(10)") + testEvalToBe("Number.product([2,5,3])", "Ok(30)") + testEvalToBe("Number.min([2,5,3])", "Ok(2)") + testEvalToBe("Number.max([2,5,3])", "Ok(5)") + testEvalToBe("Number.mean([0,5,10])", "Ok(5)") + testEvalToBe("Number.geomean([1,5,18])", "Ok(4.481404746557164)") + testEvalToBe("Number.stdev([0,5,10,15])", "Ok(5.5901699437494745)") + testEvalToBe("Number.variance([0,5,10,15])", "Ok(31.25)") + testEvalToBe("Number.sort([10,0,15,5])", "Ok([0,5,10,15])") + testEvalToBe("Number.cumsum([1,5,3])", "Ok([1,6,9])") + testEvalToBe("Number.cumprod([1,5,3])", "Ok([1,5,15])") + testEvalToBe("Number.diff([1,5,3])", "Ok([4,-2])") + testEvalToBe( + "Dist.logScore({estimate: normal(5,2), answer: normal(5.2,1), prior: normal(5.5,3)})", + "Ok(-0.33591375663884876)", + ) + testEvalToBe( + "Dist.logScore({estimate: normal(5,2), answer: normal(5.2,1)})", + "Ok(0.32244107041564646)", + ) + testEvalToBe("Dist.logScore({estimate: normal(5,2), answer: 4.5})", "Ok(1.6433360626394853)") + testEvalToBe("Dist.klDivergence(normal(5,2), normal(5,1.5))", "Ok(0.06874342818671068)") + testEvalToBe("SampleSet.fromList([3,5,2,3,5,2,3,5,2,3,3,5])", "Ok(Sample Set Distribution)") + testEvalToBe("SampleSet.fromList([3,5,2,3,5,2,3,5,2,3,3,5])", "Ok(Sample Set Distribution)") + testEvalToBe("SampleSet.fromFn({|| sample(normal(5,2))})", "Ok(Sample Set Distribution)") + testEvalToBe( + "addOne(t)=t+1; SampleSet.toList(SampleSet.map(SampleSet.fromList([1,2,3,4,5,6]), addOne))", + "Ok([2,3,4,5,6,7])", + ) + testEvalToBe( + "SampleSet.toList(SampleSet.mapN([SampleSet.fromList([1,2,3,4,5,6]), SampleSet.fromList([6, 5, 4, 3, 2, 1])], {|x| x[0] > x[1] ? x[0] : x[1]}))", + "Ok([6,5,4,4,5,6])", + ) + }) + + describe("Fn auto-testing", () => { + testAll("tests of validity", examples, r => { + expectEvalToBeOk(r) + }) + + testAll( + "tests of type", + E.A.to_list( + FunctionRegistry_Core.Registry.allExamplesWithFns(registry)->E.A2.filter(((fn, _)) => + E.O.isSome(fn.output) + ), + ), + ((fn, example)) => { + let responseType = + example + ->Reducer.evaluate + ->E.R2.fmap(ReducerInterface_InternalExpressionValue.externalValueToValueType) + let expectedOutputType = fn.output |> E.O.toExn("") + expect(responseType)->toEqual(Ok(expectedOutputType)) + }, + ) + }) +}) diff --git a/packages/squiggle-lang/__tests__/TS/Jstat_test.ts b/packages/squiggle-lang/__tests__/TS/Jstat_test.ts index 16cb5f6e..039c517a 100644 --- a/packages/squiggle-lang/__tests__/TS/Jstat_test.ts +++ b/packages/squiggle-lang/__tests__/TS/Jstat_test.ts @@ -5,7 +5,7 @@ import { testRun } from "./TestHelpers"; describe("cumulative density function of a normal distribution", () => { test("at 3 stdevs to the right of the mean is near 1", () => { fc.assert( - fc.property(fc.float(), fc.float({ min: 1e-7 }), (mean, stdev) => { + fc.property(fc.integer(), fc.integer({ min: 1 }), (mean, stdev) => { let threeStdevsAboveMean = mean + 3 * stdev; let squiggleString = `cdf(normal(${mean}, ${stdev}), ${threeStdevsAboveMean})`; let squiggleResult = testRun(squiggleString); @@ -16,7 +16,7 @@ describe("cumulative density function of a normal distribution", () => { test("at 3 stdevs to the left of the mean is near 0", () => { fc.assert( - fc.property(fc.float(), fc.float({ min: 1e-7 }), (mean, stdev) => { + fc.property(fc.integer(), fc.integer({ min: 1 }), (mean, stdev) => { let threeStdevsBelowMean = mean - 3 * stdev; let squiggleString = `cdf(normal(${mean}, ${stdev}), ${threeStdevsBelowMean})`; let squiggleResult = testRun(squiggleString); diff --git a/packages/squiggle-lang/__tests__/TS/SampleSet_test.ts b/packages/squiggle-lang/__tests__/TS/SampleSet_test.ts index 2c77e210..b235bf1b 100644 --- a/packages/squiggle-lang/__tests__/TS/SampleSet_test.ts +++ b/packages/squiggle-lang/__tests__/TS/SampleSet_test.ts @@ -4,13 +4,16 @@ import * as fc from "fast-check"; // Beware: float64Array makes it appear in an infinite loop. let arrayGen = () => - fc.float32Array({ - minLength: 10, - maxLength: 10000, - noDefaultInfinity: true, - noNaN: true, - }); - + fc + .float32Array({ + minLength: 10, + maxLength: 10000, + noDefaultInfinity: true, + noNaN: true, + }) + .filter( + (xs_) => Math.min(...Array.from(xs_)) != Math.max(...Array.from(xs_)) + ); describe("cumulative density function", () => { let n = 10000; @@ -119,11 +122,7 @@ describe("cumulative density function", () => { { sampleCount: n, xyPointLength: 100 } ); let cdfValue = dist.cdf(x).value; - if (x < Math.min(...xs)) { - expect(cdfValue).toEqual(0); - } else { - expect(cdfValue).toBeGreaterThan(0); - } + expect(cdfValue).toBeGreaterThanOrEqual(0); }) ); }); diff --git a/packages/squiggle-lang/__tests__/TS/Scalars_test.ts b/packages/squiggle-lang/__tests__/TS/Scalars_test.ts index 261b74d1..4dd33ab7 100644 --- a/packages/squiggle-lang/__tests__/TS/Scalars_test.ts +++ b/packages/squiggle-lang/__tests__/TS/Scalars_test.ts @@ -5,15 +5,11 @@ import * as fc from "fast-check"; describe("Scalar manipulation is well-modeled by javascript math", () => { test("in the case of natural logarithms", () => { fc.assert( - fc.property(fc.float(), (x) => { + fc.property(fc.integer(), (x) => { let squiggleString = `log(${x})`; let squiggleResult = testRun(squiggleString); if (x == 0) { expect(squiggleResult.value).toEqual(-Infinity); - } else if (x < 0) { - expect(squiggleResult.value).toEqual( - "somemessage (confused why a test case hasn't pointed out to me that this message is bogus)" - ); } else { expect(squiggleResult.value).toEqual(Math.log(x)); } @@ -23,7 +19,7 @@ describe("Scalar manipulation is well-modeled by javascript math", () => { test("in the case of addition (with assignment)", () => { fc.assert( - fc.property(fc.float(), fc.float(), fc.float(), (x, y, z) => { + fc.property(fc.integer(), fc.integer(), fc.integer(), (x, y, z) => { let squiggleString = `x = ${x}; y = ${y}; z = ${z}; x + y + z`; let squiggleResult = testRun(squiggleString); expect(squiggleResult.value).toBeCloseTo(x + y + z); diff --git a/packages/squiggle-lang/__tests__/TS/Symbolic_test.ts b/packages/squiggle-lang/__tests__/TS/Symbolic_test.ts index b949a513..2411cd79 100644 --- a/packages/squiggle-lang/__tests__/TS/Symbolic_test.ts +++ b/packages/squiggle-lang/__tests__/TS/Symbolic_test.ts @@ -1,11 +1,10 @@ -import { errorValueToString } from "../../src/js/index"; import { testRun } from "./TestHelpers"; import * as fc from "fast-check"; describe("Symbolic mean", () => { test("mean(triangular(x,y,z))", () => { fc.assert( - fc.property(fc.float(), fc.float(), fc.float(), (x, y, z) => { + fc.property(fc.integer(), fc.integer(), fc.integer(), (x, y, z) => { if (!(x < y && y < z)) { try { let squiggleResult = testRun(`mean(triangular(${x},${y},${z}))`); diff --git a/packages/squiggle-lang/__tests__/TestHelpers.res b/packages/squiggle-lang/__tests__/TestHelpers.res index 71805c70..898bb3a9 100644 --- a/packages/squiggle-lang/__tests__/TestHelpers.res +++ b/packages/squiggle-lang/__tests__/TestHelpers.res @@ -29,7 +29,7 @@ let {toFloat, toDist, toString, toError, fmap} = module(DistributionOperation.Ou let fnImage = (theFn, inps) => Js.Array.map(theFn, inps) -let env: DistributionOperation.env = { +let env: GenericDist.env = { sampleCount: MagicNumbers.Environment.defaultSampleCount, xyPointLength: MagicNumbers.Environment.defaultXYPointLength, } diff --git a/packages/squiggle-lang/bsconfig.json b/packages/squiggle-lang/bsconfig.json index 81e4e133..1fa663ac 100644 --- a/packages/squiggle-lang/bsconfig.json +++ b/packages/squiggle-lang/bsconfig.json @@ -31,6 +31,7 @@ "basic": false } }, + "external-stdlib": "@rescript/std", "refmt": 3, "warnings": { "number": "+A-42-48-9-30-4" diff --git a/packages/squiggle-lang/lint.sh b/packages/squiggle-lang/lint.sh index 2c1f53e5..c047fcfc 100755 --- a/packages/squiggle-lang/lint.sh +++ b/packages/squiggle-lang/lint.sh @@ -19,7 +19,7 @@ do fi done -files=`ls src/rescript/**/**/*.resi src/rescript/**/*.resi` # src/rescript/*/resi +files=`ls src/rescript/**/*.resi` # src/rescript/*/resi for file in $files do current=`cat $file` diff --git a/packages/squiggle-lang/package.json b/packages/squiggle-lang/package.json index abc9f239..d46513fd 100644 --- a/packages/squiggle-lang/package.json +++ b/packages/squiggle-lang/package.json @@ -1,12 +1,14 @@ { "name": "@quri/squiggle-lang", - "version": "0.2.9", + "version": "0.2.11", "homepage": "https://squiggle-language.com", "license": "MIT", "scripts": { "peggy": "peggy --cache", + "rescript": "rescript", "build": "yarn build:peggy && yarn build:rescript && yarn build:typescript", - "build:peggy": "find . -type f -name *.peggy -exec yarn peggy {} \\;", + "build:peggy:helpers": "tsc --module commonjs --outDir src/rescript/Reducer/Reducer_Peggy/ src/rescript/Reducer/Reducer_Peggy/helpers.ts", + "build:peggy": "yarn build:peggy:helpers && find . -type f -name *.peggy -exec yarn peggy {} \\;", "build:rescript": "rescript build -with-deps", "build:typescript": "tsc", "bundle": "webpack", @@ -18,6 +20,7 @@ "test:ts": "jest __tests__/TS/", "test:rescript": "jest --modulePathIgnorePatterns=__tests__/TS/*", "test:watch": "jest --watchAll", + "test:fnRegistry": "jest __tests__/SquiggleLibrary/SquiggleLibrary_FunctionRegistryLibrary_test.bs.js", "coverage:rescript": "rm -f *.coverage && yarn clean && BISECT_ENABLE=yes yarn build && yarn test:rescript && bisect-ppx-report html", "coverage:ts": "yarn clean && yarn build && nyc --reporter=lcov yarn test:ts", "coverage:rescript:ci": "yarn clean && BISECT_ENABLE=yes yarn build:rescript && yarn test:rescript && bisect-ppx-report send-to Codecov", @@ -29,6 +32,7 @@ "format:prettier": "prettier --write .", "format": "yarn format:rescript && yarn format:prettier", "prepack": "yarn build && yarn test && yarn bundle", + "all:rescript": "yarn build:rescript && yarn test:rescript && yarn format:rescript", "all": "yarn build && yarn bundle && yarn test" }, "keywords": [ @@ -36,11 +40,12 @@ ], "author": "Quantified Uncertainty Research Institute", "dependencies": { + "@rescript/std": "^9.1.4", "@stdlib/stats": "^0.0.13", "jstat": "^1.9.5", - "mathjs": "^10.6.0", - "pdfast": "^0.2.0", - "rescript": "^9.1.4" + "lodash": "^4.17.21", + "mathjs": "^11.0.1", + "pdfast": "^0.2.0" }, "devDependencies": { "@glennsl/rescript-jest": "^0.9.0", @@ -50,20 +55,21 @@ "bisect_ppx": "^2.7.1", "chalk": "^5.0.1", "codecov": "^3.8.3", - "fast-check": "^2.25.0", - "gentype": "^4.4.0", + "fast-check": "^3.1.0", + "gentype": "^4.5.0", "jest": "^27.5.1", - "lodash": "^4.17.21", "moduleserve": "^0.9.1", "nyc": "^15.1.0", "peggy": "^2.0.1", + "prettier": "^2.7.1", "reanalyze": "^2.23.0", + "rescript": "^9.1.4", "rescript-fast-check": "^1.1.1", "ts-jest": "^27.1.4", "ts-loader": "^9.3.0", - "ts-node": "^10.8.1", - "typescript": "^4.7.3", - "webpack": "^5.73.0", + "ts-node": "^10.9.1", + "typescript": "^4.7.4", + "webpack": "^5.74.0", "webpack-cli": "^4.10.0" }, "source": "./src/js/index.ts", diff --git a/packages/squiggle-lang/src/js/index.ts b/packages/squiggle-lang/src/js/index.ts index 592de8e3..acee005c 100644 --- a/packages/squiggle-lang/src/js/index.ts +++ b/packages/squiggle-lang/src/js/index.ts @@ -37,6 +37,8 @@ import { Distribution, shape } from "./distribution"; export { Distribution, resultMap, defaultEnvironment }; export type { result, shape, environment, lambdaValue, squiggleExpression }; +export { parse } from "./parse"; + export let defaultSamplingInputs: environment = { sampleCount: 10000, xyPointLength: 10000, @@ -118,85 +120,86 @@ function createTsExport( x: expressionValue, environment: environment ): squiggleExpression { - switch (x.tag) { - case "EvArray": - // genType doesn't convert anything more than 2 layers down into {tag: x, value: x} - // format, leaving it as the raw values. This converts the raw values - // directly into typescript values. - // - // The casting here is because genType is about the types of the returned - // values, claiming they are fully recursive when that's not actually the - // case - return tag( - "array", - x.value.map((arrayItem): squiggleExpression => { - switch (arrayItem.tag) { - case "EvRecord": - return tag( - "record", - _.mapValues(arrayItem.value, (recordValue: unknown) => - convertRawToTypescript( - recordValue as rescriptExport, - environment - ) + switch (x) { + case "EvVoid": + return tag("void", ""); + default: { + switch (x.tag) { + case "EvArray": + // genType doesn't convert anything more than 2 layers down into {tag: x, value: x} + // format, leaving it as the raw values. This converts the raw values + // directly into typescript values. + // + // The casting here is because genType is about the types of the returned + // values, claiming they are fully recursive when that's not actually the + // case + return tag( + "array", + x.value.map( + (arrayItem): squiggleExpression => + convertRawToTypescript( + arrayItem as unknown as rescriptExport, + environment ) - ); - case "EvArray": - let y = arrayItem.value as unknown as rescriptExport[]; - return tag( - "array", - y.map((childArrayItem) => - convertRawToTypescript(childArrayItem, environment) - ) - ); - default: - return createTsExport(arrayItem, environment); - } - }) - ); - case "EvArrayString": - return tag("arraystring", x.value); - case "EvBool": - return tag("boolean", x.value); - case "EvCall": - return tag("call", x.value); - case "EvLambda": - return tag("lambda", x.value); - case "EvDistribution": - return tag("distribution", new Distribution(x.value, environment)); - case "EvNumber": - return tag("number", x.value); - case "EvRecord": - // genType doesn't support records, so we have to do the raw conversion ourself - let result: tagged<"record", { [key: string]: squiggleExpression }> = tag( - "record", - _.mapValues(x.value, (x: unknown) => - convertRawToTypescript(x as rescriptExport, environment) - ) - ); - return result; - case "EvString": - return tag("string", x.value); - case "EvSymbol": - return tag("symbol", x.value); - case "EvDate": - return tag("date", x.value); - case "EvTimeDuration": - return tag("timeDuration", x.value); - case "EvDeclaration": - return tag("lambdaDeclaration", x.value); - case "EvTypeIdentifier": - return tag("typeIdentifier", x.value); - case "EvModule": - let moduleResult: tagged< - "module", - { [key: string]: squiggleExpression } - > = tag( - "module", - _.mapValues(x.value, (x: unknown) => - convertRawToTypescript(x as rescriptExport, environment) - ) - ); - return moduleResult; + ) + ); + case "EvArrayString": + return tag("arraystring", x.value); + case "EvBool": + return tag("boolean", x.value); + case "EvCall": + return tag("call", x.value); + case "EvLambda": + return tag("lambda", x.value); + case "EvDistribution": + return tag("distribution", new Distribution(x.value, environment)); + case "EvNumber": + return tag("number", x.value); + case "EvRecord": + // genType doesn't support records, so we have to do the raw conversion ourself + let result: tagged<"record", { [key: string]: squiggleExpression }> = + tag( + "record", + _.mapValues(x.value, (x: unknown) => + convertRawToTypescript(x as rescriptExport, environment) + ) + ); + return result; + case "EvString": + return tag("string", x.value); + case "EvSymbol": + return tag("symbol", x.value); + case "EvDate": + return tag("date", x.value); + case "EvTimeDuration": + return tag("timeDuration", x.value); + case "EvDeclaration": + return tag("lambdaDeclaration", x.value); + case "EvTypeIdentifier": + return tag("typeIdentifier", x.value); + case "EvType": + let typeResult: tagged< + "type", + { [key: string]: squiggleExpression } + > = tag( + "type", + _.mapValues(x.value, (x: unknown) => + convertRawToTypescript(x as rescriptExport, environment) + ) + ); + return typeResult; + case "EvModule": + let moduleResult: tagged< + "module", + { [key: string]: squiggleExpression } + > = tag( + "module", + _.mapValues(x.value, (x: unknown) => + convertRawToTypescript(x as rescriptExport, environment) + ) + ); + return moduleResult; + } + } } } diff --git a/packages/squiggle-lang/src/js/parse.ts b/packages/squiggle-lang/src/js/parse.ts new file mode 100644 index 00000000..730bda2e --- /dev/null +++ b/packages/squiggle-lang/src/js/parse.ts @@ -0,0 +1,23 @@ +import { + errorValue, + parse as parseRescript, +} from "../rescript/TypescriptInterface.gen"; +import { result } from "./types"; +import { AnyPeggyNode } from "../rescript/Reducer/Reducer_Peggy/helpers"; + +export function parse( + squiggleString: string +): result> { + const maybeExpression = parseRescript(squiggleString); + if (maybeExpression.tag === "Ok") { + return { tag: "Ok", value: maybeExpression.value as AnyPeggyNode }; + } else { + if ( + typeof maybeExpression.value !== "object" || + maybeExpression.value.tag !== "RESyntaxError" + ) { + throw new Error("Expected syntax error"); + } + return { tag: "Error", value: maybeExpression.value }; + } +} diff --git a/packages/squiggle-lang/src/js/rescript_interop.ts b/packages/squiggle-lang/src/js/rescript_interop.ts index 41baa2e3..80548a7f 100644 --- a/packages/squiggle-lang/src/js/rescript_interop.ts +++ b/packages/squiggle-lang/src/js/rescript_interop.ts @@ -129,8 +129,10 @@ export type squiggleExpression = | tagged<"timeDuration", number> | tagged<"lambdaDeclaration", lambdaDeclaration> | tagged<"record", { [key: string]: squiggleExpression }> + | tagged<"type", { [key: string]: squiggleExpression }> | tagged<"typeIdentifier", string> - | tagged<"module", { [key: string]: squiggleExpression }>; + | tagged<"module", { [key: string]: squiggleExpression }> + | tagged<"void", string>; export { lambdaValue }; diff --git a/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.res b/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.res index 668fcd07..319535c1 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.res +++ b/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.res @@ -4,12 +4,9 @@ type error = DistributionTypes.error // TODO: It could be great to use a cache for some calculations (basically, do memoization). Also, better analytics/tracking could go a long way. -type env = { - sampleCount: int, - xyPointLength: int, -} +type env = GenericDist.env -let defaultEnv = { +let defaultEnv: env = { sampleCount: MagicNumbers.Environment.defaultSampleCount, xyPointLength: MagicNumbers.Environment.defaultXYPointLength, } @@ -93,7 +90,7 @@ module OutputLocal = { } } -let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { +let rec run = (~env: env, functionCallInfo: functionCallInfo): outputType => { let {sampleCount, xyPointLength} = env let reCall = (~env=env, ~functionCallInfo=functionCallInfo, ()) => { @@ -101,14 +98,14 @@ let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { } let toPointSetFn = r => { - switch reCall(~functionCallInfo=FromDist(ToDist(ToPointSet), r), ()) { + switch reCall(~functionCallInfo=FromDist(#ToDist(ToPointSet), r), ()) { | Dist(PointSet(p)) => Ok(p) | e => Error(OutputLocal.toErrorOrUnreachable(e)) } } let toSampleSetFn = r => { - switch reCall(~functionCallInfo=FromDist(ToDist(ToSampleSet(sampleCount)), r), ()) { + switch reCall(~functionCallInfo=FromDist(#ToDist(ToSampleSet(sampleCount)), r), ()) { | Dist(SampleSet(p)) => Ok(p) | e => Error(OutputLocal.toErrorOrUnreachable(e)) } @@ -116,13 +113,13 @@ let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { let scaleMultiply = (r, weight) => reCall( - ~functionCallInfo=FromDist(ToDistCombination(Pointwise, #Multiply, #Float(weight)), r), + ~functionCallInfo=FromDist(#ToDistCombination(Pointwise, #Multiply, #Float(weight)), r), (), )->OutputLocal.toDistR let pointwiseAdd = (r1, r2) => reCall( - ~functionCallInfo=FromDist(ToDistCombination(Pointwise, #Add, #Dist(r2)), r1), + ~functionCallInfo=FromDist(#ToDistCombination(Pointwise, #Add, #Dist(r2)), r1), (), )->OutputLocal.toDistR @@ -131,49 +128,40 @@ let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { dist: genericDist, ): outputType => { let response = switch subFnName { - | ToFloat(distToFloatOperation) => + | #ToFloat(distToFloatOperation) => GenericDist.toFloatOperation(dist, ~toPointSetFn, ~distToFloatOperation) ->E.R2.fmap(r => Float(r)) ->OutputLocal.fromResult - | ToString(ToString) => dist->GenericDist.toString->String - | ToString(ToSparkline(bucketCount)) => + | #ToString(ToString) => dist->GenericDist.toString->String + | #ToString(ToSparkline(bucketCount)) => GenericDist.toSparkline(dist, ~sampleCount, ~bucketCount, ()) ->E.R2.fmap(r => String(r)) ->OutputLocal.fromResult - | ToDist(Inspect) => { + | #ToDist(Inspect) => { Js.log2("Console log requested: ", dist) Dist(dist) } - | ToDist(Normalize) => dist->GenericDist.normalize->Dist - | ToScore(KLDivergence(t2)) => - GenericDist.Score.klDivergence(dist, t2, ~toPointSetFn) - ->E.R2.fmap(r => Float(r)) + | #ToDist(Normalize) => dist->GenericDist.normalize->Dist + | #ToScore(LogScore(answer, prior)) => + GenericDist.Score.logScore(~estimate=dist, ~answer, ~prior, ~env) + ->E.R2.fmap(s => Float(s)) ->OutputLocal.fromResult - | ToScore(LogScore(answer, prior)) => - GenericDist.Score.logScoreWithPointResolution( - ~prediction=dist, - ~answer, - ~prior, - ~toPointSetFn, - ) - ->E.R2.fmap(r => Float(r)) - ->OutputLocal.fromResult - | ToBool(IsNormalized) => dist->GenericDist.isNormalized->Bool - | ToDist(Truncate(leftCutoff, rightCutoff)) => + | #ToBool(IsNormalized) => dist->GenericDist.isNormalized->Bool + | #ToDist(Truncate(leftCutoff, rightCutoff)) => GenericDist.truncate(~toPointSetFn, ~leftCutoff, ~rightCutoff, dist, ()) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDist(ToSampleSet(n)) => + | #ToDist(ToSampleSet(n)) => dist ->GenericDist.toSampleSetDist(n) ->E.R2.fmap(r => Dist(SampleSet(r))) ->OutputLocal.fromResult - | ToDist(ToPointSet) => + | #ToDist(ToPointSet) => dist ->GenericDist.toPointSet(~xyPointLength, ~sampleCount, ()) ->E.R2.fmap(r => Dist(PointSet(r))) ->OutputLocal.fromResult - | ToDist(Scale(#LogarithmWithThreshold(eps), f)) => + | #ToDist(Scale(#LogarithmWithThreshold(eps), f)) => dist ->GenericDist.pointwiseCombinationFloat( ~toPointSetFn, @@ -182,18 +170,23 @@ let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { ) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDist(Scale(#Logarithm, f)) => + | #ToDist(Scale(#Multiply, f)) => + dist + ->GenericDist.pointwiseCombinationFloat(~toPointSetFn, ~algebraicCombination=#Multiply, ~f) + ->E.R2.fmap(r => Dist(r)) + ->OutputLocal.fromResult + | #ToDist(Scale(#Logarithm, f)) => dist ->GenericDist.pointwiseCombinationFloat(~toPointSetFn, ~algebraicCombination=#Logarithm, ~f) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDist(Scale(#Power, f)) => + | #ToDist(Scale(#Power, f)) => dist ->GenericDist.pointwiseCombinationFloat(~toPointSetFn, ~algebraicCombination=#Power, ~f) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDistCombination(Algebraic(_), _, #Float(_)) => GenDistError(NotYetImplemented) - | ToDistCombination(Algebraic(strategy), arithmeticOperation, #Dist(t2)) => + | #ToDistCombination(Algebraic(_), _, #Float(_)) => GenDistError(NotYetImplemented) + | #ToDistCombination(Algebraic(strategy), arithmeticOperation, #Dist(t2)) => dist ->GenericDist.algebraicCombination( ~strategy, @@ -204,12 +197,12 @@ let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { ) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDistCombination(Pointwise, algebraicCombination, #Dist(t2)) => + | #ToDistCombination(Pointwise, algebraicCombination, #Dist(t2)) => dist ->GenericDist.pointwiseCombination(~toPointSetFn, ~algebraicCombination, ~t2) ->E.R2.fmap(r => Dist(r)) ->OutputLocal.fromResult - | ToDistCombination(Pointwise, algebraicCombination, #Float(f)) => + | #ToDistCombination(Pointwise, algebraicCombination, #Float(f)) => dist ->GenericDist.pointwiseCombinationFloat(~toPointSetFn, ~algebraicCombination, ~f) ->E.R2.fmap(r => Dist(r)) @@ -220,8 +213,7 @@ let rec run = (~env, functionCallInfo: functionCallInfo): outputType => { switch functionCallInfo { | FromDist(subFnName, dist) => fromDistFn(subFnName, dist) - | FromFloat(subFnName, float) => - reCall(~functionCallInfo=FromDist(subFnName, GenericDist.fromFloat(float)), ()) + | FromFloat(subFnName, x) => reCall(~functionCallInfo=FromFloat(subFnName, x), ()) | Mixture(dists) => dists ->GenericDist.mixture(~scaleMultiplyFn=scaleMultiply, ~pointwiseAddFn=pointwiseAdd) @@ -273,13 +265,16 @@ module Constructors = { let pdf = (~env, dist, f) => C.pdf(dist, f)->run(~env)->toFloatR let normalize = (~env, dist) => C.normalize(dist)->run(~env)->toDistR let isNormalized = (~env, dist) => C.isNormalized(dist)->run(~env)->toBoolR - let klDivergence = (~env, dist1, dist2) => C.klDivergence(dist1, dist2)->run(~env)->toFloatR - let logScoreWithPointResolution = ( - ~env, - ~prediction: DistributionTypes.genericDist, - ~answer: float, - ~prior: option, - ) => C.logScoreWithPointResolution(~prediction, ~answer, ~prior)->run(~env)->toFloatR + module LogScore = { + let distEstimateDistAnswer = (~env, estimate, answer) => + C.LogScore.distEstimateDistAnswer(estimate, answer)->run(~env)->toFloatR + let distEstimateDistAnswerWithPrior = (~env, estimate, answer, prior) => + C.LogScore.distEstimateDistAnswerWithPrior(estimate, answer, prior)->run(~env)->toFloatR + let distEstimateScalarAnswer = (~env, estimate, answer) => + C.LogScore.distEstimateScalarAnswer(estimate, answer)->run(~env)->toFloatR + let distEstimateScalarAnswerWithPrior = (~env, estimate, answer, prior) => + C.LogScore.distEstimateScalarAnswerWithPrior(estimate, answer, prior)->run(~env)->toFloatR + } let toPointSet = (~env, dist) => C.toPointSet(dist)->run(~env)->toDistR let toSampleSet = (~env, dist, n) => C.toSampleSet(dist, n)->run(~env)->toDistR let fromSamples = (~env, xs) => C.fromSamples(xs)->run(~env)->toDistR @@ -298,6 +293,7 @@ module Constructors = { let algebraicLogarithm = (~env, dist1, dist2) => C.algebraicLogarithm(dist1, dist2)->run(~env)->toDistR let algebraicPower = (~env, dist1, dist2) => C.algebraicPower(dist1, dist2)->run(~env)->toDistR + let scaleMultiply = (~env, dist, n) => C.scaleMultiply(dist, n)->run(~env)->toDistR let scalePower = (~env, dist, n) => C.scalePower(dist, n)->run(~env)->toDistR let scaleLogarithm = (~env, dist, n) => C.scaleLogarithm(dist, n)->run(~env)->toDistR let pointwiseAdd = (~env, dist1, dist2) => C.pointwiseAdd(dist1, dist2)->run(~env)->toDistR diff --git a/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.resi b/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.resi index 454b2729..68da9534 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.resi +++ b/packages/squiggle-lang/src/rescript/Distributions/DistributionOperation.resi @@ -1,11 +1,5 @@ @genType -type env = { - sampleCount: int, - xyPointLength: int, -} - -@genType -let defaultEnv: env +let defaultEnv: GenericDist.env open DistributionTypes @@ -19,15 +13,18 @@ type outputType = | GenDistError(error) @genType -let run: (~env: env, DistributionTypes.DistributionOperation.genericFunctionCallInfo) => outputType +let run: ( + ~env: GenericDist.env, + DistributionTypes.DistributionOperation.genericFunctionCallInfo, +) => outputType let runFromDist: ( - ~env: env, + ~env: GenericDist.env, ~functionCallInfo: DistributionTypes.DistributionOperation.fromDist, genericDist, ) => outputType let runFromFloat: ( - ~env: env, - ~functionCallInfo: DistributionTypes.DistributionOperation.fromDist, + ~env: GenericDist.env, + ~functionCallInfo: DistributionTypes.DistributionOperation.fromFloat, float, ) => outputType @@ -42,77 +39,147 @@ module Output: { let toBool: t => option let toBoolR: t => result let toError: t => option - let fmap: (~env: env, t, DistributionTypes.DistributionOperation.singleParamaterFunction) => t + let fmap: ( + ~env: GenericDist.env, + t, + DistributionTypes.DistributionOperation.singleParamaterFunction, + ) => t } module Constructors: { @genType - let mean: (~env: env, genericDist) => result + let mean: (~env: GenericDist.env, genericDist) => result @genType - let stdev: (~env: env, genericDist) => result + let stdev: (~env: GenericDist.env, genericDist) => result @genType - let variance: (~env: env, genericDist) => result + let variance: (~env: GenericDist.env, genericDist) => result @genType - let sample: (~env: env, genericDist) => result + let sample: (~env: GenericDist.env, genericDist) => result @genType - let cdf: (~env: env, genericDist, float) => result + let cdf: (~env: GenericDist.env, genericDist, float) => result @genType - let inv: (~env: env, genericDist, float) => result + let inv: (~env: GenericDist.env, genericDist, float) => result @genType - let pdf: (~env: env, genericDist, float) => result + let pdf: (~env: GenericDist.env, genericDist, float) => result @genType - let normalize: (~env: env, genericDist) => result + let normalize: (~env: GenericDist.env, genericDist) => result @genType - let isNormalized: (~env: env, genericDist) => result + let isNormalized: (~env: GenericDist.env, genericDist) => result + module LogScore: { + @genType + let distEstimateDistAnswer: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result + @genType + let distEstimateDistAnswerWithPrior: ( + ~env: GenericDist.env, + genericDist, + genericDist, + genericDist, + ) => result + @genType + let distEstimateScalarAnswer: ( + ~env: GenericDist.env, + genericDist, + float, + ) => result + @genType + let distEstimateScalarAnswerWithPrior: ( + ~env: GenericDist.env, + genericDist, + float, + genericDist, + ) => result + } @genType - let klDivergence: (~env: env, genericDist, genericDist) => result + let toPointSet: (~env: GenericDist.env, genericDist) => result @genType - let logScoreWithPointResolution: ( - ~env: env, - ~prediction: genericDist, - ~answer: float, - ~prior: option, - ) => result + let toSampleSet: (~env: GenericDist.env, genericDist, int) => result @genType - let toPointSet: (~env: env, genericDist) => result + let fromSamples: (~env: GenericDist.env, SampleSetDist.t) => result @genType - let toSampleSet: (~env: env, genericDist, int) => result + let truncate: ( + ~env: GenericDist.env, + genericDist, + option, + option, + ) => result @genType - let fromSamples: (~env: env, SampleSetDist.t) => result + let inspect: (~env: GenericDist.env, genericDist) => result @genType - let truncate: (~env: env, genericDist, option, option) => result + let toString: (~env: GenericDist.env, genericDist) => result @genType - let inspect: (~env: env, genericDist) => result + let toSparkline: (~env: GenericDist.env, genericDist, int) => result @genType - let toString: (~env: env, genericDist) => result + let algebraicAdd: (~env: GenericDist.env, genericDist, genericDist) => result @genType - let toSparkline: (~env: env, genericDist, int) => result + let algebraicMultiply: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let algebraicAdd: (~env: env, genericDist, genericDist) => result + let algebraicDivide: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let algebraicMultiply: (~env: env, genericDist, genericDist) => result + let algebraicSubtract: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let algebraicDivide: (~env: env, genericDist, genericDist) => result + let algebraicLogarithm: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let algebraicSubtract: (~env: env, genericDist, genericDist) => result + let algebraicPower: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let algebraicLogarithm: (~env: env, genericDist, genericDist) => result + let scaleLogarithm: (~env: GenericDist.env, genericDist, float) => result @genType - let algebraicPower: (~env: env, genericDist, genericDist) => result + let scaleMultiply: (~env: GenericDist.env, genericDist, float) => result @genType - let scaleLogarithm: (~env: env, genericDist, float) => result + let scalePower: (~env: GenericDist.env, genericDist, float) => result @genType - let scalePower: (~env: env, genericDist, float) => result + let pointwiseAdd: (~env: GenericDist.env, genericDist, genericDist) => result @genType - let pointwiseAdd: (~env: env, genericDist, genericDist) => result + let pointwiseMultiply: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let pointwiseMultiply: (~env: env, genericDist, genericDist) => result + let pointwiseDivide: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let pointwiseDivide: (~env: env, genericDist, genericDist) => result + let pointwiseSubtract: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let pointwiseSubtract: (~env: env, genericDist, genericDist) => result + let pointwiseLogarithm: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result @genType - let pointwiseLogarithm: (~env: env, genericDist, genericDist) => result - @genType - let pointwisePower: (~env: env, genericDist, genericDist) => result + let pointwisePower: ( + ~env: GenericDist.env, + genericDist, + genericDist, + ) => result } diff --git a/packages/squiggle-lang/src/rescript/Distributions/DistributionTypes.res b/packages/squiggle-lang/src/rescript/Distributions/DistributionTypes.res index cdb0ee3d..0c119ea4 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/DistributionTypes.res +++ b/packages/squiggle-lang/src/rescript/Distributions/DistributionTypes.res @@ -76,6 +76,7 @@ module DistributionOperation = { ] type toScaleFn = [ + | #Multiply | #Power | #Logarithm | #LogarithmWithThreshold(float) @@ -97,60 +98,86 @@ module DistributionOperation = { | ToString | ToSparkline(int) - type toScore = KLDivergence(genericDist) | LogScore(float, option) + type genericDistOrScalar = Score_Dist(genericDist) | Score_Scalar(float) - type fromDist = - | ToFloat(toFloat) - | ToDist(toDist) - | ToScore(toScore) - | ToDistCombination(direction, Operation.Algebraic.t, [#Dist(genericDist) | #Float(float)]) - | ToString(toString) - | ToBool(toBool) + type toScore = LogScore(genericDistOrScalar, option) + + type fromFloat = [ + | #ToFloat(toFloat) + | #ToDist(toDist) + | #ToDistCombination(direction, Operation.Algebraic.t, [#Dist(genericDist) | #Float(float)]) + | #ToString(toString) + | #ToBool(toBool) + ] + + type fromDist = [ + | fromFloat + | #ToScore(toScore) + ] type singleParamaterFunction = | FromDist(fromDist) - | FromFloat(fromDist) + | FromFloat(fromFloat) type genericFunctionCallInfo = | FromDist(fromDist, genericDist) - | FromFloat(fromDist, float) + | FromFloat(fromFloat, float) | FromSamples(array) | Mixture(array<(genericDist, float)>) - let distCallToString = (distFunction: fromDist): string => - switch distFunction { - | ToFloat(#Cdf(r)) => `cdf(${E.Float.toFixed(r)})` - | ToFloat(#Inv(r)) => `inv(${E.Float.toFixed(r)})` - | ToFloat(#Mean) => `mean` - | ToFloat(#Min) => `min` - | ToFloat(#Max) => `max` - | ToFloat(#Stdev) => `stdev` - | ToFloat(#Variance) => `variance` - | ToFloat(#Mode) => `mode` - | ToFloat(#Pdf(r)) => `pdf(${E.Float.toFixed(r)})` - | ToFloat(#Sample) => `sample` - | ToFloat(#IntegralSum) => `integralSum` - | ToScore(KLDivergence(_)) => `klDivergence` - | ToScore(LogScore(x, _)) => `logScore against ${E.Float.toFixed(x)}` - | ToDist(Normalize) => `normalize` - | ToDist(ToPointSet) => `toPointSet` - | ToDist(ToSampleSet(r)) => `toSampleSet(${E.I.toString(r)})` - | ToDist(Truncate(_, _)) => `truncate` - | ToDist(Inspect) => `inspect` - | ToDist(Scale(#Power, r)) => `scalePower(${E.Float.toFixed(r)})` - | ToDist(Scale(#Logarithm, r)) => `scaleLog(${E.Float.toFixed(r)})` - | ToDist(Scale(#LogarithmWithThreshold(eps), r)) => + let floatCallToString = (floatFunction: fromFloat): string => + switch floatFunction { + | #ToFloat(#Cdf(r)) => `cdf(${E.Float.toFixed(r)})` + | #ToFloat(#Inv(r)) => `inv(${E.Float.toFixed(r)})` + | #ToFloat(#Mean) => `mean` + | #ToFloat(#Min) => `min` + | #ToFloat(#Max) => `max` + | #ToFloat(#Stdev) => `stdev` + | #ToFloat(#Variance) => `variance` + | #ToFloat(#Mode) => `mode` + | #ToFloat(#Pdf(r)) => `pdf(${E.Float.toFixed(r)})` + | #ToFloat(#Sample) => `sample` + | #ToFloat(#IntegralSum) => `integralSum` + | #ToDist(Normalize) => `normalize` + | #ToDist(ToPointSet) => `toPointSet` + | #ToDist(ToSampleSet(r)) => `toSampleSet(${E.I.toString(r)})` + | #ToDist(Truncate(_, _)) => `truncate` + | #ToDist(Inspect) => `inspect` + | #ToDist(Scale(#Power, r)) => `scalePower(${E.Float.toFixed(r)})` + | #ToDist(Scale(#Multiply, r)) => `scaleMultiply(${E.Float.toFixed(r)})` + | #ToDist(Scale(#Logarithm, r)) => `scaleLog(${E.Float.toFixed(r)})` + | #ToDist(Scale(#LogarithmWithThreshold(eps), r)) => `scaleLogWithThreshold(${E.Float.toFixed(r)}, epsilon=${E.Float.toFixed(eps)})` - | ToString(ToString) => `toString` - | ToString(ToSparkline(n)) => `sparkline(${E.I.toString(n)})` - | ToBool(IsNormalized) => `isNormalized` - | ToDistCombination(Algebraic(_), _, _) => `algebraic` - | ToDistCombination(Pointwise, _, _) => `pointwise` + | #ToString(ToString) => `toString` + | #ToString(ToSparkline(n)) => `sparkline(${E.I.toString(n)})` + | #ToBool(IsNormalized) => `isNormalized` + | #ToDistCombination(Algebraic(_), _, _) => `algebraic` + | #ToDistCombination(Pointwise, _, _) => `pointwise` + } + + let distCallToString = ( + distFunction: [ + | #ToFloat(toFloat) + | #ToDist(toDist) + | #ToDistCombination(direction, Operation.Algebraic.t, [#Dist(genericDist) | #Float(float)]) + | #ToString(toString) + | #ToBool(toBool) + | #ToScore(toScore) + ], + ): string => + switch distFunction { + | #ToScore(_) => `logScore` + | #ToFloat(x) => floatCallToString(#ToFloat(x)) + | #ToDist(x) => floatCallToString(#ToDist(x)) + | #ToString(x) => floatCallToString(#ToString(x)) + | #ToBool(x) => floatCallToString(#ToBool(x)) + | #ToDistCombination(x, y, z) => floatCallToString(#ToDistCombination(x, y, z)) } let toString = (d: genericFunctionCallInfo): string => switch d { - | FromDist(f, _) | FromFloat(f, _) => distCallToString(f) + | FromDist(f, _) => distCallToString(f) + | FromFloat(f, _) => floatCallToString(f) | Mixture(_) => `mixture` | FromSamples(_) => `fromSamples` } @@ -160,79 +187,93 @@ module Constructors = { module UsingDists = { @genType - let mean = (dist): t => FromDist(ToFloat(#Mean), dist) - let stdev = (dist): t => FromDist(ToFloat(#Stdev), dist) - let variance = (dist): t => FromDist(ToFloat(#Variance), dist) - let sample = (dist): t => FromDist(ToFloat(#Sample), dist) - let cdf = (dist, x): t => FromDist(ToFloat(#Cdf(x)), dist) - let inv = (dist, x): t => FromDist(ToFloat(#Inv(x)), dist) - let pdf = (dist, x): t => FromDist(ToFloat(#Pdf(x)), dist) - let normalize = (dist): t => FromDist(ToDist(Normalize), dist) - let isNormalized = (dist): t => FromDist(ToBool(IsNormalized), dist) - let toPointSet = (dist): t => FromDist(ToDist(ToPointSet), dist) - let toSampleSet = (dist, r): t => FromDist(ToDist(ToSampleSet(r)), dist) + let mean = (dist): t => FromDist(#ToFloat(#Mean), dist) + let stdev = (dist): t => FromDist(#ToFloat(#Stdev), dist) + let variance = (dist): t => FromDist(#ToFloat(#Variance), dist) + let sample = (dist): t => FromDist(#ToFloat(#Sample), dist) + let cdf = (dist, x): t => FromDist(#ToFloat(#Cdf(x)), dist) + let inv = (dist, x): t => FromDist(#ToFloat(#Inv(x)), dist) + let pdf = (dist, x): t => FromDist(#ToFloat(#Pdf(x)), dist) + let normalize = (dist): t => FromDist(#ToDist(Normalize), dist) + let isNormalized = (dist): t => FromDist(#ToBool(IsNormalized), dist) + let toPointSet = (dist): t => FromDist(#ToDist(ToPointSet), dist) + let toSampleSet = (dist, r): t => FromDist(#ToDist(ToSampleSet(r)), dist) let fromSamples = (xs): t => FromSamples(xs) - let truncate = (dist, left, right): t => FromDist(ToDist(Truncate(left, right)), dist) - let inspect = (dist): t => FromDist(ToDist(Inspect), dist) - let klDivergence = (dist1, dist2): t => FromDist(ToScore(KLDivergence(dist2)), dist1) - let logScoreWithPointResolution = (~prediction, ~answer, ~prior): t => FromDist( - ToScore(LogScore(answer, prior)), - prediction, - ) - let scalePower = (dist, n): t => FromDist(ToDist(Scale(#Power, n)), dist) - let scaleLogarithm = (dist, n): t => FromDist(ToDist(Scale(#Logarithm, n)), dist) + let truncate = (dist, left, right): t => FromDist(#ToDist(Truncate(left, right)), dist) + let inspect = (dist): t => FromDist(#ToDist(Inspect), dist) + module LogScore = { + let distEstimateDistAnswer = (estimate, answer): t => FromDist( + #ToScore(LogScore(Score_Dist(answer), None)), + estimate, + ) + let distEstimateDistAnswerWithPrior = (estimate, answer, prior): t => FromDist( + #ToScore(LogScore(Score_Dist(answer), Some(prior))), + estimate, + ) + let distEstimateScalarAnswer = (estimate, answer): t => FromDist( + #ToScore(LogScore(Score_Scalar(answer), None)), + estimate, + ) + let distEstimateScalarAnswerWithPrior = (estimate, answer, prior): t => FromDist( + #ToScore(LogScore(Score_Scalar(answer), Some(prior))), + estimate, + ) + } + let scaleMultiply = (dist, n): t => FromDist(#ToDist(Scale(#Multiply, n)), dist) + let scalePower = (dist, n): t => FromDist(#ToDist(Scale(#Power, n)), dist) + let scaleLogarithm = (dist, n): t => FromDist(#ToDist(Scale(#Logarithm, n)), dist) let scaleLogarithmWithThreshold = (dist, n, eps): t => FromDist( - ToDist(Scale(#LogarithmWithThreshold(eps), n)), + #ToDist(Scale(#LogarithmWithThreshold(eps), n)), dist, ) - let toString = (dist): t => FromDist(ToString(ToString), dist) - let toSparkline = (dist, n): t => FromDist(ToString(ToSparkline(n)), dist) + let toString = (dist): t => FromDist(#ToString(ToString), dist) + let toSparkline = (dist, n): t => FromDist(#ToString(ToSparkline(n)), dist) let algebraicAdd = (dist1, dist2: genericDist): t => FromDist( - ToDistCombination(Algebraic(AsDefault), #Add, #Dist(dist2)), + #ToDistCombination(Algebraic(AsDefault), #Add, #Dist(dist2)), dist1, ) let algebraicMultiply = (dist1, dist2): t => FromDist( - ToDistCombination(Algebraic(AsDefault), #Multiply, #Dist(dist2)), + #ToDistCombination(Algebraic(AsDefault), #Multiply, #Dist(dist2)), dist1, ) let algebraicDivide = (dist1, dist2): t => FromDist( - ToDistCombination(Algebraic(AsDefault), #Divide, #Dist(dist2)), + #ToDistCombination(Algebraic(AsDefault), #Divide, #Dist(dist2)), dist1, ) let algebraicSubtract = (dist1, dist2): t => FromDist( - ToDistCombination(Algebraic(AsDefault), #Subtract, #Dist(dist2)), + #ToDistCombination(Algebraic(AsDefault), #Subtract, #Dist(dist2)), dist1, ) let algebraicLogarithm = (dist1, dist2): t => FromDist( - ToDistCombination(Algebraic(AsDefault), #Logarithm, #Dist(dist2)), + #ToDistCombination(Algebraic(AsDefault), #Logarithm, #Dist(dist2)), dist1, ) let algebraicPower = (dist1, dist2): t => FromDist( - ToDistCombination(Algebraic(AsDefault), #Power, #Dist(dist2)), + #ToDistCombination(Algebraic(AsDefault), #Power, #Dist(dist2)), dist1, ) let pointwiseAdd = (dist1, dist2): t => FromDist( - ToDistCombination(Pointwise, #Add, #Dist(dist2)), + #ToDistCombination(Pointwise, #Add, #Dist(dist2)), dist1, ) let pointwiseMultiply = (dist1, dist2): t => FromDist( - ToDistCombination(Pointwise, #Multiply, #Dist(dist2)), + #ToDistCombination(Pointwise, #Multiply, #Dist(dist2)), dist1, ) let pointwiseDivide = (dist1, dist2): t => FromDist( - ToDistCombination(Pointwise, #Divide, #Dist(dist2)), + #ToDistCombination(Pointwise, #Divide, #Dist(dist2)), dist1, ) let pointwiseSubtract = (dist1, dist2): t => FromDist( - ToDistCombination(Pointwise, #Subtract, #Dist(dist2)), + #ToDistCombination(Pointwise, #Subtract, #Dist(dist2)), dist1, ) let pointwiseLogarithm = (dist1, dist2): t => FromDist( - ToDistCombination(Pointwise, #Logarithm, #Dist(dist2)), + #ToDistCombination(Pointwise, #Logarithm, #Dist(dist2)), dist1, ) let pointwisePower = (dist1, dist2): t => FromDist( - ToDistCombination(Pointwise, #Power, #Dist(dist2)), + #ToDistCombination(Pointwise, #Power, #Dist(dist2)), dist1, ) } diff --git a/packages/squiggle-lang/src/rescript/Distributions/GenericDist.res b/packages/squiggle-lang/src/rescript/Distributions/GenericDist.res index addbdaa1..f536d54d 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/GenericDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/GenericDist.res @@ -6,6 +6,11 @@ type toSampleSetFn = t => result type scaleMultiplyFn = (t, float) => result type pointwiseAddFn = (t, t) => result +type env = { + sampleCount: int, + xyPointLength: int, +} + let isPointSet = (t: t) => switch t { | PointSet(_) => true @@ -61,46 +66,6 @@ let integralEndY = (t: t): float => let isNormalized = (t: t): bool => Js.Math.abs_float(integralEndY(t) -. 1.0) < 1e-7 -module Score = { - let klDivergence = (prediction, answer, ~toPointSetFn: toPointSetFn): result => { - let pointSets = E.R.merge(toPointSetFn(prediction), toPointSetFn(answer)) - pointSets |> E.R2.bind(((predi, ans)) => - PointSetDist.T.klDivergence(predi, ans)->E.R2.errMap(x => DistributionTypes.OperationError(x)) - ) - } - - let logScoreWithPointResolution = ( - ~prediction: DistributionTypes.genericDist, - ~answer: float, - ~prior: option, - ~toPointSetFn: toPointSetFn, - ): result => { - switch prior { - | Some(prior') => - E.R.merge(toPointSetFn(prior'), toPointSetFn(prediction))->E.R.bind((( - prior'', - prediction'', - )) => - PointSetDist.T.logScoreWithPointResolution( - ~prediction=prediction'', - ~answer, - ~prior=prior''->Some, - )->E.R2.errMap(x => DistributionTypes.OperationError(x)) - ) - | None => - prediction - ->toPointSetFn - ->E.R.bind(x => - PointSetDist.T.logScoreWithPointResolution( - ~prediction=x, - ~answer, - ~prior=None, - )->E.R2.errMap(x => DistributionTypes.OperationError(x)) - ) - } - } -} - let toFloatOperation = ( t, ~toPointSetFn: toPointSetFn, @@ -171,6 +136,70 @@ let toPointSet = ( } } +module Score = { + type genericDistOrScalar = DistributionTypes.DistributionOperation.genericDistOrScalar + + let argsMake = (~esti: t, ~answ: genericDistOrScalar, ~prior: option, ~env: env): result< + PointSetDist_Scoring.scoreArgs, + error, + > => { + let toPointSetFn = t => + toPointSet( + t, + ~xyPointLength=env.xyPointLength, + ~sampleCount=env.sampleCount, + ~xSelection=#ByWeight, + (), + ) + let prior': option> = switch prior { + | None => None + | Some(d) => toPointSetFn(d)->Some + } + let twoDists = (~toPointSetFn, esti': t, answ': t): result< + (PointSetTypes.pointSetDist, PointSetTypes.pointSetDist), + error, + > => E.R.merge(toPointSetFn(esti'), toPointSetFn(answ')) + switch (esti, answ, prior') { + | (esti', Score_Dist(answ'), None) => + twoDists(~toPointSetFn, esti', answ')->E.R2.fmap(((esti'', answ'')) => + {estimate: esti'', answer: answ'', prior: None}->PointSetDist_Scoring.DistAnswer + ) + | (esti', Score_Dist(answ'), Some(Ok(prior''))) => + twoDists(~toPointSetFn, esti', answ')->E.R2.fmap(((esti'', answ'')) => + { + estimate: esti'', + answer: answ'', + prior: Some(prior''), + }->PointSetDist_Scoring.DistAnswer + ) + | (esti', Score_Scalar(answ'), None) => + toPointSetFn(esti')->E.R2.fmap(esti'' => + { + estimate: esti'', + answer: answ', + prior: None, + }->PointSetDist_Scoring.ScalarAnswer + ) + | (esti', Score_Scalar(answ'), Some(Ok(prior''))) => + toPointSetFn(esti')->E.R2.fmap(esti'' => + { + estimate: esti'', + answer: answ', + prior: Some(prior''), + }->PointSetDist_Scoring.ScalarAnswer + ) + | (_, _, Some(Error(err))) => err->Error + } + } + + let logScore = (~estimate: t, ~answer: genericDistOrScalar, ~prior: option, ~env: env): result< + float, + error, + > => + argsMake(~esti=estimate, ~answ=answer, ~prior, ~env)->E.R.bind(x => + x->PointSetDist.logScore->E.R2.errMap(y => DistributionTypes.OperationError(y)) + ) +} /* PointSetDist.toSparkline calls "downsampleEquallyOverX", which downsamples it to n=bucketCount. It first needs a pointSetDist, so we convert to a pointSetDist. In this process we want the diff --git a/packages/squiggle-lang/src/rescript/Distributions/GenericDist.resi b/packages/squiggle-lang/src/rescript/Distributions/GenericDist.resi index fd9afa58..fd04212a 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/GenericDist.resi +++ b/packages/squiggle-lang/src/rescript/Distributions/GenericDist.resi @@ -5,6 +5,9 @@ type toSampleSetFn = t => result type scaleMultiplyFn = (t, float) => result type pointwiseAddFn = (t, t) => result +@genType +type env = {sampleCount: int, xyPointLength: int} + let sampleN: (t, int) => array let sample: t => float @@ -25,12 +28,11 @@ let toFloatOperation: ( ) => result module Score: { - let klDivergence: (t, t, ~toPointSetFn: toPointSetFn) => result - let logScoreWithPointResolution: ( - ~prediction: t, - ~answer: float, + let logScore: ( + ~estimate: t, + ~answer: DistributionTypes.DistributionOperation.genericDistOrScalar, ~prior: option, - ~toPointSetFn: toPointSetFn, + ~env: env, ) => result } diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/AlgebraicShapeCombination.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/AlgebraicShapeCombination.res index a51de00d..2508e3df 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/AlgebraicShapeCombination.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/AlgebraicShapeCombination.res @@ -214,7 +214,7 @@ let combineShapesContinuousDiscrete = ( // When this operation is flipped (like 1 - normal(5, 2)) then the // x axis coordinates would all come out the wrong order. So we need // to fill them out in the opposite direction - let index = discretePosition == First ? t1n - 1 - i : i + let index = discretePosition == First && op == #Subtract ? t1n - 1 - i : i Belt.Array.set( dxyShape, index, diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Continuous.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Continuous.res index 3661a531..05d94ca9 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Continuous.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Continuous.res @@ -120,7 +120,7 @@ let combinePointwise = ( let interpolator = XYShape.XtoY.continuousInterpolator(t1.interpolation, extrapolation) - combiner(fn, interpolator, t1.xyShape, t2.xyShape)->E.R2.fmap(x => + combiner(interpolator, fn, t1.xyShape, t2.xyShape)->E.R2.fmap(x => make(~integralSumCache=combinedIntegralSum, x) ) } @@ -270,20 +270,6 @@ module T = Dist({ } let variance = (t: t): float => XYShape.Analysis.getVarianceDangerously(t, mean, Analysis.getMeanOfSquares) - - let klDivergence = (prediction: t, answer: t) => { - let newShape = XYShape.PointwiseCombination.combineAlongSupportOfSecondArgument( - PointSetDist_Scoring.KLDivergence.integrand, - prediction.xyShape, - answer.xyShape, - ) - newShape->E.R2.fmap(x => x->make->integralEndY) - } - let logScoreWithPointResolution = (~prediction: t, ~answer: float, ~prior: option) => { - let priorPdf = prior->E.O2.fmap((shape, x) => XYShape.XtoY.linear(x, shape.xyShape)) - let predictionPdf = x => XYShape.XtoY.linear(x, prediction.xyShape) - PointSetDist_Scoring.LogScoreWithPointResolution.score(~priorPdf, ~predictionPdf, ~answer) - } }) let isNormalized = (t: t): bool => { diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Discrete.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Discrete.res index fea5db6f..7e7c4981 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Discrete.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Discrete.res @@ -1,3 +1,4 @@ +@@warning("-27") //TODO: Remove and fix the warning open Distributions type t = PointSetTypes.discreteShape @@ -48,7 +49,7 @@ let combinePointwise = ( // TODO: does it ever make sense to pointwise combine the integrals here? // It could be done for pointwise additions, but is that ever needed? - combiner(fn, XYShape.XtoY.discreteInterpolator, t1.xyShape, t2.xyShape)->E.R2.fmap(make) + combiner(XYShape.XtoY.discreteInterpolator, fn, t1.xyShape, t2.xyShape)->E.R2.fmap(make) } let reduce = ( @@ -221,15 +222,4 @@ module T = Dist({ let getMeanOfSquares = t => t |> shapeMap(XYShape.T.square) |> mean XYShape.Analysis.getVarianceDangerously(t, mean, getMeanOfSquares) } - - let klDivergence = (prediction: t, answer: t) => { - combinePointwise( - ~fn=PointSetDist_Scoring.KLDivergence.integrand, - prediction, - answer, - )->E.R2.fmap(integralEndY) - } - let logScoreWithPointResolution = (~prediction: t, ~answer: float, ~prior: option) => { - Error(Operation.NotYetImplemented) - } }) diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Distributions.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Distributions.res index 2d0358ec..3a35d57b 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Distributions.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Distributions.res @@ -33,12 +33,6 @@ module type dist = { let mean: t => float let variance: t => float - let klDivergence: (t, t) => result - let logScoreWithPointResolution: ( - ~prediction: t, - ~answer: float, - ~prior: option, - ) => result } module Dist = (T: dist) => { @@ -61,9 +55,6 @@ module Dist = (T: dist) => { let mean = T.mean let variance = T.variance let integralEndY = T.integralEndY - let klDivergence = T.klDivergence - let logScoreWithPointResolution = T.logScoreWithPointResolution - let updateIntegralCache = T.updateIntegralCache module Integral = { diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Mixed.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Mixed.res index 42a88909..c9f31dbf 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Mixed.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/Mixed.res @@ -1,3 +1,5 @@ +@@warning("-27") //TODO: Remove and fix the warning +@@warning("-32") //TODO: Remove and fix the warning open Distributions type t = PointSetTypes.mixedShape @@ -300,15 +302,6 @@ module T = Dist({ | _ => XYShape.Analysis.getVarianceDangerously(t, mean, getMeanOfSquares) } } - - let klDivergence = (prediction: t, answer: t) => { - let klDiscretePart = Discrete.T.klDivergence(prediction.discrete, answer.discrete) - let klContinuousPart = Continuous.T.klDivergence(prediction.continuous, answer.continuous) - E.R.merge(klDiscretePart, klContinuousPart)->E.R2.fmap(t => fst(t) +. snd(t)) - } - let logScoreWithPointResolution = (~prediction: t, ~answer: float, ~prior: option) => { - Error(Operation.NotYetImplemented) - } }) let combineAlgebraically = (op: Operation.convolutionOperation, t1: t, t2: t): t => { diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist.res index 74913d06..6fd2582d 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist.res @@ -66,6 +66,7 @@ let combineAlgebraically = (op: Operation.convolutionOperation, t1: t, t2: t): t } let combinePointwise = ( + ~combiner=XYShape.PointwiseCombination.combine, ~integralSumCachesFn: (float, float) => option=(_, _) => None, ~integralCachesFn: ( PointSetTypes.continuousShape, @@ -78,6 +79,7 @@ let combinePointwise = ( switch (t1, t2) { | (Continuous(m1), Continuous(m2)) => Continuous.combinePointwise( + ~combiner, ~integralSumCachesFn, fn, m1, @@ -85,6 +87,7 @@ let combinePointwise = ( )->E.R2.fmap(x => PointSetTypes.Continuous(x)) | (Discrete(m1), Discrete(m2)) => Discrete.combinePointwise( + ~combiner, ~integralSumCachesFn, ~fn, m1, @@ -195,25 +198,16 @@ module T = Dist({ | Discrete(m) => Discrete.T.variance(m) | Continuous(m) => Continuous.T.variance(m) } - - let klDivergence = (prediction: t, answer: t) => - switch (prediction, answer) { - | (Continuous(t1), Continuous(t2)) => Continuous.T.klDivergence(t1, t2) - | (Discrete(t1), Discrete(t2)) => Discrete.T.klDivergence(t1, t2) - | (m1, m2) => Mixed.T.klDivergence(m1->toMixed, m2->toMixed) - } - - let logScoreWithPointResolution = (~prediction: t, ~answer: float, ~prior: option) => { - switch (prior, prediction) { - | (Some(Continuous(t1)), Continuous(t2)) => - Continuous.T.logScoreWithPointResolution(~prediction=t2, ~answer, ~prior=t1->Some) - | (None, Continuous(t2)) => - Continuous.T.logScoreWithPointResolution(~prediction=t2, ~answer, ~prior=None) - | _ => Error(Operation.NotYetImplemented) - } - } }) +let logScore = (args: PointSetDist_Scoring.scoreArgs): result => + PointSetDist_Scoring.logScore( + args, + ~combineFn=combinePointwise, + ~integrateFn=T.Integral.sum, + ~toMixedFn=toMixed, + ) + let pdf = (f: float, t: t) => { let mixedPoint: PointSetTypes.mixedPoint = T.xToY(f, t) mixedPoint.continuous +. mixedPoint.discrete diff --git a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist_Scoring.res b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist_Scoring.res index 532bc76c..8e5d71a4 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist_Scoring.res +++ b/packages/squiggle-lang/src/rescript/Distributions/PointSetDist/PointSetDist_Scoring.res @@ -1,46 +1,149 @@ -module KLDivergence = { - let logFn = Js.Math.log // base e - let integrand = (predictionElement: float, answerElement: float): result< +type pointSetDist = PointSetTypes.pointSetDist + +type scalar = float +type score = float +type abstractScoreArgs<'a, 'b> = {estimate: 'a, answer: 'b, prior: option<'a>} +type scoreArgs = + | DistAnswer(abstractScoreArgs) + | ScalarAnswer(abstractScoreArgs) + +let logFn = Js.Math.log // base e +let minusScaledLogOfQuotient = (~esti, ~answ): result => { + let quot = esti /. answ + quot < 0.0 ? Error(Operation.ComplexNumberError) : Ok(-.answ *. logFn(quot)) +} + +module WithDistAnswer = { + // The Kullback-Leibler divergence + let integrand = (estimateElement: float, answerElement: float): result< float, Operation.Error.t, > => - // We decided that negative infinity, not an error at answerElement = 0.0, is a desirable value. + // We decided that 0.0, not an error at answerElement = 0.0, is a desirable value. if answerElement == 0.0 { Ok(0.0) - } else if predictionElement == 0.0 { + } else if estimateElement == 0.0 { Ok(infinity) } else { - let quot = predictionElement /. answerElement - quot < 0.0 ? Error(Operation.ComplexNumberError) : Ok(-.answerElement *. logFn(quot)) + minusScaledLogOfQuotient(~esti=estimateElement, ~answ=answerElement) } -} -module LogScoreWithPointResolution = { - let logFn = Js.Math.log - let score = ( - ~priorPdf: option float>, - ~predictionPdf: float => float, - ~answer: float, - ): result => { - let numerator = answer->predictionPdf - if numerator < 0.0 { - Operation.PdfInvalidError->Error - } else if numerator == 0.0 { - infinity->Ok - } else { - -.( - switch priorPdf { - | None => numerator->logFn - | Some(f) => { - let priorDensityOfAnswer = f(answer) - if priorDensityOfAnswer == 0.0 { - neg_infinity - } else { - (numerator /. priorDensityOfAnswer)->logFn - } - } - } - )->Ok + let sum = ( + ~estimate: pointSetDist, + ~answer: pointSetDist, + ~combineFn, + ~integrateFn, + ~toMixedFn, + ): result => { + let combineAndIntegrate = (estimate, answer) => + combineFn(integrand, estimate, answer)->E.R2.fmap(integrateFn) + + let getMixedSums = (estimate: pointSetDist, answer: pointSetDist) => { + let esti = estimate->toMixedFn + let answ = answer->toMixedFn + switch ( + Mixed.T.toContinuous(esti), + Mixed.T.toDiscrete(esti), + Mixed.T.toContinuous(answ), + Mixed.T.toDiscrete(answ), + ) { + | ( + Some(estiContinuousPart), + Some(estiDiscretePart), + Some(answContinuousPart), + Some(answDiscretePart), + ) => + E.R.merge( + combineAndIntegrate( + PointSetTypes.Discrete(estiDiscretePart), + PointSetTypes.Discrete(answDiscretePart), + ), + combineAndIntegrate(Continuous(estiContinuousPart), Continuous(answContinuousPart)), + ) + | (_, _, _, _) => `unreachable state`->Operation.Other->Error + } + } + + switch (estimate, answer) { + | (Continuous(_), Continuous(_)) + | (Discrete(_), Discrete(_)) => + combineAndIntegrate(estimate, answer) + | (_, _) => + getMixedSums(estimate, answer)->E.R2.fmap(((discretePart, continuousPart)) => + discretePart +. continuousPart + ) } } + + let sumWithPrior = ( + ~estimate: pointSetDist, + ~answer: pointSetDist, + ~prior: pointSetDist, + ~combineFn, + ~integrateFn, + ~toMixedFn, + ): result => { + let kl1 = sum(~estimate, ~answer, ~combineFn, ~integrateFn, ~toMixedFn) + let kl2 = sum(~estimate=prior, ~answer, ~combineFn, ~integrateFn, ~toMixedFn) + E.R.merge(kl1, kl2)->E.R2.fmap(((kl1', kl2')) => kl1' -. kl2') + } } + +module WithScalarAnswer = { + let sum = (mp: PointSetTypes.MixedPoint.t): float => mp.continuous +. mp.discrete + let score = (~estimate: pointSetDist, ~answer: scalar): result => { + let _score = (~estimatePdf: float => option, ~answer: float): result< + score, + Operation.Error.t, + > => { + let density = answer->estimatePdf + switch density { + | None => Operation.PdfInvalidError->Error + | Some(density') => + if density' < 0.0 { + Operation.PdfInvalidError->Error + } else if density' == 0.0 { + infinity->Ok + } else { + density'->logFn->(x => -.x)->Ok + } + } + } + + let estimatePdf = x => + switch estimate { + | Continuous(esti) => Continuous.T.xToY(x, esti)->sum->Some + | Discrete(esti) => Discrete.T.xToY(x, esti)->sum->Some + | Mixed(_) => None + } + _score(~estimatePdf, ~answer) + } + + let scoreWithPrior = (~estimate: pointSetDist, ~answer: scalar, ~prior: pointSetDist): result< + score, + Operation.Error.t, + > => { + E.R.merge(score(~estimate, ~answer), score(~estimate=prior, ~answer))->E.R2.fmap(((s1, s2)) => + s1 -. s2 + ) + } +} + +let twoGenericDistsToTwoPointSetDists = (~toPointSetFn, estimate, answer): result< + (pointSetDist, pointSetDist), + 'e, +> => E.R.merge(toPointSetFn(estimate, ()), toPointSetFn(answer, ())) + +let logScore = (args: scoreArgs, ~combineFn, ~integrateFn, ~toMixedFn): result< + score, + Operation.Error.t, +> => + switch args { + | DistAnswer({estimate, answer, prior: None}) => + WithDistAnswer.sum(~estimate, ~answer, ~integrateFn, ~combineFn, ~toMixedFn) + | DistAnswer({estimate, answer, prior: Some(prior)}) => + WithDistAnswer.sumWithPrior(~estimate, ~answer, ~prior, ~integrateFn, ~combineFn, ~toMixedFn) + | ScalarAnswer({estimate, answer, prior: None}) => WithScalarAnswer.score(~estimate, ~answer) + | ScalarAnswer({estimate, answer, prior: Some(prior)}) => + WithScalarAnswer.scoreWithPrior(~estimate, ~answer, ~prior) + } diff --git a/packages/squiggle-lang/src/rescript/Distributions/SampleSetDist/SampleSetDist.res b/packages/squiggle-lang/src/rescript/Distributions/SampleSetDist/SampleSetDist.res index bfbaa795..dc15f7a1 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/SampleSetDist/SampleSetDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/SampleSetDist/SampleSetDist.res @@ -117,6 +117,11 @@ let map3 = ( ): result => E.A.zip3(get(t1), get(t2), get(t3))->E.A2.fmap(E.Tuple3.toFnCall(fn))->_fromSampleResultArray +let mapN = (~fn: array => result, ~t1: array): result< + t, + sampleSetError, +> => E.A.transpose(E.A.fmap(get, t1))->E.A2.fmap(fn)->_fromSampleResultArray + let mean = t => T.get(t)->E.A.Floats.mean let geomean = t => T.get(t)->E.A.Floats.geomean let mode = t => T.get(t)->E.A.Floats.mode diff --git a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res index f33fc450..249deb02 100644 --- a/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res +++ b/packages/squiggle-lang/src/rescript/Distributions/SymbolicDist/SymbolicDist.res @@ -124,6 +124,26 @@ module Beta = { let sample = (t: t) => Jstat.Beta.sample(t.alpha, t.beta) let mean = (t: t) => Ok(Jstat.Beta.mean(t.alpha, t.beta)) let toString = ({alpha, beta}: t) => j`Beta($alpha,$beta)` + + let fromMeanAndSampleSize = (mean, sampleSize) => { + // https://en.wikipedia.org/wiki/Beta_distribution#Mean_and_sample_size + let alpha = mean *. sampleSize + let beta = (1.0 -. mean) *. sampleSize + make(alpha, beta) + } + + let fromMeanAndStdev = (mean, stdev) => { + // https://en.wikipedia.org/wiki/Beta_distribution#Mean_and_variance + if !(0.0 < stdev && stdev <= 0.5) { + Error("Stdev must be in in between 0 and 0.5.") + } else if !(0.0 <= mean && mean <= 1.0) { + Error("Mean must be in between 0 and 1.0.") + } else { + let var = stdev *. stdev + let sampleSize = mean *. (1.0 -. mean) /. var -. 1.0 + fromMeanAndSampleSize(mean, sampleSize) + } + } } module Lognormal = { diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res index 22323e80..4b27c221 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res @@ -1,4 +1,5 @@ -type expressionValue = ReducerInterface_ExpressionValue.expressionValue +type internalExpressionValue = ReducerInterface_InternalExpressionValue.t +type internalExpressionValueType = ReducerInterface_InternalExpressionValue.internalExpressionValueType /* Function Registry "Type". A type, without any other information. @@ -8,6 +9,7 @@ type rec frType = | FRTypeNumber | FRTypeNumeric | FRTypeDistOrNumber + | FRTypeDist | FRTypeLambda | FRTypeRecord(frTypeRecord) | FRTypeDict(frType) @@ -28,7 +30,7 @@ type rec frValue = | FRValueArray(array) | FRValueDistOrNumber(frValueDistOrNumber) | FRValueRecord(frValueRecord) - | FRValueLambda(ReducerInterface_ExpressionValue.lambdaValue) + | FRValueLambda(ReducerInterface_InternalExpressionValue.lambdaValue) | FRValueString(string) | FRValueVariant(string) | FRValueAny(frValue) @@ -41,18 +43,27 @@ and frValueDistOrNumber = FRValueNumber(float) | FRValueDist(DistributionTypes.g type fnDefinition = { name: string, inputs: array, - run: (array, DistributionOperation.env) => result, + run: ( + array, + array, + GenericDist.env, + Reducer_Expression_T.reducerFn, + ) => result, } type function = { name: string, definitions: array, - examples: option, + requiresNamespace: bool, + nameSpace: string, + output: option, + examples: array, description: option, isExperimental: bool, } -type registry = array +type fnNameDict = Js.Dict.t> +type registry = {functions: array, fnNameDict: fnNameDict} module FRType = { type t = frType @@ -60,6 +71,7 @@ module FRType = { switch t { | FRTypeNumber => "number" | FRTypeNumeric => "numeric" + | FRTypeDist => "distribution" | FRTypeDistOrNumber => "distribution|number" | FRTypeRecord(r) => { let input = ((name, frType): frTypeRecordParam) => `${name}: ${toString(frType)}` @@ -73,47 +85,48 @@ module FRType = { | FRTypeAny => `any` } - let rec toFrValue = (r: expressionValue): option => + let rec toFrValue = (r: internalExpressionValue): option => switch r { - | EvNumber(f) => Some(FRValueNumber(f)) - | EvString(f) => Some(FRValueString(f)) - | EvDistribution(f) => Some(FRValueDistOrNumber(FRValueDist(f))) - | EvLambda(f) => Some(FRValueLambda(f)) - | EvArray(elements) => + | IEvNumber(f) => Some(FRValueNumber(f)) + | IEvString(f) => Some(FRValueString(f)) + | IEvDistribution(f) => Some(FRValueDistOrNumber(FRValueDist(f))) + | IEvLambda(f) => Some(FRValueLambda(f)) + | IEvArray(elements) => elements->E.A2.fmap(toFrValue)->E.A.O.openIfAllSome->E.O2.fmap(r => FRValueArray(r)) - | EvRecord(record) => - Js.Dict.entries(record) + | IEvRecord(map) => + Belt.Map.String.toArray(map) ->E.A2.fmap(((key, item)) => item->toFrValue->E.O2.fmap(o => (key, o))) ->E.A.O.openIfAllSome ->E.O2.fmap(r => FRValueRecord(r)) | _ => None } - let rec matchWithExpressionValue = (t: t, r: expressionValue): option => + let rec matchWithExpressionValue = (t: t, r: internalExpressionValue): option => switch (t, r) { | (FRTypeAny, f) => toFrValue(f) - | (FRTypeString, EvString(f)) => Some(FRValueString(f)) - | (FRTypeNumber, EvNumber(f)) => Some(FRValueNumber(f)) - | (FRTypeDistOrNumber, EvNumber(f)) => Some(FRValueDistOrNumber(FRValueNumber(f))) - | (FRTypeDistOrNumber, EvDistribution(Symbolic(#Float(f)))) => + | (FRTypeString, IEvString(f)) => Some(FRValueString(f)) + | (FRTypeNumber, IEvNumber(f)) => Some(FRValueNumber(f)) + | (FRTypeDistOrNumber, IEvNumber(f)) => Some(FRValueDistOrNumber(FRValueNumber(f))) + | (FRTypeDistOrNumber, IEvDistribution(Symbolic(#Float(f)))) => Some(FRValueDistOrNumber(FRValueNumber(f))) - | (FRTypeDistOrNumber, EvDistribution(f)) => Some(FRValueDistOrNumber(FRValueDist(f))) - | (FRTypeNumeric, EvNumber(f)) => Some(FRValueNumber(f)) - | (FRTypeNumeric, EvDistribution(Symbolic(#Float(f)))) => Some(FRValueNumber(f)) - | (FRTypeLambda, EvLambda(f)) => Some(FRValueLambda(f)) - | (FRTypeArray(intendedType), EvArray(elements)) => { + | (FRTypeDistOrNumber, IEvDistribution(f)) => Some(FRValueDistOrNumber(FRValueDist(f))) + | (FRTypeDist, IEvDistribution(f)) => Some(FRValueDist(f)) + | (FRTypeNumeric, IEvNumber(f)) => Some(FRValueNumber(f)) + | (FRTypeNumeric, IEvDistribution(Symbolic(#Float(f)))) => Some(FRValueNumber(f)) + | (FRTypeLambda, IEvLambda(f)) => Some(FRValueLambda(f)) + | (FRTypeArray(intendedType), IEvArray(elements)) => { let el = elements->E.A2.fmap(matchWithExpressionValue(intendedType)) E.A.O.openIfAllSome(el)->E.O2.fmap(r => FRValueArray(r)) } - | (FRTypeDict(r), EvRecord(record)) => - record - ->Js.Dict.entries + | (FRTypeDict(r), IEvRecord(map)) => + map + ->Belt.Map.String.toArray ->E.A2.fmap(((key, item)) => matchWithExpressionValue(r, item)->E.O2.fmap(o => (key, o))) ->E.A.O.openIfAllSome ->E.O2.fmap(r => FRValueDict(Js.Dict.fromArray(r))) - | (FRTypeRecord(recordParams), EvRecord(record)) => { + | (FRTypeRecord(recordParams), IEvRecord(map)) => { let getAndMatch = (name, input) => - E.Dict.get(record, name)->E.O.bind(matchWithExpressionValue(input)) + Belt.Map.String.get(map, name)->E.O.bind(matchWithExpressionValue(input)) //All names in the type must be present. If any are missing, the corresponding //value will be None, and this function would return None. let namesAndValues: array> = @@ -125,35 +138,38 @@ module FRType = { | _ => None } - let rec matchReverse = (e: frValue): expressionValue => + let rec matchReverse = (e: frValue): internalExpressionValue => switch e { - | FRValueNumber(f) => EvNumber(f) - | FRValueDistOrNumber(FRValueNumber(n)) => EvNumber(n) - | FRValueDistOrNumber(FRValueDist(n)) => EvDistribution(n) - | FRValueDist(dist) => EvDistribution(dist) - | FRValueArray(elements) => EvArray(elements->E.A2.fmap(matchReverse)) + | FRValueNumber(f) => IEvNumber(f) + | FRValueDistOrNumber(FRValueNumber(n)) => IEvNumber(n) + | FRValueDistOrNumber(FRValueDist(n)) => IEvDistribution(n) + | FRValueDist(dist) => IEvDistribution(dist) + | FRValueArray(elements) => IEvArray(elements->E.A2.fmap(matchReverse)) | FRValueRecord(frValueRecord) => { - let record = - frValueRecord->E.A2.fmap(((name, value)) => (name, matchReverse(value)))->E.Dict.fromArray - EvRecord(record) + let map = + frValueRecord + ->E.A2.fmap(((name, value)) => (name, matchReverse(value))) + ->Belt.Map.String.fromArray + IEvRecord(map) } | FRValueDict(frValueRecord) => { - let record = + let map = frValueRecord ->Js.Dict.entries ->E.A2.fmap(((name, value)) => (name, matchReverse(value))) - ->E.Dict.fromArray - EvRecord(record) + ->Belt.Map.String.fromArray + IEvRecord(map) } - | FRValueLambda(l) => EvLambda(l) - | FRValueString(string) => EvString(string) - | FRValueVariant(string) => EvString(string) + | FRValueLambda(l) => IEvLambda(l) + | FRValueString(string) => IEvString(string) + | FRValueVariant(string) => IEvString(string) | FRValueAny(f) => matchReverse(f) } - let matchWithExpressionValueArray = (inputs: array, args: array): option< - array, - > => { + let matchWithExpressionValueArray = ( + inputs: array, + args: array, + ): option> => { let isSameLength = E.A.length(inputs) == E.A.length(args) if !isSameLength { None @@ -169,6 +185,9 @@ module FRType = { This module, Matcher, is fairly lengthy. However, only two functions from it are meant to be used outside of it. These are findMatches and matchToDef in Matches.Registry. The rest of it is just called from those two functions. + + Update: This really should be completely re-done sometime, and tested. It works, but it's pretty messy. I'm sure + there are internal bugs, but the end functionality works, so I'm not too worried. */ module Matcher = { module MatchSimple = { @@ -204,14 +223,14 @@ module Matcher = { } module FnDefinition = { - let matchAssumingSameName = (f: fnDefinition, args: array) => { + let matchAssumingSameName = (f: fnDefinition, args: array) => { switch FRType.matchWithExpressionValueArray(f.inputs, args) { | Some(_) => MatchSimple.FullMatch | None => MatchSimple.SameNameDifferentArguments } } - let match = (f: fnDefinition, fnName: string, args: array) => { + let match = (f: fnDefinition, fnName: string, args: array) => { if f.name !== fnName { MatchSimple.DifferentName } else { @@ -224,53 +243,82 @@ module Matcher = { type definitionId = int type match = Match.t, definitionId> - let match = (f: function, fnName: string, args: array): match => { - let matchedDefinition = () => - E.A.getIndexBy(f.definitions, r => - MatchSimple.isFullMatch(FnDefinition.match(r, fnName, args)) - ) |> E.O.fmap(r => Match.FullMatch(r)) - let getMatchedNameOnlyDefinition = () => { - let nameMatchIndexes = - f.definitions - ->E.A2.fmapi((index, r) => - MatchSimple.isNameMatchOnly(FnDefinition.match(r, fnName, args)) ? Some(index) : None + let match = ( + f: function, + nameSpace: option, + fnName: string, + args: array, + ): match => { + switch nameSpace { + | Some(ns) if ns !== f.nameSpace => Match.DifferentName + | _ => { + let matchedDefinition = () => + E.A.getIndexBy(f.definitions, r => + MatchSimple.isFullMatch(FnDefinition.match(r, fnName, args)) + ) |> E.O.fmap(r => Match.FullMatch(r)) + let getMatchedNameOnlyDefinition = () => { + let nameMatchIndexes = + f.definitions + ->E.A2.fmapi((index, r) => + MatchSimple.isNameMatchOnly(FnDefinition.match(r, fnName, args)) + ? Some(index) + : None + ) + ->E.A.O.concatSomes + switch nameMatchIndexes { + | [] => None + | elements => Some(Match.SameNameDifferentArguments(elements)) + } + } + + E.A.O.firstSomeFnWithDefault( + [matchedDefinition, getMatchedNameOnlyDefinition], + Match.DifferentName, ) - ->E.A.O.concatSomes - switch nameMatchIndexes { - | [] => None - | elements => Some(Match.SameNameDifferentArguments(elements)) } } - - E.A.O.firstSomeFnWithDefault( - [matchedDefinition, getMatchedNameOnlyDefinition], - Match.DifferentName, - ) } } module RegistryMatch = { type match = { + nameSpace: string, fnName: string, inputIndex: int, } - let makeMatch = (fnName: string, inputIndex: int) => {fnName: fnName, inputIndex: inputIndex} + let makeMatch = (nameSpace: string, fnName: string, inputIndex: int) => { + nameSpace: nameSpace, + fnName: fnName, + inputIndex: inputIndex, + } } module Registry = { - let _findExactMatches = (r: registry, fnName: string, args: array) => { - let functionMatchPairs = r->E.A2.fmap(l => (l, Function.match(l, fnName, args))) + let _findExactMatches = ( + r: registry, + nameSpace: option, + fnName: string, + args: array, + ) => { + let functionMatchPairs = + r.functions->E.A2.fmap(l => (l, Function.match(l, nameSpace, fnName, args))) let fullMatch = functionMatchPairs->E.A.getBy(((_, match)) => Match.isFullMatch(match)) fullMatch->E.O.bind(((fn, match)) => switch match { - | FullMatch(index) => Some(RegistryMatch.makeMatch(fn.name, index)) + | FullMatch(index) => Some(RegistryMatch.makeMatch(fn.nameSpace, fn.name, index)) | _ => None } ) } - let _findNameMatches = (r: registry, fnName: string, args: array) => { - let functionMatchPairs = r->E.A2.fmap(l => (l, Function.match(l, fnName, args))) + let _findNameMatches = ( + r: registry, + nameSpace: option, + fnName: string, + args: array, + ) => { + let functionMatchPairs = + r.functions->E.A2.fmap(l => (l, Function.match(l, nameSpace, fnName, args))) let getNameMatches = functionMatchPairs ->E.A2.fmap(((fn, match)) => Match.isNameMatchOnly(match) ? Some((fn, match)) : None) @@ -280,7 +328,7 @@ module Matcher = { ->E.A2.fmap(((fn, match)) => switch match { | SameNameDifferentArguments(indexes) => - indexes->E.A2.fmap(index => RegistryMatch.makeMatch(fn.name, index)) + indexes->E.A2.fmap(index => RegistryMatch.makeMatch(fn.nameSpace, fn.name, index)) | _ => [] } ) @@ -288,22 +336,29 @@ module Matcher = { E.A.toNoneIfEmpty(matches) } - let findMatches = (r: registry, fnName: string, args: array) => { - switch _findExactMatches(r, fnName, args) { + let findMatches = (r: registry, fnName: string, args: array) => { + let fnNameInParts = Js.String.split(".", fnName) + let fnToSearch = E.A.get(fnNameInParts, 1) |> E.O.default(fnNameInParts[0]) + let nameSpace = E.A.length(fnNameInParts) > 1 ? Some(fnNameInParts[0]) : None + + switch _findExactMatches(r, nameSpace, fnToSearch, args) { | Some(r) => Match.FullMatch(r) | None => - switch _findNameMatches(r, fnName, args) { + switch _findNameMatches(r, nameSpace, fnToSearch, args) { | Some(r) => Match.SameNameDifferentArguments(r) | None => Match.DifferentName } } } - let matchToDef = (registry: registry, {fnName, inputIndex}: RegistryMatch.match): option< - fnDefinition, - > => - registry - ->E.A.getBy(fn => fn.name === fnName) + let matchToDef = ( + registry: registry, + {nameSpace, fnName, inputIndex}: RegistryMatch.match, + ): option => + registry.functions + ->E.A.getBy(fn => { + nameSpace === fn.nameSpace && fnName === fn.name + }) ->E.O.bind(fn => E.A.get(fn.definitions, inputIndex)) } } @@ -316,15 +371,28 @@ module FnDefinition = { t.name ++ `(${inputs})` } - let run = (t: t, args: array, env: DistributionOperation.env) => { + let isMatch = (t: t, args: array) => { let argValues = FRType.matchWithExpressionValueArray(t.inputs, args) switch argValues { - | Some(values) => t.run(values, env) + | Some(_) => true + | None => false + } + } + + let run = ( + t: t, + args: array, + env: GenericDist.env, + reducer: Reducer_Expression_T.reducerFn, + ) => { + let argValues = FRType.matchWithExpressionValueArray(t.inputs, args) + switch argValues { + | Some(values) => t.run(args, values, env, reducer) | None => Error("Incorrect Types") } } - let make = (~name, ~inputs, ~run): t => { + let make = (~name, ~inputs, ~run, ()): t => { name: name, inputs: inputs, run: run, @@ -337,16 +405,29 @@ module Function = { type functionJson = { name: string, definitions: array, - examples: option, + examples: array, description: option, isExperimental: bool, } - let make = (~name, ~definitions, ~examples=?, ~description=?, ~isExperimental=false, ()): t => { + let make = ( + ~name, + ~nameSpace, + ~requiresNamespace, + ~definitions, + ~examples=?, + ~output=?, + ~description=?, + ~isExperimental=false, + (), + ): t => { name: name, + nameSpace: nameSpace, definitions: definitions, - examples: examples, + output: output, + examples: examples |> E.O.default([]), isExperimental: isExperimental, + requiresNamespace: requiresNamespace, description: description, } @@ -359,22 +440,65 @@ module Function = { } } +module NameSpace = { + type t = {name: string, functions: array} + let definitions = (t: t) => t.functions->E.A2.fmap(f => f.definitions)->E.A.concatMany + let uniqueFnNames = (t: t) => definitions(t)->E.A2.fmap(r => r.name)->E.A.uniq + let nameToDefinitions = (t: t, name: string) => definitions(t)->E.A2.filter(r => r.name == name) +} + module Registry = { - let toJson = (r: registry) => r->E.A2.fmap(Function.toJson) + let toJson = (r: registry) => r.functions->E.A2.fmap(Function.toJson) + let allExamples = (r: registry) => r.functions->E.A2.fmap(r => r.examples)->E.A.concatMany + let allExamplesWithFns = (r: registry) => + r.functions->E.A2.fmap(fn => fn.examples->E.A2.fmap(example => (fn, example)))->E.A.concatMany + + let _buildFnNameDict = (r: array): fnNameDict => { + let allDefinitionsWithFns = + r + ->E.A2.fmap(fn => fn.definitions->E.A2.fmap(definitions => (fn, definitions))) + ->E.A.concatMany + let functionsWithFnNames = + allDefinitionsWithFns + ->E.A2.fmap(((fn, def)) => { + let nameWithNamespace = `${fn.nameSpace}.${def.name}` + let nameWithoutNamespace = def.name + fn.requiresNamespace + ? [(nameWithNamespace, fn)] + : [(nameWithNamespace, fn), (nameWithoutNamespace, fn)] + }) + ->E.A.concatMany + let uniqueNames = functionsWithFnNames->E.A2.fmap(((name, _)) => name)->E.A.uniq + let cacheAsArray: array<(string, array)> = uniqueNames->E.A2.fmap(uniqueName => { + let relevantItems = + E.A2.filter(functionsWithFnNames, ((defName, _)) => defName == uniqueName)->E.A2.fmap( + E.Tuple2.second, + ) + (uniqueName, relevantItems) + }) + cacheAsArray->Js.Dict.fromArray + } + + let make = (fns: array): registry => { + let dict = _buildFnNameDict(fns) + {functions: fns, fnNameDict: dict} + } /* There's a (potential+minor) bug here: If a function definition is called outside of the calls to the registry, then it's possible that there could be a match after the registry is called. However, for now, we could just call the registry last. */ - let matchAndRun = ( + let _matchAndRun = ( ~registry: registry, ~fnName: string, - ~args: array, - ~env: DistributionOperation.env, + ~args: array, + ~env: GenericDist.env, + ~reducer: Reducer_Expression_T.reducerFn, ) => { + let relevantFunctions = Js.Dict.get(registry.fnNameDict, fnName) |> E.O.default([]) + let modified = {functions: relevantFunctions, fnNameDict: registry.fnNameDict} let matchToDef = m => Matcher.Registry.matchToDef(registry, m) - //Js.log(toSimple(registry)) let showNameMatchDefinitions = matches => { let defs = matches @@ -385,10 +509,23 @@ module Registry = { ->E.A2.joinWith("; ") `There are function matches for ${fnName}(), but with different arguments: ${defs}` } - switch Matcher.Registry.findMatches(registry, fnName, args) { - | Matcher.Match.FullMatch(match) => match->matchToDef->E.O2.fmap(FnDefinition.run(_, args, env)) + + switch Matcher.Registry.findMatches(modified, fnName, args) { + | Matcher.Match.FullMatch(match) => + match->matchToDef->E.O2.fmap(FnDefinition.run(_, args, env, reducer)) | SameNameDifferentArguments(m) => Some(Error(showNameMatchDefinitions(m))) | _ => None } } + + let dispatch = ( + registry, + (fnName, args): ReducerInterface_InternalExpressionValue.functionCall, + env, + reducer: Reducer_Expression_T.reducerFn, + ) => { + _matchAndRun(~registry, ~fnName, ~args, ~env, ~reducer)->E.O2.fmap( + E.R2.errMap(_, s => Reducer_ErrorValue.RETodo(s)), + ) + } } diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Helpers.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Helpers.res index 7d0240eb..1c06d3c0 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Helpers.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Helpers.res @@ -4,11 +4,13 @@ let impossibleError = "Wrong inputs / Logically impossible" module Wrappers = { let symbolic = r => DistributionTypes.Symbolic(r) - let evDistribution = r => ReducerInterface_ExpressionValue.EvDistribution(r) - let evNumber = r => ReducerInterface_ExpressionValue.EvNumber(r) - let evArray = r => ReducerInterface_ExpressionValue.EvArray(r) - let evRecord = r => ReducerInterface_ExpressionValue.EvRecord(r) - let evString = r => ReducerInterface_ExpressionValue.EvString(r) + let pointSet = r => DistributionTypes.PointSet(r) + let sampleSet = r => DistributionTypes.SampleSet(r) + let evDistribution = r => ReducerInterface_InternalExpressionValue.IEvDistribution(r) + let evNumber = r => ReducerInterface_InternalExpressionValue.IEvNumber(r) + let evArray = r => ReducerInterface_InternalExpressionValue.IEvArray(r) + let evRecord = r => ReducerInterface_InternalExpressionValue.IEvRecord(r) + let evString = r => ReducerInterface_InternalExpressionValue.IEvString(r) let symbolicEvDistribution = r => r->DistributionTypes.Symbolic->evDistribution } @@ -27,6 +29,12 @@ module Prepare = { | _ => Error(impossibleError) } + let threeArgs = (inputs: ts): result => + switch inputs { + | [FRValueRecord([(_, n1), (_, n2), (_, n3)])] => Ok([n1, n2, n3]) + | _ => Error(impossibleError) + } + let toArgs = (inputs: ts): result => switch inputs { | [FRValueRecord(args)] => args->E.A2.fmap(((_, b)) => b)->Ok @@ -57,6 +65,16 @@ module Prepare = { } } + let twoDist = (values: ts): result< + (DistributionTypes.genericDist, DistributionTypes.genericDist), + err, + > => { + switch values { + | [FRValueDist(a1), FRValueDist(a2)] => Ok(a1, a2) + | _ => Error(impossibleError) + } + } + let twoNumbers = (values: ts): result<(float, float), err> => { switch values { | [FRValueNumber(a1), FRValueNumber(a2)] => Ok(a1, a2) @@ -81,6 +99,11 @@ module Prepare = { module Record = { let twoDistOrNumber = (values: ts): result<(frValueDistOrNumber, frValueDistOrNumber), err> => values->ToValueArray.Record.twoArgs->E.R.bind(twoDistOrNumber) + + let twoDist = (values: ts): result< + (DistributionTypes.genericDist, DistributionTypes.genericDist), + err, + > => values->ToValueArray.Record.twoArgs->E.R.bind(twoDist) } } @@ -128,8 +151,7 @@ module Prepare = { module Process = { module DistOrNumberToDist = { module Helpers = { - let toSampleSet = (r, env: DistributionOperation.env) => - GenericDist.toSampleSetDist(r, env.sampleCount) + let toSampleSet = (r, env: GenericDist.env) => GenericDist.toSampleSetDist(r, env.sampleCount) let mapFnResult = r => switch r { @@ -166,7 +188,7 @@ module Process = { let oneValue = ( ~fn: float => result, ~value: frValueDistOrNumber, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ): result => { switch value { | FRValueNumber(a1) => fn(a1) @@ -179,7 +201,7 @@ module Process = { let twoValues = ( ~fn: ((float, float)) => result, ~values: (frValueDistOrNumber, frValueDistOrNumber), - ~env: DistributionOperation.env, + ~env: GenericDist.env, ): result => { switch values { | (FRValueNumber(a1), FRValueNumber(a2)) => fn((a1, a2)) @@ -193,72 +215,3 @@ module Process = { twoValues(~fn=Helpers.wrapSymbolic(fn), ~values) } } - -module TwoArgDist = { - let process = (~fn, ~env, r) => - r - ->E.R.bind(Process.DistOrNumberToDist.twoValuesUsingSymbolicDist(~fn, ~values=_, ~env)) - ->E.R2.fmap(Wrappers.evDistribution) - - let make = (name, fn) => { - FnDefinition.make(~name, ~inputs=[FRTypeDistOrNumber, FRTypeDistOrNumber], ~run=(inputs, env) => - inputs->Prepare.ToValueTuple.twoDistOrNumber->process(~fn, ~env) - ) - } - - let makeRecordP5P95 = (name, fn) => { - FnDefinition.make( - ~name, - ~inputs=[FRTypeRecord([("p5", FRTypeDistOrNumber), ("p95", FRTypeDistOrNumber)])], - ~run=(inputs, env) => inputs->Prepare.ToValueTuple.Record.twoDistOrNumber->process(~fn, ~env), - ) - } - - let makeRecordMeanStdev = (name, fn) => { - FnDefinition.make( - ~name, - ~inputs=[FRTypeRecord([("mean", FRTypeDistOrNumber), ("stdev", FRTypeDistOrNumber)])], - ~run=(inputs, env) => inputs->Prepare.ToValueTuple.Record.twoDistOrNumber->process(~fn, ~env), - ) - } -} - -module OneArgDist = { - let process = (~fn, ~env, r) => - r - ->E.R.bind(Process.DistOrNumberToDist.oneValueUsingSymbolicDist(~fn, ~value=_, ~env)) - ->E.R2.fmap(Wrappers.evDistribution) - - let make = (name, fn) => - FnDefinition.make(~name, ~inputs=[FRTypeDistOrNumber], ~run=(inputs, env) => - inputs->Prepare.ToValueTuple.oneDistOrNumber->process(~fn, ~env) - ) -} - -module ArrayNumberDist = { - let make = (name, fn) => { - FnDefinition.make(~name, ~inputs=[FRTypeArray(FRTypeNumber)], ~run=(inputs, _) => - Prepare.ToTypedArray.numbers(inputs) - ->E.R.bind(r => E.A.length(r) === 0 ? Error("List is empty") : Ok(r)) - ->E.R.bind(fn) - ) - } - let make2 = (name, fn) => { - FnDefinition.make(~name, ~inputs=[FRTypeArray(FRTypeAny)], ~run=(inputs, _) => - Prepare.ToTypedArray.numbers(inputs) - ->E.R.bind(r => E.A.length(r) === 0 ? Error("List is empty") : Ok(r)) - ->E.R.bind(fn) - ) - } -} - -module NumberToNumber = { - let make = (name, fn) => - FnDefinition.make(~name, ~inputs=[FRTypeNumber], ~run=(inputs, _) => { - inputs - ->getOrError(0) - ->E.R.bind(Prepare.oneNumber) - ->E.R2.fmap(fn) - ->E.R2.fmap(Wrappers.evNumber) - }) -} diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Library.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Library.res index 74929c0b..a12c4a36 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Library.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Library.res @@ -1,505 +1,13 @@ -open FunctionRegistry_Core -open FunctionRegistry_Helpers +let fnList = Belt.Array.concatMany([ + FR_Dict.library, + FR_Dist.library, + FR_Fn.library, + FR_Sampleset.library, + FR_List.library, + FR_Number.library, + FR_Pointset.library, + FR_Scoring.library, +]) -let twoArgs = E.Tuple2.toFnCall - -module Declaration = { - let frType = FRTypeRecord([ - ("fn", FRTypeLambda), - ("inputs", FRTypeArray(FRTypeRecord([("min", FRTypeNumber), ("max", FRTypeNumber)]))), - ]) - - let fromExpressionValue = (e: frValue): result => { - switch FunctionRegistry_Helpers.Prepare.ToValueArray.Record.twoArgs([e]) { - | Ok([FRValueLambda(lambda), FRValueArray(inputs)]) => { - open FunctionRegistry_Helpers.Prepare - let getMinMax = arg => - ToValueArray.Record.toArgs([arg]) - ->E.R.bind(ToValueTuple.twoNumbers) - ->E.R2.fmap(((min, max)) => Declaration.ContinuousFloatArg.make(min, max)) - inputs - ->E.A2.fmap(getMinMax) - ->E.A.R.firstErrorOrOpen - ->E.R2.fmap(args => ReducerInterface_ExpressionValue.EvDeclaration( - Declaration.make(lambda, args), - )) - } - | Error(r) => Error(r) - | Ok(_) => Error(FunctionRegistry_Helpers.impossibleError) - } - } -} - -let inputsTodist = (inputs: array, makeDist) => { - let array = inputs->getOrError(0)->E.R.bind(Prepare.ToValueArray.Array.openA) - let xyCoords = - array->E.R.bind(xyCoords => - xyCoords - ->E.A2.fmap(xyCoord => - [xyCoord]->Prepare.ToValueArray.Record.twoArgs->E.R.bind(Prepare.ToValueTuple.twoNumbers) - ) - ->E.A.R.firstErrorOrOpen - ) - let expressionValue = - xyCoords - ->E.R.bind(r => r->XYShape.T.makeFromZipped->E.R2.errMap(XYShape.Error.toString)) - ->E.R2.fmap(r => ReducerInterface_ExpressionValue.EvDistribution(PointSet(makeDist(r)))) - expressionValue -} - -let registry = [ - Function.make( - ~name="toContinuousPointSet", - ~definitions=[ - FnDefinition.make( - ~name="toContinuousPointSet", - ~inputs=[FRTypeArray(FRTypeRecord([("x", FRTypeNumeric), ("y", FRTypeNumeric)]))], - ~run=(inputs, _) => inputsTodist(inputs, r => Continuous(Continuous.make(r))), - ), - ], - (), - ), - Function.make( - ~name="toDiscretePointSet", - ~definitions=[ - FnDefinition.make( - ~name="toDiscretePointSet", - ~inputs=[FRTypeArray(FRTypeRecord([("x", FRTypeNumeric), ("y", FRTypeNumeric)]))], - ~run=(inputs, _) => inputsTodist(inputs, r => Discrete(Discrete.make(r))), - ), - ], - (), - ), - Function.make( - ~name="Declaration", - ~definitions=[ - FnDefinition.make(~name="declareFn", ~inputs=[Declaration.frType], ~run=(inputs, _) => { - inputs->getOrError(0)->E.R.bind(Declaration.fromExpressionValue) - }), - ], - (), - ), - Function.make( - ~name="Normal", - ~examples=`normal(5,1) -normal({p5: 4, p95: 10}) -normal({mean: 5, stdev: 2})`, - ~definitions=[ - TwoArgDist.make("normal", twoArgs(SymbolicDist.Normal.make)), - TwoArgDist.makeRecordP5P95("normal", r => - twoArgs(SymbolicDist.Normal.from90PercentCI, r)->Ok - ), - TwoArgDist.makeRecordMeanStdev("normal", twoArgs(SymbolicDist.Normal.make)), - ], - (), - ), - Function.make( - ~name="Lognormal", - ~examples=`lognormal(0.5, 0.8) -lognormal({p5: 4, p95: 10}) -lognormal({mean: 5, stdev: 2})`, - ~definitions=[ - TwoArgDist.make("lognormal", twoArgs(SymbolicDist.Lognormal.make)), - TwoArgDist.makeRecordP5P95("lognormal", r => - twoArgs(SymbolicDist.Lognormal.from90PercentCI, r)->Ok - ), - TwoArgDist.makeRecordMeanStdev("lognormal", twoArgs(SymbolicDist.Lognormal.fromMeanAndStdev)), - ], - (), - ), - Function.make( - ~name="Uniform", - ~examples=`uniform(10, 12)`, - ~definitions=[TwoArgDist.make("uniform", twoArgs(SymbolicDist.Uniform.make))], - (), - ), - Function.make( - ~name="Beta", - ~examples=`beta(20, 25)`, - ~definitions=[TwoArgDist.make("beta", twoArgs(SymbolicDist.Beta.make))], - (), - ), - Function.make( - ~name="Cauchy", - ~examples=`cauchy(5, 1)`, - ~definitions=[TwoArgDist.make("cauchy", twoArgs(SymbolicDist.Cauchy.make))], - (), - ), - Function.make( - ~name="Gamma", - ~examples=`gamma(5, 1)`, - ~definitions=[TwoArgDist.make("gamma", twoArgs(SymbolicDist.Gamma.make))], - (), - ), - Function.make( - ~name="Logistic", - ~examples=`gamma(5, 1)`, - ~definitions=[TwoArgDist.make("logistic", twoArgs(SymbolicDist.Logistic.make))], - (), - ), - Function.make( - ~name="To (Distribution)", - ~examples=`5 to 10 -to(5,10) --5 to 5`, - ~definitions=[ - TwoArgDist.make("to", twoArgs(SymbolicDist.From90thPercentile.make)), - TwoArgDist.make( - "credibleIntervalToDistribution", - twoArgs(SymbolicDist.From90thPercentile.make), - ), - ], - (), - ), - Function.make( - ~name="Exponential", - ~examples=`exponential(2)`, - ~definitions=[OneArgDist.make("exponential", SymbolicDist.Exponential.make)], - (), - ), - Function.make( - ~name="Bernoulli", - ~examples=`bernoulli(0.5)`, - ~definitions=[OneArgDist.make("bernoulli", SymbolicDist.Bernoulli.make)], - (), - ), - Function.make( - ~name="PointMass", - ~examples=`pointMass(0.5)`, - ~definitions=[OneArgDist.make("pointMass", SymbolicDist.Float.makeSafe)], - (), - ), - Function.make( - ~name="toContinuousPointSet", - ~description="Converts a set of points to a continuous distribution", - ~examples=`toContinuousPointSet([ - {x: 0, y: 0.1}, - {x: 1, y: 0.2}, - {x: 2, y: 0.15}, - {x: 3, y: 0.1} -])`, - ~definitions=[ - FnDefinition.make( - ~name="toContinuousPointSet", - ~inputs=[FRTypeArray(FRTypeRecord([("x", FRTypeNumeric), ("y", FRTypeNumeric)]))], - ~run=(inputs, _) => inputsTodist(inputs, r => Continuous(Continuous.make(r))), - ), - ], - (), - ), - Function.make( - ~name="toDiscretePointSet", - ~description="Converts a set of points to a discrete distribution", - ~examples=`toDiscretePointSet([ - {x: 0, y: 0.1}, - {x: 1, y: 0.2}, - {x: 2, y: 0.15}, - {x: 3, y: 0.1} -])`, - ~definitions=[ - FnDefinition.make( - ~name="toDiscretePointSet", - ~inputs=[FRTypeArray(FRTypeRecord([("x", FRTypeNumeric), ("y", FRTypeNumeric)]))], - ~run=(inputs, _) => inputsTodist(inputs, r => Discrete(Discrete.make(r))), - ), - ], - (), - ), - Function.make( - ~name="Declaration (Continuous Function)", - ~description="Adds metadata to a function of the input ranges. Works now for numeric and date inputs. This is useful when making predictions. It allows you to limit the domain that your prediction will be used and scored within.", - ~examples=`declareFn({ - fn: {|a,b| a }, - inputs: [ - {min: 0, max: 100}, - {min: 30, max: 50} - ] -})`, - ~definitions=[ - FnDefinition.make(~name="declareFn", ~inputs=[Declaration.frType], ~run=(inputs, _) => { - inputs->E.A.unsafe_get(0)->Declaration.fromExpressionValue - }), - ], - ~isExperimental=true, - (), - ), - Function.make( - ~name="Floor", - ~definitions=[NumberToNumber.make("floor", Js.Math.floor_float)], - (), - ), - Function.make( - ~name="Ceiling", - ~definitions=[NumberToNumber.make("ceil", Js.Math.ceil_float)], - (), - ), - Function.make( - ~name="Absolute Value", - ~definitions=[NumberToNumber.make("abs", Js.Math.abs_float)], - (), - ), - Function.make(~name="Exponent", ~definitions=[NumberToNumber.make("exp", Js.Math.exp)], ()), - Function.make(~name="Log", ~definitions=[NumberToNumber.make("log", Js.Math.log)], ()), - Function.make( - ~name="Log Base 10", - ~definitions=[NumberToNumber.make("log10", Js.Math.log10)], - (), - ), - Function.make(~name="Log Base 2", ~definitions=[NumberToNumber.make("log2", Js.Math.log2)], ()), - Function.make(~name="Round", ~definitions=[NumberToNumber.make("round", Js.Math.round)], ()), - Function.make( - ~name="Sum", - ~definitions=[ArrayNumberDist.make("sum", r => r->E.A.Floats.sum->Wrappers.evNumber->Ok)], - (), - ), - Function.make( - ~name="Product", - ~definitions=[ - ArrayNumberDist.make("product", r => r->E.A.Floats.product->Wrappers.evNumber->Ok), - ], - (), - ), - Function.make( - ~name="Min", - ~definitions=[ArrayNumberDist.make("min", r => r->E.A.Floats.min->Wrappers.evNumber->Ok)], - (), - ), - Function.make( - ~name="Max", - ~definitions=[ArrayNumberDist.make("max", r => r->E.A.Floats.max->Wrappers.evNumber->Ok)], - (), - ), - Function.make( - ~name="Mean", - ~definitions=[ArrayNumberDist.make("mean", r => r->E.A.Floats.mean->Wrappers.evNumber->Ok)], - (), - ), - Function.make( - ~name="Geometric Mean", - ~definitions=[ - ArrayNumberDist.make("geomean", r => r->E.A.Floats.geomean->Wrappers.evNumber->Ok), - ], - (), - ), - Function.make( - ~name="Standard Deviation", - ~definitions=[ArrayNumberDist.make("stdev", r => r->E.A.Floats.stdev->Wrappers.evNumber->Ok)], - (), - ), - Function.make( - ~name="Variance", - ~definitions=[ - ArrayNumberDist.make("variance", r => r->E.A.Floats.stdev->Wrappers.evNumber->Ok), - ], - (), - ), - Function.make( - ~name="First", - ~definitions=[ - ArrayNumberDist.make2("first", r => - r->E.A.first |> E.O.toResult(impossibleError) |> E.R.fmap(Wrappers.evNumber) - ), - ], - (), - ), - Function.make( - ~name="Last", - ~definitions=[ - ArrayNumberDist.make2("last", r => - r->E.A.last |> E.O.toResult(impossibleError) |> E.R.fmap(Wrappers.evNumber) - ), - ], - (), - ), - Function.make( - ~name="Sort", - ~definitions=[ - ArrayNumberDist.make("sort", r => - r->E.A.Floats.sort->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok - ), - ], - (), - ), - Function.make( - ~name="Reverse", - ~definitions=[ - ArrayNumberDist.make("reverse", r => - r->Belt_Array.reverse->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok - ), - ], - (), - ), - Function.make( - ~name="Cumulative Sum", - ~definitions=[ - ArrayNumberDist.make("cumsum", r => - r->E.A.Floats.cumsum->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok - ), - ], - (), - ), - Function.make( - ~name="Cumulative Prod", - ~definitions=[ - ArrayNumberDist.make("cumprod", r => - r->E.A.Floats.cumsum->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok - ), - ], - (), - ), - Function.make( - ~name="Diff", - ~definitions=[ - ArrayNumberDist.make("diff", r => - r->E.A.Floats.diff->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok - ), - ], - (), - ), - Function.make( - ~name="Dict.merge", - ~definitions=[ - FnDefinition.make( - ~name="merge", - ~inputs=[FRTypeDict(FRTypeAny), FRTypeDict(FRTypeAny)], - ~run=(inputs, _) => { - switch inputs { - | [FRValueDict(d1), FRValueDict(d2)] => { - let newDict = - E.Dict.concat(d1, d2) |> Js.Dict.map((. r) => - FunctionRegistry_Core.FRType.matchReverse(r) - ) - newDict->Wrappers.evRecord->Ok - } - | _ => Error(impossibleError) - } - }, - ), - ], - (), - ), - //TODO: Make sure that two functions can't have the same name. This causes chaos elsewhere. - Function.make( - ~name="Dict.mergeMany", - ~definitions=[ - FnDefinition.make(~name="mergeMany", ~inputs=[FRTypeArray(FRTypeDict(FRTypeAny))], ~run=( - inputs, - _, - ) => - inputs - ->Prepare.ToTypedArray.dicts - ->E.R2.fmap(E.Dict.concatMany) - ->E.R2.fmap(Js.Dict.map((. r) => FunctionRegistry_Core.FRType.matchReverse(r))) - ->E.R2.fmap(Wrappers.evRecord) - ), - ], - (), - ), - Function.make( - ~name="Dict.keys", - ~definitions=[ - FnDefinition.make(~name="keys", ~inputs=[FRTypeDict(FRTypeAny)], ~run=(inputs, _) => - switch inputs { - | [FRValueDict(d1)] => Js.Dict.keys(d1)->E.A2.fmap(Wrappers.evString)->Wrappers.evArray->Ok - | _ => Error(impossibleError) - } - ), - ], - (), - ), - Function.make( - ~name="Dict.values", - ~definitions=[ - FnDefinition.make(~name="values", ~inputs=[FRTypeDict(FRTypeAny)], ~run=(inputs, _) => - switch inputs { - | [FRValueDict(d1)] => - Js.Dict.values(d1) - ->E.A2.fmap(FunctionRegistry_Core.FRType.matchReverse) - ->Wrappers.evArray - ->Ok - | _ => Error(impossibleError) - } - ), - ], - (), - ), - Function.make( - ~name="Dict.toList", - ~definitions=[ - FnDefinition.make(~name="dictToList", ~inputs=[FRTypeDict(FRTypeAny)], ~run=(inputs, _) => - switch inputs { - | [FRValueDict(dict)] => - dict - ->Js.Dict.entries - ->E.A2.fmap(((key, value)) => - Wrappers.evArray([ - Wrappers.evString(key), - FunctionRegistry_Core.FRType.matchReverse(value), - ]) - ) - ->Wrappers.evArray - ->Ok - | _ => Error(impossibleError) - } - ), - ], - (), - ), - Function.make( - ~name="Dict.fromList", - ~definitions=[ - FnDefinition.make(~name="dictFromList", ~inputs=[FRTypeArray(FRTypeArray(FRTypeAny))], ~run=( - inputs, - _, - ) => { - let convertInternalItems = items => - items - ->E.A2.fmap(item => { - switch item { - | [FRValueString(string), value] => - (string, FunctionRegistry_Core.FRType.matchReverse(value))->Ok - | _ => Error(impossibleError) - } - }) - ->E.A.R.firstErrorOrOpen - ->E.R2.fmap(Js.Dict.fromArray) - ->E.R2.fmap(Wrappers.evRecord) - inputs->getOrError(0)->E.R.bind(Prepare.ToValueArray.Array.arrayOfArrays) - |> E.R2.bind(convertInternalItems) - }), - ], - (), - ), - Function.make( - ~name="List.make", - ~definitions=[ - //Todo: If the second item is a function with no args, it could be nice to run this function and return the result. - FnDefinition.make(~name="listMake", ~inputs=[FRTypeNumber, FRTypeAny], ~run=(inputs, _) => { - switch inputs { - | [FRValueNumber(number), value] => - Belt.Array.make(E.Float.toInt(number), value) - ->E.A2.fmap(FunctionRegistry_Core.FRType.matchReverse) - ->Wrappers.evArray - ->Ok - | _ => Error(impossibleError) - } - }), - ], - (), - ), - Function.make( - ~name="upTo", - ~definitions=[ - FnDefinition.make(~name="upTo", ~inputs=[FRTypeNumber, FRTypeNumber], ~run=(inputs, _) => - inputs - ->Prepare.ToValueTuple.twoNumbers - ->E.R2.fmap(((low, high)) => - E.A.Floats.range(low, high, (high -. low +. 1.0)->E.Float.toInt) - ->E.A2.fmap(Wrappers.evNumber) - ->Wrappers.evArray - ) - ), - ], - (), - ), -] +let registry = FunctionRegistry_Core.Registry.make(fnList) +let dispatch = FunctionRegistry_Core.Registry.dispatch(registry) diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Dict.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Dict.res new file mode 100644 index 00000000..0c85bbe1 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Dict.res @@ -0,0 +1,170 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers + +let nameSpace = "Dict" + +module Internals = { + type t = ReducerInterface_InternalExpressionValue.map + + let keys = (a: t): internalExpressionValue => IEvArray( + Belt.Map.String.keysToArray(a)->E.A2.fmap(Wrappers.evString), + ) + + let values = (a: t): internalExpressionValue => IEvArray(Belt.Map.String.valuesToArray(a)) + + let toList = (a: t): internalExpressionValue => + Belt.Map.String.toArray(a) + ->E.A2.fmap(((key, value)) => Wrappers.evArray([IEvString(key), value])) + ->Wrappers.evArray + + let fromList = (items: array): result => + items + ->E.A2.fmap(item => { + switch (item: internalExpressionValue) { + | IEvArray([IEvString(string), value]) => (string, value)->Ok + | _ => Error(impossibleError) + } + }) + ->E.A.R.firstErrorOrOpen + ->E.R2.fmap(Belt.Map.String.fromArray) + ->E.R2.fmap(Wrappers.evRecord) + + let merge = (a: t, b: t): internalExpressionValue => IEvRecord( + Belt.Map.String.merge(a, b, (_, _, c) => c), + ) + + //Belt.Map.String has a function for mergeMany, but I couldn't understand how to use it yet. + let mergeMany = (a: array): internalExpressionValue => { + let mergedValues = + a->E.A2.fmap(Belt.Map.String.toArray)->Belt.Array.concatMany->Belt.Map.String.fromArray + IEvRecord(mergedValues) + } +} + +let library = [ + Function.make( + ~name="merge", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtRecord, + ~examples=[`Dict.merge({a: 1, b: 2}, {c: 3, d: 4})`], + ~definitions=[ + FnDefinition.make( + ~name="merge", + ~inputs=[FRTypeDict(FRTypeAny), FRTypeDict(FRTypeAny)], + ~run=(inputs, _, _, _) => { + switch inputs { + | [IEvRecord(d1), IEvRecord(d2)] => Internals.merge(d1, d2)->Ok + | _ => Error(impossibleError) + } + }, + (), + ), + ], + (), + ), + //TODO: Change to use new mergeMany() function. + Function.make( + ~name="mergeMany", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtRecord, + ~examples=[`Dict.mergeMany([{a: 1, b: 2}, {c: 3, d: 4}])`], + ~definitions=[ + FnDefinition.make( + ~name="mergeMany", + ~inputs=[FRTypeArray(FRTypeDict(FRTypeAny))], + ~run=(_, inputs, _, _) => + inputs + ->Prepare.ToTypedArray.dicts + ->E.R2.fmap(E.Dict.concatMany) + ->E.R2.fmap(Js.Dict.map((. r) => FunctionRegistry_Core.FRType.matchReverse(r))) + ->E.R2.fmap(r => r->Js.Dict.entries->Belt.Map.String.fromArray) + ->E.R2.fmap(Wrappers.evRecord), + (), + ), + ], + (), + ), + Function.make( + ~name="keys", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtArray, + ~examples=[`Dict.keys({a: 1, b: 2})`], + ~definitions=[ + FnDefinition.make( + ~name="keys", + ~inputs=[FRTypeDict(FRTypeAny)], + ~run=(inputs, _, _, _) => + switch inputs { + | [IEvRecord(d1)] => Internals.keys(d1)->Ok + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="values", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtArray, + ~examples=[`Dict.values({a: 1, b: 2})`], + ~definitions=[ + FnDefinition.make( + ~name="values", + ~inputs=[FRTypeDict(FRTypeAny)], + ~run=(inputs, _, _, _) => + switch inputs { + | [IEvRecord(d1)] => Internals.values(d1)->Ok + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="toList", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtArray, + ~examples=[`Dict.toList({a: 1, b: 2})`], + ~definitions=[ + FnDefinition.make( + ~name="toList", + ~inputs=[FRTypeDict(FRTypeAny)], + ~run=(inputs, _, _, _) => + switch inputs { + | [IEvRecord(dict)] => dict->Internals.toList->Ok + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="fromList", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtRecord, + ~examples=[`Dict.fromList([["a", 1], ["b", 2]])`], + ~definitions=[ + FnDefinition.make( + ~name="fromList", + ~inputs=[FRTypeArray(FRTypeArray(FRTypeAny))], + ~run=(inputs, _, _, _) => { + switch inputs { + | [IEvArray(items)] => Internals.fromList(items) + | _ => Error(impossibleError) + } + }, + (), + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Dist.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Dist.res new file mode 100644 index 00000000..9e10577b --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Dist.res @@ -0,0 +1,154 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers +let twoArgs = E.Tuple2.toFnCall + +module DistributionCreation = { + let nameSpace = "Dist" + let output = ReducerInterface_InternalExpressionValue.EvtDistribution + let requiresNamespace = false + + let fnMake = (~name, ~examples, ~definitions) => { + Function.make(~name, ~nameSpace, ~output, ~examples, ~definitions, ~requiresNamespace, ()) + } + + module TwoArgDist = { + let process = (~fn, ~env, r) => + r + ->E.R.bind(Process.DistOrNumberToDist.twoValuesUsingSymbolicDist(~fn, ~values=_, ~env)) + ->E.R2.fmap(Wrappers.evDistribution) + + let make = (name, fn) => { + FnDefinition.make( + ~name, + ~inputs=[FRTypeDistOrNumber, FRTypeDistOrNumber], + ~run=(_, inputs, env, _) => + inputs->Prepare.ToValueTuple.twoDistOrNumber->process(~fn, ~env), + (), + ) + } + + let makeRecordP5P95 = (name, fn) => { + FnDefinition.make( + ~name, + ~inputs=[FRTypeRecord([("p5", FRTypeDistOrNumber), ("p95", FRTypeDistOrNumber)])], + ~run=(_, inputs, env, _) => + inputs->Prepare.ToValueTuple.Record.twoDistOrNumber->process(~fn, ~env), + (), + ) + } + + let makeRecordMeanStdev = (name, fn) => { + FnDefinition.make( + ~name, + ~inputs=[FRTypeRecord([("mean", FRTypeDistOrNumber), ("stdev", FRTypeDistOrNumber)])], + ~run=(_, inputs, env, _) => + inputs->Prepare.ToValueTuple.Record.twoDistOrNumber->process(~fn, ~env), + (), + ) + } + } + + module OneArgDist = { + let process = (~fn, ~env, r) => + r + ->E.R.bind(Process.DistOrNumberToDist.oneValueUsingSymbolicDist(~fn, ~value=_, ~env)) + ->E.R2.fmap(Wrappers.evDistribution) + + let make = (name, fn) => + FnDefinition.make( + ~name, + ~inputs=[FRTypeDistOrNumber], + ~run=(_, inputs, env, _) => + inputs->Prepare.ToValueTuple.oneDistOrNumber->process(~fn, ~env), + (), + ) + } + + let library = [ + fnMake( + ~name="normal", + ~examples=["normal(5,1)", "normal({p5: 4, p95: 10})", "normal({mean: 5, stdev: 2})"], + ~definitions=[ + TwoArgDist.make("normal", twoArgs(SymbolicDist.Normal.make)), + TwoArgDist.makeRecordP5P95("normal", r => + twoArgs(SymbolicDist.Normal.from90PercentCI, r)->Ok + ), + TwoArgDist.makeRecordMeanStdev("normal", twoArgs(SymbolicDist.Normal.make)), + ], + ), + fnMake( + ~name="lognormal", + ~examples=[ + "lognormal(0.5, 0.8)", + "lognormal({p5: 4, p95: 10})", + "lognormal({mean: 5, stdev: 2})", + ], + ~definitions=[ + TwoArgDist.make("lognormal", twoArgs(SymbolicDist.Lognormal.make)), + TwoArgDist.makeRecordP5P95("lognormal", r => + twoArgs(SymbolicDist.Lognormal.from90PercentCI, r)->Ok + ), + TwoArgDist.makeRecordMeanStdev( + "lognormal", + twoArgs(SymbolicDist.Lognormal.fromMeanAndStdev), + ), + ], + ), + fnMake( + ~name="uniform", + ~examples=[`uniform(10, 12)`], + ~definitions=[TwoArgDist.make("uniform", twoArgs(SymbolicDist.Uniform.make))], + ), + fnMake( + ~name="beta", + ~examples=[`beta(20, 25)`, `beta({mean: 0.39, stdev: 0.1})`], + ~definitions=[ + TwoArgDist.make("beta", twoArgs(SymbolicDist.Beta.make)), + TwoArgDist.makeRecordMeanStdev("beta", twoArgs(SymbolicDist.Beta.fromMeanAndStdev)), + ], + ), + fnMake( + ~name="cauchy", + ~examples=[`cauchy(5, 1)`], + ~definitions=[TwoArgDist.make("cauchy", twoArgs(SymbolicDist.Cauchy.make))], + ), + fnMake( + ~name="gamma", + ~examples=[`gamma(5, 1)`], + ~definitions=[TwoArgDist.make("gamma", twoArgs(SymbolicDist.Gamma.make))], + ), + fnMake( + ~name="logistic", + ~examples=[`logistic(5, 1)`], + ~definitions=[TwoArgDist.make("logistic", twoArgs(SymbolicDist.Logistic.make))], + ), + fnMake( + ~name="to (distribution)", + ~examples=[`5 to 10`, `to(5,10)`, `-5 to 5`], + ~definitions=[ + TwoArgDist.make("to", twoArgs(SymbolicDist.From90thPercentile.make)), + TwoArgDist.make( + "credibleIntervalToDistribution", + twoArgs(SymbolicDist.From90thPercentile.make), + ), + ], + ), + fnMake( + ~name="exponential", + ~examples=[`exponential(2)`], + ~definitions=[OneArgDist.make("exponential", SymbolicDist.Exponential.make)], + ), + fnMake( + ~name="bernoulli", + ~examples=[`bernoulli(0.5)`], + ~definitions=[OneArgDist.make("bernoulli", SymbolicDist.Bernoulli.make)], + ), + fnMake( + ~name="pointMass", + ~examples=[`pointMass(0.5)`], + ~definitions=[OneArgDist.make("pointMass", SymbolicDist.Float.makeSafe)], + ), + ] +} + +let library = DistributionCreation.library diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Fn.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Fn.res new file mode 100644 index 00000000..ee2ef343 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Fn.res @@ -0,0 +1,62 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers + +module Declaration = { + let frType = FRTypeRecord([ + ("fn", FRTypeLambda), + ("inputs", FRTypeArray(FRTypeRecord([("min", FRTypeNumber), ("max", FRTypeNumber)]))), + ]) + + let fromExpressionValue = (e: frValue): result => { + switch FunctionRegistry_Helpers.Prepare.ToValueArray.Record.twoArgs([e]) { + | Ok([FRValueLambda(lambda), FRValueArray(inputs)]) => { + open FunctionRegistry_Helpers.Prepare + let getMinMax = arg => + ToValueArray.Record.toArgs([arg]) + ->E.R.bind(ToValueTuple.twoNumbers) + ->E.R2.fmap(((min, max)) => Declaration.ContinuousFloatArg.make(min, max)) + inputs + ->E.A2.fmap(getMinMax) + ->E.A.R.firstErrorOrOpen + ->E.R2.fmap(args => ReducerInterface_InternalExpressionValue.IEvDeclaration( + Declaration.make(lambda, args), + )) + } + | Error(r) => Error(r) + | Ok(_) => Error(FunctionRegistry_Helpers.impossibleError) + } + } +} + +let nameSpace = "Function" + +let library = [ + Function.make( + ~name="declare", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtDeclaration, + ~description="Adds metadata to a function of the input ranges. Works now for numeric and date inputs. This is useful when making predictions. It allows you to limit the domain that your prediction will be used and scored within.", + ~examples=[ + `Function.declare({ + fn: {|a,b| a }, + inputs: [ + {min: 0, max: 100}, + {min: 30, max: 50} + ] +})`, + ], + ~isExperimental=true, + ~definitions=[ + FnDefinition.make( + ~name="declare", + ~inputs=[Declaration.frType], + ~run=(_, inputs, _, _) => { + inputs->getOrError(0)->E.R.bind(Declaration.fromExpressionValue) + }, + (), + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_List.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_List.res new file mode 100644 index 00000000..762fe31b --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_List.res @@ -0,0 +1,265 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers + +let nameSpace = "List" +let requiresNamespace = true + +module Internals = { + let makeFromNumber = ( + n: float, + value: internalExpressionValue, + ): internalExpressionValue => IEvArray(Belt.Array.make(E.Float.toInt(n), value)) + + let upTo = (low: float, high: float): internalExpressionValue => IEvArray( + E.A.Floats.range(low, high, (high -. low +. 1.0)->E.Float.toInt)->E.A2.fmap(Wrappers.evNumber), + ) + + let first = (v: array): result => + v->E.A.first |> E.O.toResult("No first element") + + let last = (v: array): result => + v->E.A.last |> E.O.toResult("No last element") + + let reverse = (array: array): internalExpressionValue => IEvArray( + Belt.Array.reverse(array), + ) + + let map = (array: array, environment, eLambdaValue, reducer): result< + ReducerInterface_InternalExpressionValue.t, + Reducer_ErrorValue.errorValue, + > => { + let rMappedList = array->E.A.reduceReverse(Ok(list{}), (rAcc, elem) => + rAcc->E.R.bind(_, acc => { + let rNewElem = Reducer_Expression_Lambda.doLambdaCall( + eLambdaValue, + list{elem}, + environment, + reducer, + ) + rNewElem->E.R2.fmap(newElem => list{newElem, ...acc}) + }) + ) + rMappedList->E.R2.fmap(mappedList => mappedList->Belt.List.toArray->Wrappers.evArray) + } + + let reduce = (aValueArray, initialValue, aLambdaValue, environment, reducer) => { + aValueArray->E.A.reduce(Ok(initialValue), (rAcc, elem) => + rAcc->E.R.bind(_, acc => + Reducer_Expression_Lambda.doLambdaCall(aLambdaValue, list{acc, elem}, environment, reducer) + ) + ) + } + + let reduceReverse = (aValueArray, initialValue, aLambdaValue, environment, reducer) => { + aValueArray->Belt.Array.reduceReverse(Ok(initialValue), (rAcc, elem) => + rAcc->Belt.Result.flatMap(acc => + Reducer_Expression_Lambda.doLambdaCall(aLambdaValue, list{acc, elem}, environment, reducer) + ) + ) + } + + let filter = (aValueArray, aLambdaValue, environment, reducer) => { + let rMappedList = aValueArray->Belt.Array.reduceReverse(Ok(list{}), (rAcc, elem) => + rAcc->E.R.bind(_, acc => { + let rNewElem = Reducer_Expression_Lambda.doLambdaCall( + aLambdaValue, + list{elem}, + environment, + reducer, + ) + rNewElem->E.R2.fmap(newElem => { + switch newElem { + | IEvBool(true) => list{elem, ...acc} + | _ => acc + } + }) + }) + ) + rMappedList->E.R2.fmap(mappedList => mappedList->Belt.List.toArray->Wrappers.evArray) + } +} + +let library = [ + Function.make( + ~name="make", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtArray, + ~examples=[`List.make(2, "testValue")`], + ~definitions=[ + //Todo: If the second item is a function with no args, it could be nice to run this function and return the result. + FnDefinition.make( + ~name="make", + ~inputs=[FRTypeNumber, FRTypeAny], + ~run=(inputs, _, _, _) => { + switch inputs { + | [IEvNumber(number), value] => Internals.makeFromNumber(number, value)->Ok + | _ => Error(impossibleError) + } + }, + (), + ), + ], + (), + ), + Function.make( + ~name="upTo", + ~nameSpace, + ~requiresNamespace=true, + ~output=EvtArray, + ~examples=[`List.upTo(1,4)`], + ~definitions=[ + FnDefinition.make( + ~name="upTo", + ~inputs=[FRTypeNumber, FRTypeNumber], + ~run=(_, inputs, _, _) => + inputs + ->Prepare.ToValueTuple.twoNumbers + ->E.R2.fmap(((low, high)) => Internals.upTo(low, high)), + (), + ), + ], + (), + ), + Function.make( + ~name="first", + ~nameSpace, + ~requiresNamespace=true, + ~examples=[`List.first([1,4,5])`], + ~definitions=[ + FnDefinition.make( + ~name="first", + ~inputs=[FRTypeArray(FRTypeAny)], + ~run=(inputs, _, _, _) => + switch inputs { + | [IEvArray(array)] => Internals.first(array) + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="last", + ~nameSpace, + ~requiresNamespace=true, + ~examples=[`List.last([1,4,5])`], + ~definitions=[ + FnDefinition.make( + ~name="last", + ~inputs=[FRTypeArray(FRTypeAny)], + ~run=(inputs, _, _, _) => + switch inputs { + | [IEvArray(array)] => Internals.last(array) + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="reverse", + ~nameSpace, + ~output=EvtArray, + ~requiresNamespace=false, + ~examples=[`List.reverse([1,4,5])`], + ~definitions=[ + FnDefinition.make( + ~name="reverse", + ~inputs=[FRTypeArray(FRTypeAny)], + ~run=(inputs, _, _, _) => + switch inputs { + | [IEvArray(array)] => Internals.reverse(array)->Ok + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="map", + ~nameSpace, + ~output=EvtArray, + ~requiresNamespace=false, + ~examples=[`List.map([1,4,5], {|x| x+1})`], + ~definitions=[ + FnDefinition.make( + ~name="map", + ~inputs=[FRTypeArray(FRTypeAny), FRTypeLambda], + ~run=(inputs, _, env, reducer) => + switch inputs { + | [IEvArray(array), IEvLambda(lambda)] => + Internals.map(array, env, lambda, reducer)->E.R2.errMap(_ => "Error!") + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="reduce", + ~nameSpace, + ~requiresNamespace=false, + ~examples=[`List.reduce([1,4,5], 2, {|acc, el| acc+el})`], + ~definitions=[ + FnDefinition.make( + ~name="reduce", + ~inputs=[FRTypeArray(FRTypeAny), FRTypeAny, FRTypeLambda], + ~run=(inputs, _, env, reducer) => + switch inputs { + | [IEvArray(array), initialValue, IEvLambda(lambda)] => + Internals.reduce(array, initialValue, lambda, env, reducer)->E.R2.errMap(_ => "Error!") + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="reduceReverse", + ~nameSpace, + ~requiresNamespace=false, + ~examples=[`List.reduceReverse([1,4,5], 2, {|acc, el| acc-el})`], + ~definitions=[ + FnDefinition.make( + ~name="reduceReverse", + ~inputs=[FRTypeArray(FRTypeAny), FRTypeAny, FRTypeLambda], + ~run=(inputs, _, env, reducer) => + switch inputs { + | [IEvArray(array), initialValue, IEvLambda(lambda)] => + Internals.reduceReverse(array, initialValue, lambda, env, reducer)->E.R2.errMap(_ => + "Error!" + ) + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="filter", + ~nameSpace, + ~requiresNamespace=false, + ~examples=[`List.filter([1,4,5], {|x| x>3})`], + ~definitions=[ + FnDefinition.make( + ~name="filter", + ~inputs=[FRTypeArray(FRTypeAny), FRTypeLambda], + ~run=(inputs, _, env, reducer) => + switch inputs { + | [IEvArray(array), IEvLambda(lambda)] => + Internals.filter(array, lambda, env, reducer)->E.R2.errMap(_ => "Error!") + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Number.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Number.res new file mode 100644 index 00000000..472ae60b --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Number.res @@ -0,0 +1,251 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers + +let nameSpace = "Number" +let requiresNamespace = false + +module NumberToNumber = { + let make = (name, fn) => + FnDefinition.make( + ~name, + ~inputs=[FRTypeNumber], + ~run=(_, inputs, _, _) => { + inputs + ->getOrError(0) + ->E.R.bind(Prepare.oneNumber) + ->E.R2.fmap(fn) + ->E.R2.fmap(Wrappers.evNumber) + }, + (), + ) +} + +module ArrayNumberDist = { + let make = (name, fn) => { + FnDefinition.make( + ~name, + ~inputs=[FRTypeArray(FRTypeNumber)], + ~run=(_, inputs, _, _) => + Prepare.ToTypedArray.numbers(inputs) + ->E.R.bind(r => E.A.length(r) === 0 ? Error("List is empty") : Ok(r)) + ->E.R.bind(fn), + (), + ) + } + let make2 = (name, fn) => { + FnDefinition.make( + ~name, + ~inputs=[FRTypeArray(FRTypeAny)], + ~run=(_, inputs, _, _) => + Prepare.ToTypedArray.numbers(inputs) + ->E.R.bind(r => E.A.length(r) === 0 ? Error("List is empty") : Ok(r)) + ->E.R.bind(fn), + (), + ) + } +} + +let library = [ + Function.make( + ~name="floor", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`floor(3.5)`], + ~definitions=[NumberToNumber.make("floor", Js.Math.floor_float)], + (), + ), + Function.make( + ~name="ceiling", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`ceil(3.5)`], + ~definitions=[NumberToNumber.make("ceil", Js.Math.ceil_float)], + (), + ), + Function.make( + ~name="absolute value", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`abs(3.5)`], + ~definitions=[NumberToNumber.make("abs", Js.Math.abs_float)], + (), + ), + Function.make( + ~name="exponent", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`exp(3.5)`], + ~definitions=[NumberToNumber.make("exp", Js.Math.exp)], + (), + ), + Function.make( + ~name="log", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`log(3.5)`], + ~definitions=[NumberToNumber.make("log", Js.Math.log)], + (), + ), + Function.make( + ~name="log base 10", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`log10(3.5)`], + ~definitions=[NumberToNumber.make("log10", Js.Math.log10)], + (), + ), + Function.make( + ~name="log base 2", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`log2(3.5)`], + ~definitions=[NumberToNumber.make("log2", Js.Math.log2)], + (), + ), + Function.make( + ~name="round", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`round(3.5)`], + ~definitions=[NumberToNumber.make("round", Js.Math.round)], + (), + ), + Function.make( + ~name="sum", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`sum([3,5,2])`], + ~definitions=[ArrayNumberDist.make("sum", r => r->E.A.Floats.sum->Wrappers.evNumber->Ok)], + (), + ), + Function.make( + ~name="product", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`product([3,5,2])`], + ~definitions=[ + ArrayNumberDist.make("product", r => r->E.A.Floats.product->Wrappers.evNumber->Ok), + ], + (), + ), + Function.make( + ~name="min", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`min([3,5,2])`], + ~definitions=[ArrayNumberDist.make("min", r => r->E.A.Floats.min->Wrappers.evNumber->Ok)], + (), + ), + Function.make( + ~name="max", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`max([3,5,2])`], + ~definitions=[ArrayNumberDist.make("max", r => r->E.A.Floats.max->Wrappers.evNumber->Ok)], + (), + ), + Function.make( + ~name="mean", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`mean([3,5,2])`], + ~definitions=[ArrayNumberDist.make("mean", r => r->E.A.Floats.mean->Wrappers.evNumber->Ok)], + (), + ), + Function.make( + ~name="geometric mean", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`geomean([3,5,2])`], + ~definitions=[ + ArrayNumberDist.make("geomean", r => r->E.A.Floats.geomean->Wrappers.evNumber->Ok), + ], + (), + ), + Function.make( + ~name="standard deviation", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`stdev([3,5,2,3,5])`], + ~definitions=[ArrayNumberDist.make("stdev", r => r->E.A.Floats.stdev->Wrappers.evNumber->Ok)], + (), + ), + Function.make( + ~name="variance", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[`variance([3,5,2,3,5])`], + ~definitions=[ + ArrayNumberDist.make("variance", r => r->E.A.Floats.variance->Wrappers.evNumber->Ok), + ], + (), + ), + Function.make( + ~name="sort", + ~nameSpace, + ~requiresNamespace, + ~output=EvtArray, + ~examples=[`sort([3,5,2,3,5])`], + ~definitions=[ + ArrayNumberDist.make("sort", r => + r->E.A.Floats.sort->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok + ), + ], + (), + ), + Function.make( + ~name="cumulative sum", + ~nameSpace, + ~requiresNamespace, + ~output=EvtArray, + ~examples=[`cumsum([3,5,2,3,5])`], + ~definitions=[ + ArrayNumberDist.make("cumsum", r => + r->E.A.Floats.cumSum->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok + ), + ], + (), + ), + Function.make( + ~name="cumulative prod", + ~nameSpace, + ~requiresNamespace, + ~output=EvtArray, + ~examples=[`cumprod([3,5,2,3,5])`], + ~definitions=[ + ArrayNumberDist.make("cumprod", r => + r->E.A.Floats.cumProd->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok + ), + ], + (), + ), + Function.make( + ~name="diff", + ~nameSpace, + ~requiresNamespace, + ~output=EvtArray, + ~examples=[`diff([3,5,2,3,5])`], + ~definitions=[ + ArrayNumberDist.make("diff", r => + r->E.A.Floats.diff->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Pointset.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Pointset.res new file mode 100644 index 00000000..4f4e1731 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Pointset.res @@ -0,0 +1,102 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers + +let nameSpace = "PointSet" +let requiresNamespace = true + +let inputsTodist = (inputs: array, makeDist) => { + let array = inputs->getOrError(0)->E.R.bind(Prepare.ToValueArray.Array.openA) + let xyCoords = + array->E.R.bind(xyCoords => + xyCoords + ->E.A2.fmap(xyCoord => + [xyCoord]->Prepare.ToValueArray.Record.twoArgs->E.R.bind(Prepare.ToValueTuple.twoNumbers) + ) + ->E.A.R.firstErrorOrOpen + ) + let expressionValue = + xyCoords + ->E.R.bind(r => r->XYShape.T.makeFromZipped->E.R2.errMap(XYShape.Error.toString)) + ->E.R2.fmap(r => ReducerInterface_InternalExpressionValue.IEvDistribution( + PointSet(makeDist(r)), + )) + expressionValue +} + +let library = [ + Function.make( + ~name="fromDist", + ~nameSpace, + ~requiresNamespace=true, + ~examples=[`PointSet.fromDist(normal(5,2))`], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, + ~definitions=[ + FnDefinition.make( + ~name="fromDist", + ~inputs=[FRTypeDist], + ~run=(_, inputs, env, _) => + switch inputs { + | [FRValueDist(dist)] => + GenericDist.toPointSet( + dist, + ~xyPointLength=env.xyPointLength, + ~sampleCount=env.sampleCount, + (), + ) + ->E.R2.fmap(Wrappers.pointSet) + ->E.R2.fmap(Wrappers.evDistribution) + ->E.R2.errMap(_ => "") + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="makeContinuous", + ~nameSpace, + ~requiresNamespace, + ~examples=[ + `PointSet.makeContinuous([ + {x: 0, y: 0.2}, + {x: 1, y: 0.7}, + {x: 2, y: 0.8}, + {x: 3, y: 0.2} + ])`, + ], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, + ~definitions=[ + FnDefinition.make( + ~name="makeContinuous", + ~inputs=[FRTypeArray(FRTypeRecord([("x", FRTypeNumeric), ("y", FRTypeNumeric)]))], + ~run=(_, inputs, _, _) => inputsTodist(inputs, r => Continuous(Continuous.make(r))), + (), + ), + ], + (), + ), + Function.make( + ~name="makeDiscrete", + ~nameSpace, + ~requiresNamespace, + ~examples=[ + `PointSet.makeDiscrete([ + {x: 0, y: 0.2}, + {x: 1, y: 0.7}, + {x: 2, y: 0.8}, + {x: 3, y: 0.2} + ])`, + ], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, + ~definitions=[ + FnDefinition.make( + ~name="makeDiscrete", + ~inputs=[FRTypeArray(FRTypeRecord([("x", FRTypeNumeric), ("y", FRTypeNumeric)]))], + ~run=(_, inputs, _, _) => inputsTodist(inputs, r => Discrete(Discrete.make(r))), + (), + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Sampleset.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Sampleset.res new file mode 100644 index 00000000..27b870ee --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Sampleset.res @@ -0,0 +1,272 @@ +open FunctionRegistry_Core +open FunctionRegistry_Helpers + +let nameSpace = "SampleSet" +let requiresNamespace = true + +module Internal = { + type t = SampleSetDist.t + let doLambdaCall = (aLambdaValue, list, environment, reducer) => + switch Reducer_Expression_Lambda.doLambdaCall(aLambdaValue, list, environment, reducer) { + | Ok(IEvNumber(f)) => Ok(f) + | _ => Error(Operation.SampleMapNeedsNtoNFunction) + } + + let toType = (r): result< + ReducerInterface_InternalExpressionValue.t, + Reducer_ErrorValue.errorValue, + > => + switch r { + | Ok(r) => Ok(Wrappers.evDistribution(SampleSet(r))) + | Error(r) => Error(REDistributionError(SampleSetError(r))) + } + + //TODO: I don't know why this seems to need at least one input + let fromFn = ( + aLambdaValue, + env: ReducerInterface_InternalExpressionValue.environment, + reducer, + ) => { + let sampleCount = env.sampleCount + let fn = r => doLambdaCall(aLambdaValue, list{IEvNumber(r)}, env, reducer) + Belt_Array.makeBy(sampleCount, r => fn(r->Js.Int.toFloat))->E.A.R.firstErrorOrOpen + } + + let map1 = (sampleSetDist: t, aLambdaValue, env, reducer) => { + let fn = r => doLambdaCall(aLambdaValue, list{IEvNumber(r)}, env, reducer) + SampleSetDist.samplesMap(~fn, sampleSetDist)->toType + } + + let map2 = (t1: t, t2: t, aLambdaValue, env, reducer) => { + let fn = (a, b) => doLambdaCall(aLambdaValue, list{IEvNumber(a), IEvNumber(b)}, env, reducer) + SampleSetDist.map2(~fn, ~t1, ~t2)->toType + } + + let map3 = (t1: t, t2: t, t3: t, aLambdaValue, env, reducer) => { + let fn = (a, b, c) => + doLambdaCall(aLambdaValue, list{IEvNumber(a), IEvNumber(b), IEvNumber(c)}, env, reducer) + SampleSetDist.map3(~fn, ~t1, ~t2, ~t3)->toType + } + + let parseSampleSetArray = (arr: array): option< + array, + > => { + let parseSampleSet = (value: internalExpressionValue): option => + switch value { + | IEvDistribution(SampleSet(dist)) => Some(dist) + | _ => None + } + E.A.O.openIfAllSome(E.A.fmap(parseSampleSet, arr)) + } + + let mapN = (aValueArray: array, aLambdaValue, env, reducer) => { + switch parseSampleSetArray(aValueArray) { + | Some(t1) => + let fn = a => + doLambdaCall( + aLambdaValue, + list{IEvArray(E.A.fmap(x => Wrappers.evNumber(x), a))}, + env, + reducer, + ) + SampleSetDist.mapN(~fn, ~t1)->toType + | None => Error(REFunctionNotFound("")) + } + } +} + +let library = [ + Function.make( + ~name="fromDist", + ~nameSpace, + ~requiresNamespace=true, + ~examples=[`SampleSet.fromDist(normal(5,2))`], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, + ~definitions=[ + FnDefinition.make( + ~name="fromDist", + ~inputs=[FRTypeDist], + ~run=(_, inputs, env, _) => + switch inputs { + | [FRValueDist(dist)] => + GenericDist.toSampleSetDist(dist, env.sampleCount) + ->E.R2.fmap(Wrappers.sampleSet) + ->E.R2.fmap(Wrappers.evDistribution) + ->E.R2.errMap(_ => "") + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="fromList", + ~nameSpace, + ~requiresNamespace=true, + ~examples=[`SampleSet.fromList([3,5,2,3,5,2,3,5,2,3,3,5,3,2,3,1,1,3])`], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, + ~definitions=[ + FnDefinition.make( + ~name="fromList", + ~inputs=[FRTypeArray(FRTypeNumber)], + ~run=(_, inputs, _, _) => { + let sampleSet = + Prepare.ToTypedArray.numbers(inputs) |> E.R2.bind(r => + SampleSetDist.make(r)->E.R2.errMap(_ => "AM I HERE? WHYERE AMI??") + ) + sampleSet->E.R2.fmap(Wrappers.sampleSet)->E.R2.fmap(Wrappers.evDistribution) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="toList", + ~nameSpace, + ~requiresNamespace=true, + ~examples=[`SampleSet.toList(SampleSet.fromDist(normal(5,2)))`], + ~output=ReducerInterface_InternalExpressionValue.EvtArray, + ~definitions=[ + FnDefinition.make( + ~name="toList", + ~inputs=[FRTypeDist], + ~run=(inputs, _, _, _) => + switch inputs { + | [IEvDistribution(SampleSet(dist))] => + dist->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="fromFn", + ~nameSpace, + ~requiresNamespace=true, + ~examples=[`SampleSet.fromFn({|| sample(normal(5,2))})`], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, + ~definitions=[ + FnDefinition.make( + ~name="fromFn", + ~inputs=[FRTypeLambda], + ~run=(inputs, _, env, reducer) => + switch inputs { + | [IEvLambda(lambda)] => + switch Internal.fromFn(lambda, env, reducer) { + | Ok(r) => Ok(r->Wrappers.sampleSet->Wrappers.evDistribution) + | Error(_) => Error("issue") + } + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="map", + ~nameSpace, + ~requiresNamespace, + ~examples=[`SampleSet.map(SampleSet.fromDist(normal(5,2)), {|x| x + 1})`], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, + ~definitions=[ + FnDefinition.make( + ~name="map", + ~inputs=[FRTypeDist, FRTypeLambda], + ~run=(inputs, _, env, reducer) => + switch inputs { + | [IEvDistribution(SampleSet(dist)), IEvLambda(lambda)] => + Internal.map1(dist, lambda, env, reducer)->E.R2.errMap(_ => "") + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="map2", + ~nameSpace, + ~requiresNamespace, + ~examples=[ + `SampleSet.map2(SampleSet.fromDist(normal(5,2)), SampleSet.fromDist(normal(5,2)), {|x, y| x + y})`, + ], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, + ~definitions=[ + FnDefinition.make( + ~name="map2", + ~inputs=[FRTypeDist, FRTypeDist, FRTypeLambda], + ~run=(inputs, _, env, reducer) => { + switch inputs { + | [ + IEvDistribution(SampleSet(dist1)), + IEvDistribution(SampleSet(dist2)), + IEvLambda(lambda), + ] => + Internal.map2(dist1, dist2, lambda, env, reducer)->E.R2.errMap(_ => "") + | _ => Error(impossibleError) + } + }, + (), + ), + ], + (), + ), + Function.make( + ~name="map3", + ~nameSpace, + ~requiresNamespace, + ~examples=[ + `SampleSet.map3(SampleSet.fromDist(normal(5,2)), SampleSet.fromDist(normal(5,2)), SampleSet.fromDist(normal(5,2)), {|x, y, z| max([x,y,z])})`, + ], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, + ~definitions=[ + FnDefinition.make( + ~name="map3", + ~inputs=[FRTypeDist, FRTypeDist, FRTypeDist, FRTypeLambda], + ~run=(inputs, _, env, reducer) => + switch inputs { + | [ + IEvDistribution(SampleSet(dist1)), + IEvDistribution(SampleSet(dist2)), + IEvDistribution(SampleSet(dist3)), + IEvLambda(lambda), + ] => + Internal.map3(dist1, dist2, dist3, lambda, env, reducer)->E.R2.errMap(_ => "") + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), + Function.make( + ~name="mapN", + ~nameSpace, + ~requiresNamespace, + ~examples=[ + `SampleSet.mapN([SampleSet.fromDist(normal(5,2)), SampleSet.fromDist(normal(5,2)), SampleSet.fromDist(normal(5,2))], {|x| max(x)})`, + ], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, + ~definitions=[ + FnDefinition.make( + ~name="mapN", + ~inputs=[FRTypeArray(FRTypeDist), FRTypeLambda], + ~run=(inputs, _, env, reducer) => + switch inputs { + | [IEvArray(dists), IEvLambda(lambda)] => + Internal.mapN(dists, lambda, env, reducer)->E.R2.errMap(_e => { + "AHHH doesn't work" + }) + | _ => Error(impossibleError) + }, + (), + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Scoring.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Scoring.res new file mode 100644 index 00000000..972501e9 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Scoring.res @@ -0,0 +1,89 @@ +open FunctionRegistry_Core + +let nameSpace = "Dist" +let requiresNamespace = true + +let runScoring = (estimate, answer, prior, env) => { + GenericDist.Score.logScore(~estimate, ~answer, ~prior, ~env) + ->E.R2.fmap(FunctionRegistry_Helpers.Wrappers.evNumber) + ->E.R2.errMap(DistributionTypes.Error.toString) +} + +let library = [ + Function.make( + ~name="logScore", + ~nameSpace, + ~requiresNamespace, + ~output=EvtNumber, + ~examples=[ + "Dist.logScore({estimate: normal(5,2), answer: normal(5.2,1), prior: normal(5.5,3)})", + "Dist.logScore({estimate: normal(5,2), answer: normal(5.2,1)})", + "Dist.logScore({estimate: normal(5,2), answer: 4.5})", + ], + ~definitions=[ + FnDefinition.make( + ~name="logScore", + ~inputs=[ + FRTypeRecord([ + ("estimate", FRTypeDist), + ("answer", FRTypeDistOrNumber), + ("prior", FRTypeDist), + ]), + ], + ~run=(_, inputs, env, _) => { + switch FunctionRegistry_Helpers.Prepare.ToValueArray.Record.threeArgs(inputs) { + | Ok([FRValueDist(estimate), FRValueDistOrNumber(FRValueDist(d)), FRValueDist(prior)]) => + runScoring(estimate, Score_Dist(d), Some(prior), env) + | Ok([ + FRValueDist(estimate), + FRValueDistOrNumber(FRValueNumber(d)), + FRValueDist(prior), + ]) => + runScoring(estimate, Score_Scalar(d), Some(prior), env) + | Error(e) => Error(e) + | _ => Error(FunctionRegistry_Helpers.impossibleError) + } + }, + (), + ), + FnDefinition.make( + ~name="logScore", + ~inputs=[FRTypeRecord([("estimate", FRTypeDist), ("answer", FRTypeDistOrNumber)])], + ~run=(_, inputs, env, _) => { + switch FunctionRegistry_Helpers.Prepare.ToValueArray.Record.twoArgs(inputs) { + | Ok([FRValueDist(estimate), FRValueDistOrNumber(FRValueDist(d))]) => + runScoring(estimate, Score_Dist(d), None, env) + | Ok([FRValueDist(estimate), FRValueDistOrNumber(FRValueNumber(d))]) => + runScoring(estimate, Score_Scalar(d), None, env) + | Error(e) => Error(e) + | _ => Error(FunctionRegistry_Helpers.impossibleError) + } + }, + (), + ), + ], + (), + ), + Function.make( + ~name="klDivergence", + ~nameSpace, + ~output=EvtNumber, + ~requiresNamespace, + ~examples=["Dist.klDivergence(normal(5,2), normal(5,1.5))"], + ~definitions=[ + FnDefinition.make( + ~name="klDivergence", + ~inputs=[FRTypeDist, FRTypeDist], + ~run=(_, inputs, env, _) => { + switch inputs { + | [FRValueDist(estimate), FRValueDist(d)] => + runScoring(estimate, Score_Dist(d), None, env) + | _ => Error(FunctionRegistry_Helpers.impossibleError) + } + }, + (), + ), + ], + (), + ), +] diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer.res index dfedffc7..bf8c89f9 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer.res @@ -1,13 +1,14 @@ module ErrorValue = Reducer_ErrorValue module Expression = Reducer_Expression -module ExpressionValue = ReducerInterface_ExpressionValue +module ExternalExpressionValue = ReducerInterface_ExternalExpressionValue +module InternalExpressionValue = ReducerInterface_InternalExpressionValue module Lambda = Reducer_Expression_Lambda -type environment = ReducerInterface_ExpressionValue.environment +type environment = ReducerInterface_InternalExpressionValue.environment type errorValue = Reducer_ErrorValue.errorValue -type expressionValue = ReducerInterface_ExpressionValue.expressionValue -type externalBindings = ReducerInterface_ExpressionValue.externalBindings -type lambdaValue = ExpressionValue.lambdaValue +type expressionValue = ExternalExpressionValue.t +type externalBindings = ReducerInterface_ExternalExpressionValue.externalBindings +type lambdaValue = ExternalExpressionValue.lambdaValue let evaluate = Expression.evaluate let evaluateUsingOptions = Expression.evaluateUsingOptions @@ -15,13 +16,20 @@ let evaluatePartialUsingExternalBindings = Expression.evaluatePartialUsingExtern let parse = Expression.parse let foreignFunctionInterface = ( - lambdaValue: lambdaValue, + lambdaValue: ExternalExpressionValue.lambdaValue, argArray: array, - environment: ExpressionValue.environment, + environment: ExternalExpressionValue.environment, ) => { - Lambda.foreignFunctionInterface(lambdaValue, argArray, environment, Expression.reduceExpression) + let internallambdaValue = InternalExpressionValue.lambdaValueToInternal(lambdaValue) + let internalArgArray = argArray->Js.Array2.map(InternalExpressionValue.toInternal) + Lambda.foreignFunctionInterface( + internallambdaValue, + internalArgArray, + environment, + Expression.reduceExpression, + )->Belt.Result.map(InternalExpressionValue.toExternal) } -let defaultEnvironment = ExpressionValue.defaultEnvironment +let defaultEnvironment = ExternalExpressionValue.defaultEnvironment let defaultExternalBindings = ReducerInterface_StdLib.externalStdLib diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi b/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi index d4e40a63..bd0c43fb 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer.resi @@ -2,27 +2,29 @@ module ErrorValue = Reducer_ErrorValue module Expression = Reducer_Expression @genType -type environment = ReducerInterface_ExpressionValue.environment +type environment = ReducerInterface_ExternalExpressionValue.environment @genType type errorValue = Reducer_ErrorValue.errorValue @genType -type expressionValue = ReducerInterface_ExpressionValue.expressionValue +type expressionValue = ReducerInterface_ExternalExpressionValue.t @genType -type externalBindings = ReducerInterface_ExpressionValue.externalBindings +type externalBindings = ReducerInterface_ExternalExpressionValue.externalBindings @genType -type lambdaValue = ReducerInterface_ExpressionValue.lambdaValue +type lambdaValue = ReducerInterface_ExternalExpressionValue.lambdaValue @genType let evaluateUsingOptions: ( - ~environment: option, - ~externalBindings: option, + ~environment: option, + ~externalBindings: option< + QuriSquiggleLang.ReducerInterface_ExternalExpressionValue.externalBindings, + >, string, ) => result @genType let evaluatePartialUsingExternalBindings: ( string, - QuriSquiggleLang.ReducerInterface_ExpressionValue.externalBindings, - QuriSquiggleLang.ReducerInterface_ExpressionValue.environment, + QuriSquiggleLang.ReducerInterface_ExternalExpressionValue.externalBindings, + QuriSquiggleLang.ReducerInterface_ExternalExpressionValue.environment, ) => result @genType let evaluate: string => result @@ -31,9 +33,9 @@ let parse: string => result @genType let foreignFunctionInterface: ( - QuriSquiggleLang.ReducerInterface_ExpressionValue.lambdaValue, - array, - QuriSquiggleLang.ReducerInterface_ExpressionValue.environment, + QuriSquiggleLang.ReducerInterface_ExternalExpressionValue.lambdaValue, + array, + QuriSquiggleLang.ReducerInterface_ExternalExpressionValue.environment, ) => result @genType diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Bindings/Reducer_Bindings.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Bindings/Reducer_Bindings.res new file mode 100644 index 00000000..28175d7a --- /dev/null +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Bindings/Reducer_Bindings.res @@ -0,0 +1,187 @@ +// Only Bindings as the global module is supported +// Other module operations such as import export will be prepreocessed jobs + +module ExpressionT = Reducer_Expression_T +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +open Reducer_ErrorValue +open ReducerInterface_InternalExpressionValue + +let expressionValueToString = toString + +type t = ReducerInterface_InternalExpressionValue.nameSpace + +let typeAliasesKey = "_typeAliases_" +let typeReferencesKey = "_typeReferences_" + +let getType = (nameSpace: t, id: string) => { + let NameSpace(container) = nameSpace + Belt.Map.String.get(container, typeAliasesKey)->Belt.Option.flatMap(aliases => + switch aliases { + | IEvRecord(r) => Belt.Map.String.get(r, id) + | _ => None + } + ) +} + +let getTypeOf = (nameSpace: t, id: string) => { + let NameSpace(container) = nameSpace + Belt.Map.String.get(container, typeReferencesKey)->Belt.Option.flatMap(defs => + switch defs { + | IEvRecord(r) => Belt.Map.String.get(r, id) + | _ => None + } + ) +} + +let getWithDefault = (nameSpace: t, id: string, default) => { + let NameSpace(container) = nameSpace + Belt.Map.String.getWithDefault(container, id, default) +} + +let get = (nameSpace: t, id: string) => { + let NameSpace(container) = nameSpace + Belt.Map.String.get(container, id) +} + +let emptyMap: map = Belt.Map.String.empty + +let setTypeAlias = (nameSpace: t, id: string, value): t => { + let NameSpace(container) = nameSpace + let rValue = Belt.Map.String.getWithDefault(container, typeAliasesKey, IEvRecord(emptyMap)) + let r = switch rValue { + | IEvRecord(r) => r + | _ => emptyMap + } + let r2 = Belt.Map.String.set(r, id, value)->IEvRecord + Belt.Map.String.set(container, typeAliasesKey, r2)->NameSpace +} + +let setTypeOf = (nameSpace: t, id: string, value): t => { + let NameSpace(container) = nameSpace + let rValue = Belt.Map.String.getWithDefault(container, typeReferencesKey, IEvRecord(emptyMap)) + let r = switch rValue { + | IEvRecord(r) => r + | _ => emptyMap + } + let r2 = Belt.Map.String.set(r, id, value)->IEvRecord + Belt.Map.String.set(container, typeReferencesKey, r2)->NameSpace +} + +let set = (nameSpace: t, id: string, value): t => { + let NameSpace(container) = nameSpace + Belt.Map.String.set(container, id, value)->NameSpace +} + +let emptyModule: t = NameSpace(emptyMap) +let emptyBindings = emptyModule + +let fromTypeScriptBindings = ReducerInterface_InternalExpressionValue.nameSpaceFromTypeScriptBindings +let toTypeScriptBindings = ReducerInterface_InternalExpressionValue.nameSpaceToTypeScriptBindings + +let toExpressionValue = (nameSpace: t): internalExpressionValue => IEvBindings(nameSpace) +let fromExpressionValue = (aValue: internalExpressionValue): t => + switch aValue { + | IEvBindings(nameSpace) => nameSpace + | _ => emptyModule + } + +let fromArray = a => Belt.Map.String.fromArray(a)->NameSpace + +let merge = (nameSpace: t, other: t): t => { + let NameSpace(container) = nameSpace + let NameSpace(otherContainer) = other + otherContainer + ->Belt.Map.String.reduce(container, (container, key, value) => + Belt.Map.String.set(container, key, value) + ) + ->NameSpace +} + +let removeOther = (nameSpace: t, other: t): t => { + let NameSpace(container) = nameSpace + let NameSpace(otherContainer) = other + let keys = Belt.Map.String.keysToArray(otherContainer) + Belt.Map.String.keep(container, (key, _value) => { + let removeThis = Js.Array2.includes(keys, key) + !removeThis + })->NameSpace +} + +external castExpressionToInternalCode: ExpressionT.expressionOrFFI => internalCode = "%identity" +let eLambdaFFIValue = (ffiFn: ExpressionT.ffiFn) => { + IEvLambda({ + parameters: [], + context: emptyModule, + body: FFI(ffiFn)->castExpressionToInternalCode, + }) +} + +let functionNotFoundError = (call: functionCall) => + REFunctionNotFound(call->functionCallToCallSignature->functionCallSignatureToString)->Error + +let functionNotFoundErrorFFIFn = (functionName: string): ExpressionT.ffiFn => { + (args: array, _environment: environment): result< + internalExpressionValue, + errorValue, + > => { + let call = (functionName, args) + functionNotFoundError(call) + } +} + +let convertOptionToFfiFnReturningResult = ( + myFunctionName: string, + myFunction: ExpressionT.optionFfiFnReturningResult, +): ExpressionT.ffiFn => { + (args: array, environment) => { + myFunction(args, environment)->Belt.Option.getWithDefault( + functionNotFoundErrorFFIFn(myFunctionName)(args, environment), + ) + } +} + +let convertOptionToFfiFn = ( + myFunctionName: string, + myFunction: ExpressionT.optionFfiFn, +): ExpressionT.ffiFn => { + (args: array, environment) => { + myFunction(args, environment) + ->Belt.Option.map(v => v->Ok) + ->Belt.Option.getWithDefault(functionNotFoundErrorFFIFn(myFunctionName)(args, environment)) + } +} + +// -- Module definition +let define = (nameSpace: t, identifier: string, ev: internalExpressionValue): t => { + let NameSpace(container) = nameSpace + Belt.Map.String.set(container, identifier, ev)->NameSpace +} + +let defineNumber = (nameSpace: t, identifier: string, value: float): t => + nameSpace->define(identifier, IEvNumber(value)) + +let defineString = (nameSpace: t, identifier: string, value: string): t => + nameSpace->define(identifier, IEvString(value)) + +let defineBool = (nameSpace: t, identifier: string, value: bool): t => + nameSpace->define(identifier, IEvBool(value)) + +let defineModule = (nameSpace: t, identifier: string, value: t): t => + nameSpace->define(identifier, toExpressionValue(value)) + +let defineFunction = (nameSpace: t, identifier: string, value: ExpressionT.optionFfiFn): t => { + nameSpace->define(identifier, convertOptionToFfiFn(identifier, value)->eLambdaFFIValue) +} + +let defineFunctionReturningResult = ( + nameSpace: t, + identifier: string, + value: ExpressionT.optionFfiFnReturningResult, +): t => { + nameSpace->define( + identifier, + convertOptionToFfiFnReturningResult(identifier, value)->eLambdaFFIValue, + ) +} + +let emptyStdLib: t = emptyModule->defineBool("_standardLibrary", true) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Category/Reducer_Category_Bindings.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Category/Reducer_Category_Bindings.res deleted file mode 100644 index 5a8e570d..00000000 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Category/Reducer_Category_Bindings.res +++ /dev/null @@ -1,12 +0,0 @@ -include Reducer_Category_Module // Bindings inherit from Module - -open ReducerInterface_ExpressionValue - -let emptyBindings = emptyModule - -let toExpressionValue = (container: t): expressionValue => EvRecord(toRecord(container)) -let fromExpressionValue = (aValue: expressionValue): t => - switch aValue { - | EvRecord(r) => fromRecord(r) - | _ => emptyBindings - } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Category/Reducer_Category_Module.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Category/Reducer_Category_Module.res deleted file mode 100644 index 092d0690..00000000 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Category/Reducer_Category_Module.res +++ /dev/null @@ -1,33 +0,0 @@ -module ExpressionT = Reducer_Expression_T -open ReducerInterface_ExpressionValue -let expressionValueToString = toString - -type t = ExpressionT.bindings - -let typeAliasesKey = "_typeAliases_" -let typeReferencesKey = "_typeReferences_" - -let emptyModule: t = Belt.Map.String.empty - -let cloneRecord = (r: record): record => r->Js.Dict.entries->Js.Dict.fromArray -let fromRecord = (r: record): t => Js.Dict.entries(r)->Belt.Map.String.fromArray -let toRecord = (container: t): record => Belt.Map.String.toArray(container)->Js.Dict.fromArray - -let toExpressionValue = (container: t): expressionValue => EvModule(toRecord(container)) -let fromExpressionValue = (aValue: expressionValue): t => - switch aValue { - | EvModule(r) => fromRecord(r) - | _ => emptyModule - } - -let toString = (container: t): string => container->toRecord->EvRecord->expressionValueToString - -// -- Module definition -let define = (container: t, identifier: string, ev: expressionValue): t => - Belt.Map.String.set(container, identifier, ev) // TODO build lambda for polymorphic functions here - -let defineNumber = (container: t, identifier: string, value: float): t => - container->define(identifier, EvNumber(value)) - -let defineModule = (container: t, identifier: string, value: t): t => - container->define(identifier, toExpressionValue(value)) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res index 5d1ee5f3..a2ca204a 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltIn.res @@ -1,15 +1,17 @@ -module Bindings = Reducer_Expression_Bindings +module BindingsReplacer = Reducer_Expression_BindingsReplacer module ExpressionT = Reducer_Expression_T module ExternalLibrary = ReducerInterface.ExternalLibrary module Lambda = Reducer_Expression_Lambda module MathJs = Reducer_MathJs +module Bindings = Reducer_Bindings module Result = Belt.Result -open ReducerInterface.ExpressionValue +module TypeBuilder = Reducer_Type_TypeBuilder +open ReducerInterface_InternalExpressionValue open Reducer_ErrorValue /* - MathJs provides default implementations for builtins - This is where all the expected builtins like + = * / sin cos log ln etc are handled + MathJs provides default implementations for built-ins + This is where all the expected built-ins like + = * / sin cos log ln etc are handled DO NOT try to add external function mapping here! */ @@ -31,23 +33,29 @@ let callInternal = (call: functionCall, environment, reducer: ExpressionT.reduce let constructRecord = arrayOfPairs => { Belt.Array.map(arrayOfPairs, pairValue => switch pairValue { - | EvArray([EvString(key), valueValue]) => (key, valueValue) - | _ => ("wrong key type", pairValue->toStringWithType->EvString) + | IEvArray([IEvString(key), valueValue]) => (key, valueValue) + | _ => ("wrong key type", pairValue->toStringWithType->IEvString) } ) - ->Js.Dict.fromArray - ->EvRecord + ->Belt.Map.String.fromArray + ->IEvRecord ->Ok } - let arrayAtIndex = (aValueArray: array, fIndex: float) => + let arrayAtIndex = (aValueArray: array, fIndex: float) => switch Belt.Array.get(aValueArray, Belt.Int.fromFloat(fIndex)) { | Some(value) => value->Ok | None => REArrayIndexNotFound("Array index not found", Belt.Int.fromFloat(fIndex))->Error } - let recordAtIndex = (dict: Js.Dict.t, sIndex) => - switch Js.Dict.get(dict, sIndex) { + let moduleAtIndex = (nameSpace: nameSpace, sIndex) => + switch Bindings.get(nameSpace, sIndex) { + | Some(value) => value->Ok + | None => RERecordPropertyNotFound("Bindings property not found", sIndex)->Error + } + + let recordAtIndex = (dict: Belt.Map.String.t, sIndex) => + switch Belt.Map.String.get(dict, sIndex) { | Some(value) => value->Ok | None => RERecordPropertyNotFound("Record property not found", sIndex)->Error } @@ -55,288 +63,134 @@ let callInternal = (call: functionCall, environment, reducer: ExpressionT.reduce let doAddArray = (originalA, b) => { let a = originalA->Js.Array2.copy let _ = Js.Array2.pushMany(a, b) - a->EvArray->Ok + a->IEvArray->Ok } let doAddString = (a, b) => { let answer = Js.String2.concat(a, b) - answer->EvString->Ok + answer->IEvString->Ok } - let inspect = (value: expressionValue) => { + let inspect = (value: internalExpressionValue) => { Js.log(value->toString) value->Ok } - let inspectLabel = (value: expressionValue, label: string) => { + let inspectLabel = (value: internalExpressionValue, label: string) => { Js.log(`${label}: ${value->toString}`) value->Ok } - let doSetBindings = ( - externalBindings: externalBindings, - symbol: string, - value: expressionValue, - ) => { - Bindings.fromExternalBindings(externalBindings) - ->Belt.Map.String.set(symbol, value) - ->Bindings.toExternalBindings - ->EvRecord - ->Ok - } - - let doSetBindingsInNamespace = ( - externalBindings: externalBindings, - symbol: string, - value: expressionValue, - namespace: string, - ) => { - let bindings = Bindings.fromExternalBindings(externalBindings) - let evAliases = bindings->Belt.Map.String.getWithDefault(namespace, EvRecord(Js.Dict.empty())) - let newEvAliases = switch evAliases { - | EvRecord(dict) => { - Js.Dict.set(dict, symbol, value) - dict->EvRecord - } - | _ => Js.Dict.empty()->EvRecord - } - bindings - ->Belt.Map.String.set(namespace, newEvAliases) - ->Bindings.toExternalBindings - ->EvRecord - ->Ok + let doSetBindings = (bindings: nameSpace, symbol: string, value: internalExpressionValue) => { + Bindings.set(bindings, symbol, value)->IEvBindings->Ok } let doSetTypeAliasBindings = ( - externalBindings: externalBindings, + bindings: nameSpace, symbol: string, - value: expressionValue, - ) => doSetBindingsInNamespace(externalBindings, symbol, value, Bindings.typeAliasesKey) + value: internalExpressionValue, + ) => Bindings.setTypeAlias(bindings, symbol, value)->IEvBindings->Ok - let doSetTypeOfBindings = ( - externalBindings: externalBindings, - symbol: string, - value: expressionValue, - ) => doSetBindingsInNamespace(externalBindings, symbol, value, Bindings.typeReferencesKey) + let doSetTypeOfBindings = (bindings: nameSpace, symbol: string, value: internalExpressionValue) => + Bindings.setTypeOf(bindings, symbol, value)->IEvBindings->Ok - let doExportBindings = (externalBindings: externalBindings) => EvRecord(externalBindings)->Ok - - let doKeepArray = (aValueArray, aLambdaValue) => { - let rMappedList = aValueArray->Belt.Array.reduceReverse(Ok(list{}), (rAcc, elem) => - rAcc->Result.flatMap(acc => { - let rNewElem = Lambda.doLambdaCall(aLambdaValue, list{elem}, environment, reducer) - rNewElem->Result.map(newElem => - switch newElem { - | EvBool(true) => list{elem, ...acc} - | _ => acc - } - ) - }) - ) - rMappedList->Result.map(mappedList => mappedList->Belt.List.toArray->EvArray) - } - - let doMapArray = (aValueArray, aLambdaValue) => { - let rMappedList = aValueArray->Belt.Array.reduceReverse(Ok(list{}), (rAcc, elem) => - rAcc->Result.flatMap(acc => { - let rNewElem = Lambda.doLambdaCall(aLambdaValue, list{elem}, environment, reducer) - rNewElem->Result.map(newElem => list{newElem, ...acc}) - }) - ) - rMappedList->Result.map(mappedList => mappedList->Belt.List.toArray->EvArray) - } + let doExportBindings = (bindings: nameSpace) => bindings->Bindings.toExpressionValue->Ok module SampleMap = { - type t = SampleSetDist.t let doLambdaCall = (aLambdaValue, list) => switch Lambda.doLambdaCall(aLambdaValue, list, environment, reducer) { - | Ok(EvNumber(f)) => Ok(f) + | Ok(IEvNumber(f)) => Ok(f) | _ => Error(Operation.SampleMapNeedsNtoNFunction) } let toType = r => switch r { - | Ok(r) => Ok(EvDistribution(SampleSet(r))) + | Ok(r) => Ok(IEvDistribution(SampleSet(r))) | Error(r) => Error(REDistributionError(SampleSetError(r))) } - let map1 = (sampleSetDist: t, aLambdaValue) => { - let fn = r => doLambdaCall(aLambdaValue, list{EvNumber(r)}) - toType(SampleSetDist.samplesMap(~fn, sampleSetDist)) + let parseSampleSetArray = (arr: array): option< + array, + > => { + let parseSampleSet = (value: internalExpressionValue): option => + switch value { + | IEvDistribution(SampleSet(dist)) => Some(dist) + | _ => None + } + E.A.O.openIfAllSome(E.A.fmap(parseSampleSet, arr)) } - let map2 = (t1: t, t2: t, aLambdaValue) => { - let fn = (a, b) => doLambdaCall(aLambdaValue, list{EvNumber(a), EvNumber(b)}) - SampleSetDist.map2(~fn, ~t1, ~t2)->toType + let _mapN = (aValueArray: array, aLambdaValue) => { + switch parseSampleSetArray(aValueArray) { + | Some(t1) => + let fn = a => doLambdaCall(aLambdaValue, list{IEvArray(E.A.fmap(x => IEvNumber(x), a))}) + SampleSetDist.mapN(~fn, ~t1)->toType + | None => + Error(REFunctionNotFound(call->functionCallToCallSignature->functionCallSignatureToString)) + } } - - let map3 = (t1: t, t2: t, t3: t, aLambdaValue) => { - let fn = (a, b, c) => doLambdaCall(aLambdaValue, list{EvNumber(a), EvNumber(b), EvNumber(c)}) - SampleSetDist.map3(~fn, ~t1, ~t2, ~t3)->toType - } - } - - let doReduceArray = (aValueArray, initialValue, aLambdaValue) => { - aValueArray->Belt.Array.reduce(Ok(initialValue), (rAcc, elem) => - rAcc->Result.flatMap(acc => - Lambda.doLambdaCall(aLambdaValue, list{acc, elem}, environment, reducer) - ) - ) - } - - let doReduceReverseArray = (aValueArray, initialValue, aLambdaValue) => { - aValueArray->Belt.Array.reduceReverse(Ok(initialValue), (rAcc, elem) => - rAcc->Result.flatMap(acc => - Lambda.doLambdaCall(aLambdaValue, list{acc, elem}, environment, reducer) - ) - ) - } - - let typeModifier_memberOf = (aType, anArray) => { - let newRecord = Js.Dict.fromArray([ - ("typeTag", EvString("typeIdentifier")), - ("typeIdentifier", aType), - ]) - newRecord->Js.Dict.set("memberOf", anArray) - newRecord->EvRecord->Ok - } - let typeModifier_memberOf_update = (aRecord, anArray) => { - let newRecord = aRecord->Js.Dict.entries->Js.Dict.fromArray - newRecord->Js.Dict.set("memberOf", anArray) - newRecord->EvRecord->Ok - } - - let typeModifier_min = (aType, value) => { - let newRecord = Js.Dict.fromArray([ - ("typeTag", EvString("typeIdentifier")), - ("typeIdentifier", aType), - ]) - newRecord->Js.Dict.set("min", value) - newRecord->EvRecord->Ok - } - let typeModifier_min_update = (aRecord, value) => { - let newRecord = aRecord->Js.Dict.entries->Js.Dict.fromArray - newRecord->Js.Dict.set("min", value) - newRecord->EvRecord->Ok - } - - let typeModifier_max = (aType, value) => { - let newRecord = Js.Dict.fromArray([ - ("typeTag", EvString("typeIdentifier")), - ("typeIdentifier", aType), - ]) - newRecord->Js.Dict.set("max", value) - newRecord->EvRecord->Ok - } - let typeModifier_max_update = (aRecord, value) => { - let newRecord = aRecord->Js.Dict.entries->Js.Dict.fromArray - newRecord->Js.Dict.set("max", value) - newRecord->EvRecord->Ok - } - - let typeModifier_opaque_update = aRecord => { - let newRecord = aRecord->Js.Dict.entries->Js.Dict.fromArray - newRecord->Js.Dict.set("opaque", EvBool(true)) - newRecord->EvRecord->Ok - } - - let typeOr = evArray => { - let newRecord = Js.Dict.fromArray([("typeTag", EvString("typeOr")), ("typeOr", evArray)]) - newRecord->EvRecord->Ok - } - let typeFunction = anArray => { - let output = Belt.Array.getUnsafe(anArray, Js.Array2.length(anArray) - 1) - let inputs = Js.Array2.slice(anArray, ~start=0, ~end_=-1) - let newRecord = Js.Dict.fromArray([ - ("typeTag", EvString("typeFunction")), - ("inputs", EvArray(inputs)), - ("output", output), - ]) - newRecord->EvRecord->Ok } switch call { - | ("$_atIndex_$", [EvArray(aValueArray), EvNumber(fIndex)]) => arrayAtIndex(aValueArray, fIndex) - | ("$_atIndex_$", [EvModule(dict), EvString(sIndex)]) => recordAtIndex(dict, sIndex) - | ("$_atIndex_$", [EvRecord(dict), EvString(sIndex)]) => recordAtIndex(dict, sIndex) - | ("$_constructArray_$", [EvArray(aValueArray)]) => EvArray(aValueArray)->Ok - | ("$_constructRecord_$", [EvArray(arrayOfPairs)]) => constructRecord(arrayOfPairs) - | ("$_exportBindings_$", [EvRecord(externalBindings)]) => doExportBindings(externalBindings) - | ("$_setBindings_$", [EvRecord(externalBindings), EvSymbol(symbol), value]) => - doSetBindings(externalBindings, symbol, value) - | ("$_setTypeAliasBindings_$", [EvRecord(externalBindings), EvTypeIdentifier(symbol), value]) => - doSetTypeAliasBindings(externalBindings, symbol, value) - | ("$_setTypeOfBindings_$", [EvRecord(externalBindings), EvSymbol(symbol), value]) => - doSetTypeOfBindings(externalBindings, symbol, value) - | ("$_typeModifier_memberOf_$", [EvTypeIdentifier(typeIdentifier), EvArray(arr)]) => - typeModifier_memberOf(EvTypeIdentifier(typeIdentifier), EvArray(arr)) - | ("$_typeModifier_memberOf_$", [EvRecord(typeRecord), EvArray(arr)]) => - typeModifier_memberOf_update(typeRecord, EvArray(arr)) - | ("$_typeModifier_min_$", [EvTypeIdentifier(typeIdentifier), value]) => - typeModifier_min(EvTypeIdentifier(typeIdentifier), value) - | ("$_typeModifier_min_$", [EvRecord(typeRecord), value]) => - typeModifier_min_update(typeRecord, value) - | ("$_typeModifier_max_$", [EvTypeIdentifier(typeIdentifier), value]) => - typeModifier_max(EvTypeIdentifier(typeIdentifier), value) - | ("$_typeModifier_max_$", [EvRecord(typeRecord), value]) => - typeModifier_max_update(typeRecord, value) - | ("$_typeModifier_opaque_$", [EvRecord(typeRecord)]) => typeModifier_opaque_update(typeRecord) - | ("$_typeOr_$", [EvArray(arr)]) => typeOr(EvArray(arr)) - | ("$_typeFunction_$", [EvArray(arr)]) => typeFunction(arr) - | ("concat", [EvArray(aValueArray), EvArray(bValueArray)]) => doAddArray(aValueArray, bValueArray) - | ("concat", [EvString(aValueString), EvString(bValueString)]) => + | ("$_atIndex_$", [IEvArray(aValueArray), IEvNumber(fIndex)]) => arrayAtIndex(aValueArray, fIndex) + | ("$_atIndex_$", [IEvBindings(dict), IEvString(sIndex)]) => moduleAtIndex(dict, sIndex) + | ("$_atIndex_$", [IEvRecord(dict), IEvString(sIndex)]) => recordAtIndex(dict, sIndex) + | ("$_constructArray_$", [IEvArray(aValueArray)]) => IEvArray(aValueArray)->Ok + | ("$_constructRecord_$", [IEvArray(arrayOfPairs)]) => constructRecord(arrayOfPairs) + | ("$_exportBindings_$", [IEvBindings(nameSpace)]) => doExportBindings(nameSpace) + | ("$_setBindings_$", [IEvBindings(nameSpace), IEvSymbol(symbol), value]) => + doSetBindings(nameSpace, symbol, value) + | ("$_setTypeAliasBindings_$", [IEvBindings(nameSpace), IEvTypeIdentifier(symbol), value]) => + doSetTypeAliasBindings(nameSpace, symbol, value) + | ("$_setTypeOfBindings_$", [IEvBindings(nameSpace), IEvSymbol(symbol), value]) => + doSetTypeOfBindings(nameSpace, symbol, value) + | ("$_typeModifier_memberOf_$", [IEvTypeIdentifier(typeIdentifier), IEvArray(arr)]) => + TypeBuilder.typeModifier_memberOf(IEvTypeIdentifier(typeIdentifier), IEvArray(arr)) + | ("$_typeModifier_memberOf_$", [IEvType(typeRecord), IEvArray(arr)]) => + TypeBuilder.typeModifier_memberOf_update(typeRecord, IEvArray(arr)) + | ("$_typeModifier_min_$", [IEvTypeIdentifier(typeIdentifier), value]) => + TypeBuilder.typeModifier_min(IEvTypeIdentifier(typeIdentifier), value) + | ("$_typeModifier_min_$", [IEvType(typeRecord), value]) => + TypeBuilder.typeModifier_min_update(typeRecord, value) + | ("$_typeModifier_max_$", [IEvTypeIdentifier(typeIdentifier), value]) => + TypeBuilder.typeModifier_max(IEvTypeIdentifier(typeIdentifier), value) + | ("$_typeModifier_max_$", [IEvType(typeRecord), value]) => + TypeBuilder.typeModifier_max_update(typeRecord, value) + | ("$_typeModifier_opaque_$", [IEvType(typeRecord)]) => + TypeBuilder.typeModifier_opaque_update(typeRecord) + | ("$_typeOr_$", [IEvArray(arr)]) => TypeBuilder.typeOr(IEvArray(arr)) + | ("$_typeFunction_$", [IEvArray(arr)]) => TypeBuilder.typeFunction(arr) + | ("$_typeTuple_$", [IEvArray(elems)]) => TypeBuilder.typeTuple(elems) + | ("$_typeArray_$", [elem]) => TypeBuilder.typeArray(elem) + | ("$_typeRecord_$", [IEvRecord(propertyMap)]) => TypeBuilder.typeRecord(propertyMap) + | ("concat", [IEvArray(aValueArray), IEvArray(bValueArray)]) => + doAddArray(aValueArray, bValueArray) + | ("concat", [IEvString(aValueString), IEvString(bValueString)]) => doAddString(aValueString, bValueString) - | ("inspect", [value, EvString(label)]) => inspectLabel(value, label) + | ("inspect", [value, IEvString(label)]) => inspectLabel(value, label) | ("inspect", [value]) => inspect(value) - | ("filter", [EvArray(aValueArray), EvLambda(aLambdaValue)]) => - doKeepArray(aValueArray, aLambdaValue) - | ("map", [EvArray(aValueArray), EvLambda(aLambdaValue)]) => doMapArray(aValueArray, aLambdaValue) - | ("mapSamples", [EvDistribution(SampleSet(dist)), EvLambda(aLambdaValue)]) => - SampleMap.map1(dist, aLambdaValue) - | ( - "mapSamples2", - [EvDistribution(SampleSet(dist1)), EvDistribution(SampleSet(dist2)), EvLambda(aLambdaValue)], - ) => - SampleMap.map2(dist1, dist2, aLambdaValue) - | ( - "mapSamples3", - [ - EvDistribution(SampleSet(dist1)), - EvDistribution(SampleSet(dist2)), - EvDistribution(SampleSet(dist3)), - EvLambda(aLambdaValue), - ], - ) => - SampleMap.map3(dist1, dist2, dist3, aLambdaValue) - | ("reduce", [EvArray(aValueArray), initialValue, EvLambda(aLambdaValue)]) => - doReduceArray(aValueArray, initialValue, aLambdaValue) - | ("reduceReverse", [EvArray(aValueArray), initialValue, EvLambda(aLambdaValue)]) => - doReduceReverseArray(aValueArray, initialValue, aLambdaValue) - | ("reverse", [EvArray(aValueArray)]) => aValueArray->Belt.Array.reverse->EvArray->Ok - | (_, [EvBool(_)]) - | (_, [EvNumber(_)]) - | (_, [EvString(_)]) - | (_, [EvBool(_), EvBool(_)]) - | (_, [EvNumber(_), EvNumber(_)]) - | (_, [EvString(_), EvString(_)]) => + | (_, [IEvBool(_)]) + | (_, [IEvNumber(_)]) + | (_, [IEvString(_)]) + | (_, [IEvBool(_), IEvBool(_)]) + | (_, [IEvNumber(_), IEvNumber(_)]) + | (_, [IEvString(_), IEvString(_)]) => callMathJs(call) | call => Error(REFunctionNotFound(call->functionCallToCallSignature->functionCallSignatureToString)) // Report full type signature as error } } - /* Reducer uses Result monad while reducing expressions */ let dispatch = (call: functionCall, environment, reducer: ExpressionT.reducerFn): result< - expressionValue, + internalExpressionValue, errorValue, > => try { - let callInternalWithReducer = (call, environment) => callInternal(call, environment, reducer) let (fn, args) = call // There is a bug that prevents string match in patterns // So we have to recreate a copy of the string - ExternalLibrary.dispatch((Js.String.make(fn), args), environment, callInternalWithReducer) + ExternalLibrary.dispatch((Js.String.make(fn), args), environment, reducer, callInternal) } catch { | Js.Exn.Error(obj) => REJavaScriptExn(Js.Exn.message(obj), Js.Exn.name(obj))->Error | _ => RETodo("unhandled rescript exception")->Error diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros.res index cb2ce425..c4c76ce3 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros.res @@ -3,19 +3,19 @@ they take expressions as parameters and return a new expression. Macros are used to define language building blocks. They are like Lisp macros. */ -module Bindings = Reducer_Expression_Bindings +module BindingsReplacer = Reducer_Expression_BindingsReplacer module ErrorValue = Reducer_ErrorValue module ExpressionBuilder = Reducer_Expression_ExpressionBuilder module ExpressionT = Reducer_Expression_T -module ExpressionValue = ReducerInterface.ExpressionValue +module InternalExpressionValue = ReducerInterface_InternalExpressionValue module ExpressionWithContext = Reducer_ExpressionWithContext +module Bindings = Reducer_Bindings module Result = Belt.Result open Reducer_Expression_ExpressionBuilder -type environment = ExpressionValue.environment +type environment = InternalExpressionValue.environment type errorValue = ErrorValue.errorValue type expression = ExpressionT.expression -type expressionValue = ExpressionValue.expressionValue type expressionWithContext = ExpressionWithContext.expressionWithContext let dispatchMacroCall = ( @@ -27,13 +27,13 @@ let dispatchMacroCall = ( let useExpressionToSetBindings = (bindingExpr: expression, environment, statement, newCode) => { let rExternalBindingsValue = reduceExpression(bindingExpr, bindings, environment) - rExternalBindingsValue->Result.flatMap(externalBindingsValue => { - let newBindings = Bindings.fromValue(externalBindingsValue) + rExternalBindingsValue->Result.flatMap(nameSpaceValue => { + let newBindings = Bindings.fromExpressionValue(nameSpaceValue) - let rNewStatement = Bindings.replaceSymbols(newBindings, statement) + let rNewStatement = BindingsReplacer.replaceSymbols(newBindings, statement) rNewStatement->Result.map(boundStatement => ExpressionWithContext.withContext( - newCode(newBindings->Bindings.toExternalBindings->eRecord, boundStatement), + newCode(newBindings->eModule, boundStatement), newBindings, ) ) @@ -51,7 +51,7 @@ let dispatchMacroCall = ( let doBindStatement = (bindingExpr: expression, statement: expression, environment) => { let defaultStatement = ErrorValue.REAssignmentExpected->Error switch statement { - | ExpressionT.EList(list{ExpressionT.EValue(EvCall(callName)), symbolExpr, statement}) => { + | ExpressionT.EList(list{ExpressionT.EValue(IEvCall(callName)), symbolExpr, statement}) => { let setBindingsFn = correspondingSetBindingsFn(callName) if setBindingsFn !== "" { useExpressionToSetBindings(bindingExpr, environment, statement, ( @@ -77,7 +77,7 @@ let dispatchMacroCall = ( ) => boundStatement) switch statement { - | ExpressionT.EList(list{ExpressionT.EValue(EvCall(callName)), symbolExpr, statement}) => { + | ExpressionT.EList(list{ExpressionT.EValue(IEvCall(callName)), symbolExpr, statement}) => { let setBindingsFn = correspondingSetBindingsFn(callName) if setBindingsFn !== "" { useExpressionToSetBindings(bindingExpr, environment, statement, ( @@ -123,10 +123,7 @@ let dispatchMacroCall = ( bindings: ExpressionT.bindings, parameters: array, lambdaDefinition: ExpressionT.expression, - ) => - ExpressionWithContext.noContext( - eLambda(parameters, bindings->Bindings.toExternalBindings, lambdaDefinition), - )->Ok + ) => ExpressionWithContext.noContext(eLambda(parameters, bindings, lambdaDefinition))->Ok let doTernary = ( condition: expression, @@ -139,15 +136,15 @@ let dispatchMacroCall = ( let rCondition = reduceExpression(blockCondition, bindings, environment) rCondition->Result.flatMap(conditionValue => switch conditionValue { - | ExpressionValue.EvBool(false) => { + | InternalExpressionValue.IEvBool(false) => { let ifFalseBlock = eBlock(list{ifFalse}) ExpressionWithContext.withContext(ifFalseBlock, bindings)->Ok } - | ExpressionValue.EvBool(true) => { + | InternalExpressionValue.IEvBool(true) => { let ifTrueBlock = eBlock(list{ifTrue}) ExpressionWithContext.withContext(ifTrueBlock, bindings)->Ok } - | _ => REExpectedType("Boolean")->Error + | _ => REExpectedType("Boolean", "")->Error } ) } @@ -158,32 +155,32 @@ let dispatchMacroCall = ( > => switch aList { | list{ - ExpressionT.EValue(EvCall("$$_bindStatement_$$")), + ExpressionT.EValue(IEvCall("$$_bindStatement_$$")), bindingExpr: ExpressionT.expression, statement, } => doBindStatement(bindingExpr, statement, environment) - | list{ExpressionT.EValue(EvCall("$$_bindStatement_$$")), statement} => + | list{ExpressionT.EValue(IEvCall("$$_bindStatement_$$")), statement} => // bindings of the context are used when there is no binding expression - doBindStatement(eRecord(Bindings.toExternalBindings(bindings)), statement, environment) + doBindStatement(eModule(bindings), statement, environment) | list{ - ExpressionT.EValue(EvCall("$$_bindExpression_$$")), + ExpressionT.EValue(IEvCall("$$_bindExpression_$$")), bindingExpr: ExpressionT.expression, expression, } => doBindExpression(bindingExpr, expression, environment) - | list{ExpressionT.EValue(EvCall("$$_bindExpression_$$")), expression} => + | list{ExpressionT.EValue(IEvCall("$$_bindExpression_$$")), expression} => // bindings of the context are used when there is no binding expression - doBindExpression(eRecord(Bindings.toExternalBindings(bindings)), expression, environment) - | list{ExpressionT.EValue(EvCall("$$_block_$$")), ...exprs} => + doBindExpression(eModule(bindings), expression, environment) + | list{ExpressionT.EValue(IEvCall("$$_block_$$")), ...exprs} => doBlock(exprs, bindings, environment) | list{ - ExpressionT.EValue(EvCall("$$_lambda_$$")), - ExpressionT.EValue(EvArrayString(parameters)), + ExpressionT.EValue(IEvCall("$$_lambda_$$")), + ExpressionT.EValue(IEvArrayString(parameters)), lambdaDefinition, } => doLambdaDefinition(bindings, parameters, lambdaDefinition) - | list{ExpressionT.EValue(EvCall("$$_ternary_$$")), condition, ifTrue, ifFalse} => + | list{ExpressionT.EValue(IEvCall("$$_ternary_$$")), condition, ifTrue, ifFalse} => doTernary(condition, ifTrue, ifFalse, bindings, environment) | _ => ExpressionWithContext.noContext(ExpressionT.EList(aList))->Ok } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_ErrorValue.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_ErrorValue.res index 721fbc40..211c9f53 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_ErrorValue.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_ErrorValue.res @@ -1,10 +1,13 @@ +@gentype.import("peggy") @genType.as("LocationRange") +type location + @genType type errorValue = | REArityError(option, int, int) //TODO: Binding a lambda to a variable should record the variable name in lambda for error reporting | REArrayIndexNotFound(string, int) | REAssignmentExpected | REDistributionError(DistributionTypes.error) - | REExpectedType(string) + | REExpectedType(string, string) | REExpressionExpected | REFunctionExpected(string) | REFunctionNotFound(string) @@ -14,7 +17,7 @@ type errorValue = | REOperationError(Operation.operationError) | RERecordPropertyNotFound(string, string) | RESymbolNotFound(string) - | RESyntaxError(string) + | RESyntaxError(string, option) | RETodo(string) // To do | REUnitNotFound(string) @@ -50,8 +53,8 @@ let errorToString = err => | RENotAFunction(valueString) => `${valueString} is not a function` | RERecordPropertyNotFound(msg, index) => `${msg}: ${index}` | RESymbolNotFound(symbolName) => `${symbolName} is not defined` - | RESyntaxError(desc) => `Syntax Error: ${desc}` + | RESyntaxError(desc, _) => `Syntax Error: ${desc}` | RETodo(msg) => `TODO: ${msg}` - | REExpectedType(typeName) => `Expected type: ${typeName}` + | REExpectedType(typeName, valueString) => `Expected type: ${typeName} but got: ${valueString}` | REUnitNotFound(unitName) => `Unit not found: ${unitName}` } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Exception.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Exception.res new file mode 100644 index 00000000..14db0843 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Exception.res @@ -0,0 +1,3 @@ +// There are switch statement cases in the code which are impossible to reach by design. +// ImpossibleException is a sign of programming error. +exception ImpossibleException(string) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res index 6b4168c3..6de4f74a 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res @@ -1,20 +1,20 @@ -module Bindings = Reducer_Expression_Bindings +module BindingsReplacer = Reducer_Expression_BindingsReplacer module BuiltIn = Reducer_Dispatch_BuiltIn module ExpressionBuilder = Reducer_Expression_ExpressionBuilder -module ExpressionValue = ReducerInterface.ExpressionValue module Extra = Reducer_Extra +module InternalExpressionValue = ReducerInterface_InternalExpressionValue module Lambda = Reducer_Expression_Lambda module Macro = Reducer_Expression_Macro module MathJs = Reducer_MathJs +module Bindings = Reducer_Bindings module Result = Belt.Result module T = Reducer_Expression_T -type environment = ReducerInterface_ExpressionValue.environment +type environment = InternalExpressionValue.environment type errorValue = Reducer_ErrorValue.errorValue type expression = T.expression -type expressionValue = ReducerInterface_ExpressionValue.expressionValue -type externalBindings = ReducerInterface_ExpressionValue.externalBindings -type internalCode = ReducerInterface_ExpressionValue.internalCode +type internalExpressionValue = InternalExpressionValue.t +type externalExpressionValue = ReducerInterface_ExternalExpressionValue.t type t = expression /* @@ -27,7 +27,7 @@ let parse = (peggyCode: string): result => Recursively evaluate/reduce the expression (Lisp AST) */ let rec reduceExpression = (expression: t, bindings: T.bindings, environment: environment): result< - expressionValue, + internalExpressionValue, 'e, > => { // Js.log(`reduce: ${T.toString(expression)} bindings: ${bindings->Bindings.toString}`) @@ -35,7 +35,7 @@ let rec reduceExpression = (expression: t, bindings: T.bindings, environment: en | T.EValue(value) => value->Ok | T.EList(list) => switch list { - | list{EValue(EvCall(fName)), ..._args} => + | list{EValue(IEvCall(fName)), ..._args} => switch Macro.isMacroName(fName) { // A macro expands then reduces itself | true => Macro.doMacroCall(expression, bindings, environment, reduceExpression) @@ -50,11 +50,11 @@ and reduceExpressionList = ( expressions: list, bindings: T.bindings, environment: environment, -): result => { - let racc: result, 'e> = expressions->Belt.List.reduceReverse(Ok(list{}), ( - racc, - each: expression, - ) => +): result => { + let racc: result< + list, + 'e, + > = expressions->Belt.List.reduceReverse(Ok(list{}), (racc, each: expression) => racc->Result.flatMap(acc => { each ->reduceExpression(bindings, environment) @@ -69,12 +69,12 @@ and reduceExpressionList = ( /* After reducing each level of expression(Lisp AST), we have a value list to evaluate */ -and reduceValueList = (valueList: list, environment): result< - expressionValue, +and reduceValueList = (valueList: list, environment): result< + internalExpressionValue, 'e, > => switch valueList { - | list{EvCall(fName), ...args} => { + | list{IEvCall(fName), ...args} => { let rCheckedArgs = switch fName { | "$_setBindings_$" | "$_setTypeOfBindings_$" | "$_setTypeAliasBindings_$" => args->Ok | _ => args->Lambda.checkIfReduced @@ -84,14 +84,14 @@ and reduceValueList = (valueList: list, environment): result< (fName, checkedArgs->Belt.List.toArray)->BuiltIn.dispatch(environment, reduceExpression) ) } - | list{EvLambda(_)} => + | list{IEvLambda(_)} => // TODO: remove on solving issue#558 valueList ->Lambda.checkIfReduced ->Result.flatMap(reducedValueList => - reducedValueList->Belt.List.toArray->ExpressionValue.EvArray->Ok + reducedValueList->Belt.List.toArray->InternalExpressionValue.IEvArray->Ok ) - | list{EvLambda(lamdaCall), ...args} => + | list{IEvLambda(lamdaCall), ...args} => args ->Lambda.checkIfReduced ->Result.flatMap(checkedArgs => @@ -102,62 +102,57 @@ and reduceValueList = (valueList: list, environment): result< valueList ->Lambda.checkIfReduced ->Result.flatMap(reducedValueList => - reducedValueList->Belt.List.toArray->ExpressionValue.EvArray->Ok + reducedValueList->Belt.List.toArray->InternalExpressionValue.IEvArray->Ok ) } let evalUsingBindingsExpression_ = (aExpression, bindings, environment): result< - expressionValue, + internalExpressionValue, 'e, > => reduceExpression(aExpression, bindings, environment) let evaluateUsingOptions = ( - ~environment: option, - ~externalBindings: option, + ~environment: option, + ~externalBindings: option, code: string, -): result => { +): result => { let anEnvironment = Belt.Option.getWithDefault( environment, - ReducerInterface_ExpressionValue.defaultEnvironment, + ReducerInterface_ExternalExpressionValue.defaultEnvironment, ) - let anExternalBindings = switch externalBindings { - | Some(bindings) => { - let cloneLib = ReducerInterface_StdLib.externalStdLib->Reducer_Category_Bindings.cloneRecord - Js.Dict.entries(bindings)->Js.Array2.reduce((acc, (key, value)) => { - acc->Js.Dict.set(key, value) - acc - }, cloneLib) - } - | None => ReducerInterface_StdLib.externalStdLib - } + let mergedBindings: InternalExpressionValue.nameSpace = Bindings.merge( + ReducerInterface_StdLib.internalStdLib, + Belt.Option.map(externalBindings, Bindings.fromTypeScriptBindings)->Belt.Option.getWithDefault( + Bindings.emptyModule, + ), + ) - let bindings = anExternalBindings->Bindings.fromExternalBindings - - parse(code)->Result.flatMap(expr => evalUsingBindingsExpression_(expr, bindings, anEnvironment)) + parse(code) + ->Result.flatMap(expr => evalUsingBindingsExpression_(expr, mergedBindings, anEnvironment)) + ->Result.map(ReducerInterface_InternalExpressionValue.toExternal) } /* - Evaluates Squiggle code and bindings via Reducer and answers the result + IEvaluates Squiggle code and bindings via Reducer and answers the result */ -let evaluate = (code: string): result => { +let evaluate = (code: string): result => { evaluateUsingOptions(~environment=None, ~externalBindings=None, code) } -let eval = evaluate let evaluatePartialUsingExternalBindings = ( code: string, - externalBindings: ReducerInterface_ExpressionValue.externalBindings, - environment: ReducerInterface_ExpressionValue.environment, -): result => { + externalBindings: ReducerInterface_ExternalExpressionValue.externalBindings, + environment: ReducerInterface_ExternalExpressionValue.environment, +): result => { let rAnswer = evaluateUsingOptions( ~environment=Some(environment), ~externalBindings=Some(externalBindings), code, ) switch rAnswer { - | Ok(EvRecord(externalBindings)) => Ok(externalBindings) + | Ok(EvModule(externalBindings)) => Ok(externalBindings) | Ok(_) => - Error(Reducer_ErrorValue.RESyntaxError(`Partials must end with an assignment or record`)) + Error(Reducer_ErrorValue.RESyntaxError(`Partials must end with an assignment or record`, None)) | Error(err) => err->Error } } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_ExpressionWithContext.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_ExpressionWithContext.res index 372b07ad..44059e2b 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_ExpressionWithContext.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_ExpressionWithContext.res @@ -1,16 +1,16 @@ -module Bindings = Reducer_Expression_Bindings +module BindingsReplacer = Reducer_Expression_BindingsReplacer module ErrorValue = Reducer_ErrorValue module ExpressionT = Reducer_Expression_T -module ExpressionValue = ReducerInterface.ExpressionValue +module InternalExpressionValue = ReducerInterface_InternalExpressionValue module Result = Belt.Result +module Bindings = Reducer_Bindings type bindings = ExpressionT.bindings type context = bindings -type environment = ExpressionValue.environment +type environment = InternalExpressionValue.environment type errorValue = Reducer_ErrorValue.errorValue type expression = ExpressionT.expression -type expressionValue = ExpressionValue.expressionValue -type externalBindings = ReducerInterface_ExpressionValue.externalBindings +type internalExpressionValue = InternalExpressionValue.t type reducerFn = ExpressionT.reducerFn type expressionWithContext = @@ -22,7 +22,7 @@ let callReducer = ( bindings: bindings, environment: environment, reducer: reducerFn, -): result => { +): result => { switch expressionWithContext { | ExpressionNoContext(expr) => // Js.log(`callReducer: bindings ${Bindings.toString(bindings)} expr ${ExpressionT.toString(expr)}`) @@ -40,7 +40,9 @@ let toString = expressionWithContext => switch expressionWithContext { | ExpressionNoContext(expr) => ExpressionT.toString(expr) | ExpressionWithContext(expr, context) => - `${ExpressionT.toString(expr)} context: ${Bindings.toString(context)}` + `${ExpressionT.toString(expr)} context: ${context + ->Bindings.toExpressionValue + ->InternalExpressionValue.toString}` } let toStringResult = rExpressionWithContext => diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Bindings.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Bindings.res deleted file mode 100644 index c637581f..00000000 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Bindings.res +++ /dev/null @@ -1,72 +0,0 @@ -module ErrorValue = Reducer_ErrorValue -module ExpressionT = Reducer_Expression_T -module ExpressionValue = ReducerInterface.ExpressionValue -module Result = Belt.Result -module Bindings = Reducer_Category_Bindings - -type errorValue = Reducer_ErrorValue.errorValue -type expression = ExpressionT.expression -type expressionValue = ExpressionValue.expressionValue -type externalBindings = ReducerInterface_ExpressionValue.externalBindings - -let emptyBindings = Reducer_Category_Bindings.emptyBindings - -let typeAliasesKey = Bindings.typeAliasesKey -let typeReferencesKey = Bindings.typeReferencesKey - -let toExternalBindings = (bindings: ExpressionT.bindings): externalBindings => - Bindings.toRecord(bindings) - -let fromExternalBindings = (externalBindings: externalBindings): ExpressionT.bindings => - Bindings.fromRecord(externalBindings) - -let fromValue = (aValue: expressionValue) => Bindings.fromExpressionValue(aValue) - -let isMacroName = (fName: string): bool => fName->Js.String2.startsWith("$$") - -let rec replaceSymbols = (bindings: ExpressionT.bindings, expression: expression): result< - expression, - errorValue, -> => - switch expression { - | ExpressionT.EValue(value) => - replaceSymbolOnValue(bindings, value)->Result.map(evValue => evValue->ExpressionT.EValue) - | ExpressionT.EList(list) => - switch list { - | list{EValue(EvCall(fName)), ..._args} => - switch isMacroName(fName) { - // A macro reduces itself so we dont dive in it - | true => expression->Ok - | false => replaceSymbolsOnExpressionList(bindings, list) - } - | _ => replaceSymbolsOnExpressionList(bindings, list) - } - } - -and replaceSymbolsOnExpressionList = (bindings, list) => { - let racc = list->Belt.List.reduceReverse(Ok(list{}), (racc, each: expression) => - racc->Result.flatMap(acc => { - replaceSymbols(bindings, each)->Result.flatMap(newNode => { - acc->Belt.List.add(newNode)->Ok - }) - }) - ) - racc->Result.map(acc => acc->ExpressionT.EList) -} -and replaceSymbolOnValue = (bindings, evValue: expressionValue) => - switch evValue { - | EvSymbol(symbol) => Belt.Map.String.getWithDefault(bindings, symbol, evValue)->Ok - | EvCall(symbol) => Belt.Map.String.getWithDefault(bindings, symbol, evValue)->checkIfCallable - | _ => evValue->Ok - } -and checkIfCallable = (evValue: expressionValue) => - switch evValue { - | EvCall(_) | EvLambda(_) => evValue->Ok - | _ => ErrorValue.RENotAFunction(ExpressionValue.toString(evValue))->Error - } - -let toString = (bindings: ExpressionT.bindings) => - bindings->toExternalBindings->ExpressionValue.EvRecord->ExpressionValue.toString - -let externalBindingsToString = (externalBindings: externalBindings) => - externalBindings->ExpressionValue.EvRecord->ExpressionValue.toString diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_BindingsReplacer.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_BindingsReplacer.res new file mode 100644 index 00000000..15ecfe58 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_BindingsReplacer.res @@ -0,0 +1,53 @@ +module ErrorValue = Reducer_ErrorValue +module ExpressionT = Reducer_Expression_T +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module Result = Belt.Result +module Bindings = Reducer_Bindings + +type errorValue = Reducer_ErrorValue.errorValue +type expression = ExpressionT.expression +type internalExpressionValue = InternalExpressionValue.t +type externalBindings = ReducerInterface_ExternalExpressionValue.externalBindings + +let isMacroName = (fName: string): bool => fName->Js.String2.startsWith("$$") + +let rec replaceSymbols = (bindings: ExpressionT.bindings, expression: expression): result< + expression, + errorValue, +> => + switch expression { + | ExpressionT.EValue(value) => + replaceSymbolOnValue(bindings, value)->Result.map(evValue => evValue->ExpressionT.EValue) + | ExpressionT.EList(list) => + switch list { + | list{EValue(IEvCall(fName)), ..._args} => + switch isMacroName(fName) { + // A macro reduces itself so we dont dive in it + | true => expression->Ok + | false => replaceSymbolsOnExpressionList(bindings, list) + } + | _ => replaceSymbolsOnExpressionList(bindings, list) + } + } + +and replaceSymbolsOnExpressionList = (bindings, list) => { + let racc = list->Belt.List.reduceReverse(Ok(list{}), (racc, each: expression) => + racc->Result.flatMap(acc => { + replaceSymbols(bindings, each)->Result.flatMap(newNode => { + acc->Belt.List.add(newNode)->Ok + }) + }) + ) + racc->Result.map(acc => acc->ExpressionT.EList) +} +and replaceSymbolOnValue = (bindings, evValue: internalExpressionValue) => + switch evValue { + | IEvSymbol(symbol) => Bindings.getWithDefault(bindings, symbol, evValue)->Ok + | IEvCall(symbol) => Bindings.getWithDefault(bindings, symbol, evValue)->checkIfCallable + | _ => evValue->Ok + } +and checkIfCallable = (evValue: internalExpressionValue) => + switch evValue { + | IEvCall(_) | IEvLambda(_) => evValue->Ok + | _ => ErrorValue.RENotAFunction(InternalExpressionValue.toString(evValue))->Error + } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_ExpressionBuilder.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_ExpressionBuilder.res index 22afadba..9cc25725 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_ExpressionBuilder.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_ExpressionBuilder.res @@ -1,24 +1,26 @@ -module BBindings = Reducer_Expression_Bindings +module BBindingsReplacer = Reducer_Expression_BindingsReplacer module BErrorValue = Reducer_ErrorValue module BExpressionT = Reducer_Expression_T -module BExpressionValue = ReducerInterface.ExpressionValue +module BInternalExpressionValue = ReducerInterface_InternalExpressionValue +module BBindings = Reducer_Bindings type errorValue = BErrorValue.errorValue type expression = BExpressionT.expression -type internalCode = ReducerInterface_ExpressionValue.internalCode +type expressionOrFFI = BExpressionT.expressionOrFFI +type ffiFn = BExpressionT.ffiFn +type internalCode = ReducerInterface_InternalExpressionValue.internalCode -external castExpressionToInternalCode: expression => internalCode = "%identity" +let eArray = anArray => anArray->BInternalExpressionValue.IEvArray->BExpressionT.EValue -let eArray = anArray => anArray->BExpressionValue.EvArray->BExpressionT.EValue +let eArrayString = anArray => anArray->BInternalExpressionValue.IEvArrayString->BExpressionT.EValue -let eArrayString = anArray => anArray->BExpressionValue.EvArrayString->BExpressionT.EValue +let eBindings = (anArray: array<(string, BInternalExpressionValue.t)>) => + anArray->BBindings.fromArray->BBindings.toExpressionValue->BExpressionT.EValue -let eBindings = (anArray: array<(string, BExpressionValue.expressionValue)>) => - anArray->Js.Dict.fromArray->BExpressionValue.EvRecord->BExpressionT.EValue +let eBool = aBool => aBool->BInternalExpressionValue.IEvBool->BExpressionT.EValue -let eBool = aBool => aBool->BExpressionValue.EvBool->BExpressionT.EValue - -let eCall = (name: string): expression => name->BExpressionValue.EvCall->BExpressionT.EValue +let eCall = (name: string): expression => + name->BInternalExpressionValue.IEvCall->BExpressionT.EValue let eFunction = (fName: string, lispArgs: list): expression => { let fn = fName->eCall @@ -27,29 +29,36 @@ let eFunction = (fName: string, lispArgs: list): expression => { let eLambda = ( parameters: array, - context: BExpressionValue.externalBindings, + context: BInternalExpressionValue.nameSpace, expr: expression, ) => { - // Js.log(`eLambda context ${BBindings.externalBindingsToString(context)}`) - BExpressionValue.EvLambda({ + BInternalExpressionValue.IEvLambda({ parameters: parameters, context: context, - body: expr->castExpressionToInternalCode, + body: NotFFI(expr)->BBindings.castExpressionToInternalCode, })->BExpressionT.EValue } -let eNumber = aNumber => aNumber->BExpressionValue.EvNumber->BExpressionT.EValue +let eLambdaFFI = (ffiFn: ffiFn) => { + ffiFn->BBindings.eLambdaFFIValue->BExpressionT.EValue +} -let eRecord = aRecord => aRecord->BExpressionValue.EvRecord->BExpressionT.EValue +let eNumber = aNumber => aNumber->BInternalExpressionValue.IEvNumber->BExpressionT.EValue -let eString = aString => aString->BExpressionValue.EvString->BExpressionT.EValue +let eRecord = aMap => aMap->BInternalExpressionValue.IEvRecord->BExpressionT.EValue -let eSymbol = (name: string): expression => name->BExpressionValue.EvSymbol->BExpressionT.EValue +let eString = aString => aString->BInternalExpressionValue.IEvString->BExpressionT.EValue + +let eSymbol = (name: string): expression => + name->BInternalExpressionValue.IEvSymbol->BExpressionT.EValue let eList = (list: list): expression => list->BExpressionT.EList let eBlock = (exprs: list): expression => eFunction("$$_block_$$", exprs) +let eModule = (nameSpace: BInternalExpressionValue.nameSpace): expression => + nameSpace->BInternalExpressionValue.IEvBindings->BExpressionT.EValue + let eLetStatement = (symbol: string, valueExpression: expression): expression => eFunction("$_let_$", list{eSymbol(symbol), valueExpression}) @@ -65,7 +74,13 @@ let eBindExpression = (bindingExpr: expression, expression: expression): express let eBindExpressionDefault = (expression: expression): expression => eFunction("$$_bindExpression_$$", list{expression}) -let eIdentifier = (name: string): expression => name->BExpressionValue.EvSymbol->BExpressionT.EValue +let eTernary = (truth: expression, trueCase: expression, falseCase: expression): expression => + eFunction("$$_ternary_$$", list{truth, trueCase, falseCase}) + +let eIdentifier = (name: string): expression => + name->BInternalExpressionValue.IEvSymbol->BExpressionT.EValue let eTypeIdentifier = (name: string): expression => - name->BExpressionValue.EvTypeIdentifier->BExpressionT.EValue + name->BInternalExpressionValue.IEvTypeIdentifier->BExpressionT.EValue + +let eVoid: expression = BInternalExpressionValue.IEvVoid->BExpressionT.EValue diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Lambda.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Lambda.res index dc4920f3..59779484 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Lambda.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Lambda.res @@ -1,56 +1,77 @@ -module Bindings = Reducer_Expression_Bindings +module BindingsReplacer = Reducer_Expression_BindingsReplacer module ErrorValue = Reducer_ErrorValue module ExpressionBuilder = Reducer_Expression_ExpressionBuilder module ExpressionT = Reducer_Expression_T -module ExpressionValue = ReducerInterface.ExpressionValue +module ExpressionValue = ReducerInterface_InternalExpressionValue +module Bindings = Reducer_Bindings module Result = Belt.Result -type environment = ReducerInterface_ExpressionValue.environment +type environment = ReducerInterface_InternalExpressionValue.environment type expression = ExpressionT.expression -type expressionValue = ReducerInterface_ExpressionValue.expressionValue -type externalBindings = ReducerInterface_ExpressionValue.externalBindings -type internalCode = ReducerInterface_ExpressionValue.internalCode +type expressionOrFFI = ExpressionT.expressionOrFFI +type internalExpressionValue = ReducerInterface_InternalExpressionValue.t +type internalCode = ReducerInterface_InternalExpressionValue.internalCode -external castInternalCodeToExpression: internalCode => expression = "%identity" +external castInternalCodeToExpression: internalCode => expressionOrFFI = "%identity" -let checkArity = (lambdaValue: ExpressionValue.lambdaValue, args: list) => { - let argsLength = Belt.List.length(args) - let parametersLength = Js.Array2.length(lambdaValue.parameters) - if argsLength !== parametersLength { - ErrorValue.REArityError(None, parametersLength, argsLength)->Error - } else { - args->Ok +let checkArity = ( + lambdaValue: ExpressionValue.lambdaValue, + args: list, +) => { + let reallyCheck = { + let argsLength = Belt.List.length(args) + let parametersLength = Js.Array2.length(lambdaValue.parameters) + if argsLength !== parametersLength { + ErrorValue.REArityError(None, parametersLength, argsLength)->Error + } else { + args->Ok + } + } + let exprOrFFI = castInternalCodeToExpression(lambdaValue.body) + switch exprOrFFI { + | NotFFI(_) => reallyCheck + | FFI(_) => args->Ok } } -let checkIfReduced = (args: list) => +let checkIfReduced = (args: list) => args->Belt.List.reduceReverse(Ok(list{}), (rAcc, arg) => rAcc->Result.flatMap(acc => switch arg { - | EvSymbol(symbol) => ErrorValue.RESymbolNotFound(symbol)->Error + | IEvSymbol(symbol) => ErrorValue.RESymbolNotFound(symbol)->Error | _ => list{arg, ...acc}->Ok } ) ) +let caseNotFFI = (lambdaValue: ExpressionValue.lambdaValue, expr, args, environment, reducer) => { + let parameterList = lambdaValue.parameters->Belt.List.fromArray + let zippedParameterList = parameterList->Belt.List.zip(args) + let bindings = Belt.List.reduce(zippedParameterList, lambdaValue.context, ( + acc, + (variable, variableValue), + ) => acc->Bindings.set(variable, variableValue)) + let newExpression = ExpressionBuilder.eBlock(list{expr}) + reducer(newExpression, bindings, environment) +} + +let caseFFI = (ffiFn: ExpressionT.ffiFn, args, environment) => { + ffiFn(args->Belt.List.toArray, environment) +} + let applyParametersToLambda = ( lambdaValue: ExpressionValue.lambdaValue, args, environment, reducer: ExpressionT.reducerFn, -): result => { +): result => { checkArity(lambdaValue, args)->Result.flatMap(args => checkIfReduced(args)->Result.flatMap(args => { - let expr = castInternalCodeToExpression(lambdaValue.body) - let parameterList = lambdaValue.parameters->Belt.List.fromArray - let zippedParameterList = parameterList->Belt.List.zip(args) - let bindings = Belt.List.reduce( - zippedParameterList, - lambdaValue.context->Bindings.fromExternalBindings, - (acc, (variable, variableValue)) => acc->Belt.Map.String.set(variable, variableValue), - ) - let newExpression = ExpressionBuilder.eBlock(list{expr}) - reducer(newExpression, bindings, environment) + let exprOrFFI = castInternalCodeToExpression(lambdaValue.body) + switch exprOrFFI { + | NotFFI(expr) => caseNotFFI(lambdaValue, expr, args, environment, reducer) + | FFI(ffiFn) => caseFFI(ffiFn, args, environment) + } }) ) } @@ -60,10 +81,10 @@ let doLambdaCall = (lambdaValue: ExpressionValue.lambdaValue, args, environment, let foreignFunctionInterface = ( lambdaValue: ExpressionValue.lambdaValue, - argArray: array, + argArray: array, environment: ExpressionValue.environment, reducer: ExpressionT.reducerFn, -): result => { +): result => { let args = argArray->Belt.List.fromArray applyParametersToLambda(lambdaValue, args, environment, reducer) } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Macro.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Macro.res index 23fb70f8..2598a9ed 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Macro.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Macro.res @@ -1,11 +1,11 @@ module ExpressionT = Reducer_Expression_T -module ExpressionValue = ReducerInterface.ExpressionValue +module InternalExpressionValue = ReducerInterface_InternalExpressionValue module ExpressionWithContext = Reducer_ExpressionWithContext module Result = Belt.Result -type environment = ExpressionValue.environment +type environment = InternalExpressionValue.environment type expression = ExpressionT.expression -type expressionValue = ExpressionValue.expressionValue +type internalExpressionValue = InternalExpressionValue.t type expressionWithContext = ExpressionWithContext.expressionWithContext let expandMacroCall = ( @@ -26,7 +26,7 @@ let doMacroCall = ( bindings: ExpressionT.bindings, environment: environment, reduceExpression: ExpressionT.reducerFn, -): result => +): result => expandMacroCall( macroExpression, bindings, diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_T.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_T.res index 512e08ea..c9739be3 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_T.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_T.res @@ -7,38 +7,38 @@ The act of defining the semantics of a functional language is to write it in terms of Lisp AST. */ module Extra = Reducer_Extra -module ExpressionValue = ReducerInterface.ExpressionValue +module InternalExpressionValue = ReducerInterface_InternalExpressionValue -type expressionValue = ExpressionValue.expressionValue -type environment = ExpressionValue.environment +type internalExpressionValue = InternalExpressionValue.t +type environment = ReducerInterface_InternalExpressionValue.environment type rec expression = | EList(list) // A list to map-reduce - | EValue(expressionValue) // Irreducible built-in value. Reducer should not know the internals. External libraries are responsible -and bindings = Belt.Map.String.t + | EValue(internalExpressionValue) // Irreducible built-in value. Reducer should not know the internals. External libraries are responsible +and bindings = InternalExpressionValue.nameSpace type reducerFn = ( expression, bindings, environment, -) => result +) => result /* Converts the expression to String */ let rec toString = expression => switch expression { - | EList(list{EValue(EvCall("$$_block_$$")), ...statements}) => + | EList(list{EValue(IEvCall("$$_block_$$")), ...statements}) => `{${Belt.List.map(statements, aValue => toString(aValue)) - ->Extra.List.interperse("; ") + ->Extra.List.intersperse("; ") ->Belt.List.toArray ->Js.String.concatMany("")}}` | EList(aList) => `(${Belt.List.map(aList, aValue => toString(aValue)) - ->Extra.List.interperse(" ") + ->Extra.List.intersperse(" ") ->Belt.List.toArray ->Js.String.concatMany("")})` - | EValue(aValue) => ExpressionValue.toString(aValue) + | EValue(aValue) => InternalExpressionValue.toString(aValue) } let toStringResult = codeResult => @@ -65,3 +65,18 @@ let inspectResult = (r: result): resu Js.log(toStringResult(r)) r } + +type ffiFn = ( + array, + environment, +) => result + +type optionFfiFn = (array, environment) => option +type optionFfiFnReturningResult = ( + array, + environment, +) => option> + +type expressionOrFFI = + | NotFFI(expression) + | FFI(ffiFn) diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_Array.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_Array.res index 58dd4ffd..8c9f2fbb 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_Array.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_Array.res @@ -3,5 +3,5 @@ */ module ExtraList = Reducer_Extra_List -let interperse = (anArray, seperator) => - anArray->Belt.List.fromArray->ExtraList.interperse(seperator)->Belt.List.toArray +let intersperse = (anArray, seperator) => + anArray->Belt.List.fromArray->ExtraList.intersperse(seperator)->Belt.List.toArray diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_List.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_List.res index 9b3bcc3d..b723cca4 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_List.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Extra/Reducer_Extra_List.res @@ -1,9 +1,9 @@ /* Insert seperator between the elements of a list */ -let rec interperse = (aList, seperator) => +let rec intersperse = (aList, seperator) => switch aList { | list{} => list{} | list{a} => list{a} - | list{a, ...rest} => list{a, seperator, ...interperse(rest, seperator)} + | list{a, ...rest} => list{a, seperator, ...intersperse(rest, seperator)} } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Js/Reducer_Js_Gate.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Js/Reducer_Js_Gate.res index 7cd220bc..d7a267e2 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Js/Reducer_Js_Gate.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Js/Reducer_Js_Gate.res @@ -1,4 +1,4 @@ -open ReducerInterface.ExpressionValue +open ReducerInterface_InternalExpressionValue open Reducer_ErrorValue external castBool: unit => bool = "%identity" @@ -8,10 +8,10 @@ external castString: unit => string = "%identity" /* As JavaScript returns us any type, we need to type check and cast type propertype before using it */ -let jsToEv = (jsValue): result => +let jsToIEv = (jsValue): result => switch Js.typeof(jsValue) { - | "boolean" => jsValue->castBool->EvBool->Ok - | "number" => jsValue->castNumber->EvNumber->Ok - | "string" => jsValue->castString->EvString->Ok + | "boolean" => jsValue->castBool->IEvBool->Ok + | "number" => jsValue->castNumber->IEvNumber->Ok + | "string" => jsValue->castString->IEvString->Ok | other => RETodo(`Unhandled MathJs literal type: ${Js.String.make(other)}`)->Error } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Eval.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Eval.res index ab9fb711..30cb2014 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Eval.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_Eval.res @@ -1,5 +1,5 @@ module JavaScript = Reducer_Js -open ReducerInterface.ExpressionValue +open ReducerInterface_InternalExpressionValue open Reducer_ErrorValue @module("mathjs") external dummy_: string => unit = "evaluate" @@ -17,10 +17,10 @@ let eval__: string => 'a = %raw(`function (expr) { return {value: Mathjs.evaluat /* Call MathJs evaluate and return as a variant */ -let eval = (expr: string): result => { +let eval = (expr: string): result => { try { let answer = eval__(expr) - answer["value"]->JavaScript.Gate.jsToEv + answer["value"]->JavaScript.Gate.jsToIEv } catch { | Js.Exn.Error(obj) => REJavaScriptExn(Js.Exn.message(obj), Js.Exn.name(obj))->Error } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy index 8ed0cf52..dfd3eb45 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_GeneratedParser.peggy @@ -1,143 +1,83 @@ // Try in https://peggyjs.org/online {{ - var toFunction = { - '-': 'subtract', - '->': 'pipe', - '!=': 'unequal', - '.-': 'dotSubtract', - '.*': 'dotMultiply', - './': 'dotDivide', - '.^': 'dotPow', - '.+': 'dotAdd', - '*': 'multiply', - '/': 'divide', - '&&': 'and', - '^': 'pow', // or xor - '+': 'add', - '<': 'smaller', - '<=': 'smallerEq', - '==': 'equal', - '>': 'larger', - '>=': 'largerEq', - '||': 'or', - 'to': 'credibleIntervalToDistribution', - } - - var unaryToFunction = { - '-': 'unaryMinus', - '!': 'not', - '.-': 'unaryDotMinus', - } - - var postOperatorToFunction = { - '.': '$_atIndex_$', - '()': '$$_applyAll_$$', - '[]': '$_atIndex_$', - } - - function makeFunctionCall(fn, args) { - if (fn === '$$_applyAll_$$') { - // Any list of values is applied from left to right anyway. - // Like in Haskell and Lisp. - // So we remove the redundant $$_applyAll_$$. - if (args[0].type === "Identifier") {args[0].type = "CallIdentifier"} - return nodeExpression(args) - } else { - return nodeExpression([nodeCallIndentifier(fn), ...args]) - } - } - - function apply(fn, arg) { return makeFunctionCall(fn, [arg]); } - function constructArray(elems) { return apply('$_constructArray_$', nodeExpression(elems)); } - function constructRecord(elems) { return apply('$_constructRecord_$', nodeExpression(elems)); } - - function nodeBlock(statements) {return{type: 'Block', statements: statements}} - function nodeBoolean(value) {return {type: 'Boolean', value: value}} - function nodeCallIndentifier(value) {return {type: 'CallIdentifier', value: value}} - function nodeExpression(args) {return {type: 'Expression', nodes: args}} - function nodeFloat(value) {return {type: 'Float', value: value}} - function nodeIdentifier(value) {return {type: 'Identifier', value: value}} - function nodeInteger(value) {return {type: 'Integer', value: value}} - function nodeKeyValue(key, value) { - if (key.type === 'Identifier') {key.type = 'String'} - return {type: 'KeyValue', key: key, value: value}} - function nodeLambda(args, body) {return {type: 'Lambda', args: args, body: body}} - function nodeLetStatment(variable, value) {return {type: 'LetStatement', variable: variable, value: value}} - function nodeModuleIdentifier(value) {return {type: 'ModuleIdentifier', value: value}} - function nodeString(value) {return {type: 'String', value: value}} - function nodeTernary(condition, trueExpression, falseExpression) {return {type: 'Ternary', condition: condition, trueExpression: trueExpression, falseExpression: falseExpression}} - - function nodeTypeIdentifier(typeValue) {return {type: 'TypeIdentifier', value: typeValue}} + const h = require('./helpers'); }} start - // = _nl start:typeExpression _nl finalComment? {return start} = _nl start:outerBlock _nl finalComment? {return start} zeroOMoreArgumentsBlockOrExpression = innerBlockOrExpression / lambda outerBlock - = statements:array_statements finalExpression: (statementSeparator @expression)? + = statements:array_statements finalExpression: (statementSeparator @expression)? { if (finalExpression != null) { statements.push(finalExpression) } - return nodeBlock(statements) } + return h.nodeBlock(statements) } / finalExpression: expression - { return nodeBlock([finalExpression])} + { return h.nodeBlock([finalExpression])} innerBlockOrExpression = quotedInnerBlock / finalExpression: expression - { return nodeBlock([finalExpression])} + { return h.nodeBlock([finalExpression])} quotedInnerBlock = '{' _nl statements:array_statements finalExpression: (statementSeparator @expression) _nl '}' - { statements.push(finalExpression) - return nodeBlock(statements) } + { statements.push(finalExpression) + return h.nodeBlock(statements) } / '{' _nl finalExpression: expression _nl '}' - { return nodeBlock([finalExpression]) } + { return h.nodeBlock([finalExpression]) } array_statements = head:statement tail:(statementSeparator @array_statements ) { return [head, ...tail] } / head:statement - { return [head] } + { return [head] } statement = letStatement / defunStatement / typeStatement + / voidStatement + +voidStatement + = "call" _nl value:zeroOMoreArgumentsBlockOrExpression + { var variable = h.nodeIdentifier("_", location()); + return h.nodeLetStatement(variable, value); } letStatement - = variable:identifier _ assignmentOp _nl value:zeroOMoreArgumentsBlockOrExpression - { return nodeLetStatment(variable, value) } + = variable:variable _ assignmentOp _nl value:zeroOMoreArgumentsBlockOrExpression + { return h.nodeLetStatement(variable, value) } defunStatement - = variable:identifier '(' _nl args:array_parameters _nl ')' _ assignmentOp _nl body:innerBlockOrExpression - { var value = nodeLambda(args, body) - return nodeLetStatment(variable, value) } + = variable:variable '(' _nl args:array_parameters _nl ')' _ assignmentOp _nl body:innerBlockOrExpression + { var value = h.nodeLambda(args, body) + return h.nodeLetStatement(variable, value) } assignmentOp "assignment" = '=' array_parameters = head:dollarIdentifier tail:(_ ',' _nl @dollarIdentifier)* - { return [head, ...tail]; } + { return [head, ...tail]; } + / "" + { return [h.nodeIdentifier("_", location())]; } expression = ifthenelse / ternary / logicalAdditive ifthenelse = 'if' __nl condition:logicalAdditive - __nl 'then' __nl trueExpression:innerBlockOrExpression + __nl 'then' __nl trueExpression:innerBlockOrExpression __nl 'else' __nl falseExpression:(ifthenelse/innerBlockOrExpression) - { return nodeTernary(condition, trueExpression, falseExpression) } + { return h.nodeTernary(condition, trueExpression, falseExpression) } ternary = condition:logicalAdditive _ '?' _nl trueExpression:logicalAdditive _ ':' _nl falseExpression:(ternary/logicalAdditive) - { return nodeTernary(condition, trueExpression, falseExpression) } + { return h.nodeTernary(condition, trueExpression, falseExpression) } logicalAdditive = head:logicalMultiplicative tail:(_ operator:logicalAdditiveOp _nl arg:logicalMultiplicative {return {operator: operator, right: arg}})* { return tail.reduce(function(result, element) { - return makeFunctionCall(toFunction[element.operator], [result, element.right]) + return h.makeFunctionCall(h.toFunction[element.operator], [result, element.right]) }, head)} logicalAdditiveOp "operator" = '||' @@ -146,21 +86,21 @@ logicalAdditive logicalMultiplicative = head:equality tail:(_ operator:logicalMultiplicativeOp _nl arg:equality {return {operator: operator, right: arg}})* { return tail.reduce(function(result, element) { - return makeFunctionCall(toFunction[element.operator], [result, element.right]) + return h.makeFunctionCall(h.toFunction[element.operator], [result, element.right]) }, head)} logicalMultiplicativeOp "operator" = '&&' equality = left:relational _ operator:equalityOp _nl right:relational - { return makeFunctionCall(toFunction[operator], [left, right])} + { return h.makeFunctionCall(h.toFunction[operator], [left, right])} / relational - - equalityOp "operator" = '=='/'!=' + + equalityOp "operator" = '=='/'!=' relational = left:additive _ operator:relationalOp _nl right:additive - { return makeFunctionCall(toFunction[operator], [left, right])} + { return h.makeFunctionCall(h.toFunction[operator], [left, right])} / additive relationalOp "operator" = '<='/'<'/'>='/'>' @@ -168,7 +108,7 @@ relational additive = head:multiplicative tail:(_ operator:additiveOp _nl arg:multiplicative {return {operator: operator, right: arg}})* { return tail.reduce(function(result, element) { - return makeFunctionCall(toFunction[element.operator], [result, element.right]) + return h.makeFunctionCall(h.toFunction[element.operator], [result, element.right]) }, head)} additiveOp "operator" = '+' / '-' / '.+' / '.-' @@ -176,7 +116,7 @@ additive multiplicative = head:power tail:(_ operator:multiplicativeOp _nl arg:power {return {operator: operator, right: arg}})* { return tail.reduce(function(result, element) { - return makeFunctionCall(toFunction[element.operator], [result, element.right]) + return h.makeFunctionCall(h.toFunction[element.operator], [result, element.right]) }, head)} multiplicativeOp "operator" = '*' / '/' / '.*' / './' @@ -184,7 +124,7 @@ multiplicative power = head:credibleInterval tail:(_ operator:powerOp _nl arg:credibleInterval {return {operator: operator, right: arg}})* { return tail.reduce(function(result, element) { - return makeFunctionCall(toFunction[element.operator], [result, element.right]) + return h.makeFunctionCall(h.toFunction[element.operator], [result, element.right]) }, head)} powerOp "operator" = '^' / '.^' @@ -192,7 +132,7 @@ power credibleInterval = head:chainFunctionCall tail:(__ operator:credibleIntervalOp __nl arg:chainFunctionCall {return {operator: operator, right: arg}})* { return tail.reduce(function(result, element) { - return makeFunctionCall(toFunction[element.operator], [result, element.right]) + return h.makeFunctionCall(h.toFunction[element.operator], [result, element.right]) }, head)} credibleIntervalOp "operator" = 'to' @@ -200,110 +140,118 @@ credibleInterval chainFunctionCall = head:unary tail:(_ ('->'/'|>') _nl chained:chainedFunction {return chained})* { return tail.reduce(function(result, element) { - return makeFunctionCall(element.fnName, [result, ...element.args]) + return h.makeFunctionCall(element.fnName, [result, ...element.args]) }, head)} chainedFunction - = fn:dollarIdentifier '(' _nl args:array_functionArguments _nl ')' + = fn:variable '(' _nl args:array_functionArguments _nl ')' { return {fnName: fn.value, args: args}} - / fn:dollarIdentifier '(' _nl ')' + / fn:variable '(' _nl ')' { return {fnName: fn.value, args: []}} - / fn:dollarIdentifier + / fn:variable { return {fnName: fn.value, args: []}} // end of binary operators unary = unaryOperator:unaryOperator _nl right:(unary/postOperator) - { return apply(unaryToFunction[unaryOperator], right)} + { return h.apply(h.unaryToFunction[unaryOperator], right)} / postOperator unaryOperator "unary operator" = ('-' / '.-' / '!' ) -postOperator = indexedValue - -indexedValue +postOperator = collectionElement / atom collectionElement = head:atom &('['/'('/'.') tail:( - _ '[' _nl arg:expression _nl ']' {return {fn: postOperatorToFunction['[]'], args: [arg]}} - / _ '(' _nl args:array_functionArguments _nl ')' {return {fn: postOperatorToFunction['()'], args: args}} - / '.' arg:$dollarIdentifier {return {fn: postOperatorToFunction['[]'], args: [nodeString(arg)]}} + _ '[' _nl arg:expression _nl ']' {return {fn: h.postOperatorToFunction['[]'], args: [arg]}} + / _ '(' _nl args:array_functionArguments _nl ')' {return {fn: h.postOperatorToFunction['()'], args: args}} + / '.' arg:$dollarIdentifier {return {fn: h.postOperatorToFunction['[]'], args: [h.nodeString(arg)]}} )* { return tail.reduce(function(result, element) { - return makeFunctionCall(element.fn, [result, ...element.args]) + return h.makeFunctionCall(element.fn, [result, ...element.args]) }, head)} array_functionArguments = head:expression tail:(_ ',' _nl @expression)* { return [head, ...tail]; } + / "" + {return [h.nodeVoid()];} atom = '(' _nl expression:expression _nl ')' {return expression} / basicValue basicValue = valueConstructor / basicLiteral - + basicLiteral = string / number / boolean - / dollarIdentifierWithModule - / dollarIdentifier + / variable + / voidLiteral + +voidLiteral 'void' + = "()" {return h.nodeVoid();} + +variable = dollarIdentifierWithModule / dollarIdentifier dollarIdentifierWithModule 'identifier' - = head:moduleIdentifier + = head:$moduleIdentifier tail:('.' _nl @$moduleIdentifier)* '.' _nl final:$dollarIdentifier - { tail.push(final); - return tail.reduce(function(result, element) { - return makeFunctionCall(postOperatorToFunction['[]'], [result, nodeString(element)]) - }, head)} + { + let modifiers = [...tail] + modifiers.unshift(head) + modifiers.push(final) + let modifiedIdentifier = modifiers.join('.') + return h.nodeIdentifier(modifiedIdentifier, location()) + } identifier 'identifier' - = ([_a-z]+[_a-z0-9]i*) {return nodeIdentifier(text())} + = ([_a-z]+[_a-z0-9]i*) {return h.nodeIdentifier(text(), location())} unitIdentifier 'identifier' - = ([_a-zA-Z]+[_a-z0-9]i*) {return nodeIdentifier(text())} + = ([_a-zA-Z]+[_a-z0-9]i*) {return h.nodeIdentifier(text(), location())} dollarIdentifier '$identifier' - = ([\$_a-z]+[\$_a-z0-9]i*) {return nodeIdentifier(text())} + = ([\$_a-z]+[\$_a-z0-9]i*) {return h.nodeIdentifier(text(), location())} moduleIdentifier 'identifier' - = ([A-Z]+[_a-z0-9]i*) {return nodeModuleIdentifier(text())} + = ([A-Z]+[_a-z0-9]i*) {return h.nodeModuleIdentifier(text())} string 'string' - = characters:("'" @([^'])* "'") {return nodeString(characters.join(''))} - / characters:('"' @([^"])* '"') {return nodeString(characters.join(''))} + = characters:("'" @([^'])* "'") {return h.nodeString(characters.join(''))} + / characters:('"' @([^"])* '"') {return h.nodeString(characters.join(''))} number = number:(float / integer) unit:unitIdentifier? { if (unit === null) { return number } else - { return apply('fromUnit_'+unit.value, number) + { return h.apply('fromUnit_'+unit.value, number) } } integer 'integer' = d+ !"\." ![e]i - { return nodeInteger(parseInt(text()))} + { return h.nodeInteger(parseInt(text()))} float 'float' = $(((d+ "\." d*) / ("\." d+)) floatExponent? / d+ floatExponent) - { return nodeFloat(parseFloat(text()))} + { return h.nodeFloat(parseFloat(text()))} - floatExponent = [e]i '-'? d+ - d = [0-9] + floatExponent = [e]i '-'? d+ + d = [0-9] boolean 'boolean' = ('true'/'false') - { return nodeBoolean(text() === 'true')} + { return h.nodeBoolean(text() === 'true')} valueConstructor = recordConstructor @@ -313,16 +261,16 @@ valueConstructor lambda = '{' _nl '|' _nl args:array_parameters _nl '|' _nl statements:array_statements finalExpression: (statementSeparator @expression) _nl '}' - { statements.push(finalExpression) - return nodeLambda(args, nodeBlock(statements)) } + { statements.push(finalExpression) + return h.nodeLambda(args, h.nodeBlock(statements)) } / '{' _nl '|' _nl args:array_parameters _nl '|' _nl finalExpression: expression _nl '}' - { return nodeLambda(args, nodeBlock([finalExpression])) } + { return h.nodeLambda(args, h.nodeBlock([finalExpression])) } arrayConstructor 'array' = '[' _nl ']' - { return constructArray([]); } + { return h.constructArray([]); } / '[' _nl args:array_elements _nl ']' - { return constructArray(args); } + { return h.constructArray(args); } array_elements = head:expression tail:(_ ',' _nl @expression)* @@ -330,7 +278,7 @@ arrayConstructor 'array' recordConstructor 'record' = '{' _nl args:array_recordArguments _nl '}' - { return constructRecord(args); } + { return h.constructRecord(args); } array_recordArguments = head:keyValuePair tail:(_ ',' _nl @keyValuePair)* @@ -338,7 +286,7 @@ recordConstructor 'record' keyValuePair = key:expression _ ':' _nl value:expression - { return nodeKeyValue(key, value)} + { return h.nodeKeyValue(key, value)} // Separators @@ -355,7 +303,7 @@ __nl 'whitespace or newline' = (whiteSpaceCharactersOrComment / commentOrNewLine )+ statementSeparator 'statement separator' - = _ (';'/ commentOrNewLine)+ _nl + = _ (';'/ commentOrNewLine)+ _nl commentOrNewLine = finalComment? newLine @@ -377,30 +325,30 @@ statementSeparator 'statement separator' noArguments = ('(' _nl ')' )? typeIdentifier 'type identifier' - = ([a-z]+[_a-z0-9]i*) {return nodeTypeIdentifier(text())} + = ([a-z]+[_a-z0-9]i*) {return h.nodeTypeIdentifier(text())} typeConstructorIdentifier 'type constructor identifier' - = ([A-Z]+[_a-z0-9]i*) {return nodeTypeIdentifier(text())} + = ([A-Z]+[_a-z0-9]i*) {return h.nodeTypeIdentifier(text())} typeExpression = typePostModifierExpression typePostModifierExpression = head:typeOr tail:(_ '$' _nl @typeModifier)* { return tail.reduce((result, element) => { - return makeFunctionCall('$_typeModifier_'+element.modifier.value+'_$', [result, ...element.args]) + return h.makeFunctionCall('$_typeModifier_'+element.modifier.value+'_$', [result, ...element.args]) }, head) } typeOr = head:typeFunction tail:(_ '|' _nl @typeFunction)* - { return tail.length === 0 ? head : apply('$_typeOr_$', constructArray([head, ...tail])); } + { return tail.length === 0 ? head : h.apply('$_typeOr_$', h.constructArray([head, ...tail])); } typeFunction = head:typeModifierExpression tail:(_ '=>' _nl @typeModifierExpression)* - { return tail.length === 0 ? head : apply( '$_typeFunction_$', constructArray([head, ...tail])); } + { return tail.length === 0 ? head : h.apply( '$_typeFunction_$', h.constructArray([head, ...tail])); } typeModifierExpression = head:basicType tail:(_ '<-' _nl @typeModifier)* { return tail.reduce((result, element) => { - return makeFunctionCall('$_typeModifier_'+element.modifier.value+'_$', [result, ...element.args]) + return h.makeFunctionCall('$_typeModifier_'+element.modifier.value+'_$', [result, ...element.args]) }, head) } @@ -410,13 +358,20 @@ typeModifierExpression = head:basicType tail:(_ '<-' _nl @typeModifier)* / modifier:identifier _ noArguments { return {modifier: modifier, args: []}; } -basicType = typeConstructor / typeArray / typeRecord / typeInParanthesis / typeIdentifier +basicType = typeConstructor / typeArray / typeTuple / typeRecord / typeInParanthesis / typeIdentifier typeArray = '[' _nl elem:typeExpression _nl ']' - {return apply('$_typeArray_$', elem)} + {return h.apply('$_typeArray_$', elem)} + +typeTuple = '[' _nl elems:array_typeTupleArguments _nl ']' + { return h.apply('$_typeTuple_$', h.constructArray(elems))} + + array_typeTupleArguments + = head:typeExpression tail:(_ ',' _nl @typeExpression)* + { return [head, ...tail]; } typeRecord = '{' _nl elems:array_typeRecordArguments _nl '}' - { return apply('$_typeRecord_$', constructRecord(elems)); } + { return h.apply('$_typeRecord_$', h.constructRecord(elems)); } array_typeRecordArguments = head:typeKeyValuePair tail:(_ ',' _nl @typeKeyValuePair)* @@ -424,27 +379,21 @@ typeRecord = '{' _nl elems:array_typeRecordArguments _nl '}' typeKeyValuePair = key:identifier _ ':' _nl value:typeExpression - { return nodeKeyValue(key, value)} + { return h.nodeKeyValue(key, value)} typeConstructor = constructor:typeConstructorIdentifier _ '(' _nl args:array_types _nl ')' - { return makeFunctionCall('$_typeConstructor_$', [constructor, constructArray(args)]); } + { return h.makeFunctionCall('$_typeConstructor_$', [constructor, h.constructArray(args)]); } / constructor:typeConstructorIdentifier _ noArguments - { return makeFunctionCall('$_typeConstructor_$', [constructor, constructArray([])]); } + { return h.makeFunctionCall('$_typeConstructor_$', [constructor, h.constructArray([])]); } array_types = head:typeExpression tail:(_ ',' _nl @typeExpression)* { return [head, ...tail]; } typeStatement = typeAliasStatement / typeOfStatement typeAliasStatement = 'type' __nl typeIdentifier:typeIdentifier _nl '=' _nl typeExpression:typeExpression - { return makeFunctionCall('$_typeAlias_$', [typeIdentifier, typeExpression])} + { return h.makeFunctionCall('$_typeAlias_$', [typeIdentifier, typeExpression])} typeOfStatement = identifier:identifier _ ':' _nl typeExpression:typeExpression - { return makeFunctionCall('$_typeOf_$', [identifier, typeExpression])} + { return h.makeFunctionCall('$_typeOf_$', [identifier, typeExpression])} typeInParanthesis = '(' _nl typeExpression:typeExpression _nl ')' {return typeExpression} - -// TODO: min max example -// TODO: Example of foo = {a: 2, b: 5}; type fooKeys = string $ memberOf(foo->keys) -// TODO: Example of memberOf( [1,2,3] ) -// TODO: Example of $ -// TODO: Cons(a, list) | EmptyList \ No newline at end of file diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_Parse.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_Parse.res index 5bdcda14..193cb893 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_Parse.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_Parse.res @@ -5,11 +5,19 @@ type node = {"type": string} @module("./Reducer_Peggy_GeneratedParser.js") external parse__: string => node = "parse" +type withLocation = {"location": Reducer_ErrorValue.location} +external castWithLocation: Js.Exn.t => withLocation = "%identity" + +let syntaxErrorToLocation = (error: Js.Exn.t): Reducer_ErrorValue.location => + castWithLocation(error)["location"] + +@genType let parse = (expr: string): result => try { Ok(parse__(expr)) } catch { - | Js.Exn.Error(obj) => REJavaScriptExn(Js.Exn.message(obj), Js.Exn.name(obj))->Error + | Js.Exn.Error(obj) => + RESyntaxError(Belt.Option.getExn(Js.Exn.message(obj)), syntaxErrorToLocation(obj)->Some)->Error } type nodeBlock = {...node, "statements": array} @@ -26,6 +34,7 @@ type nodeModuleIdentifier = {...node, "value": string} type nodeString = {...node, "value": string} type nodeTernary = {...node, "condition": node, "trueExpression": node, "falseExpression": node} type nodeTypeIdentifier = {...node, "value": string} +type nodeVoid = node type peggyNode = | PgNodeBlock(nodeBlock) @@ -42,6 +51,7 @@ type peggyNode = | PgNodeString(nodeString) | PgNodeTernary(nodeTernary) | PgNodeTypeIdentifier(nodeTypeIdentifier) + | PgNodeVoid(nodeVoid) external castNodeBlock: node => nodeBlock = "%identity" external castNodeBoolean: node => nodeBoolean = "%identity" @@ -57,6 +67,7 @@ external castNodeModuleIdentifier: node => nodeModuleIdentifier = "%identity" external castNodeString: node => nodeString = "%identity" external castNodeTernary: node => nodeTernary = "%identity" external castNodeTypeIdentifier: node => nodeTypeIdentifier = "%identity" +external castNodeVoid: node => nodeVoid = "%identity" exception UnsupportedPeggyNodeType(string) // This should never happen; programming error let castNodeType = (node: node) => @@ -75,6 +86,7 @@ let castNodeType = (node: node) => | "String" => node->castNodeString->PgNodeString | "Ternary" => node->castNodeTernary->PgNodeTernary | "TypeIdentifier" => node->castNodeTypeIdentifier->PgNodeTypeIdentifier + | "Void" => node->castNodeVoid->PgNodeVoid | _ => raise(UnsupportedPeggyNodeType(node["type"])) } @@ -83,7 +95,7 @@ let rec pgToString = (peggyNode: peggyNode): string => { args->Js.Array2.map(arg => PgNodeIdentifier(arg)->pgToString)->Js.Array2.toString let nodesToStringUsingSeparator = (nodes: array, separator: string): string => - nodes->Js.Array2.map(toString)->Extra.Array.interperse(separator)->Js.String.concatMany("") + nodes->Js.Array2.map(toString)->Extra.Array.intersperse(separator)->Js.String.concatMany("") switch peggyNode { | PgNodeBlock(node) => "{" ++ node["statements"]->nodesToStringUsingSeparator("; ") ++ "}" @@ -108,6 +120,7 @@ let rec pgToString = (peggyNode: peggyNode): string => { " " ++ toString(node["falseExpression"]) ++ ")" | PgNodeTypeIdentifier(node) => `#${node["value"]}` + | PgNodeVoid(_node) => "()" } } and toString = (node: node): string => node->castNodeType->pgToString diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression.res index 6e04a55d..73247a8e 100644 --- a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression.res +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/Reducer_Peggy_ToExpression.res @@ -48,5 +48,6 @@ let rec fromNode = (node: Parse.node): expression => { ) | PgNodeTypeIdentifier(nodeTypeIdentifier) => ExpressionBuilder.eTypeIdentifier(nodeTypeIdentifier["value"]) + | PgNodeVoid(_) => ExpressionBuilder.eVoid } } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/helpers.ts b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/helpers.ts new file mode 100644 index 00000000..94975233 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Peggy/helpers.ts @@ -0,0 +1,219 @@ +import { LocationRange } from "peggy"; + +export const toFunction = { + "-": "subtract", + "->": "pipe", + "!=": "unequal", + ".-": "dotSubtract", + ".*": "dotMultiply", + "./": "dotDivide", + ".^": "dotPow", + ".+": "dotAdd", + "*": "multiply", + "/": "divide", + "&&": "and", + "^": "pow", // or xor + "+": "add", + "<": "smaller", + "<=": "smallerEq", + "==": "equal", + ">": "larger", + ">=": "largerEq", + "||": "or", + to: "credibleIntervalToDistribution", +}; + +export const unaryToFunction = { + "-": "unaryMinus", + "!": "not", + ".-": "unaryDotMinus", +}; + +export const postOperatorToFunction = { + ".": "$_atIndex_$", + "()": "$$_applyAll_$$", + "[]": "$_atIndex_$", +}; + +type NodeBlock = { + type: "Block"; + statements: AnyPeggyNode[]; +}; + +type NodeExpression = { + type: "Expression"; + nodes: AnyPeggyNode[]; +}; + +type NodeFloat = { + type: "Float"; + value: number; +}; + +type NodeInteger = { + type: "Integer"; + value: number; +}; + +type NodeIdentifier = { + type: "Identifier"; + value: string; + location: LocationRange; +}; + +type NodeCallIdentifier = { + type: "CallIdentifier"; + value: string; +}; + +type NodeLetStatement = { + type: "LetStatement"; + variable: NodeIdentifier; + value: AnyPeggyNode; +}; + +type NodeLambda = { + type: "Lambda"; + args: AnyPeggyNode[]; + body: AnyPeggyNode; +}; + +type NodeTernary = { + type: "Ternary"; + condition: AnyPeggyNode; + trueExpression: AnyPeggyNode; + falseExpression: AnyPeggyNode; +}; + +type NodeKeyValue = { + type: "KeyValue"; + key: AnyPeggyNode; + value: AnyPeggyNode; +}; + +type NodeString = { + type: "String"; + value: string; + location?: LocationRange; +}; + +type NodeBoolean = { + type: "Boolean"; + value: boolean; +}; + +export type AnyPeggyNode = + | NodeBlock + | NodeExpression + | NodeFloat + | NodeInteger + | NodeIdentifier + | NodeCallIdentifier + | NodeLetStatement + | NodeLambda + | NodeTernary + | NodeKeyValue + | NodeString + | NodeBoolean; + +export function makeFunctionCall(fn: string, args: AnyPeggyNode[]) { + if (fn === "$$_applyAll_$$") { + // Any list of values is applied from left to right anyway. + // Like in Haskell and Lisp. + // So we remove the redundant $$_applyAll_$$. + if (args[0].type === "Identifier") { + args[0] = { + ...args[0], + type: "CallIdentifier", + }; + } + return nodeExpression(args); + } else { + return nodeExpression([nodeCallIndentifier(fn), ...args]); + } +} + +export function apply(fn: string, arg: AnyPeggyNode) { + return makeFunctionCall(fn, [arg]); +} +export function constructArray(elems: AnyPeggyNode[]) { + return apply("$_constructArray_$", nodeExpression(elems)); +} +export function constructRecord(elems: AnyPeggyNode[]) { + return apply("$_constructRecord_$", nodeExpression(elems)); +} + +export function nodeBlock(statements: AnyPeggyNode[]): NodeBlock { + return { type: "Block", statements }; +} +export function nodeBoolean(value: boolean): NodeBoolean { + return { type: "Boolean", value }; +} +export function nodeCallIndentifier(value: string): NodeCallIdentifier { + return { type: "CallIdentifier", value }; +} +export function nodeExpression(args: AnyPeggyNode[]): NodeExpression { + return { type: "Expression", nodes: args }; +} +export function nodeFloat(value: number): NodeFloat { + return { type: "Float", value }; +} +export function nodeIdentifier( + value: string, + location: LocationRange +): NodeIdentifier { + return { type: "Identifier", value, location }; +} +export function nodeInteger(value: number): NodeInteger { + return { type: "Integer", value }; +} +export function nodeKeyValue( + key: AnyPeggyNode, + value: AnyPeggyNode +): NodeKeyValue { + if (key.type === "Identifier") { + key = { + ...key, + type: "String", + }; + } + return { type: "KeyValue", key, value }; +} +export function nodeLambda( + args: AnyPeggyNode[], + body: AnyPeggyNode +): NodeLambda { + return { type: "Lambda", args, body }; +} +export function nodeLetStatement( + variable: NodeIdentifier, + value: AnyPeggyNode +): NodeLetStatement { + return { type: "LetStatement", variable, value }; +} +export function nodeModuleIdentifier(value: string) { + return { type: "ModuleIdentifier", value }; +} +export function nodeString(value: string): NodeString { + return { type: "String", value }; +} +export function nodeTernary( + condition: AnyPeggyNode, + trueExpression: AnyPeggyNode, + falseExpression: AnyPeggyNode +): NodeTernary { + return { + type: "Ternary", + condition, + trueExpression, + falseExpression, + }; +} + +export function nodeTypeIdentifier(typeValue: string) { + return { type: "TypeIdentifier", value: typeValue }; +} + +export function nodeVoid() { + return { type: "Void" }; +} diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_Compile.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_Compile.res new file mode 100644 index 00000000..2119ee62 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_Compile.res @@ -0,0 +1,40 @@ +module ErrorValue = Reducer_ErrorValue +module ExpressionT = Reducer_Expression_T +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module Bindings = Reducer_Bindings +module T = Reducer_Type_T + +let ievFromTypeExpression = ( + typeExpressionSourceCode: string, + reducerFn: ExpressionT.reducerFn, +): result => { + let sIndex = "compiled" + let sourceCode = `type ${sIndex}=${typeExpressionSourceCode}` + Reducer_Expression.parse(sourceCode)->Belt.Result.flatMap(expr => { + let rContext = reducerFn( + expr, + Bindings.emptyBindings, + InternalExpressionValue.defaultEnvironment, + ) + Belt.Result.map(rContext, context => + switch context { + | IEvBindings(nameSpace) => + switch Bindings.getType(nameSpace, sIndex) { + | Some(value) => value + | None => raise(Reducer_Exception.ImpossibleException("Reducer_Type_Compile-none")) + } + | _ => raise(Reducer_Exception.ImpossibleException("Reducer_Type_Compile-raise")) + } + ) + }) +} + +let fromTypeExpression = ( + typeExpressionSourceCode: string, + reducerFn: ExpressionT.reducerFn, +): result => { + ievFromTypeExpression( + (typeExpressionSourceCode: string), + (reducerFn: ExpressionT.reducerFn), + )->Belt.Result.map(T.fromIEvValue) +} diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_Contracts.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_Contracts.res new file mode 100644 index 00000000..7b68f178 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_Contracts.res @@ -0,0 +1,53 @@ +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module T = Reducer_Type_T + +let isMin = (modifierArg: InternalExpressionValue.t, aValue: InternalExpressionValue.t): bool => { + let pair = (modifierArg, aValue) + switch pair { + | (IEvNumber(a), IEvNumber(b)) => a <= b + | _ => false + } +} + +let isMax = (modifierArg: InternalExpressionValue.t, aValue: InternalExpressionValue.t): bool => { + let pair = (modifierArg, aValue) + switch pair { + | (IEvNumber(a), IEvNumber(b)) => a >= b + | _ => false + } +} + +let isMemberOf = ( + modifierArg: InternalExpressionValue.t, + aValue: InternalExpressionValue.t, +): bool => { + let pair = (modifierArg, aValue) + switch pair { + | (ievA, IEvArray(b)) => Js.Array2.includes(b, ievA) + | _ => false + } +} + +let checkModifier = ( + key: string, + modifierArg: InternalExpressionValue.t, + aValue: InternalExpressionValue.t, +): bool => + switch key { + | "min" => isMin(modifierArg, aValue) + | "max" => isMax(modifierArg, aValue) + | "isMemberOf" => isMemberOf(modifierArg, aValue) + | _ => false + } + +let checkModifiers = ( + contracts: Belt.Map.String.t, + aValue: InternalExpressionValue.t, +): bool => { + contracts->Belt.Map.String.reduce(true, (acc, key, modifierArg) => + switch acc { + | true => checkModifier(key, modifierArg, aValue) + | _ => acc + } + ) +} diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_T.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_T.res new file mode 100644 index 00000000..511fe815 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_T.res @@ -0,0 +1,119 @@ +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +open InternalExpressionValue + +type rec iType = + | ItTypeIdentifier(string) + | ItModifiedType({modifiedType: iType, contracts: Belt.Map.String.t}) + | ItTypeOr({typeOr: array}) + | ItTypeFunction({inputs: array, output: iType}) + | ItTypeArray({element: iType}) + | ItTypeTuple({elements: array}) + | ItTypeRecord({properties: Belt.Map.String.t}) + +type t = iType +type typeErrorValue = TypeMismatch(t, InternalExpressionValue.t) + +let rec toString = (t: t): string => { + switch t { + | ItTypeIdentifier(s) => s + | ItModifiedType({modifiedType, contracts}) => + `${toString(modifiedType)}${contracts->Belt.Map.String.reduce("", (acc, k, v) => + Js.String2.concatMany(acc, ["<-", k, "(", InternalExpressionValue.toString(v), ")"]) + )}` + | ItTypeOr({typeOr}) => `(${Js.Array2.map(typeOr, toString)->Js.Array2.joinWith(" | ")})` + | ItTypeFunction({inputs, output}) => + `(${inputs->Js.Array2.map(toString)->Js.Array2.joinWith(" => ")} => ${toString(output)})` + | ItTypeArray({element}) => `[${toString(element)}]` + | ItTypeTuple({elements}) => `[${Js.Array2.map(elements, toString)->Js.Array2.joinWith(", ")}]` + | ItTypeRecord({properties}) => + `{${properties + ->Belt.Map.String.toArray + ->Js.Array2.map(((k, v)) => Js.String2.concatMany(k, [": ", toString(v)])) + ->Js.Array2.joinWith(", ")}}` + } +} + +let toStringResult = (rt: result) => + switch rt { + | Ok(t) => toString(t) + | Error(e) => ErrorValue.errorToString(e) + } + +let rec fromTypeMap = typeMap => { + let default = IEvString("") + let evTypeTag: InternalExpressionValue.t = Belt.Map.String.getWithDefault( + typeMap, + "typeTag", + default, + ) + let evTypeIdentifier: InternalExpressionValue.t = Belt.Map.String.getWithDefault( + typeMap, + "typeIdentifier", + default, + ) + let evTypeOr: InternalExpressionValue.t = Belt.Map.String.getWithDefault( + typeMap, + "typeOr", + default, + ) + let evInputs: InternalExpressionValue.t = Belt.Map.String.getWithDefault( + typeMap, + "inputs", + default, + ) + let evOutput: InternalExpressionValue.t = Belt.Map.String.getWithDefault( + typeMap, + "output", + default, + ) + let evElement: InternalExpressionValue.t = Belt.Map.String.getWithDefault( + typeMap, + "element", + default, + ) + let evElements: InternalExpressionValue.t = Belt.Map.String.getWithDefault( + typeMap, + "elements", + default, + ) + let evProperties: InternalExpressionValue.t = Belt.Map.String.getWithDefault( + typeMap, + "properties", + default, + ) + + let contracts = + typeMap->Belt.Map.String.keep((k, _v) => ["min", "max", "memberOf"]->Js.Array2.includes(k)) + + let makeIt = switch evTypeTag { + | IEvString("typeIdentifier") => fromIEvValue(evTypeIdentifier) + | IEvString("typeOr") => ItTypeOr({typeOr: fromIEvArray(evTypeOr)}) + | IEvString("typeFunction") => + ItTypeFunction({inputs: fromIEvArray(evInputs), output: fromIEvValue(evOutput)}) + | IEvString("typeArray") => ItTypeArray({element: fromIEvValue(evElement)}) + | IEvString("typeTuple") => ItTypeTuple({elements: fromIEvArray(evElements)}) + | IEvString("typeRecord") => ItTypeRecord({properties: fromIEvRecord(evProperties)}) + | _ => raise(Reducer_Exception.ImpossibleException("Reducer_Type_T-evTypeTag")) + } + + Belt.Map.String.isEmpty(contracts) + ? makeIt + : ItModifiedType({modifiedType: makeIt, contracts: contracts}) +} + +and fromIEvValue = (ievValue: InternalExpressionValue.t): iType => + switch ievValue { + | IEvTypeIdentifier(typeIdentifier) => ItTypeIdentifier({typeIdentifier}) + | IEvType(typeMap) => fromTypeMap(typeMap) + | _ => raise(Reducer_Exception.ImpossibleException("Reducer_Type_T-ievValue")) + } +and fromIEvArray = (ievArray: InternalExpressionValue.t) => + switch ievArray { + | IEvArray(array) => array->Belt.Array.map(fromIEvValue) + | _ => raise(Reducer_Exception.ImpossibleException("Reducer_Type_T-ievArray")) + } +and fromIEvRecord = (ievRecord: InternalExpressionValue.t) => + switch ievRecord { + | IEvRecord(record) => record->Belt.Map.String.map(fromIEvValue) + | _ => raise(Reducer_Exception.ImpossibleException("Reducer_Type_T-ievRecord")) + } diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeBuilder.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeBuilder.res new file mode 100644 index 00000000..d3906a38 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeBuilder.res @@ -0,0 +1,80 @@ +open ReducerInterface_InternalExpressionValue + +let typeModifier_memberOf = (aType, anArray) => { + let newRecord = Belt.Map.String.fromArray([ + ("typeTag", IEvString("typeIdentifier")), + ("typeIdentifier", aType), + ]) + newRecord->Belt.Map.String.set("memberOf", anArray)->IEvType->Ok +} + +let typeModifier_memberOf_update = (aRecord, anArray) => { + aRecord->Belt.Map.String.set("memberOf", anArray)->IEvType->Ok +} + +let typeModifier_min = (aType, value) => { + let newRecord = Belt.Map.String.fromArray([ + ("typeTag", IEvString("typeIdentifier")), + ("typeIdentifier", aType), + ]) + newRecord->Belt.Map.String.set("min", value)->IEvType->Ok +} + +let typeModifier_min_update = (aRecord, value) => { + aRecord->Belt.Map.String.set("min", value)->IEvType->Ok +} + +let typeModifier_max = (aType, value) => { + let newRecord = Belt.Map.String.fromArray([ + ("typeTag", IEvString("typeIdentifier")), + ("typeIdentifier", aType), + ]) + newRecord->Belt.Map.String.set("max", value)->IEvType->Ok +} + +let typeModifier_max_update = (aRecord, value) => + aRecord->Belt.Map.String.set("max", value)->IEvType->Ok + +let typeModifier_opaque_update = aRecord => + aRecord->Belt.Map.String.set("opaque", IEvBool(true))->IEvType->Ok + +let typeOr = evArray => { + let newRecord = Belt.Map.String.fromArray([("typeTag", IEvString("typeOr")), ("typeOr", evArray)]) + newRecord->IEvType->Ok +} + +let typeFunction = anArray => { + let output = Belt.Array.getUnsafe(anArray, Js.Array2.length(anArray) - 1) + let inputs = Js.Array2.slice(anArray, ~start=0, ~end_=-1) + let newRecord = Belt.Map.String.fromArray([ + ("typeTag", IEvString("typeFunction")), + ("inputs", IEvArray(inputs)), + ("output", output), + ]) + newRecord->IEvType->Ok +} + +let typeArray = element => { + let newRecord = Belt.Map.String.fromArray([ + ("typeTag", IEvString("typeArray")), + ("element", element), + ]) + newRecord->IEvType->Ok +} + +let typeTuple = anArray => { + let newRecord = Belt.Map.String.fromArray([ + ("typeTag", IEvString("typeTuple")), + ("elements", IEvArray(anArray)), + ]) + newRecord->IEvType->Ok +} + +let typeRecord = propertyMap => { + let newProperties = propertyMap->IEvRecord + let newRecord = Belt.Map.String.fromArray([ + ("typeTag", IEvString("typeRecord")), + ("properties", newProperties), + ]) + newRecord->IEvType->Ok +} diff --git a/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeChecker.res b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeChecker.res new file mode 100644 index 00000000..e4336df5 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/Reducer/Reducer_Type/Reducer_Type_TypeChecker.res @@ -0,0 +1,168 @@ +module ExpressionT = Reducer_Expression_T +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module T = Reducer_Type_T +module TypeContracts = Reducer_Type_Contracts +open InternalExpressionValue + +let rec isITypeOf = (anIType: T.iType, aValue): result => { + let caseTypeIdentifier = (anUpperTypeName, aValue) => { + let aTypeName = anUpperTypeName->Js.String2.toLowerCase + let valueTypeName = aValue->valueToValueType->valueTypeToString->Js.String2.toLowerCase + switch aTypeName == valueTypeName { + | true => Ok(true) + | false => T.TypeMismatch(anIType, aValue)->Error + } + } + + let caseRecord = (anIType, propertyMap: Belt.Map.String.t, evValue) => + switch evValue { + | IEvRecord(aRecord) => + if ( + Js.Array2.length(propertyMap->Belt.Map.String.keysToArray) == + Js.Array2.length(aRecord->Belt.Map.String.keysToArray) + ) { + Belt.Map.String.reduce(propertyMap, Ok(true), (acc, property, propertyType) => { + Belt.Result.flatMap(acc, _ => + switch Belt.Map.String.get(aRecord, property) { + | Some(propertyValue) => isITypeOf(propertyType, propertyValue) + | None => T.TypeMismatch(anIType, evValue)->Error + } + ) + }) + } else { + T.TypeMismatch(anIType, evValue)->Error + } + + | _ => T.TypeMismatch(anIType, evValue)->Error + } + + let caseArray = (anIType, elementType, evValue) => + switch evValue { + | IEvArray(anArray) => + Belt.Array.reduce(anArray, Ok(true), (acc, element) => + Belt.Result.flatMap(acc, _ => + switch isITypeOf(elementType, element) { + | Ok(_) => Ok(true) + | Error(error) => error->Error + } + ) + ) + | _ => T.TypeMismatch(anIType, evValue)->Error + } + + let caseTuple = (anIType, elementTypes, evValue) => + switch evValue { + | IEvArray(anArray) => + if Js.Array2.length(elementTypes) == Js.Array2.length(anArray) { + let zipped = Belt.Array.zip(elementTypes, anArray) + Belt.Array.reduce(zipped, Ok(true), (acc, (elementType, element)) => + switch acc { + | Ok(_) => + switch isITypeOf(elementType, element) { + | Ok(_) => acc + | Error(error) => Error(error) + } + | _ => acc + } + ) + } else { + T.TypeMismatch(anIType, evValue)->Error + } + | _ => T.TypeMismatch(anIType, evValue)->Error + } + + let caseOr = (anIType, anITypeArray, evValue) => + switch Belt.Array.reduce(anITypeArray, Ok(false), (acc, anIType) => + Belt.Result.flatMap(acc, _ => + switch acc { + | Ok(false) => + switch isITypeOf(anIType, evValue) { + | Ok(_) => Ok(true) + | Error(_) => acc + } + | _ => acc + } + ) + ) { + | Ok(true) => Ok(true) + | Ok(false) => T.TypeMismatch(anIType, evValue)->Error + | Error(error) => Error(error) + } + + let caseModifiedType = ( + anIType: T.iType, + modifiedType: T.iType, + contracts: Belt.Map.String.t, + aValue: InternalExpressionValue.t, + ) => { + isITypeOf(modifiedType, aValue)->Belt.Result.flatMap(_result => { + if TypeContracts.checkModifiers(contracts, aValue) { + Ok(true) + } else { + T.TypeMismatch(anIType, aValue)->Error + } + }) + } + + switch anIType { + | ItTypeIdentifier(name) => caseTypeIdentifier(name, aValue) + | ItModifiedType({modifiedType, contracts}) => + caseModifiedType(anIType, modifiedType, contracts, aValue) //{modifiedType: iType, contracts: Belt.Map.String.t} + | ItTypeOr({typeOr}) => caseOr(anIType, typeOr, aValue) + | ItTypeFunction(_) => + raise( + Reducer_Exception.ImpossibleException( + "Reducer_TypeChecker-functions are without a type at the moment", + ), + ) + | ItTypeArray({element}) => caseArray(anIType, element, aValue) + | ItTypeTuple({elements}) => caseTuple(anIType, elements, aValue) + | ItTypeRecord({properties}) => caseRecord(anIType, properties, aValue) + } +} + +let isTypeOf = ( + typeExpressionSourceCode: string, + aValue: InternalExpressionValue.t, + reducerFn: ExpressionT.reducerFn, +): result => { + switch typeExpressionSourceCode->Reducer_Type_Compile.fromTypeExpression(reducerFn) { + | Ok(anIType) => + switch isITypeOf(anIType, aValue) { + | Ok(_) => Ok(aValue) + | Error(T.TypeMismatch(anIType, evValue)) => + Error( + ErrorValue.REExpectedType(anIType->T.toString, evValue->InternalExpressionValue.toString), + ) + } + | Error(error) => Error(error) // Directly propagating - err => err - causes type mismatch + } +} + +let checkITypeArguments = (anIType: T.iType, args: array): result< + bool, + T.typeErrorValue, +> => { + switch anIType { + | T.ItTypeFunction({inputs}) => isITypeOf(T.ItTypeTuple({elements: inputs}), args->IEvArray) + | _ => T.TypeMismatch(anIType, args->IEvArray)->Error + } +} + +let checkArguments = ( + typeExpressionSourceCode: string, + args: array, + reducerFn: ExpressionT.reducerFn, +): result => { + switch typeExpressionSourceCode->Reducer_Type_Compile.fromTypeExpression(reducerFn) { + | Ok(anIType) => + switch checkITypeArguments(anIType, args) { + | Ok(_) => Ok(args->IEvArray) + | Error(T.TypeMismatch(anIType, evValue)) => + Error( + ErrorValue.REExpectedType(anIType->T.toString, evValue->InternalExpressionValue.toString), + ) + } + | Error(error) => Error(error) // Directly propagating - err => err - causes type mismatch + } +} diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface.res index 9c87f57e..ef27130b 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface.res @@ -1,2 +1,4 @@ -module ExpressionValue = ReducerInterface_ExpressionValue +module ExternalExpressionValue = ReducerInterface_ExternalExpressionValue module ExternalLibrary = ReducerInterface_ExternalLibrary +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +module StdLib = ReducerInterface_StdLib diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Date.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Date.res index 02c3affc..3396d0f3 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Date.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Date.res @@ -1,27 +1,27 @@ -module EV = ReducerInterface_ExpressionValue -type expressionValue = EV.expressionValue +module IEV = ReducerInterface_InternalExpressionValue +type internalExpressionValue = IEV.t -let dispatch = (call: EV.functionCall, _: DistributionOperation.env): option< - result, +let dispatch = (call: IEV.functionCall, _: GenericDist.env): option< + result, > => { switch call { - | ("toString", [EvDate(t)]) => EV.EvString(DateTime.Date.toString(t))->Ok->Some - | ("makeDateFromYear", [EvNumber(year)]) => + | ("toString", [IEvDate(t)]) => IEV.IEvString(DateTime.Date.toString(t))->Ok->Some + | ("makeDateFromYear", [IEvNumber(year)]) => switch DateTime.Date.makeFromYear(year) { - | Ok(t) => EV.EvDate(t)->Ok->Some + | Ok(t) => IEV.IEvDate(t)->Ok->Some | Error(e) => Reducer_ErrorValue.RETodo(e)->Error->Some } - | ("dateFromNumber", [EvNumber(f)]) => EV.EvDate(DateTime.Date.fromFloat(f))->Ok->Some - | ("toNumber", [EvDate(f)]) => EV.EvNumber(DateTime.Date.toFloat(f))->Ok->Some - | ("subtract", [EvDate(d1), EvDate(d2)]) => + | ("dateFromNumber", [IEvNumber(f)]) => IEV.IEvDate(DateTime.Date.fromFloat(f))->Ok->Some + | ("toNumber", [IEvDate(f)]) => IEV.IEvNumber(DateTime.Date.toFloat(f))->Ok->Some + | ("subtract", [IEvDate(d1), IEvDate(d2)]) => switch DateTime.Date.subtract(d1, d2) { - | Ok(d) => EV.EvTimeDuration(d)->Ok + | Ok(d) => IEV.IEvTimeDuration(d)->Ok | Error(e) => Error(RETodo(e)) }->Some - | ("subtract", [EvDate(d1), EvTimeDuration(d2)]) => - EV.EvDate(DateTime.Date.subtractDuration(d1, d2))->Ok->Some - | ("add", [EvDate(d1), EvTimeDuration(d2)]) => - EV.EvDate(DateTime.Date.addDuration(d1, d2))->Ok->Some + | ("subtract", [IEvDate(d1), IEvTimeDuration(d2)]) => + IEV.IEvDate(DateTime.Date.subtractDuration(d1, d2))->Ok->Some + | ("add", [IEvDate(d1), IEvTimeDuration(d2)]) => + IEV.IEvDate(DateTime.Date.addDuration(d1, d2))->Ok->Some | _ => None } } diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Duration.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Duration.res index b11eda89..f9e06de4 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Duration.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Duration.res @@ -1,33 +1,36 @@ -module EV = ReducerInterface_ExpressionValue -type expressionValue = EV.expressionValue +module IEV = ReducerInterface_InternalExpressionValue +type internalExpressionValue = IEV.t -let dispatch = (call: EV.functionCall, _: DistributionOperation.env): option< - result, +let dispatch = (call: IEV.functionCall, _: GenericDist.env): option< + result, > => { switch call { - | ("toString", [EvTimeDuration(t)]) => EV.EvString(DateTime.Duration.toString(t))->Ok->Some - | ("minutes", [EvNumber(f)]) => EV.EvTimeDuration(DateTime.Duration.fromMinutes(f))->Ok->Some - | ("fromUnit_minutes", [EvNumber(f)]) => - EV.EvTimeDuration(DateTime.Duration.fromMinutes(f))->Ok->Some - | ("hours", [EvNumber(f)]) => EV.EvTimeDuration(DateTime.Duration.fromHours(f))->Ok->Some - | ("fromUnit_hours", [EvNumber(f)]) => EV.EvTimeDuration(DateTime.Duration.fromHours(f))->Ok->Some - | ("days", [EvNumber(f)]) => EV.EvTimeDuration(DateTime.Duration.fromDays(f))->Ok->Some - | ("fromUnit_days", [EvNumber(f)]) => EV.EvTimeDuration(DateTime.Duration.fromDays(f))->Ok->Some - | ("years", [EvNumber(f)]) => EV.EvTimeDuration(DateTime.Duration.fromYears(f))->Ok->Some - | ("fromUnit_years", [EvNumber(f)]) => EV.EvTimeDuration(DateTime.Duration.fromYears(f))->Ok->Some - | ("toHours", [EvTimeDuration(f)]) => EV.EvNumber(DateTime.Duration.toHours(f))->Ok->Some - | ("toMinutes", [EvTimeDuration(f)]) => EV.EvNumber(DateTime.Duration.toMinutes(f))->Ok->Some - | ("toDays", [EvTimeDuration(f)]) => EV.EvNumber(DateTime.Duration.toDays(f))->Ok->Some - | ("toYears", [EvTimeDuration(f)]) => EV.EvNumber(DateTime.Duration.toYears(f))->Ok->Some - | ("add", [EvTimeDuration(d1), EvTimeDuration(d2)]) => - EV.EvTimeDuration(DateTime.Duration.add(d1, d2))->Ok->Some - | ("subtract", [EvTimeDuration(d1), EvTimeDuration(d2)]) => - EV.EvTimeDuration(DateTime.Duration.subtract(d1, d2))->Ok->Some - | ("multiply", [EvTimeDuration(d1), EvNumber(d2)]) => - EV.EvTimeDuration(DateTime.Duration.multiply(d1, d2))->Ok->Some - | ("divide", [EvTimeDuration(d1), EvNumber(d2)]) => - EV.EvTimeDuration(DateTime.Duration.divide(d1, d2))->Ok->Some - | ("divide", [EvTimeDuration(d1), EvTimeDuration(d2)]) => EV.EvNumber(d1 /. d2)->Ok->Some + | ("toString", [IEvTimeDuration(t)]) => IEV.IEvString(DateTime.Duration.toString(t))->Ok->Some + | ("minutes", [IEvNumber(f)]) => IEV.IEvTimeDuration(DateTime.Duration.fromMinutes(f))->Ok->Some + | ("fromUnit_minutes", [IEvNumber(f)]) => + IEV.IEvTimeDuration(DateTime.Duration.fromMinutes(f))->Ok->Some + | ("hours", [IEvNumber(f)]) => IEV.IEvTimeDuration(DateTime.Duration.fromHours(f))->Ok->Some + | ("fromUnit_hours", [IEvNumber(f)]) => + IEV.IEvTimeDuration(DateTime.Duration.fromHours(f))->Ok->Some + | ("days", [IEvNumber(f)]) => IEV.IEvTimeDuration(DateTime.Duration.fromDays(f))->Ok->Some + | ("fromUnit_days", [IEvNumber(f)]) => + IEV.IEvTimeDuration(DateTime.Duration.fromDays(f))->Ok->Some + | ("years", [IEvNumber(f)]) => IEV.IEvTimeDuration(DateTime.Duration.fromYears(f))->Ok->Some + | ("fromUnit_years", [IEvNumber(f)]) => + IEV.IEvTimeDuration(DateTime.Duration.fromYears(f))->Ok->Some + | ("toHours", [IEvTimeDuration(f)]) => IEV.IEvNumber(DateTime.Duration.toHours(f))->Ok->Some + | ("toMinutes", [IEvTimeDuration(f)]) => IEV.IEvNumber(DateTime.Duration.toMinutes(f))->Ok->Some + | ("toDays", [IEvTimeDuration(f)]) => IEV.IEvNumber(DateTime.Duration.toDays(f))->Ok->Some + | ("toYears", [IEvTimeDuration(f)]) => IEV.IEvNumber(DateTime.Duration.toYears(f))->Ok->Some + | ("add", [IEvTimeDuration(d1), IEvTimeDuration(d2)]) => + IEV.IEvTimeDuration(DateTime.Duration.add(d1, d2))->Ok->Some + | ("subtract", [IEvTimeDuration(d1), IEvTimeDuration(d2)]) => + IEV.IEvTimeDuration(DateTime.Duration.subtract(d1, d2))->Ok->Some + | ("multiply", [IEvTimeDuration(d1), IEvNumber(d2)]) => + IEV.IEvTimeDuration(DateTime.Duration.multiply(d1, d2))->Ok->Some + | ("divide", [IEvTimeDuration(d1), IEvNumber(d2)]) => + IEV.IEvTimeDuration(DateTime.Duration.divide(d1, d2))->Ok->Some + | ("divide", [IEvTimeDuration(d1), IEvTimeDuration(d2)]) => IEV.IEvNumber(d1 /. d2)->Ok->Some | _ => None } } diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExpressionValue.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExpressionValue.res deleted file mode 100644 index 1313207a..00000000 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExpressionValue.res +++ /dev/null @@ -1,187 +0,0 @@ -/* - Irreducible values. Reducer does not know about those. Only used for external calls - This is a configuration to to make external calls of those types -*/ -module Extra_Array = Reducer_Extra_Array -module ErrorValue = Reducer_ErrorValue -@genType.opaque -type internalCode = Object - -@genType -type rec expressionValue = - | EvArray(array) - | EvArrayString(array) - | EvBool(bool) - | EvCall(string) // External function call - | EvDistribution(DistributionTypes.genericDist) - | EvLambda(lambdaValue) - | EvNumber(float) - | EvRecord(record) - | EvString(string) - | EvSymbol(string) - | EvDate(Js.Date.t) - | EvTimeDuration(float) - | EvDeclaration(lambdaDeclaration) - | EvTypeIdentifier(string) - | EvModule(record) -and record = Js.Dict.t -and externalBindings = record -and lambdaValue = { - parameters: array, - context: externalBindings, - body: internalCode, -} -and lambdaDeclaration = Declaration.declaration - -type functionCall = (string, array) - -let rec toString = aValue => - switch aValue { - | EvArray(anArray) => { - let args = anArray->Js.Array2.map(each => toString(each))->Js.Array2.toString - `[${args}]` - } - | EvArrayString(anArray) => { - let args = anArray->Js.Array2.toString - `[${args}]` - } - | EvBool(aBool) => Js.String.make(aBool) - | EvCall(fName) => `:${fName}` - | EvLambda(lambdaValue) => `lambda(${Js.Array2.toString(lambdaValue.parameters)}=>internal code)` - | EvNumber(aNumber) => Js.String.make(aNumber) - | EvString(aString) => `'${aString}'` - | EvSymbol(aString) => `:${aString}` - | EvRecord(aRecord) => aRecord->toStringRecord - | EvDistribution(dist) => GenericDist.toString(dist) - | EvDate(date) => DateTime.Date.toString(date) - | EvTimeDuration(t) => DateTime.Duration.toString(t) - | EvDeclaration(d) => Declaration.toString(d, r => toString(EvLambda(r))) - | EvTypeIdentifier(id) => `#${id}` - | EvModule(m) => `@${m->toStringRecord}` - } -and toStringRecord = aRecord => { - let pairs = - aRecord - ->Js.Dict.entries - ->Js.Array2.map(((eachKey, eachValue)) => `${eachKey}: ${toString(eachValue)}`) - ->Js.Array2.toString - `{${pairs}}` -} - -let toStringWithType = aValue => - switch aValue { - | EvArray(_) => `Array::${toString(aValue)}` - | EvArrayString(_) => `ArrayString::${toString(aValue)}` - | EvBool(_) => `Bool::${toString(aValue)}` - | EvCall(_) => `Call::${toString(aValue)}` - | EvDistribution(_) => `Distribution::${toString(aValue)}` - | EvLambda(_) => `Lambda::${toString(aValue)}` - | EvNumber(_) => `Number::${toString(aValue)}` - | EvRecord(_) => `Record::${toString(aValue)}` - | EvString(_) => `String::${toString(aValue)}` - | EvSymbol(_) => `Symbol::${toString(aValue)}` - | EvDate(_) => `Date::${toString(aValue)}` - | EvTimeDuration(_) => `Date::${toString(aValue)}` - | EvDeclaration(_) => `Declaration::${toString(aValue)}` - | EvTypeIdentifier(_) => `TypeIdentifier::${toString(aValue)}` - | EvModule(_) => `Module::${toString(aValue)}` - } - -let argsToString = (args: array): string => { - args->Js.Array2.map(arg => arg->toString)->Js.Array2.toString -} - -let toStringFunctionCall = ((fn, args)): string => `${fn}(${argsToString(args)})` - -let toStringResult = x => - switch x { - | Ok(a) => `Ok(${toString(a)})` - | Error(m) => `Error(${ErrorValue.errorToString(m)})` - } - -let toStringResultOkless = (codeResult: result): string => - switch codeResult { - | Ok(a) => toString(a) - | Error(m) => `Error(${ErrorValue.errorToString(m)})` - } - -let toStringResultRecord = x => - switch x { - | Ok(a) => `Ok(${toStringRecord(a)})` - | Error(m) => `Error(${ErrorValue.errorToString(m)})` - } - -@genType -type environment = DistributionOperation.env - -@genType -let defaultEnvironment: environment = DistributionOperation.defaultEnv - -type expressionValueType = - | EvtArray - | EvtArrayString - | EvtBool - | EvtCall - | EvtDistribution - | EvtLambda - | EvtNumber - | EvtRecord - | EvtString - | EvtSymbol - | EvtDate - | EvtTimeDuration - | EvtDeclaration - | EvtTypeIdentifier - | EvtModule - -type functionCallSignature = CallSignature(string, array) -type functionDefinitionSignature = - FunctionDefinitionSignature(functionCallSignature, expressionValueType) - -let valueToValueType = value => - switch value { - | EvArray(_) => EvtArray - | EvArrayString(_) => EvtArray - | EvBool(_) => EvtBool - | EvCall(_) => EvtCall - | EvDistribution(_) => EvtDistribution - | EvLambda(_) => EvtLambda - | EvNumber(_) => EvtNumber - | EvRecord(_) => EvtRecord - | EvString(_) => EvtArray - | EvSymbol(_) => EvtSymbol - | EvDate(_) => EvtDate - | EvTimeDuration(_) => EvtTimeDuration - | EvDeclaration(_) => EvtDeclaration - | EvTypeIdentifier(_) => EvtTypeIdentifier - | EvModule(_) => EvtModule - } - -let functionCallToCallSignature = (functionCall: functionCall): functionCallSignature => { - let (fn, args) = functionCall - CallSignature(fn, args->Js.Array2.map(valueToValueType)) -} - -let valueTypeToString = (valueType: expressionValueType): string => - switch valueType { - | EvtArray => `Array` - | EvtArrayString => `ArrayString` - | EvtBool => `Bool` - | EvtCall => `Call` - | EvtDistribution => `Distribution` - | EvtLambda => `Lambda` - | EvtNumber => `Number` - | EvtRecord => `Record` - | EvtString => `String` - | EvtSymbol => `Symbol` - | EvtDate => `Date` - | EvtTimeDuration => `Duration` - | EvtDeclaration => `Declaration` - | EvtTypeIdentifier => `TypeIdentifier` - | EvtModule => `Module` - } - -let functionCallSignatureToString = (functionCallSignature: functionCallSignature): string => { - let CallSignature(fn, args) = functionCallSignature - `${fn}(${args->Js.Array2.map(valueTypeToString)->Js.Array2.toString})` -} diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalExpressionValue.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalExpressionValue.res new file mode 100644 index 00000000..a4d6e713 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalExpressionValue.res @@ -0,0 +1,94 @@ +/* + Irreducible values. Reducer does not know about those. Only used for external calls + This is a configuration to to make external calls of those types +*/ +module Extra_Array = Reducer_Extra_Array +module ErrorValue = Reducer_ErrorValue +@genType.opaque +type internalCode = Object + +@genType +type rec externalExpressionValue = + | EvArray(array) + | EvArrayString(array) + | EvBool(bool) + | EvCall(string) // External function call + | EvDistribution(DistributionTypes.genericDist) + | EvLambda(lambdaValue) + | EvNumber(float) + | EvRecord(record) + | EvString(string) + | EvSymbol(string) + | EvDate(Js.Date.t) + | EvTimeDuration(float) + | EvDeclaration(lambdaDeclaration) + | EvTypeIdentifier(string) + | EvModule(record) + | EvType(record) + | EvVoid +and record = Js.Dict.t +and externalBindings = record +and lambdaValue = { + parameters: array, + context: externalBindings, + body: internalCode, +} +and lambdaDeclaration = Declaration.declaration + +@genType +type t = externalExpressionValue + +type functionCall = (string, array) + +let rec toString = aValue => + switch aValue { + | EvArray(anArray) => { + let args = anArray->Js.Array2.map(each => toString(each))->Js.Array2.toString + `[${args}]` + } + | EvArrayString(anArray) => { + let args = anArray->Js.Array2.toString + `[${args}]` + } + | EvBool(aBool) => Js.String.make(aBool) + | EvCall(fName) => `:${fName}` + | EvDate(date) => DateTime.Date.toString(date) + | EvDeclaration(d) => Declaration.toString(d, r => toString(EvLambda(r))) + | EvDistribution(dist) => GenericDist.toString(dist) + | EvLambda(lambdaValue) => `lambda(${Js.Array2.toString(lambdaValue.parameters)}=>internal code)` + | EvModule(m) => `@${m->toStringRecord}` + | EvNumber(aNumber) => Js.String.make(aNumber) + | EvRecord(aRecord) => aRecord->toStringRecord + | EvString(aString) => `'${aString}'` + | EvSymbol(aString) => `:${aString}` + | EvTimeDuration(t) => DateTime.Duration.toString(t) + | EvType(t) => `type${t->toStringRecord}` + | EvTypeIdentifier(id) => `#${id}` + | EvVoid => `()` + } +and toStringRecord = aRecord => { + let pairs = + aRecord + ->Js.Dict.entries + ->Js.Array2.map(((eachKey, eachValue)) => `${eachKey}: ${toString(eachValue)}`) + ->Js.Array2.toString + `{${pairs}}` +} + +let argsToString = (args: array): string => { + args->Js.Array2.map(arg => arg->toString)->Js.Array2.toString +} + +let toStringFunctionCall = ((fn, args)): string => `${fn}(${argsToString(args)})` + +let toStringResult = x => + switch x { + | Ok(a) => `Ok(${toString(a)})` + | Error(m) => `Error(${ErrorValue.errorToString(m)})` + } + +@genType +type environment = GenericDist.env + +@genType +let defaultEnvironment: environment = DistributionOperation.defaultEnv diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalLibrary.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalLibrary.res index d045040a..fc0a2821 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalLibrary.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_ExternalLibrary.res @@ -1,40 +1,24 @@ -module ExpressionValue = ReducerInterface_ExpressionValue - -type expressionValue = ExpressionValue.expressionValue - -// module Sample = { -// // In real life real libraries should be somewhere else -// /* -// For an example of mapping polymorphic custom functions. To be deleted after real integration -// */ -// let customAdd = (a: float, b: float): float => {a +. b} -// } +module InternalExpressionValue = ReducerInterface_InternalExpressionValue +type internalExpressionValue = InternalExpressionValue.t /* Map external calls of Reducer */ - -// I expect that it's important to build this first, so it doesn't get recalculated for each tryRegistry() call. -let registry = FunctionRegistry_Library.registry - -let tryRegistry = ((fnName, args): ExpressionValue.functionCall, env) => { - FunctionRegistry_Core.Registry.matchAndRun(~registry, ~fnName, ~args, ~env)->E.O2.fmap( - E.R2.errMap(_, s => Reducer_ErrorValue.RETodo(s)), - ) -} - -let dispatch = (call: ExpressionValue.functionCall, environment, chain): result< - expressionValue, - 'e, -> => { +let dispatch = ( + call: InternalExpressionValue.functionCall, + environment, + reducer: Reducer_Expression_T.reducerFn, + chain, +): result => { E.A.O.firstSomeFn([ () => ReducerInterface_GenericDistribution.dispatch(call, environment), () => ReducerInterface_Date.dispatch(call, environment), () => ReducerInterface_Duration.dispatch(call, environment), () => ReducerInterface_Number.dispatch(call, environment), - () => tryRegistry(call, environment), - ])->E.O2.default(chain(call, environment)) + () => FunctionRegistry_Library.dispatch(call, environment, reducer), + ])->E.O2.default(chain(call, environment, reducer)) } + /* If your dispatch is too big you can divide it into smaller dispatches and pass the call so that it gets called finally. diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res index c0418df8..addd4388 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.res @@ -1,5 +1,5 @@ -module ExpressionValue = ReducerInterface_ExpressionValue -type expressionValue = ExpressionValue.expressionValue +module IEV = ReducerInterface_InternalExpressionValue +type internalExpressionValue = IEV.t module Helpers = { let arithmeticMap = r => @@ -18,85 +18,78 @@ module Helpers = { | _ => #Multiply } - let catchAndConvertTwoArgsToDists = (args: array): option<( + let catchAndConvertTwoArgsToDists = (args: array): option<( DistributionTypes.genericDist, DistributionTypes.genericDist, )> => switch args { - | [EvDistribution(a), EvDistribution(b)] => Some((a, b)) - | [EvNumber(a), EvDistribution(b)] => Some((GenericDist.fromFloat(a), b)) - | [EvDistribution(a), EvNumber(b)] => Some((a, GenericDist.fromFloat(b))) + | [IEvDistribution(a), IEvDistribution(b)] => Some((a, b)) + | [IEvNumber(a), IEvDistribution(b)] => Some((GenericDist.fromFloat(a), b)) + | [IEvDistribution(a), IEvNumber(b)] => Some((a, GenericDist.fromFloat(b))) | _ => None } let toFloatFn = ( fnCall: DistributionTypes.DistributionOperation.toFloat, dist: DistributionTypes.genericDist, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ) => { - FromDist(DistributionTypes.DistributionOperation.ToFloat(fnCall), dist) - ->DistributionOperation.run(~env) - ->Some + FromDist(#ToFloat(fnCall), dist)->DistributionOperation.run(~env)->Some } let toStringFn = ( fnCall: DistributionTypes.DistributionOperation.toString, dist: DistributionTypes.genericDist, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ) => { - FromDist(DistributionTypes.DistributionOperation.ToString(fnCall), dist) - ->DistributionOperation.run(~env) - ->Some + FromDist(#ToString(fnCall), dist)->DistributionOperation.run(~env)->Some } let toBoolFn = ( fnCall: DistributionTypes.DistributionOperation.toBool, dist: DistributionTypes.genericDist, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ) => { - FromDist(DistributionTypes.DistributionOperation.ToBool(fnCall), dist) - ->DistributionOperation.run(~env) - ->Some + FromDist(#ToBool(fnCall), dist)->DistributionOperation.run(~env)->Some } let toDistFn = ( fnCall: DistributionTypes.DistributionOperation.toDist, dist, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ) => { - FromDist(DistributionTypes.DistributionOperation.ToDist(fnCall), dist) - ->DistributionOperation.run(~env) - ->Some + FromDist(#ToDist(fnCall), dist)->DistributionOperation.run(~env)->Some } - let twoDiststoDistFn = (direction, arithmetic, dist1, dist2, ~env: DistributionOperation.env) => { + let twoDiststoDistFn = (direction, arithmetic, dist1, dist2, ~env: GenericDist.env) => { FromDist( - DistributionTypes.DistributionOperation.ToDistCombination( - direction, - arithmeticMap(arithmetic), - #Dist(dist2), - ), + #ToDistCombination(direction, arithmeticMap(arithmetic), #Dist(dist2)), dist1, )->DistributionOperation.run(~env) } - let parseNumber = (args: expressionValue): Belt.Result.t => + let parseNumber = (args: internalExpressionValue): Belt.Result.t => switch args { - | EvNumber(x) => Ok(x) + | IEvNumber(x) => Ok(x) | _ => Error("Not a number") } - let parseNumberArray = (ags: array): Belt.Result.t, string> => - E.A.fmap(parseNumber, ags) |> E.A.R.firstErrorOrOpen + let parseNumberArray = (ags: array): Belt.Result.t< + array, + string, + > => E.A.fmap(parseNumber, ags) |> E.A.R.firstErrorOrOpen - let parseDist = (args: expressionValue): Belt.Result.t => + let parseDist = (args: internalExpressionValue): Belt.Result.t< + DistributionTypes.genericDist, + string, + > => switch args { - | EvDistribution(x) => Ok(x) - | EvNumber(x) => Ok(GenericDist.fromFloat(x)) + | IEvDistribution(x) => Ok(x) + | IEvNumber(x) => Ok(GenericDist.fromFloat(x)) | _ => Error("Not a distribution") } - let parseDistributionArray = (ags: array): Belt.Result.t< + let parseDistributionArray = (ags: array): Belt.Result.t< array, string, > => E.A.fmap(parseDist, ags) |> E.A.R.firstErrorOrOpen @@ -104,7 +97,7 @@ module Helpers = { let mixtureWithGivenWeights = ( distributions: array, weights: array, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ): DistributionOperation.outputType => E.A.length(distributions) == E.A.length(weights) ? Mixture(Belt.Array.zip(distributions, weights))->DistributionOperation.run(~env) @@ -114,7 +107,7 @@ module Helpers = { let mixtureWithDefaultWeights = ( distributions: array, - ~env: DistributionOperation.env, + ~env: GenericDist.env, ): DistributionOperation.outputType => { let length = E.A.length(distributions) let weights = Belt.Array.make(length, 1.0 /. Belt.Int.toFloat(length)) @@ -122,18 +115,18 @@ module Helpers = { } let mixture = ( - args: array, - ~env: DistributionOperation.env, + args: array, + ~env: GenericDist.env, ): DistributionOperation.outputType => { let error = (err: string): DistributionOperation.outputType => err->DistributionTypes.ArgumentError->GenDistError switch args { - | [EvArray(distributions)] => + | [IEvArray(distributions)] => switch parseDistributionArray(distributions) { | Ok(distrs) => mixtureWithDefaultWeights(distrs, ~env) | Error(err) => error(err) } - | [EvArray(distributions), EvArray(weights)] => + | [IEvArray(distributions), IEvArray(weights)] => switch (parseDistributionArray(distributions), parseNumberArray(weights)) { | (Ok(distrs), Ok(wghts)) => mixtureWithGivenWeights(distrs, wghts, ~env) | (Error(err), Ok(_)) => error(err) @@ -142,7 +135,7 @@ module Helpers = { } | _ => switch E.A.last(args) { - | Some(EvArray(b)) => { + | Some(IEvArray(b)) => { let weights = parseNumberArray(b) let distributions = parseDistributionArray( Belt.Array.slice(args, ~offset=0, ~len=E.A.length(args) - 1), @@ -152,8 +145,8 @@ module Helpers = { | Error(err) => error(err) } } - | Some(EvNumber(_)) - | Some(EvDistribution(_)) => + | Some(IEvNumber(_)) + | Some(IEvDistribution(_)) => switch parseDistributionArray(args) { | Ok(distributions) => mixtureWithDefaultWeights(distributions, ~env) | Error(err) => error(err) @@ -162,20 +155,6 @@ module Helpers = { } } } - - let klDivergenceWithPrior = ( - prediction: DistributionTypes.genericDist, - answer: DistributionTypes.genericDist, - prior: DistributionTypes.genericDist, - env: DistributionOperation.env, - ) => { - let term1 = DistributionOperation.Constructors.klDivergence(~env, prediction, answer) - let term2 = DistributionOperation.Constructors.klDivergence(~env, prior, answer) - switch E.R.merge(term1, term2)->E.R2.fmap(((a, b)) => a -. b) { - | Ok(x) => x->DistributionOperation.Float->Some - | Error(_) => None - } - } } module SymbolicConstructors = { @@ -194,20 +173,19 @@ module SymbolicConstructors = { } } -let dispatchToGenericOutput = ( - call: ExpressionValue.functionCall, - env: DistributionOperation.env, -): option => { +let dispatchToGenericOutput = (call: IEV.functionCall, env: GenericDist.env): option< + DistributionOperation.outputType, +> => { let (fnName, args) = call switch (fnName, args) { - | ("triangular" as fnName, [EvNumber(f1), EvNumber(f2), EvNumber(f3)]) => + | ("triangular" as fnName, [IEvNumber(f1), IEvNumber(f2), IEvNumber(f3)]) => SymbolicConstructors.threeFloat(fnName) ->E.R.bind(r => r(f1, f2, f3)) ->SymbolicConstructors.symbolicResultToOutput - | ("sample", [EvDistribution(dist)]) => Helpers.toFloatFn(#Sample, dist, ~env) - | ("sampleN", [EvDistribution(dist), EvNumber(n)]) => + | ("sample", [IEvDistribution(dist)]) => Helpers.toFloatFn(#Sample, dist, ~env) + | ("sampleN", [IEvDistribution(dist), IEvNumber(n)]) => Some(FloatArray(GenericDist.sampleN(dist, Belt.Int.fromFloat(n)))) - | (("mean" | "stdev" | "variance" | "min" | "max" | "mode") as op, [EvDistribution(dist)]) => { + | (("mean" | "stdev" | "variance" | "min" | "max" | "mode") as op, [IEvDistribution(dist)]) => { let fn = switch op { | "mean" => #Mean | "stdev" => #Stdev @@ -219,13 +197,13 @@ let dispatchToGenericOutput = ( } Helpers.toFloatFn(fn, dist, ~env) } - | ("integralSum", [EvDistribution(dist)]) => Helpers.toFloatFn(#IntegralSum, dist, ~env) - | ("toString", [EvDistribution(dist)]) => Helpers.toStringFn(ToString, dist, ~env) - | ("sparkline", [EvDistribution(dist)]) => + | ("integralSum", [IEvDistribution(dist)]) => Helpers.toFloatFn(#IntegralSum, dist, ~env) + | ("toString", [IEvDistribution(dist)]) => Helpers.toStringFn(ToString, dist, ~env) + | ("sparkline", [IEvDistribution(dist)]) => Helpers.toStringFn(ToSparkline(MagicNumbers.Environment.sparklineLength), dist, ~env) - | ("sparkline", [EvDistribution(dist), EvNumber(n)]) => + | ("sparkline", [IEvDistribution(dist), IEvNumber(n)]) => Helpers.toStringFn(ToSparkline(Belt.Float.toInt(n)), dist, ~env) - | ("exp", [EvDistribution(a)]) => + | ("exp", [IEvDistribution(a)]) => // https://mathjs.org/docs/reference/functions/exp.html Helpers.twoDiststoDistFn( Algebraic(AsDefault), @@ -234,69 +212,36 @@ let dispatchToGenericOutput = ( a, ~env, )->Some - | ("normalize", [EvDistribution(dist)]) => Helpers.toDistFn(Normalize, dist, ~env) - | ("klDivergence", [EvDistribution(prediction), EvDistribution(answer)]) => - Some(DistributionOperation.run(FromDist(ToScore(KLDivergence(answer)), prediction), ~env)) - | ("klDivergence", [EvDistribution(prediction), EvDistribution(answer), EvDistribution(prior)]) => - Helpers.klDivergenceWithPrior(prediction, answer, prior, env) - | ( - "logScoreWithPointAnswer", - [EvDistribution(prediction), EvNumber(answer), EvDistribution(prior)], - ) - | ( - "logScoreWithPointAnswer", - [EvDistribution(prediction), EvDistribution(Symbolic(#Float(answer))), EvDistribution(prior)], - ) => - DistributionOperation.run( - FromDist(ToScore(LogScore(answer, prior->Some)), prediction), - ~env, - )->Some - | ("logScoreWithPointAnswer", [EvDistribution(prediction), EvNumber(answer)]) - | ( - "logScoreWithPointAnswer", - [EvDistribution(prediction), EvDistribution(Symbolic(#Float(answer)))], - ) => - DistributionOperation.run(FromDist(ToScore(LogScore(answer, None)), prediction), ~env)->Some - | ("isNormalized", [EvDistribution(dist)]) => Helpers.toBoolFn(IsNormalized, dist, ~env) - | ("toPointSet", [EvDistribution(dist)]) => Helpers.toDistFn(ToPointSet, dist, ~env) - | ("scaleLog", [EvDistribution(dist)]) => + | ("normalize", [IEvDistribution(dist)]) => Helpers.toDistFn(Normalize, dist, ~env) + | ("isNormalized", [IEvDistribution(dist)]) => Helpers.toBoolFn(IsNormalized, dist, ~env) + | ("toPointSet", [IEvDistribution(dist)]) => Helpers.toDistFn(ToPointSet, dist, ~env) + | ("scaleLog", [IEvDistribution(dist)]) => Helpers.toDistFn(Scale(#Logarithm, MagicNumbers.Math.e), dist, ~env) - | ("scaleLog10", [EvDistribution(dist)]) => Helpers.toDistFn(Scale(#Logarithm, 10.0), dist, ~env) - | ("scaleLog", [EvDistribution(dist), EvNumber(float)]) => + | ("scaleLog10", [IEvDistribution(dist)]) => Helpers.toDistFn(Scale(#Logarithm, 10.0), dist, ~env) + | ("scaleLog", [IEvDistribution(dist), IEvNumber(float)]) => Helpers.toDistFn(Scale(#Logarithm, float), dist, ~env) - | ("scaleLogWithThreshold", [EvDistribution(dist), EvNumber(base), EvNumber(eps)]) => + | ("scaleLogWithThreshold", [IEvDistribution(dist), IEvNumber(base), IEvNumber(eps)]) => Helpers.toDistFn(Scale(#LogarithmWithThreshold(eps), base), dist, ~env) - | ("scalePow", [EvDistribution(dist), EvNumber(float)]) => + | ("scaleMultiply", [IEvDistribution(dist), IEvNumber(float)]) => + Helpers.toDistFn(Scale(#Multiply, float), dist, ~env) + | ("scalePow", [IEvDistribution(dist), IEvNumber(float)]) => Helpers.toDistFn(Scale(#Power, float), dist, ~env) - | ("scaleExp", [EvDistribution(dist)]) => + | ("scaleExp", [IEvDistribution(dist)]) => Helpers.toDistFn(Scale(#Power, MagicNumbers.Math.e), dist, ~env) - | ("cdf", [EvDistribution(dist), EvNumber(float)]) => Helpers.toFloatFn(#Cdf(float), dist, ~env) - | ("pdf", [EvDistribution(dist), EvNumber(float)]) => Helpers.toFloatFn(#Pdf(float), dist, ~env) - | ("inv", [EvDistribution(dist), EvNumber(float)]) => Helpers.toFloatFn(#Inv(float), dist, ~env) - | ("quantile", [EvDistribution(dist), EvNumber(float)]) => + | ("cdf", [IEvDistribution(dist), IEvNumber(float)]) => Helpers.toFloatFn(#Cdf(float), dist, ~env) + | ("pdf", [IEvDistribution(dist), IEvNumber(float)]) => Helpers.toFloatFn(#Pdf(float), dist, ~env) + | ("inv", [IEvDistribution(dist), IEvNumber(float)]) => Helpers.toFloatFn(#Inv(float), dist, ~env) + | ("quantile", [IEvDistribution(dist), IEvNumber(float)]) => Helpers.toFloatFn(#Inv(float), dist, ~env) - | ("toSampleSet", [EvDistribution(dist), EvNumber(float)]) => - Helpers.toDistFn(ToSampleSet(Belt.Int.fromFloat(float)), dist, ~env) - | ("toSampleSet", [EvDistribution(dist)]) => - Helpers.toDistFn(ToSampleSet(env.sampleCount), dist, ~env) - | ("toList", [EvDistribution(SampleSet(dist))]) => Some(FloatArray(SampleSetDist.T.get(dist))) - | ("fromSamples", [EvArray(inputArray)]) => { - let _wrapInputErrors = x => SampleSetDist.NonNumericInput(x) - let parsedArray = Helpers.parseNumberArray(inputArray)->E.R2.errMap(_wrapInputErrors) - switch parsedArray { - | Ok(array) => DistributionOperation.run(FromSamples(array), ~env) - | Error(e) => GenDistError(SampleSetError(e)) - }->Some - } - | ("inspect", [EvDistribution(dist)]) => Helpers.toDistFn(Inspect, dist, ~env) - | ("truncateLeft", [EvDistribution(dist), EvNumber(float)]) => + | ("inspect", [IEvDistribution(dist)]) => Helpers.toDistFn(Inspect, dist, ~env) + | ("truncateLeft", [IEvDistribution(dist), IEvNumber(float)]) => Helpers.toDistFn(Truncate(Some(float), None), dist, ~env) - | ("truncateRight", [EvDistribution(dist), EvNumber(float)]) => + | ("truncateRight", [IEvDistribution(dist), IEvNumber(float)]) => Helpers.toDistFn(Truncate(None, Some(float)), dist, ~env) - | ("truncate", [EvDistribution(dist), EvNumber(float1), EvNumber(float2)]) => + | ("truncate", [IEvDistribution(dist), IEvNumber(float1), IEvNumber(float2)]) => Helpers.toDistFn(Truncate(Some(float1), Some(float2)), dist, ~env) | ("mx" | "mixture", args) => Helpers.mixture(args, ~env)->Some - | ("log", [EvDistribution(a)]) => + | ("log", [IEvDistribution(a)]) => Helpers.twoDiststoDistFn( Algebraic(AsDefault), "log", @@ -304,7 +249,7 @@ let dispatchToGenericOutput = ( GenericDist.fromFloat(MagicNumbers.Math.e), ~env, )->Some - | ("log10", [EvDistribution(a)]) => + | ("log10", [IEvDistribution(a)]) => Helpers.twoDiststoDistFn( Algebraic(AsDefault), "log", @@ -312,7 +257,7 @@ let dispatchToGenericOutput = ( GenericDist.fromFloat(10.0), ~env, )->Some - | ("unaryMinus", [EvDistribution(a)]) => + | ("unaryMinus", [IEvDistribution(a)]) => Helpers.twoDiststoDistFn( Algebraic(AsDefault), "multiply", @@ -335,7 +280,7 @@ let dispatchToGenericOutput = ( Helpers.catchAndConvertTwoArgsToDists(args)->E.O2.fmap(((fst, snd)) => Helpers.twoDiststoDistFn(Pointwise, arithmetic, fst, snd, ~env) ) - | ("dotExp", [EvDistribution(a)]) => + | ("dotExp", [IEvDistribution(a)]) => Helpers.twoDiststoDistFn( Pointwise, "dotPow", @@ -348,17 +293,18 @@ let dispatchToGenericOutput = ( } let genericOutputToReducerValue = (o: DistributionOperation.outputType): result< - expressionValue, + internalExpressionValue, Reducer_ErrorValue.errorValue, > => switch o { - | Dist(d) => Ok(ReducerInterface_ExpressionValue.EvDistribution(d)) - | Float(d) => Ok(EvNumber(d)) - | String(d) => Ok(EvString(d)) - | Bool(d) => Ok(EvBool(d)) - | FloatArray(d) => Ok(EvArray(d |> E.A.fmap(r => ReducerInterface_ExpressionValue.EvNumber(r)))) + | Dist(d) => Ok(ReducerInterface_InternalExpressionValue.IEvDistribution(d)) + | Float(d) => Ok(IEvNumber(d)) + | String(d) => Ok(IEvString(d)) + | Bool(d) => Ok(IEvBool(d)) + | FloatArray(d) => + Ok(IEvArray(d |> E.A.fmap(r => ReducerInterface_InternalExpressionValue.IEvNumber(r)))) | GenDistError(err) => Error(REDistributionError(err)) } -let dispatch = (call: ExpressionValue.functionCall, environment) => +let dispatch = (call: IEV.functionCall, environment) => dispatchToGenericOutput(call, environment)->E.O2.fmap(genericOutputToReducerValue) diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.resi b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.resi index 7f26a610..6cccdf17 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.resi +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_GenericDistribution.resi @@ -1,4 +1,4 @@ let dispatch: ( - ReducerInterface_ExpressionValue.functionCall, - ReducerInterface_ExpressionValue.environment, -) => option> + ReducerInterface_InternalExpressionValue.functionCall, + ReducerInterface_ExternalExpressionValue.environment, +) => option> diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_InternalExpressionValue.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_InternalExpressionValue.res new file mode 100644 index 00000000..3805d790 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_InternalExpressionValue.res @@ -0,0 +1,296 @@ +module ErrorValue = Reducer_ErrorValue +module ExternalExpressionValue = ReducerInterface_ExternalExpressionValue +module Extra_Array = Reducer_Extra_Array +type internalCode = ExternalExpressionValue.internalCode +type environment = ExternalExpressionValue.environment + +let defaultEnvironment = ExternalExpressionValue.defaultEnvironment + +type rec t = + | IEvArray(array) // FIXME: Convert to MapInt + | IEvArrayString(array) + | IEvBool(bool) + | IEvCall(string) // External function call + | IEvDate(Js.Date.t) + | IEvDeclaration(lambdaDeclaration) + | IEvDistribution(DistributionTypes.genericDist) + | IEvLambda(lambdaValue) + | IEvBindings(nameSpace) + | IEvNumber(float) + | IEvRecord(map) + | IEvString(string) + | IEvSymbol(string) + | IEvTimeDuration(float) + | IEvType(map) + | IEvTypeIdentifier(string) + | IEvVoid +and map = Belt.Map.String.t +and nameSpace = NameSpace(Belt.Map.String.t) +and lambdaValue = { + parameters: array, + context: nameSpace, + body: internalCode, +} +and lambdaDeclaration = Declaration.declaration + +type internalExpressionValue = t + +type functionCall = (string, array) + +let rec toString = aValue => + switch aValue { + | IEvArray(anArray) => { + let args = anArray->Js.Array2.map(each => toString(each))->Js.Array2.toString + `[${args}]` + } + | IEvArrayString(anArray) => { + let args = anArray->Js.Array2.toString + `[${args}]` + } + | IEvBool(aBool) => Js.String.make(aBool) + | IEvCall(fName) => `:${fName}` + | IEvDate(date) => DateTime.Date.toString(date) + | IEvDeclaration(d) => Declaration.toString(d, r => toString(IEvLambda(r))) + | IEvDistribution(dist) => GenericDist.toString(dist) + | IEvLambda(lambdaValue) => `lambda(${Js.Array2.toString(lambdaValue.parameters)}=>internal code)` + | IEvBindings(m) => `@${m->toStringNameSpace}` + | IEvNumber(aNumber) => Js.String.make(aNumber) + | IEvRecord(aMap) => aMap->toStringMap + | IEvString(aString) => `'${aString}'` + | IEvSymbol(aString) => `:${aString}` + | IEvType(aMap) => aMap->toStringMap + | IEvTimeDuration(t) => DateTime.Duration.toString(t) + | IEvTypeIdentifier(id) => `#${id}` + | IEvVoid => `()` + } +and toStringMap = aMap => { + let pairs = + aMap + ->Belt.Map.String.toArray + ->Js.Array2.map(((eachKey, eachValue)) => `${eachKey}: ${toString(eachValue)}`) + ->Js.Array2.toString + `{${pairs}}` +} +and toStringNameSpace = nameSpace => { + let NameSpace(container) = nameSpace + container->toStringMap +} + +let toStringWithType = aValue => + switch aValue { + | IEvArray(_) => `Array::${toString(aValue)}` + | IEvArrayString(_) => `ArrayString::${toString(aValue)}` + | IEvBool(_) => `Bool::${toString(aValue)}` + | IEvCall(_) => `Call::${toString(aValue)}` + | IEvDate(_) => `Date::${toString(aValue)}` + | IEvDeclaration(_) => `Declaration::${toString(aValue)}` + | IEvDistribution(_) => `Distribution::${toString(aValue)}` + | IEvLambda(_) => `Lambda::${toString(aValue)}` + | IEvBindings(_) => `Bindings::${toString(aValue)}` + | IEvNumber(_) => `Number::${toString(aValue)}` + | IEvRecord(_) => `Record::${toString(aValue)}` + | IEvString(_) => `String::${toString(aValue)}` + | IEvSymbol(_) => `Symbol::${toString(aValue)}` + | IEvTimeDuration(_) => `Date::${toString(aValue)}` + | IEvType(_) => `Type::${toString(aValue)}` + | IEvTypeIdentifier(_) => `TypeIdentifier::${toString(aValue)}` + | IEvVoid => `Void` + } + +let argsToString = (args: array): string => { + args->Js.Array2.map(arg => arg->toString)->Js.Array2.toString +} + +let toStringFunctionCall = ((fn, args)): string => `${fn}(${argsToString(args)})` + +let toStringResult = x => + switch x { + | Ok(a) => `Ok(${toString(a)})` + | Error(m) => `Error(${ErrorValue.errorToString(m)})` + } + +let toStringResultOkless = (codeResult: result): string => + switch codeResult { + | Ok(a) => toString(a) + | Error(m) => `Error(${ErrorValue.errorToString(m)})` + } + +let toStringResultRecord = x => + switch x { + | Ok(a) => `Ok(${ExternalExpressionValue.toStringRecord(a)})` + | Error(m) => `Error(${ErrorValue.errorToString(m)})` + } + +type internalExpressionValueType = + | EvtArray + | EvtArrayString + | EvtBool + | EvtCall + | EvtDate + | EvtDeclaration + | EvtDistribution + | EvtLambda + | EvtModule + | EvtNumber + | EvtRecord + | EvtString + | EvtSymbol + | EvtTimeDuration + | EvtType + | EvtTypeIdentifier + | EvtVoid + +type functionCallSignature = CallSignature(string, array) +type functionDefinitionSignature = + FunctionDefinitionSignature(functionCallSignature, internalExpressionValueType) + +let valueToValueType = value => + switch value { + | IEvArray(_) => EvtArray + | IEvArrayString(_) => EvtArrayString + | IEvBool(_) => EvtBool + | IEvCall(_) => EvtCall + | IEvDate(_) => EvtDate + | IEvDeclaration(_) => EvtDeclaration + | IEvDistribution(_) => EvtDistribution + | IEvLambda(_) => EvtLambda + | IEvBindings(_) => EvtModule + | IEvNumber(_) => EvtNumber + | IEvRecord(_) => EvtRecord + | IEvString(_) => EvtString + | IEvSymbol(_) => EvtSymbol + | IEvTimeDuration(_) => EvtTimeDuration + | IEvType(_) => EvtType + | IEvTypeIdentifier(_) => EvtTypeIdentifier + | IEvVoid => EvtVoid + } + +let externalValueToValueType = (value: ExternalExpressionValue.t) => + switch value { + | EvArray(_) => EvtArray + | EvArrayString(_) => EvtArrayString + | EvBool(_) => EvtBool + | EvCall(_) => EvtCall + | EvDate(_) => EvtDate + | EvDeclaration(_) => EvtDeclaration + | EvDistribution(_) => EvtDistribution + | EvLambda(_) => EvtLambda + | EvModule(_) => EvtModule + | EvNumber(_) => EvtNumber + | EvRecord(_) => EvtRecord + | EvString(_) => EvtString + | EvSymbol(_) => EvtSymbol + | EvTimeDuration(_) => EvtTimeDuration + | EvType(_) => EvtType + | EvTypeIdentifier(_) => EvtTypeIdentifier + | EvVoid => EvtVoid + } + +let functionCallToCallSignature = (functionCall: functionCall): functionCallSignature => { + let (fn, args) = functionCall + CallSignature(fn, args->Js.Array2.map(valueToValueType)) +} + +let valueTypeToString = (valueType: internalExpressionValueType): string => + switch valueType { + | EvtArray => `Array` + | EvtArrayString => `ArrayString` + | EvtBool => `Bool` + | EvtCall => `Call` + | EvtDate => `Date` + | EvtDeclaration => `Declaration` + | EvtDistribution => `Distribution` + | EvtLambda => `Lambda` + | EvtModule => `Module` + | EvtNumber => `Number` + | EvtRecord => `Record` + | EvtString => `String` + | EvtSymbol => `Symbol` + | EvtTimeDuration => `Duration` + | EvtType => `Type` + | EvtTypeIdentifier => `TypeIdentifier` + | EvtVoid => `Void` + } + +let functionCallSignatureToString = (functionCallSignature: functionCallSignature): string => { + let CallSignature(fn, args) = functionCallSignature + `${fn}(${args->Js.Array2.map(valueTypeToString)->Js.Array2.toString})` +} + +let rec toExternal = (iev: t): ExternalExpressionValue.t => { + switch iev { + | IEvArray(v) => v->Belt.Array.map(e => toExternal(e))->EvArray + | IEvArrayString(v) => EvArrayString(v) + | IEvBool(v) => EvBool(v) + | IEvCall(v) => EvCall(v) + | IEvDeclaration(v) => { + let fn = lambdaValueToExternal(v.fn) + let args = v.args + EvDeclaration({fn: fn, args: args}) + } + | IEvDistribution(v) => EvDistribution(v) + | IEvLambda(v) => EvLambda(lambdaValueToExternal(v)) + | IEvNumber(v) => EvNumber(v) + | IEvRecord(v) => v->mapToExternal->EvRecord + | IEvString(v) => EvString(v) + | IEvSymbol(v) => EvSymbol(v) + | IEvDate(v) => EvDate(v) + | IEvTimeDuration(v) => EvTimeDuration(v) + | IEvType(v) => v->mapToExternal->EvType + | IEvTypeIdentifier(v) => EvTypeIdentifier(v) + | IEvBindings(v) => v->nameSpaceToTypeScriptBindings->EvModule + | IEvVoid => EvVoid + } +} +and mapToExternal = v => + v->Belt.Map.String.map(e => toExternal(e))->Belt.Map.String.toArray->Js.Dict.fromArray +and lambdaValueToExternal = v => { + let p = v.parameters + let c = v.context->nameSpaceToTypeScriptBindings + let b = v.body + {parameters: p, context: c, body: b} +} +and nameSpaceToTypeScriptBindings = ( + nameSpace: nameSpace, +): ReducerInterface_ExternalExpressionValue.externalBindings => { + let NameSpace(container) = nameSpace + Belt.Map.String.map(container, e => toExternal(e))->Belt.Map.String.toArray->Js.Dict.fromArray +} + +let rec toInternal = (ev: ExternalExpressionValue.t): t => { + switch ev { + | EvArray(v) => v->Belt.Array.map(e => toInternal(e))->IEvArray + | EvArrayString(v) => IEvArrayString(v) + | EvBool(v) => IEvBool(v) + | EvCall(v) => IEvCall(v) + | EvDate(v) => IEvDate(v) + | EvDeclaration(v) => { + let fn = lambdaValueToInternal(v.fn) + let args = v.args + IEvDeclaration({fn: fn, args: args}) + } + | EvDistribution(v) => IEvDistribution(v) + | EvLambda(v) => IEvLambda(lambdaValueToInternal(v)) + | EvModule(v) => v->nameSpaceFromTypeScriptBindings->IEvBindings + | EvNumber(v) => IEvNumber(v) + | EvRecord(v) => v->recordToInternal->IEvRecord + | EvString(v) => IEvString(v) + | EvSymbol(v) => IEvSymbol(v) + | EvTimeDuration(v) => IEvTimeDuration(v) + | EvType(v) => v->recordToInternal->IEvType + | EvTypeIdentifier(v) => IEvTypeIdentifier(v) + | EvVoid => IEvVoid + } +} +and recordToInternal = v => + v->Js.Dict.entries->Belt.Map.String.fromArray->Belt.Map.String.map(e => toInternal(e)) +and lambdaValueToInternal = v => { + let p = v.parameters + let c = v.context->nameSpaceFromTypeScriptBindings + let b = v.body + {parameters: p, context: c, body: b} +} +and nameSpaceFromTypeScriptBindings = ( + r: ReducerInterface_ExternalExpressionValue.externalBindings, +): nameSpace => + r->Js.Dict.entries->Belt.Map.String.fromArray->Belt.Map.String.map(e => toInternal(e))->NameSpace diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Number.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Number.res index 5cef930e..f22df39b 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Number.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_Number.res @@ -1,5 +1,5 @@ -module EV = ReducerInterface_ExpressionValue -type expressionValue = EV.expressionValue +module IEV = ReducerInterface_InternalExpressionValue +type internalExpressionValue = IEV.t module ScientificUnit = { let nameToMultiplier = str => @@ -24,8 +24,8 @@ module ScientificUnit = { } } -let dispatch = (call: EV.functionCall, _: DistributionOperation.env): option< - result, +let dispatch = (call: IEV.functionCall, _: GenericDist.env): option< + result, > => { switch call { | ( @@ -37,9 +37,9 @@ let dispatch = (call: EV.functionCall, _: DistributionOperation.env): option< | "fromUnit_G" | "fromUnit_T" | "fromUnit_P") as op, - [EvNumber(f)], + [IEvNumber(f)], ) => - op->ScientificUnit.getMultiplier->E.O2.fmap(multiplier => EV.EvNumber(f *. multiplier)->Ok) + op->ScientificUnit.getMultiplier->E.O2.fmap(multiplier => IEV.IEvNumber(f *. multiplier)->Ok) | _ => None } } diff --git a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_StdLib.res b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_StdLib.res index f341f9e2..ec6c4fd4 100644 --- a/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_StdLib.res +++ b/packages/squiggle-lang/src/rescript/ReducerInterface/ReducerInterface_StdLib.res @@ -1,6 +1,7 @@ -module Bindings = Reducer_Category_Bindings +module Bindings = Reducer_Bindings -let internalStdLib = Bindings.emptyBindings->SquiggleLibrary_Math.makeBindings +let internalStdLib = + Bindings.emptyBindings->SquiggleLibrary_Math.makeBindings->SquiggleLibrary_Versions.makeBindings @genType -let externalStdLib = internalStdLib->Bindings.toRecord +let externalStdLib = internalStdLib->Bindings.toTypeScriptBindings diff --git a/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Math.res b/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Math.res index 0e07337c..ce74f476 100644 --- a/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Math.res +++ b/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Math.res @@ -1,23 +1,22 @@ -module Bindings = Reducer_Category_Bindings -module Module = Reducer_Category_Module +module Bindings = Reducer_Bindings let availableNumbers: array<(string, float)> = [ - ("pi", Js.Math._PI), - ("e", Js.Math._E), - ("ln2", Js.Math._LN2), - ("ln10", Js.Math._LN10), - ("log2e", Js.Math._LOG2E), - ("log10e", Js.Math._LOG10E), - ("sqrt2", Js.Math._SQRT2), - ("sqrt1_2", Js.Math._SQRT1_2), - ("phi", 1.618033988749895), - ("tau", 6.283185307179586), + ("Math.pi", Js.Math._PI), + ("Math.e", Js.Math._E), + ("Math.ln2", Js.Math._LN2), + ("Math.ln10", Js.Math._LN10), + ("Math.log2e", Js.Math._LOG2E), + ("Math.log10e", Js.Math._LOG10E), + ("Math.sqrt2", Js.Math._SQRT2), + ("Math.sqrt1_2", Js.Math._SQRT1_2), + ("Math.phi", 1.618033988749895), + ("Math.tau", 6.283185307179586), ] -let mathBindings: Bindings.ExpressionT.bindings = +let mathBindings: Bindings.t = availableNumbers - ->E.A2.fmap(((name, v)) => (name, ReducerInterface_ExpressionValue.EvNumber(v))) - ->Belt.Map.String.fromArray + ->E.A2.fmap(((name, v)) => (name, ReducerInterface_InternalExpressionValue.IEvNumber(v))) + ->Bindings.fromArray let makeBindings = (previousBindings: Bindings.t): Bindings.t => - previousBindings->Bindings.defineModule("Math", mathBindings) + previousBindings->Bindings.merge(mathBindings) diff --git a/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Versions.res b/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Versions.res new file mode 100644 index 00000000..55d1e5b7 --- /dev/null +++ b/packages/squiggle-lang/src/rescript/SquiggleLibrary/SquiggleLibrary_Versions.res @@ -0,0 +1,9 @@ +module Bindings = Reducer_Bindings + +let bindings: Bindings.t = + [ + ("System.version", ReducerInterface_InternalExpressionValue.IEvString("0.2.12")), + ]->Bindings.fromArray + +let makeBindings = (previousBindings: Bindings.t): Bindings.t => + previousBindings->Bindings.merge(bindings) diff --git a/packages/squiggle-lang/src/rescript/TypescriptInterface.res b/packages/squiggle-lang/src/rescript/TypescriptInterface.res index 932edaa1..a1f5afe6 100644 --- a/packages/squiggle-lang/src/rescript/TypescriptInterface.res +++ b/packages/squiggle-lang/src/rescript/TypescriptInterface.res @@ -8,7 +8,7 @@ The below few seem to work fine. In the future there's definitely more work to d */ @genType -type samplingParams = DistributionOperation.env +type samplingParams = GenericDist.env @genType type genericDist = DistributionTypes.genericDist @@ -40,6 +40,9 @@ let evaluate = Reducer.evaluate @genType let evaluateUsingOptions = Reducer.evaluateUsingOptions +@genType +let parse = Reducer_Peggy_Parse.parse + @genType let evaluatePartialUsingExternalBindings = Reducer.evaluatePartialUsingExternalBindings @@ -47,10 +50,10 @@ let evaluatePartialUsingExternalBindings = Reducer.evaluatePartialUsingExternalB type externalBindings = Reducer.externalBindings @genType -type expressionValue = ReducerInterface_ExpressionValue.expressionValue +type expressionValue = ReducerInterface_ExternalExpressionValue.t @genType -type recordEV = ReducerInterface_ExpressionValue.record +type recordEV = ReducerInterface_ExternalExpressionValue.record @genType type errorValue = Reducer_ErrorValue.errorValue @@ -74,19 +77,19 @@ let errorValueToString = Reducer_ErrorValue.errorToString let distributionErrorToString = DistributionTypes.Error.toString @genType -type lambdaValue = ReducerInterface_ExpressionValue.lambdaValue +type lambdaValue = ReducerInterface_ExternalExpressionValue.lambdaValue @genType -type lambdaDeclaration = ReducerInterface_ExpressionValue.lambdaDeclaration +type lambdaDeclaration = ReducerInterface_ExternalExpressionValue.lambdaDeclaration @genType let defaultSamplingEnv = DistributionOperation.defaultEnv @genType -type environment = ReducerInterface_ExpressionValue.environment +type environment = ReducerInterface_ExternalExpressionValue.environment @genType -let defaultEnvironment = ReducerInterface_ExpressionValue.defaultEnvironment +let defaultEnvironment = ReducerInterface_ExternalExpressionValue.defaultEnvironment @genType let foreignFunctionInterface = Reducer.foreignFunctionInterface diff --git a/packages/squiggle-lang/src/rescript/Utility/E.res b/packages/squiggle-lang/src/rescript/Utility/E.res index 70ca4994..50a28382 100644 --- a/packages/squiggle-lang/src/rescript/Utility/E.res +++ b/packages/squiggle-lang/src/rescript/Utility/E.res @@ -546,7 +546,9 @@ module A = { let slice = Belt.Array.slice let init = Array.init let reduce = Belt.Array.reduce + let reduceReverse = Belt.Array.reduceReverse let reducei = Belt.Array.reduceWithIndex + let some = Belt.Array.some let isEmpty = r => length(r) < 1 let stableSortBy = Belt.SortArray.stableSortBy let toNoneIfEmpty = r => isEmpty(r) ? None : Some(r) @@ -630,6 +632,19 @@ module A = { ) let filter = Js.Array.filter let joinWith = Js.Array.joinWith + let transpose = (xs: array>): array> => { + let arr: array> = [] + for i in 0 to length(xs) - 1 { + for j in 0 to length(xs[i]) - 1 { + if Js.Array.length(arr) <= j { + ignore(Js.Array.push([xs[i][j]], arr)) + } else { + ignore(Js.Array.push(xs[i][j], arr[j])) + } + } + } + arr + } let all = (p: 'a => bool, xs: array<'a>): bool => length(filter(p, xs)) == length(xs) let any = (p: 'a => bool, xs: array<'a>): bool => length(filter(p, xs)) > 0 @@ -751,7 +766,7 @@ module A = { let diff = (t: t): array => Belt.Array.zipBy(t, Belt.Array.sliceToEnd(t, 1), (left, right) => right -. left) - let cumsum = (t: t): array => accumulate((a, b) => a +. b, t) + let cumSum = (t: t): array => accumulate((a, b) => a +. b, t) let cumProd = (t: t): array => accumulate((a, b) => a *. b, t) exception RangeError(string) diff --git a/packages/squiggle-lang/src/rescript/Utility/XYShape.res b/packages/squiggle-lang/src/rescript/Utility/XYShape.res index 3fbe9f46..e94d24c6 100644 --- a/packages/squiggle-lang/src/rescript/Utility/XYShape.res +++ b/packages/squiggle-lang/src/rescript/Utility/XYShape.res @@ -327,8 +327,8 @@ module Zipped = { module PointwiseCombination = { // t1Interpolator and t2Interpolator are functions from XYShape.XtoY, e.g. linearBetweenPointsExtrapolateFlat. let combine: ( - (float, float) => result, interpolator, + (float, float) => result, T.t, T.t, ) => result = %raw(` @@ -337,7 +337,7 @@ module PointwiseCombination = { // and interpolates the value on the other side, thus accumulating xs and ys. // This is written in raw JS because this can still be a bottleneck, and using refs for the i and j indices is quite painful. - function(fn, interpolator, t1, t2) { + function(interpolator, fn, t1, t2) { let t1n = t1.xs.length; let t2n = t2.xs.length; let outX = []; @@ -399,11 +399,11 @@ module PointwiseCombination = { This is from an approach to kl divergence that was ultimately rejected. Leaving it in for now because it may help us factor `combine` out of raw javascript soon. */ let combineAlongSupportOfSecondArgument0: ( - (float, float) => result, interpolator, + (float, float) => result, T.t, T.t, - ) => result = (fn, interpolator, t1, t2) => { + ) => result = (interpolator, fn, t1, t2) => { let newYs = [] let newXs = [] let (l1, l2) = (E.A.length(t1.xs), E.A.length(t2.xs)) @@ -496,29 +496,9 @@ module PointwiseCombination = { let newYs = E.A.fmap(x => XtoY.linear(x, t), newXs) {xs: newXs, ys: newYs} } - // This function is used for klDivergence - let combineAlongSupportOfSecondArgument: ( - (float, float) => result, - T.t, - T.t, - ) => result = (fn, prediction, answer) => { - let combineWithFn = (answerX: float, i: int) => { - let answerY = answer.ys[i] - let predictionY = XtoY.linear(answerX, prediction) - fn(predictionY, answerY) - } - let newYsWithError = Js.Array.mapi((x, i) => combineWithFn(x, i), answer.xs) - let newYsOrError = E.A.R.firstErrorOrOpen(newYsWithError) - let result = switch newYsOrError { - | Ok(a) => Ok({xs: answer.xs, ys: a}) - | Error(b) => Error(b) - } - - result - } let addCombine = (interpolator: interpolator, t1: T.t, t2: T.t): T.t => - combine((a, b) => Ok(a +. b), interpolator, t1, t2)->E.R.toExn( + combine(interpolator, (a, b) => Ok(a +. b), t1, t2)->E.R.toExn( "Add operation should never fail", _, ) diff --git a/packages/vscode-ext/.eslintrc.json b/packages/vscode-ext/.eslintrc.json new file mode 100644 index 00000000..5dfecab7 --- /dev/null +++ b/packages/vscode-ext/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "plugins": ["@typescript-eslint"], + "rules": { + "@typescript-eslint/naming-convention": "warn", + "@typescript-eslint/semi": "warn", + "curly": "warn", + "eqeqeq": "warn", + "no-throw-literal": "warn", + "semi": "off" + }, + "ignorePatterns": ["out", "dist", "**/*.d.ts"] +} diff --git a/packages/vscode-ext/.gitignore b/packages/vscode-ext/.gitignore new file mode 100644 index 00000000..a4e24e9e --- /dev/null +++ b/packages/vscode-ext/.gitignore @@ -0,0 +1,5 @@ +/media/vendor +/client/out +/server/out +/*.vsix +/syntaxes/*.json diff --git a/packages/vscode-ext/.vscode/extensions.json b/packages/vscode-ext/.vscode/extensions.json new file mode 100644 index 00000000..c0a2258b --- /dev/null +++ b/packages/vscode-ext/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": ["dbaeumer.vscode-eslint"] +} diff --git a/packages/vscode-ext/.vscode/launch.json b/packages/vscode-ext/.vscode/launch.json new file mode 100644 index 00000000..1210201d --- /dev/null +++ b/packages/vscode-ext/.vscode/launch.json @@ -0,0 +1,28 @@ +// A launch configuration that compiles the extension and then opens it inside a new window +// Use IntelliSense to learn about possible attributes. +// Hover to view descriptions of existing attributes. +// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Run Extension", + "type": "extensionHost", + "request": "launch", + "args": ["--extensionDevelopmentPath=${workspaceFolder}"], + "outFiles": ["${workspaceFolder}/out/**/*.js"], + "preLaunchTask": "${defaultBuildTask}" + }, + { + "name": "Extension Tests", + "type": "extensionHost", + "request": "launch", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}", + "--extensionTestsPath=${workspaceFolder}/out/test/suite/index" + ], + "outFiles": ["${workspaceFolder}/out/test/**/*.js"], + "preLaunchTask": "${defaultBuildTask}" + } + ] +} diff --git a/packages/vscode-ext/.vscode/settings.json b/packages/vscode-ext/.vscode/settings.json new file mode 100644 index 00000000..ffeaf91c --- /dev/null +++ b/packages/vscode-ext/.vscode/settings.json @@ -0,0 +1,11 @@ +// Place your settings in this file to overwrite default and user settings. +{ + "files.exclude": { + "out": false // set this to true to hide the "out" folder with the compiled JS files + }, + "search.exclude": { + "out": true // set this to false to include "out" folder in search results + }, + // Turn off tsc task auto detection since we have the necessary tasks as npm scripts + "typescript.tsc.autoDetect": "off" +} diff --git a/packages/vscode-ext/.vscode/tasks.json b/packages/vscode-ext/.vscode/tasks.json new file mode 100644 index 00000000..078ff7e0 --- /dev/null +++ b/packages/vscode-ext/.vscode/tasks.json @@ -0,0 +1,20 @@ +// See https://go.microsoft.com/fwlink/?LinkId=733558 +// for the documentation about the tasks.json format +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "watch", + "problemMatcher": "$tsc-watch", + "isBackground": true, + "presentation": { + "reveal": "never" + }, + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} diff --git a/packages/vscode-ext/.vscodeignore b/packages/vscode-ext/.vscodeignore new file mode 100644 index 00000000..38999676 --- /dev/null +++ b/packages/vscode-ext/.vscodeignore @@ -0,0 +1,10 @@ +.vscode/** +.vscode-test/** +src/** +.gitignore +.yarnrc +vsc-extension-quickstart.md +**/tsconfig.json +**/.eslintrc.json +**/*.map +**/*.ts diff --git a/packages/vscode-ext/.yarnrc b/packages/vscode-ext/.yarnrc new file mode 100644 index 00000000..f757a6ac --- /dev/null +++ b/packages/vscode-ext/.yarnrc @@ -0,0 +1 @@ +--ignore-engines true \ No newline at end of file diff --git a/packages/vscode-ext/LICENSE b/packages/vscode-ext/LICENSE new file mode 100644 index 00000000..fb0c468f --- /dev/null +++ b/packages/vscode-ext/LICENSE @@ -0,0 +1,22 @@ + +MIT License + +Copyright (c) 2020 Foretold + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/packages/vscode-ext/README.md b/packages/vscode-ext/README.md new file mode 100644 index 00000000..cb161038 --- /dev/null +++ b/packages/vscode-ext/README.md @@ -0,0 +1,36 @@ +# Squiggle For VS Code + +## About + +This extension provides support for [Squiggle](https://www.squiggle-language.com/) in VS Code. It can be found in the VS code _[marketplace](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-squiggle)_ + +Features: + +- Preview `.squiggle` files in a preview pane +- Syntax highlighting for `.squiggle` and `.squiggleU` files + +## Installation + +You can install this extension by going to the "extensions" tab, searching for "Squiggle", and then installing it. + +![](./images/vs-code-install.png) + +## Usage + +After loading a `.squiggle` file, an "Open Preview" button will appear. If you click it, the squiggle model will be shown, and updated as you edit and save you file. + +![](./images/extension-screenshot.png) + +### Configuration (optional) + +Some preview settings, e.g. whether to show the summary table or types of outputs, can be configurable on in the VS Code settings and persist between different preview sessions. The VS Code settings can be accessed with the shortcut `Ctrl+,` with `Ctrl+Shift+P` + searching "Open Settings", or by accessing a file like `$HOME/.config/Code/User/settings.json` in Linux (see [here](https://stackoverflow.com/questions/65908987/how-can-i-open-visual-studio-codes-settings-json-file)) for other operating systems. + +![](./images/vs-code-settings.png) + +Check out the full list of Squiggle settings in the main VS Code settings. + +## Build locally + +We assume you ran `yarn` at the monorepo level for all dependencies. + +Then, simply `yarn compile` at the `vscode-ext` package level. It will build `squiggle-lang`, `squiggle-components`, and the VS Code extension source code. diff --git a/packages/vscode-ext/client/src/client.ts b/packages/vscode-ext/client/src/client.ts new file mode 100644 index 00000000..83a80129 --- /dev/null +++ b/packages/vscode-ext/client/src/client.ts @@ -0,0 +1,60 @@ +import * as path from "path"; + +import * as vscode from "vscode"; +import { + LanguageClient, + LanguageClientOptions, + ServerOptions, + TransportKind, +} from "vscode-languageclient/node"; + +let client: LanguageClient; + +export const startClient = (context: vscode.ExtensionContext) => { + // The server is implemented in node + let serverModule = context.asAbsolutePath( + path.join("server", "out", "server.js") + ); + // The debug options for the server + // --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the server for debugging + let debugOptions = { execArgv: ["--nolazy" /*"--inspect=6009"*/] }; + + // If the extension is launched in debug mode then the debug server options are used + // Otherwise the run options are used + let serverOptions: ServerOptions = { + run: { module: serverModule, transport: TransportKind.ipc }, + debug: { + module: serverModule, + transport: TransportKind.ipc, + options: debugOptions, + }, + }; + + // Options to control the language client + let clientOptions: LanguageClientOptions = { + // Register the server for plain text documents + documentSelector: [{ scheme: "file", language: "squiggle" }], + synchronize: { + // Notify the server about file changes to '.clientrc files contained in the workspace + fileEvents: vscode.workspace.createFileSystemWatcher("**/.clientrc"), + }, + }; + + // Create the language client and start the client. + client = new LanguageClient( + "squiggleServer", + "Squiggle Server", + serverOptions, + clientOptions + ); + + // Start the client. This will also launch the server + client.start(); +}; + +export const stopClient = () => { + if (!client) { + return undefined; + } + return client.stop(); +}; diff --git a/packages/vscode-ext/client/src/editor.ts b/packages/vscode-ext/client/src/editor.ts new file mode 100644 index 00000000..4410ba26 --- /dev/null +++ b/packages/vscode-ext/client/src/editor.ts @@ -0,0 +1,88 @@ +import * as vscode from "vscode"; +import { getWebviewContent } from "./utils"; + +export class SquiggleEditorProvider implements vscode.CustomTextEditorProvider { + public static register(context: vscode.ExtensionContext): vscode.Disposable { + const provider = new SquiggleEditorProvider(context); + const providerRegistration = vscode.window.registerCustomEditorProvider( + SquiggleEditorProvider.viewType, + provider + ); + return providerRegistration; + } + + private static readonly viewType = "squiggle.wysiwyg"; + + constructor(private readonly context: vscode.ExtensionContext) {} + + /** + * Called when our custom editor is opened. + */ + public async resolveCustomTextEditor( + document: vscode.TextDocument, + webviewPanel: vscode.WebviewPanel + ): Promise { + // Setup initial content for the webview + webviewPanel.webview.options = { + enableScripts: true, + }; + webviewPanel.webview.html = getWebviewContent({ + webview: webviewPanel.webview, + script: "media/wysiwygWebview.js", + title: "Squiggle Editor", + context: this.context, + }); + + function updateWebview() { + webviewPanel.webview.postMessage({ + type: "update", + text: document.getText(), + }); + } + + // Hook up event handlers so that we can synchronize the webview with the text document. + // + // The text document acts as our model, so we have to sync change in the document to our + // editor and sync changes in the editor back to the document. + // + // Remember that a single text document can also be shared between multiple custom + // editors (this happens for example when you split a custom editor) + + const changeDocumentSubscription = vscode.workspace.onDidChangeTextDocument( + (e) => { + if (e.document.uri.toString() === document.uri.toString()) { + updateWebview(); + } + } + ); + + // Make sure we get rid of the listener when our editor is closed. + webviewPanel.onDidDispose(() => { + changeDocumentSubscription.dispose(); + }); + + // Receive message from the webview. + webviewPanel.webview.onDidReceiveMessage((e) => { + switch (e.type) { + case "edit": + this.updateTextDocument(document, e.text); + return; + } + }); + + updateWebview(); + } + + private updateTextDocument(document: vscode.TextDocument, text: string) { + const edit = new vscode.WorkspaceEdit(); + + // Just replace the entire document every time. + edit.replace( + document.uri, + new vscode.Range(0, 0, document.lineCount, 0), + text + ); + + return vscode.workspace.applyEdit(edit); + } +} diff --git a/packages/vscode-ext/client/src/extension.ts b/packages/vscode-ext/client/src/extension.ts new file mode 100644 index 00000000..ee8af595 --- /dev/null +++ b/packages/vscode-ext/client/src/extension.ts @@ -0,0 +1,25 @@ +// The module 'vscode' contains the VS Code extensibility API +// Import the module and reference it with the alias vscode in your code below +import * as vscode from "vscode"; +import { startClient, stopClient } from "./client"; + +import { SquiggleEditorProvider } from "./editor"; +import { registerSemanticHighlight } from "./highlight"; +import { registerPreviewCommand } from "./preview"; + +// this method is called when your extension is activated +// your extension is activated the very first time the command is executed +export function activate(context: vscode.ExtensionContext) { + context.subscriptions.push(SquiggleEditorProvider.register(context)); + + registerPreviewCommand(context); + + registerSemanticHighlight(); + + startClient(context); +} + +// this method is called when your extension is deactivated +export function deactivate() { + stopClient(); +} diff --git a/packages/vscode-ext/client/src/highlight.ts b/packages/vscode-ext/client/src/highlight.ts new file mode 100644 index 00000000..39acc262 --- /dev/null +++ b/packages/vscode-ext/client/src/highlight.ts @@ -0,0 +1,96 @@ +import * as vscode from "vscode"; + +import { parse } from "@quri/squiggle-lang"; +import { AnyPeggyNode } from "@quri/squiggle-lang/dist/src/rescript/Reducer/Reducer_Peggy/helpers"; + +const tokenTypes = ["enum", "function", "variable", "property"]; +const tokenModifiers = ["declaration", "documentation"]; +const legend = new vscode.SemanticTokensLegend(tokenTypes, tokenModifiers); + +const convertRange = ( + range: Extract["location"] +) => + new vscode.Range( + new vscode.Position(range.start.line - 1, range.start.column - 1), + new vscode.Position(range.end.line - 1, range.end.column - 1) + ); + +const populateTokensBuilder = ( + tokensBuilder: vscode.SemanticTokensBuilder, + node: AnyPeggyNode + // bindings: { [key: string]: boolean } +) => { + switch (node.type) { + case "Expression": + for (const child of node.nodes) { + populateTokensBuilder(tokensBuilder, child); + } + break; + case "Block": + for (const child of node.statements) { + populateTokensBuilder(tokensBuilder, child); + } + break; + case "LetStatement": + tokensBuilder.push( + convertRange(node.variable.location), + node.value.type === "Lambda" ? "function" : "variable", + ["declaration"] + ); + populateTokensBuilder(tokensBuilder, node.value); + break; + case "Lambda": + for (const arg of node.args) { + populateTokensBuilder(tokensBuilder, arg); + } + populateTokensBuilder(tokensBuilder, node.body); + break; + case "Ternary": + populateTokensBuilder(tokensBuilder, node.condition); + populateTokensBuilder(tokensBuilder, node.trueExpression); + populateTokensBuilder(tokensBuilder, node.falseExpression); + break; + case "KeyValue": + if (node.key.type === "String" && node.key.location) { + tokensBuilder.push(convertRange(node.key.location), "property", [ + "declaration", + ]); + } else { + populateTokensBuilder(tokensBuilder, node.key); + } + populateTokensBuilder(tokensBuilder, node.value); + break; + case "Identifier": + tokensBuilder.push(convertRange(node.location), "variable"); + break; + } +}; + +export const registerSemanticHighlight = () => { + const provider: vscode.DocumentSemanticTokensProvider = { + provideDocumentSemanticTokens( + document: vscode.TextDocument + ): vscode.ProviderResult { + const parseResult = parse(document.getText()); + + const tokensBuilder = new vscode.SemanticTokensBuilder(legend); + if (parseResult.tag === "Ok") { + populateTokensBuilder( + tokensBuilder, + parseResult.value + // {} + ); + } + + return tokensBuilder.build(); + }, + }; + + const selector = { language: "squiggle", scheme: "file" }; + + vscode.languages.registerDocumentSemanticTokensProvider( + selector, + provider, + legend + ); +}; diff --git a/packages/vscode-ext/client/src/preview.ts b/packages/vscode-ext/client/src/preview.ts new file mode 100644 index 00000000..81e4da47 --- /dev/null +++ b/packages/vscode-ext/client/src/preview.ts @@ -0,0 +1,53 @@ +import * as vscode from "vscode"; +import * as path from "path"; +import { getWebviewContent } from "./utils"; + +export const registerPreviewCommand = (context: vscode.ExtensionContext) => { + context.subscriptions.push( + vscode.commands.registerTextEditorCommand("squiggle.preview", (editor) => { + // Create and show a new webview + const title = `Preview ${path.basename(editor.document.uri.path)}`; + + const panel = vscode.window.createWebviewPanel( + "squigglePreview", + title, + vscode.ViewColumn.Beside, + {} // Webview options. More on these later. + ); + + panel.webview.options = { + enableScripts: true, + }; + + panel.webview.html = getWebviewContent({ + context, + webview: panel.webview, + title, + script: "media/previewWebview.js", + }); + + const updateWebview = () => { + panel.webview.postMessage({ + type: "update", + text: editor.document.getText(), + showSettings: + vscode.workspace.getConfiguration("squiggle").playground, + }); + }; + + updateWebview(); + + const changeDocumentSubscription = + vscode.workspace.onDidChangeTextDocument((e) => { + if (e.document.uri.toString() === editor.document.uri.toString()) { + updateWebview(); + } + }); + + // Make sure we get rid of the listener when our editor is closed. + panel.onDidDispose(() => { + changeDocumentSubscription.dispose(); + }); + }) + ); +}; diff --git a/packages/vscode-ext/client/src/utils.ts b/packages/vscode-ext/client/src/utils.ts new file mode 100644 index 00000000..7c3f28f4 --- /dev/null +++ b/packages/vscode-ext/client/src/utils.ts @@ -0,0 +1,59 @@ +import * as vscode from "vscode"; + +const getNonce = () => { + let text = ""; + const possible = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + for (let i = 0; i < 32; i++) { + text += possible.charAt(Math.floor(Math.random() * possible.length)); + } + return text; +}; + +export const getWebviewContent = ({ + webview, + title, + script, + context, +}: { + webview: vscode.Webview; + title: string; + script: string; + context: vscode.ExtensionContext; +}) => { + const nonce = getNonce(); + + const styleUri = webview.asWebviewUri( + vscode.Uri.joinPath(context.extensionUri, "media/vendor/components.css") + ); + + const scriptUris = [ + // vendor files are copied over by `yarn run compile` + "media/vendor/react.js", + "media/vendor/react-dom.js", + "media/vendor/components.js", + script, + ].map((script) => + webview.asWebviewUri(vscode.Uri.joinPath(context.extensionUri, script)) + ); + + return ` + + + + + + + + + ${title} + + +
+ ${scriptUris + .map((uri) => ``) + .join("")} + + + `; +}; diff --git a/packages/vscode-ext/client/tsconfig.json b/packages/vscode-ext/client/tsconfig.json new file mode 100644 index 00000000..079e3466 --- /dev/null +++ b/packages/vscode-ext/client/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es2020", + "lib": ["ES2020", "dom"], + "outDir": "out", + "rootDir": "src", + "sourceMap": true + }, + "include": ["src"], + "exclude": ["node_modules", ".vscode-test"] +} diff --git a/packages/vscode-ext/images/extension-screenshot.png b/packages/vscode-ext/images/extension-screenshot.png new file mode 100644 index 00000000..f3cc3351 Binary files /dev/null and b/packages/vscode-ext/images/extension-screenshot.png differ diff --git a/packages/vscode-ext/images/vs-code-install.png b/packages/vscode-ext/images/vs-code-install.png new file mode 100644 index 00000000..e36b220a Binary files /dev/null and b/packages/vscode-ext/images/vs-code-install.png differ diff --git a/packages/vscode-ext/images/vs-code-settings.png b/packages/vscode-ext/images/vs-code-settings.png new file mode 100644 index 00000000..68568bd5 Binary files /dev/null and b/packages/vscode-ext/images/vs-code-settings.png differ diff --git a/packages/vscode-ext/language-configuration.json b/packages/vscode-ext/language-configuration.json new file mode 100644 index 00000000..727d0444 --- /dev/null +++ b/packages/vscode-ext/language-configuration.json @@ -0,0 +1,18 @@ +{ + "comments": { + "lineComment": "//", + "blockComment": ["/*", "*/"] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + { "open": "{", "close": "}" }, + { "open": "[", "close": "]" }, + { "open": "(", "close": ")" }, + { "open": "'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "\"", "close": "\"", "notIn": ["string", "comment"] } + ] +} diff --git a/packages/vscode-ext/media/previewWebview.js b/packages/vscode-ext/media/previewWebview.js new file mode 100644 index 00000000..a2b1be95 --- /dev/null +++ b/packages/vscode-ext/media/previewWebview.js @@ -0,0 +1,39 @@ +(function () { + const vscode = acquireVsCodeApi(); + + const container = document.getElementById("root"); + + const root = ReactDOM.createRoot(container); + function updateContent(text, showSettings) { + root.render( + React.createElement(squiggle_components.SquigglePlayground, { + code: text, + showEditor: false, + showSummary: Boolean(showSettings.showSummary), + }) + ); + } + + // Handle messages sent from the extension to the webview + window.addEventListener("message", (event) => { + const message = event.data; // The json data that the extension sent + switch (message.type) { + case "update": + const { text, showSettings } = message; + + // Update our webview's content + updateContent(text, showSettings); + + // Then persist state information. + // This state is returned in the call to `vscode.getState` below when a webview is reloaded. + vscode.setState({ text, showSettings }); + + return; + } + }); + + const state = vscode.getState(); + if (state) { + updateContent(state.text, state.showSettings); + } +})(); diff --git a/packages/vscode-ext/media/wysiwygWebview.js b/packages/vscode-ext/media/wysiwygWebview.js new file mode 100644 index 00000000..118d7788 --- /dev/null +++ b/packages/vscode-ext/media/wysiwygWebview.js @@ -0,0 +1,41 @@ +// based on https://github.com/microsoft/vscode-extension-samples/blob/main/custom-editor-sample/media/catScratch.js +(function () { + const vscode = acquireVsCodeApi(); + + const container = document.getElementById("root"); + + const root = ReactDOM.createRoot(container); + function updateContent(text) { + root.render( + React.createElement(squiggle_components.SquigglePlayground, { + code: text, + onCodeChange: (code) => { + vscode.postMessage({ type: "edit", text: code }); + }, + }) + ); + } + + // Handle messages sent from the extension to the webview + window.addEventListener("message", (event) => { + const message = event.data; // The json data that the extension sent + switch (message.type) { + case "update": + const text = message.text; + + // Update our webview's content + updateContent(text); + + // Then persist state information. + // This state is returned in the call to `vscode.getState` below when a webview is reloaded. + vscode.setState({ text }); + + return; + } + }); + + const state = vscode.getState(); + if (state) { + updateContent(state.text); + } +})(); diff --git a/packages/vscode-ext/overrides/jest/index.d.ts b/packages/vscode-ext/overrides/jest/index.d.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/vscode-ext/package.json b/packages/vscode-ext/package.json new file mode 100644 index 00000000..dd4f56c3 --- /dev/null +++ b/packages/vscode-ext/package.json @@ -0,0 +1,146 @@ +{ + "name": "vscode-squiggle", + "displayName": "Squiggle", + "description": "Squiggle language support", + "license": "MIT", + "version": "0.2.0", + "publisher": "QURI", + "repository": { + "type": "git", + "url": "git+https://github.com/quantified-uncertainty/squiggle.git" + }, + "icon": "media/vendor/icon.png", + "engines": { + "vscode": "^1.68.0" + }, + "categories": [ + "Programming Languages", + "Visualization" + ], + "activationEvents": [ + "onLanguage:squiggle", + "onCustomEditor:squiggle.wysiwyg", + "onCommand:squiggle.preview" + ], + "main": "./client/out/extension.js", + "contributes": { + "languages": [ + { + "id": "squiggle", + "extensions": [ + ".squiggle" + ], + "aliases": [ + "Squiggle" + ], + "configuration": "./language-configuration.json" + }, + { + "id": "squiggleU", + "extensions": [ + ".squiggleU" + ], + "aliases": [ + "SquiggleU" + ], + "configuration": "./language-configuration.json" + } + ], + "grammars": [ + { + "language": "squiggle", + "scopeName": "source.squiggle", + "path": "./syntaxes/squiggle.tmLanguage.json" + }, + { + "language": "squiggleU", + "scopeName": "source.squiggle", + "path": "./syntaxes/squiggle.tmLanguage.json" + } + ], + "customEditors": [ + { + "viewType": "squiggle.wysiwyg", + "displayName": "Squiggle WYSIWYG", + "selector": [ + { + "filenamePattern": "*.squiggle" + } + ], + "priority": "option" + } + ], + "commands": [ + { + "command": "squiggle.preview", + "title": "Open Preview", + "category": "Squiggle", + "when": "editorLangId == squiggle", + "icon": "$(open-preview)" + } + ], + "menus": { + "editor/title": [ + { + "command": "squiggle.preview", + "when": "editorLangId == squiggle", + "group": "navigation" + } + ], + "commandPalette": [ + { + "command": "squiggle.preview", + "when": "editorLangId == squiggle" + } + ] + }, + "keybindings": [ + { + "command": "squiggle.preview", + "key": "ctrl+k v", + "mac": "cmd+k v", + "when": "editorLangId == squiggle" + } + ], + "configuration": { + "title": "Squiggle", + "properties": { + "squiggle.playground.showSummary": { + "type": "boolean", + "default": false, + "description": "Whether to show the summary table in the playground" + } + } + } + }, + "scripts": { + "vscode:prepublish": "yarn run compile", + "compile:tsc": "tsc -b", + "compile:grammar": "js-yaml syntaxes/squiggle.tmLanguage.yaml >syntaxes/squiggle.tmLanguage.json", + "compile:vendor": "(cd ../squiggle-lang && yarn run build) && (cd ../components && yarn run bundle && yarn run build:css) && mkdir -p media/vendor && cp ../components/dist/bundle.js media/vendor/components.js && cp ../components/dist/main.css media/vendor/components.css && cp ../../node_modules/react/umd/react.production.min.js media/vendor/react.js && cp ../../node_modules/react-dom/umd/react-dom.production.min.js media/vendor/react-dom.js && cp ../website/static/img/quri-logo.png media/vendor/icon.png", + "compile": "yarn run compile:vendor && yarn run compile:grammar && yarn run compile:tsc", + "watch": "tsc -b -watch", + "pretest": "yarn run compile && yarn run lint", + "lint": "eslint client/src server/src --ext ts", + "format": "eslint client/src server/src --ext ts --fix", + "package": "npx vsce package --yarn" + }, + "devDependencies": { + "@types/glob": "^7.2.0", + "@types/node": "18.x", + "@types/vscode": "^1.69.0", + "@typescript-eslint/eslint-plugin": "^5.30.7", + "@typescript-eslint/parser": "^5.30.7", + "eslint": "^8.20.0", + "glob": "^8.0.3", + "js-yaml": "^4.1.0", + "typescript": "^4.7.4", + "vsce-yarn-patch": "^1.66.2" + }, + "dependencies": { + "vscode-languageclient": "^8.0.2", + "vscode-languageserver": "^8.0.2", + "vscode-languageserver-textdocument": "^1.0.5", + "@quri/squiggle-lang": "^0.2.11" + } +} diff --git a/packages/vscode-ext/server/src/server.ts b/packages/vscode-ext/server/src/server.ts new file mode 100644 index 00000000..84637a7d --- /dev/null +++ b/packages/vscode-ext/server/src/server.ts @@ -0,0 +1,74 @@ +import { + createConnection, + TextDocuments, + Diagnostic, + DiagnosticSeverity, + ProposedFeatures, + InitializeParams, + TextDocumentSyncKind, + InitializeResult, +} from "vscode-languageserver/node"; + +import { parse } from "@quri/squiggle-lang"; + +import { TextDocument } from "vscode-languageserver-textdocument"; + +// Documentation: +// - https://code.visualstudio.com/api/language-extensions/language-server-extension-guide +// - https://microsoft.github.io/language-server-protocol/specifications/specification-current + +// Create a connection for the server, using Node's IPC as a transport. +// Also include all preview / proposed LSP features. +let connection = createConnection(ProposedFeatures.all); + +const documents: TextDocuments = new TextDocuments(TextDocument); + +documents.onDidChangeContent((change) => { + validateSquiggleDocument(change.document); +}); + +connection.onInitialize((params: InitializeParams) => { + const result: InitializeResult = { + capabilities: { + textDocumentSync: TextDocumentSyncKind.Incremental, + }, + }; + return result; +}); + +async function validateSquiggleDocument( + textDocument: TextDocument +): Promise { + const text = textDocument.getText(); + + const diagnostics: Diagnostic[] = []; + + const parseResult = parse(text); + if (parseResult.tag === "Error") { + const location = parseResult.value.value[1]; + diagnostics.push({ + severity: DiagnosticSeverity.Error, + range: { + start: { + line: location.start.line - 1, + character: location.start.column - 1, + }, + end: { + line: location.end.line - 1, + character: location.end.column - 1, + }, + }, + message: parseResult.value.value[0], + }); + } + + // Send the computed diagnostics to VSCode. + connection.sendDiagnostics({ uri: textDocument.uri, diagnostics }); +} + +// Make the text document manager listen on the connection +// for open, change and close text document events +documents.listen(connection); + +// Listen on the connection +connection.listen(); diff --git a/packages/vscode-ext/server/tsconfig.json b/packages/vscode-ext/server/tsconfig.json new file mode 100644 index 00000000..39822b33 --- /dev/null +++ b/packages/vscode-ext/server/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es2020", + "lib": ["ES2020", "dom"], + "outDir": "out", + "rootDir": "src", + "sourceMap": true + }, + "include": ["src"], + "exclude": ["node_modules"] +} diff --git a/packages/vscode-ext/syntaxes/squiggle.tmLanguage.yaml b/packages/vscode-ext/syntaxes/squiggle.tmLanguage.yaml new file mode 100644 index 00000000..a7f16539 --- /dev/null +++ b/packages/vscode-ext/syntaxes/squiggle.tmLanguage.yaml @@ -0,0 +1,93 @@ +scopeName: source.squiggle +patterns: + - include: "#statement" + - include: "#expression" + - include: "#comment-block" + - include: "#comment-line" +repository: + statement: + patterns: + - include: "#let" + - include: "#defun" + expression: + patterns: + - include: "#integer" + - include: "#float" + - include: "#string" + - include: "#block" + - include: "#function-call" + - include: "#keywords" + let: + match: ^\s*(\w+)\s*= + captures: + "1": + name: variable.other.squiggle + defun: + begin: ^\s*(\w+)\s*(\() + end: (\))\s*= + beginCaptures: + "1": + name: entity.name.function.squiggle + "2": + name: punctuation.definition.arguments.begin.squiggle + endCaptures: + "1": + name: punctuation.definition.arguments.end.squiggle + patterns: + - include: "#array-parameters" + array-parameters: + begin: \b([\$_a-z]+[\$_a-zA-Z0-9]*) + end: \s*(?:(,)|(?=\))) + beginCaptures: + "1": + name: variable.parameter.function.squiggle + function-call: + begin: (\w+)\s*(\() + end: (\)) + beginCaptures: + "1": + name: entity.name.function.squiggle + "2": + name: punctuation.definition.arguments.begin.squiggle + endCaptures: + "1": + name: punctuation.definition.arguments.end.squiggle + patterns: + - include: "$self" + comment-block: + begin: /\* + end: \*/ + name: comment.block.squiggle + comment-line: + patterns: + - include: "#comment-line-double-slash" + - include: "#comment-line-number-sign" + comment-line-double-slash: + match: //.* + name: comment.line.double-slash.squiggle + comment-line-number-sign: + match: "#.*" + name: comment.line.number-sign.squiggle + block: + begin: "{" + end: "}" + beginCaptures: + "0": + name: punctuation.definition.block.squiggle + endCaptures: + "0": + name: punctuation.definition.block.squiggle + patterns: + - include: "$self" + keywords: + match: \b(if|then|else|to)\b + name: keyword.control.squiggle + integer: + match: \b\d+([_a-zA-Z]+[_a-zA-Z0-9]*)? + name: constant.numeric.integer.squiggle + float: + match: \b(\d+\.\d*|\.?\d+)([eE]-?\d+)?([_a-zA-Z]+[_a-zA-Z0-9]*)? + name: constant.numeric.float.squiggle + string: + match: \".*?\" + name: string.quoted.double.squiggle diff --git a/packages/vscode-ext/tsconfig.json b/packages/vscode-ext/tsconfig.json new file mode 100644 index 00000000..62d1f7fa --- /dev/null +++ b/packages/vscode-ext/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es2020", + "lib": ["es2020", "dom"], + "outDir": "out", + "rootDir": "src", + "sourceMap": true + }, + "include": ["src"], + "exclude": ["node_modules", ".vscode-test"], + "references": [{ "path": "./client" }, { "path": "./server" }] +} diff --git a/packages/vscode-ext/yarn.lock b/packages/vscode-ext/yarn.lock new file mode 100644 index 00000000..787b7efd --- /dev/null +++ b/packages/vscode-ext/yarn.lock @@ -0,0 +1 @@ +// should be empty, see https://github.com/microsoft/vscode-vsce/issues/300 diff --git a/packages/website/README.md b/packages/website/README.md index a1af1e40..134e7fe8 100644 --- a/packages/website/README.md +++ b/packages/website/README.md @@ -6,11 +6,13 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta We assume you ran `yarn` at monorepo level. -The website depends on `squiggle-lang`, which you have to build manually. +The website depends on `squiggle-lang` and `components`, which you have to build manually. ```sh cd ../squiggle-lang yarn build +cd ../components +yarn build ``` Generate static content, to the `build` directory. diff --git a/packages/website/docs/Api/Date.md b/packages/website/docs/Api/Date.md index 9f9b9f09..eef71ea0 100644 --- a/packages/website/docs/Api/Date.md +++ b/packages/website/docs/Api/Date.md @@ -5,16 +5,14 @@ title: Date Squiggle date types are a very simple implementation on [Javascript's Date type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date). It's mainly here for early experimentation. There are more relevant functions for the [Duration](/docs/Api/Duration) type. -### makeFromYear - -(Now `makeDateFromYear`) +### fromYear ``` -Date.makeFromYear: (number) => date +Date.fromYear: (number) => date ``` ```js -makeFromYear(2022.32); +Date.fromYear(2022.32); ``` ### toString @@ -30,7 +28,7 @@ add: (date, duration) => date ``` ```js -makeFromYear(2022.32) + years(5); +Date.fromYear(2022.32) + years(5); ``` ### subtract @@ -41,6 +39,6 @@ subtract: (date, duration) => date ``` ```js -makeFromYear(2040) - makeFromYear(2020); // 20 years -makeFromYear(2040) - years(20); // 2020 +Date.fromYear(2040) - Date.fromYear(2020); // 20 years +Date.fromYear(2040) - years(20); // 2020 ``` diff --git a/packages/website/docs/Api/DistGeneric.mdx b/packages/website/docs/Api/DistGeneric.mdx index a6498dd2..e37c6f75 100644 --- a/packages/website/docs/Api/DistGeneric.mdx +++ b/packages/website/docs/Api/DistGeneric.mdx @@ -70,12 +70,14 @@ uniform(10, 12); ``` beta: (distribution|number, distribution|number) => distribution +beta: (dict<{mean: distribution|number, stdev: distribution|number}>) => distribution ``` **Examples** ```javascript beta(20, 25); +beta({ mean: 0.39, stdev: 0.1 }); ``` ### cauchy @@ -288,38 +290,6 @@ quantile: (distribution, number) => number quantile(normal(5, 2), 0.5); ``` -### toPointSet - -**TODO: Will soon be called "PointSet.make"** - -Converts a distribution to the pointSet format. - -``` -toPointSet: (distribution) => pointSetDistribution -``` - -**Examples** - -```javascript -toPointSet(normal(5, 2)); -``` - -### toSampleSet - -**TODO: Will soon be called "SampleSet.make"** - -Converts a distribution to the sampleSet format, with n samples. - -``` -toSampleSet: (distribution, number) => sampleSetDistribution -``` - -**Examples** - -```javascript -toSampleSet(normal(5, 2), 1000); -``` - ### truncateLeft Truncates the left side of a distribution. Returns either a pointSet distribution or a symbolic distribution. @@ -362,6 +332,26 @@ klDivergence: (distribution, distribution) => number klDivergence(normal(5, 2), normal(5, 4)); // returns 0.57 ``` +### logScore + +A log loss score. Often that often acts as a [scoring rule](https://en.wikipedia.org/wiki/Scoring_rule). Useful when evaluating the accuracy of a forecast. + +Note that it is fairly slow. + +``` +Dist.logScore: ({estimate: distribution, ?prior: distribution, answer: distribution|number}) => number +``` + +**Examples** + +```javascript +Dist.logScore({ + estimate: normal(5, 2), + answer: normal(4.5, 1.2), + prior: normal(6, 4), +}); // returns -0.597.57 +``` + ## Display ### toString @@ -390,20 +380,6 @@ sparkline: (distribution, n = 20) => string toSparkline(truncateLeft(normal(5, 2), 3), 20); // produces ▁▇█████▇▅▄▃▂▂▁▁▁▁▁▁▁ ``` -### inspect - -Prints the value of the distribution to the Javascript console, then returns the distribution. Useful for debugging. - -``` -inspect: (distribution) => distribution -``` - -**Examples** - -```javascript -inspect(normal(5, 2)); // logs "normal(5, 2)" to the javascript console and returns the distribution. -``` - ## Normalization There are some situations where computation will return unnormalized distributions. This means that their cumulative sums are not equal to 1.0. Unnormalized distributions are not valid for many relevant functions; for example, klDivergence and scoring. @@ -412,7 +388,7 @@ The only functions that do not return normalized distributions are the pointwise ### normalize -Normalize a distribution. This means scaling it appropriately so that it's cumulative sum is equal to 1. +Normalize a distribution. This means scaling it appropriately so that it's cumulative sum is equal to 1. This only impacts Pointset distributions, because those are the only ones that can be non-normlized. ``` normalize: (distribution) => distribution @@ -604,69 +580,3 @@ dotPow: (distributionLike, distributionLike) => distribution ``` dotExp: (distributionLike, distributionLike) => distribution ``` - -## Scale Arithmetic Operations - - -

- We're planning on removing scale operations in favor of more general - functions soon. -

-
- -Scale operations are similar to pointwise operations, but operate on a constant y-value instead of y-values coming from a distribution. You can think about this as scaling a distribution vertically by a constant. - -The following items would be equivalent. - -```js -scalePow(normal(5,2), 2) -mapY(normal(5,2), {|y| y ^ 2}) // Not yet available -``` - -### scalePow - -``` -scalePow: (distributionLike, number) => distribution -``` - -### scaleExp - -``` -scaleExp: (distributionLike, number) => distribution -``` - -### scaleLog - -``` -scaleLog: (distributionLike, number) => distribution -``` - -### scaleLog10 - -``` -scaleLog10: (distributionLike, number) => distribution -``` - -## Special - -### Declaration (Continuous Functions) - -Adds metadata to a function of the input ranges. Works now for numeric and date inputs. This is useful when making formal predictions. It allows you to limit the domain that your prediction will be used and scored within. - -Declarations are currently experimental and will likely be removed or changed in the future. - -``` -declareFn: (dict<{fn: lambda, inputs: array>}>) => declaration -``` - -**Examples** - -```javascript -declareFn({ - fn: {|a,b| a }, - inputs: [ - {min: 0, max: 100}, - {min: 30, max: 50} - ] -}) -``` diff --git a/packages/website/docs/Api/DistPointSet.md b/packages/website/docs/Api/DistPointSet.md index b4c4ba81..9c9c3d0d 100644 --- a/packages/website/docs/Api/DistPointSet.md +++ b/packages/website/docs/Api/DistPointSet.md @@ -3,26 +3,20 @@ sidebar_position: 4 title: Point Set Distribution --- -:::danger -These functions aren't yet implemented with these specific names. This should be changed soon -::: - Point set distributions are one of the three distribution formats. They are stored as a list of x-y coordinates representing both discrete and continuous distributions. One complication is that it's possible to represent invalid probability distributions in the point set format. For example, you can represent shapes with negative values, or shapes that are not normalized. -### make +### fromDist Converts the distribution in question into a point set distribution. If the distribution is symbolic, then it does this by taking the quantiles. If the distribution is a sample set, then it uses a version of kernel density estimation to approximate the point set format. One complication of this latter process is that if there is a high proportion of overlapping samples (samples that are exactly the same as each other), it will convert these samples into discrete point masses. Eventually we'd like to add further methods to help adjust this process. ``` -PointSet.make: (distribution) => pointSetDist +PointSet.fromDist: (distribution) => pointSetDist ``` ### makeContinuous -**TODO: Now called "toContinuousPointSet"** - Converts a set of x-y coordinates directly into a continuous distribution. ``` @@ -40,10 +34,6 @@ PointSet.makeContinuous([ ### makeDiscrete -**TODO: Now called "toDiscretePointSet"** - -Converts a set of x-y coordinates directly into a discrete distribution. - ``` PointSet.makeDiscrete: (list<{x: number, y: number}>) => pointSetDist ``` diff --git a/packages/website/docs/Api/DistSampleSet.md b/packages/website/docs/Api/DistSampleSet.md index 18005627..eaed6942 100644 --- a/packages/website/docs/Api/DistSampleSet.md +++ b/packages/website/docs/Api/DistSampleSet.md @@ -3,22 +3,42 @@ sidebar_position: 5 title: Sample Set Distribution --- -:::danger -These functions aren't yet implemented with these specific names. This should be added soon. -::: - Sample set distributions are one of the three distribution formats. Internally, they are stored as a list of numbers. It's useful to distinguish point set distributions from arbitrary lists of numbers to make it clear which functions are applicable. Monte Carlo calculations typically result in sample set distributions. All regular distribution function work on sample set distributions. In addition, there are several functions that only work on sample set distributions. -### make +### fromDist ``` -SampleSet.make: (distribution) => sampleSet -SampleSet.make: (list) => sampleSet -SampleSet.make: (() => number) => sampleSet // not yet implemented +SampleSet.fromDist: (list) => sampleSet +``` + +### fromList + +``` +SampleSet.fromList: (list) => sampleSet +``` + +### fromFn + +``` +SampleSet.fromFn: ((float) => number) => sampleSet +``` + +### toList + +``` +SampleSet.toList: (sampleSet) => list +``` + +Gets the internal samples of a sampleSet distribution. This is separate from the sampleN() function, which would shuffle the samples. toList() maintains order and length. + +**Examples** + +``` +toList(SampleSet.fromDist(normal(5,2))) ``` ### map @@ -39,16 +59,8 @@ SampleSet.map2: (sampleSet, sampleSet, ((number, number) => number)) => sampleSe SampleSet.map3: (sampleSet, sampleSet, sampleSet, ((number, number, number) => number)) => sampleSet ``` -### toList +### mapN ``` -SampleSet.toList: (sampleSet) => list -``` - -Gets the internal samples of a sampleSet distribution. This is separate from the sampleN() function, which would shuffle the samples. toList() maintains order and length. - -**Examples** - -``` -toList(toSampleSet(normal(5,2))) +SampleSet.mapN: (list, (list => number)) => sampleSet ``` diff --git a/packages/website/docs/Api/Function.md b/packages/website/docs/Api/Function.md new file mode 100644 index 00000000..1c08bb8f --- /dev/null +++ b/packages/website/docs/Api/Function.md @@ -0,0 +1,27 @@ +--- +sidebar_position: 6 +title: Function +--- + +## declare (experimental) + +Adds metadata to a function of the input ranges. Works now for numeric and date inputs. This is useful when making formal predictions. It allows you to limit the domain that your prediction will be used and scored within. + +The one function that declarations currently have is that they impact plotting. If you `declare` a single-variable function within a specific range, this specific range will be plotted. + +Declarations are currently experimental and will likely be removed or changed in the future. + +``` +Function.declare: (dict<{fn: lambda, inputs: array>}>) => declaration +``` + +**Examples** + +```javascript +Function.declare({ + fn: {|a| a+10 }, + inputs: [ + {min: 30, max: 100} + ] +}) +``` diff --git a/packages/website/docs/Api/List.md b/packages/website/docs/Api/List.md index 47d5f450..1a8ef7a8 100644 --- a/packages/website/docs/Api/List.md +++ b/packages/website/docs/Api/List.md @@ -11,8 +11,6 @@ myList = [3, normal(5, 2), "random"]; ### make -**Note: currently just called `makeList`, without the preix** - ``` List.make: (number, 'a) => list<'a> ``` @@ -37,9 +35,7 @@ toString: (list<'a>) => string length: (list<'a>) => number ``` -### up to - -**Note: currently just called `upTo`, without the preix** +### upTo ``` List.upTo: (low:number, high:number) => list diff --git a/packages/website/docs/Api/Number.mdx b/packages/website/docs/Api/Number.mdx index dda79f64..e77432a0 100644 --- a/packages/website/docs/Api/Number.mdx +++ b/packages/website/docs/Api/Number.mdx @@ -55,6 +55,12 @@ min: (list) => number mean: (list) => number ``` +### geometric mean + +``` +geomean: (list) => number +``` + ### stdev ``` @@ -117,6 +123,12 @@ product: (list) => number cumprod: (list) => list ``` +### diff + +``` +diff: (list) => list +``` + ### subtract ``` diff --git a/packages/website/docs/Discussions/Bugs.mdx b/packages/website/docs/Discussions/Bugs.mdx index a39223a9..49bf347b 100644 --- a/packages/website/docs/Discussions/Bugs.mdx +++ b/packages/website/docs/Discussions/Bugs.mdx @@ -16,7 +16,7 @@ If you take the pointwise mixture of two distributions with very different means In the following case, the mean of the mixture should be equal to the sum of the means of the parts. These are shown as the first two displayed variables. These variables diverge as the underlying distributions change. diff --git a/packages/website/docs/Discussions/Future-Features.md b/packages/website/docs/Discussions/Future-Features.md index d1b45583..6070dbba 100644 --- a/packages/website/docs/Discussions/Future-Features.md +++ b/packages/website/docs/Discussions/Future-Features.md @@ -23,12 +23,6 @@ Squiggle is still very early. The main first goal is to become stable. This mean ## Distribution Features -`Distribution.fromSamples([])` -Converts a list of samples, for example, from Guesstimate, into a distribution shape. Maybe takes a list of optional parameters. - -`Distribution.fromCoordinates({xs, ys})` -Convert XY coordinates into a distribution. Figure out a good way to do this for continuous, discrete, and mixed distributions. - [Metalog Distribution](https://en.wikipedia.org/wiki/Metalog_distribution) Add the Metalog distribution, and some convenient methods for generating these distributions. This might be a bit tricky because we might need or build a library to fit data. There's no Metalog javascript library yet, this would be pretty useful. There's already a Metalog library in Python, so that one could be used for inspiration. diff --git a/packages/website/docs/Guides/DistributionCreation.mdx b/packages/website/docs/Guides/DistributionCreation.mdx index 5e84b47f..075f036d 100644 --- a/packages/website/docs/Guides/DistributionCreation.mdx +++ b/packages/website/docs/Guides/DistributionCreation.mdx @@ -17,27 +17,27 @@ The `to` function is an easy way to generate simple distributions using predicte If both values are above zero, a `lognormal` distribution is used. If not, a `normal` distribution is used. - + When 5 to 10 is entered, both numbers are positive, so it generates a lognormal distribution with 5th and 95th percentiles at 5 and 10. - + 5 to 10 does the same thing as to(5,10). - + When -5 to 5 is entered, there's negative values, so it generates a normal distribution. This has 5th and 95th percentiles at 5 and 10. - + It's very easy to generate distributions with very long tails. If this happens, you can click the "log x scale" box to view this using a log scale. - + @@ -74,18 +74,18 @@ If both values are above zero, a `lognormal` distribution is used. If not, a `no The `mixture` mixes combines multiple distributions to create a mixture. You can optionally pass in a list of proportional weights. - + - + - + - + - + @@ -111,7 +111,7 @@ The `mixture` mixes combines multiple distributions to create a mixture. You can In this case, I have a 20% chance of spending 0 time with it. I might estimate my hours with,

@@ -125,7 +125,7 @@ mx(hours_the_project_will_take, 0, [chance_of_doing_anything, 1 - chance_of_doin very wide, just in case they were dramatically off for some weird reason.

+ - + - + @@ -165,7 +165,7 @@ Creates a [log-normal distribution](https://en.wikipedia.org/wiki/Log-normal_dis you take the log of our lognormal distribution. They can be difficult to directly reason about. Because of this complexity, we recommend typically using the
to syntax instead of estimating `mu` and `sigma` directly. - + ### Arguments @@ -185,7 +185,7 @@ Because of this complexity, we recommend typically using the to ) with the given low and high values. - + ### Arguments @@ -234,21 +234,21 @@ with values at 1 and 2. Therefore, this is the same as `mixture(pointMass(1),poi `pointMass()` distributions are currently the only discrete distributions accessible in Squiggle. - + - + - + - + - + - + @@ -259,24 +259,31 @@ with values at 1 and 2. Therefore, this is the same as `mixture(pointMass(1),poi ## Beta `beta(alpha:number, beta:number)` +`beta({mean: number, stdev: number})` Creates a [beta distribution](https://en.wikipedia.org/wiki/Beta_distribution) with the given `alpha` and `beta` values. For a good summary of the beta distribution, see [this explanation](https://stats.stackexchange.com/a/47782) on Stack Overflow. - + - + - + - + - + - + + + + @@ -293,18 +300,18 @@ Creates a [beta distribution](https://en.wikipedia.org/wiki/Beta_distribution) w

Examples - + - + - + - + - +
@@ -316,7 +323,7 @@ Creates a [beta distribution](https://en.wikipedia.org/wiki/Beta_distribution) w Creates an [exponential distribution](https://en.wikipedia.org/wiki/Exponential_distribution) with the given rate. - + ### Arguments @@ -334,15 +341,15 @@ Creates a [triangular distribution](https://en.wikipedia.org/wiki/Triangular_dis - `mode`: Number greater than `low` - `high`: Number greater than `mode` - + -## FromSamples +## FromList -`fromSamples(samples:number[])` +`SampleSet.fromList(samples:number[])` Creates a sample set distribution using an array of samples. - + ### Arguments diff --git a/packages/website/docs/Guides/Functions.mdx b/packages/website/docs/Guides/Functions.mdx index be579834..843cf888 100644 --- a/packages/website/docs/Guides/Functions.mdx +++ b/packages/website/docs/Guides/Functions.mdx @@ -16,7 +16,7 @@ the value of one random sample chosen from the first distribution and the value chosen from the second distribution. @@ -28,7 +28,7 @@ the distribution of the value of one random sample chosen from the first distrib the value of one random sample chosen from the second distribution. @@ -40,14 +40,14 @@ the value of one random sample chosen from the first distribution times the valu chosen from the second distribution. We also provide concatenation of two distributions as a syntax sugar for `*` - + ### Division @@ -58,7 +58,7 @@ chosen from the second distribution. If the second distribution has some values tends to be particularly unstable. @@ -69,12 +69,12 @@ A projection over a contracted x-axis. The exponentiation operation represents t the exponentiation of the value of one random sample chosen from the first distribution to the power of the value one random sample chosen from the second distribution. - + ### Taking the base `e` exponential @@ -83,22 +83,15 @@ exp(dist)`} A projection over a stretched x-axis. - + Base `x` - + #### Validity @@ -113,45 +106,25 @@ For every point on the x-axis, operate the corresponding points in the y axis of TODO: this isn't in the new interpreter/parser yet. - + ### Pointwise subtraction TODO: this isn't in the new interpreter/parser yet. - + ### Pointwise multiplication - + ### Pointwise division - + ### Pointwise exponentiation - + ## Standard functions on distributions @@ -160,7 +133,7 @@ dist1 .^ dist2`} The `pdf(dist, x)` function returns the density of a distribution at the given point x. - + #### Validity @@ -172,7 +145,7 @@ given point x. The `cdf(dist, x)` gives the cumulative probability of the distribution or all values lower than x. It is the inverse of `quantile`. - + #### Validity @@ -185,7 +158,7 @@ The `quantile(dist, prob)` gives the value x or which the probability for all va lower than x is equal to prob. It is the inverse of `cdf`. In the literature, it is also known as the quantiles function. - + #### Validity @@ -196,33 +169,27 @@ is also known as the quantiles function. The `mean(distribution)` function gives the mean (expected value) of a distribution. - + ### Sampling a distribution The `sample(distribution)` samples a given distribution. - + ## Converting between distribution formats Recall the [three formats of distributions](https://develop--squiggle-documentation.netlify.app/docs/Discussions/Three-Types-Of-Distributions). We can force any distribution into `SampleSet` format - + Or `PointSet` format - - -### `toSampleSet` has two signatures - -Above, we saw the unary `toSampleSet`, which uses an internal hardcoded number of samples. If you'd like to provide the number of samples, it has a binary signature as well (floored) - - + #### Validity -- Second argument to `toSampleSet` must be a number. +- Second argument to `SampleSet.fromDist` must be a number. ## Normalization @@ -230,13 +197,13 @@ Some distribution operations (like horizontal shift) return an unnormalized dist We provide a `normalize` function - + #### Validity - Input to `normalize` must be a dist We provide a predicate `isNormalized`, for when we have simple control flow - + #### Validity @@ -246,7 +213,7 @@ We provide a predicate `isNormalized`, for when we have simple control flow You may like to debug by right clicking your browser and using the _inspect_ functionality on the webpage, and viewing the _console_ tab. Then, wrap your squiggle output with `inspect` to log an internal representation. - + Save for a logging side effect, `inspect` does nothing to input and returns it. @@ -254,12 +221,12 @@ Save for a logging side effect, `inspect` does nothing to input and returns it. You can cut off from the left - + You can cut off from the right - + You can cut off from both sides - + diff --git a/packages/website/docs/Guides/Language.mdx b/packages/website/docs/Guides/Language.mdx index 4cfd9ea8..90ee25b5 100644 --- a/packages/website/docs/Guides/Language.mdx +++ b/packages/website/docs/Guides/Language.mdx @@ -7,46 +7,46 @@ import { SquiggleEditor } from "../../src/components/SquiggleEditor"; ## Expressions -### Distributions - - - ### Numbers - + -### Arrays +### Distributions -### Records +### Lists + + + +### Dictionaries + + -## Statements - -A statement assigns expressions to names. It looks like ` = ` - - - ### Functions -We can define functions - +### Anonymous Functions + + + ## See more - [Distribution creation](./DistributionCreation) diff --git a/packages/website/docs/Internal/ImportIntoMdx.mdx b/packages/website/docs/Internal/ImportIntoMdx.mdx new file mode 100644 index 00000000..683f9311 --- /dev/null +++ b/packages/website/docs/Internal/ImportIntoMdx.mdx @@ -0,0 +1,37 @@ +--- +title: How to import squiggle files into `.mdx` documents +sidebar_position: 5 +--- + +import { SquiggleEditorWithImportedBindings } from "../../src/components/SquiggleEditor"; + +_Proof of concept_ + +## Consider the following squiggle file + +In our docusaurus repo, we have a static asset called `demo.squiggle`. It looks like this + +```js +x = 1 to 2 +y = {a: x, b: 1e1} +f(t) = normal(t, 1.1) +z = y.b * y.a +``` + +We can call `f(z)` upon the assignments in `demo.squiggle` like so: + +```jsx +import { SquiggleEditorWithImportedBindings } from "../../src/components/SquiggleEditor"; + +; +``` + +Which would then look exactly like + + diff --git a/packages/website/docs/Introduction.md b/packages/website/docs/Introduction.md index 35ff63b6..22359de2 100644 --- a/packages/website/docs/Introduction.md +++ b/packages/website/docs/Introduction.md @@ -3,14 +3,28 @@ sidebar_position: 1 title: Introduction --- -Squiggle is an _estimation language_, and a syntax for _calculating and expressing beliefs_ involving uncertainty. It has use cases in forecasting and writing evaluations. +Squiggle is a simple programming language for intuitive probabilistic estimation. It's meant for quantitative forecasting and evaluations. + +The basics of Squiggle can be pretty simple and intuitive. The more advanced functionality can take some time to learn. + +## What Squiggle Is + +- A simple programming language for doing math with probability distributions +- An embeddable language that can be used in Javascript applications +- A tool to embed functions as forecasts that can be embedded in other applications + +## What Squiggle Is Not + +- A complete replacement for enterprise Risk Analysis tools (See Crystal Ball, @Risk, Lumina Analytica) +- A Probabilistic Programming Language with backwards inference and sophisticated sampling algorithms. (See [PPLs](https://en.wikipedia.org/wiki/Probabilistic_programming)) +- A visual tool aimed at casual users (see Guesstimate, Causal) ## Get started - [Gallery](./Discussions/Gallery) - [Squiggle playground](/playground) - [Language basics](./Guides/Language) -- [Squiggle functions source of truth](./docs/Guides/Functions) +- [Squiggle functions source of truth](./Guides/Functions) - [Known bugs](./Discussions/Bugs) - [Original lesswrong sequence](https://www.lesswrong.com/s/rDe8QE5NvXcZYzgZ3) - [Author your squiggle models as Observable notebooks](https://observablehq.com/@hazelfire/squiggle) diff --git a/packages/website/docusaurus.config.js b/packages/website/docusaurus.config.js index 68baf7c8..dd1879fb 100644 --- a/packages/website/docusaurus.config.js +++ b/packages/website/docusaurus.config.js @@ -10,7 +10,8 @@ const path = require("path"); /** @type {import('@docusaurus/types').Config} */ const config = { title: "Squiggle", - tagline: "An estimation language for forecasters", + tagline: + "A simple programming language for intuitive probabilistic estimation", url: "https://squiggle-language.com", baseUrl: "/", onBrokenLinks: "throw", @@ -53,6 +54,7 @@ const config = { ({ navbar: { title: "Squiggle", + hideOnScroll: true, logo: { alt: "Squiggle Logo", src: "img/quri-logo.png", @@ -72,6 +74,11 @@ const config = { }, { to: "/blog", label: "Blog", position: "left" }, { to: "/playground", label: "Playground", position: "left" }, + { + href: "https://github.com/quantified-uncertainty/squiggle/discussions", + label: "Issues & Discussion", + position: "right", + }, { href: "https://github.com/quantified-uncertainty/squiggle", label: "GitHub", diff --git a/packages/website/package.json b/packages/website/package.json index 4f2f1992..11e83791 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -12,14 +12,17 @@ "format": "prettier --write ." }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.21", - "@docusaurus/preset-classic": "2.0.0-beta.21", - "@quri/squiggle-components": "^0.2.20", - "clsx": "^1.1.1", + "@docusaurus/core": "2.0.0-rc.1", + "@docusaurus/preset-classic": "2.0.0-rc.1", + "@heroicons/react": "^1.0.6", + "@quri/squiggle-components": "^0.2.23", + "base64-js": "^1.5.1", + "clsx": "^1.2.1", "hast-util-is-element": "2.1.2", - "prism-react-renderer": "^1.3.3", + "pako": "^2.0.4", + "prism-react-renderer": "^1.3.5", "react": "^18.1.0", - "react-dom": "^18.1.0", + "react-dom": "^18.2.0", "rehype-katex": "^5", "remark-math": "^3" }, diff --git a/packages/website/src/components/FallbackSpinner.jsx b/packages/website/src/components/FallbackSpinner.jsx new file mode 100644 index 00000000..9a888124 --- /dev/null +++ b/packages/website/src/components/FallbackSpinner.jsx @@ -0,0 +1,17 @@ +import { useEffect, useState } from "react"; +import { RefreshIcon } from "@heroicons/react/solid"; +import styles from "./FallbackSpinner.module.css"; + +export const FallbackSpinner = ({ height }) => { + const [show, setShow] = useState(/* false */ true); + useEffect(() => { + setTimeout(() => { + setShow(true); + }, 500); + }, []); + return ( +
+ {show ? : null} +
+ ); +}; diff --git a/packages/website/src/components/FallbackSpinner.module.css b/packages/website/src/components/FallbackSpinner.module.css new file mode 100644 index 00000000..e3efc0aa --- /dev/null +++ b/packages/website/src/components/FallbackSpinner.module.css @@ -0,0 +1,24 @@ +.container { + /* height must be set explicitly */ + width: 100%; + display: flex; + align-items: center; + justify-content: center; +} + +.icon { + width: 80px; + height: 80px; + color: #aaa; + + animation: spin 1s linear infinite; +} + +@keyframes spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} diff --git a/packages/website/src/components/HomepageFeatures.module.css b/packages/website/src/components/HomepageFeatures.module.css index b248eb2e..9a1b2eba 100644 --- a/packages/website/src/components/HomepageFeatures.module.css +++ b/packages/website/src/components/HomepageFeatures.module.css @@ -5,6 +5,11 @@ width: 100%; } +.features h3 { + font-family: "Lora", serif; + font-size: 1.5em; +} + .featureSvg { height: 200px; width: 200px; diff --git a/packages/website/src/components/SquiggleEditor.jsx b/packages/website/src/components/SquiggleEditor.jsx index 1bcd9b54..353fa0b2 100644 --- a/packages/website/src/components/SquiggleEditor.jsx +++ b/packages/website/src/components/SquiggleEditor.jsx @@ -1,8 +1,9 @@ import BrowserOnly from "@docusaurus/BrowserOnly"; +import { FallbackSpinner } from "./FallbackSpinner"; export function SquiggleEditor(props) { return ( - Loading...
}> + }> {() => { const LibComponent = require("@quri/squiggle-components").SquiggleEditor; @@ -11,3 +12,15 @@ export function SquiggleEditor(props) { ); } + +export function SquiggleEditorWithImportedBindings(props) { + return ( + }> + {() => { + const LibComponent = + require("@quri/squiggle-components").SquiggleEditorWithImportedBindings; + return ; + }} + + ); +} diff --git a/packages/website/src/components/SquigglePlayground.jsx b/packages/website/src/components/SquigglePlayground.jsx index 4d46e7ea..e93327a0 100644 --- a/packages/website/src/components/SquigglePlayground.jsx +++ b/packages/website/src/components/SquigglePlayground.jsx @@ -1,8 +1,9 @@ import BrowserOnly from "@docusaurus/BrowserOnly"; +import { FallbackSpinner } from "./FallbackSpinner"; export function SquigglePlayground(props) { return ( - Loading...
}> + }> {() => { const LibComponent = require("@quri/squiggle-components").SquigglePlayground; diff --git a/packages/website/src/css/custom.css b/packages/website/src/css/custom.css index 02c5ff6b..f5aa047d 100644 --- a/packages/website/src/css/custom.css +++ b/packages/website/src/css/custom.css @@ -4,27 +4,29 @@ * work well for content-centric websites. */ +@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Lato:wght@100;400;700;900&family=Lora:wght@400;500;600&display=swap"); + /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #2488df; - --ifm-color-primary-dark: #176fcd; - --ifm-color-primary-darker: #1f58cb; - --ifm-color-primary-darkest: #1e2672; - --ifm-color-primary-light: #49acd3; - --ifm-color-primary-lighter: #4fb1c7; - --ifm-color-primary-lightest: #3dbfd3; + --ifm-color-primary: #e74c0f; + --ifm-color-primary-dark: #bb4b05; + --ifm-color-primary-darker: #9d0c02; + --ifm-color-primary-darkest: #5d2200; + --ifm-color-primary-light: #e6a036; + --ifm-color-primary-lighter: #e79d1d; + --ifm-color-primary-lightest: #f5e191; --ifm-code-font-size: 95%; } /* For readability concerns, you should choose a lighter palette in dark mode. */ html[data-theme="dark"] { - --ifm-color-primary: #25c2a0; - --ifm-color-primary-dark: #21af90; - --ifm-color-primary-darker: #1fa588; - --ifm-color-primary-darkest: #1a8870; - --ifm-color-primary-light: #29d5b0; - --ifm-color-primary-lighter: #32d8b4; - --ifm-color-primary-lightest: #4fddbf; + --ifm-color-primary: #df774d; + --ifm-color-primary-dark: #db8651; + --ifm-color-primary-darker: #d7584f; + --ifm-color-primary-darkest: #b3693e; + --ifm-color-primary-light: #edb25a; + --ifm-color-primary-lighter: #ebd489; + --ifm-color-primary-lightest: #faf2d4; } .docusaurus-highlight-code-line { @@ -37,3 +39,55 @@ html[data-theme="dark"] { html[data-theme="dark"] .docusaurus-highlight-code-line { background-color: rgba(0, 0, 0, 0.3); } + +.hero h1 { + font-size: 4em; + font-weight: 900; + margin-bottom: 0.5rem; + color: rgb(230, 72, 79); + font-family: "Lato", sans-serif; +} + +.navbar__title { + font-family: "Lato", sans-serif; + font-weight: 900; + color: rgb(205, 88, 53); +} + +.hero__subtitle { + color: #888; + font-size: 1.25em; +} + +.hero__subtitle2 { + color: #ba3e3e; + font-size: 1.5em; + font-family: "Lora"; + font-weight: 500; + margin-top: 1em; + margin-left: auto; + margin-right: auto; + max-width: 500px; +} + +h1 { + font-family: "Lora", serif; + font-size: 2.5em; +} + +h2 { + font-weight: 600; +} + +.menu__link, +.navbar__item { + font-family: "Lora", serif; +} + +.navbar__item { + font-weight: 700; +} + +:root { + /* --ifm-font-family-base: 'Lora'; */ +} diff --git a/packages/website/src/pages/index.js b/packages/website/src/pages/index.js index c156bec0..05278aad 100644 --- a/packages/website/src/pages/index.js +++ b/packages/website/src/pages/index.js @@ -12,11 +12,8 @@ function HomepageHeader() {

{siteConfig.title}

-

- Early access -

-

{siteConfig.tagline}

-
+

Early Access

+

{siteConfig.tagline}

); diff --git a/packages/website/src/pages/index.module.css b/packages/website/src/pages/index.module.css index 666feb6a..e746813a 100644 --- a/packages/website/src/pages/index.module.css +++ b/packages/website/src/pages/index.module.css @@ -4,10 +4,11 @@ */ .heroBanner { - padding: 4rem 0; + padding: 2rem 0; text-align: center; position: relative; overflow: hidden; + background: rgb(255, 246, 237); } @media screen and (max-width: 966px) { diff --git a/packages/website/src/pages/playground.js b/packages/website/src/pages/playground.js index c3760c10..4192f31a 100644 --- a/packages/website/src/pages/playground.js +++ b/packages/website/src/pages/playground.js @@ -1,20 +1,66 @@ +import { deflate, inflate } from "pako"; +import { toByteArray, fromByteArray } from "base64-js"; import React from "react"; import Layout from "@theme/Layout"; import { SquigglePlayground } from "../components/SquigglePlayground"; +const HASH_PREFIX = "#code="; +function getHashData() { + if (typeof window === "undefined") { + return {}; + } + const hash = window.location.hash; + if (!hash.startsWith(HASH_PREFIX)) { + return {}; + } + try { + const compressed = toByteArray( + decodeURIComponent(hash.slice(HASH_PREFIX.length)) + ); + const text = inflate(compressed, { to: "string" }); + return JSON.parse(text); + } catch (err) { + console.error(err); + return {}; + } +} + +function setHashData(data) { + const text = JSON.stringify({ ...getHashData(), ...data }); + const compressed = deflate(text, { level: 9 }); + window.history.replaceState( + undefined, + "", + HASH_PREFIX + encodeURIComponent(fromByteArray(compressed)) + ); +} + export default function PlaygroundPage() { + const hashData = getHashData(); + if (hashData.initialSquiggleString) { + hashData.defaultCode = String(hashData.initialSquiggleString); + delete hashData.initialSquiggleString; + } + const playgroundProps = { + defaultCode: "normal(0,1)", + height: 700, + showShareButton: true, + ...hashData, + onCodeChange: (code) => setHashData({ initialSquiggleString: code }), + onSettingsChange: (settings) => { + const { showSummary, showEditor } = settings; + setHashData({ showSummary, showEditor }); + }, + }; return (
- +
); diff --git a/packages/website/static/estimates/demo.squiggle b/packages/website/static/estimates/demo.squiggle new file mode 100644 index 00000000..94ab4ac7 --- /dev/null +++ b/packages/website/static/estimates/demo.squiggle @@ -0,0 +1,4 @@ +x = 1 to 2 +y = {a: x, b: 1e1} +f(t) = normal(t, 1.1) +z = y.b * y.a diff --git a/yarn.lock b/yarn.lock index f2116088..a6b3e864 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,17 +2,24 @@ # yarn lockfile v1 -"@algolia/autocomplete-core@1.6.3": - version "1.6.3" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.6.3.tgz#76832fffb6405ac2c87bac5a040b8a31a1cdef80" - integrity sha512-dqQqRt01fX3YuVFrkceHsoCnzX0bLhrrg8itJI1NM68KjrPYQPYsE+kY8EZTCM4y8VDnhqJErR73xe/ZsV+qAA== +"@algolia/autocomplete-core@1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.7.1.tgz#025538b8a9564a9f3dd5bcf8a236d6951c76c7d1" + integrity sha512-eiZw+fxMzNQn01S8dA/hcCpoWCOCwcIIEUtHHdzN5TGB3IpzLbuhqFeTfh2OUhhgkE8Uo17+wH+QJ/wYyQmmzg== dependencies: - "@algolia/autocomplete-shared" "1.6.3" + "@algolia/autocomplete-shared" "1.7.1" -"@algolia/autocomplete-shared@1.6.3": - version "1.6.3" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.6.3.tgz#52085ce89a755977841ed0a463aa31ce8f1dea97" - integrity sha512-UV46bnkTztyADFaETfzFC5ryIdGVb2zpAoYgu0tfcuYWjhg1KbLXveFffZIrGVoboqmAk1b+jMrl6iCja1i3lg== +"@algolia/autocomplete-preset-algolia@1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.1.tgz#7dadc5607097766478014ae2e9e1c9c4b3f957c8" + integrity sha512-pJwmIxeJCymU1M6cGujnaIYcY3QPOVYZOXhFkWVM7IxKzy272BwCvMFMyc5NpG/QmiObBxjo7myd060OeTNJXg== + dependencies: + "@algolia/autocomplete-shared" "1.7.1" + +"@algolia/autocomplete-shared@1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.1.tgz#95c3a0b4b78858fed730cf9c755b7d1cd0c82c74" + integrity sha512-eTmGVqY3GeyBTT8IWiB2K5EuURAqhnumfktAEoHxfDY2o7vg2rSnO16ZtIG0fMgt3py28Vwgq42/bVEuaQV7pg== "@algolia/cache-browser-local-storage@4.13.1": version "4.13.1" @@ -147,10 +154,22 @@ dependencies: "@babel/highlight" "^7.16.7" +"@babel/code-frame@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + dependencies: + "@babel/highlight" "^7.18.6" + "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.17.10": - version "7.17.10" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.10.tgz#711dc726a492dfc8be8220028b1b92482362baab" - integrity sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw== + version "7.18.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.5.tgz#acac0c839e317038c73137fbb6ef71a1d6238471" + integrity sha512-BxhE40PVCBxVEJsSBhB6UWyAuqJRxGsAw8BdHMJ3AKGydcwuWW4kOO3HmqBQAdcq/OP+/DlTVxLvsCzRTnZuGg== + +"@babel/compat-data@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" + integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== "@babel/core@7.12.9": version "7.12.9" @@ -174,21 +193,21 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.11.1", "@babel/core@^7.12.10", "@babel/core@^7.12.3", "@babel/core@^7.15.5", "@babel/core@^7.16.0", "@babel/core@^7.18.2", "@babel/core@^7.7.2", "@babel/core@^7.7.5", "@babel/core@^7.8.0": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.2.tgz#87b2fcd7cce9becaa7f5acebdc4f09f3dd19d876" - integrity sha512-A8pri1YJiC5UnkdrWcmfZTJTV85b4UXTAfImGmCfYmax4TR9Cw8sDS0MOk++Gp2mE/BefVJ5nwy5yzqNJbP/DQ== +"@babel/core@^7.1.0", "@babel/core@^7.11.1", "@babel/core@^7.12.10", "@babel/core@^7.12.3", "@babel/core@^7.15.5", "@babel/core@^7.16.0", "@babel/core@^7.18.6", "@babel/core@^7.7.2", "@babel/core@^7.7.5", "@babel/core@^7.8.0": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.6.tgz#54a107a3c298aee3fe5e1947a6464b9b6faca03d" + integrity sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ== dependencies: "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.18.2" - "@babel/helper-compilation-targets" "^7.18.2" - "@babel/helper-module-transforms" "^7.18.0" - "@babel/helpers" "^7.18.2" - "@babel/parser" "^7.18.0" - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.18.2" - "@babel/types" "^7.18.2" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.6" + "@babel/helper-compilation-targets" "^7.18.6" + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helpers" "^7.18.6" + "@babel/parser" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.6" + "@babel/types" "^7.18.6" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -204,31 +223,31 @@ eslint-visitor-keys "^2.1.0" semver "^6.3.0" -"@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.18.2", "@babel/generator@^7.7.2": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d" - integrity sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw== +"@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.18.6", "@babel/generator@^7.18.7", "@babel/generator@^7.7.2": + version "7.18.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.7.tgz#2aa78da3c05aadfc82dbac16c99552fc802284bd" + integrity sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A== dependencies: - "@babel/types" "^7.18.2" - "@jridgewell/gen-mapping" "^0.3.0" + "@babel/types" "^7.18.7" + "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" -"@babel/helper-annotate-as-pure@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862" - integrity sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw== +"@babel/helper-annotate-as-pure@^7.16.7", "@babel/helper-annotate-as-pure@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" + integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== dependencies: - "@babel/types" "^7.16.7" + "@babel/types" "^7.18.6" -"@babel/helper-builder-binary-assignment-operator-visitor@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz#38d138561ea207f0f69eb1626a418e4f7e6a580b" - integrity sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA== +"@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz#f14d640ed1ee9246fb33b8255f08353acfe70e6a" + integrity sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw== dependencies: - "@babel/helper-explode-assignable-expression" "^7.16.7" - "@babel/types" "^7.16.7" + "@babel/helper-explode-assignable-expression" "^7.18.6" + "@babel/types" "^7.18.6" -"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.16.7", "@babel/helper-compilation-targets@^7.17.10", "@babel/helper-compilation-targets@^7.18.2": +"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.17.10": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz#67a85a10cbd5fc7f1457fec2e7f45441dc6c754b" integrity sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ== @@ -238,18 +257,28 @@ browserslist "^4.20.2" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.17.12", "@babel/helper-create-class-features-plugin@^7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.0.tgz#fac430912606331cb075ea8d82f9a4c145a4da19" - integrity sha512-Kh8zTGR9de3J63e5nS0rQUdRs/kbtwoeQQ0sriS0lItjC96u8XXZN6lKpuyWd2coKSU13py/y+LTmThLuVX0Pg== +"@babel/helper-compilation-targets@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz#18d35bfb9f83b1293c22c55b3d576c1315b6ed96" + integrity sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg== dependencies: - "@babel/helper-annotate-as-pure" "^7.16.7" - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-function-name" "^7.17.9" - "@babel/helper-member-expression-to-functions" "^7.17.7" - "@babel/helper-optimise-call-expression" "^7.16.7" - "@babel/helper-replace-supers" "^7.16.7" - "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/compat-data" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.20.2" + semver "^6.3.0" + +"@babel/helper-create-class-features-plugin@^7.17.12", "@babel/helper-create-class-features-plugin@^7.18.0", "@babel/helper-create-class-features-plugin@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz#6f15f8459f3b523b39e00a99982e2c040871ed72" + integrity sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-function-name" "^7.18.6" + "@babel/helper-member-expression-to-functions" "^7.18.6" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/helper-replace-supers" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" "@babel/helper-create-regexp-features-plugin@^7.16.7", "@babel/helper-create-regexp-features-plugin@^7.17.12": version "7.17.12" @@ -259,6 +288,14 @@ "@babel/helper-annotate-as-pure" "^7.16.7" regexpu-core "^5.0.1" +"@babel/helper-create-regexp-features-plugin@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz#3e35f4e04acbbf25f1b3534a657610a000543d3c" + integrity sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + regexpu-core "^5.1.0" + "@babel/helper-define-polyfill-provider@^0.1.5": version "0.1.5" resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.1.5.tgz#3c2f91b7971b9fc11fe779c945c014065dea340e" @@ -292,14 +329,19 @@ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz#8a6d2dedb53f6bf248e31b4baf38739ee4a637bd" integrity sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ== -"@babel/helper-explode-assignable-expression@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz#12a6d8522fdd834f194e868af6354e8650242b7a" - integrity sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ== - dependencies: - "@babel/types" "^7.16.7" +"@babel/helper-environment-visitor@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz#b7eee2b5b9d70602e59d1a6cad7dd24de7ca6cd7" + integrity sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q== -"@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.17.9": +"@babel/helper-explode-assignable-expression@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" + integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-function-name@^7.17.9": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== @@ -307,12 +349,20 @@ "@babel/template" "^7.16.7" "@babel/types" "^7.17.0" -"@babel/helper-hoist-variables@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz#86bcb19a77a509c7b77d0e22323ef588fa58c246" - integrity sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg== +"@babel/helper-function-name@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz#8334fecb0afba66e6d87a7e8c6bb7fed79926b83" + integrity sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw== dependencies: - "@babel/types" "^7.16.7" + "@babel/template" "^7.18.6" + "@babel/types" "^7.18.6" + +"@babel/helper-hoist-variables@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" + integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== + dependencies: + "@babel/types" "^7.18.6" "@babel/helper-member-expression-to-functions@^7.17.7": version "7.17.7" @@ -321,6 +371,13 @@ dependencies: "@babel/types" "^7.17.0" +"@babel/helper-member-expression-to-functions@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz#44802d7d602c285e1692db0bad9396d007be2afc" + integrity sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz#25612a8091a999704461c8a222d0efec5d091437" @@ -328,7 +385,14 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.18.0": +"@babel/helper-module-imports@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" + integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-module-transforms@^7.12.1": version "7.18.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.0.tgz#baf05dec7a5875fb9235bd34ca18bad4e21221cd" integrity sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA== @@ -342,6 +406,20 @@ "@babel/traverse" "^7.18.0" "@babel/types" "^7.18.0" +"@babel/helper-module-transforms@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.8.tgz#4f8408afead0188cfa48672f9d0e5787b61778c8" + integrity sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA== + dependencies: + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.8" + "@babel/types" "^7.18.8" + "@babel/helper-optimise-call-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz#a34e3560605abbd31a18546bd2aad3e6d9a174f2" @@ -349,26 +427,34 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-optimise-call-expression@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" + integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-plugin-utils@7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.17.12", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz#86c2347da5acbf5583ba0a10aed4c9bf9da9cf96" - integrity sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.17.12", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz#9448974dd4fb1d80fefe72e8a0af37809cd30d6d" + integrity sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg== -"@babel/helper-remap-async-to-generator@^7.16.8": - version "7.16.8" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz#29ffaade68a367e2ed09c90901986918d25e57e3" - integrity sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw== +"@babel/helper-remap-async-to-generator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz#fa1f81acd19daee9d73de297c0308783cd3cfc23" + integrity sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ== dependencies: - "@babel/helper-annotate-as-pure" "^7.16.7" - "@babel/helper-wrap-function" "^7.16.8" - "@babel/types" "^7.16.8" + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-wrap-function" "^7.18.6" + "@babel/types" "^7.18.6" -"@babel/helper-replace-supers@^7.16.7", "@babel/helper-replace-supers@^7.18.2": +"@babel/helper-replace-supers@^7.18.2": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.18.2.tgz#41fdfcc9abaf900e18ba6e5931816d9062a7b2e0" integrity sha512-XzAIyxx+vFnrOxiQrToSUOzUOn0e1J2Li40ntddek1Y69AXUTXoDJ40/D5RdjFu7s7qHiaeoTiempZcbuVXh2Q== @@ -379,13 +465,31 @@ "@babel/traverse" "^7.18.2" "@babel/types" "^7.18.2" -"@babel/helper-simple-access@^7.17.7", "@babel/helper-simple-access@^7.18.2": +"@babel/helper-replace-supers@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz#efedf51cfccea7b7b8c0f00002ab317e7abfe420" + integrity sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g== + dependencies: + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-member-expression-to-functions" "^7.18.6" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/traverse" "^7.18.6" + "@babel/types" "^7.18.6" + +"@babel/helper-simple-access@^7.17.7": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.2.tgz#4dc473c2169ac3a1c9f4a51cfcd091d1c36fcff9" integrity sha512-7LIrjYzndorDY88MycupkpQLKS1AFfsVRm2k/9PtKScSy5tZq0McZTj+DiMRynboZfIqOKvo03pmhTaUgiD6fQ== dependencies: "@babel/types" "^7.18.2" +"@babel/helper-simple-access@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" + integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-skip-transparent-expression-wrappers@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz#0ee3388070147c3ae051e487eca3ebb0e2e8bb09" @@ -393,6 +497,13 @@ dependencies: "@babel/types" "^7.16.0" +"@babel/helper-skip-transparent-expression-wrappers@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz#7dff00a5320ca4cf63270e5a0eca4b268b7380d9" + integrity sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-split-export-declaration@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b" @@ -400,27 +511,44 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-split-export-declaration@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" + integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-validator-identifier@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== +"@babel/helper-validator-identifier@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" + integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== + "@babel/helper-validator-option@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== -"@babel/helper-wrap-function@^7.16.8": - version "7.16.8" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz#58afda087c4cd235de92f7ceedebca2c41274200" - integrity sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw== - dependencies: - "@babel/helper-function-name" "^7.16.7" - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.16.8" - "@babel/types" "^7.16.8" +"@babel/helper-validator-option@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" + integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== -"@babel/helpers@^7.12.5", "@babel/helpers@^7.18.2": +"@babel/helper-wrap-function@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz#ec44ea4ad9d8988b90c3e465ba2382f4de81a073" + integrity sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw== + dependencies: + "@babel/helper-function-name" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.6" + "@babel/types" "^7.18.6" + +"@babel/helpers@^7.12.5": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.2.tgz#970d74f0deadc3f5a938bfa250738eb4ac889384" integrity sha512-j+d+u5xT5utcQSzrh9p+PaJX94h++KN+ng9b9WEJq7pkUPAd61FGqhjuUEdfknb3E/uDBb7ruwEeKkIxNJPIrg== @@ -429,6 +557,15 @@ "@babel/traverse" "^7.18.2" "@babel/types" "^7.18.2" +"@babel/helpers@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.6.tgz#4c966140eaa1fcaa3d5a8c09d7db61077d4debfd" + integrity sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ== + dependencies: + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.6" + "@babel/types" "^7.18.6" + "@babel/highlight@^7.16.7": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.12.tgz#257de56ee5afbd20451ac0a75686b6b404257351" @@ -438,37 +575,52 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.18.0", "@babel/parser@^7.18.3": - version "7.18.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef" - integrity sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow== - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.17.12.tgz#1dca338caaefca368639c9ffb095afbd4d420b1e" - integrity sha512-xCJQXl4EeQ3J9C4yOmpTrtVGmzpm2iSzyxbkZHw7UCnZBftHpF/hpII80uWVyVrc40ytIClHjgWGTG1g/yB+aw== +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-validator-identifier" "^7.18.6" + chalk "^2.0.0" + js-tokens "^4.0.0" -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.17.12.tgz#0d498ec8f0374b1e2eb54b9cb2c4c78714c77753" - integrity sha512-/vt0hpIw0x4b6BLKUkwlvEoiGZYYLNZ96CzyHYPbtG2jZGz6LBe7/V+drYrc/d+ovrF9NBi0pmtvmNb/FsWtRQ== - dependencies: - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" - "@babel/plugin-proposal-optional-chaining" "^7.17.12" +"@babel/parser@^7.1.0", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7": + version "7.18.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.5.tgz#337062363436a893a2d22faa60be5bb37091c83c" + integrity sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw== -"@babel/plugin-proposal-async-generator-functions@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.17.12.tgz#094a417e31ce7e692d84bab06c8e2a607cbeef03" - integrity sha512-RWVvqD1ooLKP6IqWTA5GyFVX2isGEgC5iFxKzfYOIy/QEFdxYyCybBDtIGjipHpb9bDWHzcqGqFakf+mVmBTdQ== +"@babel/parser@^7.18.6", "@babel/parser@^7.18.8": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.8.tgz#822146080ac9c62dac0823bb3489622e0bc1cbdf" + integrity sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA== + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" + integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-remap-async-to-generator" "^7.16.8" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.6.tgz#b4e4dbc2cd1acd0133479918f7c6412961c9adb8" + integrity sha512-Udgu8ZRgrBrttVz6A0EVL0SJ1z+RLbIeqsu632SA1hf0awEppD6TvdznoH+orIF8wtFFAV/Enmw9Y+9oV8TQcw== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.6" + "@babel/plugin-proposal-optional-chaining" "^7.18.6" + +"@babel/plugin-proposal-async-generator-functions@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz#aedac81e6fc12bb643374656dd5f2605bf743d17" + integrity sha512-WAz4R9bvozx4qwf74M+sfqPMKfSqwM0phxPTR6iJIi8robgzXwkEgmeJG1gEKhm6sDqT/U9aV3lfcqybIpev8w== + dependencies: + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-remap-async-to-generator" "^7.18.6" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-proposal-class-properties@^7.12.1", "@babel/plugin-proposal-class-properties@^7.16.0", "@babel/plugin-proposal-class-properties@^7.17.12": +"@babel/plugin-proposal-class-properties@^7.12.1", "@babel/plugin-proposal-class-properties@^7.16.0": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.17.12.tgz#84f65c0cc247d46f40a6da99aadd6438315d80a4" integrity sha512-U0mI9q8pW5Q9EaTHFPwSVusPMV/DV9Mm8p7csqROFLtIE9rBF5piLqyrBGigftALrBcsBGu4m38JneAe7ZDLXw== @@ -476,13 +628,21 @@ "@babel/helper-create-class-features-plugin" "^7.17.12" "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-proposal-class-static-block@^7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.0.tgz#7d02253156e3c3793bdb9f2faac3a1c05f0ba710" - integrity sha512-t+8LsRMMDE74c6sV7KShIw13sqbqd58tlqNrsWoWBTIMw7SVQ0cZ905wLNS/FBCy/3PyooRHLFFlfrUNyyz5lA== +"@babel/plugin-proposal-class-properties@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" + integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.0" - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-proposal-class-static-block@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz#8aa81d403ab72d3962fc06c26e222dacfc9b9020" + integrity sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-class-static-block" "^7.14.5" "@babel/plugin-proposal-decorators@^7.12.12", "@babel/plugin-proposal-decorators@^7.16.4": @@ -497,12 +657,12 @@ "@babel/plugin-syntax-decorators" "^7.17.12" charcodes "^0.2.0" -"@babel/plugin-proposal-dynamic-import@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz#c19c897eaa46b27634a00fee9fb7d829158704b2" - integrity sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg== +"@babel/plugin-proposal-dynamic-import@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz#72bcf8d408799f547d759298c3c27c7e7faa4d94" + integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-dynamic-import" "^7.8.3" "@babel/plugin-proposal-export-default-from@^7.12.1": @@ -513,31 +673,31 @@ "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-export-default-from" "^7.16.7" -"@babel/plugin-proposal-export-namespace-from@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.17.12.tgz#b22864ccd662db9606edb2287ea5fd1709f05378" - integrity sha512-j7Ye5EWdwoXOpRmo5QmRyHPsDIe6+u70ZYZrd7uz+ebPYFKfRcLcNu3Ro0vOlJ5zuv8rU7xa+GttNiRzX56snQ== +"@babel/plugin-proposal-export-namespace-from@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.6.tgz#1016f0aa5ab383bbf8b3a85a2dcaedf6c8ee7491" + integrity sha512-zr/QcUlUo7GPo6+X1wC98NJADqmy5QTFWWhqeQWiki4XHafJtLl/YMGkmRB2szDD2IYJCCdBTd4ElwhId9T7Xw== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-proposal-json-strings@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.17.12.tgz#f4642951792437233216d8c1af370bb0fbff4664" - integrity sha512-rKJ+rKBoXwLnIn7n6o6fulViHMrOThz99ybH+hKHcOZbnN14VuMnH9fo2eHE69C8pO4uX1Q7t2HYYIDmv8VYkg== +"@babel/plugin-proposal-json-strings@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz#7e8788c1811c393aff762817e7dbf1ebd0c05f0b" + integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-proposal-logical-assignment-operators@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.17.12.tgz#c64a1bcb2b0a6d0ed2ff674fd120f90ee4b88a23" - integrity sha512-EqFo2s1Z5yy+JeJu7SFfbIUtToJTVlC61/C7WLKDntSw4Sz6JNAIfL7zQ74VvirxpjB5kz/kIx0gCcb+5OEo2Q== +"@babel/plugin-proposal-logical-assignment-operators@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz#3b9cac6f1ffc2aa459d111df80c12020dfc6b665" + integrity sha512-zMo66azZth/0tVd7gmkxOkOjs2rpHyhpcFo565PUP37hSp6hSd9uUKIfTDFMz58BwqgQKhJ9YxtM5XddjXVn+Q== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.12.1", "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.17.12": +"@babel/plugin-proposal-nullish-coalescing-operator@^7.12.1", "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.0": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.17.12.tgz#1e93079bbc2cbc756f6db6a1925157c4a92b94be" integrity sha512-ws/g3FSGVzv+VH86+QvgtuJL/kR67xaEIF2x0iPqdDfYW6ra6JF3lKVBkWynRLcNtIC1oCTfDRVxmm2mKzy+ag== @@ -545,7 +705,15 @@ "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-proposal-numeric-separator@^7.16.0", "@babel/plugin-proposal-numeric-separator@^7.16.7": +"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" + integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + +"@babel/plugin-proposal-numeric-separator@^7.16.0": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz#d6b69f4af63fb38b6ca2558442a7fb191236eba9" integrity sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw== @@ -553,6 +721,14 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-numeric-separator" "^7.10.4" +"@babel/plugin-proposal-numeric-separator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz#899b14fbafe87f053d2c5ff05b36029c62e13c75" + integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-proposal-object-rest-spread@7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz#def9bd03cea0f9b72283dac0ec22d289c7691069" @@ -562,7 +738,7 @@ "@babel/plugin-syntax-object-rest-spread" "^7.8.0" "@babel/plugin-transform-parameters" "^7.12.1" -"@babel/plugin-proposal-object-rest-spread@^7.12.1", "@babel/plugin-proposal-object-rest-spread@^7.18.0": +"@babel/plugin-proposal-object-rest-spread@^7.12.1": version "7.18.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.0.tgz#79f2390c892ba2a68ec112eb0d895cfbd11155e8" integrity sha512-nbTv371eTrFabDfHLElkn9oyf9VG+VKK6WMzhY2o4eHKaG19BToD9947zzGMO6I/Irstx9d8CwX6njPNIAR/yw== @@ -573,15 +749,26 @@ "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-transform-parameters" "^7.17.12" -"@babel/plugin-proposal-optional-catch-binding@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz#c623a430674ffc4ab732fd0a0ae7722b67cb74cf" - integrity sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA== +"@babel/plugin-proposal-object-rest-spread@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz#ec93bba06bfb3e15ebd7da73e953d84b094d5daf" + integrity sha512-9yuM6wr4rIsKa1wlUAbZEazkCrgw2sMPEXCr4Rnwetu7cEW1NydkCWytLuYletbf8vFxdJxFhwEZqMpOx2eZyw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/compat-data" "^7.18.6" + "@babel/helper-compilation-targets" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.18.6" + +"@babel/plugin-proposal-optional-catch-binding@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz#f9400d0e6a3ea93ba9ef70b09e72dd6da638a2cb" + integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@^7.12.7", "@babel/plugin-proposal-optional-chaining@^7.16.0", "@babel/plugin-proposal-optional-chaining@^7.17.12": +"@babel/plugin-proposal-optional-chaining@^7.12.7", "@babel/plugin-proposal-optional-chaining@^7.16.0": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.17.12.tgz#f96949e9bacace3a9066323a5cf90cfb9de67174" integrity sha512-7wigcOs/Z4YWlK7xxjkvaIw84vGhDv/P1dFGQap0nHkc8gFKY/r+hXc8Qzf5k1gY7CvGIcHqAnOagVKJJ1wVOQ== @@ -590,7 +777,16 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -"@babel/plugin-proposal-private-methods@^7.12.1", "@babel/plugin-proposal-private-methods@^7.16.0", "@babel/plugin-proposal-private-methods@^7.17.12": +"@babel/plugin-proposal-optional-chaining@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz#46d4f2ffc20e87fad1d98bc4fa5d466366f6aa0b" + integrity sha512-PatI6elL5eMzoypFAiYDpYQyMtXTn+iMhuxxQt5mAXD4fEmKorpSI3PHd+i3JXBJN3xyA6MvJv7at23HffFHwA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.6" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + +"@babel/plugin-proposal-private-methods@^7.12.1", "@babel/plugin-proposal-private-methods@^7.16.0": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.17.12.tgz#c2ca3a80beb7539289938da005ad525a038a819c" integrity sha512-SllXoxo19HmxhDWm3luPz+cPhtoTSKLJE9PXshsfrOzBqs60QP0r8OaJItrPhAj0d7mZMnNF0Y1UUggCDgMz1A== @@ -598,17 +794,33 @@ "@babel/helper-create-class-features-plugin" "^7.17.12" "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-proposal-private-property-in-object@^7.12.1", "@babel/plugin-proposal-private-property-in-object@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.17.12.tgz#b02efb7f106d544667d91ae97405a9fd8c93952d" - integrity sha512-/6BtVi57CJfrtDNKfK5b66ydK2J5pXUKBKSPD2G1whamMuEnZWgoOIfO8Vf9F/DoD4izBLD/Au4NMQfruzzykg== +"@babel/plugin-proposal-private-methods@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea" + integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== dependencies: - "@babel/helper-annotate-as-pure" "^7.16.7" - "@babel/helper-create-class-features-plugin" "^7.17.12" - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-proposal-private-property-in-object@^7.12.1", "@babel/plugin-proposal-private-property-in-object@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz#a64137b232f0aca3733a67eb1a144c192389c503" + integrity sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" -"@babel/plugin-proposal-unicode-property-regex@^7.17.12", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": +"@babel/plugin-proposal-unicode-property-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" + integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-proposal-unicode-property-regex@^7.4.4": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.17.12.tgz#3dbd7a67bd7f94c8238b394da112d86aaf32ad4d" integrity sha512-Wb9qLjXf3ZazqXA7IvI7ozqRIXIGPtSo+L5coFmEkhTQK18ao4UDDD0zdTGAarmbLj2urpRwrc6893cu5Bfh0A== @@ -679,12 +891,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-syntax-import-assertions@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.17.12.tgz#58096a92b11b2e4e54b24c6a0cc0e5e607abcedd" - integrity sha512-n/loy2zkq9ZEM8tEOwON9wTQSTNDTDEz6NujPtJGLU7qObzT1N4c4YZZf8E6ATB2AjNQg/Ib2AIpO03EZaCehw== +"@babel/plugin-syntax-import-assertions@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz#cd6190500a4fa2fe31990a963ffab4b63e4505e4" + integrity sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" @@ -714,6 +926,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.17.12" +"@babel/plugin-syntax-jsx@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" + integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" @@ -770,44 +989,65 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-typescript@^7.17.12", "@babel/plugin-syntax-typescript@^7.7.2": +"@babel/plugin-syntax-typescript@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz#1c09cd25795c7c2b8a4ba9ae49394576d4133285" + integrity sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-syntax-typescript@^7.7.2": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.12.tgz#b54fc3be6de734a56b87508f99d6428b5b605a7b" integrity sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw== dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-arrow-functions@^7.12.1", "@babel/plugin-transform-arrow-functions@^7.17.12": +"@babel/plugin-transform-arrow-functions@^7.12.1": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.17.12.tgz#dddd783b473b1b1537ef46423e3944ff24898c45" integrity sha512-PHln3CNi/49V+mza4xMwrg+WGYevSF1oaiXaC2EQfdp4HWlSjRsrDXWJiQBKpP7749u6vQ9mcry2uuFOv5CXvA== dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-async-to-generator@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.17.12.tgz#dbe5511e6b01eee1496c944e35cdfe3f58050832" - integrity sha512-J8dbrWIOO3orDzir57NRsjg4uxucvhby0L/KZuGsWDj0g7twWK3g7JhJhOrXtuXiw8MeiSdJ3E0OW9H8LYEzLQ== +"@babel/plugin-transform-arrow-functions@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz#19063fcf8771ec7b31d742339dac62433d0611fe" + integrity sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ== dependencies: - "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-remap-async-to-generator" "^7.16.8" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-block-scoped-functions@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz#4d0d57d9632ef6062cdf354bb717102ee042a620" - integrity sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg== +"@babel/plugin-transform-async-to-generator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz#ccda3d1ab9d5ced5265fdb13f1882d5476c71615" + integrity sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-remap-async-to-generator" "^7.18.6" -"@babel/plugin-transform-block-scoping@^7.12.12", "@babel/plugin-transform-block-scoping@^7.17.12": +"@babel/plugin-transform-block-scoped-functions@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" + integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-block-scoping@^7.12.12": version "7.18.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.4.tgz#7988627b3e9186a13e4d7735dc9c34a056613fb9" integrity sha512-+Hq10ye+jlvLEogSOtq4mKvtk7qwcUQ1f0Mrueai866C82f844Yom2cttfJdMdqRLTxWpsbfbkIkOIfovyUQXw== dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-classes@^7.12.1", "@babel/plugin-transform-classes@^7.17.12": +"@babel/plugin-transform-block-scoping@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz#b5f78318914615397d86a731ef2cc668796a726c" + integrity sha512-pRqwb91C42vs1ahSAWJkxOxU1RHWDn16XAa6ggQ72wjLlWyYeAcLvTtE0aM8ph3KNydy9CQF2nLYcjq1WysgxQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-classes@^7.12.1": version "7.18.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.4.tgz#51310b812a090b846c784e47087fa6457baef814" integrity sha512-e42NSG2mlKWgxKUAD9EJJSkZxR67+wZqzNxLSpc51T8tRU5SLFHsPmgYR5yr7sdgX4u+iHA1C5VafJ6AyImV3A== @@ -821,21 +1061,50 @@ "@babel/helper-split-export-declaration" "^7.16.7" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.17.12.tgz#bca616a83679698f3258e892ed422546e531387f" - integrity sha512-a7XINeplB5cQUWMg1E/GI1tFz3LfK021IjV1rj1ypE+R7jHm+pIHmHl25VNkZxtx9uuYp7ThGk8fur1HHG7PgQ== +"@babel/plugin-transform-classes@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.8.tgz#7e85777e622e979c85c701a095280360b818ce49" + integrity sha512-RySDoXdF6hgHSHuAW4aLGyVQdmvEX/iJtjVre52k0pxRq4hzqze+rAVP++NmNv596brBpYmaiKgTZby7ziBnVg== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-function-name" "^7.18.6" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-replace-supers" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + globals "^11.1.0" -"@babel/plugin-transform-destructuring@^7.12.1", "@babel/plugin-transform-destructuring@^7.18.0": +"@babel/plugin-transform-computed-properties@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz#5d15eb90e22e69604f3348344c91165c5395d032" + integrity sha512-9repI4BhNrR0KenoR9vm3/cIc1tSBIo+u1WVjKCAynahj25O8zfbiE6JtAtHPGQSs4yZ+bA8mRasRP+qc+2R5A== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-destructuring@^7.12.1": version "7.18.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.0.tgz#dc4f92587e291b4daa78aa20cc2d7a63aa11e858" integrity sha512-Mo69klS79z6KEfrLg/1WkmVnB8javh75HX4pi2btjvlIoasuxilEyjtsQW6XPrubNd7AQy0MMaNIaQE4e7+PQw== dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-dotall-regex@^7.16.7", "@babel/plugin-transform-dotall-regex@^7.4.4": +"@babel/plugin-transform-destructuring@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz#a98b0e42c7ffbf5eefcbcf33280430f230895c6f" + integrity sha512-tgy3u6lRp17ilY8r1kP4i2+HDUwxlVqq3RTc943eAWSzGgpU1qhiKpqZ5CMyHReIYPHdo3Kg8v8edKtDqSVEyQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-dotall-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" + integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-dotall-regex@^7.4.4": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz#6b2d67686fab15fb6a7fd4bd895d5982cfc81241" integrity sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ== @@ -843,20 +1112,20 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.7" "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-duplicate-keys@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.17.12.tgz#a09aa709a3310013f8e48e0e23bc7ace0f21477c" - integrity sha512-EA5eYFUG6xeerdabina/xIoB95jJ17mAkR8ivx6ZSu9frKShBjpOGZPn511MTDTkiCO+zXnzNczvUM69YSf3Zw== +"@babel/plugin-transform-duplicate-keys@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.6.tgz#e6c94e8cd3c9dd8a88144f7b78ae22975a7ff473" + integrity sha512-NJU26U/208+sxYszf82nmGYqVF9QN8py2HFTblPT9hbawi8+1C5a9JubODLTGFuT0qlkqVinmkwOD13s0sZktg== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-exponentiation-operator@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz#efa9862ef97e9e9e5f653f6ddc7b665e8536fe9b" - integrity sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA== +"@babel/plugin-transform-exponentiation-operator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz#421c705f4521888c65e91fdd1af951bfefd4dacd" + integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-flow-strip-types@^7.16.0", "@babel/plugin-transform-flow-strip-types@^7.17.12": version "7.17.12" @@ -866,96 +1135,103 @@ "@babel/helper-plugin-utils" "^7.17.12" "@babel/plugin-syntax-flow" "^7.17.12" -"@babel/plugin-transform-for-of@^7.12.1", "@babel/plugin-transform-for-of@^7.18.1": +"@babel/plugin-transform-for-of@^7.12.1": version "7.18.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.1.tgz#ed14b657e162b72afbbb2b4cdad277bf2bb32036" integrity sha512-+TTB5XwvJ5hZbO8xvl2H4XaMDOAK57zF4miuC9qQJgysPNEAZZ9Z69rdF5LJkozGdZrjBIUAIyKUWRMmebI7vg== dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-function-name@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz#5ab34375c64d61d083d7d2f05c38d90b97ec65cf" - integrity sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA== +"@babel/plugin-transform-for-of@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" + integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== dependencies: - "@babel/helper-compilation-targets" "^7.16.7" - "@babel/helper-function-name" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-literals@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.17.12.tgz#97131fbc6bbb261487105b4b3edbf9ebf9c830ae" - integrity sha512-8iRkvaTjJciWycPIZ9k9duu663FT7VrBdNqNgxnVXEFwOIp55JWcZd23VBRySYbnS3PwQ3rGiabJBBBGj5APmQ== +"@babel/plugin-transform-function-name@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.6.tgz#6a7e4ae2893d336fd1b8f64c9f92276391d0f1b4" + integrity sha512-kJha/Gbs5RjzIu0CxZwf5e3aTTSlhZnHMT8zPWnJMjNpLOUgqevg+PN5oMH68nMCXnfiMo4Bhgxqj59KHTlAnA== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-compilation-targets" "^7.18.6" + "@babel/helper-function-name" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-member-expression-literals@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz#6e5dcf906ef8a098e630149d14c867dd28f92384" - integrity sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw== +"@babel/plugin-transform-literals@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz#9d6af353b5209df72960baf4492722d56f39a205" + integrity sha512-x3HEw0cJZVDoENXOp20HlypIHfl0zMIhMVZEBVTfmqbObIpsMxMbmU5nOEO8R7LYT+z5RORKPlTI5Hj4OsO9/Q== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-modules-amd@^7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.0.tgz#7ef1002e67e36da3155edc8bf1ac9398064c02ed" - integrity sha512-h8FjOlYmdZwl7Xm2Ug4iX2j7Qy63NANI+NQVWQzv6r25fqgg7k2dZl03p95kvqNclglHs4FZ+isv4p1uXMA+QA== +"@babel/plugin-transform-member-expression-literals@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" + integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== dependencies: - "@babel/helper-module-transforms" "^7.18.0" - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-modules-amd@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz#8c91f8c5115d2202f277549848874027d7172d21" + integrity sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg== + dependencies: + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.18.2": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.2.tgz#1aa8efa2e2a6e818b6a7f2235fceaf09bdb31e9e" - integrity sha512-f5A865gFPAJAEE0K7F/+nm5CmAE3y8AWlMBG9unu5j9+tk50UQVK0QS8RNxSp7MJf0wh97uYyLWt3Zvu71zyOQ== +"@babel/plugin-transform-modules-commonjs@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz#afd243afba166cca69892e24a8fd8c9f2ca87883" + integrity sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q== dependencies: - "@babel/helper-module-transforms" "^7.18.0" - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-simple-access" "^7.18.2" + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.18.0": - version "7.18.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.4.tgz#3d6fd9868c735cce8f38d6ae3a407fb7e61e6d46" - integrity sha512-lH2UaQaHVOAeYrUUuZ8i38o76J/FnO8vu21OE+tD1MyP9lxdZoSfz+pDbWkq46GogUrdrMz3tiz/FYGB+bVThg== +"@babel/plugin-transform-modules-systemjs@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.6.tgz#026511b7657d63bf5d4cf2fd4aeb963139914a54" + integrity sha512-UbPYpXxLjTw6w6yXX2BYNxF3p6QY225wcTkfQCy3OMnSlS/C3xGtwUjEzGkldb/sy6PWLiCQ3NbYfjWUTI3t4g== dependencies: - "@babel/helper-hoist-variables" "^7.16.7" - "@babel/helper-module-transforms" "^7.18.0" - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-validator-identifier" "^7.16.7" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-umd@^7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.0.tgz#56aac64a2c2a1922341129a4597d1fd5c3ff020f" - integrity sha512-d/zZ8I3BWli1tmROLxXLc9A6YXvGK8egMxHp+E/rRwMh1Kip0AP77VwZae3snEJ33iiWwvNv2+UIIhfalqhzZA== +"@babel/plugin-transform-modules-umd@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz#81d3832d6034b75b54e62821ba58f28ed0aab4b9" + integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== dependencies: - "@babel/helper-module-transforms" "^7.18.0" - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-named-capturing-groups-regex@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.17.12.tgz#9c4a5a5966e0434d515f2675c227fd8cc8606931" - integrity sha512-vWoWFM5CKaTeHrdUJ/3SIOTRV+MBVGybOC9mhJkaprGNt5demMymDW24yC74avb915/mIRe3TgNb/d8idvnCRA== +"@babel/plugin-transform-named-capturing-groups-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz#c89bfbc7cc6805d692f3a49bc5fc1b630007246d" + integrity sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.17.12" - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-new-target@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.17.12.tgz#10842cd605a620944e81ea6060e9e65c265742e3" - integrity sha512-CaOtzk2fDYisbjAD4Sd1MTKGVIpRtx9bWLyj24Y/k6p4s4gQ3CqDGJauFJxt8M/LEx003d0i3klVqnN73qvK3w== +"@babel/plugin-transform-new-target@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz#d128f376ae200477f37c4ddfcc722a8a1b3246a8" + integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-object-super@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz#ac359cf8d32cf4354d27a46867999490b6c32a94" - integrity sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw== +"@babel/plugin-transform-object-super@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" + integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" - "@babel/helper-replace-supers" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-replace-supers" "^7.18.6" "@babel/plugin-transform-parameters@^7.12.1", "@babel/plugin-transform-parameters@^7.17.12": version "7.17.12" @@ -964,12 +1240,19 @@ dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-property-literals@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz#2dadac85155436f22c696c4827730e0fe1057a55" - integrity sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw== +"@babel/plugin-transform-parameters@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz#ee9f1a0ce6d78af58d0956a9378ea3427cccb48a" + integrity sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-property-literals@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" + integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-react-constant-elements@^7.12.1", "@babel/plugin-transform-react-constant-elements@^7.14.5": version "7.17.12" @@ -978,21 +1261,28 @@ dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-react-display-name@^7.16.0", "@babel/plugin-transform-react-display-name@^7.16.7": +"@babel/plugin-transform-react-display-name@^7.16.0": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz#7b6d40d232f4c0f550ea348593db3b21e2404340" integrity sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg== dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-react-jsx-development@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz#43a00724a3ed2557ed3f276a01a929e6686ac7b8" - integrity sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A== +"@babel/plugin-transform-react-display-name@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz#8b1125f919ef36ebdfff061d664e266c666b9415" + integrity sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA== dependencies: - "@babel/plugin-transform-react-jsx" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-react-jsx@^7.12.12", "@babel/plugin-transform-react-jsx@^7.16.7", "@babel/plugin-transform-react-jsx@^7.17.12": +"@babel/plugin-transform-react-jsx-development@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz#dbe5c972811e49c7405b630e4d0d2e1380c0ddc5" + integrity sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA== + dependencies: + "@babel/plugin-transform-react-jsx" "^7.18.6" + +"@babel/plugin-transform-react-jsx@^7.12.12": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.12.tgz#2aa20022709cd6a3f40b45d60603d5f269586dba" integrity sha512-Lcaw8bxd1DKht3thfD4A12dqo1X16he1Lm8rIv8sTwjAYNInRS1qHa9aJoqvzpscItXvftKDCfaEQzwoVyXpEQ== @@ -1003,49 +1293,67 @@ "@babel/plugin-syntax-jsx" "^7.17.12" "@babel/types" "^7.17.12" -"@babel/plugin-transform-react-pure-annotations@^7.16.7": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.0.tgz#ef82c8e310913f3522462c9ac967d395092f1954" - integrity sha512-6+0IK6ouvqDn9bmEG7mEyF/pwlJXVj5lwydybpyyH3D0A7Hftk+NCTdYjnLNZksn261xaOV5ksmp20pQEmc2RQ== +"@babel/plugin-transform-react-jsx@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.18.6.tgz#2721e96d31df96e3b7ad48ff446995d26bc028ff" + integrity sha512-Mz7xMPxoy9kPS/JScj6fJs03TZ/fZ1dJPlMjRAgTaxaS0fUBk8FV/A2rRgfPsVCZqALNwMexD+0Uaf5zlcKPpw== dependencies: - "@babel/helper-annotate-as-pure" "^7.16.7" - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-jsx" "^7.18.6" + "@babel/types" "^7.18.6" -"@babel/plugin-transform-regenerator@^7.18.0": - version "7.18.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.0.tgz#44274d655eb3f1af3f3a574ba819d3f48caf99d5" - integrity sha512-C8YdRw9uzx25HSIzwA7EM7YP0FhCe5wNvJbZzjVNHHPGVcDJ3Aie+qGYYdS1oVQgn+B3eAIJbWFLrJ4Jipv7nw== +"@babel/plugin-transform-react-pure-annotations@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz#561af267f19f3e5d59291f9950fd7b9663d0d844" + integrity sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-regenerator@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz#585c66cb84d4b4bf72519a34cfce761b8676ca73" + integrity sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" regenerator-transform "^0.15.0" -"@babel/plugin-transform-reserved-words@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.17.12.tgz#7dbd349f3cdffba751e817cf40ca1386732f652f" - integrity sha512-1KYqwbJV3Co03NIi14uEHW8P50Md6KqFgt0FfpHdK6oyAHQVTosgPuPSiWud1HX0oYJ1hGRRlk0fP87jFpqXZA== +"@babel/plugin-transform-reserved-words@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz#b1abd8ebf8edaa5f7fe6bbb8d2133d23b6a6f76a" + integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-runtime@^7.16.4", "@babel/plugin-transform-runtime@^7.18.2": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.2.tgz#04637de1e45ae8847ff14b9beead09c33d34374d" - integrity sha512-mr1ufuRMfS52ttq+1G1PD8OJNqgcTFjq3hwn8SZ5n1x1pBhi0E36rYMdTK0TsKtApJ4lDEdfXJwtGobQMHSMPg== +"@babel/plugin-transform-runtime@^7.16.4", "@babel/plugin-transform-runtime@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.6.tgz#77b14416015ea93367ca06979710f5000ff34ccb" + integrity sha512-8uRHk9ZmRSnWqUgyae249EJZ94b0yAGLBIqzZzl+0iEdbno55Pmlt/32JZsHwXD9k/uZj18Aqqk35wBX4CBTXA== dependencies: - "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-plugin-utils" "^7.17.12" - babel-plugin-polyfill-corejs2 "^0.3.0" - babel-plugin-polyfill-corejs3 "^0.5.0" - babel-plugin-polyfill-regenerator "^0.3.0" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + babel-plugin-polyfill-corejs2 "^0.3.1" + babel-plugin-polyfill-corejs3 "^0.5.2" + babel-plugin-polyfill-regenerator "^0.3.1" semver "^6.3.0" -"@babel/plugin-transform-shorthand-properties@^7.12.1", "@babel/plugin-transform-shorthand-properties@^7.16.7": +"@babel/plugin-transform-shorthand-properties@^7.12.1": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz#e8549ae4afcf8382f711794c0c7b6b934c5fbd2a" integrity sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg== dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-spread@^7.12.1", "@babel/plugin-transform-spread@^7.17.12": +"@babel/plugin-transform-shorthand-properties@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" + integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-spread@^7.12.1": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.17.12.tgz#c112cad3064299f03ea32afed1d659223935d1f5" integrity sha512-9pgmuQAtFi3lpNUstvG9nGfk9DkrdmWNp9KeKPFmuZCpEnxRzYlS8JgwPjYj+1AWDOSvoGN0H30p1cBOmT/Svg== @@ -1053,83 +1361,98 @@ "@babel/helper-plugin-utils" "^7.17.12" "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" -"@babel/plugin-transform-sticky-regex@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz#c84741d4f4a38072b9a1e2e3fd56d359552e8660" - integrity sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw== +"@babel/plugin-transform-spread@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz#82b080241965f1689f0a60ecc6f1f6575dbdb9d6" + integrity sha512-ayT53rT/ENF8WWexIRg9AiV9h0aIteyWn5ptfZTZQrjk/+f3WdrJGCY4c9wcgl2+MKkKPhzbYp97FTsquZpDCw== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.6" -"@babel/plugin-transform-template-literals@^7.12.1", "@babel/plugin-transform-template-literals@^7.18.2": +"@babel/plugin-transform-sticky-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz#c6706eb2b1524028e317720339583ad0f444adcc" + integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-transform-template-literals@^7.12.1": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.2.tgz#31ed6915721864847c48b656281d0098ea1add28" integrity sha512-/cmuBVw9sZBGZVOMkpAEaVLwm4JmK2GZ1dFKOGGpMzEHWFmyZZ59lUU0PdRr8YNYeQdNzTDwuxP2X2gzydTc9g== dependencies: "@babel/helper-plugin-utils" "^7.17.12" -"@babel/plugin-transform-typeof-symbol@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.17.12.tgz#0f12f57ac35e98b35b4ed34829948d42bd0e6889" - integrity sha512-Q8y+Jp7ZdtSPXCThB6zjQ74N3lj0f6TDh1Hnf5B+sYlzQ8i5Pjp8gW0My79iekSpT4WnI06blqP6DT0OmaXXmw== +"@babel/plugin-transform-template-literals@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz#b763f4dc9d11a7cce58cf9a490d82e80547db9c2" + integrity sha512-UuqlRrQmT2SWRvahW46cGSany0uTlcj8NYOS5sRGYi8FxPYPoLd5DDmMd32ZXEj2Jq+06uGVQKHxa/hJx2EzKw== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-typescript@^7.17.12": - version "7.18.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.4.tgz#587eaf6a39edb8c06215e550dc939faeadd750bf" - integrity sha512-l4vHuSLUajptpHNEOUDEGsnpl9pfRLsN1XUoDQDD/YBuXTM+v37SHGS+c6n4jdcZy96QtuUuSvZYMLSSsjH8Mw== +"@babel/plugin-transform-typeof-symbol@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz#486bb39d5a18047358e0d04dc0d2f322f0b92e92" + integrity sha512-7m71iS/QhsPk85xSjFPovHPcH3H9qeyzsujhTc+vcdnsXavoWYJ74zx0lP5RhpC5+iDnVLO+PPMHzC11qels1g== dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.0" - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/plugin-syntax-typescript" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-unicode-escapes@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz#da8717de7b3287a2c6d659750c964f302b31ece3" - integrity sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q== +"@babel/plugin-transform-typescript@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.8.tgz#303feb7a920e650f2213ef37b36bbf327e6fa5a0" + integrity sha512-p2xM8HI83UObjsZGofMV/EdYjamsDm6MoN3hXPYIT0+gxIoopE+B7rPYKAxfrz9K9PK7JafTTjqYC6qipLExYA== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-typescript" "^7.18.6" -"@babel/plugin-transform-unicode-regex@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz#0f7aa4a501198976e25e82702574c34cfebe9ef2" - integrity sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q== +"@babel/plugin-transform-unicode-escapes@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.6.tgz#0d01fb7fb2243ae1c033f65f6e3b4be78db75f27" + integrity sha512-XNRwQUXYMP7VLuy54cr/KS/WeL3AZeORhrmeZ7iewgu+X2eBqmpaLI/hzqr9ZxCeUoq0ASK4GUzSM0BDhZkLFw== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.16.7" - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/preset-env@^7.11.0", "@babel/preset-env@^7.12.1", "@babel/preset-env@^7.12.11", "@babel/preset-env@^7.15.6", "@babel/preset-env@^7.16.4", "@babel/preset-env@^7.18.2": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.18.2.tgz#f47d3000a098617926e674c945d95a28cb90977a" - integrity sha512-PfpdxotV6afmXMU47S08F9ZKIm2bJIQ0YbAAtDfIENX7G1NUAXigLREh69CWDjtgUy7dYn7bsMzkgdtAlmS68Q== +"@babel/plugin-transform-unicode-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz#194317225d8c201bbae103364ffe9e2cea36cdca" + integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== dependencies: - "@babel/compat-data" "^7.17.10" - "@babel/helper-compilation-targets" "^7.18.2" - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-validator-option" "^7.16.7" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.17.12" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.17.12" - "@babel/plugin-proposal-async-generator-functions" "^7.17.12" - "@babel/plugin-proposal-class-properties" "^7.17.12" - "@babel/plugin-proposal-class-static-block" "^7.18.0" - "@babel/plugin-proposal-dynamic-import" "^7.16.7" - "@babel/plugin-proposal-export-namespace-from" "^7.17.12" - "@babel/plugin-proposal-json-strings" "^7.17.12" - "@babel/plugin-proposal-logical-assignment-operators" "^7.17.12" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.17.12" - "@babel/plugin-proposal-numeric-separator" "^7.16.7" - "@babel/plugin-proposal-object-rest-spread" "^7.18.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.16.7" - "@babel/plugin-proposal-optional-chaining" "^7.17.12" - "@babel/plugin-proposal-private-methods" "^7.17.12" - "@babel/plugin-proposal-private-property-in-object" "^7.17.12" - "@babel/plugin-proposal-unicode-property-regex" "^7.17.12" + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/preset-env@^7.11.0", "@babel/preset-env@^7.12.1", "@babel/preset-env@^7.12.11", "@babel/preset-env@^7.15.6", "@babel/preset-env@^7.16.4", "@babel/preset-env@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.18.6.tgz#953422e98a5f66bc56cd0b9074eaea127ec86ace" + integrity sha512-WrthhuIIYKrEFAwttYzgRNQ5hULGmwTj+D6l7Zdfsv5M7IWV/OZbUfbeL++Qrzx1nVJwWROIFhCHRYQV4xbPNw== + dependencies: + "@babel/compat-data" "^7.18.6" + "@babel/helper-compilation-targets" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.6" + "@babel/plugin-proposal-async-generator-functions" "^7.18.6" + "@babel/plugin-proposal-class-properties" "^7.18.6" + "@babel/plugin-proposal-class-static-block" "^7.18.6" + "@babel/plugin-proposal-dynamic-import" "^7.18.6" + "@babel/plugin-proposal-export-namespace-from" "^7.18.6" + "@babel/plugin-proposal-json-strings" "^7.18.6" + "@babel/plugin-proposal-logical-assignment-operators" "^7.18.6" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" + "@babel/plugin-proposal-numeric-separator" "^7.18.6" + "@babel/plugin-proposal-object-rest-spread" "^7.18.6" + "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" + "@babel/plugin-proposal-optional-chaining" "^7.18.6" + "@babel/plugin-proposal-private-methods" "^7.18.6" + "@babel/plugin-proposal-private-property-in-object" "^7.18.6" + "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" "@babel/plugin-syntax-class-static-block" "^7.14.5" "@babel/plugin-syntax-dynamic-import" "^7.8.3" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.17.12" + "@babel/plugin-syntax-import-assertions" "^7.18.6" "@babel/plugin-syntax-json-strings" "^7.8.3" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" @@ -1139,43 +1462,43 @@ "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.17.12" - "@babel/plugin-transform-async-to-generator" "^7.17.12" - "@babel/plugin-transform-block-scoped-functions" "^7.16.7" - "@babel/plugin-transform-block-scoping" "^7.17.12" - "@babel/plugin-transform-classes" "^7.17.12" - "@babel/plugin-transform-computed-properties" "^7.17.12" - "@babel/plugin-transform-destructuring" "^7.18.0" - "@babel/plugin-transform-dotall-regex" "^7.16.7" - "@babel/plugin-transform-duplicate-keys" "^7.17.12" - "@babel/plugin-transform-exponentiation-operator" "^7.16.7" - "@babel/plugin-transform-for-of" "^7.18.1" - "@babel/plugin-transform-function-name" "^7.16.7" - "@babel/plugin-transform-literals" "^7.17.12" - "@babel/plugin-transform-member-expression-literals" "^7.16.7" - "@babel/plugin-transform-modules-amd" "^7.18.0" - "@babel/plugin-transform-modules-commonjs" "^7.18.2" - "@babel/plugin-transform-modules-systemjs" "^7.18.0" - "@babel/plugin-transform-modules-umd" "^7.18.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.17.12" - "@babel/plugin-transform-new-target" "^7.17.12" - "@babel/plugin-transform-object-super" "^7.16.7" - "@babel/plugin-transform-parameters" "^7.17.12" - "@babel/plugin-transform-property-literals" "^7.16.7" - "@babel/plugin-transform-regenerator" "^7.18.0" - "@babel/plugin-transform-reserved-words" "^7.17.12" - "@babel/plugin-transform-shorthand-properties" "^7.16.7" - "@babel/plugin-transform-spread" "^7.17.12" - "@babel/plugin-transform-sticky-regex" "^7.16.7" - "@babel/plugin-transform-template-literals" "^7.18.2" - "@babel/plugin-transform-typeof-symbol" "^7.17.12" - "@babel/plugin-transform-unicode-escapes" "^7.16.7" - "@babel/plugin-transform-unicode-regex" "^7.16.7" + "@babel/plugin-transform-arrow-functions" "^7.18.6" + "@babel/plugin-transform-async-to-generator" "^7.18.6" + "@babel/plugin-transform-block-scoped-functions" "^7.18.6" + "@babel/plugin-transform-block-scoping" "^7.18.6" + "@babel/plugin-transform-classes" "^7.18.6" + "@babel/plugin-transform-computed-properties" "^7.18.6" + "@babel/plugin-transform-destructuring" "^7.18.6" + "@babel/plugin-transform-dotall-regex" "^7.18.6" + "@babel/plugin-transform-duplicate-keys" "^7.18.6" + "@babel/plugin-transform-exponentiation-operator" "^7.18.6" + "@babel/plugin-transform-for-of" "^7.18.6" + "@babel/plugin-transform-function-name" "^7.18.6" + "@babel/plugin-transform-literals" "^7.18.6" + "@babel/plugin-transform-member-expression-literals" "^7.18.6" + "@babel/plugin-transform-modules-amd" "^7.18.6" + "@babel/plugin-transform-modules-commonjs" "^7.18.6" + "@babel/plugin-transform-modules-systemjs" "^7.18.6" + "@babel/plugin-transform-modules-umd" "^7.18.6" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.18.6" + "@babel/plugin-transform-new-target" "^7.18.6" + "@babel/plugin-transform-object-super" "^7.18.6" + "@babel/plugin-transform-parameters" "^7.18.6" + "@babel/plugin-transform-property-literals" "^7.18.6" + "@babel/plugin-transform-regenerator" "^7.18.6" + "@babel/plugin-transform-reserved-words" "^7.18.6" + "@babel/plugin-transform-shorthand-properties" "^7.18.6" + "@babel/plugin-transform-spread" "^7.18.6" + "@babel/plugin-transform-sticky-regex" "^7.18.6" + "@babel/plugin-transform-template-literals" "^7.18.6" + "@babel/plugin-transform-typeof-symbol" "^7.18.6" + "@babel/plugin-transform-unicode-escapes" "^7.18.6" + "@babel/plugin-transform-unicode-regex" "^7.18.6" "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.18.2" - babel-plugin-polyfill-corejs2 "^0.3.0" - babel-plugin-polyfill-corejs3 "^0.5.0" - babel-plugin-polyfill-regenerator "^0.3.0" + "@babel/types" "^7.18.6" + babel-plugin-polyfill-corejs2 "^0.3.1" + babel-plugin-polyfill-corejs3 "^0.5.2" + babel-plugin-polyfill-regenerator "^0.3.1" core-js-compat "^3.22.1" semver "^6.3.0" @@ -1199,26 +1522,26 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-react@^7.12.10", "@babel/preset-react@^7.12.5", "@babel/preset-react@^7.14.5", "@babel/preset-react@^7.16.0", "@babel/preset-react@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.17.12.tgz#62adbd2d1870c0de3893095757ed5b00b492ab3d" - integrity sha512-h5U+rwreXtZaRBEQhW1hOJLMq8XNJBQ/9oymXiCXTuT/0uOwpbT0gUt+sXeOqoXBgNuUKI7TaObVwoEyWkpFgA== +"@babel/preset-react@^7.12.10", "@babel/preset-react@^7.12.5", "@babel/preset-react@^7.14.5", "@babel/preset-react@^7.16.0", "@babel/preset-react@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.18.6.tgz#979f76d6277048dc19094c217b507f3ad517dd2d" + integrity sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-validator-option" "^7.16.7" - "@babel/plugin-transform-react-display-name" "^7.16.7" - "@babel/plugin-transform-react-jsx" "^7.17.12" - "@babel/plugin-transform-react-jsx-development" "^7.16.7" - "@babel/plugin-transform-react-pure-annotations" "^7.16.7" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + "@babel/plugin-transform-react-display-name" "^7.18.6" + "@babel/plugin-transform-react-jsx" "^7.18.6" + "@babel/plugin-transform-react-jsx-development" "^7.18.6" + "@babel/plugin-transform-react-pure-annotations" "^7.18.6" -"@babel/preset-typescript@^7.12.7", "@babel/preset-typescript@^7.15.0", "@babel/preset-typescript@^7.16.0", "@babel/preset-typescript@^7.17.12": - version "7.17.12" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.17.12.tgz#40269e0a0084d56fc5731b6c40febe1c9a4a3e8c" - integrity sha512-S1ViF8W2QwAKUGJXxP9NAfNaqGDdEBJKpYkxHf5Yy2C4NPPzXGeR3Lhk7G8xJaaLcFTRfNjVbtbVtm8Gb0mqvg== +"@babel/preset-typescript@^7.12.7", "@babel/preset-typescript@^7.15.0", "@babel/preset-typescript@^7.16.0", "@babel/preset-typescript@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz#ce64be3e63eddc44240c6358daefac17b3186399" + integrity sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ== dependencies: - "@babel/helper-plugin-utils" "^7.17.12" - "@babel/helper-validator-option" "^7.16.7" - "@babel/plugin-transform-typescript" "^7.17.12" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + "@babel/plugin-transform-typescript" "^7.18.6" "@babel/register@^7.12.1": version "7.17.7" @@ -1231,18 +1554,18 @@ pirates "^4.0.5" source-map-support "^0.5.16" -"@babel/runtime-corejs3@^7.10.2", "@babel/runtime-corejs3@^7.18.3": - version "7.18.3" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.18.3.tgz#52f0241a31e0ec61a6187530af6227c2846bd60c" - integrity sha512-l4ddFwrc9rnR+EJsHsh+TJ4A35YqQz/UqcjtlX2ov53hlJYG5CxtQmNZxyajwDVmCxwy++rtvGU5HazCK4W41Q== +"@babel/runtime-corejs3@^7.10.2", "@babel/runtime-corejs3@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.18.6.tgz#6f02c5536911f4b445946a2179554b95c8838635" + integrity sha512-cOu5wH2JFBgMjje+a+fz2JNIWU4GzYpl05oSob3UDvBEh6EuIn+TXFHMmBbhSb+k/4HMzgKCQfEEDArAWNF9Cw== dependencies: core-js-pure "^3.20.2" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.0", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": - version "7.18.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.3.tgz#c7b654b57f6f63cf7f8b418ac9ca04408c4579f4" - integrity sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug== +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.6", "@babel/runtime@^7.18.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.0", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" + integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== dependencies: regenerator-runtime "^0.13.4" @@ -1255,23 +1578,32 @@ "@babel/parser" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/traverse@^7.1.6", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2", "@babel/traverse@^7.7.2": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.2.tgz#b77a52604b5cc836a9e1e08dca01cba67a12d2e8" - integrity sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA== +"@babel/template@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31" + integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw== dependencies: - "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.18.2" - "@babel/helper-environment-visitor" "^7.18.2" - "@babel/helper-function-name" "^7.17.9" - "@babel/helper-hoist-variables" "^7.16.7" - "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/parser" "^7.18.0" - "@babel/types" "^7.18.2" + "@babel/code-frame" "^7.18.6" + "@babel/parser" "^7.18.6" + "@babel/types" "^7.18.6" + +"@babel/traverse@^7.1.6", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2", "@babel/traverse@^7.18.6", "@babel/traverse@^7.18.8", "@babel/traverse@^7.7.2": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.8.tgz#f095e62ab46abf1da35e5a2011f43aee72d8d5b0" + integrity sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.7" + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-function-name" "^7.18.6" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.18.8" + "@babel/types" "^7.18.8" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.12.11", "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.15.6", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.17.12", "@babel/types@^7.18.0", "@babel/types@^7.18.2", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.12.11", "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.15.6", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.17.0", "@babel/types@^7.17.12", "@babel/types@^7.18.0", "@babel/types@^7.18.2", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.18.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354" integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw== @@ -1279,6 +1611,14 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.18.8": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.8.tgz#c5af199951bf41ba4a6a9a6d0d8ad722b30cd42f" + integrity sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + "@base2/pretty-print-object@1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.1.tgz#371ba8be66d556812dc7fb169ebc3c08378f69d4" @@ -1315,11 +1655,11 @@ integrity sha512-M0qqxAcwCsIVfpFQSlGN5XjXWu8l5JDZN+fPt1LeW5SZexQTgnaEvgXAY+CeygRw0EeppWHi12JxESWiWrB0Sg== "@csstools/postcss-cascade-layers@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@csstools/postcss-cascade-layers/-/postcss-cascade-layers-1.0.2.tgz#7c48b5f773c4cdcdc6b57d6099fbdc2332e12219" - integrity sha512-n5fSd3N/RTLjwC6TLnHjlVEt5tRg6S6Pu+LpRgXayX0QVJHvlMzE3+R12cd2F0we8WB4OE8o5r5iWgmBPpqUyQ== + version "1.0.3" + resolved "https://registry.yarnpkg.com/@csstools/postcss-cascade-layers/-/postcss-cascade-layers-1.0.3.tgz#71ee4a3f00f947788097f8d67310b2e4a336aa51" + integrity sha512-fvXP0+dcllGtRKAjA5n5tBr57xWQalKky09hSiXAZ9qqjHn0sDuQV2Jz0Y5zHRQ6iGrAjJZOf2+xQj3yuXfLwA== dependencies: - "@csstools/selector-specificity" "^1.0.0" + "@csstools/selector-specificity" "^2.0.0" postcss-selector-parser "^6.0.10" "@csstools/postcss-color-function@^1.1.0": @@ -1353,11 +1693,11 @@ postcss-value-parser "^4.2.0" "@csstools/postcss-is-pseudo-class@^2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@csstools/postcss-is-pseudo-class/-/postcss-is-pseudo-class-2.0.4.tgz#6e8b49b96a7d3346d5316bd773dcff9c983b4183" - integrity sha512-T2Tmr5RIxkCEXxHwMVyValqwv3h5FTJPpmU8Mq/HDV+TY6C9srVaNMiMG/sp0QaxUnVQQrnXsuLU+1g2zrLDcQ== + version "2.0.5" + resolved "https://registry.yarnpkg.com/@csstools/postcss-is-pseudo-class/-/postcss-is-pseudo-class-2.0.5.tgz#60fea78776fc3916ad66d568064aa31029b9f772" + integrity sha512-Ek+UFI4UP2hB9u0N1cJd6KgSF1rL0J3PT4is0oSStuus8+WzbGGPyJNMOKQ0w/tyPjxiCnOI4RdSMZt3nks64g== dependencies: - "@csstools/selector-specificity" "^1.0.0" + "@csstools/selector-specificity" "^2.0.0" postcss-selector-parser "^6.0.10" "@csstools/postcss-normalize-display-values@^1.0.0": @@ -1389,7 +1729,7 @@ dependencies: postcss-value-parser "^4.2.0" -"@csstools/postcss-trigonometric-functions@^1.0.0": +"@csstools/postcss-trigonometric-functions@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@csstools/postcss-trigonometric-functions/-/postcss-trigonometric-functions-1.0.1.tgz#e36e61f445614193dbf6d3a8408709b0cf184a6f" integrity sha512-G78CY/+GePc6dDCTUbwI6TTFQ5fs3N9POHhI6v0QzteGpf6ylARiJUNz9HrRKi4eVYBNXjae1W2766iUEFxHlw== @@ -1401,53 +1741,54 @@ resolved "https://registry.yarnpkg.com/@csstools/postcss-unset-value/-/postcss-unset-value-1.0.1.tgz#2cc020785db5ec82cc9444afe4cdae2a65445f89" integrity sha512-f1G1WGDXEU/RN1TWAxBPQgQudtLnLQPyiWdtypkPC+mVYNKFKH/HYXSxH4MVNqwF8M0eDsoiU7HumJHCg/L/jg== -"@csstools/selector-specificity@1.0.0", "@csstools/selector-specificity@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-1.0.0.tgz#91c560df2ed8d9700e4c7ed4ac21a3a322c9d975" - integrity sha512-RkYG5KiGNX0fJ5YoI0f4Wfq2Yo74D25Hru4fxTOioYdQvHBxcrrtTTyT5Ozzh2ejcNrhFy7IEts2WyEY7yi5yw== +"@csstools/selector-specificity@^2.0.0": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.0.1.tgz#b6b8d81780b9a9f6459f4bfe9226ac6aefaefe87" + integrity sha512-aG20vknL4/YjQF9BSV7ts4EWm/yrjagAN7OWBNmlbEOUiu0llj4OGrFoOKK3g2vey4/p2omKCoHrWtPxSwV3HA== "@discoveryjs/json-ext@^0.5.0", "@discoveryjs/json-ext@^0.5.3": version "0.5.7" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@docsearch/css@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.1.0.tgz#6781cad43fc2e034d012ee44beddf8f93ba21f19" - integrity sha512-bh5IskwkkodbvC0FzSg1AxMykfDl95hebEKwxNoq4e5QaGzOXSBgW8+jnMFZ7JU4sTBiB04vZWoUSzNrPboLZA== +"@docsearch/css@3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.1.1.tgz#e0976bf995e383f8ee8657306311b9cb95016330" + integrity sha512-utLgg7E1agqQeqCJn05DWC7XXMk4tMUUnL7MZupcknRu2OzGN13qwey2qA/0NAKkVBGugiWtON0+rlU0QIPojg== -"@docsearch/react@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-3.1.0.tgz#da943a64c01ee82b04e53b691806469272f943f7" - integrity sha512-bjB6ExnZzf++5B7Tfoi6UXgNwoUnNOfZ1NyvnvPhWgCMy5V/biAtLL4o7owmZSYdAKeFSvZ5Lxm0is4su/dBWg== +"@docsearch/react@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-3.1.1.tgz#3dffb5db8cf9eb95d6e732cf038264bfc10191ed" + integrity sha512-cfoql4qvtsVRqBMYxhlGNpvyy/KlCoPqjIsJSZYqYf9AplZncKjLBTcwBu6RXFMVCe30cIFljniI4OjqAU67pQ== dependencies: - "@algolia/autocomplete-core" "1.6.3" - "@docsearch/css" "3.1.0" + "@algolia/autocomplete-core" "1.7.1" + "@algolia/autocomplete-preset-algolia" "1.7.1" + "@docsearch/css" "3.1.1" algoliasearch "^4.0.0" -"@docusaurus/core@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-2.0.0-beta.21.tgz#50897317b22dbd94b1bf91bb30c2a0fddd15a806" - integrity sha512-qysDMVp1M5UozK3u/qOxsEZsHF7jeBvJDS+5ItMPYmNKvMbNKeYZGA0g6S7F9hRDwjIlEbvo7BaX0UMDcmTAWA== +"@docusaurus/core@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-2.0.0-rc.1.tgz#828d93d241171565d8947a9ab404091e04759141" + integrity sha512-b9FX0Z+EddfQ6wAiNh+Wx4fysKfcvEcWJrZ5USROn3C+EVU5P4luaa8mwWK//O+hTwD9ur7/A44IZ/tWCTAoLQ== dependencies: - "@babel/core" "^7.18.2" - "@babel/generator" "^7.18.2" + "@babel/core" "^7.18.6" + "@babel/generator" "^7.18.7" "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-transform-runtime" "^7.18.2" - "@babel/preset-env" "^7.18.2" - "@babel/preset-react" "^7.17.12" - "@babel/preset-typescript" "^7.17.12" - "@babel/runtime" "^7.18.3" - "@babel/runtime-corejs3" "^7.18.3" - "@babel/traverse" "^7.18.2" - "@docusaurus/cssnano-preset" "2.0.0-beta.21" - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/mdx-loader" "2.0.0-beta.21" + "@babel/plugin-transform-runtime" "^7.18.6" + "@babel/preset-env" "^7.18.6" + "@babel/preset-react" "^7.18.6" + "@babel/preset-typescript" "^7.18.6" + "@babel/runtime" "^7.18.6" + "@babel/runtime-corejs3" "^7.18.6" + "@babel/traverse" "^7.18.8" + "@docusaurus/cssnano-preset" "2.0.0-rc.1" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/mdx-loader" "2.0.0-rc.1" "@docusaurus/react-loadable" "5.5.2" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-common" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" - "@slorber/static-site-generator-webpack-plugin" "^4.0.4" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-common" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" + "@slorber/static-site-generator-webpack-plugin" "^4.0.7" "@svgr/webpack" "^6.2.1" autoprefixer "^10.4.7" babel-loader "^8.2.5" @@ -1460,10 +1801,10 @@ combine-promises "^1.1.0" commander "^5.1.0" copy-webpack-plugin "^11.0.0" - core-js "^3.22.7" + core-js "^3.23.3" css-loader "^6.7.1" css-minimizer-webpack-plugin "^4.0.0" - cssnano "^5.1.9" + cssnano "^5.1.12" del "^6.1.1" detect-port "^1.3.0" escape-html "^1.0.3" @@ -1476,7 +1817,7 @@ import-fresh "^3.3.0" leven "^3.1.0" lodash "^4.17.21" - mini-css-extract-plugin "^2.6.0" + mini-css-extract-plugin "^2.6.1" postcss "^8.4.14" postcss-loader "^7.0.0" prompts "^2.4.2" @@ -1487,49 +1828,48 @@ react-router "^5.3.3" react-router-config "^5.1.1" react-router-dom "^5.3.3" - remark-admonitions "^1.2.1" rtl-detect "^1.0.4" semver "^7.3.7" serve-handler "^6.1.3" shelljs "^0.8.5" - terser-webpack-plugin "^5.3.1" + terser-webpack-plugin "^5.3.3" tslib "^2.4.0" update-notifier "^5.1.0" url-loader "^4.1.1" wait-on "^6.0.1" - webpack "^5.72.1" + webpack "^5.73.0" webpack-bundle-analyzer "^4.5.0" - webpack-dev-server "^4.9.0" + webpack-dev-server "^4.9.3" webpack-merge "^5.8.0" webpackbar "^5.0.2" -"@docusaurus/cssnano-preset@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-2.0.0-beta.21.tgz#38113877a5857c3f9d493522085d20909dcec474" - integrity sha512-fhTZrg1vc6zYYZIIMXpe1TnEVGEjqscBo0s1uomSwKjjtMgu7wkzc1KKJYY7BndsSA+fVVkZ+OmL/kAsmK7xxw== +"@docusaurus/cssnano-preset@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-2.0.0-rc.1.tgz#76bbd7f6912779a0667f8f2fd8fc1a05618a6148" + integrity sha512-9/KmQvF+eTlMqUqG6UcXbRgxbGed/8bQInXuKEs+95/jI6jO/3xSzuRwuHHHP0naUvSVWjnNI9jngPrQerXE5w== dependencies: - cssnano-preset-advanced "^5.3.5" + cssnano-preset-advanced "^5.3.8" postcss "^8.4.14" postcss-sort-media-queries "^4.2.1" tslib "^2.4.0" -"@docusaurus/logger@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/logger/-/logger-2.0.0-beta.21.tgz#f6ab4133917965349ae03fd9111a940b24d4fd12" - integrity sha512-HTFp8FsSMrAj7Uxl5p72U+P7rjYU/LRRBazEoJbs9RaqoKEdtZuhv8MYPOCh46K9TekaoquRYqag2o23Qt4ggA== +"@docusaurus/logger@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/logger/-/logger-2.0.0-rc.1.tgz#db95e9b15bc243695830a5b791c0eff705ef1b54" + integrity sha512-daa3g+SXuO9K60PVMiSUmDEK9Vro+Ed7i7uF8CH6QQJLcNZy/zJc0Xz62eH7ip1x77fmeb6Rg4Us1TqTFc9AbQ== dependencies: chalk "^4.1.2" tslib "^2.4.0" -"@docusaurus/mdx-loader@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-2.0.0-beta.21.tgz#52af341e21f22be882d2155a7349bea10f5d77a3" - integrity sha512-AI+4obJnpOaBOAYV6df2ux5Y1YJCBS+MhXFf0yhED12sVLJi2vffZgdamYd/d/FwvWDw6QLs/VD2jebd7P50yQ== +"@docusaurus/mdx-loader@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-2.0.0-rc.1.tgz#e78d7d416aacc289f2427c5ccdb9145820acb0cb" + integrity sha512-8Fg0c/ceu39knmr7w0dutm7gq3YxKYCqWVS2cB/cPATzChCCNH/AGLfBT6sz/Z4tjVXE+NyREq2pfOFvkhjVXg== dependencies: - "@babel/parser" "^7.18.3" - "@babel/traverse" "^7.18.2" - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" + "@babel/parser" "^7.18.8" + "@babel/traverse" "^7.18.8" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" "@mdx-js/mdx" "^1.6.22" escape-html "^1.0.3" file-loader "^6.2.0" @@ -1539,136 +1879,147 @@ remark-emoji "^2.2.0" stringify-object "^3.3.0" tslib "^2.4.0" + unified "^9.2.2" unist-util-visit "^2.0.3" url-loader "^4.1.1" - webpack "^5.72.1" + webpack "^5.73.0" -"@docusaurus/module-type-aliases@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-2.0.0-beta.21.tgz#345f1c1a99407775d1d3ffc1a90c2df93d50a9b8" - integrity sha512-gRkWICgQZiqSJgrwRKWjXm5gAB+9IcfYdUbCG0PRPP/G8sNs9zBIOY4uT4Z5ox2CWFEm44U3RTTxj7BiLVMBXw== +"@docusaurus/module-type-aliases@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-2.0.0-rc.1.tgz#c7839ac15b7712a8d86353a3253918f63ffbea09" + integrity sha512-la7D8ggFP8I5nOp/Epl6NqTeDWcbofPVMOaVisRxQbx5iuF9Al+AITbaDgm4CXpFLJACsqhsXD5W4BnKX8ZxfA== dependencies: - "@docusaurus/types" "2.0.0-beta.21" + "@docusaurus/react-loadable" "5.5.2" + "@docusaurus/types" "2.0.0-rc.1" + "@types/history" "^4.7.11" "@types/react" "*" "@types/react-router-config" "*" "@types/react-router-dom" "*" react-helmet-async "*" + react-loadable "npm:@docusaurus/react-loadable@5.5.2" -"@docusaurus/plugin-content-blog@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.0.0-beta.21.tgz#86211deeea901ddcd77ca387778e121e93ee8d01" - integrity sha512-IP21yJViP3oBmgsWBU5LhrG1MZXV4mYCQSoCAboimESmy1Z11RCNP2tXaqizE3iTmXOwZZL+SNBk06ajKCEzWg== +"@docusaurus/plugin-content-blog@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.0.0-rc.1.tgz#8ae5d5ec2da08c583a057bf2754a5b9278b3eb08" + integrity sha512-BVVrAGZujpjS/0rarY2o24rlylRRh2NZuM65kg0JNkkViF79SeEHsepog7IuHyoqGWPm1N/I7LpEp7k+gowZzQ== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/mdx-loader" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-common" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" - cheerio "^1.0.0-rc.11" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/mdx-loader" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-common" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" + cheerio "^1.0.0-rc.12" feed "^4.2.2" fs-extra "^10.1.0" lodash "^4.17.21" reading-time "^1.5.0" - remark-admonitions "^1.2.1" tslib "^2.4.0" unist-util-visit "^2.0.3" utility-types "^3.10.0" - webpack "^5.72.1" + webpack "^5.73.0" -"@docusaurus/plugin-content-docs@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.0.0-beta.21.tgz#b3171fa9aed99e367b6eb7111187bd0e3dcf2949" - integrity sha512-aa4vrzJy4xRy81wNskyhE3wzRf3AgcESZ1nfKh8xgHUkT7fDTZ1UWlg50Jb3LBCQFFyQG2XQB9N6llskI/KUnw== +"@docusaurus/plugin-content-docs@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.0.0-rc.1.tgz#2dda88166bf21b0eeb3821ef748059b20c8c49f7" + integrity sha512-Yk5Hu6uaw3tRplzJnbDygwRhmZ3PCzEXD4SJpBA6cPC73ylfqOEh6qhiU+BWhMTtDXNhY+athk5Kycfk3DW1aQ== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/mdx-loader" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/mdx-loader" "2.0.0-rc.1" + "@docusaurus/module-type-aliases" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" + "@types/react-router-config" "^5.0.6" combine-promises "^1.1.0" fs-extra "^10.1.0" import-fresh "^3.3.0" js-yaml "^4.1.0" lodash "^4.17.21" - remark-admonitions "^1.2.1" tslib "^2.4.0" utility-types "^3.10.0" - webpack "^5.72.1" + webpack "^5.73.0" -"@docusaurus/plugin-content-pages@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.0.0-beta.21.tgz#df6b4c5c4cde8a0ea491a30002e84941ca7bf0cf" - integrity sha512-DmXOXjqNI+7X5hISzCvt54QIK6XBugu2MOxjxzuqI7q92Lk/EVdraEj5mthlH8IaEH/VlpWYJ1O9TzLqX5vH2g== +"@docusaurus/plugin-content-pages@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.0.0-rc.1.tgz#2be82f53d6c77e6aa66787726c30dc60b210e6f8" + integrity sha512-FdO79WC5hfWDQu3/CTFLRQzTNc0e5n+HNzavm2MNkSzGV08BFJ6RAkbPbtra5CWef+6iXZav6D/tzv2jDPvLzA== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/mdx-loader" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/mdx-loader" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" fs-extra "^10.1.0" - remark-admonitions "^1.2.1" tslib "^2.4.0" - webpack "^5.72.1" + webpack "^5.73.0" -"@docusaurus/plugin-debug@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-2.0.0-beta.21.tgz#dfa212fd90fe2f54439aacdc8c143e8ce96b0d27" - integrity sha512-P54J4q4ecsyWW0Jy4zbimSIHna999AfbxpXGmF1IjyHrjoA3PtuakV1Ai51XrGEAaIq9q6qMQkEhbUd3CffGAw== +"@docusaurus/plugin-debug@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-2.0.0-rc.1.tgz#73c06ad08d66810941e456d50b07be008f5235cb" + integrity sha512-aOsyYrPMbnsyqHwsVZ+0frrMRtnYqm4eaJpG4sC/6LYAJ07IDRQ9j3GOku2dKr5GsFK1Vx7VlE6ZLwe0MaGstg== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" fs-extra "^10.1.0" react-json-view "^1.21.3" tslib "^2.4.0" -"@docusaurus/plugin-google-analytics@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.0.0-beta.21.tgz#5475c58fb23603badf41d84298569f6c46b4e6b2" - integrity sha512-+5MS0PeGaJRgPuNZlbd/WMdQSpOACaxEz7A81HAxm6kE+tIASTW3l8jgj1eWFy/PGPzaLnQrEjxI1McAfnYmQw== +"@docusaurus/plugin-google-analytics@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.0.0-rc.1.tgz#0136cc7534573ca56e023178ec2bda5c1e89ce71" + integrity sha512-f+G8z5OJWfg5QqWDLIdcN2SDoK5J5Gg8HMrqCI6Pfl+rxPb5I1niA+/UkAM+kMCpnekvhSt5AWz2fgkRenkPLA== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" tslib "^2.4.0" -"@docusaurus/plugin-google-gtag@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.0.0-beta.21.tgz#a4a101089994a7103c1cc7cddb15170427b185d6" - integrity sha512-4zxKZOnf0rfh6myXLG7a6YZfQcxYDMBsWqANEjCX77H5gPdK+GHZuDrxK6sjFvRBv4liYCrNjo7HJ4DpPoT0zA== +"@docusaurus/plugin-google-gtag@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.0.0-rc.1.tgz#61698fdc41a4ace912fb8f6c834efd288edad3c0" + integrity sha512-yE1Et9hhhX9qMRnMJzpNq0854qIYiSEc2dZaXNk537HN7Q0rKkr/YONUHz2iqNYwPX2hGOY4LdpTxlMP88uVhA== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" tslib "^2.4.0" -"@docusaurus/plugin-sitemap@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.0.0-beta.21.tgz#8bfa695eada2ec95c9376a884641237ffca5dd3d" - integrity sha512-/ynWbcXZXcYZ6sT2X6vAJbnfqcPxwdGEybd0rcRZi4gBHq6adMofYI25AqELmnbBDxt0If+vlAeUHFRG5ueP7Q== +"@docusaurus/plugin-sitemap@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.0.0-rc.1.tgz#0b638e774b253d90e9f2d11663e961250f557bc4" + integrity sha512-5JmbNpssUF03odFM4ArvIsrO9bv7HnAJ0VtefXhh0WBpaFs8NgI3rTkCTFimvtRQjDR9U2bh23fXz2vjQQz6oA== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-common" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-common" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" fs-extra "^10.1.0" sitemap "^7.1.1" tslib "^2.4.0" -"@docusaurus/preset-classic@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-2.0.0-beta.21.tgz#1362d8650ebed22633db411caaba80075f7c86ce" - integrity sha512-KvBnIUu7y69pNTJ9UhX6SdNlK6prR//J3L4rhN897tb8xx04xHHILlPXko2Il+C3Xzgh3OCgyvkoz9K6YlFTDw== +"@docusaurus/preset-classic@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-2.0.0-rc.1.tgz#5e5b1cf80b3dd4e2c3f824c78a111f105858d853" + integrity sha512-5jjTVZkhArjyoNHwCI9x4PSG0zPmBJILjZLVrxPcHpm/K0ltkYcp6J3GxYpf5EbMuOh5+yCWM63cSshGcNOo3Q== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/plugin-content-blog" "2.0.0-beta.21" - "@docusaurus/plugin-content-docs" "2.0.0-beta.21" - "@docusaurus/plugin-content-pages" "2.0.0-beta.21" - "@docusaurus/plugin-debug" "2.0.0-beta.21" - "@docusaurus/plugin-google-analytics" "2.0.0-beta.21" - "@docusaurus/plugin-google-gtag" "2.0.0-beta.21" - "@docusaurus/plugin-sitemap" "2.0.0-beta.21" - "@docusaurus/theme-classic" "2.0.0-beta.21" - "@docusaurus/theme-common" "2.0.0-beta.21" - "@docusaurus/theme-search-algolia" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/plugin-content-blog" "2.0.0-rc.1" + "@docusaurus/plugin-content-docs" "2.0.0-rc.1" + "@docusaurus/plugin-content-pages" "2.0.0-rc.1" + "@docusaurus/plugin-debug" "2.0.0-rc.1" + "@docusaurus/plugin-google-analytics" "2.0.0-rc.1" + "@docusaurus/plugin-google-gtag" "2.0.0-rc.1" + "@docusaurus/plugin-sitemap" "2.0.0-rc.1" + "@docusaurus/theme-classic" "2.0.0-rc.1" + "@docusaurus/theme-common" "2.0.0-rc.1" + "@docusaurus/theme-search-algolia" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" "@docusaurus/react-loadable@5.5.2", "react-loadable@npm:@docusaurus/react-loadable@5.5.2": version "5.5.2" @@ -1678,115 +2029,125 @@ "@types/react" "*" prop-types "^15.6.2" -"@docusaurus/theme-classic@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-2.0.0-beta.21.tgz#6df5b9ea2d389dafb6f59badeabb3eda060b5017" - integrity sha512-Ge0WNdTefD0VDQfaIMRRWa8tWMG9+8/OlBRd5MK88/TZfqdBq7b/gnCSaalQlvZwwkj6notkKhHx72+MKwWUJA== +"@docusaurus/theme-classic@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-2.0.0-rc.1.tgz#4ab30745e6b03b0f277837debae786a0a83aee6a" + integrity sha512-qNiz7ieeq3AC+V8TbW6S63pWLJph1CbzWDDPTqxDLHgA8VQaNaSmJM8S92pH+yKALRb9u14ogjjYYc75Nj2JmQ== dependencies: - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/plugin-content-blog" "2.0.0-beta.21" - "@docusaurus/plugin-content-docs" "2.0.0-beta.21" - "@docusaurus/plugin-content-pages" "2.0.0-beta.21" - "@docusaurus/theme-common" "2.0.0-beta.21" - "@docusaurus/theme-translations" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-common" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/mdx-loader" "2.0.0-rc.1" + "@docusaurus/module-type-aliases" "2.0.0-rc.1" + "@docusaurus/plugin-content-blog" "2.0.0-rc.1" + "@docusaurus/plugin-content-docs" "2.0.0-rc.1" + "@docusaurus/plugin-content-pages" "2.0.0-rc.1" + "@docusaurus/theme-common" "2.0.0-rc.1" + "@docusaurus/theme-translations" "2.0.0-rc.1" + "@docusaurus/types" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-common" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" "@mdx-js/react" "^1.6.22" - clsx "^1.1.1" + clsx "^1.2.1" copy-text-to-clipboard "^3.0.1" - infima "0.2.0-alpha.39" + infima "0.2.0-alpha.42" lodash "^4.17.21" nprogress "^0.2.0" postcss "^8.4.14" - prism-react-renderer "^1.3.3" + prism-react-renderer "^1.3.5" prismjs "^1.28.0" react-router-dom "^5.3.3" rtlcss "^3.5.0" tslib "^2.4.0" + utility-types "^3.10.0" -"@docusaurus/theme-common@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-2.0.0-beta.21.tgz#508478251982d01655ef505ccb2420db38623db8" - integrity sha512-fTKoTLRfjuFG6c3iwnVjIIOensxWMgdBKLfyE5iih3Lq7tQgkE7NyTGG9BKLrnTJ7cAD2UXdXM9xbB7tBf1qzg== +"@docusaurus/theme-common@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-2.0.0-rc.1.tgz#ea5d9732a16b03b488555e50107161bfa2abad98" + integrity sha512-1r9ZLKD9SeoCYVzWzcdR79Dia4ANlrlRjNl6uzETOEybjK6FF7yEa9Yra8EJcOCbi3coyYz5xFh/r1YHFTFHug== dependencies: - "@docusaurus/module-type-aliases" "2.0.0-beta.21" - "@docusaurus/plugin-content-blog" "2.0.0-beta.21" - "@docusaurus/plugin-content-docs" "2.0.0-beta.21" - "@docusaurus/plugin-content-pages" "2.0.0-beta.21" - clsx "^1.1.1" + "@docusaurus/mdx-loader" "2.0.0-rc.1" + "@docusaurus/module-type-aliases" "2.0.0-rc.1" + "@docusaurus/plugin-content-blog" "2.0.0-rc.1" + "@docusaurus/plugin-content-docs" "2.0.0-rc.1" + "@docusaurus/plugin-content-pages" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@types/history" "^4.7.11" + "@types/react" "*" + "@types/react-router-config" "*" + clsx "^1.2.1" parse-numeric-range "^1.3.0" - prism-react-renderer "^1.3.3" + prism-react-renderer "^1.3.5" tslib "^2.4.0" utility-types "^3.10.0" -"@docusaurus/theme-search-algolia@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.0.0-beta.21.tgz#2891f11372e2542e4e1426c3100b72c2d30d4d68" - integrity sha512-T1jKT8MVSSfnztSqeebUOpWHPoHKtwDXtKYE0xC99JWoZ+mMfv8AFhVSoSddn54jLJjV36mxg841eHQIySMCpQ== +"@docusaurus/theme-search-algolia@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.0.0-rc.1.tgz#e78c0aeaea6a3717ae3a6ecd75a8652bd7c8e974" + integrity sha512-H5yq6V/B4qo6GZrDKMbeSpk3T9e9K2MliDzLonRu0w3QHW9orVGe0c/lZvRbGlDZjnsOo7XGddhXXIDWGwnpaA== dependencies: - "@docsearch/react" "^3.1.0" - "@docusaurus/core" "2.0.0-beta.21" - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/plugin-content-docs" "2.0.0-beta.21" - "@docusaurus/theme-common" "2.0.0-beta.21" - "@docusaurus/theme-translations" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" - "@docusaurus/utils-validation" "2.0.0-beta.21" + "@docsearch/react" "^3.1.1" + "@docusaurus/core" "2.0.0-rc.1" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/plugin-content-docs" "2.0.0-rc.1" + "@docusaurus/theme-common" "2.0.0-rc.1" + "@docusaurus/theme-translations" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" + "@docusaurus/utils-validation" "2.0.0-rc.1" algoliasearch "^4.13.1" - algoliasearch-helper "^3.8.2" - clsx "^1.1.1" + algoliasearch-helper "^3.10.0" + clsx "^1.2.1" eta "^1.12.3" fs-extra "^10.1.0" lodash "^4.17.21" tslib "^2.4.0" utility-types "^3.10.0" -"@docusaurus/theme-translations@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-translations/-/theme-translations-2.0.0-beta.21.tgz#5da60ffc58de256b96316c5e0fe2733c1e83f22c" - integrity sha512-dLVT9OIIBs6MpzMb1bAy+C0DPJK3e3DNctG+ES0EP45gzEqQxzs4IsghpT+QDaOsuhNnAlosgJpFWX3rqxF9xA== +"@docusaurus/theme-translations@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-translations/-/theme-translations-2.0.0-rc.1.tgz#bd647f78c741ee7f6c6d2cbbd3e3f282ef2f89ad" + integrity sha512-JLhNdlnbQhxVQzOnLyiCaTzKFa1lpVrM3nCrkGQKscoG2rY6ARGYMgMN2DkoH6hm7TflQ8+PE1S5MzzASeLs4Q== dependencies: fs-extra "^10.1.0" tslib "^2.4.0" -"@docusaurus/types@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-2.0.0-beta.21.tgz#36659c6c012663040dcd4cbc97b5d7a555dae229" - integrity sha512-/GH6Npmq81eQfMC/ikS00QSv9jNyO1RXEpNSx5GLA3sFX8Iib26g2YI2zqNplM8nyxzZ2jVBuvUoeODTIbTchQ== +"@docusaurus/types@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-2.0.0-rc.1.tgz#032f8afde6b4878e37f984b9949a96b150103c21" + integrity sha512-wX25FOZa/aKnCGA5ljWPaDpMW3TuTbs0BtjQ8WTC557p8zDvuz4r+g2/FPHsgWE0TKwUMf4usQU1m3XpJLPN+g== dependencies: + "@types/history" "^4.7.11" + "@types/react" "*" commander "^5.1.0" - history "^4.9.0" joi "^17.6.0" react-helmet-async "^1.3.0" utility-types "^3.10.0" - webpack "^5.72.1" + webpack "^5.73.0" webpack-merge "^5.8.0" -"@docusaurus/utils-common@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-2.0.0-beta.21.tgz#81e86ed04ad62b75e9ba6a5e7689dc23d5f36a0a" - integrity sha512-5w+6KQuJb6pUR2M8xyVuTMvO5NFQm/p8TOTDFTx60wt3p0P1rRX00v6FYsD4PK6pgmuoKjt2+Ls8dtSXc4qFpQ== +"@docusaurus/utils-common@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-2.0.0-rc.1.tgz#3e233a28794325d5d9d3af3f7b1c22b59aa8b847" + integrity sha512-+iZICpeFPZJ9oGJXuG92WTWee6WRnVx5BdzlcfuKf/f5KQX8PvwXR2tDME78FGGhShB8zr+vjuNEXuLvXT7j2A== dependencies: tslib "^2.4.0" -"@docusaurus/utils-validation@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-2.0.0-beta.21.tgz#10169661be5f8a233f4c12202ee5802ccb77400f" - integrity sha512-6NG1FHTRjv1MFzqW//292z7uCs77vntpWEbZBHk3n67aB1HoMn5SOwjLPtRDjbCgn6HCHFmdiJr6euCbjhYolg== +"@docusaurus/utils-validation@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-2.0.0-rc.1.tgz#dded12f036cda8a54a19e01694b35859fe0cf1d5" + integrity sha512-lj36gm9Ksu4tt/EUeLDWoMbXe3sfBxeIPIUUdqYcBYkF/rpQkh+uL/dncjNGiw6uvBOqXhOfsFVP045HtgShVw== dependencies: - "@docusaurus/logger" "2.0.0-beta.21" - "@docusaurus/utils" "2.0.0-beta.21" + "@docusaurus/logger" "2.0.0-rc.1" + "@docusaurus/utils" "2.0.0-rc.1" joi "^17.6.0" js-yaml "^4.1.0" tslib "^2.4.0" -"@docusaurus/utils@2.0.0-beta.21": - version "2.0.0-beta.21" - resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-2.0.0-beta.21.tgz#8fc4499c4cfedd29805025d930f8008cad255044" - integrity sha512-M/BrVCDmmUPZLxtiStBgzpQ4I5hqkggcpnQmEN+LbvbohjbtVnnnZQ0vptIziv1w8jry/woY+ePsyOO7O/yeLQ== +"@docusaurus/utils@2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-2.0.0-rc.1.tgz#53584b800df9e13864d5ef1a76aa7655a90ec86e" + integrity sha512-ym9I1OwIYbKs1LGaUajaA/vDG8VweJj/6YoZjHp+eDQHhTRIrHXiYoGDqorafRhftKwnA1EnyomuXpNd9bq8Gg== dependencies: - "@docusaurus/logger" "2.0.0-beta.21" + "@docusaurus/logger" "2.0.0-rc.1" "@svgr/webpack" "^6.2.1" file-loader "^6.2.0" fs-extra "^10.1.0" @@ -1800,7 +2161,19 @@ shelljs "^0.8.5" tslib "^2.4.0" url-loader "^4.1.1" - webpack "^5.72.1" + webpack "^5.73.0" + +"@emotion/is-prop-valid@^0.8.2": + version "0.8.8" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" + integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== + dependencies: + "@emotion/memoize" "0.7.4" + +"@emotion/memoize@0.7.4": + version "0.7.4" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" + integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== "@eslint/eslintrc@^1.3.0": version "1.3.0" @@ -1817,6 +2190,35 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" +"@floating-ui/core@^0.7.3": + version "0.7.3" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-0.7.3.tgz#d274116678ffae87f6b60e90f88cc4083eefab86" + integrity sha512-buc8BXHmG9l82+OQXOFU3Kr2XQx9ys01U/Q9HMIrZ300iLc8HLMgh7dcCqgYzAzf4BkoQvDcXf5Y+CuEZ5JBYg== + +"@floating-ui/dom@^0.5.3": + version "0.5.4" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-0.5.4.tgz#4eae73f78bcd4bd553ae2ade30e6f1f9c73fe3f1" + integrity sha512-419BMceRLq0RrmTSDxn8hf9R3VCJv2K9PUfugh5JyEFmdjzDo+e8U5EdR8nzKq8Yj1htzLm3b6eQEEam3/rrtg== + dependencies: + "@floating-ui/core" "^0.7.3" + +"@floating-ui/react-dom-interactions@^0.6.6": + version "0.6.6" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom-interactions/-/react-dom-interactions-0.6.6.tgz#8542e8c4bcbee2cd0d512de676c6a493e0a2d168" + integrity sha512-qnao6UPjSZNHnXrF+u4/n92qVroQkx0Umlhy3Avk1oIebm/5ee6yvDm4xbHob0OjY7ya8WmUnV3rQlPwX3Atwg== + dependencies: + "@floating-ui/react-dom" "^0.7.2" + aria-hidden "^1.1.3" + use-isomorphic-layout-effect "^1.1.1" + +"@floating-ui/react-dom@^0.7.2": + version "0.7.2" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-0.7.2.tgz#0bf4ceccb777a140fc535c87eb5d6241c8e89864" + integrity sha512-1T0sJcpHgX/u4I1OzIEhlcrvkUN8ln39nz7fMoE/2HDHrPiMFoOGR7++GYyfUmIQHkkrTinaeQsO3XWubjSvGg== + dependencies: + "@floating-ui/dom" "^0.5.3" + use-isomorphic-layout-effect "^1.1.1" + "@gar/promisify@^1.0.1": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" @@ -1842,20 +2244,20 @@ dependencies: "@hapi/hoek" "^9.0.0" -"@headlessui/react@^1.6.4": - version "1.6.4" - resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.6.4.tgz#c73084e23386bef5fb86cd16da3352c3a844bb4c" - integrity sha512-0yqz1scwbFtwljmbbKjXsSGl5ABEYNICVHZnMCWo0UtOZodo2Tpu94uOVgCRjRZ77l2WcTi2S0uidINDvG7lsA== +"@headlessui/react@^1.6.6": + version "1.6.6" + resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.6.6.tgz#3073c066b85535c9d28783da0a4d9288b5354d0c" + integrity sha512-MFJtmj9Xh/hhBMhLccGbBoSk+sk61BlP6sJe4uQcVMtXZhCgGqd2GyIQzzmsdPdTEWGSF434CBi8mnhR6um46Q== "@heroicons/react@^1.0.6": version "1.0.6" resolved "https://registry.yarnpkg.com/@heroicons/react/-/react-1.0.6.tgz#35dd26987228b39ef2316db3b1245c42eb19e324" integrity sha512-JJCXydOFWMDpCP4q13iEplA503MQO3xLoZiKum+955ZCtHINWnx26CUxVxxFQu/uLb4LW3ge15ZpzIkXKkJ8oQ== -"@hookform/resolvers@^2.9.1": - version "2.9.1" - resolved "https://registry.yarnpkg.com/@hookform/resolvers/-/resolvers-2.9.1.tgz#59121e38d8fc95d2fd1f41c9631393cd21e10b65" - integrity sha512-80lyFFcExEB7A09PFnl8k7A3obQyDF6MyO/FThtwetk+MTedYMs08Aqf7mgWnOawFGyz5QF+TZXJSYiIZW2tEg== +"@hookform/resolvers@^2.9.6": + version "2.9.6" + resolved "https://registry.yarnpkg.com/@hookform/resolvers/-/resolvers-2.9.6.tgz#db4277a96d1817d94169108167014926d8a10398" + integrity sha512-f4VxF8w9rdX0WsDCk3FW1dGPj/Sj8+1Ulcgtm5ymgWEpbA/fjY+NUDh+L9hftmxDgP8+EJFtF+qFK4gPEXVrVQ== "@humanwhocodes/config-array@^0.9.2": version "0.9.5" @@ -1906,16 +2308,16 @@ jest-util "^27.5.1" slash "^3.0.0" -"@jest/console@^28.1.0": - version "28.1.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-28.1.0.tgz#db78222c3d3b0c1db82f1b9de51094c2aaff2176" - integrity sha512-tscn3dlJFGay47kb4qVruQg/XWlmvU0xp3EJOjzzY+sBaI+YgwKcvAmTcyYU7xEiLLIY5HCdWRooAL8dqkFlDA== +"@jest/console@^28.1.1": + version "28.1.1" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-28.1.1.tgz#305f8ca50b6e70413839f54c0e002b60a0f2fd7d" + integrity sha512-0RiUocPVFEm3WRMOStIHbRWllG6iW6E3/gUPnf4lkrVFyXIIDeCe+vlKeYyFOMhB2EPE6FLFCNADSOOQMaqvyA== dependencies: - "@jest/types" "^28.1.0" + "@jest/types" "^28.1.1" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^28.1.0" - jest-util "^28.1.0" + jest-message-util "^28.1.1" + jest-util "^28.1.1" slash "^3.0.0" "@jest/core@^27.5.1": @@ -2040,13 +2442,13 @@ "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-result@^28.1.0": - version "28.1.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-28.1.0.tgz#fd149dee123510dd2fcadbbf5f0020f98ad7f12c" - integrity sha512-sBBFIyoPzrZho3N+80P35A5oAkSKlGfsEFfXFWuPGBsW40UAjCkGakZhn4UQK4iQlW2vgCDMRDOob9FGKV8YoQ== +"@jest/test-result@^28.1.1": + version "28.1.1" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-28.1.1.tgz#c6f18d1bbb01aa88925dd687872a75f8414b317a" + integrity sha512-hPmkugBktqL6rRzwWAtp1JtYT4VHwv8OQ+9lE5Gymj6dHzubI/oJHMUpPOt8NrdVWSrz9S7bHjJUmv2ggFoUNQ== dependencies: - "@jest/console" "^28.1.0" - "@jest/types" "^28.1.0" + "@jest/console" "^28.1.1" + "@jest/types" "^28.1.1" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" @@ -2124,10 +2526,10 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" -"@jest/types@^28.1.0": - version "28.1.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.0.tgz#508327a89976cbf9bd3e1cc74641a29fd7dfd519" - integrity sha512-xmEggMPr317MIOjjDoZ4ejCSr9Lpbt/u34+dvc99t7DS8YirW5rwZEhzKPC2BMUFkUhI48qs6qLUSGw5FuL0GA== +"@jest/types@^28.1.1": + version "28.1.1" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.1.tgz#d059bbc80e6da6eda9f081f293299348bd78ee0b" + integrity sha512-vRXVqSg1VhDnB8bWcmvLzmg0Bt9CRKVgHPXqYwvWMX3TvAjeO+nRuK6+VdTKCtWOvYlmkF/HqNAL/z+N3B53Kw== dependencies: "@jest/schemas" "^28.0.2" "@types/istanbul-lib-coverage" "^2.0.0" @@ -2153,6 +2555,15 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/resolve-uri@^3.0.3": version "3.0.7" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz#30cd49820a962aff48c8fffc5cd760151fca61fe" @@ -2163,6 +2574,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea" integrity sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ== +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + "@jridgewell/source-map@^0.3.2": version "0.3.2" resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" @@ -2184,7 +2600,7 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9": version "0.3.13" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea" integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w== @@ -2237,6 +2653,59 @@ resolved "https://registry.yarnpkg.com/@mdx-js/util/-/util-1.6.22.tgz#219dfd89ae5b97a8801f015323ffa4b62f45718b" integrity sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA== +"@motionone/animation@^10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/animation/-/animation-10.12.0.tgz#bca8968d3d9c779f8a548678f24206bd36cc60b6" + integrity sha512-SCWkVjMChQwA4Cnt1pdmhCi0OC4cAR+rqsskNEqmbgfG59zmn50TfOP6vgqjkYbaSZXXLeEb03Mez362jIEHRg== + dependencies: + "@motionone/easing" "^10.12.0" + "@motionone/types" "^10.12.0" + "@motionone/utils" "^10.12.0" + tslib "^2.3.1" + +"@motionone/dom@10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/dom/-/dom-10.12.0.tgz#ae30827fd53219efca4e1150a5ff2165c28351ed" + integrity sha512-UdPTtLMAktHiqV0atOczNYyDd/d8Cf5fFsd1tua03PqTwwCe/6lwhLSQ8a7TbnQ5SN0gm44N1slBfj+ORIhrqw== + dependencies: + "@motionone/animation" "^10.12.0" + "@motionone/generators" "^10.12.0" + "@motionone/types" "^10.12.0" + "@motionone/utils" "^10.12.0" + hey-listen "^1.0.8" + tslib "^2.3.1" + +"@motionone/easing@^10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/easing/-/easing-10.12.0.tgz#cc10a00ed5ec9a7a05daf4ef985fcd14840b9a50" + integrity sha512-kdwcn1ja/0//BBHRElX3In1yfqMEhqUoL3G0njDan8R+gfPy3DanyuCtio4VruHQ1m3XN3LcrqavbClzcGo7IA== + dependencies: + "@motionone/utils" "^10.12.0" + tslib "^2.3.1" + +"@motionone/generators@^10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/generators/-/generators-10.12.0.tgz#2a175c47c741ed3864dd834e6c98efa68798a866" + integrity sha512-QM8/ndOve80HLXImChwW8ogrEM/8m9xzZEl2Ci2ep1uGLAQ+ADiwzKtl11inGESrxiFDrUdD12WXacCn+y172Q== + dependencies: + "@motionone/types" "^10.12.0" + "@motionone/utils" "^10.12.0" + tslib "^2.3.1" + +"@motionone/types@^10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/types/-/types-10.12.0.tgz#06ede843d4c2990edbd22ecf8d5568d1fcd1f105" + integrity sha512-D9k7ijkAT6JJOCMUVn9IgJqWolp7N3oBbWRQTIRGGO41Bmr/JzLv4GzAb00PvkYAzZX+BpnSTKqXI19zrSjC5w== + +"@motionone/utils@^10.12.0": + version "10.12.0" + resolved "https://registry.yarnpkg.com/@motionone/utils/-/utils-10.12.0.tgz#e8432a96bb7f91148987d0baaab6653ae727f9ee" + integrity sha512-2g3tCqYYwb/tgzCDRbILbD5edXJB45HV51NbnhwKVOOl0PhFraRDtehzLKo9wLHdaTnO/IjVn6cHQsw6RjdolA== + dependencies: + "@motionone/types" "^10.12.0" + hey-listen "^1.0.8" + tslib "^2.3.1" + "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -2336,6 +2805,11 @@ "@react-hook/passive-layout-effect" "^1.2.0" "@react-hook/resize-observer" "^1.2.1" +"@rescript/std@^9.1.4": + version "9.1.4" + resolved "https://registry.yarnpkg.com/@rescript/std/-/std-9.1.4.tgz#94971cb504b10d36d470618fa1c6f0a2d03a6b9b" + integrity sha512-OHBORysVe6vmyllL24S2sXiwLGrpVRbZW5k2FverbjY3QF81VoyCRYL6kMOSNMEn9GseO/oDubK8+nvVzCSVMA== + "@rollup/plugin-babel@^5.2.0": version "5.3.1" resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz#04bc0608f4aa4b2e4b1aebf284344d0f68fda283" @@ -2424,15 +2898,14 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@slorber/static-site-generator-webpack-plugin@^4.0.4": - version "4.0.4" - resolved "https://registry.yarnpkg.com/@slorber/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.4.tgz#2bf4a2545e027830d2aa5eb950437c26a289b0f1" - integrity sha512-FvMavoWEIePps6/JwGCOLYKCRhuwIHhMtmbKpBFgzNkxwpa/569LfTkrbRk1m1I3n+ezJK4on9E1A6cjuZmD9g== +"@slorber/static-site-generator-webpack-plugin@^4.0.7": + version "4.0.7" + resolved "https://registry.yarnpkg.com/@slorber/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.7.tgz#fc1678bddefab014e2145cbe25b3ce4e1cfc36f3" + integrity sha512-Ug7x6z5lwrz0WqdnNFOMYrDQNTPAprvHLSh6+/fmml3qUiz6l5eq+2MzLKWtn/q5K5NpSiFsZTP/fck/3vjSxA== dependencies: - bluebird "^3.7.1" - cheerio "^0.22.0" eval "^0.1.8" - webpack-sources "^1.4.3" + p-map "^4.0.0" + webpack-sources "^3.2.2" "@stdlib/array@^0.0.x": version "0.0.12" @@ -2763,18 +3236,18 @@ "@stdlib/types" "^0.0.x" debug "^2.6.9" -"@storybook/addon-actions@6.5.8", "@storybook/addon-actions@^6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-6.5.8.tgz#c1f544acc016a4a0d5dcb373535dc991b5737c5f" - integrity sha512-9ciR1iWBTzQNBDlq0iQs9+TV7gng+FbQxW5mHNxNvT9SxY1dt02wCPHZeVE/5la61wBXZs/zpEepZA93VzVBDw== +"@storybook/addon-actions@6.5.9", "@storybook/addon-actions@^6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-6.5.9.tgz#d50d65631403e1a5b680961429d9c0d7bd383e68" + integrity sha512-wDYm3M1bN+zcYZV3Q24M03b/P8DDpvj1oSoY6VLlxDAi56h8qZB/voeIS2I6vWXOB79C5tbwljYNQO0GsufS0g== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/api" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/components" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/api" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/components" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/theming" "6.5.8" + "@storybook/theming" "6.5.9" core-js "^3.8.2" fast-deep-equal "^3.1.3" global "^4.4.0" @@ -2788,18 +3261,18 @@ util-deprecate "^1.0.2" uuid-browser "^3.1.0" -"@storybook/addon-backgrounds@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/addon-backgrounds/-/addon-backgrounds-6.5.8.tgz#d7ab67d7bf98f7866b8f95cd92da068f00997b74" - integrity sha512-pvlP5ZVVfd2sWzgCqG/f6RJX/h9648znYbzaLQ4Z6whQIFobP3H3/cj9k/RTy3uXg5vC0IWDHSEaCXgin2sW1Q== +"@storybook/addon-backgrounds@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/addon-backgrounds/-/addon-backgrounds-6.5.9.tgz#a9579fc9d73f783a768c6c6ceb97193c5a1ee708" + integrity sha512-9k+GiY5aiANLOct34ar29jqgdi5ZpCqpZ86zPH0GsEC6ifH6nzP4trLU0vFUe260XDCvB4g8YaI7JZKPhozERg== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/api" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/components" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/api" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/components" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/theming" "6.5.8" + "@storybook/theming" "6.5.9" core-js "^3.8.2" global "^4.4.0" memoizerific "^1.11.3" @@ -2807,47 +3280,47 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/addon-controls@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/addon-controls/-/addon-controls-6.5.8.tgz#779407655d990f88e1d3bb734cf116bc419ab6ba" - integrity sha512-fB6p5DgVHUnJKUzOlT2mtvaSCincnO+vuYLyf++f+l4BlYK1Es9HNl/puaRoMgdW+LoGJjXPTIMcMByeHVIt6Q== +"@storybook/addon-controls@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/addon-controls/-/addon-controls-6.5.9.tgz#8f6ef939c87b3dbad98f8bda7e124f0b34f668d2" + integrity sha512-VvjkgK32bGURKyWU2No6Q2B0RQZjLZk8D3neVNCnrWxwrl1G82StegxjRPn/UZm9+MZVPvTvI46nj1VdgOktnw== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/api" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/components" "6.5.8" - "@storybook/core-common" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/api" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/components" "6.5.9" + "@storybook/core-common" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/node-logger" "6.5.8" - "@storybook/store" "6.5.8" - "@storybook/theming" "6.5.8" + "@storybook/node-logger" "6.5.9" + "@storybook/store" "6.5.9" + "@storybook/theming" "6.5.9" core-js "^3.8.2" lodash "^4.17.21" ts-dedent "^2.0.0" -"@storybook/addon-docs@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/addon-docs/-/addon-docs-6.5.8.tgz#0b6c379cd7b9f2544aa78fdf520939f8f9bd9ecc" - integrity sha512-pAvWwh5YCrsW9nHCrd5BpFigvqn92JisX0aEnwAqKC9B1AW1LxhdPn1o9CQCeszQGaq163RA6AzkCejvAqhtUQ== +"@storybook/addon-docs@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/addon-docs/-/addon-docs-6.5.9.tgz#32b27fb298624afd738c1371a764d7ff4831fe6d" + integrity sha512-9lwOZyiOJFUgGd9ADVfcgpels5o0XOXqGMeVLuzT1160nopbZjNjo/3+YLJ0pyHRPpMJ4rmq2+vxRQR6PVRgPg== dependencies: "@babel/plugin-transform-react-jsx" "^7.12.12" "@babel/preset-env" "^7.12.11" "@jest/transform" "^26.6.2" "@mdx-js/react" "^1.6.22" - "@storybook/addons" "6.5.8" - "@storybook/api" "6.5.8" - "@storybook/components" "6.5.8" - "@storybook/core-common" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/api" "6.5.9" + "@storybook/components" "6.5.9" + "@storybook/core-common" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/docs-tools" "6.5.8" + "@storybook/docs-tools" "6.5.9" "@storybook/mdx1-csf" "^0.0.1" - "@storybook/node-logger" "6.5.8" - "@storybook/postinstall" "6.5.8" - "@storybook/preview-web" "6.5.8" - "@storybook/source-loader" "6.5.8" - "@storybook/store" "6.5.8" - "@storybook/theming" "6.5.8" + "@storybook/node-logger" "6.5.9" + "@storybook/postinstall" "6.5.9" + "@storybook/preview-web" "6.5.9" + "@storybook/source-loader" "6.5.9" + "@storybook/store" "6.5.9" + "@storybook/theming" "6.5.9" babel-loader "^8.0.0" core-js "^3.8.2" fast-deep-equal "^3.1.3" @@ -2859,37 +3332,37 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/addon-essentials@^6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/addon-essentials/-/addon-essentials-6.5.8.tgz#db89307cb8445c49d23ecaa346516b3793baa28a" - integrity sha512-K/Aw/GLugCz5/S3c2tz5lnfC8aN6dSoQQDr8xaMDcBlT9h/xZ1l4jQQnx/mvY/qEvXtexBF41DE6ROWGKSZeSg== +"@storybook/addon-essentials@^6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/addon-essentials/-/addon-essentials-6.5.9.tgz#32ba63acba4d153f4cf6ac33cbbf14b87d260788" + integrity sha512-V9ThjKQsde4A2Es20pLFBsn0MWx2KCJuoTcTsANP4JDcbvEmj8UjbDWbs8jAU+yzJT5r+CI6NoWmQudv12ZOgw== dependencies: - "@storybook/addon-actions" "6.5.8" - "@storybook/addon-backgrounds" "6.5.8" - "@storybook/addon-controls" "6.5.8" - "@storybook/addon-docs" "6.5.8" - "@storybook/addon-measure" "6.5.8" - "@storybook/addon-outline" "6.5.8" - "@storybook/addon-toolbars" "6.5.8" - "@storybook/addon-viewport" "6.5.8" - "@storybook/addons" "6.5.8" - "@storybook/api" "6.5.8" - "@storybook/core-common" "6.5.8" - "@storybook/node-logger" "6.5.8" + "@storybook/addon-actions" "6.5.9" + "@storybook/addon-backgrounds" "6.5.9" + "@storybook/addon-controls" "6.5.9" + "@storybook/addon-docs" "6.5.9" + "@storybook/addon-measure" "6.5.9" + "@storybook/addon-outline" "6.5.9" + "@storybook/addon-toolbars" "6.5.9" + "@storybook/addon-viewport" "6.5.9" + "@storybook/addons" "6.5.9" + "@storybook/api" "6.5.9" + "@storybook/core-common" "6.5.9" + "@storybook/node-logger" "6.5.9" core-js "^3.8.2" regenerator-runtime "^0.13.7" ts-dedent "^2.0.0" -"@storybook/addon-links@^6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-6.5.8.tgz#ec4b640bf89dbb653592e6f05968ba771bb10b4a" - integrity sha512-UxzEPnT1PLPsuy3tt+o3UJTbI4Kihec+/yzpzzGKreUnCC8EWTsOhtMQAVVit2t4BMl4vNrxKO0mKSc8saT3Gw== +"@storybook/addon-links@^6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-6.5.9.tgz#91cbca0c044796badf2498723fdd10dacea5748b" + integrity sha512-4BYC7pkxL3NLRnEgTA9jpIkObQKril+XFj1WtmY/lngF90vvK0Kc/TtvTA2/5tSgrHfxEuPevIdxMIyLJ4ejWQ== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/router" "6.5.8" + "@storybook/router" "6.5.9" "@types/qs" "^6.9.5" core-js "^3.8.2" global "^4.4.0" @@ -2898,95 +3371,95 @@ regenerator-runtime "^0.13.7" ts-dedent "^2.0.0" -"@storybook/addon-measure@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/addon-measure/-/addon-measure-6.5.8.tgz#af4c0d1ec4394d89f79593561a898612d4c52177" - integrity sha512-zpNAt1XwBLnQ3OjCfj63J7vC2WCTyAjvbGVAsUkpQb21vr/e3sPFQZPKGwio85SYjIX7AJ+Oi28mbEwWzS8wFA== +"@storybook/addon-measure@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/addon-measure/-/addon-measure-6.5.9.tgz#f949d4f5f4025c839634114365f1399ea04bd0ae" + integrity sha512-0aA22wD0CIEUccsEbWkckCOXOwr4VffofMH1ToVCOeqBoyLOMB0gxFubESeprqM54CWsYh2DN1uujgD6508cwA== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/api" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/components" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/api" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/components" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" core-js "^3.8.2" global "^4.4.0" -"@storybook/addon-outline@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/addon-outline/-/addon-outline-6.5.8.tgz#e6a464ef63b67067e162e13e07d7d3629313f080" - integrity sha512-/bEjYTVJNM5QEiguS5nVQlerl5NhgOod1zLExnkchc8+FTJC58Vy7CRfzr2iaIMuf1QRPqBwSIy6ZqLJOdUfnQ== +"@storybook/addon-outline@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/addon-outline/-/addon-outline-6.5.9.tgz#6ce9b3fb77e6a1a59607d7657c359c69f26cf6dd" + integrity sha512-oJ1DK3BDJr6aTlZc9axfOxV1oDkZO7hOohgUQDaKO1RZrSpyQsx2ViK2X6p/W7JhFJHKh7rv+nGCaVlLz3YIZA== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/api" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/components" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/api" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/components" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" core-js "^3.8.2" global "^4.4.0" regenerator-runtime "^0.13.7" ts-dedent "^2.0.0" -"@storybook/addon-toolbars@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/addon-toolbars/-/addon-toolbars-6.5.8.tgz#533b7f4bb925d353c9f826d5b92d6801b7418faa" - integrity sha512-16eRbbtn4/cH1xU8JlPZRdShwUwSsPcqpyH1JNl+rgYQ6SaSNq3aO/jDFeQe93guSD0YPRWHz8dKtn6OxVeozQ== +"@storybook/addon-toolbars@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/addon-toolbars/-/addon-toolbars-6.5.9.tgz#feedfdac08482d43bb1f3cc00840d80322c5eace" + integrity sha512-6JFQNHYVZUwp17p5rppc+iQJ2QOIWPTF+ni1GMMThjc84mzXs2+899Sf1aPFTvrFJTklmT+bPX6x4aUTouVa1w== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/api" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/components" "6.5.8" - "@storybook/theming" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/api" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/components" "6.5.9" + "@storybook/theming" "6.5.9" core-js "^3.8.2" regenerator-runtime "^0.13.7" -"@storybook/addon-viewport@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/addon-viewport/-/addon-viewport-6.5.8.tgz#3184a6ef12582af6f2361af27f404dffee0b32ae" - integrity sha512-MTpZWkBWNPH55iNHK4tBNKTdew5xKfoNvOj0pZn1rYDHlylMTlq7aoccwRjjK2jZeHHNnb1rm6ZkQDjmYu0Tcw== +"@storybook/addon-viewport@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/addon-viewport/-/addon-viewport-6.5.9.tgz#fc390ccebea56d2e874ed2fda085c09fe04dd240" + integrity sha512-thKS+iw6M7ueDQQ7M66STZ5rgtJKliAcIX6UCopo0Ffh4RaRYmX6MCjqtvBKk8joyXUvm9SpWQemJD9uBQrjgw== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/api" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/components" "6.5.8" - "@storybook/core-events" "6.5.8" - "@storybook/theming" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/api" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/components" "6.5.9" + "@storybook/core-events" "6.5.9" + "@storybook/theming" "6.5.9" core-js "^3.8.2" global "^4.4.0" memoizerific "^1.11.3" prop-types "^15.7.2" regenerator-runtime "^0.13.7" -"@storybook/addons@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-6.5.8.tgz#c529a2989830a09d26308277a3e356228479053d" - integrity sha512-L3LmbsYP9tDHHvpr/yv8YuEkzym7SXp/jZ0km31tpG3EuZmgGu7MXPrZ2ymEw4PkAhQzztgRr23VTfKobGUojA== +"@storybook/addons@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-6.5.9.tgz#5a9d7395c579a9cbc44dfc122362fb3c95dfb9d5" + integrity sha512-adwdiXg+mntfPocLc1KXjZXyLgGk7Aac699Fwe+OUYPEC5tW347Rm/kFatcE556d42o5czcRiq3ZSIGWnm9ieQ== dependencies: - "@storybook/api" "6.5.8" - "@storybook/channels" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/api" "6.5.9" + "@storybook/channels" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/router" "6.5.8" - "@storybook/theming" "6.5.8" + "@storybook/router" "6.5.9" + "@storybook/theming" "6.5.9" "@types/webpack-env" "^1.16.0" core-js "^3.8.2" global "^4.4.0" regenerator-runtime "^0.13.7" -"@storybook/api@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/api/-/api-6.5.8.tgz#8bd400b8a5b18ec6bff5d35a898593d9c1c630f9" - integrity sha512-/MueV+wLCvy9gFA3ih4g7QYjDmn14i+D2ydonfaEC7R+agFGXxXwJGPKkz3yBNrRpNkBwcbY9mAmv8lE2AqgqQ== +"@storybook/api@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/api/-/api-6.5.9.tgz#303733214c9de0422d162f7c54ae05d088b89bf9" + integrity sha512-9ylztnty4Y+ALU/ehW3BML9czjCAFsWvrwuCi6UgcwNjswwjSX3VRLhfD1KT3pl16ho//95LgZ0LnSwROCcPOA== dependencies: - "@storybook/channels" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/channels" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/router" "6.5.8" + "@storybook/router" "6.5.9" "@storybook/semver" "^7.3.2" - "@storybook/theming" "6.5.8" + "@storybook/theming" "6.5.9" core-js "^3.8.2" fast-deep-equal "^3.1.3" global "^4.4.0" @@ -2998,28 +3471,28 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/builder-webpack4@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/builder-webpack4/-/builder-webpack4-6.5.8.tgz#adfb4b91bd442c2f256d93649d50ca138c30663a" - integrity sha512-4/CVp/AlOxCeWZ/DF1TVS/TuzHao4l9KCq7DhL+utFEVl9c/dpgoZXc0Gy2FfHa2RXHKckrH/VUfV2KQk4TNSw== +"@storybook/builder-webpack4@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/builder-webpack4/-/builder-webpack4-6.5.9.tgz#4b37e1fa23a25aa4bfeaba640e5d318fcd511f95" + integrity sha512-YOeA4++9uRZ8Hog1wC60yjaxBOiI1FRQNtax7b9E7g+kP8UlSCPCGcv4gls9hFmzbzTOPfQTWnToA9Oa6jzRVw== dependencies: "@babel/core" "^7.12.10" - "@storybook/addons" "6.5.8" - "@storybook/api" "6.5.8" - "@storybook/channel-postmessage" "6.5.8" - "@storybook/channels" "6.5.8" - "@storybook/client-api" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/components" "6.5.8" - "@storybook/core-common" "6.5.8" - "@storybook/core-events" "6.5.8" - "@storybook/node-logger" "6.5.8" - "@storybook/preview-web" "6.5.8" - "@storybook/router" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/api" "6.5.9" + "@storybook/channel-postmessage" "6.5.9" + "@storybook/channels" "6.5.9" + "@storybook/client-api" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/components" "6.5.9" + "@storybook/core-common" "6.5.9" + "@storybook/core-events" "6.5.9" + "@storybook/node-logger" "6.5.9" + "@storybook/preview-web" "6.5.9" + "@storybook/router" "6.5.9" "@storybook/semver" "^7.3.2" - "@storybook/store" "6.5.8" - "@storybook/theming" "6.5.8" - "@storybook/ui" "6.5.8" + "@storybook/store" "6.5.9" + "@storybook/theming" "6.5.9" + "@storybook/ui" "6.5.9" "@types/node" "^14.0.10 || ^16.0.0" "@types/webpack" "^4.41.26" autoprefixer "^9.8.6" @@ -3051,27 +3524,27 @@ webpack-hot-middleware "^2.25.1" webpack-virtual-modules "^0.2.2" -"@storybook/builder-webpack5@^6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/builder-webpack5/-/builder-webpack5-6.5.8.tgz#8d1e366c4bc2c8bec49849073031cfd195682309" - integrity sha512-bc7LSGzOqTUImejsfjWAHEHwBreoPQKS6pfnWYkjKMvfvWOwlHSAxwOSM5DyS4cvpcpMDG8yBJNz2QcvXFVLxA== +"@storybook/builder-webpack5@^6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/builder-webpack5/-/builder-webpack5-6.5.9.tgz#30b4e08622daff104bcccd015d3ee7902f99dd99" + integrity sha512-NUVZ4Qci6HWPuoH8U/zQkdBO5soGgu7QYrGC/LWU0tRfmmZxkjr7IUU14ppDpGPYgx3r7jkaQI1J/E1YEmSCWQ== dependencies: "@babel/core" "^7.12.10" - "@storybook/addons" "6.5.8" - "@storybook/api" "6.5.8" - "@storybook/channel-postmessage" "6.5.8" - "@storybook/channels" "6.5.8" - "@storybook/client-api" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/components" "6.5.8" - "@storybook/core-common" "6.5.8" - "@storybook/core-events" "6.5.8" - "@storybook/node-logger" "6.5.8" - "@storybook/preview-web" "6.5.8" - "@storybook/router" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/api" "6.5.9" + "@storybook/channel-postmessage" "6.5.9" + "@storybook/channels" "6.5.9" + "@storybook/client-api" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/components" "6.5.9" + "@storybook/core-common" "6.5.9" + "@storybook/core-events" "6.5.9" + "@storybook/node-logger" "6.5.9" + "@storybook/preview-web" "6.5.9" + "@storybook/router" "6.5.9" "@storybook/semver" "^7.3.2" - "@storybook/store" "6.5.8" - "@storybook/theming" "6.5.8" + "@storybook/store" "6.5.9" + "@storybook/theming" "6.5.9" "@types/node" "^14.0.10 || ^16.0.0" babel-loader "^8.0.0" babel-plugin-named-exports-order "^0.0.2" @@ -3095,51 +3568,51 @@ webpack-hot-middleware "^2.25.1" webpack-virtual-modules "^0.4.1" -"@storybook/channel-postmessage@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-6.5.8.tgz#989af9a55eba391b64487640f6b5b0cfd1fde2f9" - integrity sha512-6IkIKk+UMYKk05vN8gWHvvOV/EZNXpQG/5gesGDALjkCyvRmcktHak1a9tHpoihZ3L7/gDwXOZraCZmuy8vBcQ== +"@storybook/channel-postmessage@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-6.5.9.tgz#9cf4530f0364cee0d5e58f92d6fb5ce98e10257b" + integrity sha512-pX/0R8UW7ezBhCrafRaL20OvMRcmESYvQQCDgjqSzJyHkcG51GOhsd6Ge93eJ6QvRMm9+w0Zs93N2VKjVtz0Qw== dependencies: - "@storybook/channels" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/channels" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/core-events" "6.5.9" core-js "^3.8.2" global "^4.4.0" qs "^6.10.0" telejson "^6.0.8" -"@storybook/channel-websocket@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/channel-websocket/-/channel-websocket-6.5.8.tgz#722743619f86ebc9325bbff026acf6eba13b21ca" - integrity sha512-lAtvgO0FWsyS3u7uFbsGIYp2aSWJfWU/LOtc3x1K5c84JJAd9fncYkyZMwP1gMbdNgYxJoxe8HXtVtfeNegPuQ== +"@storybook/channel-websocket@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/channel-websocket/-/channel-websocket-6.5.9.tgz#6b7a0127fec58ee5be4f6aebcf460adc564f2f34" + integrity sha512-xtHvSNwuOhkgALwVshKWsoFhDmuvcosdYfxcfFGEiYKXIu46tRS5ZXmpmgEC/0JAVkVoFj5nL8bV7IY5np6oaA== dependencies: - "@storybook/channels" "6.5.8" - "@storybook/client-logger" "6.5.8" + "@storybook/channels" "6.5.9" + "@storybook/client-logger" "6.5.9" core-js "^3.8.2" global "^4.4.0" telejson "^6.0.8" -"@storybook/channels@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-6.5.8.tgz#e85ffd2076813b67336b1b9b274c37aa5f1b80e0" - integrity sha512-fNql1lEIvWlI1NiRtwFMWOOvfW6qxgeSP6xoqiAJ0b+QYegEFG9UxJDuEvVHq++S81FulgQ5U+p+5R9XSV19tQ== +"@storybook/channels@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-6.5.9.tgz#abfab89a6587a2688e9926d4aafeb11c9d8b2e79" + integrity sha512-FvGA35nV38UPXWOl9ERapFTJaxwSTamQ339s2Ev7E9riyRG+GRkgTWzf5kECJgS1PAYKd/7m/RqKJT9BVv6A5g== dependencies: core-js "^3.8.2" ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/client-api@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-6.5.8.tgz#cf1b3d4a71a3a156636a9b6b51acc4239b259d86" - integrity sha512-mdU+qQ4+T2OUbEnl+3MWRKxEPju/EOIUg66hMgmif8c5u7YFYBFulUMUYLICMjll8Jlu+37+g+qO3K2eEz6CEw== +"@storybook/client-api@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/client-api/-/client-api-6.5.9.tgz#3e4a8ec1d277fd81325c5d959c553161a85fa182" + integrity sha512-pc7JKJoWLesixUKvG2nV36HukUuYoGRyAgD3PpIV7qSBS4JixqZ3VAHFUtqV1UzfOSQTovLSl4a0rIRnpie6gA== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/channel-postmessage" "6.5.8" - "@storybook/channels" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/channel-postmessage" "6.5.9" + "@storybook/channels" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/store" "6.5.8" + "@storybook/store" "6.5.9" "@types/qs" "^6.9.5" "@types/webpack-env" "^1.16.0" core-js "^3.8.2" @@ -3154,44 +3627,45 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/client-logger@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-6.5.8.tgz#551f818c4448ef6e6adf9c3ad256e1ae61e2d75c" - integrity sha512-dH6HSaVuOIMHy1+rpsqcD3SJxVZEEbuEtsNpdUGwLJaIuduhUJJpM2xQfUW0siZDyrgwoa+znll+G0YNUbv7sg== +"@storybook/client-logger@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-6.5.9.tgz#dc1669abe8c45af1cc38f74c6f4b15ff33e63014" + integrity sha512-DOHL6p0uiDd3gV/Sb2FR+Vh6OiPrrf8BrA06uvXWsMRIIvEEvnparxv9EvPg7FlmUX0T3nq7d3juwjx4F8Wbcg== dependencies: core-js "^3.8.2" global "^4.4.0" -"@storybook/components@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/components/-/components-6.5.8.tgz#eb18cfcc4e88b7f4081b20b8a81b92d7ae9eaeac" - integrity sha512-YE+LZ1/GXoqertxodsf+L9ehcohbICRAxgE/iNqc7MZfk95SD3XRSUbxhCpGe8QTIZJpzs1tK4LFZ3Fg5w/+Lg== +"@storybook/components@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/components/-/components-6.5.9.tgz#97e07ffe11ab76c01ccee380888991bd161f75b2" + integrity sha512-BhfX980O9zn/1J4FNMeDo8ZvL1m5Ml3T4HRpfYmEBnf8oW5b5BeF6S2K2cwFStZRjWqm1feUcwNpZxCBVMkQnQ== dependencies: - "@storybook/client-logger" "6.5.8" + "@storybook/client-logger" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/theming" "6.5.8" + "@storybook/theming" "6.5.9" "@types/react-syntax-highlighter" "11.0.5" core-js "^3.8.2" + memoizerific "^1.11.3" qs "^6.10.0" react-syntax-highlighter "^15.4.5" regenerator-runtime "^0.13.7" util-deprecate "^1.0.2" -"@storybook/core-client@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/core-client/-/core-client-6.5.8.tgz#4be4ce024a74b51c0650d346f1f3a11a0f921952" - integrity sha512-8x8qKQ2clvpfDcoWrNBmQ8Xt9z/i32TFIBp4PEZMcbB7eqo517nzfllLiXDipiJgO7BGxKtY5CRHQ9pAU9G27A== +"@storybook/core-client@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/core-client/-/core-client-6.5.9.tgz#ea6035d1c90d2c68e860e3cf629979491856cd88" + integrity sha512-LY0QbhShowO+PQx3gao3wdVjpKMH1AaSLmuI95FrcjoMmSXGf96jVLKQp9mJRGeHIsAa93EQBYuCihZycM3Kbg== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/channel-postmessage" "6.5.8" - "@storybook/channel-websocket" "6.5.8" - "@storybook/client-api" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/channel-postmessage" "6.5.9" + "@storybook/channel-websocket" "6.5.9" + "@storybook/client-api" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/preview-web" "6.5.8" - "@storybook/store" "6.5.8" - "@storybook/ui" "6.5.8" + "@storybook/preview-web" "6.5.9" + "@storybook/store" "6.5.9" + "@storybook/ui" "6.5.9" airbnb-js-shims "^2.2.1" ansi-to-html "^0.6.11" core-js "^3.8.2" @@ -3203,10 +3677,10 @@ unfetch "^4.2.0" util-deprecate "^1.0.2" -"@storybook/core-common@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/core-common/-/core-common-6.5.8.tgz#6972c7109477914f9ed72bedbe3769cec0eb8c56" - integrity sha512-ELGKLMx1d0oEA2LT+fsmo85X2RNE1EO+It7B1bw//g7jyf1hmZ7t3lXMZUCqt7eml1qy1N72LDkfmmU+H9H6ww== +"@storybook/core-common@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/core-common/-/core-common-6.5.9.tgz#7ca8258ea2634b1d64695c1e4262f71cc7457989" + integrity sha512-NxOK0mrOCo0TWZ7Npc5HU66EKoRHlrtg18/ZixblLDWQMIqY9XCck8K1kJ8QYpYCHla+aHIsYUArFe2vhlEfZA== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-proposal-class-properties" "^7.12.1" @@ -3230,7 +3704,7 @@ "@babel/preset-react" "^7.12.10" "@babel/preset-typescript" "^7.12.7" "@babel/register" "^7.12.1" - "@storybook/node-logger" "6.5.8" + "@storybook/node-logger" "6.5.9" "@storybook/semver" "^7.3.2" "@types/node" "^14.0.10 || ^16.0.0" "@types/pretty-hrtime" "^1.0.0" @@ -3259,30 +3733,30 @@ util-deprecate "^1.0.2" webpack "4" -"@storybook/core-events@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-6.5.8.tgz#bc405d37d0ed1a6eafa2682fc085b2a7a992233c" - integrity sha512-lzG4Lg65WFYvjs2k/E3CP4+eyPexEGrDyRMO9Pbj9H9x+eosYptauEbT/wXF83bmUWZKLWWVUAZX7hDcxBO8cw== +"@storybook/core-events@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-6.5.9.tgz#5b0783c7d22a586c0f5e927a61fe1b1223e19637" + integrity sha512-tXt7a3ZvJOCeEKpNa/B5rQM5VI7UJLlOh3IHOImWn4HqoBRrZvbourmac+PRZAtXpos0h3c6554Hjapj/Sny5Q== dependencies: core-js "^3.8.2" -"@storybook/core-server@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/core-server/-/core-server-6.5.8.tgz#3ef53c4b0437e83c310f9e545607a0b1ce512ab6" - integrity sha512-ti7+MW1xzD9O0JLwgZTwulxhJx5YGPNu+hRpGhJSjKrqGX1h6K6ilmkBSHvyLqpiE+F4mxvqb5Rx3KBIEdEgbw== +"@storybook/core-server@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/core-server/-/core-server-6.5.9.tgz#749a881c1a81d7cf1a69f3782c06a7f0c39a505c" + integrity sha512-YeePGUrd5fQPvGzMhowh124KrcZURFpFXg1VB0Op3ESqCIsInoMZeObci4Gc+binMXC7vcv7aw3EwSLU37qJzQ== dependencies: "@discoveryjs/json-ext" "^0.5.3" - "@storybook/builder-webpack4" "6.5.8" - "@storybook/core-client" "6.5.8" - "@storybook/core-common" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/builder-webpack4" "6.5.9" + "@storybook/core-client" "6.5.9" + "@storybook/core-common" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/csf-tools" "6.5.8" - "@storybook/manager-webpack4" "6.5.8" - "@storybook/node-logger" "6.5.8" + "@storybook/csf-tools" "6.5.9" + "@storybook/manager-webpack4" "6.5.9" + "@storybook/node-logger" "6.5.9" "@storybook/semver" "^7.3.2" - "@storybook/store" "6.5.8" - "@storybook/telemetry" "6.5.8" + "@storybook/store" "6.5.9" + "@storybook/telemetry" "6.5.9" "@types/node" "^14.0.10 || ^16.0.0" "@types/node-fetch" "^2.5.7" "@types/pretty-hrtime" "^1.0.0" @@ -3317,18 +3791,18 @@ ws "^8.2.3" x-default-browser "^0.4.0" -"@storybook/core@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/core/-/core-6.5.8.tgz#cbe6acaf587e9ef66963bb104a067c213aeea990" - integrity sha512-+Fv4n1E5N4Avty9GcRbz4vB2IWH//se2OUU+RTT3vneCOGjyus5bj0Or6GU5wef5UGuvHF78mHg/frhWpguzsw== +"@storybook/core@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/core/-/core-6.5.9.tgz#da4f237391d99aed1228323f24b335cafbdf3499" + integrity sha512-Mt3TTQnjQt2/pa60A+bqDsAOrYpohapdtt4DDZEbS8h0V6u11KyYYh3w7FCySlL+sPEyogj63l5Ec76Jah3l2w== dependencies: - "@storybook/core-client" "6.5.8" - "@storybook/core-server" "6.5.8" + "@storybook/core-client" "6.5.9" + "@storybook/core-server" "6.5.9" -"@storybook/csf-tools@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/csf-tools/-/csf-tools-6.5.8.tgz#5788aa1e862ee613d11d6528f27c8e267e4dd3a7" - integrity sha512-4VrjIMxKcp29OFSMDub52aQOMP4EvtZ5eWZkPeORRNQoJsnQaxhF9GGf71QdSaAQZhMoxdvmpA47ehrFk8Rnfw== +"@storybook/csf-tools@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/csf-tools/-/csf-tools-6.5.9.tgz#8e01df2305b53e228229f0b45ada3720e6e42a1c" + integrity sha512-RAdhsO2XmEDyWy0qNQvdKMLeIZAuyfD+tYlUwBHRU6DbByDucvwgMOGy5dF97YNJFmyo93EUYJzXjUrJs3U1LQ== dependencies: "@babel/core" "^7.12.10" "@babel/generator" "^7.12.11" @@ -3352,33 +3826,33 @@ dependencies: lodash "^4.17.15" -"@storybook/docs-tools@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/docs-tools/-/docs-tools-6.5.8.tgz#6189fd20fafa9eb2aa4a19e311d65295992dd105" - integrity sha512-CWMW+3LSstvQmHKV5ggPR1beQZTpwCXEhfysZ9u4Yp/4fcoDIuQ7DTOK5uNFynGCGl1FG3lATriEOhEZ3bZCvQ== +"@storybook/docs-tools@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/docs-tools/-/docs-tools-6.5.9.tgz#5ff304f881e972ce14923a5ffcfed3f052094889" + integrity sha512-UoTaXLvec8x+q+4oYIk/t8DBju9C3ZTGklqOxDIt+0kS3TFAqEgI3JhKXqQOXgN5zDcvLVSxi8dbVAeSxk2ktA== dependencies: "@babel/core" "^7.12.10" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/store" "6.5.8" + "@storybook/store" "6.5.9" core-js "^3.8.2" doctrine "^3.0.0" lodash "^4.17.21" regenerator-runtime "^0.13.7" -"@storybook/manager-webpack4@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/manager-webpack4/-/manager-webpack4-6.5.8.tgz#9e4d3dcebac9bd0b07abd630632dc15130ae03f1" - integrity sha512-qW5/L3cJHvtNi5ylDxObALZWaAHMsWQlPP8GRxm95NHpff4CfRo/qs7puY9ZeLmJSic0KchoHEH/8AScflLOgA== +"@storybook/manager-webpack4@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/manager-webpack4/-/manager-webpack4-6.5.9.tgz#c75d2cced4550c8a786f00b0e57b203d613e706c" + integrity sha512-49LZlHqWc7zj9tQfOOANixPYmLxqWTTZceA6DSXnKd9xDiO2Gl23Y+l/CSPXNZGDB8QFAwpimwqyKJj/NLH45A== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-transform-template-literals" "^7.12.1" "@babel/preset-react" "^7.12.10" - "@storybook/addons" "6.5.8" - "@storybook/core-client" "6.5.8" - "@storybook/core-common" "6.5.8" - "@storybook/node-logger" "6.5.8" - "@storybook/theming" "6.5.8" - "@storybook/ui" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/core-client" "6.5.9" + "@storybook/core-common" "6.5.9" + "@storybook/node-logger" "6.5.9" + "@storybook/theming" "6.5.9" + "@storybook/ui" "6.5.9" "@types/node" "^14.0.10 || ^16.0.0" "@types/webpack" "^4.41.26" babel-loader "^8.0.0" @@ -3406,20 +3880,20 @@ webpack-dev-middleware "^3.7.3" webpack-virtual-modules "^0.2.2" -"@storybook/manager-webpack5@^6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/manager-webpack5/-/manager-webpack5-6.5.8.tgz#36e97096506073c837716897495fffe4a616fe83" - integrity sha512-foW/ZvTqGZAl4TfcfGKdS3RlaBDDAgEjUCbCaVShlZRshZ8tzWBVu3JQFqbPVGslH89T5qp9DUYoN/SJqTUpcg== +"@storybook/manager-webpack5@^6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/manager-webpack5/-/manager-webpack5-6.5.9.tgz#ce9dd6ea6298ab426b111f170c23deea7085ba08" + integrity sha512-J1GamphSsaZLNBEhn1awgxzOS8KfvzrHtVlAm2VHwW7j1E1DItROFJhGCgduYYuBiN9eqm+KIYrxcr6cRuoolQ== dependencies: "@babel/core" "^7.12.10" "@babel/plugin-transform-template-literals" "^7.12.1" "@babel/preset-react" "^7.12.10" - "@storybook/addons" "6.5.8" - "@storybook/core-client" "6.5.8" - "@storybook/core-common" "6.5.8" - "@storybook/node-logger" "6.5.8" - "@storybook/theming" "6.5.8" - "@storybook/ui" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/core-client" "6.5.9" + "@storybook/core-common" "6.5.9" + "@storybook/node-logger" "6.5.9" + "@storybook/theming" "6.5.9" + "@storybook/ui" "6.5.9" "@types/node" "^14.0.10 || ^16.0.0" babel-loader "^8.0.0" case-sensitive-paths-webpack-plugin "^2.3.0" @@ -3461,10 +3935,10 @@ prettier ">=2.2.1 <=2.3.0" ts-dedent "^2.0.0" -"@storybook/node-logger@6.5.8", "@storybook/node-logger@^6.5.6": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-6.5.8.tgz#d1244c846da5a296a7432444f8682f77853fb81e" - integrity sha512-BHdkSipgjnfsh4FRYbV2R0npM5gVx9JLRsDQ0KiTolRpN4SU98kT/6885zb9jZg6I0EY+UG9Qdr3fvL9VLpY1g== +"@storybook/node-logger@6.5.9", "@storybook/node-logger@^6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-6.5.9.tgz#129cfe0d0f79cab4f6a2ba194d39516680b1626f" + integrity sha512-nZZNZG2Wtwv6Trxi3FrnIqUmB55xO+X/WQGPT5iKlqNjdRIu/T72mE7addcp4rbuWCQfZUhcDDGpBOwKtBxaGg== dependencies: "@types/npmlog" "^4.1.2" chalk "^4.1.0" @@ -3472,10 +3946,10 @@ npmlog "^5.0.1" pretty-hrtime "^1.0.3" -"@storybook/postinstall@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-6.5.8.tgz#e803fd5652eea68e7da81f6d70e46d9db9c633c1" - integrity sha512-Z6zQnBOaMj+gHtF1XPMpwTIxYRCmh6eNirrJLrkPk5c+fKXtw6+vNCbmPvsyTGxGEHnyn/tYwe1fvwJTHDctUw== +"@storybook/postinstall@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/postinstall/-/postinstall-6.5.9.tgz#a5a2565808e9d7bc310e78c279b09ce337fe3457" + integrity sha512-KQBupK+FMRrtSt8IL0MzCZ/w9qbd25Yxxp/+ajfWgZTRgsWgVFOqcDyMhS16eNbBp5qKIBCBDXfEF+/mK8HwQQ== dependencies: core-js "^3.8.2" @@ -3491,17 +3965,17 @@ pnp-webpack-plugin "^1.7.0" semver "^7.3.5" -"@storybook/preview-web@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/preview-web/-/preview-web-6.5.8.tgz#b1c86d56e99032c02ba47bab628c36d76a0385b6" - integrity sha512-jEEAgvTVZfFA0B20mRJfLW6dPA5mG5PxUJtjMx6wH4Yw4+i3Sld/U63hTRt7ktpKdrcu4lX9E+PuaRLPq7S2kg== +"@storybook/preview-web@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/preview-web/-/preview-web-6.5.9.tgz#557d919e6df50d66259521aa36ebf4055bbd236e" + integrity sha512-4eMrO2HJyZUYyL/j+gUaDvry6iGedshwT5MQqe7J9FaA+Q2pNARQRB1X53f410w7S4sObRmYIAIluWPYdWym9w== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/channel-postmessage" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/channel-postmessage" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/store" "6.5.8" + "@storybook/store" "6.5.9" ansi-to-html "^0.6.11" core-js "^3.8.2" global "^4.4.0" @@ -3526,24 +4000,24 @@ react-docgen-typescript "^2.1.1" tslib "^2.0.0" -"@storybook/react@^6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/react/-/react-6.5.8.tgz#8a9e15416a18ceb5c11c89ffe9f38357d442efa9" - integrity sha512-LdObfhhPb9gAFBtRNb3awYJe1qMiYeda1ppkj0ZvccbV04YrmbW5bzYvfOCvU6D34ugbQJhJyWuvraO/0EJK6w== +"@storybook/react@^6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/react/-/react-6.5.9.tgz#687ec1f6b785822a392b7ac115b61800f69fb7cd" + integrity sha512-Rp+QaTQAzxJhwuzJXVd49mnIBLQRlF8llTxPT2YoGHdrGkku/zl/HblQ6H2yzEf15367VyzaAv/BpLsO9Jlfxg== dependencies: "@babel/preset-flow" "^7.12.1" "@babel/preset-react" "^7.12.10" "@pmmmwh/react-refresh-webpack-plugin" "^0.5.3" - "@storybook/addons" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/core" "6.5.8" - "@storybook/core-common" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/core" "6.5.9" + "@storybook/core-common" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/docs-tools" "6.5.8" - "@storybook/node-logger" "6.5.8" + "@storybook/docs-tools" "6.5.9" + "@storybook/node-logger" "6.5.9" "@storybook/react-docgen-typescript-plugin" "1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0" "@storybook/semver" "^7.3.2" - "@storybook/store" "6.5.8" + "@storybook/store" "6.5.9" "@types/estree" "^0.0.51" "@types/node" "^14.14.20 || ^16.0.0" "@types/webpack-env" "^1.16.0" @@ -3567,13 +4041,15 @@ util-deprecate "^1.0.2" webpack ">=4.43.0 <6.0.0" -"@storybook/router@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/router/-/router-6.5.8.tgz#241e3842bdd174e0eeeb9d1de6adb2975615884d" - integrity sha512-tseNJpZ2ZzVYowjekUMpGJVVRMrwOkttieD9mRbHrhh+2n7b+SoMKnuLi3ow0xeOyPL8ZDng2FgRjQzQHXA5Sw== +"@storybook/router@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/router/-/router-6.5.9.tgz#4740248f8517425b2056273fb366ace8a17c65e8" + integrity sha512-G2Xp/2r8vU2O34eelE+G5VbEEVFDeHcCURrVJEROh6dq2asFJAPbzslVXSeCqgOTNLSpRDJ2NcN5BckkNqmqJg== dependencies: - "@storybook/client-logger" "6.5.8" + "@storybook/client-logger" "6.5.9" core-js "^3.8.2" + memoizerific "^1.11.3" + qs "^6.10.0" regenerator-runtime "^0.13.7" "@storybook/semver@^7.3.2": @@ -3584,13 +4060,13 @@ core-js "^3.6.5" find-up "^4.1.0" -"@storybook/source-loader@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-6.5.8.tgz#106694fe821f5e42abc4e8e653e5f268a043e470" - integrity sha512-3bVxXKE2o6lS4WGga/S7WwgITxPQ96qsY+pQ1I7A+e4/cKSmZxlVWM9qfMW2ScmHTVoZE0Ujsmn6DWftxzCyrQ== +"@storybook/source-loader@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-6.5.9.tgz#7b6f065c6a6108c4b4ca7e45bfd78707373d84ac" + integrity sha512-H03nFKaP6borfWMTTa9igBA+Jm2ph+FoVJImWC/X+LAmLSJYYSXuqSgmiZ/DZvbjxS4k8vccE2HXogne1IvaRA== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/client-logger" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/client-logger" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" core-js "^3.8.2" estraverse "^5.2.0" @@ -3600,14 +4076,14 @@ prettier ">=2.2.1 <=2.3.0" regenerator-runtime "^0.13.7" -"@storybook/store@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/store/-/store-6.5.8.tgz#528bf9a2decf5121045fb0a19b8caf795b4a5647" - integrity sha512-5rhGjN/O0oLebRv947B0vgapq48qBBBYYOgq4krRUYU2ecS6LUgtAHR/kTa324o9aBO8cnIXHH78jZcSvMiJlQ== +"@storybook/store@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/store/-/store-6.5.9.tgz#dc9963fc013636569082bd8f7200804866373735" + integrity sha512-80pcDTcCwK6wUA63aWOp13urI77jfipIVee9mpVvbNyfrNN8kGv1BS0z/JHDxuV6rC4g7LG1fb+BurR0yki7BA== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/core-events" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/core-events" "6.5.9" "@storybook/csf" "0.0.2--canary.4566f4d.1" core-js "^3.8.2" fast-deep-equal "^3.1.3" @@ -3621,13 +4097,13 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/telemetry@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/telemetry/-/telemetry-6.5.8.tgz#2acf9734292d421f84f7f2ac6c17d887c2cb0df4" - integrity sha512-QnAhYF8CwcjC1bT2PK7Zqvo6E42TPl0MY6JS+H6qSZU/BmYeS0It8ZURNfPsA/OzVVLHUkQs96CisKh3N0WWaw== +"@storybook/telemetry@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/telemetry/-/telemetry-6.5.9.tgz#8e1e0d4a89fc2387620045e5ea96c109d16a7247" + integrity sha512-JluoHCRhHAr4X0eUNVBSBi1JIBA92404Tu1TPdbN7x6gCZxHXXPTSUTAnspXp/21cTdMhY2x+kfZQ8fmlGK4MQ== dependencies: - "@storybook/client-logger" "6.5.8" - "@storybook/core-common" "6.5.8" + "@storybook/client-logger" "6.5.9" + "@storybook/core-common" "6.5.9" chalk "^4.1.0" core-js "^3.8.2" detect-package-manager "^2.0.1" @@ -3639,30 +4115,33 @@ read-pkg-up "^7.0.1" regenerator-runtime "^0.13.7" -"@storybook/theming@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-6.5.8.tgz#240a3c83ea53a9c7b1f3a2c47d6324f38ecb8771" - integrity sha512-1VaKHqj38Ls1bJwDpg3+aEOlvVib/DCFkP6WYrP/AQtNAzxiyw5WkaoRlTVJZvCdu5TxjpG4O6/Ai5TI9QftIg== +"@storybook/theming@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-6.5.9.tgz#13f60a3a3cd73ceb5caf9f188e1627e79f1891aa" + integrity sha512-KM0AMP5jMQPAdaO8tlbFCYqx9uYM/hZXGSVUhznhLYu7bhNAIK7ZVmXxyE/z/khM++8eUHzRoZGiO/cwCkg9Xw== dependencies: - "@storybook/client-logger" "6.5.8" + "@storybook/client-logger" "6.5.9" core-js "^3.8.2" + memoizerific "^1.11.3" regenerator-runtime "^0.13.7" -"@storybook/ui@6.5.8": - version "6.5.8" - resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-6.5.8.tgz#acd8dadd221c68f65c4963c4ab86b4a757860591" - integrity sha512-rL09kxgY9pCVbxr/VUK4b5FL5VbALfciZR+50sNT1EcTDb9k0OPeqx7a4Ptc+KNkgyPdSTxUGvhzVqH5PYrhZQ== +"@storybook/ui@6.5.9": + version "6.5.9" + resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-6.5.9.tgz#41e59279323cccc0d613974ec9782d797220c8a7" + integrity sha512-ryuPxJgtbb0gPXKGgGAUC+Z185xGAd1IvQ0jM5fJ0SisHXI8jteG3RaWhntOehi9qCg+64Vv6eH/cj9QYNHt1Q== dependencies: - "@storybook/addons" "6.5.8" - "@storybook/api" "6.5.8" - "@storybook/channels" "6.5.8" - "@storybook/client-logger" "6.5.8" - "@storybook/components" "6.5.8" - "@storybook/core-events" "6.5.8" - "@storybook/router" "6.5.8" + "@storybook/addons" "6.5.9" + "@storybook/api" "6.5.9" + "@storybook/channels" "6.5.9" + "@storybook/client-logger" "6.5.9" + "@storybook/components" "6.5.9" + "@storybook/core-events" "6.5.9" + "@storybook/router" "6.5.9" "@storybook/semver" "^7.3.2" - "@storybook/theming" "6.5.8" + "@storybook/theming" "6.5.9" core-js "^3.8.2" + memoizerific "^1.11.3" + qs "^6.10.0" regenerator-runtime "^0.13.7" resolve-from "^5.0.0" @@ -3891,9 +4370,9 @@ defer-to-connect "^1.0.1" "@testing-library/dom@^8.5.0": - version "8.13.0" - resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.13.0.tgz#bc00bdd64c7d8b40841e27a70211399ad3af46f5" - integrity sha512-9VHgfIatKNXQNaZTtLnalIy0jNZzY35a4S3oi08YAt9Hv1VsfZ/DfA45lM8D/UhtHBGJ4/lGwp0PZkVndRkoOQ== + version "8.14.0" + resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.14.0.tgz#c9830a21006d87b9ef6e1aae306cf49b0283e28e" + integrity sha512-m8FOdUo77iMTwVRCyzWcqxlEIk+GnopbrRI15a0EaLbpZSCinIVI4kSQzWhkShK83GogvEFJSsHF3Ws0z1vrqA== dependencies: "@babel/code-frame" "^7.10.4" "@babel/runtime" "^7.12.5" @@ -3928,10 +4407,10 @@ "@testing-library/dom" "^8.5.0" "@types/react-dom" "^18.0.0" -"@testing-library/user-event@^14.2.0": - version "14.2.0" - resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.2.0.tgz#8293560f8f80a00383d6c755ec3e0b918acb1683" - integrity sha512-+hIlG4nJS6ivZrKnOP7OGsDu9Fxmryj9vCl8x0ZINtTJcCHs2zLsYif5GzuRiBF2ck5GZG2aQr7Msg+EHlnYVQ== +"@testing-library/user-event@^14.3.0": + version "14.3.0" + resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.3.0.tgz#0a6750b94b40e4739706d41e8efc2ccf64d2aad9" + integrity sha512-P02xtBBa8yMaLhK8CzJCIns8rqwnF6FxhR9zs810flHOBXUYCFjLd8Io1rQrAkQRWEmW2PGdZIEdMxf/KLsqFA== "@tootallnate/once@1": version "1.1.2" @@ -3944,24 +4423,24 @@ integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== "@tsconfig/node10@^1.0.7": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" - integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== "@tsconfig/node12@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c" - integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== "@tsconfig/node14@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" - integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== "@tsconfig/node16@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" - integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" + integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== "@types/aria-query@^4.2.0": version "4.2.2" @@ -4045,9 +4524,9 @@ "@types/estree" "*" "@types/eslint@*": - version "8.4.2" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.2.tgz#48f2ac58ab9c631cb68845c3d956b28f79fad575" - integrity sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA== + version "8.4.3" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.3.tgz#5c92815a3838b1985c90034cd85f26f59d9d0ece" + integrity sha512-YP1S7YJRMPs+7KZKDb9G63n8YejIwW9BALq7a5j2+H4yl6iOv9CB29edho+cuFRrvmJbbaH2yiVChKLJVysDGw== dependencies: "@types/estree" "*" "@types/json-schema" "*" @@ -4076,9 +4555,9 @@ integrity sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw== "@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.18": - version "4.17.28" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz#c47def9f34ec81dc6328d0b1b5303d1ec98d86b8" - integrity sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig== + version "4.17.29" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.29.tgz#2a1795ea8e9e9c91b4a4bbe475034b20c1ec711c" + integrity sha512-uMd++6dMKS32EOuw1Uli3e3BPgdLIXmezcfHv7N4c1s3gkhikBplORPpMq3fuWkxncZN1reb16d5n8yhQ80x7Q== dependencies: "@types/node" "*" "@types/qs" "*" @@ -4094,7 +4573,7 @@ "@types/qs" "*" "@types/serve-static" "*" -"@types/glob@*", "@types/glob@^7.1.1": +"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== @@ -4170,10 +4649,18 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@*", "@types/jest@^27.5.0": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.5.1.tgz#2c8b6dc6ff85c33bcd07d0b62cb3d19ddfdb3ab9" - integrity sha512-fUy7YRpT+rHXto1YlL+J9rs0uLGyiqVt3ZOTQR+4ROc47yNl8WLdVLgUloBRhOxP1PZvguHl44T3H0wAWxahYQ== +"@types/jest@*": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-28.1.3.tgz#52f3f3e50ce59191ff5fbb1084896cc0cf30c9ce" + integrity sha512-Tsbjk8Y2hkBaY/gJsataeb4q9Mubw9EOz7+4RjPkzD5KjTvHHs7cpws22InaoXxAVAhF5HfFbzJjo6oKWqSZLw== + dependencies: + jest-matcher-utils "^28.0.0" + pretty-format "^28.0.0" + +"@types/jest@^27.5.0": + version "27.5.2" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.5.2.tgz#ec49d29d926500ffb9fd22b84262e862049c026c" + integrity sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA== dependencies: jest-matcher-utils "^27.0.0" pretty-format "^27.0.0" @@ -4221,22 +4708,27 @@ integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== "@types/node-fetch@^2.5.7": - version "2.6.1" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.1.tgz#8f127c50481db65886800ef496f20bbf15518975" - integrity sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA== + version "2.6.2" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.2.tgz#d1a9c5fd049d9415dce61571557104dec3ec81da" + integrity sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A== dependencies: "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@^17.0.42", "@types/node@^17.0.5": - version "17.0.42" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.42.tgz#d7e8f22700efc94d125103075c074396b5f41f9b" - integrity sha512-Q5BPGyGKcvQgAMbsr7qEGN/kIPN6zZecYYABeTDBizOsau+2NMdSVTar9UQw21A2+JyA2KRNDYaYrPB0Rpk2oQ== +"@types/node@*", "@types/node@18.x", "@types/node@^18.6.1": + version "18.6.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.1.tgz#828e4785ccca13f44e2fb6852ae0ef11e3e20ba5" + integrity sha512-z+2vB6yDt1fNwKOeGbckpmirO+VBDuQqecXkgeIqDlaOtmKn6hPR/viQ8cxCfqLU4fTlvM3+YjM367TukWdxpg== "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0": - version "16.11.38" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.38.tgz#be0edd097b23eace6c471c525a74b3f98803017f" - integrity sha512-hjO/0K140An3GWDw2HJfq7gko3wWeznbjXgg+rzPdVzhe198hp4x2i1dgveAOEiFKd8sOilAxzoSJiVv5P/CUg== + version "16.11.41" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.41.tgz#88eb485b1bfdb4c224d878b7832239536aa2f813" + integrity sha512-mqoYK2TnVjdkGk8qXAVGc/x9nSaTpSrFaGFm43BUH3IdoBV0nta6hYaGmdOvIMlbHJbUEVen3gvwpwovAZKNdQ== + +"@types/node@^17.0.5": + version "17.0.45" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" + integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -4293,14 +4785,14 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== -"@types/react-dom@^18.0.0", "@types/react-dom@^18.0.5": +"@types/react-dom@^18.0.0": version "18.0.5" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.5.tgz#330b2d472c22f796e5531446939eacef8378444a" integrity sha512-OWPWTUrY/NIrjsAPkAk1wW9LZeIjSvkXRhclsFO8CZcZGCOg2G0YZy4ft+rOyYxy8B7ui5iZzi9OkDebZ7/QSA== dependencies: "@types/react" "*" -"@types/react-router-config@*": +"@types/react-router-config@*", "@types/react-router-config@^5.0.6": version "5.0.6" resolved "https://registry.yarnpkg.com/@types/react-router-config/-/react-router-config-5.0.6.tgz#87c5c57e72d241db900d9734512c50ccec062451" integrity sha512-db1mx37a1EJDf1XeX8jJN7R3PZABmJQXR8r28yUjVMFSjkmnQo6X6pOEEmNl+Tp2gYQOGPdYbFIipBtdElZ3Yg== @@ -4334,9 +4826,9 @@ "@types/react" "*" "@types/react@*", "@types/react@^18.0.1", "@types/react@^18.0.9": - version "18.0.12" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.12.tgz#cdaa209d0a542b3fcf69cf31a03976ec4cdd8840" - integrity sha512-duF1OTASSBQtcigUvhuiTB1Ya3OvSy+xORCiEf20H0P0lzx+/KeVsA99U5UjLXSbyo1DRJDlLKqTeM1ngosqtg== + version "18.0.15" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.15.tgz#d355644c26832dc27f3e6cbf0c4f4603fc4ab7fe" + integrity sha512-iz3BtLuIYH1uWdsv6wXYdhozhqj20oD4/Hk2DNXIn1kFsmp9x8d9QB6FnPhfkbhd2PgEONt9Q1x/ebkwjfFLow== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -4413,9 +4905,9 @@ integrity sha512-ipixuVrh2OdNmauvtT51o3d8z12p6LtFW9in7U79der/kwejjdNchQC5UMn5u/KxNoM7VHHOs/l8KS8uHxhODQ== "@types/testing-library__jest-dom@^5.9.1": - version "5.14.3" - resolved "https://registry.yarnpkg.com/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.3.tgz#ee6c7ffe9f8595882ee7bda8af33ae7b8789ef17" - integrity sha512-oKZe+Mf4ioWlMuzVBaXQ9WDnEm1+umLx0InILg+yvZVBBDmzV5KfZyLrCvadtWcx8+916jLmHafcmqqffl+iIw== + version "5.14.5" + resolved "https://registry.yarnpkg.com/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.5.tgz#d113709c90b3c75fdb127ec338dad7d5f86c974f" + integrity sha512-SBwbxYoyPIvxHbeHxTZX2Pe/74F/tX2/D3mMvzabdeJ25bBojfW0TyB8BHrbq/9zaaKICJZjLP+8r6AeZMFCuQ== dependencies: "@types/jest" "*" @@ -4425,9 +4917,9 @@ integrity sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg== "@types/uglify-js@*": - version "3.13.2" - resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.13.2.tgz#1044c1713fb81cb1ceef29ad8a9ee1ce08d690ef" - integrity sha512-/xFrPIo+4zOeNGtVMbf9rUm0N+i4pDf1ynExomqtokIJmVzR3962lJ1UE+MmexMkA0cmN9oTzg5Xcbwge0Ij2Q== + version "3.16.0" + resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.16.0.tgz#2cf74a0e6ebb6cd54c0d48e509d5bd91160a9602" + integrity sha512-0yeUr92L3r0GLRnBOvtYK1v2SjqMIqQDHMl7GLb+l2L8+6LSFWEEWEIgVsPdMn5ImLM8qzWT8xFPtQYpp8co0g== dependencies: source-map "^0.6.1" @@ -4436,6 +4928,11 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== +"@types/vscode@^1.69.0": + version "1.69.0" + resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.69.0.tgz#a472011af392fbcf82cbb82f60b4c239c21b921c" + integrity sha512-RlzDAnGqUoo9wS6d4tthNyAdZLxOIddLiX3djMoWk29jFfSA1yJbIwr0epBYqqYarWB6s2Z+4VaZCQ80Jaa3kA== + "@types/webpack-env@^1.16.0": version "1.17.0" resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.17.0.tgz#f99ce359f1bfd87da90cc4a57cab0a18f34a48d0" @@ -4504,14 +5001,14 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^5.5.0": - version "5.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.0.tgz#23d82a4f21aaafd8f69dbab7e716323bb6695cc8" - integrity sha512-DDrIA7GXtmHXr1VCcx9HivA39eprYBIFxbQEHI6NyraRDxCGpxAFiYQAT/1Y0vh1C+o2vfBiy4IuPoXxtTZCAQ== +"@typescript-eslint/eslint-plugin@^5.30.7", "@typescript-eslint/eslint-plugin@^5.5.0": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz#1621dabc1ae4084310e19e9efc80dfdbb97e7493" + integrity sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw== dependencies: - "@typescript-eslint/scope-manager" "5.27.0" - "@typescript-eslint/type-utils" "5.27.0" - "@typescript-eslint/utils" "5.27.0" + "@typescript-eslint/scope-manager" "5.30.7" + "@typescript-eslint/type-utils" "5.30.7" + "@typescript-eslint/utils" "5.30.7" debug "^4.3.4" functional-red-black-tree "^1.0.1" ignore "^5.2.0" @@ -4520,75 +5017,121 @@ tsutils "^3.21.0" "@typescript-eslint/experimental-utils@^5.0.0": - version "5.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.27.0.tgz#dfe4c6087f60be8950e32fa83f4a8f2fccd86e47" - integrity sha512-ZOn342bYh19IYvkiorrqnzNoRAr91h3GiFSSfa4tlHV+R9GgR8SxCwAi8PKMyT8+pfwMxfQdNbwKsMurbF9hzg== + version "5.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.29.0.tgz#abed79020f623ac4fb76c7fdf917552a17171704" + integrity sha512-H4fqOVYiH6R15NjtMO2LVBZgzXgzjdPEXYb7x/meg4QbXsptLxdq8YlHK2NZOFKipuInY4sAPY5a6SQ/53s3dw== dependencies: - "@typescript-eslint/utils" "5.27.0" + "@typescript-eslint/utils" "5.29.0" -"@typescript-eslint/parser@^5.5.0": - version "5.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.27.0.tgz#62bb091ed5cf9c7e126e80021bb563dcf36b6b12" - integrity sha512-8oGjQF46c52l7fMiPPvX4It3u3V3JipssqDfHQ2hcR0AeR8Zge+OYyKUCm5b70X72N1qXt0qgHenwN6Gc2SXZA== +"@typescript-eslint/parser@^5.30.7", "@typescript-eslint/parser@^5.5.0": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.30.7.tgz#99d09729392aec9e64b1de45cd63cb81a4ddd980" + integrity sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A== dependencies: - "@typescript-eslint/scope-manager" "5.27.0" - "@typescript-eslint/types" "5.27.0" - "@typescript-eslint/typescript-estree" "5.27.0" + "@typescript-eslint/scope-manager" "5.30.7" + "@typescript-eslint/types" "5.30.7" + "@typescript-eslint/typescript-estree" "5.30.7" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.27.0": - version "5.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.27.0.tgz#a272178f613050ed62f51f69aae1e19e870a8bbb" - integrity sha512-VnykheBQ/sHd1Vt0LJ1JLrMH1GzHO+SzX6VTXuStISIsvRiurue/eRkTqSrG0CexHQgKG8shyJfR4o5VYioB9g== +"@typescript-eslint/scope-manager@5.29.0": + version "5.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz#2a6a32e3416cb133e9af8dcf54bf077a916aeed3" + integrity sha512-etbXUT0FygFi2ihcxDZjz21LtC+Eps9V2xVx09zFoN44RRHPrkMflidGMI+2dUs821zR1tDS6Oc9IXxIjOUZwA== dependencies: - "@typescript-eslint/types" "5.27.0" - "@typescript-eslint/visitor-keys" "5.27.0" + "@typescript-eslint/types" "5.29.0" + "@typescript-eslint/visitor-keys" "5.29.0" -"@typescript-eslint/type-utils@5.27.0": - version "5.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.27.0.tgz#36fd95f6747412251d79c795b586ba766cf0974b" - integrity sha512-vpTvRRchaf628Hb/Xzfek+85o//zEUotr1SmexKvTfs7czXfYjXVT/a5yDbpzLBX1rhbqxjDdr1Gyo0x1Fc64g== +"@typescript-eslint/scope-manager@5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz#8269a931ef1e5ae68b5eb80743cc515c4ffe3dd7" + integrity sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw== dependencies: - "@typescript-eslint/utils" "5.27.0" + "@typescript-eslint/types" "5.30.7" + "@typescript-eslint/visitor-keys" "5.30.7" + +"@typescript-eslint/type-utils@5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz#5693dc3db6f313f302764282d614cfdbc8a9fcfd" + integrity sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw== + dependencies: + "@typescript-eslint/utils" "5.30.7" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.27.0": - version "5.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.27.0.tgz#c3f44b9dda6177a9554f94a74745ca495ba9c001" - integrity sha512-lY6C7oGm9a/GWhmUDOs3xAVRz4ty/XKlQ2fOLr8GAIryGn0+UBOoJDWyHer3UgrHkenorwvBnphhP+zPmzmw0A== +"@typescript-eslint/types@5.29.0": + version "5.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.29.0.tgz#7861d3d288c031703b2d97bc113696b4d8c19aab" + integrity sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg== -"@typescript-eslint/typescript-estree@5.27.0": - version "5.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.0.tgz#7965f5b553c634c5354a47dcce0b40b94611e995" - integrity sha512-QywPMFvgZ+MHSLRofLI7BDL+UczFFHyj0vF5ibeChDAJgdTV8k4xgEwF0geFhVlPc1p8r70eYewzpo6ps+9LJQ== +"@typescript-eslint/types@5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.7.tgz#18331487cc92d0f1fb1a6f580c8ec832528079d0" + integrity sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg== + +"@typescript-eslint/typescript-estree@5.29.0": + version "5.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz#e83d19aa7fd2e74616aab2f25dfbe4de4f0b5577" + integrity sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ== dependencies: - "@typescript-eslint/types" "5.27.0" - "@typescript-eslint/visitor-keys" "5.27.0" + "@typescript-eslint/types" "5.29.0" + "@typescript-eslint/visitor-keys" "5.29.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.27.0", "@typescript-eslint/utils@^5.13.0": - version "5.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.27.0.tgz#d0021cbf686467a6a9499bd0589e19665f9f7e71" - integrity sha512-nZvCrkIJppym7cIbP3pOwIkAefXOmfGPnCM0LQfzNaKxJHI6VjI8NC662uoiPlaf5f6ymkTy9C3NQXev2mdXmA== +"@typescript-eslint/typescript-estree@5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz#05da9f1b281985bfedcf62349847f8d168eecc07" + integrity sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA== + dependencies: + "@typescript-eslint/types" "5.30.7" + "@typescript-eslint/visitor-keys" "5.30.7" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.29.0": + version "5.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.29.0.tgz#775046effd5019667bd086bcf326acbe32cd0082" + integrity sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.27.0" - "@typescript-eslint/types" "5.27.0" - "@typescript-eslint/typescript-estree" "5.27.0" + "@typescript-eslint/scope-manager" "5.29.0" + "@typescript-eslint/types" "5.29.0" + "@typescript-eslint/typescript-estree" "5.29.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.27.0": - version "5.27.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.0.tgz#97aa9a5d2f3df8215e6d3b77f9d214a24db269bd" - integrity sha512-46cYrteA2MrIAjv9ai44OQDUoCZyHeGIc4lsjCUX2WT6r4C+kidz1bNiR4017wHOPUythYeH+Sc7/cFP97KEAA== +"@typescript-eslint/utils@5.30.7", "@typescript-eslint/utils@^5.13.0": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.30.7.tgz#7135be070349e9f7caa262b0ca59dc96123351bb" + integrity sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ== dependencies: - "@typescript-eslint/types" "5.27.0" + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.30.7" + "@typescript-eslint/types" "5.30.7" + "@typescript-eslint/typescript-estree" "5.30.7" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + +"@typescript-eslint/visitor-keys@5.29.0": + version "5.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz#7a4749fa7ef5160c44a451bf060ac1dc6dfb77ee" + integrity sha512-Hpb/mCWsjILvikMQoZIE3voc9wtQcS0A9FUw3h8bhr9UxBdtI/tw1ZDZUOXHXLOVMedKCH5NxyzATwnU78bWCQ== + dependencies: + "@typescript-eslint/types" "5.29.0" + eslint-visitor-keys "^3.3.0" + +"@typescript-eslint/visitor-keys@5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz#c093abae75b4fd822bfbad9fc337f38a7a14909a" + integrity sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw== + dependencies: + "@typescript-eslint/types" "5.30.7" eslint-visitor-keys "^3.3.0" "@webassemblyjs/ast@1.11.1": @@ -4903,9 +5446,9 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: negotiator "0.6.3" ace-builds@^1.4.14: - version "1.5.3" - resolved "https://registry.yarnpkg.com/ace-builds/-/ace-builds-1.5.3.tgz#05f81d3464a9ea19696e5e6fd0f924d37dab442f" - integrity sha512-WN5BKR2aTSuBmisO8jo3Fytk6sOmJGki82v/Boeic81IgYN8pFHNkXq2anDF0XkmfDWMqLbRoW9sjc/GtKzQbQ== + version "1.6.0" + resolved "https://registry.yarnpkg.com/ace-builds/-/ace-builds-1.6.0.tgz#4e1652a0e33c4ae262dc841b1254dd2ad0beb5da" + integrity sha512-qdkx965G/TA12IK7Zk+iCVDtA9wvhxIGivGc2rsID4UYbY2Bpatwep3ZrBZwj1IB2miU6FodDMqM9Kc1lqDlLg== acorn-globals@^6.0.0: version "6.0.0" @@ -5054,10 +5597,10 @@ ajv@^8.0.0, ajv@^8.6.0, ajv@^8.8.0: require-from-string "^2.0.2" uri-js "^4.2.2" -algoliasearch-helper@^3.8.2: - version "3.8.2" - resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.8.2.tgz#35726dc6d211f49dbab0bf6d37b4658165539523" - integrity sha512-AXxiF0zT9oYwl8ZBgU/eRXvfYhz7cBA5YrLPlw9inZHdaYF0QEya/f1Zp1mPYMXc1v6VkHwBq4pk6/vayBLICg== +algoliasearch-helper@^3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/algoliasearch-helper/-/algoliasearch-helper-3.10.0.tgz#59a0f645dd3c7e55cf01faa568d1af50c49d36f6" + integrity sha512-4E4od8qWWDMVvQ3jaRX6Oks/k35ywD011wAA4LbYMMjOtaZV6VWaTjRr4iN2bdaXP2o1BP7SLFMBf3wvnHmd8Q== dependencies: "@algolia/events" "^4.0.1" @@ -5212,10 +5755,10 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -arg@^5.0.0, arg@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.1.tgz#eb0c9a8f77786cad2af8ff2b862899842d7b6adb" - integrity sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA== +arg@^5.0.0, arg@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" + integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg== argparse@^1.0.7: version "1.0.10" @@ -5234,6 +5777,13 @@ argv@0.0.2: resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab" integrity sha512-dEamhpPEwRUBpLNHeuCm/v+g0anFByHahxodVO/BbAarHVBBg2MccCwf9K+o1Pof+2btdnkJelYVUWjW/VrATw== +aria-hidden@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.1.3.tgz#bb48de18dc84787a3c6eee113709c473c64ec254" + integrity sha512-RhVWFtKH5BiGMycI72q2RAFMLQi8JP9bLuQXgR5a8Znp7P5KOIADSJeyfI8PCVxLEp067B2HbP5JIiI/PXIZeA== + dependencies: + tslib "^1.0.0" + aria-query@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b" @@ -5305,11 +5855,6 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array-union@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-3.0.1.tgz#da52630d327f8b88cfbfb57728e2af5cd9b6b975" - integrity sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw== - array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" @@ -5413,9 +5958,9 @@ async-each@^1.0.1: integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== async@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.3.tgz#ac53dafd3f4720ee9e8a160628f18ea91df196c9" - integrity sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g== + version "3.2.4" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" + integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== asynckit@^0.4.0: version "0.4.0" @@ -5474,6 +6019,16 @@ axobject-query@^2.2.0: resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" integrity sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA== +azure-devops-node-api@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/azure-devops-node-api/-/azure-devops-node-api-7.2.0.tgz#131d4e01cf12ebc6e45569b5e0c5c249e4114d6d" + integrity sha512-pMfGJ6gAQ7LRKTHgiRF+8iaUUeGAI0c8puLaqHLc7B8AR7W6GJLozK9RFeUHFjEGybC9/EB3r67WPd7e46zQ8w== + dependencies: + os "0.1.1" + tunnel "0.0.4" + typed-rest-client "1.2.0" + underscore "1.8.3" + babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" @@ -5581,7 +6136,7 @@ babel-plugin-named-exports-order@^0.0.2: resolved "https://registry.yarnpkg.com/babel-plugin-named-exports-order/-/babel-plugin-named-exports-order-0.0.2.tgz#ae14909521cf9606094a2048239d69847540cb09" integrity sha512-OgOYHOLoRK+/mvXU9imKHlG6GkPLYrUCvFXG/CM93R/aNNO8pOOF4aS+S8CCHMDQoNSeiOYEZb/G6RwL95Jktw== -babel-plugin-polyfill-corejs2@^0.3.0: +babel-plugin-polyfill-corejs2@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz#440f1b70ccfaabc6b676d196239b138f8a2cfba5" integrity sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w== @@ -5598,7 +6153,7 @@ babel-plugin-polyfill-corejs3@^0.1.0: "@babel/helper-define-polyfill-provider" "^0.1.5" core-js-compat "^3.8.1" -babel-plugin-polyfill-corejs3@^0.5.0: +babel-plugin-polyfill-corejs3@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz#aabe4b2fa04a6e038b688c5e55d44e78cd3a5f72" integrity sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ== @@ -5606,7 +6161,7 @@ babel-plugin-polyfill-corejs3@^0.5.0: "@babel/helper-define-polyfill-provider" "^0.3.1" core-js-compat "^3.21.0" -babel-plugin-polyfill-regenerator@^0.3.0: +babel-plugin-polyfill-regenerator@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz#2c0678ea47c75c8cc2fbb1852278d8fb68233990" integrity sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A== @@ -5757,7 +6312,7 @@ base16@^1.0.0: resolved "https://registry.yarnpkg.com/base16/-/base16-1.0.0.tgz#e297f60d7ec1014a7a971a39ebc8a98c0b681e70" integrity sha512-pNdYkNPiJUnEhnfXV56+sQy8+AaPcG3POZAUnwr4EeqCUZFz4u2PePbo3e5Gj4ziYPCWGUZT9RHisvJKnwFuBQ== -base64-js@^1.0.2: +base64-js@^1.0.2, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -5829,7 +6384,7 @@ bisect_ppx@^2.7.1: resolved "https://registry.yarnpkg.com/bisect_ppx/-/bisect_ppx-2.7.1.tgz#8fde3e6f767a1a4ca190a266d0bd38800b088f66" integrity sha512-e8gRgfhmCptiyGGov+54Acah+rc+svm0yc/26mn+M6CCNDADufVLMgRaG1uw3LAHm/PFPy+zGFAKMwd6lD2O2g== -bluebird@^3.5.5, bluebird@^3.7.1: +bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== @@ -5863,14 +6418,14 @@ body-parser@1.20.0: unpipe "1.0.0" bonjour-service@^1.0.11: - version "1.0.12" - resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.0.12.tgz#28fbd4683f5f2e36feedb833e24ba661cac960c3" - integrity sha512-pMmguXYCu63Ug37DluMKEHdxc+aaIf/ay4YbF8Gxtba+9d3u+rmEWy61VK3Z3hp8Rskok3BunHYnG0dUHAsblw== + version "1.0.13" + resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.0.13.tgz#4ac003dc1626023252d58adf2946f57e5da450c1" + integrity sha512-LWKRU/7EqDUC9CTAQtuZl5HzBALoCYwtLhffW3et7vZMwv3bWLpJf8bRYlMD5OCcDpTfnPgNCV4yo9ZIaJGMiA== dependencies: array-flatten "^2.1.2" dns-equal "^1.0.0" fast-deep-equal "^3.1.3" - multicast-dns "^7.2.4" + multicast-dns "^7.2.5" boolbase@^1.0.0, boolbase@~1.0.0: version "1.0.0" @@ -6026,16 +6581,15 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.18.1, browserslist@^4.20.2, browserslist@^4.20.3: - version "4.20.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.3.tgz#eb7572f49ec430e054f56d52ff0ebe9be915f8bf" - integrity sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg== +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.18.1, browserslist@^4.20.2, browserslist@^4.20.3, browserslist@^4.20.4: + version "4.21.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.0.tgz#7ab19572361a140ecd1e023e2c1ed95edda0cefe" + integrity sha512-UQxE0DIhRB5z/zDz9iA03BOfxaN2+GQdBYH/2WrSIWEUrnpzTPJbhqt+umq6r3acaPRTW1FNTkrcp0PXgtFkvA== dependencies: - caniuse-lite "^1.0.30001332" - electron-to-chromium "^1.4.118" - escalade "^3.1.1" - node-releases "^2.0.3" - picocolors "^1.0.0" + caniuse-lite "^1.0.30001358" + electron-to-chromium "^1.4.164" + node-releases "^2.0.5" + update-browserslist-db "^1.0.0" bs-logger@0.x: version "0.2.6" @@ -6051,6 +6605,11 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" @@ -6255,10 +6814,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001332, caniuse-lite@^1.0.30001335: - version "1.0.30001344" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001344.tgz#8a1e7fdc4db9c2ec79a05e9fd68eb93a761888bb" - integrity sha512-0ZFjnlCaXNOAYcV7i+TtdKBp0L/3XEU2MF/x6Du1lrh+SRX4IfzIVL4HNJg5pB2PmFb8rszIGyOvsZnqqRoc2g== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001358: + version "1.0.30001358" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001358.tgz#473d35dabf5e448b463095cab7924e96ccfb8c00" + integrity sha512-hvp8PSRymk85R20bsDra7ZTCpSVGN/PAz9pSAjPSjKC+rNmnUk5vCRgJwiTT/O4feQ/yu/drvZYpKxxhbFuChw== capture-exit@^2.0.0: version "2.0.0" @@ -6272,7 +6831,7 @@ case-sensitive-paths-webpack-plugin@^2.3.0, case-sensitive-paths-webpack-plugin@ resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz#db64066c6422eed2e08cc14b986ca43796dbc6d4" integrity sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw== -ccount@^1.0.0, ccount@^1.0.3: +ccount@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.1.0.tgz#246687debb6014735131be8abab2d93898f8d043" integrity sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg== @@ -6288,7 +6847,7 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.4.1: +chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -6365,29 +6924,7 @@ cheerio-select@^2.1.0: domhandler "^5.0.3" domutils "^3.0.1" -cheerio@^0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" - integrity sha512-8/MzidM6G/TgRelkzDG13y3Y9LxBjCb+8yOEZ9+wwq5gVF2w2pV0wmHvjfT0RvuxGyR7UEuK36r+yYMbT4uKgA== - dependencies: - css-select "~1.2.0" - dom-serializer "~0.1.0" - entities "~1.1.1" - htmlparser2 "^3.9.1" - lodash.assignin "^4.0.9" - lodash.bind "^4.1.4" - lodash.defaults "^4.0.1" - lodash.filter "^4.4.0" - lodash.flatten "^4.2.0" - lodash.foreach "^4.3.0" - lodash.map "^4.4.0" - lodash.merge "^4.4.0" - lodash.pick "^4.2.1" - lodash.reduce "^4.4.0" - lodash.reject "^4.4.0" - lodash.some "^4.4.0" - -cheerio@^1.0.0-rc.11: +cheerio@^1.0.0-rc.1: version "1.0.0-rc.11" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.11.tgz#1be84be1a126958366bcc57a11648cd9b30a60c2" integrity sha512-bQwNaDIBKID5ts/DsdhxrjqFXYfLw4ste+wMKqWA8DyKcS4qwsPP4Bk8ZNaTJjvpiX/qW3BT4sU7d6Bh5i+dag== @@ -6401,6 +6938,19 @@ cheerio@^1.0.0-rc.11: parse5-htmlparser2-tree-adapter "^7.0.0" tslib "^2.4.0" +cheerio@^1.0.0-rc.12: + version "1.0.0-rc.12" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" + integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== + dependencies: + cheerio-select "^2.1.0" + dom-serializer "^2.0.0" + domhandler "^5.0.3" + domutils "^3.0.1" + htmlparser2 "^8.0.1" + parse5 "^7.0.0" + parse5-htmlparser2-tree-adapter "^7.0.0" + chokidar@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" @@ -6456,9 +7006,9 @@ ci-info@^2.0.0: integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== ci-info@^3.2.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.1.tgz#58331f6f472a25fe3a50a351ae3052936c2c7f32" - integrity sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg== + version "3.3.2" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.2.tgz#6d2967ffa407466481c6c90b6e16b3098f080128" + integrity sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg== cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" @@ -6560,10 +7110,10 @@ clone@~2.1.2: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== -clsx@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188" - integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA== +clsx@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" + integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== co@^4.6.0: version "4.6.0" @@ -6648,9 +7198,9 @@ colorette@^1.2.2: integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== colorette@^2.0.10, colorette@^2.0.14: - version "2.0.16" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" - integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== + version "2.0.19" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" + integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== combine-promises@^1.1.0: version "1.1.0" @@ -6669,7 +7219,7 @@ comma-separated-tokens@^1.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== -commander@2, commander@^2.19.0, commander@^2.20.0: +commander@2, commander@^2.19.0, commander@^2.20.0, commander@^2.8.1: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -6699,10 +7249,10 @@ commander@^8.0.0, commander@^8.3.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== -commander@^9.3.0: - version "9.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.3.0.tgz#f619114a5a2d2054e0d9ff1b31d5ccf89255e26b" - integrity sha512-hv95iU5uXPbK83mjrJKuZyFM/LBAoCV/XhVGkS5Je6tl7sxr6A0ITMw5WoRV46/UaJ46Nllm3Xt7IaJhXTIkzw== +commander@^9.3.0, commander@^9.4.0: + version "9.4.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.0.tgz#bc4a40918fefe52e22450c111ecd6b7acce6f11c" + integrity sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw== common-path-prefix@^3.0.0: version "3.0.0" @@ -6781,10 +7331,10 @@ confusing-browser-globals@^1.0.11: resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== -connect-history-api-fallback@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" - integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== +connect-history-api-fallback@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" + integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== consola@^2.15.3: version "2.15.3" @@ -6882,27 +7432,27 @@ copy-webpack-plugin@^11.0.0: serialize-javascript "^6.0.0" core-js-compat@^3.21.0, core-js-compat@^3.22.1, core-js-compat@^3.8.1: - version "3.22.7" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.22.7.tgz#8359eb66ecbf726dd0cfced8e48d5e73f3224239" - integrity sha512-uI9DAQKKiiE/mclIC5g4AjRpio27g+VMRhe6rQoz+q4Wm4L6A/fJhiLtBw+sfOpDG9wZ3O0pxIw7GbfOlBgjOA== + version "3.23.2" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.23.2.tgz#5cbf8a9c8812d665392845b85ae91b5bcc7b615c" + integrity sha512-lrgZvxFwbQp9v7E8mX0rJ+JX7Bvh4eGULZXA1IAyjlsnWvCdw6TF8Tg6xtaSUSJMrSrMaLdpmk+V54LM1dvfOA== dependencies: - browserslist "^4.20.3" + browserslist "^4.20.4" semver "7.0.0" core-js-pure@^3.20.2, core-js-pure@^3.8.1: - version "3.22.7" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.22.7.tgz#f58489d9b309fa7b26486a0f70d4ec19a418084e" - integrity sha512-wTriFxiZI+C8msGeh7fJcbC/a0V8fdInN1oS2eK79DMBGs8iIJiXhtFJCiT3rBa8w6zroHWW3p8ArlujZ/Mz+w== + version "3.23.2" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.23.2.tgz#efe5e486469c5ed2d088d76e973eb12e74a930e7" + integrity sha512-t6u7H4Ff/yZNk+zqTr74UjCcZ3k8ApBryeLLV4rYQd9aF3gqmjjGjjR44ENfeBMH8VVvSynIjAJ0mUuFhzQtrA== core-js@^2.4.0: version "2.6.12" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== -core-js@^3.0.4, core-js@^3.19.2, core-js@^3.22.7, core-js@^3.6.5, core-js@^3.8.2: - version "3.22.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.22.7.tgz#8d6c37f630f6139b8732d10f2c114c3f1d00024f" - integrity sha512-Jt8SReuDKVNZnZEzyEQT5eK6T2RRCXkfTq7Lo09kpm+fHjgGewSbNjV+Wt4yZMhPDdzz2x1ulI5z/w4nxpBseg== +core-js@^3.0.4, core-js@^3.19.2, core-js@^3.23.3, core-js@^3.6.5, core-js@^3.8.2: + version "3.23.4" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.23.4.tgz#92d640faa7f48b90bbd5da239986602cfc402aa6" + integrity sha512-vjsKqRc1RyAJC3Ye2kYqgfdThb3zYnx9CrqoCcjMOENMtQPC7ZViBvlDxwYU/2z2NI/IPuiXw5mT4hWhddqjzQ== core-util-is@~1.0.0: version "1.0.3" @@ -7055,10 +7605,10 @@ css-blank-pseudo@^3.0.3: dependencies: postcss-selector-parser "^6.0.9" -css-declaration-sorter@^6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.2.2.tgz#bfd2f6f50002d6a3ae779a87d3a0c5d5b10e0f02" - integrity sha512-Ufadglr88ZLsrvS11gjeu/40Lw74D9Am/Jpr3LlYm5Q4ZP5KdlUhG+6u2EjyXeZcxmZ2h1ebCKngDjolpeLHpg== +css-declaration-sorter@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.3.0.tgz#72ebd995c8f4532ff0036631f7365cce9759df14" + integrity sha512-OGT677UGHJTAVMRhPO+HJ4oKln3wkBTwtDFH0ojbqm+MJm6xuDMHp2nkhh/ThaBqq20IbraBQSWKfSLNHQO9Og== css-has-pseudo@^3.0.4: version "3.0.4" @@ -7190,16 +7740,6 @@ css-select@^5.1.0: domutils "^3.0.1" nth-check "^2.0.1" -css-select@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" - integrity sha512-dUQOBoqdR7QwV90WysXPLXG5LO7nhYBgiWVfxF80DKPF8zx1t/pUd2FYy73emg3zrjtM6dzmYgbHKfV2rxiHQA== - dependencies: - boolbase "~1.0.0" - css-what "2.1" - domutils "1.5.1" - nth-check "~1.0.1" - css-tree@1.0.0-alpha.37: version "1.0.0-alpha.37" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" @@ -7216,11 +7756,6 @@ css-tree@^1.1.2, css-tree@^1.1.3: mdn-data "2.0.14" source-map "^0.6.1" -css-what@2.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" - integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== - css-what@^3.2.1: version "3.4.2" resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" @@ -7245,34 +7780,34 @@ css@^3.0.0: source-map "^0.6.1" source-map-resolve "^0.6.0" -cssdb@^6.6.2: - version "6.6.2" - resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-6.6.2.tgz#6c1c1777483c909a8fc64f296a51546136b35f45" - integrity sha512-w08LaP+DRoPlw4g4LSUp+EWRrWTPlrzWREcU7/6IeMfL7tPR2P9oeQ1G+pxyfMmLWBNDwqHWa6kxiuGMLb71EA== +cssdb@^6.6.3: + version "6.6.3" + resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-6.6.3.tgz#1f331a2fab30c18d9f087301e6122a878bb1e505" + integrity sha512-7GDvDSmE+20+WcSMhP17Q1EVWUrLlbxxpMDqG731n8P99JhnQZHR9YvtjPvEHfjFUjvQJvdpKCjlKOX+xe4UVA== cssesc@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssnano-preset-advanced@^5.3.5: - version "5.3.6" - resolved "https://registry.yarnpkg.com/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.6.tgz#6c995a86cecc9e6472bf6d120e5517231ed527dc" - integrity sha512-OZHsytu16eStRVrIY3wmPQqhJMaI0+O3raU4JHoKV3uuQYEeQek/FJVUIvYXD55hWR6OjCMyKYNRDw+k3/xgUw== +cssnano-preset-advanced@^5.3.8: + version "5.3.8" + resolved "https://registry.yarnpkg.com/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.8.tgz#027b1d05ef896d908178c483f0ec4190cb50ef9a" + integrity sha512-xUlLLnEB1LjpEik+zgRNlk8Y/koBPPtONZjp7JKbXigeAmCrFvq9H0pXW5jJV45bQWAlmJ0sKy+IMr0XxLYQZg== dependencies: autoprefixer "^10.3.7" - cssnano-preset-default "^5.2.10" + cssnano-preset-default "^5.2.12" postcss-discard-unused "^5.1.0" postcss-merge-idents "^5.1.1" postcss-reduce-idents "^5.2.0" postcss-zindex "^5.1.0" -cssnano-preset-default@^5.2.10: - version "5.2.10" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.2.10.tgz#6dfffe6cc3b13f3bb356a42c49a334a98700ef45" - integrity sha512-H8TJRhTjBKVOPltp9vr9El9I+IfYsOMhmXdK0LwdvwJcxYX9oWkY7ctacWusgPWAgQq1vt/WO8v+uqpfLnM7QA== +cssnano-preset-default@^5.2.12: + version "5.2.12" + resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.2.12.tgz#ebe6596ec7030e62c3eb2b3c09f533c0644a9a97" + integrity sha512-OyCBTZi+PXgylz9HAA5kHyoYhfGcYdwFmyaJzWnzxuGRtnMw/kR6ilW9XzlzlRAtB6PLT/r+prYgkef7hngFew== dependencies: - css-declaration-sorter "^6.2.2" + css-declaration-sorter "^6.3.0" cssnano-utils "^3.1.0" postcss-calc "^8.2.3" postcss-colormin "^5.3.0" @@ -7281,7 +7816,7 @@ cssnano-preset-default@^5.2.10: postcss-discard-duplicates "^5.1.0" postcss-discard-empty "^5.1.1" postcss-discard-overridden "^5.1.0" - postcss-merge-longhand "^5.1.5" + postcss-merge-longhand "^5.1.6" postcss-merge-rules "^5.1.2" postcss-minify-font-values "^5.1.0" postcss-minify-gradients "^5.1.1" @@ -7289,14 +7824,14 @@ cssnano-preset-default@^5.2.10: postcss-minify-selectors "^5.2.1" postcss-normalize-charset "^5.1.0" postcss-normalize-display-values "^5.1.0" - postcss-normalize-positions "^5.1.0" - postcss-normalize-repeat-style "^5.1.0" + postcss-normalize-positions "^5.1.1" + postcss-normalize-repeat-style "^5.1.1" postcss-normalize-string "^5.1.0" postcss-normalize-timing-functions "^5.1.0" postcss-normalize-unicode "^5.1.0" postcss-normalize-url "^5.1.0" postcss-normalize-whitespace "^5.1.1" - postcss-ordered-values "^5.1.1" + postcss-ordered-values "^5.1.3" postcss-reduce-initial "^5.1.0" postcss-reduce-transforms "^5.1.0" postcss-svgo "^5.1.0" @@ -7307,12 +7842,12 @@ cssnano-utils@^3.1.0: resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-3.1.0.tgz#95684d08c91511edfc70d2636338ca37ef3a6861" integrity sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA== -cssnano@^5.0.6, cssnano@^5.1.8, cssnano@^5.1.9: - version "5.1.10" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.1.10.tgz#fc6ddd9a4d7d238f320634326ed814cf0abf6e1c" - integrity sha512-ACpnRgDg4m6CZD/+8SgnLcGCgy6DDGdkMbOawwdvVxNietTNLe/MtWcenp6qT0PRt5wzhGl6/cjMWCdhKXC9QA== +cssnano@^5.0.6, cssnano@^5.1.12, cssnano@^5.1.8: + version "5.1.12" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.1.12.tgz#bcd0b64d6be8692de79332c501daa7ece969816c" + integrity sha512-TgvArbEZu0lk/dvg2ja+B7kYoD7BBCmn3+k58xD0qjrGHsFzXY/wKTo9M5egcUCabPol05e/PVoIu79s2JN4WQ== dependencies: - cssnano-preset-default "^5.2.10" + cssnano-preset-default "^5.2.12" lilconfig "^2.0.3" yaml "^1.10.2" @@ -7662,6 +8197,11 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== +denodeify@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" + integrity sha512-KNTihKNmQENUZeKu5fzfpzRqR5S2VMp4gl9RFHiWzj9DfvYQPMJ6XHKNaQxaGCXwPk6y9yme3aUoaiAe+KX+vg== + depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" @@ -7744,7 +8284,7 @@ detective@^5.2.1: defined "^1.0.0" minimist "^1.2.6" -didyoumean@^1.2.2: +didyoumean@^1.2.1, didyoumean@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== @@ -7759,6 +8299,11 @@ diff-sequences@^27.5.1: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== +diff-sequences@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" + integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== + diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -7798,9 +8343,9 @@ dns-equal@^1.0.0: integrity sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg== dns-packet@^5.2.2: - version "5.3.1" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.3.1.tgz#eb94413789daec0f0ebe2fcc230bdc9d7c91b43d" - integrity sha512-spBwIj0TK0Ey3666GwIdWVfUpLyubpU53BTCu8iPn4r4oXd9O14Hjg3EHw3ts2oed77/SeckunUYCyRlSngqHw== + version "5.4.0" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.4.0.tgz#1f88477cf9f27e78a213fb6d118ae38e759a879b" + integrity sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g== dependencies: "@leichtgewicht/ip-codec" "^2.0.1" @@ -7856,14 +8401,6 @@ dom-serializer@^2.0.0: domhandler "^5.0.2" entities "^4.2.0" -dom-serializer@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" - integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== - dependencies: - domelementtype "^1.3.0" - entities "^1.1.1" - dom-walk@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" @@ -7874,7 +8411,7 @@ domain-browser@^1.1.1: resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== -domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: +domelementtype@1: version "1.3.1" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== @@ -7891,13 +8428,6 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" -domhandler@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" - integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - dependencies: - domelementtype "1" - domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" @@ -7912,15 +8442,7 @@ domhandler@^5.0.1, domhandler@^5.0.2, domhandler@^5.0.3: dependencies: domelementtype "^2.3.0" -domutils@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" - integrity sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw== - dependencies: - dom-serializer "0" - domelementtype "1" - -domutils@^1.5.1, domutils@^1.7.0: +domutils@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== @@ -8013,10 +8535,10 @@ ejs@^3.1.6: dependencies: jake "^10.8.5" -electron-to-chromium@^1.4.118: - version "1.4.142" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.142.tgz#70cc8871f7c0122b29256089989e67cee637b40d" - integrity sha512-ea8Q1YX0JRp4GylOmX4gFHIizi0j9GfRW4EkaHnkZp0agRCBB4ZGeCv17IEzIvBkiYVwfoKVhKZJbTfqCRdQdg== +electron-to-chromium@^1.4.164: + version "1.4.166" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.166.tgz#83cd596e59c1a192425b99e6ecc64d9ffff50aff" + integrity sha512-ZPLdq3kcATkD6dwne5M4SgJBHw21t90BqTGzf3AceJwj3cE/ICv6jyDwHYyJoF4JNuXM3pzRxlaRmpO7pdwmcg== elliptic@^6.5.3: version "6.5.4" @@ -8091,19 +8613,14 @@ enhanced-resolve@^4.5.0: memory-fs "^0.5.0" tapable "^1.0.0" -enhanced-resolve@^5.0.0, enhanced-resolve@^5.7.0, enhanced-resolve@^5.9.3: - version "5.9.3" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz#44a342c012cbc473254af5cc6ae20ebd0aae5d88" - integrity sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow== +enhanced-resolve@^5.0.0, enhanced-resolve@^5.10.0, enhanced-resolve@^5.7.0: + version "5.10.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz#0dc579c3bb2a1032e357ac45b8f3a6f3ad4fb1e6" + integrity sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" -entities@^1.1.1, entities@~1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" - integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -8119,6 +8636,11 @@ entities@^4.2.0, entities@^4.3.0: resolved "https://registry.yarnpkg.com/entities/-/entities-4.3.0.tgz#62915f08d67353bb4eb67e3d62641a4059aec656" integrity sha512-/iP1rZrSEJ0DTlPiX+jbzlA3eVkY/e8L8SozroF395fIqE3TYF/Nz7YOMAawta+vLmyJ/hkGNNPcSbMADCCXbg== +entities@~1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + envinfo@^7.7.3: version "7.8.1" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" @@ -8139,11 +8661,11 @@ error-ex@^1.2.0, error-ex@^1.3.1: is-arrayish "^0.2.1" error-stack-parser@^2.0.6: - version "2.0.7" - resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.0.7.tgz#b0c6e2ce27d0495cf78ad98715e0cad1219abb57" - integrity sha512-chLOW0ZGRf4s8raLrDxa5sdkvPec5YdvwbFnqJme4rk0rFajP8mPtrDL1+I+CwrQDCjswDA5sREX7jYQDQs9vA== + version "2.1.4" + resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.1.4.tgz#229cb01cdbfa84440bfa91876285b94680188286" + integrity sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ== dependencies: - stackframe "^1.1.1" + stackframe "^1.3.4" es-abstract@^1.17.2, es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5, es-abstract@^1.20.1: version "1.20.1" @@ -8365,9 +8887,9 @@ eslint-plugin-jsx-a11y@^6.5.1: minimatch "^3.0.4" eslint-plugin-react-hooks@^4.3.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.5.0.tgz#5f762dfedf8b2cf431c689f533c9d3fa5dcf25ad" - integrity sha512-8k1gRt7D7h03kd+SAAlzXkQwWK22BnK6GKZG+FJA6BAGy22CFvl8kCIXKpVux0cCxMWDQUPqSok0LKaZ0aOcCw== + version "4.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" + integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== eslint-plugin-react@^7.27.1: version "7.30.0" @@ -8448,10 +8970,10 @@ eslint-webpack-plugin@^3.1.1: normalize-path "^3.0.0" schema-utils "^3.1.1" -eslint@^8.3.0: - version "8.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.16.0.tgz#6d936e2d524599f2a86c708483b4c372c5d3bbae" - integrity sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA== +eslint@^8.20.0, eslint@^8.3.0: + version "8.20.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.20.0.tgz#048ac56aa18529967da8354a478be4ec0a2bc81b" + integrity sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA== dependencies: "@eslint/eslintrc" "^1.3.0" "@humanwhocodes/config-array" "^0.9.2" @@ -8714,13 +9236,20 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -fast-check@^2.17.0, fast-check@^2.25.0: +fast-check@^2.17.0: version "2.25.0" resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-2.25.0.tgz#5146601851bf3be0953bd17eb2b7d547936c6561" integrity sha512-wRUT2KD2lAmT75WNIJIHECawoUUMHM0I5jrlLXGtGeqmPL8jl/EldUDjY1VCp6fDY8yflyfUeIOsOBrIbIiArg== dependencies: pure-rand "^5.0.1" +fast-check@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.1.0.tgz#0c958b6592f45fb66ea291a0bd1be2e7045f7e57" + integrity sha512-LHM6ZiznfQ5ZxReDUZnlKzSI/nlwCdfwaQ6qrCYBIkuWT6PfI3GOK/O2Xj50DF9oC0HIP22vbbHA8v4itAiyGA== + dependencies: + pure-rand "^5.0.1" + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3, fast-deep-equal@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -8738,7 +9267,7 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.2.11, fast-glob@^3.2.7, fast-glob@^3.2.9: +fast-glob@^3.2.11, fast-glob@^3.2.9: version "3.2.11" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== @@ -8754,7 +9283,7 @@ fast-json-parse@^1.0.3: resolved "https://registry.yarnpkg.com/fast-json-parse/-/fast-json-parse-1.0.3.tgz#43e5c61ee4efa9265633046b770fb682a7577c4d" integrity sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw== -fast-json-patch@^3.1.0: +fast-json-patch@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947" integrity sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ== @@ -8844,6 +9373,13 @@ fbjs@^3.0.0, fbjs@^3.0.1: setimmediate "^1.0.5" ua-parser-js "^0.7.30" +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== + dependencies: + pend "~1.2.0" + feed@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/feed/-/feed-4.2.2.tgz#865783ef6ed12579e2c44bbef3c9113bc4956a7e" @@ -9097,6 +9633,27 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" +framer-motion@^6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-6.5.1.tgz#802448a16a6eb764124bf36d8cbdfa6dd6b931a7" + integrity sha512-o1BGqqposwi7cgDrtg0dNONhkmPsUFDaLcKXigzuTFC5x58mE8iyTazxSudFzmT6MEyJKfjjU8ItoMe3W+3fiw== + dependencies: + "@motionone/dom" "10.12.0" + framesync "6.0.1" + hey-listen "^1.0.8" + popmotion "11.0.3" + style-value-types "5.0.0" + tslib "^2.1.0" + optionalDependencies: + "@emotion/is-prop-valid" "^0.8.2" + +framesync@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/framesync/-/framesync-6.0.1.tgz#5e32fc01f1c42b39c654c35b16440e07a25d6f20" + integrity sha512-fUY88kXvGiIItgNC7wcTOl0SNRCVXMKSWW2Yzfmn7EKNc+MpCzcz9DhdHcdjbrtN3c6R4H5dTY2jiCpPdysEjA== + dependencies: + tslib "^2.1.0" + fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" @@ -9141,7 +9698,7 @@ fs-minipass@^2.0.0: dependencies: minipass "^3.0.0" -fs-monkey@1.0.3: +fs-monkey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.3.tgz#ae3ac92d53bb328efe0e9a1d9541f6ad8d48e2d3" integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== @@ -9161,6 +9718,11 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fs@^0.0.1-security: + version "0.0.1-security" + resolved "https://registry.yarnpkg.com/fs/-/fs-0.0.1-security.tgz#8a7bd37186b6dddf3813f23858b57ecaaf5e41d4" + integrity sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w== + fsevents@^1.2.7: version "1.2.13" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" @@ -9219,10 +9781,10 @@ gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -gentype@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/gentype/-/gentype-4.4.0.tgz#20a61776703ce79c638c4db34b8808e1896d3267" - integrity sha512-hLcKmMhD3DJzHffDqwYUkEZfdGSWJk6ehYmdzGHBs35mTJa2dhiAp31WqmhjkZIqKvD+A+gFEE+//QHG5dZfwg== +gentype@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/gentype/-/gentype-4.5.0.tgz#460152da93db783626fd25bbd38fb574d886f5f3" + integrity sha512-XqHBQPS6Qb2HSgNJAwYRXbQJ4LSvz+MgNvuWnj8bz0teSorsy2kDxA6F1eZx5ft8cnfKAls4uNEgd5uNcPbQDg== get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" @@ -9230,13 +9792,13 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" - integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + version "1.1.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" + integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== dependencies: function-bind "^1.1.1" has "^1.0.3" - has-symbols "^1.0.1" + has-symbols "^1.0.3" get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" @@ -9334,7 +9896,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@^7.0.0, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -9346,6 +9908,17 @@ glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" + integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + global-dirs@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.0.tgz#70a76fe84ea315ab37b1f5576cbde7d48ef72686" @@ -9413,22 +9986,10 @@ globby@^11.0.1, globby@^11.0.2, globby@^11.0.4, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -globby@^12.0.0: - version "12.2.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-12.2.0.tgz#2ab8046b4fba4ff6eede835b29f678f90e3d3c22" - integrity sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA== - dependencies: - array-union "^3.0.1" - dir-glob "^3.0.1" - fast-glob "^3.2.7" - ignore "^5.1.9" - merge2 "^1.4.1" - slash "^4.0.0" - -globby@^13.1.1: - version "13.1.1" - resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.1.tgz#7c44a93869b0b7612e38f22ed532bfe37b25ea6f" - integrity sha512-XMzoDZbGZ37tufiv7g0N4F/zp3zkwdFtVbV3EHsVl1KQr4RPLfNoT068/97RPshz2J5xYNEjLKKBKaGHifBd3Q== +globby@^13.0.0, globby@^13.1.1: + version "13.1.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.2.tgz#29047105582427ab6eca4f905200667b056da515" + integrity sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ== dependencies: dir-glob "^3.0.1" fast-glob "^3.2.11" @@ -9645,17 +10206,6 @@ hast-to-hyperscript@^9.0.0: unist-util-is "^4.0.0" web-namespaces "^1.0.0" -hast-util-from-parse5@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/hast-util-from-parse5/-/hast-util-from-parse5-5.0.3.tgz#3089dc0ee2ccf6ec8bc416919b51a54a589e097c" - integrity sha512-gOc8UB99F6eWVWFtM9jUikjN7QkWxB3nY0df5Z0Zq1/Nkwl5V4hAAsl0tmwlgWl/1shlTF8DnNYLO8X6wRV9pA== - dependencies: - ccount "^1.0.3" - hastscript "^5.0.0" - property-information "^5.0.0" - web-namespaces "^1.1.2" - xtend "^4.0.1" - hast-util-from-parse5@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz#554e34abdeea25ac76f5bd950a1f0180e0b3bc2a" @@ -9722,16 +10272,6 @@ hast-util-to-text@^2.0.0: repeat-string "^1.0.0" unist-util-find-after "^3.0.0" -hastscript@^5.0.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-5.1.2.tgz#bde2c2e56d04c62dd24e8c5df288d050a355fb8a" - integrity sha512-WlztFuK+Lrvi3EggsqOkQ52rKbxkXL3RwB6t5lwoa8QLMemoWfBuL43eDrwOamJyR7uKQKdmKYaBH1NZBiIRrQ== - dependencies: - comma-separated-tokens "^1.0.0" - hast-util-parse-selector "^2.0.0" - property-information "^5.0.0" - space-separated-tokens "^1.0.0" - hastscript@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-6.0.0.tgz#e8768d7eac56c3fdeac8a92830d58e811e5bf640" @@ -9748,6 +10288,11 @@ he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +hey-listen@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/hey-listen/-/hey-listen-1.0.8.tgz#8e59561ff724908de1aa924ed6ecc84a56a9aa68" + integrity sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q== + highlight.js@^10.4.1, highlight.js@~10.7.0: version "10.7.3" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" @@ -9880,18 +10425,6 @@ html-webpack-plugin@^5.0.0, html-webpack-plugin@^5.5.0: pretty-error "^4.0.0" tapable "^2.0.0" -htmlparser2@^3.9.1: - version "3.10.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" - integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== - dependencies: - domelementtype "^1.3.1" - domhandler "^2.3.0" - domutils "^1.5.1" - entities "^1.1.1" - inherits "^2.0.1" - readable-stream "^3.1.1" - htmlparser2@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" @@ -10071,7 +10604,7 @@ ignore@^4.0.3: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.1.9, ignore@^5.2.0: +ignore@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== @@ -10084,9 +10617,9 @@ image-size@^1.0.1: queue "6.0.2" immer@^9.0.7: - version "9.0.14" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.14.tgz#e05b83b63999d26382bb71676c9d827831248a48" - integrity sha512-ubBeqQutOSLIFCUBN03jGeOS6a3DoYlSYwYJTa+gSKEZKU5redJIqkIdZ3JVv/4RZpfcXdAWH5zCNLWPRv2WDw== + version "9.0.15" + resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.15.tgz#0b9169e5b1d22137aba7d43f8a81a495dd1b62dc" + integrity sha512-2eB/sswms9AEUSkOm4SbV5Y7Vmt/bKRwByd52jfLkW4OLYeaTP3EEiJ9agqU0O/tq6Dk62Zfj+TJSqfm1rLVGQ== import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" @@ -10126,15 +10659,20 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== +indent-string@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-5.0.0.tgz#4fd2980fccaf8622d14c64d694f4cf33c81951a5" + integrity sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg== + infer-owner@^1.0.3, infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== -infima@0.2.0-alpha.39: - version "0.2.0-alpha.39" - resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.39.tgz#054b13ac44f3e9a42bc083988f1a1586add2f59c" - integrity sha512-UyYiwD3nwHakGhuOUfpe3baJ8gkiPpRVx4a4sE/Ag+932+Y6swtLsdPoRR8ezhwqGnduzxmFkjumV9roz6QoLw== +infima@0.2.0-alpha.42: + version "0.2.0-alpha.42" + resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.42.tgz#f6e86a655ad40877c6b4d11b2ede681eb5470aa5" + integrity sha512-ift8OXNbQQwtbIt6z16KnSWP7uJ/SysSMFI4F87MNRTicypfl4Pv3E2OGVv6N3nSZFJvA8imYulCBS64iyHYww== inflight@^1.0.4: version "1.0.6" @@ -10323,7 +10861,7 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.2.0, is-core-module@^2.8.1: +is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== @@ -10695,7 +11233,7 @@ isomorphic-unfetch@^3.1.0: node-fetch "^2.6.1" unfetch "^4.2.0" -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.0.0-alpha.1, istanbul-lib-coverage@^3.2.0: +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== @@ -10729,17 +11267,16 @@ istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: semver "^6.3.0" istanbul-lib-processinfo@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz#e1426514662244b2f25df728e8fd1ba35fe53b9c" - integrity sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw== + version "2.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz#366d454cd0dcb7eb6e0e419378e60072c8626169" + integrity sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg== dependencies: archy "^1.0.0" - cross-spawn "^7.0.0" - istanbul-lib-coverage "^3.0.0-alpha.1" - make-dir "^3.0.0" + cross-spawn "^7.0.3" + istanbul-lib-coverage "^3.2.0" p-map "^3.0.0" rimraf "^3.0.0" - uuid "^3.3.3" + uuid "^8.3.2" istanbul-lib-report@^3.0.0: version "3.0.0" @@ -10887,6 +11424,16 @@ jest-diff@^27.5.1: jest-get-type "^27.5.1" pretty-format "^27.5.1" +jest-diff@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.1.tgz#1a3eedfd81ae79810931c63a1d0f201b9120106c" + integrity sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg== + dependencies: + chalk "^4.0.0" + diff-sequences "^28.1.1" + jest-get-type "^28.0.2" + pretty-format "^28.1.1" + jest-docblock@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.5.1.tgz#14092f364a42c6108d42c33c8cf30e058e25f6c0" @@ -10935,6 +11482,11 @@ jest-get-type@^27.5.1: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== +jest-get-type@^28.0.2: + version "28.0.2" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" + integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== + jest-haste-map@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" @@ -11017,6 +11569,16 @@ jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: jest-get-type "^27.5.1" pretty-format "^27.5.1" +jest-matcher-utils@^28.0.0: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz#a7c4653c2b782ec96796eb3088060720f1e29304" + integrity sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw== + dependencies: + chalk "^4.0.0" + jest-diff "^28.1.1" + jest-get-type "^28.0.2" + pretty-format "^28.1.1" + jest-message-util@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.5.1.tgz#bdda72806da10d9ed6425e12afff38cd1458b6cf" @@ -11032,18 +11594,18 @@ jest-message-util@^27.5.1: slash "^3.0.0" stack-utils "^2.0.3" -jest-message-util@^28.1.0: - version "28.1.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-28.1.0.tgz#7e8f0b9049e948e7b94c2a52731166774ba7d0af" - integrity sha512-RpA8mpaJ/B2HphDMiDlrAZdDytkmwFqgjDZovM21F35lHGeUeCvYmm6W+sbQ0ydaLpg5bFAUuWG1cjqOl8vqrw== +jest-message-util@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-28.1.1.tgz#60aa0b475cfc08c8a9363ed2fb9108514dd9ab89" + integrity sha512-xoDOOT66fLfmTRiqkoLIU7v42mal/SqwDKvfmfiWAdJMSJiU+ozgluO7KbvoAgiwIrrGZsV7viETjc8GNrA/IQ== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^28.1.0" + "@jest/types" "^28.1.1" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^28.1.0" + pretty-format "^28.1.1" slash "^3.0.0" stack-utils "^2.0.3" @@ -11223,12 +11785,12 @@ jest-util@^27.0.0, jest-util@^27.5.1: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-util@^28.1.0: - version "28.1.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.0.tgz#d54eb83ad77e1dd441408738c5a5043642823be5" - integrity sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA== +jest-util@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.1.tgz#ff39e436a1aca397c0ab998db5a51ae2b7080d05" + integrity sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw== dependencies: - "@jest/types" "^28.1.0" + "@jest/types" "^28.1.1" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" @@ -11274,17 +11836,17 @@ jest-watcher@^27.5.1: string-length "^4.0.1" jest-watcher@^28.0.0: - version "28.1.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-28.1.0.tgz#aaa7b4164a4e77eeb5f7d7b25ede5e7b4e9c9aaf" - integrity sha512-tNHMtfLE8Njcr2IRS+5rXYA4BhU90gAOwI9frTGOqd+jX0P/Au/JfRSNqsf5nUTcWdbVYuLxS1KjnzILSoR5hA== + version "28.1.1" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-28.1.1.tgz#533597fb3bfefd52b5cd115cd916cffd237fb60c" + integrity sha512-RQIpeZ8EIJMxbQrXpJQYIIlubBnB9imEHsxxE41f54ZwcqWLysL/A0ZcdMirf+XsMn3xfphVQVV4EW0/p7i7Ug== dependencies: - "@jest/test-result" "^28.1.0" - "@jest/types" "^28.1.0" + "@jest/test-result" "^28.1.1" + "@jest/types" "^28.1.1" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.10.2" - jest-util "^28.1.0" + jest-util "^28.1.1" string-length "^4.0.1" jest-worker@^26.2.1, jest-worker@^26.5.0, jest-worker@^26.6.2: @@ -11475,11 +12037,11 @@ jstat@^1.9.5: integrity sha512-cWnp4vObF5GmB2XsIEzxI/1ZTcYlcfNqxQ/9Fp5KFUa0Jf/4tO0ZkGVnqoEHDisJvYgvn5n3eWZbd2xTVJJPUQ== "jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.2.1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.0.tgz#e624f259143b9062c92b6413ff92a164c80d3ccb" - integrity sha512-XzO9luP6L0xkxwhIJMTJQpZo/eeN60K08jHdexfD569AGxeNug6UketeHXEhROoM8aR7EcUoOQmIhcJQjcuq8Q== + version "3.3.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.1.tgz#a3e0f1cb7e230954eab4dcbce9f6288a78f8ba44" + integrity sha512-pxrjmNpeRw5wwVeWyEAk7QJu2GnBO3uzPFmHCKJJFPKK2Cy0cWL23krGtLdnMmbIi6/FjlrQpPyfQI19ByPOhQ== dependencies: - array-includes "^3.1.4" + array-includes "^3.1.5" object.assign "^4.1.2" junk@^3.1.0: @@ -11596,6 +12158,13 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +linkify-it@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.2.0.tgz#e3b54697e78bf915c70a38acd78fd09e0058b1cf" + integrity sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw== + dependencies: + uc.micro "^1.0.1" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -11675,16 +12244,6 @@ lodash-es@^4.17.21: resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== -lodash.assignin@^4.0.9: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" - integrity sha512-yX/rx6d/UTVh7sSVWVSIMjfnz95evAgDFdb1ZozC35I9mSFCkmzptOzevxjgbQUsc78NR44LVHWjsoMQXy9FDg== - -lodash.bind@^4.1.4: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" - integrity sha512-lxdsn7xxlCymgLYo1gGvVrfHmkjDiyqVv62FAeF2i5ta72BipE1SLxw8hPEPLhD4/247Ijw07UQH7Hq/chT5LA== - lodash.curry@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.curry/-/lodash.curry-4.1.1.tgz#248e36072ede906501d75966200a86dab8b23170" @@ -11695,21 +12254,6 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== -lodash.defaults@^4.0.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" - integrity sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ== - -lodash.filter@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" - integrity sha512-pXYUy7PR8BCLwX5mgJ/aNtyOvuJTdZAo9EQFUvMIYugqmJxnrYaANvTbgndOzHSCSR0wnlBBfRXJL5SbWxo3FQ== - -lodash.flatten@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - integrity sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g== - lodash.flattendeep@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" @@ -11720,11 +12264,6 @@ lodash.flow@^3.3.0: resolved "https://registry.yarnpkg.com/lodash.flow/-/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a" integrity sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw== -lodash.foreach@^4.3.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" - integrity sha512-aEXTF4d+m05rVOAUG3z4vZZ4xVexLKZGF0lIxuHZ1Hplpk/3B6Z1+/ICICYRLm7c41Z2xiejbkCkJoTlypoXhQ== - lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" @@ -11735,41 +12274,16 @@ lodash.isequal@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== -lodash.map@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" - integrity sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q== - lodash.memoize@4.x, lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== -lodash.merge@^4.4.0, lodash.merge@^4.6.2: +lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.pick@^4.2.1: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - integrity sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q== - -lodash.reduce@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" - integrity sha512-6raRe2vxCYBhpBu+B+TtNGUzah+hQjVdu3E17wfusjyrXBka2nBS8OH/gjVZ5PvHOhWmIZTYri09Z6n/QfnNMw== - -lodash.reject@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" - integrity sha512-qkTuvgEzYdyhiJBx42YPzPo71R1aEr0z79kAv7Ixg8wPFEjgRgJdUsGMG3Hf3OYSF/kHI79XhNlt+5Ar6OzwxQ== - -lodash.some@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" - integrity sha512-j7MJE+TuT51q9ggt4fSgVqro163BEFjAt3u97IqU+JA2DkWl80nFTrowzLpZ/BnpN7rrl0JA/593NAdd8p/scQ== - lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -11780,7 +12294,7 @@ lodash.uniq@4.5.0, lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== -lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: +lodash@^4.17.10, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -11912,12 +12426,23 @@ markdown-escapes@^1.0.0: resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.4.tgz#c95415ef451499d7602b91095f3c8e8975f78535" integrity sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg== -mathjs@^10.6.0: - version "10.6.1" - resolved "https://registry.yarnpkg.com/mathjs/-/mathjs-10.6.1.tgz#95b34178eed65cbf7a63d35c468ad3ac912f7ddf" - integrity sha512-8iZp6uUKKBoCFoUHze9ydsrSji9/IOEzMhwURyoQXaLL1+ILEZnraw4KzZnUBt/XN6lPJPV+7JO94oil3AmosQ== +markdown-it@^8.3.1: + version "8.4.2" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.2.tgz#386f98998dc15a37722aa7722084f4020bdd9b54" + integrity sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ== dependencies: - "@babel/runtime" "^7.18.3" + argparse "^1.0.7" + entities "~1.1.1" + linkify-it "^2.0.0" + mdurl "^1.0.1" + uc.micro "^1.0.5" + +mathjs@^11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/mathjs/-/mathjs-11.0.1.tgz#7fb5150ef8c427f8bcddba52a084a3d8bffda7ea" + integrity sha512-Kgm+GcTxwD68zupr7BPK0yrlWpTh2q8sMH6VcBcQe5+JCBqcwOrBxBF11WPah7hVv0NCLDnJnFTiXtik1Phasg== + dependencies: + "@babel/runtime" "^7.18.9" complex.js "^2.1.1" decimal.js "^10.3.1" escape-latex "^1.2.0" @@ -11925,7 +12450,7 @@ mathjs@^10.6.0: javascript-natural-sort "^0.7.1" seedrandom "^3.0.5" tiny-emitter "^2.1.0" - typed-function "^2.1.0" + typed-function "^3.0.0" md5.js@^1.3.4: version "1.3.5" @@ -11984,7 +12509,7 @@ mdn-data@2.0.4: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== -mdurl@^1.0.0: +mdurl@^1.0.0, mdurl@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== @@ -12003,11 +12528,11 @@ mem@^8.1.1: mimic-fn "^3.1.0" memfs@^3.1.2, memfs@^3.2.2, memfs@^3.4.3: - version "3.4.4" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.4.tgz#e8973cd8060548916adcca58a248e7805c715e89" - integrity sha512-W4gHNUE++1oSJVn8Y68jPXi+mkx3fXR5ITE/Ubz6EQ3xRpCN5k2CQ4AUR8094Z7211F876TyoBACGsIveqgiGA== + version "3.4.6" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.6.tgz#74097983d27c82b973665885dc75f27a65174510" + integrity sha512-rH9mjopto6Wkr7RFuH9l9dk3qb2XGOcYKr7xMhaYqfzuJqOqhRrcFvfD7JMuPj6SLmPreh5+6eAuv36NFAU+Mw== dependencies: - fs-monkey "1.0.3" + fs-monkey "^1.0.3" memoizerific@^1.11.3: version "1.11.3" @@ -12132,7 +12657,7 @@ mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.30, mime-types@^2.1.31, dependencies: mime-db "1.52.0" -mime@1.6.0: +mime@1.6.0, mime@^1.3.4: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== @@ -12177,10 +12702,10 @@ mini-create-react-context@^0.4.0: "@babel/runtime" "^7.12.1" tiny-warning "^1.0.3" -mini-css-extract-plugin@^2.4.5, mini-css-extract-plugin@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.6.0.tgz#578aebc7fc14d32c0ad304c2c34f08af44673f5e" - integrity sha512-ndG8nxCEnAemsg4FSgS+yNyHKgkTB4nPKqCOgh65j3/30qqC5RaSQQXMm++Y6sb6E1zRSxPkztj9fqxhS1Eo6w== +mini-css-extract-plugin@^2.4.5, mini-css-extract-plugin@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.6.1.tgz#9a1251d15f2035c342d99a468ab9da7a0451b71e" + integrity sha512-wd+SD57/K6DiV7jIR34P+s3uckTRuQvx0tKPcvjFlrEylk6P4mQ2KSWk1hblj1Kxaqok7LogKOieygXqBczNlg== dependencies: schema-utils "^4.0.0" @@ -12201,7 +12726,7 @@ minimatch@3.0.4: dependencies: brace-expansion "^1.1.7" -minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -12242,9 +12767,9 @@ minipass-pipeline@^1.2.2: minipass "^3.0.0" minipass@^3.0.0, minipass@^3.1.1: - version "3.1.6" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.6.tgz#3b8150aa688a711a1521af5e8779c1d3bb4f45ee" - integrity sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ== + version "3.3.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.3.tgz#fd1f0e6c06449c10dadda72618b59c00f3d6378d" + integrity sha512-N0BOsdFAlNRfmwMhjAsLVWOk7Ljmeb39iqFlsV1At+jqRhSUP9yeof8FyJu4imaJiSUp8vQebWD/guZwGQC8iA== dependencies: yallist "^4.0.0" @@ -12313,9 +12838,9 @@ move-concurrently@^1.0.1: run-queue "^1.0.3" mrmime@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.0.tgz#14d387f0585a5233d291baba339b063752a2398b" - integrity sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ== + version "1.0.1" + resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27" + integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== ms@2.0.0: version "2.0.0" @@ -12337,7 +12862,7 @@ ms@2.1.3, ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -multicast-dns@^7.2.4: +multicast-dns@^7.2.5: version "7.2.5" resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" integrity sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== @@ -12345,6 +12870,11 @@ multicast-dns@^7.2.4: dns-packet "^5.2.2" thunky "^1.0.2" +mute-stream@~0.0.4: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + nan@^2.12.1: version "2.16.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916" @@ -12491,7 +13021,7 @@ node-preload@^0.2.1: dependencies: process-on-spawn "^1.0.0" -node-releases@^2.0.3: +node-releases@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.5.tgz#280ed5bc3eba0d96ce44897d8aee478bfb3d9666" integrity sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q== @@ -12509,7 +13039,7 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package- normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + integrity sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w== dependencies: remove-trailing-separator "^1.0.1" @@ -12521,7 +13051,7 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: normalize-range@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= + integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== normalize-url@^4.1.0: version "4.5.1" @@ -12536,7 +13066,7 @@ normalize-url@^6.0.1: npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + integrity sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw== dependencies: path-key "^2.0.0" @@ -12560,9 +13090,9 @@ npmlog@^5.0.1: nprogress@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/nprogress/-/nprogress-0.2.0.tgz#cb8f34c53213d895723fcbab907e9422adbcafb1" - integrity sha1-y480xTIT2JVyP8urkH6UIq28r7E= + integrity sha512-I19aIingLgR1fmhftnbWWO3dXc0hSxqHQHQb3H8m+K3TnEn/iSeTZZOyvKXWqQESMwuUVnatlCnZdLBZZt2VSA== -nth-check@^1.0.2, nth-check@~1.0.1: +nth-check@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== @@ -12579,7 +13109,7 @@ nth-check@^2.0.1: num2fraction@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" - integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4= + integrity sha512-Y1wZESM7VUThYY+4W+X4ySH2maqcA+p7UR+w8VWNWVAd6lwuXXWz/w/Cz43J/dI2I+PS6wD5N+bJUF+gjWvIqg== nwsapi@^2.2.0: version "2.2.0" @@ -12622,12 +13152,12 @@ nyc@^15.1.0: object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + integrity sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ== dependencies: copy-descriptor "^0.1.0" define-property "^0.2.5" @@ -12651,7 +13181,7 @@ object-keys@^1.1.1: object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + integrity sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA== dependencies: isobject "^3.0.0" @@ -12704,7 +13234,7 @@ object.hasown@^1.1.1: object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== dependencies: isobject "^3.0.1" @@ -12737,7 +13267,7 @@ on-finished@2.4.1: on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== dependencies: ee-first "1.1.1" @@ -12749,7 +13279,7 @@ on-headers@~1.0.2: once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" @@ -12809,12 +13339,30 @@ optionator@^0.9.1: os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= + integrity sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A== os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + integrity sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ== + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + +os@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/os/-/os-0.1.1.tgz#208845e89e193ad4d971474b93947736a56d13f3" + integrity sha512-jg06S2xr5De63mLjZVJDf3/k37tpjppr2LR7MUOsxv8XuUCVpCnvbCksXCBcB5gQqQf/K0+87WGTRlAj5q7r1A== + +osenv@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" p-all@^2.1.0: version "2.1.0" @@ -12831,7 +13379,7 @@ p-cancelable@^1.0.0: p-defer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" - integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + integrity sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw== p-event@^4.1.0: version "4.2.0" @@ -12850,7 +13398,7 @@ p-filter@^2.1.0: p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== p-limit@^1.1.0: version "1.3.0" @@ -12876,7 +13424,7 @@ p-limit@^3.0.2: p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== dependencies: p-limit "^1.1.0" @@ -12938,7 +13486,7 @@ p-timeout@^3.1.0: p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== p-try@^2.0.0: version "2.2.0" @@ -12965,6 +13513,11 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" +pako@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pako/-/pako-2.0.4.tgz#6cebc4bbb0b6c73b0d5b8d7e8476e2b2fbea576d" + integrity sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg== + pako@~1.0.5: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" @@ -13020,7 +13573,7 @@ parse-entities@^2.0.0: parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + integrity sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ== dependencies: error-ex "^1.2.0" @@ -13039,6 +13592,13 @@ parse-numeric-range@^1.3.0: resolved "https://registry.yarnpkg.com/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz#7c63b61190d61e4d53a1197f0c83c47bb670ffa3" integrity sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ== +parse-semver@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/parse-semver/-/parse-semver-1.1.1.tgz#9a4afd6df063dc4826f93fba4a99cf223f666cb8" + integrity sha512-Eg1OuNntBMH0ojvEKSrvDSnwLmvVuUOSdylH/pSCPNMIspLlweJyIWXCE+k/5hm3cj/EBUYwmWkjhBALNP4LXQ== + dependencies: + semver "^5.1.0" + parse5-htmlparser2-tree-adapter@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" @@ -13052,11 +13612,6 @@ parse5@6.0.1, parse5@^6.0.0: resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== -parse5@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" - integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== - parse5@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.0.0.tgz#51f74a5257f5fcc536389e8c2d0b3802e1bfa91a" @@ -13080,7 +13635,7 @@ pascal-case@^3.1.2: pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== path-browserify@0.0.1: version "0.0.1" @@ -13095,19 +13650,19 @@ path-browserify@^1.0.1: path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + integrity sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q== path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + integrity sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ== dependencies: pinkie-promise "^2.0.0" path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== path-exists@^4.0.0: version "4.0.0" @@ -13117,24 +13672,24 @@ path-exists@^4.0.0: path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-is-inside@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + integrity sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w== path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6, path-parse@^1.0.7: +path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -13142,7 +13697,7 @@ path-parse@^1.0.6, path-parse@^1.0.7: path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== path-to-regexp@2.2.1: version "2.2.1" @@ -13159,7 +13714,7 @@ path-to-regexp@^1.7.0: path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= + integrity sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg== dependencies: graceful-fs "^4.1.2" pify "^2.0.0" @@ -13191,7 +13746,7 @@ pbkdf2@^3.0.3: pdfast@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/pdfast/-/pdfast-0.2.0.tgz#8cbc556e1bf2522177787c0de2e0d4373ba885c9" - integrity sha1-jLxVbhvyUiF3eHwN4uDUNzuohck= + integrity sha512-cq6TTu6qKSFUHwEahi68k/kqN2mfepjkGrG9Un70cgdRRKLKY6Rf8P8uvP2NvZktaQZNF3YE7agEkLj0vGK9bA== peggy@^2.0.1: version "2.0.1" @@ -13201,10 +13756,15 @@ peggy@^2.0.1: commander "^9.3.0" source-map-generator "0.8.0" +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== picocolors@^0.2.1: version "0.2.1" @@ -13224,12 +13784,12 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatc pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== pify@^4.0.1: version "4.0.1" @@ -13239,14 +13799,14 @@ pify@^4.0.1: pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== dependencies: pinkie "^2.0.0" pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== pirates@^4.0.1, pirates@^4.0.4, pirates@^4.0.5: version "4.0.5" @@ -13302,17 +13862,27 @@ polished@^4.2.2: dependencies: "@babel/runtime" "^7.17.8" +popmotion@11.0.3: + version "11.0.3" + resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-11.0.3.tgz#565c5f6590bbcddab7a33a074bb2ba97e24b0cc9" + integrity sha512-Y55FLdj3UxkR7Vl3s7Qr4e9m0onSnP8W7d/xQLsoJM40vs6UKHFdygs6SWryasTZYqugMjm3BepCF4CWXDiHgA== + dependencies: + framesync "6.0.1" + hey-listen "^1.0.8" + style-value-types "5.0.0" + tslib "^2.1.0" + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== -postcss-attribute-case-insensitive@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-5.0.0.tgz#39cbf6babf3ded1e4abf37d09d6eda21c644105c" - integrity sha512-b4g9eagFGq9T5SWX4+USfVyjIb3liPnjhHHRMP7FMB2kFVpYyfEscV0wP3eaXhKlcHKUut8lt5BGoeylWA/dBQ== +postcss-attribute-case-insensitive@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-5.0.1.tgz#86d323c77ab8896ed90500071c2c8329fba64fda" + integrity sha512-wrt2VndqSLJpyBRNz9OmJcgnhI9MaongeWgapdBuUMu2a/KNJ8SENesG4SdiTnQwGO9b1VKbTWYAfCPeokLqZQ== dependencies: - postcss-selector-parser "^6.0.2" + postcss-selector-parser "^6.0.10" postcss-browser-comments@^4: version "4.0.0" @@ -13334,18 +13904,18 @@ postcss-clamp@^4.1.0: dependencies: postcss-value-parser "^4.2.0" -postcss-cli@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-9.1.0.tgz#1a86404cbe848e370127b4bdf5cd2be83bc45ebe" - integrity sha512-zvDN2ADbWfza42sAnj+O2uUWyL0eRL1V+6giM2vi4SqTR3gTYy8XzcpfwccayF2szcUif0HMmXiEaDv9iEhcpw== +postcss-cli@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-10.0.0.tgz#404e468d1ff39fb5ead3f707e2021be7cd3f8c9f" + integrity sha512-Wjy/00wBBEgQqnSToznxLWDnATznokFGXsHtF/3G8glRZpz5KYlfHcBW/VMJmWAeF2x49zjgy4izjM3/Wx1dKA== dependencies: chokidar "^3.3.0" dependency-graph "^0.11.0" fs-extra "^10.0.0" get-stdin "^9.0.0" - globby "^12.0.0" + globby "^13.0.0" picocolors "^1.0.0" - postcss-load-config "^3.0.0" + postcss-load-config "^4.0.0" postcss-reporter "^7.0.0" pretty-hrtime "^1.0.3" read-cache "^1.0.0" @@ -13360,16 +13930,16 @@ postcss-color-functional-notation@^4.2.3: postcss-value-parser "^4.2.0" postcss-color-hex-alpha@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/postcss-color-hex-alpha/-/postcss-color-hex-alpha-8.0.3.tgz#61a0fd151d28b128aa6a8a21a2dad24eebb34d52" - integrity sha512-fESawWJCrBV035DcbKRPAVmy21LpoyiXdPTuHUfWJ14ZRjY7Y7PA6P4g8z6LQGYhU1WAxkTxjIjurXzoe68Glw== + version "8.0.4" + resolved "https://registry.yarnpkg.com/postcss-color-hex-alpha/-/postcss-color-hex-alpha-8.0.4.tgz#c66e2980f2fbc1a63f5b079663340ce8b55f25a5" + integrity sha512-nLo2DCRC9eE4w2JmuKgVA3fGL3d01kGq752pVALF68qpGLmx2Qrk91QTKkdUqqp45T1K1XV8IhQpcu1hoAQflQ== dependencies: postcss-value-parser "^4.2.0" postcss-color-rebeccapurple@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-7.0.2.tgz#5d397039424a58a9ca628762eb0b88a61a66e079" - integrity sha512-SFc3MaocHaQ6k3oZaFwH8io6MdypkUtEy/eXzXEB1vEQlO3S3oDc/FSZA8AsS04Z25RirQhlDlHLh3dn7XewWw== + version "7.1.0" + resolved "https://registry.yarnpkg.com/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-7.1.0.tgz#a2fe1d7be13d21ea01dc7c2363b637cc83a9eb6e" + integrity sha512-1jtE5AKnZcKq4pjOrltFHcbEM2/IvtbD1OdhZ/wqds18//bh0UmQkffcCkzDJU+/vGodfIsVQeKn+45CJvX9Bw== dependencies: postcss-value-parser "^4.2.0" @@ -13391,22 +13961,24 @@ postcss-convert-values@^5.1.2: browserslist "^4.20.3" postcss-value-parser "^4.2.0" -postcss-custom-media@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-8.0.0.tgz#1be6aff8be7dc9bf1fe014bde3b71b92bb4552f1" - integrity sha512-FvO2GzMUaTN0t1fBULDeIvxr5IvbDXcIatt6pnJghc736nqNgsGao5NT+5+WVLAQiTt6Cb3YUms0jiPaXhL//g== - -postcss-custom-properties@^12.1.7: - version "12.1.7" - resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-12.1.7.tgz#ca470fd4bbac5a87fd868636dafc084bc2a78b41" - integrity sha512-N/hYP5gSoFhaqxi2DPCmvto/ZcRDVjE3T1LiAMzc/bg53hvhcHOLpXOHb526LzBBp5ZlAUhkuot/bfpmpgStJg== +postcss-custom-media@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-8.0.2.tgz#c8f9637edf45fef761b014c024cee013f80529ea" + integrity sha512-7yi25vDAoHAkbhAzX9dHx2yc6ntS4jQvejrNcC+csQJAXjj15e7VcWfMgLqBNAbOvqi5uIa9huOVwdHbf+sKqg== dependencies: postcss-value-parser "^4.2.0" -postcss-custom-selectors@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/postcss-custom-selectors/-/postcss-custom-selectors-6.0.0.tgz#022839e41fbf71c47ae6e316cb0e6213012df5ef" - integrity sha512-/1iyBhz/W8jUepjGyu7V1OPcGbc636snN1yXEQCinb6Bwt7KxsiU7/bLQlp8GwAXzCh7cobBU5odNn/2zQWR8Q== +postcss-custom-properties@^12.1.7: + version "12.1.8" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-12.1.8.tgz#aa003e1885c5bd28e2e32496cd597e389ca889e4" + integrity sha512-8rbj8kVu00RQh2fQF81oBqtduiANu4MIxhyf0HbbStgPtnFlWn0yiaYTpLHrPnJbffVY1s9apWsIoVZcc68FxA== + dependencies: + postcss-value-parser "^4.2.0" + +postcss-custom-selectors@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/postcss-custom-selectors/-/postcss-custom-selectors-6.0.3.tgz#1ab4684d65f30fed175520f82d223db0337239d9" + integrity sha512-fgVkmyiWDwmD3JbpCmB45SvvlCD6z9CG6Ie6Iere22W5aHea6oWa7EM2bpnv2Fj3I94L3VbtvX9KqwSi5aFzSg== dependencies: postcss-selector-parser "^6.0.4" @@ -13531,7 +14103,7 @@ postcss-lab-function@^4.2.0: "@csstools/postcss-progressive-custom-properties" "^1.1.0" postcss-value-parser "^4.2.0" -postcss-load-config@^3.0.0, postcss-load-config@^3.1.4: +postcss-load-config@^3.1.4: version "3.1.4" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg== @@ -13539,6 +14111,14 @@ postcss-load-config@^3.0.0, postcss-load-config@^3.1.4: lilconfig "^2.0.5" yaml "^1.10.2" +postcss-load-config@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-4.0.1.tgz#152383f481c2758274404e4962743191d73875bd" + integrity sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA== + dependencies: + lilconfig "^2.0.5" + yaml "^2.1.1" + postcss-loader@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-4.3.0.tgz#2c4de9657cd4f07af5ab42bd60a673004da1b8cc" @@ -13559,10 +14139,10 @@ postcss-loader@^6.2.1: klona "^2.0.5" semver "^7.3.5" -postcss-loader@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-7.0.0.tgz#367d10eb1c5f1d93700e6b399683a6dc7c3af396" - integrity sha512-IDyttebFzTSY6DI24KuHUcBjbAev1i+RyICoPEWcAstZsj03r533uMXtDn506l6/wlsRYiS5XBdx7TpccCsyUg== +postcss-loader@^7.0.0, postcss-loader@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-7.0.1.tgz#4c883cc0a1b2bfe2074377b7a74c1cd805684395" + integrity sha512-VRviFEyYlLjctSM93gAZtcJJ/iSkPZ79zWbN/1fSH+NisBByEiVLqpdVDrPLVSi8DX0oJo12kL/GppTBdKVXiQ== dependencies: cosmiconfig "^7.0.0" klona "^2.0.5" @@ -13586,10 +14166,10 @@ postcss-merge-idents@^5.1.1: cssnano-utils "^3.1.0" postcss-value-parser "^4.2.0" -postcss-merge-longhand@^5.1.5: - version "5.1.5" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.1.5.tgz#b0e03bee3b964336f5f33c4fc8eacae608e91c05" - integrity sha512-NOG1grw9wIO+60arKa2YYsrbgvP6tp+jqc7+ZD5/MalIw234ooH2C6KlR6FEn4yle7GqZoBxSK1mLBE9KPur6w== +postcss-merge-longhand@^5.1.6: + version "5.1.6" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.1.6.tgz#f378a8a7e55766b7b644f48e5d8c789ed7ed51ce" + integrity sha512-6C/UGF/3T5OE2CEbOuX7iNO63dnvqhGZeUnKkDeifebY0XqkkvrctYSZurpNE902LDf2yKwwPFgotnfSoPhQiw== dependencies: postcss-value-parser "^4.2.0" stylehacks "^5.1.0" @@ -13705,11 +14285,11 @@ postcss-nested@5.0.6: postcss-selector-parser "^6.0.6" postcss-nesting@^10.1.7: - version "10.1.7" - resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-10.1.7.tgz#0101bd6c7d386e7ad8e2e86ebcc0e0109833b86e" - integrity sha512-Btho5XzDTpl117SmB3tvUHP8txg5n7Ayv7vQ5m4b1zXkfs1Y52C67uZjZ746h7QvOJ+rLRg50OlhhjFW+IQY6A== + version "10.1.8" + resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-10.1.8.tgz#1675542cfedc3dc9621993f3abfdafa260c3a460" + integrity sha512-txdb3/idHYsBbNDFo1PFY0ExCgH5nfWi8G5lO49e6iuU42TydbODTzJgF5UuL5bhgeSlnAtDgfFTDG0Cl1zaSQ== dependencies: - "@csstools/selector-specificity" "1.0.0" + "@csstools/selector-specificity" "^2.0.0" postcss-selector-parser "^6.0.10" postcss-normalize-charset@^5.1.0: @@ -13724,17 +14304,17 @@ postcss-normalize-display-values@^5.1.0: dependencies: postcss-value-parser "^4.2.0" -postcss-normalize-positions@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-5.1.0.tgz#902a7cb97cf0b9e8b1b654d4a43d451e48966458" - integrity sha512-8gmItgA4H5xiUxgN/3TVvXRoJxkAWLW6f/KKhdsH03atg0cB8ilXnrB5PpSshwVu/dD2ZsRFQcR1OEmSBDAgcQ== +postcss-normalize-positions@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz#ef97279d894087b59325b45c47f1e863daefbb92" + integrity sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg== dependencies: postcss-value-parser "^4.2.0" -postcss-normalize-repeat-style@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.0.tgz#f6d6fd5a54f51a741cc84a37f7459e60ef7a6398" - integrity sha512-IR3uBjc+7mcWGL6CtniKNQ4Rr5fTxwkaDHwMBDGGs1x9IVRkYIT/M4NelZWkAOBdV6v3Z9S46zqaKGlyzHSchw== +postcss-normalize-repeat-style@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.1.tgz#e9eb96805204f4766df66fd09ed2e13545420fb2" + integrity sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g== dependencies: postcss-value-parser "^4.2.0" @@ -13789,10 +14369,10 @@ postcss-opacity-percentage@^1.1.2: resolved "https://registry.yarnpkg.com/postcss-opacity-percentage/-/postcss-opacity-percentage-1.1.2.tgz#bd698bb3670a0a27f6d657cc16744b3ebf3b1145" integrity sha512-lyUfF7miG+yewZ8EAk9XUBIlrHyUE6fijnesuz+Mj5zrIHIEw6KcIZSOk/elVMqzLvREmXB83Zi/5QpNRYd47w== -postcss-ordered-values@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.1.1.tgz#0b41b610ba02906a3341e92cab01ff8ebc598adb" - integrity sha512-7lxgXF0NaoMIgyihL/2boNAEZKiW0+HkMhdKMTD93CjW8TdCy2hSdj8lsAo+uwm7EDG16Da2Jdmtqpedl0cMfw== +postcss-ordered-values@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz#b6fd2bd10f937b23d86bc829c69e7732ce76ea38" + integrity sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ== dependencies: cssnano-utils "^3.1.0" postcss-value-parser "^4.2.0" @@ -13815,9 +14395,9 @@ postcss-place@^7.0.4: postcss-value-parser "^4.2.0" postcss-preset-env@^7.0.1: - version "7.7.0" - resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-7.7.0.tgz#bcc9be9725a85d34e72a8fa69dc5e1130abee301" - integrity sha512-2Q9YARQju+j2BVgAyDnW1pIWIMlaHZqbaGISPMmalznNlWcNFIZFQsJfRLXS+WHmHJDCmV7wIWpVf9JNKR4Elw== + version "7.7.1" + resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-7.7.1.tgz#ca416c15fd63fd44abe5dcd2890a34b0a664d2c8" + integrity sha512-1sx6+Nl1wMVJzaYLVaz4OAR6JodIN/Z1upmVqLwSPCLT6XyxrEoePgNMHPH08kseLe3z06i9Vfkt/32BYEKDeA== dependencies: "@csstools/postcss-cascade-layers" "^1.0.2" "@csstools/postcss-color-function" "^1.1.0" @@ -13829,22 +14409,22 @@ postcss-preset-env@^7.0.1: "@csstools/postcss-oklab-function" "^1.1.0" "@csstools/postcss-progressive-custom-properties" "^1.3.0" "@csstools/postcss-stepped-value-functions" "^1.0.0" - "@csstools/postcss-trigonometric-functions" "^1.0.0" + "@csstools/postcss-trigonometric-functions" "^1.0.1" "@csstools/postcss-unset-value" "^1.0.1" autoprefixer "^10.4.7" browserslist "^4.20.3" css-blank-pseudo "^3.0.3" css-has-pseudo "^3.0.4" css-prefers-color-scheme "^6.0.3" - cssdb "^6.6.2" - postcss-attribute-case-insensitive "^5.0.0" + cssdb "^6.6.3" + postcss-attribute-case-insensitive "^5.0.1" postcss-clamp "^4.1.0" postcss-color-functional-notation "^4.2.3" postcss-color-hex-alpha "^8.0.3" postcss-color-rebeccapurple "^7.0.2" - postcss-custom-media "^8.0.0" + postcss-custom-media "^8.0.1" postcss-custom-properties "^12.1.7" - postcss-custom-selectors "^6.0.0" + postcss-custom-selectors "^6.0.2" postcss-dir-pseudo-class "^6.0.4" postcss-double-position-gradients "^3.1.1" postcss-env-function "^4.0.6" @@ -13864,7 +14444,7 @@ postcss-preset-env@^7.0.1: postcss-place "^7.0.4" postcss-pseudo-class-any-link "^7.1.4" postcss-replace-overflow-wrap "^4.0.0" - postcss-selector-not "^5.0.0" + postcss-selector-not "^6.0.0" postcss-value-parser "^4.2.0" postcss-pseudo-class-any-link@^7.1.4: @@ -13909,12 +14489,12 @@ postcss-reporter@^7.0.0: picocolors "^1.0.0" thenby "^1.3.4" -postcss-selector-not@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/postcss-selector-not/-/postcss-selector-not-5.0.0.tgz#ac5fc506f7565dd872f82f5314c0f81a05630dc7" - integrity sha512-/2K3A4TCP9orP4TNS7u3tGdRFVKqz/E6pX3aGnriPG0jU78of8wsUcqE4QAhWEU0d+WnMSF93Ah3F//vUtK+iQ== +postcss-selector-not@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/postcss-selector-not/-/postcss-selector-not-6.0.0.tgz#d100f273d345917246762300411b4d2e24905047" + integrity sha512-i/HI/VNd3V9e1WOLCwJsf9nePBRXqcGtVibcJ9FsVo0agfDEfsLSlFt94aYjY35wUNcdG0KrvdyjEr7It50wLQ== dependencies: - balanced-match "^1.0.0" + postcss-selector-parser "^6.0.10" postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.6, postcss-selector-parser@^6.0.9: version "6.0.10" @@ -13981,22 +14561,22 @@ prelude-ls@^1.2.1: prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + integrity sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA== "prettier@>=2.2.1 <=2.3.0": version "2.3.0" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w== -prettier@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" - integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew== +prettier@^2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" + integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== pretty-bytes@^5.3.0, pretty-bytes@^5.4.1: version "5.6.0" @@ -14028,10 +14608,10 @@ pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.5.1: ansi-styles "^5.0.0" react-is "^17.0.1" -pretty-format@^28.1.0: - version "28.1.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.0.tgz#8f5836c6a0dfdb834730577ec18029052191af55" - integrity sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q== +pretty-format@^28.0.0, pretty-format@^28.1.1: + version "28.1.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.1.tgz#f731530394e0f7fcd95aba6b43c50e02d86b95cb" + integrity sha512-wwJbVTGFHeucr5Jw2bQ9P+VYHyLdAqedFLEkdQUVaBF/eiidDwH5OpilINq4mEfhbCjLnirt6HTTDhv1HaTIQw== dependencies: "@jest/schemas" "^28.0.2" ansi-regex "^5.0.1" @@ -14041,17 +14621,17 @@ pretty-format@^28.1.0: pretty-hrtime@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" - integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= + integrity sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A== pretty-time@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.1.0.tgz#ffb7429afabb8535c346a34e41873adf3d74dd0e" integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA== -prism-react-renderer@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.3.3.tgz#9b5a4211a6756eee3c96fee9a05733abc0b0805c" - integrity sha512-Viur/7tBTCH2HmYzwCHmt2rEFn+rdIWNIINXyg0StiISbDiIhHKhrFuEK8eMkKgvsIYSjgGqy/hNyucHp6FpoQ== +prism-react-renderer@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.3.5.tgz#786bb69aa6f73c32ba1ee813fbe17a0115435085" + integrity sha512-IJ+MSwBWKG+SM3b2SUfdrhC+gu01QkV2KmRQgREThBfSQRoufqRfxfHUxpG1WcaFjP+kojcFyO9Qqtpgt3qLCg== prismjs@^1.27.0, prismjs@^1.28.0: version "1.28.0" @@ -14078,12 +14658,12 @@ process-on-spawn@^1.0.0: process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= + integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== promise.allsettled@^1.0.0: version "1.0.5" @@ -14160,7 +14740,7 @@ proxy-addr@~2.0.7: prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== psl@^1.1.33: version "1.8.0" @@ -14207,12 +14787,12 @@ pumpify@^1.3.3: punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw== punycode@^1.2.4, punycode@^1.3.2: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" @@ -14229,7 +14809,7 @@ pupa@^2.1.1: pure-color@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e" - integrity sha1-H+Bk+wrIUfDeYTIKi/eWg2Qi8z4= + integrity sha512-QFADYnsVoBMw1srW7OVKEYjG+MbIa49s54w1MA1EDY6r2r/sTcKKYqRX1f4GYvnXP7eN/Pe9HFcX+hwzmrXRHA== pure-rand@^5.0.1: version "5.0.1" @@ -14239,24 +14819,31 @@ pure-rand@^5.0.1: q@^1.1.2: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= + integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== -qs@6.10.3, qs@^6.10.0: +qs@6.10.3: version "6.10.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== dependencies: side-channel "^1.0.4" +qs@^6.10.0: + version "6.10.5" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.5.tgz#974715920a80ff6a262264acd2c7e6c2a53282b4" + integrity sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ== + dependencies: + side-channel "^1.0.4" + querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= + integrity sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA== querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== querystring@^0.2.0: version "0.2.1" @@ -14315,7 +14902,7 @@ randomfill@^1.0.3: range-parser@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= + integrity sha512-kA5WQoNVo4t9lNx2kQNFCxKeBl5IbbSNBl1M/tLkw9WCn+hxNBAW5Qh8gdhs63CJnhjJ2zQWFoqPJP2sK1AV5A== range-parser@^1.2.1, range-parser@~1.2.1: version "1.2.1" @@ -14340,7 +14927,7 @@ raw-loader@^4.0.2: loader-utils "^2.0.0" schema-utils "^3.0.0" -rc@^1.2.8: +rc@1.2.8, rc@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== @@ -14376,7 +14963,7 @@ react-app-polyfill@^3.0.0: react-base16-styling@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/react-base16-styling/-/react-base16-styling-0.6.0.tgz#ef2156d66cf4139695c8a167886cb69ea660792c" - integrity sha1-7yFW1mz0E5aVyKFniGy2nqZgeSw= + integrity sha512-yvh/7CArceR/jNATXOKDlvTnPKPmGZz7zsenQ3jUwLzHkNUR0CvY3yGYJbWJ/nnxsL8Sgmt5cO3/SILVuPO6TQ== dependencies: base16 "^1.0.0" lodash.curry "^4.0.1" @@ -14419,9 +15006,9 @@ react-docgen-typescript@^2.1.1: integrity sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg== react-docgen@^5.0.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/react-docgen/-/react-docgen-5.4.1.tgz#867168accce39e25095a23a922eaa90722e9d182" - integrity sha512-TZqD1aApirw86NV6tHrmDoxUn8wlinkVyutFarzbdwuhEurAzDN0y5sSj64o+BrHLPqjwpH9tunpfwgy+3Uyww== + version "5.4.2" + resolved "https://registry.yarnpkg.com/react-docgen/-/react-docgen-5.4.2.tgz#697ec899e8dd493bb7ba0d50ec0aa5e49f41d3fa" + integrity sha512-4Z5XYpHsn2bbUfaflxoS30VhUvQLBe4GCwwM5v1e1FUOeDdaoJi6wUGSmYp6OdXYEISEAOEIaSPBk4iezNCKBw== dependencies: "@babel/core" "^7.7.5" "@babel/generator" "^7.12.11" @@ -14434,13 +15021,13 @@ react-docgen@^5.0.0: node-dir "^0.1.10" strip-indent "^3.0.0" -react-dom@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.1.0.tgz#7f6dd84b706408adde05e1df575b3a024d7e8a2f" - integrity sha512-fU1Txz7Budmvamp7bshe4Zi32d0ll7ect+ccxNu9FlObT605GOEB8BfO4tmRJ39R5Zj831VCpvQ05QPBW5yb+w== +react-dom@^18.2.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" + integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== dependencies: loose-envify "^1.1.0" - scheduler "^0.22.0" + scheduler "^0.23.0" react-element-to-jsx-string@^14.3.4: version "14.3.4" @@ -14472,10 +15059,10 @@ react-helmet-async@*, react-helmet-async@^1.3.0: react-fast-compare "^3.2.0" shallowequal "^1.1.0" -react-hook-form@^7.32.0: - version "7.32.0" - resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.32.0.tgz#bfe36000e3a9fa605a4e3e9a029282feb094ef6a" - integrity sha512-AFUwl9MwVVnZZsFZW7Egc8PVyWem6c6/9FBq29Acsikm+8ecJCkqOn2Tl48GApFnXBgoBBEHC3zosjYvPfsGNg== +react-hook-form@^7.33.1: + version "7.33.1" + resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.33.1.tgz#8c4410e3420788d3b804d62cc4c142915c2e46d0" + integrity sha512-ydTfTxEJdvgjCZBj5DDXRc58oTEfnFupEwwTAQ9FSKzykEJkX+3CiAkGtAMiZG7IPWHuzgT6AOBfogiKhUvKgg== react-inspector@^5.1.0: version "5.1.1" @@ -14497,9 +15084,9 @@ react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0: integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== react-is@^18.0.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.1.0.tgz#61aaed3096d30eacf2a2127118b5b41387d32a67" - integrity sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg== + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== react-json-view@^1.21.3: version "1.21.3" @@ -14664,10 +15251,10 @@ react-use@^17.4.0: ts-easing "^0.2.0" tslib "^2.1.0" -react-vega@^7.5.1: - version "7.5.1" - resolved "https://registry.yarnpkg.com/react-vega/-/react-vega-7.5.1.tgz#574ada8b53aa8bdae61a286c1e0fb5a8efdbd064" - integrity sha512-pbcSrLsqmUP2+1v+/im99GdGompT0jJwJo9Cjq3QQ9URUYMuEEvfTCergEtfVRcBjC6bPTN6sLbe+8yQSqB4jg== +react-vega@^7.6.0: + version "7.6.0" + resolved "https://registry.yarnpkg.com/react-vega/-/react-vega-7.6.0.tgz#b791c944046b20e02d366c7d0f8dcc21bdb4a6bb" + integrity sha512-2oMML4wH9qWLnZPRxJm06ozwrVN/K+nkjqdI5/ofWWsrBnnH4iB9rRKrsV8px0nlWgZrwfdCH4g5RUiyyJHWSA== dependencies: "@types/react" "*" fast-deep-equal "^3.1.1" @@ -14675,9 +15262,9 @@ react-vega@^7.5.1: vega-embed "^6.5.1" react@^18.0.0, react@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/react/-/react-18.1.0.tgz#6f8620382decb17fdc5cc223a115e2adbf104890" - integrity sha512-4oL8ivCz5ZEPyclFQXaNksK3adutVS8l2xzZU0cqEFrE9Sb7fC0EFK5uEk74wIreL1DERyjvsU915j1pcT2uEQ== + version "18.2.0" + resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== dependencies: loose-envify "^1.1.0" @@ -14691,7 +15278,7 @@ read-cache@^1.0.0: read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= + integrity sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A== dependencies: find-up "^1.0.0" read-pkg "^1.0.0" @@ -14708,7 +15295,7 @@ read-pkg-up@^7.0.1: read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= + integrity sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ== dependencies: load-json-file "^1.0.0" normalize-package-data "^2.3.2" @@ -14724,6 +15311,13 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" +read@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" + integrity sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ== + dependencies: + mute-stream "~0.0.4" + "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" @@ -14737,7 +15331,7 @@ read-pkg@^5.2.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.6.0: +readable-stream@^3.0.6, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -14775,7 +15369,7 @@ reanalyze@^2.23.0: rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= + integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== dependencies: resolve "^1.1.6" @@ -14796,7 +15390,7 @@ recursive-readdir@^2.2.2: redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" - integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= + integrity sha512-qtW5hKzGQZqKoh6JNSD+4lfitfPKGz42e6QwiRmPM5mmKtR0N41AbJRYu0xJi7nhOJ4WDgRkKvAk6tw4WIwR4g== dependencies: indent-string "^2.1.0" strip-indent "^1.0.1" @@ -14886,12 +15480,24 @@ regexpu-core@^5.0.1: unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.0.0" -registry-auth-token@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.1.tgz#6d7b4006441918972ccd5fedcd41dc322c79b250" - integrity sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw== +regexpu-core@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.1.0.tgz#2f8504c3fd0ebe11215783a41541e21c79942c6d" + integrity sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA== dependencies: - rc "^1.2.8" + regenerate "^1.4.2" + regenerate-unicode-properties "^10.0.1" + regjsgen "^0.6.0" + regjsparser "^0.8.2" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.0.0" + +registry-auth-token@^4.0.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.2.tgz#f02d49c3668884612ca031419491a13539e21fac" + integrity sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg== + dependencies: + rc "1.2.8" registry-url@^5.0.0: version "5.1.0" @@ -14924,15 +15530,6 @@ rehype-katex@^5: unified "^9.0.0" unist-util-visit "^2.0.0" -rehype-parse@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-6.0.2.tgz#aeb3fdd68085f9f796f1d3137ae2b85a98406964" - integrity sha512-0S3CpvpTAgGmnz8kiCyFLGuW5yA4OQhyNTm/nwPopZ7+PI11WnGl1TTWTGv/2hPEe/g2jRLlhVVSsoDH8waRug== - dependencies: - hast-util-from-parse5 "^5.0.0" - parse5 "^5.0.0" - xtend "^4.0.0" - rehype-parse@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-7.0.1.tgz#58900f6702b56767814afc2a9efa2d42b1c90c57" @@ -14944,24 +15541,15 @@ rehype-parse@^7.0.0: relateurl@^0.2.7: version "0.2.7" resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" - integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= + integrity sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog== release-zalgo@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" - integrity sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA= + integrity sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA== dependencies: es6-error "^4.0.1" -remark-admonitions@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/remark-admonitions/-/remark-admonitions-1.2.1.tgz#87caa1a442aa7b4c0cafa04798ed58a342307870" - integrity sha512-Ji6p68VDvD+H1oS95Fdx9Ar5WA2wcDA4kwrrhVU7fGctC6+d3uiMICu7w7/2Xld+lnU7/gi+432+rRbup5S8ow== - dependencies: - rehype-parse "^6.0.2" - unified "^8.4.2" - unist-util-visit "^2.0.1" - remark-emoji@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/remark-emoji/-/remark-emoji-2.2.0.tgz#1c702090a1525da5b80e15a8f963ef2c8236cac7" @@ -15047,7 +15635,7 @@ remark-squeeze-paragraphs@4.0.0: remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + integrity sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw== renderkid@^2.0.4: version "2.0.7" @@ -15079,19 +15667,19 @@ repeat-element@^1.1.2: repeat-string@^1.0.0, repeat-string@^1.5.4, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== repeating@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + integrity sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A== dependencies: is-finite "^1.0.0" require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== require-from-string@^2.0.2: version "2.0.2" @@ -15101,7 +15689,7 @@ require-from-string@^2.0.2: "require-like@>= 0.1.1": version "0.1.2" resolved "https://registry.yarnpkg.com/require-like/-/require-like-0.1.2.tgz#ad6f30c13becd797010c468afa775c0c0a6b47fa" - integrity sha1-rW8wwTvs15cBDEaK+ndcDAprR/o= + integrity sha512-oyrU88skkMtDdauHDuKVrgR+zuItqr6/c//FXzvmxRGMexSDc6hNvJInGW3LL46n+8b50RykrvwSUIIQH2LQ5A== require-main-filename@^2.0.0: version "2.0.0" @@ -15111,7 +15699,7 @@ require-main-filename@^2.0.0: requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" - integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== rescript-fast-check@^1.1.1: version "1.1.1" @@ -15166,34 +15754,35 @@ resolve-url-loader@^4.0.0: resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== resolve.exports@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.3.2, resolve@^1.9.0: - version "1.22.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" - integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== +resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.3.2, resolve@^1.9.0: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== dependencies: - is-core-module "^2.8.1" + is-core-module "^2.9.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" resolve@^2.0.0-next.3: - version "2.0.0-next.3" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.3.tgz#d41016293d4a8586a39ca5d9b5f15cbea1f55e46" - integrity sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q== + version "2.0.0-next.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" + integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + integrity sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ== dependencies: lowercase-keys "^1.0.0" @@ -15250,9 +15839,9 @@ rollup-plugin-terser@^7.0.0: terser "^5.0.0" rollup@^2.43.1: - version "2.75.4" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.75.4.tgz#c3518c326c98e508b628a93015a03a276c331f22" - integrity sha512-JgZiJMJkKImMZJ8ZY1zU80Z2bA/TvrL/7D9qcBCrfl2bP+HUaIw0QHUroB4E3gBpFl6CRFM1YxGbuYGtdAswbQ== + version "2.75.7" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.75.7.tgz#221ff11887ae271e37dcc649ba32ce1590aaa0b9" + integrity sha512-VSE1iy0eaAYNCxEXaleThdFXqZJ42qDBatAwrfnPlENEZ8erQ+0LYX4JXOLPceWfZpV1VtZwZ3dFCuOZiSyFtQ== optionalDependencies: fsevents "~2.3.2" @@ -15293,14 +15882,14 @@ run-parallel@^1.1.9: run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" - integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= + integrity sha512-ntymy489o0/QQplUDnpYAYUsO50K9SBrIVaKCWDOJzYJts0f9WH9RFJkyagebkw5+y1oi00R7ynNW/d12GBumg== dependencies: aproba "^1.1.1" rw@1: version "1.3.3" resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" - integrity sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q= + integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== rxjs@^7.5.4: version "7.5.5" @@ -15327,7 +15916,7 @@ safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== dependencies: ret "~0.1.10" @@ -15376,10 +15965,10 @@ saxes@^5.0.1: dependencies: xmlchars "^2.2.0" -scheduler@^0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.22.0.tgz#83a5d63594edf074add9a7198b1bae76c3db01b8" - integrity sha512-6QAm1BgQI88NPYymgGQLCZgvep4FyePDWFpXVK+zNSUgHwlqpJy8VEh8Et0KxTACS4VWwMousBElAZOH9nkkoQ== +scheduler@^0.23.0: + version "0.23.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" + integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== dependencies: loose-envify "^1.1.0" @@ -15450,7 +16039,7 @@ seedrandom@^3.0.5: select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" - integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= + integrity sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg== selfsigned@^2.0.1: version "2.0.1" @@ -15466,7 +16055,7 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -15550,7 +16139,7 @@ serialize-javascript@^6.0.0: serve-favicon@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/serve-favicon/-/serve-favicon-2.5.0.tgz#935d240cdfe0f5805307fdfe967d88942a2cbcf0" - integrity sha1-k10kDN/g9YBTB/3+ln2IlCosvPA= + integrity sha512-FMW2RvqNr03x+C0WxTyu6sOv21oOjkq5j8tjquWccwa6ScNyGFOGJVpuS1NmTVGBAHS07xnSKotgf2ehQmf9iA== dependencies: etag "~1.8.1" fresh "0.5.2" @@ -15575,7 +16164,7 @@ serve-handler@^6.1.3: serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" - integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= + integrity sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw== dependencies: accepts "~1.3.4" batch "0.6.1" @@ -15598,7 +16187,7 @@ serve-static@1.15.0, serve-static@^1.14.1: set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== set-harmonic-interval@^1.0.1: version "1.0.1" @@ -15618,7 +16207,7 @@ set-value@^2.0.0, set-value@^2.0.1: setimmediate@^1.0.4, setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== setprototypeof@1.1.0: version "1.1.0" @@ -15653,7 +16242,7 @@ shallowequal@^1.1.0: shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== dependencies: shebang-regex "^1.0.0" @@ -15667,7 +16256,7 @@ shebang-command@^2.0.0: shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== shebang-regex@^3.0.0: version "3.0.0" @@ -15844,7 +16433,7 @@ source-map-url@^0.4.0: source-map@0.5.6: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" - integrity sha1-dc449SvwczxafwwRjYEzSiu19BI= + integrity sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA== source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: version "0.6.1" @@ -15854,12 +16443,12 @@ source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, sourc source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== source-map@^0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== + version "0.7.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" + integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== source-map@^0.8.0-beta.0: version "0.8.0-beta.0" @@ -15949,7 +16538,7 @@ split-string@^3.0.1, split-string@^3.0.2: sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== ssri@^6.0.1: version "6.0.2" @@ -15971,11 +16560,11 @@ stable@^0.1.8: integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== stack-generator@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/stack-generator/-/stack-generator-2.0.5.tgz#fb00e5b4ee97de603e0773ea78ce944d81596c36" - integrity sha512-/t1ebrbHkrLrDuNMdeAcsvynWgoH/i4o8EGGfX7dEYDoTXOYVAkEpFdtshlvabzc6JlJ8Kf9YdFEoz7JkzGN9Q== + version "2.0.10" + resolved "https://registry.yarnpkg.com/stack-generator/-/stack-generator-2.0.10.tgz#8ae171e985ed62287d4f1ed55a1633b3fb53bb4d" + integrity sha512-mwnua/hkqM6pF4k8SnmZ2zfETsRUpWXREfA/goT8SLCV4iOFa4bzOX2nDipWAZFPTjLvQB82f5yaodMVhK0yJQ== dependencies: - stackframe "^1.1.1" + stackframe "^1.3.4" stack-utils@^2.0.3: version "2.0.5" @@ -15984,18 +16573,18 @@ stack-utils@^2.0.3: dependencies: escape-string-regexp "^2.0.0" -stackframe@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.2.1.tgz#1033a3473ee67f08e2f2fc8eba6aef4f845124e1" - integrity sha512-h88QkzREN/hy8eRdyNhhsO7RSJ5oyTqxxmmn0dzBIMUclZsjpfmrsg81vp8mjjAs2vAZ72nyWxRUwSwmh0e4xg== +stackframe@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.3.4.tgz#b881a004c8c149a5e8efef37d51b16e412943310" + integrity sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw== stacktrace-gps@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/stacktrace-gps/-/stacktrace-gps-3.0.4.tgz#7688dc2fc09ffb3a13165ebe0dbcaf41bcf0c69a" - integrity sha512-qIr8x41yZVSldqdqe6jciXEaSCKw1U8XTXpjDuy0ki/apyTn/r3w9hDAAQOhZdxvsC93H+WwwEu5cq5VemzYeg== + version "3.1.2" + resolved "https://registry.yarnpkg.com/stacktrace-gps/-/stacktrace-gps-3.1.2.tgz#0c40b24a9b119b20da4525c398795338966a2fb0" + integrity sha512-GcUgbO4Jsqqg6RxfyTHFiPxdPqF+3LFmQhm7MgCuYQOYuWyqxo5pwRPz5d/u6/WYJdEnWfK4r+jGbyD8TSggXQ== dependencies: source-map "0.5.6" - stackframe "^1.1.1" + stackframe "^1.3.4" stacktrace-js@^2.0.2: version "2.0.2" @@ -16014,7 +16603,7 @@ state-toggle@^1.0.0: static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + integrity sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g== dependencies: define-property "^0.2.5" object-copy "^0.1.0" @@ -16027,7 +16616,7 @@ statuses@2.0.1: "statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== std-env@^3.0.1: version "3.1.1" @@ -16193,7 +16782,7 @@ stringify-object@^3.3.0: strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== dependencies: ansi-regex "^2.0.0" @@ -16214,19 +16803,19 @@ strip-ansi@^7.0.1: strip-bom-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92" - integrity sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI= + integrity sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g== strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + integrity sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g== dependencies: is-utf8 "^0.2.0" strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== strip-bom@^4.0.0: version "4.0.0" @@ -16241,7 +16830,7 @@ strip-comments@^2.0.1: strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + integrity sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q== strip-final-newline@^2.0.0: version "2.0.0" @@ -16251,7 +16840,7 @@ strip-final-newline@^2.0.0: strip-indent@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" - integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= + integrity sha512-I5iQq6aFMM62fBEAIB/hXzwJD6EEZ0xEGCX2t7oXqaKPIRgt4WruAQ285BISgdkP+HLGWyeGmNJcpIwFeRYRUA== dependencies: get-stdin "^4.0.1" @@ -16270,12 +16859,12 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== stubs@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b" - integrity sha1-6NK6H6nJBXAwPAMLaQD31fiavls= + integrity sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw== style-loader@^1.3.0: version "1.3.0" @@ -16305,6 +16894,14 @@ style-to-object@0.3.0, style-to-object@^0.3.0: dependencies: inline-style-parser "0.1.1" +style-value-types@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/style-value-types/-/style-value-types-5.0.0.tgz#76c35f0e579843d523187989da866729411fc8ad" + integrity sha512-08yq36Ikn4kx4YU6RD7jWEv27v4V+PUsOGa4n/as8Et3CuODMJQ00ENeAVXAeydX4Z2j1XHZF1K2sX4mGl18fA== + dependencies: + hey-listen "^1.0.8" + tslib "^2.1.0" + stylehacks@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-5.1.0.tgz#a40066490ca0caca04e96c6b02153ddc39913520" @@ -16321,7 +16918,7 @@ stylis@^4.0.6: supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + integrity sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g== supports-color@^5.3.0: version "5.5.0" @@ -16414,12 +17011,12 @@ synchronous-promise@^2.0.15: resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.15.tgz#07ca1822b9de0001f5ff73595f3d08c4f720eb8e" integrity sha512-k8uzYIkIVwmT+TcglpdN50pS2y1BDcUnBPK9iJeGu0Pl1lOI8pD6wtzgw91Pjpe+RxtTncw32tLxs/R0yNL2Mg== -tailwindcss@^3.0.2, tailwindcss@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.1.2.tgz#b5607d17adb6cbb11a13738cc5fdf3e5527dcd7a" - integrity sha512-yJ6L5s1U5AeS5g7HHy212zdQfjwD426FBfm59pet/JsyneuZuD4C2W7PpJEg4ppisiB21uLqtNagv8KXury3+Q== +tailwindcss@^3.0.2, tailwindcss@^3.1.6: + version "3.1.6" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.1.6.tgz#bcb719357776c39e6376a8d84e9834b2b19a49f1" + integrity sha512-7skAOY56erZAFQssT1xkpk+kWt2NrO45kORlxFPXUt3CiGsVPhH1smuH5XoDH6sGPXLyBv+zgCKA2HWBsgCytg== dependencies: - arg "^5.0.1" + arg "^5.0.2" chokidar "^3.5.3" color-name "^1.1.4" detective "^5.2.1" @@ -16440,7 +17037,7 @@ tailwindcss@^3.0.2, tailwindcss@^3.1.2: postcss-selector-parser "^6.0.10" postcss-value-parser "^4.2.0" quick-lru "^5.1.1" - resolve "^1.22.0" + resolve "^1.22.1" tapable@^1.0.0, tapable@^1.1.3: version "1.1.3" @@ -16542,30 +17139,30 @@ terser-webpack-plugin@^4.2.3: terser "^5.3.4" webpack-sources "^1.4.3" -terser-webpack-plugin@^5.0.3, terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.2.5, terser-webpack-plugin@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz#0320dcc270ad5372c1e8993fabbd927929773e54" - integrity sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g== +terser-webpack-plugin@^5.0.3, terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.2.5, terser-webpack-plugin@^5.3.3: + version "5.3.3" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz#8033db876dd5875487213e87c627bca323e5ed90" + integrity sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ== dependencies: + "@jridgewell/trace-mapping" "^0.3.7" jest-worker "^27.4.5" schema-utils "^3.1.1" serialize-javascript "^6.0.0" - source-map "^0.6.1" terser "^5.7.2" terser@^4.1.2, terser@^4.6.3: - version "4.8.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" - integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== + version "4.8.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.1.tgz#a00e5634562de2239fd404c649051bf6fc21144f" + integrity sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw== dependencies: commander "^2.20.0" source-map "~0.6.1" source-map-support "~0.5.12" terser@^5.0.0, terser@^5.10.0, terser@^5.3.4, terser@^5.7.2: - version "5.14.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.0.tgz#eefeec9af5153f55798180ee2617f390bdd285e2" - integrity sha512-JC6qfIEkPBd9j1SMO3Pfn+A6w2kQV54tv+ABQLgZr7dA3k/DL/OBoYSWxzVpZev3J+bUHXfr55L8Mox7AaNo6g== + version "5.14.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.1.tgz#7c95eec36436cb11cf1902cc79ac564741d19eca" + integrity sha512-+ahUAE+iheqBTDxXhTisdA8hgvbEG1hHOQ9xmNjeUJSoi6DU/gMrKNcfZjHkyY6Alnuyc+ikYJaxxfHkT3+WuQ== dependencies: "@jridgewell/source-map" "^0.3.2" acorn "^8.5.0" @@ -16584,7 +17181,7 @@ test-exclude@^6.0.0: text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== thenby@^1.3.4: version "1.3.4" @@ -16636,6 +17233,13 @@ tiny-warning@^1.0.0, tiny-warning@^1.0.3: resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== +tmp@0.0.29: + version "0.0.29" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.29.tgz#f25125ff0dd9da3ccb0c2dd371ee1288bb9128c0" + integrity sha512-89PTqMWGDva+GqClOqBV9s3SMh7MA3Mq0pJUdAoHuF65YoE7O0LermaZkVfT5/Ngfo18H4eYiyG7zKOtnEbxsw== + dependencies: + os-tmpdir "~1.0.1" + tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -16644,22 +17248,22 @@ tmpl@1.0.5: to-arraybuffer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= + integrity sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA== to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= + integrity sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og== to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + integrity sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg== dependencies: kind-of "^3.0.2" @@ -16671,7 +17275,7 @@ to-readable-stream@^1.0.0: to-regex-range@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + integrity sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg== dependencies: is-number "^3.0.0" repeat-string "^1.6.1" @@ -16696,7 +17300,7 @@ to-regex@^3.0.1, to-regex@^3.0.2: toggle-selection@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" - integrity sha1-bkWxJj8gF/oKzH2J14sVuL932jI= + integrity sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ== toidentifier@1.0.1: version "1.0.1" @@ -16713,7 +17317,7 @@ topojson-client@^3.1.0: toposort@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330" - integrity sha1-riF2gXXRVZ1IvvNUILL0li8JwzA= + integrity sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg== totalist@^1.0.0: version "1.1.0" @@ -16732,7 +17336,7 @@ tough-cookie@^4.0.0: tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= + integrity sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA== dependencies: punycode "^2.1.0" @@ -16746,12 +17350,12 @@ tr46@^2.1.0: tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" - integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= + integrity sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw== trim-trailing-lines@^1.0.0: version "1.1.4" @@ -16761,7 +17365,7 @@ trim-trailing-lines@^1.0.0: trim@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" - integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0= + integrity sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ== trough@^1.0.0: version "1.0.5" @@ -16798,19 +17402,19 @@ ts-jest@^27.1.4: yargs-parser "20.x" ts-loader@^9.3.0: - version "9.3.0" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.3.0.tgz#980f4dbfb60e517179e15e10ed98e454b132159f" - integrity sha512-2kLLAdAD+FCKijvGKi9sS0OzoqxLCF3CxHpok7rVgCZ5UldRzH0TkbwG9XECKjBzHsAewntC5oDaI/FwKzEUog== + version "9.3.1" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.3.1.tgz#fe25cca56e3e71c1087fe48dc67f4df8c59b22d4" + integrity sha512-OkyShkcZTsTwyS3Kt7a4rsT/t2qvEVQuKCTg4LJmpj9fhFR7ukGdZwV6Qq3tRUkqcXtfGpPR7+hFKHCG/0d3Lw== dependencies: chalk "^4.1.0" enhanced-resolve "^5.0.0" micromatch "^4.0.0" semver "^7.3.4" -ts-node@^10.8.1: - version "10.8.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.8.1.tgz#ea2bd3459011b52699d7e88daa55a45a1af4f066" - integrity sha512-Wwsnao4DQoJsN034wePSg5nZiw4YKXf56mPIAeD6wVmiv+RytNSWqc2f3fKvcUoV+Yn2+yocD71VOfQHbmVX4g== +ts-node@^10.9.1: + version "10.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== dependencies: "@cspotcode/source-map-support" "^0.8.0" "@tsconfig/node10" "^1.0.7" @@ -16850,21 +17454,16 @@ tsconfig-paths@^3.14.1, tsconfig-paths@^3.9.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.8.1: +tslib@^1.0.0, tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0: +tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0, tslib@~2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslib@~2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -16875,7 +17474,12 @@ tsutils@^3.21.0: tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= + integrity sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw== + +tunnel@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.4.tgz#2d3785a158c174c9a16dc2c046ec5fc5f1742213" + integrity sha512-o9QYRJN5WgS8oCtqvwzzcfnzaTnDPr7HpUsQdSXscTyzXbjvl4wSHPTUKOKzEaDeQvOuyRtt3ui+ujM7x7TReQ== type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" @@ -16887,7 +17491,7 @@ type-check@^0.4.0, type-check@~0.4.0: type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== dependencies: prelude-ls "~1.1.2" @@ -16922,9 +17526,9 @@ type-fest@^0.8.0, type-fest@^0.8.1: integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== type-fest@^2.5.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.13.0.tgz#d1ecee38af29eb2e863b22299a3d68ef30d2abfb" - integrity sha512-lPfAm42MxE4/456+QyIaaVBAwgpJb6xZ8PRu09utnhPdWwcyj9vgy6Sq0Z5yNbJ21EdxB5dRU/Qg8bsyAMtlcw== + version "2.13.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.13.1.tgz#621c84220df0e01a8469002594fc005714f0cfba" + integrity sha512-hXYyrPFwETT2swFLHeoKtJrvSF/ftG/sA15/8nGaLuaDGfVAaq8DYFpu4yOyV4tzp082WqnTEoMsm3flKMI2FQ== type-is@~1.6.18: version "1.6.18" @@ -16934,10 +17538,18 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -typed-function@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/typed-function/-/typed-function-2.1.0.tgz#ded6f8a442ba8749ff3fe75bc41419c8d46ccc3f" - integrity sha512-bctQIOqx2iVbWGDGPWwIm18QScpu2XRmkC19D8rQGFsjKSgteq/o1hTZvIG/wuDq8fanpBDrLkLq+aEN/6y5XQ== +typed-function@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/typed-function/-/typed-function-3.0.0.tgz#42f75ffdd7dd63bf5dcc950847138f2bb65f1ad3" + integrity sha512-mKJKkt2xYxJUuMD7jyfgUxfn5KCsCxkEKBVjep5yYellJJ5aEDO2QUAmIGdvcZmfQnIrplkzELIaG+5b1475qg== + +typed-rest-client@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/typed-rest-client/-/typed-rest-client-1.2.0.tgz#723085d203f38d7d147271e5ed3a75488eb44a02" + integrity sha512-FrUshzZ1yxH8YwGR29PWWnfksLEILbWJydU7zfIRkyH7kAEzB62uMAl2WY6EyolWpLpVHeJGgQm45/MaruaHpw== + dependencies: + tunnel "0.0.4" + underscore "1.8.3" typedarray-to-buffer@^3.1.5: version "3.1.5" @@ -16949,22 +17561,27 @@ typedarray-to-buffer@^3.1.5: typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typescript@^4.7.3: - version "4.7.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.3.tgz#8364b502d5257b540f9de4c40be84c98e23a129d" - integrity sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA== +typescript@^4.7.4: + version "4.7.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== ua-parser-js@^0.7.30: version "0.7.31" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.31.tgz#649a656b191dffab4f21d5e053e27ca17cbff5c6" integrity sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ== +uc.micro@^1.0.1, uc.micro@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== + uglify-js@^3.1.4: - version "3.15.5" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.5.tgz#2b10f9e0bfb3f5c15a8e8404393b6361eaeb33b3" - integrity sha512-hNM5q5GbBRB5xB+PMqVRcgYe4c8jbyZ1pzZhS6jbq54/4F2gFK869ZheiE5A8/t+W5jtTNpWef/5Q9zk639FNQ== + version "3.16.1" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.16.1.tgz#0e7ec928b3d0b1e1d952bce634c384fd56377317" + integrity sha512-X5BGTIDH8U6IQ1TIRP62YC36k+ULAa1d59BxlWvPUJ1NkW5L3FwcGfEzuVvGmhJFBu0YJ5Ge25tmRISqCmLiRQ== unbox-primitive@^1.0.2: version "1.0.2" @@ -16976,6 +17593,11 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +underscore@1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" + integrity sha512-5WsVTFcH1ut/kkhAaHf4PVgI8c7++GiVcpCGxPouI6ZVjsqPnSDf8h/8HtVqc0t4fzRXwnMK70EcZeAs3PIddg== + unfetch@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" @@ -17024,18 +17646,7 @@ unified@9.2.0: trough "^1.0.0" vfile "^4.0.0" -unified@^8.4.2: - version "8.4.2" - resolved "https://registry.yarnpkg.com/unified/-/unified-8.4.2.tgz#13ad58b4a437faa2751a4a4c6a16f680c500fff1" - integrity sha512-JCrmN13jI4+h9UAyKEoGcDZV+i1E7BLFuG7OsaDvTXI5P0qhHX+vZO/kOhz9jn8HGENDKbwSeB0nVOg4gVStGA== - dependencies: - bail "^1.0.0" - extend "^3.0.0" - is-plain-obj "^2.0.0" - trough "^1.0.0" - vfile "^4.0.0" - -unified@^9.0.0: +unified@^9.0.0, unified@^9.2.2: version "9.2.2" resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.2.tgz#67649a1abfc3ab85d2969502902775eb03146975" integrity sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ== @@ -17134,7 +17745,7 @@ unist-util-visit-parents@^3.0.0: "@types/unist" "^2.0.0" unist-util-is "^4.0.0" -unist-util-visit@2.0.3, unist-util-visit@^2.0.0, unist-util-visit@^2.0.1, unist-util-visit@^2.0.3: +unist-util-visit@2.0.3, unist-util-visit@^2.0.0, unist-util-visit@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.3.tgz#c3703893146df47203bb8a9795af47d7b971208c" integrity sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q== @@ -17156,17 +17767,17 @@ universalify@^2.0.0: unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== unquote@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" - integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= + integrity sha512-vRCqFv6UhXpWxZPyGDh/F3ZpNv8/qo7w6iufLpQg9aKnQ71qM4B5KiI7Mia9COcjEhrO9LueHpMYjYzsWH3OIg== unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + integrity sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ== dependencies: has-value "^0.3.1" isobject "^3.0.0" @@ -17174,7 +17785,7 @@ unset-value@^1.0.0: untildify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/untildify/-/untildify-2.1.0.tgz#17eb2807987f76952e9c0485fc311d06a826a2e0" - integrity sha1-F+soB5h/dpUunASF/DEdBqgmouA= + integrity sha512-sJjbDp2GodvkB0FZZcn7k6afVisqX5BZD7Yq3xp4nN2O15BBK0cLm3Vwn2vQaF7UDS0UUsrQMkkplmDI5fskig== dependencies: os-homedir "^1.0.0" @@ -17183,6 +17794,14 @@ upath@^1.1.1, upath@^1.2.0: resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== +update-browserslist-db@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.3.tgz#6c47cb996f34afb363e924748e2f6e4d983c6fc1" + integrity sha512-ufSazemeh9Gty0qiWtoRpJ9F5Q5W3xdIPm1UZQqYQv/q0Nyb9EMHUB2lu+O9x1re9WsorpMAUu4Y6Lxcs5n+XQ== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + update-notifier@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-5.1.0.tgz#4ab0d7c7f36a231dd7316cf7729313f0214d9ad9" @@ -17213,7 +17832,12 @@ uri-js@^4.2.2: urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== + +url-join@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/url-join/-/url-join-1.1.0.tgz#741c6c2f4596c4830d6718460920d0c92202dc78" + integrity sha512-zz1wZk4Lb5PTVwZ3HWDmm8XnlPvmOof6/fjdDPA5yBrUcbtV64U6bV832Zf1BtU2WkBBWaUT46wCs+l0HP5nhg== url-loader@^4.1.1: version "4.1.1" @@ -17227,14 +17851,14 @@ url-loader@^4.1.1: url-parse-lax@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + integrity sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ== dependencies: prepend-http "^2.0.0" url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + integrity sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ== dependencies: punycode "1.3.2" querystring "0.2.0" @@ -17271,7 +17895,7 @@ use@^3.1.0: util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== util.promisify@1.0.0: version "1.0.0" @@ -17294,7 +17918,7 @@ util.promisify@~1.0.0: util@0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= + integrity sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ== dependencies: inherits "2.0.1" @@ -17308,7 +17932,7 @@ util@^0.11.0: utila@~0.4: version "0.4.0" resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" - integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= + integrity sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA== utility-types@^3.10.0: version "3.10.0" @@ -17318,14 +17942,14 @@ utility-types@^3.10.0: utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== uuid-browser@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/uuid-browser/-/uuid-browser-3.1.0.tgz#0f05a40aef74f9e5951e20efbf44b11871e56410" - integrity sha1-DwWkCu90+eWVHiDvv0SxGHHlZBA= + integrity sha512-dsNgbLaTrd6l3MMxTtouOCFw4CBFc/3a+GgYA2YyrJvyQ1u6q4pcu3ktLoUZ/VN/Aw9WsauazbgsgdfVWgAKQg== -uuid@^3.3.2, uuid@^3.3.3: +uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -17355,11 +17979,11 @@ v8-to-istanbul@^8.1.0: source-map "^0.7.3" v8-to-istanbul@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz#be0dae58719fc53cb97e5c7ac1d7e6d4f5b19511" - integrity sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw== + version "9.0.1" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" + integrity sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w== dependencies: - "@jridgewell/trace-mapping" "^0.3.7" + "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" @@ -17379,7 +18003,7 @@ value-equal@^1.0.1: vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== vega-canvas@^1.2.5, vega-canvas@^1.2.6: version "1.2.6" @@ -17404,15 +18028,15 @@ vega-dataflow@^5.7.3, vega-dataflow@^5.7.4, vega-dataflow@~5.7.4: vega-loader "^4.3.2" vega-util "^1.16.1" -vega-embed@^6.20.6, vega-embed@^6.5.1: - version "6.20.8" - resolved "https://registry.yarnpkg.com/vega-embed/-/vega-embed-6.20.8.tgz#7fdd3ec1f39c9bf8b5fd610011d1622fecd7f96a" - integrity sha512-UgUYJ9etuACULPwwy45Uw4Gz0sC4npxIn8yIW6dZsAu7EXMwEmeki+aA/9I9BVzD3EDD/TptG+ndlUTF2RW/Eg== +vega-embed@^6.21.0, vega-embed@^6.5.1: + version "6.21.0" + resolved "https://registry.yarnpkg.com/vega-embed/-/vega-embed-6.21.0.tgz#a6f7d4965c653e40620bfd0a51fb419321cff02c" + integrity sha512-Tzo9VAfgNRb6XpxSFd7uphSeK2w5OxDY2wDtmpsQ+rQlPSEEI9TE6Jsb2nHRLD5J4FrmXKLrTcORqidsNQSXEg== dependencies: - fast-json-patch "^3.1.0" + fast-json-patch "^3.1.1" json-stringify-pretty-compact "^3.0.0" - semver "^7.3.5" - tslib "^2.3.1" + semver "^7.3.7" + tslib "^2.4.0" vega-interpreter "^1.0.4" vega-schema-url-parser "^2.2.0" vega-themes "^2.10.0" @@ -17517,10 +18141,10 @@ vega-label@~1.2.0: vega-scenegraph "^4.9.2" vega-util "^1.15.2" -vega-lite@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/vega-lite/-/vega-lite-5.2.0.tgz#bc3c5c70a38d9de8f3fb9644c7dd52f3b9f47a1b" - integrity sha512-Yxcg8MvYfxHcG6BbkaKT0oVCIMIcE19UvqIsEwBmyd/7h2nzW7oRnID81T8UrY7hpDrIr6wa2JADOT2dhGNErw== +vega-lite@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/vega-lite/-/vega-lite-5.3.0.tgz#b9b9ecd80e869e823e6848c67d0a8ad94954bdee" + integrity sha512-6giodZ/bJnWyLq6Gj4OyiDt7EndoGyC9f5xDQjo82yPpUiO4MuG9iiPMqR1SPKmG9/qPBf+klWQR0v/7Mgju0Q== dependencies: "@types/clone" "~2.1.1" array-flat-polyfill "^1.0.1" @@ -17528,11 +18152,11 @@ vega-lite@^5.2.0: fast-deep-equal "~3.1.3" fast-json-stable-stringify "~2.1.0" json-stringify-pretty-compact "~3.0.0" - tslib "~2.3.1" + tslib "~2.4.0" vega-event-selector "~3.0.0" vega-expression "~5.0.0" vega-util "~1.17.0" - yargs "~17.2.1" + yargs "~17.5.1" vega-loader@^4.3.2, vega-loader@^4.4.0, vega-loader@~4.5.0: version "4.5.0" @@ -17776,6 +18400,76 @@ vm-browserify@^1.0.1: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== +vsce-yarn-patch@^1.66.2: + version "1.66.2" + resolved "https://registry.yarnpkg.com/vsce-yarn-patch/-/vsce-yarn-patch-1.66.2.tgz#b217a9d73ee715ad41ec44393a5d78ed0955ab44" + integrity sha512-IJjBF/WQWQvEIikI93qDEhiugjVFDgibqsBa2roawp5abeovPZ9/bzLt0b9AylBtP60q2qSMWsGtf1hZBAs7fw== + dependencies: + azure-devops-node-api "^7.2.0" + chalk "^2.4.2" + cheerio "^1.0.0-rc.1" + commander "^2.8.1" + denodeify "^1.2.1" + didyoumean "^1.2.1" + glob "^7.0.6" + lodash "^4.17.10" + markdown-it "^8.3.1" + mime "^1.3.4" + minimatch "^3.0.3" + osenv "^0.1.3" + parse-semver "^1.1.1" + read "^1.0.7" + semver "^5.1.0" + tmp "0.0.29" + typed-rest-client "1.2.0" + url-join "^1.1.0" + yauzl "^2.3.1" + yazl "^2.2.2" + +vscode-jsonrpc@8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz#f239ed2cd6004021b6550af9fd9d3e47eee3cac9" + integrity sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ== + +vscode-languageclient@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-8.0.2.tgz#f1f23ce8c8484aa11e4b7dfb24437d3e59bb61c6" + integrity sha512-lHlthJtphG9gibGb/y72CKqQUxwPsMXijJVpHEC2bvbFqxmkj9LwQ3aGU9dwjBLqsX1S4KjShYppLvg1UJDF/Q== + dependencies: + minimatch "^3.0.4" + semver "^7.3.5" + vscode-languageserver-protocol "3.17.2" + +vscode-languageserver-protocol@3.17.2: + version "3.17.2" + resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.2.tgz#beaa46aea06ed061576586c5e11368a9afc1d378" + integrity sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg== + dependencies: + vscode-jsonrpc "8.0.2" + vscode-languageserver-types "3.17.2" + +vscode-languageserver-textdocument@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.5.tgz#838769940ece626176ec5d5a2aa2d0aa69f5095c" + integrity sha512-1ah7zyQjKBudnMiHbZmxz5bYNM9KKZYz+5VQLj+yr8l+9w3g+WAhCkUkWbhMEdC5u0ub4Ndiye/fDyS8ghIKQg== + +vscode-languageserver-types@3.17.2: + version "3.17.2" + resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz#b2c2e7de405ad3d73a883e91989b850170ffc4f2" + integrity sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA== + +vscode-languageserver@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-8.0.2.tgz#cfe2f0996d9dfd40d3854e786b2821604dfec06d" + integrity sha512-bpEt2ggPxKzsAOZlXmCJ50bV7VrxwCS5BI4+egUmure/oI/t4OlFzi/YNtVvY24A2UDOZAgwFGgnZPwqSJubkA== + dependencies: + vscode-languageserver-protocol "3.17.2" + +vscode-uri@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.3.tgz#a95c1ce2e6f41b7549f86279d19f47951e4f4d84" + integrity sha512-EcswR2S8bpR7fD0YPeS7r2xXExrScVMxg4MedACaWHEtx9ftCF/qHG1xGkolzTPcEmjTavCQgbVzHUIdTMzFGA== + w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" @@ -17826,10 +18520,10 @@ watchpack@^1.7.4: chokidar "^3.4.1" watchpack-chokidar2 "^2.0.1" -watchpack@^2.2.0, watchpack@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.1.tgz#4200d9447b401156eeca7767ee610f8809bc9d25" - integrity sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA== +watchpack@^2.2.0, watchpack@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" @@ -17841,7 +18535,7 @@ wbuf@^1.1.0, wbuf@^1.7.3: dependencies: minimalistic-assert "^1.0.0" -web-namespaces@^1.0.0, web-namespaces@^1.1.2: +web-namespaces@^1.0.0: version "1.1.4" resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.4.tgz#bc98a3de60dadd7faefc403d1076d529f5e030ec" integrity sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw== @@ -17854,7 +18548,7 @@ web-vitals@^2.1.4: webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== webidl-conversions@^4.0.2: version "4.0.2" @@ -17938,10 +18632,10 @@ webpack-dev-middleware@^5.3.1: range-parser "^1.2.1" schema-utils "^4.0.0" -webpack-dev-server@^4.6.0, webpack-dev-server@^4.9.0, webpack-dev-server@^4.9.2: - version "4.9.2" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.9.2.tgz#c188db28c7bff12f87deda2a5595679ebbc3c9bc" - integrity sha512-H95Ns95dP24ZsEzO6G9iT+PNw4Q7ltll1GfJHV4fKphuHWgKFzGHWi4alTlTnpk1SPPk41X+l2RB7rLfIhnB9Q== +webpack-dev-server@^4.6.0, webpack-dev-server@^4.9.3: + version "4.9.3" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.9.3.tgz#2360a5d6d532acb5410a668417ad549ee3b8a3c9" + integrity sha512-3qp/eoboZG5/6QgiZ3llN8TUzkSpYg1Ko9khWX1h40MIEUNS2mDoIa8aXsPfskER+GbTvs/IJZ1QTBBhhuetSw== dependencies: "@types/bonjour" "^3.5.9" "@types/connect-history-api-fallback" "^1.3.5" @@ -17955,7 +18649,7 @@ webpack-dev-server@^4.6.0, webpack-dev-server@^4.9.0, webpack-dev-server@^4.9.2: chokidar "^3.5.3" colorette "^2.0.10" compression "^1.7.4" - connect-history-api-fallback "^1.6.0" + connect-history-api-fallback "^2.0.0" default-gateway "^6.0.3" express "^4.17.3" graceful-fs "^4.2.6" @@ -18028,7 +18722,7 @@ webpack-sources@^2.2.0: source-list-map "^2.0.1" source-map "^0.6.1" -webpack-sources@^3.2.3: +webpack-sources@^3.2.2, webpack-sources@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== @@ -18074,21 +18768,21 @@ webpack@4: watchpack "^1.7.4" webpack-sources "^1.4.1" -"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.64.4, webpack@^5.72.1, webpack@^5.73.0, webpack@^5.9.0: - version "5.73.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.73.0.tgz#bbd17738f8a53ee5760ea2f59dce7f3431d35d38" - integrity sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA== +"webpack@>=4.43.0 <6.0.0", webpack@^5, webpack@^5.64.4, webpack@^5.73.0, webpack@^5.74.0, webpack@^5.9.0: + version "5.74.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.74.0.tgz#02a5dac19a17e0bb47093f2be67c695102a55980" + integrity sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^0.0.51" "@webassemblyjs/ast" "1.11.1" "@webassemblyjs/wasm-edit" "1.11.1" "@webassemblyjs/wasm-parser" "1.11.1" - acorn "^8.4.1" + acorn "^8.7.1" acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.9.3" + enhanced-resolve "^5.10.0" es-module-lexer "^0.9.0" eslint-scope "5.1.1" events "^3.2.0" @@ -18101,7 +18795,7 @@ webpack@4: schema-utils "^3.1.0" tapable "^2.1.1" terser-webpack-plugin "^5.1.3" - watchpack "^2.3.1" + watchpack "^2.4.0" webpack-sources "^3.2.3" webpackbar@^5.0.2: @@ -18148,7 +18842,7 @@ whatwg-mimetype@^2.3.0: whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== dependencies: tr46 "~0.0.3" webidl-conversions "^3.0.0" @@ -18185,7 +18879,7 @@ which-boxed-primitive@^1.0.2: which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== which@^1.2.9, which@^1.3.1: version "1.3.1" @@ -18235,7 +18929,7 @@ word-wrap@^1.2.3, word-wrap@~1.2.3: wordwrap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== workbox-background-sync@6.5.3: version "6.5.3" @@ -18450,7 +19144,7 @@ wrap-ansi@^8.0.1: wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== write-file-atomic@^3.0.0: version "3.0.3" @@ -18468,14 +19162,14 @@ ws@^7.3.1, ws@^7.4.6: integrity sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw== ws@^8.2.3, ws@^8.4.2: - version "8.7.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.7.0.tgz#eaf9d874b433aa00c0e0d8752532444875db3957" - integrity sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg== + version "8.8.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.0.tgz#8e71c75e2f6348dbf8d78005107297056cb77769" + integrity sha512-JDAgSYQ1ksuwqfChJusw1LSJ8BizJ2e/vVu5Lxjq3YvNJNlROv1ui4i+c/kUUrPheBvQl4c5UbERhTwKa6QBJQ== x-default-browser@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/x-default-browser/-/x-default-browser-0.4.0.tgz#70cf0da85da7c0ab5cb0f15a897f2322a6bdd481" - integrity sha1-cM8NqF2nwKtcsPFaiX8jIqa91IE= + integrity sha512-7LKo7RtWfoFN/rHx1UELv/2zHGMx8MkZKDq1xENmOCTkfIqZJ0zZ26NEJX8czhnPXVcqS0ARjjfJB+eJ0/5Cvw== optionalDependencies: default-browser-id "^1.0.4" @@ -18531,6 +19225,11 @@ yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yaml@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.1.1.tgz#1e06fb4ca46e60d9da07e4f786ea370ed3c3cfec" + integrity sha512-o96x3OPo8GjWeSLF+wOAbrPfhFOGY0W00GNaxCDv+9hkcDJEnev1yh8S7pgHF0ik6zc8sQLuL8hjHjJULZp8bw== + yargs-parser@20.x, yargs-parser@^20.2.2, yargs-parser@^20.2.9: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" @@ -18579,7 +19278,7 @@ yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.0.0: +yargs@^17.0.0, yargs@~17.5.1: version "17.5.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== @@ -18592,18 +19291,20 @@ yargs@^17.0.0: y18n "^5.0.5" yargs-parser "^21.0.0" -yargs@~17.2.1: - version "17.2.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.2.1.tgz#e2c95b9796a0e1f7f3bf4427863b42e0418191ea" - integrity sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q== +yauzl@^2.3.1: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" + +yazl@^2.2.2: + version "2.5.1" + resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.5.1.tgz#a3d65d3dd659a5b0937850e8609f22fffa2b5c35" + integrity sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw== + dependencies: + buffer-crc32 "~0.2.3" yn@3.1.1: version "3.1.1"