From f042c951e6f473213534675a47adadca883b3e8a Mon Sep 17 00:00:00 2001 From: danigb Date: Tue, 17 Sep 2024 19:17:11 +0200 Subject: [PATCH] fixes --- package-lock.json | 4211 ++++++------------ packages/tonal/browser/tonal.min.js | 2 +- packages/tonal/browser/tonal.min.js.map | 6 +- site/app/(home)/page.tsx | 11 - site/app/docs/[[...slug]]/page.tsx | 16 +- site/app/layout.config.tsx | 3 + site/content/docs/basics/intervals.md | 9 +- site/content/docs/groups/pitch-class-sets.md | 7 +- site/package.json | 1 + site/pnpm-lock.yaml | 12 + 10 files changed, 1514 insertions(+), 2764 deletions(-) diff --git a/package-lock.json b/package-lock.json index b93c190d..f3ccb7cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,30 +56,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.9", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.9.tgz", - "integrity": "sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.4.tgz", + "integrity": "sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.9.tgz", - "integrity": "sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz", + "integrity": "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.9", - "@babel/helper-compilation-targets": "^7.24.8", - "@babel/helper-module-transforms": "^7.24.9", - "@babel/helpers": "^7.24.8", - "@babel/parser": "^7.24.8", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.8", - "@babel/types": "^7.24.9", + "@babel/generator": "^7.25.0", + "@babel/helper-compilation-targets": "^7.25.2", + "@babel/helper-module-transforms": "^7.25.2", + "@babel/helpers": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.2", + "@babel/types": "^7.25.2", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -104,12 +104,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.10.tgz", - "integrity": "sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.6.tgz", + "integrity": "sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==", "dev": true, "dependencies": { - "@babel/types": "^7.24.9", + "@babel/types": "^7.25.6", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -119,12 +119,12 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.8.tgz", - "integrity": "sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz", + "integrity": "sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.24.8", + "@babel/compat-data": "^7.25.2", "@babel/helper-validator-option": "^7.24.8", "browserslist": "^4.23.1", "lru-cache": "^5.1.1", @@ -143,43 +143,6 @@ "semver": "bin/semver.js" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-module-imports": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", @@ -194,16 +157,15 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.24.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.9.tgz", - "integrity": "sha512-oYbh+rtFKj/HwBQkFlUzvcybzklmVdVV3UU+mN7n2t/q3yGHbuVdNxyFvSBO1tfvjyArpHNcWMAzsSPdyI46hw==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz", + "integrity": "sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-module-imports": "^7.24.7", "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.2" }, "engines": { "node": ">=6.9.0" @@ -234,18 +196,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-string-parser": { "version": "7.24.8", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", @@ -274,13 +224,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.8.tgz", - "integrity": "sha512-gV2265Nkcz7weJJfvDoAEVzC1e2OTDpkGbEsebse8koXUJUXPsCMi7sRo/+SPMuMZ9MtUPnGwITTnQnU5YjyaQ==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.6.tgz", + "integrity": "sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==", "dev": true, "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.8" + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6" }, "engines": { "node": ">=6.9.0" @@ -301,11 +251,85 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz", - "integrity": "sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz", + "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==", "dev": true, + "dependencies": { + "@babel/types": "^7.25.6" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -349,6 +373,36 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz", + "integrity": "sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", @@ -460,6 +514,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", @@ -476,12 +545,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", - "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.4.tgz", + "integrity": "sha512-uMOCoHVU52BsSWxPOMVv5qKRdeSlPuImUCB2dlPuBSU+W2/ROE7/Zg8F2Kepbk+8yBa68LlRKxO+xgEVWorsDg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -491,9 +560,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.8.tgz", - "integrity": "sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz", + "integrity": "sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -503,33 +572,30 @@ } }, "node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", "dev": true, "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.8.tgz", - "integrity": "sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz", + "integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.8", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.8", - "@babel/types": "^7.24.8", + "@babel/generator": "^7.25.6", + "@babel/parser": "^7.25.6", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -547,9 +613,9 @@ } }, "node_modules/@babel/types": { - "version": "7.24.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.9.tgz", - "integrity": "sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", + "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.24.8", @@ -567,16 +633,15 @@ "dev": true }, "node_modules/@changesets/apply-release-plan": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.0.4.tgz", - "integrity": "sha512-HLFwhKWayKinWAul0Vj+76jVx1Pc2v55MGPVjZ924Y/ROeSsBMFutv9heHmCUj48lJyRfOTJG5+ar+29FUky/A==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.0.5.tgz", + "integrity": "sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==", "dev": true, "dependencies": { - "@babel/runtime": "^7.20.1", - "@changesets/config": "^3.0.2", + "@changesets/config": "^3.0.3", "@changesets/get-version-range-type": "^0.4.0", - "@changesets/git": "^3.0.0", - "@changesets/should-skip-package": "^0.1.0", + "@changesets/git": "^3.0.1", + "@changesets/should-skip-package": "^0.1.1", "@changesets/types": "^6.0.0", "@manypkg/get-packages": "^1.1.3", "detect-indent": "^6.0.0", @@ -604,15 +669,14 @@ } }, "node_modules/@changesets/assemble-release-plan": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.3.tgz", - "integrity": "sha512-bLNh9/Lgl1VwkjWZTq8JmRqH+hj7/Yzfz0jsQ/zJJ+FTmVqmqPj3szeKOri8O/hEM8JmHW019vh2gTO9iq5Cuw==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.4.tgz", + "integrity": "sha512-nqICnvmrwWj4w2x0fOhVj2QEGdlUuwVAwESrUo5HLzWMI1rE5SWfsr9ln+rDqWB6RQ2ZyaMZHUcU7/IRaUJS+Q==", "dev": true, "dependencies": { - "@babel/runtime": "^7.20.1", "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.1", - "@changesets/should-skip-package": "^0.1.0", + "@changesets/get-dependents-graph": "^2.1.2", + "@changesets/should-skip-package": "^0.1.1", "@changesets/types": "^6.0.0", "@manypkg/get-packages": "^1.1.3", "semver": "^7.5.3" @@ -628,39 +692,37 @@ } }, "node_modules/@changesets/cli": { - "version": "2.27.7", - "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.27.7.tgz", - "integrity": "sha512-6lr8JltiiXPIjDeYg4iM2MeePP6VN/JkmqBsVA5XRiy01hGS3y629LtSDvKcycj/w/5Eur1rEwby/MjcYS+e2A==", + "version": "2.27.8", + "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.27.8.tgz", + "integrity": "sha512-gZNyh+LdSsI82wBSHLQ3QN5J30P4uHKJ4fXgoGwQxfXwYFTJzDdvIJasZn8rYQtmKhyQuiBj4SSnLuKlxKWq4w==", "dev": true, "dependencies": { - "@babel/runtime": "^7.20.1", - "@changesets/apply-release-plan": "^7.0.4", - "@changesets/assemble-release-plan": "^6.0.3", + "@changesets/apply-release-plan": "^7.0.5", + "@changesets/assemble-release-plan": "^6.0.4", "@changesets/changelog-git": "^0.2.0", - "@changesets/config": "^3.0.2", + "@changesets/config": "^3.0.3", "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.1", - "@changesets/get-release-plan": "^4.0.3", - "@changesets/git": "^3.0.0", - "@changesets/logger": "^0.1.0", - "@changesets/pre": "^2.0.0", - "@changesets/read": "^0.6.0", - "@changesets/should-skip-package": "^0.1.0", + "@changesets/get-dependents-graph": "^2.1.2", + "@changesets/get-release-plan": "^4.0.4", + "@changesets/git": "^3.0.1", + "@changesets/logger": "^0.1.1", + "@changesets/pre": "^2.0.1", + "@changesets/read": "^0.6.1", + "@changesets/should-skip-package": "^0.1.1", "@changesets/types": "^6.0.0", - "@changesets/write": "^0.3.1", + "@changesets/write": "^0.3.2", "@manypkg/get-packages": "^1.1.3", "@types/semver": "^7.5.0", "ansi-colors": "^4.1.3", - "chalk": "^2.1.0", "ci-info": "^3.7.0", "enquirer": "^2.3.0", "external-editor": "^3.1.0", "fs-extra": "^7.0.1", - "human-id": "^1.0.2", "mri": "^1.2.0", "outdent": "^0.5.0", "p-limit": "^2.2.0", - "preferred-pm": "^3.0.0", + "package-manager-detector": "^0.2.0", + "picocolors": "^1.1.0", "resolve-from": "^5.0.0", "semver": "^7.5.3", "spawndamnit": "^2.0.0", @@ -671,14 +733,14 @@ } }, "node_modules/@changesets/config": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.0.2.tgz", - "integrity": "sha512-cdEhS4t8woKCX2M8AotcV2BOWnBp09sqICxKapgLHf9m5KdENpWjyrFNMjkLqGJtUys9U+w93OxWT0czorVDfw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.0.3.tgz", + "integrity": "sha512-vqgQZMyIcuIpw9nqFIpTSNyc/wgm/Lu1zKN5vECy74u95Qx/Wa9g27HdgO4NkVAaq+BGA8wUc/qvbvVNs93n6A==", "dev": true, "dependencies": { "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.1", - "@changesets/logger": "^0.1.0", + "@changesets/get-dependents-graph": "^2.1.2", + "@changesets/logger": "^0.1.1", "@changesets/types": "^6.0.0", "@manypkg/get-packages": "^1.1.3", "fs-extra": "^7.0.1", @@ -695,29 +757,27 @@ } }, "node_modules/@changesets/get-dependents-graph": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.1.tgz", - "integrity": "sha512-LRFjjvigBSzfnPU2n/AhFsuWR5DK++1x47aq6qZ8dzYsPtS/I5mNhIGAS68IAxh1xjO9BTtz55FwefhANZ+FCA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.2.tgz", + "integrity": "sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==", "dev": true, "dependencies": { "@changesets/types": "^6.0.0", "@manypkg/get-packages": "^1.1.3", - "chalk": "^2.1.0", - "fs-extra": "^7.0.1", + "picocolors": "^1.1.0", "semver": "^7.5.3" } }, "node_modules/@changesets/get-release-plan": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.3.tgz", - "integrity": "sha512-6PLgvOIwTSdJPTtpdcr3sLtGatT+Jr22+cQwEBJBy6wP0rjB4yJ9lv583J9fVpn1bfQlBkDa8JxbS2g/n9lIyA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.4.tgz", + "integrity": "sha512-SicG/S67JmPTrdcc9Vpu0wSQt7IiuN0dc8iR5VScnnTVPfIaLvKmEGRvIaF0kcn8u5ZqLbormZNTO77bCEvyWw==", "dev": true, "dependencies": { - "@babel/runtime": "^7.20.1", - "@changesets/assemble-release-plan": "^6.0.3", - "@changesets/config": "^3.0.2", - "@changesets/pre": "^2.0.0", - "@changesets/read": "^0.6.0", + "@changesets/assemble-release-plan": "^6.0.4", + "@changesets/config": "^3.0.3", + "@changesets/pre": "^2.0.1", + "@changesets/read": "^0.6.1", "@changesets/types": "^6.0.0", "@manypkg/get-packages": "^1.1.3" } @@ -729,14 +789,12 @@ "dev": true }, "node_modules/@changesets/git": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@changesets/git/-/git-3.0.0.tgz", - "integrity": "sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@changesets/git/-/git-3.0.1.tgz", + "integrity": "sha512-pdgHcYBLCPcLd82aRcuO0kxCDbw/yISlOtkmwmE8Odo1L6hSiZrBOsRl84eYG7DRCab/iHnOkWqExqc4wxk2LQ==", "dev": true, "dependencies": { - "@babel/runtime": "^7.20.1", "@changesets/errors": "^0.2.0", - "@changesets/types": "^6.0.0", "@manypkg/get-packages": "^1.1.3", "is-subdir": "^1.1.1", "micromatch": "^4.0.2", @@ -744,12 +802,12 @@ } }, "node_modules/@changesets/logger": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.1.0.tgz", - "integrity": "sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.1.1.tgz", + "integrity": "sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==", "dev": true, "dependencies": { - "chalk": "^2.1.0" + "picocolors": "^1.1.0" } }, "node_modules/@changesets/parse": { @@ -763,12 +821,11 @@ } }, "node_modules/@changesets/pre": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.0.tgz", - "integrity": "sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.1.tgz", + "integrity": "sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==", "dev": true, "dependencies": { - "@babel/runtime": "^7.20.1", "@changesets/errors": "^0.2.0", "@changesets/types": "^6.0.0", "@manypkg/get-packages": "^1.1.3", @@ -776,28 +833,26 @@ } }, "node_modules/@changesets/read": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.0.tgz", - "integrity": "sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.1.tgz", + "integrity": "sha512-jYMbyXQk3nwP25nRzQQGa1nKLY0KfoOV7VLgwucI0bUO8t8ZLCr6LZmgjXsiKuRDc+5A6doKPr9w2d+FEJ55zQ==", "dev": true, "dependencies": { - "@babel/runtime": "^7.20.1", - "@changesets/git": "^3.0.0", - "@changesets/logger": "^0.1.0", + "@changesets/git": "^3.0.1", + "@changesets/logger": "^0.1.1", "@changesets/parse": "^0.4.0", "@changesets/types": "^6.0.0", - "chalk": "^2.1.0", "fs-extra": "^7.0.1", - "p-filter": "^2.1.0" + "p-filter": "^2.1.0", + "picocolors": "^1.1.0" } }, "node_modules/@changesets/should-skip-package": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@changesets/should-skip-package/-/should-skip-package-0.1.0.tgz", - "integrity": "sha512-FxG6Mhjw7yFStlSM7Z0Gmg3RiyQ98d/9VpQAZ3Fzr59dCOM9G6ZdYbjiSAt0XtFr9JR5U2tBaJWPjrkGGc618g==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@changesets/should-skip-package/-/should-skip-package-0.1.1.tgz", + "integrity": "sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==", "dev": true, "dependencies": { - "@babel/runtime": "^7.20.1", "@changesets/types": "^6.0.0", "@manypkg/get-packages": "^1.1.3" } @@ -809,12 +864,11 @@ "dev": true }, "node_modules/@changesets/write": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@changesets/write/-/write-0.3.1.tgz", - "integrity": "sha512-SyGtMXzH3qFqlHKcvFY2eX+6b0NGiFcNav8AFsYwy5l8hejOeoeTDemu5Yjmke2V5jpzY+pBvM0vCCQ3gdZpfw==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@changesets/write/-/write-0.3.2.tgz", + "integrity": "sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==", "dev": true, "dependencies": { - "@babel/runtime": "^7.20.1", "@changesets/types": "^6.0.0", "fs-extra": "^7.0.1", "human-id": "^1.0.2", @@ -837,9 +891,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.0.tgz", - "integrity": "sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", + "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", "cpu": [ "ppc64" ], @@ -853,9 +907,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.0.tgz", - "integrity": "sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", + "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", "cpu": [ "arm" ], @@ -869,9 +923,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.0.tgz", - "integrity": "sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", + "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", "cpu": [ "arm64" ], @@ -885,9 +939,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.0.tgz", - "integrity": "sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", + "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", "cpu": [ "x64" ], @@ -901,9 +955,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.0.tgz", - "integrity": "sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", "cpu": [ "arm64" ], @@ -917,9 +971,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.0.tgz", - "integrity": "sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", + "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", "cpu": [ "x64" ], @@ -933,9 +987,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.0.tgz", - "integrity": "sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", + "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", "cpu": [ "arm64" ], @@ -949,9 +1003,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.0.tgz", - "integrity": "sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", + "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", "cpu": [ "x64" ], @@ -965,9 +1019,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.0.tgz", - "integrity": "sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", + "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", "cpu": [ "arm" ], @@ -981,9 +1035,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.0.tgz", - "integrity": "sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", + "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", "cpu": [ "arm64" ], @@ -997,9 +1051,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.0.tgz", - "integrity": "sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", + "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", "cpu": [ "ia32" ], @@ -1013,9 +1067,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.0.tgz", - "integrity": "sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", + "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", "cpu": [ "loong64" ], @@ -1029,9 +1083,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.0.tgz", - "integrity": "sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", + "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", "cpu": [ "mips64el" ], @@ -1045,9 +1099,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.0.tgz", - "integrity": "sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", + "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", "cpu": [ "ppc64" ], @@ -1061,9 +1115,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.0.tgz", - "integrity": "sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", + "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", "cpu": [ "riscv64" ], @@ -1077,9 +1131,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.0.tgz", - "integrity": "sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", + "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", "cpu": [ "s390x" ], @@ -1093,9 +1147,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.0.tgz", - "integrity": "sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", + "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", "cpu": [ "x64" ], @@ -1109,9 +1163,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.0.tgz", - "integrity": "sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", + "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", "cpu": [ "x64" ], @@ -1125,9 +1179,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.0.tgz", - "integrity": "sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", + "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", "cpu": [ "arm64" ], @@ -1141,9 +1195,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.0.tgz", - "integrity": "sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", + "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", "cpu": [ "x64" ], @@ -1157,9 +1211,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.0.tgz", - "integrity": "sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", + "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", "cpu": [ "x64" ], @@ -1173,9 +1227,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.0.tgz", - "integrity": "sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", + "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", "cpu": [ "arm64" ], @@ -1189,9 +1243,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.0.tgz", - "integrity": "sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", + "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", "cpu": [ "ia32" ], @@ -1205,9 +1259,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.0.tgz", - "integrity": "sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", + "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", "cpu": [ "x64" ], @@ -1236,9 +1290,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", - "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -1308,22 +1362,22 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "deprecated": "Use @eslint/config-array instead", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -1391,9 +1445,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "engines": { "node": ">=12" @@ -1511,76 +1565,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/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/@jest/console/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/@jest/console/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/@jest/console/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/@jest/console/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/@jest/console/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/@jest/core": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", @@ -1628,95 +1612,25 @@ } } }, - "node_modules/@jest/core/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==", + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/core/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/@jest/core/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/@jest/core/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/@jest/core/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/@jest/core/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/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", - "dev": true, - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", "dev": true, "dependencies": { "expect": "^29.7.0", @@ -1813,76 +1727,6 @@ } } }, - "node_modules/@jest/reporters/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/@jest/reporters/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/@jest/reporters/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/@jest/reporters/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/@jest/reporters/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/@jest/reporters/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/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", @@ -1965,76 +1809,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/transform/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/@jest/transform/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/@jest/transform/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/@jest/transform/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/@jest/transform/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/@jest/transform/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/@jest/types": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", @@ -2052,122 +1826,52 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/types/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==", + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=6.0.0" } }, - "node_modules/@jest/types/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "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": ">=6.0.0" } }, - "node_modules/@jest/types/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==", + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, "engines": { - "node": ">=7.0.0" + "node": ">=6.0.0" } }, - "node_modules/@jest/types/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==", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true }, - "node_modules/@jest/types/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==", + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/types/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/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@manypkg/find-root": { @@ -2282,9 +1986,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.0.tgz", - "integrity": "sha512-JlPfZ/C7yn5S5p0yKk7uhHTTnFlvTgLetl2VxqE518QgyM7C9bSfFTYvB/Q/ftkq0RIPY4ySxTz+/wKJ/dXC0w==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.3.tgz", + "integrity": "sha512-MmKSfaB9GX+zXl6E8z4koOr/xU63AMVleLEa64v7R0QF/ZloMs5vcD1sHgM64GXXS1csaJutG+ddtzcueI/BLg==", "cpu": [ "arm" ], @@ -2295,9 +1999,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.0.tgz", - "integrity": "sha512-RDxUSY8D1tWYfn00DDi5myxKgOk6RvWPxhmWexcICt/MEC6yEMr4HNCu1sXXYLw8iAsg0D44NuU+qNq7zVWCrw==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.3.tgz", + "integrity": "sha512-zrt8ecH07PE3sB4jPOggweBjJMzI1JG5xI2DIsUbkA+7K+Gkjys6eV7i9pOenNSDJH3eOr/jLb/PzqtmdwDq5g==", "cpu": [ "arm64" ], @@ -2308,9 +2012,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.0.tgz", - "integrity": "sha512-emvKHL4B15x6nlNTBMtIaC9tLPRpeA5jMvRLXVbl/W9Ie7HhkrE7KQjvgS9uxgatL1HmHWDXk5TTS4IaNJxbAA==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.3.tgz", + "integrity": "sha512-P0UxIOrKNBFTQaXTxOH4RxuEBVCgEA5UTNV6Yz7z9QHnUJ7eLX9reOd/NYMO3+XZO2cco19mXTxDMXxit4R/eQ==", "cpu": [ "arm64" ], @@ -2321,9 +2025,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.0.tgz", - "integrity": "sha512-fO28cWA1dC57qCd+D0rfLC4VPbh6EOJXrreBmFLWPGI9dpMlER2YwSPZzSGfq11XgcEpPukPTfEVFtw2q2nYJg==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.3.tgz", + "integrity": "sha512-L1M0vKGO5ASKntqtsFEjTq/fD91vAqnzeaF6sfNAy55aD+Hi2pBI5DKwCO+UNDQHWsDViJLqshxOahXyLSh3EA==", "cpu": [ "x64" ], @@ -2334,9 +2038,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.0.tgz", - "integrity": "sha512-2Rn36Ubxdv32NUcfm0wB1tgKqkQuft00PtM23VqLuCUR4N5jcNWDoV5iBC9jeGdgS38WK66ElncprqgMUOyomw==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.3.tgz", + "integrity": "sha512-btVgIsCjuYFKUjopPoWiDqmoUXQDiW2A4C3Mtmp5vACm7/GnyuprqIDPNczeyR5W8rTXEbkmrJux7cJmD99D2g==", "cpu": [ "arm" ], @@ -2347,9 +2051,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.0.tgz", - "integrity": "sha512-gJuzIVdq/X1ZA2bHeCGCISe0VWqCoNT8BvkQ+BfsixXwTOndhtLUpOg0A1Fcx/+eA6ei6rMBzlOz4JzmiDw7JQ==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.3.tgz", + "integrity": "sha512-zmjbSphplZlau6ZTkxd3+NMtE4UKVy7U4aVFMmHcgO5CUbw17ZP6QCgyxhzGaU/wFFdTfiojjbLG3/0p9HhAqA==", "cpu": [ "arm" ], @@ -2360,9 +2064,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.0.tgz", - "integrity": "sha512-0EkX2HYPkSADo9cfeGFoQ7R0/wTKb7q6DdwI4Yn/ULFE1wuRRCHybxpl2goQrx4c/yzK3I8OlgtBu4xvted0ug==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.3.tgz", + "integrity": "sha512-nSZfcZtAnQPRZmUkUQwZq2OjQciR6tEoJaZVFvLHsj0MF6QhNMg0fQ6mUOsiCUpTqxTx0/O6gX0V/nYc7LrgPw==", "cpu": [ "arm64" ], @@ -2373,9 +2077,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.0.tgz", - "integrity": "sha512-GlIQRj9px52ISomIOEUq/IojLZqzkvRpdP3cLgIE1wUWaiU5Takwlzpz002q0Nxxr1y2ZgxC2obWxjr13lvxNQ==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.3.tgz", + "integrity": "sha512-MnvSPGO8KJXIMGlQDYfvYS3IosFN2rKsvxRpPO2l2cum+Z3exiExLwVU+GExL96pn8IP+GdH8Tz70EpBhO0sIQ==", "cpu": [ "arm64" ], @@ -2386,9 +2090,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.0.tgz", - "integrity": "sha512-N6cFJzssruDLUOKfEKeovCKiHcdwVYOT1Hs6dovDQ61+Y9n3Ek4zXvtghPPelt6U0AH4aDGnDLb83uiJMkWYzQ==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.3.tgz", + "integrity": "sha512-+W+p/9QNDr2vE2AXU0qIy0qQE75E8RTwTwgqS2G5CRQ11vzq0tbnfBd6brWhS9bCRjAjepJe2fvvkvS3dno+iw==", "cpu": [ "ppc64" ], @@ -2399,9 +2103,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.0.tgz", - "integrity": "sha512-2DnD3mkS2uuam/alF+I7M84koGwvn3ZVD7uG+LEWpyzo/bq8+kKnus2EVCkcvh6PlNB8QPNFOz6fWd5N8o1CYg==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.3.tgz", + "integrity": "sha512-yXH6K6KfqGXaxHrtr+Uoy+JpNlUlI46BKVyonGiaD74ravdnF9BUNC+vV+SIuB96hUMGShhKV693rF9QDfO6nQ==", "cpu": [ "riscv64" ], @@ -2412,9 +2116,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.0.tgz", - "integrity": "sha512-D6pkaF7OpE7lzlTOFCB2m3Ngzu2ykw40Nka9WmKGUOTS3xcIieHe82slQlNq69sVB04ch73thKYIWz/Ian8DUA==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.3.tgz", + "integrity": "sha512-R8cwY9wcnApN/KDYWTH4gV/ypvy9yZUHlbJvfaiXSB48JO3KpwSpjOGqO4jnGkLDSk1hgjYkTbTt6Q7uvPf8eg==", "cpu": [ "s390x" ], @@ -2425,9 +2129,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.0.tgz", - "integrity": "sha512-HBndjQLP8OsdJNSxpNIN0einbDmRFg9+UQeZV1eiYupIRuZsDEoeGU43NQsS34Pp166DtwQOnpcbV/zQxM+rWA==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.3.tgz", + "integrity": "sha512-kZPbX/NOPh0vhS5sI+dR8L1bU2cSO9FgxwM8r7wHzGydzfSjLRCFAT87GR5U9scj2rhzN3JPYVC7NoBbl4FZ0g==", "cpu": [ "x64" ], @@ -2438,9 +2142,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.0.tgz", - "integrity": "sha512-HxfbvfCKJe/RMYJJn0a12eiOI9OOtAUF4G6ozrFUK95BNyoJaSiBjIOHjZskTUffUrB84IPKkFG9H9nEvJGW6A==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.3.tgz", + "integrity": "sha512-S0Yq+xA1VEH66uiMNhijsWAafffydd2X5b77eLHfRmfLsRSpbiAWiRHV6DEpz6aOToPsgid7TI9rGd6zB1rhbg==", "cpu": [ "x64" ], @@ -2451,9 +2155,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.0.tgz", - "integrity": "sha512-HxDMKIhmcguGTiP5TsLNolwBUK3nGGUEoV/BO9ldUBoMLBssvh4J0X8pf11i1fTV7WShWItB1bKAKjX4RQeYmg==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.3.tgz", + "integrity": "sha512-9isNzeL34yquCPyerog+IMCNxKR8XYmGd0tHSV+OVx0TmE0aJOo9uw4fZfUuk2qxobP5sug6vNdZR6u7Mw7Q+Q==", "cpu": [ "arm64" ], @@ -2464,9 +2168,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.0.tgz", - "integrity": "sha512-xItlIAZZaiG/u0wooGzRsx11rokP4qyc/79LkAOdznGRAbOFc+SfEdfUOszG1odsHNgwippUJavag/+W/Etc6Q==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.3.tgz", + "integrity": "sha512-nMIdKnfZfzn1Vsk+RuOvl43ONTZXoAPUUxgcU0tXooqg4YrAqzfKzVenqqk2g5efWh46/D28cKFrOzDSW28gTA==", "cpu": [ "ia32" ], @@ -2477,9 +2181,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.0.tgz", - "integrity": "sha512-xNo5fV5ycvCCKqiZcpB65VMR11NJB+StnxHz20jdqRAktfdfzhgjTiJ2doTDQE/7dqGaV5I7ZGqKpgph6lCIag==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.3.tgz", + "integrity": "sha512-fOvu7PCQjAj4eWDEuD8Xz5gpzFqXzGlxHZozHP4b9Jxv9APtdxL6STqztDzMLuRXEc4UpXGGhx029Xgm91QBeA==", "cpu": [ "x64" ], @@ -2490,14 +2194,56 @@ ] }, "node_modules/@shikijs/core": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.11.1.tgz", - "integrity": "sha512-Qsn8h15SWgv5TDRoDmiHNzdQO2BxDe86Yq6vIHf5T0cCvmfmccJKIzHtep8bQO9HMBZYCtCBzaXdd1MnxZBPSg==", + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.17.7.tgz", + "integrity": "sha512-ZnIDxFu/yvje3Q8owSHaEHd+bu/jdWhHAaJ17ggjXofHx5rc4bhpCSW+OjC6smUBi5s5dd023jWtZ1gzMu/yrw==", + "dev": true, + "dependencies": { + "@shikijs/engine-javascript": "1.17.7", + "@shikijs/engine-oniguruma": "1.17.7", + "@shikijs/types": "1.17.7", + "@shikijs/vscode-textmate": "^9.2.2", + "@types/hast": "^3.0.4", + "hast-util-to-html": "^9.0.2" + } + }, + "node_modules/@shikijs/engine-javascript": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.17.7.tgz", + "integrity": "sha512-wwSf7lKPsm+hiYQdX+1WfOXujtnUG6fnN4rCmExxa4vo+OTmvZ9B1eKauilvol/LHUPrQgW12G3gzem7pY5ckw==", "dev": true, "dependencies": { + "@shikijs/types": "1.17.7", + "@shikijs/vscode-textmate": "^9.2.2", + "oniguruma-to-js": "0.4.3" + } + }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.17.7.tgz", + "integrity": "sha512-pvSYGnVeEIconU28NEzBXqSQC/GILbuNbAHwMoSfdTBrobKAsV1vq2K4cAgiaW1TJceLV9QMGGh18hi7cCzbVQ==", + "dev": true, + "dependencies": { + "@shikijs/types": "1.17.7", + "@shikijs/vscode-textmate": "^9.2.2" + } + }, + "node_modules/@shikijs/types": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.17.7.tgz", + "integrity": "sha512-+qA4UyhWLH2q4EFd+0z4K7GpERDU+c+CN2XYD3sC+zjvAr5iuwD1nToXZMt1YODshjkEGEDV86G7j66bKjqDdg==", + "dev": true, + "dependencies": { + "@shikijs/vscode-textmate": "^9.2.2", "@types/hast": "^3.0.4" } }, + "node_modules/@shikijs/vscode-textmate": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-9.2.2.tgz", + "integrity": "sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==", + "dev": true + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -2740,22 +2486,31 @@ } }, "node_modules/@types/jest": { - "version": "29.5.12", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", - "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", + "version": "29.5.13", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.13.tgz", + "integrity": "sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==", "dev": true, "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" } }, + "node_modules/@types/mdast": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", + "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/node": { - "version": "20.14.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz", - "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", + "version": "20.16.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.5.tgz", + "integrity": "sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==", "dev": true, "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, "node_modules/@types/semver": { @@ -2771,15 +2526,15 @@ "dev": true }, "node_modules/@types/unist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", - "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", "dev": true }, "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -2792,16 +2547,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.17.0.tgz", - "integrity": "sha512-pyiDhEuLM3PuANxH7uNYan1AaFs5XE0zw1hq69JBvGvE7gSuEoQl1ydtEe/XQeoC3GQxLXyOVa5kNOATgM638A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", + "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.17.0", - "@typescript-eslint/type-utils": "7.17.0", - "@typescript-eslint/utils": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/type-utils": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -2824,16 +2579,17 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/type-utils": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.17.0.tgz", - "integrity": "sha512-XD3aaBt+orgkM/7Cei0XNEm1vwUxQ958AOLALzPlbPqb8C1G8PZK85tND7Jpe69Wualri81PLU+Zc48GVKIMMA==", + "node_modules/@typescript-eslint/parser": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.17.0", - "@typescript-eslint/utils": "7.17.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -2851,16 +2607,14 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.17.0.tgz", - "integrity": "sha512-r+JFlm5NdB+JXc7aWWZ3fKSm1gn0pkswEwIYsrGPdsT2GjsRATAKXiNtp3vgAAO1xZhX8alIOEQnNMl3kbTgJw==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.17.0", - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/typescript-estree": "7.17.0" + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -2868,22 +2622,18 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" } }, - "node_modules/@typescript-eslint/parser": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.17.0.tgz", - "integrity": "sha512-puiYfGeg5Ydop8eusb/Hy1k7QmOU6X3nvsqCgzrB2K4qMavK//21+PzNE8qeECgNOIoertJPUC1SpegHDI515A==", + "node_modules/@typescript-eslint/type-utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.17.0", - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/typescript-estree": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0", - "debug": "^4.3.4" + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -2901,27 +2651,10 @@ } } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.17.0.tgz", - "integrity": "sha512-0P2jTTqyxWp9HiKLu/Vemr2Rg1Xb5B7uHItdVZ6iAenXmPo4SZ86yOPCJwMqpCyaMiEHTNqizHfsbmCFT1x9SA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@typescript-eslint/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.17.0.tgz", - "integrity": "sha512-a29Ir0EbyKTKHnZWbNsrc/gqfIBqYPwj3F2M+jWE/9bqfEHg0AMtXzkbUkOG6QgEScxh2+Pz9OXe11jHDnHR7A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -2932,13 +2665,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.17.0.tgz", - "integrity": "sha512-72I3TGq93t2GoSBWI093wmKo0n6/b7O4j9o8U+f65TVD0FS6bI2180X5eGEr8MA8PhKMvYe9myZJquUT2JkCZw==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2959,13 +2692,35 @@ } } }, + "node_modules/@typescript-eslint/utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.17.0.tgz", - "integrity": "sha512-RVGC9UhPOCsfCdI9pU++K4nD7to+jTcMIbXTSOcrLqUEW6gF2pU1UUbYJKc9cvcRSK1UDeMJ7pdMxf4bhMpV/A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.17.0", + "@typescript-eslint/types": "7.18.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -3065,15 +2820,18 @@ } }, "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "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": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/any-promise": { @@ -3114,9 +2872,9 @@ } }, "node_modules/async": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", - "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", "dev": true }, "node_modules/babel-jest": { @@ -3140,76 +2898,6 @@ "@babel/core": "^7.8.0" } }, - "node_modules/babel-jest/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/babel-jest/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/babel-jest/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/babel-jest/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/babel-jest/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/babel-jest/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/babel-plugin-istanbul": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", @@ -3267,23 +2955,26 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", "dev": true, "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0" @@ -3357,9 +3048,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz", - "integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==", + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", "dev": true, "funding": [ { @@ -3376,9 +3067,9 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001640", - "electron-to-chromium": "^1.4.820", - "node-releases": "^2.0.14", + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", "update-browserslist-db": "^1.1.0" }, "bin": { @@ -3458,9 +3149,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001643", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz", - "integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==", + "version": "1.0.30001660", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz", + "integrity": "sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==", "dev": true, "funding": [ { @@ -3477,18 +3168,30 @@ } ] }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "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": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/char-regex": { @@ -3500,6 +3203,26 @@ "node": ">=10" } }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", @@ -3558,21 +3281,21 @@ } }, "node_modules/cjs-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", - "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", + "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==", "dev": true }, "node_modules/cli-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", - "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", "dev": true, "dependencies": { - "restore-cursor": "^4.0.0" + "restore-cursor": "^5.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -3608,49 +3331,16 @@ "node": ">=12" } }, - "node_modules/cliui/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/cliui/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/cliui/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/cliui/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/cliui/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==", + "node_modules/cliui/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/cliui/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" @@ -3704,18 +3394,21 @@ "dev": true }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "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.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "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/colorette": { @@ -3724,6 +3417,16 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/commander": { "version": "12.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", @@ -3775,76 +3478,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/create-jest/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/create-jest/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/create-jest/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/create-jest/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/create-jest/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/create-jest/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/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -3860,12 +3493,12 @@ } }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -3905,6 +3538,15 @@ "node": ">=0.10.0" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/detect-indent": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", @@ -3923,6 +3565,19 @@ "node": ">=8" } }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "dev": true, + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -3978,9 +3633,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.0.tgz", - "integrity": "sha512-Vb3xHHYnLseK8vlMJQKJYXJ++t4u1/qJ3vykuVrVjvdiOEhYyT1AuP4x03G8EnPmYvYOhe9T+dADTmthjRQMkA==", + "version": "1.5.24", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.24.tgz", + "integrity": "sha512-0x0wLCmpdKFCi9ulhvYZebgcPmHTkFVUfU2wzDykadkslKwT4oAmDTHEKLnlrDsMGZe4B+ksn8quZfZjYsBetA==", "dev": true }, "node_modules/emittery": { @@ -3996,9 +3651,9 @@ } }, "node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", "dev": true }, "node_modules/enquirer": { @@ -4026,6 +3681,18 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -4036,9 +3703,9 @@ } }, "node_modules/esbuild": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.0.tgz", - "integrity": "sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", "dev": true, "hasInstallScript": true, "bin": { @@ -4048,61 +3715,64 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.23.0", - "@esbuild/android-arm": "0.23.0", - "@esbuild/android-arm64": "0.23.0", - "@esbuild/android-x64": "0.23.0", - "@esbuild/darwin-arm64": "0.23.0", - "@esbuild/darwin-x64": "0.23.0", - "@esbuild/freebsd-arm64": "0.23.0", - "@esbuild/freebsd-x64": "0.23.0", - "@esbuild/linux-arm": "0.23.0", - "@esbuild/linux-arm64": "0.23.0", - "@esbuild/linux-ia32": "0.23.0", - "@esbuild/linux-loong64": "0.23.0", - "@esbuild/linux-mips64el": "0.23.0", - "@esbuild/linux-ppc64": "0.23.0", - "@esbuild/linux-riscv64": "0.23.0", - "@esbuild/linux-s390x": "0.23.0", - "@esbuild/linux-x64": "0.23.0", - "@esbuild/netbsd-x64": "0.23.0", - "@esbuild/openbsd-arm64": "0.23.0", - "@esbuild/openbsd-x64": "0.23.0", - "@esbuild/sunos-x64": "0.23.0", - "@esbuild/win32-arm64": "0.23.0", - "@esbuild/win32-ia32": "0.23.0", - "@esbuild/win32-x64": "0.23.0" + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" } }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "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": ">=0.8.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -4175,21 +3845,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/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/eslint/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -4206,52 +3861,6 @@ "concat-map": "0.0.1" } }, - "node_modules/eslint/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/eslint/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/eslint/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/eslint/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/node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -4268,15 +3877,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/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/eslint/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -4346,18 +3946,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/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/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -4626,16 +4214,6 @@ "node": ">=8" } }, - "node_modules/find-yarn-workspace-root2": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz", - "integrity": "sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==", - "dev": true, - "dependencies": { - "micromatch": "^4.0.2", - "pkg-dir": "^4.2.0" - } - }, "node_modules/flat-cache": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", @@ -4657,9 +4235,9 @@ "dev": true }, "node_modules/foreground-child": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", @@ -4881,12 +4459,12 @@ "dev": true }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "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": ">=4" + "node": ">=8" } }, "node_modules/hasown": { @@ -4901,12 +4479,58 @@ "node": ">= 0.4" } }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, + "node_modules/hast-util-to-html": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.3.tgz", + "integrity": "sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/html-void-elements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", + "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/human-id": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/human-id/-/human-id-1.0.2.tgz", @@ -4935,9 +4559,9 @@ } }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" @@ -5032,9 +4656,9 @@ } }, "node_modules/is-core-module": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", - "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, "dependencies": { "hasown": "^2.0.2" @@ -5184,27 +4808,6 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-report/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/istanbul-lib-report/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/istanbul-lib-source-maps": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", @@ -5265,21 +4868,6 @@ "node": ">=10" } }, - "node_modules/jake/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/jake/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -5290,49 +4878,6 @@ "concat-map": "0.0.1" } }, - "node_modules/jake/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/jake/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/jake/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/jake/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/jake/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -5345,18 +4890,6 @@ "node": "*" } }, - "node_modules/jake/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/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -5443,64 +4976,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-circus/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/jest-circus/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/jest-circus/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/jest-circus/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/jest-circus/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/jest-circus/node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -5516,18 +4991,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-circus/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/jest-cli": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", @@ -5561,76 +5024,6 @@ } } }, - "node_modules/jest-cli/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/jest-cli/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/jest-cli/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/jest-cli/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/jest-cli/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/jest-cli/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/jest-config": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", @@ -5676,161 +5069,21 @@ } } }, - "node_modules/jest-config/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==", + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-config/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/jest-config/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/jest-config/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/jest-config/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/jest-config/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/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-diff/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/jest-diff/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/jest-diff/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/jest-diff/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/jest-diff/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/jest-diff/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/jest-docblock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", @@ -5859,76 +5112,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-each/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/jest-each/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/jest-each/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/jest-each/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/jest-each/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/jest-each/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/jest-environment-node": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", @@ -6008,76 +5191,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-matcher-utils/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/jest-matcher-utils/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/jest-matcher-utils/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/jest-matcher-utils/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/jest-matcher-utils/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/jest-matcher-utils/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/jest-message-util": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", @@ -6098,76 +5211,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-message-util/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/jest-message-util/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/jest-message-util/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/jest-message-util/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/jest-message-util/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/jest-message-util/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/jest-mock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", @@ -6241,76 +5284,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve/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/jest-resolve/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/jest-resolve/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/jest-resolve/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/jest-resolve/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/jest-resolve/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/jest-runner": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", @@ -6343,64 +5316,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runner/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/jest-runner/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/jest-runner/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/jest-runner/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/jest-runner/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/jest-runner/node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -6416,18 +5331,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-runner/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/jest-runtime": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", @@ -6461,76 +5364,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/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/jest-runtime/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/jest-runtime/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/jest-runtime/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/jest-runtime/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/jest-runtime/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/jest-snapshot": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", @@ -6562,76 +5395,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/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/jest-snapshot/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/jest-snapshot/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/jest-snapshot/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/jest-snapshot/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/jest-snapshot/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/jest-util": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", @@ -6640,271 +5403,61 @@ "dependencies": { "@jest/types": "^29.6.3", "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-util/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/jest-util/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/jest-util/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/jest-util/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/jest-util/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/jest-util/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/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/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/jest-validate/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/jest-validate/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/jest-validate/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/jest-validate/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/jest-validate/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/jest-validate/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/jest-watcher": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-watcher/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/jest-watcher/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" + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher/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==", + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" }, "engines": { - "node": ">=7.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher/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/jest-watcher/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==", + "node_modules/jest-validate/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": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-watcher/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==", + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-worker": { @@ -6922,15 +5475,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-worker/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/jest-worker/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -7099,21 +5643,21 @@ } }, "node_modules/lint-staged": { - "version": "15.2.7", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.7.tgz", - "integrity": "sha512-+FdVbbCZ+yoh7E/RosSdqKJyUM2OEjTciH0TFNkawKgvFp1zbGlEC39RADg+xKBG1R4mhoH2j85myBQZ5wR+lw==", + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.10.tgz", + "integrity": "sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==", "dev": true, "dependencies": { "chalk": "~5.3.0", "commander": "~12.1.0", - "debug": "~4.3.4", + "debug": "~4.3.6", "execa": "~8.0.1", - "lilconfig": "~3.1.1", - "listr2": "~8.2.1", - "micromatch": "~4.0.7", + "lilconfig": "~3.1.2", + "listr2": "~8.2.4", + "micromatch": "~4.0.8", "pidtree": "~0.6.0", "string-argv": "~0.3.2", - "yaml": "~2.4.2" + "yaml": "~2.5.0" }, "bin": { "lint-staged": "bin/lint-staged.js" @@ -7272,15 +5816,15 @@ } }, "node_modules/listr2": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.3.tgz", - "integrity": "sha512-Lllokma2mtoniUOS94CcOErHWAug5iu7HOmDrvWgpw8jyQH2fomgB+7lZS4HWZxytUuQwkGOwe49FvwVaA85Xw==", + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.4.tgz", + "integrity": "sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==", "dev": true, "dependencies": { "cli-truncate": "^4.0.0", "colorette": "^2.0.20", "eventemitter3": "^5.0.1", - "log-update": "^6.0.0", + "log-update": "^6.1.0", "rfdc": "^1.4.1", "wrap-ansi": "^9.0.0" }, @@ -7297,30 +5841,6 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/load-yaml-file": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz", - "integrity": "sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.5", - "js-yaml": "^3.13.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/load-yaml-file/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -7364,14 +5884,14 @@ "dev": true }, "node_modules/log-update": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", - "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", "dev": true, "dependencies": { - "ansi-escapes": "^6.2.0", - "cli-cursor": "^4.0.0", - "slice-ansi": "^7.0.0", + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" }, @@ -7383,21 +5903,24 @@ } }, "node_modules/log-update/node_modules/ansi-escapes": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.1.tgz", - "integrity": "sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", "dev": true, + "dependencies": { + "environment": "^1.0.0" + }, "engines": { - "node": ">=14.16" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/log-update/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "engines": { "node": ">=12" @@ -7532,6 +6055,27 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/mdast-util-to-hast": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", + "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", @@ -7553,10 +6097,99 @@ "node": ">= 8" } }, + "node_modules/micromark-util-character": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.0.tgz", + "integrity": "sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.0.tgz", + "integrity": "sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.0.tgz", + "integrity": "sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", + "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", + "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { "braces": "^3.0.3", @@ -7575,6 +6208,18 @@ "node": ">=6" } }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", @@ -7609,9 +6254,9 @@ } }, "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==", + "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/mz": { @@ -7697,6 +6342,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/oniguruma-to-js": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/oniguruma-to-js/-/oniguruma-to-js-0.4.3.tgz", + "integrity": "sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==", + "dev": true, + "dependencies": { + "regex": "^4.3.2" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -7792,6 +6449,12 @@ "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", "dev": true }, + "node_modules/package-manager-detector": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.0.tgz", + "integrity": "sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==", + "dev": true + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -7887,9 +6550,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "dev": true }, "node_modules/picomatch": { @@ -7962,106 +6625,30 @@ } ], "dependencies": { - "lilconfig": "^3.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "jiti": ">=1.21.0", - "postcss": ">=8.0.9", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - }, - "postcss": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/preferred-pm": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.1.4.tgz", - "integrity": "sha512-lEHd+yEm22jXdCphDrkvIJQU66EuLojPPtvZkpKIkiD+l0DMThF/niqZKJSoU8Vl7iuvtmzyMhir9LdVy5WMnA==", - "dev": true, - "dependencies": { - "find-up": "^5.0.0", - "find-yarn-workspace-root2": "1.2.16", - "path-exists": "^4.0.0", - "which-pm": "^2.2.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/preferred-pm/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/preferred-pm/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/preferred-pm/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/preferred-pm/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" + "lilconfig": "^3.1.1" }, "engines": { - "node": ">=10" + "node": ">= 18" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } } }, "node_modules/prelude-ls": { @@ -8127,6 +6714,16 @@ "node": ">= 6" } }, + "node_modules/property-information": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.5.0.tgz", + "integrity": "sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -8235,6 +6832,12 @@ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", "dev": true }, + "node_modules/regex": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/regex/-/regex-4.3.2.tgz", + "integrity": "sha512-kK/AA3A9K6q2js89+VMymcboLOlF5lZRCYJv3gzszXFHBr6kO6qLGzbm+UIugBEV8SMMKCTR59txoY6ctRHYVw==", + "dev": true + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -8292,21 +6895,48 @@ } }, "node_modules/restore-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", - "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", "dev": true, "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -8340,9 +6970,9 @@ } }, "node_modules/rollup": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.0.tgz", - "integrity": "sha512-5r7EYSQIowHsK4eTZ0Y81qpZuJz+MUuYeqmmYmRMl1nwhdmbiYqt5jwzf6u7wyOzJgYqtCRMtVRKOtHANBz7rA==", + "version": "4.21.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.3.tgz", + "integrity": "sha512-7sqRtBNnEbcBtMeRVc6VRsJMmpI+JU1z9VTvW8D4gXIYQFz0aLcsE6rRkyghZkLfEgUZgVvOG7A5CVz/VW5GIA==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -8355,22 +6985,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.19.0", - "@rollup/rollup-android-arm64": "4.19.0", - "@rollup/rollup-darwin-arm64": "4.19.0", - "@rollup/rollup-darwin-x64": "4.19.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.19.0", - "@rollup/rollup-linux-arm-musleabihf": "4.19.0", - "@rollup/rollup-linux-arm64-gnu": "4.19.0", - "@rollup/rollup-linux-arm64-musl": "4.19.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.19.0", - "@rollup/rollup-linux-riscv64-gnu": "4.19.0", - "@rollup/rollup-linux-s390x-gnu": "4.19.0", - "@rollup/rollup-linux-x64-gnu": "4.19.0", - "@rollup/rollup-linux-x64-musl": "4.19.0", - "@rollup/rollup-win32-arm64-msvc": "4.19.0", - "@rollup/rollup-win32-ia32-msvc": "4.19.0", - "@rollup/rollup-win32-x64-msvc": "4.19.0", + "@rollup/rollup-android-arm-eabi": "4.21.3", + "@rollup/rollup-android-arm64": "4.21.3", + "@rollup/rollup-darwin-arm64": "4.21.3", + "@rollup/rollup-darwin-x64": "4.21.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.21.3", + "@rollup/rollup-linux-arm-musleabihf": "4.21.3", + "@rollup/rollup-linux-arm64-gnu": "4.21.3", + "@rollup/rollup-linux-arm64-musl": "4.21.3", + "@rollup/rollup-linux-powerpc64le-gnu": "4.21.3", + "@rollup/rollup-linux-riscv64-gnu": "4.21.3", + "@rollup/rollup-linux-s390x-gnu": "4.21.3", + "@rollup/rollup-linux-x64-gnu": "4.21.3", + "@rollup/rollup-linux-x64-musl": "4.21.3", + "@rollup/rollup-win32-arm64-msvc": "4.21.3", + "@rollup/rollup-win32-ia32-msvc": "4.21.3", + "@rollup/rollup-win32-x64-msvc": "4.21.3", "fsevents": "~2.3.2" } }, @@ -8437,12 +7067,16 @@ } }, "node_modules/shiki": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.11.1.tgz", - "integrity": "sha512-VHD3Q0EBXaaa245jqayBe5zQyMQUdXBFjmGr9MpDaDpAKRMYn7Ff00DM5MLk26UyKjnml3yQ0O2HNX7PtYVNFQ==", + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.17.7.tgz", + "integrity": "sha512-Zf6hNtWhFyF4XP5OOsXkBTEx9JFPiN0TQx4wSe+Vqeuczewgk2vT4IZhF4gka55uelm052BD5BaHavNqUNZd+A==", "dev": true, "dependencies": { - "@shikijs/core": "1.11.1", + "@shikijs/core": "1.17.7", + "@shikijs/engine-javascript": "1.17.7", + "@shikijs/engine-oniguruma": "1.17.7", + "@shikijs/types": "1.17.7", + "@shikijs/vscode-textmate": "^9.2.2", "@types/hast": "^3.0.4" } }, @@ -8514,6 +7148,16 @@ "source-map": "^0.6.0" } }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/spawndamnit": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz", @@ -8681,9 +7325,9 @@ } }, "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "engines": { "node": ">=12" @@ -8707,6 +7351,20 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/stringify-entities": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", + "dev": true, + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -8814,15 +7472,15 @@ } }, "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "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": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -8912,6 +7570,45 @@ "node": ">=0.8" } }, + "node_modules/tinyglobby": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.6.tgz", + "integrity": "sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==", + "dev": true, + "dependencies": { + "fdir": "^6.3.0", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.3.0.tgz", + "integrity": "sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==", + "dev": true, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -8973,6 +7670,16 @@ "tree-kill": "cli.js" } }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/ts-api-utils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", @@ -8992,20 +7699,20 @@ "dev": true }, "node_modules/ts-jest": { - "version": "29.2.3", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.3.tgz", - "integrity": "sha512-yCcfVdiBFngVz9/keHin9EnsrQtQtEu3nRykNy9RVp+FiPFFbPJ3Sg6Qg4+TkmH0vMP5qsTKgXSsk80HRwvdgQ==", + "version": "29.2.5", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.5.tgz", + "integrity": "sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==", "dev": true, "dependencies": { - "bs-logger": "0.x", + "bs-logger": "^0.2.6", "ejs": "^3.1.10", - "fast-json-stable-stringify": "2.x", + "fast-json-stable-stringify": "^2.1.0", "jest-util": "^29.0.0", "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "^7.5.3", - "yargs-parser": "^21.0.1" + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.6.3", + "yargs-parser": "^21.1.1" }, "bin": { "ts-jest": "cli.js" @@ -9040,9 +7747,9 @@ } }, "node_modules/tsup": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.2.2.tgz", - "integrity": "sha512-MufIuzdSt6HYPOeOtjUXLR4rqRJySi6XsRNZdwvjC2XR+xghsu2L3vSmYmX+k4S1mO6j0OlUEyVQ3Fc0H66XcA==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.3.0.tgz", + "integrity": "sha512-ALscEeyS03IomcuNdFdc0YWGVIkwH1Ws7nfTbAPuoILvEV2hpGQAY72LIOjglGo4ShWpZfpBqP/jpQVCzqYQag==", "dev": true, "dependencies": { "bundle-require": "^5.0.0", @@ -9052,7 +7759,6 @@ "debug": "^4.3.5", "esbuild": "^0.23.0", "execa": "^5.1.1", - "globby": "^11.1.0", "joycon": "^3.1.1", "picocolors": "^1.0.1", "postcss-load-config": "^6.0.1", @@ -9060,6 +7766,7 @@ "rollup": "^4.19.0", "source-map": "0.8.0-beta.0", "sucrase": "^3.35.0", + "tinyglobby": "^0.2.1", "tree-kill": "^1.2.2" }, "bin": { @@ -9103,26 +7810,26 @@ } }, "node_modules/turbo": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.0.9.tgz", - "integrity": "sha512-QaLaUL1CqblSKKPgLrFW3lZWkWG4pGBQNW+q1ScJB5v1D/nFWtsrD/yZljW/bdawg90ihi4/ftQJ3h6fz1FamA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.1.2.tgz", + "integrity": "sha512-Jb0rbU4iHEVQ18An/YfakdIv9rKnd3zUfSE117EngrfWXFHo3RndVH96US3GsT8VHpwTncPePDBT2t06PaFLrw==", "dev": true, "bin": { "turbo": "bin/turbo" }, "optionalDependencies": { - "turbo-darwin-64": "2.0.9", - "turbo-darwin-arm64": "2.0.9", - "turbo-linux-64": "2.0.9", - "turbo-linux-arm64": "2.0.9", - "turbo-windows-64": "2.0.9", - "turbo-windows-arm64": "2.0.9" + "turbo-darwin-64": "2.1.2", + "turbo-darwin-arm64": "2.1.2", + "turbo-linux-64": "2.1.2", + "turbo-linux-arm64": "2.1.2", + "turbo-windows-64": "2.1.2", + "turbo-windows-arm64": "2.1.2" } }, "node_modules/turbo-darwin-64": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.0.9.tgz", - "integrity": "sha512-owlGsOaExuVGBUfrnJwjkL1BWlvefjSKczEAcpLx4BI7Oh6ttakOi+JyomkPkFlYElRpjbvlR2gP8WIn6M/+xQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.1.2.tgz", + "integrity": "sha512-3TEBxHWh99h2yIzkuIigMEOXt/ItYQp0aPiJjPd1xN4oDcsKK5AxiFKPH9pdtfIBzYsY59kQhZiFj0ELnSP7Bw==", "cpu": [ "x64" ], @@ -9133,9 +7840,9 @@ ] }, "node_modules/turbo-darwin-arm64": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.0.9.tgz", - "integrity": "sha512-XAXkKkePth5ZPPE/9G9tTnPQx0C8UTkGWmNGYkpmGgRr8NedW+HrPsi9N0HcjzzIH9A4TpNYvtiV+WcwdaEjKA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.1.2.tgz", + "integrity": "sha512-he0miWNq2WxJzsH82jS2Z4MXpnkzn9SH8a79iPXiJkq25QREImucscM4RPasXm8wARp91pyysJMq6aasD45CeA==", "cpu": [ "arm64" ], @@ -9146,9 +7853,9 @@ ] }, "node_modules/turbo-linux-64": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.0.9.tgz", - "integrity": "sha512-l9wSgEjrCFM1aG16zItBsZ206ZlhSSx1owB8Cgskfv0XyIXRGHRkluihiaxkp+UeU5WoEfz4EN5toc+ICA0q0w==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.1.2.tgz", + "integrity": "sha512-fKUBcc0rK8Vdqv5a/E3CSpMBLG1bzwv+Q0Q83F8fG2ZfNCNKGbcEYABdonNZkkx141Rj03cZQFCgxu3MVEGU+A==", "cpu": [ "x64" ], @@ -9159,9 +7866,9 @@ ] }, "node_modules/turbo-linux-arm64": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.0.9.tgz", - "integrity": "sha512-gRnjxXRne18B27SwxXMqL3fJu7jw/8kBrOBTBNRSmZZiG1Uu3nbnP7b4lgrA/bCku6C0Wligwqurvtpq6+nFHA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.1.2.tgz", + "integrity": "sha512-sV8Bpmm0WiuxgbhxymcC7wSsuxfBBieI98GegSwbr/bs1ANAgzCg93urIrdKdQ3/b31zZxQwcaP4FBF1wx1Qdg==", "cpu": [ "arm64" ], @@ -9172,9 +7879,9 @@ ] }, "node_modules/turbo-windows-64": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.0.9.tgz", - "integrity": "sha512-ZVo0apxUvaRq4Vm1qhsfqKKhtRgReYlBVf9MQvVU1O9AoyydEQvLDO1ryqpXDZWpcHoFxHAQc9msjAMtE5K2lA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.1.2.tgz", + "integrity": "sha512-wcmIJZI9ORT9ykHGliFE6kWRQrlH930QGSjSgWC8uFChFFuOyUlvC7ttcxuSvU9VqC7NF4C+GVAcFJQ8lTjN7g==", "cpu": [ "x64" ], @@ -9185,9 +7892,9 @@ ] }, "node_modules/turbo-windows-arm64": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.0.9.tgz", - "integrity": "sha512-sGRz7c5Pey6y7y9OKi8ypbWNuIRPF9y8xcMqL56OZifSUSo+X2EOsOleR9MKxQXVaqHPGOUKWsE6y8hxBi9pag==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.1.2.tgz", + "integrity": "sha512-zdnXjrhk7YO6CP+Q5wPueEvOCLH4lDa6C4rrwiakcWcPgcQGbVozJlo4uaQ6awo8HLWQEvOwu84RkWTdLAc/Hw==", "cpu": [ "arm64" ], @@ -9231,16 +7938,16 @@ } }, "node_modules/typedoc": { - "version": "0.26.5", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.5.tgz", - "integrity": "sha512-Vn9YKdjKtDZqSk+by7beZ+xzkkr8T8CYoiasqyt4TTRFy5+UHzL/mF/o4wGBjRF+rlWQHDb0t6xCpA3JNL5phg==", + "version": "0.26.7", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.7.tgz", + "integrity": "sha512-gUeI/Wk99vjXXMi8kanwzyhmeFEGv1LTdTQsiyIsmSYsBebvFxhbcyAx7Zjo4cMbpLGxM4Uz3jVIjksu/I2v6Q==", "dev": true, "dependencies": { "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.5", - "shiki": "^1.9.1", - "yaml": "^2.4.5" + "shiki": "^1.16.2", + "yaml": "^2.5.1" }, "bin": { "typedoc": "bin/typedoc" @@ -9249,13 +7956,13 @@ "node": ">= 18" }, "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 || 5.4.x || 5.5.x" + "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 || 5.4.x || 5.5.x || 5.6.x" } }, "node_modules/typedoc-plugin-markdown": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.2.2.tgz", - "integrity": "sha512-4Amnhjiw4L9aN5yBn6Ryh5WZr+uW41e6IU3EuQCNcVWgHQC+tlNIbbQMKVYAb33ES7yaM01dAXGS4BdJtQi7mA==", + "version": "4.2.7", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.2.7.tgz", + "integrity": "sha512-bLsQdweSm48P9j6kGqQ3/4GCH5zu2EnURSkkxqirNc+uVFE9YK825ogDw+WbNkRHIV6eZK/1U43gT7YfglyYOg==", "dev": true, "engines": { "node": ">= 18" @@ -9265,9 +7972,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -9284,11 +7991,79 @@ "dev": true }, "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==", + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true }, + "node_modules/unist-util-is": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", + "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", + "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", + "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -9351,6 +8126,34 @@ "node": ">=10.12.0" } }, + "node_modules/vfile": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", + "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -9392,19 +8195,6 @@ "node": ">= 8" } }, - "node_modules/which-pm": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.2.0.tgz", - "integrity": "sha512-MOiaDbA5ZZgUjkeMWM5EkJp4loW5ZRoa5bc3/aeMox/PJelMhE6t7S/mLuiY43DBupyxH+S0U1bTui9kWUlmsw==", - "dev": true, - "dependencies": { - "load-yaml-file": "^0.2.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8.15" - } - }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -9449,39 +8239,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/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/wrap-ansi-cjs/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/wrap-ansi-cjs/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/wrap-ansi-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -9512,9 +8269,9 @@ } }, "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "engines": { "node": ">=12" @@ -9585,9 +8342,9 @@ "dev": true }, "node_modules/yaml": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", - "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", "dev": true, "bin": { "yaml": "bin.mjs" @@ -9664,17 +8421,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "packages/abc-notation": { - "name": "@tonaljs/abc-notation", - "version": "4.8.3", + "version": "4.9.0", "license": "MIT", "dependencies": { - "@tonaljs/pitch-distance": "5.0.3", + "@tonaljs/pitch-distance": "5.0.4", "@tonaljs/pitch-note": "6.0.0" } }, "packages/array": { - "name": "@tonaljs/array", "version": "4.8.3", "license": "MIT", "dependencies": { @@ -9682,157 +8447,140 @@ } }, "packages/chord": { - "name": "@tonaljs/chord", - "version": "6.0.0", + "version": "6.1.0", "license": "MIT", "dependencies": { - "@tonaljs/chord-detect": "4.8.5", - "@tonaljs/chord-type": "5.0.5", - "@tonaljs/collection": "4.8.1", - "@tonaljs/interval": "^5.0.0", - "@tonaljs/pcset": "4.9.2", - "@tonaljs/pitch-distance": "5.0.3", + "@tonaljs/chord-detect": "4.9.0", + "@tonaljs/chord-type": "5.1.0", + "@tonaljs/collection": "4.9.0", + "@tonaljs/interval": "^5.1.0", + "@tonaljs/pcset": "4.10.0", + "@tonaljs/pitch-distance": "5.0.4", "@tonaljs/pitch-note": "6.0.0", - "@tonaljs/scale-type": "4.8.5" + "@tonaljs/scale-type": "4.9.0" } }, "packages/chord-detect": { - "name": "@tonaljs/chord-detect", - "version": "4.8.5", + "version": "4.9.0", "license": "MIT", "dependencies": { - "@tonaljs/chord-type": "5.0.5", - "@tonaljs/pcset": "4.9.2", + "@tonaljs/chord-type": "5.1.0", + "@tonaljs/pcset": "4.10.0", "@tonaljs/pitch-note": "6.0.0" } }, "packages/chord-dictionary": { - "name": "@tonaljs/chord-dictionary", - "version": "4.8.4", + "version": "4.8.5", "license": "MIT", "dependencies": { - "@tonaljs/chord-type": "5.0.5" + "@tonaljs/chord-type": "5.1.0" } }, "packages/chord-type": { - "name": "@tonaljs/chord-type", - "version": "5.0.5", + "version": "5.1.0", "license": "MIT", "dependencies": { - "@tonaljs/pcset": "4.9.2" + "@tonaljs/pcset": "4.10.0" } }, "packages/collection": { - "name": "@tonaljs/collection", - "version": "4.8.1", + "version": "4.9.0", "license": "MIT" }, "packages/core": { - "name": "@tonaljs/core", - "version": "5.0.0", + "version": "5.0.1", "license": "MIT", "dependencies": { "@tonaljs/pitch": "5.0.2", - "@tonaljs/pitch-distance": "5.0.3", + "@tonaljs/pitch-distance": "5.0.4", "@tonaljs/pitch-interval": "6.0.0", "@tonaljs/pitch-note": "6.0.0" } }, "packages/duration-value": { - "name": "@tonaljs/duration-value", - "version": "4.8.1", + "version": "4.9.0", "license": "MIT" }, "packages/interval": { - "name": "@tonaljs/interval", - "version": "5.0.0", + "version": "5.1.0", "license": "MIT", "dependencies": { "@tonaljs/pitch": "^5.0.2", - "@tonaljs/pitch-distance": "^5.0.3", + "@tonaljs/pitch-distance": "^5.0.4", "@tonaljs/pitch-interval": "^6.0.0" } }, "packages/key": { - "name": "@tonaljs/key", - "version": "4.9.4", + "version": "4.10.0", "license": "MIT", "dependencies": { - "@tonaljs/note": "4.10.3", + "@tonaljs/note": "4.11.0", "@tonaljs/pitch-note": "6.0.0", - "@tonaljs/roman-numeral": "4.8.3" + "@tonaljs/roman-numeral": "4.9.0" }, "devDependencies": { - "@tonaljs/chord": "6.0.0", - "@tonaljs/scale": "4.12.6" + "@tonaljs/chord": "6.1.0", + "@tonaljs/scale": "4.13.0" } }, "packages/midi": { - "name": "@tonaljs/midi", - "version": "4.9.3", + "version": "4.10.0", "license": "MIT", "dependencies": { "@tonaljs/pitch-note": "6.0.0" } }, "packages/mode": { - "name": "@tonaljs/mode", - "version": "4.8.4", + "version": "4.9.0", "license": "MIT", "dependencies": { - "@tonaljs/collection": "4.8.1", - "@tonaljs/interval": "5.0.0", - "@tonaljs/pcset": "4.9.2", - "@tonaljs/pitch-distance": "5.0.3", + "@tonaljs/collection": "4.9.0", + "@tonaljs/interval": "5.1.0", + "@tonaljs/pcset": "4.10.0", + "@tonaljs/pitch-distance": "5.0.4", "@tonaljs/pitch-note": "6.0.0", - "@tonaljs/scale-type": "4.8.5" + "@tonaljs/scale-type": "4.9.0" } }, "packages/modules": { - "name": "@tonaljs/modules", - "version": "4.8.6", + "version": "4.8.7", "license": "MIT", "dependencies": { - "tonal": "6.1.0" + "tonal": "6.2.0" } }, "packages/notation-scientific": { - "name": "@tonaljs/notation-scientific", "version": "4.8.1", "license": "MIT" }, "packages/note": { - "name": "@tonaljs/note", - "version": "4.10.3", + "version": "4.11.0", "license": "MIT", "dependencies": { - "@tonaljs/midi": "4.9.3", + "@tonaljs/midi": "4.10.0", "@tonaljs/pitch": "5.0.2", - "@tonaljs/pitch-distance": "5.0.3", + "@tonaljs/pitch-distance": "5.0.4", "@tonaljs/pitch-interval": "6.0.0", "@tonaljs/pitch-note": "6.0.0" } }, "packages/pcset": { - "name": "@tonaljs/pcset", - "version": "4.9.2", + "version": "4.10.0", "license": "MIT", "dependencies": { - "@tonaljs/collection": "4.8.1", + "@tonaljs/collection": "4.9.0", "@tonaljs/pitch": "5.0.2", - "@tonaljs/pitch-distance": "5.0.3", + "@tonaljs/pitch-distance": "5.0.4", "@tonaljs/pitch-interval": "6.0.0", "@tonaljs/pitch-note": "6.0.0" } }, "packages/pitch": { - "name": "@tonaljs/pitch", "version": "5.0.2", "license": "MIT" }, "packages/pitch-distance": { - "name": "@tonaljs/pitch-distance", - "version": "5.0.3", + "version": "5.0.4", "license": "MIT", "dependencies": { "@tonaljs/pitch": "5.0.2", @@ -9841,7 +8589,6 @@ } }, "packages/pitch-interval": { - "name": "@tonaljs/pitch-interval", "version": "6.0.0", "license": "MIT", "dependencies": { @@ -9849,7 +8596,6 @@ } }, "packages/pitch-note": { - "name": "@tonaljs/pitch-note", "version": "6.0.0", "license": "MIT", "dependencies": { @@ -9857,34 +8603,30 @@ } }, "packages/progression": { - "name": "@tonaljs/progression", - "version": "4.8.4", + "version": "4.9.0", "license": "MIT", "dependencies": { - "@tonaljs/chord": "6.0.0", - "@tonaljs/pitch-distance": "5.0.3", + "@tonaljs/chord": "6.1.0", + "@tonaljs/pitch-distance": "5.0.4", "@tonaljs/pitch-interval": "6.0.0", "@tonaljs/pitch-note": "6.0.0", - "@tonaljs/roman-numeral": "4.8.3" + "@tonaljs/roman-numeral": "4.9.0" } }, "packages/range": { - "name": "@tonaljs/range", - "version": "4.8.4", + "version": "4.9.0", "license": "MIT", "dependencies": { - "@tonaljs/collection": "4.8.1", - "@tonaljs/midi": "4.9.3" + "@tonaljs/collection": "4.9.0", + "@tonaljs/midi": "4.10.0" } }, "packages/rhythm-patterm": { - "name": "@tonaljs/rhythm-pattern", "version": "1.0.0", "license": "MIT" }, "packages/roman-numeral": { - "name": "@tonaljs/roman-numeral", - "version": "4.8.3", + "version": "4.9.0", "license": "MIT", "dependencies": { "@tonaljs/pitch": "5.0.2", @@ -9893,98 +8635,91 @@ } }, "packages/scale": { - "name": "@tonaljs/scale", - "version": "4.12.6", + "version": "4.13.0", "license": "MIT", "dependencies": { - "@tonaljs/chord-type": "5.0.5", - "@tonaljs/collection": "4.8.1", - "@tonaljs/note": "4.10.3", - "@tonaljs/pcset": "4.9.2", - "@tonaljs/pitch-distance": "5.0.3", + "@tonaljs/chord-type": "5.1.0", + "@tonaljs/collection": "4.9.0", + "@tonaljs/note": "4.11.0", + "@tonaljs/pcset": "4.10.0", + "@tonaljs/pitch-distance": "5.0.4", "@tonaljs/pitch-note": "6.0.0", - "@tonaljs/scale-type": "4.8.5" + "@tonaljs/scale-type": "4.9.0" } }, "packages/scale-dictionary": { - "name": "@tonaljs/scale-dictionary", - "version": "4.8.3", + "version": "4.8.4", "license": "MIT", "dependencies": { - "@tonaljs/scale-type": "4.8.5" + "@tonaljs/scale-type": "4.9.0" } }, "packages/scale-type": { - "name": "@tonaljs/scale-type", - "version": "4.8.5", + "version": "4.9.0", "license": "MIT", "dependencies": { - "@tonaljs/pcset": "4.9.2" + "@tonaljs/pcset": "4.10.0" } }, "packages/time-signature": { - "name": "@tonaljs/time-signature", - "version": "4.8.1", + "version": "4.9.0", "license": "MIT" }, "packages/tonal": { - "version": "6.1.0", + "version": "6.2.0", "license": "MIT", "dependencies": { - "@tonaljs/abc-notation": "4.8.3", + "@tonaljs/abc-notation": "4.9.0", "@tonaljs/array": "4.8.3", - "@tonaljs/chord": "6.0.0", - "@tonaljs/chord-type": "5.0.5", - "@tonaljs/collection": "4.8.1", - "@tonaljs/core": "5.0.0", - "@tonaljs/duration-value": "4.8.1", - "@tonaljs/interval": "5.0.0", - "@tonaljs/key": "4.9.4", - "@tonaljs/midi": "4.9.3", - "@tonaljs/mode": "4.8.4", - "@tonaljs/note": "4.10.3", - "@tonaljs/pcset": "4.9.2", - "@tonaljs/progression": "4.8.4", - "@tonaljs/range": "4.8.4", + "@tonaljs/chord": "6.1.0", + "@tonaljs/chord-type": "5.1.0", + "@tonaljs/collection": "4.9.0", + "@tonaljs/core": "5.0.1", + "@tonaljs/duration-value": "4.9.0", + "@tonaljs/interval": "5.1.0", + "@tonaljs/key": "4.10.0", + "@tonaljs/midi": "4.10.0", + "@tonaljs/mode": "4.9.0", + "@tonaljs/note": "4.11.0", + "@tonaljs/pcset": "4.10.0", + "@tonaljs/progression": "4.9.0", + "@tonaljs/range": "4.9.0", "@tonaljs/rhythm-pattern": "1.0.0", - "@tonaljs/roman-numeral": "4.8.3", - "@tonaljs/scale": "4.12.6", - "@tonaljs/scale-type": "4.8.5", - "@tonaljs/time-signature": "4.8.1", - "@tonaljs/voice-leading": "5.0.3", - "@tonaljs/voicing": "5.0.3", - "@tonaljs/voicing-dictionary": "5.0.3" + "@tonaljs/roman-numeral": "4.9.0", + "@tonaljs/scale": "4.13.0", + "@tonaljs/scale-type": "4.9.0", + "@tonaljs/time-signature": "4.9.0", + "@tonaljs/voice-leading": "5.1.0", + "@tonaljs/voicing": "5.1.0", + "@tonaljs/voicing-dictionary": "5.1.0" } }, "packages/voice-leading": { - "name": "@tonaljs/voice-leading", - "version": "5.0.3", + "version": "5.1.0", "license": "MIT", "dependencies": { - "@tonaljs/note": "4.10.3" + "@tonaljs/note": "4.11.0" } }, "packages/voicing": { - "name": "@tonaljs/voicing", - "version": "5.0.3", + "version": "5.1.0", "license": "MIT", "dependencies": { - "@tonaljs/chord": "6.0.0", - "@tonaljs/interval": "5.0.0", - "@tonaljs/note": "4.10.3", - "@tonaljs/range": "4.8.4", - "@tonaljs/voice-leading": "5.0.3", - "@tonaljs/voicing-dictionary": "5.0.3" + "@tonaljs/chord": "6.1.0", + "@tonaljs/interval": "5.1.0", + "@tonaljs/note": "4.11.0", + "@tonaljs/range": "4.9.0", + "@tonaljs/voice-leading": "5.1.0", + "@tonaljs/voicing-dictionary": "5.1.0" } }, "packages/voicing-dictionary": { - "name": "@tonaljs/voicing-dictionary", - "version": "5.0.3", + "version": "5.1.0", "license": "MIT", "dependencies": { - "@tonaljs/chord": "6.0.0", - "@tonaljs/note": "4.10.3", - "@tonaljs/voice-leading": "5.0.3" + "@tonaljs/chord": "6.1.0", + "@tonaljs/note": "4.11.0", + "@tonaljs/voice-leading": "5.1.0" } } } diff --git a/packages/tonal/browser/tonal.min.js b/packages/tonal/browser/tonal.min.js index 030a1b2c..4ca40d81 100644 --- a/packages/tonal/browser/tonal.min.js +++ b/packages/tonal/browser/tonal.min.js @@ -1,2 +1,2 @@ -"use strict";var Tonal=(()=>{var Ot=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var Mo=Object.getOwnPropertyNames;var ho=Object.prototype.hasOwnProperty;var f=(t,n)=>{for(var e in n)Ot(t,e,{get:n[e],enumerable:!0})},vo=(t,n,e,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of Mo(n))!ho.call(t,o)&&o!==e&&Ot(t,o,{get:()=>n[o],enumerable:!(r=Po(n,o))||r.enumerable});return t};var yo=t=>vo(Ot({},"__esModule",{value:!0}),t);var Mi={};f(Mi,{AbcNotation:()=>Ut,Array:()=>Ht,Chord:()=>rn,ChordDictionary:()=>pi,ChordType:()=>dt,Collection:()=>Xt,Core:()=>Rt,DurationValue:()=>on,Interval:()=>tn,Key:()=>Pn,Midi:()=>sn,Mode:()=>An,Note:()=>fn,PcSet:()=>di,Pcset:()=>ft,Progression:()=>gn,Range:()=>Sn,RhythmPattern:()=>jn,RomanNumeral:()=>dn,Scale:()=>En,ScaleDictionary:()=>Pi,ScaleType:()=>gt,TimeSignature:()=>Dn,Tonal:()=>fi,VoiceLeading:()=>wn,Voicing:()=>qn,VoicingDictionary:()=>Rn,accToAlt:()=>L,altToAcc:()=>F,chroma:()=>zn,coordToInterval:()=>q,coordToNote:()=>ct,coordinates:()=>K,deprecate:()=>Ln,distance:()=>y,fillStr:()=>co,height:()=>kt,interval:()=>l,isNamed:()=>uo,isNamedPitch:()=>C,isPitch:()=>V,midi:()=>Bn,note:()=>s,pitch:()=>X,stepToLetter:()=>Gt,tokenizeInterval:()=>qt,tokenizeNote:()=>Q,tonicIntervalsTransposer:()=>R,transpose:()=>d});var Ut={};f(Ut,{abcToScientificNotation:()=>nt,default:()=>Vo,distance:()=>ee,scientificToAbcNotation:()=>Bt,tokenize:()=>zt,transpose:()=>ne});function C(t){return t!==null&&typeof t=="object"&&"name"in t&&typeof t.name=="string"}var Gn=[0,2,4,5,7,9,11],zn=({step:t,alt:n})=>(Gn[t]+n+120)%12,kt=({step:t,alt:n,oct:e,dir:r=1})=>r*(Gn[t]+n+12*(e===void 0?-100:e)),Bn=t=>{let n=kt(t);return t.oct!==void 0&&n>=-12&&n<=115?n+12:null};function V(t){return t!==null&&typeof t=="object"&&"step"in t&&typeof t.step=="number"&&"alt"in t&&typeof t.alt=="number"&&!isNaN(t.step)&&!isNaN(t.alt)}var Un=[0,2,4,-1,1,3,5],Hn=Un.map(t=>Math.floor(t*7/12));function K(t){let{step:n,alt:e,oct:r,dir:o=1}=t,a=Un[n]+7*e;if(r===void 0)return[o*a];let i=r-Hn[n]-4*e;return[o*a,o*i]}var bo=[3,0,4,1,5,2,6];function X(t){let[n,e,r]=t,o=bo[Ao(n)],a=Math.floor((n+1)/7);if(e===void 0)return{step:o,alt:a,dir:r};let i=e+4*a+Hn[o];return{step:o,alt:a,oct:i,dir:r}}function Ao(t){let n=(t+1)%7;return n<0?7+n:n}var Kn=(t,n)=>Array(Math.abs(n)+1).join(t),$t=Object.freeze({empty:!0,name:"",num:NaN,q:"",type:"",step:NaN,alt:NaN,dir:NaN,simple:NaN,semitones:NaN,chroma:NaN,coord:[],oct:NaN}),go="([-+]?\\d+)(d{1,4}|m|M|P|A{1,4})",No="(AA|A|P|M|m|d|dd)([-+]?\\d+)",Io=new RegExp("^"+go+"|"+No+"$");function qt(t){let n=Io.exec(`${t}`);return n===null?["",""]:n[1]?[n[1],n[2]]:[n[4],n[3]]}var Xn={};function l(t){return typeof t=="string"?Xn[t]||(Xn[t]=So(t)):V(t)?l(To(t)):C(t)?l(t.name):$t}var Qn=[0,2,4,5,7,9,11],Jn="PMMPPMM";function So(t){let n=qt(t);if(n[0]==="")return $t;let e=+n[0],r=n[1],o=(Math.abs(e)-1)%7,a=Jn[o];if(a==="M"&&r==="P")return $t;let i=a==="M"?"majorable":"perfectable",m=""+e+r,c=e<0?-1:1,u=e===8||e===-8?e:c*(o+1),M=jo(i,r),v=Math.floor((Math.abs(e)-1)/7),p=c*(Qn[o]+M+12*v),x=(c*(Qn[o]+M)%12+12)%12,h=K({step:o,alt:M,oct:v,dir:c});return{empty:!1,name:m,num:e,q:r,step:o,alt:M,dir:c,type:i,simple:u,semitones:p,chroma:x,coord:h,oct:v}}function q(t,n){let[e,r=0]=t,o=e*7+r*12<0,a=n||o?[-e,-r,-1]:[e,r,1];return l(X(a))}function jo(t,n){return n==="M"&&t==="majorable"||n==="P"&&t==="perfectable"?0:n==="m"&&t==="majorable"?-1:/^A+$/.test(n)?n.length:/^d+$/.test(n)?-1*(t==="perfectable"?n.length:n.length+1):0}function To(t){let{step:n,alt:e,oct:r=0,dir:o}=t;if(!o)return"";let a=n+1+7*r,i=a===0?n+1:a,m=o<0?"-":"",c=Jn[n]==="M"?"majorable":"perfectable";return m+i+xo(c,e)}function xo(t,n){return n===0?t==="majorable"?"M":"P":n===-1&&t==="majorable"?"m":n>0?Kn("A",n):Kn("d",t==="perfectable"?n:n+1)}var Zn=(t,n)=>Array(Math.abs(n)+1).join(t),Yn=Object.freeze({empty:!0,name:"",letter:"",acc:"",pc:"",step:NaN,alt:NaN,chroma:NaN,height:NaN,coord:[],midi:null,freq:null}),Wn=new Map,Gt=t=>"CDEFGAB".charAt(t),F=t=>t<0?Zn("b",-t):Zn("#",t),L=t=>t[0]==="b"?-t.length:t.length;function s(t){let n=JSON.stringify(t),e=Wn.get(n);if(e)return e;let r=typeof t=="string"?Do(t):V(t)?s(_o(t)):C(t)?s(t.name):Yn;return Wn.set(n,r),r}var Co=/^([a-gA-G]?)(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)$/;function Q(t){let n=Co.exec(t);return n?[n[1].toUpperCase(),n[2].replace(/x/g,"##"),n[3],n[4]]:["","","",""]}function ct(t){return s(X(t))}var Eo=(t,n)=>(t%n+n)%n,Lt=[0,2,4,5,7,9,11];function Do(t){let n=Q(t);if(n[0]===""||n[3]!=="")return Yn;let e=n[0],r=n[1],o=n[2],a=(e.charCodeAt(0)+3)%7,i=L(r),m=o.length?+o:void 0,c=K({step:a,alt:i,oct:m}),u=e+r+o,M=e+r,v=(Lt[a]+i+120)%12,p=m===void 0?Eo(Lt[a]+i,12)-12*99:Lt[a]+i+12*(m+1),x=p>=0&&p<=127?p:null,h=m===void 0?null:Math.pow(2,(p-69)/12)*440;return{empty:!1,acc:r,alt:i,chroma:v,coord:c,freq:h,height:p,letter:e,midi:x,name:u,oct:m,pc:M,step:a}}function _o(t){let{step:n,alt:e,oct:r}=t,o=Gt(n);if(!o)return"";let a=o+F(e);return r||r===0?a+r:a}function d(t,n){let e=s(t),r=Array.isArray(n)?n:l(n).coord;if(e.empty||!r||r.length<2)return"";let o=e.coord,a=o.length===1?[o[0]+r[0]]:[o[0]+r[0],o[1]+r[1]];return ct(a).name}function R(t,n){let e=t.length;return r=>{if(!n)return"";let o=r<0?(e- -r%e)%e:r%e,a=Math.floor(r/e),i=d(n,[0,a]);return d(i,t[o])}}function y(t,n){let e=s(t),r=s(n);if(e.empty||r.empty)return"";let o=e.coord,a=r.coord,i=a[0]-o[0],m=o.length===2&&a.length===2?a[1]-o[1]:-Math.floor(i*7/12),c=r.height===e.height&&r.midi!==null&&e.oct===r.oct&&e.step>r.step;return q([i,m],c).name}var te=(t,n)=>Array(n+1).join(t),wo=/^(_{1,}|=|\^{1,}|)([abcdefgABCDEFG])([,']*)$/;function zt(t){let n=wo.exec(t);return n?[n[1],n[2],n[3]]:["","",""]}function nt(t){let[n,e,r]=zt(t);if(e==="")return"";let o=4;for(let i=0;i96?e.toUpperCase()+a+(o+1):e+a+o}function Bt(t){let n=s(t);if(n.empty||!n.oct&&n.oct!==0)return"";let{letter:e,acc:r,oct:o}=n,a=r[0]==="b"?r.replace(/b/g,"_"):r.replace(/#/g,"^"),i=o>4?e.toLowerCase():e,m=o===5?"":o>4?te("'",o-5):te(",",4-o);return a+i+m}function ne(t,n){return Bt(d(nt(t),n))}function ee(t,n){return y(nt(t),nt(n))}var Vo={abcToScientificNotation:nt,scientificToAbcNotation:Bt,tokenize:zt,transpose:ne,distance:ee};var Ht={};f(Ht,{compact:()=>$o,permutations:()=>oe,range:()=>Oo,rotate:()=>ko,shuffle:()=>Lo,sortedNoteNames:()=>re,sortedUniqNoteNames:()=>qo});function Fo(t,n){let e=[];for(;n--;e[n]=n+t);return e}function Ro(t,n){let e=[];for(;n--;e[n]=t-n);return e}function Oo(t,n){return tn===0||n)}function re(t){return t.map(e=>s(e)).filter(e=>!e.empty).sort((e,r)=>e.height-r.height).map(e=>e.name)}function qo(t){return re(t).filter((n,e,r)=>e===0||n!==r[e-1])}function Lo(t,n=Math.random){let e,r,o=t.length;for(;o;)e=Math.floor(n()*o--),r=t[o],t[o]=t[e],t[e]=r;return t}function oe(t){return t.length===0?[[]]:oe(t.slice(1)).reduce((n,e)=>n.concat(t.map((r,o)=>{let a=e.slice();return a.splice(o,0,t[0]),a})),[])}var rn={};f(rn,{chord:()=>$e,chordScales:()=>Le,default:()=>at,degrees:()=>Ue,detect:()=>pt,extended:()=>Ge,get:()=>w,getChord:()=>ot,notes:()=>Be,reduced:()=>ze,steps:()=>He,tokenize:()=>Y,transpose:()=>qe});var dt={};f(dt,{add:()=>Jt,addAlias:()=>Ae,all:()=>D,chordType:()=>Pe,default:()=>aa,entries:()=>ye,get:()=>rt,keys:()=>ve,names:()=>Me,removeAll:()=>be,symbols:()=>he});var ft={};f(ft,{EmptyPcset:()=>I,chroma:()=>ut,chromas:()=>fe,default:()=>Zo,filter:()=>pe,get:()=>P,includes:()=>Jo,intervals:()=>ce,isChroma:()=>et,isEqual:()=>de,isNoteIncludedIn:()=>lt,isSubsetOf:()=>G,isSupersetOf:()=>z,modes:()=>Z,notes:()=>le,num:()=>ue,pcset:()=>se});var Xt={};f(Xt,{compact:()=>J,default:()=>Bo,permutations:()=>Kt,range:()=>O,rotate:()=>E,shuffle:()=>ae});function Go(t,n){let e=[];for(;n--;e[n]=n+t);return e}function zo(t,n){let e=[];for(;n--;e[n]=t-n);return e}function O(t,n){return tn===0||n)}function ae(t,n=Math.random){let e,r,o=t.length;for(;o;)e=Math.floor(n()*o--),r=t[o],t[o]=t[e],t[e]=r;return t}function Kt(t){return t.length===0?[[]]:Kt(t.slice(1)).reduce((n,e)=>n.concat(t.map((r,o)=>{let a=e.slice();return a.splice(o,0,t[0]),a})),[])}var Bo={compact:J,permutations:Kt,range:O,rotate:E,shuffle:ae};var I={empty:!0,name:"",setNum:0,chroma:"000000000000",normalized:"000000000000",intervals:[]},Qt=t=>Number(t).toString(2).padStart(12,"0"),ie=t=>parseInt(t,2),Uo=/^[01]{12}$/;function et(t){return Uo.test(t)}var Ho=t=>typeof t=="number"&&t>=0&&t<=4095,Ko=t=>t&&et(t.chroma),me={[I.chroma]:I};function P(t){let n=et(t)?t:Ho(t)?Qt(t):Array.isArray(t)?ta(t):Ko(t)?t.chroma:I.chroma;return me[n]=me[n]||Yo(n)}var se=P,ut=t=>P(t).chroma,ce=t=>P(t).intervals,ue=t=>P(t).setNum,Xo=["1P","2m","2M","3m","3M","4P","5d","5P","6m","6M","7m","7M"];function Qo(t){let n=[];for(let e=0;e<12;e++)t.charAt(e)==="1"&&n.push(Xo[e]);return n}function le(t){return P(t).intervals.map(n=>d("C",n))}function fe(){return O(2048,4095).map(Qt)}function Z(t,n=!0){let r=P(t).chroma.split("");return J(r.map((o,a)=>{let i=E(a,r);return n&&i[0]==="0"?null:i.join("")}))}function de(t,n){return P(t).setNum===P(n).setNum}function G(t){let n=P(t).setNum;return e=>{let r=P(e).setNum;return n&&n!==r&&(r&n)===r}}function z(t){let n=P(t).setNum;return e=>{let r=P(e).setNum;return n&&n!==r&&(r|n)===r}}function lt(t){let n=P(t);return e=>{let r=s(e);return n&&!r.empty&&n.chroma.charAt(r.chroma)==="1"}}var Jo=lt;function pe(t){let n=lt(t);return e=>e.filter(n)}var Zo={get:P,chroma:ut,num:ue,intervals:ce,chromas:fe,isSupersetOf:z,isSubsetOf:G,isNoteIncludedIn:lt,isEqual:de,filter:pe,modes:Z,notes:le,pcset:se};function Wo(t){let n=t.split("");return n.map((e,r)=>E(r,n).join(""))}function Yo(t){let n=ie(t),e=Wo(t).map(ie).filter(a=>a>=2048).sort()[0],r=Qt(e),o=Qo(t);return{empty:!1,name:"",setNum:n,chroma:t,normalized:r,intervals:o}}function ta(t){if(t.length===0)return I.chroma;let n,e=[0,0,0,0,0,0,0,0,0,0,0,0];for(let r=0;rt.name).filter(t=>t)}function he(){return W.map(t=>t.aliases[0]).filter(t=>t)}function ve(){return Object.keys(B)}function D(){return W.slice()}var ye=D;function be(){W=[],B={}}function Jt(t,n,e){let r=oa(t),o={...P(t),name:e||"",quality:r,intervals:t,aliases:n};W.push(o),o.name&&(B[o.name]=o),B[o.setNum]=o,B[o.chroma]=o,o.aliases.forEach(a=>Ae(o,a))}function Ae(t,n){B[n]=t}function oa(t){let n=e=>t.indexOf(e)!==-1;return n("5A")?"Augmented":n("3M")?"Major":n("5d")?"Diminished":n("3m")?"Minor":"Unknown"}ea.forEach(([t,n,e])=>Jt(t.split(" "),e.split(" "),n));W.sort((t,n)=>t.setNum-n.setNum);var aa={names:Me,symbols:he,get:rt,all:D,add:Jt,removeAll:be,keys:ve,entries:ye,chordType:Pe};var ia=t=>{let n=t.reduce((e,r)=>{let o=s(r).chroma;return o!==void 0&&(e[o]=e[o]||s(r).name),e},{});return e=>n[e]};function pt(t,n={}){let e=t.map(o=>s(o).pc).filter(o=>o);return s.length===0?[]:da(e,1,n).filter(o=>o.weight).sort((o,a)=>a.weight-o.weight).map(o=>o.name)}var Pt={anyThirds:384,perfectFifth:16,nonPerfectFifths:40,anySeventh:3},Mt=t=>n=>!!(n&t),ma=Mt(Pt.anyThirds),sa=Mt(Pt.perfectFifth),ca=Mt(Pt.anySeventh),ua=Mt(Pt.nonPerfectFifths);function la(t){let n=parseInt(t.chroma,2);return ma(n)&&sa(n)&&ca(n)}function fa(t){let n=parseInt(t,2);return ua(n)?t:(n|16).toString(2)}function da(t,n,e){let r=t[0],o=s(r).chroma,a=ia(t),i=Z(t,!1),m=[];return i.forEach((c,u)=>{let M=e.assumePerfectFifth&&fa(c);D().filter(p=>e.assumePerfectFifth&&la(p)?p.chroma===M:p.chroma===c).forEach(p=>{let x=p.aliases[0],h=a(u);u!==o?m.push({weight:.5*n,name:`${h}${x}/${r}`}):m.push({weight:1*n,name:`${h}${x}`})})}),m}var tn={};f(tn,{add:()=>Wt,addTo:()=>Ee,default:()=>Yt,distance:()=>Ce,fromSemitones:()=>xe,get:()=>Zt,invert:()=>Te,name:()=>Ne,names:()=>ge,num:()=>je,quality:()=>Se,semitones:()=>Ie,simplify:()=>ht,subtract:()=>vt,transposeFifths:()=>yt});function ge(){return"1P 2M 3M 4P 5P 6m 7m".split(" ")}var Zt=l,Ne=t=>l(t).name,Ie=t=>l(t).semitones,Se=t=>l(t).q,je=t=>l(t).num;function ht(t){let n=l(t);return n.empty?"":n.simple+n.q}function Te(t){let n=l(t);if(n.empty)return"";let e=(7-n.step)%7,r=n.type==="perfectable"?-n.alt:-(n.alt+1);return l({step:e,alt:r,oct:n.oct,dir:n.dir}).name}var pa=[1,2,2,3,3,4,5,5,6,6,7,7],Pa="P m M m M P d P m M m M".split(" ");function xe(t){let n=t<0?-1:1,e=Math.abs(t),r=e%12,o=Math.floor(e/12);return n*(pa[r]+7*o)+Pa[r]}var Ce=y,Wt=De((t,n)=>[t[0]+n[0],t[1]+n[1]]),Ee=t=>n=>Wt(t,n),vt=De((t,n)=>[t[0]-n[0],t[1]-n[1]]);function yt(t,n){let e=Zt(t);if(e.empty)return"";let[r,o,a]=e.coord;return q([r+n,o,a]).name}var Yt={names:ge,get:Zt,name:Ne,num:je,semitones:Ie,quality:Se,fromSemitones:xe,distance:Ce,invert:Te,simplify:ht,add:Wt,addTo:Ee,subtract:vt,transposeFifths:yt};function De(t){return(n,e)=>{let r=l(n).coord,o=l(e).coord;if(r&&o){let a=t(r,o);return q(a).name}}}var gt={};f(gt,{NoScaleType:()=>_e,add:()=>nn,addAlias:()=>Oe,all:()=>_,default:()=>va,entries:()=>Ve,get:()=>H,keys:()=>Fe,names:()=>At,removeAll:()=>Re,scaleType:()=>we});var Ma=[["1P 2M 3M 5P 6M","major pentatonic","pentatonic"],["1P 2M 3M 4P 5P 6M 7M","major","ionian"],["1P 2M 3m 4P 5P 6m 7m","minor","aeolian"],["1P 2M 3m 3M 5P 6M","major blues"],["1P 3m 4P 5d 5P 7m","minor blues","blues"],["1P 2M 3m 4P 5P 6M 7M","melodic minor"],["1P 2M 3m 4P 5P 6m 7M","harmonic minor"],["1P 2M 3M 4P 5P 6M 7m 7M","bebop"],["1P 2M 3m 4P 5d 6m 6M 7M","diminished","whole-half diminished"],["1P 2M 3m 4P 5P 6M 7m","dorian"],["1P 2M 3M 4A 5P 6M 7M","lydian"],["1P 2M 3M 4P 5P 6M 7m","mixolydian","dominant"],["1P 2m 3m 4P 5P 6m 7m","phrygian"],["1P 2m 3m 4P 5d 6m 7m","locrian"],["1P 3M 4P 5P 7M","ionian pentatonic"],["1P 3M 4P 5P 7m","mixolydian pentatonic","indian"],["1P 2M 4P 5P 6M","ritusen"],["1P 2M 4P 5P 7m","egyptian"],["1P 3M 4P 5d 7m","neopolitan major pentatonic"],["1P 3m 4P 5P 6m","vietnamese 1"],["1P 2m 3m 5P 6m","pelog"],["1P 2m 4P 5P 6m","kumoijoshi"],["1P 2M 3m 5P 6m","hirajoshi"],["1P 2m 4P 5d 7m","iwato"],["1P 2m 4P 5P 7m","in-sen"],["1P 3M 4A 5P 7M","lydian pentatonic","chinese"],["1P 3m 4P 6m 7m","malkos raga"],["1P 3m 4P 5d 7m","locrian pentatonic","minor seven flat five pentatonic"],["1P 3m 4P 5P 7m","minor pentatonic","vietnamese 2"],["1P 3m 4P 5P 6M","minor six pentatonic"],["1P 2M 3m 5P 6M","flat three pentatonic","kumoi"],["1P 2M 3M 5P 6m","flat six pentatonic"],["1P 2m 3M 5P 6M","scriabin"],["1P 3M 5d 6m 7m","whole tone pentatonic"],["1P 3M 4A 5A 7M","lydian #5P pentatonic"],["1P 3M 4A 5P 7m","lydian dominant pentatonic"],["1P 3m 4P 5P 7M","minor #7M pentatonic"],["1P 3m 4d 5d 7m","super locrian pentatonic"],["1P 2M 3m 4P 5P 7M","minor hexatonic"],["1P 2A 3M 5P 5A 7M","augmented"],["1P 2M 4P 5P 6M 7m","piongio"],["1P 2m 3M 4A 6M 7m","prometheus neopolitan"],["1P 2M 3M 4A 6M 7m","prometheus"],["1P 2m 3M 5d 6m 7m","mystery #1"],["1P 2m 3M 4P 5A 6M","six tone symmetric"],["1P 2M 3M 4A 5A 6A","whole tone","messiaen's mode #1"],["1P 2m 4P 4A 5P 7M","messiaen's mode #5"],["1P 2M 3M 4P 5d 6m 7m","locrian major","arabian"],["1P 2m 3M 4A 5P 6m 7M","double harmonic lydian"],["1P 2m 2A 3M 4A 6m 7m","altered","super locrian","diminished whole tone","pomeroy"],["1P 2M 3m 4P 5d 6m 7m","locrian #2","half-diminished","aeolian b5"],["1P 2M 3M 4P 5P 6m 7m","mixolydian b6","melodic minor fifth mode","hindu"],["1P 2M 3M 4A 5P 6M 7m","lydian dominant","lydian b7","overtone"],["1P 2M 3M 4A 5A 6M 7M","lydian augmented"],["1P 2m 3m 4P 5P 6M 7m","dorian b2","phrygian #6","melodic minor second mode"],["1P 2m 3m 4d 5d 6m 7d","ultralocrian","superlocrian bb7","superlocrian diminished"],["1P 2m 3m 4P 5d 6M 7m","locrian 6","locrian natural 6","locrian sharp 6"],["1P 2A 3M 4P 5P 5A 7M","augmented heptatonic"],["1P 2M 3m 4A 5P 6M 7m","dorian #4","ukrainian dorian","romanian minor","altered dorian"],["1P 2M 3m 4A 5P 6M 7M","lydian diminished"],["1P 2M 3M 4A 5A 7m 7M","leading whole tone"],["1P 2M 3M 4A 5P 6m 7m","lydian minor"],["1P 2m 3M 4P 5P 6m 7m","phrygian dominant","spanish","phrygian major"],["1P 2m 3m 4P 5P 6m 7M","balinese"],["1P 2m 3m 4P 5P 6M 7M","neopolitan major"],["1P 2M 3M 4P 5P 6m 7M","harmonic major"],["1P 2m 3M 4P 5P 6m 7M","double harmonic major","gypsy"],["1P 2M 3m 4A 5P 6m 7M","hungarian minor"],["1P 2A 3M 4A 5P 6M 7m","hungarian major"],["1P 2m 3M 4P 5d 6M 7m","oriental"],["1P 2m 3m 3M 4A 5P 7m","flamenco"],["1P 2m 3m 4A 5P 6m 7M","todi raga"],["1P 2m 3M 4P 5d 6m 7M","persian"],["1P 2m 3M 5d 6m 7m 7M","enigmatic"],["1P 2M 3M 4P 5A 6M 7M","major augmented","major #5","ionian augmented","ionian #5"],["1P 2A 3M 4A 5P 6M 7M","lydian #9"],["1P 2m 2M 4P 4A 5P 6m 7M","messiaen's mode #4"],["1P 2m 3M 4P 4A 5P 6m 7M","purvi raga"],["1P 2m 3m 3M 4P 5P 6m 7m","spanish heptatonic"],["1P 2M 3m 3M 4P 5P 6M 7m","bebop minor"],["1P 2M 3M 4P 5P 5A 6M 7M","bebop major"],["1P 2m 3m 4P 5d 5P 6m 7m","bebop locrian"],["1P 2M 3m 4P 5P 6m 7m 7M","minor bebop"],["1P 2M 3M 4P 5d 5P 6M 7M","ichikosucho"],["1P 2M 3m 4P 5P 6m 6M 7M","minor six diminished"],["1P 2m 3m 3M 4A 5P 6M 7m","half-whole diminished","dominant diminished","messiaen's mode #2"],["1P 3m 3M 4P 5P 6M 7m 7M","kafi raga"],["1P 2M 3M 4P 4A 5A 6A 7M","messiaen's mode #6"],["1P 2M 3m 3M 4P 5d 5P 6M 7m","composite blues"],["1P 2M 3m 3M 4A 5P 6m 7m 7M","messiaen's mode #3"],["1P 2m 2M 3m 4P 4A 5P 6m 6M 7M","messiaen's mode #7"],["1P 2m 2M 3m 3M 4P 5d 5P 6m 6M 7m 7M","chromatic"]],ha=Ma,_e={...I,intervals:[],aliases:[]},bt=[],U={};function At(){return bt.map(t=>t.name)}function H(t){return U[t]||_e}var we=H;function _(){return bt.slice()}var Ve=_;function Fe(){return Object.keys(U)}function Re(){bt=[],U={}}function nn(t,n,e=[]){let r={...P(t),name:n,intervals:t,aliases:e};return bt.push(r),U[r.name]=r,U[r.setNum]=r,U[r.chroma]=r,r.aliases.forEach(o=>Oe(r,o)),r}function Oe(t,n){U[n]=t}ha.forEach(([t,n,...e])=>nn(t.split(" "),n,e));var va={names:At,get:H,all:_,add:nn,removeAll:Re,keys:Fe,entries:Ve,scaleType:we};var ke={empty:!0,name:"",symbol:"",root:"",bass:"",rootDegree:0,type:"",tonic:null,setNum:NaN,quality:"Unknown",chroma:"",normalized:"",aliases:[],notes:[],intervals:[]};function Y(t){let[n,e,r,o]=Q(t);return n===""?en("",t):n==="A"&&o==="ug"?en("","aug"):en(n+e,r+o)}function en(t,n){let e=n.split("/");if(e.length===1)return[t,e[0],""];let[r,o,a,i]=Q(e[1]);return r!==""&&a===""&&i===""?[t,e[0],r+o]:[t,n,""]}function w(t){if(Array.isArray(t))return ot(t[1]||"",t[0],t[2]);if(t==="")return ke;{let[n,e,r]=Y(t),o=ot(e,n,r);return o.empty?ot(t):o}}function ot(t,n,e){let r=rt(t),o=s(n||""),a=s(e||"");if(r.empty||n&&o.empty||e&&a.empty)return ke;let i=y(o.pc,a.pc),m=r.intervals.indexOf(i),c=m>=0,u=c?a:s(""),M=m===-1?NaN:m+1,v=a.pc&&a.pc!==o.pc,p=Array.from(r.intervals);if(c)for(let $=1;$d(o.pc,$));t=r.aliases.indexOf(t)!==-1?t:r.aliases[0];let h=`${o.empty?"":o.pc}${t}${c&&M>1?"/"+u.pc:v?"/"+a.pc:""}`,st=`${n?o.pc+" ":""}${r.name}${c&&M>1?" over "+u.pc:v?" over "+a.pc:""}`;return{...r,name:st,symbol:h,tonic:o.pc,type:r.name,root:u.pc,bass:v?a.pc:"",intervals:p,rootDegree:M,notes:x}}var $e=w;function qe(t,n){let[e,r,o]=Y(t);if(!e)return t;let a=d(o,n),i=a?"/"+a:"";return d(e,n)+r+i}function Le(t){let n=w(t),e=z(n.chroma);return _().filter(r=>e(r.chroma)).map(r=>r.name)}function Ge(t){let n=w(t),e=z(n.chroma);return D().filter(r=>e(r.chroma)).map(r=>n.tonic+r.aliases[0])}function ze(t){let n=w(t),e=G(n.chroma);return D().filter(r=>e(r.chroma)).map(r=>n.tonic+r.aliases[0])}function Be(t,n){let e=w(t),r=n||e.tonic;return!r||e.empty?[]:e.intervals.map(o=>d(r,o))}function Ue(t,n){let e=w(t),r=n||e.tonic,o=R(e.intervals,r);return a=>a?o(a>0?a-1:a):""}function He(t,n){let e=w(t),r=n||e.tonic;return R(e.intervals,r)}var at={getChord:ot,get:w,detect:pt,chordScales:Le,extended:Ge,reduced:ze,tokenize:Y,transpose:qe,degrees:Ue,steps:He,notes:Be,chord:$e};var on={};f(on,{default:()=>Na,fraction:()=>Je,get:()=>It,names:()=>Ke,shorthands:()=>Xe,value:()=>Qe});var ya=[[.125,"dl",["large","duplex longa","maxima","octuple","octuple whole"]],[.25,"l",["long","longa"]],[.5,"d",["double whole","double","breve"]],[1,"w",["whole","semibreve"]],[2,"h",["half","minim"]],[4,"q",["quarter","crotchet"]],[8,"e",["eighth","quaver"]],[16,"s",["sixteenth","semiquaver"]],[32,"t",["thirty-second","demisemiquaver"]],[64,"sf",["sixty-fourth","hemidemisemiquaver"]],[128,"h",["hundred twenty-eighth"]],[256,"th",["two hundred fifty-sixth"]]],ba=ya,Nt=[];ba.forEach(([t,n,e])=>Ia(t,n,e));var Aa={empty:!0,name:"",value:0,fraction:[0,0],shorthand:"",dots:"",names:[]};function Ke(){return Nt.reduce((t,n)=>(n.names.forEach(e=>t.push(e)),t),[])}function Xe(){return Nt.map(t=>t.shorthand)}var ga=/^([^.]+)(\.*)$/;function It(t){let[n,e,r]=ga.exec(t)||[],o=Nt.find(m=>m.shorthand===e||m.names.includes(e));if(!o)return Aa;let a=Sa(o.fraction,r.length),i=a[0]/a[1];return{...o,name:t,dots:r,value:i,fraction:a}}var Qe=t=>It(t).value,Je=t=>It(t).fraction,Na={names:Ke,shorthands:Xe,get:It,value:Qe,fraction:Je};function Ia(t,n,e){Nt.push({empty:!1,dots:"",name:"",value:1/t,fraction:t<1?[1/t,1]:[1,t],shorthand:n,names:e})}function Sa(t,n){let e=Math.pow(2,n),r=t[0]*e,o=t[1]*e,a=r;for(let i=0;iUa,majorKey:()=>Cr,majorTonicFromKeySignature:()=>Dr,minorKey:()=>Er});var fn={};f(fn,{accidentals:()=>ar,ascending:()=>Ct,chroma:()=>cr,default:()=>A,descending:()=>yr,distance:()=>dr,enharmonic:()=>Dt,freq:()=>sr,fromFreq:()=>ur,fromFreqSharps:()=>lr,fromMidi:()=>xt,fromMidiSharps:()=>fr,get:()=>b,midi:()=>mr,name:()=>rr,names:()=>er,octave:()=>ir,pitchClass:()=>or,simplify:()=>br,sortedNames:()=>ln,sortedUniqNames:()=>Et,tr:()=>pr,trBy:()=>Pr,trFifths:()=>hr,trFrom:()=>Mr,transpose:()=>j,transposeBy:()=>cn,transposeFifths:()=>tt,transposeFrom:()=>un,transposeOctaves:()=>vr});var sn={};f(sn,{chroma:()=>jt,default:()=>_a,freqToMidi:()=>it,isMidi:()=>an,midiToFreq:()=>Ze,midiToNoteName:()=>S,pcset:()=>Tt,pcsetDegrees:()=>Ye,pcsetNearest:()=>We,pcsetSteps:()=>mn,toMidi:()=>St});function an(t){return+t>=0&&+t<=127}function St(t){if(an(t))return+t;let n=s(t);return n.empty?null:n.midi}function Ze(t,n=440){return Math.pow(2,(t-69)/12)*n}var ja=Math.log(2),Ta=Math.log(440);function it(t){let n=12*(Math.log(t)-Ta)/ja+69;return Math.round(n*100)/100}var xa="C C# D D# E F F# G G# A A# B".split(" "),Ca="C Db D Eb E F Gb G Ab A Bb B".split(" ");function S(t,n={}){if(isNaN(t)||t===-1/0||t===1/0)return"";t=Math.round(t);let r=(n.sharps===!0?xa:Ca)[t%12];if(n.pitchClass)return r;let o=Math.floor(t/12)-1;return r+o}function jt(t){return t%12}function Ea(t){return t.split("").reduce((n,e,r)=>(r<12&&e==="1"&&n.push(r),n),[])}function Da(t){return t.map(jt).sort((n,e)=>n-e).filter((n,e,r)=>e===0||n!==r[e-1])}function Tt(t){return Array.isArray(t)?Da(t):Ea(t)}function We(t){let n=Tt(t);return e=>{let r=jt(e);for(let o=0;o<12;o++){if(n.includes(r+o))return e+o;if(n.includes(r-o))return e-o}}}function mn(t,n){let e=Tt(t),r=e.length;return o=>{let a=o<0?(r- -o%r)%r:o%r,i=Math.floor(o/r);return e[a]+i*12+n}}function Ye(t,n){let e=mn(t,n);return r=>{if(r!==0)return e(r>0?r-1:r)}}var _a={chroma:jt,freqToMidi:it,isMidi:an,midiToFreq:Ze,midiToNoteName:S,pcsetNearest:We,pcset:Tt,pcsetDegrees:Ye,pcsetSteps:mn,toMidi:St};var wa=["C","D","E","F","G","A","B"],tr=t=>t.name,nr=t=>t.map(s).filter(n=>!n.empty);function er(t){return t===void 0?wa.slice():Array.isArray(t)?nr(t).map(tr):[]}var b=s,rr=t=>b(t).name,or=t=>b(t).pc,ar=t=>b(t).acc,ir=t=>b(t).oct,mr=t=>b(t).midi,sr=t=>b(t).freq,cr=t=>b(t).chroma;function xt(t){return S(t)}function ur(t){return S(it(t))}function lr(t){return S(it(t),{sharps:!0})}function fr(t){return S(t,{sharps:!0})}var dr=y,j=d,pr=d,cn=t=>n=>j(n,t),Pr=cn,un=t=>n=>j(t,n),Mr=un;function tt(t,n){return j(t,[n,0])}var hr=tt;function vr(t,n){return j(t,[0,n])}var Ct=(t,n)=>t.height-n.height,yr=(t,n)=>n.height-t.height;function ln(t,n){return n=n||Ct,nr(t).sort(n).map(tr)}function Et(t){return ln(t,Ct).filter((n,e,r)=>e===0||n!==r[e-1])}var br=t=>{let n=b(t);return n.empty?"":S(n.midi||n.chroma,{sharps:n.alt>0,pitchClass:n.midi===null})};function Dt(t,n){let e=b(t);if(e.empty)return"";let r=b(n||S(e.midi||e.chroma,{sharps:e.alt<0,pitchClass:!0}));if(r.empty||r.chroma!==e.chroma)return"";if(e.oct===void 0)return r.pc;let o=e.chroma-e.alt,a=r.chroma-r.alt,i=o>11||a<0?-1:o<0||a>11?1:0,m=e.oct+i;return r.pc+m}var A={names:er,get:b,name:rr,pitchClass:or,accidentals:ar,octave:ir,midi:mr,ascending:Ct,descending:yr,distance:dr,sortedNames:ln,sortedUniqNames:Et,fromMidi:xt,fromMidiSharps:fr,freq:sr,fromFreq:ur,fromFreqSharps:lr,chroma:cr,transpose:j,tr:pr,transposeBy:cn,trBy:Pr,transposeFrom:un,trFrom:Mr,transposeFifths:tt,transposeOctaves:vr,trFifths:hr,simplify:br,enharmonic:Dt};var dn={};f(dn,{default:()=>ka,get:()=>g,names:()=>Ir,romanNumeral:()=>Nr,tokenize:()=>Sr});var gr={empty:!0,name:"",chordType:""},Ar={};function g(t){return typeof t=="string"?Ar[t]||(Ar[t]=Oa(t)):typeof t=="number"?g(_t[t]||""):V(t)?Va(t):C(t)?g(t.name):gr}var Nr=g;function Ir(t=!0){return(t?_t:Ra).slice()}function Va(t){return g(F(t.alt)+_t[t.step])}var Fa=/^(#{1,}|b{1,}|x{1,}|)(IV|I{1,3}|VI{0,2}|iv|i{1,3}|vi{0,2})([^IViv]*)$/;function Sr(t){return Fa.exec(t)||["","","",""]}var jr="I II III IV V VI VII",_t=jr.split(" "),Ra=jr.toLowerCase().split(" ");function Oa(t){let[n,e,r,o]=Sr(t);if(!r)return gr;let a=r.toUpperCase(),i=_t.indexOf(a),m=L(e),c=1;return{empty:!1,name:n,roman:r,interval:l({step:i,alt:m,dir:c}).name,acc:e,chordType:o,alt:m,step:i,major:r===a,oct:0,dir:c}}var ka={names:Ir,get:g,romanNumeral:Nr};var N=Object.freeze([]),Tr={type:"major",tonic:"",alteration:0,keySignature:""},wt={tonic:"",grades:N,intervals:N,scale:N,triads:N,chords:N,chordsHarmonicFunction:N,chordScales:N},$a={...Tr,...wt,type:"major",minorRelative:"",scale:N,secondaryDominants:N,secondaryDominantsMinorRelative:N,substituteDominants:N,substituteDominantsMinorRelative:N},qa={...Tr,type:"minor",relativeMajor:"",natural:wt,harmonic:wt,melodic:wt},pn=(t,n,e="")=>n.map((r,o)=>`${t[o]}${e}${r}`);function Vt(t,n,e,r,o){return a=>{let i=t.map(c=>g(c).interval||""),m=i.map(c=>j(a,c));return{tonic:a,grades:t,intervals:i,scale:m,triads:pn(m,n),chords:pn(m,e),chordsHarmonicFunction:r.slice(),chordScales:pn(m,o," ")}}}var xr=(t,n)=>{let e=s(t),r=s(n);return e.empty||r.empty?0:r.coord[0]-e.coord[0]},La=Vt("I II III IV V VI VII".split(" ")," m m m dim".split(" "),"maj7 m7 m7 maj7 7 m7 m7b5".split(" "),"T SD T SD D T D".split(" "),"major,dorian,phrygian,lydian,mixolydian,minor,locrian".split(",")),Ga=Vt("I II bIII IV V bVI bVII".split(" "),"m dim m m ".split(" "),"m7 m7b5 maj7 m7 m7 maj7 7".split(" "),"T SD T SD D SD SD".split(" "),"minor,locrian,major,dorian,phrygian,lydian,mixolydian".split(",")),za=Vt("I II bIII IV V bVI VII".split(" "),"m dim aug m dim".split(" "),"mMaj7 m7b5 +maj7 m7 7 maj7 o7".split(" "),"T SD T SD D SD D".split(" "),"harmonic minor,locrian 6,major augmented,lydian diminished,phrygian dominant,lydian #9,ultralocrian".split(",")),Ba=Vt("I II bIII IV V VI VII".split(" "),"m m aug dim dim".split(" "),"m6 m7 +maj7 7 7 m7b5 m7b5".split(" "),"T SD T SD D ".split(" "),"melodic minor,dorian b2,lydian augmented,lydian dominant,mixolydian b6,locrian #2,altered".split(","));function Cr(t){let n=s(t).pc;if(!n)return $a;let e=La(n),r=xr("C",n),o=a=>{let i=g(a);return i.empty?"":j(t,i.interval)+i.chordType};return{...e,type:"major",minorRelative:j(n,"-3m"),alteration:r,keySignature:F(r),secondaryDominants:"- VI7 VII7 I7 II7 III7 -".split(" ").map(o),secondaryDominantsMinorRelative:"- IIIm7b5 IV#m7 Vm7 VIm7 VIIm7b5 -".split(" ").map(o),substituteDominants:"- bIII7 IV7 bV7 bVI7 bVII7 -".split(" ").map(o),substituteDominantsMinorRelative:"- IIIm7 Im7 IIbm7 VIm7 IVm7 -".split(" ").map(o)}}function Er(t){let n=s(t).pc;if(!n)return qa;let e=xr("C",n)-3;return{type:"minor",tonic:n,relativeMajor:j(n,"3m"),alteration:e,keySignature:F(e),natural:Ga(n),harmonic:za(n),melodic:Ba(n)}}function Dr(t){return typeof t=="number"?tt("C",t):typeof t=="string"&&/^b+|#+$/.test(t)?tt("C",L(t)):null}var Ua={majorKey:Cr,majorTonicFromKeySignature:Dr,minorKey:Er};var An={};f(An,{all:()=>yn,default:()=>Ka,distance:()=>bn,entries:()=>Vr,get:()=>k,mode:()=>wr,names:()=>Fr,notes:()=>Rr,relativeTonic:()=>qr,seventhChords:()=>$r,triads:()=>kr});var hn=[[0,2773,0,"ionian","","Maj7","major"],[1,2902,2,"dorian","m","m7"],[2,3418,4,"phrygian","m","m7"],[3,2741,-1,"lydian","","Maj7"],[4,2774,1,"mixolydian","","7"],[5,2906,3,"aeolian","m","m7","minor"],[6,3434,5,"locrian","dim","m7b5"]],_r={...I,name:"",alt:0,modeNum:NaN,triad:"",seventh:"",aliases:[]},vn=hn.map(Ha),Mn={};vn.forEach(t=>{Mn[t.name]=t,t.aliases.forEach(n=>{Mn[n]=t})});function k(t){return typeof t=="string"?Mn[t.toLowerCase()]||_r:t&&t.name?k(t.name):_r}var wr=k;function yn(){return vn.slice()}var Vr=yn;function Fr(){return vn.map(t=>t.name)}function Ha(t){let[n,e,r,o,a,i,m]=t,c=m?[m]:[],u=Number(e).toString(2);return{empty:!1,intervals:H(o).intervals,modeNum:n,chroma:u,normalized:u,name:o,setNum:e,alt:r,triad:a,seventh:i,aliases:c}}function Rr(t,n){return k(t).intervals.map(e=>d(n,e))}function Or(t){return(n,e)=>{let r=k(n);if(r.empty)return[];let o=E(r.modeNum,t),a=r.intervals.map(i=>d(e,i));return o.map((i,m)=>a[m]+i)}}var kr=Or(hn.map(t=>t[4])),$r=Or(hn.map(t=>t[5]));function bn(t,n){let e=k(n),r=k(t);return e.empty||r.empty?"":ht(yt("1P",r.alt-e.alt))}function qr(t,n,e){return d(e,bn(t,n))}var Ka={get:k,names:Fr,all:yn,distance:bn,relativeTonic:qr,notes:Rr,triads:kr,seventhChords:$r,entries:Vr,mode:wr};var gn={};f(gn,{default:()=>Xa,fromRomanNumerals:()=>Lr,toRomanNumerals:()=>Gr});function Lr(t,n){return n.map(g).map(r=>d(t,l(r))+r.chordType)}function Gr(t,n){return n.map(e=>{let[r,o]=Y(e),a=y(t,r);return g(l(a)).name+o})}var Xa={fromRomanNumerals:Lr,toRomanNumerals:Gr};var Sn={};f(Sn,{chromatic:()=>zr,default:()=>In,numeric:()=>Nn});function Nn(t){let n=J(t.map(e=>typeof e=="number"?e:St(e)));return!t.length||n.length!==t.length?[]:n.reduce((e,r)=>{let o=e[e.length-1];return e.concat(O(o,r).slice(1))},[n[0]])}function zr(t,n){return Nn(t).map(e=>S(e,n))}var In={numeric:Nn,chromatic:zr};var jn={};f(jn,{binary:()=>Qa,euclid:()=>ni,hex:()=>Ja,onsets:()=>Za,probability:()=>Ya,random:()=>Wa,rotate:()=>ti});function Qa(...t){return t.reduce((n,e)=>(e.toString(2).split("").forEach(r=>{n.push(parseInt(r))}),n),[])}function Ja(t){let n=[];for(let e=0;e{n.push(a==="1"?1:0)})}return n}function Za(...t){return t.reduce((n,e)=>{n.push(1);for(let r=0;r=n?1:0);return r}function Ya(t,n=Math.random){return t.map(e=>n()<=e?1:0)}function ti(t,n){let e=t.length,r=[];for(let o=0;ooi,degrees:()=>Zr,detect:()=>Hr,extended:()=>xn,get:()=>T,modeNames:()=>Qr,names:()=>Br,rangeOf:()=>Jr,reduced:()=>Xr,scale:()=>Ur,scaleChords:()=>Kr,scaleNotes:()=>Cn,steps:()=>Wr,tokenize:()=>Tn});var ei={empty:!0,name:"",type:"",tonic:null,setNum:NaN,chroma:"",normalized:"",aliases:[],notes:[],intervals:[]};function Tn(t){if(typeof t!="string")return["",""];let n=t.indexOf(" "),e=s(t.substring(0,n));if(e.empty){let o=s(t);return o.empty?["",t]:[o.name,""]}let r=t.substring(e.name.length+1).toLowerCase();return[e.name,r.length?r:""]}var Br=At;function T(t){let n=Array.isArray(t)?t:Tn(t),e=s(n[0]).name,r=H(n[1]);if(r.empty)return ei;let o=r.name,a=e?r.intervals.map(m=>d(e,m)):[],i=e?e+" "+o:o;return{...r,name:i,type:o,tonic:e,notes:a}}var Ur=T;function Hr(t,n={}){let e=ut(t),r=s(n.tonic??t[0]??""),o=r.chroma;if(o===void 0)return[];let a=e.split("");a[o]="1";let i=E(o,a).join(""),m=_().find(u=>u.chroma===i),c=[];return m&&c.push(r.name+" "+m.name),n.match==="exact"||xn(i).forEach(u=>{c.push(r.name+" "+u)}),c}function Kr(t){let n=T(t),e=G(n.chroma);return D().filter(r=>e(r.chroma)).map(r=>r.aliases[0])}function xn(t){let n=et(t)?t:T(t).chroma,e=z(n);return _().filter(r=>e(r.chroma)).map(r=>r.name)}function Xr(t){let n=G(T(t).chroma);return _().filter(e=>n(e.chroma)).map(e=>e.name)}function Cn(t){let n=t.map(o=>s(o).pc).filter(o=>o),e=n[0],r=Et(n);return E(r.indexOf(e),r)}function Qr(t){let n=T(t);if(n.empty)return[];let e=n.tonic?n.notes:n.intervals;return Z(n.chroma).map((r,o)=>{let a=T(r).name;return a?[e[o],a]:["",""]}).filter(r=>r[0])}function ri(t){let n=Array.isArray(t)?Cn(t):T(t).notes,e=n.map(r=>s(r).chroma);return r=>{let o=typeof r=="number"?s(xt(r)):s(r),a=o.height;if(a===void 0)return;let i=a%12,m=e.indexOf(i);if(m!==-1)return Dt(o.name,n[m])}}function Jr(t){let n=ri(t);return(e,r)=>{let o=s(e).height,a=s(r).height;return o===void 0||a===void 0?[]:O(o,a).map(n).filter(i=>i)}}function Zr(t){let{intervals:n,tonic:e}=T(t),r=R(n,e);return o=>o?r(o>0?o-1:o):""}function Wr(t){let{intervals:n,tonic:e}=T(t);return R(n,e)}var oi={degrees:Zr,detect:Hr,extended:xn,get:T,modeNames:Qr,names:Br,rangeOf:Jr,reduced:Xr,scaleChords:Kr,scaleNotes:Cn,steps:Wr,tokenize:Tn,scale:Ur};var Dn={};f(Dn,{default:()=>si,get:()=>no,names:()=>to,parse:()=>Ft});var ai={empty:!0,name:"",upper:void 0,lower:void 0,type:void 0,additive:[]},ii=["4/4","3/4","2/4","2/2","12/8","9/8","6/8","3/8"];function to(){return ii.slice()}var mi=/^(\d*\d(?:\+\d)*)\/(\d+)$/,Yr=new Map;function no(t){let n=JSON.stringify(t),e=Yr.get(n);if(e)return e;let r=ui(Ft(t));return Yr.set(n,r),r}function Ft(t){if(typeof t=="string"){let[a,i,m]=mi.exec(t)||[];return Ft([i,m])}let[n,e]=t,r=+e;if(typeof n=="number")return[n,r];let o=n.split("+").map(a=>+a);return o.length===1?[o[0],r]:[o,r]}var si={names:to,parse:Ft,get:no},ci=t=>Math.log(t)/Math.log(2)%1===0;function ui([t,n]){let e=Array.isArray(t)?t.reduce((m,c)=>m+c,0):t,r=n;if(e===0||r===0)return ai;let o=Array.isArray(t)?`${t.join("+")}/${n}`:`${t}/${n}`,a=Array.isArray(t)?t:[],i=r===4||r===2?"simple":r===8&&e%3===0?"compound":ci(r)?"irregular":"irrational";return{empty:!1,name:o,type:i,upper:e,lower:r,additive:a}}var wn={};f(wn,{default:()=>_n,topNoteDiff:()=>eo});var eo=(t,n)=>{if(!n||!n.length)return t[0];let e=o=>A.midi(o[o.length-1])||0,r=o=>Math.abs(e(n)-e(o));return t.sort((o,a)=>r(o)-r(a))[0]},_n={topNoteDiff:eo};var qn={};f(qn,{default:()=>li,get:()=>kn,search:()=>$n,sequence:()=>so});var Rn={};f(Rn,{all:()=>oo,default:()=>mt,defaultDictionary:()=>Fn,lefthand:()=>Vn,lookup:()=>ao,triads:()=>ro});var ro={M:["1P 3M 5P","3M 5P 8P","5P 8P 10M"],m:["1P 3m 5P","3m 5P 8P","5P 8P 10m"],o:["1P 3m 5d","3m 5d 8P","5d 8P 10m"],aug:["1P 3m 5A","3m 5A 8P","5A 8P 10m"]},Vn={m7:["3m 5P 7m 9M","7m 9M 10m 12P"],7:["3M 6M 7m 9M","7m 9M 10M 13M"],"^7":["3M 5P 7M 9M","7M 9M 10M 12P"],69:["3M 5P 6A 9M"],m7b5:["3m 5d 7m 8P","7m 8P 10m 12d"],"7b9":["3M 6m 7m 9m","7m 9m 10M 13m"],"7b13":["3M 6m 7m 9m","7m 9m 10M 13m"],o7:["1P 3m 5d 6M","5d 6M 8P 10m"],"7#11":["7m 9M 11A 13A"],"7#9":["3M 7m 9A"],mM7:["3m 5P 7M 9M","7M 9M 10m 12P"],m6:["3m 5P 6M 9M","6M 9M 10m 12P"]},oo={M:["1P 3M 5P","3M 5P 8P","5P 8P 10M"],m:["1P 3m 5P","3m 5P 8P","5P 8P 10m"],o:["1P 3m 5d","3m 5d 8P","5d 8P 10m"],aug:["1P 3m 5A","3m 5A 8P","5A 8P 10m"],m7:["3m 5P 7m 9M","7m 9M 10m 12P"],7:["3M 6M 7m 9M","7m 9M 10M 13M"],"^7":["3M 5P 7M 9M","7M 9M 10M 12P"],69:["3M 5P 6A 9M"],m7b5:["3m 5d 7m 8P","7m 8P 10m 12d"],"7b9":["3M 6m 7m 9m","7m 9m 10M 13m"],"7b13":["3M 6m 7m 9m","7m 9m 10M 13m"],o7:["1P 3m 5d 6M","5d 6M 8P 10m"],"7#11":["7m 9M 11A 13A"],"7#9":["3M 7m 9A"],mM7:["3m 5P 7M 9M","7M 9M 10m 12P"],m6:["3m 5P 6M 9M","6M 9M 10m 12P"]},Fn=Vn;function ao(t,n=Fn){if(n[t])return n[t];let{aliases:e}=at.get("C"+t),r=Object.keys(n).find(o=>e.includes(o))||"";if(r!==void 0)return n[r]}var mt={lookup:ao,lefthand:Vn,triads:ro,all:oo,defaultDictionary:Fn};var On=["C3","C5"],io=mt.all,mo=_n.topNoteDiff;function kn(t,n=On,e=io,r=mo,o){let a=$n(t,n,e);return!o||!o.length?a[0]:r(a,o)}function $n(t,n=On,e=mt.triads){let[r,o]=at.tokenize(t),a=mt.lookup(o,e);if(!a)return[];let i=a.map(c=>c.split(" ")),m=In.chromatic(n);return i.reduce((c,u)=>{let M=u.map(h=>Yt.subtract(h,u[0])||""),v=A.transpose(r,u[0]),x=m.filter(h=>A.chroma(h)===A.chroma(v)).filter(h=>(A.midi(A.transpose(h,M[M.length-1]))||0)<=(A.midi(n[1])||0)).map(h=>A.enharmonic(h,v)).map(h=>M.map(st=>A.transpose(h,st)));return c.concat(x)},[])}function so(t,n=On,e=io,r=mo,o){let{voicings:a}=t.reduce(({voicings:i,lastVoicing:m},c)=>{let u=kn(c,n,e,r,m);return m=u,i.push(u),{voicings:i,lastVoicing:m}},{voicings:[],lastVoicing:o});return a}var li={get:kn,search:$n,sequence:so};var Rt={};f(Rt,{accToAlt:()=>L,altToAcc:()=>F,chroma:()=>zn,coordToInterval:()=>q,coordToNote:()=>ct,coordinates:()=>K,deprecate:()=>Ln,distance:()=>y,fillStr:()=>co,height:()=>kt,interval:()=>l,isNamed:()=>uo,isNamedPitch:()=>C,isPitch:()=>V,midi:()=>Bn,note:()=>s,pitch:()=>X,stepToLetter:()=>Gt,tokenizeInterval:()=>qt,tokenizeNote:()=>Q,tonicIntervalsTransposer:()=>R,transpose:()=>d});var co=(t,n)=>Array(Math.abs(n)+1).join(t);function Ln(t,n,e){return function(...r){return console.warn(`${t} is deprecated. Use ${n}.`),e.apply(this,r)}}var uo=Ln("isNamed","isNamedPitch",C);var fi=Rt,di=ft,pi=dt,Pi=gt;return yo(Mi);})(); +"use strict";var Tonal=(()=>{var Ot=Object.defineProperty;var fo=Object.getOwnPropertyDescriptor;var po=Object.getOwnPropertyNames;var Po=Object.prototype.hasOwnProperty;var f=(t,n)=>{for(var e in n)Ot(t,e,{get:n[e],enumerable:!0})},Mo=(t,n,e,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of po(n))!Po.call(t,o)&&o!==e&&Ot(t,o,{get:()=>n[o],enumerable:!(r=fo(n,o))||r.enumerable});return t};var ho=t=>Mo(Ot({},"__esModule",{value:!0}),t);var Pm={};f(Pm,{AbcNotation:()=>Ut,Array:()=>Ht,Chord:()=>rn,ChordDictionary:()=>dm,ChordType:()=>dt,Collection:()=>Xt,Core:()=>Rt,DurationValue:()=>on,Interval:()=>tn,Key:()=>Pn,Midi:()=>sn,Mode:()=>An,Note:()=>fn,PcSet:()=>fm,Pcset:()=>ft,Progression:()=>gn,Range:()=>Sn,RhythmPattern:()=>jn,RomanNumeral:()=>dn,Scale:()=>En,ScaleDictionary:()=>pm,ScaleType:()=>gt,TimeSignature:()=>Dn,Tonal:()=>lm,VoiceLeading:()=>wn,Voicing:()=>qn,VoicingDictionary:()=>Rn,accToAlt:()=>L,altToAcc:()=>F,chroma:()=>zn,coordToInterval:()=>q,coordToNote:()=>ct,coordinates:()=>K,deprecate:()=>Ln,distance:()=>y,fillStr:()=>io,height:()=>kt,interval:()=>l,isNamed:()=>so,isNamedPitch:()=>E,isPitch:()=>V,midi:()=>Bn,note:()=>s,pitch:()=>X,stepToLetter:()=>Gt,tokenizeInterval:()=>qt,tokenizeNote:()=>Q,tonicIntervalsTransposer:()=>R,transpose:()=>d});var Ut={};f(Ut,{abcToScientificNotation:()=>nt,default:()=>_o,distance:()=>ee,scientificToAbcNotation:()=>Bt,tokenize:()=>zt,transpose:()=>ne});function E(t){return t!==null&&typeof t=="object"&&"name"in t&&typeof t.name=="string"}var Gn=[0,2,4,5,7,9,11],zn=({step:t,alt:n})=>(Gn[t]+n+120)%12,kt=({step:t,alt:n,oct:e,dir:r=1})=>r*(Gn[t]+n+12*(e===void 0?-100:e)),Bn=t=>{let n=kt(t);return t.oct!==void 0&&n>=-12&&n<=115?n+12:null};function V(t){return t!==null&&typeof t=="object"&&"step"in t&&typeof t.step=="number"&&"alt"in t&&typeof t.alt=="number"&&!isNaN(t.step)&&!isNaN(t.alt)}var Un=[0,2,4,-1,1,3,5],Hn=Un.map(t=>Math.floor(t*7/12));function K(t){let{step:n,alt:e,oct:r,dir:o=1}=t,a=Un[n]+7*e;if(r===void 0)return[o*a];let m=r-Hn[n]-4*e;return[o*a,o*m]}var vo=[3,0,4,1,5,2,6];function X(t){let[n,e,r]=t,o=vo[yo(n)],a=Math.floor((n+1)/7);if(e===void 0)return{step:o,alt:a,dir:r};let m=e+4*a+Hn[o];return{step:o,alt:a,oct:m,dir:r}}function yo(t){let n=(t+1)%7;return n<0?7+n:n}var Kn=(t,n)=>Array(Math.abs(n)+1).join(t),$t=Object.freeze({empty:!0,name:"",num:NaN,q:"",type:"",step:NaN,alt:NaN,dir:NaN,simple:NaN,semitones:NaN,chroma:NaN,coord:[],oct:NaN}),bo="([-+]?\\d+)(d{1,4}|m|M|P|A{1,4})",Ao="(AA|A|P|M|m|d|dd)([-+]?\\d+)",go=new RegExp("^"+bo+"|"+Ao+"$");function qt(t){let n=go.exec(`${t}`);return n===null?["",""]:n[1]?[n[1],n[2]]:[n[4],n[3]]}var Xn={};function l(t){return typeof t=="string"?Xn[t]||(Xn[t]=No(t)):V(t)?l(So(t)):E(t)?l(t.name):$t}var Qn=[0,2,4,5,7,9,11],Jn="PMMPPMM";function No(t){let n=qt(t);if(n[0]==="")return $t;let e=+n[0],r=n[1],o=(Math.abs(e)-1)%7,a=Jn[o];if(a==="M"&&r==="P")return $t;let m=a==="M"?"majorable":"perfectable",i=""+e+r,c=e<0?-1:1,u=e===8||e===-8?e:c*(o+1),M=Io(m,r),v=Math.floor((Math.abs(e)-1)/7),p=c*(Qn[o]+M+12*v),C=(c*(Qn[o]+M)%12+12)%12,h=K({step:o,alt:M,oct:v,dir:c});return{empty:!1,name:i,num:e,q:r,step:o,alt:M,dir:c,type:m,simple:u,semitones:p,chroma:C,coord:h,oct:v}}function q(t,n){let[e,r=0]=t,o=e*7+r*12<0,a=n||o?[-e,-r,-1]:[e,r,1];return l(X(a))}function Io(t,n){return n==="M"&&t==="majorable"||n==="P"&&t==="perfectable"?0:n==="m"&&t==="majorable"?-1:/^A+$/.test(n)?n.length:/^d+$/.test(n)?-1*(t==="perfectable"?n.length:n.length+1):0}function So(t){let{step:n,alt:e,oct:r=0,dir:o}=t;if(!o)return"";let a=n+1+7*r,m=a===0?n+1:a,i=o<0?"-":"",c=Jn[n]==="M"?"majorable":"perfectable";return i+m+jo(c,e)}function jo(t,n){return n===0?t==="majorable"?"M":"P":n===-1&&t==="majorable"?"m":n>0?Kn("A",n):Kn("d",t==="perfectable"?n:n+1)}var Zn=(t,n)=>Array(Math.abs(n)+1).join(t),Yn=Object.freeze({empty:!0,name:"",letter:"",acc:"",pc:"",step:NaN,alt:NaN,chroma:NaN,height:NaN,coord:[],midi:null,freq:null}),Wn=new Map,Gt=t=>"CDEFGAB".charAt(t),F=t=>t<0?Zn("b",-t):Zn("#",t),L=t=>t[0]==="b"?-t.length:t.length;function s(t){let n=JSON.stringify(t),e=Wn.get(n);if(e)return e;let r=typeof t=="string"?Co(t):V(t)?s(Eo(t)):E(t)?s(t.name):Yn;return Wn.set(n,r),r}var To=/^([a-gA-G]?)(#{1,}|b{1,}|x{1,}|)(-?\d*)\s*(.*)$/;function Q(t){let n=To.exec(t);return n?[n[1].toUpperCase(),n[2].replace(/x/g,"##"),n[3],n[4]]:["","","",""]}function ct(t){return s(X(t))}var xo=(t,n)=>(t%n+n)%n,Lt=[0,2,4,5,7,9,11];function Co(t){let n=Q(t);if(n[0]===""||n[3]!=="")return Yn;let e=n[0],r=n[1],o=n[2],a=(e.charCodeAt(0)+3)%7,m=L(r),i=o.length?+o:void 0,c=K({step:a,alt:m,oct:i}),u=e+r+o,M=e+r,v=(Lt[a]+m+120)%12,p=i===void 0?xo(Lt[a]+m,12)-12*99:Lt[a]+m+12*(i+1),C=p>=0&&p<=127?p:null,h=i===void 0?null:Math.pow(2,(p-69)/12)*440;return{empty:!1,acc:r,alt:m,chroma:v,coord:c,freq:h,height:p,letter:e,midi:C,name:u,oct:i,pc:M,step:a}}function Eo(t){let{step:n,alt:e,oct:r}=t,o=Gt(n);if(!o)return"";let a=o+F(e);return r||r===0?a+r:a}function d(t,n){let e=s(t),r=Array.isArray(n)?n:l(n).coord;if(e.empty||!r||r.length<2)return"";let o=e.coord,a=o.length===1?[o[0]+r[0]]:[o[0]+r[0],o[1]+r[1]];return ct(a).name}function R(t,n){let e=t.length;return r=>{if(!n)return"";let o=r<0?(e- -r%e)%e:r%e,a=Math.floor(r/e),m=d(n,[0,a]);return d(m,t[o])}}function y(t,n){let e=s(t),r=s(n);if(e.empty||r.empty)return"";let o=e.coord,a=r.coord,m=a[0]-o[0],i=o.length===2&&a.length===2?a[1]-o[1]:-Math.floor(m*7/12),c=r.height===e.height&&r.midi!==null&&e.oct===r.oct&&e.step>r.step;return q([m,i],c).name}var te=(t,n)=>Array(n+1).join(t),Do=/^(_{1,}|=|\^{1,}|)([abcdefgABCDEFG])([,']*)$/;function zt(t){let n=Do.exec(t);return n?[n[1],n[2],n[3]]:["","",""]}function nt(t){let[n,e,r]=zt(t);if(e==="")return"";let o=4;for(let m=0;m96?e.toUpperCase()+a+(o+1):e+a+o}function Bt(t){let n=s(t);if(n.empty||!n.oct&&n.oct!==0)return"";let{letter:e,acc:r,oct:o}=n,a=r[0]==="b"?r.replace(/b/g,"_"):r.replace(/#/g,"^"),m=o>4?e.toLowerCase():e,i=o===5?"":o>4?te("'",o-5):te(",",4-o);return a+m+i}function ne(t,n){return Bt(d(nt(t),n))}function ee(t,n){return y(nt(t),nt(n))}var _o={abcToScientificNotation:nt,scientificToAbcNotation:Bt,tokenize:zt,transpose:ne,distance:ee};var Ht={};f(Ht,{compact:()=>Oo,permutations:()=>oe,range:()=>Fo,rotate:()=>Ro,shuffle:()=>$o,sortedNoteNames:()=>re,sortedUniqNoteNames:()=>ko});function wo(t,n){let e=[];for(;n--;e[n]=n+t);return e}function Vo(t,n){let e=[];for(;n--;e[n]=t-n);return e}function Fo(t,n){return tn===0||n)}function re(t){return t.map(e=>s(e)).filter(e=>!e.empty).sort((e,r)=>e.height-r.height).map(e=>e.name)}function ko(t){return re(t).filter((n,e,r)=>e===0||n!==r[e-1])}function $o(t,n=Math.random){let e,r,o=t.length;for(;o;)e=Math.floor(n()*o--),r=t[o],t[o]=t[e],t[e]=r;return t}function oe(t){return t.length===0?[[]]:oe(t.slice(1)).reduce((n,e)=>n.concat(t.map((r,o)=>{let a=e.slice();return a.splice(o,0,t[0]),a})),[])}var rn={};f(rn,{chord:()=>Oe,chordScales:()=>$e,default:()=>at,degrees:()=>ze,detect:()=>pt,extended:()=>qe,get:()=>w,getChord:()=>ot,notes:()=>Ge,reduced:()=>Le,steps:()=>Be,tokenize:()=>Y,transpose:()=>ke});var dt={};f(dt,{add:()=>Jt,addAlias:()=>ye,all:()=>S,default:()=>oa,entries:()=>ea,get:()=>rt,keys:()=>he,names:()=>Pe,removeAll:()=>ve,symbols:()=>Me});var ft={};f(ft,{EmptyPcset:()=>I,chroma:()=>ut,chromas:()=>fe,default:()=>Qo,filter:()=>pe,get:()=>P,includes:()=>Xo,intervals:()=>ce,isChroma:()=>et,isEqual:()=>de,isNoteIncludedIn:()=>lt,isSubsetOf:()=>G,isSupersetOf:()=>z,modes:()=>Z,notes:()=>le,num:()=>ue,pcset:()=>se});var Xt={};f(Xt,{compact:()=>J,default:()=>Go,permutations:()=>Kt,range:()=>O,rotate:()=>D,shuffle:()=>ae});function qo(t,n){let e=[];for(;n--;e[n]=n+t);return e}function Lo(t,n){let e=[];for(;n--;e[n]=t-n);return e}function O(t,n){return tn===0||n)}function ae(t,n=Math.random){let e,r,o=t.length;for(;o;)e=Math.floor(n()*o--),r=t[o],t[o]=t[e],t[e]=r;return t}function Kt(t){return t.length===0?[[]]:Kt(t.slice(1)).reduce((n,e)=>n.concat(t.map((r,o)=>{let a=e.slice();return a.splice(o,0,t[0]),a})),[])}var Go={compact:J,permutations:Kt,range:O,rotate:D,shuffle:ae};var I={empty:!0,name:"",setNum:0,chroma:"000000000000",normalized:"000000000000",intervals:[]},Qt=t=>Number(t).toString(2).padStart(12,"0"),me=t=>parseInt(t,2),zo=/^[01]{12}$/;function et(t){return zo.test(t)}var Bo=t=>typeof t=="number"&&t>=0&&t<=4095,Uo=t=>t&&et(t.chroma),ie={[I.chroma]:I};function P(t){let n=et(t)?t:Bo(t)?Qt(t):Array.isArray(t)?Wo(t):Uo(t)?t.chroma:I.chroma;return ie[n]=ie[n]||Zo(n)}var se=P,ut=t=>P(t).chroma,ce=t=>P(t).intervals,ue=t=>P(t).setNum,Ho=["1P","2m","2M","3m","3M","4P","5d","5P","6m","6M","7m","7M"];function Ko(t){let n=[];for(let e=0;e<12;e++)t.charAt(e)==="1"&&n.push(Ho[e]);return n}function le(t){return P(t).intervals.map(n=>d("C",n))}function fe(){return O(2048,4095).map(Qt)}function Z(t,n=!0){let r=P(t).chroma.split("");return J(r.map((o,a)=>{let m=D(a,r);return n&&m[0]==="0"?null:m.join("")}))}function de(t,n){return P(t).setNum===P(n).setNum}function G(t){let n=P(t).setNum;return e=>{let r=P(e).setNum;return n&&n!==r&&(r&n)===r}}function z(t){let n=P(t).setNum;return e=>{let r=P(e).setNum;return n&&n!==r&&(r|n)===r}}function lt(t){let n=P(t);return e=>{let r=s(e);return n&&!r.empty&&n.chroma.charAt(r.chroma)==="1"}}var Xo=lt;function pe(t){let n=lt(t);return e=>e.filter(n)}var Qo={get:P,chroma:ut,num:ue,intervals:ce,chromas:fe,isSupersetOf:z,isSubsetOf:G,isNoteIncludedIn:lt,isEqual:de,filter:pe,modes:Z,notes:le,pcset:se};function Jo(t){let n=t.split("");return n.map((e,r)=>D(r,n).join(""))}function Zo(t){let n=me(t),e=Jo(t).map(me).filter(a=>a>=2048).sort()[0],r=Qt(e),o=Ko(t);return{empty:!1,name:"",setNum:n,chroma:t,normalized:r,intervals:o}}function Wo(t){if(t.length===0)return I.chroma;let n,e=[0,0,0,0,0,0,0,0,0,0,0,0];for(let r=0;rt.name).filter(t=>t)}function Me(){return W.map(t=>t.aliases[0]).filter(t=>t)}function he(){return Object.keys(B)}function S(){return W.slice()}var ea=S;function ve(){W=[],B={}}function Jt(t,n,e){let r=ra(t),o={...P(t),name:e||"",quality:r,intervals:t,aliases:n};W.push(o),o.name&&(B[o.name]=o),B[o.setNum]=o,B[o.chroma]=o,o.aliases.forEach(a=>ye(o,a))}function ye(t,n){B[n]=t}function ra(t){let n=e=>t.indexOf(e)!==-1;return n("5A")?"Augmented":n("3M")?"Major":n("5d")?"Diminished":n("3m")?"Minor":"Unknown"}ta.forEach(([t,n,e])=>Jt(t.split(" "),e.split(" "),n));W.sort((t,n)=>t.setNum-n.setNum);var oa={names:Pe,symbols:Me,get:rt,all:S,add:Jt,removeAll:ve,keys:he,entries:S,chordType:rt};var aa=t=>{let n=t.reduce((e,r)=>{let o=s(r).chroma;return o!==void 0&&(e[o]=e[o]||s(r).name),e},{});return e=>n[e]};function pt(t,n={}){let e=t.map(o=>s(o).pc).filter(o=>o);return s.length===0?[]:fa(e,1,n).filter(o=>o.weight).sort((o,a)=>a.weight-o.weight).map(o=>o.name)}var Pt={anyThirds:384,perfectFifth:16,nonPerfectFifths:40,anySeventh:3},Mt=t=>n=>!!(n&t),ma=Mt(Pt.anyThirds),ia=Mt(Pt.perfectFifth),sa=Mt(Pt.anySeventh),ca=Mt(Pt.nonPerfectFifths);function ua(t){let n=parseInt(t.chroma,2);return ma(n)&&ia(n)&&sa(n)}function la(t){let n=parseInt(t,2);return ca(n)?t:(n|16).toString(2)}function fa(t,n,e){let r=t[0],o=s(r).chroma,a=aa(t),m=Z(t,!1),i=[];return m.forEach((c,u)=>{let M=e.assumePerfectFifth&&la(c);S().filter(p=>e.assumePerfectFifth&&ua(p)?p.chroma===M:p.chroma===c).forEach(p=>{let C=p.aliases[0],h=a(u);u!==o?i.push({weight:.5*n,name:`${h}${C}/${r}`}):i.push({weight:1*n,name:`${h}${C}`})})}),i}var tn={};f(tn,{add:()=>Wt,addTo:()=>xe,default:()=>Yt,distance:()=>Te,fromSemitones:()=>je,get:()=>Zt,invert:()=>Se,name:()=>Ae,names:()=>be,num:()=>Ie,quality:()=>Ne,semitones:()=>ge,simplify:()=>ht,subtract:()=>vt,transposeFifths:()=>yt});function be(){return"1P 2M 3M 4P 5P 6m 7m".split(" ")}var Zt=l,Ae=t=>l(t).name,ge=t=>l(t).semitones,Ne=t=>l(t).q,Ie=t=>l(t).num;function ht(t){let n=l(t);return n.empty?"":n.simple+n.q}function Se(t){let n=l(t);if(n.empty)return"";let e=(7-n.step)%7,r=n.type==="perfectable"?-n.alt:-(n.alt+1);return l({step:e,alt:r,oct:n.oct,dir:n.dir}).name}var da=[1,2,2,3,3,4,5,5,6,6,7,7],pa="P m M m M P d P m M m M".split(" ");function je(t){let n=t<0?-1:1,e=Math.abs(t),r=e%12,o=Math.floor(e/12);return n*(da[r]+7*o)+pa[r]}var Te=y,Wt=Ce((t,n)=>[t[0]+n[0],t[1]+n[1]]),xe=t=>n=>Wt(t,n),vt=Ce((t,n)=>[t[0]-n[0],t[1]-n[1]]);function yt(t,n){let e=Zt(t);if(e.empty)return"";let[r,o,a]=e.coord;return q([r+n,o,a]).name}var Yt={names:be,get:Zt,name:Ae,num:Ie,semitones:ge,quality:Ne,fromSemitones:je,distance:Te,invert:Se,simplify:ht,add:Wt,addTo:xe,subtract:vt,transposeFifths:yt};function Ce(t){return(n,e)=>{let r=l(n).coord,o=l(e).coord;if(r&&o){let a=t(r,o);return q(a).name}}}var gt={};f(gt,{NoScaleType:()=>Ee,add:()=>nn,addAlias:()=>Fe,all:()=>_,default:()=>ha,entries:()=>_e,get:()=>H,keys:()=>we,names:()=>At,removeAll:()=>Ve,scaleType:()=>De});var Pa=[["1P 2M 3M 5P 6M","major pentatonic","pentatonic"],["1P 2M 3M 4P 5P 6M 7M","major","ionian"],["1P 2M 3m 4P 5P 6m 7m","minor","aeolian"],["1P 2M 3m 3M 5P 6M","major blues"],["1P 3m 4P 5d 5P 7m","minor blues","blues"],["1P 2M 3m 4P 5P 6M 7M","melodic minor"],["1P 2M 3m 4P 5P 6m 7M","harmonic minor"],["1P 2M 3M 4P 5P 6M 7m 7M","bebop"],["1P 2M 3m 4P 5d 6m 6M 7M","diminished","whole-half diminished"],["1P 2M 3m 4P 5P 6M 7m","dorian"],["1P 2M 3M 4A 5P 6M 7M","lydian"],["1P 2M 3M 4P 5P 6M 7m","mixolydian","dominant"],["1P 2m 3m 4P 5P 6m 7m","phrygian"],["1P 2m 3m 4P 5d 6m 7m","locrian"],["1P 3M 4P 5P 7M","ionian pentatonic"],["1P 3M 4P 5P 7m","mixolydian pentatonic","indian"],["1P 2M 4P 5P 6M","ritusen"],["1P 2M 4P 5P 7m","egyptian"],["1P 3M 4P 5d 7m","neopolitan major pentatonic"],["1P 3m 4P 5P 6m","vietnamese 1"],["1P 2m 3m 5P 6m","pelog"],["1P 2m 4P 5P 6m","kumoijoshi"],["1P 2M 3m 5P 6m","hirajoshi"],["1P 2m 4P 5d 7m","iwato"],["1P 2m 4P 5P 7m","in-sen"],["1P 3M 4A 5P 7M","lydian pentatonic","chinese"],["1P 3m 4P 6m 7m","malkos raga"],["1P 3m 4P 5d 7m","locrian pentatonic","minor seven flat five pentatonic"],["1P 3m 4P 5P 7m","minor pentatonic","vietnamese 2"],["1P 3m 4P 5P 6M","minor six pentatonic"],["1P 2M 3m 5P 6M","flat three pentatonic","kumoi"],["1P 2M 3M 5P 6m","flat six pentatonic"],["1P 2m 3M 5P 6M","scriabin"],["1P 3M 5d 6m 7m","whole tone pentatonic"],["1P 3M 4A 5A 7M","lydian #5P pentatonic"],["1P 3M 4A 5P 7m","lydian dominant pentatonic"],["1P 3m 4P 5P 7M","minor #7M pentatonic"],["1P 3m 4d 5d 7m","super locrian pentatonic"],["1P 2M 3m 4P 5P 7M","minor hexatonic"],["1P 2A 3M 5P 5A 7M","augmented"],["1P 2M 4P 5P 6M 7m","piongio"],["1P 2m 3M 4A 6M 7m","prometheus neopolitan"],["1P 2M 3M 4A 6M 7m","prometheus"],["1P 2m 3M 5d 6m 7m","mystery #1"],["1P 2m 3M 4P 5A 6M","six tone symmetric"],["1P 2M 3M 4A 5A 6A","whole tone","messiaen's mode #1"],["1P 2m 4P 4A 5P 7M","messiaen's mode #5"],["1P 2M 3M 4P 5d 6m 7m","locrian major","arabian"],["1P 2m 3M 4A 5P 6m 7M","double harmonic lydian"],["1P 2m 2A 3M 4A 6m 7m","altered","super locrian","diminished whole tone","pomeroy"],["1P 2M 3m 4P 5d 6m 7m","locrian #2","half-diminished","aeolian b5"],["1P 2M 3M 4P 5P 6m 7m","mixolydian b6","melodic minor fifth mode","hindu"],["1P 2M 3M 4A 5P 6M 7m","lydian dominant","lydian b7","overtone"],["1P 2M 3M 4A 5A 6M 7M","lydian augmented"],["1P 2m 3m 4P 5P 6M 7m","dorian b2","phrygian #6","melodic minor second mode"],["1P 2m 3m 4d 5d 6m 7d","ultralocrian","superlocrian bb7","superlocrian diminished"],["1P 2m 3m 4P 5d 6M 7m","locrian 6","locrian natural 6","locrian sharp 6"],["1P 2A 3M 4P 5P 5A 7M","augmented heptatonic"],["1P 2M 3m 4A 5P 6M 7m","dorian #4","ukrainian dorian","romanian minor","altered dorian"],["1P 2M 3m 4A 5P 6M 7M","lydian diminished"],["1P 2M 3M 4A 5A 7m 7M","leading whole tone"],["1P 2M 3M 4A 5P 6m 7m","lydian minor"],["1P 2m 3M 4P 5P 6m 7m","phrygian dominant","spanish","phrygian major"],["1P 2m 3m 4P 5P 6m 7M","balinese"],["1P 2m 3m 4P 5P 6M 7M","neopolitan major"],["1P 2M 3M 4P 5P 6m 7M","harmonic major"],["1P 2m 3M 4P 5P 6m 7M","double harmonic major","gypsy"],["1P 2M 3m 4A 5P 6m 7M","hungarian minor"],["1P 2A 3M 4A 5P 6M 7m","hungarian major"],["1P 2m 3M 4P 5d 6M 7m","oriental"],["1P 2m 3m 3M 4A 5P 7m","flamenco"],["1P 2m 3m 4A 5P 6m 7M","todi raga"],["1P 2m 3M 4P 5d 6m 7M","persian"],["1P 2m 3M 5d 6m 7m 7M","enigmatic"],["1P 2M 3M 4P 5A 6M 7M","major augmented","major #5","ionian augmented","ionian #5"],["1P 2A 3M 4A 5P 6M 7M","lydian #9"],["1P 2m 2M 4P 4A 5P 6m 7M","messiaen's mode #4"],["1P 2m 3M 4P 4A 5P 6m 7M","purvi raga"],["1P 2m 3m 3M 4P 5P 6m 7m","spanish heptatonic"],["1P 2M 3m 3M 4P 5P 6M 7m","bebop minor"],["1P 2M 3M 4P 5P 5A 6M 7M","bebop major"],["1P 2m 3m 4P 5d 5P 6m 7m","bebop locrian"],["1P 2M 3m 4P 5P 6m 7m 7M","minor bebop"],["1P 2M 3M 4P 5d 5P 6M 7M","ichikosucho"],["1P 2M 3m 4P 5P 6m 6M 7M","minor six diminished"],["1P 2m 3m 3M 4A 5P 6M 7m","half-whole diminished","dominant diminished","messiaen's mode #2"],["1P 3m 3M 4P 5P 6M 7m 7M","kafi raga"],["1P 2M 3M 4P 4A 5A 6A 7M","messiaen's mode #6"],["1P 2M 3m 3M 4P 5d 5P 6M 7m","composite blues"],["1P 2M 3m 3M 4A 5P 6m 7m 7M","messiaen's mode #3"],["1P 2m 2M 3m 4P 4A 5P 6m 6M 7M","messiaen's mode #7"],["1P 2m 2M 3m 3M 4P 5d 5P 6m 6M 7m 7M","chromatic"]],Ma=Pa,Ee={...I,intervals:[],aliases:[]},bt=[],U={};function At(){return bt.map(t=>t.name)}function H(t){return U[t]||Ee}var De=H;function _(){return bt.slice()}var _e=_;function we(){return Object.keys(U)}function Ve(){bt=[],U={}}function nn(t,n,e=[]){let r={...P(t),name:n,intervals:t,aliases:e};return bt.push(r),U[r.name]=r,U[r.setNum]=r,U[r.chroma]=r,r.aliases.forEach(o=>Fe(r,o)),r}function Fe(t,n){U[n]=t}Ma.forEach(([t,n,...e])=>nn(t.split(" "),n,e));var ha={names:At,get:H,all:_,add:nn,removeAll:Ve,keys:we,entries:_e,scaleType:De};var Re={empty:!0,name:"",symbol:"",root:"",bass:"",rootDegree:0,type:"",tonic:null,setNum:NaN,quality:"Unknown",chroma:"",normalized:"",aliases:[],notes:[],intervals:[]};function Y(t){let[n,e,r,o]=Q(t);return n===""?en("",t):n==="A"&&o==="ug"?en("","aug"):en(n+e,r+o)}function en(t,n){let e=n.split("/");if(e.length===1)return[t,e[0],""];let[r,o,a,m]=Q(e[1]);return r!==""&&a===""&&m===""?[t,e[0],r+o]:[t,n,""]}function w(t){if(Array.isArray(t))return ot(t[1]||"",t[0],t[2]);if(t==="")return Re;{let[n,e,r]=Y(t),o=ot(e,n,r);return o.empty?ot(t):o}}function ot(t,n,e){let r=rt(t),o=s(n||""),a=s(e||"");if(r.empty||n&&o.empty||e&&a.empty)return Re;let m=y(o.pc,a.pc),i=r.intervals.indexOf(m),c=i>=0,u=c?a:s(""),M=i===-1?NaN:i+1,v=a.pc&&a.pc!==o.pc,p=Array.from(r.intervals);if(c)for(let $=1;$d(o.pc,$));t=r.aliases.indexOf(t)!==-1?t:r.aliases[0];let h=`${o.empty?"":o.pc}${t}${c&&M>1?"/"+u.pc:v?"/"+a.pc:""}`,st=`${n?o.pc+" ":""}${r.name}${c&&M>1?" over "+u.pc:v?" over "+a.pc:""}`;return{...r,name:st,symbol:h,tonic:o.pc,type:r.name,root:u.pc,bass:v?a.pc:"",intervals:p,rootDegree:M,notes:C}}var Oe=w;function ke(t,n){let[e,r,o]=Y(t);if(!e)return t;let a=d(o,n),m=a?"/"+a:"";return d(e,n)+r+m}function $e(t){let n=w(t),e=z(n.chroma);return _().filter(r=>e(r.chroma)).map(r=>r.name)}function qe(t){let n=w(t),e=z(n.chroma);return S().filter(r=>e(r.chroma)).map(r=>n.tonic+r.aliases[0])}function Le(t){let n=w(t),e=G(n.chroma);return S().filter(r=>e(r.chroma)).map(r=>n.tonic+r.aliases[0])}function Ge(t,n){let e=w(t),r=n||e.tonic;return!r||e.empty?[]:e.intervals.map(o=>d(r,o))}function ze(t,n){let e=w(t),r=n||e.tonic,o=R(e.intervals,r);return a=>a?o(a>0?a-1:a):""}function Be(t,n){let e=w(t),r=n||e.tonic;return R(e.intervals,r)}var at={getChord:ot,get:w,detect:pt,chordScales:$e,extended:qe,reduced:Le,tokenize:Y,transpose:ke,degrees:ze,steps:Be,notes:Ge,chord:Oe};var on={};f(on,{default:()=>ga,fraction:()=>Xe,get:()=>It,names:()=>Ue,shorthands:()=>He,value:()=>Ke});var va=[[.125,"dl",["large","duplex longa","maxima","octuple","octuple whole"]],[.25,"l",["long","longa"]],[.5,"d",["double whole","double","breve"]],[1,"w",["whole","semibreve"]],[2,"h",["half","minim"]],[4,"q",["quarter","crotchet"]],[8,"e",["eighth","quaver"]],[16,"s",["sixteenth","semiquaver"]],[32,"t",["thirty-second","demisemiquaver"]],[64,"sf",["sixty-fourth","hemidemisemiquaver"]],[128,"h",["hundred twenty-eighth"]],[256,"th",["two hundred fifty-sixth"]]],ya=va,Nt=[];ya.forEach(([t,n,e])=>Na(t,n,e));var ba={empty:!0,name:"",value:0,fraction:[0,0],shorthand:"",dots:"",names:[]};function Ue(){return Nt.reduce((t,n)=>(n.names.forEach(e=>t.push(e)),t),[])}function He(){return Nt.map(t=>t.shorthand)}var Aa=/^([^.]+)(\.*)$/;function It(t){let[n,e,r]=Aa.exec(t)||[],o=Nt.find(i=>i.shorthand===e||i.names.includes(e));if(!o)return ba;let a=Ia(o.fraction,r.length),m=a[0]/a[1];return{...o,name:t,dots:r,value:m,fraction:a}}var Ke=t=>It(t).value,Xe=t=>It(t).fraction,ga={names:Ue,shorthands:He,get:It,value:Ke,fraction:Xe};function Na(t,n,e){Nt.push({empty:!1,dots:"",name:"",value:1/t,fraction:t<1?[1/t,1]:[1,t],shorthand:n,names:e})}function Ia(t,n){let e=Math.pow(2,n),r=t[0]*e,o=t[1]*e,a=r;for(let m=0;mBa,majorKey:()=>Tr,majorTonicFromKeySignature:()=>Cr,minorKey:()=>xr});var fn={};f(fn,{accidentals:()=>rr,ascending:()=>Ct,chroma:()=>ir,default:()=>A,descending:()=>hr,distance:()=>lr,enharmonic:()=>Dt,freq:()=>mr,fromFreq:()=>sr,fromFreqSharps:()=>cr,fromMidi:()=>xt,fromMidiSharps:()=>ur,get:()=>b,midi:()=>ar,name:()=>nr,names:()=>tr,octave:()=>or,pitchClass:()=>er,simplify:()=>vr,sortedNames:()=>ln,sortedUniqNames:()=>Et,tr:()=>fr,trBy:()=>dr,trFifths:()=>Pr,trFrom:()=>pr,transpose:()=>T,transposeBy:()=>cn,transposeFifths:()=>tt,transposeFrom:()=>un,transposeOctaves:()=>Mr});var sn={};f(sn,{chroma:()=>jt,default:()=>Da,freqToMidi:()=>mt,isMidi:()=>an,midiToFreq:()=>Qe,midiToNoteName:()=>j,pcset:()=>Tt,pcsetDegrees:()=>Ze,pcsetNearest:()=>Je,pcsetSteps:()=>mn,toMidi:()=>St});function an(t){return+t>=0&&+t<=127}function St(t){if(an(t))return+t;let n=s(t);return n.empty?null:n.midi}function Qe(t,n=440){return Math.pow(2,(t-69)/12)*n}var Sa=Math.log(2),ja=Math.log(440);function mt(t){let n=12*(Math.log(t)-ja)/Sa+69;return Math.round(n*100)/100}var Ta="C C# D D# E F F# G G# A A# B".split(" "),xa="C Db D Eb E F Gb G Ab A Bb B".split(" ");function j(t,n={}){if(isNaN(t)||t===-1/0||t===1/0)return"";t=Math.round(t);let r=(n.sharps===!0?Ta:xa)[t%12];if(n.pitchClass)return r;let o=Math.floor(t/12)-1;return r+o}function jt(t){return t%12}function Ca(t){return t.split("").reduce((n,e,r)=>(r<12&&e==="1"&&n.push(r),n),[])}function Ea(t){return t.map(jt).sort((n,e)=>n-e).filter((n,e,r)=>e===0||n!==r[e-1])}function Tt(t){return Array.isArray(t)?Ea(t):Ca(t)}function Je(t){let n=Tt(t);return e=>{let r=jt(e);for(let o=0;o<12;o++){if(n.includes(r+o))return e+o;if(n.includes(r-o))return e-o}}}function mn(t,n){let e=Tt(t),r=e.length;return o=>{let a=o<0?(r- -o%r)%r:o%r,m=Math.floor(o/r);return e[a]+m*12+n}}function Ze(t,n){let e=mn(t,n);return r=>{if(r!==0)return e(r>0?r-1:r)}}var Da={chroma:jt,freqToMidi:mt,isMidi:an,midiToFreq:Qe,midiToNoteName:j,pcsetNearest:Je,pcset:Tt,pcsetDegrees:Ze,pcsetSteps:mn,toMidi:St};var _a=["C","D","E","F","G","A","B"],We=t=>t.name,Ye=t=>t.map(s).filter(n=>!n.empty);function tr(t){return t===void 0?_a.slice():Array.isArray(t)?Ye(t).map(We):[]}var b=s,nr=t=>b(t).name,er=t=>b(t).pc,rr=t=>b(t).acc,or=t=>b(t).oct,ar=t=>b(t).midi,mr=t=>b(t).freq,ir=t=>b(t).chroma;function xt(t){return j(t)}function sr(t){return j(mt(t))}function cr(t){return j(mt(t),{sharps:!0})}function ur(t){return j(t,{sharps:!0})}var lr=y,T=d,fr=d,cn=t=>n=>T(n,t),dr=cn,un=t=>n=>T(t,n),pr=un;function tt(t,n){return T(t,[n,0])}var Pr=tt;function Mr(t,n){return T(t,[0,n])}var Ct=(t,n)=>t.height-n.height,hr=(t,n)=>n.height-t.height;function ln(t,n){return n=n||Ct,Ye(t).sort(n).map(We)}function Et(t){return ln(t,Ct).filter((n,e,r)=>e===0||n!==r[e-1])}var vr=t=>{let n=b(t);return n.empty?"":j(n.midi||n.chroma,{sharps:n.alt>0,pitchClass:n.midi===null})};function Dt(t,n){let e=b(t);if(e.empty)return"";let r=b(n||j(e.midi||e.chroma,{sharps:e.alt<0,pitchClass:!0}));if(r.empty||r.chroma!==e.chroma)return"";if(e.oct===void 0)return r.pc;let o=e.chroma-e.alt,a=r.chroma-r.alt,m=o>11||a<0?-1:o<0||a>11?1:0,i=e.oct+m;return r.pc+i}var A={names:tr,get:b,name:nr,pitchClass:er,accidentals:rr,octave:or,midi:ar,ascending:Ct,descending:hr,distance:lr,sortedNames:ln,sortedUniqNames:Et,fromMidi:xt,fromMidiSharps:ur,freq:mr,fromFreq:sr,fromFreqSharps:cr,chroma:ir,transpose:T,tr:fr,transposeBy:cn,trBy:dr,transposeFrom:un,trFrom:pr,transposeFifths:tt,transposeOctaves:Mr,trFifths:Pr,simplify:vr,enharmonic:Dt};var dn={};f(dn,{default:()=>Oa,get:()=>g,names:()=>gr,romanNumeral:()=>Ar,tokenize:()=>Nr});var br={empty:!0,name:"",chordType:""},yr={};function g(t){return typeof t=="string"?yr[t]||(yr[t]=Ra(t)):typeof t=="number"?g(_t[t]||""):V(t)?wa(t):E(t)?g(t.name):br}var Ar=g;function gr(t=!0){return(t?_t:Fa).slice()}function wa(t){return g(F(t.alt)+_t[t.step])}var Va=/^(#{1,}|b{1,}|x{1,}|)(IV|I{1,3}|VI{0,2}|iv|i{1,3}|vi{0,2})([^IViv]*)$/;function Nr(t){return Va.exec(t)||["","","",""]}var Ir="I II III IV V VI VII",_t=Ir.split(" "),Fa=Ir.toLowerCase().split(" ");function Ra(t){let[n,e,r,o]=Nr(t);if(!r)return br;let a=r.toUpperCase(),m=_t.indexOf(a),i=L(e),c=1;return{empty:!1,name:n,roman:r,interval:l({step:m,alt:i,dir:c}).name,acc:e,chordType:o,alt:i,step:m,major:r===a,oct:0,dir:c}}var Oa={names:gr,get:g,romanNumeral:Ar};var N=Object.freeze([]),Sr={type:"major",tonic:"",alteration:0,keySignature:""},wt={tonic:"",grades:N,intervals:N,scale:N,triads:N,chords:N,chordsHarmonicFunction:N,chordScales:N},ka={...Sr,...wt,type:"major",minorRelative:"",scale:N,secondaryDominants:N,secondaryDominantsMinorRelative:N,substituteDominants:N,substituteDominantsMinorRelative:N},$a={...Sr,type:"minor",relativeMajor:"",natural:wt,harmonic:wt,melodic:wt},pn=(t,n,e="")=>n.map((r,o)=>`${t[o]}${e}${r}`);function Vt(t,n,e,r,o){return a=>{let m=t.map(c=>g(c).interval||""),i=m.map(c=>T(a,c));return{tonic:a,grades:t,intervals:m,scale:i,triads:pn(i,n),chords:pn(i,e),chordsHarmonicFunction:r.slice(),chordScales:pn(i,o," ")}}}var jr=(t,n)=>{let e=s(t),r=s(n);return e.empty||r.empty?0:r.coord[0]-e.coord[0]},qa=Vt("I II III IV V VI VII".split(" ")," m m m dim".split(" "),"maj7 m7 m7 maj7 7 m7 m7b5".split(" "),"T SD T SD D T D".split(" "),"major,dorian,phrygian,lydian,mixolydian,minor,locrian".split(",")),La=Vt("I II bIII IV V bVI bVII".split(" "),"m dim m m ".split(" "),"m7 m7b5 maj7 m7 m7 maj7 7".split(" "),"T SD T SD D SD SD".split(" "),"minor,locrian,major,dorian,phrygian,lydian,mixolydian".split(",")),Ga=Vt("I II bIII IV V bVI VII".split(" "),"m dim aug m dim".split(" "),"mMaj7 m7b5 +maj7 m7 7 maj7 o7".split(" "),"T SD T SD D SD D".split(" "),"harmonic minor,locrian 6,major augmented,lydian diminished,phrygian dominant,lydian #9,ultralocrian".split(",")),za=Vt("I II bIII IV V VI VII".split(" "),"m m aug dim dim".split(" "),"m6 m7 +maj7 7 7 m7b5 m7b5".split(" "),"T SD T SD D ".split(" "),"melodic minor,dorian b2,lydian augmented,lydian dominant,mixolydian b6,locrian #2,altered".split(","));function Tr(t){let n=s(t).pc;if(!n)return ka;let e=qa(n),r=jr("C",n),o=a=>{let m=g(a);return m.empty?"":T(t,m.interval)+m.chordType};return{...e,type:"major",minorRelative:T(n,"-3m"),alteration:r,keySignature:F(r),secondaryDominants:"- VI7 VII7 I7 II7 III7 -".split(" ").map(o),secondaryDominantsMinorRelative:"- IIIm7b5 IV#m7 Vm7 VIm7 VIIm7b5 -".split(" ").map(o),substituteDominants:"- bIII7 IV7 bV7 bVI7 bVII7 -".split(" ").map(o),substituteDominantsMinorRelative:"- IIIm7 Im7 IIbm7 VIm7 IVm7 -".split(" ").map(o)}}function xr(t){let n=s(t).pc;if(!n)return $a;let e=jr("C",n)-3;return{type:"minor",tonic:n,relativeMajor:T(n,"3m"),alteration:e,keySignature:F(e),natural:La(n),harmonic:Ga(n),melodic:za(n)}}function Cr(t){return typeof t=="number"?tt("C",t):typeof t=="string"&&/^b+|#+$/.test(t)?tt("C",L(t)):null}var Ba={majorKey:Tr,majorTonicFromKeySignature:Cr,minorKey:xr};var An={};f(An,{all:()=>yn,default:()=>Ha,distance:()=>bn,entries:()=>_r,get:()=>k,mode:()=>Dr,names:()=>wr,notes:()=>Vr,relativeTonic:()=>kr,seventhChords:()=>Or,triads:()=>Rr});var hn=[[0,2773,0,"ionian","","Maj7","major"],[1,2902,2,"dorian","m","m7"],[2,3418,4,"phrygian","m","m7"],[3,2741,-1,"lydian","","Maj7"],[4,2774,1,"mixolydian","","7"],[5,2906,3,"aeolian","m","m7","minor"],[6,3434,5,"locrian","dim","m7b5"]],Er={...I,name:"",alt:0,modeNum:NaN,triad:"",seventh:"",aliases:[]},vn=hn.map(Ua),Mn={};vn.forEach(t=>{Mn[t.name]=t,t.aliases.forEach(n=>{Mn[n]=t})});function k(t){return typeof t=="string"?Mn[t.toLowerCase()]||Er:t&&t.name?k(t.name):Er}var Dr=k;function yn(){return vn.slice()}var _r=yn;function wr(){return vn.map(t=>t.name)}function Ua(t){let[n,e,r,o,a,m,i]=t,c=i?[i]:[],u=Number(e).toString(2);return{empty:!1,intervals:H(o).intervals,modeNum:n,chroma:u,normalized:u,name:o,setNum:e,alt:r,triad:a,seventh:m,aliases:c}}function Vr(t,n){return k(t).intervals.map(e=>d(n,e))}function Fr(t){return(n,e)=>{let r=k(n);if(r.empty)return[];let o=D(r.modeNum,t),a=r.intervals.map(m=>d(e,m));return o.map((m,i)=>a[i]+m)}}var Rr=Fr(hn.map(t=>t[4])),Or=Fr(hn.map(t=>t[5]));function bn(t,n){let e=k(n),r=k(t);return e.empty||r.empty?"":ht(yt("1P",r.alt-e.alt))}function kr(t,n,e){return d(e,bn(t,n))}var Ha={get:k,names:wr,all:yn,distance:bn,relativeTonic:kr,notes:Vr,triads:Rr,seventhChords:Or,entries:_r,mode:Dr};var gn={};f(gn,{default:()=>Ka,fromRomanNumerals:()=>$r,toRomanNumerals:()=>qr});function $r(t,n){return n.map(g).map(r=>d(t,l(r))+r.chordType)}function qr(t,n){return n.map(e=>{let[r,o]=Y(e),a=y(t,r);return g(l(a)).name+o})}var Ka={fromRomanNumerals:$r,toRomanNumerals:qr};var Sn={};f(Sn,{chromatic:()=>Lr,default:()=>In,numeric:()=>Nn});function Nn(t){let n=J(t.map(e=>typeof e=="number"?e:St(e)));return!t.length||n.length!==t.length?[]:n.reduce((e,r)=>{let o=e[e.length-1];return e.concat(O(o,r).slice(1))},[n[0]])}function Lr(t,n){return Nn(t).map(e=>j(e,n))}var In={numeric:Nn,chromatic:Lr};var jn={};f(jn,{binary:()=>Xa,euclid:()=>tm,hex:()=>Qa,onsets:()=>Ja,probability:()=>Wa,random:()=>Za,rotate:()=>Ya});function Xa(...t){return t.reduce((n,e)=>(e.toString(2).split("").forEach(r=>{n.push(parseInt(r))}),n),[])}function Qa(t){let n=[];for(let e=0;e{n.push(a==="1"?1:0)})}return n}function Ja(...t){return t.reduce((n,e)=>{n.push(1);for(let r=0;r=n?1:0);return r}function Wa(t,n=Math.random){return t.map(e=>n()<=e?1:0)}function Ya(t,n){let e=t.length,r=[];for(let o=0;orm,degrees:()=>Qr,detect:()=>Br,extended:()=>xn,get:()=>x,modeNames:()=>Kr,names:()=>Gr,rangeOf:()=>Xr,reduced:()=>Hr,scale:()=>zr,scaleChords:()=>Ur,scaleNotes:()=>Cn,steps:()=>Jr,tokenize:()=>Tn});var nm={empty:!0,name:"",type:"",tonic:null,setNum:NaN,chroma:"",normalized:"",aliases:[],notes:[],intervals:[]};function Tn(t){if(typeof t!="string")return["",""];let n=t.indexOf(" "),e=s(t.substring(0,n));if(e.empty){let o=s(t);return o.empty?["",t]:[o.name,""]}let r=t.substring(e.name.length+1).toLowerCase();return[e.name,r.length?r:""]}var Gr=At;function x(t){let n=Array.isArray(t)?t:Tn(t),e=s(n[0]).name,r=H(n[1]);if(r.empty)return nm;let o=r.name,a=e?r.intervals.map(i=>d(e,i)):[],m=e?e+" "+o:o;return{...r,name:m,type:o,tonic:e,notes:a}}var zr=x;function Br(t,n={}){let e=ut(t),r=s(n.tonic??t[0]??""),o=r.chroma;if(o===void 0)return[];let a=e.split("");a[o]="1";let m=D(o,a).join(""),i=_().find(u=>u.chroma===m),c=[];return i&&c.push(r.name+" "+i.name),n.match==="exact"||xn(m).forEach(u=>{c.push(r.name+" "+u)}),c}function Ur(t){let n=x(t),e=G(n.chroma);return S().filter(r=>e(r.chroma)).map(r=>r.aliases[0])}function xn(t){let n=et(t)?t:x(t).chroma,e=z(n);return _().filter(r=>e(r.chroma)).map(r=>r.name)}function Hr(t){let n=G(x(t).chroma);return _().filter(e=>n(e.chroma)).map(e=>e.name)}function Cn(t){let n=t.map(o=>s(o).pc).filter(o=>o),e=n[0],r=Et(n);return D(r.indexOf(e),r)}function Kr(t){let n=x(t);if(n.empty)return[];let e=n.tonic?n.notes:n.intervals;return Z(n.chroma).map((r,o)=>{let a=x(r).name;return a?[e[o],a]:["",""]}).filter(r=>r[0])}function em(t){let n=Array.isArray(t)?Cn(t):x(t).notes,e=n.map(r=>s(r).chroma);return r=>{let o=typeof r=="number"?s(xt(r)):s(r),a=o.height;if(a===void 0)return;let m=a%12,i=e.indexOf(m);if(i!==-1)return Dt(o.name,n[i])}}function Xr(t){let n=em(t);return(e,r)=>{let o=s(e).height,a=s(r).height;return o===void 0||a===void 0?[]:O(o,a).map(n).filter(m=>m)}}function Qr(t){let{intervals:n,tonic:e}=x(t),r=R(n,e);return o=>o?r(o>0?o-1:o):""}function Jr(t){let{intervals:n,tonic:e}=x(t);return R(n,e)}var rm={degrees:Qr,detect:Br,extended:xn,get:x,modeNames:Kr,names:Gr,rangeOf:Xr,reduced:Hr,scaleChords:Ur,scaleNotes:Cn,steps:Jr,tokenize:Tn,scale:zr};var Dn={};f(Dn,{default:()=>im,get:()=>Yr,names:()=>Wr,parse:()=>Ft});var om={empty:!0,name:"",upper:void 0,lower:void 0,type:void 0,additive:[]},am=["4/4","3/4","2/4","2/2","12/8","9/8","6/8","3/8"];function Wr(){return am.slice()}var mm=/^(\d*\d(?:\+\d)*)\/(\d+)$/,Zr=new Map;function Yr(t){let n=JSON.stringify(t),e=Zr.get(n);if(e)return e;let r=cm(Ft(t));return Zr.set(n,r),r}function Ft(t){if(typeof t=="string"){let[a,m,i]=mm.exec(t)||[];return Ft([m,i])}let[n,e]=t,r=+e;if(typeof n=="number")return[n,r];let o=n.split("+").map(a=>+a);return o.length===1?[o[0],r]:[o,r]}var im={names:Wr,parse:Ft,get:Yr},sm=t=>Math.log(t)/Math.log(2)%1===0;function cm([t,n]){let e=Array.isArray(t)?t.reduce((i,c)=>i+c,0):t,r=n;if(e===0||r===0)return om;let o=Array.isArray(t)?`${t.join("+")}/${n}`:`${t}/${n}`,a=Array.isArray(t)?t:[],m=r===4||r===2?"simple":r===8&&e%3===0?"compound":sm(r)?"irregular":"irrational";return{empty:!1,name:o,type:m,upper:e,lower:r,additive:a}}var wn={};f(wn,{default:()=>_n,topNoteDiff:()=>to});var to=(t,n)=>{if(!n||!n.length)return t[0];let e=o=>A.midi(o[o.length-1])||0,r=o=>Math.abs(e(n)-e(o));return t.sort((o,a)=>r(o)-r(a))[0]},_n={topNoteDiff:to};var qn={};f(qn,{default:()=>um,get:()=>kn,search:()=>$n,sequence:()=>mo});var Rn={};f(Rn,{all:()=>eo,default:()=>it,defaultDictionary:()=>Fn,lefthand:()=>Vn,lookup:()=>ro,triads:()=>no});var no={M:["1P 3M 5P","3M 5P 8P","5P 8P 10M"],m:["1P 3m 5P","3m 5P 8P","5P 8P 10m"],o:["1P 3m 5d","3m 5d 8P","5d 8P 10m"],aug:["1P 3m 5A","3m 5A 8P","5A 8P 10m"]},Vn={m7:["3m 5P 7m 9M","7m 9M 10m 12P"],7:["3M 6M 7m 9M","7m 9M 10M 13M"],"^7":["3M 5P 7M 9M","7M 9M 10M 12P"],69:["3M 5P 6A 9M"],m7b5:["3m 5d 7m 8P","7m 8P 10m 12d"],"7b9":["3M 6m 7m 9m","7m 9m 10M 13m"],"7b13":["3M 6m 7m 9m","7m 9m 10M 13m"],o7:["1P 3m 5d 6M","5d 6M 8P 10m"],"7#11":["7m 9M 11A 13A"],"7#9":["3M 7m 9A"],mM7:["3m 5P 7M 9M","7M 9M 10m 12P"],m6:["3m 5P 6M 9M","6M 9M 10m 12P"]},eo={M:["1P 3M 5P","3M 5P 8P","5P 8P 10M"],m:["1P 3m 5P","3m 5P 8P","5P 8P 10m"],o:["1P 3m 5d","3m 5d 8P","5d 8P 10m"],aug:["1P 3m 5A","3m 5A 8P","5A 8P 10m"],m7:["3m 5P 7m 9M","7m 9M 10m 12P"],7:["3M 6M 7m 9M","7m 9M 10M 13M"],"^7":["3M 5P 7M 9M","7M 9M 10M 12P"],69:["3M 5P 6A 9M"],m7b5:["3m 5d 7m 8P","7m 8P 10m 12d"],"7b9":["3M 6m 7m 9m","7m 9m 10M 13m"],"7b13":["3M 6m 7m 9m","7m 9m 10M 13m"],o7:["1P 3m 5d 6M","5d 6M 8P 10m"],"7#11":["7m 9M 11A 13A"],"7#9":["3M 7m 9A"],mM7:["3m 5P 7M 9M","7M 9M 10m 12P"],m6:["3m 5P 6M 9M","6M 9M 10m 12P"]},Fn=Vn;function ro(t,n=Fn){if(n[t])return n[t];let{aliases:e}=at.get("C"+t),r=Object.keys(n).find(o=>e.includes(o))||"";if(r!==void 0)return n[r]}var it={lookup:ro,lefthand:Vn,triads:no,all:eo,defaultDictionary:Fn};var On=["C3","C5"],oo=it.all,ao=_n.topNoteDiff;function kn(t,n=On,e=oo,r=ao,o){let a=$n(t,n,e);return!o||!o.length?a[0]:r(a,o)}function $n(t,n=On,e=it.triads){let[r,o]=at.tokenize(t),a=it.lookup(o,e);if(!a)return[];let m=a.map(c=>c.split(" ")),i=In.chromatic(n);return m.reduce((c,u)=>{let M=u.map(h=>Yt.subtract(h,u[0])||""),v=A.transpose(r,u[0]),C=i.filter(h=>A.chroma(h)===A.chroma(v)).filter(h=>(A.midi(A.transpose(h,M[M.length-1]))||0)<=(A.midi(n[1])||0)).map(h=>A.enharmonic(h,v)).map(h=>M.map(st=>A.transpose(h,st)));return c.concat(C)},[])}function mo(t,n=On,e=oo,r=ao,o){let{voicings:a}=t.reduce(({voicings:m,lastVoicing:i},c)=>{let u=kn(c,n,e,r,i);return i=u,m.push(u),{voicings:m,lastVoicing:i}},{voicings:[],lastVoicing:o});return a}var um={get:kn,search:$n,sequence:mo};var Rt={};f(Rt,{accToAlt:()=>L,altToAcc:()=>F,chroma:()=>zn,coordToInterval:()=>q,coordToNote:()=>ct,coordinates:()=>K,deprecate:()=>Ln,distance:()=>y,fillStr:()=>io,height:()=>kt,interval:()=>l,isNamed:()=>so,isNamedPitch:()=>E,isPitch:()=>V,midi:()=>Bn,note:()=>s,pitch:()=>X,stepToLetter:()=>Gt,tokenizeInterval:()=>qt,tokenizeNote:()=>Q,tonicIntervalsTransposer:()=>R,transpose:()=>d});var io=(t,n)=>Array(Math.abs(n)+1).join(t);function Ln(t,n,e){return function(...r){return console.warn(`${t} is deprecated. Use ${n}.`),e.apply(this,r)}}var so=Ln("isNamed","isNamedPitch",E);var lm=Rt,fm=ft,dm=dt,pm=gt;return ho(Pm);})(); //# sourceMappingURL=tonal.min.js.map diff --git a/packages/tonal/browser/tonal.min.js.map b/packages/tonal/browser/tonal.min.js.map index d422ac9f..97c4b52c 100644 --- a/packages/tonal/browser/tonal.min.js.map +++ b/packages/tonal/browser/tonal.min.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../index.ts", "../../pitch/index.ts", "../../pitch-interval/index.ts", "../../pitch-note/index.ts", "../../pitch-distance/index.ts", "../../abc-notation/index.ts", "../../array/index.ts", "../../collection/index.ts", "../../pcset/index.ts", "../../chord-type/index.ts", "../../chord-type/data.ts", "../../chord-detect/index.ts", "../../interval/index.ts", "../../scale-type/index.ts", "../../scale-type/data.ts", "../../chord/index.ts", "../../duration-value/data.ts", "../../duration-value/index.ts", "../../midi/index.ts", "../../note/index.ts", "../../roman-numeral/index.ts", "../../key/index.ts", "../../mode/index.ts", "../../progression/index.ts", "../../range/index.ts", "../../rhythm-patterm/index.ts", "../../scale/index.ts", "../../time-signature/index.ts", "../../voice-leading/index.ts", "../../voicing-dictionary/index.ts", "../../voicing-dictionary/data.ts", "../../voicing/index.ts", "../../core/index.ts"], - "sourcesContent": ["import * as AbcNotation from \"@tonaljs/abc-notation\";\nimport * as Array from \"@tonaljs/array\";\nimport * as Chord from \"@tonaljs/chord\";\nimport * as ChordType from \"@tonaljs/chord-type\";\nimport * as Collection from \"@tonaljs/collection\";\nimport * as DurationValue from \"@tonaljs/duration-value\";\nimport * as Interval from \"@tonaljs/interval\";\nimport * as Key from \"@tonaljs/key\";\nimport * as Midi from \"@tonaljs/midi\";\nimport * as Mode from \"@tonaljs/mode\";\nimport * as Note from \"@tonaljs/note\";\nimport * as Pcset from \"@tonaljs/pcset\";\nimport * as Progression from \"@tonaljs/progression\";\nimport * as Range from \"@tonaljs/range\";\nimport * as RhythmPattern from \"@tonaljs/rhythm-pattern\";\nimport * as RomanNumeral from \"@tonaljs/roman-numeral\";\nimport * as Scale from \"@tonaljs/scale\";\nimport * as ScaleType from \"@tonaljs/scale-type\";\nimport * as TimeSignature from \"@tonaljs/time-signature\";\nimport * as VoiceLeading from \"@tonaljs/voice-leading\";\nimport * as Voicing from \"@tonaljs/voicing\";\nimport * as VoicingDictionary from \"@tonaljs/voicing-dictionary\";\n\nexport * from \"@tonaljs/core\";\n\n// deprecated (backwards compatibility)\nimport * as Core from \"@tonaljs/core\";\n/** @deprecated */\nconst Tonal = Core;\n/** @deprecated */\nconst PcSet = Pcset;\n/** @deprecated */\nconst ChordDictionary = ChordType;\n/** @deprecated */\nconst ScaleDictionary = ScaleType;\n\nexport {\n AbcNotation,\n Array,\n Chord,\n ChordDictionary,\n ChordType,\n Collection,\n Core,\n DurationValue,\n Interval,\n Key,\n Midi,\n Mode,\n Note,\n PcSet,\n Pcset,\n Progression,\n Range,\n RhythmPattern,\n RomanNumeral,\n Scale,\n ScaleDictionary,\n ScaleType,\n TimeSignature,\n Tonal,\n VoiceLeading,\n Voicing,\n VoicingDictionary,\n};\n", "export interface NamedPitch {\n readonly name: string;\n}\n\n/*** @deprecated use NamedPitch */\nexport interface Named {\n readonly name: string;\n}\n\nexport interface NotFound extends NamedPitch {\n readonly empty: true;\n readonly name: \"\";\n}\n\nexport function isNamedPitch(src: unknown): src is NamedPitch {\n return src !== null &&\n typeof src === \"object\" &&\n \"name\" in src &&\n typeof src.name === \"string\"\n ? true\n : false;\n}\n\ntype Fifths = number;\ntype Octaves = number;\nexport type Direction = 1 | -1;\n\nexport type PitchClassCoordinates = [Fifths];\nexport type NoteCoordinates = [Fifths, Octaves];\nexport type IntervalCoordinates = [Fifths, Octaves, Direction];\nexport type PitchCoordinates =\n | PitchClassCoordinates\n | NoteCoordinates\n | IntervalCoordinates;\n\n/**\n * Pitch properties\n *\n * - {number} step - The step number: 0 = C, 1 = D, ... 6 = B\n * - {number} alt - Number of alterations: -2 = 'bb', -1 = 'b', 0 = '', 1 = '#', ...\n * - {number} [oct] = The octave (undefined when is a coord class)\n * - {number} [dir] = Interval direction (undefined when is not an interval)\n */\nexport interface Pitch {\n readonly step: number;\n readonly alt: number;\n readonly oct?: number; // undefined for pitch classes\n readonly dir?: Direction; // undefined for notes\n}\n\nconst SIZES = [0, 2, 4, 5, 7, 9, 11];\nexport const chroma = ({ step, alt }: Pitch) => (SIZES[step] + alt + 120) % 12;\n\nexport const height = ({ step, alt, oct, dir = 1 }: Pitch) =>\n dir * (SIZES[step] + alt + 12 * (oct === undefined ? -100 : oct));\n\nexport const midi = (pitch: Pitch) => {\n const h = height(pitch);\n return pitch.oct !== undefined && h >= -12 && h <= 115 ? h + 12 : null;\n};\n\nexport function isPitch(pitch: unknown): pitch is Pitch {\n return pitch !== null &&\n typeof pitch === \"object\" &&\n \"step\" in pitch &&\n typeof pitch.step === \"number\" &&\n \"alt\" in pitch &&\n typeof pitch.alt === \"number\" &&\n !isNaN(pitch.step) &&\n !isNaN(pitch.alt)\n ? true\n : false;\n}\n\n// The number of fifths of [C, D, E, F, G, A, B]\nconst FIFTHS = [0, 2, 4, -1, 1, 3, 5];\n// The number of octaves it span each step\nconst STEPS_TO_OCTS = FIFTHS.map((fifths: number) =>\n Math.floor((fifths * 7) / 12),\n);\n\n/**\n * Get coordinates from pitch object\n */\nexport function coordinates(pitch: Pitch): PitchCoordinates {\n const { step, alt, oct, dir = 1 } = pitch;\n const f = FIFTHS[step] + 7 * alt;\n if (oct === undefined) {\n return [dir * f];\n }\n const o = oct - STEPS_TO_OCTS[step] - 4 * alt;\n return [dir * f, dir * o];\n}\n\n// We need to get the steps from fifths\n// Fifths for CDEFGAB are [ 0, 2, 4, -1, 1, 3, 5 ]\n// We add 1 to fifths to avoid negative numbers, so:\n// for [\"F\", \"C\", \"G\", \"D\", \"A\", \"E\", \"B\"] we have:\nconst FIFTHS_TO_STEPS = [3, 0, 4, 1, 5, 2, 6];\n\n/**\n * Get pitch from coordinate objects\n */\nexport function pitch(coord: PitchCoordinates): Pitch {\n const [f, o, dir] = coord;\n const step = FIFTHS_TO_STEPS[unaltered(f)];\n const alt = Math.floor((f + 1) / 7);\n if (o === undefined) {\n return { step, alt, dir };\n }\n const oct = o + 4 * alt + STEPS_TO_OCTS[step];\n return { step, alt, oct, dir };\n}\n\n// Return the number of fifths as if it were unaltered\nfunction unaltered(f: number): number {\n const i = (f + 1) % 7;\n return i < 0 ? 7 + i : i;\n}\n", "import {\n coordinates,\n Direction,\n IntervalCoordinates,\n isNamedPitch,\n isPitch,\n NamedPitch,\n Pitch,\n pitch,\n PitchCoordinates,\n} from \"@tonaljs/pitch\";\n\nconst fillStr = (s: string, n: number) => Array(Math.abs(n) + 1).join(s);\n\nexport type IntervalName = string;\nexport type IntervalLiteral = IntervalName | Pitch | NamedPitch;\n\ntype Quality =\n | \"dddd\"\n | \"ddd\"\n | \"dd\"\n | \"d\"\n | \"m\"\n | \"M\"\n | \"P\"\n | \"A\"\n | \"AA\"\n | \"AAA\"\n | \"AAAA\";\ntype Type = \"perfectable\" | \"majorable\";\n\nexport interface Interval extends Pitch, NamedPitch {\n readonly empty: boolean;\n readonly name: IntervalName;\n readonly num: number;\n readonly q: Quality;\n readonly type: Type;\n readonly step: number;\n readonly alt: number;\n readonly dir: Direction;\n readonly simple: number;\n readonly semitones: number;\n readonly chroma: number;\n readonly coord: IntervalCoordinates;\n readonly oct: number;\n}\n\nconst NoInterval: Interval = Object.freeze({\n empty: true,\n name: \"\",\n num: NaN,\n q: \"\" as Quality,\n type: \"\" as Type,\n step: NaN,\n alt: NaN,\n dir: NaN as Direction,\n simple: NaN,\n semitones: NaN,\n chroma: NaN,\n coord: [] as unknown as IntervalCoordinates,\n oct: NaN,\n});\n\n// shorthand tonal notation (with quality after number)\nconst INTERVAL_TONAL_REGEX = \"([-+]?\\\\d+)(d{1,4}|m|M|P|A{1,4})\";\n// standard shorthand notation (with quality before number)\nconst INTERVAL_SHORTHAND_REGEX = \"(AA|A|P|M|m|d|dd)([-+]?\\\\d+)\";\nconst REGEX = new RegExp(\n \"^\" + INTERVAL_TONAL_REGEX + \"|\" + INTERVAL_SHORTHAND_REGEX + \"$\",\n);\n\ntype IntervalTokens = [string, string];\n\n/**\n * @private\n */\nexport function tokenizeInterval(str?: IntervalName): IntervalTokens {\n const m = REGEX.exec(`${str}`);\n if (m === null) {\n return [\"\", \"\"];\n }\n return m[1] ? [m[1], m[2]] : [m[4], m[3]];\n}\n\nconst cache: { [key in string]: Interval } = {};\n\n/**\n * Get interval properties. It returns an object with:\n *\n * - name: the interval name\n * - num: the interval number\n * - type: 'perfectable' or 'majorable'\n * - q: the interval quality (d, m, M, A)\n * - dir: interval direction (1 ascending, -1 descending)\n * - simple: the simplified number\n * - semitones: the size in semitones\n * - chroma: the interval chroma\n *\n * @param {string} interval - the interval name\n * @return {Object} the interval properties\n *\n * @example\n * import { interval } from '@tonaljs/core'\n * interval('P5').semitones // => 7\n * interval('m3').type // => 'majorable'\n */\nexport function interval(src: IntervalLiteral): Interval {\n return typeof src === \"string\"\n ? cache[src] || (cache[src] = parse(src))\n : isPitch(src)\n ? interval(pitchName(src))\n : isNamedPitch(src)\n ? interval(src.name)\n : NoInterval;\n}\n\nconst SIZES = [0, 2, 4, 5, 7, 9, 11];\nconst TYPES = \"PMMPPMM\";\nfunction parse(str?: string): Interval {\n const tokens = tokenizeInterval(str);\n if (tokens[0] === \"\") {\n return NoInterval;\n }\n const num = +tokens[0];\n const q = tokens[1] as Quality;\n const step = (Math.abs(num) - 1) % 7;\n const t = TYPES[step];\n if (t === \"M\" && q === \"P\") {\n return NoInterval;\n }\n const type = t === \"M\" ? \"majorable\" : \"perfectable\";\n\n const name = \"\" + num + q;\n const dir = num < 0 ? -1 : 1;\n const simple = num === 8 || num === -8 ? num : dir * (step + 1);\n const alt = qToAlt(type, q);\n const oct = Math.floor((Math.abs(num) - 1) / 7);\n const semitones = dir * (SIZES[step] + alt + 12 * oct);\n const chroma = (((dir * (SIZES[step] + alt)) % 12) + 12) % 12;\n const coord = coordinates({ step, alt, oct, dir }) as IntervalCoordinates;\n return {\n empty: false,\n name,\n num,\n q,\n step,\n alt,\n dir,\n type,\n simple,\n semitones,\n chroma,\n coord,\n oct,\n };\n}\n\n/**\n * @private\n *\n * forceDescending is used in the case of unison (#243)\n */\nexport function coordToInterval(\n coord: PitchCoordinates,\n forceDescending?: boolean,\n): Interval {\n const [f, o = 0] = coord;\n const isDescending = f * 7 + o * 12 < 0;\n const ivl: IntervalCoordinates =\n forceDescending || isDescending ? [-f, -o, -1] : [f, o, 1];\n return interval(pitch(ivl)) as Interval;\n}\n\nfunction qToAlt(type: Type, q: string): number {\n return (q === \"M\" && type === \"majorable\") ||\n (q === \"P\" && type === \"perfectable\")\n ? 0\n : q === \"m\" && type === \"majorable\"\n ? -1\n : /^A+$/.test(q)\n ? q.length\n : /^d+$/.test(q)\n ? -1 * (type === \"perfectable\" ? q.length : q.length + 1)\n : 0;\n}\n\n// return the interval name of a pitch\nfunction pitchName(props: Pitch): string {\n const { step, alt, oct = 0, dir } = props;\n if (!dir) {\n return \"\";\n }\n const calcNum = step + 1 + 7 * oct;\n // this is an edge case: descending pitch class unison (see #243)\n const num = calcNum === 0 ? step + 1 : calcNum;\n const d = dir < 0 ? \"-\" : \"\";\n const type = TYPES[step] === \"M\" ? \"majorable\" : \"perfectable\";\n const name = d + num + altToQ(type, alt);\n return name;\n}\n\nfunction altToQ(type: Type, alt: number): Quality {\n if (alt === 0) {\n return type === \"majorable\" ? \"M\" : \"P\";\n } else if (alt === -1 && type === \"majorable\") {\n return \"m\";\n } else if (alt > 0) {\n return fillStr(\"A\", alt) as Quality;\n } else {\n return fillStr(\"d\", type === \"perfectable\" ? alt : alt + 1) as Quality;\n }\n}\n", "import {\n coordinates,\n isNamedPitch,\n isPitch,\n NamedPitch,\n Pitch,\n pitch,\n PitchCoordinates,\n} from \"@tonaljs/pitch\";\n\nconst fillStr = (s: string, n: number) => Array(Math.abs(n) + 1).join(s);\n\nexport type NoteWithOctave = string;\nexport type PcName = string;\nexport type NoteName = NoteWithOctave | PcName;\nexport type NoteLiteral = NoteName | Pitch | NamedPitch;\n\nexport interface Note extends Pitch, NamedPitch {\n readonly empty: boolean;\n readonly name: NoteName;\n readonly letter: string;\n readonly acc: string;\n readonly pc: PcName;\n readonly chroma: number;\n readonly height: number;\n readonly coord: PitchCoordinates;\n readonly midi: number | null;\n readonly freq: number | null;\n}\n\nconst NoNote: Note = Object.freeze({\n empty: true,\n name: \"\",\n letter: \"\",\n acc: \"\",\n pc: \"\",\n step: NaN,\n alt: NaN,\n chroma: NaN,\n height: NaN,\n coord: [] as unknown as PitchCoordinates,\n midi: null,\n freq: null,\n});\n\nconst cache: Map = new Map();\n\nexport const stepToLetter = (step: number) => \"CDEFGAB\".charAt(step);\nexport const altToAcc = (alt: number): string =>\n alt < 0 ? fillStr(\"b\", -alt) : fillStr(\"#\", alt);\nexport const accToAlt = (acc: string): number =>\n acc[0] === \"b\" ? -acc.length : acc.length;\n\n/**\n * Given a note literal (a note name or a note object), returns the Note object\n * @example\n * note('Bb4') // => { name: \"Bb4\", midi: 70, chroma: 10, ... }\n */\nexport function note(src: NoteLiteral): Note {\n const stringSrc = JSON.stringify(src);\n\n const cached = cache.get(stringSrc);\n if (cached) {\n return cached;\n }\n\n const value =\n typeof src === \"string\"\n ? parse(src)\n : isPitch(src)\n ? note(pitchName(src))\n : isNamedPitch(src)\n ? note(src.name)\n : NoNote;\n cache.set(stringSrc, value);\n return value;\n}\n\ntype NoteTokens = [string, string, string, string];\n\nconst REGEX = /^([a-gA-G]?)(#{1,}|b{1,}|x{1,}|)(-?\\d*)\\s*(.*)$/;\n\n/**\n * @private\n */\nexport function tokenizeNote(str: string): NoteTokens {\n const m = REGEX.exec(str) as string[];\n return m\n ? [m[1].toUpperCase(), m[2].replace(/x/g, \"##\"), m[3], m[4]]\n : [\"\", \"\", \"\", \"\"];\n}\n\n/**\n * @private\n */\nexport function coordToNote(noteCoord: PitchCoordinates): Note {\n return note(pitch(noteCoord)) as Note;\n}\n\nconst mod = (n: number, m: number) => ((n % m) + m) % m;\n\nconst SEMI = [0, 2, 4, 5, 7, 9, 11];\nfunction parse(noteName: NoteName): Note {\n const tokens = tokenizeNote(noteName);\n if (tokens[0] === \"\" || tokens[3] !== \"\") {\n return NoNote;\n }\n\n const letter = tokens[0];\n const acc = tokens[1];\n const octStr = tokens[2];\n\n const step = (letter.charCodeAt(0) + 3) % 7;\n const alt = accToAlt(acc);\n const oct = octStr.length ? +octStr : undefined;\n const coord = coordinates({ step, alt, oct });\n\n const name = letter + acc + octStr;\n const pc = letter + acc;\n const chroma = (SEMI[step] + alt + 120) % 12;\n const height =\n oct === undefined\n ? mod(SEMI[step] + alt, 12) - 12 * 99\n : SEMI[step] + alt + 12 * (oct + 1);\n const midi = height >= 0 && height <= 127 ? height : null;\n const freq = oct === undefined ? null : Math.pow(2, (height - 69) / 12) * 440;\n\n return {\n empty: false,\n acc,\n alt,\n chroma,\n coord,\n freq,\n height,\n letter,\n midi,\n name,\n oct,\n pc,\n step,\n };\n}\n\nfunction pitchName(props: Pitch): NoteName {\n const { step, alt, oct } = props;\n const letter = stepToLetter(step);\n if (!letter) {\n return \"\";\n }\n\n const pc = letter + altToAcc(alt);\n return oct || oct === 0 ? pc + oct : pc;\n}\n", "import { PitchCoordinates } from \"@tonaljs/pitch\";\nimport {\n IntervalLiteral,\n IntervalName,\n interval as asInterval,\n coordToInterval,\n} from \"@tonaljs/pitch-interval\";\nimport {\n NoteLiteral,\n NoteName,\n note as asNote,\n coordToNote,\n} from \"@tonaljs/pitch-note\";\n\n/**\n * Transpose a note by an interval.\n *\n * @param {string} note - the note or note name\n * @param {string} interval - the interval or interval name\n * @return {string} the transposed note name or empty string if not valid notes\n * @example\n * import { transpose } from \"@tonaljs/core\"\n * transpose(\"d3\", \"3M\") // => \"F#3\"\n * transpose(\"D\", \"3M\") // => \"F#\"\n * [\"C\", \"D\", \"E\", \"F\", \"G\"].map(pc => transpose(pc, \"M3)) // => [\"E\", \"F#\", \"G#\", \"A\", \"B\"]\n */\nexport function transpose(\n noteName: NoteLiteral,\n intervalName: IntervalLiteral | [number, number],\n): NoteName {\n const note = asNote(noteName);\n const intervalCoord = Array.isArray(intervalName)\n ? intervalName\n : asInterval(intervalName).coord;\n if (note.empty || !intervalCoord || intervalCoord.length < 2) {\n return \"\";\n }\n const noteCoord = note.coord;\n const tr: PitchCoordinates =\n noteCoord.length === 1\n ? [noteCoord[0] + intervalCoord[0]]\n : [noteCoord[0] + intervalCoord[0], noteCoord[1] + intervalCoord[1]];\n return coordToNote(tr).name;\n}\n\n// Private\nexport function tonicIntervalsTransposer(\n intervals: string[],\n tonic: string | undefined | null,\n) {\n const len = intervals.length;\n return (normalized: number) => {\n if (!tonic) return \"\";\n const index =\n normalized < 0 ? (len - (-normalized % len)) % len : normalized % len;\n const octaves = Math.floor(normalized / len);\n const root = transpose(tonic, [0, octaves]);\n return transpose(root, intervals[index]);\n };\n}\n\n/**\n * Find the interval distance between two notes or coord classes.\n *\n * To find distance between coord classes, both notes must be coord classes and\n * the interval is always ascending\n *\n * @param {Note|string} from - the note or note name to calculate distance from\n * @param {Note|string} to - the note or note name to calculate distance to\n * @return {string} the interval name or empty string if not valid notes\n *\n */\nexport function distance(\n fromNote: NoteLiteral,\n toNote: NoteLiteral,\n): IntervalName {\n const from = asNote(fromNote);\n const to = asNote(toNote);\n if (from.empty || to.empty) {\n return \"\";\n }\n\n const fcoord = from.coord;\n const tcoord = to.coord;\n const fifths = tcoord[0] - fcoord[0];\n const octs =\n fcoord.length === 2 && tcoord.length === 2\n ? tcoord[1] - fcoord[1]\n : -Math.floor((fifths * 7) / 12);\n\n // If it's unison, not pitch class, and in the same octave\n // it can be descending interval (see #243 & #428)\n const forceDescending =\n to.height === from.height &&\n to.midi !== null &&\n from.oct === to.oct &&\n from.step > to.step;\n return coordToInterval([fifths, octs], forceDescending).name;\n}\n", "import { distance as dist, transpose as tr } from \"@tonaljs/pitch-distance\";\nimport { note } from \"@tonaljs/pitch-note\";\n\nconst fillStr = (character: string, times: number) =>\n Array(times + 1).join(character);\n\nconst REGEX = /^(_{1,}|=|\\^{1,}|)([abcdefgABCDEFG])([,']*)$/;\n\ntype AbcTokens = [string, string, string];\n\nexport function tokenize(str: string): AbcTokens {\n const m = REGEX.exec(str);\n if (!m) {\n return [\"\", \"\", \"\"];\n }\n return [m[1], m[2], m[3]];\n}\n\n/**\n * Convert a (string) note in ABC notation into a (string) note in scientific notation\n *\n * @example\n * abcToScientificNotation(\"c\") // => \"C5\"\n */\nexport function abcToScientificNotation(str: string): string {\n const [acc, letter, oct] = tokenize(str);\n if (letter === \"\") {\n return \"\";\n }\n let o = 4;\n for (let i = 0; i < oct.length; i++) {\n o += oct.charAt(i) === \",\" ? -1 : 1;\n }\n const a =\n acc[0] === \"_\"\n ? acc.replace(/_/g, \"b\")\n : acc[0] === \"^\"\n ? acc.replace(/\\^/g, \"#\")\n : \"\";\n return letter.charCodeAt(0) > 96\n ? letter.toUpperCase() + a + (o + 1)\n : letter + a + o;\n}\n\n/**\n * Convert a (string) note in scientific notation into a (string) note in ABC notation\n *\n * @example\n * scientificToAbcNotation(\"C#4\") // => \"^C\"\n */\nexport function scientificToAbcNotation(str: string): string {\n const n = note(str);\n if (n.empty || (!n.oct && n.oct !== 0)) {\n return \"\";\n }\n const { letter, acc, oct } = n;\n const a = acc[0] === \"b\" ? acc.replace(/b/g, \"_\") : acc.replace(/#/g, \"^\");\n const l = oct > 4 ? letter.toLowerCase() : letter;\n const o =\n oct === 5 ? \"\" : oct > 4 ? fillStr(\"'\", oct - 5) : fillStr(\",\", 4 - oct);\n return a + l + o;\n}\n\nexport function transpose(note: string, interval: string): string {\n return scientificToAbcNotation(tr(abcToScientificNotation(note), interval));\n}\n\nexport function distance(from: string, to: string): string {\n return dist(abcToScientificNotation(from), abcToScientificNotation(to));\n}\n\n/** @deprecated */\nexport default {\n abcToScientificNotation,\n scientificToAbcNotation,\n tokenize,\n transpose,\n distance,\n};\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { note, Note } from \"@tonaljs/pitch-note\";\n\n// ascending range\nfunction ascR(b: number, n: number) {\n const a = [];\n // tslint:disable-next-line:curly\n for (; n--; a[n] = n + b);\n return a;\n}\n// descending range\nfunction descR(b: number, n: number) {\n const a = [];\n // tslint:disable-next-line:curly\n for (; n--; a[n] = b - n);\n return a;\n}\n\n/**\n * Creates a numeric range\n *\n * @param {number} from\n * @param {number} to\n * @return {Array}\n *\n * @example\n * range(-2, 2) // => [-2, -1, 0, 1, 2]\n * range(2, -2) // => [2, 1, 0, -1, -2]\n */\nexport function range(from: number, to: number): number[] {\n return from < to ? ascR(from, to - from + 1) : descR(from, from - to + 1);\n}\n\n/**\n * Rotates a list a number of times. It\"s completly agnostic about the\n * contents of the list.\n *\n * @param {Integer} times - the number of rotations\n * @param {Array} array\n * @return {Array} the rotated array\n *\n * @example\n * rotate(1, [1, 2, 3]) // => [2, 3, 1]\n */\nexport function rotate(times: number, arr: T[]): T[] {\n const len = arr.length;\n const n = ((times % len) + len) % len;\n return arr.slice(n, len).concat(arr.slice(0, n));\n}\n\n/**\n * Return a copy of the array with the null values removed\n * @function\n * @param {Array} array\n * @return {Array}\n *\n * @example\n * compact([\"a\", \"b\", null, \"c\"]) // => [\"a\", \"b\", \"c\"]\n */\nexport function compact(arr: any[]): any[] {\n return arr.filter((n) => n === 0 || n);\n}\n\n/**\n * Sort an array of notes in ascending order. Pitch classes are listed\n * before notes. Any string that is not a note is removed.\n *\n * @param {string[]} notes\n * @return {string[]} sorted array of notes\n *\n * @example\n * sortedNoteNames(['c2', 'c5', 'c1', 'c0', 'c6', 'c'])\n * // => ['C', 'C0', 'C1', 'C2', 'C5', 'C6']\n * sortedNoteNames(['c', 'F', 'G', 'a', 'b', 'h', 'J'])\n * // => ['C', 'F', 'G', 'A', 'B']\n */\nexport function sortedNoteNames(notes: string[]): string[] {\n const valid = notes.map((n) => note(n)).filter((n) => !n.empty) as Note[];\n return valid.sort((a, b) => a.height - b.height).map((n) => n.name);\n}\n\n/**\n * Get sorted notes with duplicates removed. Pitch classes are listed\n * before notes.\n *\n * @function\n * @param {string[]} array\n * @return {string[]} unique sorted notes\n *\n * @example\n * Array.sortedUniqNoteNames(['a', 'b', 'c2', '1p', 'p2', 'c2', 'b', 'c', 'c3' ])\n * // => [ 'C', 'A', 'B', 'C2', 'C3' ]\n */\nexport function sortedUniqNoteNames(arr: string[]): string[] {\n return sortedNoteNames(arr).filter((n, i, a) => i === 0 || n !== a[i - 1]);\n}\n\n/**\n * Randomizes the order of the specified array in-place, using the Fisher–Yates shuffle.\n *\n * @function\n * @param {Array} array\n * @return {Array} the array shuffled\n *\n * @example\n * shuffle([\"C\", \"D\", \"E\", \"F\"]) // => [...]\n */\nexport function shuffle(arr: any[], rnd = Math.random): any[] {\n let i: number;\n let t: any;\n let m: number = arr.length;\n while (m) {\n i = Math.floor(rnd() * m--);\n t = arr[m];\n arr[m] = arr[i];\n arr[i] = t;\n }\n return arr;\n}\n\n/**\n * Get all permutations of an array\n *\n * @param {Array} array - the array\n * @return {Array} an array with all the permutations\n * @example\n * permutations([\"a\", \"b\", \"c\"])) // =>\n * [\n * [\"a\", \"b\", \"c\"],\n * [\"b\", \"a\", \"c\"],\n * [\"b\", \"c\", \"a\"],\n * [\"a\", \"c\", \"b\"],\n * [\"c\", \"a\", \"b\"],\n * [\"c\", \"b\", \"a\"]\n * ]\n */\nexport function permutations(arr: any[]): any[] {\n if (arr.length === 0) {\n return [[]];\n }\n return permutations(arr.slice(1)).reduce((acc, perm) => {\n return acc.concat(\n arr.map((e, pos) => {\n const newPerm = perm.slice();\n newPerm.splice(pos, 0, arr[0]);\n return newPerm;\n }),\n );\n }, []);\n}\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\n// ascending range\nfunction ascR(b: number, n: number) {\n const a = [];\n // tslint:disable-next-line:curly\n for (; n--; a[n] = n + b);\n return a;\n}\n// descending range\nfunction descR(b: number, n: number) {\n const a = [];\n // tslint:disable-next-line:curly\n for (; n--; a[n] = b - n);\n return a;\n}\n\n/**\n * Creates a numeric range\n *\n * @param {number} from\n * @param {number} to\n * @return {Array}\n *\n * @example\n * range(-2, 2) // => [-2, -1, 0, 1, 2]\n * range(2, -2) // => [2, 1, 0, -1, -2]\n */\nexport function range(from: number, to: number): number[] {\n return from < to ? ascR(from, to - from + 1) : descR(from, from - to + 1);\n}\n\n/**\n * Rotates a list a number of times. It\"s completly agnostic about the\n * contents of the list.\n *\n * @param {Integer} times - the number of rotations\n * @param {Array} collection\n * @return {Array} the rotated collection\n *\n * @example\n * rotate(1, [1, 2, 3]) // => [2, 3, 1]\n */\nexport function rotate(times: number, arr: T[]): T[] {\n const len = arr.length;\n const n = ((times % len) + len) % len;\n return arr.slice(n, len).concat(arr.slice(0, n));\n}\n\n/**\n * Return a copy of the collection with the null values removed\n * @function\n * @param {Array} collection\n * @return {Array}\n *\n * @example\n * compact([\"a\", \"b\", null, \"c\"]) // => [\"a\", \"b\", \"c\"]\n */\nexport function compact(arr: any[]): any[] {\n return arr.filter((n) => n === 0 || n);\n}\n\n/**\n * Randomizes the order of the specified collection in-place, using the Fisher–Yates shuffle.\n *\n * @function\n * @param {Array} collection\n * @return {Array} the collection shuffled\n *\n * @example\n * shuffle([\"C\", \"D\", \"E\", \"F\"]) // => [...]\n */\nexport function shuffle(arr: any[], rnd = Math.random): any[] {\n let i: number;\n let t: any;\n let m: number = arr.length;\n while (m) {\n i = Math.floor(rnd() * m--);\n t = arr[m];\n arr[m] = arr[i];\n arr[i] = t;\n }\n return arr;\n}\n\n/**\n * Get all permutations of an collection\n *\n * @param {Array} collection - the collection\n * @return {Array} an collection with all the permutations\n * @example\n * permutations([\"a\", \"b\", \"c\"])) // =>\n * [\n * [\"a\", \"b\", \"c\"],\n * [\"b\", \"a\", \"c\"],\n * [\"b\", \"c\", \"a\"],\n * [\"a\", \"c\", \"b\"],\n * [\"c\", \"a\", \"b\"],\n * [\"c\", \"b\", \"a\"]\n * ]\n */\nexport function permutations(arr: any[]): any[] {\n if (arr.length === 0) {\n return [[]];\n }\n return permutations(arr.slice(1)).reduce((acc, perm) => {\n return acc.concat(\n arr.map((e, pos) => {\n const newPerm = perm.slice();\n newPerm.splice(pos, 0, arr[0]);\n return newPerm;\n }),\n );\n }, []);\n}\n\n/** @deprecated */\nexport default {\n compact,\n permutations,\n range,\n rotate,\n shuffle,\n};\n", "import { compact, range, rotate } from \"@tonaljs/collection\";\nimport { NotFound } from \"@tonaljs/pitch\";\nimport { transpose } from \"@tonaljs/pitch-distance\";\nimport { Interval, IntervalName, interval } from \"@tonaljs/pitch-interval\";\nimport { Note, NoteName, note } from \"@tonaljs/pitch-note\";\n\n/**\n * The properties of a pitch class set\n * @param {number} num - a number between 1 and 4095 (both included) that\n * uniquely identifies the set. It's the decimal number of the chrom.\n * @param {string} chroma - a string representation of the set: a 12-char string\n * with either \"1\" or \"0\" as characters, representing a pitch class or not\n * for the given position in the octave. For example, a \"1\" at index 0 means 'C',\n * a \"1\" at index 2 means 'D', and so on...\n * @param {string} normalized - the chroma but shifted to the first 1\n * @param {number} length - the number of notes of the pitch class set\n * @param {IntervalName[]} intervals - the intervals of the pitch class set\n * *starting from C*\n */\nexport interface Pcset {\n readonly name: string;\n readonly empty: boolean;\n readonly setNum: number;\n readonly chroma: PcsetChroma;\n readonly normalized: PcsetChroma;\n readonly intervals: IntervalName[];\n}\n\nexport const EmptyPcset: Pcset = {\n empty: true,\n name: \"\",\n setNum: 0,\n chroma: \"000000000000\",\n normalized: \"000000000000\",\n intervals: [],\n};\n\nexport type PcsetChroma = string;\nexport type PcsetNum = number;\n\n// UTILITIES\nconst setNumToChroma = (num: number): string =>\n Number(num).toString(2).padStart(12, \"0\");\nconst chromaToNumber = (chroma: string): number => parseInt(chroma, 2);\nconst REGEX = /^[01]{12}$/;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isChroma(set: any): set is PcsetChroma {\n return REGEX.test(set);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isPcsetNum = (set: any): set is PcsetNum =>\n typeof set === \"number\" && set >= 0 && set <= 4095;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isPcset = (set: any): set is Pcset => set && isChroma(set.chroma);\n\nconst cache: { [key in string]: Pcset } = { [EmptyPcset.chroma]: EmptyPcset };\n\n/**\n * A definition of a pitch class set. It could be:\n * - The pitch class set chroma (a 12-length string with only 1s or 0s)\n * - The pitch class set number (an integer between 1 and 4095)\n * - An array of note names\n * - An array of interval names\n */\nexport type Set =\n | Partial\n | PcsetChroma\n | PcsetNum\n | NoteName[]\n | IntervalName[];\n\n/**\n * Get the pitch class set of a collection of notes or set number or chroma\n */\nexport function get(src: Set): Pcset {\n const chroma: PcsetChroma = isChroma(src)\n ? src\n : isPcsetNum(src)\n ? setNumToChroma(src)\n : Array.isArray(src)\n ? listToChroma(src)\n : isPcset(src)\n ? src.chroma\n : EmptyPcset.chroma;\n\n return (cache[chroma] = cache[chroma] || chromaToPcset(chroma));\n}\n\n/**\n * @use Pcset.get\n * @deprecated\n */\nexport const pcset = get;\n\n/**\n * Get pitch class set chroma\n * @function\n * @example\n * Pcset.chroma([\"c\", \"d\", \"e\"]); //=> \"101010000000\"\n */\nexport const chroma = (set: Set) => get(set).chroma;\n\n/**\n * Get intervals (from C) of a set\n * @function\n * @example\n * Pcset.intervals([\"c\", \"d\", \"e\"]); //=>\n */\nexport const intervals = (set: Set) => get(set).intervals;\n\n/**\n * Get pitch class set number\n * @function\n * @example\n * Pcset.num([\"c\", \"d\", \"e\"]); //=> 2192\n */\nexport const num = (set: Set) => get(set).setNum;\n\nconst IVLS = [\n \"1P\",\n \"2m\",\n \"2M\",\n \"3m\",\n \"3M\",\n \"4P\",\n \"5d\",\n \"5P\",\n \"6m\",\n \"6M\",\n \"7m\",\n \"7M\",\n];\n\n/**\n * Get the intervals of a pcset *starting from C*\n * @private\n * @param {Set} set - the pitch class set\n * @return {IntervalName[]} an array of interval names or an empty array\n * if not a valid pitch class set\n */\nfunction chromaToIntervals(chroma: PcsetChroma): IntervalName[] {\n const intervals = [];\n for (let i = 0; i < 12; i++) {\n // tslint:disable-next-line:curly\n if (chroma.charAt(i) === \"1\") intervals.push(IVLS[i]);\n }\n return intervals;\n}\n\nexport function notes(set: Set): NoteName[] {\n return get(set).intervals.map((ivl) => transpose(\"C\", ivl));\n}\n\n/**\n * Get a list of all possible pitch class sets (all possible chromas) *having\n * C as root*. There are 2048 different chromas. If you want them with another\n * note you have to transpose it\n *\n * @see http://allthescales.org/\n * @return {Array} an array of possible chromas from '10000000000' to '11111111111'\n */\nexport function chromas(): PcsetChroma[] {\n return range(2048, 4095).map(setNumToChroma);\n}\n\n/**\n * Given a a list of notes or a pcset chroma, produce the rotations\n * of the chroma discarding the ones that starts with \"0\"\n *\n * This is used, for example, to get all the modes of a scale.\n *\n * @param {Array|string} set - the list of notes or pitchChr of the set\n * @param {boolean} normalize - (Optional, true by default) remove all\n * the rotations that starts with \"0\"\n * @return {Array} an array with all the modes of the chroma\n *\n * @example\n * Pcset.modes([\"C\", \"D\", \"E\"]).map(Pcset.intervals)\n */\nexport function modes(set: Set, normalize = true): PcsetChroma[] {\n const pcs = get(set);\n\n const binary = pcs.chroma.split(\"\");\n return compact(\n binary.map((_, i) => {\n const r = rotate(i, binary);\n return normalize && r[0] === \"0\" ? null : r.join(\"\");\n }),\n );\n}\n\n/**\n * Test if two pitch class sets are equal\n *\n * @param {Array|string} set1 - one of the pitch class sets\n * @param {Array|string} set2 - the other pitch class set\n * @return {boolean} true if they are equal\n * @example\n * Pcset.isEqual([\"c2\", \"d3\"], [\"c5\", \"d2\"]) // => true\n */\nexport function isEqual(s1: Set, s2: Set) {\n return get(s1).setNum === get(s2).setNum;\n}\n\n/**\n * Create a function that test if a collection of notes is a\n * subset of a given set\n *\n * The function is curryfied.\n *\n * @param {PcsetChroma|NoteName[]} set - the superset to test against (chroma or\n * list of notes)\n * @return{function(PcsetChroma|NoteNames[]): boolean} a function accepting a set\n * to test against (chroma or list of notes)\n * @example\n * const inCMajor = Pcset.isSubsetOf([\"C\", \"E\", \"G\"])\n * inCMajor([\"e6\", \"c4\"]) // => true\n * inCMajor([\"e6\", \"c4\", \"d3\"]) // => false\n */\nexport function isSubsetOf(set: Set) {\n const s = get(set).setNum;\n\n return (notes: Set | Pcset) => {\n const o = get(notes).setNum;\n // tslint:disable-next-line: no-bitwise\n return s && s !== o && (o & s) === o;\n };\n}\n\n/**\n * Create a function that test if a collection of notes is a\n * superset of a given set (it contains all notes and at least one more)\n *\n * @param {Set} set - an array of notes or a chroma set string to test against\n * @return {(subset: Set): boolean} a function that given a set\n * returns true if is a subset of the first one\n * @example\n * const extendsCMajor = Pcset.isSupersetOf([\"C\", \"E\", \"G\"])\n * extendsCMajor([\"e6\", \"a\", \"c4\", \"g2\"]) // => true\n * extendsCMajor([\"c6\", \"e4\", \"g3\"]) // => false\n */\nexport function isSupersetOf(set: Set) {\n const s = get(set).setNum;\n return (notes: Set) => {\n const o = get(notes).setNum;\n // tslint:disable-next-line: no-bitwise\n return s && s !== o && (o | s) === o;\n };\n}\n\n/**\n * Test if a given pitch class set includes a note\n *\n * @param {Array} set - the base set to test against\n * @param {string} note - the note to test\n * @return {boolean} true if the note is included in the pcset\n *\n * Can be partially applied\n *\n * @example\n * const isNoteInCMajor = isNoteIncludedIn(['C', 'E', 'G'])\n * isNoteInCMajor('C4') // => true\n * isNoteInCMajor('C#4') // => false\n */\nexport function isNoteIncludedIn(set: Set) {\n const s = get(set);\n\n return (noteName: NoteName): boolean => {\n const n = note(noteName);\n return s && !n.empty && s.chroma.charAt(n.chroma) === \"1\";\n };\n}\n\n/** @deprecated use: isNoteIncludedIn */\nexport const includes = isNoteIncludedIn;\n\n/**\n * Filter a list with a pitch class set\n *\n * @param {Array|string} set - the pitch class set notes\n * @param {Array|string} notes - the note list to be filtered\n * @return {Array} the filtered notes\n *\n * @example\n * Pcset.filter([\"C\", \"D\", \"E\"], [\"c2\", \"c#2\", \"d2\", \"c3\", \"c#3\", \"d3\"]) // => [ \"c2\", \"d2\", \"c3\", \"d3\" ])\n * Pcset.filter([\"C2\"], [\"c2\", \"c#2\", \"d2\", \"c3\", \"c#3\", \"d3\"]) // => [ \"c2\", \"c3\" ])\n */\nexport function filter(set: Set) {\n const isIncluded = isNoteIncludedIn(set);\n return (notes: NoteName[]) => {\n return notes.filter(isIncluded);\n };\n}\n\n/** @deprecated */\nexport default {\n get,\n chroma,\n num,\n intervals,\n chromas,\n isSupersetOf,\n isSubsetOf,\n isNoteIncludedIn,\n isEqual,\n filter,\n modes,\n notes,\n // deprecated\n pcset,\n};\n\n//// PRIVATE ////\n\nfunction chromaRotations(chroma: string): string[] {\n const binary = chroma.split(\"\");\n return binary.map((_, i) => rotate(i, binary).join(\"\"));\n}\n\nfunction chromaToPcset(chroma: PcsetChroma): Pcset {\n const setNum = chromaToNumber(chroma);\n const normalizedNum = chromaRotations(chroma)\n .map(chromaToNumber)\n .filter((n) => n >= 2048)\n .sort()[0];\n const normalized = setNumToChroma(normalizedNum);\n\n const intervals = chromaToIntervals(chroma);\n\n return {\n empty: false,\n name: \"\",\n setNum,\n chroma,\n normalized,\n intervals,\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction listToChroma(set: any[]): PcsetChroma {\n if (set.length === 0) {\n return EmptyPcset.chroma;\n }\n\n let pitch: Note | Interval | NotFound;\n const binary = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < set.length; i++) {\n pitch = note(set[i]);\n // tslint:disable-next-line: curly\n if (pitch.empty) pitch = interval(set[i]);\n // tslint:disable-next-line: curly\n if (!pitch.empty) binary[pitch.chroma] = 1;\n }\n return binary.join(\"\");\n}\n", "import {\n EmptyPcset,\n get as pcset,\n Pcset,\n PcsetChroma,\n PcsetNum,\n} from \"@tonaljs/pcset\";\nimport data from \"./data\";\n\nexport type ChordQuality =\n | \"Major\"\n | \"Minor\"\n | \"Augmented\"\n | \"Diminished\"\n | \"Unknown\";\n\nexport interface ChordType extends Pcset {\n name: string;\n quality: ChordQuality;\n aliases: string[];\n}\nconst NoChordType: ChordType = {\n ...EmptyPcset,\n name: \"\",\n quality: \"Unknown\",\n intervals: [],\n aliases: [],\n};\n\ntype ChordTypeName = string | PcsetChroma | PcsetNum;\n\nlet dictionary: ChordType[] = [];\nlet index: Record = {};\n\n/**\n * Given a chord name or chroma, return the chord properties\n * @param {string} source - chord name or pitch class set chroma\n * @example\n * import { get } from 'tonaljs/chord-type'\n * get('major') // => { name: 'major', ... }\n */\nexport function get(type: ChordTypeName): ChordType {\n return index[type] || NoChordType;\n}\n\n/** @deprecated */\nexport const chordType = get;\n\n/**\n * Get all chord (long) names\n */\nexport function names() {\n return dictionary.map((chord) => chord.name).filter((x) => x);\n}\n\n/**\n * Get all chord symbols\n */\nexport function symbols() {\n return dictionary.map((chord) => chord.aliases[0]).filter((x) => x);\n}\n\n/**\n * Keys used to reference chord types\n */\nexport function keys() {\n return Object.keys(index);\n}\n\n/**\n * Return a list of all chord types\n */\nexport function all(): ChordType[] {\n return dictionary.slice();\n}\n\n/** @deprecated */\nexport const entries = all;\n\n/**\n * Clear the dictionary\n */\nexport function removeAll() {\n dictionary = [];\n index = {};\n}\n\n/**\n * Add a chord to the dictionary.\n * @param intervals\n * @param aliases\n * @param [fullName]\n */\nexport function add(intervals: string[], aliases: string[], fullName?: string) {\n const quality = getQuality(intervals);\n const chord = {\n ...pcset(intervals),\n name: fullName || \"\",\n quality,\n intervals,\n aliases,\n };\n dictionary.push(chord);\n if (chord.name) {\n index[chord.name] = chord;\n }\n index[chord.setNum] = chord;\n index[chord.chroma] = chord;\n chord.aliases.forEach((alias) => addAlias(chord, alias));\n}\n\nexport function addAlias(chord: ChordType, alias: string) {\n index[alias] = chord;\n}\n\nfunction getQuality(intervals: string[]): ChordQuality {\n const has = (interval: string) => intervals.indexOf(interval) !== -1;\n return has(\"5A\")\n ? \"Augmented\"\n : has(\"3M\")\n ? \"Major\"\n : has(\"5d\")\n ? \"Diminished\"\n : has(\"3m\")\n ? \"Minor\"\n : \"Unknown\";\n}\n\ndata.forEach(([ivls, fullName, names]: string[]) =>\n add(ivls.split(\" \"), names.split(\" \"), fullName),\n);\ndictionary.sort((a, b) => a.setNum - b.setNum);\n\n/** @deprecated */\nexport default {\n names,\n symbols,\n get,\n all,\n add,\n removeAll,\n keys,\n // deprecated\n entries,\n chordType,\n};\n", "/**\n * @private\n * Chord List\n * Source: https://en.wikibooks.org/wiki/Music_Theory/Complete_List_of_Chord_Patterns\n * Format: [\"intervals\", \"full name\", \"abrv1 abrv2\"]\n */\nconst CHORDS: string[][] = [\n // ==Major==\n [\"1P 3M 5P\", \"major\", \"M ^ maj\"],\n [\"1P 3M 5P 7M\", \"major seventh\", \"maj7 Δ ma7 M7 Maj7 ^7\"],\n [\"1P 3M 5P 7M 9M\", \"major ninth\", \"maj9 Δ9 ^9\"],\n [\"1P 3M 5P 7M 9M 13M\", \"major thirteenth\", \"maj13 Maj13 ^13\"],\n [\"1P 3M 5P 6M\", \"sixth\", \"6 add6 add13 M6\"],\n [\"1P 3M 5P 6M 9M\", \"sixth added ninth\", \"6add9 6/9 69 M69\"],\n [\"1P 3M 6m 7M\", \"major seventh flat sixth\", \"M7b6 ^7b6\"],\n [\n \"1P 3M 5P 7M 11A\",\n \"major seventh sharp eleventh\",\n \"maj#4 Δ#4 Δ#11 M7#11 ^7#11 maj7#11\",\n ],\n // ==Minor==\n // '''Normal'''\n [\"1P 3m 5P\", \"minor\", \"m min -\"],\n [\"1P 3m 5P 7m\", \"minor seventh\", \"m7 min7 mi7 -7\"],\n [\n \"1P 3m 5P 7M\",\n \"minor/major seventh\",\n \"m/ma7 m/maj7 mM7 mMaj7 m/M7 -Δ7 mΔ -^7 -maj7\",\n ],\n [\"1P 3m 5P 6M\", \"minor sixth\", \"m6 -6\"],\n [\"1P 3m 5P 7m 9M\", \"minor ninth\", \"m9 -9\"],\n [\"1P 3m 5P 7M 9M\", \"minor/major ninth\", \"mM9 mMaj9 -^9\"],\n [\"1P 3m 5P 7m 9M 11P\", \"minor eleventh\", \"m11 -11\"],\n [\"1P 3m 5P 7m 9M 13M\", \"minor thirteenth\", \"m13 -13\"],\n // '''Diminished'''\n [\"1P 3m 5d\", \"diminished\", \"dim ° o\"],\n [\"1P 3m 5d 7d\", \"diminished seventh\", \"dim7 °7 o7\"],\n [\"1P 3m 5d 7m\", \"half-diminished\", \"m7b5 ø -7b5 h7 h\"],\n // ==Dominant/Seventh==\n // '''Normal'''\n [\"1P 3M 5P 7m\", \"dominant seventh\", \"7 dom\"],\n [\"1P 3M 5P 7m 9M\", \"dominant ninth\", \"9\"],\n [\"1P 3M 5P 7m 9M 13M\", \"dominant thirteenth\", \"13\"],\n [\"1P 3M 5P 7m 11A\", \"lydian dominant seventh\", \"7#11 7#4\"],\n // '''Altered'''\n [\"1P 3M 5P 7m 9m\", \"dominant flat ninth\", \"7b9\"],\n [\"1P 3M 5P 7m 9A\", \"dominant sharp ninth\", \"7#9\"],\n [\"1P 3M 7m 9m\", \"altered\", \"alt7\"],\n // '''Suspended'''\n [\"1P 4P 5P\", \"suspended fourth\", \"sus4 sus\"],\n [\"1P 2M 5P\", \"suspended second\", \"sus2\"],\n [\"1P 4P 5P 7m\", \"suspended fourth seventh\", \"7sus4 7sus\"],\n [\"1P 5P 7m 9M 11P\", \"eleventh\", \"11\"],\n [\n \"1P 4P 5P 7m 9m\",\n \"suspended fourth flat ninth\",\n \"b9sus phryg 7b9sus 7b9sus4\",\n ],\n // ==Other==\n [\"1P 5P\", \"fifth\", \"5\"],\n [\"1P 3M 5A\", \"augmented\", \"aug + +5 ^#5\"],\n [\"1P 3m 5A\", \"minor augmented\", \"m#5 -#5 m+\"],\n [\"1P 3M 5A 7M\", \"augmented seventh\", \"maj7#5 maj7+5 +maj7 ^7#5\"],\n [\n \"1P 3M 5P 7M 9M 11A\",\n \"major sharp eleventh (lydian)\",\n \"maj9#11 Δ9#11 ^9#11\",\n ],\n // ==Legacy==\n [\"1P 2M 4P 5P\", \"\", \"sus24 sus4add9\"],\n [\"1P 3M 5A 7M 9M\", \"\", \"maj9#5 Maj9#5\"],\n [\"1P 3M 5A 7m\", \"\", \"7#5 +7 7+ 7aug aug7\"],\n [\"1P 3M 5A 7m 9A\", \"\", \"7#5#9 7#9#5 7alt\"],\n [\"1P 3M 5A 7m 9M\", \"\", \"9#5 9+\"],\n [\"1P 3M 5A 7m 9M 11A\", \"\", \"9#5#11\"],\n [\"1P 3M 5A 7m 9m\", \"\", \"7#5b9 7b9#5\"],\n [\"1P 3M 5A 7m 9m 11A\", \"\", \"7#5b9#11\"],\n [\"1P 3M 5A 9A\", \"\", \"+add#9\"],\n [\"1P 3M 5A 9M\", \"\", \"M#5add9 +add9\"],\n [\"1P 3M 5P 6M 11A\", \"\", \"M6#11 M6b5 6#11 6b5\"],\n [\"1P 3M 5P 6M 7M 9M\", \"\", \"M7add13\"],\n [\"1P 3M 5P 6M 9M 11A\", \"\", \"69#11\"],\n [\"1P 3m 5P 6M 9M\", \"\", \"m69 -69\"],\n [\"1P 3M 5P 6m 7m\", \"\", \"7b6\"],\n [\"1P 3M 5P 7M 9A 11A\", \"\", \"maj7#9#11\"],\n [\"1P 3M 5P 7M 9M 11A 13M\", \"\", \"M13#11 maj13#11 M13+4 M13#4\"],\n [\"1P 3M 5P 7M 9m\", \"\", \"M7b9\"],\n [\"1P 3M 5P 7m 11A 13m\", \"\", \"7#11b13 7b5b13\"],\n [\"1P 3M 5P 7m 13M\", \"\", \"7add6 67 7add13\"],\n [\"1P 3M 5P 7m 9A 11A\", \"\", \"7#9#11 7b5#9 7#9b5\"],\n [\"1P 3M 5P 7m 9A 11A 13M\", \"\", \"13#9#11\"],\n [\"1P 3M 5P 7m 9A 11A 13m\", \"\", \"7#9#11b13\"],\n [\"1P 3M 5P 7m 9A 13M\", \"\", \"13#9\"],\n [\"1P 3M 5P 7m 9A 13m\", \"\", \"7#9b13\"],\n [\"1P 3M 5P 7m 9M 11A\", \"\", \"9#11 9+4 9#4\"],\n [\"1P 3M 5P 7m 9M 11A 13M\", \"\", \"13#11 13+4 13#4\"],\n [\"1P 3M 5P 7m 9M 11A 13m\", \"\", \"9#11b13 9b5b13\"],\n [\"1P 3M 5P 7m 9m 11A\", \"\", \"7b9#11 7b5b9 7b9b5\"],\n [\"1P 3M 5P 7m 9m 11A 13M\", \"\", \"13b9#11\"],\n [\"1P 3M 5P 7m 9m 11A 13m\", \"\", \"7b9b13#11 7b9#11b13 7b5b9b13\"],\n [\"1P 3M 5P 7m 9m 13M\", \"\", \"13b9\"],\n [\"1P 3M 5P 7m 9m 13m\", \"\", \"7b9b13\"],\n [\"1P 3M 5P 7m 9m 9A\", \"\", \"7b9#9\"],\n [\"1P 3M 5P 9M\", \"\", \"Madd9 2 add9 add2\"],\n [\"1P 3M 5P 9m\", \"\", \"Maddb9\"],\n [\"1P 3M 5d\", \"\", \"Mb5\"],\n [\"1P 3M 5d 6M 7m 9M\", \"\", \"13b5\"],\n [\"1P 3M 5d 7M\", \"\", \"M7b5\"],\n [\"1P 3M 5d 7M 9M\", \"\", \"M9b5\"],\n [\"1P 3M 5d 7m\", \"\", \"7b5\"],\n [\"1P 3M 5d 7m 9M\", \"\", \"9b5\"],\n [\"1P 3M 7m\", \"\", \"7no5\"],\n [\"1P 3M 7m 13m\", \"\", \"7b13\"],\n [\"1P 3M 7m 9M\", \"\", \"9no5\"],\n [\"1P 3M 7m 9M 13M\", \"\", \"13no5\"],\n [\"1P 3M 7m 9M 13m\", \"\", \"9b13\"],\n [\"1P 3m 4P 5P\", \"\", \"madd4\"],\n [\"1P 3m 5P 6m 7M\", \"\", \"mMaj7b6\"],\n [\"1P 3m 5P 6m 7M 9M\", \"\", \"mMaj9b6\"],\n [\"1P 3m 5P 7m 11P\", \"\", \"m7add11 m7add4\"],\n [\"1P 3m 5P 9M\", \"\", \"madd9\"],\n [\"1P 3m 5d 6M 7M\", \"\", \"o7M7\"],\n [\"1P 3m 5d 7M\", \"\", \"oM7\"],\n [\"1P 3m 6m 7M\", \"\", \"mb6M7\"],\n [\"1P 3m 6m 7m\", \"\", \"m7#5\"],\n [\"1P 3m 6m 7m 9M\", \"\", \"m9#5\"],\n [\"1P 3m 5A 7m 9M 11P\", \"\", \"m11A\"],\n [\"1P 3m 6m 9m\", \"\", \"mb6b9\"],\n [\"1P 2M 3m 5d 7m\", \"\", \"m9b5\"],\n [\"1P 4P 5A 7M\", \"\", \"M7#5sus4\"],\n [\"1P 4P 5A 7M 9M\", \"\", \"M9#5sus4\"],\n [\"1P 4P 5A 7m\", \"\", \"7#5sus4\"],\n [\"1P 4P 5P 7M\", \"\", \"M7sus4\"],\n [\"1P 4P 5P 7M 9M\", \"\", \"M9sus4\"],\n [\"1P 4P 5P 7m 9M\", \"\", \"9sus4 9sus\"],\n [\"1P 4P 5P 7m 9M 13M\", \"\", \"13sus4 13sus\"],\n [\"1P 4P 5P 7m 9m 13m\", \"\", \"7sus4b9b13 7b9b13sus4\"],\n [\"1P 4P 7m 10m\", \"\", \"4 quartal\"],\n [\"1P 5P 7m 9m 11P\", \"\", \"11b9\"],\n];\n\nexport default CHORDS;\n", "import { all, ChordType } from \"@tonaljs/chord-type\";\nimport { modes } from \"@tonaljs/pcset\";\nimport { note } from \"@tonaljs/pitch-note\";\n\ninterface FoundChord {\n readonly weight: number;\n readonly name: string;\n}\n\nconst namedSet = (notes: string[]) => {\n const pcToName = notes.reduce>((record, n) => {\n const chroma = note(n).chroma;\n if (chroma !== undefined) {\n record[chroma] = record[chroma] || note(n).name;\n }\n return record;\n }, {});\n\n return (chroma: number) => pcToName[chroma];\n};\n\ntype DetectOptions = {\n assumePerfectFifth: boolean;\n};\nexport function detect(\n source: string[],\n options: Partial = {},\n): string[] {\n const notes = source.map((n) => note(n).pc).filter((x) => x);\n if (note.length === 0) {\n return [];\n }\n\n const found: FoundChord[] = findMatches(notes, 1, options);\n\n return found\n .filter((chord) => chord.weight)\n .sort((a, b) => b.weight - a.weight)\n .map((chord) => chord.name);\n}\n\n/* tslint:disable:no-bitwise */\nconst BITMASK = {\n // 3m 000100000000\n // 3M 000010000000\n anyThirds: 384,\n // 5P 000000010000\n perfectFifth: 16,\n // 5d 000000100000\n // 5A 000000001000\n nonPerfectFifths: 40,\n anySeventh: 3,\n};\n\nconst testChromaNumber = (bitmask: number) => (chromaNumber: number) =>\n Boolean(chromaNumber & bitmask);\nconst hasAnyThird = testChromaNumber(BITMASK.anyThirds);\nconst hasPerfectFifth = testChromaNumber(BITMASK.perfectFifth);\nconst hasAnySeventh = testChromaNumber(BITMASK.anySeventh);\nconst hasNonPerfectFifth = testChromaNumber(BITMASK.nonPerfectFifths);\n\nfunction hasAnyThirdAndPerfectFifthAndAnySeventh(chordType: ChordType) {\n const chromaNumber = parseInt(chordType.chroma, 2);\n return (\n hasAnyThird(chromaNumber) &&\n hasPerfectFifth(chromaNumber) &&\n hasAnySeventh(chromaNumber)\n );\n}\n\nfunction withPerfectFifth(chroma: string): string {\n const chromaNumber = parseInt(chroma, 2);\n return hasNonPerfectFifth(chromaNumber)\n ? chroma\n : (chromaNumber | 16).toString(2);\n}\n\n/* tslint:enable:no-bitwise */\n\ntype FindMatchesOptions = {\n assumePerfectFifth: boolean;\n};\nfunction findMatches(\n notes: string[],\n weight: number,\n options: Partial,\n): FoundChord[] {\n const tonic = notes[0];\n const tonicChroma = note(tonic).chroma;\n const noteName = namedSet(notes);\n // we need to test all chromas to get the correct baseNote\n const allModes = modes(notes, false);\n\n const found: FoundChord[] = [];\n allModes.forEach((mode, index) => {\n const modeWithPerfectFifth =\n options.assumePerfectFifth && withPerfectFifth(mode);\n // some chords could have the same chroma but different interval spelling\n const chordTypes = all().filter((chordType) => {\n if (\n options.assumePerfectFifth &&\n hasAnyThirdAndPerfectFifthAndAnySeventh(chordType)\n ) {\n return chordType.chroma === modeWithPerfectFifth;\n }\n return chordType.chroma === mode;\n });\n\n chordTypes.forEach((chordType) => {\n const chordName = chordType.aliases[0];\n const baseNote = noteName(index);\n const isInversion = index !== tonicChroma;\n if (isInversion) {\n found.push({\n weight: 0.5 * weight,\n name: `${baseNote}${chordName}/${tonic}`,\n });\n } else {\n found.push({ weight: 1 * weight, name: `${baseNote}${chordName}` });\n }\n });\n });\n\n return found;\n}\n\n/** @deprecated */\nexport default { detect };\n", "import { IntervalCoordinates, NoteCoordinates } from \"@tonaljs/pitch\";\nimport { distance as dist } from \"@tonaljs/pitch-distance\";\nimport {\n IntervalName,\n coordToInterval,\n interval as props,\n} from \"@tonaljs/pitch-interval\";\n\n/**\n * Get the natural list of names\n */\nexport function names(): IntervalName[] {\n return \"1P 2M 3M 4P 5P 6m 7m\".split(\" \");\n}\n\n/**\n * Get properties of an interval\n *\n * @function\n * @example\n * Interval.get('P4') // => {\"alt\": 0, \"dir\": 1, \"name\": \"4P\", \"num\": 4, \"oct\": 0, \"q\": \"P\", \"semitones\": 5, \"simple\": 4, \"step\": 3, \"type\": \"perfectable\"}\n */\nexport const get = props;\n\n/**\n * Get name of an interval\n *\n * @function\n * @example\n * Interval.name('4P') // => \"4P\"\n * Interval.name('P4') // => \"4P\"\n * Interval.name('C4') // => \"\"\n */\nexport const name = (name: string) => props(name).name;\n\n/**\n * Get semitones of an interval\n * @function\n * @example\n * Interval.semitones('P4') // => 5\n */\nexport const semitones = (name: string) => props(name).semitones;\n\n/**\n * Get quality of an interval\n * @function\n * @example\n * Interval.quality('P4') // => \"P\"\n */\nexport const quality = (name: string) => props(name).q;\n\n/**\n * Get number of an interval\n * @function\n * @example\n * Interval.num('P4') // => 4\n */\nexport const num = (name: string) => props(name).num;\n\n/**\n * Get the simplified version of an interval.\n *\n * @function\n * @param {string} interval - the interval to simplify\n * @return {string} the simplified interval\n *\n * @example\n * Interval.simplify(\"9M\") // => \"2M\"\n * Interval.simplify(\"2M\") // => \"2M\"\n * Interval.simplify(\"-2M\") // => \"7m\"\n * [\"8P\", \"9M\", \"10M\", \"11P\", \"12P\", \"13M\", \"14M\", \"15P\"].map(Interval.simplify)\n * // => [ \"8P\", \"2M\", \"3M\", \"4P\", \"5P\", \"6M\", \"7M\", \"8P\" ]\n */\nexport function simplify(name: IntervalName): IntervalName {\n const i = props(name);\n return i.empty ? \"\" : i.simple + i.q;\n}\n\n/**\n * Get the inversion (https://en.wikipedia.org/wiki/Inversion_(music)#Intervals)\n * of an interval.\n *\n * @function\n * @param {string} interval - the interval to invert in interval shorthand\n * notation or interval array notation\n * @return {string} the inverted interval\n *\n * @example\n * Interval.invert(\"3m\") // => \"6M\"\n * Interval.invert(\"2M\") // => \"7m\"\n */\nexport function invert(name: IntervalName): IntervalName {\n const i = props(name);\n if (i.empty) {\n return \"\";\n }\n const step = (7 - i.step) % 7;\n const alt = i.type === \"perfectable\" ? -i.alt : -(i.alt + 1);\n return props({ step, alt, oct: i.oct, dir: i.dir }).name;\n}\n\n// interval numbers\nconst IN = [1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7];\n// interval qualities\nconst IQ = \"P m M m M P d P m M m M\".split(\" \");\n\n/**\n * Get interval name from semitones number. Since there are several interval\n * names for the same number, the name it's arbitrary, but deterministic.\n *\n * @param {Integer} num - the number of semitones (can be negative)\n * @return {string} the interval name\n * @example\n * Interval.fromSemitones(7) // => \"5P\"\n * Interval.fromSemitones(-7) // => \"-5P\"\n */\nexport function fromSemitones(semitones: number): IntervalName {\n const d = semitones < 0 ? -1 : 1;\n const n = Math.abs(semitones);\n const c = n % 12;\n const o = Math.floor(n / 12);\n return d * (IN[c] + 7 * o) + IQ[c];\n}\n\n/**\n * Find interval between two notes\n *\n * @example\n * Interval.distance(\"C4\", \"G4\"); // => \"5P\"\n */\nexport const distance = dist;\n\n/**\n * Adds two intervals\n *\n * @function\n * @param {string} interval1\n * @param {string} interval2\n * @return {string} the added interval name\n * @example\n * Interval.add(\"3m\", \"5P\") // => \"7m\"\n */\nexport const add = combinator((a, b) => [a[0] + b[0], a[1] + b[1]]);\n\n/**\n * Returns a function that adds an interval\n *\n * @function\n * @example\n * ['1P', '2M', '3M'].map(Interval.addTo('5P')) // => [\"5P\", \"6M\", \"7M\"]\n */\nexport const addTo = (interval: string) => (other: string) =>\n add(interval, other);\n\n/**\n * Subtracts two intervals\n *\n * @function\n * @param {string} minuendInterval\n * @param {string} subtrahendInterval\n * @return {string} the subtracted interval name\n * @example\n * Interval.subtract('5P', '3M') // => '3m'\n * Interval.subtract('3M', '5P') // => '-3m'\n */\nexport const subtract = combinator((a, b) => [a[0] - b[0], a[1] - b[1]]);\n\nexport function transposeFifths(\n interval: IntervalName,\n fifths: number,\n): IntervalName {\n const ivl = get(interval);\n if (ivl.empty) return \"\";\n\n const [nFifths, nOcts, dir] = ivl.coord;\n return coordToInterval([nFifths + fifths, nOcts, dir]).name;\n}\n\n/** @deprecated */\nexport default {\n names,\n get,\n name,\n num,\n semitones,\n quality,\n fromSemitones,\n distance,\n invert,\n simplify,\n add,\n addTo,\n subtract,\n transposeFifths,\n};\n\n//// PRIVATE ////\n\ntype Operation = (\n a: IntervalCoordinates,\n b: IntervalCoordinates,\n) => NoteCoordinates;\n\nfunction combinator(fn: Operation) {\n return (a: IntervalName, b: IntervalName): IntervalName | undefined => {\n const coordA = props(a).coord;\n const coordB = props(b).coord;\n if (coordA && coordB) {\n const coord = fn(coordA, coordB);\n return coordToInterval(coord).name;\n }\n };\n}\n", "import {\n EmptyPcset,\n get as pcset,\n Pcset,\n PcsetChroma,\n PcsetNum,\n} from \"@tonaljs/pcset\";\nimport data from \"./data\";\n\n/**\n * Properties for a scale in the scale dictionary. It's a pitch class set\n * properties with the following additional information:\n * - name: the scale name\n * - aliases: alternative list of names\n * - intervals: an array of interval names\n */\nexport interface ScaleType extends Pcset {\n readonly name: string;\n readonly aliases: string[];\n}\n\nexport const NoScaleType: ScaleType = {\n ...EmptyPcset,\n intervals: [],\n aliases: [],\n};\n\ntype ScaleTypeName = string | PcsetChroma | PcsetNum;\n\nlet dictionary: ScaleType[] = [];\nlet index: Record = {};\n\nexport function names() {\n return dictionary.map((scale) => scale.name);\n}\n\n/**\n * Given a scale name or chroma, return the scale properties\n *\n * @param {string} type - scale name or pitch class set chroma\n * @example\n * import { get } from 'tonaljs/scale-type'\n * get('major') // => { name: 'major', ... }\n */\nexport function get(type: ScaleTypeName): ScaleType {\n return index[type] || NoScaleType;\n}\n\n/**\n * @deprecated\n * @use ScaleType.get\n */\nexport const scaleType = get;\n\n/**\n * Return a list of all scale types\n */\nexport function all() {\n return dictionary.slice();\n}\n\n/**\n * @deprecated\n * @use ScaleType.all\n */\nexport const entries = all;\n\n/**\n * Keys used to reference scale types\n */\nexport function keys() {\n return Object.keys(index);\n}\n\n/**\n * Clear the dictionary\n */\nexport function removeAll() {\n dictionary = [];\n index = {};\n}\n\n/**\n * Add a scale into dictionary\n * @param intervals\n * @param name\n * @param aliases\n */\nexport function add(\n intervals: string[],\n name: string,\n aliases: string[] = [],\n): ScaleType {\n const scale = { ...pcset(intervals), name, intervals, aliases };\n dictionary.push(scale);\n index[scale.name] = scale;\n index[scale.setNum] = scale;\n index[scale.chroma] = scale;\n scale.aliases.forEach((alias) => addAlias(scale, alias));\n return scale;\n}\n\nexport function addAlias(scale: ScaleType, alias: string) {\n index[alias] = scale;\n}\n\ndata.forEach(([ivls, name, ...aliases]: string[]) =>\n add(ivls.split(\" \"), name, aliases),\n);\n\n/** @deprecated */\nexport default {\n names,\n get,\n all,\n add,\n removeAll,\n keys,\n\n // deprecated\n entries,\n scaleType,\n};\n", "// SCALES\n// Format: [\"intervals\", \"name\", \"alias1\", \"alias2\", ...]\nconst SCALES: string[][] = [\n // Basic scales\n [\"1P 2M 3M 5P 6M\", \"major pentatonic\", \"pentatonic\"],\n [\"1P 2M 3M 4P 5P 6M 7M\", \"major\", \"ionian\"],\n [\"1P 2M 3m 4P 5P 6m 7m\", \"minor\", \"aeolian\"],\n\n // Jazz common scales\n [\"1P 2M 3m 3M 5P 6M\", \"major blues\"],\n [\"1P 3m 4P 5d 5P 7m\", \"minor blues\", \"blues\"],\n [\"1P 2M 3m 4P 5P 6M 7M\", \"melodic minor\"],\n [\"1P 2M 3m 4P 5P 6m 7M\", \"harmonic minor\"],\n [\"1P 2M 3M 4P 5P 6M 7m 7M\", \"bebop\"],\n [\"1P 2M 3m 4P 5d 6m 6M 7M\", \"diminished\", \"whole-half diminished\"],\n\n // Modes\n [\"1P 2M 3m 4P 5P 6M 7m\", \"dorian\"],\n [\"1P 2M 3M 4A 5P 6M 7M\", \"lydian\"],\n [\"1P 2M 3M 4P 5P 6M 7m\", \"mixolydian\", \"dominant\"],\n [\"1P 2m 3m 4P 5P 6m 7m\", \"phrygian\"],\n [\"1P 2m 3m 4P 5d 6m 7m\", \"locrian\"],\n\n // 5-note scales\n [\"1P 3M 4P 5P 7M\", \"ionian pentatonic\"],\n [\"1P 3M 4P 5P 7m\", \"mixolydian pentatonic\", \"indian\"],\n [\"1P 2M 4P 5P 6M\", \"ritusen\"],\n [\"1P 2M 4P 5P 7m\", \"egyptian\"],\n [\"1P 3M 4P 5d 7m\", \"neopolitan major pentatonic\"],\n [\"1P 3m 4P 5P 6m\", \"vietnamese 1\"],\n [\"1P 2m 3m 5P 6m\", \"pelog\"],\n [\"1P 2m 4P 5P 6m\", \"kumoijoshi\"],\n [\"1P 2M 3m 5P 6m\", \"hirajoshi\"],\n [\"1P 2m 4P 5d 7m\", \"iwato\"],\n [\"1P 2m 4P 5P 7m\", \"in-sen\"],\n [\"1P 3M 4A 5P 7M\", \"lydian pentatonic\", \"chinese\"],\n [\"1P 3m 4P 6m 7m\", \"malkos raga\"],\n [\"1P 3m 4P 5d 7m\", \"locrian pentatonic\", \"minor seven flat five pentatonic\"],\n [\"1P 3m 4P 5P 7m\", \"minor pentatonic\", \"vietnamese 2\"],\n [\"1P 3m 4P 5P 6M\", \"minor six pentatonic\"],\n [\"1P 2M 3m 5P 6M\", \"flat three pentatonic\", \"kumoi\"],\n [\"1P 2M 3M 5P 6m\", \"flat six pentatonic\"],\n [\"1P 2m 3M 5P 6M\", \"scriabin\"],\n [\"1P 3M 5d 6m 7m\", \"whole tone pentatonic\"],\n [\"1P 3M 4A 5A 7M\", \"lydian #5P pentatonic\"],\n [\"1P 3M 4A 5P 7m\", \"lydian dominant pentatonic\"],\n [\"1P 3m 4P 5P 7M\", \"minor #7M pentatonic\"],\n [\"1P 3m 4d 5d 7m\", \"super locrian pentatonic\"],\n\n // 6-note scales\n [\"1P 2M 3m 4P 5P 7M\", \"minor hexatonic\"],\n [\"1P 2A 3M 5P 5A 7M\", \"augmented\"],\n [\"1P 2M 4P 5P 6M 7m\", \"piongio\"],\n [\"1P 2m 3M 4A 6M 7m\", \"prometheus neopolitan\"],\n [\"1P 2M 3M 4A 6M 7m\", \"prometheus\"],\n [\"1P 2m 3M 5d 6m 7m\", \"mystery #1\"],\n [\"1P 2m 3M 4P 5A 6M\", \"six tone symmetric\"],\n [\"1P 2M 3M 4A 5A 6A\", \"whole tone\", \"messiaen's mode #1\"],\n [\"1P 2m 4P 4A 5P 7M\", \"messiaen's mode #5\"],\n\n // 7-note scales\n [\"1P 2M 3M 4P 5d 6m 7m\", \"locrian major\", \"arabian\"],\n [\"1P 2m 3M 4A 5P 6m 7M\", \"double harmonic lydian\"],\n [\n \"1P 2m 2A 3M 4A 6m 7m\",\n \"altered\",\n \"super locrian\",\n \"diminished whole tone\",\n \"pomeroy\",\n ],\n [\"1P 2M 3m 4P 5d 6m 7m\", \"locrian #2\", \"half-diminished\", \"aeolian b5\"],\n [\n \"1P 2M 3M 4P 5P 6m 7m\",\n \"mixolydian b6\",\n \"melodic minor fifth mode\",\n \"hindu\",\n ],\n [\"1P 2M 3M 4A 5P 6M 7m\", \"lydian dominant\", \"lydian b7\", \"overtone\"],\n [\"1P 2M 3M 4A 5A 6M 7M\", \"lydian augmented\"],\n [\n \"1P 2m 3m 4P 5P 6M 7m\",\n \"dorian b2\",\n \"phrygian #6\",\n \"melodic minor second mode\",\n ],\n [\n \"1P 2m 3m 4d 5d 6m 7d\",\n \"ultralocrian\",\n \"superlocrian bb7\",\n \"superlocrian diminished\",\n ],\n [\"1P 2m 3m 4P 5d 6M 7m\", \"locrian 6\", \"locrian natural 6\", \"locrian sharp 6\"],\n [\"1P 2A 3M 4P 5P 5A 7M\", \"augmented heptatonic\"],\n // Source https://en.wikipedia.org/wiki/Ukrainian_Dorian_scale\n [\n \"1P 2M 3m 4A 5P 6M 7m\",\n \"dorian #4\",\n \"ukrainian dorian\",\n \"romanian minor\",\n \"altered dorian\",\n ],\n [\"1P 2M 3m 4A 5P 6M 7M\", \"lydian diminished\"],\n [\"1P 2M 3M 4A 5A 7m 7M\", \"leading whole tone\"],\n [\"1P 2M 3M 4A 5P 6m 7m\", \"lydian minor\"],\n [\"1P 2m 3M 4P 5P 6m 7m\", \"phrygian dominant\", \"spanish\", \"phrygian major\"],\n [\"1P 2m 3m 4P 5P 6m 7M\", \"balinese\"],\n [\"1P 2m 3m 4P 5P 6M 7M\", \"neopolitan major\"],\n [\"1P 2M 3M 4P 5P 6m 7M\", \"harmonic major\"],\n [\"1P 2m 3M 4P 5P 6m 7M\", \"double harmonic major\", \"gypsy\"],\n [\"1P 2M 3m 4A 5P 6m 7M\", \"hungarian minor\"],\n [\"1P 2A 3M 4A 5P 6M 7m\", \"hungarian major\"],\n [\"1P 2m 3M 4P 5d 6M 7m\", \"oriental\"],\n [\"1P 2m 3m 3M 4A 5P 7m\", \"flamenco\"],\n [\"1P 2m 3m 4A 5P 6m 7M\", \"todi raga\"],\n [\"1P 2m 3M 4P 5d 6m 7M\", \"persian\"],\n [\"1P 2m 3M 5d 6m 7m 7M\", \"enigmatic\"],\n [\n \"1P 2M 3M 4P 5A 6M 7M\",\n \"major augmented\",\n \"major #5\",\n \"ionian augmented\",\n \"ionian #5\",\n ],\n [\"1P 2A 3M 4A 5P 6M 7M\", \"lydian #9\"],\n\n // 8-note scales\n [\"1P 2m 2M 4P 4A 5P 6m 7M\", \"messiaen's mode #4\"],\n [\"1P 2m 3M 4P 4A 5P 6m 7M\", \"purvi raga\"],\n [\"1P 2m 3m 3M 4P 5P 6m 7m\", \"spanish heptatonic\"],\n [\"1P 2M 3m 3M 4P 5P 6M 7m\", \"bebop minor\"],\n [\"1P 2M 3M 4P 5P 5A 6M 7M\", \"bebop major\"],\n [\"1P 2m 3m 4P 5d 5P 6m 7m\", \"bebop locrian\"],\n [\"1P 2M 3m 4P 5P 6m 7m 7M\", \"minor bebop\"],\n [\"1P 2M 3M 4P 5d 5P 6M 7M\", \"ichikosucho\"],\n [\"1P 2M 3m 4P 5P 6m 6M 7M\", \"minor six diminished\"],\n [\n \"1P 2m 3m 3M 4A 5P 6M 7m\",\n \"half-whole diminished\",\n \"dominant diminished\",\n \"messiaen's mode #2\",\n ],\n [\"1P 3m 3M 4P 5P 6M 7m 7M\", \"kafi raga\"],\n [\"1P 2M 3M 4P 4A 5A 6A 7M\", \"messiaen's mode #6\"],\n\n // 9-note scales\n [\"1P 2M 3m 3M 4P 5d 5P 6M 7m\", \"composite blues\"],\n [\"1P 2M 3m 3M 4A 5P 6m 7m 7M\", \"messiaen's mode #3\"],\n\n // 10-note scales\n [\"1P 2m 2M 3m 4P 4A 5P 6m 6M 7M\", \"messiaen's mode #7\"],\n\n // 12-note scales\n [\"1P 2m 2M 3m 3M 4P 5d 5P 6m 6M 7m 7M\", \"chromatic\"],\n];\n\nexport default SCALES;\n", "import { detect } from \"@tonaljs/chord-detect\";\nimport {\n ChordType,\n all as chordTypes,\n get as getChordType,\n} from \"@tonaljs/chord-type\";\nimport { subtract } from \"@tonaljs/interval\";\nimport { isSubsetOf, isSupersetOf } from \"@tonaljs/pcset\";\nimport {\n distance,\n tonicIntervalsTransposer,\n transpose as transposeNote,\n} from \"@tonaljs/pitch-distance\";\nimport { NoteName, note, tokenizeNote } from \"@tonaljs/pitch-note\";\nimport { all as scaleTypes } from \"@tonaljs/scale-type\";\n\nexport { detect } from \"@tonaljs/chord-detect\";\n\ntype ChordNameOrTokens =\n | string // full name to be parsed\n | [string] // only the name\n | [string, string] // tonic, name\n | [string, string, string]; // tonic, name, bass\ntype ChordNameTokens = [string, string, string]; // [TONIC, SCALE TYPE, BASS]\n\nexport interface Chord extends ChordType {\n tonic: string | null;\n type: string;\n root: string;\n bass: string;\n rootDegree: number;\n symbol: string;\n notes: NoteName[];\n}\n\nconst NoChord: Chord = {\n empty: true,\n name: \"\",\n symbol: \"\",\n root: \"\",\n bass: \"\",\n rootDegree: 0,\n type: \"\",\n tonic: null,\n setNum: NaN,\n quality: \"Unknown\",\n chroma: \"\",\n normalized: \"\",\n aliases: [],\n notes: [],\n intervals: [],\n};\n\n// 6, 64, 7, 9, 11 and 13 are consider part of the chord\n// (see https://github.com/danigb/tonal/issues/55)\n//const NUM_TYPES = /^(6|64|7|9|11|13)$/;\n/**\n * Tokenize a chord name. It returns an array with the tonic, chord type and bass\n * If not tonic is found, all the name is considered the chord name.\n *\n * This function does NOT check if the chord type exists or not. It only tries\n * to split the tonic and chord type.\n *\n * This function does NOT check if the bass is part of the chord or not but it\n * only accepts a pitch class as bass\n *\n * @function\n * @param {string} name - the chord name\n * @return {Array} an array with [tonic, type, bass]\n * @example\n * tokenize(\"Cmaj7\") // => [ \"C\", \"maj7\" ]\n * tokenize(\"C7\") // => [ \"C\", \"7\" ]\n * tokenize(\"mMaj7\") // => [ null, \"mMaj7\" ]\n * tokenize(\"Cnonsense\") // => [ null, \"nonsense\" ]\n */\nexport function tokenize(name: string): ChordNameTokens {\n const [letter, acc, oct, type] = tokenizeNote(name);\n if (letter === \"\") {\n return tokenizeBass(\"\", name);\n } else if (letter === \"A\" && type === \"ug\") {\n return tokenizeBass(\"\", \"aug\");\n } else {\n return tokenizeBass(letter + acc, oct + type);\n }\n}\n\nfunction tokenizeBass(note: string, chord: string): ChordNameTokens {\n const split = chord.split(\"/\");\n if (split.length === 1) {\n return [note, split[0], \"\"];\n }\n const [letter, acc, oct, type] = tokenizeNote(split[1]);\n // Only a pitch class is accepted as bass note\n if (letter !== \"\" && oct === \"\" && type === \"\") {\n return [note, split[0], letter + acc];\n } else {\n return [note, chord, \"\"];\n }\n}\n\n/**\n * Get a Chord from a chord name.\n */\nexport function get(src: ChordNameOrTokens): Chord {\n if (Array.isArray(src)) {\n return getChord(src[1] || \"\", src[0], src[2]);\n } else if (src === \"\") {\n return NoChord;\n } else {\n const [tonic, type, bass] = tokenize(src);\n const chord = getChord(type, tonic, bass);\n return chord.empty ? getChord(src) : chord;\n }\n}\n\n/**\n * Get chord properties\n *\n * @param typeName - the chord type name\n * @param [tonic] - Optional tonic\n * @param [root] - Optional root (requires a tonic)\n */\nexport function getChord(\n typeName: string,\n optionalTonic?: string,\n optionalBass?: string,\n): Chord {\n const type = getChordType(typeName);\n const tonic = note(optionalTonic || \"\");\n const bass = note(optionalBass || \"\");\n\n if (\n type.empty ||\n (optionalTonic && tonic.empty) ||\n (optionalBass && bass.empty)\n ) {\n return NoChord;\n }\n\n const bassInterval = distance(tonic.pc, bass.pc);\n const bassIndex = type.intervals.indexOf(bassInterval);\n const hasRoot = bassIndex >= 0;\n const root = hasRoot ? bass : note(\"\");\n const rootDegree = bassIndex === -1 ? NaN : bassIndex + 1;\n const hasBass = bass.pc && bass.pc !== tonic.pc;\n\n const intervals = Array.from(type.intervals);\n\n if (hasRoot) {\n for (let i = 1; i < rootDegree; i++) {\n const num = intervals[0][0];\n const quality = intervals[0][1];\n const newNum = parseInt(num, 10) + 7;\n intervals.push(`${newNum}${quality}`);\n intervals.shift();\n }\n } else if (hasBass) {\n const ivl = subtract(distance(tonic.pc, bass.pc), \"8P\");\n if (ivl) intervals.unshift(ivl);\n }\n\n const notes = tonic.empty\n ? []\n : intervals.map((i) => transposeNote(tonic.pc, i));\n\n typeName = type.aliases.indexOf(typeName) !== -1 ? typeName : type.aliases[0];\n const symbol = `${tonic.empty ? \"\" : tonic.pc}${typeName}${\n hasRoot && rootDegree > 1 ? \"/\" + root.pc : hasBass ? \"/\" + bass.pc : \"\"\n }`;\n const name = `${optionalTonic ? tonic.pc + \" \" : \"\"}${type.name}${\n hasRoot && rootDegree > 1\n ? \" over \" + root.pc\n : hasBass\n ? \" over \" + bass.pc\n : \"\"\n }`;\n return {\n ...type,\n name,\n symbol,\n tonic: tonic.pc,\n type: type.name,\n root: root.pc,\n bass: hasBass ? bass.pc : \"\",\n intervals,\n rootDegree,\n notes,\n };\n}\n\nexport const chord = get;\n\n/**\n * Transpose a chord name\n *\n * @param {string} chordName - the chord name\n * @return {string} the transposed chord\n *\n * @example\n * transpose('Dm7', 'P4') // => 'Gm7\n */\nexport function transpose(chordName: string, interval: string): string {\n const [tonic, type, bass] = tokenize(chordName);\n if (!tonic) {\n return chordName;\n }\n const tr = transposeNote(bass, interval);\n const slash = tr ? \"/\" + tr : \"\";\n return transposeNote(tonic, interval) + type + slash;\n}\n\n/**\n * Get all scales where the given chord fits\n *\n * @example\n * chordScales('C7b9')\n * // => [\"phrygian dominant\", \"flamenco\", \"spanish heptatonic\", \"half-whole diminished\", \"chromatic\"]\n */\nexport function chordScales(name: string): string[] {\n const s = get(name);\n const isChordIncluded = isSupersetOf(s.chroma);\n return scaleTypes()\n .filter((scale) => isChordIncluded(scale.chroma))\n .map((scale) => scale.name);\n}\n/**\n * Get all chords names that are a superset of the given one\n * (has the same notes and at least one more)\n *\n * @function\n * @example\n * extended(\"CMaj7\")\n * // => [ 'Cmaj#4', 'Cmaj7#9#11', 'Cmaj9', 'CM7add13', 'Cmaj13', 'Cmaj9#11', 'CM13#11', 'CM7b9' ]\n */\nexport function extended(chordName: string): string[] {\n const s = get(chordName);\n const isSuperset = isSupersetOf(s.chroma);\n return chordTypes()\n .filter((chord) => isSuperset(chord.chroma))\n .map((chord) => s.tonic + chord.aliases[0]);\n}\n\n/**\n * Find all chords names that are a subset of the given one\n * (has less notes but all from the given chord)\n *\n * @example\n */\nexport function reduced(chordName: string): string[] {\n const s = get(chordName);\n const isSubset = isSubsetOf(s.chroma);\n return chordTypes()\n .filter((chord) => isSubset(chord.chroma))\n .map((chord) => s.tonic + chord.aliases[0]);\n}\n\n/**\n * Return the chord notes\n */\nexport function notes(chordName: ChordNameOrTokens, tonic?: string): string[] {\n const chord = get(chordName);\n const note = tonic || chord.tonic;\n if (!note || chord.empty) return [];\n return chord.intervals.map((ivl) => transposeNote(note, ivl));\n}\n\n/**\n * Returns a function to get a note name from the scale degree.\n *\n * @example\n * [1, 2, 3, 4].map(Chord.degrees(\"C\")) => [\"C\", \"E\", \"G\", \"C\"]\n * [1, 2, 3, 4].map(Chord.degrees(\"C4\")) => [\"C4\", \"E4\", \"G4\", \"C5\"]\n */\nexport function degrees(chordName: ChordNameOrTokens, tonic?: string) {\n const chord = get(chordName);\n const note = tonic || chord.tonic;\n const transpose = tonicIntervalsTransposer(chord.intervals, note);\n return (degree: number) =>\n degree ? transpose(degree > 0 ? degree - 1 : degree) : \"\";\n}\n\n/**\n * Sames as `degree` but with 0-based index\n */\nexport function steps(chordName: ChordNameOrTokens, tonic?: string) {\n const chord = get(chordName);\n const note = tonic || chord.tonic;\n return tonicIntervalsTransposer(chord.intervals, note);\n}\n\n/** @deprecated */\nexport default {\n getChord,\n get,\n detect,\n chordScales,\n extended,\n reduced,\n tokenize,\n transpose,\n degrees,\n steps,\n notes,\n chord,\n};\n", "// source: https://en.wikipedia.org/wiki/Note_value\nconst DATA: [number, string, string[]][] = [\n [\n 0.125,\n \"dl\",\n [\"large\", \"duplex longa\", \"maxima\", \"octuple\", \"octuple whole\"],\n ],\n [0.25, \"l\", [\"long\", \"longa\"]],\n [0.5, \"d\", [\"double whole\", \"double\", \"breve\"]],\n [1, \"w\", [\"whole\", \"semibreve\"]],\n [2, \"h\", [\"half\", \"minim\"]],\n [4, \"q\", [\"quarter\", \"crotchet\"]],\n [8, \"e\", [\"eighth\", \"quaver\"]],\n [16, \"s\", [\"sixteenth\", \"semiquaver\"]],\n [32, \"t\", [\"thirty-second\", \"demisemiquaver\"]],\n [64, \"sf\", [\"sixty-fourth\", \"hemidemisemiquaver\"]],\n [128, \"h\", [\"hundred twenty-eighth\"]],\n [256, \"th\", [\"two hundred fifty-sixth\"]],\n];\n\nexport default DATA;\n", "import DATA from \"./data\";\n\ntype Fraction = [number, number];\n\nconst VALUES: DurationValue[] = [];\n\nDATA.forEach(([denominator, shorthand, names]) =>\n add(denominator, shorthand, names),\n);\n\nexport interface DurationValue {\n empty: boolean;\n value: number;\n name: string;\n fraction: Fraction;\n shorthand: string;\n dots: string;\n names: string[];\n}\n\nconst NoDuration: DurationValue = {\n empty: true,\n name: \"\",\n value: 0,\n fraction: [0, 0],\n shorthand: \"\",\n dots: \"\",\n names: [],\n};\n\nexport function names(): string[] {\n return VALUES.reduce((names, duration) => {\n duration.names.forEach((name) => names.push(name));\n return names;\n }, [] as string[]);\n}\n\nexport function shorthands(): string[] {\n return VALUES.map((dur) => dur.shorthand);\n}\n\nconst REGEX = /^([^.]+)(\\.*)$/;\n\nexport function get(name: string): DurationValue {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [_, simple, dots] = REGEX.exec(name) || [];\n const base = VALUES.find(\n (dur) => dur.shorthand === simple || dur.names.includes(simple),\n );\n if (!base) {\n return NoDuration;\n }\n\n const fraction = calcDots(base.fraction, dots.length);\n const value = fraction[0] / fraction[1];\n\n return { ...base, name, dots, value, fraction };\n}\n\nexport const value = (name: string) => get(name).value;\nexport const fraction = (name: string) => get(name).fraction;\n\n/** @deprecated */\nexport default { names, shorthands, get, value, fraction };\n\n//// PRIVATE ////\n\nfunction add(denominator: number, shorthand: string, names: string[]) {\n VALUES.push({\n empty: false,\n dots: \"\",\n name: \"\",\n value: 1 / denominator,\n fraction: denominator < 1 ? [1 / denominator, 1] : [1, denominator],\n shorthand,\n names,\n });\n}\n\nfunction calcDots(fraction: Fraction, dots: number): Fraction {\n const pow = Math.pow(2, dots);\n\n let numerator = fraction[0] * pow;\n let denominator = fraction[1] * pow;\n const base = numerator;\n\n // add fractions\n for (let i = 0; i < dots; i++) {\n numerator += base / Math.pow(2, i + 1);\n }\n\n // simplify\n while (numerator % 2 === 0 && denominator % 2 === 0) {\n numerator /= 2;\n denominator /= 2;\n }\n return [numerator, denominator];\n}\n", "import { NoteName, note as props } from \"@tonaljs/pitch-note\";\n\ntype Midi = number;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isMidi(arg: any): arg is Midi {\n return +arg >= 0 && +arg <= 127;\n}\n\n/**\n * Get the note midi number (a number between 0 and 127)\n *\n * It returns undefined if not valid note name\n *\n * @function\n * @param {string|number} note - the note name or midi number\n * @return {Integer} the midi number or undefined if not valid note\n * @example\n * import { toMidi } from '@tonaljs/midi'\n * toMidi(\"C4\") // => 60\n * toMidi(60) // => 60\n * toMidi('60') // => 60\n */\nexport function toMidi(note: NoteName | number): number | null {\n if (isMidi(note)) {\n return +note;\n }\n const n = props(note);\n return n.empty ? null : n.midi;\n}\n\n/**\n * Get the frequency in hertzs from midi number\n *\n * @param {number} midi - the note midi number\n * @param {number} [tuning = 440] - A4 tuning frequency in Hz (440 by default)\n * @return {number} the frequency or null if not valid note midi\n * @example\n * import { midiToFreq} from '@tonaljs/midi'\n * midiToFreq(69) // => 440\n */\nexport function midiToFreq(midi: number, tuning = 440): number {\n return Math.pow(2, (midi - 69) / 12) * tuning;\n}\n\nconst L2 = Math.log(2);\nconst L440 = Math.log(440);\n\n/**\n * Get the midi number from a frequency in hertz. The midi number can\n * contain decimals (with two digits precision)\n *\n * @param {number} frequency\n * @return {number}\n * @example\n * import { freqToMidi} from '@tonaljs/midi'\n * freqToMidi(220)); //=> 57\n * freqToMidi(261.62)); //=> 60\n * freqToMidi(261)); //=> 59.96\n */\nexport function freqToMidi(freq: number): number {\n const v = (12 * (Math.log(freq) - L440)) / L2 + 69;\n return Math.round(v * 100) / 100;\n}\n\nexport interface ToNoteNameOptions {\n pitchClass?: boolean;\n sharps?: boolean;\n}\n\nconst SHARPS = \"C C# D D# E F F# G G# A A# B\".split(\" \");\nconst FLATS = \"C Db D Eb E F Gb G Ab A Bb B\".split(\" \");\n/**\n * Given a midi number, returns a note name. The altered notes will have\n * flats unless explicitly set with the optional `useSharps` parameter.\n *\n * @function\n * @param {number} midi - the midi note number\n * @param {Object} options = default: `{ sharps: false, pitchClass: false }`\n * @param {boolean} useSharps - (Optional) set to true to use sharps instead of flats\n * @return {string} the note name\n * @example\n * import { midiToNoteName } from '@tonaljs/midi'\n * midiToNoteName(61) // => \"Db4\"\n * midiToNoteName(61, { pitchClass: true }) // => \"Db\"\n * midiToNoteName(61, { sharps: true }) // => \"C#4\"\n * midiToNoteName(61, { pitchClass: true, sharps: true }) // => \"C#\"\n * // it rounds to nearest note\n * midiToNoteName(61.7) // => \"D4\"\n */\nexport function midiToNoteName(midi: number, options: ToNoteNameOptions = {}) {\n if (isNaN(midi) || midi === -Infinity || midi === Infinity) return \"\";\n midi = Math.round(midi);\n const pcs = options.sharps === true ? SHARPS : FLATS;\n const pc = pcs[midi % 12];\n if (options.pitchClass) {\n return pc;\n }\n const o = Math.floor(midi / 12) - 1;\n return pc + o;\n}\n\nexport function chroma(midi: number): number {\n return midi % 12;\n}\n\nfunction pcsetFromChroma(chroma: string): number[] {\n return chroma.split(\"\").reduce((pcset, val, index) => {\n if (index < 12 && val === \"1\") pcset.push(index);\n return pcset;\n }, [] as number[]);\n}\n\nfunction pcsetFromMidi(midi: number[]): number[] {\n return midi\n .map(chroma)\n .sort((a, b) => a - b)\n .filter((n, i, a) => i === 0 || n !== a[i - 1]);\n}\n\n/**\n * Given a list of midi numbers, returns the pitch class set (unique chroma numbers)\n * @param midi\n * @example\n *\n */\nexport function pcset(notes: number[] | string): number[] {\n return Array.isArray(notes) ? pcsetFromMidi(notes) : pcsetFromChroma(notes);\n}\n\nexport function pcsetNearest(notes: number[] | string) {\n const set = pcset(notes);\n return (midi: number): number | undefined => {\n const ch = chroma(midi);\n for (let i = 0; i < 12; i++) {\n if (set.includes(ch + i)) return midi + i;\n if (set.includes(ch - i)) return midi - i;\n }\n return undefined;\n };\n}\n\nexport function pcsetSteps(notes: number[] | string, tonic: number) {\n const set = pcset(notes);\n const len = set.length;\n return (step: number): number => {\n const index = step < 0 ? (len - (-step % len)) % len : step % len;\n const octaves = Math.floor(step / len);\n return set[index] + octaves * 12 + tonic;\n };\n}\n\nexport function pcsetDegrees(notes: number[] | string, tonic: number) {\n const steps = pcsetSteps(notes, tonic);\n return (degree: number): number | undefined => {\n if (degree === 0) return undefined;\n return steps(degree > 0 ? degree - 1 : degree);\n };\n}\n\n/** @deprecated */\nexport default {\n chroma,\n freqToMidi,\n isMidi,\n midiToFreq,\n midiToNoteName,\n pcsetNearest,\n pcset,\n pcsetDegrees,\n pcsetSteps,\n toMidi,\n};\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { freqToMidi, midiToNoteName } from \"@tonaljs/midi\";\nimport { Pitch } from \"@tonaljs/pitch\";\nimport { distance as _dist, transpose as _tr } from \"@tonaljs/pitch-distance\";\nimport { IntervalName } from \"@tonaljs/pitch-interval\";\nimport {\n Note,\n NoteLiteral,\n NoteName,\n note as props,\n} from \"@tonaljs/pitch-note\";\n\nconst NAMES = [\"C\", \"D\", \"E\", \"F\", \"G\", \"A\", \"B\"];\n\nconst toName = (n: Note) => n.name;\nconst onlyNotes = (array: any[]) =>\n array.map(props).filter((n) => !n.empty) as Note[];\n\n/**\n * Return the natural note names without octave\n * @function\n * @example\n * Note.names(); // => [\"C\", \"D\", \"E\", \"F\", \"G\", \"A\", \"B\"]\n */\nexport function names(array?: any[]): string[] {\n if (array === undefined) {\n return NAMES.slice();\n } else if (!Array.isArray(array)) {\n return [];\n } else {\n return onlyNotes(array).map(toName);\n }\n}\n\n/**\n * Get a note from a note name\n *\n * @function\n * @example\n * Note.get('Bb4') // => { name: \"Bb4\", midi: 70, chroma: 10, ... }\n */\nexport const get = props;\n\n/**\n * Get the note name\n * @function\n */\nexport const name = (note: NoteLiteral) => get(note).name;\n\n/**\n * Get the note pitch class name\n * @function\n */\nexport const pitchClass = (note: NoteLiteral) => get(note).pc;\n\n/**\n * Get the note accidentals\n * @function\n */\nexport const accidentals = (note: NoteLiteral) => get(note).acc;\n\n/**\n * Get the note octave\n * @function\n */\nexport const octave = (note: NoteLiteral) => get(note).oct;\n\n/**\n * Get the note midi\n * @function\n */\nexport const midi = (note: NoteLiteral) => get(note).midi;\n\n/**\n * Get the note midi\n * @function\n */\nexport const freq = (note: NoteLiteral) => get(note).freq;\n\n/**\n * Get the note chroma\n * @function\n */\nexport const chroma = (note: NoteLiteral) => get(note).chroma;\n\n/**\n * Given a midi number, returns a note name. Uses flats for altered notes.\n *\n * @function\n * @param {number} midi - the midi note number\n * @return {string} the note name\n * @example\n * Note.fromMidi(61) // => \"Db4\"\n * Note.fromMidi(61.7) // => \"D4\"\n */\nexport function fromMidi(midi: number) {\n return midiToNoteName(midi);\n}\n\n/**\n * Given a midi number, returns a note name. Uses flats for altered notes.\n */\nexport function fromFreq(freq: number) {\n return midiToNoteName(freqToMidi(freq));\n}\n/**\n * Given a midi number, returns a note name. Uses flats for altered notes.\n */\nexport function fromFreqSharps(freq: number) {\n return midiToNoteName(freqToMidi(freq), { sharps: true });\n}\n\n/**\n * Given a midi number, returns a note name. Uses flats for altered notes.\n *\n * @function\n * @param {number} midi - the midi note number\n * @return {string} the note name\n * @example\n * Note.fromMidiSharps(61) // => \"C#4\"\n */\n\nexport function fromMidiSharps(midi: number) {\n return midiToNoteName(midi, { sharps: true });\n}\n\nexport const distance = _dist;\n\n/**\n * Transpose a note by an interval\n */\nexport const transpose = _tr;\nexport const tr = _tr;\n\n/**\n * Transpose by an interval.\n * @function\n * @param {string} interval\n * @return {function} a function that transposes by the given interval\n * @example\n * [\"C\", \"D\", \"E\"].map(Note.transposeBy(\"5P\"));\n * // => [\"G\", \"A\", \"B\"]\n */\nexport const transposeBy = (interval: IntervalName) => (note: NoteName) =>\n transpose(note, interval);\nexport const trBy = transposeBy;\n\n/**\n * Transpose from a note\n * @function\n * @param {string} note\n * @return {function} a function that transposes the the note by an interval\n * [\"1P\", \"3M\", \"5P\"].map(Note.transposeFrom(\"C\"));\n * // => [\"C\", \"E\", \"G\"]\n */\nexport const transposeFrom = (note: NoteName) => (interval: IntervalName) =>\n transpose(note, interval);\nexport const trFrom = transposeFrom;\n\n/**\n * Transpose a note by a number of perfect fifths.\n *\n * @function\n * @param {string} note - the note name\n * @param {number} fifhts - the number of fifths\n * @return {string} the transposed note name\n *\n * @example\n * import { transposeFifths } from \"@tonaljs/note\"\n * transposeFifths(\"G4\", 1) // => \"D\"\n * [0, 1, 2, 3, 4].map(fifths => transposeFifths(\"C\", fifths)) // => [\"C\", \"G\", \"D\", \"A\", \"E\"]\n */\nexport function transposeFifths(noteName: NoteName, fifths: number): NoteName {\n return transpose(noteName, [fifths, 0]);\n}\nexport const trFifths = transposeFifths;\n\n// TODO: documentation\nexport function transposeOctaves(\n noteName: NoteName,\n octaves: number,\n): NoteName {\n return transpose(noteName, [0, octaves]);\n}\n\nexport type NoteComparator = (a: Note, b: Note) => number;\n\nexport const ascending: NoteComparator = (a, b) => a.height - b.height;\nexport const descending: NoteComparator = (a, b) => b.height - a.height;\n\nexport function sortedNames(\n notes: any[],\n comparator?: NoteComparator,\n): string[] {\n comparator = comparator || ascending;\n return onlyNotes(notes).sort(comparator).map(toName);\n}\n\nexport function sortedUniqNames(notes: any[]): string[] {\n return sortedNames(notes, ascending).filter(\n (n, i, a) => i === 0 || n !== a[i - 1],\n );\n}\n\n/**\n * Simplify a note\n *\n * @function\n * @param {string} note - the note to be simplified\n * - sameAccType: default true. Use same kind of accidentals that source\n * @return {string} the simplified note or '' if not valid note\n * @example\n * simplify(\"C##\") // => \"D\"\n * simplify(\"C###\") // => \"D#\"\n * simplify(\"C###\")\n * simplify(\"B#4\") // => \"C5\"\n */\nexport const simplify = (noteName: NoteName | Pitch): string => {\n const note = get(noteName);\n if (note.empty) {\n return \"\";\n }\n return midiToNoteName(note.midi || note.chroma, {\n sharps: note.alt > 0,\n pitchClass: note.midi === null,\n });\n};\n/**\n * Get enharmonic of a note\n *\n * @function\n * @param {string} note\n * @param [string] - [optional] Destination pitch class\n * @return {string} the enharmonic note name or '' if not valid note\n * @example\n * Note.enharmonic(\"Db\") // => \"C#\"\n * Note.enharmonic(\"C\") // => \"C\"\n * Note.enharmonic(\"F2\",\"E#\") // => \"E#2\"\n * Note.eharmoinic(\"C##b\"); // => \"\"\n */\nexport function enharmonic(noteName: string, destName?: string) {\n const src = get(noteName);\n if (src.empty) {\n return \"\";\n }\n\n // destination: use given or generate one\n const dest = get(\n destName ||\n midiToNoteName(src.midi || src.chroma, {\n sharps: src.alt < 0,\n pitchClass: true,\n }),\n );\n\n // ensure destination is valid\n if (dest.empty || dest.chroma !== src.chroma) {\n return \"\";\n }\n\n // if src has no octave, no need to calculate anything else\n if (src.oct === undefined) {\n return dest.pc;\n }\n\n // detect any octave overflow\n const srcChroma = src.chroma - src.alt;\n const destChroma = dest.chroma - dest.alt;\n const destOctOffset =\n srcChroma > 11 || destChroma < 0\n ? -1\n : srcChroma < 0 || destChroma > 11\n ? +1\n : 0;\n // calculate the new octave\n const destOct = src.oct + destOctOffset;\n return dest.pc + destOct;\n}\n\n/** @deprecated */\nexport default {\n names,\n get,\n name,\n pitchClass,\n accidentals,\n octave,\n midi,\n ascending,\n descending,\n distance,\n sortedNames,\n sortedUniqNames,\n fromMidi,\n fromMidiSharps,\n freq,\n fromFreq,\n fromFreqSharps,\n chroma,\n transpose,\n tr,\n transposeBy,\n trBy,\n transposeFrom,\n trFrom,\n transposeFifths,\n transposeOctaves,\n trFifths,\n simplify,\n enharmonic,\n};\n", "import { isNamedPitch, isPitch, Pitch } from \"@tonaljs/pitch\";\nimport { interval } from \"@tonaljs/pitch-interval\";\nimport { accToAlt, altToAcc } from \"@tonaljs/pitch-note\";\n\nexport interface RomanNumeral extends Pitch {\n readonly name: string;\n readonly empty: boolean;\n readonly roman: string;\n readonly interval: string;\n readonly acc: string;\n readonly chordType: string;\n readonly major: boolean;\n readonly dir: 1;\n}\n\nexport interface NoRomanNumeral extends Partial {\n readonly empty: true;\n readonly name: \"\";\n readonly chordType: \"\";\n}\nconst NoRomanNumeral: NoRomanNumeral = { empty: true, name: \"\", chordType: \"\" };\n\nconst cache: Record = {};\n\n/**\n * Get properties of a roman numeral string\n *\n * @function\n * @param {string} - the roman numeral string (can have type, like: Imaj7)\n * @return {Object} - the roman numeral properties\n * @param {string} name - the roman numeral (tonic)\n * @param {string} type - the chord type\n * @param {string} num - the number (1 = I, 2 = II...)\n * @param {boolean} major - major or not\n *\n * @example\n * romanNumeral(\"VIIb5\") // => { name: \"VII\", type: \"b5\", num: 7, major: true }\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function get(src: any): RomanNumeral | NoRomanNumeral {\n return typeof src === \"string\"\n ? cache[src] || (cache[src] = parse(src))\n : typeof src === \"number\"\n ? get(NAMES[src] || \"\")\n : isPitch(src)\n ? fromPitch(src)\n : isNamedPitch(src)\n ? get(src.name)\n : NoRomanNumeral;\n}\n\n/**\n * @deprecated\n * @use RomanNumeral.get\n */\nexport const romanNumeral = get;\n\n/**\n * Get roman numeral names\n *\n * @function\n * @param {boolean} [isMajor=true]\n * @return {Array}\n *\n * @example\n * names() // => [\"I\", \"II\", \"III\", \"IV\", \"V\", \"VI\", \"VII\"]\n */\nexport function names(major = true) {\n return (major ? NAMES : NAMES_MINOR).slice();\n}\n\nfunction fromPitch(pitch: Pitch): RomanNumeral | NoRomanNumeral {\n return get(altToAcc(pitch.alt) + NAMES[pitch.step]);\n}\n\nconst REGEX =\n /^(#{1,}|b{1,}|x{1,}|)(IV|I{1,3}|VI{0,2}|iv|i{1,3}|vi{0,2})([^IViv]*)$/;\n\n// [name, accidentals, romanNumeral, chordType]\ntype RomanNumeralTokens = [string, string, string, string];\nexport function tokenize(str: string): RomanNumeralTokens {\n return (REGEX.exec(str) || [\"\", \"\", \"\", \"\"]) as RomanNumeralTokens;\n}\n\nconst ROMANS = \"I II III IV V VI VII\";\nconst NAMES = ROMANS.split(\" \");\nconst NAMES_MINOR = ROMANS.toLowerCase().split(\" \");\n\nfunction parse(src: string): RomanNumeral | NoRomanNumeral {\n const [name, acc, roman, chordType] = tokenize(src);\n if (!roman) {\n return NoRomanNumeral;\n }\n\n const upperRoman = roman.toUpperCase();\n const step = NAMES.indexOf(upperRoman);\n const alt = accToAlt(acc);\n const dir = 1;\n return {\n empty: false,\n name,\n roman,\n interval: interval({ step, alt, dir }).name,\n acc,\n chordType,\n alt,\n step,\n major: roman === upperRoman,\n oct: 0,\n dir,\n };\n}\n\n/** @deprecated */\nexport default {\n names,\n get,\n // deprecated\n romanNumeral,\n};\n", "import { transpose, transposeFifths } from \"@tonaljs/note\";\nimport { accToAlt, altToAcc, note } from \"@tonaljs/pitch-note\";\nimport { get as roman } from \"@tonaljs/roman-numeral\";\n\nconst Empty: readonly string[] = Object.freeze([] as string[]);\n\nexport interface Key {\n readonly type: \"major\" | \"minor\";\n readonly tonic: string;\n readonly alteration: number;\n readonly keySignature: string;\n}\n\nconst NoKey: Key = {\n type: \"major\",\n tonic: \"\",\n alteration: 0,\n keySignature: \"\",\n};\n\nexport interface KeyScale {\n readonly tonic: string;\n readonly grades: readonly string[];\n readonly intervals: readonly string[];\n readonly scale: readonly string[];\n readonly triads: readonly string[];\n readonly chords: readonly string[];\n readonly chordsHarmonicFunction: readonly string[];\n readonly chordScales: readonly string[];\n}\n\nconst NoKeyScale: KeyScale = {\n tonic: \"\",\n grades: Empty,\n intervals: Empty,\n scale: Empty,\n triads: Empty,\n chords: Empty,\n chordsHarmonicFunction: Empty,\n chordScales: Empty,\n};\n\nexport interface MajorKey extends Key, KeyScale {\n readonly type: \"major\";\n readonly minorRelative: string;\n readonly scale: readonly string[];\n readonly secondaryDominants: readonly string[];\n readonly secondaryDominantsMinorRelative: readonly string[];\n readonly substituteDominants: readonly string[];\n readonly substituteDominantsMinorRelative: readonly string[];\n}\n\nconst NoMajorKey: MajorKey = {\n ...NoKey,\n ...NoKeyScale,\n type: \"major\",\n minorRelative: \"\",\n scale: Empty,\n secondaryDominants: Empty,\n secondaryDominantsMinorRelative: Empty,\n substituteDominants: Empty,\n substituteDominantsMinorRelative: Empty,\n};\n\nexport interface MinorKey extends Key {\n readonly type: \"minor\";\n readonly relativeMajor: string;\n readonly natural: KeyScale;\n readonly harmonic: KeyScale;\n readonly melodic: KeyScale;\n}\n\nconst NoMinorKey: MinorKey = {\n ...NoKey,\n type: \"minor\",\n relativeMajor: \"\",\n natural: NoKeyScale,\n harmonic: NoKeyScale,\n melodic: NoKeyScale,\n};\n\nconst mapScaleToType = (scale: string[], list: string[], sep = \"\") =>\n list.map((type, i) => `${scale[i]}${sep}${type}`);\n\nfunction keyScale(\n grades: string[],\n triads: string[],\n chords: string[],\n harmonicFunctions: string[],\n chordScales: string[],\n) {\n return (tonic: string): KeyScale => {\n const intervals = grades.map((gr) => roman(gr).interval || \"\");\n const scale = intervals.map((interval) => transpose(tonic, interval));\n\n return {\n tonic,\n grades,\n intervals,\n scale,\n triads: mapScaleToType(scale, triads),\n chords: mapScaleToType(scale, chords),\n chordsHarmonicFunction: harmonicFunctions.slice(),\n chordScales: mapScaleToType(scale, chordScales, \" \"),\n };\n };\n}\n\nconst distInFifths = (from: string, to: string) => {\n const f = note(from);\n const t = note(to);\n return f.empty || t.empty ? 0 : t.coord[0] - f.coord[0];\n};\n\nconst MajorScale = keyScale(\n \"I II III IV V VI VII\".split(\" \"),\n \" m m m dim\".split(\" \"),\n \"maj7 m7 m7 maj7 7 m7 m7b5\".split(\" \"),\n \"T SD T SD D T D\".split(\" \"),\n \"major,dorian,phrygian,lydian,mixolydian,minor,locrian\".split(\",\"),\n);\nconst NaturalScale = keyScale(\n \"I II bIII IV V bVI bVII\".split(\" \"),\n \"m dim m m \".split(\" \"),\n \"m7 m7b5 maj7 m7 m7 maj7 7\".split(\" \"),\n \"T SD T SD D SD SD\".split(\" \"),\n \"minor,locrian,major,dorian,phrygian,lydian,mixolydian\".split(\",\"),\n);\nconst HarmonicScale = keyScale(\n \"I II bIII IV V bVI VII\".split(\" \"),\n \"m dim aug m dim\".split(\" \"),\n \"mMaj7 m7b5 +maj7 m7 7 maj7 o7\".split(\" \"),\n \"T SD T SD D SD D\".split(\" \"),\n \"harmonic minor,locrian 6,major augmented,lydian diminished,phrygian dominant,lydian #9,ultralocrian\".split(\n \",\",\n ),\n);\nconst MelodicScale = keyScale(\n \"I II bIII IV V VI VII\".split(\" \"),\n \"m m aug dim dim\".split(\" \"),\n \"m6 m7 +maj7 7 7 m7b5 m7b5\".split(\" \"),\n \"T SD T SD D \".split(\" \"),\n \"melodic minor,dorian b2,lydian augmented,lydian dominant,mixolydian b6,locrian #2,altered\".split(\n \",\",\n ),\n);\n\n/**\n * Get a major key properties in a given tonic\n * @param tonic\n */\nexport function majorKey(tonic: string): MajorKey {\n const pc = note(tonic).pc;\n if (!pc) return NoMajorKey;\n\n const keyScale = MajorScale(pc);\n const alteration = distInFifths(\"C\", pc);\n const romanInTonic = (src: string) => {\n const r = roman(src);\n if (r.empty) return \"\";\n\n return transpose(tonic, r.interval) + r.chordType;\n };\n\n return {\n ...keyScale,\n type: \"major\",\n minorRelative: transpose(pc, \"-3m\"),\n alteration,\n keySignature: altToAcc(alteration),\n secondaryDominants: \"- VI7 VII7 I7 II7 III7 -\".split(\" \").map(romanInTonic),\n secondaryDominantsMinorRelative: \"- IIIm7b5 IV#m7 Vm7 VIm7 VIIm7b5 -\"\n .split(\" \")\n .map(romanInTonic),\n substituteDominants: \"- bIII7 IV7 bV7 bVI7 bVII7 -\"\n .split(\" \")\n .map(romanInTonic),\n substituteDominantsMinorRelative: \"- IIIm7 Im7 IIbm7 VIm7 IVm7 -\"\n .split(\" \")\n .map(romanInTonic),\n };\n}\n\n/**\n * Get minor key properties in a given tonic\n * @param tonic\n */\nexport function minorKey(tnc: string): MinorKey {\n const pc = note(tnc).pc;\n if (!pc) return NoMinorKey;\n\n const alteration = distInFifths(\"C\", pc) - 3;\n return {\n type: \"minor\",\n tonic: pc,\n relativeMajor: transpose(pc, \"3m\"),\n alteration,\n keySignature: altToAcc(alteration),\n natural: NaturalScale(pc),\n harmonic: HarmonicScale(pc),\n melodic: MelodicScale(pc),\n };\n}\n\n/**\n * Given a key signature, returns the tonic of the major key\n * @param sigature\n * @example\n * majorTonicFromKeySignature('###') // => 'A'\n */\nexport function majorTonicFromKeySignature(\n sig: string | number,\n): string | null {\n if (typeof sig === \"number\") {\n return transposeFifths(\"C\", sig);\n } else if (typeof sig === \"string\" && /^b+|#+$/.test(sig)) {\n return transposeFifths(\"C\", accToAlt(sig));\n }\n return null;\n}\n\n/** @deprecated */\nexport default { majorKey, majorTonicFromKeySignature, minorKey };\n", "import { rotate } from \"@tonaljs/collection\";\nimport { simplify, transposeFifths } from \"@tonaljs/interval\";\nimport { EmptyPcset, Pcset } from \"@tonaljs/pcset\";\nimport { transpose } from \"@tonaljs/pitch-distance\";\nimport { NoteName } from \"@tonaljs/pitch-note\";\nimport { get as getType } from \"@tonaljs/scale-type\";\n\nconst MODES = [\n [0, 2773, 0, \"ionian\", \"\", \"Maj7\", \"major\"],\n [1, 2902, 2, \"dorian\", \"m\", \"m7\"],\n [2, 3418, 4, \"phrygian\", \"m\", \"m7\"],\n [3, 2741, -1, \"lydian\", \"\", \"Maj7\"],\n [4, 2774, 1, \"mixolydian\", \"\", \"7\"],\n [5, 2906, 3, \"aeolian\", \"m\", \"m7\", \"minor\"],\n [6, 3434, 5, \"locrian\", \"dim\", \"m7b5\"],\n] as const;\n\ntype ModeDatum = (typeof MODES)[number];\n\nexport interface Mode extends Pcset {\n readonly name: string;\n readonly modeNum: number;\n readonly alt: number; // number of alterations === number of fiths\n readonly triad: string;\n readonly seventh: string;\n readonly aliases: string[];\n}\n\nconst NoMode: Mode = {\n ...EmptyPcset,\n name: \"\",\n alt: 0,\n modeNum: NaN,\n triad: \"\",\n seventh: \"\",\n aliases: [],\n};\n\nconst modes: Mode[] = MODES.map(toMode);\nconst index: Record = {};\nmodes.forEach((mode) => {\n index[mode.name] = mode;\n mode.aliases.forEach((alias) => {\n index[alias] = mode;\n });\n});\n\ntype ModeLiteral = string | { name: string };\n\n/**\n * Get a Mode by it's name\n *\n * @example\n * get('dorian')\n * // =>\n * // {\n * // intervals: [ '1P', '2M', '3m', '4P', '5P', '6M', '7m' ],\n * // modeNum: 1,\n * // chroma: '101101010110',\n * // normalized: '101101010110',\n * // name: 'dorian',\n * // setNum: 2902,\n * // alt: 2,\n * // triad: 'm',\n * // seventh: 'm7',\n * // aliases: []\n * // }\n */\nexport function get(name: ModeLiteral): Mode {\n return typeof name === \"string\"\n ? index[name.toLowerCase()] || NoMode\n : name && name.name\n ? get(name.name)\n : NoMode;\n}\n\n/** @deprecated */\nexport const mode = get;\n\n/**\n * Get a list of all modes\n */\nexport function all() {\n return modes.slice();\n}\n\n/** @deprecated */\nexport const entries = all;\n\n/**\n * Get a list of all mode names\n */\nexport function names() {\n return modes.map((mode) => mode.name);\n}\n\nfunction toMode(mode: ModeDatum): Mode {\n const [modeNum, setNum, alt, name, triad, seventh, alias] = mode;\n const aliases = alias ? [alias] : [];\n const chroma = Number(setNum).toString(2);\n const intervals = getType(name).intervals;\n return {\n empty: false,\n intervals,\n modeNum,\n chroma,\n normalized: chroma,\n name,\n setNum,\n alt,\n triad,\n seventh,\n aliases,\n };\n}\n\nexport function notes(modeName: ModeLiteral, tonic: NoteName) {\n return get(modeName).intervals.map((ivl) => transpose(tonic, ivl));\n}\n\nfunction chords(chords: string[]) {\n return (modeName: ModeLiteral, tonic: NoteName) => {\n const mode = get(modeName);\n if (mode.empty) return [];\n const triads = rotate(mode.modeNum, chords);\n const tonics = mode.intervals.map((i) => transpose(tonic, i));\n return triads.map((triad, i) => tonics[i] + triad);\n };\n}\n\nexport const triads = chords(MODES.map((x) => x[4]));\nexport const seventhChords = chords(MODES.map((x) => x[5]));\n\nexport function distance(destination: ModeLiteral, source: ModeLiteral) {\n const from = get(source);\n const to = get(destination);\n if (from.empty || to.empty) return \"\";\n return simplify(transposeFifths(\"1P\", to.alt - from.alt));\n}\n\nexport function relativeTonic(\n destination: ModeLiteral,\n source: ModeLiteral,\n tonic: NoteName,\n) {\n return transpose(tonic, distance(destination, source));\n}\n\n/** @deprecated */\nexport default {\n get,\n names,\n all,\n distance,\n relativeTonic,\n notes,\n triads,\n seventhChords,\n // deprecated\n entries,\n mode,\n};\n", "import { tokenize } from \"@tonaljs/chord\";\nimport { distance, transpose } from \"@tonaljs/pitch-distance\";\nimport { interval } from \"@tonaljs/pitch-interval\";\nimport { NoteLiteral } from \"@tonaljs/pitch-note\";\nimport { get as romanNumeral } from \"@tonaljs/roman-numeral\";\n\n/**\n * Given a tonic and a chord list expressed with roman numeral notation\n * returns the progression expressed with leadsheet chords symbols notation\n * @example\n * fromRomanNumerals(\"C\", [\"I\", \"IIm7\", \"V7\"]);\n * // => [\"C\", \"Dm7\", \"G7\"]\n */\nexport function fromRomanNumerals(\n tonic: NoteLiteral,\n chords: string[],\n): string[] {\n const romanNumerals = chords.map(romanNumeral);\n return romanNumerals.map(\n (rn) => transpose(tonic, interval(rn)) + rn.chordType,\n );\n}\n\n/**\n * Given a tonic and a chord list with leadsheet symbols notation,\n * return the chord list with roman numeral notation\n * @example\n * toRomanNumerals(\"C\", [\"CMaj7\", \"Dm7\", \"G7\"]);\n * // => [\"IMaj7\", \"IIm7\", \"V7\"]\n */\nexport function toRomanNumerals(\n tonic: NoteLiteral,\n chords: string[],\n): string[] {\n return chords.map((chord) => {\n const [note, chordType] = tokenize(chord);\n const intervalName = distance(tonic, note);\n const roman = romanNumeral(interval(intervalName));\n return roman.name + chordType;\n });\n}\n\n/** @deprecated */\nexport default { fromRomanNumerals, toRomanNumerals };\n", "import { compact, range } from \"@tonaljs/collection\";\nimport { midiToNoteName, toMidi, ToNoteNameOptions } from \"@tonaljs/midi\";\n\n/**\n * Create a numeric range. You supply a list of notes or numbers and it will\n * be connected to create complex ranges.\n *\n * @param {Array} notes - the list of notes or midi numbers used\n * @return {Array} an array of numbers or empty array if not valid parameters\n *\n * @example\n * numeric([\"C5\", \"C4\"]) // => [ 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60 ]\n * // it works midi notes\n * numeric([10, 5]) // => [ 10, 9, 8, 7, 6, 5 ]\n * // complex range\n * numeric([\"C4\", \"E4\", \"Bb3\"]) // => [60, 61, 62, 63, 64, 63, 62, 61, 60, 59, 58]\n */\nexport function numeric(notes: (string | number)[]): number[] {\n const midi: number[] = compact(\n notes.map((note) => (typeof note === \"number\" ? note : toMidi(note))),\n );\n if (!notes.length || midi.length !== notes.length) {\n // there is no valid notes\n return [];\n }\n\n return midi.reduce(\n (result, note) => {\n const last: number = result[result.length - 1];\n return result.concat(range(last, note).slice(1));\n },\n [midi[0]],\n );\n}\n\n/**\n * Create a range of chromatic notes. The altered notes will use flats.\n *\n * @function\n * @param {Array} notes - the list of notes or midi note numbers to create a range from\n * @param {Object} options - The same as `midiToNoteName` (`{ sharps: boolean, pitchClass: boolean }`)\n * @return {Array} an array of note names\n *\n * @example\n * Range.chromatic([\"C2, \"E2\", \"D2\"]) // => [\"C2\", \"Db2\", \"D2\", \"Eb2\", \"E2\", \"Eb2\", \"D2\"]\n * // with sharps\n * Range.chromatic([\"C2\", \"C3\"], { sharps: true }) // => [ \"C2\", \"C#2\", \"D2\", \"D#2\", \"E2\", \"F2\", \"F#2\", \"G2\", \"G#2\", \"A2\", \"A#2\", \"B2\", \"C3\" ]\n */\nexport function chromatic(\n notes: (string | number)[],\n options?: ToNoteNameOptions,\n): string[] {\n return numeric(notes).map((midi) => midiToNoteName(midi, options));\n}\n\n/** @deprecated */\nexport default { numeric, chromatic };\n", "type RhythmPatternValue = 0 | 1;\n\nexport type RhythmPattern = Array;\n\n/**\n * Create a rhythm pattern from a number or concatenation of numbers in binary form\n * @param numbers one or more number\n * @returns an array of 0s and 1s representing the rhythm pattern\n * @example\n * binary(13) // => [1, 1, 0, 1]\n * binary(12, 13) // => [1, 1, 0, 0, 1, 1, 0, 1]\n */\nexport function binary(...numbers: number[]): RhythmPattern {\n return numbers.reduce((pattern, number) => {\n number\n .toString(2)\n .split(\"\")\n .forEach((digit: string) => {\n pattern.push(parseInt(digit) as RhythmPatternValue);\n });\n return pattern;\n }, [] as RhythmPattern);\n}\n\n/**\n * Create a rhythmic pattern using an hexadecimal numbers\n * @param hexNumber string with the hexadecimal number\n * @returns an array of 0s and 1s representing the rhythm pattern\n * @example\n * R.hex(\"8f\"); // => [1, 0, 0, 0, 1, 1, 1, 1]\n */\nexport function hex(hexNumber: string): RhythmPattern {\n const pattern: RhythmPattern = [];\n for (let i = 0; i < hexNumber.length; i++) {\n const digit = parseInt(\"0x\" + hexNumber[i]);\n const binary = isNaN(digit) ? \"0000\" : digit.toString(2).padStart(4, \"0\");\n binary.split(\"\").forEach((digit: string) => {\n pattern.push(digit === \"1\" ? 1 : 0);\n });\n }\n return pattern;\n}\n\n/**\n * Create a rhythm pattern from the onsets\n * @param numbers the onsets sizes\n * @returns an array of 0s and 1s representing the rhythm pattern\n * @example\n * onsets(1, 2, 2, 1) // => [1, 0, 1, 0, 0, 1, 0, 0, 1, 0]\n */\nexport function onsets(...numbers: number[]): RhythmPattern {\n return numbers.reduce((pattern, number) => {\n pattern.push(1);\n for (let i = 0; i < number; i++) {\n pattern.push(0);\n }\n return pattern;\n }, [] as RhythmPattern);\n}\n\n/**\n * Create a random rhythm pattern with a specified length\n * @param length length of the pattern\n * @param probability Threshold where random number is considered a beat (defaults to 0.5)\n * @param rnd A random function (Math.random by default)\n * @returns an array of 0s and 1s representing the rhythm pattern\n * @example\n * random(4) // => [1, 0, 0, 1]\n */\nexport function random(\n length: number,\n probability = 0.5,\n rnd: () => number = Math.random,\n): RhythmPattern {\n const pattern: RhythmPattern = [];\n for (let i = 0; i < length; i++) {\n pattern.push(rnd() >= probability ? 1 : 0);\n }\n return pattern;\n}\n\n/**\n * Create a rhythm pattern based on the given probability thresholds\n * @param probabilities An array with the probability of each step to be a beat\n * @param rnd A random function (Math.random by default)\n * @returns an array of 0s and 1s representing the rhythm pattern\n * @example\n * probability([0.6, 0, 0.2, 0.5]) // => [0, 0, 0, 1]\n */\nexport function probability(\n probabilities: number[],\n rnd: () => number = Math.random,\n): RhythmPattern {\n return probabilities.map((probability) => (rnd() <= probability ? 1 : 0));\n}\n\n/**\n * Rotate a pattern right\n * @param pattern the pattern to rotate\n * @param rotations the number of steps to rotate\n * @returns the rotated pattern (an array of 0s and 1s)\n * @example\n * rotate([1, 0, 0, 1], 2); // => [0, 1, 1, 0]\n *\n */\nexport function rotate(\n pattern: RhythmPattern,\n rotations: number,\n): RhythmPattern {\n const len = pattern.length;\n const rotated: RhythmPattern = [];\n for (let i = 0; i < len; i++) {\n const pos = (((i - rotations) % len) + len) % len;\n rotated[i] = pattern[pos];\n }\n return rotated;\n}\n\n/**\n * Generates an euclidean rhythm pattern\n * @param steps The length of the pattern\n * @param beats The number of beats\n * @returns an array with 0s and 1s representing the rhythmic pattern\n * @example\n * euclid(8, 3); // => [1, 0, 0, 1, 0, 0, 1, 0]\n */\nexport function euclid(steps: number, beats: number): RhythmPattern {\n const pattern: RhythmPattern = [];\n let d = -1;\n\n for (let i = 0; i < steps; i++) {\n const v = Math.floor(i * (beats / steps));\n pattern[i] = v !== d ? 1 : 0;\n d = v;\n }\n return pattern;\n}\n", "/**\n * References:\n * - https://www.researchgate.net/publication/327567188_An_Algorithm_for_Spelling_the_Pitches_of_Any_Musical_Scale\n * @module scale\n */\nimport { all as chordTypes } from \"@tonaljs/chord-type\";\nimport { range as nums, rotate } from \"@tonaljs/collection\";\nimport { enharmonic, fromMidi, sortedUniqNames } from \"@tonaljs/note\";\nimport {\n chroma,\n isChroma,\n isSubsetOf,\n isSupersetOf,\n modes,\n} from \"@tonaljs/pcset\";\nimport { tonicIntervalsTransposer, transpose } from \"@tonaljs/pitch-distance\";\nimport { note, NoteName } from \"@tonaljs/pitch-note\";\nimport {\n all,\n get as getScaleType,\n ScaleType,\n names as scaleTypeNames,\n all as scaleTypes,\n} from \"@tonaljs/scale-type\";\n\ntype ScaleName = string;\ntype ScaleNameTokens = [string, string]; // [TONIC, SCALE TYPE]\n\nexport interface Scale extends ScaleType {\n tonic: string | null;\n type: string;\n notes: NoteName[];\n}\n\nconst NoScale: Scale = {\n empty: true,\n name: \"\",\n type: \"\",\n tonic: null,\n setNum: NaN,\n chroma: \"\",\n normalized: \"\",\n aliases: [],\n notes: [],\n intervals: [],\n};\n\n/**\n * Given a string with a scale name and (optionally) a tonic, split\n * that components.\n *\n * It retuns an array with the form [ name, tonic ] where tonic can be a\n * note name or null and name can be any arbitrary string\n * (this function doesn\"t check if that scale name exists)\n *\n * @function\n * @param {string} name - the scale name\n * @return {Array} an array [tonic, name]\n * @example\n * tokenize(\"C mixolydean\") // => [\"C\", \"mixolydean\"]\n * tokenize(\"anything is valid\") // => [\"\", \"anything is valid\"]\n * tokenize() // => [\"\", \"\"]\n */\nexport function tokenize(name: ScaleName): ScaleNameTokens {\n if (typeof name !== \"string\") {\n return [\"\", \"\"];\n }\n const i = name.indexOf(\" \");\n const tonic = note(name.substring(0, i));\n if (tonic.empty) {\n const n = note(name);\n return n.empty ? [\"\", name] : [n.name, \"\"];\n }\n\n const type = name.substring(tonic.name.length + 1).toLowerCase();\n return [tonic.name, type.length ? type : \"\"];\n}\n\n/**\n * Get all scale names\n * @function\n */\nexport const names = scaleTypeNames;\n\n/**\n * Get a Scale from a scale name.\n */\nexport function get(src: ScaleName | ScaleNameTokens): Scale {\n const tokens = Array.isArray(src) ? src : tokenize(src);\n const tonic = note(tokens[0]).name;\n const st = getScaleType(tokens[1]);\n if (st.empty) {\n return NoScale;\n }\n\n const type = st.name;\n const notes: string[] = tonic\n ? st.intervals.map((i) => transpose(tonic, i))\n : [];\n\n const name = tonic ? tonic + \" \" + type : type;\n\n return { ...st, name, type, tonic, notes };\n}\n\n/**\n * @deprecated\n * @use Scale.get\n */\nexport const scale = get;\n\nexport function detect(\n notes: string[],\n options: { tonic?: string; match?: \"exact\" | \"fit\" } = {},\n): string[] {\n const notesChroma = chroma(notes);\n const tonic = note(options.tonic ?? notes[0] ?? \"\");\n const tonicChroma = tonic.chroma;\n if (tonicChroma === undefined) {\n return [];\n }\n\n const pitchClasses = notesChroma.split(\"\");\n pitchClasses[tonicChroma] = \"1\";\n const scaleChroma = rotate(tonicChroma, pitchClasses).join(\"\");\n const match = all().find((scaleType) => scaleType.chroma === scaleChroma);\n\n const results: string[] = [];\n if (match) {\n results.push(tonic.name + \" \" + match.name);\n }\n if (options.match === \"exact\") {\n return results;\n }\n\n extended(scaleChroma).forEach((scaleName) => {\n results.push(tonic.name + \" \" + scaleName);\n });\n\n return results;\n}\n\n/**\n * Get all chords that fits a given scale\n *\n * @function\n * @param {string} name - the scale name\n * @return {Array} - the chord names\n *\n * @example\n * scaleChords(\"pentatonic\") // => [\"5\", \"64\", \"M\", \"M6\", \"Madd9\", \"Msus2\"]\n */\nexport function scaleChords(name: string): string[] {\n const s = get(name);\n const inScale = isSubsetOf(s.chroma);\n return chordTypes()\n .filter((chord) => inScale(chord.chroma))\n .map((chord) => chord.aliases[0]);\n}\n/**\n * Get all scales names that are a superset of the given one\n * (has the same notes and at least one more)\n *\n * @function\n * @param {string} name\n * @return {Array} a list of scale names\n * @example\n * extended(\"major\") // => [\"bebop\", \"bebop dominant\", \"bebop major\", \"chromatic\", \"ichikosucho\"]\n */\nexport function extended(name: string): string[] {\n const chroma = isChroma(name) ? name : get(name).chroma;\n const isSuperset = isSupersetOf(chroma);\n return scaleTypes()\n .filter((scale) => isSuperset(scale.chroma))\n .map((scale) => scale.name);\n}\n\n/**\n * Find all scales names that are a subset of the given one\n * (has less notes but all from the given scale)\n *\n * @function\n * @param {string} name\n * @return {Array} a list of scale names\n *\n * @example\n * reduced(\"major\") // => [\"ionian pentatonic\", \"major pentatonic\", \"ritusen\"]\n */\nexport function reduced(name: string): string[] {\n const isSubset = isSubsetOf(get(name).chroma);\n return scaleTypes()\n .filter((scale) => isSubset(scale.chroma))\n .map((scale) => scale.name);\n}\n\n/**\n * Given an array of notes, return the scale: a pitch class set starting from\n * the first note of the array\n *\n * @function\n * @param {string[]} notes\n * @return {string[]} pitch classes with same tonic\n * @example\n * scaleNotes(['C4', 'c3', 'C5', 'C4', 'c4']) // => [\"C\"]\n * scaleNotes(['D4', 'c#5', 'A5', 'F#6']) // => [\"D\", \"F#\", \"A\", \"C#\"]\n */\nexport function scaleNotes(notes: NoteName[]) {\n const pcset: string[] = notes.map((n) => note(n).pc).filter((x) => x);\n const tonic = pcset[0];\n const scale = sortedUniqNames(pcset);\n return rotate(scale.indexOf(tonic), scale);\n}\n\ntype ScaleMode = [string, string];\n/**\n * Find mode names of a scale\n *\n * @function\n * @param {string} name - scale name\n * @example\n * modeNames(\"C pentatonic\") // => [\n * [\"C\", \"major pentatonic\"],\n * [\"D\", \"egyptian\"],\n * [\"E\", \"malkos raga\"],\n * [\"G\", \"ritusen\"],\n * [\"A\", \"minor pentatonic\"]\n * ]\n */\nexport function modeNames(name: string): ScaleMode[] {\n const s = get(name);\n if (s.empty) {\n return [];\n }\n\n const tonics = s.tonic ? s.notes : s.intervals;\n return modes(s.chroma)\n .map((chroma: string, i: number): ScaleMode => {\n const modeName = get(chroma).name;\n return modeName ? [tonics[i], modeName] : [\"\", \"\"];\n })\n .filter((x) => x[0]);\n}\n\nfunction getNoteNameOf(scale: string | string[]) {\n const names = Array.isArray(scale) ? scaleNotes(scale) : get(scale).notes;\n const chromas = names.map((name) => note(name).chroma);\n\n return (noteOrMidi: string | number): string | undefined => {\n const currNote =\n typeof noteOrMidi === \"number\"\n ? note(fromMidi(noteOrMidi))\n : note(noteOrMidi);\n const height = currNote.height;\n\n if (height === undefined) return undefined;\n const chroma = height % 12;\n const position = chromas.indexOf(chroma);\n if (position === -1) return undefined;\n return enharmonic(currNote.name, names[position]);\n };\n}\n\nexport function rangeOf(scale: string | string[]) {\n const getName = getNoteNameOf(scale);\n return (fromNote: string, toNote: string) => {\n const from = note(fromNote).height;\n const to = note(toNote).height;\n if (from === undefined || to === undefined) return [];\n\n return nums(from, to)\n .map(getName)\n .filter((x) => x);\n };\n}\n\n/**\n * Returns a function to get a note name from the scale degree.\n *\n * @example\n * [1, 2, 3].map(Scale.degrees(\"C major\")) => [\"C\", \"D\", \"E\"]\n * [1, 2, 3].map(Scale.degrees(\"C4 major\")) => [\"C4\", \"D4\", \"E4\"]\n */\nexport function degrees(scaleName: string | ScaleNameTokens) {\n const { intervals, tonic } = get(scaleName);\n const transpose = tonicIntervalsTransposer(intervals, tonic);\n return (degree: number) =>\n degree ? transpose(degree > 0 ? degree - 1 : degree) : \"\";\n}\n\n/**\n * Sames as `degree` but with 0-based index\n */\nexport function steps(scaleName: string | ScaleNameTokens) {\n const { intervals, tonic } = get(scaleName);\n return tonicIntervalsTransposer(intervals, tonic);\n}\n\n/** @deprecated */\nexport default {\n degrees,\n detect,\n extended,\n get,\n modeNames,\n names,\n rangeOf,\n reduced,\n scaleChords,\n scaleNotes,\n steps,\n tokenize,\n\n // deprecated\n scale,\n};\n", "// TYPES: PARSING\nexport type TimeSignatureLiteral = string | [number, number] | [string, string];\ntype ParsedTimeSignature = [number | number[], number];\n\n// TYPES: PROPERTIES\nexport type ValidTimeSignature = {\n readonly empty: false;\n readonly name: string;\n readonly upper: number | number[];\n readonly lower: number;\n readonly type: \"simple\" | \"compound\" | \"irregular\" | \"irrational\";\n readonly additive: number[];\n};\n\nexport type InvalidTimeSignature = {\n readonly empty: true;\n readonly name: \"\";\n readonly upper: undefined;\n readonly lower: undefined;\n readonly type: undefined;\n readonly additive: [];\n};\n\nexport type TimeSignature = ValidTimeSignature | InvalidTimeSignature;\n\n// CONSTANTS\nconst NONE: InvalidTimeSignature = {\n empty: true,\n name: \"\",\n upper: undefined,\n lower: undefined,\n type: undefined,\n additive: [],\n};\n\nconst NAMES = [\"4/4\", \"3/4\", \"2/4\", \"2/2\", \"12/8\", \"9/8\", \"6/8\", \"3/8\"];\n\n// PUBLIC API\n\nexport function names() {\n return NAMES.slice();\n}\n\nconst REGEX = /^(\\d*\\d(?:\\+\\d)*)\\/(\\d+)$/;\nconst CACHE = new Map();\n\nexport function get(literal: TimeSignatureLiteral): TimeSignature {\n const stringifiedLiteral = JSON.stringify(literal);\n const cached = CACHE.get(stringifiedLiteral);\n if (cached) {\n return cached;\n }\n\n const ts = build(parse(literal));\n CACHE.set(stringifiedLiteral, ts);\n return ts;\n}\n\nexport function parse(literal: TimeSignatureLiteral): ParsedTimeSignature {\n if (typeof literal === \"string\") {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [_, up, low] = REGEX.exec(literal) || [];\n return parse([up, low]);\n }\n\n const [up, down] = literal;\n const denominator = +down;\n if (typeof up === \"number\") {\n return [up, denominator];\n }\n\n const list = up.split(\"+\").map((n) => +n);\n return list.length === 1 ? [list[0], denominator] : [list, denominator];\n}\n\n/** @deprecated */\nexport default { names, parse, get };\n\n// PRIVATE\n\nconst isPowerOfTwo = (x: number) => (Math.log(x) / Math.log(2)) % 1 === 0;\n\nfunction build([up, down]: ParsedTimeSignature): TimeSignature {\n const upper = Array.isArray(up) ? up.reduce((a, b) => a + b, 0) : up;\n const lower = down;\n if (upper === 0 || lower === 0) {\n return NONE;\n }\n\n const name = Array.isArray(up) ? `${up.join(\"+\")}/${down}` : `${up}/${down}`;\n const additive = Array.isArray(up) ? up : [];\n const type =\n lower === 4 || lower === 2\n ? \"simple\"\n : lower === 8 && upper % 3 === 0\n ? \"compound\"\n : isPowerOfTwo(lower)\n ? \"irregular\"\n : \"irrational\";\n\n return {\n empty: false,\n name,\n type,\n upper,\n lower,\n additive,\n };\n}\n", "import Note from \"@tonaljs/note\";\n\n// A function that decides which of a set of voicings is picked as a follow up to lastVoicing.\nexport declare type VoiceLeadingFunction = (\n voicings: string[][],\n lastVoicing: string[],\n) => string[];\n\nexport const topNoteDiff: VoiceLeadingFunction = (voicings, lastVoicing) => {\n if (!lastVoicing || !lastVoicing.length) {\n return voicings[0];\n }\n const topNoteMidi = (voicing: string[]) =>\n Note.midi(voicing[voicing.length - 1]) || 0;\n const diff = (voicing: string[]) =>\n Math.abs(topNoteMidi(lastVoicing) - topNoteMidi(voicing));\n return voicings.sort((a, b) => diff(a) - diff(b))[0];\n};\n\n/** @deprecated */\nexport default {\n topNoteDiff,\n};\n", "import Chord from \"@tonaljs/chord\";\nimport { all, lefthand, triads, VoicingDictionary } from \"./data\";\nexport { all, lefthand, triads } from \"./data\";\n\nexport const defaultDictionary: VoicingDictionary = lefthand;\n\nexport function lookup(\n symbol: string,\n dictionary = defaultDictionary,\n): string[] | undefined {\n if (dictionary[symbol]) {\n return dictionary[symbol];\n }\n const { aliases } = Chord.get(\"C\" + symbol);\n // TODO: find other way to get aliases of symbol\n const match =\n Object.keys(dictionary).find((_symbol) => aliases.includes(_symbol)) || \"\";\n if (match !== undefined) {\n return dictionary[match];\n }\n return undefined;\n}\n\n/** @deprecated */\nexport default {\n lookup,\n lefthand,\n triads,\n all,\n defaultDictionary,\n};\n", "export type VoicingDictionary = { [symbol: string]: string[] };\n\nexport const triads: VoicingDictionary = {\n M: [\"1P 3M 5P\", \"3M 5P 8P\", \"5P 8P 10M\"],\n m: [\"1P 3m 5P\", \"3m 5P 8P\", \"5P 8P 10m\"],\n o: [\"1P 3m 5d\", \"3m 5d 8P\", \"5d 8P 10m\"],\n aug: [\"1P 3m 5A\", \"3m 5A 8P\", \"5A 8P 10m\"],\n};\nexport const lefthand: VoicingDictionary = {\n m7: [\"3m 5P 7m 9M\", \"7m 9M 10m 12P\"],\n \"7\": [\"3M 6M 7m 9M\", \"7m 9M 10M 13M\"],\n \"^7\": [\"3M 5P 7M 9M\", \"7M 9M 10M 12P\"],\n \"69\": [\"3M 5P 6A 9M\"],\n m7b5: [\"3m 5d 7m 8P\", \"7m 8P 10m 12d\"],\n \"7b9\": [\"3M 6m 7m 9m\", \"7m 9m 10M 13m\"], // b9 / b13\n \"7b13\": [\"3M 6m 7m 9m\", \"7m 9m 10M 13m\"], // b9 / b13\n o7: [\"1P 3m 5d 6M\", \"5d 6M 8P 10m\"],\n \"7#11\": [\"7m 9M 11A 13A\"],\n \"7#9\": [\"3M 7m 9A\"],\n mM7: [\"3m 5P 7M 9M\", \"7M 9M 10m 12P\"],\n m6: [\"3m 5P 6M 9M\", \"6M 9M 10m 12P\"],\n};\nexport const all: VoicingDictionary = {\n M: [\"1P 3M 5P\", \"3M 5P 8P\", \"5P 8P 10M\"],\n m: [\"1P 3m 5P\", \"3m 5P 8P\", \"5P 8P 10m\"],\n o: [\"1P 3m 5d\", \"3m 5d 8P\", \"5d 8P 10m\"],\n aug: [\"1P 3m 5A\", \"3m 5A 8P\", \"5A 8P 10m\"],\n m7: [\"3m 5P 7m 9M\", \"7m 9M 10m 12P\"],\n \"7\": [\"3M 6M 7m 9M\", \"7m 9M 10M 13M\"],\n \"^7\": [\"3M 5P 7M 9M\", \"7M 9M 10M 12P\"],\n \"69\": [\"3M 5P 6A 9M\"],\n m7b5: [\"3m 5d 7m 8P\", \"7m 8P 10m 12d\"],\n \"7b9\": [\"3M 6m 7m 9m\", \"7m 9m 10M 13m\"], // b9 / b13\n \"7b13\": [\"3M 6m 7m 9m\", \"7m 9m 10M 13m\"], // b9 / b13\n o7: [\"1P 3m 5d 6M\", \"5d 6M 8P 10m\"],\n \"7#11\": [\"7m 9M 11A 13A\"],\n \"7#9\": [\"3M 7m 9A\"],\n mM7: [\"3m 5P 7M 9M\", \"7M 9M 10m 12P\"],\n m6: [\"3m 5P 6M 9M\", \"6M 9M 10m 12P\"],\n};\n", "import Chord from \"@tonaljs/chord\";\nimport Interval from \"@tonaljs/interval\";\nimport Note from \"@tonaljs/note\";\nimport Range from \"@tonaljs/range\";\nimport VoiceLeading from \"@tonaljs/voice-leading\";\nimport VoicingDictionary from \"@tonaljs/voicing-dictionary\";\n\nconst defaultRange = [\"C3\", \"C5\"];\nconst defaultDictionary = VoicingDictionary.all;\nconst defaultVoiceLeading = VoiceLeading.topNoteDiff;\n\nexport function get(\n chord: string,\n range: string[] = defaultRange,\n dictionary = defaultDictionary,\n voiceLeading = defaultVoiceLeading,\n lastVoicing?: string[],\n) {\n const voicings = search(chord, range, dictionary);\n if (!lastVoicing || !lastVoicing.length) {\n // notes = voicings[Math.ceil(voicings.length / 2)]; // pick middle voicing..\n return voicings[0]; // pick lowest voicing..\n } else {\n // calculates the distance between the last note and the given voicings top note\n // sort voicings with differ\n return voiceLeading(voicings, lastVoicing);\n }\n}\n\nexport function search(\n chord: string,\n range = defaultRange,\n dictionary = VoicingDictionary.triads,\n): string[][] {\n const [tonic, symbol] = Chord.tokenize(chord);\n const sets = VoicingDictionary.lookup(symbol, dictionary);\n // find equivalent symbol that is used as a key in dictionary:\n if (!sets) {\n return [];\n }\n // resolve array of interval arrays for the wanted symbol\n const voicings = sets.map((intervals) => intervals.split(\" \"));\n const notesInRange = Range.chromatic(range); // gives array of notes inside range\n return voicings.reduce((voiced: string[][], voicing: string[]) => {\n // transpose intervals relative to first interval (e.g. 3m 5P > 1P 3M)\n const relativeIntervals = voicing.map(\n (interval) => Interval.subtract(interval, voicing[0]) || \"\",\n );\n // get enharmonic correct pitch class the bottom note\n const bottomPitchClass = Note.transpose(tonic, voicing[0]);\n // get all possible start notes for voicing\n const starts = notesInRange\n // only get the start notes:\n .filter((note) => Note.chroma(note) === Note.chroma(bottomPitchClass))\n // filter out start notes that will overshoot the top end of the range\n .filter(\n (note) =>\n (Note.midi(\n Note.transpose(\n note,\n relativeIntervals[relativeIntervals.length - 1],\n ),\n ) || 0) <= (Note.midi(range[1]) || 0),\n )\n // replace Range.chromatic notes with the correct enharmonic equivalents\n .map((note) => Note.enharmonic(note, bottomPitchClass));\n // render one voicing for each start note\n const notes = starts.map((start) =>\n relativeIntervals.map((interval) => Note.transpose(start, interval)),\n );\n return voiced.concat(notes);\n }, []);\n}\n\nexport function sequence(\n chords: string[],\n range = defaultRange,\n dictionary = defaultDictionary,\n voiceLeading = defaultVoiceLeading,\n lastVoicing?: string[],\n) {\n const { voicings } = chords.reduce<{\n voicings: string[][];\n lastVoicing: string[] | undefined;\n }>(\n ({ voicings, lastVoicing }, chord) => {\n const voicing = get(chord, range, dictionary, voiceLeading, lastVoicing);\n lastVoicing = voicing;\n voicings.push(voicing);\n return { voicings, lastVoicing };\n },\n { voicings: [], lastVoicing },\n );\n return voicings;\n}\n\n/** @deprecated */\nexport default {\n get,\n search,\n sequence,\n};\n", "import { isNamedPitch } from \"@tonaljs/pitch\";\n\nexport * from \"@tonaljs/pitch\";\nexport * from \"@tonaljs/pitch-distance\";\nexport * from \"@tonaljs/pitch-interval\";\nexport * from \"@tonaljs/pitch-note\";\n\nexport const fillStr = (s: string, n: number) => Array(Math.abs(n) + 1).join(s);\n\nexport function deprecate<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ResultFn extends (this: any, ...newArgs: any[]) => ReturnType,\n>(original: string, alternative: string, fn: ResultFn) {\n return function (this: unknown, ...args: unknown[]): ReturnType {\n // tslint:disable-next-line\n console.warn(`${original} is deprecated. Use ${alternative}.`);\n return fn.apply(this, args);\n };\n}\n\nexport const isNamed = deprecate(\"isNamed\", \"isNamedPitch\", isNamedPitch);\n"], - "mappings": "scAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,iBAAAE,GAAA,UAAAA,GAAA,UAAAA,GAAA,oBAAAC,GAAA,cAAAD,GAAA,eAAAA,GAAA,SAAAA,GAAA,kBAAAA,GAAA,aAAAA,GAAA,QAAAA,GAAA,SAAAA,GAAA,SAAAA,GAAA,SAAAA,GAAA,UAAAE,GAAA,UAAAF,GAAA,gBAAAA,GAAA,UAAAA,GAAA,kBAAAA,GAAA,iBAAAA,GAAA,UAAAA,GAAA,oBAAAG,GAAA,cAAAH,GAAA,kBAAAA,GAAA,UAAAI,GAAA,iBAAAJ,GAAA,YAAAA,GAAA,sBAAAA,GAAA,aAAAK,EAAA,aAAAC,EAAA,WAAAC,GAAA,oBAAAC,EAAA,gBAAAC,GAAA,gBAAAC,EAAA,cAAAC,GAAA,aAAAC,EAAA,YAAAC,GAAA,WAAAC,GAAA,aAAAC,EAAA,YAAAC,GAAA,iBAAAC,EAAA,YAAAC,EAAA,SAAAC,GAAA,SAAAC,EAAA,UAAAC,EAAA,iBAAAC,GAAA,qBAAAC,GAAA,iBAAAC,EAAA,6BAAAC,EAAA,cAAAC,oJCcO,SAASC,EA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vEA,OAAAA,EAAcW,EACdV,EAAS,KAAKU,CAAO,EACd,CAAE,SAAAV,EAAU,YAAAD,CAAY,CACjC,EACA,CAAE,SAAU,CAAC,EAAG,YAAAA,CAAY,CAC9B,EACA,OAAOC,CACT,CAGA,IAAOqB,GAAQ,CACb,IAAA3B,GACA,OAAAO,GACA,SAAAkB,EACF,wYC9FO,IAAMG,GAAU,CAACC,EAAW,IAAc,MAAM,KAAK,IAAI,CAAC,EAAI,CAAC,EAAE,KAAKA,CAAC,EAEvE,SAASC,GAGdC,EAAkBC,EAAqBC,EAAc,CACrD,OAAO,YAA4BC,EAAuC,CAExE,eAAQ,KAAK,GAAGH,CAAQ,uBAAuBC,CAAW,GAAG,EACtDC,EAAG,MAAM,KAAMC,CAAI,CAC5B,CACF,CAEO,IAAMC,GAAUL,GAAU,UAAW,eAAgBM,CAAY,EhCQxE,IAAMC,GAAQC,GAERC,GAAQD,GAERE,GAAkBF,GAElBG,GAAkBH", - "names": ["tonal_exports", "__export", "dist_exports", "ChordDictionary", "PcSet", "ScaleDictionary", "Tonal", "accToAlt", "altToAcc", "chroma", "coordToInterval", "coordToNote", "coordinates", "deprecate", "distance", "fillStr", "height", "interval", "isNamed", "isNamedPitch", "isPitch", "midi", "note", "pitch", "stepToLetter", "tokenizeInterval", "tokenizeNote", "tonicIntervalsTransposer", "transpose", "isNamedPitch", "src", "SIZES", "chroma", "step", "alt", "height", "oct", "dir", "midi", "pitch", "h", "isPitch", "FIFTHS", "STEPS_TO_OCTS", "fifths", "coordinates", "f", "o", "FIFTHS_TO_STEPS", "coord", "unaltered", "i", "fillStr", "s", "NoInterval", "INTERVAL_TONAL_REGEX", "INTERVAL_SHORTHAND_REGEX", "REGEX", "tokenizeInterval", "str", "m", "cache", "interval", "src", "parse", "isPitch", "pitchName", "isNamedPitch", "SIZES", "TYPES", "tokens", "num", "q", "step", "t", "type", "name", "dir", "simple", "alt", "qToAlt", "oct", "semitones", "chroma", "coord", "coordinates", "coordToInterval", "forceDescending", "f", "o", "isDescending", "ivl", "pitch", "props", "calcNum", "d", "altToQ", "fillStr", "s", "NoNote", "cache", "stepToLetter", "step", "altToAcc", "alt", "accToAlt", "acc", "note", "src", "stringSrc", "cached", "value", "parse", "isPitch", "pitchName", "isNamedPitch", "REGEX", "tokenizeNote", "str", "m", "coordToNote", "noteCoord", "pitch", "mod", "n", "SEMI", "noteName", "tokens", "letter", "octStr", "oct", "coord", "coordinates", "name", "pc", "chroma", "height", "midi", "freq", "props", "transpose", "noteName", "intervalName", "note", "intervalCoord", "interval", "noteCoord", "tr", "coordToNote", "tonicIntervalsTransposer", "intervals", "tonic", "len", "normalized", "index", "octaves", "root", "distance", "fromNote", "toNote", "from", "to", "fcoord", "tcoord", "fifths", "octs", "forceDescending", "coordToInterval", "fillStr", "character", "times", "REGEX", "tokenize", "str", "m", "abcToScientificNotation", "acc", "letter", "oct", "scientificToAbcNotation", "note", "l", "o", "transpose", "interval", "distance", "from", "to", "abc_notation_default", "ascR", "b", "a", "descR", "range", "from", "to", "rotate", "times", "arr", "len", "n", "compact", "sortedNoteNames", "notes", "note", "sortedUniqNoteNames", "i", "shuffle", "rnd", "t", "m", "permutations", "acc", "perm", "e", "pos", "newPerm", "ascR", "b", "a", "descR", "range", "from", "to", "rotate", "times", "arr", "len", "n", "compact", "shuffle", "rnd", "i", "t", "m", "permutations", "acc", "perm", "e", "pos", "newPerm", "collection_default", "EmptyPcset", "setNumToChroma", "num", "chromaToNumber", "chroma", "REGEX", "isChroma", "set", "isPcsetNum", "isPcset", "cache", "get", "src", "listToChroma", "chromaToPcset", "pcset", "intervals", "IVLS", "chromaToIntervals", "i", "notes", "ivl", "transpose", "chromas", "range", "modes", "normalize", "binary", "compact", "_", "r", "rotate", "isEqual", "s1", "s2", "isSubsetOf", "s", "o", "isSupersetOf", "isNoteIncludedIn", "noteName", "n", "note", "includes", "filter", "isIncluded", "pcset_default", "chromaRotations", "setNum", "normalizedNum", "normalized", "pitch", "interval", "CHORDS", "data_default", "NoChordType", "EmptyPcset", "dictionary", "index", "get", "type", "chordType", "names", "chord", "x", "symbols", "keys", "all", "entries", "removeAll", "add", "intervals", "aliases", "fullName", "quality", "getQuality", "alias", "addAlias", "has", "interval", "ivls", "a", "b", "chord_type_default", "namedSet", "notes", "pcToName", "record", "n", "chroma", "note", "detect", "source", "options", "x", "findMatches", "chord", "a", "b", "BITMASK", "testChromaNumber", "bitmask", "chromaNumber", "hasAnyThird", "hasPerfectFifth", "hasAnySeventh", "hasNonPerfectFifth", "hasAnyThirdAndPerfectFifthAndAnySeventh", "chordType", "withPerfectFifth", "weight", "tonic", "tonicChroma", "noteName", "allModes", "modes", "found", "mode", "index", "modeWithPerfectFifth", "all", "chordName", "baseNote", "names", "get", "interval", "name", "semitones", "quality", "num", "simplify", "i", "invert", "step", "alt", "IN", "IQ", "fromSemitones", "d", "n", "c", "distance", "add", "combinator", "a", "b", "addTo", "other", "subtract", "transposeFifths", "fifths", "ivl", "nFifths", "nOcts", "dir", "coordToInterval", "interval_default", "fn", "coordA", "coordB", "coord", "SCALES", "data_default", "NoScaleType", "EmptyPcset", "dictionary", "index", "names", "scale", "get", "type", "scaleType", "all", "entries", "keys", "removeAll", "add", "intervals", "name", "aliases", "alias", "addAlias", "ivls", "scale_type_default", "NoChord", "tokenize", "name", "letter", "acc", "oct", "type", "tokenizeNote", "tokenizeBass", "note", "chord", "split", "get", "src", "getChord", "tonic", "bass", "typeName", "optionalTonic", "optionalBass", "bassInterval", "distance", "bassIndex", "hasRoot", "root", "rootDegree", "hasBass", "intervals", "i", "num", "quality", "newNum", "ivl", "subtract", "notes", "transpose", "symbol", "chordName", "interval", "tr", "slash", "chordScales", "s", "isChordIncluded", "isSupersetOf", "all", "scale", "extended", "isSuperset", "reduced", "isSubset", "isSubsetOf", "degrees", "tonicIntervalsTransposer", "degree", "steps", "chord_default", "detect", "DATA", "data_default", "VALUES", "denominator", "shorthand", "names", "add", "NoDuration", "duration", "name", "shorthands", "dur", "REGEX", "get", "_", "simple", "dots", "base", "fraction", "calcDots", "value", "duration_value_default", "pow", "numerator", "isMidi", "arg", "toMidi", "note", "midiToFreq", "midi", "tuning", "L2", "L440", "freqToMidi", "freq", "v", "SHARPS", "FLATS", "midiToNoteName", "options", "pc", "chroma", "pcsetFromChroma", "pcset", "val", "index", "pcsetFromMidi", "a", "b", "i", "notes", "pcsetNearest", "set", "ch", "pcsetSteps", "tonic", "len", "step", "octaves", "pcsetDegrees", "steps", "degree", "midi_default", "NAMES", "toName", "n", "onlyNotes", "array", "note", "names", "get", "name", "pitchClass", "accidentals", "octave", "midi", "freq", "chroma", "fromMidi", "midiToNoteName", "fromFreq", "freqToMidi", "fromFreqSharps", "fromMidiSharps", "distance", "transpose", "tr", "transposeBy", "interval", "trBy", "transposeFrom", "trFrom", "transposeFifths", "noteName", "fifths", "trFifths", "transposeOctaves", "octaves", "ascending", "a", "b", "descending", "sortedNames", "notes", "comparator", "sortedUniqNames", "i", "simplify", "enharmonic", "destName", "src", "dest", "srcChroma", "destChroma", "destOctOffset", "destOct", "note_default", "NoRomanNumeral", "cache", "get", "src", "parse", "NAMES", "isPitch", "fromPitch", "isNamedPitch", "romanNumeral", "names", "major", "NAMES_MINOR", "pitch", "altToAcc", "REGEX", "tokenize", "str", "ROMANS", "name", "acc", "roman", "chordType", "upperRoman", "step", "alt", "accToAlt", "dir", "interval", "roman_numeral_default", "Empty", "NoKey", "NoKeyScale", "NoMajorKey", "NoMinorKey", "mapScaleToType", "scale", "list", "sep", "type", "i", "keyScale", "grades", "triads", "chords", "harmonicFunctions", "chordScales", "tonic", "intervals", "gr", "get", "interval", "transpose", "distInFifths", "from", "to", "f", "note", "t", "MajorScale", "NaturalScale", "HarmonicScale", "MelodicScale", "majorKey", "pc", "alteration", "romanInTonic", "src", "r", "altToAcc", "minorKey", "tnc", "majorTonicFromKeySignature", "sig", "transposeFifths", "accToAlt", "key_default", "MODES", "NoMode", "EmptyPcset", "modes", "toMode", "index", "mode", "alias", "get", "name", "all", "entries", "names", "modeNum", "setNum", "alt", "triad", "seventh", "aliases", "chroma", "notes", "modeName", "tonic", "ivl", "transpose", "chords", "triads", "rotate", "tonics", "i", "x", "seventhChords", "distance", "destination", "source", "from", "to", "simplify", "transposeFifths", "relativeTonic", "mode_default", "fromRomanNumerals", "tonic", "chords", "get", "rn", "transpose", "interval", "toRomanNumerals", "chord", "note", "chordType", "tokenize", "intervalName", "distance", "progression_default", "numeric", "notes", "midi", "compact", "note", "toMidi", "result", "last", "range", "chromatic", "options", "midiToNoteName", "range_default", "binary", "numbers", "pattern", "number", "digit", "hex", "hexNumber", "i", "onsets", "random", "length", "probability", "rnd", "probabilities", "rotate", "rotations", "len", "rotated", "pos", "euclid", "steps", "beats", "d", "v", "NoScale", "tokenize", "name", "i", "tonic", "note", "n", "type", "names", "get", "src", "tokens", "st", "notes", "transpose", "scale", "detect", "options", "notesChroma", "chroma", "tonicChroma", "pitchClasses", "scaleChroma", "rotate", "match", "all", "scaleType", "results", "extended", "scaleName", "scaleChords", "s", "inScale", "isSubsetOf", "chord", "isChroma", "isSuperset", "isSupersetOf", "reduced", "isSubset", "scaleNotes", "pcset", "x", "sortedUniqNames", "modeNames", "tonics", "modes", "modeName", "getNoteNameOf", "chromas", "noteOrMidi", "currNote", "fromMidi", "height", "position", "enharmonic", "rangeOf", "getName", "fromNote", "toNote", "from", "to", "range", "degrees", "intervals", "tonicIntervalsTransposer", "degree", "steps", "scale_default", "NONE", "NAMES", "names", "REGEX", "CACHE", "get", "literal", "stringifiedLiteral", "cached", "ts", "build", "parse", "_", "up", "low", "down", "denominator", "list", "n", "time_signature_default", "isPowerOfTwo", "x", "upper", "a", "b", "lower", "name", "additive", "type", "topNoteDiff", "voicings", "lastVoicing", "topNoteMidi", "voicing", "note_default", "diff", "a", "b", "voice_leading_default", "triads", "lefthand", "all", "defaultDictionary", "lookup", "symbol", "dictionary", "aliases", "chord_default", "match", "_symbol", "voicing_dictionary_default", "defaultRange", "defaultDictionary", "voicing_dictionary_default", "defaultVoiceLeading", "voice_leading_default", "get", "chord", "range", "dictionary", "voiceLeading", "lastVoicing", "voicings", "search", "tonic", "symbol", "chord_default", "sets", "intervals", "notesInRange", "range_default", "voiced", "voicing", "relativeIntervals", "interval", "interval_default", "bottomPitchClass", "note_default", "notes", "note", "start", "sequence", "chords", "voicing_default", "fillStr", "s", "deprecate", "original", "alternative", "fn", "args", "isNamed", "isNamedPitch", "Tonal", "dist_exports", "PcSet", "ChordDictionary", "ScaleDictionary"] + "sourcesContent": ["import * as AbcNotation from \"@tonaljs/abc-notation\";\nimport * as Array from \"@tonaljs/array\";\nimport * as Chord from \"@tonaljs/chord\";\nimport * as ChordType from \"@tonaljs/chord-type\";\nimport * as Collection from \"@tonaljs/collection\";\nimport * as DurationValue from \"@tonaljs/duration-value\";\nimport * as Interval from \"@tonaljs/interval\";\nimport * as Key from \"@tonaljs/key\";\nimport * as Midi from \"@tonaljs/midi\";\nimport * as Mode from \"@tonaljs/mode\";\nimport * as Note from \"@tonaljs/note\";\nimport * as Pcset from \"@tonaljs/pcset\";\nimport * as Progression from \"@tonaljs/progression\";\nimport * as Range from \"@tonaljs/range\";\nimport * as RhythmPattern from \"@tonaljs/rhythm-pattern\";\nimport * as RomanNumeral from \"@tonaljs/roman-numeral\";\nimport * as Scale from \"@tonaljs/scale\";\nimport * as ScaleType from \"@tonaljs/scale-type\";\nimport * as TimeSignature from \"@tonaljs/time-signature\";\nimport * as VoiceLeading from \"@tonaljs/voice-leading\";\nimport * as Voicing from \"@tonaljs/voicing\";\nimport * as VoicingDictionary from \"@tonaljs/voicing-dictionary\";\n\nexport * from \"@tonaljs/core\";\n\n// deprecated (backwards compatibility)\nimport * as Core from \"@tonaljs/core\";\n/** @deprecated */\nconst Tonal = Core;\n/** @deprecated */\nconst PcSet = Pcset;\n/** @deprecated */\nconst ChordDictionary = ChordType;\n/** @deprecated */\nconst ScaleDictionary = ScaleType;\n\nexport {\n AbcNotation,\n Array,\n Chord,\n ChordDictionary,\n ChordType,\n Collection,\n Core,\n DurationValue,\n Interval,\n Key,\n Midi,\n Mode,\n Note,\n PcSet,\n Pcset,\n Progression,\n Range,\n RhythmPattern,\n RomanNumeral,\n Scale,\n ScaleDictionary,\n ScaleType,\n TimeSignature,\n Tonal,\n VoiceLeading,\n Voicing,\n VoicingDictionary,\n};\n", "export interface NamedPitch {\n readonly name: string;\n}\n\n/*** @deprecated use NamedPitch */\nexport interface Named {\n readonly name: string;\n}\n\nexport interface NotFound extends NamedPitch {\n readonly empty: true;\n readonly name: \"\";\n}\n\nexport function isNamedPitch(src: unknown): src is NamedPitch {\n return src !== null &&\n typeof src === \"object\" &&\n \"name\" in src &&\n typeof src.name === \"string\"\n ? true\n : false;\n}\n\ntype Fifths = number;\ntype Octaves = number;\nexport type Direction = 1 | -1;\n\nexport type PitchClassCoordinates = [Fifths];\nexport type NoteCoordinates = [Fifths, Octaves];\nexport type IntervalCoordinates = [Fifths, Octaves, Direction];\nexport type PitchCoordinates =\n | PitchClassCoordinates\n | NoteCoordinates\n | IntervalCoordinates;\n\n/**\n * Pitch properties\n *\n * - {number} step - The step number: 0 = C, 1 = D, ... 6 = B\n * - {number} alt - Number of alterations: -2 = 'bb', -1 = 'b', 0 = '', 1 = '#', ...\n * - {number} [oct] = The octave (undefined when is a coord class)\n * - {number} [dir] = Interval direction (undefined when is not an interval)\n */\nexport interface Pitch {\n readonly step: number;\n readonly alt: number;\n readonly oct?: number; // undefined for pitch classes\n readonly dir?: Direction; // undefined for notes\n}\n\nconst SIZES = [0, 2, 4, 5, 7, 9, 11];\nexport const chroma = ({ step, alt }: Pitch) => (SIZES[step] + alt + 120) % 12;\n\nexport const height = ({ step, alt, oct, dir = 1 }: Pitch) =>\n dir * (SIZES[step] + alt + 12 * (oct === undefined ? -100 : oct));\n\nexport const midi = (pitch: Pitch) => {\n const h = height(pitch);\n return pitch.oct !== undefined && h >= -12 && h <= 115 ? h + 12 : null;\n};\n\nexport function isPitch(pitch: unknown): pitch is Pitch {\n return pitch !== null &&\n typeof pitch === \"object\" &&\n \"step\" in pitch &&\n typeof pitch.step === \"number\" &&\n \"alt\" in pitch &&\n typeof pitch.alt === \"number\" &&\n !isNaN(pitch.step) &&\n !isNaN(pitch.alt)\n ? true\n : false;\n}\n\n// The number of fifths of [C, D, E, F, G, A, B]\nconst FIFTHS = [0, 2, 4, -1, 1, 3, 5];\n// The number of octaves it span each step\nconst STEPS_TO_OCTS = FIFTHS.map((fifths: number) =>\n Math.floor((fifths * 7) / 12),\n);\n\n/**\n * Get coordinates from pitch object\n */\nexport function coordinates(pitch: Pitch): PitchCoordinates {\n const { step, alt, oct, dir = 1 } = pitch;\n const f = FIFTHS[step] + 7 * alt;\n if (oct === undefined) {\n return [dir * f];\n }\n const o = oct - STEPS_TO_OCTS[step] - 4 * alt;\n return [dir * f, dir * o];\n}\n\n// We need to get the steps from fifths\n// Fifths for CDEFGAB are [ 0, 2, 4, -1, 1, 3, 5 ]\n// We add 1 to fifths to avoid negative numbers, so:\n// for [\"F\", \"C\", \"G\", \"D\", \"A\", \"E\", \"B\"] we have:\nconst FIFTHS_TO_STEPS = [3, 0, 4, 1, 5, 2, 6];\n\n/**\n * Get pitch from coordinate objects\n */\nexport function pitch(coord: PitchCoordinates): Pitch {\n const [f, o, dir] = coord;\n const step = FIFTHS_TO_STEPS[unaltered(f)];\n const alt = Math.floor((f + 1) / 7);\n if (o === undefined) {\n return { step, alt, dir };\n }\n const oct = o + 4 * alt + STEPS_TO_OCTS[step];\n return { step, alt, oct, dir };\n}\n\n// Return the number of fifths as if it were unaltered\nfunction unaltered(f: number): number {\n const i = (f + 1) % 7;\n return i < 0 ? 7 + i : i;\n}\n", "import {\n coordinates,\n Direction,\n IntervalCoordinates,\n isNamedPitch,\n isPitch,\n NamedPitch,\n Pitch,\n pitch,\n PitchCoordinates,\n} from \"@tonaljs/pitch\";\n\nconst fillStr = (s: string, n: number) => Array(Math.abs(n) + 1).join(s);\n\nexport type IntervalName = string;\nexport type IntervalLiteral = IntervalName | Pitch | NamedPitch;\n\ntype Quality =\n | \"dddd\"\n | \"ddd\"\n | \"dd\"\n | \"d\"\n | \"m\"\n | \"M\"\n | \"P\"\n | \"A\"\n | \"AA\"\n | \"AAA\"\n | \"AAAA\";\ntype Type = \"perfectable\" | \"majorable\";\n\nexport interface Interval extends Pitch, NamedPitch {\n readonly empty: boolean;\n readonly name: IntervalName;\n readonly num: number;\n readonly q: Quality;\n readonly type: Type;\n readonly step: number;\n readonly alt: number;\n readonly dir: Direction;\n readonly simple: number;\n readonly semitones: number;\n readonly chroma: number;\n readonly coord: IntervalCoordinates;\n readonly oct: number;\n}\n\nconst NoInterval: Interval = Object.freeze({\n empty: true,\n name: \"\",\n num: NaN,\n q: \"\" as Quality,\n type: \"\" as Type,\n step: NaN,\n alt: NaN,\n dir: NaN as Direction,\n simple: NaN,\n semitones: NaN,\n chroma: NaN,\n coord: [] as unknown as IntervalCoordinates,\n oct: NaN,\n});\n\n// shorthand tonal notation (with quality after number)\nconst INTERVAL_TONAL_REGEX = \"([-+]?\\\\d+)(d{1,4}|m|M|P|A{1,4})\";\n// standard shorthand notation (with quality before number)\nconst INTERVAL_SHORTHAND_REGEX = \"(AA|A|P|M|m|d|dd)([-+]?\\\\d+)\";\nconst REGEX = new RegExp(\n \"^\" + INTERVAL_TONAL_REGEX + \"|\" + INTERVAL_SHORTHAND_REGEX + \"$\",\n);\n\ntype IntervalTokens = [string, string];\n\n/**\n * @private\n */\nexport function tokenizeInterval(str?: IntervalName): IntervalTokens {\n const m = REGEX.exec(`${str}`);\n if (m === null) {\n return [\"\", \"\"];\n }\n return m[1] ? [m[1], m[2]] : [m[4], m[3]];\n}\n\nconst cache: { [key in string]: Interval } = {};\n\n/**\n * Get interval properties. It returns an object with:\n *\n * - name: the interval name\n * - num: the interval number\n * - type: 'perfectable' or 'majorable'\n * - q: the interval quality (d, m, M, A)\n * - dir: interval direction (1 ascending, -1 descending)\n * - simple: the simplified number\n * - semitones: the size in semitones\n * - chroma: the interval chroma\n *\n * @param {string} interval - the interval name\n * @return {Object} the interval properties\n *\n * @example\n * import { interval } from '@tonaljs/core'\n * interval('P5').semitones // => 7\n * interval('m3').type // => 'majorable'\n */\nexport function interval(src: IntervalLiteral): Interval {\n return typeof src === \"string\"\n ? cache[src] || (cache[src] = parse(src))\n : isPitch(src)\n ? interval(pitchName(src))\n : isNamedPitch(src)\n ? interval(src.name)\n : NoInterval;\n}\n\nconst SIZES = [0, 2, 4, 5, 7, 9, 11];\nconst TYPES = \"PMMPPMM\";\nfunction parse(str?: string): Interval {\n const tokens = tokenizeInterval(str);\n if (tokens[0] === \"\") {\n return NoInterval;\n }\n const num = +tokens[0];\n const q = tokens[1] as Quality;\n const step = (Math.abs(num) - 1) % 7;\n const t = TYPES[step];\n if (t === \"M\" && q === \"P\") {\n return NoInterval;\n }\n const type = t === \"M\" ? \"majorable\" : \"perfectable\";\n\n const name = \"\" + num + q;\n const dir = num < 0 ? -1 : 1;\n const simple = num === 8 || num === -8 ? num : dir * (step + 1);\n const alt = qToAlt(type, q);\n const oct = Math.floor((Math.abs(num) - 1) / 7);\n const semitones = dir * (SIZES[step] + alt + 12 * oct);\n const chroma = (((dir * (SIZES[step] + alt)) % 12) + 12) % 12;\n const coord = coordinates({ step, alt, oct, dir }) as IntervalCoordinates;\n return {\n empty: false,\n name,\n num,\n q,\n step,\n alt,\n dir,\n type,\n simple,\n semitones,\n chroma,\n coord,\n oct,\n };\n}\n\n/**\n * @private\n *\n * forceDescending is used in the case of unison (#243)\n */\nexport function coordToInterval(\n coord: PitchCoordinates,\n forceDescending?: boolean,\n): Interval {\n const [f, o = 0] = coord;\n const isDescending = f * 7 + o * 12 < 0;\n const ivl: IntervalCoordinates =\n forceDescending || isDescending ? [-f, -o, -1] : [f, o, 1];\n return interval(pitch(ivl)) as Interval;\n}\n\nfunction qToAlt(type: Type, q: string): number {\n return (q === \"M\" && type === \"majorable\") ||\n (q === \"P\" && type === \"perfectable\")\n ? 0\n : q === \"m\" && type === \"majorable\"\n ? -1\n : /^A+$/.test(q)\n ? q.length\n : /^d+$/.test(q)\n ? -1 * (type === \"perfectable\" ? q.length : q.length + 1)\n : 0;\n}\n\n// return the interval name of a pitch\nfunction pitchName(props: Pitch): string {\n const { step, alt, oct = 0, dir } = props;\n if (!dir) {\n return \"\";\n }\n const calcNum = step + 1 + 7 * oct;\n // this is an edge case: descending pitch class unison (see #243)\n const num = calcNum === 0 ? step + 1 : calcNum;\n const d = dir < 0 ? \"-\" : \"\";\n const type = TYPES[step] === \"M\" ? \"majorable\" : \"perfectable\";\n const name = d + num + altToQ(type, alt);\n return name;\n}\n\nfunction altToQ(type: Type, alt: number): Quality {\n if (alt === 0) {\n return type === \"majorable\" ? \"M\" : \"P\";\n } else if (alt === -1 && type === \"majorable\") {\n return \"m\";\n } else if (alt > 0) {\n return fillStr(\"A\", alt) as Quality;\n } else {\n return fillStr(\"d\", type === \"perfectable\" ? alt : alt + 1) as Quality;\n }\n}\n", "import {\n coordinates,\n isNamedPitch,\n isPitch,\n NamedPitch,\n Pitch,\n pitch,\n PitchCoordinates,\n} from \"@tonaljs/pitch\";\n\nconst fillStr = (s: string, n: number) => Array(Math.abs(n) + 1).join(s);\n\nexport type NoteWithOctave = string;\nexport type PcName = string;\nexport type NoteName = NoteWithOctave | PcName;\nexport type NoteLiteral = NoteName | Pitch | NamedPitch;\n\nexport interface Note extends Pitch, NamedPitch {\n readonly empty: boolean;\n readonly name: NoteName;\n readonly letter: string;\n readonly acc: string;\n readonly pc: PcName;\n readonly chroma: number;\n readonly height: number;\n readonly coord: PitchCoordinates;\n readonly midi: number | null;\n readonly freq: number | null;\n}\n\nconst NoNote: Note = Object.freeze({\n empty: true,\n name: \"\",\n letter: \"\",\n acc: \"\",\n pc: \"\",\n step: NaN,\n alt: NaN,\n chroma: NaN,\n height: NaN,\n coord: [] as unknown as PitchCoordinates,\n midi: null,\n freq: null,\n});\n\nconst cache: Map = new Map();\n\nexport const stepToLetter = (step: number) => \"CDEFGAB\".charAt(step);\nexport const altToAcc = (alt: number): string =>\n alt < 0 ? fillStr(\"b\", -alt) : fillStr(\"#\", alt);\nexport const accToAlt = (acc: string): number =>\n acc[0] === \"b\" ? -acc.length : acc.length;\n\n/**\n * Given a note literal (a note name or a note object), returns the Note object\n * @example\n * note('Bb4') // => { name: \"Bb4\", midi: 70, chroma: 10, ... }\n */\nexport function note(src: NoteLiteral): Note {\n const stringSrc = JSON.stringify(src);\n\n const cached = cache.get(stringSrc);\n if (cached) {\n return cached;\n }\n\n const value =\n typeof src === \"string\"\n ? parse(src)\n : isPitch(src)\n ? note(pitchName(src))\n : isNamedPitch(src)\n ? note(src.name)\n : NoNote;\n cache.set(stringSrc, value);\n return value;\n}\n\ntype NoteTokens = [string, string, string, string];\n\nconst REGEX = /^([a-gA-G]?)(#{1,}|b{1,}|x{1,}|)(-?\\d*)\\s*(.*)$/;\n\n/**\n * @private\n */\nexport function tokenizeNote(str: string): NoteTokens {\n const m = REGEX.exec(str) as string[];\n return m\n ? [m[1].toUpperCase(), m[2].replace(/x/g, \"##\"), m[3], m[4]]\n : [\"\", \"\", \"\", \"\"];\n}\n\n/**\n * @private\n */\nexport function coordToNote(noteCoord: PitchCoordinates): Note {\n return note(pitch(noteCoord)) as Note;\n}\n\nconst mod = (n: number, m: number) => ((n % m) + m) % m;\n\nconst SEMI = [0, 2, 4, 5, 7, 9, 11];\nfunction parse(noteName: NoteName): Note {\n const tokens = tokenizeNote(noteName);\n if (tokens[0] === \"\" || tokens[3] !== \"\") {\n return NoNote;\n }\n\n const letter = tokens[0];\n const acc = tokens[1];\n const octStr = tokens[2];\n\n const step = (letter.charCodeAt(0) + 3) % 7;\n const alt = accToAlt(acc);\n const oct = octStr.length ? +octStr : undefined;\n const coord = coordinates({ step, alt, oct });\n\n const name = letter + acc + octStr;\n const pc = letter + acc;\n const chroma = (SEMI[step] + alt + 120) % 12;\n const height =\n oct === undefined\n ? mod(SEMI[step] + alt, 12) - 12 * 99\n : SEMI[step] + alt + 12 * (oct + 1);\n const midi = height >= 0 && height <= 127 ? height : null;\n const freq = oct === undefined ? null : Math.pow(2, (height - 69) / 12) * 440;\n\n return {\n empty: false,\n acc,\n alt,\n chroma,\n coord,\n freq,\n height,\n letter,\n midi,\n name,\n oct,\n pc,\n step,\n };\n}\n\nfunction pitchName(props: Pitch): NoteName {\n const { step, alt, oct } = props;\n const letter = stepToLetter(step);\n if (!letter) {\n return \"\";\n }\n\n const pc = letter + altToAcc(alt);\n return oct || oct === 0 ? pc + oct : pc;\n}\n", "import { PitchCoordinates } from \"@tonaljs/pitch\";\nimport {\n IntervalLiteral,\n IntervalName,\n interval as asInterval,\n coordToInterval,\n} from \"@tonaljs/pitch-interval\";\nimport {\n NoteLiteral,\n NoteName,\n note as asNote,\n coordToNote,\n} from \"@tonaljs/pitch-note\";\n\n/**\n * Transpose a note by an interval.\n *\n * @param {string} note - the note or note name\n * @param {string} interval - the interval or interval name\n * @return {string} the transposed note name or empty string if not valid notes\n * @example\n * import { transpose } from \"@tonaljs/core\"\n * transpose(\"d3\", \"3M\") // => \"F#3\"\n * transpose(\"D\", \"3M\") // => \"F#\"\n * [\"C\", \"D\", \"E\", \"F\", \"G\"].map(pc => transpose(pc, \"M3)) // => [\"E\", \"F#\", \"G#\", \"A\", \"B\"]\n */\nexport function transpose(\n noteName: NoteLiteral,\n intervalName: IntervalLiteral | [number, number],\n): NoteName {\n const note = asNote(noteName);\n const intervalCoord = Array.isArray(intervalName)\n ? intervalName\n : asInterval(intervalName).coord;\n if (note.empty || !intervalCoord || intervalCoord.length < 2) {\n return \"\";\n }\n const noteCoord = note.coord;\n const tr: PitchCoordinates =\n noteCoord.length === 1\n ? [noteCoord[0] + intervalCoord[0]]\n : [noteCoord[0] + intervalCoord[0], noteCoord[1] + intervalCoord[1]];\n return coordToNote(tr).name;\n}\n\n// Private\nexport function tonicIntervalsTransposer(\n intervals: string[],\n tonic: string | undefined | null,\n) {\n const len = intervals.length;\n return (normalized: number) => {\n if (!tonic) return \"\";\n const index =\n normalized < 0 ? (len - (-normalized % len)) % len : normalized % len;\n const octaves = Math.floor(normalized / len);\n const root = transpose(tonic, [0, octaves]);\n return transpose(root, intervals[index]);\n };\n}\n\n/**\n * Find the interval distance between two notes or coord classes.\n *\n * To find distance between coord classes, both notes must be coord classes and\n * the interval is always ascending\n *\n * @param {Note|string} from - the note or note name to calculate distance from\n * @param {Note|string} to - the note or note name to calculate distance to\n * @return {string} the interval name or empty string if not valid notes\n *\n */\nexport function distance(\n fromNote: NoteLiteral,\n toNote: NoteLiteral,\n): IntervalName {\n const from = asNote(fromNote);\n const to = asNote(toNote);\n if (from.empty || to.empty) {\n return \"\";\n }\n\n const fcoord = from.coord;\n const tcoord = to.coord;\n const fifths = tcoord[0] - fcoord[0];\n const octs =\n fcoord.length === 2 && tcoord.length === 2\n ? tcoord[1] - fcoord[1]\n : -Math.floor((fifths * 7) / 12);\n\n // If it's unison, not pitch class, and in the same octave\n // it can be descending interval (see #243 & #428)\n const forceDescending =\n to.height === from.height &&\n to.midi !== null &&\n from.oct === to.oct &&\n from.step > to.step;\n return coordToInterval([fifths, octs], forceDescending).name;\n}\n", "import { distance as dist, transpose as tr } from \"@tonaljs/pitch-distance\";\nimport { note } from \"@tonaljs/pitch-note\";\n\nconst fillStr = (character: string, times: number) =>\n Array(times + 1).join(character);\n\nconst REGEX = /^(_{1,}|=|\\^{1,}|)([abcdefgABCDEFG])([,']*)$/;\n\ntype AbcTokens = [string, string, string];\n\nexport function tokenize(str: string): AbcTokens {\n const m = REGEX.exec(str);\n if (!m) {\n return [\"\", \"\", \"\"];\n }\n return [m[1], m[2], m[3]];\n}\n\n/**\n * Convert a (string) note in ABC notation into a (string) note in scientific notation\n *\n * @example\n * abcToScientificNotation(\"c\") // => \"C5\"\n */\nexport function abcToScientificNotation(str: string): string {\n const [acc, letter, oct] = tokenize(str);\n if (letter === \"\") {\n return \"\";\n }\n let o = 4;\n for (let i = 0; i < oct.length; i++) {\n o += oct.charAt(i) === \",\" ? -1 : 1;\n }\n const a =\n acc[0] === \"_\"\n ? acc.replace(/_/g, \"b\")\n : acc[0] === \"^\"\n ? acc.replace(/\\^/g, \"#\")\n : \"\";\n return letter.charCodeAt(0) > 96\n ? letter.toUpperCase() + a + (o + 1)\n : letter + a + o;\n}\n\n/**\n * Convert a (string) note in scientific notation into a (string) note in ABC notation\n *\n * @example\n * scientificToAbcNotation(\"C#4\") // => \"^C\"\n */\nexport function scientificToAbcNotation(str: string): string {\n const n = note(str);\n if (n.empty || (!n.oct && n.oct !== 0)) {\n return \"\";\n }\n const { letter, acc, oct } = n;\n const a = acc[0] === \"b\" ? acc.replace(/b/g, \"_\") : acc.replace(/#/g, \"^\");\n const l = oct > 4 ? letter.toLowerCase() : letter;\n const o =\n oct === 5 ? \"\" : oct > 4 ? fillStr(\"'\", oct - 5) : fillStr(\",\", 4 - oct);\n return a + l + o;\n}\n\nexport function transpose(note: string, interval: string): string {\n return scientificToAbcNotation(tr(abcToScientificNotation(note), interval));\n}\n\nexport function distance(from: string, to: string): string {\n return dist(abcToScientificNotation(from), abcToScientificNotation(to));\n}\n\n/** @deprecated */\nexport default {\n abcToScientificNotation,\n scientificToAbcNotation,\n tokenize,\n transpose,\n distance,\n};\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { note, Note } from \"@tonaljs/pitch-note\";\n\n// ascending range\nfunction ascR(b: number, n: number) {\n const a = [];\n // tslint:disable-next-line:curly\n for (; n--; a[n] = n + b);\n return a;\n}\n// descending range\nfunction descR(b: number, n: number) {\n const a = [];\n // tslint:disable-next-line:curly\n for (; n--; a[n] = b - n);\n return a;\n}\n\n/**\n * Creates a numeric range\n *\n * @param {number} from\n * @param {number} to\n * @return {Array}\n *\n * @example\n * range(-2, 2) // => [-2, -1, 0, 1, 2]\n * range(2, -2) // => [2, 1, 0, -1, -2]\n */\nexport function range(from: number, to: number): number[] {\n return from < to ? ascR(from, to - from + 1) : descR(from, from - to + 1);\n}\n\n/**\n * Rotates a list a number of times. It\"s completly agnostic about the\n * contents of the list.\n *\n * @param {Integer} times - the number of rotations\n * @param {Array} array\n * @return {Array} the rotated array\n *\n * @example\n * rotate(1, [1, 2, 3]) // => [2, 3, 1]\n */\nexport function rotate(times: number, arr: T[]): T[] {\n const len = arr.length;\n const n = ((times % len) + len) % len;\n return arr.slice(n, len).concat(arr.slice(0, n));\n}\n\n/**\n * Return a copy of the array with the null values removed\n * @function\n * @param {Array} array\n * @return {Array}\n *\n * @example\n * compact([\"a\", \"b\", null, \"c\"]) // => [\"a\", \"b\", \"c\"]\n */\nexport function compact(arr: any[]): any[] {\n return arr.filter((n) => n === 0 || n);\n}\n\n/**\n * Sort an array of notes in ascending order. Pitch classes are listed\n * before notes. Any string that is not a note is removed.\n *\n * @param {string[]} notes\n * @return {string[]} sorted array of notes\n *\n * @example\n * sortedNoteNames(['c2', 'c5', 'c1', 'c0', 'c6', 'c'])\n * // => ['C', 'C0', 'C1', 'C2', 'C5', 'C6']\n * sortedNoteNames(['c', 'F', 'G', 'a', 'b', 'h', 'J'])\n * // => ['C', 'F', 'G', 'A', 'B']\n */\nexport function sortedNoteNames(notes: string[]): string[] {\n const valid = notes.map((n) => note(n)).filter((n) => !n.empty) as Note[];\n return valid.sort((a, b) => a.height - b.height).map((n) => n.name);\n}\n\n/**\n * Get sorted notes with duplicates removed. Pitch classes are listed\n * before notes.\n *\n * @function\n * @param {string[]} array\n * @return {string[]} unique sorted notes\n *\n * @example\n * Array.sortedUniqNoteNames(['a', 'b', 'c2', '1p', 'p2', 'c2', 'b', 'c', 'c3' ])\n * // => [ 'C', 'A', 'B', 'C2', 'C3' ]\n */\nexport function sortedUniqNoteNames(arr: string[]): string[] {\n return sortedNoteNames(arr).filter((n, i, a) => i === 0 || n !== a[i - 1]);\n}\n\n/**\n * Randomizes the order of the specified array in-place, using the Fisher–Yates shuffle.\n *\n * @function\n * @param {Array} array\n * @return {Array} the array shuffled\n *\n * @example\n * shuffle([\"C\", \"D\", \"E\", \"F\"]) // => [...]\n */\nexport function shuffle(arr: any[], rnd = Math.random): any[] {\n let i: number;\n let t: any;\n let m: number = arr.length;\n while (m) {\n i = Math.floor(rnd() * m--);\n t = arr[m];\n arr[m] = arr[i];\n arr[i] = t;\n }\n return arr;\n}\n\n/**\n * Get all permutations of an array\n *\n * @param {Array} array - the array\n * @return {Array} an array with all the permutations\n * @example\n * permutations([\"a\", \"b\", \"c\"])) // =>\n * [\n * [\"a\", \"b\", \"c\"],\n * [\"b\", \"a\", \"c\"],\n * [\"b\", \"c\", \"a\"],\n * [\"a\", \"c\", \"b\"],\n * [\"c\", \"a\", \"b\"],\n * [\"c\", \"b\", \"a\"]\n * ]\n */\nexport function permutations(arr: any[]): any[] {\n if (arr.length === 0) {\n return [[]];\n }\n return permutations(arr.slice(1)).reduce((acc, perm) => {\n return acc.concat(\n arr.map((e, pos) => {\n const newPerm = perm.slice();\n newPerm.splice(pos, 0, arr[0]);\n return newPerm;\n }),\n );\n }, []);\n}\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\n// ascending range\nfunction ascR(b: number, n: number) {\n const a = [];\n // tslint:disable-next-line:curly\n for (; n--; a[n] = n + b);\n return a;\n}\n// descending range\nfunction descR(b: number, n: number) {\n const a = [];\n // tslint:disable-next-line:curly\n for (; n--; a[n] = b - n);\n return a;\n}\n\n/**\n * Creates a numeric range\n *\n * @param {number} from\n * @param {number} to\n * @return {Array}\n *\n * @example\n * range(-2, 2) // => [-2, -1, 0, 1, 2]\n * range(2, -2) // => [2, 1, 0, -1, -2]\n */\nexport function range(from: number, to: number): number[] {\n return from < to ? ascR(from, to - from + 1) : descR(from, from - to + 1);\n}\n\n/**\n * Rotates a list a number of times. It\"s completly agnostic about the\n * contents of the list.\n *\n * @param {Integer} times - the number of rotations\n * @param {Array} collection\n * @return {Array} the rotated collection\n *\n * @example\n * rotate(1, [1, 2, 3]) // => [2, 3, 1]\n */\nexport function rotate(times: number, arr: T[]): T[] {\n const len = arr.length;\n const n = ((times % len) + len) % len;\n return arr.slice(n, len).concat(arr.slice(0, n));\n}\n\n/**\n * Return a copy of the collection with the null values removed\n * @function\n * @param {Array} collection\n * @return {Array}\n *\n * @example\n * compact([\"a\", \"b\", null, \"c\"]) // => [\"a\", \"b\", \"c\"]\n */\nexport function compact(arr: any[]): any[] {\n return arr.filter((n) => n === 0 || n);\n}\n\n/**\n * Randomizes the order of the specified collection in-place, using the Fisher–Yates shuffle.\n *\n * @function\n * @param {Array} collection\n * @return {Array} the collection shuffled\n *\n * @example\n * shuffle([\"C\", \"D\", \"E\", \"F\"]) // => [...]\n */\nexport function shuffle(arr: any[], rnd = Math.random): any[] {\n let i: number;\n let t: any;\n let m: number = arr.length;\n while (m) {\n i = Math.floor(rnd() * m--);\n t = arr[m];\n arr[m] = arr[i];\n arr[i] = t;\n }\n return arr;\n}\n\n/**\n * Get all permutations of an collection\n *\n * @param {Array} collection - the collection\n * @return {Array} an collection with all the permutations\n * @example\n * permutations([\"a\", \"b\", \"c\"])) // =>\n * [\n * [\"a\", \"b\", \"c\"],\n * [\"b\", \"a\", \"c\"],\n * [\"b\", \"c\", \"a\"],\n * [\"a\", \"c\", \"b\"],\n * [\"c\", \"a\", \"b\"],\n * [\"c\", \"b\", \"a\"]\n * ]\n */\nexport function permutations(arr: any[]): any[] {\n if (arr.length === 0) {\n return [[]];\n }\n return permutations(arr.slice(1)).reduce((acc, perm) => {\n return acc.concat(\n arr.map((e, pos) => {\n const newPerm = perm.slice();\n newPerm.splice(pos, 0, arr[0]);\n return newPerm;\n }),\n );\n }, []);\n}\n\n/** @deprecated */\nexport default {\n compact,\n permutations,\n range,\n rotate,\n shuffle,\n};\n", "import { compact, range, rotate } from \"@tonaljs/collection\";\nimport { NotFound } from \"@tonaljs/pitch\";\nimport { transpose } from \"@tonaljs/pitch-distance\";\nimport { Interval, IntervalName, interval } from \"@tonaljs/pitch-interval\";\nimport { Note, NoteName, note } from \"@tonaljs/pitch-note\";\n\n/**\n * The properties of a pitch class set\n * @param {number} num - a number between 1 and 4095 (both included) that\n * uniquely identifies the set. It's the decimal number of the chrom.\n * @param {string} chroma - a string representation of the set: a 12-char string\n * with either \"1\" or \"0\" as characters, representing a pitch class or not\n * for the given position in the octave. For example, a \"1\" at index 0 means 'C',\n * a \"1\" at index 2 means 'D', and so on...\n * @param {string} normalized - the chroma but shifted to the first 1\n * @param {number} length - the number of notes of the pitch class set\n * @param {IntervalName[]} intervals - the intervals of the pitch class set\n * *starting from C*\n */\nexport interface Pcset {\n readonly name: string;\n readonly empty: boolean;\n readonly setNum: number;\n readonly chroma: PcsetChroma;\n readonly normalized: PcsetChroma;\n readonly intervals: IntervalName[];\n}\n\nexport const EmptyPcset: Pcset = {\n empty: true,\n name: \"\",\n setNum: 0,\n chroma: \"000000000000\",\n normalized: \"000000000000\",\n intervals: [],\n};\n\nexport type PcsetChroma = string;\nexport type PcsetNum = number;\n\n// UTILITIES\nconst setNumToChroma = (num: number): string =>\n Number(num).toString(2).padStart(12, \"0\");\nconst chromaToNumber = (chroma: string): number => parseInt(chroma, 2);\nconst REGEX = /^[01]{12}$/;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isChroma(set: any): set is PcsetChroma {\n return REGEX.test(set);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isPcsetNum = (set: any): set is PcsetNum =>\n typeof set === \"number\" && set >= 0 && set <= 4095;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isPcset = (set: any): set is Pcset => set && isChroma(set.chroma);\n\nconst cache: { [key in string]: Pcset } = { [EmptyPcset.chroma]: EmptyPcset };\n\n/**\n * A definition of a pitch class set. It could be:\n * - The pitch class set chroma (a 12-length string with only 1s or 0s)\n * - The pitch class set number (an integer between 1 and 4095)\n * - An array of note names\n * - An array of interval names\n */\nexport type Set =\n | Partial\n | PcsetChroma\n | PcsetNum\n | NoteName[]\n | IntervalName[];\n\n/**\n * Get the pitch class set of a collection of notes or set number or chroma\n */\nexport function get(src: Set): Pcset {\n const chroma: PcsetChroma = isChroma(src)\n ? src\n : isPcsetNum(src)\n ? setNumToChroma(src)\n : Array.isArray(src)\n ? listToChroma(src)\n : isPcset(src)\n ? src.chroma\n : EmptyPcset.chroma;\n\n return (cache[chroma] = cache[chroma] || chromaToPcset(chroma));\n}\n\n/**\n * @use Pcset.get\n * @deprecated\n */\nexport const pcset = get;\n\n/**\n * Get pitch class set chroma\n * @function\n * @example\n * Pcset.chroma([\"c\", \"d\", \"e\"]); //=> \"101010000000\"\n */\nexport const chroma = (set: Set) => get(set).chroma;\n\n/**\n * Get intervals (from C) of a set\n * @function\n * @example\n * Pcset.intervals([\"c\", \"d\", \"e\"]); //=>\n */\nexport const intervals = (set: Set) => get(set).intervals;\n\n/**\n * Get pitch class set number\n * @function\n * @example\n * Pcset.num([\"c\", \"d\", \"e\"]); //=> 2192\n */\nexport const num = (set: Set) => get(set).setNum;\n\nconst IVLS = [\n \"1P\",\n \"2m\",\n \"2M\",\n \"3m\",\n \"3M\",\n \"4P\",\n \"5d\",\n \"5P\",\n \"6m\",\n \"6M\",\n \"7m\",\n \"7M\",\n];\n\n/**\n * Get the intervals of a pcset *starting from C*\n * @private\n * @param {Set} set - the pitch class set\n * @return {IntervalName[]} an array of interval names or an empty array\n * if not a valid pitch class set\n */\nfunction chromaToIntervals(chroma: PcsetChroma): IntervalName[] {\n const intervals = [];\n for (let i = 0; i < 12; i++) {\n // tslint:disable-next-line:curly\n if (chroma.charAt(i) === \"1\") intervals.push(IVLS[i]);\n }\n return intervals;\n}\n\nexport function notes(set: Set): NoteName[] {\n return get(set).intervals.map((ivl) => transpose(\"C\", ivl));\n}\n\n/**\n * Get a list of all possible pitch class sets (all possible chromas) *having\n * C as root*. There are 2048 different chromas. If you want them with another\n * note you have to transpose it\n *\n * @see http://allthescales.org/\n * @return {Array} an array of possible chromas from '10000000000' to '11111111111'\n */\nexport function chromas(): PcsetChroma[] {\n return range(2048, 4095).map(setNumToChroma);\n}\n\n/**\n * Given a a list of notes or a pcset chroma, produce the rotations\n * of the chroma discarding the ones that starts with \"0\"\n *\n * This is used, for example, to get all the modes of a scale.\n *\n * @param {Array|string} set - the list of notes or pitchChr of the set\n * @param {boolean} normalize - (Optional, true by default) remove all\n * the rotations that starts with \"0\"\n * @return {Array} an array with all the modes of the chroma\n *\n * @example\n * Pcset.modes([\"C\", \"D\", \"E\"]).map(Pcset.intervals)\n */\nexport function modes(set: Set, normalize = true): PcsetChroma[] {\n const pcs = get(set);\n\n const binary = pcs.chroma.split(\"\");\n return compact(\n binary.map((_, i) => {\n const r = rotate(i, binary);\n return normalize && r[0] === \"0\" ? null : r.join(\"\");\n }),\n );\n}\n\n/**\n * Test if two pitch class sets are equal\n *\n * @param {Array|string} set1 - one of the pitch class sets\n * @param {Array|string} set2 - the other pitch class set\n * @return {boolean} true if they are equal\n * @example\n * Pcset.isEqual([\"c2\", \"d3\"], [\"c5\", \"d2\"]) // => true\n */\nexport function isEqual(s1: Set, s2: Set) {\n return get(s1).setNum === get(s2).setNum;\n}\n\n/**\n * Create a function that test if a collection of notes is a\n * subset of a given set\n *\n * The function is curryfied.\n *\n * @param {PcsetChroma|NoteName[]} set - the superset to test against (chroma or\n * list of notes)\n * @return{function(PcsetChroma|NoteNames[]): boolean} a function accepting a set\n * to test against (chroma or list of notes)\n * @example\n * const inCMajor = Pcset.isSubsetOf([\"C\", \"E\", \"G\"])\n * inCMajor([\"e6\", \"c4\"]) // => true\n * inCMajor([\"e6\", \"c4\", \"d3\"]) // => false\n */\nexport function isSubsetOf(set: Set) {\n const s = get(set).setNum;\n\n return (notes: Set | Pcset) => {\n const o = get(notes).setNum;\n // tslint:disable-next-line: no-bitwise\n return s && s !== o && (o & s) === o;\n };\n}\n\n/**\n * Create a function that test if a collection of notes is a\n * superset of a given set (it contains all notes and at least one more)\n *\n * @param {Set} set - an array of notes or a chroma set string to test against\n * @return {(subset: Set): boolean} a function that given a set\n * returns true if is a subset of the first one\n * @example\n * const extendsCMajor = Pcset.isSupersetOf([\"C\", \"E\", \"G\"])\n * extendsCMajor([\"e6\", \"a\", \"c4\", \"g2\"]) // => true\n * extendsCMajor([\"c6\", \"e4\", \"g3\"]) // => false\n */\nexport function isSupersetOf(set: Set) {\n const s = get(set).setNum;\n return (notes: Set) => {\n const o = get(notes).setNum;\n // tslint:disable-next-line: no-bitwise\n return s && s !== o && (o | s) === o;\n };\n}\n\n/**\n * Test if a given pitch class set includes a note\n *\n * @param {Array} set - the base set to test against\n * @param {string} note - the note to test\n * @return {boolean} true if the note is included in the pcset\n *\n * Can be partially applied\n *\n * @example\n * const isNoteInCMajor = isNoteIncludedIn(['C', 'E', 'G'])\n * isNoteInCMajor('C4') // => true\n * isNoteInCMajor('C#4') // => false\n */\nexport function isNoteIncludedIn(set: Set) {\n const s = get(set);\n\n return (noteName: NoteName): boolean => {\n const n = note(noteName);\n return s && !n.empty && s.chroma.charAt(n.chroma) === \"1\";\n };\n}\n\n/** @deprecated use: isNoteIncludedIn */\nexport const includes = isNoteIncludedIn;\n\n/**\n * Filter a list with a pitch class set\n *\n * @param {Array|string} set - the pitch class set notes\n * @param {Array|string} notes - the note list to be filtered\n * @return {Array} the filtered notes\n *\n * @example\n * Pcset.filter([\"C\", \"D\", \"E\"], [\"c2\", \"c#2\", \"d2\", \"c3\", \"c#3\", \"d3\"]) // => [ \"c2\", \"d2\", \"c3\", \"d3\" ])\n * Pcset.filter([\"C2\"], [\"c2\", \"c#2\", \"d2\", \"c3\", \"c#3\", \"d3\"]) // => [ \"c2\", \"c3\" ])\n */\nexport function filter(set: Set) {\n const isIncluded = isNoteIncludedIn(set);\n return (notes: NoteName[]) => {\n return notes.filter(isIncluded);\n };\n}\n\n/** @deprecated */\nexport default {\n get,\n chroma,\n num,\n intervals,\n chromas,\n isSupersetOf,\n isSubsetOf,\n isNoteIncludedIn,\n isEqual,\n filter,\n modes,\n notes,\n // deprecated\n pcset,\n};\n\n//// PRIVATE ////\n\nfunction chromaRotations(chroma: string): string[] {\n const binary = chroma.split(\"\");\n return binary.map((_, i) => rotate(i, binary).join(\"\"));\n}\n\nfunction chromaToPcset(chroma: PcsetChroma): Pcset {\n const setNum = chromaToNumber(chroma);\n const normalizedNum = chromaRotations(chroma)\n .map(chromaToNumber)\n .filter((n) => n >= 2048)\n .sort()[0];\n const normalized = setNumToChroma(normalizedNum);\n\n const intervals = chromaToIntervals(chroma);\n\n return {\n empty: false,\n name: \"\",\n setNum,\n chroma,\n normalized,\n intervals,\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction listToChroma(set: any[]): PcsetChroma {\n if (set.length === 0) {\n return EmptyPcset.chroma;\n }\n\n let pitch: Note | Interval | NotFound;\n const binary = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < set.length; i++) {\n pitch = note(set[i]);\n // tslint:disable-next-line: curly\n if (pitch.empty) pitch = interval(set[i]);\n // tslint:disable-next-line: curly\n if (!pitch.empty) binary[pitch.chroma] = 1;\n }\n return binary.join(\"\");\n}\n", "import {\n EmptyPcset,\n get as pcset,\n Pcset,\n PcsetChroma,\n PcsetNum,\n} from \"@tonaljs/pcset\";\nimport data from \"./data\";\n\nexport type ChordQuality =\n | \"Major\"\n | \"Minor\"\n | \"Augmented\"\n | \"Diminished\"\n | \"Unknown\";\n\nexport interface ChordType extends Pcset {\n name: string;\n quality: ChordQuality;\n aliases: string[];\n}\nconst NoChordType: ChordType = {\n ...EmptyPcset,\n name: \"\",\n quality: \"Unknown\",\n intervals: [],\n aliases: [],\n};\n\ntype ChordTypeName = string | PcsetChroma | PcsetNum;\n\nlet dictionary: ChordType[] = [];\nlet index: Record = {};\n\n/**\n * Given a chord name or chroma, return the chord properties\n * @param {string} source - chord name or pitch class set chroma\n * @example\n * ChordType.get('major') // => { name: 'major', ... }\n */\nexport function get(type: ChordTypeName): ChordType {\n return index[type] || NoChordType;\n}\n\n/**\n * Get all chord (long) names\n */\nexport function names() {\n return dictionary.map((chord) => chord.name).filter((x) => x);\n}\n\n/**\n * Get all chord symbols\n */\nexport function symbols() {\n return dictionary.map((chord) => chord.aliases[0]).filter((x) => x);\n}\n\n/**\n * Keys used to reference chord types\n */\nexport function keys() {\n return Object.keys(index);\n}\n\n/**\n * Return a list of all chord types\n */\nexport function all(): ChordType[] {\n return dictionary.slice();\n}\n\n/** @deprecated */\nexport const entries = all;\n\n/**\n * Clear the dictionary\n */\nexport function removeAll() {\n dictionary = [];\n index = {};\n}\n\n/**\n * Add a chord to the dictionary.\n * @param intervals\n * @param aliases\n * @param [fullName]\n */\nexport function add(intervals: string[], aliases: string[], fullName?: string) {\n const quality = getQuality(intervals);\n const chord = {\n ...pcset(intervals),\n name: fullName || \"\",\n quality,\n intervals,\n aliases,\n };\n dictionary.push(chord);\n if (chord.name) {\n index[chord.name] = chord;\n }\n index[chord.setNum] = chord;\n index[chord.chroma] = chord;\n chord.aliases.forEach((alias) => addAlias(chord, alias));\n}\n\nexport function addAlias(chord: ChordType, alias: string) {\n index[alias] = chord;\n}\n\nfunction getQuality(intervals: string[]): ChordQuality {\n const has = (interval: string) => intervals.indexOf(interval) !== -1;\n return has(\"5A\")\n ? \"Augmented\"\n : has(\"3M\")\n ? \"Major\"\n : has(\"5d\")\n ? \"Diminished\"\n : has(\"3m\")\n ? \"Minor\"\n : \"Unknown\";\n}\n\ndata.forEach(([ivls, fullName, names]: string[]) =>\n add(ivls.split(\" \"), names.split(\" \"), fullName),\n);\ndictionary.sort((a, b) => a.setNum - b.setNum);\n\n/** @deprecated */\nexport default {\n names,\n symbols,\n get,\n all,\n add,\n removeAll,\n keys,\n\n /** @deprecated */\n entries: all,\n /** @deprecated */\n chordType: get,\n};\n", "/**\n * @private\n * Chord List\n * Source: https://en.wikibooks.org/wiki/Music_Theory/Complete_List_of_Chord_Patterns\n * Format: [\"intervals\", \"full name\", \"abrv1 abrv2\"]\n */\nconst CHORDS: string[][] = [\n // ==Major==\n [\"1P 3M 5P\", \"major\", \"M ^ maj\"],\n [\"1P 3M 5P 7M\", \"major seventh\", \"maj7 Δ ma7 M7 Maj7 ^7\"],\n [\"1P 3M 5P 7M 9M\", \"major ninth\", \"maj9 Δ9 ^9\"],\n [\"1P 3M 5P 7M 9M 13M\", \"major thirteenth\", \"maj13 Maj13 ^13\"],\n [\"1P 3M 5P 6M\", \"sixth\", \"6 add6 add13 M6\"],\n [\"1P 3M 5P 6M 9M\", \"sixth added ninth\", \"6add9 6/9 69 M69\"],\n [\"1P 3M 6m 7M\", \"major seventh flat sixth\", \"M7b6 ^7b6\"],\n [\n \"1P 3M 5P 7M 11A\",\n \"major seventh sharp eleventh\",\n \"maj#4 Δ#4 Δ#11 M7#11 ^7#11 maj7#11\",\n ],\n // ==Minor==\n // '''Normal'''\n [\"1P 3m 5P\", \"minor\", \"m min -\"],\n [\"1P 3m 5P 7m\", \"minor seventh\", \"m7 min7 mi7 -7\"],\n [\n \"1P 3m 5P 7M\",\n \"minor/major seventh\",\n \"m/ma7 m/maj7 mM7 mMaj7 m/M7 -Δ7 mΔ -^7 -maj7\",\n ],\n [\"1P 3m 5P 6M\", \"minor sixth\", \"m6 -6\"],\n [\"1P 3m 5P 7m 9M\", \"minor ninth\", \"m9 -9\"],\n [\"1P 3m 5P 7M 9M\", \"minor/major ninth\", \"mM9 mMaj9 -^9\"],\n [\"1P 3m 5P 7m 9M 11P\", \"minor eleventh\", \"m11 -11\"],\n [\"1P 3m 5P 7m 9M 13M\", \"minor thirteenth\", \"m13 -13\"],\n // '''Diminished'''\n [\"1P 3m 5d\", \"diminished\", \"dim ° o\"],\n [\"1P 3m 5d 7d\", \"diminished seventh\", \"dim7 °7 o7 07\"],\n [\"1P 3m 5d 7m\", \"half-diminished\", \"m7b5 ø -7b5 h7 h\"],\n [\"1P 3m 5A\", \"minor augmented\", \"m#5 -#5 m+ maug\"],\n\n // ==Dominant/Seventh==\n // '''Normal'''\n [\"1P 3M 5P 7m\", \"dominant seventh\", \"7 dom\"],\n [\"1P 3M 5P 7m 9M\", \"dominant ninth\", \"9\"],\n [\"1P 3M 5P 7m 9M 13M\", \"dominant thirteenth\", \"13\"],\n [\"1P 3M 5P 7m 11A\", \"lydian dominant seventh\", \"7#11 7#4\"],\n // '''Altered'''\n [\"1P 3M 5P 7m 9m\", \"dominant flat ninth\", \"7b9\"],\n [\"1P 3M 5P 7m 9A\", \"dominant sharp ninth\", \"7#9\"],\n [\"1P 3M 7m 9m\", \"altered\", \"alt7\"],\n // '''Suspended'''\n [\"1P 4P 5P\", \"suspended fourth\", \"sus4 sus\"],\n [\"1P 2M 5P\", \"suspended second\", \"sus2\"],\n [\"1P 4P 5P 7m\", \"suspended fourth seventh\", \"7sus4 7sus\"],\n [\"1P 5P 7m 9M 11P\", \"eleventh\", \"11\"],\n [\n \"1P 4P 5P 7m 9m\",\n \"suspended fourth flat ninth\",\n \"b9sus phryg 7b9sus 7b9sus4\",\n ],\n // ==Other==\n [\"1P 5P\", \"fifth\", \"5\"],\n [\"1P 3M 5A\", \"augmented\", \"aug + +5 ^#5\"],\n [\"1P 3m 5A\", \"minor augmented\", \"m#5 -#5 m+\"],\n [\"1P 3M 5A 7M\", \"augmented seventh\", \"maj7#5 maj7+5 +maj7 ^7#5\"],\n [\n \"1P 3M 5P 7M 9M 11A\",\n \"major sharp eleventh (lydian)\",\n \"maj9#11 Δ9#11 ^9#11\",\n ],\n // ==Legacy==\n [\"1P 2M 4P 5P\", \"\", \"sus24 sus4add9\"],\n [\"1P 3M 5A 7M 9M\", \"\", \"maj9#5 Maj9#5\"],\n [\"1P 3M 5A 7m\", \"\", \"7#5 +7 7+ 7aug aug7\"],\n [\"1P 3M 5A 7m 9A\", \"\", \"7#5#9 7#9#5 7alt\"],\n [\"1P 3M 5A 7m 9M\", \"\", \"9#5 9+\"],\n [\"1P 3M 5A 7m 9M 11A\", \"\", \"9#5#11\"],\n [\"1P 3M 5A 7m 9m\", \"\", \"7#5b9 7b9#5\"],\n [\"1P 3M 5A 7m 9m 11A\", \"\", \"7#5b9#11\"],\n [\"1P 3M 5A 9A\", \"\", \"+add#9\"],\n [\"1P 3M 5A 9M\", \"\", \"M#5add9 +add9\"],\n [\"1P 3M 5P 6M 11A\", \"\", \"M6#11 M6b5 6#11 6b5\"],\n [\"1P 3M 5P 6M 7M 9M\", \"\", \"M7add13\"],\n [\"1P 3M 5P 6M 9M 11A\", \"\", \"69#11\"],\n [\"1P 3m 5P 6M 9M\", \"\", \"m69 -69\"],\n [\"1P 3M 5P 6m 7m\", \"\", \"7b6\"],\n [\"1P 3M 5P 7M 9A 11A\", \"\", \"maj7#9#11\"],\n [\"1P 3M 5P 7M 9M 11A 13M\", \"\", \"M13#11 maj13#11 M13+4 M13#4\"],\n [\"1P 3M 5P 7M 9m\", \"\", \"M7b9\"],\n [\"1P 3M 5P 7m 11A 13m\", \"\", \"7#11b13 7b5b13\"],\n [\"1P 3M 5P 7m 13M\", \"\", \"7add6 67 7add13\"],\n [\"1P 3M 5P 7m 9A 11A\", \"\", \"7#9#11 7b5#9 7#9b5\"],\n [\"1P 3M 5P 7m 9A 11A 13M\", \"\", \"13#9#11\"],\n [\"1P 3M 5P 7m 9A 11A 13m\", \"\", \"7#9#11b13\"],\n [\"1P 3M 5P 7m 9A 13M\", \"\", \"13#9\"],\n [\"1P 3M 5P 7m 9A 13m\", \"\", \"7#9b13\"],\n [\"1P 3M 5P 7m 9M 11A\", \"\", \"9#11 9+4 9#4\"],\n [\"1P 3M 5P 7m 9M 11A 13M\", \"\", \"13#11 13+4 13#4\"],\n [\"1P 3M 5P 7m 9M 11A 13m\", \"\", \"9#11b13 9b5b13\"],\n [\"1P 3M 5P 7m 9m 11A\", \"\", \"7b9#11 7b5b9 7b9b5\"],\n [\"1P 3M 5P 7m 9m 11A 13M\", \"\", \"13b9#11\"],\n [\"1P 3M 5P 7m 9m 11A 13m\", \"\", \"7b9b13#11 7b9#11b13 7b5b9b13\"],\n [\"1P 3M 5P 7m 9m 13M\", \"\", \"13b9\"],\n [\"1P 3M 5P 7m 9m 13m\", \"\", \"7b9b13\"],\n [\"1P 3M 5P 7m 9m 9A\", \"\", \"7b9#9\"],\n [\"1P 3M 5P 9M\", \"\", \"Madd9 2 add9 add2\"],\n [\"1P 3M 5P 9m\", \"\", \"Maddb9\"],\n [\"1P 3M 5d\", \"\", \"Mb5\"],\n [\"1P 3M 5d 6M 7m 9M\", \"\", \"13b5\"],\n [\"1P 3M 5d 7M\", \"\", \"M7b5\"],\n [\"1P 3M 5d 7M 9M\", \"\", \"M9b5\"],\n [\"1P 3M 5d 7m\", \"\", \"7b5\"],\n [\"1P 3M 5d 7m 9M\", \"\", \"9b5\"],\n [\"1P 3M 7m\", \"\", \"7no5\"],\n [\"1P 3M 7m 13m\", \"\", \"7b13\"],\n [\"1P 3M 7m 9M\", \"\", \"9no5\"],\n [\"1P 3M 7m 9M 13M\", \"\", \"13no5\"],\n [\"1P 3M 7m 9M 13m\", \"\", \"9b13\"],\n [\"1P 3m 4P 5P\", \"\", \"madd4\"],\n [\"1P 3m 5P 6m 7M\", \"\", \"mMaj7b6\"],\n [\"1P 3m 5P 6m 7M 9M\", \"\", \"mMaj9b6\"],\n [\"1P 3m 5P 7m 11P\", \"\", \"m7add11 m7add4\"],\n [\"1P 3m 5P 9M\", \"\", \"madd9\"],\n [\"1P 3m 5d 6M 7M\", \"\", \"o7M7\"],\n [\"1P 3m 5d 7M\", \"\", \"oM7\"],\n [\"1P 3m 6m 7M\", \"\", \"mb6M7\"],\n [\"1P 3m 6m 7m\", \"\", \"m7#5\"],\n [\"1P 3m 6m 7m 9M\", \"\", \"m9#5\"],\n [\"1P 3m 5A 7m 9M 11P\", \"\", \"m11A\"],\n [\"1P 3m 6m 9m\", \"\", \"mb6b9\"],\n [\"1P 2M 3m 5d 7m\", \"\", \"m9b5\"],\n [\"1P 4P 5A 7M\", \"\", \"M7#5sus4\"],\n [\"1P 4P 5A 7M 9M\", \"\", \"M9#5sus4\"],\n [\"1P 4P 5A 7m\", \"\", \"7#5sus4\"],\n [\"1P 4P 5P 7M\", \"\", \"M7sus4\"],\n [\"1P 4P 5P 7M 9M\", \"\", \"M9sus4\"],\n [\"1P 4P 5P 7m 9M\", \"\", \"9sus4 9sus\"],\n [\"1P 4P 5P 7m 9M 13M\", \"\", \"13sus4 13sus\"],\n [\"1P 4P 5P 7m 9m 13m\", \"\", \"7sus4b9b13 7b9b13sus4\"],\n [\"1P 4P 7m 10m\", \"\", \"4 quartal\"],\n [\"1P 5P 7m 9m 11P\", \"\", \"11b9\"],\n];\n\nexport default CHORDS;\n", "import { all, ChordType } from \"@tonaljs/chord-type\";\nimport { modes } from \"@tonaljs/pcset\";\nimport { note } from \"@tonaljs/pitch-note\";\n\ninterface FoundChord {\n readonly weight: number;\n readonly name: string;\n}\n\nconst namedSet = (notes: string[]) => {\n const pcToName = notes.reduce>((record, n) => {\n const chroma = note(n).chroma;\n if (chroma !== undefined) {\n record[chroma] = record[chroma] || note(n).name;\n }\n return record;\n }, {});\n\n return (chroma: number) => pcToName[chroma];\n};\n\ntype DetectOptions = {\n assumePerfectFifth: boolean;\n};\nexport function detect(\n source: string[],\n options: Partial = {},\n): string[] {\n const notes = source.map((n) => note(n).pc).filter((x) => x);\n if (note.length === 0) {\n return [];\n }\n\n const found: FoundChord[] = findMatches(notes, 1, options);\n\n return found\n .filter((chord) => chord.weight)\n .sort((a, b) => b.weight - a.weight)\n .map((chord) => chord.name);\n}\n\n/* tslint:disable:no-bitwise */\nconst BITMASK = {\n // 3m 000100000000\n // 3M 000010000000\n anyThirds: 384,\n // 5P 000000010000\n perfectFifth: 16,\n // 5d 000000100000\n // 5A 000000001000\n nonPerfectFifths: 40,\n anySeventh: 3,\n};\n\nconst testChromaNumber = (bitmask: number) => (chromaNumber: number) =>\n Boolean(chromaNumber & bitmask);\nconst hasAnyThird = testChromaNumber(BITMASK.anyThirds);\nconst hasPerfectFifth = testChromaNumber(BITMASK.perfectFifth);\nconst hasAnySeventh = testChromaNumber(BITMASK.anySeventh);\nconst hasNonPerfectFifth = testChromaNumber(BITMASK.nonPerfectFifths);\n\nfunction hasAnyThirdAndPerfectFifthAndAnySeventh(chordType: ChordType) {\n const chromaNumber = parseInt(chordType.chroma, 2);\n return (\n hasAnyThird(chromaNumber) &&\n hasPerfectFifth(chromaNumber) &&\n hasAnySeventh(chromaNumber)\n );\n}\n\nfunction withPerfectFifth(chroma: string): string {\n const chromaNumber = parseInt(chroma, 2);\n return hasNonPerfectFifth(chromaNumber)\n ? chroma\n : (chromaNumber | 16).toString(2);\n}\n\n/* tslint:enable:no-bitwise */\n\ntype FindMatchesOptions = {\n assumePerfectFifth: boolean;\n};\nfunction findMatches(\n notes: string[],\n weight: number,\n options: Partial,\n): FoundChord[] {\n const tonic = notes[0];\n const tonicChroma = note(tonic).chroma;\n const noteName = namedSet(notes);\n // we need to test all chromas to get the correct baseNote\n const allModes = modes(notes, false);\n\n const found: FoundChord[] = [];\n allModes.forEach((mode, index) => {\n const modeWithPerfectFifth =\n options.assumePerfectFifth && withPerfectFifth(mode);\n // some chords could have the same chroma but different interval spelling\n const chordTypes = all().filter((chordType) => {\n if (\n options.assumePerfectFifth &&\n hasAnyThirdAndPerfectFifthAndAnySeventh(chordType)\n ) {\n return chordType.chroma === modeWithPerfectFifth;\n }\n return chordType.chroma === mode;\n });\n\n chordTypes.forEach((chordType) => {\n const chordName = chordType.aliases[0];\n const baseNote = noteName(index);\n const isInversion = index !== tonicChroma;\n if (isInversion) {\n found.push({\n weight: 0.5 * weight,\n name: `${baseNote}${chordName}/${tonic}`,\n });\n } else {\n found.push({ weight: 1 * weight, name: `${baseNote}${chordName}` });\n }\n });\n });\n\n return found;\n}\n\n/** @deprecated */\nexport default { detect };\n", "import { IntervalCoordinates, NoteCoordinates } from \"@tonaljs/pitch\";\nimport { distance as dist } from \"@tonaljs/pitch-distance\";\nimport {\n IntervalName,\n coordToInterval,\n interval as props,\n} from \"@tonaljs/pitch-interval\";\n\n/**\n * Get the natural list of names\n */\nexport function names(): IntervalName[] {\n return \"1P 2M 3M 4P 5P 6m 7m\".split(\" \");\n}\n\n/**\n * Get properties of an interval\n *\n * @function\n * @example\n * Interval.get('P4') // => {\"alt\": 0, \"dir\": 1, \"name\": \"4P\", \"num\": 4, \"oct\": 0, \"q\": \"P\", \"semitones\": 5, \"simple\": 4, \"step\": 3, \"type\": \"perfectable\"}\n */\nexport const get = props;\n\n/**\n * Get name of an interval\n *\n * @function\n * @example\n * Interval.name('4P') // => \"4P\"\n * Interval.name('P4') // => \"4P\"\n * Interval.name('C4') // => \"\"\n */\nexport const name = (name: string) => props(name).name;\n\n/**\n * Get semitones of an interval\n * @function\n * @example\n * Interval.semitones('P4') // => 5\n */\nexport const semitones = (name: string) => props(name).semitones;\n\n/**\n * Get quality of an interval\n * @function\n * @example\n * Interval.quality('P4') // => \"P\"\n */\nexport const quality = (name: string) => props(name).q;\n\n/**\n * Get number of an interval\n * @function\n * @example\n * Interval.num('P4') // => 4\n */\nexport const num = (name: string) => props(name).num;\n\n/**\n * Get the simplified version of an interval.\n *\n * @function\n * @param {string} interval - the interval to simplify\n * @return {string} the simplified interval\n *\n * @example\n * Interval.simplify(\"9M\") // => \"2M\"\n * Interval.simplify(\"2M\") // => \"2M\"\n * Interval.simplify(\"-2M\") // => \"7m\"\n * [\"8P\", \"9M\", \"10M\", \"11P\", \"12P\", \"13M\", \"14M\", \"15P\"].map(Interval.simplify)\n * // => [ \"8P\", \"2M\", \"3M\", \"4P\", \"5P\", \"6M\", \"7M\", \"8P\" ]\n */\nexport function simplify(name: IntervalName): IntervalName {\n const i = props(name);\n return i.empty ? \"\" : i.simple + i.q;\n}\n\n/**\n * Get the inversion (https://en.wikipedia.org/wiki/Inversion_(music)#Intervals)\n * of an interval.\n *\n * @function\n * @param {string} interval - the interval to invert in interval shorthand\n * notation or interval array notation\n * @return {string} the inverted interval\n *\n * @example\n * Interval.invert(\"3m\") // => \"6M\"\n * Interval.invert(\"2M\") // => \"7m\"\n */\nexport function invert(name: IntervalName): IntervalName {\n const i = props(name);\n if (i.empty) {\n return \"\";\n }\n const step = (7 - i.step) % 7;\n const alt = i.type === \"perfectable\" ? -i.alt : -(i.alt + 1);\n return props({ step, alt, oct: i.oct, dir: i.dir }).name;\n}\n\n// interval numbers\nconst IN = [1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7];\n// interval qualities\nconst IQ = \"P m M m M P d P m M m M\".split(\" \");\n\n/**\n * Get interval name from semitones number. Since there are several interval\n * names for the same number, the name it's arbitrary, but deterministic.\n *\n * @param {Integer} num - the number of semitones (can be negative)\n * @return {string} the interval name\n * @example\n * Interval.fromSemitones(7) // => \"5P\"\n * Interval.fromSemitones(-7) // => \"-5P\"\n */\nexport function fromSemitones(semitones: number): IntervalName {\n const d = semitones < 0 ? -1 : 1;\n const n = Math.abs(semitones);\n const c = n % 12;\n const o = Math.floor(n / 12);\n return d * (IN[c] + 7 * o) + IQ[c];\n}\n\n/**\n * Find interval between two notes\n *\n * @example\n * Interval.distance(\"C4\", \"G4\"); // => \"5P\"\n */\nexport const distance = dist;\n\n/**\n * Adds two intervals\n *\n * @function\n * @param {string} interval1\n * @param {string} interval2\n * @return {string} the added interval name\n * @example\n * Interval.add(\"3m\", \"5P\") // => \"7m\"\n */\nexport const add = combinator((a, b) => [a[0] + b[0], a[1] + b[1]]);\n\n/**\n * Returns a function that adds an interval\n *\n * @function\n * @example\n * ['1P', '2M', '3M'].map(Interval.addTo('5P')) // => [\"5P\", \"6M\", \"7M\"]\n */\nexport const addTo = (interval: string) => (other: string) =>\n add(interval, other);\n\n/**\n * Subtracts two intervals\n *\n * @function\n * @param {string} minuendInterval\n * @param {string} subtrahendInterval\n * @return {string} the subtracted interval name\n * @example\n * Interval.subtract('5P', '3M') // => '3m'\n * Interval.subtract('3M', '5P') // => '-3m'\n */\nexport const subtract = combinator((a, b) => [a[0] - b[0], a[1] - b[1]]);\n\nexport function transposeFifths(\n interval: IntervalName,\n fifths: number,\n): IntervalName {\n const ivl = get(interval);\n if (ivl.empty) return \"\";\n\n const [nFifths, nOcts, dir] = ivl.coord;\n return coordToInterval([nFifths + fifths, nOcts, dir]).name;\n}\n\n/** @deprecated */\nexport default {\n names,\n get,\n name,\n num,\n semitones,\n quality,\n fromSemitones,\n distance,\n invert,\n simplify,\n add,\n addTo,\n subtract,\n transposeFifths,\n};\n\n//// PRIVATE ////\n\ntype Operation = (\n a: IntervalCoordinates,\n b: IntervalCoordinates,\n) => NoteCoordinates;\n\nfunction combinator(fn: Operation) {\n return (a: IntervalName, b: IntervalName): IntervalName | undefined => {\n const coordA = props(a).coord;\n const coordB = props(b).coord;\n if (coordA && coordB) {\n const coord = fn(coordA, coordB);\n return coordToInterval(coord).name;\n }\n };\n}\n", "import {\n EmptyPcset,\n get as pcset,\n Pcset,\n PcsetChroma,\n PcsetNum,\n} from \"@tonaljs/pcset\";\nimport data from \"./data\";\n\n/**\n * Properties for a scale in the scale dictionary. It's a pitch class set\n * properties with the following additional information:\n * - name: the scale name\n * - aliases: alternative list of names\n * - intervals: an array of interval names\n */\nexport interface ScaleType extends Pcset {\n readonly name: string;\n readonly aliases: string[];\n}\n\nexport const NoScaleType: ScaleType = {\n ...EmptyPcset,\n intervals: [],\n aliases: [],\n};\n\ntype ScaleTypeName = string | PcsetChroma | PcsetNum;\n\nlet dictionary: ScaleType[] = [];\nlet index: Record = {};\n\nexport function names() {\n return dictionary.map((scale) => scale.name);\n}\n\n/**\n * Given a scale name or chroma, return the scale properties\n *\n * @param {string} type - scale name or pitch class set chroma\n * @example\n * import { get } from 'tonaljs/scale-type'\n * get('major') // => { name: 'major', ... }\n */\nexport function get(type: ScaleTypeName): ScaleType {\n return index[type] || NoScaleType;\n}\n\n/**\n * @deprecated\n * @use ScaleType.get\n */\nexport const scaleType = get;\n\n/**\n * Return a list of all scale types\n */\nexport function all() {\n return dictionary.slice();\n}\n\n/**\n * @deprecated\n * @use ScaleType.all\n */\nexport const entries = all;\n\n/**\n * Keys used to reference scale types\n */\nexport function keys() {\n return Object.keys(index);\n}\n\n/**\n * Clear the dictionary\n */\nexport function removeAll() {\n dictionary = [];\n index = {};\n}\n\n/**\n * Add a scale into dictionary\n * @param intervals\n * @param name\n * @param aliases\n */\nexport function add(\n intervals: string[],\n name: string,\n aliases: string[] = [],\n): ScaleType {\n const scale = { ...pcset(intervals), name, intervals, aliases };\n dictionary.push(scale);\n index[scale.name] = scale;\n index[scale.setNum] = scale;\n index[scale.chroma] = scale;\n scale.aliases.forEach((alias) => addAlias(scale, alias));\n return scale;\n}\n\nexport function addAlias(scale: ScaleType, alias: string) {\n index[alias] = scale;\n}\n\ndata.forEach(([ivls, name, ...aliases]: string[]) =>\n add(ivls.split(\" \"), name, aliases),\n);\n\n/** @deprecated */\nexport default {\n names,\n get,\n all,\n add,\n removeAll,\n keys,\n\n // deprecated\n entries,\n scaleType,\n};\n", "// SCALES\n// Format: [\"intervals\", \"name\", \"alias1\", \"alias2\", ...]\nconst SCALES: string[][] = [\n // Basic scales\n [\"1P 2M 3M 5P 6M\", \"major pentatonic\", \"pentatonic\"],\n [\"1P 2M 3M 4P 5P 6M 7M\", \"major\", \"ionian\"],\n [\"1P 2M 3m 4P 5P 6m 7m\", \"minor\", \"aeolian\"],\n\n // Jazz common scales\n [\"1P 2M 3m 3M 5P 6M\", \"major blues\"],\n [\"1P 3m 4P 5d 5P 7m\", \"minor blues\", \"blues\"],\n [\"1P 2M 3m 4P 5P 6M 7M\", \"melodic minor\"],\n [\"1P 2M 3m 4P 5P 6m 7M\", \"harmonic minor\"],\n [\"1P 2M 3M 4P 5P 6M 7m 7M\", \"bebop\"],\n [\"1P 2M 3m 4P 5d 6m 6M 7M\", \"diminished\", \"whole-half diminished\"],\n\n // Modes\n [\"1P 2M 3m 4P 5P 6M 7m\", \"dorian\"],\n [\"1P 2M 3M 4A 5P 6M 7M\", \"lydian\"],\n [\"1P 2M 3M 4P 5P 6M 7m\", \"mixolydian\", \"dominant\"],\n [\"1P 2m 3m 4P 5P 6m 7m\", \"phrygian\"],\n [\"1P 2m 3m 4P 5d 6m 7m\", \"locrian\"],\n\n // 5-note scales\n [\"1P 3M 4P 5P 7M\", \"ionian pentatonic\"],\n [\"1P 3M 4P 5P 7m\", \"mixolydian pentatonic\", \"indian\"],\n [\"1P 2M 4P 5P 6M\", \"ritusen\"],\n [\"1P 2M 4P 5P 7m\", \"egyptian\"],\n [\"1P 3M 4P 5d 7m\", \"neopolitan major pentatonic\"],\n [\"1P 3m 4P 5P 6m\", \"vietnamese 1\"],\n [\"1P 2m 3m 5P 6m\", \"pelog\"],\n [\"1P 2m 4P 5P 6m\", \"kumoijoshi\"],\n [\"1P 2M 3m 5P 6m\", \"hirajoshi\"],\n [\"1P 2m 4P 5d 7m\", \"iwato\"],\n [\"1P 2m 4P 5P 7m\", \"in-sen\"],\n [\"1P 3M 4A 5P 7M\", \"lydian pentatonic\", \"chinese\"],\n [\"1P 3m 4P 6m 7m\", \"malkos raga\"],\n [\"1P 3m 4P 5d 7m\", \"locrian pentatonic\", \"minor seven flat five pentatonic\"],\n [\"1P 3m 4P 5P 7m\", \"minor pentatonic\", \"vietnamese 2\"],\n [\"1P 3m 4P 5P 6M\", \"minor six pentatonic\"],\n [\"1P 2M 3m 5P 6M\", \"flat three pentatonic\", \"kumoi\"],\n [\"1P 2M 3M 5P 6m\", \"flat six pentatonic\"],\n [\"1P 2m 3M 5P 6M\", \"scriabin\"],\n [\"1P 3M 5d 6m 7m\", \"whole tone pentatonic\"],\n [\"1P 3M 4A 5A 7M\", \"lydian #5P pentatonic\"],\n [\"1P 3M 4A 5P 7m\", \"lydian dominant pentatonic\"],\n [\"1P 3m 4P 5P 7M\", \"minor #7M pentatonic\"],\n [\"1P 3m 4d 5d 7m\", \"super locrian pentatonic\"],\n\n // 6-note scales\n [\"1P 2M 3m 4P 5P 7M\", \"minor hexatonic\"],\n [\"1P 2A 3M 5P 5A 7M\", \"augmented\"],\n [\"1P 2M 4P 5P 6M 7m\", \"piongio\"],\n [\"1P 2m 3M 4A 6M 7m\", \"prometheus neopolitan\"],\n [\"1P 2M 3M 4A 6M 7m\", \"prometheus\"],\n [\"1P 2m 3M 5d 6m 7m\", \"mystery #1\"],\n [\"1P 2m 3M 4P 5A 6M\", \"six tone symmetric\"],\n [\"1P 2M 3M 4A 5A 6A\", \"whole tone\", \"messiaen's mode #1\"],\n [\"1P 2m 4P 4A 5P 7M\", \"messiaen's mode #5\"],\n\n // 7-note scales\n [\"1P 2M 3M 4P 5d 6m 7m\", \"locrian major\", \"arabian\"],\n [\"1P 2m 3M 4A 5P 6m 7M\", \"double harmonic lydian\"],\n [\n \"1P 2m 2A 3M 4A 6m 7m\",\n \"altered\",\n \"super locrian\",\n \"diminished whole tone\",\n \"pomeroy\",\n ],\n [\"1P 2M 3m 4P 5d 6m 7m\", \"locrian #2\", \"half-diminished\", \"aeolian b5\"],\n [\n \"1P 2M 3M 4P 5P 6m 7m\",\n \"mixolydian b6\",\n \"melodic minor fifth mode\",\n \"hindu\",\n ],\n [\"1P 2M 3M 4A 5P 6M 7m\", \"lydian dominant\", \"lydian b7\", \"overtone\"],\n [\"1P 2M 3M 4A 5A 6M 7M\", \"lydian augmented\"],\n [\n \"1P 2m 3m 4P 5P 6M 7m\",\n \"dorian b2\",\n \"phrygian #6\",\n \"melodic minor second mode\",\n ],\n [\n \"1P 2m 3m 4d 5d 6m 7d\",\n \"ultralocrian\",\n \"superlocrian bb7\",\n \"superlocrian diminished\",\n ],\n [\"1P 2m 3m 4P 5d 6M 7m\", \"locrian 6\", \"locrian natural 6\", \"locrian sharp 6\"],\n [\"1P 2A 3M 4P 5P 5A 7M\", \"augmented heptatonic\"],\n // Source https://en.wikipedia.org/wiki/Ukrainian_Dorian_scale\n [\n \"1P 2M 3m 4A 5P 6M 7m\",\n \"dorian #4\",\n \"ukrainian dorian\",\n \"romanian minor\",\n \"altered dorian\",\n ],\n [\"1P 2M 3m 4A 5P 6M 7M\", \"lydian diminished\"],\n [\"1P 2M 3M 4A 5A 7m 7M\", \"leading whole tone\"],\n [\"1P 2M 3M 4A 5P 6m 7m\", \"lydian minor\"],\n [\"1P 2m 3M 4P 5P 6m 7m\", \"phrygian dominant\", \"spanish\", \"phrygian major\"],\n [\"1P 2m 3m 4P 5P 6m 7M\", \"balinese\"],\n [\"1P 2m 3m 4P 5P 6M 7M\", \"neopolitan major\"],\n [\"1P 2M 3M 4P 5P 6m 7M\", \"harmonic major\"],\n [\"1P 2m 3M 4P 5P 6m 7M\", \"double harmonic major\", \"gypsy\"],\n [\"1P 2M 3m 4A 5P 6m 7M\", \"hungarian minor\"],\n [\"1P 2A 3M 4A 5P 6M 7m\", \"hungarian major\"],\n [\"1P 2m 3M 4P 5d 6M 7m\", \"oriental\"],\n [\"1P 2m 3m 3M 4A 5P 7m\", \"flamenco\"],\n [\"1P 2m 3m 4A 5P 6m 7M\", \"todi raga\"],\n [\"1P 2m 3M 4P 5d 6m 7M\", \"persian\"],\n [\"1P 2m 3M 5d 6m 7m 7M\", \"enigmatic\"],\n [\n \"1P 2M 3M 4P 5A 6M 7M\",\n \"major augmented\",\n \"major #5\",\n \"ionian augmented\",\n \"ionian #5\",\n ],\n [\"1P 2A 3M 4A 5P 6M 7M\", \"lydian #9\"],\n\n // 8-note scales\n [\"1P 2m 2M 4P 4A 5P 6m 7M\", \"messiaen's mode #4\"],\n [\"1P 2m 3M 4P 4A 5P 6m 7M\", \"purvi raga\"],\n [\"1P 2m 3m 3M 4P 5P 6m 7m\", \"spanish heptatonic\"],\n [\"1P 2M 3m 3M 4P 5P 6M 7m\", \"bebop minor\"],\n [\"1P 2M 3M 4P 5P 5A 6M 7M\", \"bebop major\"],\n [\"1P 2m 3m 4P 5d 5P 6m 7m\", \"bebop locrian\"],\n [\"1P 2M 3m 4P 5P 6m 7m 7M\", \"minor bebop\"],\n [\"1P 2M 3M 4P 5d 5P 6M 7M\", \"ichikosucho\"],\n [\"1P 2M 3m 4P 5P 6m 6M 7M\", \"minor six diminished\"],\n [\n \"1P 2m 3m 3M 4A 5P 6M 7m\",\n \"half-whole diminished\",\n \"dominant diminished\",\n \"messiaen's mode #2\",\n ],\n [\"1P 3m 3M 4P 5P 6M 7m 7M\", \"kafi raga\"],\n [\"1P 2M 3M 4P 4A 5A 6A 7M\", \"messiaen's mode #6\"],\n\n // 9-note scales\n [\"1P 2M 3m 3M 4P 5d 5P 6M 7m\", \"composite blues\"],\n [\"1P 2M 3m 3M 4A 5P 6m 7m 7M\", \"messiaen's mode #3\"],\n\n // 10-note scales\n [\"1P 2m 2M 3m 4P 4A 5P 6m 6M 7M\", \"messiaen's mode #7\"],\n\n // 12-note scales\n [\"1P 2m 2M 3m 3M 4P 5d 5P 6m 6M 7m 7M\", \"chromatic\"],\n];\n\nexport default SCALES;\n", "import { detect } from \"@tonaljs/chord-detect\";\nimport {\n ChordType,\n all as chordTypes,\n get as getChordType,\n} from \"@tonaljs/chord-type\";\nimport { subtract } from \"@tonaljs/interval\";\nimport { isSubsetOf, isSupersetOf } from \"@tonaljs/pcset\";\nimport {\n distance,\n tonicIntervalsTransposer,\n transpose as transposeNote,\n} from \"@tonaljs/pitch-distance\";\nimport { NoteName, note, tokenizeNote } from \"@tonaljs/pitch-note\";\nimport { all as scaleTypes } from \"@tonaljs/scale-type\";\n\nexport { detect } from \"@tonaljs/chord-detect\";\n\ntype ChordNameOrTokens =\n | string // full name to be parsed\n | [string] // only the name\n | [string, string] // tonic, name\n | [string, string, string]; // tonic, name, bass\ntype ChordNameTokens = [string, string, string]; // [TONIC, SCALE TYPE, BASS]\n\nexport interface Chord extends ChordType {\n tonic: string | null;\n type: string;\n root: string;\n bass: string;\n rootDegree: number;\n symbol: string;\n notes: NoteName[];\n}\n\nconst NoChord: Chord = {\n empty: true,\n name: \"\",\n symbol: \"\",\n root: \"\",\n bass: \"\",\n rootDegree: 0,\n type: \"\",\n tonic: null,\n setNum: NaN,\n quality: \"Unknown\",\n chroma: \"\",\n normalized: \"\",\n aliases: [],\n notes: [],\n intervals: [],\n};\n\n// 6, 64, 7, 9, 11 and 13 are consider part of the chord\n// (see https://github.com/danigb/tonal/issues/55)\n//const NUM_TYPES = /^(6|64|7|9|11|13)$/;\n/**\n * Tokenize a chord name. It returns an array with the tonic, chord type and bass\n * If not tonic is found, all the name is considered the chord name.\n *\n * This function does NOT check if the chord type exists or not. It only tries\n * to split the tonic and chord type.\n *\n * This function does NOT check if the bass is part of the chord or not but it\n * only accepts a pitch class as bass\n *\n * @function\n * @param {string} name - the chord name\n * @return {Array} an array with [tonic, type, bass]\n * @example\n * tokenize(\"Cmaj7\") // => [ \"C\", \"maj7\" ]\n * tokenize(\"C7\") // => [ \"C\", \"7\" ]\n * tokenize(\"mMaj7\") // => [ null, \"mMaj7\" ]\n * tokenize(\"Cnonsense\") // => [ null, \"nonsense\" ]\n */\nexport function tokenize(name: string): ChordNameTokens {\n const [letter, acc, oct, type] = tokenizeNote(name);\n if (letter === \"\") {\n return tokenizeBass(\"\", name);\n } else if (letter === \"A\" && type === \"ug\") {\n return tokenizeBass(\"\", \"aug\");\n } else {\n return tokenizeBass(letter + acc, oct + type);\n }\n}\n\nfunction tokenizeBass(note: string, chord: string): ChordNameTokens {\n const split = chord.split(\"/\");\n if (split.length === 1) {\n return [note, split[0], \"\"];\n }\n const [letter, acc, oct, type] = tokenizeNote(split[1]);\n // Only a pitch class is accepted as bass note\n if (letter !== \"\" && oct === \"\" && type === \"\") {\n return [note, split[0], letter + acc];\n } else {\n return [note, chord, \"\"];\n }\n}\n\n/**\n * Get a Chord from a chord name.\n */\nexport function get(src: ChordNameOrTokens): Chord {\n if (Array.isArray(src)) {\n return getChord(src[1] || \"\", src[0], src[2]);\n } else if (src === \"\") {\n return NoChord;\n } else {\n const [tonic, type, bass] = tokenize(src);\n const chord = getChord(type, tonic, bass);\n return chord.empty ? getChord(src) : chord;\n }\n}\n\n/**\n * Get chord properties\n *\n * @param typeName - the chord type name\n * @param [tonic] - Optional tonic\n * @param [root] - Optional root (requires a tonic)\n */\nexport function getChord(\n typeName: string,\n optionalTonic?: string,\n optionalBass?: string,\n): Chord {\n const type = getChordType(typeName);\n const tonic = note(optionalTonic || \"\");\n const bass = note(optionalBass || \"\");\n\n if (\n type.empty ||\n (optionalTonic && tonic.empty) ||\n (optionalBass && bass.empty)\n ) {\n return NoChord;\n }\n\n const bassInterval = distance(tonic.pc, bass.pc);\n const bassIndex = type.intervals.indexOf(bassInterval);\n const hasRoot = bassIndex >= 0;\n const root = hasRoot ? bass : note(\"\");\n const rootDegree = bassIndex === -1 ? NaN : bassIndex + 1;\n const hasBass = bass.pc && bass.pc !== tonic.pc;\n\n const intervals = Array.from(type.intervals);\n\n if (hasRoot) {\n for (let i = 1; i < rootDegree; i++) {\n const num = intervals[0][0];\n const quality = intervals[0][1];\n const newNum = parseInt(num, 10) + 7;\n intervals.push(`${newNum}${quality}`);\n intervals.shift();\n }\n } else if (hasBass) {\n const ivl = subtract(distance(tonic.pc, bass.pc), \"8P\");\n if (ivl) intervals.unshift(ivl);\n }\n\n const notes = tonic.empty\n ? []\n : intervals.map((i) => transposeNote(tonic.pc, i));\n\n typeName = type.aliases.indexOf(typeName) !== -1 ? typeName : type.aliases[0];\n const symbol = `${tonic.empty ? \"\" : tonic.pc}${typeName}${\n hasRoot && rootDegree > 1 ? \"/\" + root.pc : hasBass ? \"/\" + bass.pc : \"\"\n }`;\n const name = `${optionalTonic ? tonic.pc + \" \" : \"\"}${type.name}${\n hasRoot && rootDegree > 1\n ? \" over \" + root.pc\n : hasBass\n ? \" over \" + bass.pc\n : \"\"\n }`;\n return {\n ...type,\n name,\n symbol,\n tonic: tonic.pc,\n type: type.name,\n root: root.pc,\n bass: hasBass ? bass.pc : \"\",\n intervals,\n rootDegree,\n notes,\n };\n}\n\nexport const chord = get;\n\n/**\n * Transpose a chord name\n *\n * @param {string} chordName - the chord name\n * @return {string} the transposed chord\n *\n * @example\n * transpose('Dm7', 'P4') // => 'Gm7\n */\nexport function transpose(chordName: string, interval: string): string {\n const [tonic, type, bass] = tokenize(chordName);\n if (!tonic) {\n return chordName;\n }\n const tr = transposeNote(bass, interval);\n const slash = tr ? \"/\" + tr : \"\";\n return transposeNote(tonic, interval) + type + slash;\n}\n\n/**\n * Get all scales where the given chord fits\n *\n * @example\n * chordScales('C7b9')\n * // => [\"phrygian dominant\", \"flamenco\", \"spanish heptatonic\", \"half-whole diminished\", \"chromatic\"]\n */\nexport function chordScales(name: string): string[] {\n const s = get(name);\n const isChordIncluded = isSupersetOf(s.chroma);\n return scaleTypes()\n .filter((scale) => isChordIncluded(scale.chroma))\n .map((scale) => scale.name);\n}\n/**\n * Get all chords names that are a superset of the given one\n * (has the same notes and at least one more)\n *\n * @function\n * @example\n * extended(\"CMaj7\")\n * // => [ 'Cmaj#4', 'Cmaj7#9#11', 'Cmaj9', 'CM7add13', 'Cmaj13', 'Cmaj9#11', 'CM13#11', 'CM7b9' ]\n */\nexport function extended(chordName: string): string[] {\n const s = get(chordName);\n const isSuperset = isSupersetOf(s.chroma);\n return chordTypes()\n .filter((chord) => isSuperset(chord.chroma))\n .map((chord) => s.tonic + chord.aliases[0]);\n}\n\n/**\n * Find all chords names that are a subset of the given one\n * (has less notes but all from the given chord)\n *\n * @example\n */\nexport function reduced(chordName: string): string[] {\n const s = get(chordName);\n const isSubset = isSubsetOf(s.chroma);\n return chordTypes()\n .filter((chord) => isSubset(chord.chroma))\n .map((chord) => s.tonic + chord.aliases[0]);\n}\n\n/**\n * Return the chord notes\n */\nexport function notes(chordName: ChordNameOrTokens, tonic?: string): string[] {\n const chord = get(chordName);\n const note = tonic || chord.tonic;\n if (!note || chord.empty) return [];\n return chord.intervals.map((ivl) => transposeNote(note, ivl));\n}\n\n/**\n * Returns a function to get a note name from the scale degree.\n *\n * @example\n * [1, 2, 3, 4].map(Chord.degrees(\"C\")) => [\"C\", \"E\", \"G\", \"C\"]\n * [1, 2, 3, 4].map(Chord.degrees(\"C4\")) => [\"C4\", \"E4\", \"G4\", \"C5\"]\n */\nexport function degrees(chordName: ChordNameOrTokens, tonic?: string) {\n const chord = get(chordName);\n const note = tonic || chord.tonic;\n const transpose = tonicIntervalsTransposer(chord.intervals, note);\n return (degree: number) =>\n degree ? transpose(degree > 0 ? degree - 1 : degree) : \"\";\n}\n\n/**\n * Sames as `degree` but with 0-based index\n */\nexport function steps(chordName: ChordNameOrTokens, tonic?: string) {\n const chord = get(chordName);\n const note = tonic || chord.tonic;\n return tonicIntervalsTransposer(chord.intervals, note);\n}\n\n/** @deprecated */\nexport default {\n getChord,\n get,\n detect,\n chordScales,\n extended,\n reduced,\n tokenize,\n transpose,\n degrees,\n steps,\n notes,\n chord,\n};\n", "// source: https://en.wikipedia.org/wiki/Note_value\nconst DATA: [number, string, string[]][] = [\n [\n 0.125,\n \"dl\",\n [\"large\", \"duplex longa\", \"maxima\", \"octuple\", \"octuple whole\"],\n ],\n [0.25, \"l\", [\"long\", \"longa\"]],\n [0.5, \"d\", [\"double whole\", \"double\", \"breve\"]],\n [1, \"w\", [\"whole\", \"semibreve\"]],\n [2, \"h\", [\"half\", \"minim\"]],\n [4, \"q\", [\"quarter\", \"crotchet\"]],\n [8, \"e\", [\"eighth\", \"quaver\"]],\n [16, \"s\", [\"sixteenth\", \"semiquaver\"]],\n [32, \"t\", [\"thirty-second\", \"demisemiquaver\"]],\n [64, \"sf\", [\"sixty-fourth\", \"hemidemisemiquaver\"]],\n [128, \"h\", [\"hundred twenty-eighth\"]],\n [256, \"th\", [\"two hundred fifty-sixth\"]],\n];\n\nexport default DATA;\n", "import DATA from \"./data\";\n\ntype Fraction = [number, number];\n\nconst VALUES: DurationValue[] = [];\n\nDATA.forEach(([denominator, shorthand, names]) =>\n add(denominator, shorthand, names),\n);\n\nexport interface DurationValue {\n empty: boolean;\n value: number;\n name: string;\n fraction: Fraction;\n shorthand: string;\n dots: string;\n names: string[];\n}\n\nconst NoDuration: DurationValue = {\n empty: true,\n name: \"\",\n value: 0,\n fraction: [0, 0],\n shorthand: \"\",\n dots: \"\",\n names: [],\n};\n\nexport function names(): string[] {\n return VALUES.reduce((names, duration) => {\n duration.names.forEach((name) => names.push(name));\n return names;\n }, [] as string[]);\n}\n\nexport function shorthands(): string[] {\n return VALUES.map((dur) => dur.shorthand);\n}\n\nconst REGEX = /^([^.]+)(\\.*)$/;\n\nexport function get(name: string): DurationValue {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [_, simple, dots] = REGEX.exec(name) || [];\n const base = VALUES.find(\n (dur) => dur.shorthand === simple || dur.names.includes(simple),\n );\n if (!base) {\n return NoDuration;\n }\n\n const fraction = calcDots(base.fraction, dots.length);\n const value = fraction[0] / fraction[1];\n\n return { ...base, name, dots, value, fraction };\n}\n\nexport const value = (name: string) => get(name).value;\nexport const fraction = (name: string) => get(name).fraction;\n\n/** @deprecated */\nexport default { names, shorthands, get, value, fraction };\n\n//// PRIVATE ////\n\nfunction add(denominator: number, shorthand: string, names: string[]) {\n VALUES.push({\n empty: false,\n dots: \"\",\n name: \"\",\n value: 1 / denominator,\n fraction: denominator < 1 ? [1 / denominator, 1] : [1, denominator],\n shorthand,\n names,\n });\n}\n\nfunction calcDots(fraction: Fraction, dots: number): Fraction {\n const pow = Math.pow(2, dots);\n\n let numerator = fraction[0] * pow;\n let denominator = fraction[1] * pow;\n const base = numerator;\n\n // add fractions\n for (let i = 0; i < dots; i++) {\n numerator += base / Math.pow(2, i + 1);\n }\n\n // simplify\n while (numerator % 2 === 0 && denominator % 2 === 0) {\n numerator /= 2;\n denominator /= 2;\n }\n return [numerator, denominator];\n}\n", "import { NoteName, note as props } from \"@tonaljs/pitch-note\";\n\ntype Midi = number;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isMidi(arg: any): arg is Midi {\n return +arg >= 0 && +arg <= 127;\n}\n\n/**\n * Get the note midi number (a number between 0 and 127)\n *\n * It returns undefined if not valid note name\n *\n * @function\n * @param {string|number} note - the note name or midi number\n * @return {Integer} the midi number or undefined if not valid note\n * @example\n * import { toMidi } from '@tonaljs/midi'\n * toMidi(\"C4\") // => 60\n * toMidi(60) // => 60\n * toMidi('60') // => 60\n */\nexport function toMidi(note: NoteName | number): number | null {\n if (isMidi(note)) {\n return +note;\n }\n const n = props(note);\n return n.empty ? null : n.midi;\n}\n\n/**\n * Get the frequency in hertzs from midi number\n *\n * @param {number} midi - the note midi number\n * @param {number} [tuning = 440] - A4 tuning frequency in Hz (440 by default)\n * @return {number} the frequency or null if not valid note midi\n * @example\n * import { midiToFreq} from '@tonaljs/midi'\n * midiToFreq(69) // => 440\n */\nexport function midiToFreq(midi: number, tuning = 440): number {\n return Math.pow(2, (midi - 69) / 12) * tuning;\n}\n\nconst L2 = Math.log(2);\nconst L440 = Math.log(440);\n\n/**\n * Get the midi number from a frequency in hertz. The midi number can\n * contain decimals (with two digits precision)\n *\n * @param {number} frequency\n * @return {number}\n * @example\n * import { freqToMidi} from '@tonaljs/midi'\n * freqToMidi(220)); //=> 57\n * freqToMidi(261.62)); //=> 60\n * freqToMidi(261)); //=> 59.96\n */\nexport function freqToMidi(freq: number): number {\n const v = (12 * (Math.log(freq) - L440)) / L2 + 69;\n return Math.round(v * 100) / 100;\n}\n\nexport interface ToNoteNameOptions {\n pitchClass?: boolean;\n sharps?: boolean;\n}\n\nconst SHARPS = \"C C# D D# E F F# G G# A A# B\".split(\" \");\nconst FLATS = \"C Db D Eb E F Gb G Ab A Bb B\".split(\" \");\n/**\n * Given a midi number, returns a note name. The altered notes will have\n * flats unless explicitly set with the optional `useSharps` parameter.\n *\n * @function\n * @param {number} midi - the midi note number\n * @param {Object} options = default: `{ sharps: false, pitchClass: false }`\n * @param {boolean} useSharps - (Optional) set to true to use sharps instead of flats\n * @return {string} the note name\n * @example\n * import { midiToNoteName } from '@tonaljs/midi'\n * midiToNoteName(61) // => \"Db4\"\n * midiToNoteName(61, { pitchClass: true }) // => \"Db\"\n * midiToNoteName(61, { sharps: true }) // => \"C#4\"\n * midiToNoteName(61, { pitchClass: true, sharps: true }) // => \"C#\"\n * // it rounds to nearest note\n * midiToNoteName(61.7) // => \"D4\"\n */\nexport function midiToNoteName(midi: number, options: ToNoteNameOptions = {}) {\n if (isNaN(midi) || midi === -Infinity || midi === Infinity) return \"\";\n midi = Math.round(midi);\n const pcs = options.sharps === true ? SHARPS : FLATS;\n const pc = pcs[midi % 12];\n if (options.pitchClass) {\n return pc;\n }\n const o = Math.floor(midi / 12) - 1;\n return pc + o;\n}\n\nexport function chroma(midi: number): number {\n return midi % 12;\n}\n\nfunction pcsetFromChroma(chroma: string): number[] {\n return chroma.split(\"\").reduce((pcset, val, index) => {\n if (index < 12 && val === \"1\") pcset.push(index);\n return pcset;\n }, [] as number[]);\n}\n\nfunction pcsetFromMidi(midi: number[]): number[] {\n return midi\n .map(chroma)\n .sort((a, b) => a - b)\n .filter((n, i, a) => i === 0 || n !== a[i - 1]);\n}\n\n/**\n * Given a list of midi numbers, returns the pitch class set (unique chroma numbers)\n * @param midi\n * @example\n *\n */\nexport function pcset(notes: number[] | string): number[] {\n return Array.isArray(notes) ? pcsetFromMidi(notes) : pcsetFromChroma(notes);\n}\n\nexport function pcsetNearest(notes: number[] | string) {\n const set = pcset(notes);\n return (midi: number): number | undefined => {\n const ch = chroma(midi);\n for (let i = 0; i < 12; i++) {\n if (set.includes(ch + i)) return midi + i;\n if (set.includes(ch - i)) return midi - i;\n }\n return undefined;\n };\n}\n\nexport function pcsetSteps(notes: number[] | string, tonic: number) {\n const set = pcset(notes);\n const len = set.length;\n return (step: number): number => {\n const index = step < 0 ? (len - (-step % len)) % len : step % len;\n const octaves = Math.floor(step / len);\n return set[index] + octaves * 12 + tonic;\n };\n}\n\nexport function pcsetDegrees(notes: number[] | string, tonic: number) {\n const steps = pcsetSteps(notes, tonic);\n return (degree: number): number | undefined => {\n if (degree === 0) return undefined;\n return steps(degree > 0 ? degree - 1 : degree);\n };\n}\n\n/** @deprecated */\nexport default {\n chroma,\n freqToMidi,\n isMidi,\n midiToFreq,\n midiToNoteName,\n pcsetNearest,\n pcset,\n pcsetDegrees,\n pcsetSteps,\n toMidi,\n};\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { freqToMidi, midiToNoteName } from \"@tonaljs/midi\";\nimport { Pitch } from \"@tonaljs/pitch\";\nimport { distance as _dist, transpose as _tr } from \"@tonaljs/pitch-distance\";\nimport { IntervalName } from \"@tonaljs/pitch-interval\";\nimport {\n Note,\n NoteLiteral,\n NoteName,\n note as props,\n} from \"@tonaljs/pitch-note\";\n\nconst NAMES = [\"C\", \"D\", \"E\", \"F\", \"G\", \"A\", \"B\"];\n\nconst toName = (n: Note) => n.name;\nconst onlyNotes = (array: any[]) =>\n array.map(props).filter((n) => !n.empty) as Note[];\n\n/**\n * Return the natural note names without octave\n * @function\n * @example\n * Note.names(); // => [\"C\", \"D\", \"E\", \"F\", \"G\", \"A\", \"B\"]\n */\nexport function names(array?: any[]): string[] {\n if (array === undefined) {\n return NAMES.slice();\n } else if (!Array.isArray(array)) {\n return [];\n } else {\n return onlyNotes(array).map(toName);\n }\n}\n\n/**\n * Get a note from a note name\n *\n * @function\n * @example\n * Note.get('Bb4') // => { name: \"Bb4\", midi: 70, chroma: 10, ... }\n */\nexport const get = props;\n\n/**\n * Get the note name\n * @function\n */\nexport const name = (note: NoteLiteral) => get(note).name;\n\n/**\n * Get the note pitch class name\n * @function\n */\nexport const pitchClass = (note: NoteLiteral) => get(note).pc;\n\n/**\n * Get the note accidentals\n * @function\n */\nexport const accidentals = (note: NoteLiteral) => get(note).acc;\n\n/**\n * Get the note octave\n * @function\n */\nexport const octave = (note: NoteLiteral) => get(note).oct;\n\n/**\n * Get the note midi\n * @function\n */\nexport const midi = (note: NoteLiteral) => get(note).midi;\n\n/**\n * Get the note midi\n * @function\n */\nexport const freq = (note: NoteLiteral) => get(note).freq;\n\n/**\n * Get the note chroma\n * @function\n */\nexport const chroma = (note: NoteLiteral) => get(note).chroma;\n\n/**\n * Given a midi number, returns a note name. Uses flats for altered notes.\n *\n * @function\n * @param {number} midi - the midi note number\n * @return {string} the note name\n * @example\n * Note.fromMidi(61) // => \"Db4\"\n * Note.fromMidi(61.7) // => \"D4\"\n */\nexport function fromMidi(midi: number) {\n return midiToNoteName(midi);\n}\n\n/**\n * Given a midi number, returns a note name. Uses flats for altered notes.\n */\nexport function fromFreq(freq: number) {\n return midiToNoteName(freqToMidi(freq));\n}\n/**\n * Given a midi number, returns a note name. Uses flats for altered notes.\n */\nexport function fromFreqSharps(freq: number) {\n return midiToNoteName(freqToMidi(freq), { sharps: true });\n}\n\n/**\n * Given a midi number, returns a note name. Uses flats for altered notes.\n *\n * @function\n * @param {number} midi - the midi note number\n * @return {string} the note name\n * @example\n * Note.fromMidiSharps(61) // => \"C#4\"\n */\n\nexport function fromMidiSharps(midi: number) {\n return midiToNoteName(midi, { sharps: true });\n}\n\nexport const distance = _dist;\n\n/**\n * Transpose a note by an interval\n */\nexport const transpose = _tr;\nexport const tr = _tr;\n\n/**\n * Transpose by an interval.\n * @function\n * @param {string} interval\n * @return {function} a function that transposes by the given interval\n * @example\n * [\"C\", \"D\", \"E\"].map(Note.transposeBy(\"5P\"));\n * // => [\"G\", \"A\", \"B\"]\n */\nexport const transposeBy = (interval: IntervalName) => (note: NoteName) =>\n transpose(note, interval);\nexport const trBy = transposeBy;\n\n/**\n * Transpose from a note\n * @function\n * @param {string} note\n * @return {function} a function that transposes the the note by an interval\n * [\"1P\", \"3M\", \"5P\"].map(Note.transposeFrom(\"C\"));\n * // => [\"C\", \"E\", \"G\"]\n */\nexport const transposeFrom = (note: NoteName) => (interval: IntervalName) =>\n transpose(note, interval);\nexport const trFrom = transposeFrom;\n\n/**\n * Transpose a note by a number of perfect fifths.\n *\n * @function\n * @param {string} note - the note name\n * @param {number} fifhts - the number of fifths\n * @return {string} the transposed note name\n *\n * @example\n * import { transposeFifths } from \"@tonaljs/note\"\n * transposeFifths(\"G4\", 1) // => \"D\"\n * [0, 1, 2, 3, 4].map(fifths => transposeFifths(\"C\", fifths)) // => [\"C\", \"G\", \"D\", \"A\", \"E\"]\n */\nexport function transposeFifths(noteName: NoteName, fifths: number): NoteName {\n return transpose(noteName, [fifths, 0]);\n}\nexport const trFifths = transposeFifths;\n\n// TODO: documentation\nexport function transposeOctaves(\n noteName: NoteName,\n octaves: number,\n): NoteName {\n return transpose(noteName, [0, octaves]);\n}\n\nexport type NoteComparator = (a: Note, b: Note) => number;\n\nexport const ascending: NoteComparator = (a, b) => a.height - b.height;\nexport const descending: NoteComparator = (a, b) => b.height - a.height;\n\nexport function sortedNames(\n notes: any[],\n comparator?: NoteComparator,\n): string[] {\n comparator = comparator || ascending;\n return onlyNotes(notes).sort(comparator).map(toName);\n}\n\nexport function sortedUniqNames(notes: any[]): string[] {\n return sortedNames(notes, ascending).filter(\n (n, i, a) => i === 0 || n !== a[i - 1],\n );\n}\n\n/**\n * Simplify a note\n *\n * @function\n * @param {string} note - the note to be simplified\n * - sameAccType: default true. Use same kind of accidentals that source\n * @return {string} the simplified note or '' if not valid note\n * @example\n * simplify(\"C##\") // => \"D\"\n * simplify(\"C###\") // => \"D#\"\n * simplify(\"C###\")\n * simplify(\"B#4\") // => \"C5\"\n */\nexport const simplify = (noteName: NoteName | Pitch): string => {\n const note = get(noteName);\n if (note.empty) {\n return \"\";\n }\n return midiToNoteName(note.midi || note.chroma, {\n sharps: note.alt > 0,\n pitchClass: note.midi === null,\n });\n};\n/**\n * Get enharmonic of a note\n *\n * @function\n * @param {string} note\n * @param [string] - [optional] Destination pitch class\n * @return {string} the enharmonic note name or '' if not valid note\n * @example\n * Note.enharmonic(\"Db\") // => \"C#\"\n * Note.enharmonic(\"C\") // => \"C\"\n * Note.enharmonic(\"F2\",\"E#\") // => \"E#2\"\n * Note.eharmoinic(\"C##b\"); // => \"\"\n */\nexport function enharmonic(noteName: string, destName?: string) {\n const src = get(noteName);\n if (src.empty) {\n return \"\";\n }\n\n // destination: use given or generate one\n const dest = get(\n destName ||\n midiToNoteName(src.midi || src.chroma, {\n sharps: src.alt < 0,\n pitchClass: true,\n }),\n );\n\n // ensure destination is valid\n if (dest.empty || dest.chroma !== src.chroma) {\n return \"\";\n }\n\n // if src has no octave, no need to calculate anything else\n if (src.oct === undefined) {\n return dest.pc;\n }\n\n // detect any octave overflow\n const srcChroma = src.chroma - src.alt;\n const destChroma = dest.chroma - dest.alt;\n const destOctOffset =\n srcChroma > 11 || destChroma < 0\n ? -1\n : srcChroma < 0 || destChroma > 11\n ? +1\n : 0;\n // calculate the new octave\n const destOct = src.oct + destOctOffset;\n return dest.pc + destOct;\n}\n\n/** @deprecated */\nexport default {\n names,\n get,\n name,\n pitchClass,\n accidentals,\n octave,\n midi,\n ascending,\n descending,\n distance,\n sortedNames,\n sortedUniqNames,\n fromMidi,\n fromMidiSharps,\n freq,\n fromFreq,\n fromFreqSharps,\n chroma,\n transpose,\n tr,\n transposeBy,\n trBy,\n transposeFrom,\n trFrom,\n transposeFifths,\n transposeOctaves,\n trFifths,\n simplify,\n enharmonic,\n};\n", "import { isNamedPitch, isPitch, Pitch } from \"@tonaljs/pitch\";\nimport { interval } from \"@tonaljs/pitch-interval\";\nimport { accToAlt, altToAcc } from \"@tonaljs/pitch-note\";\n\nexport interface RomanNumeral extends Pitch {\n readonly name: string;\n readonly empty: boolean;\n readonly roman: string;\n readonly interval: string;\n readonly acc: string;\n readonly chordType: string;\n readonly major: boolean;\n readonly dir: 1;\n}\n\nexport interface NoRomanNumeral extends Partial {\n readonly empty: true;\n readonly name: \"\";\n readonly chordType: \"\";\n}\nconst NoRomanNumeral: NoRomanNumeral = { empty: true, name: \"\", chordType: \"\" };\n\nconst cache: Record = {};\n\n/**\n * Get properties of a roman numeral string\n *\n * @function\n * @param {string} - the roman numeral string (can have type, like: Imaj7)\n * @return {Object} - the roman numeral properties\n * @param {string} name - the roman numeral (tonic)\n * @param {string} type - the chord type\n * @param {string} num - the number (1 = I, 2 = II...)\n * @param {boolean} major - major or not\n *\n * @example\n * romanNumeral(\"VIIb5\") // => { name: \"VII\", type: \"b5\", num: 7, major: true }\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function get(src: any): RomanNumeral | NoRomanNumeral {\n return typeof src === \"string\"\n ? cache[src] || (cache[src] = parse(src))\n : typeof src === \"number\"\n ? get(NAMES[src] || \"\")\n : isPitch(src)\n ? fromPitch(src)\n : isNamedPitch(src)\n ? get(src.name)\n : NoRomanNumeral;\n}\n\n/**\n * @deprecated\n * @use RomanNumeral.get\n */\nexport const romanNumeral = get;\n\n/**\n * Get roman numeral names\n *\n * @function\n * @param {boolean} [isMajor=true]\n * @return {Array}\n *\n * @example\n * names() // => [\"I\", \"II\", \"III\", \"IV\", \"V\", \"VI\", \"VII\"]\n */\nexport function names(major = true) {\n return (major ? NAMES : NAMES_MINOR).slice();\n}\n\nfunction fromPitch(pitch: Pitch): RomanNumeral | NoRomanNumeral {\n return get(altToAcc(pitch.alt) + NAMES[pitch.step]);\n}\n\nconst REGEX =\n /^(#{1,}|b{1,}|x{1,}|)(IV|I{1,3}|VI{0,2}|iv|i{1,3}|vi{0,2})([^IViv]*)$/;\n\n// [name, accidentals, romanNumeral, chordType]\ntype RomanNumeralTokens = [string, string, string, string];\nexport function tokenize(str: string): RomanNumeralTokens {\n return (REGEX.exec(str) || [\"\", \"\", \"\", \"\"]) as RomanNumeralTokens;\n}\n\nconst ROMANS = \"I II III IV V VI VII\";\nconst NAMES = ROMANS.split(\" \");\nconst NAMES_MINOR = ROMANS.toLowerCase().split(\" \");\n\nfunction parse(src: string): RomanNumeral | NoRomanNumeral {\n const [name, acc, roman, chordType] = tokenize(src);\n if (!roman) {\n return NoRomanNumeral;\n }\n\n const upperRoman = roman.toUpperCase();\n const step = NAMES.indexOf(upperRoman);\n const alt = accToAlt(acc);\n const dir = 1;\n return {\n empty: false,\n name,\n roman,\n interval: interval({ step, alt, dir }).name,\n acc,\n chordType,\n alt,\n step,\n major: roman === upperRoman,\n oct: 0,\n dir,\n };\n}\n\n/** @deprecated */\nexport default {\n names,\n get,\n // deprecated\n romanNumeral,\n};\n", "import { transpose, transposeFifths } from \"@tonaljs/note\";\nimport { accToAlt, altToAcc, note } from \"@tonaljs/pitch-note\";\nimport { get as roman } from \"@tonaljs/roman-numeral\";\n\nconst Empty: readonly string[] = Object.freeze([] as string[]);\n\nexport interface Key {\n readonly type: \"major\" | \"minor\";\n readonly tonic: string;\n readonly alteration: number;\n readonly keySignature: string;\n}\n\nconst NoKey: Key = {\n type: \"major\",\n tonic: \"\",\n alteration: 0,\n keySignature: \"\",\n};\n\nexport interface KeyScale {\n readonly tonic: string;\n readonly grades: readonly string[];\n readonly intervals: readonly string[];\n readonly scale: readonly string[];\n readonly triads: readonly string[];\n readonly chords: readonly string[];\n readonly chordsHarmonicFunction: readonly string[];\n readonly chordScales: readonly string[];\n}\n\nconst NoKeyScale: KeyScale = {\n tonic: \"\",\n grades: Empty,\n intervals: Empty,\n scale: Empty,\n triads: Empty,\n chords: Empty,\n chordsHarmonicFunction: Empty,\n chordScales: Empty,\n};\n\nexport interface MajorKey extends Key, KeyScale {\n readonly type: \"major\";\n readonly minorRelative: string;\n readonly scale: readonly string[];\n readonly secondaryDominants: readonly string[];\n readonly secondaryDominantsMinorRelative: readonly string[];\n readonly substituteDominants: readonly string[];\n readonly substituteDominantsMinorRelative: readonly string[];\n}\n\nconst NoMajorKey: MajorKey = {\n ...NoKey,\n ...NoKeyScale,\n type: \"major\",\n minorRelative: \"\",\n scale: Empty,\n secondaryDominants: Empty,\n secondaryDominantsMinorRelative: Empty,\n substituteDominants: Empty,\n substituteDominantsMinorRelative: Empty,\n};\n\nexport interface MinorKey extends Key {\n readonly type: \"minor\";\n readonly relativeMajor: string;\n readonly natural: KeyScale;\n readonly harmonic: KeyScale;\n readonly melodic: KeyScale;\n}\n\nconst NoMinorKey: MinorKey = {\n ...NoKey,\n type: \"minor\",\n relativeMajor: \"\",\n natural: NoKeyScale,\n harmonic: NoKeyScale,\n melodic: NoKeyScale,\n};\n\nconst mapScaleToType = (scale: string[], list: string[], sep = \"\") =>\n list.map((type, i) => `${scale[i]}${sep}${type}`);\n\nfunction keyScale(\n grades: string[],\n triads: string[],\n chords: string[],\n harmonicFunctions: string[],\n chordScales: string[],\n) {\n return (tonic: string): KeyScale => {\n const intervals = grades.map((gr) => roman(gr).interval || \"\");\n const scale = intervals.map((interval) => transpose(tonic, interval));\n\n return {\n tonic,\n grades,\n intervals,\n scale,\n triads: mapScaleToType(scale, triads),\n chords: mapScaleToType(scale, chords),\n chordsHarmonicFunction: harmonicFunctions.slice(),\n chordScales: mapScaleToType(scale, chordScales, \" \"),\n };\n };\n}\n\nconst distInFifths = (from: string, to: string) => {\n const f = note(from);\n const t = note(to);\n return f.empty || t.empty ? 0 : t.coord[0] - f.coord[0];\n};\n\nconst MajorScale = keyScale(\n \"I II III IV V VI VII\".split(\" \"),\n \" m m m dim\".split(\" \"),\n \"maj7 m7 m7 maj7 7 m7 m7b5\".split(\" \"),\n \"T SD T SD D T D\".split(\" \"),\n \"major,dorian,phrygian,lydian,mixolydian,minor,locrian\".split(\",\"),\n);\nconst NaturalScale = keyScale(\n \"I II bIII IV V bVI bVII\".split(\" \"),\n \"m dim m m \".split(\" \"),\n \"m7 m7b5 maj7 m7 m7 maj7 7\".split(\" \"),\n \"T SD T SD D SD SD\".split(\" \"),\n \"minor,locrian,major,dorian,phrygian,lydian,mixolydian\".split(\",\"),\n);\nconst HarmonicScale = keyScale(\n \"I II bIII IV V bVI VII\".split(\" \"),\n \"m dim aug m dim\".split(\" \"),\n \"mMaj7 m7b5 +maj7 m7 7 maj7 o7\".split(\" \"),\n \"T SD T SD D SD D\".split(\" \"),\n \"harmonic minor,locrian 6,major augmented,lydian diminished,phrygian dominant,lydian #9,ultralocrian\".split(\n \",\",\n ),\n);\nconst MelodicScale = keyScale(\n \"I II bIII IV V VI VII\".split(\" \"),\n \"m m aug dim dim\".split(\" \"),\n \"m6 m7 +maj7 7 7 m7b5 m7b5\".split(\" \"),\n \"T SD T SD D \".split(\" \"),\n \"melodic minor,dorian b2,lydian augmented,lydian dominant,mixolydian b6,locrian #2,altered\".split(\n \",\",\n ),\n);\n\n/**\n * Get a major key properties in a given tonic\n * @param tonic\n */\nexport function majorKey(tonic: string): MajorKey {\n const pc = note(tonic).pc;\n if (!pc) return NoMajorKey;\n\n const keyScale = MajorScale(pc);\n const alteration = distInFifths(\"C\", pc);\n const romanInTonic = (src: string) => {\n const r = roman(src);\n if (r.empty) return \"\";\n\n return transpose(tonic, r.interval) + r.chordType;\n };\n\n return {\n ...keyScale,\n type: \"major\",\n minorRelative: transpose(pc, \"-3m\"),\n alteration,\n keySignature: altToAcc(alteration),\n secondaryDominants: \"- VI7 VII7 I7 II7 III7 -\".split(\" \").map(romanInTonic),\n secondaryDominantsMinorRelative: \"- IIIm7b5 IV#m7 Vm7 VIm7 VIIm7b5 -\"\n .split(\" \")\n .map(romanInTonic),\n substituteDominants: \"- bIII7 IV7 bV7 bVI7 bVII7 -\"\n .split(\" \")\n .map(romanInTonic),\n substituteDominantsMinorRelative: \"- IIIm7 Im7 IIbm7 VIm7 IVm7 -\"\n .split(\" \")\n .map(romanInTonic),\n };\n}\n\n/**\n * Get minor key properties in a given tonic\n * @param tonic\n */\nexport function minorKey(tnc: string): MinorKey {\n const pc = note(tnc).pc;\n if (!pc) return NoMinorKey;\n\n const alteration = distInFifths(\"C\", pc) - 3;\n return {\n type: \"minor\",\n tonic: pc,\n relativeMajor: transpose(pc, \"3m\"),\n alteration,\n keySignature: altToAcc(alteration),\n natural: NaturalScale(pc),\n harmonic: HarmonicScale(pc),\n melodic: MelodicScale(pc),\n };\n}\n\n/**\n * Given a key signature, returns the tonic of the major key\n * @param sigature\n * @example\n * majorTonicFromKeySignature('###') // => 'A'\n */\nexport function majorTonicFromKeySignature(\n sig: string | number,\n): string | null {\n if (typeof sig === \"number\") {\n return transposeFifths(\"C\", sig);\n } else if (typeof sig === \"string\" && /^b+|#+$/.test(sig)) {\n return transposeFifths(\"C\", accToAlt(sig));\n }\n return null;\n}\n\n/** @deprecated */\nexport default { majorKey, majorTonicFromKeySignature, minorKey };\n", "import { rotate } from \"@tonaljs/collection\";\nimport { simplify, transposeFifths } from \"@tonaljs/interval\";\nimport { EmptyPcset, Pcset } from \"@tonaljs/pcset\";\nimport { transpose } from \"@tonaljs/pitch-distance\";\nimport { NoteName } from \"@tonaljs/pitch-note\";\nimport { get as getType } from \"@tonaljs/scale-type\";\n\nconst MODES = [\n [0, 2773, 0, \"ionian\", \"\", \"Maj7\", \"major\"],\n [1, 2902, 2, \"dorian\", \"m\", \"m7\"],\n [2, 3418, 4, \"phrygian\", \"m\", \"m7\"],\n [3, 2741, -1, \"lydian\", \"\", \"Maj7\"],\n [4, 2774, 1, \"mixolydian\", \"\", \"7\"],\n [5, 2906, 3, \"aeolian\", \"m\", \"m7\", \"minor\"],\n [6, 3434, 5, \"locrian\", \"dim\", \"m7b5\"],\n] as const;\n\ntype ModeDatum = (typeof MODES)[number];\n\nexport interface Mode extends Pcset {\n readonly name: string;\n readonly modeNum: number;\n readonly alt: number; // number of alterations === number of fiths\n readonly triad: string;\n readonly seventh: string;\n readonly aliases: string[];\n}\n\nconst NoMode: Mode = {\n ...EmptyPcset,\n name: \"\",\n alt: 0,\n modeNum: NaN,\n triad: \"\",\n seventh: \"\",\n aliases: [],\n};\n\nconst modes: Mode[] = MODES.map(toMode);\nconst index: Record = {};\nmodes.forEach((mode) => {\n index[mode.name] = mode;\n mode.aliases.forEach((alias) => {\n index[alias] = mode;\n });\n});\n\ntype ModeLiteral = string | { name: string };\n\n/**\n * Get a Mode by it's name\n *\n * @example\n * get('dorian')\n * // =>\n * // {\n * // intervals: [ '1P', '2M', '3m', '4P', '5P', '6M', '7m' ],\n * // modeNum: 1,\n * // chroma: '101101010110',\n * // normalized: '101101010110',\n * // name: 'dorian',\n * // setNum: 2902,\n * // alt: 2,\n * // triad: 'm',\n * // seventh: 'm7',\n * // aliases: []\n * // }\n */\nexport function get(name: ModeLiteral): Mode {\n return typeof name === \"string\"\n ? index[name.toLowerCase()] || NoMode\n : name && name.name\n ? get(name.name)\n : NoMode;\n}\n\n/** @deprecated */\nexport const mode = get;\n\n/**\n * Get a list of all modes\n */\nexport function all() {\n return modes.slice();\n}\n\n/** @deprecated */\nexport const entries = all;\n\n/**\n * Get a list of all mode names\n */\nexport function names() {\n return modes.map((mode) => mode.name);\n}\n\nfunction toMode(mode: ModeDatum): Mode {\n const [modeNum, setNum, alt, name, triad, seventh, alias] = mode;\n const aliases = alias ? [alias] : [];\n const chroma = Number(setNum).toString(2);\n const intervals = getType(name).intervals;\n return {\n empty: false,\n intervals,\n modeNum,\n chroma,\n normalized: chroma,\n name,\n setNum,\n alt,\n triad,\n seventh,\n aliases,\n };\n}\n\nexport function notes(modeName: ModeLiteral, tonic: NoteName) {\n return get(modeName).intervals.map((ivl) => transpose(tonic, ivl));\n}\n\nfunction chords(chords: string[]) {\n return (modeName: ModeLiteral, tonic: NoteName) => {\n const mode = get(modeName);\n if (mode.empty) return [];\n const triads = rotate(mode.modeNum, chords);\n const tonics = mode.intervals.map((i) => transpose(tonic, i));\n return triads.map((triad, i) => tonics[i] + triad);\n };\n}\n\nexport const triads = chords(MODES.map((x) => x[4]));\nexport const seventhChords = chords(MODES.map((x) => x[5]));\n\nexport function distance(destination: ModeLiteral, source: ModeLiteral) {\n const from = get(source);\n const to = get(destination);\n if (from.empty || to.empty) return \"\";\n return simplify(transposeFifths(\"1P\", to.alt - from.alt));\n}\n\nexport function relativeTonic(\n destination: ModeLiteral,\n source: ModeLiteral,\n tonic: NoteName,\n) {\n return transpose(tonic, distance(destination, source));\n}\n\n/** @deprecated */\nexport default {\n get,\n names,\n all,\n distance,\n relativeTonic,\n notes,\n triads,\n seventhChords,\n // deprecated\n entries,\n mode,\n};\n", "import { tokenize } from \"@tonaljs/chord\";\nimport { distance, transpose } from \"@tonaljs/pitch-distance\";\nimport { interval } from \"@tonaljs/pitch-interval\";\nimport { NoteLiteral } from \"@tonaljs/pitch-note\";\nimport { get as romanNumeral } from \"@tonaljs/roman-numeral\";\n\n/**\n * Given a tonic and a chord list expressed with roman numeral notation\n * returns the progression expressed with leadsheet chords symbols notation\n * @example\n * fromRomanNumerals(\"C\", [\"I\", \"IIm7\", \"V7\"]);\n * // => [\"C\", \"Dm7\", \"G7\"]\n */\nexport function fromRomanNumerals(\n tonic: NoteLiteral,\n chords: string[],\n): string[] {\n const romanNumerals = chords.map(romanNumeral);\n return romanNumerals.map(\n (rn) => transpose(tonic, interval(rn)) + rn.chordType,\n );\n}\n\n/**\n * Given a tonic and a chord list with leadsheet symbols notation,\n * return the chord list with roman numeral notation\n * @example\n * toRomanNumerals(\"C\", [\"CMaj7\", \"Dm7\", \"G7\"]);\n * // => [\"IMaj7\", \"IIm7\", \"V7\"]\n */\nexport function toRomanNumerals(\n tonic: NoteLiteral,\n chords: string[],\n): string[] {\n return chords.map((chord) => {\n const [note, chordType] = tokenize(chord);\n const intervalName = distance(tonic, note);\n const roman = romanNumeral(interval(intervalName));\n return roman.name + chordType;\n });\n}\n\n/** @deprecated */\nexport default { fromRomanNumerals, toRomanNumerals };\n", "import { compact, range } from \"@tonaljs/collection\";\nimport { midiToNoteName, toMidi, ToNoteNameOptions } from \"@tonaljs/midi\";\n\n/**\n * Create a numeric range. You supply a list of notes or numbers and it will\n * be connected to create complex ranges.\n *\n * @param {Array} notes - the list of notes or midi numbers used\n * @return {Array} an array of numbers or empty array if not valid parameters\n *\n * @example\n * numeric([\"C5\", \"C4\"]) // => [ 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60 ]\n * // it works midi notes\n * numeric([10, 5]) // => [ 10, 9, 8, 7, 6, 5 ]\n * // complex range\n * numeric([\"C4\", \"E4\", \"Bb3\"]) // => [60, 61, 62, 63, 64, 63, 62, 61, 60, 59, 58]\n */\nexport function numeric(notes: (string | number)[]): number[] {\n const midi: number[] = compact(\n notes.map((note) => (typeof note === \"number\" ? note : toMidi(note))),\n );\n if (!notes.length || midi.length !== notes.length) {\n // there is no valid notes\n return [];\n }\n\n return midi.reduce(\n (result, note) => {\n const last: number = result[result.length - 1];\n return result.concat(range(last, note).slice(1));\n },\n [midi[0]],\n );\n}\n\n/**\n * Create a range of chromatic notes. The altered notes will use flats.\n *\n * @function\n * @param {Array} notes - the list of notes or midi note numbers to create a range from\n * @param {Object} options - The same as `midiToNoteName` (`{ sharps: boolean, pitchClass: boolean }`)\n * @return {Array} an array of note names\n *\n * @example\n * Range.chromatic([\"C2, \"E2\", \"D2\"]) // => [\"C2\", \"Db2\", \"D2\", \"Eb2\", \"E2\", \"Eb2\", \"D2\"]\n * // with sharps\n * Range.chromatic([\"C2\", \"C3\"], { sharps: true }) // => [ \"C2\", \"C#2\", \"D2\", \"D#2\", \"E2\", \"F2\", \"F#2\", \"G2\", \"G#2\", \"A2\", \"A#2\", \"B2\", \"C3\" ]\n */\nexport function chromatic(\n notes: (string | number)[],\n options?: ToNoteNameOptions,\n): string[] {\n return numeric(notes).map((midi) => midiToNoteName(midi, options));\n}\n\n/** @deprecated */\nexport default { numeric, chromatic };\n", "type RhythmPatternValue = 0 | 1;\n\nexport type RhythmPattern = Array;\n\n/**\n * Create a rhythm pattern from a number or concatenation of numbers in binary form\n * @param numbers one or more number\n * @returns an array of 0s and 1s representing the rhythm pattern\n * @example\n * binary(13) // => [1, 1, 0, 1]\n * binary(12, 13) // => [1, 1, 0, 0, 1, 1, 0, 1]\n */\nexport function binary(...numbers: number[]): RhythmPattern {\n return numbers.reduce((pattern, number) => {\n number\n .toString(2)\n .split(\"\")\n .forEach((digit: string) => {\n pattern.push(parseInt(digit) as RhythmPatternValue);\n });\n return pattern;\n }, [] as RhythmPattern);\n}\n\n/**\n * Create a rhythmic pattern using an hexadecimal numbers\n * @param hexNumber string with the hexadecimal number\n * @returns an array of 0s and 1s representing the rhythm pattern\n * @example\n * R.hex(\"8f\"); // => [1, 0, 0, 0, 1, 1, 1, 1]\n */\nexport function hex(hexNumber: string): RhythmPattern {\n const pattern: RhythmPattern = [];\n for (let i = 0; i < hexNumber.length; i++) {\n const digit = parseInt(\"0x\" + hexNumber[i]);\n const binary = isNaN(digit) ? \"0000\" : digit.toString(2).padStart(4, \"0\");\n binary.split(\"\").forEach((digit: string) => {\n pattern.push(digit === \"1\" ? 1 : 0);\n });\n }\n return pattern;\n}\n\n/**\n * Create a rhythm pattern from the onsets\n * @param numbers the onsets sizes\n * @returns an array of 0s and 1s representing the rhythm pattern\n * @example\n * onsets(1, 2, 2, 1) // => [1, 0, 1, 0, 0, 1, 0, 0, 1, 0]\n */\nexport function onsets(...numbers: number[]): RhythmPattern {\n return numbers.reduce((pattern, number) => {\n pattern.push(1);\n for (let i = 0; i < number; i++) {\n pattern.push(0);\n }\n return pattern;\n }, [] as RhythmPattern);\n}\n\n/**\n * Create a random rhythm pattern with a specified length\n * @param length length of the pattern\n * @param probability Threshold where random number is considered a beat (defaults to 0.5)\n * @param rnd A random function (Math.random by default)\n * @returns an array of 0s and 1s representing the rhythm pattern\n * @example\n * random(4) // => [1, 0, 0, 1]\n */\nexport function random(\n length: number,\n probability = 0.5,\n rnd: () => number = Math.random,\n): RhythmPattern {\n const pattern: RhythmPattern = [];\n for (let i = 0; i < length; i++) {\n pattern.push(rnd() >= probability ? 1 : 0);\n }\n return pattern;\n}\n\n/**\n * Create a rhythm pattern based on the given probability thresholds\n * @param probabilities An array with the probability of each step to be a beat\n * @param rnd A random function (Math.random by default)\n * @returns an array of 0s and 1s representing the rhythm pattern\n * @example\n * probability([0.6, 0, 0.2, 0.5]) // => [0, 0, 0, 1]\n */\nexport function probability(\n probabilities: number[],\n rnd: () => number = Math.random,\n): RhythmPattern {\n return probabilities.map((probability) => (rnd() <= probability ? 1 : 0));\n}\n\n/**\n * Rotate a pattern right\n * @param pattern the pattern to rotate\n * @param rotations the number of steps to rotate\n * @returns the rotated pattern (an array of 0s and 1s)\n * @example\n * rotate([1, 0, 0, 1], 2); // => [0, 1, 1, 0]\n *\n */\nexport function rotate(\n pattern: RhythmPattern,\n rotations: number,\n): RhythmPattern {\n const len = pattern.length;\n const rotated: RhythmPattern = [];\n for (let i = 0; i < len; i++) {\n const pos = (((i - rotations) % len) + len) % len;\n rotated[i] = pattern[pos];\n }\n return rotated;\n}\n\n/**\n * Generates an euclidean rhythm pattern\n * @param steps The length of the pattern\n * @param beats The number of beats\n * @returns an array with 0s and 1s representing the rhythmic pattern\n * @example\n * euclid(8, 3); // => [1, 0, 0, 1, 0, 0, 1, 0]\n */\nexport function euclid(steps: number, beats: number): RhythmPattern {\n const pattern: RhythmPattern = [];\n let d = -1;\n\n for (let i = 0; i < steps; i++) {\n const v = Math.floor(i * (beats / steps));\n pattern[i] = v !== d ? 1 : 0;\n d = v;\n }\n return pattern;\n}\n", "/**\n * References:\n * - https://www.researchgate.net/publication/327567188_An_Algorithm_for_Spelling_the_Pitches_of_Any_Musical_Scale\n * @module scale\n */\nimport { all as chordTypes } from \"@tonaljs/chord-type\";\nimport { range as nums, rotate } from \"@tonaljs/collection\";\nimport { enharmonic, fromMidi, sortedUniqNames } from \"@tonaljs/note\";\nimport {\n chroma,\n isChroma,\n isSubsetOf,\n isSupersetOf,\n modes,\n} from \"@tonaljs/pcset\";\nimport { tonicIntervalsTransposer, transpose } from \"@tonaljs/pitch-distance\";\nimport { note, NoteName } from \"@tonaljs/pitch-note\";\nimport {\n all,\n get as getScaleType,\n ScaleType,\n names as scaleTypeNames,\n all as scaleTypes,\n} from \"@tonaljs/scale-type\";\n\ntype ScaleName = string;\ntype ScaleNameTokens = [string, string]; // [TONIC, SCALE TYPE]\n\nexport interface Scale extends ScaleType {\n tonic: string | null;\n type: string;\n notes: NoteName[];\n}\n\nconst NoScale: Scale = {\n empty: true,\n name: \"\",\n type: \"\",\n tonic: null,\n setNum: NaN,\n chroma: \"\",\n normalized: \"\",\n aliases: [],\n notes: [],\n intervals: [],\n};\n\n/**\n * Given a string with a scale name and (optionally) a tonic, split\n * that components.\n *\n * It retuns an array with the form [ name, tonic ] where tonic can be a\n * note name or null and name can be any arbitrary string\n * (this function doesn\"t check if that scale name exists)\n *\n * @function\n * @param {string} name - the scale name\n * @return {Array} an array [tonic, name]\n * @example\n * tokenize(\"C mixolydean\") // => [\"C\", \"mixolydean\"]\n * tokenize(\"anything is valid\") // => [\"\", \"anything is valid\"]\n * tokenize() // => [\"\", \"\"]\n */\nexport function tokenize(name: ScaleName): ScaleNameTokens {\n if (typeof name !== \"string\") {\n return [\"\", \"\"];\n }\n const i = name.indexOf(\" \");\n const tonic = note(name.substring(0, i));\n if (tonic.empty) {\n const n = note(name);\n return n.empty ? [\"\", name] : [n.name, \"\"];\n }\n\n const type = name.substring(tonic.name.length + 1).toLowerCase();\n return [tonic.name, type.length ? type : \"\"];\n}\n\n/**\n * Get all scale names\n * @function\n */\nexport const names = scaleTypeNames;\n\n/**\n * Get a Scale from a scale name.\n */\nexport function get(src: ScaleName | ScaleNameTokens): Scale {\n const tokens = Array.isArray(src) ? src : tokenize(src);\n const tonic = note(tokens[0]).name;\n const st = getScaleType(tokens[1]);\n if (st.empty) {\n return NoScale;\n }\n\n const type = st.name;\n const notes: string[] = tonic\n ? st.intervals.map((i) => transpose(tonic, i))\n : [];\n\n const name = tonic ? tonic + \" \" + type : type;\n\n return { ...st, name, type, tonic, notes };\n}\n\n/**\n * @deprecated\n * @use Scale.get\n */\nexport const scale = get;\n\nexport function detect(\n notes: string[],\n options: { tonic?: string; match?: \"exact\" | \"fit\" } = {},\n): string[] {\n const notesChroma = chroma(notes);\n const tonic = note(options.tonic ?? notes[0] ?? \"\");\n const tonicChroma = tonic.chroma;\n if (tonicChroma === undefined) {\n return [];\n }\n\n const pitchClasses = notesChroma.split(\"\");\n pitchClasses[tonicChroma] = \"1\";\n const scaleChroma = rotate(tonicChroma, pitchClasses).join(\"\");\n const match = all().find((scaleType) => scaleType.chroma === scaleChroma);\n\n const results: string[] = [];\n if (match) {\n results.push(tonic.name + \" \" + match.name);\n }\n if (options.match === \"exact\") {\n return results;\n }\n\n extended(scaleChroma).forEach((scaleName) => {\n results.push(tonic.name + \" \" + scaleName);\n });\n\n return results;\n}\n\n/**\n * Get all chords that fits a given scale\n *\n * @function\n * @param {string} name - the scale name\n * @return {Array} - the chord names\n *\n * @example\n * scaleChords(\"pentatonic\") // => [\"5\", \"64\", \"M\", \"M6\", \"Madd9\", \"Msus2\"]\n */\nexport function scaleChords(name: string): string[] {\n const s = get(name);\n const inScale = isSubsetOf(s.chroma);\n return chordTypes()\n .filter((chord) => inScale(chord.chroma))\n .map((chord) => chord.aliases[0]);\n}\n/**\n * Get all scales names that are a superset of the given one\n * (has the same notes and at least one more)\n *\n * @function\n * @param {string} name\n * @return {Array} a list of scale names\n * @example\n * extended(\"major\") // => [\"bebop\", \"bebop dominant\", \"bebop major\", \"chromatic\", \"ichikosucho\"]\n */\nexport function extended(name: string): string[] {\n const chroma = isChroma(name) ? name : get(name).chroma;\n const isSuperset = isSupersetOf(chroma);\n return scaleTypes()\n .filter((scale) => isSuperset(scale.chroma))\n .map((scale) => scale.name);\n}\n\n/**\n * Find all scales names that are a subset of the given one\n * (has less notes but all from the given scale)\n *\n * @function\n * @param {string} name\n * @return {Array} a list of scale names\n *\n * @example\n * reduced(\"major\") // => [\"ionian pentatonic\", \"major pentatonic\", \"ritusen\"]\n */\nexport function reduced(name: string): string[] {\n const isSubset = isSubsetOf(get(name).chroma);\n return scaleTypes()\n .filter((scale) => isSubset(scale.chroma))\n .map((scale) => scale.name);\n}\n\n/**\n * Given an array of notes, return the scale: a pitch class set starting from\n * the first note of the array\n *\n * @function\n * @param {string[]} notes\n * @return {string[]} pitch classes with same tonic\n * @example\n * scaleNotes(['C4', 'c3', 'C5', 'C4', 'c4']) // => [\"C\"]\n * scaleNotes(['D4', 'c#5', 'A5', 'F#6']) // => [\"D\", \"F#\", \"A\", \"C#\"]\n */\nexport function scaleNotes(notes: NoteName[]) {\n const pcset: string[] = notes.map((n) => note(n).pc).filter((x) => x);\n const tonic = pcset[0];\n const scale = sortedUniqNames(pcset);\n return rotate(scale.indexOf(tonic), scale);\n}\n\ntype ScaleMode = [string, string];\n/**\n * Find mode names of a scale\n *\n * @function\n * @param {string} name - scale name\n * @example\n * modeNames(\"C pentatonic\") // => [\n * [\"C\", \"major pentatonic\"],\n * [\"D\", \"egyptian\"],\n * [\"E\", \"malkos raga\"],\n * [\"G\", \"ritusen\"],\n * [\"A\", \"minor pentatonic\"]\n * ]\n */\nexport function modeNames(name: string): ScaleMode[] {\n const s = get(name);\n if (s.empty) {\n return [];\n }\n\n const tonics = s.tonic ? s.notes : s.intervals;\n return modes(s.chroma)\n .map((chroma: string, i: number): ScaleMode => {\n const modeName = get(chroma).name;\n return modeName ? [tonics[i], modeName] : [\"\", \"\"];\n })\n .filter((x) => x[0]);\n}\n\nfunction getNoteNameOf(scale: string | string[]) {\n const names = Array.isArray(scale) ? scaleNotes(scale) : get(scale).notes;\n const chromas = names.map((name) => note(name).chroma);\n\n return (noteOrMidi: string | number): string | undefined => {\n const currNote =\n typeof noteOrMidi === \"number\"\n ? note(fromMidi(noteOrMidi))\n : note(noteOrMidi);\n const height = currNote.height;\n\n if (height === undefined) return undefined;\n const chroma = height % 12;\n const position = chromas.indexOf(chroma);\n if (position === -1) return undefined;\n return enharmonic(currNote.name, names[position]);\n };\n}\n\nexport function rangeOf(scale: string | string[]) {\n const getName = getNoteNameOf(scale);\n return (fromNote: string, toNote: string) => {\n const from = note(fromNote).height;\n const to = note(toNote).height;\n if (from === undefined || to === undefined) return [];\n\n return nums(from, to)\n .map(getName)\n .filter((x) => x);\n };\n}\n\n/**\n * Returns a function to get a note name from the scale degree.\n *\n * @example\n * [1, 2, 3].map(Scale.degrees(\"C major\")) => [\"C\", \"D\", \"E\"]\n * [1, 2, 3].map(Scale.degrees(\"C4 major\")) => [\"C4\", \"D4\", \"E4\"]\n */\nexport function degrees(scaleName: string | ScaleNameTokens) {\n const { intervals, tonic } = get(scaleName);\n const transpose = tonicIntervalsTransposer(intervals, tonic);\n return (degree: number) =>\n degree ? transpose(degree > 0 ? degree - 1 : degree) : \"\";\n}\n\n/**\n * Sames as `degree` but with 0-based index\n */\nexport function steps(scaleName: string | ScaleNameTokens) {\n const { intervals, tonic } = get(scaleName);\n return tonicIntervalsTransposer(intervals, tonic);\n}\n\n/** @deprecated */\nexport default {\n degrees,\n detect,\n extended,\n get,\n modeNames,\n names,\n rangeOf,\n reduced,\n scaleChords,\n scaleNotes,\n steps,\n tokenize,\n\n // deprecated\n scale,\n};\n", "// TYPES: PARSING\nexport type TimeSignatureLiteral = string | [number, number] | [string, string];\ntype ParsedTimeSignature = [number | number[], number];\n\n// TYPES: PROPERTIES\nexport type ValidTimeSignature = {\n readonly empty: false;\n readonly name: string;\n readonly upper: number | number[];\n readonly lower: number;\n readonly type: \"simple\" | \"compound\" | \"irregular\" | \"irrational\";\n readonly additive: number[];\n};\n\nexport type InvalidTimeSignature = {\n readonly empty: true;\n readonly name: \"\";\n readonly upper: undefined;\n readonly lower: undefined;\n readonly type: undefined;\n readonly additive: [];\n};\n\nexport type TimeSignature = ValidTimeSignature | InvalidTimeSignature;\n\n// CONSTANTS\nconst NONE: InvalidTimeSignature = {\n empty: true,\n name: \"\",\n upper: undefined,\n lower: undefined,\n type: undefined,\n additive: [],\n};\n\nconst NAMES = [\"4/4\", \"3/4\", \"2/4\", \"2/2\", \"12/8\", \"9/8\", \"6/8\", \"3/8\"];\n\n// PUBLIC API\n\nexport function names() {\n return NAMES.slice();\n}\n\nconst REGEX = /^(\\d*\\d(?:\\+\\d)*)\\/(\\d+)$/;\nconst CACHE = new Map();\n\nexport function get(literal: TimeSignatureLiteral): TimeSignature {\n const stringifiedLiteral = JSON.stringify(literal);\n const cached = CACHE.get(stringifiedLiteral);\n if (cached) {\n return cached;\n }\n\n const ts = build(parse(literal));\n CACHE.set(stringifiedLiteral, ts);\n return ts;\n}\n\nexport function parse(literal: TimeSignatureLiteral): ParsedTimeSignature {\n if (typeof literal === \"string\") {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [_, up, low] = REGEX.exec(literal) || [];\n return parse([up, low]);\n }\n\n const [up, down] = literal;\n const denominator = +down;\n if (typeof up === \"number\") {\n return [up, denominator];\n }\n\n const list = up.split(\"+\").map((n) => +n);\n return list.length === 1 ? [list[0], denominator] : [list, denominator];\n}\n\n/** @deprecated */\nexport default { names, parse, get };\n\n// PRIVATE\n\nconst isPowerOfTwo = (x: number) => (Math.log(x) / Math.log(2)) % 1 === 0;\n\nfunction build([up, down]: ParsedTimeSignature): TimeSignature {\n const upper = Array.isArray(up) ? up.reduce((a, b) => a + b, 0) : up;\n const lower = down;\n if (upper === 0 || lower === 0) {\n return NONE;\n }\n\n const name = Array.isArray(up) ? `${up.join(\"+\")}/${down}` : `${up}/${down}`;\n const additive = Array.isArray(up) ? up : [];\n const type =\n lower === 4 || lower === 2\n ? \"simple\"\n : lower === 8 && upper % 3 === 0\n ? \"compound\"\n : isPowerOfTwo(lower)\n ? \"irregular\"\n : \"irrational\";\n\n return {\n empty: false,\n name,\n type,\n upper,\n lower,\n additive,\n };\n}\n", "import Note from \"@tonaljs/note\";\n\n// A function that decides which of a set of voicings is picked as a follow up to lastVoicing.\nexport declare type VoiceLeadingFunction = (\n voicings: string[][],\n lastVoicing: string[],\n) => string[];\n\nexport const topNoteDiff: VoiceLeadingFunction = (voicings, lastVoicing) => {\n if (!lastVoicing || !lastVoicing.length) {\n return voicings[0];\n }\n const topNoteMidi = (voicing: string[]) =>\n Note.midi(voicing[voicing.length - 1]) || 0;\n const diff = (voicing: string[]) =>\n Math.abs(topNoteMidi(lastVoicing) - topNoteMidi(voicing));\n return voicings.sort((a, b) => diff(a) - diff(b))[0];\n};\n\n/** @deprecated */\nexport default {\n topNoteDiff,\n};\n", "import Chord from \"@tonaljs/chord\";\nimport { all, lefthand, triads, VoicingDictionary } from \"./data\";\nexport { all, lefthand, triads } from \"./data\";\n\nexport const defaultDictionary: VoicingDictionary = lefthand;\n\nexport function lookup(\n symbol: string,\n dictionary = defaultDictionary,\n): string[] | undefined {\n if (dictionary[symbol]) {\n return dictionary[symbol];\n }\n const { aliases } = Chord.get(\"C\" + symbol);\n // TODO: find other way to get aliases of symbol\n const match =\n Object.keys(dictionary).find((_symbol) => aliases.includes(_symbol)) || \"\";\n if (match !== undefined) {\n return dictionary[match];\n }\n return undefined;\n}\n\n/** @deprecated */\nexport default {\n lookup,\n lefthand,\n triads,\n all,\n defaultDictionary,\n};\n", "export type VoicingDictionary = { [symbol: string]: string[] };\n\nexport const triads: VoicingDictionary = {\n M: [\"1P 3M 5P\", \"3M 5P 8P\", \"5P 8P 10M\"],\n m: [\"1P 3m 5P\", \"3m 5P 8P\", \"5P 8P 10m\"],\n o: [\"1P 3m 5d\", \"3m 5d 8P\", \"5d 8P 10m\"],\n aug: [\"1P 3m 5A\", \"3m 5A 8P\", \"5A 8P 10m\"],\n};\nexport const lefthand: VoicingDictionary = {\n m7: [\"3m 5P 7m 9M\", \"7m 9M 10m 12P\"],\n \"7\": [\"3M 6M 7m 9M\", \"7m 9M 10M 13M\"],\n \"^7\": [\"3M 5P 7M 9M\", \"7M 9M 10M 12P\"],\n \"69\": [\"3M 5P 6A 9M\"],\n m7b5: [\"3m 5d 7m 8P\", \"7m 8P 10m 12d\"],\n \"7b9\": [\"3M 6m 7m 9m\", \"7m 9m 10M 13m\"], // b9 / b13\n \"7b13\": [\"3M 6m 7m 9m\", \"7m 9m 10M 13m\"], // b9 / b13\n o7: [\"1P 3m 5d 6M\", \"5d 6M 8P 10m\"],\n \"7#11\": [\"7m 9M 11A 13A\"],\n \"7#9\": [\"3M 7m 9A\"],\n mM7: [\"3m 5P 7M 9M\", \"7M 9M 10m 12P\"],\n m6: [\"3m 5P 6M 9M\", \"6M 9M 10m 12P\"],\n};\nexport const all: VoicingDictionary = {\n M: [\"1P 3M 5P\", \"3M 5P 8P\", \"5P 8P 10M\"],\n m: [\"1P 3m 5P\", \"3m 5P 8P\", \"5P 8P 10m\"],\n o: [\"1P 3m 5d\", \"3m 5d 8P\", \"5d 8P 10m\"],\n aug: [\"1P 3m 5A\", \"3m 5A 8P\", \"5A 8P 10m\"],\n m7: [\"3m 5P 7m 9M\", \"7m 9M 10m 12P\"],\n \"7\": [\"3M 6M 7m 9M\", \"7m 9M 10M 13M\"],\n \"^7\": [\"3M 5P 7M 9M\", \"7M 9M 10M 12P\"],\n \"69\": [\"3M 5P 6A 9M\"],\n m7b5: [\"3m 5d 7m 8P\", \"7m 8P 10m 12d\"],\n \"7b9\": [\"3M 6m 7m 9m\", \"7m 9m 10M 13m\"], // b9 / b13\n \"7b13\": [\"3M 6m 7m 9m\", \"7m 9m 10M 13m\"], // b9 / b13\n o7: [\"1P 3m 5d 6M\", \"5d 6M 8P 10m\"],\n \"7#11\": [\"7m 9M 11A 13A\"],\n \"7#9\": [\"3M 7m 9A\"],\n mM7: [\"3m 5P 7M 9M\", \"7M 9M 10m 12P\"],\n m6: [\"3m 5P 6M 9M\", \"6M 9M 10m 12P\"],\n};\n", "import Chord from \"@tonaljs/chord\";\nimport Interval from \"@tonaljs/interval\";\nimport Note from \"@tonaljs/note\";\nimport Range from \"@tonaljs/range\";\nimport VoiceLeading from \"@tonaljs/voice-leading\";\nimport VoicingDictionary from \"@tonaljs/voicing-dictionary\";\n\nconst defaultRange = [\"C3\", \"C5\"];\nconst defaultDictionary = VoicingDictionary.all;\nconst defaultVoiceLeading = VoiceLeading.topNoteDiff;\n\nexport function get(\n chord: string,\n range: string[] = defaultRange,\n dictionary = defaultDictionary,\n voiceLeading = defaultVoiceLeading,\n lastVoicing?: string[],\n) {\n const voicings = search(chord, range, dictionary);\n if (!lastVoicing || !lastVoicing.length) {\n // notes = voicings[Math.ceil(voicings.length / 2)]; // pick middle voicing..\n return voicings[0]; // pick lowest voicing..\n } else {\n // calculates the distance between the last note and the given voicings top note\n // sort voicings with differ\n return voiceLeading(voicings, lastVoicing);\n }\n}\n\nexport function search(\n chord: string,\n range = defaultRange,\n dictionary = VoicingDictionary.triads,\n): string[][] {\n const [tonic, symbol] = Chord.tokenize(chord);\n const sets = VoicingDictionary.lookup(symbol, dictionary);\n // find equivalent symbol that is used as a key in dictionary:\n if (!sets) {\n return [];\n }\n // resolve array of interval arrays for the wanted symbol\n const voicings = sets.map((intervals) => intervals.split(\" \"));\n const notesInRange = Range.chromatic(range); // gives array of notes inside range\n return voicings.reduce((voiced: string[][], voicing: string[]) => {\n // transpose intervals relative to first interval (e.g. 3m 5P > 1P 3M)\n const relativeIntervals = voicing.map(\n (interval) => Interval.subtract(interval, voicing[0]) || \"\",\n );\n // get enharmonic correct pitch class the bottom note\n const bottomPitchClass = Note.transpose(tonic, voicing[0]);\n // get all possible start notes for voicing\n const starts = notesInRange\n // only get the start notes:\n .filter((note) => Note.chroma(note) === Note.chroma(bottomPitchClass))\n // filter out start notes that will overshoot the top end of the range\n .filter(\n (note) =>\n (Note.midi(\n Note.transpose(\n note,\n relativeIntervals[relativeIntervals.length - 1],\n ),\n ) || 0) <= (Note.midi(range[1]) || 0),\n )\n // replace Range.chromatic notes with the correct enharmonic equivalents\n .map((note) => Note.enharmonic(note, bottomPitchClass));\n // render one voicing for each start note\n const notes = starts.map((start) =>\n relativeIntervals.map((interval) => Note.transpose(start, interval)),\n );\n return voiced.concat(notes);\n }, []);\n}\n\nexport function sequence(\n chords: string[],\n range = defaultRange,\n dictionary = defaultDictionary,\n voiceLeading = defaultVoiceLeading,\n lastVoicing?: string[],\n) {\n const { voicings } = chords.reduce<{\n voicings: string[][];\n lastVoicing: string[] | undefined;\n }>(\n ({ voicings, lastVoicing }, chord) => {\n const voicing = get(chord, range, dictionary, voiceLeading, lastVoicing);\n lastVoicing = voicing;\n voicings.push(voicing);\n return { voicings, lastVoicing };\n },\n { voicings: [], lastVoicing },\n );\n return voicings;\n}\n\n/** @deprecated */\nexport default {\n get,\n search,\n sequence,\n};\n", "import { isNamedPitch } from \"@tonaljs/pitch\";\n\nexport * from \"@tonaljs/pitch\";\nexport * from \"@tonaljs/pitch-distance\";\nexport * from \"@tonaljs/pitch-interval\";\nexport * from \"@tonaljs/pitch-note\";\n\nexport const fillStr = (s: string, n: number) => Array(Math.abs(n) + 1).join(s);\n\nexport function deprecate<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ResultFn extends (this: any, ...newArgs: any[]) => ReturnType,\n>(original: string, alternative: string, fn: ResultFn) {\n return function (this: unknown, ...args: unknown[]): ReturnType {\n // tslint:disable-next-line\n console.warn(`${original} is deprecated. Use ${alternative}.`);\n return fn.apply(this, args);\n };\n}\n\nexport const isNamed = deprecate(\"isNamed\", \"isNamedPitch\", isNamedPitch);\n"], + "mappings": "scAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,iBAAAE,GAAA,UAAAA,GAAA,UAAAA,GAAA,oBAAAC,GAAA,cAAAD,GAAA,eAAAA,GAAA,SAAAA,GAAA,kBAAAA,GAAA,aAAAA,GAAA,QAAAA,GAAA,SAAAA,GAAA,SAAAA,GAAA,SAAAA,GAAA,UAAAE,GAAA,UAAAF,GAAA,gBAAAA,GAAA,UAAAA,GAAA,kBAAAA,GAAA,iBAAAA,GAAA,UAAAA,GAAA,oBAAAG,GAAA,cAAAH,GAAA,kBAAAA,GAAA,UAAAI,GAAA,iBAAAJ,GAAA,YAAAA,GAAA,sBAAAA,GAAA,aAAAK,EAAA,aAAAC,EAAA,WAAAC,GAAA,oBAAAC,EAAA,gBAAAC,GAAA,gBAAAC,EAAA,cAAAC,GAAA,aAAAC,EAAA,YAAAC,GAAA,WAAAC,GAAA,aAAAC,EAAA,YAAAC,GAAA,iBAAAC,EAAA,YAAAC,EAAA,SAAAC,GAAA,SAAAC,EAAA,UAAAC,EAAA,iBAAAC,GAAA,qBAAAC,GAAA,iBAAAC,EAAA,6BAAAC,EAAA,cAAAC,oJCcO,SAASC,EAAaC,EAAiC,CAC5D,OAAOA,IAAQ,MACb,OAAOA,GAAQ,UACf,SAAUA,GACV,OAAOA,EAAI,MAAS,QAGxB,CA6BA,IAAMC,GAAQ,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAE,EACtBC,GAAS,CAAC,CAAE,KAAAC,EAAM,IAAAC,CAAI,KAAcH,GAAME,CAAI,EAAIC,EAAM,KAAO,G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U,CAACC,EAAW,IAAc,MAAM,KAAK,IAAI,CAAC,EAAI,CAAC,EAAE,KAAKA,CAAC,EAEvE,SAASC,GAGdC,EAAkBC,EAAqBC,EAAc,CACrD,OAAO,YAA4BC,EAAuC,CAExE,eAAQ,KAAK,GAAGH,CAAQ,uBAAuBC,CAAW,GAAG,EACtDC,EAAG,MAAM,KAAMC,CAAI,CAC5B,CACF,CAEO,IAAMC,GAAUL,GAAU,UAAW,eAAgBM,CAAY,EhCQxE,IAAMC,GAAQC,GAERC,GAAQD,GAERE,GAAkBF,GAElBG,GAAkBH", + "names": ["tonal_exports", "__export", "dist_exports", "ChordDictionary", "PcSet", "ScaleDictionary", "Tonal", "accToAlt", "altToAcc", "chroma", "coordToInterval", "coordToNote", "coordinates", "deprecate", "distance", "fillStr", "height", "interval", "isNamed", "isNamedPitch", "isPitch", "midi", "note", "pitch", "stepToLetter", "tokenizeInterval", "tokenizeNote", "tonicIntervalsTransposer", "transpose", "isNamedPitch", "src", "SIZES", "chroma", "step", "alt", "height", "oct", "dir", "midi", "pitch", "h", "isPitch", "FIFTHS", "STEPS_TO_OCTS", "fifths", "coordinates", "f", "o", "FIFTHS_TO_STEPS", "coord", "unaltered", "i", "fillStr", "s", "NoInterval", "INTERVAL_TONAL_REGEX", "INTERVAL_SHORTHAND_REGEX", "REGEX", "tokenizeInterval", "str", "m", "cache", "interval", "src", "parse", "isPitch", "pitchName", "isNamedPitch", "SIZES", "TYPES", "tokens", "num", "q", "step", "t", "type", "name", "dir", "simple", "alt", "qToAlt", "oct", "semitones", "chroma", "coord", "coordinates", "coordToInterval", "forceDescending", "f", "o", "isDescending", "ivl", "pitch", "props", "calcNum", "d", "altToQ", "fillStr", "s", "NoNote", "cache", "stepToLetter", "step", "altToAcc", "alt", "accToAlt", "acc", "note", "src", "stringSrc", "cached", "value", "parse", "isPitch", "pitchName", "isNamedPitch", "REGEX", "tokenizeNote", "str", "m", "coordToNote", "noteCoord", "pitch", "mod", "n", "SEMI", "noteName", "tokens", "letter", "octStr", "oct", "coord", "coordinates", "name", "pc", "chroma", "height", "midi", "freq", "props", "transpose", "noteName", "intervalName", "note", "intervalCoord", "interval", "noteCoord", "tr", "coordToNote", "tonicIntervalsTransposer", "intervals", "tonic", "len", "normalized", "index", "octaves", "root", "distance", "fromNote", "toNote", "from", "to", "fcoord", "tcoord", "fifths", "octs", "forceDescending", "coordToInterval", "fillStr", "character", "times", "REGEX", "tokenize", "str", "m", "abcToScientificNotation", "acc", "letter", "oct", "i", "scientificToAbcNotation", "note", "l", "o", "transpose", "interval", "distance", "from", "to", "abc_notation_default", "ascR", "b", "a", "descR", "range", "from", "to", "rotate", "times", "arr", "len", "n", "compact", "sortedNoteNames", "notes", "note", "sortedUniqNoteNames", "i", "shuffle", "rnd", "t", "m", "permutations", "acc", "perm", "e", "pos", "newPerm", "ascR", "b", "a", "descR", "range", "from", "to", "rotate", "times", "arr", "len", "n", "compact", "shuffle", "rnd", "i", "t", "m", "permutations", "acc", "perm", "e", "pos", "newPerm", "collection_default", "EmptyPcset", "setNumToChroma", "num", "chromaToNumber", "chroma", "REGEX", "isChroma", "set", "isPcsetNum", "isPcset", "cache", "get", "src", "listToChroma", "chromaToPcset", "pcset", "intervals", "IVLS", "chromaToIntervals", "i", "notes", "ivl", "transpose", "chromas", "range", "modes", "normalize", "binary", "compact", "_", "r", "rotate", "isEqual", "s1", "s2", "isSubsetOf", "s", "o", "isSupersetOf", "isNoteIncludedIn", "noteName", "n", "note", "includes", "filter", "isIncluded", "pcset_default", "chromaRotations", "setNum", "normalizedNum", "normalized", "pitch", "interval", "CHORDS", "data_default", "NoChordType", "EmptyPcset", "dictionary", "index", "get", "type", "names", "chord", "x", "symbols", "keys", "all", "entries", "removeAll", "add", "intervals", "aliases", "fullName", "quality", "getQuality", "alias", "addAlias", "has", "interval", "ivls", "a", "b", "chord_type_default", "namedSet", "notes", "pcToName", "record", "n", "chroma", "note", "detect", "source", "options", "x", "findMatches", "chord", "a", "b", "BITMASK", "testChromaNumber", "bitmask", "chromaNumber", "hasAnyThird", "hasPerfectFifth", "hasAnySeventh", "hasNonPerfectFifth", "hasAnyThirdAndPerfectFifthAndAnySeventh", "chordType", "withPerfectFifth", "weight", "tonic", "tonicChroma", "noteName", "allModes", "modes", "found", "mode", "index", "modeWithPerfectFifth", "all", "chordName", "baseNote", "names", "get", "interval", "name", "semitones", "quality", "num", "simplify", "i", "invert", "step", "alt", "IN", "IQ", "fromSemitones", "d", "n", "c", "distance", "add", "combinator", "a", "b", "addTo", "other", "subtract", "transposeFifths", "fifths", "ivl", "nFifths", "nOcts", "dir", "coordToInterval", "interval_default", "fn", "coordA", "coordB", "coord", "SCALES", "data_default", "NoScaleType", "EmptyPcset", "dictionary", "index", "names", "scale", "get", "type", "scaleType", "all", "entries", "keys", "removeAll", "add", "intervals", "name", "aliases", "alias", "addAlias", "ivls", "scale_type_default", "NoChord", "tokenize", "name", "letter", "acc", "oct", "type", "tokenizeNote", "tokenizeBass", "note", "chord", "split", "get", "src", "getChord", "tonic", "bass", "typeName", "optionalTonic", "optionalBass", "bassInterval", "distance", "bassIndex", "hasRoot", "root", "rootDegree", "hasBass", "intervals", "i", "num", "quality", "newNum", "ivl", "subtract", "notes", "transpose", "symbol", "chordName", "interval", "tr", "slash", "chordScales", "s", "isChordIncluded", "isSupersetOf", "all", "scale", "extended", "isSuperset", "reduced", "isSubset", "isSubsetOf", "degrees", "tonicIntervalsTransposer", "degree", "steps", "chord_default", "detect", "DATA", "data_default", "VALUES", "denominator", "shorthand", "names", "add", "NoDuration", "duration", "name", "shorthands", "dur", "REGEX", "get", "_", "simple", "dots", "base", "fraction", "calcDots", "value", "duration_value_default", "pow", "numerator", "i", "isMidi", "arg", "toMidi", "note", "midiToFreq", "midi", "tuning", "L2", "L440", "freqToMidi", "freq", "v", "SHARPS", "FLATS", "midiToNoteName", "options", "pc", "chroma", "pcsetFromChroma", "pcset", "val", "index", "pcsetFromMidi", "a", "b", "i", "notes", "pcsetNearest", "set", "ch", "pcsetSteps", "tonic", "len", "step", "octaves", "pcsetDegrees", "steps", "degree", "midi_default", "NAMES", "toName", "n", "onlyNotes", "array", "note", "names", "get", "name", "pitchClass", "accidentals", "octave", "midi", "freq", "chroma", "fromMidi", "midiToNoteName", "fromFreq", "freqToMidi", "fromFreqSharps", "fromMidiSharps", "distance", "transpose", "tr", "transposeBy", "interval", "trBy", "transposeFrom", "trFrom", "transposeFifths", "noteName", "fifths", "trFifths", "transposeOctaves", "octaves", "ascending", "a", "b", "descending", "sortedNames", "notes", "comparator", "sortedUniqNames", "i", "simplify", "enharmonic", "destName", "src", "dest", "srcChroma", "destChroma", "destOctOffset", "destOct", "note_default", "NoRomanNumeral", "cache", "get", "src", "parse", "NAMES", "isPitch", "fromPitch", "isNamedPitch", "romanNumeral", "names", "major", "NAMES_MINOR", "pitch", "altToAcc", "REGEX", "tokenize", "str", "ROMANS", "name", "acc", "roman", "chordType", "upperRoman", "step", "alt", "accToAlt", "dir", "interval", "roman_numeral_default", "Empty", "NoKey", "NoKeyScale", "NoMajorKey", "NoMinorKey", "mapScaleToType", "scale", "list", "sep", "type", "i", "keyScale", "grades", "triads", "chords", "harmonicFunctions", "chordScales", "tonic", "intervals", "gr", "get", "interval", "transpose", "distInFifths", "from", "to", "f", "note", "t", "MajorScale", "NaturalScale", "HarmonicScale", "MelodicScale", "majorKey", "pc", "alteration", "romanInTonic", "src", "r", "altToAcc", "minorKey", "tnc", "majorTonicFromKeySignature", "sig", "transposeFifths", "accToAlt", "key_default", "MODES", "NoMode", "EmptyPcset", "modes", "toMode", "index", "mode", "alias", "get", "name", "all", "entries", "names", "modeNum", "setNum", "alt", "triad", "seventh", "aliases", "chroma", "notes", "modeName", "tonic", "ivl", "transpose", "chords", "triads", "rotate", "tonics", "i", "x", "seventhChords", "distance", "destination", "source", "from", "to", "simplify", "transposeFifths", "relativeTonic", "mode_default", "fromRomanNumerals", "tonic", "chords", "get", "rn", "transpose", "interval", "toRomanNumerals", "chord", "note", "chordType", "tokenize", "intervalName", "distance", "progression_default", "numeric", "notes", "midi", "compact", "note", "toMidi", "result", "last", "range", "chromatic", "options", "midiToNoteName", "range_default", "binary", "numbers", "pattern", "number", "digit", "hex", "hexNumber", "i", "onsets", "random", "length", "probability", "rnd", "probabilities", "rotate", "rotations", "len", "rotated", "pos", "euclid", "steps", "beats", "d", "v", "NoScale", "tokenize", "name", "i", "tonic", "note", "n", "type", "names", "get", "src", "tokens", "st", "notes", "transpose", "scale", "detect", "options", "notesChroma", "chroma", "tonicChroma", "pitchClasses", "scaleChroma", "rotate", "match", "all", "scaleType", "results", "extended", "scaleName", "scaleChords", "s", "inScale", "isSubsetOf", "chord", "isChroma", "isSuperset", "isSupersetOf", "reduced", "isSubset", "scaleNotes", "pcset", "x", "sortedUniqNames", "modeNames", "tonics", "modes", "modeName", "getNoteNameOf", "chromas", "noteOrMidi", "currNote", "fromMidi", "height", "position", "enharmonic", "rangeOf", "getName", "fromNote", "toNote", "from", "to", "range", "degrees", "intervals", "tonicIntervalsTransposer", "degree", "steps", "scale_default", "NONE", "NAMES", "names", "REGEX", "CACHE", "get", "literal", "stringifiedLiteral", "cached", "ts", "build", "parse", "_", "up", "low", "down", "denominator", "list", "n", "time_signature_default", "isPowerOfTwo", "x", "upper", "a", "b", "lower", "name", "additive", "type", "topNoteDiff", "voicings", "lastVoicing", "topNoteMidi", "voicing", "note_default", "diff", "a", "b", "voice_leading_default", "triads", "lefthand", "all", "defaultDictionary", "lookup", "symbol", "dictionary", "aliases", "chord_default", "match", "_symbol", "voicing_dictionary_default", "defaultRange", "defaultDictionary", "voicing_dictionary_default", "defaultVoiceLeading", "voice_leading_default", "get", "chord", "range", "dictionary", "voiceLeading", "lastVoicing", "voicings", "search", "tonic", "symbol", "chord_default", "sets", "intervals", "notesInRange", "range_default", "voiced", "voicing", "relativeIntervals", "interval", "interval_default", "bottomPitchClass", "note_default", "notes", "note", "start", "sequence", "chords", "voicing_default", "fillStr", "s", "deprecate", "original", "alternative", "fn", "args", "isNamed", "isNamedPitch", "Tonal", "dist_exports", "PcSet", "ChordDictionary", "ScaleDictionary"] } diff --git a/site/app/(home)/page.tsx b/site/app/(home)/page.tsx index 5c6ebe65..37fb520a 100644 --- a/site/app/(home)/page.tsx +++ b/site/app/(home)/page.tsx @@ -1,19 +1,8 @@ -import Link from "next/link"; - export default function HomePage() { return (

tonal

A music theory library

- -

- - Documentation - {" "} -

); } diff --git a/site/app/docs/[[...slug]]/page.tsx b/site/app/docs/[[...slug]]/page.tsx index 47a1f7fe..926271d5 100644 --- a/site/app/docs/[[...slug]]/page.tsx +++ b/site/app/docs/[[...slug]]/page.tsx @@ -23,12 +23,16 @@ export default async function Page({ {page.data.title} {page.data.package ? ( - - - +
+ + + +
) : null} {page.data.description} diff --git a/site/app/layout.config.tsx b/site/app/layout.config.tsx index e222271e..7f613daa 100644 --- a/site/app/layout.config.tsx +++ b/site/app/layout.config.tsx @@ -1,4 +1,5 @@ import { type HomeLayoutProps } from "fumadocs-ui/home-layout"; +import { BookIcon, GithubIcon } from "lucide-react"; /** * Shared layout configurations @@ -14,11 +15,13 @@ export const baseOptions: HomeLayoutProps = { links: [ { text: "Documentation", + icon: , url: "/docs", active: "nested-url", }, { text: "Repository", + icon: , url: "https://github.com/tonaljs/tonal", }, ], diff --git a/site/content/docs/basics/intervals.md b/site/content/docs/basics/intervals.md index 5ab2f470..ae977624 100644 --- a/site/content/docs/basics/intervals.md +++ b/site/content/docs/basics/intervals.md @@ -1,16 +1,19 @@ --- title: Intervals -description: Parse and manipulate notes +description: Calculate and manipulate intervals package: interval --- +`Intervals` module allow to do distance calculations between notes using intervals, obtain information and do calculations: + ```js import { Interval } from "tonal"; +Interval.distance("C4", "G4"); // => "5P" Interval.invert("2M"); // => "7m" Interval.simplify("9M"); // => "2M" -Interval.semitones("P4"); // => 5 -Interval.distance("C4", "G4"); // => "5P" +Interval.semitones("4P"); // => 5 +Interval.add("4P", "2M"); // => "5P" ``` ## Interval properties diff --git a/site/content/docs/groups/pitch-class-sets.md b/site/content/docs/groups/pitch-class-sets.md index 710e0885..10c9af0f 100644 --- a/site/content/docs/groups/pitch-class-sets.md +++ b/site/content/docs/groups/pitch-class-sets.md @@ -1,9 +1,12 @@ --- title: Pitch Class Sets package: pcset +description: Compare collections of notes --- -A pitch class set is a set (no repeated) of pitch classes (notes without octaves). Pitch classes are useful to identify musical structures (if two chords are related, for example) +A pitch class set is a no repeated collection (set) of notes without octaves (pitch classes). + +Pitch classes are useful to identify musical structures (if two chords are related, for example) ```js import { Pcset } from "tonal"; @@ -83,7 +86,7 @@ Pcset.notes("101011010110"); // => ["C", "D", "E", "F", "G", "A", "Bb"] Test if a note is included in the given set. This function is currified: ```js -const isInCTriad = isNoteIncludedIn(["C", "E", "G"]); +const isInCTriad = isIncludedIn(["C", "E", "G"]); isInCTriad("C4"); // => true isInCTriad("C#4"); // => false ``` diff --git a/site/package.json b/site/package.json index 4e1c2173..6c31d8e8 100644 --- a/site/package.json +++ b/site/package.json @@ -17,6 +17,7 @@ "fumadocs-mdx": "10.0.2", "fumadocs-ui": "13.4.10", "gh-pages": "^6.1.1", + "lucide-react": "^0.441.0", "next": "^14.2.8", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/site/pnpm-lock.yaml b/site/pnpm-lock.yaml index 171db718..66f14776 100644 --- a/site/pnpm-lock.yaml +++ b/site/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: gh-pages: specifier: ^6.1.1 version: 6.1.1 + lucide-react: + specifier: ^0.441.0 + version: 0.441.0(react@18.3.1) next: specifier: ^14.2.8 version: 14.2.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1415,6 +1418,11 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc + lucide-react@0.441.0: + resolution: {integrity: sha512-0vfExYtvSDhkC2lqg0zYVW1Uu9GsI4knuV9GP9by5z0Xhc4Zi5RejTxfz9LsjRmCyWVzHCJvxGKZWcRyvQCWVg==, tarball: https://registry.npmjs.org/lucide-react/-/lucide-react-0.441.0.tgz} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc + make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==, tarball: https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz} engines: {node: '>=8'} @@ -3517,6 +3525,10 @@ snapshots: dependencies: react: 18.3.1 + lucide-react@0.441.0(react@18.3.1): + dependencies: + react: 18.3.1 + make-dir@3.1.0: dependencies: semver: 6.3.1