From f7f7a57b8d6057d3db94bc78ddf8ae74c7a32476 Mon Sep 17 00:00:00 2001 From: The Alpha Date: Mon, 8 Jul 2024 11:57:28 +0800 Subject: [PATCH] =?UTF-8?q?=D8=A7=D9=84=D8=A5=D9=8A=D8=AF=D8=A7=D8=B9=20?= =?UTF-8?q?=D8=A7=D9=84=D8=A3=D9=88=D9=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.json | 37 + .gitattributes | 6 + .github/workflows/docs.yml | 49 + .github/workflows/release.yml | 37 + .github/workflows/test.yml | 37 + .gitignore | 134 +++ .prettierrc.json | 8 + .releaserc.json | 17 + .vscode/extensions.json | 16 + .vscode/settings.json | 92 ++ CHANGELOG.md | 0 LICENSE | 9 + README.md | 3 + cSpell.json | 7 + package-lock.json | 2092 +++++++++++++++++++++++++++++++++ package.json | 55 + src/exports.js | 1 + src/line/exports.js | 4 + src/line/func/create.js | 105 ++ src/line/func/point.js | 32 + src/line/func/time.js | 116 ++ src/line/imports.js | 1 + src/line/options.js | 26 + src/point/exports.js | 3 + src/point/options.js | 31 + tests/line/create.test.js | 234 ++++ tests/line/point.test.js | 171 +++ tests/line/time.test.js | 186 +++ workspace.json | 12 + 29 files changed, 3521 insertions(+) create mode 100644 .eslintrc.json create mode 100644 .gitattributes create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml create mode 100644 .gitignore create mode 100644 .prettierrc.json create mode 100644 .releaserc.json create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 cSpell.json create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 src/exports.js create mode 100644 src/line/exports.js create mode 100644 src/line/func/create.js create mode 100644 src/line/func/point.js create mode 100644 src/line/func/time.js create mode 100644 src/line/imports.js create mode 100644 src/line/options.js create mode 100644 src/point/exports.js create mode 100644 src/point/options.js create mode 100644 tests/line/create.test.js create mode 100644 tests/line/point.test.js create mode 100644 tests/line/time.test.js create mode 100644 workspace.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..3f01500 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,37 @@ +{ + "root": true, + "env": { + "es6": true, + "node": false, + "browser": false + }, + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "extends": ["eslint:recommended", "plugin:jsdoc/recommended"], + "plugins": ["jsdoc"], + "rules": { + "no-console": "error", + "jsdoc/no-defaults": "off", + "jsdoc/require-param-description": "off", + "jsdoc/require-property-description": "off", + "jsdoc/require-returns-description": "off" + }, + "overrides": [ + { + "files": ["{test,tests}/**/*"], + "env": { + "mocha": true, + "es6": true, + "node": false, + "browser": false + }, + "extends": ["eslint:recommended", "plugin:mocha/recommended"], + "plugins": ["mocha"], + "rules": { + "mocha/max-top-level-suites": "off" + } + } + ] +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..cab9d3a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# الكشف التلقائي عن الملفات النصية وإجراء تسوية LF +* text=auto eol=lf + +# تشير إلى جميع الملفات الثنائية حقاً التي ينبغي تعديلها +*.png binary +*.jpg binary diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..503ac27 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,49 @@ +name: توليد الوثائق + +on: + release: + types: [released, published] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: 'pages' + cancel-in-progress: false + +jobs: + deploy: + environment: + name: صفحات-جيتهاب + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: الفحص + uses: actions/checkout@v4 + + - name: إعداد Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + registry-url: https://registry.npmjs.org + + - name: تثبيت التبعيات + run: npm ci + + - name: توليد الوثائق + run: npm run docs + + - name: إعداد الصفحات + uses: actions/configure-pages@v4 + + - name: رفع الملف + uses: actions/upload-pages-artifact@v3 + with: + path: './docs' + + - name: النشر على صفحات جيتهاب + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..aba92d6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: إصدار + +on: + workflow_dispatch: + +jobs: + release: + permissions: + contents: write + issues: write + pull-requests: write + + name: إصدار + runs-on: ubuntu-latest + steps: + - name: الفحص + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: إعداد Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + registry-url: https://registry.npmjs.org + + - name: تثبيت التبعيات + run: npm ci && npm i --no-save @semantic-release/changelog @semantic-release/git + + - name: توليد الأنواع + run: npm run types + + - name: الإصدار + run: npx semantic-release + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..5a59918 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: إختبار +on: + push: + pull_request: + +concurrency: + # المجموعة بناءً على اسم العملية والطلب المسحوب إذا وُجد، إذا لم يوجد طلب مسحوب، دعها تعمل حتى تعمل علامات النقل + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + test: + name: إختبار + runs-on: ubuntu-latest + steps: + - name: الفحص + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: إعداد Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + registry-url: https://registry.npmjs.org + + - name: تثبيت التبعيات + run: npm ci + + - name: فحص الكود + run: npm run lint + + - name: تنسيق الكود + run: npm run format + + - name: إختبار الكود + run: npm test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3de40e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,134 @@ +# الناتج المولد +types/ +docs/ + +# السجلات +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# تقارير التشخيص (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# بيانات التشغيل +pids +*.pid +*.seed +*.pid.lock + +# الدليل للمكتبات المؤشرة التي تولدها jscoverage/JSCover +lib-cov + +# دليل التغطية المستخدم من قبل أدوات مثل istanbul +coverage +*.lcov + +# تغطية اختبار nyc +.nyc_output + +# تخزين مؤقت لـ Grunt (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# دليل تبعيات Bower (https://bower.io/) +bower_components + +# تكوين node-waf +.lock-wscript + +# الإضافات الثنائية المترجمة (https://nodejs.org/api/addons.html) +build/Release + +# دلائل التبعيات +node_modules/ +jspm_packages/ + +# دليل تبعيات Snowpack (https://snowpack.dev/) +web_modules/ + +# ذاكرة التخزين المؤقت لـ TypeScript +*.tsbuildinfo + +# دليل ذاكرة التخزين المؤقت لـ npm الاختياري +.npm + +# ذاكرة التخزين المؤقت لـ eslint الاختيارية +.eslintcache + +# ذاكرة التخزين المؤقت لـ stylelint الاختيارية +.stylelintcache + +# ذاكرة التخزين المؤقت لـ Microbundle +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# سجل REPL الاختياري +.node_repl_history + +# ناتج 'npm pack' +*.tgz + +# ملف النزاهة لـ Yarn +.yarn-integrity + +# ملفات متغيرات البيئة dotenv +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# ذاكرة التخزين المؤقت لـ parcel-bundler (https://parceljs.org/) +.cache +.parcel-cache + +# ناتج بناء Next.js +.next +out + +# ناتج بناء/توليد Nuxt.js +.nuxt +dist + +# ملفات Gatsby +.cache/ +# قم بالتعليق على السطر الخاص بالعامة إذا كان مشروعك يستخدم Gatsby وليس Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# ناتج بناء vuepress +.vuepress/dist + +# دليل مؤقت وذاكرة التخزين المؤقت لـ vuepress v2.x +.temp +.cache + +# ذاكرة التخزين المؤقت والملفات المولدة لـ Docusaurus +.docusaurus + +# دلائل Serverless +.serverless/ + +# ذاكرة التخزين المؤقت لـ FuseBox +.fusebox/ + +# ملفات DynamoDB المحلية +.dynamodb/ + +# ملف منفذ TernJS +.tern-port + +# يخزن إصدارات VSCode المستخدمة لاختبار إضافات VSCode +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..4dee17d --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,8 @@ +{ + "tabWidth": 2, + "semi": false, + "useTabs": false, + "singleQuote": true, + "endOfLine": "lf", + "trailingComma": "none" +} diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..cd547f2 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,17 @@ +{ + "branches": [ + "+([0-9])?(.{+([0-9]),x}).x", + "main", + "next", + { "name": "beta", "prerelease": true }, + { "name": "alpha", "prerelease": true } + ], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/changelog", + "@semantic-release/npm", + "@semantic-release/git", + "@semantic-release/github" + ] +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..0448a68 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,16 @@ +{ + "recommendations": [ + "streetsidesoftware.code-spell-checker-arabic", + "streetsidesoftware.code-spell-checker", + "usernamehw.errorlens", + "dbaeumer.vscode-eslint", + "yzhang.markdown-all-in-one", + "christian-kohler.npm-intellisense", + "christian-kohler.path-intellisense", + "idered.npm", + "esbenp.prettier-vscode", + "gruntfuggly.todo-tree", + "chakrounanas.turbo-console-log", + "redhat.vscode-yaml" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1c689cd --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,92 @@ +{ + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSaveMode": "file", + "editor.formatOnSave": true, + "editor.trimAutoWhitespace": true, + "editor.insertSpaces": true, + "editor.tabSize": 2, + + "files.insertFinalNewline": true, + "files.eol": "\n", + + "[markdown]": { + "editor.defaultFormatter": "yzhang.markdown-all-in-one" + }, + "markdown.replaceSmartQuotes": true, + "markdown.occurrencesHighlight.enabled": true, + "markdown.extension.tableFormatter.normalizeIndentation": true, + + "javascript.suggest.jsdoc.generateReturns": true, + "javascript.suggest.completeJSDocs": true, + "javascript.suggest.autoImports": true, + "js/ts.implicitProjectConfig.checkJs": true, + + "todo-tree.highlights.enabled": true, + "todo-tree.tree.buttons.export": true, + "todo-tree.tree.showCountsInTree": true, + "todo-tree.tree.buttons.viewStyle": false, + "todo-tree.tree.buttons.groupByTag": false, + "todo-tree.tree.showCurrentScanMode": false, + "todo-tree.regex.regexCaseSensitive": false, + "todo-tree.general.showActivityBarBadge": true, + "todo-tree.tree.hideIconsWhenGroupedByTag": true, + "todo-tree.general.showIconsInsteadOfTagsInStatusBar": true, + "todo-tree.general.exportPath": "${workspace}/todo-tree-%H_%M-%d_%m_%Y.json", + "todo-tree.tree.labelFormat": "${after}", + "todo-tree.tree.tooltipFormat": "line=${line}, column=${column}", + "todo-tree.filtering.includeGlobs": ["**/*.{js,cjs,mjs,md,txt}"], + "todo-tree.filtering.excludeGlobs": [ + "**/{node_modules,dist,types,typings,build,.next,.nuxt,.vscode,.git,.idea,out,doc,docs}/**", + "CHANGELOG.md", + "{LICENSE,LICENSE.*}" + ], + "todo-tree.general.tags": [ + "LOCK", + "BUG", + "FIX", + "TODO", + "BOOKMARK", + "NOTE", + "///" + ], + "todo-tree.general.tagGroups": { + "FIX": ["FIXME", "FIXIT"] + }, + "todo-tree.highlights.defaultHighlight": { + "gutterIcon": true, + "type": "text-and-comment", + "foreground": "#ffffff", + "opacity": 0 + }, + "todo-tree.highlights.customHighlight": { + "LOCK": { + "icon": "lock", + "foreground": "#00ff88" + }, + "BUG": { + "icon": "bug", + "foreground": "#ff0000" + }, + "FIX": { + "icon": "tools", + "foreground": "#ff8800" + }, + "TODO": { + "icon": "check-circle", + "foreground": "#ffff00" + }, + "BOOKMARK": { + "icon": "bookmark" + }, + "NOTE": { + "icon": "comment", + "hideFromTree": true + }, + "///": { + "foreground": "#3d4e3c", + "hideFromTree": true + } + }, + "todo-tree.highlights.foregroundColourScheme": [], + "todo-tree.highlights.backgroundColourScheme": [] +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7d9f45b --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2024 Assayyaad | الصياد + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..4304eb2 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# JavaScript (JS) + +# المستقيم diff --git a/cSpell.json b/cSpell.json new file mode 100644 index 0000000..a9a9202 --- /dev/null +++ b/cSpell.json @@ -0,0 +1,7 @@ +{ + "caseSensitive": true, + "useGitignore": true, + "language": "ar,en", + "files": ["./{src,test,tests}/**/*", "**/*.md"], + "words": [] +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..bbb5377 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2092 @@ +{ + "name": "@anthima/line", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@anthima/line", + "version": "0.1.0", + "license": "MIT", + "devDependencies": { + "@disqada/workspace": "^1.5.1", + "@types/node": "*", + "eslint": "*", + "eslint-plugin-jsdoc": "*", + "eslint-plugin-mocha": "^10.3.0", + "mocha": "^10.3.0", + "prettier": "*" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@disqada/workspace": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@disqada/workspace/-/workspace-1.5.1.tgz", + "integrity": "sha512-Oo6gkomsYcuvKDj28yDtcdRtwOfIfkB/jAsPDgD4gkzSbNX8wP3lPBqiIXjuoTOv9wtEGQ/Ea8NzVzvIQ4ptYA==", + "dev": true, + "dependencies": { + "commander": "^12.0.0" + }, + "bin": { + "workspace": "bin/workspace.js" + }, + "peerDependencies": { + "@mxssfd/typedoc-theme": "1.1.x", + "typedoc": "0.25.x", + "typedoc-plugin-extras": "3.0.x", + "typedoc-plugin-missing-exports": "2.1.x", + "typescript": "5.2.x" + } + }, + "node_modules/@es-joy/jsdoccomment": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz", + "integrity": "sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==", + "dev": true, + "dependencies": { + "comment-parser": "1.4.1", + "esquery": "^1.5.0", + "jsdoc-type-pratt-parser": "~4.0.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/@eslint/js": { + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", + "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@mxssfd/typedoc-theme": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@mxssfd/typedoc-theme/-/typedoc-theme-1.1.3.tgz", + "integrity": "sha512-/yP5rqhvibMpzXpmw0YLLRCpoj3uVWWlwyJseZXzGxTfiA6/fd1uubUqNoQAi2U19atMDonq8mQc+hlVctrX4g==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "typedoc": "^0.25.1" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@types/node": { + "version": "20.11.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz", + "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true, + "peer": true + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/are-docs-informative": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/commander": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz", + "integrity": "sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/comment-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", + "dev": true, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", + "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "^8.47.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-jsdoc": { + "version": "46.9.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.9.1.tgz", + "integrity": "sha512-11Ox5LCl2wY7gGkp9UOyew70o9qvii1daAH+h/MFobRVRNcy7sVlH+jm0HQdgcvcru6285GvpjpUyoa051j03Q==", + "dev": true, + "dependencies": { + "@es-joy/jsdoccomment": "~0.41.0", + "are-docs-informative": "^0.0.2", + "comment-parser": "1.4.1", + "debug": "^4.3.4", + "escape-string-regexp": "^4.0.0", + "esquery": "^1.5.0", + "is-builtin-module": "^3.2.1", + "semver": "^7.5.4", + "spdx-expression-parse": "^4.0.0" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/eslint-plugin-mocha": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.3.0.tgz", + "integrity": "sha512-IWzbg2K6B1Q7h37Ih4zMyW+nhmw1JvUlHlbCUUUu6PfOOAUGCB0gxmvv7/U+TQQ6e8yHUv+q7KMdIIum4bx+PA==", + "dev": true, + "dependencies": { + "eslint-utils": "^3.0.0", + "rambda": "^7.4.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsdoc-type-pratt-parser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", + "integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==", + "dev": true, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/jsonc-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", + "dev": true, + "peer": true + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true, + "peer": true + }, + "node_modules/marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "dev": true, + "peer": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.3.0.tgz", + "integrity": "sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==", + "dev": true, + "dependencies": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "8.1.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/rambda": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.5.0.tgz", + "integrity": "sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA==", + "dev": true + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/shiki": { + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", + "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "dev": true + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typedoc": { + "version": "0.25.8", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.8.tgz", + "integrity": "sha512-mh8oLW66nwmeB9uTa0Bdcjfis+48bAjSH3uqdzSuSawfduROQLlXw//WSNZLYDdhmMVB7YcYZicq6e8T0d271A==", + "dev": true, + "peer": true, + "dependencies": { + "lunr": "^2.3.9", + "marked": "^4.3.0", + "minimatch": "^9.0.3", + "shiki": "^0.14.7" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 16" + }, + "peerDependencies": { + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x" + } + }, + "node_modules/typedoc-plugin-extras": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/typedoc-plugin-extras/-/typedoc-plugin-extras-3.0.0.tgz", + "integrity": "sha512-eiAe3qtm2WbV5owdncpt0zHZPqsNZH2mzNGILPd4zqrvEZie3Et9es4cpGZ+8lHO/SI0pVKwsAj7IuMxPNOdYg==", + "dev": true, + "peer": true, + "peerDependencies": { + "typedoc": "0.25.x" + } + }, + "node_modules/typedoc-plugin-missing-exports": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-2.1.0.tgz", + "integrity": "sha512-+1DhqZCEu7Vu5APnrqpPwl31D+hXpt1fV0Le9ycCRL1eLVdatdl6KVt4SEVwPxnEpKwgOn2dNX6I9+0F1aO2aA==", + "dev": true, + "peer": true, + "peerDependencies": { + "typedoc": "0.24.x || 0.25.x" + } + }, + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typescript": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true, + "peer": true + }, + "node_modules/vscode-textmate": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", + "dev": true, + "peer": true + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "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" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..9bf8384 --- /dev/null +++ b/package.json @@ -0,0 +1,55 @@ +{ + "displayName": "Line", + "name": "@anthima/line", + "version": "0.1.0", + "description": "", + "scripts": { + "types": "workspace ./workspace.json -t", + "docs": "workspace ./workspace.json -t -d", + "lint": "eslint . --fix --ignore-path .gitignore", + "format": "prettier . --write --ignore-path .gitignore", + "test": "mocha ./tests/**/*.test.js" + }, + "type": "module", + "main": "./src/exports.js", + "types": "./types/exports.d.ts", + "exports": { + ".": { + "import": "./src/exports.js", + "default": "./src/exports.js", + "types": "./types/exports.d.ts" + } + }, + "files": [ + "src/", + "types/", + "LICENSE", + "*.md" + ], + "homepage": "https://Game-Anthima.github.io/Line", + "repository": { + "type": "git", + "url": "https://github.com/Game-Anthima/Line.git" + }, + "bugs": { + "url": "https://github.com/Game-Anthima/Line/issues" + }, + "keywords": [ + "line" + ], + "author": { + "name": "Assayyaad", + "email": "hi@thealpha.pro", + "url": "https://links.thealpha.pro" + }, + "license": "MIT", + "devDependencies": { + "@disqada/workspace": "^1.5.1", + "@types/node": "*", + "prettier": "*", + "eslint": "*", + "eslint-plugin-jsdoc": "*", + "eslint-plugin-mocha": "^10.3.0", + "mocha": "^10.3.0" + } +} diff --git a/src/exports.js b/src/exports.js new file mode 100644 index 0000000..cba2bba --- /dev/null +++ b/src/exports.js @@ -0,0 +1 @@ +export * as Line from './line/exports.js' diff --git a/src/line/exports.js b/src/line/exports.js new file mode 100644 index 0000000..63d4620 --- /dev/null +++ b/src/line/exports.js @@ -0,0 +1,4 @@ +export * from './options.js' +export * as create from './func/create.js' +export * as point from './func/point.js' +export * as time from './func/time.js' diff --git a/src/line/func/create.js b/src/line/func/create.js new file mode 100644 index 0000000..fffe5c4 --- /dev/null +++ b/src/line/func/create.js @@ -0,0 +1,105 @@ +/** @typedef {import('../options.js').Line} Line */ +/** @typedef {import('../options.js').LineOptions} LineOptions */ + +/** + * @param {LineOptions} options + * @returns {Line} + */ +export function one({ dis, end, neg = false, count, spacing }) { + // Validation + if (dis !== undefined && dis < 0) throw new Error('dis must be positive') + if (spacing !== undefined && spacing < 0) + throw new Error('spacing must be positive') + if (count !== undefined && count < 2) + throw new Error('count must be equal or greater than 2') + + // Initialize line object + const l = { neg } + + // Calculate properties based on provided options + if (spacing && count && !dis) { + l.dis = spacing * (count - 1) + l.count = count + } else if (dis && count && !spacing) { + l.dis = dis + l.count = count + } else if (dis && spacing && !count) { + l.dis = dis + l.count = dis / spacing + 1 + } else if (end !== undefined) { + l.dis = Math.abs(end) + l.count = 2 + l.neg = end < 0 + } else if (dis) { + l.dis = dis + l.count = 2 + } else throw new Error('Case not implemented') + + // Define computed properties + Object.defineProperties(l, { + spacing: { + get() { + return this.dis / (this.count - 1) + } + }, + end: { + get() { + return this.dis * (this.neg ? -1 : 1) + } + }, + min: { + get() { + return this.neg ? -this.dis : 0 + } + }, + max: { + get() { + return this.neg ? 0 : this.dis + } + }, + points: { + get() { + return Array.from( + { length: this.count }, + (_, i) => this.spacing * i * (this.neg ? -1 : 1) + ) + } + } + }) + + // @ts-ignore + return l +} + +/** + * Calculates the positions of all points on a line, optionally adjusting for an spacing. + * @param {number} count The count of points. + * @param {number} [spacing] The spacing to apply to each point's position. @defaultValue 1 + * @param {'zero' | 'negative' | 'positive'} [sort='zero'] The alignment of the points. @defaultValue 'zero' + * @returns {number[]} An array of positions for each point on the line. + */ +export function points(count, spacing = 1, sort = 'zero') { + // Initialize an array to hold the calculated positions for each point. + /** @type {number[]} */ + const points = new Array(count) + // Determine if the total number of points is even. + const isEven = count % 2 === 0 + if (!isEven) points[0] = 0 + + let j = isEven ? 0 : 1 + const halfSpacing = isEven ? spacing * 0.5 : 0 + // Iterate over each point to calculate its position. + for (let i = j; i < count; i += 2) { + // Calculate the position of the current point and assign it to the array. + points[i] = spacing * j + halfSpacing + points[i + 1] = spacing * -j - halfSpacing + + j++ + } + + // Return the array containing all calculated positions. + if (sort === 'zero') return points + if (sort === 'negative') return points.sort((a, b) => a - b) + if (sort === 'positive') return points.sort((a, b) => b - a) + throw new Error('Invalid alignment option') +} diff --git a/src/line/func/point.js b/src/line/func/point.js new file mode 100644 index 0000000..9c7744c --- /dev/null +++ b/src/line/func/point.js @@ -0,0 +1,32 @@ +/** @typedef {import('../options.js').Line} Line */ + +/** + * Checks if a given value is inside the range defined by a Line object. + * @param {Line} line - The Line object defining the range. + * @param {number} value - The value to check. + * @returns {boolean} - Returns true if the value is inside the range, false otherwise. + */ +export function inside({ min, max }, value) { + // Check if the value is greater than or equal to min and less than or equal to max, then return true; otherwise, return false. + return value >= min && value <= max +} + +/** + * Moves the current position by a specified step within the range defined by a Line object. + * @param {Line} line - The Line object defining the range. + * @param {number} current - The current position. + * @param {number} step - The step to move by. + * @param {boolean} [inverse=false] - Optional parameter to indicate if the movement should be in the opposite direction. @defaultValue false + * @returns {number} - Returns the new position after moving. + */ +export function move({ min, max, neg }, current, step, inverse = false) { + // If the step is zero, return the current position without changing it. + if (step === 0) return current + + // Check if the inverse flag matches the neg property of the line. If they match, increase the current position by the step but do not exceed max. + // If they do not match, decrease the current position by the step but do not go below min. + // This effectively moves the position within the range, optionally in the inverse direction depending on the flags. + return inverse === neg + ? Math.min(current + step, max) // If moving forward or both inverse and neg are true, add step to current but limit to max. + : Math.max(current - step, min) // If moving backward or both inverse and neg are false, subtract step from current but limit to min. +} diff --git a/src/line/func/time.js b/src/line/func/time.js new file mode 100644 index 0000000..4db3cc3 --- /dev/null +++ b/src/line/func/time.js @@ -0,0 +1,116 @@ +/** @typedef {import('../options.js').Line} Line */ + +/** + * min is 0, max is 1, center is 0.5 + * @param {Line} line + * @param {number} point between start and end inclusive + * @returns {number} + */ +export function to({ dis, neg, end }, point) { + if (point === 0) return neg ? 1 : 0 + if (point === end) return neg ? 0 : 1 + return (point / dis) * (neg ? -1 : 1) +} + +/** + * @param {Line} line + * @param {number} point between start and end inclusive + * @returns {number} + */ +to.clamp = function (line, point) { + if (point >= line.max) return 1 + if (point <= line.min) return 0 + return to(line, point) +} + +/** + * @param {Line} line + * @param {number} point between start and end inclusive + * @returns {number} + */ +to.clamp.min = function (line, point) { + if (point <= line.min) return 0 + return to(line, point) +} + +/** + * @param {Line} line + * @param {number} point between start and end inclusive + * @returns {number} + */ +to.clamp.max = function (line, point) { + if (point >= line.max) return 1 + return to(line, point) +} + +/** + * min is 0, max is 1, center is 0.5 + * @param {Line} line + * @param {number} t between 0 and 1 inclusive + * @returns {number} + */ +export function from(line, t) { + if (t === 1) return from.max(line) + if (t === 0) return from.min(line) + + const { dis, neg } = line + if (neg) return -(dis - dis * t) + else return dis * t +} + +/** + * @param {Line} line + * @param {number} t between 0 and 1 inclusive + * @returns {number} + */ +from.clamp = function (line, t) { + if (t >= 1) return from.max(line) + if (t <= 0) return from.min(line) + return from(line, t) +} + +/** + * @param {Line} line + * @param {number} t between 0 and 1 inclusive + * @returns {number} + */ +from.clamp.max = function (line, t) { + if (t >= 1) return from.max(line) + return from(line, t) +} + +/** + * @param {Line} line + * @param {number} t between 0 and 1 inclusive + * @returns {number} + */ +from.clamp.min = function (line, t) { + if (t <= 0) return from.min(line) + return from(line, t) +} + +/** + * @param {Line} line + * @returns {number} + */ +from.center = function (line) { + return from(line, 0.5) +} + +/** + * @param {Line} line + * @returns {number} + */ +from.min = function ({ dis, neg }) { + // NOTE: faster than calling `from(line, 0)` + return neg ? -dis : 0 +} + +/** + * @param {Line} line + * @returns {number} + */ +from.max = function ({ dis, neg }) { + // NOTE: faster than calling `from(line, 1)` + return neg ? 0 : dis +} diff --git a/src/line/imports.js b/src/line/imports.js new file mode 100644 index 0000000..2ab1f50 --- /dev/null +++ b/src/line/imports.js @@ -0,0 +1 @@ +export * from '../point/exports.js' diff --git a/src/line/options.js b/src/line/options.js new file mode 100644 index 0000000..34ab997 --- /dev/null +++ b/src/line/options.js @@ -0,0 +1,26 @@ +// /** @typedef {import("./imports").Point} Point */ +/** @typedef {number} Point */ + +export {} + +/** + * @typedef {object} LineOptions + * @property {Point} [dis] + * @property {Point} [end] + * @property {Point} [spacing] + * @property {Point[]} [points] + * @property {number} [count] + * @property {boolean} [neg] + */ + +/** + * @typedef {object} Line + * @property {Point} dis + * @property {Point} spacing + * @property {number} count + * @property {boolean} neg + * @property {Readonly} end + * @property {Readonly} min + * @property {Readonly} max + * @property {Readonly} points + */ diff --git a/src/point/exports.js b/src/point/exports.js new file mode 100644 index 0000000..30dd895 --- /dev/null +++ b/src/point/exports.js @@ -0,0 +1,3 @@ +export * from './options.js' +export { Point2 } from './class/Point2.js' +export { Point3 } from './class/Point3.js' diff --git a/src/point/options.js b/src/point/options.js new file mode 100644 index 0000000..9689c71 --- /dev/null +++ b/src/point/options.js @@ -0,0 +1,31 @@ +export {} + +/** + * @typedef {number | Point2 | Point3} Point + */ + +/** + * @typedef {object} Point2Options + * @property {number} [x=0] + * @property {number} [y=0] + */ + +/** + * @typedef {object} Point2 + * @property {number} x + * @property {number} y + */ + +/** + * @typedef {object} Point3Options + * @property {number} [x=0] + * @property {number} [y=0] + * @property {number} [z=0] + */ + +/** + * @typedef {object} Point3 + * @property {number} x + * @property {number} y + * @property {number} z + */ diff --git a/tests/line/create.test.js b/tests/line/create.test.js new file mode 100644 index 0000000..2b1a518 --- /dev/null +++ b/tests/line/create.test.js @@ -0,0 +1,234 @@ +import { deepStrictEqual } from 'assert' +import { Line } from '../../src/exports.js' + +describe('1: اصنع مستقيماً بالمسافة فقط', function () { + it('1.1: موجب', function () { + // 0 -2-> 2 + + const l = Line.create.one({ dis: 2 }) + deepStrictEqual(l, { + dis: 2, + count: 2, + neg: false + }) + deepStrictEqual(l.spacing, 2) + deepStrictEqual(l.end, 2) + deepStrictEqual(l.min, 0) + deepStrictEqual(l.max, 2) + deepStrictEqual(l.points, [0, 2]) + }) + + it('1.2: سلبي', function () { + // -2 <-2- 0 + + const l = Line.create.one({ dis: 2, neg: true }) + deepStrictEqual(l, { + dis: 2, + count: 2, + neg: true + }) + deepStrictEqual(l.spacing, 2) + deepStrictEqual(l.end, -2) + deepStrictEqual(l.min, -2) + deepStrictEqual(l.max, 0) + deepStrictEqual(l.points, [-0, -2]) + }) + + it('1.3: نهاية إيجابية', function () { + // 0 -2-> 2 + + const l = Line.create.one({ end: 2 }) + deepStrictEqual(l, { + dis: 2, + count: 2, + neg: false + }) + deepStrictEqual(l.spacing, 2) + deepStrictEqual(l.end, 2) + deepStrictEqual(l.min, 0) + deepStrictEqual(l.max, 2) + deepStrictEqual(l.points, [0, 2]) + }) + + it('1.4: نهاية سلبية', function () { + // -2 <-2- 0 + + const l = Line.create.one({ end: -2 }) + deepStrictEqual(l, { + dis: 2, + count: 2, + neg: true + }) + deepStrictEqual(l.spacing, 2) + deepStrictEqual(l.end, -2) + deepStrictEqual(l.min, -2) + deepStrictEqual(l.max, 0) + deepStrictEqual(l.points, [-0, -2]) + }) +}) + +describe('2: اصنع مستقيماً بالمسافة والتباعد', function () { + it('2.1: موجب', function () { + // 0 -1-> 1 -1-> 2 + + const l = Line.create.one({ dis: 2, spacing: 1 }) + deepStrictEqual(l, { + dis: 2, + count: 3, + neg: false + }) + deepStrictEqual(l.spacing, 1) + deepStrictEqual(l.end, 2) + deepStrictEqual(l.min, 0) + deepStrictEqual(l.max, 2) + deepStrictEqual(l.points, [0, 1, 2]) + }) + + it('2.2: سلبي', function () { + // -2 <-1- -1 <-1- 0 + + const l = Line.create.one({ dis: 2, spacing: 1, neg: true }) + deepStrictEqual(l, { + dis: 2, + count: 3, + neg: true + }) + deepStrictEqual(l.spacing, 1) + deepStrictEqual(l.end, -2) + deepStrictEqual(l.min, -2) + deepStrictEqual(l.max, 0) + deepStrictEqual(l.points, [-0, -1, -2]) + }) +}) + +describe('3: اصنع مستقيماً بالمسافة والعدد', function () { + it('3.1: موجب', function () { + // 0 -1-> 1 -1-> 2 + + const l = Line.create.one({ dis: 2, count: 3 }) + deepStrictEqual(l, { + dis: 2, + count: 3, + neg: false + }) + deepStrictEqual(l.spacing, 1) + deepStrictEqual(l.end, 2) + deepStrictEqual(l.min, 0) + deepStrictEqual(l.max, 2) + deepStrictEqual(l.points, [0, 1, 2]) + }) + + it('3.2: سلبي', function () { + // -2 <-1- -1 <-1- 0 + + const l = Line.create.one({ dis: 2, count: 3, neg: true }) + deepStrictEqual(l, { + dis: 2, + count: 3, + neg: true + }) + deepStrictEqual(l.spacing, 1) + deepStrictEqual(l.end, -2) + deepStrictEqual(l.min, -2) + deepStrictEqual(l.max, 0) + deepStrictEqual(l.points, [-0, -1, -2]) + }) +}) + +describe('4: اصنع مستقيماً بالتباعد والعدد', function () { + it('4.1: موجب', function () { + // 0 -1-> 1 -1-> 2 + + const l = Line.create.one({ spacing: 1, count: 3 }) + deepStrictEqual(l, { + dis: 2, + count: 3, + neg: false + }) + deepStrictEqual(l.spacing, 1) + deepStrictEqual(l.end, 2) + deepStrictEqual(l.min, 0) + deepStrictEqual(l.max, 2) + deepStrictEqual(l.points, [0, 1, 2]) + }) + + it('4.2: سلبي', function () { + // -2 <-1- -1 <-1- 0 + + const l = Line.create.one({ spacing: 1, count: 3, neg: true }) + deepStrictEqual(l, { + dis: 2, + count: 3, + neg: true + }) + deepStrictEqual(l.spacing, 1) + deepStrictEqual(l.end, -2) + deepStrictEqual(l.min, -2) + deepStrictEqual(l.max, 0) + deepStrictEqual(l.points, [-0, -1, -2]) + }) +}) + +describe('5: اصنع نقاطاً على مستقيم', function () { + it('5.1: العدد فقط - فردي', function () { + // -3, -2, -1 | 0 | 1, 2, 3 + + // -3 * 1 = -3 + // -2 * 1 = -2 + // -1 * 1 = -1 + // 0 * 1 = 0 + // +1 * 1 = +1 + // +2 * 1 = +2 + // +3 * 1 = +3 + + const pArr = Line.create.points(7) + deepStrictEqual(pArr, [0, 1, -1, 2, -2, 3, -3]) + }) + + it('5.2: العدد فقط - زوجي', function () { + // -2.5, -1.5, -0.5 | | 0.5, 1.5, 2.5 + + // half_spacing = 1 * 0.5 = 0.5 + // (-2 * 1) + -half_spacing = -2 + -0.5 = -2.5 + // (-1 * 1) + -half_spacing = -1 + -0.5 = -1.5 + // (-0 * 1) + -half_spacing = -0 + -0.5 = -0.5 + // + // (+0 * 1) + +half_spacing = +0 + +0.5 = +0.5 + // (+1 * 1) + +half_spacing = +1 + +0.5 = +1.5 + // (+2 * 1) + +half_spacing = +2 + +0.5 = +2.5 + + const pArr = Line.create.points(6) + deepStrictEqual(pArr, [0.5, -0.5, 1.5, -1.5, 2.5, -2.5]) + }) + + it('5.3: العدد والتباعد - فردي', function () { + // -6, -4, -2 | 0 | 2, 4, 6 + + // -3 * 2 = -6 + // -2 * 2 = -4 + // -1 * 2 = -2 + // 0 * 2 = 0 + // +1 * 2 = +2 + // +2 * 2 = +4 + // +3 * 2 = +6 + + const pArr = Line.create.points(7, 2) + deepStrictEqual(pArr, [0, 2, -2, 4, -4, 6, -6]) + }) + + it('5.4: العدد والتباعد - زوجي', function () { + // -5, -3, -1 | | 1, 3, 5 + + // half_spacing = 2 * 0.5 = 1 + // (-2 * 2) + -half_spacing = -4 + -1 = -5 + // (-1 * 2) + -half_spacing = -2 + -1 = -3 + // (-0 * 2) + -half_spacing = -0 + -1 = -1 + // + // (+0 * 2) + +half_spacing = -0 + +1 = +1 + // (+1 * 2) + +half_spacing = -2 + +1 = +3 + // (+2 * 2) + +half_spacing = -4 + +1 = +5 + + const pArr = Line.create.points(6, 2) + deepStrictEqual(pArr, [1, -1, 3, -3, 5, -5]) + }) +}) diff --git a/tests/line/point.test.js b/tests/line/point.test.js new file mode 100644 index 0000000..d4f08bd --- /dev/null +++ b/tests/line/point.test.js @@ -0,0 +1,171 @@ +import { strictEqual } from 'assert' +import { Line } from '../../src/exports.js' + +let line +let current + +describe('1: تحقق مما إذا كانت القيمة داخل المستقيم الموجب', function () { + before(function () { + line = Line.create.one({ dis: 10 }) + }) + + it('1.1: خارج المستقيم - قبل', function () { + // -1 <-> [0 <-> 10] + + const a = Line.point.inside(line, -1) + strictEqual(a, false) + }) + + it('1.2: خارج المستقيم - بعد', function () { + // [0 <-> 10] <-> 11 + + const a = Line.point.inside(line, 11) + strictEqual(a, false) + }) + + it('1.3: داخل المستقيم', function () { + // [0 <-> 5 <-> 10] + + const a = Line.point.inside(line, 5) + strictEqual(a, true) + }) + + it('1.4: على بداية المستقيم', function () { + // [0' <-> 10] + + const a = Line.point.inside(line, 0) + strictEqual(a, true) + }) + + it('1.5: على نهاية المستقيم', function () { + // [0 <-> '10] + + const a = Line.point.inside(line, 10) + strictEqual(a, true) + }) +}) + +describe('2: تحقق مما إذا كانت القيمة داخل المستقيم السالب', function () { + before(function () { + line = Line.create.one({ dis: 10, neg: true }) + }) + + it('2.1: خارج المستقيم - قبل', function () { + // -11 <-> [-10 <-> 0] + + const a = Line.point.inside(line, -11) + strictEqual(a, false) + }) + + it('2.2: خارج المستقيم - بعد', function () { + // [-10 <-> 0] <-> 1 + + const a = Line.point.inside(line, 1) + strictEqual(a, false) + }) + + it('2.3: داخل المستقيم', function () { + // [-10 <-> -5 <-> 0] + + const a = Line.point.inside(line, -5) + strictEqual(a, true) + }) + + it('2.4: على بداية المستقيم', function () { + // [-10 <-> '0] + + const a = Line.point.inside(line, 0) + strictEqual(a, true) + }) + + it('2.5: على نهاية المستقيم', function () { + // [-10' <-> 0] + + const a = Line.point.inside(line, -10) + strictEqual(a, true) + }) +}) + +describe('3: حرّك القيمة على المستقيم الموجب', function () { + before(function () { + line = Line.create.one({ dis: 10 }) + current = 5 + }) + + it('3.1: خطوة صفر', function () { + // [0 <- 5 -> 10] 0>> = [0 <- 5 -> 10] + + const a = Line.point.move(line, current, 0) + strictEqual(a, 5) + }) + + it('3.2: الحركة للأمام داخل النطاق', function () { + // [0 <- 5 -> 10] 3>> = [0 <- 8 -> 10] + + const a = Line.point.move(line, current, 3) + strictEqual(a, 8) + }) + + it('3.3: عدم تجاوز الحد الأقصى', function () { + // [0 <- 5 -> 10] 10>> = [0 <-> '10] + + const a = Line.point.move(line, current, 10) + strictEqual(a, 10) + }) + + it('3.4: الحركة للخلف داخل النطاق', function () { + // [0 <- 5 -> 10] <<3 = [0 <- 2 -> 10] + + const a = Line.point.move(line, current, 3, true) + strictEqual(a, 2) + }) + + it('3.5: عدم تجاوز الحد الأدنى', function () { + // [0 <- 5 -> 10] <<10 = [0' <-> 10] + + const a = Line.point.move(line, current, 10, true) + strictEqual(a, 0) + }) +}) + +describe('4: حرّك القيمة على المستقيم السالب', function () { + before(function () { + line = Line.create.one({ dis: 10, neg: true }) + current = -5 + }) + + it('4.1: خطوة صفر', function () { + // [-10 <- -5 -> 0] <<0 = [-10 <- -5 -> 0] + + const a = Line.point.move(line, current, 0) + strictEqual(a, -5) + }) + + it('4.2: الحركة للأمام داخل النطاق', function () { + // [-10 <- -5 -> 0] <<3 = [-10 <- -8 -> 0] + + const a = Line.point.move(line, current, 3) + strictEqual(a, -8) + }) + + it('4.3: عدم تجاوز الحد الأقصى', function () { + // [-10 <- -5 -> 0] <<10 = [-10' <-> 0] + + const a = Line.point.move(line, current, 10) + strictEqual(a, -10) + }) + + it('4.4: الحركة للخلف داخل النطاق', function () { + // [-10 <- -5 -> 0] 3>> = [-10 <- -2 -> 0] + + const a = Line.point.move(line, current, 3, true) + strictEqual(a, -2) + }) + + it('4.5: عدم تجاوز الحد الأدنى', function () { + // [-10 <- -5 -> 0] 10>> = [-10 <-> '0] + + const a = Line.point.move(line, current, 10, true) + strictEqual(a, 0) + }) +}) diff --git a/tests/line/time.test.js b/tests/line/time.test.js new file mode 100644 index 0000000..5dd9df8 --- /dev/null +++ b/tests/line/time.test.js @@ -0,0 +1,186 @@ +import { strictEqual } from 'assert' +import { Line } from '../../src/exports.js' + +let line + +describe('1: الحصول على وقت النقطة على مستقيم موجب', function () { + before(function () { + line = Line.create.one({ dis: 4 }) + }) + + it('1.1: قيمة المنتصف', function () { + // 2 / 4 = 0.5 + + const t = Line.time.to(line, 2) + strictEqual(t, 0.5) + }) + + it('1.2: القيمة الأدنى', function () { + // 0 / 4 = 0 + + const t = Line.time.to(line, 0) + strictEqual(t, 0) + }) + + it('1.3: القيمة القصوى', function () { + // 4 / 4 = 1 + + const t = Line.time.to(line, 4) + strictEqual(t, 1) + }) +}) + +describe('2: الحصول على وقت النقطة على مستقيم سالب', function () { + before(function () { + line = Line.create.one({ dis: 4, neg: true }) + }) + + it('2.1: قيمة المنتصف', function () { + // 1 - (-2 / -4) = 1 - 0.5 = 0.5 + + const t = Line.time.to(line, -2) + strictEqual(t, 0.5) + }) + + it('2.2: القيمة الأدنى', function () { + // 1 - (-4 / -4) = 1 - 1 = 0 + + const t = Line.time.to(line, -4) + strictEqual(t, 0) + }) + + it('2.3: القيمة القصوى', function () { + // 1 - (0 / -4) = 1 - 0 = 1 + + const t = Line.time.to(line, 0) + strictEqual(t, 1) + }) +}) + +describe('3: الحصول على نقطة الوقت على مستقيم موجب', function () { + before(function () { + line = Line.create.one({ dis: 6 }) + }) + + it('3.1: قيمة المنتصف', function () { + // 6 * 0.5 = 3 + + let p = Line.time.from(line, 0.5) + strictEqual(p, 3) + + p = Line.time.from.center(line) + strictEqual(p, 3) + }) + + it('3.2: القيمة الأدنى', function () { + // 6 * 0 = 0 + + const p = Line.time.from(line, 0) + strictEqual(p, 0) + }) + + it('3.3: القيمة القصوى', function () { + // 6 * 1 = 6 + + const p = Line.time.from(line, 1) + strictEqual(p, 6) + }) + + it('3.4: أصغر من القيمة الأدنى', function () { + // 6 * -1 = -6 + + const p = Line.time.from(line, -1) + strictEqual(p, -6) + }) + + it('3.5: أكبر من القيمة القصوى', function () { + // 6 * 2 = 12 + + const p = Line.time.from(line, 2) + strictEqual(p, 12) + }) + + it('3.6: التثبيت عند الحد الأدنى', function () { + // 6 * min(-1) = 6 * 0 = -0 + + let p = Line.time.from.clamp.min(line, -1) + strictEqual(p, 0) + + p = Line.time.from.clamp(line, -1) + strictEqual(p, 0) + }) + + it('3.7: التثبيت عند الحد الأقصى', function () { + // 6 * max(2) = 6 * 1 = 6 + + let p = Line.time.from.clamp.max(line, 2) + strictEqual(p, 6) + + p = Line.time.from.clamp(line, 2) + strictEqual(p, 6) + }) +}) + +describe('4: الحصول على نقطة الوقت على مستقيم سالب', function () { + before(function () { + line = Line.create.one({ dis: 7, neg: true }) + }) + + it('4.1: قيمة المنتصف', function () { + // -(7 - (7 * 0.5)) = -(7 - 3.5) = -3.5 + + let p = Line.time.from(line, 0.5) + strictEqual(p, -3.5) + + p = Line.time.from.center(line) + strictEqual(p, -3.5) + }) + + it('4.2: القيمة الأدنى', function () { + // -(7 - (7 * 0)) = -(7 - 0) = -7 + + const p = Line.time.from(line, 0) + strictEqual(p, -7) + }) + + it('4.3: القيمة القصوى', function () { + // -(7 - (7 * 1)) = -(7 - 7) = -0 + + const p = Line.time.from(line, 1) + strictEqual(p, 0) + }) + + it('4.4: أصغر من القيمة الأدنى', function () { + // -(7 - (7 * -1)) = -(7 + 7) = -14 + + const p = Line.time.from(line, -1) + strictEqual(p, -14) + }) + + it('4.5: أكبر من القيمة القصوى', function () { + // -(7 - (7 * 2)) = -(7 - 14) = 7 + + const p = Line.time.from(line, 2) + strictEqual(p, 7) + }) + + it('4.6: التثبيت عند الحد الأدنى', function () { + // -(7 - (7 * min(-1))) = -(7 - (7 * 0)) = -(7 - 0) = -7 + + let p = Line.time.from.clamp.min(line, -1) + strictEqual(p, -7) + + p = Line.time.from.clamp(line, -1) + strictEqual(p, -7) + }) + + it('4.7: التثبيت عند الحد الأقصى', function () { + // -(7 - (7 * max(2))) = -(7 - (7 * 1)) = -(7 - 7) = -0 + + let p = Line.time.from.clamp.max(line, 2) + strictEqual(p, 0) + + p = Line.time.from.clamp(line, 2) + strictEqual(p, 0) + }) +}) diff --git a/workspace.json b/workspace.json new file mode 100644 index 0000000..2fc687d --- /dev/null +++ b/workspace.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://gist.github.com/Assayyaad/15b755cc4f125d0ac068d356341477a6/raw", + + "root": "src", + "types": "types", + "out": "docs", + + "links": { + "Game Anthima": "https://github.com/Game-Anthima", + "Developer": "https://links.thealpha.pro" + } +}