From 43c933c47bdde75a5edcad2c52b6b3070df99920 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 13 Oct 2024 08:09:05 +0000 Subject: [PATCH 01/19] Bump GregoryGost/version-tagger in the actions-minor group Bumps the actions-minor group with 1 update: [GregoryGost/version-tagger](https://github.com/gregorygost/version-tagger). Updates `GregoryGost/version-tagger` from 1.0.4 to 1.0.5 - [Release notes](https://github.com/gregorygost/version-tagger/releases) - [Commits](https://github.com/gregorygost/version-tagger/compare/v1.0.4...v1.0.5) --- updated-dependencies: - dependency-name: GregoryGost/version-tagger dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/develop-versioning.yml | 2 +- .github/workflows/main-versioning.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/develop-versioning.yml b/.github/workflows/develop-versioning.yml index 4e825cd..eda8c3c 100644 --- a/.github/workflows/develop-versioning.yml +++ b/.github/workflows/develop-versioning.yml @@ -23,7 +23,7 @@ jobs: - name: New tag step id: new-dev-version - uses: GregoryGost/version-tagger@v1.0.4 + uses: GregoryGost/version-tagger@v1.0.5 with: token: ${{ secrets.GITHUB_TOKEN }} prefix: 'v' diff --git a/.github/workflows/main-versioning.yml b/.github/workflows/main-versioning.yml index 7aecd9a..05c96fe 100644 --- a/.github/workflows/main-versioning.yml +++ b/.github/workflows/main-versioning.yml @@ -23,7 +23,7 @@ jobs: - name: New tag step id: new-main-version - uses: GregoryGost/version-tagger@v1.0.4 + uses: GregoryGost/version-tagger@v1.0.5 with: token: ${{ secrets.GITHUB_TOKEN }} prefix: 'v' From 64f4940edfbade70afc4764e1c26d9ed2916d887 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 13 Oct 2024 08:09:35 +0000 Subject: [PATCH 02/19] Bump the development group with 2 updates Bumps the development group with 2 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [typescript](https://github.com/microsoft/TypeScript). Updates `@types/node` from 22.7.4 to 22.7.5 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `typescript` from 5.6.2 to 5.6.3 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.6.2...v5.6.3) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development ... Signed-off-by: dependabot[bot] --- package.json | 4 +- pnpm-lock.yaml | 223 +++++++++++++++++++++++++------------------------ 2 files changed, 114 insertions(+), 113 deletions(-) diff --git a/package.json b/package.json index 8c7c1d4..d5dc03d 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@jest/globals": "29.7.0", "@types/jest": "29.5.13", "@types/nconf": "0.10.7", - "@types/node": "22.7.4", + "@types/node": "22.7.5", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", "@vercel/ncc": "0.38.2", @@ -54,6 +54,6 @@ "log4js": "6.9.1", "moment": "2.30.1", "nconf": "0.12.1", - "typescript": "5.6.2" + "typescript": "5.6.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c49c1e4..49603b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,14 +18,14 @@ importers: specifier: 0.10.7 version: 0.10.7 '@types/node': - specifier: 22.7.4 - version: 22.7.4 + specifier: 22.7.5 + version: 22.7.5 '@typescript-eslint/eslint-plugin': specifier: 7.18.0 - version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2) + version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 7.18.0 - version: 7.18.0(eslint@8.57.1)(typescript@5.6.2) + version: 7.18.0(eslint@8.57.1)(typescript@5.6.3) '@vercel/ncc': specifier: 0.38.2 version: 0.38.2 @@ -34,10 +34,10 @@ importers: version: 8.57.1 eslint-plugin-github: specifier: 5.0.2 - version: 5.0.2(eslint@8.57.1)(typescript@5.6.2) + version: 5.0.2(eslint@8.57.1)(typescript@5.6.3) eslint-plugin-jest: specifier: 28.8.3 - version: 28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.7.4))(typescript@5.6.2) + version: 28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.7.5))(typescript@5.6.3) eslint-plugin-jsonc: specifier: 2.16.0 version: 2.16.0(eslint@8.57.1) @@ -46,7 +46,7 @@ importers: version: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3) jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.7.4) + version: 29.7.0(@types/node@22.7.5) log4js: specifier: 6.9.1 version: 6.9.1 @@ -67,10 +67,10 @@ importers: version: 16.3.0 ts-jest: specifier: 29.2.5 - version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.7.4))(typescript@5.6.2) + version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.7.5))(typescript@5.6.3) typescript: - specifier: 5.6.2 - version: 5.6.2 + specifier: 5.6.3 + version: 5.6.3 packages: @@ -444,8 +444,8 @@ packages: '@types/nconf@0.10.7': resolution: {integrity: sha512-ltJgbQX0XgjkeDrz0anTCXLBLatppWYFCxp88ILEwybfAuyNWr0Qb+ceFFqZ0VDR8fguEjr0hH37ZF+AF4gsxw==} - '@types/node@22.7.4': - resolution: {integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==} + '@types/node@22.7.5': + resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -1198,6 +1198,7 @@ packages: eslint@8.57.1: resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true espree@9.6.1: @@ -2384,8 +2385,8 @@ packages: resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} engines: {node: '>= 0.4'} - typescript@5.6.2: - resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} + typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} engines: {node: '>=14.17'} hasBin: true @@ -2742,7 +2743,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.7.5 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -2755,14 +2756,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.7.5 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.7.4) + jest-config: 29.7.0(@types/node@22.7.5) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -2787,7 +2788,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.7.5 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -2805,7 +2806,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.7.4 + '@types/node': 22.7.5 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -2827,7 +2828,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.7.4 + '@types/node': 22.7.5 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -2897,7 +2898,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.7.4 + '@types/node': 22.7.5 '@types/yargs': 17.0.32 chalk: 4.1.2 @@ -2967,7 +2968,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 '@types/istanbul-lib-coverage@2.0.6': {} @@ -2988,7 +2989,7 @@ snapshots: '@types/nconf@0.10.7': {} - '@types/node@22.7.4': + '@types/node@22.7.5': dependencies: undici-types: 6.19.8 @@ -3000,78 +3001,78 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.3) '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.6.3) '@typescript-eslint/visitor-keys': 7.18.0 eslint: 8.57.1 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.5.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/parser': 8.5.0(eslint@8.57.1)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/type-utils': 8.5.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/utils': 8.5.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/type-utils': 8.5.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/utils': 8.5.0(eslint@8.57.1)(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.5.0 eslint: 8.57.1 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.6 eslint: 8.57.1 optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 7.18.0 debug: 4.3.6 eslint: 8.57.1 optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 8.5.0 '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.5.0 debug: 4.3.7 eslint: 8.57.1 optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color @@ -3095,26 +3096,26 @@ snapshots: '@typescript-eslint/types': 8.5.0 '@typescript-eslint/visitor-keys': 8.5.0 - '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.2) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.3) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.6.3) debug: 4.3.6 eslint: 8.57.1 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@8.5.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/type-utils@8.5.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) - '@typescript-eslint/utils': 8.5.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.5.0(eslint@8.57.1)(typescript@5.6.3) debug: 4.3.7 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - eslint - supports-color @@ -3127,7 +3128,7 @@ snapshots: '@typescript-eslint/types@8.5.0': {} - '@typescript-eslint/typescript-estree@6.21.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@6.21.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 @@ -3136,13 +3137,13 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 @@ -3151,13 +3152,13 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.4.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@8.4.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.4.0 '@typescript-eslint/visitor-keys': 8.4.0 @@ -3166,13 +3167,13 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.5.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@8.5.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.5.0 '@typescript-eslint/visitor-keys': 8.5.0 @@ -3181,40 +3182,40 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.3) eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.4.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/utils@8.4.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) '@typescript-eslint/scope-manager': 8.4.0 '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.6.3) eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.5.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/utils@8.5.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) '@typescript-eslint/scope-manager': 8.5.0 '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.3) eslint: 8.57.1 transitivePeerDependencies: - supports-color @@ -3521,13 +3522,13 @@ snapshots: convert-source-map@2.0.0: {} - create-jest@29.7.0(@types/node@22.7.4): + create-jest@29.7.0(@types/node@22.7.5): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.7.4) + jest-config: 29.7.0(@types/node@22.7.5) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -3784,11 +3785,11 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.11.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): + eslint-module-utils@2.11.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.5.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/parser': 8.5.0(eslint@8.57.1)(typescript@5.6.3) eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: @@ -3813,11 +3814,11 @@ snapshots: lodash.snakecase: 4.1.1 lodash.upperfirst: 4.3.1 - eslint-plugin-github@5.0.2(eslint@8.57.1)(typescript@5.6.2): + eslint-plugin-github@5.0.2(eslint@8.57.1)(typescript@5.6.3): dependencies: '@github/browserslist-config': 1.0.0 - '@typescript-eslint/eslint-plugin': 8.5.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/parser': 8.5.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 8.5.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/parser': 8.5.0(eslint@8.57.1)(typescript@5.6.3) aria-query: 5.3.1 eslint: 8.57.1 eslint-config-prettier: 9.1.0(eslint@8.57.1) @@ -3825,7 +3826,7 @@ snapshots: eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1) eslint-plugin-filenames: 1.3.2(eslint@8.57.1) eslint-plugin-i18n-text: 1.0.1(eslint@8.57.1) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1) eslint-plugin-jsx-a11y: 6.10.0(eslint@8.57.1) eslint-plugin-no-only-tests: 3.3.0 eslint-plugin-prettier: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3) @@ -3844,7 +3845,7 @@ snapshots: dependencies: eslint: 8.57.1 - eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1): + eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -3855,7 +3856,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -3866,19 +3867,19 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.5.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/parser': 8.5.0(eslint@8.57.1)(typescript@5.6.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.7.4))(typescript@5.6.2): + eslint-plugin-jest@28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.7.5))(typescript@5.6.3): dependencies: - '@typescript-eslint/utils': 8.4.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/utils': 8.4.0(eslint@8.57.1)(typescript@5.6.3) eslint: 8.57.1 optionalDependencies: - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2) - jest: 29.7.0(@types/node@22.7.4) + '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) + jest: 29.7.0(@types/node@22.7.5) transitivePeerDependencies: - supports-color - typescript @@ -4410,7 +4411,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.7.5 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -4430,16 +4431,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.7.4): + jest-cli@29.7.0(@types/node@22.7.5): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.7.4) + create-jest: 29.7.0(@types/node@22.7.5) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@22.7.4) + jest-config: 29.7.0(@types/node@22.7.5) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -4449,7 +4450,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.7.4): + jest-config@29.7.0(@types/node@22.7.5): dependencies: '@babel/core': 7.24.4 '@jest/test-sequencer': 29.7.0 @@ -4474,7 +4475,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -4503,7 +4504,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.7.5 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -4513,7 +4514,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.7.4 + '@types/node': 22.7.5 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -4552,7 +4553,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.7.5 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -4587,7 +4588,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.7.5 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -4615,7 +4616,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.7.5 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -4661,7 +4662,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.7.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -4680,7 +4681,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.4 + '@types/node': 22.7.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -4689,17 +4690,17 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.7.4): + jest@29.7.0(@types/node@22.7.5): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@22.7.4) + jest-cli: 29.7.0(@types/node@22.7.5) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -4997,7 +4998,7 @@ snapshots: prettier-eslint@16.3.0: dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.6.3) common-tags: 1.8.2 dlv: 1.1.3 eslint: 8.57.1 @@ -5007,7 +5008,7 @@ snapshots: prettier: 3.3.3 pretty-format: 29.7.0 require-relative: 0.8.7 - typescript: 5.6.2 + typescript: 5.6.3 vue-eslint-parser: 9.4.2(eslint@8.57.1) transitivePeerDependencies: - supports-color @@ -5259,22 +5260,22 @@ snapshots: dependencies: is-number: 7.0.0 - ts-api-utils@1.3.0(typescript@5.6.2): + ts-api-utils@1.3.0(typescript@5.6.3): dependencies: - typescript: 5.6.2 + typescript: 5.6.3 - ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.7.4))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.7.5))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.7.4) + jest: 29.7.0(@types/node@22.7.5) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.6.3 - typescript: 5.6.2 + typescript: 5.6.3 yargs-parser: 21.1.1 optionalDependencies: '@babel/core': 7.24.4 @@ -5335,7 +5336,7 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 - typescript@5.6.2: {} + typescript@5.6.3: {} unbox-primitive@1.0.2: dependencies: From 87a872698d191833150575d6fcb095335ac4af86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 20 Oct 2024 06:40:23 +0000 Subject: [PATCH 03/19] Bump @types/node from 22.7.5 to 22.7.7 in the development group Bumps the development group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node). Updates `@types/node` from 22.7.5 to 22.7.7 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development ... Signed-off-by: dependabot[bot] --- package.json | 2 +- pnpm-lock.yaml | 76 +++++++++++++++++++++++++------------------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index d5dc03d..20a11ac 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@jest/globals": "29.7.0", "@types/jest": "29.5.13", "@types/nconf": "0.10.7", - "@types/node": "22.7.5", + "@types/node": "22.7.7", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", "@vercel/ncc": "0.38.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 49603b3..e313b9b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: 0.10.7 version: 0.10.7 '@types/node': - specifier: 22.7.5 - version: 22.7.5 + specifier: 22.7.7 + version: 22.7.7 '@typescript-eslint/eslint-plugin': specifier: 7.18.0 version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) @@ -37,7 +37,7 @@ importers: version: 5.0.2(eslint@8.57.1)(typescript@5.6.3) eslint-plugin-jest: specifier: 28.8.3 - version: 28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.7.5))(typescript@5.6.3) + version: 28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.7.7))(typescript@5.6.3) eslint-plugin-jsonc: specifier: 2.16.0 version: 2.16.0(eslint@8.57.1) @@ -46,7 +46,7 @@ importers: version: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3) jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.7.5) + version: 29.7.0(@types/node@22.7.7) log4js: specifier: 6.9.1 version: 6.9.1 @@ -67,7 +67,7 @@ importers: version: 16.3.0 ts-jest: specifier: 29.2.5 - version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.7.5))(typescript@5.6.3) + version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.7.7))(typescript@5.6.3) typescript: specifier: 5.6.3 version: 5.6.3 @@ -444,8 +444,8 @@ packages: '@types/nconf@0.10.7': resolution: {integrity: sha512-ltJgbQX0XgjkeDrz0anTCXLBLatppWYFCxp88ILEwybfAuyNWr0Qb+ceFFqZ0VDR8fguEjr0hH37ZF+AF4gsxw==} - '@types/node@22.7.5': - resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} + '@types/node@22.7.7': + resolution: {integrity: sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q==} '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -2743,7 +2743,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.5 + '@types/node': 22.7.7 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -2756,14 +2756,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.5 + '@types/node': 22.7.7 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.7.5) + jest-config: 29.7.0(@types/node@22.7.7) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -2788,7 +2788,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.5 + '@types/node': 22.7.7 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -2806,7 +2806,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.7.5 + '@types/node': 22.7.7 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -2828,7 +2828,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.7.5 + '@types/node': 22.7.7 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -2898,7 +2898,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.7.5 + '@types/node': 22.7.7 '@types/yargs': 17.0.32 chalk: 4.1.2 @@ -2968,7 +2968,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.7 '@types/istanbul-lib-coverage@2.0.6': {} @@ -2989,7 +2989,7 @@ snapshots: '@types/nconf@0.10.7': {} - '@types/node@22.7.5': + '@types/node@22.7.7': dependencies: undici-types: 6.19.8 @@ -3522,13 +3522,13 @@ snapshots: convert-source-map@2.0.0: {} - create-jest@29.7.0(@types/node@22.7.5): + create-jest@29.7.0(@types/node@22.7.7): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.7.5) + jest-config: 29.7.0(@types/node@22.7.7) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -3873,13 +3873,13 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.7.5))(typescript@5.6.3): + eslint-plugin-jest@28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.7.7))(typescript@5.6.3): dependencies: '@typescript-eslint/utils': 8.4.0(eslint@8.57.1)(typescript@5.6.3) eslint: 8.57.1 optionalDependencies: '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) - jest: 29.7.0(@types/node@22.7.5) + jest: 29.7.0(@types/node@22.7.7) transitivePeerDependencies: - supports-color - typescript @@ -4411,7 +4411,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.5 + '@types/node': 22.7.7 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -4431,16 +4431,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.7.5): + jest-cli@29.7.0(@types/node@22.7.7): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.7.5) + create-jest: 29.7.0(@types/node@22.7.7) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@22.7.5) + jest-config: 29.7.0(@types/node@22.7.7) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -4450,7 +4450,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.7.5): + jest-config@29.7.0(@types/node@22.7.7): dependencies: '@babel/core': 7.24.4 '@jest/test-sequencer': 29.7.0 @@ -4475,7 +4475,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.7 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -4504,7 +4504,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.5 + '@types/node': 22.7.7 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -4514,7 +4514,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.7.5 + '@types/node': 22.7.7 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -4553,7 +4553,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.5 + '@types/node': 22.7.7 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -4588,7 +4588,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.5 + '@types/node': 22.7.7 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -4616,7 +4616,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.5 + '@types/node': 22.7.7 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -4662,7 +4662,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.5 + '@types/node': 22.7.7 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -4681,7 +4681,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.5 + '@types/node': 22.7.7 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -4690,17 +4690,17 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.7 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.7.5): + jest@29.7.0(@types/node@22.7.7): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@22.7.5) + jest-cli: 29.7.0(@types/node@22.7.7) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -5264,12 +5264,12 @@ snapshots: dependencies: typescript: 5.6.3 - ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.7.5))(typescript@5.6.3): + ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.7.7))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.7.5) + jest: 29.7.0(@types/node@22.7.7) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 From 8735c60c814b6eb9e402a1d23807f16421f57dfc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 27 Oct 2024 06:47:28 +0000 Subject: [PATCH 04/19] Bump the development group with 2 updates Bumps the development group with 2 updates: [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) and [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node). Updates `@types/jest` from 29.5.13 to 29.5.14 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Updates `@types/node` from 22.7.7 to 22.8.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development ... Signed-off-by: dependabot[bot] --- package.json | 4 +- pnpm-lock.yaml | 178 +++++++++++++++++-------------------------------- 2 files changed, 64 insertions(+), 118 deletions(-) diff --git a/package.json b/package.json index 20a11ac..7b63bc4 100644 --- a/package.json +++ b/package.json @@ -35,9 +35,9 @@ }, "devDependencies": { "@jest/globals": "29.7.0", - "@types/jest": "29.5.13", + "@types/jest": "29.5.14", "@types/nconf": "0.10.7", - "@types/node": "22.7.7", + "@types/node": "22.8.1", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", "@vercel/ncc": "0.38.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e313b9b..2077faa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,14 +12,14 @@ importers: specifier: 29.7.0 version: 29.7.0 '@types/jest': - specifier: 29.5.13 - version: 29.5.13 + specifier: 29.5.14 + version: 29.5.14 '@types/nconf': specifier: 0.10.7 version: 0.10.7 '@types/node': - specifier: 22.7.7 - version: 22.7.7 + specifier: 22.8.1 + version: 22.8.1 '@typescript-eslint/eslint-plugin': specifier: 7.18.0 version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) @@ -37,7 +37,7 @@ importers: version: 5.0.2(eslint@8.57.1)(typescript@5.6.3) eslint-plugin-jest: specifier: 28.8.3 - version: 28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.7.7))(typescript@5.6.3) + version: 28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.8.1))(typescript@5.6.3) eslint-plugin-jsonc: specifier: 2.16.0 version: 2.16.0(eslint@8.57.1) @@ -46,7 +46,7 @@ importers: version: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3) jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.7.7) + version: 29.7.0(@types/node@22.8.1) log4js: specifier: 6.9.1 version: 6.9.1 @@ -67,7 +67,7 @@ importers: version: 16.3.0 ts-jest: specifier: 29.2.5 - version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.7.7))(typescript@5.6.3) + version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.8.1))(typescript@5.6.3) typescript: specifier: 5.6.3 version: 5.6.3 @@ -82,8 +82,8 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@babel/code-frame@7.24.7': - resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} + '@babel/code-frame@7.26.0': + resolution: {integrity: sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g==} engines: {node: '>=6.9.0'} '@babel/compat-data@7.24.4': @@ -144,8 +144,8 @@ packages: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.24.7': - resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} '@babel/helper-validator-option@7.23.5': @@ -156,10 +156,6 @@ packages: resolution: {integrity: sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.24.7': - resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} - engines: {node: '>=6.9.0'} - '@babel/parser@7.24.4': resolution: {integrity: sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==} engines: {node: '>=6.0.0'} @@ -435,8 +431,8 @@ packages: '@types/istanbul-reports@3.0.4': resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} - '@types/jest@29.5.13': - resolution: {integrity: sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==} + '@types/jest@29.5.14': + resolution: {integrity: sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==} '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} @@ -444,8 +440,8 @@ packages: '@types/nconf@0.10.7': resolution: {integrity: sha512-ltJgbQX0XgjkeDrz0anTCXLBLatppWYFCxp88ILEwybfAuyNWr0Qb+ceFFqZ0VDR8fguEjr0hH37ZF+AF4gsxw==} - '@types/node@22.7.7': - resolution: {integrity: sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q==} + '@types/node@22.8.1': + resolution: {integrity: sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==} '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -665,10 +661,6 @@ packages: resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==} engines: {node: '>=0.10.0'} - ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -823,10 +815,6 @@ packages: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} engines: {node: '>=0.10.0'} - chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -856,16 +844,10 @@ packages: collect-v8-coverage@1.0.2: resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} - color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} - color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -1383,10 +1365,6 @@ packages: has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -2032,8 +2010,8 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - picocolors@1.1.0: - resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} @@ -2269,10 +2247,6 @@ packages: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} engines: {node: '>=0.8.0'} - supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -2489,17 +2463,18 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - '@babel/code-frame@7.24.7': + '@babel/code-frame@7.26.0': dependencies: - '@babel/highlight': 7.24.7 - picocolors: 1.1.0 + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 + picocolors: 1.1.1 '@babel/compat-data@7.24.4': {} '@babel/core@7.24.4': dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.26.0 '@babel/generator': 7.24.4 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.4) @@ -2553,7 +2528,7 @@ snapshots: '@babel/helper-module-imports': 7.24.3 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.25.9 '@babel/helper-plugin-utils@7.24.0': {} @@ -2569,7 +2544,7 @@ snapshots: '@babel/helper-validator-identifier@7.22.20': {} - '@babel/helper-validator-identifier@7.24.7': {} + '@babel/helper-validator-identifier@7.25.9': {} '@babel/helper-validator-option@7.23.5': {} @@ -2581,13 +2556,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/highlight@7.24.7': - dependencies: - '@babel/helper-validator-identifier': 7.24.7 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.1.0 - '@babel/parser@7.24.4': dependencies: '@babel/types': 7.24.0 @@ -2664,13 +2632,13 @@ snapshots: '@babel/template@7.24.0': dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.26.0 '@babel/parser': 7.24.4 '@babel/types': 7.24.0 '@babel/traverse@7.24.1': dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.26.0 '@babel/generator': 7.24.4 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 @@ -2743,7 +2711,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.8.1 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -2756,14 +2724,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.8.1 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.7.7) + jest-config: 29.7.0(@types/node@22.8.1) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -2788,7 +2756,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.8.1 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -2806,7 +2774,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.7.7 + '@types/node': 22.8.1 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -2828,7 +2796,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.7.7 + '@types/node': 22.8.1 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -2898,7 +2866,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.7.7 + '@types/node': 22.8.1 '@types/yargs': 17.0.32 chalk: 4.1.2 @@ -2968,7 +2936,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.8.1 '@types/istanbul-lib-coverage@2.0.6': {} @@ -2980,7 +2948,7 @@ snapshots: dependencies: '@types/istanbul-lib-report': 3.0.3 - '@types/jest@29.5.13': + '@types/jest@29.5.14': dependencies: expect: 29.7.0 pretty-format: 29.7.0 @@ -2989,7 +2957,7 @@ snapshots: '@types/nconf@0.10.7': {} - '@types/node@22.7.7': + '@types/node@22.8.1': dependencies: undici-types: 6.19.8 @@ -3268,10 +3236,6 @@ snapshots: ansi-styles@2.2.1: {} - ansi-styles@3.2.1: - dependencies: - color-convert: 1.9.3 - ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 @@ -3471,12 +3435,6 @@ snapshots: strip-ansi: 3.0.1 supports-color: 2.0.0 - chalk@2.4.2: - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -3504,16 +3462,10 @@ snapshots: collect-v8-coverage@1.0.2: {} - color-convert@1.9.3: - dependencies: - color-name: 1.1.3 - color-convert@2.0.1: dependencies: color-name: 1.1.4 - color-name@1.1.3: {} - color-name@1.1.4: {} common-tags@1.8.2: {} @@ -3522,13 +3474,13 @@ snapshots: convert-source-map@2.0.0: {} - create-jest@29.7.0(@types/node@22.7.7): + create-jest@29.7.0(@types/node@22.8.1): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.7.7) + jest-config: 29.7.0(@types/node@22.8.1) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -3873,13 +3825,13 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.7.7))(typescript@5.6.3): + eslint-plugin-jest@28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.8.1))(typescript@5.6.3): dependencies: '@typescript-eslint/utils': 8.4.0(eslint@8.57.1)(typescript@5.6.3) eslint: 8.57.1 optionalDependencies: '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) - jest: 29.7.0(@types/node@22.7.7) + jest: 29.7.0(@types/node@22.8.1) transitivePeerDependencies: - supports-color - typescript @@ -4177,8 +4129,6 @@ snapshots: has-bigints@1.0.2: {} - has-flag@3.0.0: {} - has-flag@4.0.0: {} has-property-descriptors@1.0.2: @@ -4411,7 +4361,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.8.1 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -4431,16 +4381,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.7.7): + jest-cli@29.7.0(@types/node@22.8.1): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.7.7) + create-jest: 29.7.0(@types/node@22.8.1) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@22.7.7) + jest-config: 29.7.0(@types/node@22.8.1) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -4450,7 +4400,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.7.7): + jest-config@29.7.0(@types/node@22.8.1): dependencies: '@babel/core': 7.24.4 '@jest/test-sequencer': 29.7.0 @@ -4475,7 +4425,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.7.7 + '@types/node': 22.8.1 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -4504,7 +4454,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.8.1 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -4514,7 +4464,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.7.7 + '@types/node': 22.8.1 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -4540,7 +4490,7 @@ snapshots: jest-message-util@29.7.0: dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.26.0 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.3 chalk: 4.1.2 @@ -4553,7 +4503,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.8.1 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -4588,7 +4538,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.8.1 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -4616,7 +4566,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.8.1 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -4662,7 +4612,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.8.1 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -4681,7 +4631,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.7.7 + '@types/node': 22.8.1 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -4690,17 +4640,17 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 22.7.7 + '@types/node': 22.8.1 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.7.7): + jest@29.7.0(@types/node@22.8.1): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@22.7.7) + jest-cli: 29.7.0(@types/node@22.8.1) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -4967,7 +4917,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.26.0 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -4982,7 +4932,7 @@ snapshots: path-type@4.0.0: {} - picocolors@1.1.0: {} + picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -5219,10 +5169,6 @@ snapshots: supports-color@2.0.0: {} - supports-color@5.5.0: - dependencies: - has-flag: 3.0.0 - supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -5264,12 +5210,12 @@ snapshots: dependencies: typescript: 5.6.3 - ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.7.7))(typescript@5.6.3): + ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.8.1))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.7.7) + jest: 29.7.0(@types/node@22.8.1) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -5353,7 +5299,7 @@ snapshots: dependencies: browserslist: 4.23.3 escalade: 3.2.0 - picocolors: 1.1.0 + picocolors: 1.1.1 uri-js@4.4.1: dependencies: From 08b4a8f7523d24394130ed6fbc28defd57aa5d7e Mon Sep 17 00:00:00 2001 From: GregoryGost Date: Mon, 28 Oct 2024 20:00:57 +0300 Subject: [PATCH 05/19] for next dev version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b63bc4..5156509 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gregory-gost/transmission-torrentclear", - "version": "3.0.2", + "version": "3.0.3", "description": "Torrent clear script for transmission-daemon service", "license": "GPL-3", "keywords": [ From 29cd1416aa31dd5d7edbb28cc90d180ac7614fce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Nov 2024 06:20:27 +0000 Subject: [PATCH 06/19] Bump @types/node from 22.8.1 to 22.8.7 in the development group Bumps the development group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node). Updates `@types/node` from 22.8.1 to 22.8.7 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development ... Signed-off-by: dependabot[bot] --- package.json | 2 +- pnpm-lock.yaml | 76 +++++++++++++++++++++++++------------------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index 5156509..6ce0a0a 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@jest/globals": "29.7.0", "@types/jest": "29.5.14", "@types/nconf": "0.10.7", - "@types/node": "22.8.1", + "@types/node": "22.8.7", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", "@vercel/ncc": "0.38.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2077faa..248c0a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: 0.10.7 version: 0.10.7 '@types/node': - specifier: 22.8.1 - version: 22.8.1 + specifier: 22.8.7 + version: 22.8.7 '@typescript-eslint/eslint-plugin': specifier: 7.18.0 version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) @@ -37,7 +37,7 @@ importers: version: 5.0.2(eslint@8.57.1)(typescript@5.6.3) eslint-plugin-jest: specifier: 28.8.3 - version: 28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.8.1))(typescript@5.6.3) + version: 28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.8.7))(typescript@5.6.3) eslint-plugin-jsonc: specifier: 2.16.0 version: 2.16.0(eslint@8.57.1) @@ -46,7 +46,7 @@ importers: version: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3) jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.8.1) + version: 29.7.0(@types/node@22.8.7) log4js: specifier: 6.9.1 version: 6.9.1 @@ -67,7 +67,7 @@ importers: version: 16.3.0 ts-jest: specifier: 29.2.5 - version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.8.1))(typescript@5.6.3) + version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.8.7))(typescript@5.6.3) typescript: specifier: 5.6.3 version: 5.6.3 @@ -440,8 +440,8 @@ packages: '@types/nconf@0.10.7': resolution: {integrity: sha512-ltJgbQX0XgjkeDrz0anTCXLBLatppWYFCxp88ILEwybfAuyNWr0Qb+ceFFqZ0VDR8fguEjr0hH37ZF+AF4gsxw==} - '@types/node@22.8.1': - resolution: {integrity: sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==} + '@types/node@22.8.7': + resolution: {integrity: sha512-LidcG+2UeYIWcMuMUpBKOnryBWG/rnmOHQR5apjn8myTQcx3rinFRn7DcIFhMnS0PPFSC6OafdIKEad0lj6U0Q==} '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -2711,7 +2711,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.8.1 + '@types/node': 22.8.7 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -2724,14 +2724,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.1 + '@types/node': 22.8.7 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.8.1) + jest-config: 29.7.0(@types/node@22.8.7) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -2756,7 +2756,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.1 + '@types/node': 22.8.7 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -2774,7 +2774,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.8.1 + '@types/node': 22.8.7 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -2796,7 +2796,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.8.1 + '@types/node': 22.8.7 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -2866,7 +2866,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.8.1 + '@types/node': 22.8.7 '@types/yargs': 17.0.32 chalk: 4.1.2 @@ -2936,7 +2936,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.7 '@types/istanbul-lib-coverage@2.0.6': {} @@ -2957,7 +2957,7 @@ snapshots: '@types/nconf@0.10.7': {} - '@types/node@22.8.1': + '@types/node@22.8.7': dependencies: undici-types: 6.19.8 @@ -3474,13 +3474,13 @@ snapshots: convert-source-map@2.0.0: {} - create-jest@29.7.0(@types/node@22.8.1): + create-jest@29.7.0(@types/node@22.8.7): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.8.1) + jest-config: 29.7.0(@types/node@22.8.7) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -3825,13 +3825,13 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.8.1))(typescript@5.6.3): + eslint-plugin-jest@28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.8.7))(typescript@5.6.3): dependencies: '@typescript-eslint/utils': 8.4.0(eslint@8.57.1)(typescript@5.6.3) eslint: 8.57.1 optionalDependencies: '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) - jest: 29.7.0(@types/node@22.8.1) + jest: 29.7.0(@types/node@22.8.7) transitivePeerDependencies: - supports-color - typescript @@ -4361,7 +4361,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.1 + '@types/node': 22.8.7 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -4381,16 +4381,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.8.1): + jest-cli@29.7.0(@types/node@22.8.7): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.8.1) + create-jest: 29.7.0(@types/node@22.8.7) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@22.8.1) + jest-config: 29.7.0(@types/node@22.8.7) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -4400,7 +4400,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.8.1): + jest-config@29.7.0(@types/node@22.8.7): dependencies: '@babel/core': 7.24.4 '@jest/test-sequencer': 29.7.0 @@ -4425,7 +4425,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.7 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -4454,7 +4454,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.1 + '@types/node': 22.8.7 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -4464,7 +4464,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.8.1 + '@types/node': 22.8.7 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -4503,7 +4503,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.8.1 + '@types/node': 22.8.7 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -4538,7 +4538,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.1 + '@types/node': 22.8.7 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -4566,7 +4566,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.1 + '@types/node': 22.8.7 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -4612,7 +4612,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.8.1 + '@types/node': 22.8.7 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -4631,7 +4631,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.1 + '@types/node': 22.8.7 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -4640,17 +4640,17 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.7 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.8.1): + jest@29.7.0(@types/node@22.8.7): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@22.8.1) + jest-cli: 29.7.0(@types/node@22.8.7) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -5210,12 +5210,12 @@ snapshots: dependencies: typescript: 5.6.3 - ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.8.1))(typescript@5.6.3): + ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.8.7))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.8.1) + jest: 29.7.0(@types/node@22.8.7) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 From 48bee69a9e077a7331fbd4c45e0928e568066bd8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 10 Nov 2024 06:29:12 +0000 Subject: [PATCH 07/19] Bump the development group with 3 updates Bumps the development group with 3 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) and [eslint-plugin-jsonc](https://github.com/ota-meshi/eslint-plugin-jsonc). Updates `@types/node` from 22.8.7 to 22.9.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `eslint-plugin-jest` from 28.8.3 to 28.9.0 - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.8.3...v28.9.0) Updates `eslint-plugin-jsonc` from 2.16.0 to 2.18.0 - [Release notes](https://github.com/ota-meshi/eslint-plugin-jsonc/releases) - [Changelog](https://github.com/ota-meshi/eslint-plugin-jsonc/blob/master/CHANGELOG.md) - [Commits](https://github.com/ota-meshi/eslint-plugin-jsonc/compare/v2.16.0...v2.18.0) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development - dependency-name: eslint-plugin-jsonc dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development ... Signed-off-by: dependabot[bot] --- package.json | 6 +- pnpm-lock.yaml | 226 +++++++++++++++++++++++++++++-------------------- 2 files changed, 136 insertions(+), 96 deletions(-) diff --git a/package.json b/package.json index 6ce0a0a..27ba52d 100644 --- a/package.json +++ b/package.json @@ -37,14 +37,14 @@ "@jest/globals": "29.7.0", "@types/jest": "29.5.14", "@types/nconf": "0.10.7", - "@types/node": "22.8.7", + "@types/node": "22.9.0", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", "@vercel/ncc": "0.38.2", "eslint": "8.57.1", "eslint-plugin-github": "5.0.2", - "eslint-plugin-jest": "28.8.3", - "eslint-plugin-jsonc": "2.16.0", + "eslint-plugin-jest": "28.9.0", + "eslint-plugin-jsonc": "2.18.0", "eslint-plugin-prettier": "5.2.1", "jest": "29.7.0", "make-coverage-badge": "1.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 248c0a7..2c1e880 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: 0.10.7 version: 0.10.7 '@types/node': - specifier: 22.8.7 - version: 22.8.7 + specifier: 22.9.0 + version: 22.9.0 '@typescript-eslint/eslint-plugin': specifier: 7.18.0 version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) @@ -36,17 +36,17 @@ importers: specifier: 5.0.2 version: 5.0.2(eslint@8.57.1)(typescript@5.6.3) eslint-plugin-jest: - specifier: 28.8.3 - version: 28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.8.7))(typescript@5.6.3) + specifier: 28.9.0 + version: 28.9.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3) eslint-plugin-jsonc: - specifier: 2.16.0 - version: 2.16.0(eslint@8.57.1) + specifier: 2.18.0 + version: 2.18.0(eslint@8.57.1) eslint-plugin-prettier: specifier: 5.2.1 version: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3) jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.8.7) + version: 29.7.0(@types/node@22.9.0) log4js: specifier: 6.9.1 version: 6.9.1 @@ -67,7 +67,7 @@ importers: version: 16.3.0 ts-jest: specifier: 29.2.5 - version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.8.7))(typescript@5.6.3) + version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3) typescript: specifier: 5.6.3 version: 5.6.3 @@ -255,6 +255,12 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + '@eslint-community/eslint-utils@4.4.1': + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + '@eslint-community/regexpp@4.11.0': resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} @@ -440,8 +446,8 @@ packages: '@types/nconf@0.10.7': resolution: {integrity: sha512-ltJgbQX0XgjkeDrz0anTCXLBLatppWYFCxp88ILEwybfAuyNWr0Qb+ceFFqZ0VDR8fguEjr0hH37ZF+AF4gsxw==} - '@types/node@22.8.7': - resolution: {integrity: sha512-LidcG+2UeYIWcMuMUpBKOnryBWG/rnmOHQR5apjn8myTQcx3rinFRn7DcIFhMnS0PPFSC6OafdIKEad0lj6U0Q==} + '@types/node@22.9.0': + resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==} '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -512,8 +518,8 @@ packages: resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/scope-manager@8.4.0': - resolution: {integrity: sha512-n2jFxLeY0JmKfUqy3P70rs6vdoPjHK8P/w+zJcV3fk0b0BwRXC/zxRTEnAsgYT7MwdQDt/ZEbtdzdVC+hcpF0A==} + '@typescript-eslint/scope-manager@8.13.0': + resolution: {integrity: sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/scope-manager@8.5.0': @@ -547,8 +553,8 @@ packages: resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/types@8.4.0': - resolution: {integrity: sha512-T1RB3KQdskh9t3v/qv7niK6P8yvn7ja1mS7QK7XfRVL6wtZ8/mFs/FHf4fKvTA0rKnqnYxl/uHFNbnEt0phgbw==} + '@typescript-eslint/types@8.13.0': + resolution: {integrity: sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/types@8.5.0': @@ -573,8 +579,8 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.4.0': - resolution: {integrity: sha512-kJ2OIP4dQw5gdI4uXsaxUZHRwWAGpREJ9Zq6D5L0BweyOrWsL6Sz0YcAZGWhvKnH7fm1J5YFE1JrQL0c9dd53A==} + '@typescript-eslint/typescript-estree@8.13.0': + resolution: {integrity: sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -597,8 +603,8 @@ packages: peerDependencies: eslint: ^8.56.0 - '@typescript-eslint/utils@8.4.0': - resolution: {integrity: sha512-swULW8n1IKLjRAgciCkTCafyTHHfwVQFt8DovmaF69sKbOxTSFMmIZaSHjqO9i/RV0wIblaawhzvtva8Nmm7lQ==} + '@typescript-eslint/utils@8.13.0': + resolution: {integrity: sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -617,8 +623,8 @@ packages: resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/visitor-keys@8.4.0': - resolution: {integrity: sha512-zTQD6WLNTre1hj5wp09nBIDiOc2U5r/qmzo7wxPn4ZgAjHql09EofqhF9WF+fZHzL5aCyaIpPcT2hyxl73kr9A==} + '@typescript-eslint/visitor-keys@8.13.0': + resolution: {integrity: sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/visitor-keys@8.5.0': @@ -637,8 +643,8 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} hasBin: true @@ -1049,8 +1055,8 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - eslint-compat-utils@0.5.0: - resolution: {integrity: sha512-dc6Y8tzEcSYZMHa+CMPLi/hyo1FzNeonbhJL7Ol0ccuKQkwopJcJBA9YL/xmMTLU1eKigXo9vj9nALElWYSowg==} + eslint-compat-utils@0.6.0: + resolution: {integrity: sha512-1vVBdI/HLS6HTHVQCJGlN+LOF0w1Rs/WB9se23mQr84cRM0iMM8PulMFFhQdQ1BvS0cGwjpis4xziI91Rk0l6g==} engines: {node: '>=12'} peerDependencies: eslint: '>=6.0.0' @@ -1064,6 +1070,17 @@ packages: eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + eslint-json-compat-utils@0.1.3: + resolution: {integrity: sha512-/Vkubo+HWjd9sn5qp8gcNSvr73ZT/LKB4MCjr2GM6MWvN+qLwtpGiYB+KiE5NliMC74UE+6GkUrzV1psdyImCg==} + engines: {node: '>=12'} + peerDependencies: + '@eslint/json': '*' + eslint: '*' + jsonc-eslint-parser: ^2.4.0 + peerDependenciesMeta: + '@eslint/json': + optional: true + eslint-module-utils@2.11.0: resolution: {integrity: sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ==} engines: {node: '>=4'} @@ -1122,8 +1139,8 @@ packages: '@typescript-eslint/parser': optional: true - eslint-plugin-jest@28.8.3: - resolution: {integrity: sha512-HIQ3t9hASLKm2IhIOqnu+ifw7uLZkIlR7RYNv7fMcEi/p0CIiJmfriStQS2LDkgtY4nyLbIZAD+JL347Yc2ETQ==} + eslint-plugin-jest@28.9.0: + resolution: {integrity: sha512-rLu1s1Wf96TgUUxSw6loVIkNtUjq1Re7A9QdCCHSohnvXEBAjuL420h0T/fMmkQlNsQP2GhQzEUpYHPfxBkvYQ==} engines: {node: ^16.10.0 || ^18.12.0 || >=20.0.0} peerDependencies: '@typescript-eslint/eslint-plugin': ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -1135,8 +1152,8 @@ packages: jest: optional: true - eslint-plugin-jsonc@2.16.0: - resolution: {integrity: sha512-Af/ZL5mgfb8FFNleH6KlO4/VdmDuTqmM+SPnWcdoWywTetv7kq+vQe99UyQb9XO3b0OWLVuTH7H0d/PXYCMdSg==} + eslint-plugin-jsonc@2.18.0: + resolution: {integrity: sha512-5HoxMECa+GMyxP1/zR8u/Hacbv7hbQ6NKGHKNPIX6rL2Dwktzgyf4+Qa1urgFc8HDg6rgOr5qhRSR40XicBL6w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' @@ -2294,6 +2311,12 @@ packages: peerDependencies: typescript: '>=4.2.0' + ts-api-utils@1.4.0: + resolution: {integrity: sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + ts-jest@29.2.5: resolution: {integrity: sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==} engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} @@ -2321,12 +2344,12 @@ packages: tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} - tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -2664,6 +2687,11 @@ snapshots: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 + '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': + dependencies: + eslint: 8.57.1 + eslint-visitor-keys: 3.4.3 + '@eslint-community/regexpp@4.11.0': {} '@eslint-community/regexpp@4.11.1': {} @@ -2711,7 +2739,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.8.7 + '@types/node': 22.9.0 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -2724,14 +2752,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.7 + '@types/node': 22.9.0 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.8.7) + jest-config: 29.7.0(@types/node@22.9.0) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -2756,7 +2784,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.7 + '@types/node': 22.9.0 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -2774,7 +2802,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.8.7 + '@types/node': 22.9.0 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -2796,7 +2824,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.8.7 + '@types/node': 22.9.0 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -2866,7 +2894,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/yargs': 17.0.32 chalk: 4.1.2 @@ -2936,7 +2964,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/istanbul-lib-coverage@2.0.6': {} @@ -2957,7 +2985,7 @@ snapshots: '@types/nconf@0.10.7': {} - '@types/node@22.8.7': + '@types/node@22.9.0': dependencies: undici-types: 6.19.8 @@ -3054,10 +3082,10 @@ snapshots: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 - '@typescript-eslint/scope-manager@8.4.0': + '@typescript-eslint/scope-manager@8.13.0': dependencies: - '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/visitor-keys': 8.4.0 + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/visitor-keys': 8.13.0 '@typescript-eslint/scope-manager@8.5.0': dependencies: @@ -3092,7 +3120,7 @@ snapshots: '@typescript-eslint/types@7.18.0': {} - '@typescript-eslint/types@8.4.0': {} + '@typescript-eslint/types@8.13.0': {} '@typescript-eslint/types@8.5.0': {} @@ -3126,16 +3154,16 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.4.0(typescript@5.6.3)': + '@typescript-eslint/typescript-estree@8.13.0(typescript@5.6.3)': dependencies: - '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/visitor-keys': 8.4.0 + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/visitor-keys': 8.13.0 debug: 4.3.7 fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -3158,7 +3186,7 @@ snapshots: '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.3) @@ -3167,12 +3195,12 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.4.0(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/utils@8.13.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@typescript-eslint/scope-manager': 8.4.0 - '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.6.3) + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@typescript-eslint/scope-manager': 8.13.0 + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) eslint: 8.57.1 transitivePeerDependencies: - supports-color @@ -3180,7 +3208,7 @@ snapshots: '@typescript-eslint/utils@8.5.0(eslint@8.57.1)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) '@typescript-eslint/scope-manager': 8.5.0 '@typescript-eslint/types': 8.5.0 '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.3) @@ -3199,9 +3227,9 @@ snapshots: '@typescript-eslint/types': 7.18.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.4.0': + '@typescript-eslint/visitor-keys@8.13.0': dependencies: - '@typescript-eslint/types': 8.4.0 + '@typescript-eslint/types': 8.13.0 eslint-visitor-keys: 3.4.3 '@typescript-eslint/visitor-keys@8.5.0': @@ -3213,11 +3241,11 @@ snapshots: '@vercel/ncc@0.38.2': {} - acorn-jsx@5.3.2(acorn@8.11.3): + acorn-jsx@5.3.2(acorn@8.14.0): dependencies: - acorn: 8.11.3 + acorn: 8.14.0 - acorn@8.11.3: {} + acorn@8.14.0: {} ajv@6.12.6: dependencies: @@ -3474,13 +3502,13 @@ snapshots: convert-source-map@2.0.0: {} - create-jest@29.7.0(@types/node@22.8.7): + create-jest@29.7.0(@types/node@22.9.0): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.8.7) + jest-config: 29.7.0(@types/node@22.9.0) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -3720,7 +3748,7 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.0(eslint@8.57.1): + eslint-compat-utils@0.6.0(eslint@8.57.1): dependencies: eslint: 8.57.1 semver: 7.6.3 @@ -3737,6 +3765,11 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-json-compat-utils@0.1.3(eslint@8.57.1)(jsonc-eslint-parser@2.4.0): + dependencies: + eslint: 8.57.1 + jsonc-eslint-parser: 2.4.0 + eslint-module-utils@2.11.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): dependencies: debug: 3.2.7 @@ -3825,27 +3858,30 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.8.3(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.8.7))(typescript@5.6.3): + eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3): dependencies: - '@typescript-eslint/utils': 8.4.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/utils': 8.13.0(eslint@8.57.1)(typescript@5.6.3) eslint: 8.57.1 optionalDependencies: '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) - jest: 29.7.0(@types/node@22.8.7) + jest: 29.7.0(@types/node@22.9.0) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-jsonc@2.16.0(eslint@8.57.1): + eslint-plugin-jsonc@2.18.0(eslint@8.57.1): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) eslint: 8.57.1 - eslint-compat-utils: 0.5.0(eslint@8.57.1) + eslint-compat-utils: 0.6.0(eslint@8.57.1) + eslint-json-compat-utils: 0.1.3(eslint@8.57.1)(jsonc-eslint-parser@2.4.0) espree: 9.6.1 graphemer: 1.4.0 jsonc-eslint-parser: 2.4.0 natural-compare: 1.4.0 synckit: 0.6.2 + transitivePeerDependencies: + - '@eslint/json' eslint-plugin-jsx-a11y@6.10.0(eslint@8.57.1): dependencies: @@ -3932,8 +3968,8 @@ snapshots: espree@9.6.1: dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -4361,7 +4397,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.7 + '@types/node': 22.9.0 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -4381,16 +4417,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.8.7): + jest-cli@29.7.0(@types/node@22.9.0): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.8.7) + create-jest: 29.7.0(@types/node@22.9.0) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@22.8.7) + jest-config: 29.7.0(@types/node@22.9.0) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -4400,7 +4436,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.8.7): + jest-config@29.7.0(@types/node@22.9.0): dependencies: '@babel/core': 7.24.4 '@jest/test-sequencer': 29.7.0 @@ -4425,7 +4461,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -4454,7 +4490,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.7 + '@types/node': 22.9.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -4464,7 +4500,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.8.7 + '@types/node': 22.9.0 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -4503,7 +4539,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.8.7 + '@types/node': 22.9.0 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -4538,7 +4574,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.7 + '@types/node': 22.9.0 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -4566,7 +4602,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.7 + '@types/node': 22.9.0 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -4612,7 +4648,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.8.7 + '@types/node': 22.9.0 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -4631,7 +4667,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.7 + '@types/node': 22.9.0 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -4640,17 +4676,17 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.8.7): + jest@29.7.0(@types/node@22.9.0): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@22.8.7) + jest-cli: 29.7.0(@types/node@22.9.0) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -4686,7 +4722,7 @@ snapshots: jsonc-eslint-parser@2.4.0: dependencies: - acorn: 8.11.3 + acorn: 8.14.0 eslint-visitor-keys: 3.4.3 espree: 9.6.1 semver: 7.6.3 @@ -5183,7 +5219,7 @@ snapshots: synckit@0.6.2: dependencies: - tslib: 2.6.2 + tslib: 2.8.1 synckit@0.9.1: dependencies: @@ -5210,12 +5246,16 @@ snapshots: dependencies: typescript: 5.6.3 - ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.8.7))(typescript@5.6.3): + ts-api-utils@1.4.0(typescript@5.6.3): + dependencies: + typescript: 5.6.3 + + ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.8.7) + jest: 29.7.0(@types/node@22.9.0) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -5236,10 +5276,10 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 - tslib@2.6.2: {} - tslib@2.6.3: {} + tslib@2.8.1: {} + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 From b2ae52bc0cca693e2a2736d6a7d786ae6b40767d Mon Sep 17 00:00:00 2001 From: GregoryGost Date: Mon, 18 Nov 2024 23:39:40 +0300 Subject: [PATCH 08/19] migrate from vercel-ncc to tsup --- README.md | 6 +- dist/index.js | 29937 +------------------------------------------- dist/licenses.txt | 616 - package.json | 13 +- pnpm-lock.yaml | 852 +- tsconfig.json | 2 +- tsup.config.ts | 14 + 7 files changed, 914 insertions(+), 30526 deletions(-) delete mode 100644 dist/licenses.txt create mode 100644 tsup.config.ts diff --git a/README.md b/README.md index 2ab59a2..75f44ed 100644 --- a/README.md +++ b/README.md @@ -260,9 +260,9 @@ systemctl status logrotate.service проекта не дает никаких гарантий на работоспособность исполняемых файлов, а так же не несет никакой ответственности по искам или за нанесенный ущерб. -Этот репозиторий содержит ссылки на все используемые модули и их лицензии. Они собраны в -[специальный файл лицензий](./dist/licenses.txt). Их авторы самостоятельно несут (или не несут) ответственность за -качество, стабильность и работу этих модулей. +Этот репозиторий содержит сторонние модули. Авторы этих модулей самостоятельно несут (или не несут) ответственность за +качество, стабильность и работу этих модулей и их принципы лицензирования. Используемые модули находятся в зависимостях +в файле `package.json` ## Немного о себе diff --git a/dist/index.js b/dist/index.js index 7317fd3..3b7ef98 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,28093 +1,28 @@ #!/usr/bin/node -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 4685: -/***/ ((module) => { - -"use strict"; - - -module.exports = ({onlyFirst = false} = {}) => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; - - -/***/ }), - -/***/ 3702: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* module decorator */ module = __nccwpck_require__.nmd(module); - - -const wrapAnsi16 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => (...args) => { - const rgb = fn(...args); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -const ansi2ansi = n => n; -const rgb2rgb = (r, g, b) => [r, g, b]; - -const setLazyProperty = (object, property, get) => { - Object.defineProperty(object, property, { - get: () => { - const value = get(); - - Object.defineProperty(object, property, { - value, - enumerable: true, - configurable: true - }); - - return value; - }, - enumerable: true, - configurable: true - }); -}; - -/** @type {typeof import('color-convert')} */ -let colorConvert; -const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { - if (colorConvert === undefined) { - colorConvert = __nccwpck_require__(6764); - } - - const offset = isBackground ? 10 : 0; - const styles = {}; - - for (const [sourceSpace, suite] of Object.entries(colorConvert)) { - const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; - if (sourceSpace === targetSpace) { - styles[name] = wrap(identity, offset); - } else if (typeof suite === 'object') { - styles[name] = wrap(suite[targetSpace], offset); - } - } - - return styles; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - - // Bright color - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Alias bright black as gray (and grey) - styles.color.gray = styles.color.blackBright; - styles.bgColor.bgGray = styles.bgColor.bgBlackBright; - styles.color.grey = styles.color.blackBright; - styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; - - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); - setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); - - -/***/ }), - -/***/ 7386: -/***/ (function(__unused_webpack_module, exports) { - -(function (global, factory) { - true ? factory(exports) : - 0; -})(this, (function (exports) { 'use strict'; - - /** - * Creates a continuation function with some arguments already applied. - * - * Useful as a shorthand when combined with other control flow functions. Any - * arguments passed to the returned function are added to the arguments - * originally passed to apply. - * - * @name apply - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {Function} fn - The function you want to eventually apply all - * arguments to. Invokes with (arguments...). - * @param {...*} arguments... - Any number of arguments to automatically apply - * when the continuation is called. - * @returns {Function} the partially-applied function - * @example - * - * // using apply - * async.parallel([ - * async.apply(fs.writeFile, 'testfile1', 'test1'), - * async.apply(fs.writeFile, 'testfile2', 'test2') - * ]); - * - * - * // the same process without using apply - * async.parallel([ - * function(callback) { - * fs.writeFile('testfile1', 'test1', callback); - * }, - * function(callback) { - * fs.writeFile('testfile2', 'test2', callback); - * } - * ]); - * - * // It's possible to pass any number of additional arguments when calling the - * // continuation: - * - * node> var fn = async.apply(sys.puts, 'one'); - * node> fn('two', 'three'); - * one - * two - * three - */ - function apply(fn, ...args) { - return (...callArgs) => fn(...args,...callArgs); - } - - function initialParams (fn) { - return function (...args/*, callback*/) { - var callback = args.pop(); - return fn.call(this, args, callback); - }; - } - - /* istanbul ignore file */ - - var hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask; - var hasSetImmediate = typeof setImmediate === 'function' && setImmediate; - var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; - - function fallback(fn) { - setTimeout(fn, 0); - } - - function wrap(defer) { - return (fn, ...args) => defer(() => fn(...args)); - } - - var _defer$1; - - if (hasQueueMicrotask) { - _defer$1 = queueMicrotask; - } else if (hasSetImmediate) { - _defer$1 = setImmediate; - } else if (hasNextTick) { - _defer$1 = process.nextTick; - } else { - _defer$1 = fallback; - } - - var setImmediate$1 = wrap(_defer$1); - - /** - * Take a sync function and make it async, passing its return value to a - * callback. This is useful for plugging sync functions into a waterfall, - * series, or other async functions. Any arguments passed to the generated - * function will be passed to the wrapped function (except for the final - * callback argument). Errors thrown will be passed to the callback. - * - * If the function passed to `asyncify` returns a Promise, that promises's - * resolved/rejected state will be used to call the callback, rather than simply - * the synchronous return value. - * - * This also means you can asyncify ES2017 `async` functions. - * - * @name asyncify - * @static - * @memberOf module:Utils - * @method - * @alias wrapSync - * @category Util - * @param {Function} func - The synchronous function, or Promise-returning - * function to convert to an {@link AsyncFunction}. - * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be - * invoked with `(args..., callback)`. - * @example - * - * // passing a regular synchronous function - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(JSON.parse), - * function (data, next) { - * // data is the result of parsing the text. - * // If there was a parsing error, it would have been caught. - * } - * ], callback); - * - * // passing a function returning a promise - * async.waterfall([ - * async.apply(fs.readFile, filename, "utf8"), - * async.asyncify(function (contents) { - * return db.model.create(contents); - * }), - * function (model, next) { - * // `model` is the instantiated model object. - * // If there was an error, this function would be skipped. - * } - * ], callback); - * - * // es2017 example, though `asyncify` is not needed if your JS environment - * // supports async functions out of the box - * var q = async.queue(async.asyncify(async function(file) { - * var intermediateStep = await processFile(file); - * return await somePromise(intermediateStep) - * })); - * - * q.push(files); - */ - function asyncify(func) { - if (isAsync(func)) { - return function (...args/*, callback*/) { - const callback = args.pop(); - const promise = func.apply(this, args); - return handlePromise(promise, callback) - } - } - - return initialParams(function (args, callback) { - var result; - try { - result = func.apply(this, args); - } catch (e) { - return callback(e); - } - // if result is Promise object - if (result && typeof result.then === 'function') { - return handlePromise(result, callback) - } else { - callback(null, result); - } - }); - } - - function handlePromise(promise, callback) { - return promise.then(value => { - invokeCallback(callback, null, value); - }, err => { - invokeCallback(callback, err && (err instanceof Error || err.message) ? err : new Error(err)); - }); - } - - function invokeCallback(callback, error, value) { - try { - callback(error, value); - } catch (err) { - setImmediate$1(e => { throw e }, err); - } - } - - function isAsync(fn) { - return fn[Symbol.toStringTag] === 'AsyncFunction'; - } - - function isAsyncGenerator(fn) { - return fn[Symbol.toStringTag] === 'AsyncGenerator'; - } - - function isAsyncIterable(obj) { - return typeof obj[Symbol.asyncIterator] === 'function'; - } - - function wrapAsync(asyncFn) { - if (typeof asyncFn !== 'function') throw new Error('expected a function') - return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn; - } - - // conditionally promisify a function. - // only return a promise if a callback is omitted - function awaitify (asyncFn, arity) { - if (!arity) arity = asyncFn.length; - if (!arity) throw new Error('arity is undefined') - function awaitable (...args) { - if (typeof args[arity - 1] === 'function') { - return asyncFn.apply(this, args) - } - - return new Promise((resolve, reject) => { - args[arity - 1] = (err, ...cbArgs) => { - if (err) return reject(err) - resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]); - }; - asyncFn.apply(this, args); - }) - } - - return awaitable - } - - function applyEach$1 (eachfn) { - return function applyEach(fns, ...callArgs) { - const go = awaitify(function (callback) { - var that = this; - return eachfn(fns, (fn, cb) => { - wrapAsync(fn).apply(that, callArgs.concat(cb)); - }, callback); - }); - return go; - }; - } - - function _asyncMap(eachfn, arr, iteratee, callback) { - arr = arr || []; - var results = []; - var counter = 0; - var _iteratee = wrapAsync(iteratee); - - return eachfn(arr, (value, _, iterCb) => { - var index = counter++; - _iteratee(value, (err, v) => { - results[index] = v; - iterCb(err); - }); - }, err => { - callback(err, results); - }); - } - - function isArrayLike(value) { - return value && - typeof value.length === 'number' && - value.length >= 0 && - value.length % 1 === 0; - } - - // A temporary value used to identify if the loop should be broken. - // See #1064, #1293 - const breakLoop = {}; - var breakLoop$1 = breakLoop; - - function once(fn) { - function wrapper (...args) { - if (fn === null) return; - var callFn = fn; - fn = null; - callFn.apply(this, args); - } - Object.assign(wrapper, fn); - return wrapper - } - - function getIterator (coll) { - return coll[Symbol.iterator] && coll[Symbol.iterator](); - } - - function createArrayIterator(coll) { - var i = -1; - var len = coll.length; - return function next() { - return ++i < len ? {value: coll[i], key: i} : null; - } - } - - function createES2015Iterator(iterator) { - var i = -1; - return function next() { - var item = iterator.next(); - if (item.done) - return null; - i++; - return {value: item.value, key: i}; - } - } - - function createObjectIterator(obj) { - var okeys = obj ? Object.keys(obj) : []; - var i = -1; - var len = okeys.length; - return function next() { - var key = okeys[++i]; - if (key === '__proto__') { - return next(); - } - return i < len ? {value: obj[key], key} : null; - }; - } - - function createIterator(coll) { - if (isArrayLike(coll)) { - return createArrayIterator(coll); - } - - var iterator = getIterator(coll); - return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); - } - - function onlyOnce(fn) { - return function (...args) { - if (fn === null) throw new Error("Callback was already called."); - var callFn = fn; - fn = null; - callFn.apply(this, args); - }; - } - - // for async generators - function asyncEachOfLimit(generator, limit, iteratee, callback) { - let done = false; - let canceled = false; - let awaiting = false; - let running = 0; - let idx = 0; - - function replenish() { - //console.log('replenish') - if (running >= limit || awaiting || done) return - //console.log('replenish awaiting') - awaiting = true; - generator.next().then(({value, done: iterDone}) => { - //console.log('got value', value) - if (canceled || done) return - awaiting = false; - if (iterDone) { - done = true; - if (running <= 0) { - //console.log('done nextCb') - callback(null); - } - return; - } - running++; - iteratee(value, idx, iterateeCallback); - idx++; - replenish(); - }).catch(handleError); - } - - function iterateeCallback(err, result) { - //console.log('iterateeCallback') - running -= 1; - if (canceled) return - if (err) return handleError(err) - - if (err === false) { - done = true; - canceled = true; - return - } - - if (result === breakLoop$1 || (done && running <= 0)) { - done = true; - //console.log('done iterCb') - return callback(null); - } - replenish(); - } - - function handleError(err) { - if (canceled) return - awaiting = false; - done = true; - callback(err); - } - - replenish(); - } - - var eachOfLimit$2 = (limit) => { - return (obj, iteratee, callback) => { - callback = once(callback); - if (limit <= 0) { - throw new RangeError('concurrency limit cannot be less than 1') - } - if (!obj) { - return callback(null); - } - if (isAsyncGenerator(obj)) { - return asyncEachOfLimit(obj, limit, iteratee, callback) - } - if (isAsyncIterable(obj)) { - return asyncEachOfLimit(obj[Symbol.asyncIterator](), limit, iteratee, callback) - } - var nextElem = createIterator(obj); - var done = false; - var canceled = false; - var running = 0; - var looping = false; - - function iterateeCallback(err, value) { - if (canceled) return - running -= 1; - if (err) { - done = true; - callback(err); - } - else if (err === false) { - done = true; - canceled = true; - } - else if (value === breakLoop$1 || (done && running <= 0)) { - done = true; - return callback(null); - } - else if (!looping) { - replenish(); - } - } - - function replenish () { - looping = true; - while (running < limit && !done) { - var elem = nextElem(); - if (elem === null) { - done = true; - if (running <= 0) { - callback(null); - } - return; - } - running += 1; - iteratee(elem.value, elem.key, onlyOnce(iterateeCallback)); - } - looping = false; - } - - replenish(); - }; - }; - - /** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a - * time. - * - * @name eachOfLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. The `key` is the item's key, or index in the case of an - * array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ - function eachOfLimit(coll, limit, iteratee, callback) { - return eachOfLimit$2(limit)(coll, wrapAsync(iteratee), callback); - } - - var eachOfLimit$1 = awaitify(eachOfLimit, 4); - - // eachOf implementation optimized for array-likes - function eachOfArrayLike(coll, iteratee, callback) { - callback = once(callback); - var index = 0, - completed = 0, - {length} = coll, - canceled = false; - if (length === 0) { - callback(null); - } - - function iteratorCallback(err, value) { - if (err === false) { - canceled = true; - } - if (canceled === true) return - if (err) { - callback(err); - } else if ((++completed === length) || value === breakLoop$1) { - callback(null); - } - } - - for (; index < length; index++) { - iteratee(coll[index], index, onlyOnce(iteratorCallback)); - } - } - - // a generic version of eachOf which can handle array, object, and iterator cases. - function eachOfGeneric (coll, iteratee, callback) { - return eachOfLimit$1(coll, Infinity, iteratee, callback); - } - - /** - * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument - * to the iteratee. - * - * @name eachOf - * @static - * @memberOf module:Collections - * @method - * @alias forEachOf - * @category Collection - * @see [async.each]{@link module:Collections.each} - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each - * item in `coll`. - * The `key` is the item's key, or index in the case of an array. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dev.json is a file containing a valid json object config for dev environment - * // dev.json is a file containing a valid json object config for test environment - * // prod.json is a file containing a valid json object config for prod environment - * // invalid.json is a file with a malformed json object - * - * let configs = {}; //global variable - * let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'}; - * let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'}; - * - * // asynchronous function that reads a json file and parses the contents as json object - * function parseFile(file, key, callback) { - * fs.readFile(file, "utf8", function(err, data) { - * if (err) return calback(err); - * try { - * configs[key] = JSON.parse(data); - * } catch (e) { - * return callback(e); - * } - * callback(); - * }); - * } - * - * // Using callbacks - * async.forEachOf(validConfigFileMap, parseFile, function (err) { - * if (err) { - * console.error(err); - * } else { - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * } - * }); - * - * //Error handing - * async.forEachOf(invalidConfigFileMap, parseFile, function (err) { - * if (err) { - * console.error(err); - * // JSON parse error exception - * } else { - * console.log(configs); - * } - * }); - * - * // Using Promises - * async.forEachOf(validConfigFileMap, parseFile) - * .then( () => { - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * }).catch( err => { - * console.error(err); - * }); - * - * //Error handing - * async.forEachOf(invalidConfigFileMap, parseFile) - * .then( () => { - * console.log(configs); - * }).catch( err => { - * console.error(err); - * // JSON parse error exception - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.forEachOf(validConfigFileMap, parseFile); - * console.log(configs); - * // configs is now a map of JSON data, e.g. - * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json} - * } - * catch (err) { - * console.log(err); - * } - * } - * - * //Error handing - * async () => { - * try { - * let result = await async.forEachOf(invalidConfigFileMap, parseFile); - * console.log(configs); - * } - * catch (err) { - * console.log(err); - * // JSON parse error exception - * } - * } - * - */ - function eachOf(coll, iteratee, callback) { - var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric; - return eachOfImplementation(coll, wrapAsync(iteratee), callback); - } - - var eachOf$1 = awaitify(eachOf, 3); - - /** - * Produces a new collection of values by mapping each value in `coll` through - * the `iteratee` function. The `iteratee` is called with an item from `coll` - * and a callback for when it has finished processing. Each of these callbacks - * takes 2 arguments: an `error`, and the transformed item from `coll`. If - * `iteratee` passes an error to its callback, the main `callback` (for the - * `map` function) is immediately called with the error. - * - * Note, that since this function applies the `iteratee` to each item in - * parallel, there is no guarantee that the `iteratee` functions will complete - * in order. However, the results array will be in the same order as the - * original `coll`. - * - * If `map` is passed an Object, the results will be an Array. The results - * will roughly be in the order of the original Objects' keys (but this can - * vary across JavaScript engines). - * - * @name map - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an Array of the - * transformed items from the `coll`. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * // file4.txt does not exist - * - * const fileList = ['file1.txt','file2.txt','file3.txt']; - * const withMissingFileList = ['file1.txt','file2.txt','file4.txt']; - * - * // asynchronous function that returns the file size in bytes - * function getFileSizeInBytes(file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, stat.size); - * }); - * } - * - * // Using callbacks - * async.map(fileList, getFileSizeInBytes, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now an array of the file size in bytes for each file, e.g. - * // [ 1000, 2000, 3000] - * } - * }); - * - * // Error Handling - * async.map(withMissingFileList, getFileSizeInBytes, function(err, results) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(results); - * } - * }); - * - * // Using Promises - * async.map(fileList, getFileSizeInBytes) - * .then( results => { - * console.log(results); - * // results is now an array of the file size in bytes for each file, e.g. - * // [ 1000, 2000, 3000] - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.map(withMissingFileList, getFileSizeInBytes) - * .then( results => { - * console.log(results); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.map(fileList, getFileSizeInBytes); - * console.log(results); - * // results is now an array of the file size in bytes for each file, e.g. - * // [ 1000, 2000, 3000] - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let results = await async.map(withMissingFileList, getFileSizeInBytes); - * console.log(results); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ - function map (coll, iteratee, callback) { - return _asyncMap(eachOf$1, coll, iteratee, callback) - } - var map$1 = awaitify(map, 3); - - /** - * Applies the provided arguments to each function in the array, calling - * `callback` after all functions have completed. If you only provide the first - * argument, `fns`, then it will return a function which lets you pass in the - * arguments as if it were a single function call. If more arguments are - * provided, `callback` is required while `args` is still optional. The results - * for each of the applied async functions are passed to the final callback - * as an array. - * - * @name applyEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s - * to all call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {AsyncFunction} - Returns a function that takes no args other than - * an optional callback, that is the result of applying the `args` to each - * of the functions. - * @example - * - * const appliedFn = async.applyEach([enableSearch, updateSchema], 'bucket') - * - * appliedFn((err, results) => { - * // results[0] is the results for `enableSearch` - * // results[1] is the results for `updateSchema` - * }); - * - * // partial application example: - * async.each( - * buckets, - * async (bucket) => async.applyEach([enableSearch, updateSchema], bucket)(), - * callback - * ); - */ - var applyEach = applyEach$1(map$1); - - /** - * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time. - * - * @name eachOfSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.eachOf]{@link module:Collections.eachOf} - * @alias forEachOfSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * Invoked with (item, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ - function eachOfSeries(coll, iteratee, callback) { - return eachOfLimit$1(coll, 1, iteratee, callback) - } - var eachOfSeries$1 = awaitify(eachOfSeries, 3); - - /** - * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time. - * - * @name mapSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ - function mapSeries (coll, iteratee, callback) { - return _asyncMap(eachOfSeries$1, coll, iteratee, callback) - } - var mapSeries$1 = awaitify(mapSeries, 3); - - /** - * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time. - * - * @name applyEachSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.applyEach]{@link module:ControlFlow.applyEach} - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s to all - * call with the same arguments - * @param {...*} [args] - any number of separate arguments to pass to the - * function. - * @param {Function} [callback] - the final argument should be the callback, - * called when all functions have completed processing. - * @returns {AsyncFunction} - A function, that when called, is the result of - * appling the `args` to the list of functions. It takes no args, other than - * a callback. - */ - var applyEachSeries = applyEach$1(mapSeries$1); - - const PROMISE_SYMBOL = Symbol('promiseCallback'); - - function promiseCallback () { - let resolve, reject; - function callback (err, ...args) { - if (err) return reject(err) - resolve(args.length > 1 ? args : args[0]); - } - - callback[PROMISE_SYMBOL] = new Promise((res, rej) => { - resolve = res, - reject = rej; - }); - - return callback - } - - /** - * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on - * their requirements. Each function can optionally depend on other functions - * being completed first, and each function is run as soon as its requirements - * are satisfied. - * - * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence - * will stop. Further tasks will not execute (so any other functions depending - * on it will not run), and the main `callback` is immediately called with the - * error. - * - * {@link AsyncFunction}s also receive an object containing the results of functions which - * have completed so far as the first argument, if they have dependencies. If a - * task function has no dependencies, it will only be passed a callback. - * - * @name auto - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Object} tasks - An object. Each of its properties is either a - * function or an array of requirements, with the {@link AsyncFunction} itself the last item - * in the array. The object's key of a property serves as the name of the task - * defined by that property, i.e. can be used when specifying requirements for - * other tasks. The function receives one or two arguments: - * * a `results` object, containing the results of the previously executed - * functions, only passed if the task has any dependencies, - * * a `callback(err, result)` function, which must be called when finished, - * passing an `error` (which can be `null`) and the result of the function's - * execution. - * @param {number} [concurrency=Infinity] - An optional `integer` for - * determining the maximum number of tasks that can be run in parallel. By - * default, as many as possible. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback. Results are always returned; however, if an - * error occurs, no further `tasks` will be performed, and the results object - * will only contain partial results. Invoked with (err, results). - * @returns {Promise} a promise, if a callback is not passed - * @example - * - * //Using Callbacks - * async.auto({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * // once the file is written let's email a link to it... - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }, function(err, results) { - * if (err) { - * console.log('err = ', err); - * } - * console.log('results = ', results); - * // results = { - * // get_data: ['data', 'converted to array'] - * // make_folder; 'folder', - * // write_file: 'filename' - * // email_link: { file: 'filename', email: 'user@example.com' } - * // } - * }); - * - * //Using Promises - * async.auto({ - * get_data: function(callback) { - * console.log('in get_data'); - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * console.log('in make_folder'); - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * // once the file is written let's email a link to it... - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }).then(results => { - * console.log('results = ', results); - * // results = { - * // get_data: ['data', 'converted to array'] - * // make_folder; 'folder', - * // write_file: 'filename' - * // email_link: { file: 'filename', email: 'user@example.com' } - * // } - * }).catch(err => { - * console.log('err = ', err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.auto({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: ['get_data', 'make_folder', function(results, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(results, callback) { - * // once the file is written let's email a link to it... - * callback(null, {'file':results.write_file, 'email':'user@example.com'}); - * }] - * }); - * console.log('results = ', results); - * // results = { - * // get_data: ['data', 'converted to array'] - * // make_folder; 'folder', - * // write_file: 'filename' - * // email_link: { file: 'filename', email: 'user@example.com' } - * // } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function auto(tasks, concurrency, callback) { - if (typeof concurrency !== 'number') { - // concurrency is optional, shift the args. - callback = concurrency; - concurrency = null; - } - callback = once(callback || promiseCallback()); - var numTasks = Object.keys(tasks).length; - if (!numTasks) { - return callback(null); - } - if (!concurrency) { - concurrency = numTasks; - } - - var results = {}; - var runningTasks = 0; - var canceled = false; - var hasError = false; - - var listeners = Object.create(null); - - var readyTasks = []; - - // for cycle detection: - var readyToCheck = []; // tasks that have been identified as reachable - // without the possibility of returning to an ancestor task - var uncheckedDependencies = {}; - - Object.keys(tasks).forEach(key => { - var task = tasks[key]; - if (!Array.isArray(task)) { - // no dependencies - enqueueTask(key, [task]); - readyToCheck.push(key); - return; - } - - var dependencies = task.slice(0, task.length - 1); - var remainingDependencies = dependencies.length; - if (remainingDependencies === 0) { - enqueueTask(key, task); - readyToCheck.push(key); - return; - } - uncheckedDependencies[key] = remainingDependencies; - - dependencies.forEach(dependencyName => { - if (!tasks[dependencyName]) { - throw new Error('async.auto task `' + key + - '` has a non-existent dependency `' + - dependencyName + '` in ' + - dependencies.join(', ')); - } - addListener(dependencyName, () => { - remainingDependencies--; - if (remainingDependencies === 0) { - enqueueTask(key, task); - } - }); - }); - }); - - checkForDeadlocks(); - processQueue(); - - function enqueueTask(key, task) { - readyTasks.push(() => runTask(key, task)); - } - - function processQueue() { - if (canceled) return - if (readyTasks.length === 0 && runningTasks === 0) { - return callback(null, results); - } - while(readyTasks.length && runningTasks < concurrency) { - var run = readyTasks.shift(); - run(); - } - - } - - function addListener(taskName, fn) { - var taskListeners = listeners[taskName]; - if (!taskListeners) { - taskListeners = listeners[taskName] = []; - } - - taskListeners.push(fn); - } - - function taskComplete(taskName) { - var taskListeners = listeners[taskName] || []; - taskListeners.forEach(fn => fn()); - processQueue(); - } - - - function runTask(key, task) { - if (hasError) return; - - var taskCallback = onlyOnce((err, ...result) => { - runningTasks--; - if (err === false) { - canceled = true; - return - } - if (result.length < 2) { - [result] = result; - } - if (err) { - var safeResults = {}; - Object.keys(results).forEach(rkey => { - safeResults[rkey] = results[rkey]; - }); - safeResults[key] = result; - hasError = true; - listeners = Object.create(null); - if (canceled) return - callback(err, safeResults); - } else { - results[key] = result; - taskComplete(key); - } - }); - - runningTasks++; - var taskFn = wrapAsync(task[task.length - 1]); - if (task.length > 1) { - taskFn(results, taskCallback); - } else { - taskFn(taskCallback); - } - } - - function checkForDeadlocks() { - // Kahn's algorithm - // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm - // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html - var currentTask; - var counter = 0; - while (readyToCheck.length) { - currentTask = readyToCheck.pop(); - counter++; - getDependents(currentTask).forEach(dependent => { - if (--uncheckedDependencies[dependent] === 0) { - readyToCheck.push(dependent); - } - }); - } - - if (counter !== numTasks) { - throw new Error( - 'async.auto cannot execute tasks due to a recursive dependency' - ); - } - } - - function getDependents(taskName) { - var result = []; - Object.keys(tasks).forEach(key => { - const task = tasks[key]; - if (Array.isArray(task) && task.indexOf(taskName) >= 0) { - result.push(key); - } - }); - return result; - } - - return callback[PROMISE_SYMBOL] - } - - var FN_ARGS = /^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/; - var ARROW_FN_ARGS = /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/; - var FN_ARG_SPLIT = /,/; - var FN_ARG = /(=.+)?(\s*)$/; - - function stripComments(string) { - let stripped = ''; - let index = 0; - let endBlockComment = string.indexOf('*/'); - while (index < string.length) { - if (string[index] === '/' && string[index+1] === '/') { - // inline comment - let endIndex = string.indexOf('\n', index); - index = (endIndex === -1) ? string.length : endIndex; - } else if ((endBlockComment !== -1) && (string[index] === '/') && (string[index+1] === '*')) { - // block comment - let endIndex = string.indexOf('*/', index); - if (endIndex !== -1) { - index = endIndex + 2; - endBlockComment = string.indexOf('*/', index); - } else { - stripped += string[index]; - index++; - } - } else { - stripped += string[index]; - index++; - } - } - return stripped; - } - - function parseParams(func) { - const src = stripComments(func.toString()); - let match = src.match(FN_ARGS); - if (!match) { - match = src.match(ARROW_FN_ARGS); - } - if (!match) throw new Error('could not parse args in autoInject\nSource:\n' + src) - let [, args] = match; - return args - .replace(/\s/g, '') - .split(FN_ARG_SPLIT) - .map((arg) => arg.replace(FN_ARG, '').trim()); - } - - /** - * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent - * tasks are specified as parameters to the function, after the usual callback - * parameter, with the parameter names matching the names of the tasks it - * depends on. This can provide even more readable task graphs which can be - * easier to maintain. - * - * If a final callback is specified, the task results are similarly injected, - * specified as named parameters after the initial error parameter. - * - * The autoInject function is purely syntactic sugar and its semantics are - * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}. - * - * @name autoInject - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.auto]{@link module:ControlFlow.auto} - * @category Control Flow - * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of - * the form 'func([dependencies...], callback). The object's key of a property - * serves as the name of the task defined by that property, i.e. can be used - * when specifying requirements for other tasks. - * * The `callback` parameter is a `callback(err, result)` which must be called - * when finished, passing an `error` (which can be `null`) and the result of - * the function's execution. The remaining parameters name other tasks on - * which the task is dependent, and the results from those tasks are the - * arguments of those parameters. - * @param {Function} [callback] - An optional callback which is called when all - * the tasks have been completed. It receives the `err` argument if any `tasks` - * pass an error to their callback, and a `results` object with any completed - * task results, similar to `auto`. - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // The example from `auto` can be rewritten as follows: - * async.autoInject({ - * get_data: function(callback) { - * // async code to get some data - * callback(null, 'data', 'converted to array'); - * }, - * make_folder: function(callback) { - * // async code to create a directory to store a file in - * // this is run at the same time as getting the data - * callback(null, 'folder'); - * }, - * write_file: function(get_data, make_folder, callback) { - * // once there is some data and the directory exists, - * // write the data to a file in the directory - * callback(null, 'filename'); - * }, - * email_link: function(write_file, callback) { - * // once the file is written let's email a link to it... - * // write_file contains the filename returned by write_file. - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * } - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - * - * // If you are using a JS minifier that mangles parameter names, `autoInject` - * // will not work with plain functions, since the parameter names will be - * // collapsed to a single letter identifier. To work around this, you can - * // explicitly specify the names of the parameters your task function needs - * // in an array, similar to Angular.js dependency injection. - * - * // This still has an advantage over plain `auto`, since the results a task - * // depends on are still spread into arguments. - * async.autoInject({ - * //... - * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) { - * callback(null, 'filename'); - * }], - * email_link: ['write_file', function(write_file, callback) { - * callback(null, {'file':write_file, 'email':'user@example.com'}); - * }] - * //... - * }, function(err, results) { - * console.log('err = ', err); - * console.log('email_link = ', results.email_link); - * }); - */ - function autoInject(tasks, callback) { - var newTasks = {}; - - Object.keys(tasks).forEach(key => { - var taskFn = tasks[key]; - var params; - var fnIsAsync = isAsync(taskFn); - var hasNoDeps = - (!fnIsAsync && taskFn.length === 1) || - (fnIsAsync && taskFn.length === 0); - - if (Array.isArray(taskFn)) { - params = [...taskFn]; - taskFn = params.pop(); - - newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); - } else if (hasNoDeps) { - // no dependencies, use the function as-is - newTasks[key] = taskFn; - } else { - params = parseParams(taskFn); - if ((taskFn.length === 0 && !fnIsAsync) && params.length === 0) { - throw new Error("autoInject task functions require explicit parameters."); - } - - // remove callback param - if (!fnIsAsync) params.pop(); - - newTasks[key] = params.concat(newTask); - } - - function newTask(results, taskCb) { - var newArgs = params.map(name => results[name]); - newArgs.push(taskCb); - wrapAsync(taskFn)(...newArgs); - } - }); - - return auto(newTasks, callback); - } - - // Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation - // used for queues. This implementation assumes that the node provided by the user can be modified - // to adjust the next and last properties. We implement only the minimal functionality - // for queue support. - class DLL { - constructor() { - this.head = this.tail = null; - this.length = 0; - } - - removeLink(node) { - if (node.prev) node.prev.next = node.next; - else this.head = node.next; - if (node.next) node.next.prev = node.prev; - else this.tail = node.prev; - - node.prev = node.next = null; - this.length -= 1; - return node; - } - - empty () { - while(this.head) this.shift(); - return this; - } - - insertAfter(node, newNode) { - newNode.prev = node; - newNode.next = node.next; - if (node.next) node.next.prev = newNode; - else this.tail = newNode; - node.next = newNode; - this.length += 1; - } - - insertBefore(node, newNode) { - newNode.prev = node.prev; - newNode.next = node; - if (node.prev) node.prev.next = newNode; - else this.head = newNode; - node.prev = newNode; - this.length += 1; - } - - unshift(node) { - if (this.head) this.insertBefore(this.head, node); - else setInitial(this, node); - } - - push(node) { - if (this.tail) this.insertAfter(this.tail, node); - else setInitial(this, node); - } - - shift() { - return this.head && this.removeLink(this.head); - } - - pop() { - return this.tail && this.removeLink(this.tail); - } - - toArray() { - return [...this] - } - - *[Symbol.iterator] () { - var cur = this.head; - while (cur) { - yield cur.data; - cur = cur.next; - } - } - - remove (testFn) { - var curr = this.head; - while(curr) { - var {next} = curr; - if (testFn(curr)) { - this.removeLink(curr); - } - curr = next; - } - return this; - } - } - - function setInitial(dll, node) { - dll.length = 1; - dll.head = dll.tail = node; - } - - function queue$1(worker, concurrency, payload) { - if (concurrency == null) { - concurrency = 1; - } - else if(concurrency === 0) { - throw new RangeError('Concurrency must not be zero'); - } - - var _worker = wrapAsync(worker); - var numRunning = 0; - var workersList = []; - const events = { - error: [], - drain: [], - saturated: [], - unsaturated: [], - empty: [] - }; - - function on (event, handler) { - events[event].push(handler); - } - - function once (event, handler) { - const handleAndRemove = (...args) => { - off(event, handleAndRemove); - handler(...args); - }; - events[event].push(handleAndRemove); - } - - function off (event, handler) { - if (!event) return Object.keys(events).forEach(ev => events[ev] = []) - if (!handler) return events[event] = [] - events[event] = events[event].filter(ev => ev !== handler); - } - - function trigger (event, ...args) { - events[event].forEach(handler => handler(...args)); - } - - var processingScheduled = false; - function _insert(data, insertAtFront, rejectOnError, callback) { - if (callback != null && typeof callback !== 'function') { - throw new Error('task callback must be a function'); - } - q.started = true; - - var res, rej; - function promiseCallback (err, ...args) { - // we don't care about the error, let the global error handler - // deal with it - if (err) return rejectOnError ? rej(err) : res() - if (args.length <= 1) return res(args[0]) - res(args); - } - - var item = q._createTaskItem( - data, - rejectOnError ? promiseCallback : - (callback || promiseCallback) - ); - - if (insertAtFront) { - q._tasks.unshift(item); - } else { - q._tasks.push(item); - } - - if (!processingScheduled) { - processingScheduled = true; - setImmediate$1(() => { - processingScheduled = false; - q.process(); - }); - } - - if (rejectOnError || !callback) { - return new Promise((resolve, reject) => { - res = resolve; - rej = reject; - }) - } - } - - function _createCB(tasks) { - return function (err, ...args) { - numRunning -= 1; - - for (var i = 0, l = tasks.length; i < l; i++) { - var task = tasks[i]; - - var index = workersList.indexOf(task); - if (index === 0) { - workersList.shift(); - } else if (index > 0) { - workersList.splice(index, 1); - } - - task.callback(err, ...args); - - if (err != null) { - trigger('error', err, task.data); - } - } - - if (numRunning <= (q.concurrency - q.buffer) ) { - trigger('unsaturated'); - } - - if (q.idle()) { - trigger('drain'); - } - q.process(); - }; - } - - function _maybeDrain(data) { - if (data.length === 0 && q.idle()) { - // call drain immediately if there are no tasks - setImmediate$1(() => trigger('drain')); - return true - } - return false - } - - const eventMethod = (name) => (handler) => { - if (!handler) { - return new Promise((resolve, reject) => { - once(name, (err, data) => { - if (err) return reject(err) - resolve(data); - }); - }) - } - off(name); - on(name, handler); - - }; - - var isProcessing = false; - var q = { - _tasks: new DLL(), - _createTaskItem (data, callback) { - return { - data, - callback - }; - }, - *[Symbol.iterator] () { - yield* q._tasks[Symbol.iterator](); - }, - concurrency, - payload, - buffer: concurrency / 4, - started: false, - paused: false, - push (data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return - return data.map(datum => _insert(datum, false, false, callback)) - } - return _insert(data, false, false, callback); - }, - pushAsync (data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return - return data.map(datum => _insert(datum, false, true, callback)) - } - return _insert(data, false, true, callback); - }, - kill () { - off(); - q._tasks.empty(); - }, - unshift (data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return - return data.map(datum => _insert(datum, true, false, callback)) - } - return _insert(data, true, false, callback); - }, - unshiftAsync (data, callback) { - if (Array.isArray(data)) { - if (_maybeDrain(data)) return - return data.map(datum => _insert(datum, true, true, callback)) - } - return _insert(data, true, true, callback); - }, - remove (testFn) { - q._tasks.remove(testFn); - }, - process () { - // Avoid trying to start too many processing operations. This can occur - // when callbacks resolve synchronously (#1267). - if (isProcessing) { - return; - } - isProcessing = true; - while(!q.paused && numRunning < q.concurrency && q._tasks.length){ - var tasks = [], data = []; - var l = q._tasks.length; - if (q.payload) l = Math.min(l, q.payload); - for (var i = 0; i < l; i++) { - var node = q._tasks.shift(); - tasks.push(node); - workersList.push(node); - data.push(node.data); - } - - numRunning += 1; - - if (q._tasks.length === 0) { - trigger('empty'); - } - - if (numRunning === q.concurrency) { - trigger('saturated'); - } - - var cb = onlyOnce(_createCB(tasks)); - _worker(data, cb); - } - isProcessing = false; - }, - length () { - return q._tasks.length; - }, - running () { - return numRunning; - }, - workersList () { - return workersList; - }, - idle() { - return q._tasks.length + numRunning === 0; - }, - pause () { - q.paused = true; - }, - resume () { - if (q.paused === false) { return; } - q.paused = false; - setImmediate$1(q.process); - } - }; - // define these as fixed properties, so people get useful errors when updating - Object.defineProperties(q, { - saturated: { - writable: false, - value: eventMethod('saturated') - }, - unsaturated: { - writable: false, - value: eventMethod('unsaturated') - }, - empty: { - writable: false, - value: eventMethod('empty') - }, - drain: { - writable: false, - value: eventMethod('drain') - }, - error: { - writable: false, - value: eventMethod('error') - }, - }); - return q; - } - - /** - * Creates a `cargo` object with the specified payload. Tasks added to the - * cargo will be processed altogether (up to the `payload` limit). If the - * `worker` is in progress, the task is queued until it becomes available. Once - * the `worker` has completed some tasks, each callback of those tasks is - * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) - * for how `cargo` and `queue` work. - * - * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers - * at a time, cargo passes an array of tasks to a single worker, repeating - * when the worker is finished. - * - * @name cargo - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An asynchronous function for processing an array - * of queued tasks. Invoked with `(tasks, callback)`. - * @param {number} [payload=Infinity] - An optional `integer` for determining - * how many tasks should be processed per round; if omitted, the default is - * unlimited. - * @returns {module:ControlFlow.QueueObject} A cargo object to manage the tasks. Callbacks can - * attached as certain properties to listen for specific events during the - * lifecycle of the cargo and inner queue. - * @example - * - * // create a cargo object with payload 2 - * var cargo = async.cargo(function(tasks, callback) { - * for (var i=0; i { - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.reduce(withMissingFileList, 0, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.reduce(fileList, 0, getFileSizeInBytes); - * console.log(result); - * // 6000 - * // which is the sum of the file sizes of the three files - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let result = await async.reduce(withMissingFileList, 0, getFileSizeInBytes); - * console.log(result); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ - function reduce(coll, memo, iteratee, callback) { - callback = once(callback); - var _iteratee = wrapAsync(iteratee); - return eachOfSeries$1(coll, (x, i, iterCb) => { - _iteratee(memo, x, (err, v) => { - memo = v; - iterCb(err); - }); - }, err => callback(err, memo)); - } - var reduce$1 = awaitify(reduce, 4); - - /** - * Version of the compose function that is more natural to read. Each function - * consumes the return value of the previous function. It is the equivalent of - * [compose]{@link module:ControlFlow.compose} with the arguments reversed. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name seq - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.compose]{@link module:ControlFlow.compose} - * @category Control Flow - * @param {...AsyncFunction} functions - the asynchronous functions to compose - * @returns {Function} a function that composes the `functions` in order - * @example - * - * // Requires lodash (or underscore), express3 and dresende's orm2. - * // Part of an app, that fetches cats of the logged user. - * // This example uses `seq` function to avoid overnesting and error - * // handling clutter. - * app.get('/cats', function(request, response) { - * var User = request.models.User; - * async.seq( - * User.get.bind(User), // 'User.get' has signature (id, callback(err, data)) - * function(user, fn) { - * user.getCats(fn); // 'getCats' has signature (callback(err, data)) - * } - * )(req.session.user_id, function (err, cats) { - * if (err) { - * console.error(err); - * response.json({ status: 'error', message: err.message }); - * } else { - * response.json({ status: 'ok', message: 'Cats found', data: cats }); - * } - * }); - * }); - */ - function seq(...functions) { - var _functions = functions.map(wrapAsync); - return function (...args) { - var that = this; - - var cb = args[args.length - 1]; - if (typeof cb == 'function') { - args.pop(); - } else { - cb = promiseCallback(); - } - - reduce$1(_functions, args, (newargs, fn, iterCb) => { - fn.apply(that, newargs.concat((err, ...nextargs) => { - iterCb(err, nextargs); - })); - }, - (err, results) => cb(err, ...results)); - - return cb[PROMISE_SYMBOL] - }; - } - - /** - * Creates a function which is a composition of the passed asynchronous - * functions. Each function consumes the return value of the function that - * follows. Composing functions `f()`, `g()`, and `h()` would produce the result - * of `f(g(h()))`, only this version uses callbacks to obtain the return values. - * - * If the last argument to the composed function is not a function, a promise - * is returned when you call it. - * - * Each function is executed with the `this` binding of the composed function. - * - * @name compose - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {...AsyncFunction} functions - the asynchronous functions to compose - * @returns {Function} an asynchronous function that is the composed - * asynchronous `functions` - * @example - * - * function add1(n, callback) { - * setTimeout(function () { - * callback(null, n + 1); - * }, 10); - * } - * - * function mul3(n, callback) { - * setTimeout(function () { - * callback(null, n * 3); - * }, 10); - * } - * - * var add1mul3 = async.compose(mul3, add1); - * add1mul3(4, function (err, result) { - * // result now equals 15 - * }); - */ - function compose(...args) { - return seq(...args.reverse()); - } - - /** - * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time. - * - * @name mapLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.map]{@link module:Collections.map} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with the transformed item. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Results is an array of the - * transformed items from the `coll`. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ - function mapLimit (coll, limit, iteratee, callback) { - return _asyncMap(eachOfLimit$2(limit), coll, iteratee, callback) - } - var mapLimit$1 = awaitify(mapLimit, 4); - - /** - * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time. - * - * @name concatLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @alias flatMapLimit - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - */ - function concatLimit(coll, limit, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val, iterCb) => { - _iteratee(val, (err, ...args) => { - if (err) return iterCb(err); - return iterCb(err, args); - }); - }, (err, mapResults) => { - var result = []; - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - result = result.concat(...mapResults[i]); - } - } - - return callback(err, result); - }); - } - var concatLimit$1 = awaitify(concatLimit, 4); - - /** - * Applies `iteratee` to each item in `coll`, concatenating the results. Returns - * the concatenated list. The `iteratee`s are called in parallel, and the - * results are concatenated as they return. The results array will be returned in - * the original order of `coll` passed to the `iteratee` function. - * - * @name concat - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @alias flatMap - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`, - * which should use an array as its result. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * let directoryList = ['dir1','dir2','dir3']; - * let withMissingDirectoryList = ['dir1','dir2','dir3', 'dir4']; - * - * // Using callbacks - * async.concat(directoryList, fs.readdir, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * } - * }); - * - * // Error Handling - * async.concat(withMissingDirectoryList, fs.readdir, function(err, results) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * } else { - * console.log(results); - * } - * }); - * - * // Using Promises - * async.concat(directoryList, fs.readdir) - * .then(results => { - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * }).catch(err => { - * console.log(err); - * }); - * - * // Error Handling - * async.concat(withMissingDirectoryList, fs.readdir) - * .then(results => { - * console.log(results); - * }).catch(err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.concat(directoryList, fs.readdir); - * console.log(results); - * // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ] - * } catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let results = await async.concat(withMissingDirectoryList, fs.readdir); - * console.log(results); - * } catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4 does not exist - * } - * } - * - */ - function concat(coll, iteratee, callback) { - return concatLimit$1(coll, Infinity, iteratee, callback) - } - var concat$1 = awaitify(concat, 3); - - /** - * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time. - * - * @name concatSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.concat]{@link module:Collections.concat} - * @category Collection - * @alias flatMapSeries - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`. - * The iteratee should complete with an array an array of results. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is an array - * containing the concatenated results of the `iteratee` function. Invoked with - * (err, results). - * @returns A Promise, if no callback is passed - */ - function concatSeries(coll, iteratee, callback) { - return concatLimit$1(coll, 1, iteratee, callback) - } - var concatSeries$1 = awaitify(concatSeries, 3); - - /** - * Returns a function that when called, calls-back with the values provided. - * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to - * [`auto`]{@link module:ControlFlow.auto}. - * - * @name constant - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {...*} arguments... - Any number of arguments to automatically invoke - * callback with. - * @returns {AsyncFunction} Returns a function that when invoked, automatically - * invokes the callback with the previous given arguments. - * @example - * - * async.waterfall([ - * async.constant(42), - * function (value, next) { - * // value === 42 - * }, - * //... - * ], callback); - * - * async.waterfall([ - * async.constant(filename, "utf8"), - * fs.readFile, - * function (fileData, next) { - * //... - * } - * //... - * ], callback); - * - * async.auto({ - * hostname: async.constant("https://server.net/"), - * port: findFreePort, - * launchServer: ["hostname", "port", function (options, cb) { - * startServer(options, cb); - * }], - * //... - * }, callback); - */ - function constant$1(...args) { - return function (...ignoredArgs/*, callback*/) { - var callback = ignoredArgs.pop(); - return callback(null, ...args); - }; - } - - function _createTester(check, getResult) { - return (eachfn, arr, _iteratee, cb) => { - var testPassed = false; - var testResult; - const iteratee = wrapAsync(_iteratee); - eachfn(arr, (value, _, callback) => { - iteratee(value, (err, result) => { - if (err || err === false) return callback(err); - - if (check(result) && !testResult) { - testPassed = true; - testResult = getResult(true, value); - return callback(null, breakLoop$1); - } - callback(); - }); - }, err => { - if (err) return cb(err); - cb(null, testPassed ? testResult : getResult(false)); - }); - }; - } - - /** - * Returns the first value in `coll` that passes an async truth test. The - * `iteratee` is applied in parallel, meaning the first iteratee to return - * `true` will fire the detect `callback` with that result. That means the - * result might not be the first item in the original `coll` (in terms of order) - * that passes the test. - - * If order within the original `coll` is important, then look at - * [`detectSeries`]{@link module:Collections.detectSeries}. - * - * @name detect - * @static - * @memberOf module:Collections - * @method - * @alias find - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // dir1/file1.txt - * // result now equals the first file in the list that exists - * } - *); - * - * // Using Promises - * async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists) - * .then(result => { - * console.log(result); - * // dir1/file1.txt - * // result now equals the first file in the list that exists - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists); - * console.log(result); - * // dir1/file1.txt - * // result now equals the file in the list that exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function detect(coll, iteratee, callback) { - return _createTester(bool => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback) - } - var detect$1 = awaitify(detect, 3); - - /** - * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a - * time. - * - * @name detectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findLimit - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns {Promise} a promise, if a callback is omitted - */ - function detectLimit(coll, limit, iteratee, callback) { - return _createTester(bool => bool, (res, item) => item)(eachOfLimit$2(limit), coll, iteratee, callback) - } - var detectLimit$1 = awaitify(detectLimit, 4); - - /** - * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. - * - * @name detectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.detect]{@link module:Collections.detect} - * @alias findSeries - * @category Collections - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. - * The iteratee must complete with a boolean value as its result. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the `iteratee` functions have finished. - * Result will be the first item in the array that passes the truth test - * (iteratee) or the value `undefined` if none passed. Invoked with - * (err, result). - * @returns {Promise} a promise, if a callback is omitted - */ - function detectSeries(coll, iteratee, callback) { - return _createTester(bool => bool, (res, item) => item)(eachOfLimit$2(1), coll, iteratee, callback) - } - - var detectSeries$1 = awaitify(detectSeries, 3); - - function consoleFunc(name) { - return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => { - /* istanbul ignore else */ - if (typeof console === 'object') { - /* istanbul ignore else */ - if (err) { - /* istanbul ignore else */ - if (console.error) { - console.error(err); - } - } else if (console[name]) { /* istanbul ignore else */ - resultArgs.forEach(x => console[name](x)); - } - } - }) - } - - /** - * Logs the result of an [`async` function]{@link AsyncFunction} to the - * `console` using `console.dir` to display the properties of the resulting object. - * Only works in Node.js or in browsers that support `console.dir` and - * `console.error` (such as FF and Chrome). - * If multiple arguments are returned from the async function, - * `console.dir` is called on each argument in order. - * - * @name dir - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, {hello: name}); - * }, 1000); - * }; - * - * // in the node repl - * node> async.dir(hello, 'world'); - * {hello: 'world'} - */ - var dir = consoleFunc('dir'); - - /** - * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in - * the order of operations, the arguments `test` and `iteratee` are switched. - * - * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. - * - * @name doWhilst - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - A function which is called each time `test` - * passes. Invoked with (callback). - * @param {AsyncFunction} test - asynchronous truth test to perform after each - * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the - * non-error args from the previous callback of `iteratee`. - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. - * `callback` will be passed an error and any arguments passed to the final - * `iteratee`'s callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - */ - function doWhilst(iteratee, test, callback) { - callback = onlyOnce(callback); - var _fn = wrapAsync(iteratee); - var _test = wrapAsync(test); - var results; - - function next(err, ...args) { - if (err) return callback(err); - if (err === false) return; - results = args; - _test(...args, check); - } - - function check(err, truth) { - if (err) return callback(err); - if (err === false) return; - if (!truth) return callback(null, ...results); - _fn(next); - } - - return check(null, true); - } - - var doWhilst$1 = awaitify(doWhilst, 3); - - /** - * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the - * argument ordering differs from `until`. - * - * @name doUntil - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.doWhilst]{@link module:ControlFlow.doWhilst} - * @category Control Flow - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {AsyncFunction} test - asynchronous truth test to perform after each - * execution of `iteratee`. Invoked with (...args, callback), where `...args` are the - * non-error args from the previous callback of `iteratee` - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - */ - function doUntil(iteratee, test, callback) { - const _test = wrapAsync(test); - return doWhilst$1(iteratee, (...args) => { - const cb = args.pop(); - _test(...args, (err, truth) => cb (err, !truth)); - }, callback); - } - - function _withoutIndex(iteratee) { - return (value, index, callback) => iteratee(value, callback); - } - - /** - * Applies the function `iteratee` to each item in `coll`, in parallel. - * The `iteratee` is called with an item from the list, and a callback for when - * it has finished. If the `iteratee` passes an error to its `callback`, the - * main `callback` (for the `each` function) is immediately called with the - * error. - * - * Note, that since this function applies `iteratee` to each item in parallel, - * there is no guarantee that the iteratee functions will complete in order. - * - * @name each - * @static - * @memberOf module:Collections - * @method - * @alias forEach - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to - * each item in `coll`. Invoked with (item, callback). - * The array index is not passed to the iteratee. - * If you need the index, use `eachOf`. - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt']; - * const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt']; - * - * // asynchronous function that deletes a file - * const deleteFile = function(file, callback) { - * fs.unlink(file, callback); - * }; - * - * // Using callbacks - * async.each(fileList, deleteFile, function(err) { - * if( err ) { - * console.log(err); - * } else { - * console.log('All files have been deleted successfully'); - * } - * }); - * - * // Error Handling - * async.each(withMissingFileList, deleteFile, function(err){ - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * }); - * - * // Using Promises - * async.each(fileList, deleteFile) - * .then( () => { - * console.log('All files have been deleted successfully'); - * }).catch( err => { - * console.log(err); - * }); - * - * // Error Handling - * async.each(fileList, deleteFile) - * .then( () => { - * console.log('All files have been deleted successfully'); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * }); - * - * // Using async/await - * async () => { - * try { - * await async.each(files, deleteFile); - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * await async.each(withMissingFileList, deleteFile); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * // since dir4/file2.txt does not exist - * // dir1/file1.txt could have been deleted - * } - * } - * - */ - function eachLimit$2(coll, iteratee, callback) { - return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback); - } - - var each = awaitify(eachLimit$2, 3); - - /** - * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. - * - * @name eachLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfLimit`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ - function eachLimit(coll, limit, iteratee, callback) { - return eachOfLimit$2(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback); - } - var eachLimit$1 = awaitify(eachLimit, 4); - - /** - * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. - * - * Note, that unlike [`each`]{@link module:Collections.each}, this function applies iteratee to each item - * in series and therefore the iteratee functions will complete in order. - - * @name eachSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.each]{@link module:Collections.each} - * @alias forEachSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each - * item in `coll`. - * The array index is not passed to the iteratee. - * If you need the index, use `eachOfSeries`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called when all - * `iteratee` functions have finished, or an error occurs. Invoked with (err). - * @returns {Promise} a promise, if a callback is omitted - */ - function eachSeries(coll, iteratee, callback) { - return eachLimit$1(coll, 1, iteratee, callback) - } - var eachSeries$1 = awaitify(eachSeries, 3); - - /** - * Wrap an async function and ensure it calls its callback on a later tick of - * the event loop. If the function already calls its callback on a next tick, - * no extra deferral is added. This is useful for preventing stack overflows - * (`RangeError: Maximum call stack size exceeded`) and generally keeping - * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) - * contained. ES2017 `async` functions are returned as-is -- they are immune - * to Zalgo's corrupting influences, as they always resolve on a later tick. - * - * @name ensureAsync - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - an async function, one that expects a node-style - * callback as its last argument. - * @returns {AsyncFunction} Returns a wrapped function with the exact same call - * signature as the function passed in. - * @example - * - * function sometimesAsync(arg, callback) { - * if (cache[arg]) { - * return callback(null, cache[arg]); // this would be synchronous!! - * } else { - * doSomeIO(arg, callback); // this IO would be asynchronous - * } - * } - * - * // this has a risk of stack overflows if many results are cached in a row - * async.mapSeries(args, sometimesAsync, done); - * - * // this will defer sometimesAsync's callback if necessary, - * // preventing stack overflows - * async.mapSeries(args, async.ensureAsync(sometimesAsync), done); - */ - function ensureAsync(fn) { - if (isAsync(fn)) return fn; - return function (...args/*, callback*/) { - var callback = args.pop(); - var sync = true; - args.push((...innerArgs) => { - if (sync) { - setImmediate$1(() => callback(...innerArgs)); - } else { - callback(...innerArgs); - } - }); - fn.apply(this, args); - sync = false; - }; - } - - /** - * Returns `true` if every element in `coll` satisfies an async test. If any - * iteratee call returns `false`, the main `callback` is immediately called. - * - * @name every - * @static - * @memberOf module:Collections - * @method - * @alias all - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file5.txt']; - * const withMissingFileList = ['file1.txt','file2.txt','file4.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.every(fileList, fileExists, function(err, result) { - * console.log(result); - * // true - * // result is true since every file exists - * }); - * - * async.every(withMissingFileList, fileExists, function(err, result) { - * console.log(result); - * // false - * // result is false since NOT every file exists - * }); - * - * // Using Promises - * async.every(fileList, fileExists) - * .then( result => { - * console.log(result); - * // true - * // result is true since every file exists - * }).catch( err => { - * console.log(err); - * }); - * - * async.every(withMissingFileList, fileExists) - * .then( result => { - * console.log(result); - * // false - * // result is false since NOT every file exists - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.every(fileList, fileExists); - * console.log(result); - * // true - * // result is true since every file exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - * async () => { - * try { - * let result = await async.every(withMissingFileList, fileExists); - * console.log(result); - * // false - * // result is false since NOT every file exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function every(coll, iteratee, callback) { - return _createTester(bool => !bool, res => !res)(eachOf$1, coll, iteratee, callback) - } - var every$1 = awaitify(every, 3); - - /** - * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. - * - * @name everyLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in parallel. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ - function everyLimit(coll, limit, iteratee, callback) { - return _createTester(bool => !bool, res => !res)(eachOfLimit$2(limit), coll, iteratee, callback) - } - var everyLimit$1 = awaitify(everyLimit, 4); - - /** - * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. - * - * @name everySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.every]{@link module:Collections.every} - * @alias allSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collection in series. - * The iteratee must complete with a boolean result value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result will be either `true` or `false` - * depending on the values of the async tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ - function everySeries(coll, iteratee, callback) { - return _createTester(bool => !bool, res => !res)(eachOfSeries$1, coll, iteratee, callback) - } - var everySeries$1 = awaitify(everySeries, 3); - - function filterArray(eachfn, arr, iteratee, callback) { - var truthValues = new Array(arr.length); - eachfn(arr, (x, index, iterCb) => { - iteratee(x, (err, v) => { - truthValues[index] = !!v; - iterCb(err); - }); - }, err => { - if (err) return callback(err); - var results = []; - for (var i = 0; i < arr.length; i++) { - if (truthValues[i]) results.push(arr[i]); - } - callback(null, results); - }); - } - - function filterGeneric(eachfn, coll, iteratee, callback) { - var results = []; - eachfn(coll, (x, index, iterCb) => { - iteratee(x, (err, v) => { - if (err) return iterCb(err); - if (v) { - results.push({index, value: x}); - } - iterCb(err); - }); - }, err => { - if (err) return callback(err); - callback(null, results - .sort((a, b) => a.index - b.index) - .map(v => v.value)); - }); - } - - function _filter(eachfn, coll, iteratee, callback) { - var filter = isArrayLike(coll) ? filterArray : filterGeneric; - return filter(eachfn, coll, wrapAsync(iteratee), callback); - } - - /** - * Returns a new array of all the values in `coll` which pass an async truth - * test. This operation is performed in parallel, but the results array will be - * in the same order as the original. - * - * @name filter - * @static - * @memberOf module:Collections - * @method - * @alias select - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * const files = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.filter(files, fileExists, function(err, results) { - * if(err) { - * console.log(err); - * } else { - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * } - * }); - * - * // Using Promises - * async.filter(files, fileExists) - * .then(results => { - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.filter(files, fileExists); - * console.log(results); - * // [ 'dir1/file1.txt', 'dir2/file3.txt' ] - * // results is now an array of the existing files - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function filter (coll, iteratee, callback) { - return _filter(eachOf$1, coll, iteratee, callback) - } - var filter$1 = awaitify(filter, 3); - - /** - * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a - * time. - * - * @name filterLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback provided - */ - function filterLimit (coll, limit, iteratee, callback) { - return _filter(eachOfLimit$2(limit), coll, iteratee, callback) - } - var filterLimit$1 = awaitify(filterLimit, 4); - - /** - * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. - * - * @name filterSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @alias selectSeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - A truth test to apply to each item in `coll`. - * The `iteratee` is passed a `callback(err, truthValue)`, which must be called - * with a boolean argument once it has completed. Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results) - * @returns {Promise} a promise, if no callback provided - */ - function filterSeries (coll, iteratee, callback) { - return _filter(eachOfSeries$1, coll, iteratee, callback) - } - var filterSeries$1 = awaitify(filterSeries, 3); - - /** - * Calls the asynchronous function `fn` with a callback parameter that allows it - * to call itself again, in series, indefinitely. - - * If an error is passed to the callback then `errback` is called with the - * error, and execution stops, otherwise it will never be called. - * - * @name forever - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} fn - an async function to call repeatedly. - * Invoked with (next). - * @param {Function} [errback] - when `fn` passes an error to it's callback, - * this function will be called, and execution stops. Invoked with (err). - * @returns {Promise} a promise that rejects if an error occurs and an errback - * is not passed - * @example - * - * async.forever( - * function(next) { - * // next is suitable for passing to things that need a callback(err [, whatever]); - * // it will result in this function being called again. - * }, - * function(err) { - * // if next is called with a value in its first parameter, it will appear - * // in here as 'err', and execution will stop. - * } - * ); - */ - function forever(fn, errback) { - var done = onlyOnce(errback); - var task = wrapAsync(ensureAsync(fn)); - - function next(err) { - if (err) return done(err); - if (err === false) return; - task(next); - } - return next(); - } - var forever$1 = awaitify(forever, 2); - - /** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time. - * - * @name groupByLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - * @returns {Promise} a promise, if no callback is passed - */ - function groupByLimit(coll, limit, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - return mapLimit$1(coll, limit, (val, iterCb) => { - _iteratee(val, (err, key) => { - if (err) return iterCb(err); - return iterCb(err, {key, val}); - }); - }, (err, mapResults) => { - var result = {}; - // from MDN, handle object having an `hasOwnProperty` prop - var {hasOwnProperty} = Object.prototype; - - for (var i = 0; i < mapResults.length; i++) { - if (mapResults[i]) { - var {key} = mapResults[i]; - var {val} = mapResults[i]; - - if (hasOwnProperty.call(result, key)) { - result[key].push(val); - } else { - result[key] = [val]; - } - } - } - - return callback(err, result); - }); - } - - var groupByLimit$1 = awaitify(groupByLimit, 4); - - /** - * Returns a new object, where each value corresponds to an array of items, from - * `coll`, that returned the corresponding key. That is, the keys of the object - * correspond to the values passed to the `iteratee` callback. - * - * Note: Since this function applies the `iteratee` to each item in parallel, - * there is no guarantee that the `iteratee` functions will complete in order. - * However, the values for each key in the `result` will be in the same order as - * the original `coll`. For Objects, the values will roughly be in the order of - * the original Objects' keys (but this can vary across JavaScript engines). - * - * @name groupBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whoses - * properties are arrays of values which returned the corresponding key. - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * const files = ['dir1/file1.txt','dir2','dir4'] - * - * // asynchronous function that detects file type as none, file, or directory - * function detectFile(file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(null, 'none'); - * } - * callback(null, stat.isDirectory() ? 'directory' : 'file'); - * }); - * } - * - * //Using callbacks - * async.groupBy(files, detectFile, function(err, result) { - * if(err) { - * console.log(err); - * } else { - * console.log(result); - * // { - * // file: [ 'dir1/file1.txt' ], - * // none: [ 'dir4' ], - * // directory: [ 'dir2'] - * // } - * // result is object containing the files grouped by type - * } - * }); - * - * // Using Promises - * async.groupBy(files, detectFile) - * .then( result => { - * console.log(result); - * // { - * // file: [ 'dir1/file1.txt' ], - * // none: [ 'dir4' ], - * // directory: [ 'dir2'] - * // } - * // result is object containing the files grouped by type - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.groupBy(files, detectFile); - * console.log(result); - * // { - * // file: [ 'dir1/file1.txt' ], - * // none: [ 'dir4' ], - * // directory: [ 'dir2'] - * // } - * // result is object containing the files grouped by type - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function groupBy (coll, iteratee, callback) { - return groupByLimit$1(coll, Infinity, iteratee, callback) - } - - /** - * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time. - * - * @name groupBySeries - * @static - * @memberOf module:Collections - * @method - * @see [async.groupBy]{@link module:Collections.groupBy} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a `key` to group the value under. - * Invoked with (value, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. Result is an `Object` whose - * properties are arrays of values which returned the corresponding key. - * @returns {Promise} a promise, if no callback is passed - */ - function groupBySeries (coll, iteratee, callback) { - return groupByLimit$1(coll, 1, iteratee, callback) - } - - /** - * Logs the result of an `async` function to the `console`. Only works in - * Node.js or in browsers that support `console.log` and `console.error` (such - * as FF and Chrome). If multiple arguments are returned from the async - * function, `console.log` is called on each argument in order. - * - * @name log - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} function - The function you want to eventually apply - * all arguments to. - * @param {...*} arguments... - Any number of arguments to apply to the function. - * @example - * - * // in a module - * var hello = function(name, callback) { - * setTimeout(function() { - * callback(null, 'hello ' + name); - * }, 1000); - * }; - * - * // in the node repl - * node> async.log(hello, 'world'); - * 'hello world' - */ - var log = consoleFunc('log'); - - /** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a - * time. - * - * @name mapValuesLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback is passed - */ - function mapValuesLimit(obj, limit, iteratee, callback) { - callback = once(callback); - var newObj = {}; - var _iteratee = wrapAsync(iteratee); - return eachOfLimit$2(limit)(obj, (val, key, next) => { - _iteratee(val, key, (err, result) => { - if (err) return next(err); - newObj[key] = result; - next(err); - }); - }, err => callback(err, newObj)); - } - - var mapValuesLimit$1 = awaitify(mapValuesLimit, 4); - - /** - * A relative of [`map`]{@link module:Collections.map}, designed for use with objects. - * - * Produces a new Object by mapping each value of `obj` through the `iteratee` - * function. The `iteratee` is called each `value` and `key` from `obj` and a - * callback for when it has finished processing. Each of these callbacks takes - * two arguments: an `error`, and the transformed item from `obj`. If `iteratee` - * passes an error to its callback, the main `callback` (for the `mapValues` - * function) is immediately called with the error. - * - * Note, the order of the keys in the result is not guaranteed. The keys will - * be roughly in the order they complete, (but this is very engine-specific) - * - * @name mapValues - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * // file4.txt does not exist - * - * const fileMap = { - * f1: 'file1.txt', - * f2: 'file2.txt', - * f3: 'file3.txt' - * }; - * - * const withMissingFileMap = { - * f1: 'file1.txt', - * f2: 'file2.txt', - * f3: 'file4.txt' - * }; - * - * // asynchronous function that returns the file size in bytes - * function getFileSizeInBytes(file, key, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, stat.size); - * }); - * } - * - * // Using callbacks - * async.mapValues(fileMap, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * } else { - * console.log(result); - * // result is now a map of file size in bytes for each file, e.g. - * // { - * // f1: 1000, - * // f2: 2000, - * // f3: 3000 - * // } - * } - * }); - * - * // Error handling - * async.mapValues(withMissingFileMap, getFileSizeInBytes, function(err, result) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(result); - * } - * }); - * - * // Using Promises - * async.mapValues(fileMap, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * // result is now a map of file size in bytes for each file, e.g. - * // { - * // f1: 1000, - * // f2: 2000, - * // f3: 3000 - * // } - * }).catch (err => { - * console.log(err); - * }); - * - * // Error Handling - * async.mapValues(withMissingFileMap, getFileSizeInBytes) - * .then( result => { - * console.log(result); - * }).catch (err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.mapValues(fileMap, getFileSizeInBytes); - * console.log(result); - * // result is now a map of file size in bytes for each file, e.g. - * // { - * // f1: 1000, - * // f2: 2000, - * // f3: 3000 - * // } - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // Error Handling - * async () => { - * try { - * let result = await async.mapValues(withMissingFileMap, getFileSizeInBytes); - * console.log(result); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ - function mapValues(obj, iteratee, callback) { - return mapValuesLimit$1(obj, Infinity, iteratee, callback) - } - - /** - * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time. - * - * @name mapValuesSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.mapValues]{@link module:Collections.mapValues} - * @category Collection - * @param {Object} obj - A collection to iterate over. - * @param {AsyncFunction} iteratee - A function to apply to each value and key - * in `coll`. - * The iteratee should complete with the transformed value as its result. - * Invoked with (value, key, callback). - * @param {Function} [callback] - A callback which is called when all `iteratee` - * functions have finished, or an error occurs. `result` is a new object consisting - * of each key from `obj`, with each transformed value on the right-hand side. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback is passed - */ - function mapValuesSeries(obj, iteratee, callback) { - return mapValuesLimit$1(obj, 1, iteratee, callback) - } - - /** - * Caches the results of an async function. When creating a hash to store - * function results against, the callback is omitted from the hash and an - * optional hash function can be used. - * - * **Note: if the async function errs, the result will not be cached and - * subsequent calls will call the wrapped function.** - * - * If no hash function is specified, the first argument is used as a hash key, - * which may work reasonably if it is a string or a data type that converts to a - * distinct string. Note that objects and arrays will not behave reasonably. - * Neither will cases where the other arguments are significant. In such cases, - * specify your own hash function. - * - * The cache of results is exposed as the `memo` property of the function - * returned by `memoize`. - * - * @name memoize - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function to proxy and cache results from. - * @param {Function} hasher - An optional function for generating a custom hash - * for storing results. It has all the arguments applied to it apart from the - * callback, and must be synchronous. - * @returns {AsyncFunction} a memoized version of `fn` - * @example - * - * var slow_fn = function(name, callback) { - * // do something - * callback(null, result); - * }; - * var fn = async.memoize(slow_fn); - * - * // fn can now be used as if it were slow_fn - * fn('some name', function() { - * // callback - * }); - */ - function memoize(fn, hasher = v => v) { - var memo = Object.create(null); - var queues = Object.create(null); - var _fn = wrapAsync(fn); - var memoized = initialParams((args, callback) => { - var key = hasher(...args); - if (key in memo) { - setImmediate$1(() => callback(null, ...memo[key])); - } else if (key in queues) { - queues[key].push(callback); - } else { - queues[key] = [callback]; - _fn(...args, (err, ...resultArgs) => { - // #1465 don't memoize if an error occurred - if (!err) { - memo[key] = resultArgs; - } - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i](err, ...resultArgs); - } - }); - } - }); - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - } - - /* istanbul ignore file */ - - /** - * Calls `callback` on a later loop around the event loop. In Node.js this just - * calls `process.nextTick`. In the browser it will use `setImmediate` if - * available, otherwise `setTimeout(callback, 0)`, which means other higher - * priority events may precede the execution of `callback`. - * - * This is used internally for browser-compatibility purposes. - * - * @name nextTick - * @static - * @memberOf module:Utils - * @method - * @see [async.setImmediate]{@link module:Utils.setImmediate} - * @category Util - * @param {Function} callback - The function to call on a later loop around - * the event loop. Invoked with (args...). - * @param {...*} args... - any number of additional arguments to pass to the - * callback on the next tick. - * @example - * - * var call_order = []; - * async.nextTick(function() { - * call_order.push('two'); - * // call_order now equals ['one','two'] - * }); - * call_order.push('one'); - * - * async.setImmediate(function (a, b, c) { - * // a, b, and c equal 1, 2, and 3 - * }, 1, 2, 3); - */ - var _defer; - - if (hasNextTick) { - _defer = process.nextTick; - } else if (hasSetImmediate) { - _defer = setImmediate; - } else { - _defer = fallback; - } - - var nextTick = wrap(_defer); - - var _parallel = awaitify((eachfn, tasks, callback) => { - var results = isArrayLike(tasks) ? [] : {}; - - eachfn(tasks, (task, key, taskCb) => { - wrapAsync(task)((err, ...result) => { - if (result.length < 2) { - [result] = result; - } - results[key] = result; - taskCb(err); - }); - }, err => callback(err, results)); - }, 3); - - /** - * Run the `tasks` collection of functions in parallel, without waiting until - * the previous function has completed. If any of the functions pass an error to - * its callback, the main `callback` is immediately called with the value of the - * error. Once the `tasks` have completed, the results are passed to the final - * `callback` as an array. - * - * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about - * parallel execution of code. If your tasks do not use any timers or perform - * any I/O, they will actually be executed in series. Any synchronous setup - * sections for each task will happen one after the other. JavaScript remains - * single-threaded. - * - * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the - * execution of other tasks when a task fails. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.parallel}. - * - * @name parallel - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - * @returns {Promise} a promise, if a callback is not passed - * - * @example - * - * //Using Callbacks - * async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], function(err, results) { - * console.log(results); - * // results is equal to ['one','two'] even though - * // the second function had a shorter timeout. - * }); - * - * // an example using an object instead of an array - * async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }); - * - * //Using Promises - * async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]).then(results => { - * console.log(results); - * // results is equal to ['one','two'] even though - * // the second function had a shorter timeout. - * }).catch(err => { - * console.log(err); - * }); - * - * // an example using an object instead of an array - * async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }).then(results => { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }).catch(err => { - * console.log(err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.parallel([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]); - * console.log(results); - * // results is equal to ['one','two'] even though - * // the second function had a shorter timeout. - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // an example using an object instead of an array - * async () => { - * try { - * let results = await async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * callback(null, 2); - * }, 100); - * } - * }); - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function parallel(tasks, callback) { - return _parallel(eachOf$1, tasks, callback); - } - - /** - * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a - * time. - * - * @name parallelLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.parallel]{@link module:ControlFlow.parallel} - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection of - * [async functions]{@link AsyncFunction} to run. - * Each async function can complete with any number of optional `result` values. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed successfully. This function gets a results array - * (or object) containing all the result arguments passed to the task callbacks. - * Invoked with (err, results). - * @returns {Promise} a promise, if a callback is not passed - */ - function parallelLimit(tasks, limit, callback) { - return _parallel(eachOfLimit$2(limit), tasks, callback); - } - - /** - * A queue of tasks for the worker function to complete. - * @typedef {Iterable} QueueObject - * @memberOf module:ControlFlow - * @property {Function} length - a function returning the number of items - * waiting to be processed. Invoke with `queue.length()`. - * @property {boolean} started - a boolean indicating whether or not any - * items have been pushed and processed by the queue. - * @property {Function} running - a function returning the number of items - * currently being processed. Invoke with `queue.running()`. - * @property {Function} workersList - a function returning the array of items - * currently being processed. Invoke with `queue.workersList()`. - * @property {Function} idle - a function returning false if there are items - * waiting or being processed, or true if not. Invoke with `queue.idle()`. - * @property {number} concurrency - an integer for determining how many `worker` - * functions should be run in parallel. This property can be changed after a - * `queue` is created to alter the concurrency on-the-fly. - * @property {number} payload - an integer that specifies how many items are - * passed to the worker function at a time. only applies if this is a - * [cargo]{@link module:ControlFlow.cargo} object - * @property {AsyncFunction} push - add a new task to the `queue`. Calls `callback` - * once the `worker` has finished processing the task. Instead of a single task, - * a `tasks` array can be submitted. The respective callback is used for every - * task in the list. Invoke with `queue.push(task, [callback])`, - * @property {AsyncFunction} unshift - add a new task to the front of the `queue`. - * Invoke with `queue.unshift(task, [callback])`. - * @property {AsyncFunction} pushAsync - the same as `q.push`, except this returns - * a promise that rejects if an error occurs. - * @property {AsyncFunction} unshiftAsync - the same as `q.unshift`, except this returns - * a promise that rejects if an error occurs. - * @property {Function} remove - remove items from the queue that match a test - * function. The test function will be passed an object with a `data` property, - * and a `priority` property, if this is a - * [priorityQueue]{@link module:ControlFlow.priorityQueue} object. - * Invoked with `queue.remove(testFn)`, where `testFn` is of the form - * `function ({data, priority}) {}` and returns a Boolean. - * @property {Function} saturated - a function that sets a callback that is - * called when the number of running workers hits the `concurrency` limit, and - * further tasks will be queued. If the callback is omitted, `q.saturated()` - * returns a promise for the next occurrence. - * @property {Function} unsaturated - a function that sets a callback that is - * called when the number of running workers is less than the `concurrency` & - * `buffer` limits, and further tasks will not be queued. If the callback is - * omitted, `q.unsaturated()` returns a promise for the next occurrence. - * @property {number} buffer - A minimum threshold buffer in order to say that - * the `queue` is `unsaturated`. - * @property {Function} empty - a function that sets a callback that is called - * when the last item from the `queue` is given to a `worker`. If the callback - * is omitted, `q.empty()` returns a promise for the next occurrence. - * @property {Function} drain - a function that sets a callback that is called - * when the last item from the `queue` has returned from the `worker`. If the - * callback is omitted, `q.drain()` returns a promise for the next occurrence. - * @property {Function} error - a function that sets a callback that is called - * when a task errors. Has the signature `function(error, task)`. If the - * callback is omitted, `error()` returns a promise that rejects on the next - * error. - * @property {boolean} paused - a boolean for determining whether the queue is - * in a paused state. - * @property {Function} pause - a function that pauses the processing of tasks - * until `resume()` is called. Invoke with `queue.pause()`. - * @property {Function} resume - a function that resumes the processing of - * queued tasks when the queue is paused. Invoke with `queue.resume()`. - * @property {Function} kill - a function that removes the `drain` callback and - * empties remaining tasks from the queue forcing it to go idle. No more tasks - * should be pushed to the queue after calling this function. Invoke with `queue.kill()`. - * - * @example - * const q = async.queue(worker, 2) - * q.push(item1) - * q.push(item2) - * q.push(item3) - * // queues are iterable, spread into an array to inspect - * const items = [...q] // [item1, item2, item3] - * // or use for of - * for (let item of q) { - * console.log(item) - * } - * - * q.drain(() => { - * console.log('all done') - * }) - * // or - * await q.drain() - */ - - /** - * Creates a `queue` object with the specified `concurrency`. Tasks added to the - * `queue` are processed in parallel (up to the `concurrency` limit). If all - * `worker`s are in progress, the task is queued until one becomes available. - * Once a `worker` completes a `task`, that `task`'s callback is called. - * - * @name queue - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. Invoked with (task, callback). - * @param {number} [concurrency=1] - An `integer` for determining how many - * `worker` functions should be run in parallel. If omitted, the concurrency - * defaults to `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can be - * attached as certain properties to listen for specific events during the - * lifecycle of the queue. - * @example - * - * // create a queue object with concurrency 2 - * var q = async.queue(function(task, callback) { - * console.log('hello ' + task.name); - * callback(); - * }, 2); - * - * // assign a callback - * q.drain(function() { - * console.log('all items have been processed'); - * }); - * // or await the end - * await q.drain() - * - * // assign an error callback - * q.error(function(err, task) { - * console.error('task experienced an error'); - * }); - * - * // add some items to the queue - * q.push({name: 'foo'}, function(err) { - * console.log('finished processing foo'); - * }); - * // callback is optional - * q.push({name: 'bar'}); - * - * // add some items to the queue (batch-wise) - * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) { - * console.log('finished processing item'); - * }); - * - * // add some items to the front of the queue - * q.unshift({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); - */ - function queue (worker, concurrency) { - var _worker = wrapAsync(worker); - return queue$1((items, cb) => { - _worker(items[0], cb); - }, concurrency, 1); - } - - // Binary min-heap implementation used for priority queue. - // Implementation is stable, i.e. push time is considered for equal priorities - class Heap { - constructor() { - this.heap = []; - this.pushCount = Number.MIN_SAFE_INTEGER; - } - - get length() { - return this.heap.length; - } - - empty () { - this.heap = []; - return this; - } - - percUp(index) { - let p; - - while (index > 0 && smaller(this.heap[index], this.heap[p=parent(index)])) { - let t = this.heap[index]; - this.heap[index] = this.heap[p]; - this.heap[p] = t; - - index = p; - } - } - - percDown(index) { - let l; - - while ((l=leftChi(index)) < this.heap.length) { - if (l+1 < this.heap.length && smaller(this.heap[l+1], this.heap[l])) { - l = l+1; - } - - if (smaller(this.heap[index], this.heap[l])) { - break; - } - - let t = this.heap[index]; - this.heap[index] = this.heap[l]; - this.heap[l] = t; - - index = l; - } - } - - push(node) { - node.pushCount = ++this.pushCount; - this.heap.push(node); - this.percUp(this.heap.length-1); - } - - unshift(node) { - return this.heap.push(node); - } - - shift() { - let [top] = this.heap; - - this.heap[0] = this.heap[this.heap.length-1]; - this.heap.pop(); - this.percDown(0); - - return top; - } - - toArray() { - return [...this]; - } - - *[Symbol.iterator] () { - for (let i = 0; i < this.heap.length; i++) { - yield this.heap[i].data; - } - } - - remove (testFn) { - let j = 0; - for (let i = 0; i < this.heap.length; i++) { - if (!testFn(this.heap[i])) { - this.heap[j] = this.heap[i]; - j++; - } - } - - this.heap.splice(j); - - for (let i = parent(this.heap.length-1); i >= 0; i--) { - this.percDown(i); - } - - return this; - } - } - - function leftChi(i) { - return (i<<1)+1; - } - - function parent(i) { - return ((i+1)>>1)-1; - } - - function smaller(x, y) { - if (x.priority !== y.priority) { - return x.priority < y.priority; - } - else { - return x.pushCount < y.pushCount; - } - } - - /** - * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and - * completed in ascending priority order. - * - * @name priorityQueue - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.queue]{@link module:ControlFlow.queue} - * @category Control Flow - * @param {AsyncFunction} worker - An async function for processing a queued task. - * If you want to handle errors from an individual task, pass a callback to - * `q.push()`. - * Invoked with (task, callback). - * @param {number} concurrency - An `integer` for determining how many `worker` - * functions should be run in parallel. If omitted, the concurrency defaults to - * `1`. If the concurrency is `0`, an error is thrown. - * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are three - * differences between `queue` and `priorityQueue` objects: - * * `push(task, priority, [callback])` - `priority` should be a number. If an - * array of `tasks` is given, all tasks will be assigned the same priority. - * * `pushAsync(task, priority, [callback])` - the same as `priorityQueue.push`, - * except this returns a promise that rejects if an error occurs. - * * The `unshift` and `unshiftAsync` methods were removed. - */ - function priorityQueue(worker, concurrency) { - // Start with a normal queue - var q = queue(worker, concurrency); - - var { - push, - pushAsync - } = q; - - q._tasks = new Heap(); - q._createTaskItem = ({data, priority}, callback) => { - return { - data, - priority, - callback - }; - }; - - function createDataItems(tasks, priority) { - if (!Array.isArray(tasks)) { - return {data: tasks, priority}; - } - return tasks.map(data => { return {data, priority}; }); - } - - // Override push to accept second parameter representing priority - q.push = function(data, priority = 0, callback) { - return push(createDataItems(data, priority), callback); - }; - - q.pushAsync = function(data, priority = 0, callback) { - return pushAsync(createDataItems(data, priority), callback); - }; - - // Remove unshift functions - delete q.unshift; - delete q.unshiftAsync; - - return q; - } - - /** - * Runs the `tasks` array of functions in parallel, without waiting until the - * previous function has completed. Once any of the `tasks` complete or pass an - * error to its callback, the main `callback` is immediately called. It's - * equivalent to `Promise.race()`. - * - * @name race - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction} - * to run. Each function can complete with an optional `result` value. - * @param {Function} callback - A callback to run once any of the functions have - * completed. This function gets an error or result from the first function that - * completed. Invoked with (err, result). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * async.race([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ], - * // main callback - * function(err, result) { - * // the result will be equal to 'two' as it finishes earlier - * }); - */ - function race(tasks, callback) { - callback = once(callback); - if (!Array.isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions')); - if (!tasks.length) return callback(); - for (var i = 0, l = tasks.length; i < l; i++) { - wrapAsync(tasks[i])(callback); - } - } - - var race$1 = awaitify(race, 2); - - /** - * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. - * - * @name reduceRight - * @static - * @memberOf module:Collections - * @method - * @see [async.reduce]{@link module:Collections.reduce} - * @alias foldr - * @category Collection - * @param {Array} array - A collection to iterate over. - * @param {*} memo - The initial state of the reduction. - * @param {AsyncFunction} iteratee - A function applied to each item in the - * array to produce the next step in the reduction. - * The `iteratee` should complete with the next state of the reduction. - * If the iteratee completes with an error, the reduction is stopped and the - * main `callback` is immediately called with the error. - * Invoked with (memo, item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the reduced value. Invoked with - * (err, result). - * @returns {Promise} a promise, if no callback is passed - */ - function reduceRight (array, memo, iteratee, callback) { - var reversed = [...array].reverse(); - return reduce$1(reversed, memo, iteratee, callback); - } - - /** - * Wraps the async function in another function that always completes with a - * result object, even when it errors. - * - * The result object has either the property `error` or `value`. - * - * @name reflect - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} fn - The async function you want to wrap - * @returns {Function} - A function that always passes null to it's callback as - * the error. The second argument to the callback will be an `object` with - * either an `error` or a `value` property. - * @example - * - * async.parallel([ - * async.reflect(function(callback) { - * // do some stuff ... - * callback(null, 'one'); - * }), - * async.reflect(function(callback) { - * // do some more stuff but error ... - * callback('bad stuff happened'); - * }), - * async.reflect(function(callback) { - * // do some more stuff ... - * callback(null, 'two'); - * }) - * ], - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = 'bad stuff happened' - * // results[2].value = 'two' - * }); - */ - function reflect(fn) { - var _fn = wrapAsync(fn); - return initialParams(function reflectOn(args, reflectCallback) { - args.push((error, ...cbArgs) => { - let retVal = {}; - if (error) { - retVal.error = error; - } - if (cbArgs.length > 0){ - var value = cbArgs; - if (cbArgs.length <= 1) { - [value] = cbArgs; - } - retVal.value = value; - } - reflectCallback(null, retVal); - }); - - return _fn.apply(this, args); - }); - } - - /** - * A helper function that wraps an array or an object of functions with `reflect`. - * - * @name reflectAll - * @static - * @memberOf module:Utils - * @method - * @see [async.reflect]{@link module:Utils.reflect} - * @category Util - * @param {Array|Object|Iterable} tasks - The collection of - * [async functions]{@link AsyncFunction} to wrap in `async.reflect`. - * @returns {Array} Returns an array of async functions, each wrapped in - * `async.reflect` - * @example - * - * let tasks = [ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * // do some more stuff but error ... - * callback(new Error('bad stuff happened')); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results[0].value = 'one' - * // results[1].error = Error('bad stuff happened') - * // results[2].value = 'two' - * }); - * - * // an example using an object instead of an array - * let tasks = { - * one: function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * two: function(callback) { - * callback('two'); - * }, - * three: function(callback) { - * setTimeout(function() { - * callback(null, 'three'); - * }, 100); - * } - * }; - * - * async.parallel(async.reflectAll(tasks), - * // optional callback - * function(err, results) { - * // values - * // results.one.value = 'one' - * // results.two.error = 'two' - * // results.three.value = 'three' - * }); - */ - function reflectAll(tasks) { - var results; - if (Array.isArray(tasks)) { - results = tasks.map(reflect); - } else { - results = {}; - Object.keys(tasks).forEach(key => { - results[key] = reflect.call(this, tasks[key]); - }); - } - return results; - } - - function reject$2(eachfn, arr, _iteratee, callback) { - const iteratee = wrapAsync(_iteratee); - return _filter(eachfn, arr, (value, cb) => { - iteratee(value, (err, v) => { - cb(err, !v); - }); - }, callback); - } - - /** - * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test. - * - * @name reject - * @static - * @memberOf module:Collections - * @method - * @see [async.filter]{@link module:Collections.filter} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * - * const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt']; - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.reject(fileList, fileExists, function(err, results) { - * // [ 'dir3/file6.txt' ] - * // results now equals an array of the non-existing files - * }); - * - * // Using Promises - * async.reject(fileList, fileExists) - * .then( results => { - * console.log(results); - * // [ 'dir3/file6.txt' ] - * // results now equals an array of the non-existing files - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let results = await async.reject(fileList, fileExists); - * console.log(results); - * // [ 'dir3/file6.txt' ] - * // results now equals an array of the non-existing files - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function reject (coll, iteratee, callback) { - return reject$2(eachOf$1, coll, iteratee, callback) - } - var reject$1 = awaitify(reject, 3); - - /** - * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a - * time. - * - * @name rejectLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ - function rejectLimit (coll, limit, iteratee, callback) { - return reject$2(eachOfLimit$2(limit), coll, iteratee, callback) - } - var rejectLimit$1 = awaitify(rejectLimit, 4); - - /** - * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time. - * - * @name rejectSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.reject]{@link module:Collections.reject} - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {Function} iteratee - An async truth test to apply to each item in - * `coll`. - * The should complete with a boolean value as its `result`. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Invoked with (err, results). - * @returns {Promise} a promise, if no callback is passed - */ - function rejectSeries (coll, iteratee, callback) { - return reject$2(eachOfSeries$1, coll, iteratee, callback) - } - var rejectSeries$1 = awaitify(rejectSeries, 3); - - function constant(value) { - return function () { - return value; - } - } - - /** - * Attempts to get a successful response from `task` no more than `times` times - * before returning an error. If the task is successful, the `callback` will be - * passed the result of the successful task. If all attempts fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name retry - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @see [async.retryable]{@link module:ControlFlow.retryable} - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an - * object with `times` and `interval` or a number. - * * `times` - The number of attempts to make before giving up. The default - * is `5`. - * * `interval` - The time to wait between retries, in milliseconds. The - * default is `0`. The interval may also be specified as a function of the - * retry count (see example). - * * `errorFilter` - An optional synchronous function that is invoked on - * erroneous result. If it returns `true` the retry attempts will continue; - * if the function returns `false` the retry flow is aborted with the current - * attempt's error and result being returned to the final callback. - * Invoked with (err). - * * If `opts` is a number, the number specifies the number of times to retry, - * with the default interval of `0`. - * @param {AsyncFunction} task - An async function to retry. - * Invoked with (callback). - * @param {Function} [callback] - An optional callback which is called when the - * task has succeeded, or after the final failed attempt. It receives the `err` - * and `result` arguments of the last attempt at completing the `task`. Invoked - * with (err, results). - * @returns {Promise} a promise if no callback provided - * - * @example - * - * // The `retry` function can be used as a stand-alone control flow by passing - * // a callback, as shown below: - * - * // try calling apiMethod 3 times - * async.retry(3, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 3 times, waiting 200 ms between each retry - * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod 10 times with exponential backoff - * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds) - * async.retry({ - * times: 10, - * interval: function(retryCount) { - * return 50 * Math.pow(2, retryCount); - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod the default 5 times no delay between each retry - * async.retry(apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // try calling apiMethod only when error condition satisfies, all other - * // errors will abort the retry control flow and return to final callback - * async.retry({ - * errorFilter: function(err) { - * return err.message === 'Temporary error'; // only retry on a specific error - * } - * }, apiMethod, function(err, result) { - * // do something with the result - * }); - * - * // to retry individual methods that are not as reliable within other - * // control flow functions, use the `retryable` wrapper: - * async.auto({ - * users: api.getUsers.bind(api), - * payments: async.retryable(3, api.getPayments.bind(api)) - * }, function(err, results) { - * // do something with the results - * }); - * - */ - const DEFAULT_TIMES = 5; - const DEFAULT_INTERVAL = 0; - - function retry(opts, task, callback) { - var options = { - times: DEFAULT_TIMES, - intervalFunc: constant(DEFAULT_INTERVAL) - }; - - if (arguments.length < 3 && typeof opts === 'function') { - callback = task || promiseCallback(); - task = opts; - } else { - parseTimes(options, opts); - callback = callback || promiseCallback(); - } - - if (typeof task !== 'function') { - throw new Error("Invalid arguments for async.retry"); - } - - var _task = wrapAsync(task); - - var attempt = 1; - function retryAttempt() { - _task((err, ...args) => { - if (err === false) return - if (err && attempt++ < options.times && - (typeof options.errorFilter != 'function' || - options.errorFilter(err))) { - setTimeout(retryAttempt, options.intervalFunc(attempt - 1)); - } else { - callback(err, ...args); - } - }); - } - - retryAttempt(); - return callback[PROMISE_SYMBOL] - } - - function parseTimes(acc, t) { - if (typeof t === 'object') { - acc.times = +t.times || DEFAULT_TIMES; - - acc.intervalFunc = typeof t.interval === 'function' ? - t.interval : - constant(+t.interval || DEFAULT_INTERVAL); - - acc.errorFilter = t.errorFilter; - } else if (typeof t === 'number' || typeof t === 'string') { - acc.times = +t || DEFAULT_TIMES; - } else { - throw new Error("Invalid arguments for async.retry"); - } - } - - /** - * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method - * wraps a task and makes it retryable, rather than immediately calling it - * with retries. - * - * @name retryable - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.retry]{@link module:ControlFlow.retry} - * @category Control Flow - * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional - * options, exactly the same as from `retry`, except for a `opts.arity` that - * is the arity of the `task` function, defaulting to `task.length` - * @param {AsyncFunction} task - the asynchronous function to wrap. - * This function will be passed any arguments passed to the returned wrapper. - * Invoked with (...args, callback). - * @returns {AsyncFunction} The wrapped function, which when invoked, will - * retry on an error, based on the parameters specified in `opts`. - * This function will accept the same parameters as `task`. - * @example - * - * async.auto({ - * dep1: async.retryable(3, getFromFlakyService), - * process: ["dep1", async.retryable(3, function (results, cb) { - * maybeProcessData(results.dep1, cb); - * })] - * }, callback); - */ - function retryable (opts, task) { - if (!task) { - task = opts; - opts = null; - } - let arity = (opts && opts.arity) || task.length; - if (isAsync(task)) { - arity += 1; - } - var _task = wrapAsync(task); - return initialParams((args, callback) => { - if (args.length < arity - 1 || callback == null) { - args.push(callback); - callback = promiseCallback(); - } - function taskFn(cb) { - _task(...args, cb); - } - - if (opts) retry(opts, taskFn, callback); - else retry(taskFn, callback); - - return callback[PROMISE_SYMBOL] - }); - } - - /** - * Run the functions in the `tasks` collection in series, each one running once - * the previous function has completed. If any functions in the series pass an - * error to its callback, no more functions are run, and `callback` is - * immediately called with the value of the error. Otherwise, `callback` - * receives an array of results when `tasks` have completed. - * - * It is also possible to use an object instead of an array. Each property will - * be run as a function, and the results will be passed to the final `callback` - * as an object instead of an array. This can be a more readable way of handling - * results from {@link async.series}. - * - * **Note** that while many implementations preserve the order of object - * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) - * explicitly states that - * - * > The mechanics and order of enumerating the properties is not specified. - * - * So if you rely on the order in which your series of functions are executed, - * and want this to work on all platforms, consider using an array. - * - * @name series - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing - * [async functions]{@link AsyncFunction} to run in series. - * Each function can complete with any number of optional `result` values. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This function gets a results array (or object) - * containing all the result arguments passed to the `task` callbacks. Invoked - * with (err, result). - * @return {Promise} a promise, if no callback is passed - * @example - * - * //Using Callbacks - * async.series([ - * function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 'two'); - * }, 100); - * } - * ], function(err, results) { - * console.log(results); - * // results is equal to ['one','two'] - * }); - * - * // an example using objects instead of arrays - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }, function(err, results) { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }); - * - * //Using Promises - * async.series([ - * function(callback) { - * setTimeout(function() { - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * callback(null, 'two'); - * }, 100); - * } - * ]).then(results => { - * console.log(results); - * // results is equal to ['one','two'] - * }).catch(err => { - * console.log(err); - * }); - * - * // an example using an object instead of an array - * async.series({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }).then(results => { - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * }).catch(err => { - * console.log(err); - * }); - * - * //Using async/await - * async () => { - * try { - * let results = await async.series([ - * function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 'one'); - * }, 200); - * }, - * function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 'two'); - * }, 100); - * } - * ]); - * console.log(results); - * // results is equal to ['one','two'] - * } - * catch (err) { - * console.log(err); - * } - * } - * - * // an example using an object instead of an array - * async () => { - * try { - * let results = await async.parallel({ - * one: function(callback) { - * setTimeout(function() { - * // do some async task - * callback(null, 1); - * }, 200); - * }, - * two: function(callback) { - * setTimeout(function() { - * // then do another async task - * callback(null, 2); - * }, 100); - * } - * }); - * console.log(results); - * // results is equal to: { one: 1, two: 2 } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function series(tasks, callback) { - return _parallel(eachOfSeries$1, tasks, callback); - } - - /** - * Returns `true` if at least one element in the `coll` satisfies an async test. - * If any iteratee call returns `true`, the main `callback` is immediately - * called. - * - * @name some - * @static - * @memberOf module:Collections - * @method - * @alias any - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // dir1 is a directory that contains file1.txt, file2.txt - * // dir2 is a directory that contains file3.txt, file4.txt - * // dir3 is a directory that contains file5.txt - * // dir4 does not exist - * - * // asynchronous function that checks if a file exists - * function fileExists(file, callback) { - * fs.access(file, fs.constants.F_OK, (err) => { - * callback(null, !err); - * }); - * } - * - * // Using callbacks - * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // true - * // result is true since some file in the list exists - * } - *); - * - * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists, - * function(err, result) { - * console.log(result); - * // false - * // result is false since none of the files exists - * } - *); - * - * // Using Promises - * async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists) - * .then( result => { - * console.log(result); - * // true - * // result is true since some file in the list exists - * }).catch( err => { - * console.log(err); - * }); - * - * async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists) - * .then( result => { - * console.log(result); - * // false - * // result is false since none of the files exists - * }).catch( err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists); - * console.log(result); - * // true - * // result is true since some file in the list exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - * async () => { - * try { - * let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists); - * console.log(result); - * // false - * // result is false since none of the files exists - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function some(coll, iteratee, callback) { - return _createTester(Boolean, res => res)(eachOf$1, coll, iteratee, callback) - } - var some$1 = awaitify(some, 3); - - /** - * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. - * - * @name someLimit - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anyLimit - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in parallel. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ - function someLimit(coll, limit, iteratee, callback) { - return _createTester(Boolean, res => res)(eachOfLimit$2(limit), coll, iteratee, callback) - } - var someLimit$1 = awaitify(someLimit, 4); - - /** - * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. - * - * @name someSeries - * @static - * @memberOf module:Collections - * @method - * @see [async.some]{@link module:Collections.some} - * @alias anySeries - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async truth test to apply to each item - * in the collections in series. - * The iteratee should complete with a boolean `result` value. - * Invoked with (item, callback). - * @param {Function} [callback] - A callback which is called as soon as any - * iteratee returns `true`, or after all the iteratee functions have finished. - * Result will be either `true` or `false` depending on the values of the async - * tests. Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - */ - function someSeries(coll, iteratee, callback) { - return _createTester(Boolean, res => res)(eachOfSeries$1, coll, iteratee, callback) - } - var someSeries$1 = awaitify(someSeries, 3); - - /** - * Sorts a list by the results of running each `coll` value through an async - * `iteratee`. - * - * @name sortBy - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {AsyncFunction} iteratee - An async function to apply to each item in - * `coll`. - * The iteratee should complete with a value to use as the sort criteria as - * its `result`. - * Invoked with (item, callback). - * @param {Function} callback - A callback which is called after all the - * `iteratee` functions have finished, or an error occurs. Results is the items - * from the original `coll` sorted by the values returned by the `iteratee` - * calls. Invoked with (err, results). - * @returns {Promise} a promise, if no callback passed - * @example - * - * // bigfile.txt is a file that is 251100 bytes in size - * // mediumfile.txt is a file that is 11000 bytes in size - * // smallfile.txt is a file that is 121 bytes in size - * - * // asynchronous function that returns the file size in bytes - * function getFileSizeInBytes(file, callback) { - * fs.stat(file, function(err, stat) { - * if (err) { - * return callback(err); - * } - * callback(null, stat.size); - * }); - * } - * - * // Using callbacks - * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], getFileSizeInBytes, - * function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * } - * } - * ); - * - * // By modifying the callback parameter the - * // sorting order can be influenced: - * - * // ascending order - * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], function(file, callback) { - * getFileSizeInBytes(file, function(getFileSizeErr, fileSize) { - * if (getFileSizeErr) return callback(getFileSizeErr); - * callback(null, fileSize); - * }); - * }, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * } - * } - * ); - * - * // descending order - * async.sortBy(['bigfile.txt','mediumfile.txt','smallfile.txt'], function(file, callback) { - * getFileSizeInBytes(file, function(getFileSizeErr, fileSize) { - * if (getFileSizeErr) { - * return callback(getFileSizeErr); - * } - * callback(null, fileSize * -1); - * }); - * }, function(err, results) { - * if (err) { - * console.log(err); - * } else { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'bigfile.txt', 'mediumfile.txt', 'smallfile.txt'] - * } - * } - * ); - * - * // Error handling - * async.sortBy(['mediumfile.txt','smallfile.txt','missingfile.txt'], getFileSizeInBytes, - * function(err, results) { - * if (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } else { - * console.log(results); - * } - * } - * ); - * - * // Using Promises - * async.sortBy(['mediumfile.txt','smallfile.txt','bigfile.txt'], getFileSizeInBytes) - * .then( results => { - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * }).catch( err => { - * console.log(err); - * }); - * - * // Error handling - * async.sortBy(['mediumfile.txt','smallfile.txt','missingfile.txt'], getFileSizeInBytes) - * .then( results => { - * console.log(results); - * }).catch( err => { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * }); - * - * // Using async/await - * (async () => { - * try { - * let results = await async.sortBy(['bigfile.txt','mediumfile.txt','smallfile.txt'], getFileSizeInBytes); - * console.log(results); - * // results is now the original array of files sorted by - * // file size (ascending by default), e.g. - * // [ 'smallfile.txt', 'mediumfile.txt', 'bigfile.txt'] - * } - * catch (err) { - * console.log(err); - * } - * })(); - * - * // Error handling - * async () => { - * try { - * let results = await async.sortBy(['missingfile.txt','mediumfile.txt','smallfile.txt'], getFileSizeInBytes); - * console.log(results); - * } - * catch (err) { - * console.log(err); - * // [ Error: ENOENT: no such file or directory ] - * } - * } - * - */ - function sortBy (coll, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - return map$1(coll, (x, iterCb) => { - _iteratee(x, (err, criteria) => { - if (err) return iterCb(err); - iterCb(err, {value: x, criteria}); - }); - }, (err, results) => { - if (err) return callback(err); - callback(null, results.sort(comparator).map(v => v.value)); - }); - - function comparator(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - } - } - var sortBy$1 = awaitify(sortBy, 3); - - /** - * Sets a time limit on an asynchronous function. If the function does not call - * its callback within the specified milliseconds, it will be called with a - * timeout error. The code property for the error object will be `'ETIMEDOUT'`. - * - * @name timeout - * @static - * @memberOf module:Utils - * @method - * @category Util - * @param {AsyncFunction} asyncFn - The async function to limit in time. - * @param {number} milliseconds - The specified time limit. - * @param {*} [info] - Any variable you want attached (`string`, `object`, etc) - * to timeout Error for more information.. - * @returns {AsyncFunction} Returns a wrapped function that can be used with any - * of the control flow functions. - * Invoke this function with the same parameters as you would `asyncFunc`. - * @example - * - * function myFunction(foo, callback) { - * doAsyncTask(foo, function(err, data) { - * // handle errors - * if (err) return callback(err); - * - * // do some stuff ... - * - * // return processed data - * return callback(null, data); - * }); - * } - * - * var wrapped = async.timeout(myFunction, 1000); - * - * // call `wrapped` as you would `myFunction` - * wrapped({ bar: 'bar' }, function(err, data) { - * // if `myFunction` takes < 1000 ms to execute, `err` - * // and `data` will have their expected values - * - * // else `err` will be an Error with the code 'ETIMEDOUT' - * }); - */ - function timeout(asyncFn, milliseconds, info) { - var fn = wrapAsync(asyncFn); - - return initialParams((args, callback) => { - var timedOut = false; - var timer; - - function timeoutCallback() { - var name = asyncFn.name || 'anonymous'; - var error = new Error('Callback function "' + name + '" timed out.'); - error.code = 'ETIMEDOUT'; - if (info) { - error.info = info; - } - timedOut = true; - callback(error); - } - - args.push((...cbArgs) => { - if (!timedOut) { - callback(...cbArgs); - clearTimeout(timer); - } - }); - - // setup timer and call original function - timer = setTimeout(timeoutCallback, milliseconds); - fn(...args); - }); - } - - function range(size) { - var result = Array(size); - while (size--) { - result[size] = size; - } - return result; - } - - /** - * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a - * time. - * - * @name timesLimit - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} count - The number of times to run the function. - * @param {number} limit - The maximum number of async operations at a time. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see [async.map]{@link module:Collections.map}. - * @returns {Promise} a promise, if no callback is provided - */ - function timesLimit(count, limit, iteratee, callback) { - var _iteratee = wrapAsync(iteratee); - return mapLimit$1(range(count), limit, _iteratee, callback); - } - - /** - * Calls the `iteratee` function `n` times, and accumulates results in the same - * manner you would use with [map]{@link module:Collections.map}. - * - * @name times - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.map]{@link module:Collections.map} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - * @returns {Promise} a promise, if no callback is provided - * @example - * - * // Pretend this is some complicated async factory - * var createUser = function(id, callback) { - * callback(null, { - * id: 'user' + id - * }); - * }; - * - * // generate 5 users - * async.times(5, function(n, next) { - * createUser(n, function(err, user) { - * next(err, user); - * }); - * }, function(err, users) { - * // we should now have 5 users - * }); - */ - function times (n, iteratee, callback) { - return timesLimit(n, Infinity, iteratee, callback) - } - - /** - * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time. - * - * @name timesSeries - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.times]{@link module:ControlFlow.times} - * @category Control Flow - * @param {number} n - The number of times to run the function. - * @param {AsyncFunction} iteratee - The async function to call `n` times. - * Invoked with the iteration index and a callback: (n, next). - * @param {Function} callback - see {@link module:Collections.map}. - * @returns {Promise} a promise, if no callback is provided - */ - function timesSeries (n, iteratee, callback) { - return timesLimit(n, 1, iteratee, callback) - } - - /** - * A relative of `reduce`. Takes an Object or Array, and iterates over each - * element in parallel, each step potentially mutating an `accumulator` value. - * The type of the accumulator defaults to the type of collection passed in. - * - * @name transform - * @static - * @memberOf module:Collections - * @method - * @category Collection - * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over. - * @param {*} [accumulator] - The initial state of the transform. If omitted, - * it will default to an empty Object or Array, depending on the type of `coll` - * @param {AsyncFunction} iteratee - A function applied to each item in the - * collection that potentially modifies the accumulator. - * Invoked with (accumulator, item, key, callback). - * @param {Function} [callback] - A callback which is called after all the - * `iteratee` functions have finished. Result is the transformed accumulator. - * Invoked with (err, result). - * @returns {Promise} a promise, if no callback provided - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * - * // helper function that returns human-readable size format from bytes - * function formatBytes(bytes, decimals = 2) { - * // implementation not included for brevity - * return humanReadbleFilesize; - * } - * - * const fileList = ['file1.txt','file2.txt','file3.txt']; - * - * // asynchronous function that returns the file size, transformed to human-readable format - * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc. - * function transformFileSize(acc, value, key, callback) { - * fs.stat(value, function(err, stat) { - * if (err) { - * return callback(err); - * } - * acc[key] = formatBytes(stat.size); - * callback(null); - * }); - * } - * - * // Using callbacks - * async.transform(fileList, transformFileSize, function(err, result) { - * if(err) { - * console.log(err); - * } else { - * console.log(result); - * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] - * } - * }); - * - * // Using Promises - * async.transform(fileList, transformFileSize) - * .then(result => { - * console.log(result); - * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * (async () => { - * try { - * let result = await async.transform(fileList, transformFileSize); - * console.log(result); - * // [ '1000 Bytes', '1.95 KB', '2.93 KB' ] - * } - * catch (err) { - * console.log(err); - * } - * })(); - * - * @example - * - * // file1.txt is a file that is 1000 bytes in size - * // file2.txt is a file that is 2000 bytes in size - * // file3.txt is a file that is 3000 bytes in size - * - * // helper function that returns human-readable size format from bytes - * function formatBytes(bytes, decimals = 2) { - * // implementation not included for brevity - * return humanReadbleFilesize; - * } - * - * const fileMap = { f1: 'file1.txt', f2: 'file2.txt', f3: 'file3.txt' }; - * - * // asynchronous function that returns the file size, transformed to human-readable format - * // e.g. 1024 bytes = 1KB, 1234 bytes = 1.21 KB, 1048576 bytes = 1MB, etc. - * function transformFileSize(acc, value, key, callback) { - * fs.stat(value, function(err, stat) { - * if (err) { - * return callback(err); - * } - * acc[key] = formatBytes(stat.size); - * callback(null); - * }); - * } - * - * // Using callbacks - * async.transform(fileMap, transformFileSize, function(err, result) { - * if(err) { - * console.log(err); - * } else { - * console.log(result); - * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } - * } - * }); - * - * // Using Promises - * async.transform(fileMap, transformFileSize) - * .then(result => { - * console.log(result); - * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } - * }).catch(err => { - * console.log(err); - * }); - * - * // Using async/await - * async () => { - * try { - * let result = await async.transform(fileMap, transformFileSize); - * console.log(result); - * // { f1: '1000 Bytes', f2: '1.95 KB', f3: '2.93 KB' } - * } - * catch (err) { - * console.log(err); - * } - * } - * - */ - function transform (coll, accumulator, iteratee, callback) { - if (arguments.length <= 3 && typeof accumulator === 'function') { - callback = iteratee; - iteratee = accumulator; - accumulator = Array.isArray(coll) ? [] : {}; - } - callback = once(callback || promiseCallback()); - var _iteratee = wrapAsync(iteratee); - - eachOf$1(coll, (v, k, cb) => { - _iteratee(accumulator, v, k, cb); - }, err => callback(err, accumulator)); - return callback[PROMISE_SYMBOL] - } - - /** - * It runs each task in series but stops whenever any of the functions were - * successful. If one of the tasks were successful, the `callback` will be - * passed the result of the successful task. If all tasks fail, the callback - * will be passed the error and result (if any) of the final attempt. - * - * @name tryEach - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing functions to - * run, each function is passed a `callback(err, result)` it must call on - * completion with an error `err` (which can be `null`) and an optional `result` - * value. - * @param {Function} [callback] - An optional callback which is called when one - * of the tasks has succeeded, or all have failed. It receives the `err` and - * `result` arguments of the last attempt at completing the `task`. Invoked with - * (err, results). - * @returns {Promise} a promise, if no callback is passed - * @example - * async.tryEach([ - * function getDataFromFirstWebsite(callback) { - * // Try getting the data from the first website - * callback(err, data); - * }, - * function getDataFromSecondWebsite(callback) { - * // First website failed, - * // Try getting the data from the backup website - * callback(err, data); - * } - * ], - * // optional callback - * function(err, results) { - * Now do something with the data. - * }); - * - */ - function tryEach(tasks, callback) { - var error = null; - var result; - return eachSeries$1(tasks, (task, taskCb) => { - wrapAsync(task)((err, ...args) => { - if (err === false) return taskCb(err); - - if (args.length < 2) { - [result] = args; - } else { - result = args; - } - error = err; - taskCb(err ? null : {}); - }); - }, () => callback(error, result)); - } - - var tryEach$1 = awaitify(tryEach); - - /** - * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original, - * unmemoized form. Handy for testing. - * - * @name unmemoize - * @static - * @memberOf module:Utils - * @method - * @see [async.memoize]{@link module:Utils.memoize} - * @category Util - * @param {AsyncFunction} fn - the memoized function - * @returns {AsyncFunction} a function that calls the original unmemoized function - */ - function unmemoize(fn) { - return (...args) => { - return (fn.unmemoized || fn)(...args); - }; - } - - /** - * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. - * - * @name whilst - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `iteratee`. Invoked with (callback). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` passes. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has failed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if no callback is passed - * @example - * - * var count = 0; - * async.whilst( - * function test(cb) { cb(null, count < 5); }, - * function iter(callback) { - * count++; - * setTimeout(function() { - * callback(null, count); - * }, 1000); - * }, - * function (err, n) { - * // 5 seconds have passed, n = 5 - * } - * ); - */ - function whilst(test, iteratee, callback) { - callback = onlyOnce(callback); - var _fn = wrapAsync(iteratee); - var _test = wrapAsync(test); - var results = []; - - function next(err, ...rest) { - if (err) return callback(err); - results = rest; - if (err === false) return; - _test(check); - } - - function check(err, truth) { - if (err) return callback(err); - if (err === false) return; - if (!truth) return callback(null, ...results); - _fn(next); - } - - return _test(check); - } - var whilst$1 = awaitify(whilst, 3); - - /** - * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when - * stopped, or an error occurs. `callback` will be passed an error and any - * arguments passed to the final `iteratee`'s callback. - * - * The inverse of [whilst]{@link module:ControlFlow.whilst}. - * - * @name until - * @static - * @memberOf module:ControlFlow - * @method - * @see [async.whilst]{@link module:ControlFlow.whilst} - * @category Control Flow - * @param {AsyncFunction} test - asynchronous truth test to perform before each - * execution of `iteratee`. Invoked with (callback). - * @param {AsyncFunction} iteratee - An async function which is called each time - * `test` fails. Invoked with (callback). - * @param {Function} [callback] - A callback which is called after the test - * function has passed and repeated execution of `iteratee` has stopped. `callback` - * will be passed an error and any arguments passed to the final `iteratee`'s - * callback. Invoked with (err, [results]); - * @returns {Promise} a promise, if a callback is not passed - * - * @example - * const results = [] - * let finished = false - * async.until(function test(cb) { - * cb(null, finished) - * }, function iter(next) { - * fetchPage(url, (err, body) => { - * if (err) return next(err) - * results = results.concat(body.objects) - * finished = !!body.next - * next(err) - * }) - * }, function done (err) { - * // all pages have been fetched - * }) - */ - function until(test, iteratee, callback) { - const _test = wrapAsync(test); - return whilst$1((cb) => _test((err, truth) => cb (err, !truth)), iteratee, callback); - } - - /** - * Runs the `tasks` array of functions in series, each passing their results to - * the next in the array. However, if any of the `tasks` pass an error to their - * own callback, the next function is not executed, and the main `callback` is - * immediately called with the error. - * - * @name waterfall - * @static - * @memberOf module:ControlFlow - * @method - * @category Control Flow - * @param {Array} tasks - An array of [async functions]{@link AsyncFunction} - * to run. - * Each function should complete with any number of `result` values. - * The `result` values will be passed as arguments, in order, to the next task. - * @param {Function} [callback] - An optional callback to run once all the - * functions have completed. This will be passed the results of the last task's - * callback. Invoked with (err, [results]). - * @returns {Promise} a promise, if a callback is omitted - * @example - * - * async.waterfall([ - * function(callback) { - * callback(null, 'one', 'two'); - * }, - * function(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * }, - * function(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - * ], function (err, result) { - * // result now equals 'done' - * }); - * - * // Or, with named functions: - * async.waterfall([ - * myFirstFunction, - * mySecondFunction, - * myLastFunction, - * ], function (err, result) { - * // result now equals 'done' - * }); - * function myFirstFunction(callback) { - * callback(null, 'one', 'two'); - * } - * function mySecondFunction(arg1, arg2, callback) { - * // arg1 now equals 'one' and arg2 now equals 'two' - * callback(null, 'three'); - * } - * function myLastFunction(arg1, callback) { - * // arg1 now equals 'three' - * callback(null, 'done'); - * } - */ - function waterfall (tasks, callback) { - callback = once(callback); - if (!Array.isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions')); - if (!tasks.length) return callback(); - var taskIndex = 0; - - function nextTask(args) { - var task = wrapAsync(tasks[taskIndex++]); - task(...args, onlyOnce(next)); - } - - function next(err, ...args) { - if (err === false) return - if (err || taskIndex === tasks.length) { - return callback(err, ...args); - } - nextTask(args); - } - - nextTask([]); - } - - var waterfall$1 = awaitify(waterfall); - - /** - * An "async function" in the context of Async is an asynchronous function with - * a variable number of parameters, with the final parameter being a callback. - * (`function (arg1, arg2, ..., callback) {}`) - * The final callback is of the form `callback(err, results...)`, which must be - * called once the function is completed. The callback should be called with a - * Error as its first argument to signal that an error occurred. - * Otherwise, if no error occurred, it should be called with `null` as the first - * argument, and any additional `result` arguments that may apply, to signal - * successful completion. - * The callback must be called exactly once, ideally on a later tick of the - * JavaScript event loop. - * - * This type of function is also referred to as a "Node-style async function", - * or a "continuation passing-style function" (CPS). Most of the methods of this - * library are themselves CPS/Node-style async functions, or functions that - * return CPS/Node-style async functions. - * - * Wherever we accept a Node-style async function, we also directly accept an - * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}. - * In this case, the `async` function will not be passed a final callback - * argument, and any thrown error will be used as the `err` argument of the - * implicit callback, and the return value will be used as the `result` value. - * (i.e. a `rejected` of the returned Promise becomes the `err` callback - * argument, and a `resolved` value becomes the `result`.) - * - * Note, due to JavaScript limitations, we can only detect native `async` - * functions and not transpilied implementations. - * Your environment must have `async`/`await` support for this to work. - * (e.g. Node > v7.6, or a recent version of a modern browser). - * If you are using `async` functions through a transpiler (e.g. Babel), you - * must still wrap the function with [asyncify]{@link module:Utils.asyncify}, - * because the `async function` will be compiled to an ordinary function that - * returns a promise. - * - * @typedef {Function} AsyncFunction - * @static - */ - - - var index = { - apply, - applyEach, - applyEachSeries, - asyncify, - auto, - autoInject, - cargo: cargo$1, - cargoQueue: cargo, - compose, - concat: concat$1, - concatLimit: concatLimit$1, - concatSeries: concatSeries$1, - constant: constant$1, - detect: detect$1, - detectLimit: detectLimit$1, - detectSeries: detectSeries$1, - dir, - doUntil, - doWhilst: doWhilst$1, - each, - eachLimit: eachLimit$1, - eachOf: eachOf$1, - eachOfLimit: eachOfLimit$1, - eachOfSeries: eachOfSeries$1, - eachSeries: eachSeries$1, - ensureAsync, - every: every$1, - everyLimit: everyLimit$1, - everySeries: everySeries$1, - filter: filter$1, - filterLimit: filterLimit$1, - filterSeries: filterSeries$1, - forever: forever$1, - groupBy, - groupByLimit: groupByLimit$1, - groupBySeries, - log, - map: map$1, - mapLimit: mapLimit$1, - mapSeries: mapSeries$1, - mapValues, - mapValuesLimit: mapValuesLimit$1, - mapValuesSeries, - memoize, - nextTick, - parallel, - parallelLimit, - priorityQueue, - queue, - race: race$1, - reduce: reduce$1, - reduceRight, - reflect, - reflectAll, - reject: reject$1, - rejectLimit: rejectLimit$1, - rejectSeries: rejectSeries$1, - retry, - retryable, - seq, - series, - setImmediate: setImmediate$1, - some: some$1, - someLimit: someLimit$1, - someSeries: someSeries$1, - sortBy: sortBy$1, - timeout, - times, - timesLimit, - timesSeries, - transform, - tryEach: tryEach$1, - unmemoize, - until, - waterfall: waterfall$1, - whilst: whilst$1, - - // aliases - all: every$1, - allLimit: everyLimit$1, - allSeries: everySeries$1, - any: some$1, - anyLimit: someLimit$1, - anySeries: someSeries$1, - find: detect$1, - findLimit: detectLimit$1, - findSeries: detectSeries$1, - flatMap: concat$1, - flatMapLimit: concatLimit$1, - flatMapSeries: concatSeries$1, - forEach: each, - forEachSeries: eachSeries$1, - forEachLimit: eachLimit$1, - forEachOf: eachOf$1, - forEachOfSeries: eachOfSeries$1, - forEachOfLimit: eachOfLimit$1, - inject: reduce$1, - foldl: reduce$1, - foldr: reduceRight, - select: filter$1, - selectLimit: filterLimit$1, - selectSeries: filterSeries$1, - wrapSync: asyncify, - during: whilst$1, - doDuring: doWhilst$1 - }; - - exports.all = every$1; - exports.allLimit = everyLimit$1; - exports.allSeries = everySeries$1; - exports.any = some$1; - exports.anyLimit = someLimit$1; - exports.anySeries = someSeries$1; - exports.apply = apply; - exports.applyEach = applyEach; - exports.applyEachSeries = applyEachSeries; - exports.asyncify = asyncify; - exports.auto = auto; - exports.autoInject = autoInject; - exports.cargo = cargo$1; - exports.cargoQueue = cargo; - exports.compose = compose; - exports.concat = concat$1; - exports.concatLimit = concatLimit$1; - exports.concatSeries = concatSeries$1; - exports.constant = constant$1; - exports.default = index; - exports.detect = detect$1; - exports.detectLimit = detectLimit$1; - exports.detectSeries = detectSeries$1; - exports.dir = dir; - exports.doDuring = doWhilst$1; - exports.doUntil = doUntil; - exports.doWhilst = doWhilst$1; - exports.during = whilst$1; - exports.each = each; - exports.eachLimit = eachLimit$1; - exports.eachOf = eachOf$1; - exports.eachOfLimit = eachOfLimit$1; - exports.eachOfSeries = eachOfSeries$1; - exports.eachSeries = eachSeries$1; - exports.ensureAsync = ensureAsync; - exports.every = every$1; - exports.everyLimit = everyLimit$1; - exports.everySeries = everySeries$1; - exports.filter = filter$1; - exports.filterLimit = filterLimit$1; - exports.filterSeries = filterSeries$1; - exports.find = detect$1; - exports.findLimit = detectLimit$1; - exports.findSeries = detectSeries$1; - exports.flatMap = concat$1; - exports.flatMapLimit = concatLimit$1; - exports.flatMapSeries = concatSeries$1; - exports.foldl = reduce$1; - exports.foldr = reduceRight; - exports.forEach = each; - exports.forEachLimit = eachLimit$1; - exports.forEachOf = eachOf$1; - exports.forEachOfLimit = eachOfLimit$1; - exports.forEachOfSeries = eachOfSeries$1; - exports.forEachSeries = eachSeries$1; - exports.forever = forever$1; - exports.groupBy = groupBy; - exports.groupByLimit = groupByLimit$1; - exports.groupBySeries = groupBySeries; - exports.inject = reduce$1; - exports.log = log; - exports.map = map$1; - exports.mapLimit = mapLimit$1; - exports.mapSeries = mapSeries$1; - exports.mapValues = mapValues; - exports.mapValuesLimit = mapValuesLimit$1; - exports.mapValuesSeries = mapValuesSeries; - exports.memoize = memoize; - exports.nextTick = nextTick; - exports.parallel = parallel; - exports.parallelLimit = parallelLimit; - exports.priorityQueue = priorityQueue; - exports.queue = queue; - exports.race = race$1; - exports.reduce = reduce$1; - exports.reduceRight = reduceRight; - exports.reflect = reflect; - exports.reflectAll = reflectAll; - exports.reject = reject$1; - exports.rejectLimit = rejectLimit$1; - exports.rejectSeries = rejectSeries$1; - exports.retry = retry; - exports.retryable = retryable; - exports.select = filter$1; - exports.selectLimit = filterLimit$1; - exports.selectSeries = filterSeries$1; - exports.seq = seq; - exports.series = series; - exports.setImmediate = setImmediate$1; - exports.some = some$1; - exports.someLimit = someLimit$1; - exports.someSeries = someSeries$1; - exports.sortBy = sortBy$1; - exports.timeout = timeout; - exports.times = times; - exports.timesLimit = timesLimit; - exports.timesSeries = timesSeries; - exports.transform = transform; - exports.tryEach = tryEach$1; - exports.unmemoize = unmemoize; - exports.until = until; - exports.waterfall = waterfall$1; - exports.whilst = whilst$1; - exports.wrapSync = asyncify; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); - - -/***/ }), - -/***/ 5393: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* MIT license */ -/* eslint-disable no-mixed-operators */ -const cssKeywords = __nccwpck_require__(7497); - -// NOTE: conversions should only return primitive values (i.e. arrays, or -// values that give correct `typeof` results). -// do not use box values types (i.e. Number(), String(), etc.) - -const reverseKeywords = {}; -for (const key of Object.keys(cssKeywords)) { - reverseKeywords[cssKeywords[key]] = key; -} - -const convert = { - rgb: {channels: 3, labels: 'rgb'}, - hsl: {channels: 3, labels: 'hsl'}, - hsv: {channels: 3, labels: 'hsv'}, - hwb: {channels: 3, labels: 'hwb'}, - cmyk: {channels: 4, labels: 'cmyk'}, - xyz: {channels: 3, labels: 'xyz'}, - lab: {channels: 3, labels: 'lab'}, - lch: {channels: 3, labels: 'lch'}, - hex: {channels: 1, labels: ['hex']}, - keyword: {channels: 1, labels: ['keyword']}, - ansi16: {channels: 1, labels: ['ansi16']}, - ansi256: {channels: 1, labels: ['ansi256']}, - hcg: {channels: 3, labels: ['h', 'c', 'g']}, - apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, - gray: {channels: 1, labels: ['gray']} -}; - -module.exports = convert; - -// Hide .channels and .labels properties -for (const model of Object.keys(convert)) { - if (!('channels' in convert[model])) { - throw new Error('missing channels property: ' + model); - } - - if (!('labels' in convert[model])) { - throw new Error('missing channel labels property: ' + model); - } - - if (convert[model].labels.length !== convert[model].channels) { - throw new Error('channel and label counts mismatch: ' + model); - } - - const {channels, labels} = convert[model]; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], 'channels', {value: channels}); - Object.defineProperty(convert[model], 'labels', {value: labels}); -} - -convert.rgb.hsl = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const min = Math.min(r, g, b); - const max = Math.max(r, g, b); - const delta = max - min; - let h; - let s; - - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - const l = (min + max) / 2; - - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; - -convert.rgb.hsv = function (rgb) { - let rdif; - let gdif; - let bdif; - let h; - let s; - - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const v = Math.max(r, g, b); - const diff = v - Math.min(r, g, b); - const diffc = function (c) { - return (v - c) / 6 / diff + 1 / 2; - }; - - if (diff === 0) { - h = 0; - s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = (1 / 3) + rdif - bdif; - } else if (b === v) { - h = (2 / 3) + gdif - rdif; - } - - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return [ - h * 360, - s * 100, - v * 100 - ]; -}; - -convert.rgb.hwb = function (rgb) { - const r = rgb[0]; - const g = rgb[1]; - let b = rgb[2]; - const h = convert.rgb.hsl(rgb)[0]; - const w = 1 / 255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - -convert.rgb.cmyk = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - - const k = Math.min(1 - r, 1 - g, 1 - b); - const c = (1 - r - k) / (1 - k) || 0; - const m = (1 - g - k) / (1 - k) || 0; - const y = (1 - b - k) / (1 - k) || 0; - - return [c * 100, m * 100, y * 100, k * 100]; -}; - -function comparativeDistance(x, y) { - /* - See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance - */ - return ( - ((x[0] - y[0]) ** 2) + - ((x[1] - y[1]) ** 2) + - ((x[2] - y[2]) ** 2) - ); -} - -convert.rgb.keyword = function (rgb) { - const reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - - let currentClosestDistance = Infinity; - let currentClosestKeyword; - - for (const keyword of Object.keys(cssKeywords)) { - const value = cssKeywords[keyword]; - - // Compute comparative distance - const distance = comparativeDistance(rgb, value); - - // Check if its less, if so set as closest - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - - return currentClosestKeyword; -}; - -convert.keyword.rgb = function (keyword) { - return cssKeywords[keyword]; -}; - -convert.rgb.xyz = function (rgb) { - let r = rgb[0] / 255; - let g = rgb[1] / 255; - let b = rgb[2] / 255; - - // Assume sRGB - r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); - g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); - b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); - - const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); - const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); - const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); - - return [x * 100, y * 100, z * 100]; -}; - -convert.rgb.lab = function (rgb) { - const xyz = convert.rgb.xyz(rgb); - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.hsl.rgb = function (hsl) { - const h = hsl[0] / 360; - const s = hsl[1] / 100; - const l = hsl[2] / 100; - let t2; - let t3; - let val; - - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - - const t1 = 2 * l - t2; - - const rgb = [0, 0, 0]; - for (let i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - - if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - - rgb[i] = val * 255; - } - - return rgb; -}; - -convert.hsl.hsv = function (hsl) { - const h = hsl[0]; - let s = hsl[1] / 100; - let l = hsl[2] / 100; - let smin = s; - const lmin = Math.max(l, 0.01); - - l *= 2; - s *= (l <= 1) ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - const v = (l + s) / 2; - const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); - - return [h, sv * 100, v * 100]; -}; - -convert.hsv.rgb = function (hsv) { - const h = hsv[0] / 60; - const s = hsv[1] / 100; - let v = hsv[2] / 100; - const hi = Math.floor(h) % 6; - - const f = h - Math.floor(h); - const p = 255 * v * (1 - s); - const q = 255 * v * (1 - (s * f)); - const t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } -}; - -convert.hsv.hsl = function (hsv) { - const h = hsv[0]; - const s = hsv[1] / 100; - const v = hsv[2] / 100; - const vmin = Math.max(v, 0.01); - let sl; - let l; - - l = (2 - s) * v; - const lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= (lmin <= 1) ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; -}; - -// http://dev.w3.org/csswg/css-color/#hwb-to-rgb -convert.hwb.rgb = function (hwb) { - const h = hwb[0] / 360; - let wh = hwb[1] / 100; - let bl = hwb[2] / 100; - const ratio = wh + bl; - let f; - - // Wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - const i = Math.floor(6 * h); - const v = 1 - bl; - f = 6 * h - i; - - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - const n = wh + f * (v - wh); // Linear interpolation - - let r; - let g; - let b; - /* eslint-disable max-statements-per-line,no-multi-spaces */ - switch (i) { - default: - case 6: - case 0: r = v; g = n; b = wh; break; - case 1: r = n; g = v; b = wh; break; - case 2: r = wh; g = v; b = n; break; - case 3: r = wh; g = n; b = v; break; - case 4: r = n; g = wh; b = v; break; - case 5: r = v; g = wh; b = n; break; - } - /* eslint-enable max-statements-per-line,no-multi-spaces */ - - return [r * 255, g * 255, b * 255]; -}; - -convert.cmyk.rgb = function (cmyk) { - const c = cmyk[0] / 100; - const m = cmyk[1] / 100; - const y = cmyk[2] / 100; - const k = cmyk[3] / 100; - - const r = 1 - Math.min(1, c * (1 - k) + k); - const g = 1 - Math.min(1, m * (1 - k) + k); - const b = 1 - Math.min(1, y * (1 - k) + k); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.rgb = function (xyz) { - const x = xyz[0] / 100; - const y = xyz[1] / 100; - const z = xyz[2] / 100; - let r; - let g; - let b; - - r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); - g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); - b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); - - // Assume sRGB - r = r > 0.0031308 - ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) - : r * 12.92; - - g = g > 0.0031308 - ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) - : g * 12.92; - - b = b > 0.0031308 - ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) - : b * 12.92; - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.lab = function (xyz) { - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.lab.xyz = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let x; - let y; - let z; - - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - - const y2 = y ** 3; - const x2 = x ** 3; - const z2 = z ** 3; - y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; - - x *= 95.047; - y *= 100; - z *= 108.883; - - return [x, y, z]; -}; - -convert.lab.lch = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let h; - - const hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - - if (h < 0) { - h += 360; - } - - const c = Math.sqrt(a * a + b * b); - - return [l, c, h]; -}; - -convert.lch.lab = function (lch) { - const l = lch[0]; - const c = lch[1]; - const h = lch[2]; - - const hr = h / 360 * 2 * Math.PI; - const a = c * Math.cos(hr); - const b = c * Math.sin(hr); - - return [l, a, b]; -}; - -convert.rgb.ansi16 = function (args, saturation = null) { - const [r, g, b] = args; - let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization - - value = Math.round(value / 50); - - if (value === 0) { - return 30; - } - - let ansi = 30 - + ((Math.round(b / 255) << 2) - | (Math.round(g / 255) << 1) - | Math.round(r / 255)); - - if (value === 2) { - ansi += 60; - } - - return ansi; -}; - -convert.hsv.ansi16 = function (args) { - // Optimization here; we already know the value and don't need to get - // it converted for us. - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); -}; - -convert.rgb.ansi256 = function (args) { - const r = args[0]; - const g = args[1]; - const b = args[2]; - - // We use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (r === g && g === b) { - if (r < 8) { - return 16; - } - - if (r > 248) { - return 231; - } - - return Math.round(((r - 8) / 247) * 24) + 232; - } - - const ansi = 16 - + (36 * Math.round(r / 255 * 5)) - + (6 * Math.round(g / 255 * 5)) - + Math.round(b / 255 * 5); - - return ansi; -}; - -convert.ansi16.rgb = function (args) { - let color = args % 10; - - // Handle greyscale - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - - color = color / 10.5 * 255; - - return [color, color, color]; - } - - const mult = (~~(args > 50) + 1) * 0.5; - const r = ((color & 1) * mult) * 255; - const g = (((color >> 1) & 1) * mult) * 255; - const b = (((color >> 2) & 1) * mult) * 255; - - return [r, g, b]; -}; - -convert.ansi256.rgb = function (args) { - // Handle greyscale - if (args >= 232) { - const c = (args - 232) * 10 + 8; - return [c, c, c]; - } - - args -= 16; - - let rem; - const r = Math.floor(args / 36) / 5 * 255; - const g = Math.floor((rem = args % 36) / 6) / 5 * 255; - const b = (rem % 6) / 5 * 255; - - return [r, g, b]; -}; - -convert.rgb.hex = function (args) { - const integer = ((Math.round(args[0]) & 0xFF) << 16) - + ((Math.round(args[1]) & 0xFF) << 8) - + (Math.round(args[2]) & 0xFF); - - const string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.hex.rgb = function (args) { - const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - - let colorString = match[0]; - - if (match[0].length === 3) { - colorString = colorString.split('').map(char => { - return char + char; - }).join(''); - } - - const integer = parseInt(colorString, 16); - const r = (integer >> 16) & 0xFF; - const g = (integer >> 8) & 0xFF; - const b = integer & 0xFF; - - return [r, g, b]; -}; - -convert.rgb.hcg = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const max = Math.max(Math.max(r, g), b); - const min = Math.min(Math.min(r, g), b); - const chroma = (max - min); - let grayscale; - let hue; - - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - - if (chroma <= 0) { - hue = 0; - } else - if (max === r) { - hue = ((g - b) / chroma) % 6; - } else - if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma; - } - - hue /= 6; - hue %= 1; - - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -convert.hsl.hcg = function (hsl) { - const s = hsl[1] / 100; - const l = hsl[2] / 100; - - const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); - - let f = 0; - if (c < 1.0) { - f = (l - 0.5 * c) / (1.0 - c); - } - - return [hsl[0], c * 100, f * 100]; -}; - -convert.hsv.hcg = function (hsv) { - const s = hsv[1] / 100; - const v = hsv[2] / 100; - - const c = s * v; - let f = 0; - - if (c < 1.0) { - f = (v - c) / (1 - c); - } - - return [hsv[0], c * 100, f * 100]; -}; - -convert.hcg.rgb = function (hcg) { - const h = hcg[0] / 360; - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - if (c === 0.0) { - return [g * 255, g * 255, g * 255]; - } - - const pure = [0, 0, 0]; - const hi = (h % 1) * 6; - const v = hi % 1; - const w = 1 - v; - let mg = 0; - - /* eslint-disable max-statements-per-line */ - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - case 1: - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - case 2: - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - case 3: - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - case 4: - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - default: - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - /* eslint-enable max-statements-per-line */ - - mg = (1.0 - c) * g; - - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; -}; - -convert.hcg.hsv = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const v = c + g * (1.0 - c); - let f = 0; - - if (v > 0.0) { - f = c / v; - } - - return [hcg[0], f * 100, v * 100]; -}; - -convert.hcg.hsl = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const l = g * (1.0 - c) + 0.5 * c; - let s = 0; - - if (l > 0.0 && l < 0.5) { - s = c / (2 * l); - } else - if (l >= 0.5 && l < 1.0) { - s = c / (2 * (1 - l)); - } - - return [hcg[0], s * 100, l * 100]; -}; - -convert.hcg.hwb = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - const v = c + g * (1.0 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; -}; - -convert.hwb.hcg = function (hwb) { - const w = hwb[1] / 100; - const b = hwb[2] / 100; - const v = 1 - b; - const c = v - w; - let g = 0; - - if (c < 1) { - g = (v - c) / (1 - c); - } - - return [hwb[0], c * 100, g * 100]; -}; - -convert.apple.rgb = function (apple) { - return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; -}; - -convert.rgb.apple = function (rgb) { - return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; -}; - -convert.gray.rgb = function (args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; -}; - -convert.gray.hsl = function (args) { - return [0, 0, args[0]]; -}; - -convert.gray.hsv = convert.gray.hsl; - -convert.gray.hwb = function (gray) { - return [0, 100, gray[0]]; -}; - -convert.gray.cmyk = function (gray) { - return [0, 0, 0, gray[0]]; -}; - -convert.gray.lab = function (gray) { - return [gray[0], 0, 0]; -}; - -convert.gray.hex = function (gray) { - const val = Math.round(gray[0] / 100 * 255) & 0xFF; - const integer = (val << 16) + (val << 8) + val; - - const string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.rgb.gray = function (rgb) { - const val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; -}; - - -/***/ }), - -/***/ 6764: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const conversions = __nccwpck_require__(5393); -const route = __nccwpck_require__(6405); - -const convert = {}; - -const models = Object.keys(conversions); - -function wrapRaw(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - return fn(args); - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -function wrapRounded(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - const result = fn(args); - - // We're assuming the result is an array here. - // see notice in conversions.js; don't use box types - // in conversion functions. - if (typeof result === 'object') { - for (let len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - - return result; - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -models.forEach(fromModel => { - convert[fromModel] = {}; - - Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); - Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); - - const routes = route(fromModel); - const routeModels = Object.keys(routes); - - routeModels.forEach(toModel => { - const fn = routes[toModel]; - - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); -}); - -module.exports = convert; - - -/***/ }), - -/***/ 6405: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const conversions = __nccwpck_require__(5393); - -/* - This function routes a model to all other models. - - all functions that are routed have a property `.conversion` attached - to the returned synthetic function. This property is an array - of strings, each with the steps in between the 'from' and 'to' - color models (inclusive). - - conversions that are not possible simply are not included. -*/ - -function buildGraph() { - const graph = {}; - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - const models = Object.keys(conversions); - - for (let len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; - } - - return graph; -} - -// https://en.wikipedia.org/wiki/Breadth-first_search -function deriveBFS(fromModel) { - const graph = buildGraph(); - const queue = [fromModel]; // Unshift -> queue -> pop - - graph[fromModel].distance = 0; - - while (queue.length) { - const current = queue.pop(); - const adjacents = Object.keys(conversions[current]); - - for (let len = adjacents.length, i = 0; i < len; i++) { - const adjacent = adjacents[i]; - const node = graph[adjacent]; - - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - - return graph; -} - -function link(from, to) { - return function (args) { - return to(from(args)); - }; -} - -function wrapConversion(toModel, graph) { - const path = [graph[toModel].parent, toModel]; - let fn = conversions[graph[toModel].parent][toModel]; - - let cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - - fn.conversion = path; - return fn; -} - -module.exports = function (fromModel) { - const graph = deriveBFS(fromModel); - const conversion = {}; - - const models = Object.keys(graph); - for (let len = models.length, i = 0; i < len; i++) { - const toModel = models[i]; - const node = graph[toModel]; - - if (node.parent === null) { - // No possible conversion, or this node is the source model. - continue; - } - - conversion[toModel] = wrapConversion(toModel, graph); - } - - return conversion; -}; - - - -/***/ }), - -/***/ 7497: -/***/ ((module) => { - -"use strict"; - - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; - - -/***/ }), - -/***/ 7164: -/***/ ((module) => { - -"use strict"; - - -function padWithZeros(vNumber, width) { - var numAsString = vNumber.toString(); - while (numAsString.length < width) { - numAsString = "0" + numAsString; - } - return numAsString; -} - -function addZero(vNumber) { - return padWithZeros(vNumber, 2); -} - -/** - * Formats the TimeOffset - * Thanks to http://www.svendtofte.com/code/date_format/ - * @private - */ -function offset(timezoneOffset) { - var os = Math.abs(timezoneOffset); - var h = String(Math.floor(os / 60)); - var m = String(os % 60); - h = ("0" + h).slice(-2); - m = ("0" + m).slice(-2); - return timezoneOffset === 0 ? "Z" : (timezoneOffset < 0 ? "+" : "-") + h + ":" + m; -} - -function asString(format, date) { - if (typeof format !== "string") { - date = format; - format = module.exports.ISO8601_FORMAT; - } - if (!date) { - date = module.exports.now(); - } - - // Issue # 14 - Per ISO8601 standard, the time string should be local time - // with timezone info. - // See https://en.wikipedia.org/wiki/ISO_8601 section "Time offsets from UTC" - - var vDay = addZero(date.getDate()); - var vMonth = addZero(date.getMonth() + 1); - var vYearLong = addZero(date.getFullYear()); - var vYearShort = addZero(vYearLong.substring(2, 4)); - var vYear = format.indexOf("yyyy") > -1 ? vYearLong : vYearShort; - var vHour = addZero(date.getHours()); - var vMinute = addZero(date.getMinutes()); - var vSecond = addZero(date.getSeconds()); - var vMillisecond = padWithZeros(date.getMilliseconds(), 3); - var vTimeZone = offset(date.getTimezoneOffset()); - var formatted = format - .replace(/dd/g, vDay) - .replace(/MM/g, vMonth) - .replace(/y{1,4}/g, vYear) - .replace(/hh/g, vHour) - .replace(/mm/g, vMinute) - .replace(/ss/g, vSecond) - .replace(/SSS/g, vMillisecond) - .replace(/O/g, vTimeZone); - return formatted; -} - -function setDatePart(date, part, value, local) { - date['set' + (local ? '' : 'UTC') + part](value); -} - -function extractDateParts(pattern, str, missingValuesDate) { - // Javascript Date object doesn't support custom timezone. Sets all felds as - // GMT based to begin with. If the timezone offset is provided, then adjust - // it using provided timezone, otherwise, adjust it with the system timezone. - var local = pattern.indexOf('O') < 0; - var monthOverflow = false; - var matchers = [ - { - pattern: /y{1,4}/, - regexp: "\\d{1,4}", - fn: function(date, value) { - setDatePart(date, 'FullYear', value, local); - } - }, - { - pattern: /MM/, - regexp: "\\d{1,2}", - fn: function(date, value) { - setDatePart(date, 'Month', (value - 1), local); - if (date.getMonth() !== (value - 1)) { - // in the event of 31 May --> 31 Feb --> 3 Mar - // this is correct behavior if no Date is involved - monthOverflow = true; - } - } - }, - { - pattern: /dd/, - regexp: "\\d{1,2}", - fn: function(date, value) { - // in the event of 31 May --> 31 Feb --> 3 Mar - // reset Mar back to Feb, before setting the Date - if (monthOverflow) { - setDatePart(date, 'Month', (date.getMonth() - 1), local); - } - setDatePart(date, 'Date', value, local); - } - }, - { - pattern: /hh/, - regexp: "\\d{1,2}", - fn: function(date, value) { - setDatePart(date, 'Hours', value, local); - } - }, - { - pattern: /mm/, - regexp: "\\d\\d", - fn: function(date, value) { - setDatePart(date, 'Minutes', value, local); - } - }, - { - pattern: /ss/, - regexp: "\\d\\d", - fn: function(date, value) { - setDatePart(date, 'Seconds', value, local); - } - }, - { - pattern: /SSS/, - regexp: "\\d\\d\\d", - fn: function(date, value) { - setDatePart(date, 'Milliseconds', value, local); - } - }, - { - pattern: /O/, - regexp: "[+-]\\d{1,2}:?\\d{2}?|Z", - fn: function(date, value) { - if (value === "Z") { - value = 0; - } - else { - value = value.replace(":", ""); - } - var offset = Math.abs(value); - var timezoneOffset = (value > 0 ? -1 : 1 ) * ((offset % 100) + Math.floor(offset / 100) * 60); - // Per ISO8601 standard: UTC = local time - offset - // - // For example, 2000-01-01T01:00:00-0700 - // local time: 2000-01-01T01:00:00 - // ==> UTC : 2000-01-01T08:00:00 ( 01 - (-7) = 8 ) - // - // To make it even more confusing, the date.getTimezoneOffset() is - // opposite sign of offset string in the ISO8601 standard. So if offset - // is '-0700' the getTimezoneOffset() would be (+)420. The line above - // calculates timezoneOffset to matche Javascript's behavior. - // - // The date/time of the input is actually the local time, so the date - // object that was constructed is actually local time even thought the - // UTC setters are used. This means the date object's internal UTC - // representation was wrong. It needs to be fixed by substracting the - // offset (or adding the offset minutes as they are opposite sign). - // - // Note: the time zone has to be processed after all other fields are - // set. The result would be incorrect if the offset was calculated - // first then overriden by the other filed setters. - date.setUTCMinutes(date.getUTCMinutes() + timezoneOffset); - } - } - ]; - - var parsedPattern = matchers.reduce( - function(p, m) { - if (m.pattern.test(p.regexp)) { - m.index = p.regexp.match(m.pattern).index; - p.regexp = p.regexp.replace(m.pattern, "(" + m.regexp + ")"); - } else { - m.index = -1; - } - return p; - }, - { regexp: pattern, index: [] } - ); - - var dateFns = matchers.filter(function(m) { - return m.index > -1; - }); - dateFns.sort(function(a, b) { - return a.index - b.index; - }); - - var matcher = new RegExp(parsedPattern.regexp); - var matches = matcher.exec(str); - if (matches) { - var date = missingValuesDate || module.exports.now(); - dateFns.forEach(function(f, i) { - f.fn(date, matches[i + 1]); - }); - - return date; - } - - throw new Error( - "String '" + str + "' could not be parsed as '" + pattern + "'" - ); -} - -function parse(pattern, str, missingValuesDate) { - if (!pattern) { - throw new Error("pattern must be supplied"); - } - - return extractDateParts(pattern, str, missingValuesDate); -} - -/** - * Used for testing - replace this function with a fixed date. - */ -function now() { - return new Date(); -} - -module.exports = asString; -module.exports.asString = asString; -module.exports.parse = parse; -module.exports.now = now; -module.exports.ISO8601_FORMAT = "yyyy-MM-ddThh:mm:ss.SSS"; -module.exports.ISO8601_WITH_TZ_OFFSET_FORMAT = "yyyy-MM-ddThh:mm:ss.SSSO"; -module.exports.DATETIME_FORMAT = "dd MM yyyy hh:mm:ss.SSS"; -module.exports.ABSOLUTETIME_FORMAT = "hh:mm:ss.SSS"; - - -/***/ }), - -/***/ 4653: -/***/ ((module, exports, __nccwpck_require__) => { - -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = __nccwpck_require__(3420)(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; - - -/***/ }), - -/***/ 3420: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = __nccwpck_require__(3338); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - let i; - let len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; - - -/***/ }), - -/***/ 2413: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = __nccwpck_require__(4653); -} else { - module.exports = __nccwpck_require__(1029); -} - - -/***/ }), - -/***/ 1029: -/***/ ((module, exports, __nccwpck_require__) => { - -/** - * Module dependencies. - */ - -const tty = __nccwpck_require__(2018); -const util = __nccwpck_require__(9023); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = __nccwpck_require__(8946); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = __nccwpck_require__(3420)(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - - -/***/ }), - -/***/ 4317: -/***/ ((module) => { - -"use strict"; - - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; - - -/***/ }), - -/***/ 6261: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { dirname, resolve } = __nccwpck_require__(6928); -const { readdirSync, statSync } = __nccwpck_require__(9896); - -module.exports = function (start, callback) { - let dir = resolve('.', start); - let tmp, stats = statSync(dir); - - if (!stats.isDirectory()) { - dir = dirname(dir); - } - - while (true) { - tmp = callback(dir, readdirSync(dir)); - if (tmp) return resolve(dir, tmp); - dir = dirname(tmp = dir); - if (tmp === dir) break; - } -} - - -/***/ }), - -/***/ 1693: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(9306) -const path = __nccwpck_require__(6928) -const mkdirpSync = (__nccwpck_require__(9963).mkdirsSync) -const utimesSync = (__nccwpck_require__(4840).utimesMillisSync) -const stat = __nccwpck_require__(6841) - -function copySync (src, dest, opts) { - if (typeof opts === 'function') { - opts = { filter: opts } - } - - opts = opts || {} - opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now - opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber - - // Warn about using preserveTimestamps on 32-bit node - if (opts.preserveTimestamps && process.arch === 'ia32') { - console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n - see https://github.com/jprichardson/node-fs-extra/issues/269`) - } - - const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy') - stat.checkParentPathsSync(src, srcStat, dest, 'copy') - return handleFilterAndCopy(destStat, src, dest, opts) -} - -function handleFilterAndCopy (destStat, src, dest, opts) { - if (opts.filter && !opts.filter(src, dest)) return - const destParent = path.dirname(dest) - if (!fs.existsSync(destParent)) mkdirpSync(destParent) - return startCopy(destStat, src, dest, opts) -} - -function startCopy (destStat, src, dest, opts) { - if (opts.filter && !opts.filter(src, dest)) return - return getStats(destStat, src, dest, opts) -} - -function getStats (destStat, src, dest, opts) { - const statSync = opts.dereference ? fs.statSync : fs.lstatSync - const srcStat = statSync(src) - - if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts) - else if (srcStat.isFile() || - srcStat.isCharacterDevice() || - srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts) - else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts) -} - -function onFile (srcStat, destStat, src, dest, opts) { - if (!destStat) return copyFile(srcStat, src, dest, opts) - return mayCopyFile(srcStat, src, dest, opts) -} - -function mayCopyFile (srcStat, src, dest, opts) { - if (opts.overwrite) { - fs.unlinkSync(dest) - return copyFile(srcStat, src, dest, opts) - } else if (opts.errorOnExist) { - throw new Error(`'${dest}' already exists`) - } -} - -function copyFile (srcStat, src, dest, opts) { - if (typeof fs.copyFileSync === 'function') { - fs.copyFileSync(src, dest) - fs.chmodSync(dest, srcStat.mode) - if (opts.preserveTimestamps) { - return utimesSync(dest, srcStat.atime, srcStat.mtime) - } - return - } - return copyFileFallback(srcStat, src, dest, opts) -} - -function copyFileFallback (srcStat, src, dest, opts) { - const BUF_LENGTH = 64 * 1024 - const _buff = __nccwpck_require__(1441)(BUF_LENGTH) - - const fdr = fs.openSync(src, 'r') - const fdw = fs.openSync(dest, 'w', srcStat.mode) - let pos = 0 - - while (pos < srcStat.size) { - const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos) - fs.writeSync(fdw, _buff, 0, bytesRead) - pos += bytesRead - } - - if (opts.preserveTimestamps) fs.futimesSync(fdw, srcStat.atime, srcStat.mtime) - - fs.closeSync(fdr) - fs.closeSync(fdw) -} - -function onDir (srcStat, destStat, src, dest, opts) { - if (!destStat) return mkDirAndCopy(srcStat, src, dest, opts) - if (destStat && !destStat.isDirectory()) { - throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`) - } - return copyDir(src, dest, opts) -} - -function mkDirAndCopy (srcStat, src, dest, opts) { - fs.mkdirSync(dest) - copyDir(src, dest, opts) - return fs.chmodSync(dest, srcStat.mode) -} - -function copyDir (src, dest, opts) { - fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts)) -} - -function copyDirItem (item, src, dest, opts) { - const srcItem = path.join(src, item) - const destItem = path.join(dest, item) - const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy') - return startCopy(destStat, srcItem, destItem, opts) -} - -function onLink (destStat, src, dest, opts) { - let resolvedSrc = fs.readlinkSync(src) - if (opts.dereference) { - resolvedSrc = path.resolve(process.cwd(), resolvedSrc) - } - - if (!destStat) { - return fs.symlinkSync(resolvedSrc, dest) - } else { - let resolvedDest - try { - resolvedDest = fs.readlinkSync(dest) - } catch (err) { - // dest exists and is a regular file or directory, - // Windows may throw UNKNOWN error. If dest already exists, - // fs throws error anyway, so no need to guard against it here. - if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest) - throw err - } - if (opts.dereference) { - resolvedDest = path.resolve(process.cwd(), resolvedDest) - } - if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { - throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`) - } - - // prevent copy if src is a subdir of dest since unlinking - // dest in this case would result in removing src contents - // and therefore a broken symlink would be created. - if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) { - throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`) - } - return copyLink(resolvedSrc, dest) - } -} - -function copyLink (resolvedSrc, dest) { - fs.unlinkSync(dest) - return fs.symlinkSync(resolvedSrc, dest) -} - -module.exports = copySync - - -/***/ }), - -/***/ 9842: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = { - copySync: __nccwpck_require__(1693) -} - - -/***/ }), - -/***/ 8581: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(9306) -const path = __nccwpck_require__(6928) -const mkdirp = (__nccwpck_require__(9963).mkdirs) -const pathExists = (__nccwpck_require__(8691).pathExists) -const utimes = (__nccwpck_require__(4840).utimesMillis) -const stat = __nccwpck_require__(6841) - -function copy (src, dest, opts, cb) { - if (typeof opts === 'function' && !cb) { - cb = opts - opts = {} - } else if (typeof opts === 'function') { - opts = { filter: opts } - } - - cb = cb || function () {} - opts = opts || {} - - opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now - opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber - - // Warn about using preserveTimestamps on 32-bit node - if (opts.preserveTimestamps && process.arch === 'ia32') { - console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n - see https://github.com/jprichardson/node-fs-extra/issues/269`) - } - - stat.checkPaths(src, dest, 'copy', (err, stats) => { - if (err) return cb(err) - const { srcStat, destStat } = stats - stat.checkParentPaths(src, srcStat, dest, 'copy', err => { - if (err) return cb(err) - if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb) - return checkParentDir(destStat, src, dest, opts, cb) - }) - }) -} - -function checkParentDir (destStat, src, dest, opts, cb) { - const destParent = path.dirname(dest) - pathExists(destParent, (err, dirExists) => { - if (err) return cb(err) - if (dirExists) return startCopy(destStat, src, dest, opts, cb) - mkdirp(destParent, err => { - if (err) return cb(err) - return startCopy(destStat, src, dest, opts, cb) - }) - }) -} - -function handleFilter (onInclude, destStat, src, dest, opts, cb) { - Promise.resolve(opts.filter(src, dest)).then(include => { - if (include) return onInclude(destStat, src, dest, opts, cb) - return cb() - }, error => cb(error)) -} - -function startCopy (destStat, src, dest, opts, cb) { - if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb) - return getStats(destStat, src, dest, opts, cb) -} - -function getStats (destStat, src, dest, opts, cb) { - const stat = opts.dereference ? fs.stat : fs.lstat - stat(src, (err, srcStat) => { - if (err) return cb(err) - - if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb) - else if (srcStat.isFile() || - srcStat.isCharacterDevice() || - srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb) - else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb) - }) -} - -function onFile (srcStat, destStat, src, dest, opts, cb) { - if (!destStat) return copyFile(srcStat, src, dest, opts, cb) - return mayCopyFile(srcStat, src, dest, opts, cb) -} - -function mayCopyFile (srcStat, src, dest, opts, cb) { - if (opts.overwrite) { - fs.unlink(dest, err => { - if (err) return cb(err) - return copyFile(srcStat, src, dest, opts, cb) - }) - } else if (opts.errorOnExist) { - return cb(new Error(`'${dest}' already exists`)) - } else return cb() -} - -function copyFile (srcStat, src, dest, opts, cb) { - if (typeof fs.copyFile === 'function') { - return fs.copyFile(src, dest, err => { - if (err) return cb(err) - return setDestModeAndTimestamps(srcStat, dest, opts, cb) - }) - } - return copyFileFallback(srcStat, src, dest, opts, cb) -} - -function copyFileFallback (srcStat, src, dest, opts, cb) { - const rs = fs.createReadStream(src) - rs.on('error', err => cb(err)).once('open', () => { - const ws = fs.createWriteStream(dest, { mode: srcStat.mode }) - ws.on('error', err => cb(err)) - .on('open', () => rs.pipe(ws)) - .once('close', () => setDestModeAndTimestamps(srcStat, dest, opts, cb)) - }) -} - -function setDestModeAndTimestamps (srcStat, dest, opts, cb) { - fs.chmod(dest, srcStat.mode, err => { - if (err) return cb(err) - if (opts.preserveTimestamps) { - return utimes(dest, srcStat.atime, srcStat.mtime, cb) - } - return cb() - }) -} - -function onDir (srcStat, destStat, src, dest, opts, cb) { - if (!destStat) return mkDirAndCopy(srcStat, src, dest, opts, cb) - if (destStat && !destStat.isDirectory()) { - return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)) - } - return copyDir(src, dest, opts, cb) -} - -function mkDirAndCopy (srcStat, src, dest, opts, cb) { - fs.mkdir(dest, err => { - if (err) return cb(err) - copyDir(src, dest, opts, err => { - if (err) return cb(err) - return fs.chmod(dest, srcStat.mode, cb) - }) - }) -} - -function copyDir (src, dest, opts, cb) { - fs.readdir(src, (err, items) => { - if (err) return cb(err) - return copyDirItems(items, src, dest, opts, cb) - }) -} - -function copyDirItems (items, src, dest, opts, cb) { - const item = items.pop() - if (!item) return cb() - return copyDirItem(items, item, src, dest, opts, cb) -} - -function copyDirItem (items, item, src, dest, opts, cb) { - const srcItem = path.join(src, item) - const destItem = path.join(dest, item) - stat.checkPaths(srcItem, destItem, 'copy', (err, stats) => { - if (err) return cb(err) - const { destStat } = stats - startCopy(destStat, srcItem, destItem, opts, err => { - if (err) return cb(err) - return copyDirItems(items, src, dest, opts, cb) - }) - }) -} - -function onLink (destStat, src, dest, opts, cb) { - fs.readlink(src, (err, resolvedSrc) => { - if (err) return cb(err) - if (opts.dereference) { - resolvedSrc = path.resolve(process.cwd(), resolvedSrc) - } - - if (!destStat) { - return fs.symlink(resolvedSrc, dest, cb) - } else { - fs.readlink(dest, (err, resolvedDest) => { - if (err) { - // dest exists and is a regular file or directory, - // Windows may throw UNKNOWN error. If dest already exists, - // fs throws error anyway, so no need to guard against it here. - if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb) - return cb(err) - } - if (opts.dereference) { - resolvedDest = path.resolve(process.cwd(), resolvedDest) - } - if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { - return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)) - } - - // do not copy if src is a subdir of dest since unlinking - // dest in this case would result in removing src contents - // and therefore a broken symlink would be created. - if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) { - return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)) - } - return copyLink(resolvedSrc, dest, cb) - }) - } - }) -} - -function copyLink (resolvedSrc, dest, cb) { - fs.unlink(dest, err => { - if (err) return cb(err) - return fs.symlink(resolvedSrc, dest, cb) - }) -} - -module.exports = copy - - -/***/ }), - -/***/ 6754: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const u = (__nccwpck_require__(9380)/* .fromCallback */ .S) -module.exports = { - copy: u(__nccwpck_require__(8581)) -} - - -/***/ }), - -/***/ 8084: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const u = (__nccwpck_require__(9380)/* .fromCallback */ .S) -const fs = __nccwpck_require__(9306) -const path = __nccwpck_require__(6928) -const mkdir = __nccwpck_require__(9963) -const remove = __nccwpck_require__(3071) - -const emptyDir = u(function emptyDir (dir, callback) { - callback = callback || function () {} - fs.readdir(dir, (err, items) => { - if (err) return mkdir.mkdirs(dir, callback) - - items = items.map(item => path.join(dir, item)) - - deleteItem() - - function deleteItem () { - const item = items.pop() - if (!item) return callback() - remove.remove(item, err => { - if (err) return callback(err) - deleteItem() - }) - } - }) -}) - -function emptyDirSync (dir) { - let items - try { - items = fs.readdirSync(dir) - } catch (err) { - return mkdir.mkdirsSync(dir) - } - - items.forEach(item => { - item = path.join(dir, item) - remove.removeSync(item) - }) -} - -module.exports = { - emptyDirSync, - emptydirSync: emptyDirSync, - emptyDir, - emptydir: emptyDir -} - - -/***/ }), - -/***/ 1927: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const u = (__nccwpck_require__(9380)/* .fromCallback */ .S) -const path = __nccwpck_require__(6928) -const fs = __nccwpck_require__(9306) -const mkdir = __nccwpck_require__(9963) -const pathExists = (__nccwpck_require__(8691).pathExists) - -function createFile (file, callback) { - function makeFile () { - fs.writeFile(file, '', err => { - if (err) return callback(err) - callback() - }) - } - - fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err - if (!err && stats.isFile()) return callback() - const dir = path.dirname(file) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return makeFile() - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - makeFile() - }) - }) - }) -} - -function createFileSync (file) { - let stats - try { - stats = fs.statSync(file) - } catch (e) {} - if (stats && stats.isFile()) return - - const dir = path.dirname(file) - if (!fs.existsSync(dir)) { - mkdir.mkdirsSync(dir) - } - - fs.writeFileSync(file, '') -} - -module.exports = { - createFile: u(createFile), - createFileSync -} - - -/***/ }), - -/***/ 7565: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const file = __nccwpck_require__(1927) -const link = __nccwpck_require__(2105) -const symlink = __nccwpck_require__(7066) - -module.exports = { - // file - createFile: file.createFile, - createFileSync: file.createFileSync, - ensureFile: file.createFile, - ensureFileSync: file.createFileSync, - // link - createLink: link.createLink, - createLinkSync: link.createLinkSync, - ensureLink: link.createLink, - ensureLinkSync: link.createLinkSync, - // symlink - createSymlink: symlink.createSymlink, - createSymlinkSync: symlink.createSymlinkSync, - ensureSymlink: symlink.createSymlink, - ensureSymlinkSync: symlink.createSymlinkSync -} - - -/***/ }), - -/***/ 2105: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const u = (__nccwpck_require__(9380)/* .fromCallback */ .S) -const path = __nccwpck_require__(6928) -const fs = __nccwpck_require__(9306) -const mkdir = __nccwpck_require__(9963) -const pathExists = (__nccwpck_require__(8691).pathExists) - -function createLink (srcpath, dstpath, callback) { - function makeLink (srcpath, dstpath) { - fs.link(srcpath, dstpath, err => { - if (err) return callback(err) - callback(null) - }) - } - - pathExists(dstpath, (err, destinationExists) => { - if (err) return callback(err) - if (destinationExists) return callback(null) - fs.lstat(srcpath, (err) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureLink') - return callback(err) - } - - const dir = path.dirname(dstpath) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return makeLink(srcpath, dstpath) - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - makeLink(srcpath, dstpath) - }) - }) - }) - }) -} - -function createLinkSync (srcpath, dstpath) { - const destinationExists = fs.existsSync(dstpath) - if (destinationExists) return undefined - - try { - fs.lstatSync(srcpath) - } catch (err) { - err.message = err.message.replace('lstat', 'ensureLink') - throw err - } - - const dir = path.dirname(dstpath) - const dirExists = fs.existsSync(dir) - if (dirExists) return fs.linkSync(srcpath, dstpath) - mkdir.mkdirsSync(dir) - - return fs.linkSync(srcpath, dstpath) -} - -module.exports = { - createLink: u(createLink), - createLinkSync -} - - -/***/ }), - -/***/ 1631: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const path = __nccwpck_require__(6928) -const fs = __nccwpck_require__(9306) -const pathExists = (__nccwpck_require__(8691).pathExists) - -/** - * Function that returns two types of paths, one relative to symlink, and one - * relative to the current working directory. Checks if path is absolute or - * relative. If the path is relative, this function checks if the path is - * relative to symlink or relative to current working directory. This is an - * initiative to find a smarter `srcpath` to supply when building symlinks. - * This allows you to determine which path to use out of one of three possible - * types of source paths. The first is an absolute path. This is detected by - * `path.isAbsolute()`. When an absolute path is provided, it is checked to - * see if it exists. If it does it's used, if not an error is returned - * (callback)/ thrown (sync). The other two options for `srcpath` are a - * relative url. By default Node's `fs.symlink` works by creating a symlink - * using `dstpath` and expects the `srcpath` to be relative to the newly - * created symlink. If you provide a `srcpath` that does not exist on the file - * system it results in a broken symlink. To minimize this, the function - * checks to see if the 'relative to symlink' source file exists, and if it - * does it will use it. If it does not, it checks if there's a file that - * exists that is relative to the current working directory, if does its used. - * This preserves the expectations of the original fs.symlink spec and adds - * the ability to pass in `relative to current working direcotry` paths. - */ - -function symlinkPaths (srcpath, dstpath, callback) { - if (path.isAbsolute(srcpath)) { - return fs.lstat(srcpath, (err) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureSymlink') - return callback(err) - } - return callback(null, { - 'toCwd': srcpath, - 'toDst': srcpath - }) - }) - } else { - const dstdir = path.dirname(dstpath) - const relativeToDst = path.join(dstdir, srcpath) - return pathExists(relativeToDst, (err, exists) => { - if (err) return callback(err) - if (exists) { - return callback(null, { - 'toCwd': relativeToDst, - 'toDst': srcpath - }) - } else { - return fs.lstat(srcpath, (err) => { - if (err) { - err.message = err.message.replace('lstat', 'ensureSymlink') - return callback(err) - } - return callback(null, { - 'toCwd': srcpath, - 'toDst': path.relative(dstdir, srcpath) - }) - }) - } - }) - } -} - -function symlinkPathsSync (srcpath, dstpath) { - let exists - if (path.isAbsolute(srcpath)) { - exists = fs.existsSync(srcpath) - if (!exists) throw new Error('absolute srcpath does not exist') - return { - 'toCwd': srcpath, - 'toDst': srcpath - } - } else { - const dstdir = path.dirname(dstpath) - const relativeToDst = path.join(dstdir, srcpath) - exists = fs.existsSync(relativeToDst) - if (exists) { - return { - 'toCwd': relativeToDst, - 'toDst': srcpath - } - } else { - exists = fs.existsSync(srcpath) - if (!exists) throw new Error('relative srcpath does not exist') - return { - 'toCwd': srcpath, - 'toDst': path.relative(dstdir, srcpath) - } - } - } -} - -module.exports = { - symlinkPaths, - symlinkPathsSync -} - - -/***/ }), - -/***/ 3027: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(9306) - -function symlinkType (srcpath, type, callback) { - callback = (typeof type === 'function') ? type : callback - type = (typeof type === 'function') ? false : type - if (type) return callback(null, type) - fs.lstat(srcpath, (err, stats) => { - if (err) return callback(null, 'file') - type = (stats && stats.isDirectory()) ? 'dir' : 'file' - callback(null, type) - }) -} - -function symlinkTypeSync (srcpath, type) { - let stats - - if (type) return type - try { - stats = fs.lstatSync(srcpath) - } catch (e) { - return 'file' - } - return (stats && stats.isDirectory()) ? 'dir' : 'file' -} - -module.exports = { - symlinkType, - symlinkTypeSync -} - - -/***/ }), - -/***/ 7066: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const u = (__nccwpck_require__(9380)/* .fromCallback */ .S) -const path = __nccwpck_require__(6928) -const fs = __nccwpck_require__(9306) -const _mkdirs = __nccwpck_require__(9963) -const mkdirs = _mkdirs.mkdirs -const mkdirsSync = _mkdirs.mkdirsSync - -const _symlinkPaths = __nccwpck_require__(1631) -const symlinkPaths = _symlinkPaths.symlinkPaths -const symlinkPathsSync = _symlinkPaths.symlinkPathsSync - -const _symlinkType = __nccwpck_require__(3027) -const symlinkType = _symlinkType.symlinkType -const symlinkTypeSync = _symlinkType.symlinkTypeSync - -const pathExists = (__nccwpck_require__(8691).pathExists) - -function createSymlink (srcpath, dstpath, type, callback) { - callback = (typeof type === 'function') ? type : callback - type = (typeof type === 'function') ? false : type - - pathExists(dstpath, (err, destinationExists) => { - if (err) return callback(err) - if (destinationExists) return callback(null) - symlinkPaths(srcpath, dstpath, (err, relative) => { - if (err) return callback(err) - srcpath = relative.toDst - symlinkType(relative.toCwd, type, (err, type) => { - if (err) return callback(err) - const dir = path.dirname(dstpath) - pathExists(dir, (err, dirExists) => { - if (err) return callback(err) - if (dirExists) return fs.symlink(srcpath, dstpath, type, callback) - mkdirs(dir, err => { - if (err) return callback(err) - fs.symlink(srcpath, dstpath, type, callback) - }) - }) - }) - }) - }) -} - -function createSymlinkSync (srcpath, dstpath, type) { - const destinationExists = fs.existsSync(dstpath) - if (destinationExists) return undefined - - const relative = symlinkPathsSync(srcpath, dstpath) - srcpath = relative.toDst - type = symlinkTypeSync(relative.toCwd, type) - const dir = path.dirname(dstpath) - const exists = fs.existsSync(dir) - if (exists) return fs.symlinkSync(srcpath, dstpath, type) - mkdirsSync(dir) - return fs.symlinkSync(srcpath, dstpath, type) -} - -module.exports = { - createSymlink: u(createSymlink), - createSymlinkSync -} - - -/***/ }), - -/***/ 4336: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -// This is adapted from https://github.com/normalize/mz -// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors -const u = (__nccwpck_require__(9380)/* .fromCallback */ .S) -const fs = __nccwpck_require__(9306) - -const api = [ - 'access', - 'appendFile', - 'chmod', - 'chown', - 'close', - 'copyFile', - 'fchmod', - 'fchown', - 'fdatasync', - 'fstat', - 'fsync', - 'ftruncate', - 'futimes', - 'lchown', - 'lchmod', - 'link', - 'lstat', - 'mkdir', - 'mkdtemp', - 'open', - 'readFile', - 'readdir', - 'readlink', - 'realpath', - 'rename', - 'rmdir', - 'stat', - 'symlink', - 'truncate', - 'unlink', - 'utimes', - 'writeFile' -].filter(key => { - // Some commands are not available on some systems. Ex: - // fs.copyFile was added in Node.js v8.5.0 - // fs.mkdtemp was added in Node.js v5.10.0 - // fs.lchown is not available on at least some Linux - return typeof fs[key] === 'function' -}) - -// Export all keys: -Object.keys(fs).forEach(key => { - if (key === 'promises') { - // fs.promises is a getter property that triggers ExperimentalWarning - // Don't re-export it here, the getter is defined in "lib/index.js" - return - } - exports[key] = fs[key] -}) - -// Universalify async methods: -api.forEach(method => { - exports[method] = u(fs[method]) -}) - -// We differ from mz/fs in that we still ship the old, broken, fs.exists() -// since we are a drop-in replacement for the native module -exports.exists = function (filename, callback) { - if (typeof callback === 'function') { - return fs.exists(filename, callback) - } - return new Promise(resolve => { - return fs.exists(filename, resolve) - }) -} - -// fs.read() & fs.write need special treatment due to multiple callback args - -exports.read = function (fd, buffer, offset, length, position, callback) { - if (typeof callback === 'function') { - return fs.read(fd, buffer, offset, length, position, callback) - } - return new Promise((resolve, reject) => { - fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => { - if (err) return reject(err) - resolve({ bytesRead, buffer }) - }) - }) -} - -// Function signature can be -// fs.write(fd, buffer[, offset[, length[, position]]], callback) -// OR -// fs.write(fd, string[, position[, encoding]], callback) -// We need to handle both cases, so we use ...args -exports.write = function (fd, buffer, ...args) { - if (typeof args[args.length - 1] === 'function') { - return fs.write(fd, buffer, ...args) - } - - return new Promise((resolve, reject) => { - fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => { - if (err) return reject(err) - resolve({ bytesWritten, buffer }) - }) - }) -} - -// fs.realpath.native only available in Node v9.2+ -if (typeof fs.realpath.native === 'function') { - exports.realpath.native = u(fs.realpath.native) -} - - -/***/ }), - -/***/ 6158: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = Object.assign( - {}, - // Export promiseified graceful-fs: - __nccwpck_require__(4336), - // Export extra methods: - __nccwpck_require__(9842), - __nccwpck_require__(6754), - __nccwpck_require__(8084), - __nccwpck_require__(7565), - __nccwpck_require__(9397), - __nccwpck_require__(9963), - __nccwpck_require__(3218), - __nccwpck_require__(242), - __nccwpck_require__(1006), - __nccwpck_require__(8691), - __nccwpck_require__(3071) -) - -// Export fs.promises as a getter property so that we don't trigger -// ExperimentalWarning before fs.promises is actually accessed. -const fs = __nccwpck_require__(9896) -if (Object.getOwnPropertyDescriptor(fs, 'promises')) { - Object.defineProperty(module.exports, "promises", ({ - get () { return fs.promises } - })) -} - - -/***/ }), - -/***/ 9397: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const u = (__nccwpck_require__(9380)/* .fromCallback */ .S) -const jsonFile = __nccwpck_require__(5377) - -jsonFile.outputJson = u(__nccwpck_require__(4623)) -jsonFile.outputJsonSync = __nccwpck_require__(4071) -// aliases -jsonFile.outputJSON = jsonFile.outputJson -jsonFile.outputJSONSync = jsonFile.outputJsonSync -jsonFile.writeJSON = jsonFile.writeJson -jsonFile.writeJSONSync = jsonFile.writeJsonSync -jsonFile.readJSON = jsonFile.readJson -jsonFile.readJSONSync = jsonFile.readJsonSync - -module.exports = jsonFile - - -/***/ }), - -/***/ 5377: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const u = (__nccwpck_require__(9380)/* .fromCallback */ .S) -const jsonFile = __nccwpck_require__(7677) - -module.exports = { - // jsonfile exports - readJson: u(jsonFile.readFile), - readJsonSync: jsonFile.readFileSync, - writeJson: u(jsonFile.writeFile), - writeJsonSync: jsonFile.writeFileSync -} - - -/***/ }), - -/***/ 4071: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(9306) -const path = __nccwpck_require__(6928) -const mkdir = __nccwpck_require__(9963) -const jsonFile = __nccwpck_require__(5377) - -function outputJsonSync (file, data, options) { - const dir = path.dirname(file) - - if (!fs.existsSync(dir)) { - mkdir.mkdirsSync(dir) - } - - jsonFile.writeJsonSync(file, data, options) -} - -module.exports = outputJsonSync - - -/***/ }), - -/***/ 4623: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const path = __nccwpck_require__(6928) -const mkdir = __nccwpck_require__(9963) -const pathExists = (__nccwpck_require__(8691).pathExists) -const jsonFile = __nccwpck_require__(5377) - -function outputJson (file, data, options, callback) { - if (typeof options === 'function') { - callback = options - options = {} - } - - const dir = path.dirname(file) - - pathExists(dir, (err, itDoes) => { - if (err) return callback(err) - if (itDoes) return jsonFile.writeJson(file, data, options, callback) - - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - jsonFile.writeJson(file, data, options, callback) - }) - }) -} - -module.exports = outputJson - - -/***/ }), - -/***/ 9963: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const u = (__nccwpck_require__(9380)/* .fromCallback */ .S) -const mkdirs = u(__nccwpck_require__(1663)) -const mkdirsSync = __nccwpck_require__(1719) - -module.exports = { - mkdirs, - mkdirsSync, - // alias - mkdirp: mkdirs, - mkdirpSync: mkdirsSync, - ensureDir: mkdirs, - ensureDirSync: mkdirsSync -} - - -/***/ }), - -/***/ 1719: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(9306) -const path = __nccwpck_require__(6928) -const invalidWin32Path = (__nccwpck_require__(4620).invalidWin32Path) - -const o777 = parseInt('0777', 8) - -function mkdirsSync (p, opts, made) { - if (!opts || typeof opts !== 'object') { - opts = { mode: opts } - } - - let mode = opts.mode - const xfs = opts.fs || fs - - if (process.platform === 'win32' && invalidWin32Path(p)) { - const errInval = new Error(p + ' contains invalid WIN32 path characters.') - errInval.code = 'EINVAL' - throw errInval - } - - if (mode === undefined) { - mode = o777 & (~process.umask()) - } - if (!made) made = null - - p = path.resolve(p) - - try { - xfs.mkdirSync(p, mode) - made = made || p - } catch (err0) { - if (err0.code === 'ENOENT') { - if (path.dirname(p) === p) throw err0 - made = mkdirsSync(path.dirname(p), opts, made) - mkdirsSync(p, opts, made) - } else { - // In the case of any other error, just see if there's a dir there - // already. If so, then hooray! If not, then something is borked. - let stat - try { - stat = xfs.statSync(p) - } catch (err1) { - throw err0 - } - if (!stat.isDirectory()) throw err0 - } - } - - return made -} - -module.exports = mkdirsSync - - -/***/ }), - -/***/ 1663: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(9306) -const path = __nccwpck_require__(6928) -const invalidWin32Path = (__nccwpck_require__(4620).invalidWin32Path) - -const o777 = parseInt('0777', 8) - -function mkdirs (p, opts, callback, made) { - if (typeof opts === 'function') { - callback = opts - opts = {} - } else if (!opts || typeof opts !== 'object') { - opts = { mode: opts } - } - - if (process.platform === 'win32' && invalidWin32Path(p)) { - const errInval = new Error(p + ' contains invalid WIN32 path characters.') - errInval.code = 'EINVAL' - return callback(errInval) - } - - let mode = opts.mode - const xfs = opts.fs || fs - - if (mode === undefined) { - mode = o777 & (~process.umask()) - } - if (!made) made = null - - callback = callback || function () {} - p = path.resolve(p) - - xfs.mkdir(p, mode, er => { - if (!er) { - made = made || p - return callback(null, made) - } - switch (er.code) { - case 'ENOENT': - if (path.dirname(p) === p) return callback(er) - mkdirs(path.dirname(p), opts, (er, made) => { - if (er) callback(er, made) - else mkdirs(p, opts, callback, made) - }) - break - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - xfs.stat(p, (er2, stat) => { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) callback(er, made) - else callback(null, made) - }) - break - } - }) -} - -module.exports = mkdirs - - -/***/ }), - -/***/ 4620: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const path = __nccwpck_require__(6928) - -// get drive on windows -function getRootPath (p) { - p = path.normalize(path.resolve(p)).split(path.sep) - if (p.length > 0) return p[0] - return null -} - -// http://stackoverflow.com/a/62888/10333 contains more accurate -// TODO: expand to include the rest -const INVALID_PATH_CHARS = /[<>:"|?*]/ - -function invalidWin32Path (p) { - const rp = getRootPath(p) - p = p.replace(rp, '') - return INVALID_PATH_CHARS.test(p) -} - -module.exports = { - getRootPath, - invalidWin32Path -} - - -/***/ }), - -/***/ 3218: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = { - moveSync: __nccwpck_require__(4037) -} - - -/***/ }), - -/***/ 4037: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(9306) -const path = __nccwpck_require__(6928) -const copySync = (__nccwpck_require__(9842).copySync) -const removeSync = (__nccwpck_require__(3071).removeSync) -const mkdirpSync = (__nccwpck_require__(9963).mkdirpSync) -const stat = __nccwpck_require__(6841) - -function moveSync (src, dest, opts) { - opts = opts || {} - const overwrite = opts.overwrite || opts.clobber || false - - const { srcStat } = stat.checkPathsSync(src, dest, 'move') - stat.checkParentPathsSync(src, srcStat, dest, 'move') - mkdirpSync(path.dirname(dest)) - return doRename(src, dest, overwrite) -} - -function doRename (src, dest, overwrite) { - if (overwrite) { - removeSync(dest) - return rename(src, dest, overwrite) - } - if (fs.existsSync(dest)) throw new Error('dest already exists.') - return rename(src, dest, overwrite) -} - -function rename (src, dest, overwrite) { - try { - fs.renameSync(src, dest) - } catch (err) { - if (err.code !== 'EXDEV') throw err - return moveAcrossDevice(src, dest, overwrite) - } -} - -function moveAcrossDevice (src, dest, overwrite) { - const opts = { - overwrite, - errorOnExist: true - } - copySync(src, dest, opts) - return removeSync(src) -} - -module.exports = moveSync - - -/***/ }), - -/***/ 242: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const u = (__nccwpck_require__(9380)/* .fromCallback */ .S) -module.exports = { - move: u(__nccwpck_require__(2525)) -} - - -/***/ }), - -/***/ 2525: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(9306) -const path = __nccwpck_require__(6928) -const copy = (__nccwpck_require__(6754).copy) -const remove = (__nccwpck_require__(3071).remove) -const mkdirp = (__nccwpck_require__(9963).mkdirp) -const pathExists = (__nccwpck_require__(8691).pathExists) -const stat = __nccwpck_require__(6841) - -function move (src, dest, opts, cb) { - if (typeof opts === 'function') { - cb = opts - opts = {} - } - - const overwrite = opts.overwrite || opts.clobber || false - - stat.checkPaths(src, dest, 'move', (err, stats) => { - if (err) return cb(err) - const { srcStat } = stats - stat.checkParentPaths(src, srcStat, dest, 'move', err => { - if (err) return cb(err) - mkdirp(path.dirname(dest), err => { - if (err) return cb(err) - return doRename(src, dest, overwrite, cb) - }) - }) - }) -} - -function doRename (src, dest, overwrite, cb) { - if (overwrite) { - return remove(dest, err => { - if (err) return cb(err) - return rename(src, dest, overwrite, cb) - }) - } - pathExists(dest, (err, destExists) => { - if (err) return cb(err) - if (destExists) return cb(new Error('dest already exists.')) - return rename(src, dest, overwrite, cb) - }) -} - -function rename (src, dest, overwrite, cb) { - fs.rename(src, dest, err => { - if (!err) return cb() - if (err.code !== 'EXDEV') return cb(err) - return moveAcrossDevice(src, dest, overwrite, cb) - }) -} - -function moveAcrossDevice (src, dest, overwrite, cb) { - const opts = { - overwrite, - errorOnExist: true - } - copy(src, dest, opts, err => { - if (err) return cb(err) - return remove(src, cb) - }) -} - -module.exports = move - - -/***/ }), - -/***/ 1006: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const u = (__nccwpck_require__(9380)/* .fromCallback */ .S) -const fs = __nccwpck_require__(9306) -const path = __nccwpck_require__(6928) -const mkdir = __nccwpck_require__(9963) -const pathExists = (__nccwpck_require__(8691).pathExists) - -function outputFile (file, data, encoding, callback) { - if (typeof encoding === 'function') { - callback = encoding - encoding = 'utf8' - } - - const dir = path.dirname(file) - pathExists(dir, (err, itDoes) => { - if (err) return callback(err) - if (itDoes) return fs.writeFile(file, data, encoding, callback) - - mkdir.mkdirs(dir, err => { - if (err) return callback(err) - - fs.writeFile(file, data, encoding, callback) - }) - }) -} - -function outputFileSync (file, ...args) { - const dir = path.dirname(file) - if (fs.existsSync(dir)) { - return fs.writeFileSync(file, ...args) - } - mkdir.mkdirsSync(dir) - fs.writeFileSync(file, ...args) -} - -module.exports = { - outputFile: u(outputFile), - outputFileSync -} - - -/***/ }), - -/***/ 8691: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const u = (__nccwpck_require__(9380)/* .fromPromise */ .z) -const fs = __nccwpck_require__(4336) - -function pathExists (path) { - return fs.access(path).then(() => true).catch(() => false) -} - -module.exports = { - pathExists: u(pathExists), - pathExistsSync: fs.existsSync -} - - -/***/ }), - -/***/ 3071: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const u = (__nccwpck_require__(9380)/* .fromCallback */ .S) -const rimraf = __nccwpck_require__(4734) - -module.exports = { - remove: u(rimraf), - removeSync: rimraf.sync -} - - -/***/ }), - -/***/ 4734: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(9306) -const path = __nccwpck_require__(6928) -const assert = __nccwpck_require__(2613) - -const isWindows = (process.platform === 'win32') - -function defaults (options) { - const methods = [ - 'unlink', - 'chmod', - 'stat', - 'lstat', - 'rmdir', - 'readdir' - ] - methods.forEach(m => { - options[m] = options[m] || fs[m] - m = m + 'Sync' - options[m] = options[m] || fs[m] - }) - - options.maxBusyTries = options.maxBusyTries || 3 -} - -function rimraf (p, options, cb) { - let busyTries = 0 - - if (typeof options === 'function') { - cb = options - options = {} - } - - assert(p, 'rimraf: missing path') - assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string') - assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required') - assert(options, 'rimraf: invalid options argument provided') - assert.strictEqual(typeof options, 'object', 'rimraf: options should be object') - - defaults(options) - - rimraf_(p, options, function CB (er) { - if (er) { - if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') && - busyTries < options.maxBusyTries) { - busyTries++ - const time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(() => rimraf_(p, options, CB), time) - } - - // already gone - if (er.code === 'ENOENT') er = null - } - - cb(er) - }) -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - // sunos lets the root user unlink directories, which is... weird. - // so we have to lstat here and make sure it's not a dir. - options.lstat(p, (er, st) => { - if (er && er.code === 'ENOENT') { - return cb(null) - } - - // Windows can EPERM on stat. Life is suffering. - if (er && er.code === 'EPERM' && isWindows) { - return fixWinEPERM(p, options, er, cb) - } - - if (st && st.isDirectory()) { - return rmdir(p, options, er, cb) - } - - options.unlink(p, er => { - if (er) { - if (er.code === 'ENOENT') { - return cb(null) - } - if (er.code === 'EPERM') { - return (isWindows) - ? fixWinEPERM(p, options, er, cb) - : rmdir(p, options, er, cb) - } - if (er.code === 'EISDIR') { - return rmdir(p, options, er, cb) - } - } - return cb(er) - }) - }) -} - -function fixWinEPERM (p, options, er, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - if (er) { - assert(er instanceof Error) - } - - options.chmod(p, 0o666, er2 => { - if (er2) { - cb(er2.code === 'ENOENT' ? null : er) - } else { - options.stat(p, (er3, stats) => { - if (er3) { - cb(er3.code === 'ENOENT' ? null : er) - } else if (stats.isDirectory()) { - rmdir(p, options, er, cb) - } else { - options.unlink(p, cb) - } - }) - } - }) -} - -function fixWinEPERMSync (p, options, er) { - let stats - - assert(p) - assert(options) - if (er) { - assert(er instanceof Error) - } - - try { - options.chmodSync(p, 0o666) - } catch (er2) { - if (er2.code === 'ENOENT') { - return - } else { - throw er - } - } - - try { - stats = options.statSync(p) - } catch (er3) { - if (er3.code === 'ENOENT') { - return - } else { - throw er - } - } - - if (stats.isDirectory()) { - rmdirSync(p, options, er) - } else { - options.unlinkSync(p) - } -} - -function rmdir (p, options, originalEr, cb) { - assert(p) - assert(options) - if (originalEr) { - assert(originalEr instanceof Error) - } - assert(typeof cb === 'function') - - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - options.rmdir(p, er => { - if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) { - rmkids(p, options, cb) - } else if (er && er.code === 'ENOTDIR') { - cb(originalEr) - } else { - cb(er) - } - }) -} - -function rmkids (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - options.readdir(p, (er, files) => { - if (er) return cb(er) - - let n = files.length - let errState - - if (n === 0) return options.rmdir(p, cb) - - files.forEach(f => { - rimraf(path.join(p, f), options, er => { - if (errState) { - return - } - if (er) return cb(errState = er) - if (--n === 0) { - options.rmdir(p, cb) - } - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p, options) { - let st - - options = options || {} - defaults(options) - - assert(p, 'rimraf: missing path') - assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.strictEqual(typeof options, 'object', 'rimraf: options should be object') - - try { - st = options.lstatSync(p) - } catch (er) { - if (er.code === 'ENOENT') { - return - } - - // Windows can EPERM on stat. Life is suffering. - if (er.code === 'EPERM' && isWindows) { - fixWinEPERMSync(p, options, er) - } - } - - try { - // sunos lets the root user unlink directories, which is... weird. - if (st && st.isDirectory()) { - rmdirSync(p, options, null) - } else { - options.unlinkSync(p) - } - } catch (er) { - if (er.code === 'ENOENT') { - return - } else if (er.code === 'EPERM') { - return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) - } else if (er.code !== 'EISDIR') { - throw er - } - rmdirSync(p, options, er) - } -} - -function rmdirSync (p, options, originalEr) { - assert(p) - assert(options) - if (originalEr) { - assert(originalEr instanceof Error) - } - - try { - options.rmdirSync(p) - } catch (er) { - if (er.code === 'ENOTDIR') { - throw originalEr - } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') { - rmkidsSync(p, options) - } else if (er.code !== 'ENOENT') { - throw er - } - } -} - -function rmkidsSync (p, options) { - assert(p) - assert(options) - options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options)) - - if (isWindows) { - // We only end up here once we got ENOTEMPTY at least once, and - // at this point, we are guaranteed to have removed all the kids. - // So, we know that it won't be ENOENT or ENOTDIR or anything else. - // try really hard to delete stuff on windows, because it has a - // PROFOUNDLY annoying habit of not closing handles promptly when - // files are deleted, resulting in spurious ENOTEMPTY errors. - const startTime = Date.now() - do { - try { - const ret = options.rmdirSync(p, options) - return ret - } catch (er) { } - } while (Date.now() - startTime < 500) // give up after 500ms - } else { - const ret = options.rmdirSync(p, options) - return ret - } -} - -module.exports = rimraf -rimraf.sync = rimrafSync - - -/***/ }), - -/***/ 1441: -/***/ ((module) => { - -"use strict"; - -/* eslint-disable node/no-deprecated-api */ -module.exports = function (size) { - if (typeof Buffer.allocUnsafe === 'function') { - try { - return Buffer.allocUnsafe(size) - } catch (e) { - return new Buffer(size) - } - } - return new Buffer(size) -} - - -/***/ }), - -/***/ 6841: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(9306) -const path = __nccwpck_require__(6928) - -const NODE_VERSION_MAJOR_WITH_BIGINT = 10 -const NODE_VERSION_MINOR_WITH_BIGINT = 5 -const NODE_VERSION_PATCH_WITH_BIGINT = 0 -const nodeVersion = process.versions.node.split('.') -const nodeVersionMajor = Number.parseInt(nodeVersion[0], 10) -const nodeVersionMinor = Number.parseInt(nodeVersion[1], 10) -const nodeVersionPatch = Number.parseInt(nodeVersion[2], 10) - -function nodeSupportsBigInt () { - if (nodeVersionMajor > NODE_VERSION_MAJOR_WITH_BIGINT) { - return true - } else if (nodeVersionMajor === NODE_VERSION_MAJOR_WITH_BIGINT) { - if (nodeVersionMinor > NODE_VERSION_MINOR_WITH_BIGINT) { - return true - } else if (nodeVersionMinor === NODE_VERSION_MINOR_WITH_BIGINT) { - if (nodeVersionPatch >= NODE_VERSION_PATCH_WITH_BIGINT) { - return true - } - } - } - return false -} - -function getStats (src, dest, cb) { - if (nodeSupportsBigInt()) { - fs.stat(src, { bigint: true }, (err, srcStat) => { - if (err) return cb(err) - fs.stat(dest, { bigint: true }, (err, destStat) => { - if (err) { - if (err.code === 'ENOENT') return cb(null, { srcStat, destStat: null }) - return cb(err) - } - return cb(null, { srcStat, destStat }) - }) - }) - } else { - fs.stat(src, (err, srcStat) => { - if (err) return cb(err) - fs.stat(dest, (err, destStat) => { - if (err) { - if (err.code === 'ENOENT') return cb(null, { srcStat, destStat: null }) - return cb(err) - } - return cb(null, { srcStat, destStat }) - }) - }) - } -} - -function getStatsSync (src, dest) { - let srcStat, destStat - if (nodeSupportsBigInt()) { - srcStat = fs.statSync(src, { bigint: true }) - } else { - srcStat = fs.statSync(src) - } - try { - if (nodeSupportsBigInt()) { - destStat = fs.statSync(dest, { bigint: true }) - } else { - destStat = fs.statSync(dest) - } - } catch (err) { - if (err.code === 'ENOENT') return { srcStat, destStat: null } - throw err - } - return { srcStat, destStat } -} - -function checkPaths (src, dest, funcName, cb) { - getStats(src, dest, (err, stats) => { - if (err) return cb(err) - const { srcStat, destStat } = stats - if (destStat && destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) { - return cb(new Error('Source and destination must not be the same.')) - } - if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { - return cb(new Error(errMsg(src, dest, funcName))) - } - return cb(null, { srcStat, destStat }) - }) -} - -function checkPathsSync (src, dest, funcName) { - const { srcStat, destStat } = getStatsSync(src, dest) - if (destStat && destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) { - throw new Error('Source and destination must not be the same.') - } - if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { - throw new Error(errMsg(src, dest, funcName)) - } - return { srcStat, destStat } -} - -// recursively check if dest parent is a subdirectory of src. -// It works for all file types including symlinks since it -// checks the src and dest inodes. It starts from the deepest -// parent and stops once it reaches the src parent or the root path. -function checkParentPaths (src, srcStat, dest, funcName, cb) { - const srcParent = path.resolve(path.dirname(src)) - const destParent = path.resolve(path.dirname(dest)) - if (destParent === srcParent || destParent === path.parse(destParent).root) return cb() - if (nodeSupportsBigInt()) { - fs.stat(destParent, { bigint: true }, (err, destStat) => { - if (err) { - if (err.code === 'ENOENT') return cb() - return cb(err) - } - if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) { - return cb(new Error(errMsg(src, dest, funcName))) - } - return checkParentPaths(src, srcStat, destParent, funcName, cb) - }) - } else { - fs.stat(destParent, (err, destStat) => { - if (err) { - if (err.code === 'ENOENT') return cb() - return cb(err) - } - if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) { - return cb(new Error(errMsg(src, dest, funcName))) - } - return checkParentPaths(src, srcStat, destParent, funcName, cb) - }) - } -} - -function checkParentPathsSync (src, srcStat, dest, funcName) { - const srcParent = path.resolve(path.dirname(src)) - const destParent = path.resolve(path.dirname(dest)) - if (destParent === srcParent || destParent === path.parse(destParent).root) return - let destStat - try { - if (nodeSupportsBigInt()) { - destStat = fs.statSync(destParent, { bigint: true }) - } else { - destStat = fs.statSync(destParent) - } - } catch (err) { - if (err.code === 'ENOENT') return - throw err - } - if (destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev) { - throw new Error(errMsg(src, dest, funcName)) - } - return checkParentPathsSync(src, srcStat, destParent, funcName) -} - -// return true if dest is a subdir of src, otherwise false. -// It only checks the path strings. -function isSrcSubdir (src, dest) { - const srcArr = path.resolve(src).split(path.sep).filter(i => i) - const destArr = path.resolve(dest).split(path.sep).filter(i => i) - return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true) -} - -function errMsg (src, dest, funcName) { - return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.` -} - -module.exports = { - checkPaths, - checkPathsSync, - checkParentPaths, - checkParentPathsSync, - isSrcSubdir -} - - -/***/ }), - -/***/ 4840: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(9306) -const os = __nccwpck_require__(857) -const path = __nccwpck_require__(6928) - -// HFS, ext{2,3}, FAT do not, Node.js v0.10 does not -function hasMillisResSync () { - let tmpfile = path.join('millis-test-sync' + Date.now().toString() + Math.random().toString().slice(2)) - tmpfile = path.join(os.tmpdir(), tmpfile) - - // 550 millis past UNIX epoch - const d = new Date(1435410243862) - fs.writeFileSync(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141') - const fd = fs.openSync(tmpfile, 'r+') - fs.futimesSync(fd, d, d) - fs.closeSync(fd) - return fs.statSync(tmpfile).mtime > 1435410243000 -} - -function hasMillisRes (callback) { - let tmpfile = path.join('millis-test' + Date.now().toString() + Math.random().toString().slice(2)) - tmpfile = path.join(os.tmpdir(), tmpfile) - - // 550 millis past UNIX epoch - const d = new Date(1435410243862) - fs.writeFile(tmpfile, 'https://github.com/jprichardson/node-fs-extra/pull/141', err => { - if (err) return callback(err) - fs.open(tmpfile, 'r+', (err, fd) => { - if (err) return callback(err) - fs.futimes(fd, d, d, err => { - if (err) return callback(err) - fs.close(fd, err => { - if (err) return callback(err) - fs.stat(tmpfile, (err, stats) => { - if (err) return callback(err) - callback(null, stats.mtime > 1435410243000) - }) - }) - }) - }) - }) -} - -function timeRemoveMillis (timestamp) { - if (typeof timestamp === 'number') { - return Math.floor(timestamp / 1000) * 1000 - } else if (timestamp instanceof Date) { - return new Date(Math.floor(timestamp.getTime() / 1000) * 1000) - } else { - throw new Error('fs-extra: timeRemoveMillis() unknown parameter type') - } -} - -function utimesMillis (path, atime, mtime, callback) { - // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback) - fs.open(path, 'r+', (err, fd) => { - if (err) return callback(err) - fs.futimes(fd, atime, mtime, futimesErr => { - fs.close(fd, closeErr => { - if (callback) callback(futimesErr || closeErr) - }) - }) - }) -} - -function utimesMillisSync (path, atime, mtime) { - const fd = fs.openSync(path, 'r+') - fs.futimesSync(fd, atime, mtime) - return fs.closeSync(fd) -} - -module.exports = { - hasMillisRes, - hasMillisResSync, - timeRemoveMillis, - utimesMillis, - utimesMillisSync -} - - -/***/ }), - -/***/ 6196: -/***/ ((module) => { - -"use strict"; - -// Call this function in a another function to find out the file from -// which that function was called from. (Inspects the v8 stack trace) -// -// Inspired by http://stackoverflow.com/questions/13227489 -module.exports = function getCallerFile(position) { - if (position === void 0) { position = 2; } - if (position >= Error.stackTraceLimit) { - throw new TypeError('getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `' + position + '` and Error.stackTraceLimit was: `' + Error.stackTraceLimit + '`'); - } - var oldPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function (_, stack) { return stack; }; - var stack = new Error().stack; - Error.prepareStackTrace = oldPrepareStackTrace; - if (stack !== null && typeof stack === 'object') { - // stack[0] holds this file - // stack[1] holds where this function was called - // stack[2] holds the file we're interested in - return stack[position] ? stack[position].getFileName() : undefined; - } -}; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 3394: -/***/ ((module) => { - -"use strict"; - - -module.exports = clone - -var getPrototypeOf = Object.getPrototypeOf || function (obj) { - return obj.__proto__ -} - -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj - - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) } - else - var copy = Object.create(null) - - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - - return copy -} - - -/***/ }), - -/***/ 9306: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var fs = __nccwpck_require__(9896) -var polyfills = __nccwpck_require__(9747) -var legacy = __nccwpck_require__(624) -var clone = __nccwpck_require__(3394) - -var util = __nccwpck_require__(9023) - -/* istanbul ignore next - node 0.x polyfill */ -var gracefulQueue -var previousSymbol - -/* istanbul ignore else - node 0.x polyfill */ -if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { - gracefulQueue = Symbol.for('graceful-fs.queue') - // This is used in testing by future versions - previousSymbol = Symbol.for('graceful-fs.previous') -} else { - gracefulQueue = '___graceful-fs.queue' - previousSymbol = '___graceful-fs.previous' -} - -function noop () {} - -function publishQueue(context, queue) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue - } - }) -} - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) - } - -// Once time initialization -if (!fs[gracefulQueue]) { - // This queue can be shared by multiple loaded instances - var queue = global[gracefulQueue] || [] - publishQueue(fs, queue) - - // Patch fs.close/closeSync to shared queue version, because we need - // to retry() whenever a close happens *anywhere* in the program. - // This is essential when multiple graceful-fs instances are - // in play at the same time. - fs.close = (function (fs$close) { - function close (fd, cb) { - return fs$close.call(fs, fd, function (err) { - // This function uses the graceful-fs shared queue - if (!err) { - resetQueue() - } - - if (typeof cb === 'function') - cb.apply(this, arguments) - }) - } - - Object.defineProperty(close, previousSymbol, { - value: fs$close - }) - return close - })(fs.close) - - fs.closeSync = (function (fs$closeSync) { - function closeSync (fd) { - // This function uses the graceful-fs shared queue - fs$closeSync.apply(fs, arguments) - resetQueue() - } - - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }) - return closeSync - })(fs.closeSync) - - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(fs[gracefulQueue]) - __nccwpck_require__(2613).equal(fs[gracefulQueue].length, 0) - }) - } -} - -if (!global[gracefulQueue]) { - publishQueue(global, fs[gracefulQueue]); -} - -module.exports = patch(clone(fs)) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { - module.exports = patch(fs) - fs.__patched = true; -} - -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch - - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readFile(path, options, cb) - - function go$readFile (path, options, cb, startTime) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$writeFile(path, data, options, cb) - - function go$writeFile (path, data, options, cb, startTime) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$appendFile(path, data, options, cb) - - function go$appendFile (path, data, options, cb, startTime) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$copyFile = fs.copyFile - if (fs$copyFile) - fs.copyFile = copyFile - function copyFile (src, dest, flags, cb) { - if (typeof flags === 'function') { - cb = flags - flags = 0 - } - return go$copyFile(src, dest, flags, cb) - - function go$copyFile (src, dest, flags, cb, startTime) { - return fs$copyFile(src, dest, flags, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$readdir = fs.readdir - fs.readdir = readdir - var noReaddirOptionVersions = /^v[0-5]\./ - function readdir (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - var go$readdir = noReaddirOptionVersions.test(process.version) - ? function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, fs$readdirCallback( - path, options, cb, startTime - )) - } - : function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, options, fs$readdirCallback( - path, options, cb, startTime - )) - } - - return go$readdir(path, options, cb) - - function fs$readdirCallback (path, options, cb, startTime) { - return function (err, files) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([ - go$readdir, - [path, options, cb], - err, - startTime || Date.now(), - Date.now() - ]) - else { - if (files && files.sort) - files.sort() - - if (typeof cb === 'function') - cb.call(this, err, files) - } - } - } - } - - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } - - var fs$ReadStream = fs.ReadStream - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - } - - var fs$WriteStream = fs.WriteStream - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - } - - Object.defineProperty(fs, 'ReadStream', { - get: function () { - return ReadStream - }, - set: function (val) { - ReadStream = val - }, - enumerable: true, - configurable: true - }) - Object.defineProperty(fs, 'WriteStream', { - get: function () { - return WriteStream - }, - set: function (val) { - WriteStream = val - }, - enumerable: true, - configurable: true - }) - - // legacy names - var FileReadStream = ReadStream - Object.defineProperty(fs, 'FileReadStream', { - get: function () { - return FileReadStream - }, - set: function (val) { - FileReadStream = val - }, - enumerable: true, - configurable: true - }) - var FileWriteStream = WriteStream - Object.defineProperty(fs, 'FileWriteStream', { - get: function () { - return FileWriteStream - }, - set: function (val) { - FileWriteStream = val - }, - enumerable: true, - configurable: true - }) - - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } - - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() - - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } - - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } - - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } - - function createReadStream (path, options) { - return new fs.ReadStream(path, options) - } - - function createWriteStream (path, options) { - return new fs.WriteStream(path, options) - } - - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null - - return go$open(path, flags, mode, cb) - - function go$open (path, flags, mode, cb, startTime) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - return fs -} - -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - fs[gracefulQueue].push(elem) - retry() -} - -// keep track of the timeout between retry() calls -var retryTimer - -// reset the startTime and lastTime to now -// this resets the start of the 60 second overall timeout as well as the -// delay between attempts so that we'll retry these jobs sooner -function resetQueue () { - var now = Date.now() - for (var i = 0; i < fs[gracefulQueue].length; ++i) { - // entries that are only a length of 2 are from an older version, don't - // bother modifying those since they'll be retried anyway. - if (fs[gracefulQueue][i].length > 2) { - fs[gracefulQueue][i][3] = now // startTime - fs[gracefulQueue][i][4] = now // lastTime - } - } - // call retry to make sure we're actively processing the queue - retry() -} - -function retry () { - // clear the timer and remove it to help prevent unintended concurrency - clearTimeout(retryTimer) - retryTimer = undefined - - if (fs[gracefulQueue].length === 0) - return - - var elem = fs[gracefulQueue].shift() - var fn = elem[0] - var args = elem[1] - // these items may be unset if they were added by an older graceful-fs - var err = elem[2] - var startTime = elem[3] - var lastTime = elem[4] - - // if we don't have a startTime we have no way of knowing if we've waited - // long enough, so go ahead and retry this item now - if (startTime === undefined) { - debug('RETRY', fn.name, args) - fn.apply(null, args) - } else if (Date.now() - startTime >= 60000) { - // it's been more than 60 seconds total, bail now - debug('TIMEOUT', fn.name, args) - var cb = args.pop() - if (typeof cb === 'function') - cb.call(null, err) - } else { - // the amount of time between the last attempt and right now - var sinceAttempt = Date.now() - lastTime - // the amount of time between when we first tried, and when we last tried - // rounded up to at least 1 - var sinceStart = Math.max(lastTime - startTime, 1) - // backoff. wait longer than the total time we've been retrying, but only - // up to a maximum of 100ms - var desiredDelay = Math.min(sinceStart * 1.2, 100) - // it's been long enough since the last retry, do it again - if (sinceAttempt >= desiredDelay) { - debug('RETRY', fn.name, args) - fn.apply(null, args.concat([startTime])) - } else { - // if we can't do this job yet, push it to the end of the queue - // and let the next iteration check again - fs[gracefulQueue].push(elem) - } - } - - // schedule our next run if one isn't already scheduled - if (retryTimer === undefined) { - retryTimer = setTimeout(retry, 0) - } -} - - -/***/ }), - -/***/ 624: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Stream = (__nccwpck_require__(2203).Stream) - -module.exports = legacy - -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream - } - - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); - - Stream.call(this); - - var self = this; - - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; - - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.encoding) this.setEncoding(this.encoding); - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; - } - - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; - return; - } - - self.fd = fd; - self.emit('open', fd); - self._read(); - }) - } - - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); - - Stream.call(this); - - this.path = path; - this.fd = null; - this.writable = true; - - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - this.busy = false; - this._queue = []; - - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); - } - } -} - - -/***/ }), - -/***/ 9747: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var constants = __nccwpck_require__(9140) - -var origCwd = process.cwd -var cwd = null - -var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform - -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -try { - process.cwd() -} catch (er) {} - -// This check is needed until node.js 12 is required -if (typeof process.chdir === 'function') { - var chdir = process.chdir - process.chdir = function (d) { - cwd = null - chdir.call(process, d) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) -} - -module.exports = patch - -function patch (fs) { - // (re-)implement some things that are known busted or missing. - - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) - } - - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) - } - - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. - - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) - - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) - - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) - - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) - - fs.stat = statFix(fs.stat) - fs.fstat = statFix(fs.fstat) - fs.lstat = statFix(fs.lstat) - - fs.statSync = statFixSync(fs.statSync) - fs.fstatSync = statFixSync(fs.fstatSync) - fs.lstatSync = statFixSync(fs.lstatSync) - - // if lchmod/lchown do not exist, then make them no-ops - if (fs.chmod && !fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (fs.chown && !fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) - } - fs.lchownSync = function () {} - } - - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 60 seconds. - - // Set the timeout this long because some Windows Anti-Virus, such as Parity - // bit9, may lock files for up to a minute, causing npm package install - // failures. Also, take care to yield the scheduler. Windows scheduling gives - // CPU to a busy looping process, which can cause the program causing the lock - // contention to be starved of CPU by node, so the contention doesn't resolve. - if (platform === "win32") { - fs.rename = typeof fs.rename !== 'function' ? fs.rename - : (function (fs$rename) { - function rename (from, to, cb) { - var start = Date.now() - var backoff = 0; - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") - && Date.now() - start < 60000) { - setTimeout(function() { - fs.stat(to, function (stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er) - }) - }, backoff) - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er) - }) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename) - return rename - })(fs.rename) - } - - // if read() returns EAGAIN, then just try it again. - fs.read = typeof fs.read !== 'function' ? fs.read - : (function (fs$read) { - function read (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - - // This ensures `util.promisify` works as it does for native `fs.read`. - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) - return read - })(fs.read) - - fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync - : (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } - }})(fs.readSync) - - function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - } - - function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - - } else if (fs.futimes) { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } - } - - function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - - function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - function callback (er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - if (cb) cb.apply(this, arguments) - } - return options ? orig.call(fs, target, options, callback) - : orig.call(fs, target, callback) - } - } - - function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options) { - var stats = options ? orig.call(fs, target, options) - : orig.call(fs, target) - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - return stats; - } - } - - // ENOSYS means that the fs doesn't support the op. Just ignore - // that, because it doesn't matter. - // - // if there's no getuid, or if getuid() is something other - // than 0, and the error is EINVAL or EPERM, then just ignore - // it. - // - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // - // When running as root, or if other types of errors are - // encountered, then it's strict. - function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - - return false - } -} - - -/***/ }), - -/***/ 2921: -/***/ ((module) => { - -"use strict"; - - -module.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf('--'); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -}; - - -/***/ }), - -/***/ 5229: -/***/ ((module) => { - -const { hasOwnProperty } = Object.prototype - -const eol = typeof process !== 'undefined' && - process.platform === 'win32' ? '\r\n' : '\n' - -const encode = (obj, opt) => { - const children = [] - let out = '' - - if (typeof opt === 'string') { - opt = { - section: opt, - whitespace: false, - } - } else { - opt = opt || Object.create(null) - opt.whitespace = opt.whitespace === true - } - - const separator = opt.whitespace ? ' = ' : '=' - - for (const k of Object.keys(obj)) { - const val = obj[k] - if (val && Array.isArray(val)) { - for (const item of val) - out += safe(k + '[]') + separator + safe(item) + '\n' - } else if (val && typeof val === 'object') - children.push(k) - else - out += safe(k) + separator + safe(val) + eol - } - - if (opt.section && out.length) - out = '[' + safe(opt.section) + ']' + eol + out - - for (const k of children) { - const nk = dotSplit(k).join('\\.') - const section = (opt.section ? opt.section + '.' : '') + nk - const { whitespace } = opt - const child = encode(obj[k], { - section, - whitespace, - }) - if (out.length && child.length) - out += eol - - out += child - } - - return out -} - -const dotSplit = str => - str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002') - .replace(/\\\./g, '\u0001') - .split(/\./) - .map(part => - part.replace(/\1/g, '\\.') - .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001')) - -const decode = str => { - const out = Object.create(null) - let p = out - let section = null - // section |key = value - const re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i - const lines = str.split(/[\r\n]+/g) - - for (const line of lines) { - if (!line || line.match(/^\s*[;#]/)) - continue - const match = line.match(re) - if (!match) - continue - if (match[1] !== undefined) { - section = unsafe(match[1]) - if (section === '__proto__') { - // not allowed - // keep parsing the section, but don't attach it. - p = Object.create(null) - continue - } - p = out[section] = out[section] || Object.create(null) - continue - } - const keyRaw = unsafe(match[2]) - const isArray = keyRaw.length > 2 && keyRaw.slice(-2) === '[]' - const key = isArray ? keyRaw.slice(0, -2) : keyRaw - if (key === '__proto__') - continue - const valueRaw = match[3] ? unsafe(match[4]) : true - const value = valueRaw === 'true' || - valueRaw === 'false' || - valueRaw === 'null' ? JSON.parse(valueRaw) - : valueRaw - - // Convert keys with '[]' suffix to an array - if (isArray) { - if (!hasOwnProperty.call(p, key)) - p[key] = [] - else if (!Array.isArray(p[key])) - p[key] = [p[key]] - } - - // safeguard against resetting a previously defined - // array by accidentally forgetting the brackets - if (Array.isArray(p[key])) - p[key].push(value) - else - p[key] = value - } - - // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} - // use a filter to return the keys that have to be deleted. - const remove = [] - for (const k of Object.keys(out)) { - if (!hasOwnProperty.call(out, k) || - typeof out[k] !== 'object' || - Array.isArray(out[k])) - continue - - // see if the parent section is also an object. - // if so, add it to that, and mark this one for deletion - const parts = dotSplit(k) - let p = out - const l = parts.pop() - const nl = l.replace(/\\\./g, '.') - for (const part of parts) { - if (part === '__proto__') - continue - if (!hasOwnProperty.call(p, part) || typeof p[part] !== 'object') - p[part] = Object.create(null) - p = p[part] - } - if (p === out && nl === l) - continue - - p[nl] = out[k] - remove.push(k) - } - for (const del of remove) - delete out[del] - - return out -} - -const isQuoted = val => - (val.charAt(0) === '"' && val.slice(-1) === '"') || - (val.charAt(0) === "'" && val.slice(-1) === "'") - -const safe = val => - (typeof val !== 'string' || - val.match(/[=\r\n]/) || - val.match(/^\[/) || - (val.length > 1 && - isQuoted(val)) || - val !== val.trim()) - ? JSON.stringify(val) - : val.replace(/;/g, '\\;').replace(/#/g, '\\#') - -const unsafe = (val, doUnesc) => { - val = (val || '').trim() - if (isQuoted(val)) { - // remove the single quotes before calling JSON.parse - if (val.charAt(0) === "'") - val = val.substr(1, val.length - 2) - - try { - val = JSON.parse(val) - } catch (_) {} - } else { - // walk the val to find the first not-escaped ; character - let esc = false - let unesc = '' - for (let i = 0, l = val.length; i < l; i++) { - const c = val.charAt(i) - if (esc) { - if ('\\;#'.indexOf(c) !== -1) - unesc += c - else - unesc += '\\' + c - - esc = false - } else if (';#'.indexOf(c) !== -1) - break - else if (c === '\\') - esc = true - else - unesc += c - } - if (esc) - unesc += '\\' - - return unesc.trim() - } - return val -} - -module.exports = { - parse: decode, - decode, - stringify: encode, - encode, - safe, - unsafe, -} - - -/***/ }), - -/***/ 5680: -/***/ ((module) => { - -"use strict"; -/* eslint-disable yoda */ - - -const isFullwidthCodePoint = codePoint => { - if (Number.isNaN(codePoint)) { - return false; - } - - // Code points are derived from: - // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt - if ( - codePoint >= 0x1100 && ( - codePoint <= 0x115F || // Hangul Jamo - codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET - codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET - // CJK Radicals Supplement .. Enclosed CJK Letters and Months - (0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) || - // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A - (0x3250 <= codePoint && codePoint <= 0x4DBF) || - // CJK Unified Ideographs .. Yi Radicals - (0x4E00 <= codePoint && codePoint <= 0xA4C6) || - // Hangul Jamo Extended-A - (0xA960 <= codePoint && codePoint <= 0xA97C) || - // Hangul Syllables - (0xAC00 <= codePoint && codePoint <= 0xD7A3) || - // CJK Compatibility Ideographs - (0xF900 <= codePoint && codePoint <= 0xFAFF) || - // Vertical Forms - (0xFE10 <= codePoint && codePoint <= 0xFE19) || - // CJK Compatibility Forms .. Small Form Variants - (0xFE30 <= codePoint && codePoint <= 0xFE6B) || - // Halfwidth and Fullwidth Forms - (0xFF01 <= codePoint && codePoint <= 0xFF60) || - (0xFFE0 <= codePoint && codePoint <= 0xFFE6) || - // Kana Supplement - (0x1B000 <= codePoint && codePoint <= 0x1B001) || - // Enclosed Ideographic Supplement - (0x1F200 <= codePoint && codePoint <= 0x1F251) || - // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane - (0x20000 <= codePoint && codePoint <= 0x3FFFD) - ) - ) { - return true; - } - - return false; -}; - -module.exports = isFullwidthCodePoint; -module.exports["default"] = isFullwidthCodePoint; - - -/***/ }), - -/***/ 7677: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var _fs -try { - _fs = __nccwpck_require__(9306) -} catch (_) { - _fs = __nccwpck_require__(9896) -} - -function readFile (file, options, callback) { - if (callback == null) { - callback = options - options = {} - } - - if (typeof options === 'string') { - options = {encoding: options} - } - - options = options || {} - var fs = options.fs || _fs - - var shouldThrow = true - if ('throws' in options) { - shouldThrow = options.throws - } - - fs.readFile(file, options, function (err, data) { - if (err) return callback(err) - - data = stripBom(data) - - var obj - try { - obj = JSON.parse(data, options ? options.reviver : null) - } catch (err2) { - if (shouldThrow) { - err2.message = file + ': ' + err2.message - return callback(err2) - } else { - return callback(null, null) - } - } - - callback(null, obj) - }) -} - -function readFileSync (file, options) { - options = options || {} - if (typeof options === 'string') { - options = {encoding: options} - } - - var fs = options.fs || _fs - - var shouldThrow = true - if ('throws' in options) { - shouldThrow = options.throws - } - - try { - var content = fs.readFileSync(file, options) - content = stripBom(content) - return JSON.parse(content, options.reviver) - } catch (err) { - if (shouldThrow) { - err.message = file + ': ' + err.message - throw err - } else { - return null - } - } -} - -function stringify (obj, options) { - var spaces - var EOL = '\n' - if (typeof options === 'object' && options !== null) { - if (options.spaces) { - spaces = options.spaces - } - if (options.EOL) { - EOL = options.EOL - } - } - - var str = JSON.stringify(obj, options ? options.replacer : null, spaces) - - return str.replace(/\n/g, EOL) + EOL -} - -function writeFile (file, obj, options, callback) { - if (callback == null) { - callback = options - options = {} - } - options = options || {} - var fs = options.fs || _fs - - var str = '' - try { - str = stringify(obj, options) - } catch (err) { - // Need to return whether a callback was passed or not - if (callback) callback(err, null) - return - } - - fs.writeFile(file, str, options, callback) -} - -function writeFileSync (file, obj, options) { - options = options || {} - var fs = options.fs || _fs - - var str = stringify(obj, options) - // not sure if fs.writeFileSync returns anything, but just in case - return fs.writeFileSync(file, str, options) -} - -function stripBom (content) { - // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified - if (Buffer.isBuffer(content)) content = content.toString('utf8') - content = content.replace(/^\uFEFF/, '') - return content -} - -var jsonfile = { - readFile: readFile, - readFileSync: readFileSync, - writeFile: writeFile, - writeFileSync: writeFileSync -} - -module.exports = jsonfile - - -/***/ }), - -/***/ 7200: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint max-classes-per-file: ["error", 2] */ -/* eslint no-underscore-dangle: ["error", { "allow": ["_getLocationKeys"] }] */ - -const flatted = __nccwpck_require__(7032); -const levels = __nccwpck_require__(3268); - -class SerDe { - constructor() { - const deserialise = { - __LOG4JS_undefined__: undefined, - __LOG4JS_NaN__: Number('abc'), - __LOG4JS_Infinity__: 1 / 0, - '__LOG4JS_-Infinity__': -1 / 0, - }; - this.deMap = deserialise; - this.serMap = {}; - Object.keys(this.deMap).forEach((key) => { - const value = this.deMap[key]; - this.serMap[value] = key; - }); - } - - canSerialise(key) { - if (typeof key === 'string') return false; - return key in this.serMap; - } - - serialise(key) { - if (this.canSerialise(key)) return this.serMap[key]; - return key; - } - - canDeserialise(key) { - return key in this.deMap; - } - - deserialise(key) { - if (this.canDeserialise(key)) return this.deMap[key]; - return key; - } -} -const serde = new SerDe(); - -/** - * @name LoggingEvent - * @namespace Log4js - */ -class LoggingEvent { - /** - * Models a logging event. - * @constructor - * @param {string} categoryName name of category - * @param {Log4js.Level} level level of message - * @param {Array} data objects to log - * @param {Error} [error] - * @author Seth Chisamore - */ - constructor(categoryName, level, data, context, location, error) { - this.startTime = new Date(); - this.categoryName = categoryName; - this.data = data; - this.level = level; - this.context = Object.assign({}, context); // eslint-disable-line prefer-object-spread - this.pid = process.pid; - this.error = error; - - if (typeof location !== 'undefined') { - if (!location || typeof location !== 'object' || Array.isArray(location)) - throw new TypeError( - 'Invalid location type passed to LoggingEvent constructor' - ); - - this.constructor._getLocationKeys().forEach((key) => { - if (typeof location[key] !== 'undefined') this[key] = location[key]; - }); - } - } - - /** @private */ - static _getLocationKeys() { - return [ - 'fileName', - 'lineNumber', - 'columnNumber', - 'callStack', - 'className', - 'functionName', - 'functionAlias', - 'callerName', - ]; - } - - serialise() { - return flatted.stringify(this, (key, value) => { - // JSON.stringify(new Error('test')) returns {}, which is not really useful for us. - // The following allows us to serialize errors (semi) correctly. - if (value instanceof Error) { - // eslint-disable-next-line prefer-object-spread - value = Object.assign( - { message: value.message, stack: value.stack }, - value - ); - } - // JSON.stringify({a: Number('abc'), b: 1/0, c: -1/0}) returns {a: null, b: null, c: null}. - // The following allows us to serialize to NaN, Infinity and -Infinity correctly. - // JSON.stringify([undefined]) returns [null]. - // The following allows us to serialize to undefined correctly. - return serde.serialise(value); - }); - } - - static deserialise(serialised) { - let event; - try { - const rehydratedEvent = flatted.parse(serialised, (key, value) => { - if (value && value.message && value.stack) { - const fakeError = new Error(value); - Object.keys(value).forEach((k) => { - fakeError[k] = value[k]; - }); - value = fakeError; - } - return serde.deserialise(value); - }); - this._getLocationKeys().forEach((key) => { - if (typeof rehydratedEvent[key] !== 'undefined') { - if (!rehydratedEvent.location) rehydratedEvent.location = {}; - rehydratedEvent.location[key] = rehydratedEvent[key]; - } - }); - event = new LoggingEvent( - rehydratedEvent.categoryName, - levels.getLevel(rehydratedEvent.level.levelStr), - rehydratedEvent.data, - rehydratedEvent.context, - rehydratedEvent.location, - rehydratedEvent.error - ); - event.startTime = new Date(rehydratedEvent.startTime); - event.pid = rehydratedEvent.pid; - if (rehydratedEvent.cluster) { - event.cluster = rehydratedEvent.cluster; - } - } catch (e) { - event = new LoggingEvent('log4js', levels.ERROR, [ - 'Unable to parse log:', - serialised, - 'because: ', - e, - ]); - } - - return event; - } -} - -module.exports = LoggingEvent; - - -/***/ }), - -/***/ 9202: -/***/ ((module) => { - -function maxFileSizeUnitTransform(maxLogSize) { - if (typeof maxLogSize === 'number' && Number.isInteger(maxLogSize)) { - return maxLogSize; - } - - const units = { - K: 1024, - M: 1024 * 1024, - G: 1024 * 1024 * 1024, - }; - const validUnit = Object.keys(units); - const unit = maxLogSize.slice(-1).toLocaleUpperCase(); - const value = maxLogSize.slice(0, -1).trim(); - - if (validUnit.indexOf(unit) < 0 || !Number.isInteger(Number(value))) { - throw Error(`maxLogSize: "${maxLogSize}" is invalid`); - } else { - return value * units[unit]; - } -} - -function adapter(configAdapter, config) { - const newConfig = Object.assign({}, config); // eslint-disable-line prefer-object-spread - Object.keys(configAdapter).forEach((key) => { - if (newConfig[key]) { - newConfig[key] = configAdapter[key](config[key]); - } - }); - return newConfig; -} - -function fileAppenderAdapter(config) { - const configAdapter = { - maxLogSize: maxFileSizeUnitTransform, - }; - return adapter(configAdapter, config); -} - -const adapters = { - dateFile: fileAppenderAdapter, - file: fileAppenderAdapter, - fileSync: fileAppenderAdapter, -}; - -module.exports.modifyConfig = (config) => - adapters[config.type] ? adapters[config.type](config) : config; - - -/***/ }), - -/***/ 8836: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(2413)('log4js:categoryFilter'); - -function categoryFilter(excludes, appender) { - if (typeof excludes === 'string') excludes = [excludes]; - return (logEvent) => { - debug(`Checking ${logEvent.categoryName} against ${excludes}`); - if (excludes.indexOf(logEvent.categoryName) === -1) { - debug('Not excluded, sending to appender'); - appender(logEvent); - } - }; -} - -function configure(config, layouts, findAppender) { - const appender = findAppender(config.appender); - return categoryFilter(config.exclude, appender); -} - -module.exports.configure = configure; - - -/***/ }), - -/***/ 2793: -/***/ ((module) => { - -// eslint-disable-next-line no-console -const consoleLog = console.log.bind(console); - -function consoleAppender(layout, timezoneOffset) { - return (loggingEvent) => { - consoleLog(layout(loggingEvent, timezoneOffset)); - }; -} - -function configure(config, layouts) { - let layout = layouts.colouredLayout; - if (config.layout) { - layout = layouts.layout(config.layout.type, config.layout); - } - return consoleAppender(layout, config.timezoneOffset); -} - -module.exports.configure = configure; - - -/***/ }), - -/***/ 8648: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const streams = __nccwpck_require__(9404); -const os = __nccwpck_require__(857); - -const eol = os.EOL; - -function openTheStream(filename, pattern, options) { - const stream = new streams.DateRollingFileStream(filename, pattern, options); - stream.on('error', (err) => { - // eslint-disable-next-line no-console - console.error( - 'log4js.dateFileAppender - Writing to file %s, error happened ', - filename, - err - ); - }); - stream.on('drain', () => { - process.emit('log4js:pause', false); - }); - return stream; -} - -/** - * File appender that rolls files according to a date pattern. - * @param filename base filename. - * @param pattern the format that will be added to the end of filename when rolling, - * also used to check when to roll files - defaults to '.yyyy-MM-dd' - * @param layout layout function for log messages - defaults to basicLayout - * @param options - options to be passed to the underlying stream - * @param timezoneOffset - optional timezone offset in minutes (default system local) - */ -function appender(filename, pattern, layout, options, timezoneOffset) { - // the options for file appender use maxLogSize, but the docs say any file appender - // options should work for dateFile as well. - options.maxSize = options.maxLogSize; - - const writer = openTheStream(filename, pattern, options); - - const app = function (logEvent) { - if (!writer.writable) { - return; - } - if (!writer.write(layout(logEvent, timezoneOffset) + eol, 'utf8')) { - process.emit('log4js:pause', true); - } - }; - - app.shutdown = function (complete) { - writer.end('', 'utf-8', complete); - }; - - return app; -} - -function configure(config, layouts) { - let layout = layouts.basicLayout; - if (config.layout) { - layout = layouts.layout(config.layout.type, config.layout); - } - - if (!config.alwaysIncludePattern) { - config.alwaysIncludePattern = false; - } - - // security default (instead of relying on streamroller default) - config.mode = config.mode || 0o600; - - return appender( - config.filename, - config.pattern, - layout, - config, - config.timezoneOffset - ); -} - -module.exports.configure = configure; - - -/***/ }), - -/***/ 2932: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(2413)('log4js:file'); -const path = __nccwpck_require__(6928); -const streams = __nccwpck_require__(9404); -const os = __nccwpck_require__(857); - -const eol = os.EOL; - -let mainSighupListenerStarted = false; -const sighupListeners = new Set(); -function mainSighupHandler() { - sighupListeners.forEach((app) => { - app.sighupHandler(); - }); -} - -/** - * File Appender writing the logs to a text file. Supports rolling of logs by size. - * - * @param file the file log messages will be written to - * @param layout a function that takes a logEvent and returns a string - * (defaults to basicLayout). - * @param logSize - the maximum size (in bytes) for a log file, - * if not provided then logs won't be rotated. - * @param numBackups - the number of log files to keep after logSize - * has been reached (default 5) - * @param options - options to be passed to the underlying stream - * @param timezoneOffset - optional timezone offset in minutes (default system local) - */ -function fileAppender( - file, - layout, - logSize, - numBackups, - options, - timezoneOffset -) { - if (typeof file !== 'string' || file.length === 0) { - throw new Error(`Invalid filename: ${file}`); - } else if (file.endsWith(path.sep)) { - throw new Error(`Filename is a directory: ${file}`); - } else if (file.indexOf(`~${path.sep}`) === 0) { - // handle ~ expansion: https://github.com/nodejs/node/issues/684 - // exclude ~ and ~filename as these can be valid files - file = file.replace('~', os.homedir()); - } - file = path.normalize(file); - numBackups = !numBackups && numBackups !== 0 ? 5 : numBackups; - - debug( - 'Creating file appender (', - file, - ', ', - logSize, - ', ', - numBackups, - ', ', - options, - ', ', - timezoneOffset, - ')' - ); - - function openTheStream(filePath, fileSize, numFiles, opt) { - const stream = new streams.RollingFileStream( - filePath, - fileSize, - numFiles, - opt - ); - stream.on('error', (err) => { - // eslint-disable-next-line no-console - console.error( - 'log4js.fileAppender - Writing to file %s, error happened ', - filePath, - err - ); - }); - stream.on('drain', () => { - process.emit('log4js:pause', false); - }); - return stream; - } - - let writer = openTheStream(file, logSize, numBackups, options); - - const app = function (loggingEvent) { - if (!writer.writable) { - return; - } - if (options.removeColor === true) { - // eslint-disable-next-line no-control-regex - const regex = /\x1b[[0-9;]*m/g; - loggingEvent.data = loggingEvent.data.map((d) => { - if (typeof d === 'string') return d.replace(regex, ''); - return d; - }); - } - if (!writer.write(layout(loggingEvent, timezoneOffset) + eol, 'utf8')) { - process.emit('log4js:pause', true); - } - }; - - app.reopen = function () { - writer.end(() => { - writer = openTheStream(file, logSize, numBackups, options); - }); - }; - - app.sighupHandler = function () { - debug('SIGHUP handler called.'); - app.reopen(); - }; - - app.shutdown = function (complete) { - sighupListeners.delete(app); - if (sighupListeners.size === 0 && mainSighupListenerStarted) { - process.removeListener('SIGHUP', mainSighupHandler); - mainSighupListenerStarted = false; - } - writer.end('', 'utf-8', complete); - }; - - // On SIGHUP, close and reopen all files. This allows this appender to work with - // logrotate. Note that if you are using logrotate, you should not set - // `logSize`. - sighupListeners.add(app); - if (!mainSighupListenerStarted) { - process.on('SIGHUP', mainSighupHandler); - mainSighupListenerStarted = true; - } - - return app; -} - -function configure(config, layouts) { - let layout = layouts.basicLayout; - if (config.layout) { - layout = layouts.layout(config.layout.type, config.layout); - } - - // security default (instead of relying on streamroller default) - config.mode = config.mode || 0o600; - - return fileAppender( - config.filename, - layout, - config.maxLogSize, - config.backups, - config, - config.timezoneOffset - ); -} - -module.exports.configure = configure; - - -/***/ }), - -/***/ 7719: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(2413)('log4js:fileSync'); -const path = __nccwpck_require__(6928); -const fs = __nccwpck_require__(9896); -const os = __nccwpck_require__(857); - -const eol = os.EOL; - -function touchFile(file, options) { - // attempt to create the directory - const mkdir = (dir) => { - try { - return fs.mkdirSync(dir, { recursive: true }); - } catch (e) { - // backward-compatible fs.mkdirSync for nodejs pre-10.12.0 (without recursive option) - // recursive creation of parent first - if (e.code === 'ENOENT') { - mkdir(path.dirname(dir)); - return mkdir(dir); - } - - // throw error for all except EEXIST and EROFS (read-only filesystem) - if (e.code !== 'EEXIST' && e.code !== 'EROFS') { - throw e; - } - - // EEXIST: throw if file and not directory - // EROFS : throw if directory not found - else { - try { - if (fs.statSync(dir).isDirectory()) { - return dir; - } - throw e; - } catch (err) { - throw e; - } - } - } - }; - mkdir(path.dirname(file)); - - // try to throw EISDIR, EROFS, EACCES - fs.appendFileSync(file, '', { mode: options.mode, flag: options.flags }); -} - -class RollingFileSync { - constructor(filename, maxLogSize, backups, options) { - debug('In RollingFileStream'); - - if (maxLogSize < 0) { - throw new Error(`maxLogSize (${maxLogSize}) should be > 0`); - } - - this.filename = filename; - this.size = maxLogSize; - this.backups = backups; - this.options = options; - this.currentSize = 0; - - function currentFileSize(file) { - let fileSize = 0; - - try { - fileSize = fs.statSync(file).size; - } catch (e) { - // file does not exist - touchFile(file, options); - } - return fileSize; - } - - this.currentSize = currentFileSize(this.filename); - } - - shouldRoll() { - debug( - 'should roll with current size %d, and max size %d', - this.currentSize, - this.size - ); - return this.currentSize >= this.size; - } - - roll(filename) { - const that = this; - const nameMatcher = new RegExp(`^${path.basename(filename)}`); - - function justTheseFiles(item) { - return nameMatcher.test(item); - } - - function index(filename_) { - return ( - parseInt(filename_.slice(`${path.basename(filename)}.`.length), 10) || 0 - ); - } - - function byIndex(a, b) { - return index(a) - index(b); - } - - function increaseFileIndex(fileToRename) { - const idx = index(fileToRename); - debug(`Index of ${fileToRename} is ${idx}`); - if (that.backups === 0) { - fs.truncateSync(filename, 0); - } else if (idx < that.backups) { - // on windows, you can get a EEXIST error if you rename a file to an existing file - // so, we'll try to delete the file we're renaming to first - try { - fs.unlinkSync(`${filename}.${idx + 1}`); - } catch (e) { - // ignore err: if we could not delete, it's most likely that it doesn't exist - } - - debug(`Renaming ${fileToRename} -> ${filename}.${idx + 1}`); - fs.renameSync( - path.join(path.dirname(filename), fileToRename), - `${filename}.${idx + 1}` - ); - } - } - - function renameTheFiles() { - // roll the backups (rename file.n to file.n+1, where n <= numBackups) - debug('Renaming the old files'); - - const files = fs.readdirSync(path.dirname(filename)); - files - .filter(justTheseFiles) - .sort(byIndex) - .reverse() - .forEach(increaseFileIndex); - } - - debug('Rolling, rolling, rolling'); - renameTheFiles(); - } - - // eslint-disable-next-line no-unused-vars - write(chunk, encoding) { - const that = this; - - function writeTheChunk() { - debug('writing the chunk to the file'); - that.currentSize += chunk.length; - fs.appendFileSync(that.filename, chunk); - } - - debug('in write'); - - if (this.shouldRoll()) { - this.currentSize = 0; - this.roll(this.filename); - } - - writeTheChunk(); - } -} - -/** - * File Appender writing the logs to a text file. Supports rolling of logs by size. - * - * @param file the file log messages will be written to - * @param layout a function that takes a logevent and returns a string - * (defaults to basicLayout). - * @param logSize - the maximum size (in bytes) for a log file, - * if not provided then logs won't be rotated. - * @param numBackups - the number of log files to keep after logSize - * has been reached (default 5) - * @param options - options to be passed to the underlying stream - * @param timezoneOffset - optional timezone offset in minutes (default system local) - */ -function fileAppender( - file, - layout, - logSize, - numBackups, - options, - timezoneOffset -) { - if (typeof file !== 'string' || file.length === 0) { - throw new Error(`Invalid filename: ${file}`); - } else if (file.endsWith(path.sep)) { - throw new Error(`Filename is a directory: ${file}`); - } else if (file.indexOf(`~${path.sep}`) === 0) { - // handle ~ expansion: https://github.com/nodejs/node/issues/684 - // exclude ~ and ~filename as these can be valid files - file = file.replace('~', os.homedir()); - } - file = path.normalize(file); - numBackups = !numBackups && numBackups !== 0 ? 5 : numBackups; - - debug( - 'Creating fileSync appender (', - file, - ', ', - logSize, - ', ', - numBackups, - ', ', - options, - ', ', - timezoneOffset, - ')' - ); - - function openTheStream(filePath, fileSize, numFiles) { - let stream; - - if (fileSize) { - stream = new RollingFileSync(filePath, fileSize, numFiles, options); - } else { - stream = ((f) => { - // touch the file to apply flags (like w to truncate the file) - touchFile(f, options); - - return { - write(data) { - fs.appendFileSync(f, data); - }, - }; - })(filePath); - } - - return stream; - } - - const logFile = openTheStream(file, logSize, numBackups); - - return (loggingEvent) => { - logFile.write(layout(loggingEvent, timezoneOffset) + eol); - }; -} - -function configure(config, layouts) { - let layout = layouts.basicLayout; - if (config.layout) { - layout = layouts.layout(config.layout.type, config.layout); - } - - const options = { - flags: config.flags || 'a', - encoding: config.encoding || 'utf8', - mode: config.mode || 0o600, - }; - - return fileAppender( - config.filename, - layout, - config.maxLogSize, - config.backups, - options, - config.timezoneOffset - ); -} - -module.exports.configure = configure; - - -/***/ }), - -/***/ 1468: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const path = __nccwpck_require__(6928); -const debug = __nccwpck_require__(2413)('log4js:appenders'); -const configuration = __nccwpck_require__(1293); -const clustering = __nccwpck_require__(6217); -const levels = __nccwpck_require__(3268); -const layouts = __nccwpck_require__(9492); -const adapters = __nccwpck_require__(9202); - -// pre-load the core appenders so that webpack can find them -const coreAppenders = new Map(); -coreAppenders.set('console', __nccwpck_require__(2793)); -coreAppenders.set('stdout', __nccwpck_require__(6493)); -coreAppenders.set('stderr', __nccwpck_require__(1746)); -coreAppenders.set('logLevelFilter', __nccwpck_require__(9596)); -coreAppenders.set('categoryFilter', __nccwpck_require__(8836)); -coreAppenders.set('noLogFilter', __nccwpck_require__(81)); -coreAppenders.set('file', __nccwpck_require__(2932)); -coreAppenders.set('dateFile', __nccwpck_require__(8648)); -coreAppenders.set('fileSync', __nccwpck_require__(7719)); -coreAppenders.set('tcp', __nccwpck_require__(2491)); - -const appenders = new Map(); - -const tryLoading = (modulePath, config) => { - let resolvedPath; - try { - const modulePathCJS = `${modulePath}.cjs`; - resolvedPath = require.resolve(modulePathCJS); - debug('Loading module from ', modulePathCJS); - } catch (e) { - resolvedPath = modulePath; - debug('Loading module from ', modulePath); - } - try { - // eslint-disable-next-line global-require, import/no-dynamic-require - return require(resolvedPath); - } catch (e) { - // if the module was found, and we still got an error, then raise it - configuration.throwExceptionIf( - config, - e.code !== 'MODULE_NOT_FOUND', - `appender "${modulePath}" could not be loaded (error was: ${e})` - ); - return undefined; - } -}; - -const loadAppenderModule = (type, config) => - coreAppenders.get(type) || - tryLoading(`./${type}`, config) || - tryLoading(type, config) || - (require.main && - require.main.filename && - tryLoading(path.join(path.dirname(require.main.filename), type), config)) || - tryLoading(path.join(process.cwd(), type), config); - -const appendersLoading = new Set(); - -const getAppender = (name, config) => { - if (appenders.has(name)) return appenders.get(name); - if (!config.appenders[name]) return false; - if (appendersLoading.has(name)) - throw new Error(`Dependency loop detected for appender ${name}.`); - appendersLoading.add(name); - - debug(`Creating appender ${name}`); - // eslint-disable-next-line no-use-before-define - const appender = createAppender(name, config); - appendersLoading.delete(name); - appenders.set(name, appender); - return appender; -}; - -const createAppender = (name, config) => { - const appenderConfig = config.appenders[name]; - const appenderModule = appenderConfig.type.configure - ? appenderConfig.type - : loadAppenderModule(appenderConfig.type, config); - configuration.throwExceptionIf( - config, - configuration.not(appenderModule), - `appender "${name}" is not valid (type "${appenderConfig.type}" could not be found)` - ); - if (appenderModule.appender) { - process.emitWarning( - `Appender ${appenderConfig.type} exports an appender function.`, - 'DeprecationWarning', - 'log4js-node-DEP0001' - ); - debug( - '[log4js-node-DEP0001]', - `DEPRECATION: Appender ${appenderConfig.type} exports an appender function.` - ); - } - if (appenderModule.shutdown) { - process.emitWarning( - `Appender ${appenderConfig.type} exports a shutdown function.`, - 'DeprecationWarning', - 'log4js-node-DEP0002' - ); - debug( - '[log4js-node-DEP0002]', - `DEPRECATION: Appender ${appenderConfig.type} exports a shutdown function.` - ); - } - - debug(`${name}: clustering.isMaster ? ${clustering.isMaster()}`); - debug( - // eslint-disable-next-line global-require - `${name}: appenderModule is ${(__nccwpck_require__(9023).inspect)(appenderModule)}` - ); - return clustering.onlyOnMaster( - () => { - debug( - `calling appenderModule.configure for ${name} / ${appenderConfig.type}` - ); - return appenderModule.configure( - adapters.modifyConfig(appenderConfig), - layouts, - (appender) => getAppender(appender, config), - levels - ); - }, - /* istanbul ignore next: fn never gets called by non-master yet needed to pass config validation */ () => {} - ); -}; - -const setup = (config) => { - appenders.clear(); - appendersLoading.clear(); - if (!config) { - return; - } - - const usedAppenders = []; - Object.values(config.categories).forEach((category) => { - usedAppenders.push(...category.appenders); - }); - Object.keys(config.appenders).forEach((name) => { - // dodgy hard-coding of special case for tcp-server and multiprocess which may not have - // any categories associated with it, but needs to be started up anyway - if ( - usedAppenders.includes(name) || - config.appenders[name].type === 'tcp-server' || - config.appenders[name].type === 'multiprocess' - ) { - getAppender(name, config); - } - }); -}; - -const init = () => { - setup(); -}; -init(); - -configuration.addListener((config) => { - configuration.throwExceptionIf( - config, - configuration.not(configuration.anObject(config.appenders)), - 'must have a property "appenders" of type object.' - ); - const appenderNames = Object.keys(config.appenders); - configuration.throwExceptionIf( - config, - configuration.not(appenderNames.length), - 'must define at least one appender.' - ); - - appenderNames.forEach((name) => { - configuration.throwExceptionIf( - config, - configuration.not(config.appenders[name].type), - `appender "${name}" is not valid (must be an object with property "type")` - ); - }); -}); - -configuration.addListener(setup); - -module.exports = appenders; -module.exports.init = init; - - -/***/ }), - -/***/ 9596: -/***/ ((module) => { - -function logLevelFilter(minLevelString, maxLevelString, appender, levels) { - const minLevel = levels.getLevel(minLevelString); - const maxLevel = levels.getLevel(maxLevelString, levels.FATAL); - return (logEvent) => { - const eventLevel = logEvent.level; - if ( - minLevel.isLessThanOrEqualTo(eventLevel) && - maxLevel.isGreaterThanOrEqualTo(eventLevel) - ) { - appender(logEvent); - } - }; -} - -function configure(config, layouts, findAppender, levels) { - const appender = findAppender(config.appender); - return logLevelFilter(config.level, config.maxLevel, appender, levels); -} - -module.exports.configure = configure; - - -/***/ }), - -/***/ 81: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(2413)('log4js:noLogFilter'); - -/** - * The function removes empty or null regexp from the array - * @param {string[]} regexp - * @returns {string[]} a filtered string array with not empty or null regexp - */ -function removeNullOrEmptyRegexp(regexp) { - const filtered = regexp.filter((el) => el != null && el !== ''); - return filtered; -} - -/** - * Returns a function that will exclude the events in case they match - * with the regular expressions provided - * @param {(string|string[])} filters contains the regexp that will be used for the evaluation - * @param {*} appender - * @returns {function} - */ -function noLogFilter(filters, appender) { - return (logEvent) => { - debug(`Checking data: ${logEvent.data} against filters: ${filters}`); - if (typeof filters === 'string') { - filters = [filters]; - } - filters = removeNullOrEmptyRegexp(filters); - const regex = new RegExp(filters.join('|'), 'i'); - if ( - filters.length === 0 || - logEvent.data.findIndex((value) => regex.test(value)) < 0 - ) { - debug('Not excluded, sending to appender'); - appender(logEvent); - } - }; -} - -function configure(config, layouts, findAppender) { - const appender = findAppender(config.appender); - return noLogFilter(config.exclude, appender); -} - -module.exports.configure = configure; - - -/***/ }), - -/***/ 7071: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(2413)('log4js:recording'); - -const recordedEvents = []; - -function configure() { - return function (logEvent) { - debug( - `received logEvent, number of events now ${recordedEvents.length + 1}` - ); - debug('log event was ', logEvent); - recordedEvents.push(logEvent); - }; -} - -function replay() { - return recordedEvents.slice(); -} - -function reset() { - recordedEvents.length = 0; -} - -module.exports = { - configure, - replay, - playback: replay, - reset, - erase: reset, -}; - - -/***/ }), - -/***/ 1746: -/***/ ((module) => { - -function stderrAppender(layout, timezoneOffset) { - return (loggingEvent) => { - process.stderr.write(`${layout(loggingEvent, timezoneOffset)}\n`); - }; -} - -function configure(config, layouts) { - let layout = layouts.colouredLayout; - if (config.layout) { - layout = layouts.layout(config.layout.type, config.layout); - } - return stderrAppender(layout, config.timezoneOffset); -} - -module.exports.configure = configure; - - -/***/ }), - -/***/ 6493: -/***/ ((__unused_webpack_module, exports) => { - -function stdoutAppender(layout, timezoneOffset) { - return (loggingEvent) => { - process.stdout.write(`${layout(loggingEvent, timezoneOffset)}\n`); - }; -} - -function configure(config, layouts) { - let layout = layouts.colouredLayout; - if (config.layout) { - layout = layouts.layout(config.layout.type, config.layout); - } - return stdoutAppender(layout, config.timezoneOffset); -} - -exports.configure = configure; - - -/***/ }), - -/***/ 2491: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(2413)('log4js:tcp'); -const net = __nccwpck_require__(9278); - -function appender(config, layout) { - let canWrite = false; - const buffer = []; - let socket; - let shutdownAttempts = 3; - let endMsg = '__LOG4JS__'; - - function write(loggingEvent) { - debug('Writing log event to socket'); - canWrite = socket.write(`${layout(loggingEvent)}${endMsg}`, 'utf8'); - } - - function emptyBuffer() { - let evt; - debug('emptying buffer'); - while ((evt = buffer.shift())) { - write(evt); - } - } - - function createSocket() { - debug( - `appender creating socket to ${config.host || 'localhost'}:${ - config.port || 5000 - }` - ); - endMsg = `${config.endMsg || '__LOG4JS__'}`; - socket = net.createConnection( - config.port || 5000, - config.host || 'localhost' - ); - socket.on('connect', () => { - debug('socket connected'); - emptyBuffer(); - canWrite = true; - }); - socket.on('drain', () => { - debug('drain event received, emptying buffer'); - canWrite = true; - emptyBuffer(); - }); - socket.on('timeout', socket.end.bind(socket)); - socket.on('error', (e) => { - debug('connection error', e); - canWrite = false; - emptyBuffer(); - }); - socket.on('close', createSocket); - } - - createSocket(); - - function log(loggingEvent) { - if (canWrite) { - write(loggingEvent); - } else { - debug('buffering log event because it cannot write at the moment'); - buffer.push(loggingEvent); - } - } - - log.shutdown = function (cb) { - debug('shutdown called'); - if (buffer.length && shutdownAttempts) { - debug('buffer has items, waiting 100ms to empty'); - shutdownAttempts -= 1; - setTimeout(() => { - log.shutdown(cb); - }, 100); - } else { - socket.removeAllListeners('close'); - socket.end(cb); - } - }; - return log; -} - -function configure(config, layouts) { - debug(`configure with config = ${config}`); - let layout = function (loggingEvent) { - return loggingEvent.serialise(); - }; - if (config.layout) { - layout = layouts.layout(config.layout.type, config.layout); - } - return appender(config, layout); -} - -module.exports.configure = configure; - - -/***/ }), - -/***/ 5339: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(2413)('log4js:categories'); -const configuration = __nccwpck_require__(1293); -const levels = __nccwpck_require__(3268); -const appenders = __nccwpck_require__(1468); - -const categories = new Map(); - -/** - * Add inherited config to this category. That includes extra appenders from parent, - * and level, if none is set on this category. - * This is recursive, so each parent also gets loaded with inherited appenders. - * Inheritance is blocked if a category has inherit=false - * @param {*} config - * @param {*} category the child category - * @param {string} categoryName dotted path to category - * @return {void} - */ -function inheritFromParent(config, category, categoryName) { - if (category.inherit === false) return; - const lastDotIndex = categoryName.lastIndexOf('.'); - if (lastDotIndex < 0) return; // category is not a child - const parentCategoryName = categoryName.slice(0, lastDotIndex); - let parentCategory = config.categories[parentCategoryName]; - - if (!parentCategory) { - // parent is missing, so implicitly create it, so that it can inherit from its parents - parentCategory = { inherit: true, appenders: [] }; - } - - // make sure parent has had its inheritance taken care of before pulling its properties to this child - inheritFromParent(config, parentCategory, parentCategoryName); - - // if the parent is not in the config (because we just created it above), - // and it inherited a valid configuration, add it to config.categories - if ( - !config.categories[parentCategoryName] && - parentCategory.appenders && - parentCategory.appenders.length && - parentCategory.level - ) { - config.categories[parentCategoryName] = parentCategory; - } - - category.appenders = category.appenders || []; - category.level = category.level || parentCategory.level; - - // merge in appenders from parent (parent is already holding its inherited appenders) - parentCategory.appenders.forEach((ap) => { - if (!category.appenders.includes(ap)) { - category.appenders.push(ap); - } - }); - category.parent = parentCategory; -} - -/** - * Walk all categories in the config, and pull down any configuration from parent to child. - * This includes inherited appenders, and level, where level is not set. - * Inheritance is skipped where a category has inherit=false. - * @param {*} config - */ -function addCategoryInheritance(config) { - if (!config.categories) return; - const categoryNames = Object.keys(config.categories); - categoryNames.forEach((name) => { - const category = config.categories[name]; - // add inherited appenders and level to this category - inheritFromParent(config, category, name); - }); -} - -configuration.addPreProcessingListener((config) => - addCategoryInheritance(config) -); - -configuration.addListener((config) => { - configuration.throwExceptionIf( - config, - configuration.not(configuration.anObject(config.categories)), - 'must have a property "categories" of type object.' - ); - - const categoryNames = Object.keys(config.categories); - configuration.throwExceptionIf( - config, - configuration.not(categoryNames.length), - 'must define at least one category.' - ); - - categoryNames.forEach((name) => { - const category = config.categories[name]; - configuration.throwExceptionIf( - config, - [ - configuration.not(category.appenders), - configuration.not(category.level), - ], - `category "${name}" is not valid (must be an object with properties "appenders" and "level")` - ); - - configuration.throwExceptionIf( - config, - configuration.not(Array.isArray(category.appenders)), - `category "${name}" is not valid (appenders must be an array of appender names)` - ); - - configuration.throwExceptionIf( - config, - configuration.not(category.appenders.length), - `category "${name}" is not valid (appenders must contain at least one appender name)` - ); - - if (Object.prototype.hasOwnProperty.call(category, 'enableCallStack')) { - configuration.throwExceptionIf( - config, - typeof category.enableCallStack !== 'boolean', - `category "${name}" is not valid (enableCallStack must be boolean type)` - ); - } - - category.appenders.forEach((appender) => { - configuration.throwExceptionIf( - config, - configuration.not(appenders.get(appender)), - `category "${name}" is not valid (appender "${appender}" is not defined)` - ); - }); - - configuration.throwExceptionIf( - config, - configuration.not(levels.getLevel(category.level)), - `category "${name}" is not valid (level "${category.level}" not recognised;` + - ` valid levels are ${levels.levels.join(', ')})` - ); - }); - - configuration.throwExceptionIf( - config, - configuration.not(config.categories.default), - 'must define a "default" category.' - ); -}); - -const setup = (config) => { - categories.clear(); - if (!config) { - return; - } - - const categoryNames = Object.keys(config.categories); - categoryNames.forEach((name) => { - const category = config.categories[name]; - const categoryAppenders = []; - category.appenders.forEach((appender) => { - categoryAppenders.push(appenders.get(appender)); - debug(`Creating category ${name}`); - categories.set(name, { - appenders: categoryAppenders, - level: levels.getLevel(category.level), - enableCallStack: category.enableCallStack || false, - }); - }); - }); -}; - -const init = () => { - setup(); -}; -init(); - -configuration.addListener(setup); - -const configForCategory = (category) => { - debug(`configForCategory: searching for config for ${category}`); - if (categories.has(category)) { - debug(`configForCategory: ${category} exists in config, returning it`); - return categories.get(category); - } - - let sourceCategoryConfig; - if (category.indexOf('.') > 0) { - debug(`configForCategory: ${category} has hierarchy, cloning from parents`); - sourceCategoryConfig = { - ...configForCategory(category.slice(0, category.lastIndexOf('.'))), - }; - } else { - if (!categories.has('default')) { - setup({ categories: { default: { appenders: ['out'], level: 'OFF' } } }); - } - debug('configForCategory: cloning default category'); - sourceCategoryConfig = { ...categories.get('default') }; - } - categories.set(category, sourceCategoryConfig); - return sourceCategoryConfig; -}; - -const appendersForCategory = (category) => - configForCategory(category).appenders; - -const getLevelForCategory = (category) => configForCategory(category).level; -const setLevelForCategory = (category, level) => { - configForCategory(category).level = level; -}; - -const getEnableCallStackForCategory = (category) => - configForCategory(category).enableCallStack === true; -const setEnableCallStackForCategory = (category, useCallStack) => { - configForCategory(category).enableCallStack = useCallStack; -}; - -module.exports = categories; -module.exports = Object.assign(module.exports, { - appendersForCategory, - getLevelForCategory, - setLevelForCategory, - getEnableCallStackForCategory, - setEnableCallStackForCategory, - init, -}); - - -/***/ }), - -/***/ 6217: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(2413)('log4js:clustering'); -const LoggingEvent = __nccwpck_require__(7200); -const configuration = __nccwpck_require__(1293); - -let disabled = false; -let cluster = null; -try { - // eslint-disable-next-line global-require - cluster = __nccwpck_require__(9907); -} catch (e) { - debug('cluster module not present'); - disabled = true; -} - -const listeners = []; - -let pm2 = false; -let pm2InstanceVar = 'NODE_APP_INSTANCE'; - -const isPM2Master = () => pm2 && process.env[pm2InstanceVar] === '0'; -const isMaster = () => - disabled || (cluster && cluster.isMaster) || isPM2Master(); - -const sendToListeners = (logEvent) => { - listeners.forEach((l) => l(logEvent)); -}; - -// in a multi-process node environment, worker loggers will use -// process.send -const receiver = (worker, message) => { - // prior to node v6, the worker parameter was not passed (args were message, handle) - debug('cluster message received from worker ', worker, ': ', message); - if (worker.topic && worker.data) { - message = worker; - worker = undefined; - } - if (message && message.topic && message.topic === 'log4js:message') { - debug('received message: ', message.data); - const logEvent = LoggingEvent.deserialise(message.data); - sendToListeners(logEvent); - } -}; - -if (!disabled) { - configuration.addListener((config) => { - // clear out the listeners, because configure has been called. - listeners.length = 0; - - ({ - pm2, - disableClustering: disabled, - pm2InstanceVar = 'NODE_APP_INSTANCE', - } = config); - - debug(`clustering disabled ? ${disabled}`); - debug(`cluster.isMaster ? ${cluster && cluster.isMaster}`); - debug(`pm2 enabled ? ${pm2}`); - debug(`pm2InstanceVar = ${pm2InstanceVar}`); - debug(`process.env[${pm2InstanceVar}] = ${process.env[pm2InstanceVar]}`); - - // just in case configure is called after shutdown - if (pm2) { - process.removeListener('message', receiver); - } - if (cluster && cluster.removeListener) { - cluster.removeListener('message', receiver); - } - - if (disabled || config.disableClustering) { - debug('Not listening for cluster messages, because clustering disabled.'); - } else if (isPM2Master()) { - // PM2 cluster support - // PM2 runs everything as workers - install pm2-intercom for this to work. - // we only want one of the app instances to write logs - debug('listening for PM2 broadcast messages'); - process.on('message', receiver); - } else if (cluster && cluster.isMaster) { - debug('listening for cluster messages'); - cluster.on('message', receiver); - } else { - debug('not listening for messages, because we are not a master process'); - } - }); -} - -module.exports = { - onlyOnMaster: (fn, notMaster) => (isMaster() ? fn() : notMaster), - isMaster, - send: (msg) => { - if (isMaster()) { - sendToListeners(msg); - } else { - if (!pm2) { - msg.cluster = { - workerId: cluster.worker.id, - worker: process.pid, - }; - } - process.send({ topic: 'log4js:message', data: msg.serialise() }); - } - }, - onMessage: (listener) => { - listeners.push(listener); - }, -}; - - -/***/ }), - -/***/ 1293: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const util = __nccwpck_require__(9023); -const debug = __nccwpck_require__(2413)('log4js:configuration'); - -const preProcessingListeners = []; -const listeners = []; - -const not = (thing) => !thing; - -const anObject = (thing) => - thing && typeof thing === 'object' && !Array.isArray(thing); - -const validIdentifier = (thing) => /^[A-Za-z][A-Za-z0-9_]*$/g.test(thing); - -const anInteger = (thing) => - thing && typeof thing === 'number' && Number.isInteger(thing); - -const addListener = (fn) => { - listeners.push(fn); - debug(`Added listener, now ${listeners.length} listeners`); -}; - -const addPreProcessingListener = (fn) => { - preProcessingListeners.push(fn); - debug( - `Added pre-processing listener, now ${preProcessingListeners.length} listeners` - ); -}; - -const throwExceptionIf = (config, checks, message) => { - const tests = Array.isArray(checks) ? checks : [checks]; - tests.forEach((test) => { - if (test) { - throw new Error( - `Problem with log4js configuration: (${util.inspect(config, { - depth: 5, - })}) - ${message}` - ); - } - }); -}; - -const configure = (candidate) => { - debug('New configuration to be validated: ', candidate); - throwExceptionIf(candidate, not(anObject(candidate)), 'must be an object.'); - - debug(`Calling pre-processing listeners (${preProcessingListeners.length})`); - preProcessingListeners.forEach((listener) => listener(candidate)); - debug('Configuration pre-processing finished.'); - - debug(`Calling configuration listeners (${listeners.length})`); - listeners.forEach((listener) => listener(candidate)); - debug('Configuration finished.'); -}; - -module.exports = { - configure, - addListener, - addPreProcessingListener, - throwExceptionIf, - anObject, - anInteger, - validIdentifier, - not, -}; - - -/***/ }), - -/***/ 6426: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint no-underscore-dangle: ["error", { "allow": ["__statusCode", "_remoteAddress", "__headers", "_logging"] }] */ - -const levels = __nccwpck_require__(3268); - -const DEFAULT_FORMAT = - ':remote-addr - -' + - ' ":method :url HTTP/:http-version"' + - ' :status :content-length ":referrer"' + - ' ":user-agent"'; - -/** - * Return request url path, - * adding this function prevents the Cyclomatic Complexity, - * for the assemble_tokens function at low, to pass the tests. - * - * @param {IncomingMessage} req - * @return {string} - * @api private - */ -function getUrl(req) { - return req.originalUrl || req.url; -} - -/** - * Adds custom {token, replacement} objects to defaults, - * overwriting the defaults if any tokens clash - * - * @param {IncomingMessage} req - * @param {ServerResponse} res - * @param {Array} customTokens - * [{ token: string-or-regexp, replacement: string-or-replace-function }] - * @return {Array} - */ -function assembleTokens(req, res, customTokens) { - const arrayUniqueTokens = (array) => { - const a = array.concat(); - for (let i = 0; i < a.length; ++i) { - for (let j = i + 1; j < a.length; ++j) { - // not === because token can be regexp object - // eslint-disable-next-line eqeqeq - if (a[i].token == a[j].token) { - a.splice(j--, 1); // eslint-disable-line no-plusplus - } - } - } - return a; - }; - - const defaultTokens = []; - defaultTokens.push({ token: ':url', replacement: getUrl(req) }); - defaultTokens.push({ token: ':protocol', replacement: req.protocol }); - defaultTokens.push({ token: ':hostname', replacement: req.hostname }); - defaultTokens.push({ token: ':method', replacement: req.method }); - defaultTokens.push({ - token: ':status', - replacement: res.__statusCode || res.statusCode, - }); - defaultTokens.push({ - token: ':response-time', - replacement: res.responseTime, - }); - defaultTokens.push({ token: ':date', replacement: new Date().toUTCString() }); - defaultTokens.push({ - token: ':referrer', - replacement: req.headers.referer || req.headers.referrer || '', - }); - defaultTokens.push({ - token: ':http-version', - replacement: `${req.httpVersionMajor}.${req.httpVersionMinor}`, - }); - defaultTokens.push({ - token: ':remote-addr', - replacement: - req.headers['x-forwarded-for'] || - req.ip || - req._remoteAddress || - (req.socket && - (req.socket.remoteAddress || - (req.socket.socket && req.socket.socket.remoteAddress))), - }); - defaultTokens.push({ - token: ':user-agent', - replacement: req.headers['user-agent'], - }); - defaultTokens.push({ - token: ':content-length', - replacement: - res.getHeader('content-length') || - (res.__headers && res.__headers['Content-Length']) || - '-', - }); - defaultTokens.push({ - token: /:req\[([^\]]+)]/g, - replacement(_, field) { - return req.headers[field.toLowerCase()]; - }, - }); - defaultTokens.push({ - token: /:res\[([^\]]+)]/g, - replacement(_, field) { - return ( - res.getHeader(field.toLowerCase()) || - (res.__headers && res.__headers[field]) - ); - }, - }); - - return arrayUniqueTokens(customTokens.concat(defaultTokens)); -} - -/** - * Return formatted log line. - * - * @param {string} str - * @param {Array} tokens - * @return {string} - * @api private - */ -function format(str, tokens) { - for (let i = 0; i < tokens.length; i++) { - str = str.replace(tokens[i].token, tokens[i].replacement); - } - return str; -} - -/** - * Return RegExp Object about nolog - * - * @param {(string|Array)} nolog - * @return {RegExp} - * @api private - * - * syntax - * 1. String - * 1.1 "\\.gif" - * NOT LOGGING http://example.com/hoge.gif and http://example.com/hoge.gif?fuga - * LOGGING http://example.com/hoge.agif - * 1.2 in "\\.gif|\\.jpg$" - * NOT LOGGING http://example.com/hoge.gif and - * http://example.com/hoge.gif?fuga and http://example.com/hoge.jpg?fuga - * LOGGING http://example.com/hoge.agif, - * http://example.com/hoge.ajpg and http://example.com/hoge.jpg?hoge - * 1.3 in "\\.(gif|jpe?g|png)$" - * NOT LOGGING http://example.com/hoge.gif and http://example.com/hoge.jpeg - * LOGGING http://example.com/hoge.gif?uid=2 and http://example.com/hoge.jpg?pid=3 - * 2. RegExp - * 2.1 in /\.(gif|jpe?g|png)$/ - * SAME AS 1.3 - * 3. Array - * 3.1 ["\\.jpg$", "\\.png", "\\.gif"] - * SAME AS "\\.jpg|\\.png|\\.gif" - */ -function createNoLogCondition(nolog) { - let regexp = null; - - if (nolog instanceof RegExp) { - regexp = nolog; - } - - if (typeof nolog === 'string') { - regexp = new RegExp(nolog); - } - - if (Array.isArray(nolog)) { - // convert to strings - const regexpsAsStrings = nolog.map((reg) => - reg.source ? reg.source : reg - ); - regexp = new RegExp(regexpsAsStrings.join('|')); - } - - return regexp; -} - -/** - * Allows users to define rules around status codes to assign them to a specific - * logging level. - * There are two types of rules: - * - RANGE: matches a code within a certain range - * E.g. { 'from': 200, 'to': 299, 'level': 'info' } - * - CONTAINS: matches a code to a set of expected codes - * E.g. { 'codes': [200, 203], 'level': 'debug' } - * Note*: Rules are respected only in order of prescendence. - * - * @param {Number} statusCode - * @param {Level} currentLevel - * @param {Object} ruleSet - * @return {Level} - * @api private - */ -function matchRules(statusCode, currentLevel, ruleSet) { - let level = currentLevel; - - if (ruleSet) { - const matchedRule = ruleSet.find((rule) => { - let ruleMatched = false; - if (rule.from && rule.to) { - ruleMatched = statusCode >= rule.from && statusCode <= rule.to; - } else { - ruleMatched = rule.codes.indexOf(statusCode) !== -1; - } - return ruleMatched; - }); - if (matchedRule) { - level = levels.getLevel(matchedRule.level, level); - } - } - return level; -} - -/** - * Log requests with the given `options` or a `format` string. - * - * Options: - * - * - `format` Format string, see below for tokens - * - `level` A log4js levels instance. Supports also 'auto' - * - `nolog` A string or RegExp to exclude target logs or function(req, res): boolean - * - `statusRules` A array of rules for setting specific logging levels base on status codes - * - `context` Whether to add a response of express to the context - * - * Tokens: - * - * - `:req[header]` ex: `:req[Accept]` - * - `:res[header]` ex: `:res[Content-Length]` - * - `:http-version` - * - `:response-time` - * - `:remote-addr` - * - `:date` - * - `:method` - * - `:url` - * - `:referrer` - * - `:user-agent` - * - `:status` - * - * @return {Function} - * @param logger4js - * @param options - * @api public - */ -module.exports = function getLogger(logger4js, options) { - if (typeof options === 'string' || typeof options === 'function') { - options = { format: options }; - } else { - options = options || {}; - } - - const thisLogger = logger4js; - let level = levels.getLevel(options.level, levels.INFO); - const fmt = options.format || DEFAULT_FORMAT; - - return (req, res, next) => { - // mount safety - if (typeof req._logging !== 'undefined') return next(); - - // nologs - if (typeof options.nolog !== 'function') { - const nolog = createNoLogCondition(options.nolog); - if (nolog && nolog.test(req.originalUrl)) return next(); - } - - if (thisLogger.isLevelEnabled(level) || options.level === 'auto') { - const start = new Date(); - const { writeHead } = res; - - // flag as logging - req._logging = true; - - // proxy for statusCode. - res.writeHead = (code, headers) => { - res.writeHead = writeHead; - res.writeHead(code, headers); - - res.__statusCode = code; - res.__headers = headers || {}; - }; - - // hook on end request to emit the log entry of the HTTP request. - let finished = false; - const handler = () => { - if (finished) { - return; - } - finished = true; - - // nologs - if (typeof options.nolog === 'function') { - if (options.nolog(req, res) === true) { - req._logging = false; - return; - } - } - - res.responseTime = new Date() - start; - // status code response level handling - if (res.statusCode && options.level === 'auto') { - level = levels.INFO; - if (res.statusCode >= 300) level = levels.WARN; - if (res.statusCode >= 400) level = levels.ERROR; - } - level = matchRules(res.statusCode, level, options.statusRules); - - const combinedTokens = assembleTokens(req, res, options.tokens || []); - - if (options.context) thisLogger.addContext('res', res); - if (typeof fmt === 'function') { - const line = fmt(req, res, (str) => format(str, combinedTokens)); - if (line) thisLogger.log(level, line); - } else { - thisLogger.log(level, format(fmt, combinedTokens)); - } - if (options.context) thisLogger.removeContext('res'); - }; - res.on('end', handler); - res.on('finish', handler); - res.on('error', handler); - res.on('close', handler); - } - - // ensure next gets always called - return next(); - }; -}; - - -/***/ }), - -/***/ 9492: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const dateFormat = __nccwpck_require__(7164); -const os = __nccwpck_require__(857); -const util = __nccwpck_require__(9023); -const path = __nccwpck_require__(6928); -const url = __nccwpck_require__(7016); -const debug = __nccwpck_require__(2413)('log4js:layouts'); - -const styles = { - // styles - bold: [1, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - // grayscale - white: [37, 39], - grey: [90, 39], - black: [90, 39], - // colors - blue: [34, 39], - cyan: [36, 39], - green: [32, 39], - magenta: [35, 39], - red: [91, 39], - yellow: [33, 39], -}; - -function colorizeStart(style) { - return style ? `\x1B[${styles[style][0]}m` : ''; -} - -function colorizeEnd(style) { - return style ? `\x1B[${styles[style][1]}m` : ''; -} - -/** - * Taken from masylum's fork (https://github.com/masylum/log4js-node) - */ -function colorize(str, style) { - return colorizeStart(style) + str + colorizeEnd(style); -} - -function timestampLevelAndCategory(loggingEvent, colour) { - return colorize( - util.format( - '[%s] [%s] %s - ', - dateFormat.asString(loggingEvent.startTime), - loggingEvent.level.toString(), - loggingEvent.categoryName - ), - colour - ); -} - -/** - * BasicLayout is a simple layout for storing the logs. The logs are stored - * in following format: - *
- * [startTime] [logLevel] categoryName - message\n
- * 
- * - * @author Stephan Strittmatter - */ -function basicLayout(loggingEvent) { - return ( - timestampLevelAndCategory(loggingEvent) + util.format(...loggingEvent.data) - ); -} - -/** - * colouredLayout - taken from masylum's fork. - * same as basicLayout, but with colours. - */ -function colouredLayout(loggingEvent) { - return ( - timestampLevelAndCategory(loggingEvent, loggingEvent.level.colour) + - util.format(...loggingEvent.data) - ); -} - -function messagePassThroughLayout(loggingEvent) { - return util.format(...loggingEvent.data); -} - -function dummyLayout(loggingEvent) { - return loggingEvent.data[0]; -} - -/** - * PatternLayout - * Format for specifiers is %[padding].[truncation][field]{[format]} - * e.g. %5.10p - left pad the log level by 5 characters, up to a max of 10 - * both padding and truncation can be negative. - * Negative truncation = trunc from end of string - * Positive truncation = trunc from start of string - * Negative padding = pad right - * Positive padding = pad left - * - * Fields can be any of: - * - %r time in toLocaleTimeString format - * - %p log level - * - %c log category - * - %h hostname - * - %m log data - * - %m{l} where l is an integer, log data.slice(l) - * - %m{l,u} where l and u are integers, log data.slice(l, u) - * - %d date in constious formats - * - %% % - * - %n newline - * - %z pid - * - %f filename - * - %l line number - * - %o column postion - * - %s call stack - * - %C class name [#1316](https://github.com/log4js-node/log4js-node/pull/1316) - * - %M method or function name [#1316](https://github.com/log4js-node/log4js-node/pull/1316) - * - %A method or function alias [#1316](https://github.com/log4js-node/log4js-node/pull/1316) - * - %F fully qualified caller name [#1316](https://github.com/log4js-node/log4js-node/pull/1316) - * - %x{} add dynamic tokens to your log. Tokens are specified in the tokens parameter - * - %X{} add dynamic tokens to your log. Tokens are specified in logger context - * You can use %[ and %] to define a colored block. - * - * Tokens are specified as simple key:value objects. - * The key represents the token name whereas the value can be a string or function - * which is called to extract the value to put in the log message. If token is not - * found, it doesn't replace the field. - * - * A sample token would be: { 'pid' : function() { return process.pid; } } - * - * Takes a pattern string, array of tokens and returns a layout function. - * @return {Function} - * @param pattern - * @param tokens - * @param timezoneOffset - * - * @authors ['Stephan Strittmatter', 'Jan Schmidle'] - */ -function patternLayout(pattern, tokens) { - const TTCC_CONVERSION_PATTERN = '%r %p %c - %m%n'; - const regex = - /%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflosCMAF%])(\{([^}]+)\})?|([^%]+)/; - - pattern = pattern || TTCC_CONVERSION_PATTERN; - - function categoryName(loggingEvent, specifier) { - let loggerName = loggingEvent.categoryName; - if (specifier) { - const precision = parseInt(specifier, 10); - const loggerNameBits = loggerName.split('.'); - if (precision < loggerNameBits.length) { - loggerName = loggerNameBits - .slice(loggerNameBits.length - precision) - .join('.'); - } - } - return loggerName; - } - - function formatAsDate(loggingEvent, specifier) { - let format = dateFormat.ISO8601_FORMAT; - if (specifier) { - format = specifier; - // Pick up special cases - switch (format) { - case 'ISO8601': - case 'ISO8601_FORMAT': - format = dateFormat.ISO8601_FORMAT; - break; - case 'ISO8601_WITH_TZ_OFFSET': - case 'ISO8601_WITH_TZ_OFFSET_FORMAT': - format = dateFormat.ISO8601_WITH_TZ_OFFSET_FORMAT; - break; - case 'ABSOLUTE': - process.emitWarning( - 'Pattern %d{ABSOLUTE} is deprecated in favor of %d{ABSOLUTETIME}. ' + - 'Please use %d{ABSOLUTETIME} instead.', - 'DeprecationWarning', - 'log4js-node-DEP0003' - ); - debug( - '[log4js-node-DEP0003]', - 'DEPRECATION: Pattern %d{ABSOLUTE} is deprecated and replaced by %d{ABSOLUTETIME}.' - ); - // falls through - case 'ABSOLUTETIME': - case 'ABSOLUTETIME_FORMAT': - format = dateFormat.ABSOLUTETIME_FORMAT; - break; - case 'DATE': - process.emitWarning( - 'Pattern %d{DATE} is deprecated due to the confusion it causes when used. ' + - 'Please use %d{DATETIME} instead.', - 'DeprecationWarning', - 'log4js-node-DEP0004' - ); - debug( - '[log4js-node-DEP0004]', - 'DEPRECATION: Pattern %d{DATE} is deprecated and replaced by %d{DATETIME}.' - ); - // falls through - case 'DATETIME': - case 'DATETIME_FORMAT': - format = dateFormat.DATETIME_FORMAT; - break; - // no default - } - } - // Format the date - return dateFormat.asString(format, loggingEvent.startTime); - } - - function hostname() { - return os.hostname().toString(); - } - - function formatMessage(loggingEvent, specifier) { - let dataSlice = loggingEvent.data; - if (specifier) { - const [lowerBound, upperBound] = specifier.split(','); - dataSlice = dataSlice.slice(lowerBound, upperBound); - } - return util.format(...dataSlice); - } - - function endOfLine() { - return os.EOL; - } - - function logLevel(loggingEvent) { - return loggingEvent.level.toString(); - } - - function startTime(loggingEvent) { - return dateFormat.asString('hh:mm:ss', loggingEvent.startTime); - } - - function startColour(loggingEvent) { - return colorizeStart(loggingEvent.level.colour); - } - - function endColour(loggingEvent) { - return colorizeEnd(loggingEvent.level.colour); - } - - function percent() { - return '%'; - } - - function pid(loggingEvent) { - return loggingEvent && loggingEvent.pid - ? loggingEvent.pid.toString() - : process.pid.toString(); - } - - function clusterInfo() { - // this used to try to return the master and worker pids, - // but it would never have worked because master pid is not available to workers - // leaving this here to maintain compatibility for patterns - return pid(); - } - - function userDefined(loggingEvent, specifier) { - if (typeof tokens[specifier] !== 'undefined') { - return typeof tokens[specifier] === 'function' - ? tokens[specifier](loggingEvent) - : tokens[specifier]; - } - - return null; - } - - function contextDefined(loggingEvent, specifier) { - const resolver = loggingEvent.context[specifier]; - - if (typeof resolver !== 'undefined') { - return typeof resolver === 'function' ? resolver(loggingEvent) : resolver; - } - - return null; - } - - function fileName(loggingEvent, specifier) { - let filename = loggingEvent.fileName || ''; - - // support for ESM as it uses url instead of path for file - /* istanbul ignore next: unsure how to simulate ESM for test coverage */ - const convertFileURLToPath = function (filepath) { - const urlPrefix = 'file://'; - if (filepath.startsWith(urlPrefix)) { - // https://nodejs.org/api/url.html#urlfileurltopathurl - if (typeof url.fileURLToPath === 'function') { - filepath = url.fileURLToPath(filepath); - } - // backward-compatible for nodejs pre-10.12.0 (without url.fileURLToPath method) - else { - // posix: file:///hello/world/foo.txt -> /hello/world/foo.txt -> /hello/world/foo.txt - // win32: file:///C:/path/foo.txt -> /C:/path/foo.txt -> \C:\path\foo.txt -> C:\path\foo.txt - // win32: file://nas/foo.txt -> //nas/foo.txt -> nas\foo.txt -> \\nas\foo.txt - filepath = path.normalize( - filepath.replace(new RegExp(`^${urlPrefix}`), '') - ); - if (process.platform === 'win32') { - if (filepath.startsWith('\\')) { - filepath = filepath.slice(1); - } else { - filepath = path.sep + path.sep + filepath; - } - } - } - } - return filepath; - }; - filename = convertFileURLToPath(filename); - - if (specifier) { - const fileDepth = parseInt(specifier, 10); - const fileList = filename.split(path.sep); - if (fileList.length > fileDepth) { - filename = fileList.slice(-fileDepth).join(path.sep); - } - } - - return filename; - } - - function lineNumber(loggingEvent) { - return loggingEvent.lineNumber ? `${loggingEvent.lineNumber}` : ''; - } - - function columnNumber(loggingEvent) { - return loggingEvent.columnNumber ? `${loggingEvent.columnNumber}` : ''; - } - - function callStack(loggingEvent) { - return loggingEvent.callStack || ''; - } - - function className(loggingEvent) { - return loggingEvent.className || ''; - } - - function functionName(loggingEvent) { - return loggingEvent.functionName || ''; - } - - function functionAlias(loggingEvent) { - return loggingEvent.functionAlias || ''; - } - - function callerName(loggingEvent) { - return loggingEvent.callerName || ''; - } - - const replacers = { - c: categoryName, - d: formatAsDate, - h: hostname, - m: formatMessage, - n: endOfLine, - p: logLevel, - r: startTime, - '[': startColour, - ']': endColour, - y: clusterInfo, - z: pid, - '%': percent, - x: userDefined, - X: contextDefined, - f: fileName, - l: lineNumber, - o: columnNumber, - s: callStack, - C: className, - M: functionName, - A: functionAlias, - F: callerName, - }; - - function replaceToken(conversionCharacter, loggingEvent, specifier) { - return replacers[conversionCharacter](loggingEvent, specifier); - } - - function truncate(truncation, toTruncate) { - let len; - if (truncation) { - len = parseInt(truncation.slice(1), 10); - // negative truncate length means truncate from end of string - return len > 0 ? toTruncate.slice(0, len) : toTruncate.slice(len); - } - - return toTruncate; - } - - function pad(padding, toPad) { - let len; - if (padding) { - if (padding.charAt(0) === '-') { - len = parseInt(padding.slice(1), 10); - // Right pad with spaces - while (toPad.length < len) { - toPad += ' '; - } - } else { - len = parseInt(padding, 10); - // Left pad with spaces - while (toPad.length < len) { - toPad = ` ${toPad}`; - } - } - } - return toPad; - } - - function truncateAndPad(toTruncAndPad, truncation, padding) { - let replacement = toTruncAndPad; - replacement = truncate(truncation, replacement); - replacement = pad(padding, replacement); - return replacement; - } - - return function (loggingEvent) { - let formattedString = ''; - let result; - let searchString = pattern; - - while ((result = regex.exec(searchString)) !== null) { - // const matchedString = result[0]; - const padding = result[1]; - const truncation = result[2]; - const conversionCharacter = result[3]; - const specifier = result[5]; - const text = result[6]; - - // Check if the pattern matched was just normal text - if (text) { - formattedString += text.toString(); - } else { - // Create a raw replacement string based on the conversion - // character and specifier - const replacement = replaceToken( - conversionCharacter, - loggingEvent, - specifier - ); - formattedString += truncateAndPad(replacement, truncation, padding); - } - searchString = searchString.slice(result.index + result[0].length); - } - return formattedString; - }; -} - -const layoutMakers = { - messagePassThrough() { - return messagePassThroughLayout; - }, - basic() { - return basicLayout; - }, - colored() { - return colouredLayout; - }, - coloured() { - return colouredLayout; - }, - pattern(config) { - return patternLayout(config && config.pattern, config && config.tokens); - }, - dummy() { - return dummyLayout; - }, -}; - -module.exports = { - basicLayout, - messagePassThroughLayout, - patternLayout, - colouredLayout, - coloredLayout: colouredLayout, - dummyLayout, - addLayout(name, serializerGenerator) { - layoutMakers[name] = serializerGenerator; - }, - layout(name, config) { - return layoutMakers[name] && layoutMakers[name](config); - }, -}; - - -/***/ }), - -/***/ 3268: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const configuration = __nccwpck_require__(1293); - -const validColours = [ - 'white', - 'grey', - 'black', - 'blue', - 'cyan', - 'green', - 'magenta', - 'red', - 'yellow', -]; - -class Level { - constructor(level, levelStr, colour) { - this.level = level; - this.levelStr = levelStr; - this.colour = colour; - } - - toString() { - return this.levelStr; - } - - /** - * converts given String to corresponding Level - * @param {(Level|string)} sArg -- String value of Level OR Log4js.Level - * @param {Level} [defaultLevel] -- default Level, if no String representation - * @return {Level} - */ - static getLevel(sArg, defaultLevel) { - if (!sArg) { - return defaultLevel; - } - - if (sArg instanceof Level) { - return sArg; - } - - // a json-serialised level won't be an instance of Level (see issue #768) - if (sArg instanceof Object && sArg.levelStr) { - sArg = sArg.levelStr; - } - - return Level[sArg.toString().toUpperCase()] || defaultLevel; - } - - static addLevels(customLevels) { - if (customLevels) { - const levels = Object.keys(customLevels); - levels.forEach((l) => { - const levelStr = l.toUpperCase(); - Level[levelStr] = new Level( - customLevels[l].value, - levelStr, - customLevels[l].colour - ); - const existingLevelIndex = Level.levels.findIndex( - (lvl) => lvl.levelStr === levelStr - ); - if (existingLevelIndex > -1) { - Level.levels[existingLevelIndex] = Level[levelStr]; - } else { - Level.levels.push(Level[levelStr]); - } - }); - Level.levels.sort((a, b) => a.level - b.level); - } - } - - isLessThanOrEqualTo(otherLevel) { - if (typeof otherLevel === 'string') { - otherLevel = Level.getLevel(otherLevel); - } - return this.level <= otherLevel.level; - } - - isGreaterThanOrEqualTo(otherLevel) { - if (typeof otherLevel === 'string') { - otherLevel = Level.getLevel(otherLevel); - } - return this.level >= otherLevel.level; - } - - isEqualTo(otherLevel) { - if (typeof otherLevel === 'string') { - otherLevel = Level.getLevel(otherLevel); - } - return this.level === otherLevel.level; - } -} - -Level.levels = []; -Level.addLevels({ - ALL: { value: Number.MIN_VALUE, colour: 'grey' }, - TRACE: { value: 5000, colour: 'blue' }, - DEBUG: { value: 10000, colour: 'cyan' }, - INFO: { value: 20000, colour: 'green' }, - WARN: { value: 30000, colour: 'yellow' }, - ERROR: { value: 40000, colour: 'red' }, - FATAL: { value: 50000, colour: 'magenta' }, - MARK: { value: 9007199254740992, colour: 'grey' }, // 2^53 - OFF: { value: Number.MAX_VALUE, colour: 'grey' }, -}); - -configuration.addListener((config) => { - const levelConfig = config.levels; - if (levelConfig) { - configuration.throwExceptionIf( - config, - configuration.not(configuration.anObject(levelConfig)), - 'levels must be an object' - ); - const newLevels = Object.keys(levelConfig); - newLevels.forEach((l) => { - configuration.throwExceptionIf( - config, - configuration.not(configuration.validIdentifier(l)), - `level name "${l}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)` - ); - configuration.throwExceptionIf( - config, - configuration.not(configuration.anObject(levelConfig[l])), - `level "${l}" must be an object` - ); - configuration.throwExceptionIf( - config, - configuration.not(levelConfig[l].value), - `level "${l}" must have a 'value' property` - ); - configuration.throwExceptionIf( - config, - configuration.not(configuration.anInteger(levelConfig[l].value)), - `level "${l}".value must have an integer value` - ); - configuration.throwExceptionIf( - config, - configuration.not(levelConfig[l].colour), - `level "${l}" must have a 'colour' property` - ); - configuration.throwExceptionIf( - config, - configuration.not(validColours.indexOf(levelConfig[l].colour) > -1), - `level "${l}".colour must be one of ${validColours.join(', ')}` - ); - }); - } -}); - -configuration.addListener((config) => { - Level.addLevels(config.levels); -}); - -module.exports = Level; - - -/***/ }), - -/***/ 7914: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/** - * @fileoverview log4js is a library to log in JavaScript in similar manner - * than in log4j for Java (but not really). - * - *

Example:

- *
- *  const logging = require('log4js');
- *  const log = logging.getLogger('some-category');
- *
- *  //call the log
- *  log.trace('trace me' );
- * 
- * - * NOTE: the authors below are the original browser-based log4js authors - * don't try to contact them about bugs in this version :) - * @author Stephan Strittmatter - http://jroller.com/page/stritti - * @author Seth Chisamore - http://www.chisamore.com - * @since 2005-05-20 - * Website: http://log4js.berlios.de - */ -const debug = __nccwpck_require__(2413)('log4js:main'); -const fs = __nccwpck_require__(9896); -const deepClone = __nccwpck_require__(7468)({ proto: true }); -const configuration = __nccwpck_require__(1293); -const layouts = __nccwpck_require__(9492); -const levels = __nccwpck_require__(3268); -const appenders = __nccwpck_require__(1468); -const categories = __nccwpck_require__(5339); -const Logger = __nccwpck_require__(675); -const clustering = __nccwpck_require__(6217); -const connectLogger = __nccwpck_require__(6426); -const recordingModule = __nccwpck_require__(7071); - -let enabled = false; - -function sendLogEventToAppender(logEvent) { - if (!enabled) return; - debug('Received log event ', logEvent); - const categoryAppenders = categories.appendersForCategory( - logEvent.categoryName - ); - categoryAppenders.forEach((appender) => { - appender(logEvent); - }); -} - -function loadConfigurationFile(filename) { - debug(`Loading configuration from ${filename}`); - try { - return JSON.parse(fs.readFileSync(filename, 'utf8')); - } catch (e) { - throw new Error( - `Problem reading config from file "${filename}". Error was ${e.message}`, - e - ); - } -} - -function configure(configurationFileOrObject) { - if (enabled) { - // eslint-disable-next-line no-use-before-define - shutdown(); - } - - let configObject = configurationFileOrObject; - - if (typeof configObject === 'string') { - configObject = loadConfigurationFile(configurationFileOrObject); - } - debug(`Configuration is ${configObject}`); - - configuration.configure(deepClone(configObject)); - - clustering.onMessage(sendLogEventToAppender); - - enabled = true; - - // eslint-disable-next-line no-use-before-define - return log4js; -} - -function isConfigured() { - return enabled; -} - -function recording() { - return recordingModule; -} - -/** - * This callback type is called `shutdownCallback` and is displayed as a global symbol. - * - * @callback shutdownCallback - * @param {Error} [error] - */ - -/** - * Shutdown all log appenders. This will first disable all writing to appenders - * and then call the shutdown function each appender. - * - * @param {shutdownCallback} [callback] - The callback to be invoked once all appenders have - * shutdown. If an error occurs, the callback will be given the error object - * as the first argument. - */ -function shutdown(callback = () => {}) { - if (typeof callback !== 'function') { - throw new TypeError('Invalid callback passed to shutdown'); - } - debug('Shutdown called. Disabling all log writing.'); - // First, disable all writing to appenders. This prevents appenders from - // not being able to be drained because of run-away log writes. - enabled = false; - - // Clone out to maintain a reference - const appendersToCheck = Array.from(appenders.values()); - - // Reset immediately to prevent leaks - appenders.init(); - categories.init(); - - // Count the number of shutdown functions - const shutdownFunctions = appendersToCheck.reduce( - (accum, next) => (next.shutdown ? accum + 1 : accum), - 0 - ); - if (shutdownFunctions === 0) { - debug('No appenders with shutdown functions found.'); - callback(); - } - - let completed = 0; - let error; - debug(`Found ${shutdownFunctions} appenders with shutdown functions.`); - function complete(err) { - error = error || err; - completed += 1; - debug(`Appender shutdowns complete: ${completed} / ${shutdownFunctions}`); - if (completed >= shutdownFunctions) { - debug('All shutdown functions completed.'); - callback(error); - } - } - - // Call each of the shutdown functions - appendersToCheck - .filter((a) => a.shutdown) - .forEach((a) => a.shutdown(complete)); -} - -/** - * Get a logger instance. - * @static - * @param {string} [category=default] - * @return {Logger} instance of logger for the category - */ -function getLogger(category) { - if (!enabled) { - configure( - process.env.LOG4JS_CONFIG || { - appenders: { out: { type: 'stdout' } }, - categories: { default: { appenders: ['out'], level: 'OFF' } }, - } - ); - } - return new Logger(category || 'default'); -} - -/** - * @name log4js - * @namespace Log4js - * @property getLogger - * @property configure - * @property shutdown - */ -const log4js = { - getLogger, - configure, - isConfigured, - shutdown, - connectLogger, - levels, - addLayout: layouts.addLayout, - recording, -}; - -module.exports = log4js; - - -/***/ }), - -/***/ 675: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* eslint no-underscore-dangle: ["error", { "allow": ["_log"] }] */ - -const debug = __nccwpck_require__(2413)('log4js:logger'); -const LoggingEvent = __nccwpck_require__(7200); -const levels = __nccwpck_require__(3268); -const clustering = __nccwpck_require__(6217); -const categories = __nccwpck_require__(5339); -const configuration = __nccwpck_require__(1293); - -const stackReg = /^(?:\s*)at (?:(.+) \()?(?:([^(]+?):(\d+):(\d+))\)?$/; -/** - * The top entry is the Error - */ -const baseCallStackSkip = 1; -/** - * The _log function is 3 levels deep, we need to skip those to make it to the callSite - */ -const defaultErrorCallStackSkip = 3; - -/** - * - * @param {Error} data - * @param {number} skipIdx - * @returns {import('../types/log4js').CallStack | null} - */ -function defaultParseCallStack( - data, - skipIdx = defaultErrorCallStackSkip + baseCallStackSkip -) { - try { - const stacklines = data.stack.split('\n').slice(skipIdx); - if (!stacklines.length) { - // There's no stack in this stack - // Should we try a previous index if skipIdx was set? - return null; - } - const lineMatch = stackReg.exec(stacklines[0]); - /* istanbul ignore else: failsafe */ - if (lineMatch && lineMatch.length === 5) { - // extract class, function and alias names - let className = ''; - let functionName = ''; - let functionAlias = ''; - if (lineMatch[1] && lineMatch[1] !== '') { - // WARN: this will unset alias if alias is not present. - [functionName, functionAlias] = lineMatch[1] - .replace(/[[\]]/g, '') - .split(' as '); - functionAlias = functionAlias || ''; - - if (functionName.includes('.')) - [className, functionName] = functionName.split('.'); - } - - return { - fileName: lineMatch[2], - lineNumber: parseInt(lineMatch[3], 10), - columnNumber: parseInt(lineMatch[4], 10), - callStack: stacklines.join('\n'), - className, - functionName, - functionAlias, - callerName: lineMatch[1] || '', - }; - // eslint-disable-next-line no-else-return - } else { - // will never get here unless nodejs has changes to Error - console.error('log4js.logger - defaultParseCallStack error'); // eslint-disable-line no-console - } - } catch (err) { - // will never get error unless nodejs has breaking changes to Error - console.error('log4js.logger - defaultParseCallStack error', err); // eslint-disable-line no-console - } - return null; -} - -/** - * Logger to log messages. - * use {@see log4js#getLogger(String)} to get an instance. - * - * @name Logger - * @namespace Log4js - * @param name name of category to log to - * @param level - the loglevel for the category - * @param dispatch - the function which will receive the logevents - * - * @author Stephan Strittmatter - */ -class Logger { - constructor(name) { - if (!name) { - throw new Error('No category provided.'); - } - this.category = name; - this.context = {}; - /** @private */ - this.callStackSkipIndex = 0; - /** @private */ - this.parseCallStack = defaultParseCallStack; - debug(`Logger created (${this.category}, ${this.level})`); - } - - get level() { - return levels.getLevel( - categories.getLevelForCategory(this.category), - levels.OFF - ); - } - - set level(level) { - categories.setLevelForCategory( - this.category, - levels.getLevel(level, this.level) - ); - } - - get useCallStack() { - return categories.getEnableCallStackForCategory(this.category); - } - - set useCallStack(bool) { - categories.setEnableCallStackForCategory(this.category, bool === true); - } - - get callStackLinesToSkip() { - return this.callStackSkipIndex; - } - - set callStackLinesToSkip(number) { - if (typeof number !== 'number') { - throw new TypeError('Must be a number'); - } - if (number < 0) { - throw new RangeError('Must be >= 0'); - } - this.callStackSkipIndex = number; - } - - log(level, ...args) { - const logLevel = levels.getLevel(level); - if (!logLevel) { - if (configuration.validIdentifier(level) && args.length > 0) { - // logLevel not found but of valid signature, WARN before fallback to INFO - this.log( - levels.WARN, - 'log4js:logger.log: valid log-level not found as first parameter given:', - level - ); - this.log(levels.INFO, `[${level}]`, ...args); - } else { - // apart from fallback, allow .log(...args) to be synonym with .log("INFO", ...args) - this.log(levels.INFO, level, ...args); - } - } else if (this.isLevelEnabled(logLevel)) { - this._log(logLevel, args); - } - } - - isLevelEnabled(otherLevel) { - return this.level.isLessThanOrEqualTo(otherLevel); - } - - _log(level, data) { - debug(`sending log data (${level}) to appenders`); - const error = data.find((item) => item instanceof Error); - let callStack; - if (this.useCallStack) { - try { - if (error) { - callStack = this.parseCallStack( - error, - this.callStackSkipIndex + baseCallStackSkip - ); - } - } catch (_err) { - // Ignore Error and use the original method of creating a new Error. - } - callStack = - callStack || - this.parseCallStack( - new Error(), - this.callStackSkipIndex + - defaultErrorCallStackSkip + - baseCallStackSkip - ); - } - const loggingEvent = new LoggingEvent( - this.category, - level, - data, - this.context, - callStack, - error - ); - clustering.send(loggingEvent); - } - - addContext(key, value) { - this.context[key] = value; - } - - removeContext(key) { - delete this.context[key]; - } - - clearContext() { - this.context = {}; - } - - setParseCallStackFunction(parseFunction) { - if (typeof parseFunction === 'function') { - this.parseCallStack = parseFunction; - } else if (typeof parseFunction === 'undefined') { - this.parseCallStack = defaultParseCallStack; - } else { - throw new TypeError('Invalid type passed to setParseCallStackFunction'); - } - } -} - -function addLevelMethods(target) { - const level = levels.getLevel(target); - - const levelStrLower = level.toString().toLowerCase(); - const levelMethod = levelStrLower.replace(/_([a-z])/g, (g) => - g[1].toUpperCase() - ); - const isLevelMethod = levelMethod[0].toUpperCase() + levelMethod.slice(1); - - Logger.prototype[`is${isLevelMethod}Enabled`] = function () { - return this.isLevelEnabled(level); - }; - - Logger.prototype[levelMethod] = function (...args) { - this.log(level, ...args); - }; -} - -levels.levels.forEach(addLevelMethods); - -configuration.addListener(() => { - levels.levels.forEach(addLevelMethods); -}); - -module.exports = Logger; - - -/***/ }), - -/***/ 4877: -/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { - -/* module decorator */ module = __nccwpck_require__.nmd(module); -//! moment.js -//! version : 2.30.1 -//! authors : Tim Wood, Iskren Chernev, Moment.js contributors -//! license : MIT -//! momentjs.com - -;(function (global, factory) { - true ? module.exports = factory() : - 0 -}(this, (function () { 'use strict'; - - var hookCallback; - - function hooks() { - return hookCallback.apply(null, arguments); - } - - // This is done to register the method called with moment() - // without creating circular dependencies. - function setHookCallback(callback) { - hookCallback = callback; - } - - function isArray(input) { - return ( - input instanceof Array || - Object.prototype.toString.call(input) === '[object Array]' - ); - } - - function isObject(input) { - // IE8 will treat undefined and null as object if it wasn't for - // input != null - return ( - input != null && - Object.prototype.toString.call(input) === '[object Object]' - ); - } - - function hasOwnProp(a, b) { - return Object.prototype.hasOwnProperty.call(a, b); - } - - function isObjectEmpty(obj) { - if (Object.getOwnPropertyNames) { - return Object.getOwnPropertyNames(obj).length === 0; - } else { - var k; - for (k in obj) { - if (hasOwnProp(obj, k)) { - return false; - } - } - return true; - } - } - - function isUndefined(input) { - return input === void 0; - } - - function isNumber(input) { - return ( - typeof input === 'number' || - Object.prototype.toString.call(input) === '[object Number]' - ); - } - - function isDate(input) { - return ( - input instanceof Date || - Object.prototype.toString.call(input) === '[object Date]' - ); - } - - function map(arr, fn) { - var res = [], - i, - arrLen = arr.length; - for (i = 0; i < arrLen; ++i) { - res.push(fn(arr[i], i)); - } - return res; - } - - function extend(a, b) { - for (var i in b) { - if (hasOwnProp(b, i)) { - a[i] = b[i]; - } - } - - if (hasOwnProp(b, 'toString')) { - a.toString = b.toString; - } - - if (hasOwnProp(b, 'valueOf')) { - a.valueOf = b.valueOf; - } - - return a; - } - - function createUTC(input, format, locale, strict) { - return createLocalOrUTC(input, format, locale, strict, true).utc(); - } - - function defaultParsingFlags() { - // We need to deep clone this object. - return { - empty: false, - unusedTokens: [], - unusedInput: [], - overflow: -2, - charsLeftOver: 0, - nullInput: false, - invalidEra: null, - invalidMonth: null, - invalidFormat: false, - userInvalidated: false, - iso: false, - parsedDateParts: [], - era: null, - meridiem: null, - rfc2822: false, - weekdayMismatch: false, - }; - } - - function getParsingFlags(m) { - if (m._pf == null) { - m._pf = defaultParsingFlags(); - } - return m._pf; - } - - var some; - if (Array.prototype.some) { - some = Array.prototype.some; - } else { - some = function (fun) { - var t = Object(this), - len = t.length >>> 0, - i; - - for (i = 0; i < len; i++) { - if (i in t && fun.call(this, t[i], i, t)) { - return true; - } - } - - return false; - }; - } - - function isValid(m) { - var flags = null, - parsedParts = false, - isNowValid = m._d && !isNaN(m._d.getTime()); - if (isNowValid) { - flags = getParsingFlags(m); - parsedParts = some.call(flags.parsedDateParts, function (i) { - return i != null; - }); - isNowValid = - flags.overflow < 0 && - !flags.empty && - !flags.invalidEra && - !flags.invalidMonth && - !flags.invalidWeekday && - !flags.weekdayMismatch && - !flags.nullInput && - !flags.invalidFormat && - !flags.userInvalidated && - (!flags.meridiem || (flags.meridiem && parsedParts)); - if (m._strict) { - isNowValid = - isNowValid && - flags.charsLeftOver === 0 && - flags.unusedTokens.length === 0 && - flags.bigHour === undefined; - } - } - if (Object.isFrozen == null || !Object.isFrozen(m)) { - m._isValid = isNowValid; - } else { - return isNowValid; - } - return m._isValid; - } - - function createInvalid(flags) { - var m = createUTC(NaN); - if (flags != null) { - extend(getParsingFlags(m), flags); - } else { - getParsingFlags(m).userInvalidated = true; - } - - return m; - } - - // Plugins that add properties should also add the key here (null value), - // so we can properly clone ourselves. - var momentProperties = (hooks.momentProperties = []), - updateInProgress = false; - - function copyConfig(to, from) { - var i, - prop, - val, - momentPropertiesLen = momentProperties.length; - - if (!isUndefined(from._isAMomentObject)) { - to._isAMomentObject = from._isAMomentObject; - } - if (!isUndefined(from._i)) { - to._i = from._i; - } - if (!isUndefined(from._f)) { - to._f = from._f; - } - if (!isUndefined(from._l)) { - to._l = from._l; - } - if (!isUndefined(from._strict)) { - to._strict = from._strict; - } - if (!isUndefined(from._tzm)) { - to._tzm = from._tzm; - } - if (!isUndefined(from._isUTC)) { - to._isUTC = from._isUTC; - } - if (!isUndefined(from._offset)) { - to._offset = from._offset; - } - if (!isUndefined(from._pf)) { - to._pf = getParsingFlags(from); - } - if (!isUndefined(from._locale)) { - to._locale = from._locale; - } - - if (momentPropertiesLen > 0) { - for (i = 0; i < momentPropertiesLen; i++) { - prop = momentProperties[i]; - val = from[prop]; - if (!isUndefined(val)) { - to[prop] = val; - } - } - } - - return to; - } - - // Moment prototype object - function Moment(config) { - copyConfig(this, config); - this._d = new Date(config._d != null ? config._d.getTime() : NaN); - if (!this.isValid()) { - this._d = new Date(NaN); - } - // Prevent infinite loop in case updateOffset creates new moment - // objects. - if (updateInProgress === false) { - updateInProgress = true; - hooks.updateOffset(this); - updateInProgress = false; - } - } - - function isMoment(obj) { - return ( - obj instanceof Moment || (obj != null && obj._isAMomentObject != null) - ); - } - - function warn(msg) { - if ( - hooks.suppressDeprecationWarnings === false && - typeof console !== 'undefined' && - console.warn - ) { - console.warn('Deprecation warning: ' + msg); - } - } - - function deprecate(msg, fn) { - var firstTime = true; - - return extend(function () { - if (hooks.deprecationHandler != null) { - hooks.deprecationHandler(null, msg); - } - if (firstTime) { - var args = [], - arg, - i, - key, - argLen = arguments.length; - for (i = 0; i < argLen; i++) { - arg = ''; - if (typeof arguments[i] === 'object') { - arg += '\n[' + i + '] '; - for (key in arguments[0]) { - if (hasOwnProp(arguments[0], key)) { - arg += key + ': ' + arguments[0][key] + ', '; - } - } - arg = arg.slice(0, -2); // Remove trailing comma and space - } else { - arg = arguments[i]; - } - args.push(arg); - } - warn( - msg + - '\nArguments: ' + - Array.prototype.slice.call(args).join('') + - '\n' + - new Error().stack - ); - firstTime = false; - } - return fn.apply(this, arguments); - }, fn); - } - - var deprecations = {}; - - function deprecateSimple(name, msg) { - if (hooks.deprecationHandler != null) { - hooks.deprecationHandler(name, msg); - } - if (!deprecations[name]) { - warn(msg); - deprecations[name] = true; - } - } - - hooks.suppressDeprecationWarnings = false; - hooks.deprecationHandler = null; - - function isFunction(input) { - return ( - (typeof Function !== 'undefined' && input instanceof Function) || - Object.prototype.toString.call(input) === '[object Function]' - ); - } - - function set(config) { - var prop, i; - for (i in config) { - if (hasOwnProp(config, i)) { - prop = config[i]; - if (isFunction(prop)) { - this[i] = prop; - } else { - this['_' + i] = prop; - } - } - } - this._config = config; - // Lenient ordinal parsing accepts just a number in addition to - // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. - // TODO: Remove "ordinalParse" fallback in next major release. - this._dayOfMonthOrdinalParseLenient = new RegExp( - (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + - '|' + - /\d{1,2}/.source - ); - } - - function mergeConfigs(parentConfig, childConfig) { - var res = extend({}, parentConfig), - prop; - for (prop in childConfig) { - if (hasOwnProp(childConfig, prop)) { - if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { - res[prop] = {}; - extend(res[prop], parentConfig[prop]); - extend(res[prop], childConfig[prop]); - } else if (childConfig[prop] != null) { - res[prop] = childConfig[prop]; - } else { - delete res[prop]; - } - } - } - for (prop in parentConfig) { - if ( - hasOwnProp(parentConfig, prop) && - !hasOwnProp(childConfig, prop) && - isObject(parentConfig[prop]) - ) { - // make sure changes to properties don't modify parent config - res[prop] = extend({}, res[prop]); - } - } - return res; - } - - function Locale(config) { - if (config != null) { - this.set(config); - } - } - - var keys; - - if (Object.keys) { - keys = Object.keys; - } else { - keys = function (obj) { - var i, - res = []; - for (i in obj) { - if (hasOwnProp(obj, i)) { - res.push(i); - } - } - return res; - }; - } - - var defaultCalendar = { - sameDay: '[Today at] LT', - nextDay: '[Tomorrow at] LT', - nextWeek: 'dddd [at] LT', - lastDay: '[Yesterday at] LT', - lastWeek: '[Last] dddd [at] LT', - sameElse: 'L', - }; - - function calendar(key, mom, now) { - var output = this._calendar[key] || this._calendar['sameElse']; - return isFunction(output) ? output.call(mom, now) : output; - } - - function zeroFill(number, targetLength, forceSign) { - var absNumber = '' + Math.abs(number), - zerosToFill = targetLength - absNumber.length, - sign = number >= 0; - return ( - (sign ? (forceSign ? '+' : '') : '-') + - Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + - absNumber - ); - } - - var formattingTokens = - /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, - localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, - formatFunctions = {}, - formatTokenFunctions = {}; - - // token: 'M' - // padded: ['MM', 2] - // ordinal: 'Mo' - // callback: function () { this.month() + 1 } - function addFormatToken(token, padded, ordinal, callback) { - var func = callback; - if (typeof callback === 'string') { - func = function () { - return this[callback](); - }; - } - if (token) { - formatTokenFunctions[token] = func; - } - if (padded) { - formatTokenFunctions[padded[0]] = function () { - return zeroFill(func.apply(this, arguments), padded[1], padded[2]); - }; - } - if (ordinal) { - formatTokenFunctions[ordinal] = function () { - return this.localeData().ordinal( - func.apply(this, arguments), - token - ); - }; - } - } - - function removeFormattingTokens(input) { - if (input.match(/\[[\s\S]/)) { - return input.replace(/^\[|\]$/g, ''); - } - return input.replace(/\\/g, ''); - } - - function makeFormatFunction(format) { - var array = format.match(formattingTokens), - i, - length; - - for (i = 0, length = array.length; i < length; i++) { - if (formatTokenFunctions[array[i]]) { - array[i] = formatTokenFunctions[array[i]]; - } else { - array[i] = removeFormattingTokens(array[i]); - } - } - - return function (mom) { - var output = '', - i; - for (i = 0; i < length; i++) { - output += isFunction(array[i]) - ? array[i].call(mom, format) - : array[i]; - } - return output; - }; - } - - // format date using native date object - function formatMoment(m, format) { - if (!m.isValid()) { - return m.localeData().invalidDate(); - } - - format = expandFormat(format, m.localeData()); - formatFunctions[format] = - formatFunctions[format] || makeFormatFunction(format); - - return formatFunctions[format](m); - } - - function expandFormat(format, locale) { - var i = 5; - - function replaceLongDateFormatTokens(input) { - return locale.longDateFormat(input) || input; - } - - localFormattingTokens.lastIndex = 0; - while (i >= 0 && localFormattingTokens.test(format)) { - format = format.replace( - localFormattingTokens, - replaceLongDateFormatTokens - ); - localFormattingTokens.lastIndex = 0; - i -= 1; - } - - return format; - } - - var defaultLongDateFormat = { - LTS: 'h:mm:ss A', - LT: 'h:mm A', - L: 'MM/DD/YYYY', - LL: 'MMMM D, YYYY', - LLL: 'MMMM D, YYYY h:mm A', - LLLL: 'dddd, MMMM D, YYYY h:mm A', - }; - - function longDateFormat(key) { - var format = this._longDateFormat[key], - formatUpper = this._longDateFormat[key.toUpperCase()]; - - if (format || !formatUpper) { - return format; - } - - this._longDateFormat[key] = formatUpper - .match(formattingTokens) - .map(function (tok) { - if ( - tok === 'MMMM' || - tok === 'MM' || - tok === 'DD' || - tok === 'dddd' - ) { - return tok.slice(1); - } - return tok; - }) - .join(''); - - return this._longDateFormat[key]; - } - - var defaultInvalidDate = 'Invalid date'; - - function invalidDate() { - return this._invalidDate; - } - - var defaultOrdinal = '%d', - defaultDayOfMonthOrdinalParse = /\d{1,2}/; - - function ordinal(number) { - return this._ordinal.replace('%d', number); - } - - var defaultRelativeTime = { - future: 'in %s', - past: '%s ago', - s: 'a few seconds', - ss: '%d seconds', - m: 'a minute', - mm: '%d minutes', - h: 'an hour', - hh: '%d hours', - d: 'a day', - dd: '%d days', - w: 'a week', - ww: '%d weeks', - M: 'a month', - MM: '%d months', - y: 'a year', - yy: '%d years', - }; - - function relativeTime(number, withoutSuffix, string, isFuture) { - var output = this._relativeTime[string]; - return isFunction(output) - ? output(number, withoutSuffix, string, isFuture) - : output.replace(/%d/i, number); - } - - function pastFuture(diff, output) { - var format = this._relativeTime[diff > 0 ? 'future' : 'past']; - return isFunction(format) ? format(output) : format.replace(/%s/i, output); - } - - var aliases = { - D: 'date', - dates: 'date', - date: 'date', - d: 'day', - days: 'day', - day: 'day', - e: 'weekday', - weekdays: 'weekday', - weekday: 'weekday', - E: 'isoWeekday', - isoweekdays: 'isoWeekday', - isoweekday: 'isoWeekday', - DDD: 'dayOfYear', - dayofyears: 'dayOfYear', - dayofyear: 'dayOfYear', - h: 'hour', - hours: 'hour', - hour: 'hour', - ms: 'millisecond', - milliseconds: 'millisecond', - millisecond: 'millisecond', - m: 'minute', - minutes: 'minute', - minute: 'minute', - M: 'month', - months: 'month', - month: 'month', - Q: 'quarter', - quarters: 'quarter', - quarter: 'quarter', - s: 'second', - seconds: 'second', - second: 'second', - gg: 'weekYear', - weekyears: 'weekYear', - weekyear: 'weekYear', - GG: 'isoWeekYear', - isoweekyears: 'isoWeekYear', - isoweekyear: 'isoWeekYear', - w: 'week', - weeks: 'week', - week: 'week', - W: 'isoWeek', - isoweeks: 'isoWeek', - isoweek: 'isoWeek', - y: 'year', - years: 'year', - year: 'year', - }; - - function normalizeUnits(units) { - return typeof units === 'string' - ? aliases[units] || aliases[units.toLowerCase()] - : undefined; - } - - function normalizeObjectUnits(inputObject) { - var normalizedInput = {}, - normalizedProp, - prop; - - for (prop in inputObject) { - if (hasOwnProp(inputObject, prop)) { - normalizedProp = normalizeUnits(prop); - if (normalizedProp) { - normalizedInput[normalizedProp] = inputObject[prop]; - } - } - } - - return normalizedInput; - } - - var priorities = { - date: 9, - day: 11, - weekday: 11, - isoWeekday: 11, - dayOfYear: 4, - hour: 13, - millisecond: 16, - minute: 14, - month: 8, - quarter: 7, - second: 15, - weekYear: 1, - isoWeekYear: 1, - week: 5, - isoWeek: 5, - year: 1, - }; - - function getPrioritizedUnits(unitsObj) { - var units = [], - u; - for (u in unitsObj) { - if (hasOwnProp(unitsObj, u)) { - units.push({ unit: u, priority: priorities[u] }); - } - } - units.sort(function (a, b) { - return a.priority - b.priority; - }); - return units; - } - - var match1 = /\d/, // 0 - 9 - match2 = /\d\d/, // 00 - 99 - match3 = /\d{3}/, // 000 - 999 - match4 = /\d{4}/, // 0000 - 9999 - match6 = /[+-]?\d{6}/, // -999999 - 999999 - match1to2 = /\d\d?/, // 0 - 99 - match3to4 = /\d\d\d\d?/, // 999 - 9999 - match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999 - match1to3 = /\d{1,3}/, // 0 - 999 - match1to4 = /\d{1,4}/, // 0 - 9999 - match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999 - matchUnsigned = /\d+/, // 0 - inf - matchSigned = /[+-]?\d+/, // -inf - inf - matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z - matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z - matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 - // any word (or two) characters or numbers including two/three word month in arabic. - // includes scottish gaelic two word and hyphenated months - matchWord = - /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, - match1to2NoLeadingZero = /^[1-9]\d?/, // 1-99 - match1to2HasZero = /^([1-9]\d|\d)/, // 0-99 - regexes; - - regexes = {}; - - function addRegexToken(token, regex, strictRegex) { - regexes[token] = isFunction(regex) - ? regex - : function (isStrict, localeData) { - return isStrict && strictRegex ? strictRegex : regex; - }; - } - - function getParseRegexForToken(token, config) { - if (!hasOwnProp(regexes, token)) { - return new RegExp(unescapeFormat(token)); - } - - return regexes[token](config._strict, config._locale); - } - - // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript - function unescapeFormat(s) { - return regexEscape( - s - .replace('\\', '') - .replace( - /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, - function (matched, p1, p2, p3, p4) { - return p1 || p2 || p3 || p4; - } - ) - ); - } - - function regexEscape(s) { - return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); - } - - function absFloor(number) { - if (number < 0) { - // -0 -> 0 - return Math.ceil(number) || 0; - } else { - return Math.floor(number); - } - } - - function toInt(argumentForCoercion) { - var coercedNumber = +argumentForCoercion, - value = 0; - - if (coercedNumber !== 0 && isFinite(coercedNumber)) { - value = absFloor(coercedNumber); - } - - return value; - } - - var tokens = {}; - - function addParseToken(token, callback) { - var i, - func = callback, - tokenLen; - if (typeof token === 'string') { - token = [token]; - } - if (isNumber(callback)) { - func = function (input, array) { - array[callback] = toInt(input); - }; - } - tokenLen = token.length; - for (i = 0; i < tokenLen; i++) { - tokens[token[i]] = func; - } - } - - function addWeekParseToken(token, callback) { - addParseToken(token, function (input, array, config, token) { - config._w = config._w || {}; - callback(input, config._w, config, token); - }); - } - - function addTimeToArrayFromToken(token, input, config) { - if (input != null && hasOwnProp(tokens, token)) { - tokens[token](input, config._a, config, token); - } - } - - function isLeapYear(year) { - return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; - } - - var YEAR = 0, - MONTH = 1, - DATE = 2, - HOUR = 3, - MINUTE = 4, - SECOND = 5, - MILLISECOND = 6, - WEEK = 7, - WEEKDAY = 8; - - // FORMATTING - - addFormatToken('Y', 0, 0, function () { - var y = this.year(); - return y <= 9999 ? zeroFill(y, 4) : '+' + y; - }); - - addFormatToken(0, ['YY', 2], 0, function () { - return this.year() % 100; - }); - - addFormatToken(0, ['YYYY', 4], 0, 'year'); - addFormatToken(0, ['YYYYY', 5], 0, 'year'); - addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); - - // PARSING - - addRegexToken('Y', matchSigned); - addRegexToken('YY', match1to2, match2); - addRegexToken('YYYY', match1to4, match4); - addRegexToken('YYYYY', match1to6, match6); - addRegexToken('YYYYYY', match1to6, match6); - - addParseToken(['YYYYY', 'YYYYYY'], YEAR); - addParseToken('YYYY', function (input, array) { - array[YEAR] = - input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); - }); - addParseToken('YY', function (input, array) { - array[YEAR] = hooks.parseTwoDigitYear(input); - }); - addParseToken('Y', function (input, array) { - array[YEAR] = parseInt(input, 10); - }); - - // HELPERS - - function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; - } - - // HOOKS - - hooks.parseTwoDigitYear = function (input) { - return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); - }; - - // MOMENTS - - var getSetYear = makeGetSet('FullYear', true); - - function getIsLeapYear() { - return isLeapYear(this.year()); - } - - function makeGetSet(unit, keepTime) { - return function (value) { - if (value != null) { - set$1(this, unit, value); - hooks.updateOffset(this, keepTime); - return this; - } else { - return get(this, unit); - } - }; - } - - function get(mom, unit) { - if (!mom.isValid()) { - return NaN; - } - - var d = mom._d, - isUTC = mom._isUTC; - - switch (unit) { - case 'Milliseconds': - return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds(); - case 'Seconds': - return isUTC ? d.getUTCSeconds() : d.getSeconds(); - case 'Minutes': - return isUTC ? d.getUTCMinutes() : d.getMinutes(); - case 'Hours': - return isUTC ? d.getUTCHours() : d.getHours(); - case 'Date': - return isUTC ? d.getUTCDate() : d.getDate(); - case 'Day': - return isUTC ? d.getUTCDay() : d.getDay(); - case 'Month': - return isUTC ? d.getUTCMonth() : d.getMonth(); - case 'FullYear': - return isUTC ? d.getUTCFullYear() : d.getFullYear(); - default: - return NaN; // Just in case - } - } - - function set$1(mom, unit, value) { - var d, isUTC, year, month, date; - - if (!mom.isValid() || isNaN(value)) { - return; - } - - d = mom._d; - isUTC = mom._isUTC; - - switch (unit) { - case 'Milliseconds': - return void (isUTC - ? d.setUTCMilliseconds(value) - : d.setMilliseconds(value)); - case 'Seconds': - return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value)); - case 'Minutes': - return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value)); - case 'Hours': - return void (isUTC ? d.setUTCHours(value) : d.setHours(value)); - case 'Date': - return void (isUTC ? d.setUTCDate(value) : d.setDate(value)); - // case 'Day': // Not real - // return void (isUTC ? d.setUTCDay(value) : d.setDay(value)); - // case 'Month': // Not used because we need to pass two variables - // return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value)); - case 'FullYear': - break; // See below ... - default: - return; // Just in case - } - - year = value; - month = mom.month(); - date = mom.date(); - date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date; - void (isUTC - ? d.setUTCFullYear(year, month, date) - : d.setFullYear(year, month, date)); - } - - // MOMENTS - - function stringGet(units) { - units = normalizeUnits(units); - if (isFunction(this[units])) { - return this[units](); - } - return this; - } - - function stringSet(units, value) { - if (typeof units === 'object') { - units = normalizeObjectUnits(units); - var prioritized = getPrioritizedUnits(units), - i, - prioritizedLen = prioritized.length; - for (i = 0; i < prioritizedLen; i++) { - this[prioritized[i].unit](units[prioritized[i].unit]); - } - } else { - units = normalizeUnits(units); - if (isFunction(this[units])) { - return this[units](value); - } - } - return this; - } - - function mod(n, x) { - return ((n % x) + x) % x; - } - - var indexOf; - - if (Array.prototype.indexOf) { - indexOf = Array.prototype.indexOf; - } else { - indexOf = function (o) { - // I know - var i; - for (i = 0; i < this.length; ++i) { - if (this[i] === o) { - return i; - } - } - return -1; - }; - } - - function daysInMonth(year, month) { - if (isNaN(year) || isNaN(month)) { - return NaN; - } - var modMonth = mod(month, 12); - year += (month - modMonth) / 12; - return modMonth === 1 - ? isLeapYear(year) - ? 29 - : 28 - : 31 - ((modMonth % 7) % 2); - } - - // FORMATTING - - addFormatToken('M', ['MM', 2], 'Mo', function () { - return this.month() + 1; - }); - - addFormatToken('MMM', 0, 0, function (format) { - return this.localeData().monthsShort(this, format); - }); - - addFormatToken('MMMM', 0, 0, function (format) { - return this.localeData().months(this, format); - }); - - // PARSING - - addRegexToken('M', match1to2, match1to2NoLeadingZero); - addRegexToken('MM', match1to2, match2); - addRegexToken('MMM', function (isStrict, locale) { - return locale.monthsShortRegex(isStrict); - }); - addRegexToken('MMMM', function (isStrict, locale) { - return locale.monthsRegex(isStrict); - }); - - addParseToken(['M', 'MM'], function (input, array) { - array[MONTH] = toInt(input) - 1; - }); - - addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { - var month = config._locale.monthsParse(input, token, config._strict); - // if we didn't find a month name, mark the date as invalid. - if (month != null) { - array[MONTH] = month; - } else { - getParsingFlags(config).invalidMonth = input; - } - }); - - // LOCALES - - var defaultLocaleMonths = - 'January_February_March_April_May_June_July_August_September_October_November_December'.split( - '_' - ), - defaultLocaleMonthsShort = - 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), - MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, - defaultMonthsShortRegex = matchWord, - defaultMonthsRegex = matchWord; - - function localeMonths(m, format) { - if (!m) { - return isArray(this._months) - ? this._months - : this._months['standalone']; - } - return isArray(this._months) - ? this._months[m.month()] - : this._months[ - (this._months.isFormat || MONTHS_IN_FORMAT).test(format) - ? 'format' - : 'standalone' - ][m.month()]; - } - - function localeMonthsShort(m, format) { - if (!m) { - return isArray(this._monthsShort) - ? this._monthsShort - : this._monthsShort['standalone']; - } - return isArray(this._monthsShort) - ? this._monthsShort[m.month()] - : this._monthsShort[ - MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone' - ][m.month()]; - } - - function handleStrictParse(monthName, format, strict) { - var i, - ii, - mom, - llc = monthName.toLocaleLowerCase(); - if (!this._monthsParse) { - // this is not used - this._monthsParse = []; - this._longMonthsParse = []; - this._shortMonthsParse = []; - for (i = 0; i < 12; ++i) { - mom = createUTC([2000, i]); - this._shortMonthsParse[i] = this.monthsShort( - mom, - '' - ).toLocaleLowerCase(); - this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); - } - } - - if (strict) { - if (format === 'MMM') { - ii = indexOf.call(this._shortMonthsParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._longMonthsParse, llc); - return ii !== -1 ? ii : null; - } - } else { - if (format === 'MMM') { - ii = indexOf.call(this._shortMonthsParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._longMonthsParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._longMonthsParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._shortMonthsParse, llc); - return ii !== -1 ? ii : null; - } - } - } - - function localeMonthsParse(monthName, format, strict) { - var i, mom, regex; - - if (this._monthsParseExact) { - return handleStrictParse.call(this, monthName, format, strict); - } - - if (!this._monthsParse) { - this._monthsParse = []; - this._longMonthsParse = []; - this._shortMonthsParse = []; - } - - // TODO: add sorting - // Sorting makes sure if one month (or abbr) is a prefix of another - // see sorting in computeMonthsParse - for (i = 0; i < 12; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, i]); - if (strict && !this._longMonthsParse[i]) { - this._longMonthsParse[i] = new RegExp( - '^' + this.months(mom, '').replace('.', '') + '$', - 'i' - ); - this._shortMonthsParse[i] = new RegExp( - '^' + this.monthsShort(mom, '').replace('.', '') + '$', - 'i' - ); - } - if (!strict && !this._monthsParse[i]) { - regex = - '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); - this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } - // test the regex - if ( - strict && - format === 'MMMM' && - this._longMonthsParse[i].test(monthName) - ) { - return i; - } else if ( - strict && - format === 'MMM' && - this._shortMonthsParse[i].test(monthName) - ) { - return i; - } else if (!strict && this._monthsParse[i].test(monthName)) { - return i; - } - } - } - - // MOMENTS - - function setMonth(mom, value) { - if (!mom.isValid()) { - // No op - return mom; - } - - if (typeof value === 'string') { - if (/^\d+$/.test(value)) { - value = toInt(value); - } else { - value = mom.localeData().monthsParse(value); - // TODO: Another silent failure? - if (!isNumber(value)) { - return mom; - } - } - } - - var month = value, - date = mom.date(); - - date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month)); - void (mom._isUTC - ? mom._d.setUTCMonth(month, date) - : mom._d.setMonth(month, date)); - return mom; - } - - function getSetMonth(value) { - if (value != null) { - setMonth(this, value); - hooks.updateOffset(this, true); - return this; - } else { - return get(this, 'Month'); - } - } - - function getDaysInMonth() { - return daysInMonth(this.year(), this.month()); - } - - function monthsShortRegex(isStrict) { - if (this._monthsParseExact) { - if (!hasOwnProp(this, '_monthsRegex')) { - computeMonthsParse.call(this); - } - if (isStrict) { - return this._monthsShortStrictRegex; - } else { - return this._monthsShortRegex; - } - } else { - if (!hasOwnProp(this, '_monthsShortRegex')) { - this._monthsShortRegex = defaultMonthsShortRegex; - } - return this._monthsShortStrictRegex && isStrict - ? this._monthsShortStrictRegex - : this._monthsShortRegex; - } - } - - function monthsRegex(isStrict) { - if (this._monthsParseExact) { - if (!hasOwnProp(this, '_monthsRegex')) { - computeMonthsParse.call(this); - } - if (isStrict) { - return this._monthsStrictRegex; - } else { - return this._monthsRegex; - } - } else { - if (!hasOwnProp(this, '_monthsRegex')) { - this._monthsRegex = defaultMonthsRegex; - } - return this._monthsStrictRegex && isStrict - ? this._monthsStrictRegex - : this._monthsRegex; - } - } - - function computeMonthsParse() { - function cmpLenRev(a, b) { - return b.length - a.length; - } - - var shortPieces = [], - longPieces = [], - mixedPieces = [], - i, - mom, - shortP, - longP; - for (i = 0; i < 12; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, i]); - shortP = regexEscape(this.monthsShort(mom, '')); - longP = regexEscape(this.months(mom, '')); - shortPieces.push(shortP); - longPieces.push(longP); - mixedPieces.push(longP); - mixedPieces.push(shortP); - } - // Sorting makes sure if one month (or abbr) is a prefix of another it - // will match the longer piece. - shortPieces.sort(cmpLenRev); - longPieces.sort(cmpLenRev); - mixedPieces.sort(cmpLenRev); - - this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); - this._monthsShortRegex = this._monthsRegex; - this._monthsStrictRegex = new RegExp( - '^(' + longPieces.join('|') + ')', - 'i' - ); - this._monthsShortStrictRegex = new RegExp( - '^(' + shortPieces.join('|') + ')', - 'i' - ); - } - - function createDate(y, m, d, h, M, s, ms) { - // can't just apply() to create a date: - // https://stackoverflow.com/q/181348 - var date; - // the date constructor remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0) { - // preserve leap years using a full 400 year cycle, then reset - date = new Date(y + 400, m, d, h, M, s, ms); - if (isFinite(date.getFullYear())) { - date.setFullYear(y); - } - } else { - date = new Date(y, m, d, h, M, s, ms); - } - - return date; - } - - function createUTCDate(y) { - var date, args; - // the Date.UTC function remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0) { - args = Array.prototype.slice.call(arguments); - // preserve leap years using a full 400 year cycle, then reset - args[0] = y + 400; - date = new Date(Date.UTC.apply(null, args)); - if (isFinite(date.getUTCFullYear())) { - date.setUTCFullYear(y); - } - } else { - date = new Date(Date.UTC.apply(null, arguments)); - } - - return date; - } - - // start-of-first-week - start-of-year - function firstWeekOffset(year, dow, doy) { - var // first-week day -- which january is always in the first week (4 for iso, 1 for other) - fwd = 7 + dow - doy, - // first-week day local weekday -- which local weekday is fwd - fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; - - return -fwdlw + fwd - 1; - } - - // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday - function dayOfYearFromWeeks(year, week, weekday, dow, doy) { - var localWeekday = (7 + weekday - dow) % 7, - weekOffset = firstWeekOffset(year, dow, doy), - dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, - resYear, - resDayOfYear; - - if (dayOfYear <= 0) { - resYear = year - 1; - resDayOfYear = daysInYear(resYear) + dayOfYear; - } else if (dayOfYear > daysInYear(year)) { - resYear = year + 1; - resDayOfYear = dayOfYear - daysInYear(year); - } else { - resYear = year; - resDayOfYear = dayOfYear; - } - - return { - year: resYear, - dayOfYear: resDayOfYear, - }; - } - - function weekOfYear(mom, dow, doy) { - var weekOffset = firstWeekOffset(mom.year(), dow, doy), - week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, - resWeek, - resYear; - - if (week < 1) { - resYear = mom.year() - 1; - resWeek = week + weeksInYear(resYear, dow, doy); - } else if (week > weeksInYear(mom.year(), dow, doy)) { - resWeek = week - weeksInYear(mom.year(), dow, doy); - resYear = mom.year() + 1; - } else { - resYear = mom.year(); - resWeek = week; - } - - return { - week: resWeek, - year: resYear, - }; - } - - function weeksInYear(year, dow, doy) { - var weekOffset = firstWeekOffset(year, dow, doy), - weekOffsetNext = firstWeekOffset(year + 1, dow, doy); - return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; - } - - // FORMATTING - - addFormatToken('w', ['ww', 2], 'wo', 'week'); - addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); - - // PARSING - - addRegexToken('w', match1to2, match1to2NoLeadingZero); - addRegexToken('ww', match1to2, match2); - addRegexToken('W', match1to2, match1to2NoLeadingZero); - addRegexToken('WW', match1to2, match2); - - addWeekParseToken( - ['w', 'ww', 'W', 'WW'], - function (input, week, config, token) { - week[token.substr(0, 1)] = toInt(input); - } - ); - - // HELPERS - - // LOCALES - - function localeWeek(mom) { - return weekOfYear(mom, this._week.dow, this._week.doy).week; - } - - var defaultLocaleWeek = { - dow: 0, // Sunday is the first day of the week. - doy: 6, // The week that contains Jan 6th is the first week of the year. - }; - - function localeFirstDayOfWeek() { - return this._week.dow; - } - - function localeFirstDayOfYear() { - return this._week.doy; - } - - // MOMENTS - - function getSetWeek(input) { - var week = this.localeData().week(this); - return input == null ? week : this.add((input - week) * 7, 'd'); - } - - function getSetISOWeek(input) { - var week = weekOfYear(this, 1, 4).week; - return input == null ? week : this.add((input - week) * 7, 'd'); - } - - // FORMATTING - - addFormatToken('d', 0, 'do', 'day'); - - addFormatToken('dd', 0, 0, function (format) { - return this.localeData().weekdaysMin(this, format); - }); - - addFormatToken('ddd', 0, 0, function (format) { - return this.localeData().weekdaysShort(this, format); - }); - - addFormatToken('dddd', 0, 0, function (format) { - return this.localeData().weekdays(this, format); - }); - - addFormatToken('e', 0, 0, 'weekday'); - addFormatToken('E', 0, 0, 'isoWeekday'); - - // PARSING - - addRegexToken('d', match1to2); - addRegexToken('e', match1to2); - addRegexToken('E', match1to2); - addRegexToken('dd', function (isStrict, locale) { - return locale.weekdaysMinRegex(isStrict); - }); - addRegexToken('ddd', function (isStrict, locale) { - return locale.weekdaysShortRegex(isStrict); - }); - addRegexToken('dddd', function (isStrict, locale) { - return locale.weekdaysRegex(isStrict); - }); - - addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { - var weekday = config._locale.weekdaysParse(input, token, config._strict); - // if we didn't get a weekday name, mark the date as invalid - if (weekday != null) { - week.d = weekday; - } else { - getParsingFlags(config).invalidWeekday = input; - } - }); - - addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { - week[token] = toInt(input); - }); - - // HELPERS - - function parseWeekday(input, locale) { - if (typeof input !== 'string') { - return input; - } - - if (!isNaN(input)) { - return parseInt(input, 10); - } - - input = locale.weekdaysParse(input); - if (typeof input === 'number') { - return input; - } - - return null; - } - - function parseIsoWeekday(input, locale) { - if (typeof input === 'string') { - return locale.weekdaysParse(input) % 7 || 7; - } - return isNaN(input) ? null : input; - } - - // LOCALES - function shiftWeekdays(ws, n) { - return ws.slice(n, 7).concat(ws.slice(0, n)); - } - - var defaultLocaleWeekdays = - 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), - defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), - defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), - defaultWeekdaysRegex = matchWord, - defaultWeekdaysShortRegex = matchWord, - defaultWeekdaysMinRegex = matchWord; - - function localeWeekdays(m, format) { - var weekdays = isArray(this._weekdays) - ? this._weekdays - : this._weekdays[ - m && m !== true && this._weekdays.isFormat.test(format) - ? 'format' - : 'standalone' - ]; - return m === true - ? shiftWeekdays(weekdays, this._week.dow) - : m - ? weekdays[m.day()] - : weekdays; - } - - function localeWeekdaysShort(m) { - return m === true - ? shiftWeekdays(this._weekdaysShort, this._week.dow) - : m - ? this._weekdaysShort[m.day()] - : this._weekdaysShort; - } - - function localeWeekdaysMin(m) { - return m === true - ? shiftWeekdays(this._weekdaysMin, this._week.dow) - : m - ? this._weekdaysMin[m.day()] - : this._weekdaysMin; - } - - function handleStrictParse$1(weekdayName, format, strict) { - var i, - ii, - mom, - llc = weekdayName.toLocaleLowerCase(); - if (!this._weekdaysParse) { - this._weekdaysParse = []; - this._shortWeekdaysParse = []; - this._minWeekdaysParse = []; - - for (i = 0; i < 7; ++i) { - mom = createUTC([2000, 1]).day(i); - this._minWeekdaysParse[i] = this.weekdaysMin( - mom, - '' - ).toLocaleLowerCase(); - this._shortWeekdaysParse[i] = this.weekdaysShort( - mom, - '' - ).toLocaleLowerCase(); - this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); - } - } - - if (strict) { - if (format === 'dddd') { - ii = indexOf.call(this._weekdaysParse, llc); - return ii !== -1 ? ii : null; - } else if (format === 'ddd') { - ii = indexOf.call(this._shortWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } - } else { - if (format === 'dddd') { - ii = indexOf.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._shortWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else if (format === 'ddd') { - ii = indexOf.call(this._shortWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._minWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._shortWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } - } - } - - function localeWeekdaysParse(weekdayName, format, strict) { - var i, mom, regex; - - if (this._weekdaysParseExact) { - return handleStrictParse$1.call(this, weekdayName, format, strict); - } - - if (!this._weekdaysParse) { - this._weekdaysParse = []; - this._minWeekdaysParse = []; - this._shortWeekdaysParse = []; - this._fullWeekdaysParse = []; - } - - for (i = 0; i < 7; i++) { - // make the regex if we don't have it already - - mom = createUTC([2000, 1]).day(i); - if (strict && !this._fullWeekdaysParse[i]) { - this._fullWeekdaysParse[i] = new RegExp( - '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', - 'i' - ); - this._shortWeekdaysParse[i] = new RegExp( - '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', - 'i' - ); - this._minWeekdaysParse[i] = new RegExp( - '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', - 'i' - ); - } - if (!this._weekdaysParse[i]) { - regex = - '^' + - this.weekdays(mom, '') + - '|^' + - this.weekdaysShort(mom, '') + - '|^' + - this.weekdaysMin(mom, ''); - this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } - // test the regex - if ( - strict && - format === 'dddd' && - this._fullWeekdaysParse[i].test(weekdayName) - ) { - return i; - } else if ( - strict && - format === 'ddd' && - this._shortWeekdaysParse[i].test(weekdayName) - ) { - return i; - } else if ( - strict && - format === 'dd' && - this._minWeekdaysParse[i].test(weekdayName) - ) { - return i; - } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { - return i; - } - } - } - - // MOMENTS - - function getSetDayOfWeek(input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - - var day = get(this, 'Day'); - if (input != null) { - input = parseWeekday(input, this.localeData()); - return this.add(input - day, 'd'); - } else { - return day; - } - } - - function getSetLocaleDayOfWeek(input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; - return input == null ? weekday : this.add(input - weekday, 'd'); - } - - function getSetISODayOfWeek(input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - - // behaves the same as moment#day except - // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) - // as a setter, sunday should belong to the previous week. - - if (input != null) { - var weekday = parseIsoWeekday(input, this.localeData()); - return this.day(this.day() % 7 ? weekday : weekday - 7); - } else { - return this.day() || 7; - } - } - - function weekdaysRegex(isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysStrictRegex; - } else { - return this._weekdaysRegex; - } - } else { - if (!hasOwnProp(this, '_weekdaysRegex')) { - this._weekdaysRegex = defaultWeekdaysRegex; - } - return this._weekdaysStrictRegex && isStrict - ? this._weekdaysStrictRegex - : this._weekdaysRegex; - } - } - - function weekdaysShortRegex(isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysShortStrictRegex; - } else { - return this._weekdaysShortRegex; - } - } else { - if (!hasOwnProp(this, '_weekdaysShortRegex')) { - this._weekdaysShortRegex = defaultWeekdaysShortRegex; - } - return this._weekdaysShortStrictRegex && isStrict - ? this._weekdaysShortStrictRegex - : this._weekdaysShortRegex; - } - } - - function weekdaysMinRegex(isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysMinStrictRegex; - } else { - return this._weekdaysMinRegex; - } - } else { - if (!hasOwnProp(this, '_weekdaysMinRegex')) { - this._weekdaysMinRegex = defaultWeekdaysMinRegex; - } - return this._weekdaysMinStrictRegex && isStrict - ? this._weekdaysMinStrictRegex - : this._weekdaysMinRegex; - } - } - - function computeWeekdaysParse() { - function cmpLenRev(a, b) { - return b.length - a.length; - } - - var minPieces = [], - shortPieces = [], - longPieces = [], - mixedPieces = [], - i, - mom, - minp, - shortp, - longp; - for (i = 0; i < 7; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, 1]).day(i); - minp = regexEscape(this.weekdaysMin(mom, '')); - shortp = regexEscape(this.weekdaysShort(mom, '')); - longp = regexEscape(this.weekdays(mom, '')); - minPieces.push(minp); - shortPieces.push(shortp); - longPieces.push(longp); - mixedPieces.push(minp); - mixedPieces.push(shortp); - mixedPieces.push(longp); - } - // Sorting makes sure if one weekday (or abbr) is a prefix of another it - // will match the longer piece. - minPieces.sort(cmpLenRev); - shortPieces.sort(cmpLenRev); - longPieces.sort(cmpLenRev); - mixedPieces.sort(cmpLenRev); - - this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); - this._weekdaysShortRegex = this._weekdaysRegex; - this._weekdaysMinRegex = this._weekdaysRegex; - - this._weekdaysStrictRegex = new RegExp( - '^(' + longPieces.join('|') + ')', - 'i' - ); - this._weekdaysShortStrictRegex = new RegExp( - '^(' + shortPieces.join('|') + ')', - 'i' - ); - this._weekdaysMinStrictRegex = new RegExp( - '^(' + minPieces.join('|') + ')', - 'i' - ); - } - - // FORMATTING - - function hFormat() { - return this.hours() % 12 || 12; - } - - function kFormat() { - return this.hours() || 24; - } - - addFormatToken('H', ['HH', 2], 0, 'hour'); - addFormatToken('h', ['hh', 2], 0, hFormat); - addFormatToken('k', ['kk', 2], 0, kFormat); - - addFormatToken('hmm', 0, 0, function () { - return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); - }); - - addFormatToken('hmmss', 0, 0, function () { - return ( - '' + - hFormat.apply(this) + - zeroFill(this.minutes(), 2) + - zeroFill(this.seconds(), 2) - ); - }); - - addFormatToken('Hmm', 0, 0, function () { - return '' + this.hours() + zeroFill(this.minutes(), 2); - }); - - addFormatToken('Hmmss', 0, 0, function () { - return ( - '' + - this.hours() + - zeroFill(this.minutes(), 2) + - zeroFill(this.seconds(), 2) - ); - }); - - function meridiem(token, lowercase) { - addFormatToken(token, 0, 0, function () { - return this.localeData().meridiem( - this.hours(), - this.minutes(), - lowercase - ); - }); - } - - meridiem('a', true); - meridiem('A', false); - - // PARSING - - function matchMeridiem(isStrict, locale) { - return locale._meridiemParse; - } - - addRegexToken('a', matchMeridiem); - addRegexToken('A', matchMeridiem); - addRegexToken('H', match1to2, match1to2HasZero); - addRegexToken('h', match1to2, match1to2NoLeadingZero); - addRegexToken('k', match1to2, match1to2NoLeadingZero); - addRegexToken('HH', match1to2, match2); - addRegexToken('hh', match1to2, match2); - addRegexToken('kk', match1to2, match2); - - addRegexToken('hmm', match3to4); - addRegexToken('hmmss', match5to6); - addRegexToken('Hmm', match3to4); - addRegexToken('Hmmss', match5to6); - - addParseToken(['H', 'HH'], HOUR); - addParseToken(['k', 'kk'], function (input, array, config) { - var kInput = toInt(input); - array[HOUR] = kInput === 24 ? 0 : kInput; - }); - addParseToken(['a', 'A'], function (input, array, config) { - config._isPm = config._locale.isPM(input); - config._meridiem = input; - }); - addParseToken(['h', 'hh'], function (input, array, config) { - array[HOUR] = toInt(input); - getParsingFlags(config).bigHour = true; - }); - addParseToken('hmm', function (input, array, config) { - var pos = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos)); - array[MINUTE] = toInt(input.substr(pos)); - getParsingFlags(config).bigHour = true; - }); - addParseToken('hmmss', function (input, array, config) { - var pos1 = input.length - 4, - pos2 = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos1)); - array[MINUTE] = toInt(input.substr(pos1, 2)); - array[SECOND] = toInt(input.substr(pos2)); - getParsingFlags(config).bigHour = true; - }); - addParseToken('Hmm', function (input, array, config) { - var pos = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos)); - array[MINUTE] = toInt(input.substr(pos)); - }); - addParseToken('Hmmss', function (input, array, config) { - var pos1 = input.length - 4, - pos2 = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos1)); - array[MINUTE] = toInt(input.substr(pos1, 2)); - array[SECOND] = toInt(input.substr(pos2)); - }); - - // LOCALES - - function localeIsPM(input) { - // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays - // Using charAt should be more compatible. - return (input + '').toLowerCase().charAt(0) === 'p'; - } - - var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, - // Setting the hour should keep the time, because the user explicitly - // specified which hour they want. So trying to maintain the same hour (in - // a new timezone) makes sense. Adding/subtracting hours does not follow - // this rule. - getSetHour = makeGetSet('Hours', true); - - function localeMeridiem(hours, minutes, isLower) { - if (hours > 11) { - return isLower ? 'pm' : 'PM'; - } else { - return isLower ? 'am' : 'AM'; - } - } - - var baseConfig = { - calendar: defaultCalendar, - longDateFormat: defaultLongDateFormat, - invalidDate: defaultInvalidDate, - ordinal: defaultOrdinal, - dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, - relativeTime: defaultRelativeTime, - - months: defaultLocaleMonths, - monthsShort: defaultLocaleMonthsShort, - - week: defaultLocaleWeek, - - weekdays: defaultLocaleWeekdays, - weekdaysMin: defaultLocaleWeekdaysMin, - weekdaysShort: defaultLocaleWeekdaysShort, - - meridiemParse: defaultLocaleMeridiemParse, - }; - - // internal storage for locale config files - var locales = {}, - localeFamilies = {}, - globalLocale; - - function commonPrefix(arr1, arr2) { - var i, - minl = Math.min(arr1.length, arr2.length); - for (i = 0; i < minl; i += 1) { - if (arr1[i] !== arr2[i]) { - return i; - } - } - return minl; - } - - function normalizeLocale(key) { - return key ? key.toLowerCase().replace('_', '-') : key; - } - - // pick the locale from the array - // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each - // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root - function chooseLocale(names) { - var i = 0, - j, - next, - locale, - split; - - while (i < names.length) { - split = normalizeLocale(names[i]).split('-'); - j = split.length; - next = normalizeLocale(names[i + 1]); - next = next ? next.split('-') : null; - while (j > 0) { - locale = loadLocale(split.slice(0, j).join('-')); - if (locale) { - return locale; - } - if ( - next && - next.length >= j && - commonPrefix(split, next) >= j - 1 - ) { - //the next array item is better than a shallower substring of this one - break; - } - j--; - } - i++; - } - return globalLocale; - } - - function isLocaleNameSane(name) { - // Prevent names that look like filesystem paths, i.e contain '/' or '\' - // Ensure name is available and function returns boolean - return !!(name && name.match('^[^/\\\\]*$')); - } - - function loadLocale(name) { - var oldLocale = null, - aliasedRequire; - // TODO: Find a better way to register and load all the locales in Node - if ( - locales[name] === undefined && - "object" !== 'undefined' && - module && - module.exports && - isLocaleNameSane(name) - ) { - try { - oldLocale = globalLocale._abbr; - aliasedRequire = require; - aliasedRequire('./locale/' + name); - getSetGlobalLocale(oldLocale); - } catch (e) { - // mark as not found to avoid repeating expensive file require call causing high CPU - // when trying to find en-US, en_US, en-us for every format call - locales[name] = null; // null means not found - } - } - return locales[name]; - } - - // This function will load locale and then set the global locale. If - // no arguments are passed in, it will simply return the current global - // locale key. - function getSetGlobalLocale(key, values) { - var data; - if (key) { - if (isUndefined(values)) { - data = getLocale(key); - } else { - data = defineLocale(key, values); - } - - if (data) { - // moment.duration._locale = moment._locale = data; - globalLocale = data; - } else { - if (typeof console !== 'undefined' && console.warn) { - //warn user if arguments are passed but the locale could not be set - console.warn( - 'Locale ' + key + ' not found. Did you forget to load it?' - ); - } - } - } - - return globalLocale._abbr; - } - - function defineLocale(name, config) { - if (config !== null) { - var locale, - parentConfig = baseConfig; - config.abbr = name; - if (locales[name] != null) { - deprecateSimple( - 'defineLocaleOverride', - 'use moment.updateLocale(localeName, config) to change ' + - 'an existing locale. moment.defineLocale(localeName, ' + - 'config) should only be used for creating a new locale ' + - 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' - ); - parentConfig = locales[name]._config; - } else if (config.parentLocale != null) { - if (locales[config.parentLocale] != null) { - parentConfig = locales[config.parentLocale]._config; - } else { - locale = loadLocale(config.parentLocale); - if (locale != null) { - parentConfig = locale._config; - } else { - if (!localeFamilies[config.parentLocale]) { - localeFamilies[config.parentLocale] = []; - } - localeFamilies[config.parentLocale].push({ - name: name, - config: config, - }); - return null; - } - } - } - locales[name] = new Locale(mergeConfigs(parentConfig, config)); - - if (localeFamilies[name]) { - localeFamilies[name].forEach(function (x) { - defineLocale(x.name, x.config); - }); - } - - // backwards compat for now: also set the locale - // make sure we set the locale AFTER all child locales have been - // created, so we won't end up with the child locale set. - getSetGlobalLocale(name); - - return locales[name]; - } else { - // useful for testing - delete locales[name]; - return null; - } - } - - function updateLocale(name, config) { - if (config != null) { - var locale, - tmpLocale, - parentConfig = baseConfig; - - if (locales[name] != null && locales[name].parentLocale != null) { - // Update existing child locale in-place to avoid memory-leaks - locales[name].set(mergeConfigs(locales[name]._config, config)); - } else { - // MERGE - tmpLocale = loadLocale(name); - if (tmpLocale != null) { - parentConfig = tmpLocale._config; - } - config = mergeConfigs(parentConfig, config); - if (tmpLocale == null) { - // updateLocale is called for creating a new locale - // Set abbr so it will have a name (getters return - // undefined otherwise). - config.abbr = name; - } - locale = new Locale(config); - locale.parentLocale = locales[name]; - locales[name] = locale; - } - - // backwards compat for now: also set the locale - getSetGlobalLocale(name); - } else { - // pass null for config to unupdate, useful for tests - if (locales[name] != null) { - if (locales[name].parentLocale != null) { - locales[name] = locales[name].parentLocale; - if (name === getSetGlobalLocale()) { - getSetGlobalLocale(name); - } - } else if (locales[name] != null) { - delete locales[name]; - } - } - } - return locales[name]; - } - - // returns locale data - function getLocale(key) { - var locale; - - if (key && key._locale && key._locale._abbr) { - key = key._locale._abbr; - } - - if (!key) { - return globalLocale; - } - - if (!isArray(key)) { - //short-circuit everything else - locale = loadLocale(key); - if (locale) { - return locale; - } - key = [key]; - } - - return chooseLocale(key); - } - - function listLocales() { - return keys(locales); - } - - function checkOverflow(m) { - var overflow, - a = m._a; - - if (a && getParsingFlags(m).overflow === -2) { - overflow = - a[MONTH] < 0 || a[MONTH] > 11 - ? MONTH - : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) - ? DATE - : a[HOUR] < 0 || - a[HOUR] > 24 || - (a[HOUR] === 24 && - (a[MINUTE] !== 0 || - a[SECOND] !== 0 || - a[MILLISECOND] !== 0)) - ? HOUR - : a[MINUTE] < 0 || a[MINUTE] > 59 - ? MINUTE - : a[SECOND] < 0 || a[SECOND] > 59 - ? SECOND - : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 - ? MILLISECOND - : -1; - - if ( - getParsingFlags(m)._overflowDayOfYear && - (overflow < YEAR || overflow > DATE) - ) { - overflow = DATE; - } - if (getParsingFlags(m)._overflowWeeks && overflow === -1) { - overflow = WEEK; - } - if (getParsingFlags(m)._overflowWeekday && overflow === -1) { - overflow = WEEKDAY; - } - - getParsingFlags(m).overflow = overflow; - } - - return m; - } - - // iso 8601 regex - // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) - var extendedIsoRegex = - /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, - basicIsoRegex = - /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, - tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, - isoDates = [ - ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], - ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], - ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], - ['GGGG-[W]WW', /\d{4}-W\d\d/, false], - ['YYYY-DDD', /\d{4}-\d{3}/], - ['YYYY-MM', /\d{4}-\d\d/, false], - ['YYYYYYMMDD', /[+-]\d{10}/], - ['YYYYMMDD', /\d{8}/], - ['GGGG[W]WWE', /\d{4}W\d{3}/], - ['GGGG[W]WW', /\d{4}W\d{2}/, false], - ['YYYYDDD', /\d{7}/], - ['YYYYMM', /\d{6}/, false], - ['YYYY', /\d{4}/, false], - ], - // iso time formats and regexes - isoTimes = [ - ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], - ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], - ['HH:mm:ss', /\d\d:\d\d:\d\d/], - ['HH:mm', /\d\d:\d\d/], - ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], - ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], - ['HHmmss', /\d\d\d\d\d\d/], - ['HHmm', /\d\d\d\d/], - ['HH', /\d\d/], - ], - aspNetJsonRegex = /^\/?Date\((-?\d+)/i, - // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 - rfc2822 = - /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, - obsOffsets = { - UT: 0, - GMT: 0, - EDT: -4 * 60, - EST: -5 * 60, - CDT: -5 * 60, - CST: -6 * 60, - MDT: -6 * 60, - MST: -7 * 60, - PDT: -7 * 60, - PST: -8 * 60, - }; - - // date from iso format - function configFromISO(config) { - var i, - l, - string = config._i, - match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), - allowTime, - dateFormat, - timeFormat, - tzFormat, - isoDatesLen = isoDates.length, - isoTimesLen = isoTimes.length; - - if (match) { - getParsingFlags(config).iso = true; - for (i = 0, l = isoDatesLen; i < l; i++) { - if (isoDates[i][1].exec(match[1])) { - dateFormat = isoDates[i][0]; - allowTime = isoDates[i][2] !== false; - break; - } - } - if (dateFormat == null) { - config._isValid = false; - return; - } - if (match[3]) { - for (i = 0, l = isoTimesLen; i < l; i++) { - if (isoTimes[i][1].exec(match[3])) { - // match[2] should be 'T' or space - timeFormat = (match[2] || ' ') + isoTimes[i][0]; - break; - } - } - if (timeFormat == null) { - config._isValid = false; - return; - } - } - if (!allowTime && timeFormat != null) { - config._isValid = false; - return; - } - if (match[4]) { - if (tzRegex.exec(match[4])) { - tzFormat = 'Z'; - } else { - config._isValid = false; - return; - } - } - config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); - configFromStringAndFormat(config); - } else { - config._isValid = false; - } - } - - function extractFromRFC2822Strings( - yearStr, - monthStr, - dayStr, - hourStr, - minuteStr, - secondStr - ) { - var result = [ - untruncateYear(yearStr), - defaultLocaleMonthsShort.indexOf(monthStr), - parseInt(dayStr, 10), - parseInt(hourStr, 10), - parseInt(minuteStr, 10), - ]; - - if (secondStr) { - result.push(parseInt(secondStr, 10)); - } - - return result; - } - - function untruncateYear(yearStr) { - var year = parseInt(yearStr, 10); - if (year <= 49) { - return 2000 + year; - } else if (year <= 999) { - return 1900 + year; - } - return year; - } - - function preprocessRFC2822(s) { - // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s - .replace(/\([^()]*\)|[\n\t]/g, ' ') - .replace(/(\s\s+)/g, ' ') - .replace(/^\s\s*/, '') - .replace(/\s\s*$/, ''); - } - - function checkWeekday(weekdayStr, parsedInput, config) { - if (weekdayStr) { - // TODO: Replace the vanilla JS Date object with an independent day-of-week check. - var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), - weekdayActual = new Date( - parsedInput[0], - parsedInput[1], - parsedInput[2] - ).getDay(); - if (weekdayProvided !== weekdayActual) { - getParsingFlags(config).weekdayMismatch = true; - config._isValid = false; - return false; - } - } - return true; - } - - function calculateOffset(obsOffset, militaryOffset, numOffset) { - if (obsOffset) { - return obsOffsets[obsOffset]; - } else if (militaryOffset) { - // the only allowed military tz is Z - return 0; - } else { - var hm = parseInt(numOffset, 10), - m = hm % 100, - h = (hm - m) / 100; - return h * 60 + m; - } - } - - // date and time from ref 2822 format - function configFromRFC2822(config) { - var match = rfc2822.exec(preprocessRFC2822(config._i)), - parsedArray; - if (match) { - parsedArray = extractFromRFC2822Strings( - match[4], - match[3], - match[2], - match[5], - match[6], - match[7] - ); - if (!checkWeekday(match[1], parsedArray, config)) { - return; - } - - config._a = parsedArray; - config._tzm = calculateOffset(match[8], match[9], match[10]); - - config._d = createUTCDate.apply(null, config._a); - config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); - - getParsingFlags(config).rfc2822 = true; - } else { - config._isValid = false; - } - } - - // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict - function configFromString(config) { - var matched = aspNetJsonRegex.exec(config._i); - if (matched !== null) { - config._d = new Date(+matched[1]); - return; - } - - configFromISO(config); - if (config._isValid === false) { - delete config._isValid; - } else { - return; - } - - configFromRFC2822(config); - if (config._isValid === false) { - delete config._isValid; - } else { - return; - } - - if (config._strict) { - config._isValid = false; - } else { - // Final attempt, use Input Fallback - hooks.createFromInputFallback(config); - } - } - - hooks.createFromInputFallback = deprecate( - 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + - 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + - 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.', - function (config) { - config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); - } - ); - - // Pick the first defined of two or three arguments. - function defaults(a, b, c) { - if (a != null) { - return a; - } - if (b != null) { - return b; - } - return c; - } - - function currentDateArray(config) { - // hooks is actually the exported moment object - var nowValue = new Date(hooks.now()); - if (config._useUTC) { - return [ - nowValue.getUTCFullYear(), - nowValue.getUTCMonth(), - nowValue.getUTCDate(), - ]; - } - return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; - } - - // convert an array to a date. - // the array should mirror the parameters below - // note: all values past the year are optional and will default to the lowest possible value. - // [year, month, day , hour, minute, second, millisecond] - function configFromArray(config) { - var i, - date, - input = [], - currentDate, - expectedWeekday, - yearToUse; - - if (config._d) { - return; - } - - currentDate = currentDateArray(config); - - //compute day of the year from weeks and weekdays - if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { - dayOfYearFromWeekInfo(config); - } - - //if the day of the year is set, figure out what it is - if (config._dayOfYear != null) { - yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); - - if ( - config._dayOfYear > daysInYear(yearToUse) || - config._dayOfYear === 0 - ) { - getParsingFlags(config)._overflowDayOfYear = true; - } - - date = createUTCDate(yearToUse, 0, config._dayOfYear); - config._a[MONTH] = date.getUTCMonth(); - config._a[DATE] = date.getUTCDate(); - } - - // Default to current date. - // * if no year, month, day of month are given, default to today - // * if day of month is given, default month and year - // * if month is given, default only year - // * if year is given, don't default anything - for (i = 0; i < 3 && config._a[i] == null; ++i) { - config._a[i] = input[i] = currentDate[i]; - } - - // Zero out whatever was not defaulted, including time - for (; i < 7; i++) { - config._a[i] = input[i] = - config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i]; - } - - // Check for 24:00:00.000 - if ( - config._a[HOUR] === 24 && - config._a[MINUTE] === 0 && - config._a[SECOND] === 0 && - config._a[MILLISECOND] === 0 - ) { - config._nextDay = true; - config._a[HOUR] = 0; - } - - config._d = (config._useUTC ? createUTCDate : createDate).apply( - null, - input - ); - expectedWeekday = config._useUTC - ? config._d.getUTCDay() - : config._d.getDay(); - - // Apply timezone offset from input. The actual utcOffset can be changed - // with parseZone. - if (config._tzm != null) { - config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); - } - - if (config._nextDay) { - config._a[HOUR] = 24; - } - - // check for mismatching day of week - if ( - config._w && - typeof config._w.d !== 'undefined' && - config._w.d !== expectedWeekday - ) { - getParsingFlags(config).weekdayMismatch = true; - } - } - - function dayOfYearFromWeekInfo(config) { - var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek; - - w = config._w; - if (w.GG != null || w.W != null || w.E != null) { - dow = 1; - doy = 4; - - // TODO: We need to take the current isoWeekYear, but that depends on - // how we interpret now (local, utc, fixed offset). So create - // a now version of current config (take local/utc/offset flags, and - // create now). - weekYear = defaults( - w.GG, - config._a[YEAR], - weekOfYear(createLocal(), 1, 4).year - ); - week = defaults(w.W, 1); - weekday = defaults(w.E, 1); - if (weekday < 1 || weekday > 7) { - weekdayOverflow = true; - } - } else { - dow = config._locale._week.dow; - doy = config._locale._week.doy; - - curWeek = weekOfYear(createLocal(), dow, doy); - - weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); - - // Default to current week. - week = defaults(w.w, curWeek.week); - - if (w.d != null) { - // weekday -- low day numbers are considered next week - weekday = w.d; - if (weekday < 0 || weekday > 6) { - weekdayOverflow = true; - } - } else if (w.e != null) { - // local weekday -- counting starts from beginning of week - weekday = w.e + dow; - if (w.e < 0 || w.e > 6) { - weekdayOverflow = true; - } - } else { - // default to beginning of week - weekday = dow; - } - } - if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { - getParsingFlags(config)._overflowWeeks = true; - } else if (weekdayOverflow != null) { - getParsingFlags(config)._overflowWeekday = true; - } else { - temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); - config._a[YEAR] = temp.year; - config._dayOfYear = temp.dayOfYear; - } - } - - // constant that refers to the ISO standard - hooks.ISO_8601 = function () {}; - - // constant that refers to the RFC 2822 form - hooks.RFC_2822 = function () {}; - - // date from string and format string - function configFromStringAndFormat(config) { - // TODO: Move this to another part of the creation flow to prevent circular deps - if (config._f === hooks.ISO_8601) { - configFromISO(config); - return; - } - if (config._f === hooks.RFC_2822) { - configFromRFC2822(config); - return; - } - config._a = []; - getParsingFlags(config).empty = true; - - // This array is used to make a Date, either with `new Date` or `Date.UTC` - var string = '' + config._i, - i, - parsedInput, - tokens, - token, - skipped, - stringLength = string.length, - totalParsedInputLength = 0, - era, - tokenLen; - - tokens = - expandFormat(config._f, config._locale).match(formattingTokens) || []; - tokenLen = tokens.length; - for (i = 0; i < tokenLen; i++) { - token = tokens[i]; - parsedInput = (string.match(getParseRegexForToken(token, config)) || - [])[0]; - if (parsedInput) { - skipped = string.substr(0, string.indexOf(parsedInput)); - if (skipped.length > 0) { - getParsingFlags(config).unusedInput.push(skipped); - } - string = string.slice( - string.indexOf(parsedInput) + parsedInput.length - ); - totalParsedInputLength += parsedInput.length; - } - // don't parse if it's not a known token - if (formatTokenFunctions[token]) { - if (parsedInput) { - getParsingFlags(config).empty = false; - } else { - getParsingFlags(config).unusedTokens.push(token); - } - addTimeToArrayFromToken(token, parsedInput, config); - } else if (config._strict && !parsedInput) { - getParsingFlags(config).unusedTokens.push(token); - } - } - - // add remaining unparsed input length to the string - getParsingFlags(config).charsLeftOver = - stringLength - totalParsedInputLength; - if (string.length > 0) { - getParsingFlags(config).unusedInput.push(string); - } - - // clear _12h flag if hour is <= 12 - if ( - config._a[HOUR] <= 12 && - getParsingFlags(config).bigHour === true && - config._a[HOUR] > 0 - ) { - getParsingFlags(config).bigHour = undefined; - } - - getParsingFlags(config).parsedDateParts = config._a.slice(0); - getParsingFlags(config).meridiem = config._meridiem; - // handle meridiem - config._a[HOUR] = meridiemFixWrap( - config._locale, - config._a[HOUR], - config._meridiem - ); - - // handle era - era = getParsingFlags(config).era; - if (era !== null) { - config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]); - } - - configFromArray(config); - checkOverflow(config); - } - - function meridiemFixWrap(locale, hour, meridiem) { - var isPm; - - if (meridiem == null) { - // nothing to do - return hour; - } - if (locale.meridiemHour != null) { - return locale.meridiemHour(hour, meridiem); - } else if (locale.isPM != null) { - // Fallback - isPm = locale.isPM(meridiem); - if (isPm && hour < 12) { - hour += 12; - } - if (!isPm && hour === 12) { - hour = 0; - } - return hour; - } else { - // this is not supposed to happen - return hour; - } - } - - // date from string and array of format strings - function configFromStringAndArray(config) { - var tempConfig, - bestMoment, - scoreToBeat, - i, - currentScore, - validFormatFound, - bestFormatIsValid = false, - configfLen = config._f.length; - - if (configfLen === 0) { - getParsingFlags(config).invalidFormat = true; - config._d = new Date(NaN); - return; - } - - for (i = 0; i < configfLen; i++) { - currentScore = 0; - validFormatFound = false; - tempConfig = copyConfig({}, config); - if (config._useUTC != null) { - tempConfig._useUTC = config._useUTC; - } - tempConfig._f = config._f[i]; - configFromStringAndFormat(tempConfig); - - if (isValid(tempConfig)) { - validFormatFound = true; - } - - // if there is any input that was not parsed add a penalty for that format - currentScore += getParsingFlags(tempConfig).charsLeftOver; - - //or tokens - currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; - - getParsingFlags(tempConfig).score = currentScore; - - if (!bestFormatIsValid) { - if ( - scoreToBeat == null || - currentScore < scoreToBeat || - validFormatFound - ) { - scoreToBeat = currentScore; - bestMoment = tempConfig; - if (validFormatFound) { - bestFormatIsValid = true; - } - } - } else { - if (currentScore < scoreToBeat) { - scoreToBeat = currentScore; - bestMoment = tempConfig; - } - } - } - - extend(config, bestMoment || tempConfig); - } - - function configFromObject(config) { - if (config._d) { - return; - } - - var i = normalizeObjectUnits(config._i), - dayOrDate = i.day === undefined ? i.date : i.day; - config._a = map( - [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], - function (obj) { - return obj && parseInt(obj, 10); - } - ); - - configFromArray(config); - } - - function createFromConfig(config) { - var res = new Moment(checkOverflow(prepareConfig(config))); - if (res._nextDay) { - // Adding is smart enough around DST - res.add(1, 'd'); - res._nextDay = undefined; - } - - return res; - } - - function prepareConfig(config) { - var input = config._i, - format = config._f; - - config._locale = config._locale || getLocale(config._l); - - if (input === null || (format === undefined && input === '')) { - return createInvalid({ nullInput: true }); - } - - if (typeof input === 'string') { - config._i = input = config._locale.preparse(input); - } - - if (isMoment(input)) { - return new Moment(checkOverflow(input)); - } else if (isDate(input)) { - config._d = input; - } else if (isArray(format)) { - configFromStringAndArray(config); - } else if (format) { - configFromStringAndFormat(config); - } else { - configFromInput(config); - } - - if (!isValid(config)) { - config._d = null; - } - - return config; - } - - function configFromInput(config) { - var input = config._i; - if (isUndefined(input)) { - config._d = new Date(hooks.now()); - } else if (isDate(input)) { - config._d = new Date(input.valueOf()); - } else if (typeof input === 'string') { - configFromString(config); - } else if (isArray(input)) { - config._a = map(input.slice(0), function (obj) { - return parseInt(obj, 10); - }); - configFromArray(config); - } else if (isObject(input)) { - configFromObject(config); - } else if (isNumber(input)) { - // from milliseconds - config._d = new Date(input); - } else { - hooks.createFromInputFallback(config); - } - } - - function createLocalOrUTC(input, format, locale, strict, isUTC) { - var c = {}; - - if (format === true || format === false) { - strict = format; - format = undefined; - } - - if (locale === true || locale === false) { - strict = locale; - locale = undefined; - } - - if ( - (isObject(input) && isObjectEmpty(input)) || - (isArray(input) && input.length === 0) - ) { - input = undefined; - } - // object construction must be done this way. - // https://github.com/moment/moment/issues/1423 - c._isAMomentObject = true; - c._useUTC = c._isUTC = isUTC; - c._l = locale; - c._i = input; - c._f = format; - c._strict = strict; - - return createFromConfig(c); - } - - function createLocal(input, format, locale, strict) { - return createLocalOrUTC(input, format, locale, strict, false); - } - - var prototypeMin = deprecate( - 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', - function () { - var other = createLocal.apply(null, arguments); - if (this.isValid() && other.isValid()) { - return other < this ? this : other; - } else { - return createInvalid(); - } - } - ), - prototypeMax = deprecate( - 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', - function () { - var other = createLocal.apply(null, arguments); - if (this.isValid() && other.isValid()) { - return other > this ? this : other; - } else { - return createInvalid(); - } - } - ); - - // Pick a moment m from moments so that m[fn](other) is true for all - // other. This relies on the function fn to be transitive. - // - // moments should either be an array of moment objects or an array, whose - // first element is an array of moment objects. - function pickBy(fn, moments) { - var res, i; - if (moments.length === 1 && isArray(moments[0])) { - moments = moments[0]; - } - if (!moments.length) { - return createLocal(); - } - res = moments[0]; - for (i = 1; i < moments.length; ++i) { - if (!moments[i].isValid() || moments[i][fn](res)) { - res = moments[i]; - } - } - return res; - } - - // TODO: Use [].sort instead? - function min() { - var args = [].slice.call(arguments, 0); - - return pickBy('isBefore', args); - } - - function max() { - var args = [].slice.call(arguments, 0); - - return pickBy('isAfter', args); - } - - var now = function () { - return Date.now ? Date.now() : +new Date(); - }; - - var ordering = [ - 'year', - 'quarter', - 'month', - 'week', - 'day', - 'hour', - 'minute', - 'second', - 'millisecond', - ]; - - function isDurationValid(m) { - var key, - unitHasDecimal = false, - i, - orderLen = ordering.length; - for (key in m) { - if ( - hasOwnProp(m, key) && - !( - indexOf.call(ordering, key) !== -1 && - (m[key] == null || !isNaN(m[key])) - ) - ) { - return false; - } - } - - for (i = 0; i < orderLen; ++i) { - if (m[ordering[i]]) { - if (unitHasDecimal) { - return false; // only allow non-integers for smallest unit - } - if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { - unitHasDecimal = true; - } - } - } - - return true; - } - - function isValid$1() { - return this._isValid; - } - - function createInvalid$1() { - return createDuration(NaN); - } - - function Duration(duration) { - var normalizedInput = normalizeObjectUnits(duration), - years = normalizedInput.year || 0, - quarters = normalizedInput.quarter || 0, - months = normalizedInput.month || 0, - weeks = normalizedInput.week || normalizedInput.isoWeek || 0, - days = normalizedInput.day || 0, - hours = normalizedInput.hour || 0, - minutes = normalizedInput.minute || 0, - seconds = normalizedInput.second || 0, - milliseconds = normalizedInput.millisecond || 0; - - this._isValid = isDurationValid(normalizedInput); - - // representation for dateAddRemove - this._milliseconds = - +milliseconds + - seconds * 1e3 + // 1000 - minutes * 6e4 + // 1000 * 60 - hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 - // Because of dateAddRemove treats 24 hours as different from a - // day when working around DST, we need to store them separately - this._days = +days + weeks * 7; - // It is impossible to translate months into days without knowing - // which months you are are talking about, so we have to store - // it separately. - this._months = +months + quarters * 3 + years * 12; - - this._data = {}; - - this._locale = getLocale(); - - this._bubble(); - } - - function isDuration(obj) { - return obj instanceof Duration; - } - - function absRound(number) { - if (number < 0) { - return Math.round(-1 * number) * -1; - } else { - return Math.round(number); - } - } - - // compare two arrays, return the number of differences - function compareArrays(array1, array2, dontConvert) { - var len = Math.min(array1.length, array2.length), - lengthDiff = Math.abs(array1.length - array2.length), - diffs = 0, - i; - for (i = 0; i < len; i++) { - if ( - (dontConvert && array1[i] !== array2[i]) || - (!dontConvert && toInt(array1[i]) !== toInt(array2[i])) - ) { - diffs++; - } - } - return diffs + lengthDiff; - } - - // FORMATTING - - function offset(token, separator) { - addFormatToken(token, 0, 0, function () { - var offset = this.utcOffset(), - sign = '+'; - if (offset < 0) { - offset = -offset; - sign = '-'; - } - return ( - sign + - zeroFill(~~(offset / 60), 2) + - separator + - zeroFill(~~offset % 60, 2) - ); - }); - } - - offset('Z', ':'); - offset('ZZ', ''); - - // PARSING - - addRegexToken('Z', matchShortOffset); - addRegexToken('ZZ', matchShortOffset); - addParseToken(['Z', 'ZZ'], function (input, array, config) { - config._useUTC = true; - config._tzm = offsetFromString(matchShortOffset, input); - }); - - // HELPERS - - // timezone chunker - // '+10:00' > ['10', '00'] - // '-1530' > ['-15', '30'] - var chunkOffset = /([\+\-]|\d\d)/gi; - - function offsetFromString(matcher, string) { - var matches = (string || '').match(matcher), - chunk, - parts, - minutes; - - if (matches === null) { - return null; - } - - chunk = matches[matches.length - 1] || []; - parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; - minutes = +(parts[1] * 60) + toInt(parts[2]); - - return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; - } - - // Return a moment from input, that is local/utc/zone equivalent to model. - function cloneWithOffset(input, model) { - var res, diff; - if (model._isUTC) { - res = model.clone(); - diff = - (isMoment(input) || isDate(input) - ? input.valueOf() - : createLocal(input).valueOf()) - res.valueOf(); - // Use low-level api, because this fn is low-level api. - res._d.setTime(res._d.valueOf() + diff); - hooks.updateOffset(res, false); - return res; - } else { - return createLocal(input).local(); - } - } - - function getDateOffset(m) { - // On Firefox.24 Date#getTimezoneOffset returns a floating point. - // https://github.com/moment/moment/pull/1871 - return -Math.round(m._d.getTimezoneOffset()); - } - - // HOOKS - - // This function will be called whenever a moment is mutated. - // It is intended to keep the offset in sync with the timezone. - hooks.updateOffset = function () {}; - - // MOMENTS - - // keepLocalTime = true means only change the timezone, without - // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> - // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset - // +0200, so we adjust the time as needed, to be valid. - // - // Keeping the time actually adds/subtracts (one hour) - // from the actual represented time. That is why we call updateOffset - // a second time. In case it wants us to change the offset again - // _changeInProgress == true case, then we have to adjust, because - // there is no such time in the given timezone. - function getSetOffset(input, keepLocalTime, keepMinutes) { - var offset = this._offset || 0, - localAdjust; - if (!this.isValid()) { - return input != null ? this : NaN; - } - if (input != null) { - if (typeof input === 'string') { - input = offsetFromString(matchShortOffset, input); - if (input === null) { - return this; - } - } else if (Math.abs(input) < 16 && !keepMinutes) { - input = input * 60; - } - if (!this._isUTC && keepLocalTime) { - localAdjust = getDateOffset(this); - } - this._offset = input; - this._isUTC = true; - if (localAdjust != null) { - this.add(localAdjust, 'm'); - } - if (offset !== input) { - if (!keepLocalTime || this._changeInProgress) { - addSubtract( - this, - createDuration(input - offset, 'm'), - 1, - false - ); - } else if (!this._changeInProgress) { - this._changeInProgress = true; - hooks.updateOffset(this, true); - this._changeInProgress = null; - } - } - return this; - } else { - return this._isUTC ? offset : getDateOffset(this); - } - } - - function getSetZone(input, keepLocalTime) { - if (input != null) { - if (typeof input !== 'string') { - input = -input; - } - - this.utcOffset(input, keepLocalTime); - - return this; - } else { - return -this.utcOffset(); - } - } - - function setOffsetToUTC(keepLocalTime) { - return this.utcOffset(0, keepLocalTime); - } - - function setOffsetToLocal(keepLocalTime) { - if (this._isUTC) { - this.utcOffset(0, keepLocalTime); - this._isUTC = false; - - if (keepLocalTime) { - this.subtract(getDateOffset(this), 'm'); - } - } - return this; - } - - function setOffsetToParsedOffset() { - if (this._tzm != null) { - this.utcOffset(this._tzm, false, true); - } else if (typeof this._i === 'string') { - var tZone = offsetFromString(matchOffset, this._i); - if (tZone != null) { - this.utcOffset(tZone); - } else { - this.utcOffset(0, true); - } - } - return this; - } - - function hasAlignedHourOffset(input) { - if (!this.isValid()) { - return false; - } - input = input ? createLocal(input).utcOffset() : 0; - - return (this.utcOffset() - input) % 60 === 0; - } - - function isDaylightSavingTime() { - return ( - this.utcOffset() > this.clone().month(0).utcOffset() || - this.utcOffset() > this.clone().month(5).utcOffset() - ); - } - - function isDaylightSavingTimeShifted() { - if (!isUndefined(this._isDSTShifted)) { - return this._isDSTShifted; - } - - var c = {}, - other; - - copyConfig(c, this); - c = prepareConfig(c); - - if (c._a) { - other = c._isUTC ? createUTC(c._a) : createLocal(c._a); - this._isDSTShifted = - this.isValid() && compareArrays(c._a, other.toArray()) > 0; - } else { - this._isDSTShifted = false; - } - - return this._isDSTShifted; - } - - function isLocal() { - return this.isValid() ? !this._isUTC : false; - } - - function isUtcOffset() { - return this.isValid() ? this._isUTC : false; - } - - function isUtc() { - return this.isValid() ? this._isUTC && this._offset === 0 : false; - } - - // ASP.NET json date format regex - var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, - // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html - // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere - // and further modified to allow for strings containing both week and day - isoRegex = - /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; - - function createDuration(input, key) { - var duration = input, - // matching against regexp is expensive, do it on demand - match = null, - sign, - ret, - diffRes; - - if (isDuration(input)) { - duration = { - ms: input._milliseconds, - d: input._days, - M: input._months, - }; - } else if (isNumber(input) || !isNaN(+input)) { - duration = {}; - if (key) { - duration[key] = +input; - } else { - duration.milliseconds = +input; - } - } else if ((match = aspNetRegex.exec(input))) { - sign = match[1] === '-' ? -1 : 1; - duration = { - y: 0, - d: toInt(match[DATE]) * sign, - h: toInt(match[HOUR]) * sign, - m: toInt(match[MINUTE]) * sign, - s: toInt(match[SECOND]) * sign, - ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match - }; - } else if ((match = isoRegex.exec(input))) { - sign = match[1] === '-' ? -1 : 1; - duration = { - y: parseIso(match[2], sign), - M: parseIso(match[3], sign), - w: parseIso(match[4], sign), - d: parseIso(match[5], sign), - h: parseIso(match[6], sign), - m: parseIso(match[7], sign), - s: parseIso(match[8], sign), - }; - } else if (duration == null) { - // checks for null or undefined - duration = {}; - } else if ( - typeof duration === 'object' && - ('from' in duration || 'to' in duration) - ) { - diffRes = momentsDifference( - createLocal(duration.from), - createLocal(duration.to) - ); - - duration = {}; - duration.ms = diffRes.milliseconds; - duration.M = diffRes.months; - } - - ret = new Duration(duration); - - if (isDuration(input) && hasOwnProp(input, '_locale')) { - ret._locale = input._locale; - } - - if (isDuration(input) && hasOwnProp(input, '_isValid')) { - ret._isValid = input._isValid; - } - - return ret; - } - - createDuration.fn = Duration.prototype; - createDuration.invalid = createInvalid$1; - - function parseIso(inp, sign) { - // We'd normally use ~~inp for this, but unfortunately it also - // converts floats to ints. - // inp may be undefined, so careful calling replace on it. - var res = inp && parseFloat(inp.replace(',', '.')); - // apply sign while we're at it - return (isNaN(res) ? 0 : res) * sign; - } - - function positiveMomentsDifference(base, other) { - var res = {}; - - res.months = - other.month() - base.month() + (other.year() - base.year()) * 12; - if (base.clone().add(res.months, 'M').isAfter(other)) { - --res.months; - } - - res.milliseconds = +other - +base.clone().add(res.months, 'M'); - - return res; - } - - function momentsDifference(base, other) { - var res; - if (!(base.isValid() && other.isValid())) { - return { milliseconds: 0, months: 0 }; - } - - other = cloneWithOffset(other, base); - if (base.isBefore(other)) { - res = positiveMomentsDifference(base, other); - } else { - res = positiveMomentsDifference(other, base); - res.milliseconds = -res.milliseconds; - res.months = -res.months; - } - - return res; - } - - // TODO: remove 'name' arg after deprecation is removed - function createAdder(direction, name) { - return function (val, period) { - var dur, tmp; - //invert the arguments, but complain about it - if (period !== null && !isNaN(+period)) { - deprecateSimple( - name, - 'moment().' + - name + - '(period, number) is deprecated. Please use moment().' + - name + - '(number, period). ' + - 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.' - ); - tmp = val; - val = period; - period = tmp; - } - - dur = createDuration(val, period); - addSubtract(this, dur, direction); - return this; - }; - } - - function addSubtract(mom, duration, isAdding, updateOffset) { - var milliseconds = duration._milliseconds, - days = absRound(duration._days), - months = absRound(duration._months); - - if (!mom.isValid()) { - // No op - return; - } - - updateOffset = updateOffset == null ? true : updateOffset; - - if (months) { - setMonth(mom, get(mom, 'Month') + months * isAdding); - } - if (days) { - set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); - } - if (milliseconds) { - mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); - } - if (updateOffset) { - hooks.updateOffset(mom, days || months); - } - } - - var add = createAdder(1, 'add'), - subtract = createAdder(-1, 'subtract'); - - function isString(input) { - return typeof input === 'string' || input instanceof String; - } - - // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined - function isMomentInput(input) { - return ( - isMoment(input) || - isDate(input) || - isString(input) || - isNumber(input) || - isNumberOrStringArray(input) || - isMomentInputObject(input) || - input === null || - input === undefined - ); - } - - function isMomentInputObject(input) { - var objectTest = isObject(input) && !isObjectEmpty(input), - propertyTest = false, - properties = [ - 'years', - 'year', - 'y', - 'months', - 'month', - 'M', - 'days', - 'day', - 'd', - 'dates', - 'date', - 'D', - 'hours', - 'hour', - 'h', - 'minutes', - 'minute', - 'm', - 'seconds', - 'second', - 's', - 'milliseconds', - 'millisecond', - 'ms', - ], - i, - property, - propertyLen = properties.length; - - for (i = 0; i < propertyLen; i += 1) { - property = properties[i]; - propertyTest = propertyTest || hasOwnProp(input, property); - } - - return objectTest && propertyTest; - } - - function isNumberOrStringArray(input) { - var arrayTest = isArray(input), - dataTypeTest = false; - if (arrayTest) { - dataTypeTest = - input.filter(function (item) { - return !isNumber(item) && isString(input); - }).length === 0; - } - return arrayTest && dataTypeTest; - } - - function isCalendarSpec(input) { - var objectTest = isObject(input) && !isObjectEmpty(input), - propertyTest = false, - properties = [ - 'sameDay', - 'nextDay', - 'lastDay', - 'nextWeek', - 'lastWeek', - 'sameElse', - ], - i, - property; - - for (i = 0; i < properties.length; i += 1) { - property = properties[i]; - propertyTest = propertyTest || hasOwnProp(input, property); - } - - return objectTest && propertyTest; - } - - function getCalendarFormat(myMoment, now) { - var diff = myMoment.diff(now, 'days', true); - return diff < -6 - ? 'sameElse' - : diff < -1 - ? 'lastWeek' - : diff < 0 - ? 'lastDay' - : diff < 1 - ? 'sameDay' - : diff < 2 - ? 'nextDay' - : diff < 7 - ? 'nextWeek' - : 'sameElse'; - } - - function calendar$1(time, formats) { - // Support for single parameter, formats only overload to the calendar function - if (arguments.length === 1) { - if (!arguments[0]) { - time = undefined; - formats = undefined; - } else if (isMomentInput(arguments[0])) { - time = arguments[0]; - formats = undefined; - } else if (isCalendarSpec(arguments[0])) { - formats = arguments[0]; - time = undefined; - } - } - // We want to compare the start of today, vs this. - // Getting start-of-today depends on whether we're local/utc/offset or not. - var now = time || createLocal(), - sod = cloneWithOffset(now, this).startOf('day'), - format = hooks.calendarFormat(this, sod) || 'sameElse', - output = - formats && - (isFunction(formats[format]) - ? formats[format].call(this, now) - : formats[format]); - - return this.format( - output || this.localeData().calendar(format, this, createLocal(now)) - ); - } - - function clone() { - return new Moment(this); - } - - function isAfter(input, units) { - var localInput = isMoment(input) ? input : createLocal(input); - if (!(this.isValid() && localInput.isValid())) { - return false; - } - units = normalizeUnits(units) || 'millisecond'; - if (units === 'millisecond') { - return this.valueOf() > localInput.valueOf(); - } else { - return localInput.valueOf() < this.clone().startOf(units).valueOf(); - } - } - - function isBefore(input, units) { - var localInput = isMoment(input) ? input : createLocal(input); - if (!(this.isValid() && localInput.isValid())) { - return false; - } - units = normalizeUnits(units) || 'millisecond'; - if (units === 'millisecond') { - return this.valueOf() < localInput.valueOf(); - } else { - return this.clone().endOf(units).valueOf() < localInput.valueOf(); - } - } - - function isBetween(from, to, units, inclusivity) { - var localFrom = isMoment(from) ? from : createLocal(from), - localTo = isMoment(to) ? to : createLocal(to); - if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { - return false; - } - inclusivity = inclusivity || '()'; - return ( - (inclusivity[0] === '(' - ? this.isAfter(localFrom, units) - : !this.isBefore(localFrom, units)) && - (inclusivity[1] === ')' - ? this.isBefore(localTo, units) - : !this.isAfter(localTo, units)) - ); - } - - function isSame(input, units) { - var localInput = isMoment(input) ? input : createLocal(input), - inputMs; - if (!(this.isValid() && localInput.isValid())) { - return false; - } - units = normalizeUnits(units) || 'millisecond'; - if (units === 'millisecond') { - return this.valueOf() === localInput.valueOf(); - } else { - inputMs = localInput.valueOf(); - return ( - this.clone().startOf(units).valueOf() <= inputMs && - inputMs <= this.clone().endOf(units).valueOf() - ); - } - } - - function isSameOrAfter(input, units) { - return this.isSame(input, units) || this.isAfter(input, units); - } - - function isSameOrBefore(input, units) { - return this.isSame(input, units) || this.isBefore(input, units); - } - - function diff(input, units, asFloat) { - var that, zoneDelta, output; - - if (!this.isValid()) { - return NaN; - } - - that = cloneWithOffset(input, this); - - if (!that.isValid()) { - return NaN; - } - - zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; - - units = normalizeUnits(units); - - switch (units) { - case 'year': - output = monthDiff(this, that) / 12; - break; - case 'month': - output = monthDiff(this, that); - break; - case 'quarter': - output = monthDiff(this, that) / 3; - break; - case 'second': - output = (this - that) / 1e3; - break; // 1000 - case 'minute': - output = (this - that) / 6e4; - break; // 1000 * 60 - case 'hour': - output = (this - that) / 36e5; - break; // 1000 * 60 * 60 - case 'day': - output = (this - that - zoneDelta) / 864e5; - break; // 1000 * 60 * 60 * 24, negate dst - case 'week': - output = (this - that - zoneDelta) / 6048e5; - break; // 1000 * 60 * 60 * 24 * 7, negate dst - default: - output = this - that; - } - - return asFloat ? output : absFloor(output); - } - - function monthDiff(a, b) { - if (a.date() < b.date()) { - // end-of-month calculations work correct when the start month has more - // days than the end month. - return -monthDiff(b, a); - } - // difference in months - var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), - // b is in (anchor - 1 month, anchor + 1 month) - anchor = a.clone().add(wholeMonthDiff, 'months'), - anchor2, - adjust; - - if (b - anchor < 0) { - anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); - // linear across the month - adjust = (b - anchor) / (anchor - anchor2); - } else { - anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); - // linear across the month - adjust = (b - anchor) / (anchor2 - anchor); - } - - //check for negative zero, return zero if negative zero - return -(wholeMonthDiff + adjust) || 0; - } - - hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; - hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; - - function toString() { - return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); - } - - function toISOString(keepOffset) { - if (!this.isValid()) { - return null; - } - var utc = keepOffset !== true, - m = utc ? this.clone().utc() : this; - if (m.year() < 0 || m.year() > 9999) { - return formatMoment( - m, - utc - ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' - : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ' - ); - } - if (isFunction(Date.prototype.toISOString)) { - // native implementation is ~50x faster, use it when we can - if (utc) { - return this.toDate().toISOString(); - } else { - return new Date(this.valueOf() + this.utcOffset() * 60 * 1000) - .toISOString() - .replace('Z', formatMoment(m, 'Z')); - } - } - return formatMoment( - m, - utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ' - ); - } - - /** - * Return a human readable representation of a moment that can - * also be evaluated to get a new moment which is the same - * - * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects - */ - function inspect() { - if (!this.isValid()) { - return 'moment.invalid(/* ' + this._i + ' */)'; - } - var func = 'moment', - zone = '', - prefix, - year, - datetime, - suffix; - if (!this.isLocal()) { - func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; - zone = 'Z'; - } - prefix = '[' + func + '("]'; - year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; - datetime = '-MM-DD[T]HH:mm:ss.SSS'; - suffix = zone + '[")]'; - - return this.format(prefix + year + datetime + suffix); - } - - function format(inputString) { - if (!inputString) { - inputString = this.isUtc() - ? hooks.defaultFormatUtc - : hooks.defaultFormat; - } - var output = formatMoment(this, inputString); - return this.localeData().postformat(output); - } - - function from(time, withoutSuffix) { - if ( - this.isValid() && - ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) - ) { - return createDuration({ to: this, from: time }) - .locale(this.locale()) - .humanize(!withoutSuffix); - } else { - return this.localeData().invalidDate(); - } - } - - function fromNow(withoutSuffix) { - return this.from(createLocal(), withoutSuffix); - } - - function to(time, withoutSuffix) { - if ( - this.isValid() && - ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) - ) { - return createDuration({ from: this, to: time }) - .locale(this.locale()) - .humanize(!withoutSuffix); - } else { - return this.localeData().invalidDate(); - } - } - - function toNow(withoutSuffix) { - return this.to(createLocal(), withoutSuffix); - } - - // If passed a locale key, it will set the locale for this - // instance. Otherwise, it will return the locale configuration - // variables for this instance. - function locale(key) { - var newLocaleData; - - if (key === undefined) { - return this._locale._abbr; - } else { - newLocaleData = getLocale(key); - if (newLocaleData != null) { - this._locale = newLocaleData; - } - return this; - } - } - - var lang = deprecate( - 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', - function (key) { - if (key === undefined) { - return this.localeData(); - } else { - return this.locale(key); - } - } - ); - - function localeData() { - return this._locale; - } - - var MS_PER_SECOND = 1000, - MS_PER_MINUTE = 60 * MS_PER_SECOND, - MS_PER_HOUR = 60 * MS_PER_MINUTE, - MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; - - // actual modulo - handles negative numbers (for dates before 1970): - function mod$1(dividend, divisor) { - return ((dividend % divisor) + divisor) % divisor; - } - - function localStartOfDate(y, m, d) { - // the date constructor remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0) { - // preserve leap years using a full 400 year cycle, then reset - return new Date(y + 400, m, d) - MS_PER_400_YEARS; - } else { - return new Date(y, m, d).valueOf(); - } - } - - function utcStartOfDate(y, m, d) { - // Date.UTC remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0) { - // preserve leap years using a full 400 year cycle, then reset - return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; - } else { - return Date.UTC(y, m, d); - } - } - - function startOf(units) { - var time, startOfDate; - units = normalizeUnits(units); - if (units === undefined || units === 'millisecond' || !this.isValid()) { - return this; - } - - startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; - - switch (units) { - case 'year': - time = startOfDate(this.year(), 0, 1); - break; - case 'quarter': - time = startOfDate( - this.year(), - this.month() - (this.month() % 3), - 1 - ); - break; - case 'month': - time = startOfDate(this.year(), this.month(), 1); - break; - case 'week': - time = startOfDate( - this.year(), - this.month(), - this.date() - this.weekday() - ); - break; - case 'isoWeek': - time = startOfDate( - this.year(), - this.month(), - this.date() - (this.isoWeekday() - 1) - ); - break; - case 'day': - case 'date': - time = startOfDate(this.year(), this.month(), this.date()); - break; - case 'hour': - time = this._d.valueOf(); - time -= mod$1( - time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), - MS_PER_HOUR - ); - break; - case 'minute': - time = this._d.valueOf(); - time -= mod$1(time, MS_PER_MINUTE); - break; - case 'second': - time = this._d.valueOf(); - time -= mod$1(time, MS_PER_SECOND); - break; - } - - this._d.setTime(time); - hooks.updateOffset(this, true); - return this; - } - - function endOf(units) { - var time, startOfDate; - units = normalizeUnits(units); - if (units === undefined || units === 'millisecond' || !this.isValid()) { - return this; - } - - startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; - - switch (units) { - case 'year': - time = startOfDate(this.year() + 1, 0, 1) - 1; - break; - case 'quarter': - time = - startOfDate( - this.year(), - this.month() - (this.month() % 3) + 3, - 1 - ) - 1; - break; - case 'month': - time = startOfDate(this.year(), this.month() + 1, 1) - 1; - break; - case 'week': - time = - startOfDate( - this.year(), - this.month(), - this.date() - this.weekday() + 7 - ) - 1; - break; - case 'isoWeek': - time = - startOfDate( - this.year(), - this.month(), - this.date() - (this.isoWeekday() - 1) + 7 - ) - 1; - break; - case 'day': - case 'date': - time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; - break; - case 'hour': - time = this._d.valueOf(); - time += - MS_PER_HOUR - - mod$1( - time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), - MS_PER_HOUR - ) - - 1; - break; - case 'minute': - time = this._d.valueOf(); - time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; - break; - case 'second': - time = this._d.valueOf(); - time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; - break; - } - - this._d.setTime(time); - hooks.updateOffset(this, true); - return this; - } - - function valueOf() { - return this._d.valueOf() - (this._offset || 0) * 60000; - } - - function unix() { - return Math.floor(this.valueOf() / 1000); - } - - function toDate() { - return new Date(this.valueOf()); - } - - function toArray() { - var m = this; - return [ - m.year(), - m.month(), - m.date(), - m.hour(), - m.minute(), - m.second(), - m.millisecond(), - ]; - } - - function toObject() { - var m = this; - return { - years: m.year(), - months: m.month(), - date: m.date(), - hours: m.hours(), - minutes: m.minutes(), - seconds: m.seconds(), - milliseconds: m.milliseconds(), - }; - } - - function toJSON() { - // new Date(NaN).toJSON() === null - return this.isValid() ? this.toISOString() : null; - } - - function isValid$2() { - return isValid(this); - } - - function parsingFlags() { - return extend({}, getParsingFlags(this)); - } - - function invalidAt() { - return getParsingFlags(this).overflow; - } - - function creationData() { - return { - input: this._i, - format: this._f, - locale: this._locale, - isUTC: this._isUTC, - strict: this._strict, - }; - } - - addFormatToken('N', 0, 0, 'eraAbbr'); - addFormatToken('NN', 0, 0, 'eraAbbr'); - addFormatToken('NNN', 0, 0, 'eraAbbr'); - addFormatToken('NNNN', 0, 0, 'eraName'); - addFormatToken('NNNNN', 0, 0, 'eraNarrow'); - - addFormatToken('y', ['y', 1], 'yo', 'eraYear'); - addFormatToken('y', ['yy', 2], 0, 'eraYear'); - addFormatToken('y', ['yyy', 3], 0, 'eraYear'); - addFormatToken('y', ['yyyy', 4], 0, 'eraYear'); - - addRegexToken('N', matchEraAbbr); - addRegexToken('NN', matchEraAbbr); - addRegexToken('NNN', matchEraAbbr); - addRegexToken('NNNN', matchEraName); - addRegexToken('NNNNN', matchEraNarrow); - - addParseToken( - ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], - function (input, array, config, token) { - var era = config._locale.erasParse(input, token, config._strict); - if (era) { - getParsingFlags(config).era = era; - } else { - getParsingFlags(config).invalidEra = input; - } - } - ); - - addRegexToken('y', matchUnsigned); - addRegexToken('yy', matchUnsigned); - addRegexToken('yyy', matchUnsigned); - addRegexToken('yyyy', matchUnsigned); - addRegexToken('yo', matchEraYearOrdinal); - - addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR); - addParseToken(['yo'], function (input, array, config, token) { - var match; - if (config._locale._eraYearOrdinalRegex) { - match = input.match(config._locale._eraYearOrdinalRegex); - } - - if (config._locale.eraYearOrdinalParse) { - array[YEAR] = config._locale.eraYearOrdinalParse(input, match); - } else { - array[YEAR] = parseInt(input, 10); - } - }); - - function localeEras(m, format) { - var i, - l, - date, - eras = this._eras || getLocale('en')._eras; - for (i = 0, l = eras.length; i < l; ++i) { - switch (typeof eras[i].since) { - case 'string': - // truncate time - date = hooks(eras[i].since).startOf('day'); - eras[i].since = date.valueOf(); - break; - } - - switch (typeof eras[i].until) { - case 'undefined': - eras[i].until = +Infinity; - break; - case 'string': - // truncate time - date = hooks(eras[i].until).startOf('day').valueOf(); - eras[i].until = date.valueOf(); - break; - } - } - return eras; - } - - function localeErasParse(eraName, format, strict) { - var i, - l, - eras = this.eras(), - name, - abbr, - narrow; - eraName = eraName.toUpperCase(); - - for (i = 0, l = eras.length; i < l; ++i) { - name = eras[i].name.toUpperCase(); - abbr = eras[i].abbr.toUpperCase(); - narrow = eras[i].narrow.toUpperCase(); - - if (strict) { - switch (format) { - case 'N': - case 'NN': - case 'NNN': - if (abbr === eraName) { - return eras[i]; - } - break; - - case 'NNNN': - if (name === eraName) { - return eras[i]; - } - break; - - case 'NNNNN': - if (narrow === eraName) { - return eras[i]; - } - break; - } - } else if ([name, abbr, narrow].indexOf(eraName) >= 0) { - return eras[i]; - } - } - } - - function localeErasConvertYear(era, year) { - var dir = era.since <= era.until ? +1 : -1; - if (year === undefined) { - return hooks(era.since).year(); - } else { - return hooks(era.since).year() + (year - era.offset) * dir; - } - } - - function getEraName() { - var i, - l, - val, - eras = this.localeData().eras(); - for (i = 0, l = eras.length; i < l; ++i) { - // truncate time - val = this.clone().startOf('day').valueOf(); - - if (eras[i].since <= val && val <= eras[i].until) { - return eras[i].name; - } - if (eras[i].until <= val && val <= eras[i].since) { - return eras[i].name; - } - } - - return ''; - } - - function getEraNarrow() { - var i, - l, - val, - eras = this.localeData().eras(); - for (i = 0, l = eras.length; i < l; ++i) { - // truncate time - val = this.clone().startOf('day').valueOf(); - - if (eras[i].since <= val && val <= eras[i].until) { - return eras[i].narrow; - } - if (eras[i].until <= val && val <= eras[i].since) { - return eras[i].narrow; - } - } - - return ''; - } - - function getEraAbbr() { - var i, - l, - val, - eras = this.localeData().eras(); - for (i = 0, l = eras.length; i < l; ++i) { - // truncate time - val = this.clone().startOf('day').valueOf(); - - if (eras[i].since <= val && val <= eras[i].until) { - return eras[i].abbr; - } - if (eras[i].until <= val && val <= eras[i].since) { - return eras[i].abbr; - } - } - - return ''; - } - - function getEraYear() { - var i, - l, - dir, - val, - eras = this.localeData().eras(); - for (i = 0, l = eras.length; i < l; ++i) { - dir = eras[i].since <= eras[i].until ? +1 : -1; - - // truncate time - val = this.clone().startOf('day').valueOf(); - - if ( - (eras[i].since <= val && val <= eras[i].until) || - (eras[i].until <= val && val <= eras[i].since) - ) { - return ( - (this.year() - hooks(eras[i].since).year()) * dir + - eras[i].offset - ); - } - } - - return this.year(); - } - - function erasNameRegex(isStrict) { - if (!hasOwnProp(this, '_erasNameRegex')) { - computeErasParse.call(this); - } - return isStrict ? this._erasNameRegex : this._erasRegex; - } - - function erasAbbrRegex(isStrict) { - if (!hasOwnProp(this, '_erasAbbrRegex')) { - computeErasParse.call(this); - } - return isStrict ? this._erasAbbrRegex : this._erasRegex; - } - - function erasNarrowRegex(isStrict) { - if (!hasOwnProp(this, '_erasNarrowRegex')) { - computeErasParse.call(this); - } - return isStrict ? this._erasNarrowRegex : this._erasRegex; - } - - function matchEraAbbr(isStrict, locale) { - return locale.erasAbbrRegex(isStrict); - } - - function matchEraName(isStrict, locale) { - return locale.erasNameRegex(isStrict); - } - - function matchEraNarrow(isStrict, locale) { - return locale.erasNarrowRegex(isStrict); - } - - function matchEraYearOrdinal(isStrict, locale) { - return locale._eraYearOrdinalRegex || matchUnsigned; - } - - function computeErasParse() { - var abbrPieces = [], - namePieces = [], - narrowPieces = [], - mixedPieces = [], - i, - l, - erasName, - erasAbbr, - erasNarrow, - eras = this.eras(); - - for (i = 0, l = eras.length; i < l; ++i) { - erasName = regexEscape(eras[i].name); - erasAbbr = regexEscape(eras[i].abbr); - erasNarrow = regexEscape(eras[i].narrow); - - namePieces.push(erasName); - abbrPieces.push(erasAbbr); - narrowPieces.push(erasNarrow); - mixedPieces.push(erasName); - mixedPieces.push(erasAbbr); - mixedPieces.push(erasNarrow); - } - - this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); - this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i'); - this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i'); - this._erasNarrowRegex = new RegExp( - '^(' + narrowPieces.join('|') + ')', - 'i' - ); - } - - // FORMATTING - - addFormatToken(0, ['gg', 2], 0, function () { - return this.weekYear() % 100; - }); - - addFormatToken(0, ['GG', 2], 0, function () { - return this.isoWeekYear() % 100; - }); - - function addWeekYearFormatToken(token, getter) { - addFormatToken(0, [token, token.length], 0, getter); - } - - addWeekYearFormatToken('gggg', 'weekYear'); - addWeekYearFormatToken('ggggg', 'weekYear'); - addWeekYearFormatToken('GGGG', 'isoWeekYear'); - addWeekYearFormatToken('GGGGG', 'isoWeekYear'); - - // ALIASES - - // PARSING - - addRegexToken('G', matchSigned); - addRegexToken('g', matchSigned); - addRegexToken('GG', match1to2, match2); - addRegexToken('gg', match1to2, match2); - addRegexToken('GGGG', match1to4, match4); - addRegexToken('gggg', match1to4, match4); - addRegexToken('GGGGG', match1to6, match6); - addRegexToken('ggggg', match1to6, match6); - - addWeekParseToken( - ['gggg', 'ggggg', 'GGGG', 'GGGGG'], - function (input, week, config, token) { - week[token.substr(0, 2)] = toInt(input); - } - ); - - addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { - week[token] = hooks.parseTwoDigitYear(input); - }); - - // MOMENTS - - function getSetWeekYear(input) { - return getSetWeekYearHelper.call( - this, - input, - this.week(), - this.weekday() + this.localeData()._week.dow, - this.localeData()._week.dow, - this.localeData()._week.doy - ); - } - - function getSetISOWeekYear(input) { - return getSetWeekYearHelper.call( - this, - input, - this.isoWeek(), - this.isoWeekday(), - 1, - 4 - ); - } - - function getISOWeeksInYear() { - return weeksInYear(this.year(), 1, 4); - } - - function getISOWeeksInISOWeekYear() { - return weeksInYear(this.isoWeekYear(), 1, 4); - } - - function getWeeksInYear() { - var weekInfo = this.localeData()._week; - return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); - } - - function getWeeksInWeekYear() { - var weekInfo = this.localeData()._week; - return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy); - } - - function getSetWeekYearHelper(input, week, weekday, dow, doy) { - var weeksTarget; - if (input == null) { - return weekOfYear(this, dow, doy).year; - } else { - weeksTarget = weeksInYear(input, dow, doy); - if (week > weeksTarget) { - week = weeksTarget; - } - return setWeekAll.call(this, input, week, weekday, dow, doy); - } - } - - function setWeekAll(weekYear, week, weekday, dow, doy) { - var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), - date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); - - this.year(date.getUTCFullYear()); - this.month(date.getUTCMonth()); - this.date(date.getUTCDate()); - return this; - } - - // FORMATTING - - addFormatToken('Q', 0, 'Qo', 'quarter'); - - // PARSING - - addRegexToken('Q', match1); - addParseToken('Q', function (input, array) { - array[MONTH] = (toInt(input) - 1) * 3; - }); - - // MOMENTS - - function getSetQuarter(input) { - return input == null - ? Math.ceil((this.month() + 1) / 3) - : this.month((input - 1) * 3 + (this.month() % 3)); - } - - // FORMATTING - - addFormatToken('D', ['DD', 2], 'Do', 'date'); - - // PARSING - - addRegexToken('D', match1to2, match1to2NoLeadingZero); - addRegexToken('DD', match1to2, match2); - addRegexToken('Do', function (isStrict, locale) { - // TODO: Remove "ordinalParse" fallback in next major release. - return isStrict - ? locale._dayOfMonthOrdinalParse || locale._ordinalParse - : locale._dayOfMonthOrdinalParseLenient; - }); - - addParseToken(['D', 'DD'], DATE); - addParseToken('Do', function (input, array) { - array[DATE] = toInt(input.match(match1to2)[0]); - }); - - // MOMENTS - - var getSetDayOfMonth = makeGetSet('Date', true); - - // FORMATTING - - addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); - - // PARSING - - addRegexToken('DDD', match1to3); - addRegexToken('DDDD', match3); - addParseToken(['DDD', 'DDDD'], function (input, array, config) { - config._dayOfYear = toInt(input); - }); - - // HELPERS - - // MOMENTS - - function getSetDayOfYear(input) { - var dayOfYear = - Math.round( - (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5 - ) + 1; - return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); - } - - // FORMATTING - - addFormatToken('m', ['mm', 2], 0, 'minute'); - - // PARSING - - addRegexToken('m', match1to2, match1to2HasZero); - addRegexToken('mm', match1to2, match2); - addParseToken(['m', 'mm'], MINUTE); - - // MOMENTS - - var getSetMinute = makeGetSet('Minutes', false); - - // FORMATTING - - addFormatToken('s', ['ss', 2], 0, 'second'); - - // PARSING - - addRegexToken('s', match1to2, match1to2HasZero); - addRegexToken('ss', match1to2, match2); - addParseToken(['s', 'ss'], SECOND); - - // MOMENTS - - var getSetSecond = makeGetSet('Seconds', false); - - // FORMATTING - - addFormatToken('S', 0, 0, function () { - return ~~(this.millisecond() / 100); - }); - - addFormatToken(0, ['SS', 2], 0, function () { - return ~~(this.millisecond() / 10); - }); - - addFormatToken(0, ['SSS', 3], 0, 'millisecond'); - addFormatToken(0, ['SSSS', 4], 0, function () { - return this.millisecond() * 10; - }); - addFormatToken(0, ['SSSSS', 5], 0, function () { - return this.millisecond() * 100; - }); - addFormatToken(0, ['SSSSSS', 6], 0, function () { - return this.millisecond() * 1000; - }); - addFormatToken(0, ['SSSSSSS', 7], 0, function () { - return this.millisecond() * 10000; - }); - addFormatToken(0, ['SSSSSSSS', 8], 0, function () { - return this.millisecond() * 100000; - }); - addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { - return this.millisecond() * 1000000; - }); - - // PARSING - - addRegexToken('S', match1to3, match1); - addRegexToken('SS', match1to3, match2); - addRegexToken('SSS', match1to3, match3); - - var token, getSetMillisecond; - for (token = 'SSSS'; token.length <= 9; token += 'S') { - addRegexToken(token, matchUnsigned); - } - - function parseMs(input, array) { - array[MILLISECOND] = toInt(('0.' + input) * 1000); - } - - for (token = 'S'; token.length <= 9; token += 'S') { - addParseToken(token, parseMs); - } - - getSetMillisecond = makeGetSet('Milliseconds', false); - - // FORMATTING - - addFormatToken('z', 0, 0, 'zoneAbbr'); - addFormatToken('zz', 0, 0, 'zoneName'); - - // MOMENTS - - function getZoneAbbr() { - return this._isUTC ? 'UTC' : ''; - } - - function getZoneName() { - return this._isUTC ? 'Coordinated Universal Time' : ''; - } - - var proto = Moment.prototype; - - proto.add = add; - proto.calendar = calendar$1; - proto.clone = clone; - proto.diff = diff; - proto.endOf = endOf; - proto.format = format; - proto.from = from; - proto.fromNow = fromNow; - proto.to = to; - proto.toNow = toNow; - proto.get = stringGet; - proto.invalidAt = invalidAt; - proto.isAfter = isAfter; - proto.isBefore = isBefore; - proto.isBetween = isBetween; - proto.isSame = isSame; - proto.isSameOrAfter = isSameOrAfter; - proto.isSameOrBefore = isSameOrBefore; - proto.isValid = isValid$2; - proto.lang = lang; - proto.locale = locale; - proto.localeData = localeData; - proto.max = prototypeMax; - proto.min = prototypeMin; - proto.parsingFlags = parsingFlags; - proto.set = stringSet; - proto.startOf = startOf; - proto.subtract = subtract; - proto.toArray = toArray; - proto.toObject = toObject; - proto.toDate = toDate; - proto.toISOString = toISOString; - proto.inspect = inspect; - if (typeof Symbol !== 'undefined' && Symbol.for != null) { - proto[Symbol.for('nodejs.util.inspect.custom')] = function () { - return 'Moment<' + this.format() + '>'; - }; - } - proto.toJSON = toJSON; - proto.toString = toString; - proto.unix = unix; - proto.valueOf = valueOf; - proto.creationData = creationData; - proto.eraName = getEraName; - proto.eraNarrow = getEraNarrow; - proto.eraAbbr = getEraAbbr; - proto.eraYear = getEraYear; - proto.year = getSetYear; - proto.isLeapYear = getIsLeapYear; - proto.weekYear = getSetWeekYear; - proto.isoWeekYear = getSetISOWeekYear; - proto.quarter = proto.quarters = getSetQuarter; - proto.month = getSetMonth; - proto.daysInMonth = getDaysInMonth; - proto.week = proto.weeks = getSetWeek; - proto.isoWeek = proto.isoWeeks = getSetISOWeek; - proto.weeksInYear = getWeeksInYear; - proto.weeksInWeekYear = getWeeksInWeekYear; - proto.isoWeeksInYear = getISOWeeksInYear; - proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear; - proto.date = getSetDayOfMonth; - proto.day = proto.days = getSetDayOfWeek; - proto.weekday = getSetLocaleDayOfWeek; - proto.isoWeekday = getSetISODayOfWeek; - proto.dayOfYear = getSetDayOfYear; - proto.hour = proto.hours = getSetHour; - proto.minute = proto.minutes = getSetMinute; - proto.second = proto.seconds = getSetSecond; - proto.millisecond = proto.milliseconds = getSetMillisecond; - proto.utcOffset = getSetOffset; - proto.utc = setOffsetToUTC; - proto.local = setOffsetToLocal; - proto.parseZone = setOffsetToParsedOffset; - proto.hasAlignedHourOffset = hasAlignedHourOffset; - proto.isDST = isDaylightSavingTime; - proto.isLocal = isLocal; - proto.isUtcOffset = isUtcOffset; - proto.isUtc = isUtc; - proto.isUTC = isUtc; - proto.zoneAbbr = getZoneAbbr; - proto.zoneName = getZoneName; - proto.dates = deprecate( - 'dates accessor is deprecated. Use date instead.', - getSetDayOfMonth - ); - proto.months = deprecate( - 'months accessor is deprecated. Use month instead', - getSetMonth - ); - proto.years = deprecate( - 'years accessor is deprecated. Use year instead', - getSetYear - ); - proto.zone = deprecate( - 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', - getSetZone - ); - proto.isDSTShifted = deprecate( - 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', - isDaylightSavingTimeShifted - ); - - function createUnix(input) { - return createLocal(input * 1000); - } - - function createInZone() { - return createLocal.apply(null, arguments).parseZone(); - } - - function preParsePostFormat(string) { - return string; - } - - var proto$1 = Locale.prototype; - - proto$1.calendar = calendar; - proto$1.longDateFormat = longDateFormat; - proto$1.invalidDate = invalidDate; - proto$1.ordinal = ordinal; - proto$1.preparse = preParsePostFormat; - proto$1.postformat = preParsePostFormat; - proto$1.relativeTime = relativeTime; - proto$1.pastFuture = pastFuture; - proto$1.set = set; - proto$1.eras = localeEras; - proto$1.erasParse = localeErasParse; - proto$1.erasConvertYear = localeErasConvertYear; - proto$1.erasAbbrRegex = erasAbbrRegex; - proto$1.erasNameRegex = erasNameRegex; - proto$1.erasNarrowRegex = erasNarrowRegex; - - proto$1.months = localeMonths; - proto$1.monthsShort = localeMonthsShort; - proto$1.monthsParse = localeMonthsParse; - proto$1.monthsRegex = monthsRegex; - proto$1.monthsShortRegex = monthsShortRegex; - proto$1.week = localeWeek; - proto$1.firstDayOfYear = localeFirstDayOfYear; - proto$1.firstDayOfWeek = localeFirstDayOfWeek; - - proto$1.weekdays = localeWeekdays; - proto$1.weekdaysMin = localeWeekdaysMin; - proto$1.weekdaysShort = localeWeekdaysShort; - proto$1.weekdaysParse = localeWeekdaysParse; - - proto$1.weekdaysRegex = weekdaysRegex; - proto$1.weekdaysShortRegex = weekdaysShortRegex; - proto$1.weekdaysMinRegex = weekdaysMinRegex; - - proto$1.isPM = localeIsPM; - proto$1.meridiem = localeMeridiem; - - function get$1(format, index, field, setter) { - var locale = getLocale(), - utc = createUTC().set(setter, index); - return locale[field](utc, format); - } - - function listMonthsImpl(format, index, field) { - if (isNumber(format)) { - index = format; - format = undefined; - } - - format = format || ''; - - if (index != null) { - return get$1(format, index, field, 'month'); - } - - var i, - out = []; - for (i = 0; i < 12; i++) { - out[i] = get$1(format, i, field, 'month'); - } - return out; - } - - // () - // (5) - // (fmt, 5) - // (fmt) - // (true) - // (true, 5) - // (true, fmt, 5) - // (true, fmt) - function listWeekdaysImpl(localeSorted, format, index, field) { - if (typeof localeSorted === 'boolean') { - if (isNumber(format)) { - index = format; - format = undefined; - } - - format = format || ''; - } else { - format = localeSorted; - index = format; - localeSorted = false; - - if (isNumber(format)) { - index = format; - format = undefined; - } - - format = format || ''; - } - - var locale = getLocale(), - shift = localeSorted ? locale._week.dow : 0, - i, - out = []; - - if (index != null) { - return get$1(format, (index + shift) % 7, field, 'day'); - } - - for (i = 0; i < 7; i++) { - out[i] = get$1(format, (i + shift) % 7, field, 'day'); - } - return out; - } - - function listMonths(format, index) { - return listMonthsImpl(format, index, 'months'); - } - - function listMonthsShort(format, index) { - return listMonthsImpl(format, index, 'monthsShort'); - } - - function listWeekdays(localeSorted, format, index) { - return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); - } - - function listWeekdaysShort(localeSorted, format, index) { - return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); - } - - function listWeekdaysMin(localeSorted, format, index) { - return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); - } - - getSetGlobalLocale('en', { - eras: [ - { - since: '0001-01-01', - until: +Infinity, - offset: 1, - name: 'Anno Domini', - narrow: 'AD', - abbr: 'AD', - }, - { - since: '0000-12-31', - until: -Infinity, - offset: 1, - name: 'Before Christ', - narrow: 'BC', - abbr: 'BC', - }, - ], - dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, - ordinal: function (number) { - var b = number % 10, - output = - toInt((number % 100) / 10) === 1 - ? 'th' - : b === 1 - ? 'st' - : b === 2 - ? 'nd' - : b === 3 - ? 'rd' - : 'th'; - return number + output; - }, - }); - - // Side effect imports - - hooks.lang = deprecate( - 'moment.lang is deprecated. Use moment.locale instead.', - getSetGlobalLocale - ); - hooks.langData = deprecate( - 'moment.langData is deprecated. Use moment.localeData instead.', - getLocale - ); - - var mathAbs = Math.abs; - - function abs() { - var data = this._data; - - this._milliseconds = mathAbs(this._milliseconds); - this._days = mathAbs(this._days); - this._months = mathAbs(this._months); - - data.milliseconds = mathAbs(data.milliseconds); - data.seconds = mathAbs(data.seconds); - data.minutes = mathAbs(data.minutes); - data.hours = mathAbs(data.hours); - data.months = mathAbs(data.months); - data.years = mathAbs(data.years); - - return this; - } - - function addSubtract$1(duration, input, value, direction) { - var other = createDuration(input, value); - - duration._milliseconds += direction * other._milliseconds; - duration._days += direction * other._days; - duration._months += direction * other._months; - - return duration._bubble(); - } - - // supports only 2.0-style add(1, 's') or add(duration) - function add$1(input, value) { - return addSubtract$1(this, input, value, 1); - } - - // supports only 2.0-style subtract(1, 's') or subtract(duration) - function subtract$1(input, value) { - return addSubtract$1(this, input, value, -1); - } - - function absCeil(number) { - if (number < 0) { - return Math.floor(number); - } else { - return Math.ceil(number); - } - } - - function bubble() { - var milliseconds = this._milliseconds, - days = this._days, - months = this._months, - data = this._data, - seconds, - minutes, - hours, - years, - monthsFromDays; - - // if we have a mix of positive and negative values, bubble down first - // check: https://github.com/moment/moment/issues/2166 - if ( - !( - (milliseconds >= 0 && days >= 0 && months >= 0) || - (milliseconds <= 0 && days <= 0 && months <= 0) - ) - ) { - milliseconds += absCeil(monthsToDays(months) + days) * 864e5; - days = 0; - months = 0; - } - - // The following code bubbles up values, see the tests for - // examples of what that means. - data.milliseconds = milliseconds % 1000; - - seconds = absFloor(milliseconds / 1000); - data.seconds = seconds % 60; - - minutes = absFloor(seconds / 60); - data.minutes = minutes % 60; - - hours = absFloor(minutes / 60); - data.hours = hours % 24; - - days += absFloor(hours / 24); - - // convert days to months - monthsFromDays = absFloor(daysToMonths(days)); - months += monthsFromDays; - days -= absCeil(monthsToDays(monthsFromDays)); - - // 12 months -> 1 year - years = absFloor(months / 12); - months %= 12; - - data.days = days; - data.months = months; - data.years = years; - - return this; - } - - function daysToMonths(days) { - // 400 years have 146097 days (taking into account leap year rules) - // 400 years have 12 months === 4800 - return (days * 4800) / 146097; - } - - function monthsToDays(months) { - // the reverse of daysToMonths - return (months * 146097) / 4800; - } - - function as(units) { - if (!this.isValid()) { - return NaN; - } - var days, - months, - milliseconds = this._milliseconds; - - units = normalizeUnits(units); - - if (units === 'month' || units === 'quarter' || units === 'year') { - days = this._days + milliseconds / 864e5; - months = this._months + daysToMonths(days); - switch (units) { - case 'month': - return months; - case 'quarter': - return months / 3; - case 'year': - return months / 12; - } - } else { - // handle milliseconds separately because of floating point math errors (issue #1867) - days = this._days + Math.round(monthsToDays(this._months)); - switch (units) { - case 'week': - return days / 7 + milliseconds / 6048e5; - case 'day': - return days + milliseconds / 864e5; - case 'hour': - return days * 24 + milliseconds / 36e5; - case 'minute': - return days * 1440 + milliseconds / 6e4; - case 'second': - return days * 86400 + milliseconds / 1000; - // Math.floor prevents floating point math errors here - case 'millisecond': - return Math.floor(days * 864e5) + milliseconds; - default: - throw new Error('Unknown unit ' + units); - } - } - } - - function makeAs(alias) { - return function () { - return this.as(alias); - }; - } - - var asMilliseconds = makeAs('ms'), - asSeconds = makeAs('s'), - asMinutes = makeAs('m'), - asHours = makeAs('h'), - asDays = makeAs('d'), - asWeeks = makeAs('w'), - asMonths = makeAs('M'), - asQuarters = makeAs('Q'), - asYears = makeAs('y'), - valueOf$1 = asMilliseconds; - - function clone$1() { - return createDuration(this); - } - - function get$2(units) { - units = normalizeUnits(units); - return this.isValid() ? this[units + 's']() : NaN; - } - - function makeGetter(name) { - return function () { - return this.isValid() ? this._data[name] : NaN; - }; - } - - var milliseconds = makeGetter('milliseconds'), - seconds = makeGetter('seconds'), - minutes = makeGetter('minutes'), - hours = makeGetter('hours'), - days = makeGetter('days'), - months = makeGetter('months'), - years = makeGetter('years'); - - function weeks() { - return absFloor(this.days() / 7); - } - - var round = Math.round, - thresholds = { - ss: 44, // a few seconds to seconds - s: 45, // seconds to minute - m: 45, // minutes to hour - h: 22, // hours to day - d: 26, // days to month/week - w: null, // weeks to month - M: 11, // months to year - }; - - // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize - function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { - return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); - } - - function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) { - var duration = createDuration(posNegDuration).abs(), - seconds = round(duration.as('s')), - minutes = round(duration.as('m')), - hours = round(duration.as('h')), - days = round(duration.as('d')), - months = round(duration.as('M')), - weeks = round(duration.as('w')), - years = round(duration.as('y')), - a = - (seconds <= thresholds.ss && ['s', seconds]) || - (seconds < thresholds.s && ['ss', seconds]) || - (minutes <= 1 && ['m']) || - (minutes < thresholds.m && ['mm', minutes]) || - (hours <= 1 && ['h']) || - (hours < thresholds.h && ['hh', hours]) || - (days <= 1 && ['d']) || - (days < thresholds.d && ['dd', days]); - - if (thresholds.w != null) { - a = - a || - (weeks <= 1 && ['w']) || - (weeks < thresholds.w && ['ww', weeks]); - } - a = a || - (months <= 1 && ['M']) || - (months < thresholds.M && ['MM', months]) || - (years <= 1 && ['y']) || ['yy', years]; - - a[2] = withoutSuffix; - a[3] = +posNegDuration > 0; - a[4] = locale; - return substituteTimeAgo.apply(null, a); - } - - // This function allows you to set the rounding function for relative time strings - function getSetRelativeTimeRounding(roundingFunction) { - if (roundingFunction === undefined) { - return round; - } - if (typeof roundingFunction === 'function') { - round = roundingFunction; - return true; - } - return false; - } - - // This function allows you to set a threshold for relative time strings - function getSetRelativeTimeThreshold(threshold, limit) { - if (thresholds[threshold] === undefined) { - return false; - } - if (limit === undefined) { - return thresholds[threshold]; - } - thresholds[threshold] = limit; - if (threshold === 's') { - thresholds.ss = limit - 1; - } - return true; - } - - function humanize(argWithSuffix, argThresholds) { - if (!this.isValid()) { - return this.localeData().invalidDate(); - } - - var withSuffix = false, - th = thresholds, - locale, - output; - - if (typeof argWithSuffix === 'object') { - argThresholds = argWithSuffix; - argWithSuffix = false; - } - if (typeof argWithSuffix === 'boolean') { - withSuffix = argWithSuffix; - } - if (typeof argThresholds === 'object') { - th = Object.assign({}, thresholds, argThresholds); - if (argThresholds.s != null && argThresholds.ss == null) { - th.ss = argThresholds.s - 1; - } - } - - locale = this.localeData(); - output = relativeTime$1(this, !withSuffix, th, locale); - - if (withSuffix) { - output = locale.pastFuture(+this, output); - } - - return locale.postformat(output); - } - - var abs$1 = Math.abs; - - function sign(x) { - return (x > 0) - (x < 0) || +x; - } - - function toISOString$1() { - // for ISO strings we do not use the normal bubbling rules: - // * milliseconds bubble up until they become hours - // * days do not bubble at all - // * months bubble up until they become years - // This is because there is no context-free conversion between hours and days - // (think of clock changes) - // and also not between days and months (28-31 days per month) - if (!this.isValid()) { - return this.localeData().invalidDate(); - } - - var seconds = abs$1(this._milliseconds) / 1000, - days = abs$1(this._days), - months = abs$1(this._months), - minutes, - hours, - years, - s, - total = this.asSeconds(), - totalSign, - ymSign, - daysSign, - hmsSign; - - if (!total) { - // this is the same as C#'s (Noda) and python (isodate)... - // but not other JS (goog.date) - return 'P0D'; - } - - // 3600 seconds -> 60 minutes -> 1 hour - minutes = absFloor(seconds / 60); - hours = absFloor(minutes / 60); - seconds %= 60; - minutes %= 60; - - // 12 months -> 1 year - years = absFloor(months / 12); - months %= 12; - - // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js - s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; - - totalSign = total < 0 ? '-' : ''; - ymSign = sign(this._months) !== sign(total) ? '-' : ''; - daysSign = sign(this._days) !== sign(total) ? '-' : ''; - hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; - - return ( - totalSign + - 'P' + - (years ? ymSign + years + 'Y' : '') + - (months ? ymSign + months + 'M' : '') + - (days ? daysSign + days + 'D' : '') + - (hours || minutes || seconds ? 'T' : '') + - (hours ? hmsSign + hours + 'H' : '') + - (minutes ? hmsSign + minutes + 'M' : '') + - (seconds ? hmsSign + s + 'S' : '') - ); - } - - var proto$2 = Duration.prototype; - - proto$2.isValid = isValid$1; - proto$2.abs = abs; - proto$2.add = add$1; - proto$2.subtract = subtract$1; - proto$2.as = as; - proto$2.asMilliseconds = asMilliseconds; - proto$2.asSeconds = asSeconds; - proto$2.asMinutes = asMinutes; - proto$2.asHours = asHours; - proto$2.asDays = asDays; - proto$2.asWeeks = asWeeks; - proto$2.asMonths = asMonths; - proto$2.asQuarters = asQuarters; - proto$2.asYears = asYears; - proto$2.valueOf = valueOf$1; - proto$2._bubble = bubble; - proto$2.clone = clone$1; - proto$2.get = get$2; - proto$2.milliseconds = milliseconds; - proto$2.seconds = seconds; - proto$2.minutes = minutes; - proto$2.hours = hours; - proto$2.days = days; - proto$2.weeks = weeks; - proto$2.months = months; - proto$2.years = years; - proto$2.humanize = humanize; - proto$2.toISOString = toISOString$1; - proto$2.toString = toISOString$1; - proto$2.toJSON = toISOString$1; - proto$2.locale = locale; - proto$2.localeData = localeData; - - proto$2.toIsoString = deprecate( - 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', - toISOString$1 - ); - proto$2.lang = lang; - - // FORMATTING - - addFormatToken('X', 0, 0, 'unix'); - addFormatToken('x', 0, 0, 'valueOf'); - - // PARSING - - addRegexToken('x', matchSigned); - addRegexToken('X', matchTimestamp); - addParseToken('X', function (input, array, config) { - config._d = new Date(parseFloat(input) * 1000); - }); - addParseToken('x', function (input, array, config) { - config._d = new Date(toInt(input)); - }); - - //! moment.js - - hooks.version = '2.30.1'; - - setHookCallback(createLocal); - - hooks.fn = proto; - hooks.min = min; - hooks.max = max; - hooks.now = now; - hooks.utc = createUTC; - hooks.unix = createUnix; - hooks.months = listMonths; - hooks.isDate = isDate; - hooks.locale = getSetGlobalLocale; - hooks.invalid = createInvalid; - hooks.duration = createDuration; - hooks.isMoment = isMoment; - hooks.weekdays = listWeekdays; - hooks.parseZone = createInZone; - hooks.localeData = getLocale; - hooks.isDuration = isDuration; - hooks.monthsShort = listMonthsShort; - hooks.weekdaysMin = listWeekdaysMin; - hooks.defineLocale = defineLocale; - hooks.updateLocale = updateLocale; - hooks.locales = listLocales; - hooks.weekdaysShort = listWeekdaysShort; - hooks.normalizeUnits = normalizeUnits; - hooks.relativeTimeRounding = getSetRelativeTimeRounding; - hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; - hooks.calendarFormat = getCalendarFormat; - hooks.prototype = proto; - - // currently HTML5 input type only supports 24-hour formats - hooks.HTML5_FMT = { - DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // - DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // - DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // - DATE: 'YYYY-MM-DD', // - TIME: 'HH:mm', // - TIME_SECONDS: 'HH:mm:ss', // - TIME_MS: 'HH:mm:ss.SSS', // - WEEK: 'GGGG-[W]WW', // - MONTH: 'YYYY-MM', // - }; - - return hooks; - -}))); - - -/***/ }), - -/***/ 3338: -/***/ ((module) => { - -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} - - -/***/ }), - -/***/ 7771: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -/* - * nconf.js: Top-level include for the nconf module - * - * (C) 2011, Charlie Robbins and the Contributors. - * - */ - -var common = __nccwpck_require__(5951), - Provider = (__nccwpck_require__(1079)/* .Provider */ .K); - -// -// `nconf` is by default an instance of `nconf.Provider`. -// -var nconf = module.exports = new Provider(); - -// -// Expose the version from the package.json -// -nconf.version = (__nccwpck_require__(4704)/* .version */ .rE); - -// -// Setup all stores as lazy-loaded getters. -// -nconf.__defineGetter__('Argv', function () { - return (__nccwpck_require__(9701)/* .Argv */ .f); -}); - -nconf.__defineGetter__('Env', function () { - return (__nccwpck_require__(5064)/* .Env */ .o); -}); - -nconf.__defineGetter__('File', function () { - return (__nccwpck_require__(3757)/* .File */ .Z); -}); - -nconf.__defineGetter__('Literal', function () { - return (__nccwpck_require__(536)/* .Literal */ .u); -}); - -nconf.__defineGetter__('Memory', function () { - return (__nccwpck_require__(4996)/* .Memory */ .c); -}); - -// -// Expose the various components included with nconf -// -nconf.key = common.key; -nconf.path = common.path; -nconf.loadFiles = common.loadFiles; -nconf.loadFilesSync = common.loadFilesSync; -nconf.formats = __nccwpck_require__(1948); -nconf.Provider = Provider; - - -/***/ }), - -/***/ 5951: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/* - * utils.js: Utility functions for the nconf module. - * - * (C) 2011, Charlie Robbins and the Contributors. - * - */ - -var fs = __nccwpck_require__(9896), - async = __nccwpck_require__(7386), - formats = __nccwpck_require__(1948), - Memory = (__nccwpck_require__(4996)/* .Memory */ .c); - -var common = exports; - -// -// ### function path (key) -// #### @key {string} The ':' delimited key to split -// Returns a fully-qualified path to a nested nconf key. -// If given null or undefined it should return an empty path. -// '' should still be respected as a path. -// -common.path = function (key, separator) { - separator = separator || ':'; - return key == null ? [] : key.split(separator); -}; - -// -// ### function key (arguments) -// Returns a `:` joined string from the `arguments`. -// -common.key = function () { - return Array.prototype.slice.call(arguments).join(':'); -}; - -// -// ### function key (arguments) -// Returns a joined string from the `arguments`, -// first argument is the join delimiter. -// -common.keyed = function () { - return Array.prototype.slice.call(arguments, 1).join(arguments[0]); -}; - -// -// ### function loadFiles (files, callback) -// #### @files {Object|Array} List of files (or settings object) to load. -// #### @callback {function} Continuation to respond to when complete. -// Loads all the data in the specified `files`. -// -common.loadFiles = function (files, callback) { - if (!files) { - return callback(null, {}); - } - - var options = Array.isArray(files) ? { files: files } : files; - - // - // Set the default JSON format if not already - // specified - // - options.format = options.format || formats.json; - - function parseFile (file, next) { - fs.readFile(file, function (err, data) { - return !err - ? next(null, options.format.parse(data.toString())) - : next(err); - }); - } - - async.map(options.files, parseFile, function (err, objs) { - return err ? callback(err) : callback(null, common.merge(objs)); - }); -}; - -// -// ### function loadFilesSync (files) -// #### @files {Object|Array} List of files (or settings object) to load. -// Loads all the data in the specified `files` synchronously. -// -common.loadFilesSync = function (files) { - if (!files) { - return; - } - - // - // Set the default JSON format if not already - // specified - // - var options = Array.isArray(files) ? { files: files } : files; - options.format = options.format || formats.json; - - return common.merge(options.files.map(function (file) { - return options.format.parse(fs.readFileSync(file, 'utf8')); - })); -}; - -// -// ### function merge (objs) -// #### @objs {Array} Array of object literals to merge -// Merges the specified `objs` using a temporary instance -// of `stores.Memory`. -// -common.merge = function (objs) { - var store = new Memory(); - - objs.forEach(function (obj) { - Object.keys(obj).forEach(function (key) { - store.merge(key, obj[key]); - }); - }); - - return store.store; -}; - -// -// ### function capitalize (str) -// #### @str {string} String to capitalize -// Capitalizes the specified `str`. -// -common.capitalize = function (str) { - return str && str[0].toUpperCase() + str.slice(1); -}; - -// -// ### function parseValues (any) -// #### @any {string} String to parse as native data-type or return as is -// try to parse `any` as a native data-type -// -common.parseValues = function (value) { - var val = value; - - try { - val = JSON.parse(value); - } catch (ignore) { - // Check for any other well-known strings that should be "parsed" - if (value === 'undefined'){ - val = void 0; - } - } - - return val; -}; - -// -// ### function transform(map, fn) -// #### @map {object} Object of key/value pairs to apply `fn` to -// #### @fn {function} Transformation function that will be applied to every key/value pair -// transform a set of key/value pairs and return the transformed result -common.transform = function(map, fn) { - var pairs = Object.keys(map).map(function(key) { - var obj = { key: key, value: map[key]}; - var result = fn.call(null, obj); - - if (!result) { - return null; - } else if (result.key) { - return result; - } - - var error = new Error('Transform function passed to store returned an invalid format: ' + JSON.stringify(result)); - error.name = 'RuntimeError'; - throw error; - }); - - - return pairs - .filter(function(pair) { - return pair !== null; - }) - .reduce(function(accumulator, pair) { - accumulator[pair.key] = pair.value; - return accumulator; - }, {}); -} - - -/***/ }), - -/***/ 1948: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/* - * formats.js: Default formats supported by nconf - * - * (C) 2011, Charlie Robbins and the Contributors. - * - */ - -var ini = __nccwpck_require__(5229); - -var formats = exports; - -// -// ### @json -// Standard JSON format which pretty prints `.stringify()`. -// -formats.json = { - stringify: function (obj, replacer, spacing) { - return JSON.stringify(obj, replacer || null, spacing || 2) - }, - parse: JSON.parse -}; - -// -// ### @ini -// Standard INI format supplied from the `ini` module -// http://en.wikipedia.org/wiki/INI_file -// -formats.ini = ini; - - -/***/ }), - -/***/ 1079: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/* - * provider.js: Abstraction providing an interface into pluggable configuration storage. - * - * (C) 2011, Charlie Robbins and the Contributors. - * - */ - -var async = __nccwpck_require__(7386), - common = __nccwpck_require__(5951); - -// -// ### function Provider (options) -// #### @options {Object} Options for this instance. -// Constructor function for the Provider object responsible -// for exposing the pluggable storage features of `nconf`. -// -var Provider = exports.K = function (options) { - // - // Setup default options for working with `stores`, - // `overrides`, `process.env` and `process.argv`. - // - options = options || {}; - this.stores = {}; - this.sources = []; - this.init(options); -}; - -// -// Define wrapper functions for using basic stores -// in this instance -// - -['argv', 'env'].forEach(function (type) { - Provider.prototype[type] = function () { - var args = [type].concat(Array.prototype.slice.call(arguments)); - return this.add.apply(this, args); - }; -}); - -// -// ### function file (key, options) -// #### @key {string|Object} Fully qualified options, name of file store, or path. -// #### @path {string|Object} **Optional** Full qualified options, or path. -// Adds a new `File` store to this instance. Accepts the following options -// -// nconf.file({ file: '.jitsuconf', dir: process.env.HOME, search: true }); -// nconf.file('path/to/config/file'); -// nconf.file('userconfig', 'path/to/config/file'); -// nconf.file('userconfig', { file: '.jitsuconf', search: true }); -// -Provider.prototype.file = function (key, options) { - if (arguments.length == 1) { - options = typeof key === 'string' ? { file: key } : key; - key = 'file'; - } - else { - options = typeof options === 'string' - ? { file: options } - : options; - } - - options.type = 'file'; - return this.add(key, options); -}; - -// -// Define wrapper functions for using -// overrides and defaults -// -['defaults', 'overrides'].forEach(function (type) { - Provider.prototype[type] = function (options) { - options = options || {}; - if (!options.type) { - options.type = 'literal'; - } - - return this.add(type, options); - }; -}); - -// -// ### function use (name, options) -// #### @type {string} Type of the nconf store to use. -// #### @options {Object} Options for the store instance. -// Adds (or replaces) a new store with the specified `name` -// and `options`. If `options.type` is not set, then `name` -// will be used instead: -// -// provider.use('file'); -// provider.use('file', { type: 'file', filename: '/path/to/userconf' }) -// -Provider.prototype.use = function (name, options) { - options = options || {}; - - function sameOptions (store) { - return Object.keys(options).every(function (key) { - return options[key] === store[key]; - }); - } - - var store = this.stores[name], - update = store && !sameOptions(store); - - if (!store || update) { - if (update) { - this.remove(name); - } - - this.add(name, options); - } - - return this; -}; - -// -// ### function add (name, options) -// #### @name {string} Name of the store to add to this instance -// #### @options {Object} Options for the store to create -// Adds a new store with the specified `name` and `options`. If `options.type` -// is not set, then `name` will be used instead: -// -// provider.add('memory'); -// provider.add('userconf', { type: 'file', filename: '/path/to/userconf' }) -// -Provider.prototype.add = function (name, options, usage) { - options = options || {}; - var type = options.type || name; - - if (!__nccwpck_require__(7771)[common.capitalize(type)]) { - throw new Error('Cannot add store with unknown type: ' + type); - } - - this.stores[name] = this.create(type, options, usage); - - if (this.stores[name].loadSync) { - this.stores[name].loadSync(); - } - - return this; -}; - -// -// ### function remove (name) -// #### @name {string} Name of the store to remove from this instance -// Removes a store with the specified `name` from this instance. Users -// are allowed to pass in a type argument (e.g. `memory`) as name if -// this was used in the call to `.add()`. -// -Provider.prototype.remove = function (name) { - delete this.stores[name]; - return this; -}; - -// -// ### function create (type, options) -// #### @type {string} Type of the nconf store to use. -// #### @options {Object} Options for the store instance. -// Creates a store of the specified `type` using the -// specified `options`. -// -Provider.prototype.create = function (type, options, usage) { - return new (__nccwpck_require__(7771)[common.capitalize(type.toLowerCase())])(options, usage); -}; - -// -// ### function init (options) -// #### @options {Object} Options to initialize this instance with. -// Initializes this instance with additional `stores` or `sources` in the -// `options` supplied. -// -Provider.prototype.init = function (options) { - var self = this; - - // - // Add any stores passed in through the options - // to this instance. - // - if (options.type) { - this.add(options.type, options); - } - else if (options.store) { - this.add(options.store.name || options.store.type, options.store); - } - else if (options.stores) { - Object.keys(options.stores).forEach(function (name) { - var store = options.stores[name]; - self.add(store.name || name || store.type, store); - }); - } - - // - // Add any read-only sources to this instance - // - if (options.source) { - this.sources.push(this.create(options.source.type || options.source.name, options.source)); - } - else if (options.sources) { - Object.keys(options.sources).forEach(function (name) { - var source = options.sources[name]; - self.sources.push(self.create(source.type || source.name || name, source)); - }); - } -}; - -// -// ### function get (key, callback) -// #### @key {string} Key to retrieve for this instance. -// #### @callback {function} **Optional** Continuation to respond to when complete. -// Retrieves the value for the specified key (if any). -// -Provider.prototype.get = function (key, callback) { - if (typeof key === 'function') { - // Allow a * key call to be made - callback = key; - key = null; - } - - // - // If there is no callback we can short-circuit into the default - // logic for traversing stores. - // - if (!callback) { - return this._execute('get', 1, key, callback); - } - - // - // Otherwise the asynchronous, hierarchical `get` is - // slightly more complicated because we do not need to traverse - // the entire set of stores, but up until there is a defined value. - // - var current = 0, - names = Object.keys(this.stores), - self = this, - response, - mergeObjs = []; - - async.whilst(function (cb) { - cb(null, typeof response === 'undefined' && current < names.length); - }, function (next) { - var store = self.stores[names[current]]; - current++; - - if (store.get.length >= 2) { - return store.get(key, function (err, value) { - if (err) { - return next(err); - } - - response = value; - - // Merge objects if necessary - if (response && typeof response === 'object' && !Array.isArray(response)) { - mergeObjs.push(response); - response = undefined; - } - - next(); - }); - } - - response = store.get(key); - - // Merge objects if necessary - if (response && typeof response === 'object' && !Array.isArray(response)) { - mergeObjs.push(response); - response = undefined; - } - - next(); - }, function (err) { - if (!err && mergeObjs.length) { - response = common.merge(mergeObjs.reverse()); - } - return err ? callback(err) : callback(null, response); - }); -}; - - -// -// ### function any (keys, callback) -// #### @keys {array|string...} Array of keys to query, or a variable list of strings -// #### @callback {function} **Optional** Continuation to respond to when complete. -// Retrieves the first truthy value (if any) for the specified list of keys. -// -Provider.prototype.any = function (keys, callback) { - - if (!Array.isArray(keys)) { - keys = Array.prototype.slice.call(arguments); - if (keys.length > 0 && typeof keys[keys.length - 1] === 'function') { - callback = keys.pop(); - } else { - callback = null; - } - } - - // - // If there is no callback, use the short-circuited "get" - // on each key in turn. - // - if (!callback) { - var val; - for (var i = 0; i < keys.length; ++i) { - val = this._execute('get', 1, keys[i], callback); - if (val) { - return val; - } - } - return null; - } - - var keyIndex = 0, - result, - self = this; - - async.whilst(function(cb) { - cb(null, !result && keyIndex < keys.length); - }, function(next) { - var key = keys[keyIndex]; - keyIndex++; - - self.get(key, function(err, v) { - if (err) { - next(err); - } else { - result = v; - next(); - } - }); - }, function(err) { - return err ? callback(err) : callback(null, result); - }); -}; - - -// -// ### function set (key, value, callback) -// #### @key {string} Key to set in this instance -// #### @value {literal|Object} Value for the specified key -// #### @callback {function} **Optional** Continuation to respond to when complete. -// Sets the `value` for the specified `key` in this instance. -// -Provider.prototype.set = function (key, value, callback) { - return this._execute('set', 2, key, value, callback); -}; - - -// -// ### function required (keys) -// #### @keys {array} List of keys -// Throws an error if any of `keys` has no value, otherwise returns `true` -Provider.prototype.required = function (keys) { - if (!Array.isArray(keys)) { - throw new Error('Incorrect parameter, array expected'); - } - - var missing = []; - keys.forEach(function(key) { - if (typeof this.get(key) === 'undefined') { - missing.push(key); - } - }, this); - - if (missing.length) { - throw new Error('Missing required keys: ' + missing.join(', ')); - } else { - return true; - } - -}; - -// -// ### function reset (callback) -// #### @callback {function} **Optional** Continuation to respond to when complete. -// Clears all keys associated with this instance. -// -Provider.prototype.reset = function (callback) { - return this._execute('reset', 0, callback); -}; - -// -// ### function clear (key, callback) -// #### @key {string} Key to remove from this instance -// #### @callback {function} **Optional** Continuation to respond to when complete. -// Removes the value for the specified `key` from this instance. -// -Provider.prototype.clear = function (key, callback) { - return this._execute('clear', 1, key, callback); -}; - -// -// ### function merge ([key,] value [, callback]) -// #### @key {string} Key to merge the value into -// #### @value {literal|Object} Value to merge into the key -// #### @callback {function} **Optional** Continuation to respond to when complete. -// Merges the properties in `value` into the existing object value at `key`. -// -// 1. If the existing value `key` is not an Object, it will be completely overwritten. -// 2. If `key` is not supplied, then the `value` will be merged into the root. -// -Provider.prototype.merge = function () { - var self = this, - args = Array.prototype.slice.call(arguments), - callback = typeof args[args.length - 1] === 'function' && args.pop(), - value = args.pop(), - key = args.pop(); - - function mergeProperty (prop, next) { - return self._execute('merge', 2, prop, value[prop], next); - } - - if (!key) { - if (Array.isArray(value) || typeof value !== 'object') { - return onError(new Error('Cannot merge non-Object into top-level.'), callback); - } - - return async.forEach(Object.keys(value), mergeProperty, callback || function () { }) - } - - return this._execute('merge', 2, key, value, callback); -}; - -// -// ### function load (callback) -// #### @callback {function} Continuation to respond to when complete. -// Responds with an Object representing all keys associated in this instance. -// -Provider.prototype.load = function (callback) { - var self = this; - - function getStores () { - var stores = Object.keys(self.stores); - stores.reverse(); - return stores.map(function (name) { - return self.stores[name]; - }); - } - - function loadStoreSync(store) { - if (!store.loadSync) { - throw new Error('nconf store ' + store.type + ' has no loadSync() method'); - } - - return store.loadSync(); - } - - function loadStore(store, next) { - if (!store.load && !store.loadSync) { - return next(new Error('nconf store ' + store.type + ' has no load() method')); - } - - return store.loadSync - ? next(null, store.loadSync()) - : store.load(next); - } - - function loadBatch (targets, done) { - if (!done) { - return common.merge(targets.map(loadStoreSync)); - } - - async.map(targets, loadStore, function (err, objs) { - return err ? done(err) : done(null, common.merge(objs)); - }); - } - - function mergeSources (data) { - // - // If `data` was returned then merge it into - // the system store. - // - if (data && typeof data === 'object') { - self.use('sources', { - type: 'literal', - store: data - }); - } - } - - function loadSources () { - var sourceHierarchy = self.sources.splice(0); - sourceHierarchy.reverse(); - - // - // If we don't have a callback and the current - // store is capable of loading synchronously - // then do so. - // - if (!callback) { - mergeSources(loadBatch(sourceHierarchy)); - return loadBatch(getStores()); - } - - loadBatch(sourceHierarchy, function (err, data) { - if (err) { - return callback(err); - } - - mergeSources(data); - return loadBatch(getStores(), callback); - }); - } - - return self.sources.length - ? loadSources() - : loadBatch(getStores(), callback); -}; - -// -// ### function save (callback) -// #### @callback {function} **optional** Continuation to respond to when -// complete. -// Instructs each provider to save. If a callback is provided, we will attempt -// asynchronous saves on the providers, falling back to synchronous saves if -// this isn't possible. If a provider does not know how to save, it will be -// ignored. Returns an object consisting of all of the data which was -// actually saved. -// -Provider.prototype.save = function (value, callback) { - if (!callback && typeof value === 'function') { - callback = value; - value = null; - } - - var self = this, - names = Object.keys(this.stores); - - function saveStoreSync(memo, name) { - var store = self.stores[name]; - - // - // If the `store` doesn't have a `saveSync` method, - // just ignore it and continue. - // - if (store.saveSync) { - var ret = store.saveSync(); - if (typeof ret == 'object' && ret !== null) { - memo.push(ret); - } - } - return memo; - } - - function saveStore(memo, name, next) { - var store = self.stores[name]; - - // - // If the `store` doesn't have a `save` or saveSync` - // method(s), just ignore it and continue. - // - - if (store.save) { - return store.save(value, function (err, data) { - if (err) { - return next(err); - } - - if (typeof data == 'object' && data !== null) { - memo.push(data); - } - - next(null, memo); - }); - } - else if (store.saveSync) { - memo.push(store.saveSync()); - } - - next(null, memo); - } - - // - // If we don't have a callback and the current - // store is capable of saving synchronously - // then do so. - // - if (!callback) { - return common.merge(names.reduce(saveStoreSync, [])); - } - - async.reduce(names, [], saveStore, function (err, objs) { - return err ? callback(err) : callback(null, common.merge(objs)); - }); -}; - -// -// ### @private function _execute (action, syncLength, [arguments]) -// #### @action {string} Action to execute on `this.store`. -// #### @syncLength {number} Function length of the sync version. -// #### @arguments {Array} Arguments array to apply to the action -// Executes the specified `action` on all stores for this instance, ensuring a callback supplied -// to a synchronous store function is still invoked. -// -Provider.prototype._execute = function (action, syncLength /* [arguments] */) { - var args = Array.prototype.slice.call(arguments, 2), - callback = typeof args[args.length - 1] === 'function' && args.pop(), - destructive = ['set', 'clear', 'merge', 'reset'].indexOf(action) !== -1, - self = this, - response, - mergeObjs = [], - keys = Object.keys(this.stores); - - - function runAction (name, next) { - var store = self.stores[name]; - - if (destructive && store.readOnly) { - return next(); - } - - return store[action].length > syncLength - ? store[action].apply(store, args.concat(next)) - : next(null, store[action].apply(store, args)); - } - - if (callback) { - return async.forEach(keys, runAction, function (err) { - return err ? callback(err) : callback(); - }); - } - - keys.forEach(function (name) { - if (typeof response === 'undefined') { - var store = self.stores[name]; - - if (destructive && store.readOnly) { - return; - } - - response = store[action].apply(store, args); - - // Merge objects if necessary - if (response && action === 'get' && typeof response === 'object' && !Array.isArray(response)) { - mergeObjs.push(response); - response = undefined; - } - } - }); - - if (mergeObjs.length) { - response = common.merge(mergeObjs.reverse()); - } - - return response; -} - -// -// Throw the `err` if a callback is not supplied -// -function onError(err, callback) { - if (callback) { - return callback(err); - } - - throw err; -} - - -/***/ }), - -/***/ 9701: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/* - * argv.js: Simple memory-based store for command-line arguments. - * - * (C) 2011, Charlie Robbins and the Contributors. - * - */ - -var util = __nccwpck_require__(9023), - common = __nccwpck_require__(5951), - Memory = (__nccwpck_require__(4996)/* .Memory */ .c); - -// -// ### function Argv (options) -// #### @options {Object} Options for this instance. -// Constructor function for the Argv nconf store, a simple abstraction -// around the Memory store that can read command-line arguments. -// -var Argv = exports.f = function (options, usage) { - Memory.call(this, options); - - options = options || {}; - this.type = 'argv'; - this.readOnly = true; - this.options = options; - this.usage = usage; - if(typeof options.parseValues === 'boolean') { - this.parseValues = options.parseValues; - delete options.parseValues; - } else { - this.parseValues = false; - } - if (typeof options.transform === 'function') { - this.transform = options.transform; - delete options.transform; - } else { - this.transform = false; - } - if (typeof options.separator === 'string' || options.separator instanceof RegExp) { - this.separator = options.separator; - delete options.separator; - } else { - this.separator = ''; - } -}; - -// Inherit from the Memory store -util.inherits(Argv, Memory); - -// -// ### function loadSync () -// Loads the data passed in from `process.argv` into this instance. -// -Argv.prototype.loadSync = function () { - this.loadArgv(); - return this.store; -}; - -// -// ### function loadArgv () -// Loads the data passed in from the command-line arguments -// into this instance. -// -Argv.prototype.loadArgv = function () { - var self = this, - yargs, argv; - - yargs = isYargs(this.options) ? - this.options : - typeof this.options === 'object' ? - __nccwpck_require__(5151)(process.argv.slice(2)).options(this.options) : - __nccwpck_require__(5151)(process.argv.slice(2)); - - if (typeof this.usage === 'string') { yargs.usage(this.usage) } - - argv = yargs.argv - - if (!argv) { - return; - } - - if (this.transform) { - argv = common.transform(argv, this.transform); - } - - this.readOnly = false; - Object.keys(argv).forEach(function (key) { - var val = argv[key]; - - if (typeof val !== 'undefined') { - if (self.parseValues) { - val = common.parseValues(val); - } - - if (self.separator) { - self.set(common.key.apply(common, key.split(self.separator)), val); - } - else { - self.set(key, val); - } - } - }); - - this.showHelp = yargs.showHelp - this.help = yargs.help - - this.readOnly = true; - return this.store; -}; - -function isYargs(obj) { - return (typeof obj === 'function' || typeof obj === 'object') && ('argv' in obj); -} - - -/***/ }), - -/***/ 5064: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/* - * env.js: Simple memory-based store for environment variables - * - * (C) 2011, Charlie Robbins and the Contributors. - * - */ - -var util = __nccwpck_require__(9023), - common = __nccwpck_require__(5951), - Memory = (__nccwpck_require__(4996)/* .Memory */ .c); - -// -// ### function Env (options) -// #### @options {Object} Options for this instance. -// Constructor function for the Env nconf store, a simple abstraction -// around the Memory store that can read process environment variables. -// -var Env = exports.o = function (options) { - Memory.call(this, options); - - options = options || {}; - this.type = 'env'; - this.readOnly = true; - this.whitelist = options.whitelist || []; - this.separator = options.separator || ''; - this.lowerCase = options.lowerCase || false; - this.parseValues = options.parseValues || false; - this.transform = options.transform || false; - - if (({}).toString.call(options.match) === '[object RegExp]' - && typeof options !== 'string') { - this.match = options.match; - } - - if (options instanceof Array) { - this.whitelist = options; - } - if (typeof(options) === 'string' || options instanceof RegExp) { - this.separator = options; - } -}; - -// Inherit from the Memory store -util.inherits(Env, Memory); - -// -// ### function loadSync () -// Loads the data passed in from `process.env` into this instance. -// -Env.prototype.loadSync = function () { - this.loadEnv(); - return this.store; -}; - -// -// ### function loadEnv () -// Loads the data passed in from `process.env` into this instance. -// -Env.prototype.loadEnv = function () { - var self = this; - - var env = process.env; - - if (this.lowerCase) { - env = {}; - Object.keys(process.env).forEach(function (key) { - env[key.toLowerCase()] = process.env[key]; - }); - } - - if (this.transform) { - env = common.transform(env, this.transform); - } - - this.readOnly = false; - Object.keys(env).filter(function (key) { - if (self.match && self.whitelist.length) { - return key.match(self.match) || self.whitelist.indexOf(key) !== -1 - } - else if (self.match) { - return key.match(self.match); - } - else { - return !self.whitelist.length || self.whitelist.indexOf(key) !== -1 - } - }).forEach(function (key) { - - var val = env[key]; - - if (self.parseValues) { - val = common.parseValues(val); - } - - if (self.separator) { - self.set(common.key.apply(common, key.split(self.separator)), val); - } - else { - self.set(key, val); - } - }); - - this.readOnly = true; - return this.store; -}; - - - -/***/ }), - -/***/ 3757: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/* - * file.js: Simple file storage engine for nconf files - * - * (C) 2011, Charlie Robbins and the Contributors. - * - */ - -var fs = __nccwpck_require__(9896), - path = __nccwpck_require__(6928), - util = __nccwpck_require__(9023), - Secure = __nccwpck_require__(3796), - formats = __nccwpck_require__(1948), - Memory = (__nccwpck_require__(4996)/* .Memory */ .c); - -var exists = fs.exists || path.exists, - existsSync = fs.existsSync || path.existsSync; - -// -// ### function File (options) -// #### @options {Object} Options for this instance -// Constructor function for the File nconf store, a simple abstraction -// around the Memory store that can persist configuration to disk. -// -var File = exports.Z = function (options) { - if (!options || !options.file) { - throw new Error('Missing required option `file`'); - } - - Memory.call(this, options); - - this.type = 'file'; - this.file = options.file; - this.dir = options.dir || process.cwd(); - this.format = options.format || formats.json; - this.secure = options.secure; - this.spacing = options.json_spacing - || options.spacing - || 2; - - if (this.secure) { - this.secure = Buffer.isBuffer(this.secure) || typeof this.secure === 'string' - ? { secret: this.secure.toString() } - : this.secure; - - this.secure.alg = this.secure.alg || 'aes-256-ctr'; - if (this.secure.secretPath) { - this.secure.secret = fs.readFileSync(this.secure.secretPath, 'utf8'); - } - - if (!this.secure.secret) { - throw new Error('secure.secret option is required'); - } - - this.keys = new Secure({ - secret: this.secure.secret, - alg: this.secure.alg, - format: this.format - }); - } - - if (options.search) { - this.search(this.dir); - } -}; - -// Inherit from the Memory store -util.inherits(File, Memory); - -// -// ### function save (value, callback) -// #### @value {Object} _Ignored_ Left here for consistency -// #### @callback {function} Continuation to respond to when complete. -// Saves the current configuration object to disk at `this.file` -// using the format specified by `this.format`. -// -File.prototype.save = function (value, callback) { - this.saveToFile(this.file, value, callback); -}; - -// -// ### function saveToFile (path, value, callback) -// #### @path {string} The path to the file where we save the configuration to -// #### @format {Object} Optional formatter, default behing the one of the store -// #### @callback {function} Continuation to respond to when complete. -// Saves the current configuration object to disk at `this.file` -// using the format specified by `this.format`. -// -File.prototype.saveToFile = function (path, format, callback) { - if (!callback) { - callback = format; - format = this.format; - } - - fs.writeFile(path, this.stringify(format), callback); -}; - -// -// ### function saveSync (value, callback) -// Saves the current configuration object to disk at `this.file` -// using the format specified by `this.format` synchronously. -// -File.prototype.saveSync = function () { - fs.writeFileSync(this.file, this.stringify()); - return this.store; -}; - -// -// ### function load (callback) -// #### @callback {function} Continuation to respond to when complete. -// Responds with an Object representing all keys associated in this instance. -// -File.prototype.load = function (callback) { - var self = this; - - exists(self.file, function (exists) { - if (!exists) { - return callback(null, {}); - } - - // - // Else, the path exists, read it from disk - // - fs.readFile(self.file, function (err, data) { - if (err) { - return callback(err); - } - - try { - // Deals with string that include BOM - var stringData = data.toString(); - if (stringData.charAt(0) === '\uFEFF') { - stringData = stringData.substr(1); - } - - self.store = self.parse(stringData); - } - catch (ex) { - return callback(new Error("Error parsing your configuration file: [" + self.file + ']: ' + ex.message)); - } - - callback(null, self.store); - }); - }); -}; - -// -// ### function loadSync (callback) -// Attempts to load the data stored in `this.file` synchronously -// and responds appropriately. -// -File.prototype.loadSync = function () { - if (!existsSync(this.file)) { - this.store = {}; - return this.store; - } - - // - // Else, the path exists, read it from disk - // - try { - // Deals with file that include BOM - var fileData = fs.readFileSync(this.file, 'utf8'); - if (fileData.charAt(0) === '\uFEFF') { - fileData = fileData.substr(1); - } - - this.store = this.parse(fileData); - } - catch (ex) { - throw new Error("Error parsing your configuration file: [" + this.file + ']: ' + ex.message); - } - - return this.store; -}; - -// -// ### function stringify () -// Returns an encrypted version of the contents IIF -// `this.secure` is enabled -// -File.prototype.stringify = function (format) { - var data = this.store; - if (!format) { - format = this.format - } - - if (this.secure) { - data = this.keys.encrypt(data); - } - - return format.stringify(data, null, this.spacing); -}; - -// -// ### function parse (contents) -// Returns a decrypted version of the contents IFF -// `this.secure` is enabled. -// -File.prototype.parse = function (contents) { - var parsed = this.format.parse(contents); - - if (!this.secure) { - return parsed; - } - - return this.keys.decrypt(parsed); - -}; - - -// -// ### function search (base) -// #### @base {string} Base directory (or file) to begin searching for the target file. -// Attempts to find `this.file` by iteratively searching up the -// directory structure -// -File.prototype.search = function (base) { - var looking = true, - fullpath, - previous, - stats; - - base = base || process.cwd(); - - if (this.file[0] === '/') { - // - // If filename for this instance is a fully qualified path - // (i.e. it starts with a `'/'`) then check if it exists - // - try { - stats = fs.statSync(fs.realpathSync(this.file)); - if (stats.isFile()) { - fullpath = this.file; - looking = false; - } - } - catch (ex) { - // - // Ignore errors - // - } - } - - if (looking && base) { - // - // Attempt to stat the realpath located at `base` - // if the directory does not exist then return false. - // - try { - var stat = fs.statSync(fs.realpathSync(base)); - looking = stat.isDirectory(); - } - catch (ex) { - return false; - } - } - - while (looking) { - // - // Iteratively look up the directory structure from `base` - // - try { - stats = fs.statSync(fs.realpathSync(fullpath = path.join(base, this.file))); - looking = stats.isDirectory(); - } - catch (ex) { - previous = base; - base = path.dirname(base); - - if (previous === base) { - // - // If we've reached the top of the directory structure then simply use - // the default file path. - // - try { - stats = fs.statSync(fs.realpathSync(fullpath = path.join(this.dir, this.file))); - if (stats.isDirectory()) { - fullpath = undefined; - } - } - catch (ex) { - // - // Ignore errors - // - } - - looking = false; - } - } - } - - // - // Set the file for this instance to the fullpath - // that we have found during the search. In the event that - // the search was unsuccessful use the original value for `this.file`. - // - this.file = fullpath || this.file; - - return fullpath; -}; - - -/***/ }), - -/***/ 536: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/* - * literal.js: Simple literal Object store for nconf. - * - * (C) 2011, Charlie Robbins and the Contributors. - * - */ - -var util = __nccwpck_require__(9023), - Memory = (__nccwpck_require__(4996)/* .Memory */ .c) - -var Literal = exports.u = function Literal (options) { - Memory.call(this, options); - - options = options || {} - this.type = 'literal'; - this.readOnly = true; - this.store = options.store || options; -}; - -// Inherit from Memory store. -util.inherits(Literal, Memory); - -// -// ### function loadSync (callback) -// Returns the data stored in `this.store` synchronously. -// -Literal.prototype.loadSync = function () { - return this.store; -}; - -/***/ }), - -/***/ 4996: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/* - * memory.js: Simple memory storage engine for nconf configuration(s) - * - * (C) 2011, Charlie Robbins and the Contributors. - * - */ - -var common = __nccwpck_require__(5951); - -// -// ### function Memory (options) -// #### @options {Object} Options for this instance -// Constructor function for the Memory nconf store which maintains -// a nested json structure based on key delimiters `:`. -// -// e.g. `my:nested:key` ==> `{ my: { nested: { key: } } }` -// -var Memory = exports.c = function (options) { - options = options || {}; - this.type = 'memory'; - this.store = {}; - this.mtimes = {}; - this.readOnly = false; - this.loadFrom = options.loadFrom || null; - this.logicalSeparator = options.logicalSeparator || ':'; - this.parseValues = options.parseValues || false; - - if (this.loadFrom) { - this.store = common.loadFilesSync(this.loadFrom); - } -}; - -// -// ### function get (key) -// #### @key {string} Key to retrieve for this instance. -// Retrieves the value for the specified key (if any). -// -Memory.prototype.get = function (key) { - var target = this.store, - path = common.path(key, this.logicalSeparator); - - // - // Scope into the object to get the appropriate nested context - // - while (path.length > 0) { - key = path.shift(); - if (target && typeof target !== 'string' && Object.hasOwnProperty.call(target, key)) { - target = target[key]; - continue; - } - return undefined; - } - - return target; -}; - -// -// ### function set (key, value) -// #### @key {string} Key to set in this instance -// #### @value {literal|Object} Value for the specified key -// Sets the `value` for the specified `key` in this instance. -// -Memory.prototype.set = function (key, value) { - if (this.readOnly) { - return false; - } - - var target = this.store, - path = common.path(key, this.logicalSeparator); - - if (path.length === 0) { - // - // Root must be an object - // - if (!value || typeof value !== 'object') { - return false; - } - else { - this.reset(); - this.store = value; - return true; - } - } - - // - // Update the `mtime` (modified time) of the key - // - this.mtimes[key] = Date.now(); - - // - // Scope into the object to get the appropriate nested context - // - while (path.length > 1) { - key = path.shift(); - if (!target[key] || typeof target[key] !== 'object' || !Object.hasOwnProperty.call(target, key)) { - target[key] = {}; - } - - target = target[key]; - } - - // Set the specified value in the nested JSON structure - key = path.shift(); - if (this.parseValues) { - value = common.parseValues.call(common, value); - } - target[key] = value; - return true; -}; - -// -// ### function clear (key) -// #### @key {string} Key to remove from this instance -// Removes the value for the specified `key` from this instance. -// -Memory.prototype.clear = function (key) { - if (this.readOnly) { - return false; - } - - var target = this.store, - value = target, - path = common.path(key, this.logicalSeparator); - - // - // Remove the key from the set of `mtimes` (modified times) - // - delete this.mtimes[key]; - - // - // Scope into the object to get the appropriate nested context - // - for (var i = 0; i < path.length - 1; i++) { - key = path[i]; - value = target[key]; - if (typeof value !== 'function' && typeof value !== 'object') { - return false; - } - target = value; - } - - // Delete the key from the nested JSON structure - key = path[i]; - delete target[key]; - return true; -}; - -// -// ### function merge (key, value) -// #### @key {string} Key to merge the value into -// #### @value {literal|Object} Value to merge into the key -// Merges the properties in `value` into the existing object value -// at `key`. If the existing value `key` is not an Object, it will be -// completely overwritten. -// -Memory.prototype.merge = function (key, value) { - if (this.readOnly) { - return false; - } - - // - // If the key is not an `Object` or is an `Array`, - // then simply set it. Merging is for Objects. - // - if (typeof value !== 'object' || Array.isArray(value) || value === null) { - return this.set(key, value); - } - - var self = this, - target = this.store, - path = common.path(key, this.logicalSeparator), - fullKey = key; - - // - // Update the `mtime` (modified time) of the key - // - this.mtimes[key] = Date.now(); - - // - // Scope into the object to get the appropriate nested context - // - while (path.length > 1) { - key = path.shift(); - if (!target[key]) { - target[key] = {}; - } - - target = target[key]; - } - - // Set the specified value in the nested JSON structure - key = path.shift(); - - // - // If the current value at the key target is not an `Object`, - // or is an `Array` then simply override it because the new value - // is an Object. - // - if (typeof target[key] !== 'object' || Array.isArray(target[key])) { - target[key] = value; - return true; - } - - return Object.keys(value).every(function (nested) { - return self.merge(common.keyed(self.logicalSeparator, fullKey, nested), value[nested]); - }); -}; - -// -// ### function reset (callback) -// Clears all keys associated with this instance. -// -Memory.prototype.reset = function () { - if (this.readOnly) { - return false; - } - - this.mtimes = {}; - this.store = {}; - return true; -}; - -// -// ### function loadSync -// Returns the store managed by this instance -// -Memory.prototype.loadSync = function () { - return this.store || {}; -}; - - -/***/ }), - -/***/ 13: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var fs = __nccwpck_require__(9896), - join = (__nccwpck_require__(6928).join), - resolve = (__nccwpck_require__(6928).resolve), - dirname = (__nccwpck_require__(6928).dirname), - defaultOptions = { - extensions: ['js', 'json', 'coffee'], - recurse: true, - rename: function (name) { - return name; - }, - visit: function (obj) { - return obj; - } - }; - -function checkFileInclusion(path, filename, options) { - return ( - // verify file has valid extension - (new RegExp('\\.(' + options.extensions.join('|') + ')$', 'i').test(filename)) && - - // if options.include is a RegExp, evaluate it and make sure the path passes - !(options.include && options.include instanceof RegExp && !options.include.test(path)) && - - // if options.include is a function, evaluate it and make sure the path passes - !(options.include && typeof options.include === 'function' && !options.include(path, filename)) && - - // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass - !(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path)) && - - // if options.exclude is a function, evaluate it and make sure the path doesn't pass - !(options.exclude && typeof options.exclude === 'function' && options.exclude(path, filename)) - ); -} - -function requireDirectory(m, path, options) { - var retval = {}; - - // path is optional - if (path && !options && typeof path !== 'string') { - options = path; - path = null; - } - - // default options - options = options || {}; - for (var prop in defaultOptions) { - if (typeof options[prop] === 'undefined') { - options[prop] = defaultOptions[prop]; - } - } - - // if no path was passed in, assume the equivelant of __dirname from caller - // otherwise, resolve path relative to the equivalent of __dirname - path = !path ? dirname(m.filename) : resolve(dirname(m.filename), path); - - // get the path of each file in specified directory, append to current tree node, recurse - fs.readdirSync(path).forEach(function (filename) { - var joined = join(path, filename), - files, - key, - obj; - - if (fs.statSync(joined).isDirectory() && options.recurse) { - // this node is a directory; recurse - files = requireDirectory(m, joined, options); - // exclude empty directories - if (Object.keys(files).length) { - retval[options.rename(filename, joined, filename)] = files; - } - } else { - if (joined !== m.filename && checkFileInclusion(joined, filename, options)) { - // hash node key shouldn't include file extension - key = filename.substring(0, filename.lastIndexOf('.')); - obj = m.require(joined); - retval[options.rename(key, joined, filename)] = options.visit(obj, joined, filename) || obj; - } - } - }); - - return retval; -} - -module.exports = requireDirectory; -module.exports.defaults = defaultOptions; - - -/***/ }), - -/***/ 7468: -/***/ ((module) => { - -"use strict"; - -module.exports = rfdc - -function copyBuffer (cur) { - if (cur instanceof Buffer) { - return Buffer.from(cur) - } - - return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length) -} - -function rfdc (opts) { - opts = opts || {} - - if (opts.circles) return rfdcCircles(opts) - return opts.proto ? cloneProto : clone - - function cloneArray (a, fn) { - var keys = Object.keys(a) - var a2 = new Array(keys.length) - for (var i = 0; i < keys.length; i++) { - var k = keys[i] - var cur = a[k] - if (typeof cur !== 'object' || cur === null) { - a2[k] = cur - } else if (cur instanceof Date) { - a2[k] = new Date(cur) - } else if (ArrayBuffer.isView(cur)) { - a2[k] = copyBuffer(cur) - } else { - a2[k] = fn(cur) - } - } - return a2 - } - - function clone (o) { - if (typeof o !== 'object' || o === null) return o - if (o instanceof Date) return new Date(o) - if (Array.isArray(o)) return cloneArray(o, clone) - if (o instanceof Map) return new Map(cloneArray(Array.from(o), clone)) - if (o instanceof Set) return new Set(cloneArray(Array.from(o), clone)) - var o2 = {} - for (var k in o) { - if (Object.hasOwnProperty.call(o, k) === false) continue - var cur = o[k] - if (typeof cur !== 'object' || cur === null) { - o2[k] = cur - } else if (cur instanceof Date) { - o2[k] = new Date(cur) - } else if (cur instanceof Map) { - o2[k] = new Map(cloneArray(Array.from(cur), clone)) - } else if (cur instanceof Set) { - o2[k] = new Set(cloneArray(Array.from(cur), clone)) - } else if (ArrayBuffer.isView(cur)) { - o2[k] = copyBuffer(cur) - } else { - o2[k] = clone(cur) - } - } - return o2 - } - - function cloneProto (o) { - if (typeof o !== 'object' || o === null) return o - if (o instanceof Date) return new Date(o) - if (Array.isArray(o)) return cloneArray(o, cloneProto) - if (o instanceof Map) return new Map(cloneArray(Array.from(o), cloneProto)) - if (o instanceof Set) return new Set(cloneArray(Array.from(o), cloneProto)) - var o2 = {} - for (var k in o) { - var cur = o[k] - if (typeof cur !== 'object' || cur === null) { - o2[k] = cur - } else if (cur instanceof Date) { - o2[k] = new Date(cur) - } else if (cur instanceof Map) { - o2[k] = new Map(cloneArray(Array.from(cur), cloneProto)) - } else if (cur instanceof Set) { - o2[k] = new Set(cloneArray(Array.from(cur), cloneProto)) - } else if (ArrayBuffer.isView(cur)) { - o2[k] = copyBuffer(cur) - } else { - o2[k] = cloneProto(cur) - } - } - return o2 - } -} - -function rfdcCircles (opts) { - var refs = [] - var refsNew = [] - - return opts.proto ? cloneProto : clone - - function cloneArray (a, fn) { - var keys = Object.keys(a) - var a2 = new Array(keys.length) - for (var i = 0; i < keys.length; i++) { - var k = keys[i] - var cur = a[k] - if (typeof cur !== 'object' || cur === null) { - a2[k] = cur - } else if (cur instanceof Date) { - a2[k] = new Date(cur) - } else if (ArrayBuffer.isView(cur)) { - a2[k] = copyBuffer(cur) - } else { - var index = refs.indexOf(cur) - if (index !== -1) { - a2[k] = refsNew[index] - } else { - a2[k] = fn(cur) - } - } - } - return a2 - } - - function clone (o) { - if (typeof o !== 'object' || o === null) return o - if (o instanceof Date) return new Date(o) - if (Array.isArray(o)) return cloneArray(o, clone) - if (o instanceof Map) return new Map(cloneArray(Array.from(o), clone)) - if (o instanceof Set) return new Set(cloneArray(Array.from(o), clone)) - var o2 = {} - refs.push(o) - refsNew.push(o2) - for (var k in o) { - if (Object.hasOwnProperty.call(o, k) === false) continue - var cur = o[k] - if (typeof cur !== 'object' || cur === null) { - o2[k] = cur - } else if (cur instanceof Date) { - o2[k] = new Date(cur) - } else if (cur instanceof Map) { - o2[k] = new Map(cloneArray(Array.from(cur), clone)) - } else if (cur instanceof Set) { - o2[k] = new Set(cloneArray(Array.from(cur), clone)) - } else if (ArrayBuffer.isView(cur)) { - o2[k] = copyBuffer(cur) - } else { - var i = refs.indexOf(cur) - if (i !== -1) { - o2[k] = refsNew[i] - } else { - o2[k] = clone(cur) - } - } - } - refs.pop() - refsNew.pop() - return o2 - } - - function cloneProto (o) { - if (typeof o !== 'object' || o === null) return o - if (o instanceof Date) return new Date(o) - if (Array.isArray(o)) return cloneArray(o, cloneProto) - if (o instanceof Map) return new Map(cloneArray(Array.from(o), cloneProto)) - if (o instanceof Set) return new Set(cloneArray(Array.from(o), cloneProto)) - var o2 = {} - refs.push(o) - refsNew.push(o2) - for (var k in o) { - var cur = o[k] - if (typeof cur !== 'object' || cur === null) { - o2[k] = cur - } else if (cur instanceof Date) { - o2[k] = new Date(cur) - } else if (cur instanceof Map) { - o2[k] = new Map(cloneArray(Array.from(cur), cloneProto)) - } else if (cur instanceof Set) { - o2[k] = new Set(cloneArray(Array.from(cur), cloneProto)) - } else if (ArrayBuffer.isView(cur)) { - o2[k] = copyBuffer(cur) - } else { - var i = refs.indexOf(cur) - if (i !== -1) { - o2[k] = refsNew[i] - } else { - o2[k] = cloneProto(cur) - } - } - } - refs.pop() - refsNew.pop() - return o2 - } -} - - -/***/ }), - -/***/ 3796: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var crypto = __nccwpck_require__(6982); - -var json = { - stringify: function (obj, replacer, spacing) { - return JSON.stringify(obj, replacer || null, spacing || 2) - }, - parse: JSON.parse -}; - -module.exports = Secure; -/** - * @constructor - * Simple Object used to serialize and deserialize - */ -function Secure(opts) { - opts = opts || {}; - this.secret = typeof opts !== 'string' - ? opts.secret - : opts; - - this.format = opts.format || json; - this.alg = opts.alg || 'aes-256-ctr'; - - if (!this.secret) throw new Error('Secret is a required option'); -} - -Secure.prototype.encrypt = function encrypt(data, callback) { - var self = this; - - return Object.keys(data).reduce(function (acc, key) { - var value = self.format.stringify(data[key]); - acc[key] = { - alg: self.alg, - value: cipherConvert(value, { - alg: self.alg, - secret: self.secret, - encs: { input: 'utf8', output: 'hex' } - }) - }; - - return acc; - }, {}); - - }; - -Secure.prototype.decrypt = function decrypt(data, callback) { - var self = this; - - return Object.keys(data).reduce(function (acc, key) { - var decrypted = cipherConvert(data[key].value, { - alg: data[key].alg || self.alg, - secret: self.secret, - encs: { input: 'hex', output: 'utf8' } - }); - - acc[key] = self.format.parse(decrypted); - return acc; - }, {}); - - }; - -// -// ### function cipherConvert (contents, opts) -// Returns the result of the cipher operation -// on the contents contents. -// -function cipherConvert(contents, opts) { - var encs = opts.encs; - var cipher = crypto.createCipher(opts.alg, opts.secret); - return cipher.update(contents, encs.input, encs.output) - + cipher.final(encs.output); -} - - -/***/ }), - -/***/ 9547: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const RollingFileWriteStream = __nccwpck_require__(2140); - -// just to adapt the previous version -class DateRollingFileStream extends RollingFileWriteStream { - constructor(filename, pattern, options) { - if (pattern && typeof(pattern) === 'object') { - options = pattern; - pattern = null; - } - if (!options) { - options = {}; - } - if (!pattern) { - pattern = 'yyyy-MM-dd'; - } - options.pattern = pattern; - if (!options.numBackups && options.numBackups !== 0) { - if (!options.daysToKeep && options.daysToKeep !== 0) { - options.daysToKeep = 1; - } else { - process.emitWarning( - "options.daysToKeep is deprecated due to the confusion it causes when used " + - "together with file size rolling. Please use options.numBackups instead.", - "DeprecationWarning", "streamroller-DEP0001" - ); - } - options.numBackups = options.daysToKeep; - } else { - options.daysToKeep = options.numBackups; - } - super(filename, options); - this.mode = this.options.mode; - } - - get theStream() { - return this.currentFileStream; - } - -} - -module.exports = DateRollingFileStream; - - -/***/ }), - -/***/ 5583: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const RollingFileWriteStream = __nccwpck_require__(2140); - -// just to adapt the previous version -class RollingFileStream extends RollingFileWriteStream { - constructor(filename, size, backups, options) { - if (!options) { - options = {}; - } - if (size) { - options.maxSize = size; - } - if (!options.numBackups && options.numBackups !== 0) { - if (!backups && backups !== 0) { - backups = 1; - } - options.numBackups = backups; - } - super(filename, options); - this.backups = options.numBackups; - this.size = this.options.maxSize; - } - - get theStream() { - return this.currentFileStream; - } - -} - -module.exports = RollingFileStream; - - -/***/ }), - -/***/ 2140: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(2413)("streamroller:RollingFileWriteStream"); -const fs = __nccwpck_require__(6158); -const path = __nccwpck_require__(6928); -const os = __nccwpck_require__(857); -const newNow = __nccwpck_require__(3888); -const format = __nccwpck_require__(7164); -const { Writable } = __nccwpck_require__(2203); -const fileNameFormatter = __nccwpck_require__(3573); -const fileNameParser = __nccwpck_require__(6296); -const moveAndMaybeCompressFile = __nccwpck_require__(6614); - -const deleteFiles = fileNames => { - debug(`deleteFiles: files to delete: ${fileNames}`); - return Promise.all(fileNames.map(f => fs.unlink(f).catch((e) => { - debug(`deleteFiles: error when unlinking ${f}, ignoring. Error was ${e}`); - }))); -}; - -/** - * RollingFileWriteStream is mainly used when writing to a file rolling by date or size. - * RollingFileWriteStream inherits from stream.Writable - */ -class RollingFileWriteStream extends Writable { - /** - * Create a RollingFileWriteStream - * @constructor - * @param {string} filePath - The file path to write. - * @param {object} options - The extra options - * @param {number} options.numToKeep - The max numbers of files to keep. - * @param {number} options.maxSize - The maxSize one file can reach. Unit is Byte. - * This should be more than 1024. The default is 0. - * If not specified or 0, then no log rolling will happen. - * @param {string} options.mode - The mode of the files. The default is '0600'. Refer to stream.writable for more. - * @param {string} options.flags - The default is 'a'. Refer to stream.flags for more. - * @param {boolean} options.compress - Whether to compress backup files. - * @param {boolean} options.keepFileExt - Whether to keep the file extension. - * @param {string} options.pattern - The date string pattern in the file name. - * @param {boolean} options.alwaysIncludePattern - Whether to add date to the name of the first file. - */ - constructor(filePath, options) { - debug(`constructor: creating RollingFileWriteStream. path=${filePath}`); - if (typeof filePath !== "string" || filePath.length === 0) { - throw new Error(`Invalid filename: ${filePath}`); - } else if (filePath.endsWith(path.sep)) { - throw new Error(`Filename is a directory: ${filePath}`); - } else if (filePath.indexOf(`~${path.sep}`) === 0) { - // handle ~ expansion: https://github.com/nodejs/node/issues/684 - // exclude ~ and ~filename as these can be valid files - filePath = filePath.replace("~", os.homedir()); - } - super(options); - this.options = this._parseOption(options); - this.fileObject = path.parse(filePath); - if (this.fileObject.dir === "") { - this.fileObject = path.parse(path.join(process.cwd(), filePath)); - } - this.fileFormatter = fileNameFormatter({ - file: this.fileObject, - alwaysIncludeDate: this.options.alwaysIncludePattern, - needsIndex: this.options.maxSize < Number.MAX_SAFE_INTEGER, - compress: this.options.compress, - keepFileExt: this.options.keepFileExt, - fileNameSep: this.options.fileNameSep - }); - - this.fileNameParser = fileNameParser({ - file: this.fileObject, - keepFileExt: this.options.keepFileExt, - pattern: this.options.pattern, - fileNameSep: this.options.fileNameSep - }); - - this.state = { - currentSize: 0 - }; - - if (this.options.pattern) { - this.state.currentDate = format(this.options.pattern, newNow()); - } - - this.filename = this.fileFormatter({ - index: 0, - date: this.state.currentDate - }); - if (["a", "a+", "as", "as+"].includes(this.options.flags)) { - this._setExistingSizeAndDate(); - } - - debug( - `constructor: create new file ${this.filename}, state=${JSON.stringify( - this.state - )}` - ); - this._renewWriteStream(); - } - - _setExistingSizeAndDate() { - try { - const stats = fs.statSync(this.filename); - this.state.currentSize = stats.size; - if (this.options.pattern) { - this.state.currentDate = format(this.options.pattern, stats.mtime); - } - } catch (e) { - //file does not exist, that's fine - move along - return; - } - } - - _parseOption(rawOptions) { - const defaultOptions = { - maxSize: 0, - numToKeep: Number.MAX_SAFE_INTEGER, - encoding: "utf8", - mode: parseInt("0600", 8), - flags: "a", - compress: false, - keepFileExt: false, - alwaysIncludePattern: false - }; - const options = Object.assign({}, defaultOptions, rawOptions); - if (!options.maxSize) { - delete options.maxSize; - } else if (options.maxSize <= 0) { - throw new Error(`options.maxSize (${options.maxSize}) should be > 0`); - } - // options.numBackups will supercede options.numToKeep - if (options.numBackups || options.numBackups === 0) { - if (options.numBackups < 0) { - throw new Error(`options.numBackups (${options.numBackups}) should be >= 0`); - } else if (options.numBackups >= Number.MAX_SAFE_INTEGER) { - // to cater for numToKeep (include the hot file) at Number.MAX_SAFE_INTEGER - throw new Error(`options.numBackups (${options.numBackups}) should be < Number.MAX_SAFE_INTEGER`); - } else { - options.numToKeep = options.numBackups + 1; - } - } else if (options.numToKeep <= 0) { - throw new Error(`options.numToKeep (${options.numToKeep}) should be > 0`); - } - debug( - `_parseOption: creating stream with option=${JSON.stringify(options)}` - ); - return options; - } - - _final(callback) { - this.currentFileStream.end("", this.options.encoding, callback); - } - - _write(chunk, encoding, callback) { - this._shouldRoll().then(() => { - debug( - `_write: writing chunk. ` + - `file=${this.currentFileStream.path} ` + - `state=${JSON.stringify(this.state)} ` + - `chunk=${chunk}` - ); - this.currentFileStream.write(chunk, encoding, e => { - this.state.currentSize += chunk.length; - callback(e); - }); - }); - } - - async _shouldRoll() { - if (this._dateChanged() || this._tooBig()) { - debug( - `_shouldRoll: rolling because dateChanged? ${this._dateChanged()} or tooBig? ${this._tooBig()}` - ); - await this._roll(); - } - } - - _dateChanged() { - return ( - this.state.currentDate && - this.state.currentDate !== format(this.options.pattern, newNow()) - ); - } - - _tooBig() { - return this.state.currentSize >= this.options.maxSize; - } - - _roll() { - debug(`_roll: closing the current stream`); - return new Promise((resolve, reject) => { - this.currentFileStream.end("", this.options.encoding, () => { - this._moveOldFiles() - .then(resolve) - .catch(reject); - }); - }); - } - - async _moveOldFiles() { - const files = await this._getExistingFiles(); - const todaysFiles = this.state.currentDate - ? files.filter(f => f.date === this.state.currentDate) - : files; - for (let i = todaysFiles.length; i >= 0; i--) { - debug(`_moveOldFiles: i = ${i}`); - const sourceFilePath = this.fileFormatter({ - date: this.state.currentDate, - index: i - }); - const targetFilePath = this.fileFormatter({ - date: this.state.currentDate, - index: i + 1 - }); - - const moveAndCompressOptions = { - compress: this.options.compress && i === 0, - mode: this.options.mode - }; - await moveAndMaybeCompressFile( - sourceFilePath, - targetFilePath, - moveAndCompressOptions - ); - } - - this.state.currentSize = 0; - this.state.currentDate = this.state.currentDate - ? format(this.options.pattern, newNow()) - : null; - debug( - `_moveOldFiles: finished rolling files. state=${JSON.stringify( - this.state - )}` - ); - this._renewWriteStream(); - // wait for the file to be open before cleaning up old ones, - // otherwise the daysToKeep calculations can be off - await new Promise((resolve, reject) => { - this.currentFileStream.write("", "utf8", () => { - this._clean() - .then(resolve) - .catch(reject); - }); - }); - } - - // Sorted from the oldest to the latest - async _getExistingFiles() { - const files = await fs.readdir(this.fileObject.dir) - .catch( /* istanbul ignore next: will not happen on windows */ () => []); - - debug(`_getExistingFiles: files=${files}`); - const existingFileDetails = files - .map(n => this.fileNameParser(n)) - .filter(n => n); - - const getKey = n => - (n.timestamp ? n.timestamp : newNow().getTime()) - n.index; - existingFileDetails.sort((a, b) => getKey(a) - getKey(b)); - - return existingFileDetails; - } - - _renewWriteStream() { - const filePath = this.fileFormatter({ - date: this.state.currentDate, - index: 0 - }); - - // attempt to create the directory - const mkdir = (dir) => { - try { - return fs.mkdirSync(dir, { recursive: true }); - } - // backward-compatible fs.mkdirSync for nodejs pre-10.12.0 (without recursive option) - catch (e) { - // recursive creation of parent first - if (e.code === "ENOENT") { - mkdir(path.dirname(dir)); - return mkdir(dir); - } - - // throw error for all except EEXIST and EROFS (read-only filesystem) - if (e.code !== "EEXIST" && e.code !== "EROFS") { - throw e; - } - - // EEXIST: throw if file and not directory - // EROFS : throw if directory not found - else { - try { - if (fs.statSync(dir).isDirectory()) { - return dir; - } - throw e; - } catch (err) { - throw e; - } - } - } - }; - mkdir(this.fileObject.dir); - - const ops = { - flags: this.options.flags, - encoding: this.options.encoding, - mode: this.options.mode - }; - const renameKey = function(obj, oldKey, newKey) { - obj[newKey] = obj[oldKey]; - delete obj[oldKey]; - return obj; - }; - // try to throw EISDIR, EROFS, EACCES - fs.appendFileSync(filePath, "", renameKey({ ...ops }, "flags", "flag")); - this.currentFileStream = fs.createWriteStream(filePath, ops); - this.currentFileStream.on("error", e => { - this.emit("error", e); - }); - } - - async _clean() { - const existingFileDetails = await this._getExistingFiles(); - debug( - `_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${existingFileDetails.length}` - ); - debug("_clean: existing files are: ", existingFileDetails); - if (this._tooManyFiles(existingFileDetails.length)) { - const fileNamesToRemove = existingFileDetails - .slice(0, existingFileDetails.length - this.options.numToKeep) - .map(f => path.format({ dir: this.fileObject.dir, base: f.filename })); - await deleteFiles(fileNamesToRemove); - } - } - - _tooManyFiles(numFiles) { - return this.options.numToKeep > 0 && numFiles > this.options.numToKeep; - } -} - -module.exports = RollingFileWriteStream; - - -/***/ }), - -/***/ 3573: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(2413)("streamroller:fileNameFormatter"); -const path = __nccwpck_require__(6928); -const ZIP_EXT = ".gz"; -const DEFAULT_FILENAME_SEP = "."; - -module.exports = ({ - file, - keepFileExt, - needsIndex, - alwaysIncludeDate, - compress, - fileNameSep -}) => { - let FILENAME_SEP = fileNameSep || DEFAULT_FILENAME_SEP; - const dirAndName = path.join(file.dir, file.name); - - const ext = f => f + file.ext; - - const index = (f, i, d) => - (needsIndex || !d) && i ? f + FILENAME_SEP + i : f; - - const date = (f, i, d) => { - return (i > 0 || alwaysIncludeDate) && d ? f + FILENAME_SEP + d : f; - }; - - const gzip = (f, i) => (i && compress ? f + ZIP_EXT : f); - - const parts = keepFileExt - ? [date, index, ext, gzip] - : [ext, date, index, gzip]; - - return ({ date, index }) => { - debug(`_formatFileName: date=${date}, index=${index}`); - return parts.reduce( - (filename, part) => part(filename, index, date), - dirAndName - ); - }; -}; - - -/***/ }), - -/***/ 6296: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(2413)("streamroller:fileNameParser"); -const ZIP_EXT = ".gz"; -const format = __nccwpck_require__(7164); -const DEFAULT_FILENAME_SEP = "."; - -module.exports = ({ file, keepFileExt, pattern, fileNameSep }) => { - let FILENAME_SEP = fileNameSep || DEFAULT_FILENAME_SEP; - // All these functions take two arguments: f, the filename, and p, the result placeholder - // They return the filename with any matching parts removed. - // The "zip" function, for instance, removes the ".gz" part of the filename (if present) - const zip = (f, p) => { - if (f.endsWith(ZIP_EXT)) { - debug("it is gzipped"); - p.isCompressed = true; - return f.slice(0, -1 * ZIP_EXT.length); - } - return f; - }; - - const __NOT_MATCHING__ = "__NOT_MATCHING__"; - - const extAtEnd = f => { - if (f.startsWith(file.name) && f.endsWith(file.ext)) { - debug("it starts and ends with the right things"); - return f.slice(file.name.length + 1, -1 * file.ext.length); - } - return __NOT_MATCHING__; - }; - - const extInMiddle = f => { - if (f.startsWith(file.base)) { - debug("it starts with the right things"); - return f.slice(file.base.length + 1); - } - return __NOT_MATCHING__; - }; - - const dateAndIndex = (f, p) => { - const items = f.split(FILENAME_SEP); - let indexStr = items[items.length - 1]; - debug("items: ", items, ", indexStr: ", indexStr); - let dateStr = f; - if (indexStr !== undefined && indexStr.match(/^\d+$/)) { - dateStr = f.slice(0, -1 * (indexStr.length + 1)); - debug(`dateStr is ${dateStr}`); - if (pattern && !dateStr) { - dateStr = indexStr; - indexStr = "0"; - } - } else { - indexStr = "0"; - } - - try { - // Two arguments for new Date() are intentional. This will set other date - // components to minimal values in the current timezone instead of UTC, - // as new Date(0) will do. - const date = format.parse(pattern, dateStr, new Date(0, 0)); - if (format.asString(pattern, date) !== dateStr) return f; - p.index = parseInt(indexStr, 10); - p.date = dateStr; - p.timestamp = date.getTime(); - return ""; - } catch (e) { - //not a valid date, don't panic. - debug(`Problem parsing ${dateStr} as ${pattern}, error was: `, e); - return f; - } - }; - - const index = (f, p) => { - if (f.match(/^\d+$/)) { - debug("it has an index"); - p.index = parseInt(f, 10); - return ""; - } - return f; - }; - - let parts = [ - zip, - keepFileExt ? extAtEnd : extInMiddle, - pattern ? dateAndIndex : index - ]; - - return filename => { - let result = { filename, index: 0, isCompressed: false }; - // pass the filename through each of the file part parsers - let whatsLeftOver = parts.reduce( - (remains, part) => part(remains, result), - filename - ); - // if there's anything left after parsing, then it wasn't a valid filename - return whatsLeftOver ? null : result; - }; -}; - - -/***/ }), - -/***/ 9404: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = { - RollingFileWriteStream: __nccwpck_require__(2140), - RollingFileStream: __nccwpck_require__(5583), - DateRollingFileStream: __nccwpck_require__(9547) -}; - - -/***/ }), - -/***/ 6614: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(2413)('streamroller:moveAndMaybeCompressFile'); -const fs = __nccwpck_require__(6158); -const zlib = __nccwpck_require__(3106); - -const _parseOption = function(rawOptions){ - const defaultOptions = { - mode: parseInt("0600", 8), - compress: false, - }; - const options = Object.assign({}, defaultOptions, rawOptions); - debug(`_parseOption: moveAndMaybeCompressFile called with option=${JSON.stringify(options)}`); - return options; -}; - -const moveAndMaybeCompressFile = async ( - sourceFilePath, - targetFilePath, - options -) => { - options = _parseOption(options); - - if (sourceFilePath === targetFilePath) { - debug(`moveAndMaybeCompressFile: source and target are the same, not doing anything`); - return; - } - - if (await fs.pathExists(sourceFilePath)) { - debug( - `moveAndMaybeCompressFile: moving file from ${sourceFilePath} to ${targetFilePath} ${ - options.compress ? "with" : "without" - } compress` - ); - if (options.compress) { - await new Promise((resolve, reject) => { - let isCreated = false; - // to avoid concurrency, the forked process which can create the file will proceed (using flags wx) - const writeStream = fs.createWriteStream(targetFilePath, { mode: options.mode, flags: "wx" }) - // wait until writable stream is valid before proceeding to read - .on("open", () => { - isCreated = true; - const readStream = fs.createReadStream(sourceFilePath) - // wait until readable stream is valid before piping - .on("open", () => { - readStream.pipe(zlib.createGzip()).pipe(writeStream); - }) - .on("error", (e) => { - debug(`moveAndMaybeCompressFile: error reading ${sourceFilePath}`, e); - // manually close writable: https://nodejs.org/api/stream.html#readablepipedestination-options - writeStream.destroy(e); - }); - }) - .on("finish", () => { - debug(`moveAndMaybeCompressFile: finished compressing ${targetFilePath}, deleting ${sourceFilePath}`); - // delete sourceFilePath - fs.unlink(sourceFilePath) - .then(resolve) - .catch((e) => { - debug(`moveAndMaybeCompressFile: error deleting ${sourceFilePath}, truncating instead`, e); - // fallback to truncate - fs.truncate(sourceFilePath) - .then(resolve) - .catch((e) => { - debug(`moveAndMaybeCompressFile: error truncating ${sourceFilePath}`, e); - reject(e); - }); - }); - }) - .on("error", (e) => { - if (!isCreated) { - debug(`moveAndMaybeCompressFile: error creating ${targetFilePath}`, e); - // do not do anything if handled by another forked process - reject(e); - } else { - debug(`moveAndMaybeCompressFile: error writing ${targetFilePath}, deleting`, e); - // delete targetFilePath (taking as nothing happened) - fs.unlink(targetFilePath) - .then(() => { reject(e); }) - .catch((e) => { - debug(`moveAndMaybeCompressFile: error deleting ${targetFilePath}`, e); - reject(e); - }); - } - }); - }).catch(() => {}); - } else { - debug(`moveAndMaybeCompressFile: renaming ${sourceFilePath} to ${targetFilePath}`); - try { - await fs.move(sourceFilePath, targetFilePath, { overwrite: true }); - } catch (e) { - debug(`moveAndMaybeCompressFile: error renaming ${sourceFilePath} to ${targetFilePath}`, e); - /* istanbul ignore else: no need to do anything if file does not exist */ - if (e.code !== "ENOENT") { - debug(`moveAndMaybeCompressFile: trying copy+truncate instead`); - try { - await fs.copy(sourceFilePath, targetFilePath, { overwrite: true }); - await fs.truncate(sourceFilePath); - } catch (e) { - debug(`moveAndMaybeCompressFile: error copy+truncate`, e); - } - } - } - } - } -}; - -module.exports = moveAndMaybeCompressFile; - - -/***/ }), - -/***/ 3888: -/***/ ((module) => { - -// allows us to inject a mock date in tests -module.exports = () => new Date(); - - -/***/ }), - -/***/ 5078: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const stripAnsi = __nccwpck_require__(1988); -const isFullwidthCodePoint = __nccwpck_require__(5680); -const emojiRegex = __nccwpck_require__(4317); - -const stringWidth = string => { - if (typeof string !== 'string' || string.length === 0) { - return 0; - } - - string = stripAnsi(string); - - if (string.length === 0) { - return 0; - } - - string = string.replace(emojiRegex(), ' '); - - let width = 0; - - for (let i = 0; i < string.length; i++) { - const code = string.codePointAt(i); - - // Ignore control characters - if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { - continue; - } - - // Ignore combining characters - if (code >= 0x300 && code <= 0x36F) { - continue; - } - - // Surrogates - if (code > 0xFFFF) { - i++; - } - - width += isFullwidthCodePoint(code) ? 2 : 1; - } - - return width; -}; - -module.exports = stringWidth; -// TODO: remove this in the next major version -module.exports["default"] = stringWidth; - - -/***/ }), - -/***/ 1988: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const ansiRegex = __nccwpck_require__(4685); - -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; - - -/***/ }), - -/***/ 8946: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const os = __nccwpck_require__(857); -const tty = __nccwpck_require__(2018); -const hasFlag = __nccwpck_require__(2921); - -const {env} = process; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false') || - hasFlag('color=never')) { - forceColor = 0; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = 1; -} - -if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === 'true') { - forceColor = 1; - } else if (env.FORCE_COLOR === 'false') { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (haveStream && !streamIsTTY && forceColor === undefined) { - return 0; - } - - const min = forceColor || 0; - - if (env.TERM === 'dumb') { - return min; - } - - if (process.platform === 'win32') { - // Windows 10 build 10586 is the first Windows release that supports 256 colors. - // Windows 10 build 14931 is the first release that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream, stream && stream.isTTY); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) -}; - - -/***/ }), - -/***/ 9380: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -exports.S = function (fn) { - return Object.defineProperty(function () { - if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments) - else { - return new Promise((resolve, reject) => { - arguments[arguments.length] = (err, res) => { - if (err) return reject(err) - resolve(res) - } - arguments.length++ - fn.apply(this, arguments) - }) - } - }, 'name', { value: fn.name }) -} - -exports.z = function (fn) { - return Object.defineProperty(function () { - const cb = arguments[arguments.length - 1] - if (typeof cb !== 'function') return fn.apply(this, arguments) - else fn.apply(this, arguments).then(r => cb(null, r), cb) - }, 'name', { value: fn.name }) -} - - -/***/ }), - -/***/ 9666: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const stringWidth = __nccwpck_require__(5078); -const stripAnsi = __nccwpck_require__(1988); -const ansiStyles = __nccwpck_require__(3702); - -const ESCAPES = new Set([ - '\u001B', - '\u009B' -]); - -const END_CODE = 39; - -const ANSI_ESCAPE_BELL = '\u0007'; -const ANSI_CSI = '['; -const ANSI_OSC = ']'; -const ANSI_SGR_TERMINATOR = 'm'; -const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`; - -const wrapAnsi = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`; -const wrapAnsiHyperlink = uri => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`; - -// Calculate the length of words split on ' ', ignoring -// the extra characters added by ansi escape codes -const wordLengths = string => string.split(' ').map(character => stringWidth(character)); - -// Wrap a long word across multiple rows -// Ansi escape codes do not count towards length -const wrapWord = (rows, word, columns) => { - const characters = [...word]; - - let isInsideEscape = false; - let isInsideLinkEscape = false; - let visible = stringWidth(stripAnsi(rows[rows.length - 1])); - - for (const [index, character] of characters.entries()) { - const characterLength = stringWidth(character); - - if (visible + characterLength <= columns) { - rows[rows.length - 1] += character; - } else { - rows.push(character); - visible = 0; - } - - if (ESCAPES.has(character)) { - isInsideEscape = true; - isInsideLinkEscape = characters.slice(index + 1).join('').startsWith(ANSI_ESCAPE_LINK); - } - - if (isInsideEscape) { - if (isInsideLinkEscape) { - if (character === ANSI_ESCAPE_BELL) { - isInsideEscape = false; - isInsideLinkEscape = false; - } - } else if (character === ANSI_SGR_TERMINATOR) { - isInsideEscape = false; - } - - continue; - } - - visible += characterLength; - - if (visible === columns && index < characters.length - 1) { - rows.push(''); - visible = 0; - } - } - - // It's possible that the last row we copy over is only - // ansi escape characters, handle this edge-case - if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { - rows[rows.length - 2] += rows.pop(); - } -}; - -// Trims spaces from a string ignoring invisible sequences -const stringVisibleTrimSpacesRight = string => { - const words = string.split(' '); - let last = words.length; - - while (last > 0) { - if (stringWidth(words[last - 1]) > 0) { - break; - } - - last--; - } - - if (last === words.length) { - return string; - } - - return words.slice(0, last).join(' ') + words.slice(last).join(''); -}; - -// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode -// -// 'hard' will never allow a string to take up more than columns characters -// -// 'soft' allows long words to expand past the column length -const exec = (string, columns, options = {}) => { - if (options.trim !== false && string.trim() === '') { - return ''; - } - - let returnValue = ''; - let escapeCode; - let escapeUrl; - - const lengths = wordLengths(string); - let rows = ['']; - - for (const [index, word] of string.split(' ').entries()) { - if (options.trim !== false) { - rows[rows.length - 1] = rows[rows.length - 1].trimStart(); - } - - let rowLength = stringWidth(rows[rows.length - 1]); - - if (index !== 0) { - if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { - // If we start with a new word but the current row length equals the length of the columns, add a new row - rows.push(''); - rowLength = 0; - } - - if (rowLength > 0 || options.trim === false) { - rows[rows.length - 1] += ' '; - rowLength++; - } - } - - // In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns' - if (options.hard && lengths[index] > columns) { - const remainingColumns = (columns - rowLength); - const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); - const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); - if (breaksStartingNextLine < breaksStartingThisLine) { - rows.push(''); - } - - wrapWord(rows, word, columns); - continue; - } - - if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { - if (options.wordWrap === false && rowLength < columns) { - wrapWord(rows, word, columns); - continue; - } - - rows.push(''); - } - - if (rowLength + lengths[index] > columns && options.wordWrap === false) { - wrapWord(rows, word, columns); - continue; - } - - rows[rows.length - 1] += word; - } - - if (options.trim !== false) { - rows = rows.map(stringVisibleTrimSpacesRight); - } - - const pre = [...rows.join('\n')]; - - for (const [index, character] of pre.entries()) { - returnValue += character; - - if (ESCAPES.has(character)) { - const {groups} = new RegExp(`(?:\\${ANSI_CSI}(?\\d+)m|\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join('')) || {groups: {}}; - if (groups.code !== undefined) { - const code = Number.parseFloat(groups.code); - escapeCode = code === END_CODE ? undefined : code; - } else if (groups.uri !== undefined) { - escapeUrl = groups.uri.length === 0 ? undefined : groups.uri; - } - } - - const code = ansiStyles.codes.get(Number(escapeCode)); - - if (pre[index + 1] === '\n') { - if (escapeUrl) { - returnValue += wrapAnsiHyperlink(''); - } - - if (escapeCode && code) { - returnValue += wrapAnsi(code); - } - } else if (character === '\n') { - if (escapeCode && code) { - returnValue += wrapAnsi(escapeCode); - } - - if (escapeUrl) { - returnValue += wrapAnsiHyperlink(escapeUrl); - } - } - } - - return returnValue; -}; - -// For each newline, invoke the method separately -module.exports = (string, columns, options) => { - return String(string) - .normalize() - .replace(/\r\n/g, '\n') - .split('\n') - .map(line => exec(line, columns, options)) - .join('\n'); -}; - - -/***/ }), - -/***/ 5741: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Config = void 0; -const node_url_1 = __nccwpck_require__(3136); -const node_path_1 = __nccwpck_require__(6760); -const node_fs_1 = __nccwpck_require__(3024); -const node_os_1 = __nccwpck_require__(8161); -const nconf_1 = __importDefault(__nccwpck_require__(7771)); -class Config { - nconf = nconf_1.default; - _rootPath; - _devmode; - _appVersion; - _logLevel; - _dateFormat; - _logDateFormat; - _logFilePath; - _ipAddress; - _port; - _login; - _password; - _limitTime; - _settingsFilePath; - ratioEnabled = false; - ratioLimit = 2; - constructor(root_path) { - process.env.UV_THREADPOOL_SIZE = (0, node_os_1.cpus)().length.toString(); - this._rootPath = root_path ?? Config.getRootDir(); - this.init(); - this._login = this.getParam('login'); - this._password = this.getParam('password'); - this._devmode = this.getParam('node_env') === 'development'; - this._appVersion = this.getParam('version'); - this._logLevel = this._devmode ? 'trace' : this.getParam('log_level'); - this._dateFormat = this.getParam('date_format'); - this._logDateFormat = this.getParam('log_date_format'); - this._logFilePath = this.getParam('log_file_path'); - this._ipAddress = this.getParam('ip_address'); - this._port = Number(this.getParam('tcp_port')); - this._limitTime = Number(this.getParam('limit_time')); - this._settingsFilePath = this.getParam('settings_file_path'); - this.setRatio(); - this.check(); - } - get rootPath() { - return this._rootPath; - } - get devmode() { - return this._devmode; - } - get appVersion() { - return this._appVersion; - } - get logLevel() { - return this._logLevel; - } - get dateFormat() { - return this._dateFormat; - } - get logDateFormat() { - return this._logDateFormat; - } - get logFilePath() { - return this._logFilePath; - } - get ipAddress() { - return this._ipAddress; - } - get port() { - return this._port; - } - get login() { - return this._login; - } - get password() { - return this._password; - } - get limitTime() { - return this._limitTime; - } - get settingsFilePath() { - return this._settingsFilePath; - } - init() { - const configFile = (0, node_path_1.normalize)(`${this.rootPath}/config.json`); - this.nconf.env(); - this.nconf.file('config', configFile); - this.nconf.file('package', (0, node_path_1.normalize)(`${this.rootPath}/package.json`)); - this.nconf.defaults({ - node_env: 'production', - log_level: 'info', - log_file_path: '/var/log/transmission/torrentclear.log', - date_format: 'DD.MM.YYYY_HH:mm:ss', - log_date_format: 'dd.MM.yyyy_hh:mm:ss.SSS', - ip_address: '127.0.0.1', - tcp_port: '9091', - limit_time: '604800', - settings_file_path: '/etc/transmission-daemon/settings.json' - }); - this.nconf.load(); - this.settingsFileExists(); - const settingFile = (0, node_path_1.normalize)(this.getParam('settings_file_path')); - this.nconf.file('transmission', settingFile); - this.nconf.load(); - } - setRatio() { - this.ratioEnabled = Boolean(this.getParam('ratio-limit-enabled')); - if (this.ratioEnabled) - this.ratioLimit = Number(this.getParam('ratio-limit')); - } - check() { - const login = this.getParam('login'); - const password = this.getParam('password'); - if (login === undefined || login === '' || password === undefined || password === '') { - throw new Error('Login or password must be filled in config.json file or Environment'); - } - } - settingsFileExists() { - const settingsFilePath = (0, node_path_1.normalize)(this.getParam('settings_file_path')); - if (!(0, node_fs_1.existsSync)(settingsFilePath)) { - const relativeSettingsPath = (0, node_path_1.resolve)(settingsFilePath); - if (!(0, node_fs_1.existsSync)(relativeSettingsPath)) { - throw new Error(`Transmission settings file not found on path ${settingsFilePath}`); - } - } - } - static getRootDir() { - const filename = (0, node_url_1.fileURLToPath)((0, node_url_1.pathToFileURL)(__filename).toString()); - const dir = (0, node_path_1.dirname)(filename); - let currentDir = dir; - while (!(0, node_fs_1.existsSync)((0, node_path_1.join)(currentDir, 'package.json'))) { - currentDir = (0, node_path_1.join)(currentDir, '..'); - } - return (0, node_path_1.normalize)(currentDir); - } - getParam(param_name) { - let param = this.nconf.get(param_name); - if (param === undefined) - param = this.nconf.get(param_name.toUpperCase()); - return param; - } -} -exports.Config = Config; - - -/***/ }), - -/***/ 7773: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ServerLogger = void 0; -const log4js = __importStar(__nccwpck_require__(7914)); -const config_1 = __nccwpck_require__(5741); -class ServerLogger { - log4js; - _config; - _logger; - constructor(root_path) { - this.log4js = log4js; - this._config = new config_1.Config(root_path); - this.init(); - this._logger = this.log4js.getLogger(); - } - get logger() { - return this._logger; - } - get config() { - return this._config; - } - init() { - const configServerLogger = { - appenders: { - console: { - type: 'console', - layout: { - type: 'pattern', - pattern: `[%d{${this.config.logDateFormat}}] : %[[%p]%] : %m` - } - }, - logFile: { - type: 'file', - filename: this.config.logFilePath, - maxLogSize: '10M', - compress: true, - layout: { - type: 'pattern', - pattern: `[%d{${this.config.logDateFormat}}] : [%p] : %m` - } - } - }, - categories: { - default: { - appenders: this.config.devmode ? ['console'] : ['console', 'logFile'], - level: this.config.logLevel, - enableCallStack: this.config.devmode ? true : false - } - } - }; - this.log4js.configure(configServerLogger); - } -} -exports.ServerLogger = ServerLogger; - - -/***/ }), - -/***/ 7680: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Torrentclear = void 0; -const node_child_process_1 = __nccwpck_require__(1421); -const node_fs_1 = __nccwpck_require__(3024); -const node_path_1 = __nccwpck_require__(6760); -const moment_1 = __importDefault(__nccwpck_require__(4877)); -const config_1 = __nccwpck_require__(5741); -const server_logger_1 = __nccwpck_require__(7773); -class Torrentclear { - _config; - _logger; - _connect; - regexSuccess = /success/i; - regexTorrentInfo = /(?<=Name:\s)(.*?)(?=\s*Hash:)|(?<=State:\s)(.*?)(?=\s*Location:)|(?<=Location:\s)(.*?)(?=\s*Percent Done:)|(?<=Percent Done:\s)(.*?)%(?=\s*ETA:)|(?<=Ratio:\s)(.*?)(?=\s*Corrupt DL:)|(?<=Date finished:\s)(.*?)(?=\s*Date started:|$)/g; - fileOrDirsState = { FILE: 1, DIR: 2, NOTFOUND: 3, UNKNOWN: 4 }; - _torrentInfo; - _torrentSuccessCount = 0; - _torrentProcessCount = 0; - _torrentIDs = []; - constructor(root_path) { - this._config = new config_1.Config(root_path); - this._logger = new server_logger_1.ServerLogger(root_path).logger; - this._connect = this.connectCommandCreate(); - this._torrentInfo = { - id: 0, - name: '', - state: '', - location: '', - percent: 0, - ratio: 0, - dateDone: '', - dateDifference: 0 - }; - } - get connect() { - return this._connect; - } - get config() { - return this._config; - } - get logger() { - return this._logger; - } - get torrentInfo() { - return this._torrentInfo; - } - set torrentInfo(torrent_info) { - this._torrentInfo = torrent_info; - } - get torrentSuccessCount() { - return this._torrentSuccessCount; - } - set torrentSuccessCount(count) { - this._torrentSuccessCount = count; - } - get torrentProcessCount() { - return this._torrentProcessCount; - } - set torrentProcessCount(count) { - this._torrentProcessCount = count; - } - get torrentIDs() { - return this._torrentIDs; - } - async main() { - try { - this.startInfo(); - await this.getIDs(); - await this.torrentsProcess(); - this.endInfo(); - } - catch (error) { - this.logger.error(error.message); - this.endInfo(true); - } - } - startInfo() { - this.logger.info('##############################################################################################'); - this.logger.info(`transmission-torrentclear: "${this.config.appVersion}"`); - this.logger.info('=============================================================================================='); - } - endInfo(error_flag = false) { - this.logger.info('=============================================================================================='); - if (error_flag) - this.logger.error(`Failed to complete torrent verification process`); - else - this.logger.info(`Completing the torrent verification process`); - this.logger.info('##############################################################################################\n'); - } - async getIDs() { - try { - const command = `${this.connect} --list`; - this.logger.debug(`Run command: "${command}"`); - const execResult = await this.command(command); - const resultTorrentsList = execResult.toString().match(/^\s+(\d+)\s.*?$/gim); - if (resultTorrentsList === null || resultTorrentsList.length < 1) { - this.logger.info(`Torrents not found`); - return; - } - this.logger.debug(`Torrents list:`); - for (const torrentLine of resultTorrentsList) { - this.logger.debug(`torrent: "${torrentLine.trim()}"`); - const match = torrentLine.trim().match(/^(\d+).+$/i); - if (match !== null) { - const id = match[1]; - this.logger.debug(`ID found: "${id}"`); - this.torrentIDs.push(Number(id)); - } - } - if (this.torrentIDs.length > 0) - this.logger.info(`IDs found: ${this.torrentIDs.join(', ')}`); - this.torrentProcessCount = this.torrentIDs.length; - } - catch (error) { - this.logger.trace(error); - throw error; - } - } - async torrentsProcess() { - try { - if (this.torrentIDs.length > 0) { - for (const id of this.torrentIDs) { - this.logger.info('=============================================================================================='); - this.logger.info(`TORRENT ID: "${id}" START PROCESS ...`); - await this.getTorrentInfo(id); - if (this.torrentInfo.percent === 100) { - const checkRatio = this.checkRatio(this.torrentInfo.ratio); - if (checkRatio) { - this.logger.debug(`==> ACTION: Torrent delete on Ratio Limit`); - await this.clearTorrent(); - this.torrentSuccessCount++; - this.logger.info(`Stopping and deleting a torrent "${this.torrentInfo.name}" by ratio limit completed successfully`); - } - else { - const checkDateDifference = this.checkDateDifference(this.torrentInfo.dateDifference); - if (checkDateDifference) { - this.logger.debug(`==> ACTION: Torrent delete on Date Difference`); - await this.clearTorrent(); - this.torrentSuccessCount++; - this.logger.info(`Stopping and deleting a torrent "${this.torrentInfo.name}" by datetime limit completed successfully`); - } - else { - this.logger.info(`NO ACTION NEEDED (DATE AND RATIO)`); - } - } - } - else { - this.logger.info(`NO ACTION NEEDED (< 100)`); - } - } - } - } - catch (error) { - this.logger.trace(error); - throw error; - } - } - async clearTorrent() { - try { - const torrentPath = (0, node_path_1.normalize)(`${this.torrentInfo.location}/${this.torrentInfo.name}`); - this.logger.debug(`normalized torrentPath: "${torrentPath}"`); - const fileOrDir = await this.isFileOrDirectoryOrUnknown(torrentPath); - if (fileOrDir === this.fileOrDirsState.FILE) { - this.logger.info(`Torrent: "${this.torrentInfo.name}" is a FILE`); - await this.torrentStop(); - await this.torrentRemove(); - } - else if (fileOrDir === this.fileOrDirsState.DIR) { - this.logger.info(`Torrent: "${this.torrentInfo.name}" is a DIRECTORY`); - await this.torrentStop(); - await this.torrentRemoveAndDelete(); - } - else if (fileOrDir === this.fileOrDirsState.NOTFOUND) { - this.logger.warn(`Torrent: "${this.torrentInfo.name}" FILE NOT FOUND`); - await this.torrentStop(); - await this.torrentRemove(); - } - else { - this.logger.debug(`Torrent: "${this.torrentInfo.name}" is neither a file or a directory`); - } - } - catch (error) { - this.logger.trace(error); - throw error; - } - } - async torrentStop() { - try { - const command = `${this.connect} --torrent ${this.torrentInfo.id} --stop`; - this.logger.debug(`Stop torrent: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`); - this.logger.debug(`Run command: "${command}"`); - let execResultStop = await this.command(command); - execResultStop = execResultStop.replace(/(\r\n|\n|\r)/gm, ''); - this.logger.debug(`execResultStop: ${execResultStop}`); - if (!this.regexSuccess.test(execResultStop)) { - throw new Error(`Failed to stop torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${execResultStop}`); - } - } - catch (error) { - this.logger.trace(error); - throw error; - } - } - async torrentRemove() { - try { - const command = `${this.connect} --torrent ${this.torrentInfo.id} --remove`; - this.logger.debug(`Remove torrent without deleting file: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`); - this.logger.debug(`Run command: "${command}"`); - let execResult = await this.command(command); - execResult = execResult.replace(/(\r\n|\n|\r)/gm, ''); - this.logger.debug(`execResultRemove: ${execResult}`); - if (!this.regexSuccess.test(execResult)) { - throw new Error(`Failed to remove (no del) torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${execResult}`); - } - } - catch (error) { - this.logger.trace(error); - throw error; - } - } - async torrentRemoveAndDelete() { - try { - const command = `${this.connect} --torrent ${this.torrentInfo.id} --remove-and-delete`; - this.logger.debug(`Remove torrent with deleting file: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`); - this.logger.debug(`Run command: "${command}"`); - let execResult = await this.command(command); - execResult = execResult.replace(/(\r\n|\n|\r)/gm, ''); - this.logger.debug(`execResultRemoveAndDelete: ${execResult}`); - if (!this.regexSuccess.test(execResult)) { - throw new Error(`Failed to remove and delete torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${execResult}`); - } - } - catch (error) { - this.logger.trace(error); - throw error; - } - } - checkRatio(ratio) { - if (ratio >= this.config.ratioLimit) { - this.logger.info(`Torrent has reached the Ratio limit: "${ratio}" >= "${this.config.ratioLimit}"`); - return true; - } - return false; - } - checkDateDifference(date_difference) { - if (date_difference >= this.config.limitTime) { - this.logger.info(`Torrent has reached the Date difference limit: "${date_difference}" >= "${this.config.limitTime}"`); - return true; - } - return false; - } - async getTorrentInfo(id) { - try { - const command = `${this.connect} --torrent ${id} --info`; - this.logger.debug(`Run command: "${command}"`); - const execResult = await this.command(command); - const matchAll = execResult.toString().matchAll(this.regexTorrentInfo); - const matchArray = Array.from(matchAll); - if (matchArray.length < 1) - throw new Error(`Torrent info data is EMPTY`); - const torrentName = matchArray[0][1]; - if (torrentName === undefined || torrentName === '') - throw new Error(`Torrent name not found in torrent info: "${id}"`); - const torrentState = matchArray[1][2]; - if (torrentState === undefined || torrentState === '') - throw new Error(`Torrent state not found in torrent info: "${id}"`); - const torrentLocation = matchArray[2][3]; - if (torrentLocation === undefined || torrentLocation === '') - throw new Error(`Torrent location not found in torrent info: "${id}"`); - const torrentPercent = matchArray[3][4]; - if (torrentPercent === undefined || torrentPercent === '') - throw new Error(`Torrent percent not found in torrent info: "${id}"`); - const torrentRatio = matchArray[4][5]; - if (torrentRatio === undefined || torrentRatio === '') - throw new Error(`Torrent ratio not found in torrent info: "${id}"`); - const torrentDateFinished = matchArray[5][6]; - if (torrentDateFinished === undefined || torrentDateFinished === '') - throw new Error(`Torrent date done not found in torrent info: "${id}"`); - const nowDate = Date.now(); - const parsedFinishDate = Date.parse(torrentDateFinished.trim()); - this.torrentInfo = { - id: Number(id), - name: torrentName.trim(), - state: torrentState.trim(), - location: torrentLocation.trim(), - percent: Number(torrentPercent.trim()), - ratio: Number(torrentRatio.trim()), - dateDone: this.dateFormat(parsedFinishDate), - dateDifference: Math.round((nowDate - parsedFinishDate) / 1000) - }; - this.logger.debug(`Torrent ID "${this.torrentInfo.id}" info:`); - this.logger.debug(` Name: "${this.torrentInfo.name}"`); - this.logger.debug(` State: "${this.torrentInfo.state}"`); - this.logger.debug(` Location: "${this.torrentInfo.location}"`); - this.logger.debug(` Percent Done: "${this.torrentInfo.percent}%"`); - this.logger.debug(` Ratio: "${this.torrentInfo.ratio}" | limit: "${this.config.ratioLimit}"`); - this.logger.debug(` Date finished: "${this.torrentInfo.dateDone}"`); - this.logger.debug(` Date Difference: "${this.torrentInfo.dateDifference}" | limit: "${this.config.limitTime}"`); - } - catch (error) { - this.logger.trace(error); - throw error; - } - } - connectCommandCreate() { - return `transmission-remote ${this.config.ipAddress}:${this.config.port} --auth ${this.config.login}:${this.config.password}`; - } - dateFormat(timestamp) { - const date = new Date(timestamp); - const formattedDate = (0, moment_1.default)(date).format(this.config.dateFormat); - return formattedDate; - } - async command(command) { - try { - return (0, node_child_process_1.execSync)(command, { timeout: 2000, encoding: 'utf8' }); - } - catch (error) { - this.logger.trace(error); - throw error; - } - } - async isFileOrDirectoryOrUnknown(path) { - try { - const stat = (0, node_fs_1.lstatSync)(path); - const isFile = stat.isFile(); - const isDirectory = stat.isDirectory(); - if (isFile) - return this.fileOrDirsState.FILE; - if (isDirectory) - return this.fileOrDirsState.DIR; - return this.fileOrDirsState.UNKNOWN; - } - catch (error) { - if (error.code === 'ENOENT') - return this.fileOrDirsState.NOTFOUND; - this.logger.trace(error); - throw error; - } - } -} -exports.Torrentclear = Torrentclear; - - -/***/ }), - -/***/ 3300: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const torrentclear_1 = __nccwpck_require__(7680); -new torrentclear_1.Torrentclear().main(); - - -/***/ }), - -/***/ 3742: -/***/ ((module) => { - -function webpackEmptyContext(req) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; -} -webpackEmptyContext.keys = () => ([]); -webpackEmptyContext.resolve = webpackEmptyContext; -webpackEmptyContext.id = 3742; -module.exports = webpackEmptyContext; - -/***/ }), - -/***/ 3486: -/***/ ((module) => { - -function webpackEmptyContext(req) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; -} -webpackEmptyContext.keys = () => ([]); -webpackEmptyContext.resolve = webpackEmptyContext; -webpackEmptyContext.id = 3486; -module.exports = webpackEmptyContext; - -/***/ }), - -/***/ 6965: -/***/ ((module) => { - -function webpackEmptyContext(req) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; -} -webpackEmptyContext.keys = () => ([]); -webpackEmptyContext.resolve = webpackEmptyContext; -webpackEmptyContext.id = 6965; -module.exports = webpackEmptyContext; - -/***/ }), - -/***/ 2613: -/***/ ((module) => { - -"use strict"; -module.exports = require("assert"); - -/***/ }), - -/***/ 9907: -/***/ ((module) => { - -"use strict"; -module.exports = require("cluster"); - -/***/ }), - -/***/ 9140: -/***/ ((module) => { - -"use strict"; -module.exports = require("constants"); - -/***/ }), - -/***/ 6982: -/***/ ((module) => { - -"use strict"; -module.exports = require("crypto"); - -/***/ }), - -/***/ 9896: -/***/ ((module) => { - -"use strict"; -module.exports = require("fs"); - -/***/ }), - -/***/ 9278: -/***/ ((module) => { - -"use strict"; -module.exports = require("net"); - -/***/ }), - -/***/ 1421: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:child_process"); - -/***/ }), - -/***/ 3024: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:fs"); - -/***/ }), - -/***/ 8161: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:os"); - -/***/ }), - -/***/ 6760: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:path"); - -/***/ }), - -/***/ 3136: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:url"); - -/***/ }), - -/***/ 857: -/***/ ((module) => { - -"use strict"; -module.exports = require("os"); - -/***/ }), - -/***/ 6928: -/***/ ((module) => { - -"use strict"; -module.exports = require("path"); - -/***/ }), - -/***/ 2203: -/***/ ((module) => { - -"use strict"; -module.exports = require("stream"); - -/***/ }), - -/***/ 2018: -/***/ ((module) => { - -"use strict"; -module.exports = require("tty"); - -/***/ }), - -/***/ 7016: -/***/ ((module) => { - -"use strict"; -module.exports = require("url"); - -/***/ }), - -/***/ 9023: -/***/ ((module) => { - -"use strict"; -module.exports = require("util"); - -/***/ }), - -/***/ 3106: -/***/ ((module) => { - -"use strict"; -module.exports = require("zlib"); - -/***/ }), - -/***/ 7032: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/// - -// (c) 2020-present Andrea Giammarchi - -const {parse: $parse, stringify: $stringify} = JSON; -const {keys} = Object; - -const Primitive = String; // it could be Number -const primitive = 'string'; // it could be 'number' - -const ignore = {}; -const object = 'object'; - -const noop = (_, value) => value; - -const primitives = value => ( - value instanceof Primitive ? Primitive(value) : value -); - -const Primitives = (_, value) => ( - typeof value === primitive ? new Primitive(value) : value -); - -const revive = (input, parsed, output, $) => { - const lazy = []; - for (let ke = keys(output), {length} = ke, y = 0; y < length; y++) { - const k = ke[y]; - const value = output[k]; - if (value instanceof Primitive) { - const tmp = input[value]; - if (typeof tmp === object && !parsed.has(tmp)) { - parsed.add(tmp); - output[k] = ignore; - lazy.push({k, a: [input, parsed, tmp, $]}); - } - else - output[k] = $.call(output, k, tmp); - } - else if (output[k] !== ignore) - output[k] = $.call(output, k, value); - } - for (let {length} = lazy, i = 0; i < length; i++) { - const {k, a} = lazy[i]; - output[k] = $.call(output, k, revive.apply(null, a)); - } - return output; -}; - -const set = (known, input, value) => { - const index = Primitive(input.push(value) - 1); - known.set(value, index); - return index; -}; - -/** - * Converts a specialized flatted string into a JS value. - * @param {string} text - * @param {((this: any, key: string, value: any) => any) | undefined): any} [reviver] - * @returns {any} - */ -const parse = (text, reviver) => { - const input = $parse(text, Primitives).map(primitives); - const value = input[0]; - const $ = reviver || noop; - const tmp = typeof value === object && value ? - revive(input, new Set, value, $) : - value; - return $.call({'': tmp}, '', tmp); -}; -exports.parse = parse; - -/** - * Converts a JS value into a specialized flatted string. - * @param {any} value - * @param {((this: any, key: string, value: any) => any) | (string | number)[] | null | undefined} [replacer] - * @param {string | number | undefined} [space] - * @returns {string} - */ -const stringify = (value, replacer, space) => { - const $ = replacer && typeof replacer === object ? - (k, v) => (k === '' || -1 < replacer.indexOf(k) ? v : void 0) : - (replacer || noop); - const known = new Map; - const input = []; - const output = []; - let i = +set(known, input, $.call({'': value}, '', value)); - let firstRun = !i; - while (i < input.length) { - firstRun = true; - output[i] = $stringify(input[i++], replace, space); - } - return '[' + output.join(',') + ']'; - function replace(key, value) { - if (firstRun) { - firstRun = !firstRun; - return value; - } - const after = $.call(this, key, value); - switch (typeof after) { - case object: - if (after === null) return after; - case primitive: - return known.get(after) || set(known, input, after); - } - return after; - } -}; -exports.stringify = stringify; - -/** - * Converts a generic value into a JSON serializable object without losing recursion. - * @param {any} value - * @returns {any} - */ -const toJSON = value => $parse(stringify(value)); -exports.toJSON = toJSON; - -/** - * Converts a previously serialized object with recursion into a recursive one. - * @param {any} value - * @returns {any} - */ -const fromJSON = value => parse($stringify(value)); -exports.fromJSON = fromJSON; - - -/***/ }), - -/***/ 7028: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const align = { - right: alignRight, - center: alignCenter -}; -const top = 0; -const right = 1; -const bottom = 2; -const left = 3; -class UI { - constructor(opts) { - var _a; - this.width = opts.width; - this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; - this.rows = []; - } - span(...args) { - const cols = this.div(...args); - cols.span = true; - } - resetOutput() { - this.rows = []; - } - div(...args) { - if (args.length === 0) { - this.div(''); - } - if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') { - return this.applyLayoutDSL(args[0]); - } - const cols = args.map(arg => { - if (typeof arg === 'string') { - return this.colFromString(arg); - } - return arg; - }); - this.rows.push(cols); - return cols; - } - shouldApplyLayoutDSL(...args) { - return args.length === 1 && typeof args[0] === 'string' && - /[\t\n]/.test(args[0]); - } - applyLayoutDSL(str) { - const rows = str.split('\n').map(row => row.split('\t')); - let leftColumnWidth = 0; - // simple heuristic for layout, make sure the - // second column lines up along the left-hand. - // don't allow the first column to take up more - // than 50% of the screen. - rows.forEach(columns => { - if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { - leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); - } - }); - // generate a table: - // replacing ' ' with padding calculations. - // using the algorithmically generated width. - rows.forEach(columns => { - this.div(...columns.map((r, i) => { - return { - text: r.trim(), - padding: this.measurePadding(r), - width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined - }; - })); - }); - return this.rows[this.rows.length - 1]; - } - colFromString(text) { - return { - text, - padding: this.measurePadding(text) - }; - } - measurePadding(str) { - // measure padding without ansi escape codes - const noAnsi = mixin.stripAnsi(str); - return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; - } - toString() { - const lines = []; - this.rows.forEach(row => { - this.rowToString(row, lines); - }); - // don't display any lines with the - // hidden flag set. - return lines - .filter(line => !line.hidden) - .map(line => line.text) - .join('\n'); - } - rowToString(row, lines) { - this.rasterize(row).forEach((rrow, r) => { - let str = ''; - rrow.forEach((col, c) => { - const { width } = row[c]; // the width with padding. - const wrapWidth = this.negatePadding(row[c]); // the width without padding. - let ts = col; // temporary string used during alignment/padding. - if (wrapWidth > mixin.stringWidth(col)) { - ts += ' '.repeat(wrapWidth - mixin.stringWidth(col)); - } - // align the string within its column. - if (row[c].align && row[c].align !== 'left' && this.wrap) { - const fn = align[row[c].align]; - ts = fn(ts, wrapWidth); - if (mixin.stringWidth(ts) < wrapWidth) { - ts += ' '.repeat((width || 0) - mixin.stringWidth(ts) - 1); - } - } - // apply border and padding to string. - const padding = row[c].padding || [0, 0, 0, 0]; - if (padding[left]) { - str += ' '.repeat(padding[left]); - } - str += addBorder(row[c], ts, '| '); - str += ts; - str += addBorder(row[c], ts, ' |'); - if (padding[right]) { - str += ' '.repeat(padding[right]); - } - // if prior row is span, try to render the - // current row on the prior line. - if (r === 0 && lines.length > 0) { - str = this.renderInline(str, lines[lines.length - 1]); - } - }); - // remove trailing whitespace. - lines.push({ - text: str.replace(/ +$/, ''), - span: row.span - }); - }); - return lines; - } - // if the full 'source' can render in - // the target line, do so. - renderInline(source, previousLine) { - const match = source.match(/^ */); - const leadingWhitespace = match ? match[0].length : 0; - const target = previousLine.text; - const targetTextWidth = mixin.stringWidth(target.trimRight()); - if (!previousLine.span) { - return source; - } - // if we're not applying wrapping logic, - // just always append to the span. - if (!this.wrap) { - previousLine.hidden = true; - return target + source; - } - if (leadingWhitespace < targetTextWidth) { - return source; - } - previousLine.hidden = true; - return target.trimRight() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimLeft(); - } - rasterize(row) { - const rrows = []; - const widths = this.columnWidths(row); - let wrapped; - // word wrap all columns, and create - // a data-structure that is easy to rasterize. - row.forEach((col, c) => { - // leave room for left and right padding. - col.width = widths[c]; - if (this.wrap) { - wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n'); - } - else { - wrapped = col.text.split('\n'); - } - if (col.border) { - wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.'); - wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'"); - } - // add top and bottom padding. - if (col.padding) { - wrapped.unshift(...new Array(col.padding[top] || 0).fill('')); - wrapped.push(...new Array(col.padding[bottom] || 0).fill('')); - } - wrapped.forEach((str, r) => { - if (!rrows[r]) { - rrows.push([]); - } - const rrow = rrows[r]; - for (let i = 0; i < c; i++) { - if (rrow[i] === undefined) { - rrow.push(''); - } - } - rrow.push(str); - }); - }); - return rrows; - } - negatePadding(col) { - let wrapWidth = col.width || 0; - if (col.padding) { - wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); - } - if (col.border) { - wrapWidth -= 4; - } - return wrapWidth; - } - columnWidths(row) { - if (!this.wrap) { - return row.map(col => { - return col.width || mixin.stringWidth(col.text); - }); - } - let unset = row.length; - let remainingWidth = this.width; - // column widths can be set in config. - const widths = row.map(col => { - if (col.width) { - unset--; - remainingWidth -= col.width; - return col.width; - } - return undefined; - }); - // any unset widths should be calculated. - const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; - return widths.map((w, i) => { - if (w === undefined) { - return Math.max(unsetWidth, _minWidth(row[i])); - } - return w; - }); - } -} -function addBorder(col, ts, style) { - if (col.border) { - if (/[.']-+[.']/.test(ts)) { - return ''; - } - if (ts.trim().length !== 0) { - return style; - } - return ' '; - } - return ''; -} -// calculates the minimum width of -// a column, based on padding preferences. -function _minWidth(col) { - const padding = col.padding || []; - const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); - if (col.border) { - return minWidth + 4; - } - return minWidth; -} -function getWindowWidth() { - /* istanbul ignore next: depends on terminal */ - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return process.stdout.columns; - } - return 80; -} -function alignRight(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - if (strWidth < width) { - return ' '.repeat(width - strWidth) + str; - } - return str; -} -function alignCenter(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - /* istanbul ignore next */ - if (strWidth >= width) { - return str; - } - return ' '.repeat((width - strWidth) >> 1) + str; -} -let mixin; -function cliui(opts, _mixin) { - mixin = _mixin; - return new UI({ - width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), - wrap: opts === null || opts === void 0 ? void 0 : opts.wrap - }); -} - -// Bootstrap cliui with CommonJS dependencies: -const stringWidth = __nccwpck_require__(5078); -const stripAnsi = __nccwpck_require__(1988); -const wrap = __nccwpck_require__(9666); -function ui(opts) { - return cliui(opts, { - stringWidth, - stripAnsi, - wrap - }); -} - -module.exports = ui; - - -/***/ }), - -/***/ 9012: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var fs = __nccwpck_require__(9896); -var util = __nccwpck_require__(9023); -var path = __nccwpck_require__(6928); - -let shim; -class Y18N { - constructor(opts) { - // configurable options. - opts = opts || {}; - this.directory = opts.directory || './locales'; - this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true; - this.locale = opts.locale || 'en'; - this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true; - // internal stuff. - this.cache = Object.create(null); - this.writeQueue = []; - } - __(...args) { - if (typeof arguments[0] !== 'string') { - return this._taggedLiteral(arguments[0], ...arguments); - } - const str = args.shift(); - let cb = function () { }; // start with noop. - if (typeof args[args.length - 1] === 'function') - cb = args.pop(); - cb = cb || function () { }; // noop. - if (!this.cache[this.locale]) - this._readLocaleFile(); - // we've observed a new string, update the language file. - if (!this.cache[this.locale][str] && this.updateFiles) { - this.cache[this.locale][str] = str; - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite({ - directory: this.directory, - locale: this.locale, - cb - }); - } - else { - cb(); - } - return shim.format.apply(shim.format, [this.cache[this.locale][str] || str].concat(args)); - } - __n() { - const args = Array.prototype.slice.call(arguments); - const singular = args.shift(); - const plural = args.shift(); - const quantity = args.shift(); - let cb = function () { }; // start with noop. - if (typeof args[args.length - 1] === 'function') - cb = args.pop(); - if (!this.cache[this.locale]) - this._readLocaleFile(); - let str = quantity === 1 ? singular : plural; - if (this.cache[this.locale][singular]) { - const entry = this.cache[this.locale][singular]; - str = entry[quantity === 1 ? 'one' : 'other']; - } - // we've observed a new string, update the language file. - if (!this.cache[this.locale][singular] && this.updateFiles) { - this.cache[this.locale][singular] = { - one: singular, - other: plural - }; - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite({ - directory: this.directory, - locale: this.locale, - cb - }); - } - else { - cb(); - } - // if a %d placeholder is provided, add quantity - // to the arguments expanded by util.format. - const values = [str]; - if (~str.indexOf('%d')) - values.push(quantity); - return shim.format.apply(shim.format, values.concat(args)); - } - setLocale(locale) { - this.locale = locale; - } - getLocale() { - return this.locale; - } - updateLocale(obj) { - if (!this.cache[this.locale]) - this._readLocaleFile(); - for (const key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - this.cache[this.locale][key] = obj[key]; - } - } - } - _taggedLiteral(parts, ...args) { - let str = ''; - parts.forEach(function (part, i) { - const arg = args[i + 1]; - str += part; - if (typeof arg !== 'undefined') { - str += '%s'; - } - }); - return this.__.apply(this, [str].concat([].slice.call(args, 1))); - } - _enqueueWrite(work) { - this.writeQueue.push(work); - if (this.writeQueue.length === 1) - this._processWriteQueue(); - } - _processWriteQueue() { - const _this = this; - const work = this.writeQueue[0]; - // destructure the enqueued work. - const directory = work.directory; - const locale = work.locale; - const cb = work.cb; - const languageFile = this._resolveLocaleFile(directory, locale); - const serializedLocale = JSON.stringify(this.cache[locale], null, 2); - shim.fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { - _this.writeQueue.shift(); - if (_this.writeQueue.length > 0) - _this._processWriteQueue(); - cb(err); - }); - } - _readLocaleFile() { - let localeLookup = {}; - const languageFile = this._resolveLocaleFile(this.directory, this.locale); - try { - // When using a bundler such as webpack, readFileSync may not be defined: - if (shim.fs.readFileSync) { - localeLookup = JSON.parse(shim.fs.readFileSync(languageFile, 'utf-8')); - } - } - catch (err) { - if (err instanceof SyntaxError) { - err.message = 'syntax error in ' + languageFile; - } - if (err.code === 'ENOENT') - localeLookup = {}; - else - throw err; - } - this.cache[this.locale] = localeLookup; - } - _resolveLocaleFile(directory, locale) { - let file = shim.resolve(directory, './', locale + '.json'); - if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { - // attempt fallback to language only - const languageFile = shim.resolve(directory, './', locale.split('_')[0] + '.json'); - if (this._fileExistsSync(languageFile)) - file = languageFile; - } - return file; - } - _fileExistsSync(file) { - return shim.exists(file); - } -} -function y18n$1(opts, _shim) { - shim = _shim; - const y18n = new Y18N(opts); - return { - __: y18n.__.bind(y18n), - __n: y18n.__n.bind(y18n), - setLocale: y18n.setLocale.bind(y18n), - getLocale: y18n.getLocale.bind(y18n), - updateLocale: y18n.updateLocale.bind(y18n), - locale: y18n.locale - }; -} - -var nodePlatformShim = { - fs: { - readFileSync: fs.readFileSync, - writeFile: fs.writeFile - }, - format: util.format, - resolve: path.resolve, - exists: (file) => { - try { - return fs.statSync(file).isFile(); - } - catch (err) { - return false; - } - } -}; - -const y18n = (opts) => { - return y18n$1(opts, nodePlatformShim); -}; - -module.exports = y18n; - - -/***/ }), - -/***/ 9030: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var util = __nccwpck_require__(9023); -var fs = __nccwpck_require__(9896); -var path = __nccwpck_require__(6928); - -function camelCase(str) { - const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase(); - if (!isCamelCase) { - str = str.toLowerCase(); - } - if (str.indexOf('-') === -1 && str.indexOf('_') === -1) { - return str; - } - else { - let camelcase = ''; - let nextChrUpper = false; - const leadingHyphens = str.match(/^-+/); - for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str.length; i++) { - let chr = str.charAt(i); - if (nextChrUpper) { - nextChrUpper = false; - chr = chr.toUpperCase(); - } - if (i !== 0 && (chr === '-' || chr === '_')) { - nextChrUpper = true; - } - else if (chr !== '-' && chr !== '_') { - camelcase += chr; - } - } - return camelcase; - } -} -function decamelize(str, joinString) { - const lowercase = str.toLowerCase(); - joinString = joinString || '-'; - let notCamelcase = ''; - for (let i = 0; i < str.length; i++) { - const chrLower = lowercase.charAt(i); - const chrString = str.charAt(i); - if (chrLower !== chrString && i > 0) { - notCamelcase += `${joinString}${lowercase.charAt(i)}`; - } - else { - notCamelcase += chrString; - } - } - return notCamelcase; -} -function looksLikeNumber(x) { - if (x === null || x === undefined) - return false; - if (typeof x === 'number') - return true; - if (/^0x[0-9a-f]+$/i.test(x)) - return true; - if (/^0[^.]/.test(x)) - return false; - return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -function tokenizeArgString(argString) { - if (Array.isArray(argString)) { - return argString.map(e => typeof e !== 'string' ? e + '' : e); - } - argString = argString.trim(); - let i = 0; - let prevC = null; - let c = null; - let opening = null; - const args = []; - for (let ii = 0; ii < argString.length; ii++) { - prevC = c; - c = argString.charAt(ii); - if (c === ' ' && !opening) { - if (!(prevC === ' ')) { - i++; - } - continue; - } - if (c === opening) { - opening = null; - } - else if ((c === "'" || c === '"') && !opening) { - opening = c; - } - if (!args[i]) - args[i] = ''; - args[i] += c; - } - return args; -} - -var DefaultValuesForTypeKey; -(function (DefaultValuesForTypeKey) { - DefaultValuesForTypeKey["BOOLEAN"] = "boolean"; - DefaultValuesForTypeKey["STRING"] = "string"; - DefaultValuesForTypeKey["NUMBER"] = "number"; - DefaultValuesForTypeKey["ARRAY"] = "array"; -})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {})); - -let mixin; -class YargsParser { - constructor(_mixin) { - mixin = _mixin; - } - parse(argsInput, options) { - const opts = Object.assign({ - alias: undefined, - array: undefined, - boolean: undefined, - config: undefined, - configObjects: undefined, - configuration: undefined, - coerce: undefined, - count: undefined, - default: undefined, - envPrefix: undefined, - narg: undefined, - normalize: undefined, - string: undefined, - number: undefined, - __: undefined, - key: undefined - }, options); - const args = tokenizeArgString(argsInput); - const aliases = combineAliases(Object.assign(Object.create(null), opts.alias)); - const configuration = Object.assign({ - 'boolean-negation': true, - 'camel-case-expansion': true, - 'combine-arrays': false, - 'dot-notation': true, - 'duplicate-arguments-array': true, - 'flatten-duplicate-arrays': true, - 'greedy-arrays': true, - 'halt-at-non-option': false, - 'nargs-eats-options': false, - 'negation-prefix': 'no-', - 'parse-numbers': true, - 'parse-positional-numbers': true, - 'populate--': false, - 'set-placeholder-key': false, - 'short-option-groups': true, - 'strip-aliased': false, - 'strip-dashed': false, - 'unknown-options-as-args': false - }, opts.configuration); - const defaults = Object.assign(Object.create(null), opts.default); - const configObjects = opts.configObjects || []; - const envPrefix = opts.envPrefix; - const notFlagsOption = configuration['populate--']; - const notFlagsArgv = notFlagsOption ? '--' : '_'; - const newAliases = Object.create(null); - const defaulted = Object.create(null); - const __ = opts.__ || mixin.format; - const flags = { - aliases: Object.create(null), - arrays: Object.create(null), - bools: Object.create(null), - strings: Object.create(null), - numbers: Object.create(null), - counts: Object.create(null), - normalize: Object.create(null), - configs: Object.create(null), - nargs: Object.create(null), - coercions: Object.create(null), - keys: [] - }; - const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/; - const negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)'); - [].concat(opts.array || []).filter(Boolean).forEach(function (opt) { - const key = typeof opt === 'object' ? opt.key : opt; - const assignment = Object.keys(opt).map(function (key) { - const arrayFlagKeys = { - boolean: 'bools', - string: 'strings', - number: 'numbers' - }; - return arrayFlagKeys[key]; - }).filter(Boolean).pop(); - if (assignment) { - flags[assignment][key] = true; - } - flags.arrays[key] = true; - flags.keys.push(key); - }); - [].concat(opts.boolean || []).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - flags.keys.push(key); - }); - [].concat(opts.string || []).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - flags.keys.push(key); - }); - [].concat(opts.number || []).filter(Boolean).forEach(function (key) { - flags.numbers[key] = true; - flags.keys.push(key); - }); - [].concat(opts.count || []).filter(Boolean).forEach(function (key) { - flags.counts[key] = true; - flags.keys.push(key); - }); - [].concat(opts.normalize || []).filter(Boolean).forEach(function (key) { - flags.normalize[key] = true; - flags.keys.push(key); - }); - if (typeof opts.narg === 'object') { - Object.entries(opts.narg).forEach(([key, value]) => { - if (typeof value === 'number') { - flags.nargs[key] = value; - flags.keys.push(key); - } - }); - } - if (typeof opts.coerce === 'object') { - Object.entries(opts.coerce).forEach(([key, value]) => { - if (typeof value === 'function') { - flags.coercions[key] = value; - flags.keys.push(key); - } - }); - } - if (typeof opts.config !== 'undefined') { - if (Array.isArray(opts.config) || typeof opts.config === 'string') { - [].concat(opts.config).filter(Boolean).forEach(function (key) { - flags.configs[key] = true; - }); - } - else if (typeof opts.config === 'object') { - Object.entries(opts.config).forEach(([key, value]) => { - if (typeof value === 'boolean' || typeof value === 'function') { - flags.configs[key] = value; - } - }); - } - } - extendAliases(opts.key, aliases, opts.default, flags.arrays); - Object.keys(defaults).forEach(function (key) { - (flags.aliases[key] || []).forEach(function (alias) { - defaults[alias] = defaults[key]; - }); - }); - let error = null; - checkConfiguration(); - let notFlags = []; - const argv = Object.assign(Object.create(null), { _: [] }); - const argvReturn = {}; - for (let i = 0; i < args.length; i++) { - const arg = args[i]; - const truncatedArg = arg.replace(/^-{3,}/, '---'); - let broken; - let key; - let letters; - let m; - let next; - let value; - if (arg !== '--' && isUnknownOptionAsArg(arg)) { - pushPositional(arg); - } - else if (truncatedArg.match(/---+(=|$)/)) { - pushPositional(arg); - continue; - } - else if (arg.match(/^--.+=/) || (!configuration['short-option-groups'] && arg.match(/^-.+=/))) { - m = arg.match(/^--?([^=]+)=([\s\S]*)$/); - if (m !== null && Array.isArray(m) && m.length >= 3) { - if (checkAllAliases(m[1], flags.arrays)) { - i = eatArray(i, m[1], args, m[2]); - } - else if (checkAllAliases(m[1], flags.nargs) !== false) { - i = eatNargs(i, m[1], args, m[2]); - } - else { - setArg(m[1], m[2]); - } - } - } - else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { - m = arg.match(negatedBoolean); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false); - } - } - else if (arg.match(/^--.+/) || (!configuration['short-option-groups'] && arg.match(/^-[^-]+/))) { - m = arg.match(/^--?(.+)/); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args); - } - else { - next = args[i + 1]; - if (next !== undefined && (!next.match(/^-/) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - } - else if (arg.match(/^-.\..+=/)) { - m = arg.match(/^-([^=]+)=([\s\S]*)$/); - if (m !== null && Array.isArray(m) && m.length >= 3) { - setArg(m[1], m[2]); - } - } - else if (arg.match(/^-.\..+/) && !arg.match(negative)) { - next = args[i + 1]; - m = arg.match(/^-(.\..+)/); - if (m !== null && Array.isArray(m) && m.length >= 2) { - key = m[1]; - if (next !== undefined && !next.match(/^-/) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { - letters = arg.slice(1, -1).split(''); - broken = false; - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - if (letters[j + 1] && letters[j + 1] === '=') { - value = arg.slice(j + 3); - key = letters[j]; - if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args, value); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args, value); - } - else { - setArg(key, value); - } - broken = true; - break; - } - if (next === '-') { - setArg(letters[j], next); - continue; - } - if (/[A-Za-z]/.test(letters[j]) && - /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && - checkAllAliases(next, flags.bools) === false) { - setArg(letters[j], next); - broken = true; - break; - } - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], next); - broken = true; - break; - } - else { - setArg(letters[j], defaultValue(letters[j])); - } - } - key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args); - } - else if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args); - } - else { - next = args[i + 1]; - if (next !== undefined && (!/^(-|--)[^-]/.test(next) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next); - i++; - } - else { - setArg(key, defaultValue(key)); - } - } - } - } - else if (arg.match(/^-[0-9]$/) && - arg.match(negative) && - checkAllAliases(arg.slice(1), flags.bools)) { - key = arg.slice(1); - setArg(key, defaultValue(key)); - } - else if (arg === '--') { - notFlags = args.slice(i + 1); - break; - } - else if (configuration['halt-at-non-option']) { - notFlags = args.slice(i); - break; - } - else { - pushPositional(arg); - } - } - applyEnvVars(argv, true); - applyEnvVars(argv, false); - setConfig(argv); - setConfigObjects(); - applyDefaultsAndAliases(argv, flags.aliases, defaults, true); - applyCoercions(argv); - if (configuration['set-placeholder-key']) - setPlaceholderKeys(argv); - Object.keys(flags.counts).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) - setArg(key, 0); - }); - if (notFlagsOption && notFlags.length) - argv[notFlagsArgv] = []; - notFlags.forEach(function (key) { - argv[notFlagsArgv].push(key); - }); - if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { - Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { - delete argv[key]; - }); - } - if (configuration['strip-aliased']) { - [].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { - if (configuration['camel-case-expansion'] && alias.includes('-')) { - delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')]; - } - delete argv[alias]; - }); - } - function pushPositional(arg) { - const maybeCoercedNumber = maybeCoerceNumber('_', arg); - if (typeof maybeCoercedNumber === 'string' || typeof maybeCoercedNumber === 'number') { - argv._.push(maybeCoercedNumber); - } - } - function eatNargs(i, key, args, argAfterEqualSign) { - let ii; - let toEat = checkAllAliases(key, flags.nargs); - toEat = typeof toEat !== 'number' || isNaN(toEat) ? 1 : toEat; - if (toEat === 0) { - if (!isUndefined(argAfterEqualSign)) { - error = Error(__('Argument unexpected for: %s', key)); - } - setArg(key, defaultValue(key)); - return i; - } - let available = isUndefined(argAfterEqualSign) ? 0 : 1; - if (configuration['nargs-eats-options']) { - if (args.length - (i + 1) + available < toEat) { - error = Error(__('Not enough arguments following: %s', key)); - } - available = toEat; - } - else { - for (ii = i + 1; ii < args.length; ii++) { - if (!args[ii].match(/^-[^0-9]/) || args[ii].match(negative) || isUnknownOptionAsArg(args[ii])) - available++; - else - break; - } - if (available < toEat) - error = Error(__('Not enough arguments following: %s', key)); - } - let consumed = Math.min(available, toEat); - if (!isUndefined(argAfterEqualSign) && consumed > 0) { - setArg(key, argAfterEqualSign); - consumed--; - } - for (ii = i + 1; ii < (consumed + i + 1); ii++) { - setArg(key, args[ii]); - } - return (i + consumed); - } - function eatArray(i, key, args, argAfterEqualSign) { - let argsToSet = []; - let next = argAfterEqualSign || args[i + 1]; - const nargsCount = checkAllAliases(key, flags.nargs); - if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { - argsToSet.push(true); - } - else if (isUndefined(next) || - (isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { - if (defaults[key] !== undefined) { - const defVal = defaults[key]; - argsToSet = Array.isArray(defVal) ? defVal : [defVal]; - } - } - else { - if (!isUndefined(argAfterEqualSign)) { - argsToSet.push(processValue(key, argAfterEqualSign)); - } - for (let ii = i + 1; ii < args.length; ii++) { - if ((!configuration['greedy-arrays'] && argsToSet.length > 0) || - (nargsCount && typeof nargsCount === 'number' && argsToSet.length >= nargsCount)) - break; - next = args[ii]; - if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) - break; - i = ii; - argsToSet.push(processValue(key, next)); - } - } - if (typeof nargsCount === 'number' && ((nargsCount && argsToSet.length < nargsCount) || - (isNaN(nargsCount) && argsToSet.length === 0))) { - error = Error(__('Not enough arguments following: %s', key)); - } - setArg(key, argsToSet); - return i; - } - function setArg(key, val) { - if (/-/.test(key) && configuration['camel-case-expansion']) { - const alias = key.split('.').map(function (prop) { - return camelCase(prop); - }).join('.'); - addNewAlias(key, alias); - } - const value = processValue(key, val); - const splitKey = key.split('.'); - setKey(argv, splitKey, value); - if (flags.aliases[key]) { - flags.aliases[key].forEach(function (x) { - const keyProperties = x.split('.'); - setKey(argv, keyProperties, value); - }); - } - if (splitKey.length > 1 && configuration['dot-notation']) { - (flags.aliases[splitKey[0]] || []).forEach(function (x) { - let keyProperties = x.split('.'); - const a = [].concat(splitKey); - a.shift(); - keyProperties = keyProperties.concat(a); - if (!(flags.aliases[key] || []).includes(keyProperties.join('.'))) { - setKey(argv, keyProperties, value); - } - }); - } - if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { - const keys = [key].concat(flags.aliases[key] || []); - keys.forEach(function (key) { - Object.defineProperty(argvReturn, key, { - enumerable: true, - get() { - return val; - }, - set(value) { - val = typeof value === 'string' ? mixin.normalize(value) : value; - } - }); - }); - } - } - function addNewAlias(key, alias) { - if (!(flags.aliases[key] && flags.aliases[key].length)) { - flags.aliases[key] = [alias]; - newAliases[alias] = true; - } - if (!(flags.aliases[alias] && flags.aliases[alias].length)) { - addNewAlias(alias, key); - } - } - function processValue(key, val) { - if (typeof val === 'string' && - (val[0] === "'" || val[0] === '"') && - val[val.length - 1] === val[0]) { - val = val.substring(1, val.length - 1); - } - if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { - if (typeof val === 'string') - val = val === 'true'; - } - let value = Array.isArray(val) - ? val.map(function (v) { return maybeCoerceNumber(key, v); }) - : maybeCoerceNumber(key, val); - if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { - value = increment(); - } - if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { - if (Array.isArray(val)) - value = val.map((val) => { return mixin.normalize(val); }); - else - value = mixin.normalize(val); - } - return value; - } - function maybeCoerceNumber(key, value) { - if (!configuration['parse-positional-numbers'] && key === '_') - return value; - if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { - const shouldCoerceNumber = looksLikeNumber(value) && configuration['parse-numbers'] && (Number.isSafeInteger(Math.floor(parseFloat(`${value}`)))); - if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) { - value = Number(value); - } - } - return value; - } - function setConfig(argv) { - const configLookup = Object.create(null); - applyDefaultsAndAliases(configLookup, flags.aliases, defaults); - Object.keys(flags.configs).forEach(function (configKey) { - const configPath = argv[configKey] || configLookup[configKey]; - if (configPath) { - try { - let config = null; - const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath); - const resolveConfig = flags.configs[configKey]; - if (typeof resolveConfig === 'function') { - try { - config = resolveConfig(resolvedConfigPath); - } - catch (e) { - config = e; - } - if (config instanceof Error) { - error = config; - return; - } - } - else { - config = mixin.require(resolvedConfigPath); - } - setConfigObject(config); - } - catch (ex) { - if (ex.name === 'PermissionDenied') - error = ex; - else if (argv[configKey]) - error = Error(__('Invalid JSON config file: %s', configPath)); - } - } - }); - } - function setConfigObject(config, prev) { - Object.keys(config).forEach(function (key) { - const value = config[key]; - const fullKey = prev ? prev + '.' + key : key; - if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { - setConfigObject(value, fullKey); - } - else { - if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { - setArg(fullKey, value); - } - } - }); - } - function setConfigObjects() { - if (typeof configObjects !== 'undefined') { - configObjects.forEach(function (configObject) { - setConfigObject(configObject); - }); - } - } - function applyEnvVars(argv, configOnly) { - if (typeof envPrefix === 'undefined') - return; - const prefix = typeof envPrefix === 'string' ? envPrefix : ''; - const env = mixin.env(); - Object.keys(env).forEach(function (envVar) { - if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { - const keys = envVar.split('__').map(function (key, i) { - if (i === 0) { - key = key.substring(prefix.length); - } - return camelCase(key); - }); - if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { - setArg(keys.join('.'), env[envVar]); - } - } - }); - } - function applyCoercions(argv) { - let coerce; - const applied = new Set(); - Object.keys(argv).forEach(function (key) { - if (!applied.has(key)) { - coerce = checkAllAliases(key, flags.coercions); - if (typeof coerce === 'function') { - try { - const value = maybeCoerceNumber(key, coerce(argv[key])); - ([].concat(flags.aliases[key] || [], key)).forEach(ali => { - applied.add(ali); - argv[ali] = value; - }); - } - catch (err) { - error = err; - } - } - } - }); - } - function setPlaceholderKeys(argv) { - flags.keys.forEach((key) => { - if (~key.indexOf('.')) - return; - if (typeof argv[key] === 'undefined') - argv[key] = undefined; - }); - return argv; - } - function applyDefaultsAndAliases(obj, aliases, defaults, canLog = false) { - Object.keys(defaults).forEach(function (key) { - if (!hasKey(obj, key.split('.'))) { - setKey(obj, key.split('.'), defaults[key]); - if (canLog) - defaulted[key] = true; - (aliases[key] || []).forEach(function (x) { - if (hasKey(obj, x.split('.'))) - return; - setKey(obj, x.split('.'), defaults[key]); - }); - } - }); - } - function hasKey(obj, keys) { - let o = obj; - if (!configuration['dot-notation']) - keys = [keys.join('.')]; - keys.slice(0, -1).forEach(function (key) { - o = (o[key] || {}); - }); - const key = keys[keys.length - 1]; - if (typeof o !== 'object') - return false; - else - return key in o; - } - function setKey(obj, keys, value) { - let o = obj; - if (!configuration['dot-notation']) - keys = [keys.join('.')]; - keys.slice(0, -1).forEach(function (key) { - key = sanitizeKey(key); - if (typeof o === 'object' && o[key] === undefined) { - o[key] = {}; - } - if (typeof o[key] !== 'object' || Array.isArray(o[key])) { - if (Array.isArray(o[key])) { - o[key].push({}); - } - else { - o[key] = [o[key], {}]; - } - o = o[key][o[key].length - 1]; - } - else { - o = o[key]; - } - }); - const key = sanitizeKey(keys[keys.length - 1]); - const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays); - const isValueArray = Array.isArray(value); - let duplicate = configuration['duplicate-arguments-array']; - if (!duplicate && checkAllAliases(key, flags.nargs)) { - duplicate = true; - if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { - o[key] = undefined; - } - } - if (value === increment()) { - o[key] = increment(o[key]); - } - else if (Array.isArray(o[key])) { - if (duplicate && isTypeArray && isValueArray) { - o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]); - } - else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { - o[key] = value; - } - else { - o[key] = o[key].concat([value]); - } - } - else if (o[key] === undefined && isTypeArray) { - o[key] = isValueArray ? value : [value]; - } - else if (duplicate && !(o[key] === undefined || - checkAllAliases(key, flags.counts) || - checkAllAliases(key, flags.bools))) { - o[key] = [o[key], value]; - } - else { - o[key] = value; - } - } - function extendAliases(...args) { - args.forEach(function (obj) { - Object.keys(obj || {}).forEach(function (key) { - if (flags.aliases[key]) - return; - flags.aliases[key] = [].concat(aliases[key] || []); - flags.aliases[key].concat(key).forEach(function (x) { - if (/-/.test(x) && configuration['camel-case-expansion']) { - const c = camelCase(x); - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c); - newAliases[c] = true; - } - } - }); - flags.aliases[key].concat(key).forEach(function (x) { - if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { - const c = decamelize(x, '-'); - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c); - newAliases[c] = true; - } - } - }); - flags.aliases[key].forEach(function (x) { - flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - }); - } - function checkAllAliases(key, flag) { - const toCheck = [].concat(flags.aliases[key] || [], key); - const keys = Object.keys(flag); - const setAlias = toCheck.find(key => keys.includes(key)); - return setAlias ? flag[setAlias] : false; - } - function hasAnyFlag(key) { - const flagsKeys = Object.keys(flags); - const toCheck = [].concat(flagsKeys.map(k => flags[k])); - return toCheck.some(function (flag) { - return Array.isArray(flag) ? flag.includes(key) : flag[key]; - }); - } - function hasFlagsMatching(arg, ...patterns) { - const toCheck = [].concat(...patterns); - return toCheck.some(function (pattern) { - const match = arg.match(pattern); - return match && hasAnyFlag(match[1]); - }); - } - function hasAllShortFlags(arg) { - if (arg.match(negative) || !arg.match(/^-[^-]+/)) { - return false; - } - let hasAllFlags = true; - let next; - const letters = arg.slice(1).split(''); - for (let j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - if (!hasAnyFlag(letters[j])) { - hasAllFlags = false; - break; - } - if ((letters[j + 1] && letters[j + 1] === '=') || - next === '-' || - (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || - (letters[j + 1] && letters[j + 1].match(/\W/))) { - break; - } - } - return hasAllFlags; - } - function isUnknownOptionAsArg(arg) { - return configuration['unknown-options-as-args'] && isUnknownOption(arg); - } - function isUnknownOption(arg) { - arg = arg.replace(/^-{3,}/, '--'); - if (arg.match(negative)) { - return false; - } - if (hasAllShortFlags(arg)) { - return false; - } - const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/; - const normalFlag = /^-+([^=]+?)$/; - const flagEndingInHyphen = /^-+([^=]+?)-$/; - const flagEndingInDigits = /^-+([^=]+?\d+)$/; - const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/; - return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters); - } - function defaultValue(key) { - if (!checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts) && - `${key}` in defaults) { - return defaults[key]; - } - else { - return defaultForType(guessType(key)); - } - } - function defaultForType(type) { - const def = { - [DefaultValuesForTypeKey.BOOLEAN]: true, - [DefaultValuesForTypeKey.STRING]: '', - [DefaultValuesForTypeKey.NUMBER]: undefined, - [DefaultValuesForTypeKey.ARRAY]: [] - }; - return def[type]; - } - function guessType(key) { - let type = DefaultValuesForTypeKey.BOOLEAN; - if (checkAllAliases(key, flags.strings)) - type = DefaultValuesForTypeKey.STRING; - else if (checkAllAliases(key, flags.numbers)) - type = DefaultValuesForTypeKey.NUMBER; - else if (checkAllAliases(key, flags.bools)) - type = DefaultValuesForTypeKey.BOOLEAN; - else if (checkAllAliases(key, flags.arrays)) - type = DefaultValuesForTypeKey.ARRAY; - return type; - } - function isUndefined(num) { - return num === undefined; - } - function checkConfiguration() { - Object.keys(flags.counts).find(key => { - if (checkAllAliases(key, flags.arrays)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.array.', key)); - return true; - } - else if (checkAllAliases(key, flags.nargs)) { - error = Error(__('Invalid configuration: %s, opts.count excludes opts.narg.', key)); - return true; - } - return false; - }); - } - return { - aliases: Object.assign({}, flags.aliases), - argv: Object.assign(argvReturn, argv), - configuration: configuration, - defaulted: Object.assign({}, defaulted), - error: error, - newAliases: Object.assign({}, newAliases) - }; - } -} -function combineAliases(aliases) { - const aliasArrays = []; - const combined = Object.create(null); - let change = true; - Object.keys(aliases).forEach(function (key) { - aliasArrays.push([].concat(aliases[key], key)); - }); - while (change) { - change = false; - for (let i = 0; i < aliasArrays.length; i++) { - for (let ii = i + 1; ii < aliasArrays.length; ii++) { - const intersect = aliasArrays[i].filter(function (v) { - return aliasArrays[ii].indexOf(v) !== -1; - }); - if (intersect.length) { - aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]); - aliasArrays.splice(ii, 1); - change = true; - break; - } - } - } - } - aliasArrays.forEach(function (aliasArray) { - aliasArray = aliasArray.filter(function (v, i, self) { - return self.indexOf(v) === i; - }); - const lastAlias = aliasArray.pop(); - if (lastAlias !== undefined && typeof lastAlias === 'string') { - combined[lastAlias] = aliasArray; - } - }); - return combined; -} -function increment(orig) { - return orig !== undefined ? orig + 1 : 1; -} -function sanitizeKey(key) { - if (key === '__proto__') - return '___proto___'; - return key; -} - -const minNodeVersion = (process && process.env && process.env.YARGS_MIN_NODE_VERSION) - ? Number(process.env.YARGS_MIN_NODE_VERSION) - : 10; -if (process && process.version) { - const major = Number(process.version.match(/v([^.]+)/)[1]); - if (major < minNodeVersion) { - throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`); - } -} -const env = process ? process.env : {}; -const parser = new YargsParser({ - cwd: process.cwd, - env: () => { - return env; - }, - format: util.format, - normalize: path.normalize, - resolve: path.resolve, - require: (path) => { - if (true) { - return __nccwpck_require__(3742)(path); - } - else {} - } -}); -const yargsParser = function Parser(args, opts) { - const result = parser.parse(args.slice(), opts); - return result.argv; -}; -yargsParser.detailed = function (args, opts) { - return parser.parse(args.slice(), opts); -}; -yargsParser.camelCase = camelCase; -yargsParser.decamelize = decamelize; -yargsParser.looksLikeNumber = looksLikeNumber; - -module.exports = yargsParser; - - -/***/ }), - -/***/ 7710: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var assert = __nccwpck_require__(2613); - -class YError extends Error { - constructor(msg) { - super(msg || 'yargs error'); - this.name = 'YError'; - Error.captureStackTrace(this, YError); - } -} - -let previouslyVisitedConfigs = []; -let shim; -function applyExtends(config, cwd, mergeExtends, _shim) { - shim = _shim; - let defaultConfig = {}; - if (Object.prototype.hasOwnProperty.call(config, 'extends')) { - if (typeof config.extends !== 'string') - return defaultConfig; - const isPath = /\.json|\..*rc$/.test(config.extends); - let pathToDefault = null; - if (!isPath) { - try { - pathToDefault = /*require.resolve*/(__nccwpck_require__(3486).resolve(config.extends)); - } - catch (_err) { - return config; - } - } - else { - pathToDefault = getPathToDefaultConfig(cwd, config.extends); - } - checkForCircularExtends(pathToDefault); - previouslyVisitedConfigs.push(pathToDefault); - defaultConfig = isPath - ? JSON.parse(shim.readFileSync(pathToDefault, 'utf8')) - : __nccwpck_require__(3486)(config.extends); - delete config.extends; - defaultConfig = applyExtends(defaultConfig, shim.path.dirname(pathToDefault), mergeExtends, shim); - } - previouslyVisitedConfigs = []; - return mergeExtends - ? mergeDeep(defaultConfig, config) - : Object.assign({}, defaultConfig, config); -} -function checkForCircularExtends(cfgPath) { - if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { - throw new YError(`Circular extended configurations: '${cfgPath}'.`); - } -} -function getPathToDefaultConfig(cwd, pathToExtend) { - return shim.path.resolve(cwd, pathToExtend); -} -function mergeDeep(config1, config2) { - const target = {}; - function isObject(obj) { - return obj && typeof obj === 'object' && !Array.isArray(obj); - } - Object.assign(target, config1); - for (const key of Object.keys(config2)) { - if (isObject(config2[key]) && isObject(target[key])) { - target[key] = mergeDeep(config1[key], config2[key]); - } - else { - target[key] = config2[key]; - } - } - return target; -} - -function parseCommand(cmd) { - const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' '); - const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/); - const bregex = /\.*[\][<>]/g; - const firstCommand = splitCommand.shift(); - if (!firstCommand) - throw new Error(`No command found in: ${cmd}`); - const parsedCommand = { - cmd: firstCommand.replace(bregex, ''), - demanded: [], - optional: [], - }; - splitCommand.forEach((cmd, i) => { - let variadic = false; - cmd = cmd.replace(/\s/g, ''); - if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) - variadic = true; - if (/^\[/.test(cmd)) { - parsedCommand.optional.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic, - }); - } - else { - parsedCommand.demanded.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic, - }); - } - }); - return parsedCommand; -} - -const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']; -function argsert(arg1, arg2, arg3) { - function parseArgs() { - return typeof arg1 === 'object' - ? [{ demanded: [], optional: [] }, arg1, arg2] - : [ - parseCommand(`cmd ${arg1}`), - arg2, - arg3, - ]; - } - try { - let position = 0; - const [parsed, callerArguments, _length] = parseArgs(); - const args = [].slice.call(callerArguments); - while (args.length && args[args.length - 1] === undefined) - args.pop(); - const length = _length || args.length; - if (length < parsed.demanded.length) { - throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`); - } - const totalCommands = parsed.demanded.length + parsed.optional.length; - if (length > totalCommands) { - throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`); - } - parsed.demanded.forEach(demanded => { - const arg = args.shift(); - const observedType = guessType(arg); - const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*'); - if (matchingTypes.length === 0) - argumentTypeError(observedType, demanded.cmd, position); - position += 1; - }); - parsed.optional.forEach(optional => { - if (args.length === 0) - return; - const arg = args.shift(); - const observedType = guessType(arg); - const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*'); - if (matchingTypes.length === 0) - argumentTypeError(observedType, optional.cmd, position); - position += 1; - }); - } - catch (err) { - console.warn(err.stack); - } -} -function guessType(arg) { - if (Array.isArray(arg)) { - return 'array'; - } - else if (arg === null) { - return 'null'; - } - return typeof arg; -} -function argumentTypeError(observedType, allowedTypes, position) { - throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`); -} - -function isPromise(maybePromise) { - return (!!maybePromise && - !!maybePromise.then && - typeof maybePromise.then === 'function'); -} - -function assertNotStrictEqual(actual, expected, shim, message) { - shim.assert.notStrictEqual(actual, expected, message); -} -function assertSingleKey(actual, shim) { - shim.assert.strictEqual(typeof actual, 'string'); -} -function objectKeys(object) { - return Object.keys(object); -} - -function objFilter(original = {}, filter = () => true) { - const obj = {}; - objectKeys(original).forEach(key => { - if (filter(key, original[key])) { - obj[key] = original[key]; - } - }); - return obj; -} - -function globalMiddlewareFactory(globalMiddleware, context) { - return function (callback, applyBeforeValidation = false) { - argsert(' [boolean]', [callback, applyBeforeValidation], arguments.length); - if (Array.isArray(callback)) { - for (let i = 0; i < callback.length; i++) { - if (typeof callback[i] !== 'function') { - throw Error('middleware must be a function'); - } - callback[i].applyBeforeValidation = applyBeforeValidation; - } - Array.prototype.push.apply(globalMiddleware, callback); - } - else if (typeof callback === 'function') { - callback.applyBeforeValidation = applyBeforeValidation; - globalMiddleware.push(callback); - } - return context; - }; -} -function commandMiddlewareFactory(commandMiddleware) { - if (!commandMiddleware) - return []; - return commandMiddleware.map(middleware => { - middleware.applyBeforeValidation = false; - return middleware; - }); -} -function applyMiddleware(argv, yargs, middlewares, beforeValidation) { - const beforeValidationError = new Error('middleware cannot return a promise when applyBeforeValidation is true'); - return middlewares.reduce((acc, middleware) => { - if (middleware.applyBeforeValidation !== beforeValidation) { - return acc; - } - if (isPromise(acc)) { - return acc - .then(initialObj => Promise.all([ - initialObj, - middleware(initialObj, yargs), - ])) - .then(([initialObj, middlewareObj]) => Object.assign(initialObj, middlewareObj)); - } - else { - const result = middleware(acc, yargs); - if (beforeValidation && isPromise(result)) - throw beforeValidationError; - return isPromise(result) - ? result.then(middlewareObj => Object.assign(acc, middlewareObj)) - : Object.assign(acc, result); - } - }, argv); -} - -function getProcessArgvBinIndex() { - if (isBundledElectronApp()) - return 0; - return 1; -} -function isBundledElectronApp() { - return isElectronApp() && !process.defaultApp; -} -function isElectronApp() { - return !!process.versions.electron; -} -function hideBin(argv) { - return argv.slice(getProcessArgvBinIndex() + 1); -} -function getProcessArgvBin() { - return process.argv[getProcessArgvBinIndex()]; -} - -var processArgv = /*#__PURE__*/Object.freeze({ - __proto__: null, - hideBin: hideBin, - getProcessArgvBin: getProcessArgvBin -}); - -function whichModule(exported) { - if (false) - {} - for (let i = 0, files = Object.keys(__nccwpck_require__.c), mod; i < files.length; i++) { - mod = __nccwpck_require__.c[files[i]]; - if (mod.exports === exported) - return mod; - } - return null; -} - -const DEFAULT_MARKER = /(^\*)|(^\$0)/; -function command(yargs, usage, validation, globalMiddleware = [], shim) { - const self = {}; - let handlers = {}; - let aliasMap = {}; - let defaultCommand; - self.addHandler = function addHandler(cmd, description, builder, handler, commandMiddleware, deprecated) { - let aliases = []; - const middlewares = commandMiddlewareFactory(commandMiddleware); - handler = handler || (() => { }); - if (Array.isArray(cmd)) { - if (isCommandAndAliases(cmd)) { - [cmd, ...aliases] = cmd; - } - else { - for (const command of cmd) { - self.addHandler(command); - } - } - } - else if (isCommandHandlerDefinition(cmd)) { - let command = Array.isArray(cmd.command) || typeof cmd.command === 'string' - ? cmd.command - : moduleName(cmd); - if (cmd.aliases) - command = [].concat(command).concat(cmd.aliases); - self.addHandler(command, extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares, cmd.deprecated); - return; - } - else if (isCommandBuilderDefinition(builder)) { - self.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares, builder.deprecated); - return; - } - if (typeof cmd === 'string') { - const parsedCommand = parseCommand(cmd); - aliases = aliases.map(alias => parseCommand(alias).cmd); - let isDefault = false; - const parsedAliases = [parsedCommand.cmd].concat(aliases).filter(c => { - if (DEFAULT_MARKER.test(c)) { - isDefault = true; - return false; - } - return true; - }); - if (parsedAliases.length === 0 && isDefault) - parsedAliases.push('$0'); - if (isDefault) { - parsedCommand.cmd = parsedAliases[0]; - aliases = parsedAliases.slice(1); - cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd); - } - aliases.forEach(alias => { - aliasMap[alias] = parsedCommand.cmd; - }); - if (description !== false) { - usage.command(cmd, description, isDefault, aliases, deprecated); - } - handlers[parsedCommand.cmd] = { - original: cmd, - description, - handler, - builder: builder || {}, - middlewares, - deprecated, - demanded: parsedCommand.demanded, - optional: parsedCommand.optional, - }; - if (isDefault) - defaultCommand = handlers[parsedCommand.cmd]; - } - }; - self.addDirectory = function addDirectory(dir, context, req, callerFile, opts) { - opts = opts || {}; - if (typeof opts.recurse !== 'boolean') - opts.recurse = false; - if (!Array.isArray(opts.extensions)) - opts.extensions = ['js']; - const parentVisit = typeof opts.visit === 'function' ? opts.visit : (o) => o; - opts.visit = function visit(obj, joined, filename) { - const visited = parentVisit(obj, joined, filename); - if (visited) { - if (~context.files.indexOf(joined)) - return visited; - context.files.push(joined); - self.addHandler(visited); - } - return visited; - }; - shim.requireDirectory({ require: req, filename: callerFile }, dir, opts); - }; - function moduleName(obj) { - const mod = whichModule(obj); - if (!mod) - throw new Error(`No command name given for module: ${shim.inspect(obj)}`); - return commandFromFilename(mod.filename); - } - function commandFromFilename(filename) { - return shim.path.basename(filename, shim.path.extname(filename)); - } - function extractDesc({ describe, description, desc, }) { - for (const test of [describe, description, desc]) { - if (typeof test === 'string' || test === false) - return test; - assertNotStrictEqual(test, true, shim); - } - return false; - } - self.getCommands = () => Object.keys(handlers).concat(Object.keys(aliasMap)); - self.getCommandHandlers = () => handlers; - self.hasDefaultCommand = () => !!defaultCommand; - self.runCommand = function runCommand(command, yargs, parsed, commandIndex) { - let aliases = parsed.aliases; - const commandHandler = handlers[command] || handlers[aliasMap[command]] || defaultCommand; - const currentContext = yargs.getContext(); - let numFiles = currentContext.files.length; - const parentCommands = currentContext.commands.slice(); - let innerArgv = parsed.argv; - let positionalMap = {}; - if (command) { - currentContext.commands.push(command); - currentContext.fullCommands.push(commandHandler.original); - } - const builder = commandHandler.builder; - if (isCommandBuilderCallback(builder)) { - const builderOutput = builder(yargs.reset(parsed.aliases)); - const innerYargs = isYargsInstance(builderOutput) ? builderOutput : yargs; - if (shouldUpdateUsage(innerYargs)) { - innerYargs - .getUsageInstance() - .usage(usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description); - } - innerArgv = innerYargs._parseArgs(null, null, true, commandIndex); - aliases = innerYargs.parsed.aliases; - } - else if (isCommandBuilderOptionDefinitions(builder)) { - const innerYargs = yargs.reset(parsed.aliases); - if (shouldUpdateUsage(innerYargs)) { - innerYargs - .getUsageInstance() - .usage(usageFromParentCommandsCommandHandler(parentCommands, commandHandler), commandHandler.description); - } - Object.keys(commandHandler.builder).forEach(key => { - innerYargs.option(key, builder[key]); - }); - innerArgv = innerYargs._parseArgs(null, null, true, commandIndex); - aliases = innerYargs.parsed.aliases; - } - if (!yargs._hasOutput()) { - positionalMap = populatePositionals(commandHandler, innerArgv, currentContext); - } - const middlewares = globalMiddleware - .slice(0) - .concat(commandHandler.middlewares); - applyMiddleware(innerArgv, yargs, middlewares, true); - if (!yargs._hasOutput()) { - yargs._runValidation(innerArgv, aliases, positionalMap, yargs.parsed.error, !command); - } - if (commandHandler.handler && !yargs._hasOutput()) { - yargs._setHasOutput(); - const populateDoubleDash = !!yargs.getOptions().configuration['populate--']; - yargs._postProcess(innerArgv, populateDoubleDash); - innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false); - let handlerResult; - if (isPromise(innerArgv)) { - handlerResult = innerArgv.then(argv => commandHandler.handler(argv)); - } - else { - handlerResult = commandHandler.handler(innerArgv); - } - const handlerFinishCommand = yargs.getHandlerFinishCommand(); - if (isPromise(handlerResult)) { - yargs.getUsageInstance().cacheHelpMessage(); - handlerResult - .then(value => { - if (handlerFinishCommand) { - handlerFinishCommand(value); - } - }) - .catch(error => { - try { - yargs.getUsageInstance().fail(null, error); - } - catch (err) { - } - }) - .then(() => { - yargs.getUsageInstance().clearCachedHelpMessage(); - }); - } - else { - if (handlerFinishCommand) { - handlerFinishCommand(handlerResult); - } - } - } - if (command) { - currentContext.commands.pop(); - currentContext.fullCommands.pop(); - } - numFiles = currentContext.files.length - numFiles; - if (numFiles > 0) - currentContext.files.splice(numFiles * -1, numFiles); - return innerArgv; - }; - function shouldUpdateUsage(yargs) { - return (!yargs.getUsageInstance().getUsageDisabled() && - yargs.getUsageInstance().getUsage().length === 0); - } - function usageFromParentCommandsCommandHandler(parentCommands, commandHandler) { - const c = DEFAULT_MARKER.test(commandHandler.original) - ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() - : commandHandler.original; - const pc = parentCommands.filter(c => { - return !DEFAULT_MARKER.test(c); - }); - pc.push(c); - return `$0 ${pc.join(' ')}`; - } - self.runDefaultBuilderOn = function (yargs) { - assertNotStrictEqual(defaultCommand, undefined, shim); - if (shouldUpdateUsage(yargs)) { - const commandString = DEFAULT_MARKER.test(defaultCommand.original) - ? defaultCommand.original - : defaultCommand.original.replace(/^[^[\]<>]*/, '$0 '); - yargs.getUsageInstance().usage(commandString, defaultCommand.description); - } - const builder = defaultCommand.builder; - if (isCommandBuilderCallback(builder)) { - builder(yargs); - } - else if (!isCommandBuilderDefinition(builder)) { - Object.keys(builder).forEach(key => { - yargs.option(key, builder[key]); - }); - } - }; - function populatePositionals(commandHandler, argv, context) { - argv._ = argv._.slice(context.commands.length); - const demanded = commandHandler.demanded.slice(0); - const optional = commandHandler.optional.slice(0); - const positionalMap = {}; - validation.positionalCount(demanded.length, argv._.length); - while (demanded.length) { - const demand = demanded.shift(); - populatePositional(demand, argv, positionalMap); - } - while (optional.length) { - const maybe = optional.shift(); - populatePositional(maybe, argv, positionalMap); - } - argv._ = context.commands.concat(argv._.map(a => '' + a)); - postProcessPositionals(argv, positionalMap, self.cmdToParseOptions(commandHandler.original)); - return positionalMap; - } - function populatePositional(positional, argv, positionalMap) { - const cmd = positional.cmd[0]; - if (positional.variadic) { - positionalMap[cmd] = argv._.splice(0).map(String); - } - else { - if (argv._.length) - positionalMap[cmd] = [String(argv._.shift())]; - } - } - function postProcessPositionals(argv, positionalMap, parseOptions) { - const options = Object.assign({}, yargs.getOptions()); - options.default = Object.assign(parseOptions.default, options.default); - for (const key of Object.keys(parseOptions.alias)) { - options.alias[key] = (options.alias[key] || []).concat(parseOptions.alias[key]); - } - options.array = options.array.concat(parseOptions.array); - options.config = {}; - const unparsed = []; - Object.keys(positionalMap).forEach(key => { - positionalMap[key].map(value => { - if (options.configuration['unknown-options-as-args']) - options.key[key] = true; - unparsed.push(`--${key}`); - unparsed.push(value); - }); - }); - if (!unparsed.length) - return; - const config = Object.assign({}, options.configuration, { - 'populate--': true, - }); - const parsed = shim.Parser.detailed(unparsed, Object.assign({}, options, { - configuration: config, - })); - if (parsed.error) { - yargs.getUsageInstance().fail(parsed.error.message, parsed.error); - } - else { - const positionalKeys = Object.keys(positionalMap); - Object.keys(positionalMap).forEach(key => { - positionalKeys.push(...parsed.aliases[key]); - }); - Object.keys(parsed.argv).forEach(key => { - if (positionalKeys.indexOf(key) !== -1) { - if (!positionalMap[key]) - positionalMap[key] = parsed.argv[key]; - argv[key] = parsed.argv[key]; - } - }); - } - } - self.cmdToParseOptions = function (cmdString) { - const parseOptions = { - array: [], - default: {}, - alias: {}, - demand: {}, - }; - const parsed = parseCommand(cmdString); - parsed.demanded.forEach(d => { - const [cmd, ...aliases] = d.cmd; - if (d.variadic) { - parseOptions.array.push(cmd); - parseOptions.default[cmd] = []; - } - parseOptions.alias[cmd] = aliases; - parseOptions.demand[cmd] = true; - }); - parsed.optional.forEach(o => { - const [cmd, ...aliases] = o.cmd; - if (o.variadic) { - parseOptions.array.push(cmd); - parseOptions.default[cmd] = []; - } - parseOptions.alias[cmd] = aliases; - }); - return parseOptions; - }; - self.reset = () => { - handlers = {}; - aliasMap = {}; - defaultCommand = undefined; - return self; - }; - const frozens = []; - self.freeze = () => { - frozens.push({ - handlers, - aliasMap, - defaultCommand, - }); - }; - self.unfreeze = () => { - const frozen = frozens.pop(); - assertNotStrictEqual(frozen, undefined, shim); - ({ handlers, aliasMap, defaultCommand } = frozen); - }; - return self; -} -function isCommandBuilderDefinition(builder) { - return (typeof builder === 'object' && - !!builder.builder && - typeof builder.handler === 'function'); -} -function isCommandAndAliases(cmd) { - if (cmd.every(c => typeof c === 'string')) { - return true; - } - else { - return false; - } -} -function isCommandBuilderCallback(builder) { - return typeof builder === 'function'; -} -function isCommandBuilderOptionDefinitions(builder) { - return typeof builder === 'object'; -} -function isCommandHandlerDefinition(cmd) { - return typeof cmd === 'object' && !Array.isArray(cmd); -} - -function setBlocking(blocking) { - if (typeof process === 'undefined') - return; - [process.stdout, process.stderr].forEach(_stream => { - const stream = _stream; - if (stream._handle && - stream.isTTY && - typeof stream._handle.setBlocking === 'function') { - stream._handle.setBlocking(blocking); - } - }); -} - -function usage(yargs, y18n, shim) { - const __ = y18n.__; - const self = {}; - const fails = []; - self.failFn = function failFn(f) { - fails.push(f); - }; - let failMessage = null; - let showHelpOnFail = true; - self.showHelpOnFail = function showHelpOnFailFn(arg1 = true, arg2) { - function parseFunctionArgs() { - return typeof arg1 === 'string' ? [true, arg1] : [arg1, arg2]; - } - const [enabled, message] = parseFunctionArgs(); - failMessage = message; - showHelpOnFail = enabled; - return self; - }; - let failureOutput = false; - self.fail = function fail(msg, err) { - const logger = yargs._getLoggerInstance(); - if (fails.length) { - for (let i = fails.length - 1; i >= 0; --i) { - fails[i](msg, err, self); - } - } - else { - if (yargs.getExitProcess()) - setBlocking(true); - if (!failureOutput) { - failureOutput = true; - if (showHelpOnFail) { - yargs.showHelp('error'); - logger.error(); - } - if (msg || err) - logger.error(msg || err); - if (failMessage) { - if (msg || err) - logger.error(''); - logger.error(failMessage); - } - } - err = err || new YError(msg); - if (yargs.getExitProcess()) { - return yargs.exit(1); - } - else if (yargs._hasParseCallback()) { - return yargs.exit(1, err); - } - else { - throw err; - } - } - }; - let usages = []; - let usageDisabled = false; - self.usage = (msg, description) => { - if (msg === null) { - usageDisabled = true; - usages = []; - return self; - } - usageDisabled = false; - usages.push([msg, description || '']); - return self; - }; - self.getUsage = () => { - return usages; - }; - self.getUsageDisabled = () => { - return usageDisabled; - }; - self.getPositionalGroupName = () => { - return __('Positionals:'); - }; - let examples = []; - self.example = (cmd, description) => { - examples.push([cmd, description || '']); - }; - let commands = []; - self.command = function command(cmd, description, isDefault, aliases, deprecated = false) { - if (isDefault) { - commands = commands.map(cmdArray => { - cmdArray[2] = false; - return cmdArray; - }); - } - commands.push([cmd, description || '', isDefault, aliases, deprecated]); - }; - self.getCommands = () => commands; - let descriptions = {}; - self.describe = function describe(keyOrKeys, desc) { - if (Array.isArray(keyOrKeys)) { - keyOrKeys.forEach(k => { - self.describe(k, desc); - }); - } - else if (typeof keyOrKeys === 'object') { - Object.keys(keyOrKeys).forEach(k => { - self.describe(k, keyOrKeys[k]); - }); - } - else { - descriptions[keyOrKeys] = desc; - } - }; - self.getDescriptions = () => descriptions; - let epilogs = []; - self.epilog = msg => { - epilogs.push(msg); - }; - let wrapSet = false; - let wrap; - self.wrap = cols => { - wrapSet = true; - wrap = cols; - }; - function getWrap() { - if (!wrapSet) { - wrap = windowWidth(); - wrapSet = true; - } - return wrap; - } - const deferY18nLookupPrefix = '__yargsString__:'; - self.deferY18nLookup = str => deferY18nLookupPrefix + str; - self.help = function help() { - if (cachedHelpMessage) - return cachedHelpMessage; - normalizeAliases(); - const base$0 = yargs.customScriptName - ? yargs.$0 - : shim.path.basename(yargs.$0); - const demandedOptions = yargs.getDemandedOptions(); - const demandedCommands = yargs.getDemandedCommands(); - const deprecatedOptions = yargs.getDeprecatedOptions(); - const groups = yargs.getGroups(); - const options = yargs.getOptions(); - let keys = []; - keys = keys.concat(Object.keys(descriptions)); - keys = keys.concat(Object.keys(demandedOptions)); - keys = keys.concat(Object.keys(demandedCommands)); - keys = keys.concat(Object.keys(options.default)); - keys = keys.filter(filterHiddenOptions); - keys = Object.keys(keys.reduce((acc, key) => { - if (key !== '_') - acc[key] = true; - return acc; - }, {})); - const theWrap = getWrap(); - const ui = shim.cliui({ - width: theWrap, - wrap: !!theWrap, - }); - if (!usageDisabled) { - if (usages.length) { - usages.forEach(usage => { - ui.div(`${usage[0].replace(/\$0/g, base$0)}`); - if (usage[1]) { - ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] }); - } - }); - ui.div(); - } - else if (commands.length) { - let u = null; - if (demandedCommands._) { - u = `${base$0} <${__('command')}>\n`; - } - else { - u = `${base$0} [${__('command')}]\n`; - } - ui.div(`${u}`); - } - } - if (commands.length) { - ui.div(__('Commands:')); - const context = yargs.getContext(); - const parentCommands = context.commands.length - ? `${context.commands.join(' ')} ` - : ''; - if (yargs.getParserConfiguration()['sort-commands'] === true) { - commands = commands.sort((a, b) => a[0].localeCompare(b[0])); - } - commands.forEach(command => { - const commandString = `${base$0} ${parentCommands}${command[0].replace(/^\$0 ?/, '')}`; - ui.span({ - text: commandString, - padding: [0, 2, 0, 2], - width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4, - }, { text: command[1] }); - const hints = []; - if (command[2]) - hints.push(`[${__('default')}]`); - if (command[3] && command[3].length) { - hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`); - } - if (command[4]) { - if (typeof command[4] === 'string') { - hints.push(`[${__('deprecated: %s', command[4])}]`); - } - else { - hints.push(`[${__('deprecated')}]`); - } - } - if (hints.length) { - ui.div({ - text: hints.join(' '), - padding: [0, 0, 0, 2], - align: 'right', - }); - } - else { - ui.div(); - } - }); - ui.div(); - } - const aliasKeys = (Object.keys(options.alias) || []).concat(Object.keys(yargs.parsed.newAliases) || []); - keys = keys.filter(key => !yargs.parsed.newAliases[key] && - aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1)); - const defaultGroup = __('Options:'); - if (!groups[defaultGroup]) - groups[defaultGroup] = []; - addUngroupedKeys(keys, options.alias, groups, defaultGroup); - const isLongSwitch = (sw) => /^--/.test(getText(sw)); - const displayedGroups = Object.keys(groups) - .filter(groupName => groups[groupName].length > 0) - .map(groupName => { - const normalizedKeys = groups[groupName] - .filter(filterHiddenOptions) - .map(key => { - if (~aliasKeys.indexOf(key)) - return key; - for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { - if (~(options.alias[aliasKey] || []).indexOf(key)) - return aliasKey; - } - return key; - }); - return { groupName, normalizedKeys }; - }) - .filter(({ normalizedKeys }) => normalizedKeys.length > 0) - .map(({ groupName, normalizedKeys }) => { - const switches = normalizedKeys.reduce((acc, key) => { - acc[key] = [key] - .concat(options.alias[key] || []) - .map(sw => { - if (groupName === self.getPositionalGroupName()) - return sw; - else { - return ((/^[0-9]$/.test(sw) - ? ~options.boolean.indexOf(key) - ? '-' - : '--' - : sw.length > 1 - ? '--' - : '-') + sw); - } - }) - .sort((sw1, sw2) => isLongSwitch(sw1) === isLongSwitch(sw2) - ? 0 - : isLongSwitch(sw1) - ? 1 - : -1) - .join(', '); - return acc; - }, {}); - return { groupName, normalizedKeys, switches }; - }); - const shortSwitchesUsed = displayedGroups - .filter(({ groupName }) => groupName !== self.getPositionalGroupName()) - .some(({ normalizedKeys, switches }) => !normalizedKeys.every(key => isLongSwitch(switches[key]))); - if (shortSwitchesUsed) { - displayedGroups - .filter(({ groupName }) => groupName !== self.getPositionalGroupName()) - .forEach(({ normalizedKeys, switches }) => { - normalizedKeys.forEach(key => { - if (isLongSwitch(switches[key])) { - switches[key] = addIndentation(switches[key], '-x, '.length); - } - }); - }); - } - displayedGroups.forEach(({ groupName, normalizedKeys, switches }) => { - ui.div(groupName); - normalizedKeys.forEach(key => { - const kswitch = switches[key]; - let desc = descriptions[key] || ''; - let type = null; - if (~desc.lastIndexOf(deferY18nLookupPrefix)) - desc = __(desc.substring(deferY18nLookupPrefix.length)); - if (~options.boolean.indexOf(key)) - type = `[${__('boolean')}]`; - if (~options.count.indexOf(key)) - type = `[${__('count')}]`; - if (~options.string.indexOf(key)) - type = `[${__('string')}]`; - if (~options.normalize.indexOf(key)) - type = `[${__('string')}]`; - if (~options.array.indexOf(key)) - type = `[${__('array')}]`; - if (~options.number.indexOf(key)) - type = `[${__('number')}]`; - const deprecatedExtra = (deprecated) => typeof deprecated === 'string' - ? `[${__('deprecated: %s', deprecated)}]` - : `[${__('deprecated')}]`; - const extra = [ - key in deprecatedOptions - ? deprecatedExtra(deprecatedOptions[key]) - : null, - type, - key in demandedOptions ? `[${__('required')}]` : null, - options.choices && options.choices[key] - ? `[${__('choices:')} ${self.stringifiedValues(options.choices[key])}]` - : null, - defaultString(options.default[key], options.defaultDescription[key]), - ] - .filter(Boolean) - .join(' '); - ui.span({ - text: getText(kswitch), - padding: [0, 2, 0, 2 + getIndentation(kswitch)], - width: maxWidth(switches, theWrap) + 4, - }, desc); - if (extra) - ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }); - else - ui.div(); - }); - ui.div(); - }); - if (examples.length) { - ui.div(__('Examples:')); - examples.forEach(example => { - example[0] = example[0].replace(/\$0/g, base$0); - }); - examples.forEach(example => { - if (example[1] === '') { - ui.div({ - text: example[0], - padding: [0, 2, 0, 2], - }); - } - else { - ui.div({ - text: example[0], - padding: [0, 2, 0, 2], - width: maxWidth(examples, theWrap) + 4, - }, { - text: example[1], - }); - } - }); - ui.div(); - } - if (epilogs.length > 0) { - const e = epilogs - .map(epilog => epilog.replace(/\$0/g, base$0)) - .join('\n'); - ui.div(`${e}\n`); - } - return ui.toString().replace(/\s*$/, ''); - }; - function maxWidth(table, theWrap, modifier) { - let width = 0; - if (!Array.isArray(table)) { - table = Object.values(table).map(v => [v]); - } - table.forEach(v => { - width = Math.max(shim.stringWidth(modifier ? `${modifier} ${getText(v[0])}` : getText(v[0])) + getIndentation(v[0]), width); - }); - if (theWrap) - width = Math.min(width, parseInt((theWrap * 0.5).toString(), 10)); - return width; - } - function normalizeAliases() { - const demandedOptions = yargs.getDemandedOptions(); - const options = yargs.getOptions(); - (Object.keys(options.alias) || []).forEach(key => { - options.alias[key].forEach(alias => { - if (descriptions[alias]) - self.describe(key, descriptions[alias]); - if (alias in demandedOptions) - yargs.demandOption(key, demandedOptions[alias]); - if (~options.boolean.indexOf(alias)) - yargs.boolean(key); - if (~options.count.indexOf(alias)) - yargs.count(key); - if (~options.string.indexOf(alias)) - yargs.string(key); - if (~options.normalize.indexOf(alias)) - yargs.normalize(key); - if (~options.array.indexOf(alias)) - yargs.array(key); - if (~options.number.indexOf(alias)) - yargs.number(key); - }); - }); - } - let cachedHelpMessage; - self.cacheHelpMessage = function () { - cachedHelpMessage = this.help(); - }; - self.clearCachedHelpMessage = function () { - cachedHelpMessage = undefined; - }; - function addUngroupedKeys(keys, aliases, groups, defaultGroup) { - let groupedKeys = []; - let toCheck = null; - Object.keys(groups).forEach(group => { - groupedKeys = groupedKeys.concat(groups[group]); - }); - keys.forEach(key => { - toCheck = [key].concat(aliases[key]); - if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) { - groups[defaultGroup].push(key); - } - }); - return groupedKeys; - } - function filterHiddenOptions(key) { - return (yargs.getOptions().hiddenOptions.indexOf(key) < 0 || - yargs.parsed.argv[yargs.getOptions().showHiddenOpt]); - } - self.showHelp = (level) => { - const logger = yargs._getLoggerInstance(); - if (!level) - level = 'error'; - const emit = typeof level === 'function' ? level : logger[level]; - emit(self.help()); - }; - self.functionDescription = fn => { - const description = fn.name - ? shim.Parser.decamelize(fn.name, '-') - : __('generated-value'); - return ['(', description, ')'].join(''); - }; - self.stringifiedValues = function stringifiedValues(values, separator) { - let string = ''; - const sep = separator || ', '; - const array = [].concat(values); - if (!values || !array.length) - return string; - array.forEach(value => { - if (string.length) - string += sep; - string += JSON.stringify(value); - }); - return string; - }; - function defaultString(value, defaultDescription) { - let string = `[${__('default:')} `; - if (value === undefined && !defaultDescription) - return null; - if (defaultDescription) { - string += defaultDescription; - } - else { - switch (typeof value) { - case 'string': - string += `"${value}"`; - break; - case 'object': - string += JSON.stringify(value); - break; - default: - string += value; - } - } - return `${string}]`; - } - function windowWidth() { - const maxWidth = 80; - if (shim.process.stdColumns) { - return Math.min(maxWidth, shim.process.stdColumns); - } - else { - return maxWidth; - } - } - let version = null; - self.version = ver => { - version = ver; - }; - self.showVersion = () => { - const logger = yargs._getLoggerInstance(); - logger.log(version); - }; - self.reset = function reset(localLookup) { - failMessage = null; - failureOutput = false; - usages = []; - usageDisabled = false; - epilogs = []; - examples = []; - commands = []; - descriptions = objFilter(descriptions, k => !localLookup[k]); - return self; - }; - const frozens = []; - self.freeze = function freeze() { - frozens.push({ - failMessage, - failureOutput, - usages, - usageDisabled, - epilogs, - examples, - commands, - descriptions, - }); - }; - self.unfreeze = function unfreeze() { - const frozen = frozens.pop(); - assertNotStrictEqual(frozen, undefined, shim); - ({ - failMessage, - failureOutput, - usages, - usageDisabled, - epilogs, - examples, - commands, - descriptions, - } = frozen); - }; - return self; -} -function isIndentedText(text) { - return typeof text === 'object'; -} -function addIndentation(text, indent) { - return isIndentedText(text) - ? { text: text.text, indentation: text.indentation + indent } - : { text, indentation: indent }; -} -function getIndentation(text) { - return isIndentedText(text) ? text.indentation : 0; -} -function getText(text) { - return isIndentedText(text) ? text.text : text; -} - -const completionShTemplate = `###-begin-{{app_name}}-completions-### +'use strict';var child_process=require('child_process'),fs=require('fs'),path=require('path'),url=require('url'),os$1=require('os');var Gy=Object.create;var yi=Object.defineProperty;var Jy=Object.getOwnPropertyDescriptor;var Zy=Object.getOwnPropertyNames;var Ky=Object.getPrototypeOf,Qy=Object.prototype.hasOwnProperty;var U=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Xy=(e,t)=>()=>(e&&(t=e(e=0)),t);var B=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),e1=(e,t)=>{for(var r in t)yi(e,r,{get:t[r],enumerable:!0});},qu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Zy(t))!Qy.call(e,s)&&s!==r&&yi(e,s,{get:()=>t[s],enumerable:!(n=Jy(t,s))||n.enumerable});return e};var Qs=(e,t,r)=>(r=e!=null?Gy(Ky(e)):{},qu(!e||!e.__esModule?yi(r,"default",{value:e,enumerable:!0}):r,e)),Yu=e=>qu(yi({},"__esModule",{value:!0}),e);var Wu=B((Xs,Nr)=>{(function(e,t){typeof Xs=="object"&&typeof Nr<"u"?Nr.exports=t():typeof define=="function"&&define.amd?define(t):e.moment=t();})(Xs,function(){var e;function t(){return e.apply(null,arguments)}function r(i){e=i;}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function s(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function o(i,a){return Object.prototype.hasOwnProperty.call(i,a)}function u(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var a;for(a in i)if(o(i,a))return !1;return !0}function c(i){return i===void 0}function d(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function g(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function m(i,a){var l=[],f,p=i.length;for(f=0;f>>0,f;for(f=0;f0)for(l=0;l=0;return (b?l?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+f}var K=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ye=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,de={},Ye={};function R(i,a,l,f){var p=f;typeof f=="string"&&(p=function(){return this[f]()}),i&&(Ye[i]=p),a&&(Ye[a[0]]=function(){return G(p.apply(this,arguments),a[1],a[2])}),l&&(Ye[l]=function(){return this.localeData().ordinal(p.apply(this,arguments),i)});}function Ke(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function Ne(i){var a=i.match(K),l,f;for(l=0,f=a.length;l=0&&ye.test(i);)i=i.replace(ye,f),ye.lastIndex=0,l-=1;return i}var we={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function le(i){var a=this._longDateFormat[i],l=this._longDateFormat[i.toUpperCase()];return a||!l?a:(this._longDateFormat[i]=l.match(K).map(function(f){return f==="MMMM"||f==="MM"||f==="DD"||f==="dddd"?f.slice(1):f}).join(""),this._longDateFormat[i])}var ve="Invalid date";function Ce(){return this._invalidDate}var E="%d",S=/\d{1,2}/;function h(i){return this._ordinal.replace("%d",i)}var v={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function T(i,a,l,f){var p=this._relativeTime[l];return Z(p)?p(i,a,l,f):p.replace(/%d/i,i)}function A(i,a){var l=this._relativeTime[i>0?"future":"past"];return Z(l)?l(a):l.replace(/%s/i,a)}var O={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function z(i){return typeof i=="string"?O[i]||O[i.toLowerCase()]:void 0}function Q(i){var a={},l,f;for(f in i)o(i,f)&&(l=z(f),l&&(a[l]=i[f]));return a}var re={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ae(i){var a=[],l;for(l in i)o(i,l)&&a.push({unit:l,priority:re[l]});return a.sort(function(f,p){return f.priority-p.priority}),a}var Fe=/\d/,Pe=/\d\d/,cn=/\d{3}/,Cr=/\d{4}/,Te=/[+-]?\d{6}/,pe=/\d\d?/,Dt=/\d\d\d\d?/,ei=/\d\d\d\d\d\d?/,ti=/\d{1,3}/,Ts=/\d{1,4}/,ri=/[+-]?\d{1,6}/,br=/\d+/,ni=/[+-]?\d+/,hg=/Z|[+-]\d\d:?\d\d/gi,ii=/Z|[+-]\d\d(?::?\d\d)?/gi,pg=/[+-]?\d+(\.\d{1,3})?/,ln=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Or=/^[1-9]\d?/,js=/^([1-9]\d|\d)/,si;si={};function se(i,a,l){si[i]=Z(a)?a:function(f,p){return f&&l?l:a};}function mg(i,a){return o(si,i)?si[i](a._strict,a._locale):new RegExp(gg(i))}function gg(i){return It(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,l,f,p,b){return l||f||p||b}))}function It(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function at(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function me(i){var a=+i,l=0;return a!==0&&isFinite(a)&&(l=at(a)),l}var Is={};function Se(i,a){var l,f=a,p;for(typeof i=="string"&&(i=[i]),d(a)&&(f=function(b,N){N[a]=me(b);}),p=i.length,l=0;l68?1900:2e3)};var ru=xr("FullYear",!0);function vg(){return oi(this.year())}function xr(i,a){return function(l){return l!=null?(nu(this,i,l),t.updateOffset(this,a),this):hn(this,i)}}function hn(i,a){if(!i.isValid())return NaN;var l=i._d,f=i._isUTC;switch(a){case"Milliseconds":return f?l.getUTCMilliseconds():l.getMilliseconds();case"Seconds":return f?l.getUTCSeconds():l.getSeconds();case"Minutes":return f?l.getUTCMinutes():l.getMinutes();case"Hours":return f?l.getUTCHours():l.getHours();case"Date":return f?l.getUTCDate():l.getDate();case"Day":return f?l.getUTCDay():l.getDay();case"Month":return f?l.getUTCMonth():l.getMonth();case"FullYear":return f?l.getUTCFullYear():l.getFullYear();default:return NaN}}function nu(i,a,l){var f,p,b,N,ne;if(!(!i.isValid()||isNaN(l))){switch(f=i._d,p=i._isUTC,a){case"Milliseconds":return void(p?f.setUTCMilliseconds(l):f.setMilliseconds(l));case"Seconds":return void(p?f.setUTCSeconds(l):f.setSeconds(l));case"Minutes":return void(p?f.setUTCMinutes(l):f.setMinutes(l));case"Hours":return void(p?f.setUTCHours(l):f.setHours(l));case"Date":return void(p?f.setUTCDate(l):f.setDate(l));case"FullYear":break;default:return}b=l,N=i.month(),ne=i.date(),ne=ne===29&&N===1&&!oi(b)?28:ne,p?f.setUTCFullYear(b,N,ne):f.setFullYear(b,N,ne);}}function Eg(i){return i=z(i),Z(this[i])?this[i]():this}function _g(i,a){if(typeof i=="object"){i=Q(i);var l=Ae(i),f,p=l.length;for(f=0;f=0?(ne=new Date(i+400,a,l,f,p,b,N),isFinite(ne.getFullYear())&&ne.setFullYear(i)):ne=new Date(i,a,l,f,p,b,N),ne}function pn(i){var a,l;return i<100&&i>=0?(l=Array.prototype.slice.call(arguments),l[0]=i+400,a=new Date(Date.UTC.apply(null,l)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(i)):a=new Date(Date.UTC.apply(null,arguments)),a}function ai(i,a,l){var f=7+a-l,p=(7+pn(i,0,f).getUTCDay()-a)%7;return -p+f-1}function cu(i,a,l,f,p){var b=(7+l-f)%7,N=ai(i,f,p),ne=1+7*(a-1)+b+N,ue,ge;return ne<=0?(ue=i-1,ge=dn(ue)+ne):ne>dn(i)?(ue=i+1,ge=ne-dn(i)):(ue=i,ge=ne),{year:ue,dayOfYear:ge}}function mn(i,a,l){var f=ai(i.year(),a,l),p=Math.floor((i.dayOfYear()-f-1)/7)+1,b,N;return p<1?(N=i.year()-1,b=p+$t(N,a,l)):p>$t(i.year(),a,l)?(b=p-$t(i.year(),a,l),N=i.year()+1):(N=i.year(),b=p),{week:b,year:N}}function $t(i,a,l){var f=ai(i,a,l),p=ai(i+1,a,l);return (dn(i)-f+p)/7}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),se("w",pe,Or),se("ww",pe,Pe),se("W",pe,Or),se("WW",pe,Pe),fn(["w","ww","W","WW"],function(i,a,l,f){a[f.substr(0,1)]=me(i);});function Lg(i){return mn(i,this._week.dow,this._week.doy).week}var $g={dow:0,doy:6};function kg(){return this._week.dow}function Pg(){return this._week.doy}function Rg(i){var a=this.localeData().week(this);return i==null?a:this.add((i-a)*7,"d")}function Bg(i){var a=mn(this,1,4).week;return i==null?a:this.add((i-a)*7,"d")}R("d",0,"do","day"),R("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),R("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),R("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),se("d",pe),se("e",pe),se("E",pe),se("dd",function(i,a){return a.weekdaysMinRegex(i)}),se("ddd",function(i,a){return a.weekdaysShortRegex(i)}),se("dddd",function(i,a){return a.weekdaysRegex(i)}),fn(["dd","ddd","dddd"],function(i,a,l,f){var p=l._locale.weekdaysParse(i,f,l._strict);p!=null?a.d=p:C(l).invalidWeekday=i;}),fn(["d","e","E"],function(i,a,l,f){a[f]=me(i);});function qg(i,a){return typeof i!="string"?i:isNaN(i)?(i=a.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function Yg(i,a){return typeof i=="string"?a.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Ls(i,a){return i.slice(a,7).concat(i.slice(0,a))}var Wg="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),lu="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ug="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zg=ln,Hg=ln,Vg=ln;function Gg(i,a){var l=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(a)?"format":"standalone"];return i===!0?Ls(l,this._week.dow):i?l[i.day()]:l}function Jg(i){return i===!0?Ls(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function Zg(i){return i===!0?Ls(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function Kg(i,a,l){var f,p,b,N=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)b=y([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(b,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(b,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(b,"").toLocaleLowerCase();return l?a==="dddd"?(p=Ie.call(this._weekdaysParse,N),p!==-1?p:null):a==="ddd"?(p=Ie.call(this._shortWeekdaysParse,N),p!==-1?p:null):(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null):a==="dddd"?(p=Ie.call(this._weekdaysParse,N),p!==-1||(p=Ie.call(this._shortWeekdaysParse,N),p!==-1)?p:(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null)):a==="ddd"?(p=Ie.call(this._shortWeekdaysParse,N),p!==-1||(p=Ie.call(this._weekdaysParse,N),p!==-1)?p:(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null)):(p=Ie.call(this._minWeekdaysParse,N),p!==-1||(p=Ie.call(this._weekdaysParse,N),p!==-1)?p:(p=Ie.call(this._shortWeekdaysParse,N),p!==-1?p:null))}function Qg(i,a,l){var f,p,b;if(this._weekdaysParseExact)return Kg.call(this,i,a,l);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),f=0;f<7;f++){if(p=y([2e3,1]).day(f),l&&!this._fullWeekdaysParse[f]&&(this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[f]||(b="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[f]=new RegExp(b.replace(".",""),"i")),l&&a==="dddd"&&this._fullWeekdaysParse[f].test(i))return f;if(l&&a==="ddd"&&this._shortWeekdaysParse[f].test(i))return f;if(l&&a==="dd"&&this._minWeekdaysParse[f].test(i))return f;if(!l&&this._weekdaysParse[f].test(i))return f}}function Xg(i){if(!this.isValid())return i!=null?this:NaN;var a=hn(this,"Day");return i!=null?(i=qg(i,this.localeData()),this.add(i-a,"d")):a}function eD(i){if(!this.isValid())return i!=null?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return i==null?a:this.add(i-a,"d")}function tD(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var a=Yg(i,this.localeData());return this.day(this.day()%7?a:a-7)}else return this.day()||7}function rD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=zg),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function nD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Hg),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function iD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Vg),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $s(){function i(Ge,qt){return qt.length-Ge.length}var a=[],l=[],f=[],p=[],b,N,ne,ue,ge;for(b=0;b<7;b++)N=y([2e3,1]).day(b),ne=It(this.weekdaysMin(N,"")),ue=It(this.weekdaysShort(N,"")),ge=It(this.weekdays(N,"")),a.push(ne),l.push(ue),f.push(ge),p.push(ne),p.push(ue),p.push(ge);a.sort(i),l.sort(i),f.sort(i),p.sort(i),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i");}function ks(){return this.hours()%12||12}function sD(){return this.hours()||24}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,ks),R("k",["kk",2],0,sD),R("hmm",0,0,function(){return ""+ks.apply(this)+G(this.minutes(),2)}),R("hmmss",0,0,function(){return ""+ks.apply(this)+G(this.minutes(),2)+G(this.seconds(),2)}),R("Hmm",0,0,function(){return ""+this.hours()+G(this.minutes(),2)}),R("Hmmss",0,0,function(){return ""+this.hours()+G(this.minutes(),2)+G(this.seconds(),2)});function fu(i,a){R(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)});}fu("a",!0),fu("A",!1);function du(i,a){return a._meridiemParse}se("a",du),se("A",du),se("H",pe,js),se("h",pe,Or),se("k",pe,Or),se("HH",pe,Pe),se("hh",pe,Pe),se("kk",pe,Pe),se("hmm",Dt),se("hmmss",ei),se("Hmm",Dt),se("Hmmss",ei),Se(["H","HH"],ke),Se(["k","kk"],function(i,a,l){var f=me(i);a[ke]=f===24?0:f;}),Se(["a","A"],function(i,a,l){l._isPm=l._locale.isPM(i),l._meridiem=i;}),Se(["h","hh"],function(i,a,l){a[ke]=me(i),C(l).bigHour=!0;}),Se("hmm",function(i,a,l){var f=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f)),C(l).bigHour=!0;}),Se("hmmss",function(i,a,l){var f=i.length-4,p=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f,2)),a[Lt]=me(i.substr(p)),C(l).bigHour=!0;}),Se("Hmm",function(i,a,l){var f=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f));}),Se("Hmmss",function(i,a,l){var f=i.length-4,p=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f,2)),a[Lt]=me(i.substr(p));});function oD(i){return (i+"").toLowerCase().charAt(0)==="p"}var aD=/[ap]\.?m?\.?/i,uD=xr("Hours",!0);function cD(i,a,l){return i>11?l?"pm":"PM":l?"am":"AM"}var hu={calendar:W,longDateFormat:we,invalidDate:ve,ordinal:E,dayOfMonthOrdinalParse:S,relativeTime:v,months:Sg,monthsShort:iu,week:$g,weekdays:Wg,weekdaysMin:Ug,weekdaysShort:lu,meridiemParse:aD},Oe={},gn={},Dn;function lD(i,a){var l,f=Math.min(i.length,a.length);for(l=0;l0;){if(p=ui(b.slice(0,l).join("-")),p)return p;if(f&&f.length>=l&&lD(b,f)>=l-1)break;l--;}a++;}return Dn}function dD(i){return !!(i&&i.match("^[^/\\\\]*$"))}function ui(i){var a=null,l;if(Oe[i]===void 0&&typeof Nr<"u"&&Nr&&Nr.exports&&dD(i))try{a=Dn._abbr,l=U,l("./locale/"+i),Gt(a);}catch{Oe[i]=null;}return Oe[i]}function Gt(i,a){var l;return i&&(c(a)?l=kt(i):l=Ps(i,a),l?Dn=l:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),Dn._abbr}function Ps(i,a){if(a!==null){var l,f=hu;if(a.abbr=i,Oe[i]!=null)ee("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),f=Oe[i]._config;else if(a.parentLocale!=null)if(Oe[a.parentLocale]!=null)f=Oe[a.parentLocale]._config;else if(l=ui(a.parentLocale),l!=null)f=l._config;else return gn[a.parentLocale]||(gn[a.parentLocale]=[]),gn[a.parentLocale].push({name:i,config:a}),null;return Oe[i]=new V(Y(f,a)),gn[i]&&gn[i].forEach(function(p){Ps(p.name,p.config);}),Gt(i),Oe[i]}else return delete Oe[i],null}function hD(i,a){if(a!=null){var l,f,p=hu;Oe[i]!=null&&Oe[i].parentLocale!=null?Oe[i].set(Y(Oe[i]._config,a)):(f=ui(i),f!=null&&(p=f._config),a=Y(p,a),f==null&&(a.abbr=i),l=new V(a),l.parentLocale=Oe[i],Oe[i]=l),Gt(i);}else Oe[i]!=null&&(Oe[i].parentLocale!=null?(Oe[i]=Oe[i].parentLocale,i===Gt()&&Gt(i)):Oe[i]!=null&&delete Oe[i]);return Oe[i]}function kt(i){var a;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return Dn;if(!n(i)){if(a=ui(i),a)return a;i=[i];}return fD(i)}function pD(){return I(Oe)}function Rs(i){var a,l=i._a;return l&&C(i).overflow===-2&&(a=l[Nt]<0||l[Nt]>11?Nt:l[bt]<1||l[bt]>Ns(l[He],l[Nt])?bt:l[ke]<0||l[ke]>24||l[ke]===24&&(l[yt]!==0||l[Lt]!==0||l[lr]!==0)?ke:l[yt]<0||l[yt]>59?yt:l[Lt]<0||l[Lt]>59?Lt:l[lr]<0||l[lr]>999?lr:-1,C(i)._overflowDayOfYear&&(abt)&&(a=bt),C(i)._overflowWeeks&&a===-1&&(a=yg),C(i)._overflowWeekday&&a===-1&&(a=wg),C(i).overflow=a),i}var mD=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gD=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,DD=/Z|[+-]\d\d(?::?\d\d)?/,ci=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Bs=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yD=/^\/?Date\((-?\d+)/i,wD=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vD={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function mu(i){var a,l,f=i._i,p=mD.exec(f)||gD.exec(f),b,N,ne,ue,ge=ci.length,Ge=Bs.length;if(p){for(C(i).iso=!0,a=0,l=ge;adn(N)||i._dayOfYear===0)&&(C(i)._overflowDayOfYear=!0),l=pn(N,0,i._dayOfYear),i._a[Nt]=l.getUTCMonth(),i._a[bt]=l.getUTCDate()),a=0;a<3&&i._a[a]==null;++a)i._a[a]=f[a]=p[a];for(;a<7;a++)i._a[a]=f[a]=i._a[a]==null?a===2?1:0:i._a[a];i._a[ke]===24&&i._a[yt]===0&&i._a[Lt]===0&&i._a[lr]===0&&(i._nextDay=!0,i._a[ke]=0),i._d=(i._useUTC?pn:Ng).apply(null,f),b=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ke]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==b&&(C(i).weekdayMismatch=!0);}}function xD(i){var a,l,f,p,b,N,ne,ue,ge;a=i._w,a.GG!=null||a.W!=null||a.E!=null?(b=1,N=4,l=Ar(a.GG,i._a[He],mn(be(),1,4).year),f=Ar(a.W,1),p=Ar(a.E,1),(p<1||p>7)&&(ue=!0)):(b=i._locale._week.dow,N=i._locale._week.doy,ge=mn(be(),b,N),l=Ar(a.gg,i._a[He],ge.year),f=Ar(a.w,ge.week),a.d!=null?(p=a.d,(p<0||p>6)&&(ue=!0)):a.e!=null?(p=a.e+b,(a.e<0||a.e>6)&&(ue=!0)):p=b),f<1||f>$t(l,b,N)?C(i)._overflowWeeks=!0:ue!=null?C(i)._overflowWeekday=!0:(ne=cu(l,f,p,b,N),i._a[He]=ne.year,i._dayOfYear=ne.dayOfYear);}t.ISO_8601=function(){},t.RFC_2822=function(){};function Ys(i){if(i._f===t.ISO_8601){mu(i);return}if(i._f===t.RFC_2822){gu(i);return}i._a=[],C(i).empty=!0;var a=""+i._i,l,f,p,b,N,ne=a.length,ue=0,ge,Ge;for(p=ie(i._f,i._locale).match(K)||[],Ge=p.length,l=0;l0&&C(i).unusedInput.push(N),a=a.slice(a.indexOf(f)+f.length),ue+=f.length),Ye[b]?(f?C(i).empty=!1:C(i).unusedTokens.push(b),Dg(b,f,i)):i._strict&&!f&&C(i).unusedTokens.push(b);C(i).charsLeftOver=ne-ue,a.length>0&&C(i).unusedInput.push(a),i._a[ke]<=12&&C(i).bigHour===!0&&i._a[ke]>0&&(C(i).bigHour=void 0),C(i).parsedDateParts=i._a.slice(0),C(i).meridiem=i._meridiem,i._a[ke]=AD(i._locale,i._a[ke],i._meridiem),ge=C(i).era,ge!==null&&(i._a[He]=i._locale.erasConvertYear(ge,i._a[He])),qs(i),Rs(i);}function AD(i,a,l){var f;return l==null?a:i.meridiemHour!=null?i.meridiemHour(a,l):(i.isPM!=null&&(f=i.isPM(l),f&&a<12&&(a+=12),!f&&a===12&&(a=0)),a)}function MD(i){var a,l,f,p,b,N,ne=!1,ue=i._f.length;if(ue===0){C(i).invalidFormat=!0,i._d=new Date(NaN);return}for(p=0;pthis?this:i:$()});function wu(i,a){var l,f;if(a.length===1&&n(a[0])&&(a=a[0]),!a.length)return be();for(l=a[0],f=1;fthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function KD(){if(!c(this._isDSTShifted))return this._isDSTShifted;var i={},a;return M(i,this),i=Du(i),i._a?(a=i._isUTC?y(i._a):be(i._a),this._isDSTShifted=this.isValid()&&YD(i._a,a.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function QD(){return this.isValid()?!this._isUTC:!1}function XD(){return this.isValid()?this._isUTC:!1}function Eu(){return this.isValid()?this._isUTC&&this._offset===0:!1}var e0=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,t0=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function wt(i,a){var l=i,f=null,p,b,N;return fi(i)?l={ms:i._milliseconds,d:i._days,M:i._months}:d(i)||!isNaN(+i)?(l={},a?l[a]=+i:l.milliseconds=+i):(f=e0.exec(i))?(p=f[1]==="-"?-1:1,l={y:0,d:me(f[bt])*p,h:me(f[ke])*p,m:me(f[yt])*p,s:me(f[Lt])*p,ms:me(Ws(f[lr]*1e3))*p}):(f=t0.exec(i))?(p=f[1]==="-"?-1:1,l={y:fr(f[2],p),M:fr(f[3],p),w:fr(f[4],p),d:fr(f[5],p),h:fr(f[6],p),m:fr(f[7],p),s:fr(f[8],p)}):l==null?l={}:typeof l=="object"&&("from"in l||"to"in l)&&(N=r0(be(l.from),be(l.to)),l={},l.ms=N.milliseconds,l.M=N.months),b=new li(l),fi(i)&&o(i,"_locale")&&(b._locale=i._locale),fi(i)&&o(i,"_isValid")&&(b._isValid=i._isValid),b}wt.fn=li.prototype,wt.invalid=qD;function fr(i,a){var l=i&&parseFloat(i.replace(",","."));return (isNaN(l)?0:l)*a}function _u(i,a){var l={};return l.months=a.month()-i.month()+(a.year()-i.year())*12,i.clone().add(l.months,"M").isAfter(a)&&--l.months,l.milliseconds=+a-+i.clone().add(l.months,"M"),l}function r0(i,a){var l;return i.isValid()&&a.isValid()?(a=zs(a,i),i.isBefore(a)?l=_u(i,a):(l=_u(a,i),l.milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0}}function Fu(i,a){return function(l,f){var p,b;return f!==null&&!isNaN(+f)&&(ee(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),b=l,l=f,f=b),p=wt(l,f),Su(this,p,i),this}}function Su(i,a,l,f){var p=a._milliseconds,b=Ws(a._days),N=Ws(a._months);i.isValid()&&(f=f??!0,N&&ou(i,hn(i,"Month")+N*l),b&&nu(i,"Date",hn(i,"Date")+b*l),p&&i._d.setTime(i._d.valueOf()+p*l),f&&t.updateOffset(i,b||N));}var n0=Fu(1,"add"),i0=Fu(-1,"subtract");function Cu(i){return typeof i=="string"||i instanceof String}function s0(i){return J(i)||g(i)||Cu(i)||d(i)||a0(i)||o0(i)||i===null||i===void 0}function o0(i){var a=s(i)&&!u(i),l=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,b,N=f.length;for(p=0;pl.valueOf():l.valueOf()9999?Ct(l,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Z(Date.prototype.toISOString)?a?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ct(l,"Z")):Ct(l,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function E0(){if(!this.isValid())return "moment.invalid(/* "+this._i+" */)";var i="moment",a="",l,f,p,b;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",a="Z"),l="["+i+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",b=a+'[")]',this.format(l+f+p+b)}function _0(i){i||(i=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var a=Ct(this,i);return this.localeData().postformat(a)}function F0(i,a){return this.isValid()&&(J(i)&&i.isValid()||be(i).isValid())?wt({to:this,from:i}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function S0(i){return this.from(be(),i)}function C0(i,a){return this.isValid()&&(J(i)&&i.isValid()||be(i).isValid())?wt({from:this,to:i}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function b0(i){return this.to(be(),i)}function bu(i){var a;return i===void 0?this._locale._abbr:(a=kt(i),a!=null&&(this._locale=a),this)}var Ou=te("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function xu(){return this._locale}var hi=1e3,Mr=60*hi,pi=60*Mr,Au=(365*400+97)*24*pi;function Tr(i,a){return (i%a+a)%a}function Mu(i,a,l){return i<100&&i>=0?new Date(i+400,a,l)-Au:new Date(i,a,l).valueOf()}function Tu(i,a,l){return i<100&&i>=0?Date.UTC(i+400,a,l)-Au:Date.UTC(i,a,l)}function O0(i){var a,l;if(i=z(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Tu:Mu,i){case"year":a=l(this.year(),0,1);break;case"quarter":a=l(this.year(),this.month()-this.month()%3,1);break;case"month":a=l(this.year(),this.month(),1);break;case"week":a=l(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=l(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=Tr(a+(this._isUTC?0:this.utcOffset()*Mr),pi);break;case"minute":a=this._d.valueOf(),a-=Tr(a,Mr);break;case"second":a=this._d.valueOf(),a-=Tr(a,hi);break}return this._d.setTime(a),t.updateOffset(this,!0),this}function x0(i){var a,l;if(i=z(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Tu:Mu,i){case"year":a=l(this.year()+1,0,1)-1;break;case"quarter":a=l(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=l(this.year(),this.month()+1,1)-1;break;case"week":a=l(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=l(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=pi-Tr(a+(this._isUTC?0:this.utcOffset()*Mr),pi)-1;break;case"minute":a=this._d.valueOf(),a+=Mr-Tr(a,Mr)-1;break;case"second":a=this._d.valueOf(),a+=hi-Tr(a,hi)-1;break}return this._d.setTime(a),t.updateOffset(this,!0),this}function A0(){return this._d.valueOf()-(this._offset||0)*6e4}function M0(){return Math.floor(this.valueOf()/1e3)}function T0(){return new Date(this.valueOf())}function j0(){var i=this;return [i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function I0(){var i=this;return {years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function N0(){return this.isValid()?this.toISOString():null}function L0(){return j(this)}function $0(){return D({},C(this))}function k0(){return C(this).overflow}function P0(){return {input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),se("N",Vs),se("NN",Vs),se("NNN",Vs),se("NNNN",J0),se("NNNNN",Z0),Se(["N","NN","NNN","NNNN","NNNNN"],function(i,a,l,f){var p=l._locale.erasParse(i,f,l._strict);p?C(l).era=p:C(l).invalidEra=i;}),se("y",br),se("yy",br),se("yyy",br),se("yyyy",br),se("yo",K0),Se(["y","yy","yyy","yyyy"],He),Se(["yo"],function(i,a,l,f){var p;l._locale._eraYearOrdinalRegex&&(p=i.match(l._locale._eraYearOrdinalRegex)),l._locale.eraYearOrdinalParse?a[He]=l._locale.eraYearOrdinalParse(i,p):a[He]=parseInt(i,10);});function R0(i,a){var l,f,p,b=this._eras||kt("en")._eras;for(l=0,f=b.length;l=0)return b[f]}function q0(i,a){var l=i.since<=i.until?1:-1;return a===void 0?t(i.since).year():t(i.since).year()+(a-i.offset)*l}function Y0(){var i,a,l,f=this.localeData().eras();for(i=0,a=f.length;ib&&(a=b),iy.call(this,i,a,l,f,p))}function iy(i,a,l,f,p){var b=cu(i,a,l,f,p),N=pn(b.year,0,b.dayOfYear);return this.year(N.getUTCFullYear()),this.month(N.getUTCMonth()),this.date(N.getUTCDate()),this}R("Q",0,"Qo","quarter"),se("Q",Fe),Se("Q",function(i,a){a[Nt]=(me(i)-1)*3;});function sy(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}R("D",["DD",2],"Do","date"),se("D",pe,Or),se("DD",pe,Pe),se("Do",function(i,a){return i?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient}),Se(["D","DD"],bt),Se("Do",function(i,a){a[bt]=me(i.match(pe)[0]);});var Iu=xr("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),se("DDD",ti),se("DDDD",cn),Se(["DDD","DDDD"],function(i,a,l){l._dayOfYear=me(i);});function oy(i){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?a:this.add(i-a,"d")}R("m",["mm",2],0,"minute"),se("m",pe,js),se("mm",pe,Pe),Se(["m","mm"],yt);var ay=xr("Minutes",!1);R("s",["ss",2],0,"second"),se("s",pe,js),se("ss",pe,Pe),Se(["s","ss"],Lt);var uy=xr("Seconds",!1);R("S",0,0,function(){return ~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return ~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return this.millisecond()*10}),R(0,["SSSSS",5],0,function(){return this.millisecond()*100}),R(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),R(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),R(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),R(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),se("S",ti,Fe),se("SS",ti,Pe),se("SSS",ti,cn);var Jt,Nu;for(Jt="SSSS";Jt.length<=9;Jt+="S")se(Jt,br);function cy(i,a){a[lr]=me(("0."+i)*1e3);}for(Jt="S";Jt.length<=9;Jt+="S")Se(Jt,cy);Nu=xr("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");function ly(){return this._isUTC?"UTC":""}function fy(){return this._isUTC?"Coordinated Universal Time":""}var H=P.prototype;H.add=n0,H.calendar=l0,H.clone=f0,H.diff=y0,H.endOf=x0,H.format=_0,H.from=F0,H.fromNow=S0,H.to=C0,H.toNow=b0,H.get=Eg,H.invalidAt=k0,H.isAfter=d0,H.isBefore=h0,H.isBetween=p0,H.isSame=m0,H.isSameOrAfter=g0,H.isSameOrBefore=D0,H.isValid=L0,H.lang=Ou,H.locale=bu,H.localeData=xu,H.max=LD,H.min=ND,H.parsingFlags=$0,H.set=_g,H.startOf=O0,H.subtract=i0,H.toArray=j0,H.toObject=I0,H.toDate=T0,H.toISOString=v0,H.inspect=E0,typeof Symbol<"u"&&Symbol.for!=null&&(H[Symbol.for("nodejs.util.inspect.custom")]=function(){return "Moment<"+this.format()+">"}),H.toJSON=N0,H.toString=w0,H.unix=M0,H.valueOf=A0,H.creationData=P0,H.eraName=Y0,H.eraNarrow=W0,H.eraAbbr=U0,H.eraYear=z0,H.year=ru,H.isLeapYear=vg,H.weekYear=Q0,H.isoWeekYear=X0,H.quarter=H.quarters=sy,H.month=au,H.daysInMonth=Tg,H.week=H.weeks=Rg,H.isoWeek=H.isoWeeks=Bg,H.weeksInYear=ry,H.weeksInWeekYear=ny,H.isoWeeksInYear=ey,H.isoWeeksInISOWeekYear=ty,H.date=Iu,H.day=H.days=Xg,H.weekday=eD,H.isoWeekday=tD,H.dayOfYear=oy,H.hour=H.hours=uD,H.minute=H.minutes=ay,H.second=H.seconds=uy,H.millisecond=H.milliseconds=Nu,H.utcOffset=UD,H.utc=HD,H.local=VD,H.parseZone=GD,H.hasAlignedHourOffset=JD,H.isDST=ZD,H.isLocal=QD,H.isUtcOffset=XD,H.isUtc=Eu,H.isUTC=Eu,H.zoneAbbr=ly,H.zoneName=fy,H.dates=te("dates accessor is deprecated. Use date instead.",Iu),H.months=te("months accessor is deprecated. Use month instead",au),H.years=te("years accessor is deprecated. Use year instead",ru),H.zone=te("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zD),H.isDSTShifted=te("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",KD);function dy(i){return be(i*1e3)}function hy(){return be.apply(null,arguments).parseZone()}function Lu(i){return i}var Ee=V.prototype;Ee.calendar=k,Ee.longDateFormat=le,Ee.invalidDate=Ce,Ee.ordinal=h,Ee.preparse=Lu,Ee.postformat=Lu,Ee.relativeTime=T,Ee.pastFuture=A,Ee.set=q,Ee.eras=R0,Ee.erasParse=B0,Ee.erasConvertYear=q0,Ee.erasAbbrRegex=V0,Ee.erasNameRegex=H0,Ee.erasNarrowRegex=G0,Ee.months=Og,Ee.monthsShort=xg,Ee.monthsParse=Mg,Ee.monthsRegex=Ig,Ee.monthsShortRegex=jg,Ee.week=Lg,Ee.firstDayOfYear=Pg,Ee.firstDayOfWeek=kg,Ee.weekdays=Gg,Ee.weekdaysMin=Zg,Ee.weekdaysShort=Jg,Ee.weekdaysParse=Qg,Ee.weekdaysRegex=rD,Ee.weekdaysShortRegex=nD,Ee.weekdaysMinRegex=iD,Ee.isPM=oD,Ee.meridiem=cD;function gi(i,a,l,f){var p=kt(),b=y().set(f,a);return p[l](b,i)}function $u(i,a,l){if(d(i)&&(a=i,i=void 0),i=i||"",a!=null)return gi(i,a,l,"month");var f,p=[];for(f=0;f<12;f++)p[f]=gi(i,f,l,"month");return p}function Js(i,a,l,f){typeof i=="boolean"?(d(a)&&(l=a,a=void 0),a=a||""):(a=i,l=a,i=!1,d(a)&&(l=a,a=void 0),a=a||"");var p=kt(),b=i?p._week.dow:0,N,ne=[];if(l!=null)return gi(a,(l+b)%7,f,"day");for(N=0;N<7;N++)ne[N]=gi(a,(N+b)%7,f,"day");return ne}function py(i,a){return $u(i,a,"months")}function my(i,a){return $u(i,a,"monthsShort")}function gy(i,a,l){return Js(i,a,l,"weekdays")}function Dy(i,a,l){return Js(i,a,l,"weekdaysShort")}function yy(i,a,l){return Js(i,a,l,"weekdaysMin")}Gt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var a=i%10,l=me(i%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return i+l}}),t.lang=te("moment.lang is deprecated. Use moment.locale instead.",Gt),t.langData=te("moment.langData is deprecated. Use moment.localeData instead.",kt);var Pt=Math.abs;function wy(){var i=this._data;return this._milliseconds=Pt(this._milliseconds),this._days=Pt(this._days),this._months=Pt(this._months),i.milliseconds=Pt(i.milliseconds),i.seconds=Pt(i.seconds),i.minutes=Pt(i.minutes),i.hours=Pt(i.hours),i.months=Pt(i.months),i.years=Pt(i.years),this}function ku(i,a,l,f){var p=wt(a,l);return i._milliseconds+=f*p._milliseconds,i._days+=f*p._days,i._months+=f*p._months,i._bubble()}function vy(i,a){return ku(this,i,a,1)}function Ey(i,a){return ku(this,i,a,-1)}function Pu(i){return i<0?Math.floor(i):Math.ceil(i)}function _y(){var i=this._milliseconds,a=this._days,l=this._months,f=this._data,p,b,N,ne,ue;return i>=0&&a>=0&&l>=0||i<=0&&a<=0&&l<=0||(i+=Pu(Zs(l)+a)*864e5,a=0,l=0),f.milliseconds=i%1e3,p=at(i/1e3),f.seconds=p%60,b=at(p/60),f.minutes=b%60,N=at(b/60),f.hours=N%24,a+=at(N/24),ue=at(Ru(a)),l+=ue,a-=Pu(Zs(ue)),ne=at(l/12),l%=12,f.days=a,f.months=l,f.years=ne,this}function Ru(i){return i*4800/146097}function Zs(i){return i*146097/4800}function Fy(i){if(!this.isValid())return NaN;var a,l,f=this._milliseconds;if(i=z(i),i==="month"||i==="quarter"||i==="year")switch(a=this._days+f/864e5,l=this._months+Ru(a),i){case"month":return l;case"quarter":return l/3;case"year":return l/12}else switch(a=this._days+Math.round(Zs(this._months)),i){case"week":return a/7+f/6048e5;case"day":return a+f/864e5;case"hour":return a*24+f/36e5;case"minute":return a*1440+f/6e4;case"second":return a*86400+f/1e3;case"millisecond":return Math.floor(a*864e5)+f;default:throw new Error("Unknown unit "+i)}}function Rt(i){return function(){return this.as(i)}}var Bu=Rt("ms"),Sy=Rt("s"),Cy=Rt("m"),by=Rt("h"),Oy=Rt("d"),xy=Rt("w"),Ay=Rt("M"),My=Rt("Q"),Ty=Rt("y"),jy=Bu;function Iy(){return wt(this)}function Ny(i){return i=z(i),this.isValid()?this[i+"s"]():NaN}function dr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Ly=dr("milliseconds"),$y=dr("seconds"),ky=dr("minutes"),Py=dr("hours"),Ry=dr("days"),By=dr("months"),qy=dr("years");function Yy(){return at(this.days()/7)}var Bt=Math.round,jr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Wy(i,a,l,f,p){return p.relativeTime(a||1,!!l,i,f)}function Uy(i,a,l,f){var p=wt(i).abs(),b=Bt(p.as("s")),N=Bt(p.as("m")),ne=Bt(p.as("h")),ue=Bt(p.as("d")),ge=Bt(p.as("M")),Ge=Bt(p.as("w")),qt=Bt(p.as("y")),Zt=b<=l.ss&&["s",b]||b0,Zt[4]=f,Wy.apply(null,Zt)}function zy(i){return i===void 0?Bt:typeof i=="function"?(Bt=i,!0):!1}function Hy(i,a){return jr[i]===void 0?!1:a===void 0?jr[i]:(jr[i]=a,i==="s"&&(jr.ss=a-1),!0)}function Vy(i,a){if(!this.isValid())return this.localeData().invalidDate();var l=!1,f=jr,p,b;return typeof i=="object"&&(a=i,i=!1),typeof i=="boolean"&&(l=i),typeof a=="object"&&(f=Object.assign({},jr,a),a.s!=null&&a.ss==null&&(f.ss=a.s-1)),p=this.localeData(),b=Uy(this,!l,f,p),l&&(b=p.pastFuture(+this,b)),p.postformat(b)}var Ks=Math.abs;function Ir(i){return (i>0)-(i<0)||+i}function Di(){if(!this.isValid())return this.localeData().invalidDate();var i=Ks(this._milliseconds)/1e3,a=Ks(this._days),l=Ks(this._months),f,p,b,N,ne=this.asSeconds(),ue,ge,Ge,qt;return ne?(f=at(i/60),p=at(f/60),i%=60,f%=60,b=at(l/12),l%=12,N=i?i.toFixed(3).replace(/\.?0+$/,""):"",ue=ne<0?"-":"",ge=Ir(this._months)!==Ir(ne)?"-":"",Ge=Ir(this._days)!==Ir(ne)?"-":"",qt=Ir(this._milliseconds)!==Ir(ne)?"-":"",ue+"P"+(b?ge+b+"Y":"")+(l?ge+l+"M":"")+(a?Ge+a+"D":"")+(p||f||i?"T":"")+(p?qt+p+"H":"")+(f?qt+f+"M":"")+(i?qt+N+"S":"")):"P0D"}var De=li.prototype;De.isValid=BD,De.abs=wy,De.add=vy,De.subtract=Ey,De.as=Fy,De.asMilliseconds=Bu,De.asSeconds=Sy,De.asMinutes=Cy,De.asHours=by,De.asDays=Oy,De.asWeeks=xy,De.asMonths=Ay,De.asQuarters=My,De.asYears=Ty,De.valueOf=jy,De._bubble=_y,De.clone=Iy,De.get=Ny,De.milliseconds=Ly,De.seconds=$y,De.minutes=ky,De.hours=Py,De.days=Ry,De.weeks=Yy,De.months=By,De.years=qy,De.humanize=Vy,De.toISOString=Di,De.toString=Di,De.toJSON=Di,De.locale=bu,De.localeData=xu,De.toIsoString=te("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Di),De.lang=Ou,R("X",0,0,"unix"),R("x",0,0,"valueOf"),se("x",ni),se("X",pg),Se("X",function(i,a,l){l._d=new Date(parseFloat(i)*1e3);}),Se("x",function(i,a,l){l._d=new Date(me(i));});return t.version="2.30.1",r(be),t.fn=H,t.min=$D,t.max=kD,t.now=PD,t.utc=y,t.unix=dy,t.months=py,t.isDate=g,t.locale=Gt,t.invalid=$,t.duration=wt,t.isMoment=J,t.weekdays=gy,t.parseZone=hy,t.localeData=kt,t.isDuration=fi,t.monthsShort=my,t.weekdaysMin=yy,t.defineLocale=Ps,t.updateLocale=hD,t.locales=pD,t.weekdaysShort=Dy,t.normalizeUnits=z,t.relativeTimeRounding=zy,t.relativeTimeThreshold=Hy,t.calendarFormat=c0,t.prototype=H,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t});});var Mo={};e1(Mo,{all:()=>uo,allLimit:()=>co,allSeries:()=>lo,any:()=>yo,anyLimit:()=>wo,anySeries:()=>vo,apply:()=>Ju,applyEach:()=>tc,applyEachSeries:()=>rc,asyncify:()=>vi,auto:()=>Fo,autoInject:()=>nc,cargo:()=>ic,cargoQueue:()=>sc,compose:()=>oc,concat:()=>ro,concatLimit:()=>En,concatSeries:()=>no,constant:()=>ac,default:()=>ow,detect:()=>io,detectLimit:()=>so,detectSeries:()=>oo,dir:()=>cc,doDuring:()=>Ei,doUntil:()=>lc,doWhilst:()=>Ei,during:()=>bi,each:()=>ao,eachLimit:()=>_i,eachOf:()=>ut,eachOfLimit:()=>vn,eachOfSeries:()=>Ot,eachSeries:()=>Fi,ensureAsync:()=>bo,every:()=>uo,everyLimit:()=>co,everySeries:()=>lo,filter:()=>fo,filterLimit:()=>ho,filterSeries:()=>po,find:()=>io,findLimit:()=>so,findSeries:()=>oo,flatMap:()=>ro,flatMapLimit:()=>En,flatMapSeries:()=>no,foldl:()=>Lr,foldr:()=>go,forEach:()=>ao,forEachLimit:()=>_i,forEachOf:()=>ut,forEachOfLimit:()=>vn,forEachOfSeries:()=>Ot,forEachSeries:()=>Fi,forever:()=>dc,groupBy:()=>hc,groupByLimit:()=>Ti,groupBySeries:()=>pc,inject:()=>Lr,log:()=>mc,map:()=>Ai,mapLimit:()=>Sn,mapSeries:()=>_o,mapValues:()=>gc,mapValuesLimit:()=>ji,mapValuesSeries:()=>Dc,memoize:()=>yc,nextTick:()=>wc,parallel:()=>vc,parallelLimit:()=>Ec,priorityQueue:()=>_c,queue:()=>xo,race:()=>Fc,reduce:()=>Lr,reduceRight:()=>go,reflect:()=>Si,reflectAll:()=>Sc,reject:()=>Cc,rejectLimit:()=>bc,rejectSeries:()=>Oc,retry:()=>Ci,retryable:()=>Mc,select:()=>fo,selectLimit:()=>ho,selectSeries:()=>po,seq:()=>Co,series:()=>Tc,setImmediate:()=>Kt,some:()=>yo,someLimit:()=>wo,someSeries:()=>vo,sortBy:()=>jc,timeout:()=>Ic,times:()=>Nc,timesLimit:()=>Ii,timesSeries:()=>Lc,transform:()=>$c,tryEach:()=>kc,unmemoize:()=>Pc,until:()=>Rc,waterfall:()=>Bc,whilst:()=>bi,wrapSync:()=>vi});function Ju(e,...t){return (...r)=>e(...t,...r)}function _n(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}function Qu(e){setTimeout(e,0);}function Xu(e){return (t,...r)=>e(()=>t(...r))}function vi(e){return Fn(e)?function(...t){let r=t.pop(),n=e.apply(this,t);return Uu(n,r)}:_n(function(t,r){var n;try{n=e.apply(this,t);}catch(s){return r(s)}if(n&&typeof n.then=="function")return Uu(n,r);r(null,n);})}function Uu(e,t){return e.then(r=>{zu(t,null,r);},r=>{zu(t,r&&(r instanceof Error||r.message)?r:new Error(r));})}function zu(e,t,r){try{e(t,r);}catch(n){Kt(s=>{throw s},n);}}function Fn(e){return e[Symbol.toStringTag]==="AsyncFunction"}function r1(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function n1(e){return typeof e[Symbol.asyncIterator]=="function"}function he(e){if(typeof e!="function")throw new Error("expected a function");return Fn(e)?vi(e):e}function fe(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");function r(...n){return typeof n[t-1]=="function"?e.apply(this,n):new Promise((s,o)=>{n[t-1]=(u,...c)=>{if(u)return o(u);s(c.length>1?c:c[0]);},e.apply(this,n);})}return r}function ec(e){return function(r,...n){return fe(function(o){var u=this;return e(r,(c,d)=>{he(c).apply(u,n.concat(d));},o)})}}function Eo(e,t,r,n){t=t||[];var s=[],o=0,u=he(r);return e(t,(c,d,g)=>{var m=o++;u(c,(D,y)=>{s[m]=y,g(D);});},c=>{n(c,s);})}function Oi(e){return e&&typeof e.length=="number"&&e.length>=0&&e.length%1===0}function Qt(e){function t(...r){if(e!==null){var n=e;e=null,n.apply(this,r);}}return Object.assign(t,e),t}function s1(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function o1(e){var t=-1,r=e.length;return function(){return ++t=t||u||s||(u=!0,e.next().then(({value:y,done:F})=>{if(!(o||s)){if(u=!1,F){s=!0,c<=0&&n(null);return}c++,r(y,d,m),d++,g();}}).catch(D));}function m(y,F){if(c-=1,!o){if(y)return D(y);if(y===!1){s=!0,o=!0;return}if(F===xi||s&&c<=0)return s=!0,n(null);g();}}function D(y){o||(u=!1,s=!0,n(y));}g();}function l1(e,t,r,n){return vt(t)(e,he(r),n)}function f1(e,t,r){r=Qt(r);var n=0,s=0,{length:o}=e,u=!1;o===0&&r(null);function c(d,g){d===!1&&(u=!0),u!==!0&&(d?r(d):(++s===o||g===xi)&&r(null));}for(;n1?s:s[0]);}return r[kr]=new Promise((n,s)=>{e=n,t=s;}),r}function Fo(e,t,r){typeof t!="number"&&(r=t,t=null),r=Qt(r||$r());var n=Object.keys(e).length;if(!n)return r(null);t||(t=n);var s={},o=0,u=!1,c=!1,d=Object.create(null),g=[],m=[],D={};Object.keys(e).forEach(w=>{var M=e[w];if(!Array.isArray(M)){y(w,[M]),m.push(w);return}var P=M.slice(0,M.length-1),J=P.length;if(J===0){y(w,M),m.push(w);return}D[w]=J,P.forEach(X=>{if(!e[X])throw new Error("async.auto task `"+w+"` has a non-existent dependency `"+X+"` in "+P.join(", "));C(X,()=>{J--,J===0&&y(w,M);});});}),$(),F();function y(w,M){g.push(()=>j(w,M));}function F(){if(!u){if(g.length===0&&o===0)return r(null,s);for(;g.length&&oP()),F();}function j(w,M){if(!c){var P=Xt((X,...te)=>{if(o--,X===!1){u=!0;return}if(te.length<2&&([te]=te),X){var L={};if(Object.keys(s).forEach(ee=>{L[ee]=s[ee];}),L[w]=te,c=!0,d=Object.create(null),u)return;r(X,L);}else s[w]=te,_(w);});o++;var J=he(M[M.length-1]);M.length>1?J(s,P):J(P);}}function $(){for(var w,M=0;m.length;)w=m.pop(),M++,x(w).forEach(P=>{--D[P]===0&&m.push(P);});if(M!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function x(w){var M=[];return Object.keys(e).forEach(P=>{let J=e[P];Array.isArray(J)&&J.indexOf(w)>=0&&M.push(P);}),M}return r[kr]}function E1(e){let t="",r=0,n=e.indexOf("*/");for(;rs.replace(v1,"").trim())}function nc(e,t){var r={};return Object.keys(e).forEach(n=>{var s=e[n],o,u=Fn(s),c=!u&&s.length===1||u&&s.length===0;if(Array.isArray(s))o=[...s],s=o.pop(),r[n]=o.concat(o.length>0?d:s);else if(c)r[n]=s;else {if(o=_1(s),s.length===0&&!u&&o.length===0)throw new Error("autoInject task functions require explicit parameters.");u||o.pop(),r[n]=o.concat(d);}function d(g,m){var D=o.map(y=>g[y]);D.push(m),he(s)(...D);}}),Fo(r,t)}function Vu(e,t){e.length=1,e.head=e.tail=t;}function So(e,t,r){if(t==null)t=1;else if(t===0)throw new RangeError("Concurrency must not be zero");var n=he(e),s=0,o=[];let u={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function c(x,w){u[x].push(w);}function d(x,w){let M=(...P)=>{g(x,M),w(...P);};u[x].push(M);}function g(x,w){if(!x)return Object.keys(u).forEach(M=>u[M]=[]);if(!w)return u[x]=[];u[x]=u[x].filter(M=>M!==w);}function m(x,...w){u[x].forEach(M=>M(...w));}var D=!1;function y(x,w,M,P){if(P!=null&&typeof P!="function")throw new Error("task callback must be a function");$.started=!0;var J,X;function te(ee,...Z){if(ee)return M?X(ee):J();if(Z.length<=1)return J(Z[0]);J(Z);}var L=$._createTaskItem(x,M?te:P||te);if(w?$._tasks.unshift(L):$._tasks.push(L),D||(D=!0,Kt(()=>{D=!1,$.process();})),M||!P)return new Promise((ee,Z)=>{J=ee,X=Z;})}function F(x){return function(w,...M){s-=1;for(var P=0,J=x.length;P0&&o.splice(te,1),X.callback(w,...M),w!=null&&m("error",w,X.data);}s<=$.concurrency-$.buffer&&m("unsaturated"),$.idle()&&m("drain"),$.process();}}function C(x){return x.length===0&&$.idle()?(Kt(()=>m("drain")),!0):!1}let _=x=>w=>{if(!w)return new Promise((M,P)=>{d(x,(J,X)=>{if(J)return P(J);M(X);});});g(x),c(x,w);};var j=!1,$={_tasks:new to,_createTaskItem(x,w){return {data:x,callback:w}},*[Symbol.iterator](){yield*$._tasks[Symbol.iterator]();},concurrency:t,payload:r,buffer:t/4,started:!1,paused:!1,push(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!1,!1,w)):y(x,!1,!1,w)},pushAsync(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!1,!0,w)):y(x,!1,!0,w)},kill(){g(),$._tasks.empty();},unshift(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!0,!1,w)):y(x,!0,!1,w)},unshiftAsync(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!0,!0,w)):y(x,!0,!0,w)},remove(x){$._tasks.remove(x);},process(){if(!j){for(j=!0;!$.paused&&s<$.concurrency&&$._tasks.length;){var x=[],w=[],M=$._tasks.length;$.payload&&(M=Math.min(M,$.payload));for(var P=0;P{s(t,o,(d,g)=>{t=g,c(d);});},o=>n(o,t))}function Co(...e){var t=e.map(he);return function(...r){var n=this,s=r[r.length-1];return typeof s=="function"?r.pop():s=$r(),Lr(t,r,(o,u,c)=>{u.apply(n,o.concat((d,...g)=>{c(d,g);}));},(o,u)=>s(o,...u)),s[kr]}}function oc(...e){return Co(...e.reverse())}function S1(e,t,r,n){return Eo(vt(t),e,r,n)}function C1(e,t,r,n){var s=he(r);return Sn(e,t,(o,u)=>{s(o,(c,...d)=>c?u(c):u(c,d));},(o,u)=>{for(var c=[],d=0;d{var u=!1,c;let d=he(s);r(n,(g,m,D)=>{d(g,(y,F)=>{if(y||y===!1)return D(y);if(e(F)&&!c)return u=!0,c=t(!0,g),D(null,xi);D();});},g=>{if(g)return o(g);o(null,u?c:t(!1));});}}function x1(e,t,r){return Yt(n=>n,(n,s)=>s)(ut,e,t,r)}function A1(e,t,r,n){return Yt(s=>s,(s,o)=>o)(vt(t),e,r,n)}function M1(e,t,r){return Yt(n=>n,(n,s)=>s)(vt(1),e,t,r)}function uc(e){return (t,...r)=>he(t)(...r,(n,...s)=>{typeof console=="object"&&(n?console.error&&console.error(n):console[e]&&s.forEach(o=>console[e](o)));})}function T1(e,t,r){r=Xt(r);var n=he(e),s=he(t),o;function u(d,...g){if(d)return r(d);d!==!1&&(o=g,s(...g,c));}function c(d,g){if(d)return r(d);if(d!==!1){if(!g)return r(null,...o);n(u);}}return c(null,!0)}function lc(e,t,r){let n=he(t);return Ei(e,(...s)=>{let o=s.pop();n(...s,(u,c)=>o(u,!c));},r)}function fc(e){return (t,r,n)=>e(t,n)}function j1(e,t,r){return ut(e,fc(he(t)),r)}function I1(e,t,r,n){return vt(t)(e,fc(he(r)),n)}function N1(e,t,r){return _i(e,1,t,r)}function bo(e){return Fn(e)?e:function(...t){var r=t.pop(),n=!0;t.push((...s)=>{n?Kt(()=>r(...s)):r(...s);}),e.apply(this,t),n=!1;}}function L1(e,t,r){return Yt(n=>!n,n=>!n)(ut,e,t,r)}function $1(e,t,r,n){return Yt(s=>!s,s=>!s)(vt(t),e,r,n)}function k1(e,t,r){return Yt(n=>!n,n=>!n)(Ot,e,t,r)}function P1(e,t,r,n){var s=new Array(t.length);e(t,(o,u,c)=>{r(o,(d,g)=>{s[u]=!!g,c(d);});},o=>{if(o)return n(o);for(var u=[],c=0;c{r(o,(d,g)=>{if(d)return c(d);g&&s.push({index:u,value:o}),c(d);});},o=>{if(o)return n(o);n(null,s.sort((u,c)=>u.index-c.index).map(u=>u.value));});}function Mi(e,t,r,n){var s=Oi(t)?P1:R1;return s(e,t,he(r),n)}function B1(e,t,r){return Mi(ut,e,t,r)}function q1(e,t,r,n){return Mi(vt(t),e,r,n)}function Y1(e,t,r){return Mi(Ot,e,t,r)}function W1(e,t){var r=Xt(t),n=he(bo(e));function s(o){if(o)return r(o);o!==!1&&n(s);}return s()}function U1(e,t,r,n){var s=he(r);return Sn(e,t,(o,u)=>{s(o,(c,d)=>c?u(c):u(c,{key:d,val:o}));},(o,u)=>{for(var c={},{hasOwnProperty:d}=Object.prototype,g=0;g{o(u,c,(g,m)=>{if(g)return d(g);s[c]=m,d(g);});},u=>n(u,s))}function gc(e,t,r){return ji(e,1/0,t,r)}function Dc(e,t,r){return ji(e,1,t,r)}function yc(e,t=r=>r){var r=Object.create(null),n=Object.create(null),s=he(e),o=_n((u,c)=>{var d=t(...u);d in r?Kt(()=>c(null,...r[d])):d in n?n[d].push(c):(n[d]=[c],s(...u,(g,...m)=>{g||(r[d]=m);var D=n[d];delete n[d];for(var y=0,F=D.length;y{r(n[0],s);},t,1)}function H1(e){return (e<<1)+1}function Gu(e){return (e+1>>1)-1}function eo(e,t){return e.priority!==t.priority?e.priority({data:u,priority:c,callback:d});function o(u,c){return Array.isArray(u)?u.map(d=>({data:d,priority:c})):{data:u,priority:c}}return r.push=function(u,c=0,d){return n(o(u,c),d)},r.pushAsync=function(u,c=0,d){return s(o(u,c),d)},delete r.unshift,delete r.unshiftAsync,r}function V1(e,t){if(t=Qt(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r{let c={};if(o&&(c.error=o),u.length>0){var d=u;u.length<=1&&([d]=u),c.value=d;}s(null,c);}),t.apply(this,n)})}function Sc(e){var t;return Array.isArray(e)?t=e.map(Si):(t={},Object.keys(e).forEach(r=>{t[r]=Si.call(this,e[r]);})),t}function Ao(e,t,r,n){let s=he(r);return Mi(e,t,(o,u)=>{s(o,(c,d)=>{u(c,!d);});},n)}function G1(e,t,r){return Ao(ut,e,t,r)}function J1(e,t,r,n){return Ao(vt(t),e,r,n)}function Z1(e,t,r){return Ao(Ot,e,t,r)}function xc(e){return function(){return e}}function Ci(e,t,r){var n={times:Do,intervalFunc:xc(Ac)};if(arguments.length<3&&typeof e=="function"?(r=t||$r(),t=e):(K1(n,e),r=r||$r()),typeof t!="function")throw new Error("Invalid arguments for async.retry");var s=he(t),o=1;function u(){s((c,...d)=>{c!==!1&&(c&&o++{(s.lengthn)(ut,e,t,r)}function X1(e,t,r,n){return Yt(Boolean,s=>s)(vt(t),e,r,n)}function ew(e,t,r){return Yt(Boolean,n=>n)(Ot,e,t,r)}function tw(e,t,r){var n=he(t);return Ai(e,(o,u)=>{n(o,(c,d)=>{if(c)return u(c);u(c,{value:o,criteria:d});});},(o,u)=>{if(o)return r(o);r(null,u.sort(s).map(c=>c.value));});function s(o,u){var c=o.criteria,d=u.criteria;return cd?1:0}}function Ic(e,t,r){var n=he(e);return _n((s,o)=>{var u=!1,c;function d(){var g=e.name||"anonymous",m=new Error('Callback function "'+g+'" timed out.');m.code="ETIMEDOUT",r&&(m.info=r),u=!0,o(m);}s.push((...g)=>{u||(o(...g),clearTimeout(c));}),c=setTimeout(d,t),n(...s);})}function rw(e){for(var t=Array(e);e--;)t[e]=e;return t}function Ii(e,t,r,n){var s=he(r);return Sn(rw(e),t,s,n)}function Nc(e,t,r){return Ii(e,1/0,t,r)}function Lc(e,t,r){return Ii(e,1,t,r)}function $c(e,t,r,n){arguments.length<=3&&typeof t=="function"&&(n=r,r=t,t=Array.isArray(e)?[]:{}),n=Qt(n||$r());var s=he(r);return ut(e,(o,u,c)=>{s(t,o,u,c);},o=>n(o,t)),n[kr]}function nw(e,t){var r=null,n;return Fi(e,(s,o)=>{he(s)((u,...c)=>{if(u===!1)return o(u);c.length<2?[n]=c:n=c,r=u,o(u?null:{});});},()=>t(r,n))}function Pc(e){return (...t)=>(e.unmemoized||e)(...t)}function iw(e,t,r){r=Xt(r);var n=he(t),s=he(e),o=[];function u(d,...g){if(d)return r(d);o=g,d!==!1&&s(c);}function c(d,g){if(d)return r(d);if(d!==!1){if(!g)return r(null,...o);n(u);}}return s(c)}function Rc(e,t,r){let n=he(e);return bi(s=>n((o,u)=>s(o,!u)),t,r)}function sw(e,t){if(t=Qt(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(o){var u=he(e[r++]);u(...o,Xt(s));}function s(o,...u){if(o!==!1){if(o||r===e.length)return t(o,...u);n(u);}}n([]);}var t1,Zu,Ku,wn,Kt,i1,xi,vt,vn,ut,Ai,tc,Ot,_o,rc,kr,D1,y1,w1,v1,to,Lr,Sn,En,ro,no,io,so,oo,cc,Ei,ao,_i,Fi,uo,co,lo,fo,ho,po,dc,Ti,mc,ji,wi,wc,Oo,mo,Fc,Cc,bc,Oc,Do,Ac,yo,wo,vo,jc,kc,bi,Bc,ow,To=Xy(()=>{t1=typeof queueMicrotask=="function"&&queueMicrotask,Zu=typeof setImmediate=="function"&&setImmediate,Ku=typeof process=="object"&&typeof process.nextTick=="function";t1?wn=queueMicrotask:Zu?wn=setImmediate:Ku?wn=process.nextTick:wn=Qu;Kt=Xu(wn);i1={},xi=i1;vt=e=>(t,r,n)=>{if(n=Qt(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if(r1(t))return Hu(t,e,r,n);if(n1(t))return Hu(t[Symbol.asyncIterator](),e,r,n);var s=c1(t),o=!1,u=!1,c=0,d=!1;function g(D,y){if(!u)if(c-=1,D)o=!0,n(D);else if(D===!1)o=!0,u=!0;else {if(y===xi||o&&c<=0)return o=!0,n(null);d||m();}}function m(){for(d=!0;c)/,w1=/,/,v1=/(=.+)?(\s*)$/;to=class{constructor(){this.head=this.tail=null,this.length=0;}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,r){r.prev=t,r.next=t.next,t.next?t.next.prev=r:this.tail=r,t.next=r,this.length+=1;}insertBefore(t,r){r.prev=t.prev,r.next=t,t.prev?t.prev.next=r:this.head=r,t.prev=r,this.length+=1;}unshift(t){this.head?this.insertBefore(this.head,t):Vu(this,t);}push(t){this.tail?this.insertAfter(this.tail,t):Vu(this,t);}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return [...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next;}remove(t){for(var r=this.head;r;){var{next:n}=r;t(r)&&this.removeLink(r),r=n;}return this}};Lr=fe(F1,4);Sn=fe(S1,4);En=fe(C1,4);ro=fe(b1,3);no=fe(O1,3);io=fe(x1,3);so=fe(A1,4);oo=fe(M1,3);cc=uc("dir");Ei=fe(T1,3);ao=fe(j1,3);_i=fe(I1,4);Fi=fe(N1,3);uo=fe(L1,3);co=fe($1,4);lo=fe(k1,3);fo=fe(B1,3);ho=fe(q1,4);po=fe(Y1,3);dc=fe(W1,2);Ti=fe(U1,4);mc=uc("log");ji=fe(z1,4);Ku?wi=process.nextTick:Zu?wi=setImmediate:wi=Qu;wc=Xu(wi),Oo=fe((e,t,r)=>{var n=Oi(t)?[]:{};e(t,(s,o,u)=>{he(s)((c,...d)=>{d.length<2&&([d]=d),n[o]=d,u(c);});},s=>r(s,n));},3);mo=class{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER;}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(t){let r;for(;t>0&&eo(this.heap[t],this.heap[r=Gu(t)]);){let n=this.heap[t];this.heap[t]=this.heap[r],this.heap[r]=n,t=r;}}percDown(t){let r;for(;(r=H1(t))=0;n--)this.percDown(n);return this}};Fc=fe(V1,2);Cc=fe(G1,3);bc=fe(J1,4);Oc=fe(Z1,3);Do=5,Ac=0;yo=fe(Q1,3);wo=fe(X1,4);vo=fe(ew,3);jc=fe(tw,3);kc=fe(nw);bi=fe(iw,3);Bc=fe(sw),ow={apply:Ju,applyEach:tc,applyEachSeries:rc,asyncify:vi,auto:Fo,autoInject:nc,cargo:ic,cargoQueue:sc,compose:oc,concat:ro,concatLimit:En,concatSeries:no,constant:ac,detect:io,detectLimit:so,detectSeries:oo,dir:cc,doUntil:lc,doWhilst:Ei,each:ao,eachLimit:_i,eachOf:ut,eachOfLimit:vn,eachOfSeries:Ot,eachSeries:Fi,ensureAsync:bo,every:uo,everyLimit:co,everySeries:lo,filter:fo,filterLimit:ho,filterSeries:po,forever:dc,groupBy:hc,groupByLimit:Ti,groupBySeries:pc,log:mc,map:Ai,mapLimit:Sn,mapSeries:_o,mapValues:gc,mapValuesLimit:ji,mapValuesSeries:Dc,memoize:yc,nextTick:wc,parallel:vc,parallelLimit:Ec,priorityQueue:_c,queue:xo,race:Fc,reduce:Lr,reduceRight:go,reflect:Si,reflectAll:Sc,reject:Cc,rejectLimit:bc,rejectSeries:Oc,retry:Ci,retryable:Mc,seq:Co,series:Tc,setImmediate:Kt,some:yo,someLimit:wo,someSeries:vo,sortBy:jc,timeout:Ic,times:Nc,timesLimit:Ii,timesSeries:Lc,transform:$c,tryEach:kc,unmemoize:Pc,until:Rc,waterfall:Bc,whilst:bi,all:uo,allLimit:co,allSeries:lo,any:yo,anyLimit:wo,anySeries:vo,find:io,findLimit:so,findSeries:oo,flatMap:ro,flatMapLimit:En,flatMapSeries:no,forEach:ao,forEachSeries:Fi,forEachLimit:_i,forEachOf:ut,forEachOfSeries:Ot,forEachOfLimit:vn,inject:Lr,foldl:Lr,foldr:go,select:fo,selectLimit:ho,selectSeries:po,wrapSync:vi,during:bi,doDuring:Ei};});var zc=B((L2,Uc)=>{var{hasOwnProperty:jo}=Object.prototype,Io=typeof process<"u"&&process.platform==="win32"?`\r +`:` +`,No=(e,t)=>{let r=[],n="";typeof t=="string"?t={section:t,whitespace:!1}:(t=t||Object.create(null),t.whitespace=t.whitespace===!0);let s=t.whitespace?" = ":"=";for(let o of Object.keys(e)){let u=e[o];if(u&&Array.isArray(u))for(let c of u)n+=Pr(o+"[]")+s+Pr(c)+` +`;else u&&typeof u=="object"?r.push(o):n+=Pr(o)+s+Pr(u)+Io;}t.section&&n.length&&(n="["+Pr(t.section)+"]"+Io+n);for(let o of r){let u=Yc(o).join("\\."),c=(t.section?t.section+".":"")+u,{whitespace:d}=t,g=No(e[o],{section:c,whitespace:d});n.length&&g.length&&(n+=Io),n+=g;}return n},Yc=e=>e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(t=>t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")),qc=e=>{let t=Object.create(null),r=t,n=null,s=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,o=e.split(/[\r\n]+/g);for(let c of o){if(!c||c.match(/^\s*[;#]/))continue;let d=c.match(s);if(!d)continue;if(d[1]!==void 0){if(n=Ni(d[1]),n==="__proto__"){r=Object.create(null);continue}r=t[n]=t[n]||Object.create(null);continue}let g=Ni(d[2]),m=g.length>2&&g.slice(-2)==="[]",D=m?g.slice(0,-2):g;if(D==="__proto__")continue;let y=d[3]?Ni(d[4]):!0,F=y==="true"||y==="false"||y==="null"?JSON.parse(y):y;m&&(jo.call(r,D)?Array.isArray(r[D])||(r[D]=[r[D]]):r[D]=[]),Array.isArray(r[D])?r[D].push(F):r[D]=F;}let u=[];for(let c of Object.keys(t)){if(!jo.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;let d=Yc(c),g=t,m=d.pop(),D=m.replace(/\\\./g,".");for(let y of d)y!=="__proto__"&&((!jo.call(g,y)||typeof g[y]!="object")&&(g[y]=Object.create(null)),g=g[y]);g===t&&D===m||(g[D]=t[c],u.push(c));}for(let c of u)delete t[c];return t},Wc=e=>e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'",Pr=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Wc(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#"),Ni=(e,t)=>{if(e=(e||"").trim(),Wc(e)){e.charAt(0)==="'"&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e);}catch{}}else {let r=!1,n="";for(let s=0,o=e.length;s{var aw=zc(),Hc=Vc;Hc.json={stringify:function(e,t,r){return JSON.stringify(e,t||null,r||2)},parse:JSON.parse};Hc.ini=aw;});var hr=B(Gc=>{var er=Br(),Rr=Gc.Memory=function(e){e=e||{},this.type="memory",this.store={},this.mtimes={},this.readOnly=!1,this.loadFrom=e.loadFrom||null,this.logicalSeparator=e.logicalSeparator||":",this.parseValues=e.parseValues||!1,this.loadFrom&&(this.store=er.loadFilesSync(this.loadFrom));};Rr.prototype.get=function(e){for(var t=this.store,r=er.path(e,this.logicalSeparator);r.length>0;){if(e=r.shift(),t&&typeof t!="string"&&Object.hasOwnProperty.call(t,e)){t=t[e];continue}return}return t};Rr.prototype.set=function(e,t){if(this.readOnly)return !1;var r=this.store,n=er.path(e,this.logicalSeparator);if(n.length===0)return !t||typeof t!="object"?!1:(this.reset(),this.store=t,!0);for(this.mtimes[e]=Date.now();n.length>1;)e=n.shift(),(!r[e]||typeof r[e]!="object"||!Object.hasOwnProperty.call(r,e))&&(r[e]={}),r=r[e];return e=n.shift(),this.parseValues&&(t=er.parseValues.call(er,t)),r[e]=t,!0};Rr.prototype.clear=function(e){if(this.readOnly)return !1;var t=this.store,r=t,n=er.path(e,this.logicalSeparator);delete this.mtimes[e];for(var s=0;s1;)e=s.shift(),n[e]||(n[e]={}),n=n[e];return e=s.shift(),typeof n[e]!="object"||Array.isArray(n[e])?(n[e]=t,!0):Object.keys(t).every(function(u){return r.merge(er.keyed(r.logicalSeparator,o,u),t[u])})};Rr.prototype.reset=function(){return this.readOnly?!1:(this.mtimes={},this.store={},!0)};Rr.prototype.loadSync=function(){return this.store||{}};});var Br=B(Kc=>{var Jc=U("fs"),uw=(To(),Yu(Mo)),Zc=Li(),cw=hr().Memory,Et=Kc;Et.path=function(e,t){return t=t||":",e==null?[]:e.split(t)};Et.key=function(){return Array.prototype.slice.call(arguments).join(":")};Et.keyed=function(){return Array.prototype.slice.call(arguments,1).join(arguments[0])};Et.loadFiles=function(e,t){if(!e)return t(null,{});var r=Array.isArray(e)?{files:e}:e;r.format=r.format||Zc.json;function n(s,o){Jc.readFile(s,function(u,c){return u?o(u):o(null,r.format.parse(c.toString()))});}uw.map(r.files,n,function(s,o){return s?t(s):t(null,Et.merge(o))});};Et.loadFilesSync=function(e){if(e){var t=Array.isArray(e)?{files:e}:e;return t.format=t.format||Zc.json,Et.merge(t.files.map(function(r){return t.format.parse(Jc.readFileSync(r,"utf8"))}))}};Et.merge=function(e){var t=new cw;return e.forEach(function(r){Object.keys(r).forEach(function(n){t.merge(n,r[n]);});}),t.store};Et.capitalize=function(e){return e&&e[0].toUpperCase()+e.slice(1)};Et.parseValues=function(e){var t=e;try{t=JSON.parse(e);}catch{e==="undefined"&&(t=void 0);}return t};Et.transform=function(e,t){var r=Object.keys(e).map(function(n){var s={key:n,value:e[n]},o=t.call(null,s);if(o){if(o.key)return o}else return null;var u=new Error("Transform function passed to store returned an invalid format: "+JSON.stringify(o));throw u.name="RuntimeError",u});return r.filter(function(n){return n!==null}).reduce(function(n,s){return n[s.key]=s.value,n},{})};});var Xc=B(Qc=>{var qr=(To(),Yu(Mo)),tr=Br(),Re=Qc.Provider=function(e){e=e||{},this.stores={},this.sources=[],this.init(e);};["argv","env"].forEach(function(e){Re.prototype[e]=function(){var t=[e].concat(Array.prototype.slice.call(arguments));return this.add.apply(this,t)};});Re.prototype.file=function(e,t){return arguments.length==1?(t=typeof e=="string"?{file:e}:e,e="file"):t=typeof t=="string"?{file:t}:t,t.type="file",this.add(e,t)};["defaults","overrides"].forEach(function(e){Re.prototype[e]=function(t){return t=t||{},t.type||(t.type="literal"),this.add(e,t)};});Re.prototype.use=function(e,t){t=t||{};function r(o){return Object.keys(t).every(function(u){return t[u]===o[u]})}var n=this.stores[e],s=n&&!r(n);return (!n||s)&&(s&&this.remove(e),this.add(e,t)),this};Re.prototype.add=function(e,t,r){t=t||{};var n=t.type||e;if(!$i()[tr.capitalize(n)])throw new Error("Cannot add store with unknown type: "+n);return this.stores[e]=this.create(n,t,r),this.stores[e].loadSync&&this.stores[e].loadSync(),this};Re.prototype.remove=function(e){return delete this.stores[e],this};Re.prototype.create=function(e,t,r){return new($i())[tr.capitalize(e.toLowerCase())](t,r)};Re.prototype.init=function(e){var t=this;e.type?this.add(e.type,e):e.store?this.add(e.store.name||e.store.type,e.store):e.stores&&Object.keys(e.stores).forEach(function(r){var n=e.stores[r];t.add(n.name||r||n.type,n);}),e.source?this.sources.push(this.create(e.source.type||e.source.name,e.source)):e.sources&&Object.keys(e.sources).forEach(function(r){var n=e.sources[r];t.sources.push(t.create(n.type||n.name||r,n));});};Re.prototype.get=function(e,t){if(typeof e=="function"&&(t=e,e=null),!t)return this._execute("get",1,e,t);var r=0,n=Object.keys(this.stores),s=this,o,u=[];qr.whilst(function(c){c(null,typeof o>"u"&&r=2)return d.get(e,function(g,m){if(g)return c(g);o=m,o&&typeof o=="object"&&!Array.isArray(o)&&(u.push(o),o=void 0),c();});o=d.get(e),o&&typeof o=="object"&&!Array.isArray(o)&&(u.push(o),o=void 0),c();},function(c){return !c&&u.length&&(o=tr.merge(u.reverse())),c?t(c):t(null,o)});};Re.prototype.any=function(e,t){if(Array.isArray(e)||(e=Array.prototype.slice.call(arguments),e.length>0&&typeof e[e.length-1]=="function"?t=e.pop():t=null),!t){for(var r,n=0;n"u"&&t.push(r);},this),t.length)throw new Error("Missing required keys: "+t.join(", "));return !0};Re.prototype.reset=function(e){return this._execute("reset",0,e)};Re.prototype.clear=function(e,t){return this._execute("clear",1,e,t)};Re.prototype.merge=function(){var e=this,t=Array.prototype.slice.call(arguments),r=typeof t[t.length-1]=="function"&&t.pop(),n=t.pop(),s=t.pop();function o(u,c){return e._execute("merge",2,u,n[u],c)}return s?this._execute("merge",2,s,n,r):Array.isArray(n)||typeof n!="object"?lw(new Error("Cannot merge non-Object into top-level."),r):qr.forEach(Object.keys(n),o,r||function(){})};Re.prototype.load=function(e){var t=this;function r(){var d=Object.keys(t.stores);return d.reverse(),d.map(function(g){return t.stores[g]})}function n(d){if(!d.loadSync)throw new Error("nconf store "+d.type+" has no loadSync() method");return d.loadSync()}function s(d,g){return !d.load&&!d.loadSync?g(new Error("nconf store "+d.type+" has no load() method")):d.loadSync?g(null,d.loadSync()):d.load(g)}function o(d,g){if(!g)return tr.merge(d.map(n));qr.map(d,s,function(m,D){return m?g(m):g(null,tr.merge(D))});}function u(d){d&&typeof d=="object"&&t.use("sources",{type:"literal",store:d});}function c(){var d=t.sources.splice(0);if(d.reverse(),!e)return u(o(d)),o(r());o(d,function(g,m){return g?e(g):(u(m),o(r(),e))});}return t.sources.length?c():o(r(),e)};Re.prototype.save=function(e,t){!t&&typeof e=="function"&&(t=e,e=null);var r=this,n=Object.keys(this.stores);function s(u,c){var d=r.stores[c];if(d.saveSync){var g=d.saveSync();typeof g=="object"&&g!==null&&u.push(g);}return u}function o(u,c,d){var g=r.stores[c];if(g.save)return g.save(e,function(m,D){if(m)return d(m);typeof D=="object"&&D!==null&&u.push(D),d(null,u);});g.saveSync&&u.push(g.saveSync()),d(null,u);}if(!t)return tr.merge(n.reduce(s,[]));qr.reduce(n,[],o,function(u,c){return u?t(u):t(null,tr.merge(c))});};Re.prototype._execute=function(e,t){var r=Array.prototype.slice.call(arguments,2),n=typeof r[r.length-1]=="function"&&r.pop(),s=["set","clear","merge","reset"].indexOf(e)!==-1,o=this,u,c=[],d=Object.keys(this.stores);function g(m,D){var y=o.stores[m];return s&&y.readOnly?D():y[e].length>t?y[e].apply(y,r.concat(D)):D(null,y[e].apply(y,r))}return n?qr.forEach(d,g,function(m){return m?n(m):n()}):(d.forEach(function(m){if(typeof u>"u"){var D=o.stores[m];if(s&&D.readOnly)return;u=D[e].apply(D,r),u&&e==="get"&&typeof u=="object"&&!Array.isArray(u)&&(c.push(u),u=void 0);}}),c.length&&(u=tr.merge(c.reverse())),u)};function lw(e,t){if(t)return t(e);throw e}});var el=B((B2,fw)=>{fw.exports={name:"nconf",description:"Hierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging.",version:"0.12.1",author:"Charlie Robbins ",contributors:["Matt Hamann ","Maciej Ma\u0142ecki ","Jarrett Cruger ","Adrien Becchis"],repository:{type:"git",url:"http://github.com/flatiron/nconf.git"},keywords:["configuration","key value store","plugabble"],dependencies:{async:"^3.0.0",ini:"^2.0.0","secure-keys":"^1.0.0",yargs:"^16.1.1"},devDependencies:{"@release-it/conventional-changelog":"^7.0.2",coveralls:"^3.1.0",eslint:"^7.0.0","nconf-yaml":"^1.0.2",nyc:"^15.1.0","release-it":"^16.2.1",vows:"^0.8.3"},main:"./lib/nconf",scripts:{test:"vows test/*-test.js test/**/*-test.js --spec",cover:"nyc --reporter=lcov npm test",coveralls:"cat coverage/lcov.info | coveralls",lint:"eslint .",release:"release-it"},engines:{node:">= 0.4.0"},license:"MIT"};});var rl=B((q2,tl)=>{var Lo=U("fs"),dw=U("util"),hw=U("path"),_t,$o=class{constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:!0,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[];}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=t.shift(),n=function(){};return typeof t[t.length-1]=="function"&&(n=t.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),_t.format.apply(_t.format,[this.cache[this.locale][r]||r].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),r=t.shift(),n=t.shift(),s=t.shift(),o=function(){};typeof t[t.length-1]=="function"&&(o=t.pop()),this.cache[this.locale]||this._readLocaleFile();let u=s===1?r:n;this.cache[this.locale][r]&&(u=this.cache[this.locale][r][s===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let c=[u];return ~u.indexOf("%d")&&c.push(s),_t.format.apply(_t.format,c.concat(t))}setLocale(t){this.locale=t;}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.cache[this.locale][r]=t[r]);}_taggedLiteral(t,...r){let n="";return t.forEach(function(s,o){let u=r[o+1];n+=s,typeof u<"u"&&(n+="%s");}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue();}_processWriteQueue(){let t=this,r=this.writeQueue[0],n=r.directory,s=r.locale,o=r.cb,u=this._resolveLocaleFile(n,s),c=JSON.stringify(this.cache[s],null,2);_t.fs.writeFile(u,c,"utf-8",function(d){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),o(d);});}_readLocaleFile(){let t={},r=this._resolveLocaleFile(this.directory,this.locale);try{_t.fs.readFileSync&&(t=JSON.parse(_t.fs.readFileSync(r,"utf-8")));}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")t={};else throw n}this.cache[this.locale]=t;}_resolveLocaleFile(t,r){let n=_t.resolve(t,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let s=_t.resolve(t,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s);}return n}_fileExistsSync(t){return _t.exists(t)}};function pw(e,t){_t=t;let r=new $o(e);return {__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var mw={fs:{readFileSync:Lo.readFileSync,writeFile:Lo.writeFile},format:dw.format,resolve:hw.resolve,exists:e=>{try{return Lo.statSync(e).isFile()}catch{return !1}}},gw=e=>pw(e,mw);tl.exports=gw;});var Ro=B((Y2,cl)=>{var Dw=U("util"),yw=U("fs"),nl=U("path");function Cn(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let r="",n=!1,s=e.match(/^-+/);for(let o=s?s[0].length:0;o0?n+=`${t}${r.charAt(s)}`:n+=u;}return n}function al(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function ww(e){if(Array.isArray(e))return e.map(u=>typeof u!="string"?u+"":u);e=e.trim();let t=0,r=null,n=null,s=null,o=[];for(let u=0;u{typeof v=="number"&&(_.nargs[h]=v,_.keys.push(h));}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([h,v])=>{typeof v=="function"&&(_.coercions[h]=v,_.keys.push(h));}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(h){_.configs[h]=!0;}):typeof n.config=="object"&&Object.entries(n.config).forEach(([h,v])=>{(typeof v=="boolean"||typeof v=="function")&&(_.configs[h]=v);})),Ye(n.key,o,n.default,_.arrays),Object.keys(c).forEach(function(h){(_.aliases[h]||[]).forEach(function(v){c[v]=c[h];});});let x=null;S();let w=[],M=Object.assign(Object.create(null),{_:[]}),P={};for(let h=0;h=3&&(R(Q[1],_.arrays)?h=te(h,Q[1],s,Q[2]):R(Q[1],_.nargs)!==!1?h=X(h,Q[1],s,Q[2]):L(Q[1],Q[2]));else if(v.match($)&&u["boolean-negation"])Q=v.match($),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(O=Q[1],L(O,R(O,_.arrays)?[!1]:!1));else if(v.match(/^--.+/)||!u["short-option-groups"]&&v.match(/^-[^-]+/))Q=v.match(/^--?(.+)/),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(O=Q[1],R(O,_.arrays)?h=te(h,O,s):R(O,_.nargs)!==!1?h=X(h,O,s):(re=s[h+1],re!==void 0&&(!re.match(/^-/)||re.match(j))&&!R(O,_.bools)&&!R(O,_.counts)||/^(true|false)$/.test(re)?(L(O,re),h++):L(O,le(O))));else if(v.match(/^-.\..+=/))Q=v.match(/^-([^=]+)=([\s\S]*)$/),Q!==null&&Array.isArray(Q)&&Q.length>=3&&L(Q[1],Q[2]);else if(v.match(/^-.\..+/)&&!v.match(j))re=s[h+1],Q=v.match(/^-(.\..+)/),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(O=Q[1],re!==void 0&&!re.match(/^-/)&&!R(O,_.bools)&&!R(O,_.counts)?(L(O,re),h++):L(O,le(O)));else if(v.match(/^-[^-]+/)&&!v.match(j)){z=v.slice(1,-1).split(""),A=!1;for(let Fe=0;Feh!=="--"&&h.includes("-")).forEach(h=>{delete M[h];}),u["strip-aliased"]&&[].concat(...Object.keys(o).map(h=>o[h])).forEach(h=>{u["camel-case-expansion"]&&h.includes("-")&&delete M[h.split(".").map(v=>Cn(v)).join(".")],delete M[h];});function J(h){let v=q("_",h);(typeof v=="string"||typeof v=="number")&&M._.push(v);}function X(h,v,T,A){let O,z=R(v,_.nargs);if(z=typeof z!="number"||isNaN(z)?1:z,z===0)return E(A)||(x=Error(C("Argument unexpected for: %s",v))),L(v,le(v)),h;let Q=E(A)?0:1;if(u["nargs-eats-options"])T.length-(h+1)+Q0&&(L(v,A),re--),O=h+1;O0||Q&&typeof Q=="number"&&O.length>=Q||(z=T[re],/^-/.test(z)&&!j.test(z)&&!ie(z)));re++)h=re,O.push(Z(v,z));}return typeof Q=="number"&&(Q&&O.length1&&u["dot-notation"]&&(_.aliases[A[0]]||[]).forEach(function(O){let z=O.split("."),Q=[].concat(A);Q.shift(),z=z.concat(Q),(_.aliases[h]||[]).includes(z.join("."))||de(M,z,T);}),R(h,_.normalize)&&!R(h,_.arrays)&&[h].concat(_.aliases[h]||[]).forEach(function(z){Object.defineProperty(P,z,{enumerable:!0,get(){return v},set(Q){v=typeof Q=="string"?Wt.normalize(Q):Q;}});});}function ee(h,v){_.aliases[h]&&_.aliases[h].length||(_.aliases[h]=[v],y[v]=!0),_.aliases[v]&&_.aliases[v].length||ee(v,h);}function Z(h,v){typeof v=="string"&&(v[0]==="'"||v[0]==='"')&&v[v.length-1]===v[0]&&(v=v.substring(1,v.length-1)),(R(h,_.bools)||R(h,_.counts))&&typeof v=="string"&&(v=v==="true");let T=Array.isArray(v)?v.map(function(A){return q(h,A)}):q(h,v);return R(h,_.counts)&&(E(T)||typeof T=="boolean")&&(T=ko()),R(h,_.normalize)&&R(h,_.arrays)&&(Array.isArray(v)?T=v.map(A=>Wt.normalize(A)):T=Wt.normalize(v)),T}function q(h,v){return !u["parse-positional-numbers"]&&h==="_"||!R(h,_.strings)&&!R(h,_.bools)&&!Array.isArray(v)&&(al(v)&&u["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${v}`)))||!E(v)&&R(h,_.numbers))&&(v=Number(v)),v}function Y(h){let v=Object.create(null);K(v,_.aliases,c),Object.keys(_.configs).forEach(function(T){let A=h[T]||v[T];if(A)try{let O=null,z=Wt.resolve(Wt.cwd(),A),Q=_.configs[T];if(typeof Q=="function"){try{O=Q(z);}catch(re){O=re;}if(O instanceof Error){x=O;return}}else O=Wt.require(z);V(O);}catch(O){O.name==="PermissionDenied"?x=O:h[T]&&(x=Error(C("Invalid JSON config file: %s",A)));}});}function V(h,v){Object.keys(h).forEach(function(T){let A=h[T],O=v?v+"."+T:T;typeof A=="object"&&A!==null&&!Array.isArray(A)&&u["dot-notation"]?V(A,O):(!ye(M,O.split("."))||R(O,_.arrays)&&u["combine-arrays"])&&L(O,A);});}function I(){typeof d<"u"&&d.forEach(function(h){V(h);});}function W(h,v){if(typeof g>"u")return;let T=typeof g=="string"?g:"",A=Wt.env();Object.keys(A).forEach(function(O){if(T===""||O.lastIndexOf(T,0)===0){let z=O.split("__").map(function(Q,re){return re===0&&(Q=Q.substring(T.length)),Cn(Q)});(v&&_.configs[z.join(".")]||!v)&&!ye(h,z)&&L(z.join("."),A[O]);}});}function k(h){let v,T=new Set;Object.keys(h).forEach(function(A){if(!T.has(A)&&(v=R(A,_.coercions),typeof v=="function"))try{let O=q(A,v(h[A]));[].concat(_.aliases[A]||[],A).forEach(z=>{T.add(z),h[z]=O;});}catch(O){x=O;}});}function G(h){return _.keys.forEach(v=>{~v.indexOf(".")||typeof h[v]>"u"&&(h[v]=void 0);}),h}function K(h,v,T,A=!1){Object.keys(T).forEach(function(O){ye(h,O.split("."))||(de(h,O.split("."),T[O]),A&&(F[O]=!0),(v[O]||[]).forEach(function(z){ye(h,z.split("."))||de(h,z.split("."),T[O]);}));});}function ye(h,v){let T=h;u["dot-notation"]||(v=[v.join(".")]),v.slice(0,-1).forEach(function(O){T=T[O]||{};});let A=v[v.length-1];return typeof T!="object"?!1:A in T}function de(h,v,T){let A=h;u["dot-notation"]||(v=[v.join(".")]),v.slice(0,-1).forEach(function(Ae){Ae=il(Ae),typeof A=="object"&&A[Ae]===void 0&&(A[Ae]={}),typeof A[Ae]!="object"||Array.isArray(A[Ae])?(Array.isArray(A[Ae])?A[Ae].push({}):A[Ae]=[A[Ae],{}],A=A[Ae][A[Ae].length-1]):A=A[Ae];});let O=il(v[v.length-1]),z=R(v.join("."),_.arrays),Q=Array.isArray(T),re=u["duplicate-arguments-array"];!re&&R(O,_.nargs)&&(re=!0,(!E(A[O])&&_.nargs[O]===1||Array.isArray(A[O])&&A[O].length===_.nargs[O])&&(A[O]=void 0)),T===ko()?A[O]=ko(A[O]):Array.isArray(A[O])?re&&z&&Q?A[O]=u["flatten-duplicate-arrays"]?A[O].concat(T):(Array.isArray(A[O][0])?A[O]:[A[O]]).concat([T]):!re&&!!z==!!Q?A[O]=T:A[O]=A[O].concat([T]):A[O]===void 0&&z?A[O]=Q?T:[T]:re&&!(A[O]===void 0||R(O,_.counts)||R(O,_.bools))?A[O]=[A[O],T]:A[O]=T;}function Ye(...h){h.forEach(function(v){Object.keys(v||{}).forEach(function(T){_.aliases[T]||(_.aliases[T]=[].concat(o[T]||[]),_.aliases[T].concat(T).forEach(function(A){if(/-/.test(A)&&u["camel-case-expansion"]){let O=Cn(A);O!==T&&_.aliases[T].indexOf(O)===-1&&(_.aliases[T].push(O),y[O]=!0);}}),_.aliases[T].concat(T).forEach(function(A){if(A.length>1&&/[A-Z]/.test(A)&&u["camel-case-expansion"]){let O=ol(A,"-");O!==T&&_.aliases[T].indexOf(O)===-1&&(_.aliases[T].push(O),y[O]=!0);}}),_.aliases[T].forEach(function(A){_.aliases[A]=[T].concat(_.aliases[T].filter(function(O){return A!==O}));}));});});}function R(h,v){let T=[].concat(_.aliases[h]||[],h),A=Object.keys(v),O=T.find(z=>A.includes(z));return O?v[O]:!1}function Ke(h){let v=Object.keys(_);return [].concat(v.map(A=>_[A])).some(function(A){return Array.isArray(A)?A.includes(h):A[h]})}function Ne(h,...v){return [].concat(...v).some(function(A){let O=h.match(A);return O&&Ke(O[1])})}function Ct(h){if(h.match(j)||!h.match(/^-[^-]+/))return !1;let v=!0,T,A=h.slice(1).split("");for(let O=0;OR(h,_.arrays)?(x=Error(C("Invalid configuration: %s, opts.count excludes opts.array.",h)),!0):R(h,_.nargs)?(x=Error(C("Invalid configuration: %s, opts.count excludes opts.narg.",h)),!0):!1);}return {aliases:Object.assign({},_.aliases),argv:Object.assign(P,M),configuration:u,defaulted:Object.assign({},F),error:x,newAliases:Object.assign({},y)}}};function vw(e){let t=[],r=Object.create(null),n=!0;for(Object.keys(e).forEach(function(s){t.push([].concat(e[s],s));});n;){n=!1;for(let s=0;sEw,format:Dw.format,normalize:nl.normalize,resolve:nl.resolve,require:e=>{if(typeof U<"u")return U(e);if(e.match(/\.json$/))return yw.readFileSync(e,"utf8");throw Error("only .json config files are supported in ESM")}}),bn=function(t,r){return ul.parse(t.slice(),r).argv};bn.detailed=function(e,t){return ul.parse(e.slice(),t)};bn.camelCase=Cn;bn.decamelize=ol;bn.looksLikeNumber=al;cl.exports=bn;});var fl=B((U2,ll)=>{ll.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")};});var ki=B((z2,dl)=>{var _w=fl();dl.exports=e=>typeof e=="string"?e.replace(_w(),""):e;});var pl=B((H2,Bo)=>{var hl=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);Bo.exports=hl;Bo.exports.default=hl;});var gl=B((V2,ml)=>{ml.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var Pi=B((G2,qo)=>{var Fw=ki(),Sw=pl(),Cw=gl(),Dl=e=>{if(typeof e!="string"||e.length===0||(e=Fw(e),e.length===0))return 0;e=e.replace(Cw()," ");let t=0;for(let r=0;r=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,t+=Sw(n)?2:1);}return t};qo.exports=Dl;qo.exports.default=Dl;});var wl=B((J2,yl)=>{yl.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};});var Yo=B((Z2,El)=>{var On=wl(),vl={};for(let e of Object.keys(On))vl[On[e]]=e;var ae={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};El.exports=ae;for(let e of Object.keys(ae)){if(!("channels"in ae[e]))throw new Error("missing channels property: "+e);if(!("labels"in ae[e]))throw new Error("missing channel labels property: "+e);if(ae[e].labels.length!==ae[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=ae[e];delete ae[e].channels,delete ae[e].labels,Object.defineProperty(ae[e],"channels",{value:t}),Object.defineProperty(ae[e],"labels",{value:r});}ae.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),o=Math.max(t,r,n),u=o-s,c,d;o===s?c=0:t===o?c=(r-n)/u:r===o?c=2+(n-t)/u:n===o&&(c=4+(t-r)/u),c=Math.min(c*60,360),c<0&&(c+=360);let g=(s+o)/2;return o===s?d=0:g<=.5?d=u/(o+s):d=u/(2-o-s),[c,d*100,g*100]};ae.rgb.hsv=function(e){let t,r,n,s,o,u=e[0]/255,c=e[1]/255,d=e[2]/255,g=Math.max(u,c,d),m=g-Math.min(u,c,d),D=function(y){return (g-y)/6/m+1/2};return m===0?(s=0,o=0):(o=m/g,t=D(u),r=D(c),n=D(d),u===g?s=n-r:c===g?s=1/3+t-n:d===g&&(s=2/3+r-t),s<0?s+=1:s>1&&(s-=1)),[s*360,o*100,g*100]};ae.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],s=ae.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[s,o*100,n*100]};ae.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-r,1-n),o=(1-t-s)/(1-s)||0,u=(1-r-s)/(1-s)||0,c=(1-n-s)/(1-s)||0;return [o*100,u*100,c*100,s*100]};function bw(e,t){return (e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}ae.rgb.keyword=function(e){let t=vl[e];if(t)return t;let r=1/0,n;for(let s of Object.keys(On)){let o=On[s],u=bw(e,o);u.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let s=t*.4124+r*.3576+n*.1805,o=t*.2126+r*.7152+n*.0722,u=t*.0193+r*.1192+n*.9505;return [s*100,o*100,u*100]};ae.rgb.lab=function(e){let t=ae.rgb.xyz(e),r=t[0],n=t[1],s=t[2];r/=95.047,n/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let o=116*n-16,u=500*(r-n),c=200*(n-s);return [o,u,c]};ae.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s,o,u;if(r===0)return u=n*255,[u,u,u];n<.5?s=n*(1+r):s=n+r-n*r;let c=2*n-s,d=[0,0,0];for(let g=0;g<3;g++)o=t+1/3*-(g-1),o<0&&o++,o>1&&o--,6*o<1?u=c+(s-c)*6*o:2*o<1?u=s:3*o<2?u=c+(s-c)*(2/3-o)*6:u=c,d[g]=u*255;return d};ae.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=r,o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,s*=o<=1?o:2-o;let u=(n+r)/2,c=n===0?2*s/(o+s):2*r/(n+r);return [t,c*100,u*100]};ae.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,s=Math.floor(t)%6,o=t-Math.floor(t),u=255*n*(1-r),c=255*n*(1-r*o),d=255*n*(1-r*(1-o));switch(n*=255,s){case 0:return [n,d,u];case 1:return [c,n,u];case 2:return [u,n,d];case 3:return [u,c,n];case 4:return [d,u,n];case 5:return [n,u,c]}};ae.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=Math.max(n,.01),o,u;u=(2-r)*n;let c=(2-r)*s;return o=r*s,o/=c<=1?c:2-c,o=o||0,u/=2,[t,o*100,u*100]};ae.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s=r+n,o;s>1&&(r/=s,n/=s);let u=Math.floor(6*t),c=1-n;o=6*t-u,u&1&&(o=1-o);let d=r+o*(c-r),g,m,D;switch(u){default:case 6:case 0:g=c,m=d,D=r;break;case 1:g=d,m=c,D=r;break;case 2:g=r,m=c,D=d;break;case 3:g=r,m=d,D=c;break;case 4:g=d,m=r,D=c;break;case 5:g=c,m=r,D=d;break}return [g*255,m*255,D*255]};ae.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s=e[3]/100,o=1-Math.min(1,t*(1-s)+s),u=1-Math.min(1,r*(1-s)+s),c=1-Math.min(1,n*(1-s)+s);return [o*255,u*255,c*255]};ae.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s,o,u;return s=t*3.2406+r*-1.5372+n*-.4986,o=t*-.9689+r*1.8758+n*.0415,u=t*.0557+r*-.204+n*1.057,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),u=Math.min(Math.max(0,u),1),[s*255,o*255,u*255]};ae.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let s=116*r-16,o=500*(t-r),u=200*(r-n);return [s,o,u]};ae.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],s,o,u;o=(t+16)/116,s=r/500+o,u=o-n/200;let c=o**3,d=s**3,g=u**3;return o=c>.008856?c:(o-16/116)/7.787,s=d>.008856?d:(s-16/116)/7.787,u=g>.008856?g:(u-16/116)/7.787,s*=95.047,o*=100,u*=108.883,[s,o,u]};ae.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],s;s=Math.atan2(n,r)*360/2/Math.PI,s<0&&(s+=360);let u=Math.sqrt(r*r+n*n);return [t,u,s]};ae.lch.lab=function(e){let t=e[0],r=e[1],s=e[2]/360*2*Math.PI,o=r*Math.cos(s),u=r*Math.sin(s);return [t,o,u]};ae.rgb.ansi16=function(e,t=null){let[r,n,s]=e,o=t===null?ae.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let u=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(u+=60),u};ae.hsv.ansi16=function(e){return ae.rgb.ansi16(ae.hsv.rgb(e),e[2])};ae.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};ae.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,n=(t&1)*r*255,s=(t>>1&1)*r*255,o=(t>>2&1)*r*255;return [n,s,o]};ae.ansi256.rgb=function(e){if(e>=232){let o=(e-232)*10+8;return [o,o,o]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,s=t%6/5*255;return [r,n,s]};ae.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return "000000".substring(r.length)+r};ae.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return [0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(c=>c+c).join(""));let n=parseInt(r,16),s=n>>16&255,o=n>>8&255,u=n&255;return [s,o,u]};ae.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),u=s-o,c,d;return u<1?c=o/(1-u):c=0,u<=0?d=0:s===t?d=(r-n)/u%6:s===r?d=2+(n-t)/u:d=4+(t-r)/u,d/=6,d%=1,[d*360,u*100,c*100]};ae.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),s=0;return n<1&&(s=(r-.5*n)/(1-n)),[e[0],n*100,s*100]};ae.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,s=0;return n<1&&(s=(r-n)/(1-n)),[e[0],n*100,s*100]};ae.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return [n*255,n*255,n*255];let s=[0,0,0],o=t%1*6,u=o%1,c=1-u,d=0;switch(Math.floor(o)){case 0:s[0]=1,s[1]=u,s[2]=0;break;case 1:s[0]=c,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=u;break;case 3:s[0]=0,s[1]=c,s[2]=1;break;case 4:s[0]=u,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=c;}return d=(1-r)*n,[(r*s[0]+d)*255,(r*s[1]+d)*255,(r*s[2]+d)*255]};ae.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),s=0;return n>0&&(s=t/n),[e[0],s*100,n*100]};ae.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,s=0;return n>0&&n<.5?s=t/(2*n):n>=.5&&n<1&&(s=t/(2*(1-n))),[e[0],s*100,n*100]};ae.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return [e[0],(n-t)*100,(1-n)*100]};ae.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,s=n-t,o=0;return s<1&&(o=(n-s)/(1-s)),[e[0],s*100,o*100]};ae.apple.rgb=function(e){return [e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};ae.rgb.apple=function(e){return [e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};ae.gray.rgb=function(e){return [e[0]/100*255,e[0]/100*255,e[0]/100*255]};ae.gray.hsl=function(e){return [0,0,e[0]]};ae.gray.hsv=ae.gray.hsl;ae.gray.hwb=function(e){return [0,100,e[0]]};ae.gray.cmyk=function(e){return [0,0,0,e[0]]};ae.gray.lab=function(e){return [e[0],0,0]};ae.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return "000000".substring(n.length)+n};ae.rgb.gray=function(e){return [(e[0]+e[1]+e[2])/3/255*100]};});var Fl=B((K2,_l)=>{var Ri=Yo();function Ow(){let e={},t=Object.keys(Ri);for(let r=t.length,n=0;n{var Wo=Yo(),Tw=Fl(),Yr={},jw=Object.keys(Wo);function Iw(e){let t=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return "conversion"in e&&(t.conversion=e.conversion),t}function Nw(e){let t=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let s=e(r);if(typeof s=="object")for(let o=s.length,u=0;u{Yr[e]={},Object.defineProperty(Yr[e],"channels",{value:Wo[e].channels}),Object.defineProperty(Yr[e],"labels",{value:Wo[e].labels});let t=Tw(e);Object.keys(t).forEach(n=>{let s=t[n];Yr[e][n]=Nw(s),Yr[e][n].raw=Iw(s);});});Sl.exports=Yr;});var Tl=B((X2,Ml)=>{var bl=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,Ol=(e,t)=>(...r)=>{let n=e(...r);return `\x1B[${38+t};5;${n}m`},xl=(e,t)=>(...r)=>{let n=e(...r);return `\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},Bi=e=>e,Al=(e,t,r)=>[e,t,r],Wr=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0});},Uo,Ur=(e,t,r,n)=>{Uo===void 0&&(Uo=Cl());let s=n?10:0,o={};for(let[u,c]of Object.entries(Uo)){let d=u==="ansi16"?"ansi":u;u===t?o[d]=e(r,s):typeof c=="object"&&(o[d]=e(c[t],s));}return o};function Lw(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[s,o]of Object.entries(n))t[s]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[s]=t[s],e.set(o[0],o[1]);Object.defineProperty(t,r,{value:n,enumerable:!1});}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",Wr(t.color,"ansi",()=>Ur(bl,"ansi16",Bi,!1)),Wr(t.color,"ansi256",()=>Ur(Ol,"ansi256",Bi,!1)),Wr(t.color,"ansi16m",()=>Ur(xl,"rgb",Al,!1)),Wr(t.bgColor,"ansi",()=>Ur(bl,"ansi16",Bi,!0)),Wr(t.bgColor,"ansi256",()=>Ur(Ol,"ansi256",Bi,!0)),Wr(t.bgColor,"ansi16m",()=>Ur(xl,"rgb",Al,!0)),t}Object.defineProperty(Ml,"exports",{enumerable:!0,get:Lw});});var kl=B((eC,$l)=>{var xn=Pi(),$w=ki(),kw=Tl(),qi=new Set(["\x1B","\x9B"]),Pw=39,Ho="\x07",Nl="[",Rw="]",Ll="m",Vo=`${Rw}8;;`,jl=e=>`${qi.values().next().value}${Nl}${e}${Ll}`,Il=e=>`${qi.values().next().value}${Vo}${e}${Ho}`,Bw=e=>e.split(" ").map(t=>xn(t)),zo=(e,t,r)=>{let n=[...t],s=!1,o=!1,u=xn($w(e[e.length-1]));for(let[c,d]of n.entries()){let g=xn(d);if(u+g<=r?e[e.length-1]+=d:(e.push(d),u=0),qi.has(d)&&(s=!0,o=n.slice(c+1).join("").startsWith(Vo)),s){o?d===Ho&&(s=!1,o=!1):d===Ll&&(s=!1);continue}u+=g,u===r&&c0&&e.length>1&&(e[e.length-2]+=e.pop());},qw=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(xn(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Yw=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return "";let n="",s,o,u=Bw(e),c=[""];for(let[g,m]of e.split(" ").entries()){r.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let D=xn(c[c.length-1]);if(g!==0&&(D>=t&&(r.wordWrap===!1||r.trim===!1)&&(c.push(""),D=0),(D>0||r.trim===!1)&&(c[c.length-1]+=" ",D++)),r.hard&&u[g]>t){let y=t-D,F=1+Math.floor((u[g]-y-1)/t);Math.floor((u[g]-1)/t)t&&D>0&&u[g]>0){if(r.wordWrap===!1&&Dt&&r.wordWrap===!1){zo(c,m,t);continue}c[c.length-1]+=m;}r.trim!==!1&&(c=c.map(qw));let d=[...c.join(` +`)];for(let[g,m]of d.entries()){if(n+=m,qi.has(m)){let{groups:y}=new RegExp(`(?:\\${Nl}(?\\d+)m|\\${Vo}(?.*)${Ho})`).exec(d.slice(g).join(""))||{groups:{}};if(y.code!==void 0){let F=Number.parseFloat(y.code);s=F===Pw?void 0:F;}else y.uri!==void 0&&(o=y.uri.length===0?void 0:y.uri);}let D=kw.codes.get(Number(s));d[g+1]===` +`?(o&&(n+=Il("")),s&&D&&(n+=jl(D))):m===` +`&&(s&&D&&(n+=jl(s)),o&&(n+=Il(o)));}return n};$l.exports=(e,t,r)=>String(e).normalize().replace(/\r\n/g,` +`).split(` +`).map(n=>Yw(n,t,r)).join(` +`);});var Bl=B((tC,Rl)=>{var Ww={right:Gw,center:Jw},Uw=0,Yi=1,zw=2,Wi=3,Go=class{constructor(t){var r;this.width=t.width,this.wrap=(r=t.wrap)!==null&&r!==void 0?r:!0,this.rows=[];}span(...t){let r=this.div(...t);r.span=!0;}resetOutput(){this.rows=[];}div(...t){if(t.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...t)&&typeof t[0]=="string")return this.applyLayoutDSL(t[0]);let r=t.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...t){return t.length===1&&typeof t[0]=="string"&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){let r=t.split(` +`).map(s=>s.split(" ")),n=0;return r.forEach(s=>{s.length>1&&tt.stringWidth(s[0])>n&&(n=Math.min(Math.floor(this.width*.5),tt.stringWidth(s[0])));}),r.forEach(s=>{this.div(...s.map((o,u)=>({text:o.trim(),padding:this.measurePadding(o),width:u===0&&s.length>1?n:void 0})));}),this.rows[this.rows.length-1]}colFromString(t){return {text:t,padding:this.measurePadding(t)}}measurePadding(t){let r=tt.stripAnsi(t);return [0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){let t=[];return this.rows.forEach(r=>{this.rowToString(r,t);}),t.filter(r=>!r.hidden).map(r=>r.text).join(` +`)}rowToString(t,r){return this.rasterize(t).forEach((n,s)=>{let o="";n.forEach((u,c)=>{let{width:d}=t[c],g=this.negatePadding(t[c]),m=u;if(g>tt.stringWidth(u)&&(m+=" ".repeat(g-tt.stringWidth(u))),t[c].align&&t[c].align!=="left"&&this.wrap){let y=Ww[t[c].align];m=y(m,g),tt.stringWidth(m)0&&(o=this.renderInline(o,r[r.length-1]));}),r.push({text:o.replace(/ +$/,""),span:t.span});}),r}renderInline(t,r){let n=t.match(/^ */),s=n?n[0].length:0,o=r.text,u=tt.stringWidth(o.trimRight());return r.span?this.wrap?s{o.width=n[u],this.wrap?s=tt.wrap(o.text,this.negatePadding(o),{hard:!0}).split(` +`):s=o.text.split(` +`),o.border&&(s.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),s.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(s.unshift(...new Array(o.padding[Uw]||0).fill("")),s.push(...new Array(o.padding[zw]||0).fill(""))),s.forEach((c,d)=>{r[d]||r.push([]);let g=r[d];for(let m=0;mu.width||tt.stringWidth(u.text));let r=t.length,n=this.width,s=t.map(u=>{if(u.width)return r--,n-=u.width,u.width}),o=r?Math.floor(n/r):0;return s.map((u,c)=>u===void 0?Math.max(o,Hw(t[c])):u)}};function Pl(e,t,r){return e.border?/[.']-+[.']/.test(t)?"":t.trim().length!==0?r:" ":""}function Hw(e){let t=e.padding||[],r=1+(t[Wi]||0)+(t[Yi]||0);return e.border?r+4:r}function Vw(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Gw(e,t){e=e.trim();let r=tt.stringWidth(e);return r=t?e:" ".repeat(t-r>>1)+e}var tt;function Zw(e,t){return tt=t,new Go({width:e?.width||Vw(),wrap:e?.wrap})}var Kw=Pi(),Qw=ki(),Xw=kl();function ev(e){return Zw(e,{stringWidth:Kw,stripAnsi:Qw,wrap:Xw})}Rl.exports=ev;});var Ul=B((rC,Wl)=>{var{dirname:ql,resolve:Yl}=U("path"),{readdirSync:tv,statSync:rv}=U("fs");Wl.exports=function(e,t){let r=Yl(".",e),n;for(rv(r).isDirectory()||(r=ql(r));;){if(n=t(r,tv(r)),n)return Yl(r,n);if(r=ql(n=r),n===r)break}};});var Hl=B((nC,zl)=>{zl.exports=function(t){if(t===void 0&&(t=2),t>=Error.stackTraceLimit)throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+t+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");var r=Error.prepareStackTrace;Error.prepareStackTrace=function(s,o){return o};var n=new Error().stack;if(Error.prepareStackTrace=r,n!==null&&typeof n=="object")return n[t]?n[t].getFileName():void 0};});var Zl=B((iC,Zo)=>{var Vl=U("fs"),nv=U("path").join,iv=U("path").resolve,Gl=U("path").dirname,Jo={extensions:["js","json","coffee"],recurse:!0,rename:function(e){return e},visit:function(e){return e}};function sv(e,t,r){return new RegExp("\\.("+r.extensions.join("|")+")$","i").test(t)&&!(r.include&&r.include instanceof RegExp&&!r.include.test(e))&&!(r.include&&typeof r.include=="function"&&!r.include(e,t))&&!(r.exclude&&r.exclude instanceof RegExp&&r.exclude.test(e))&&!(r.exclude&&typeof r.exclude=="function"&&r.exclude(e,t))}function Jl(e,t,r){var n={};t&&!r&&typeof t!="string"&&(r=t,t=null),r=r||{};for(var s in Jo)typeof r[s]>"u"&&(r[s]=Jo[s]);return t=t?iv(Gl(e.filename),t):Gl(e.filename),Vl.readdirSync(t).forEach(function(o){var u=nv(t,o),c,d,g;Vl.statSync(u).isDirectory()&&r.recurse?(c=Jl(e,u,r),Object.keys(c).length&&(n[r.rename(o,u,o)]=c)):u!==e.filename&&sv(u,o,r)&&(d=o.substring(0,o.lastIndexOf(".")),g=e.require(u),n[r.rename(d,u,o)]=r.visit(g,u,o)||g);}),n}Zo.exports=Jl;Zo.exports.defaults=Jo;});var pf=B((sC,hf)=>{var Kl=U("assert"),nt=class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace(this,e);}},Xo=[],An;function Hi(e,t,r,n){An=n;let s={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if(typeof e.extends!="string")return s;let o=/\.json|\..*rc$/.test(e.extends),u=null;if(o)u=av(t,e.extends);else try{u=U.resolve(e.extends);}catch{return e}ov(u),Xo.push(u),s=o?JSON.parse(An.readFileSync(u,"utf8")):U(e.extends),delete e.extends,s=Hi(s,An.path.dirname(u),r,An);}return Xo=[],r?af(s,e):Object.assign({},s,e)}function ov(e){if(Xo.indexOf(e)>-1)throw new nt(`Circular extended configurations: '${e}'.`)}function av(e,t){return An.path.resolve(e,t)}function af(e,t){let r={};function n(s){return s&&typeof s=="object"&&!Array.isArray(s)}Object.assign(r,e);for(let s of Object.keys(t))n(t[s])&&n(r[s])?r[s]=af(e[s],t[s]):r[s]=t[s];return r}function Hr(e){let r=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,s=r.shift();if(!s)throw new Error(`No command found in: ${e}`);let o={cmd:s.replace(n,""),demanded:[],optional:[]};return r.forEach((u,c)=>{let d=!1;u=u.replace(/\s/g,""),/\.+[\]>]/.test(u)&&c===r.length-1&&(d=!0),/^\[/.test(u)?o.optional.push({cmd:u.replace(n,"").split("|"),variadic:d}):o.demanded.push({cmd:u.replace(n,"").split("|"),variadic:d});}),o}var uv=["first","second","third","fourth","fifth","sixth"];function oe(e,t,r){function n(){return typeof e=="object"?[{demanded:[],optional:[]},e,t]:[Hr(`cmd ${e}`),t,r]}try{let s=0,[o,u,c]=n(),d=[].slice.call(u);for(;d.length&&d[d.length-1]===void 0;)d.pop();let g=c||d.length;if(gm)throw new nt(`Too many arguments provided. Expected max ${m} but received ${g}.`);o.demanded.forEach(D=>{let y=d.shift(),F=Ql(y);D.cmd.filter(_=>_===F||_==="*").length===0&&Xl(F,D.cmd,s),s+=1;}),o.optional.forEach(D=>{if(d.length===0)return;let y=d.shift(),F=Ql(y);D.cmd.filter(_=>_===F||_==="*").length===0&&Xl(F,D.cmd,s),s+=1;});}catch(s){console.warn(s.stack);}}function Ql(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function Xl(e,t,r){throw new nt(`Invalid ${uv[r]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}function Ut(e){return !!e&&!!e.then&&typeof e.then=="function"}function rt(e,t,r,n){r.assert.notStrictEqual(e,t,n);}function ef(e,t){t.assert.strictEqual(typeof e,"string");}function zi(e){return Object.keys(e)}function Vr(e={},t=()=>!0){let r={};return zi(e).forEach(n=>{t(n,e[n])&&(r[n]=e[n]);}),r}function uf(e,t){return function(r,n=!1){if(oe(" [boolean]",[r,n],arguments.length),Array.isArray(r)){for(let s=0;s(t.applyBeforeValidation=!1,t)):[]}function tf(e,t,r,n){let s=new Error("middleware cannot return a promise when applyBeforeValidation is true");return r.reduce((o,u)=>{if(u.applyBeforeValidation!==n)return o;if(Ut(o))return o.then(c=>Promise.all([c,u(c,t)])).then(([c,d])=>Object.assign(c,d));{let c=u(o,t);if(n&&Ut(c))throw s;return Ut(c)?c.then(d=>Object.assign(o,d)):Object.assign(o,c)}},e)}function cf(){return lv()?0:1}function lv(){return fv()&&!process.defaultApp}function fv(){return !!process.versions.electron}function dv(e){return e.slice(cf()+1)}function lf(){return process.argv[cf()]}var hv=Object.freeze({__proto__:null,hideBin:dv,getProcessArgvBin:lf});function pv(e){if(typeof U>"u")return null;for(let t=0,r=Object.keys(U.cache),n;t{}),Array.isArray(w))if(gv(w))[w,...L]=w;else for(let Z of w)o.addHandler(Z);else if(yv(w)){let Z=Array.isArray(w.command)||typeof w.command=="string"?w.command:g(w);w.aliases&&(Z=[].concat(Z).concat(w.aliases)),o.addHandler(Z,D(w),w.builder,w.handler,w.middlewares,w.deprecated);return}else if(rf(P)){o.addHandler([w].concat(L),M,P.builder,P.handler,P.middlewares,P.deprecated);return}if(typeof w=="string"){let Z=Hr(w);L=L.map(V=>Hr(V).cmd);let q=!1,Y=[Z.cmd].concat(L).filter(V=>zr.test(V)?(q=!0,!1):!0);Y.length===0&&q&&Y.push("$0"),q&&(Z.cmd=Y[0],L=Y.slice(1),w=w.replace(zr,Z.cmd)),L.forEach(V=>{c[V]=Z.cmd;}),M!==!1&&t.command(w,M,q,L,te),u[Z.cmd]={original:w,description:M,handler:J,builder:P||{},middlewares:ee,deprecated:te,demanded:Z.demanded,optional:Z.optional},q&&(d=u[Z.cmd]);}},o.addDirectory=function(w,M,P,J,X){X=X||{},typeof X.recurse!="boolean"&&(X.recurse=!1),Array.isArray(X.extensions)||(X.extensions=["js"]);let te=typeof X.visit=="function"?X.visit:L=>L;X.visit=function(ee,Z,q){let Y=te(ee,Z,q);if(Y){if(~M.files.indexOf(Z))return Y;M.files.push(Z),o.addHandler(Y);}return Y},s.requireDirectory({require:P,filename:J},w,X);};function g(x){let w=pv(x);if(!w)throw new Error(`No command name given for module: ${s.inspect(x)}`);return m(w.filename)}function m(x){return s.path.basename(x,s.path.extname(x))}function D({describe:x,description:w,desc:M}){for(let P of [x,w,M]){if(typeof P=="string"||P===!1)return P;rt(P,!0,s);}return !1}o.getCommands=()=>Object.keys(u).concat(Object.keys(c)),o.getCommandHandlers=()=>u,o.hasDefaultCommand=()=>!!d,o.runCommand=function(w,M,P,J){let X=P.aliases,te=u[w]||u[c[w]]||d,L=M.getContext(),ee=L.files.length,Z=L.commands.slice(),q=P.argv,Y={};w&&(L.commands.push(w),L.fullCommands.push(te.original));let V=te.builder;if(ea(V)){let W=V(M.reset(P.aliases)),k=Av(W)?W:M;y(k)&&k.getUsageInstance().usage(F(Z,te),te.description),q=k._parseArgs(null,null,!0,J),X=k.parsed.aliases;}else if(Dv(V)){let W=M.reset(P.aliases);y(W)&&W.getUsageInstance().usage(F(Z,te),te.description),Object.keys(te.builder).forEach(k=>{W.option(k,V[k]);}),q=W._parseArgs(null,null,!0,J),X=W.parsed.aliases;}M._hasOutput()||(Y=C(te,q,L));let I=n.slice(0).concat(te.middlewares);if(tf(q,M,I,!0),M._hasOutput()||M._runValidation(q,X,Y,M.parsed.error,!w),te.handler&&!M._hasOutput()){M._setHasOutput();let W=!!M.getOptions().configuration["populate--"];M._postProcess(q,W),q=tf(q,M,I,!1);let k;Ut(q)?k=q.then(K=>te.handler(K)):k=te.handler(q);let G=M.getHandlerFinishCommand();Ut(k)?(M.getUsageInstance().cacheHelpMessage(),k.then(K=>{G&&G(K);}).catch(K=>{try{M.getUsageInstance().fail(null,K);}catch{}}).then(()=>{M.getUsageInstance().clearCachedHelpMessage();})):G&&G(k);}return w&&(L.commands.pop(),L.fullCommands.pop()),ee=L.files.length-ee,ee>0&&L.files.splice(ee*-1,ee),q};function y(x){return !x.getUsageInstance().getUsageDisabled()&&x.getUsageInstance().getUsage().length===0}function F(x,w){let M=zr.test(w.original)?w.original.replace(zr,"").trim():w.original,P=x.filter(J=>!zr.test(J));return P.push(M),`$0 ${P.join(" ")}`}o.runDefaultBuilderOn=function(x){if(rt(d,void 0,s),y(x)){let M=zr.test(d.original)?d.original:d.original.replace(/^[^[\]<>]*/,"$0 ");x.getUsageInstance().usage(M,d.description);}let w=d.builder;ea(w)?w(x):rf(w)||Object.keys(w).forEach(M=>{x.option(M,w[M]);});};function C(x,w,M){w._=w._.slice(M.commands.length);let P=x.demanded.slice(0),J=x.optional.slice(0),X={};for(r.positionalCount(P.length,w._.length);P.length;){let te=P.shift();_(te,w,X);}for(;J.length;){let te=J.shift();_(te,w,X);}return w._=M.commands.concat(w._.map(te=>""+te)),j(w,X,o.cmdToParseOptions(x.original)),X}function _(x,w,M){let P=x.cmd[0];x.variadic?M[P]=w._.splice(0).map(String):w._.length&&(M[P]=[String(w._.shift())]);}function j(x,w,M){let P=Object.assign({},e.getOptions());P.default=Object.assign(M.default,P.default);for(let L of Object.keys(M.alias))P.alias[L]=(P.alias[L]||[]).concat(M.alias[L]);P.array=P.array.concat(M.array),P.config={};let J=[];if(Object.keys(w).forEach(L=>{w[L].map(ee=>{P.configuration["unknown-options-as-args"]&&(P.key[L]=!0),J.push(`--${L}`),J.push(ee);});}),!J.length)return;let X=Object.assign({},P.configuration,{"populate--":!0}),te=s.Parser.detailed(J,Object.assign({},P,{configuration:X}));if(te.error)e.getUsageInstance().fail(te.error.message,te.error);else {let L=Object.keys(w);Object.keys(w).forEach(ee=>{L.push(...te.aliases[ee]);}),Object.keys(te.argv).forEach(ee=>{L.indexOf(ee)!==-1&&(w[ee]||(w[ee]=te.argv[ee]),x[ee]=te.argv[ee]);});}}o.cmdToParseOptions=function(x){let w={array:[],default:{},alias:{},demand:{}},M=Hr(x);return M.demanded.forEach(P=>{let[J,...X]=P.cmd;P.variadic&&(w.array.push(J),w.default[J]=[]),w.alias[J]=X,w.demand[J]=!0;}),M.optional.forEach(P=>{let[J,...X]=P.cmd;P.variadic&&(w.array.push(J),w.default[J]=[]),w.alias[J]=X;}),w},o.reset=()=>(u={},c={},d=void 0,o);let $=[];return o.freeze=()=>{$.push({handlers:u,aliasMap:c,defaultCommand:d});},o.unfreeze=()=>{let x=$.pop();rt(x,void 0,s),{handlers:u,aliasMap:c,defaultCommand:d}=x;},o}function rf(e){return typeof e=="object"&&!!e.builder&&typeof e.handler=="function"}function gv(e){return !!e.every(t=>typeof t=="string")}function ea(e){return typeof e=="function"}function Dv(e){return typeof e=="object"}function yv(e){return typeof e=="object"&&!Array.isArray(e)}function Mn(e){typeof process>"u"||[process.stdout,process.stderr].forEach(t=>{let r=t;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(e);});}function wv(e,t,r){let n=t.__,s={},o=[];s.failFn=function(Y){o.push(Y);};let u=null,c=!0;s.showHelpOnFail=function(Y=!0,V){function I(){return typeof Y=="string"?[!0,Y]:[Y,V]}let[W,k]=I();return u=k,c=W,s};let d=!1;s.fail=function(Y,V){let I=e._getLoggerInstance();if(o.length)for(let W=o.length-1;W>=0;--W)o[W](Y,V,s);else {if(e.getExitProcess()&&Mn(!0),d||(d=!0,c&&(e.showHelp("error"),I.error()),(Y||V)&&I.error(Y||V),u&&((Y||V)&&I.error(""),I.error(u))),V=V||new nt(Y),e.getExitProcess())return e.exit(1);if(e._hasParseCallback())return e.exit(1,V);throw V}};let g=[],m=!1;s.usage=(q,Y)=>q===null?(m=!0,g=[],s):(m=!1,g.push([q,Y||""]),s),s.getUsage=()=>g,s.getUsageDisabled=()=>m,s.getPositionalGroupName=()=>n("Positionals:");let D=[];s.example=(q,Y)=>{D.push([q,Y||""]);};let y=[];s.command=function(Y,V,I,W,k=!1){I&&(y=y.map(G=>(G[2]=!1,G))),y.push([Y,V||"",I,W,k]);},s.getCommands=()=>y;let F={};s.describe=function(Y,V){Array.isArray(Y)?Y.forEach(I=>{s.describe(I,V);}):typeof Y=="object"?Object.keys(Y).forEach(I=>{s.describe(I,Y[I]);}):F[Y]=V;},s.getDescriptions=()=>F;let C=[];s.epilog=q=>{C.push(q);};let _=!1,j;s.wrap=q=>{_=!0,j=q;};function $(){return _||(j=L(),_=!0),j}let x="__yargsString__:";s.deferY18nLookup=q=>x+q,s.help=function(){if(P)return P;M();let Y=e.customScriptName?e.$0:r.path.basename(e.$0),V=e.getDemandedOptions(),I=e.getDemandedCommands(),W=e.getDeprecatedOptions(),k=e.getGroups(),G=e.getOptions(),K=[];K=K.concat(Object.keys(F)),K=K.concat(Object.keys(V)),K=K.concat(Object.keys(I)),K=K.concat(Object.keys(G.default)),K=K.filter(X),K=Object.keys(K.reduce((ie,we)=>(we!=="_"&&(ie[we]=!0),ie),{}));let ye=$(),de=r.cliui({width:ye,wrap:!!ye});if(!m){if(g.length)g.forEach(ie=>{de.div(`${ie[0].replace(/\$0/g,Y)}`),ie[1]&&de.div({text:`${ie[1]}`,padding:[1,0,0,0]});}),de.div();else if(y.length){let ie=null;I._?ie=`${Y} <${n("command")}> +`:ie=`${Y} [${n("command")}] +`,de.div(`${ie}`);}}if(y.length){de.div(n("Commands:"));let ie=e.getContext(),we=ie.commands.length?`${ie.commands.join(" ")} `:"";e.getParserConfiguration()["sort-commands"]===!0&&(y=y.sort((le,ve)=>le[0].localeCompare(ve[0]))),y.forEach(le=>{let ve=`${Y} ${we}${le[0].replace(/^\$0 ?/,"")}`;de.span({text:ve,padding:[0,2,0,2],width:w(y,ye,`${Y}${we}`)+4},{text:le[1]});let Ce=[];le[2]&&Ce.push(`[${n("default")}]`),le[3]&&le[3].length&&Ce.push(`[${n("aliases:")} ${le[3].join(", ")}]`),le[4]&&(typeof le[4]=="string"?Ce.push(`[${n("deprecated: %s",le[4])}]`):Ce.push(`[${n("deprecated")}]`)),Ce.length?de.div({text:Ce.join(" "),padding:[0,0,0,2],align:"right"}):de.div();}),de.div();}let Ye=(Object.keys(G.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);K=K.filter(ie=>!e.parsed.newAliases[ie]&&Ye.every(we=>(G.alias[we]||[]).indexOf(ie)===-1));let R=n("Options:");k[R]||(k[R]=[]),J(K,G.alias,k,R);let Ke=ie=>/^--/.test(Ui(ie)),Ne=Object.keys(k).filter(ie=>k[ie].length>0).map(ie=>{let we=k[ie].filter(X).map(le=>{if(~Ye.indexOf(le))return le;for(let ve=0,Ce;(Ce=Ye[ve])!==void 0;ve++)if(~(G.alias[Ce]||[]).indexOf(le))return Ce;return le});return {groupName:ie,normalizedKeys:we}}).filter(({normalizedKeys:ie})=>ie.length>0).map(({groupName:ie,normalizedKeys:we})=>{let le=we.reduce((ve,Ce)=>(ve[Ce]=[Ce].concat(G.alias[Ce]||[]).map(E=>ie===s.getPositionalGroupName()?E:(/^[0-9]$/.test(E)?~G.boolean.indexOf(Ce)?"-":"--":E.length>1?"--":"-")+E).sort((E,S)=>Ke(E)===Ke(S)?0:Ke(E)?1:-1).join(", "),ve),{});return {groupName:ie,normalizedKeys:we,switches:le}});if(Ne.filter(({groupName:ie})=>ie!==s.getPositionalGroupName()).some(({normalizedKeys:ie,switches:we})=>!ie.every(le=>Ke(we[le])))&&Ne.filter(({groupName:ie})=>ie!==s.getPositionalGroupName()).forEach(({normalizedKeys:ie,switches:we})=>{ie.forEach(le=>{Ke(we[le])&&(we[le]=vv(we[le],4));});}),Ne.forEach(({groupName:ie,normalizedKeys:we,switches:le})=>{de.div(ie),we.forEach(ve=>{let Ce=le[ve],E=F[ve]||"",S=null;~E.lastIndexOf(x)&&(E=n(E.substring(x.length))),~G.boolean.indexOf(ve)&&(S=`[${n("boolean")}]`),~G.count.indexOf(ve)&&(S=`[${n("count")}]`),~G.string.indexOf(ve)&&(S=`[${n("string")}]`),~G.normalize.indexOf(ve)&&(S=`[${n("string")}]`),~G.array.indexOf(ve)&&(S=`[${n("array")}]`),~G.number.indexOf(ve)&&(S=`[${n("number")}]`);let h=T=>typeof T=="string"?`[${n("deprecated: %s",T)}]`:`[${n("deprecated")}]`,v=[ve in W?h(W[ve]):null,S,ve in V?`[${n("required")}]`:null,G.choices&&G.choices[ve]?`[${n("choices:")} ${s.stringifiedValues(G.choices[ve])}]`:null,te(G.default[ve],G.defaultDescription[ve])].filter(Boolean).join(" ");de.span({text:Ui(Ce),padding:[0,2,0,2+nf(Ce)],width:w(le,ye)+4},E),v?de.div({text:v,padding:[0,0,0,2],align:"right"}):de.div();}),de.div();}),D.length&&(de.div(n("Examples:")),D.forEach(ie=>{ie[0]=ie[0].replace(/\$0/g,Y);}),D.forEach(ie=>{ie[1]===""?de.div({text:ie[0],padding:[0,2,0,2]}):de.div({text:ie[0],padding:[0,2,0,2],width:w(D,ye)+4},{text:ie[1]});}),de.div()),C.length>0){let ie=C.map(we=>we.replace(/\$0/g,Y)).join(` +`);de.div(`${ie} +`);}return de.toString().replace(/\s*$/,"")};function w(q,Y,V){let I=0;return Array.isArray(q)||(q=Object.values(q).map(W=>[W])),q.forEach(W=>{I=Math.max(r.stringWidth(V?`${V} ${Ui(W[0])}`:Ui(W[0]))+nf(W[0]),I);}),Y&&(I=Math.min(I,parseInt((Y*.5).toString(),10))),I}function M(){let q=e.getDemandedOptions(),Y=e.getOptions();(Object.keys(Y.alias)||[]).forEach(V=>{Y.alias[V].forEach(I=>{F[I]&&s.describe(V,F[I]),I in q&&e.demandOption(V,q[I]),~Y.boolean.indexOf(I)&&e.boolean(V),~Y.count.indexOf(I)&&e.count(V),~Y.string.indexOf(I)&&e.string(V),~Y.normalize.indexOf(I)&&e.normalize(V),~Y.array.indexOf(I)&&e.array(V),~Y.number.indexOf(I)&&e.number(V);});});}let P;s.cacheHelpMessage=function(){P=this.help();},s.clearCachedHelpMessage=function(){P=void 0;};function J(q,Y,V,I){let W=[],k=null;return Object.keys(V).forEach(G=>{W=W.concat(V[G]);}),q.forEach(G=>{k=[G].concat(Y[G]),k.some(K=>W.indexOf(K)!==-1)||V[I].push(G);}),W}function X(q){return e.getOptions().hiddenOptions.indexOf(q)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}s.showHelp=q=>{let Y=e._getLoggerInstance();q||(q="error"),(typeof q=="function"?q:Y[q])(s.help());},s.functionDescription=q=>["(",q.name?r.Parser.decamelize(q.name,"-"):n("generated-value"),")"].join(""),s.stringifiedValues=function(Y,V){let I="",W=V||", ",k=[].concat(Y);return !Y||!k.length||k.forEach(G=>{I.length&&(I+=W),I+=JSON.stringify(G);}),I};function te(q,Y){let V=`[${n("default:")} `;if(q===void 0&&!Y)return null;if(Y)V+=Y;else switch(typeof q){case"string":V+=`"${q}"`;break;case"object":V+=JSON.stringify(q);break;default:V+=q;}return `${V}]`}function L(){return r.process.stdColumns?Math.min(80,r.process.stdColumns):80}let ee=null;s.version=q=>{ee=q;},s.showVersion=()=>{e._getLoggerInstance().log(ee);},s.reset=function(Y){return u=null,d=!1,g=[],m=!1,C=[],D=[],y=[],F=Vr(F,V=>!Y[V]),s};let Z=[];return s.freeze=function(){Z.push({failMessage:u,failureOutput:d,usages:g,usageDisabled:m,epilogs:C,examples:D,commands:y,descriptions:F});},s.unfreeze=function(){let Y=Z.pop();rt(Y,void 0,r),{failMessage:u,failureOutput:d,usages:g,usageDisabled:m,epilogs:C,examples:D,commands:y,descriptions:F}=Y;},s}function ta(e){return typeof e=="object"}function vv(e,t){return ta(e)?{text:e.text,indentation:e.indentation+t}:{text:e,indentation:t}}function nf(e){return ta(e)?e.indentation:0}function Ui(e){return ta(e)?e.text:e}var Ev=`###-begin-{{app_name}}-completions-### # # yargs command completion script # @@ -28115,8 +50,7 @@ _yargs_completions() } complete -o default -F _yargs_completions {{app_name}} ###-end-{{app_name}}-completions-### -`; -const completionZshTemplate = `###-begin-{{app_name}}-completions-### +`,_v=`###-begin-{{app_name}}-completions-### # # yargs command completion script # @@ -28127,1796 +61,41 @@ _{{app_name}}_yargs_completions() { local reply local si=$IFS - IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) + IFS=$' +' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) IFS=$si _describe 'values' reply } compdef _{{app_name}}_yargs_completions {{app_name}} ###-end-{{app_name}}-completions-### -`; - -function completion(yargs, usage, command, shim) { - const self = { - completionKey: 'get-yargs-completions', - }; - let aliases; - self.setParsed = function setParsed(parsed) { - aliases = parsed.aliases; - }; - const zshShell = (shim.getEnv('SHELL') && shim.getEnv('SHELL').indexOf('zsh') !== -1) || - (shim.getEnv('ZSH_NAME') && shim.getEnv('ZSH_NAME').indexOf('zsh') !== -1); - self.getCompletion = function getCompletion(args, done) { - const completions = []; - const current = args.length ? args[args.length - 1] : ''; - const argv = yargs.parse(args, true); - const parentCommands = yargs.getContext().commands; - function runCompletionFunction(argv) { - assertNotStrictEqual(completionFunction, null, shim); - if (isSyncCompletionFunction(completionFunction)) { - const result = completionFunction(current, argv); - if (isPromise(result)) { - return result - .then(list => { - shim.process.nextTick(() => { - done(list); - }); - }) - .catch(err => { - shim.process.nextTick(() => { - throw err; - }); - }); - } - return done(result); - } - else { - return completionFunction(current, argv, completions => { - done(completions); - }); - } - } - if (completionFunction) { - return isPromise(argv) - ? argv.then(runCompletionFunction) - : runCompletionFunction(argv); - } - const handlers = command.getCommandHandlers(); - for (let i = 0, ii = args.length; i < ii; ++i) { - if (handlers[args[i]] && handlers[args[i]].builder) { - const builder = handlers[args[i]].builder; - if (isCommandBuilderCallback(builder)) { - const y = yargs.reset(); - builder(y); - return y.argv; - } - } - } - if (!current.match(/^-/) && - parentCommands[parentCommands.length - 1] !== current) { - usage.getCommands().forEach(usageCommand => { - const commandName = parseCommand(usageCommand[0]).cmd; - if (args.indexOf(commandName) === -1) { - if (!zshShell) { - completions.push(commandName); - } - else { - const desc = usageCommand[1] || ''; - completions.push(commandName.replace(/:/g, '\\:') + ':' + desc); - } - } - }); - } - if (current.match(/^-/) || (current === '' && completions.length === 0)) { - const descs = usage.getDescriptions(); - const options = yargs.getOptions(); - Object.keys(options.key).forEach(key => { - const negable = !!options.configuration['boolean-negation'] && - options.boolean.includes(key); - let keyAndAliases = [key].concat(aliases[key] || []); - if (negable) - keyAndAliases = keyAndAliases.concat(keyAndAliases.map(key => `no-${key}`)); - function completeOptionKey(key) { - const notInArgs = keyAndAliases.every(val => args.indexOf(`--${val}`) === -1); - if (notInArgs) { - const startsByTwoDashes = (s) => /^--/.test(s); - const isShortOption = (s) => /^[^0-9]$/.test(s); - const dashes = !startsByTwoDashes(current) && isShortOption(key) ? '-' : '--'; - if (!zshShell) { - completions.push(dashes + key); - } - else { - const desc = descs[key] || ''; - completions.push(dashes + - `${key.replace(/:/g, '\\:')}:${desc.replace('__yargsString__:', '')}`); - } - } - } - completeOptionKey(key); - if (negable && !!options.default[key]) - completeOptionKey(`no-${key}`); - }); - } - done(completions); - }; - self.generateCompletionScript = function generateCompletionScript($0, cmd) { - let script = zshShell - ? completionZshTemplate - : completionShTemplate; - const name = shim.path.basename($0); - if ($0.match(/\.js$/)) - $0 = `./${$0}`; - script = script.replace(/{{app_name}}/g, name); - script = script.replace(/{{completion_command}}/g, cmd); - return script.replace(/{{app_path}}/g, $0); - }; - let completionFunction = null; - self.registerFunction = fn => { - completionFunction = fn; - }; - return self; -} -function isSyncCompletionFunction(completionFunction) { - return completionFunction.length < 3; -} - -function levenshtein(a, b) { - if (a.length === 0) - return b.length; - if (b.length === 0) - return a.length; - const matrix = []; - let i; - for (i = 0; i <= b.length; i++) { - matrix[i] = [i]; - } - let j; - for (j = 0; j <= a.length; j++) { - matrix[0][j] = j; - } - for (i = 1; i <= b.length; i++) { - for (j = 1; j <= a.length; j++) { - if (b.charAt(i - 1) === a.charAt(j - 1)) { - matrix[i][j] = matrix[i - 1][j - 1]; - } - else { - matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, Math.min(matrix[i][j - 1] + 1, matrix[i - 1][j] + 1)); - } - } - } - return matrix[b.length][a.length]; -} - -const specialKeys = ['$0', '--', '_']; -function validation(yargs, usage, y18n, shim) { - const __ = y18n.__; - const __n = y18n.__n; - const self = {}; - self.nonOptionCount = function nonOptionCount(argv) { - const demandedCommands = yargs.getDemandedCommands(); - const positionalCount = argv._.length + (argv['--'] ? argv['--'].length : 0); - const _s = positionalCount - yargs.getContext().commands.length; - if (demandedCommands._ && - (_s < demandedCommands._.min || _s > demandedCommands._.max)) { - if (_s < demandedCommands._.min) { - if (demandedCommands._.minMsg !== undefined) { - usage.fail(demandedCommands._.minMsg - ? demandedCommands._.minMsg - .replace(/\$0/g, _s.toString()) - .replace(/\$1/, demandedCommands._.min.toString()) - : null); - } - else { - usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', _s, _s.toString(), demandedCommands._.min.toString())); - } - } - else if (_s > demandedCommands._.max) { - if (demandedCommands._.maxMsg !== undefined) { - usage.fail(demandedCommands._.maxMsg - ? demandedCommands._.maxMsg - .replace(/\$0/g, _s.toString()) - .replace(/\$1/, demandedCommands._.max.toString()) - : null); - } - else { - usage.fail(__n('Too many non-option arguments: got %s, maximum of %s', 'Too many non-option arguments: got %s, maximum of %s', _s, _s.toString(), demandedCommands._.max.toString())); - } - } - } - }; - self.positionalCount = function positionalCount(required, observed) { - if (observed < required) { - usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed + '', required + '')); - } - }; - self.requiredArguments = function requiredArguments(argv) { - const demandedOptions = yargs.getDemandedOptions(); - let missing = null; - for (const key of Object.keys(demandedOptions)) { - if (!Object.prototype.hasOwnProperty.call(argv, key) || - typeof argv[key] === 'undefined') { - missing = missing || {}; - missing[key] = demandedOptions[key]; - } - } - if (missing) { - const customMsgs = []; - for (const key of Object.keys(missing)) { - const msg = missing[key]; - if (msg && customMsgs.indexOf(msg) < 0) { - customMsgs.push(msg); - } - } - const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : ''; - usage.fail(__n('Missing required argument: %s', 'Missing required arguments: %s', Object.keys(missing).length, Object.keys(missing).join(', ') + customMsg)); - } - }; - self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand, checkPositionals = true) { - const commandKeys = yargs.getCommandInstance().getCommands(); - const unknown = []; - const currentContext = yargs.getContext(); - Object.keys(argv).forEach(key => { - if (specialKeys.indexOf(key) === -1 && - !Object.prototype.hasOwnProperty.call(positionalMap, key) && - !Object.prototype.hasOwnProperty.call(yargs._getParseContext(), key) && - !self.isValidAndSomeAliasIsNotNew(key, aliases)) { - unknown.push(key); - } - }); - if (checkPositionals && - (currentContext.commands.length > 0 || - commandKeys.length > 0 || - isDefaultCommand)) { - argv._.slice(currentContext.commands.length).forEach(key => { - if (commandKeys.indexOf('' + key) === -1) { - unknown.push('' + key); - } - }); - } - if (unknown.length > 0) { - usage.fail(__n('Unknown argument: %s', 'Unknown arguments: %s', unknown.length, unknown.join(', '))); - } - }; - self.unknownCommands = function unknownCommands(argv) { - const commandKeys = yargs.getCommandInstance().getCommands(); - const unknown = []; - const currentContext = yargs.getContext(); - if (currentContext.commands.length > 0 || commandKeys.length > 0) { - argv._.slice(currentContext.commands.length).forEach(key => { - if (commandKeys.indexOf('' + key) === -1) { - unknown.push('' + key); - } - }); - } - if (unknown.length > 0) { - usage.fail(__n('Unknown command: %s', 'Unknown commands: %s', unknown.length, unknown.join(', '))); - return true; - } - else { - return false; - } - }; - self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) { - if (!Object.prototype.hasOwnProperty.call(aliases, key)) { - return false; - } - const newAliases = yargs.parsed.newAliases; - for (const a of [key, ...aliases[key]]) { - if (!Object.prototype.hasOwnProperty.call(newAliases, a) || - !newAliases[key]) { - return true; - } - } - return false; - }; - self.limitedChoices = function limitedChoices(argv) { - const options = yargs.getOptions(); - const invalid = {}; - if (!Object.keys(options.choices).length) - return; - Object.keys(argv).forEach(key => { - if (specialKeys.indexOf(key) === -1 && - Object.prototype.hasOwnProperty.call(options.choices, key)) { - [].concat(argv[key]).forEach(value => { - if (options.choices[key].indexOf(value) === -1 && - value !== undefined) { - invalid[key] = (invalid[key] || []).concat(value); - } - }); - } - }); - const invalidKeys = Object.keys(invalid); - if (!invalidKeys.length) - return; - let msg = __('Invalid values:'); - invalidKeys.forEach(key => { - msg += `\n ${__('Argument: %s, Given: %s, Choices: %s', key, usage.stringifiedValues(invalid[key]), usage.stringifiedValues(options.choices[key]))}`; - }); - usage.fail(msg); - }; - let checks = []; - self.check = function check(f, global) { - checks.push({ - func: f, - global, - }); - }; - self.customChecks = function customChecks(argv, aliases) { - for (let i = 0, f; (f = checks[i]) !== undefined; i++) { - const func = f.func; - let result = null; - try { - result = func(argv, aliases); - } - catch (err) { - usage.fail(err.message ? err.message : err, err); - continue; - } - if (!result) { - usage.fail(__('Argument check failed: %s', func.toString())); - } - else if (typeof result === 'string' || result instanceof Error) { - usage.fail(result.toString(), result); - } - } - }; - let implied = {}; - self.implies = function implies(key, value) { - argsert(' [array|number|string]', [key, value], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach(k => { - self.implies(k, key[k]); - }); - } - else { - yargs.global(key); - if (!implied[key]) { - implied[key] = []; - } - if (Array.isArray(value)) { - value.forEach(i => self.implies(key, i)); - } - else { - assertNotStrictEqual(value, undefined, shim); - implied[key].push(value); - } - } - }; - self.getImplied = function getImplied() { - return implied; - }; - function keyExists(argv, val) { - const num = Number(val); - val = isNaN(num) ? val : num; - if (typeof val === 'number') { - val = argv._.length >= val; - } - else if (val.match(/^--no-.+/)) { - val = val.match(/^--no-(.+)/)[1]; - val = !argv[val]; - } - else { - val = argv[val]; - } - return val; - } - self.implications = function implications(argv) { - const implyFail = []; - Object.keys(implied).forEach(key => { - const origKey = key; - (implied[key] || []).forEach(value => { - let key = origKey; - const origValue = value; - key = keyExists(argv, key); - value = keyExists(argv, value); - if (key && !value) { - implyFail.push(` ${origKey} -> ${origValue}`); - } - }); - }); - if (implyFail.length) { - let msg = `${__('Implications failed:')}\n`; - implyFail.forEach(value => { - msg += value; - }); - usage.fail(msg); - } - }; - let conflicting = {}; - self.conflicts = function conflicts(key, value) { - argsert(' [array|string]', [key, value], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach(k => { - self.conflicts(k, key[k]); - }); - } - else { - yargs.global(key); - if (!conflicting[key]) { - conflicting[key] = []; - } - if (Array.isArray(value)) { - value.forEach(i => self.conflicts(key, i)); - } - else { - conflicting[key].push(value); - } - } - }; - self.getConflicting = () => conflicting; - self.conflicting = function conflictingFn(argv) { - Object.keys(argv).forEach(key => { - if (conflicting[key]) { - conflicting[key].forEach(value => { - if (value && argv[key] !== undefined && argv[value] !== undefined) { - usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)); - } - }); - } - }); - }; - self.recommendCommands = function recommendCommands(cmd, potentialCommands) { - const threshold = 3; - potentialCommands = potentialCommands.sort((a, b) => b.length - a.length); - let recommended = null; - let bestDistance = Infinity; - for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) { - const d = levenshtein(cmd, candidate); - if (d <= threshold && d < bestDistance) { - bestDistance = d; - recommended = candidate; - } - } - if (recommended) - usage.fail(__('Did you mean %s?', recommended)); - }; - self.reset = function reset(localLookup) { - implied = objFilter(implied, k => !localLookup[k]); - conflicting = objFilter(conflicting, k => !localLookup[k]); - checks = checks.filter(c => c.global); - return self; - }; - const frozens = []; - self.freeze = function freeze() { - frozens.push({ - implied, - checks, - conflicting, - }); - }; - self.unfreeze = function unfreeze() { - const frozen = frozens.pop(); - assertNotStrictEqual(frozen, undefined, shim); - ({ implied, checks, conflicting } = frozen); - }; - return self; -} - -let shim$1; -function YargsWithShim(_shim) { - shim$1 = _shim; - return Yargs; -} -function Yargs(processArgs = [], cwd = shim$1.process.cwd(), parentRequire) { - const self = {}; - let command$1; - let completion$1 = null; - let groups = {}; - const globalMiddleware = []; - let output = ''; - const preservedGroups = {}; - let usage$1; - let validation$1; - let handlerFinishCommand = null; - const y18n = shim$1.y18n; - self.middleware = globalMiddlewareFactory(globalMiddleware, self); - self.scriptName = function (scriptName) { - self.customScriptName = true; - self.$0 = scriptName; - return self; - }; - let default$0; - if (/\b(node|iojs|electron)(\.exe)?$/.test(shim$1.process.argv()[0])) { - default$0 = shim$1.process.argv().slice(1, 2); - } - else { - default$0 = shim$1.process.argv().slice(0, 1); - } - self.$0 = default$0 - .map(x => { - const b = rebase(cwd, x); - return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x; - }) - .join(' ') - .trim(); - if (shim$1.getEnv('_') && shim$1.getProcessArgvBin() === shim$1.getEnv('_')) { - self.$0 = shim$1 - .getEnv('_') - .replace(`${shim$1.path.dirname(shim$1.process.execPath())}/`, ''); - } - const context = { resets: -1, commands: [], fullCommands: [], files: [] }; - self.getContext = () => context; - let hasOutput = false; - let exitError = null; - self.exit = (code, err) => { - hasOutput = true; - exitError = err; - if (exitProcess) - shim$1.process.exit(code); - }; - let completionCommand = null; - self.completion = function (cmd, desc, fn) { - argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length); - if (typeof desc === 'function') { - fn = desc; - desc = undefined; - } - completionCommand = cmd || completionCommand || 'completion'; - if (!desc && desc !== false) { - desc = 'generate completion script'; - } - self.command(completionCommand, desc); - if (fn) - completion$1.registerFunction(fn); - return self; - }; - let options; - self.resetOptions = self.reset = function resetOptions(aliases = {}) { - context.resets++; - options = options || {}; - const tmpOptions = {}; - tmpOptions.local = options.local ? options.local : []; - tmpOptions.configObjects = options.configObjects - ? options.configObjects - : []; - const localLookup = {}; - tmpOptions.local.forEach(l => { - localLookup[l] = true; - (aliases[l] || []).forEach(a => { - localLookup[a] = true; - }); - }); - Object.assign(preservedGroups, Object.keys(groups).reduce((acc, groupName) => { - const keys = groups[groupName].filter(key => !(key in localLookup)); - if (keys.length > 0) { - acc[groupName] = keys; - } - return acc; - }, {})); - groups = {}; - const arrayOptions = [ - 'array', - 'boolean', - 'string', - 'skipValidation', - 'count', - 'normalize', - 'number', - 'hiddenOptions', - ]; - const objectOptions = [ - 'narg', - 'key', - 'alias', - 'default', - 'defaultDescription', - 'config', - 'choices', - 'demandedOptions', - 'demandedCommands', - 'coerce', - 'deprecatedOptions', - ]; - arrayOptions.forEach(k => { - tmpOptions[k] = (options[k] || []).filter((k) => !localLookup[k]); - }); - objectOptions.forEach((k) => { - tmpOptions[k] = objFilter(options[k], k => !localLookup[k]); - }); - tmpOptions.envPrefix = options.envPrefix; - options = tmpOptions; - usage$1 = usage$1 ? usage$1.reset(localLookup) : usage(self, y18n, shim$1); - validation$1 = validation$1 - ? validation$1.reset(localLookup) - : validation(self, usage$1, y18n, shim$1); - command$1 = command$1 - ? command$1.reset() - : command(self, usage$1, validation$1, globalMiddleware, shim$1); - if (!completion$1) - completion$1 = completion(self, usage$1, command$1, shim$1); - completionCommand = null; - output = ''; - exitError = null; - hasOutput = false; - self.parsed = false; - return self; - }; - self.resetOptions(); - const frozens = []; - function freeze() { - frozens.push({ - options, - configObjects: options.configObjects.slice(0), - exitProcess, - groups, - strict, - strictCommands, - strictOptions, - completionCommand, - output, - exitError, - hasOutput, - parsed: self.parsed, - parseFn, - parseContext, - handlerFinishCommand, - }); - usage$1.freeze(); - validation$1.freeze(); - command$1.freeze(); - } - function unfreeze() { - const frozen = frozens.pop(); - assertNotStrictEqual(frozen, undefined, shim$1); - let configObjects; - ({ - options, - configObjects, - exitProcess, - groups, - output, - exitError, - hasOutput, - parsed: self.parsed, - strict, - strictCommands, - strictOptions, - completionCommand, - parseFn, - parseContext, - handlerFinishCommand, - } = frozen); - options.configObjects = configObjects; - usage$1.unfreeze(); - validation$1.unfreeze(); - command$1.unfreeze(); - } - self.boolean = function (keys) { - argsert('', [keys], arguments.length); - populateParserHintArray('boolean', keys); - return self; - }; - self.array = function (keys) { - argsert('', [keys], arguments.length); - populateParserHintArray('array', keys); - return self; - }; - self.number = function (keys) { - argsert('', [keys], arguments.length); - populateParserHintArray('number', keys); - return self; - }; - self.normalize = function (keys) { - argsert('', [keys], arguments.length); - populateParserHintArray('normalize', keys); - return self; - }; - self.count = function (keys) { - argsert('', [keys], arguments.length); - populateParserHintArray('count', keys); - return self; - }; - self.string = function (keys) { - argsert('', [keys], arguments.length); - populateParserHintArray('string', keys); - return self; - }; - self.requiresArg = function (keys) { - argsert(' [number]', [keys], arguments.length); - if (typeof keys === 'string' && options.narg[keys]) { - return self; - } - else { - populateParserHintSingleValueDictionary(self.requiresArg, 'narg', keys, NaN); - } - return self; - }; - self.skipValidation = function (keys) { - argsert('', [keys], arguments.length); - populateParserHintArray('skipValidation', keys); - return self; - }; - function populateParserHintArray(type, keys) { - keys = [].concat(keys); - keys.forEach(key => { - key = sanitizeKey(key); - options[type].push(key); - }); - } - self.nargs = function (key, value) { - argsert(' [number]', [key, value], arguments.length); - populateParserHintSingleValueDictionary(self.nargs, 'narg', key, value); - return self; - }; - self.choices = function (key, value) { - argsert(' [string|array]', [key, value], arguments.length); - populateParserHintArrayDictionary(self.choices, 'choices', key, value); - return self; - }; - self.alias = function (key, value) { - argsert(' [string|array]', [key, value], arguments.length); - populateParserHintArrayDictionary(self.alias, 'alias', key, value); - return self; - }; - self.default = self.defaults = function (key, value, defaultDescription) { - argsert(' [*] [string]', [key, value, defaultDescription], arguments.length); - if (defaultDescription) { - assertSingleKey(key, shim$1); - options.defaultDescription[key] = defaultDescription; - } - if (typeof value === 'function') { - assertSingleKey(key, shim$1); - if (!options.defaultDescription[key]) - options.defaultDescription[key] = usage$1.functionDescription(value); - value = value.call(); - } - populateParserHintSingleValueDictionary(self.default, 'default', key, value); - return self; - }; - self.describe = function (key, desc) { - argsert(' [string]', [key, desc], arguments.length); - setKey(key, true); - usage$1.describe(key, desc); - return self; - }; - function setKey(key, set) { - populateParserHintSingleValueDictionary(setKey, 'key', key, set); - return self; - } - function demandOption(keys, msg) { - argsert(' [string]', [keys, msg], arguments.length); - populateParserHintSingleValueDictionary(self.demandOption, 'demandedOptions', keys, msg); - return self; - } - self.demandOption = demandOption; - self.coerce = function (keys, value) { - argsert(' [function]', [keys, value], arguments.length); - populateParserHintSingleValueDictionary(self.coerce, 'coerce', keys, value); - return self; - }; - function populateParserHintSingleValueDictionary(builder, type, key, value) { - populateParserHintDictionary(builder, type, key, value, (type, key, value) => { - options[type][key] = value; - }); - } - function populateParserHintArrayDictionary(builder, type, key, value) { - populateParserHintDictionary(builder, type, key, value, (type, key, value) => { - options[type][key] = (options[type][key] || []).concat(value); - }); - } - function populateParserHintDictionary(builder, type, key, value, singleKeyHandler) { - if (Array.isArray(key)) { - key.forEach(k => { - builder(k, value); - }); - } - else if (((key) => typeof key === 'object')(key)) { - for (const k of objectKeys(key)) { - builder(k, key[k]); - } - } - else { - singleKeyHandler(type, sanitizeKey(key), value); - } - } - function sanitizeKey(key) { - if (key === '__proto__') - return '___proto___'; - return key; - } - function deleteFromParserHintObject(optionKey) { - objectKeys(options).forEach((hintKey) => { - if (((key) => key === 'configObjects')(hintKey)) - return; - const hint = options[hintKey]; - if (Array.isArray(hint)) { - if (~hint.indexOf(optionKey)) - hint.splice(hint.indexOf(optionKey), 1); - } - else if (typeof hint === 'object') { - delete hint[optionKey]; - } - }); - delete usage$1.getDescriptions()[optionKey]; - } - self.config = function config(key = 'config', msg, parseFn) { - argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length); - if (typeof key === 'object' && !Array.isArray(key)) { - key = applyExtends(key, cwd, self.getParserConfiguration()['deep-merge-config'] || false, shim$1); - options.configObjects = (options.configObjects || []).concat(key); - return self; - } - if (typeof msg === 'function') { - parseFn = msg; - msg = undefined; - } - self.describe(key, msg || usage$1.deferY18nLookup('Path to JSON config file')); - (Array.isArray(key) ? key : [key]).forEach(k => { - options.config[k] = parseFn || true; - }); - return self; - }; - self.example = function (cmd, description) { - argsert(' [string]', [cmd, description], arguments.length); - if (Array.isArray(cmd)) { - cmd.forEach(exampleParams => self.example(...exampleParams)); - } - else { - usage$1.example(cmd, description); - } - return self; - }; - self.command = function (cmd, description, builder, handler, middlewares, deprecated) { - argsert(' [string|boolean] [function|object] [function] [array] [boolean|string]', [cmd, description, builder, handler, middlewares, deprecated], arguments.length); - command$1.addHandler(cmd, description, builder, handler, middlewares, deprecated); - return self; - }; - self.commandDir = function (dir, opts) { - argsert(' [object]', [dir, opts], arguments.length); - const req = parentRequire || shim$1.require; - command$1.addDirectory(dir, self.getContext(), req, shim$1.getCallerFile(), opts); - return self; - }; - self.demand = self.required = self.require = function demand(keys, max, msg) { - if (Array.isArray(max)) { - max.forEach(key => { - assertNotStrictEqual(msg, true, shim$1); - demandOption(key, msg); - }); - max = Infinity; - } - else if (typeof max !== 'number') { - msg = max; - max = Infinity; - } - if (typeof keys === 'number') { - assertNotStrictEqual(msg, true, shim$1); - self.demandCommand(keys, max, msg, msg); - } - else if (Array.isArray(keys)) { - keys.forEach(key => { - assertNotStrictEqual(msg, true, shim$1); - demandOption(key, msg); - }); - } - else { - if (typeof msg === 'string') { - demandOption(keys, msg); - } - else if (msg === true || typeof msg === 'undefined') { - demandOption(keys); - } - } - return self; - }; - self.demandCommand = function demandCommand(min = 1, max, minMsg, maxMsg) { - argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length); - if (typeof max !== 'number') { - minMsg = max; - max = Infinity; - } - self.global('_', false); - options.demandedCommands._ = { - min, - max, - minMsg, - maxMsg, - }; - return self; - }; - self.getDemandedOptions = () => { - argsert([], 0); - return options.demandedOptions; - }; - self.getDemandedCommands = () => { - argsert([], 0); - return options.demandedCommands; - }; - self.deprecateOption = function deprecateOption(option, message) { - argsert(' [string|boolean]', [option, message], arguments.length); - options.deprecatedOptions[option] = message; - return self; - }; - self.getDeprecatedOptions = () => { - argsert([], 0); - return options.deprecatedOptions; - }; - self.implies = function (key, value) { - argsert(' [number|string|array]', [key, value], arguments.length); - validation$1.implies(key, value); - return self; - }; - self.conflicts = function (key1, key2) { - argsert(' [string|array]', [key1, key2], arguments.length); - validation$1.conflicts(key1, key2); - return self; - }; - self.usage = function (msg, description, builder, handler) { - argsert(' [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length); - if (description !== undefined) { - assertNotStrictEqual(msg, null, shim$1); - if ((msg || '').match(/^\$0( |$)/)) { - return self.command(msg, description, builder, handler); - } - else { - throw new YError('.usage() description must start with $0 if being used as alias for .command()'); - } - } - else { - usage$1.usage(msg); - return self; - } - }; - self.epilogue = self.epilog = function (msg) { - argsert('', [msg], arguments.length); - usage$1.epilog(msg); - return self; - }; - self.fail = function (f) { - argsert('', [f], arguments.length); - usage$1.failFn(f); - return self; - }; - self.onFinishCommand = function (f) { - argsert('', [f], arguments.length); - handlerFinishCommand = f; - return self; - }; - self.getHandlerFinishCommand = () => handlerFinishCommand; - self.check = function (f, _global) { - argsert(' [boolean]', [f, _global], arguments.length); - validation$1.check(f, _global !== false); - return self; - }; - self.global = function global(globals, global) { - argsert(' [boolean]', [globals, global], arguments.length); - globals = [].concat(globals); - if (global !== false) { - options.local = options.local.filter(l => globals.indexOf(l) === -1); - } - else { - globals.forEach(g => { - if (options.local.indexOf(g) === -1) - options.local.push(g); - }); - } - return self; - }; - self.pkgConf = function pkgConf(key, rootPath) { - argsert(' [string]', [key, rootPath], arguments.length); - let conf = null; - const obj = pkgUp(rootPath || cwd); - if (obj[key] && typeof obj[key] === 'object') { - conf = applyExtends(obj[key], rootPath || cwd, self.getParserConfiguration()['deep-merge-config'] || false, shim$1); - options.configObjects = (options.configObjects || []).concat(conf); - } - return self; - }; - const pkgs = {}; - function pkgUp(rootPath) { - const npath = rootPath || '*'; - if (pkgs[npath]) - return pkgs[npath]; - let obj = {}; - try { - let startDir = rootPath || shim$1.mainFilename; - if (!rootPath && shim$1.path.extname(startDir)) { - startDir = shim$1.path.dirname(startDir); - } - const pkgJsonPath = shim$1.findUp(startDir, (dir, names) => { - if (names.includes('package.json')) { - return 'package.json'; - } - else { - return undefined; - } - }); - assertNotStrictEqual(pkgJsonPath, undefined, shim$1); - obj = JSON.parse(shim$1.readFileSync(pkgJsonPath, 'utf8')); - } - catch (_noop) { } - pkgs[npath] = obj || {}; - return pkgs[npath]; - } - let parseFn = null; - let parseContext = null; - self.parse = function parse(args, shortCircuit, _parseFn) { - argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length); - freeze(); - if (typeof args === 'undefined') { - const argv = self._parseArgs(processArgs); - const tmpParsed = self.parsed; - unfreeze(); - self.parsed = tmpParsed; - return argv; - } - if (typeof shortCircuit === 'object') { - parseContext = shortCircuit; - shortCircuit = _parseFn; - } - if (typeof shortCircuit === 'function') { - parseFn = shortCircuit; - shortCircuit = false; - } - if (!shortCircuit) - processArgs = args; - if (parseFn) - exitProcess = false; - const parsed = self._parseArgs(args, !!shortCircuit); - completion$1.setParsed(self.parsed); - if (parseFn) - parseFn(exitError, parsed, output); - unfreeze(); - return parsed; - }; - self._getParseContext = () => parseContext || {}; - self._hasParseCallback = () => !!parseFn; - self.option = self.options = function option(key, opt) { - argsert(' [object]', [key, opt], arguments.length); - if (typeof key === 'object') { - Object.keys(key).forEach(k => { - self.options(k, key[k]); - }); - } - else { - if (typeof opt !== 'object') { - opt = {}; - } - options.key[key] = true; - if (opt.alias) - self.alias(key, opt.alias); - const deprecate = opt.deprecate || opt.deprecated; - if (deprecate) { - self.deprecateOption(key, deprecate); - } - const demand = opt.demand || opt.required || opt.require; - if (demand) { - self.demand(key, demand); - } - if (opt.demandOption) { - self.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined); - } - if (opt.conflicts) { - self.conflicts(key, opt.conflicts); - } - if ('default' in opt) { - self.default(key, opt.default); - } - if (opt.implies !== undefined) { - self.implies(key, opt.implies); - } - if (opt.nargs !== undefined) { - self.nargs(key, opt.nargs); - } - if (opt.config) { - self.config(key, opt.configParser); - } - if (opt.normalize) { - self.normalize(key); - } - if (opt.choices) { - self.choices(key, opt.choices); - } - if (opt.coerce) { - self.coerce(key, opt.coerce); - } - if (opt.group) { - self.group(key, opt.group); - } - if (opt.boolean || opt.type === 'boolean') { - self.boolean(key); - if (opt.alias) - self.boolean(opt.alias); - } - if (opt.array || opt.type === 'array') { - self.array(key); - if (opt.alias) - self.array(opt.alias); - } - if (opt.number || opt.type === 'number') { - self.number(key); - if (opt.alias) - self.number(opt.alias); - } - if (opt.string || opt.type === 'string') { - self.string(key); - if (opt.alias) - self.string(opt.alias); - } - if (opt.count || opt.type === 'count') { - self.count(key); - } - if (typeof opt.global === 'boolean') { - self.global(key, opt.global); - } - if (opt.defaultDescription) { - options.defaultDescription[key] = opt.defaultDescription; - } - if (opt.skipValidation) { - self.skipValidation(key); - } - const desc = opt.describe || opt.description || opt.desc; - self.describe(key, desc); - if (opt.hidden) { - self.hide(key); - } - if (opt.requiresArg) { - self.requiresArg(key); - } - } - return self; - }; - self.getOptions = () => options; - self.positional = function (key, opts) { - argsert(' ', [key, opts], arguments.length); - if (context.resets === 0) { - throw new YError(".positional() can only be called in a command's builder function"); - } - const supportedOpts = [ - 'default', - 'defaultDescription', - 'implies', - 'normalize', - 'choices', - 'conflicts', - 'coerce', - 'type', - 'describe', - 'desc', - 'description', - 'alias', - ]; - opts = objFilter(opts, (k, v) => { - let accept = supportedOpts.indexOf(k) !== -1; - if (k === 'type' && ['string', 'number', 'boolean'].indexOf(v) === -1) - accept = false; - return accept; - }); - const fullCommand = context.fullCommands[context.fullCommands.length - 1]; - const parseOptions = fullCommand - ? command$1.cmdToParseOptions(fullCommand) - : { - array: [], - alias: {}, - default: {}, - demand: {}, - }; - objectKeys(parseOptions).forEach(pk => { - const parseOption = parseOptions[pk]; - if (Array.isArray(parseOption)) { - if (parseOption.indexOf(key) !== -1) - opts[pk] = true; - } - else { - if (parseOption[key] && !(pk in opts)) - opts[pk] = parseOption[key]; - } - }); - self.group(key, usage$1.getPositionalGroupName()); - return self.option(key, opts); - }; - self.group = function group(opts, groupName) { - argsert(' ', [opts, groupName], arguments.length); - const existing = preservedGroups[groupName] || groups[groupName]; - if (preservedGroups[groupName]) { - delete preservedGroups[groupName]; - } - const seen = {}; - groups[groupName] = (existing || []).concat(opts).filter(key => { - if (seen[key]) - return false; - return (seen[key] = true); - }); - return self; - }; - self.getGroups = () => Object.assign({}, groups, preservedGroups); - self.env = function (prefix) { - argsert('[string|boolean]', [prefix], arguments.length); - if (prefix === false) - delete options.envPrefix; - else - options.envPrefix = prefix || ''; - return self; - }; - self.wrap = function (cols) { - argsert('', [cols], arguments.length); - usage$1.wrap(cols); - return self; - }; - let strict = false; - self.strict = function (enabled) { - argsert('[boolean]', [enabled], arguments.length); - strict = enabled !== false; - return self; - }; - self.getStrict = () => strict; - let strictCommands = false; - self.strictCommands = function (enabled) { - argsert('[boolean]', [enabled], arguments.length); - strictCommands = enabled !== false; - return self; - }; - self.getStrictCommands = () => strictCommands; - let strictOptions = false; - self.strictOptions = function (enabled) { - argsert('[boolean]', [enabled], arguments.length); - strictOptions = enabled !== false; - return self; - }; - self.getStrictOptions = () => strictOptions; - let parserConfig = {}; - self.parserConfiguration = function parserConfiguration(config) { - argsert('', [config], arguments.length); - parserConfig = config; - return self; - }; - self.getParserConfiguration = () => parserConfig; - self.showHelp = function (level) { - argsert('[string|function]', [level], arguments.length); - if (!self.parsed) - self._parseArgs(processArgs); - if (command$1.hasDefaultCommand()) { - context.resets++; - command$1.runDefaultBuilderOn(self); - } - usage$1.showHelp(level); - return self; - }; - let versionOpt = null; - self.version = function version(opt, msg, ver) { - const defaultVersionOpt = 'version'; - argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length); - if (versionOpt) { - deleteFromParserHintObject(versionOpt); - usage$1.version(undefined); - versionOpt = null; - } - if (arguments.length === 0) { - ver = guessVersion(); - opt = defaultVersionOpt; - } - else if (arguments.length === 1) { - if (opt === false) { - return self; - } - ver = opt; - opt = defaultVersionOpt; - } - else if (arguments.length === 2) { - ver = msg; - msg = undefined; - } - versionOpt = typeof opt === 'string' ? opt : defaultVersionOpt; - msg = msg || usage$1.deferY18nLookup('Show version number'); - usage$1.version(ver || undefined); - self.boolean(versionOpt); - self.describe(versionOpt, msg); - return self; - }; - function guessVersion() { - const obj = pkgUp(); - return obj.version || 'unknown'; - } - let helpOpt = null; - self.addHelpOpt = self.help = function addHelpOpt(opt, msg) { - const defaultHelpOpt = 'help'; - argsert('[string|boolean] [string]', [opt, msg], arguments.length); - if (helpOpt) { - deleteFromParserHintObject(helpOpt); - helpOpt = null; - } - if (arguments.length === 1) { - if (opt === false) - return self; - } - helpOpt = typeof opt === 'string' ? opt : defaultHelpOpt; - self.boolean(helpOpt); - self.describe(helpOpt, msg || usage$1.deferY18nLookup('Show help')); - return self; - }; - const defaultShowHiddenOpt = 'show-hidden'; - options.showHiddenOpt = defaultShowHiddenOpt; - self.addShowHiddenOpt = self.showHidden = function addShowHiddenOpt(opt, msg) { - argsert('[string|boolean] [string]', [opt, msg], arguments.length); - if (arguments.length === 1) { - if (opt === false) - return self; - } - const showHiddenOpt = typeof opt === 'string' ? opt : defaultShowHiddenOpt; - self.boolean(showHiddenOpt); - self.describe(showHiddenOpt, msg || usage$1.deferY18nLookup('Show hidden options')); - options.showHiddenOpt = showHiddenOpt; - return self; - }; - self.hide = function hide(key) { - argsert('', [key], arguments.length); - options.hiddenOptions.push(key); - return self; - }; - self.showHelpOnFail = function showHelpOnFail(enabled, message) { - argsert('[boolean|string] [string]', [enabled, message], arguments.length); - usage$1.showHelpOnFail(enabled, message); - return self; - }; - let exitProcess = true; - self.exitProcess = function (enabled = true) { - argsert('[boolean]', [enabled], arguments.length); - exitProcess = enabled; - return self; - }; - self.getExitProcess = () => exitProcess; - self.showCompletionScript = function ($0, cmd) { - argsert('[string] [string]', [$0, cmd], arguments.length); - $0 = $0 || self.$0; - _logger.log(completion$1.generateCompletionScript($0, cmd || completionCommand || 'completion')); - return self; - }; - self.getCompletion = function (args, done) { - argsert(' ', [args, done], arguments.length); - completion$1.getCompletion(args, done); - }; - self.locale = function (locale) { - argsert('[string]', [locale], arguments.length); - if (!locale) { - guessLocale(); - return y18n.getLocale(); - } - detectLocale = false; - y18n.setLocale(locale); - return self; - }; - self.updateStrings = self.updateLocale = function (obj) { - argsert('', [obj], arguments.length); - detectLocale = false; - y18n.updateLocale(obj); - return self; - }; - let detectLocale = true; - self.detectLocale = function (detect) { - argsert('', [detect], arguments.length); - detectLocale = detect; - return self; - }; - self.getDetectLocale = () => detectLocale; - const _logger = { - log(...args) { - if (!self._hasParseCallback()) - console.log(...args); - hasOutput = true; - if (output.length) - output += '\n'; - output += args.join(' '); - }, - error(...args) { - if (!self._hasParseCallback()) - console.error(...args); - hasOutput = true; - if (output.length) - output += '\n'; - output += args.join(' '); - }, - }; - self._getLoggerInstance = () => _logger; - self._hasOutput = () => hasOutput; - self._setHasOutput = () => { - hasOutput = true; - }; - let recommendCommands; - self.recommendCommands = function (recommend = true) { - argsert('[boolean]', [recommend], arguments.length); - recommendCommands = recommend; - return self; - }; - self.getUsageInstance = () => usage$1; - self.getValidationInstance = () => validation$1; - self.getCommandInstance = () => command$1; - self.terminalWidth = () => { - argsert([], 0); - return shim$1.process.stdColumns; - }; - Object.defineProperty(self, 'argv', { - get: () => self._parseArgs(processArgs), - enumerable: true, - }); - self._parseArgs = function parseArgs(args, shortCircuit, _calledFromCommand, commandIndex) { - let skipValidation = !!_calledFromCommand; - args = args || processArgs; - options.__ = y18n.__; - options.configuration = self.getParserConfiguration(); - const populateDoubleDash = !!options.configuration['populate--']; - const config = Object.assign({}, options.configuration, { - 'populate--': true, - }); - const parsed = shim$1.Parser.detailed(args, Object.assign({}, options, { - configuration: Object.assign({ 'parse-positional-numbers': false }, config), - })); - let argv = parsed.argv; - if (parseContext) - argv = Object.assign({}, argv, parseContext); - const aliases = parsed.aliases; - argv.$0 = self.$0; - self.parsed = parsed; - try { - guessLocale(); - if (shortCircuit) { - return self._postProcess(argv, populateDoubleDash, _calledFromCommand); - } - if (helpOpt) { - const helpCmds = [helpOpt] - .concat(aliases[helpOpt] || []) - .filter(k => k.length > 1); - if (~helpCmds.indexOf('' + argv._[argv._.length - 1])) { - argv._.pop(); - argv[helpOpt] = true; - } - } - const handlerKeys = command$1.getCommands(); - const requestCompletions = completion$1.completionKey in argv; - const skipRecommendation = argv[helpOpt] || requestCompletions; - const skipDefaultCommand = skipRecommendation && - (handlerKeys.length > 1 || handlerKeys[0] !== '$0'); - if (argv._.length) { - if (handlerKeys.length) { - let firstUnknownCommand; - for (let i = commandIndex || 0, cmd; argv._[i] !== undefined; i++) { - cmd = String(argv._[i]); - if (~handlerKeys.indexOf(cmd) && cmd !== completionCommand) { - const innerArgv = command$1.runCommand(cmd, self, parsed, i + 1); - return self._postProcess(innerArgv, populateDoubleDash); - } - else if (!firstUnknownCommand && cmd !== completionCommand) { - firstUnknownCommand = cmd; - break; - } - } - if (command$1.hasDefaultCommand() && !skipDefaultCommand) { - const innerArgv = command$1.runCommand(null, self, parsed); - return self._postProcess(innerArgv, populateDoubleDash); - } - if (recommendCommands && firstUnknownCommand && !skipRecommendation) { - validation$1.recommendCommands(firstUnknownCommand, handlerKeys); - } - } - if (completionCommand && - ~argv._.indexOf(completionCommand) && - !requestCompletions) { - if (exitProcess) - setBlocking(true); - self.showCompletionScript(); - self.exit(0); - } - } - else if (command$1.hasDefaultCommand() && !skipDefaultCommand) { - const innerArgv = command$1.runCommand(null, self, parsed); - return self._postProcess(innerArgv, populateDoubleDash); - } - if (requestCompletions) { - if (exitProcess) - setBlocking(true); - args = [].concat(args); - const completionArgs = args.slice(args.indexOf(`--${completion$1.completionKey}`) + 1); - completion$1.getCompletion(completionArgs, completions => { - (completions || []).forEach(completion => { - _logger.log(completion); - }); - self.exit(0); - }); - return self._postProcess(argv, !populateDoubleDash, _calledFromCommand); - } - if (!hasOutput) { - Object.keys(argv).forEach(key => { - if (key === helpOpt && argv[key]) { - if (exitProcess) - setBlocking(true); - skipValidation = true; - self.showHelp('log'); - self.exit(0); - } - else if (key === versionOpt && argv[key]) { - if (exitProcess) - setBlocking(true); - skipValidation = true; - usage$1.showVersion(); - self.exit(0); - } - }); - } - if (!skipValidation && options.skipValidation.length > 0) { - skipValidation = Object.keys(argv).some(key => options.skipValidation.indexOf(key) >= 0 && argv[key] === true); - } - if (!skipValidation) { - if (parsed.error) - throw new YError(parsed.error.message); - if (!requestCompletions) { - self._runValidation(argv, aliases, {}, parsed.error); - } - } - } - catch (err) { - if (err instanceof YError) - usage$1.fail(err.message, err); - else - throw err; - } - return self._postProcess(argv, populateDoubleDash, _calledFromCommand); - }; - self._postProcess = function (argv, populateDoubleDash, calledFromCommand = false) { - if (isPromise(argv)) - return argv; - if (calledFromCommand) - return argv; - if (!populateDoubleDash) { - argv = self._copyDoubleDash(argv); - } - const parsePositionalNumbers = self.getParserConfiguration()['parse-positional-numbers'] || - self.getParserConfiguration()['parse-positional-numbers'] === undefined; - if (parsePositionalNumbers) { - argv = self._parsePositionalNumbers(argv); - } - return argv; - }; - self._copyDoubleDash = function (argv) { - if (!argv._ || !argv['--']) - return argv; - argv._.push.apply(argv._, argv['--']); - try { - delete argv['--']; - } - catch (_err) { } - return argv; - }; - self._parsePositionalNumbers = function (argv) { - const args = argv['--'] ? argv['--'] : argv._; - for (let i = 0, arg; (arg = args[i]) !== undefined; i++) { - if (shim$1.Parser.looksLikeNumber(arg) && - Number.isSafeInteger(Math.floor(parseFloat(`${arg}`)))) { - args[i] = Number(arg); - } - } - return argv; - }; - self._runValidation = function runValidation(argv, aliases, positionalMap, parseErrors, isDefaultCommand = false) { - if (parseErrors) - throw new YError(parseErrors.message); - validation$1.nonOptionCount(argv); - validation$1.requiredArguments(argv); - let failedStrictCommands = false; - if (strictCommands) { - failedStrictCommands = validation$1.unknownCommands(argv); - } - if (strict && !failedStrictCommands) { - validation$1.unknownArguments(argv, aliases, positionalMap, isDefaultCommand); - } - else if (strictOptions) { - validation$1.unknownArguments(argv, aliases, {}, false, false); - } - validation$1.customChecks(argv, aliases); - validation$1.limitedChoices(argv); - validation$1.implications(argv); - validation$1.conflicting(argv); - }; - function guessLocale() { - if (!detectLocale) - return; - const locale = shim$1.getEnv('LC_ALL') || - shim$1.getEnv('LC_MESSAGES') || - shim$1.getEnv('LANG') || - shim$1.getEnv('LANGUAGE') || - 'en_US'; - self.locale(locale.replace(/[.:].*/, '')); - } - self.help(); - self.version(); - return self; -} -const rebase = (base, dir) => shim$1.path.relative(base, dir); -function isYargsInstance(y) { - return !!y && typeof y._parseArgs === 'function'; -} - -var _a, _b; -const { readFileSync } = __nccwpck_require__(9896); -const { inspect } = __nccwpck_require__(9023); -const { resolve } = __nccwpck_require__(6928); -const y18n = __nccwpck_require__(9012); -const Parser = __nccwpck_require__(9030); -var cjsPlatformShim = { - assert: { - notStrictEqual: assert.notStrictEqual, - strictEqual: assert.strictEqual, - }, - cliui: __nccwpck_require__(7028), - findUp: __nccwpck_require__(6261), - getEnv: (key) => { - return process.env[key]; - }, - getCallerFile: __nccwpck_require__(6196), - getProcessArgvBin: getProcessArgvBin, - inspect, - mainFilename: (_b = (_a = false || __nccwpck_require__(3486) === void 0 ? void 0 : __nccwpck_require__.c[__nccwpck_require__.s]) === null || _a === void 0 ? void 0 : _a.filename) !== null && _b !== void 0 ? _b : process.cwd(), - Parser, - path: __nccwpck_require__(6928), - process: { - argv: () => process.argv, - cwd: process.cwd, - execPath: () => process.execPath, - exit: (code) => { - process.exit(code); - }, - nextTick: process.nextTick, - stdColumns: typeof process.stdout.columns !== 'undefined' - ? process.stdout.columns - : null, - }, - readFileSync, - require: __nccwpck_require__(3486), - requireDirectory: __nccwpck_require__(13), - stringWidth: __nccwpck_require__(5078), - y18n: y18n({ - directory: resolve(__dirname, '../locales'), - updateFiles: false, - }), -}; - -const minNodeVersion = process && process.env && process.env.YARGS_MIN_NODE_VERSION - ? Number(process.env.YARGS_MIN_NODE_VERSION) - : 10; -if (process && process.version) { - const major = Number(process.version.match(/v([^.]+)/)[1]); - if (major < minNodeVersion) { - throw Error(`yargs supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs#supported-nodejs-versions`); - } -} -const Parser$1 = __nccwpck_require__(9030); -const Yargs$1 = YargsWithShim(cjsPlatformShim); -var cjs = { - applyExtends, - cjsPlatformShim, - Yargs: Yargs$1, - argsert, - globalMiddlewareFactory, - isPromise, - objFilter, - parseCommand, - Parser: Parser$1, - processArgv, - rebase, - YError, -}; - -module.exports = cjs; - - -/***/ }), - -/***/ 5151: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -// classic singleton yargs API, to use yargs -// without running as a singleton do: -// require('yargs/yargs')(process.argv.slice(2)) -const {Yargs, processArgv} = __nccwpck_require__(7710); - -Argv(processArgv.hideBin(process.argv)); - -module.exports = Argv; - -function Argv(processArgs, cwd) { - const argv = Yargs(processArgs, cwd, __nccwpck_require__(6965)); - singletonify(argv); - return argv; -} - -/* Hack an instance of Argv with process.argv into Argv - so people can do - require('yargs')(['--beeble=1','-z','zizzle']).argv - to parse a list of args and - require('yargs').argv - to get a parsed version of process.argv. -*/ -function singletonify(inst) { - Object.keys(inst).forEach(key => { - if (key === 'argv') { - Argv.__defineGetter__(key, inst.__lookupGetter__(key)); - } else if (typeof inst[key] === 'function') { - Argv[key] = inst[key].bind(inst); - } else { - Argv.__defineGetter__('$0', () => { - return inst.$0; - }); - Argv.__defineGetter__('parsed', () => { - return inst.parsed; - }); - } - }); -} - - -/***/ }), - -/***/ 4704: -/***/ ((module) => { - -"use strict"; -module.exports = {"rE":"0.12.1"}; - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ id: moduleId, -/******/ loaded: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ // expose the module cache -/******/ __nccwpck_require__.c = __webpack_module_cache__; -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/node module decorator */ -/******/ (() => { -/******/ __nccwpck_require__.nmd = (module) => { -/******/ module.paths = []; -/******/ if (!module.children) module.children = []; -/******/ return module; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; -/******/ -/************************************************************************/ -/******/ -/******/ // module cache are used so entry inlining is disabled -/******/ // startup -/******/ // Load entry module and return exports -/******/ var __webpack_exports__ = __nccwpck_require__(__nccwpck_require__.s = 3300); -/******/ module.exports = __webpack_exports__; -/******/ -/******/ })() -; \ No newline at end of file +`;function Fv(e,t,r,n){let s={completionKey:"get-yargs-completions"},o;s.setParsed=function(g){o=g.aliases;};let u=n.getEnv("SHELL")&&n.getEnv("SHELL").indexOf("zsh")!==-1||n.getEnv("ZSH_NAME")&&n.getEnv("ZSH_NAME").indexOf("zsh")!==-1;s.getCompletion=function(g,m){let D=[],y=g.length?g[g.length-1]:"",F=e.parse(g,!0),C=e.getContext().commands;function _($){if(rt(c,null,n),Sv(c)){let x=c(y,$);return Ut(x)?x.then(w=>{n.process.nextTick(()=>{m(w);});}).catch(w=>{n.process.nextTick(()=>{throw w});}):m(x)}else return c(y,$,x=>{m(x);})}if(c)return Ut(F)?F.then(_):_(F);let j=r.getCommandHandlers();for(let $=0,x=g.length;${let x=Hr($[0]).cmd;if(g.indexOf(x)===-1)if(!u)D.push(x);else {let w=$[1]||"";D.push(x.replace(/:/g,"\\:")+":"+w);}}),y.match(/^-/)||y===""&&D.length===0){let $=t.getDescriptions(),x=e.getOptions();Object.keys(x.key).forEach(w=>{let M=!!x.configuration["boolean-negation"]&&x.boolean.includes(w),P=[w].concat(o[w]||[]);M&&(P=P.concat(P.map(X=>`no-${X}`)));function J(X){if(P.every(L=>g.indexOf(`--${L}`)===-1)){let L=q=>/^--/.test(q),ee=q=>/^[^0-9]$/.test(q),Z=!L(y)&&ee(X)?"-":"--";if(!u)D.push(Z+X);else {let q=$[X]||"";D.push(Z+`${X.replace(/:/g,"\\:")}:${q.replace("__yargsString__:","")}`);}}}J(w),M&&x.default[w]&&J(`no-${w}`);});}m(D);},s.generateCompletionScript=function(g,m){let D=u?_v:Ev,y=n.path.basename(g);return g.match(/\.js$/)&&(g=`./${g}`),D=D.replace(/{{app_name}}/g,y),D=D.replace(/{{completion_command}}/g,m),D.replace(/{{app_path}}/g,g)};let c=null;return s.registerFunction=d=>{c=d;},s}function Sv(e){return e.length<3}function Cv(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let r=[],n;for(n=0;n<=t.length;n++)r[n]=[n];let s;for(s=0;s<=e.length;s++)r[0][s]=s;for(n=1;n<=t.length;n++)for(s=1;s<=e.length;s++)t.charAt(n-1)===e.charAt(s-1)?r[n][s]=r[n-1][s-1]:r[n][s]=Math.min(r[n-1][s-1]+1,Math.min(r[n][s-1]+1,r[n-1][s]+1));return r[t.length][e.length]}var sf=["$0","--","_"];function bv(e,t,r,n){let s=r.__,o=r.__n,u={};u.nonOptionCount=function(F){let C=e.getDemandedCommands(),j=F._.length+(F["--"]?F["--"].length:0)-e.getContext().commands.length;C._&&(jC._.max)&&(jC._.max&&(C._.maxMsg!==void 0?t.fail(C._.maxMsg?C._.maxMsg.replace(/\$0/g,j.toString()).replace(/\$1/,C._.max.toString()):null):t.fail(o("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",j,j.toString(),C._.max.toString()))));},u.positionalCount=function(F,C){C"u")&&(_=_||{},_[j]=C[j]);if(_){let j=[];for(let x of Object.keys(_)){let w=_[x];w&&j.indexOf(w)<0&&j.push(w);}let $=j.length?` +${j.join(` +`)}`:"";t.fail(o("Missing required argument: %s","Missing required arguments: %s",Object.keys(_).length,Object.keys(_).join(", ")+$));}},u.unknownArguments=function(F,C,_,j,$=!0){let x=e.getCommandInstance().getCommands(),w=[],M=e.getContext();Object.keys(F).forEach(P=>{sf.indexOf(P)===-1&&!Object.prototype.hasOwnProperty.call(_,P)&&!Object.prototype.hasOwnProperty.call(e._getParseContext(),P)&&!u.isValidAndSomeAliasIsNotNew(P,C)&&w.push(P);}),$&&(M.commands.length>0||x.length>0||j)&&F._.slice(M.commands.length).forEach(P=>{x.indexOf(""+P)===-1&&w.push(""+P);}),w.length>0&&t.fail(o("Unknown argument: %s","Unknown arguments: %s",w.length,w.join(", ")));},u.unknownCommands=function(F){let C=e.getCommandInstance().getCommands(),_=[],j=e.getContext();return (j.commands.length>0||C.length>0)&&F._.slice(j.commands.length).forEach($=>{C.indexOf(""+$)===-1&&_.push(""+$);}),_.length>0?(t.fail(o("Unknown command: %s","Unknown commands: %s",_.length,_.join(", "))),!0):!1},u.isValidAndSomeAliasIsNotNew=function(F,C){if(!Object.prototype.hasOwnProperty.call(C,F))return !1;let _=e.parsed.newAliases;for(let j of [F,...C[F]])if(!Object.prototype.hasOwnProperty.call(_,j)||!_[F])return !0;return !1},u.limitedChoices=function(F){let C=e.getOptions(),_={};if(!Object.keys(C.choices).length)return;Object.keys(F).forEach(x=>{sf.indexOf(x)===-1&&Object.prototype.hasOwnProperty.call(C.choices,x)&&[].concat(F[x]).forEach(w=>{C.choices[x].indexOf(w)===-1&&w!==void 0&&(_[x]=(_[x]||[]).concat(w));});});let j=Object.keys(_);if(!j.length)return;let $=s("Invalid values:");j.forEach(x=>{$+=` + ${s("Argument: %s, Given: %s, Choices: %s",x,t.stringifiedValues(_[x]),t.stringifiedValues(C.choices[x]))}`;}),t.fail($);};let c=[];u.check=function(F,C){c.push({func:F,global:C});},u.customChecks=function(F,C){for(let _=0,j;(j=c[_])!==void 0;_++){let $=j.func,x=null;try{x=$(F,C);}catch(w){t.fail(w.message?w.message:w,w);continue}x?(typeof x=="string"||x instanceof Error)&&t.fail(x.toString(),x):t.fail(s("Argument check failed: %s",$.toString()));}};let d={};u.implies=function(F,C){oe(" [array|number|string]",[F,C],arguments.length),typeof F=="object"?Object.keys(F).forEach(_=>{u.implies(_,F[_]);}):(e.global(F),d[F]||(d[F]=[]),Array.isArray(C)?C.forEach(_=>u.implies(F,_)):(rt(C,void 0,n),d[F].push(C)));},u.getImplied=function(){return d};function g(y,F){let C=Number(F);return F=isNaN(C)?F:C,typeof F=="number"?F=y._.length>=F:F.match(/^--no-.+/)?(F=F.match(/^--no-(.+)/)[1],F=!y[F]):F=y[F],F}u.implications=function(F){let C=[];if(Object.keys(d).forEach(_=>{let j=_;(d[_]||[]).forEach($=>{let x=j,w=$;x=g(F,x),$=g(F,$),x&&!$&&C.push(` ${j} -> ${w}`);});}),C.length){let _=`${s("Implications failed:")} +`;C.forEach(j=>{_+=j;}),t.fail(_);}};let m={};u.conflicts=function(F,C){oe(" [array|string]",[F,C],arguments.length),typeof F=="object"?Object.keys(F).forEach(_=>{u.conflicts(_,F[_]);}):(e.global(F),m[F]||(m[F]=[]),Array.isArray(C)?C.forEach(_=>u.conflicts(F,_)):m[F].push(C));},u.getConflicting=()=>m,u.conflicting=function(F){Object.keys(F).forEach(C=>{m[C]&&m[C].forEach(_=>{_&&F[C]!==void 0&&F[_]!==void 0&&t.fail(s("Arguments %s and %s are mutually exclusive",C,_));});});},u.recommendCommands=function(F,C){C=C.sort((x,w)=>w.length-x.length);let j=null,$=1/0;for(let x=0,w;(w=C[x])!==void 0;x++){let M=Cv(F,w);M<=3&&M<$&&($=M,j=w);}j&&t.fail(s("Did you mean %s?",j));},u.reset=function(F){return d=Vr(d,C=>!F[C]),m=Vr(m,C=>!F[C]),c=c.filter(C=>C.global),u};let D=[];return u.freeze=function(){D.push({implied:d,checks:c,conflicting:m});},u.unfreeze=function(){let F=D.pop();rt(F,void 0,n),{implied:d,checks:c,conflicting:m}=F;},u}var ce;function Ov(e){return ce=e,xv}function xv(e=[],t=ce.process.cwd(),r){let n={},s,o=null,u={},c=[],d="",g={},m,D,y=null,F=ce.y18n;n.middleware=uf(c,n),n.scriptName=function(E){return n.customScriptName=!0,n.$0=E,n};let C;/\b(node|iojs|electron)(\.exe)?$/.test(ce.process.argv()[0])?C=ce.process.argv().slice(1,2):C=ce.process.argv().slice(0,1),n.$0=C.map(E=>{let S=ff(t,E);return E.match(/^(\/|([a-zA-Z]:)?\\)/)&&S.length_;let j=!1,$=null;n.exit=(E,S)=>{j=!0,$=S,ie&&ce.process.exit(E);};let x=null;n.completion=function(E,S,h){return oe("[string] [string|boolean|function] [function]",[E,S,h],arguments.length),typeof S=="function"&&(h=S,S=void 0),x=E||x||"completion",!S&&S!==!1&&(S="generate completion script"),n.command(x,S),h&&o.registerFunction(h),n};let w;n.resetOptions=n.reset=function(S={}){_.resets++,w=w||{};let h={};h.local=w.local?w.local:[],h.configObjects=w.configObjects?w.configObjects:[];let v={};h.local.forEach(O=>{v[O]=!0,(S[O]||[]).forEach(z=>{v[z]=!0;});}),Object.assign(g,Object.keys(u).reduce((O,z)=>{let Q=u[z].filter(re=>!(re in v));return Q.length>0&&(O[z]=Q),O},{})),u={};let T=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],A=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","coerce","deprecatedOptions"];return T.forEach(O=>{h[O]=(w[O]||[]).filter(z=>!v[z]);}),A.forEach(O=>{h[O]=Vr(w[O],z=>!v[z]);}),h.envPrefix=w.envPrefix,w=h,m=m?m.reset(v):wv(n,F,ce),D=D?D.reset(v):bv(n,m,F,ce),s=s?s.reset():mv(n,m,D,c,ce),o||(o=Fv(n,m,s,ce)),x=null,d="",$=null,j=!1,n.parsed=!1,n},n.resetOptions();let M=[];function P(){M.push({options:w,configObjects:w.configObjects.slice(0),exitProcess:ie,groups:u,strict:K,strictCommands:ye,strictOptions:de,completionCommand:x,output:d,exitError:$,hasOutput:j,parsed:n.parsed,parseFn:k,parseContext:G,handlerFinishCommand:y}),m.freeze(),D.freeze(),s.freeze();}function J(){let E=M.pop();rt(E,void 0,ce);let S;(({options:w,configObjects:S,exitProcess:ie,groups:u,output:d,exitError:$,hasOutput:j,parsed:n.parsed,strict:K,strictCommands:ye,strictOptions:de,completionCommand:x,parseFn:k,parseContext:G,handlerFinishCommand:y}=E)),w.configObjects=S,m.unfreeze(),D.unfreeze(),s.unfreeze();}n.boolean=function(E){return oe("",[E],arguments.length),X("boolean",E),n},n.array=function(E){return oe("",[E],arguments.length),X("array",E),n},n.number=function(E){return oe("",[E],arguments.length),X("number",E),n},n.normalize=function(E){return oe("",[E],arguments.length),X("normalize",E),n},n.count=function(E){return oe("",[E],arguments.length),X("count",E),n},n.string=function(E){return oe("",[E],arguments.length),X("string",E),n},n.requiresArg=function(E){return oe(" [number]",[E],arguments.length),typeof E=="string"&&w.narg[E]||ee(n.requiresArg,"narg",E,NaN),n},n.skipValidation=function(E){return oe("",[E],arguments.length),X("skipValidation",E),n};function X(E,S){S=[].concat(S),S.forEach(h=>{h=Y(h),w[E].push(h);});}n.nargs=function(E,S){return oe(" [number]",[E,S],arguments.length),ee(n.nargs,"narg",E,S),n},n.choices=function(E,S){return oe(" [string|array]",[E,S],arguments.length),Z(n.choices,"choices",E,S),n},n.alias=function(E,S){return oe(" [string|array]",[E,S],arguments.length),Z(n.alias,"alias",E,S),n},n.default=n.defaults=function(E,S,h){return oe(" [*] [string]",[E,S,h],arguments.length),h&&(ef(E,ce),w.defaultDescription[E]=h),typeof S=="function"&&(ef(E,ce),w.defaultDescription[E]||(w.defaultDescription[E]=m.functionDescription(S)),S=S.call()),ee(n.default,"default",E,S),n},n.describe=function(E,S){return oe(" [string]",[E,S],arguments.length),te(E,!0),m.describe(E,S),n};function te(E,S){return ee(te,"key",E,S),n}function L(E,S){return oe(" [string]",[E,S],arguments.length),ee(n.demandOption,"demandedOptions",E,S),n}n.demandOption=L,n.coerce=function(E,S){return oe(" [function]",[E,S],arguments.length),ee(n.coerce,"coerce",E,S),n};function ee(E,S,h,v){q(E,S,h,v,(T,A,O)=>{w[T][A]=O;});}function Z(E,S,h,v){q(E,S,h,v,(T,A,O)=>{w[T][A]=(w[T][A]||[]).concat(O);});}function q(E,S,h,v,T){if(Array.isArray(h))h.forEach(A=>{E(A,v);});else if((A=>typeof A=="object")(h))for(let A of zi(h))E(A,h[A]);else T(S,Y(h),v);}function Y(E){return E==="__proto__"?"___proto___":E}function V(E){zi(w).forEach(S=>{if((v=>v==="configObjects")(S))return;let h=w[S];Array.isArray(h)?~h.indexOf(E)&&h.splice(h.indexOf(E),1):typeof h=="object"&&delete h[E];}),delete m.getDescriptions()[E];}n.config=function(S="config",h,v){return oe("[object|string] [string|function] [function]",[S,h,v],arguments.length),typeof S=="object"&&!Array.isArray(S)?(S=Hi(S,t,n.getParserConfiguration()["deep-merge-config"]||!1,ce),w.configObjects=(w.configObjects||[]).concat(S),n):(typeof h=="function"&&(v=h,h=void 0),n.describe(S,h||m.deferY18nLookup("Path to JSON config file")),(Array.isArray(S)?S:[S]).forEach(T=>{w.config[T]=v||!0;}),n)},n.example=function(E,S){return oe(" [string]",[E,S],arguments.length),Array.isArray(E)?E.forEach(h=>n.example(...h)):m.example(E,S),n},n.command=function(E,S,h,v,T,A){return oe(" [string|boolean] [function|object] [function] [array] [boolean|string]",[E,S,h,v,T,A],arguments.length),s.addHandler(E,S,h,v,T,A),n},n.commandDir=function(E,S){oe(" [object]",[E,S],arguments.length);let h=r||ce.require;return s.addDirectory(E,n.getContext(),h,ce.getCallerFile(),S),n},n.demand=n.required=n.require=function(S,h,v){return Array.isArray(h)?(h.forEach(T=>{rt(v,!0,ce),L(T,v);}),h=1/0):typeof h!="number"&&(v=h,h=1/0),typeof S=="number"?(rt(v,!0,ce),n.demandCommand(S,h,v,v)):Array.isArray(S)?S.forEach(T=>{rt(v,!0,ce),L(T,v);}):typeof v=="string"?L(S,v):(v===!0||typeof v>"u")&&L(S),n},n.demandCommand=function(S=1,h,v,T){return oe("[number] [number|string] [string|null|undefined] [string|null|undefined]",[S,h,v,T],arguments.length),typeof h!="number"&&(v=h,h=1/0),n.global("_",!1),w.demandedCommands._={min:S,max:h,minMsg:v,maxMsg:T},n},n.getDemandedOptions=()=>(oe([],0),w.demandedOptions),n.getDemandedCommands=()=>(oe([],0),w.demandedCommands),n.deprecateOption=function(S,h){return oe(" [string|boolean]",[S,h],arguments.length),w.deprecatedOptions[S]=h,n},n.getDeprecatedOptions=()=>(oe([],0),w.deprecatedOptions),n.implies=function(E,S){return oe(" [number|string|array]",[E,S],arguments.length),D.implies(E,S),n},n.conflicts=function(E,S){return oe(" [string|array]",[E,S],arguments.length),D.conflicts(E,S),n},n.usage=function(E,S,h,v){if(oe(" [string|boolean] [function|object] [function]",[E,S,h,v],arguments.length),S!==void 0){if(rt(E,null,ce),(E||"").match(/^\$0( |$)/))return n.command(E,S,h,v);throw new nt(".usage() description must start with $0 if being used as alias for .command()")}else return m.usage(E),n},n.epilogue=n.epilog=function(E){return oe("",[E],arguments.length),m.epilog(E),n},n.fail=function(E){return oe("",[E],arguments.length),m.failFn(E),n},n.onFinishCommand=function(E){return oe("",[E],arguments.length),y=E,n},n.getHandlerFinishCommand=()=>y,n.check=function(E,S){return oe(" [boolean]",[E,S],arguments.length),D.check(E,S!==!1),n},n.global=function(E,S){return oe(" [boolean]",[E,S],arguments.length),E=[].concat(E),S!==!1?w.local=w.local.filter(h=>E.indexOf(h)===-1):E.forEach(h=>{w.local.indexOf(h)===-1&&w.local.push(h);}),n},n.pkgConf=function(S,h){oe(" [string]",[S,h],arguments.length);let v=null,T=W(h||t);return T[S]&&typeof T[S]=="object"&&(v=Hi(T[S],h||t,n.getParserConfiguration()["deep-merge-config"]||!1,ce),w.configObjects=(w.configObjects||[]).concat(v)),n};let I={};function W(E){let S=E||"*";if(I[S])return I[S];let h={};try{let v=E||ce.mainFilename;!E&&ce.path.extname(v)&&(v=ce.path.dirname(v));let T=ce.findUp(v,(A,O)=>{if(O.includes("package.json"))return "package.json"});rt(T,void 0,ce),h=JSON.parse(ce.readFileSync(T,"utf8"));}catch{}return I[S]=h||{},I[S]}let k=null,G=null;n.parse=function(S,h,v){if(oe("[string|array] [function|boolean|object] [function]",[S,h,v],arguments.length),P(),typeof S>"u"){let A=n._parseArgs(e),O=n.parsed;return J(),n.parsed=O,A}typeof h=="object"&&(G=h,h=v),typeof h=="function"&&(k=h,h=!1),h||(e=S),k&&(ie=!1);let T=n._parseArgs(S,!!h);return o.setParsed(n.parsed),k&&k($,T,d),J(),T},n._getParseContext=()=>G||{},n._hasParseCallback=()=>!!k,n.option=n.options=function(S,h){if(oe(" [object]",[S,h],arguments.length),typeof S=="object")Object.keys(S).forEach(v=>{n.options(v,S[v]);});else {typeof h!="object"&&(h={}),w.key[S]=!0,h.alias&&n.alias(S,h.alias);let v=h.deprecate||h.deprecated;v&&n.deprecateOption(S,v);let T=h.demand||h.required||h.require;T&&n.demand(S,T),h.demandOption&&n.demandOption(S,typeof h.demandOption=="string"?h.demandOption:void 0),h.conflicts&&n.conflicts(S,h.conflicts),"default"in h&&n.default(S,h.default),h.implies!==void 0&&n.implies(S,h.implies),h.nargs!==void 0&&n.nargs(S,h.nargs),h.config&&n.config(S,h.configParser),h.normalize&&n.normalize(S),h.choices&&n.choices(S,h.choices),h.coerce&&n.coerce(S,h.coerce),h.group&&n.group(S,h.group),(h.boolean||h.type==="boolean")&&(n.boolean(S),h.alias&&n.boolean(h.alias)),(h.array||h.type==="array")&&(n.array(S),h.alias&&n.array(h.alias)),(h.number||h.type==="number")&&(n.number(S),h.alias&&n.number(h.alias)),(h.string||h.type==="string")&&(n.string(S),h.alias&&n.string(h.alias)),(h.count||h.type==="count")&&n.count(S),typeof h.global=="boolean"&&n.global(S,h.global),h.defaultDescription&&(w.defaultDescription[S]=h.defaultDescription),h.skipValidation&&n.skipValidation(S);let A=h.describe||h.description||h.desc;n.describe(S,A),h.hidden&&n.hide(S),h.requiresArg&&n.requiresArg(S);}return n},n.getOptions=()=>w,n.positional=function(E,S){if(oe(" ",[E,S],arguments.length),_.resets===0)throw new nt(".positional() can only be called in a command's builder function");let h=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];S=Vr(S,(A,O)=>{let z=h.indexOf(A)!==-1;return A==="type"&&["string","number","boolean"].indexOf(O)===-1&&(z=!1),z});let v=_.fullCommands[_.fullCommands.length-1],T=v?s.cmdToParseOptions(v):{array:[],alias:{},default:{},demand:{}};return zi(T).forEach(A=>{let O=T[A];Array.isArray(O)?O.indexOf(E)!==-1&&(S[A]=!0):O[E]&&!(A in S)&&(S[A]=O[E]);}),n.group(E,m.getPositionalGroupName()),n.option(E,S)},n.group=function(S,h){oe(" ",[S,h],arguments.length);let v=g[h]||u[h];g[h]&&delete g[h];let T={};return u[h]=(v||[]).concat(S).filter(A=>T[A]?!1:T[A]=!0),n},n.getGroups=()=>Object.assign({},u,g),n.env=function(E){return oe("[string|boolean]",[E],arguments.length),E===!1?delete w.envPrefix:w.envPrefix=E||"",n},n.wrap=function(E){return oe("",[E],arguments.length),m.wrap(E),n};let K=!1;n.strict=function(E){return oe("[boolean]",[E],arguments.length),K=E!==!1,n},n.getStrict=()=>K;let ye=!1;n.strictCommands=function(E){return oe("[boolean]",[E],arguments.length),ye=E!==!1,n},n.getStrictCommands=()=>ye;let de=!1;n.strictOptions=function(E){return oe("[boolean]",[E],arguments.length),de=E!==!1,n},n.getStrictOptions=()=>de;let Ye={};n.parserConfiguration=function(S){return oe("",[S],arguments.length),Ye=S,n},n.getParserConfiguration=()=>Ye,n.showHelp=function(E){return oe("[string|function]",[E],arguments.length),n.parsed||n._parseArgs(e),s.hasDefaultCommand()&&(_.resets++,s.runDefaultBuilderOn(n)),m.showHelp(E),n};let R=null;n.version=function(S,h,v){let T="version";if(oe("[boolean|string] [string] [string]",[S,h,v],arguments.length),R&&(V(R),m.version(void 0),R=null),arguments.length===0)v=Ke(),S=T;else if(arguments.length===1){if(S===!1)return n;v=S,S=T;}else arguments.length===2&&(v=h,h=void 0);return R=typeof S=="string"?S:T,h=h||m.deferY18nLookup("Show version number"),m.version(v||void 0),n.boolean(R),n.describe(R,h),n};function Ke(){return W().version||"unknown"}let Ne=null;n.addHelpOpt=n.help=function(S,h){let v="help";return oe("[string|boolean] [string]",[S,h],arguments.length),Ne&&(V(Ne),Ne=null),arguments.length===1&&S===!1||(Ne=typeof S=="string"?S:v,n.boolean(Ne),n.describe(Ne,h||m.deferY18nLookup("Show help"))),n};let Ct="show-hidden";w.showHiddenOpt=Ct,n.addShowHiddenOpt=n.showHidden=function(S,h){if(oe("[string|boolean] [string]",[S,h],arguments.length),arguments.length===1&&S===!1)return n;let v=typeof S=="string"?S:Ct;return n.boolean(v),n.describe(v,h||m.deferY18nLookup("Show hidden options")),w.showHiddenOpt=v,n},n.hide=function(S){return oe("",[S],arguments.length),w.hiddenOptions.push(S),n},n.showHelpOnFail=function(S,h){return oe("[boolean|string] [string]",[S,h],arguments.length),m.showHelpOnFail(S,h),n};let ie=!0;n.exitProcess=function(E=!0){return oe("[boolean]",[E],arguments.length),ie=E,n},n.getExitProcess=()=>ie,n.showCompletionScript=function(E,S){return oe("[string] [string]",[E,S],arguments.length),E=E||n.$0,le.log(o.generateCompletionScript(E,S||x||"completion")),n},n.getCompletion=function(E,S){oe(" ",[E,S],arguments.length),o.getCompletion(E,S);},n.locale=function(E){return oe("[string]",[E],arguments.length),E?(we=!1,F.setLocale(E),n):(Ce(),F.getLocale())},n.updateStrings=n.updateLocale=function(E){return oe("",[E],arguments.length),we=!1,F.updateLocale(E),n};let we=!0;n.detectLocale=function(E){return oe("",[E],arguments.length),we=E,n},n.getDetectLocale=()=>we;let le={log(...E){n._hasParseCallback()||console.log(...E),j=!0,d.length&&(d+=` +`),d+=E.join(" ");},error(...E){n._hasParseCallback()||console.error(...E),j=!0,d.length&&(d+=` +`),d+=E.join(" ");}};n._getLoggerInstance=()=>le,n._hasOutput=()=>j,n._setHasOutput=()=>{j=!0;};let ve;n.recommendCommands=function(E=!0){return oe("[boolean]",[E],arguments.length),ve=E,n},n.getUsageInstance=()=>m,n.getValidationInstance=()=>D,n.getCommandInstance=()=>s,n.terminalWidth=()=>(oe([],0),ce.process.stdColumns),Object.defineProperty(n,"argv",{get:()=>n._parseArgs(e),enumerable:!0}),n._parseArgs=function(S,h,v,T){let A=!!v;S=S||e,w.__=F.__,w.configuration=n.getParserConfiguration();let O=!!w.configuration["populate--"],z=Object.assign({},w.configuration,{"populate--":!0}),Q=ce.Parser.detailed(S,Object.assign({},w,{configuration:Object.assign({"parse-positional-numbers":!1},z)})),re=Q.argv;G&&(re=Object.assign({},re,G));let Ae=Q.aliases;re.$0=n.$0,n.parsed=Q;try{if(Ce(),h)return n._postProcess(re,O,v);Ne&&~[Ne].concat(Ae[Ne]||[]).filter(pe=>pe.length>1).indexOf(""+re._[re._.length-1])&&(re._.pop(),re[Ne]=!0);let Fe=s.getCommands(),Pe=o.completionKey in re,cn=re[Ne]||Pe,Cr=cn&&(Fe.length>1||Fe[0]!=="$0");if(re._.length){if(Fe.length){let Te;for(let pe=T||0,Dt;re._[pe]!==void 0;pe++)if(Dt=String(re._[pe]),~Fe.indexOf(Dt)&&Dt!==x){let ei=s.runCommand(Dt,n,Q,pe+1);return n._postProcess(ei,O)}else if(!Te&&Dt!==x){Te=Dt;break}if(s.hasDefaultCommand()&&!Cr){let pe=s.runCommand(null,n,Q);return n._postProcess(pe,O)}ve&&Te&&!cn&&D.recommendCommands(Te,Fe);}x&&~re._.indexOf(x)&&!Pe&&(ie&&Mn(!0),n.showCompletionScript(),n.exit(0));}else if(s.hasDefaultCommand()&&!Cr){let Te=s.runCommand(null,n,Q);return n._postProcess(Te,O)}if(Pe){ie&&Mn(!0),S=[].concat(S);let Te=S.slice(S.indexOf(`--${o.completionKey}`)+1);return o.getCompletion(Te,pe=>{(pe||[]).forEach(Dt=>{le.log(Dt);}),n.exit(0);}),n._postProcess(re,!O,v)}if(j||Object.keys(re).forEach(Te=>{Te===Ne&&re[Te]?(ie&&Mn(!0),A=!0,n.showHelp("log"),n.exit(0)):Te===R&&re[Te]&&(ie&&Mn(!0),A=!0,m.showVersion(),n.exit(0));}),!A&&w.skipValidation.length>0&&(A=Object.keys(re).some(Te=>w.skipValidation.indexOf(Te)>=0&&re[Te]===!0)),!A){if(Q.error)throw new nt(Q.error.message);Pe||n._runValidation(re,Ae,{},Q.error);}}catch(Fe){if(Fe instanceof nt)m.fail(Fe.message,Fe);else throw Fe}return n._postProcess(re,O,v)},n._postProcess=function(E,S,h=!1){return Ut(E)||h||(S||(E=n._copyDoubleDash(E)),(n.getParserConfiguration()["parse-positional-numbers"]||n.getParserConfiguration()["parse-positional-numbers"]===void 0)&&(E=n._parsePositionalNumbers(E))),E},n._copyDoubleDash=function(E){if(!E._||!E["--"])return E;E._.push.apply(E._,E["--"]);try{delete E["--"];}catch{}return E},n._parsePositionalNumbers=function(E){let S=E["--"]?E["--"]:E._;for(let h=0,v;(v=S[h])!==void 0;h++)ce.Parser.looksLikeNumber(v)&&Number.isSafeInteger(Math.floor(parseFloat(`${v}`)))&&(S[h]=Number(v));return E},n._runValidation=function(S,h,v,T,A=!1){if(T)throw new nt(T.message);D.nonOptionCount(S),D.requiredArguments(S);let O=!1;ye&&(O=D.unknownCommands(S)),K&&!O?D.unknownArguments(S,h,v,A):de&&D.unknownArguments(S,h,{},!1,!1),D.customChecks(S,h),D.limitedChoices(S),D.implications(S),D.conflicting(S);};function Ce(){if(!we)return;let E=ce.getEnv("LC_ALL")||ce.getEnv("LC_MESSAGES")||ce.getEnv("LANG")||ce.getEnv("LANGUAGE")||"en_US";n.locale(E.replace(/[.:].*/,""));}return n.help(),n.version(),n}var ff=(e,t)=>ce.path.relative(e,t);function Av(e){return !!e&&typeof e._parseArgs=="function"}var Ko,Qo,{readFileSync:Mv}=U("fs"),{inspect:Tv}=U("util"),{resolve:jv}=U("path"),Iv=rl(),Nv=Ro(),df={assert:{notStrictEqual:Kl.notStrictEqual,strictEqual:Kl.strictEqual},cliui:Bl(),findUp:Ul(),getEnv:e=>process.env[e],getCallerFile:Hl(),getProcessArgvBin:lf,inspect:Tv,mainFilename:(Qo=(Ko=U?.main)===null||Ko===void 0?void 0:Ko.filename)!==null&&Qo!==void 0?Qo:process.cwd(),Parser:Nv,path:U("path"),process:{argv:()=>process.argv,cwd:process.cwd,execPath:()=>process.execPath,exit:e=>{process.exit(e);},nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:Mv,require:U,requireDirectory:Zl(),stringWidth:Pi(),y18n:Iv({directory:jv(__dirname,"../locales"),updateFiles:!1})},of=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):10;if(process&&process.version&&Number(process.version.match(/v([^.]+)/)[1]){var{Yargs:Pv,processArgv:Rv}=pf();Gr(Rv.hideBin(process.argv));mf.exports=Gr;function Gr(e,t){let r=Pv(e,t,U);return Bv(r),r}function Bv(e){Object.keys(e).forEach(t=>{t==="argv"?Gr.__defineGetter__(t,e.__lookupGetter__(t)):typeof e[t]=="function"?Gr[t]=e[t].bind(e):(Gr.__defineGetter__("$0",()=>e.$0),Gr.__defineGetter__("parsed",()=>e.parsed));});}});var yf=B(Df=>{var qv=U("util"),Vi=Br(),gf=hr().Memory,na=Df.Argv=function(e,t){gf.call(this,e),e=e||{},this.type="argv",this.readOnly=!0,this.options=e,this.usage=t,typeof e.parseValues=="boolean"?(this.parseValues=e.parseValues,delete e.parseValues):this.parseValues=!1,typeof e.transform=="function"?(this.transform=e.transform,delete e.transform):this.transform=!1,typeof e.separator=="string"||e.separator instanceof RegExp?(this.separator=e.separator,delete e.separator):this.separator="";};qv.inherits(na,gf);na.prototype.loadSync=function(){return this.loadArgv(),this.store};na.prototype.loadArgv=function(){var e=this,t,r;if(t=Yv(this.options)?this.options:typeof this.options=="object"?ra()(process.argv.slice(2)).options(this.options):ra()(process.argv.slice(2)),typeof this.usage=="string"&&t.usage(this.usage),r=t.argv,!!r)return this.transform&&(r=Vi.transform(r,this.transform)),this.readOnly=!1,Object.keys(r).forEach(function(n){var s=r[n];typeof s<"u"&&(e.parseValues&&(s=Vi.parseValues(s)),e.separator?e.set(Vi.key.apply(Vi,n.split(e.separator)),s):e.set(n,s));}),this.showHelp=t.showHelp,this.help=t.help,this.readOnly=!0,this.store};function Yv(e){return (typeof e=="function"||typeof e=="object")&&"argv"in e}});var Ef=B(vf=>{var Wv=U("util"),Gi=Br(),wf=hr().Memory,ia=vf.Env=function(e){wf.call(this,e),e=e||{},this.type="env",this.readOnly=!0,this.whitelist=e.whitelist||[],this.separator=e.separator||"",this.lowerCase=e.lowerCase||!1,this.parseValues=e.parseValues||!1,this.transform=e.transform||!1,{}.toString.call(e.match)==="[object RegExp]"&&typeof e!="string"&&(this.match=e.match),e instanceof Array&&(this.whitelist=e),(typeof e=="string"||e instanceof RegExp)&&(this.separator=e);};Wv.inherits(ia,wf);ia.prototype.loadSync=function(){return this.loadEnv(),this.store};ia.prototype.loadEnv=function(){var e=this,t=process.env;return this.lowerCase&&(t={},Object.keys(process.env).forEach(function(r){t[r.toLowerCase()]=process.env[r];})),this.transform&&(t=Gi.transform(t,this.transform)),this.readOnly=!1,Object.keys(t).filter(function(r){return e.match&&e.whitelist.length?r.match(e.match)||e.whitelist.indexOf(r)!==-1:e.match?r.match(e.match):!e.whitelist.length||e.whitelist.indexOf(r)!==-1}).forEach(function(r){var n=t[r];e.parseValues&&(n=Gi.parseValues(n)),e.separator?e.set(Gi.key.apply(Gi,r.split(e.separator)),n):e.set(r,n);}),this.readOnly=!0,this.store};});var Sf=B((fC,Ff)=>{var Uv=U("crypto"),zv={stringify:function(e,t,r){return JSON.stringify(e,t||null,r||2)},parse:JSON.parse};Ff.exports=sa;function sa(e){if(e=e||{},this.secret=typeof e!="string"?e.secret:e,this.format=e.format||zv,this.alg=e.alg||"aes-256-ctr",!this.secret)throw new Error("Secret is a required option")}sa.prototype.encrypt=function(t,r){var n=this;return Object.keys(t).reduce(function(s,o){var u=n.format.stringify(t[o]);return s[o]={alg:n.alg,value:_f(u,{alg:n.alg,secret:n.secret,encs:{input:"utf8",output:"hex"}})},s},{})};sa.prototype.decrypt=function(t,r){var n=this;return Object.keys(t).reduce(function(s,o){var u=_f(t[o].value,{alg:t[o].alg||n.alg,secret:n.secret,encs:{input:"hex",output:"utf8"}});return s[o]=n.format.parse(u),s},{})};function _f(e,t){var r=t.encs,n=Uv.createCipher(t.alg,t.secret);return n.update(e,r.input,r.output)+n.final(r.output)}});var Of=B(bf=>{var Je=U("fs"),Tn=U("path"),Hv=U("util"),Vv=Sf(),Gv=Li(),Cf=hr().Memory,Jv=Je.exists||Tn.exists,Zv=Je.existsSync||Tn.existsSync,zt=bf.File=function(e){if(!e||!e.file)throw new Error("Missing required option `file`");if(Cf.call(this,e),this.type="file",this.file=e.file,this.dir=e.dir||process.cwd(),this.format=e.format||Gv.json,this.secure=e.secure,this.spacing=e.json_spacing||e.spacing||2,this.secure){if(this.secure=Buffer.isBuffer(this.secure)||typeof this.secure=="string"?{secret:this.secure.toString()}:this.secure,this.secure.alg=this.secure.alg||"aes-256-ctr",this.secure.secretPath&&(this.secure.secret=Je.readFileSync(this.secure.secretPath,"utf8")),!this.secure.secret)throw new Error("secure.secret option is required");this.keys=new Vv({secret:this.secure.secret,alg:this.secure.alg,format:this.format});}e.search&&this.search(this.dir);};Hv.inherits(zt,Cf);zt.prototype.save=function(e,t){this.saveToFile(this.file,e,t);};zt.prototype.saveToFile=function(e,t,r){r||(r=t,t=this.format),Je.writeFile(e,this.stringify(t),r);};zt.prototype.saveSync=function(){return Je.writeFileSync(this.file,this.stringify()),this.store};zt.prototype.load=function(e){var t=this;Jv(t.file,function(r){if(!r)return e(null,{});Je.readFile(t.file,function(n,s){if(n)return e(n);try{var o=s.toString();o.charAt(0)==="\uFEFF"&&(o=o.substr(1)),t.store=t.parse(o);}catch(u){return e(new Error("Error parsing your configuration file: ["+t.file+"]: "+u.message))}e(null,t.store);});});};zt.prototype.loadSync=function(){if(!Zv(this.file))return this.store={},this.store;try{var e=Je.readFileSync(this.file,"utf8");e.charAt(0)==="\uFEFF"&&(e=e.substr(1)),this.store=this.parse(e);}catch(t){throw new Error("Error parsing your configuration file: ["+this.file+"]: "+t.message)}return this.store};zt.prototype.stringify=function(e){var t=this.store;return e||(e=this.format),this.secure&&(t=this.keys.encrypt(t)),e.stringify(t,null,this.spacing)};zt.prototype.parse=function(e){var t=this.format.parse(e);return this.secure?this.keys.decrypt(t):t};zt.prototype.search=function(e){var t=!0,r,n,s;if(e=e||process.cwd(),this.file[0]==="/")try{s=Je.statSync(Je.realpathSync(this.file)),s.isFile()&&(r=this.file,t=!1);}catch{}if(t&&e)try{var o=Je.statSync(Je.realpathSync(e));t=o.isDirectory();}catch{return !1}for(;t;)try{s=Je.statSync(Je.realpathSync(r=Tn.join(e,this.file))),t=s.isDirectory();}catch{if(n=e,e=Tn.dirname(e),n===e){try{s=Je.statSync(Je.realpathSync(r=Tn.join(this.dir,this.file))),s.isDirectory()&&(r=void 0);}catch{}t=!1;}}return this.file=r||this.file,r};});var Tf=B(Mf=>{var Kv=U("util"),xf=hr().Memory,Af=Mf.Literal=function(t){xf.call(this,t),t=t||{},this.type="literal",this.readOnly=!0,this.store=t.store||t;};Kv.inherits(Af,xf);Af.prototype.loadSync=function(){return this.store};});var $i=B((pC,If)=>{var Ji=Br(),jf=Xc().Provider,ct=If.exports=new jf;ct.version=el().version;ct.__defineGetter__("Argv",function(){return yf().Argv});ct.__defineGetter__("Env",function(){return Ef().Env});ct.__defineGetter__("File",function(){return Of().File});ct.__defineGetter__("Literal",function(){return Tf().Literal});ct.__defineGetter__("Memory",function(){return hr().Memory});ct.key=Ji.key;ct.path=Ji.path;ct.loadFiles=Ji.loadFiles;ct.loadFilesSync=Ji.loadFilesSync;ct.formats=Li();ct.Provider=jf;});var kf=B((vC,$f)=>{var Zr=1e3,Kr=Zr*60,Qr=Kr*60,pr=Qr*24,nE=pr*7,iE=pr*365.25;$f.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return sE(e);if(r==="number"&&isFinite(e))return t.long?aE(e):oE(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function sE(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*iE;case"weeks":case"week":case"w":return r*nE;case"days":case"day":case"d":return r*pr;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Qr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Kr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Zr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function oE(e){var t=Math.abs(e);return t>=pr?Math.round(e/pr)+"d":t>=Qr?Math.round(e/Qr)+"h":t>=Kr?Math.round(e/Kr)+"m":t>=Zr?Math.round(e/Zr)+"s":e+"ms"}function aE(e){var t=Math.abs(e);return t>=pr?Zi(e,t,pr,"day"):t>=Qr?Zi(e,t,Qr,"hour"):t>=Kr?Zi(e,t,Kr,"minute"):t>=Zr?Zi(e,t,Zr,"second"):e+" ms"}function Zi(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var aa=B((EC,Pf)=>{function uE(e){r.debug=r,r.default=r,r.coerce=d,r.disable=o,r.enable=s,r.enabled=u,r.humanize=kf(),r.destroy=g,Object.keys(e).forEach(m=>{r[m]=e[m];}),r.names=[],r.skips=[],r.formatters={};function t(m){let D=0;for(let y=0;y{if(J==="%%")return "%";M++;let te=r.formatters[X];if(typeof te=="function"){let L=j[M];J=te.call($,L),j.splice(M,1),M--;}return J}),r.formatArgs.call($,j),($.log||r.log).apply($,j);}return _.namespace=m,_.useColors=r.useColors(),_.color=r.selectColor(m),_.extend=n,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(F!==r.namespaces&&(F=r.namespaces,C=r.enabled(m)),C),set:j=>{y=j;}}),typeof r.init=="function"&&r.init(_),_}function n(m,D){let y=r(this.namespace+(typeof D>"u"?":":D)+m);return y.log=this.log,y}function s(m){r.save(m),r.namespaces=m,r.names=[],r.skips=[];let D,y=(typeof m=="string"?m:"").split(/[\s,]+/),F=y.length;for(D=0;D"-"+D)].join(",");return r.enable(""),m}function u(m){if(m[m.length-1]==="*")return !0;let D,y;for(D=0,y=r.skips.length;D{it.formatArgs=lE;it.save=fE;it.load=dE;it.useColors=cE;it.storage=hE();it.destroy=(()=>{let e=!1;return ()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})();it.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function cE(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function lE(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Ki.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r));}),e.splice(n,0,t);}it.log=console.debug||console.log||(()=>{});function fE(e){try{e?it.storage.setItem("debug",e):it.storage.removeItem("debug");}catch{}}function dE(){let e;try{e=it.storage.getItem("debug");}catch{}return !e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function hE(){try{return localStorage}catch{}}Ki.exports=aa()(it);var{formatters:pE}=Ki.exports;pE.j=function(e){try{return JSON.stringify(e)}catch(t){return "[UnexpectedJSONParseError]: "+t.message}};});var qf=B((_C,Bf)=>{Bf.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n{var mE=U("os"),Yf=U("tty"),lt=qf(),{env:Be}=process,rr;lt("no-color")||lt("no-colors")||lt("color=false")||lt("color=never")?rr=0:(lt("color")||lt("colors")||lt("color=true")||lt("color=always"))&&(rr=1);"FORCE_COLOR"in Be&&(Be.FORCE_COLOR==="true"?rr=1:Be.FORCE_COLOR==="false"?rr=0:rr=Be.FORCE_COLOR.length===0?1:Math.min(parseInt(Be.FORCE_COLOR,10),3));function ua(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ca(e,t){if(rr===0)return 0;if(lt("color=16m")||lt("color=full")||lt("color=truecolor"))return 3;if(lt("color=256"))return 2;if(e&&!t&&rr===void 0)return 0;let r=rr||0;if(Be.TERM==="dumb")return r;if(process.platform==="win32"){let n=mE.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Be)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Be)||Be.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Be)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Be.TEAMCITY_VERSION)?1:0;if(Be.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Be){let n=parseInt((Be.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Be.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return /-256(color)?$/i.test(Be.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Be.TERM)||"COLORTERM"in Be?1:r}function gE(e){let t=ca(e,e&&e.isTTY);return ua(t)}Wf.exports={supportsColor:gE,stdout:ua(ca(!0,Yf.isatty(1))),stderr:ua(ca(!0,Yf.isatty(2)))};});var Hf=B((We,Xi)=>{var DE=U("tty"),Qi=U("util");We.init=SE;We.log=EE;We.formatArgs=wE;We.save=_E;We.load=FE;We.useColors=yE;We.destroy=Qi.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");We.colors=[6,2,3,4,5,1];try{let e=Uf();e&&(e.stderr||e).level>=2&&(We.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]);}catch{}We.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[t];return /^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function yE(){return "colors"in We.inspectOpts?!!We.inspectOpts.colors:DE.isatty(process.stderr.fd)}function wE(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${t} \x1B[0m`;e[0]=o+e[0].split(` +`).join(` +`+o),e.push(s+"m+"+Xi.exports.humanize(this.diff)+"\x1B[0m");}else e[0]=vE()+t+" "+e[0];}function vE(){return We.inspectOpts.hideDate?"":new Date().toISOString()+" "}function EE(...e){return process.stderr.write(Qi.format(...e)+` +`)}function _E(e){e?process.env.DEBUG=e:delete process.env.DEBUG;}function FE(){return process.env.DEBUG}function SE(e){e.inspectOpts={};let t=Object.keys(We.inspectOpts);for(let r=0;rt.trim()).join(" ")};zf.O=function(e){return this.inspectOpts.colors=this.useColors,Qi.inspect(e,this.inspectOpts)};});var qe=B((SC,la)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?la.exports=Rf():la.exports=Hf();});var Gf=B((CC,Vf)=>{Vf.exports=CE;function Xr(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function CE(e){if(e=e||{},e.circles)return bE(e);return e.proto?n:r;function t(s,o){for(var u=Object.keys(s),c=new Array(u.length),d=0;d{var OE=U("util"),mr=qe()("log4js:configuration"),es=[],ts=[],Jf=e=>!e,Zf=e=>e&&typeof e=="object"&&!Array.isArray(e),xE=e=>/^[A-Za-z][A-Za-z0-9_]*$/g.test(e),AE=e=>e&&typeof e=="number"&&Number.isInteger(e),ME=e=>{ts.push(e),mr(`Added listener, now ${ts.length} listeners`);},TE=e=>{es.push(e),mr(`Added pre-processing listener, now ${es.length} listeners`);},Kf=(e,t,r)=>{(Array.isArray(t)?t:[t]).forEach(s=>{if(s)throw new Error(`Problem with log4js configuration: (${OE.inspect(e,{depth:5})}) - ${r}`)});},jE=e=>{mr("New configuration to be validated: ",e),Kf(e,Jf(Zf(e)),"must be an object."),mr(`Calling pre-processing listeners (${es.length})`),es.forEach(t=>t(e)),mr("Configuration pre-processing finished."),mr(`Calling configuration listeners (${ts.length})`),ts.forEach(t=>t(e)),mr("Configuration finished.");};Qf.exports={configure:jE,addListener:ME,addPreProcessingListener:TE,throwExceptionIf:Kf,anObject:Zf,anInteger:AE,validIdentifier:xE,not:Jf};});var rs=B((OC,ft)=>{function Xf(e,t){for(var r=e.toString();r.length-1?s:o,c=Dr(t.getHours()),d=Dr(t.getMinutes()),g=Dr(t.getSeconds()),m=Xf(t.getMilliseconds(),3),D=IE(t.getTimezoneOffset()),y=e.replace(/dd/g,r).replace(/MM/g,n).replace(/y{1,4}/g,u).replace(/hh/g,c).replace(/mm/g,d).replace(/ss/g,g).replace(/SSS/g,m).replace(/O/g,D);return y}function nr(e,t,r,n){e["set"+(n?"":"UTC")+t](r);}function NE(e,t,r){var n=e.indexOf("O")<0,s=!1,o=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(D,y){nr(D,"FullYear",y,n);}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(D,y){nr(D,"Month",y-1,n),D.getMonth()!==y-1&&(s=!0);}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(D,y){s&&nr(D,"Month",D.getMonth()-1,n),nr(D,"Date",y,n);}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(D,y){nr(D,"Hours",y,n);}},{pattern:/mm/,regexp:"\\d\\d",fn:function(D,y){nr(D,"Minutes",y,n);}},{pattern:/ss/,regexp:"\\d\\d",fn:function(D,y){nr(D,"Seconds",y,n);}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(D,y){nr(D,"Milliseconds",y,n);}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(D,y){y==="Z"?y=0:y=y.replace(":","");var F=Math.abs(y),C=(y>0?-1:1)*(F%100+Math.floor(F/100)*60);D.setUTCMinutes(D.getUTCMinutes()+C);}}],u=o.reduce(function(D,y){return y.pattern.test(D.regexp)?(y.index=D.regexp.match(y.pattern).index,D.regexp=D.regexp.replace(y.pattern,"("+y.regexp+")")):y.index=-1,D},{regexp:e,index:[]}),c=o.filter(function(D){return D.index>-1});c.sort(function(D,y){return D.index-y.index});var d=new RegExp(u.regexp),g=d.exec(t);if(g){var m=r||ft.exports.now();return c.forEach(function(D,y){D.fn(m,g[y+1]);}),m}throw new Error("String '"+t+"' could not be parsed as '"+e+"'")}function LE(e,t,r){if(!e)throw new Error("pattern must be supplied");return NE(e,t,r)}function $E(){return new Date}ft.exports=ed;ft.exports.asString=ed;ft.exports.parse=LE;ft.exports.now=$E;ft.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS";ft.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO";ft.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS";ft.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS";});var da=B((xC,dd)=>{var ir=rs(),td=U("os"),Nn=U("util"),In=U("path"),rd=U("url"),nd=qe()("log4js:layouts"),id={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[90,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[91,39],yellow:[33,39]};function sd(e){return e?`\x1B[${id[e][0]}m`:""}function od(e){return e?`\x1B[${id[e][1]}m`:""}function kE(e,t){return sd(t)+e+od(t)}function ad(e,t){return kE(Nn.format("[%s] [%s] %s - ",ir.asString(e.startTime),e.level.toString(),e.categoryName),t)}function ud(e){return ad(e)+Nn.format(...e.data)}function ns(e){return ad(e,e.level.colour)+Nn.format(...e.data)}function cd(e){return Nn.format(...e.data)}function ld(e){return e.data[0]}function fd(e,t){let r="%r %p %c - %m%n",n=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflosCMAF%])(\{([^}]+)\})?|([^%]+)/;e=e||r;function s(I,W){let k=I.categoryName;if(W){let G=parseInt(W,10),K=k.split(".");GK&&(k=ye.slice(-K).join(In.sep));}return k}function w(I){return I.lineNumber?`${I.lineNumber}`:""}function M(I){return I.columnNumber?`${I.columnNumber}`:""}function P(I){return I.callStack||""}function J(I){return I.className||""}function X(I){return I.functionName||""}function te(I){return I.functionAlias||""}function L(I){return I.callerName||""}let ee={c:s,d:o,h:u,m:c,n:d,p:g,r:m,"[":D,"]":y,y:_,z:C,"%":F,x:j,X:$,f:x,l:w,o:M,s:P,C:J,M:X,A:te,F:L};function Z(I,W,k){return ee[I](W,k)}function q(I,W){let k;return I?(k=parseInt(I.slice(1),10),k>0?W.slice(0,k):W.slice(k)):W}function Y(I,W){let k;if(I)if(I.charAt(0)==="-")for(k=parseInt(I.slice(1),10);W.length{var Le=gr(),hd=["white","grey","black","blue","cyan","green","magenta","red","yellow"],en=class e{constructor(t,r,n){this.level=t,this.levelStr=r,this.colour=n;}toString(){return this.levelStr}static getLevel(t,r){return t?t instanceof e?t:(t instanceof Object&&t.levelStr&&(t=t.levelStr),e[t.toString().toUpperCase()]||r):r}static addLevels(t){t&&(Object.keys(t).forEach(n=>{let s=n.toUpperCase();e[s]=new e(t[n].value,s,t[n].colour);let o=e.levels.findIndex(u=>u.levelStr===s);o>-1?e.levels[o]=e[s]:e.levels.push(e[s]);}),e.levels.sort((n,s)=>n.level-s.level));}isLessThanOrEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level<=t.level}isGreaterThanOrEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level>=t.level}isEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level===t.level}};en.levels=[];en.addLevels({ALL:{value:Number.MIN_VALUE,colour:"grey"},TRACE:{value:5e3,colour:"blue"},DEBUG:{value:1e4,colour:"cyan"},INFO:{value:2e4,colour:"green"},WARN:{value:3e4,colour:"yellow"},ERROR:{value:4e4,colour:"red"},FATAL:{value:5e4,colour:"magenta"},MARK:{value:9007199254740992,colour:"grey"},OFF:{value:Number.MAX_VALUE,colour:"grey"}});Le.addListener(e=>{let t=e.levels;t&&(Le.throwExceptionIf(e,Le.not(Le.anObject(t)),"levels must be an object"),Object.keys(t).forEach(n=>{Le.throwExceptionIf(e,Le.not(Le.validIdentifier(n)),`level name "${n}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)`),Le.throwExceptionIf(e,Le.not(Le.anObject(t[n])),`level "${n}" must be an object`),Le.throwExceptionIf(e,Le.not(t[n].value),`level "${n}" must have a 'value' property`),Le.throwExceptionIf(e,Le.not(Le.anInteger(t[n].value)),`level "${n}".value must have an integer value`),Le.throwExceptionIf(e,Le.not(t[n].colour),`level "${n}" must have a 'colour' property`),Le.throwExceptionIf(e,Le.not(hd.indexOf(t[n].colour)>-1),`level "${n}".colour must be one of ${hd.join(", ")}`);}));});Le.addListener(e=>{en.addLevels(e.levels);});pd.exports=en;});var Sd=B($n=>{var{parse:Dd,stringify:yd}=JSON,{keys:PE}=Object,Ln=String,wd="string",md={},is="object",vd=(e,t)=>t,RE=e=>e instanceof Ln?Ln(e):e,BE=(e,t)=>typeof t===wd?new Ln(t):t,Ed=(e,t,r,n)=>{let s=[];for(let o=PE(r),{length:u}=o,c=0;c{let n=Ln(t.push(r)-1);return e.set(r,n),n},_d=(e,t)=>{let r=Dd(e,BE).map(RE),n=r[0],s=t||vd,o=typeof n===is&&n?Ed(r,new Set,n,s):n;return s.call({"":o},"",o)};$n.parse=_d;var Fd=(e,t,r)=>{let n=t&&typeof t===is?(m,D)=>m===""||-1Dd(Fd(e));$n.toJSON=qE;var YE=e=>_d(yd(e));$n.fromJSON=YE;});var ma=B((TC,xd)=>{var Cd=Sd(),bd=yr(),ha=class{constructor(){let t={__LOG4JS_undefined__:void 0,__LOG4JS_NaN__:+"abc",__LOG4JS_Infinity__:1/0,"__LOG4JS_-Infinity__":-1/0};this.deMap=t,this.serMap={},Object.keys(this.deMap).forEach(r=>{let n=this.deMap[r];this.serMap[n]=r;});}canSerialise(t){return typeof t=="string"?!1:t in this.serMap}serialise(t){return this.canSerialise(t)?this.serMap[t]:t}canDeserialise(t){return t in this.deMap}deserialise(t){return this.canDeserialise(t)?this.deMap[t]:t}},Od=new ha,pa=class e{constructor(t,r,n,s,o,u){if(this.startTime=new Date,this.categoryName=t,this.data=n,this.level=r,this.context=Object.assign({},s),this.pid=process.pid,this.error=u,typeof o<"u"){if(!o||typeof o!="object"||Array.isArray(o))throw new TypeError("Invalid location type passed to LoggingEvent constructor");this.constructor._getLocationKeys().forEach(c=>{typeof o[c]<"u"&&(this[c]=o[c]);});}}static _getLocationKeys(){return ["fileName","lineNumber","columnNumber","callStack","className","functionName","functionAlias","callerName"]}serialise(){return Cd.stringify(this,(t,r)=>(r instanceof Error&&(r=Object.assign({message:r.message,stack:r.stack},r)),Od.serialise(r)))}static deserialise(t){let r;try{let n=Cd.parse(t,(s,o)=>{if(o&&o.message&&o.stack){let u=new Error(o);Object.keys(o).forEach(c=>{u[c]=o[c];}),o=u;}return Od.deserialise(o)});this._getLocationKeys().forEach(s=>{typeof n[s]<"u"&&(n.location||(n.location={}),n.location[s]=n[s]);}),r=new e(n.categoryName,bd.getLevel(n.level.levelStr),n.data,n.context,n.location,n.error),r.startTime=new Date(n.startTime),r.pid=n.pid,n.cluster&&(r.cluster=n.cluster);}catch(n){r=new e("log4js",bd.ERROR,["Unable to parse log:",t,"because: ",n]);}return r}};xd.exports=pa;});var os=B((jC,Td)=>{var dt=qe()("log4js:clustering"),WE=ma(),UE=gr(),tn=!1,ht=null;try{ht=U("cluster");}catch{dt("cluster module not present"),tn=!0;}var Da=[],Pn=!1,kn="NODE_APP_INSTANCE",Ad=()=>Pn&&process.env[kn]==="0",ga=()=>tn||ht&&ht.isMaster||Ad(),Md=e=>{Da.forEach(t=>t(e));},ss=(e,t)=>{if(dt("cluster message received from worker ",e,": ",t),e.topic&&e.data&&(t=e,e=void 0),t&&t.topic&&t.topic==="log4js:message"){dt("received message: ",t.data);let r=WE.deserialise(t.data);Md(r);}};tn||UE.addListener(e=>{Da.length=0,{pm2:Pn,disableClustering:tn,pm2InstanceVar:kn="NODE_APP_INSTANCE"}=e,dt(`clustering disabled ? ${tn}`),dt(`cluster.isMaster ? ${ht&&ht.isMaster}`),dt(`pm2 enabled ? ${Pn}`),dt(`pm2InstanceVar = ${kn}`),dt(`process.env[${kn}] = ${process.env[kn]}`),Pn&&process.removeListener("message",ss),ht&&ht.removeListener&&ht.removeListener("message",ss),tn||e.disableClustering?dt("Not listening for cluster messages, because clustering disabled."):Ad()?(dt("listening for PM2 broadcast messages"),process.on("message",ss)):ht&&ht.isMaster?(dt("listening for cluster messages"),ht.on("message",ss)):dt("not listening for messages, because we are not a master process");});Td.exports={onlyOnMaster:(e,t)=>ga()?e():t,isMaster:ga,send:e=>{ga()?Md(e):(Pn||(e.cluster={workerId:ht.worker.id,worker:process.pid}),process.send({topic:"log4js:message",data:e.serialise()}));},onMessage:e=>{Da.push(e);}};});var Nd=B((IC,Id)=>{function zE(e){if(typeof e=="number"&&Number.isInteger(e))return e;let t={K:1024,M:1024*1024,G:1024*1024*1024},r=Object.keys(t),n=e.slice(-1).toLocaleUpperCase(),s=e.slice(0,-1).trim();if(r.indexOf(n)<0||!Number.isInteger(Number(s)))throw Error(`maxLogSize: "${e}" is invalid`);return s*t[n]}function HE(e,t){let r=Object.assign({},t);return Object.keys(e).forEach(n=>{r[n]&&(r[n]=e[n](t[n]));}),r}function ya(e){return HE({maxLogSize:zE},e)}var jd={dateFile:ya,file:ya,fileSync:ya};Id.exports.modifyConfig=e=>jd[e.type]?jd[e.type](e):e;});var $d=B((NC,Ld)=>{var VE=console.log.bind(console);function GE(e,t){return r=>{VE(e(r,t));}}function JE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),GE(r,e.timezoneOffset)}Ld.exports.configure=JE;});var Pd=B(kd=>{function ZE(e,t){return r=>{process.stdout.write(`${e(r,t)} +`);}}function KE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),ZE(r,e.timezoneOffset)}kd.configure=KE;});var Bd=B(($C,Rd)=>{function QE(e,t){return r=>{process.stderr.write(`${e(r,t)} +`);}}function XE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),QE(r,e.timezoneOffset)}Rd.exports.configure=XE;});var Yd=B((kC,qd)=>{function e_(e,t,r,n){let s=n.getLevel(e),o=n.getLevel(t,n.FATAL);return u=>{let c=u.level;s.isLessThanOrEqualTo(c)&&o.isGreaterThanOrEqualTo(c)&&r(u);}}function t_(e,t,r,n){let s=r(e.appender);return e_(e.level,e.maxLevel,s,n)}qd.exports.configure=t_;});var zd=B((PC,Ud)=>{var Wd=qe()("log4js:categoryFilter");function r_(e,t){return typeof e=="string"&&(e=[e]),r=>{Wd(`Checking ${r.categoryName} against ${e}`),e.indexOf(r.categoryName)===-1&&(Wd("Not excluded, sending to appender"),t(r));}}function n_(e,t,r){let n=r(e.appender);return r_(e.exclude,n)}Ud.exports.configure=n_;});var Gd=B((RC,Vd)=>{var Hd=qe()("log4js:noLogFilter");function i_(e){return e.filter(r=>r!=null&&r!=="")}function s_(e,t){return r=>{Hd(`Checking data: ${r.data} against filters: ${e}`),typeof e=="string"&&(e=[e]),e=i_(e);let n=new RegExp(e.join("|"),"i");(e.length===0||r.data.findIndex(s=>n.test(s))<0)&&(Hd("Not excluded, sending to appender"),t(r));}}function o_(e,t,r){let n=r(e.appender);return s_(e.exclude,n)}Vd.exports.configure=o_;});var Qe=B(wa=>{wa.fromCallback=function(e){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")e.apply(this,arguments);else return new Promise((t,r)=>{arguments[arguments.length]=(n,s)=>{if(n)return r(n);t(s);},arguments.length++,e.apply(this,arguments);})},"name",{value:e.name})};wa.fromPromise=function(e){return Object.defineProperty(function(){let t=arguments[arguments.length-1];if(typeof t!="function")return e.apply(this,arguments);e.apply(this,arguments).then(r=>t(null,r),t);},"name",{value:e.name})};});var Zd=B((qC,Jd)=>{var sr=U("constants"),a_=process.cwd,as=null,u_=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return as||(as=a_.call(process)),as};try{process.cwd();}catch{}typeof process.chdir=="function"&&(va=process.chdir,process.chdir=function(e){as=null,va.call(process,e);},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,va));var va;Jd.exports=c_;function c_(e){sr.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=o(e.chown),e.fchown=o(e.fchown),e.lchown=o(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=u(e.chownSync),e.fchownSync=u(e.fchownSync),e.lchownSync=u(e.lchownSync),e.chmodSync=s(e.chmodSync),e.fchmodSync=s(e.fchmodSync),e.lchmodSync=s(e.lchmodSync),e.stat=c(e.stat),e.fstat=c(e.fstat),e.lstat=c(e.lstat),e.statSync=d(e.statSync),e.fstatSync=d(e.fstatSync),e.lstatSync=d(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(m,D,y){y&&process.nextTick(y);},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(m,D,y,F){F&&process.nextTick(F);},e.lchownSync=function(){}),u_==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(m){function D(y,F,C){var _=Date.now(),j=0;m(y,F,function $(x){if(x&&(x.code==="EACCES"||x.code==="EPERM"||x.code==="EBUSY")&&Date.now()-_<6e4){setTimeout(function(){e.stat(F,function(w,M){w&&w.code==="ENOENT"?m(y,F,$):C(x);});},j),j<100&&(j+=10);return}C&&C(x);});}return Object.setPrototypeOf&&Object.setPrototypeOf(D,m),D}(e.rename)),e.read=typeof e.read!="function"?e.read:function(m){function D(y,F,C,_,j,$){var x;if($&&typeof $=="function"){var w=0;x=function(M,P,J){if(M&&M.code==="EAGAIN"&&w<10)return w++,m.call(e,y,F,C,_,j,x);$.apply(this,arguments);};}return m.call(e,y,F,C,_,j,x)}return Object.setPrototypeOf&&Object.setPrototypeOf(D,m),D}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(m){return function(D,y,F,C,_){for(var j=0;;)try{return m.call(e,D,y,F,C,_)}catch($){if($.code==="EAGAIN"&&j<10){j++;continue}throw $}}}(e.readSync);function t(m){m.lchmod=function(D,y,F){m.open(D,sr.O_WRONLY|sr.O_SYMLINK,y,function(C,_){if(C){F&&F(C);return}m.fchmod(_,y,function(j){m.close(_,function($){F&&F(j||$);});});});},m.lchmodSync=function(D,y){var F=m.openSync(D,sr.O_WRONLY|sr.O_SYMLINK,y),C=!0,_;try{_=m.fchmodSync(F,y),C=!1;}finally{if(C)try{m.closeSync(F);}catch{}else m.closeSync(F);}return _};}function r(m){sr.hasOwnProperty("O_SYMLINK")&&m.futimes?(m.lutimes=function(D,y,F,C){m.open(D,sr.O_SYMLINK,function(_,j){if(_){C&&C(_);return}m.futimes(j,y,F,function($){m.close(j,function(x){C&&C($||x);});});});},m.lutimesSync=function(D,y,F){var C=m.openSync(D,sr.O_SYMLINK),_,j=!0;try{_=m.futimesSync(C,y,F),j=!1;}finally{if(j)try{m.closeSync(C);}catch{}else m.closeSync(C);}return _}):m.futimes&&(m.lutimes=function(D,y,F,C){C&&process.nextTick(C);},m.lutimesSync=function(){});}function n(m){return m&&function(D,y,F){return m.call(e,D,y,function(C){g(C)&&(C=null),F&&F.apply(this,arguments);})}}function s(m){return m&&function(D,y){try{return m.call(e,D,y)}catch(F){if(!g(F))throw F}}}function o(m){return m&&function(D,y,F,C){return m.call(e,D,y,F,function(_){g(_)&&(_=null),C&&C.apply(this,arguments);})}}function u(m){return m&&function(D,y,F){try{return m.call(e,D,y,F)}catch(C){if(!g(C))throw C}}}function c(m){return m&&function(D,y,F){typeof y=="function"&&(F=y,y=null);function C(_,j){j&&(j.uid<0&&(j.uid+=4294967296),j.gid<0&&(j.gid+=4294967296)),F&&F.apply(this,arguments);}return y?m.call(e,D,y,C):m.call(e,D,C)}}function d(m){return m&&function(D,y){var F=y?m.call(e,D,y):m.call(e,D);return F&&(F.uid<0&&(F.uid+=4294967296),F.gid<0&&(F.gid+=4294967296)),F}}function g(m){if(!m||m.code==="ENOSYS")return !0;var D=!process.getuid||process.getuid()!==0;return !!(D&&(m.code==="EINVAL"||m.code==="EPERM"))}}});var Xd=B((YC,Qd)=>{var Kd=U("stream").Stream;Qd.exports=l_;function l_(e){return {ReadStream:t,WriteStream:r};function t(n,s){if(!(this instanceof t))return new t(n,s);Kd.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,s=s||{};for(var u=Object.keys(s),c=0,d=u.length;cthis.end)throw new Error("start must be <= end");this.pos=this.start;}if(this.fd!==null){process.nextTick(function(){o._read();});return}e.open(this.path,this.flags,this.mode,function(m,D){if(m){o.emit("error",m),o.readable=!1;return}o.fd=D,o.emit("open",D),o._read();});}function r(n,s){if(!(this instanceof r))return new r(n,s);Kd.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,s=s||{};for(var o=Object.keys(s),u=0,c=o.length;u= zero");this.pos=this.start;}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush());}}});var th=B((WC,eh)=>{eh.exports=d_;var f_=Object.getPrototypeOf||function(e){return e.__proto__};function d_(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:f_(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));}),t}});var $e=B((UC,Fa)=>{var Me=U("fs"),h_=Zd(),p_=Xd(),m_=th(),us=U("util"),Ue,ls;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ue=Symbol.for("graceful-fs.queue"),ls=Symbol.for("graceful-fs.previous")):(Ue="___graceful-fs.queue",ls="___graceful-fs.previous");function g_(){}function ih(e,t){Object.defineProperty(e,Ue,{get:function(){return t}});}var wr=g_;us.debuglog?wr=us.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(wr=function(){var e=us.format.apply(us,arguments);e="GFS4: "+e.split(/\n/).join(` +GFS4: `),console.error(e);});Me[Ue]||(rh=global[Ue]||[],ih(Me,rh),Me.close=function(e){function t(r,n){return e.call(Me,r,function(s){s||nh(),typeof n=="function"&&n.apply(this,arguments);})}return Object.defineProperty(t,ls,{value:e}),t}(Me.close),Me.closeSync=function(e){function t(r){e.apply(Me,arguments),nh();}return Object.defineProperty(t,ls,{value:e}),t}(Me.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){wr(Me[Ue]),U("assert").equal(Me[Ue].length,0);}));var rh;global[Ue]||ih(global,Me[Ue]);Fa.exports=Ea(m_(Me));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Me.__patched&&(Fa.exports=Ea(Me),Me.__patched=!0);function Ea(e){h_(e),e.gracefulify=Ea,e.createReadStream=P,e.createWriteStream=J;var t=e.readFile;e.readFile=r;function r(L,ee,Z){return typeof ee=="function"&&(Z=ee,ee=null),q(L,ee,Z);function q(Y,V,I,W){return t(Y,V,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?rn([q,[Y,V,I],k,W||Date.now(),Date.now()]):typeof I=="function"&&I.apply(this,arguments);})}}var n=e.writeFile;e.writeFile=s;function s(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return n(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var o=e.appendFile;o&&(e.appendFile=u);function u(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return o(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var c=e.copyFile;c&&(e.copyFile=d);function d(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=0),Y(L,ee,Z,q);function Y(V,I,W,k,G){return c(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var g=e.readdir;e.readdir=D;var m=/^v[0-5]\./;function D(L,ee,Z){typeof ee=="function"&&(Z=ee,ee=null);var q=m.test(process.version)?function(I,W,k,G){return g(I,Y(I,W,k,G))}:function(I,W,k,G){return g(I,W,Y(I,W,k,G))};return q(L,ee,Z);function Y(V,I,W,k){return function(G,K){G&&(G.code==="EMFILE"||G.code==="ENFILE")?rn([q,[V,I,W],G,k||Date.now(),Date.now()]):(K&&K.sort&&K.sort(),typeof W=="function"&&W.call(this,G,K));}}}if(process.version.substr(0,4)==="v0.8"){var y=p_(e);$=y.ReadStream,w=y.WriteStream;}var F=e.ReadStream;F&&($.prototype=Object.create(F.prototype),$.prototype.open=x);var C=e.WriteStream;C&&(w.prototype=Object.create(C.prototype),w.prototype.open=M),Object.defineProperty(e,"ReadStream",{get:function(){return $},set:function(L){$=L;},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return w},set:function(L){w=L;},enumerable:!0,configurable:!0});var _=$;Object.defineProperty(e,"FileReadStream",{get:function(){return _},set:function(L){_=L;},enumerable:!0,configurable:!0});var j=w;Object.defineProperty(e,"FileWriteStream",{get:function(){return j},set:function(L){j=L;},enumerable:!0,configurable:!0});function $(L,ee){return this instanceof $?(F.apply(this,arguments),this):$.apply(Object.create($.prototype),arguments)}function x(){var L=this;te(L.path,L.flags,L.mode,function(ee,Z){ee?(L.autoClose&&L.destroy(),L.emit("error",ee)):(L.fd=Z,L.emit("open",Z),L.read());});}function w(L,ee){return this instanceof w?(C.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function M(){var L=this;te(L.path,L.flags,L.mode,function(ee,Z){ee?(L.destroy(),L.emit("error",ee)):(L.fd=Z,L.emit("open",Z));});}function P(L,ee){return new e.ReadStream(L,ee)}function J(L,ee){return new e.WriteStream(L,ee)}var X=e.open;e.open=te;function te(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return X(V,I,W,function(K,ye){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}return e}function rn(e){wr("ENQUEUE",e[0].name,e[1]),Me[Ue].push(e),_a();}var cs;function nh(){for(var e=Date.now(),t=0;t2&&(Me[Ue][t][3]=e,Me[Ue][t][4]=e);_a();}function _a(){if(clearTimeout(cs),cs=void 0,Me[Ue].length!==0){var e=Me[Ue].shift(),t=e[0],r=e[1],n=e[2],s=e[3],o=e[4];if(s===void 0)wr("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-s>=6e4){wr("TIMEOUT",t.name,r);var u=r.pop();typeof u=="function"&&u.call(null,n);}else {var c=Date.now()-o,d=Math.max(o-s,1),g=Math.min(d*1.2,100);c>=g?(wr("RETRY",t.name,r),t.apply(null,r.concat([s]))):Me[Ue].push(e);}cs===void 0&&(cs=setTimeout(_a,0));}}});var Sa=B(vr=>{var sh=Qe().fromCallback,pt=$e(),D_=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof pt[e]=="function");Object.keys(pt).forEach(e=>{e!=="promises"&&(vr[e]=pt[e]);});D_.forEach(e=>{vr[e]=sh(pt[e]);});vr.exists=function(e,t){return typeof t=="function"?pt.exists(e,t):new Promise(r=>pt.exists(e,r))};vr.read=function(e,t,r,n,s,o){return typeof o=="function"?pt.read(e,t,r,n,s,o):new Promise((u,c)=>{pt.read(e,t,r,n,s,(d,g,m)=>{if(d)return c(d);u({bytesRead:g,buffer:m});});})};vr.write=function(e,t,...r){return typeof r[r.length-1]=="function"?pt.write(e,t,...r):new Promise((n,s)=>{pt.write(e,t,...r,(o,u,c)=>{if(o)return s(o);n({bytesWritten:u,buffer:c});});})};typeof pt.realpath.native=="function"&&(vr.realpath.native=sh(pt.realpath.native));});var ba=B((HC,ah)=>{var Ca=U("path");function oh(e){return e=Ca.normalize(Ca.resolve(e)).split(Ca.sep),e.length>0?e[0]:null}var y_=/[<>:"|?*]/;function w_(e){let t=oh(e);return e=e.replace(t,""),y_.test(e)}ah.exports={getRootPath:oh,invalidWin32Path:w_};});var ch=B((VC,uh)=>{var v_=$e(),Oa=U("path"),E_=ba().invalidWin32Path,__=parseInt("0777",8);function xa(e,t,r,n){if(typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t}),process.platform==="win32"&&E_(e)){let u=new Error(e+" contains invalid WIN32 path characters.");return u.code="EINVAL",r(u)}let s=t.mode,o=t.fs||v_;s===void 0&&(s=__&~process.umask()),n||(n=null),r=r||function(){},e=Oa.resolve(e),o.mkdir(e,s,u=>{if(!u)return n=n||e,r(null,n);switch(u.code){case"ENOENT":if(Oa.dirname(e)===e)return r(u);xa(Oa.dirname(e),t,(c,d)=>{c?r(c,d):xa(e,t,r,d);});break;default:o.stat(e,(c,d)=>{c||!d.isDirectory()?r(u,n):r(null,n);});break}});}uh.exports=xa;});var fh=B((GC,lh)=>{var F_=$e(),Aa=U("path"),S_=ba().invalidWin32Path,C_=parseInt("0777",8);function Ma(e,t,r){(!t||typeof t!="object")&&(t={mode:t});let n=t.mode,s=t.fs||F_;if(process.platform==="win32"&&S_(e)){let o=new Error(e+" contains invalid WIN32 path characters.");throw o.code="EINVAL",o}n===void 0&&(n=C_&~process.umask()),r||(r=null),e=Aa.resolve(e);try{s.mkdirSync(e,n),r=r||e;}catch(o){if(o.code==="ENOENT"){if(Aa.dirname(e)===e)throw o;r=Ma(Aa.dirname(e),t,r),Ma(e,t,r);}else {let u;try{u=s.statSync(e);}catch{throw o}if(!u.isDirectory())throw o}}return r}lh.exports=Ma;});var st=B((JC,dh)=>{var b_=Qe().fromCallback,Ta=b_(ch()),ja=fh();dh.exports={mkdirs:Ta,mkdirsSync:ja,mkdirp:Ta,mkdirpSync:ja,ensureDir:Ta,ensureDirSync:ja};});var Ia=B((ZC,ph)=>{var Ve=$e(),hh=U("os"),fs=U("path");function O_(){let e=fs.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));e=fs.join(hh.tmpdir(),e);let t=new Date(1435410243862);Ve.writeFileSync(e,"https://github.com/jprichardson/node-fs-extra/pull/141");let r=Ve.openSync(e,"r+");return Ve.futimesSync(r,t,t),Ve.closeSync(r),Ve.statSync(e).mtime>1435410243e3}function x_(e){let t=fs.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));t=fs.join(hh.tmpdir(),t);let r=new Date(1435410243862);Ve.writeFile(t,"https://github.com/jprichardson/node-fs-extra/pull/141",n=>{if(n)return e(n);Ve.open(t,"r+",(s,o)=>{if(s)return e(s);Ve.futimes(o,r,r,u=>{if(u)return e(u);Ve.close(o,c=>{if(c)return e(c);Ve.stat(t,(d,g)=>{if(d)return e(d);e(null,g.mtime>1435410243e3);});});});});});}function A_(e){if(typeof e=="number")return Math.floor(e/1e3)*1e3;if(e instanceof Date)return new Date(Math.floor(e.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function M_(e,t,r,n){Ve.open(e,"r+",(s,o)=>{if(s)return n(s);Ve.futimes(o,t,r,u=>{Ve.close(o,c=>{n&&n(u||c);});});});}function T_(e,t,r){let n=Ve.openSync(e,"r+");return Ve.futimesSync(n,t,r),Ve.closeSync(n)}ph.exports={hasMillisRes:x_,hasMillisResSync:O_,timeRemoveMillis:A_,utimesMillis:M_,utimesMillisSync:T_};});var qn=B((KC,vh)=>{var mt=$e(),Xe=U("path"),mh=10,gh=5,j_=0,La=process.versions.node.split("."),Dh=Number.parseInt(La[0],10),yh=Number.parseInt(La[1],10),I_=Number.parseInt(La[2],10);function Rn(){if(Dh>mh)return !0;if(Dh===mh){if(yh>gh)return !0;if(yh===gh&&I_>=j_)return !0}return !1}function N_(e,t,r){Rn()?mt.stat(e,{bigint:!0},(n,s)=>{if(n)return r(n);mt.stat(t,{bigint:!0},(o,u)=>o?o.code==="ENOENT"?r(null,{srcStat:s,destStat:null}):r(o):r(null,{srcStat:s,destStat:u}));}):mt.stat(e,(n,s)=>{if(n)return r(n);mt.stat(t,(o,u)=>o?o.code==="ENOENT"?r(null,{srcStat:s,destStat:null}):r(o):r(null,{srcStat:s,destStat:u}));});}function L_(e,t){let r,n;Rn()?r=mt.statSync(e,{bigint:!0}):r=mt.statSync(e);try{Rn()?n=mt.statSync(t,{bigint:!0}):n=mt.statSync(t);}catch(s){if(s.code==="ENOENT")return {srcStat:r,destStat:null};throw s}return {srcStat:r,destStat:n}}function $_(e,t,r,n){N_(e,t,(s,o)=>{if(s)return n(s);let{srcStat:u,destStat:c}=o;return c&&c.ino&&c.dev&&c.ino===u.ino&&c.dev===u.dev?n(new Error("Source and destination must not be the same.")):u.isDirectory()&&$a(e,t)?n(new Error(Bn(e,t,r))):n(null,{srcStat:u,destStat:c})});}function k_(e,t,r){let{srcStat:n,destStat:s}=L_(e,t);if(s&&s.ino&&s.dev&&s.ino===n.ino&&s.dev===n.dev)throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&$a(e,t))throw new Error(Bn(e,t,r));return {srcStat:n,destStat:s}}function Na(e,t,r,n,s){let o=Xe.resolve(Xe.dirname(e)),u=Xe.resolve(Xe.dirname(r));if(u===o||u===Xe.parse(u).root)return s();Rn()?mt.stat(u,{bigint:!0},(c,d)=>c?c.code==="ENOENT"?s():s(c):d.ino&&d.dev&&d.ino===t.ino&&d.dev===t.dev?s(new Error(Bn(e,r,n))):Na(e,t,u,n,s)):mt.stat(u,(c,d)=>c?c.code==="ENOENT"?s():s(c):d.ino&&d.dev&&d.ino===t.ino&&d.dev===t.dev?s(new Error(Bn(e,r,n))):Na(e,t,u,n,s));}function wh(e,t,r,n){let s=Xe.resolve(Xe.dirname(e)),o=Xe.resolve(Xe.dirname(r));if(o===s||o===Xe.parse(o).root)return;let u;try{Rn()?u=mt.statSync(o,{bigint:!0}):u=mt.statSync(o);}catch(c){if(c.code==="ENOENT")return;throw c}if(u.ino&&u.dev&&u.ino===t.ino&&u.dev===t.dev)throw new Error(Bn(e,r,n));return wh(e,t,o,n)}function $a(e,t){let r=Xe.resolve(e).split(Xe.sep).filter(s=>s),n=Xe.resolve(t).split(Xe.sep).filter(s=>s);return r.reduce((s,o,u)=>s&&n[u]===o,!0)}function Bn(e,t,r){return `Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}vh.exports={checkPaths:$_,checkPathsSync:k_,checkParentPaths:Na,checkParentPathsSync:wh,isSrcSubdir:$a};});var _h=B((QC,Eh)=>{Eh.exports=function(e){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(e)}catch{return new Buffer(e)}return new Buffer(e)};});var Oh=B((XC,bh)=>{var xe=$e(),Yn=U("path"),P_=st().mkdirsSync,R_=Ia().utimesMillisSync,Wn=qn();function B_(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; + + see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:s}=Wn.checkPathsSync(e,t,"copy");return Wn.checkParentPathsSync(e,n,t,"copy"),q_(s,e,t,r)}function q_(e,t,r,n){if(n.filter&&!n.filter(t,r))return;let s=Yn.dirname(r);return xe.existsSync(s)||P_(s),Fh(e,t,r,n)}function Fh(e,t,r,n){if(!(n.filter&&!n.filter(t,r)))return Y_(e,t,r,n)}function Y_(e,t,r,n){let o=(n.dereference?xe.statSync:xe.lstatSync)(t);if(o.isDirectory())return H_(o,e,t,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return W_(o,e,t,r,n);if(o.isSymbolicLink())return J_(e,t,r,n)}function W_(e,t,r,n,s){return t?U_(e,r,n,s):Sh(e,r,n,s)}function U_(e,t,r,n){if(n.overwrite)return xe.unlinkSync(r),Sh(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Sh(e,t,r,n){return typeof xe.copyFileSync=="function"?(xe.copyFileSync(t,r),xe.chmodSync(r,e.mode),n.preserveTimestamps?R_(r,e.atime,e.mtime):void 0):z_(e,t,r,n)}function z_(e,t,r,n){let o=_h()(65536),u=xe.openSync(t,"r"),c=xe.openSync(r,"w",e.mode),d=0;for(;dG_(n,e,t,r));}function G_(e,t,r,n){let s=Yn.join(t,e),o=Yn.join(r,e),{destStat:u}=Wn.checkPathsSync(s,o,"copy");return Fh(u,s,o,n)}function J_(e,t,r,n){let s=xe.readlinkSync(t);if(n.dereference&&(s=Yn.resolve(process.cwd(),s)),e){let o;try{o=xe.readlinkSync(r);}catch(u){if(u.code==="EINVAL"||u.code==="UNKNOWN")return xe.symlinkSync(s,r);throw u}if(n.dereference&&(o=Yn.resolve(process.cwd(),o)),Wn.isSrcSubdir(s,o))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${o}'.`);if(xe.statSync(r).isDirectory()&&Wn.isSrcSubdir(o,s))throw new Error(`Cannot overwrite '${o}' with '${s}'.`);return Z_(s,r)}else return xe.symlinkSync(s,r)}function Z_(e,t){return xe.unlinkSync(t),xe.symlinkSync(e,t)}bh.exports=B_;});var ka=B((eb,xh)=>{xh.exports={copySync:Oh()};});var xt=B((tb,Mh)=>{var K_=Qe().fromPromise,Ah=Sa();function Q_(e){return Ah.access(e).then(()=>!0).catch(()=>!1)}Mh.exports={pathExists:K_(Q_),pathExistsSync:Ah.existsSync};});var Rh=B((rb,Ph)=>{var ze=$e(),Un=U("path"),X_=st().mkdirs,eF=xt().pathExists,tF=Ia().utimesMillis,zn=qn();function rF(e,t,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; + + see https://github.com/jprichardson/node-fs-extra/issues/269`),zn.checkPaths(e,t,"copy",(s,o)=>{if(s)return n(s);let{srcStat:u,destStat:c}=o;zn.checkParentPaths(e,u,t,"copy",d=>d?n(d):r.filter?Ih(Th,c,e,t,r,n):Th(c,e,t,r,n));});}function Th(e,t,r,n,s){let o=Un.dirname(r);eF(o,(u,c)=>{if(u)return s(u);if(c)return Pa(e,t,r,n,s);X_(o,d=>d?s(d):Pa(e,t,r,n,s));});}function Ih(e,t,r,n,s,o){Promise.resolve(s.filter(r,n)).then(u=>u?e(t,r,n,s,o):o(),u=>o(u));}function Pa(e,t,r,n,s){return n.filter?Ih(jh,e,t,r,n,s):jh(e,t,r,n,s)}function jh(e,t,r,n,s){(n.dereference?ze.stat:ze.lstat)(t,(u,c)=>{if(u)return s(u);if(c.isDirectory())return oF(c,e,t,r,n,s);if(c.isFile()||c.isCharacterDevice()||c.isBlockDevice())return nF(c,e,t,r,n,s);if(c.isSymbolicLink())return cF(e,t,r,n,s)});}function nF(e,t,r,n,s,o){return t?iF(e,r,n,s,o):Nh(e,r,n,s,o)}function iF(e,t,r,n,s){if(n.overwrite)ze.unlink(r,o=>o?s(o):Nh(e,t,r,n,s));else return n.errorOnExist?s(new Error(`'${r}' already exists`)):s()}function Nh(e,t,r,n,s){return typeof ze.copyFile=="function"?ze.copyFile(t,r,o=>o?s(o):Lh(e,r,n,s)):sF(e,t,r,n,s)}function sF(e,t,r,n,s){let o=ze.createReadStream(t);o.on("error",u=>s(u)).once("open",()=>{let u=ze.createWriteStream(r,{mode:e.mode});u.on("error",c=>s(c)).on("open",()=>o.pipe(u)).once("close",()=>Lh(e,r,n,s));});}function Lh(e,t,r,n){ze.chmod(t,e.mode,s=>s?n(s):r.preserveTimestamps?tF(t,e.atime,e.mtime,n):n());}function oF(e,t,r,n,s,o){return t?t&&!t.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):$h(r,n,s,o):aF(e,r,n,s,o)}function aF(e,t,r,n,s){ze.mkdir(r,o=>{if(o)return s(o);$h(t,r,n,u=>u?s(u):ze.chmod(r,e.mode,s));});}function $h(e,t,r,n){ze.readdir(e,(s,o)=>s?n(s):kh(o,e,t,r,n));}function kh(e,t,r,n,s){let o=e.pop();return o?uF(e,o,t,r,n,s):s()}function uF(e,t,r,n,s,o){let u=Un.join(r,t),c=Un.join(n,t);zn.checkPaths(u,c,"copy",(d,g)=>{if(d)return o(d);let{destStat:m}=g;Pa(m,u,c,s,D=>D?o(D):kh(e,r,n,s,o));});}function cF(e,t,r,n,s){ze.readlink(t,(o,u)=>{if(o)return s(o);if(n.dereference&&(u=Un.resolve(process.cwd(),u)),e)ze.readlink(r,(c,d)=>c?c.code==="EINVAL"||c.code==="UNKNOWN"?ze.symlink(u,r,s):s(c):(n.dereference&&(d=Un.resolve(process.cwd(),d)),zn.isSrcSubdir(u,d)?s(new Error(`Cannot copy '${u}' to a subdirectory of itself, '${d}'.`)):e.isDirectory()&&zn.isSrcSubdir(d,u)?s(new Error(`Cannot overwrite '${d}' with '${u}'.`)):lF(u,r,s)));else return ze.symlink(u,r,s)});}function lF(e,t,r){ze.unlink(t,n=>n?r(n):ze.symlink(e,t,r));}Ph.exports=rF;});var Ra=B((nb,Bh)=>{var fF=Qe().fromCallback;Bh.exports={copy:fF(Rh())};});var Jh=B((ib,Gh)=>{var qh=$e(),zh=U("path"),_e=U("assert"),Hn=process.platform==="win32";function Hh(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{e[r]=e[r]||qh[r],r=r+"Sync",e[r]=e[r]||qh[r];}),e.maxBusyTries=e.maxBusyTries||3;}function Ba(e,t,r){let n=0;typeof t=="function"&&(r=t,t={}),_e(e,"rimraf: missing path"),_e.strictEqual(typeof e,"string","rimraf: path should be a string"),_e.strictEqual(typeof r,"function","rimraf: callback function required"),_e(t,"rimraf: invalid options argument provided"),_e.strictEqual(typeof t,"object","rimraf: options should be object"),Hh(t),Yh(e,t,function s(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&nYh(e,t,s),u)}o.code==="ENOENT"&&(o=null);}r(o);});}function Yh(e,t,r){_e(e),_e(t),_e(typeof r=="function"),t.lstat(e,(n,s)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&Hn)return Wh(e,t,n,r);if(s&&s.isDirectory())return ds(e,t,n,r);t.unlink(e,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return Hn?Wh(e,t,o,r):ds(e,t,o,r);if(o.code==="EISDIR")return ds(e,t,o,r)}return r(o)});});}function Wh(e,t,r,n){_e(e),_e(t),_e(typeof n=="function"),r&&_e(r instanceof Error),t.chmod(e,438,s=>{s?n(s.code==="ENOENT"?null:r):t.stat(e,(o,u)=>{o?n(o.code==="ENOENT"?null:r):u.isDirectory()?ds(e,t,r,n):t.unlink(e,n);});});}function Uh(e,t,r){let n;_e(e),_e(t),r&&_e(r instanceof Error);try{t.chmodSync(e,438);}catch(s){if(s.code==="ENOENT")return;throw r}try{n=t.statSync(e);}catch(s){if(s.code==="ENOENT")return;throw r}n.isDirectory()?hs(e,t,r):t.unlinkSync(e);}function ds(e,t,r,n){_e(e),_e(t),r&&_e(r instanceof Error),_e(typeof n=="function"),t.rmdir(e,s=>{s&&(s.code==="ENOTEMPTY"||s.code==="EEXIST"||s.code==="EPERM")?dF(e,t,n):s&&s.code==="ENOTDIR"?n(r):n(s);});}function dF(e,t,r){_e(e),_e(t),_e(typeof r=="function"),t.readdir(e,(n,s)=>{if(n)return r(n);let o=s.length,u;if(o===0)return t.rmdir(e,r);s.forEach(c=>{Ba(zh.join(e,c),t,d=>{if(!u){if(d)return r(u=d);--o===0&&t.rmdir(e,r);}});});});}function Vh(e,t){let r;t=t||{},Hh(t),_e(e,"rimraf: missing path"),_e.strictEqual(typeof e,"string","rimraf: path should be a string"),_e(t,"rimraf: missing options"),_e.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e);}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&Hn&&Uh(e,t,n);}try{r&&r.isDirectory()?hs(e,t,null):t.unlinkSync(e);}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return Hn?Uh(e,t,n):hs(e,t,n);if(n.code!=="EISDIR")throw n;hs(e,t,n);}}function hs(e,t,r){_e(e),_e(t),r&&_e(r instanceof Error);try{t.rmdirSync(e);}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")hF(e,t);else if(n.code!=="ENOENT")throw n}}function hF(e,t){if(_e(e),_e(t),t.readdirSync(e).forEach(r=>Vh(zh.join(e,r),t)),Hn){let r=Date.now();do try{return t.rmdirSync(e,t)}catch{}while(Date.now()-r<500)}else return t.rmdirSync(e,t)}Gh.exports=Ba;Ba.sync=Vh;});var Vn=B((sb,Kh)=>{var pF=Qe().fromCallback,Zh=Jh();Kh.exports={remove:pF(Zh),removeSync:Zh.sync};});var sp=B((ob,ip)=>{var mF=Qe().fromCallback,ep=$e(),tp=U("path"),rp=st(),np=Vn(),Qh=mF(function(t,r){r=r||function(){},ep.readdir(t,(n,s)=>{if(n)return rp.mkdirs(t,r);s=s.map(u=>tp.join(t,u)),o();function o(){let u=s.pop();if(!u)return r();np.remove(u,c=>{if(c)return r(c);o();});}});});function Xh(e){let t;try{t=ep.readdirSync(e);}catch{return rp.mkdirsSync(e)}t.forEach(r=>{r=tp.join(e,r),np.removeSync(r);});}ip.exports={emptyDirSync:Xh,emptydirSync:Xh,emptyDir:Qh,emptydir:Qh};});var cp=B((ab,up)=>{var gF=Qe().fromCallback,op=U("path"),Gn=$e(),ap=st(),DF=xt().pathExists;function yF(e,t){function r(){Gn.writeFile(e,"",n=>{if(n)return t(n);t();});}Gn.stat(e,(n,s)=>{if(!n&&s.isFile())return t();let o=op.dirname(e);DF(o,(u,c)=>{if(u)return t(u);if(c)return r();ap.mkdirs(o,d=>{if(d)return t(d);r();});});});}function wF(e){let t;try{t=Gn.statSync(e);}catch{}if(t&&t.isFile())return;let r=op.dirname(e);Gn.existsSync(r)||ap.mkdirsSync(r),Gn.writeFileSync(e,"");}up.exports={createFile:gF(yF),createFileSync:wF};});var pp=B((ub,hp)=>{var vF=Qe().fromCallback,fp=U("path"),Er=$e(),dp=st(),lp=xt().pathExists;function EF(e,t,r){function n(s,o){Er.link(s,o,u=>{if(u)return r(u);r(null);});}lp(t,(s,o)=>{if(s)return r(s);if(o)return r(null);Er.lstat(e,u=>{if(u)return u.message=u.message.replace("lstat","ensureLink"),r(u);let c=fp.dirname(t);lp(c,(d,g)=>{if(d)return r(d);if(g)return n(e,t);dp.mkdirs(c,m=>{if(m)return r(m);n(e,t);});});});});}function _F(e,t){if(Er.existsSync(t))return;try{Er.lstatSync(e);}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=fp.dirname(t);return Er.existsSync(n)||dp.mkdirsSync(n),Er.linkSync(e,t)}hp.exports={createLink:vF(EF),createLinkSync:_F};});var gp=B((cb,mp)=>{var or=U("path"),Jn=$e(),FF=xt().pathExists;function SF(e,t,r){if(or.isAbsolute(e))return Jn.lstat(e,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:e,toDst:e}));{let n=or.dirname(t),s=or.join(n,e);return FF(s,(o,u)=>o?r(o):u?r(null,{toCwd:s,toDst:e}):Jn.lstat(e,c=>c?(c.message=c.message.replace("lstat","ensureSymlink"),r(c)):r(null,{toCwd:e,toDst:or.relative(n,e)})))}}function CF(e,t){let r;if(or.isAbsolute(e)){if(r=Jn.existsSync(e),!r)throw new Error("absolute srcpath does not exist");return {toCwd:e,toDst:e}}else {let n=or.dirname(t),s=or.join(n,e);if(r=Jn.existsSync(s),r)return {toCwd:s,toDst:e};if(r=Jn.existsSync(e),!r)throw new Error("relative srcpath does not exist");return {toCwd:e,toDst:or.relative(n,e)}}}mp.exports={symlinkPaths:SF,symlinkPathsSync:CF};});var wp=B((lb,yp)=>{var Dp=$e();function bF(e,t,r){if(r=typeof t=="function"?t:r,t=typeof t=="function"?!1:t,t)return r(null,t);Dp.lstat(e,(n,s)=>{if(n)return r(null,"file");t=s&&s.isDirectory()?"dir":"file",r(null,t);});}function OF(e,t){let r;if(t)return t;try{r=Dp.lstatSync(e);}catch{return "file"}return r&&r.isDirectory()?"dir":"file"}yp.exports={symlinkType:bF,symlinkTypeSync:OF};});var bp=B((fb,Cp)=>{var xF=Qe().fromCallback,Ep=U("path"),nn=$e(),_p=st(),AF=_p.mkdirs,MF=_p.mkdirsSync,Fp=gp(),TF=Fp.symlinkPaths,jF=Fp.symlinkPathsSync,Sp=wp(),IF=Sp.symlinkType,NF=Sp.symlinkTypeSync,vp=xt().pathExists;function LF(e,t,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,vp(t,(s,o)=>{if(s)return n(s);if(o)return n(null);TF(e,t,(u,c)=>{if(u)return n(u);e=c.toDst,IF(c.toCwd,r,(d,g)=>{if(d)return n(d);let m=Ep.dirname(t);vp(m,(D,y)=>{if(D)return n(D);if(y)return nn.symlink(e,t,g,n);AF(m,F=>{if(F)return n(F);nn.symlink(e,t,g,n);});});});});});}function $F(e,t,r){if(nn.existsSync(t))return;let s=jF(e,t);e=s.toDst,r=NF(s.toCwd,r);let o=Ep.dirname(t);return nn.existsSync(o)||MF(o),nn.symlinkSync(e,t,r)}Cp.exports={createSymlink:xF(LF),createSymlinkSync:$F};});var xp=B((db,Op)=>{var ps=cp(),ms=pp(),gs=bp();Op.exports={createFile:ps.createFile,createFileSync:ps.createFileSync,ensureFile:ps.createFile,ensureFileSync:ps.createFileSync,createLink:ms.createLink,createLinkSync:ms.createLinkSync,ensureLink:ms.createLink,ensureLinkSync:ms.createLinkSync,createSymlink:gs.createSymlink,createSymlinkSync:gs.createSymlinkSync,ensureSymlink:gs.createSymlink,ensureSymlinkSync:gs.createSymlinkSync};});var jp=B((hb,Tp)=>{var sn;try{sn=$e();}catch{sn=U("fs");}function kF(e,t,r){r==null&&(r=t,t={}),typeof t=="string"&&(t={encoding:t}),t=t||{};var n=t.fs||sn,s=!0;"throws"in t&&(s=t.throws),n.readFile(e,t,function(o,u){if(o)return r(o);u=Mp(u);var c;try{c=JSON.parse(u,t?t.reviver:null);}catch(d){return s?(d.message=e+": "+d.message,r(d)):r(null,null)}r(null,c);});}function PF(e,t){t=t||{},typeof t=="string"&&(t={encoding:t});var r=t.fs||sn,n=!0;"throws"in t&&(n=t.throws);try{var s=r.readFileSync(e,t);return s=Mp(s),JSON.parse(s,t.reviver)}catch(o){if(n)throw o.message=e+": "+o.message,o;return null}}function Ap(e,t){var r,n=` +`;typeof t=="object"&&t!==null&&(t.spaces&&(r=t.spaces),t.EOL&&(n=t.EOL));var s=JSON.stringify(e,t?t.replacer:null,r);return s.replace(/\n/g,n)+n}function RF(e,t,r,n){n==null&&(n=r,r={}),r=r||{};var s=r.fs||sn,o="";try{o=Ap(t,r);}catch(u){n&&n(u,null);return}s.writeFile(e,o,r,n);}function BF(e,t,r){r=r||{};var n=r.fs||sn,s=Ap(t,r);return n.writeFileSync(e,s,r)}function Mp(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e=e.replace(/^\uFEFF/,""),e}var qF={readFile:kF,readFileSync:PF,writeFile:RF,writeFileSync:BF};Tp.exports=qF;});var ys=B((pb,Np)=>{var Ip=Qe().fromCallback,Ds=jp();Np.exports={readJson:Ip(Ds.readFile),readJsonSync:Ds.readFileSync,writeJson:Ip(Ds.writeFile),writeJsonSync:Ds.writeFileSync};});var kp=B((mb,$p)=>{var YF=U("path"),WF=st(),UF=xt().pathExists,Lp=ys();function zF(e,t,r,n){typeof r=="function"&&(n=r,r={});let s=YF.dirname(e);UF(s,(o,u)=>{if(o)return n(o);if(u)return Lp.writeJson(e,t,r,n);WF.mkdirs(s,c=>{if(c)return n(c);Lp.writeJson(e,t,r,n);});});}$p.exports=zF;});var Rp=B((gb,Pp)=>{var HF=$e(),VF=U("path"),GF=st(),JF=ys();function ZF(e,t,r){let n=VF.dirname(e);HF.existsSync(n)||GF.mkdirsSync(n),JF.writeJsonSync(e,t,r);}Pp.exports=ZF;});var qp=B((Db,Bp)=>{var KF=Qe().fromCallback,Ze=ys();Ze.outputJson=KF(kp());Ze.outputJsonSync=Rp();Ze.outputJSON=Ze.outputJson;Ze.outputJSONSync=Ze.outputJsonSync;Ze.writeJSON=Ze.writeJson;Ze.writeJSONSync=Ze.writeJsonSync;Ze.readJSON=Ze.readJson;Ze.readJSONSync=Ze.readJsonSync;Bp.exports=Ze;});var Vp=B((yb,Hp)=>{var Up=$e(),QF=U("path"),XF=ka().copySync,zp=Vn().removeSync,eS=st().mkdirpSync,Yp=qn();function tS(e,t,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:s}=Yp.checkPathsSync(e,t,"move");return Yp.checkParentPathsSync(e,s,t,"move"),eS(QF.dirname(t)),rS(e,t,n)}function rS(e,t,r){if(r)return zp(t),Wp(e,t,r);if(Up.existsSync(t))throw new Error("dest already exists.");return Wp(e,t,r)}function Wp(e,t,r){try{Up.renameSync(e,t);}catch(n){if(n.code!=="EXDEV")throw n;return nS(e,t,r)}}function nS(e,t,r){return XF(e,t,{overwrite:r,errorOnExist:!0}),zp(e)}Hp.exports=tS;});var Jp=B((wb,Gp)=>{Gp.exports={moveSync:Vp()};});var em=B((vb,Xp)=>{var iS=$e(),sS=U("path"),oS=Ra().copy,Qp=Vn().remove,aS=st().mkdirp,uS=xt().pathExists,Zp=qn();function cS(e,t,r,n){typeof r=="function"&&(n=r,r={});let s=r.overwrite||r.clobber||!1;Zp.checkPaths(e,t,"move",(o,u)=>{if(o)return n(o);let{srcStat:c}=u;Zp.checkParentPaths(e,c,t,"move",d=>{if(d)return n(d);aS(sS.dirname(t),g=>g?n(g):lS(e,t,s,n));});});}function lS(e,t,r,n){if(r)return Qp(t,s=>s?n(s):Kp(e,t,r,n));uS(t,(s,o)=>s?n(s):o?n(new Error("dest already exists.")):Kp(e,t,r,n));}function Kp(e,t,r,n){iS.rename(e,t,s=>s?s.code!=="EXDEV"?n(s):fS(e,t,r,n):n());}function fS(e,t,r,n){oS(e,t,{overwrite:r,errorOnExist:!0},o=>o?n(o):Qp(e,n));}Xp.exports=cS;});var rm=B((Eb,tm)=>{var dS=Qe().fromCallback;tm.exports={move:dS(em())};});var om=B((_b,sm)=>{var hS=Qe().fromCallback,Zn=$e(),nm=U("path"),im=st(),pS=xt().pathExists;function mS(e,t,r,n){typeof r=="function"&&(n=r,r="utf8");let s=nm.dirname(e);pS(s,(o,u)=>{if(o)return n(o);if(u)return Zn.writeFile(e,t,r,n);im.mkdirs(s,c=>{if(c)return n(c);Zn.writeFile(e,t,r,n);});});}function gS(e,...t){let r=nm.dirname(e);if(Zn.existsSync(r))return Zn.writeFileSync(e,...t);im.mkdirsSync(r),Zn.writeFileSync(e,...t);}sm.exports={outputFile:hS(mS),outputFileSync:gS};});var Ya=B((Fb,qa)=>{qa.exports=Object.assign({},Sa(),ka(),Ra(),sp(),xp(),qp(),st(),Jp(),rm(),om(),xt(),Vn());var am=U("fs");Object.getOwnPropertyDescriptor(am,"promises")&&Object.defineProperty(qa.exports,"promises",{get(){return am.promises}});});var cm=B((Sb,um)=>{um.exports=()=>new Date;});var fm=B((Cb,lm)=>{var DS=qe()("streamroller:fileNameFormatter"),yS=U("path"),wS=".gz",vS=".";lm.exports=({file:e,keepFileExt:t,needsIndex:r,alwaysIncludeDate:n,compress:s,fileNameSep:o})=>{let u=o||vS,c=yS.join(e.dir,e.name),d=F=>F+e.ext,g=(F,C,_)=>(r||!_)&&C?F+u+C:F,m=(F,C,_)=>(C>0||n)&&_?F+u+_:F,D=(F,C)=>C&&s?F+wS:F,y=t?[m,g,d,D]:[d,m,g,D];return ({date:F,index:C})=>(DS(`_formatFileName: date=${F}, index=${C}`),y.reduce((_,j)=>j(_,C,F),c))};});var mm=B((bb,pm)=>{var _r=qe()("streamroller:fileNameParser"),dm=".gz",hm=rs(),ES=".";pm.exports=({file:e,keepFileExt:t,pattern:r,fileNameSep:n})=>{let s=n||ES,o=(y,F)=>y.endsWith(dm)?(_r("it is gzipped"),F.isCompressed=!0,y.slice(0,-1*dm.length)):y,u="__NOT_MATCHING__",D=[o,t?y=>y.startsWith(e.name)&&y.endsWith(e.ext)?(_r("it starts and ends with the right things"),y.slice(e.name.length+1,-1*e.ext.length)):u:y=>y.startsWith(e.base)?(_r("it starts with the right things"),y.slice(e.base.length+1)):u,r?(y,F)=>{let C=y.split(s),_=C[C.length-1];_r("items: ",C,", indexStr: ",_);let j=y;_!==void 0&&_.match(/^\d+$/)?(j=y.slice(0,-1*(_.length+1)),_r(`dateStr is ${j}`),r&&!j&&(j=_,_="0")):_="0";try{let $=hm.parse(r,j,new Date(0,0));return hm.asString(r,$)!==j?y:(F.index=parseInt(_,10),F.date=j,F.timestamp=$.getTime(),"")}catch($){return _r(`Problem parsing ${j} as ${r}, error was: `,$),y}}:(y,F)=>y.match(/^\d+$/)?(_r("it has an index"),F.index=parseInt(y,10),""):y];return y=>{let F={filename:y,index:0,isCompressed:!1};return D.reduce((_,j)=>j(_,F),y)?null:F}};});var Dm=B((Ob,gm)=>{var et=qe()("streamroller:moveAndMaybeCompressFile"),Ht=Ya(),_S=U("zlib"),FS=function(e){let t={mode:parseInt("0600",8),compress:!1},r=Object.assign({},t,e);return et(`_parseOption: moveAndMaybeCompressFile called with option=${JSON.stringify(r)}`),r},SS=async(e,t,r)=>{if(r=FS(r),e===t){et("moveAndMaybeCompressFile: source and target are the same, not doing anything");return}if(await Ht.pathExists(e))if(et(`moveAndMaybeCompressFile: moving file from ${e} to ${t} ${r.compress?"with":"without"} compress`),r.compress)await new Promise((n,s)=>{let o=!1,u=Ht.createWriteStream(t,{mode:r.mode,flags:"wx"}).on("open",()=>{o=!0;let c=Ht.createReadStream(e).on("open",()=>{c.pipe(_S.createGzip()).pipe(u);}).on("error",d=>{et(`moveAndMaybeCompressFile: error reading ${e}`,d),u.destroy(d);});}).on("finish",()=>{et(`moveAndMaybeCompressFile: finished compressing ${t}, deleting ${e}`),Ht.unlink(e).then(n).catch(c=>{et(`moveAndMaybeCompressFile: error deleting ${e}, truncating instead`,c),Ht.truncate(e).then(n).catch(d=>{et(`moveAndMaybeCompressFile: error truncating ${e}`,d),s(d);});});}).on("error",c=>{o?(et(`moveAndMaybeCompressFile: error writing ${t}, deleting`,c),Ht.unlink(t).then(()=>{s(c);}).catch(d=>{et(`moveAndMaybeCompressFile: error deleting ${t}`,d),s(d);})):(et(`moveAndMaybeCompressFile: error creating ${t}`,c),s(c));});}).catch(()=>{});else {et(`moveAndMaybeCompressFile: renaming ${e} to ${t}`);try{await Ht.move(e,t,{overwrite:!0});}catch(n){if(et(`moveAndMaybeCompressFile: error renaming ${e} to ${t}`,n),n.code!=="ENOENT"){et("moveAndMaybeCompressFile: trying copy+truncate instead");try{await Ht.copy(e,t,{overwrite:!0}),await Ht.truncate(e);}catch(s){et("moveAndMaybeCompressFile: error copy+truncate",s);}}}}};gm.exports=SS;});var Es=B((xb,ym)=>{var ot=qe()("streamroller:RollingFileWriteStream"),Sr=Ya(),Fr=U("path"),CS=U("os"),ws=cm(),vs=rs(),{Writable:bS}=U("stream"),OS=fm(),xS=mm(),AS=Dm(),MS=e=>(ot(`deleteFiles: files to delete: ${e}`),Promise.all(e.map(t=>Sr.unlink(t).catch(r=>{ot(`deleteFiles: error when unlinking ${t}, ignoring. Error was ${r}`);})))),Wa=class extends bS{constructor(t,r){if(ot(`constructor: creating RollingFileWriteStream. path=${t}`),typeof t!="string"||t.length===0)throw new Error(`Invalid filename: ${t}`);if(t.endsWith(Fr.sep))throw new Error(`Filename is a directory: ${t}`);t.indexOf(`~${Fr.sep}`)===0&&(t=t.replace("~",CS.homedir())),super(r),this.options=this._parseOption(r),this.fileObject=Fr.parse(t),this.fileObject.dir===""&&(this.fileObject=Fr.parse(Fr.join(process.cwd(),t))),this.fileFormatter=OS({file:this.fileObject,alwaysIncludeDate:this.options.alwaysIncludePattern,needsIndex:this.options.maxSize 0`);if(n.numBackups||n.numBackups===0){if(n.numBackups<0)throw new Error(`options.numBackups (${n.numBackups}) should be >= 0`);if(n.numBackups>=Number.MAX_SAFE_INTEGER)throw new Error(`options.numBackups (${n.numBackups}) should be < Number.MAX_SAFE_INTEGER`);n.numToKeep=n.numBackups+1;}else if(n.numToKeep<=0)throw new Error(`options.numToKeep (${n.numToKeep}) should be > 0`);return ot(`_parseOption: creating stream with option=${JSON.stringify(n)}`),n}_final(t){this.currentFileStream.end("",this.options.encoding,t);}_write(t,r,n){this._shouldRoll().then(()=>{ot(`_write: writing chunk. file=${this.currentFileStream.path} state=${JSON.stringify(this.state)} chunk=${t}`),this.currentFileStream.write(t,r,s=>{this.state.currentSize+=t.length,n(s);});});}async _shouldRoll(){(this._dateChanged()||this._tooBig())&&(ot(`_shouldRoll: rolling because dateChanged? ${this._dateChanged()} or tooBig? ${this._tooBig()}`),await this._roll());}_dateChanged(){return this.state.currentDate&&this.state.currentDate!==vs(this.options.pattern,ws())}_tooBig(){return this.state.currentSize>=this.options.maxSize}_roll(){return ot("_roll: closing the current stream"),new Promise((t,r)=>{this.currentFileStream.end("",this.options.encoding,()=>{this._moveOldFiles().then(t).catch(r);});})}async _moveOldFiles(){let t=await this._getExistingFiles(),r=this.state.currentDate?t.filter(n=>n.date===this.state.currentDate):t;for(let n=r.length;n>=0;n--){ot(`_moveOldFiles: i = ${n}`);let s=this.fileFormatter({date:this.state.currentDate,index:n}),o=this.fileFormatter({date:this.state.currentDate,index:n+1}),u={compress:this.options.compress&&n===0,mode:this.options.mode};await AS(s,o,u);}this.state.currentSize=0,this.state.currentDate=this.state.currentDate?vs(this.options.pattern,ws()):null,ot(`_moveOldFiles: finished rolling files. state=${JSON.stringify(this.state)}`),this._renewWriteStream(),await new Promise((n,s)=>{this.currentFileStream.write("","utf8",()=>{this._clean().then(n).catch(s);});});}async _getExistingFiles(){let t=await Sr.readdir(this.fileObject.dir).catch(()=>[]);ot(`_getExistingFiles: files=${t}`);let r=t.map(s=>this.fileNameParser(s)).filter(s=>s),n=s=>(s.timestamp?s.timestamp:ws().getTime())-s.index;return r.sort((s,o)=>n(s)-n(o)),r}_renewWriteStream(){let t=this.fileFormatter({date:this.state.currentDate,index:0}),r=o=>{try{return Sr.mkdirSync(o,{recursive:!0})}catch(u){if(u.code==="ENOENT")return r(Fr.dirname(o)),r(o);if(u.code!=="EEXIST"&&u.code!=="EROFS")throw u;try{if(Sr.statSync(o).isDirectory())return o;throw u}catch{throw u}}};r(this.fileObject.dir);let n={flags:this.options.flags,encoding:this.options.encoding,mode:this.options.mode},s=function(o,u,c){return o[c]=o[u],delete o[u],o};Sr.appendFileSync(t,"",s({...n},"flags","flag")),this.currentFileStream=Sr.createWriteStream(t,n),this.currentFileStream.on("error",o=>{this.emit("error",o);});}async _clean(){let t=await this._getExistingFiles();if(ot(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${t.length}`),ot("_clean: existing files are: ",t),this._tooManyFiles(t.length)){let r=t.slice(0,t.length-this.options.numToKeep).map(n=>Fr.format({dir:this.fileObject.dir,base:n.filename}));await MS(r);}}_tooManyFiles(t){return this.options.numToKeep>0&&t>this.options.numToKeep}};ym.exports=Wa;});var vm=B((Ab,wm)=>{var TS=Es(),Ua=class extends TS{constructor(t,r,n,s){s||(s={}),r&&(s.maxSize=r),!s.numBackups&&s.numBackups!==0&&(!n&&n!==0&&(n=1),s.numBackups=n),super(t,s),this.backups=s.numBackups,this.size=this.options.maxSize;}get theStream(){return this.currentFileStream}};wm.exports=Ua;});var _m=B((Mb,Em)=>{var jS=Es(),za=class extends jS{constructor(t,r,n){r&&typeof r=="object"&&(n=r,r=null),n||(n={}),r||(r="yyyy-MM-dd"),n.pattern=r,!n.numBackups&&n.numBackups!==0?(!n.daysToKeep&&n.daysToKeep!==0?n.daysToKeep=1:process.emitWarning("options.daysToKeep is deprecated due to the confusion it causes when used together with file size rolling. Please use options.numBackups instead.","DeprecationWarning","streamroller-DEP0001"),n.numBackups=n.daysToKeep):n.daysToKeep=n.numBackups,super(t,n),this.mode=this.options.mode;}get theStream(){return this.currentFileStream}};Em.exports=za;});var Ha=B((Tb,Fm)=>{Fm.exports={RollingFileWriteStream:Es(),RollingFileStream:vm(),DateRollingFileStream:_m()};});var xm=B((jb,Om)=>{var Sm=qe()("log4js:file"),Va=U("path"),IS=Ha(),bm=U("os"),NS=bm.EOL,_s=!1,Fs=new Set;function Cm(){Fs.forEach(e=>{e.sighupHandler();});}function LS(e,t,r,n,s,o){if(typeof e!="string"||e.length===0)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Va.sep))throw new Error(`Filename is a directory: ${e}`);e.indexOf(`~${Va.sep}`)===0&&(e=e.replace("~",bm.homedir())),e=Va.normalize(e),n=!n&&n!==0?5:n,Sm("Creating file appender (",e,", ",r,", ",n,", ",s,", ",o,")");function u(g,m,D,y){let F=new IS.RollingFileStream(g,m,D,y);return F.on("error",C=>{console.error("log4js.fileAppender - Writing to file %s, error happened ",g,C);}),F.on("drain",()=>{process.emit("log4js:pause",!1);}),F}let c=u(e,r,n,s),d=function(g){if(c.writable){if(s.removeColor===!0){let m=/\x1b[[0-9;]*m/g;g.data=g.data.map(D=>typeof D=="string"?D.replace(m,""):D);}c.write(t(g,o)+NS,"utf8")||process.emit("log4js:pause",!0);}};return d.reopen=function(){c.end(()=>{c=u(e,r,n,s);});},d.sighupHandler=function(){Sm("SIGHUP handler called."),d.reopen();},d.shutdown=function(g){Fs.delete(d),Fs.size===0&&_s&&(process.removeListener("SIGHUP",Cm),_s=!1),c.end("","utf-8",g);},Fs.add(d),_s||(process.on("SIGHUP",Cm),_s=!0),d}function $S(e,t){let r=t.basicLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),e.mode=e.mode||384,LS(e.filename,r,e.maxLogSize,e.backups,e,e.timezoneOffset)}Om.exports.configure=$S;});var Mm=B((Ib,Am)=>{var kS=Ha(),PS=U("os"),RS=PS.EOL;function BS(e,t,r){let n=new kS.DateRollingFileStream(e,t,r);return n.on("error",s=>{console.error("log4js.dateFileAppender - Writing to file %s, error happened ",e,s);}),n.on("drain",()=>{process.emit("log4js:pause",!1);}),n}function qS(e,t,r,n,s){n.maxSize=n.maxLogSize;let o=BS(e,t,n),u=function(c){o.writable&&(o.write(r(c,s)+RS,"utf8")||process.emit("log4js:pause",!0));};return u.shutdown=function(c){o.end("","utf-8",c);},u}function YS(e,t){let r=t.basicLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),e.alwaysIncludePattern||(e.alwaysIncludePattern=!1),e.mode=e.mode||384,qS(e.filename,e.pattern,r,e,e.timezoneOffset)}Am.exports.configure=YS;});var Nm=B((Nb,Im)=>{var Vt=qe()("log4js:fileSync"),Mt=U("path"),At=U("fs"),Tm=U("os"),WS=Tm.EOL;function jm(e,t){let r=n=>{try{return At.mkdirSync(n,{recursive:!0})}catch(s){if(s.code==="ENOENT")return r(Mt.dirname(n)),r(n);if(s.code!=="EEXIST"&&s.code!=="EROFS")throw s;try{if(At.statSync(n).isDirectory())return n;throw s}catch{throw s}}};r(Mt.dirname(e)),At.appendFileSync(e,"",{mode:t.mode,flag:t.flags});}var Ga=class{constructor(t,r,n,s){if(Vt("In RollingFileStream"),r<0)throw new Error(`maxLogSize (${r}) should be > 0`);this.filename=t,this.size=r,this.backups=n,this.options=s,this.currentSize=0;function o(u){let c=0;try{c=At.statSync(u).size;}catch{jm(u,s);}return c}this.currentSize=o(this.filename);}shouldRoll(){return Vt("should roll with current size %d, and max size %d",this.currentSize,this.size),this.currentSize>=this.size}roll(t){let r=this,n=new RegExp(`^${Mt.basename(t)}`);function s(g){return n.test(g)}function o(g){return parseInt(g.slice(`${Mt.basename(t)}.`.length),10)||0}function u(g,m){return o(g)-o(m)}function c(g){let m=o(g);if(Vt(`Index of ${g} is ${m}`),r.backups===0)At.truncateSync(t,0);else if(m ${t}.${m+1}`),At.renameSync(Mt.join(Mt.dirname(t),g),`${t}.${m+1}`);}}function d(){Vt("Renaming the old files"),At.readdirSync(Mt.dirname(t)).filter(s).sort(u).reverse().forEach(c);}Vt("Rolling, rolling, rolling"),d();}write(t,r){let n=this;function s(){Vt("writing the chunk to the file"),n.currentSize+=t.length,At.appendFileSync(n.filename,t);}Vt("in write"),this.shouldRoll()&&(this.currentSize=0,this.roll(this.filename)),s();}};function US(e,t,r,n,s,o){if(typeof e!="string"||e.length===0)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Mt.sep))throw new Error(`Filename is a directory: ${e}`);e.indexOf(`~${Mt.sep}`)===0&&(e=e.replace("~",Tm.homedir())),e=Mt.normalize(e),n=!n&&n!==0?5:n,Vt("Creating fileSync appender (",e,", ",r,", ",n,", ",s,", ",o,")");function u(d,g,m){let D;return g?D=new Ga(d,g,m,s):D=(y=>(jm(y,s),{write(F){At.appendFileSync(y,F);}}))(d),D}let c=u(e,r,n);return d=>{c.write(t(d,o)+WS);}}function zS(e,t){let r=t.basicLayout;e.layout&&(r=t.layout(e.layout.type,e.layout));let n={flags:e.flags||"a",encoding:e.encoding||"utf8",mode:e.mode||384};return US(e.filename,r,e.maxLogSize,e.backups,n,e.timezoneOffset)}Im.exports.configure=zS;});var $m=B((Lb,Lm)=>{var Tt=qe()("log4js:tcp"),HS=U("net");function VS(e,t){let r=!1,n=[],s,o=3,u="__LOG4JS__";function c(D){Tt("Writing log event to socket"),r=s.write(`${t(D)}${u}`,"utf8");}function d(){let D;for(Tt("emptying buffer");D=n.shift();)c(D);}function g(){Tt(`appender creating socket to ${e.host||"localhost"}:${e.port||5e3}`),u=`${e.endMsg||"__LOG4JS__"}`,s=HS.createConnection(e.port||5e3,e.host||"localhost"),s.on("connect",()=>{Tt("socket connected"),d(),r=!0;}),s.on("drain",()=>{Tt("drain event received, emptying buffer"),r=!0,d();}),s.on("timeout",s.end.bind(s)),s.on("error",D=>{Tt("connection error",D),r=!1,d();}),s.on("close",g);}g();function m(D){r?c(D):(Tt("buffering log event because it cannot write at the moment"),n.push(D));}return m.shutdown=function(D){Tt("shutdown called"),n.length&&o?(Tt("buffer has items, waiting 100ms to empty"),o-=1,setTimeout(()=>{m.shutdown(D);},100)):(s.removeAllListeners("close"),s.end(D));},m}function GS(e,t){Tt(`configure with config = ${e}`);let r=function(n){return n.serialise()};return e.layout&&(r=t.layout(e.layout.type,e.layout)),VS(e,r)}Lm.exports.configure=GS;});var Ka=B(($b,Za)=>{var Ja=U("path"),ar=qe()("log4js:appenders"),gt=gr(),km=os(),JS=yr(),ZS=da(),KS=Nd(),St=new Map;St.set("console",$d());St.set("stdout",Pd());St.set("stderr",Bd());St.set("logLevelFilter",Yd());St.set("categoryFilter",zd());St.set("noLogFilter",Gd());St.set("file",xm());St.set("dateFile",Mm());St.set("fileSync",Nm());St.set("tcp",$m());var Kn=new Map,Ss=(e,t)=>{let r;try{let n=`${e}.cjs`;r=U.resolve(n),ar("Loading module from ",n);}catch{r=e,ar("Loading module from ",e);}try{return U(r)}catch(n){gt.throwExceptionIf(t,n.code!=="MODULE_NOT_FOUND",`appender "${e}" could not be loaded (error was: ${n})`);return}},QS=(e,t)=>St.get(e)||Ss(`./${e}`,t)||Ss(e,t)||U.main&&U.main.filename&&Ss(Ja.join(Ja.dirname(U.main.filename),e),t)||Ss(Ja.join(process.cwd(),e),t),Cs=new Set,Pm=(e,t)=>{if(Kn.has(e))return Kn.get(e);if(!t.appenders[e])return !1;if(Cs.has(e))throw new Error(`Dependency loop detected for appender ${e}.`);Cs.add(e),ar(`Creating appender ${e}`);let r=XS(e,t);return Cs.delete(e),Kn.set(e,r),r},XS=(e,t)=>{let r=t.appenders[e],n=r.type.configure?r.type:QS(r.type,t);return gt.throwExceptionIf(t,gt.not(n),`appender "${e}" is not valid (type "${r.type}" could not be found)`),n.appender&&(process.emitWarning(`Appender ${r.type} exports an appender function.`,"DeprecationWarning","log4js-node-DEP0001"),ar("[log4js-node-DEP0001]",`DEPRECATION: Appender ${r.type} exports an appender function.`)),n.shutdown&&(process.emitWarning(`Appender ${r.type} exports a shutdown function.`,"DeprecationWarning","log4js-node-DEP0002"),ar("[log4js-node-DEP0002]",`DEPRECATION: Appender ${r.type} exports a shutdown function.`)),ar(`${e}: clustering.isMaster ? ${km.isMaster()}`),ar(`${e}: appenderModule is ${U("util").inspect(n)}`),km.onlyOnMaster(()=>(ar(`calling appenderModule.configure for ${e} / ${r.type}`),n.configure(KS.modifyConfig(r),ZS,s=>Pm(s,t),JS)),()=>{})},Rm=e=>{if(Kn.clear(),Cs.clear(),!e)return;let t=[];Object.values(e.categories).forEach(r=>{t.push(...r.appenders);}),Object.keys(e.appenders).forEach(r=>{(t.includes(r)||e.appenders[r].type==="tcp-server"||e.appenders[r].type==="multiprocess")&&Pm(r,e);});},Bm=()=>{Rm();};Bm();gt.addListener(e=>{gt.throwExceptionIf(e,gt.not(gt.anObject(e.appenders)),'must have a property "appenders" of type object.');let t=Object.keys(e.appenders);gt.throwExceptionIf(e,gt.not(t.length),"must define at least one appender."),t.forEach(r=>{gt.throwExceptionIf(e,gt.not(e.appenders[r].type),`appender "${r}" is not valid (must be an object with property "type")`);});});gt.addListener(Rm);Za.exports=Kn;Za.exports.init=Bm;});var eu=B((Pb,bs)=>{var Qn=qe()("log4js:categories"),je=gr(),Qa=yr(),qm=Ka(),ur=new Map;function Ym(e,t,r){if(t.inherit===!1)return;let n=r.lastIndexOf(".");if(n<0)return;let s=r.slice(0,n),o=e.categories[s];o||(o={inherit:!0,appenders:[]}),Ym(e,o,s),!e.categories[s]&&o.appenders&&o.appenders.length&&o.level&&(e.categories[s]=o),t.appenders=t.appenders||[],t.level=t.level||o.level,o.appenders.forEach(u=>{t.appenders.includes(u)||t.appenders.push(u);}),t.parent=o;}function e2(e){if(!e.categories)return;Object.keys(e.categories).forEach(r=>{let n=e.categories[r];Ym(e,n,r);});}je.addPreProcessingListener(e=>e2(e));je.addListener(e=>{je.throwExceptionIf(e,je.not(je.anObject(e.categories)),'must have a property "categories" of type object.');let t=Object.keys(e.categories);je.throwExceptionIf(e,je.not(t.length),"must define at least one category."),t.forEach(r=>{let n=e.categories[r];je.throwExceptionIf(e,[je.not(n.appenders),je.not(n.level)],`category "${r}" is not valid (must be an object with properties "appenders" and "level")`),je.throwExceptionIf(e,je.not(Array.isArray(n.appenders)),`category "${r}" is not valid (appenders must be an array of appender names)`),je.throwExceptionIf(e,je.not(n.appenders.length),`category "${r}" is not valid (appenders must contain at least one appender name)`),Object.prototype.hasOwnProperty.call(n,"enableCallStack")&&je.throwExceptionIf(e,typeof n.enableCallStack!="boolean",`category "${r}" is not valid (enableCallStack must be boolean type)`),n.appenders.forEach(s=>{je.throwExceptionIf(e,je.not(qm.get(s)),`category "${r}" is not valid (appender "${s}" is not defined)`);}),je.throwExceptionIf(e,je.not(Qa.getLevel(n.level)),`category "${r}" is not valid (level "${n.level}" not recognised; valid levels are ${Qa.levels.join(", ")})`);}),je.throwExceptionIf(e,je.not(e.categories.default),'must define a "default" category.');});var Xa=e=>{if(ur.clear(),!e)return;Object.keys(e.categories).forEach(r=>{let n=e.categories[r],s=[];n.appenders.forEach(o=>{s.push(qm.get(o)),Qn(`Creating category ${r}`),ur.set(r,{appenders:s,level:Qa.getLevel(n.level),enableCallStack:n.enableCallStack||!1});});});},Wm=()=>{Xa();};Wm();je.addListener(Xa);var on=e=>{if(Qn(`configForCategory: searching for config for ${e}`),ur.has(e))return Qn(`configForCategory: ${e} exists in config, returning it`),ur.get(e);let t;return e.indexOf(".")>0?(Qn(`configForCategory: ${e} has hierarchy, cloning from parents`),t={...on(e.slice(0,e.lastIndexOf(".")))}):(ur.has("default")||Xa({categories:{default:{appenders:["out"],level:"OFF"}}}),Qn("configForCategory: cloning default category"),t={...ur.get("default")}),ur.set(e,t),t},t2=e=>on(e).appenders,r2=e=>on(e).level,n2=(e,t)=>{on(e).level=t;},i2=e=>on(e).enableCallStack===!0,s2=(e,t)=>{on(e).enableCallStack=t;};bs.exports=ur;bs.exports=Object.assign(bs.exports,{appendersForCategory:t2,getLevelForCategory:r2,setLevelForCategory:n2,getEnableCallStackForCategory:i2,setEnableCallStackForCategory:s2,init:Wm});});var Zm=B((Rb,Jm)=>{var Um=qe()("log4js:logger"),o2=ma(),jt=yr(),a2=os(),Os=eu(),Hm=gr(),u2=/^(?:\s*)at (?:(.+) \()?(?:([^(]+?):(\d+):(\d+))\)?$/,tu=1,Vm=3;function zm(e,t=Vm+tu){try{let r=e.stack.split(` +`).slice(t);if(!r.length)return null;let n=u2.exec(r[0]);if(n&&n.length===5){let s="",o="",u="";return n[1]&&n[1]!==""&&([o,u]=n[1].replace(/[[\]]/g,"").split(" as "),u=u||"",o.includes(".")&&([s,o]=o.split("."))),{fileName:n[2],lineNumber:parseInt(n[3],10),columnNumber:parseInt(n[4],10),callStack:r.join(` +`),className:s,functionName:o,functionAlias:u,callerName:n[1]||""}}else console.error("log4js.logger - defaultParseCallStack error");}catch(r){console.error("log4js.logger - defaultParseCallStack error",r);}return null}var Xn=class{constructor(t){if(!t)throw new Error("No category provided.");this.category=t,this.context={},this.callStackSkipIndex=0,this.parseCallStack=zm,Um(`Logger created (${this.category}, ${this.level})`);}get level(){return jt.getLevel(Os.getLevelForCategory(this.category),jt.OFF)}set level(t){Os.setLevelForCategory(this.category,jt.getLevel(t,this.level));}get useCallStack(){return Os.getEnableCallStackForCategory(this.category)}set useCallStack(t){Os.setEnableCallStackForCategory(this.category,t===!0);}get callStackLinesToSkip(){return this.callStackSkipIndex}set callStackLinesToSkip(t){if(typeof t!="number")throw new TypeError("Must be a number");if(t<0)throw new RangeError("Must be >= 0");this.callStackSkipIndex=t;}log(t,...r){let n=jt.getLevel(t);n?this.isLevelEnabled(n)&&this._log(n,r):Hm.validIdentifier(t)&&r.length>0?(this.log(jt.WARN,"log4js:logger.log: valid log-level not found as first parameter given:",t),this.log(jt.INFO,`[${t}]`,...r)):this.log(jt.INFO,t,...r);}isLevelEnabled(t){return this.level.isLessThanOrEqualTo(t)}_log(t,r){Um(`sending log data (${t}) to appenders`);let n=r.find(u=>u instanceof Error),s;if(this.useCallStack){try{n&&(s=this.parseCallStack(n,this.callStackSkipIndex+tu));}catch{}s=s||this.parseCallStack(new Error,this.callStackSkipIndex+Vm+tu);}let o=new o2(this.category,t,r,this.context,s,n);a2.send(o);}addContext(t,r){this.context[t]=r;}removeContext(t){delete this.context[t];}clearContext(){this.context={};}setParseCallStackFunction(t){if(typeof t=="function")this.parseCallStack=t;else if(typeof t>"u")this.parseCallStack=zm;else throw new TypeError("Invalid type passed to setParseCallStackFunction")}};function Gm(e){let t=jt.getLevel(e),n=t.toString().toLowerCase().replace(/_([a-z])/g,o=>o[1].toUpperCase()),s=n[0].toUpperCase()+n.slice(1);Xn.prototype[`is${s}Enabled`]=function(){return this.isLevelEnabled(t)},Xn.prototype[n]=function(...o){this.log(t,...o);};}jt.levels.forEach(Gm);Hm.addListener(()=>{jt.levels.forEach(Gm);});Jm.exports=Xn;});var Xm=B((Bb,Qm)=>{var an=yr(),c2=':remote-addr - - ":method :url HTTP/:http-version" :status :content-length ":referrer" ":user-agent"';function l2(e){return e.originalUrl||e.url}function f2(e,t,r){let n=o=>{let u=o.concat();for(let c=0;cn.source?n.source:n);t=new RegExp(r.join("|"));}return t}function h2(e,t,r){let n=t;if(r){let s=r.find(o=>{let u=!1;return o.from&&o.to?u=e>=o.from&&e<=o.to:u=o.codes.indexOf(e)!==-1,u});s&&(n=an.getLevel(s.level,n));}return n}Qm.exports=function(t,r){typeof r=="string"||typeof r=="function"?r={format:r}:r=r||{};let n=t,s=an.getLevel(r.level,an.INFO),o=r.format||c2;return (u,c,d)=>{if(typeof u._logging<"u")return d();if(typeof r.nolog!="function"){let g=d2(r.nolog);if(g&&g.test(u.originalUrl))return d()}if(n.isLevelEnabled(s)||r.level==="auto"){let g=new Date,{writeHead:m}=c;u._logging=!0,c.writeHead=(F,C)=>{c.writeHead=m,c.writeHead(F,C),c.__statusCode=F,c.__headers=C||{};};let D=!1,y=()=>{if(D)return;if(D=!0,typeof r.nolog=="function"&&r.nolog(u,c)===!0){u._logging=!1;return}c.responseTime=new Date-g,c.statusCode&&r.level==="auto"&&(s=an.INFO,c.statusCode>=300&&(s=an.WARN),c.statusCode>=400&&(s=an.ERROR)),s=h2(c.statusCode,s,r.statusRules);let F=f2(u,c,r.tokens||[]);if(r.context&&n.addContext("res",c),typeof o=="function"){let C=o(u,c,_=>Km(_,F));C&&n.log(s,C);}else n.log(s,Km(o,F));r.context&&n.removeContext("res");};c.on("end",y),c.on("finish",y),c.on("error",y),c.on("close",y);}return d()}};});var ig=B((qb,ng)=>{var eg=qe()("log4js:recording"),xs=[];function p2(){return function(e){eg(`received logEvent, number of events now ${xs.length+1}`),eg("log event was ",e),xs.push(e);}}function tg(){return xs.slice()}function rg(){xs.length=0;}ng.exports={configure:p2,replay:tg,playback:tg,reset:rg,erase:rg};});var fg=B((Yb,lg)=>{var cr=qe()("log4js:main"),m2=U("fs"),g2=Gf()({proto:!0}),D2=gr(),y2=da(),w2=yr(),sg=Ka(),og=eu(),v2=Zm(),E2=os(),_2=Xm(),F2=ig(),un=!1;function S2(e){if(!un)return;cr("Received log event ",e),og.appendersForCategory(e.categoryName).forEach(r=>{r(e);});}function C2(e){cr(`Loading configuration from ${e}`);try{return JSON.parse(m2.readFileSync(e,"utf8"))}catch(t){throw new Error(`Problem reading config from file "${e}". Error was ${t.message}`,t)}}function ag(e){un&&ug();let t=e;return typeof t=="string"&&(t=C2(e)),cr(`Configuration is ${t}`),D2.configure(g2(t)),E2.onMessage(S2),un=!0,cg}function b2(){return un}function O2(){return F2}function ug(e=()=>{}){if(typeof e!="function")throw new TypeError("Invalid callback passed to shutdown");cr("Shutdown called. Disabling all log writing."),un=!1;let t=Array.from(sg.values());sg.init(),og.init();let r=t.reduce((u,c)=>c.shutdown?u+1:u,0);r===0&&(cr("No appenders with shutdown functions found."),e());let n=0,s;cr(`Found ${r} appenders with shutdown functions.`);function o(u){s=s||u,n+=1,cr(`Appender shutdowns complete: ${n} / ${r}`),n>=r&&(cr("All shutdown functions completed."),e(s));}t.filter(u=>u.shutdown).forEach(u=>u.shutdown(o));}function x2(e){return un||ag(process.env.LOG4JS_CONFIG||{appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"OFF"}}}),new v2(e||"default")}var cg={getLogger:x2,configure:ag,isConfigured:b2,shutdown:ug,connectLogger:_2,levels:w2,addLayout:y2.addLayout,recording:O2};lg.exports=cg;});var dg=Qs(Wu());var Lf=Qs($i());var Jr=class e{nconf=Lf.default;_rootPath;_devmode;_appVersion;_logLevel;_dateFormat;_logDateFormat;_logFilePath;_ipAddress;_port;_login;_password;_limitTime;_settingsFilePath;ratioEnabled=!1;ratioLimit=2;constructor(t){process.env.UV_THREADPOOL_SIZE=os$1.cpus().length.toString(),this._rootPath=t??e.getRootDir(),this.init(),this._login=this.getParam("login"),this._password=this.getParam("password"),this._devmode=this.getParam("node_env")==="development",this._appVersion=this.getParam("version"),this._logLevel=this._devmode?"trace":this.getParam("log_level"),this._dateFormat=this.getParam("date_format"),this._logDateFormat=this.getParam("log_date_format"),this._logFilePath=this.getParam("log_file_path"),this._ipAddress=this.getParam("ip_address"),this._port=Number(this.getParam("tcp_port")),this._limitTime=Number(this.getParam("limit_time")),this._settingsFilePath=this.getParam("settings_file_path"),this.setRatio(),this.check();}get rootPath(){return this._rootPath}get devmode(){return this._devmode}get appVersion(){return this._appVersion}get logLevel(){return this._logLevel}get dateFormat(){return this._dateFormat}get logDateFormat(){return this._logDateFormat}get logFilePath(){return this._logFilePath}get ipAddress(){return this._ipAddress}get port(){return this._port}get login(){return this._login}get password(){return this._password}get limitTime(){return this._limitTime}get settingsFilePath(){return this._settingsFilePath}init(){let t=path.normalize(`${this.rootPath}/config.json`);this.nconf.env(),this.nconf.file("config",t),this.nconf.file("package",path.normalize(`${this.rootPath}/package.json`)),this.nconf.defaults({node_env:"production",log_level:"info",log_file_path:"/var/log/transmission/torrentclear.log",date_format:"DD.MM.YYYY_HH:mm:ss",log_date_format:"dd.MM.yyyy_hh:mm:ss.SSS",ip_address:"127.0.0.1",tcp_port:"9091",limit_time:"604800",settings_file_path:"/etc/transmission-daemon/settings.json"}),this.nconf.load(),this.settingsFileExists();let r=path.normalize(this.getParam("settings_file_path"));this.nconf.file("transmission",r),this.nconf.load();}setRatio(){this.ratioEnabled=!!this.getParam("ratio-limit-enabled"),this.ratioEnabled&&(this.ratioLimit=Number(this.getParam("ratio-limit")));}check(){let t=this.getParam("login"),r=this.getParam("password");if(t===void 0||t===""||r===void 0||r==="")throw new Error("Login or password must be filled in config.json file or Environment")}settingsFileExists(){let t=path.normalize(this.getParam("settings_file_path"));if(!fs.existsSync(t)){let r=path.resolve(t);if(!fs.existsSync(r))throw new Error(`Transmission settings file not found on path ${t}`)}}static getRootDir(){let t=url.fileURLToPath(url.pathToFileURL(__filename).toString()),n=path.dirname(t);for(;!fs.existsSync(path.join(n,"package.json"));)n=path.join(n,"..");return path.normalize(n)}getParam(t){let r=this.nconf.get(t);return r===void 0&&(r=this.nconf.get(t.toUpperCase())),r}};var A2=Qs(fg());var As=class{log4js;_config;_logger;constructor(t){this.log4js=A2,this._config=new Jr(t),this.init(),this._logger=this.log4js.getLogger();}get logger(){return this._logger}get config(){return this._config}init(){let t={appenders:{console:{type:"console",layout:{type:"pattern",pattern:`[%d{${this.config.logDateFormat}}] : %[[%p]%] : %m`}},logFile:{type:"file",filename:this.config.logFilePath,maxLogSize:"10M",compress:!0,layout:{type:"pattern",pattern:`[%d{${this.config.logDateFormat}}] : [%p] : %m`}}},categories:{default:{appenders:this.config.devmode?["console"]:["console","logFile"],level:this.config.logLevel,enableCallStack:!!this.config.devmode}}};this.log4js.configure(t);}};var Ms=class{_config;_logger;_connect;regexSuccess=/success/i;regexTorrentInfo=/(?<=Name:\s)(.*?)(?=\s*Hash:)|(?<=State:\s)(.*?)(?=\s*Location:)|(?<=Location:\s)(.*?)(?=\s*Percent Done:)|(?<=Percent Done:\s)(.*?)%(?=\s*ETA:)|(?<=Ratio:\s)(.*?)(?=\s*Corrupt DL:)|(?<=Date finished:\s)(.*?)(?=\s*Date started:|$)/g;fileOrDirsState={FILE:1,DIR:2,NOTFOUND:3,UNKNOWN:4};_torrentInfo;_torrentSuccessCount=0;_torrentProcessCount=0;_torrentIDs=[];constructor(t){this._config=new Jr(t),this._logger=new As(t).logger,this._connect=this.connectCommandCreate(),this._torrentInfo={id:0,name:"",state:"",location:"",percent:0,ratio:0,dateDone:"",dateDifference:0};}get connect(){return this._connect}get config(){return this._config}get logger(){return this._logger}get torrentInfo(){return this._torrentInfo}set torrentInfo(t){this._torrentInfo=t;}get torrentSuccessCount(){return this._torrentSuccessCount}set torrentSuccessCount(t){this._torrentSuccessCount=t;}get torrentProcessCount(){return this._torrentProcessCount}set torrentProcessCount(t){this._torrentProcessCount=t;}get torrentIDs(){return this._torrentIDs}async main(){try{this.startInfo(),await this.getIDs(),await this.torrentsProcess(),this.endInfo();}catch(t){this.logger.error(t.message),this.endInfo(!0);}}startInfo(){this.logger.info("##############################################################################################"),this.logger.info(`transmission-torrentclear: "${this.config.appVersion}"`),this.logger.info("==============================================================================================");}endInfo(t=!1){this.logger.info("=============================================================================================="),t?this.logger.error("Failed to complete torrent verification process"):this.logger.info("Completing the torrent verification process"),this.logger.info(`############################################################################################## +`);}async getIDs(){try{let t=`${this.connect} --list`;this.logger.debug(`Run command: "${t}"`);let n=(await this.command(t)).toString().match(/^\s+(\d+)\s.*?$/gim);if(n===null||n.length<1){this.logger.info("Torrents not found");return}this.logger.debug("Torrents list:");for(let s of n){this.logger.debug(`torrent: "${s.trim()}"`);let o=s.trim().match(/^(\d+).+$/i);if(o!==null){let u=o[1];this.logger.debug(`ID found: "${u}"`),this.torrentIDs.push(Number(u));}}this.torrentIDs.length>0&&this.logger.info(`IDs found: ${this.torrentIDs.join(", ")}`),this.torrentProcessCount=this.torrentIDs.length;}catch(t){throw this.logger.trace(t),t}}async torrentsProcess(){try{if(this.torrentIDs.length>0)for(let t of this.torrentIDs)this.logger.info("=============================================================================================="),this.logger.info(`TORRENT ID: "${t}" START PROCESS ...`),await this.getTorrentInfo(t),this.torrentInfo.percent===100?this.checkRatio(this.torrentInfo.ratio)?(this.logger.debug("==> ACTION: Torrent delete on Ratio Limit"),await this.clearTorrent(),this.torrentSuccessCount++,this.logger.info(`Stopping and deleting a torrent "${this.torrentInfo.name}" by ratio limit completed successfully`)):this.checkDateDifference(this.torrentInfo.dateDifference)?(this.logger.debug("==> ACTION: Torrent delete on Date Difference"),await this.clearTorrent(),this.torrentSuccessCount++,this.logger.info(`Stopping and deleting a torrent "${this.torrentInfo.name}" by datetime limit completed successfully`)):this.logger.info("NO ACTION NEEDED (DATE AND RATIO)"):this.logger.info("NO ACTION NEEDED (< 100)");}catch(t){throw this.logger.trace(t),t}}async clearTorrent(){try{let t=path.normalize(`${this.torrentInfo.location}/${this.torrentInfo.name}`);this.logger.debug(`normalized torrentPath: "${t}"`);let r=await this.isFileOrDirectoryOrUnknown(t);r===this.fileOrDirsState.FILE?(this.logger.info(`Torrent: "${this.torrentInfo.name}" is a FILE`),await this.torrentStop(),await this.torrentRemove()):r===this.fileOrDirsState.DIR?(this.logger.info(`Torrent: "${this.torrentInfo.name}" is a DIRECTORY`),await this.torrentStop(),await this.torrentRemoveAndDelete()):r===this.fileOrDirsState.NOTFOUND?(this.logger.warn(`Torrent: "${this.torrentInfo.name}" FILE NOT FOUND`),await this.torrentStop(),await this.torrentRemove()):this.logger.debug(`Torrent: "${this.torrentInfo.name}" is neither a file or a directory`);}catch(t){throw this.logger.trace(t),t}}async torrentStop(){try{let t=`${this.connect} --torrent ${this.torrentInfo.id} --stop`;this.logger.debug(`Stop torrent: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`),this.logger.debug(`Run command: "${t}"`);let r=await this.command(t);if(r=r.replace(/(\r\n|\n|\r)/gm,""),this.logger.debug(`execResultStop: ${r}`),!this.regexSuccess.test(r))throw new Error(`Failed to stop torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${r}`)}catch(t){throw this.logger.trace(t),t}}async torrentRemove(){try{let t=`${this.connect} --torrent ${this.torrentInfo.id} --remove`;this.logger.debug(`Remove torrent without deleting file: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`),this.logger.debug(`Run command: "${t}"`);let r=await this.command(t);if(r=r.replace(/(\r\n|\n|\r)/gm,""),this.logger.debug(`execResultRemove: ${r}`),!this.regexSuccess.test(r))throw new Error(`Failed to remove (no del) torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${r}`)}catch(t){throw this.logger.trace(t),t}}async torrentRemoveAndDelete(){try{let t=`${this.connect} --torrent ${this.torrentInfo.id} --remove-and-delete`;this.logger.debug(`Remove torrent with deleting file: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`),this.logger.debug(`Run command: "${t}"`);let r=await this.command(t);if(r=r.replace(/(\r\n|\n|\r)/gm,""),this.logger.debug(`execResultRemoveAndDelete: ${r}`),!this.regexSuccess.test(r))throw new Error(`Failed to remove and delete torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${r}`)}catch(t){throw this.logger.trace(t),t}}checkRatio(t){return t>=this.config.ratioLimit?(this.logger.info(`Torrent has reached the Ratio limit: "${t}" >= "${this.config.ratioLimit}"`),!0):!1}checkDateDifference(t){return t>=this.config.limitTime?(this.logger.info(`Torrent has reached the Date difference limit: "${t}" >= "${this.config.limitTime}"`),!0):!1}async getTorrentInfo(t){try{let r=`${this.connect} --torrent ${t} --info`;this.logger.debug(`Run command: "${r}"`);let s=(await this.command(r)).toString().matchAll(this.regexTorrentInfo),o=Array.from(s);if(o.length<1)throw new Error("Torrent info data is EMPTY");let u=o[0][1];if(u===void 0||u==="")throw new Error(`Torrent name not found in torrent info: "${t}"`);let c=o[1][2];if(c===void 0||c==="")throw new Error(`Torrent state not found in torrent info: "${t}"`);let d=o[2][3];if(d===void 0||d==="")throw new Error(`Torrent location not found in torrent info: "${t}"`);let g=o[3][4];if(g===void 0||g==="")throw new Error(`Torrent percent not found in torrent info: "${t}"`);let m=o[4][5];if(m===void 0||m==="")throw new Error(`Torrent ratio not found in torrent info: "${t}"`);let D=o[5][6];if(D===void 0||D==="")throw new Error(`Torrent date done not found in torrent info: "${t}"`);let y=Date.now(),F=Date.parse(D.trim());this.torrentInfo={id:Number(t),name:u.trim(),state:c.trim(),location:d.trim(),percent:Number(g.trim()),ratio:Number(m.trim()),dateDone:this.dateFormat(F),dateDifference:Math.round((y-F)/1e3)},this.logger.debug(`Torrent ID "${this.torrentInfo.id}" info:`),this.logger.debug(` Name: "${this.torrentInfo.name}"`),this.logger.debug(` State: "${this.torrentInfo.state}"`),this.logger.debug(` Location: "${this.torrentInfo.location}"`),this.logger.debug(` Percent Done: "${this.torrentInfo.percent}%"`),this.logger.debug(` Ratio: "${this.torrentInfo.ratio}" | limit: "${this.config.ratioLimit}"`),this.logger.debug(` Date finished: "${this.torrentInfo.dateDone}"`),this.logger.debug(` Date Difference: "${this.torrentInfo.dateDifference}" | limit: "${this.config.limitTime}"`);}catch(r){throw this.logger.trace(r),r}}connectCommandCreate(){return `transmission-remote ${this.config.ipAddress}:${this.config.port} --auth ${this.config.login}:${this.config.password}`}dateFormat(t){let r=new Date(t);return (0, dg.default)(r).format(this.config.dateFormat)}async command(t){try{return child_process.execSync(t,{timeout:2e3,encoding:"utf8"})}catch(r){throw this.logger.trace(r),r}}async isFileOrDirectoryOrUnknown(t){try{let r=fs.lstatSync(t),n=r.isFile(),s=r.isDirectory();return n?this.fileOrDirsState.FILE:s?this.fileOrDirsState.DIR:this.fileOrDirsState.UNKNOWN}catch(r){if(r.code==="ENOENT")return this.fileOrDirsState.NOTFOUND;throw this.logger.trace(r),r}}};new Ms().main(); +/*! Bundled license information: + +moment/moment.js: + (*! moment.js *) + (*! version : 2.30.1 *) + (*! authors : Tim Wood, Iskren Chernev, Moment.js contributors *) + (*! license : MIT *) + (*! momentjs.com *) +*/ \ No newline at end of file diff --git a/dist/licenses.txt b/dist/licenses.txt deleted file mode 100644 index 04099a8..0000000 --- a/dist/licenses.txt +++ /dev/null @@ -1,616 +0,0 @@ -ansi-regex -MIT -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -ansi-styles -MIT -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -async -MIT -Copyright (c) 2010-2018 Caolan McMahon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -cliui -ISC -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -color-convert -MIT -Copyright (c) 2011-2016 Heather Arthur - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -color-name -MIT -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -date-format -MIT -The MIT License (MIT) - -Copyright (c) 2013 Gareth Jones - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -debug -MIT -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -emoji-regex -MIT -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -escalade -MIT -MIT License - -Copyright (c) Luke Edwards (lukeed.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -flatted -ISC -ISC License - -Copyright (c) 2018-2020, Andrea Giammarchi, @WebReflection - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - -fs-extra -MIT -(The MIT License) - -Copyright (c) 2011-2017 JP Richardson - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files -(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -get-caller-file -ISC -ISC License (ISC) -Copyright 2018 Stefan Penner - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -graceful-fs -ISC -The ISC License - -Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -has-flag -MIT -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -ini -ISC -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -is-fullwidth-code-point -MIT -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -jsonfile -MIT -(The MIT License) - -Copyright (c) 2012-2015, JP Richardson - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files -(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -log4js -Apache-2.0 -Copyright 2015 Gareth Jones (with contributions from many other people) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -moment -MIT -Copyright (c) JS Foundation and other contributors - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -ms -MIT -The MIT License (MIT) - -Copyright (c) 2016 Zeit, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -nconf -MIT -Copyright (C) 2011 Charlie Robbins and the Contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -require-directory -MIT -The MIT License (MIT) - -Copyright (c) 2011 Troy Goode - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -rfdc -MIT -Copyright 2019 "David Mark Clements " - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and -to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - - -secure-keys -MIT - -streamroller -MIT -The MIT License (MIT) - -Copyright (c) 2013 Gareth Jones - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -string-width -MIT -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -strip-ansi -MIT -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -supports-color -MIT -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -universalify -MIT -(The MIT License) - -Copyright (c) 2017, Ryan Zimmerman - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the 'Software'), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -wrap-ansi -MIT -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -y18n -ISC -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - - -yargs -MIT -MIT License - -Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -yargs-parser -ISC -Copyright (c) 2016, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/package.json b/package.json index 27ba52d..02c0d7f 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,7 @@ "format:write": "pnpm prettier --write .", "format:check": "pnpm prettier --check .", "lint": "pnpm eslint . -c ./.github/linters/.eslintrc.yml", - "package": "pnpm ncc build src/index.ts -o dist --license licenses.txt", - "package:watch": "pnpm run package -- --watch", + "package": "pnpm tsup", "all": "pnpm run format:write && pnpm run lint && pnpm run ci-test && pnpm run coverage && pnpm run package", "check-lib": "pnpm outdated" }, @@ -40,20 +39,20 @@ "@types/node": "22.9.0", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", - "@vercel/ncc": "0.38.2", "eslint": "8.57.1", "eslint-plugin-github": "5.0.2", "eslint-plugin-jest": "28.9.0", - "eslint-plugin-jsonc": "2.18.0", + "eslint-plugin-jsonc": "2.18.2", "eslint-plugin-prettier": "5.2.1", "jest": "29.7.0", + "log4js": "6.9.1", "make-coverage-badge": "1.2.0", + "moment": "2.30.1", + "nconf": "0.12.1", "prettier": "3.3.3", "prettier-eslint": "16.3.0", "ts-jest": "29.2.5", - "log4js": "6.9.1", - "moment": "2.30.1", - "nconf": "0.12.1", + "tsup": "8.3.5", "typescript": "5.6.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2c1e880..7216c02 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,9 +26,6 @@ importers: '@typescript-eslint/parser': specifier: 7.18.0 version: 7.18.0(eslint@8.57.1)(typescript@5.6.3) - '@vercel/ncc': - specifier: 0.38.2 - version: 0.38.2 eslint: specifier: 8.57.1 version: 8.57.1 @@ -39,8 +36,8 @@ importers: specifier: 28.9.0 version: 28.9.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3) eslint-plugin-jsonc: - specifier: 2.18.0 - version: 2.18.0(eslint@8.57.1) + specifier: 2.18.2 + version: 2.18.2(eslint@8.57.1) eslint-plugin-prettier: specifier: 5.2.1 version: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3) @@ -67,7 +64,10 @@ importers: version: 16.3.0 ts-jest: specifier: 29.2.5 - version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3) + version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(esbuild@0.24.0)(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3) + tsup: + specifier: 8.3.5 + version: 8.3.5(typescript@5.6.3) typescript: specifier: 5.6.3 version: 5.6.3 @@ -249,6 +249,150 @@ packages: '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + '@esbuild/aix-ppc64@0.24.0': + resolution: {integrity: sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.24.0': + resolution: {integrity: sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.24.0': + resolution: {integrity: sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.24.0': + resolution: {integrity: sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.24.0': + resolution: {integrity: sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.24.0': + resolution: {integrity: sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.24.0': + resolution: {integrity: sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.24.0': + resolution: {integrity: sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.24.0': + resolution: {integrity: sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.24.0': + resolution: {integrity: sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.24.0': + resolution: {integrity: sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.24.0': + resolution: {integrity: sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.24.0': + resolution: {integrity: sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.24.0': + resolution: {integrity: sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.24.0': + resolution: {integrity: sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.24.0': + resolution: {integrity: sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.24.0': + resolution: {integrity: sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-x64@0.24.0': + resolution: {integrity: sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.24.0': + resolution: {integrity: sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.24.0': + resolution: {integrity: sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.24.0': + resolution: {integrity: sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.24.0': + resolution: {integrity: sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.24.0': + resolution: {integrity: sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.24.0': + resolution: {integrity: sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.4.0': resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -293,6 +437,10 @@ packages: resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} deprecated: Use @eslint/object-schema instead + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + '@istanbuljs/load-nyc-config@1.1.0': resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -397,10 +545,104 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + '@pkgr/core@0.1.1': resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@rollup/rollup-android-arm-eabi@4.27.3': + resolution: {integrity: sha512-EzxVSkIvCFxUd4Mgm4xR9YXrcp976qVaHnqom/Tgm+vU79k4vV4eYTjmRvGfeoW8m9LVcsAy/lGjcgVegKEhLQ==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.27.3': + resolution: {integrity: sha512-LJc5pDf1wjlt9o/Giaw9Ofl+k/vLUaYsE2zeQGH85giX2F+wn/Cg8b3c5CDP3qmVmeO5NzwVUzQQxwZvC2eQKw==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.27.3': + resolution: {integrity: sha512-OuRysZ1Mt7wpWJ+aYKblVbJWtVn3Cy52h8nLuNSzTqSesYw1EuN6wKp5NW/4eSre3mp12gqFRXOKTcN3AI3LqA==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.27.3': + resolution: {integrity: sha512-xW//zjJMlJs2sOrCmXdB4d0uiilZsOdlGQIC/jjmMWT47lkLLoB1nsNhPUcnoqyi5YR6I4h+FjBpILxbEy8JRg==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.27.3': + resolution: {integrity: sha512-58E0tIcwZ+12nK1WiLzHOD8I0d0kdrY/+o7yFVPRHuVGY3twBwzwDdTIBGRxLmyjciMYl1B/U515GJy+yn46qw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.27.3': + resolution: {integrity: sha512-78fohrpcVwTLxg1ZzBMlwEimoAJmY6B+5TsyAZ3Vok7YabRBUvjYTsRXPTjGEvv/mfgVBepbW28OlMEz4w8wGA==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.27.3': + resolution: {integrity: sha512-h2Ay79YFXyQi+QZKo3ISZDyKaVD7uUvukEHTOft7kh00WF9mxAaxZsNs3o/eukbeKuH35jBvQqrT61fzKfAB/Q==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.27.3': + resolution: {integrity: sha512-Sv2GWmrJfRY57urktVLQ0VKZjNZGogVtASAgosDZ1aUB+ykPxSi3X1nWORL5Jk0sTIIwQiPH7iE3BMi9zGWfkg==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.27.3': + resolution: {integrity: sha512-FPoJBLsPW2bDNWjSrwNuTPUt30VnfM8GPGRoLCYKZpPx0xiIEdFip3dH6CqgoT0RnoGXptaNziM0WlKgBc+OWQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.27.3': + resolution: {integrity: sha512-TKxiOvBorYq4sUpA0JT+Fkh+l+G9DScnG5Dqx7wiiqVMiRSkzTclP35pE6eQQYjP4Gc8yEkJGea6rz4qyWhp3g==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.27.3': + resolution: {integrity: sha512-v2M/mPvVUKVOKITa0oCFksnQQ/TqGrT+yD0184/cWHIu0LoIuYHwox0Pm3ccXEz8cEQDLk6FPKd1CCm+PlsISw==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.27.3': + resolution: {integrity: sha512-LdrI4Yocb1a/tFVkzmOE5WyYRgEBOyEhWYJe4gsDWDiwnjYKjNs7PS6SGlTDB7maOHF4kxevsuNBl2iOcj3b4A==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.27.3': + resolution: {integrity: sha512-d4wVu6SXij/jyiwPvI6C4KxdGzuZOvJ6y9VfrcleHTwo68fl8vZC5ZYHsCVPUi4tndCfMlFniWgwonQ5CUpQcA==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.27.3': + resolution: {integrity: sha512-/6bn6pp1fsCGEY5n3yajmzZQAh+mW4QPItbiWxs69zskBzJuheb3tNynEjL+mKOsUSFK11X4LYF2BwwXnzWleA==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.27.3': + resolution: {integrity: sha512-nBXOfJds8OzUT1qUreT/en3eyOXd2EH5b0wr2bVB5999qHdGKkzGzIyKYaKj02lXk6wpN71ltLIaQpu58YFBoQ==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.27.3': + resolution: {integrity: sha512-ogfbEVQgIZOz5WPWXF2HVb6En+kWzScuxJo/WdQTqEgeyGkaa2ui5sQav9Zkr7bnNCLK48uxmmK0TySm22eiuw==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.27.3': + resolution: {integrity: sha512-ecE36ZBMLINqiTtSNQ1vzWc5pXLQHlf/oqGp/bSbi7iedcjcNb6QbCBNG73Euyy2C+l/fn8qKWEwxr+0SSfs3w==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.27.3': + resolution: {integrity: sha512-vliZLrDmYKyaUoMzEbMTg2JkerfBjn03KmAw9CykO0Zzkzoyd7o3iZNam/TpyWNjNT+Cz2iO3P9Smv2wgrR+Eg==} + cpu: [x64] + os: [win32] + '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} @@ -425,6 +667,9 @@ packages: '@types/babel__traverse@7.20.5': resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/graceful-fs@4.1.9': resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} @@ -634,10 +879,6 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@vercel/ncc@0.38.2': - resolution: {integrity: sha512-3yel3jaxUg9pHBv4+KeC9qlbdZPug+UMtUOlhvpDYCMSgcNSrS2Hv1LoqMsOV7hf2lYscx+BESfJOIla1WsmMQ==} - hasBin: true - acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -663,6 +904,10 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + engines: {node: '>=12'} + ansi-styles@2.2.1: resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==} engines: {node: '>=0.10.0'} @@ -675,6 +920,13 @@ packages: resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} engines: {node: '>=10'} + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + + any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -798,6 +1050,16 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + bundle-require@5.0.0: + resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + peerDependencies: + esbuild: '>=0.18' + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} @@ -829,6 +1091,10 @@ packages: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} + chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} + engines: {node: '>= 14.16.0'} + ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} @@ -857,6 +1123,10 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + common-tags@1.8.2: resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} engines: {node: '>=4.0.0'} @@ -864,6 +1134,10 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} + convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -980,6 +1254,9 @@ packages: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + ejs@3.1.10: resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} engines: {node: '>=0.10.0'} @@ -1035,6 +1312,11 @@ packages: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} + esbuild@0.24.0: + resolution: {integrity: sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==} + engines: {node: '>=18'} + hasBin: true + escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} @@ -1070,8 +1352,8 @@ packages: eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - eslint-json-compat-utils@0.1.3: - resolution: {integrity: sha512-/Vkubo+HWjd9sn5qp8gcNSvr73ZT/LKB4MCjr2GM6MWvN+qLwtpGiYB+KiE5NliMC74UE+6GkUrzV1psdyImCg==} + eslint-json-compat-utils@0.2.1: + resolution: {integrity: sha512-YzEodbDyW8DX8bImKhAcCeu/L31Dd/70Bidx2Qex9OFUtgzXLqtfWL4Hr5fM/aCCB8QUZLuJur0S9k6UfgFkfg==} engines: {node: '>=12'} peerDependencies: '@eslint/json': '*' @@ -1152,8 +1434,8 @@ packages: jest: optional: true - eslint-plugin-jsonc@2.18.0: - resolution: {integrity: sha512-5HoxMECa+GMyxP1/zR8u/Hacbv7hbQ6NKGHKNPIX6rL2Dwktzgyf4+Qa1urgFc8HDg6rgOr5qhRSR40XicBL6w==} + eslint-plugin-jsonc@2.18.2: + resolution: {integrity: sha512-SDhJiSsWt3nItl/UuIv+ti4g3m4gpGkmnUJS9UWR3TrpyNsIcnJoBRD7Kof6cM4Rk3L0wrmY5Tm3z7ZPjR2uGg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' @@ -1213,6 +1495,10 @@ packages: resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} engines: {node: '>=0.10'} + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} @@ -1259,6 +1545,14 @@ packages: fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + fdir@6.4.2: + resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -1292,6 +1586,10 @@ packages: for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + fs-extra@8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} @@ -1346,6 +1644,10 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} + glob@10.4.5: + resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + hasBin: true + glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported @@ -1605,6 +1907,9 @@ packages: iterator.prototype@1.1.2: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + jake@10.9.2: resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} engines: {node: '>=10'} @@ -1739,6 +2044,10 @@ packages: node-notifier: optional: true + joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1809,9 +2118,17 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + lilconfig@3.1.2: + resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} + engines: {node: '>=14'} + lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + load-tsconfig@0.2.5: + resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -1835,6 +2152,9 @@ packages: lodash.snakecase@4.1.1: resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} + lodash.sortby@4.7.0: + resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + lodash.upperfirst@4.3.1: resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} @@ -1852,6 +2172,9 @@ packages: resolution: {integrity: sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==} engines: {node: '>= 0.6.0'} + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} @@ -1907,6 +2230,10 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + moment@2.30.1: resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} @@ -1920,6 +2247,9 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -1941,6 +2271,10 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + object-inspect@1.13.2: resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} engines: {node: '>= 0.4'} @@ -2000,6 +2334,9 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -2023,6 +2360,10 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -2034,6 +2375,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + pirates@4.0.6: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} @@ -2046,6 +2391,24 @@ packages: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} + postcss-load-config@6.0.1: + resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} + 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 + prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -2092,6 +2455,10 @@ packages: react-is@18.3.1: resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + readdirp@4.0.2: + resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} + engines: {node: '>= 14.16.0'} + reflect.getprototypeof@1.0.6: resolution: {integrity: sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==} engines: {node: '>= 0.4'} @@ -2139,6 +2506,11 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true + rollup@4.27.3: + resolution: {integrity: sha512-SLsCOnlmGt9VoZ9Ek8yBK8tAdmPHeppkw+Xa7yDlCEhDTvwYei03JlWo1fdc7YTfLZ4tD8riJCUyAgTbszk1fQ==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -2185,6 +2557,10 @@ packages: signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -2199,6 +2575,10 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + source-map@0.8.0-beta.0: + resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} + engines: {node: '>= 8'} + sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} @@ -2222,6 +2602,10 @@ packages: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + string.prototype.includes@2.0.0: resolution: {integrity: sha512-E34CkBgyeqNDcrbU76cDjL5JLcVrtSdYq0MEh/B10r17pRP4ciHLwTgnuLV8Ay6cgEMLkcBkFCKyFZ43YldYzg==} @@ -2244,6 +2628,10 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -2260,6 +2648,11 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + sucrase@3.35.0: + resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} engines: {node: '>=0.8.0'} @@ -2294,6 +2687,20 @@ packages: text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + + thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + + tinyexec@0.3.1: + resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} + + tinyglobby@0.2.10: + resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} + engines: {node: '>=12.0.0'} + tmpl@1.0.5: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} @@ -2305,6 +2712,13 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + tr46@1.0.1: + resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} + + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + ts-api-utils@1.3.0: resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} @@ -2317,6 +2731,9 @@ packages: peerDependencies: typescript: '>=4.2.0' + ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + ts-jest@29.2.5: resolution: {integrity: sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==} engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} @@ -2350,6 +2767,25 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsup@8.3.5: + resolution: {integrity: sha512-Tunf6r6m6tnZsG9GYWndg0z8dEV7fD733VBFzFJ5Vcm1FtlXB8xBD/rtrBi2a3YKEV7hHtxiZtW5EAVADoe1pA==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + '@microsoft/api-extractor': ^7.36.0 + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: '>=4.5.0' + peerDependenciesMeta: + '@microsoft/api-extractor': + optional: true + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -2419,6 +2855,12 @@ packages: walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} + webidl-conversions@4.0.2: + resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} + + whatwg-url@7.1.0: + resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} + which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -2443,6 +2885,10 @@ packages: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -2682,6 +3128,78 @@ snapshots: '@bcoe/v8-coverage@0.2.3': {} + '@esbuild/aix-ppc64@0.24.0': + optional: true + + '@esbuild/android-arm64@0.24.0': + optional: true + + '@esbuild/android-arm@0.24.0': + optional: true + + '@esbuild/android-x64@0.24.0': + optional: true + + '@esbuild/darwin-arm64@0.24.0': + optional: true + + '@esbuild/darwin-x64@0.24.0': + optional: true + + '@esbuild/freebsd-arm64@0.24.0': + optional: true + + '@esbuild/freebsd-x64@0.24.0': + optional: true + + '@esbuild/linux-arm64@0.24.0': + optional: true + + '@esbuild/linux-arm@0.24.0': + optional: true + + '@esbuild/linux-ia32@0.24.0': + optional: true + + '@esbuild/linux-loong64@0.24.0': + optional: true + + '@esbuild/linux-mips64el@0.24.0': + optional: true + + '@esbuild/linux-ppc64@0.24.0': + optional: true + + '@esbuild/linux-riscv64@0.24.0': + optional: true + + '@esbuild/linux-s390x@0.24.0': + optional: true + + '@esbuild/linux-x64@0.24.0': + optional: true + + '@esbuild/netbsd-x64@0.24.0': + optional: true + + '@esbuild/openbsd-arm64@0.24.0': + optional: true + + '@esbuild/openbsd-x64@0.24.0': + optional: true + + '@esbuild/sunos-x64@0.24.0': + optional: true + + '@esbuild/win32-arm64@0.24.0': + optional: true + + '@esbuild/win32-ia32@0.24.0': + optional: true + + '@esbuild/win32-x64@0.24.0': + optional: true + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': dependencies: eslint: 8.57.1 @@ -2726,6 +3244,15 @@ snapshots: '@humanwhocodes/object-schema@2.0.3': {} + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + '@istanbuljs/load-nyc-config@1.1.0': dependencies: camelcase: 5.3.1 @@ -2927,8 +3454,65 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 + '@pkgjs/parseargs@0.11.0': + optional: true + '@pkgr/core@0.1.1': {} + '@rollup/rollup-android-arm-eabi@4.27.3': + optional: true + + '@rollup/rollup-android-arm64@4.27.3': + optional: true + + '@rollup/rollup-darwin-arm64@4.27.3': + optional: true + + '@rollup/rollup-darwin-x64@4.27.3': + optional: true + + '@rollup/rollup-freebsd-arm64@4.27.3': + optional: true + + '@rollup/rollup-freebsd-x64@4.27.3': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.27.3': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.27.3': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.27.3': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.27.3': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.27.3': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.27.3': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.27.3': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.27.3': + optional: true + + '@rollup/rollup-linux-x64-musl@4.27.3': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.27.3': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.27.3': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.27.3': + optional: true + '@rtsao/scc@1.1.0': {} '@sinclair/typebox@0.27.8': {} @@ -2962,6 +3546,8 @@ snapshots: dependencies: '@babel/types': 7.24.0 + '@types/estree@1.0.6': {} + '@types/graceful-fs@4.1.9': dependencies: '@types/node': 22.9.0 @@ -3239,8 +3825,6 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vercel/ncc@0.38.2': {} - acorn-jsx@5.3.2(acorn@8.14.0): dependencies: acorn: 8.14.0 @@ -3262,6 +3846,8 @@ snapshots: ansi-regex@5.0.1: {} + ansi-regex@6.1.0: {} + ansi-styles@2.2.1: {} ansi-styles@4.3.0: @@ -3270,6 +3856,10 @@ snapshots: ansi-styles@5.2.0: {} + ansi-styles@6.2.1: {} + + any-promise@1.3.0: {} + anymatch@3.1.3: dependencies: normalize-path: 3.0.0 @@ -3439,6 +4029,13 @@ snapshots: buffer-from@1.1.2: {} + bundle-require@5.0.0(esbuild@0.24.0): + dependencies: + esbuild: 0.24.0 + load-tsconfig: 0.2.5 + + cac@6.7.14: {} + call-bind@1.0.7: dependencies: es-define-property: 1.0.0 @@ -3470,6 +4067,10 @@ snapshots: char-regex@1.0.2: {} + chokidar@4.0.1: + dependencies: + readdirp: 4.0.2 + ci-info@3.9.0: {} cjs-module-lexer@1.2.3: {} @@ -3496,10 +4097,14 @@ snapshots: color-name@1.1.4: {} + commander@4.1.1: {} + common-tags@1.8.2: {} concat-map@0.0.1: {} + consola@3.2.3: {} + convert-source-map@2.0.0: {} create-jest@29.7.0(@types/node@22.9.0): @@ -3618,6 +4223,8 @@ snapshots: dependencies: esutils: 2.0.3 + eastasianwidth@0.2.0: {} + ejs@3.1.10: dependencies: jake: 10.9.2 @@ -3738,6 +4345,33 @@ snapshots: is-date-object: 1.0.5 is-symbol: 1.0.4 + esbuild@0.24.0: + optionalDependencies: + '@esbuild/aix-ppc64': 0.24.0 + '@esbuild/android-arm': 0.24.0 + '@esbuild/android-arm64': 0.24.0 + '@esbuild/android-x64': 0.24.0 + '@esbuild/darwin-arm64': 0.24.0 + '@esbuild/darwin-x64': 0.24.0 + '@esbuild/freebsd-arm64': 0.24.0 + '@esbuild/freebsd-x64': 0.24.0 + '@esbuild/linux-arm': 0.24.0 + '@esbuild/linux-arm64': 0.24.0 + '@esbuild/linux-ia32': 0.24.0 + '@esbuild/linux-loong64': 0.24.0 + '@esbuild/linux-mips64el': 0.24.0 + '@esbuild/linux-ppc64': 0.24.0 + '@esbuild/linux-riscv64': 0.24.0 + '@esbuild/linux-s390x': 0.24.0 + '@esbuild/linux-x64': 0.24.0 + '@esbuild/netbsd-x64': 0.24.0 + '@esbuild/openbsd-arm64': 0.24.0 + '@esbuild/openbsd-x64': 0.24.0 + '@esbuild/sunos-x64': 0.24.0 + '@esbuild/win32-arm64': 0.24.0 + '@esbuild/win32-ia32': 0.24.0 + '@esbuild/win32-x64': 0.24.0 + escalade@3.1.2: {} escalade@3.2.0: {} @@ -3765,9 +4399,10 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-json-compat-utils@0.1.3(eslint@8.57.1)(jsonc-eslint-parser@2.4.0): + eslint-json-compat-utils@0.2.1(eslint@8.57.1)(jsonc-eslint-parser@2.4.0): dependencies: eslint: 8.57.1 + esquery: 1.6.0 jsonc-eslint-parser: 2.4.0 eslint-module-utils@2.11.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): @@ -3869,12 +4504,12 @@ snapshots: - supports-color - typescript - eslint-plugin-jsonc@2.18.0(eslint@8.57.1): + eslint-plugin-jsonc@2.18.2(eslint@8.57.1): dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) eslint: 8.57.1 eslint-compat-utils: 0.6.0(eslint@8.57.1) - eslint-json-compat-utils: 0.1.3(eslint@8.57.1)(jsonc-eslint-parser@2.4.0) + eslint-json-compat-utils: 0.2.1(eslint@8.57.1)(jsonc-eslint-parser@2.4.0) espree: 9.6.1 graphemer: 1.4.0 jsonc-eslint-parser: 2.4.0 @@ -3978,6 +4613,10 @@ snapshots: dependencies: estraverse: 5.3.0 + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + esrecurse@4.3.0: dependencies: estraverse: 5.3.0 @@ -4032,6 +4671,10 @@ snapshots: dependencies: bser: 2.1.1 + fdir@6.4.2(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + file-entry-cache@6.0.1: dependencies: flat-cache: 3.2.0 @@ -4070,6 +4713,11 @@ snapshots: dependencies: is-callable: 1.2.7 + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + fs-extra@8.1.0: dependencies: graceful-fs: 4.2.11 @@ -4122,6 +4770,15 @@ snapshots: dependencies: is-glob: 4.0.3 + glob@10.4.5: + dependencies: + foreground-child: 3.3.0 + jackspeak: 3.4.3 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + glob@7.2.3: dependencies: fs.realpath: 1.0.0 @@ -4378,6 +5035,12 @@ snapshots: reflect.getprototypeof: 1.0.6 set-function-name: 2.0.2 + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + jake@10.9.2: dependencies: async: 3.2.6 @@ -4693,6 +5356,8 @@ snapshots: - supports-color - ts-node + joycon@3.1.1: {} + js-tokens@4.0.0: {} js-yaml@3.14.1: @@ -4757,8 +5422,12 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + lilconfig@3.1.2: {} + lines-and-columns@1.2.4: {} + load-tsconfig@0.2.5: {} + locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -4777,6 +5446,8 @@ snapshots: lodash.snakecase@4.1.1: {} + lodash.sortby@4.7.0: {} + lodash.upperfirst@4.3.1: {} lodash@4.17.21: {} @@ -4798,6 +5469,8 @@ snapshots: loglevel@1.9.1: {} + lru-cache@10.4.3: {} + lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -4850,6 +5523,8 @@ snapshots: minimist@1.2.8: {} + minipass@7.1.2: {} + moment@2.30.1: {} mri@1.1.4: {} @@ -4858,6 +5533,12 @@ snapshots: ms@2.1.3: {} + mz@2.7.0: + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + natural-compare@1.4.0: {} nconf@0.12.1: @@ -4877,6 +5558,8 @@ snapshots: dependencies: path-key: 3.1.1 + object-assign@4.1.1: {} + object-inspect@1.13.2: {} object-is@1.1.6: @@ -4947,6 +5630,8 @@ snapshots: p-try@2.2.0: {} + package-json-from-dist@1.0.1: {} + parent-module@1.0.1: dependencies: callsites: 3.1.0 @@ -4966,12 +5651,19 @@ snapshots: path-parse@1.0.7: {} + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.2 + path-type@4.0.0: {} picocolors@1.1.1: {} picomatch@2.3.1: {} + picomatch@4.0.2: {} + pirates@4.0.6: {} pkg-dir@4.2.0: @@ -4980,6 +5672,10 @@ snapshots: possible-typed-array-names@1.0.0: {} + postcss-load-config@6.0.1: + dependencies: + lilconfig: 3.1.2 + prelude-ls@1.2.1: {} prettier-eslint@16.3.0: @@ -5024,6 +5720,8 @@ snapshots: react-is@18.3.1: {} + readdirp@4.0.2: {} + reflect.getprototypeof@1.0.6: dependencies: call-bind: 1.0.7 @@ -5069,6 +5767,30 @@ snapshots: dependencies: glob: 7.2.3 + rollup@4.27.3: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.27.3 + '@rollup/rollup-android-arm64': 4.27.3 + '@rollup/rollup-darwin-arm64': 4.27.3 + '@rollup/rollup-darwin-x64': 4.27.3 + '@rollup/rollup-freebsd-arm64': 4.27.3 + '@rollup/rollup-freebsd-x64': 4.27.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.27.3 + '@rollup/rollup-linux-arm-musleabihf': 4.27.3 + '@rollup/rollup-linux-arm64-gnu': 4.27.3 + '@rollup/rollup-linux-arm64-musl': 4.27.3 + '@rollup/rollup-linux-powerpc64le-gnu': 4.27.3 + '@rollup/rollup-linux-riscv64-gnu': 4.27.3 + '@rollup/rollup-linux-s390x-gnu': 4.27.3 + '@rollup/rollup-linux-x64-gnu': 4.27.3 + '@rollup/rollup-linux-x64-musl': 4.27.3 + '@rollup/rollup-win32-arm64-msvc': 4.27.3 + '@rollup/rollup-win32-ia32-msvc': 4.27.3 + '@rollup/rollup-win32-x64-msvc': 4.27.3 + fsevents: 2.3.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 @@ -5123,6 +5845,8 @@ snapshots: signal-exit@3.0.7: {} + signal-exit@4.1.0: {} + sisteransi@1.0.5: {} slash@3.0.0: {} @@ -5134,6 +5858,10 @@ snapshots: source-map@0.6.1: {} + source-map@0.8.0-beta.0: + dependencies: + whatwg-url: 7.1.0 + sprintf-js@1.0.3: {} stack-utils@2.0.6: @@ -5163,6 +5891,12 @@ snapshots: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + string.prototype.includes@2.0.0: dependencies: define-properties: 1.2.1 @@ -5195,6 +5929,10 @@ snapshots: dependencies: ansi-regex: 5.0.1 + strip-ansi@7.1.0: + dependencies: + ansi-regex: 6.1.0 + strip-bom@3.0.0: {} strip-bom@4.0.0: {} @@ -5203,6 +5941,16 @@ snapshots: strip-json-comments@3.1.1: {} + sucrase@3.35.0: + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + commander: 4.1.1 + glob: 10.4.5 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.6 + ts-interface-checker: 0.1.13 + supports-color@2.0.0: {} supports-color@7.2.0: @@ -5234,6 +5982,21 @@ snapshots: text-table@0.2.0: {} + thenify-all@1.6.0: + dependencies: + thenify: 3.3.1 + + thenify@3.3.1: + dependencies: + any-promise: 1.3.0 + + tinyexec@0.3.1: {} + + tinyglobby@0.2.10: + dependencies: + fdir: 6.4.2(picomatch@4.0.2) + picomatch: 4.0.2 + tmpl@1.0.5: {} to-fast-properties@2.0.0: {} @@ -5242,6 +6005,12 @@ snapshots: dependencies: is-number: 7.0.0 + tr46@1.0.1: + dependencies: + punycode: 2.3.1 + + tree-kill@1.2.2: {} + ts-api-utils@1.3.0(typescript@5.6.3): dependencies: typescript: 5.6.3 @@ -5250,7 +6019,9 @@ snapshots: dependencies: typescript: 5.6.3 - ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3): + ts-interface-checker@0.1.13: {} + + ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(esbuild@0.24.0)(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 @@ -5268,6 +6039,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.24.4) + esbuild: 0.24.0 tsconfig-paths@3.15.0: dependencies: @@ -5280,6 +6052,32 @@ snapshots: tslib@2.8.1: {} + tsup@8.3.5(typescript@5.6.3): + dependencies: + bundle-require: 5.0.0(esbuild@0.24.0) + cac: 6.7.14 + chokidar: 4.0.1 + consola: 3.2.3 + debug: 4.3.7 + esbuild: 0.24.0 + joycon: 3.1.1 + picocolors: 1.1.1 + postcss-load-config: 6.0.1 + resolve-from: 5.0.0 + rollup: 4.27.3 + source-map: 0.8.0-beta.0 + sucrase: 3.35.0 + tinyexec: 0.3.1 + tinyglobby: 0.2.10 + tree-kill: 1.2.2 + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - jiti + - supports-color + - tsx + - yaml + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 @@ -5368,6 +6166,14 @@ snapshots: dependencies: makeerror: 1.0.12 + webidl-conversions@4.0.2: {} + + whatwg-url@7.1.0: + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + which-boxed-primitive@1.0.2: dependencies: is-bigint: 1.0.4 @@ -5416,6 +6222,12 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + wrappy@1.0.2: {} write-file-atomic@4.0.2: diff --git a/tsconfig.json b/tsconfig.json index 0d89af1..8c2a77b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "target": "ESNext", "module": "NodeNext", - "rootDir": "./src", + "rootDir": "./", "moduleResolution": "NodeNext", "baseUrl": "./", "sourceMap": true, diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 0000000..10c5ff6 --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + outDir: 'dist', + entry: ['src/index.ts'], + target: 'esnext', + format: ['cjs'], + minify: true, + treeshake: true, + clean: true, + splitting: false, + sourcemap: false, + dts: false +}); From d8f42981a7fc899943d36b7add3fb199c89265f8 Mon Sep 17 00:00:00 2001 From: GregoryGost Date: Mon, 18 Nov 2024 23:43:02 +0300 Subject: [PATCH 09/19] dependabot monthly --- .github/dependabot.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 37fddba..d22ccce 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,8 +4,7 @@ updates: directory: / target-branch: 'develop' schedule: - interval: weekly - day: sunday + interval: monthly time: '09:00' timezone: 'Europe/Moscow' labels: @@ -22,8 +21,7 @@ updates: directory: / target-branch: 'develop' schedule: - interval: weekly - day: sunday + interval: monthly time: '09:00' timezone: 'Europe/Moscow' labels: From c346451111ed6ae3fdcd6858455d81a1c207bc94 Mon Sep 17 00:00:00 2001 From: GregoryGost Date: Tue, 19 Nov 2024 00:00:39 +0300 Subject: [PATCH 10/19] Check dist/ --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 6adc880..4354e19 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ #!/usr/bin/node + import { Torrentclear } from './class/torrentclear'; new Torrentclear().main(); From 409bfef857663b886892ef6536346baf0ec004a6 Mon Sep 17 00:00:00 2001 From: GregoryGost Date: Wed, 27 Nov 2024 11:46:36 +0300 Subject: [PATCH 11/19] up libs, change ts --- .gitignore | 2 +- __tests__/.gitignore | 2 +- __tests__/configs/ak_prod/config.json | 2 +- __tests__/configs/config.json | 2 +- __tests__/configs/no_login/config.json | 2 +- __tests__/configs/no_tr_env/config.json | 2 +- dist/index.js | 28 +- package.json | 9 +- pnpm-lock.yaml | 492 ++++++++++++++---------- src/class/config.ts | 17 +- src/class/metrics.ts.no | 100 ----- src/types/index.d.ts | 2 - torrentclear.timer | 2 +- tsconfig.json | 19 +- 14 files changed, 313 insertions(+), 368 deletions(-) delete mode 100644 src/class/metrics.ts.no diff --git a/.gitignore b/.gitignore index 8b30dc9..8a04019 100644 --- a/.gitignore +++ b/.gitignore @@ -114,4 +114,4 @@ __tests__/runner/* config.json # Old files dir -old/ \ No newline at end of file +old/ diff --git a/__tests__/.gitignore b/__tests__/.gitignore index b74463e..5f8a909 100644 --- a/__tests__/.gitignore +++ b/__tests__/.gitignore @@ -1,4 +1,4 @@ !configs/config.json !configs/no_login/config.json !configs/no_tr_env/config.json -!configs/ak_prod/config.json \ No newline at end of file +!configs/ak_prod/config.json diff --git a/__tests__/configs/ak_prod/config.json b/__tests__/configs/ak_prod/config.json index a0be63c..570715a 100644 --- a/__tests__/configs/ak_prod/config.json +++ b/__tests__/configs/ak_prod/config.json @@ -4,4 +4,4 @@ "password": "1234567890123456789", "settings_file_path": "./__tests__/settings.json", "log_file_path": "./torrentclear_prod.log" -} \ No newline at end of file +} diff --git a/__tests__/configs/config.json b/__tests__/configs/config.json index 96f9c41..a2ae6dd 100644 --- a/__tests__/configs/config.json +++ b/__tests__/configs/config.json @@ -10,4 +10,4 @@ "limit_time": 100000, "settings_file_path": "./__tests__/settings.json", "cron_expression": "0 1 * * *" -} \ No newline at end of file +} diff --git a/__tests__/configs/no_login/config.json b/__tests__/configs/no_login/config.json index fff626c..54adf57 100644 --- a/__tests__/configs/no_login/config.json +++ b/__tests__/configs/no_login/config.json @@ -4,4 +4,4 @@ "password": "password", "log_file_path": "./logs/torrentclone.log", "settings_file_path": "./__tests__/settings.json" -} \ No newline at end of file +} diff --git a/__tests__/configs/no_tr_env/config.json b/__tests__/configs/no_tr_env/config.json index a4f36be..4335f7e 100644 --- a/__tests__/configs/no_tr_env/config.json +++ b/__tests__/configs/no_tr_env/config.json @@ -4,4 +4,4 @@ "password": "password", "log_file_path": "./logs/torrentclear.log", "settings_file_path": "./__tests__/settings.json" -} \ No newline at end of file +} diff --git a/dist/index.js b/dist/index.js index 3b7ef98..2cc796b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,14 +1,14 @@ #!/usr/bin/node -'use strict';var child_process=require('child_process'),fs=require('fs'),path=require('path'),url=require('url'),os$1=require('os');var Gy=Object.create;var yi=Object.defineProperty;var Jy=Object.getOwnPropertyDescriptor;var Zy=Object.getOwnPropertyNames;var Ky=Object.getPrototypeOf,Qy=Object.prototype.hasOwnProperty;var U=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Xy=(e,t)=>()=>(e&&(t=e(e=0)),t);var B=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),e1=(e,t)=>{for(var r in t)yi(e,r,{get:t[r],enumerable:!0});},qu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Zy(t))!Qy.call(e,s)&&s!==r&&yi(e,s,{get:()=>t[s],enumerable:!(n=Jy(t,s))||n.enumerable});return e};var Qs=(e,t,r)=>(r=e!=null?Gy(Ky(e)):{},qu(!e||!e.__esModule?yi(r,"default",{value:e,enumerable:!0}):r,e)),Yu=e=>qu(yi({},"__esModule",{value:!0}),e);var Wu=B((Xs,Nr)=>{(function(e,t){typeof Xs=="object"&&typeof Nr<"u"?Nr.exports=t():typeof define=="function"&&define.amd?define(t):e.moment=t();})(Xs,function(){var e;function t(){return e.apply(null,arguments)}function r(i){e=i;}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function s(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function o(i,a){return Object.prototype.hasOwnProperty.call(i,a)}function u(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var a;for(a in i)if(o(i,a))return !1;return !0}function c(i){return i===void 0}function d(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function g(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function m(i,a){var l=[],f,p=i.length;for(f=0;f>>0,f;for(f=0;f0)for(l=0;ltypeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Xy=(e,t)=>()=>(e&&(t=e(e=0)),t);var B=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),e1=(e,t)=>{for(var r in t)yi(e,r,{get:t[r],enumerable:!0});},qu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Zy(t))!Qy.call(e,s)&&s!==r&&yi(e,s,{get:()=>t[s],enumerable:!(n=Jy(t,s))||n.enumerable});return e};var Qs=(e,t,r)=>(r=e!=null?Gy(Ky(e)):{},qu(!e||!e.__esModule?yi(r,"default",{value:e,enumerable:!0}):r,e)),Yu=e=>qu(yi({},"__esModule",{value:!0}),e);var Wu=B((Xs,Nr)=>{(function(e,t){typeof Xs=="object"&&typeof Nr<"u"?Nr.exports=t():typeof define=="function"&&define.amd?define(t):e.moment=t();})(Xs,function(){var e;function t(){return e.apply(null,arguments)}function r(i){e=i;}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function s(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function o(i,a){return Object.prototype.hasOwnProperty.call(i,a)}function u(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var a;for(a in i)if(o(i,a))return !1;return !0}function c(i){return i===void 0}function d(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function g(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function m(i,a){var l=[],f,p=i.length;for(f=0;f>>0,f;for(f=0;f0)for(l=0;l=0;return (b?l?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+f}var K=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ye=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,de={},Ye={};function R(i,a,l,f){var p=f;typeof f=="string"&&(p=function(){return this[f]()}),i&&(Ye[i]=p),a&&(Ye[a[0]]=function(){return G(p.apply(this,arguments),a[1],a[2])}),l&&(Ye[l]=function(){return this.localeData().ordinal(p.apply(this,arguments),i)});}function Ke(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function Ne(i){var a=i.match(K),l,f;for(l=0,f=a.length;l=0&&ye.test(i);)i=i.replace(ye,f),ye.lastIndex=0,l-=1;return i}var we={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function le(i){var a=this._longDateFormat[i],l=this._longDateFormat[i.toUpperCase()];return a||!l?a:(this._longDateFormat[i]=l.match(K).map(function(f){return f==="MMMM"||f==="MM"||f==="DD"||f==="dddd"?f.slice(1):f}).join(""),this._longDateFormat[i])}var ve="Invalid date";function Ce(){return this._invalidDate}var E="%d",S=/\d{1,2}/;function h(i){return this._ordinal.replace("%d",i)}var v={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function T(i,a,l,f){var p=this._relativeTime[l];return Z(p)?p(i,a,l,f):p.replace(/%d/i,i)}function A(i,a){var l=this._relativeTime[i>0?"future":"past"];return Z(l)?l(a):l.replace(/%s/i,a)}var O={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function z(i){return typeof i=="string"?O[i]||O[i.toLowerCase()]:void 0}function Q(i){var a={},l,f;for(f in i)o(i,f)&&(l=z(f),l&&(a[l]=i[f]));return a}var re={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ae(i){var a=[],l;for(l in i)o(i,l)&&a.push({unit:l,priority:re[l]});return a.sort(function(f,p){return f.priority-p.priority}),a}var Fe=/\d/,Pe=/\d\d/,cn=/\d{3}/,Cr=/\d{4}/,Te=/[+-]?\d{6}/,pe=/\d\d?/,Dt=/\d\d\d\d?/,ei=/\d\d\d\d\d\d?/,ti=/\d{1,3}/,Ts=/\d{1,4}/,ri=/[+-]?\d{1,6}/,br=/\d+/,ni=/[+-]?\d+/,hg=/Z|[+-]\d\d:?\d\d/gi,ii=/Z|[+-]\d\d(?::?\d\d)?/gi,pg=/[+-]?\d+(\.\d{1,3})?/,ln=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Or=/^[1-9]\d?/,js=/^([1-9]\d|\d)/,si;si={};function se(i,a,l){si[i]=Z(a)?a:function(f,p){return f&&l?l:a};}function mg(i,a){return o(si,i)?si[i](a._strict,a._locale):new RegExp(gg(i))}function gg(i){return It(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,l,f,p,b){return l||f||p||b}))}function It(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function at(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function me(i){var a=+i,l=0;return a!==0&&isFinite(a)&&(l=at(a)),l}var Is={};function Se(i,a){var l,f=a,p;for(typeof i=="string"&&(i=[i]),d(a)&&(f=function(b,N){N[a]=me(b);}),p=i.length,l=0;l68?1900:2e3)};var ru=xr("FullYear",!0);function vg(){return oi(this.year())}function xr(i,a){return function(l){return l!=null?(nu(this,i,l),t.updateOffset(this,a),this):hn(this,i)}}function hn(i,a){if(!i.isValid())return NaN;var l=i._d,f=i._isUTC;switch(a){case"Milliseconds":return f?l.getUTCMilliseconds():l.getMilliseconds();case"Seconds":return f?l.getUTCSeconds():l.getSeconds();case"Minutes":return f?l.getUTCMinutes():l.getMinutes();case"Hours":return f?l.getUTCHours():l.getHours();case"Date":return f?l.getUTCDate():l.getDate();case"Day":return f?l.getUTCDay():l.getDay();case"Month":return f?l.getUTCMonth():l.getMonth();case"FullYear":return f?l.getUTCFullYear():l.getFullYear();default:return NaN}}function nu(i,a,l){var f,p,b,N,ne;if(!(!i.isValid()||isNaN(l))){switch(f=i._d,p=i._isUTC,a){case"Milliseconds":return void(p?f.setUTCMilliseconds(l):f.setMilliseconds(l));case"Seconds":return void(p?f.setUTCSeconds(l):f.setSeconds(l));case"Minutes":return void(p?f.setUTCMinutes(l):f.setMinutes(l));case"Hours":return void(p?f.setUTCHours(l):f.setHours(l));case"Date":return void(p?f.setUTCDate(l):f.setDate(l));case"FullYear":break;default:return}b=l,N=i.month(),ne=i.date(),ne=ne===29&&N===1&&!oi(b)?28:ne,p?f.setUTCFullYear(b,N,ne):f.setFullYear(b,N,ne);}}function Eg(i){return i=z(i),Z(this[i])?this[i]():this}function _g(i,a){if(typeof i=="object"){i=Q(i);var l=Ae(i),f,p=l.length;for(f=0;f=0?(ne=new Date(i+400,a,l,f,p,b,N),isFinite(ne.getFullYear())&&ne.setFullYear(i)):ne=new Date(i,a,l,f,p,b,N),ne}function pn(i){var a,l;return i<100&&i>=0?(l=Array.prototype.slice.call(arguments),l[0]=i+400,a=new Date(Date.UTC.apply(null,l)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(i)):a=new Date(Date.UTC.apply(null,arguments)),a}function ai(i,a,l){var f=7+a-l,p=(7+pn(i,0,f).getUTCDay()-a)%7;return -p+f-1}function cu(i,a,l,f,p){var b=(7+l-f)%7,N=ai(i,f,p),ne=1+7*(a-1)+b+N,ue,ge;return ne<=0?(ue=i-1,ge=dn(ue)+ne):ne>dn(i)?(ue=i+1,ge=ne-dn(i)):(ue=i,ge=ne),{year:ue,dayOfYear:ge}}function mn(i,a,l){var f=ai(i.year(),a,l),p=Math.floor((i.dayOfYear()-f-1)/7)+1,b,N;return p<1?(N=i.year()-1,b=p+$t(N,a,l)):p>$t(i.year(),a,l)?(b=p-$t(i.year(),a,l),N=i.year()+1):(N=i.year(),b=p),{week:b,year:N}}function $t(i,a,l){var f=ai(i,a,l),p=ai(i+1,a,l);return (dn(i)-f+p)/7}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),se("w",pe,Or),se("ww",pe,Pe),se("W",pe,Or),se("WW",pe,Pe),fn(["w","ww","W","WW"],function(i,a,l,f){a[f.substr(0,1)]=me(i);});function Lg(i){return mn(i,this._week.dow,this._week.doy).week}var $g={dow:0,doy:6};function kg(){return this._week.dow}function Pg(){return this._week.doy}function Rg(i){var a=this.localeData().week(this);return i==null?a:this.add((i-a)*7,"d")}function Bg(i){var a=mn(this,1,4).week;return i==null?a:this.add((i-a)*7,"d")}R("d",0,"do","day"),R("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),R("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),R("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),se("d",pe),se("e",pe),se("E",pe),se("dd",function(i,a){return a.weekdaysMinRegex(i)}),se("ddd",function(i,a){return a.weekdaysShortRegex(i)}),se("dddd",function(i,a){return a.weekdaysRegex(i)}),fn(["dd","ddd","dddd"],function(i,a,l,f){var p=l._locale.weekdaysParse(i,f,l._strict);p!=null?a.d=p:C(l).invalidWeekday=i;}),fn(["d","e","E"],function(i,a,l,f){a[f]=me(i);});function qg(i,a){return typeof i!="string"?i:isNaN(i)?(i=a.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function Yg(i,a){return typeof i=="string"?a.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Ls(i,a){return i.slice(a,7).concat(i.slice(0,a))}var Wg="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),lu="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ug="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zg=ln,Hg=ln,Vg=ln;function Gg(i,a){var l=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(a)?"format":"standalone"];return i===!0?Ls(l,this._week.dow):i?l[i.day()]:l}function Jg(i){return i===!0?Ls(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function Zg(i){return i===!0?Ls(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function Kg(i,a,l){var f,p,b,N=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)b=y([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(b,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(b,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(b,"").toLocaleLowerCase();return l?a==="dddd"?(p=Ie.call(this._weekdaysParse,N),p!==-1?p:null):a==="ddd"?(p=Ie.call(this._shortWeekdaysParse,N),p!==-1?p:null):(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null):a==="dddd"?(p=Ie.call(this._weekdaysParse,N),p!==-1||(p=Ie.call(this._shortWeekdaysParse,N),p!==-1)?p:(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null)):a==="ddd"?(p=Ie.call(this._shortWeekdaysParse,N),p!==-1||(p=Ie.call(this._weekdaysParse,N),p!==-1)?p:(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null)):(p=Ie.call(this._minWeekdaysParse,N),p!==-1||(p=Ie.call(this._weekdaysParse,N),p!==-1)?p:(p=Ie.call(this._shortWeekdaysParse,N),p!==-1?p:null))}function Qg(i,a,l){var f,p,b;if(this._weekdaysParseExact)return Kg.call(this,i,a,l);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),f=0;f<7;f++){if(p=y([2e3,1]).day(f),l&&!this._fullWeekdaysParse[f]&&(this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[f]||(b="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[f]=new RegExp(b.replace(".",""),"i")),l&&a==="dddd"&&this._fullWeekdaysParse[f].test(i))return f;if(l&&a==="ddd"&&this._shortWeekdaysParse[f].test(i))return f;if(l&&a==="dd"&&this._minWeekdaysParse[f].test(i))return f;if(!l&&this._weekdaysParse[f].test(i))return f}}function Xg(i){if(!this.isValid())return i!=null?this:NaN;var a=hn(this,"Day");return i!=null?(i=qg(i,this.localeData()),this.add(i-a,"d")):a}function eD(i){if(!this.isValid())return i!=null?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return i==null?a:this.add(i-a,"d")}function tD(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var a=Yg(i,this.localeData());return this.day(this.day()%7?a:a-7)}else return this.day()||7}function rD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=zg),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function nD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Hg),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function iD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Vg),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $s(){function i(Ge,qt){return qt.length-Ge.length}var a=[],l=[],f=[],p=[],b,N,ne,ue,ge;for(b=0;b<7;b++)N=y([2e3,1]).day(b),ne=It(this.weekdaysMin(N,"")),ue=It(this.weekdaysShort(N,"")),ge=It(this.weekdays(N,"")),a.push(ne),l.push(ue),f.push(ge),p.push(ne),p.push(ue),p.push(ge);a.sort(i),l.sort(i),f.sort(i),p.sort(i),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i");}function ks(){return this.hours()%12||12}function sD(){return this.hours()||24}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,ks),R("k",["kk",2],0,sD),R("hmm",0,0,function(){return ""+ks.apply(this)+G(this.minutes(),2)}),R("hmmss",0,0,function(){return ""+ks.apply(this)+G(this.minutes(),2)+G(this.seconds(),2)}),R("Hmm",0,0,function(){return ""+this.hours()+G(this.minutes(),2)}),R("Hmmss",0,0,function(){return ""+this.hours()+G(this.minutes(),2)+G(this.seconds(),2)});function fu(i,a){R(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)});}fu("a",!0),fu("A",!1);function du(i,a){return a._meridiemParse}se("a",du),se("A",du),se("H",pe,js),se("h",pe,Or),se("k",pe,Or),se("HH",pe,Pe),se("hh",pe,Pe),se("kk",pe,Pe),se("hmm",Dt),se("hmmss",ei),se("Hmm",Dt),se("Hmmss",ei),Se(["H","HH"],ke),Se(["k","kk"],function(i,a,l){var f=me(i);a[ke]=f===24?0:f;}),Se(["a","A"],function(i,a,l){l._isPm=l._locale.isPM(i),l._meridiem=i;}),Se(["h","hh"],function(i,a,l){a[ke]=me(i),C(l).bigHour=!0;}),Se("hmm",function(i,a,l){var f=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f)),C(l).bigHour=!0;}),Se("hmmss",function(i,a,l){var f=i.length-4,p=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f,2)),a[Lt]=me(i.substr(p)),C(l).bigHour=!0;}),Se("Hmm",function(i,a,l){var f=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f));}),Se("Hmmss",function(i,a,l){var f=i.length-4,p=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f,2)),a[Lt]=me(i.substr(p));});function oD(i){return (i+"").toLowerCase().charAt(0)==="p"}var aD=/[ap]\.?m?\.?/i,uD=xr("Hours",!0);function cD(i,a,l){return i>11?l?"pm":"PM":l?"am":"AM"}var hu={calendar:W,longDateFormat:we,invalidDate:ve,ordinal:E,dayOfMonthOrdinalParse:S,relativeTime:v,months:Sg,monthsShort:iu,week:$g,weekdays:Wg,weekdaysMin:Ug,weekdaysShort:lu,meridiemParse:aD},Oe={},gn={},Dn;function lD(i,a){var l,f=Math.min(i.length,a.length);for(l=0;l0;){if(p=ui(b.slice(0,l).join("-")),p)return p;if(f&&f.length>=l&&lD(b,f)>=l-1)break;l--;}a++;}return Dn}function dD(i){return !!(i&&i.match("^[^/\\\\]*$"))}function ui(i){var a=null,l;if(Oe[i]===void 0&&typeof Nr<"u"&&Nr&&Nr.exports&&dD(i))try{a=Dn._abbr,l=U,l("./locale/"+i),Gt(a);}catch{Oe[i]=null;}return Oe[i]}function Gt(i,a){var l;return i&&(c(a)?l=kt(i):l=Ps(i,a),l?Dn=l:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),Dn._abbr}function Ps(i,a){if(a!==null){var l,f=hu;if(a.abbr=i,Oe[i]!=null)ee("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),f=Oe[i]._config;else if(a.parentLocale!=null)if(Oe[a.parentLocale]!=null)f=Oe[a.parentLocale]._config;else if(l=ui(a.parentLocale),l!=null)f=l._config;else return gn[a.parentLocale]||(gn[a.parentLocale]=[]),gn[a.parentLocale].push({name:i,config:a}),null;return Oe[i]=new V(Y(f,a)),gn[i]&&gn[i].forEach(function(p){Ps(p.name,p.config);}),Gt(i),Oe[i]}else return delete Oe[i],null}function hD(i,a){if(a!=null){var l,f,p=hu;Oe[i]!=null&&Oe[i].parentLocale!=null?Oe[i].set(Y(Oe[i]._config,a)):(f=ui(i),f!=null&&(p=f._config),a=Y(p,a),f==null&&(a.abbr=i),l=new V(a),l.parentLocale=Oe[i],Oe[i]=l),Gt(i);}else Oe[i]!=null&&(Oe[i].parentLocale!=null?(Oe[i]=Oe[i].parentLocale,i===Gt()&&Gt(i)):Oe[i]!=null&&delete Oe[i]);return Oe[i]}function kt(i){var a;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return Dn;if(!n(i)){if(a=ui(i),a)return a;i=[i];}return fD(i)}function pD(){return I(Oe)}function Rs(i){var a,l=i._a;return l&&C(i).overflow===-2&&(a=l[Nt]<0||l[Nt]>11?Nt:l[bt]<1||l[bt]>Ns(l[He],l[Nt])?bt:l[ke]<0||l[ke]>24||l[ke]===24&&(l[yt]!==0||l[Lt]!==0||l[lr]!==0)?ke:l[yt]<0||l[yt]>59?yt:l[Lt]<0||l[Lt]>59?Lt:l[lr]<0||l[lr]>999?lr:-1,C(i)._overflowDayOfYear&&(abt)&&(a=bt),C(i)._overflowWeeks&&a===-1&&(a=yg),C(i)._overflowWeekday&&a===-1&&(a=wg),C(i).overflow=a),i}var mD=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gD=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,DD=/Z|[+-]\d\d(?::?\d\d)?/,ci=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Bs=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yD=/^\/?Date\((-?\d+)/i,wD=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vD={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function mu(i){var a,l,f=i._i,p=mD.exec(f)||gD.exec(f),b,N,ne,ue,ge=ci.length,Ge=Bs.length;if(p){for(C(i).iso=!0,a=0,l=ge;adn(N)||i._dayOfYear===0)&&(C(i)._overflowDayOfYear=!0),l=pn(N,0,i._dayOfYear),i._a[Nt]=l.getUTCMonth(),i._a[bt]=l.getUTCDate()),a=0;a<3&&i._a[a]==null;++a)i._a[a]=f[a]=p[a];for(;a<7;a++)i._a[a]=f[a]=i._a[a]==null?a===2?1:0:i._a[a];i._a[ke]===24&&i._a[yt]===0&&i._a[Lt]===0&&i._a[lr]===0&&(i._nextDay=!0,i._a[ke]=0),i._d=(i._useUTC?pn:Ng).apply(null,f),b=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ke]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==b&&(C(i).weekdayMismatch=!0);}}function xD(i){var a,l,f,p,b,N,ne,ue,ge;a=i._w,a.GG!=null||a.W!=null||a.E!=null?(b=1,N=4,l=Ar(a.GG,i._a[He],mn(be(),1,4).year),f=Ar(a.W,1),p=Ar(a.E,1),(p<1||p>7)&&(ue=!0)):(b=i._locale._week.dow,N=i._locale._week.doy,ge=mn(be(),b,N),l=Ar(a.gg,i._a[He],ge.year),f=Ar(a.w,ge.week),a.d!=null?(p=a.d,(p<0||p>6)&&(ue=!0)):a.e!=null?(p=a.e+b,(a.e<0||a.e>6)&&(ue=!0)):p=b),f<1||f>$t(l,b,N)?C(i)._overflowWeeks=!0:ue!=null?C(i)._overflowWeekday=!0:(ne=cu(l,f,p,b,N),i._a[He]=ne.year,i._dayOfYear=ne.dayOfYear);}t.ISO_8601=function(){},t.RFC_2822=function(){};function Ys(i){if(i._f===t.ISO_8601){mu(i);return}if(i._f===t.RFC_2822){gu(i);return}i._a=[],C(i).empty=!0;var a=""+i._i,l,f,p,b,N,ne=a.length,ue=0,ge,Ge;for(p=ie(i._f,i._locale).match(K)||[],Ge=p.length,l=0;l0&&C(i).unusedInput.push(N),a=a.slice(a.indexOf(f)+f.length),ue+=f.length),Ye[b]?(f?C(i).empty=!1:C(i).unusedTokens.push(b),Dg(b,f,i)):i._strict&&!f&&C(i).unusedTokens.push(b);C(i).charsLeftOver=ne-ue,a.length>0&&C(i).unusedInput.push(a),i._a[ke]<=12&&C(i).bigHour===!0&&i._a[ke]>0&&(C(i).bigHour=void 0),C(i).parsedDateParts=i._a.slice(0),C(i).meridiem=i._meridiem,i._a[ke]=AD(i._locale,i._a[ke],i._meridiem),ge=C(i).era,ge!==null&&(i._a[He]=i._locale.erasConvertYear(ge,i._a[He])),qs(i),Rs(i);}function AD(i,a,l){var f;return l==null?a:i.meridiemHour!=null?i.meridiemHour(a,l):(i.isPM!=null&&(f=i.isPM(l),f&&a<12&&(a+=12),!f&&a===12&&(a=0)),a)}function MD(i){var a,l,f,p,b,N,ne=!1,ue=i._f.length;if(ue===0){C(i).invalidFormat=!0,i._d=new Date(NaN);return}for(p=0;pthis?this:i:$()});function wu(i,a){var l,f;if(a.length===1&&n(a[0])&&(a=a[0]),!a.length)return be();for(l=a[0],f=1;fthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function KD(){if(!c(this._isDSTShifted))return this._isDSTShifted;var i={},a;return M(i,this),i=Du(i),i._a?(a=i._isUTC?y(i._a):be(i._a),this._isDSTShifted=this.isValid()&&YD(i._a,a.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function QD(){return this.isValid()?!this._isUTC:!1}function XD(){return this.isValid()?this._isUTC:!1}function Eu(){return this.isValid()?this._isUTC&&this._offset===0:!1}var e0=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,t0=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function wt(i,a){var l=i,f=null,p,b,N;return fi(i)?l={ms:i._milliseconds,d:i._days,M:i._months}:d(i)||!isNaN(+i)?(l={},a?l[a]=+i:l.milliseconds=+i):(f=e0.exec(i))?(p=f[1]==="-"?-1:1,l={y:0,d:me(f[bt])*p,h:me(f[ke])*p,m:me(f[yt])*p,s:me(f[Lt])*p,ms:me(Ws(f[lr]*1e3))*p}):(f=t0.exec(i))?(p=f[1]==="-"?-1:1,l={y:fr(f[2],p),M:fr(f[3],p),w:fr(f[4],p),d:fr(f[5],p),h:fr(f[6],p),m:fr(f[7],p),s:fr(f[8],p)}):l==null?l={}:typeof l=="object"&&("from"in l||"to"in l)&&(N=r0(be(l.from),be(l.to)),l={},l.ms=N.milliseconds,l.M=N.months),b=new li(l),fi(i)&&o(i,"_locale")&&(b._locale=i._locale),fi(i)&&o(i,"_isValid")&&(b._isValid=i._isValid),b}wt.fn=li.prototype,wt.invalid=qD;function fr(i,a){var l=i&&parseFloat(i.replace(",","."));return (isNaN(l)?0:l)*a}function _u(i,a){var l={};return l.months=a.month()-i.month()+(a.year()-i.year())*12,i.clone().add(l.months,"M").isAfter(a)&&--l.months,l.milliseconds=+a-+i.clone().add(l.months,"M"),l}function r0(i,a){var l;return i.isValid()&&a.isValid()?(a=zs(a,i),i.isBefore(a)?l=_u(i,a):(l=_u(a,i),l.milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0}}function Fu(i,a){return function(l,f){var p,b;return f!==null&&!isNaN(+f)&&(ee(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),b=l,l=f,f=b),p=wt(l,f),Su(this,p,i),this}}function Su(i,a,l,f){var p=a._milliseconds,b=Ws(a._days),N=Ws(a._months);i.isValid()&&(f=f??!0,N&&ou(i,hn(i,"Month")+N*l),b&&nu(i,"Date",hn(i,"Date")+b*l),p&&i._d.setTime(i._d.valueOf()+p*l),f&&t.updateOffset(i,b||N));}var n0=Fu(1,"add"),i0=Fu(-1,"subtract");function Cu(i){return typeof i=="string"||i instanceof String}function s0(i){return J(i)||g(i)||Cu(i)||d(i)||a0(i)||o0(i)||i===null||i===void 0}function o0(i){var a=s(i)&&!u(i),l=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,b,N=f.length;for(p=0;pl.valueOf():l.valueOf()9999?Ct(l,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Z(Date.prototype.toISOString)?a?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ct(l,"Z")):Ct(l,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function E0(){if(!this.isValid())return "moment.invalid(/* "+this._i+" */)";var i="moment",a="",l,f,p,b;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",a="Z"),l="["+i+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",b=a+'[")]',this.format(l+f+p+b)}function _0(i){i||(i=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var a=Ct(this,i);return this.localeData().postformat(a)}function F0(i,a){return this.isValid()&&(J(i)&&i.isValid()||be(i).isValid())?wt({to:this,from:i}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function S0(i){return this.from(be(),i)}function C0(i,a){return this.isValid()&&(J(i)&&i.isValid()||be(i).isValid())?wt({from:this,to:i}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function b0(i){return this.to(be(),i)}function bu(i){var a;return i===void 0?this._locale._abbr:(a=kt(i),a!=null&&(this._locale=a),this)}var Ou=te("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function xu(){return this._locale}var hi=1e3,Mr=60*hi,pi=60*Mr,Au=(365*400+97)*24*pi;function Tr(i,a){return (i%a+a)%a}function Mu(i,a,l){return i<100&&i>=0?new Date(i+400,a,l)-Au:new Date(i,a,l).valueOf()}function Tu(i,a,l){return i<100&&i>=0?Date.UTC(i+400,a,l)-Au:Date.UTC(i,a,l)}function O0(i){var a,l;if(i=z(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Tu:Mu,i){case"year":a=l(this.year(),0,1);break;case"quarter":a=l(this.year(),this.month()-this.month()%3,1);break;case"month":a=l(this.year(),this.month(),1);break;case"week":a=l(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=l(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=Tr(a+(this._isUTC?0:this.utcOffset()*Mr),pi);break;case"minute":a=this._d.valueOf(),a-=Tr(a,Mr);break;case"second":a=this._d.valueOf(),a-=Tr(a,hi);break}return this._d.setTime(a),t.updateOffset(this,!0),this}function x0(i){var a,l;if(i=z(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Tu:Mu,i){case"year":a=l(this.year()+1,0,1)-1;break;case"quarter":a=l(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=l(this.year(),this.month()+1,1)-1;break;case"week":a=l(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=l(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=pi-Tr(a+(this._isUTC?0:this.utcOffset()*Mr),pi)-1;break;case"minute":a=this._d.valueOf(),a+=Mr-Tr(a,Mr)-1;break;case"second":a=this._d.valueOf(),a+=hi-Tr(a,hi)-1;break}return this._d.setTime(a),t.updateOffset(this,!0),this}function A0(){return this._d.valueOf()-(this._offset||0)*6e4}function M0(){return Math.floor(this.valueOf()/1e3)}function T0(){return new Date(this.valueOf())}function j0(){var i=this;return [i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function I0(){var i=this;return {years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function N0(){return this.isValid()?this.toISOString():null}function L0(){return j(this)}function $0(){return D({},C(this))}function k0(){return C(this).overflow}function P0(){return {input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),se("N",Vs),se("NN",Vs),se("NNN",Vs),se("NNNN",J0),se("NNNNN",Z0),Se(["N","NN","NNN","NNNN","NNNNN"],function(i,a,l,f){var p=l._locale.erasParse(i,f,l._strict);p?C(l).era=p:C(l).invalidEra=i;}),se("y",br),se("yy",br),se("yyy",br),se("yyyy",br),se("yo",K0),Se(["y","yy","yyy","yyyy"],He),Se(["yo"],function(i,a,l,f){var p;l._locale._eraYearOrdinalRegex&&(p=i.match(l._locale._eraYearOrdinalRegex)),l._locale.eraYearOrdinalParse?a[He]=l._locale.eraYearOrdinalParse(i,p):a[He]=parseInt(i,10);});function R0(i,a){var l,f,p,b=this._eras||kt("en")._eras;for(l=0,f=b.length;l=0)return b[f]}function q0(i,a){var l=i.since<=i.until?1:-1;return a===void 0?t(i.since).year():t(i.since).year()+(a-i.offset)*l}function Y0(){var i,a,l,f=this.localeData().eras();for(i=0,a=f.length;ib&&(a=b),iy.call(this,i,a,l,f,p))}function iy(i,a,l,f,p){var b=cu(i,a,l,f,p),N=pn(b.year,0,b.dayOfYear);return this.year(N.getUTCFullYear()),this.month(N.getUTCMonth()),this.date(N.getUTCDate()),this}R("Q",0,"Qo","quarter"),se("Q",Fe),Se("Q",function(i,a){a[Nt]=(me(i)-1)*3;});function sy(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}R("D",["DD",2],"Do","date"),se("D",pe,Or),se("DD",pe,Pe),se("Do",function(i,a){return i?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient}),Se(["D","DD"],bt),Se("Do",function(i,a){a[bt]=me(i.match(pe)[0]);});var Iu=xr("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),se("DDD",ti),se("DDDD",cn),Se(["DDD","DDDD"],function(i,a,l){l._dayOfYear=me(i);});function oy(i){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?a:this.add(i-a,"d")}R("m",["mm",2],0,"minute"),se("m",pe,js),se("mm",pe,Pe),Se(["m","mm"],yt);var ay=xr("Minutes",!1);R("s",["ss",2],0,"second"),se("s",pe,js),se("ss",pe,Pe),Se(["s","ss"],Lt);var uy=xr("Seconds",!1);R("S",0,0,function(){return ~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return ~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return this.millisecond()*10}),R(0,["SSSSS",5],0,function(){return this.millisecond()*100}),R(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),R(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),R(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),R(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),se("S",ti,Fe),se("SS",ti,Pe),se("SSS",ti,cn);var Jt,Nu;for(Jt="SSSS";Jt.length<=9;Jt+="S")se(Jt,br);function cy(i,a){a[lr]=me(("0."+i)*1e3);}for(Jt="S";Jt.length<=9;Jt+="S")Se(Jt,cy);Nu=xr("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");function ly(){return this._isUTC?"UTC":""}function fy(){return this._isUTC?"Coordinated Universal Time":""}var H=P.prototype;H.add=n0,H.calendar=l0,H.clone=f0,H.diff=y0,H.endOf=x0,H.format=_0,H.from=F0,H.fromNow=S0,H.to=C0,H.toNow=b0,H.get=Eg,H.invalidAt=k0,H.isAfter=d0,H.isBefore=h0,H.isBetween=p0,H.isSame=m0,H.isSameOrAfter=g0,H.isSameOrBefore=D0,H.isValid=L0,H.lang=Ou,H.locale=bu,H.localeData=xu,H.max=LD,H.min=ND,H.parsingFlags=$0,H.set=_g,H.startOf=O0,H.subtract=i0,H.toArray=j0,H.toObject=I0,H.toDate=T0,H.toISOString=v0,H.inspect=E0,typeof Symbol<"u"&&Symbol.for!=null&&(H[Symbol.for("nodejs.util.inspect.custom")]=function(){return "Moment<"+this.format()+">"}),H.toJSON=N0,H.toString=w0,H.unix=M0,H.valueOf=A0,H.creationData=P0,H.eraName=Y0,H.eraNarrow=W0,H.eraAbbr=U0,H.eraYear=z0,H.year=ru,H.isLeapYear=vg,H.weekYear=Q0,H.isoWeekYear=X0,H.quarter=H.quarters=sy,H.month=au,H.daysInMonth=Tg,H.week=H.weeks=Rg,H.isoWeek=H.isoWeeks=Bg,H.weeksInYear=ry,H.weeksInWeekYear=ny,H.isoWeeksInYear=ey,H.isoWeeksInISOWeekYear=ty,H.date=Iu,H.day=H.days=Xg,H.weekday=eD,H.isoWeekday=tD,H.dayOfYear=oy,H.hour=H.hours=uD,H.minute=H.minutes=ay,H.second=H.seconds=uy,H.millisecond=H.milliseconds=Nu,H.utcOffset=UD,H.utc=HD,H.local=VD,H.parseZone=GD,H.hasAlignedHourOffset=JD,H.isDST=ZD,H.isLocal=QD,H.isUtcOffset=XD,H.isUtc=Eu,H.isUTC=Eu,H.zoneAbbr=ly,H.zoneName=fy,H.dates=te("dates accessor is deprecated. Use date instead.",Iu),H.months=te("months accessor is deprecated. Use month instead",au),H.years=te("years accessor is deprecated. Use year instead",ru),H.zone=te("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zD),H.isDSTShifted=te("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",KD);function dy(i){return be(i*1e3)}function hy(){return be.apply(null,arguments).parseZone()}function Lu(i){return i}var Ee=V.prototype;Ee.calendar=k,Ee.longDateFormat=le,Ee.invalidDate=Ce,Ee.ordinal=h,Ee.preparse=Lu,Ee.postformat=Lu,Ee.relativeTime=T,Ee.pastFuture=A,Ee.set=q,Ee.eras=R0,Ee.erasParse=B0,Ee.erasConvertYear=q0,Ee.erasAbbrRegex=V0,Ee.erasNameRegex=H0,Ee.erasNarrowRegex=G0,Ee.months=Og,Ee.monthsShort=xg,Ee.monthsParse=Mg,Ee.monthsRegex=Ig,Ee.monthsShortRegex=jg,Ee.week=Lg,Ee.firstDayOfYear=Pg,Ee.firstDayOfWeek=kg,Ee.weekdays=Gg,Ee.weekdaysMin=Zg,Ee.weekdaysShort=Jg,Ee.weekdaysParse=Qg,Ee.weekdaysRegex=rD,Ee.weekdaysShortRegex=nD,Ee.weekdaysMinRegex=iD,Ee.isPM=oD,Ee.meridiem=cD;function gi(i,a,l,f){var p=kt(),b=y().set(f,a);return p[l](b,i)}function $u(i,a,l){if(d(i)&&(a=i,i=void 0),i=i||"",a!=null)return gi(i,a,l,"month");var f,p=[];for(f=0;f<12;f++)p[f]=gi(i,f,l,"month");return p}function Js(i,a,l,f){typeof i=="boolean"?(d(a)&&(l=a,a=void 0),a=a||""):(a=i,l=a,i=!1,d(a)&&(l=a,a=void 0),a=a||"");var p=kt(),b=i?p._week.dow:0,N,ne=[];if(l!=null)return gi(a,(l+b)%7,f,"day");for(N=0;N<7;N++)ne[N]=gi(a,(N+b)%7,f,"day");return ne}function py(i,a){return $u(i,a,"months")}function my(i,a){return $u(i,a,"monthsShort")}function gy(i,a,l){return Js(i,a,l,"weekdays")}function Dy(i,a,l){return Js(i,a,l,"weekdaysShort")}function yy(i,a,l){return Js(i,a,l,"weekdaysMin")}Gt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var a=i%10,l=me(i%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return i+l}}),t.lang=te("moment.lang is deprecated. Use moment.locale instead.",Gt),t.langData=te("moment.langData is deprecated. Use moment.localeData instead.",kt);var Pt=Math.abs;function wy(){var i=this._data;return this._milliseconds=Pt(this._milliseconds),this._days=Pt(this._days),this._months=Pt(this._months),i.milliseconds=Pt(i.milliseconds),i.seconds=Pt(i.seconds),i.minutes=Pt(i.minutes),i.hours=Pt(i.hours),i.months=Pt(i.months),i.years=Pt(i.years),this}function ku(i,a,l,f){var p=wt(a,l);return i._milliseconds+=f*p._milliseconds,i._days+=f*p._days,i._months+=f*p._months,i._bubble()}function vy(i,a){return ku(this,i,a,1)}function Ey(i,a){return ku(this,i,a,-1)}function Pu(i){return i<0?Math.floor(i):Math.ceil(i)}function _y(){var i=this._milliseconds,a=this._days,l=this._months,f=this._data,p,b,N,ne,ue;return i>=0&&a>=0&&l>=0||i<=0&&a<=0&&l<=0||(i+=Pu(Zs(l)+a)*864e5,a=0,l=0),f.milliseconds=i%1e3,p=at(i/1e3),f.seconds=p%60,b=at(p/60),f.minutes=b%60,N=at(b/60),f.hours=N%24,a+=at(N/24),ue=at(Ru(a)),l+=ue,a-=Pu(Zs(ue)),ne=at(l/12),l%=12,f.days=a,f.months=l,f.years=ne,this}function Ru(i){return i*4800/146097}function Zs(i){return i*146097/4800}function Fy(i){if(!this.isValid())return NaN;var a,l,f=this._milliseconds;if(i=z(i),i==="month"||i==="quarter"||i==="year")switch(a=this._days+f/864e5,l=this._months+Ru(a),i){case"month":return l;case"quarter":return l/3;case"year":return l/12}else switch(a=this._days+Math.round(Zs(this._months)),i){case"week":return a/7+f/6048e5;case"day":return a+f/864e5;case"hour":return a*24+f/36e5;case"minute":return a*1440+f/6e4;case"second":return a*86400+f/1e3;case"millisecond":return Math.floor(a*864e5)+f;default:throw new Error("Unknown unit "+i)}}function Rt(i){return function(){return this.as(i)}}var Bu=Rt("ms"),Sy=Rt("s"),Cy=Rt("m"),by=Rt("h"),Oy=Rt("d"),xy=Rt("w"),Ay=Rt("M"),My=Rt("Q"),Ty=Rt("y"),jy=Bu;function Iy(){return wt(this)}function Ny(i){return i=z(i),this.isValid()?this[i+"s"]():NaN}function dr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Ly=dr("milliseconds"),$y=dr("seconds"),ky=dr("minutes"),Py=dr("hours"),Ry=dr("days"),By=dr("months"),qy=dr("years");function Yy(){return at(this.days()/7)}var Bt=Math.round,jr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Wy(i,a,l,f,p){return p.relativeTime(a||1,!!l,i,f)}function Uy(i,a,l,f){var p=wt(i).abs(),b=Bt(p.as("s")),N=Bt(p.as("m")),ne=Bt(p.as("h")),ue=Bt(p.as("d")),ge=Bt(p.as("M")),Ge=Bt(p.as("w")),qt=Bt(p.as("y")),Zt=b<=l.ss&&["s",b]||b0,Zt[4]=f,Wy.apply(null,Zt)}function zy(i){return i===void 0?Bt:typeof i=="function"?(Bt=i,!0):!1}function Hy(i,a){return jr[i]===void 0?!1:a===void 0?jr[i]:(jr[i]=a,i==="s"&&(jr.ss=a-1),!0)}function Vy(i,a){if(!this.isValid())return this.localeData().invalidDate();var l=!1,f=jr,p,b;return typeof i=="object"&&(a=i,i=!1),typeof i=="boolean"&&(l=i),typeof a=="object"&&(f=Object.assign({},jr,a),a.s!=null&&a.ss==null&&(f.ss=a.s-1)),p=this.localeData(),b=Uy(this,!l,f,p),l&&(b=p.pastFuture(+this,b)),p.postformat(b)}var Ks=Math.abs;function Ir(i){return (i>0)-(i<0)||+i}function Di(){if(!this.isValid())return this.localeData().invalidDate();var i=Ks(this._milliseconds)/1e3,a=Ks(this._days),l=Ks(this._months),f,p,b,N,ne=this.asSeconds(),ue,ge,Ge,qt;return ne?(f=at(i/60),p=at(f/60),i%=60,f%=60,b=at(l/12),l%=12,N=i?i.toFixed(3).replace(/\.?0+$/,""):"",ue=ne<0?"-":"",ge=Ir(this._months)!==Ir(ne)?"-":"",Ge=Ir(this._days)!==Ir(ne)?"-":"",qt=Ir(this._milliseconds)!==Ir(ne)?"-":"",ue+"P"+(b?ge+b+"Y":"")+(l?ge+l+"M":"")+(a?Ge+a+"D":"")+(p||f||i?"T":"")+(p?qt+p+"H":"")+(f?qt+f+"M":"")+(i?qt+N+"S":"")):"P0D"}var De=li.prototype;De.isValid=BD,De.abs=wy,De.add=vy,De.subtract=Ey,De.as=Fy,De.asMilliseconds=Bu,De.asSeconds=Sy,De.asMinutes=Cy,De.asHours=by,De.asDays=Oy,De.asWeeks=xy,De.asMonths=Ay,De.asQuarters=My,De.asYears=Ty,De.valueOf=jy,De._bubble=_y,De.clone=Iy,De.get=Ny,De.milliseconds=Ly,De.seconds=$y,De.minutes=ky,De.hours=Py,De.days=Ry,De.weeks=Yy,De.months=By,De.years=qy,De.humanize=Vy,De.toISOString=Di,De.toString=Di,De.toJSON=Di,De.locale=bu,De.localeData=xu,De.toIsoString=te("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Di),De.lang=Ou,R("X",0,0,"unix"),R("x",0,0,"valueOf"),se("x",ni),se("X",pg),Se("X",function(i,a,l){l._d=new Date(parseFloat(i)*1e3);}),Se("x",function(i,a,l){l._d=new Date(me(i));});return t.version="2.30.1",r(be),t.fn=H,t.min=$D,t.max=kD,t.now=PD,t.utc=y,t.unix=dy,t.months=py,t.isDate=g,t.locale=Gt,t.invalid=$,t.duration=wt,t.isMoment=J,t.weekdays=gy,t.parseZone=hy,t.localeData=kt,t.isDuration=fi,t.monthsShort=my,t.weekdaysMin=yy,t.defineLocale=Ps,t.updateLocale=hD,t.locales=pD,t.weekdaysShort=Dy,t.normalizeUnits=z,t.relativeTimeRounding=zy,t.relativeTimeThreshold=Hy,t.calendarFormat=c0,t.prototype=H,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t});});var Mo={};e1(Mo,{all:()=>uo,allLimit:()=>co,allSeries:()=>lo,any:()=>yo,anyLimit:()=>wo,anySeries:()=>vo,apply:()=>Ju,applyEach:()=>tc,applyEachSeries:()=>rc,asyncify:()=>vi,auto:()=>Fo,autoInject:()=>nc,cargo:()=>ic,cargoQueue:()=>sc,compose:()=>oc,concat:()=>ro,concatLimit:()=>En,concatSeries:()=>no,constant:()=>ac,default:()=>ow,detect:()=>io,detectLimit:()=>so,detectSeries:()=>oo,dir:()=>cc,doDuring:()=>Ei,doUntil:()=>lc,doWhilst:()=>Ei,during:()=>bi,each:()=>ao,eachLimit:()=>_i,eachOf:()=>ut,eachOfLimit:()=>vn,eachOfSeries:()=>Ot,eachSeries:()=>Fi,ensureAsync:()=>bo,every:()=>uo,everyLimit:()=>co,everySeries:()=>lo,filter:()=>fo,filterLimit:()=>ho,filterSeries:()=>po,find:()=>io,findLimit:()=>so,findSeries:()=>oo,flatMap:()=>ro,flatMapLimit:()=>En,flatMapSeries:()=>no,foldl:()=>Lr,foldr:()=>go,forEach:()=>ao,forEachLimit:()=>_i,forEachOf:()=>ut,forEachOfLimit:()=>vn,forEachOfSeries:()=>Ot,forEachSeries:()=>Fi,forever:()=>dc,groupBy:()=>hc,groupByLimit:()=>Ti,groupBySeries:()=>pc,inject:()=>Lr,log:()=>mc,map:()=>Ai,mapLimit:()=>Sn,mapSeries:()=>_o,mapValues:()=>gc,mapValuesLimit:()=>ji,mapValuesSeries:()=>Dc,memoize:()=>yc,nextTick:()=>wc,parallel:()=>vc,parallelLimit:()=>Ec,priorityQueue:()=>_c,queue:()=>xo,race:()=>Fc,reduce:()=>Lr,reduceRight:()=>go,reflect:()=>Si,reflectAll:()=>Sc,reject:()=>Cc,rejectLimit:()=>bc,rejectSeries:()=>Oc,retry:()=>Ci,retryable:()=>Mc,select:()=>fo,selectLimit:()=>ho,selectSeries:()=>po,seq:()=>Co,series:()=>Tc,setImmediate:()=>Kt,some:()=>yo,someLimit:()=>wo,someSeries:()=>vo,sortBy:()=>jc,timeout:()=>Ic,times:()=>Nc,timesLimit:()=>Ii,timesSeries:()=>Lc,transform:()=>$c,tryEach:()=>kc,unmemoize:()=>Pc,until:()=>Rc,waterfall:()=>Bc,whilst:()=>bi,wrapSync:()=>vi});function Ju(e,...t){return (...r)=>e(...t,...r)}function _n(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}function Qu(e){setTimeout(e,0);}function Xu(e){return (t,...r)=>e(()=>t(...r))}function vi(e){return Fn(e)?function(...t){let r=t.pop(),n=e.apply(this,t);return Uu(n,r)}:_n(function(t,r){var n;try{n=e.apply(this,t);}catch(s){return r(s)}if(n&&typeof n.then=="function")return Uu(n,r);r(null,n);})}function Uu(e,t){return e.then(r=>{zu(t,null,r);},r=>{zu(t,r&&(r instanceof Error||r.message)?r:new Error(r));})}function zu(e,t,r){try{e(t,r);}catch(n){Kt(s=>{throw s},n);}}function Fn(e){return e[Symbol.toStringTag]==="AsyncFunction"}function r1(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function n1(e){return typeof e[Symbol.asyncIterator]=="function"}function he(e){if(typeof e!="function")throw new Error("expected a function");return Fn(e)?vi(e):e}function fe(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");function r(...n){return typeof n[t-1]=="function"?e.apply(this,n):new Promise((s,o)=>{n[t-1]=(u,...c)=>{if(u)return o(u);s(c.length>1?c:c[0]);},e.apply(this,n);})}return r}function ec(e){return function(r,...n){return fe(function(o){var u=this;return e(r,(c,d)=>{he(c).apply(u,n.concat(d));},o)})}}function Eo(e,t,r,n){t=t||[];var s=[],o=0,u=he(r);return e(t,(c,d,g)=>{var m=o++;u(c,(D,y)=>{s[m]=y,g(D);});},c=>{n(c,s);})}function Oi(e){return e&&typeof e.length=="number"&&e.length>=0&&e.length%1===0}function Qt(e){function t(...r){if(e!==null){var n=e;e=null,n.apply(this,r);}}return Object.assign(t,e),t}function s1(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function o1(e){var t=-1,r=e.length;return function(){return ++t=t||u||s||(u=!0,e.next().then(({value:y,done:F})=>{if(!(o||s)){if(u=!1,F){s=!0,c<=0&&n(null);return}c++,r(y,d,m),d++,g();}}).catch(D));}function m(y,F){if(c-=1,!o){if(y)return D(y);if(y===!1){s=!0,o=!0;return}if(F===xi||s&&c<=0)return s=!0,n(null);g();}}function D(y){o||(u=!1,s=!0,n(y));}g();}function l1(e,t,r,n){return vt(t)(e,he(r),n)}function f1(e,t,r){r=Qt(r);var n=0,s=0,{length:o}=e,u=!1;o===0&&r(null);function c(d,g){d===!1&&(u=!0),u!==!0&&(d?r(d):(++s===o||g===xi)&&r(null));}for(;n1?s:s[0]);}return r[kr]=new Promise((n,s)=>{e=n,t=s;}),r}function Fo(e,t,r){typeof t!="number"&&(r=t,t=null),r=Qt(r||$r());var n=Object.keys(e).length;if(!n)return r(null);t||(t=n);var s={},o=0,u=!1,c=!1,d=Object.create(null),g=[],m=[],D={};Object.keys(e).forEach(w=>{var M=e[w];if(!Array.isArray(M)){y(w,[M]),m.push(w);return}var P=M.slice(0,M.length-1),J=P.length;if(J===0){y(w,M),m.push(w);return}D[w]=J,P.forEach(X=>{if(!e[X])throw new Error("async.auto task `"+w+"` has a non-existent dependency `"+X+"` in "+P.join(", "));C(X,()=>{J--,J===0&&y(w,M);});});}),$(),F();function y(w,M){g.push(()=>j(w,M));}function F(){if(!u){if(g.length===0&&o===0)return r(null,s);for(;g.length&&oP()),F();}function j(w,M){if(!c){var P=Xt((X,...te)=>{if(o--,X===!1){u=!0;return}if(te.length<2&&([te]=te),X){var L={};if(Object.keys(s).forEach(ee=>{L[ee]=s[ee];}),L[w]=te,c=!0,d=Object.create(null),u)return;r(X,L);}else s[w]=te,_(w);});o++;var J=he(M[M.length-1]);M.length>1?J(s,P):J(P);}}function $(){for(var w,M=0;m.length;)w=m.pop(),M++,x(w).forEach(P=>{--D[P]===0&&m.push(P);});if(M!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function x(w){var M=[];return Object.keys(e).forEach(P=>{let J=e[P];Array.isArray(J)&&J.indexOf(w)>=0&&M.push(P);}),M}return r[kr]}function E1(e){let t="",r=0,n=e.indexOf("*/");for(;r=0;return (O?l?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+f}var K=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ye=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,de={},Ye={};function R(i,a,l,f){var p=f;typeof f=="string"&&(p=function(){return this[f]()}),i&&(Ye[i]=p),a&&(Ye[a[0]]=function(){return G(p.apply(this,arguments),a[1],a[2])}),l&&(Ye[l]=function(){return this.localeData().ordinal(p.apply(this,arguments),i)});}function Ke(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function Ne(i){var a=i.match(K),l,f;for(l=0,f=a.length;l=0&&ye.test(i);)i=i.replace(ye,f),ye.lastIndex=0,l-=1;return i}var we={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function le(i){var a=this._longDateFormat[i],l=this._longDateFormat[i.toUpperCase()];return a||!l?a:(this._longDateFormat[i]=l.match(K).map(function(f){return f==="MMMM"||f==="MM"||f==="DD"||f==="dddd"?f.slice(1):f}).join(""),this._longDateFormat[i])}var ve="Invalid date";function Ce(){return this._invalidDate}var E="%d",S=/\d{1,2}/;function h(i){return this._ordinal.replace("%d",i)}var v={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function T(i,a,l,f){var p=this._relativeTime[l];return Z(p)?p(i,a,l,f):p.replace(/%d/i,i)}function A(i,a){var l=this._relativeTime[i>0?"future":"past"];return Z(l)?l(a):l.replace(/%s/i,a)}var b={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function z(i){return typeof i=="string"?b[i]||b[i.toLowerCase()]:void 0}function Q(i){var a={},l,f;for(f in i)o(i,f)&&(l=z(f),l&&(a[l]=i[f]));return a}var re={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ae(i){var a=[],l;for(l in i)o(i,l)&&a.push({unit:l,priority:re[l]});return a.sort(function(f,p){return f.priority-p.priority}),a}var Fe=/\d/,Pe=/\d\d/,cn=/\d{3}/,Cr=/\d{4}/,Te=/[+-]?\d{6}/,pe=/\d\d?/,Dt=/\d\d\d\d?/,ei=/\d\d\d\d\d\d?/,ti=/\d{1,3}/,Ts=/\d{1,4}/,ri=/[+-]?\d{1,6}/,Or=/\d+/,ni=/[+-]?\d+/,hg=/Z|[+-]\d\d:?\d\d/gi,ii=/Z|[+-]\d\d(?::?\d\d)?/gi,pg=/[+-]?\d+(\.\d{1,3})?/,ln=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,br=/^[1-9]\d?/,js=/^([1-9]\d|\d)/,si;si={};function se(i,a,l){si[i]=Z(a)?a:function(f,p){return f&&l?l:a};}function mg(i,a){return o(si,i)?si[i](a._strict,a._locale):new RegExp(gg(i))}function gg(i){return It(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,l,f,p,O){return l||f||p||O}))}function It(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function at(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function me(i){var a=+i,l=0;return a!==0&&isFinite(a)&&(l=at(a)),l}var Is={};function Se(i,a){var l,f=a,p;for(typeof i=="string"&&(i=[i]),d(a)&&(f=function(O,N){N[a]=me(O);}),p=i.length,l=0;l68?1900:2e3)};var ru=xr("FullYear",!0);function vg(){return oi(this.year())}function xr(i,a){return function(l){return l!=null?(nu(this,i,l),t.updateOffset(this,a),this):hn(this,i)}}function hn(i,a){if(!i.isValid())return NaN;var l=i._d,f=i._isUTC;switch(a){case"Milliseconds":return f?l.getUTCMilliseconds():l.getMilliseconds();case"Seconds":return f?l.getUTCSeconds():l.getSeconds();case"Minutes":return f?l.getUTCMinutes():l.getMinutes();case"Hours":return f?l.getUTCHours():l.getHours();case"Date":return f?l.getUTCDate():l.getDate();case"Day":return f?l.getUTCDay():l.getDay();case"Month":return f?l.getUTCMonth():l.getMonth();case"FullYear":return f?l.getUTCFullYear():l.getFullYear();default:return NaN}}function nu(i,a,l){var f,p,O,N,ne;if(!(!i.isValid()||isNaN(l))){switch(f=i._d,p=i._isUTC,a){case"Milliseconds":return void(p?f.setUTCMilliseconds(l):f.setMilliseconds(l));case"Seconds":return void(p?f.setUTCSeconds(l):f.setSeconds(l));case"Minutes":return void(p?f.setUTCMinutes(l):f.setMinutes(l));case"Hours":return void(p?f.setUTCHours(l):f.setHours(l));case"Date":return void(p?f.setUTCDate(l):f.setDate(l));case"FullYear":break;default:return}O=l,N=i.month(),ne=i.date(),ne=ne===29&&N===1&&!oi(O)?28:ne,p?f.setUTCFullYear(O,N,ne):f.setFullYear(O,N,ne);}}function Eg(i){return i=z(i),Z(this[i])?this[i]():this}function _g(i,a){if(typeof i=="object"){i=Q(i);var l=Ae(i),f,p=l.length;for(f=0;f=0?(ne=new Date(i+400,a,l,f,p,O,N),isFinite(ne.getFullYear())&&ne.setFullYear(i)):ne=new Date(i,a,l,f,p,O,N),ne}function pn(i){var a,l;return i<100&&i>=0?(l=Array.prototype.slice.call(arguments),l[0]=i+400,a=new Date(Date.UTC.apply(null,l)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(i)):a=new Date(Date.UTC.apply(null,arguments)),a}function ai(i,a,l){var f=7+a-l,p=(7+pn(i,0,f).getUTCDay()-a)%7;return -p+f-1}function cu(i,a,l,f,p){var O=(7+l-f)%7,N=ai(i,f,p),ne=1+7*(a-1)+O+N,ue,ge;return ne<=0?(ue=i-1,ge=dn(ue)+ne):ne>dn(i)?(ue=i+1,ge=ne-dn(i)):(ue=i,ge=ne),{year:ue,dayOfYear:ge}}function mn(i,a,l){var f=ai(i.year(),a,l),p=Math.floor((i.dayOfYear()-f-1)/7)+1,O,N;return p<1?(N=i.year()-1,O=p+$t(N,a,l)):p>$t(i.year(),a,l)?(O=p-$t(i.year(),a,l),N=i.year()+1):(N=i.year(),O=p),{week:O,year:N}}function $t(i,a,l){var f=ai(i,a,l),p=ai(i+1,a,l);return (dn(i)-f+p)/7}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),se("w",pe,br),se("ww",pe,Pe),se("W",pe,br),se("WW",pe,Pe),fn(["w","ww","W","WW"],function(i,a,l,f){a[f.substr(0,1)]=me(i);});function Lg(i){return mn(i,this._week.dow,this._week.doy).week}var $g={dow:0,doy:6};function kg(){return this._week.dow}function Pg(){return this._week.doy}function Rg(i){var a=this.localeData().week(this);return i==null?a:this.add((i-a)*7,"d")}function Bg(i){var a=mn(this,1,4).week;return i==null?a:this.add((i-a)*7,"d")}R("d",0,"do","day"),R("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),R("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),R("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),se("d",pe),se("e",pe),se("E",pe),se("dd",function(i,a){return a.weekdaysMinRegex(i)}),se("ddd",function(i,a){return a.weekdaysShortRegex(i)}),se("dddd",function(i,a){return a.weekdaysRegex(i)}),fn(["dd","ddd","dddd"],function(i,a,l,f){var p=l._locale.weekdaysParse(i,f,l._strict);p!=null?a.d=p:C(l).invalidWeekday=i;}),fn(["d","e","E"],function(i,a,l,f){a[f]=me(i);});function qg(i,a){return typeof i!="string"?i:isNaN(i)?(i=a.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function Yg(i,a){return typeof i=="string"?a.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Ls(i,a){return i.slice(a,7).concat(i.slice(0,a))}var Wg="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),lu="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ug="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zg=ln,Hg=ln,Vg=ln;function Gg(i,a){var l=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(a)?"format":"standalone"];return i===!0?Ls(l,this._week.dow):i?l[i.day()]:l}function Jg(i){return i===!0?Ls(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function Zg(i){return i===!0?Ls(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function Kg(i,a,l){var f,p,O,N=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)O=y([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(O,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(O,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(O,"").toLocaleLowerCase();return l?a==="dddd"?(p=Ie.call(this._weekdaysParse,N),p!==-1?p:null):a==="ddd"?(p=Ie.call(this._shortWeekdaysParse,N),p!==-1?p:null):(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null):a==="dddd"?(p=Ie.call(this._weekdaysParse,N),p!==-1||(p=Ie.call(this._shortWeekdaysParse,N),p!==-1)?p:(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null)):a==="ddd"?(p=Ie.call(this._shortWeekdaysParse,N),p!==-1||(p=Ie.call(this._weekdaysParse,N),p!==-1)?p:(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null)):(p=Ie.call(this._minWeekdaysParse,N),p!==-1||(p=Ie.call(this._weekdaysParse,N),p!==-1)?p:(p=Ie.call(this._shortWeekdaysParse,N),p!==-1?p:null))}function Qg(i,a,l){var f,p,O;if(this._weekdaysParseExact)return Kg.call(this,i,a,l);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),f=0;f<7;f++){if(p=y([2e3,1]).day(f),l&&!this._fullWeekdaysParse[f]&&(this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[f]||(O="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[f]=new RegExp(O.replace(".",""),"i")),l&&a==="dddd"&&this._fullWeekdaysParse[f].test(i))return f;if(l&&a==="ddd"&&this._shortWeekdaysParse[f].test(i))return f;if(l&&a==="dd"&&this._minWeekdaysParse[f].test(i))return f;if(!l&&this._weekdaysParse[f].test(i))return f}}function Xg(i){if(!this.isValid())return i!=null?this:NaN;var a=hn(this,"Day");return i!=null?(i=qg(i,this.localeData()),this.add(i-a,"d")):a}function eD(i){if(!this.isValid())return i!=null?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return i==null?a:this.add(i-a,"d")}function tD(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var a=Yg(i,this.localeData());return this.day(this.day()%7?a:a-7)}else return this.day()||7}function rD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=zg),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function nD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Hg),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function iD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Vg),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $s(){function i(Ge,qt){return qt.length-Ge.length}var a=[],l=[],f=[],p=[],O,N,ne,ue,ge;for(O=0;O<7;O++)N=y([2e3,1]).day(O),ne=It(this.weekdaysMin(N,"")),ue=It(this.weekdaysShort(N,"")),ge=It(this.weekdays(N,"")),a.push(ne),l.push(ue),f.push(ge),p.push(ne),p.push(ue),p.push(ge);a.sort(i),l.sort(i),f.sort(i),p.sort(i),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i");}function ks(){return this.hours()%12||12}function sD(){return this.hours()||24}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,ks),R("k",["kk",2],0,sD),R("hmm",0,0,function(){return ""+ks.apply(this)+G(this.minutes(),2)}),R("hmmss",0,0,function(){return ""+ks.apply(this)+G(this.minutes(),2)+G(this.seconds(),2)}),R("Hmm",0,0,function(){return ""+this.hours()+G(this.minutes(),2)}),R("Hmmss",0,0,function(){return ""+this.hours()+G(this.minutes(),2)+G(this.seconds(),2)});function fu(i,a){R(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)});}fu("a",!0),fu("A",!1);function du(i,a){return a._meridiemParse}se("a",du),se("A",du),se("H",pe,js),se("h",pe,br),se("k",pe,br),se("HH",pe,Pe),se("hh",pe,Pe),se("kk",pe,Pe),se("hmm",Dt),se("hmmss",ei),se("Hmm",Dt),se("Hmmss",ei),Se(["H","HH"],ke),Se(["k","kk"],function(i,a,l){var f=me(i);a[ke]=f===24?0:f;}),Se(["a","A"],function(i,a,l){l._isPm=l._locale.isPM(i),l._meridiem=i;}),Se(["h","hh"],function(i,a,l){a[ke]=me(i),C(l).bigHour=!0;}),Se("hmm",function(i,a,l){var f=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f)),C(l).bigHour=!0;}),Se("hmmss",function(i,a,l){var f=i.length-4,p=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f,2)),a[Lt]=me(i.substr(p)),C(l).bigHour=!0;}),Se("Hmm",function(i,a,l){var f=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f));}),Se("Hmmss",function(i,a,l){var f=i.length-4,p=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f,2)),a[Lt]=me(i.substr(p));});function oD(i){return (i+"").toLowerCase().charAt(0)==="p"}var aD=/[ap]\.?m?\.?/i,uD=xr("Hours",!0);function cD(i,a,l){return i>11?l?"pm":"PM":l?"am":"AM"}var hu={calendar:W,longDateFormat:we,invalidDate:ve,ordinal:E,dayOfMonthOrdinalParse:S,relativeTime:v,months:Sg,monthsShort:iu,week:$g,weekdays:Wg,weekdaysMin:Ug,weekdaysShort:lu,meridiemParse:aD},be={},gn={},Dn;function lD(i,a){var l,f=Math.min(i.length,a.length);for(l=0;l0;){if(p=ui(O.slice(0,l).join("-")),p)return p;if(f&&f.length>=l&&lD(O,f)>=l-1)break;l--;}a++;}return Dn}function dD(i){return !!(i&&i.match("^[^/\\\\]*$"))}function ui(i){var a=null,l;if(be[i]===void 0&&typeof Nr<"u"&&Nr&&Nr.exports&&dD(i))try{a=Dn._abbr,l=U,l("./locale/"+i),Gt(a);}catch{be[i]=null;}return be[i]}function Gt(i,a){var l;return i&&(c(a)?l=kt(i):l=Ps(i,a),l?Dn=l:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),Dn._abbr}function Ps(i,a){if(a!==null){var l,f=hu;if(a.abbr=i,be[i]!=null)ee("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),f=be[i]._config;else if(a.parentLocale!=null)if(be[a.parentLocale]!=null)f=be[a.parentLocale]._config;else if(l=ui(a.parentLocale),l!=null)f=l._config;else return gn[a.parentLocale]||(gn[a.parentLocale]=[]),gn[a.parentLocale].push({name:i,config:a}),null;return be[i]=new V(Y(f,a)),gn[i]&&gn[i].forEach(function(p){Ps(p.name,p.config);}),Gt(i),be[i]}else return delete be[i],null}function hD(i,a){if(a!=null){var l,f,p=hu;be[i]!=null&&be[i].parentLocale!=null?be[i].set(Y(be[i]._config,a)):(f=ui(i),f!=null&&(p=f._config),a=Y(p,a),f==null&&(a.abbr=i),l=new V(a),l.parentLocale=be[i],be[i]=l),Gt(i);}else be[i]!=null&&(be[i].parentLocale!=null?(be[i]=be[i].parentLocale,i===Gt()&&Gt(i)):be[i]!=null&&delete be[i]);return be[i]}function kt(i){var a;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return Dn;if(!n(i)){if(a=ui(i),a)return a;i=[i];}return fD(i)}function pD(){return I(be)}function Rs(i){var a,l=i._a;return l&&C(i).overflow===-2&&(a=l[Nt]<0||l[Nt]>11?Nt:l[Ot]<1||l[Ot]>Ns(l[He],l[Nt])?Ot:l[ke]<0||l[ke]>24||l[ke]===24&&(l[yt]!==0||l[Lt]!==0||l[lr]!==0)?ke:l[yt]<0||l[yt]>59?yt:l[Lt]<0||l[Lt]>59?Lt:l[lr]<0||l[lr]>999?lr:-1,C(i)._overflowDayOfYear&&(aOt)&&(a=Ot),C(i)._overflowWeeks&&a===-1&&(a=yg),C(i)._overflowWeekday&&a===-1&&(a=wg),C(i).overflow=a),i}var mD=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gD=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,DD=/Z|[+-]\d\d(?::?\d\d)?/,ci=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Bs=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yD=/^\/?Date\((-?\d+)/i,wD=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vD={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function mu(i){var a,l,f=i._i,p=mD.exec(f)||gD.exec(f),O,N,ne,ue,ge=ci.length,Ge=Bs.length;if(p){for(C(i).iso=!0,a=0,l=ge;adn(N)||i._dayOfYear===0)&&(C(i)._overflowDayOfYear=!0),l=pn(N,0,i._dayOfYear),i._a[Nt]=l.getUTCMonth(),i._a[Ot]=l.getUTCDate()),a=0;a<3&&i._a[a]==null;++a)i._a[a]=f[a]=p[a];for(;a<7;a++)i._a[a]=f[a]=i._a[a]==null?a===2?1:0:i._a[a];i._a[ke]===24&&i._a[yt]===0&&i._a[Lt]===0&&i._a[lr]===0&&(i._nextDay=!0,i._a[ke]=0),i._d=(i._useUTC?pn:Ng).apply(null,f),O=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ke]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==O&&(C(i).weekdayMismatch=!0);}}function xD(i){var a,l,f,p,O,N,ne,ue,ge;a=i._w,a.GG!=null||a.W!=null||a.E!=null?(O=1,N=4,l=Ar(a.GG,i._a[He],mn(Oe(),1,4).year),f=Ar(a.W,1),p=Ar(a.E,1),(p<1||p>7)&&(ue=!0)):(O=i._locale._week.dow,N=i._locale._week.doy,ge=mn(Oe(),O,N),l=Ar(a.gg,i._a[He],ge.year),f=Ar(a.w,ge.week),a.d!=null?(p=a.d,(p<0||p>6)&&(ue=!0)):a.e!=null?(p=a.e+O,(a.e<0||a.e>6)&&(ue=!0)):p=O),f<1||f>$t(l,O,N)?C(i)._overflowWeeks=!0:ue!=null?C(i)._overflowWeekday=!0:(ne=cu(l,f,p,O,N),i._a[He]=ne.year,i._dayOfYear=ne.dayOfYear);}t.ISO_8601=function(){},t.RFC_2822=function(){};function Ys(i){if(i._f===t.ISO_8601){mu(i);return}if(i._f===t.RFC_2822){gu(i);return}i._a=[],C(i).empty=!0;var a=""+i._i,l,f,p,O,N,ne=a.length,ue=0,ge,Ge;for(p=ie(i._f,i._locale).match(K)||[],Ge=p.length,l=0;l0&&C(i).unusedInput.push(N),a=a.slice(a.indexOf(f)+f.length),ue+=f.length),Ye[O]?(f?C(i).empty=!1:C(i).unusedTokens.push(O),Dg(O,f,i)):i._strict&&!f&&C(i).unusedTokens.push(O);C(i).charsLeftOver=ne-ue,a.length>0&&C(i).unusedInput.push(a),i._a[ke]<=12&&C(i).bigHour===!0&&i._a[ke]>0&&(C(i).bigHour=void 0),C(i).parsedDateParts=i._a.slice(0),C(i).meridiem=i._meridiem,i._a[ke]=AD(i._locale,i._a[ke],i._meridiem),ge=C(i).era,ge!==null&&(i._a[He]=i._locale.erasConvertYear(ge,i._a[He])),qs(i),Rs(i);}function AD(i,a,l){var f;return l==null?a:i.meridiemHour!=null?i.meridiemHour(a,l):(i.isPM!=null&&(f=i.isPM(l),f&&a<12&&(a+=12),!f&&a===12&&(a=0)),a)}function MD(i){var a,l,f,p,O,N,ne=!1,ue=i._f.length;if(ue===0){C(i).invalidFormat=!0,i._d=new Date(NaN);return}for(p=0;pthis?this:i:$()});function wu(i,a){var l,f;if(a.length===1&&n(a[0])&&(a=a[0]),!a.length)return Oe();for(l=a[0],f=1;fthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function KD(){if(!c(this._isDSTShifted))return this._isDSTShifted;var i={},a;return M(i,this),i=Du(i),i._a?(a=i._isUTC?y(i._a):Oe(i._a),this._isDSTShifted=this.isValid()&&YD(i._a,a.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function QD(){return this.isValid()?!this._isUTC:!1}function XD(){return this.isValid()?this._isUTC:!1}function Eu(){return this.isValid()?this._isUTC&&this._offset===0:!1}var e0=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,t0=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function wt(i,a){var l=i,f=null,p,O,N;return fi(i)?l={ms:i._milliseconds,d:i._days,M:i._months}:d(i)||!isNaN(+i)?(l={},a?l[a]=+i:l.milliseconds=+i):(f=e0.exec(i))?(p=f[1]==="-"?-1:1,l={y:0,d:me(f[Ot])*p,h:me(f[ke])*p,m:me(f[yt])*p,s:me(f[Lt])*p,ms:me(Ws(f[lr]*1e3))*p}):(f=t0.exec(i))?(p=f[1]==="-"?-1:1,l={y:fr(f[2],p),M:fr(f[3],p),w:fr(f[4],p),d:fr(f[5],p),h:fr(f[6],p),m:fr(f[7],p),s:fr(f[8],p)}):l==null?l={}:typeof l=="object"&&("from"in l||"to"in l)&&(N=r0(Oe(l.from),Oe(l.to)),l={},l.ms=N.milliseconds,l.M=N.months),O=new li(l),fi(i)&&o(i,"_locale")&&(O._locale=i._locale),fi(i)&&o(i,"_isValid")&&(O._isValid=i._isValid),O}wt.fn=li.prototype,wt.invalid=qD;function fr(i,a){var l=i&&parseFloat(i.replace(",","."));return (isNaN(l)?0:l)*a}function _u(i,a){var l={};return l.months=a.month()-i.month()+(a.year()-i.year())*12,i.clone().add(l.months,"M").isAfter(a)&&--l.months,l.milliseconds=+a-+i.clone().add(l.months,"M"),l}function r0(i,a){var l;return i.isValid()&&a.isValid()?(a=zs(a,i),i.isBefore(a)?l=_u(i,a):(l=_u(a,i),l.milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0}}function Fu(i,a){return function(l,f){var p,O;return f!==null&&!isNaN(+f)&&(ee(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),O=l,l=f,f=O),p=wt(l,f),Su(this,p,i),this}}function Su(i,a,l,f){var p=a._milliseconds,O=Ws(a._days),N=Ws(a._months);i.isValid()&&(f=f??!0,N&&ou(i,hn(i,"Month")+N*l),O&&nu(i,"Date",hn(i,"Date")+O*l),p&&i._d.setTime(i._d.valueOf()+p*l),f&&t.updateOffset(i,O||N));}var n0=Fu(1,"add"),i0=Fu(-1,"subtract");function Cu(i){return typeof i=="string"||i instanceof String}function s0(i){return J(i)||g(i)||Cu(i)||d(i)||a0(i)||o0(i)||i===null||i===void 0}function o0(i){var a=s(i)&&!u(i),l=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,O,N=f.length;for(p=0;pl.valueOf():l.valueOf()9999?Ct(l,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Z(Date.prototype.toISOString)?a?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ct(l,"Z")):Ct(l,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function E0(){if(!this.isValid())return "moment.invalid(/* "+this._i+" */)";var i="moment",a="",l,f,p,O;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",a="Z"),l="["+i+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",O=a+'[")]',this.format(l+f+p+O)}function _0(i){i||(i=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var a=Ct(this,i);return this.localeData().postformat(a)}function F0(i,a){return this.isValid()&&(J(i)&&i.isValid()||Oe(i).isValid())?wt({to:this,from:i}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function S0(i){return this.from(Oe(),i)}function C0(i,a){return this.isValid()&&(J(i)&&i.isValid()||Oe(i).isValid())?wt({from:this,to:i}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function O0(i){return this.to(Oe(),i)}function Ou(i){var a;return i===void 0?this._locale._abbr:(a=kt(i),a!=null&&(this._locale=a),this)}var bu=te("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function xu(){return this._locale}var hi=1e3,Mr=60*hi,pi=60*Mr,Au=(365*400+97)*24*pi;function Tr(i,a){return (i%a+a)%a}function Mu(i,a,l){return i<100&&i>=0?new Date(i+400,a,l)-Au:new Date(i,a,l).valueOf()}function Tu(i,a,l){return i<100&&i>=0?Date.UTC(i+400,a,l)-Au:Date.UTC(i,a,l)}function b0(i){var a,l;if(i=z(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Tu:Mu,i){case"year":a=l(this.year(),0,1);break;case"quarter":a=l(this.year(),this.month()-this.month()%3,1);break;case"month":a=l(this.year(),this.month(),1);break;case"week":a=l(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=l(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=Tr(a+(this._isUTC?0:this.utcOffset()*Mr),pi);break;case"minute":a=this._d.valueOf(),a-=Tr(a,Mr);break;case"second":a=this._d.valueOf(),a-=Tr(a,hi);break}return this._d.setTime(a),t.updateOffset(this,!0),this}function x0(i){var a,l;if(i=z(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Tu:Mu,i){case"year":a=l(this.year()+1,0,1)-1;break;case"quarter":a=l(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=l(this.year(),this.month()+1,1)-1;break;case"week":a=l(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=l(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=pi-Tr(a+(this._isUTC?0:this.utcOffset()*Mr),pi)-1;break;case"minute":a=this._d.valueOf(),a+=Mr-Tr(a,Mr)-1;break;case"second":a=this._d.valueOf(),a+=hi-Tr(a,hi)-1;break}return this._d.setTime(a),t.updateOffset(this,!0),this}function A0(){return this._d.valueOf()-(this._offset||0)*6e4}function M0(){return Math.floor(this.valueOf()/1e3)}function T0(){return new Date(this.valueOf())}function j0(){var i=this;return [i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function I0(){var i=this;return {years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function N0(){return this.isValid()?this.toISOString():null}function L0(){return j(this)}function $0(){return D({},C(this))}function k0(){return C(this).overflow}function P0(){return {input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),se("N",Vs),se("NN",Vs),se("NNN",Vs),se("NNNN",J0),se("NNNNN",Z0),Se(["N","NN","NNN","NNNN","NNNNN"],function(i,a,l,f){var p=l._locale.erasParse(i,f,l._strict);p?C(l).era=p:C(l).invalidEra=i;}),se("y",Or),se("yy",Or),se("yyy",Or),se("yyyy",Or),se("yo",K0),Se(["y","yy","yyy","yyyy"],He),Se(["yo"],function(i,a,l,f){var p;l._locale._eraYearOrdinalRegex&&(p=i.match(l._locale._eraYearOrdinalRegex)),l._locale.eraYearOrdinalParse?a[He]=l._locale.eraYearOrdinalParse(i,p):a[He]=parseInt(i,10);});function R0(i,a){var l,f,p,O=this._eras||kt("en")._eras;for(l=0,f=O.length;l=0)return O[f]}function q0(i,a){var l=i.since<=i.until?1:-1;return a===void 0?t(i.since).year():t(i.since).year()+(a-i.offset)*l}function Y0(){var i,a,l,f=this.localeData().eras();for(i=0,a=f.length;iO&&(a=O),iy.call(this,i,a,l,f,p))}function iy(i,a,l,f,p){var O=cu(i,a,l,f,p),N=pn(O.year,0,O.dayOfYear);return this.year(N.getUTCFullYear()),this.month(N.getUTCMonth()),this.date(N.getUTCDate()),this}R("Q",0,"Qo","quarter"),se("Q",Fe),Se("Q",function(i,a){a[Nt]=(me(i)-1)*3;});function sy(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}R("D",["DD",2],"Do","date"),se("D",pe,br),se("DD",pe,Pe),se("Do",function(i,a){return i?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient}),Se(["D","DD"],Ot),Se("Do",function(i,a){a[Ot]=me(i.match(pe)[0]);});var Iu=xr("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),se("DDD",ti),se("DDDD",cn),Se(["DDD","DDDD"],function(i,a,l){l._dayOfYear=me(i);});function oy(i){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?a:this.add(i-a,"d")}R("m",["mm",2],0,"minute"),se("m",pe,js),se("mm",pe,Pe),Se(["m","mm"],yt);var ay=xr("Minutes",!1);R("s",["ss",2],0,"second"),se("s",pe,js),se("ss",pe,Pe),Se(["s","ss"],Lt);var uy=xr("Seconds",!1);R("S",0,0,function(){return ~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return ~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return this.millisecond()*10}),R(0,["SSSSS",5],0,function(){return this.millisecond()*100}),R(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),R(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),R(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),R(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),se("S",ti,Fe),se("SS",ti,Pe),se("SSS",ti,cn);var Jt,Nu;for(Jt="SSSS";Jt.length<=9;Jt+="S")se(Jt,Or);function cy(i,a){a[lr]=me(("0."+i)*1e3);}for(Jt="S";Jt.length<=9;Jt+="S")Se(Jt,cy);Nu=xr("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");function ly(){return this._isUTC?"UTC":""}function fy(){return this._isUTC?"Coordinated Universal Time":""}var H=P.prototype;H.add=n0,H.calendar=l0,H.clone=f0,H.diff=y0,H.endOf=x0,H.format=_0,H.from=F0,H.fromNow=S0,H.to=C0,H.toNow=O0,H.get=Eg,H.invalidAt=k0,H.isAfter=d0,H.isBefore=h0,H.isBetween=p0,H.isSame=m0,H.isSameOrAfter=g0,H.isSameOrBefore=D0,H.isValid=L0,H.lang=bu,H.locale=Ou,H.localeData=xu,H.max=LD,H.min=ND,H.parsingFlags=$0,H.set=_g,H.startOf=b0,H.subtract=i0,H.toArray=j0,H.toObject=I0,H.toDate=T0,H.toISOString=v0,H.inspect=E0,typeof Symbol<"u"&&Symbol.for!=null&&(H[Symbol.for("nodejs.util.inspect.custom")]=function(){return "Moment<"+this.format()+">"}),H.toJSON=N0,H.toString=w0,H.unix=M0,H.valueOf=A0,H.creationData=P0,H.eraName=Y0,H.eraNarrow=W0,H.eraAbbr=U0,H.eraYear=z0,H.year=ru,H.isLeapYear=vg,H.weekYear=Q0,H.isoWeekYear=X0,H.quarter=H.quarters=sy,H.month=au,H.daysInMonth=Tg,H.week=H.weeks=Rg,H.isoWeek=H.isoWeeks=Bg,H.weeksInYear=ry,H.weeksInWeekYear=ny,H.isoWeeksInYear=ey,H.isoWeeksInISOWeekYear=ty,H.date=Iu,H.day=H.days=Xg,H.weekday=eD,H.isoWeekday=tD,H.dayOfYear=oy,H.hour=H.hours=uD,H.minute=H.minutes=ay,H.second=H.seconds=uy,H.millisecond=H.milliseconds=Nu,H.utcOffset=UD,H.utc=HD,H.local=VD,H.parseZone=GD,H.hasAlignedHourOffset=JD,H.isDST=ZD,H.isLocal=QD,H.isUtcOffset=XD,H.isUtc=Eu,H.isUTC=Eu,H.zoneAbbr=ly,H.zoneName=fy,H.dates=te("dates accessor is deprecated. Use date instead.",Iu),H.months=te("months accessor is deprecated. Use month instead",au),H.years=te("years accessor is deprecated. Use year instead",ru),H.zone=te("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zD),H.isDSTShifted=te("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",KD);function dy(i){return Oe(i*1e3)}function hy(){return Oe.apply(null,arguments).parseZone()}function Lu(i){return i}var Ee=V.prototype;Ee.calendar=k,Ee.longDateFormat=le,Ee.invalidDate=Ce,Ee.ordinal=h,Ee.preparse=Lu,Ee.postformat=Lu,Ee.relativeTime=T,Ee.pastFuture=A,Ee.set=q,Ee.eras=R0,Ee.erasParse=B0,Ee.erasConvertYear=q0,Ee.erasAbbrRegex=V0,Ee.erasNameRegex=H0,Ee.erasNarrowRegex=G0,Ee.months=bg,Ee.monthsShort=xg,Ee.monthsParse=Mg,Ee.monthsRegex=Ig,Ee.monthsShortRegex=jg,Ee.week=Lg,Ee.firstDayOfYear=Pg,Ee.firstDayOfWeek=kg,Ee.weekdays=Gg,Ee.weekdaysMin=Zg,Ee.weekdaysShort=Jg,Ee.weekdaysParse=Qg,Ee.weekdaysRegex=rD,Ee.weekdaysShortRegex=nD,Ee.weekdaysMinRegex=iD,Ee.isPM=oD,Ee.meridiem=cD;function gi(i,a,l,f){var p=kt(),O=y().set(f,a);return p[l](O,i)}function $u(i,a,l){if(d(i)&&(a=i,i=void 0),i=i||"",a!=null)return gi(i,a,l,"month");var f,p=[];for(f=0;f<12;f++)p[f]=gi(i,f,l,"month");return p}function Js(i,a,l,f){typeof i=="boolean"?(d(a)&&(l=a,a=void 0),a=a||""):(a=i,l=a,i=!1,d(a)&&(l=a,a=void 0),a=a||"");var p=kt(),O=i?p._week.dow:0,N,ne=[];if(l!=null)return gi(a,(l+O)%7,f,"day");for(N=0;N<7;N++)ne[N]=gi(a,(N+O)%7,f,"day");return ne}function py(i,a){return $u(i,a,"months")}function my(i,a){return $u(i,a,"monthsShort")}function gy(i,a,l){return Js(i,a,l,"weekdays")}function Dy(i,a,l){return Js(i,a,l,"weekdaysShort")}function yy(i,a,l){return Js(i,a,l,"weekdaysMin")}Gt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var a=i%10,l=me(i%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return i+l}}),t.lang=te("moment.lang is deprecated. Use moment.locale instead.",Gt),t.langData=te("moment.langData is deprecated. Use moment.localeData instead.",kt);var Pt=Math.abs;function wy(){var i=this._data;return this._milliseconds=Pt(this._milliseconds),this._days=Pt(this._days),this._months=Pt(this._months),i.milliseconds=Pt(i.milliseconds),i.seconds=Pt(i.seconds),i.minutes=Pt(i.minutes),i.hours=Pt(i.hours),i.months=Pt(i.months),i.years=Pt(i.years),this}function ku(i,a,l,f){var p=wt(a,l);return i._milliseconds+=f*p._milliseconds,i._days+=f*p._days,i._months+=f*p._months,i._bubble()}function vy(i,a){return ku(this,i,a,1)}function Ey(i,a){return ku(this,i,a,-1)}function Pu(i){return i<0?Math.floor(i):Math.ceil(i)}function _y(){var i=this._milliseconds,a=this._days,l=this._months,f=this._data,p,O,N,ne,ue;return i>=0&&a>=0&&l>=0||i<=0&&a<=0&&l<=0||(i+=Pu(Zs(l)+a)*864e5,a=0,l=0),f.milliseconds=i%1e3,p=at(i/1e3),f.seconds=p%60,O=at(p/60),f.minutes=O%60,N=at(O/60),f.hours=N%24,a+=at(N/24),ue=at(Ru(a)),l+=ue,a-=Pu(Zs(ue)),ne=at(l/12),l%=12,f.days=a,f.months=l,f.years=ne,this}function Ru(i){return i*4800/146097}function Zs(i){return i*146097/4800}function Fy(i){if(!this.isValid())return NaN;var a,l,f=this._milliseconds;if(i=z(i),i==="month"||i==="quarter"||i==="year")switch(a=this._days+f/864e5,l=this._months+Ru(a),i){case"month":return l;case"quarter":return l/3;case"year":return l/12}else switch(a=this._days+Math.round(Zs(this._months)),i){case"week":return a/7+f/6048e5;case"day":return a+f/864e5;case"hour":return a*24+f/36e5;case"minute":return a*1440+f/6e4;case"second":return a*86400+f/1e3;case"millisecond":return Math.floor(a*864e5)+f;default:throw new Error("Unknown unit "+i)}}function Rt(i){return function(){return this.as(i)}}var Bu=Rt("ms"),Sy=Rt("s"),Cy=Rt("m"),Oy=Rt("h"),by=Rt("d"),xy=Rt("w"),Ay=Rt("M"),My=Rt("Q"),Ty=Rt("y"),jy=Bu;function Iy(){return wt(this)}function Ny(i){return i=z(i),this.isValid()?this[i+"s"]():NaN}function dr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Ly=dr("milliseconds"),$y=dr("seconds"),ky=dr("minutes"),Py=dr("hours"),Ry=dr("days"),By=dr("months"),qy=dr("years");function Yy(){return at(this.days()/7)}var Bt=Math.round,jr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Wy(i,a,l,f,p){return p.relativeTime(a||1,!!l,i,f)}function Uy(i,a,l,f){var p=wt(i).abs(),O=Bt(p.as("s")),N=Bt(p.as("m")),ne=Bt(p.as("h")),ue=Bt(p.as("d")),ge=Bt(p.as("M")),Ge=Bt(p.as("w")),qt=Bt(p.as("y")),Zt=O<=l.ss&&["s",O]||O0,Zt[4]=f,Wy.apply(null,Zt)}function zy(i){return i===void 0?Bt:typeof i=="function"?(Bt=i,!0):!1}function Hy(i,a){return jr[i]===void 0?!1:a===void 0?jr[i]:(jr[i]=a,i==="s"&&(jr.ss=a-1),!0)}function Vy(i,a){if(!this.isValid())return this.localeData().invalidDate();var l=!1,f=jr,p,O;return typeof i=="object"&&(a=i,i=!1),typeof i=="boolean"&&(l=i),typeof a=="object"&&(f=Object.assign({},jr,a),a.s!=null&&a.ss==null&&(f.ss=a.s-1)),p=this.localeData(),O=Uy(this,!l,f,p),l&&(O=p.pastFuture(+this,O)),p.postformat(O)}var Ks=Math.abs;function Ir(i){return (i>0)-(i<0)||+i}function Di(){if(!this.isValid())return this.localeData().invalidDate();var i=Ks(this._milliseconds)/1e3,a=Ks(this._days),l=Ks(this._months),f,p,O,N,ne=this.asSeconds(),ue,ge,Ge,qt;return ne?(f=at(i/60),p=at(f/60),i%=60,f%=60,O=at(l/12),l%=12,N=i?i.toFixed(3).replace(/\.?0+$/,""):"",ue=ne<0?"-":"",ge=Ir(this._months)!==Ir(ne)?"-":"",Ge=Ir(this._days)!==Ir(ne)?"-":"",qt=Ir(this._milliseconds)!==Ir(ne)?"-":"",ue+"P"+(O?ge+O+"Y":"")+(l?ge+l+"M":"")+(a?Ge+a+"D":"")+(p||f||i?"T":"")+(p?qt+p+"H":"")+(f?qt+f+"M":"")+(i?qt+N+"S":"")):"P0D"}var De=li.prototype;De.isValid=BD,De.abs=wy,De.add=vy,De.subtract=Ey,De.as=Fy,De.asMilliseconds=Bu,De.asSeconds=Sy,De.asMinutes=Cy,De.asHours=Oy,De.asDays=by,De.asWeeks=xy,De.asMonths=Ay,De.asQuarters=My,De.asYears=Ty,De.valueOf=jy,De._bubble=_y,De.clone=Iy,De.get=Ny,De.milliseconds=Ly,De.seconds=$y,De.minutes=ky,De.hours=Py,De.days=Ry,De.weeks=Yy,De.months=By,De.years=qy,De.humanize=Vy,De.toISOString=Di,De.toString=Di,De.toJSON=Di,De.locale=Ou,De.localeData=xu,De.toIsoString=te("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Di),De.lang=bu,R("X",0,0,"unix"),R("x",0,0,"valueOf"),se("x",ni),se("X",pg),Se("X",function(i,a,l){l._d=new Date(parseFloat(i)*1e3);}),Se("x",function(i,a,l){l._d=new Date(me(i));});return t.version="2.30.1",r(Oe),t.fn=H,t.min=$D,t.max=kD,t.now=PD,t.utc=y,t.unix=dy,t.months=py,t.isDate=g,t.locale=Gt,t.invalid=$,t.duration=wt,t.isMoment=J,t.weekdays=gy,t.parseZone=hy,t.localeData=kt,t.isDuration=fi,t.monthsShort=my,t.weekdaysMin=yy,t.defineLocale=Ps,t.updateLocale=hD,t.locales=pD,t.weekdaysShort=Dy,t.normalizeUnits=z,t.relativeTimeRounding=zy,t.relativeTimeThreshold=Hy,t.calendarFormat=c0,t.prototype=H,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t});});var Mo={};e1(Mo,{all:()=>uo,allLimit:()=>co,allSeries:()=>lo,any:()=>yo,anyLimit:()=>wo,anySeries:()=>vo,apply:()=>Ju,applyEach:()=>tc,applyEachSeries:()=>rc,asyncify:()=>vi,auto:()=>Fo,autoInject:()=>nc,cargo:()=>ic,cargoQueue:()=>sc,compose:()=>oc,concat:()=>ro,concatLimit:()=>En,concatSeries:()=>no,constant:()=>ac,default:()=>ow,detect:()=>io,detectLimit:()=>so,detectSeries:()=>oo,dir:()=>cc,doDuring:()=>Ei,doUntil:()=>lc,doWhilst:()=>Ei,during:()=>Oi,each:()=>ao,eachLimit:()=>_i,eachOf:()=>ut,eachOfLimit:()=>vn,eachOfSeries:()=>bt,eachSeries:()=>Fi,ensureAsync:()=>Oo,every:()=>uo,everyLimit:()=>co,everySeries:()=>lo,filter:()=>fo,filterLimit:()=>ho,filterSeries:()=>po,find:()=>io,findLimit:()=>so,findSeries:()=>oo,flatMap:()=>ro,flatMapLimit:()=>En,flatMapSeries:()=>no,foldl:()=>Lr,foldr:()=>go,forEach:()=>ao,forEachLimit:()=>_i,forEachOf:()=>ut,forEachOfLimit:()=>vn,forEachOfSeries:()=>bt,forEachSeries:()=>Fi,forever:()=>dc,groupBy:()=>hc,groupByLimit:()=>Ti,groupBySeries:()=>pc,inject:()=>Lr,log:()=>mc,map:()=>Ai,mapLimit:()=>Sn,mapSeries:()=>_o,mapValues:()=>gc,mapValuesLimit:()=>ji,mapValuesSeries:()=>Dc,memoize:()=>yc,nextTick:()=>wc,parallel:()=>vc,parallelLimit:()=>Ec,priorityQueue:()=>_c,queue:()=>xo,race:()=>Fc,reduce:()=>Lr,reduceRight:()=>go,reflect:()=>Si,reflectAll:()=>Sc,reject:()=>Cc,rejectLimit:()=>Oc,rejectSeries:()=>bc,retry:()=>Ci,retryable:()=>Mc,select:()=>fo,selectLimit:()=>ho,selectSeries:()=>po,seq:()=>Co,series:()=>Tc,setImmediate:()=>Kt,some:()=>yo,someLimit:()=>wo,someSeries:()=>vo,sortBy:()=>jc,timeout:()=>Ic,times:()=>Nc,timesLimit:()=>Ii,timesSeries:()=>Lc,transform:()=>$c,tryEach:()=>kc,unmemoize:()=>Pc,until:()=>Rc,waterfall:()=>Bc,whilst:()=>Oi,wrapSync:()=>vi});function Ju(e,...t){return (...r)=>e(...t,...r)}function _n(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}function Qu(e){setTimeout(e,0);}function Xu(e){return (t,...r)=>e(()=>t(...r))}function vi(e){return Fn(e)?function(...t){let r=t.pop(),n=e.apply(this,t);return Uu(n,r)}:_n(function(t,r){var n;try{n=e.apply(this,t);}catch(s){return r(s)}if(n&&typeof n.then=="function")return Uu(n,r);r(null,n);})}function Uu(e,t){return e.then(r=>{zu(t,null,r);},r=>{zu(t,r&&(r instanceof Error||r.message)?r:new Error(r));})}function zu(e,t,r){try{e(t,r);}catch(n){Kt(s=>{throw s},n);}}function Fn(e){return e[Symbol.toStringTag]==="AsyncFunction"}function r1(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function n1(e){return typeof e[Symbol.asyncIterator]=="function"}function he(e){if(typeof e!="function")throw new Error("expected a function");return Fn(e)?vi(e):e}function fe(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");function r(...n){return typeof n[t-1]=="function"?e.apply(this,n):new Promise((s,o)=>{n[t-1]=(u,...c)=>{if(u)return o(u);s(c.length>1?c:c[0]);},e.apply(this,n);})}return r}function ec(e){return function(r,...n){return fe(function(o){var u=this;return e(r,(c,d)=>{he(c).apply(u,n.concat(d));},o)})}}function Eo(e,t,r,n){t=t||[];var s=[],o=0,u=he(r);return e(t,(c,d,g)=>{var m=o++;u(c,(D,y)=>{s[m]=y,g(D);});},c=>{n(c,s);})}function bi(e){return e&&typeof e.length=="number"&&e.length>=0&&e.length%1===0}function Qt(e){function t(...r){if(e!==null){var n=e;e=null,n.apply(this,r);}}return Object.assign(t,e),t}function s1(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function o1(e){var t=-1,r=e.length;return function(){return ++t=t||u||s||(u=!0,e.next().then(({value:y,done:F})=>{if(!(o||s)){if(u=!1,F){s=!0,c<=0&&n(null);return}c++,r(y,d,m),d++,g();}}).catch(D));}function m(y,F){if(c-=1,!o){if(y)return D(y);if(y===!1){s=!0,o=!0;return}if(F===xi||s&&c<=0)return s=!0,n(null);g();}}function D(y){o||(u=!1,s=!0,n(y));}g();}function l1(e,t,r,n){return vt(t)(e,he(r),n)}function f1(e,t,r){r=Qt(r);var n=0,s=0,{length:o}=e,u=!1;o===0&&r(null);function c(d,g){d===!1&&(u=!0),u!==!0&&(d?r(d):(++s===o||g===xi)&&r(null));}for(;n1?s:s[0]);}return r[kr]=new Promise((n,s)=>{e=n,t=s;}),r}function Fo(e,t,r){typeof t!="number"&&(r=t,t=null),r=Qt(r||$r());var n=Object.keys(e).length;if(!n)return r(null);t||(t=n);var s={},o=0,u=!1,c=!1,d=Object.create(null),g=[],m=[],D={};Object.keys(e).forEach(w=>{var M=e[w];if(!Array.isArray(M)){y(w,[M]),m.push(w);return}var P=M.slice(0,M.length-1),J=P.length;if(J===0){y(w,M),m.push(w);return}D[w]=J,P.forEach(X=>{if(!e[X])throw new Error("async.auto task `"+w+"` has a non-existent dependency `"+X+"` in "+P.join(", "));C(X,()=>{J--,J===0&&y(w,M);});});}),$(),F();function y(w,M){g.push(()=>j(w,M));}function F(){if(!u){if(g.length===0&&o===0)return r(null,s);for(;g.length&&oP()),F();}function j(w,M){if(!c){var P=Xt((X,...te)=>{if(o--,X===!1){u=!0;return}if(te.length<2&&([te]=te),X){var L={};if(Object.keys(s).forEach(ee=>{L[ee]=s[ee];}),L[w]=te,c=!0,d=Object.create(null),u)return;r(X,L);}else s[w]=te,_(w);});o++;var J=he(M[M.length-1]);M.length>1?J(s,P):J(P);}}function $(){for(var w,M=0;m.length;)w=m.pop(),M++,x(w).forEach(P=>{--D[P]===0&&m.push(P);});if(M!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function x(w){var M=[];return Object.keys(e).forEach(P=>{let J=e[P];Array.isArray(J)&&J.indexOf(w)>=0&&M.push(P);}),M}return r[kr]}function E1(e){let t="",r=0,n=e.indexOf("*/");for(;rs.replace(v1,"").trim())}function nc(e,t){var r={};return Object.keys(e).forEach(n=>{var s=e[n],o,u=Fn(s),c=!u&&s.length===1||u&&s.length===0;if(Array.isArray(s))o=[...s],s=o.pop(),r[n]=o.concat(o.length>0?d:s);else if(c)r[n]=s;else {if(o=_1(s),s.length===0&&!u&&o.length===0)throw new Error("autoInject task functions require explicit parameters.");u||o.pop(),r[n]=o.concat(d);}function d(g,m){var D=o.map(y=>g[y]);D.push(m),he(s)(...D);}}),Fo(r,t)}function Vu(e,t){e.length=1,e.head=e.tail=t;}function So(e,t,r){if(t==null)t=1;else if(t===0)throw new RangeError("Concurrency must not be zero");var n=he(e),s=0,o=[];let u={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function c(x,w){u[x].push(w);}function d(x,w){let M=(...P)=>{g(x,M),w(...P);};u[x].push(M);}function g(x,w){if(!x)return Object.keys(u).forEach(M=>u[M]=[]);if(!w)return u[x]=[];u[x]=u[x].filter(M=>M!==w);}function m(x,...w){u[x].forEach(M=>M(...w));}var D=!1;function y(x,w,M,P){if(P!=null&&typeof P!="function")throw new Error("task callback must be a function");$.started=!0;var J,X;function te(ee,...Z){if(ee)return M?X(ee):J();if(Z.length<=1)return J(Z[0]);J(Z);}var L=$._createTaskItem(x,M?te:P||te);if(w?$._tasks.unshift(L):$._tasks.push(L),D||(D=!0,Kt(()=>{D=!1,$.process();})),M||!P)return new Promise((ee,Z)=>{J=ee,X=Z;})}function F(x){return function(w,...M){s-=1;for(var P=0,J=x.length;P0&&o.splice(te,1),X.callback(w,...M),w!=null&&m("error",w,X.data);}s<=$.concurrency-$.buffer&&m("unsaturated"),$.idle()&&m("drain"),$.process();}}function C(x){return x.length===0&&$.idle()?(Kt(()=>m("drain")),!0):!1}let _=x=>w=>{if(!w)return new Promise((M,P)=>{d(x,(J,X)=>{if(J)return P(J);M(X);});});g(x),c(x,w);};var j=!1,$={_tasks:new to,_createTaskItem(x,w){return {data:x,callback:w}},*[Symbol.iterator](){yield*$._tasks[Symbol.iterator]();},concurrency:t,payload:r,buffer:t/4,started:!1,paused:!1,push(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!1,!1,w)):y(x,!1,!1,w)},pushAsync(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!1,!0,w)):y(x,!1,!0,w)},kill(){g(),$._tasks.empty();},unshift(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!0,!1,w)):y(x,!0,!1,w)},unshiftAsync(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!0,!0,w)):y(x,!0,!0,w)},remove(x){$._tasks.remove(x);},process(){if(!j){for(j=!0;!$.paused&&s<$.concurrency&&$._tasks.length;){var x=[],w=[],M=$._tasks.length;$.payload&&(M=Math.min(M,$.payload));for(var P=0;P{s(t,o,(d,g)=>{t=g,c(d);});},o=>n(o,t))}function Co(...e){var t=e.map(he);return function(...r){var n=this,s=r[r.length-1];return typeof s=="function"?r.pop():s=$r(),Lr(t,r,(o,u,c)=>{u.apply(n,o.concat((d,...g)=>{c(d,g);}));},(o,u)=>s(o,...u)),s[kr]}}function oc(...e){return Co(...e.reverse())}function S1(e,t,r,n){return Eo(vt(t),e,r,n)}function C1(e,t,r,n){var s=he(r);return Sn(e,t,(o,u)=>{s(o,(c,...d)=>c?u(c):u(c,d));},(o,u)=>{for(var c=[],d=0;d{var u=!1,c;let d=he(s);r(n,(g,m,D)=>{d(g,(y,F)=>{if(y||y===!1)return D(y);if(e(F)&&!c)return u=!0,c=t(!0,g),D(null,xi);D();});},g=>{if(g)return o(g);o(null,u?c:t(!1));});}}function x1(e,t,r){return Yt(n=>n,(n,s)=>s)(ut,e,t,r)}function A1(e,t,r,n){return Yt(s=>s,(s,o)=>o)(vt(t),e,r,n)}function M1(e,t,r){return Yt(n=>n,(n,s)=>s)(vt(1),e,t,r)}function uc(e){return (t,...r)=>he(t)(...r,(n,...s)=>{typeof console=="object"&&(n?console.error&&console.error(n):console[e]&&s.forEach(o=>console[e](o)));})}function T1(e,t,r){r=Xt(r);var n=he(e),s=he(t),o;function u(d,...g){if(d)return r(d);d!==!1&&(o=g,s(...g,c));}function c(d,g){if(d)return r(d);if(d!==!1){if(!g)return r(null,...o);n(u);}}return c(null,!0)}function lc(e,t,r){let n=he(t);return Ei(e,(...s)=>{let o=s.pop();n(...s,(u,c)=>o(u,!c));},r)}function fc(e){return (t,r,n)=>e(t,n)}function j1(e,t,r){return ut(e,fc(he(t)),r)}function I1(e,t,r,n){return vt(t)(e,fc(he(r)),n)}function N1(e,t,r){return _i(e,1,t,r)}function bo(e){return Fn(e)?e:function(...t){var r=t.pop(),n=!0;t.push((...s)=>{n?Kt(()=>r(...s)):r(...s);}),e.apply(this,t),n=!1;}}function L1(e,t,r){return Yt(n=>!n,n=>!n)(ut,e,t,r)}function $1(e,t,r,n){return Yt(s=>!s,s=>!s)(vt(t),e,r,n)}function k1(e,t,r){return Yt(n=>!n,n=>!n)(Ot,e,t,r)}function P1(e,t,r,n){var s=new Array(t.length);e(t,(o,u,c)=>{r(o,(d,g)=>{s[u]=!!g,c(d);});},o=>{if(o)return n(o);for(var u=[],c=0;c{r(o,(d,g)=>{if(d)return c(d);g&&s.push({index:u,value:o}),c(d);});},o=>{if(o)return n(o);n(null,s.sort((u,c)=>u.index-c.index).map(u=>u.value));});}function Mi(e,t,r,n){var s=Oi(t)?P1:R1;return s(e,t,he(r),n)}function B1(e,t,r){return Mi(ut,e,t,r)}function q1(e,t,r,n){return Mi(vt(t),e,r,n)}function Y1(e,t,r){return Mi(Ot,e,t,r)}function W1(e,t){var r=Xt(t),n=he(bo(e));function s(o){if(o)return r(o);o!==!1&&n(s);}return s()}function U1(e,t,r,n){var s=he(r);return Sn(e,t,(o,u)=>{s(o,(c,d)=>c?u(c):u(c,{key:d,val:o}));},(o,u)=>{for(var c={},{hasOwnProperty:d}=Object.prototype,g=0;g{o(u,c,(g,m)=>{if(g)return d(g);s[c]=m,d(g);});},u=>n(u,s))}function gc(e,t,r){return ji(e,1/0,t,r)}function Dc(e,t,r){return ji(e,1,t,r)}function yc(e,t=r=>r){var r=Object.create(null),n=Object.create(null),s=he(e),o=_n((u,c)=>{var d=t(...u);d in r?Kt(()=>c(null,...r[d])):d in n?n[d].push(c):(n[d]=[c],s(...u,(g,...m)=>{g||(r[d]=m);var D=n[d];delete n[d];for(var y=0,F=D.length;y{r(n[0],s);},t,1)}function H1(e){return (e<<1)+1}function Gu(e){return (e+1>>1)-1}function eo(e,t){return e.priority!==t.priority?e.priority({data:u,priority:c,callback:d});function o(u,c){return Array.isArray(u)?u.map(d=>({data:d,priority:c})):{data:u,priority:c}}return r.push=function(u,c=0,d){return n(o(u,c),d)},r.pushAsync=function(u,c=0,d){return s(o(u,c),d)},delete r.unshift,delete r.unshiftAsync,r}function V1(e,t){if(t=Qt(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r{let c={};if(o&&(c.error=o),u.length>0){var d=u;u.length<=1&&([d]=u),c.value=d;}s(null,c);}),t.apply(this,n)})}function Sc(e){var t;return Array.isArray(e)?t=e.map(Si):(t={},Object.keys(e).forEach(r=>{t[r]=Si.call(this,e[r]);})),t}function Ao(e,t,r,n){let s=he(r);return Mi(e,t,(o,u)=>{s(o,(c,d)=>{u(c,!d);});},n)}function G1(e,t,r){return Ao(ut,e,t,r)}function J1(e,t,r,n){return Ao(vt(t),e,r,n)}function Z1(e,t,r){return Ao(Ot,e,t,r)}function xc(e){return function(){return e}}function Ci(e,t,r){var n={times:Do,intervalFunc:xc(Ac)};if(arguments.length<3&&typeof e=="function"?(r=t||$r(),t=e):(K1(n,e),r=r||$r()),typeof t!="function")throw new Error("Invalid arguments for async.retry");var s=he(t),o=1;function u(){s((c,...d)=>{c!==!1&&(c&&o++{(s.lengthn)(ut,e,t,r)}function X1(e,t,r,n){return Yt(Boolean,s=>s)(vt(t),e,r,n)}function ew(e,t,r){return Yt(Boolean,n=>n)(Ot,e,t,r)}function tw(e,t,r){var n=he(t);return Ai(e,(o,u)=>{n(o,(c,d)=>{if(c)return u(c);u(c,{value:o,criteria:d});});},(o,u)=>{if(o)return r(o);r(null,u.sort(s).map(c=>c.value));});function s(o,u){var c=o.criteria,d=u.criteria;return cd?1:0}}function Ic(e,t,r){var n=he(e);return _n((s,o)=>{var u=!1,c;function d(){var g=e.name||"anonymous",m=new Error('Callback function "'+g+'" timed out.');m.code="ETIMEDOUT",r&&(m.info=r),u=!0,o(m);}s.push((...g)=>{u||(o(...g),clearTimeout(c));}),c=setTimeout(d,t),n(...s);})}function rw(e){for(var t=Array(e);e--;)t[e]=e;return t}function Ii(e,t,r,n){var s=he(r);return Sn(rw(e),t,s,n)}function Nc(e,t,r){return Ii(e,1/0,t,r)}function Lc(e,t,r){return Ii(e,1,t,r)}function $c(e,t,r,n){arguments.length<=3&&typeof t=="function"&&(n=r,r=t,t=Array.isArray(e)?[]:{}),n=Qt(n||$r());var s=he(r);return ut(e,(o,u,c)=>{s(t,o,u,c);},o=>n(o,t)),n[kr]}function nw(e,t){var r=null,n;return Fi(e,(s,o)=>{he(s)((u,...c)=>{if(u===!1)return o(u);c.length<2?[n]=c:n=c,r=u,o(u?null:{});});},()=>t(r,n))}function Pc(e){return (...t)=>(e.unmemoized||e)(...t)}function iw(e,t,r){r=Xt(r);var n=he(t),s=he(e),o=[];function u(d,...g){if(d)return r(d);o=g,d!==!1&&s(c);}function c(d,g){if(d)return r(d);if(d!==!1){if(!g)return r(null,...o);n(u);}}return s(c)}function Rc(e,t,r){let n=he(e);return bi(s=>n((o,u)=>s(o,!u)),t,r)}function sw(e,t){if(t=Qt(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(o){var u=he(e[r++]);u(...o,Xt(s));}function s(o,...u){if(o!==!1){if(o||r===e.length)return t(o,...u);n(u);}}n([]);}var t1,Zu,Ku,wn,Kt,i1,xi,vt,vn,ut,Ai,tc,Ot,_o,rc,kr,D1,y1,w1,v1,to,Lr,Sn,En,ro,no,io,so,oo,cc,Ei,ao,_i,Fi,uo,co,lo,fo,ho,po,dc,Ti,mc,ji,wi,wc,Oo,mo,Fc,Cc,bc,Oc,Do,Ac,yo,wo,vo,jc,kc,bi,Bc,ow,To=Xy(()=>{t1=typeof queueMicrotask=="function"&&queueMicrotask,Zu=typeof setImmediate=="function"&&setImmediate,Ku=typeof process=="object"&&typeof process.nextTick=="function";t1?wn=queueMicrotask:Zu?wn=setImmediate:Ku?wn=process.nextTick:wn=Qu;Kt=Xu(wn);i1={},xi=i1;vt=e=>(t,r,n)=>{if(n=Qt(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if(r1(t))return Hu(t,e,r,n);if(n1(t))return Hu(t[Symbol.asyncIterator](),e,r,n);var s=c1(t),o=!1,u=!1,c=0,d=!1;function g(D,y){if(!u)if(c-=1,D)o=!0,n(D);else if(D===!1)o=!0,u=!0;else {if(y===xi||o&&c<=0)return o=!0,n(null);d||m();}}function m(){for(d=!0;c)/,w1=/,/,v1=/(=.+)?(\s*)$/;to=class{constructor(){this.head=this.tail=null,this.length=0;}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,r){r.prev=t,r.next=t.next,t.next?t.next.prev=r:this.tail=r,t.next=r,this.length+=1;}insertBefore(t,r){r.prev=t.prev,r.next=t,t.prev?t.prev.next=r:this.head=r,t.prev=r,this.length+=1;}unshift(t){this.head?this.insertBefore(this.head,t):Vu(this,t);}push(t){this.tail?this.insertAfter(this.tail,t):Vu(this,t);}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return [...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next;}remove(t){for(var r=this.head;r;){var{next:n}=r;t(r)&&this.removeLink(r),r=n;}return this}};Lr=fe(F1,4);Sn=fe(S1,4);En=fe(C1,4);ro=fe(b1,3);no=fe(O1,3);io=fe(x1,3);so=fe(A1,4);oo=fe(M1,3);cc=uc("dir");Ei=fe(T1,3);ao=fe(j1,3);_i=fe(I1,4);Fi=fe(N1,3);uo=fe(L1,3);co=fe($1,4);lo=fe(k1,3);fo=fe(B1,3);ho=fe(q1,4);po=fe(Y1,3);dc=fe(W1,2);Ti=fe(U1,4);mc=uc("log");ji=fe(z1,4);Ku?wi=process.nextTick:Zu?wi=setImmediate:wi=Qu;wc=Xu(wi),Oo=fe((e,t,r)=>{var n=Oi(t)?[]:{};e(t,(s,o,u)=>{he(s)((c,...d)=>{d.length<2&&([d]=d),n[o]=d,u(c);});},s=>r(s,n));},3);mo=class{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER;}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(t){let r;for(;t>0&&eo(this.heap[t],this.heap[r=Gu(t)]);){let n=this.heap[t];this.heap[t]=this.heap[r],this.heap[r]=n,t=r;}}percDown(t){let r;for(;(r=H1(t))=0;n--)this.percDown(n);return this}};Fc=fe(V1,2);Cc=fe(G1,3);bc=fe(J1,4);Oc=fe(Z1,3);Do=5,Ac=0;yo=fe(Q1,3);wo=fe(X1,4);vo=fe(ew,3);jc=fe(tw,3);kc=fe(nw);bi=fe(iw,3);Bc=fe(sw),ow={apply:Ju,applyEach:tc,applyEachSeries:rc,asyncify:vi,auto:Fo,autoInject:nc,cargo:ic,cargoQueue:sc,compose:oc,concat:ro,concatLimit:En,concatSeries:no,constant:ac,detect:io,detectLimit:so,detectSeries:oo,dir:cc,doUntil:lc,doWhilst:Ei,each:ao,eachLimit:_i,eachOf:ut,eachOfLimit:vn,eachOfSeries:Ot,eachSeries:Fi,ensureAsync:bo,every:uo,everyLimit:co,everySeries:lo,filter:fo,filterLimit:ho,filterSeries:po,forever:dc,groupBy:hc,groupByLimit:Ti,groupBySeries:pc,log:mc,map:Ai,mapLimit:Sn,mapSeries:_o,mapValues:gc,mapValuesLimit:ji,mapValuesSeries:Dc,memoize:yc,nextTick:wc,parallel:vc,parallelLimit:Ec,priorityQueue:_c,queue:xo,race:Fc,reduce:Lr,reduceRight:go,reflect:Si,reflectAll:Sc,reject:Cc,rejectLimit:bc,rejectSeries:Oc,retry:Ci,retryable:Mc,seq:Co,series:Tc,setImmediate:Kt,some:yo,someLimit:wo,someSeries:vo,sortBy:jc,timeout:Ic,times:Nc,timesLimit:Ii,timesSeries:Lc,transform:$c,tryEach:kc,unmemoize:Pc,until:Rc,waterfall:Bc,whilst:bi,all:uo,allLimit:co,allSeries:lo,any:yo,anyLimit:wo,anySeries:vo,find:io,findLimit:so,findSeries:oo,flatMap:ro,flatMapLimit:En,flatMapSeries:no,forEach:ao,forEachSeries:Fi,forEachLimit:_i,forEachOf:ut,forEachOfSeries:Ot,forEachOfLimit:vn,inject:Lr,foldl:Lr,foldr:go,select:fo,selectLimit:ho,selectSeries:po,wrapSync:vi,during:bi,doDuring:Ei};});var zc=B((L2,Uc)=>{var{hasOwnProperty:jo}=Object.prototype,Io=typeof process<"u"&&process.platform==="win32"?`\r +`+t);let[,n]=r;return n.replace(/\s/g,"").split(w1).map(s=>s.replace(v1,"").trim())}function nc(e,t){var r={};return Object.keys(e).forEach(n=>{var s=e[n],o,u=Fn(s),c=!u&&s.length===1||u&&s.length===0;if(Array.isArray(s))o=[...s],s=o.pop(),r[n]=o.concat(o.length>0?d:s);else if(c)r[n]=s;else {if(o=_1(s),s.length===0&&!u&&o.length===0)throw new Error("autoInject task functions require explicit parameters.");u||o.pop(),r[n]=o.concat(d);}function d(g,m){var D=o.map(y=>g[y]);D.push(m),he(s)(...D);}}),Fo(r,t)}function Vu(e,t){e.length=1,e.head=e.tail=t;}function So(e,t,r){if(t==null)t=1;else if(t===0)throw new RangeError("Concurrency must not be zero");var n=he(e),s=0,o=[];let u={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function c(x,w){u[x].push(w);}function d(x,w){let M=(...P)=>{g(x,M),w(...P);};u[x].push(M);}function g(x,w){if(!x)return Object.keys(u).forEach(M=>u[M]=[]);if(!w)return u[x]=[];u[x]=u[x].filter(M=>M!==w);}function m(x,...w){u[x].forEach(M=>M(...w));}var D=!1;function y(x,w,M,P){if(P!=null&&typeof P!="function")throw new Error("task callback must be a function");$.started=!0;var J,X;function te(ee,...Z){if(ee)return M?X(ee):J();if(Z.length<=1)return J(Z[0]);J(Z);}var L=$._createTaskItem(x,M?te:P||te);if(w?$._tasks.unshift(L):$._tasks.push(L),D||(D=!0,Kt(()=>{D=!1,$.process();})),M||!P)return new Promise((ee,Z)=>{J=ee,X=Z;})}function F(x){return function(w,...M){s-=1;for(var P=0,J=x.length;P0&&o.splice(te,1),X.callback(w,...M),w!=null&&m("error",w,X.data);}s<=$.concurrency-$.buffer&&m("unsaturated"),$.idle()&&m("drain"),$.process();}}function C(x){return x.length===0&&$.idle()?(Kt(()=>m("drain")),!0):!1}let _=x=>w=>{if(!w)return new Promise((M,P)=>{d(x,(J,X)=>{if(J)return P(J);M(X);});});g(x),c(x,w);};var j=!1,$={_tasks:new to,_createTaskItem(x,w){return {data:x,callback:w}},*[Symbol.iterator](){yield*$._tasks[Symbol.iterator]();},concurrency:t,payload:r,buffer:t/4,started:!1,paused:!1,push(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!1,!1,w)):y(x,!1,!1,w)},pushAsync(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!1,!0,w)):y(x,!1,!0,w)},kill(){g(),$._tasks.empty();},unshift(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!0,!1,w)):y(x,!0,!1,w)},unshiftAsync(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!0,!0,w)):y(x,!0,!0,w)},remove(x){$._tasks.remove(x);},process(){if(!j){for(j=!0;!$.paused&&s<$.concurrency&&$._tasks.length;){var x=[],w=[],M=$._tasks.length;$.payload&&(M=Math.min(M,$.payload));for(var P=0;P{s(t,o,(d,g)=>{t=g,c(d);});},o=>n(o,t))}function Co(...e){var t=e.map(he);return function(...r){var n=this,s=r[r.length-1];return typeof s=="function"?r.pop():s=$r(),Lr(t,r,(o,u,c)=>{u.apply(n,o.concat((d,...g)=>{c(d,g);}));},(o,u)=>s(o,...u)),s[kr]}}function oc(...e){return Co(...e.reverse())}function S1(e,t,r,n){return Eo(vt(t),e,r,n)}function C1(e,t,r,n){var s=he(r);return Sn(e,t,(o,u)=>{s(o,(c,...d)=>c?u(c):u(c,d));},(o,u)=>{for(var c=[],d=0;d{var u=!1,c;let d=he(s);r(n,(g,m,D)=>{d(g,(y,F)=>{if(y||y===!1)return D(y);if(e(F)&&!c)return u=!0,c=t(!0,g),D(null,xi);D();});},g=>{if(g)return o(g);o(null,u?c:t(!1));});}}function x1(e,t,r){return Yt(n=>n,(n,s)=>s)(ut,e,t,r)}function A1(e,t,r,n){return Yt(s=>s,(s,o)=>o)(vt(t),e,r,n)}function M1(e,t,r){return Yt(n=>n,(n,s)=>s)(vt(1),e,t,r)}function uc(e){return (t,...r)=>he(t)(...r,(n,...s)=>{typeof console=="object"&&(n?console.error&&console.error(n):console[e]&&s.forEach(o=>console[e](o)));})}function T1(e,t,r){r=Xt(r);var n=he(e),s=he(t),o;function u(d,...g){if(d)return r(d);d!==!1&&(o=g,s(...g,c));}function c(d,g){if(d)return r(d);if(d!==!1){if(!g)return r(null,...o);n(u);}}return c(null,!0)}function lc(e,t,r){let n=he(t);return Ei(e,(...s)=>{let o=s.pop();n(...s,(u,c)=>o(u,!c));},r)}function fc(e){return (t,r,n)=>e(t,n)}function j1(e,t,r){return ut(e,fc(he(t)),r)}function I1(e,t,r,n){return vt(t)(e,fc(he(r)),n)}function N1(e,t,r){return _i(e,1,t,r)}function Oo(e){return Fn(e)?e:function(...t){var r=t.pop(),n=!0;t.push((...s)=>{n?Kt(()=>r(...s)):r(...s);}),e.apply(this,t),n=!1;}}function L1(e,t,r){return Yt(n=>!n,n=>!n)(ut,e,t,r)}function $1(e,t,r,n){return Yt(s=>!s,s=>!s)(vt(t),e,r,n)}function k1(e,t,r){return Yt(n=>!n,n=>!n)(bt,e,t,r)}function P1(e,t,r,n){var s=new Array(t.length);e(t,(o,u,c)=>{r(o,(d,g)=>{s[u]=!!g,c(d);});},o=>{if(o)return n(o);for(var u=[],c=0;c{r(o,(d,g)=>{if(d)return c(d);g&&s.push({index:u,value:o}),c(d);});},o=>{if(o)return n(o);n(null,s.sort((u,c)=>u.index-c.index).map(u=>u.value));});}function Mi(e,t,r,n){var s=bi(t)?P1:R1;return s(e,t,he(r),n)}function B1(e,t,r){return Mi(ut,e,t,r)}function q1(e,t,r,n){return Mi(vt(t),e,r,n)}function Y1(e,t,r){return Mi(bt,e,t,r)}function W1(e,t){var r=Xt(t),n=he(Oo(e));function s(o){if(o)return r(o);o!==!1&&n(s);}return s()}function U1(e,t,r,n){var s=he(r);return Sn(e,t,(o,u)=>{s(o,(c,d)=>c?u(c):u(c,{key:d,val:o}));},(o,u)=>{for(var c={},{hasOwnProperty:d}=Object.prototype,g=0;g{o(u,c,(g,m)=>{if(g)return d(g);s[c]=m,d(g);});},u=>n(u,s))}function gc(e,t,r){return ji(e,1/0,t,r)}function Dc(e,t,r){return ji(e,1,t,r)}function yc(e,t=r=>r){var r=Object.create(null),n=Object.create(null),s=he(e),o=_n((u,c)=>{var d=t(...u);d in r?Kt(()=>c(null,...r[d])):d in n?n[d].push(c):(n[d]=[c],s(...u,(g,...m)=>{g||(r[d]=m);var D=n[d];delete n[d];for(var y=0,F=D.length;y{r(n[0],s);},t,1)}function H1(e){return (e<<1)+1}function Gu(e){return (e+1>>1)-1}function eo(e,t){return e.priority!==t.priority?e.priority({data:u,priority:c,callback:d});function o(u,c){return Array.isArray(u)?u.map(d=>({data:d,priority:c})):{data:u,priority:c}}return r.push=function(u,c=0,d){return n(o(u,c),d)},r.pushAsync=function(u,c=0,d){return s(o(u,c),d)},delete r.unshift,delete r.unshiftAsync,r}function V1(e,t){if(t=Qt(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r{let c={};if(o&&(c.error=o),u.length>0){var d=u;u.length<=1&&([d]=u),c.value=d;}s(null,c);}),t.apply(this,n)})}function Sc(e){var t;return Array.isArray(e)?t=e.map(Si):(t={},Object.keys(e).forEach(r=>{t[r]=Si.call(this,e[r]);})),t}function Ao(e,t,r,n){let s=he(r);return Mi(e,t,(o,u)=>{s(o,(c,d)=>{u(c,!d);});},n)}function G1(e,t,r){return Ao(ut,e,t,r)}function J1(e,t,r,n){return Ao(vt(t),e,r,n)}function Z1(e,t,r){return Ao(bt,e,t,r)}function xc(e){return function(){return e}}function Ci(e,t,r){var n={times:Do,intervalFunc:xc(Ac)};if(arguments.length<3&&typeof e=="function"?(r=t||$r(),t=e):(K1(n,e),r=r||$r()),typeof t!="function")throw new Error("Invalid arguments for async.retry");var s=he(t),o=1;function u(){s((c,...d)=>{c!==!1&&(c&&o++{(s.lengthn)(ut,e,t,r)}function X1(e,t,r,n){return Yt(Boolean,s=>s)(vt(t),e,r,n)}function ew(e,t,r){return Yt(Boolean,n=>n)(bt,e,t,r)}function tw(e,t,r){var n=he(t);return Ai(e,(o,u)=>{n(o,(c,d)=>{if(c)return u(c);u(c,{value:o,criteria:d});});},(o,u)=>{if(o)return r(o);r(null,u.sort(s).map(c=>c.value));});function s(o,u){var c=o.criteria,d=u.criteria;return cd?1:0}}function Ic(e,t,r){var n=he(e);return _n((s,o)=>{var u=!1,c;function d(){var g=e.name||"anonymous",m=new Error('Callback function "'+g+'" timed out.');m.code="ETIMEDOUT",r&&(m.info=r),u=!0,o(m);}s.push((...g)=>{u||(o(...g),clearTimeout(c));}),c=setTimeout(d,t),n(...s);})}function rw(e){for(var t=Array(e);e--;)t[e]=e;return t}function Ii(e,t,r,n){var s=he(r);return Sn(rw(e),t,s,n)}function Nc(e,t,r){return Ii(e,1/0,t,r)}function Lc(e,t,r){return Ii(e,1,t,r)}function $c(e,t,r,n){arguments.length<=3&&typeof t=="function"&&(n=r,r=t,t=Array.isArray(e)?[]:{}),n=Qt(n||$r());var s=he(r);return ut(e,(o,u,c)=>{s(t,o,u,c);},o=>n(o,t)),n[kr]}function nw(e,t){var r=null,n;return Fi(e,(s,o)=>{he(s)((u,...c)=>{if(u===!1)return o(u);c.length<2?[n]=c:n=c,r=u,o(u?null:{});});},()=>t(r,n))}function Pc(e){return (...t)=>(e.unmemoized||e)(...t)}function iw(e,t,r){r=Xt(r);var n=he(t),s=he(e),o=[];function u(d,...g){if(d)return r(d);o=g,d!==!1&&s(c);}function c(d,g){if(d)return r(d);if(d!==!1){if(!g)return r(null,...o);n(u);}}return s(c)}function Rc(e,t,r){let n=he(e);return Oi(s=>n((o,u)=>s(o,!u)),t,r)}function sw(e,t){if(t=Qt(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(o){var u=he(e[r++]);u(...o,Xt(s));}function s(o,...u){if(o!==!1){if(o||r===e.length)return t(o,...u);n(u);}}n([]);}var t1,Zu,Ku,wn,Kt,i1,xi,vt,vn,ut,Ai,tc,bt,_o,rc,kr,D1,y1,w1,v1,to,Lr,Sn,En,ro,no,io,so,oo,cc,Ei,ao,_i,Fi,uo,co,lo,fo,ho,po,dc,Ti,mc,ji,wi,wc,bo,mo,Fc,Cc,Oc,bc,Do,Ac,yo,wo,vo,jc,kc,Oi,Bc,ow,To=Xy(()=>{t1=typeof queueMicrotask=="function"&&queueMicrotask,Zu=typeof setImmediate=="function"&&setImmediate,Ku=typeof process=="object"&&typeof process.nextTick=="function";t1?wn=queueMicrotask:Zu?wn=setImmediate:Ku?wn=process.nextTick:wn=Qu;Kt=Xu(wn);i1={},xi=i1;vt=e=>(t,r,n)=>{if(n=Qt(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if(r1(t))return Hu(t,e,r,n);if(n1(t))return Hu(t[Symbol.asyncIterator](),e,r,n);var s=c1(t),o=!1,u=!1,c=0,d=!1;function g(D,y){if(!u)if(c-=1,D)o=!0,n(D);else if(D===!1)o=!0,u=!0;else {if(y===xi||o&&c<=0)return o=!0,n(null);d||m();}}function m(){for(d=!0;c)/,w1=/,/,v1=/(=.+)?(\s*)$/;to=class{constructor(){this.head=this.tail=null,this.length=0;}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,r){r.prev=t,r.next=t.next,t.next?t.next.prev=r:this.tail=r,t.next=r,this.length+=1;}insertBefore(t,r){r.prev=t.prev,r.next=t,t.prev?t.prev.next=r:this.head=r,t.prev=r,this.length+=1;}unshift(t){this.head?this.insertBefore(this.head,t):Vu(this,t);}push(t){this.tail?this.insertAfter(this.tail,t):Vu(this,t);}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return [...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next;}remove(t){for(var r=this.head;r;){var{next:n}=r;t(r)&&this.removeLink(r),r=n;}return this}};Lr=fe(F1,4);Sn=fe(S1,4);En=fe(C1,4);ro=fe(O1,3);no=fe(b1,3);io=fe(x1,3);so=fe(A1,4);oo=fe(M1,3);cc=uc("dir");Ei=fe(T1,3);ao=fe(j1,3);_i=fe(I1,4);Fi=fe(N1,3);uo=fe(L1,3);co=fe($1,4);lo=fe(k1,3);fo=fe(B1,3);ho=fe(q1,4);po=fe(Y1,3);dc=fe(W1,2);Ti=fe(U1,4);mc=uc("log");ji=fe(z1,4);Ku?wi=process.nextTick:Zu?wi=setImmediate:wi=Qu;wc=Xu(wi),bo=fe((e,t,r)=>{var n=bi(t)?[]:{};e(t,(s,o,u)=>{he(s)((c,...d)=>{d.length<2&&([d]=d),n[o]=d,u(c);});},s=>r(s,n));},3);mo=class{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER;}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(t){let r;for(;t>0&&eo(this.heap[t],this.heap[r=Gu(t)]);){let n=this.heap[t];this.heap[t]=this.heap[r],this.heap[r]=n,t=r;}}percDown(t){let r;for(;(r=H1(t))=0;n--)this.percDown(n);return this}};Fc=fe(V1,2);Cc=fe(G1,3);Oc=fe(J1,4);bc=fe(Z1,3);Do=5,Ac=0;yo=fe(Q1,3);wo=fe(X1,4);vo=fe(ew,3);jc=fe(tw,3);kc=fe(nw);Oi=fe(iw,3);Bc=fe(sw),ow={apply:Ju,applyEach:tc,applyEachSeries:rc,asyncify:vi,auto:Fo,autoInject:nc,cargo:ic,cargoQueue:sc,compose:oc,concat:ro,concatLimit:En,concatSeries:no,constant:ac,detect:io,detectLimit:so,detectSeries:oo,dir:cc,doUntil:lc,doWhilst:Ei,each:ao,eachLimit:_i,eachOf:ut,eachOfLimit:vn,eachOfSeries:bt,eachSeries:Fi,ensureAsync:Oo,every:uo,everyLimit:co,everySeries:lo,filter:fo,filterLimit:ho,filterSeries:po,forever:dc,groupBy:hc,groupByLimit:Ti,groupBySeries:pc,log:mc,map:Ai,mapLimit:Sn,mapSeries:_o,mapValues:gc,mapValuesLimit:ji,mapValuesSeries:Dc,memoize:yc,nextTick:wc,parallel:vc,parallelLimit:Ec,priorityQueue:_c,queue:xo,race:Fc,reduce:Lr,reduceRight:go,reflect:Si,reflectAll:Sc,reject:Cc,rejectLimit:Oc,rejectSeries:bc,retry:Ci,retryable:Mc,seq:Co,series:Tc,setImmediate:Kt,some:yo,someLimit:wo,someSeries:vo,sortBy:jc,timeout:Ic,times:Nc,timesLimit:Ii,timesSeries:Lc,transform:$c,tryEach:kc,unmemoize:Pc,until:Rc,waterfall:Bc,whilst:Oi,all:uo,allLimit:co,allSeries:lo,any:yo,anyLimit:wo,anySeries:vo,find:io,findLimit:so,findSeries:oo,flatMap:ro,flatMapLimit:En,flatMapSeries:no,forEach:ao,forEachSeries:Fi,forEachLimit:_i,forEachOf:ut,forEachOfSeries:bt,forEachOfLimit:vn,inject:Lr,foldl:Lr,foldr:go,select:fo,selectLimit:ho,selectSeries:po,wrapSync:vi,during:Oi,doDuring:Ei};});var zc=B((L2,Uc)=>{var{hasOwnProperty:jo}=Object.prototype,Io=typeof process<"u"&&process.platform==="win32"?`\r `:` `,No=(e,t)=>{let r=[],n="";typeof t=="string"?t={section:t,whitespace:!1}:(t=t||Object.create(null),t.whitespace=t.whitespace===!0);let s=t.whitespace?" = ":"=";for(let o of Object.keys(e)){let u=e[o];if(u&&Array.isArray(u))for(let c of u)n+=Pr(o+"[]")+s+Pr(c)+` -`;else u&&typeof u=="object"?r.push(o):n+=Pr(o)+s+Pr(u)+Io;}t.section&&n.length&&(n="["+Pr(t.section)+"]"+Io+n);for(let o of r){let u=Yc(o).join("\\."),c=(t.section?t.section+".":"")+u,{whitespace:d}=t,g=No(e[o],{section:c,whitespace:d});n.length&&g.length&&(n+=Io),n+=g;}return n},Yc=e=>e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(t=>t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")),qc=e=>{let t=Object.create(null),r=t,n=null,s=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,o=e.split(/[\r\n]+/g);for(let c of o){if(!c||c.match(/^\s*[;#]/))continue;let d=c.match(s);if(!d)continue;if(d[1]!==void 0){if(n=Ni(d[1]),n==="__proto__"){r=Object.create(null);continue}r=t[n]=t[n]||Object.create(null);continue}let g=Ni(d[2]),m=g.length>2&&g.slice(-2)==="[]",D=m?g.slice(0,-2):g;if(D==="__proto__")continue;let y=d[3]?Ni(d[4]):!0,F=y==="true"||y==="false"||y==="null"?JSON.parse(y):y;m&&(jo.call(r,D)?Array.isArray(r[D])||(r[D]=[r[D]]):r[D]=[]),Array.isArray(r[D])?r[D].push(F):r[D]=F;}let u=[];for(let c of Object.keys(t)){if(!jo.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;let d=Yc(c),g=t,m=d.pop(),D=m.replace(/\\\./g,".");for(let y of d)y!=="__proto__"&&((!jo.call(g,y)||typeof g[y]!="object")&&(g[y]=Object.create(null)),g=g[y]);g===t&&D===m||(g[D]=t[c],u.push(c));}for(let c of u)delete t[c];return t},Wc=e=>e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'",Pr=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Wc(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#"),Ni=(e,t)=>{if(e=(e||"").trim(),Wc(e)){e.charAt(0)==="'"&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e);}catch{}}else {let r=!1,n="";for(let s=0,o=e.length;s{var aw=zc(),Hc=Vc;Hc.json={stringify:function(e,t,r){return JSON.stringify(e,t||null,r||2)},parse:JSON.parse};Hc.ini=aw;});var hr=B(Gc=>{var er=Br(),Rr=Gc.Memory=function(e){e=e||{},this.type="memory",this.store={},this.mtimes={},this.readOnly=!1,this.loadFrom=e.loadFrom||null,this.logicalSeparator=e.logicalSeparator||":",this.parseValues=e.parseValues||!1,this.loadFrom&&(this.store=er.loadFilesSync(this.loadFrom));};Rr.prototype.get=function(e){for(var t=this.store,r=er.path(e,this.logicalSeparator);r.length>0;){if(e=r.shift(),t&&typeof t!="string"&&Object.hasOwnProperty.call(t,e)){t=t[e];continue}return}return t};Rr.prototype.set=function(e,t){if(this.readOnly)return !1;var r=this.store,n=er.path(e,this.logicalSeparator);if(n.length===0)return !t||typeof t!="object"?!1:(this.reset(),this.store=t,!0);for(this.mtimes[e]=Date.now();n.length>1;)e=n.shift(),(!r[e]||typeof r[e]!="object"||!Object.hasOwnProperty.call(r,e))&&(r[e]={}),r=r[e];return e=n.shift(),this.parseValues&&(t=er.parseValues.call(er,t)),r[e]=t,!0};Rr.prototype.clear=function(e){if(this.readOnly)return !1;var t=this.store,r=t,n=er.path(e,this.logicalSeparator);delete this.mtimes[e];for(var s=0;s1;)e=s.shift(),n[e]||(n[e]={}),n=n[e];return e=s.shift(),typeof n[e]!="object"||Array.isArray(n[e])?(n[e]=t,!0):Object.keys(t).every(function(u){return r.merge(er.keyed(r.logicalSeparator,o,u),t[u])})};Rr.prototype.reset=function(){return this.readOnly?!1:(this.mtimes={},this.store={},!0)};Rr.prototype.loadSync=function(){return this.store||{}};});var Br=B(Kc=>{var Jc=U("fs"),uw=(To(),Yu(Mo)),Zc=Li(),cw=hr().Memory,Et=Kc;Et.path=function(e,t){return t=t||":",e==null?[]:e.split(t)};Et.key=function(){return Array.prototype.slice.call(arguments).join(":")};Et.keyed=function(){return Array.prototype.slice.call(arguments,1).join(arguments[0])};Et.loadFiles=function(e,t){if(!e)return t(null,{});var r=Array.isArray(e)?{files:e}:e;r.format=r.format||Zc.json;function n(s,o){Jc.readFile(s,function(u,c){return u?o(u):o(null,r.format.parse(c.toString()))});}uw.map(r.files,n,function(s,o){return s?t(s):t(null,Et.merge(o))});};Et.loadFilesSync=function(e){if(e){var t=Array.isArray(e)?{files:e}:e;return t.format=t.format||Zc.json,Et.merge(t.files.map(function(r){return t.format.parse(Jc.readFileSync(r,"utf8"))}))}};Et.merge=function(e){var t=new cw;return e.forEach(function(r){Object.keys(r).forEach(function(n){t.merge(n,r[n]);});}),t.store};Et.capitalize=function(e){return e&&e[0].toUpperCase()+e.slice(1)};Et.parseValues=function(e){var t=e;try{t=JSON.parse(e);}catch{e==="undefined"&&(t=void 0);}return t};Et.transform=function(e,t){var r=Object.keys(e).map(function(n){var s={key:n,value:e[n]},o=t.call(null,s);if(o){if(o.key)return o}else return null;var u=new Error("Transform function passed to store returned an invalid format: "+JSON.stringify(o));throw u.name="RuntimeError",u});return r.filter(function(n){return n!==null}).reduce(function(n,s){return n[s.key]=s.value,n},{})};});var Xc=B(Qc=>{var qr=(To(),Yu(Mo)),tr=Br(),Re=Qc.Provider=function(e){e=e||{},this.stores={},this.sources=[],this.init(e);};["argv","env"].forEach(function(e){Re.prototype[e]=function(){var t=[e].concat(Array.prototype.slice.call(arguments));return this.add.apply(this,t)};});Re.prototype.file=function(e,t){return arguments.length==1?(t=typeof e=="string"?{file:e}:e,e="file"):t=typeof t=="string"?{file:t}:t,t.type="file",this.add(e,t)};["defaults","overrides"].forEach(function(e){Re.prototype[e]=function(t){return t=t||{},t.type||(t.type="literal"),this.add(e,t)};});Re.prototype.use=function(e,t){t=t||{};function r(o){return Object.keys(t).every(function(u){return t[u]===o[u]})}var n=this.stores[e],s=n&&!r(n);return (!n||s)&&(s&&this.remove(e),this.add(e,t)),this};Re.prototype.add=function(e,t,r){t=t||{};var n=t.type||e;if(!$i()[tr.capitalize(n)])throw new Error("Cannot add store with unknown type: "+n);return this.stores[e]=this.create(n,t,r),this.stores[e].loadSync&&this.stores[e].loadSync(),this};Re.prototype.remove=function(e){return delete this.stores[e],this};Re.prototype.create=function(e,t,r){return new($i())[tr.capitalize(e.toLowerCase())](t,r)};Re.prototype.init=function(e){var t=this;e.type?this.add(e.type,e):e.store?this.add(e.store.name||e.store.type,e.store):e.stores&&Object.keys(e.stores).forEach(function(r){var n=e.stores[r];t.add(n.name||r||n.type,n);}),e.source?this.sources.push(this.create(e.source.type||e.source.name,e.source)):e.sources&&Object.keys(e.sources).forEach(function(r){var n=e.sources[r];t.sources.push(t.create(n.type||n.name||r,n));});};Re.prototype.get=function(e,t){if(typeof e=="function"&&(t=e,e=null),!t)return this._execute("get",1,e,t);var r=0,n=Object.keys(this.stores),s=this,o,u=[];qr.whilst(function(c){c(null,typeof o>"u"&&r=2)return d.get(e,function(g,m){if(g)return c(g);o=m,o&&typeof o=="object"&&!Array.isArray(o)&&(u.push(o),o=void 0),c();});o=d.get(e),o&&typeof o=="object"&&!Array.isArray(o)&&(u.push(o),o=void 0),c();},function(c){return !c&&u.length&&(o=tr.merge(u.reverse())),c?t(c):t(null,o)});};Re.prototype.any=function(e,t){if(Array.isArray(e)||(e=Array.prototype.slice.call(arguments),e.length>0&&typeof e[e.length-1]=="function"?t=e.pop():t=null),!t){for(var r,n=0;n"u"&&t.push(r);},this),t.length)throw new Error("Missing required keys: "+t.join(", "));return !0};Re.prototype.reset=function(e){return this._execute("reset",0,e)};Re.prototype.clear=function(e,t){return this._execute("clear",1,e,t)};Re.prototype.merge=function(){var e=this,t=Array.prototype.slice.call(arguments),r=typeof t[t.length-1]=="function"&&t.pop(),n=t.pop(),s=t.pop();function o(u,c){return e._execute("merge",2,u,n[u],c)}return s?this._execute("merge",2,s,n,r):Array.isArray(n)||typeof n!="object"?lw(new Error("Cannot merge non-Object into top-level."),r):qr.forEach(Object.keys(n),o,r||function(){})};Re.prototype.load=function(e){var t=this;function r(){var d=Object.keys(t.stores);return d.reverse(),d.map(function(g){return t.stores[g]})}function n(d){if(!d.loadSync)throw new Error("nconf store "+d.type+" has no loadSync() method");return d.loadSync()}function s(d,g){return !d.load&&!d.loadSync?g(new Error("nconf store "+d.type+" has no load() method")):d.loadSync?g(null,d.loadSync()):d.load(g)}function o(d,g){if(!g)return tr.merge(d.map(n));qr.map(d,s,function(m,D){return m?g(m):g(null,tr.merge(D))});}function u(d){d&&typeof d=="object"&&t.use("sources",{type:"literal",store:d});}function c(){var d=t.sources.splice(0);if(d.reverse(),!e)return u(o(d)),o(r());o(d,function(g,m){return g?e(g):(u(m),o(r(),e))});}return t.sources.length?c():o(r(),e)};Re.prototype.save=function(e,t){!t&&typeof e=="function"&&(t=e,e=null);var r=this,n=Object.keys(this.stores);function s(u,c){var d=r.stores[c];if(d.saveSync){var g=d.saveSync();typeof g=="object"&&g!==null&&u.push(g);}return u}function o(u,c,d){var g=r.stores[c];if(g.save)return g.save(e,function(m,D){if(m)return d(m);typeof D=="object"&&D!==null&&u.push(D),d(null,u);});g.saveSync&&u.push(g.saveSync()),d(null,u);}if(!t)return tr.merge(n.reduce(s,[]));qr.reduce(n,[],o,function(u,c){return u?t(u):t(null,tr.merge(c))});};Re.prototype._execute=function(e,t){var r=Array.prototype.slice.call(arguments,2),n=typeof r[r.length-1]=="function"&&r.pop(),s=["set","clear","merge","reset"].indexOf(e)!==-1,o=this,u,c=[],d=Object.keys(this.stores);function g(m,D){var y=o.stores[m];return s&&y.readOnly?D():y[e].length>t?y[e].apply(y,r.concat(D)):D(null,y[e].apply(y,r))}return n?qr.forEach(d,g,function(m){return m?n(m):n()}):(d.forEach(function(m){if(typeof u>"u"){var D=o.stores[m];if(s&&D.readOnly)return;u=D[e].apply(D,r),u&&e==="get"&&typeof u=="object"&&!Array.isArray(u)&&(c.push(u),u=void 0);}}),c.length&&(u=tr.merge(c.reverse())),u)};function lw(e,t){if(t)return t(e);throw e}});var el=B((B2,fw)=>{fw.exports={name:"nconf",description:"Hierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging.",version:"0.12.1",author:"Charlie Robbins ",contributors:["Matt Hamann ","Maciej Ma\u0142ecki ","Jarrett Cruger ","Adrien Becchis"],repository:{type:"git",url:"http://github.com/flatiron/nconf.git"},keywords:["configuration","key value store","plugabble"],dependencies:{async:"^3.0.0",ini:"^2.0.0","secure-keys":"^1.0.0",yargs:"^16.1.1"},devDependencies:{"@release-it/conventional-changelog":"^7.0.2",coveralls:"^3.1.0",eslint:"^7.0.0","nconf-yaml":"^1.0.2",nyc:"^15.1.0","release-it":"^16.2.1",vows:"^0.8.3"},main:"./lib/nconf",scripts:{test:"vows test/*-test.js test/**/*-test.js --spec",cover:"nyc --reporter=lcov npm test",coveralls:"cat coverage/lcov.info | coveralls",lint:"eslint .",release:"release-it"},engines:{node:">= 0.4.0"},license:"MIT"};});var rl=B((q2,tl)=>{var Lo=U("fs"),dw=U("util"),hw=U("path"),_t,$o=class{constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:!0,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[];}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=t.shift(),n=function(){};return typeof t[t.length-1]=="function"&&(n=t.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),_t.format.apply(_t.format,[this.cache[this.locale][r]||r].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),r=t.shift(),n=t.shift(),s=t.shift(),o=function(){};typeof t[t.length-1]=="function"&&(o=t.pop()),this.cache[this.locale]||this._readLocaleFile();let u=s===1?r:n;this.cache[this.locale][r]&&(u=this.cache[this.locale][r][s===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let c=[u];return ~u.indexOf("%d")&&c.push(s),_t.format.apply(_t.format,c.concat(t))}setLocale(t){this.locale=t;}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.cache[this.locale][r]=t[r]);}_taggedLiteral(t,...r){let n="";return t.forEach(function(s,o){let u=r[o+1];n+=s,typeof u<"u"&&(n+="%s");}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue();}_processWriteQueue(){let t=this,r=this.writeQueue[0],n=r.directory,s=r.locale,o=r.cb,u=this._resolveLocaleFile(n,s),c=JSON.stringify(this.cache[s],null,2);_t.fs.writeFile(u,c,"utf-8",function(d){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),o(d);});}_readLocaleFile(){let t={},r=this._resolveLocaleFile(this.directory,this.locale);try{_t.fs.readFileSync&&(t=JSON.parse(_t.fs.readFileSync(r,"utf-8")));}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")t={};else throw n}this.cache[this.locale]=t;}_resolveLocaleFile(t,r){let n=_t.resolve(t,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let s=_t.resolve(t,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s);}return n}_fileExistsSync(t){return _t.exists(t)}};function pw(e,t){_t=t;let r=new $o(e);return {__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var mw={fs:{readFileSync:Lo.readFileSync,writeFile:Lo.writeFile},format:dw.format,resolve:hw.resolve,exists:e=>{try{return Lo.statSync(e).isFile()}catch{return !1}}},gw=e=>pw(e,mw);tl.exports=gw;});var Ro=B((Y2,cl)=>{var Dw=U("util"),yw=U("fs"),nl=U("path");function Cn(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let r="",n=!1,s=e.match(/^-+/);for(let o=s?s[0].length:0;o0?n+=`${t}${r.charAt(s)}`:n+=u;}return n}function al(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function ww(e){if(Array.isArray(e))return e.map(u=>typeof u!="string"?u+"":u);e=e.trim();let t=0,r=null,n=null,s=null,o=[];for(let u=0;u{typeof v=="number"&&(_.nargs[h]=v,_.keys.push(h));}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([h,v])=>{typeof v=="function"&&(_.coercions[h]=v,_.keys.push(h));}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(h){_.configs[h]=!0;}):typeof n.config=="object"&&Object.entries(n.config).forEach(([h,v])=>{(typeof v=="boolean"||typeof v=="function")&&(_.configs[h]=v);})),Ye(n.key,o,n.default,_.arrays),Object.keys(c).forEach(function(h){(_.aliases[h]||[]).forEach(function(v){c[v]=c[h];});});let x=null;S();let w=[],M=Object.assign(Object.create(null),{_:[]}),P={};for(let h=0;h=3&&(R(Q[1],_.arrays)?h=te(h,Q[1],s,Q[2]):R(Q[1],_.nargs)!==!1?h=X(h,Q[1],s,Q[2]):L(Q[1],Q[2]));else if(v.match($)&&u["boolean-negation"])Q=v.match($),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(O=Q[1],L(O,R(O,_.arrays)?[!1]:!1));else if(v.match(/^--.+/)||!u["short-option-groups"]&&v.match(/^-[^-]+/))Q=v.match(/^--?(.+)/),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(O=Q[1],R(O,_.arrays)?h=te(h,O,s):R(O,_.nargs)!==!1?h=X(h,O,s):(re=s[h+1],re!==void 0&&(!re.match(/^-/)||re.match(j))&&!R(O,_.bools)&&!R(O,_.counts)||/^(true|false)$/.test(re)?(L(O,re),h++):L(O,le(O))));else if(v.match(/^-.\..+=/))Q=v.match(/^-([^=]+)=([\s\S]*)$/),Q!==null&&Array.isArray(Q)&&Q.length>=3&&L(Q[1],Q[2]);else if(v.match(/^-.\..+/)&&!v.match(j))re=s[h+1],Q=v.match(/^-(.\..+)/),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(O=Q[1],re!==void 0&&!re.match(/^-/)&&!R(O,_.bools)&&!R(O,_.counts)?(L(O,re),h++):L(O,le(O)));else if(v.match(/^-[^-]+/)&&!v.match(j)){z=v.slice(1,-1).split(""),A=!1;for(let Fe=0;Feh!=="--"&&h.includes("-")).forEach(h=>{delete M[h];}),u["strip-aliased"]&&[].concat(...Object.keys(o).map(h=>o[h])).forEach(h=>{u["camel-case-expansion"]&&h.includes("-")&&delete M[h.split(".").map(v=>Cn(v)).join(".")],delete M[h];});function J(h){let v=q("_",h);(typeof v=="string"||typeof v=="number")&&M._.push(v);}function X(h,v,T,A){let O,z=R(v,_.nargs);if(z=typeof z!="number"||isNaN(z)?1:z,z===0)return E(A)||(x=Error(C("Argument unexpected for: %s",v))),L(v,le(v)),h;let Q=E(A)?0:1;if(u["nargs-eats-options"])T.length-(h+1)+Q0&&(L(v,A),re--),O=h+1;O0||Q&&typeof Q=="number"&&O.length>=Q||(z=T[re],/^-/.test(z)&&!j.test(z)&&!ie(z)));re++)h=re,O.push(Z(v,z));}return typeof Q=="number"&&(Q&&O.length1&&u["dot-notation"]&&(_.aliases[A[0]]||[]).forEach(function(O){let z=O.split("."),Q=[].concat(A);Q.shift(),z=z.concat(Q),(_.aliases[h]||[]).includes(z.join("."))||de(M,z,T);}),R(h,_.normalize)&&!R(h,_.arrays)&&[h].concat(_.aliases[h]||[]).forEach(function(z){Object.defineProperty(P,z,{enumerable:!0,get(){return v},set(Q){v=typeof Q=="string"?Wt.normalize(Q):Q;}});});}function ee(h,v){_.aliases[h]&&_.aliases[h].length||(_.aliases[h]=[v],y[v]=!0),_.aliases[v]&&_.aliases[v].length||ee(v,h);}function Z(h,v){typeof v=="string"&&(v[0]==="'"||v[0]==='"')&&v[v.length-1]===v[0]&&(v=v.substring(1,v.length-1)),(R(h,_.bools)||R(h,_.counts))&&typeof v=="string"&&(v=v==="true");let T=Array.isArray(v)?v.map(function(A){return q(h,A)}):q(h,v);return R(h,_.counts)&&(E(T)||typeof T=="boolean")&&(T=ko()),R(h,_.normalize)&&R(h,_.arrays)&&(Array.isArray(v)?T=v.map(A=>Wt.normalize(A)):T=Wt.normalize(v)),T}function q(h,v){return !u["parse-positional-numbers"]&&h==="_"||!R(h,_.strings)&&!R(h,_.bools)&&!Array.isArray(v)&&(al(v)&&u["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${v}`)))||!E(v)&&R(h,_.numbers))&&(v=Number(v)),v}function Y(h){let v=Object.create(null);K(v,_.aliases,c),Object.keys(_.configs).forEach(function(T){let A=h[T]||v[T];if(A)try{let O=null,z=Wt.resolve(Wt.cwd(),A),Q=_.configs[T];if(typeof Q=="function"){try{O=Q(z);}catch(re){O=re;}if(O instanceof Error){x=O;return}}else O=Wt.require(z);V(O);}catch(O){O.name==="PermissionDenied"?x=O:h[T]&&(x=Error(C("Invalid JSON config file: %s",A)));}});}function V(h,v){Object.keys(h).forEach(function(T){let A=h[T],O=v?v+"."+T:T;typeof A=="object"&&A!==null&&!Array.isArray(A)&&u["dot-notation"]?V(A,O):(!ye(M,O.split("."))||R(O,_.arrays)&&u["combine-arrays"])&&L(O,A);});}function I(){typeof d<"u"&&d.forEach(function(h){V(h);});}function W(h,v){if(typeof g>"u")return;let T=typeof g=="string"?g:"",A=Wt.env();Object.keys(A).forEach(function(O){if(T===""||O.lastIndexOf(T,0)===0){let z=O.split("__").map(function(Q,re){return re===0&&(Q=Q.substring(T.length)),Cn(Q)});(v&&_.configs[z.join(".")]||!v)&&!ye(h,z)&&L(z.join("."),A[O]);}});}function k(h){let v,T=new Set;Object.keys(h).forEach(function(A){if(!T.has(A)&&(v=R(A,_.coercions),typeof v=="function"))try{let O=q(A,v(h[A]));[].concat(_.aliases[A]||[],A).forEach(z=>{T.add(z),h[z]=O;});}catch(O){x=O;}});}function G(h){return _.keys.forEach(v=>{~v.indexOf(".")||typeof h[v]>"u"&&(h[v]=void 0);}),h}function K(h,v,T,A=!1){Object.keys(T).forEach(function(O){ye(h,O.split("."))||(de(h,O.split("."),T[O]),A&&(F[O]=!0),(v[O]||[]).forEach(function(z){ye(h,z.split("."))||de(h,z.split("."),T[O]);}));});}function ye(h,v){let T=h;u["dot-notation"]||(v=[v.join(".")]),v.slice(0,-1).forEach(function(O){T=T[O]||{};});let A=v[v.length-1];return typeof T!="object"?!1:A in T}function de(h,v,T){let A=h;u["dot-notation"]||(v=[v.join(".")]),v.slice(0,-1).forEach(function(Ae){Ae=il(Ae),typeof A=="object"&&A[Ae]===void 0&&(A[Ae]={}),typeof A[Ae]!="object"||Array.isArray(A[Ae])?(Array.isArray(A[Ae])?A[Ae].push({}):A[Ae]=[A[Ae],{}],A=A[Ae][A[Ae].length-1]):A=A[Ae];});let O=il(v[v.length-1]),z=R(v.join("."),_.arrays),Q=Array.isArray(T),re=u["duplicate-arguments-array"];!re&&R(O,_.nargs)&&(re=!0,(!E(A[O])&&_.nargs[O]===1||Array.isArray(A[O])&&A[O].length===_.nargs[O])&&(A[O]=void 0)),T===ko()?A[O]=ko(A[O]):Array.isArray(A[O])?re&&z&&Q?A[O]=u["flatten-duplicate-arrays"]?A[O].concat(T):(Array.isArray(A[O][0])?A[O]:[A[O]]).concat([T]):!re&&!!z==!!Q?A[O]=T:A[O]=A[O].concat([T]):A[O]===void 0&&z?A[O]=Q?T:[T]:re&&!(A[O]===void 0||R(O,_.counts)||R(O,_.bools))?A[O]=[A[O],T]:A[O]=T;}function Ye(...h){h.forEach(function(v){Object.keys(v||{}).forEach(function(T){_.aliases[T]||(_.aliases[T]=[].concat(o[T]||[]),_.aliases[T].concat(T).forEach(function(A){if(/-/.test(A)&&u["camel-case-expansion"]){let O=Cn(A);O!==T&&_.aliases[T].indexOf(O)===-1&&(_.aliases[T].push(O),y[O]=!0);}}),_.aliases[T].concat(T).forEach(function(A){if(A.length>1&&/[A-Z]/.test(A)&&u["camel-case-expansion"]){let O=ol(A,"-");O!==T&&_.aliases[T].indexOf(O)===-1&&(_.aliases[T].push(O),y[O]=!0);}}),_.aliases[T].forEach(function(A){_.aliases[A]=[T].concat(_.aliases[T].filter(function(O){return A!==O}));}));});});}function R(h,v){let T=[].concat(_.aliases[h]||[],h),A=Object.keys(v),O=T.find(z=>A.includes(z));return O?v[O]:!1}function Ke(h){let v=Object.keys(_);return [].concat(v.map(A=>_[A])).some(function(A){return Array.isArray(A)?A.includes(h):A[h]})}function Ne(h,...v){return [].concat(...v).some(function(A){let O=h.match(A);return O&&Ke(O[1])})}function Ct(h){if(h.match(j)||!h.match(/^-[^-]+/))return !1;let v=!0,T,A=h.slice(1).split("");for(let O=0;OR(h,_.arrays)?(x=Error(C("Invalid configuration: %s, opts.count excludes opts.array.",h)),!0):R(h,_.nargs)?(x=Error(C("Invalid configuration: %s, opts.count excludes opts.narg.",h)),!0):!1);}return {aliases:Object.assign({},_.aliases),argv:Object.assign(P,M),configuration:u,defaulted:Object.assign({},F),error:x,newAliases:Object.assign({},y)}}};function vw(e){let t=[],r=Object.create(null),n=!0;for(Object.keys(e).forEach(function(s){t.push([].concat(e[s],s));});n;){n=!1;for(let s=0;sEw,format:Dw.format,normalize:nl.normalize,resolve:nl.resolve,require:e=>{if(typeof U<"u")return U(e);if(e.match(/\.json$/))return yw.readFileSync(e,"utf8");throw Error("only .json config files are supported in ESM")}}),bn=function(t,r){return ul.parse(t.slice(),r).argv};bn.detailed=function(e,t){return ul.parse(e.slice(),t)};bn.camelCase=Cn;bn.decamelize=ol;bn.looksLikeNumber=al;cl.exports=bn;});var fl=B((U2,ll)=>{ll.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")};});var ki=B((z2,dl)=>{var _w=fl();dl.exports=e=>typeof e=="string"?e.replace(_w(),""):e;});var pl=B((H2,Bo)=>{var hl=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);Bo.exports=hl;Bo.exports.default=hl;});var gl=B((V2,ml)=>{ml.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var Pi=B((G2,qo)=>{var Fw=ki(),Sw=pl(),Cw=gl(),Dl=e=>{if(typeof e!="string"||e.length===0||(e=Fw(e),e.length===0))return 0;e=e.replace(Cw()," ");let t=0;for(let r=0;r=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,t+=Sw(n)?2:1);}return t};qo.exports=Dl;qo.exports.default=Dl;});var wl=B((J2,yl)=>{yl.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};});var Yo=B((Z2,El)=>{var On=wl(),vl={};for(let e of Object.keys(On))vl[On[e]]=e;var ae={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};El.exports=ae;for(let e of Object.keys(ae)){if(!("channels"in ae[e]))throw new Error("missing channels property: "+e);if(!("labels"in ae[e]))throw new Error("missing channel labels property: "+e);if(ae[e].labels.length!==ae[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=ae[e];delete ae[e].channels,delete ae[e].labels,Object.defineProperty(ae[e],"channels",{value:t}),Object.defineProperty(ae[e],"labels",{value:r});}ae.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),o=Math.max(t,r,n),u=o-s,c,d;o===s?c=0:t===o?c=(r-n)/u:r===o?c=2+(n-t)/u:n===o&&(c=4+(t-r)/u),c=Math.min(c*60,360),c<0&&(c+=360);let g=(s+o)/2;return o===s?d=0:g<=.5?d=u/(o+s):d=u/(2-o-s),[c,d*100,g*100]};ae.rgb.hsv=function(e){let t,r,n,s,o,u=e[0]/255,c=e[1]/255,d=e[2]/255,g=Math.max(u,c,d),m=g-Math.min(u,c,d),D=function(y){return (g-y)/6/m+1/2};return m===0?(s=0,o=0):(o=m/g,t=D(u),r=D(c),n=D(d),u===g?s=n-r:c===g?s=1/3+t-n:d===g&&(s=2/3+r-t),s<0?s+=1:s>1&&(s-=1)),[s*360,o*100,g*100]};ae.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],s=ae.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[s,o*100,n*100]};ae.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-r,1-n),o=(1-t-s)/(1-s)||0,u=(1-r-s)/(1-s)||0,c=(1-n-s)/(1-s)||0;return [o*100,u*100,c*100,s*100]};function bw(e,t){return (e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}ae.rgb.keyword=function(e){let t=vl[e];if(t)return t;let r=1/0,n;for(let s of Object.keys(On)){let o=On[s],u=bw(e,o);u.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let s=t*.4124+r*.3576+n*.1805,o=t*.2126+r*.7152+n*.0722,u=t*.0193+r*.1192+n*.9505;return [s*100,o*100,u*100]};ae.rgb.lab=function(e){let t=ae.rgb.xyz(e),r=t[0],n=t[1],s=t[2];r/=95.047,n/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let o=116*n-16,u=500*(r-n),c=200*(n-s);return [o,u,c]};ae.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s,o,u;if(r===0)return u=n*255,[u,u,u];n<.5?s=n*(1+r):s=n+r-n*r;let c=2*n-s,d=[0,0,0];for(let g=0;g<3;g++)o=t+1/3*-(g-1),o<0&&o++,o>1&&o--,6*o<1?u=c+(s-c)*6*o:2*o<1?u=s:3*o<2?u=c+(s-c)*(2/3-o)*6:u=c,d[g]=u*255;return d};ae.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=r,o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,s*=o<=1?o:2-o;let u=(n+r)/2,c=n===0?2*s/(o+s):2*r/(n+r);return [t,c*100,u*100]};ae.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,s=Math.floor(t)%6,o=t-Math.floor(t),u=255*n*(1-r),c=255*n*(1-r*o),d=255*n*(1-r*(1-o));switch(n*=255,s){case 0:return [n,d,u];case 1:return [c,n,u];case 2:return [u,n,d];case 3:return [u,c,n];case 4:return [d,u,n];case 5:return [n,u,c]}};ae.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=Math.max(n,.01),o,u;u=(2-r)*n;let c=(2-r)*s;return o=r*s,o/=c<=1?c:2-c,o=o||0,u/=2,[t,o*100,u*100]};ae.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s=r+n,o;s>1&&(r/=s,n/=s);let u=Math.floor(6*t),c=1-n;o=6*t-u,u&1&&(o=1-o);let d=r+o*(c-r),g,m,D;switch(u){default:case 6:case 0:g=c,m=d,D=r;break;case 1:g=d,m=c,D=r;break;case 2:g=r,m=c,D=d;break;case 3:g=r,m=d,D=c;break;case 4:g=d,m=r,D=c;break;case 5:g=c,m=r,D=d;break}return [g*255,m*255,D*255]};ae.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s=e[3]/100,o=1-Math.min(1,t*(1-s)+s),u=1-Math.min(1,r*(1-s)+s),c=1-Math.min(1,n*(1-s)+s);return [o*255,u*255,c*255]};ae.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s,o,u;return s=t*3.2406+r*-1.5372+n*-.4986,o=t*-.9689+r*1.8758+n*.0415,u=t*.0557+r*-.204+n*1.057,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),u=Math.min(Math.max(0,u),1),[s*255,o*255,u*255]};ae.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let s=116*r-16,o=500*(t-r),u=200*(r-n);return [s,o,u]};ae.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],s,o,u;o=(t+16)/116,s=r/500+o,u=o-n/200;let c=o**3,d=s**3,g=u**3;return o=c>.008856?c:(o-16/116)/7.787,s=d>.008856?d:(s-16/116)/7.787,u=g>.008856?g:(u-16/116)/7.787,s*=95.047,o*=100,u*=108.883,[s,o,u]};ae.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],s;s=Math.atan2(n,r)*360/2/Math.PI,s<0&&(s+=360);let u=Math.sqrt(r*r+n*n);return [t,u,s]};ae.lch.lab=function(e){let t=e[0],r=e[1],s=e[2]/360*2*Math.PI,o=r*Math.cos(s),u=r*Math.sin(s);return [t,o,u]};ae.rgb.ansi16=function(e,t=null){let[r,n,s]=e,o=t===null?ae.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let u=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(u+=60),u};ae.hsv.ansi16=function(e){return ae.rgb.ansi16(ae.hsv.rgb(e),e[2])};ae.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};ae.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,n=(t&1)*r*255,s=(t>>1&1)*r*255,o=(t>>2&1)*r*255;return [n,s,o]};ae.ansi256.rgb=function(e){if(e>=232){let o=(e-232)*10+8;return [o,o,o]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,s=t%6/5*255;return [r,n,s]};ae.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return "000000".substring(r.length)+r};ae.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return [0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(c=>c+c).join(""));let n=parseInt(r,16),s=n>>16&255,o=n>>8&255,u=n&255;return [s,o,u]};ae.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),u=s-o,c,d;return u<1?c=o/(1-u):c=0,u<=0?d=0:s===t?d=(r-n)/u%6:s===r?d=2+(n-t)/u:d=4+(t-r)/u,d/=6,d%=1,[d*360,u*100,c*100]};ae.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),s=0;return n<1&&(s=(r-.5*n)/(1-n)),[e[0],n*100,s*100]};ae.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,s=0;return n<1&&(s=(r-n)/(1-n)),[e[0],n*100,s*100]};ae.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return [n*255,n*255,n*255];let s=[0,0,0],o=t%1*6,u=o%1,c=1-u,d=0;switch(Math.floor(o)){case 0:s[0]=1,s[1]=u,s[2]=0;break;case 1:s[0]=c,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=u;break;case 3:s[0]=0,s[1]=c,s[2]=1;break;case 4:s[0]=u,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=c;}return d=(1-r)*n,[(r*s[0]+d)*255,(r*s[1]+d)*255,(r*s[2]+d)*255]};ae.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),s=0;return n>0&&(s=t/n),[e[0],s*100,n*100]};ae.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,s=0;return n>0&&n<.5?s=t/(2*n):n>=.5&&n<1&&(s=t/(2*(1-n))),[e[0],s*100,n*100]};ae.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return [e[0],(n-t)*100,(1-n)*100]};ae.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,s=n-t,o=0;return s<1&&(o=(n-s)/(1-s)),[e[0],s*100,o*100]};ae.apple.rgb=function(e){return [e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};ae.rgb.apple=function(e){return [e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};ae.gray.rgb=function(e){return [e[0]/100*255,e[0]/100*255,e[0]/100*255]};ae.gray.hsl=function(e){return [0,0,e[0]]};ae.gray.hsv=ae.gray.hsl;ae.gray.hwb=function(e){return [0,100,e[0]]};ae.gray.cmyk=function(e){return [0,0,0,e[0]]};ae.gray.lab=function(e){return [e[0],0,0]};ae.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return "000000".substring(n.length)+n};ae.rgb.gray=function(e){return [(e[0]+e[1]+e[2])/3/255*100]};});var Fl=B((K2,_l)=>{var Ri=Yo();function Ow(){let e={},t=Object.keys(Ri);for(let r=t.length,n=0;n{var Wo=Yo(),Tw=Fl(),Yr={},jw=Object.keys(Wo);function Iw(e){let t=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return "conversion"in e&&(t.conversion=e.conversion),t}function Nw(e){let t=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let s=e(r);if(typeof s=="object")for(let o=s.length,u=0;u{Yr[e]={},Object.defineProperty(Yr[e],"channels",{value:Wo[e].channels}),Object.defineProperty(Yr[e],"labels",{value:Wo[e].labels});let t=Tw(e);Object.keys(t).forEach(n=>{let s=t[n];Yr[e][n]=Nw(s),Yr[e][n].raw=Iw(s);});});Sl.exports=Yr;});var Tl=B((X2,Ml)=>{var bl=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,Ol=(e,t)=>(...r)=>{let n=e(...r);return `\x1B[${38+t};5;${n}m`},xl=(e,t)=>(...r)=>{let n=e(...r);return `\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},Bi=e=>e,Al=(e,t,r)=>[e,t,r],Wr=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0});},Uo,Ur=(e,t,r,n)=>{Uo===void 0&&(Uo=Cl());let s=n?10:0,o={};for(let[u,c]of Object.entries(Uo)){let d=u==="ansi16"?"ansi":u;u===t?o[d]=e(r,s):typeof c=="object"&&(o[d]=e(c[t],s));}return o};function Lw(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[s,o]of Object.entries(n))t[s]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[s]=t[s],e.set(o[0],o[1]);Object.defineProperty(t,r,{value:n,enumerable:!1});}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",Wr(t.color,"ansi",()=>Ur(bl,"ansi16",Bi,!1)),Wr(t.color,"ansi256",()=>Ur(Ol,"ansi256",Bi,!1)),Wr(t.color,"ansi16m",()=>Ur(xl,"rgb",Al,!1)),Wr(t.bgColor,"ansi",()=>Ur(bl,"ansi16",Bi,!0)),Wr(t.bgColor,"ansi256",()=>Ur(Ol,"ansi256",Bi,!0)),Wr(t.bgColor,"ansi16m",()=>Ur(xl,"rgb",Al,!0)),t}Object.defineProperty(Ml,"exports",{enumerable:!0,get:Lw});});var kl=B((eC,$l)=>{var xn=Pi(),$w=ki(),kw=Tl(),qi=new Set(["\x1B","\x9B"]),Pw=39,Ho="\x07",Nl="[",Rw="]",Ll="m",Vo=`${Rw}8;;`,jl=e=>`${qi.values().next().value}${Nl}${e}${Ll}`,Il=e=>`${qi.values().next().value}${Vo}${e}${Ho}`,Bw=e=>e.split(" ").map(t=>xn(t)),zo=(e,t,r)=>{let n=[...t],s=!1,o=!1,u=xn($w(e[e.length-1]));for(let[c,d]of n.entries()){let g=xn(d);if(u+g<=r?e[e.length-1]+=d:(e.push(d),u=0),qi.has(d)&&(s=!0,o=n.slice(c+1).join("").startsWith(Vo)),s){o?d===Ho&&(s=!1,o=!1):d===Ll&&(s=!1);continue}u+=g,u===r&&c0&&e.length>1&&(e[e.length-2]+=e.pop());},qw=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(xn(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Yw=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return "";let n="",s,o,u=Bw(e),c=[""];for(let[g,m]of e.split(" ").entries()){r.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let D=xn(c[c.length-1]);if(g!==0&&(D>=t&&(r.wordWrap===!1||r.trim===!1)&&(c.push(""),D=0),(D>0||r.trim===!1)&&(c[c.length-1]+=" ",D++)),r.hard&&u[g]>t){let y=t-D,F=1+Math.floor((u[g]-y-1)/t);Math.floor((u[g]-1)/t)t&&D>0&&u[g]>0){if(r.wordWrap===!1&&Dt&&r.wordWrap===!1){zo(c,m,t);continue}c[c.length-1]+=m;}r.trim!==!1&&(c=c.map(qw));let d=[...c.join(` +`;else u&&typeof u=="object"?r.push(o):n+=Pr(o)+s+Pr(u)+Io;}t.section&&n.length&&(n="["+Pr(t.section)+"]"+Io+n);for(let o of r){let u=Yc(o).join("\\."),c=(t.section?t.section+".":"")+u,{whitespace:d}=t,g=No(e[o],{section:c,whitespace:d});n.length&&g.length&&(n+=Io),n+=g;}return n},Yc=e=>e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(t=>t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")),qc=e=>{let t=Object.create(null),r=t,n=null,s=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,o=e.split(/[\r\n]+/g);for(let c of o){if(!c||c.match(/^\s*[;#]/))continue;let d=c.match(s);if(!d)continue;if(d[1]!==void 0){if(n=Ni(d[1]),n==="__proto__"){r=Object.create(null);continue}r=t[n]=t[n]||Object.create(null);continue}let g=Ni(d[2]),m=g.length>2&&g.slice(-2)==="[]",D=m?g.slice(0,-2):g;if(D==="__proto__")continue;let y=d[3]?Ni(d[4]):!0,F=y==="true"||y==="false"||y==="null"?JSON.parse(y):y;m&&(jo.call(r,D)?Array.isArray(r[D])||(r[D]=[r[D]]):r[D]=[]),Array.isArray(r[D])?r[D].push(F):r[D]=F;}let u=[];for(let c of Object.keys(t)){if(!jo.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;let d=Yc(c),g=t,m=d.pop(),D=m.replace(/\\\./g,".");for(let y of d)y!=="__proto__"&&((!jo.call(g,y)||typeof g[y]!="object")&&(g[y]=Object.create(null)),g=g[y]);g===t&&D===m||(g[D]=t[c],u.push(c));}for(let c of u)delete t[c];return t},Wc=e=>e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'",Pr=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Wc(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#"),Ni=(e,t)=>{if(e=(e||"").trim(),Wc(e)){e.charAt(0)==="'"&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e);}catch{}}else {let r=!1,n="";for(let s=0,o=e.length;s{var aw=zc(),Hc=Vc;Hc.json={stringify:function(e,t,r){return JSON.stringify(e,t||null,r||2)},parse:JSON.parse};Hc.ini=aw;});var hr=B(Gc=>{var er=Br(),Rr=Gc.Memory=function(e){e=e||{},this.type="memory",this.store={},this.mtimes={},this.readOnly=!1,this.loadFrom=e.loadFrom||null,this.logicalSeparator=e.logicalSeparator||":",this.parseValues=e.parseValues||!1,this.loadFrom&&(this.store=er.loadFilesSync(this.loadFrom));};Rr.prototype.get=function(e){for(var t=this.store,r=er.path(e,this.logicalSeparator);r.length>0;){if(e=r.shift(),t&&typeof t!="string"&&Object.hasOwnProperty.call(t,e)){t=t[e];continue}return}return t};Rr.prototype.set=function(e,t){if(this.readOnly)return !1;var r=this.store,n=er.path(e,this.logicalSeparator);if(n.length===0)return !t||typeof t!="object"?!1:(this.reset(),this.store=t,!0);for(this.mtimes[e]=Date.now();n.length>1;)e=n.shift(),(!r[e]||typeof r[e]!="object"||!Object.hasOwnProperty.call(r,e))&&(r[e]={}),r=r[e];return e=n.shift(),this.parseValues&&(t=er.parseValues.call(er,t)),r[e]=t,!0};Rr.prototype.clear=function(e){if(this.readOnly)return !1;var t=this.store,r=t,n=er.path(e,this.logicalSeparator);delete this.mtimes[e];for(var s=0;s1;)e=s.shift(),n[e]||(n[e]={}),n=n[e];return e=s.shift(),typeof n[e]!="object"||Array.isArray(n[e])?(n[e]=t,!0):Object.keys(t).every(function(u){return r.merge(er.keyed(r.logicalSeparator,o,u),t[u])})};Rr.prototype.reset=function(){return this.readOnly?!1:(this.mtimes={},this.store={},!0)};Rr.prototype.loadSync=function(){return this.store||{}};});var Br=B(Kc=>{var Jc=U("fs"),uw=(To(),Yu(Mo)),Zc=Li(),cw=hr().Memory,Et=Kc;Et.path=function(e,t){return t=t||":",e==null?[]:e.split(t)};Et.key=function(){return Array.prototype.slice.call(arguments).join(":")};Et.keyed=function(){return Array.prototype.slice.call(arguments,1).join(arguments[0])};Et.loadFiles=function(e,t){if(!e)return t(null,{});var r=Array.isArray(e)?{files:e}:e;r.format=r.format||Zc.json;function n(s,o){Jc.readFile(s,function(u,c){return u?o(u):o(null,r.format.parse(c.toString()))});}uw.map(r.files,n,function(s,o){return s?t(s):t(null,Et.merge(o))});};Et.loadFilesSync=function(e){if(e){var t=Array.isArray(e)?{files:e}:e;return t.format=t.format||Zc.json,Et.merge(t.files.map(function(r){return t.format.parse(Jc.readFileSync(r,"utf8"))}))}};Et.merge=function(e){var t=new cw;return e.forEach(function(r){Object.keys(r).forEach(function(n){t.merge(n,r[n]);});}),t.store};Et.capitalize=function(e){return e&&e[0].toUpperCase()+e.slice(1)};Et.parseValues=function(e){var t=e;try{t=JSON.parse(e);}catch{e==="undefined"&&(t=void 0);}return t};Et.transform=function(e,t){var r=Object.keys(e).map(function(n){var s={key:n,value:e[n]},o=t.call(null,s);if(o){if(o.key)return o}else return null;var u=new Error("Transform function passed to store returned an invalid format: "+JSON.stringify(o));throw u.name="RuntimeError",u});return r.filter(function(n){return n!==null}).reduce(function(n,s){return n[s.key]=s.value,n},{})};});var Xc=B(Qc=>{var qr=(To(),Yu(Mo)),tr=Br(),Re=Qc.Provider=function(e){e=e||{},this.stores={},this.sources=[],this.init(e);};["argv","env"].forEach(function(e){Re.prototype[e]=function(){var t=[e].concat(Array.prototype.slice.call(arguments));return this.add.apply(this,t)};});Re.prototype.file=function(e,t){return arguments.length==1?(t=typeof e=="string"?{file:e}:e,e="file"):t=typeof t=="string"?{file:t}:t,t.type="file",this.add(e,t)};["defaults","overrides"].forEach(function(e){Re.prototype[e]=function(t){return t=t||{},t.type||(t.type="literal"),this.add(e,t)};});Re.prototype.use=function(e,t){t=t||{};function r(o){return Object.keys(t).every(function(u){return t[u]===o[u]})}var n=this.stores[e],s=n&&!r(n);return (!n||s)&&(s&&this.remove(e),this.add(e,t)),this};Re.prototype.add=function(e,t,r){t=t||{};var n=t.type||e;if(!$i()[tr.capitalize(n)])throw new Error("Cannot add store with unknown type: "+n);return this.stores[e]=this.create(n,t,r),this.stores[e].loadSync&&this.stores[e].loadSync(),this};Re.prototype.remove=function(e){return delete this.stores[e],this};Re.prototype.create=function(e,t,r){return new($i())[tr.capitalize(e.toLowerCase())](t,r)};Re.prototype.init=function(e){var t=this;e.type?this.add(e.type,e):e.store?this.add(e.store.name||e.store.type,e.store):e.stores&&Object.keys(e.stores).forEach(function(r){var n=e.stores[r];t.add(n.name||r||n.type,n);}),e.source?this.sources.push(this.create(e.source.type||e.source.name,e.source)):e.sources&&Object.keys(e.sources).forEach(function(r){var n=e.sources[r];t.sources.push(t.create(n.type||n.name||r,n));});};Re.prototype.get=function(e,t){if(typeof e=="function"&&(t=e,e=null),!t)return this._execute("get",1,e,t);var r=0,n=Object.keys(this.stores),s=this,o,u=[];qr.whilst(function(c){c(null,typeof o>"u"&&r=2)return d.get(e,function(g,m){if(g)return c(g);o=m,o&&typeof o=="object"&&!Array.isArray(o)&&(u.push(o),o=void 0),c();});o=d.get(e),o&&typeof o=="object"&&!Array.isArray(o)&&(u.push(o),o=void 0),c();},function(c){return !c&&u.length&&(o=tr.merge(u.reverse())),c?t(c):t(null,o)});};Re.prototype.any=function(e,t){if(Array.isArray(e)||(e=Array.prototype.slice.call(arguments),e.length>0&&typeof e[e.length-1]=="function"?t=e.pop():t=null),!t){for(var r,n=0;n"u"&&t.push(r);},this),t.length)throw new Error("Missing required keys: "+t.join(", "));return !0};Re.prototype.reset=function(e){return this._execute("reset",0,e)};Re.prototype.clear=function(e,t){return this._execute("clear",1,e,t)};Re.prototype.merge=function(){var e=this,t=Array.prototype.slice.call(arguments),r=typeof t[t.length-1]=="function"&&t.pop(),n=t.pop(),s=t.pop();function o(u,c){return e._execute("merge",2,u,n[u],c)}return s?this._execute("merge",2,s,n,r):Array.isArray(n)||typeof n!="object"?lw(new Error("Cannot merge non-Object into top-level."),r):qr.forEach(Object.keys(n),o,r||function(){})};Re.prototype.load=function(e){var t=this;function r(){var d=Object.keys(t.stores);return d.reverse(),d.map(function(g){return t.stores[g]})}function n(d){if(!d.loadSync)throw new Error("nconf store "+d.type+" has no loadSync() method");return d.loadSync()}function s(d,g){return !d.load&&!d.loadSync?g(new Error("nconf store "+d.type+" has no load() method")):d.loadSync?g(null,d.loadSync()):d.load(g)}function o(d,g){if(!g)return tr.merge(d.map(n));qr.map(d,s,function(m,D){return m?g(m):g(null,tr.merge(D))});}function u(d){d&&typeof d=="object"&&t.use("sources",{type:"literal",store:d});}function c(){var d=t.sources.splice(0);if(d.reverse(),!e)return u(o(d)),o(r());o(d,function(g,m){return g?e(g):(u(m),o(r(),e))});}return t.sources.length?c():o(r(),e)};Re.prototype.save=function(e,t){!t&&typeof e=="function"&&(t=e,e=null);var r=this,n=Object.keys(this.stores);function s(u,c){var d=r.stores[c];if(d.saveSync){var g=d.saveSync();typeof g=="object"&&g!==null&&u.push(g);}return u}function o(u,c,d){var g=r.stores[c];if(g.save)return g.save(e,function(m,D){if(m)return d(m);typeof D=="object"&&D!==null&&u.push(D),d(null,u);});g.saveSync&&u.push(g.saveSync()),d(null,u);}if(!t)return tr.merge(n.reduce(s,[]));qr.reduce(n,[],o,function(u,c){return u?t(u):t(null,tr.merge(c))});};Re.prototype._execute=function(e,t){var r=Array.prototype.slice.call(arguments,2),n=typeof r[r.length-1]=="function"&&r.pop(),s=["set","clear","merge","reset"].indexOf(e)!==-1,o=this,u,c=[],d=Object.keys(this.stores);function g(m,D){var y=o.stores[m];return s&&y.readOnly?D():y[e].length>t?y[e].apply(y,r.concat(D)):D(null,y[e].apply(y,r))}return n?qr.forEach(d,g,function(m){return m?n(m):n()}):(d.forEach(function(m){if(typeof u>"u"){var D=o.stores[m];if(s&&D.readOnly)return;u=D[e].apply(D,r),u&&e==="get"&&typeof u=="object"&&!Array.isArray(u)&&(c.push(u),u=void 0);}}),c.length&&(u=tr.merge(c.reverse())),u)};function lw(e,t){if(t)return t(e);throw e}});var el=B((B2,fw)=>{fw.exports={name:"nconf",description:"Hierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging.",version:"0.12.1",author:"Charlie Robbins ",contributors:["Matt Hamann ","Maciej Ma\u0142ecki ","Jarrett Cruger ","Adrien Becchis"],repository:{type:"git",url:"http://github.com/flatiron/nconf.git"},keywords:["configuration","key value store","plugabble"],dependencies:{async:"^3.0.0",ini:"^2.0.0","secure-keys":"^1.0.0",yargs:"^16.1.1"},devDependencies:{"@release-it/conventional-changelog":"^7.0.2",coveralls:"^3.1.0",eslint:"^7.0.0","nconf-yaml":"^1.0.2",nyc:"^15.1.0","release-it":"^16.2.1",vows:"^0.8.3"},main:"./lib/nconf",scripts:{test:"vows test/*-test.js test/**/*-test.js --spec",cover:"nyc --reporter=lcov npm test",coveralls:"cat coverage/lcov.info | coveralls",lint:"eslint .",release:"release-it"},engines:{node:">= 0.4.0"},license:"MIT"};});var rl=B((q2,tl)=>{var Lo=U("fs"),dw=U("util"),hw=U("path"),_t,$o=class{constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:!0,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[];}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=t.shift(),n=function(){};return typeof t[t.length-1]=="function"&&(n=t.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),_t.format.apply(_t.format,[this.cache[this.locale][r]||r].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),r=t.shift(),n=t.shift(),s=t.shift(),o=function(){};typeof t[t.length-1]=="function"&&(o=t.pop()),this.cache[this.locale]||this._readLocaleFile();let u=s===1?r:n;this.cache[this.locale][r]&&(u=this.cache[this.locale][r][s===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let c=[u];return ~u.indexOf("%d")&&c.push(s),_t.format.apply(_t.format,c.concat(t))}setLocale(t){this.locale=t;}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.cache[this.locale][r]=t[r]);}_taggedLiteral(t,...r){let n="";return t.forEach(function(s,o){let u=r[o+1];n+=s,typeof u<"u"&&(n+="%s");}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue();}_processWriteQueue(){let t=this,r=this.writeQueue[0],n=r.directory,s=r.locale,o=r.cb,u=this._resolveLocaleFile(n,s),c=JSON.stringify(this.cache[s],null,2);_t.fs.writeFile(u,c,"utf-8",function(d){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),o(d);});}_readLocaleFile(){let t={},r=this._resolveLocaleFile(this.directory,this.locale);try{_t.fs.readFileSync&&(t=JSON.parse(_t.fs.readFileSync(r,"utf-8")));}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")t={};else throw n}this.cache[this.locale]=t;}_resolveLocaleFile(t,r){let n=_t.resolve(t,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let s=_t.resolve(t,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s);}return n}_fileExistsSync(t){return _t.exists(t)}};function pw(e,t){_t=t;let r=new $o(e);return {__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var mw={fs:{readFileSync:Lo.readFileSync,writeFile:Lo.writeFile},format:dw.format,resolve:hw.resolve,exists:e=>{try{return Lo.statSync(e).isFile()}catch{return !1}}},gw=e=>pw(e,mw);tl.exports=gw;});var Ro=B((Y2,cl)=>{var Dw=U("util"),yw=U("fs"),nl=U("path");function Cn(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let r="",n=!1,s=e.match(/^-+/);for(let o=s?s[0].length:0;o0?n+=`${t}${r.charAt(s)}`:n+=u;}return n}function al(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function ww(e){if(Array.isArray(e))return e.map(u=>typeof u!="string"?u+"":u);e=e.trim();let t=0,r=null,n=null,s=null,o=[];for(let u=0;u{typeof v=="number"&&(_.nargs[h]=v,_.keys.push(h));}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([h,v])=>{typeof v=="function"&&(_.coercions[h]=v,_.keys.push(h));}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(h){_.configs[h]=!0;}):typeof n.config=="object"&&Object.entries(n.config).forEach(([h,v])=>{(typeof v=="boolean"||typeof v=="function")&&(_.configs[h]=v);})),Ye(n.key,o,n.default,_.arrays),Object.keys(c).forEach(function(h){(_.aliases[h]||[]).forEach(function(v){c[v]=c[h];});});let x=null;S();let w=[],M=Object.assign(Object.create(null),{_:[]}),P={};for(let h=0;h=3&&(R(Q[1],_.arrays)?h=te(h,Q[1],s,Q[2]):R(Q[1],_.nargs)!==!1?h=X(h,Q[1],s,Q[2]):L(Q[1],Q[2]));else if(v.match($)&&u["boolean-negation"])Q=v.match($),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(b=Q[1],L(b,R(b,_.arrays)?[!1]:!1));else if(v.match(/^--.+/)||!u["short-option-groups"]&&v.match(/^-[^-]+/))Q=v.match(/^--?(.+)/),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(b=Q[1],R(b,_.arrays)?h=te(h,b,s):R(b,_.nargs)!==!1?h=X(h,b,s):(re=s[h+1],re!==void 0&&(!re.match(/^-/)||re.match(j))&&!R(b,_.bools)&&!R(b,_.counts)||/^(true|false)$/.test(re)?(L(b,re),h++):L(b,le(b))));else if(v.match(/^-.\..+=/))Q=v.match(/^-([^=]+)=([\s\S]*)$/),Q!==null&&Array.isArray(Q)&&Q.length>=3&&L(Q[1],Q[2]);else if(v.match(/^-.\..+/)&&!v.match(j))re=s[h+1],Q=v.match(/^-(.\..+)/),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(b=Q[1],re!==void 0&&!re.match(/^-/)&&!R(b,_.bools)&&!R(b,_.counts)?(L(b,re),h++):L(b,le(b)));else if(v.match(/^-[^-]+/)&&!v.match(j)){z=v.slice(1,-1).split(""),A=!1;for(let Fe=0;Feh!=="--"&&h.includes("-")).forEach(h=>{delete M[h];}),u["strip-aliased"]&&[].concat(...Object.keys(o).map(h=>o[h])).forEach(h=>{u["camel-case-expansion"]&&h.includes("-")&&delete M[h.split(".").map(v=>Cn(v)).join(".")],delete M[h];});function J(h){let v=q("_",h);(typeof v=="string"||typeof v=="number")&&M._.push(v);}function X(h,v,T,A){let b,z=R(v,_.nargs);if(z=typeof z!="number"||isNaN(z)?1:z,z===0)return E(A)||(x=Error(C("Argument unexpected for: %s",v))),L(v,le(v)),h;let Q=E(A)?0:1;if(u["nargs-eats-options"])T.length-(h+1)+Q0&&(L(v,A),re--),b=h+1;b0||Q&&typeof Q=="number"&&b.length>=Q||(z=T[re],/^-/.test(z)&&!j.test(z)&&!ie(z)));re++)h=re,b.push(Z(v,z));}return typeof Q=="number"&&(Q&&b.length1&&u["dot-notation"]&&(_.aliases[A[0]]||[]).forEach(function(b){let z=b.split("."),Q=[].concat(A);Q.shift(),z=z.concat(Q),(_.aliases[h]||[]).includes(z.join("."))||de(M,z,T);}),R(h,_.normalize)&&!R(h,_.arrays)&&[h].concat(_.aliases[h]||[]).forEach(function(z){Object.defineProperty(P,z,{enumerable:!0,get(){return v},set(Q){v=typeof Q=="string"?Wt.normalize(Q):Q;}});});}function ee(h,v){_.aliases[h]&&_.aliases[h].length||(_.aliases[h]=[v],y[v]=!0),_.aliases[v]&&_.aliases[v].length||ee(v,h);}function Z(h,v){typeof v=="string"&&(v[0]==="'"||v[0]==='"')&&v[v.length-1]===v[0]&&(v=v.substring(1,v.length-1)),(R(h,_.bools)||R(h,_.counts))&&typeof v=="string"&&(v=v==="true");let T=Array.isArray(v)?v.map(function(A){return q(h,A)}):q(h,v);return R(h,_.counts)&&(E(T)||typeof T=="boolean")&&(T=ko()),R(h,_.normalize)&&R(h,_.arrays)&&(Array.isArray(v)?T=v.map(A=>Wt.normalize(A)):T=Wt.normalize(v)),T}function q(h,v){return !u["parse-positional-numbers"]&&h==="_"||!R(h,_.strings)&&!R(h,_.bools)&&!Array.isArray(v)&&(al(v)&&u["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${v}`)))||!E(v)&&R(h,_.numbers))&&(v=Number(v)),v}function Y(h){let v=Object.create(null);K(v,_.aliases,c),Object.keys(_.configs).forEach(function(T){let A=h[T]||v[T];if(A)try{let b=null,z=Wt.resolve(Wt.cwd(),A),Q=_.configs[T];if(typeof Q=="function"){try{b=Q(z);}catch(re){b=re;}if(b instanceof Error){x=b;return}}else b=Wt.require(z);V(b);}catch(b){b.name==="PermissionDenied"?x=b:h[T]&&(x=Error(C("Invalid JSON config file: %s",A)));}});}function V(h,v){Object.keys(h).forEach(function(T){let A=h[T],b=v?v+"."+T:T;typeof A=="object"&&A!==null&&!Array.isArray(A)&&u["dot-notation"]?V(A,b):(!ye(M,b.split("."))||R(b,_.arrays)&&u["combine-arrays"])&&L(b,A);});}function I(){typeof d<"u"&&d.forEach(function(h){V(h);});}function W(h,v){if(typeof g>"u")return;let T=typeof g=="string"?g:"",A=Wt.env();Object.keys(A).forEach(function(b){if(T===""||b.lastIndexOf(T,0)===0){let z=b.split("__").map(function(Q,re){return re===0&&(Q=Q.substring(T.length)),Cn(Q)});(v&&_.configs[z.join(".")]||!v)&&!ye(h,z)&&L(z.join("."),A[b]);}});}function k(h){let v,T=new Set;Object.keys(h).forEach(function(A){if(!T.has(A)&&(v=R(A,_.coercions),typeof v=="function"))try{let b=q(A,v(h[A]));[].concat(_.aliases[A]||[],A).forEach(z=>{T.add(z),h[z]=b;});}catch(b){x=b;}});}function G(h){return _.keys.forEach(v=>{~v.indexOf(".")||typeof h[v]>"u"&&(h[v]=void 0);}),h}function K(h,v,T,A=!1){Object.keys(T).forEach(function(b){ye(h,b.split("."))||(de(h,b.split("."),T[b]),A&&(F[b]=!0),(v[b]||[]).forEach(function(z){ye(h,z.split("."))||de(h,z.split("."),T[b]);}));});}function ye(h,v){let T=h;u["dot-notation"]||(v=[v.join(".")]),v.slice(0,-1).forEach(function(b){T=T[b]||{};});let A=v[v.length-1];return typeof T!="object"?!1:A in T}function de(h,v,T){let A=h;u["dot-notation"]||(v=[v.join(".")]),v.slice(0,-1).forEach(function(Ae){Ae=il(Ae),typeof A=="object"&&A[Ae]===void 0&&(A[Ae]={}),typeof A[Ae]!="object"||Array.isArray(A[Ae])?(Array.isArray(A[Ae])?A[Ae].push({}):A[Ae]=[A[Ae],{}],A=A[Ae][A[Ae].length-1]):A=A[Ae];});let b=il(v[v.length-1]),z=R(v.join("."),_.arrays),Q=Array.isArray(T),re=u["duplicate-arguments-array"];!re&&R(b,_.nargs)&&(re=!0,(!E(A[b])&&_.nargs[b]===1||Array.isArray(A[b])&&A[b].length===_.nargs[b])&&(A[b]=void 0)),T===ko()?A[b]=ko(A[b]):Array.isArray(A[b])?re&&z&&Q?A[b]=u["flatten-duplicate-arrays"]?A[b].concat(T):(Array.isArray(A[b][0])?A[b]:[A[b]]).concat([T]):!re&&!!z==!!Q?A[b]=T:A[b]=A[b].concat([T]):A[b]===void 0&&z?A[b]=Q?T:[T]:re&&!(A[b]===void 0||R(b,_.counts)||R(b,_.bools))?A[b]=[A[b],T]:A[b]=T;}function Ye(...h){h.forEach(function(v){Object.keys(v||{}).forEach(function(T){_.aliases[T]||(_.aliases[T]=[].concat(o[T]||[]),_.aliases[T].concat(T).forEach(function(A){if(/-/.test(A)&&u["camel-case-expansion"]){let b=Cn(A);b!==T&&_.aliases[T].indexOf(b)===-1&&(_.aliases[T].push(b),y[b]=!0);}}),_.aliases[T].concat(T).forEach(function(A){if(A.length>1&&/[A-Z]/.test(A)&&u["camel-case-expansion"]){let b=ol(A,"-");b!==T&&_.aliases[T].indexOf(b)===-1&&(_.aliases[T].push(b),y[b]=!0);}}),_.aliases[T].forEach(function(A){_.aliases[A]=[T].concat(_.aliases[T].filter(function(b){return A!==b}));}));});});}function R(h,v){let T=[].concat(_.aliases[h]||[],h),A=Object.keys(v),b=T.find(z=>A.includes(z));return b?v[b]:!1}function Ke(h){let v=Object.keys(_);return [].concat(v.map(A=>_[A])).some(function(A){return Array.isArray(A)?A.includes(h):A[h]})}function Ne(h,...v){return [].concat(...v).some(function(A){let b=h.match(A);return b&&Ke(b[1])})}function Ct(h){if(h.match(j)||!h.match(/^-[^-]+/))return !1;let v=!0,T,A=h.slice(1).split("");for(let b=0;bR(h,_.arrays)?(x=Error(C("Invalid configuration: %s, opts.count excludes opts.array.",h)),!0):R(h,_.nargs)?(x=Error(C("Invalid configuration: %s, opts.count excludes opts.narg.",h)),!0):!1);}return {aliases:Object.assign({},_.aliases),argv:Object.assign(P,M),configuration:u,defaulted:Object.assign({},F),error:x,newAliases:Object.assign({},y)}}};function vw(e){let t=[],r=Object.create(null),n=!0;for(Object.keys(e).forEach(function(s){t.push([].concat(e[s],s));});n;){n=!1;for(let s=0;sEw,format:Dw.format,normalize:nl.normalize,resolve:nl.resolve,require:e=>{if(typeof U<"u")return U(e);if(e.match(/\.json$/))return yw.readFileSync(e,"utf8");throw Error("only .json config files are supported in ESM")}}),On=function(t,r){return ul.parse(t.slice(),r).argv};On.detailed=function(e,t){return ul.parse(e.slice(),t)};On.camelCase=Cn;On.decamelize=ol;On.looksLikeNumber=al;cl.exports=On;});var fl=B((U2,ll)=>{ll.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")};});var ki=B((z2,dl)=>{var _w=fl();dl.exports=e=>typeof e=="string"?e.replace(_w(),""):e;});var pl=B((H2,Bo)=>{var hl=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);Bo.exports=hl;Bo.exports.default=hl;});var gl=B((V2,ml)=>{ml.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var Pi=B((G2,qo)=>{var Fw=ki(),Sw=pl(),Cw=gl(),Dl=e=>{if(typeof e!="string"||e.length===0||(e=Fw(e),e.length===0))return 0;e=e.replace(Cw()," ");let t=0;for(let r=0;r=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,t+=Sw(n)?2:1);}return t};qo.exports=Dl;qo.exports.default=Dl;});var wl=B((J2,yl)=>{yl.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};});var Yo=B((Z2,El)=>{var bn=wl(),vl={};for(let e of Object.keys(bn))vl[bn[e]]=e;var ae={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};El.exports=ae;for(let e of Object.keys(ae)){if(!("channels"in ae[e]))throw new Error("missing channels property: "+e);if(!("labels"in ae[e]))throw new Error("missing channel labels property: "+e);if(ae[e].labels.length!==ae[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=ae[e];delete ae[e].channels,delete ae[e].labels,Object.defineProperty(ae[e],"channels",{value:t}),Object.defineProperty(ae[e],"labels",{value:r});}ae.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),o=Math.max(t,r,n),u=o-s,c,d;o===s?c=0:t===o?c=(r-n)/u:r===o?c=2+(n-t)/u:n===o&&(c=4+(t-r)/u),c=Math.min(c*60,360),c<0&&(c+=360);let g=(s+o)/2;return o===s?d=0:g<=.5?d=u/(o+s):d=u/(2-o-s),[c,d*100,g*100]};ae.rgb.hsv=function(e){let t,r,n,s,o,u=e[0]/255,c=e[1]/255,d=e[2]/255,g=Math.max(u,c,d),m=g-Math.min(u,c,d),D=function(y){return (g-y)/6/m+1/2};return m===0?(s=0,o=0):(o=m/g,t=D(u),r=D(c),n=D(d),u===g?s=n-r:c===g?s=1/3+t-n:d===g&&(s=2/3+r-t),s<0?s+=1:s>1&&(s-=1)),[s*360,o*100,g*100]};ae.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],s=ae.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[s,o*100,n*100]};ae.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-r,1-n),o=(1-t-s)/(1-s)||0,u=(1-r-s)/(1-s)||0,c=(1-n-s)/(1-s)||0;return [o*100,u*100,c*100,s*100]};function Ow(e,t){return (e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}ae.rgb.keyword=function(e){let t=vl[e];if(t)return t;let r=1/0,n;for(let s of Object.keys(bn)){let o=bn[s],u=Ow(e,o);u.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let s=t*.4124+r*.3576+n*.1805,o=t*.2126+r*.7152+n*.0722,u=t*.0193+r*.1192+n*.9505;return [s*100,o*100,u*100]};ae.rgb.lab=function(e){let t=ae.rgb.xyz(e),r=t[0],n=t[1],s=t[2];r/=95.047,n/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let o=116*n-16,u=500*(r-n),c=200*(n-s);return [o,u,c]};ae.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s,o,u;if(r===0)return u=n*255,[u,u,u];n<.5?s=n*(1+r):s=n+r-n*r;let c=2*n-s,d=[0,0,0];for(let g=0;g<3;g++)o=t+1/3*-(g-1),o<0&&o++,o>1&&o--,6*o<1?u=c+(s-c)*6*o:2*o<1?u=s:3*o<2?u=c+(s-c)*(2/3-o)*6:u=c,d[g]=u*255;return d};ae.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=r,o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,s*=o<=1?o:2-o;let u=(n+r)/2,c=n===0?2*s/(o+s):2*r/(n+r);return [t,c*100,u*100]};ae.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,s=Math.floor(t)%6,o=t-Math.floor(t),u=255*n*(1-r),c=255*n*(1-r*o),d=255*n*(1-r*(1-o));switch(n*=255,s){case 0:return [n,d,u];case 1:return [c,n,u];case 2:return [u,n,d];case 3:return [u,c,n];case 4:return [d,u,n];case 5:return [n,u,c]}};ae.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=Math.max(n,.01),o,u;u=(2-r)*n;let c=(2-r)*s;return o=r*s,o/=c<=1?c:2-c,o=o||0,u/=2,[t,o*100,u*100]};ae.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s=r+n,o;s>1&&(r/=s,n/=s);let u=Math.floor(6*t),c=1-n;o=6*t-u,u&1&&(o=1-o);let d=r+o*(c-r),g,m,D;switch(u){default:case 6:case 0:g=c,m=d,D=r;break;case 1:g=d,m=c,D=r;break;case 2:g=r,m=c,D=d;break;case 3:g=r,m=d,D=c;break;case 4:g=d,m=r,D=c;break;case 5:g=c,m=r,D=d;break}return [g*255,m*255,D*255]};ae.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s=e[3]/100,o=1-Math.min(1,t*(1-s)+s),u=1-Math.min(1,r*(1-s)+s),c=1-Math.min(1,n*(1-s)+s);return [o*255,u*255,c*255]};ae.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s,o,u;return s=t*3.2406+r*-1.5372+n*-.4986,o=t*-.9689+r*1.8758+n*.0415,u=t*.0557+r*-.204+n*1.057,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),u=Math.min(Math.max(0,u),1),[s*255,o*255,u*255]};ae.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let s=116*r-16,o=500*(t-r),u=200*(r-n);return [s,o,u]};ae.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],s,o,u;o=(t+16)/116,s=r/500+o,u=o-n/200;let c=o**3,d=s**3,g=u**3;return o=c>.008856?c:(o-16/116)/7.787,s=d>.008856?d:(s-16/116)/7.787,u=g>.008856?g:(u-16/116)/7.787,s*=95.047,o*=100,u*=108.883,[s,o,u]};ae.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],s;s=Math.atan2(n,r)*360/2/Math.PI,s<0&&(s+=360);let u=Math.sqrt(r*r+n*n);return [t,u,s]};ae.lch.lab=function(e){let t=e[0],r=e[1],s=e[2]/360*2*Math.PI,o=r*Math.cos(s),u=r*Math.sin(s);return [t,o,u]};ae.rgb.ansi16=function(e,t=null){let[r,n,s]=e,o=t===null?ae.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let u=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(u+=60),u};ae.hsv.ansi16=function(e){return ae.rgb.ansi16(ae.hsv.rgb(e),e[2])};ae.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};ae.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,n=(t&1)*r*255,s=(t>>1&1)*r*255,o=(t>>2&1)*r*255;return [n,s,o]};ae.ansi256.rgb=function(e){if(e>=232){let o=(e-232)*10+8;return [o,o,o]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,s=t%6/5*255;return [r,n,s]};ae.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return "000000".substring(r.length)+r};ae.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return [0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(c=>c+c).join(""));let n=parseInt(r,16),s=n>>16&255,o=n>>8&255,u=n&255;return [s,o,u]};ae.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),u=s-o,c,d;return u<1?c=o/(1-u):c=0,u<=0?d=0:s===t?d=(r-n)/u%6:s===r?d=2+(n-t)/u:d=4+(t-r)/u,d/=6,d%=1,[d*360,u*100,c*100]};ae.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),s=0;return n<1&&(s=(r-.5*n)/(1-n)),[e[0],n*100,s*100]};ae.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,s=0;return n<1&&(s=(r-n)/(1-n)),[e[0],n*100,s*100]};ae.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return [n*255,n*255,n*255];let s=[0,0,0],o=t%1*6,u=o%1,c=1-u,d=0;switch(Math.floor(o)){case 0:s[0]=1,s[1]=u,s[2]=0;break;case 1:s[0]=c,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=u;break;case 3:s[0]=0,s[1]=c,s[2]=1;break;case 4:s[0]=u,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=c;}return d=(1-r)*n,[(r*s[0]+d)*255,(r*s[1]+d)*255,(r*s[2]+d)*255]};ae.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),s=0;return n>0&&(s=t/n),[e[0],s*100,n*100]};ae.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,s=0;return n>0&&n<.5?s=t/(2*n):n>=.5&&n<1&&(s=t/(2*(1-n))),[e[0],s*100,n*100]};ae.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return [e[0],(n-t)*100,(1-n)*100]};ae.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,s=n-t,o=0;return s<1&&(o=(n-s)/(1-s)),[e[0],s*100,o*100]};ae.apple.rgb=function(e){return [e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};ae.rgb.apple=function(e){return [e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};ae.gray.rgb=function(e){return [e[0]/100*255,e[0]/100*255,e[0]/100*255]};ae.gray.hsl=function(e){return [0,0,e[0]]};ae.gray.hsv=ae.gray.hsl;ae.gray.hwb=function(e){return [0,100,e[0]]};ae.gray.cmyk=function(e){return [0,0,0,e[0]]};ae.gray.lab=function(e){return [e[0],0,0]};ae.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return "000000".substring(n.length)+n};ae.rgb.gray=function(e){return [(e[0]+e[1]+e[2])/3/255*100]};});var Fl=B((K2,_l)=>{var Ri=Yo();function bw(){let e={},t=Object.keys(Ri);for(let r=t.length,n=0;n{var Wo=Yo(),Tw=Fl(),Yr={},jw=Object.keys(Wo);function Iw(e){let t=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return "conversion"in e&&(t.conversion=e.conversion),t}function Nw(e){let t=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let s=e(r);if(typeof s=="object")for(let o=s.length,u=0;u{Yr[e]={},Object.defineProperty(Yr[e],"channels",{value:Wo[e].channels}),Object.defineProperty(Yr[e],"labels",{value:Wo[e].labels});let t=Tw(e);Object.keys(t).forEach(n=>{let s=t[n];Yr[e][n]=Nw(s),Yr[e][n].raw=Iw(s);});});Sl.exports=Yr;});var Tl=B((X2,Ml)=>{var Ol=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,bl=(e,t)=>(...r)=>{let n=e(...r);return `\x1B[${38+t};5;${n}m`},xl=(e,t)=>(...r)=>{let n=e(...r);return `\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},Bi=e=>e,Al=(e,t,r)=>[e,t,r],Wr=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0});},Uo,Ur=(e,t,r,n)=>{Uo===void 0&&(Uo=Cl());let s=n?10:0,o={};for(let[u,c]of Object.entries(Uo)){let d=u==="ansi16"?"ansi":u;u===t?o[d]=e(r,s):typeof c=="object"&&(o[d]=e(c[t],s));}return o};function Lw(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[s,o]of Object.entries(n))t[s]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[s]=t[s],e.set(o[0],o[1]);Object.defineProperty(t,r,{value:n,enumerable:!1});}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",Wr(t.color,"ansi",()=>Ur(Ol,"ansi16",Bi,!1)),Wr(t.color,"ansi256",()=>Ur(bl,"ansi256",Bi,!1)),Wr(t.color,"ansi16m",()=>Ur(xl,"rgb",Al,!1)),Wr(t.bgColor,"ansi",()=>Ur(Ol,"ansi16",Bi,!0)),Wr(t.bgColor,"ansi256",()=>Ur(bl,"ansi256",Bi,!0)),Wr(t.bgColor,"ansi16m",()=>Ur(xl,"rgb",Al,!0)),t}Object.defineProperty(Ml,"exports",{enumerable:!0,get:Lw});});var kl=B((eC,$l)=>{var xn=Pi(),$w=ki(),kw=Tl(),qi=new Set(["\x1B","\x9B"]),Pw=39,Ho="\x07",Nl="[",Rw="]",Ll="m",Vo=`${Rw}8;;`,jl=e=>`${qi.values().next().value}${Nl}${e}${Ll}`,Il=e=>`${qi.values().next().value}${Vo}${e}${Ho}`,Bw=e=>e.split(" ").map(t=>xn(t)),zo=(e,t,r)=>{let n=[...t],s=!1,o=!1,u=xn($w(e[e.length-1]));for(let[c,d]of n.entries()){let g=xn(d);if(u+g<=r?e[e.length-1]+=d:(e.push(d),u=0),qi.has(d)&&(s=!0,o=n.slice(c+1).join("").startsWith(Vo)),s){o?d===Ho&&(s=!1,o=!1):d===Ll&&(s=!1);continue}u+=g,u===r&&c0&&e.length>1&&(e[e.length-2]+=e.pop());},qw=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(xn(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Yw=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return "";let n="",s,o,u=Bw(e),c=[""];for(let[g,m]of e.split(" ").entries()){r.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let D=xn(c[c.length-1]);if(g!==0&&(D>=t&&(r.wordWrap===!1||r.trim===!1)&&(c.push(""),D=0),(D>0||r.trim===!1)&&(c[c.length-1]+=" ",D++)),r.hard&&u[g]>t){let y=t-D,F=1+Math.floor((u[g]-y-1)/t);Math.floor((u[g]-1)/t)t&&D>0&&u[g]>0){if(r.wordWrap===!1&&Dt&&r.wordWrap===!1){zo(c,m,t);continue}c[c.length-1]+=m;}r.trim!==!1&&(c=c.map(qw));let d=[...c.join(` `)];for(let[g,m]of d.entries()){if(n+=m,qi.has(m)){let{groups:y}=new RegExp(`(?:\\${Nl}(?\\d+)m|\\${Vo}(?.*)${Ho})`).exec(d.slice(g).join(""))||{groups:{}};if(y.code!==void 0){let F=Number.parseFloat(y.code);s=F===Pw?void 0:F;}else y.uri!==void 0&&(o=y.uri.length===0?void 0:y.uri);}let D=kw.codes.get(Number(s));d[g+1]===` `?(o&&(n+=Il("")),s&&D&&(n+=jl(D))):m===` `&&(s&&D&&(n+=jl(s)),o&&(n+=Il(o)));}return n};$l.exports=(e,t,r)=>String(e).normalize().replace(/\r\n/g,` @@ -68,27 +68,27 @@ _{{app_name}}_yargs_completions() } compdef _{{app_name}}_yargs_completions {{app_name}} ###-end-{{app_name}}-completions-### -`;function Fv(e,t,r,n){let s={completionKey:"get-yargs-completions"},o;s.setParsed=function(g){o=g.aliases;};let u=n.getEnv("SHELL")&&n.getEnv("SHELL").indexOf("zsh")!==-1||n.getEnv("ZSH_NAME")&&n.getEnv("ZSH_NAME").indexOf("zsh")!==-1;s.getCompletion=function(g,m){let D=[],y=g.length?g[g.length-1]:"",F=e.parse(g,!0),C=e.getContext().commands;function _($){if(rt(c,null,n),Sv(c)){let x=c(y,$);return Ut(x)?x.then(w=>{n.process.nextTick(()=>{m(w);});}).catch(w=>{n.process.nextTick(()=>{throw w});}):m(x)}else return c(y,$,x=>{m(x);})}if(c)return Ut(F)?F.then(_):_(F);let j=r.getCommandHandlers();for(let $=0,x=g.length;${let x=Hr($[0]).cmd;if(g.indexOf(x)===-1)if(!u)D.push(x);else {let w=$[1]||"";D.push(x.replace(/:/g,"\\:")+":"+w);}}),y.match(/^-/)||y===""&&D.length===0){let $=t.getDescriptions(),x=e.getOptions();Object.keys(x.key).forEach(w=>{let M=!!x.configuration["boolean-negation"]&&x.boolean.includes(w),P=[w].concat(o[w]||[]);M&&(P=P.concat(P.map(X=>`no-${X}`)));function J(X){if(P.every(L=>g.indexOf(`--${L}`)===-1)){let L=q=>/^--/.test(q),ee=q=>/^[^0-9]$/.test(q),Z=!L(y)&&ee(X)?"-":"--";if(!u)D.push(Z+X);else {let q=$[X]||"";D.push(Z+`${X.replace(/:/g,"\\:")}:${q.replace("__yargsString__:","")}`);}}}J(w),M&&x.default[w]&&J(`no-${w}`);});}m(D);},s.generateCompletionScript=function(g,m){let D=u?_v:Ev,y=n.path.basename(g);return g.match(/\.js$/)&&(g=`./${g}`),D=D.replace(/{{app_name}}/g,y),D=D.replace(/{{completion_command}}/g,m),D.replace(/{{app_path}}/g,g)};let c=null;return s.registerFunction=d=>{c=d;},s}function Sv(e){return e.length<3}function Cv(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let r=[],n;for(n=0;n<=t.length;n++)r[n]=[n];let s;for(s=0;s<=e.length;s++)r[0][s]=s;for(n=1;n<=t.length;n++)for(s=1;s<=e.length;s++)t.charAt(n-1)===e.charAt(s-1)?r[n][s]=r[n-1][s-1]:r[n][s]=Math.min(r[n-1][s-1]+1,Math.min(r[n][s-1]+1,r[n-1][s]+1));return r[t.length][e.length]}var sf=["$0","--","_"];function bv(e,t,r,n){let s=r.__,o=r.__n,u={};u.nonOptionCount=function(F){let C=e.getDemandedCommands(),j=F._.length+(F["--"]?F["--"].length:0)-e.getContext().commands.length;C._&&(jC._.max)&&(jC._.max&&(C._.maxMsg!==void 0?t.fail(C._.maxMsg?C._.maxMsg.replace(/\$0/g,j.toString()).replace(/\$1/,C._.max.toString()):null):t.fail(o("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",j,j.toString(),C._.max.toString()))));},u.positionalCount=function(F,C){C"u")&&(_=_||{},_[j]=C[j]);if(_){let j=[];for(let x of Object.keys(_)){let w=_[x];w&&j.indexOf(w)<0&&j.push(w);}let $=j.length?` +`;function Fv(e,t,r,n){let s={completionKey:"get-yargs-completions"},o;s.setParsed=function(g){o=g.aliases;};let u=n.getEnv("SHELL")&&n.getEnv("SHELL").indexOf("zsh")!==-1||n.getEnv("ZSH_NAME")&&n.getEnv("ZSH_NAME").indexOf("zsh")!==-1;s.getCompletion=function(g,m){let D=[],y=g.length?g[g.length-1]:"",F=e.parse(g,!0),C=e.getContext().commands;function _($){if(rt(c,null,n),Sv(c)){let x=c(y,$);return Ut(x)?x.then(w=>{n.process.nextTick(()=>{m(w);});}).catch(w=>{n.process.nextTick(()=>{throw w});}):m(x)}else return c(y,$,x=>{m(x);})}if(c)return Ut(F)?F.then(_):_(F);let j=r.getCommandHandlers();for(let $=0,x=g.length;${let x=Hr($[0]).cmd;if(g.indexOf(x)===-1)if(!u)D.push(x);else {let w=$[1]||"";D.push(x.replace(/:/g,"\\:")+":"+w);}}),y.match(/^-/)||y===""&&D.length===0){let $=t.getDescriptions(),x=e.getOptions();Object.keys(x.key).forEach(w=>{let M=!!x.configuration["boolean-negation"]&&x.boolean.includes(w),P=[w].concat(o[w]||[]);M&&(P=P.concat(P.map(X=>`no-${X}`)));function J(X){if(P.every(L=>g.indexOf(`--${L}`)===-1)){let L=q=>/^--/.test(q),ee=q=>/^[^0-9]$/.test(q),Z=!L(y)&&ee(X)?"-":"--";if(!u)D.push(Z+X);else {let q=$[X]||"";D.push(Z+`${X.replace(/:/g,"\\:")}:${q.replace("__yargsString__:","")}`);}}}J(w),M&&x.default[w]&&J(`no-${w}`);});}m(D);},s.generateCompletionScript=function(g,m){let D=u?_v:Ev,y=n.path.basename(g);return g.match(/\.js$/)&&(g=`./${g}`),D=D.replace(/{{app_name}}/g,y),D=D.replace(/{{completion_command}}/g,m),D.replace(/{{app_path}}/g,g)};let c=null;return s.registerFunction=d=>{c=d;},s}function Sv(e){return e.length<3}function Cv(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let r=[],n;for(n=0;n<=t.length;n++)r[n]=[n];let s;for(s=0;s<=e.length;s++)r[0][s]=s;for(n=1;n<=t.length;n++)for(s=1;s<=e.length;s++)t.charAt(n-1)===e.charAt(s-1)?r[n][s]=r[n-1][s-1]:r[n][s]=Math.min(r[n-1][s-1]+1,Math.min(r[n][s-1]+1,r[n-1][s]+1));return r[t.length][e.length]}var sf=["$0","--","_"];function Ov(e,t,r,n){let s=r.__,o=r.__n,u={};u.nonOptionCount=function(F){let C=e.getDemandedCommands(),j=F._.length+(F["--"]?F["--"].length:0)-e.getContext().commands.length;C._&&(jC._.max)&&(jC._.max&&(C._.maxMsg!==void 0?t.fail(C._.maxMsg?C._.maxMsg.replace(/\$0/g,j.toString()).replace(/\$1/,C._.max.toString()):null):t.fail(o("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",j,j.toString(),C._.max.toString()))));},u.positionalCount=function(F,C){C"u")&&(_=_||{},_[j]=C[j]);if(_){let j=[];for(let x of Object.keys(_)){let w=_[x];w&&j.indexOf(w)<0&&j.push(w);}let $=j.length?` ${j.join(` `)}`:"";t.fail(o("Missing required argument: %s","Missing required arguments: %s",Object.keys(_).length,Object.keys(_).join(", ")+$));}},u.unknownArguments=function(F,C,_,j,$=!0){let x=e.getCommandInstance().getCommands(),w=[],M=e.getContext();Object.keys(F).forEach(P=>{sf.indexOf(P)===-1&&!Object.prototype.hasOwnProperty.call(_,P)&&!Object.prototype.hasOwnProperty.call(e._getParseContext(),P)&&!u.isValidAndSomeAliasIsNotNew(P,C)&&w.push(P);}),$&&(M.commands.length>0||x.length>0||j)&&F._.slice(M.commands.length).forEach(P=>{x.indexOf(""+P)===-1&&w.push(""+P);}),w.length>0&&t.fail(o("Unknown argument: %s","Unknown arguments: %s",w.length,w.join(", ")));},u.unknownCommands=function(F){let C=e.getCommandInstance().getCommands(),_=[],j=e.getContext();return (j.commands.length>0||C.length>0)&&F._.slice(j.commands.length).forEach($=>{C.indexOf(""+$)===-1&&_.push(""+$);}),_.length>0?(t.fail(o("Unknown command: %s","Unknown commands: %s",_.length,_.join(", "))),!0):!1},u.isValidAndSomeAliasIsNotNew=function(F,C){if(!Object.prototype.hasOwnProperty.call(C,F))return !1;let _=e.parsed.newAliases;for(let j of [F,...C[F]])if(!Object.prototype.hasOwnProperty.call(_,j)||!_[F])return !0;return !1},u.limitedChoices=function(F){let C=e.getOptions(),_={};if(!Object.keys(C.choices).length)return;Object.keys(F).forEach(x=>{sf.indexOf(x)===-1&&Object.prototype.hasOwnProperty.call(C.choices,x)&&[].concat(F[x]).forEach(w=>{C.choices[x].indexOf(w)===-1&&w!==void 0&&(_[x]=(_[x]||[]).concat(w));});});let j=Object.keys(_);if(!j.length)return;let $=s("Invalid values:");j.forEach(x=>{$+=` ${s("Argument: %s, Given: %s, Choices: %s",x,t.stringifiedValues(_[x]),t.stringifiedValues(C.choices[x]))}`;}),t.fail($);};let c=[];u.check=function(F,C){c.push({func:F,global:C});},u.customChecks=function(F,C){for(let _=0,j;(j=c[_])!==void 0;_++){let $=j.func,x=null;try{x=$(F,C);}catch(w){t.fail(w.message?w.message:w,w);continue}x?(typeof x=="string"||x instanceof Error)&&t.fail(x.toString(),x):t.fail(s("Argument check failed: %s",$.toString()));}};let d={};u.implies=function(F,C){oe(" [array|number|string]",[F,C],arguments.length),typeof F=="object"?Object.keys(F).forEach(_=>{u.implies(_,F[_]);}):(e.global(F),d[F]||(d[F]=[]),Array.isArray(C)?C.forEach(_=>u.implies(F,_)):(rt(C,void 0,n),d[F].push(C)));},u.getImplied=function(){return d};function g(y,F){let C=Number(F);return F=isNaN(C)?F:C,typeof F=="number"?F=y._.length>=F:F.match(/^--no-.+/)?(F=F.match(/^--no-(.+)/)[1],F=!y[F]):F=y[F],F}u.implications=function(F){let C=[];if(Object.keys(d).forEach(_=>{let j=_;(d[_]||[]).forEach($=>{let x=j,w=$;x=g(F,x),$=g(F,$),x&&!$&&C.push(` ${j} -> ${w}`);});}),C.length){let _=`${s("Implications failed:")} -`;C.forEach(j=>{_+=j;}),t.fail(_);}};let m={};u.conflicts=function(F,C){oe(" [array|string]",[F,C],arguments.length),typeof F=="object"?Object.keys(F).forEach(_=>{u.conflicts(_,F[_]);}):(e.global(F),m[F]||(m[F]=[]),Array.isArray(C)?C.forEach(_=>u.conflicts(F,_)):m[F].push(C));},u.getConflicting=()=>m,u.conflicting=function(F){Object.keys(F).forEach(C=>{m[C]&&m[C].forEach(_=>{_&&F[C]!==void 0&&F[_]!==void 0&&t.fail(s("Arguments %s and %s are mutually exclusive",C,_));});});},u.recommendCommands=function(F,C){C=C.sort((x,w)=>w.length-x.length);let j=null,$=1/0;for(let x=0,w;(w=C[x])!==void 0;x++){let M=Cv(F,w);M<=3&&M<$&&($=M,j=w);}j&&t.fail(s("Did you mean %s?",j));},u.reset=function(F){return d=Vr(d,C=>!F[C]),m=Vr(m,C=>!F[C]),c=c.filter(C=>C.global),u};let D=[];return u.freeze=function(){D.push({implied:d,checks:c,conflicting:m});},u.unfreeze=function(){let F=D.pop();rt(F,void 0,n),{implied:d,checks:c,conflicting:m}=F;},u}var ce;function Ov(e){return ce=e,xv}function xv(e=[],t=ce.process.cwd(),r){let n={},s,o=null,u={},c=[],d="",g={},m,D,y=null,F=ce.y18n;n.middleware=uf(c,n),n.scriptName=function(E){return n.customScriptName=!0,n.$0=E,n};let C;/\b(node|iojs|electron)(\.exe)?$/.test(ce.process.argv()[0])?C=ce.process.argv().slice(1,2):C=ce.process.argv().slice(0,1),n.$0=C.map(E=>{let S=ff(t,E);return E.match(/^(\/|([a-zA-Z]:)?\\)/)&&S.length_;let j=!1,$=null;n.exit=(E,S)=>{j=!0,$=S,ie&&ce.process.exit(E);};let x=null;n.completion=function(E,S,h){return oe("[string] [string|boolean|function] [function]",[E,S,h],arguments.length),typeof S=="function"&&(h=S,S=void 0),x=E||x||"completion",!S&&S!==!1&&(S="generate completion script"),n.command(x,S),h&&o.registerFunction(h),n};let w;n.resetOptions=n.reset=function(S={}){_.resets++,w=w||{};let h={};h.local=w.local?w.local:[],h.configObjects=w.configObjects?w.configObjects:[];let v={};h.local.forEach(O=>{v[O]=!0,(S[O]||[]).forEach(z=>{v[z]=!0;});}),Object.assign(g,Object.keys(u).reduce((O,z)=>{let Q=u[z].filter(re=>!(re in v));return Q.length>0&&(O[z]=Q),O},{})),u={};let T=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],A=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","coerce","deprecatedOptions"];return T.forEach(O=>{h[O]=(w[O]||[]).filter(z=>!v[z]);}),A.forEach(O=>{h[O]=Vr(w[O],z=>!v[z]);}),h.envPrefix=w.envPrefix,w=h,m=m?m.reset(v):wv(n,F,ce),D=D?D.reset(v):bv(n,m,F,ce),s=s?s.reset():mv(n,m,D,c,ce),o||(o=Fv(n,m,s,ce)),x=null,d="",$=null,j=!1,n.parsed=!1,n},n.resetOptions();let M=[];function P(){M.push({options:w,configObjects:w.configObjects.slice(0),exitProcess:ie,groups:u,strict:K,strictCommands:ye,strictOptions:de,completionCommand:x,output:d,exitError:$,hasOutput:j,parsed:n.parsed,parseFn:k,parseContext:G,handlerFinishCommand:y}),m.freeze(),D.freeze(),s.freeze();}function J(){let E=M.pop();rt(E,void 0,ce);let S;(({options:w,configObjects:S,exitProcess:ie,groups:u,output:d,exitError:$,hasOutput:j,parsed:n.parsed,strict:K,strictCommands:ye,strictOptions:de,completionCommand:x,parseFn:k,parseContext:G,handlerFinishCommand:y}=E)),w.configObjects=S,m.unfreeze(),D.unfreeze(),s.unfreeze();}n.boolean=function(E){return oe("",[E],arguments.length),X("boolean",E),n},n.array=function(E){return oe("",[E],arguments.length),X("array",E),n},n.number=function(E){return oe("",[E],arguments.length),X("number",E),n},n.normalize=function(E){return oe("",[E],arguments.length),X("normalize",E),n},n.count=function(E){return oe("",[E],arguments.length),X("count",E),n},n.string=function(E){return oe("",[E],arguments.length),X("string",E),n},n.requiresArg=function(E){return oe(" [number]",[E],arguments.length),typeof E=="string"&&w.narg[E]||ee(n.requiresArg,"narg",E,NaN),n},n.skipValidation=function(E){return oe("",[E],arguments.length),X("skipValidation",E),n};function X(E,S){S=[].concat(S),S.forEach(h=>{h=Y(h),w[E].push(h);});}n.nargs=function(E,S){return oe(" [number]",[E,S],arguments.length),ee(n.nargs,"narg",E,S),n},n.choices=function(E,S){return oe(" [string|array]",[E,S],arguments.length),Z(n.choices,"choices",E,S),n},n.alias=function(E,S){return oe(" [string|array]",[E,S],arguments.length),Z(n.alias,"alias",E,S),n},n.default=n.defaults=function(E,S,h){return oe(" [*] [string]",[E,S,h],arguments.length),h&&(ef(E,ce),w.defaultDescription[E]=h),typeof S=="function"&&(ef(E,ce),w.defaultDescription[E]||(w.defaultDescription[E]=m.functionDescription(S)),S=S.call()),ee(n.default,"default",E,S),n},n.describe=function(E,S){return oe(" [string]",[E,S],arguments.length),te(E,!0),m.describe(E,S),n};function te(E,S){return ee(te,"key",E,S),n}function L(E,S){return oe(" [string]",[E,S],arguments.length),ee(n.demandOption,"demandedOptions",E,S),n}n.demandOption=L,n.coerce=function(E,S){return oe(" [function]",[E,S],arguments.length),ee(n.coerce,"coerce",E,S),n};function ee(E,S,h,v){q(E,S,h,v,(T,A,O)=>{w[T][A]=O;});}function Z(E,S,h,v){q(E,S,h,v,(T,A,O)=>{w[T][A]=(w[T][A]||[]).concat(O);});}function q(E,S,h,v,T){if(Array.isArray(h))h.forEach(A=>{E(A,v);});else if((A=>typeof A=="object")(h))for(let A of zi(h))E(A,h[A]);else T(S,Y(h),v);}function Y(E){return E==="__proto__"?"___proto___":E}function V(E){zi(w).forEach(S=>{if((v=>v==="configObjects")(S))return;let h=w[S];Array.isArray(h)?~h.indexOf(E)&&h.splice(h.indexOf(E),1):typeof h=="object"&&delete h[E];}),delete m.getDescriptions()[E];}n.config=function(S="config",h,v){return oe("[object|string] [string|function] [function]",[S,h,v],arguments.length),typeof S=="object"&&!Array.isArray(S)?(S=Hi(S,t,n.getParserConfiguration()["deep-merge-config"]||!1,ce),w.configObjects=(w.configObjects||[]).concat(S),n):(typeof h=="function"&&(v=h,h=void 0),n.describe(S,h||m.deferY18nLookup("Path to JSON config file")),(Array.isArray(S)?S:[S]).forEach(T=>{w.config[T]=v||!0;}),n)},n.example=function(E,S){return oe(" [string]",[E,S],arguments.length),Array.isArray(E)?E.forEach(h=>n.example(...h)):m.example(E,S),n},n.command=function(E,S,h,v,T,A){return oe(" [string|boolean] [function|object] [function] [array] [boolean|string]",[E,S,h,v,T,A],arguments.length),s.addHandler(E,S,h,v,T,A),n},n.commandDir=function(E,S){oe(" [object]",[E,S],arguments.length);let h=r||ce.require;return s.addDirectory(E,n.getContext(),h,ce.getCallerFile(),S),n},n.demand=n.required=n.require=function(S,h,v){return Array.isArray(h)?(h.forEach(T=>{rt(v,!0,ce),L(T,v);}),h=1/0):typeof h!="number"&&(v=h,h=1/0),typeof S=="number"?(rt(v,!0,ce),n.demandCommand(S,h,v,v)):Array.isArray(S)?S.forEach(T=>{rt(v,!0,ce),L(T,v);}):typeof v=="string"?L(S,v):(v===!0||typeof v>"u")&&L(S),n},n.demandCommand=function(S=1,h,v,T){return oe("[number] [number|string] [string|null|undefined] [string|null|undefined]",[S,h,v,T],arguments.length),typeof h!="number"&&(v=h,h=1/0),n.global("_",!1),w.demandedCommands._={min:S,max:h,minMsg:v,maxMsg:T},n},n.getDemandedOptions=()=>(oe([],0),w.demandedOptions),n.getDemandedCommands=()=>(oe([],0),w.demandedCommands),n.deprecateOption=function(S,h){return oe(" [string|boolean]",[S,h],arguments.length),w.deprecatedOptions[S]=h,n},n.getDeprecatedOptions=()=>(oe([],0),w.deprecatedOptions),n.implies=function(E,S){return oe(" [number|string|array]",[E,S],arguments.length),D.implies(E,S),n},n.conflicts=function(E,S){return oe(" [string|array]",[E,S],arguments.length),D.conflicts(E,S),n},n.usage=function(E,S,h,v){if(oe(" [string|boolean] [function|object] [function]",[E,S,h,v],arguments.length),S!==void 0){if(rt(E,null,ce),(E||"").match(/^\$0( |$)/))return n.command(E,S,h,v);throw new nt(".usage() description must start with $0 if being used as alias for .command()")}else return m.usage(E),n},n.epilogue=n.epilog=function(E){return oe("",[E],arguments.length),m.epilog(E),n},n.fail=function(E){return oe("",[E],arguments.length),m.failFn(E),n},n.onFinishCommand=function(E){return oe("",[E],arguments.length),y=E,n},n.getHandlerFinishCommand=()=>y,n.check=function(E,S){return oe(" [boolean]",[E,S],arguments.length),D.check(E,S!==!1),n},n.global=function(E,S){return oe(" [boolean]",[E,S],arguments.length),E=[].concat(E),S!==!1?w.local=w.local.filter(h=>E.indexOf(h)===-1):E.forEach(h=>{w.local.indexOf(h)===-1&&w.local.push(h);}),n},n.pkgConf=function(S,h){oe(" [string]",[S,h],arguments.length);let v=null,T=W(h||t);return T[S]&&typeof T[S]=="object"&&(v=Hi(T[S],h||t,n.getParserConfiguration()["deep-merge-config"]||!1,ce),w.configObjects=(w.configObjects||[]).concat(v)),n};let I={};function W(E){let S=E||"*";if(I[S])return I[S];let h={};try{let v=E||ce.mainFilename;!E&&ce.path.extname(v)&&(v=ce.path.dirname(v));let T=ce.findUp(v,(A,O)=>{if(O.includes("package.json"))return "package.json"});rt(T,void 0,ce),h=JSON.parse(ce.readFileSync(T,"utf8"));}catch{}return I[S]=h||{},I[S]}let k=null,G=null;n.parse=function(S,h,v){if(oe("[string|array] [function|boolean|object] [function]",[S,h,v],arguments.length),P(),typeof S>"u"){let A=n._parseArgs(e),O=n.parsed;return J(),n.parsed=O,A}typeof h=="object"&&(G=h,h=v),typeof h=="function"&&(k=h,h=!1),h||(e=S),k&&(ie=!1);let T=n._parseArgs(S,!!h);return o.setParsed(n.parsed),k&&k($,T,d),J(),T},n._getParseContext=()=>G||{},n._hasParseCallback=()=>!!k,n.option=n.options=function(S,h){if(oe(" [object]",[S,h],arguments.length),typeof S=="object")Object.keys(S).forEach(v=>{n.options(v,S[v]);});else {typeof h!="object"&&(h={}),w.key[S]=!0,h.alias&&n.alias(S,h.alias);let v=h.deprecate||h.deprecated;v&&n.deprecateOption(S,v);let T=h.demand||h.required||h.require;T&&n.demand(S,T),h.demandOption&&n.demandOption(S,typeof h.demandOption=="string"?h.demandOption:void 0),h.conflicts&&n.conflicts(S,h.conflicts),"default"in h&&n.default(S,h.default),h.implies!==void 0&&n.implies(S,h.implies),h.nargs!==void 0&&n.nargs(S,h.nargs),h.config&&n.config(S,h.configParser),h.normalize&&n.normalize(S),h.choices&&n.choices(S,h.choices),h.coerce&&n.coerce(S,h.coerce),h.group&&n.group(S,h.group),(h.boolean||h.type==="boolean")&&(n.boolean(S),h.alias&&n.boolean(h.alias)),(h.array||h.type==="array")&&(n.array(S),h.alias&&n.array(h.alias)),(h.number||h.type==="number")&&(n.number(S),h.alias&&n.number(h.alias)),(h.string||h.type==="string")&&(n.string(S),h.alias&&n.string(h.alias)),(h.count||h.type==="count")&&n.count(S),typeof h.global=="boolean"&&n.global(S,h.global),h.defaultDescription&&(w.defaultDescription[S]=h.defaultDescription),h.skipValidation&&n.skipValidation(S);let A=h.describe||h.description||h.desc;n.describe(S,A),h.hidden&&n.hide(S),h.requiresArg&&n.requiresArg(S);}return n},n.getOptions=()=>w,n.positional=function(E,S){if(oe(" ",[E,S],arguments.length),_.resets===0)throw new nt(".positional() can only be called in a command's builder function");let h=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];S=Vr(S,(A,O)=>{let z=h.indexOf(A)!==-1;return A==="type"&&["string","number","boolean"].indexOf(O)===-1&&(z=!1),z});let v=_.fullCommands[_.fullCommands.length-1],T=v?s.cmdToParseOptions(v):{array:[],alias:{},default:{},demand:{}};return zi(T).forEach(A=>{let O=T[A];Array.isArray(O)?O.indexOf(E)!==-1&&(S[A]=!0):O[E]&&!(A in S)&&(S[A]=O[E]);}),n.group(E,m.getPositionalGroupName()),n.option(E,S)},n.group=function(S,h){oe(" ",[S,h],arguments.length);let v=g[h]||u[h];g[h]&&delete g[h];let T={};return u[h]=(v||[]).concat(S).filter(A=>T[A]?!1:T[A]=!0),n},n.getGroups=()=>Object.assign({},u,g),n.env=function(E){return oe("[string|boolean]",[E],arguments.length),E===!1?delete w.envPrefix:w.envPrefix=E||"",n},n.wrap=function(E){return oe("",[E],arguments.length),m.wrap(E),n};let K=!1;n.strict=function(E){return oe("[boolean]",[E],arguments.length),K=E!==!1,n},n.getStrict=()=>K;let ye=!1;n.strictCommands=function(E){return oe("[boolean]",[E],arguments.length),ye=E!==!1,n},n.getStrictCommands=()=>ye;let de=!1;n.strictOptions=function(E){return oe("[boolean]",[E],arguments.length),de=E!==!1,n},n.getStrictOptions=()=>de;let Ye={};n.parserConfiguration=function(S){return oe("",[S],arguments.length),Ye=S,n},n.getParserConfiguration=()=>Ye,n.showHelp=function(E){return oe("[string|function]",[E],arguments.length),n.parsed||n._parseArgs(e),s.hasDefaultCommand()&&(_.resets++,s.runDefaultBuilderOn(n)),m.showHelp(E),n};let R=null;n.version=function(S,h,v){let T="version";if(oe("[boolean|string] [string] [string]",[S,h,v],arguments.length),R&&(V(R),m.version(void 0),R=null),arguments.length===0)v=Ke(),S=T;else if(arguments.length===1){if(S===!1)return n;v=S,S=T;}else arguments.length===2&&(v=h,h=void 0);return R=typeof S=="string"?S:T,h=h||m.deferY18nLookup("Show version number"),m.version(v||void 0),n.boolean(R),n.describe(R,h),n};function Ke(){return W().version||"unknown"}let Ne=null;n.addHelpOpt=n.help=function(S,h){let v="help";return oe("[string|boolean] [string]",[S,h],arguments.length),Ne&&(V(Ne),Ne=null),arguments.length===1&&S===!1||(Ne=typeof S=="string"?S:v,n.boolean(Ne),n.describe(Ne,h||m.deferY18nLookup("Show help"))),n};let Ct="show-hidden";w.showHiddenOpt=Ct,n.addShowHiddenOpt=n.showHidden=function(S,h){if(oe("[string|boolean] [string]",[S,h],arguments.length),arguments.length===1&&S===!1)return n;let v=typeof S=="string"?S:Ct;return n.boolean(v),n.describe(v,h||m.deferY18nLookup("Show hidden options")),w.showHiddenOpt=v,n},n.hide=function(S){return oe("",[S],arguments.length),w.hiddenOptions.push(S),n},n.showHelpOnFail=function(S,h){return oe("[boolean|string] [string]",[S,h],arguments.length),m.showHelpOnFail(S,h),n};let ie=!0;n.exitProcess=function(E=!0){return oe("[boolean]",[E],arguments.length),ie=E,n},n.getExitProcess=()=>ie,n.showCompletionScript=function(E,S){return oe("[string] [string]",[E,S],arguments.length),E=E||n.$0,le.log(o.generateCompletionScript(E,S||x||"completion")),n},n.getCompletion=function(E,S){oe(" ",[E,S],arguments.length),o.getCompletion(E,S);},n.locale=function(E){return oe("[string]",[E],arguments.length),E?(we=!1,F.setLocale(E),n):(Ce(),F.getLocale())},n.updateStrings=n.updateLocale=function(E){return oe("",[E],arguments.length),we=!1,F.updateLocale(E),n};let we=!0;n.detectLocale=function(E){return oe("",[E],arguments.length),we=E,n},n.getDetectLocale=()=>we;let le={log(...E){n._hasParseCallback()||console.log(...E),j=!0,d.length&&(d+=` +`;C.forEach(j=>{_+=j;}),t.fail(_);}};let m={};u.conflicts=function(F,C){oe(" [array|string]",[F,C],arguments.length),typeof F=="object"?Object.keys(F).forEach(_=>{u.conflicts(_,F[_]);}):(e.global(F),m[F]||(m[F]=[]),Array.isArray(C)?C.forEach(_=>u.conflicts(F,_)):m[F].push(C));},u.getConflicting=()=>m,u.conflicting=function(F){Object.keys(F).forEach(C=>{m[C]&&m[C].forEach(_=>{_&&F[C]!==void 0&&F[_]!==void 0&&t.fail(s("Arguments %s and %s are mutually exclusive",C,_));});});},u.recommendCommands=function(F,C){C=C.sort((x,w)=>w.length-x.length);let j=null,$=1/0;for(let x=0,w;(w=C[x])!==void 0;x++){let M=Cv(F,w);M<=3&&M<$&&($=M,j=w);}j&&t.fail(s("Did you mean %s?",j));},u.reset=function(F){return d=Vr(d,C=>!F[C]),m=Vr(m,C=>!F[C]),c=c.filter(C=>C.global),u};let D=[];return u.freeze=function(){D.push({implied:d,checks:c,conflicting:m});},u.unfreeze=function(){let F=D.pop();rt(F,void 0,n),{implied:d,checks:c,conflicting:m}=F;},u}var ce;function bv(e){return ce=e,xv}function xv(e=[],t=ce.process.cwd(),r){let n={},s,o=null,u={},c=[],d="",g={},m,D,y=null,F=ce.y18n;n.middleware=uf(c,n),n.scriptName=function(E){return n.customScriptName=!0,n.$0=E,n};let C;/\b(node|iojs|electron)(\.exe)?$/.test(ce.process.argv()[0])?C=ce.process.argv().slice(1,2):C=ce.process.argv().slice(0,1),n.$0=C.map(E=>{let S=ff(t,E);return E.match(/^(\/|([a-zA-Z]:)?\\)/)&&S.length_;let j=!1,$=null;n.exit=(E,S)=>{j=!0,$=S,ie&&ce.process.exit(E);};let x=null;n.completion=function(E,S,h){return oe("[string] [string|boolean|function] [function]",[E,S,h],arguments.length),typeof S=="function"&&(h=S,S=void 0),x=E||x||"completion",!S&&S!==!1&&(S="generate completion script"),n.command(x,S),h&&o.registerFunction(h),n};let w;n.resetOptions=n.reset=function(S={}){_.resets++,w=w||{};let h={};h.local=w.local?w.local:[],h.configObjects=w.configObjects?w.configObjects:[];let v={};h.local.forEach(b=>{v[b]=!0,(S[b]||[]).forEach(z=>{v[z]=!0;});}),Object.assign(g,Object.keys(u).reduce((b,z)=>{let Q=u[z].filter(re=>!(re in v));return Q.length>0&&(b[z]=Q),b},{})),u={};let T=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],A=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","coerce","deprecatedOptions"];return T.forEach(b=>{h[b]=(w[b]||[]).filter(z=>!v[z]);}),A.forEach(b=>{h[b]=Vr(w[b],z=>!v[z]);}),h.envPrefix=w.envPrefix,w=h,m=m?m.reset(v):wv(n,F,ce),D=D?D.reset(v):Ov(n,m,F,ce),s=s?s.reset():mv(n,m,D,c,ce),o||(o=Fv(n,m,s,ce)),x=null,d="",$=null,j=!1,n.parsed=!1,n},n.resetOptions();let M=[];function P(){M.push({options:w,configObjects:w.configObjects.slice(0),exitProcess:ie,groups:u,strict:K,strictCommands:ye,strictOptions:de,completionCommand:x,output:d,exitError:$,hasOutput:j,parsed:n.parsed,parseFn:k,parseContext:G,handlerFinishCommand:y}),m.freeze(),D.freeze(),s.freeze();}function J(){let E=M.pop();rt(E,void 0,ce);let S;(({options:w,configObjects:S,exitProcess:ie,groups:u,output:d,exitError:$,hasOutput:j,parsed:n.parsed,strict:K,strictCommands:ye,strictOptions:de,completionCommand:x,parseFn:k,parseContext:G,handlerFinishCommand:y}=E)),w.configObjects=S,m.unfreeze(),D.unfreeze(),s.unfreeze();}n.boolean=function(E){return oe("",[E],arguments.length),X("boolean",E),n},n.array=function(E){return oe("",[E],arguments.length),X("array",E),n},n.number=function(E){return oe("",[E],arguments.length),X("number",E),n},n.normalize=function(E){return oe("",[E],arguments.length),X("normalize",E),n},n.count=function(E){return oe("",[E],arguments.length),X("count",E),n},n.string=function(E){return oe("",[E],arguments.length),X("string",E),n},n.requiresArg=function(E){return oe(" [number]",[E],arguments.length),typeof E=="string"&&w.narg[E]||ee(n.requiresArg,"narg",E,NaN),n},n.skipValidation=function(E){return oe("",[E],arguments.length),X("skipValidation",E),n};function X(E,S){S=[].concat(S),S.forEach(h=>{h=Y(h),w[E].push(h);});}n.nargs=function(E,S){return oe(" [number]",[E,S],arguments.length),ee(n.nargs,"narg",E,S),n},n.choices=function(E,S){return oe(" [string|array]",[E,S],arguments.length),Z(n.choices,"choices",E,S),n},n.alias=function(E,S){return oe(" [string|array]",[E,S],arguments.length),Z(n.alias,"alias",E,S),n},n.default=n.defaults=function(E,S,h){return oe(" [*] [string]",[E,S,h],arguments.length),h&&(ef(E,ce),w.defaultDescription[E]=h),typeof S=="function"&&(ef(E,ce),w.defaultDescription[E]||(w.defaultDescription[E]=m.functionDescription(S)),S=S.call()),ee(n.default,"default",E,S),n},n.describe=function(E,S){return oe(" [string]",[E,S],arguments.length),te(E,!0),m.describe(E,S),n};function te(E,S){return ee(te,"key",E,S),n}function L(E,S){return oe(" [string]",[E,S],arguments.length),ee(n.demandOption,"demandedOptions",E,S),n}n.demandOption=L,n.coerce=function(E,S){return oe(" [function]",[E,S],arguments.length),ee(n.coerce,"coerce",E,S),n};function ee(E,S,h,v){q(E,S,h,v,(T,A,b)=>{w[T][A]=b;});}function Z(E,S,h,v){q(E,S,h,v,(T,A,b)=>{w[T][A]=(w[T][A]||[]).concat(b);});}function q(E,S,h,v,T){if(Array.isArray(h))h.forEach(A=>{E(A,v);});else if((A=>typeof A=="object")(h))for(let A of zi(h))E(A,h[A]);else T(S,Y(h),v);}function Y(E){return E==="__proto__"?"___proto___":E}function V(E){zi(w).forEach(S=>{if((v=>v==="configObjects")(S))return;let h=w[S];Array.isArray(h)?~h.indexOf(E)&&h.splice(h.indexOf(E),1):typeof h=="object"&&delete h[E];}),delete m.getDescriptions()[E];}n.config=function(S="config",h,v){return oe("[object|string] [string|function] [function]",[S,h,v],arguments.length),typeof S=="object"&&!Array.isArray(S)?(S=Hi(S,t,n.getParserConfiguration()["deep-merge-config"]||!1,ce),w.configObjects=(w.configObjects||[]).concat(S),n):(typeof h=="function"&&(v=h,h=void 0),n.describe(S,h||m.deferY18nLookup("Path to JSON config file")),(Array.isArray(S)?S:[S]).forEach(T=>{w.config[T]=v||!0;}),n)},n.example=function(E,S){return oe(" [string]",[E,S],arguments.length),Array.isArray(E)?E.forEach(h=>n.example(...h)):m.example(E,S),n},n.command=function(E,S,h,v,T,A){return oe(" [string|boolean] [function|object] [function] [array] [boolean|string]",[E,S,h,v,T,A],arguments.length),s.addHandler(E,S,h,v,T,A),n},n.commandDir=function(E,S){oe(" [object]",[E,S],arguments.length);let h=r||ce.require;return s.addDirectory(E,n.getContext(),h,ce.getCallerFile(),S),n},n.demand=n.required=n.require=function(S,h,v){return Array.isArray(h)?(h.forEach(T=>{rt(v,!0,ce),L(T,v);}),h=1/0):typeof h!="number"&&(v=h,h=1/0),typeof S=="number"?(rt(v,!0,ce),n.demandCommand(S,h,v,v)):Array.isArray(S)?S.forEach(T=>{rt(v,!0,ce),L(T,v);}):typeof v=="string"?L(S,v):(v===!0||typeof v>"u")&&L(S),n},n.demandCommand=function(S=1,h,v,T){return oe("[number] [number|string] [string|null|undefined] [string|null|undefined]",[S,h,v,T],arguments.length),typeof h!="number"&&(v=h,h=1/0),n.global("_",!1),w.demandedCommands._={min:S,max:h,minMsg:v,maxMsg:T},n},n.getDemandedOptions=()=>(oe([],0),w.demandedOptions),n.getDemandedCommands=()=>(oe([],0),w.demandedCommands),n.deprecateOption=function(S,h){return oe(" [string|boolean]",[S,h],arguments.length),w.deprecatedOptions[S]=h,n},n.getDeprecatedOptions=()=>(oe([],0),w.deprecatedOptions),n.implies=function(E,S){return oe(" [number|string|array]",[E,S],arguments.length),D.implies(E,S),n},n.conflicts=function(E,S){return oe(" [string|array]",[E,S],arguments.length),D.conflicts(E,S),n},n.usage=function(E,S,h,v){if(oe(" [string|boolean] [function|object] [function]",[E,S,h,v],arguments.length),S!==void 0){if(rt(E,null,ce),(E||"").match(/^\$0( |$)/))return n.command(E,S,h,v);throw new nt(".usage() description must start with $0 if being used as alias for .command()")}else return m.usage(E),n},n.epilogue=n.epilog=function(E){return oe("",[E],arguments.length),m.epilog(E),n},n.fail=function(E){return oe("",[E],arguments.length),m.failFn(E),n},n.onFinishCommand=function(E){return oe("",[E],arguments.length),y=E,n},n.getHandlerFinishCommand=()=>y,n.check=function(E,S){return oe(" [boolean]",[E,S],arguments.length),D.check(E,S!==!1),n},n.global=function(E,S){return oe(" [boolean]",[E,S],arguments.length),E=[].concat(E),S!==!1?w.local=w.local.filter(h=>E.indexOf(h)===-1):E.forEach(h=>{w.local.indexOf(h)===-1&&w.local.push(h);}),n},n.pkgConf=function(S,h){oe(" [string]",[S,h],arguments.length);let v=null,T=W(h||t);return T[S]&&typeof T[S]=="object"&&(v=Hi(T[S],h||t,n.getParserConfiguration()["deep-merge-config"]||!1,ce),w.configObjects=(w.configObjects||[]).concat(v)),n};let I={};function W(E){let S=E||"*";if(I[S])return I[S];let h={};try{let v=E||ce.mainFilename;!E&&ce.path.extname(v)&&(v=ce.path.dirname(v));let T=ce.findUp(v,(A,b)=>{if(b.includes("package.json"))return "package.json"});rt(T,void 0,ce),h=JSON.parse(ce.readFileSync(T,"utf8"));}catch{}return I[S]=h||{},I[S]}let k=null,G=null;n.parse=function(S,h,v){if(oe("[string|array] [function|boolean|object] [function]",[S,h,v],arguments.length),P(),typeof S>"u"){let A=n._parseArgs(e),b=n.parsed;return J(),n.parsed=b,A}typeof h=="object"&&(G=h,h=v),typeof h=="function"&&(k=h,h=!1),h||(e=S),k&&(ie=!1);let T=n._parseArgs(S,!!h);return o.setParsed(n.parsed),k&&k($,T,d),J(),T},n._getParseContext=()=>G||{},n._hasParseCallback=()=>!!k,n.option=n.options=function(S,h){if(oe(" [object]",[S,h],arguments.length),typeof S=="object")Object.keys(S).forEach(v=>{n.options(v,S[v]);});else {typeof h!="object"&&(h={}),w.key[S]=!0,h.alias&&n.alias(S,h.alias);let v=h.deprecate||h.deprecated;v&&n.deprecateOption(S,v);let T=h.demand||h.required||h.require;T&&n.demand(S,T),h.demandOption&&n.demandOption(S,typeof h.demandOption=="string"?h.demandOption:void 0),h.conflicts&&n.conflicts(S,h.conflicts),"default"in h&&n.default(S,h.default),h.implies!==void 0&&n.implies(S,h.implies),h.nargs!==void 0&&n.nargs(S,h.nargs),h.config&&n.config(S,h.configParser),h.normalize&&n.normalize(S),h.choices&&n.choices(S,h.choices),h.coerce&&n.coerce(S,h.coerce),h.group&&n.group(S,h.group),(h.boolean||h.type==="boolean")&&(n.boolean(S),h.alias&&n.boolean(h.alias)),(h.array||h.type==="array")&&(n.array(S),h.alias&&n.array(h.alias)),(h.number||h.type==="number")&&(n.number(S),h.alias&&n.number(h.alias)),(h.string||h.type==="string")&&(n.string(S),h.alias&&n.string(h.alias)),(h.count||h.type==="count")&&n.count(S),typeof h.global=="boolean"&&n.global(S,h.global),h.defaultDescription&&(w.defaultDescription[S]=h.defaultDescription),h.skipValidation&&n.skipValidation(S);let A=h.describe||h.description||h.desc;n.describe(S,A),h.hidden&&n.hide(S),h.requiresArg&&n.requiresArg(S);}return n},n.getOptions=()=>w,n.positional=function(E,S){if(oe(" ",[E,S],arguments.length),_.resets===0)throw new nt(".positional() can only be called in a command's builder function");let h=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];S=Vr(S,(A,b)=>{let z=h.indexOf(A)!==-1;return A==="type"&&["string","number","boolean"].indexOf(b)===-1&&(z=!1),z});let v=_.fullCommands[_.fullCommands.length-1],T=v?s.cmdToParseOptions(v):{array:[],alias:{},default:{},demand:{}};return zi(T).forEach(A=>{let b=T[A];Array.isArray(b)?b.indexOf(E)!==-1&&(S[A]=!0):b[E]&&!(A in S)&&(S[A]=b[E]);}),n.group(E,m.getPositionalGroupName()),n.option(E,S)},n.group=function(S,h){oe(" ",[S,h],arguments.length);let v=g[h]||u[h];g[h]&&delete g[h];let T={};return u[h]=(v||[]).concat(S).filter(A=>T[A]?!1:T[A]=!0),n},n.getGroups=()=>Object.assign({},u,g),n.env=function(E){return oe("[string|boolean]",[E],arguments.length),E===!1?delete w.envPrefix:w.envPrefix=E||"",n},n.wrap=function(E){return oe("",[E],arguments.length),m.wrap(E),n};let K=!1;n.strict=function(E){return oe("[boolean]",[E],arguments.length),K=E!==!1,n},n.getStrict=()=>K;let ye=!1;n.strictCommands=function(E){return oe("[boolean]",[E],arguments.length),ye=E!==!1,n},n.getStrictCommands=()=>ye;let de=!1;n.strictOptions=function(E){return oe("[boolean]",[E],arguments.length),de=E!==!1,n},n.getStrictOptions=()=>de;let Ye={};n.parserConfiguration=function(S){return oe("",[S],arguments.length),Ye=S,n},n.getParserConfiguration=()=>Ye,n.showHelp=function(E){return oe("[string|function]",[E],arguments.length),n.parsed||n._parseArgs(e),s.hasDefaultCommand()&&(_.resets++,s.runDefaultBuilderOn(n)),m.showHelp(E),n};let R=null;n.version=function(S,h,v){let T="version";if(oe("[boolean|string] [string] [string]",[S,h,v],arguments.length),R&&(V(R),m.version(void 0),R=null),arguments.length===0)v=Ke(),S=T;else if(arguments.length===1){if(S===!1)return n;v=S,S=T;}else arguments.length===2&&(v=h,h=void 0);return R=typeof S=="string"?S:T,h=h||m.deferY18nLookup("Show version number"),m.version(v||void 0),n.boolean(R),n.describe(R,h),n};function Ke(){return W().version||"unknown"}let Ne=null;n.addHelpOpt=n.help=function(S,h){let v="help";return oe("[string|boolean] [string]",[S,h],arguments.length),Ne&&(V(Ne),Ne=null),arguments.length===1&&S===!1||(Ne=typeof S=="string"?S:v,n.boolean(Ne),n.describe(Ne,h||m.deferY18nLookup("Show help"))),n};let Ct="show-hidden";w.showHiddenOpt=Ct,n.addShowHiddenOpt=n.showHidden=function(S,h){if(oe("[string|boolean] [string]",[S,h],arguments.length),arguments.length===1&&S===!1)return n;let v=typeof S=="string"?S:Ct;return n.boolean(v),n.describe(v,h||m.deferY18nLookup("Show hidden options")),w.showHiddenOpt=v,n},n.hide=function(S){return oe("",[S],arguments.length),w.hiddenOptions.push(S),n},n.showHelpOnFail=function(S,h){return oe("[boolean|string] [string]",[S,h],arguments.length),m.showHelpOnFail(S,h),n};let ie=!0;n.exitProcess=function(E=!0){return oe("[boolean]",[E],arguments.length),ie=E,n},n.getExitProcess=()=>ie,n.showCompletionScript=function(E,S){return oe("[string] [string]",[E,S],arguments.length),E=E||n.$0,le.log(o.generateCompletionScript(E,S||x||"completion")),n},n.getCompletion=function(E,S){oe(" ",[E,S],arguments.length),o.getCompletion(E,S);},n.locale=function(E){return oe("[string]",[E],arguments.length),E?(we=!1,F.setLocale(E),n):(Ce(),F.getLocale())},n.updateStrings=n.updateLocale=function(E){return oe("",[E],arguments.length),we=!1,F.updateLocale(E),n};let we=!0;n.detectLocale=function(E){return oe("",[E],arguments.length),we=E,n},n.getDetectLocale=()=>we;let le={log(...E){n._hasParseCallback()||console.log(...E),j=!0,d.length&&(d+=` `),d+=E.join(" ");},error(...E){n._hasParseCallback()||console.error(...E),j=!0,d.length&&(d+=` -`),d+=E.join(" ");}};n._getLoggerInstance=()=>le,n._hasOutput=()=>j,n._setHasOutput=()=>{j=!0;};let ve;n.recommendCommands=function(E=!0){return oe("[boolean]",[E],arguments.length),ve=E,n},n.getUsageInstance=()=>m,n.getValidationInstance=()=>D,n.getCommandInstance=()=>s,n.terminalWidth=()=>(oe([],0),ce.process.stdColumns),Object.defineProperty(n,"argv",{get:()=>n._parseArgs(e),enumerable:!0}),n._parseArgs=function(S,h,v,T){let A=!!v;S=S||e,w.__=F.__,w.configuration=n.getParserConfiguration();let O=!!w.configuration["populate--"],z=Object.assign({},w.configuration,{"populate--":!0}),Q=ce.Parser.detailed(S,Object.assign({},w,{configuration:Object.assign({"parse-positional-numbers":!1},z)})),re=Q.argv;G&&(re=Object.assign({},re,G));let Ae=Q.aliases;re.$0=n.$0,n.parsed=Q;try{if(Ce(),h)return n._postProcess(re,O,v);Ne&&~[Ne].concat(Ae[Ne]||[]).filter(pe=>pe.length>1).indexOf(""+re._[re._.length-1])&&(re._.pop(),re[Ne]=!0);let Fe=s.getCommands(),Pe=o.completionKey in re,cn=re[Ne]||Pe,Cr=cn&&(Fe.length>1||Fe[0]!=="$0");if(re._.length){if(Fe.length){let Te;for(let pe=T||0,Dt;re._[pe]!==void 0;pe++)if(Dt=String(re._[pe]),~Fe.indexOf(Dt)&&Dt!==x){let ei=s.runCommand(Dt,n,Q,pe+1);return n._postProcess(ei,O)}else if(!Te&&Dt!==x){Te=Dt;break}if(s.hasDefaultCommand()&&!Cr){let pe=s.runCommand(null,n,Q);return n._postProcess(pe,O)}ve&&Te&&!cn&&D.recommendCommands(Te,Fe);}x&&~re._.indexOf(x)&&!Pe&&(ie&&Mn(!0),n.showCompletionScript(),n.exit(0));}else if(s.hasDefaultCommand()&&!Cr){let Te=s.runCommand(null,n,Q);return n._postProcess(Te,O)}if(Pe){ie&&Mn(!0),S=[].concat(S);let Te=S.slice(S.indexOf(`--${o.completionKey}`)+1);return o.getCompletion(Te,pe=>{(pe||[]).forEach(Dt=>{le.log(Dt);}),n.exit(0);}),n._postProcess(re,!O,v)}if(j||Object.keys(re).forEach(Te=>{Te===Ne&&re[Te]?(ie&&Mn(!0),A=!0,n.showHelp("log"),n.exit(0)):Te===R&&re[Te]&&(ie&&Mn(!0),A=!0,m.showVersion(),n.exit(0));}),!A&&w.skipValidation.length>0&&(A=Object.keys(re).some(Te=>w.skipValidation.indexOf(Te)>=0&&re[Te]===!0)),!A){if(Q.error)throw new nt(Q.error.message);Pe||n._runValidation(re,Ae,{},Q.error);}}catch(Fe){if(Fe instanceof nt)m.fail(Fe.message,Fe);else throw Fe}return n._postProcess(re,O,v)},n._postProcess=function(E,S,h=!1){return Ut(E)||h||(S||(E=n._copyDoubleDash(E)),(n.getParserConfiguration()["parse-positional-numbers"]||n.getParserConfiguration()["parse-positional-numbers"]===void 0)&&(E=n._parsePositionalNumbers(E))),E},n._copyDoubleDash=function(E){if(!E._||!E["--"])return E;E._.push.apply(E._,E["--"]);try{delete E["--"];}catch{}return E},n._parsePositionalNumbers=function(E){let S=E["--"]?E["--"]:E._;for(let h=0,v;(v=S[h])!==void 0;h++)ce.Parser.looksLikeNumber(v)&&Number.isSafeInteger(Math.floor(parseFloat(`${v}`)))&&(S[h]=Number(v));return E},n._runValidation=function(S,h,v,T,A=!1){if(T)throw new nt(T.message);D.nonOptionCount(S),D.requiredArguments(S);let O=!1;ye&&(O=D.unknownCommands(S)),K&&!O?D.unknownArguments(S,h,v,A):de&&D.unknownArguments(S,h,{},!1,!1),D.customChecks(S,h),D.limitedChoices(S),D.implications(S),D.conflicting(S);};function Ce(){if(!we)return;let E=ce.getEnv("LC_ALL")||ce.getEnv("LC_MESSAGES")||ce.getEnv("LANG")||ce.getEnv("LANGUAGE")||"en_US";n.locale(E.replace(/[.:].*/,""));}return n.help(),n.version(),n}var ff=(e,t)=>ce.path.relative(e,t);function Av(e){return !!e&&typeof e._parseArgs=="function"}var Ko,Qo,{readFileSync:Mv}=U("fs"),{inspect:Tv}=U("util"),{resolve:jv}=U("path"),Iv=rl(),Nv=Ro(),df={assert:{notStrictEqual:Kl.notStrictEqual,strictEqual:Kl.strictEqual},cliui:Bl(),findUp:Ul(),getEnv:e=>process.env[e],getCallerFile:Hl(),getProcessArgvBin:lf,inspect:Tv,mainFilename:(Qo=(Ko=U?.main)===null||Ko===void 0?void 0:Ko.filename)!==null&&Qo!==void 0?Qo:process.cwd(),Parser:Nv,path:U("path"),process:{argv:()=>process.argv,cwd:process.cwd,execPath:()=>process.execPath,exit:e=>{process.exit(e);},nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:Mv,require:U,requireDirectory:Zl(),stringWidth:Pi(),y18n:Iv({directory:jv(__dirname,"../locales"),updateFiles:!1})},of=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):10;if(process&&process.version&&Number(process.version.match(/v([^.]+)/)[1]){var{Yargs:Pv,processArgv:Rv}=pf();Gr(Rv.hideBin(process.argv));mf.exports=Gr;function Gr(e,t){let r=Pv(e,t,U);return Bv(r),r}function Bv(e){Object.keys(e).forEach(t=>{t==="argv"?Gr.__defineGetter__(t,e.__lookupGetter__(t)):typeof e[t]=="function"?Gr[t]=e[t].bind(e):(Gr.__defineGetter__("$0",()=>e.$0),Gr.__defineGetter__("parsed",()=>e.parsed));});}});var yf=B(Df=>{var qv=U("util"),Vi=Br(),gf=hr().Memory,na=Df.Argv=function(e,t){gf.call(this,e),e=e||{},this.type="argv",this.readOnly=!0,this.options=e,this.usage=t,typeof e.parseValues=="boolean"?(this.parseValues=e.parseValues,delete e.parseValues):this.parseValues=!1,typeof e.transform=="function"?(this.transform=e.transform,delete e.transform):this.transform=!1,typeof e.separator=="string"||e.separator instanceof RegExp?(this.separator=e.separator,delete e.separator):this.separator="";};qv.inherits(na,gf);na.prototype.loadSync=function(){return this.loadArgv(),this.store};na.prototype.loadArgv=function(){var e=this,t,r;if(t=Yv(this.options)?this.options:typeof this.options=="object"?ra()(process.argv.slice(2)).options(this.options):ra()(process.argv.slice(2)),typeof this.usage=="string"&&t.usage(this.usage),r=t.argv,!!r)return this.transform&&(r=Vi.transform(r,this.transform)),this.readOnly=!1,Object.keys(r).forEach(function(n){var s=r[n];typeof s<"u"&&(e.parseValues&&(s=Vi.parseValues(s)),e.separator?e.set(Vi.key.apply(Vi,n.split(e.separator)),s):e.set(n,s));}),this.showHelp=t.showHelp,this.help=t.help,this.readOnly=!0,this.store};function Yv(e){return (typeof e=="function"||typeof e=="object")&&"argv"in e}});var Ef=B(vf=>{var Wv=U("util"),Gi=Br(),wf=hr().Memory,ia=vf.Env=function(e){wf.call(this,e),e=e||{},this.type="env",this.readOnly=!0,this.whitelist=e.whitelist||[],this.separator=e.separator||"",this.lowerCase=e.lowerCase||!1,this.parseValues=e.parseValues||!1,this.transform=e.transform||!1,{}.toString.call(e.match)==="[object RegExp]"&&typeof e!="string"&&(this.match=e.match),e instanceof Array&&(this.whitelist=e),(typeof e=="string"||e instanceof RegExp)&&(this.separator=e);};Wv.inherits(ia,wf);ia.prototype.loadSync=function(){return this.loadEnv(),this.store};ia.prototype.loadEnv=function(){var e=this,t=process.env;return this.lowerCase&&(t={},Object.keys(process.env).forEach(function(r){t[r.toLowerCase()]=process.env[r];})),this.transform&&(t=Gi.transform(t,this.transform)),this.readOnly=!1,Object.keys(t).filter(function(r){return e.match&&e.whitelist.length?r.match(e.match)||e.whitelist.indexOf(r)!==-1:e.match?r.match(e.match):!e.whitelist.length||e.whitelist.indexOf(r)!==-1}).forEach(function(r){var n=t[r];e.parseValues&&(n=Gi.parseValues(n)),e.separator?e.set(Gi.key.apply(Gi,r.split(e.separator)),n):e.set(r,n);}),this.readOnly=!0,this.store};});var Sf=B((fC,Ff)=>{var Uv=U("crypto"),zv={stringify:function(e,t,r){return JSON.stringify(e,t||null,r||2)},parse:JSON.parse};Ff.exports=sa;function sa(e){if(e=e||{},this.secret=typeof e!="string"?e.secret:e,this.format=e.format||zv,this.alg=e.alg||"aes-256-ctr",!this.secret)throw new Error("Secret is a required option")}sa.prototype.encrypt=function(t,r){var n=this;return Object.keys(t).reduce(function(s,o){var u=n.format.stringify(t[o]);return s[o]={alg:n.alg,value:_f(u,{alg:n.alg,secret:n.secret,encs:{input:"utf8",output:"hex"}})},s},{})};sa.prototype.decrypt=function(t,r){var n=this;return Object.keys(t).reduce(function(s,o){var u=_f(t[o].value,{alg:t[o].alg||n.alg,secret:n.secret,encs:{input:"hex",output:"utf8"}});return s[o]=n.format.parse(u),s},{})};function _f(e,t){var r=t.encs,n=Uv.createCipher(t.alg,t.secret);return n.update(e,r.input,r.output)+n.final(r.output)}});var Of=B(bf=>{var Je=U("fs"),Tn=U("path"),Hv=U("util"),Vv=Sf(),Gv=Li(),Cf=hr().Memory,Jv=Je.exists||Tn.exists,Zv=Je.existsSync||Tn.existsSync,zt=bf.File=function(e){if(!e||!e.file)throw new Error("Missing required option `file`");if(Cf.call(this,e),this.type="file",this.file=e.file,this.dir=e.dir||process.cwd(),this.format=e.format||Gv.json,this.secure=e.secure,this.spacing=e.json_spacing||e.spacing||2,this.secure){if(this.secure=Buffer.isBuffer(this.secure)||typeof this.secure=="string"?{secret:this.secure.toString()}:this.secure,this.secure.alg=this.secure.alg||"aes-256-ctr",this.secure.secretPath&&(this.secure.secret=Je.readFileSync(this.secure.secretPath,"utf8")),!this.secure.secret)throw new Error("secure.secret option is required");this.keys=new Vv({secret:this.secure.secret,alg:this.secure.alg,format:this.format});}e.search&&this.search(this.dir);};Hv.inherits(zt,Cf);zt.prototype.save=function(e,t){this.saveToFile(this.file,e,t);};zt.prototype.saveToFile=function(e,t,r){r||(r=t,t=this.format),Je.writeFile(e,this.stringify(t),r);};zt.prototype.saveSync=function(){return Je.writeFileSync(this.file,this.stringify()),this.store};zt.prototype.load=function(e){var t=this;Jv(t.file,function(r){if(!r)return e(null,{});Je.readFile(t.file,function(n,s){if(n)return e(n);try{var o=s.toString();o.charAt(0)==="\uFEFF"&&(o=o.substr(1)),t.store=t.parse(o);}catch(u){return e(new Error("Error parsing your configuration file: ["+t.file+"]: "+u.message))}e(null,t.store);});});};zt.prototype.loadSync=function(){if(!Zv(this.file))return this.store={},this.store;try{var e=Je.readFileSync(this.file,"utf8");e.charAt(0)==="\uFEFF"&&(e=e.substr(1)),this.store=this.parse(e);}catch(t){throw new Error("Error parsing your configuration file: ["+this.file+"]: "+t.message)}return this.store};zt.prototype.stringify=function(e){var t=this.store;return e||(e=this.format),this.secure&&(t=this.keys.encrypt(t)),e.stringify(t,null,this.spacing)};zt.prototype.parse=function(e){var t=this.format.parse(e);return this.secure?this.keys.decrypt(t):t};zt.prototype.search=function(e){var t=!0,r,n,s;if(e=e||process.cwd(),this.file[0]==="/")try{s=Je.statSync(Je.realpathSync(this.file)),s.isFile()&&(r=this.file,t=!1);}catch{}if(t&&e)try{var o=Je.statSync(Je.realpathSync(e));t=o.isDirectory();}catch{return !1}for(;t;)try{s=Je.statSync(Je.realpathSync(r=Tn.join(e,this.file))),t=s.isDirectory();}catch{if(n=e,e=Tn.dirname(e),n===e){try{s=Je.statSync(Je.realpathSync(r=Tn.join(this.dir,this.file))),s.isDirectory()&&(r=void 0);}catch{}t=!1;}}return this.file=r||this.file,r};});var Tf=B(Mf=>{var Kv=U("util"),xf=hr().Memory,Af=Mf.Literal=function(t){xf.call(this,t),t=t||{},this.type="literal",this.readOnly=!0,this.store=t.store||t;};Kv.inherits(Af,xf);Af.prototype.loadSync=function(){return this.store};});var $i=B((pC,If)=>{var Ji=Br(),jf=Xc().Provider,ct=If.exports=new jf;ct.version=el().version;ct.__defineGetter__("Argv",function(){return yf().Argv});ct.__defineGetter__("Env",function(){return Ef().Env});ct.__defineGetter__("File",function(){return Of().File});ct.__defineGetter__("Literal",function(){return Tf().Literal});ct.__defineGetter__("Memory",function(){return hr().Memory});ct.key=Ji.key;ct.path=Ji.path;ct.loadFiles=Ji.loadFiles;ct.loadFilesSync=Ji.loadFilesSync;ct.formats=Li();ct.Provider=jf;});var kf=B((vC,$f)=>{var Zr=1e3,Kr=Zr*60,Qr=Kr*60,pr=Qr*24,nE=pr*7,iE=pr*365.25;$f.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return sE(e);if(r==="number"&&isFinite(e))return t.long?aE(e):oE(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function sE(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*iE;case"weeks":case"week":case"w":return r*nE;case"days":case"day":case"d":return r*pr;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Qr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Kr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Zr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function oE(e){var t=Math.abs(e);return t>=pr?Math.round(e/pr)+"d":t>=Qr?Math.round(e/Qr)+"h":t>=Kr?Math.round(e/Kr)+"m":t>=Zr?Math.round(e/Zr)+"s":e+"ms"}function aE(e){var t=Math.abs(e);return t>=pr?Zi(e,t,pr,"day"):t>=Qr?Zi(e,t,Qr,"hour"):t>=Kr?Zi(e,t,Kr,"minute"):t>=Zr?Zi(e,t,Zr,"second"):e+" ms"}function Zi(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var aa=B((EC,Pf)=>{function uE(e){r.debug=r,r.default=r,r.coerce=d,r.disable=o,r.enable=s,r.enabled=u,r.humanize=kf(),r.destroy=g,Object.keys(e).forEach(m=>{r[m]=e[m];}),r.names=[],r.skips=[],r.formatters={};function t(m){let D=0;for(let y=0;y{if(J==="%%")return "%";M++;let te=r.formatters[X];if(typeof te=="function"){let L=j[M];J=te.call($,L),j.splice(M,1),M--;}return J}),r.formatArgs.call($,j),($.log||r.log).apply($,j);}return _.namespace=m,_.useColors=r.useColors(),_.color=r.selectColor(m),_.extend=n,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(F!==r.namespaces&&(F=r.namespaces,C=r.enabled(m)),C),set:j=>{y=j;}}),typeof r.init=="function"&&r.init(_),_}function n(m,D){let y=r(this.namespace+(typeof D>"u"?":":D)+m);return y.log=this.log,y}function s(m){r.save(m),r.namespaces=m,r.names=[],r.skips=[];let D,y=(typeof m=="string"?m:"").split(/[\s,]+/),F=y.length;for(D=0;D"-"+D)].join(",");return r.enable(""),m}function u(m){if(m[m.length-1]==="*")return !0;let D,y;for(D=0,y=r.skips.length;D{it.formatArgs=lE;it.save=fE;it.load=dE;it.useColors=cE;it.storage=hE();it.destroy=(()=>{let e=!1;return ()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})();it.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function cE(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function lE(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Ki.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r));}),e.splice(n,0,t);}it.log=console.debug||console.log||(()=>{});function fE(e){try{e?it.storage.setItem("debug",e):it.storage.removeItem("debug");}catch{}}function dE(){let e;try{e=it.storage.getItem("debug");}catch{}return !e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function hE(){try{return localStorage}catch{}}Ki.exports=aa()(it);var{formatters:pE}=Ki.exports;pE.j=function(e){try{return JSON.stringify(e)}catch(t){return "[UnexpectedJSONParseError]: "+t.message}};});var qf=B((_C,Bf)=>{Bf.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n{var mE=U("os"),Yf=U("tty"),lt=qf(),{env:Be}=process,rr;lt("no-color")||lt("no-colors")||lt("color=false")||lt("color=never")?rr=0:(lt("color")||lt("colors")||lt("color=true")||lt("color=always"))&&(rr=1);"FORCE_COLOR"in Be&&(Be.FORCE_COLOR==="true"?rr=1:Be.FORCE_COLOR==="false"?rr=0:rr=Be.FORCE_COLOR.length===0?1:Math.min(parseInt(Be.FORCE_COLOR,10),3));function ua(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ca(e,t){if(rr===0)return 0;if(lt("color=16m")||lt("color=full")||lt("color=truecolor"))return 3;if(lt("color=256"))return 2;if(e&&!t&&rr===void 0)return 0;let r=rr||0;if(Be.TERM==="dumb")return r;if(process.platform==="win32"){let n=mE.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Be)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Be)||Be.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Be)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Be.TEAMCITY_VERSION)?1:0;if(Be.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Be){let n=parseInt((Be.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Be.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return /-256(color)?$/i.test(Be.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Be.TERM)||"COLORTERM"in Be?1:r}function gE(e){let t=ca(e,e&&e.isTTY);return ua(t)}Wf.exports={supportsColor:gE,stdout:ua(ca(!0,Yf.isatty(1))),stderr:ua(ca(!0,Yf.isatty(2)))};});var Hf=B((We,Xi)=>{var DE=U("tty"),Qi=U("util");We.init=SE;We.log=EE;We.formatArgs=wE;We.save=_E;We.load=FE;We.useColors=yE;We.destroy=Qi.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");We.colors=[6,2,3,4,5,1];try{let e=Uf();e&&(e.stderr||e).level>=2&&(We.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]);}catch{}We.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[t];return /^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function yE(){return "colors"in We.inspectOpts?!!We.inspectOpts.colors:DE.isatty(process.stderr.fd)}function wE(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${t} \x1B[0m`;e[0]=o+e[0].split(` +`),d+=E.join(" ");}};n._getLoggerInstance=()=>le,n._hasOutput=()=>j,n._setHasOutput=()=>{j=!0;};let ve;n.recommendCommands=function(E=!0){return oe("[boolean]",[E],arguments.length),ve=E,n},n.getUsageInstance=()=>m,n.getValidationInstance=()=>D,n.getCommandInstance=()=>s,n.terminalWidth=()=>(oe([],0),ce.process.stdColumns),Object.defineProperty(n,"argv",{get:()=>n._parseArgs(e),enumerable:!0}),n._parseArgs=function(S,h,v,T){let A=!!v;S=S||e,w.__=F.__,w.configuration=n.getParserConfiguration();let b=!!w.configuration["populate--"],z=Object.assign({},w.configuration,{"populate--":!0}),Q=ce.Parser.detailed(S,Object.assign({},w,{configuration:Object.assign({"parse-positional-numbers":!1},z)})),re=Q.argv;G&&(re=Object.assign({},re,G));let Ae=Q.aliases;re.$0=n.$0,n.parsed=Q;try{if(Ce(),h)return n._postProcess(re,b,v);Ne&&~[Ne].concat(Ae[Ne]||[]).filter(pe=>pe.length>1).indexOf(""+re._[re._.length-1])&&(re._.pop(),re[Ne]=!0);let Fe=s.getCommands(),Pe=o.completionKey in re,cn=re[Ne]||Pe,Cr=cn&&(Fe.length>1||Fe[0]!=="$0");if(re._.length){if(Fe.length){let Te;for(let pe=T||0,Dt;re._[pe]!==void 0;pe++)if(Dt=String(re._[pe]),~Fe.indexOf(Dt)&&Dt!==x){let ei=s.runCommand(Dt,n,Q,pe+1);return n._postProcess(ei,b)}else if(!Te&&Dt!==x){Te=Dt;break}if(s.hasDefaultCommand()&&!Cr){let pe=s.runCommand(null,n,Q);return n._postProcess(pe,b)}ve&&Te&&!cn&&D.recommendCommands(Te,Fe);}x&&~re._.indexOf(x)&&!Pe&&(ie&&Mn(!0),n.showCompletionScript(),n.exit(0));}else if(s.hasDefaultCommand()&&!Cr){let Te=s.runCommand(null,n,Q);return n._postProcess(Te,b)}if(Pe){ie&&Mn(!0),S=[].concat(S);let Te=S.slice(S.indexOf(`--${o.completionKey}`)+1);return o.getCompletion(Te,pe=>{(pe||[]).forEach(Dt=>{le.log(Dt);}),n.exit(0);}),n._postProcess(re,!b,v)}if(j||Object.keys(re).forEach(Te=>{Te===Ne&&re[Te]?(ie&&Mn(!0),A=!0,n.showHelp("log"),n.exit(0)):Te===R&&re[Te]&&(ie&&Mn(!0),A=!0,m.showVersion(),n.exit(0));}),!A&&w.skipValidation.length>0&&(A=Object.keys(re).some(Te=>w.skipValidation.indexOf(Te)>=0&&re[Te]===!0)),!A){if(Q.error)throw new nt(Q.error.message);Pe||n._runValidation(re,Ae,{},Q.error);}}catch(Fe){if(Fe instanceof nt)m.fail(Fe.message,Fe);else throw Fe}return n._postProcess(re,b,v)},n._postProcess=function(E,S,h=!1){return Ut(E)||h||(S||(E=n._copyDoubleDash(E)),(n.getParserConfiguration()["parse-positional-numbers"]||n.getParserConfiguration()["parse-positional-numbers"]===void 0)&&(E=n._parsePositionalNumbers(E))),E},n._copyDoubleDash=function(E){if(!E._||!E["--"])return E;E._.push.apply(E._,E["--"]);try{delete E["--"];}catch{}return E},n._parsePositionalNumbers=function(E){let S=E["--"]?E["--"]:E._;for(let h=0,v;(v=S[h])!==void 0;h++)ce.Parser.looksLikeNumber(v)&&Number.isSafeInteger(Math.floor(parseFloat(`${v}`)))&&(S[h]=Number(v));return E},n._runValidation=function(S,h,v,T,A=!1){if(T)throw new nt(T.message);D.nonOptionCount(S),D.requiredArguments(S);let b=!1;ye&&(b=D.unknownCommands(S)),K&&!b?D.unknownArguments(S,h,v,A):de&&D.unknownArguments(S,h,{},!1,!1),D.customChecks(S,h),D.limitedChoices(S),D.implications(S),D.conflicting(S);};function Ce(){if(!we)return;let E=ce.getEnv("LC_ALL")||ce.getEnv("LC_MESSAGES")||ce.getEnv("LANG")||ce.getEnv("LANGUAGE")||"en_US";n.locale(E.replace(/[.:].*/,""));}return n.help(),n.version(),n}var ff=(e,t)=>ce.path.relative(e,t);function Av(e){return !!e&&typeof e._parseArgs=="function"}var Ko,Qo,{readFileSync:Mv}=U("fs"),{inspect:Tv}=U("util"),{resolve:jv}=U("path"),Iv=rl(),Nv=Ro(),df={assert:{notStrictEqual:Kl.notStrictEqual,strictEqual:Kl.strictEqual},cliui:Bl(),findUp:Ul(),getEnv:e=>process.env[e],getCallerFile:Hl(),getProcessArgvBin:lf,inspect:Tv,mainFilename:(Qo=(Ko=U?.main)===null||Ko===void 0?void 0:Ko.filename)!==null&&Qo!==void 0?Qo:process.cwd(),Parser:Nv,path:U("path"),process:{argv:()=>process.argv,cwd:process.cwd,execPath:()=>process.execPath,exit:e=>{process.exit(e);},nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:Mv,require:U,requireDirectory:Zl(),stringWidth:Pi(),y18n:Iv({directory:jv(__dirname,"../locales"),updateFiles:!1})},of=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):10;if(process&&process.version&&Number(process.version.match(/v([^.]+)/)[1]){var{Yargs:Pv,processArgv:Rv}=pf();Gr(Rv.hideBin(process.argv));mf.exports=Gr;function Gr(e,t){let r=Pv(e,t,U);return Bv(r),r}function Bv(e){Object.keys(e).forEach(t=>{t==="argv"?Gr.__defineGetter__(t,e.__lookupGetter__(t)):typeof e[t]=="function"?Gr[t]=e[t].bind(e):(Gr.__defineGetter__("$0",()=>e.$0),Gr.__defineGetter__("parsed",()=>e.parsed));});}});var yf=B(Df=>{var qv=U("util"),Vi=Br(),gf=hr().Memory,na=Df.Argv=function(e,t){gf.call(this,e),e=e||{},this.type="argv",this.readOnly=!0,this.options=e,this.usage=t,typeof e.parseValues=="boolean"?(this.parseValues=e.parseValues,delete e.parseValues):this.parseValues=!1,typeof e.transform=="function"?(this.transform=e.transform,delete e.transform):this.transform=!1,typeof e.separator=="string"||e.separator instanceof RegExp?(this.separator=e.separator,delete e.separator):this.separator="";};qv.inherits(na,gf);na.prototype.loadSync=function(){return this.loadArgv(),this.store};na.prototype.loadArgv=function(){var e=this,t,r;if(t=Yv(this.options)?this.options:typeof this.options=="object"?ra()(process.argv.slice(2)).options(this.options):ra()(process.argv.slice(2)),typeof this.usage=="string"&&t.usage(this.usage),r=t.argv,!!r)return this.transform&&(r=Vi.transform(r,this.transform)),this.readOnly=!1,Object.keys(r).forEach(function(n){var s=r[n];typeof s<"u"&&(e.parseValues&&(s=Vi.parseValues(s)),e.separator?e.set(Vi.key.apply(Vi,n.split(e.separator)),s):e.set(n,s));}),this.showHelp=t.showHelp,this.help=t.help,this.readOnly=!0,this.store};function Yv(e){return (typeof e=="function"||typeof e=="object")&&"argv"in e}});var Ef=B(vf=>{var Wv=U("util"),Gi=Br(),wf=hr().Memory,ia=vf.Env=function(e){wf.call(this,e),e=e||{},this.type="env",this.readOnly=!0,this.whitelist=e.whitelist||[],this.separator=e.separator||"",this.lowerCase=e.lowerCase||!1,this.parseValues=e.parseValues||!1,this.transform=e.transform||!1,{}.toString.call(e.match)==="[object RegExp]"&&typeof e!="string"&&(this.match=e.match),e instanceof Array&&(this.whitelist=e),(typeof e=="string"||e instanceof RegExp)&&(this.separator=e);};Wv.inherits(ia,wf);ia.prototype.loadSync=function(){return this.loadEnv(),this.store};ia.prototype.loadEnv=function(){var e=this,t=process.env;return this.lowerCase&&(t={},Object.keys(process.env).forEach(function(r){t[r.toLowerCase()]=process.env[r];})),this.transform&&(t=Gi.transform(t,this.transform)),this.readOnly=!1,Object.keys(t).filter(function(r){return e.match&&e.whitelist.length?r.match(e.match)||e.whitelist.indexOf(r)!==-1:e.match?r.match(e.match):!e.whitelist.length||e.whitelist.indexOf(r)!==-1}).forEach(function(r){var n=t[r];e.parseValues&&(n=Gi.parseValues(n)),e.separator?e.set(Gi.key.apply(Gi,r.split(e.separator)),n):e.set(r,n);}),this.readOnly=!0,this.store};});var Sf=B((fC,Ff)=>{var Uv=U("crypto"),zv={stringify:function(e,t,r){return JSON.stringify(e,t||null,r||2)},parse:JSON.parse};Ff.exports=sa;function sa(e){if(e=e||{},this.secret=typeof e!="string"?e.secret:e,this.format=e.format||zv,this.alg=e.alg||"aes-256-ctr",!this.secret)throw new Error("Secret is a required option")}sa.prototype.encrypt=function(t,r){var n=this;return Object.keys(t).reduce(function(s,o){var u=n.format.stringify(t[o]);return s[o]={alg:n.alg,value:_f(u,{alg:n.alg,secret:n.secret,encs:{input:"utf8",output:"hex"}})},s},{})};sa.prototype.decrypt=function(t,r){var n=this;return Object.keys(t).reduce(function(s,o){var u=_f(t[o].value,{alg:t[o].alg||n.alg,secret:n.secret,encs:{input:"hex",output:"utf8"}});return s[o]=n.format.parse(u),s},{})};function _f(e,t){var r=t.encs,n=Uv.createCipher(t.alg,t.secret);return n.update(e,r.input,r.output)+n.final(r.output)}});var bf=B(Of=>{var Je=U("fs"),Tn=U("path"),Hv=U("util"),Vv=Sf(),Gv=Li(),Cf=hr().Memory,Jv=Je.exists||Tn.exists,Zv=Je.existsSync||Tn.existsSync,zt=Of.File=function(e){if(!e||!e.file)throw new Error("Missing required option `file`");if(Cf.call(this,e),this.type="file",this.file=e.file,this.dir=e.dir||process.cwd(),this.format=e.format||Gv.json,this.secure=e.secure,this.spacing=e.json_spacing||e.spacing||2,this.secure){if(this.secure=Buffer.isBuffer(this.secure)||typeof this.secure=="string"?{secret:this.secure.toString()}:this.secure,this.secure.alg=this.secure.alg||"aes-256-ctr",this.secure.secretPath&&(this.secure.secret=Je.readFileSync(this.secure.secretPath,"utf8")),!this.secure.secret)throw new Error("secure.secret option is required");this.keys=new Vv({secret:this.secure.secret,alg:this.secure.alg,format:this.format});}e.search&&this.search(this.dir);};Hv.inherits(zt,Cf);zt.prototype.save=function(e,t){this.saveToFile(this.file,e,t);};zt.prototype.saveToFile=function(e,t,r){r||(r=t,t=this.format),Je.writeFile(e,this.stringify(t),r);};zt.prototype.saveSync=function(){return Je.writeFileSync(this.file,this.stringify()),this.store};zt.prototype.load=function(e){var t=this;Jv(t.file,function(r){if(!r)return e(null,{});Je.readFile(t.file,function(n,s){if(n)return e(n);try{var o=s.toString();o.charAt(0)==="\uFEFF"&&(o=o.substr(1)),t.store=t.parse(o);}catch(u){return e(new Error("Error parsing your configuration file: ["+t.file+"]: "+u.message))}e(null,t.store);});});};zt.prototype.loadSync=function(){if(!Zv(this.file))return this.store={},this.store;try{var e=Je.readFileSync(this.file,"utf8");e.charAt(0)==="\uFEFF"&&(e=e.substr(1)),this.store=this.parse(e);}catch(t){throw new Error("Error parsing your configuration file: ["+this.file+"]: "+t.message)}return this.store};zt.prototype.stringify=function(e){var t=this.store;return e||(e=this.format),this.secure&&(t=this.keys.encrypt(t)),e.stringify(t,null,this.spacing)};zt.prototype.parse=function(e){var t=this.format.parse(e);return this.secure?this.keys.decrypt(t):t};zt.prototype.search=function(e){var t=!0,r,n,s;if(e=e||process.cwd(),this.file[0]==="/")try{s=Je.statSync(Je.realpathSync(this.file)),s.isFile()&&(r=this.file,t=!1);}catch{}if(t&&e)try{var o=Je.statSync(Je.realpathSync(e));t=o.isDirectory();}catch{return !1}for(;t;)try{s=Je.statSync(Je.realpathSync(r=Tn.join(e,this.file))),t=s.isDirectory();}catch{if(n=e,e=Tn.dirname(e),n===e){try{s=Je.statSync(Je.realpathSync(r=Tn.join(this.dir,this.file))),s.isDirectory()&&(r=void 0);}catch{}t=!1;}}return this.file=r||this.file,r};});var Tf=B(Mf=>{var Kv=U("util"),xf=hr().Memory,Af=Mf.Literal=function(t){xf.call(this,t),t=t||{},this.type="literal",this.readOnly=!0,this.store=t.store||t;};Kv.inherits(Af,xf);Af.prototype.loadSync=function(){return this.store};});var $i=B((pC,If)=>{var Ji=Br(),jf=Xc().Provider,ct=If.exports=new jf;ct.version=el().version;ct.__defineGetter__("Argv",function(){return yf().Argv});ct.__defineGetter__("Env",function(){return Ef().Env});ct.__defineGetter__("File",function(){return bf().File});ct.__defineGetter__("Literal",function(){return Tf().Literal});ct.__defineGetter__("Memory",function(){return hr().Memory});ct.key=Ji.key;ct.path=Ji.path;ct.loadFiles=Ji.loadFiles;ct.loadFilesSync=Ji.loadFilesSync;ct.formats=Li();ct.Provider=jf;});var kf=B((vC,$f)=>{var Zr=1e3,Kr=Zr*60,Qr=Kr*60,pr=Qr*24,nE=pr*7,iE=pr*365.25;$f.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return sE(e);if(r==="number"&&isFinite(e))return t.long?aE(e):oE(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function sE(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*iE;case"weeks":case"week":case"w":return r*nE;case"days":case"day":case"d":return r*pr;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Qr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Kr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Zr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function oE(e){var t=Math.abs(e);return t>=pr?Math.round(e/pr)+"d":t>=Qr?Math.round(e/Qr)+"h":t>=Kr?Math.round(e/Kr)+"m":t>=Zr?Math.round(e/Zr)+"s":e+"ms"}function aE(e){var t=Math.abs(e);return t>=pr?Zi(e,t,pr,"day"):t>=Qr?Zi(e,t,Qr,"hour"):t>=Kr?Zi(e,t,Kr,"minute"):t>=Zr?Zi(e,t,Zr,"second"):e+" ms"}function Zi(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var aa=B((EC,Pf)=>{function uE(e){r.debug=r,r.default=r,r.coerce=d,r.disable=o,r.enable=s,r.enabled=u,r.humanize=kf(),r.destroy=g,Object.keys(e).forEach(m=>{r[m]=e[m];}),r.names=[],r.skips=[],r.formatters={};function t(m){let D=0;for(let y=0;y{if(J==="%%")return "%";M++;let te=r.formatters[X];if(typeof te=="function"){let L=j[M];J=te.call($,L),j.splice(M,1),M--;}return J}),r.formatArgs.call($,j),($.log||r.log).apply($,j);}return _.namespace=m,_.useColors=r.useColors(),_.color=r.selectColor(m),_.extend=n,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(F!==r.namespaces&&(F=r.namespaces,C=r.enabled(m)),C),set:j=>{y=j;}}),typeof r.init=="function"&&r.init(_),_}function n(m,D){let y=r(this.namespace+(typeof D>"u"?":":D)+m);return y.log=this.log,y}function s(m){r.save(m),r.namespaces=m,r.names=[],r.skips=[];let D,y=(typeof m=="string"?m:"").split(/[\s,]+/),F=y.length;for(D=0;D"-"+D)].join(",");return r.enable(""),m}function u(m){if(m[m.length-1]==="*")return !0;let D,y;for(D=0,y=r.skips.length;D{it.formatArgs=lE;it.save=fE;it.load=dE;it.useColors=cE;it.storage=hE();it.destroy=(()=>{let e=!1;return ()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})();it.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function cE(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function lE(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Ki.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r));}),e.splice(n,0,t);}it.log=console.debug||console.log||(()=>{});function fE(e){try{e?it.storage.setItem("debug",e):it.storage.removeItem("debug");}catch{}}function dE(){let e;try{e=it.storage.getItem("debug");}catch{}return !e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function hE(){try{return localStorage}catch{}}Ki.exports=aa()(it);var{formatters:pE}=Ki.exports;pE.j=function(e){try{return JSON.stringify(e)}catch(t){return "[UnexpectedJSONParseError]: "+t.message}};});var qf=B((_C,Bf)=>{Bf.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n{var mE=U("os"),Yf=U("tty"),lt=qf(),{env:Be}=process,rr;lt("no-color")||lt("no-colors")||lt("color=false")||lt("color=never")?rr=0:(lt("color")||lt("colors")||lt("color=true")||lt("color=always"))&&(rr=1);"FORCE_COLOR"in Be&&(Be.FORCE_COLOR==="true"?rr=1:Be.FORCE_COLOR==="false"?rr=0:rr=Be.FORCE_COLOR.length===0?1:Math.min(parseInt(Be.FORCE_COLOR,10),3));function ua(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ca(e,t){if(rr===0)return 0;if(lt("color=16m")||lt("color=full")||lt("color=truecolor"))return 3;if(lt("color=256"))return 2;if(e&&!t&&rr===void 0)return 0;let r=rr||0;if(Be.TERM==="dumb")return r;if(process.platform==="win32"){let n=mE.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Be)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Be)||Be.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Be)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Be.TEAMCITY_VERSION)?1:0;if(Be.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Be){let n=parseInt((Be.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Be.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return /-256(color)?$/i.test(Be.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Be.TERM)||"COLORTERM"in Be?1:r}function gE(e){let t=ca(e,e&&e.isTTY);return ua(t)}Wf.exports={supportsColor:gE,stdout:ua(ca(!0,Yf.isatty(1))),stderr:ua(ca(!0,Yf.isatty(2)))};});var Hf=B((We,Xi)=>{var DE=U("tty"),Qi=U("util");We.init=SE;We.log=EE;We.formatArgs=wE;We.save=_E;We.load=FE;We.useColors=yE;We.destroy=Qi.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");We.colors=[6,2,3,4,5,1];try{let e=Uf();e&&(e.stderr||e).level>=2&&(We.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]);}catch{}We.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[t];return /^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function yE(){return "colors"in We.inspectOpts?!!We.inspectOpts.colors:DE.isatty(process.stderr.fd)}function wE(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${t} \x1B[0m`;e[0]=o+e[0].split(` `).join(` `+o),e.push(s+"m+"+Xi.exports.humanize(this.diff)+"\x1B[0m");}else e[0]=vE()+t+" "+e[0];}function vE(){return We.inspectOpts.hideDate?"":new Date().toISOString()+" "}function EE(...e){return process.stderr.write(Qi.format(...e)+` `)}function _E(e){e?process.env.DEBUG=e:delete process.env.DEBUG;}function FE(){return process.env.DEBUG}function SE(e){e.inspectOpts={};let t=Object.keys(We.inspectOpts);for(let r=0;rt.trim()).join(" ")};zf.O=function(e){return this.inspectOpts.colors=this.useColors,Qi.inspect(e,this.inspectOpts)};});var qe=B((SC,la)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?la.exports=Rf():la.exports=Hf();});var Gf=B((CC,Vf)=>{Vf.exports=CE;function Xr(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function CE(e){if(e=e||{},e.circles)return bE(e);return e.proto?n:r;function t(s,o){for(var u=Object.keys(s),c=new Array(u.length),d=0;d{var OE=U("util"),mr=qe()("log4js:configuration"),es=[],ts=[],Jf=e=>!e,Zf=e=>e&&typeof e=="object"&&!Array.isArray(e),xE=e=>/^[A-Za-z][A-Za-z0-9_]*$/g.test(e),AE=e=>e&&typeof e=="number"&&Number.isInteger(e),ME=e=>{ts.push(e),mr(`Added listener, now ${ts.length} listeners`);},TE=e=>{es.push(e),mr(`Added pre-processing listener, now ${es.length} listeners`);},Kf=(e,t,r)=>{(Array.isArray(t)?t:[t]).forEach(s=>{if(s)throw new Error(`Problem with log4js configuration: (${OE.inspect(e,{depth:5})}) - ${r}`)});},jE=e=>{mr("New configuration to be validated: ",e),Kf(e,Jf(Zf(e)),"must be an object."),mr(`Calling pre-processing listeners (${es.length})`),es.forEach(t=>t(e)),mr("Configuration pre-processing finished."),mr(`Calling configuration listeners (${ts.length})`),ts.forEach(t=>t(e)),mr("Configuration finished.");};Qf.exports={configure:jE,addListener:ME,addPreProcessingListener:TE,throwExceptionIf:Kf,anObject:Zf,anInteger:AE,validIdentifier:xE,not:Jf};});var rs=B((OC,ft)=>{function Xf(e,t){for(var r=e.toString();r.length-1?s:o,c=Dr(t.getHours()),d=Dr(t.getMinutes()),g=Dr(t.getSeconds()),m=Xf(t.getMilliseconds(),3),D=IE(t.getTimezoneOffset()),y=e.replace(/dd/g,r).replace(/MM/g,n).replace(/y{1,4}/g,u).replace(/hh/g,c).replace(/mm/g,d).replace(/ss/g,g).replace(/SSS/g,m).replace(/O/g,D);return y}function nr(e,t,r,n){e["set"+(n?"":"UTC")+t](r);}function NE(e,t,r){var n=e.indexOf("O")<0,s=!1,o=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(D,y){nr(D,"FullYear",y,n);}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(D,y){nr(D,"Month",y-1,n),D.getMonth()!==y-1&&(s=!0);}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(D,y){s&&nr(D,"Month",D.getMonth()-1,n),nr(D,"Date",y,n);}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(D,y){nr(D,"Hours",y,n);}},{pattern:/mm/,regexp:"\\d\\d",fn:function(D,y){nr(D,"Minutes",y,n);}},{pattern:/ss/,regexp:"\\d\\d",fn:function(D,y){nr(D,"Seconds",y,n);}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(D,y){nr(D,"Milliseconds",y,n);}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(D,y){y==="Z"?y=0:y=y.replace(":","");var F=Math.abs(y),C=(y>0?-1:1)*(F%100+Math.floor(F/100)*60);D.setUTCMinutes(D.getUTCMinutes()+C);}}],u=o.reduce(function(D,y){return y.pattern.test(D.regexp)?(y.index=D.regexp.match(y.pattern).index,D.regexp=D.regexp.replace(y.pattern,"("+y.regexp+")")):y.index=-1,D},{regexp:e,index:[]}),c=o.filter(function(D){return D.index>-1});c.sort(function(D,y){return D.index-y.index});var d=new RegExp(u.regexp),g=d.exec(t);if(g){var m=r||ft.exports.now();return c.forEach(function(D,y){D.fn(m,g[y+1]);}),m}throw new Error("String '"+t+"' could not be parsed as '"+e+"'")}function LE(e,t,r){if(!e)throw new Error("pattern must be supplied");return NE(e,t,r)}function $E(){return new Date}ft.exports=ed;ft.exports.asString=ed;ft.exports.parse=LE;ft.exports.now=$E;ft.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS";ft.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO";ft.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS";ft.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS";});var da=B((xC,dd)=>{var ir=rs(),td=U("os"),Nn=U("util"),In=U("path"),rd=U("url"),nd=qe()("log4js:layouts"),id={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[90,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[91,39],yellow:[33,39]};function sd(e){return e?`\x1B[${id[e][0]}m`:""}function od(e){return e?`\x1B[${id[e][1]}m`:""}function kE(e,t){return sd(t)+e+od(t)}function ad(e,t){return kE(Nn.format("[%s] [%s] %s - ",ir.asString(e.startTime),e.level.toString(),e.categoryName),t)}function ud(e){return ad(e)+Nn.format(...e.data)}function ns(e){return ad(e,e.level.colour)+Nn.format(...e.data)}function cd(e){return Nn.format(...e.data)}function ld(e){return e.data[0]}function fd(e,t){let r="%r %p %c - %m%n",n=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflosCMAF%])(\{([^}]+)\})?|([^%]+)/;e=e||r;function s(I,W){let k=I.categoryName;if(W){let G=parseInt(W,10),K=k.split(".");GK&&(k=ye.slice(-K).join(In.sep));}return k}function w(I){return I.lineNumber?`${I.lineNumber}`:""}function M(I){return I.columnNumber?`${I.columnNumber}`:""}function P(I){return I.callStack||""}function J(I){return I.className||""}function X(I){return I.functionName||""}function te(I){return I.functionAlias||""}function L(I){return I.callerName||""}let ee={c:s,d:o,h:u,m:c,n:d,p:g,r:m,"[":D,"]":y,y:_,z:C,"%":F,x:j,X:$,f:x,l:w,o:M,s:P,C:J,M:X,A:te,F:L};function Z(I,W,k){return ee[I](W,k)}function q(I,W){let k;return I?(k=parseInt(I.slice(1),10),k>0?W.slice(0,k):W.slice(k)):W}function Y(I,W){let k;if(I)if(I.charAt(0)==="-")for(k=parseInt(I.slice(1),10);W.length{var Le=gr(),hd=["white","grey","black","blue","cyan","green","magenta","red","yellow"],en=class e{constructor(t,r,n){this.level=t,this.levelStr=r,this.colour=n;}toString(){return this.levelStr}static getLevel(t,r){return t?t instanceof e?t:(t instanceof Object&&t.levelStr&&(t=t.levelStr),e[t.toString().toUpperCase()]||r):r}static addLevels(t){t&&(Object.keys(t).forEach(n=>{let s=n.toUpperCase();e[s]=new e(t[n].value,s,t[n].colour);let o=e.levels.findIndex(u=>u.levelStr===s);o>-1?e.levels[o]=e[s]:e.levels.push(e[s]);}),e.levels.sort((n,s)=>n.level-s.level));}isLessThanOrEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level<=t.level}isGreaterThanOrEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level>=t.level}isEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level===t.level}};en.levels=[];en.addLevels({ALL:{value:Number.MIN_VALUE,colour:"grey"},TRACE:{value:5e3,colour:"blue"},DEBUG:{value:1e4,colour:"cyan"},INFO:{value:2e4,colour:"green"},WARN:{value:3e4,colour:"yellow"},ERROR:{value:4e4,colour:"red"},FATAL:{value:5e4,colour:"magenta"},MARK:{value:9007199254740992,colour:"grey"},OFF:{value:Number.MAX_VALUE,colour:"grey"}});Le.addListener(e=>{let t=e.levels;t&&(Le.throwExceptionIf(e,Le.not(Le.anObject(t)),"levels must be an object"),Object.keys(t).forEach(n=>{Le.throwExceptionIf(e,Le.not(Le.validIdentifier(n)),`level name "${n}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)`),Le.throwExceptionIf(e,Le.not(Le.anObject(t[n])),`level "${n}" must be an object`),Le.throwExceptionIf(e,Le.not(t[n].value),`level "${n}" must have a 'value' property`),Le.throwExceptionIf(e,Le.not(Le.anInteger(t[n].value)),`level "${n}".value must have an integer value`),Le.throwExceptionIf(e,Le.not(t[n].colour),`level "${n}" must have a 'colour' property`),Le.throwExceptionIf(e,Le.not(hd.indexOf(t[n].colour)>-1),`level "${n}".colour must be one of ${hd.join(", ")}`);}));});Le.addListener(e=>{en.addLevels(e.levels);});pd.exports=en;});var Sd=B($n=>{var{parse:Dd,stringify:yd}=JSON,{keys:PE}=Object,Ln=String,wd="string",md={},is="object",vd=(e,t)=>t,RE=e=>e instanceof Ln?Ln(e):e,BE=(e,t)=>typeof t===wd?new Ln(t):t,Ed=(e,t,r,n)=>{let s=[];for(let o=PE(r),{length:u}=o,c=0;c{let n=Ln(t.push(r)-1);return e.set(r,n),n},_d=(e,t)=>{let r=Dd(e,BE).map(RE),n=r[0],s=t||vd,o=typeof n===is&&n?Ed(r,new Set,n,s):n;return s.call({"":o},"",o)};$n.parse=_d;var Fd=(e,t,r)=>{let n=t&&typeof t===is?(m,D)=>m===""||-1Dd(Fd(e));$n.toJSON=qE;var YE=e=>_d(yd(e));$n.fromJSON=YE;});var ma=B((TC,xd)=>{var Cd=Sd(),bd=yr(),ha=class{constructor(){let t={__LOG4JS_undefined__:void 0,__LOG4JS_NaN__:+"abc",__LOG4JS_Infinity__:1/0,"__LOG4JS_-Infinity__":-1/0};this.deMap=t,this.serMap={},Object.keys(this.deMap).forEach(r=>{let n=this.deMap[r];this.serMap[n]=r;});}canSerialise(t){return typeof t=="string"?!1:t in this.serMap}serialise(t){return this.canSerialise(t)?this.serMap[t]:t}canDeserialise(t){return t in this.deMap}deserialise(t){return this.canDeserialise(t)?this.deMap[t]:t}},Od=new ha,pa=class e{constructor(t,r,n,s,o,u){if(this.startTime=new Date,this.categoryName=t,this.data=n,this.level=r,this.context=Object.assign({},s),this.pid=process.pid,this.error=u,typeof o<"u"){if(!o||typeof o!="object"||Array.isArray(o))throw new TypeError("Invalid location type passed to LoggingEvent constructor");this.constructor._getLocationKeys().forEach(c=>{typeof o[c]<"u"&&(this[c]=o[c]);});}}static _getLocationKeys(){return ["fileName","lineNumber","columnNumber","callStack","className","functionName","functionAlias","callerName"]}serialise(){return Cd.stringify(this,(t,r)=>(r instanceof Error&&(r=Object.assign({message:r.message,stack:r.stack},r)),Od.serialise(r)))}static deserialise(t){let r;try{let n=Cd.parse(t,(s,o)=>{if(o&&o.message&&o.stack){let u=new Error(o);Object.keys(o).forEach(c=>{u[c]=o[c];}),o=u;}return Od.deserialise(o)});this._getLocationKeys().forEach(s=>{typeof n[s]<"u"&&(n.location||(n.location={}),n.location[s]=n[s]);}),r=new e(n.categoryName,bd.getLevel(n.level.levelStr),n.data,n.context,n.location,n.error),r.startTime=new Date(n.startTime),r.pid=n.pid,n.cluster&&(r.cluster=n.cluster);}catch(n){r=new e("log4js",bd.ERROR,["Unable to parse log:",t,"because: ",n]);}return r}};xd.exports=pa;});var os=B((jC,Td)=>{var dt=qe()("log4js:clustering"),WE=ma(),UE=gr(),tn=!1,ht=null;try{ht=U("cluster");}catch{dt("cluster module not present"),tn=!0;}var Da=[],Pn=!1,kn="NODE_APP_INSTANCE",Ad=()=>Pn&&process.env[kn]==="0",ga=()=>tn||ht&&ht.isMaster||Ad(),Md=e=>{Da.forEach(t=>t(e));},ss=(e,t)=>{if(dt("cluster message received from worker ",e,": ",t),e.topic&&e.data&&(t=e,e=void 0),t&&t.topic&&t.topic==="log4js:message"){dt("received message: ",t.data);let r=WE.deserialise(t.data);Md(r);}};tn||UE.addListener(e=>{Da.length=0,{pm2:Pn,disableClustering:tn,pm2InstanceVar:kn="NODE_APP_INSTANCE"}=e,dt(`clustering disabled ? ${tn}`),dt(`cluster.isMaster ? ${ht&&ht.isMaster}`),dt(`pm2 enabled ? ${Pn}`),dt(`pm2InstanceVar = ${kn}`),dt(`process.env[${kn}] = ${process.env[kn]}`),Pn&&process.removeListener("message",ss),ht&&ht.removeListener&&ht.removeListener("message",ss),tn||e.disableClustering?dt("Not listening for cluster messages, because clustering disabled."):Ad()?(dt("listening for PM2 broadcast messages"),process.on("message",ss)):ht&&ht.isMaster?(dt("listening for cluster messages"),ht.on("message",ss)):dt("not listening for messages, because we are not a master process");});Td.exports={onlyOnMaster:(e,t)=>ga()?e():t,isMaster:ga,send:e=>{ga()?Md(e):(Pn||(e.cluster={workerId:ht.worker.id,worker:process.pid}),process.send({topic:"log4js:message",data:e.serialise()}));},onMessage:e=>{Da.push(e);}};});var Nd=B((IC,Id)=>{function zE(e){if(typeof e=="number"&&Number.isInteger(e))return e;let t={K:1024,M:1024*1024,G:1024*1024*1024},r=Object.keys(t),n=e.slice(-1).toLocaleUpperCase(),s=e.slice(0,-1).trim();if(r.indexOf(n)<0||!Number.isInteger(Number(s)))throw Error(`maxLogSize: "${e}" is invalid`);return s*t[n]}function HE(e,t){let r=Object.assign({},t);return Object.keys(e).forEach(n=>{r[n]&&(r[n]=e[n](t[n]));}),r}function ya(e){return HE({maxLogSize:zE},e)}var jd={dateFile:ya,file:ya,fileSync:ya};Id.exports.modifyConfig=e=>jd[e.type]?jd[e.type](e):e;});var $d=B((NC,Ld)=>{var VE=console.log.bind(console);function GE(e,t){return r=>{VE(e(r,t));}}function JE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),GE(r,e.timezoneOffset)}Ld.exports.configure=JE;});var Pd=B(kd=>{function ZE(e,t){return r=>{process.stdout.write(`${e(r,t)} +`).map(t=>t.trim()).join(" ")};zf.O=function(e){return this.inspectOpts.colors=this.useColors,Qi.inspect(e,this.inspectOpts)};});var qe=B((SC,la)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?la.exports=Rf():la.exports=Hf();});var Gf=B((CC,Vf)=>{Vf.exports=CE;function Xr(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function CE(e){if(e=e||{},e.circles)return OE(e);return e.proto?n:r;function t(s,o){for(var u=Object.keys(s),c=new Array(u.length),d=0;d{var bE=U("util"),mr=qe()("log4js:configuration"),es=[],ts=[],Jf=e=>!e,Zf=e=>e&&typeof e=="object"&&!Array.isArray(e),xE=e=>/^[A-Za-z][A-Za-z0-9_]*$/g.test(e),AE=e=>e&&typeof e=="number"&&Number.isInteger(e),ME=e=>{ts.push(e),mr(`Added listener, now ${ts.length} listeners`);},TE=e=>{es.push(e),mr(`Added pre-processing listener, now ${es.length} listeners`);},Kf=(e,t,r)=>{(Array.isArray(t)?t:[t]).forEach(s=>{if(s)throw new Error(`Problem with log4js configuration: (${bE.inspect(e,{depth:5})}) - ${r}`)});},jE=e=>{mr("New configuration to be validated: ",e),Kf(e,Jf(Zf(e)),"must be an object."),mr(`Calling pre-processing listeners (${es.length})`),es.forEach(t=>t(e)),mr("Configuration pre-processing finished."),mr(`Calling configuration listeners (${ts.length})`),ts.forEach(t=>t(e)),mr("Configuration finished.");};Qf.exports={configure:jE,addListener:ME,addPreProcessingListener:TE,throwExceptionIf:Kf,anObject:Zf,anInteger:AE,validIdentifier:xE,not:Jf};});var rs=B((bC,ft)=>{function Xf(e,t){for(var r=e.toString();r.length-1?s:o,c=Dr(t.getHours()),d=Dr(t.getMinutes()),g=Dr(t.getSeconds()),m=Xf(t.getMilliseconds(),3),D=IE(t.getTimezoneOffset()),y=e.replace(/dd/g,r).replace(/MM/g,n).replace(/y{1,4}/g,u).replace(/hh/g,c).replace(/mm/g,d).replace(/ss/g,g).replace(/SSS/g,m).replace(/O/g,D);return y}function nr(e,t,r,n){e["set"+(n?"":"UTC")+t](r);}function NE(e,t,r){var n=e.indexOf("O")<0,s=!1,o=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(D,y){nr(D,"FullYear",y,n);}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(D,y){nr(D,"Month",y-1,n),D.getMonth()!==y-1&&(s=!0);}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(D,y){s&&nr(D,"Month",D.getMonth()-1,n),nr(D,"Date",y,n);}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(D,y){nr(D,"Hours",y,n);}},{pattern:/mm/,regexp:"\\d\\d",fn:function(D,y){nr(D,"Minutes",y,n);}},{pattern:/ss/,regexp:"\\d\\d",fn:function(D,y){nr(D,"Seconds",y,n);}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(D,y){nr(D,"Milliseconds",y,n);}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(D,y){y==="Z"?y=0:y=y.replace(":","");var F=Math.abs(y),C=(y>0?-1:1)*(F%100+Math.floor(F/100)*60);D.setUTCMinutes(D.getUTCMinutes()+C);}}],u=o.reduce(function(D,y){return y.pattern.test(D.regexp)?(y.index=D.regexp.match(y.pattern).index,D.regexp=D.regexp.replace(y.pattern,"("+y.regexp+")")):y.index=-1,D},{regexp:e,index:[]}),c=o.filter(function(D){return D.index>-1});c.sort(function(D,y){return D.index-y.index});var d=new RegExp(u.regexp),g=d.exec(t);if(g){var m=r||ft.exports.now();return c.forEach(function(D,y){D.fn(m,g[y+1]);}),m}throw new Error("String '"+t+"' could not be parsed as '"+e+"'")}function LE(e,t,r){if(!e)throw new Error("pattern must be supplied");return NE(e,t,r)}function $E(){return new Date}ft.exports=ed;ft.exports.asString=ed;ft.exports.parse=LE;ft.exports.now=$E;ft.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS";ft.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO";ft.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS";ft.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS";});var da=B((xC,dd)=>{var ir=rs(),td=U("os"),Nn=U("util"),In=U("path"),rd=U("url"),nd=qe()("log4js:layouts"),id={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[90,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[91,39],yellow:[33,39]};function sd(e){return e?`\x1B[${id[e][0]}m`:""}function od(e){return e?`\x1B[${id[e][1]}m`:""}function kE(e,t){return sd(t)+e+od(t)}function ad(e,t){return kE(Nn.format("[%s] [%s] %s - ",ir.asString(e.startTime),e.level.toString(),e.categoryName),t)}function ud(e){return ad(e)+Nn.format(...e.data)}function ns(e){return ad(e,e.level.colour)+Nn.format(...e.data)}function cd(e){return Nn.format(...e.data)}function ld(e){return e.data[0]}function fd(e,t){let r="%r %p %c - %m%n",n=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflosCMAF%])(\{([^}]+)\})?|([^%]+)/;e=e||r;function s(I,W){let k=I.categoryName;if(W){let G=parseInt(W,10),K=k.split(".");GK&&(k=ye.slice(-K).join(In.sep));}return k}function w(I){return I.lineNumber?`${I.lineNumber}`:""}function M(I){return I.columnNumber?`${I.columnNumber}`:""}function P(I){return I.callStack||""}function J(I){return I.className||""}function X(I){return I.functionName||""}function te(I){return I.functionAlias||""}function L(I){return I.callerName||""}let ee={c:s,d:o,h:u,m:c,n:d,p:g,r:m,"[":D,"]":y,y:_,z:C,"%":F,x:j,X:$,f:x,l:w,o:M,s:P,C:J,M:X,A:te,F:L};function Z(I,W,k){return ee[I](W,k)}function q(I,W){let k;return I?(k=parseInt(I.slice(1),10),k>0?W.slice(0,k):W.slice(k)):W}function Y(I,W){let k;if(I)if(I.charAt(0)==="-")for(k=parseInt(I.slice(1),10);W.length{var Le=gr(),hd=["white","grey","black","blue","cyan","green","magenta","red","yellow"],en=class e{constructor(t,r,n){this.level=t,this.levelStr=r,this.colour=n;}toString(){return this.levelStr}static getLevel(t,r){return t?t instanceof e?t:(t instanceof Object&&t.levelStr&&(t=t.levelStr),e[t.toString().toUpperCase()]||r):r}static addLevels(t){t&&(Object.keys(t).forEach(n=>{let s=n.toUpperCase();e[s]=new e(t[n].value,s,t[n].colour);let o=e.levels.findIndex(u=>u.levelStr===s);o>-1?e.levels[o]=e[s]:e.levels.push(e[s]);}),e.levels.sort((n,s)=>n.level-s.level));}isLessThanOrEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level<=t.level}isGreaterThanOrEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level>=t.level}isEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level===t.level}};en.levels=[];en.addLevels({ALL:{value:Number.MIN_VALUE,colour:"grey"},TRACE:{value:5e3,colour:"blue"},DEBUG:{value:1e4,colour:"cyan"},INFO:{value:2e4,colour:"green"},WARN:{value:3e4,colour:"yellow"},ERROR:{value:4e4,colour:"red"},FATAL:{value:5e4,colour:"magenta"},MARK:{value:9007199254740992,colour:"grey"},OFF:{value:Number.MAX_VALUE,colour:"grey"}});Le.addListener(e=>{let t=e.levels;t&&(Le.throwExceptionIf(e,Le.not(Le.anObject(t)),"levels must be an object"),Object.keys(t).forEach(n=>{Le.throwExceptionIf(e,Le.not(Le.validIdentifier(n)),`level name "${n}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)`),Le.throwExceptionIf(e,Le.not(Le.anObject(t[n])),`level "${n}" must be an object`),Le.throwExceptionIf(e,Le.not(t[n].value),`level "${n}" must have a 'value' property`),Le.throwExceptionIf(e,Le.not(Le.anInteger(t[n].value)),`level "${n}".value must have an integer value`),Le.throwExceptionIf(e,Le.not(t[n].colour),`level "${n}" must have a 'colour' property`),Le.throwExceptionIf(e,Le.not(hd.indexOf(t[n].colour)>-1),`level "${n}".colour must be one of ${hd.join(", ")}`);}));});Le.addListener(e=>{en.addLevels(e.levels);});pd.exports=en;});var Sd=B($n=>{var{parse:Dd,stringify:yd}=JSON,{keys:PE}=Object,Ln=String,wd="string",md={},is="object",vd=(e,t)=>t,RE=e=>e instanceof Ln?Ln(e):e,BE=(e,t)=>typeof t===wd?new Ln(t):t,Ed=(e,t,r,n)=>{let s=[];for(let o=PE(r),{length:u}=o,c=0;c{let n=Ln(t.push(r)-1);return e.set(r,n),n},_d=(e,t)=>{let r=Dd(e,BE).map(RE),n=r[0],s=t||vd,o=typeof n===is&&n?Ed(r,new Set,n,s):n;return s.call({"":o},"",o)};$n.parse=_d;var Fd=(e,t,r)=>{let n=t&&typeof t===is?(m,D)=>m===""||-1Dd(Fd(e));$n.toJSON=qE;var YE=e=>_d(yd(e));$n.fromJSON=YE;});var ma=B((TC,xd)=>{var Cd=Sd(),Od=yr(),ha=class{constructor(){let t={__LOG4JS_undefined__:void 0,__LOG4JS_NaN__:+"abc",__LOG4JS_Infinity__:1/0,"__LOG4JS_-Infinity__":-1/0};this.deMap=t,this.serMap={},Object.keys(this.deMap).forEach(r=>{let n=this.deMap[r];this.serMap[n]=r;});}canSerialise(t){return typeof t=="string"?!1:t in this.serMap}serialise(t){return this.canSerialise(t)?this.serMap[t]:t}canDeserialise(t){return t in this.deMap}deserialise(t){return this.canDeserialise(t)?this.deMap[t]:t}},bd=new ha,pa=class e{constructor(t,r,n,s,o,u){if(this.startTime=new Date,this.categoryName=t,this.data=n,this.level=r,this.context=Object.assign({},s),this.pid=process.pid,this.error=u,typeof o<"u"){if(!o||typeof o!="object"||Array.isArray(o))throw new TypeError("Invalid location type passed to LoggingEvent constructor");this.constructor._getLocationKeys().forEach(c=>{typeof o[c]<"u"&&(this[c]=o[c]);});}}static _getLocationKeys(){return ["fileName","lineNumber","columnNumber","callStack","className","functionName","functionAlias","callerName"]}serialise(){return Cd.stringify(this,(t,r)=>(r instanceof Error&&(r=Object.assign({message:r.message,stack:r.stack},r)),bd.serialise(r)))}static deserialise(t){let r;try{let n=Cd.parse(t,(s,o)=>{if(o&&o.message&&o.stack){let u=new Error(o);Object.keys(o).forEach(c=>{u[c]=o[c];}),o=u;}return bd.deserialise(o)});this._getLocationKeys().forEach(s=>{typeof n[s]<"u"&&(n.location||(n.location={}),n.location[s]=n[s]);}),r=new e(n.categoryName,Od.getLevel(n.level.levelStr),n.data,n.context,n.location,n.error),r.startTime=new Date(n.startTime),r.pid=n.pid,n.cluster&&(r.cluster=n.cluster);}catch(n){r=new e("log4js",Od.ERROR,["Unable to parse log:",t,"because: ",n]);}return r}};xd.exports=pa;});var os=B((jC,Td)=>{var dt=qe()("log4js:clustering"),WE=ma(),UE=gr(),tn=!1,ht=null;try{ht=U("cluster");}catch{dt("cluster module not present"),tn=!0;}var Da=[],Pn=!1,kn="NODE_APP_INSTANCE",Ad=()=>Pn&&process.env[kn]==="0",ga=()=>tn||ht&&ht.isMaster||Ad(),Md=e=>{Da.forEach(t=>t(e));},ss=(e,t)=>{if(dt("cluster message received from worker ",e,": ",t),e.topic&&e.data&&(t=e,e=void 0),t&&t.topic&&t.topic==="log4js:message"){dt("received message: ",t.data);let r=WE.deserialise(t.data);Md(r);}};tn||UE.addListener(e=>{Da.length=0,{pm2:Pn,disableClustering:tn,pm2InstanceVar:kn="NODE_APP_INSTANCE"}=e,dt(`clustering disabled ? ${tn}`),dt(`cluster.isMaster ? ${ht&&ht.isMaster}`),dt(`pm2 enabled ? ${Pn}`),dt(`pm2InstanceVar = ${kn}`),dt(`process.env[${kn}] = ${process.env[kn]}`),Pn&&process.removeListener("message",ss),ht&&ht.removeListener&&ht.removeListener("message",ss),tn||e.disableClustering?dt("Not listening for cluster messages, because clustering disabled."):Ad()?(dt("listening for PM2 broadcast messages"),process.on("message",ss)):ht&&ht.isMaster?(dt("listening for cluster messages"),ht.on("message",ss)):dt("not listening for messages, because we are not a master process");});Td.exports={onlyOnMaster:(e,t)=>ga()?e():t,isMaster:ga,send:e=>{ga()?Md(e):(Pn||(e.cluster={workerId:ht.worker.id,worker:process.pid}),process.send({topic:"log4js:message",data:e.serialise()}));},onMessage:e=>{Da.push(e);}};});var Nd=B((IC,Id)=>{function zE(e){if(typeof e=="number"&&Number.isInteger(e))return e;let t={K:1024,M:1024*1024,G:1024*1024*1024},r=Object.keys(t),n=e.slice(-1).toLocaleUpperCase(),s=e.slice(0,-1).trim();if(r.indexOf(n)<0||!Number.isInteger(Number(s)))throw Error(`maxLogSize: "${e}" is invalid`);return s*t[n]}function HE(e,t){let r=Object.assign({},t);return Object.keys(e).forEach(n=>{r[n]&&(r[n]=e[n](t[n]));}),r}function ya(e){return HE({maxLogSize:zE},e)}var jd={dateFile:ya,file:ya,fileSync:ya};Id.exports.modifyConfig=e=>jd[e.type]?jd[e.type](e):e;});var $d=B((NC,Ld)=>{var VE=console.log.bind(console);function GE(e,t){return r=>{VE(e(r,t));}}function JE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),GE(r,e.timezoneOffset)}Ld.exports.configure=JE;});var Pd=B(kd=>{function ZE(e,t){return r=>{process.stdout.write(`${e(r,t)} `);}}function KE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),ZE(r,e.timezoneOffset)}kd.configure=KE;});var Bd=B(($C,Rd)=>{function QE(e,t){return r=>{process.stderr.write(`${e(r,t)} `);}}function XE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),QE(r,e.timezoneOffset)}Rd.exports.configure=XE;});var Yd=B((kC,qd)=>{function e_(e,t,r,n){let s=n.getLevel(e),o=n.getLevel(t,n.FATAL);return u=>{let c=u.level;s.isLessThanOrEqualTo(c)&&o.isGreaterThanOrEqualTo(c)&&r(u);}}function t_(e,t,r,n){let s=r(e.appender);return e_(e.level,e.maxLevel,s,n)}qd.exports.configure=t_;});var zd=B((PC,Ud)=>{var Wd=qe()("log4js:categoryFilter");function r_(e,t){return typeof e=="string"&&(e=[e]),r=>{Wd(`Checking ${r.categoryName} against ${e}`),e.indexOf(r.categoryName)===-1&&(Wd("Not excluded, sending to appender"),t(r));}}function n_(e,t,r){let n=r(e.appender);return r_(e.exclude,n)}Ud.exports.configure=n_;});var Gd=B((RC,Vd)=>{var Hd=qe()("log4js:noLogFilter");function i_(e){return e.filter(r=>r!=null&&r!=="")}function s_(e,t){return r=>{Hd(`Checking data: ${r.data} against filters: ${e}`),typeof e=="string"&&(e=[e]),e=i_(e);let n=new RegExp(e.join("|"),"i");(e.length===0||r.data.findIndex(s=>n.test(s))<0)&&(Hd("Not excluded, sending to appender"),t(r));}}function o_(e,t,r){let n=r(e.appender);return s_(e.exclude,n)}Vd.exports.configure=o_;});var Qe=B(wa=>{wa.fromCallback=function(e){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")e.apply(this,arguments);else return new Promise((t,r)=>{arguments[arguments.length]=(n,s)=>{if(n)return r(n);t(s);},arguments.length++,e.apply(this,arguments);})},"name",{value:e.name})};wa.fromPromise=function(e){return Object.defineProperty(function(){let t=arguments[arguments.length-1];if(typeof t!="function")return e.apply(this,arguments);e.apply(this,arguments).then(r=>t(null,r),t);},"name",{value:e.name})};});var Zd=B((qC,Jd)=>{var sr=U("constants"),a_=process.cwd,as=null,u_=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return as||(as=a_.call(process)),as};try{process.cwd();}catch{}typeof process.chdir=="function"&&(va=process.chdir,process.chdir=function(e){as=null,va.call(process,e);},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,va));var va;Jd.exports=c_;function c_(e){sr.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=o(e.chown),e.fchown=o(e.fchown),e.lchown=o(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=u(e.chownSync),e.fchownSync=u(e.fchownSync),e.lchownSync=u(e.lchownSync),e.chmodSync=s(e.chmodSync),e.fchmodSync=s(e.fchmodSync),e.lchmodSync=s(e.lchmodSync),e.stat=c(e.stat),e.fstat=c(e.fstat),e.lstat=c(e.lstat),e.statSync=d(e.statSync),e.fstatSync=d(e.fstatSync),e.lstatSync=d(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(m,D,y){y&&process.nextTick(y);},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(m,D,y,F){F&&process.nextTick(F);},e.lchownSync=function(){}),u_==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(m){function D(y,F,C){var _=Date.now(),j=0;m(y,F,function $(x){if(x&&(x.code==="EACCES"||x.code==="EPERM"||x.code==="EBUSY")&&Date.now()-_<6e4){setTimeout(function(){e.stat(F,function(w,M){w&&w.code==="ENOENT"?m(y,F,$):C(x);});},j),j<100&&(j+=10);return}C&&C(x);});}return Object.setPrototypeOf&&Object.setPrototypeOf(D,m),D}(e.rename)),e.read=typeof e.read!="function"?e.read:function(m){function D(y,F,C,_,j,$){var x;if($&&typeof $=="function"){var w=0;x=function(M,P,J){if(M&&M.code==="EAGAIN"&&w<10)return w++,m.call(e,y,F,C,_,j,x);$.apply(this,arguments);};}return m.call(e,y,F,C,_,j,x)}return Object.setPrototypeOf&&Object.setPrototypeOf(D,m),D}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(m){return function(D,y,F,C,_){for(var j=0;;)try{return m.call(e,D,y,F,C,_)}catch($){if($.code==="EAGAIN"&&j<10){j++;continue}throw $}}}(e.readSync);function t(m){m.lchmod=function(D,y,F){m.open(D,sr.O_WRONLY|sr.O_SYMLINK,y,function(C,_){if(C){F&&F(C);return}m.fchmod(_,y,function(j){m.close(_,function($){F&&F(j||$);});});});},m.lchmodSync=function(D,y){var F=m.openSync(D,sr.O_WRONLY|sr.O_SYMLINK,y),C=!0,_;try{_=m.fchmodSync(F,y),C=!1;}finally{if(C)try{m.closeSync(F);}catch{}else m.closeSync(F);}return _};}function r(m){sr.hasOwnProperty("O_SYMLINK")&&m.futimes?(m.lutimes=function(D,y,F,C){m.open(D,sr.O_SYMLINK,function(_,j){if(_){C&&C(_);return}m.futimes(j,y,F,function($){m.close(j,function(x){C&&C($||x);});});});},m.lutimesSync=function(D,y,F){var C=m.openSync(D,sr.O_SYMLINK),_,j=!0;try{_=m.futimesSync(C,y,F),j=!1;}finally{if(j)try{m.closeSync(C);}catch{}else m.closeSync(C);}return _}):m.futimes&&(m.lutimes=function(D,y,F,C){C&&process.nextTick(C);},m.lutimesSync=function(){});}function n(m){return m&&function(D,y,F){return m.call(e,D,y,function(C){g(C)&&(C=null),F&&F.apply(this,arguments);})}}function s(m){return m&&function(D,y){try{return m.call(e,D,y)}catch(F){if(!g(F))throw F}}}function o(m){return m&&function(D,y,F,C){return m.call(e,D,y,F,function(_){g(_)&&(_=null),C&&C.apply(this,arguments);})}}function u(m){return m&&function(D,y,F){try{return m.call(e,D,y,F)}catch(C){if(!g(C))throw C}}}function c(m){return m&&function(D,y,F){typeof y=="function"&&(F=y,y=null);function C(_,j){j&&(j.uid<0&&(j.uid+=4294967296),j.gid<0&&(j.gid+=4294967296)),F&&F.apply(this,arguments);}return y?m.call(e,D,y,C):m.call(e,D,C)}}function d(m){return m&&function(D,y){var F=y?m.call(e,D,y):m.call(e,D);return F&&(F.uid<0&&(F.uid+=4294967296),F.gid<0&&(F.gid+=4294967296)),F}}function g(m){if(!m||m.code==="ENOSYS")return !0;var D=!process.getuid||process.getuid()!==0;return !!(D&&(m.code==="EINVAL"||m.code==="EPERM"))}}});var Xd=B((YC,Qd)=>{var Kd=U("stream").Stream;Qd.exports=l_;function l_(e){return {ReadStream:t,WriteStream:r};function t(n,s){if(!(this instanceof t))return new t(n,s);Kd.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,s=s||{};for(var u=Object.keys(s),c=0,d=u.length;cthis.end)throw new Error("start must be <= end");this.pos=this.start;}if(this.fd!==null){process.nextTick(function(){o._read();});return}e.open(this.path,this.flags,this.mode,function(m,D){if(m){o.emit("error",m),o.readable=!1;return}o.fd=D,o.emit("open",D),o._read();});}function r(n,s){if(!(this instanceof r))return new r(n,s);Kd.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,s=s||{};for(var o=Object.keys(s),u=0,c=o.length;u= zero");this.pos=this.start;}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush());}}});var th=B((WC,eh)=>{eh.exports=d_;var f_=Object.getPrototypeOf||function(e){return e.__proto__};function d_(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:f_(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));}),t}});var $e=B((UC,Fa)=>{var Me=U("fs"),h_=Zd(),p_=Xd(),m_=th(),us=U("util"),Ue,ls;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ue=Symbol.for("graceful-fs.queue"),ls=Symbol.for("graceful-fs.previous")):(Ue="___graceful-fs.queue",ls="___graceful-fs.previous");function g_(){}function ih(e,t){Object.defineProperty(e,Ue,{get:function(){return t}});}var wr=g_;us.debuglog?wr=us.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(wr=function(){var e=us.format.apply(us,arguments);e="GFS4: "+e.split(/\n/).join(` -GFS4: `),console.error(e);});Me[Ue]||(rh=global[Ue]||[],ih(Me,rh),Me.close=function(e){function t(r,n){return e.call(Me,r,function(s){s||nh(),typeof n=="function"&&n.apply(this,arguments);})}return Object.defineProperty(t,ls,{value:e}),t}(Me.close),Me.closeSync=function(e){function t(r){e.apply(Me,arguments),nh();}return Object.defineProperty(t,ls,{value:e}),t}(Me.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){wr(Me[Ue]),U("assert").equal(Me[Ue].length,0);}));var rh;global[Ue]||ih(global,Me[Ue]);Fa.exports=Ea(m_(Me));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Me.__patched&&(Fa.exports=Ea(Me),Me.__patched=!0);function Ea(e){h_(e),e.gracefulify=Ea,e.createReadStream=P,e.createWriteStream=J;var t=e.readFile;e.readFile=r;function r(L,ee,Z){return typeof ee=="function"&&(Z=ee,ee=null),q(L,ee,Z);function q(Y,V,I,W){return t(Y,V,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?rn([q,[Y,V,I],k,W||Date.now(),Date.now()]):typeof I=="function"&&I.apply(this,arguments);})}}var n=e.writeFile;e.writeFile=s;function s(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return n(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var o=e.appendFile;o&&(e.appendFile=u);function u(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return o(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var c=e.copyFile;c&&(e.copyFile=d);function d(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=0),Y(L,ee,Z,q);function Y(V,I,W,k,G){return c(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var g=e.readdir;e.readdir=D;var m=/^v[0-5]\./;function D(L,ee,Z){typeof ee=="function"&&(Z=ee,ee=null);var q=m.test(process.version)?function(I,W,k,G){return g(I,Y(I,W,k,G))}:function(I,W,k,G){return g(I,W,Y(I,W,k,G))};return q(L,ee,Z);function Y(V,I,W,k){return function(G,K){G&&(G.code==="EMFILE"||G.code==="ENFILE")?rn([q,[V,I,W],G,k||Date.now(),Date.now()]):(K&&K.sort&&K.sort(),typeof W=="function"&&W.call(this,G,K));}}}if(process.version.substr(0,4)==="v0.8"){var y=p_(e);$=y.ReadStream,w=y.WriteStream;}var F=e.ReadStream;F&&($.prototype=Object.create(F.prototype),$.prototype.open=x);var C=e.WriteStream;C&&(w.prototype=Object.create(C.prototype),w.prototype.open=M),Object.defineProperty(e,"ReadStream",{get:function(){return $},set:function(L){$=L;},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return w},set:function(L){w=L;},enumerable:!0,configurable:!0});var _=$;Object.defineProperty(e,"FileReadStream",{get:function(){return _},set:function(L){_=L;},enumerable:!0,configurable:!0});var j=w;Object.defineProperty(e,"FileWriteStream",{get:function(){return j},set:function(L){j=L;},enumerable:!0,configurable:!0});function $(L,ee){return this instanceof $?(F.apply(this,arguments),this):$.apply(Object.create($.prototype),arguments)}function x(){var L=this;te(L.path,L.flags,L.mode,function(ee,Z){ee?(L.autoClose&&L.destroy(),L.emit("error",ee)):(L.fd=Z,L.emit("open",Z),L.read());});}function w(L,ee){return this instanceof w?(C.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function M(){var L=this;te(L.path,L.flags,L.mode,function(ee,Z){ee?(L.destroy(),L.emit("error",ee)):(L.fd=Z,L.emit("open",Z));});}function P(L,ee){return new e.ReadStream(L,ee)}function J(L,ee){return new e.WriteStream(L,ee)}var X=e.open;e.open=te;function te(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return X(V,I,W,function(K,ye){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}return e}function rn(e){wr("ENQUEUE",e[0].name,e[1]),Me[Ue].push(e),_a();}var cs;function nh(){for(var e=Date.now(),t=0;t2&&(Me[Ue][t][3]=e,Me[Ue][t][4]=e);_a();}function _a(){if(clearTimeout(cs),cs=void 0,Me[Ue].length!==0){var e=Me[Ue].shift(),t=e[0],r=e[1],n=e[2],s=e[3],o=e[4];if(s===void 0)wr("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-s>=6e4){wr("TIMEOUT",t.name,r);var u=r.pop();typeof u=="function"&&u.call(null,n);}else {var c=Date.now()-o,d=Math.max(o-s,1),g=Math.min(d*1.2,100);c>=g?(wr("RETRY",t.name,r),t.apply(null,r.concat([s]))):Me[Ue].push(e);}cs===void 0&&(cs=setTimeout(_a,0));}}});var Sa=B(vr=>{var sh=Qe().fromCallback,pt=$e(),D_=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof pt[e]=="function");Object.keys(pt).forEach(e=>{e!=="promises"&&(vr[e]=pt[e]);});D_.forEach(e=>{vr[e]=sh(pt[e]);});vr.exists=function(e,t){return typeof t=="function"?pt.exists(e,t):new Promise(r=>pt.exists(e,r))};vr.read=function(e,t,r,n,s,o){return typeof o=="function"?pt.read(e,t,r,n,s,o):new Promise((u,c)=>{pt.read(e,t,r,n,s,(d,g,m)=>{if(d)return c(d);u({bytesRead:g,buffer:m});});})};vr.write=function(e,t,...r){return typeof r[r.length-1]=="function"?pt.write(e,t,...r):new Promise((n,s)=>{pt.write(e,t,...r,(o,u,c)=>{if(o)return s(o);n({bytesWritten:u,buffer:c});});})};typeof pt.realpath.native=="function"&&(vr.realpath.native=sh(pt.realpath.native));});var ba=B((HC,ah)=>{var Ca=U("path");function oh(e){return e=Ca.normalize(Ca.resolve(e)).split(Ca.sep),e.length>0?e[0]:null}var y_=/[<>:"|?*]/;function w_(e){let t=oh(e);return e=e.replace(t,""),y_.test(e)}ah.exports={getRootPath:oh,invalidWin32Path:w_};});var ch=B((VC,uh)=>{var v_=$e(),Oa=U("path"),E_=ba().invalidWin32Path,__=parseInt("0777",8);function xa(e,t,r,n){if(typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t}),process.platform==="win32"&&E_(e)){let u=new Error(e+" contains invalid WIN32 path characters.");return u.code="EINVAL",r(u)}let s=t.mode,o=t.fs||v_;s===void 0&&(s=__&~process.umask()),n||(n=null),r=r||function(){},e=Oa.resolve(e),o.mkdir(e,s,u=>{if(!u)return n=n||e,r(null,n);switch(u.code){case"ENOENT":if(Oa.dirname(e)===e)return r(u);xa(Oa.dirname(e),t,(c,d)=>{c?r(c,d):xa(e,t,r,d);});break;default:o.stat(e,(c,d)=>{c||!d.isDirectory()?r(u,n):r(null,n);});break}});}uh.exports=xa;});var fh=B((GC,lh)=>{var F_=$e(),Aa=U("path"),S_=ba().invalidWin32Path,C_=parseInt("0777",8);function Ma(e,t,r){(!t||typeof t!="object")&&(t={mode:t});let n=t.mode,s=t.fs||F_;if(process.platform==="win32"&&S_(e)){let o=new Error(e+" contains invalid WIN32 path characters.");throw o.code="EINVAL",o}n===void 0&&(n=C_&~process.umask()),r||(r=null),e=Aa.resolve(e);try{s.mkdirSync(e,n),r=r||e;}catch(o){if(o.code==="ENOENT"){if(Aa.dirname(e)===e)throw o;r=Ma(Aa.dirname(e),t,r),Ma(e,t,r);}else {let u;try{u=s.statSync(e);}catch{throw o}if(!u.isDirectory())throw o}}return r}lh.exports=Ma;});var st=B((JC,dh)=>{var b_=Qe().fromCallback,Ta=b_(ch()),ja=fh();dh.exports={mkdirs:Ta,mkdirsSync:ja,mkdirp:Ta,mkdirpSync:ja,ensureDir:Ta,ensureDirSync:ja};});var Ia=B((ZC,ph)=>{var Ve=$e(),hh=U("os"),fs=U("path");function O_(){let e=fs.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));e=fs.join(hh.tmpdir(),e);let t=new Date(1435410243862);Ve.writeFileSync(e,"https://github.com/jprichardson/node-fs-extra/pull/141");let r=Ve.openSync(e,"r+");return Ve.futimesSync(r,t,t),Ve.closeSync(r),Ve.statSync(e).mtime>1435410243e3}function x_(e){let t=fs.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));t=fs.join(hh.tmpdir(),t);let r=new Date(1435410243862);Ve.writeFile(t,"https://github.com/jprichardson/node-fs-extra/pull/141",n=>{if(n)return e(n);Ve.open(t,"r+",(s,o)=>{if(s)return e(s);Ve.futimes(o,r,r,u=>{if(u)return e(u);Ve.close(o,c=>{if(c)return e(c);Ve.stat(t,(d,g)=>{if(d)return e(d);e(null,g.mtime>1435410243e3);});});});});});}function A_(e){if(typeof e=="number")return Math.floor(e/1e3)*1e3;if(e instanceof Date)return new Date(Math.floor(e.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function M_(e,t,r,n){Ve.open(e,"r+",(s,o)=>{if(s)return n(s);Ve.futimes(o,t,r,u=>{Ve.close(o,c=>{n&&n(u||c);});});});}function T_(e,t,r){let n=Ve.openSync(e,"r+");return Ve.futimesSync(n,t,r),Ve.closeSync(n)}ph.exports={hasMillisRes:x_,hasMillisResSync:O_,timeRemoveMillis:A_,utimesMillis:M_,utimesMillisSync:T_};});var qn=B((KC,vh)=>{var mt=$e(),Xe=U("path"),mh=10,gh=5,j_=0,La=process.versions.node.split("."),Dh=Number.parseInt(La[0],10),yh=Number.parseInt(La[1],10),I_=Number.parseInt(La[2],10);function Rn(){if(Dh>mh)return !0;if(Dh===mh){if(yh>gh)return !0;if(yh===gh&&I_>=j_)return !0}return !1}function N_(e,t,r){Rn()?mt.stat(e,{bigint:!0},(n,s)=>{if(n)return r(n);mt.stat(t,{bigint:!0},(o,u)=>o?o.code==="ENOENT"?r(null,{srcStat:s,destStat:null}):r(o):r(null,{srcStat:s,destStat:u}));}):mt.stat(e,(n,s)=>{if(n)return r(n);mt.stat(t,(o,u)=>o?o.code==="ENOENT"?r(null,{srcStat:s,destStat:null}):r(o):r(null,{srcStat:s,destStat:u}));});}function L_(e,t){let r,n;Rn()?r=mt.statSync(e,{bigint:!0}):r=mt.statSync(e);try{Rn()?n=mt.statSync(t,{bigint:!0}):n=mt.statSync(t);}catch(s){if(s.code==="ENOENT")return {srcStat:r,destStat:null};throw s}return {srcStat:r,destStat:n}}function $_(e,t,r,n){N_(e,t,(s,o)=>{if(s)return n(s);let{srcStat:u,destStat:c}=o;return c&&c.ino&&c.dev&&c.ino===u.ino&&c.dev===u.dev?n(new Error("Source and destination must not be the same.")):u.isDirectory()&&$a(e,t)?n(new Error(Bn(e,t,r))):n(null,{srcStat:u,destStat:c})});}function k_(e,t,r){let{srcStat:n,destStat:s}=L_(e,t);if(s&&s.ino&&s.dev&&s.ino===n.ino&&s.dev===n.dev)throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&$a(e,t))throw new Error(Bn(e,t,r));return {srcStat:n,destStat:s}}function Na(e,t,r,n,s){let o=Xe.resolve(Xe.dirname(e)),u=Xe.resolve(Xe.dirname(r));if(u===o||u===Xe.parse(u).root)return s();Rn()?mt.stat(u,{bigint:!0},(c,d)=>c?c.code==="ENOENT"?s():s(c):d.ino&&d.dev&&d.ino===t.ino&&d.dev===t.dev?s(new Error(Bn(e,r,n))):Na(e,t,u,n,s)):mt.stat(u,(c,d)=>c?c.code==="ENOENT"?s():s(c):d.ino&&d.dev&&d.ino===t.ino&&d.dev===t.dev?s(new Error(Bn(e,r,n))):Na(e,t,u,n,s));}function wh(e,t,r,n){let s=Xe.resolve(Xe.dirname(e)),o=Xe.resolve(Xe.dirname(r));if(o===s||o===Xe.parse(o).root)return;let u;try{Rn()?u=mt.statSync(o,{bigint:!0}):u=mt.statSync(o);}catch(c){if(c.code==="ENOENT")return;throw c}if(u.ino&&u.dev&&u.ino===t.ino&&u.dev===t.dev)throw new Error(Bn(e,r,n));return wh(e,t,o,n)}function $a(e,t){let r=Xe.resolve(e).split(Xe.sep).filter(s=>s),n=Xe.resolve(t).split(Xe.sep).filter(s=>s);return r.reduce((s,o,u)=>s&&n[u]===o,!0)}function Bn(e,t,r){return `Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}vh.exports={checkPaths:$_,checkPathsSync:k_,checkParentPaths:Na,checkParentPathsSync:wh,isSrcSubdir:$a};});var _h=B((QC,Eh)=>{Eh.exports=function(e){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(e)}catch{return new Buffer(e)}return new Buffer(e)};});var Oh=B((XC,bh)=>{var xe=$e(),Yn=U("path"),P_=st().mkdirsSync,R_=Ia().utimesMillisSync,Wn=qn();function B_(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; +GFS4: `),console.error(e);});Me[Ue]||(rh=global[Ue]||[],ih(Me,rh),Me.close=function(e){function t(r,n){return e.call(Me,r,function(s){s||nh(),typeof n=="function"&&n.apply(this,arguments);})}return Object.defineProperty(t,ls,{value:e}),t}(Me.close),Me.closeSync=function(e){function t(r){e.apply(Me,arguments),nh();}return Object.defineProperty(t,ls,{value:e}),t}(Me.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){wr(Me[Ue]),U("assert").equal(Me[Ue].length,0);}));var rh;global[Ue]||ih(global,Me[Ue]);Fa.exports=Ea(m_(Me));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Me.__patched&&(Fa.exports=Ea(Me),Me.__patched=!0);function Ea(e){h_(e),e.gracefulify=Ea,e.createReadStream=P,e.createWriteStream=J;var t=e.readFile;e.readFile=r;function r(L,ee,Z){return typeof ee=="function"&&(Z=ee,ee=null),q(L,ee,Z);function q(Y,V,I,W){return t(Y,V,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?rn([q,[Y,V,I],k,W||Date.now(),Date.now()]):typeof I=="function"&&I.apply(this,arguments);})}}var n=e.writeFile;e.writeFile=s;function s(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return n(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var o=e.appendFile;o&&(e.appendFile=u);function u(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return o(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var c=e.copyFile;c&&(e.copyFile=d);function d(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=0),Y(L,ee,Z,q);function Y(V,I,W,k,G){return c(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var g=e.readdir;e.readdir=D;var m=/^v[0-5]\./;function D(L,ee,Z){typeof ee=="function"&&(Z=ee,ee=null);var q=m.test(process.version)?function(I,W,k,G){return g(I,Y(I,W,k,G))}:function(I,W,k,G){return g(I,W,Y(I,W,k,G))};return q(L,ee,Z);function Y(V,I,W,k){return function(G,K){G&&(G.code==="EMFILE"||G.code==="ENFILE")?rn([q,[V,I,W],G,k||Date.now(),Date.now()]):(K&&K.sort&&K.sort(),typeof W=="function"&&W.call(this,G,K));}}}if(process.version.substr(0,4)==="v0.8"){var y=p_(e);$=y.ReadStream,w=y.WriteStream;}var F=e.ReadStream;F&&($.prototype=Object.create(F.prototype),$.prototype.open=x);var C=e.WriteStream;C&&(w.prototype=Object.create(C.prototype),w.prototype.open=M),Object.defineProperty(e,"ReadStream",{get:function(){return $},set:function(L){$=L;},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return w},set:function(L){w=L;},enumerable:!0,configurable:!0});var _=$;Object.defineProperty(e,"FileReadStream",{get:function(){return _},set:function(L){_=L;},enumerable:!0,configurable:!0});var j=w;Object.defineProperty(e,"FileWriteStream",{get:function(){return j},set:function(L){j=L;},enumerable:!0,configurable:!0});function $(L,ee){return this instanceof $?(F.apply(this,arguments),this):$.apply(Object.create($.prototype),arguments)}function x(){var L=this;te(L.path,L.flags,L.mode,function(ee,Z){ee?(L.autoClose&&L.destroy(),L.emit("error",ee)):(L.fd=Z,L.emit("open",Z),L.read());});}function w(L,ee){return this instanceof w?(C.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function M(){var L=this;te(L.path,L.flags,L.mode,function(ee,Z){ee?(L.destroy(),L.emit("error",ee)):(L.fd=Z,L.emit("open",Z));});}function P(L,ee){return new e.ReadStream(L,ee)}function J(L,ee){return new e.WriteStream(L,ee)}var X=e.open;e.open=te;function te(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return X(V,I,W,function(K,ye){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}return e}function rn(e){wr("ENQUEUE",e[0].name,e[1]),Me[Ue].push(e),_a();}var cs;function nh(){for(var e=Date.now(),t=0;t2&&(Me[Ue][t][3]=e,Me[Ue][t][4]=e);_a();}function _a(){if(clearTimeout(cs),cs=void 0,Me[Ue].length!==0){var e=Me[Ue].shift(),t=e[0],r=e[1],n=e[2],s=e[3],o=e[4];if(s===void 0)wr("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-s>=6e4){wr("TIMEOUT",t.name,r);var u=r.pop();typeof u=="function"&&u.call(null,n);}else {var c=Date.now()-o,d=Math.max(o-s,1),g=Math.min(d*1.2,100);c>=g?(wr("RETRY",t.name,r),t.apply(null,r.concat([s]))):Me[Ue].push(e);}cs===void 0&&(cs=setTimeout(_a,0));}}});var Sa=B(vr=>{var sh=Qe().fromCallback,pt=$e(),D_=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof pt[e]=="function");Object.keys(pt).forEach(e=>{e!=="promises"&&(vr[e]=pt[e]);});D_.forEach(e=>{vr[e]=sh(pt[e]);});vr.exists=function(e,t){return typeof t=="function"?pt.exists(e,t):new Promise(r=>pt.exists(e,r))};vr.read=function(e,t,r,n,s,o){return typeof o=="function"?pt.read(e,t,r,n,s,o):new Promise((u,c)=>{pt.read(e,t,r,n,s,(d,g,m)=>{if(d)return c(d);u({bytesRead:g,buffer:m});});})};vr.write=function(e,t,...r){return typeof r[r.length-1]=="function"?pt.write(e,t,...r):new Promise((n,s)=>{pt.write(e,t,...r,(o,u,c)=>{if(o)return s(o);n({bytesWritten:u,buffer:c});});})};typeof pt.realpath.native=="function"&&(vr.realpath.native=sh(pt.realpath.native));});var Oa=B((HC,ah)=>{var Ca=U("path");function oh(e){return e=Ca.normalize(Ca.resolve(e)).split(Ca.sep),e.length>0?e[0]:null}var y_=/[<>:"|?*]/;function w_(e){let t=oh(e);return e=e.replace(t,""),y_.test(e)}ah.exports={getRootPath:oh,invalidWin32Path:w_};});var ch=B((VC,uh)=>{var v_=$e(),ba=U("path"),E_=Oa().invalidWin32Path,__=parseInt("0777",8);function xa(e,t,r,n){if(typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t}),process.platform==="win32"&&E_(e)){let u=new Error(e+" contains invalid WIN32 path characters.");return u.code="EINVAL",r(u)}let s=t.mode,o=t.fs||v_;s===void 0&&(s=__&~process.umask()),n||(n=null),r=r||function(){},e=ba.resolve(e),o.mkdir(e,s,u=>{if(!u)return n=n||e,r(null,n);switch(u.code){case"ENOENT":if(ba.dirname(e)===e)return r(u);xa(ba.dirname(e),t,(c,d)=>{c?r(c,d):xa(e,t,r,d);});break;default:o.stat(e,(c,d)=>{c||!d.isDirectory()?r(u,n):r(null,n);});break}});}uh.exports=xa;});var fh=B((GC,lh)=>{var F_=$e(),Aa=U("path"),S_=Oa().invalidWin32Path,C_=parseInt("0777",8);function Ma(e,t,r){(!t||typeof t!="object")&&(t={mode:t});let n=t.mode,s=t.fs||F_;if(process.platform==="win32"&&S_(e)){let o=new Error(e+" contains invalid WIN32 path characters.");throw o.code="EINVAL",o}n===void 0&&(n=C_&~process.umask()),r||(r=null),e=Aa.resolve(e);try{s.mkdirSync(e,n),r=r||e;}catch(o){if(o.code==="ENOENT"){if(Aa.dirname(e)===e)throw o;r=Ma(Aa.dirname(e),t,r),Ma(e,t,r);}else {let u;try{u=s.statSync(e);}catch{throw o}if(!u.isDirectory())throw o}}return r}lh.exports=Ma;});var st=B((JC,dh)=>{var O_=Qe().fromCallback,Ta=O_(ch()),ja=fh();dh.exports={mkdirs:Ta,mkdirsSync:ja,mkdirp:Ta,mkdirpSync:ja,ensureDir:Ta,ensureDirSync:ja};});var Ia=B((ZC,ph)=>{var Ve=$e(),hh=U("os"),fs=U("path");function b_(){let e=fs.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));e=fs.join(hh.tmpdir(),e);let t=new Date(1435410243862);Ve.writeFileSync(e,"https://github.com/jprichardson/node-fs-extra/pull/141");let r=Ve.openSync(e,"r+");return Ve.futimesSync(r,t,t),Ve.closeSync(r),Ve.statSync(e).mtime>1435410243e3}function x_(e){let t=fs.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));t=fs.join(hh.tmpdir(),t);let r=new Date(1435410243862);Ve.writeFile(t,"https://github.com/jprichardson/node-fs-extra/pull/141",n=>{if(n)return e(n);Ve.open(t,"r+",(s,o)=>{if(s)return e(s);Ve.futimes(o,r,r,u=>{if(u)return e(u);Ve.close(o,c=>{if(c)return e(c);Ve.stat(t,(d,g)=>{if(d)return e(d);e(null,g.mtime>1435410243e3);});});});});});}function A_(e){if(typeof e=="number")return Math.floor(e/1e3)*1e3;if(e instanceof Date)return new Date(Math.floor(e.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function M_(e,t,r,n){Ve.open(e,"r+",(s,o)=>{if(s)return n(s);Ve.futimes(o,t,r,u=>{Ve.close(o,c=>{n&&n(u||c);});});});}function T_(e,t,r){let n=Ve.openSync(e,"r+");return Ve.futimesSync(n,t,r),Ve.closeSync(n)}ph.exports={hasMillisRes:x_,hasMillisResSync:b_,timeRemoveMillis:A_,utimesMillis:M_,utimesMillisSync:T_};});var qn=B((KC,vh)=>{var mt=$e(),Xe=U("path"),mh=10,gh=5,j_=0,La=process.versions.node.split("."),Dh=Number.parseInt(La[0],10),yh=Number.parseInt(La[1],10),I_=Number.parseInt(La[2],10);function Rn(){if(Dh>mh)return !0;if(Dh===mh){if(yh>gh)return !0;if(yh===gh&&I_>=j_)return !0}return !1}function N_(e,t,r){Rn()?mt.stat(e,{bigint:!0},(n,s)=>{if(n)return r(n);mt.stat(t,{bigint:!0},(o,u)=>o?o.code==="ENOENT"?r(null,{srcStat:s,destStat:null}):r(o):r(null,{srcStat:s,destStat:u}));}):mt.stat(e,(n,s)=>{if(n)return r(n);mt.stat(t,(o,u)=>o?o.code==="ENOENT"?r(null,{srcStat:s,destStat:null}):r(o):r(null,{srcStat:s,destStat:u}));});}function L_(e,t){let r,n;Rn()?r=mt.statSync(e,{bigint:!0}):r=mt.statSync(e);try{Rn()?n=mt.statSync(t,{bigint:!0}):n=mt.statSync(t);}catch(s){if(s.code==="ENOENT")return {srcStat:r,destStat:null};throw s}return {srcStat:r,destStat:n}}function $_(e,t,r,n){N_(e,t,(s,o)=>{if(s)return n(s);let{srcStat:u,destStat:c}=o;return c&&c.ino&&c.dev&&c.ino===u.ino&&c.dev===u.dev?n(new Error("Source and destination must not be the same.")):u.isDirectory()&&$a(e,t)?n(new Error(Bn(e,t,r))):n(null,{srcStat:u,destStat:c})});}function k_(e,t,r){let{srcStat:n,destStat:s}=L_(e,t);if(s&&s.ino&&s.dev&&s.ino===n.ino&&s.dev===n.dev)throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&$a(e,t))throw new Error(Bn(e,t,r));return {srcStat:n,destStat:s}}function Na(e,t,r,n,s){let o=Xe.resolve(Xe.dirname(e)),u=Xe.resolve(Xe.dirname(r));if(u===o||u===Xe.parse(u).root)return s();Rn()?mt.stat(u,{bigint:!0},(c,d)=>c?c.code==="ENOENT"?s():s(c):d.ino&&d.dev&&d.ino===t.ino&&d.dev===t.dev?s(new Error(Bn(e,r,n))):Na(e,t,u,n,s)):mt.stat(u,(c,d)=>c?c.code==="ENOENT"?s():s(c):d.ino&&d.dev&&d.ino===t.ino&&d.dev===t.dev?s(new Error(Bn(e,r,n))):Na(e,t,u,n,s));}function wh(e,t,r,n){let s=Xe.resolve(Xe.dirname(e)),o=Xe.resolve(Xe.dirname(r));if(o===s||o===Xe.parse(o).root)return;let u;try{Rn()?u=mt.statSync(o,{bigint:!0}):u=mt.statSync(o);}catch(c){if(c.code==="ENOENT")return;throw c}if(u.ino&&u.dev&&u.ino===t.ino&&u.dev===t.dev)throw new Error(Bn(e,r,n));return wh(e,t,o,n)}function $a(e,t){let r=Xe.resolve(e).split(Xe.sep).filter(s=>s),n=Xe.resolve(t).split(Xe.sep).filter(s=>s);return r.reduce((s,o,u)=>s&&n[u]===o,!0)}function Bn(e,t,r){return `Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}vh.exports={checkPaths:$_,checkPathsSync:k_,checkParentPaths:Na,checkParentPathsSync:wh,isSrcSubdir:$a};});var _h=B((QC,Eh)=>{Eh.exports=function(e){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(e)}catch{return new Buffer(e)}return new Buffer(e)};});var bh=B((XC,Oh)=>{var xe=$e(),Yn=U("path"),P_=st().mkdirsSync,R_=Ia().utimesMillisSync,Wn=qn();function B_(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; - see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:s}=Wn.checkPathsSync(e,t,"copy");return Wn.checkParentPathsSync(e,n,t,"copy"),q_(s,e,t,r)}function q_(e,t,r,n){if(n.filter&&!n.filter(t,r))return;let s=Yn.dirname(r);return xe.existsSync(s)||P_(s),Fh(e,t,r,n)}function Fh(e,t,r,n){if(!(n.filter&&!n.filter(t,r)))return Y_(e,t,r,n)}function Y_(e,t,r,n){let o=(n.dereference?xe.statSync:xe.lstatSync)(t);if(o.isDirectory())return H_(o,e,t,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return W_(o,e,t,r,n);if(o.isSymbolicLink())return J_(e,t,r,n)}function W_(e,t,r,n,s){return t?U_(e,r,n,s):Sh(e,r,n,s)}function U_(e,t,r,n){if(n.overwrite)return xe.unlinkSync(r),Sh(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Sh(e,t,r,n){return typeof xe.copyFileSync=="function"?(xe.copyFileSync(t,r),xe.chmodSync(r,e.mode),n.preserveTimestamps?R_(r,e.atime,e.mtime):void 0):z_(e,t,r,n)}function z_(e,t,r,n){let o=_h()(65536),u=xe.openSync(t,"r"),c=xe.openSync(r,"w",e.mode),d=0;for(;dG_(n,e,t,r));}function G_(e,t,r,n){let s=Yn.join(t,e),o=Yn.join(r,e),{destStat:u}=Wn.checkPathsSync(s,o,"copy");return Fh(u,s,o,n)}function J_(e,t,r,n){let s=xe.readlinkSync(t);if(n.dereference&&(s=Yn.resolve(process.cwd(),s)),e){let o;try{o=xe.readlinkSync(r);}catch(u){if(u.code==="EINVAL"||u.code==="UNKNOWN")return xe.symlinkSync(s,r);throw u}if(n.dereference&&(o=Yn.resolve(process.cwd(),o)),Wn.isSrcSubdir(s,o))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${o}'.`);if(xe.statSync(r).isDirectory()&&Wn.isSrcSubdir(o,s))throw new Error(`Cannot overwrite '${o}' with '${s}'.`);return Z_(s,r)}else return xe.symlinkSync(s,r)}function Z_(e,t){return xe.unlinkSync(t),xe.symlinkSync(e,t)}bh.exports=B_;});var ka=B((eb,xh)=>{xh.exports={copySync:Oh()};});var xt=B((tb,Mh)=>{var K_=Qe().fromPromise,Ah=Sa();function Q_(e){return Ah.access(e).then(()=>!0).catch(()=>!1)}Mh.exports={pathExists:K_(Q_),pathExistsSync:Ah.existsSync};});var Rh=B((rb,Ph)=>{var ze=$e(),Un=U("path"),X_=st().mkdirs,eF=xt().pathExists,tF=Ia().utimesMillis,zn=qn();function rF(e,t,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; + see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:s}=Wn.checkPathsSync(e,t,"copy");return Wn.checkParentPathsSync(e,n,t,"copy"),q_(s,e,t,r)}function q_(e,t,r,n){if(n.filter&&!n.filter(t,r))return;let s=Yn.dirname(r);return xe.existsSync(s)||P_(s),Fh(e,t,r,n)}function Fh(e,t,r,n){if(!(n.filter&&!n.filter(t,r)))return Y_(e,t,r,n)}function Y_(e,t,r,n){let o=(n.dereference?xe.statSync:xe.lstatSync)(t);if(o.isDirectory())return H_(o,e,t,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return W_(o,e,t,r,n);if(o.isSymbolicLink())return J_(e,t,r,n)}function W_(e,t,r,n,s){return t?U_(e,r,n,s):Sh(e,r,n,s)}function U_(e,t,r,n){if(n.overwrite)return xe.unlinkSync(r),Sh(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Sh(e,t,r,n){return typeof xe.copyFileSync=="function"?(xe.copyFileSync(t,r),xe.chmodSync(r,e.mode),n.preserveTimestamps?R_(r,e.atime,e.mtime):void 0):z_(e,t,r,n)}function z_(e,t,r,n){let o=_h()(65536),u=xe.openSync(t,"r"),c=xe.openSync(r,"w",e.mode),d=0;for(;dG_(n,e,t,r));}function G_(e,t,r,n){let s=Yn.join(t,e),o=Yn.join(r,e),{destStat:u}=Wn.checkPathsSync(s,o,"copy");return Fh(u,s,o,n)}function J_(e,t,r,n){let s=xe.readlinkSync(t);if(n.dereference&&(s=Yn.resolve(process.cwd(),s)),e){let o;try{o=xe.readlinkSync(r);}catch(u){if(u.code==="EINVAL"||u.code==="UNKNOWN")return xe.symlinkSync(s,r);throw u}if(n.dereference&&(o=Yn.resolve(process.cwd(),o)),Wn.isSrcSubdir(s,o))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${o}'.`);if(xe.statSync(r).isDirectory()&&Wn.isSrcSubdir(o,s))throw new Error(`Cannot overwrite '${o}' with '${s}'.`);return Z_(s,r)}else return xe.symlinkSync(s,r)}function Z_(e,t){return xe.unlinkSync(t),xe.symlinkSync(e,t)}Oh.exports=B_;});var ka=B((eO,xh)=>{xh.exports={copySync:bh()};});var xt=B((tO,Mh)=>{var K_=Qe().fromPromise,Ah=Sa();function Q_(e){return Ah.access(e).then(()=>!0).catch(()=>!1)}Mh.exports={pathExists:K_(Q_),pathExistsSync:Ah.existsSync};});var Rh=B((rO,Ph)=>{var ze=$e(),Un=U("path"),X_=st().mkdirs,eF=xt().pathExists,tF=Ia().utimesMillis,zn=qn();function rF(e,t,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; - see https://github.com/jprichardson/node-fs-extra/issues/269`),zn.checkPaths(e,t,"copy",(s,o)=>{if(s)return n(s);let{srcStat:u,destStat:c}=o;zn.checkParentPaths(e,u,t,"copy",d=>d?n(d):r.filter?Ih(Th,c,e,t,r,n):Th(c,e,t,r,n));});}function Th(e,t,r,n,s){let o=Un.dirname(r);eF(o,(u,c)=>{if(u)return s(u);if(c)return Pa(e,t,r,n,s);X_(o,d=>d?s(d):Pa(e,t,r,n,s));});}function Ih(e,t,r,n,s,o){Promise.resolve(s.filter(r,n)).then(u=>u?e(t,r,n,s,o):o(),u=>o(u));}function Pa(e,t,r,n,s){return n.filter?Ih(jh,e,t,r,n,s):jh(e,t,r,n,s)}function jh(e,t,r,n,s){(n.dereference?ze.stat:ze.lstat)(t,(u,c)=>{if(u)return s(u);if(c.isDirectory())return oF(c,e,t,r,n,s);if(c.isFile()||c.isCharacterDevice()||c.isBlockDevice())return nF(c,e,t,r,n,s);if(c.isSymbolicLink())return cF(e,t,r,n,s)});}function nF(e,t,r,n,s,o){return t?iF(e,r,n,s,o):Nh(e,r,n,s,o)}function iF(e,t,r,n,s){if(n.overwrite)ze.unlink(r,o=>o?s(o):Nh(e,t,r,n,s));else return n.errorOnExist?s(new Error(`'${r}' already exists`)):s()}function Nh(e,t,r,n,s){return typeof ze.copyFile=="function"?ze.copyFile(t,r,o=>o?s(o):Lh(e,r,n,s)):sF(e,t,r,n,s)}function sF(e,t,r,n,s){let o=ze.createReadStream(t);o.on("error",u=>s(u)).once("open",()=>{let u=ze.createWriteStream(r,{mode:e.mode});u.on("error",c=>s(c)).on("open",()=>o.pipe(u)).once("close",()=>Lh(e,r,n,s));});}function Lh(e,t,r,n){ze.chmod(t,e.mode,s=>s?n(s):r.preserveTimestamps?tF(t,e.atime,e.mtime,n):n());}function oF(e,t,r,n,s,o){return t?t&&!t.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):$h(r,n,s,o):aF(e,r,n,s,o)}function aF(e,t,r,n,s){ze.mkdir(r,o=>{if(o)return s(o);$h(t,r,n,u=>u?s(u):ze.chmod(r,e.mode,s));});}function $h(e,t,r,n){ze.readdir(e,(s,o)=>s?n(s):kh(o,e,t,r,n));}function kh(e,t,r,n,s){let o=e.pop();return o?uF(e,o,t,r,n,s):s()}function uF(e,t,r,n,s,o){let u=Un.join(r,t),c=Un.join(n,t);zn.checkPaths(u,c,"copy",(d,g)=>{if(d)return o(d);let{destStat:m}=g;Pa(m,u,c,s,D=>D?o(D):kh(e,r,n,s,o));});}function cF(e,t,r,n,s){ze.readlink(t,(o,u)=>{if(o)return s(o);if(n.dereference&&(u=Un.resolve(process.cwd(),u)),e)ze.readlink(r,(c,d)=>c?c.code==="EINVAL"||c.code==="UNKNOWN"?ze.symlink(u,r,s):s(c):(n.dereference&&(d=Un.resolve(process.cwd(),d)),zn.isSrcSubdir(u,d)?s(new Error(`Cannot copy '${u}' to a subdirectory of itself, '${d}'.`)):e.isDirectory()&&zn.isSrcSubdir(d,u)?s(new Error(`Cannot overwrite '${d}' with '${u}'.`)):lF(u,r,s)));else return ze.symlink(u,r,s)});}function lF(e,t,r){ze.unlink(t,n=>n?r(n):ze.symlink(e,t,r));}Ph.exports=rF;});var Ra=B((nb,Bh)=>{var fF=Qe().fromCallback;Bh.exports={copy:fF(Rh())};});var Jh=B((ib,Gh)=>{var qh=$e(),zh=U("path"),_e=U("assert"),Hn=process.platform==="win32";function Hh(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{e[r]=e[r]||qh[r],r=r+"Sync",e[r]=e[r]||qh[r];}),e.maxBusyTries=e.maxBusyTries||3;}function Ba(e,t,r){let n=0;typeof t=="function"&&(r=t,t={}),_e(e,"rimraf: missing path"),_e.strictEqual(typeof e,"string","rimraf: path should be a string"),_e.strictEqual(typeof r,"function","rimraf: callback function required"),_e(t,"rimraf: invalid options argument provided"),_e.strictEqual(typeof t,"object","rimraf: options should be object"),Hh(t),Yh(e,t,function s(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&nYh(e,t,s),u)}o.code==="ENOENT"&&(o=null);}r(o);});}function Yh(e,t,r){_e(e),_e(t),_e(typeof r=="function"),t.lstat(e,(n,s)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&Hn)return Wh(e,t,n,r);if(s&&s.isDirectory())return ds(e,t,n,r);t.unlink(e,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return Hn?Wh(e,t,o,r):ds(e,t,o,r);if(o.code==="EISDIR")return ds(e,t,o,r)}return r(o)});});}function Wh(e,t,r,n){_e(e),_e(t),_e(typeof n=="function"),r&&_e(r instanceof Error),t.chmod(e,438,s=>{s?n(s.code==="ENOENT"?null:r):t.stat(e,(o,u)=>{o?n(o.code==="ENOENT"?null:r):u.isDirectory()?ds(e,t,r,n):t.unlink(e,n);});});}function Uh(e,t,r){let n;_e(e),_e(t),r&&_e(r instanceof Error);try{t.chmodSync(e,438);}catch(s){if(s.code==="ENOENT")return;throw r}try{n=t.statSync(e);}catch(s){if(s.code==="ENOENT")return;throw r}n.isDirectory()?hs(e,t,r):t.unlinkSync(e);}function ds(e,t,r,n){_e(e),_e(t),r&&_e(r instanceof Error),_e(typeof n=="function"),t.rmdir(e,s=>{s&&(s.code==="ENOTEMPTY"||s.code==="EEXIST"||s.code==="EPERM")?dF(e,t,n):s&&s.code==="ENOTDIR"?n(r):n(s);});}function dF(e,t,r){_e(e),_e(t),_e(typeof r=="function"),t.readdir(e,(n,s)=>{if(n)return r(n);let o=s.length,u;if(o===0)return t.rmdir(e,r);s.forEach(c=>{Ba(zh.join(e,c),t,d=>{if(!u){if(d)return r(u=d);--o===0&&t.rmdir(e,r);}});});});}function Vh(e,t){let r;t=t||{},Hh(t),_e(e,"rimraf: missing path"),_e.strictEqual(typeof e,"string","rimraf: path should be a string"),_e(t,"rimraf: missing options"),_e.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e);}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&Hn&&Uh(e,t,n);}try{r&&r.isDirectory()?hs(e,t,null):t.unlinkSync(e);}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return Hn?Uh(e,t,n):hs(e,t,n);if(n.code!=="EISDIR")throw n;hs(e,t,n);}}function hs(e,t,r){_e(e),_e(t),r&&_e(r instanceof Error);try{t.rmdirSync(e);}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")hF(e,t);else if(n.code!=="ENOENT")throw n}}function hF(e,t){if(_e(e),_e(t),t.readdirSync(e).forEach(r=>Vh(zh.join(e,r),t)),Hn){let r=Date.now();do try{return t.rmdirSync(e,t)}catch{}while(Date.now()-r<500)}else return t.rmdirSync(e,t)}Gh.exports=Ba;Ba.sync=Vh;});var Vn=B((sb,Kh)=>{var pF=Qe().fromCallback,Zh=Jh();Kh.exports={remove:pF(Zh),removeSync:Zh.sync};});var sp=B((ob,ip)=>{var mF=Qe().fromCallback,ep=$e(),tp=U("path"),rp=st(),np=Vn(),Qh=mF(function(t,r){r=r||function(){},ep.readdir(t,(n,s)=>{if(n)return rp.mkdirs(t,r);s=s.map(u=>tp.join(t,u)),o();function o(){let u=s.pop();if(!u)return r();np.remove(u,c=>{if(c)return r(c);o();});}});});function Xh(e){let t;try{t=ep.readdirSync(e);}catch{return rp.mkdirsSync(e)}t.forEach(r=>{r=tp.join(e,r),np.removeSync(r);});}ip.exports={emptyDirSync:Xh,emptydirSync:Xh,emptyDir:Qh,emptydir:Qh};});var cp=B((ab,up)=>{var gF=Qe().fromCallback,op=U("path"),Gn=$e(),ap=st(),DF=xt().pathExists;function yF(e,t){function r(){Gn.writeFile(e,"",n=>{if(n)return t(n);t();});}Gn.stat(e,(n,s)=>{if(!n&&s.isFile())return t();let o=op.dirname(e);DF(o,(u,c)=>{if(u)return t(u);if(c)return r();ap.mkdirs(o,d=>{if(d)return t(d);r();});});});}function wF(e){let t;try{t=Gn.statSync(e);}catch{}if(t&&t.isFile())return;let r=op.dirname(e);Gn.existsSync(r)||ap.mkdirsSync(r),Gn.writeFileSync(e,"");}up.exports={createFile:gF(yF),createFileSync:wF};});var pp=B((ub,hp)=>{var vF=Qe().fromCallback,fp=U("path"),Er=$e(),dp=st(),lp=xt().pathExists;function EF(e,t,r){function n(s,o){Er.link(s,o,u=>{if(u)return r(u);r(null);});}lp(t,(s,o)=>{if(s)return r(s);if(o)return r(null);Er.lstat(e,u=>{if(u)return u.message=u.message.replace("lstat","ensureLink"),r(u);let c=fp.dirname(t);lp(c,(d,g)=>{if(d)return r(d);if(g)return n(e,t);dp.mkdirs(c,m=>{if(m)return r(m);n(e,t);});});});});}function _F(e,t){if(Er.existsSync(t))return;try{Er.lstatSync(e);}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=fp.dirname(t);return Er.existsSync(n)||dp.mkdirsSync(n),Er.linkSync(e,t)}hp.exports={createLink:vF(EF),createLinkSync:_F};});var gp=B((cb,mp)=>{var or=U("path"),Jn=$e(),FF=xt().pathExists;function SF(e,t,r){if(or.isAbsolute(e))return Jn.lstat(e,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:e,toDst:e}));{let n=or.dirname(t),s=or.join(n,e);return FF(s,(o,u)=>o?r(o):u?r(null,{toCwd:s,toDst:e}):Jn.lstat(e,c=>c?(c.message=c.message.replace("lstat","ensureSymlink"),r(c)):r(null,{toCwd:e,toDst:or.relative(n,e)})))}}function CF(e,t){let r;if(or.isAbsolute(e)){if(r=Jn.existsSync(e),!r)throw new Error("absolute srcpath does not exist");return {toCwd:e,toDst:e}}else {let n=or.dirname(t),s=or.join(n,e);if(r=Jn.existsSync(s),r)return {toCwd:s,toDst:e};if(r=Jn.existsSync(e),!r)throw new Error("relative srcpath does not exist");return {toCwd:e,toDst:or.relative(n,e)}}}mp.exports={symlinkPaths:SF,symlinkPathsSync:CF};});var wp=B((lb,yp)=>{var Dp=$e();function bF(e,t,r){if(r=typeof t=="function"?t:r,t=typeof t=="function"?!1:t,t)return r(null,t);Dp.lstat(e,(n,s)=>{if(n)return r(null,"file");t=s&&s.isDirectory()?"dir":"file",r(null,t);});}function OF(e,t){let r;if(t)return t;try{r=Dp.lstatSync(e);}catch{return "file"}return r&&r.isDirectory()?"dir":"file"}yp.exports={symlinkType:bF,symlinkTypeSync:OF};});var bp=B((fb,Cp)=>{var xF=Qe().fromCallback,Ep=U("path"),nn=$e(),_p=st(),AF=_p.mkdirs,MF=_p.mkdirsSync,Fp=gp(),TF=Fp.symlinkPaths,jF=Fp.symlinkPathsSync,Sp=wp(),IF=Sp.symlinkType,NF=Sp.symlinkTypeSync,vp=xt().pathExists;function LF(e,t,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,vp(t,(s,o)=>{if(s)return n(s);if(o)return n(null);TF(e,t,(u,c)=>{if(u)return n(u);e=c.toDst,IF(c.toCwd,r,(d,g)=>{if(d)return n(d);let m=Ep.dirname(t);vp(m,(D,y)=>{if(D)return n(D);if(y)return nn.symlink(e,t,g,n);AF(m,F=>{if(F)return n(F);nn.symlink(e,t,g,n);});});});});});}function $F(e,t,r){if(nn.existsSync(t))return;let s=jF(e,t);e=s.toDst,r=NF(s.toCwd,r);let o=Ep.dirname(t);return nn.existsSync(o)||MF(o),nn.symlinkSync(e,t,r)}Cp.exports={createSymlink:xF(LF),createSymlinkSync:$F};});var xp=B((db,Op)=>{var ps=cp(),ms=pp(),gs=bp();Op.exports={createFile:ps.createFile,createFileSync:ps.createFileSync,ensureFile:ps.createFile,ensureFileSync:ps.createFileSync,createLink:ms.createLink,createLinkSync:ms.createLinkSync,ensureLink:ms.createLink,ensureLinkSync:ms.createLinkSync,createSymlink:gs.createSymlink,createSymlinkSync:gs.createSymlinkSync,ensureSymlink:gs.createSymlink,ensureSymlinkSync:gs.createSymlinkSync};});var jp=B((hb,Tp)=>{var sn;try{sn=$e();}catch{sn=U("fs");}function kF(e,t,r){r==null&&(r=t,t={}),typeof t=="string"&&(t={encoding:t}),t=t||{};var n=t.fs||sn,s=!0;"throws"in t&&(s=t.throws),n.readFile(e,t,function(o,u){if(o)return r(o);u=Mp(u);var c;try{c=JSON.parse(u,t?t.reviver:null);}catch(d){return s?(d.message=e+": "+d.message,r(d)):r(null,null)}r(null,c);});}function PF(e,t){t=t||{},typeof t=="string"&&(t={encoding:t});var r=t.fs||sn,n=!0;"throws"in t&&(n=t.throws);try{var s=r.readFileSync(e,t);return s=Mp(s),JSON.parse(s,t.reviver)}catch(o){if(n)throw o.message=e+": "+o.message,o;return null}}function Ap(e,t){var r,n=` -`;typeof t=="object"&&t!==null&&(t.spaces&&(r=t.spaces),t.EOL&&(n=t.EOL));var s=JSON.stringify(e,t?t.replacer:null,r);return s.replace(/\n/g,n)+n}function RF(e,t,r,n){n==null&&(n=r,r={}),r=r||{};var s=r.fs||sn,o="";try{o=Ap(t,r);}catch(u){n&&n(u,null);return}s.writeFile(e,o,r,n);}function BF(e,t,r){r=r||{};var n=r.fs||sn,s=Ap(t,r);return n.writeFileSync(e,s,r)}function Mp(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e=e.replace(/^\uFEFF/,""),e}var qF={readFile:kF,readFileSync:PF,writeFile:RF,writeFileSync:BF};Tp.exports=qF;});var ys=B((pb,Np)=>{var Ip=Qe().fromCallback,Ds=jp();Np.exports={readJson:Ip(Ds.readFile),readJsonSync:Ds.readFileSync,writeJson:Ip(Ds.writeFile),writeJsonSync:Ds.writeFileSync};});var kp=B((mb,$p)=>{var YF=U("path"),WF=st(),UF=xt().pathExists,Lp=ys();function zF(e,t,r,n){typeof r=="function"&&(n=r,r={});let s=YF.dirname(e);UF(s,(o,u)=>{if(o)return n(o);if(u)return Lp.writeJson(e,t,r,n);WF.mkdirs(s,c=>{if(c)return n(c);Lp.writeJson(e,t,r,n);});});}$p.exports=zF;});var Rp=B((gb,Pp)=>{var HF=$e(),VF=U("path"),GF=st(),JF=ys();function ZF(e,t,r){let n=VF.dirname(e);HF.existsSync(n)||GF.mkdirsSync(n),JF.writeJsonSync(e,t,r);}Pp.exports=ZF;});var qp=B((Db,Bp)=>{var KF=Qe().fromCallback,Ze=ys();Ze.outputJson=KF(kp());Ze.outputJsonSync=Rp();Ze.outputJSON=Ze.outputJson;Ze.outputJSONSync=Ze.outputJsonSync;Ze.writeJSON=Ze.writeJson;Ze.writeJSONSync=Ze.writeJsonSync;Ze.readJSON=Ze.readJson;Ze.readJSONSync=Ze.readJsonSync;Bp.exports=Ze;});var Vp=B((yb,Hp)=>{var Up=$e(),QF=U("path"),XF=ka().copySync,zp=Vn().removeSync,eS=st().mkdirpSync,Yp=qn();function tS(e,t,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:s}=Yp.checkPathsSync(e,t,"move");return Yp.checkParentPathsSync(e,s,t,"move"),eS(QF.dirname(t)),rS(e,t,n)}function rS(e,t,r){if(r)return zp(t),Wp(e,t,r);if(Up.existsSync(t))throw new Error("dest already exists.");return Wp(e,t,r)}function Wp(e,t,r){try{Up.renameSync(e,t);}catch(n){if(n.code!=="EXDEV")throw n;return nS(e,t,r)}}function nS(e,t,r){return XF(e,t,{overwrite:r,errorOnExist:!0}),zp(e)}Hp.exports=tS;});var Jp=B((wb,Gp)=>{Gp.exports={moveSync:Vp()};});var em=B((vb,Xp)=>{var iS=$e(),sS=U("path"),oS=Ra().copy,Qp=Vn().remove,aS=st().mkdirp,uS=xt().pathExists,Zp=qn();function cS(e,t,r,n){typeof r=="function"&&(n=r,r={});let s=r.overwrite||r.clobber||!1;Zp.checkPaths(e,t,"move",(o,u)=>{if(o)return n(o);let{srcStat:c}=u;Zp.checkParentPaths(e,c,t,"move",d=>{if(d)return n(d);aS(sS.dirname(t),g=>g?n(g):lS(e,t,s,n));});});}function lS(e,t,r,n){if(r)return Qp(t,s=>s?n(s):Kp(e,t,r,n));uS(t,(s,o)=>s?n(s):o?n(new Error("dest already exists.")):Kp(e,t,r,n));}function Kp(e,t,r,n){iS.rename(e,t,s=>s?s.code!=="EXDEV"?n(s):fS(e,t,r,n):n());}function fS(e,t,r,n){oS(e,t,{overwrite:r,errorOnExist:!0},o=>o?n(o):Qp(e,n));}Xp.exports=cS;});var rm=B((Eb,tm)=>{var dS=Qe().fromCallback;tm.exports={move:dS(em())};});var om=B((_b,sm)=>{var hS=Qe().fromCallback,Zn=$e(),nm=U("path"),im=st(),pS=xt().pathExists;function mS(e,t,r,n){typeof r=="function"&&(n=r,r="utf8");let s=nm.dirname(e);pS(s,(o,u)=>{if(o)return n(o);if(u)return Zn.writeFile(e,t,r,n);im.mkdirs(s,c=>{if(c)return n(c);Zn.writeFile(e,t,r,n);});});}function gS(e,...t){let r=nm.dirname(e);if(Zn.existsSync(r))return Zn.writeFileSync(e,...t);im.mkdirsSync(r),Zn.writeFileSync(e,...t);}sm.exports={outputFile:hS(mS),outputFileSync:gS};});var Ya=B((Fb,qa)=>{qa.exports=Object.assign({},Sa(),ka(),Ra(),sp(),xp(),qp(),st(),Jp(),rm(),om(),xt(),Vn());var am=U("fs");Object.getOwnPropertyDescriptor(am,"promises")&&Object.defineProperty(qa.exports,"promises",{get(){return am.promises}});});var cm=B((Sb,um)=>{um.exports=()=>new Date;});var fm=B((Cb,lm)=>{var DS=qe()("streamroller:fileNameFormatter"),yS=U("path"),wS=".gz",vS=".";lm.exports=({file:e,keepFileExt:t,needsIndex:r,alwaysIncludeDate:n,compress:s,fileNameSep:o})=>{let u=o||vS,c=yS.join(e.dir,e.name),d=F=>F+e.ext,g=(F,C,_)=>(r||!_)&&C?F+u+C:F,m=(F,C,_)=>(C>0||n)&&_?F+u+_:F,D=(F,C)=>C&&s?F+wS:F,y=t?[m,g,d,D]:[d,m,g,D];return ({date:F,index:C})=>(DS(`_formatFileName: date=${F}, index=${C}`),y.reduce((_,j)=>j(_,C,F),c))};});var mm=B((bb,pm)=>{var _r=qe()("streamroller:fileNameParser"),dm=".gz",hm=rs(),ES=".";pm.exports=({file:e,keepFileExt:t,pattern:r,fileNameSep:n})=>{let s=n||ES,o=(y,F)=>y.endsWith(dm)?(_r("it is gzipped"),F.isCompressed=!0,y.slice(0,-1*dm.length)):y,u="__NOT_MATCHING__",D=[o,t?y=>y.startsWith(e.name)&&y.endsWith(e.ext)?(_r("it starts and ends with the right things"),y.slice(e.name.length+1,-1*e.ext.length)):u:y=>y.startsWith(e.base)?(_r("it starts with the right things"),y.slice(e.base.length+1)):u,r?(y,F)=>{let C=y.split(s),_=C[C.length-1];_r("items: ",C,", indexStr: ",_);let j=y;_!==void 0&&_.match(/^\d+$/)?(j=y.slice(0,-1*(_.length+1)),_r(`dateStr is ${j}`),r&&!j&&(j=_,_="0")):_="0";try{let $=hm.parse(r,j,new Date(0,0));return hm.asString(r,$)!==j?y:(F.index=parseInt(_,10),F.date=j,F.timestamp=$.getTime(),"")}catch($){return _r(`Problem parsing ${j} as ${r}, error was: `,$),y}}:(y,F)=>y.match(/^\d+$/)?(_r("it has an index"),F.index=parseInt(y,10),""):y];return y=>{let F={filename:y,index:0,isCompressed:!1};return D.reduce((_,j)=>j(_,F),y)?null:F}};});var Dm=B((Ob,gm)=>{var et=qe()("streamroller:moveAndMaybeCompressFile"),Ht=Ya(),_S=U("zlib"),FS=function(e){let t={mode:parseInt("0600",8),compress:!1},r=Object.assign({},t,e);return et(`_parseOption: moveAndMaybeCompressFile called with option=${JSON.stringify(r)}`),r},SS=async(e,t,r)=>{if(r=FS(r),e===t){et("moveAndMaybeCompressFile: source and target are the same, not doing anything");return}if(await Ht.pathExists(e))if(et(`moveAndMaybeCompressFile: moving file from ${e} to ${t} ${r.compress?"with":"without"} compress`),r.compress)await new Promise((n,s)=>{let o=!1,u=Ht.createWriteStream(t,{mode:r.mode,flags:"wx"}).on("open",()=>{o=!0;let c=Ht.createReadStream(e).on("open",()=>{c.pipe(_S.createGzip()).pipe(u);}).on("error",d=>{et(`moveAndMaybeCompressFile: error reading ${e}`,d),u.destroy(d);});}).on("finish",()=>{et(`moveAndMaybeCompressFile: finished compressing ${t}, deleting ${e}`),Ht.unlink(e).then(n).catch(c=>{et(`moveAndMaybeCompressFile: error deleting ${e}, truncating instead`,c),Ht.truncate(e).then(n).catch(d=>{et(`moveAndMaybeCompressFile: error truncating ${e}`,d),s(d);});});}).on("error",c=>{o?(et(`moveAndMaybeCompressFile: error writing ${t}, deleting`,c),Ht.unlink(t).then(()=>{s(c);}).catch(d=>{et(`moveAndMaybeCompressFile: error deleting ${t}`,d),s(d);})):(et(`moveAndMaybeCompressFile: error creating ${t}`,c),s(c));});}).catch(()=>{});else {et(`moveAndMaybeCompressFile: renaming ${e} to ${t}`);try{await Ht.move(e,t,{overwrite:!0});}catch(n){if(et(`moveAndMaybeCompressFile: error renaming ${e} to ${t}`,n),n.code!=="ENOENT"){et("moveAndMaybeCompressFile: trying copy+truncate instead");try{await Ht.copy(e,t,{overwrite:!0}),await Ht.truncate(e);}catch(s){et("moveAndMaybeCompressFile: error copy+truncate",s);}}}}};gm.exports=SS;});var Es=B((xb,ym)=>{var ot=qe()("streamroller:RollingFileWriteStream"),Sr=Ya(),Fr=U("path"),CS=U("os"),ws=cm(),vs=rs(),{Writable:bS}=U("stream"),OS=fm(),xS=mm(),AS=Dm(),MS=e=>(ot(`deleteFiles: files to delete: ${e}`),Promise.all(e.map(t=>Sr.unlink(t).catch(r=>{ot(`deleteFiles: error when unlinking ${t}, ignoring. Error was ${r}`);})))),Wa=class extends bS{constructor(t,r){if(ot(`constructor: creating RollingFileWriteStream. path=${t}`),typeof t!="string"||t.length===0)throw new Error(`Invalid filename: ${t}`);if(t.endsWith(Fr.sep))throw new Error(`Filename is a directory: ${t}`);t.indexOf(`~${Fr.sep}`)===0&&(t=t.replace("~",CS.homedir())),super(r),this.options=this._parseOption(r),this.fileObject=Fr.parse(t),this.fileObject.dir===""&&(this.fileObject=Fr.parse(Fr.join(process.cwd(),t))),this.fileFormatter=OS({file:this.fileObject,alwaysIncludeDate:this.options.alwaysIncludePattern,needsIndex:this.options.maxSize 0`);if(n.numBackups||n.numBackups===0){if(n.numBackups<0)throw new Error(`options.numBackups (${n.numBackups}) should be >= 0`);if(n.numBackups>=Number.MAX_SAFE_INTEGER)throw new Error(`options.numBackups (${n.numBackups}) should be < Number.MAX_SAFE_INTEGER`);n.numToKeep=n.numBackups+1;}else if(n.numToKeep<=0)throw new Error(`options.numToKeep (${n.numToKeep}) should be > 0`);return ot(`_parseOption: creating stream with option=${JSON.stringify(n)}`),n}_final(t){this.currentFileStream.end("",this.options.encoding,t);}_write(t,r,n){this._shouldRoll().then(()=>{ot(`_write: writing chunk. file=${this.currentFileStream.path} state=${JSON.stringify(this.state)} chunk=${t}`),this.currentFileStream.write(t,r,s=>{this.state.currentSize+=t.length,n(s);});});}async _shouldRoll(){(this._dateChanged()||this._tooBig())&&(ot(`_shouldRoll: rolling because dateChanged? ${this._dateChanged()} or tooBig? ${this._tooBig()}`),await this._roll());}_dateChanged(){return this.state.currentDate&&this.state.currentDate!==vs(this.options.pattern,ws())}_tooBig(){return this.state.currentSize>=this.options.maxSize}_roll(){return ot("_roll: closing the current stream"),new Promise((t,r)=>{this.currentFileStream.end("",this.options.encoding,()=>{this._moveOldFiles().then(t).catch(r);});})}async _moveOldFiles(){let t=await this._getExistingFiles(),r=this.state.currentDate?t.filter(n=>n.date===this.state.currentDate):t;for(let n=r.length;n>=0;n--){ot(`_moveOldFiles: i = ${n}`);let s=this.fileFormatter({date:this.state.currentDate,index:n}),o=this.fileFormatter({date:this.state.currentDate,index:n+1}),u={compress:this.options.compress&&n===0,mode:this.options.mode};await AS(s,o,u);}this.state.currentSize=0,this.state.currentDate=this.state.currentDate?vs(this.options.pattern,ws()):null,ot(`_moveOldFiles: finished rolling files. state=${JSON.stringify(this.state)}`),this._renewWriteStream(),await new Promise((n,s)=>{this.currentFileStream.write("","utf8",()=>{this._clean().then(n).catch(s);});});}async _getExistingFiles(){let t=await Sr.readdir(this.fileObject.dir).catch(()=>[]);ot(`_getExistingFiles: files=${t}`);let r=t.map(s=>this.fileNameParser(s)).filter(s=>s),n=s=>(s.timestamp?s.timestamp:ws().getTime())-s.index;return r.sort((s,o)=>n(s)-n(o)),r}_renewWriteStream(){let t=this.fileFormatter({date:this.state.currentDate,index:0}),r=o=>{try{return Sr.mkdirSync(o,{recursive:!0})}catch(u){if(u.code==="ENOENT")return r(Fr.dirname(o)),r(o);if(u.code!=="EEXIST"&&u.code!=="EROFS")throw u;try{if(Sr.statSync(o).isDirectory())return o;throw u}catch{throw u}}};r(this.fileObject.dir);let n={flags:this.options.flags,encoding:this.options.encoding,mode:this.options.mode},s=function(o,u,c){return o[c]=o[u],delete o[u],o};Sr.appendFileSync(t,"",s({...n},"flags","flag")),this.currentFileStream=Sr.createWriteStream(t,n),this.currentFileStream.on("error",o=>{this.emit("error",o);});}async _clean(){let t=await this._getExistingFiles();if(ot(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${t.length}`),ot("_clean: existing files are: ",t),this._tooManyFiles(t.length)){let r=t.slice(0,t.length-this.options.numToKeep).map(n=>Fr.format({dir:this.fileObject.dir,base:n.filename}));await MS(r);}}_tooManyFiles(t){return this.options.numToKeep>0&&t>this.options.numToKeep}};ym.exports=Wa;});var vm=B((Ab,wm)=>{var TS=Es(),Ua=class extends TS{constructor(t,r,n,s){s||(s={}),r&&(s.maxSize=r),!s.numBackups&&s.numBackups!==0&&(!n&&n!==0&&(n=1),s.numBackups=n),super(t,s),this.backups=s.numBackups,this.size=this.options.maxSize;}get theStream(){return this.currentFileStream}};wm.exports=Ua;});var _m=B((Mb,Em)=>{var jS=Es(),za=class extends jS{constructor(t,r,n){r&&typeof r=="object"&&(n=r,r=null),n||(n={}),r||(r="yyyy-MM-dd"),n.pattern=r,!n.numBackups&&n.numBackups!==0?(!n.daysToKeep&&n.daysToKeep!==0?n.daysToKeep=1:process.emitWarning("options.daysToKeep is deprecated due to the confusion it causes when used together with file size rolling. Please use options.numBackups instead.","DeprecationWarning","streamroller-DEP0001"),n.numBackups=n.daysToKeep):n.daysToKeep=n.numBackups,super(t,n),this.mode=this.options.mode;}get theStream(){return this.currentFileStream}};Em.exports=za;});var Ha=B((Tb,Fm)=>{Fm.exports={RollingFileWriteStream:Es(),RollingFileStream:vm(),DateRollingFileStream:_m()};});var xm=B((jb,Om)=>{var Sm=qe()("log4js:file"),Va=U("path"),IS=Ha(),bm=U("os"),NS=bm.EOL,_s=!1,Fs=new Set;function Cm(){Fs.forEach(e=>{e.sighupHandler();});}function LS(e,t,r,n,s,o){if(typeof e!="string"||e.length===0)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Va.sep))throw new Error(`Filename is a directory: ${e}`);e.indexOf(`~${Va.sep}`)===0&&(e=e.replace("~",bm.homedir())),e=Va.normalize(e),n=!n&&n!==0?5:n,Sm("Creating file appender (",e,", ",r,", ",n,", ",s,", ",o,")");function u(g,m,D,y){let F=new IS.RollingFileStream(g,m,D,y);return F.on("error",C=>{console.error("log4js.fileAppender - Writing to file %s, error happened ",g,C);}),F.on("drain",()=>{process.emit("log4js:pause",!1);}),F}let c=u(e,r,n,s),d=function(g){if(c.writable){if(s.removeColor===!0){let m=/\x1b[[0-9;]*m/g;g.data=g.data.map(D=>typeof D=="string"?D.replace(m,""):D);}c.write(t(g,o)+NS,"utf8")||process.emit("log4js:pause",!0);}};return d.reopen=function(){c.end(()=>{c=u(e,r,n,s);});},d.sighupHandler=function(){Sm("SIGHUP handler called."),d.reopen();},d.shutdown=function(g){Fs.delete(d),Fs.size===0&&_s&&(process.removeListener("SIGHUP",Cm),_s=!1),c.end("","utf-8",g);},Fs.add(d),_s||(process.on("SIGHUP",Cm),_s=!0),d}function $S(e,t){let r=t.basicLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),e.mode=e.mode||384,LS(e.filename,r,e.maxLogSize,e.backups,e,e.timezoneOffset)}Om.exports.configure=$S;});var Mm=B((Ib,Am)=>{var kS=Ha(),PS=U("os"),RS=PS.EOL;function BS(e,t,r){let n=new kS.DateRollingFileStream(e,t,r);return n.on("error",s=>{console.error("log4js.dateFileAppender - Writing to file %s, error happened ",e,s);}),n.on("drain",()=>{process.emit("log4js:pause",!1);}),n}function qS(e,t,r,n,s){n.maxSize=n.maxLogSize;let o=BS(e,t,n),u=function(c){o.writable&&(o.write(r(c,s)+RS,"utf8")||process.emit("log4js:pause",!0));};return u.shutdown=function(c){o.end("","utf-8",c);},u}function YS(e,t){let r=t.basicLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),e.alwaysIncludePattern||(e.alwaysIncludePattern=!1),e.mode=e.mode||384,qS(e.filename,e.pattern,r,e,e.timezoneOffset)}Am.exports.configure=YS;});var Nm=B((Nb,Im)=>{var Vt=qe()("log4js:fileSync"),Mt=U("path"),At=U("fs"),Tm=U("os"),WS=Tm.EOL;function jm(e,t){let r=n=>{try{return At.mkdirSync(n,{recursive:!0})}catch(s){if(s.code==="ENOENT")return r(Mt.dirname(n)),r(n);if(s.code!=="EEXIST"&&s.code!=="EROFS")throw s;try{if(At.statSync(n).isDirectory())return n;throw s}catch{throw s}}};r(Mt.dirname(e)),At.appendFileSync(e,"",{mode:t.mode,flag:t.flags});}var Ga=class{constructor(t,r,n,s){if(Vt("In RollingFileStream"),r<0)throw new Error(`maxLogSize (${r}) should be > 0`);this.filename=t,this.size=r,this.backups=n,this.options=s,this.currentSize=0;function o(u){let c=0;try{c=At.statSync(u).size;}catch{jm(u,s);}return c}this.currentSize=o(this.filename);}shouldRoll(){return Vt("should roll with current size %d, and max size %d",this.currentSize,this.size),this.currentSize>=this.size}roll(t){let r=this,n=new RegExp(`^${Mt.basename(t)}`);function s(g){return n.test(g)}function o(g){return parseInt(g.slice(`${Mt.basename(t)}.`.length),10)||0}function u(g,m){return o(g)-o(m)}function c(g){let m=o(g);if(Vt(`Index of ${g} is ${m}`),r.backups===0)At.truncateSync(t,0);else if(m ${t}.${m+1}`),At.renameSync(Mt.join(Mt.dirname(t),g),`${t}.${m+1}`);}}function d(){Vt("Renaming the old files"),At.readdirSync(Mt.dirname(t)).filter(s).sort(u).reverse().forEach(c);}Vt("Rolling, rolling, rolling"),d();}write(t,r){let n=this;function s(){Vt("writing the chunk to the file"),n.currentSize+=t.length,At.appendFileSync(n.filename,t);}Vt("in write"),this.shouldRoll()&&(this.currentSize=0,this.roll(this.filename)),s();}};function US(e,t,r,n,s,o){if(typeof e!="string"||e.length===0)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Mt.sep))throw new Error(`Filename is a directory: ${e}`);e.indexOf(`~${Mt.sep}`)===0&&(e=e.replace("~",Tm.homedir())),e=Mt.normalize(e),n=!n&&n!==0?5:n,Vt("Creating fileSync appender (",e,", ",r,", ",n,", ",s,", ",o,")");function u(d,g,m){let D;return g?D=new Ga(d,g,m,s):D=(y=>(jm(y,s),{write(F){At.appendFileSync(y,F);}}))(d),D}let c=u(e,r,n);return d=>{c.write(t(d,o)+WS);}}function zS(e,t){let r=t.basicLayout;e.layout&&(r=t.layout(e.layout.type,e.layout));let n={flags:e.flags||"a",encoding:e.encoding||"utf8",mode:e.mode||384};return US(e.filename,r,e.maxLogSize,e.backups,n,e.timezoneOffset)}Im.exports.configure=zS;});var $m=B((Lb,Lm)=>{var Tt=qe()("log4js:tcp"),HS=U("net");function VS(e,t){let r=!1,n=[],s,o=3,u="__LOG4JS__";function c(D){Tt("Writing log event to socket"),r=s.write(`${t(D)}${u}`,"utf8");}function d(){let D;for(Tt("emptying buffer");D=n.shift();)c(D);}function g(){Tt(`appender creating socket to ${e.host||"localhost"}:${e.port||5e3}`),u=`${e.endMsg||"__LOG4JS__"}`,s=HS.createConnection(e.port||5e3,e.host||"localhost"),s.on("connect",()=>{Tt("socket connected"),d(),r=!0;}),s.on("drain",()=>{Tt("drain event received, emptying buffer"),r=!0,d();}),s.on("timeout",s.end.bind(s)),s.on("error",D=>{Tt("connection error",D),r=!1,d();}),s.on("close",g);}g();function m(D){r?c(D):(Tt("buffering log event because it cannot write at the moment"),n.push(D));}return m.shutdown=function(D){Tt("shutdown called"),n.length&&o?(Tt("buffer has items, waiting 100ms to empty"),o-=1,setTimeout(()=>{m.shutdown(D);},100)):(s.removeAllListeners("close"),s.end(D));},m}function GS(e,t){Tt(`configure with config = ${e}`);let r=function(n){return n.serialise()};return e.layout&&(r=t.layout(e.layout.type,e.layout)),VS(e,r)}Lm.exports.configure=GS;});var Ka=B(($b,Za)=>{var Ja=U("path"),ar=qe()("log4js:appenders"),gt=gr(),km=os(),JS=yr(),ZS=da(),KS=Nd(),St=new Map;St.set("console",$d());St.set("stdout",Pd());St.set("stderr",Bd());St.set("logLevelFilter",Yd());St.set("categoryFilter",zd());St.set("noLogFilter",Gd());St.set("file",xm());St.set("dateFile",Mm());St.set("fileSync",Nm());St.set("tcp",$m());var Kn=new Map,Ss=(e,t)=>{let r;try{let n=`${e}.cjs`;r=U.resolve(n),ar("Loading module from ",n);}catch{r=e,ar("Loading module from ",e);}try{return U(r)}catch(n){gt.throwExceptionIf(t,n.code!=="MODULE_NOT_FOUND",`appender "${e}" could not be loaded (error was: ${n})`);return}},QS=(e,t)=>St.get(e)||Ss(`./${e}`,t)||Ss(e,t)||U.main&&U.main.filename&&Ss(Ja.join(Ja.dirname(U.main.filename),e),t)||Ss(Ja.join(process.cwd(),e),t),Cs=new Set,Pm=(e,t)=>{if(Kn.has(e))return Kn.get(e);if(!t.appenders[e])return !1;if(Cs.has(e))throw new Error(`Dependency loop detected for appender ${e}.`);Cs.add(e),ar(`Creating appender ${e}`);let r=XS(e,t);return Cs.delete(e),Kn.set(e,r),r},XS=(e,t)=>{let r=t.appenders[e],n=r.type.configure?r.type:QS(r.type,t);return gt.throwExceptionIf(t,gt.not(n),`appender "${e}" is not valid (type "${r.type}" could not be found)`),n.appender&&(process.emitWarning(`Appender ${r.type} exports an appender function.`,"DeprecationWarning","log4js-node-DEP0001"),ar("[log4js-node-DEP0001]",`DEPRECATION: Appender ${r.type} exports an appender function.`)),n.shutdown&&(process.emitWarning(`Appender ${r.type} exports a shutdown function.`,"DeprecationWarning","log4js-node-DEP0002"),ar("[log4js-node-DEP0002]",`DEPRECATION: Appender ${r.type} exports a shutdown function.`)),ar(`${e}: clustering.isMaster ? ${km.isMaster()}`),ar(`${e}: appenderModule is ${U("util").inspect(n)}`),km.onlyOnMaster(()=>(ar(`calling appenderModule.configure for ${e} / ${r.type}`),n.configure(KS.modifyConfig(r),ZS,s=>Pm(s,t),JS)),()=>{})},Rm=e=>{if(Kn.clear(),Cs.clear(),!e)return;let t=[];Object.values(e.categories).forEach(r=>{t.push(...r.appenders);}),Object.keys(e.appenders).forEach(r=>{(t.includes(r)||e.appenders[r].type==="tcp-server"||e.appenders[r].type==="multiprocess")&&Pm(r,e);});},Bm=()=>{Rm();};Bm();gt.addListener(e=>{gt.throwExceptionIf(e,gt.not(gt.anObject(e.appenders)),'must have a property "appenders" of type object.');let t=Object.keys(e.appenders);gt.throwExceptionIf(e,gt.not(t.length),"must define at least one appender."),t.forEach(r=>{gt.throwExceptionIf(e,gt.not(e.appenders[r].type),`appender "${r}" is not valid (must be an object with property "type")`);});});gt.addListener(Rm);Za.exports=Kn;Za.exports.init=Bm;});var eu=B((Pb,bs)=>{var Qn=qe()("log4js:categories"),je=gr(),Qa=yr(),qm=Ka(),ur=new Map;function Ym(e,t,r){if(t.inherit===!1)return;let n=r.lastIndexOf(".");if(n<0)return;let s=r.slice(0,n),o=e.categories[s];o||(o={inherit:!0,appenders:[]}),Ym(e,o,s),!e.categories[s]&&o.appenders&&o.appenders.length&&o.level&&(e.categories[s]=o),t.appenders=t.appenders||[],t.level=t.level||o.level,o.appenders.forEach(u=>{t.appenders.includes(u)||t.appenders.push(u);}),t.parent=o;}function e2(e){if(!e.categories)return;Object.keys(e.categories).forEach(r=>{let n=e.categories[r];Ym(e,n,r);});}je.addPreProcessingListener(e=>e2(e));je.addListener(e=>{je.throwExceptionIf(e,je.not(je.anObject(e.categories)),'must have a property "categories" of type object.');let t=Object.keys(e.categories);je.throwExceptionIf(e,je.not(t.length),"must define at least one category."),t.forEach(r=>{let n=e.categories[r];je.throwExceptionIf(e,[je.not(n.appenders),je.not(n.level)],`category "${r}" is not valid (must be an object with properties "appenders" and "level")`),je.throwExceptionIf(e,je.not(Array.isArray(n.appenders)),`category "${r}" is not valid (appenders must be an array of appender names)`),je.throwExceptionIf(e,je.not(n.appenders.length),`category "${r}" is not valid (appenders must contain at least one appender name)`),Object.prototype.hasOwnProperty.call(n,"enableCallStack")&&je.throwExceptionIf(e,typeof n.enableCallStack!="boolean",`category "${r}" is not valid (enableCallStack must be boolean type)`),n.appenders.forEach(s=>{je.throwExceptionIf(e,je.not(qm.get(s)),`category "${r}" is not valid (appender "${s}" is not defined)`);}),je.throwExceptionIf(e,je.not(Qa.getLevel(n.level)),`category "${r}" is not valid (level "${n.level}" not recognised; valid levels are ${Qa.levels.join(", ")})`);}),je.throwExceptionIf(e,je.not(e.categories.default),'must define a "default" category.');});var Xa=e=>{if(ur.clear(),!e)return;Object.keys(e.categories).forEach(r=>{let n=e.categories[r],s=[];n.appenders.forEach(o=>{s.push(qm.get(o)),Qn(`Creating category ${r}`),ur.set(r,{appenders:s,level:Qa.getLevel(n.level),enableCallStack:n.enableCallStack||!1});});});},Wm=()=>{Xa();};Wm();je.addListener(Xa);var on=e=>{if(Qn(`configForCategory: searching for config for ${e}`),ur.has(e))return Qn(`configForCategory: ${e} exists in config, returning it`),ur.get(e);let t;return e.indexOf(".")>0?(Qn(`configForCategory: ${e} has hierarchy, cloning from parents`),t={...on(e.slice(0,e.lastIndexOf(".")))}):(ur.has("default")||Xa({categories:{default:{appenders:["out"],level:"OFF"}}}),Qn("configForCategory: cloning default category"),t={...ur.get("default")}),ur.set(e,t),t},t2=e=>on(e).appenders,r2=e=>on(e).level,n2=(e,t)=>{on(e).level=t;},i2=e=>on(e).enableCallStack===!0,s2=(e,t)=>{on(e).enableCallStack=t;};bs.exports=ur;bs.exports=Object.assign(bs.exports,{appendersForCategory:t2,getLevelForCategory:r2,setLevelForCategory:n2,getEnableCallStackForCategory:i2,setEnableCallStackForCategory:s2,init:Wm});});var Zm=B((Rb,Jm)=>{var Um=qe()("log4js:logger"),o2=ma(),jt=yr(),a2=os(),Os=eu(),Hm=gr(),u2=/^(?:\s*)at (?:(.+) \()?(?:([^(]+?):(\d+):(\d+))\)?$/,tu=1,Vm=3;function zm(e,t=Vm+tu){try{let r=e.stack.split(` + see https://github.com/jprichardson/node-fs-extra/issues/269`),zn.checkPaths(e,t,"copy",(s,o)=>{if(s)return n(s);let{srcStat:u,destStat:c}=o;zn.checkParentPaths(e,u,t,"copy",d=>d?n(d):r.filter?Ih(Th,c,e,t,r,n):Th(c,e,t,r,n));});}function Th(e,t,r,n,s){let o=Un.dirname(r);eF(o,(u,c)=>{if(u)return s(u);if(c)return Pa(e,t,r,n,s);X_(o,d=>d?s(d):Pa(e,t,r,n,s));});}function Ih(e,t,r,n,s,o){Promise.resolve(s.filter(r,n)).then(u=>u?e(t,r,n,s,o):o(),u=>o(u));}function Pa(e,t,r,n,s){return n.filter?Ih(jh,e,t,r,n,s):jh(e,t,r,n,s)}function jh(e,t,r,n,s){(n.dereference?ze.stat:ze.lstat)(t,(u,c)=>{if(u)return s(u);if(c.isDirectory())return oF(c,e,t,r,n,s);if(c.isFile()||c.isCharacterDevice()||c.isBlockDevice())return nF(c,e,t,r,n,s);if(c.isSymbolicLink())return cF(e,t,r,n,s)});}function nF(e,t,r,n,s,o){return t?iF(e,r,n,s,o):Nh(e,r,n,s,o)}function iF(e,t,r,n,s){if(n.overwrite)ze.unlink(r,o=>o?s(o):Nh(e,t,r,n,s));else return n.errorOnExist?s(new Error(`'${r}' already exists`)):s()}function Nh(e,t,r,n,s){return typeof ze.copyFile=="function"?ze.copyFile(t,r,o=>o?s(o):Lh(e,r,n,s)):sF(e,t,r,n,s)}function sF(e,t,r,n,s){let o=ze.createReadStream(t);o.on("error",u=>s(u)).once("open",()=>{let u=ze.createWriteStream(r,{mode:e.mode});u.on("error",c=>s(c)).on("open",()=>o.pipe(u)).once("close",()=>Lh(e,r,n,s));});}function Lh(e,t,r,n){ze.chmod(t,e.mode,s=>s?n(s):r.preserveTimestamps?tF(t,e.atime,e.mtime,n):n());}function oF(e,t,r,n,s,o){return t?t&&!t.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):$h(r,n,s,o):aF(e,r,n,s,o)}function aF(e,t,r,n,s){ze.mkdir(r,o=>{if(o)return s(o);$h(t,r,n,u=>u?s(u):ze.chmod(r,e.mode,s));});}function $h(e,t,r,n){ze.readdir(e,(s,o)=>s?n(s):kh(o,e,t,r,n));}function kh(e,t,r,n,s){let o=e.pop();return o?uF(e,o,t,r,n,s):s()}function uF(e,t,r,n,s,o){let u=Un.join(r,t),c=Un.join(n,t);zn.checkPaths(u,c,"copy",(d,g)=>{if(d)return o(d);let{destStat:m}=g;Pa(m,u,c,s,D=>D?o(D):kh(e,r,n,s,o));});}function cF(e,t,r,n,s){ze.readlink(t,(o,u)=>{if(o)return s(o);if(n.dereference&&(u=Un.resolve(process.cwd(),u)),e)ze.readlink(r,(c,d)=>c?c.code==="EINVAL"||c.code==="UNKNOWN"?ze.symlink(u,r,s):s(c):(n.dereference&&(d=Un.resolve(process.cwd(),d)),zn.isSrcSubdir(u,d)?s(new Error(`Cannot copy '${u}' to a subdirectory of itself, '${d}'.`)):e.isDirectory()&&zn.isSrcSubdir(d,u)?s(new Error(`Cannot overwrite '${d}' with '${u}'.`)):lF(u,r,s)));else return ze.symlink(u,r,s)});}function lF(e,t,r){ze.unlink(t,n=>n?r(n):ze.symlink(e,t,r));}Ph.exports=rF;});var Ra=B((nO,Bh)=>{var fF=Qe().fromCallback;Bh.exports={copy:fF(Rh())};});var Jh=B((iO,Gh)=>{var qh=$e(),zh=U("path"),_e=U("assert"),Hn=process.platform==="win32";function Hh(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{e[r]=e[r]||qh[r],r=r+"Sync",e[r]=e[r]||qh[r];}),e.maxBusyTries=e.maxBusyTries||3;}function Ba(e,t,r){let n=0;typeof t=="function"&&(r=t,t={}),_e(e,"rimraf: missing path"),_e.strictEqual(typeof e,"string","rimraf: path should be a string"),_e.strictEqual(typeof r,"function","rimraf: callback function required"),_e(t,"rimraf: invalid options argument provided"),_e.strictEqual(typeof t,"object","rimraf: options should be object"),Hh(t),Yh(e,t,function s(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&nYh(e,t,s),u)}o.code==="ENOENT"&&(o=null);}r(o);});}function Yh(e,t,r){_e(e),_e(t),_e(typeof r=="function"),t.lstat(e,(n,s)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&Hn)return Wh(e,t,n,r);if(s&&s.isDirectory())return ds(e,t,n,r);t.unlink(e,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return Hn?Wh(e,t,o,r):ds(e,t,o,r);if(o.code==="EISDIR")return ds(e,t,o,r)}return r(o)});});}function Wh(e,t,r,n){_e(e),_e(t),_e(typeof n=="function"),r&&_e(r instanceof Error),t.chmod(e,438,s=>{s?n(s.code==="ENOENT"?null:r):t.stat(e,(o,u)=>{o?n(o.code==="ENOENT"?null:r):u.isDirectory()?ds(e,t,r,n):t.unlink(e,n);});});}function Uh(e,t,r){let n;_e(e),_e(t),r&&_e(r instanceof Error);try{t.chmodSync(e,438);}catch(s){if(s.code==="ENOENT")return;throw r}try{n=t.statSync(e);}catch(s){if(s.code==="ENOENT")return;throw r}n.isDirectory()?hs(e,t,r):t.unlinkSync(e);}function ds(e,t,r,n){_e(e),_e(t),r&&_e(r instanceof Error),_e(typeof n=="function"),t.rmdir(e,s=>{s&&(s.code==="ENOTEMPTY"||s.code==="EEXIST"||s.code==="EPERM")?dF(e,t,n):s&&s.code==="ENOTDIR"?n(r):n(s);});}function dF(e,t,r){_e(e),_e(t),_e(typeof r=="function"),t.readdir(e,(n,s)=>{if(n)return r(n);let o=s.length,u;if(o===0)return t.rmdir(e,r);s.forEach(c=>{Ba(zh.join(e,c),t,d=>{if(!u){if(d)return r(u=d);--o===0&&t.rmdir(e,r);}});});});}function Vh(e,t){let r;t=t||{},Hh(t),_e(e,"rimraf: missing path"),_e.strictEqual(typeof e,"string","rimraf: path should be a string"),_e(t,"rimraf: missing options"),_e.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e);}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&Hn&&Uh(e,t,n);}try{r&&r.isDirectory()?hs(e,t,null):t.unlinkSync(e);}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return Hn?Uh(e,t,n):hs(e,t,n);if(n.code!=="EISDIR")throw n;hs(e,t,n);}}function hs(e,t,r){_e(e),_e(t),r&&_e(r instanceof Error);try{t.rmdirSync(e);}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")hF(e,t);else if(n.code!=="ENOENT")throw n}}function hF(e,t){if(_e(e),_e(t),t.readdirSync(e).forEach(r=>Vh(zh.join(e,r),t)),Hn){let r=Date.now();do try{return t.rmdirSync(e,t)}catch{}while(Date.now()-r<500)}else return t.rmdirSync(e,t)}Gh.exports=Ba;Ba.sync=Vh;});var Vn=B((sO,Kh)=>{var pF=Qe().fromCallback,Zh=Jh();Kh.exports={remove:pF(Zh),removeSync:Zh.sync};});var sp=B((oO,ip)=>{var mF=Qe().fromCallback,ep=$e(),tp=U("path"),rp=st(),np=Vn(),Qh=mF(function(t,r){r=r||function(){},ep.readdir(t,(n,s)=>{if(n)return rp.mkdirs(t,r);s=s.map(u=>tp.join(t,u)),o();function o(){let u=s.pop();if(!u)return r();np.remove(u,c=>{if(c)return r(c);o();});}});});function Xh(e){let t;try{t=ep.readdirSync(e);}catch{return rp.mkdirsSync(e)}t.forEach(r=>{r=tp.join(e,r),np.removeSync(r);});}ip.exports={emptyDirSync:Xh,emptydirSync:Xh,emptyDir:Qh,emptydir:Qh};});var cp=B((aO,up)=>{var gF=Qe().fromCallback,op=U("path"),Gn=$e(),ap=st(),DF=xt().pathExists;function yF(e,t){function r(){Gn.writeFile(e,"",n=>{if(n)return t(n);t();});}Gn.stat(e,(n,s)=>{if(!n&&s.isFile())return t();let o=op.dirname(e);DF(o,(u,c)=>{if(u)return t(u);if(c)return r();ap.mkdirs(o,d=>{if(d)return t(d);r();});});});}function wF(e){let t;try{t=Gn.statSync(e);}catch{}if(t&&t.isFile())return;let r=op.dirname(e);Gn.existsSync(r)||ap.mkdirsSync(r),Gn.writeFileSync(e,"");}up.exports={createFile:gF(yF),createFileSync:wF};});var pp=B((uO,hp)=>{var vF=Qe().fromCallback,fp=U("path"),Er=$e(),dp=st(),lp=xt().pathExists;function EF(e,t,r){function n(s,o){Er.link(s,o,u=>{if(u)return r(u);r(null);});}lp(t,(s,o)=>{if(s)return r(s);if(o)return r(null);Er.lstat(e,u=>{if(u)return u.message=u.message.replace("lstat","ensureLink"),r(u);let c=fp.dirname(t);lp(c,(d,g)=>{if(d)return r(d);if(g)return n(e,t);dp.mkdirs(c,m=>{if(m)return r(m);n(e,t);});});});});}function _F(e,t){if(Er.existsSync(t))return;try{Er.lstatSync(e);}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=fp.dirname(t);return Er.existsSync(n)||dp.mkdirsSync(n),Er.linkSync(e,t)}hp.exports={createLink:vF(EF),createLinkSync:_F};});var gp=B((cO,mp)=>{var or=U("path"),Jn=$e(),FF=xt().pathExists;function SF(e,t,r){if(or.isAbsolute(e))return Jn.lstat(e,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:e,toDst:e}));{let n=or.dirname(t),s=or.join(n,e);return FF(s,(o,u)=>o?r(o):u?r(null,{toCwd:s,toDst:e}):Jn.lstat(e,c=>c?(c.message=c.message.replace("lstat","ensureSymlink"),r(c)):r(null,{toCwd:e,toDst:or.relative(n,e)})))}}function CF(e,t){let r;if(or.isAbsolute(e)){if(r=Jn.existsSync(e),!r)throw new Error("absolute srcpath does not exist");return {toCwd:e,toDst:e}}else {let n=or.dirname(t),s=or.join(n,e);if(r=Jn.existsSync(s),r)return {toCwd:s,toDst:e};if(r=Jn.existsSync(e),!r)throw new Error("relative srcpath does not exist");return {toCwd:e,toDst:or.relative(n,e)}}}mp.exports={symlinkPaths:SF,symlinkPathsSync:CF};});var wp=B((lO,yp)=>{var Dp=$e();function OF(e,t,r){if(r=typeof t=="function"?t:r,t=typeof t=="function"?!1:t,t)return r(null,t);Dp.lstat(e,(n,s)=>{if(n)return r(null,"file");t=s&&s.isDirectory()?"dir":"file",r(null,t);});}function bF(e,t){let r;if(t)return t;try{r=Dp.lstatSync(e);}catch{return "file"}return r&&r.isDirectory()?"dir":"file"}yp.exports={symlinkType:OF,symlinkTypeSync:bF};});var Op=B((fO,Cp)=>{var xF=Qe().fromCallback,Ep=U("path"),nn=$e(),_p=st(),AF=_p.mkdirs,MF=_p.mkdirsSync,Fp=gp(),TF=Fp.symlinkPaths,jF=Fp.symlinkPathsSync,Sp=wp(),IF=Sp.symlinkType,NF=Sp.symlinkTypeSync,vp=xt().pathExists;function LF(e,t,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,vp(t,(s,o)=>{if(s)return n(s);if(o)return n(null);TF(e,t,(u,c)=>{if(u)return n(u);e=c.toDst,IF(c.toCwd,r,(d,g)=>{if(d)return n(d);let m=Ep.dirname(t);vp(m,(D,y)=>{if(D)return n(D);if(y)return nn.symlink(e,t,g,n);AF(m,F=>{if(F)return n(F);nn.symlink(e,t,g,n);});});});});});}function $F(e,t,r){if(nn.existsSync(t))return;let s=jF(e,t);e=s.toDst,r=NF(s.toCwd,r);let o=Ep.dirname(t);return nn.existsSync(o)||MF(o),nn.symlinkSync(e,t,r)}Cp.exports={createSymlink:xF(LF),createSymlinkSync:$F};});var xp=B((dO,bp)=>{var ps=cp(),ms=pp(),gs=Op();bp.exports={createFile:ps.createFile,createFileSync:ps.createFileSync,ensureFile:ps.createFile,ensureFileSync:ps.createFileSync,createLink:ms.createLink,createLinkSync:ms.createLinkSync,ensureLink:ms.createLink,ensureLinkSync:ms.createLinkSync,createSymlink:gs.createSymlink,createSymlinkSync:gs.createSymlinkSync,ensureSymlink:gs.createSymlink,ensureSymlinkSync:gs.createSymlinkSync};});var jp=B((hO,Tp)=>{var sn;try{sn=$e();}catch{sn=U("fs");}function kF(e,t,r){r==null&&(r=t,t={}),typeof t=="string"&&(t={encoding:t}),t=t||{};var n=t.fs||sn,s=!0;"throws"in t&&(s=t.throws),n.readFile(e,t,function(o,u){if(o)return r(o);u=Mp(u);var c;try{c=JSON.parse(u,t?t.reviver:null);}catch(d){return s?(d.message=e+": "+d.message,r(d)):r(null,null)}r(null,c);});}function PF(e,t){t=t||{},typeof t=="string"&&(t={encoding:t});var r=t.fs||sn,n=!0;"throws"in t&&(n=t.throws);try{var s=r.readFileSync(e,t);return s=Mp(s),JSON.parse(s,t.reviver)}catch(o){if(n)throw o.message=e+": "+o.message,o;return null}}function Ap(e,t){var r,n=` +`;typeof t=="object"&&t!==null&&(t.spaces&&(r=t.spaces),t.EOL&&(n=t.EOL));var s=JSON.stringify(e,t?t.replacer:null,r);return s.replace(/\n/g,n)+n}function RF(e,t,r,n){n==null&&(n=r,r={}),r=r||{};var s=r.fs||sn,o="";try{o=Ap(t,r);}catch(u){n&&n(u,null);return}s.writeFile(e,o,r,n);}function BF(e,t,r){r=r||{};var n=r.fs||sn,s=Ap(t,r);return n.writeFileSync(e,s,r)}function Mp(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e=e.replace(/^\uFEFF/,""),e}var qF={readFile:kF,readFileSync:PF,writeFile:RF,writeFileSync:BF};Tp.exports=qF;});var ys=B((pO,Np)=>{var Ip=Qe().fromCallback,Ds=jp();Np.exports={readJson:Ip(Ds.readFile),readJsonSync:Ds.readFileSync,writeJson:Ip(Ds.writeFile),writeJsonSync:Ds.writeFileSync};});var kp=B((mO,$p)=>{var YF=U("path"),WF=st(),UF=xt().pathExists,Lp=ys();function zF(e,t,r,n){typeof r=="function"&&(n=r,r={});let s=YF.dirname(e);UF(s,(o,u)=>{if(o)return n(o);if(u)return Lp.writeJson(e,t,r,n);WF.mkdirs(s,c=>{if(c)return n(c);Lp.writeJson(e,t,r,n);});});}$p.exports=zF;});var Rp=B((gO,Pp)=>{var HF=$e(),VF=U("path"),GF=st(),JF=ys();function ZF(e,t,r){let n=VF.dirname(e);HF.existsSync(n)||GF.mkdirsSync(n),JF.writeJsonSync(e,t,r);}Pp.exports=ZF;});var qp=B((DO,Bp)=>{var KF=Qe().fromCallback,Ze=ys();Ze.outputJson=KF(kp());Ze.outputJsonSync=Rp();Ze.outputJSON=Ze.outputJson;Ze.outputJSONSync=Ze.outputJsonSync;Ze.writeJSON=Ze.writeJson;Ze.writeJSONSync=Ze.writeJsonSync;Ze.readJSON=Ze.readJson;Ze.readJSONSync=Ze.readJsonSync;Bp.exports=Ze;});var Vp=B((yO,Hp)=>{var Up=$e(),QF=U("path"),XF=ka().copySync,zp=Vn().removeSync,eS=st().mkdirpSync,Yp=qn();function tS(e,t,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:s}=Yp.checkPathsSync(e,t,"move");return Yp.checkParentPathsSync(e,s,t,"move"),eS(QF.dirname(t)),rS(e,t,n)}function rS(e,t,r){if(r)return zp(t),Wp(e,t,r);if(Up.existsSync(t))throw new Error("dest already exists.");return Wp(e,t,r)}function Wp(e,t,r){try{Up.renameSync(e,t);}catch(n){if(n.code!=="EXDEV")throw n;return nS(e,t,r)}}function nS(e,t,r){return XF(e,t,{overwrite:r,errorOnExist:!0}),zp(e)}Hp.exports=tS;});var Jp=B((wO,Gp)=>{Gp.exports={moveSync:Vp()};});var em=B((vO,Xp)=>{var iS=$e(),sS=U("path"),oS=Ra().copy,Qp=Vn().remove,aS=st().mkdirp,uS=xt().pathExists,Zp=qn();function cS(e,t,r,n){typeof r=="function"&&(n=r,r={});let s=r.overwrite||r.clobber||!1;Zp.checkPaths(e,t,"move",(o,u)=>{if(o)return n(o);let{srcStat:c}=u;Zp.checkParentPaths(e,c,t,"move",d=>{if(d)return n(d);aS(sS.dirname(t),g=>g?n(g):lS(e,t,s,n));});});}function lS(e,t,r,n){if(r)return Qp(t,s=>s?n(s):Kp(e,t,r,n));uS(t,(s,o)=>s?n(s):o?n(new Error("dest already exists.")):Kp(e,t,r,n));}function Kp(e,t,r,n){iS.rename(e,t,s=>s?s.code!=="EXDEV"?n(s):fS(e,t,r,n):n());}function fS(e,t,r,n){oS(e,t,{overwrite:r,errorOnExist:!0},o=>o?n(o):Qp(e,n));}Xp.exports=cS;});var rm=B((EO,tm)=>{var dS=Qe().fromCallback;tm.exports={move:dS(em())};});var om=B((_O,sm)=>{var hS=Qe().fromCallback,Zn=$e(),nm=U("path"),im=st(),pS=xt().pathExists;function mS(e,t,r,n){typeof r=="function"&&(n=r,r="utf8");let s=nm.dirname(e);pS(s,(o,u)=>{if(o)return n(o);if(u)return Zn.writeFile(e,t,r,n);im.mkdirs(s,c=>{if(c)return n(c);Zn.writeFile(e,t,r,n);});});}function gS(e,...t){let r=nm.dirname(e);if(Zn.existsSync(r))return Zn.writeFileSync(e,...t);im.mkdirsSync(r),Zn.writeFileSync(e,...t);}sm.exports={outputFile:hS(mS),outputFileSync:gS};});var Ya=B((FO,qa)=>{qa.exports=Object.assign({},Sa(),ka(),Ra(),sp(),xp(),qp(),st(),Jp(),rm(),om(),xt(),Vn());var am=U("fs");Object.getOwnPropertyDescriptor(am,"promises")&&Object.defineProperty(qa.exports,"promises",{get(){return am.promises}});});var cm=B((SO,um)=>{um.exports=()=>new Date;});var fm=B((CO,lm)=>{var DS=qe()("streamroller:fileNameFormatter"),yS=U("path"),wS=".gz",vS=".";lm.exports=({file:e,keepFileExt:t,needsIndex:r,alwaysIncludeDate:n,compress:s,fileNameSep:o})=>{let u=o||vS,c=yS.join(e.dir,e.name),d=F=>F+e.ext,g=(F,C,_)=>(r||!_)&&C?F+u+C:F,m=(F,C,_)=>(C>0||n)&&_?F+u+_:F,D=(F,C)=>C&&s?F+wS:F,y=t?[m,g,d,D]:[d,m,g,D];return ({date:F,index:C})=>(DS(`_formatFileName: date=${F}, index=${C}`),y.reduce((_,j)=>j(_,C,F),c))};});var mm=B((OO,pm)=>{var _r=qe()("streamroller:fileNameParser"),dm=".gz",hm=rs(),ES=".";pm.exports=({file:e,keepFileExt:t,pattern:r,fileNameSep:n})=>{let s=n||ES,o=(y,F)=>y.endsWith(dm)?(_r("it is gzipped"),F.isCompressed=!0,y.slice(0,-1*dm.length)):y,u="__NOT_MATCHING__",D=[o,t?y=>y.startsWith(e.name)&&y.endsWith(e.ext)?(_r("it starts and ends with the right things"),y.slice(e.name.length+1,-1*e.ext.length)):u:y=>y.startsWith(e.base)?(_r("it starts with the right things"),y.slice(e.base.length+1)):u,r?(y,F)=>{let C=y.split(s),_=C[C.length-1];_r("items: ",C,", indexStr: ",_);let j=y;_!==void 0&&_.match(/^\d+$/)?(j=y.slice(0,-1*(_.length+1)),_r(`dateStr is ${j}`),r&&!j&&(j=_,_="0")):_="0";try{let $=hm.parse(r,j,new Date(0,0));return hm.asString(r,$)!==j?y:(F.index=parseInt(_,10),F.date=j,F.timestamp=$.getTime(),"")}catch($){return _r(`Problem parsing ${j} as ${r}, error was: `,$),y}}:(y,F)=>y.match(/^\d+$/)?(_r("it has an index"),F.index=parseInt(y,10),""):y];return y=>{let F={filename:y,index:0,isCompressed:!1};return D.reduce((_,j)=>j(_,F),y)?null:F}};});var Dm=B((bO,gm)=>{var et=qe()("streamroller:moveAndMaybeCompressFile"),Ht=Ya(),_S=U("zlib"),FS=function(e){let t={mode:parseInt("0600",8),compress:!1},r=Object.assign({},t,e);return et(`_parseOption: moveAndMaybeCompressFile called with option=${JSON.stringify(r)}`),r},SS=async(e,t,r)=>{if(r=FS(r),e===t){et("moveAndMaybeCompressFile: source and target are the same, not doing anything");return}if(await Ht.pathExists(e))if(et(`moveAndMaybeCompressFile: moving file from ${e} to ${t} ${r.compress?"with":"without"} compress`),r.compress)await new Promise((n,s)=>{let o=!1,u=Ht.createWriteStream(t,{mode:r.mode,flags:"wx"}).on("open",()=>{o=!0;let c=Ht.createReadStream(e).on("open",()=>{c.pipe(_S.createGzip()).pipe(u);}).on("error",d=>{et(`moveAndMaybeCompressFile: error reading ${e}`,d),u.destroy(d);});}).on("finish",()=>{et(`moveAndMaybeCompressFile: finished compressing ${t}, deleting ${e}`),Ht.unlink(e).then(n).catch(c=>{et(`moveAndMaybeCompressFile: error deleting ${e}, truncating instead`,c),Ht.truncate(e).then(n).catch(d=>{et(`moveAndMaybeCompressFile: error truncating ${e}`,d),s(d);});});}).on("error",c=>{o?(et(`moveAndMaybeCompressFile: error writing ${t}, deleting`,c),Ht.unlink(t).then(()=>{s(c);}).catch(d=>{et(`moveAndMaybeCompressFile: error deleting ${t}`,d),s(d);})):(et(`moveAndMaybeCompressFile: error creating ${t}`,c),s(c));});}).catch(()=>{});else {et(`moveAndMaybeCompressFile: renaming ${e} to ${t}`);try{await Ht.move(e,t,{overwrite:!0});}catch(n){if(et(`moveAndMaybeCompressFile: error renaming ${e} to ${t}`,n),n.code!=="ENOENT"){et("moveAndMaybeCompressFile: trying copy+truncate instead");try{await Ht.copy(e,t,{overwrite:!0}),await Ht.truncate(e);}catch(s){et("moveAndMaybeCompressFile: error copy+truncate",s);}}}}};gm.exports=SS;});var Es=B((xO,ym)=>{var ot=qe()("streamroller:RollingFileWriteStream"),Sr=Ya(),Fr=U("path"),CS=U("os"),ws=cm(),vs=rs(),{Writable:OS}=U("stream"),bS=fm(),xS=mm(),AS=Dm(),MS=e=>(ot(`deleteFiles: files to delete: ${e}`),Promise.all(e.map(t=>Sr.unlink(t).catch(r=>{ot(`deleteFiles: error when unlinking ${t}, ignoring. Error was ${r}`);})))),Wa=class extends OS{constructor(t,r){if(ot(`constructor: creating RollingFileWriteStream. path=${t}`),typeof t!="string"||t.length===0)throw new Error(`Invalid filename: ${t}`);if(t.endsWith(Fr.sep))throw new Error(`Filename is a directory: ${t}`);t.indexOf(`~${Fr.sep}`)===0&&(t=t.replace("~",CS.homedir())),super(r),this.options=this._parseOption(r),this.fileObject=Fr.parse(t),this.fileObject.dir===""&&(this.fileObject=Fr.parse(Fr.join(process.cwd(),t))),this.fileFormatter=bS({file:this.fileObject,alwaysIncludeDate:this.options.alwaysIncludePattern,needsIndex:this.options.maxSize 0`);if(n.numBackups||n.numBackups===0){if(n.numBackups<0)throw new Error(`options.numBackups (${n.numBackups}) should be >= 0`);if(n.numBackups>=Number.MAX_SAFE_INTEGER)throw new Error(`options.numBackups (${n.numBackups}) should be < Number.MAX_SAFE_INTEGER`);n.numToKeep=n.numBackups+1;}else if(n.numToKeep<=0)throw new Error(`options.numToKeep (${n.numToKeep}) should be > 0`);return ot(`_parseOption: creating stream with option=${JSON.stringify(n)}`),n}_final(t){this.currentFileStream.end("",this.options.encoding,t);}_write(t,r,n){this._shouldRoll().then(()=>{ot(`_write: writing chunk. file=${this.currentFileStream.path} state=${JSON.stringify(this.state)} chunk=${t}`),this.currentFileStream.write(t,r,s=>{this.state.currentSize+=t.length,n(s);});});}async _shouldRoll(){(this._dateChanged()||this._tooBig())&&(ot(`_shouldRoll: rolling because dateChanged? ${this._dateChanged()} or tooBig? ${this._tooBig()}`),await this._roll());}_dateChanged(){return this.state.currentDate&&this.state.currentDate!==vs(this.options.pattern,ws())}_tooBig(){return this.state.currentSize>=this.options.maxSize}_roll(){return ot("_roll: closing the current stream"),new Promise((t,r)=>{this.currentFileStream.end("",this.options.encoding,()=>{this._moveOldFiles().then(t).catch(r);});})}async _moveOldFiles(){let t=await this._getExistingFiles(),r=this.state.currentDate?t.filter(n=>n.date===this.state.currentDate):t;for(let n=r.length;n>=0;n--){ot(`_moveOldFiles: i = ${n}`);let s=this.fileFormatter({date:this.state.currentDate,index:n}),o=this.fileFormatter({date:this.state.currentDate,index:n+1}),u={compress:this.options.compress&&n===0,mode:this.options.mode};await AS(s,o,u);}this.state.currentSize=0,this.state.currentDate=this.state.currentDate?vs(this.options.pattern,ws()):null,ot(`_moveOldFiles: finished rolling files. state=${JSON.stringify(this.state)}`),this._renewWriteStream(),await new Promise((n,s)=>{this.currentFileStream.write("","utf8",()=>{this._clean().then(n).catch(s);});});}async _getExistingFiles(){let t=await Sr.readdir(this.fileObject.dir).catch(()=>[]);ot(`_getExistingFiles: files=${t}`);let r=t.map(s=>this.fileNameParser(s)).filter(s=>s),n=s=>(s.timestamp?s.timestamp:ws().getTime())-s.index;return r.sort((s,o)=>n(s)-n(o)),r}_renewWriteStream(){let t=this.fileFormatter({date:this.state.currentDate,index:0}),r=o=>{try{return Sr.mkdirSync(o,{recursive:!0})}catch(u){if(u.code==="ENOENT")return r(Fr.dirname(o)),r(o);if(u.code!=="EEXIST"&&u.code!=="EROFS")throw u;try{if(Sr.statSync(o).isDirectory())return o;throw u}catch{throw u}}};r(this.fileObject.dir);let n={flags:this.options.flags,encoding:this.options.encoding,mode:this.options.mode},s=function(o,u,c){return o[c]=o[u],delete o[u],o};Sr.appendFileSync(t,"",s({...n},"flags","flag")),this.currentFileStream=Sr.createWriteStream(t,n),this.currentFileStream.on("error",o=>{this.emit("error",o);});}async _clean(){let t=await this._getExistingFiles();if(ot(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${t.length}`),ot("_clean: existing files are: ",t),this._tooManyFiles(t.length)){let r=t.slice(0,t.length-this.options.numToKeep).map(n=>Fr.format({dir:this.fileObject.dir,base:n.filename}));await MS(r);}}_tooManyFiles(t){return this.options.numToKeep>0&&t>this.options.numToKeep}};ym.exports=Wa;});var vm=B((AO,wm)=>{var TS=Es(),Ua=class extends TS{constructor(t,r,n,s){s||(s={}),r&&(s.maxSize=r),!s.numBackups&&s.numBackups!==0&&(!n&&n!==0&&(n=1),s.numBackups=n),super(t,s),this.backups=s.numBackups,this.size=this.options.maxSize;}get theStream(){return this.currentFileStream}};wm.exports=Ua;});var _m=B((MO,Em)=>{var jS=Es(),za=class extends jS{constructor(t,r,n){r&&typeof r=="object"&&(n=r,r=null),n||(n={}),r||(r="yyyy-MM-dd"),n.pattern=r,!n.numBackups&&n.numBackups!==0?(!n.daysToKeep&&n.daysToKeep!==0?n.daysToKeep=1:process.emitWarning("options.daysToKeep is deprecated due to the confusion it causes when used together with file size rolling. Please use options.numBackups instead.","DeprecationWarning","streamroller-DEP0001"),n.numBackups=n.daysToKeep):n.daysToKeep=n.numBackups,super(t,n),this.mode=this.options.mode;}get theStream(){return this.currentFileStream}};Em.exports=za;});var Ha=B((TO,Fm)=>{Fm.exports={RollingFileWriteStream:Es(),RollingFileStream:vm(),DateRollingFileStream:_m()};});var xm=B((jO,bm)=>{var Sm=qe()("log4js:file"),Va=U("path"),IS=Ha(),Om=U("os"),NS=Om.EOL,_s=!1,Fs=new Set;function Cm(){Fs.forEach(e=>{e.sighupHandler();});}function LS(e,t,r,n,s,o){if(typeof e!="string"||e.length===0)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Va.sep))throw new Error(`Filename is a directory: ${e}`);e.indexOf(`~${Va.sep}`)===0&&(e=e.replace("~",Om.homedir())),e=Va.normalize(e),n=!n&&n!==0?5:n,Sm("Creating file appender (",e,", ",r,", ",n,", ",s,", ",o,")");function u(g,m,D,y){let F=new IS.RollingFileStream(g,m,D,y);return F.on("error",C=>{console.error("log4js.fileAppender - Writing to file %s, error happened ",g,C);}),F.on("drain",()=>{process.emit("log4js:pause",!1);}),F}let c=u(e,r,n,s),d=function(g){if(c.writable){if(s.removeColor===!0){let m=/\x1b[[0-9;]*m/g;g.data=g.data.map(D=>typeof D=="string"?D.replace(m,""):D);}c.write(t(g,o)+NS,"utf8")||process.emit("log4js:pause",!0);}};return d.reopen=function(){c.end(()=>{c=u(e,r,n,s);});},d.sighupHandler=function(){Sm("SIGHUP handler called."),d.reopen();},d.shutdown=function(g){Fs.delete(d),Fs.size===0&&_s&&(process.removeListener("SIGHUP",Cm),_s=!1),c.end("","utf-8",g);},Fs.add(d),_s||(process.on("SIGHUP",Cm),_s=!0),d}function $S(e,t){let r=t.basicLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),e.mode=e.mode||384,LS(e.filename,r,e.maxLogSize,e.backups,e,e.timezoneOffset)}bm.exports.configure=$S;});var Mm=B((IO,Am)=>{var kS=Ha(),PS=U("os"),RS=PS.EOL;function BS(e,t,r){let n=new kS.DateRollingFileStream(e,t,r);return n.on("error",s=>{console.error("log4js.dateFileAppender - Writing to file %s, error happened ",e,s);}),n.on("drain",()=>{process.emit("log4js:pause",!1);}),n}function qS(e,t,r,n,s){n.maxSize=n.maxLogSize;let o=BS(e,t,n),u=function(c){o.writable&&(o.write(r(c,s)+RS,"utf8")||process.emit("log4js:pause",!0));};return u.shutdown=function(c){o.end("","utf-8",c);},u}function YS(e,t){let r=t.basicLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),e.alwaysIncludePattern||(e.alwaysIncludePattern=!1),e.mode=e.mode||384,qS(e.filename,e.pattern,r,e,e.timezoneOffset)}Am.exports.configure=YS;});var Nm=B((NO,Im)=>{var Vt=qe()("log4js:fileSync"),Mt=U("path"),At=U("fs"),Tm=U("os"),WS=Tm.EOL;function jm(e,t){let r=n=>{try{return At.mkdirSync(n,{recursive:!0})}catch(s){if(s.code==="ENOENT")return r(Mt.dirname(n)),r(n);if(s.code!=="EEXIST"&&s.code!=="EROFS")throw s;try{if(At.statSync(n).isDirectory())return n;throw s}catch{throw s}}};r(Mt.dirname(e)),At.appendFileSync(e,"",{mode:t.mode,flag:t.flags});}var Ga=class{constructor(t,r,n,s){if(Vt("In RollingFileStream"),r<0)throw new Error(`maxLogSize (${r}) should be > 0`);this.filename=t,this.size=r,this.backups=n,this.options=s,this.currentSize=0;function o(u){let c=0;try{c=At.statSync(u).size;}catch{jm(u,s);}return c}this.currentSize=o(this.filename);}shouldRoll(){return Vt("should roll with current size %d, and max size %d",this.currentSize,this.size),this.currentSize>=this.size}roll(t){let r=this,n=new RegExp(`^${Mt.basename(t)}`);function s(g){return n.test(g)}function o(g){return parseInt(g.slice(`${Mt.basename(t)}.`.length),10)||0}function u(g,m){return o(g)-o(m)}function c(g){let m=o(g);if(Vt(`Index of ${g} is ${m}`),r.backups===0)At.truncateSync(t,0);else if(m ${t}.${m+1}`),At.renameSync(Mt.join(Mt.dirname(t),g),`${t}.${m+1}`);}}function d(){Vt("Renaming the old files"),At.readdirSync(Mt.dirname(t)).filter(s).sort(u).reverse().forEach(c);}Vt("Rolling, rolling, rolling"),d();}write(t,r){let n=this;function s(){Vt("writing the chunk to the file"),n.currentSize+=t.length,At.appendFileSync(n.filename,t);}Vt("in write"),this.shouldRoll()&&(this.currentSize=0,this.roll(this.filename)),s();}};function US(e,t,r,n,s,o){if(typeof e!="string"||e.length===0)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Mt.sep))throw new Error(`Filename is a directory: ${e}`);e.indexOf(`~${Mt.sep}`)===0&&(e=e.replace("~",Tm.homedir())),e=Mt.normalize(e),n=!n&&n!==0?5:n,Vt("Creating fileSync appender (",e,", ",r,", ",n,", ",s,", ",o,")");function u(d,g,m){let D;return g?D=new Ga(d,g,m,s):D=(y=>(jm(y,s),{write(F){At.appendFileSync(y,F);}}))(d),D}let c=u(e,r,n);return d=>{c.write(t(d,o)+WS);}}function zS(e,t){let r=t.basicLayout;e.layout&&(r=t.layout(e.layout.type,e.layout));let n={flags:e.flags||"a",encoding:e.encoding||"utf8",mode:e.mode||384};return US(e.filename,r,e.maxLogSize,e.backups,n,e.timezoneOffset)}Im.exports.configure=zS;});var $m=B((LO,Lm)=>{var Tt=qe()("log4js:tcp"),HS=U("net");function VS(e,t){let r=!1,n=[],s,o=3,u="__LOG4JS__";function c(D){Tt("Writing log event to socket"),r=s.write(`${t(D)}${u}`,"utf8");}function d(){let D;for(Tt("emptying buffer");D=n.shift();)c(D);}function g(){Tt(`appender creating socket to ${e.host||"localhost"}:${e.port||5e3}`),u=`${e.endMsg||"__LOG4JS__"}`,s=HS.createConnection(e.port||5e3,e.host||"localhost"),s.on("connect",()=>{Tt("socket connected"),d(),r=!0;}),s.on("drain",()=>{Tt("drain event received, emptying buffer"),r=!0,d();}),s.on("timeout",s.end.bind(s)),s.on("error",D=>{Tt("connection error",D),r=!1,d();}),s.on("close",g);}g();function m(D){r?c(D):(Tt("buffering log event because it cannot write at the moment"),n.push(D));}return m.shutdown=function(D){Tt("shutdown called"),n.length&&o?(Tt("buffer has items, waiting 100ms to empty"),o-=1,setTimeout(()=>{m.shutdown(D);},100)):(s.removeAllListeners("close"),s.end(D));},m}function GS(e,t){Tt(`configure with config = ${e}`);let r=function(n){return n.serialise()};return e.layout&&(r=t.layout(e.layout.type,e.layout)),VS(e,r)}Lm.exports.configure=GS;});var Ka=B(($O,Za)=>{var Ja=U("path"),ar=qe()("log4js:appenders"),gt=gr(),km=os(),JS=yr(),ZS=da(),KS=Nd(),St=new Map;St.set("console",$d());St.set("stdout",Pd());St.set("stderr",Bd());St.set("logLevelFilter",Yd());St.set("categoryFilter",zd());St.set("noLogFilter",Gd());St.set("file",xm());St.set("dateFile",Mm());St.set("fileSync",Nm());St.set("tcp",$m());var Kn=new Map,Ss=(e,t)=>{let r;try{let n=`${e}.cjs`;r=U.resolve(n),ar("Loading module from ",n);}catch{r=e,ar("Loading module from ",e);}try{return U(r)}catch(n){gt.throwExceptionIf(t,n.code!=="MODULE_NOT_FOUND",`appender "${e}" could not be loaded (error was: ${n})`);return}},QS=(e,t)=>St.get(e)||Ss(`./${e}`,t)||Ss(e,t)||U.main&&U.main.filename&&Ss(Ja.join(Ja.dirname(U.main.filename),e),t)||Ss(Ja.join(process.cwd(),e),t),Cs=new Set,Pm=(e,t)=>{if(Kn.has(e))return Kn.get(e);if(!t.appenders[e])return !1;if(Cs.has(e))throw new Error(`Dependency loop detected for appender ${e}.`);Cs.add(e),ar(`Creating appender ${e}`);let r=XS(e,t);return Cs.delete(e),Kn.set(e,r),r},XS=(e,t)=>{let r=t.appenders[e],n=r.type.configure?r.type:QS(r.type,t);return gt.throwExceptionIf(t,gt.not(n),`appender "${e}" is not valid (type "${r.type}" could not be found)`),n.appender&&(process.emitWarning(`Appender ${r.type} exports an appender function.`,"DeprecationWarning","log4js-node-DEP0001"),ar("[log4js-node-DEP0001]",`DEPRECATION: Appender ${r.type} exports an appender function.`)),n.shutdown&&(process.emitWarning(`Appender ${r.type} exports a shutdown function.`,"DeprecationWarning","log4js-node-DEP0002"),ar("[log4js-node-DEP0002]",`DEPRECATION: Appender ${r.type} exports a shutdown function.`)),ar(`${e}: clustering.isMaster ? ${km.isMaster()}`),ar(`${e}: appenderModule is ${U("util").inspect(n)}`),km.onlyOnMaster(()=>(ar(`calling appenderModule.configure for ${e} / ${r.type}`),n.configure(KS.modifyConfig(r),ZS,s=>Pm(s,t),JS)),()=>{})},Rm=e=>{if(Kn.clear(),Cs.clear(),!e)return;let t=[];Object.values(e.categories).forEach(r=>{t.push(...r.appenders);}),Object.keys(e.appenders).forEach(r=>{(t.includes(r)||e.appenders[r].type==="tcp-server"||e.appenders[r].type==="multiprocess")&&Pm(r,e);});},Bm=()=>{Rm();};Bm();gt.addListener(e=>{gt.throwExceptionIf(e,gt.not(gt.anObject(e.appenders)),'must have a property "appenders" of type object.');let t=Object.keys(e.appenders);gt.throwExceptionIf(e,gt.not(t.length),"must define at least one appender."),t.forEach(r=>{gt.throwExceptionIf(e,gt.not(e.appenders[r].type),`appender "${r}" is not valid (must be an object with property "type")`);});});gt.addListener(Rm);Za.exports=Kn;Za.exports.init=Bm;});var eu=B((PO,Os)=>{var Qn=qe()("log4js:categories"),je=gr(),Qa=yr(),qm=Ka(),ur=new Map;function Ym(e,t,r){if(t.inherit===!1)return;let n=r.lastIndexOf(".");if(n<0)return;let s=r.slice(0,n),o=e.categories[s];o||(o={inherit:!0,appenders:[]}),Ym(e,o,s),!e.categories[s]&&o.appenders&&o.appenders.length&&o.level&&(e.categories[s]=o),t.appenders=t.appenders||[],t.level=t.level||o.level,o.appenders.forEach(u=>{t.appenders.includes(u)||t.appenders.push(u);}),t.parent=o;}function e2(e){if(!e.categories)return;Object.keys(e.categories).forEach(r=>{let n=e.categories[r];Ym(e,n,r);});}je.addPreProcessingListener(e=>e2(e));je.addListener(e=>{je.throwExceptionIf(e,je.not(je.anObject(e.categories)),'must have a property "categories" of type object.');let t=Object.keys(e.categories);je.throwExceptionIf(e,je.not(t.length),"must define at least one category."),t.forEach(r=>{let n=e.categories[r];je.throwExceptionIf(e,[je.not(n.appenders),je.not(n.level)],`category "${r}" is not valid (must be an object with properties "appenders" and "level")`),je.throwExceptionIf(e,je.not(Array.isArray(n.appenders)),`category "${r}" is not valid (appenders must be an array of appender names)`),je.throwExceptionIf(e,je.not(n.appenders.length),`category "${r}" is not valid (appenders must contain at least one appender name)`),Object.prototype.hasOwnProperty.call(n,"enableCallStack")&&je.throwExceptionIf(e,typeof n.enableCallStack!="boolean",`category "${r}" is not valid (enableCallStack must be boolean type)`),n.appenders.forEach(s=>{je.throwExceptionIf(e,je.not(qm.get(s)),`category "${r}" is not valid (appender "${s}" is not defined)`);}),je.throwExceptionIf(e,je.not(Qa.getLevel(n.level)),`category "${r}" is not valid (level "${n.level}" not recognised; valid levels are ${Qa.levels.join(", ")})`);}),je.throwExceptionIf(e,je.not(e.categories.default),'must define a "default" category.');});var Xa=e=>{if(ur.clear(),!e)return;Object.keys(e.categories).forEach(r=>{let n=e.categories[r],s=[];n.appenders.forEach(o=>{s.push(qm.get(o)),Qn(`Creating category ${r}`),ur.set(r,{appenders:s,level:Qa.getLevel(n.level),enableCallStack:n.enableCallStack||!1});});});},Wm=()=>{Xa();};Wm();je.addListener(Xa);var on=e=>{if(Qn(`configForCategory: searching for config for ${e}`),ur.has(e))return Qn(`configForCategory: ${e} exists in config, returning it`),ur.get(e);let t;return e.indexOf(".")>0?(Qn(`configForCategory: ${e} has hierarchy, cloning from parents`),t={...on(e.slice(0,e.lastIndexOf(".")))}):(ur.has("default")||Xa({categories:{default:{appenders:["out"],level:"OFF"}}}),Qn("configForCategory: cloning default category"),t={...ur.get("default")}),ur.set(e,t),t},t2=e=>on(e).appenders,r2=e=>on(e).level,n2=(e,t)=>{on(e).level=t;},i2=e=>on(e).enableCallStack===!0,s2=(e,t)=>{on(e).enableCallStack=t;};Os.exports=ur;Os.exports=Object.assign(Os.exports,{appendersForCategory:t2,getLevelForCategory:r2,setLevelForCategory:n2,getEnableCallStackForCategory:i2,setEnableCallStackForCategory:s2,init:Wm});});var Zm=B((RO,Jm)=>{var Um=qe()("log4js:logger"),o2=ma(),jt=yr(),a2=os(),bs=eu(),Hm=gr(),u2=/^(?:\s*)at (?:(.+) \()?(?:([^(]+?):(\d+):(\d+))\)?$/,tu=1,Vm=3;function zm(e,t=Vm+tu){try{let r=e.stack.split(` `).slice(t);if(!r.length)return null;let n=u2.exec(r[0]);if(n&&n.length===5){let s="",o="",u="";return n[1]&&n[1]!==""&&([o,u]=n[1].replace(/[[\]]/g,"").split(" as "),u=u||"",o.includes(".")&&([s,o]=o.split("."))),{fileName:n[2],lineNumber:parseInt(n[3],10),columnNumber:parseInt(n[4],10),callStack:r.join(` -`),className:s,functionName:o,functionAlias:u,callerName:n[1]||""}}else console.error("log4js.logger - defaultParseCallStack error");}catch(r){console.error("log4js.logger - defaultParseCallStack error",r);}return null}var Xn=class{constructor(t){if(!t)throw new Error("No category provided.");this.category=t,this.context={},this.callStackSkipIndex=0,this.parseCallStack=zm,Um(`Logger created (${this.category}, ${this.level})`);}get level(){return jt.getLevel(Os.getLevelForCategory(this.category),jt.OFF)}set level(t){Os.setLevelForCategory(this.category,jt.getLevel(t,this.level));}get useCallStack(){return Os.getEnableCallStackForCategory(this.category)}set useCallStack(t){Os.setEnableCallStackForCategory(this.category,t===!0);}get callStackLinesToSkip(){return this.callStackSkipIndex}set callStackLinesToSkip(t){if(typeof t!="number")throw new TypeError("Must be a number");if(t<0)throw new RangeError("Must be >= 0");this.callStackSkipIndex=t;}log(t,...r){let n=jt.getLevel(t);n?this.isLevelEnabled(n)&&this._log(n,r):Hm.validIdentifier(t)&&r.length>0?(this.log(jt.WARN,"log4js:logger.log: valid log-level not found as first parameter given:",t),this.log(jt.INFO,`[${t}]`,...r)):this.log(jt.INFO,t,...r);}isLevelEnabled(t){return this.level.isLessThanOrEqualTo(t)}_log(t,r){Um(`sending log data (${t}) to appenders`);let n=r.find(u=>u instanceof Error),s;if(this.useCallStack){try{n&&(s=this.parseCallStack(n,this.callStackSkipIndex+tu));}catch{}s=s||this.parseCallStack(new Error,this.callStackSkipIndex+Vm+tu);}let o=new o2(this.category,t,r,this.context,s,n);a2.send(o);}addContext(t,r){this.context[t]=r;}removeContext(t){delete this.context[t];}clearContext(){this.context={};}setParseCallStackFunction(t){if(typeof t=="function")this.parseCallStack=t;else if(typeof t>"u")this.parseCallStack=zm;else throw new TypeError("Invalid type passed to setParseCallStackFunction")}};function Gm(e){let t=jt.getLevel(e),n=t.toString().toLowerCase().replace(/_([a-z])/g,o=>o[1].toUpperCase()),s=n[0].toUpperCase()+n.slice(1);Xn.prototype[`is${s}Enabled`]=function(){return this.isLevelEnabled(t)},Xn.prototype[n]=function(...o){this.log(t,...o);};}jt.levels.forEach(Gm);Hm.addListener(()=>{jt.levels.forEach(Gm);});Jm.exports=Xn;});var Xm=B((Bb,Qm)=>{var an=yr(),c2=':remote-addr - - ":method :url HTTP/:http-version" :status :content-length ":referrer" ":user-agent"';function l2(e){return e.originalUrl||e.url}function f2(e,t,r){let n=o=>{let u=o.concat();for(let c=0;cn.source?n.source:n);t=new RegExp(r.join("|"));}return t}function h2(e,t,r){let n=t;if(r){let s=r.find(o=>{let u=!1;return o.from&&o.to?u=e>=o.from&&e<=o.to:u=o.codes.indexOf(e)!==-1,u});s&&(n=an.getLevel(s.level,n));}return n}Qm.exports=function(t,r){typeof r=="string"||typeof r=="function"?r={format:r}:r=r||{};let n=t,s=an.getLevel(r.level,an.INFO),o=r.format||c2;return (u,c,d)=>{if(typeof u._logging<"u")return d();if(typeof r.nolog!="function"){let g=d2(r.nolog);if(g&&g.test(u.originalUrl))return d()}if(n.isLevelEnabled(s)||r.level==="auto"){let g=new Date,{writeHead:m}=c;u._logging=!0,c.writeHead=(F,C)=>{c.writeHead=m,c.writeHead(F,C),c.__statusCode=F,c.__headers=C||{};};let D=!1,y=()=>{if(D)return;if(D=!0,typeof r.nolog=="function"&&r.nolog(u,c)===!0){u._logging=!1;return}c.responseTime=new Date-g,c.statusCode&&r.level==="auto"&&(s=an.INFO,c.statusCode>=300&&(s=an.WARN),c.statusCode>=400&&(s=an.ERROR)),s=h2(c.statusCode,s,r.statusRules);let F=f2(u,c,r.tokens||[]);if(r.context&&n.addContext("res",c),typeof o=="function"){let C=o(u,c,_=>Km(_,F));C&&n.log(s,C);}else n.log(s,Km(o,F));r.context&&n.removeContext("res");};c.on("end",y),c.on("finish",y),c.on("error",y),c.on("close",y);}return d()}};});var ig=B((qb,ng)=>{var eg=qe()("log4js:recording"),xs=[];function p2(){return function(e){eg(`received logEvent, number of events now ${xs.length+1}`),eg("log event was ",e),xs.push(e);}}function tg(){return xs.slice()}function rg(){xs.length=0;}ng.exports={configure:p2,replay:tg,playback:tg,reset:rg,erase:rg};});var fg=B((Yb,lg)=>{var cr=qe()("log4js:main"),m2=U("fs"),g2=Gf()({proto:!0}),D2=gr(),y2=da(),w2=yr(),sg=Ka(),og=eu(),v2=Zm(),E2=os(),_2=Xm(),F2=ig(),un=!1;function S2(e){if(!un)return;cr("Received log event ",e),og.appendersForCategory(e.categoryName).forEach(r=>{r(e);});}function C2(e){cr(`Loading configuration from ${e}`);try{return JSON.parse(m2.readFileSync(e,"utf8"))}catch(t){throw new Error(`Problem reading config from file "${e}". Error was ${t.message}`,t)}}function ag(e){un&&ug();let t=e;return typeof t=="string"&&(t=C2(e)),cr(`Configuration is ${t}`),D2.configure(g2(t)),E2.onMessage(S2),un=!0,cg}function b2(){return un}function O2(){return F2}function ug(e=()=>{}){if(typeof e!="function")throw new TypeError("Invalid callback passed to shutdown");cr("Shutdown called. Disabling all log writing."),un=!1;let t=Array.from(sg.values());sg.init(),og.init();let r=t.reduce((u,c)=>c.shutdown?u+1:u,0);r===0&&(cr("No appenders with shutdown functions found."),e());let n=0,s;cr(`Found ${r} appenders with shutdown functions.`);function o(u){s=s||u,n+=1,cr(`Appender shutdowns complete: ${n} / ${r}`),n>=r&&(cr("All shutdown functions completed."),e(s));}t.filter(u=>u.shutdown).forEach(u=>u.shutdown(o));}function x2(e){return un||ag(process.env.LOG4JS_CONFIG||{appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"OFF"}}}),new v2(e||"default")}var cg={getLogger:x2,configure:ag,isConfigured:b2,shutdown:ug,connectLogger:_2,levels:w2,addLayout:y2.addLayout,recording:O2};lg.exports=cg;});var dg=Qs(Wu());var Lf=Qs($i());var Jr=class e{nconf=Lf.default;_rootPath;_devmode;_appVersion;_logLevel;_dateFormat;_logDateFormat;_logFilePath;_ipAddress;_port;_login;_password;_limitTime;_settingsFilePath;ratioEnabled=!1;ratioLimit=2;constructor(t){process.env.UV_THREADPOOL_SIZE=os$1.cpus().length.toString(),this._rootPath=t??e.getRootDir(),this.init(),this._login=this.getParam("login"),this._password=this.getParam("password"),this._devmode=this.getParam("node_env")==="development",this._appVersion=this.getParam("version"),this._logLevel=this._devmode?"trace":this.getParam("log_level"),this._dateFormat=this.getParam("date_format"),this._logDateFormat=this.getParam("log_date_format"),this._logFilePath=this.getParam("log_file_path"),this._ipAddress=this.getParam("ip_address"),this._port=Number(this.getParam("tcp_port")),this._limitTime=Number(this.getParam("limit_time")),this._settingsFilePath=this.getParam("settings_file_path"),this.setRatio(),this.check();}get rootPath(){return this._rootPath}get devmode(){return this._devmode}get appVersion(){return this._appVersion}get logLevel(){return this._logLevel}get dateFormat(){return this._dateFormat}get logDateFormat(){return this._logDateFormat}get logFilePath(){return this._logFilePath}get ipAddress(){return this._ipAddress}get port(){return this._port}get login(){return this._login}get password(){return this._password}get limitTime(){return this._limitTime}get settingsFilePath(){return this._settingsFilePath}init(){let t=path.normalize(`${this.rootPath}/config.json`);this.nconf.env(),this.nconf.file("config",t),this.nconf.file("package",path.normalize(`${this.rootPath}/package.json`)),this.nconf.defaults({node_env:"production",log_level:"info",log_file_path:"/var/log/transmission/torrentclear.log",date_format:"DD.MM.YYYY_HH:mm:ss",log_date_format:"dd.MM.yyyy_hh:mm:ss.SSS",ip_address:"127.0.0.1",tcp_port:"9091",limit_time:"604800",settings_file_path:"/etc/transmission-daemon/settings.json"}),this.nconf.load(),this.settingsFileExists();let r=path.normalize(this.getParam("settings_file_path"));this.nconf.file("transmission",r),this.nconf.load();}setRatio(){this.ratioEnabled=!!this.getParam("ratio-limit-enabled"),this.ratioEnabled&&(this.ratioLimit=Number(this.getParam("ratio-limit")));}check(){let t=this.getParam("login"),r=this.getParam("password");if(t===void 0||t===""||r===void 0||r==="")throw new Error("Login or password must be filled in config.json file or Environment")}settingsFileExists(){let t=path.normalize(this.getParam("settings_file_path"));if(!fs.existsSync(t)){let r=path.resolve(t);if(!fs.existsSync(r))throw new Error(`Transmission settings file not found on path ${t}`)}}static getRootDir(){let t=url.fileURLToPath(url.pathToFileURL(__filename).toString()),n=path.dirname(t);for(;!fs.existsSync(path.join(n,"package.json"));)n=path.join(n,"..");return path.normalize(n)}getParam(t){let r=this.nconf.get(t);return r===void 0&&(r=this.nconf.get(t.toUpperCase())),r}};var A2=Qs(fg());var As=class{log4js;_config;_logger;constructor(t){this.log4js=A2,this._config=new Jr(t),this.init(),this._logger=this.log4js.getLogger();}get logger(){return this._logger}get config(){return this._config}init(){let t={appenders:{console:{type:"console",layout:{type:"pattern",pattern:`[%d{${this.config.logDateFormat}}] : %[[%p]%] : %m`}},logFile:{type:"file",filename:this.config.logFilePath,maxLogSize:"10M",compress:!0,layout:{type:"pattern",pattern:`[%d{${this.config.logDateFormat}}] : [%p] : %m`}}},categories:{default:{appenders:this.config.devmode?["console"]:["console","logFile"],level:this.config.logLevel,enableCallStack:!!this.config.devmode}}};this.log4js.configure(t);}};var Ms=class{_config;_logger;_connect;regexSuccess=/success/i;regexTorrentInfo=/(?<=Name:\s)(.*?)(?=\s*Hash:)|(?<=State:\s)(.*?)(?=\s*Location:)|(?<=Location:\s)(.*?)(?=\s*Percent Done:)|(?<=Percent Done:\s)(.*?)%(?=\s*ETA:)|(?<=Ratio:\s)(.*?)(?=\s*Corrupt DL:)|(?<=Date finished:\s)(.*?)(?=\s*Date started:|$)/g;fileOrDirsState={FILE:1,DIR:2,NOTFOUND:3,UNKNOWN:4};_torrentInfo;_torrentSuccessCount=0;_torrentProcessCount=0;_torrentIDs=[];constructor(t){this._config=new Jr(t),this._logger=new As(t).logger,this._connect=this.connectCommandCreate(),this._torrentInfo={id:0,name:"",state:"",location:"",percent:0,ratio:0,dateDone:"",dateDifference:0};}get connect(){return this._connect}get config(){return this._config}get logger(){return this._logger}get torrentInfo(){return this._torrentInfo}set torrentInfo(t){this._torrentInfo=t;}get torrentSuccessCount(){return this._torrentSuccessCount}set torrentSuccessCount(t){this._torrentSuccessCount=t;}get torrentProcessCount(){return this._torrentProcessCount}set torrentProcessCount(t){this._torrentProcessCount=t;}get torrentIDs(){return this._torrentIDs}async main(){try{this.startInfo(),await this.getIDs(),await this.torrentsProcess(),this.endInfo();}catch(t){this.logger.error(t.message),this.endInfo(!0);}}startInfo(){this.logger.info("##############################################################################################"),this.logger.info(`transmission-torrentclear: "${this.config.appVersion}"`),this.logger.info("==============================================================================================");}endInfo(t=!1){this.logger.info("=============================================================================================="),t?this.logger.error("Failed to complete torrent verification process"):this.logger.info("Completing the torrent verification process"),this.logger.info(`############################################################################################## +`),className:s,functionName:o,functionAlias:u,callerName:n[1]||""}}else console.error("log4js.logger - defaultParseCallStack error");}catch(r){console.error("log4js.logger - defaultParseCallStack error",r);}return null}var Xn=class{constructor(t){if(!t)throw new Error("No category provided.");this.category=t,this.context={},this.callStackSkipIndex=0,this.parseCallStack=zm,Um(`Logger created (${this.category}, ${this.level})`);}get level(){return jt.getLevel(bs.getLevelForCategory(this.category),jt.OFF)}set level(t){bs.setLevelForCategory(this.category,jt.getLevel(t,this.level));}get useCallStack(){return bs.getEnableCallStackForCategory(this.category)}set useCallStack(t){bs.setEnableCallStackForCategory(this.category,t===!0);}get callStackLinesToSkip(){return this.callStackSkipIndex}set callStackLinesToSkip(t){if(typeof t!="number")throw new TypeError("Must be a number");if(t<0)throw new RangeError("Must be >= 0");this.callStackSkipIndex=t;}log(t,...r){let n=jt.getLevel(t);n?this.isLevelEnabled(n)&&this._log(n,r):Hm.validIdentifier(t)&&r.length>0?(this.log(jt.WARN,"log4js:logger.log: valid log-level not found as first parameter given:",t),this.log(jt.INFO,`[${t}]`,...r)):this.log(jt.INFO,t,...r);}isLevelEnabled(t){return this.level.isLessThanOrEqualTo(t)}_log(t,r){Um(`sending log data (${t}) to appenders`);let n=r.find(u=>u instanceof Error),s;if(this.useCallStack){try{n&&(s=this.parseCallStack(n,this.callStackSkipIndex+tu));}catch{}s=s||this.parseCallStack(new Error,this.callStackSkipIndex+Vm+tu);}let o=new o2(this.category,t,r,this.context,s,n);a2.send(o);}addContext(t,r){this.context[t]=r;}removeContext(t){delete this.context[t];}clearContext(){this.context={};}setParseCallStackFunction(t){if(typeof t=="function")this.parseCallStack=t;else if(typeof t>"u")this.parseCallStack=zm;else throw new TypeError("Invalid type passed to setParseCallStackFunction")}};function Gm(e){let t=jt.getLevel(e),n=t.toString().toLowerCase().replace(/_([a-z])/g,o=>o[1].toUpperCase()),s=n[0].toUpperCase()+n.slice(1);Xn.prototype[`is${s}Enabled`]=function(){return this.isLevelEnabled(t)},Xn.prototype[n]=function(...o){this.log(t,...o);};}jt.levels.forEach(Gm);Hm.addListener(()=>{jt.levels.forEach(Gm);});Jm.exports=Xn;});var Xm=B((BO,Qm)=>{var an=yr(),c2=':remote-addr - - ":method :url HTTP/:http-version" :status :content-length ":referrer" ":user-agent"';function l2(e){return e.originalUrl||e.url}function f2(e,t,r){let n=o=>{let u=o.concat();for(let c=0;cn.source?n.source:n);t=new RegExp(r.join("|"));}return t}function h2(e,t,r){let n=t;if(r){let s=r.find(o=>{let u=!1;return o.from&&o.to?u=e>=o.from&&e<=o.to:u=o.codes.indexOf(e)!==-1,u});s&&(n=an.getLevel(s.level,n));}return n}Qm.exports=function(t,r){typeof r=="string"||typeof r=="function"?r={format:r}:r=r||{};let n=t,s=an.getLevel(r.level,an.INFO),o=r.format||c2;return (u,c,d)=>{if(typeof u._logging<"u")return d();if(typeof r.nolog!="function"){let g=d2(r.nolog);if(g&&g.test(u.originalUrl))return d()}if(n.isLevelEnabled(s)||r.level==="auto"){let g=new Date,{writeHead:m}=c;u._logging=!0,c.writeHead=(F,C)=>{c.writeHead=m,c.writeHead(F,C),c.__statusCode=F,c.__headers=C||{};};let D=!1,y=()=>{if(D)return;if(D=!0,typeof r.nolog=="function"&&r.nolog(u,c)===!0){u._logging=!1;return}c.responseTime=new Date-g,c.statusCode&&r.level==="auto"&&(s=an.INFO,c.statusCode>=300&&(s=an.WARN),c.statusCode>=400&&(s=an.ERROR)),s=h2(c.statusCode,s,r.statusRules);let F=f2(u,c,r.tokens||[]);if(r.context&&n.addContext("res",c),typeof o=="function"){let C=o(u,c,_=>Km(_,F));C&&n.log(s,C);}else n.log(s,Km(o,F));r.context&&n.removeContext("res");};c.on("end",y),c.on("finish",y),c.on("error",y),c.on("close",y);}return d()}};});var ig=B((qO,ng)=>{var eg=qe()("log4js:recording"),xs=[];function p2(){return function(e){eg(`received logEvent, number of events now ${xs.length+1}`),eg("log event was ",e),xs.push(e);}}function tg(){return xs.slice()}function rg(){xs.length=0;}ng.exports={configure:p2,replay:tg,playback:tg,reset:rg,erase:rg};});var fg=B((YO,lg)=>{var cr=qe()("log4js:main"),m2=U("fs"),g2=Gf()({proto:!0}),D2=gr(),y2=da(),w2=yr(),sg=Ka(),og=eu(),v2=Zm(),E2=os(),_2=Xm(),F2=ig(),un=!1;function S2(e){if(!un)return;cr("Received log event ",e),og.appendersForCategory(e.categoryName).forEach(r=>{r(e);});}function C2(e){cr(`Loading configuration from ${e}`);try{return JSON.parse(m2.readFileSync(e,"utf8"))}catch(t){throw new Error(`Problem reading config from file "${e}". Error was ${t.message}`,t)}}function ag(e){un&&ug();let t=e;return typeof t=="string"&&(t=C2(e)),cr(`Configuration is ${t}`),D2.configure(g2(t)),E2.onMessage(S2),un=!0,cg}function O2(){return un}function b2(){return F2}function ug(e=()=>{}){if(typeof e!="function")throw new TypeError("Invalid callback passed to shutdown");cr("Shutdown called. Disabling all log writing."),un=!1;let t=Array.from(sg.values());sg.init(),og.init();let r=t.reduce((u,c)=>c.shutdown?u+1:u,0);r===0&&(cr("No appenders with shutdown functions found."),e());let n=0,s;cr(`Found ${r} appenders with shutdown functions.`);function o(u){s=s||u,n+=1,cr(`Appender shutdowns complete: ${n} / ${r}`),n>=r&&(cr("All shutdown functions completed."),e(s));}t.filter(u=>u.shutdown).forEach(u=>u.shutdown(o));}function x2(e){return un||ag(process.env.LOG4JS_CONFIG||{appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"OFF"}}}),new v2(e||"default")}var cg={getLogger:x2,configure:ag,isConfigured:O2,shutdown:ug,connectLogger:_2,levels:w2,addLayout:y2.addLayout,recording:b2};lg.exports=cg;});var dg=Qs(Wu());var Lf=Qs($i());var Jr=class e{nconf=Lf.default;_rootPath;_devmode;_appVersion;_logLevel;_dateFormat;_logDateFormat;_logFilePath;_ipAddress;_port;_login;_password;_limitTime;_settingsFilePath;ratioEnabled=!1;ratioLimit=2;constructor(t){process.env.UV_THREADPOOL_SIZE=os$1.cpus().length.toString(),this._rootPath=t??e.getRootDir(),this.init(),this._login=this.getParam("login"),this._password=this.getParam("password"),this._devmode=this.getParam("node_env")==="development",this._appVersion=this.getParam("version"),this._logLevel=this._devmode?"trace":this.getParam("log_level"),this._dateFormat=this.getParam("date_format"),this._logDateFormat=this.getParam("log_date_format"),this._logFilePath=this.getParam("log_file_path"),this._ipAddress=this.getParam("ip_address"),this._port=parseInt(this.getParam("tcp_port"),10),this._limitTime=parseInt(this.getParam("limit_time"),10),this._settingsFilePath=this.getParam("settings_file_path"),this.setRatio(),this.check();}get rootPath(){return this._rootPath}get devmode(){return this._devmode}get appVersion(){return this._appVersion}get logLevel(){return this._logLevel}get dateFormat(){return this._dateFormat}get logDateFormat(){return this._logDateFormat}get logFilePath(){return this._logFilePath}get ipAddress(){return this._ipAddress}get port(){return this._port}get login(){return this._login}get password(){return this._password}get limitTime(){return this._limitTime}get settingsFilePath(){return this._settingsFilePath}init(){let t=path.normalize(`${this.rootPath}/config.json`);this.nconf.env(),this.nconf.file("config",t),this.nconf.file("package",path.normalize(`${this.rootPath}/package.json`)),this.nconf.defaults({node_env:"production",log_level:"info",log_file_path:"/var/log/transmission/torrentclear.log",date_format:"DD.MM.YYYY_HH:mm:ss",log_date_format:"dd.MM.yyyy_hh:mm:ss.SSS",ip_address:"127.0.0.1",tcp_port:"9091",limit_time:"604800",settings_file_path:"/etc/transmission-daemon/settings.json"}),this.nconf.load(),this.settingsFileExists();let r=path.normalize(this.getParam("settings_file_path"));this.nconf.file("transmission",r),this.nconf.load();}setRatio(){this.ratioEnabled=!!this.getParam("ratio-limit-enabled"),this.ratioEnabled&&(this.ratioLimit=parseFloat(this.getParam("ratio-limit")));}check(){let t=this.getParam("login"),r=this.getParam("password");if(t===void 0||t===""||r===void 0||r==="")throw new Error("Login or password must be filled in config.json file or Environment")}settingsFileExists(){let t=path.normalize(this.getParam("settings_file_path"));if(!fs.existsSync(t)){let r=path.resolve(t);if(!fs.existsSync(r))throw new Error(`Transmission settings file not found on path ${t}`)}}static getRootDir(){let t=url.fileURLToPath(url.pathToFileURL(__filename).toString()),n=path.dirname(t);for(;!fs.existsSync(path.join(n,"package.json"));)n=path.join(n,"..");return path.normalize(n)}getParam(t){let r=this.nconf.get(t);return r===void 0&&(r=this.nconf.get(t.toUpperCase())),r}};var A2=Qs(fg());var As=class{log4js;_config;_logger;constructor(t){this.log4js=A2,this._config=new Jr(t),this.init(),this._logger=this.log4js.getLogger();}get logger(){return this._logger}get config(){return this._config}init(){let t={appenders:{console:{type:"console",layout:{type:"pattern",pattern:`[%d{${this.config.logDateFormat}}] : %[[%p]%] : %m`}},logFile:{type:"file",filename:this.config.logFilePath,maxLogSize:"10M",compress:!0,layout:{type:"pattern",pattern:`[%d{${this.config.logDateFormat}}] : [%p] : %m`}}},categories:{default:{appenders:this.config.devmode?["console"]:["console","logFile"],level:this.config.logLevel,enableCallStack:!!this.config.devmode}}};this.log4js.configure(t);}};var Ms=class{_config;_logger;_connect;regexSuccess=/success/i;regexTorrentInfo=/(?<=Name:\s)(.*?)(?=\s*Hash:)|(?<=State:\s)(.*?)(?=\s*Location:)|(?<=Location:\s)(.*?)(?=\s*Percent Done:)|(?<=Percent Done:\s)(.*?)%(?=\s*ETA:)|(?<=Ratio:\s)(.*?)(?=\s*Corrupt DL:)|(?<=Date finished:\s)(.*?)(?=\s*Date started:|$)/g;fileOrDirsState={FILE:1,DIR:2,NOTFOUND:3,UNKNOWN:4};_torrentInfo;_torrentSuccessCount=0;_torrentProcessCount=0;_torrentIDs=[];constructor(t){this._config=new Jr(t),this._logger=new As(t).logger,this._connect=this.connectCommandCreate(),this._torrentInfo={id:0,name:"",state:"",location:"",percent:0,ratio:0,dateDone:"",dateDifference:0};}get connect(){return this._connect}get config(){return this._config}get logger(){return this._logger}get torrentInfo(){return this._torrentInfo}set torrentInfo(t){this._torrentInfo=t;}get torrentSuccessCount(){return this._torrentSuccessCount}set torrentSuccessCount(t){this._torrentSuccessCount=t;}get torrentProcessCount(){return this._torrentProcessCount}set torrentProcessCount(t){this._torrentProcessCount=t;}get torrentIDs(){return this._torrentIDs}async main(){try{this.startInfo(),await this.getIDs(),await this.torrentsProcess(),this.endInfo();}catch(t){this.logger.error(t.message),this.endInfo(!0);}}startInfo(){this.logger.info("##############################################################################################"),this.logger.info(`transmission-torrentclear: "${this.config.appVersion}"`),this.logger.info("==============================================================================================");}endInfo(t=!1){this.logger.info("=============================================================================================="),t?this.logger.error("Failed to complete torrent verification process"):this.logger.info("Completing the torrent verification process"),this.logger.info(`############################################################################################## `);}async getIDs(){try{let t=`${this.connect} --list`;this.logger.debug(`Run command: "${t}"`);let n=(await this.command(t)).toString().match(/^\s+(\d+)\s.*?$/gim);if(n===null||n.length<1){this.logger.info("Torrents not found");return}this.logger.debug("Torrents list:");for(let s of n){this.logger.debug(`torrent: "${s.trim()}"`);let o=s.trim().match(/^(\d+).+$/i);if(o!==null){let u=o[1];this.logger.debug(`ID found: "${u}"`),this.torrentIDs.push(Number(u));}}this.torrentIDs.length>0&&this.logger.info(`IDs found: ${this.torrentIDs.join(", ")}`),this.torrentProcessCount=this.torrentIDs.length;}catch(t){throw this.logger.trace(t),t}}async torrentsProcess(){try{if(this.torrentIDs.length>0)for(let t of this.torrentIDs)this.logger.info("=============================================================================================="),this.logger.info(`TORRENT ID: "${t}" START PROCESS ...`),await this.getTorrentInfo(t),this.torrentInfo.percent===100?this.checkRatio(this.torrentInfo.ratio)?(this.logger.debug("==> ACTION: Torrent delete on Ratio Limit"),await this.clearTorrent(),this.torrentSuccessCount++,this.logger.info(`Stopping and deleting a torrent "${this.torrentInfo.name}" by ratio limit completed successfully`)):this.checkDateDifference(this.torrentInfo.dateDifference)?(this.logger.debug("==> ACTION: Torrent delete on Date Difference"),await this.clearTorrent(),this.torrentSuccessCount++,this.logger.info(`Stopping and deleting a torrent "${this.torrentInfo.name}" by datetime limit completed successfully`)):this.logger.info("NO ACTION NEEDED (DATE AND RATIO)"):this.logger.info("NO ACTION NEEDED (< 100)");}catch(t){throw this.logger.trace(t),t}}async clearTorrent(){try{let t=path.normalize(`${this.torrentInfo.location}/${this.torrentInfo.name}`);this.logger.debug(`normalized torrentPath: "${t}"`);let r=await this.isFileOrDirectoryOrUnknown(t);r===this.fileOrDirsState.FILE?(this.logger.info(`Torrent: "${this.torrentInfo.name}" is a FILE`),await this.torrentStop(),await this.torrentRemove()):r===this.fileOrDirsState.DIR?(this.logger.info(`Torrent: "${this.torrentInfo.name}" is a DIRECTORY`),await this.torrentStop(),await this.torrentRemoveAndDelete()):r===this.fileOrDirsState.NOTFOUND?(this.logger.warn(`Torrent: "${this.torrentInfo.name}" FILE NOT FOUND`),await this.torrentStop(),await this.torrentRemove()):this.logger.debug(`Torrent: "${this.torrentInfo.name}" is neither a file or a directory`);}catch(t){throw this.logger.trace(t),t}}async torrentStop(){try{let t=`${this.connect} --torrent ${this.torrentInfo.id} --stop`;this.logger.debug(`Stop torrent: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`),this.logger.debug(`Run command: "${t}"`);let r=await this.command(t);if(r=r.replace(/(\r\n|\n|\r)/gm,""),this.logger.debug(`execResultStop: ${r}`),!this.regexSuccess.test(r))throw new Error(`Failed to stop torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${r}`)}catch(t){throw this.logger.trace(t),t}}async torrentRemove(){try{let t=`${this.connect} --torrent ${this.torrentInfo.id} --remove`;this.logger.debug(`Remove torrent without deleting file: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`),this.logger.debug(`Run command: "${t}"`);let r=await this.command(t);if(r=r.replace(/(\r\n|\n|\r)/gm,""),this.logger.debug(`execResultRemove: ${r}`),!this.regexSuccess.test(r))throw new Error(`Failed to remove (no del) torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${r}`)}catch(t){throw this.logger.trace(t),t}}async torrentRemoveAndDelete(){try{let t=`${this.connect} --torrent ${this.torrentInfo.id} --remove-and-delete`;this.logger.debug(`Remove torrent with deleting file: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`),this.logger.debug(`Run command: "${t}"`);let r=await this.command(t);if(r=r.replace(/(\r\n|\n|\r)/gm,""),this.logger.debug(`execResultRemoveAndDelete: ${r}`),!this.regexSuccess.test(r))throw new Error(`Failed to remove and delete torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${r}`)}catch(t){throw this.logger.trace(t),t}}checkRatio(t){return t>=this.config.ratioLimit?(this.logger.info(`Torrent has reached the Ratio limit: "${t}" >= "${this.config.ratioLimit}"`),!0):!1}checkDateDifference(t){return t>=this.config.limitTime?(this.logger.info(`Torrent has reached the Date difference limit: "${t}" >= "${this.config.limitTime}"`),!0):!1}async getTorrentInfo(t){try{let r=`${this.connect} --torrent ${t} --info`;this.logger.debug(`Run command: "${r}"`);let s=(await this.command(r)).toString().matchAll(this.regexTorrentInfo),o=Array.from(s);if(o.length<1)throw new Error("Torrent info data is EMPTY");let u=o[0][1];if(u===void 0||u==="")throw new Error(`Torrent name not found in torrent info: "${t}"`);let c=o[1][2];if(c===void 0||c==="")throw new Error(`Torrent state not found in torrent info: "${t}"`);let d=o[2][3];if(d===void 0||d==="")throw new Error(`Torrent location not found in torrent info: "${t}"`);let g=o[3][4];if(g===void 0||g==="")throw new Error(`Torrent percent not found in torrent info: "${t}"`);let m=o[4][5];if(m===void 0||m==="")throw new Error(`Torrent ratio not found in torrent info: "${t}"`);let D=o[5][6];if(D===void 0||D==="")throw new Error(`Torrent date done not found in torrent info: "${t}"`);let y=Date.now(),F=Date.parse(D.trim());this.torrentInfo={id:Number(t),name:u.trim(),state:c.trim(),location:d.trim(),percent:Number(g.trim()),ratio:Number(m.trim()),dateDone:this.dateFormat(F),dateDifference:Math.round((y-F)/1e3)},this.logger.debug(`Torrent ID "${this.torrentInfo.id}" info:`),this.logger.debug(` Name: "${this.torrentInfo.name}"`),this.logger.debug(` State: "${this.torrentInfo.state}"`),this.logger.debug(` Location: "${this.torrentInfo.location}"`),this.logger.debug(` Percent Done: "${this.torrentInfo.percent}%"`),this.logger.debug(` Ratio: "${this.torrentInfo.ratio}" | limit: "${this.config.ratioLimit}"`),this.logger.debug(` Date finished: "${this.torrentInfo.dateDone}"`),this.logger.debug(` Date Difference: "${this.torrentInfo.dateDifference}" | limit: "${this.config.limitTime}"`);}catch(r){throw this.logger.trace(r),r}}connectCommandCreate(){return `transmission-remote ${this.config.ipAddress}:${this.config.port} --auth ${this.config.login}:${this.config.password}`}dateFormat(t){let r=new Date(t);return (0, dg.default)(r).format(this.config.dateFormat)}async command(t){try{return child_process.execSync(t,{timeout:2e3,encoding:"utf8"})}catch(r){throw this.logger.trace(r),r}}async isFileOrDirectoryOrUnknown(t){try{let r=fs.lstatSync(t),n=r.isFile(),s=r.isDirectory();return n?this.fileOrDirsState.FILE:s?this.fileOrDirsState.DIR:this.fileOrDirsState.UNKNOWN}catch(r){if(r.code==="ENOENT")return this.fileOrDirsState.NOTFOUND;throw this.logger.trace(r),r}}};new Ms().main(); /*! Bundled license information: diff --git a/package.json b/package.json index 02c0d7f..4b8b0d9 100644 --- a/package.json +++ b/package.json @@ -34,13 +34,14 @@ }, "devDependencies": { "@jest/globals": "29.7.0", + "@tsconfig/node20": "20.1.4", "@types/jest": "29.5.14", "@types/nconf": "0.10.7", - "@types/node": "22.9.0", + "@types/node": "22.10.0", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", "eslint": "8.57.1", - "eslint-plugin-github": "5.0.2", + "eslint-plugin-github": "5.1.2", "eslint-plugin-jest": "28.9.0", "eslint-plugin-jsonc": "2.18.2", "eslint-plugin-prettier": "5.2.1", @@ -49,10 +50,10 @@ "make-coverage-badge": "1.2.0", "moment": "2.30.1", "nconf": "0.12.1", - "prettier": "3.3.3", + "prettier": "3.4.1", "prettier-eslint": "16.3.0", "ts-jest": "29.2.5", "tsup": "8.3.5", - "typescript": "5.6.3" + "typescript": "5.7.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7216c02..22f7743 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@jest/globals': specifier: 29.7.0 version: 29.7.0 + '@tsconfig/node20': + specifier: 20.1.4 + version: 20.1.4 '@types/jest': specifier: 29.5.14 version: 29.5.14 @@ -18,32 +21,32 @@ importers: specifier: 0.10.7 version: 0.10.7 '@types/node': - specifier: 22.9.0 - version: 22.9.0 + specifier: 22.10.0 + version: 22.10.0 '@typescript-eslint/eslint-plugin': specifier: 7.18.0 - version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) + version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) '@typescript-eslint/parser': specifier: 7.18.0 - version: 7.18.0(eslint@8.57.1)(typescript@5.6.3) + version: 7.18.0(eslint@8.57.1)(typescript@5.7.2) eslint: specifier: 8.57.1 version: 8.57.1 eslint-plugin-github: - specifier: 5.0.2 - version: 5.0.2(eslint@8.57.1)(typescript@5.6.3) + specifier: 5.1.2 + version: 5.1.2(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) eslint-plugin-jest: specifier: 28.9.0 - version: 28.9.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3) + version: 28.9.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2) eslint-plugin-jsonc: specifier: 2.18.2 version: 2.18.2(eslint@8.57.1) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3) + version: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.4.1) jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.9.0) + version: 29.7.0(@types/node@22.10.0) log4js: specifier: 6.9.1 version: 6.9.1 @@ -51,26 +54,26 @@ importers: specifier: 1.2.0 version: 1.2.0 moment: - specifier: 2.30.1 + specifier: ^2.30.1 version: 2.30.1 nconf: specifier: 0.12.1 version: 0.12.1 prettier: - specifier: 3.3.3 - version: 3.3.3 + specifier: 3.4.1 + version: 3.4.1 prettier-eslint: specifier: 16.3.0 version: 16.3.0 ts-jest: specifier: 29.2.5 - version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(esbuild@0.24.0)(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3) + version: 29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(esbuild@0.24.0)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2) tsup: specifier: 8.3.5 - version: 8.3.5(typescript@5.6.3) + version: 8.3.5(typescript@5.7.2) typescript: - specifier: 5.6.3 - version: 5.6.3 + specifier: 5.7.2 + version: 5.7.2 packages: @@ -413,14 +416,31 @@ packages: resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint/compat@1.2.3': + resolution: {integrity: sha512-wlZhwlDFxkxIZ571aH0FoK4h4Vwx7P3HJx62Gp8hTc10bfpwT2x0nULuAHmQSJBOWPgPeVf+9YtnD4j50zVHmA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^9.10.0 + peerDependenciesMeta: + eslint: + optional: true + '@eslint/eslintrc@2.1.4': resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/eslintrc@3.2.0': + resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@8.57.1': resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/js@9.15.0': + resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@github/browserslist-config@1.0.0': resolution: {integrity: sha512-gIhjdJp/c2beaIWWIlsXdqXVRUz3r2BxBCpfz/F3JXHvSAQ1paMYjLH+maEATtENg+k5eLV7gA+9yPp762ieuw==} @@ -655,6 +675,9 @@ packages: '@sinonjs/fake-timers@10.3.0': resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + '@tsconfig/node20@20.1.4': + resolution: {integrity: sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==} + '@types/babel__core@7.20.5': resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} @@ -691,8 +714,8 @@ packages: '@types/nconf@0.10.7': resolution: {integrity: sha512-ltJgbQX0XgjkeDrz0anTCXLBLatppWYFCxp88ILEwybfAuyNWr0Qb+ceFFqZ0VDR8fguEjr0hH37ZF+AF4gsxw==} - '@types/node@22.9.0': - resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==} + '@types/node@22.10.0': + resolution: {integrity: sha512-XC70cRZVElFHfIUB40FgZOBbgJYFKKMa5nb9lxcwYstFG/Mi+/Y0bGS+rs6Dmhmkpq4pnNiLiuZAbc02YCOnmA==} '@types/stack-utils@2.0.3': resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} @@ -714,8 +737,8 @@ packages: typescript: optional: true - '@typescript-eslint/eslint-plugin@8.5.0': - resolution: {integrity: sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==} + '@typescript-eslint/eslint-plugin@8.16.0': + resolution: {integrity: sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -745,8 +768,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.5.0': - resolution: {integrity: sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==} + '@typescript-eslint/parser@8.16.0': + resolution: {integrity: sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -767,8 +790,8 @@ packages: resolution: {integrity: sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.5.0': - resolution: {integrity: sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==} + '@typescript-eslint/scope-manager@8.16.0': + resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/type-utils@7.18.0': @@ -781,10 +804,11 @@ packages: typescript: optional: true - '@typescript-eslint/type-utils@8.5.0': - resolution: {integrity: sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==} + '@typescript-eslint/type-utils@8.16.0': + resolution: {integrity: sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: @@ -802,8 +826,8 @@ packages: resolution: {integrity: sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.5.0': - resolution: {integrity: sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==} + '@typescript-eslint/types@8.16.0': + resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@6.21.0': @@ -833,8 +857,8 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.5.0': - resolution: {integrity: sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==} + '@typescript-eslint/typescript-estree@8.16.0': + resolution: {integrity: sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -854,11 +878,15 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.5.0': - resolution: {integrity: sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==} + '@typescript-eslint/utils@8.16.0': + resolution: {integrity: sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true '@typescript-eslint/visitor-keys@6.21.0': resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} @@ -872,8 +900,8 @@ packages: resolution: {integrity: sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.5.0': - resolution: {integrity: sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==} + '@typescript-eslint/visitor-keys@8.16.0': + resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.2.0': @@ -1384,8 +1412,8 @@ packages: eslint-import-resolver-webpack: optional: true - eslint-plugin-escompat@3.11.1: - resolution: {integrity: sha512-j/H70uveM+G9M0onQJOYM+h5trTjQfmBnhGzxAxwGrqARfgXwkfjs+SkvJ1j/a4ofyCIYpBQsGg7q+TowwPNmA==} + eslint-plugin-escompat@3.11.4: + resolution: {integrity: sha512-j0ywwNnIufshOzgAu+PfIig1c7VRClKSNKzpniMT2vXQ4leL5q+e/SpMFQU0nrdL2WFFM44XmhSuwmxb3G0CJg==} peerDependencies: eslint: '>=5.14.1' @@ -1395,16 +1423,11 @@ packages: peerDependencies: eslint: '>=4.19.1' - eslint-plugin-filenames@1.3.2: - resolution: {integrity: sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w==} - peerDependencies: - eslint: '*' - - eslint-plugin-github@5.0.2: - resolution: {integrity: sha512-nMdzWJQ5CimjQDY6SFeJ0KIXuNFf0dgDWEd4eP3UWfuTuP/dXcZJDg7MQRvAFt743T1zUi4+/HdOihfu8xJkLA==} + eslint-plugin-github@5.1.2: + resolution: {integrity: sha512-8AwCtjp3oyTk7VnqoqhuWyf9OXqO6JMLzBjBogwziohHHVYD8n7elaCmXP5bgsED/3u1B+HgzcicdCsP2UmX5w==} hasBin: true peerDependencies: - eslint: ^8.0.1 + eslint: ^8 || ^9 eslint-plugin-i18n-text@1.0.1: resolution: {integrity: sha512-3G3UetST6rdqhqW9SfcfzNYMpQXS7wNkJvp6dsXnjzGiku6Iu5hl3B0kmk6lIcFPwYjhQIY+tXVRtK9TlGT7RA==} @@ -1476,12 +1499,20 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@8.57.1: resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true + espree@10.3.0: + resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1660,6 +1691,14 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globals@15.12.0: + resolution: {integrity: sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==} + engines: {node: '>=18'} + globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -2137,27 +2176,15 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} - lodash.camelcase@4.3.0: - resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} - - lodash.kebabcase@4.1.1: - resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==} - lodash.memoize@4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - lodash.snakecase@4.1.1: - resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} - lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} - lodash.upperfirst@4.3.1: - resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} - lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -2429,8 +2456,8 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + prettier@3.4.1: + resolution: {integrity: sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==} engines: {node: '>=14'} hasBin: true @@ -2818,16 +2845,26 @@ packages: resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} engines: {node: '>= 0.4'} - typescript@5.6.3: - resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + typescript-eslint@8.16.0: + resolution: {integrity: sha512-wDkVmlY6O2do4V+lZd0GtRfbtXbeD0q9WygwXXSJnC1xorE8eqyC2L1tJimqpSeFrOzRlYtWnUp/uzgHQOgfBQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} engines: {node: '>=14.17'} hasBin: true unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} @@ -3214,6 +3251,10 @@ snapshots: '@eslint-community/regexpp@4.11.1': {} + '@eslint/compat@1.2.3(eslint@8.57.1)': + optionalDependencies: + eslint: 8.57.1 + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 @@ -3228,8 +3269,24 @@ snapshots: transitivePeerDependencies: - supports-color + '@eslint/eslintrc@3.2.0': + dependencies: + ajv: 6.12.6 + debug: 4.3.7 + espree: 10.3.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + '@eslint/js@8.57.1': {} + '@eslint/js@9.15.0': {} + '@github/browserslist-config@1.0.0': {} '@humanwhocodes/config-array@0.13.0': @@ -3266,7 +3323,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.10.0 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -3279,14 +3336,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.10.0 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.9.0) + jest-config: 29.7.0(@types/node@22.10.0) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -3311,7 +3368,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.10.0 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -3329,7 +3386,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.9.0 + '@types/node': 22.10.0 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -3351,7 +3408,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.9.0 + '@types/node': 22.10.0 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -3421,7 +3478,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.9.0 + '@types/node': 22.10.0 '@types/yargs': 17.0.32 chalk: 4.1.2 @@ -3525,6 +3582,8 @@ snapshots: dependencies: '@sinonjs/commons': 3.0.1 + '@tsconfig/node20@20.1.4': {} + '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.24.4 @@ -3550,7 +3609,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.9.0 + '@types/node': 22.10.0 '@types/istanbul-lib-coverage@2.0.6': {} @@ -3571,9 +3630,9 @@ snapshots: '@types/nconf@0.10.7': {} - '@types/node@22.9.0': + '@types/node@22.10.0': dependencies: - undici-types: 6.19.8 + undici-types: 6.20.0 '@types/stack-utils@2.0.3': {} @@ -3583,78 +3642,78 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.7.2) '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.7.2) '@typescript-eslint/visitor-keys': 7.18.0 eslint: 8.57.1 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.3.0(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.5.0(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/type-utils': 8.5.0(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/utils': 8.5.0(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/parser': 8.16.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/type-utils': 8.16.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.16.0 eslint: 8.57.1 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.7.2) '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.6 + debug: 4.3.7 eslint: 8.57.1 optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.2) '@typescript-eslint/visitor-keys': 7.18.0 debug: 4.3.6 eslint: 8.57.1 optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: - '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.16.0 debug: 4.3.7 eslint: 8.57.1 optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -3673,33 +3732,33 @@ snapshots: '@typescript-eslint/types': 8.13.0 '@typescript-eslint/visitor-keys': 8.13.0 - '@typescript-eslint/scope-manager@8.5.0': + '@typescript-eslint/scope-manager@8.16.0': dependencies: - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/visitor-keys': 8.16.0 - '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.3) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.2) + '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.7.2) debug: 4.3.6 eslint: 8.57.1 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.3.0(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@8.5.0(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.16.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.5.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@8.57.1)(typescript@5.7.2) debug: 4.3.7 - ts-api-utils: 1.3.0(typescript@5.6.3) + eslint: 8.57.1 + ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - - eslint - supports-color '@typescript-eslint/types@6.21.0': {} @@ -3708,24 +3767,24 @@ snapshots: '@typescript-eslint/types@8.13.0': {} - '@typescript-eslint/types@8.5.0': {} + '@typescript-eslint/types@8.16.0': {} - '@typescript-eslint/typescript-estree@6.21.0(typescript@5.6.3)': + '@typescript-eslint/typescript-estree@6.21.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.6 + debug: 4.3.7 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.3.0(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.6.3)': + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 @@ -3734,13 +3793,13 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.3.0(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.13.0(typescript@5.6.3)': + '@typescript-eslint/typescript-estree@8.13.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 8.13.0 '@typescript-eslint/visitor-keys': 8.13.0 @@ -3749,59 +3808,60 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.5.0(typescript@5.6.3)': + '@typescript-eslint/typescript-estree@8.16.0(typescript@5.7.2)': dependencies: - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/visitor-keys': 8.16.0 debug: 4.3.7 fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.2) eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.13.0(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/utils@8.13.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) '@typescript-eslint/scope-manager': 8.13.0 '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.7.2) eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.5.0(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/utils@8.16.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) - '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) eslint: 8.57.1 + optionalDependencies: + typescript: 5.7.2 transitivePeerDependencies: - supports-color - - typescript '@typescript-eslint/visitor-keys@6.21.0': dependencies: @@ -3818,10 +3878,10 @@ snapshots: '@typescript-eslint/types': 8.13.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.5.0': + '@typescript-eslint/visitor-keys@8.16.0': dependencies: - '@typescript-eslint/types': 8.5.0 - eslint-visitor-keys: 3.4.3 + '@typescript-eslint/types': 8.16.0 + eslint-visitor-keys: 4.2.0 '@ungap/structured-clone@1.2.0': {} @@ -4107,13 +4167,13 @@ snapshots: convert-source-map@2.0.0: {} - create-jest@29.7.0(@types/node@22.9.0): + create-jest@29.7.0(@types/node@22.10.0): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.9.0) + jest-config: 29.7.0(@types/node@22.10.0) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -4405,17 +4465,17 @@ snapshots: esquery: 1.6.0 jsonc-eslint-parser: 2.4.0 - eslint-module-utils@2.11.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): + eslint-module-utils@2.11.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.5.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.7.2) eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-escompat@3.11.1(eslint@8.57.1): + eslint-plugin-escompat@3.11.4(eslint@8.57.1): dependencies: browserslist: 4.23.3 eslint: 8.57.1 @@ -4426,36 +4486,31 @@ snapshots: eslint: 8.57.1 ignore: 5.3.2 - eslint-plugin-filenames@1.3.2(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - lodash.camelcase: 4.3.0 - lodash.kebabcase: 4.1.1 - lodash.snakecase: 4.1.1 - lodash.upperfirst: 4.3.1 - - eslint-plugin-github@5.0.2(eslint@8.57.1)(typescript@5.6.3): + eslint-plugin-github@5.1.2(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2): dependencies: + '@eslint/compat': 1.2.3(eslint@8.57.1) + '@eslint/eslintrc': 3.2.0 + '@eslint/js': 9.15.0 '@github/browserslist-config': 1.0.0 - '@typescript-eslint/eslint-plugin': 8.5.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/parser': 8.5.0(eslint@8.57.1)(typescript@5.6.3) aria-query: 5.3.1 eslint: 8.57.1 eslint-config-prettier: 9.1.0(eslint@8.57.1) - eslint-plugin-escompat: 3.11.1(eslint@8.57.1) + eslint-plugin-escompat: 3.11.4(eslint@8.57.1) eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1) - eslint-plugin-filenames: 1.3.2(eslint@8.57.1) eslint-plugin-i18n-text: 1.0.1(eslint@8.57.1) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1) eslint-plugin-jsx-a11y: 6.10.0(eslint@8.57.1) eslint-plugin-no-only-tests: 3.3.0 - eslint-plugin-prettier: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3) + eslint-plugin-prettier: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.4.1) eslint-rule-documentation: 1.0.23 + globals: 15.12.0 jsx-ast-utils: 3.3.5 - prettier: 3.3.3 + prettier: 3.4.1 svg-element-attributes: 1.3.1 + typescript-eslint: 8.16.0(eslint@8.57.1)(typescript@5.7.2) transitivePeerDependencies: - '@types/eslint' + - '@typescript-eslint/parser' - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color @@ -4465,7 +4520,7 @@ snapshots: dependencies: eslint: 8.57.1 - eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1): + eslint-plugin-import@2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -4476,7 +4531,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.5.0(eslint@8.57.1)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -4487,19 +4542,19 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.5.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.7.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3): + eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2): dependencies: - '@typescript-eslint/utils': 8.13.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/utils': 8.13.0(eslint@8.57.1)(typescript@5.7.2) eslint: 8.57.1 optionalDependencies: - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) - jest: 29.7.0(@types/node@22.9.0) + '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) + jest: 29.7.0(@types/node@22.10.0) transitivePeerDependencies: - supports-color - typescript @@ -4540,10 +4595,10 @@ snapshots: eslint-plugin-no-only-tests@3.3.0: {} - eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.4.1): dependencies: eslint: 8.57.1 - prettier: 3.3.3 + prettier: 3.4.1 prettier-linter-helpers: 1.0.0 synckit: 0.9.1 optionalDependencies: @@ -4558,6 +4613,8 @@ snapshots: eslint-visitor-keys@3.4.3: {} + eslint-visitor-keys@4.2.0: {} + eslint@8.57.1: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) @@ -4601,6 +4658,12 @@ snapshots: transitivePeerDependencies: - supports-color + espree@10.3.0: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 4.2.0 + espree@9.6.1: dependencies: acorn: 8.14.0 @@ -4794,6 +4857,10 @@ snapshots: dependencies: type-fest: 0.20.2 + globals@14.0.0: {} + + globals@15.12.0: {} + globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -5060,7 +5127,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.10.0 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -5080,16 +5147,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.9.0): + jest-cli@29.7.0(@types/node@22.10.0): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.9.0) + create-jest: 29.7.0(@types/node@22.10.0) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@22.9.0) + jest-config: 29.7.0(@types/node@22.10.0) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -5099,7 +5166,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.9.0): + jest-config@29.7.0(@types/node@22.10.0): dependencies: '@babel/core': 7.24.4 '@jest/test-sequencer': 29.7.0 @@ -5124,7 +5191,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.9.0 + '@types/node': 22.10.0 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -5153,7 +5220,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.10.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -5163,7 +5230,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.9.0 + '@types/node': 22.10.0 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -5202,7 +5269,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.10.0 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -5237,7 +5304,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.10.0 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -5265,7 +5332,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.10.0 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -5311,7 +5378,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.10.0 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -5330,7 +5397,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.9.0 + '@types/node': 22.10.0 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -5339,17 +5406,17 @@ snapshots: jest-worker@29.7.0: dependencies: - '@types/node': 22.9.0 + '@types/node': 22.10.0 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.9.0): + jest@29.7.0(@types/node@22.10.0): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@22.9.0) + jest-cli: 29.7.0(@types/node@22.10.0) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -5436,20 +5503,12 @@ snapshots: dependencies: p-locate: 5.0.0 - lodash.camelcase@4.3.0: {} - - lodash.kebabcase@4.1.1: {} - lodash.memoize@4.1.2: {} lodash.merge@4.6.2: {} - lodash.snakecase@4.1.1: {} - lodash.sortby@4.7.0: {} - lodash.upperfirst@4.3.1: {} - lodash@4.17.21: {} log4js@6.9.1: @@ -5680,17 +5739,17 @@ snapshots: prettier-eslint@16.3.0: dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.7.2) common-tags: 1.8.2 dlv: 1.1.3 eslint: 8.57.1 indent-string: 4.0.0 lodash.merge: 4.6.2 loglevel-colored-level-prefix: 1.0.0 - prettier: 3.3.3 + prettier: 3.4.1 pretty-format: 29.7.0 require-relative: 0.8.7 - typescript: 5.6.3 + typescript: 5.7.2 vue-eslint-parser: 9.4.2(eslint@8.57.1) transitivePeerDependencies: - supports-color @@ -5699,7 +5758,7 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier@3.3.3: {} + prettier@3.4.1: {} pretty-format@29.7.0: dependencies: @@ -6011,28 +6070,28 @@ snapshots: tree-kill@1.2.2: {} - ts-api-utils@1.3.0(typescript@5.6.3): + ts-api-utils@1.3.0(typescript@5.7.2): dependencies: - typescript: 5.6.3 + typescript: 5.7.2 - ts-api-utils@1.4.0(typescript@5.6.3): + ts-api-utils@1.4.0(typescript@5.7.2): dependencies: - typescript: 5.6.3 + typescript: 5.7.2 ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(esbuild@0.24.0)(jest@29.7.0(@types/node@22.9.0))(typescript@5.6.3): + ts-jest@29.2.5(@babel/core@7.24.4)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.4))(esbuild@0.24.0)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.9.0) + jest: 29.7.0(@types/node@22.10.0) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.6.3 - typescript: 5.6.3 + typescript: 5.7.2 yargs-parser: 21.1.1 optionalDependencies: '@babel/core': 7.24.4 @@ -6052,7 +6111,7 @@ snapshots: tslib@2.8.1: {} - tsup@8.3.5(typescript@5.6.3): + tsup@8.3.5(typescript@5.7.2): dependencies: bundle-require: 5.0.0(esbuild@0.24.0) cac: 6.7.14 @@ -6071,7 +6130,7 @@ snapshots: tinyglobby: 0.2.10 tree-kill: 1.2.2 optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color @@ -6120,7 +6179,18 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 - typescript@5.6.3: {} + typescript-eslint@8.16.0(eslint@8.57.1)(typescript@5.7.2): + dependencies: + '@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/parser': 8.16.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@8.57.1)(typescript@5.7.2) + eslint: 8.57.1 + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + typescript@5.7.2: {} unbox-primitive@1.0.2: dependencies: @@ -6129,7 +6199,7 @@ snapshots: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - undici-types@6.19.8: {} + undici-types@6.20.0: {} universalify@0.1.2: {} @@ -6151,7 +6221,7 @@ snapshots: vue-eslint-parser@9.4.2(eslint@8.57.1): dependencies: - debug: 4.3.6 + debug: 4.3.7 eslint: 8.57.1 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 diff --git a/src/class/config.ts b/src/class/config.ts index eddb223..25f457d 100644 --- a/src/class/config.ts +++ b/src/class/config.ts @@ -94,11 +94,6 @@ class Config { * else default 2 */ ratioLimit = 2; - /** - * Metrics save file path - * Default: `/var/log/transmission/torrentclear_metrics.log` - */ - // private readonly _metricsFilePath: string; constructor(root_path?: string) { process.env.UV_THREADPOOL_SIZE = cpus().length.toString(); @@ -113,10 +108,9 @@ class Config { this._dateFormat = this.getParam('date_format'); this._logDateFormat = this.getParam('log_date_format'); this._logFilePath = this.getParam('log_file_path'); - // this._metricsFilePath = this.getParam('metrics_file_path'); this._ipAddress = this.getParam('ip_address'); - this._port = Number(this.getParam('tcp_port')); - this._limitTime = Number(this.getParam('limit_time')); + this._port = parseInt(this.getParam('tcp_port'), 10); + this._limitTime = parseInt(this.getParam('limit_time'), 10); this._settingsFilePath = this.getParam('settings_file_path'); this.setRatio(); this.check(); @@ -166,10 +160,6 @@ class Config { return this._password; } - // get metricsFilePath(): string { - // return this._metricsFilePath; - // } - get limitTime(): number { return this._limitTime; } @@ -192,7 +182,6 @@ class Config { node_env: 'production', log_level: 'info', log_file_path: '/var/log/transmission/torrentclear.log', - // metrics_file_path: '/var/log/transmission/torrentclear_metrics.log', date_format: 'DD.MM.YYYY_HH:mm:ss', // https://www.npmjs.com/package/moment log_date_format: 'dd.MM.yyyy_hh:mm:ss.SSS', // https://www.npmjs.com/package/date-format ip_address: '127.0.0.1', @@ -212,7 +201,7 @@ class Config { */ private setRatio(): void { this.ratioEnabled = Boolean(this.getParam('ratio-limit-enabled')); - if (this.ratioEnabled) this.ratioLimit = Number(this.getParam('ratio-limit')); + if (this.ratioEnabled) this.ratioLimit = parseFloat(this.getParam('ratio-limit')); } /** diff --git a/src/class/metrics.ts.no b/src/class/metrics.ts.no deleted file mode 100644 index a882c2c..0000000 --- a/src/class/metrics.ts.no +++ /dev/null @@ -1,100 +0,0 @@ -// import { memoryUsage, resourceUsage, cpuUsage, pid, title, uptime } from 'node:process'; -// import { writeFileSync } from 'node:fs'; -// import { normalize } from 'node:path'; -// // -// import { Config } from './config'; -// import { ServerLogger } from './server-logger'; - -// interface MetricsI { -// pid: number; -// title: string; -// memory: NodeJS.MemoryUsage; -// cpu: NodeJS.CpuUsage; -// pcpu: number; -// resource: NodeJS.ResourceUsage; -// uptime: number; -// unix_timestamp: number; -// } - -// /** -// * Metrics class -// * Save metrics to metrics File. -// * Doc: -// * [memoryUsage](https://nodejs.org/docs/latest-v16.x/api/process.html#processmemoryusage), -// * [resourceUsage](https://nodejs.org/docs/latest-v16.x/api/process.html#processresourceusage), -// * [cpuUsage](https://nodejs.org/docs/latest-v16.x/api/process.html#processcpuusagepreviousvalue) -// */ -// class Metrics { -// /** -// * Config instance object. -// */ -// private readonly config: Config; -// /** -// * Logger instance object. -// */ -// private readonly logger: Logger; -// /** -// * PID process -// */ -// private readonly pid: number; -// /** -// * Number of seconds the current Node.js process has been running. -// */ -// private uptime: number; -// /** -// * Current process title -// */ -// private readonly processTitle: string; -// /** -// * User and System CPU time usage of the current process -// * Example: `{ user: 38579, system: 6986 }` -// */ -// private cpuUsage: NodeJS.CpuUsage; -// /** -// * Start Date for CPU usage in Percent -// */ -// private startDate: number; - -// constructor(config: Config, logger: Logger) { -// this.config = config; -// this.logger = logger; -// this.pid = pid; -// this.processTitle = title; -// this.uptime = 0; -// this.cpuUsage = cpuUsage(); -// this.startDate = Date.now(); -// this.init(); -// } - -// private init(): void { -// this.logger.debug(`Start save metrics for process PID: ${this.pid}, TITLE: ${this.processTitle}`); -// } - -// public async save(): Promise { -// try { -// const memory: NodeJS.MemoryUsage = memoryUsage(); -// this.cpuUsage = cpuUsage(this.cpuUsage); -// const resource: NodeJS.ResourceUsage = resourceUsage(); -// this.uptime = uptime(); -// const file: string = normalize(this.config.metricsFilePath); -// // -// const metrics: MetricsI = { -// pid: this.pid, -// title: this.processTitle, -// memory: memory, -// cpu: this.cpuUsage, -// pcpu: (100 * (this.cpuUsage.user + this.cpuUsage.system)) / ((Date.now() - this.startDate) * 1000), -// resource: resource, -// uptime: this.uptime, -// unix_timestamp: Math.trunc(Date.now() / 1000), // ms => sec -// }; -// // -// writeFileSync(file, JSON.stringify(metrics), 'utf-8'); -// this.logger.debug(`Metrics saved to file "${file}"`); -// } catch (error) { -// throw error; -// } -// } -// } - -// export { Metrics }; diff --git a/src/types/index.d.ts b/src/types/index.d.ts index 707237f..ab5eeeb 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -1,5 +1,3 @@ -/// - import { type Configuration } from 'log4js'; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/torrentclear.timer b/torrentclear.timer index e3ff1be..ec9ed58 100644 --- a/torrentclear.timer +++ b/torrentclear.timer @@ -18,4 +18,4 @@ Unit=torrentclear.service OnCalendar=*-*-* *:00:00 [Install] -WantedBy=timers.target \ No newline at end of file +WantedBy=timers.target diff --git a/tsconfig.json b/tsconfig.json index 8c2a77b..ed8b445 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,21 +1,8 @@ { - "$schema": "https://json.schemastore.org/tsconfig", + "extends": "@tsconfig/node20/tsconfig.json", "compilerOptions": { - "target": "ESNext", - "module": "NodeNext", - "rootDir": "./", - "moduleResolution": "NodeNext", - "baseUrl": "./", - "sourceMap": true, - "outDir": "./dist", - "noImplicitAny": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "skipLibCheck": true, - "newLine": "lf", - "removeComments": true, - "types": ["jest", "./src/types"] + "outDir": "dist", + "newLine": "lf" }, "exclude": ["./dist", "./node_modules", "./__tests__", "./coverage"] } From f4e45359022a489f4b9a1a2e7da29962830c5664 Mon Sep 17 00:00:00 2001 From: GregoryGost Date: Wed, 27 Nov 2024 11:50:26 +0300 Subject: [PATCH 12/19] pnpm lock-file up --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 22f7743..28e58b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,7 +54,7 @@ importers: specifier: 1.2.0 version: 1.2.0 moment: - specifier: ^2.30.1 + specifier: 2.30.1 version: 2.30.1 nconf: specifier: 0.12.1 From 0bf40de06354be5a6a68ce265661e26ea58ffd99 Mon Sep 17 00:00:00 2001 From: GregoryGost Date: Wed, 27 Nov 2024 15:52:15 +0300 Subject: [PATCH 13/19] remove async await, refactor code (config checks) --- .eslintrc.json | 32 +--- .github/linters/.eslintrc.yml | 32 +--- __tests__/config.test.ts | 16 +- __tests__/configs/no_login/package.json | 3 + __tests__/index.test.ts | 19 +- __tests__/server-logger.test.ts | 19 +- __tests__/torrentclear.test.ts | 92 ++++----- dist/index.js | 58 +++--- package.json | 4 +- pnpm-lock.yaml | 236 ++++++++++-------------- src/class/config.ts | 82 ++++---- src/class/torrentclear.ts | 59 +++--- 12 files changed, 304 insertions(+), 348 deletions(-) create mode 100644 __tests__/configs/no_login/package.json diff --git a/.eslintrc.json b/.eslintrc.json index 54d564b..614ff4b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,8 +19,7 @@ "plugins": ["jest", "@typescript-eslint"], "extends": [ "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-type-checked", "plugin:github/recommended", "plugin:jest/recommended" ], @@ -31,41 +30,28 @@ "i18n-text/no-en": "off", "import/no-namespace": "off", "no-console": "warn", - "no-unused-vars": "off", - "prettier/prettier": "error", "semi": "off", + "@typescript-eslint/space-before-function-paren": "off", + "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-unnecessary-type-assertion": "off", + "@typescript-eslint/prefer-for-of": "warn", + "@typescript-eslint/prefer-function-type": "warn", "@typescript-eslint/array-type": "error", - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/ban-ts-comment": "error", "@typescript-eslint/consistent-type-assertions": "error", "@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "no-public" }], "@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }], - "@typescript-eslint/func-call-spacing": ["error", "never"], - "@typescript-eslint/no-array-constructor": "error", "@typescript-eslint/no-empty-interface": "error", - "@typescript-eslint/no-explicit-any": "warn", "@typescript-eslint/no-extraneous-class": "error", - "@typescript-eslint/no-for-in-array": "error", "@typescript-eslint/no-inferrable-types": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-namespace": "error", "@typescript-eslint/no-non-null-assertion": "warn", - "@typescript-eslint/no-require-imports": "error", "@typescript-eslint/no-unnecessary-qualifier": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-unused-vars": "error", "@typescript-eslint/no-useless-constructor": "error", "@typescript-eslint/no-var-requires": "error", - "@typescript-eslint/prefer-for-of": "warn", - "@typescript-eslint/prefer-function-type": "warn", "@typescript-eslint/prefer-includes": "error", "@typescript-eslint/prefer-string-starts-ends-with": "error", "@typescript-eslint/promise-function-async": "error", - "@typescript-eslint/require-array-sort-compare": "error", - "@typescript-eslint/restrict-plus-operands": "error", - "@typescript-eslint/semi": "off", - "@typescript-eslint/space-before-function-paren": "off", - "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/unbound-method": "error" + "@typescript-eslint/require-array-sort-compare": "error" } } diff --git a/.github/linters/.eslintrc.yml b/.github/linters/.eslintrc.yml index 2e79dc3..6b1654f 100644 --- a/.github/linters/.eslintrc.yml +++ b/.github/linters/.eslintrc.yml @@ -29,8 +29,7 @@ plugins: extends: - eslint:recommended - - plugin:@typescript-eslint/eslint-recommended - - plugin:@typescript-eslint/recommended + - plugin:@typescript-eslint/recommended-type-checked - plugin:github/recommended - plugin:jest/recommended @@ -42,40 +41,27 @@ rules: 'i18n-text/no-en': 'off', 'import/no-namespace': 'off', 'no-console': 'warn', - 'no-unused-vars': 'off', - 'prettier/prettier': 'error', 'semi': 'off', + '@typescript-eslint/space-before-function-paren': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unnecessary-type-assertion': 'off', + '@typescript-eslint/prefer-for-of': 'warn', + '@typescript-eslint/prefer-function-type': 'warn', '@typescript-eslint/array-type': 'error', - '@typescript-eslint/await-thenable': 'error', - '@typescript-eslint/ban-ts-comment': 'error', '@typescript-eslint/consistent-type-assertions': 'error', '@typescript-eslint/explicit-member-accessibility': ['error', { 'accessibility': 'no-public' }], '@typescript-eslint/explicit-function-return-type': ['error', { 'allowExpressions': true }], - '@typescript-eslint/func-call-spacing': ['error', 'never'], - '@typescript-eslint/no-array-constructor': 'error', '@typescript-eslint/no-empty-interface': 'error', - '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-extraneous-class': 'error', - '@typescript-eslint/no-for-in-array': 'error', '@typescript-eslint/no-inferrable-types': 'error', - '@typescript-eslint/no-misused-new': 'error', - '@typescript-eslint/no-namespace': 'error', '@typescript-eslint/no-non-null-assertion': 'warn', - '@typescript-eslint/no-require-imports': 'error', '@typescript-eslint/no-unnecessary-qualifier': 'error', - '@typescript-eslint/no-unnecessary-type-assertion': 'error', - '@typescript-eslint/no-unused-vars': 'error', '@typescript-eslint/no-useless-constructor': 'error', '@typescript-eslint/no-var-requires': 'error', - '@typescript-eslint/prefer-for-of': 'warn', - '@typescript-eslint/prefer-function-type': 'warn', '@typescript-eslint/prefer-includes': 'error', '@typescript-eslint/prefer-string-starts-ends-with': 'error', '@typescript-eslint/promise-function-async': 'error', - '@typescript-eslint/require-array-sort-compare': 'error', - '@typescript-eslint/restrict-plus-operands': 'error', - '@typescript-eslint/semi': 'off', - '@typescript-eslint/space-before-function-paren': 'off', - '@typescript-eslint/type-annotation-spacing': 'error', - '@typescript-eslint/unbound-method': 'error' + '@typescript-eslint/require-array-sort-compare': 'error' } diff --git a/__tests__/config.test.ts b/__tests__/config.test.ts index da27878..c6fb062 100644 --- a/__tests__/config.test.ts +++ b/__tests__/config.test.ts @@ -3,7 +3,7 @@ * Unit tests for src/class/config.ts */ import { cwd } from 'node:process'; -import { normalize, join } from 'node:path'; +import { normalize, join, resolve } from 'node:path'; // import { Config } from '../src/class/config'; @@ -14,7 +14,7 @@ describe('config.ts', () => { /** * Instance test */ - it('config instance', async () => { + it('config instance', () => { const testRootPath: string = normalize(join(cwd(), '__tests__', 'configs')); const config: Config = new Config(testRootPath); expect(config instanceof Config).toBe(true); @@ -22,7 +22,7 @@ describe('config.ts', () => { /** * Throw exceptions */ - it('config init error settings file', async () => { + it('config init error config file', () => { // no config file try { new Config(); @@ -30,23 +30,23 @@ describe('config.ts', () => { // eslint-disable-next-line jest/no-conditional-expect expect(error).toHaveProperty( 'message', - `Transmission settings file not found on path ${normalize('/etc/transmission-daemon/settings.json')}` + `File not found on path "${normalize(join(cwd(), 'config.json'))}" or relative path "${resolve(normalize(join(cwd(), 'config.json')))}"` ); } }); - it('config init error login', async () => { + it('config init error login', () => { const testRootPath: string = normalize(join(cwd(), '__tests__', 'configs', 'no_login')); try { new Config(testRootPath); } catch (error) { // eslint-disable-next-line jest/no-conditional-expect - expect(error).toHaveProperty('message', 'Login or password must be filled in config.json file or Environment'); + expect(error).toHaveProperty('message', 'Parameter "login" incorrect value "undefined" of type "undefined"'); } }); /** * Get all parameters test */ - it('get base parameters', async () => { + it('get base parameters', () => { const testRootPath: string = normalize(join(cwd(), '__tests__', 'configs')); const config: Config = new Config(testRootPath); // @@ -65,7 +65,7 @@ describe('config.ts', () => { expect(config.limitTime).toBe(100000); expect(config.settingsFilePath).toBe('./__tests__/settings.json'); }); - it('get specific parameters if prod', async () => { + it('get specific parameters if prod', () => { const testRootPath: string = normalize(join(cwd(), '__tests__', 'configs', 'ak_prod')); const config: Config = new Config(testRootPath); // diff --git a/__tests__/configs/no_login/package.json b/__tests__/configs/no_login/package.json new file mode 100644 index 0000000..b2e05f1 --- /dev/null +++ b/__tests__/configs/no_login/package.json @@ -0,0 +1,3 @@ +{ + "version": "99.99.99" +} diff --git a/__tests__/index.test.ts b/__tests__/index.test.ts index 88e647e..f798946 100644 --- a/__tests__/index.test.ts +++ b/__tests__/index.test.ts @@ -10,15 +10,28 @@ let mainMock: jest.SpyInstance; describe('index.ts', () => { beforeEach(() => { mainMock = jest.spyOn(Torrentclear.prototype, 'main').mockImplementation(); - jest.spyOn(Config.prototype, 'check').mockImplementation(); - jest.spyOn(Config.prototype, 'settingsFileExists').mockImplementation(); + jest.spyOn(Config.prototype, 'getParam').mockImplementation((param_name: string): string => { + if (param_name === 'node_env') return 'production'; + if (param_name === 'log_level') return 'info'; + if (param_name === 'log_file_path') return '/var/log/transmission/torrentclear.log'; + if (param_name === 'date_format') return 'DD.MM.YYYY_HH:mm:ss'; + if (param_name === 'log_date_format') return 'dd.MM.yyyy_hh:mm:ss.SSS'; + if (param_name === 'ip_address') return '127.0.0.1'; + if (param_name === 'tcp_port') return '9091'; + if (param_name === 'limit_time') return '604800'; + if (param_name === 'login') return 'mock_login'; + if (param_name === 'password') return 'mock_password'; + if (param_name === 'settings_file_path') return '/etc/transmission-daemon/settings.json'; + return ''; + }); + jest.spyOn(Config.prototype, 'checkFileExists').mockImplementation(); // fix EACCES: permission denied, mkdir '/var/log/transmission' jest.spyOn(Config.prototype, 'logFilePath', 'get').mockReturnValue('./var/log/transmission'); }); afterEach(() => { jest.clearAllMocks(); }); - it('Torrentclear main run', async () => { + it('Torrentclear main run', () => { // eslint-disable-next-line @typescript-eslint/no-require-imports require('../src/index'); expect(mainMock).toHaveBeenCalled(); diff --git a/__tests__/server-logger.test.ts b/__tests__/server-logger.test.ts index 846b9bf..3e1cbac 100644 --- a/__tests__/server-logger.test.ts +++ b/__tests__/server-logger.test.ts @@ -1,9 +1,10 @@ +/* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable @typescript-eslint/no-explicit-any */ /** * Unit tests for src/class/server-logger.ts */ import { cwd } from 'node:process'; -import { normalize, join } from 'node:path'; +import { normalize, join, resolve } from 'node:path'; import type { Level } from 'log4js'; // import { ServerLogger } from '../src/class/server-logger'; @@ -22,15 +23,15 @@ describe('server-logger.ts', () => { /** * Instance test */ - it('server-logger instance', async () => { - const configSettingsFileExistsMock = jest.spyOn(Config.prototype as any, 'settingsFileExists').mockImplementation(); + it('server-logger instance', () => { + const configSettingsFileExistsMock = jest.spyOn(Config.prototype as any, 'checkFileExists').mockImplementation(); // const serverLogger: ServerLogger = new ServerLogger(devConfigPath); expect(serverLogger instanceof ServerLogger).toBe(true); // configSettingsFileExistsMock.mockRestore(); }); - it('server-logger instance - default path', async () => { + it('server-logger instance - default path', () => { // no config file try { new ServerLogger(); @@ -38,15 +39,15 @@ describe('server-logger.ts', () => { // eslint-disable-next-line jest/no-conditional-expect expect(error).toHaveProperty( 'message', - `Transmission settings file not found on path ${normalize('/etc/transmission-daemon/settings.json')}` + `File not found on path "${normalize(join(cwd(), 'config.json'))}" or relative path "${resolve(normalize(join(cwd(), 'config.json')))}"` ); } }); /** * Get config from server logger */ - it('get config and logger from ServerLogger', async () => { - const configSettingsFileExistsMock = jest.spyOn(Config.prototype as any, 'settingsFileExists').mockImplementation(); + it('get config and logger from ServerLogger', () => { + const configSettingsFileExistsMock = jest.spyOn(Config.prototype as any, 'checkFileExists').mockImplementation(); // get config const serverLogger: ServerLogger = new ServerLogger(devConfigPath); expect(serverLogger.config instanceof Config).toBe(true); @@ -65,8 +66,8 @@ describe('server-logger.ts', () => { /** * Dev or Prod config logger */ - it('develop or prod config for logger', async () => { - const configSettingsFileExistsMock = jest.spyOn(Config.prototype as any, 'settingsFileExists').mockImplementation(); + it('develop or prod config for logger', () => { + const configSettingsFileExistsMock = jest.spyOn(Config.prototype as any, 'checkFileExists').mockImplementation(); // develop // appenders, level, enableCallStack const serverLoggerDev: ServerLogger = new ServerLogger(devConfigPath); diff --git a/__tests__/torrentclear.test.ts b/__tests__/torrentclear.test.ts index 0ae7d65..2c087b1 100644 --- a/__tests__/torrentclear.test.ts +++ b/__tests__/torrentclear.test.ts @@ -1,3 +1,5 @@ +/* eslint-disable no-unused-vars */ +/* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unused-vars */ /** @@ -28,7 +30,7 @@ describe('torrentclear.ts - Positive tests', () => { /** * Instance test */ - it('Torrentclear instance and init params', async () => { + it('Torrentclear instance and init params', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); expect(torrentclear instanceof Torrentclear).toBe(true); expect(torrentclear.torrentInfo).toStrictEqual({ @@ -48,7 +50,7 @@ describe('torrentclear.ts - Positive tests', () => { /** * Clear OK process test */ - it('Torrentclear - clear process torrent is DIR, date diff', async () => { + it('Torrentclear - clear process torrent is DIR, date diff', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -140,7 +142,7 @@ LIMITS & BANDWIDTH }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // expect(torrentclear.torrentInfo.id).toEqual(35); expect(torrentclear.torrentInfo.name).toEqual('Шерлок Холмс S01 Serial WEB-DL (1080p)'); @@ -206,7 +208,7 @@ LIMITS & BANDWIDTH expect(torrentclear.torrentSuccessCount).toBe(1); expect(torrentclear.torrentIDs).toStrictEqual([35]); }); - it('Torrentclear - clear process torrent is DIR, ratio', async () => { + it('Torrentclear - clear process torrent is DIR, ratio', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -298,7 +300,7 @@ LIMITS & BANDWIDTH }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // expect(torrentclear.torrentInfo.id).toEqual(35); expect(torrentclear.torrentInfo.name).toEqual('Шерлок Холмс S01 Serial WEB-DL (1080p)'); @@ -363,7 +365,7 @@ LIMITS & BANDWIDTH expect(torrentclear.torrentSuccessCount).toBe(1); expect(torrentclear.torrentIDs).toStrictEqual([35]); }); - it('Torrentclear - clear process torrent is FILE, date diff', async () => { + it('Torrentclear - clear process torrent is FILE, date diff', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -450,7 +452,7 @@ LIMITS & BANDWIDTH }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // expect(torrentclear.torrentInfo.id).toEqual(7); expect(torrentclear.torrentInfo.name).toEqual('Beacon.23.S02E02.1080p.rus.LostFilm.TV.mkv'); @@ -515,7 +517,7 @@ LIMITS & BANDWIDTH expect(torrentclear.torrentSuccessCount).toBe(1); expect(torrentclear.torrentIDs).toStrictEqual([7]); }); - it('Torrentclear - clear process torrent is FILE, ratio', async () => { + it('Torrentclear - clear process torrent is FILE, ratio', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -602,7 +604,7 @@ LIMITS & BANDWIDTH }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // expect(torrentclear.torrentInfo.id).toEqual(7); expect(torrentclear.torrentInfo.name).toEqual('Beacon.23.S02E02.1080p.rus.LostFilm.TV.mkv'); @@ -667,7 +669,7 @@ LIMITS & BANDWIDTH expect(torrentclear.torrentSuccessCount).toBe(1); expect(torrentclear.torrentIDs).toStrictEqual([7]); }); - it('Torrentclear - clear process two torrents', async () => { + it('Torrentclear - clear process two torrents', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -812,7 +814,7 @@ LIMITS & BANDWIDTH }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // Log Error expect(logErrorMock).not.toHaveBeenCalled(); // @@ -820,7 +822,7 @@ LIMITS & BANDWIDTH expect(torrentclear.torrentSuccessCount).toBe(2); expect(torrentclear.torrentIDs).toStrictEqual([7, 9]); }); - it('Torrentclear - no torrent downloaded file but torrent exists', async () => { + it('Torrentclear - no torrent downloaded file but torrent exists', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -913,7 +915,7 @@ LIMITS & BANDWIDTH jest.spyOn(torrentclear.logger, 'warn').mockImplementation(); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // log Info expect(logInfoMock).toHaveBeenNthCalledWith(4, `IDs found: 17`); expect(logInfoMock).toHaveBeenNthCalledWith(6, `TORRENT ID: "17" START PROCESS ...`); @@ -951,7 +953,7 @@ describe('torrentclear.ts - No action tests', () => { beforeEach(() => { jest.clearAllMocks(); }); - it('Torrentclear - no torrents', async () => { + it('Torrentclear - no torrents', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -980,7 +982,7 @@ Sum: None 0.0 0.0`; }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // log Info expect(logInfoMock).toHaveBeenNthCalledWith(4, `Torrents not found`); expect(logInfoMock).toHaveBeenNthCalledWith(6, `Completing the torrent verification process`); @@ -996,7 +998,7 @@ Sum: None 0.0 0.0`; expect(torrentclear.torrentSuccessCount).toBe(0); expect(torrentclear.torrentIDs).toStrictEqual([]); }); - it('Torrentclear - no action needed', async () => { + it('Torrentclear - no action needed', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -1126,7 +1128,7 @@ LIMITS & BANDWIDTH }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // log Info expect(logInfoMock).toHaveBeenNthCalledWith(4, `IDs found: 7, 9`); expect(logInfoMock).toHaveBeenNthCalledWith(6, `TORRENT ID: "7" START PROCESS ...`); @@ -1156,7 +1158,7 @@ LIMITS & BANDWIDTH expect(torrentclear.torrentSuccessCount).toBe(0); expect(torrentclear.torrentIDs).toStrictEqual([7, 9]); }); - it('Torrentclear - not 100% completed', async () => { + it('Torrentclear - not 100% completed', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -1302,7 +1304,7 @@ LIMITS & BANDWIDTH }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // log Info expect(logInfoMock).toHaveBeenNthCalledWith(4, `IDs found: 7, 9`); expect(logInfoMock).toHaveBeenNthCalledWith(6, `TORRENT ID: "7" START PROCESS ...`); @@ -1317,7 +1319,7 @@ LIMITS & BANDWIDTH expect(torrentclear.torrentSuccessCount).toBe(0); expect(torrentclear.torrentIDs).toStrictEqual([7, 9]); }); - it('Torrentclear - Torrent no file or directory', async () => { + it('Torrentclear - Torrent no file or directory', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -1407,7 +1409,7 @@ LIMITS & BANDWIDTH }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // log Info expect(logInfoMock).toHaveBeenNthCalledWith(4, `IDs found: 7`); expect(logInfoMock).toHaveBeenNthCalledWith(6, `TORRENT ID: "7" START PROCESS ...`); @@ -1446,7 +1448,7 @@ describe('torrentclear.ts - Error tests', () => { beforeEach(() => { jest.clearAllMocks(); }); - it('Torrentclear - Error torrents list command', async () => { + it('Torrentclear - Error torrents list command', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -1471,7 +1473,7 @@ describe('torrentclear.ts - Error tests', () => { }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // log Debug expect(logDebugMock).toHaveBeenNthCalledWith( 1, @@ -1485,7 +1487,7 @@ describe('torrentclear.ts - Error tests', () => { expect(torrentclear.torrentSuccessCount).toBe(0); expect(torrentclear.torrentIDs).toStrictEqual([]); }); - it('Torrentclear - Error stop torrent command', async () => { + it('Torrentclear - Error stop torrent command', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -1565,7 +1567,7 @@ LIMITS & BANDWIDTH }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // log Info expect(logInfoMock).toHaveBeenNthCalledWith(4, `IDs found: 7`); expect(logInfoMock).toHaveBeenNthCalledWith(6, `TORRENT ID: "7" START PROCESS ...`); @@ -1593,7 +1595,7 @@ LIMITS & BANDWIDTH expect(torrentclear.torrentSuccessCount).toBe(0); expect(torrentclear.torrentIDs).toStrictEqual([7]); }); - it('Torrentclear - Error remove torrent command', async () => { + it('Torrentclear - Error remove torrent command', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -1676,7 +1678,7 @@ LIMITS & BANDWIDTH }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // log Info expect(logInfoMock).toHaveBeenNthCalledWith(4, `IDs found: 7`); expect(logInfoMock).toHaveBeenNthCalledWith(6, `TORRENT ID: "7" START PROCESS ...`); @@ -1704,7 +1706,7 @@ LIMITS & BANDWIDTH expect(torrentclear.torrentSuccessCount).toBe(0); expect(torrentclear.torrentIDs).toStrictEqual([7]); }); - it('Torrentclear - Error remove and delete torrent command', async () => { + it('Torrentclear - Error remove and delete torrent command', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -1791,7 +1793,7 @@ LIMITS & BANDWIDTH }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // log Info expect(logInfoMock).toHaveBeenNthCalledWith(4, `IDs found: 35`); expect(logInfoMock).toHaveBeenNthCalledWith(6, `TORRENT ID: "35" START PROCESS ...`); @@ -1819,7 +1821,7 @@ LIMITS & BANDWIDTH expect(torrentclear.torrentSuccessCount).toBe(0); expect(torrentclear.torrentIDs).toStrictEqual([35]); }); - it('Torrentclear - Error torrent information data (name, state, etc.)', async () => { + it('Torrentclear - Error torrent information data (name, state, etc.)', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -1850,7 +1852,7 @@ LIMITS & BANDWIDTH }); jest.spyOn(torrentclear.logger, 'trace').mockImplementation(); // - await torrentclear.main(); + torrentclear.main(); // log Info expect(logInfoMock).toHaveBeenNthCalledWith(4, `IDs found: 7`); expect(logInfoMock).toHaveBeenNthCalledWith(6, `TORRENT ID: "7" START PROCESS ...`); @@ -1876,7 +1878,7 @@ LIMITS & BANDWIDTH expect(torrentclear.torrentSuccessCount).toBe(0); expect(torrentclear.torrentIDs).toStrictEqual([7]); }); - it('Torrentclear - Error torrent name not found', async () => { + it('Torrentclear - Error torrent name not found', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // const execSyncMock = jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -1960,14 +1962,14 @@ LIMITS & BANDWIDTH return args; }); // - await torrentclear.main(); + torrentclear.main(); // Log Error expect(logErrorMock).toHaveBeenNthCalledWith(1, `Torrent name not found in torrent info: "35"`); expect(logErrorMock).toHaveBeenNthCalledWith(2, `Failed to complete torrent verification process`); // execSyncMock.mockRestore(); }); - it('Torrentclear - Error torrent state not found', async () => { + it('Torrentclear - Error torrent state not found', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // const execSyncMock = jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -2051,14 +2053,14 @@ LIMITS & BANDWIDTH return args; }); // - await torrentclear.main(); + torrentclear.main(); // Log Error expect(logErrorMock).toHaveBeenNthCalledWith(1, `Torrent state not found in torrent info: "35"`); expect(logErrorMock).toHaveBeenNthCalledWith(2, `Failed to complete torrent verification process`); // execSyncMock.mockRestore(); }); - it('Torrentclear - Error torrent location not found', async () => { + it('Torrentclear - Error torrent location not found', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // const execSyncMock = jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -2142,14 +2144,14 @@ LIMITS & BANDWIDTH return args; }); // - await torrentclear.main(); + torrentclear.main(); // Log Error expect(logErrorMock).toHaveBeenNthCalledWith(1, `Torrent location not found in torrent info: "35"`); expect(logErrorMock).toHaveBeenNthCalledWith(2, `Failed to complete torrent verification process`); // execSyncMock.mockRestore(); }); - it('Torrentclear - Error torrent percent not found', async () => { + it('Torrentclear - Error torrent percent not found', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // const execSyncMock = jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -2233,14 +2235,14 @@ LIMITS & BANDWIDTH return args; }); // - await torrentclear.main(); + torrentclear.main(); // Log Error expect(logErrorMock).toHaveBeenNthCalledWith(1, `Torrent percent not found in torrent info: "35"`); expect(logErrorMock).toHaveBeenNthCalledWith(2, `Failed to complete torrent verification process`); // execSyncMock.mockRestore(); }); - it('Torrentclear - Error ratio not found', async () => { + it('Torrentclear - Error ratio not found', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // const execSyncMock = jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -2324,14 +2326,14 @@ LIMITS & BANDWIDTH return args; }); // - await torrentclear.main(); + torrentclear.main(); // Log Error expect(logErrorMock).toHaveBeenNthCalledWith(1, `Torrent ratio not found in torrent info: "35"`); expect(logErrorMock).toHaveBeenNthCalledWith(2, `Failed to complete torrent verification process`); // execSyncMock.mockRestore(); }); - it('Torrentclear - Error date done not found', async () => { + it('Torrentclear - Error date done not found', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // const execSyncMock = jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -2415,7 +2417,7 @@ LIMITS & BANDWIDTH return args; }); // - await torrentclear.main(); + torrentclear.main(); // Log Error expect(logErrorMock).toHaveBeenNthCalledWith(1, `Torrent date done not found in torrent info: "35"`); expect(logErrorMock).toHaveBeenNthCalledWith(2, `Failed to complete torrent verification process`); @@ -2439,7 +2441,7 @@ describe('torrentclear.ts - deep tests', () => { beforeEach(() => { jest.clearAllMocks(); }); - it('Torrentclear - Throw Error isFileOrDirectoryOrUnknown', async () => { + it('Torrentclear - Throw Error isFileOrDirectoryOrUnknown', () => { const torrentclear: Torrentclear = new Torrentclear(fakeRootPath); // jest.spyOn(cproc, 'execSync').mockImplementation((command: string, _options: any): any => { @@ -2522,7 +2524,7 @@ LIMITS & BANDWIDTH return args; }); // - await torrentclear.main(); + torrentclear.main(); // Log Error expect(logErrorMock).toHaveBeenNthCalledWith(1, `lstatSync error emulation`); expect(logErrorMock).toHaveBeenNthCalledWith(2, `Failed to complete torrent verification process`); diff --git a/dist/index.js b/dist/index.js index 2cc796b..588503b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,28 +1,28 @@ #!/usr/bin/node -'use strict';var child_process=require('child_process'),fs=require('fs'),path=require('path'),url=require('url'),os$1=require('os');var Gy=Object.create;var yi=Object.defineProperty;var Jy=Object.getOwnPropertyDescriptor;var Zy=Object.getOwnPropertyNames;var Ky=Object.getPrototypeOf,Qy=Object.prototype.hasOwnProperty;var U=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Xy=(e,t)=>()=>(e&&(t=e(e=0)),t);var B=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),e1=(e,t)=>{for(var r in t)yi(e,r,{get:t[r],enumerable:!0});},qu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Zy(t))!Qy.call(e,s)&&s!==r&&yi(e,s,{get:()=>t[s],enumerable:!(n=Jy(t,s))||n.enumerable});return e};var Qs=(e,t,r)=>(r=e!=null?Gy(Ky(e)):{},qu(!e||!e.__esModule?yi(r,"default",{value:e,enumerable:!0}):r,e)),Yu=e=>qu(yi({},"__esModule",{value:!0}),e);var Wu=B((Xs,Nr)=>{(function(e,t){typeof Xs=="object"&&typeof Nr<"u"?Nr.exports=t():typeof define=="function"&&define.amd?define(t):e.moment=t();})(Xs,function(){var e;function t(){return e.apply(null,arguments)}function r(i){e=i;}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function s(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function o(i,a){return Object.prototype.hasOwnProperty.call(i,a)}function u(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var a;for(a in i)if(o(i,a))return !1;return !0}function c(i){return i===void 0}function d(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function g(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function m(i,a){var l=[],f,p=i.length;for(f=0;f>>0,f;for(f=0;f0)for(l=0;ltypeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Xy=(e,t)=>()=>(e&&(t=e(e=0)),t);var B=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),e1=(e,t)=>{for(var r in t)Di(e,r,{get:t[r],enumerable:!0});},qu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Zy(t))!Qy.call(e,s)&&s!==r&&Di(e,s,{get:()=>t[s],enumerable:!(n=Jy(t,s))||n.enumerable});return e};var Qs=(e,t,r)=>(r=e!=null?Gy(Ky(e)):{},qu(!e||!e.__esModule?Di(r,"default",{value:e,enumerable:!0}):r,e)),Yu=e=>qu(Di({},"__esModule",{value:!0}),e);var Wu=B((Xs,Nr)=>{(function(e,t){typeof Xs=="object"&&typeof Nr<"u"?Nr.exports=t():typeof define=="function"&&define.amd?define(t):e.moment=t();})(Xs,function(){var e;function t(){return e.apply(null,arguments)}function r(i){e=i;}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function s(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function o(i,a){return Object.prototype.hasOwnProperty.call(i,a)}function u(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var a;for(a in i)if(o(i,a))return !1;return !0}function c(i){return i===void 0}function d(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function g(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function m(i,a){var l=[],f,p=i.length;for(f=0;f>>0,f;for(f=0;f0)for(l=0;l=0;return (O?l?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+f}var K=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ye=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,de={},Ye={};function R(i,a,l,f){var p=f;typeof f=="string"&&(p=function(){return this[f]()}),i&&(Ye[i]=p),a&&(Ye[a[0]]=function(){return G(p.apply(this,arguments),a[1],a[2])}),l&&(Ye[l]=function(){return this.localeData().ordinal(p.apply(this,arguments),i)});}function Ke(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function Ne(i){var a=i.match(K),l,f;for(l=0,f=a.length;l=0&&ye.test(i);)i=i.replace(ye,f),ye.lastIndex=0,l-=1;return i}var we={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function le(i){var a=this._longDateFormat[i],l=this._longDateFormat[i.toUpperCase()];return a||!l?a:(this._longDateFormat[i]=l.match(K).map(function(f){return f==="MMMM"||f==="MM"||f==="DD"||f==="dddd"?f.slice(1):f}).join(""),this._longDateFormat[i])}var ve="Invalid date";function Ce(){return this._invalidDate}var E="%d",S=/\d{1,2}/;function h(i){return this._ordinal.replace("%d",i)}var v={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function T(i,a,l,f){var p=this._relativeTime[l];return Z(p)?p(i,a,l,f):p.replace(/%d/i,i)}function A(i,a){var l=this._relativeTime[i>0?"future":"past"];return Z(l)?l(a):l.replace(/%s/i,a)}var b={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function z(i){return typeof i=="string"?b[i]||b[i.toLowerCase()]:void 0}function Q(i){var a={},l,f;for(f in i)o(i,f)&&(l=z(f),l&&(a[l]=i[f]));return a}var re={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ae(i){var a=[],l;for(l in i)o(i,l)&&a.push({unit:l,priority:re[l]});return a.sort(function(f,p){return f.priority-p.priority}),a}var Fe=/\d/,Pe=/\d\d/,cn=/\d{3}/,Cr=/\d{4}/,Te=/[+-]?\d{6}/,pe=/\d\d?/,Dt=/\d\d\d\d?/,ei=/\d\d\d\d\d\d?/,ti=/\d{1,3}/,Ts=/\d{1,4}/,ri=/[+-]?\d{1,6}/,Or=/\d+/,ni=/[+-]?\d+/,hg=/Z|[+-]\d\d:?\d\d/gi,ii=/Z|[+-]\d\d(?::?\d\d)?/gi,pg=/[+-]?\d+(\.\d{1,3})?/,ln=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,br=/^[1-9]\d?/,js=/^([1-9]\d|\d)/,si;si={};function se(i,a,l){si[i]=Z(a)?a:function(f,p){return f&&l?l:a};}function mg(i,a){return o(si,i)?si[i](a._strict,a._locale):new RegExp(gg(i))}function gg(i){return It(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,l,f,p,O){return l||f||p||O}))}function It(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function at(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function me(i){var a=+i,l=0;return a!==0&&isFinite(a)&&(l=at(a)),l}var Is={};function Se(i,a){var l,f=a,p;for(typeof i=="string"&&(i=[i]),d(a)&&(f=function(O,N){N[a]=me(O);}),p=i.length,l=0;l68?1900:2e3)};var ru=xr("FullYear",!0);function vg(){return oi(this.year())}function xr(i,a){return function(l){return l!=null?(nu(this,i,l),t.updateOffset(this,a),this):hn(this,i)}}function hn(i,a){if(!i.isValid())return NaN;var l=i._d,f=i._isUTC;switch(a){case"Milliseconds":return f?l.getUTCMilliseconds():l.getMilliseconds();case"Seconds":return f?l.getUTCSeconds():l.getSeconds();case"Minutes":return f?l.getUTCMinutes():l.getMinutes();case"Hours":return f?l.getUTCHours():l.getHours();case"Date":return f?l.getUTCDate():l.getDate();case"Day":return f?l.getUTCDay():l.getDay();case"Month":return f?l.getUTCMonth():l.getMonth();case"FullYear":return f?l.getUTCFullYear():l.getFullYear();default:return NaN}}function nu(i,a,l){var f,p,O,N,ne;if(!(!i.isValid()||isNaN(l))){switch(f=i._d,p=i._isUTC,a){case"Milliseconds":return void(p?f.setUTCMilliseconds(l):f.setMilliseconds(l));case"Seconds":return void(p?f.setUTCSeconds(l):f.setSeconds(l));case"Minutes":return void(p?f.setUTCMinutes(l):f.setMinutes(l));case"Hours":return void(p?f.setUTCHours(l):f.setHours(l));case"Date":return void(p?f.setUTCDate(l):f.setDate(l));case"FullYear":break;default:return}O=l,N=i.month(),ne=i.date(),ne=ne===29&&N===1&&!oi(O)?28:ne,p?f.setUTCFullYear(O,N,ne):f.setFullYear(O,N,ne);}}function Eg(i){return i=z(i),Z(this[i])?this[i]():this}function _g(i,a){if(typeof i=="object"){i=Q(i);var l=Ae(i),f,p=l.length;for(f=0;f=0?(ne=new Date(i+400,a,l,f,p,O,N),isFinite(ne.getFullYear())&&ne.setFullYear(i)):ne=new Date(i,a,l,f,p,O,N),ne}function pn(i){var a,l;return i<100&&i>=0?(l=Array.prototype.slice.call(arguments),l[0]=i+400,a=new Date(Date.UTC.apply(null,l)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(i)):a=new Date(Date.UTC.apply(null,arguments)),a}function ai(i,a,l){var f=7+a-l,p=(7+pn(i,0,f).getUTCDay()-a)%7;return -p+f-1}function cu(i,a,l,f,p){var O=(7+l-f)%7,N=ai(i,f,p),ne=1+7*(a-1)+O+N,ue,ge;return ne<=0?(ue=i-1,ge=dn(ue)+ne):ne>dn(i)?(ue=i+1,ge=ne-dn(i)):(ue=i,ge=ne),{year:ue,dayOfYear:ge}}function mn(i,a,l){var f=ai(i.year(),a,l),p=Math.floor((i.dayOfYear()-f-1)/7)+1,O,N;return p<1?(N=i.year()-1,O=p+$t(N,a,l)):p>$t(i.year(),a,l)?(O=p-$t(i.year(),a,l),N=i.year()+1):(N=i.year(),O=p),{week:O,year:N}}function $t(i,a,l){var f=ai(i,a,l),p=ai(i+1,a,l);return (dn(i)-f+p)/7}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),se("w",pe,br),se("ww",pe,Pe),se("W",pe,br),se("WW",pe,Pe),fn(["w","ww","W","WW"],function(i,a,l,f){a[f.substr(0,1)]=me(i);});function Lg(i){return mn(i,this._week.dow,this._week.doy).week}var $g={dow:0,doy:6};function kg(){return this._week.dow}function Pg(){return this._week.doy}function Rg(i){var a=this.localeData().week(this);return i==null?a:this.add((i-a)*7,"d")}function Bg(i){var a=mn(this,1,4).week;return i==null?a:this.add((i-a)*7,"d")}R("d",0,"do","day"),R("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),R("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),R("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),se("d",pe),se("e",pe),se("E",pe),se("dd",function(i,a){return a.weekdaysMinRegex(i)}),se("ddd",function(i,a){return a.weekdaysShortRegex(i)}),se("dddd",function(i,a){return a.weekdaysRegex(i)}),fn(["dd","ddd","dddd"],function(i,a,l,f){var p=l._locale.weekdaysParse(i,f,l._strict);p!=null?a.d=p:C(l).invalidWeekday=i;}),fn(["d","e","E"],function(i,a,l,f){a[f]=me(i);});function qg(i,a){return typeof i!="string"?i:isNaN(i)?(i=a.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function Yg(i,a){return typeof i=="string"?a.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Ls(i,a){return i.slice(a,7).concat(i.slice(0,a))}var Wg="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),lu="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ug="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zg=ln,Hg=ln,Vg=ln;function Gg(i,a){var l=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(a)?"format":"standalone"];return i===!0?Ls(l,this._week.dow):i?l[i.day()]:l}function Jg(i){return i===!0?Ls(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function Zg(i){return i===!0?Ls(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function Kg(i,a,l){var f,p,O,N=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)O=y([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(O,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(O,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(O,"").toLocaleLowerCase();return l?a==="dddd"?(p=Ie.call(this._weekdaysParse,N),p!==-1?p:null):a==="ddd"?(p=Ie.call(this._shortWeekdaysParse,N),p!==-1?p:null):(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null):a==="dddd"?(p=Ie.call(this._weekdaysParse,N),p!==-1||(p=Ie.call(this._shortWeekdaysParse,N),p!==-1)?p:(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null)):a==="ddd"?(p=Ie.call(this._shortWeekdaysParse,N),p!==-1||(p=Ie.call(this._weekdaysParse,N),p!==-1)?p:(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null)):(p=Ie.call(this._minWeekdaysParse,N),p!==-1||(p=Ie.call(this._weekdaysParse,N),p!==-1)?p:(p=Ie.call(this._shortWeekdaysParse,N),p!==-1?p:null))}function Qg(i,a,l){var f,p,O;if(this._weekdaysParseExact)return Kg.call(this,i,a,l);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),f=0;f<7;f++){if(p=y([2e3,1]).day(f),l&&!this._fullWeekdaysParse[f]&&(this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[f]||(O="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[f]=new RegExp(O.replace(".",""),"i")),l&&a==="dddd"&&this._fullWeekdaysParse[f].test(i))return f;if(l&&a==="ddd"&&this._shortWeekdaysParse[f].test(i))return f;if(l&&a==="dd"&&this._minWeekdaysParse[f].test(i))return f;if(!l&&this._weekdaysParse[f].test(i))return f}}function Xg(i){if(!this.isValid())return i!=null?this:NaN;var a=hn(this,"Day");return i!=null?(i=qg(i,this.localeData()),this.add(i-a,"d")):a}function eD(i){if(!this.isValid())return i!=null?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return i==null?a:this.add(i-a,"d")}function tD(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var a=Yg(i,this.localeData());return this.day(this.day()%7?a:a-7)}else return this.day()||7}function rD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=zg),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function nD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Hg),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function iD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Vg),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $s(){function i(Ge,qt){return qt.length-Ge.length}var a=[],l=[],f=[],p=[],O,N,ne,ue,ge;for(O=0;O<7;O++)N=y([2e3,1]).day(O),ne=It(this.weekdaysMin(N,"")),ue=It(this.weekdaysShort(N,"")),ge=It(this.weekdays(N,"")),a.push(ne),l.push(ue),f.push(ge),p.push(ne),p.push(ue),p.push(ge);a.sort(i),l.sort(i),f.sort(i),p.sort(i),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i");}function ks(){return this.hours()%12||12}function sD(){return this.hours()||24}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,ks),R("k",["kk",2],0,sD),R("hmm",0,0,function(){return ""+ks.apply(this)+G(this.minutes(),2)}),R("hmmss",0,0,function(){return ""+ks.apply(this)+G(this.minutes(),2)+G(this.seconds(),2)}),R("Hmm",0,0,function(){return ""+this.hours()+G(this.minutes(),2)}),R("Hmmss",0,0,function(){return ""+this.hours()+G(this.minutes(),2)+G(this.seconds(),2)});function fu(i,a){R(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)});}fu("a",!0),fu("A",!1);function du(i,a){return a._meridiemParse}se("a",du),se("A",du),se("H",pe,js),se("h",pe,br),se("k",pe,br),se("HH",pe,Pe),se("hh",pe,Pe),se("kk",pe,Pe),se("hmm",Dt),se("hmmss",ei),se("Hmm",Dt),se("Hmmss",ei),Se(["H","HH"],ke),Se(["k","kk"],function(i,a,l){var f=me(i);a[ke]=f===24?0:f;}),Se(["a","A"],function(i,a,l){l._isPm=l._locale.isPM(i),l._meridiem=i;}),Se(["h","hh"],function(i,a,l){a[ke]=me(i),C(l).bigHour=!0;}),Se("hmm",function(i,a,l){var f=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f)),C(l).bigHour=!0;}),Se("hmmss",function(i,a,l){var f=i.length-4,p=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f,2)),a[Lt]=me(i.substr(p)),C(l).bigHour=!0;}),Se("Hmm",function(i,a,l){var f=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f));}),Se("Hmmss",function(i,a,l){var f=i.length-4,p=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f,2)),a[Lt]=me(i.substr(p));});function oD(i){return (i+"").toLowerCase().charAt(0)==="p"}var aD=/[ap]\.?m?\.?/i,uD=xr("Hours",!0);function cD(i,a,l){return i>11?l?"pm":"PM":l?"am":"AM"}var hu={calendar:W,longDateFormat:we,invalidDate:ve,ordinal:E,dayOfMonthOrdinalParse:S,relativeTime:v,months:Sg,monthsShort:iu,week:$g,weekdays:Wg,weekdaysMin:Ug,weekdaysShort:lu,meridiemParse:aD},be={},gn={},Dn;function lD(i,a){var l,f=Math.min(i.length,a.length);for(l=0;l0;){if(p=ui(O.slice(0,l).join("-")),p)return p;if(f&&f.length>=l&&lD(O,f)>=l-1)break;l--;}a++;}return Dn}function dD(i){return !!(i&&i.match("^[^/\\\\]*$"))}function ui(i){var a=null,l;if(be[i]===void 0&&typeof Nr<"u"&&Nr&&Nr.exports&&dD(i))try{a=Dn._abbr,l=U,l("./locale/"+i),Gt(a);}catch{be[i]=null;}return be[i]}function Gt(i,a){var l;return i&&(c(a)?l=kt(i):l=Ps(i,a),l?Dn=l:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),Dn._abbr}function Ps(i,a){if(a!==null){var l,f=hu;if(a.abbr=i,be[i]!=null)ee("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),f=be[i]._config;else if(a.parentLocale!=null)if(be[a.parentLocale]!=null)f=be[a.parentLocale]._config;else if(l=ui(a.parentLocale),l!=null)f=l._config;else return gn[a.parentLocale]||(gn[a.parentLocale]=[]),gn[a.parentLocale].push({name:i,config:a}),null;return be[i]=new V(Y(f,a)),gn[i]&&gn[i].forEach(function(p){Ps(p.name,p.config);}),Gt(i),be[i]}else return delete be[i],null}function hD(i,a){if(a!=null){var l,f,p=hu;be[i]!=null&&be[i].parentLocale!=null?be[i].set(Y(be[i]._config,a)):(f=ui(i),f!=null&&(p=f._config),a=Y(p,a),f==null&&(a.abbr=i),l=new V(a),l.parentLocale=be[i],be[i]=l),Gt(i);}else be[i]!=null&&(be[i].parentLocale!=null?(be[i]=be[i].parentLocale,i===Gt()&&Gt(i)):be[i]!=null&&delete be[i]);return be[i]}function kt(i){var a;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return Dn;if(!n(i)){if(a=ui(i),a)return a;i=[i];}return fD(i)}function pD(){return I(be)}function Rs(i){var a,l=i._a;return l&&C(i).overflow===-2&&(a=l[Nt]<0||l[Nt]>11?Nt:l[Ot]<1||l[Ot]>Ns(l[He],l[Nt])?Ot:l[ke]<0||l[ke]>24||l[ke]===24&&(l[yt]!==0||l[Lt]!==0||l[lr]!==0)?ke:l[yt]<0||l[yt]>59?yt:l[Lt]<0||l[Lt]>59?Lt:l[lr]<0||l[lr]>999?lr:-1,C(i)._overflowDayOfYear&&(aOt)&&(a=Ot),C(i)._overflowWeeks&&a===-1&&(a=yg),C(i)._overflowWeekday&&a===-1&&(a=wg),C(i).overflow=a),i}var mD=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gD=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,DD=/Z|[+-]\d\d(?::?\d\d)?/,ci=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Bs=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yD=/^\/?Date\((-?\d+)/i,wD=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vD={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function mu(i){var a,l,f=i._i,p=mD.exec(f)||gD.exec(f),O,N,ne,ue,ge=ci.length,Ge=Bs.length;if(p){for(C(i).iso=!0,a=0,l=ge;adn(N)||i._dayOfYear===0)&&(C(i)._overflowDayOfYear=!0),l=pn(N,0,i._dayOfYear),i._a[Nt]=l.getUTCMonth(),i._a[Ot]=l.getUTCDate()),a=0;a<3&&i._a[a]==null;++a)i._a[a]=f[a]=p[a];for(;a<7;a++)i._a[a]=f[a]=i._a[a]==null?a===2?1:0:i._a[a];i._a[ke]===24&&i._a[yt]===0&&i._a[Lt]===0&&i._a[lr]===0&&(i._nextDay=!0,i._a[ke]=0),i._d=(i._useUTC?pn:Ng).apply(null,f),O=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ke]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==O&&(C(i).weekdayMismatch=!0);}}function xD(i){var a,l,f,p,O,N,ne,ue,ge;a=i._w,a.GG!=null||a.W!=null||a.E!=null?(O=1,N=4,l=Ar(a.GG,i._a[He],mn(Oe(),1,4).year),f=Ar(a.W,1),p=Ar(a.E,1),(p<1||p>7)&&(ue=!0)):(O=i._locale._week.dow,N=i._locale._week.doy,ge=mn(Oe(),O,N),l=Ar(a.gg,i._a[He],ge.year),f=Ar(a.w,ge.week),a.d!=null?(p=a.d,(p<0||p>6)&&(ue=!0)):a.e!=null?(p=a.e+O,(a.e<0||a.e>6)&&(ue=!0)):p=O),f<1||f>$t(l,O,N)?C(i)._overflowWeeks=!0:ue!=null?C(i)._overflowWeekday=!0:(ne=cu(l,f,p,O,N),i._a[He]=ne.year,i._dayOfYear=ne.dayOfYear);}t.ISO_8601=function(){},t.RFC_2822=function(){};function Ys(i){if(i._f===t.ISO_8601){mu(i);return}if(i._f===t.RFC_2822){gu(i);return}i._a=[],C(i).empty=!0;var a=""+i._i,l,f,p,O,N,ne=a.length,ue=0,ge,Ge;for(p=ie(i._f,i._locale).match(K)||[],Ge=p.length,l=0;l0&&C(i).unusedInput.push(N),a=a.slice(a.indexOf(f)+f.length),ue+=f.length),Ye[O]?(f?C(i).empty=!1:C(i).unusedTokens.push(O),Dg(O,f,i)):i._strict&&!f&&C(i).unusedTokens.push(O);C(i).charsLeftOver=ne-ue,a.length>0&&C(i).unusedInput.push(a),i._a[ke]<=12&&C(i).bigHour===!0&&i._a[ke]>0&&(C(i).bigHour=void 0),C(i).parsedDateParts=i._a.slice(0),C(i).meridiem=i._meridiem,i._a[ke]=AD(i._locale,i._a[ke],i._meridiem),ge=C(i).era,ge!==null&&(i._a[He]=i._locale.erasConvertYear(ge,i._a[He])),qs(i),Rs(i);}function AD(i,a,l){var f;return l==null?a:i.meridiemHour!=null?i.meridiemHour(a,l):(i.isPM!=null&&(f=i.isPM(l),f&&a<12&&(a+=12),!f&&a===12&&(a=0)),a)}function MD(i){var a,l,f,p,O,N,ne=!1,ue=i._f.length;if(ue===0){C(i).invalidFormat=!0,i._d=new Date(NaN);return}for(p=0;pthis?this:i:$()});function wu(i,a){var l,f;if(a.length===1&&n(a[0])&&(a=a[0]),!a.length)return Oe();for(l=a[0],f=1;fthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function KD(){if(!c(this._isDSTShifted))return this._isDSTShifted;var i={},a;return M(i,this),i=Du(i),i._a?(a=i._isUTC?y(i._a):Oe(i._a),this._isDSTShifted=this.isValid()&&YD(i._a,a.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function QD(){return this.isValid()?!this._isUTC:!1}function XD(){return this.isValid()?this._isUTC:!1}function Eu(){return this.isValid()?this._isUTC&&this._offset===0:!1}var e0=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,t0=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function wt(i,a){var l=i,f=null,p,O,N;return fi(i)?l={ms:i._milliseconds,d:i._days,M:i._months}:d(i)||!isNaN(+i)?(l={},a?l[a]=+i:l.milliseconds=+i):(f=e0.exec(i))?(p=f[1]==="-"?-1:1,l={y:0,d:me(f[Ot])*p,h:me(f[ke])*p,m:me(f[yt])*p,s:me(f[Lt])*p,ms:me(Ws(f[lr]*1e3))*p}):(f=t0.exec(i))?(p=f[1]==="-"?-1:1,l={y:fr(f[2],p),M:fr(f[3],p),w:fr(f[4],p),d:fr(f[5],p),h:fr(f[6],p),m:fr(f[7],p),s:fr(f[8],p)}):l==null?l={}:typeof l=="object"&&("from"in l||"to"in l)&&(N=r0(Oe(l.from),Oe(l.to)),l={},l.ms=N.milliseconds,l.M=N.months),O=new li(l),fi(i)&&o(i,"_locale")&&(O._locale=i._locale),fi(i)&&o(i,"_isValid")&&(O._isValid=i._isValid),O}wt.fn=li.prototype,wt.invalid=qD;function fr(i,a){var l=i&&parseFloat(i.replace(",","."));return (isNaN(l)?0:l)*a}function _u(i,a){var l={};return l.months=a.month()-i.month()+(a.year()-i.year())*12,i.clone().add(l.months,"M").isAfter(a)&&--l.months,l.milliseconds=+a-+i.clone().add(l.months,"M"),l}function r0(i,a){var l;return i.isValid()&&a.isValid()?(a=zs(a,i),i.isBefore(a)?l=_u(i,a):(l=_u(a,i),l.milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0}}function Fu(i,a){return function(l,f){var p,O;return f!==null&&!isNaN(+f)&&(ee(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),O=l,l=f,f=O),p=wt(l,f),Su(this,p,i),this}}function Su(i,a,l,f){var p=a._milliseconds,O=Ws(a._days),N=Ws(a._months);i.isValid()&&(f=f??!0,N&&ou(i,hn(i,"Month")+N*l),O&&nu(i,"Date",hn(i,"Date")+O*l),p&&i._d.setTime(i._d.valueOf()+p*l),f&&t.updateOffset(i,O||N));}var n0=Fu(1,"add"),i0=Fu(-1,"subtract");function Cu(i){return typeof i=="string"||i instanceof String}function s0(i){return J(i)||g(i)||Cu(i)||d(i)||a0(i)||o0(i)||i===null||i===void 0}function o0(i){var a=s(i)&&!u(i),l=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,O,N=f.length;for(p=0;pl.valueOf():l.valueOf()9999?Ct(l,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Z(Date.prototype.toISOString)?a?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ct(l,"Z")):Ct(l,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function E0(){if(!this.isValid())return "moment.invalid(/* "+this._i+" */)";var i="moment",a="",l,f,p,O;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",a="Z"),l="["+i+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",O=a+'[")]',this.format(l+f+p+O)}function _0(i){i||(i=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var a=Ct(this,i);return this.localeData().postformat(a)}function F0(i,a){return this.isValid()&&(J(i)&&i.isValid()||Oe(i).isValid())?wt({to:this,from:i}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function S0(i){return this.from(Oe(),i)}function C0(i,a){return this.isValid()&&(J(i)&&i.isValid()||Oe(i).isValid())?wt({from:this,to:i}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function O0(i){return this.to(Oe(),i)}function Ou(i){var a;return i===void 0?this._locale._abbr:(a=kt(i),a!=null&&(this._locale=a),this)}var bu=te("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function xu(){return this._locale}var hi=1e3,Mr=60*hi,pi=60*Mr,Au=(365*400+97)*24*pi;function Tr(i,a){return (i%a+a)%a}function Mu(i,a,l){return i<100&&i>=0?new Date(i+400,a,l)-Au:new Date(i,a,l).valueOf()}function Tu(i,a,l){return i<100&&i>=0?Date.UTC(i+400,a,l)-Au:Date.UTC(i,a,l)}function b0(i){var a,l;if(i=z(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Tu:Mu,i){case"year":a=l(this.year(),0,1);break;case"quarter":a=l(this.year(),this.month()-this.month()%3,1);break;case"month":a=l(this.year(),this.month(),1);break;case"week":a=l(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=l(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=Tr(a+(this._isUTC?0:this.utcOffset()*Mr),pi);break;case"minute":a=this._d.valueOf(),a-=Tr(a,Mr);break;case"second":a=this._d.valueOf(),a-=Tr(a,hi);break}return this._d.setTime(a),t.updateOffset(this,!0),this}function x0(i){var a,l;if(i=z(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Tu:Mu,i){case"year":a=l(this.year()+1,0,1)-1;break;case"quarter":a=l(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=l(this.year(),this.month()+1,1)-1;break;case"week":a=l(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=l(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=pi-Tr(a+(this._isUTC?0:this.utcOffset()*Mr),pi)-1;break;case"minute":a=this._d.valueOf(),a+=Mr-Tr(a,Mr)-1;break;case"second":a=this._d.valueOf(),a+=hi-Tr(a,hi)-1;break}return this._d.setTime(a),t.updateOffset(this,!0),this}function A0(){return this._d.valueOf()-(this._offset||0)*6e4}function M0(){return Math.floor(this.valueOf()/1e3)}function T0(){return new Date(this.valueOf())}function j0(){var i=this;return [i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function I0(){var i=this;return {years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function N0(){return this.isValid()?this.toISOString():null}function L0(){return j(this)}function $0(){return D({},C(this))}function k0(){return C(this).overflow}function P0(){return {input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),se("N",Vs),se("NN",Vs),se("NNN",Vs),se("NNNN",J0),se("NNNNN",Z0),Se(["N","NN","NNN","NNNN","NNNNN"],function(i,a,l,f){var p=l._locale.erasParse(i,f,l._strict);p?C(l).era=p:C(l).invalidEra=i;}),se("y",Or),se("yy",Or),se("yyy",Or),se("yyyy",Or),se("yo",K0),Se(["y","yy","yyy","yyyy"],He),Se(["yo"],function(i,a,l,f){var p;l._locale._eraYearOrdinalRegex&&(p=i.match(l._locale._eraYearOrdinalRegex)),l._locale.eraYearOrdinalParse?a[He]=l._locale.eraYearOrdinalParse(i,p):a[He]=parseInt(i,10);});function R0(i,a){var l,f,p,O=this._eras||kt("en")._eras;for(l=0,f=O.length;l=0)return O[f]}function q0(i,a){var l=i.since<=i.until?1:-1;return a===void 0?t(i.since).year():t(i.since).year()+(a-i.offset)*l}function Y0(){var i,a,l,f=this.localeData().eras();for(i=0,a=f.length;iO&&(a=O),iy.call(this,i,a,l,f,p))}function iy(i,a,l,f,p){var O=cu(i,a,l,f,p),N=pn(O.year,0,O.dayOfYear);return this.year(N.getUTCFullYear()),this.month(N.getUTCMonth()),this.date(N.getUTCDate()),this}R("Q",0,"Qo","quarter"),se("Q",Fe),Se("Q",function(i,a){a[Nt]=(me(i)-1)*3;});function sy(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}R("D",["DD",2],"Do","date"),se("D",pe,br),se("DD",pe,Pe),se("Do",function(i,a){return i?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient}),Se(["D","DD"],Ot),Se("Do",function(i,a){a[Ot]=me(i.match(pe)[0]);});var Iu=xr("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),se("DDD",ti),se("DDDD",cn),Se(["DDD","DDDD"],function(i,a,l){l._dayOfYear=me(i);});function oy(i){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?a:this.add(i-a,"d")}R("m",["mm",2],0,"minute"),se("m",pe,js),se("mm",pe,Pe),Se(["m","mm"],yt);var ay=xr("Minutes",!1);R("s",["ss",2],0,"second"),se("s",pe,js),se("ss",pe,Pe),Se(["s","ss"],Lt);var uy=xr("Seconds",!1);R("S",0,0,function(){return ~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return ~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return this.millisecond()*10}),R(0,["SSSSS",5],0,function(){return this.millisecond()*100}),R(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),R(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),R(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),R(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),se("S",ti,Fe),se("SS",ti,Pe),se("SSS",ti,cn);var Jt,Nu;for(Jt="SSSS";Jt.length<=9;Jt+="S")se(Jt,Or);function cy(i,a){a[lr]=me(("0."+i)*1e3);}for(Jt="S";Jt.length<=9;Jt+="S")Se(Jt,cy);Nu=xr("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");function ly(){return this._isUTC?"UTC":""}function fy(){return this._isUTC?"Coordinated Universal Time":""}var H=P.prototype;H.add=n0,H.calendar=l0,H.clone=f0,H.diff=y0,H.endOf=x0,H.format=_0,H.from=F0,H.fromNow=S0,H.to=C0,H.toNow=O0,H.get=Eg,H.invalidAt=k0,H.isAfter=d0,H.isBefore=h0,H.isBetween=p0,H.isSame=m0,H.isSameOrAfter=g0,H.isSameOrBefore=D0,H.isValid=L0,H.lang=bu,H.locale=Ou,H.localeData=xu,H.max=LD,H.min=ND,H.parsingFlags=$0,H.set=_g,H.startOf=b0,H.subtract=i0,H.toArray=j0,H.toObject=I0,H.toDate=T0,H.toISOString=v0,H.inspect=E0,typeof Symbol<"u"&&Symbol.for!=null&&(H[Symbol.for("nodejs.util.inspect.custom")]=function(){return "Moment<"+this.format()+">"}),H.toJSON=N0,H.toString=w0,H.unix=M0,H.valueOf=A0,H.creationData=P0,H.eraName=Y0,H.eraNarrow=W0,H.eraAbbr=U0,H.eraYear=z0,H.year=ru,H.isLeapYear=vg,H.weekYear=Q0,H.isoWeekYear=X0,H.quarter=H.quarters=sy,H.month=au,H.daysInMonth=Tg,H.week=H.weeks=Rg,H.isoWeek=H.isoWeeks=Bg,H.weeksInYear=ry,H.weeksInWeekYear=ny,H.isoWeeksInYear=ey,H.isoWeeksInISOWeekYear=ty,H.date=Iu,H.day=H.days=Xg,H.weekday=eD,H.isoWeekday=tD,H.dayOfYear=oy,H.hour=H.hours=uD,H.minute=H.minutes=ay,H.second=H.seconds=uy,H.millisecond=H.milliseconds=Nu,H.utcOffset=UD,H.utc=HD,H.local=VD,H.parseZone=GD,H.hasAlignedHourOffset=JD,H.isDST=ZD,H.isLocal=QD,H.isUtcOffset=XD,H.isUtc=Eu,H.isUTC=Eu,H.zoneAbbr=ly,H.zoneName=fy,H.dates=te("dates accessor is deprecated. Use date instead.",Iu),H.months=te("months accessor is deprecated. Use month instead",au),H.years=te("years accessor is deprecated. Use year instead",ru),H.zone=te("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zD),H.isDSTShifted=te("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",KD);function dy(i){return Oe(i*1e3)}function hy(){return Oe.apply(null,arguments).parseZone()}function Lu(i){return i}var Ee=V.prototype;Ee.calendar=k,Ee.longDateFormat=le,Ee.invalidDate=Ce,Ee.ordinal=h,Ee.preparse=Lu,Ee.postformat=Lu,Ee.relativeTime=T,Ee.pastFuture=A,Ee.set=q,Ee.eras=R0,Ee.erasParse=B0,Ee.erasConvertYear=q0,Ee.erasAbbrRegex=V0,Ee.erasNameRegex=H0,Ee.erasNarrowRegex=G0,Ee.months=bg,Ee.monthsShort=xg,Ee.monthsParse=Mg,Ee.monthsRegex=Ig,Ee.monthsShortRegex=jg,Ee.week=Lg,Ee.firstDayOfYear=Pg,Ee.firstDayOfWeek=kg,Ee.weekdays=Gg,Ee.weekdaysMin=Zg,Ee.weekdaysShort=Jg,Ee.weekdaysParse=Qg,Ee.weekdaysRegex=rD,Ee.weekdaysShortRegex=nD,Ee.weekdaysMinRegex=iD,Ee.isPM=oD,Ee.meridiem=cD;function gi(i,a,l,f){var p=kt(),O=y().set(f,a);return p[l](O,i)}function $u(i,a,l){if(d(i)&&(a=i,i=void 0),i=i||"",a!=null)return gi(i,a,l,"month");var f,p=[];for(f=0;f<12;f++)p[f]=gi(i,f,l,"month");return p}function Js(i,a,l,f){typeof i=="boolean"?(d(a)&&(l=a,a=void 0),a=a||""):(a=i,l=a,i=!1,d(a)&&(l=a,a=void 0),a=a||"");var p=kt(),O=i?p._week.dow:0,N,ne=[];if(l!=null)return gi(a,(l+O)%7,f,"day");for(N=0;N<7;N++)ne[N]=gi(a,(N+O)%7,f,"day");return ne}function py(i,a){return $u(i,a,"months")}function my(i,a){return $u(i,a,"monthsShort")}function gy(i,a,l){return Js(i,a,l,"weekdays")}function Dy(i,a,l){return Js(i,a,l,"weekdaysShort")}function yy(i,a,l){return Js(i,a,l,"weekdaysMin")}Gt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var a=i%10,l=me(i%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return i+l}}),t.lang=te("moment.lang is deprecated. Use moment.locale instead.",Gt),t.langData=te("moment.langData is deprecated. Use moment.localeData instead.",kt);var Pt=Math.abs;function wy(){var i=this._data;return this._milliseconds=Pt(this._milliseconds),this._days=Pt(this._days),this._months=Pt(this._months),i.milliseconds=Pt(i.milliseconds),i.seconds=Pt(i.seconds),i.minutes=Pt(i.minutes),i.hours=Pt(i.hours),i.months=Pt(i.months),i.years=Pt(i.years),this}function ku(i,a,l,f){var p=wt(a,l);return i._milliseconds+=f*p._milliseconds,i._days+=f*p._days,i._months+=f*p._months,i._bubble()}function vy(i,a){return ku(this,i,a,1)}function Ey(i,a){return ku(this,i,a,-1)}function Pu(i){return i<0?Math.floor(i):Math.ceil(i)}function _y(){var i=this._milliseconds,a=this._days,l=this._months,f=this._data,p,O,N,ne,ue;return i>=0&&a>=0&&l>=0||i<=0&&a<=0&&l<=0||(i+=Pu(Zs(l)+a)*864e5,a=0,l=0),f.milliseconds=i%1e3,p=at(i/1e3),f.seconds=p%60,O=at(p/60),f.minutes=O%60,N=at(O/60),f.hours=N%24,a+=at(N/24),ue=at(Ru(a)),l+=ue,a-=Pu(Zs(ue)),ne=at(l/12),l%=12,f.days=a,f.months=l,f.years=ne,this}function Ru(i){return i*4800/146097}function Zs(i){return i*146097/4800}function Fy(i){if(!this.isValid())return NaN;var a,l,f=this._milliseconds;if(i=z(i),i==="month"||i==="quarter"||i==="year")switch(a=this._days+f/864e5,l=this._months+Ru(a),i){case"month":return l;case"quarter":return l/3;case"year":return l/12}else switch(a=this._days+Math.round(Zs(this._months)),i){case"week":return a/7+f/6048e5;case"day":return a+f/864e5;case"hour":return a*24+f/36e5;case"minute":return a*1440+f/6e4;case"second":return a*86400+f/1e3;case"millisecond":return Math.floor(a*864e5)+f;default:throw new Error("Unknown unit "+i)}}function Rt(i){return function(){return this.as(i)}}var Bu=Rt("ms"),Sy=Rt("s"),Cy=Rt("m"),Oy=Rt("h"),by=Rt("d"),xy=Rt("w"),Ay=Rt("M"),My=Rt("Q"),Ty=Rt("y"),jy=Bu;function Iy(){return wt(this)}function Ny(i){return i=z(i),this.isValid()?this[i+"s"]():NaN}function dr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Ly=dr("milliseconds"),$y=dr("seconds"),ky=dr("minutes"),Py=dr("hours"),Ry=dr("days"),By=dr("months"),qy=dr("years");function Yy(){return at(this.days()/7)}var Bt=Math.round,jr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Wy(i,a,l,f,p){return p.relativeTime(a||1,!!l,i,f)}function Uy(i,a,l,f){var p=wt(i).abs(),O=Bt(p.as("s")),N=Bt(p.as("m")),ne=Bt(p.as("h")),ue=Bt(p.as("d")),ge=Bt(p.as("M")),Ge=Bt(p.as("w")),qt=Bt(p.as("y")),Zt=O<=l.ss&&["s",O]||O0,Zt[4]=f,Wy.apply(null,Zt)}function zy(i){return i===void 0?Bt:typeof i=="function"?(Bt=i,!0):!1}function Hy(i,a){return jr[i]===void 0?!1:a===void 0?jr[i]:(jr[i]=a,i==="s"&&(jr.ss=a-1),!0)}function Vy(i,a){if(!this.isValid())return this.localeData().invalidDate();var l=!1,f=jr,p,O;return typeof i=="object"&&(a=i,i=!1),typeof i=="boolean"&&(l=i),typeof a=="object"&&(f=Object.assign({},jr,a),a.s!=null&&a.ss==null&&(f.ss=a.s-1)),p=this.localeData(),O=Uy(this,!l,f,p),l&&(O=p.pastFuture(+this,O)),p.postformat(O)}var Ks=Math.abs;function Ir(i){return (i>0)-(i<0)||+i}function Di(){if(!this.isValid())return this.localeData().invalidDate();var i=Ks(this._milliseconds)/1e3,a=Ks(this._days),l=Ks(this._months),f,p,O,N,ne=this.asSeconds(),ue,ge,Ge,qt;return ne?(f=at(i/60),p=at(f/60),i%=60,f%=60,O=at(l/12),l%=12,N=i?i.toFixed(3).replace(/\.?0+$/,""):"",ue=ne<0?"-":"",ge=Ir(this._months)!==Ir(ne)?"-":"",Ge=Ir(this._days)!==Ir(ne)?"-":"",qt=Ir(this._milliseconds)!==Ir(ne)?"-":"",ue+"P"+(O?ge+O+"Y":"")+(l?ge+l+"M":"")+(a?Ge+a+"D":"")+(p||f||i?"T":"")+(p?qt+p+"H":"")+(f?qt+f+"M":"")+(i?qt+N+"S":"")):"P0D"}var De=li.prototype;De.isValid=BD,De.abs=wy,De.add=vy,De.subtract=Ey,De.as=Fy,De.asMilliseconds=Bu,De.asSeconds=Sy,De.asMinutes=Cy,De.asHours=Oy,De.asDays=by,De.asWeeks=xy,De.asMonths=Ay,De.asQuarters=My,De.asYears=Ty,De.valueOf=jy,De._bubble=_y,De.clone=Iy,De.get=Ny,De.milliseconds=Ly,De.seconds=$y,De.minutes=ky,De.hours=Py,De.days=Ry,De.weeks=Yy,De.months=By,De.years=qy,De.humanize=Vy,De.toISOString=Di,De.toString=Di,De.toJSON=Di,De.locale=Ou,De.localeData=xu,De.toIsoString=te("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Di),De.lang=bu,R("X",0,0,"unix"),R("x",0,0,"valueOf"),se("x",ni),se("X",pg),Se("X",function(i,a,l){l._d=new Date(parseFloat(i)*1e3);}),Se("x",function(i,a,l){l._d=new Date(me(i));});return t.version="2.30.1",r(Oe),t.fn=H,t.min=$D,t.max=kD,t.now=PD,t.utc=y,t.unix=dy,t.months=py,t.isDate=g,t.locale=Gt,t.invalid=$,t.duration=wt,t.isMoment=J,t.weekdays=gy,t.parseZone=hy,t.localeData=kt,t.isDuration=fi,t.monthsShort=my,t.weekdaysMin=yy,t.defineLocale=Ps,t.updateLocale=hD,t.locales=pD,t.weekdaysShort=Dy,t.normalizeUnits=z,t.relativeTimeRounding=zy,t.relativeTimeThreshold=Hy,t.calendarFormat=c0,t.prototype=H,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t});});var Mo={};e1(Mo,{all:()=>uo,allLimit:()=>co,allSeries:()=>lo,any:()=>yo,anyLimit:()=>wo,anySeries:()=>vo,apply:()=>Ju,applyEach:()=>tc,applyEachSeries:()=>rc,asyncify:()=>vi,auto:()=>Fo,autoInject:()=>nc,cargo:()=>ic,cargoQueue:()=>sc,compose:()=>oc,concat:()=>ro,concatLimit:()=>En,concatSeries:()=>no,constant:()=>ac,default:()=>ow,detect:()=>io,detectLimit:()=>so,detectSeries:()=>oo,dir:()=>cc,doDuring:()=>Ei,doUntil:()=>lc,doWhilst:()=>Ei,during:()=>Oi,each:()=>ao,eachLimit:()=>_i,eachOf:()=>ut,eachOfLimit:()=>vn,eachOfSeries:()=>bt,eachSeries:()=>Fi,ensureAsync:()=>Oo,every:()=>uo,everyLimit:()=>co,everySeries:()=>lo,filter:()=>fo,filterLimit:()=>ho,filterSeries:()=>po,find:()=>io,findLimit:()=>so,findSeries:()=>oo,flatMap:()=>ro,flatMapLimit:()=>En,flatMapSeries:()=>no,foldl:()=>Lr,foldr:()=>go,forEach:()=>ao,forEachLimit:()=>_i,forEachOf:()=>ut,forEachOfLimit:()=>vn,forEachOfSeries:()=>bt,forEachSeries:()=>Fi,forever:()=>dc,groupBy:()=>hc,groupByLimit:()=>Ti,groupBySeries:()=>pc,inject:()=>Lr,log:()=>mc,map:()=>Ai,mapLimit:()=>Sn,mapSeries:()=>_o,mapValues:()=>gc,mapValuesLimit:()=>ji,mapValuesSeries:()=>Dc,memoize:()=>yc,nextTick:()=>wc,parallel:()=>vc,parallelLimit:()=>Ec,priorityQueue:()=>_c,queue:()=>xo,race:()=>Fc,reduce:()=>Lr,reduceRight:()=>go,reflect:()=>Si,reflectAll:()=>Sc,reject:()=>Cc,rejectLimit:()=>Oc,rejectSeries:()=>bc,retry:()=>Ci,retryable:()=>Mc,select:()=>fo,selectLimit:()=>ho,selectSeries:()=>po,seq:()=>Co,series:()=>Tc,setImmediate:()=>Kt,some:()=>yo,someLimit:()=>wo,someSeries:()=>vo,sortBy:()=>jc,timeout:()=>Ic,times:()=>Nc,timesLimit:()=>Ii,timesSeries:()=>Lc,transform:()=>$c,tryEach:()=>kc,unmemoize:()=>Pc,until:()=>Rc,waterfall:()=>Bc,whilst:()=>Oi,wrapSync:()=>vi});function Ju(e,...t){return (...r)=>e(...t,...r)}function _n(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}function Qu(e){setTimeout(e,0);}function Xu(e){return (t,...r)=>e(()=>t(...r))}function vi(e){return Fn(e)?function(...t){let r=t.pop(),n=e.apply(this,t);return Uu(n,r)}:_n(function(t,r){var n;try{n=e.apply(this,t);}catch(s){return r(s)}if(n&&typeof n.then=="function")return Uu(n,r);r(null,n);})}function Uu(e,t){return e.then(r=>{zu(t,null,r);},r=>{zu(t,r&&(r instanceof Error||r.message)?r:new Error(r));})}function zu(e,t,r){try{e(t,r);}catch(n){Kt(s=>{throw s},n);}}function Fn(e){return e[Symbol.toStringTag]==="AsyncFunction"}function r1(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function n1(e){return typeof e[Symbol.asyncIterator]=="function"}function he(e){if(typeof e!="function")throw new Error("expected a function");return Fn(e)?vi(e):e}function fe(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");function r(...n){return typeof n[t-1]=="function"?e.apply(this,n):new Promise((s,o)=>{n[t-1]=(u,...c)=>{if(u)return o(u);s(c.length>1?c:c[0]);},e.apply(this,n);})}return r}function ec(e){return function(r,...n){return fe(function(o){var u=this;return e(r,(c,d)=>{he(c).apply(u,n.concat(d));},o)})}}function Eo(e,t,r,n){t=t||[];var s=[],o=0,u=he(r);return e(t,(c,d,g)=>{var m=o++;u(c,(D,y)=>{s[m]=y,g(D);});},c=>{n(c,s);})}function bi(e){return e&&typeof e.length=="number"&&e.length>=0&&e.length%1===0}function Qt(e){function t(...r){if(e!==null){var n=e;e=null,n.apply(this,r);}}return Object.assign(t,e),t}function s1(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function o1(e){var t=-1,r=e.length;return function(){return ++t=t||u||s||(u=!0,e.next().then(({value:y,done:F})=>{if(!(o||s)){if(u=!1,F){s=!0,c<=0&&n(null);return}c++,r(y,d,m),d++,g();}}).catch(D));}function m(y,F){if(c-=1,!o){if(y)return D(y);if(y===!1){s=!0,o=!0;return}if(F===xi||s&&c<=0)return s=!0,n(null);g();}}function D(y){o||(u=!1,s=!0,n(y));}g();}function l1(e,t,r,n){return vt(t)(e,he(r),n)}function f1(e,t,r){r=Qt(r);var n=0,s=0,{length:o}=e,u=!1;o===0&&r(null);function c(d,g){d===!1&&(u=!0),u!==!0&&(d?r(d):(++s===o||g===xi)&&r(null));}for(;n1?s:s[0]);}return r[kr]=new Promise((n,s)=>{e=n,t=s;}),r}function Fo(e,t,r){typeof t!="number"&&(r=t,t=null),r=Qt(r||$r());var n=Object.keys(e).length;if(!n)return r(null);t||(t=n);var s={},o=0,u=!1,c=!1,d=Object.create(null),g=[],m=[],D={};Object.keys(e).forEach(w=>{var M=e[w];if(!Array.isArray(M)){y(w,[M]),m.push(w);return}var P=M.slice(0,M.length-1),J=P.length;if(J===0){y(w,M),m.push(w);return}D[w]=J,P.forEach(X=>{if(!e[X])throw new Error("async.auto task `"+w+"` has a non-existent dependency `"+X+"` in "+P.join(", "));C(X,()=>{J--,J===0&&y(w,M);});});}),$(),F();function y(w,M){g.push(()=>j(w,M));}function F(){if(!u){if(g.length===0&&o===0)return r(null,s);for(;g.length&&oP()),F();}function j(w,M){if(!c){var P=Xt((X,...te)=>{if(o--,X===!1){u=!0;return}if(te.length<2&&([te]=te),X){var L={};if(Object.keys(s).forEach(ee=>{L[ee]=s[ee];}),L[w]=te,c=!0,d=Object.create(null),u)return;r(X,L);}else s[w]=te,_(w);});o++;var J=he(M[M.length-1]);M.length>1?J(s,P):J(P);}}function $(){for(var w,M=0;m.length;)w=m.pop(),M++,x(w).forEach(P=>{--D[P]===0&&m.push(P);});if(M!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function x(w){var M=[];return Object.keys(e).forEach(P=>{let J=e[P];Array.isArray(J)&&J.indexOf(w)>=0&&M.push(P);}),M}return r[kr]}function E1(e){let t="",r=0,n=e.indexOf("*/");for(;r=0;return (O?l?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+f}var K=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ye=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,de={},Ye={};function R(i,a,l,f){var p=f;typeof f=="string"&&(p=function(){return this[f]()}),i&&(Ye[i]=p),a&&(Ye[a[0]]=function(){return G(p.apply(this,arguments),a[1],a[2])}),l&&(Ye[l]=function(){return this.localeData().ordinal(p.apply(this,arguments),i)});}function Ke(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function Ne(i){var a=i.match(K),l,f;for(l=0,f=a.length;l=0&&ye.test(i);)i=i.replace(ye,f),ye.lastIndex=0,l-=1;return i}var ve={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function le(i){var a=this._longDateFormat[i],l=this._longDateFormat[i.toUpperCase()];return a||!l?a:(this._longDateFormat[i]=l.match(K).map(function(f){return f==="MMMM"||f==="MM"||f==="DD"||f==="dddd"?f.slice(1):f}).join(""),this._longDateFormat[i])}var we="Invalid date";function Ce(){return this._invalidDate}var E="%d",S=/\d{1,2}/;function h(i){return this._ordinal.replace("%d",i)}var w={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function T(i,a,l,f){var p=this._relativeTime[l];return Z(p)?p(i,a,l,f):p.replace(/%d/i,i)}function A(i,a){var l=this._relativeTime[i>0?"future":"past"];return Z(l)?l(a):l.replace(/%s/i,a)}var b={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function z(i){return typeof i=="string"?b[i]||b[i.toLowerCase()]:void 0}function Q(i){var a={},l,f;for(f in i)o(i,f)&&(l=z(f),l&&(a[l]=i[f]));return a}var re={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ae(i){var a=[],l;for(l in i)o(i,l)&&a.push({unit:l,priority:re[l]});return a.sort(function(f,p){return f.priority-p.priority}),a}var Fe=/\d/,Pe=/\d\d/,cn=/\d{3}/,Cr=/\d{4}/,Te=/[+-]?\d{6}/,pe=/\d\d?/,Dt=/\d\d\d\d?/,Xn=/\d\d\d\d\d\d?/,ei=/\d{1,3}/,Ts=/\d{1,4}/,ti=/[+-]?\d{1,6}/,Or=/\d+/,ri=/[+-]?\d+/,hg=/Z|[+-]\d\d:?\d\d/gi,ni=/Z|[+-]\d\d(?::?\d\d)?/gi,pg=/[+-]?\d+(\.\d{1,3})?/,ln=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,br=/^[1-9]\d?/,js=/^([1-9]\d|\d)/,ii;ii={};function se(i,a,l){ii[i]=Z(a)?a:function(f,p){return f&&l?l:a};}function mg(i,a){return o(ii,i)?ii[i](a._strict,a._locale):new RegExp(gg(i))}function gg(i){return It(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,l,f,p,O){return l||f||p||O}))}function It(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function at(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function me(i){var a=+i,l=0;return a!==0&&isFinite(a)&&(l=at(a)),l}var Is={};function Se(i,a){var l,f=a,p;for(typeof i=="string"&&(i=[i]),d(a)&&(f=function(O,N){N[a]=me(O);}),p=i.length,l=0;l68?1900:2e3)};var ru=xr("FullYear",!0);function wg(){return si(this.year())}function xr(i,a){return function(l){return l!=null?(nu(this,i,l),t.updateOffset(this,a),this):hn(this,i)}}function hn(i,a){if(!i.isValid())return NaN;var l=i._d,f=i._isUTC;switch(a){case"Milliseconds":return f?l.getUTCMilliseconds():l.getMilliseconds();case"Seconds":return f?l.getUTCSeconds():l.getSeconds();case"Minutes":return f?l.getUTCMinutes():l.getMinutes();case"Hours":return f?l.getUTCHours():l.getHours();case"Date":return f?l.getUTCDate():l.getDate();case"Day":return f?l.getUTCDay():l.getDay();case"Month":return f?l.getUTCMonth():l.getMonth();case"FullYear":return f?l.getUTCFullYear():l.getFullYear();default:return NaN}}function nu(i,a,l){var f,p,O,N,ne;if(!(!i.isValid()||isNaN(l))){switch(f=i._d,p=i._isUTC,a){case"Milliseconds":return void(p?f.setUTCMilliseconds(l):f.setMilliseconds(l));case"Seconds":return void(p?f.setUTCSeconds(l):f.setSeconds(l));case"Minutes":return void(p?f.setUTCMinutes(l):f.setMinutes(l));case"Hours":return void(p?f.setUTCHours(l):f.setHours(l));case"Date":return void(p?f.setUTCDate(l):f.setDate(l));case"FullYear":break;default:return}O=l,N=i.month(),ne=i.date(),ne=ne===29&&N===1&&!si(O)?28:ne,p?f.setUTCFullYear(O,N,ne):f.setFullYear(O,N,ne);}}function Eg(i){return i=z(i),Z(this[i])?this[i]():this}function _g(i,a){if(typeof i=="object"){i=Q(i);var l=Ae(i),f,p=l.length;for(f=0;f=0?(ne=new Date(i+400,a,l,f,p,O,N),isFinite(ne.getFullYear())&&ne.setFullYear(i)):ne=new Date(i,a,l,f,p,O,N),ne}function pn(i){var a,l;return i<100&&i>=0?(l=Array.prototype.slice.call(arguments),l[0]=i+400,a=new Date(Date.UTC.apply(null,l)),isFinite(a.getUTCFullYear())&&a.setUTCFullYear(i)):a=new Date(Date.UTC.apply(null,arguments)),a}function oi(i,a,l){var f=7+a-l,p=(7+pn(i,0,f).getUTCDay()-a)%7;return -p+f-1}function cu(i,a,l,f,p){var O=(7+l-f)%7,N=oi(i,f,p),ne=1+7*(a-1)+O+N,ue,ge;return ne<=0?(ue=i-1,ge=dn(ue)+ne):ne>dn(i)?(ue=i+1,ge=ne-dn(i)):(ue=i,ge=ne),{year:ue,dayOfYear:ge}}function mn(i,a,l){var f=oi(i.year(),a,l),p=Math.floor((i.dayOfYear()-f-1)/7)+1,O,N;return p<1?(N=i.year()-1,O=p+$t(N,a,l)):p>$t(i.year(),a,l)?(O=p-$t(i.year(),a,l),N=i.year()+1):(N=i.year(),O=p),{week:O,year:N}}function $t(i,a,l){var f=oi(i,a,l),p=oi(i+1,a,l);return (dn(i)-f+p)/7}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),se("w",pe,br),se("ww",pe,Pe),se("W",pe,br),se("WW",pe,Pe),fn(["w","ww","W","WW"],function(i,a,l,f){a[f.substr(0,1)]=me(i);});function Lg(i){return mn(i,this._week.dow,this._week.doy).week}var $g={dow:0,doy:6};function kg(){return this._week.dow}function Pg(){return this._week.doy}function Rg(i){var a=this.localeData().week(this);return i==null?a:this.add((i-a)*7,"d")}function Bg(i){var a=mn(this,1,4).week;return i==null?a:this.add((i-a)*7,"d")}R("d",0,"do","day"),R("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),R("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),R("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),se("d",pe),se("e",pe),se("E",pe),se("dd",function(i,a){return a.weekdaysMinRegex(i)}),se("ddd",function(i,a){return a.weekdaysShortRegex(i)}),se("dddd",function(i,a){return a.weekdaysRegex(i)}),fn(["dd","ddd","dddd"],function(i,a,l,f){var p=l._locale.weekdaysParse(i,f,l._strict);p!=null?a.d=p:C(l).invalidWeekday=i;}),fn(["d","e","E"],function(i,a,l,f){a[f]=me(i);});function qg(i,a){return typeof i!="string"?i:isNaN(i)?(i=a.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function Yg(i,a){return typeof i=="string"?a.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Ls(i,a){return i.slice(a,7).concat(i.slice(0,a))}var Wg="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),lu="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ug="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zg=ln,Hg=ln,Vg=ln;function Gg(i,a){var l=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(a)?"format":"standalone"];return i===!0?Ls(l,this._week.dow):i?l[i.day()]:l}function Jg(i){return i===!0?Ls(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function Zg(i){return i===!0?Ls(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function Kg(i,a,l){var f,p,O,N=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)O=y([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(O,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(O,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(O,"").toLocaleLowerCase();return l?a==="dddd"?(p=Ie.call(this._weekdaysParse,N),p!==-1?p:null):a==="ddd"?(p=Ie.call(this._shortWeekdaysParse,N),p!==-1?p:null):(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null):a==="dddd"?(p=Ie.call(this._weekdaysParse,N),p!==-1||(p=Ie.call(this._shortWeekdaysParse,N),p!==-1)?p:(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null)):a==="ddd"?(p=Ie.call(this._shortWeekdaysParse,N),p!==-1||(p=Ie.call(this._weekdaysParse,N),p!==-1)?p:(p=Ie.call(this._minWeekdaysParse,N),p!==-1?p:null)):(p=Ie.call(this._minWeekdaysParse,N),p!==-1||(p=Ie.call(this._weekdaysParse,N),p!==-1)?p:(p=Ie.call(this._shortWeekdaysParse,N),p!==-1?p:null))}function Qg(i,a,l){var f,p,O;if(this._weekdaysParseExact)return Kg.call(this,i,a,l);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),f=0;f<7;f++){if(p=y([2e3,1]).day(f),l&&!this._fullWeekdaysParse[f]&&(this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[f]||(O="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[f]=new RegExp(O.replace(".",""),"i")),l&&a==="dddd"&&this._fullWeekdaysParse[f].test(i))return f;if(l&&a==="ddd"&&this._shortWeekdaysParse[f].test(i))return f;if(l&&a==="dd"&&this._minWeekdaysParse[f].test(i))return f;if(!l&&this._weekdaysParse[f].test(i))return f}}function Xg(i){if(!this.isValid())return i!=null?this:NaN;var a=hn(this,"Day");return i!=null?(i=qg(i,this.localeData()),this.add(i-a,"d")):a}function eD(i){if(!this.isValid())return i!=null?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return i==null?a:this.add(i-a,"d")}function tD(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var a=Yg(i,this.localeData());return this.day(this.day()%7?a:a-7)}else return this.day()||7}function rD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=zg),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function nD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Hg),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function iD(i){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||$s.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Vg),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $s(){function i(Ge,qt){return qt.length-Ge.length}var a=[],l=[],f=[],p=[],O,N,ne,ue,ge;for(O=0;O<7;O++)N=y([2e3,1]).day(O),ne=It(this.weekdaysMin(N,"")),ue=It(this.weekdaysShort(N,"")),ge=It(this.weekdays(N,"")),a.push(ne),l.push(ue),f.push(ge),p.push(ne),p.push(ue),p.push(ge);a.sort(i),l.sort(i),f.sort(i),p.sort(i),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i");}function ks(){return this.hours()%12||12}function sD(){return this.hours()||24}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,ks),R("k",["kk",2],0,sD),R("hmm",0,0,function(){return ""+ks.apply(this)+G(this.minutes(),2)}),R("hmmss",0,0,function(){return ""+ks.apply(this)+G(this.minutes(),2)+G(this.seconds(),2)}),R("Hmm",0,0,function(){return ""+this.hours()+G(this.minutes(),2)}),R("Hmmss",0,0,function(){return ""+this.hours()+G(this.minutes(),2)+G(this.seconds(),2)});function fu(i,a){R(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)});}fu("a",!0),fu("A",!1);function du(i,a){return a._meridiemParse}se("a",du),se("A",du),se("H",pe,js),se("h",pe,br),se("k",pe,br),se("HH",pe,Pe),se("hh",pe,Pe),se("kk",pe,Pe),se("hmm",Dt),se("hmmss",Xn),se("Hmm",Dt),se("Hmmss",Xn),Se(["H","HH"],ke),Se(["k","kk"],function(i,a,l){var f=me(i);a[ke]=f===24?0:f;}),Se(["a","A"],function(i,a,l){l._isPm=l._locale.isPM(i),l._meridiem=i;}),Se(["h","hh"],function(i,a,l){a[ke]=me(i),C(l).bigHour=!0;}),Se("hmm",function(i,a,l){var f=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f)),C(l).bigHour=!0;}),Se("hmmss",function(i,a,l){var f=i.length-4,p=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f,2)),a[Lt]=me(i.substr(p)),C(l).bigHour=!0;}),Se("Hmm",function(i,a,l){var f=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f));}),Se("Hmmss",function(i,a,l){var f=i.length-4,p=i.length-2;a[ke]=me(i.substr(0,f)),a[yt]=me(i.substr(f,2)),a[Lt]=me(i.substr(p));});function oD(i){return (i+"").toLowerCase().charAt(0)==="p"}var aD=/[ap]\.?m?\.?/i,uD=xr("Hours",!0);function cD(i,a,l){return i>11?l?"pm":"PM":l?"am":"AM"}var hu={calendar:W,longDateFormat:ve,invalidDate:we,ordinal:E,dayOfMonthOrdinalParse:S,relativeTime:w,months:Sg,monthsShort:iu,week:$g,weekdays:Wg,weekdaysMin:Ug,weekdaysShort:lu,meridiemParse:aD},be={},gn={},Dn;function lD(i,a){var l,f=Math.min(i.length,a.length);for(l=0;l0;){if(p=ai(O.slice(0,l).join("-")),p)return p;if(f&&f.length>=l&&lD(O,f)>=l-1)break;l--;}a++;}return Dn}function dD(i){return !!(i&&i.match("^[^/\\\\]*$"))}function ai(i){var a=null,l;if(be[i]===void 0&&typeof Nr<"u"&&Nr&&Nr.exports&&dD(i))try{a=Dn._abbr,l=U,l("./locale/"+i),Gt(a);}catch{be[i]=null;}return be[i]}function Gt(i,a){var l;return i&&(c(a)?l=kt(i):l=Ps(i,a),l?Dn=l:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),Dn._abbr}function Ps(i,a){if(a!==null){var l,f=hu;if(a.abbr=i,be[i]!=null)ee("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),f=be[i]._config;else if(a.parentLocale!=null)if(be[a.parentLocale]!=null)f=be[a.parentLocale]._config;else if(l=ai(a.parentLocale),l!=null)f=l._config;else return gn[a.parentLocale]||(gn[a.parentLocale]=[]),gn[a.parentLocale].push({name:i,config:a}),null;return be[i]=new V(Y(f,a)),gn[i]&&gn[i].forEach(function(p){Ps(p.name,p.config);}),Gt(i),be[i]}else return delete be[i],null}function hD(i,a){if(a!=null){var l,f,p=hu;be[i]!=null&&be[i].parentLocale!=null?be[i].set(Y(be[i]._config,a)):(f=ai(i),f!=null&&(p=f._config),a=Y(p,a),f==null&&(a.abbr=i),l=new V(a),l.parentLocale=be[i],be[i]=l),Gt(i);}else be[i]!=null&&(be[i].parentLocale!=null?(be[i]=be[i].parentLocale,i===Gt()&&Gt(i)):be[i]!=null&&delete be[i]);return be[i]}function kt(i){var a;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return Dn;if(!n(i)){if(a=ai(i),a)return a;i=[i];}return fD(i)}function pD(){return I(be)}function Rs(i){var a,l=i._a;return l&&C(i).overflow===-2&&(a=l[Nt]<0||l[Nt]>11?Nt:l[Ot]<1||l[Ot]>Ns(l[He],l[Nt])?Ot:l[ke]<0||l[ke]>24||l[ke]===24&&(l[yt]!==0||l[Lt]!==0||l[lr]!==0)?ke:l[yt]<0||l[yt]>59?yt:l[Lt]<0||l[Lt]>59?Lt:l[lr]<0||l[lr]>999?lr:-1,C(i)._overflowDayOfYear&&(aOt)&&(a=Ot),C(i)._overflowWeeks&&a===-1&&(a=yg),C(i)._overflowWeekday&&a===-1&&(a=vg),C(i).overflow=a),i}var mD=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gD=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,DD=/Z|[+-]\d\d(?::?\d\d)?/,ui=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Bs=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yD=/^\/?Date\((-?\d+)/i,vD=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,wD={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function mu(i){var a,l,f=i._i,p=mD.exec(f)||gD.exec(f),O,N,ne,ue,ge=ui.length,Ge=Bs.length;if(p){for(C(i).iso=!0,a=0,l=ge;adn(N)||i._dayOfYear===0)&&(C(i)._overflowDayOfYear=!0),l=pn(N,0,i._dayOfYear),i._a[Nt]=l.getUTCMonth(),i._a[Ot]=l.getUTCDate()),a=0;a<3&&i._a[a]==null;++a)i._a[a]=f[a]=p[a];for(;a<7;a++)i._a[a]=f[a]=i._a[a]==null?a===2?1:0:i._a[a];i._a[ke]===24&&i._a[yt]===0&&i._a[Lt]===0&&i._a[lr]===0&&(i._nextDay=!0,i._a[ke]=0),i._d=(i._useUTC?pn:Ng).apply(null,f),O=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ke]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==O&&(C(i).weekdayMismatch=!0);}}function xD(i){var a,l,f,p,O,N,ne,ue,ge;a=i._w,a.GG!=null||a.W!=null||a.E!=null?(O=1,N=4,l=Ar(a.GG,i._a[He],mn(Oe(),1,4).year),f=Ar(a.W,1),p=Ar(a.E,1),(p<1||p>7)&&(ue=!0)):(O=i._locale._week.dow,N=i._locale._week.doy,ge=mn(Oe(),O,N),l=Ar(a.gg,i._a[He],ge.year),f=Ar(a.w,ge.week),a.d!=null?(p=a.d,(p<0||p>6)&&(ue=!0)):a.e!=null?(p=a.e+O,(a.e<0||a.e>6)&&(ue=!0)):p=O),f<1||f>$t(l,O,N)?C(i)._overflowWeeks=!0:ue!=null?C(i)._overflowWeekday=!0:(ne=cu(l,f,p,O,N),i._a[He]=ne.year,i._dayOfYear=ne.dayOfYear);}t.ISO_8601=function(){},t.RFC_2822=function(){};function Ys(i){if(i._f===t.ISO_8601){mu(i);return}if(i._f===t.RFC_2822){gu(i);return}i._a=[],C(i).empty=!0;var a=""+i._i,l,f,p,O,N,ne=a.length,ue=0,ge,Ge;for(p=ie(i._f,i._locale).match(K)||[],Ge=p.length,l=0;l0&&C(i).unusedInput.push(N),a=a.slice(a.indexOf(f)+f.length),ue+=f.length),Ye[O]?(f?C(i).empty=!1:C(i).unusedTokens.push(O),Dg(O,f,i)):i._strict&&!f&&C(i).unusedTokens.push(O);C(i).charsLeftOver=ne-ue,a.length>0&&C(i).unusedInput.push(a),i._a[ke]<=12&&C(i).bigHour===!0&&i._a[ke]>0&&(C(i).bigHour=void 0),C(i).parsedDateParts=i._a.slice(0),C(i).meridiem=i._meridiem,i._a[ke]=AD(i._locale,i._a[ke],i._meridiem),ge=C(i).era,ge!==null&&(i._a[He]=i._locale.erasConvertYear(ge,i._a[He])),qs(i),Rs(i);}function AD(i,a,l){var f;return l==null?a:i.meridiemHour!=null?i.meridiemHour(a,l):(i.isPM!=null&&(f=i.isPM(l),f&&a<12&&(a+=12),!f&&a===12&&(a=0)),a)}function MD(i){var a,l,f,p,O,N,ne=!1,ue=i._f.length;if(ue===0){C(i).invalidFormat=!0,i._d=new Date(NaN);return}for(p=0;pthis?this:i:$()});function vu(i,a){var l,f;if(a.length===1&&n(a[0])&&(a=a[0]),!a.length)return Oe();for(l=a[0],f=1;fthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function KD(){if(!c(this._isDSTShifted))return this._isDSTShifted;var i={},a;return M(i,this),i=Du(i),i._a?(a=i._isUTC?y(i._a):Oe(i._a),this._isDSTShifted=this.isValid()&&YD(i._a,a.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function QD(){return this.isValid()?!this._isUTC:!1}function XD(){return this.isValid()?this._isUTC:!1}function Eu(){return this.isValid()?this._isUTC&&this._offset===0:!1}var e0=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,t0=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function vt(i,a){var l=i,f=null,p,O,N;return li(i)?l={ms:i._milliseconds,d:i._days,M:i._months}:d(i)||!isNaN(+i)?(l={},a?l[a]=+i:l.milliseconds=+i):(f=e0.exec(i))?(p=f[1]==="-"?-1:1,l={y:0,d:me(f[Ot])*p,h:me(f[ke])*p,m:me(f[yt])*p,s:me(f[Lt])*p,ms:me(Ws(f[lr]*1e3))*p}):(f=t0.exec(i))?(p=f[1]==="-"?-1:1,l={y:fr(f[2],p),M:fr(f[3],p),w:fr(f[4],p),d:fr(f[5],p),h:fr(f[6],p),m:fr(f[7],p),s:fr(f[8],p)}):l==null?l={}:typeof l=="object"&&("from"in l||"to"in l)&&(N=r0(Oe(l.from),Oe(l.to)),l={},l.ms=N.milliseconds,l.M=N.months),O=new ci(l),li(i)&&o(i,"_locale")&&(O._locale=i._locale),li(i)&&o(i,"_isValid")&&(O._isValid=i._isValid),O}vt.fn=ci.prototype,vt.invalid=qD;function fr(i,a){var l=i&&parseFloat(i.replace(",","."));return (isNaN(l)?0:l)*a}function _u(i,a){var l={};return l.months=a.month()-i.month()+(a.year()-i.year())*12,i.clone().add(l.months,"M").isAfter(a)&&--l.months,l.milliseconds=+a-+i.clone().add(l.months,"M"),l}function r0(i,a){var l;return i.isValid()&&a.isValid()?(a=zs(a,i),i.isBefore(a)?l=_u(i,a):(l=_u(a,i),l.milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0}}function Fu(i,a){return function(l,f){var p,O;return f!==null&&!isNaN(+f)&&(ee(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),O=l,l=f,f=O),p=vt(l,f),Su(this,p,i),this}}function Su(i,a,l,f){var p=a._milliseconds,O=Ws(a._days),N=Ws(a._months);i.isValid()&&(f=f??!0,N&&ou(i,hn(i,"Month")+N*l),O&&nu(i,"Date",hn(i,"Date")+O*l),p&&i._d.setTime(i._d.valueOf()+p*l),f&&t.updateOffset(i,O||N));}var n0=Fu(1,"add"),i0=Fu(-1,"subtract");function Cu(i){return typeof i=="string"||i instanceof String}function s0(i){return J(i)||g(i)||Cu(i)||d(i)||a0(i)||o0(i)||i===null||i===void 0}function o0(i){var a=s(i)&&!u(i),l=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,O,N=f.length;for(p=0;pl.valueOf():l.valueOf()9999?Ct(l,a?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Z(Date.prototype.toISOString)?a?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ct(l,"Z")):Ct(l,a?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function E0(){if(!this.isValid())return "moment.invalid(/* "+this._i+" */)";var i="moment",a="",l,f,p,O;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",a="Z"),l="["+i+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",O=a+'[")]',this.format(l+f+p+O)}function _0(i){i||(i=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var a=Ct(this,i);return this.localeData().postformat(a)}function F0(i,a){return this.isValid()&&(J(i)&&i.isValid()||Oe(i).isValid())?vt({to:this,from:i}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function S0(i){return this.from(Oe(),i)}function C0(i,a){return this.isValid()&&(J(i)&&i.isValid()||Oe(i).isValid())?vt({from:this,to:i}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()}function O0(i){return this.to(Oe(),i)}function Ou(i){var a;return i===void 0?this._locale._abbr:(a=kt(i),a!=null&&(this._locale=a),this)}var bu=te("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function xu(){return this._locale}var di=1e3,Mr=60*di,hi=60*Mr,Au=(365*400+97)*24*hi;function Tr(i,a){return (i%a+a)%a}function Mu(i,a,l){return i<100&&i>=0?new Date(i+400,a,l)-Au:new Date(i,a,l).valueOf()}function Tu(i,a,l){return i<100&&i>=0?Date.UTC(i+400,a,l)-Au:Date.UTC(i,a,l)}function b0(i){var a,l;if(i=z(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Tu:Mu,i){case"year":a=l(this.year(),0,1);break;case"quarter":a=l(this.year(),this.month()-this.month()%3,1);break;case"month":a=l(this.year(),this.month(),1);break;case"week":a=l(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":a=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":a=l(this.year(),this.month(),this.date());break;case"hour":a=this._d.valueOf(),a-=Tr(a+(this._isUTC?0:this.utcOffset()*Mr),hi);break;case"minute":a=this._d.valueOf(),a-=Tr(a,Mr);break;case"second":a=this._d.valueOf(),a-=Tr(a,di);break}return this._d.setTime(a),t.updateOffset(this,!0),this}function x0(i){var a,l;if(i=z(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Tu:Mu,i){case"year":a=l(this.year()+1,0,1)-1;break;case"quarter":a=l(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":a=l(this.year(),this.month()+1,1)-1;break;case"week":a=l(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":a=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":a=l(this.year(),this.month(),this.date()+1)-1;break;case"hour":a=this._d.valueOf(),a+=hi-Tr(a+(this._isUTC?0:this.utcOffset()*Mr),hi)-1;break;case"minute":a=this._d.valueOf(),a+=Mr-Tr(a,Mr)-1;break;case"second":a=this._d.valueOf(),a+=di-Tr(a,di)-1;break}return this._d.setTime(a),t.updateOffset(this,!0),this}function A0(){return this._d.valueOf()-(this._offset||0)*6e4}function M0(){return Math.floor(this.valueOf()/1e3)}function T0(){return new Date(this.valueOf())}function j0(){var i=this;return [i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function I0(){var i=this;return {years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function N0(){return this.isValid()?this.toISOString():null}function L0(){return j(this)}function $0(){return D({},C(this))}function k0(){return C(this).overflow}function P0(){return {input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),se("N",Vs),se("NN",Vs),se("NNN",Vs),se("NNNN",J0),se("NNNNN",Z0),Se(["N","NN","NNN","NNNN","NNNNN"],function(i,a,l,f){var p=l._locale.erasParse(i,f,l._strict);p?C(l).era=p:C(l).invalidEra=i;}),se("y",Or),se("yy",Or),se("yyy",Or),se("yyyy",Or),se("yo",K0),Se(["y","yy","yyy","yyyy"],He),Se(["yo"],function(i,a,l,f){var p;l._locale._eraYearOrdinalRegex&&(p=i.match(l._locale._eraYearOrdinalRegex)),l._locale.eraYearOrdinalParse?a[He]=l._locale.eraYearOrdinalParse(i,p):a[He]=parseInt(i,10);});function R0(i,a){var l,f,p,O=this._eras||kt("en")._eras;for(l=0,f=O.length;l=0)return O[f]}function q0(i,a){var l=i.since<=i.until?1:-1;return a===void 0?t(i.since).year():t(i.since).year()+(a-i.offset)*l}function Y0(){var i,a,l,f=this.localeData().eras();for(i=0,a=f.length;iO&&(a=O),iy.call(this,i,a,l,f,p))}function iy(i,a,l,f,p){var O=cu(i,a,l,f,p),N=pn(O.year,0,O.dayOfYear);return this.year(N.getUTCFullYear()),this.month(N.getUTCMonth()),this.date(N.getUTCDate()),this}R("Q",0,"Qo","quarter"),se("Q",Fe),Se("Q",function(i,a){a[Nt]=(me(i)-1)*3;});function sy(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}R("D",["DD",2],"Do","date"),se("D",pe,br),se("DD",pe,Pe),se("Do",function(i,a){return i?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient}),Se(["D","DD"],Ot),Se("Do",function(i,a){a[Ot]=me(i.match(pe)[0]);});var Iu=xr("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),se("DDD",ei),se("DDDD",cn),Se(["DDD","DDDD"],function(i,a,l){l._dayOfYear=me(i);});function oy(i){var a=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?a:this.add(i-a,"d")}R("m",["mm",2],0,"minute"),se("m",pe,js),se("mm",pe,Pe),Se(["m","mm"],yt);var ay=xr("Minutes",!1);R("s",["ss",2],0,"second"),se("s",pe,js),se("ss",pe,Pe),Se(["s","ss"],Lt);var uy=xr("Seconds",!1);R("S",0,0,function(){return ~~(this.millisecond()/100)}),R(0,["SS",2],0,function(){return ~~(this.millisecond()/10)}),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,function(){return this.millisecond()*10}),R(0,["SSSSS",5],0,function(){return this.millisecond()*100}),R(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),R(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),R(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),R(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),se("S",ei,Fe),se("SS",ei,Pe),se("SSS",ei,cn);var Jt,Nu;for(Jt="SSSS";Jt.length<=9;Jt+="S")se(Jt,Or);function cy(i,a){a[lr]=me(("0."+i)*1e3);}for(Jt="S";Jt.length<=9;Jt+="S")Se(Jt,cy);Nu=xr("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");function ly(){return this._isUTC?"UTC":""}function fy(){return this._isUTC?"Coordinated Universal Time":""}var H=P.prototype;H.add=n0,H.calendar=l0,H.clone=f0,H.diff=y0,H.endOf=x0,H.format=_0,H.from=F0,H.fromNow=S0,H.to=C0,H.toNow=O0,H.get=Eg,H.invalidAt=k0,H.isAfter=d0,H.isBefore=h0,H.isBetween=p0,H.isSame=m0,H.isSameOrAfter=g0,H.isSameOrBefore=D0,H.isValid=L0,H.lang=bu,H.locale=Ou,H.localeData=xu,H.max=LD,H.min=ND,H.parsingFlags=$0,H.set=_g,H.startOf=b0,H.subtract=i0,H.toArray=j0,H.toObject=I0,H.toDate=T0,H.toISOString=w0,H.inspect=E0,typeof Symbol<"u"&&Symbol.for!=null&&(H[Symbol.for("nodejs.util.inspect.custom")]=function(){return "Moment<"+this.format()+">"}),H.toJSON=N0,H.toString=v0,H.unix=M0,H.valueOf=A0,H.creationData=P0,H.eraName=Y0,H.eraNarrow=W0,H.eraAbbr=U0,H.eraYear=z0,H.year=ru,H.isLeapYear=wg,H.weekYear=Q0,H.isoWeekYear=X0,H.quarter=H.quarters=sy,H.month=au,H.daysInMonth=Tg,H.week=H.weeks=Rg,H.isoWeek=H.isoWeeks=Bg,H.weeksInYear=ry,H.weeksInWeekYear=ny,H.isoWeeksInYear=ey,H.isoWeeksInISOWeekYear=ty,H.date=Iu,H.day=H.days=Xg,H.weekday=eD,H.isoWeekday=tD,H.dayOfYear=oy,H.hour=H.hours=uD,H.minute=H.minutes=ay,H.second=H.seconds=uy,H.millisecond=H.milliseconds=Nu,H.utcOffset=UD,H.utc=HD,H.local=VD,H.parseZone=GD,H.hasAlignedHourOffset=JD,H.isDST=ZD,H.isLocal=QD,H.isUtcOffset=XD,H.isUtc=Eu,H.isUTC=Eu,H.zoneAbbr=ly,H.zoneName=fy,H.dates=te("dates accessor is deprecated. Use date instead.",Iu),H.months=te("months accessor is deprecated. Use month instead",au),H.years=te("years accessor is deprecated. Use year instead",ru),H.zone=te("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",zD),H.isDSTShifted=te("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",KD);function dy(i){return Oe(i*1e3)}function hy(){return Oe.apply(null,arguments).parseZone()}function Lu(i){return i}var Ee=V.prototype;Ee.calendar=k,Ee.longDateFormat=le,Ee.invalidDate=Ce,Ee.ordinal=h,Ee.preparse=Lu,Ee.postformat=Lu,Ee.relativeTime=T,Ee.pastFuture=A,Ee.set=q,Ee.eras=R0,Ee.erasParse=B0,Ee.erasConvertYear=q0,Ee.erasAbbrRegex=V0,Ee.erasNameRegex=H0,Ee.erasNarrowRegex=G0,Ee.months=bg,Ee.monthsShort=xg,Ee.monthsParse=Mg,Ee.monthsRegex=Ig,Ee.monthsShortRegex=jg,Ee.week=Lg,Ee.firstDayOfYear=Pg,Ee.firstDayOfWeek=kg,Ee.weekdays=Gg,Ee.weekdaysMin=Zg,Ee.weekdaysShort=Jg,Ee.weekdaysParse=Qg,Ee.weekdaysRegex=rD,Ee.weekdaysShortRegex=nD,Ee.weekdaysMinRegex=iD,Ee.isPM=oD,Ee.meridiem=cD;function mi(i,a,l,f){var p=kt(),O=y().set(f,a);return p[l](O,i)}function $u(i,a,l){if(d(i)&&(a=i,i=void 0),i=i||"",a!=null)return mi(i,a,l,"month");var f,p=[];for(f=0;f<12;f++)p[f]=mi(i,f,l,"month");return p}function Js(i,a,l,f){typeof i=="boolean"?(d(a)&&(l=a,a=void 0),a=a||""):(a=i,l=a,i=!1,d(a)&&(l=a,a=void 0),a=a||"");var p=kt(),O=i?p._week.dow:0,N,ne=[];if(l!=null)return mi(a,(l+O)%7,f,"day");for(N=0;N<7;N++)ne[N]=mi(a,(N+O)%7,f,"day");return ne}function py(i,a){return $u(i,a,"months")}function my(i,a){return $u(i,a,"monthsShort")}function gy(i,a,l){return Js(i,a,l,"weekdays")}function Dy(i,a,l){return Js(i,a,l,"weekdaysShort")}function yy(i,a,l){return Js(i,a,l,"weekdaysMin")}Gt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var a=i%10,l=me(i%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return i+l}}),t.lang=te("moment.lang is deprecated. Use moment.locale instead.",Gt),t.langData=te("moment.langData is deprecated. Use moment.localeData instead.",kt);var Pt=Math.abs;function vy(){var i=this._data;return this._milliseconds=Pt(this._milliseconds),this._days=Pt(this._days),this._months=Pt(this._months),i.milliseconds=Pt(i.milliseconds),i.seconds=Pt(i.seconds),i.minutes=Pt(i.minutes),i.hours=Pt(i.hours),i.months=Pt(i.months),i.years=Pt(i.years),this}function ku(i,a,l,f){var p=vt(a,l);return i._milliseconds+=f*p._milliseconds,i._days+=f*p._days,i._months+=f*p._months,i._bubble()}function wy(i,a){return ku(this,i,a,1)}function Ey(i,a){return ku(this,i,a,-1)}function Pu(i){return i<0?Math.floor(i):Math.ceil(i)}function _y(){var i=this._milliseconds,a=this._days,l=this._months,f=this._data,p,O,N,ne,ue;return i>=0&&a>=0&&l>=0||i<=0&&a<=0&&l<=0||(i+=Pu(Zs(l)+a)*864e5,a=0,l=0),f.milliseconds=i%1e3,p=at(i/1e3),f.seconds=p%60,O=at(p/60),f.minutes=O%60,N=at(O/60),f.hours=N%24,a+=at(N/24),ue=at(Ru(a)),l+=ue,a-=Pu(Zs(ue)),ne=at(l/12),l%=12,f.days=a,f.months=l,f.years=ne,this}function Ru(i){return i*4800/146097}function Zs(i){return i*146097/4800}function Fy(i){if(!this.isValid())return NaN;var a,l,f=this._milliseconds;if(i=z(i),i==="month"||i==="quarter"||i==="year")switch(a=this._days+f/864e5,l=this._months+Ru(a),i){case"month":return l;case"quarter":return l/3;case"year":return l/12}else switch(a=this._days+Math.round(Zs(this._months)),i){case"week":return a/7+f/6048e5;case"day":return a+f/864e5;case"hour":return a*24+f/36e5;case"minute":return a*1440+f/6e4;case"second":return a*86400+f/1e3;case"millisecond":return Math.floor(a*864e5)+f;default:throw new Error("Unknown unit "+i)}}function Rt(i){return function(){return this.as(i)}}var Bu=Rt("ms"),Sy=Rt("s"),Cy=Rt("m"),Oy=Rt("h"),by=Rt("d"),xy=Rt("w"),Ay=Rt("M"),My=Rt("Q"),Ty=Rt("y"),jy=Bu;function Iy(){return vt(this)}function Ny(i){return i=z(i),this.isValid()?this[i+"s"]():NaN}function dr(i){return function(){return this.isValid()?this._data[i]:NaN}}var Ly=dr("milliseconds"),$y=dr("seconds"),ky=dr("minutes"),Py=dr("hours"),Ry=dr("days"),By=dr("months"),qy=dr("years");function Yy(){return at(this.days()/7)}var Bt=Math.round,jr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Wy(i,a,l,f,p){return p.relativeTime(a||1,!!l,i,f)}function Uy(i,a,l,f){var p=vt(i).abs(),O=Bt(p.as("s")),N=Bt(p.as("m")),ne=Bt(p.as("h")),ue=Bt(p.as("d")),ge=Bt(p.as("M")),Ge=Bt(p.as("w")),qt=Bt(p.as("y")),Zt=O<=l.ss&&["s",O]||O0,Zt[4]=f,Wy.apply(null,Zt)}function zy(i){return i===void 0?Bt:typeof i=="function"?(Bt=i,!0):!1}function Hy(i,a){return jr[i]===void 0?!1:a===void 0?jr[i]:(jr[i]=a,i==="s"&&(jr.ss=a-1),!0)}function Vy(i,a){if(!this.isValid())return this.localeData().invalidDate();var l=!1,f=jr,p,O;return typeof i=="object"&&(a=i,i=!1),typeof i=="boolean"&&(l=i),typeof a=="object"&&(f=Object.assign({},jr,a),a.s!=null&&a.ss==null&&(f.ss=a.s-1)),p=this.localeData(),O=Uy(this,!l,f,p),l&&(O=p.pastFuture(+this,O)),p.postformat(O)}var Ks=Math.abs;function Ir(i){return (i>0)-(i<0)||+i}function gi(){if(!this.isValid())return this.localeData().invalidDate();var i=Ks(this._milliseconds)/1e3,a=Ks(this._days),l=Ks(this._months),f,p,O,N,ne=this.asSeconds(),ue,ge,Ge,qt;return ne?(f=at(i/60),p=at(f/60),i%=60,f%=60,O=at(l/12),l%=12,N=i?i.toFixed(3).replace(/\.?0+$/,""):"",ue=ne<0?"-":"",ge=Ir(this._months)!==Ir(ne)?"-":"",Ge=Ir(this._days)!==Ir(ne)?"-":"",qt=Ir(this._milliseconds)!==Ir(ne)?"-":"",ue+"P"+(O?ge+O+"Y":"")+(l?ge+l+"M":"")+(a?Ge+a+"D":"")+(p||f||i?"T":"")+(p?qt+p+"H":"")+(f?qt+f+"M":"")+(i?qt+N+"S":"")):"P0D"}var De=ci.prototype;De.isValid=BD,De.abs=vy,De.add=wy,De.subtract=Ey,De.as=Fy,De.asMilliseconds=Bu,De.asSeconds=Sy,De.asMinutes=Cy,De.asHours=Oy,De.asDays=by,De.asWeeks=xy,De.asMonths=Ay,De.asQuarters=My,De.asYears=Ty,De.valueOf=jy,De._bubble=_y,De.clone=Iy,De.get=Ny,De.milliseconds=Ly,De.seconds=$y,De.minutes=ky,De.hours=Py,De.days=Ry,De.weeks=Yy,De.months=By,De.years=qy,De.humanize=Vy,De.toISOString=gi,De.toString=gi,De.toJSON=gi,De.locale=Ou,De.localeData=xu,De.toIsoString=te("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",gi),De.lang=bu,R("X",0,0,"unix"),R("x",0,0,"valueOf"),se("x",ri),se("X",pg),Se("X",function(i,a,l){l._d=new Date(parseFloat(i)*1e3);}),Se("x",function(i,a,l){l._d=new Date(me(i));});return t.version="2.30.1",r(Oe),t.fn=H,t.min=$D,t.max=kD,t.now=PD,t.utc=y,t.unix=dy,t.months=py,t.isDate=g,t.locale=Gt,t.invalid=$,t.duration=vt,t.isMoment=J,t.weekdays=gy,t.parseZone=hy,t.localeData=kt,t.isDuration=li,t.monthsShort=my,t.weekdaysMin=yy,t.defineLocale=Ps,t.updateLocale=hD,t.locales=pD,t.weekdaysShort=Dy,t.normalizeUnits=z,t.relativeTimeRounding=zy,t.relativeTimeThreshold=Hy,t.calendarFormat=c0,t.prototype=H,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},t});});var Mo={};e1(Mo,{all:()=>uo,allLimit:()=>co,allSeries:()=>lo,any:()=>yo,anyLimit:()=>vo,anySeries:()=>wo,apply:()=>Ju,applyEach:()=>tc,applyEachSeries:()=>rc,asyncify:()=>vi,auto:()=>Fo,autoInject:()=>nc,cargo:()=>ic,cargoQueue:()=>sc,compose:()=>oc,concat:()=>ro,concatLimit:()=>En,concatSeries:()=>no,constant:()=>ac,default:()=>ov,detect:()=>io,detectLimit:()=>so,detectSeries:()=>oo,dir:()=>cc,doDuring:()=>wi,doUntil:()=>lc,doWhilst:()=>wi,during:()=>Ci,each:()=>ao,eachLimit:()=>Ei,eachOf:()=>ut,eachOfLimit:()=>wn,eachOfSeries:()=>bt,eachSeries:()=>_i,ensureAsync:()=>Oo,every:()=>uo,everyLimit:()=>co,everySeries:()=>lo,filter:()=>fo,filterLimit:()=>ho,filterSeries:()=>po,find:()=>io,findLimit:()=>so,findSeries:()=>oo,flatMap:()=>ro,flatMapLimit:()=>En,flatMapSeries:()=>no,foldl:()=>Lr,foldr:()=>go,forEach:()=>ao,forEachLimit:()=>Ei,forEachOf:()=>ut,forEachOfLimit:()=>wn,forEachOfSeries:()=>bt,forEachSeries:()=>_i,forever:()=>dc,groupBy:()=>hc,groupByLimit:()=>Mi,groupBySeries:()=>pc,inject:()=>Lr,log:()=>mc,map:()=>xi,mapLimit:()=>Sn,mapSeries:()=>_o,mapValues:()=>gc,mapValuesLimit:()=>Ti,mapValuesSeries:()=>Dc,memoize:()=>yc,nextTick:()=>vc,parallel:()=>wc,parallelLimit:()=>Ec,priorityQueue:()=>_c,queue:()=>xo,race:()=>Fc,reduce:()=>Lr,reduceRight:()=>go,reflect:()=>Fi,reflectAll:()=>Sc,reject:()=>Cc,rejectLimit:()=>Oc,rejectSeries:()=>bc,retry:()=>Si,retryable:()=>Mc,select:()=>fo,selectLimit:()=>ho,selectSeries:()=>po,seq:()=>Co,series:()=>Tc,setImmediate:()=>Kt,some:()=>yo,someLimit:()=>vo,someSeries:()=>wo,sortBy:()=>jc,timeout:()=>Ic,times:()=>Nc,timesLimit:()=>ji,timesSeries:()=>Lc,transform:()=>$c,tryEach:()=>kc,unmemoize:()=>Pc,until:()=>Rc,waterfall:()=>Bc,whilst:()=>Ci,wrapSync:()=>vi});function Ju(e,...t){return (...r)=>e(...t,...r)}function _n(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}function Qu(e){setTimeout(e,0);}function Xu(e){return (t,...r)=>e(()=>t(...r))}function vi(e){return Fn(e)?function(...t){let r=t.pop(),n=e.apply(this,t);return Uu(n,r)}:_n(function(t,r){var n;try{n=e.apply(this,t);}catch(s){return r(s)}if(n&&typeof n.then=="function")return Uu(n,r);r(null,n);})}function Uu(e,t){return e.then(r=>{zu(t,null,r);},r=>{zu(t,r&&(r instanceof Error||r.message)?r:new Error(r));})}function zu(e,t,r){try{e(t,r);}catch(n){Kt(s=>{throw s},n);}}function Fn(e){return e[Symbol.toStringTag]==="AsyncFunction"}function r1(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function n1(e){return typeof e[Symbol.asyncIterator]=="function"}function he(e){if(typeof e!="function")throw new Error("expected a function");return Fn(e)?vi(e):e}function fe(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");function r(...n){return typeof n[t-1]=="function"?e.apply(this,n):new Promise((s,o)=>{n[t-1]=(u,...c)=>{if(u)return o(u);s(c.length>1?c:c[0]);},e.apply(this,n);})}return r}function ec(e){return function(r,...n){return fe(function(o){var u=this;return e(r,(c,d)=>{he(c).apply(u,n.concat(d));},o)})}}function Eo(e,t,r,n){t=t||[];var s=[],o=0,u=he(r);return e(t,(c,d,g)=>{var m=o++;u(c,(D,y)=>{s[m]=y,g(D);});},c=>{n(c,s);})}function Oi(e){return e&&typeof e.length=="number"&&e.length>=0&&e.length%1===0}function Qt(e){function t(...r){if(e!==null){var n=e;e=null,n.apply(this,r);}}return Object.assign(t,e),t}function s1(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function o1(e){var t=-1,r=e.length;return function(){return ++t=t||u||s||(u=!0,e.next().then(({value:y,done:F})=>{if(!(o||s)){if(u=!1,F){s=!0,c<=0&&n(null);return}c++,r(y,d,m),d++,g();}}).catch(D));}function m(y,F){if(c-=1,!o){if(y)return D(y);if(y===!1){s=!0,o=!0;return}if(F===bi||s&&c<=0)return s=!0,n(null);g();}}function D(y){o||(u=!1,s=!0,n(y));}g();}function l1(e,t,r,n){return wt(t)(e,he(r),n)}function f1(e,t,r){r=Qt(r);var n=0,s=0,{length:o}=e,u=!1;o===0&&r(null);function c(d,g){d===!1&&(u=!0),u!==!0&&(d?r(d):(++s===o||g===bi)&&r(null));}for(;n1?s:s[0]);}return r[kr]=new Promise((n,s)=>{e=n,t=s;}),r}function Fo(e,t,r){typeof t!="number"&&(r=t,t=null),r=Qt(r||$r());var n=Object.keys(e).length;if(!n)return r(null);t||(t=n);var s={},o=0,u=!1,c=!1,d=Object.create(null),g=[],m=[],D={};Object.keys(e).forEach(v=>{var M=e[v];if(!Array.isArray(M)){y(v,[M]),m.push(v);return}var P=M.slice(0,M.length-1),J=P.length;if(J===0){y(v,M),m.push(v);return}D[v]=J,P.forEach(X=>{if(!e[X])throw new Error("async.auto task `"+v+"` has a non-existent dependency `"+X+"` in "+P.join(", "));C(X,()=>{J--,J===0&&y(v,M);});});}),$(),F();function y(v,M){g.push(()=>j(v,M));}function F(){if(!u){if(g.length===0&&o===0)return r(null,s);for(;g.length&&oP()),F();}function j(v,M){if(!c){var P=Xt((X,...te)=>{if(o--,X===!1){u=!0;return}if(te.length<2&&([te]=te),X){var L={};if(Object.keys(s).forEach(ee=>{L[ee]=s[ee];}),L[v]=te,c=!0,d=Object.create(null),u)return;r(X,L);}else s[v]=te,_(v);});o++;var J=he(M[M.length-1]);M.length>1?J(s,P):J(P);}}function $(){for(var v,M=0;m.length;)v=m.pop(),M++,x(v).forEach(P=>{--D[P]===0&&m.push(P);});if(M!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function x(v){var M=[];return Object.keys(e).forEach(P=>{let J=e[P];Array.isArray(J)&&J.indexOf(v)>=0&&M.push(P);}),M}return r[kr]}function E1(e){let t="",r=0,n=e.indexOf("*/");for(;rs.replace(v1,"").trim())}function nc(e,t){var r={};return Object.keys(e).forEach(n=>{var s=e[n],o,u=Fn(s),c=!u&&s.length===1||u&&s.length===0;if(Array.isArray(s))o=[...s],s=o.pop(),r[n]=o.concat(o.length>0?d:s);else if(c)r[n]=s;else {if(o=_1(s),s.length===0&&!u&&o.length===0)throw new Error("autoInject task functions require explicit parameters.");u||o.pop(),r[n]=o.concat(d);}function d(g,m){var D=o.map(y=>g[y]);D.push(m),he(s)(...D);}}),Fo(r,t)}function Vu(e,t){e.length=1,e.head=e.tail=t;}function So(e,t,r){if(t==null)t=1;else if(t===0)throw new RangeError("Concurrency must not be zero");var n=he(e),s=0,o=[];let u={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function c(x,w){u[x].push(w);}function d(x,w){let M=(...P)=>{g(x,M),w(...P);};u[x].push(M);}function g(x,w){if(!x)return Object.keys(u).forEach(M=>u[M]=[]);if(!w)return u[x]=[];u[x]=u[x].filter(M=>M!==w);}function m(x,...w){u[x].forEach(M=>M(...w));}var D=!1;function y(x,w,M,P){if(P!=null&&typeof P!="function")throw new Error("task callback must be a function");$.started=!0;var J,X;function te(ee,...Z){if(ee)return M?X(ee):J();if(Z.length<=1)return J(Z[0]);J(Z);}var L=$._createTaskItem(x,M?te:P||te);if(w?$._tasks.unshift(L):$._tasks.push(L),D||(D=!0,Kt(()=>{D=!1,$.process();})),M||!P)return new Promise((ee,Z)=>{J=ee,X=Z;})}function F(x){return function(w,...M){s-=1;for(var P=0,J=x.length;P0&&o.splice(te,1),X.callback(w,...M),w!=null&&m("error",w,X.data);}s<=$.concurrency-$.buffer&&m("unsaturated"),$.idle()&&m("drain"),$.process();}}function C(x){return x.length===0&&$.idle()?(Kt(()=>m("drain")),!0):!1}let _=x=>w=>{if(!w)return new Promise((M,P)=>{d(x,(J,X)=>{if(J)return P(J);M(X);});});g(x),c(x,w);};var j=!1,$={_tasks:new to,_createTaskItem(x,w){return {data:x,callback:w}},*[Symbol.iterator](){yield*$._tasks[Symbol.iterator]();},concurrency:t,payload:r,buffer:t/4,started:!1,paused:!1,push(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!1,!1,w)):y(x,!1,!1,w)},pushAsync(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!1,!0,w)):y(x,!1,!0,w)},kill(){g(),$._tasks.empty();},unshift(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!0,!1,w)):y(x,!0,!1,w)},unshiftAsync(x,w){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!0,!0,w)):y(x,!0,!0,w)},remove(x){$._tasks.remove(x);},process(){if(!j){for(j=!0;!$.paused&&s<$.concurrency&&$._tasks.length;){var x=[],w=[],M=$._tasks.length;$.payload&&(M=Math.min(M,$.payload));for(var P=0;P{s(t,o,(d,g)=>{t=g,c(d);});},o=>n(o,t))}function Co(...e){var t=e.map(he);return function(...r){var n=this,s=r[r.length-1];return typeof s=="function"?r.pop():s=$r(),Lr(t,r,(o,u,c)=>{u.apply(n,o.concat((d,...g)=>{c(d,g);}));},(o,u)=>s(o,...u)),s[kr]}}function oc(...e){return Co(...e.reverse())}function S1(e,t,r,n){return Eo(vt(t),e,r,n)}function C1(e,t,r,n){var s=he(r);return Sn(e,t,(o,u)=>{s(o,(c,...d)=>c?u(c):u(c,d));},(o,u)=>{for(var c=[],d=0;d{var u=!1,c;let d=he(s);r(n,(g,m,D)=>{d(g,(y,F)=>{if(y||y===!1)return D(y);if(e(F)&&!c)return u=!0,c=t(!0,g),D(null,xi);D();});},g=>{if(g)return o(g);o(null,u?c:t(!1));});}}function x1(e,t,r){return Yt(n=>n,(n,s)=>s)(ut,e,t,r)}function A1(e,t,r,n){return Yt(s=>s,(s,o)=>o)(vt(t),e,r,n)}function M1(e,t,r){return Yt(n=>n,(n,s)=>s)(vt(1),e,t,r)}function uc(e){return (t,...r)=>he(t)(...r,(n,...s)=>{typeof console=="object"&&(n?console.error&&console.error(n):console[e]&&s.forEach(o=>console[e](o)));})}function T1(e,t,r){r=Xt(r);var n=he(e),s=he(t),o;function u(d,...g){if(d)return r(d);d!==!1&&(o=g,s(...g,c));}function c(d,g){if(d)return r(d);if(d!==!1){if(!g)return r(null,...o);n(u);}}return c(null,!0)}function lc(e,t,r){let n=he(t);return Ei(e,(...s)=>{let o=s.pop();n(...s,(u,c)=>o(u,!c));},r)}function fc(e){return (t,r,n)=>e(t,n)}function j1(e,t,r){return ut(e,fc(he(t)),r)}function I1(e,t,r,n){return vt(t)(e,fc(he(r)),n)}function N1(e,t,r){return _i(e,1,t,r)}function Oo(e){return Fn(e)?e:function(...t){var r=t.pop(),n=!0;t.push((...s)=>{n?Kt(()=>r(...s)):r(...s);}),e.apply(this,t),n=!1;}}function L1(e,t,r){return Yt(n=>!n,n=>!n)(ut,e,t,r)}function $1(e,t,r,n){return Yt(s=>!s,s=>!s)(vt(t),e,r,n)}function k1(e,t,r){return Yt(n=>!n,n=>!n)(bt,e,t,r)}function P1(e,t,r,n){var s=new Array(t.length);e(t,(o,u,c)=>{r(o,(d,g)=>{s[u]=!!g,c(d);});},o=>{if(o)return n(o);for(var u=[],c=0;c{r(o,(d,g)=>{if(d)return c(d);g&&s.push({index:u,value:o}),c(d);});},o=>{if(o)return n(o);n(null,s.sort((u,c)=>u.index-c.index).map(u=>u.value));});}function Mi(e,t,r,n){var s=bi(t)?P1:R1;return s(e,t,he(r),n)}function B1(e,t,r){return Mi(ut,e,t,r)}function q1(e,t,r,n){return Mi(vt(t),e,r,n)}function Y1(e,t,r){return Mi(bt,e,t,r)}function W1(e,t){var r=Xt(t),n=he(Oo(e));function s(o){if(o)return r(o);o!==!1&&n(s);}return s()}function U1(e,t,r,n){var s=he(r);return Sn(e,t,(o,u)=>{s(o,(c,d)=>c?u(c):u(c,{key:d,val:o}));},(o,u)=>{for(var c={},{hasOwnProperty:d}=Object.prototype,g=0;g{o(u,c,(g,m)=>{if(g)return d(g);s[c]=m,d(g);});},u=>n(u,s))}function gc(e,t,r){return ji(e,1/0,t,r)}function Dc(e,t,r){return ji(e,1,t,r)}function yc(e,t=r=>r){var r=Object.create(null),n=Object.create(null),s=he(e),o=_n((u,c)=>{var d=t(...u);d in r?Kt(()=>c(null,...r[d])):d in n?n[d].push(c):(n[d]=[c],s(...u,(g,...m)=>{g||(r[d]=m);var D=n[d];delete n[d];for(var y=0,F=D.length;y{r(n[0],s);},t,1)}function H1(e){return (e<<1)+1}function Gu(e){return (e+1>>1)-1}function eo(e,t){return e.priority!==t.priority?e.priority({data:u,priority:c,callback:d});function o(u,c){return Array.isArray(u)?u.map(d=>({data:d,priority:c})):{data:u,priority:c}}return r.push=function(u,c=0,d){return n(o(u,c),d)},r.pushAsync=function(u,c=0,d){return s(o(u,c),d)},delete r.unshift,delete r.unshiftAsync,r}function V1(e,t){if(t=Qt(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r{let c={};if(o&&(c.error=o),u.length>0){var d=u;u.length<=1&&([d]=u),c.value=d;}s(null,c);}),t.apply(this,n)})}function Sc(e){var t;return Array.isArray(e)?t=e.map(Si):(t={},Object.keys(e).forEach(r=>{t[r]=Si.call(this,e[r]);})),t}function Ao(e,t,r,n){let s=he(r);return Mi(e,t,(o,u)=>{s(o,(c,d)=>{u(c,!d);});},n)}function G1(e,t,r){return Ao(ut,e,t,r)}function J1(e,t,r,n){return Ao(vt(t),e,r,n)}function Z1(e,t,r){return Ao(bt,e,t,r)}function xc(e){return function(){return e}}function Ci(e,t,r){var n={times:Do,intervalFunc:xc(Ac)};if(arguments.length<3&&typeof e=="function"?(r=t||$r(),t=e):(K1(n,e),r=r||$r()),typeof t!="function")throw new Error("Invalid arguments for async.retry");var s=he(t),o=1;function u(){s((c,...d)=>{c!==!1&&(c&&o++{(s.lengthn)(ut,e,t,r)}function X1(e,t,r,n){return Yt(Boolean,s=>s)(vt(t),e,r,n)}function ew(e,t,r){return Yt(Boolean,n=>n)(bt,e,t,r)}function tw(e,t,r){var n=he(t);return Ai(e,(o,u)=>{n(o,(c,d)=>{if(c)return u(c);u(c,{value:o,criteria:d});});},(o,u)=>{if(o)return r(o);r(null,u.sort(s).map(c=>c.value));});function s(o,u){var c=o.criteria,d=u.criteria;return cd?1:0}}function Ic(e,t,r){var n=he(e);return _n((s,o)=>{var u=!1,c;function d(){var g=e.name||"anonymous",m=new Error('Callback function "'+g+'" timed out.');m.code="ETIMEDOUT",r&&(m.info=r),u=!0,o(m);}s.push((...g)=>{u||(o(...g),clearTimeout(c));}),c=setTimeout(d,t),n(...s);})}function rw(e){for(var t=Array(e);e--;)t[e]=e;return t}function Ii(e,t,r,n){var s=he(r);return Sn(rw(e),t,s,n)}function Nc(e,t,r){return Ii(e,1/0,t,r)}function Lc(e,t,r){return Ii(e,1,t,r)}function $c(e,t,r,n){arguments.length<=3&&typeof t=="function"&&(n=r,r=t,t=Array.isArray(e)?[]:{}),n=Qt(n||$r());var s=he(r);return ut(e,(o,u,c)=>{s(t,o,u,c);},o=>n(o,t)),n[kr]}function nw(e,t){var r=null,n;return Fi(e,(s,o)=>{he(s)((u,...c)=>{if(u===!1)return o(u);c.length<2?[n]=c:n=c,r=u,o(u?null:{});});},()=>t(r,n))}function Pc(e){return (...t)=>(e.unmemoized||e)(...t)}function iw(e,t,r){r=Xt(r);var n=he(t),s=he(e),o=[];function u(d,...g){if(d)return r(d);o=g,d!==!1&&s(c);}function c(d,g){if(d)return r(d);if(d!==!1){if(!g)return r(null,...o);n(u);}}return s(c)}function Rc(e,t,r){let n=he(e);return Oi(s=>n((o,u)=>s(o,!u)),t,r)}function sw(e,t){if(t=Qt(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(o){var u=he(e[r++]);u(...o,Xt(s));}function s(o,...u){if(o!==!1){if(o||r===e.length)return t(o,...u);n(u);}}n([]);}var t1,Zu,Ku,wn,Kt,i1,xi,vt,vn,ut,Ai,tc,bt,_o,rc,kr,D1,y1,w1,v1,to,Lr,Sn,En,ro,no,io,so,oo,cc,Ei,ao,_i,Fi,uo,co,lo,fo,ho,po,dc,Ti,mc,ji,wi,wc,bo,mo,Fc,Cc,Oc,bc,Do,Ac,yo,wo,vo,jc,kc,Oi,Bc,ow,To=Xy(()=>{t1=typeof queueMicrotask=="function"&&queueMicrotask,Zu=typeof setImmediate=="function"&&setImmediate,Ku=typeof process=="object"&&typeof process.nextTick=="function";t1?wn=queueMicrotask:Zu?wn=setImmediate:Ku?wn=process.nextTick:wn=Qu;Kt=Xu(wn);i1={},xi=i1;vt=e=>(t,r,n)=>{if(n=Qt(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if(r1(t))return Hu(t,e,r,n);if(n1(t))return Hu(t[Symbol.asyncIterator](),e,r,n);var s=c1(t),o=!1,u=!1,c=0,d=!1;function g(D,y){if(!u)if(c-=1,D)o=!0,n(D);else if(D===!1)o=!0,u=!0;else {if(y===xi||o&&c<=0)return o=!0,n(null);d||m();}}function m(){for(d=!0;c)/,w1=/,/,v1=/(=.+)?(\s*)$/;to=class{constructor(){this.head=this.tail=null,this.length=0;}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,r){r.prev=t,r.next=t.next,t.next?t.next.prev=r:this.tail=r,t.next=r,this.length+=1;}insertBefore(t,r){r.prev=t.prev,r.next=t,t.prev?t.prev.next=r:this.head=r,t.prev=r,this.length+=1;}unshift(t){this.head?this.insertBefore(this.head,t):Vu(this,t);}push(t){this.tail?this.insertAfter(this.tail,t):Vu(this,t);}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return [...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next;}remove(t){for(var r=this.head;r;){var{next:n}=r;t(r)&&this.removeLink(r),r=n;}return this}};Lr=fe(F1,4);Sn=fe(S1,4);En=fe(C1,4);ro=fe(O1,3);no=fe(b1,3);io=fe(x1,3);so=fe(A1,4);oo=fe(M1,3);cc=uc("dir");Ei=fe(T1,3);ao=fe(j1,3);_i=fe(I1,4);Fi=fe(N1,3);uo=fe(L1,3);co=fe($1,4);lo=fe(k1,3);fo=fe(B1,3);ho=fe(q1,4);po=fe(Y1,3);dc=fe(W1,2);Ti=fe(U1,4);mc=uc("log");ji=fe(z1,4);Ku?wi=process.nextTick:Zu?wi=setImmediate:wi=Qu;wc=Xu(wi),bo=fe((e,t,r)=>{var n=bi(t)?[]:{};e(t,(s,o,u)=>{he(s)((c,...d)=>{d.length<2&&([d]=d),n[o]=d,u(c);});},s=>r(s,n));},3);mo=class{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER;}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(t){let r;for(;t>0&&eo(this.heap[t],this.heap[r=Gu(t)]);){let n=this.heap[t];this.heap[t]=this.heap[r],this.heap[r]=n,t=r;}}percDown(t){let r;for(;(r=H1(t))=0;n--)this.percDown(n);return this}};Fc=fe(V1,2);Cc=fe(G1,3);Oc=fe(J1,4);bc=fe(Z1,3);Do=5,Ac=0;yo=fe(Q1,3);wo=fe(X1,4);vo=fe(ew,3);jc=fe(tw,3);kc=fe(nw);Oi=fe(iw,3);Bc=fe(sw),ow={apply:Ju,applyEach:tc,applyEachSeries:rc,asyncify:vi,auto:Fo,autoInject:nc,cargo:ic,cargoQueue:sc,compose:oc,concat:ro,concatLimit:En,concatSeries:no,constant:ac,detect:io,detectLimit:so,detectSeries:oo,dir:cc,doUntil:lc,doWhilst:Ei,each:ao,eachLimit:_i,eachOf:ut,eachOfLimit:vn,eachOfSeries:bt,eachSeries:Fi,ensureAsync:Oo,every:uo,everyLimit:co,everySeries:lo,filter:fo,filterLimit:ho,filterSeries:po,forever:dc,groupBy:hc,groupByLimit:Ti,groupBySeries:pc,log:mc,map:Ai,mapLimit:Sn,mapSeries:_o,mapValues:gc,mapValuesLimit:ji,mapValuesSeries:Dc,memoize:yc,nextTick:wc,parallel:vc,parallelLimit:Ec,priorityQueue:_c,queue:xo,race:Fc,reduce:Lr,reduceRight:go,reflect:Si,reflectAll:Sc,reject:Cc,rejectLimit:Oc,rejectSeries:bc,retry:Ci,retryable:Mc,seq:Co,series:Tc,setImmediate:Kt,some:yo,someLimit:wo,someSeries:vo,sortBy:jc,timeout:Ic,times:Nc,timesLimit:Ii,timesSeries:Lc,transform:$c,tryEach:kc,unmemoize:Pc,until:Rc,waterfall:Bc,whilst:Oi,all:uo,allLimit:co,allSeries:lo,any:yo,anyLimit:wo,anySeries:vo,find:io,findLimit:so,findSeries:oo,flatMap:ro,flatMapLimit:En,flatMapSeries:no,forEach:ao,forEachSeries:Fi,forEachLimit:_i,forEachOf:ut,forEachOfSeries:bt,forEachOfLimit:vn,inject:Lr,foldl:Lr,foldr:go,select:fo,selectLimit:ho,selectSeries:po,wrapSync:vi,during:Oi,doDuring:Ei};});var zc=B((L2,Uc)=>{var{hasOwnProperty:jo}=Object.prototype,Io=typeof process<"u"&&process.platform==="win32"?`\r +`+t);let[,n]=r;return n.replace(/\s/g,"").split(v1).map(s=>s.replace(w1,"").trim())}function nc(e,t){var r={};return Object.keys(e).forEach(n=>{var s=e[n],o,u=Fn(s),c=!u&&s.length===1||u&&s.length===0;if(Array.isArray(s))o=[...s],s=o.pop(),r[n]=o.concat(o.length>0?d:s);else if(c)r[n]=s;else {if(o=_1(s),s.length===0&&!u&&o.length===0)throw new Error("autoInject task functions require explicit parameters.");u||o.pop(),r[n]=o.concat(d);}function d(g,m){var D=o.map(y=>g[y]);D.push(m),he(s)(...D);}}),Fo(r,t)}function Vu(e,t){e.length=1,e.head=e.tail=t;}function So(e,t,r){if(t==null)t=1;else if(t===0)throw new RangeError("Concurrency must not be zero");var n=he(e),s=0,o=[];let u={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function c(x,v){u[x].push(v);}function d(x,v){let M=(...P)=>{g(x,M),v(...P);};u[x].push(M);}function g(x,v){if(!x)return Object.keys(u).forEach(M=>u[M]=[]);if(!v)return u[x]=[];u[x]=u[x].filter(M=>M!==v);}function m(x,...v){u[x].forEach(M=>M(...v));}var D=!1;function y(x,v,M,P){if(P!=null&&typeof P!="function")throw new Error("task callback must be a function");$.started=!0;var J,X;function te(ee,...Z){if(ee)return M?X(ee):J();if(Z.length<=1)return J(Z[0]);J(Z);}var L=$._createTaskItem(x,M?te:P||te);if(v?$._tasks.unshift(L):$._tasks.push(L),D||(D=!0,Kt(()=>{D=!1,$.process();})),M||!P)return new Promise((ee,Z)=>{J=ee,X=Z;})}function F(x){return function(v,...M){s-=1;for(var P=0,J=x.length;P0&&o.splice(te,1),X.callback(v,...M),v!=null&&m("error",v,X.data);}s<=$.concurrency-$.buffer&&m("unsaturated"),$.idle()&&m("drain"),$.process();}}function C(x){return x.length===0&&$.idle()?(Kt(()=>m("drain")),!0):!1}let _=x=>v=>{if(!v)return new Promise((M,P)=>{d(x,(J,X)=>{if(J)return P(J);M(X);});});g(x),c(x,v);};var j=!1,$={_tasks:new to,_createTaskItem(x,v){return {data:x,callback:v}},*[Symbol.iterator](){yield*$._tasks[Symbol.iterator]();},concurrency:t,payload:r,buffer:t/4,started:!1,paused:!1,push(x,v){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!1,!1,v)):y(x,!1,!1,v)},pushAsync(x,v){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!1,!0,v)):y(x,!1,!0,v)},kill(){g(),$._tasks.empty();},unshift(x,v){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!0,!1,v)):y(x,!0,!1,v)},unshiftAsync(x,v){return Array.isArray(x)?C(x)?void 0:x.map(M=>y(M,!0,!0,v)):y(x,!0,!0,v)},remove(x){$._tasks.remove(x);},process(){if(!j){for(j=!0;!$.paused&&s<$.concurrency&&$._tasks.length;){var x=[],v=[],M=$._tasks.length;$.payload&&(M=Math.min(M,$.payload));for(var P=0;P{s(t,o,(d,g)=>{t=g,c(d);});},o=>n(o,t))}function Co(...e){var t=e.map(he);return function(...r){var n=this,s=r[r.length-1];return typeof s=="function"?r.pop():s=$r(),Lr(t,r,(o,u,c)=>{u.apply(n,o.concat((d,...g)=>{c(d,g);}));},(o,u)=>s(o,...u)),s[kr]}}function oc(...e){return Co(...e.reverse())}function S1(e,t,r,n){return Eo(wt(t),e,r,n)}function C1(e,t,r,n){var s=he(r);return Sn(e,t,(o,u)=>{s(o,(c,...d)=>c?u(c):u(c,d));},(o,u)=>{for(var c=[],d=0;d{var u=!1,c;let d=he(s);r(n,(g,m,D)=>{d(g,(y,F)=>{if(y||y===!1)return D(y);if(e(F)&&!c)return u=!0,c=t(!0,g),D(null,bi);D();});},g=>{if(g)return o(g);o(null,u?c:t(!1));});}}function x1(e,t,r){return Yt(n=>n,(n,s)=>s)(ut,e,t,r)}function A1(e,t,r,n){return Yt(s=>s,(s,o)=>o)(wt(t),e,r,n)}function M1(e,t,r){return Yt(n=>n,(n,s)=>s)(wt(1),e,t,r)}function uc(e){return (t,...r)=>he(t)(...r,(n,...s)=>{typeof console=="object"&&(n?console.error&&console.error(n):console[e]&&s.forEach(o=>console[e](o)));})}function T1(e,t,r){r=Xt(r);var n=he(e),s=he(t),o;function u(d,...g){if(d)return r(d);d!==!1&&(o=g,s(...g,c));}function c(d,g){if(d)return r(d);if(d!==!1){if(!g)return r(null,...o);n(u);}}return c(null,!0)}function lc(e,t,r){let n=he(t);return wi(e,(...s)=>{let o=s.pop();n(...s,(u,c)=>o(u,!c));},r)}function fc(e){return (t,r,n)=>e(t,n)}function j1(e,t,r){return ut(e,fc(he(t)),r)}function I1(e,t,r,n){return wt(t)(e,fc(he(r)),n)}function N1(e,t,r){return Ei(e,1,t,r)}function Oo(e){return Fn(e)?e:function(...t){var r=t.pop(),n=!0;t.push((...s)=>{n?Kt(()=>r(...s)):r(...s);}),e.apply(this,t),n=!1;}}function L1(e,t,r){return Yt(n=>!n,n=>!n)(ut,e,t,r)}function $1(e,t,r,n){return Yt(s=>!s,s=>!s)(wt(t),e,r,n)}function k1(e,t,r){return Yt(n=>!n,n=>!n)(bt,e,t,r)}function P1(e,t,r,n){var s=new Array(t.length);e(t,(o,u,c)=>{r(o,(d,g)=>{s[u]=!!g,c(d);});},o=>{if(o)return n(o);for(var u=[],c=0;c{r(o,(d,g)=>{if(d)return c(d);g&&s.push({index:u,value:o}),c(d);});},o=>{if(o)return n(o);n(null,s.sort((u,c)=>u.index-c.index).map(u=>u.value));});}function Ai(e,t,r,n){var s=Oi(t)?P1:R1;return s(e,t,he(r),n)}function B1(e,t,r){return Ai(ut,e,t,r)}function q1(e,t,r,n){return Ai(wt(t),e,r,n)}function Y1(e,t,r){return Ai(bt,e,t,r)}function W1(e,t){var r=Xt(t),n=he(Oo(e));function s(o){if(o)return r(o);o!==!1&&n(s);}return s()}function U1(e,t,r,n){var s=he(r);return Sn(e,t,(o,u)=>{s(o,(c,d)=>c?u(c):u(c,{key:d,val:o}));},(o,u)=>{for(var c={},{hasOwnProperty:d}=Object.prototype,g=0;g{o(u,c,(g,m)=>{if(g)return d(g);s[c]=m,d(g);});},u=>n(u,s))}function gc(e,t,r){return Ti(e,1/0,t,r)}function Dc(e,t,r){return Ti(e,1,t,r)}function yc(e,t=r=>r){var r=Object.create(null),n=Object.create(null),s=he(e),o=_n((u,c)=>{var d=t(...u);d in r?Kt(()=>c(null,...r[d])):d in n?n[d].push(c):(n[d]=[c],s(...u,(g,...m)=>{g||(r[d]=m);var D=n[d];delete n[d];for(var y=0,F=D.length;y{r(n[0],s);},t,1)}function H1(e){return (e<<1)+1}function Gu(e){return (e+1>>1)-1}function eo(e,t){return e.priority!==t.priority?e.priority({data:u,priority:c,callback:d});function o(u,c){return Array.isArray(u)?u.map(d=>({data:d,priority:c})):{data:u,priority:c}}return r.push=function(u,c=0,d){return n(o(u,c),d)},r.pushAsync=function(u,c=0,d){return s(o(u,c),d)},delete r.unshift,delete r.unshiftAsync,r}function V1(e,t){if(t=Qt(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r{let c={};if(o&&(c.error=o),u.length>0){var d=u;u.length<=1&&([d]=u),c.value=d;}s(null,c);}),t.apply(this,n)})}function Sc(e){var t;return Array.isArray(e)?t=e.map(Fi):(t={},Object.keys(e).forEach(r=>{t[r]=Fi.call(this,e[r]);})),t}function Ao(e,t,r,n){let s=he(r);return Ai(e,t,(o,u)=>{s(o,(c,d)=>{u(c,!d);});},n)}function G1(e,t,r){return Ao(ut,e,t,r)}function J1(e,t,r,n){return Ao(wt(t),e,r,n)}function Z1(e,t,r){return Ao(bt,e,t,r)}function xc(e){return function(){return e}}function Si(e,t,r){var n={times:Do,intervalFunc:xc(Ac)};if(arguments.length<3&&typeof e=="function"?(r=t||$r(),t=e):(K1(n,e),r=r||$r()),typeof t!="function")throw new Error("Invalid arguments for async.retry");var s=he(t),o=1;function u(){s((c,...d)=>{c!==!1&&(c&&o++{(s.lengthn)(ut,e,t,r)}function X1(e,t,r,n){return Yt(Boolean,s=>s)(wt(t),e,r,n)}function ev(e,t,r){return Yt(Boolean,n=>n)(bt,e,t,r)}function tv(e,t,r){var n=he(t);return xi(e,(o,u)=>{n(o,(c,d)=>{if(c)return u(c);u(c,{value:o,criteria:d});});},(o,u)=>{if(o)return r(o);r(null,u.sort(s).map(c=>c.value));});function s(o,u){var c=o.criteria,d=u.criteria;return cd?1:0}}function Ic(e,t,r){var n=he(e);return _n((s,o)=>{var u=!1,c;function d(){var g=e.name||"anonymous",m=new Error('Callback function "'+g+'" timed out.');m.code="ETIMEDOUT",r&&(m.info=r),u=!0,o(m);}s.push((...g)=>{u||(o(...g),clearTimeout(c));}),c=setTimeout(d,t),n(...s);})}function rv(e){for(var t=Array(e);e--;)t[e]=e;return t}function ji(e,t,r,n){var s=he(r);return Sn(rv(e),t,s,n)}function Nc(e,t,r){return ji(e,1/0,t,r)}function Lc(e,t,r){return ji(e,1,t,r)}function $c(e,t,r,n){arguments.length<=3&&typeof t=="function"&&(n=r,r=t,t=Array.isArray(e)?[]:{}),n=Qt(n||$r());var s=he(r);return ut(e,(o,u,c)=>{s(t,o,u,c);},o=>n(o,t)),n[kr]}function nv(e,t){var r=null,n;return _i(e,(s,o)=>{he(s)((u,...c)=>{if(u===!1)return o(u);c.length<2?[n]=c:n=c,r=u,o(u?null:{});});},()=>t(r,n))}function Pc(e){return (...t)=>(e.unmemoized||e)(...t)}function iv(e,t,r){r=Xt(r);var n=he(t),s=he(e),o=[];function u(d,...g){if(d)return r(d);o=g,d!==!1&&s(c);}function c(d,g){if(d)return r(d);if(d!==!1){if(!g)return r(null,...o);n(u);}}return s(c)}function Rc(e,t,r){let n=he(e);return Ci(s=>n((o,u)=>s(o,!u)),t,r)}function sv(e,t){if(t=Qt(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(o){var u=he(e[r++]);u(...o,Xt(s));}function s(o,...u){if(o!==!1){if(o||r===e.length)return t(o,...u);n(u);}}n([]);}var t1,Zu,Ku,vn,Kt,i1,bi,wt,wn,ut,xi,tc,bt,_o,rc,kr,D1,y1,v1,w1,to,Lr,Sn,En,ro,no,io,so,oo,cc,wi,ao,Ei,_i,uo,co,lo,fo,ho,po,dc,Mi,mc,Ti,yi,vc,bo,mo,Fc,Cc,Oc,bc,Do,Ac,yo,vo,wo,jc,kc,Ci,Bc,ov,To=Xy(()=>{t1=typeof queueMicrotask=="function"&&queueMicrotask,Zu=typeof setImmediate=="function"&&setImmediate,Ku=typeof process=="object"&&typeof process.nextTick=="function";t1?vn=queueMicrotask:Zu?vn=setImmediate:Ku?vn=process.nextTick:vn=Qu;Kt=Xu(vn);i1={},bi=i1;wt=e=>(t,r,n)=>{if(n=Qt(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if(r1(t))return Hu(t,e,r,n);if(n1(t))return Hu(t[Symbol.asyncIterator](),e,r,n);var s=c1(t),o=!1,u=!1,c=0,d=!1;function g(D,y){if(!u)if(c-=1,D)o=!0,n(D);else if(D===!1)o=!0,u=!0;else {if(y===bi||o&&c<=0)return o=!0,n(null);d||m();}}function m(){for(d=!0;c)/,v1=/,/,w1=/(=.+)?(\s*)$/;to=class{constructor(){this.head=this.tail=null,this.length=0;}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,r){r.prev=t,r.next=t.next,t.next?t.next.prev=r:this.tail=r,t.next=r,this.length+=1;}insertBefore(t,r){r.prev=t.prev,r.next=t,t.prev?t.prev.next=r:this.head=r,t.prev=r,this.length+=1;}unshift(t){this.head?this.insertBefore(this.head,t):Vu(this,t);}push(t){this.tail?this.insertAfter(this.tail,t):Vu(this,t);}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return [...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next;}remove(t){for(var r=this.head;r;){var{next:n}=r;t(r)&&this.removeLink(r),r=n;}return this}};Lr=fe(F1,4);Sn=fe(S1,4);En=fe(C1,4);ro=fe(O1,3);no=fe(b1,3);io=fe(x1,3);so=fe(A1,4);oo=fe(M1,3);cc=uc("dir");wi=fe(T1,3);ao=fe(j1,3);Ei=fe(I1,4);_i=fe(N1,3);uo=fe(L1,3);co=fe($1,4);lo=fe(k1,3);fo=fe(B1,3);ho=fe(q1,4);po=fe(Y1,3);dc=fe(W1,2);Mi=fe(U1,4);mc=uc("log");Ti=fe(z1,4);Ku?yi=process.nextTick:Zu?yi=setImmediate:yi=Qu;vc=Xu(yi),bo=fe((e,t,r)=>{var n=Oi(t)?[]:{};e(t,(s,o,u)=>{he(s)((c,...d)=>{d.length<2&&([d]=d),n[o]=d,u(c);});},s=>r(s,n));},3);mo=class{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER;}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(t){let r;for(;t>0&&eo(this.heap[t],this.heap[r=Gu(t)]);){let n=this.heap[t];this.heap[t]=this.heap[r],this.heap[r]=n,t=r;}}percDown(t){let r;for(;(r=H1(t))=0;n--)this.percDown(n);return this}};Fc=fe(V1,2);Cc=fe(G1,3);Oc=fe(J1,4);bc=fe(Z1,3);Do=5,Ac=0;yo=fe(Q1,3);vo=fe(X1,4);wo=fe(ev,3);jc=fe(tv,3);kc=fe(nv);Ci=fe(iv,3);Bc=fe(sv),ov={apply:Ju,applyEach:tc,applyEachSeries:rc,asyncify:vi,auto:Fo,autoInject:nc,cargo:ic,cargoQueue:sc,compose:oc,concat:ro,concatLimit:En,concatSeries:no,constant:ac,detect:io,detectLimit:so,detectSeries:oo,dir:cc,doUntil:lc,doWhilst:wi,each:ao,eachLimit:Ei,eachOf:ut,eachOfLimit:wn,eachOfSeries:bt,eachSeries:_i,ensureAsync:Oo,every:uo,everyLimit:co,everySeries:lo,filter:fo,filterLimit:ho,filterSeries:po,forever:dc,groupBy:hc,groupByLimit:Mi,groupBySeries:pc,log:mc,map:xi,mapLimit:Sn,mapSeries:_o,mapValues:gc,mapValuesLimit:Ti,mapValuesSeries:Dc,memoize:yc,nextTick:vc,parallel:wc,parallelLimit:Ec,priorityQueue:_c,queue:xo,race:Fc,reduce:Lr,reduceRight:go,reflect:Fi,reflectAll:Sc,reject:Cc,rejectLimit:Oc,rejectSeries:bc,retry:Si,retryable:Mc,seq:Co,series:Tc,setImmediate:Kt,some:yo,someLimit:vo,someSeries:wo,sortBy:jc,timeout:Ic,times:Nc,timesLimit:ji,timesSeries:Lc,transform:$c,tryEach:kc,unmemoize:Pc,until:Rc,waterfall:Bc,whilst:Ci,all:uo,allLimit:co,allSeries:lo,any:yo,anyLimit:vo,anySeries:wo,find:io,findLimit:so,findSeries:oo,flatMap:ro,flatMapLimit:En,flatMapSeries:no,forEach:ao,forEachSeries:_i,forEachLimit:Ei,forEachOf:ut,forEachOfSeries:bt,forEachOfLimit:wn,inject:Lr,foldl:Lr,foldr:go,select:fo,selectLimit:ho,selectSeries:po,wrapSync:vi,during:Ci,doDuring:wi};});var zc=B((N2,Uc)=>{var{hasOwnProperty:jo}=Object.prototype,Io=typeof process<"u"&&process.platform==="win32"?`\r `:` `,No=(e,t)=>{let r=[],n="";typeof t=="string"?t={section:t,whitespace:!1}:(t=t||Object.create(null),t.whitespace=t.whitespace===!0);let s=t.whitespace?" = ":"=";for(let o of Object.keys(e)){let u=e[o];if(u&&Array.isArray(u))for(let c of u)n+=Pr(o+"[]")+s+Pr(c)+` -`;else u&&typeof u=="object"?r.push(o):n+=Pr(o)+s+Pr(u)+Io;}t.section&&n.length&&(n="["+Pr(t.section)+"]"+Io+n);for(let o of r){let u=Yc(o).join("\\."),c=(t.section?t.section+".":"")+u,{whitespace:d}=t,g=No(e[o],{section:c,whitespace:d});n.length&&g.length&&(n+=Io),n+=g;}return n},Yc=e=>e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(t=>t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")),qc=e=>{let t=Object.create(null),r=t,n=null,s=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,o=e.split(/[\r\n]+/g);for(let c of o){if(!c||c.match(/^\s*[;#]/))continue;let d=c.match(s);if(!d)continue;if(d[1]!==void 0){if(n=Ni(d[1]),n==="__proto__"){r=Object.create(null);continue}r=t[n]=t[n]||Object.create(null);continue}let g=Ni(d[2]),m=g.length>2&&g.slice(-2)==="[]",D=m?g.slice(0,-2):g;if(D==="__proto__")continue;let y=d[3]?Ni(d[4]):!0,F=y==="true"||y==="false"||y==="null"?JSON.parse(y):y;m&&(jo.call(r,D)?Array.isArray(r[D])||(r[D]=[r[D]]):r[D]=[]),Array.isArray(r[D])?r[D].push(F):r[D]=F;}let u=[];for(let c of Object.keys(t)){if(!jo.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;let d=Yc(c),g=t,m=d.pop(),D=m.replace(/\\\./g,".");for(let y of d)y!=="__proto__"&&((!jo.call(g,y)||typeof g[y]!="object")&&(g[y]=Object.create(null)),g=g[y]);g===t&&D===m||(g[D]=t[c],u.push(c));}for(let c of u)delete t[c];return t},Wc=e=>e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'",Pr=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Wc(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#"),Ni=(e,t)=>{if(e=(e||"").trim(),Wc(e)){e.charAt(0)==="'"&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e);}catch{}}else {let r=!1,n="";for(let s=0,o=e.length;s{var aw=zc(),Hc=Vc;Hc.json={stringify:function(e,t,r){return JSON.stringify(e,t||null,r||2)},parse:JSON.parse};Hc.ini=aw;});var hr=B(Gc=>{var er=Br(),Rr=Gc.Memory=function(e){e=e||{},this.type="memory",this.store={},this.mtimes={},this.readOnly=!1,this.loadFrom=e.loadFrom||null,this.logicalSeparator=e.logicalSeparator||":",this.parseValues=e.parseValues||!1,this.loadFrom&&(this.store=er.loadFilesSync(this.loadFrom));};Rr.prototype.get=function(e){for(var t=this.store,r=er.path(e,this.logicalSeparator);r.length>0;){if(e=r.shift(),t&&typeof t!="string"&&Object.hasOwnProperty.call(t,e)){t=t[e];continue}return}return t};Rr.prototype.set=function(e,t){if(this.readOnly)return !1;var r=this.store,n=er.path(e,this.logicalSeparator);if(n.length===0)return !t||typeof t!="object"?!1:(this.reset(),this.store=t,!0);for(this.mtimes[e]=Date.now();n.length>1;)e=n.shift(),(!r[e]||typeof r[e]!="object"||!Object.hasOwnProperty.call(r,e))&&(r[e]={}),r=r[e];return e=n.shift(),this.parseValues&&(t=er.parseValues.call(er,t)),r[e]=t,!0};Rr.prototype.clear=function(e){if(this.readOnly)return !1;var t=this.store,r=t,n=er.path(e,this.logicalSeparator);delete this.mtimes[e];for(var s=0;s1;)e=s.shift(),n[e]||(n[e]={}),n=n[e];return e=s.shift(),typeof n[e]!="object"||Array.isArray(n[e])?(n[e]=t,!0):Object.keys(t).every(function(u){return r.merge(er.keyed(r.logicalSeparator,o,u),t[u])})};Rr.prototype.reset=function(){return this.readOnly?!1:(this.mtimes={},this.store={},!0)};Rr.prototype.loadSync=function(){return this.store||{}};});var Br=B(Kc=>{var Jc=U("fs"),uw=(To(),Yu(Mo)),Zc=Li(),cw=hr().Memory,Et=Kc;Et.path=function(e,t){return t=t||":",e==null?[]:e.split(t)};Et.key=function(){return Array.prototype.slice.call(arguments).join(":")};Et.keyed=function(){return Array.prototype.slice.call(arguments,1).join(arguments[0])};Et.loadFiles=function(e,t){if(!e)return t(null,{});var r=Array.isArray(e)?{files:e}:e;r.format=r.format||Zc.json;function n(s,o){Jc.readFile(s,function(u,c){return u?o(u):o(null,r.format.parse(c.toString()))});}uw.map(r.files,n,function(s,o){return s?t(s):t(null,Et.merge(o))});};Et.loadFilesSync=function(e){if(e){var t=Array.isArray(e)?{files:e}:e;return t.format=t.format||Zc.json,Et.merge(t.files.map(function(r){return t.format.parse(Jc.readFileSync(r,"utf8"))}))}};Et.merge=function(e){var t=new cw;return e.forEach(function(r){Object.keys(r).forEach(function(n){t.merge(n,r[n]);});}),t.store};Et.capitalize=function(e){return e&&e[0].toUpperCase()+e.slice(1)};Et.parseValues=function(e){var t=e;try{t=JSON.parse(e);}catch{e==="undefined"&&(t=void 0);}return t};Et.transform=function(e,t){var r=Object.keys(e).map(function(n){var s={key:n,value:e[n]},o=t.call(null,s);if(o){if(o.key)return o}else return null;var u=new Error("Transform function passed to store returned an invalid format: "+JSON.stringify(o));throw u.name="RuntimeError",u});return r.filter(function(n){return n!==null}).reduce(function(n,s){return n[s.key]=s.value,n},{})};});var Xc=B(Qc=>{var qr=(To(),Yu(Mo)),tr=Br(),Re=Qc.Provider=function(e){e=e||{},this.stores={},this.sources=[],this.init(e);};["argv","env"].forEach(function(e){Re.prototype[e]=function(){var t=[e].concat(Array.prototype.slice.call(arguments));return this.add.apply(this,t)};});Re.prototype.file=function(e,t){return arguments.length==1?(t=typeof e=="string"?{file:e}:e,e="file"):t=typeof t=="string"?{file:t}:t,t.type="file",this.add(e,t)};["defaults","overrides"].forEach(function(e){Re.prototype[e]=function(t){return t=t||{},t.type||(t.type="literal"),this.add(e,t)};});Re.prototype.use=function(e,t){t=t||{};function r(o){return Object.keys(t).every(function(u){return t[u]===o[u]})}var n=this.stores[e],s=n&&!r(n);return (!n||s)&&(s&&this.remove(e),this.add(e,t)),this};Re.prototype.add=function(e,t,r){t=t||{};var n=t.type||e;if(!$i()[tr.capitalize(n)])throw new Error("Cannot add store with unknown type: "+n);return this.stores[e]=this.create(n,t,r),this.stores[e].loadSync&&this.stores[e].loadSync(),this};Re.prototype.remove=function(e){return delete this.stores[e],this};Re.prototype.create=function(e,t,r){return new($i())[tr.capitalize(e.toLowerCase())](t,r)};Re.prototype.init=function(e){var t=this;e.type?this.add(e.type,e):e.store?this.add(e.store.name||e.store.type,e.store):e.stores&&Object.keys(e.stores).forEach(function(r){var n=e.stores[r];t.add(n.name||r||n.type,n);}),e.source?this.sources.push(this.create(e.source.type||e.source.name,e.source)):e.sources&&Object.keys(e.sources).forEach(function(r){var n=e.sources[r];t.sources.push(t.create(n.type||n.name||r,n));});};Re.prototype.get=function(e,t){if(typeof e=="function"&&(t=e,e=null),!t)return this._execute("get",1,e,t);var r=0,n=Object.keys(this.stores),s=this,o,u=[];qr.whilst(function(c){c(null,typeof o>"u"&&r=2)return d.get(e,function(g,m){if(g)return c(g);o=m,o&&typeof o=="object"&&!Array.isArray(o)&&(u.push(o),o=void 0),c();});o=d.get(e),o&&typeof o=="object"&&!Array.isArray(o)&&(u.push(o),o=void 0),c();},function(c){return !c&&u.length&&(o=tr.merge(u.reverse())),c?t(c):t(null,o)});};Re.prototype.any=function(e,t){if(Array.isArray(e)||(e=Array.prototype.slice.call(arguments),e.length>0&&typeof e[e.length-1]=="function"?t=e.pop():t=null),!t){for(var r,n=0;n"u"&&t.push(r);},this),t.length)throw new Error("Missing required keys: "+t.join(", "));return !0};Re.prototype.reset=function(e){return this._execute("reset",0,e)};Re.prototype.clear=function(e,t){return this._execute("clear",1,e,t)};Re.prototype.merge=function(){var e=this,t=Array.prototype.slice.call(arguments),r=typeof t[t.length-1]=="function"&&t.pop(),n=t.pop(),s=t.pop();function o(u,c){return e._execute("merge",2,u,n[u],c)}return s?this._execute("merge",2,s,n,r):Array.isArray(n)||typeof n!="object"?lw(new Error("Cannot merge non-Object into top-level."),r):qr.forEach(Object.keys(n),o,r||function(){})};Re.prototype.load=function(e){var t=this;function r(){var d=Object.keys(t.stores);return d.reverse(),d.map(function(g){return t.stores[g]})}function n(d){if(!d.loadSync)throw new Error("nconf store "+d.type+" has no loadSync() method");return d.loadSync()}function s(d,g){return !d.load&&!d.loadSync?g(new Error("nconf store "+d.type+" has no load() method")):d.loadSync?g(null,d.loadSync()):d.load(g)}function o(d,g){if(!g)return tr.merge(d.map(n));qr.map(d,s,function(m,D){return m?g(m):g(null,tr.merge(D))});}function u(d){d&&typeof d=="object"&&t.use("sources",{type:"literal",store:d});}function c(){var d=t.sources.splice(0);if(d.reverse(),!e)return u(o(d)),o(r());o(d,function(g,m){return g?e(g):(u(m),o(r(),e))});}return t.sources.length?c():o(r(),e)};Re.prototype.save=function(e,t){!t&&typeof e=="function"&&(t=e,e=null);var r=this,n=Object.keys(this.stores);function s(u,c){var d=r.stores[c];if(d.saveSync){var g=d.saveSync();typeof g=="object"&&g!==null&&u.push(g);}return u}function o(u,c,d){var g=r.stores[c];if(g.save)return g.save(e,function(m,D){if(m)return d(m);typeof D=="object"&&D!==null&&u.push(D),d(null,u);});g.saveSync&&u.push(g.saveSync()),d(null,u);}if(!t)return tr.merge(n.reduce(s,[]));qr.reduce(n,[],o,function(u,c){return u?t(u):t(null,tr.merge(c))});};Re.prototype._execute=function(e,t){var r=Array.prototype.slice.call(arguments,2),n=typeof r[r.length-1]=="function"&&r.pop(),s=["set","clear","merge","reset"].indexOf(e)!==-1,o=this,u,c=[],d=Object.keys(this.stores);function g(m,D){var y=o.stores[m];return s&&y.readOnly?D():y[e].length>t?y[e].apply(y,r.concat(D)):D(null,y[e].apply(y,r))}return n?qr.forEach(d,g,function(m){return m?n(m):n()}):(d.forEach(function(m){if(typeof u>"u"){var D=o.stores[m];if(s&&D.readOnly)return;u=D[e].apply(D,r),u&&e==="get"&&typeof u=="object"&&!Array.isArray(u)&&(c.push(u),u=void 0);}}),c.length&&(u=tr.merge(c.reverse())),u)};function lw(e,t){if(t)return t(e);throw e}});var el=B((B2,fw)=>{fw.exports={name:"nconf",description:"Hierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging.",version:"0.12.1",author:"Charlie Robbins ",contributors:["Matt Hamann ","Maciej Ma\u0142ecki ","Jarrett Cruger ","Adrien Becchis"],repository:{type:"git",url:"http://github.com/flatiron/nconf.git"},keywords:["configuration","key value store","plugabble"],dependencies:{async:"^3.0.0",ini:"^2.0.0","secure-keys":"^1.0.0",yargs:"^16.1.1"},devDependencies:{"@release-it/conventional-changelog":"^7.0.2",coveralls:"^3.1.0",eslint:"^7.0.0","nconf-yaml":"^1.0.2",nyc:"^15.1.0","release-it":"^16.2.1",vows:"^0.8.3"},main:"./lib/nconf",scripts:{test:"vows test/*-test.js test/**/*-test.js --spec",cover:"nyc --reporter=lcov npm test",coveralls:"cat coverage/lcov.info | coveralls",lint:"eslint .",release:"release-it"},engines:{node:">= 0.4.0"},license:"MIT"};});var rl=B((q2,tl)=>{var Lo=U("fs"),dw=U("util"),hw=U("path"),_t,$o=class{constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:!0,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[];}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=t.shift(),n=function(){};return typeof t[t.length-1]=="function"&&(n=t.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),_t.format.apply(_t.format,[this.cache[this.locale][r]||r].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),r=t.shift(),n=t.shift(),s=t.shift(),o=function(){};typeof t[t.length-1]=="function"&&(o=t.pop()),this.cache[this.locale]||this._readLocaleFile();let u=s===1?r:n;this.cache[this.locale][r]&&(u=this.cache[this.locale][r][s===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let c=[u];return ~u.indexOf("%d")&&c.push(s),_t.format.apply(_t.format,c.concat(t))}setLocale(t){this.locale=t;}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.cache[this.locale][r]=t[r]);}_taggedLiteral(t,...r){let n="";return t.forEach(function(s,o){let u=r[o+1];n+=s,typeof u<"u"&&(n+="%s");}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue();}_processWriteQueue(){let t=this,r=this.writeQueue[0],n=r.directory,s=r.locale,o=r.cb,u=this._resolveLocaleFile(n,s),c=JSON.stringify(this.cache[s],null,2);_t.fs.writeFile(u,c,"utf-8",function(d){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),o(d);});}_readLocaleFile(){let t={},r=this._resolveLocaleFile(this.directory,this.locale);try{_t.fs.readFileSync&&(t=JSON.parse(_t.fs.readFileSync(r,"utf-8")));}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")t={};else throw n}this.cache[this.locale]=t;}_resolveLocaleFile(t,r){let n=_t.resolve(t,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let s=_t.resolve(t,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s);}return n}_fileExistsSync(t){return _t.exists(t)}};function pw(e,t){_t=t;let r=new $o(e);return {__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var mw={fs:{readFileSync:Lo.readFileSync,writeFile:Lo.writeFile},format:dw.format,resolve:hw.resolve,exists:e=>{try{return Lo.statSync(e).isFile()}catch{return !1}}},gw=e=>pw(e,mw);tl.exports=gw;});var Ro=B((Y2,cl)=>{var Dw=U("util"),yw=U("fs"),nl=U("path");function Cn(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let r="",n=!1,s=e.match(/^-+/);for(let o=s?s[0].length:0;o0?n+=`${t}${r.charAt(s)}`:n+=u;}return n}function al(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function ww(e){if(Array.isArray(e))return e.map(u=>typeof u!="string"?u+"":u);e=e.trim();let t=0,r=null,n=null,s=null,o=[];for(let u=0;u{typeof v=="number"&&(_.nargs[h]=v,_.keys.push(h));}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([h,v])=>{typeof v=="function"&&(_.coercions[h]=v,_.keys.push(h));}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(h){_.configs[h]=!0;}):typeof n.config=="object"&&Object.entries(n.config).forEach(([h,v])=>{(typeof v=="boolean"||typeof v=="function")&&(_.configs[h]=v);})),Ye(n.key,o,n.default,_.arrays),Object.keys(c).forEach(function(h){(_.aliases[h]||[]).forEach(function(v){c[v]=c[h];});});let x=null;S();let w=[],M=Object.assign(Object.create(null),{_:[]}),P={};for(let h=0;h=3&&(R(Q[1],_.arrays)?h=te(h,Q[1],s,Q[2]):R(Q[1],_.nargs)!==!1?h=X(h,Q[1],s,Q[2]):L(Q[1],Q[2]));else if(v.match($)&&u["boolean-negation"])Q=v.match($),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(b=Q[1],L(b,R(b,_.arrays)?[!1]:!1));else if(v.match(/^--.+/)||!u["short-option-groups"]&&v.match(/^-[^-]+/))Q=v.match(/^--?(.+)/),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(b=Q[1],R(b,_.arrays)?h=te(h,b,s):R(b,_.nargs)!==!1?h=X(h,b,s):(re=s[h+1],re!==void 0&&(!re.match(/^-/)||re.match(j))&&!R(b,_.bools)&&!R(b,_.counts)||/^(true|false)$/.test(re)?(L(b,re),h++):L(b,le(b))));else if(v.match(/^-.\..+=/))Q=v.match(/^-([^=]+)=([\s\S]*)$/),Q!==null&&Array.isArray(Q)&&Q.length>=3&&L(Q[1],Q[2]);else if(v.match(/^-.\..+/)&&!v.match(j))re=s[h+1],Q=v.match(/^-(.\..+)/),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(b=Q[1],re!==void 0&&!re.match(/^-/)&&!R(b,_.bools)&&!R(b,_.counts)?(L(b,re),h++):L(b,le(b)));else if(v.match(/^-[^-]+/)&&!v.match(j)){z=v.slice(1,-1).split(""),A=!1;for(let Fe=0;Feh!=="--"&&h.includes("-")).forEach(h=>{delete M[h];}),u["strip-aliased"]&&[].concat(...Object.keys(o).map(h=>o[h])).forEach(h=>{u["camel-case-expansion"]&&h.includes("-")&&delete M[h.split(".").map(v=>Cn(v)).join(".")],delete M[h];});function J(h){let v=q("_",h);(typeof v=="string"||typeof v=="number")&&M._.push(v);}function X(h,v,T,A){let b,z=R(v,_.nargs);if(z=typeof z!="number"||isNaN(z)?1:z,z===0)return E(A)||(x=Error(C("Argument unexpected for: %s",v))),L(v,le(v)),h;let Q=E(A)?0:1;if(u["nargs-eats-options"])T.length-(h+1)+Q0&&(L(v,A),re--),b=h+1;b0||Q&&typeof Q=="number"&&b.length>=Q||(z=T[re],/^-/.test(z)&&!j.test(z)&&!ie(z)));re++)h=re,b.push(Z(v,z));}return typeof Q=="number"&&(Q&&b.length1&&u["dot-notation"]&&(_.aliases[A[0]]||[]).forEach(function(b){let z=b.split("."),Q=[].concat(A);Q.shift(),z=z.concat(Q),(_.aliases[h]||[]).includes(z.join("."))||de(M,z,T);}),R(h,_.normalize)&&!R(h,_.arrays)&&[h].concat(_.aliases[h]||[]).forEach(function(z){Object.defineProperty(P,z,{enumerable:!0,get(){return v},set(Q){v=typeof Q=="string"?Wt.normalize(Q):Q;}});});}function ee(h,v){_.aliases[h]&&_.aliases[h].length||(_.aliases[h]=[v],y[v]=!0),_.aliases[v]&&_.aliases[v].length||ee(v,h);}function Z(h,v){typeof v=="string"&&(v[0]==="'"||v[0]==='"')&&v[v.length-1]===v[0]&&(v=v.substring(1,v.length-1)),(R(h,_.bools)||R(h,_.counts))&&typeof v=="string"&&(v=v==="true");let T=Array.isArray(v)?v.map(function(A){return q(h,A)}):q(h,v);return R(h,_.counts)&&(E(T)||typeof T=="boolean")&&(T=ko()),R(h,_.normalize)&&R(h,_.arrays)&&(Array.isArray(v)?T=v.map(A=>Wt.normalize(A)):T=Wt.normalize(v)),T}function q(h,v){return !u["parse-positional-numbers"]&&h==="_"||!R(h,_.strings)&&!R(h,_.bools)&&!Array.isArray(v)&&(al(v)&&u["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${v}`)))||!E(v)&&R(h,_.numbers))&&(v=Number(v)),v}function Y(h){let v=Object.create(null);K(v,_.aliases,c),Object.keys(_.configs).forEach(function(T){let A=h[T]||v[T];if(A)try{let b=null,z=Wt.resolve(Wt.cwd(),A),Q=_.configs[T];if(typeof Q=="function"){try{b=Q(z);}catch(re){b=re;}if(b instanceof Error){x=b;return}}else b=Wt.require(z);V(b);}catch(b){b.name==="PermissionDenied"?x=b:h[T]&&(x=Error(C("Invalid JSON config file: %s",A)));}});}function V(h,v){Object.keys(h).forEach(function(T){let A=h[T],b=v?v+"."+T:T;typeof A=="object"&&A!==null&&!Array.isArray(A)&&u["dot-notation"]?V(A,b):(!ye(M,b.split("."))||R(b,_.arrays)&&u["combine-arrays"])&&L(b,A);});}function I(){typeof d<"u"&&d.forEach(function(h){V(h);});}function W(h,v){if(typeof g>"u")return;let T=typeof g=="string"?g:"",A=Wt.env();Object.keys(A).forEach(function(b){if(T===""||b.lastIndexOf(T,0)===0){let z=b.split("__").map(function(Q,re){return re===0&&(Q=Q.substring(T.length)),Cn(Q)});(v&&_.configs[z.join(".")]||!v)&&!ye(h,z)&&L(z.join("."),A[b]);}});}function k(h){let v,T=new Set;Object.keys(h).forEach(function(A){if(!T.has(A)&&(v=R(A,_.coercions),typeof v=="function"))try{let b=q(A,v(h[A]));[].concat(_.aliases[A]||[],A).forEach(z=>{T.add(z),h[z]=b;});}catch(b){x=b;}});}function G(h){return _.keys.forEach(v=>{~v.indexOf(".")||typeof h[v]>"u"&&(h[v]=void 0);}),h}function K(h,v,T,A=!1){Object.keys(T).forEach(function(b){ye(h,b.split("."))||(de(h,b.split("."),T[b]),A&&(F[b]=!0),(v[b]||[]).forEach(function(z){ye(h,z.split("."))||de(h,z.split("."),T[b]);}));});}function ye(h,v){let T=h;u["dot-notation"]||(v=[v.join(".")]),v.slice(0,-1).forEach(function(b){T=T[b]||{};});let A=v[v.length-1];return typeof T!="object"?!1:A in T}function de(h,v,T){let A=h;u["dot-notation"]||(v=[v.join(".")]),v.slice(0,-1).forEach(function(Ae){Ae=il(Ae),typeof A=="object"&&A[Ae]===void 0&&(A[Ae]={}),typeof A[Ae]!="object"||Array.isArray(A[Ae])?(Array.isArray(A[Ae])?A[Ae].push({}):A[Ae]=[A[Ae],{}],A=A[Ae][A[Ae].length-1]):A=A[Ae];});let b=il(v[v.length-1]),z=R(v.join("."),_.arrays),Q=Array.isArray(T),re=u["duplicate-arguments-array"];!re&&R(b,_.nargs)&&(re=!0,(!E(A[b])&&_.nargs[b]===1||Array.isArray(A[b])&&A[b].length===_.nargs[b])&&(A[b]=void 0)),T===ko()?A[b]=ko(A[b]):Array.isArray(A[b])?re&&z&&Q?A[b]=u["flatten-duplicate-arrays"]?A[b].concat(T):(Array.isArray(A[b][0])?A[b]:[A[b]]).concat([T]):!re&&!!z==!!Q?A[b]=T:A[b]=A[b].concat([T]):A[b]===void 0&&z?A[b]=Q?T:[T]:re&&!(A[b]===void 0||R(b,_.counts)||R(b,_.bools))?A[b]=[A[b],T]:A[b]=T;}function Ye(...h){h.forEach(function(v){Object.keys(v||{}).forEach(function(T){_.aliases[T]||(_.aliases[T]=[].concat(o[T]||[]),_.aliases[T].concat(T).forEach(function(A){if(/-/.test(A)&&u["camel-case-expansion"]){let b=Cn(A);b!==T&&_.aliases[T].indexOf(b)===-1&&(_.aliases[T].push(b),y[b]=!0);}}),_.aliases[T].concat(T).forEach(function(A){if(A.length>1&&/[A-Z]/.test(A)&&u["camel-case-expansion"]){let b=ol(A,"-");b!==T&&_.aliases[T].indexOf(b)===-1&&(_.aliases[T].push(b),y[b]=!0);}}),_.aliases[T].forEach(function(A){_.aliases[A]=[T].concat(_.aliases[T].filter(function(b){return A!==b}));}));});});}function R(h,v){let T=[].concat(_.aliases[h]||[],h),A=Object.keys(v),b=T.find(z=>A.includes(z));return b?v[b]:!1}function Ke(h){let v=Object.keys(_);return [].concat(v.map(A=>_[A])).some(function(A){return Array.isArray(A)?A.includes(h):A[h]})}function Ne(h,...v){return [].concat(...v).some(function(A){let b=h.match(A);return b&&Ke(b[1])})}function Ct(h){if(h.match(j)||!h.match(/^-[^-]+/))return !1;let v=!0,T,A=h.slice(1).split("");for(let b=0;bR(h,_.arrays)?(x=Error(C("Invalid configuration: %s, opts.count excludes opts.array.",h)),!0):R(h,_.nargs)?(x=Error(C("Invalid configuration: %s, opts.count excludes opts.narg.",h)),!0):!1);}return {aliases:Object.assign({},_.aliases),argv:Object.assign(P,M),configuration:u,defaulted:Object.assign({},F),error:x,newAliases:Object.assign({},y)}}};function vw(e){let t=[],r=Object.create(null),n=!0;for(Object.keys(e).forEach(function(s){t.push([].concat(e[s],s));});n;){n=!1;for(let s=0;sEw,format:Dw.format,normalize:nl.normalize,resolve:nl.resolve,require:e=>{if(typeof U<"u")return U(e);if(e.match(/\.json$/))return yw.readFileSync(e,"utf8");throw Error("only .json config files are supported in ESM")}}),On=function(t,r){return ul.parse(t.slice(),r).argv};On.detailed=function(e,t){return ul.parse(e.slice(),t)};On.camelCase=Cn;On.decamelize=ol;On.looksLikeNumber=al;cl.exports=On;});var fl=B((U2,ll)=>{ll.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")};});var ki=B((z2,dl)=>{var _w=fl();dl.exports=e=>typeof e=="string"?e.replace(_w(),""):e;});var pl=B((H2,Bo)=>{var hl=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);Bo.exports=hl;Bo.exports.default=hl;});var gl=B((V2,ml)=>{ml.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var Pi=B((G2,qo)=>{var Fw=ki(),Sw=pl(),Cw=gl(),Dl=e=>{if(typeof e!="string"||e.length===0||(e=Fw(e),e.length===0))return 0;e=e.replace(Cw()," ");let t=0;for(let r=0;r=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,t+=Sw(n)?2:1);}return t};qo.exports=Dl;qo.exports.default=Dl;});var wl=B((J2,yl)=>{yl.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};});var Yo=B((Z2,El)=>{var bn=wl(),vl={};for(let e of Object.keys(bn))vl[bn[e]]=e;var ae={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};El.exports=ae;for(let e of Object.keys(ae)){if(!("channels"in ae[e]))throw new Error("missing channels property: "+e);if(!("labels"in ae[e]))throw new Error("missing channel labels property: "+e);if(ae[e].labels.length!==ae[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=ae[e];delete ae[e].channels,delete ae[e].labels,Object.defineProperty(ae[e],"channels",{value:t}),Object.defineProperty(ae[e],"labels",{value:r});}ae.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),o=Math.max(t,r,n),u=o-s,c,d;o===s?c=0:t===o?c=(r-n)/u:r===o?c=2+(n-t)/u:n===o&&(c=4+(t-r)/u),c=Math.min(c*60,360),c<0&&(c+=360);let g=(s+o)/2;return o===s?d=0:g<=.5?d=u/(o+s):d=u/(2-o-s),[c,d*100,g*100]};ae.rgb.hsv=function(e){let t,r,n,s,o,u=e[0]/255,c=e[1]/255,d=e[2]/255,g=Math.max(u,c,d),m=g-Math.min(u,c,d),D=function(y){return (g-y)/6/m+1/2};return m===0?(s=0,o=0):(o=m/g,t=D(u),r=D(c),n=D(d),u===g?s=n-r:c===g?s=1/3+t-n:d===g&&(s=2/3+r-t),s<0?s+=1:s>1&&(s-=1)),[s*360,o*100,g*100]};ae.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],s=ae.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[s,o*100,n*100]};ae.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-r,1-n),o=(1-t-s)/(1-s)||0,u=(1-r-s)/(1-s)||0,c=(1-n-s)/(1-s)||0;return [o*100,u*100,c*100,s*100]};function Ow(e,t){return (e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}ae.rgb.keyword=function(e){let t=vl[e];if(t)return t;let r=1/0,n;for(let s of Object.keys(bn)){let o=bn[s],u=Ow(e,o);u.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let s=t*.4124+r*.3576+n*.1805,o=t*.2126+r*.7152+n*.0722,u=t*.0193+r*.1192+n*.9505;return [s*100,o*100,u*100]};ae.rgb.lab=function(e){let t=ae.rgb.xyz(e),r=t[0],n=t[1],s=t[2];r/=95.047,n/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let o=116*n-16,u=500*(r-n),c=200*(n-s);return [o,u,c]};ae.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s,o,u;if(r===0)return u=n*255,[u,u,u];n<.5?s=n*(1+r):s=n+r-n*r;let c=2*n-s,d=[0,0,0];for(let g=0;g<3;g++)o=t+1/3*-(g-1),o<0&&o++,o>1&&o--,6*o<1?u=c+(s-c)*6*o:2*o<1?u=s:3*o<2?u=c+(s-c)*(2/3-o)*6:u=c,d[g]=u*255;return d};ae.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=r,o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,s*=o<=1?o:2-o;let u=(n+r)/2,c=n===0?2*s/(o+s):2*r/(n+r);return [t,c*100,u*100]};ae.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,s=Math.floor(t)%6,o=t-Math.floor(t),u=255*n*(1-r),c=255*n*(1-r*o),d=255*n*(1-r*(1-o));switch(n*=255,s){case 0:return [n,d,u];case 1:return [c,n,u];case 2:return [u,n,d];case 3:return [u,c,n];case 4:return [d,u,n];case 5:return [n,u,c]}};ae.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=Math.max(n,.01),o,u;u=(2-r)*n;let c=(2-r)*s;return o=r*s,o/=c<=1?c:2-c,o=o||0,u/=2,[t,o*100,u*100]};ae.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s=r+n,o;s>1&&(r/=s,n/=s);let u=Math.floor(6*t),c=1-n;o=6*t-u,u&1&&(o=1-o);let d=r+o*(c-r),g,m,D;switch(u){default:case 6:case 0:g=c,m=d,D=r;break;case 1:g=d,m=c,D=r;break;case 2:g=r,m=c,D=d;break;case 3:g=r,m=d,D=c;break;case 4:g=d,m=r,D=c;break;case 5:g=c,m=r,D=d;break}return [g*255,m*255,D*255]};ae.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s=e[3]/100,o=1-Math.min(1,t*(1-s)+s),u=1-Math.min(1,r*(1-s)+s),c=1-Math.min(1,n*(1-s)+s);return [o*255,u*255,c*255]};ae.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s,o,u;return s=t*3.2406+r*-1.5372+n*-.4986,o=t*-.9689+r*1.8758+n*.0415,u=t*.0557+r*-.204+n*1.057,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),u=Math.min(Math.max(0,u),1),[s*255,o*255,u*255]};ae.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let s=116*r-16,o=500*(t-r),u=200*(r-n);return [s,o,u]};ae.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],s,o,u;o=(t+16)/116,s=r/500+o,u=o-n/200;let c=o**3,d=s**3,g=u**3;return o=c>.008856?c:(o-16/116)/7.787,s=d>.008856?d:(s-16/116)/7.787,u=g>.008856?g:(u-16/116)/7.787,s*=95.047,o*=100,u*=108.883,[s,o,u]};ae.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],s;s=Math.atan2(n,r)*360/2/Math.PI,s<0&&(s+=360);let u=Math.sqrt(r*r+n*n);return [t,u,s]};ae.lch.lab=function(e){let t=e[0],r=e[1],s=e[2]/360*2*Math.PI,o=r*Math.cos(s),u=r*Math.sin(s);return [t,o,u]};ae.rgb.ansi16=function(e,t=null){let[r,n,s]=e,o=t===null?ae.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let u=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(u+=60),u};ae.hsv.ansi16=function(e){return ae.rgb.ansi16(ae.hsv.rgb(e),e[2])};ae.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};ae.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,n=(t&1)*r*255,s=(t>>1&1)*r*255,o=(t>>2&1)*r*255;return [n,s,o]};ae.ansi256.rgb=function(e){if(e>=232){let o=(e-232)*10+8;return [o,o,o]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,s=t%6/5*255;return [r,n,s]};ae.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return "000000".substring(r.length)+r};ae.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return [0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(c=>c+c).join(""));let n=parseInt(r,16),s=n>>16&255,o=n>>8&255,u=n&255;return [s,o,u]};ae.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),u=s-o,c,d;return u<1?c=o/(1-u):c=0,u<=0?d=0:s===t?d=(r-n)/u%6:s===r?d=2+(n-t)/u:d=4+(t-r)/u,d/=6,d%=1,[d*360,u*100,c*100]};ae.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),s=0;return n<1&&(s=(r-.5*n)/(1-n)),[e[0],n*100,s*100]};ae.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,s=0;return n<1&&(s=(r-n)/(1-n)),[e[0],n*100,s*100]};ae.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return [n*255,n*255,n*255];let s=[0,0,0],o=t%1*6,u=o%1,c=1-u,d=0;switch(Math.floor(o)){case 0:s[0]=1,s[1]=u,s[2]=0;break;case 1:s[0]=c,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=u;break;case 3:s[0]=0,s[1]=c,s[2]=1;break;case 4:s[0]=u,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=c;}return d=(1-r)*n,[(r*s[0]+d)*255,(r*s[1]+d)*255,(r*s[2]+d)*255]};ae.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),s=0;return n>0&&(s=t/n),[e[0],s*100,n*100]};ae.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,s=0;return n>0&&n<.5?s=t/(2*n):n>=.5&&n<1&&(s=t/(2*(1-n))),[e[0],s*100,n*100]};ae.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return [e[0],(n-t)*100,(1-n)*100]};ae.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,s=n-t,o=0;return s<1&&(o=(n-s)/(1-s)),[e[0],s*100,o*100]};ae.apple.rgb=function(e){return [e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};ae.rgb.apple=function(e){return [e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};ae.gray.rgb=function(e){return [e[0]/100*255,e[0]/100*255,e[0]/100*255]};ae.gray.hsl=function(e){return [0,0,e[0]]};ae.gray.hsv=ae.gray.hsl;ae.gray.hwb=function(e){return [0,100,e[0]]};ae.gray.cmyk=function(e){return [0,0,0,e[0]]};ae.gray.lab=function(e){return [e[0],0,0]};ae.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return "000000".substring(n.length)+n};ae.rgb.gray=function(e){return [(e[0]+e[1]+e[2])/3/255*100]};});var Fl=B((K2,_l)=>{var Ri=Yo();function bw(){let e={},t=Object.keys(Ri);for(let r=t.length,n=0;n{var Wo=Yo(),Tw=Fl(),Yr={},jw=Object.keys(Wo);function Iw(e){let t=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return "conversion"in e&&(t.conversion=e.conversion),t}function Nw(e){let t=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let s=e(r);if(typeof s=="object")for(let o=s.length,u=0;u{Yr[e]={},Object.defineProperty(Yr[e],"channels",{value:Wo[e].channels}),Object.defineProperty(Yr[e],"labels",{value:Wo[e].labels});let t=Tw(e);Object.keys(t).forEach(n=>{let s=t[n];Yr[e][n]=Nw(s),Yr[e][n].raw=Iw(s);});});Sl.exports=Yr;});var Tl=B((X2,Ml)=>{var Ol=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,bl=(e,t)=>(...r)=>{let n=e(...r);return `\x1B[${38+t};5;${n}m`},xl=(e,t)=>(...r)=>{let n=e(...r);return `\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},Bi=e=>e,Al=(e,t,r)=>[e,t,r],Wr=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0});},Uo,Ur=(e,t,r,n)=>{Uo===void 0&&(Uo=Cl());let s=n?10:0,o={};for(let[u,c]of Object.entries(Uo)){let d=u==="ansi16"?"ansi":u;u===t?o[d]=e(r,s):typeof c=="object"&&(o[d]=e(c[t],s));}return o};function Lw(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[s,o]of Object.entries(n))t[s]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[s]=t[s],e.set(o[0],o[1]);Object.defineProperty(t,r,{value:n,enumerable:!1});}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",Wr(t.color,"ansi",()=>Ur(Ol,"ansi16",Bi,!1)),Wr(t.color,"ansi256",()=>Ur(bl,"ansi256",Bi,!1)),Wr(t.color,"ansi16m",()=>Ur(xl,"rgb",Al,!1)),Wr(t.bgColor,"ansi",()=>Ur(Ol,"ansi16",Bi,!0)),Wr(t.bgColor,"ansi256",()=>Ur(bl,"ansi256",Bi,!0)),Wr(t.bgColor,"ansi16m",()=>Ur(xl,"rgb",Al,!0)),t}Object.defineProperty(Ml,"exports",{enumerable:!0,get:Lw});});var kl=B((eC,$l)=>{var xn=Pi(),$w=ki(),kw=Tl(),qi=new Set(["\x1B","\x9B"]),Pw=39,Ho="\x07",Nl="[",Rw="]",Ll="m",Vo=`${Rw}8;;`,jl=e=>`${qi.values().next().value}${Nl}${e}${Ll}`,Il=e=>`${qi.values().next().value}${Vo}${e}${Ho}`,Bw=e=>e.split(" ").map(t=>xn(t)),zo=(e,t,r)=>{let n=[...t],s=!1,o=!1,u=xn($w(e[e.length-1]));for(let[c,d]of n.entries()){let g=xn(d);if(u+g<=r?e[e.length-1]+=d:(e.push(d),u=0),qi.has(d)&&(s=!0,o=n.slice(c+1).join("").startsWith(Vo)),s){o?d===Ho&&(s=!1,o=!1):d===Ll&&(s=!1);continue}u+=g,u===r&&c0&&e.length>1&&(e[e.length-2]+=e.pop());},qw=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(xn(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Yw=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return "";let n="",s,o,u=Bw(e),c=[""];for(let[g,m]of e.split(" ").entries()){r.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let D=xn(c[c.length-1]);if(g!==0&&(D>=t&&(r.wordWrap===!1||r.trim===!1)&&(c.push(""),D=0),(D>0||r.trim===!1)&&(c[c.length-1]+=" ",D++)),r.hard&&u[g]>t){let y=t-D,F=1+Math.floor((u[g]-y-1)/t);Math.floor((u[g]-1)/t)t&&D>0&&u[g]>0){if(r.wordWrap===!1&&Dt&&r.wordWrap===!1){zo(c,m,t);continue}c[c.length-1]+=m;}r.trim!==!1&&(c=c.map(qw));let d=[...c.join(` -`)];for(let[g,m]of d.entries()){if(n+=m,qi.has(m)){let{groups:y}=new RegExp(`(?:\\${Nl}(?\\d+)m|\\${Vo}(?.*)${Ho})`).exec(d.slice(g).join(""))||{groups:{}};if(y.code!==void 0){let F=Number.parseFloat(y.code);s=F===Pw?void 0:F;}else y.uri!==void 0&&(o=y.uri.length===0?void 0:y.uri);}let D=kw.codes.get(Number(s));d[g+1]===` +`;else u&&typeof u=="object"?r.push(o):n+=Pr(o)+s+Pr(u)+Io;}t.section&&n.length&&(n="["+Pr(t.section)+"]"+Io+n);for(let o of r){let u=Yc(o).join("\\."),c=(t.section?t.section+".":"")+u,{whitespace:d}=t,g=No(e[o],{section:c,whitespace:d});n.length&&g.length&&(n+=Io),n+=g;}return n},Yc=e=>e.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(t=>t.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")),qc=e=>{let t=Object.create(null),r=t,n=null,s=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,o=e.split(/[\r\n]+/g);for(let c of o){if(!c||c.match(/^\s*[;#]/))continue;let d=c.match(s);if(!d)continue;if(d[1]!==void 0){if(n=Ii(d[1]),n==="__proto__"){r=Object.create(null);continue}r=t[n]=t[n]||Object.create(null);continue}let g=Ii(d[2]),m=g.length>2&&g.slice(-2)==="[]",D=m?g.slice(0,-2):g;if(D==="__proto__")continue;let y=d[3]?Ii(d[4]):!0,F=y==="true"||y==="false"||y==="null"?JSON.parse(y):y;m&&(jo.call(r,D)?Array.isArray(r[D])||(r[D]=[r[D]]):r[D]=[]),Array.isArray(r[D])?r[D].push(F):r[D]=F;}let u=[];for(let c of Object.keys(t)){if(!jo.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;let d=Yc(c),g=t,m=d.pop(),D=m.replace(/\\\./g,".");for(let y of d)y!=="__proto__"&&((!jo.call(g,y)||typeof g[y]!="object")&&(g[y]=Object.create(null)),g=g[y]);g===t&&D===m||(g[D]=t[c],u.push(c));}for(let c of u)delete t[c];return t},Wc=e=>e.charAt(0)==='"'&&e.slice(-1)==='"'||e.charAt(0)==="'"&&e.slice(-1)==="'",Pr=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Wc(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,"\\;").replace(/#/g,"\\#"),Ii=(e,t)=>{if(e=(e||"").trim(),Wc(e)){e.charAt(0)==="'"&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e);}catch{}}else {let r=!1,n="";for(let s=0,o=e.length;s{var av=zc(),Hc=Vc;Hc.json={stringify:function(e,t,r){return JSON.stringify(e,t||null,r||2)},parse:JSON.parse};Hc.ini=av;});var hr=B(Gc=>{var er=Br(),Rr=Gc.Memory=function(e){e=e||{},this.type="memory",this.store={},this.mtimes={},this.readOnly=!1,this.loadFrom=e.loadFrom||null,this.logicalSeparator=e.logicalSeparator||":",this.parseValues=e.parseValues||!1,this.loadFrom&&(this.store=er.loadFilesSync(this.loadFrom));};Rr.prototype.get=function(e){for(var t=this.store,r=er.path(e,this.logicalSeparator);r.length>0;){if(e=r.shift(),t&&typeof t!="string"&&Object.hasOwnProperty.call(t,e)){t=t[e];continue}return}return t};Rr.prototype.set=function(e,t){if(this.readOnly)return !1;var r=this.store,n=er.path(e,this.logicalSeparator);if(n.length===0)return !t||typeof t!="object"?!1:(this.reset(),this.store=t,!0);for(this.mtimes[e]=Date.now();n.length>1;)e=n.shift(),(!r[e]||typeof r[e]!="object"||!Object.hasOwnProperty.call(r,e))&&(r[e]={}),r=r[e];return e=n.shift(),this.parseValues&&(t=er.parseValues.call(er,t)),r[e]=t,!0};Rr.prototype.clear=function(e){if(this.readOnly)return !1;var t=this.store,r=t,n=er.path(e,this.logicalSeparator);delete this.mtimes[e];for(var s=0;s1;)e=s.shift(),n[e]||(n[e]={}),n=n[e];return e=s.shift(),typeof n[e]!="object"||Array.isArray(n[e])?(n[e]=t,!0):Object.keys(t).every(function(u){return r.merge(er.keyed(r.logicalSeparator,o,u),t[u])})};Rr.prototype.reset=function(){return this.readOnly?!1:(this.mtimes={},this.store={},!0)};Rr.prototype.loadSync=function(){return this.store||{}};});var Br=B(Kc=>{var Jc=U("fs"),uv=(To(),Yu(Mo)),Zc=Ni(),cv=hr().Memory,Et=Kc;Et.path=function(e,t){return t=t||":",e==null?[]:e.split(t)};Et.key=function(){return Array.prototype.slice.call(arguments).join(":")};Et.keyed=function(){return Array.prototype.slice.call(arguments,1).join(arguments[0])};Et.loadFiles=function(e,t){if(!e)return t(null,{});var r=Array.isArray(e)?{files:e}:e;r.format=r.format||Zc.json;function n(s,o){Jc.readFile(s,function(u,c){return u?o(u):o(null,r.format.parse(c.toString()))});}uv.map(r.files,n,function(s,o){return s?t(s):t(null,Et.merge(o))});};Et.loadFilesSync=function(e){if(e){var t=Array.isArray(e)?{files:e}:e;return t.format=t.format||Zc.json,Et.merge(t.files.map(function(r){return t.format.parse(Jc.readFileSync(r,"utf8"))}))}};Et.merge=function(e){var t=new cv;return e.forEach(function(r){Object.keys(r).forEach(function(n){t.merge(n,r[n]);});}),t.store};Et.capitalize=function(e){return e&&e[0].toUpperCase()+e.slice(1)};Et.parseValues=function(e){var t=e;try{t=JSON.parse(e);}catch{e==="undefined"&&(t=void 0);}return t};Et.transform=function(e,t){var r=Object.keys(e).map(function(n){var s={key:n,value:e[n]},o=t.call(null,s);if(o){if(o.key)return o}else return null;var u=new Error("Transform function passed to store returned an invalid format: "+JSON.stringify(o));throw u.name="RuntimeError",u});return r.filter(function(n){return n!==null}).reduce(function(n,s){return n[s.key]=s.value,n},{})};});var Xc=B(Qc=>{var qr=(To(),Yu(Mo)),tr=Br(),Re=Qc.Provider=function(e){e=e||{},this.stores={},this.sources=[],this.init(e);};["argv","env"].forEach(function(e){Re.prototype[e]=function(){var t=[e].concat(Array.prototype.slice.call(arguments));return this.add.apply(this,t)};});Re.prototype.file=function(e,t){return arguments.length==1?(t=typeof e=="string"?{file:e}:e,e="file"):t=typeof t=="string"?{file:t}:t,t.type="file",this.add(e,t)};["defaults","overrides"].forEach(function(e){Re.prototype[e]=function(t){return t=t||{},t.type||(t.type="literal"),this.add(e,t)};});Re.prototype.use=function(e,t){t=t||{};function r(o){return Object.keys(t).every(function(u){return t[u]===o[u]})}var n=this.stores[e],s=n&&!r(n);return (!n||s)&&(s&&this.remove(e),this.add(e,t)),this};Re.prototype.add=function(e,t,r){t=t||{};var n=t.type||e;if(!Li()[tr.capitalize(n)])throw new Error("Cannot add store with unknown type: "+n);return this.stores[e]=this.create(n,t,r),this.stores[e].loadSync&&this.stores[e].loadSync(),this};Re.prototype.remove=function(e){return delete this.stores[e],this};Re.prototype.create=function(e,t,r){return new(Li())[tr.capitalize(e.toLowerCase())](t,r)};Re.prototype.init=function(e){var t=this;e.type?this.add(e.type,e):e.store?this.add(e.store.name||e.store.type,e.store):e.stores&&Object.keys(e.stores).forEach(function(r){var n=e.stores[r];t.add(n.name||r||n.type,n);}),e.source?this.sources.push(this.create(e.source.type||e.source.name,e.source)):e.sources&&Object.keys(e.sources).forEach(function(r){var n=e.sources[r];t.sources.push(t.create(n.type||n.name||r,n));});};Re.prototype.get=function(e,t){if(typeof e=="function"&&(t=e,e=null),!t)return this._execute("get",1,e,t);var r=0,n=Object.keys(this.stores),s=this,o,u=[];qr.whilst(function(c){c(null,typeof o>"u"&&r=2)return d.get(e,function(g,m){if(g)return c(g);o=m,o&&typeof o=="object"&&!Array.isArray(o)&&(u.push(o),o=void 0),c();});o=d.get(e),o&&typeof o=="object"&&!Array.isArray(o)&&(u.push(o),o=void 0),c();},function(c){return !c&&u.length&&(o=tr.merge(u.reverse())),c?t(c):t(null,o)});};Re.prototype.any=function(e,t){if(Array.isArray(e)||(e=Array.prototype.slice.call(arguments),e.length>0&&typeof e[e.length-1]=="function"?t=e.pop():t=null),!t){for(var r,n=0;n"u"&&t.push(r);},this),t.length)throw new Error("Missing required keys: "+t.join(", "));return !0};Re.prototype.reset=function(e){return this._execute("reset",0,e)};Re.prototype.clear=function(e,t){return this._execute("clear",1,e,t)};Re.prototype.merge=function(){var e=this,t=Array.prototype.slice.call(arguments),r=typeof t[t.length-1]=="function"&&t.pop(),n=t.pop(),s=t.pop();function o(u,c){return e._execute("merge",2,u,n[u],c)}return s?this._execute("merge",2,s,n,r):Array.isArray(n)||typeof n!="object"?lv(new Error("Cannot merge non-Object into top-level."),r):qr.forEach(Object.keys(n),o,r||function(){})};Re.prototype.load=function(e){var t=this;function r(){var d=Object.keys(t.stores);return d.reverse(),d.map(function(g){return t.stores[g]})}function n(d){if(!d.loadSync)throw new Error("nconf store "+d.type+" has no loadSync() method");return d.loadSync()}function s(d,g){return !d.load&&!d.loadSync?g(new Error("nconf store "+d.type+" has no load() method")):d.loadSync?g(null,d.loadSync()):d.load(g)}function o(d,g){if(!g)return tr.merge(d.map(n));qr.map(d,s,function(m,D){return m?g(m):g(null,tr.merge(D))});}function u(d){d&&typeof d=="object"&&t.use("sources",{type:"literal",store:d});}function c(){var d=t.sources.splice(0);if(d.reverse(),!e)return u(o(d)),o(r());o(d,function(g,m){return g?e(g):(u(m),o(r(),e))});}return t.sources.length?c():o(r(),e)};Re.prototype.save=function(e,t){!t&&typeof e=="function"&&(t=e,e=null);var r=this,n=Object.keys(this.stores);function s(u,c){var d=r.stores[c];if(d.saveSync){var g=d.saveSync();typeof g=="object"&&g!==null&&u.push(g);}return u}function o(u,c,d){var g=r.stores[c];if(g.save)return g.save(e,function(m,D){if(m)return d(m);typeof D=="object"&&D!==null&&u.push(D),d(null,u);});g.saveSync&&u.push(g.saveSync()),d(null,u);}if(!t)return tr.merge(n.reduce(s,[]));qr.reduce(n,[],o,function(u,c){return u?t(u):t(null,tr.merge(c))});};Re.prototype._execute=function(e,t){var r=Array.prototype.slice.call(arguments,2),n=typeof r[r.length-1]=="function"&&r.pop(),s=["set","clear","merge","reset"].indexOf(e)!==-1,o=this,u,c=[],d=Object.keys(this.stores);function g(m,D){var y=o.stores[m];return s&&y.readOnly?D():y[e].length>t?y[e].apply(y,r.concat(D)):D(null,y[e].apply(y,r))}return n?qr.forEach(d,g,function(m){return m?n(m):n()}):(d.forEach(function(m){if(typeof u>"u"){var D=o.stores[m];if(s&&D.readOnly)return;u=D[e].apply(D,r),u&&e==="get"&&typeof u=="object"&&!Array.isArray(u)&&(c.push(u),u=void 0);}}),c.length&&(u=tr.merge(c.reverse())),u)};function lv(e,t){if(t)return t(e);throw e}});var el=B((R2,fv)=>{fv.exports={name:"nconf",description:"Hierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging.",version:"0.12.1",author:"Charlie Robbins ",contributors:["Matt Hamann ","Maciej Ma\u0142ecki ","Jarrett Cruger ","Adrien Becchis"],repository:{type:"git",url:"http://github.com/flatiron/nconf.git"},keywords:["configuration","key value store","plugabble"],dependencies:{async:"^3.0.0",ini:"^2.0.0","secure-keys":"^1.0.0",yargs:"^16.1.1"},devDependencies:{"@release-it/conventional-changelog":"^7.0.2",coveralls:"^3.1.0",eslint:"^7.0.0","nconf-yaml":"^1.0.2",nyc:"^15.1.0","release-it":"^16.2.1",vows:"^0.8.3"},main:"./lib/nconf",scripts:{test:"vows test/*-test.js test/**/*-test.js --spec",cover:"nyc --reporter=lcov npm test",coveralls:"cat coverage/lcov.info | coveralls",lint:"eslint .",release:"release-it"},engines:{node:">= 0.4.0"},license:"MIT"};});var rl=B((B2,tl)=>{var Lo=U("fs"),dv=U("util"),hv=U("path"),_t,$o=class{constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:!0,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[];}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=t.shift(),n=function(){};return typeof t[t.length-1]=="function"&&(n=t.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),_t.format.apply(_t.format,[this.cache[this.locale][r]||r].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),r=t.shift(),n=t.shift(),s=t.shift(),o=function(){};typeof t[t.length-1]=="function"&&(o=t.pop()),this.cache[this.locale]||this._readLocaleFile();let u=s===1?r:n;this.cache[this.locale][r]&&(u=this.cache[this.locale][r][s===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let c=[u];return ~u.indexOf("%d")&&c.push(s),_t.format.apply(_t.format,c.concat(t))}setLocale(t){this.locale=t;}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.cache[this.locale][r]=t[r]);}_taggedLiteral(t,...r){let n="";return t.forEach(function(s,o){let u=r[o+1];n+=s,typeof u<"u"&&(n+="%s");}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue();}_processWriteQueue(){let t=this,r=this.writeQueue[0],n=r.directory,s=r.locale,o=r.cb,u=this._resolveLocaleFile(n,s),c=JSON.stringify(this.cache[s],null,2);_t.fs.writeFile(u,c,"utf-8",function(d){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),o(d);});}_readLocaleFile(){let t={},r=this._resolveLocaleFile(this.directory,this.locale);try{_t.fs.readFileSync&&(t=JSON.parse(_t.fs.readFileSync(r,"utf-8")));}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")t={};else throw n}this.cache[this.locale]=t;}_resolveLocaleFile(t,r){let n=_t.resolve(t,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let s=_t.resolve(t,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s);}return n}_fileExistsSync(t){return _t.exists(t)}};function pv(e,t){_t=t;let r=new $o(e);return {__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var mv={fs:{readFileSync:Lo.readFileSync,writeFile:Lo.writeFile},format:dv.format,resolve:hv.resolve,exists:e=>{try{return Lo.statSync(e).isFile()}catch{return !1}}},gv=e=>pv(e,mv);tl.exports=gv;});var Ro=B((q2,cl)=>{var Dv=U("util"),yv=U("fs"),nl=U("path");function Cn(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let r="",n=!1,s=e.match(/^-+/);for(let o=s?s[0].length:0;o0?n+=`${t}${r.charAt(s)}`:n+=u;}return n}function al(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function vv(e){if(Array.isArray(e))return e.map(u=>typeof u!="string"?u+"":u);e=e.trim();let t=0,r=null,n=null,s=null,o=[];for(let u=0;u{typeof w=="number"&&(_.nargs[h]=w,_.keys.push(h));}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([h,w])=>{typeof w=="function"&&(_.coercions[h]=w,_.keys.push(h));}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(h){_.configs[h]=!0;}):typeof n.config=="object"&&Object.entries(n.config).forEach(([h,w])=>{(typeof w=="boolean"||typeof w=="function")&&(_.configs[h]=w);})),Ye(n.key,o,n.default,_.arrays),Object.keys(c).forEach(function(h){(_.aliases[h]||[]).forEach(function(w){c[w]=c[h];});});let x=null;S();let v=[],M=Object.assign(Object.create(null),{_:[]}),P={};for(let h=0;h=3&&(R(Q[1],_.arrays)?h=te(h,Q[1],s,Q[2]):R(Q[1],_.nargs)!==!1?h=X(h,Q[1],s,Q[2]):L(Q[1],Q[2]));else if(w.match($)&&u["boolean-negation"])Q=w.match($),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(b=Q[1],L(b,R(b,_.arrays)?[!1]:!1));else if(w.match(/^--.+/)||!u["short-option-groups"]&&w.match(/^-[^-]+/))Q=w.match(/^--?(.+)/),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(b=Q[1],R(b,_.arrays)?h=te(h,b,s):R(b,_.nargs)!==!1?h=X(h,b,s):(re=s[h+1],re!==void 0&&(!re.match(/^-/)||re.match(j))&&!R(b,_.bools)&&!R(b,_.counts)||/^(true|false)$/.test(re)?(L(b,re),h++):L(b,le(b))));else if(w.match(/^-.\..+=/))Q=w.match(/^-([^=]+)=([\s\S]*)$/),Q!==null&&Array.isArray(Q)&&Q.length>=3&&L(Q[1],Q[2]);else if(w.match(/^-.\..+/)&&!w.match(j))re=s[h+1],Q=w.match(/^-(.\..+)/),Q!==null&&Array.isArray(Q)&&Q.length>=2&&(b=Q[1],re!==void 0&&!re.match(/^-/)&&!R(b,_.bools)&&!R(b,_.counts)?(L(b,re),h++):L(b,le(b)));else if(w.match(/^-[^-]+/)&&!w.match(j)){z=w.slice(1,-1).split(""),A=!1;for(let Fe=0;Feh!=="--"&&h.includes("-")).forEach(h=>{delete M[h];}),u["strip-aliased"]&&[].concat(...Object.keys(o).map(h=>o[h])).forEach(h=>{u["camel-case-expansion"]&&h.includes("-")&&delete M[h.split(".").map(w=>Cn(w)).join(".")],delete M[h];});function J(h){let w=q("_",h);(typeof w=="string"||typeof w=="number")&&M._.push(w);}function X(h,w,T,A){let b,z=R(w,_.nargs);if(z=typeof z!="number"||isNaN(z)?1:z,z===0)return E(A)||(x=Error(C("Argument unexpected for: %s",w))),L(w,le(w)),h;let Q=E(A)?0:1;if(u["nargs-eats-options"])T.length-(h+1)+Q0&&(L(w,A),re--),b=h+1;b0||Q&&typeof Q=="number"&&b.length>=Q||(z=T[re],/^-/.test(z)&&!j.test(z)&&!ie(z)));re++)h=re,b.push(Z(w,z));}return typeof Q=="number"&&(Q&&b.length1&&u["dot-notation"]&&(_.aliases[A[0]]||[]).forEach(function(b){let z=b.split("."),Q=[].concat(A);Q.shift(),z=z.concat(Q),(_.aliases[h]||[]).includes(z.join("."))||de(M,z,T);}),R(h,_.normalize)&&!R(h,_.arrays)&&[h].concat(_.aliases[h]||[]).forEach(function(z){Object.defineProperty(P,z,{enumerable:!0,get(){return w},set(Q){w=typeof Q=="string"?Wt.normalize(Q):Q;}});});}function ee(h,w){_.aliases[h]&&_.aliases[h].length||(_.aliases[h]=[w],y[w]=!0),_.aliases[w]&&_.aliases[w].length||ee(w,h);}function Z(h,w){typeof w=="string"&&(w[0]==="'"||w[0]==='"')&&w[w.length-1]===w[0]&&(w=w.substring(1,w.length-1)),(R(h,_.bools)||R(h,_.counts))&&typeof w=="string"&&(w=w==="true");let T=Array.isArray(w)?w.map(function(A){return q(h,A)}):q(h,w);return R(h,_.counts)&&(E(T)||typeof T=="boolean")&&(T=ko()),R(h,_.normalize)&&R(h,_.arrays)&&(Array.isArray(w)?T=w.map(A=>Wt.normalize(A)):T=Wt.normalize(w)),T}function q(h,w){return !u["parse-positional-numbers"]&&h==="_"||!R(h,_.strings)&&!R(h,_.bools)&&!Array.isArray(w)&&(al(w)&&u["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${w}`)))||!E(w)&&R(h,_.numbers))&&(w=Number(w)),w}function Y(h){let w=Object.create(null);K(w,_.aliases,c),Object.keys(_.configs).forEach(function(T){let A=h[T]||w[T];if(A)try{let b=null,z=Wt.resolve(Wt.cwd(),A),Q=_.configs[T];if(typeof Q=="function"){try{b=Q(z);}catch(re){b=re;}if(b instanceof Error){x=b;return}}else b=Wt.require(z);V(b);}catch(b){b.name==="PermissionDenied"?x=b:h[T]&&(x=Error(C("Invalid JSON config file: %s",A)));}});}function V(h,w){Object.keys(h).forEach(function(T){let A=h[T],b=w?w+"."+T:T;typeof A=="object"&&A!==null&&!Array.isArray(A)&&u["dot-notation"]?V(A,b):(!ye(M,b.split("."))||R(b,_.arrays)&&u["combine-arrays"])&&L(b,A);});}function I(){typeof d<"u"&&d.forEach(function(h){V(h);});}function W(h,w){if(typeof g>"u")return;let T=typeof g=="string"?g:"",A=Wt.env();Object.keys(A).forEach(function(b){if(T===""||b.lastIndexOf(T,0)===0){let z=b.split("__").map(function(Q,re){return re===0&&(Q=Q.substring(T.length)),Cn(Q)});(w&&_.configs[z.join(".")]||!w)&&!ye(h,z)&&L(z.join("."),A[b]);}});}function k(h){let w,T=new Set;Object.keys(h).forEach(function(A){if(!T.has(A)&&(w=R(A,_.coercions),typeof w=="function"))try{let b=q(A,w(h[A]));[].concat(_.aliases[A]||[],A).forEach(z=>{T.add(z),h[z]=b;});}catch(b){x=b;}});}function G(h){return _.keys.forEach(w=>{~w.indexOf(".")||typeof h[w]>"u"&&(h[w]=void 0);}),h}function K(h,w,T,A=!1){Object.keys(T).forEach(function(b){ye(h,b.split("."))||(de(h,b.split("."),T[b]),A&&(F[b]=!0),(w[b]||[]).forEach(function(z){ye(h,z.split("."))||de(h,z.split("."),T[b]);}));});}function ye(h,w){let T=h;u["dot-notation"]||(w=[w.join(".")]),w.slice(0,-1).forEach(function(b){T=T[b]||{};});let A=w[w.length-1];return typeof T!="object"?!1:A in T}function de(h,w,T){let A=h;u["dot-notation"]||(w=[w.join(".")]),w.slice(0,-1).forEach(function(Ae){Ae=il(Ae),typeof A=="object"&&A[Ae]===void 0&&(A[Ae]={}),typeof A[Ae]!="object"||Array.isArray(A[Ae])?(Array.isArray(A[Ae])?A[Ae].push({}):A[Ae]=[A[Ae],{}],A=A[Ae][A[Ae].length-1]):A=A[Ae];});let b=il(w[w.length-1]),z=R(w.join("."),_.arrays),Q=Array.isArray(T),re=u["duplicate-arguments-array"];!re&&R(b,_.nargs)&&(re=!0,(!E(A[b])&&_.nargs[b]===1||Array.isArray(A[b])&&A[b].length===_.nargs[b])&&(A[b]=void 0)),T===ko()?A[b]=ko(A[b]):Array.isArray(A[b])?re&&z&&Q?A[b]=u["flatten-duplicate-arrays"]?A[b].concat(T):(Array.isArray(A[b][0])?A[b]:[A[b]]).concat([T]):!re&&!!z==!!Q?A[b]=T:A[b]=A[b].concat([T]):A[b]===void 0&&z?A[b]=Q?T:[T]:re&&!(A[b]===void 0||R(b,_.counts)||R(b,_.bools))?A[b]=[A[b],T]:A[b]=T;}function Ye(...h){h.forEach(function(w){Object.keys(w||{}).forEach(function(T){_.aliases[T]||(_.aliases[T]=[].concat(o[T]||[]),_.aliases[T].concat(T).forEach(function(A){if(/-/.test(A)&&u["camel-case-expansion"]){let b=Cn(A);b!==T&&_.aliases[T].indexOf(b)===-1&&(_.aliases[T].push(b),y[b]=!0);}}),_.aliases[T].concat(T).forEach(function(A){if(A.length>1&&/[A-Z]/.test(A)&&u["camel-case-expansion"]){let b=ol(A,"-");b!==T&&_.aliases[T].indexOf(b)===-1&&(_.aliases[T].push(b),y[b]=!0);}}),_.aliases[T].forEach(function(A){_.aliases[A]=[T].concat(_.aliases[T].filter(function(b){return A!==b}));}));});});}function R(h,w){let T=[].concat(_.aliases[h]||[],h),A=Object.keys(w),b=T.find(z=>A.includes(z));return b?w[b]:!1}function Ke(h){let w=Object.keys(_);return [].concat(w.map(A=>_[A])).some(function(A){return Array.isArray(A)?A.includes(h):A[h]})}function Ne(h,...w){return [].concat(...w).some(function(A){let b=h.match(A);return b&&Ke(b[1])})}function Ct(h){if(h.match(j)||!h.match(/^-[^-]+/))return !1;let w=!0,T,A=h.slice(1).split("");for(let b=0;bR(h,_.arrays)?(x=Error(C("Invalid configuration: %s, opts.count excludes opts.array.",h)),!0):R(h,_.nargs)?(x=Error(C("Invalid configuration: %s, opts.count excludes opts.narg.",h)),!0):!1);}return {aliases:Object.assign({},_.aliases),argv:Object.assign(P,M),configuration:u,defaulted:Object.assign({},F),error:x,newAliases:Object.assign({},y)}}};function wv(e){let t=[],r=Object.create(null),n=!0;for(Object.keys(e).forEach(function(s){t.push([].concat(e[s],s));});n;){n=!1;for(let s=0;sEv,format:Dv.format,normalize:nl.normalize,resolve:nl.resolve,require:e=>{if(typeof U<"u")return U(e);if(e.match(/\.json$/))return yv.readFileSync(e,"utf8");throw Error("only .json config files are supported in ESM")}}),On=function(t,r){return ul.parse(t.slice(),r).argv};On.detailed=function(e,t){return ul.parse(e.slice(),t)};On.camelCase=Cn;On.decamelize=ol;On.looksLikeNumber=al;cl.exports=On;});var fl=B((W2,ll)=>{ll.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")};});var $i=B((U2,dl)=>{var _v=fl();dl.exports=e=>typeof e=="string"?e.replace(_v(),""):e;});var pl=B((z2,Bo)=>{var hl=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);Bo.exports=hl;Bo.exports.default=hl;});var gl=B((H2,ml)=>{ml.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var ki=B((V2,qo)=>{var Fv=$i(),Sv=pl(),Cv=gl(),Dl=e=>{if(typeof e!="string"||e.length===0||(e=Fv(e),e.length===0))return 0;e=e.replace(Cv()," ");let t=0;for(let r=0;r=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,t+=Sv(n)?2:1);}return t};qo.exports=Dl;qo.exports.default=Dl;});var vl=B((G2,yl)=>{yl.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};});var Yo=B((J2,El)=>{var bn=vl(),wl={};for(let e of Object.keys(bn))wl[bn[e]]=e;var ae={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};El.exports=ae;for(let e of Object.keys(ae)){if(!("channels"in ae[e]))throw new Error("missing channels property: "+e);if(!("labels"in ae[e]))throw new Error("missing channel labels property: "+e);if(ae[e].labels.length!==ae[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=ae[e];delete ae[e].channels,delete ae[e].labels,Object.defineProperty(ae[e],"channels",{value:t}),Object.defineProperty(ae[e],"labels",{value:r});}ae.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),o=Math.max(t,r,n),u=o-s,c,d;o===s?c=0:t===o?c=(r-n)/u:r===o?c=2+(n-t)/u:n===o&&(c=4+(t-r)/u),c=Math.min(c*60,360),c<0&&(c+=360);let g=(s+o)/2;return o===s?d=0:g<=.5?d=u/(o+s):d=u/(2-o-s),[c,d*100,g*100]};ae.rgb.hsv=function(e){let t,r,n,s,o,u=e[0]/255,c=e[1]/255,d=e[2]/255,g=Math.max(u,c,d),m=g-Math.min(u,c,d),D=function(y){return (g-y)/6/m+1/2};return m===0?(s=0,o=0):(o=m/g,t=D(u),r=D(c),n=D(d),u===g?s=n-r:c===g?s=1/3+t-n:d===g&&(s=2/3+r-t),s<0?s+=1:s>1&&(s-=1)),[s*360,o*100,g*100]};ae.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],s=ae.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[s,o*100,n*100]};ae.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-r,1-n),o=(1-t-s)/(1-s)||0,u=(1-r-s)/(1-s)||0,c=(1-n-s)/(1-s)||0;return [o*100,u*100,c*100,s*100]};function Ov(e,t){return (e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}ae.rgb.keyword=function(e){let t=wl[e];if(t)return t;let r=1/0,n;for(let s of Object.keys(bn)){let o=bn[s],u=Ov(e,o);u.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let s=t*.4124+r*.3576+n*.1805,o=t*.2126+r*.7152+n*.0722,u=t*.0193+r*.1192+n*.9505;return [s*100,o*100,u*100]};ae.rgb.lab=function(e){let t=ae.rgb.xyz(e),r=t[0],n=t[1],s=t[2];r/=95.047,n/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let o=116*n-16,u=500*(r-n),c=200*(n-s);return [o,u,c]};ae.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s,o,u;if(r===0)return u=n*255,[u,u,u];n<.5?s=n*(1+r):s=n+r-n*r;let c=2*n-s,d=[0,0,0];for(let g=0;g<3;g++)o=t+1/3*-(g-1),o<0&&o++,o>1&&o--,6*o<1?u=c+(s-c)*6*o:2*o<1?u=s:3*o<2?u=c+(s-c)*(2/3-o)*6:u=c,d[g]=u*255;return d};ae.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=r,o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,s*=o<=1?o:2-o;let u=(n+r)/2,c=n===0?2*s/(o+s):2*r/(n+r);return [t,c*100,u*100]};ae.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,s=Math.floor(t)%6,o=t-Math.floor(t),u=255*n*(1-r),c=255*n*(1-r*o),d=255*n*(1-r*(1-o));switch(n*=255,s){case 0:return [n,d,u];case 1:return [c,n,u];case 2:return [u,n,d];case 3:return [u,c,n];case 4:return [d,u,n];case 5:return [n,u,c]}};ae.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=Math.max(n,.01),o,u;u=(2-r)*n;let c=(2-r)*s;return o=r*s,o/=c<=1?c:2-c,o=o||0,u/=2,[t,o*100,u*100]};ae.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s=r+n,o;s>1&&(r/=s,n/=s);let u=Math.floor(6*t),c=1-n;o=6*t-u,u&1&&(o=1-o);let d=r+o*(c-r),g,m,D;switch(u){default:case 6:case 0:g=c,m=d,D=r;break;case 1:g=d,m=c,D=r;break;case 2:g=r,m=c,D=d;break;case 3:g=r,m=d,D=c;break;case 4:g=d,m=r,D=c;break;case 5:g=c,m=r,D=d;break}return [g*255,m*255,D*255]};ae.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s=e[3]/100,o=1-Math.min(1,t*(1-s)+s),u=1-Math.min(1,r*(1-s)+s),c=1-Math.min(1,n*(1-s)+s);return [o*255,u*255,c*255]};ae.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s,o,u;return s=t*3.2406+r*-1.5372+n*-.4986,o=t*-.9689+r*1.8758+n*.0415,u=t*.0557+r*-.204+n*1.057,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),u=Math.min(Math.max(0,u),1),[s*255,o*255,u*255]};ae.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let s=116*r-16,o=500*(t-r),u=200*(r-n);return [s,o,u]};ae.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],s,o,u;o=(t+16)/116,s=r/500+o,u=o-n/200;let c=o**3,d=s**3,g=u**3;return o=c>.008856?c:(o-16/116)/7.787,s=d>.008856?d:(s-16/116)/7.787,u=g>.008856?g:(u-16/116)/7.787,s*=95.047,o*=100,u*=108.883,[s,o,u]};ae.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],s;s=Math.atan2(n,r)*360/2/Math.PI,s<0&&(s+=360);let u=Math.sqrt(r*r+n*n);return [t,u,s]};ae.lch.lab=function(e){let t=e[0],r=e[1],s=e[2]/360*2*Math.PI,o=r*Math.cos(s),u=r*Math.sin(s);return [t,o,u]};ae.rgb.ansi16=function(e,t=null){let[r,n,s]=e,o=t===null?ae.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let u=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return o===2&&(u+=60),u};ae.hsv.ansi16=function(e){return ae.rgb.ansi16(ae.hsv.rgb(e),e[2])};ae.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};ae.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,n=(t&1)*r*255,s=(t>>1&1)*r*255,o=(t>>2&1)*r*255;return [n,s,o]};ae.ansi256.rgb=function(e){if(e>=232){let o=(e-232)*10+8;return [o,o,o]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,s=t%6/5*255;return [r,n,s]};ae.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return "000000".substring(r.length)+r};ae.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return [0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(c=>c+c).join(""));let n=parseInt(r,16),s=n>>16&255,o=n>>8&255,u=n&255;return [s,o,u]};ae.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),u=s-o,c,d;return u<1?c=o/(1-u):c=0,u<=0?d=0:s===t?d=(r-n)/u%6:s===r?d=2+(n-t)/u:d=4+(t-r)/u,d/=6,d%=1,[d*360,u*100,c*100]};ae.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),s=0;return n<1&&(s=(r-.5*n)/(1-n)),[e[0],n*100,s*100]};ae.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,s=0;return n<1&&(s=(r-n)/(1-n)),[e[0],n*100,s*100]};ae.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return [n*255,n*255,n*255];let s=[0,0,0],o=t%1*6,u=o%1,c=1-u,d=0;switch(Math.floor(o)){case 0:s[0]=1,s[1]=u,s[2]=0;break;case 1:s[0]=c,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=u;break;case 3:s[0]=0,s[1]=c,s[2]=1;break;case 4:s[0]=u,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=c;}return d=(1-r)*n,[(r*s[0]+d)*255,(r*s[1]+d)*255,(r*s[2]+d)*255]};ae.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),s=0;return n>0&&(s=t/n),[e[0],s*100,n*100]};ae.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,s=0;return n>0&&n<.5?s=t/(2*n):n>=.5&&n<1&&(s=t/(2*(1-n))),[e[0],s*100,n*100]};ae.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return [e[0],(n-t)*100,(1-n)*100]};ae.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,s=n-t,o=0;return s<1&&(o=(n-s)/(1-s)),[e[0],s*100,o*100]};ae.apple.rgb=function(e){return [e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};ae.rgb.apple=function(e){return [e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};ae.gray.rgb=function(e){return [e[0]/100*255,e[0]/100*255,e[0]/100*255]};ae.gray.hsl=function(e){return [0,0,e[0]]};ae.gray.hsv=ae.gray.hsl;ae.gray.hwb=function(e){return [0,100,e[0]]};ae.gray.cmyk=function(e){return [0,0,0,e[0]]};ae.gray.lab=function(e){return [e[0],0,0]};ae.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return "000000".substring(n.length)+n};ae.rgb.gray=function(e){return [(e[0]+e[1]+e[2])/3/255*100]};});var Fl=B((Z2,_l)=>{var Pi=Yo();function bv(){let e={},t=Object.keys(Pi);for(let r=t.length,n=0;n{var Wo=Yo(),Tv=Fl(),Yr={},jv=Object.keys(Wo);function Iv(e){let t=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return "conversion"in e&&(t.conversion=e.conversion),t}function Nv(e){let t=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let s=e(r);if(typeof s=="object")for(let o=s.length,u=0;u{Yr[e]={},Object.defineProperty(Yr[e],"channels",{value:Wo[e].channels}),Object.defineProperty(Yr[e],"labels",{value:Wo[e].labels});let t=Tv(e);Object.keys(t).forEach(n=>{let s=t[n];Yr[e][n]=Nv(s),Yr[e][n].raw=Iv(s);});});Sl.exports=Yr;});var Tl=B((Q2,Ml)=>{var Ol=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,bl=(e,t)=>(...r)=>{let n=e(...r);return `\x1B[${38+t};5;${n}m`},xl=(e,t)=>(...r)=>{let n=e(...r);return `\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},Ri=e=>e,Al=(e,t,r)=>[e,t,r],Wr=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0});},Uo,Ur=(e,t,r,n)=>{Uo===void 0&&(Uo=Cl());let s=n?10:0,o={};for(let[u,c]of Object.entries(Uo)){let d=u==="ansi16"?"ansi":u;u===t?o[d]=e(r,s):typeof c=="object"&&(o[d]=e(c[t],s));}return o};function Lv(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[s,o]of Object.entries(n))t[s]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[s]=t[s],e.set(o[0],o[1]);Object.defineProperty(t,r,{value:n,enumerable:!1});}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",Wr(t.color,"ansi",()=>Ur(Ol,"ansi16",Ri,!1)),Wr(t.color,"ansi256",()=>Ur(bl,"ansi256",Ri,!1)),Wr(t.color,"ansi16m",()=>Ur(xl,"rgb",Al,!1)),Wr(t.bgColor,"ansi",()=>Ur(Ol,"ansi16",Ri,!0)),Wr(t.bgColor,"ansi256",()=>Ur(bl,"ansi256",Ri,!0)),Wr(t.bgColor,"ansi16m",()=>Ur(xl,"rgb",Al,!0)),t}Object.defineProperty(Ml,"exports",{enumerable:!0,get:Lv});});var kl=B((X2,$l)=>{var xn=ki(),$v=$i(),kv=Tl(),Bi=new Set(["\x1B","\x9B"]),Pv=39,Ho="\x07",Nl="[",Rv="]",Ll="m",Vo=`${Rv}8;;`,jl=e=>`${Bi.values().next().value}${Nl}${e}${Ll}`,Il=e=>`${Bi.values().next().value}${Vo}${e}${Ho}`,Bv=e=>e.split(" ").map(t=>xn(t)),zo=(e,t,r)=>{let n=[...t],s=!1,o=!1,u=xn($v(e[e.length-1]));for(let[c,d]of n.entries()){let g=xn(d);if(u+g<=r?e[e.length-1]+=d:(e.push(d),u=0),Bi.has(d)&&(s=!0,o=n.slice(c+1).join("").startsWith(Vo)),s){o?d===Ho&&(s=!1,o=!1):d===Ll&&(s=!1);continue}u+=g,u===r&&c0&&e.length>1&&(e[e.length-2]+=e.pop());},qv=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(xn(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Yv=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return "";let n="",s,o,u=Bv(e),c=[""];for(let[g,m]of e.split(" ").entries()){r.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let D=xn(c[c.length-1]);if(g!==0&&(D>=t&&(r.wordWrap===!1||r.trim===!1)&&(c.push(""),D=0),(D>0||r.trim===!1)&&(c[c.length-1]+=" ",D++)),r.hard&&u[g]>t){let y=t-D,F=1+Math.floor((u[g]-y-1)/t);Math.floor((u[g]-1)/t)t&&D>0&&u[g]>0){if(r.wordWrap===!1&&Dt&&r.wordWrap===!1){zo(c,m,t);continue}c[c.length-1]+=m;}r.trim!==!1&&(c=c.map(qv));let d=[...c.join(` +`)];for(let[g,m]of d.entries()){if(n+=m,Bi.has(m)){let{groups:y}=new RegExp(`(?:\\${Nl}(?\\d+)m|\\${Vo}(?.*)${Ho})`).exec(d.slice(g).join(""))||{groups:{}};if(y.code!==void 0){let F=Number.parseFloat(y.code);s=F===Pv?void 0:F;}else y.uri!==void 0&&(o=y.uri.length===0?void 0:y.uri);}let D=kv.codes.get(Number(s));d[g+1]===` `?(o&&(n+=Il("")),s&&D&&(n+=jl(D))):m===` `&&(s&&D&&(n+=jl(s)),o&&(n+=Il(o)));}return n};$l.exports=(e,t,r)=>String(e).normalize().replace(/\r\n/g,` `).split(` -`).map(n=>Yw(n,t,r)).join(` -`);});var Bl=B((tC,Rl)=>{var Ww={right:Gw,center:Jw},Uw=0,Yi=1,zw=2,Wi=3,Go=class{constructor(t){var r;this.width=t.width,this.wrap=(r=t.wrap)!==null&&r!==void 0?r:!0,this.rows=[];}span(...t){let r=this.div(...t);r.span=!0;}resetOutput(){this.rows=[];}div(...t){if(t.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...t)&&typeof t[0]=="string")return this.applyLayoutDSL(t[0]);let r=t.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...t){return t.length===1&&typeof t[0]=="string"&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){let r=t.split(` +`).map(n=>Yv(n,t,r)).join(` +`);});var Bl=B((eC,Rl)=>{var Wv={right:Gv,center:Jv},Uv=0,qi=1,zv=2,Yi=3,Go=class{constructor(t){var r;this.width=t.width,this.wrap=(r=t.wrap)!==null&&r!==void 0?r:!0,this.rows=[];}span(...t){let r=this.div(...t);r.span=!0;}resetOutput(){this.rows=[];}div(...t){if(t.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...t)&&typeof t[0]=="string")return this.applyLayoutDSL(t[0]);let r=t.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...t){return t.length===1&&typeof t[0]=="string"&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){let r=t.split(` `).map(s=>s.split(" ")),n=0;return r.forEach(s=>{s.length>1&&tt.stringWidth(s[0])>n&&(n=Math.min(Math.floor(this.width*.5),tt.stringWidth(s[0])));}),r.forEach(s=>{this.div(...s.map((o,u)=>({text:o.trim(),padding:this.measurePadding(o),width:u===0&&s.length>1?n:void 0})));}),this.rows[this.rows.length-1]}colFromString(t){return {text:t,padding:this.measurePadding(t)}}measurePadding(t){let r=tt.stripAnsi(t);return [0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){let t=[];return this.rows.forEach(r=>{this.rowToString(r,t);}),t.filter(r=>!r.hidden).map(r=>r.text).join(` -`)}rowToString(t,r){return this.rasterize(t).forEach((n,s)=>{let o="";n.forEach((u,c)=>{let{width:d}=t[c],g=this.negatePadding(t[c]),m=u;if(g>tt.stringWidth(u)&&(m+=" ".repeat(g-tt.stringWidth(u))),t[c].align&&t[c].align!=="left"&&this.wrap){let y=Ww[t[c].align];m=y(m,g),tt.stringWidth(m)0&&(o=this.renderInline(o,r[r.length-1]));}),r.push({text:o.replace(/ +$/,""),span:t.span});}),r}renderInline(t,r){let n=t.match(/^ */),s=n?n[0].length:0,o=r.text,u=tt.stringWidth(o.trimRight());return r.span?this.wrap?s{o.width=n[u],this.wrap?s=tt.wrap(o.text,this.negatePadding(o),{hard:!0}).split(` +`)}rowToString(t,r){return this.rasterize(t).forEach((n,s)=>{let o="";n.forEach((u,c)=>{let{width:d}=t[c],g=this.negatePadding(t[c]),m=u;if(g>tt.stringWidth(u)&&(m+=" ".repeat(g-tt.stringWidth(u))),t[c].align&&t[c].align!=="left"&&this.wrap){let y=Wv[t[c].align];m=y(m,g),tt.stringWidth(m)0&&(o=this.renderInline(o,r[r.length-1]));}),r.push({text:o.replace(/ +$/,""),span:t.span});}),r}renderInline(t,r){let n=t.match(/^ */),s=n?n[0].length:0,o=r.text,u=tt.stringWidth(o.trimRight());return r.span?this.wrap?s{o.width=n[u],this.wrap?s=tt.wrap(o.text,this.negatePadding(o),{hard:!0}).split(` `):s=o.text.split(` -`),o.border&&(s.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),s.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(s.unshift(...new Array(o.padding[Uw]||0).fill("")),s.push(...new Array(o.padding[zw]||0).fill(""))),s.forEach((c,d)=>{r[d]||r.push([]);let g=r[d];for(let m=0;mu.width||tt.stringWidth(u.text));let r=t.length,n=this.width,s=t.map(u=>{if(u.width)return r--,n-=u.width,u.width}),o=r?Math.floor(n/r):0;return s.map((u,c)=>u===void 0?Math.max(o,Hw(t[c])):u)}};function Pl(e,t,r){return e.border?/[.']-+[.']/.test(t)?"":t.trim().length!==0?r:" ":""}function Hw(e){let t=e.padding||[],r=1+(t[Wi]||0)+(t[Yi]||0);return e.border?r+4:r}function Vw(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Gw(e,t){e=e.trim();let r=tt.stringWidth(e);return r=t?e:" ".repeat(t-r>>1)+e}var tt;function Zw(e,t){return tt=t,new Go({width:e?.width||Vw(),wrap:e?.wrap})}var Kw=Pi(),Qw=ki(),Xw=kl();function ev(e){return Zw(e,{stringWidth:Kw,stripAnsi:Qw,wrap:Xw})}Rl.exports=ev;});var Ul=B((rC,Wl)=>{var{dirname:ql,resolve:Yl}=U("path"),{readdirSync:tv,statSync:rv}=U("fs");Wl.exports=function(e,t){let r=Yl(".",e),n;for(rv(r).isDirectory()||(r=ql(r));;){if(n=t(r,tv(r)),n)return Yl(r,n);if(r=ql(n=r),n===r)break}};});var Hl=B((nC,zl)=>{zl.exports=function(t){if(t===void 0&&(t=2),t>=Error.stackTraceLimit)throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+t+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");var r=Error.prepareStackTrace;Error.prepareStackTrace=function(s,o){return o};var n=new Error().stack;if(Error.prepareStackTrace=r,n!==null&&typeof n=="object")return n[t]?n[t].getFileName():void 0};});var Zl=B((iC,Zo)=>{var Vl=U("fs"),nv=U("path").join,iv=U("path").resolve,Gl=U("path").dirname,Jo={extensions:["js","json","coffee"],recurse:!0,rename:function(e){return e},visit:function(e){return e}};function sv(e,t,r){return new RegExp("\\.("+r.extensions.join("|")+")$","i").test(t)&&!(r.include&&r.include instanceof RegExp&&!r.include.test(e))&&!(r.include&&typeof r.include=="function"&&!r.include(e,t))&&!(r.exclude&&r.exclude instanceof RegExp&&r.exclude.test(e))&&!(r.exclude&&typeof r.exclude=="function"&&r.exclude(e,t))}function Jl(e,t,r){var n={};t&&!r&&typeof t!="string"&&(r=t,t=null),r=r||{};for(var s in Jo)typeof r[s]>"u"&&(r[s]=Jo[s]);return t=t?iv(Gl(e.filename),t):Gl(e.filename),Vl.readdirSync(t).forEach(function(o){var u=nv(t,o),c,d,g;Vl.statSync(u).isDirectory()&&r.recurse?(c=Jl(e,u,r),Object.keys(c).length&&(n[r.rename(o,u,o)]=c)):u!==e.filename&&sv(u,o,r)&&(d=o.substring(0,o.lastIndexOf(".")),g=e.require(u),n[r.rename(d,u,o)]=r.visit(g,u,o)||g);}),n}Zo.exports=Jl;Zo.exports.defaults=Jo;});var pf=B((sC,hf)=>{var Kl=U("assert"),nt=class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace(this,e);}},Xo=[],An;function Hi(e,t,r,n){An=n;let s={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if(typeof e.extends!="string")return s;let o=/\.json|\..*rc$/.test(e.extends),u=null;if(o)u=av(t,e.extends);else try{u=U.resolve(e.extends);}catch{return e}ov(u),Xo.push(u),s=o?JSON.parse(An.readFileSync(u,"utf8")):U(e.extends),delete e.extends,s=Hi(s,An.path.dirname(u),r,An);}return Xo=[],r?af(s,e):Object.assign({},s,e)}function ov(e){if(Xo.indexOf(e)>-1)throw new nt(`Circular extended configurations: '${e}'.`)}function av(e,t){return An.path.resolve(e,t)}function af(e,t){let r={};function n(s){return s&&typeof s=="object"&&!Array.isArray(s)}Object.assign(r,e);for(let s of Object.keys(t))n(t[s])&&n(r[s])?r[s]=af(e[s],t[s]):r[s]=t[s];return r}function Hr(e){let r=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,s=r.shift();if(!s)throw new Error(`No command found in: ${e}`);let o={cmd:s.replace(n,""),demanded:[],optional:[]};return r.forEach((u,c)=>{let d=!1;u=u.replace(/\s/g,""),/\.+[\]>]/.test(u)&&c===r.length-1&&(d=!0),/^\[/.test(u)?o.optional.push({cmd:u.replace(n,"").split("|"),variadic:d}):o.demanded.push({cmd:u.replace(n,"").split("|"),variadic:d});}),o}var uv=["first","second","third","fourth","fifth","sixth"];function oe(e,t,r){function n(){return typeof e=="object"?[{demanded:[],optional:[]},e,t]:[Hr(`cmd ${e}`),t,r]}try{let s=0,[o,u,c]=n(),d=[].slice.call(u);for(;d.length&&d[d.length-1]===void 0;)d.pop();let g=c||d.length;if(gm)throw new nt(`Too many arguments provided. Expected max ${m} but received ${g}.`);o.demanded.forEach(D=>{let y=d.shift(),F=Ql(y);D.cmd.filter(_=>_===F||_==="*").length===0&&Xl(F,D.cmd,s),s+=1;}),o.optional.forEach(D=>{if(d.length===0)return;let y=d.shift(),F=Ql(y);D.cmd.filter(_=>_===F||_==="*").length===0&&Xl(F,D.cmd,s),s+=1;});}catch(s){console.warn(s.stack);}}function Ql(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function Xl(e,t,r){throw new nt(`Invalid ${uv[r]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}function Ut(e){return !!e&&!!e.then&&typeof e.then=="function"}function rt(e,t,r,n){r.assert.notStrictEqual(e,t,n);}function ef(e,t){t.assert.strictEqual(typeof e,"string");}function zi(e){return Object.keys(e)}function Vr(e={},t=()=>!0){let r={};return zi(e).forEach(n=>{t(n,e[n])&&(r[n]=e[n]);}),r}function uf(e,t){return function(r,n=!1){if(oe(" [boolean]",[r,n],arguments.length),Array.isArray(r)){for(let s=0;s(t.applyBeforeValidation=!1,t)):[]}function tf(e,t,r,n){let s=new Error("middleware cannot return a promise when applyBeforeValidation is true");return r.reduce((o,u)=>{if(u.applyBeforeValidation!==n)return o;if(Ut(o))return o.then(c=>Promise.all([c,u(c,t)])).then(([c,d])=>Object.assign(c,d));{let c=u(o,t);if(n&&Ut(c))throw s;return Ut(c)?c.then(d=>Object.assign(o,d)):Object.assign(o,c)}},e)}function cf(){return lv()?0:1}function lv(){return fv()&&!process.defaultApp}function fv(){return !!process.versions.electron}function dv(e){return e.slice(cf()+1)}function lf(){return process.argv[cf()]}var hv=Object.freeze({__proto__:null,hideBin:dv,getProcessArgvBin:lf});function pv(e){if(typeof U>"u")return null;for(let t=0,r=Object.keys(U.cache),n;t{}),Array.isArray(w))if(gv(w))[w,...L]=w;else for(let Z of w)o.addHandler(Z);else if(yv(w)){let Z=Array.isArray(w.command)||typeof w.command=="string"?w.command:g(w);w.aliases&&(Z=[].concat(Z).concat(w.aliases)),o.addHandler(Z,D(w),w.builder,w.handler,w.middlewares,w.deprecated);return}else if(rf(P)){o.addHandler([w].concat(L),M,P.builder,P.handler,P.middlewares,P.deprecated);return}if(typeof w=="string"){let Z=Hr(w);L=L.map(V=>Hr(V).cmd);let q=!1,Y=[Z.cmd].concat(L).filter(V=>zr.test(V)?(q=!0,!1):!0);Y.length===0&&q&&Y.push("$0"),q&&(Z.cmd=Y[0],L=Y.slice(1),w=w.replace(zr,Z.cmd)),L.forEach(V=>{c[V]=Z.cmd;}),M!==!1&&t.command(w,M,q,L,te),u[Z.cmd]={original:w,description:M,handler:J,builder:P||{},middlewares:ee,deprecated:te,demanded:Z.demanded,optional:Z.optional},q&&(d=u[Z.cmd]);}},o.addDirectory=function(w,M,P,J,X){X=X||{},typeof X.recurse!="boolean"&&(X.recurse=!1),Array.isArray(X.extensions)||(X.extensions=["js"]);let te=typeof X.visit=="function"?X.visit:L=>L;X.visit=function(ee,Z,q){let Y=te(ee,Z,q);if(Y){if(~M.files.indexOf(Z))return Y;M.files.push(Z),o.addHandler(Y);}return Y},s.requireDirectory({require:P,filename:J},w,X);};function g(x){let w=pv(x);if(!w)throw new Error(`No command name given for module: ${s.inspect(x)}`);return m(w.filename)}function m(x){return s.path.basename(x,s.path.extname(x))}function D({describe:x,description:w,desc:M}){for(let P of [x,w,M]){if(typeof P=="string"||P===!1)return P;rt(P,!0,s);}return !1}o.getCommands=()=>Object.keys(u).concat(Object.keys(c)),o.getCommandHandlers=()=>u,o.hasDefaultCommand=()=>!!d,o.runCommand=function(w,M,P,J){let X=P.aliases,te=u[w]||u[c[w]]||d,L=M.getContext(),ee=L.files.length,Z=L.commands.slice(),q=P.argv,Y={};w&&(L.commands.push(w),L.fullCommands.push(te.original));let V=te.builder;if(ea(V)){let W=V(M.reset(P.aliases)),k=Av(W)?W:M;y(k)&&k.getUsageInstance().usage(F(Z,te),te.description),q=k._parseArgs(null,null,!0,J),X=k.parsed.aliases;}else if(Dv(V)){let W=M.reset(P.aliases);y(W)&&W.getUsageInstance().usage(F(Z,te),te.description),Object.keys(te.builder).forEach(k=>{W.option(k,V[k]);}),q=W._parseArgs(null,null,!0,J),X=W.parsed.aliases;}M._hasOutput()||(Y=C(te,q,L));let I=n.slice(0).concat(te.middlewares);if(tf(q,M,I,!0),M._hasOutput()||M._runValidation(q,X,Y,M.parsed.error,!w),te.handler&&!M._hasOutput()){M._setHasOutput();let W=!!M.getOptions().configuration["populate--"];M._postProcess(q,W),q=tf(q,M,I,!1);let k;Ut(q)?k=q.then(K=>te.handler(K)):k=te.handler(q);let G=M.getHandlerFinishCommand();Ut(k)?(M.getUsageInstance().cacheHelpMessage(),k.then(K=>{G&&G(K);}).catch(K=>{try{M.getUsageInstance().fail(null,K);}catch{}}).then(()=>{M.getUsageInstance().clearCachedHelpMessage();})):G&&G(k);}return w&&(L.commands.pop(),L.fullCommands.pop()),ee=L.files.length-ee,ee>0&&L.files.splice(ee*-1,ee),q};function y(x){return !x.getUsageInstance().getUsageDisabled()&&x.getUsageInstance().getUsage().length===0}function F(x,w){let M=zr.test(w.original)?w.original.replace(zr,"").trim():w.original,P=x.filter(J=>!zr.test(J));return P.push(M),`$0 ${P.join(" ")}`}o.runDefaultBuilderOn=function(x){if(rt(d,void 0,s),y(x)){let M=zr.test(d.original)?d.original:d.original.replace(/^[^[\]<>]*/,"$0 ");x.getUsageInstance().usage(M,d.description);}let w=d.builder;ea(w)?w(x):rf(w)||Object.keys(w).forEach(M=>{x.option(M,w[M]);});};function C(x,w,M){w._=w._.slice(M.commands.length);let P=x.demanded.slice(0),J=x.optional.slice(0),X={};for(r.positionalCount(P.length,w._.length);P.length;){let te=P.shift();_(te,w,X);}for(;J.length;){let te=J.shift();_(te,w,X);}return w._=M.commands.concat(w._.map(te=>""+te)),j(w,X,o.cmdToParseOptions(x.original)),X}function _(x,w,M){let P=x.cmd[0];x.variadic?M[P]=w._.splice(0).map(String):w._.length&&(M[P]=[String(w._.shift())]);}function j(x,w,M){let P=Object.assign({},e.getOptions());P.default=Object.assign(M.default,P.default);for(let L of Object.keys(M.alias))P.alias[L]=(P.alias[L]||[]).concat(M.alias[L]);P.array=P.array.concat(M.array),P.config={};let J=[];if(Object.keys(w).forEach(L=>{w[L].map(ee=>{P.configuration["unknown-options-as-args"]&&(P.key[L]=!0),J.push(`--${L}`),J.push(ee);});}),!J.length)return;let X=Object.assign({},P.configuration,{"populate--":!0}),te=s.Parser.detailed(J,Object.assign({},P,{configuration:X}));if(te.error)e.getUsageInstance().fail(te.error.message,te.error);else {let L=Object.keys(w);Object.keys(w).forEach(ee=>{L.push(...te.aliases[ee]);}),Object.keys(te.argv).forEach(ee=>{L.indexOf(ee)!==-1&&(w[ee]||(w[ee]=te.argv[ee]),x[ee]=te.argv[ee]);});}}o.cmdToParseOptions=function(x){let w={array:[],default:{},alias:{},demand:{}},M=Hr(x);return M.demanded.forEach(P=>{let[J,...X]=P.cmd;P.variadic&&(w.array.push(J),w.default[J]=[]),w.alias[J]=X,w.demand[J]=!0;}),M.optional.forEach(P=>{let[J,...X]=P.cmd;P.variadic&&(w.array.push(J),w.default[J]=[]),w.alias[J]=X;}),w},o.reset=()=>(u={},c={},d=void 0,o);let $=[];return o.freeze=()=>{$.push({handlers:u,aliasMap:c,defaultCommand:d});},o.unfreeze=()=>{let x=$.pop();rt(x,void 0,s),{handlers:u,aliasMap:c,defaultCommand:d}=x;},o}function rf(e){return typeof e=="object"&&!!e.builder&&typeof e.handler=="function"}function gv(e){return !!e.every(t=>typeof t=="string")}function ea(e){return typeof e=="function"}function Dv(e){return typeof e=="object"}function yv(e){return typeof e=="object"&&!Array.isArray(e)}function Mn(e){typeof process>"u"||[process.stdout,process.stderr].forEach(t=>{let r=t;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(e);});}function wv(e,t,r){let n=t.__,s={},o=[];s.failFn=function(Y){o.push(Y);};let u=null,c=!0;s.showHelpOnFail=function(Y=!0,V){function I(){return typeof Y=="string"?[!0,Y]:[Y,V]}let[W,k]=I();return u=k,c=W,s};let d=!1;s.fail=function(Y,V){let I=e._getLoggerInstance();if(o.length)for(let W=o.length-1;W>=0;--W)o[W](Y,V,s);else {if(e.getExitProcess()&&Mn(!0),d||(d=!0,c&&(e.showHelp("error"),I.error()),(Y||V)&&I.error(Y||V),u&&((Y||V)&&I.error(""),I.error(u))),V=V||new nt(Y),e.getExitProcess())return e.exit(1);if(e._hasParseCallback())return e.exit(1,V);throw V}};let g=[],m=!1;s.usage=(q,Y)=>q===null?(m=!0,g=[],s):(m=!1,g.push([q,Y||""]),s),s.getUsage=()=>g,s.getUsageDisabled=()=>m,s.getPositionalGroupName=()=>n("Positionals:");let D=[];s.example=(q,Y)=>{D.push([q,Y||""]);};let y=[];s.command=function(Y,V,I,W,k=!1){I&&(y=y.map(G=>(G[2]=!1,G))),y.push([Y,V||"",I,W,k]);},s.getCommands=()=>y;let F={};s.describe=function(Y,V){Array.isArray(Y)?Y.forEach(I=>{s.describe(I,V);}):typeof Y=="object"?Object.keys(Y).forEach(I=>{s.describe(I,Y[I]);}):F[Y]=V;},s.getDescriptions=()=>F;let C=[];s.epilog=q=>{C.push(q);};let _=!1,j;s.wrap=q=>{_=!0,j=q;};function $(){return _||(j=L(),_=!0),j}let x="__yargsString__:";s.deferY18nLookup=q=>x+q,s.help=function(){if(P)return P;M();let Y=e.customScriptName?e.$0:r.path.basename(e.$0),V=e.getDemandedOptions(),I=e.getDemandedCommands(),W=e.getDeprecatedOptions(),k=e.getGroups(),G=e.getOptions(),K=[];K=K.concat(Object.keys(F)),K=K.concat(Object.keys(V)),K=K.concat(Object.keys(I)),K=K.concat(Object.keys(G.default)),K=K.filter(X),K=Object.keys(K.reduce((ie,we)=>(we!=="_"&&(ie[we]=!0),ie),{}));let ye=$(),de=r.cliui({width:ye,wrap:!!ye});if(!m){if(g.length)g.forEach(ie=>{de.div(`${ie[0].replace(/\$0/g,Y)}`),ie[1]&&de.div({text:`${ie[1]}`,padding:[1,0,0,0]});}),de.div();else if(y.length){let ie=null;I._?ie=`${Y} <${n("command")}> +`),o.border&&(s.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),s.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(s.unshift(...new Array(o.padding[Uv]||0).fill("")),s.push(...new Array(o.padding[zv]||0).fill(""))),s.forEach((c,d)=>{r[d]||r.push([]);let g=r[d];for(let m=0;mu.width||tt.stringWidth(u.text));let r=t.length,n=this.width,s=t.map(u=>{if(u.width)return r--,n-=u.width,u.width}),o=r?Math.floor(n/r):0;return s.map((u,c)=>u===void 0?Math.max(o,Hv(t[c])):u)}};function Pl(e,t,r){return e.border?/[.']-+[.']/.test(t)?"":t.trim().length!==0?r:" ":""}function Hv(e){let t=e.padding||[],r=1+(t[Yi]||0)+(t[qi]||0);return e.border?r+4:r}function Vv(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Gv(e,t){e=e.trim();let r=tt.stringWidth(e);return r=t?e:" ".repeat(t-r>>1)+e}var tt;function Zv(e,t){return tt=t,new Go({width:e?.width||Vv(),wrap:e?.wrap})}var Kv=ki(),Qv=$i(),Xv=kl();function ew(e){return Zv(e,{stringWidth:Kv,stripAnsi:Qv,wrap:Xv})}Rl.exports=ew;});var Ul=B((tC,Wl)=>{var{dirname:ql,resolve:Yl}=U("path"),{readdirSync:tw,statSync:rw}=U("fs");Wl.exports=function(e,t){let r=Yl(".",e),n;for(rw(r).isDirectory()||(r=ql(r));;){if(n=t(r,tw(r)),n)return Yl(r,n);if(r=ql(n=r),n===r)break}};});var Hl=B((rC,zl)=>{zl.exports=function(t){if(t===void 0&&(t=2),t>=Error.stackTraceLimit)throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+t+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");var r=Error.prepareStackTrace;Error.prepareStackTrace=function(s,o){return o};var n=new Error().stack;if(Error.prepareStackTrace=r,n!==null&&typeof n=="object")return n[t]?n[t].getFileName():void 0};});var Zl=B((nC,Zo)=>{var Vl=U("fs"),nw=U("path").join,iw=U("path").resolve,Gl=U("path").dirname,Jo={extensions:["js","json","coffee"],recurse:!0,rename:function(e){return e},visit:function(e){return e}};function sw(e,t,r){return new RegExp("\\.("+r.extensions.join("|")+")$","i").test(t)&&!(r.include&&r.include instanceof RegExp&&!r.include.test(e))&&!(r.include&&typeof r.include=="function"&&!r.include(e,t))&&!(r.exclude&&r.exclude instanceof RegExp&&r.exclude.test(e))&&!(r.exclude&&typeof r.exclude=="function"&&r.exclude(e,t))}function Jl(e,t,r){var n={};t&&!r&&typeof t!="string"&&(r=t,t=null),r=r||{};for(var s in Jo)typeof r[s]>"u"&&(r[s]=Jo[s]);return t=t?iw(Gl(e.filename),t):Gl(e.filename),Vl.readdirSync(t).forEach(function(o){var u=nw(t,o),c,d,g;Vl.statSync(u).isDirectory()&&r.recurse?(c=Jl(e,u,r),Object.keys(c).length&&(n[r.rename(o,u,o)]=c)):u!==e.filename&&sw(u,o,r)&&(d=o.substring(0,o.lastIndexOf(".")),g=e.require(u),n[r.rename(d,u,o)]=r.visit(g,u,o)||g);}),n}Zo.exports=Jl;Zo.exports.defaults=Jo;});var pf=B((iC,hf)=>{var Kl=U("assert"),nt=class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace(this,e);}},Xo=[],An;function zi(e,t,r,n){An=n;let s={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if(typeof e.extends!="string")return s;let o=/\.json|\..*rc$/.test(e.extends),u=null;if(o)u=aw(t,e.extends);else try{u=U.resolve(e.extends);}catch{return e}ow(u),Xo.push(u),s=o?JSON.parse(An.readFileSync(u,"utf8")):U(e.extends),delete e.extends,s=zi(s,An.path.dirname(u),r,An);}return Xo=[],r?af(s,e):Object.assign({},s,e)}function ow(e){if(Xo.indexOf(e)>-1)throw new nt(`Circular extended configurations: '${e}'.`)}function aw(e,t){return An.path.resolve(e,t)}function af(e,t){let r={};function n(s){return s&&typeof s=="object"&&!Array.isArray(s)}Object.assign(r,e);for(let s of Object.keys(t))n(t[s])&&n(r[s])?r[s]=af(e[s],t[s]):r[s]=t[s];return r}function Hr(e){let r=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,s=r.shift();if(!s)throw new Error(`No command found in: ${e}`);let o={cmd:s.replace(n,""),demanded:[],optional:[]};return r.forEach((u,c)=>{let d=!1;u=u.replace(/\s/g,""),/\.+[\]>]/.test(u)&&c===r.length-1&&(d=!0),/^\[/.test(u)?o.optional.push({cmd:u.replace(n,"").split("|"),variadic:d}):o.demanded.push({cmd:u.replace(n,"").split("|"),variadic:d});}),o}var uw=["first","second","third","fourth","fifth","sixth"];function oe(e,t,r){function n(){return typeof e=="object"?[{demanded:[],optional:[]},e,t]:[Hr(`cmd ${e}`),t,r]}try{let s=0,[o,u,c]=n(),d=[].slice.call(u);for(;d.length&&d[d.length-1]===void 0;)d.pop();let g=c||d.length;if(gm)throw new nt(`Too many arguments provided. Expected max ${m} but received ${g}.`);o.demanded.forEach(D=>{let y=d.shift(),F=Ql(y);D.cmd.filter(_=>_===F||_==="*").length===0&&Xl(F,D.cmd,s),s+=1;}),o.optional.forEach(D=>{if(d.length===0)return;let y=d.shift(),F=Ql(y);D.cmd.filter(_=>_===F||_==="*").length===0&&Xl(F,D.cmd,s),s+=1;});}catch(s){console.warn(s.stack);}}function Ql(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function Xl(e,t,r){throw new nt(`Invalid ${uw[r]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}function Ut(e){return !!e&&!!e.then&&typeof e.then=="function"}function rt(e,t,r,n){r.assert.notStrictEqual(e,t,n);}function ef(e,t){t.assert.strictEqual(typeof e,"string");}function Ui(e){return Object.keys(e)}function Vr(e={},t=()=>!0){let r={};return Ui(e).forEach(n=>{t(n,e[n])&&(r[n]=e[n]);}),r}function uf(e,t){return function(r,n=!1){if(oe(" [boolean]",[r,n],arguments.length),Array.isArray(r)){for(let s=0;s(t.applyBeforeValidation=!1,t)):[]}function tf(e,t,r,n){let s=new Error("middleware cannot return a promise when applyBeforeValidation is true");return r.reduce((o,u)=>{if(u.applyBeforeValidation!==n)return o;if(Ut(o))return o.then(c=>Promise.all([c,u(c,t)])).then(([c,d])=>Object.assign(c,d));{let c=u(o,t);if(n&&Ut(c))throw s;return Ut(c)?c.then(d=>Object.assign(o,d)):Object.assign(o,c)}},e)}function cf(){return lw()?0:1}function lw(){return fw()&&!process.defaultApp}function fw(){return !!process.versions.electron}function dw(e){return e.slice(cf()+1)}function lf(){return process.argv[cf()]}var hw=Object.freeze({__proto__:null,hideBin:dw,getProcessArgvBin:lf});function pw(e){if(typeof U>"u")return null;for(let t=0,r=Object.keys(U.cache),n;t{}),Array.isArray(v))if(gw(v))[v,...L]=v;else for(let Z of v)o.addHandler(Z);else if(yw(v)){let Z=Array.isArray(v.command)||typeof v.command=="string"?v.command:g(v);v.aliases&&(Z=[].concat(Z).concat(v.aliases)),o.addHandler(Z,D(v),v.builder,v.handler,v.middlewares,v.deprecated);return}else if(rf(P)){o.addHandler([v].concat(L),M,P.builder,P.handler,P.middlewares,P.deprecated);return}if(typeof v=="string"){let Z=Hr(v);L=L.map(V=>Hr(V).cmd);let q=!1,Y=[Z.cmd].concat(L).filter(V=>zr.test(V)?(q=!0,!1):!0);Y.length===0&&q&&Y.push("$0"),q&&(Z.cmd=Y[0],L=Y.slice(1),v=v.replace(zr,Z.cmd)),L.forEach(V=>{c[V]=Z.cmd;}),M!==!1&&t.command(v,M,q,L,te),u[Z.cmd]={original:v,description:M,handler:J,builder:P||{},middlewares:ee,deprecated:te,demanded:Z.demanded,optional:Z.optional},q&&(d=u[Z.cmd]);}},o.addDirectory=function(v,M,P,J,X){X=X||{},typeof X.recurse!="boolean"&&(X.recurse=!1),Array.isArray(X.extensions)||(X.extensions=["js"]);let te=typeof X.visit=="function"?X.visit:L=>L;X.visit=function(ee,Z,q){let Y=te(ee,Z,q);if(Y){if(~M.files.indexOf(Z))return Y;M.files.push(Z),o.addHandler(Y);}return Y},s.requireDirectory({require:P,filename:J},v,X);};function g(x){let v=pw(x);if(!v)throw new Error(`No command name given for module: ${s.inspect(x)}`);return m(v.filename)}function m(x){return s.path.basename(x,s.path.extname(x))}function D({describe:x,description:v,desc:M}){for(let P of [x,v,M]){if(typeof P=="string"||P===!1)return P;rt(P,!0,s);}return !1}o.getCommands=()=>Object.keys(u).concat(Object.keys(c)),o.getCommandHandlers=()=>u,o.hasDefaultCommand=()=>!!d,o.runCommand=function(v,M,P,J){let X=P.aliases,te=u[v]||u[c[v]]||d,L=M.getContext(),ee=L.files.length,Z=L.commands.slice(),q=P.argv,Y={};v&&(L.commands.push(v),L.fullCommands.push(te.original));let V=te.builder;if(ea(V)){let W=V(M.reset(P.aliases)),k=Aw(W)?W:M;y(k)&&k.getUsageInstance().usage(F(Z,te),te.description),q=k._parseArgs(null,null,!0,J),X=k.parsed.aliases;}else if(Dw(V)){let W=M.reset(P.aliases);y(W)&&W.getUsageInstance().usage(F(Z,te),te.description),Object.keys(te.builder).forEach(k=>{W.option(k,V[k]);}),q=W._parseArgs(null,null,!0,J),X=W.parsed.aliases;}M._hasOutput()||(Y=C(te,q,L));let I=n.slice(0).concat(te.middlewares);if(tf(q,M,I,!0),M._hasOutput()||M._runValidation(q,X,Y,M.parsed.error,!v),te.handler&&!M._hasOutput()){M._setHasOutput();let W=!!M.getOptions().configuration["populate--"];M._postProcess(q,W),q=tf(q,M,I,!1);let k;Ut(q)?k=q.then(K=>te.handler(K)):k=te.handler(q);let G=M.getHandlerFinishCommand();Ut(k)?(M.getUsageInstance().cacheHelpMessage(),k.then(K=>{G&&G(K);}).catch(K=>{try{M.getUsageInstance().fail(null,K);}catch{}}).then(()=>{M.getUsageInstance().clearCachedHelpMessage();})):G&&G(k);}return v&&(L.commands.pop(),L.fullCommands.pop()),ee=L.files.length-ee,ee>0&&L.files.splice(ee*-1,ee),q};function y(x){return !x.getUsageInstance().getUsageDisabled()&&x.getUsageInstance().getUsage().length===0}function F(x,v){let M=zr.test(v.original)?v.original.replace(zr,"").trim():v.original,P=x.filter(J=>!zr.test(J));return P.push(M),`$0 ${P.join(" ")}`}o.runDefaultBuilderOn=function(x){if(rt(d,void 0,s),y(x)){let M=zr.test(d.original)?d.original:d.original.replace(/^[^[\]<>]*/,"$0 ");x.getUsageInstance().usage(M,d.description);}let v=d.builder;ea(v)?v(x):rf(v)||Object.keys(v).forEach(M=>{x.option(M,v[M]);});};function C(x,v,M){v._=v._.slice(M.commands.length);let P=x.demanded.slice(0),J=x.optional.slice(0),X={};for(r.positionalCount(P.length,v._.length);P.length;){let te=P.shift();_(te,v,X);}for(;J.length;){let te=J.shift();_(te,v,X);}return v._=M.commands.concat(v._.map(te=>""+te)),j(v,X,o.cmdToParseOptions(x.original)),X}function _(x,v,M){let P=x.cmd[0];x.variadic?M[P]=v._.splice(0).map(String):v._.length&&(M[P]=[String(v._.shift())]);}function j(x,v,M){let P=Object.assign({},e.getOptions());P.default=Object.assign(M.default,P.default);for(let L of Object.keys(M.alias))P.alias[L]=(P.alias[L]||[]).concat(M.alias[L]);P.array=P.array.concat(M.array),P.config={};let J=[];if(Object.keys(v).forEach(L=>{v[L].map(ee=>{P.configuration["unknown-options-as-args"]&&(P.key[L]=!0),J.push(`--${L}`),J.push(ee);});}),!J.length)return;let X=Object.assign({},P.configuration,{"populate--":!0}),te=s.Parser.detailed(J,Object.assign({},P,{configuration:X}));if(te.error)e.getUsageInstance().fail(te.error.message,te.error);else {let L=Object.keys(v);Object.keys(v).forEach(ee=>{L.push(...te.aliases[ee]);}),Object.keys(te.argv).forEach(ee=>{L.indexOf(ee)!==-1&&(v[ee]||(v[ee]=te.argv[ee]),x[ee]=te.argv[ee]);});}}o.cmdToParseOptions=function(x){let v={array:[],default:{},alias:{},demand:{}},M=Hr(x);return M.demanded.forEach(P=>{let[J,...X]=P.cmd;P.variadic&&(v.array.push(J),v.default[J]=[]),v.alias[J]=X,v.demand[J]=!0;}),M.optional.forEach(P=>{let[J,...X]=P.cmd;P.variadic&&(v.array.push(J),v.default[J]=[]),v.alias[J]=X;}),v},o.reset=()=>(u={},c={},d=void 0,o);let $=[];return o.freeze=()=>{$.push({handlers:u,aliasMap:c,defaultCommand:d});},o.unfreeze=()=>{let x=$.pop();rt(x,void 0,s),{handlers:u,aliasMap:c,defaultCommand:d}=x;},o}function rf(e){return typeof e=="object"&&!!e.builder&&typeof e.handler=="function"}function gw(e){return !!e.every(t=>typeof t=="string")}function ea(e){return typeof e=="function"}function Dw(e){return typeof e=="object"}function yw(e){return typeof e=="object"&&!Array.isArray(e)}function Mn(e){typeof process>"u"||[process.stdout,process.stderr].forEach(t=>{let r=t;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(e);});}function vw(e,t,r){let n=t.__,s={},o=[];s.failFn=function(Y){o.push(Y);};let u=null,c=!0;s.showHelpOnFail=function(Y=!0,V){function I(){return typeof Y=="string"?[!0,Y]:[Y,V]}let[W,k]=I();return u=k,c=W,s};let d=!1;s.fail=function(Y,V){let I=e._getLoggerInstance();if(o.length)for(let W=o.length-1;W>=0;--W)o[W](Y,V,s);else {if(e.getExitProcess()&&Mn(!0),d||(d=!0,c&&(e.showHelp("error"),I.error()),(Y||V)&&I.error(Y||V),u&&((Y||V)&&I.error(""),I.error(u))),V=V||new nt(Y),e.getExitProcess())return e.exit(1);if(e._hasParseCallback())return e.exit(1,V);throw V}};let g=[],m=!1;s.usage=(q,Y)=>q===null?(m=!0,g=[],s):(m=!1,g.push([q,Y||""]),s),s.getUsage=()=>g,s.getUsageDisabled=()=>m,s.getPositionalGroupName=()=>n("Positionals:");let D=[];s.example=(q,Y)=>{D.push([q,Y||""]);};let y=[];s.command=function(Y,V,I,W,k=!1){I&&(y=y.map(G=>(G[2]=!1,G))),y.push([Y,V||"",I,W,k]);},s.getCommands=()=>y;let F={};s.describe=function(Y,V){Array.isArray(Y)?Y.forEach(I=>{s.describe(I,V);}):typeof Y=="object"?Object.keys(Y).forEach(I=>{s.describe(I,Y[I]);}):F[Y]=V;},s.getDescriptions=()=>F;let C=[];s.epilog=q=>{C.push(q);};let _=!1,j;s.wrap=q=>{_=!0,j=q;};function $(){return _||(j=L(),_=!0),j}let x="__yargsString__:";s.deferY18nLookup=q=>x+q,s.help=function(){if(P)return P;M();let Y=e.customScriptName?e.$0:r.path.basename(e.$0),V=e.getDemandedOptions(),I=e.getDemandedCommands(),W=e.getDeprecatedOptions(),k=e.getGroups(),G=e.getOptions(),K=[];K=K.concat(Object.keys(F)),K=K.concat(Object.keys(V)),K=K.concat(Object.keys(I)),K=K.concat(Object.keys(G.default)),K=K.filter(X),K=Object.keys(K.reduce((ie,ve)=>(ve!=="_"&&(ie[ve]=!0),ie),{}));let ye=$(),de=r.cliui({width:ye,wrap:!!ye});if(!m){if(g.length)g.forEach(ie=>{de.div(`${ie[0].replace(/\$0/g,Y)}`),ie[1]&&de.div({text:`${ie[1]}`,padding:[1,0,0,0]});}),de.div();else if(y.length){let ie=null;I._?ie=`${Y} <${n("command")}> `:ie=`${Y} [${n("command")}] -`,de.div(`${ie}`);}}if(y.length){de.div(n("Commands:"));let ie=e.getContext(),we=ie.commands.length?`${ie.commands.join(" ")} `:"";e.getParserConfiguration()["sort-commands"]===!0&&(y=y.sort((le,ve)=>le[0].localeCompare(ve[0]))),y.forEach(le=>{let ve=`${Y} ${we}${le[0].replace(/^\$0 ?/,"")}`;de.span({text:ve,padding:[0,2,0,2],width:w(y,ye,`${Y}${we}`)+4},{text:le[1]});let Ce=[];le[2]&&Ce.push(`[${n("default")}]`),le[3]&&le[3].length&&Ce.push(`[${n("aliases:")} ${le[3].join(", ")}]`),le[4]&&(typeof le[4]=="string"?Ce.push(`[${n("deprecated: %s",le[4])}]`):Ce.push(`[${n("deprecated")}]`)),Ce.length?de.div({text:Ce.join(" "),padding:[0,0,0,2],align:"right"}):de.div();}),de.div();}let Ye=(Object.keys(G.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);K=K.filter(ie=>!e.parsed.newAliases[ie]&&Ye.every(we=>(G.alias[we]||[]).indexOf(ie)===-1));let R=n("Options:");k[R]||(k[R]=[]),J(K,G.alias,k,R);let Ke=ie=>/^--/.test(Ui(ie)),Ne=Object.keys(k).filter(ie=>k[ie].length>0).map(ie=>{let we=k[ie].filter(X).map(le=>{if(~Ye.indexOf(le))return le;for(let ve=0,Ce;(Ce=Ye[ve])!==void 0;ve++)if(~(G.alias[Ce]||[]).indexOf(le))return Ce;return le});return {groupName:ie,normalizedKeys:we}}).filter(({normalizedKeys:ie})=>ie.length>0).map(({groupName:ie,normalizedKeys:we})=>{let le=we.reduce((ve,Ce)=>(ve[Ce]=[Ce].concat(G.alias[Ce]||[]).map(E=>ie===s.getPositionalGroupName()?E:(/^[0-9]$/.test(E)?~G.boolean.indexOf(Ce)?"-":"--":E.length>1?"--":"-")+E).sort((E,S)=>Ke(E)===Ke(S)?0:Ke(E)?1:-1).join(", "),ve),{});return {groupName:ie,normalizedKeys:we,switches:le}});if(Ne.filter(({groupName:ie})=>ie!==s.getPositionalGroupName()).some(({normalizedKeys:ie,switches:we})=>!ie.every(le=>Ke(we[le])))&&Ne.filter(({groupName:ie})=>ie!==s.getPositionalGroupName()).forEach(({normalizedKeys:ie,switches:we})=>{ie.forEach(le=>{Ke(we[le])&&(we[le]=vv(we[le],4));});}),Ne.forEach(({groupName:ie,normalizedKeys:we,switches:le})=>{de.div(ie),we.forEach(ve=>{let Ce=le[ve],E=F[ve]||"",S=null;~E.lastIndexOf(x)&&(E=n(E.substring(x.length))),~G.boolean.indexOf(ve)&&(S=`[${n("boolean")}]`),~G.count.indexOf(ve)&&(S=`[${n("count")}]`),~G.string.indexOf(ve)&&(S=`[${n("string")}]`),~G.normalize.indexOf(ve)&&(S=`[${n("string")}]`),~G.array.indexOf(ve)&&(S=`[${n("array")}]`),~G.number.indexOf(ve)&&(S=`[${n("number")}]`);let h=T=>typeof T=="string"?`[${n("deprecated: %s",T)}]`:`[${n("deprecated")}]`,v=[ve in W?h(W[ve]):null,S,ve in V?`[${n("required")}]`:null,G.choices&&G.choices[ve]?`[${n("choices:")} ${s.stringifiedValues(G.choices[ve])}]`:null,te(G.default[ve],G.defaultDescription[ve])].filter(Boolean).join(" ");de.span({text:Ui(Ce),padding:[0,2,0,2+nf(Ce)],width:w(le,ye)+4},E),v?de.div({text:v,padding:[0,0,0,2],align:"right"}):de.div();}),de.div();}),D.length&&(de.div(n("Examples:")),D.forEach(ie=>{ie[0]=ie[0].replace(/\$0/g,Y);}),D.forEach(ie=>{ie[1]===""?de.div({text:ie[0],padding:[0,2,0,2]}):de.div({text:ie[0],padding:[0,2,0,2],width:w(D,ye)+4},{text:ie[1]});}),de.div()),C.length>0){let ie=C.map(we=>we.replace(/\$0/g,Y)).join(` +`,de.div(`${ie}`);}}if(y.length){de.div(n("Commands:"));let ie=e.getContext(),ve=ie.commands.length?`${ie.commands.join(" ")} `:"";e.getParserConfiguration()["sort-commands"]===!0&&(y=y.sort((le,we)=>le[0].localeCompare(we[0]))),y.forEach(le=>{let we=`${Y} ${ve}${le[0].replace(/^\$0 ?/,"")}`;de.span({text:we,padding:[0,2,0,2],width:v(y,ye,`${Y}${ve}`)+4},{text:le[1]});let Ce=[];le[2]&&Ce.push(`[${n("default")}]`),le[3]&&le[3].length&&Ce.push(`[${n("aliases:")} ${le[3].join(", ")}]`),le[4]&&(typeof le[4]=="string"?Ce.push(`[${n("deprecated: %s",le[4])}]`):Ce.push(`[${n("deprecated")}]`)),Ce.length?de.div({text:Ce.join(" "),padding:[0,0,0,2],align:"right"}):de.div();}),de.div();}let Ye=(Object.keys(G.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);K=K.filter(ie=>!e.parsed.newAliases[ie]&&Ye.every(ve=>(G.alias[ve]||[]).indexOf(ie)===-1));let R=n("Options:");k[R]||(k[R]=[]),J(K,G.alias,k,R);let Ke=ie=>/^--/.test(Wi(ie)),Ne=Object.keys(k).filter(ie=>k[ie].length>0).map(ie=>{let ve=k[ie].filter(X).map(le=>{if(~Ye.indexOf(le))return le;for(let we=0,Ce;(Ce=Ye[we])!==void 0;we++)if(~(G.alias[Ce]||[]).indexOf(le))return Ce;return le});return {groupName:ie,normalizedKeys:ve}}).filter(({normalizedKeys:ie})=>ie.length>0).map(({groupName:ie,normalizedKeys:ve})=>{let le=ve.reduce((we,Ce)=>(we[Ce]=[Ce].concat(G.alias[Ce]||[]).map(E=>ie===s.getPositionalGroupName()?E:(/^[0-9]$/.test(E)?~G.boolean.indexOf(Ce)?"-":"--":E.length>1?"--":"-")+E).sort((E,S)=>Ke(E)===Ke(S)?0:Ke(E)?1:-1).join(", "),we),{});return {groupName:ie,normalizedKeys:ve,switches:le}});if(Ne.filter(({groupName:ie})=>ie!==s.getPositionalGroupName()).some(({normalizedKeys:ie,switches:ve})=>!ie.every(le=>Ke(ve[le])))&&Ne.filter(({groupName:ie})=>ie!==s.getPositionalGroupName()).forEach(({normalizedKeys:ie,switches:ve})=>{ie.forEach(le=>{Ke(ve[le])&&(ve[le]=ww(ve[le],4));});}),Ne.forEach(({groupName:ie,normalizedKeys:ve,switches:le})=>{de.div(ie),ve.forEach(we=>{let Ce=le[we],E=F[we]||"",S=null;~E.lastIndexOf(x)&&(E=n(E.substring(x.length))),~G.boolean.indexOf(we)&&(S=`[${n("boolean")}]`),~G.count.indexOf(we)&&(S=`[${n("count")}]`),~G.string.indexOf(we)&&(S=`[${n("string")}]`),~G.normalize.indexOf(we)&&(S=`[${n("string")}]`),~G.array.indexOf(we)&&(S=`[${n("array")}]`),~G.number.indexOf(we)&&(S=`[${n("number")}]`);let h=T=>typeof T=="string"?`[${n("deprecated: %s",T)}]`:`[${n("deprecated")}]`,w=[we in W?h(W[we]):null,S,we in V?`[${n("required")}]`:null,G.choices&&G.choices[we]?`[${n("choices:")} ${s.stringifiedValues(G.choices[we])}]`:null,te(G.default[we],G.defaultDescription[we])].filter(Boolean).join(" ");de.span({text:Wi(Ce),padding:[0,2,0,2+nf(Ce)],width:v(le,ye)+4},E),w?de.div({text:w,padding:[0,0,0,2],align:"right"}):de.div();}),de.div();}),D.length&&(de.div(n("Examples:")),D.forEach(ie=>{ie[0]=ie[0].replace(/\$0/g,Y);}),D.forEach(ie=>{ie[1]===""?de.div({text:ie[0],padding:[0,2,0,2]}):de.div({text:ie[0],padding:[0,2,0,2],width:v(D,ye)+4},{text:ie[1]});}),de.div()),C.length>0){let ie=C.map(ve=>ve.replace(/\$0/g,Y)).join(` `);de.div(`${ie} -`);}return de.toString().replace(/\s*$/,"")};function w(q,Y,V){let I=0;return Array.isArray(q)||(q=Object.values(q).map(W=>[W])),q.forEach(W=>{I=Math.max(r.stringWidth(V?`${V} ${Ui(W[0])}`:Ui(W[0]))+nf(W[0]),I);}),Y&&(I=Math.min(I,parseInt((Y*.5).toString(),10))),I}function M(){let q=e.getDemandedOptions(),Y=e.getOptions();(Object.keys(Y.alias)||[]).forEach(V=>{Y.alias[V].forEach(I=>{F[I]&&s.describe(V,F[I]),I in q&&e.demandOption(V,q[I]),~Y.boolean.indexOf(I)&&e.boolean(V),~Y.count.indexOf(I)&&e.count(V),~Y.string.indexOf(I)&&e.string(V),~Y.normalize.indexOf(I)&&e.normalize(V),~Y.array.indexOf(I)&&e.array(V),~Y.number.indexOf(I)&&e.number(V);});});}let P;s.cacheHelpMessage=function(){P=this.help();},s.clearCachedHelpMessage=function(){P=void 0;};function J(q,Y,V,I){let W=[],k=null;return Object.keys(V).forEach(G=>{W=W.concat(V[G]);}),q.forEach(G=>{k=[G].concat(Y[G]),k.some(K=>W.indexOf(K)!==-1)||V[I].push(G);}),W}function X(q){return e.getOptions().hiddenOptions.indexOf(q)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}s.showHelp=q=>{let Y=e._getLoggerInstance();q||(q="error"),(typeof q=="function"?q:Y[q])(s.help());},s.functionDescription=q=>["(",q.name?r.Parser.decamelize(q.name,"-"):n("generated-value"),")"].join(""),s.stringifiedValues=function(Y,V){let I="",W=V||", ",k=[].concat(Y);return !Y||!k.length||k.forEach(G=>{I.length&&(I+=W),I+=JSON.stringify(G);}),I};function te(q,Y){let V=`[${n("default:")} `;if(q===void 0&&!Y)return null;if(Y)V+=Y;else switch(typeof q){case"string":V+=`"${q}"`;break;case"object":V+=JSON.stringify(q);break;default:V+=q;}return `${V}]`}function L(){return r.process.stdColumns?Math.min(80,r.process.stdColumns):80}let ee=null;s.version=q=>{ee=q;},s.showVersion=()=>{e._getLoggerInstance().log(ee);},s.reset=function(Y){return u=null,d=!1,g=[],m=!1,C=[],D=[],y=[],F=Vr(F,V=>!Y[V]),s};let Z=[];return s.freeze=function(){Z.push({failMessage:u,failureOutput:d,usages:g,usageDisabled:m,epilogs:C,examples:D,commands:y,descriptions:F});},s.unfreeze=function(){let Y=Z.pop();rt(Y,void 0,r),{failMessage:u,failureOutput:d,usages:g,usageDisabled:m,epilogs:C,examples:D,commands:y,descriptions:F}=Y;},s}function ta(e){return typeof e=="object"}function vv(e,t){return ta(e)?{text:e.text,indentation:e.indentation+t}:{text:e,indentation:t}}function nf(e){return ta(e)?e.indentation:0}function Ui(e){return ta(e)?e.text:e}var Ev=`###-begin-{{app_name}}-completions-### +`);}return de.toString().replace(/\s*$/,"")};function v(q,Y,V){let I=0;return Array.isArray(q)||(q=Object.values(q).map(W=>[W])),q.forEach(W=>{I=Math.max(r.stringWidth(V?`${V} ${Wi(W[0])}`:Wi(W[0]))+nf(W[0]),I);}),Y&&(I=Math.min(I,parseInt((Y*.5).toString(),10))),I}function M(){let q=e.getDemandedOptions(),Y=e.getOptions();(Object.keys(Y.alias)||[]).forEach(V=>{Y.alias[V].forEach(I=>{F[I]&&s.describe(V,F[I]),I in q&&e.demandOption(V,q[I]),~Y.boolean.indexOf(I)&&e.boolean(V),~Y.count.indexOf(I)&&e.count(V),~Y.string.indexOf(I)&&e.string(V),~Y.normalize.indexOf(I)&&e.normalize(V),~Y.array.indexOf(I)&&e.array(V),~Y.number.indexOf(I)&&e.number(V);});});}let P;s.cacheHelpMessage=function(){P=this.help();},s.clearCachedHelpMessage=function(){P=void 0;};function J(q,Y,V,I){let W=[],k=null;return Object.keys(V).forEach(G=>{W=W.concat(V[G]);}),q.forEach(G=>{k=[G].concat(Y[G]),k.some(K=>W.indexOf(K)!==-1)||V[I].push(G);}),W}function X(q){return e.getOptions().hiddenOptions.indexOf(q)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}s.showHelp=q=>{let Y=e._getLoggerInstance();q||(q="error"),(typeof q=="function"?q:Y[q])(s.help());},s.functionDescription=q=>["(",q.name?r.Parser.decamelize(q.name,"-"):n("generated-value"),")"].join(""),s.stringifiedValues=function(Y,V){let I="",W=V||", ",k=[].concat(Y);return !Y||!k.length||k.forEach(G=>{I.length&&(I+=W),I+=JSON.stringify(G);}),I};function te(q,Y){let V=`[${n("default:")} `;if(q===void 0&&!Y)return null;if(Y)V+=Y;else switch(typeof q){case"string":V+=`"${q}"`;break;case"object":V+=JSON.stringify(q);break;default:V+=q;}return `${V}]`}function L(){return r.process.stdColumns?Math.min(80,r.process.stdColumns):80}let ee=null;s.version=q=>{ee=q;},s.showVersion=()=>{e._getLoggerInstance().log(ee);},s.reset=function(Y){return u=null,d=!1,g=[],m=!1,C=[],D=[],y=[],F=Vr(F,V=>!Y[V]),s};let Z=[];return s.freeze=function(){Z.push({failMessage:u,failureOutput:d,usages:g,usageDisabled:m,epilogs:C,examples:D,commands:y,descriptions:F});},s.unfreeze=function(){let Y=Z.pop();rt(Y,void 0,r),{failMessage:u,failureOutput:d,usages:g,usageDisabled:m,epilogs:C,examples:D,commands:y,descriptions:F}=Y;},s}function ta(e){return typeof e=="object"}function ww(e,t){return ta(e)?{text:e.text,indentation:e.indentation+t}:{text:e,indentation:t}}function nf(e){return ta(e)?e.indentation:0}function Wi(e){return ta(e)?e.text:e}var Ew=`###-begin-{{app_name}}-completions-### # # yargs command completion script # @@ -50,7 +50,7 @@ _yargs_completions() } complete -o default -F _yargs_completions {{app_name}} ###-end-{{app_name}}-completions-### -`,_v=`###-begin-{{app_name}}-completions-### +`,_w=`###-begin-{{app_name}}-completions-### # # yargs command completion script # @@ -68,28 +68,28 @@ _{{app_name}}_yargs_completions() } compdef _{{app_name}}_yargs_completions {{app_name}} ###-end-{{app_name}}-completions-### -`;function Fv(e,t,r,n){let s={completionKey:"get-yargs-completions"},o;s.setParsed=function(g){o=g.aliases;};let u=n.getEnv("SHELL")&&n.getEnv("SHELL").indexOf("zsh")!==-1||n.getEnv("ZSH_NAME")&&n.getEnv("ZSH_NAME").indexOf("zsh")!==-1;s.getCompletion=function(g,m){let D=[],y=g.length?g[g.length-1]:"",F=e.parse(g,!0),C=e.getContext().commands;function _($){if(rt(c,null,n),Sv(c)){let x=c(y,$);return Ut(x)?x.then(w=>{n.process.nextTick(()=>{m(w);});}).catch(w=>{n.process.nextTick(()=>{throw w});}):m(x)}else return c(y,$,x=>{m(x);})}if(c)return Ut(F)?F.then(_):_(F);let j=r.getCommandHandlers();for(let $=0,x=g.length;${let x=Hr($[0]).cmd;if(g.indexOf(x)===-1)if(!u)D.push(x);else {let w=$[1]||"";D.push(x.replace(/:/g,"\\:")+":"+w);}}),y.match(/^-/)||y===""&&D.length===0){let $=t.getDescriptions(),x=e.getOptions();Object.keys(x.key).forEach(w=>{let M=!!x.configuration["boolean-negation"]&&x.boolean.includes(w),P=[w].concat(o[w]||[]);M&&(P=P.concat(P.map(X=>`no-${X}`)));function J(X){if(P.every(L=>g.indexOf(`--${L}`)===-1)){let L=q=>/^--/.test(q),ee=q=>/^[^0-9]$/.test(q),Z=!L(y)&&ee(X)?"-":"--";if(!u)D.push(Z+X);else {let q=$[X]||"";D.push(Z+`${X.replace(/:/g,"\\:")}:${q.replace("__yargsString__:","")}`);}}}J(w),M&&x.default[w]&&J(`no-${w}`);});}m(D);},s.generateCompletionScript=function(g,m){let D=u?_v:Ev,y=n.path.basename(g);return g.match(/\.js$/)&&(g=`./${g}`),D=D.replace(/{{app_name}}/g,y),D=D.replace(/{{completion_command}}/g,m),D.replace(/{{app_path}}/g,g)};let c=null;return s.registerFunction=d=>{c=d;},s}function Sv(e){return e.length<3}function Cv(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let r=[],n;for(n=0;n<=t.length;n++)r[n]=[n];let s;for(s=0;s<=e.length;s++)r[0][s]=s;for(n=1;n<=t.length;n++)for(s=1;s<=e.length;s++)t.charAt(n-1)===e.charAt(s-1)?r[n][s]=r[n-1][s-1]:r[n][s]=Math.min(r[n-1][s-1]+1,Math.min(r[n][s-1]+1,r[n-1][s]+1));return r[t.length][e.length]}var sf=["$0","--","_"];function Ov(e,t,r,n){let s=r.__,o=r.__n,u={};u.nonOptionCount=function(F){let C=e.getDemandedCommands(),j=F._.length+(F["--"]?F["--"].length:0)-e.getContext().commands.length;C._&&(jC._.max)&&(jC._.max&&(C._.maxMsg!==void 0?t.fail(C._.maxMsg?C._.maxMsg.replace(/\$0/g,j.toString()).replace(/\$1/,C._.max.toString()):null):t.fail(o("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",j,j.toString(),C._.max.toString()))));},u.positionalCount=function(F,C){C"u")&&(_=_||{},_[j]=C[j]);if(_){let j=[];for(let x of Object.keys(_)){let w=_[x];w&&j.indexOf(w)<0&&j.push(w);}let $=j.length?` +`;function Fw(e,t,r,n){let s={completionKey:"get-yargs-completions"},o;s.setParsed=function(g){o=g.aliases;};let u=n.getEnv("SHELL")&&n.getEnv("SHELL").indexOf("zsh")!==-1||n.getEnv("ZSH_NAME")&&n.getEnv("ZSH_NAME").indexOf("zsh")!==-1;s.getCompletion=function(g,m){let D=[],y=g.length?g[g.length-1]:"",F=e.parse(g,!0),C=e.getContext().commands;function _($){if(rt(c,null,n),Sw(c)){let x=c(y,$);return Ut(x)?x.then(v=>{n.process.nextTick(()=>{m(v);});}).catch(v=>{n.process.nextTick(()=>{throw v});}):m(x)}else return c(y,$,x=>{m(x);})}if(c)return Ut(F)?F.then(_):_(F);let j=r.getCommandHandlers();for(let $=0,x=g.length;${let x=Hr($[0]).cmd;if(g.indexOf(x)===-1)if(!u)D.push(x);else {let v=$[1]||"";D.push(x.replace(/:/g,"\\:")+":"+v);}}),y.match(/^-/)||y===""&&D.length===0){let $=t.getDescriptions(),x=e.getOptions();Object.keys(x.key).forEach(v=>{let M=!!x.configuration["boolean-negation"]&&x.boolean.includes(v),P=[v].concat(o[v]||[]);M&&(P=P.concat(P.map(X=>`no-${X}`)));function J(X){if(P.every(L=>g.indexOf(`--${L}`)===-1)){let L=q=>/^--/.test(q),ee=q=>/^[^0-9]$/.test(q),Z=!L(y)&&ee(X)?"-":"--";if(!u)D.push(Z+X);else {let q=$[X]||"";D.push(Z+`${X.replace(/:/g,"\\:")}:${q.replace("__yargsString__:","")}`);}}}J(v),M&&x.default[v]&&J(`no-${v}`);});}m(D);},s.generateCompletionScript=function(g,m){let D=u?_w:Ew,y=n.path.basename(g);return g.match(/\.js$/)&&(g=`./${g}`),D=D.replace(/{{app_name}}/g,y),D=D.replace(/{{completion_command}}/g,m),D.replace(/{{app_path}}/g,g)};let c=null;return s.registerFunction=d=>{c=d;},s}function Sw(e){return e.length<3}function Cw(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let r=[],n;for(n=0;n<=t.length;n++)r[n]=[n];let s;for(s=0;s<=e.length;s++)r[0][s]=s;for(n=1;n<=t.length;n++)for(s=1;s<=e.length;s++)t.charAt(n-1)===e.charAt(s-1)?r[n][s]=r[n-1][s-1]:r[n][s]=Math.min(r[n-1][s-1]+1,Math.min(r[n][s-1]+1,r[n-1][s]+1));return r[t.length][e.length]}var sf=["$0","--","_"];function Ow(e,t,r,n){let s=r.__,o=r.__n,u={};u.nonOptionCount=function(F){let C=e.getDemandedCommands(),j=F._.length+(F["--"]?F["--"].length:0)-e.getContext().commands.length;C._&&(jC._.max)&&(jC._.max&&(C._.maxMsg!==void 0?t.fail(C._.maxMsg?C._.maxMsg.replace(/\$0/g,j.toString()).replace(/\$1/,C._.max.toString()):null):t.fail(o("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",j,j.toString(),C._.max.toString()))));},u.positionalCount=function(F,C){C"u")&&(_=_||{},_[j]=C[j]);if(_){let j=[];for(let x of Object.keys(_)){let v=_[x];v&&j.indexOf(v)<0&&j.push(v);}let $=j.length?` ${j.join(` -`)}`:"";t.fail(o("Missing required argument: %s","Missing required arguments: %s",Object.keys(_).length,Object.keys(_).join(", ")+$));}},u.unknownArguments=function(F,C,_,j,$=!0){let x=e.getCommandInstance().getCommands(),w=[],M=e.getContext();Object.keys(F).forEach(P=>{sf.indexOf(P)===-1&&!Object.prototype.hasOwnProperty.call(_,P)&&!Object.prototype.hasOwnProperty.call(e._getParseContext(),P)&&!u.isValidAndSomeAliasIsNotNew(P,C)&&w.push(P);}),$&&(M.commands.length>0||x.length>0||j)&&F._.slice(M.commands.length).forEach(P=>{x.indexOf(""+P)===-1&&w.push(""+P);}),w.length>0&&t.fail(o("Unknown argument: %s","Unknown arguments: %s",w.length,w.join(", ")));},u.unknownCommands=function(F){let C=e.getCommandInstance().getCommands(),_=[],j=e.getContext();return (j.commands.length>0||C.length>0)&&F._.slice(j.commands.length).forEach($=>{C.indexOf(""+$)===-1&&_.push(""+$);}),_.length>0?(t.fail(o("Unknown command: %s","Unknown commands: %s",_.length,_.join(", "))),!0):!1},u.isValidAndSomeAliasIsNotNew=function(F,C){if(!Object.prototype.hasOwnProperty.call(C,F))return !1;let _=e.parsed.newAliases;for(let j of [F,...C[F]])if(!Object.prototype.hasOwnProperty.call(_,j)||!_[F])return !0;return !1},u.limitedChoices=function(F){let C=e.getOptions(),_={};if(!Object.keys(C.choices).length)return;Object.keys(F).forEach(x=>{sf.indexOf(x)===-1&&Object.prototype.hasOwnProperty.call(C.choices,x)&&[].concat(F[x]).forEach(w=>{C.choices[x].indexOf(w)===-1&&w!==void 0&&(_[x]=(_[x]||[]).concat(w));});});let j=Object.keys(_);if(!j.length)return;let $=s("Invalid values:");j.forEach(x=>{$+=` - ${s("Argument: %s, Given: %s, Choices: %s",x,t.stringifiedValues(_[x]),t.stringifiedValues(C.choices[x]))}`;}),t.fail($);};let c=[];u.check=function(F,C){c.push({func:F,global:C});},u.customChecks=function(F,C){for(let _=0,j;(j=c[_])!==void 0;_++){let $=j.func,x=null;try{x=$(F,C);}catch(w){t.fail(w.message?w.message:w,w);continue}x?(typeof x=="string"||x instanceof Error)&&t.fail(x.toString(),x):t.fail(s("Argument check failed: %s",$.toString()));}};let d={};u.implies=function(F,C){oe(" [array|number|string]",[F,C],arguments.length),typeof F=="object"?Object.keys(F).forEach(_=>{u.implies(_,F[_]);}):(e.global(F),d[F]||(d[F]=[]),Array.isArray(C)?C.forEach(_=>u.implies(F,_)):(rt(C,void 0,n),d[F].push(C)));},u.getImplied=function(){return d};function g(y,F){let C=Number(F);return F=isNaN(C)?F:C,typeof F=="number"?F=y._.length>=F:F.match(/^--no-.+/)?(F=F.match(/^--no-(.+)/)[1],F=!y[F]):F=y[F],F}u.implications=function(F){let C=[];if(Object.keys(d).forEach(_=>{let j=_;(d[_]||[]).forEach($=>{let x=j,w=$;x=g(F,x),$=g(F,$),x&&!$&&C.push(` ${j} -> ${w}`);});}),C.length){let _=`${s("Implications failed:")} -`;C.forEach(j=>{_+=j;}),t.fail(_);}};let m={};u.conflicts=function(F,C){oe(" [array|string]",[F,C],arguments.length),typeof F=="object"?Object.keys(F).forEach(_=>{u.conflicts(_,F[_]);}):(e.global(F),m[F]||(m[F]=[]),Array.isArray(C)?C.forEach(_=>u.conflicts(F,_)):m[F].push(C));},u.getConflicting=()=>m,u.conflicting=function(F){Object.keys(F).forEach(C=>{m[C]&&m[C].forEach(_=>{_&&F[C]!==void 0&&F[_]!==void 0&&t.fail(s("Arguments %s and %s are mutually exclusive",C,_));});});},u.recommendCommands=function(F,C){C=C.sort((x,w)=>w.length-x.length);let j=null,$=1/0;for(let x=0,w;(w=C[x])!==void 0;x++){let M=Cv(F,w);M<=3&&M<$&&($=M,j=w);}j&&t.fail(s("Did you mean %s?",j));},u.reset=function(F){return d=Vr(d,C=>!F[C]),m=Vr(m,C=>!F[C]),c=c.filter(C=>C.global),u};let D=[];return u.freeze=function(){D.push({implied:d,checks:c,conflicting:m});},u.unfreeze=function(){let F=D.pop();rt(F,void 0,n),{implied:d,checks:c,conflicting:m}=F;},u}var ce;function bv(e){return ce=e,xv}function xv(e=[],t=ce.process.cwd(),r){let n={},s,o=null,u={},c=[],d="",g={},m,D,y=null,F=ce.y18n;n.middleware=uf(c,n),n.scriptName=function(E){return n.customScriptName=!0,n.$0=E,n};let C;/\b(node|iojs|electron)(\.exe)?$/.test(ce.process.argv()[0])?C=ce.process.argv().slice(1,2):C=ce.process.argv().slice(0,1),n.$0=C.map(E=>{let S=ff(t,E);return E.match(/^(\/|([a-zA-Z]:)?\\)/)&&S.length_;let j=!1,$=null;n.exit=(E,S)=>{j=!0,$=S,ie&&ce.process.exit(E);};let x=null;n.completion=function(E,S,h){return oe("[string] [string|boolean|function] [function]",[E,S,h],arguments.length),typeof S=="function"&&(h=S,S=void 0),x=E||x||"completion",!S&&S!==!1&&(S="generate completion script"),n.command(x,S),h&&o.registerFunction(h),n};let w;n.resetOptions=n.reset=function(S={}){_.resets++,w=w||{};let h={};h.local=w.local?w.local:[],h.configObjects=w.configObjects?w.configObjects:[];let v={};h.local.forEach(b=>{v[b]=!0,(S[b]||[]).forEach(z=>{v[z]=!0;});}),Object.assign(g,Object.keys(u).reduce((b,z)=>{let Q=u[z].filter(re=>!(re in v));return Q.length>0&&(b[z]=Q),b},{})),u={};let T=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],A=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","coerce","deprecatedOptions"];return T.forEach(b=>{h[b]=(w[b]||[]).filter(z=>!v[z]);}),A.forEach(b=>{h[b]=Vr(w[b],z=>!v[z]);}),h.envPrefix=w.envPrefix,w=h,m=m?m.reset(v):wv(n,F,ce),D=D?D.reset(v):Ov(n,m,F,ce),s=s?s.reset():mv(n,m,D,c,ce),o||(o=Fv(n,m,s,ce)),x=null,d="",$=null,j=!1,n.parsed=!1,n},n.resetOptions();let M=[];function P(){M.push({options:w,configObjects:w.configObjects.slice(0),exitProcess:ie,groups:u,strict:K,strictCommands:ye,strictOptions:de,completionCommand:x,output:d,exitError:$,hasOutput:j,parsed:n.parsed,parseFn:k,parseContext:G,handlerFinishCommand:y}),m.freeze(),D.freeze(),s.freeze();}function J(){let E=M.pop();rt(E,void 0,ce);let S;(({options:w,configObjects:S,exitProcess:ie,groups:u,output:d,exitError:$,hasOutput:j,parsed:n.parsed,strict:K,strictCommands:ye,strictOptions:de,completionCommand:x,parseFn:k,parseContext:G,handlerFinishCommand:y}=E)),w.configObjects=S,m.unfreeze(),D.unfreeze(),s.unfreeze();}n.boolean=function(E){return oe("",[E],arguments.length),X("boolean",E),n},n.array=function(E){return oe("",[E],arguments.length),X("array",E),n},n.number=function(E){return oe("",[E],arguments.length),X("number",E),n},n.normalize=function(E){return oe("",[E],arguments.length),X("normalize",E),n},n.count=function(E){return oe("",[E],arguments.length),X("count",E),n},n.string=function(E){return oe("",[E],arguments.length),X("string",E),n},n.requiresArg=function(E){return oe(" [number]",[E],arguments.length),typeof E=="string"&&w.narg[E]||ee(n.requiresArg,"narg",E,NaN),n},n.skipValidation=function(E){return oe("",[E],arguments.length),X("skipValidation",E),n};function X(E,S){S=[].concat(S),S.forEach(h=>{h=Y(h),w[E].push(h);});}n.nargs=function(E,S){return oe(" [number]",[E,S],arguments.length),ee(n.nargs,"narg",E,S),n},n.choices=function(E,S){return oe(" [string|array]",[E,S],arguments.length),Z(n.choices,"choices",E,S),n},n.alias=function(E,S){return oe(" [string|array]",[E,S],arguments.length),Z(n.alias,"alias",E,S),n},n.default=n.defaults=function(E,S,h){return oe(" [*] [string]",[E,S,h],arguments.length),h&&(ef(E,ce),w.defaultDescription[E]=h),typeof S=="function"&&(ef(E,ce),w.defaultDescription[E]||(w.defaultDescription[E]=m.functionDescription(S)),S=S.call()),ee(n.default,"default",E,S),n},n.describe=function(E,S){return oe(" [string]",[E,S],arguments.length),te(E,!0),m.describe(E,S),n};function te(E,S){return ee(te,"key",E,S),n}function L(E,S){return oe(" [string]",[E,S],arguments.length),ee(n.demandOption,"demandedOptions",E,S),n}n.demandOption=L,n.coerce=function(E,S){return oe(" [function]",[E,S],arguments.length),ee(n.coerce,"coerce",E,S),n};function ee(E,S,h,v){q(E,S,h,v,(T,A,b)=>{w[T][A]=b;});}function Z(E,S,h,v){q(E,S,h,v,(T,A,b)=>{w[T][A]=(w[T][A]||[]).concat(b);});}function q(E,S,h,v,T){if(Array.isArray(h))h.forEach(A=>{E(A,v);});else if((A=>typeof A=="object")(h))for(let A of zi(h))E(A,h[A]);else T(S,Y(h),v);}function Y(E){return E==="__proto__"?"___proto___":E}function V(E){zi(w).forEach(S=>{if((v=>v==="configObjects")(S))return;let h=w[S];Array.isArray(h)?~h.indexOf(E)&&h.splice(h.indexOf(E),1):typeof h=="object"&&delete h[E];}),delete m.getDescriptions()[E];}n.config=function(S="config",h,v){return oe("[object|string] [string|function] [function]",[S,h,v],arguments.length),typeof S=="object"&&!Array.isArray(S)?(S=Hi(S,t,n.getParserConfiguration()["deep-merge-config"]||!1,ce),w.configObjects=(w.configObjects||[]).concat(S),n):(typeof h=="function"&&(v=h,h=void 0),n.describe(S,h||m.deferY18nLookup("Path to JSON config file")),(Array.isArray(S)?S:[S]).forEach(T=>{w.config[T]=v||!0;}),n)},n.example=function(E,S){return oe(" [string]",[E,S],arguments.length),Array.isArray(E)?E.forEach(h=>n.example(...h)):m.example(E,S),n},n.command=function(E,S,h,v,T,A){return oe(" [string|boolean] [function|object] [function] [array] [boolean|string]",[E,S,h,v,T,A],arguments.length),s.addHandler(E,S,h,v,T,A),n},n.commandDir=function(E,S){oe(" [object]",[E,S],arguments.length);let h=r||ce.require;return s.addDirectory(E,n.getContext(),h,ce.getCallerFile(),S),n},n.demand=n.required=n.require=function(S,h,v){return Array.isArray(h)?(h.forEach(T=>{rt(v,!0,ce),L(T,v);}),h=1/0):typeof h!="number"&&(v=h,h=1/0),typeof S=="number"?(rt(v,!0,ce),n.demandCommand(S,h,v,v)):Array.isArray(S)?S.forEach(T=>{rt(v,!0,ce),L(T,v);}):typeof v=="string"?L(S,v):(v===!0||typeof v>"u")&&L(S),n},n.demandCommand=function(S=1,h,v,T){return oe("[number] [number|string] [string|null|undefined] [string|null|undefined]",[S,h,v,T],arguments.length),typeof h!="number"&&(v=h,h=1/0),n.global("_",!1),w.demandedCommands._={min:S,max:h,minMsg:v,maxMsg:T},n},n.getDemandedOptions=()=>(oe([],0),w.demandedOptions),n.getDemandedCommands=()=>(oe([],0),w.demandedCommands),n.deprecateOption=function(S,h){return oe(" [string|boolean]",[S,h],arguments.length),w.deprecatedOptions[S]=h,n},n.getDeprecatedOptions=()=>(oe([],0),w.deprecatedOptions),n.implies=function(E,S){return oe(" [number|string|array]",[E,S],arguments.length),D.implies(E,S),n},n.conflicts=function(E,S){return oe(" [string|array]",[E,S],arguments.length),D.conflicts(E,S),n},n.usage=function(E,S,h,v){if(oe(" [string|boolean] [function|object] [function]",[E,S,h,v],arguments.length),S!==void 0){if(rt(E,null,ce),(E||"").match(/^\$0( |$)/))return n.command(E,S,h,v);throw new nt(".usage() description must start with $0 if being used as alias for .command()")}else return m.usage(E),n},n.epilogue=n.epilog=function(E){return oe("",[E],arguments.length),m.epilog(E),n},n.fail=function(E){return oe("",[E],arguments.length),m.failFn(E),n},n.onFinishCommand=function(E){return oe("",[E],arguments.length),y=E,n},n.getHandlerFinishCommand=()=>y,n.check=function(E,S){return oe(" [boolean]",[E,S],arguments.length),D.check(E,S!==!1),n},n.global=function(E,S){return oe(" [boolean]",[E,S],arguments.length),E=[].concat(E),S!==!1?w.local=w.local.filter(h=>E.indexOf(h)===-1):E.forEach(h=>{w.local.indexOf(h)===-1&&w.local.push(h);}),n},n.pkgConf=function(S,h){oe(" [string]",[S,h],arguments.length);let v=null,T=W(h||t);return T[S]&&typeof T[S]=="object"&&(v=Hi(T[S],h||t,n.getParserConfiguration()["deep-merge-config"]||!1,ce),w.configObjects=(w.configObjects||[]).concat(v)),n};let I={};function W(E){let S=E||"*";if(I[S])return I[S];let h={};try{let v=E||ce.mainFilename;!E&&ce.path.extname(v)&&(v=ce.path.dirname(v));let T=ce.findUp(v,(A,b)=>{if(b.includes("package.json"))return "package.json"});rt(T,void 0,ce),h=JSON.parse(ce.readFileSync(T,"utf8"));}catch{}return I[S]=h||{},I[S]}let k=null,G=null;n.parse=function(S,h,v){if(oe("[string|array] [function|boolean|object] [function]",[S,h,v],arguments.length),P(),typeof S>"u"){let A=n._parseArgs(e),b=n.parsed;return J(),n.parsed=b,A}typeof h=="object"&&(G=h,h=v),typeof h=="function"&&(k=h,h=!1),h||(e=S),k&&(ie=!1);let T=n._parseArgs(S,!!h);return o.setParsed(n.parsed),k&&k($,T,d),J(),T},n._getParseContext=()=>G||{},n._hasParseCallback=()=>!!k,n.option=n.options=function(S,h){if(oe(" [object]",[S,h],arguments.length),typeof S=="object")Object.keys(S).forEach(v=>{n.options(v,S[v]);});else {typeof h!="object"&&(h={}),w.key[S]=!0,h.alias&&n.alias(S,h.alias);let v=h.deprecate||h.deprecated;v&&n.deprecateOption(S,v);let T=h.demand||h.required||h.require;T&&n.demand(S,T),h.demandOption&&n.demandOption(S,typeof h.demandOption=="string"?h.demandOption:void 0),h.conflicts&&n.conflicts(S,h.conflicts),"default"in h&&n.default(S,h.default),h.implies!==void 0&&n.implies(S,h.implies),h.nargs!==void 0&&n.nargs(S,h.nargs),h.config&&n.config(S,h.configParser),h.normalize&&n.normalize(S),h.choices&&n.choices(S,h.choices),h.coerce&&n.coerce(S,h.coerce),h.group&&n.group(S,h.group),(h.boolean||h.type==="boolean")&&(n.boolean(S),h.alias&&n.boolean(h.alias)),(h.array||h.type==="array")&&(n.array(S),h.alias&&n.array(h.alias)),(h.number||h.type==="number")&&(n.number(S),h.alias&&n.number(h.alias)),(h.string||h.type==="string")&&(n.string(S),h.alias&&n.string(h.alias)),(h.count||h.type==="count")&&n.count(S),typeof h.global=="boolean"&&n.global(S,h.global),h.defaultDescription&&(w.defaultDescription[S]=h.defaultDescription),h.skipValidation&&n.skipValidation(S);let A=h.describe||h.description||h.desc;n.describe(S,A),h.hidden&&n.hide(S),h.requiresArg&&n.requiresArg(S);}return n},n.getOptions=()=>w,n.positional=function(E,S){if(oe(" ",[E,S],arguments.length),_.resets===0)throw new nt(".positional() can only be called in a command's builder function");let h=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];S=Vr(S,(A,b)=>{let z=h.indexOf(A)!==-1;return A==="type"&&["string","number","boolean"].indexOf(b)===-1&&(z=!1),z});let v=_.fullCommands[_.fullCommands.length-1],T=v?s.cmdToParseOptions(v):{array:[],alias:{},default:{},demand:{}};return zi(T).forEach(A=>{let b=T[A];Array.isArray(b)?b.indexOf(E)!==-1&&(S[A]=!0):b[E]&&!(A in S)&&(S[A]=b[E]);}),n.group(E,m.getPositionalGroupName()),n.option(E,S)},n.group=function(S,h){oe(" ",[S,h],arguments.length);let v=g[h]||u[h];g[h]&&delete g[h];let T={};return u[h]=(v||[]).concat(S).filter(A=>T[A]?!1:T[A]=!0),n},n.getGroups=()=>Object.assign({},u,g),n.env=function(E){return oe("[string|boolean]",[E],arguments.length),E===!1?delete w.envPrefix:w.envPrefix=E||"",n},n.wrap=function(E){return oe("",[E],arguments.length),m.wrap(E),n};let K=!1;n.strict=function(E){return oe("[boolean]",[E],arguments.length),K=E!==!1,n},n.getStrict=()=>K;let ye=!1;n.strictCommands=function(E){return oe("[boolean]",[E],arguments.length),ye=E!==!1,n},n.getStrictCommands=()=>ye;let de=!1;n.strictOptions=function(E){return oe("[boolean]",[E],arguments.length),de=E!==!1,n},n.getStrictOptions=()=>de;let Ye={};n.parserConfiguration=function(S){return oe("",[S],arguments.length),Ye=S,n},n.getParserConfiguration=()=>Ye,n.showHelp=function(E){return oe("[string|function]",[E],arguments.length),n.parsed||n._parseArgs(e),s.hasDefaultCommand()&&(_.resets++,s.runDefaultBuilderOn(n)),m.showHelp(E),n};let R=null;n.version=function(S,h,v){let T="version";if(oe("[boolean|string] [string] [string]",[S,h,v],arguments.length),R&&(V(R),m.version(void 0),R=null),arguments.length===0)v=Ke(),S=T;else if(arguments.length===1){if(S===!1)return n;v=S,S=T;}else arguments.length===2&&(v=h,h=void 0);return R=typeof S=="string"?S:T,h=h||m.deferY18nLookup("Show version number"),m.version(v||void 0),n.boolean(R),n.describe(R,h),n};function Ke(){return W().version||"unknown"}let Ne=null;n.addHelpOpt=n.help=function(S,h){let v="help";return oe("[string|boolean] [string]",[S,h],arguments.length),Ne&&(V(Ne),Ne=null),arguments.length===1&&S===!1||(Ne=typeof S=="string"?S:v,n.boolean(Ne),n.describe(Ne,h||m.deferY18nLookup("Show help"))),n};let Ct="show-hidden";w.showHiddenOpt=Ct,n.addShowHiddenOpt=n.showHidden=function(S,h){if(oe("[string|boolean] [string]",[S,h],arguments.length),arguments.length===1&&S===!1)return n;let v=typeof S=="string"?S:Ct;return n.boolean(v),n.describe(v,h||m.deferY18nLookup("Show hidden options")),w.showHiddenOpt=v,n},n.hide=function(S){return oe("",[S],arguments.length),w.hiddenOptions.push(S),n},n.showHelpOnFail=function(S,h){return oe("[boolean|string] [string]",[S,h],arguments.length),m.showHelpOnFail(S,h),n};let ie=!0;n.exitProcess=function(E=!0){return oe("[boolean]",[E],arguments.length),ie=E,n},n.getExitProcess=()=>ie,n.showCompletionScript=function(E,S){return oe("[string] [string]",[E,S],arguments.length),E=E||n.$0,le.log(o.generateCompletionScript(E,S||x||"completion")),n},n.getCompletion=function(E,S){oe(" ",[E,S],arguments.length),o.getCompletion(E,S);},n.locale=function(E){return oe("[string]",[E],arguments.length),E?(we=!1,F.setLocale(E),n):(Ce(),F.getLocale())},n.updateStrings=n.updateLocale=function(E){return oe("",[E],arguments.length),we=!1,F.updateLocale(E),n};let we=!0;n.detectLocale=function(E){return oe("",[E],arguments.length),we=E,n},n.getDetectLocale=()=>we;let le={log(...E){n._hasParseCallback()||console.log(...E),j=!0,d.length&&(d+=` +`)}`:"";t.fail(o("Missing required argument: %s","Missing required arguments: %s",Object.keys(_).length,Object.keys(_).join(", ")+$));}},u.unknownArguments=function(F,C,_,j,$=!0){let x=e.getCommandInstance().getCommands(),v=[],M=e.getContext();Object.keys(F).forEach(P=>{sf.indexOf(P)===-1&&!Object.prototype.hasOwnProperty.call(_,P)&&!Object.prototype.hasOwnProperty.call(e._getParseContext(),P)&&!u.isValidAndSomeAliasIsNotNew(P,C)&&v.push(P);}),$&&(M.commands.length>0||x.length>0||j)&&F._.slice(M.commands.length).forEach(P=>{x.indexOf(""+P)===-1&&v.push(""+P);}),v.length>0&&t.fail(o("Unknown argument: %s","Unknown arguments: %s",v.length,v.join(", ")));},u.unknownCommands=function(F){let C=e.getCommandInstance().getCommands(),_=[],j=e.getContext();return (j.commands.length>0||C.length>0)&&F._.slice(j.commands.length).forEach($=>{C.indexOf(""+$)===-1&&_.push(""+$);}),_.length>0?(t.fail(o("Unknown command: %s","Unknown commands: %s",_.length,_.join(", "))),!0):!1},u.isValidAndSomeAliasIsNotNew=function(F,C){if(!Object.prototype.hasOwnProperty.call(C,F))return !1;let _=e.parsed.newAliases;for(let j of [F,...C[F]])if(!Object.prototype.hasOwnProperty.call(_,j)||!_[F])return !0;return !1},u.limitedChoices=function(F){let C=e.getOptions(),_={};if(!Object.keys(C.choices).length)return;Object.keys(F).forEach(x=>{sf.indexOf(x)===-1&&Object.prototype.hasOwnProperty.call(C.choices,x)&&[].concat(F[x]).forEach(v=>{C.choices[x].indexOf(v)===-1&&v!==void 0&&(_[x]=(_[x]||[]).concat(v));});});let j=Object.keys(_);if(!j.length)return;let $=s("Invalid values:");j.forEach(x=>{$+=` + ${s("Argument: %s, Given: %s, Choices: %s",x,t.stringifiedValues(_[x]),t.stringifiedValues(C.choices[x]))}`;}),t.fail($);};let c=[];u.check=function(F,C){c.push({func:F,global:C});},u.customChecks=function(F,C){for(let _=0,j;(j=c[_])!==void 0;_++){let $=j.func,x=null;try{x=$(F,C);}catch(v){t.fail(v.message?v.message:v,v);continue}x?(typeof x=="string"||x instanceof Error)&&t.fail(x.toString(),x):t.fail(s("Argument check failed: %s",$.toString()));}};let d={};u.implies=function(F,C){oe(" [array|number|string]",[F,C],arguments.length),typeof F=="object"?Object.keys(F).forEach(_=>{u.implies(_,F[_]);}):(e.global(F),d[F]||(d[F]=[]),Array.isArray(C)?C.forEach(_=>u.implies(F,_)):(rt(C,void 0,n),d[F].push(C)));},u.getImplied=function(){return d};function g(y,F){let C=Number(F);return F=isNaN(C)?F:C,typeof F=="number"?F=y._.length>=F:F.match(/^--no-.+/)?(F=F.match(/^--no-(.+)/)[1],F=!y[F]):F=y[F],F}u.implications=function(F){let C=[];if(Object.keys(d).forEach(_=>{let j=_;(d[_]||[]).forEach($=>{let x=j,v=$;x=g(F,x),$=g(F,$),x&&!$&&C.push(` ${j} -> ${v}`);});}),C.length){let _=`${s("Implications failed:")} +`;C.forEach(j=>{_+=j;}),t.fail(_);}};let m={};u.conflicts=function(F,C){oe(" [array|string]",[F,C],arguments.length),typeof F=="object"?Object.keys(F).forEach(_=>{u.conflicts(_,F[_]);}):(e.global(F),m[F]||(m[F]=[]),Array.isArray(C)?C.forEach(_=>u.conflicts(F,_)):m[F].push(C));},u.getConflicting=()=>m,u.conflicting=function(F){Object.keys(F).forEach(C=>{m[C]&&m[C].forEach(_=>{_&&F[C]!==void 0&&F[_]!==void 0&&t.fail(s("Arguments %s and %s are mutually exclusive",C,_));});});},u.recommendCommands=function(F,C){C=C.sort((x,v)=>v.length-x.length);let j=null,$=1/0;for(let x=0,v;(v=C[x])!==void 0;x++){let M=Cw(F,v);M<=3&&M<$&&($=M,j=v);}j&&t.fail(s("Did you mean %s?",j));},u.reset=function(F){return d=Vr(d,C=>!F[C]),m=Vr(m,C=>!F[C]),c=c.filter(C=>C.global),u};let D=[];return u.freeze=function(){D.push({implied:d,checks:c,conflicting:m});},u.unfreeze=function(){let F=D.pop();rt(F,void 0,n),{implied:d,checks:c,conflicting:m}=F;},u}var ce;function bw(e){return ce=e,xw}function xw(e=[],t=ce.process.cwd(),r){let n={},s,o=null,u={},c=[],d="",g={},m,D,y=null,F=ce.y18n;n.middleware=uf(c,n),n.scriptName=function(E){return n.customScriptName=!0,n.$0=E,n};let C;/\b(node|iojs|electron)(\.exe)?$/.test(ce.process.argv()[0])?C=ce.process.argv().slice(1,2):C=ce.process.argv().slice(0,1),n.$0=C.map(E=>{let S=ff(t,E);return E.match(/^(\/|([a-zA-Z]:)?\\)/)&&S.length_;let j=!1,$=null;n.exit=(E,S)=>{j=!0,$=S,ie&&ce.process.exit(E);};let x=null;n.completion=function(E,S,h){return oe("[string] [string|boolean|function] [function]",[E,S,h],arguments.length),typeof S=="function"&&(h=S,S=void 0),x=E||x||"completion",!S&&S!==!1&&(S="generate completion script"),n.command(x,S),h&&o.registerFunction(h),n};let v;n.resetOptions=n.reset=function(S={}){_.resets++,v=v||{};let h={};h.local=v.local?v.local:[],h.configObjects=v.configObjects?v.configObjects:[];let w={};h.local.forEach(b=>{w[b]=!0,(S[b]||[]).forEach(z=>{w[z]=!0;});}),Object.assign(g,Object.keys(u).reduce((b,z)=>{let Q=u[z].filter(re=>!(re in w));return Q.length>0&&(b[z]=Q),b},{})),u={};let T=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],A=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","coerce","deprecatedOptions"];return T.forEach(b=>{h[b]=(v[b]||[]).filter(z=>!w[z]);}),A.forEach(b=>{h[b]=Vr(v[b],z=>!w[z]);}),h.envPrefix=v.envPrefix,v=h,m=m?m.reset(w):vw(n,F,ce),D=D?D.reset(w):Ow(n,m,F,ce),s=s?s.reset():mw(n,m,D,c,ce),o||(o=Fw(n,m,s,ce)),x=null,d="",$=null,j=!1,n.parsed=!1,n},n.resetOptions();let M=[];function P(){M.push({options:v,configObjects:v.configObjects.slice(0),exitProcess:ie,groups:u,strict:K,strictCommands:ye,strictOptions:de,completionCommand:x,output:d,exitError:$,hasOutput:j,parsed:n.parsed,parseFn:k,parseContext:G,handlerFinishCommand:y}),m.freeze(),D.freeze(),s.freeze();}function J(){let E=M.pop();rt(E,void 0,ce);let S;(({options:v,configObjects:S,exitProcess:ie,groups:u,output:d,exitError:$,hasOutput:j,parsed:n.parsed,strict:K,strictCommands:ye,strictOptions:de,completionCommand:x,parseFn:k,parseContext:G,handlerFinishCommand:y}=E)),v.configObjects=S,m.unfreeze(),D.unfreeze(),s.unfreeze();}n.boolean=function(E){return oe("",[E],arguments.length),X("boolean",E),n},n.array=function(E){return oe("",[E],arguments.length),X("array",E),n},n.number=function(E){return oe("",[E],arguments.length),X("number",E),n},n.normalize=function(E){return oe("",[E],arguments.length),X("normalize",E),n},n.count=function(E){return oe("",[E],arguments.length),X("count",E),n},n.string=function(E){return oe("",[E],arguments.length),X("string",E),n},n.requiresArg=function(E){return oe(" [number]",[E],arguments.length),typeof E=="string"&&v.narg[E]||ee(n.requiresArg,"narg",E,NaN),n},n.skipValidation=function(E){return oe("",[E],arguments.length),X("skipValidation",E),n};function X(E,S){S=[].concat(S),S.forEach(h=>{h=Y(h),v[E].push(h);});}n.nargs=function(E,S){return oe(" [number]",[E,S],arguments.length),ee(n.nargs,"narg",E,S),n},n.choices=function(E,S){return oe(" [string|array]",[E,S],arguments.length),Z(n.choices,"choices",E,S),n},n.alias=function(E,S){return oe(" [string|array]",[E,S],arguments.length),Z(n.alias,"alias",E,S),n},n.default=n.defaults=function(E,S,h){return oe(" [*] [string]",[E,S,h],arguments.length),h&&(ef(E,ce),v.defaultDescription[E]=h),typeof S=="function"&&(ef(E,ce),v.defaultDescription[E]||(v.defaultDescription[E]=m.functionDescription(S)),S=S.call()),ee(n.default,"default",E,S),n},n.describe=function(E,S){return oe(" [string]",[E,S],arguments.length),te(E,!0),m.describe(E,S),n};function te(E,S){return ee(te,"key",E,S),n}function L(E,S){return oe(" [string]",[E,S],arguments.length),ee(n.demandOption,"demandedOptions",E,S),n}n.demandOption=L,n.coerce=function(E,S){return oe(" [function]",[E,S],arguments.length),ee(n.coerce,"coerce",E,S),n};function ee(E,S,h,w){q(E,S,h,w,(T,A,b)=>{v[T][A]=b;});}function Z(E,S,h,w){q(E,S,h,w,(T,A,b)=>{v[T][A]=(v[T][A]||[]).concat(b);});}function q(E,S,h,w,T){if(Array.isArray(h))h.forEach(A=>{E(A,w);});else if((A=>typeof A=="object")(h))for(let A of Ui(h))E(A,h[A]);else T(S,Y(h),w);}function Y(E){return E==="__proto__"?"___proto___":E}function V(E){Ui(v).forEach(S=>{if((w=>w==="configObjects")(S))return;let h=v[S];Array.isArray(h)?~h.indexOf(E)&&h.splice(h.indexOf(E),1):typeof h=="object"&&delete h[E];}),delete m.getDescriptions()[E];}n.config=function(S="config",h,w){return oe("[object|string] [string|function] [function]",[S,h,w],arguments.length),typeof S=="object"&&!Array.isArray(S)?(S=zi(S,t,n.getParserConfiguration()["deep-merge-config"]||!1,ce),v.configObjects=(v.configObjects||[]).concat(S),n):(typeof h=="function"&&(w=h,h=void 0),n.describe(S,h||m.deferY18nLookup("Path to JSON config file")),(Array.isArray(S)?S:[S]).forEach(T=>{v.config[T]=w||!0;}),n)},n.example=function(E,S){return oe(" [string]",[E,S],arguments.length),Array.isArray(E)?E.forEach(h=>n.example(...h)):m.example(E,S),n},n.command=function(E,S,h,w,T,A){return oe(" [string|boolean] [function|object] [function] [array] [boolean|string]",[E,S,h,w,T,A],arguments.length),s.addHandler(E,S,h,w,T,A),n},n.commandDir=function(E,S){oe(" [object]",[E,S],arguments.length);let h=r||ce.require;return s.addDirectory(E,n.getContext(),h,ce.getCallerFile(),S),n},n.demand=n.required=n.require=function(S,h,w){return Array.isArray(h)?(h.forEach(T=>{rt(w,!0,ce),L(T,w);}),h=1/0):typeof h!="number"&&(w=h,h=1/0),typeof S=="number"?(rt(w,!0,ce),n.demandCommand(S,h,w,w)):Array.isArray(S)?S.forEach(T=>{rt(w,!0,ce),L(T,w);}):typeof w=="string"?L(S,w):(w===!0||typeof w>"u")&&L(S),n},n.demandCommand=function(S=1,h,w,T){return oe("[number] [number|string] [string|null|undefined] [string|null|undefined]",[S,h,w,T],arguments.length),typeof h!="number"&&(w=h,h=1/0),n.global("_",!1),v.demandedCommands._={min:S,max:h,minMsg:w,maxMsg:T},n},n.getDemandedOptions=()=>(oe([],0),v.demandedOptions),n.getDemandedCommands=()=>(oe([],0),v.demandedCommands),n.deprecateOption=function(S,h){return oe(" [string|boolean]",[S,h],arguments.length),v.deprecatedOptions[S]=h,n},n.getDeprecatedOptions=()=>(oe([],0),v.deprecatedOptions),n.implies=function(E,S){return oe(" [number|string|array]",[E,S],arguments.length),D.implies(E,S),n},n.conflicts=function(E,S){return oe(" [string|array]",[E,S],arguments.length),D.conflicts(E,S),n},n.usage=function(E,S,h,w){if(oe(" [string|boolean] [function|object] [function]",[E,S,h,w],arguments.length),S!==void 0){if(rt(E,null,ce),(E||"").match(/^\$0( |$)/))return n.command(E,S,h,w);throw new nt(".usage() description must start with $0 if being used as alias for .command()")}else return m.usage(E),n},n.epilogue=n.epilog=function(E){return oe("",[E],arguments.length),m.epilog(E),n},n.fail=function(E){return oe("",[E],arguments.length),m.failFn(E),n},n.onFinishCommand=function(E){return oe("",[E],arguments.length),y=E,n},n.getHandlerFinishCommand=()=>y,n.check=function(E,S){return oe(" [boolean]",[E,S],arguments.length),D.check(E,S!==!1),n},n.global=function(E,S){return oe(" [boolean]",[E,S],arguments.length),E=[].concat(E),S!==!1?v.local=v.local.filter(h=>E.indexOf(h)===-1):E.forEach(h=>{v.local.indexOf(h)===-1&&v.local.push(h);}),n},n.pkgConf=function(S,h){oe(" [string]",[S,h],arguments.length);let w=null,T=W(h||t);return T[S]&&typeof T[S]=="object"&&(w=zi(T[S],h||t,n.getParserConfiguration()["deep-merge-config"]||!1,ce),v.configObjects=(v.configObjects||[]).concat(w)),n};let I={};function W(E){let S=E||"*";if(I[S])return I[S];let h={};try{let w=E||ce.mainFilename;!E&&ce.path.extname(w)&&(w=ce.path.dirname(w));let T=ce.findUp(w,(A,b)=>{if(b.includes("package.json"))return "package.json"});rt(T,void 0,ce),h=JSON.parse(ce.readFileSync(T,"utf8"));}catch{}return I[S]=h||{},I[S]}let k=null,G=null;n.parse=function(S,h,w){if(oe("[string|array] [function|boolean|object] [function]",[S,h,w],arguments.length),P(),typeof S>"u"){let A=n._parseArgs(e),b=n.parsed;return J(),n.parsed=b,A}typeof h=="object"&&(G=h,h=w),typeof h=="function"&&(k=h,h=!1),h||(e=S),k&&(ie=!1);let T=n._parseArgs(S,!!h);return o.setParsed(n.parsed),k&&k($,T,d),J(),T},n._getParseContext=()=>G||{},n._hasParseCallback=()=>!!k,n.option=n.options=function(S,h){if(oe(" [object]",[S,h],arguments.length),typeof S=="object")Object.keys(S).forEach(w=>{n.options(w,S[w]);});else {typeof h!="object"&&(h={}),v.key[S]=!0,h.alias&&n.alias(S,h.alias);let w=h.deprecate||h.deprecated;w&&n.deprecateOption(S,w);let T=h.demand||h.required||h.require;T&&n.demand(S,T),h.demandOption&&n.demandOption(S,typeof h.demandOption=="string"?h.demandOption:void 0),h.conflicts&&n.conflicts(S,h.conflicts),"default"in h&&n.default(S,h.default),h.implies!==void 0&&n.implies(S,h.implies),h.nargs!==void 0&&n.nargs(S,h.nargs),h.config&&n.config(S,h.configParser),h.normalize&&n.normalize(S),h.choices&&n.choices(S,h.choices),h.coerce&&n.coerce(S,h.coerce),h.group&&n.group(S,h.group),(h.boolean||h.type==="boolean")&&(n.boolean(S),h.alias&&n.boolean(h.alias)),(h.array||h.type==="array")&&(n.array(S),h.alias&&n.array(h.alias)),(h.number||h.type==="number")&&(n.number(S),h.alias&&n.number(h.alias)),(h.string||h.type==="string")&&(n.string(S),h.alias&&n.string(h.alias)),(h.count||h.type==="count")&&n.count(S),typeof h.global=="boolean"&&n.global(S,h.global),h.defaultDescription&&(v.defaultDescription[S]=h.defaultDescription),h.skipValidation&&n.skipValidation(S);let A=h.describe||h.description||h.desc;n.describe(S,A),h.hidden&&n.hide(S),h.requiresArg&&n.requiresArg(S);}return n},n.getOptions=()=>v,n.positional=function(E,S){if(oe(" ",[E,S],arguments.length),_.resets===0)throw new nt(".positional() can only be called in a command's builder function");let h=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];S=Vr(S,(A,b)=>{let z=h.indexOf(A)!==-1;return A==="type"&&["string","number","boolean"].indexOf(b)===-1&&(z=!1),z});let w=_.fullCommands[_.fullCommands.length-1],T=w?s.cmdToParseOptions(w):{array:[],alias:{},default:{},demand:{}};return Ui(T).forEach(A=>{let b=T[A];Array.isArray(b)?b.indexOf(E)!==-1&&(S[A]=!0):b[E]&&!(A in S)&&(S[A]=b[E]);}),n.group(E,m.getPositionalGroupName()),n.option(E,S)},n.group=function(S,h){oe(" ",[S,h],arguments.length);let w=g[h]||u[h];g[h]&&delete g[h];let T={};return u[h]=(w||[]).concat(S).filter(A=>T[A]?!1:T[A]=!0),n},n.getGroups=()=>Object.assign({},u,g),n.env=function(E){return oe("[string|boolean]",[E],arguments.length),E===!1?delete v.envPrefix:v.envPrefix=E||"",n},n.wrap=function(E){return oe("",[E],arguments.length),m.wrap(E),n};let K=!1;n.strict=function(E){return oe("[boolean]",[E],arguments.length),K=E!==!1,n},n.getStrict=()=>K;let ye=!1;n.strictCommands=function(E){return oe("[boolean]",[E],arguments.length),ye=E!==!1,n},n.getStrictCommands=()=>ye;let de=!1;n.strictOptions=function(E){return oe("[boolean]",[E],arguments.length),de=E!==!1,n},n.getStrictOptions=()=>de;let Ye={};n.parserConfiguration=function(S){return oe("",[S],arguments.length),Ye=S,n},n.getParserConfiguration=()=>Ye,n.showHelp=function(E){return oe("[string|function]",[E],arguments.length),n.parsed||n._parseArgs(e),s.hasDefaultCommand()&&(_.resets++,s.runDefaultBuilderOn(n)),m.showHelp(E),n};let R=null;n.version=function(S,h,w){let T="version";if(oe("[boolean|string] [string] [string]",[S,h,w],arguments.length),R&&(V(R),m.version(void 0),R=null),arguments.length===0)w=Ke(),S=T;else if(arguments.length===1){if(S===!1)return n;w=S,S=T;}else arguments.length===2&&(w=h,h=void 0);return R=typeof S=="string"?S:T,h=h||m.deferY18nLookup("Show version number"),m.version(w||void 0),n.boolean(R),n.describe(R,h),n};function Ke(){return W().version||"unknown"}let Ne=null;n.addHelpOpt=n.help=function(S,h){let w="help";return oe("[string|boolean] [string]",[S,h],arguments.length),Ne&&(V(Ne),Ne=null),arguments.length===1&&S===!1||(Ne=typeof S=="string"?S:w,n.boolean(Ne),n.describe(Ne,h||m.deferY18nLookup("Show help"))),n};let Ct="show-hidden";v.showHiddenOpt=Ct,n.addShowHiddenOpt=n.showHidden=function(S,h){if(oe("[string|boolean] [string]",[S,h],arguments.length),arguments.length===1&&S===!1)return n;let w=typeof S=="string"?S:Ct;return n.boolean(w),n.describe(w,h||m.deferY18nLookup("Show hidden options")),v.showHiddenOpt=w,n},n.hide=function(S){return oe("",[S],arguments.length),v.hiddenOptions.push(S),n},n.showHelpOnFail=function(S,h){return oe("[boolean|string] [string]",[S,h],arguments.length),m.showHelpOnFail(S,h),n};let ie=!0;n.exitProcess=function(E=!0){return oe("[boolean]",[E],arguments.length),ie=E,n},n.getExitProcess=()=>ie,n.showCompletionScript=function(E,S){return oe("[string] [string]",[E,S],arguments.length),E=E||n.$0,le.log(o.generateCompletionScript(E,S||x||"completion")),n},n.getCompletion=function(E,S){oe(" ",[E,S],arguments.length),o.getCompletion(E,S);},n.locale=function(E){return oe("[string]",[E],arguments.length),E?(ve=!1,F.setLocale(E),n):(Ce(),F.getLocale())},n.updateStrings=n.updateLocale=function(E){return oe("",[E],arguments.length),ve=!1,F.updateLocale(E),n};let ve=!0;n.detectLocale=function(E){return oe("",[E],arguments.length),ve=E,n},n.getDetectLocale=()=>ve;let le={log(...E){n._hasParseCallback()||console.log(...E),j=!0,d.length&&(d+=` `),d+=E.join(" ");},error(...E){n._hasParseCallback()||console.error(...E),j=!0,d.length&&(d+=` -`),d+=E.join(" ");}};n._getLoggerInstance=()=>le,n._hasOutput=()=>j,n._setHasOutput=()=>{j=!0;};let ve;n.recommendCommands=function(E=!0){return oe("[boolean]",[E],arguments.length),ve=E,n},n.getUsageInstance=()=>m,n.getValidationInstance=()=>D,n.getCommandInstance=()=>s,n.terminalWidth=()=>(oe([],0),ce.process.stdColumns),Object.defineProperty(n,"argv",{get:()=>n._parseArgs(e),enumerable:!0}),n._parseArgs=function(S,h,v,T){let A=!!v;S=S||e,w.__=F.__,w.configuration=n.getParserConfiguration();let b=!!w.configuration["populate--"],z=Object.assign({},w.configuration,{"populate--":!0}),Q=ce.Parser.detailed(S,Object.assign({},w,{configuration:Object.assign({"parse-positional-numbers":!1},z)})),re=Q.argv;G&&(re=Object.assign({},re,G));let Ae=Q.aliases;re.$0=n.$0,n.parsed=Q;try{if(Ce(),h)return n._postProcess(re,b,v);Ne&&~[Ne].concat(Ae[Ne]||[]).filter(pe=>pe.length>1).indexOf(""+re._[re._.length-1])&&(re._.pop(),re[Ne]=!0);let Fe=s.getCommands(),Pe=o.completionKey in re,cn=re[Ne]||Pe,Cr=cn&&(Fe.length>1||Fe[0]!=="$0");if(re._.length){if(Fe.length){let Te;for(let pe=T||0,Dt;re._[pe]!==void 0;pe++)if(Dt=String(re._[pe]),~Fe.indexOf(Dt)&&Dt!==x){let ei=s.runCommand(Dt,n,Q,pe+1);return n._postProcess(ei,b)}else if(!Te&&Dt!==x){Te=Dt;break}if(s.hasDefaultCommand()&&!Cr){let pe=s.runCommand(null,n,Q);return n._postProcess(pe,b)}ve&&Te&&!cn&&D.recommendCommands(Te,Fe);}x&&~re._.indexOf(x)&&!Pe&&(ie&&Mn(!0),n.showCompletionScript(),n.exit(0));}else if(s.hasDefaultCommand()&&!Cr){let Te=s.runCommand(null,n,Q);return n._postProcess(Te,b)}if(Pe){ie&&Mn(!0),S=[].concat(S);let Te=S.slice(S.indexOf(`--${o.completionKey}`)+1);return o.getCompletion(Te,pe=>{(pe||[]).forEach(Dt=>{le.log(Dt);}),n.exit(0);}),n._postProcess(re,!b,v)}if(j||Object.keys(re).forEach(Te=>{Te===Ne&&re[Te]?(ie&&Mn(!0),A=!0,n.showHelp("log"),n.exit(0)):Te===R&&re[Te]&&(ie&&Mn(!0),A=!0,m.showVersion(),n.exit(0));}),!A&&w.skipValidation.length>0&&(A=Object.keys(re).some(Te=>w.skipValidation.indexOf(Te)>=0&&re[Te]===!0)),!A){if(Q.error)throw new nt(Q.error.message);Pe||n._runValidation(re,Ae,{},Q.error);}}catch(Fe){if(Fe instanceof nt)m.fail(Fe.message,Fe);else throw Fe}return n._postProcess(re,b,v)},n._postProcess=function(E,S,h=!1){return Ut(E)||h||(S||(E=n._copyDoubleDash(E)),(n.getParserConfiguration()["parse-positional-numbers"]||n.getParserConfiguration()["parse-positional-numbers"]===void 0)&&(E=n._parsePositionalNumbers(E))),E},n._copyDoubleDash=function(E){if(!E._||!E["--"])return E;E._.push.apply(E._,E["--"]);try{delete E["--"];}catch{}return E},n._parsePositionalNumbers=function(E){let S=E["--"]?E["--"]:E._;for(let h=0,v;(v=S[h])!==void 0;h++)ce.Parser.looksLikeNumber(v)&&Number.isSafeInteger(Math.floor(parseFloat(`${v}`)))&&(S[h]=Number(v));return E},n._runValidation=function(S,h,v,T,A=!1){if(T)throw new nt(T.message);D.nonOptionCount(S),D.requiredArguments(S);let b=!1;ye&&(b=D.unknownCommands(S)),K&&!b?D.unknownArguments(S,h,v,A):de&&D.unknownArguments(S,h,{},!1,!1),D.customChecks(S,h),D.limitedChoices(S),D.implications(S),D.conflicting(S);};function Ce(){if(!we)return;let E=ce.getEnv("LC_ALL")||ce.getEnv("LC_MESSAGES")||ce.getEnv("LANG")||ce.getEnv("LANGUAGE")||"en_US";n.locale(E.replace(/[.:].*/,""));}return n.help(),n.version(),n}var ff=(e,t)=>ce.path.relative(e,t);function Av(e){return !!e&&typeof e._parseArgs=="function"}var Ko,Qo,{readFileSync:Mv}=U("fs"),{inspect:Tv}=U("util"),{resolve:jv}=U("path"),Iv=rl(),Nv=Ro(),df={assert:{notStrictEqual:Kl.notStrictEqual,strictEqual:Kl.strictEqual},cliui:Bl(),findUp:Ul(),getEnv:e=>process.env[e],getCallerFile:Hl(),getProcessArgvBin:lf,inspect:Tv,mainFilename:(Qo=(Ko=U?.main)===null||Ko===void 0?void 0:Ko.filename)!==null&&Qo!==void 0?Qo:process.cwd(),Parser:Nv,path:U("path"),process:{argv:()=>process.argv,cwd:process.cwd,execPath:()=>process.execPath,exit:e=>{process.exit(e);},nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:Mv,require:U,requireDirectory:Zl(),stringWidth:Pi(),y18n:Iv({directory:jv(__dirname,"../locales"),updateFiles:!1})},of=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):10;if(process&&process.version&&Number(process.version.match(/v([^.]+)/)[1]){var{Yargs:Pv,processArgv:Rv}=pf();Gr(Rv.hideBin(process.argv));mf.exports=Gr;function Gr(e,t){let r=Pv(e,t,U);return Bv(r),r}function Bv(e){Object.keys(e).forEach(t=>{t==="argv"?Gr.__defineGetter__(t,e.__lookupGetter__(t)):typeof e[t]=="function"?Gr[t]=e[t].bind(e):(Gr.__defineGetter__("$0",()=>e.$0),Gr.__defineGetter__("parsed",()=>e.parsed));});}});var yf=B(Df=>{var qv=U("util"),Vi=Br(),gf=hr().Memory,na=Df.Argv=function(e,t){gf.call(this,e),e=e||{},this.type="argv",this.readOnly=!0,this.options=e,this.usage=t,typeof e.parseValues=="boolean"?(this.parseValues=e.parseValues,delete e.parseValues):this.parseValues=!1,typeof e.transform=="function"?(this.transform=e.transform,delete e.transform):this.transform=!1,typeof e.separator=="string"||e.separator instanceof RegExp?(this.separator=e.separator,delete e.separator):this.separator="";};qv.inherits(na,gf);na.prototype.loadSync=function(){return this.loadArgv(),this.store};na.prototype.loadArgv=function(){var e=this,t,r;if(t=Yv(this.options)?this.options:typeof this.options=="object"?ra()(process.argv.slice(2)).options(this.options):ra()(process.argv.slice(2)),typeof this.usage=="string"&&t.usage(this.usage),r=t.argv,!!r)return this.transform&&(r=Vi.transform(r,this.transform)),this.readOnly=!1,Object.keys(r).forEach(function(n){var s=r[n];typeof s<"u"&&(e.parseValues&&(s=Vi.parseValues(s)),e.separator?e.set(Vi.key.apply(Vi,n.split(e.separator)),s):e.set(n,s));}),this.showHelp=t.showHelp,this.help=t.help,this.readOnly=!0,this.store};function Yv(e){return (typeof e=="function"||typeof e=="object")&&"argv"in e}});var Ef=B(vf=>{var Wv=U("util"),Gi=Br(),wf=hr().Memory,ia=vf.Env=function(e){wf.call(this,e),e=e||{},this.type="env",this.readOnly=!0,this.whitelist=e.whitelist||[],this.separator=e.separator||"",this.lowerCase=e.lowerCase||!1,this.parseValues=e.parseValues||!1,this.transform=e.transform||!1,{}.toString.call(e.match)==="[object RegExp]"&&typeof e!="string"&&(this.match=e.match),e instanceof Array&&(this.whitelist=e),(typeof e=="string"||e instanceof RegExp)&&(this.separator=e);};Wv.inherits(ia,wf);ia.prototype.loadSync=function(){return this.loadEnv(),this.store};ia.prototype.loadEnv=function(){var e=this,t=process.env;return this.lowerCase&&(t={},Object.keys(process.env).forEach(function(r){t[r.toLowerCase()]=process.env[r];})),this.transform&&(t=Gi.transform(t,this.transform)),this.readOnly=!1,Object.keys(t).filter(function(r){return e.match&&e.whitelist.length?r.match(e.match)||e.whitelist.indexOf(r)!==-1:e.match?r.match(e.match):!e.whitelist.length||e.whitelist.indexOf(r)!==-1}).forEach(function(r){var n=t[r];e.parseValues&&(n=Gi.parseValues(n)),e.separator?e.set(Gi.key.apply(Gi,r.split(e.separator)),n):e.set(r,n);}),this.readOnly=!0,this.store};});var Sf=B((fC,Ff)=>{var Uv=U("crypto"),zv={stringify:function(e,t,r){return JSON.stringify(e,t||null,r||2)},parse:JSON.parse};Ff.exports=sa;function sa(e){if(e=e||{},this.secret=typeof e!="string"?e.secret:e,this.format=e.format||zv,this.alg=e.alg||"aes-256-ctr",!this.secret)throw new Error("Secret is a required option")}sa.prototype.encrypt=function(t,r){var n=this;return Object.keys(t).reduce(function(s,o){var u=n.format.stringify(t[o]);return s[o]={alg:n.alg,value:_f(u,{alg:n.alg,secret:n.secret,encs:{input:"utf8",output:"hex"}})},s},{})};sa.prototype.decrypt=function(t,r){var n=this;return Object.keys(t).reduce(function(s,o){var u=_f(t[o].value,{alg:t[o].alg||n.alg,secret:n.secret,encs:{input:"hex",output:"utf8"}});return s[o]=n.format.parse(u),s},{})};function _f(e,t){var r=t.encs,n=Uv.createCipher(t.alg,t.secret);return n.update(e,r.input,r.output)+n.final(r.output)}});var bf=B(Of=>{var Je=U("fs"),Tn=U("path"),Hv=U("util"),Vv=Sf(),Gv=Li(),Cf=hr().Memory,Jv=Je.exists||Tn.exists,Zv=Je.existsSync||Tn.existsSync,zt=Of.File=function(e){if(!e||!e.file)throw new Error("Missing required option `file`");if(Cf.call(this,e),this.type="file",this.file=e.file,this.dir=e.dir||process.cwd(),this.format=e.format||Gv.json,this.secure=e.secure,this.spacing=e.json_spacing||e.spacing||2,this.secure){if(this.secure=Buffer.isBuffer(this.secure)||typeof this.secure=="string"?{secret:this.secure.toString()}:this.secure,this.secure.alg=this.secure.alg||"aes-256-ctr",this.secure.secretPath&&(this.secure.secret=Je.readFileSync(this.secure.secretPath,"utf8")),!this.secure.secret)throw new Error("secure.secret option is required");this.keys=new Vv({secret:this.secure.secret,alg:this.secure.alg,format:this.format});}e.search&&this.search(this.dir);};Hv.inherits(zt,Cf);zt.prototype.save=function(e,t){this.saveToFile(this.file,e,t);};zt.prototype.saveToFile=function(e,t,r){r||(r=t,t=this.format),Je.writeFile(e,this.stringify(t),r);};zt.prototype.saveSync=function(){return Je.writeFileSync(this.file,this.stringify()),this.store};zt.prototype.load=function(e){var t=this;Jv(t.file,function(r){if(!r)return e(null,{});Je.readFile(t.file,function(n,s){if(n)return e(n);try{var o=s.toString();o.charAt(0)==="\uFEFF"&&(o=o.substr(1)),t.store=t.parse(o);}catch(u){return e(new Error("Error parsing your configuration file: ["+t.file+"]: "+u.message))}e(null,t.store);});});};zt.prototype.loadSync=function(){if(!Zv(this.file))return this.store={},this.store;try{var e=Je.readFileSync(this.file,"utf8");e.charAt(0)==="\uFEFF"&&(e=e.substr(1)),this.store=this.parse(e);}catch(t){throw new Error("Error parsing your configuration file: ["+this.file+"]: "+t.message)}return this.store};zt.prototype.stringify=function(e){var t=this.store;return e||(e=this.format),this.secure&&(t=this.keys.encrypt(t)),e.stringify(t,null,this.spacing)};zt.prototype.parse=function(e){var t=this.format.parse(e);return this.secure?this.keys.decrypt(t):t};zt.prototype.search=function(e){var t=!0,r,n,s;if(e=e||process.cwd(),this.file[0]==="/")try{s=Je.statSync(Je.realpathSync(this.file)),s.isFile()&&(r=this.file,t=!1);}catch{}if(t&&e)try{var o=Je.statSync(Je.realpathSync(e));t=o.isDirectory();}catch{return !1}for(;t;)try{s=Je.statSync(Je.realpathSync(r=Tn.join(e,this.file))),t=s.isDirectory();}catch{if(n=e,e=Tn.dirname(e),n===e){try{s=Je.statSync(Je.realpathSync(r=Tn.join(this.dir,this.file))),s.isDirectory()&&(r=void 0);}catch{}t=!1;}}return this.file=r||this.file,r};});var Tf=B(Mf=>{var Kv=U("util"),xf=hr().Memory,Af=Mf.Literal=function(t){xf.call(this,t),t=t||{},this.type="literal",this.readOnly=!0,this.store=t.store||t;};Kv.inherits(Af,xf);Af.prototype.loadSync=function(){return this.store};});var $i=B((pC,If)=>{var Ji=Br(),jf=Xc().Provider,ct=If.exports=new jf;ct.version=el().version;ct.__defineGetter__("Argv",function(){return yf().Argv});ct.__defineGetter__("Env",function(){return Ef().Env});ct.__defineGetter__("File",function(){return bf().File});ct.__defineGetter__("Literal",function(){return Tf().Literal});ct.__defineGetter__("Memory",function(){return hr().Memory});ct.key=Ji.key;ct.path=Ji.path;ct.loadFiles=Ji.loadFiles;ct.loadFilesSync=Ji.loadFilesSync;ct.formats=Li();ct.Provider=jf;});var kf=B((vC,$f)=>{var Zr=1e3,Kr=Zr*60,Qr=Kr*60,pr=Qr*24,nE=pr*7,iE=pr*365.25;$f.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return sE(e);if(r==="number"&&isFinite(e))return t.long?aE(e):oE(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function sE(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*iE;case"weeks":case"week":case"w":return r*nE;case"days":case"day":case"d":return r*pr;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Qr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Kr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Zr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function oE(e){var t=Math.abs(e);return t>=pr?Math.round(e/pr)+"d":t>=Qr?Math.round(e/Qr)+"h":t>=Kr?Math.round(e/Kr)+"m":t>=Zr?Math.round(e/Zr)+"s":e+"ms"}function aE(e){var t=Math.abs(e);return t>=pr?Zi(e,t,pr,"day"):t>=Qr?Zi(e,t,Qr,"hour"):t>=Kr?Zi(e,t,Kr,"minute"):t>=Zr?Zi(e,t,Zr,"second"):e+" ms"}function Zi(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var aa=B((EC,Pf)=>{function uE(e){r.debug=r,r.default=r,r.coerce=d,r.disable=o,r.enable=s,r.enabled=u,r.humanize=kf(),r.destroy=g,Object.keys(e).forEach(m=>{r[m]=e[m];}),r.names=[],r.skips=[],r.formatters={};function t(m){let D=0;for(let y=0;y{if(J==="%%")return "%";M++;let te=r.formatters[X];if(typeof te=="function"){let L=j[M];J=te.call($,L),j.splice(M,1),M--;}return J}),r.formatArgs.call($,j),($.log||r.log).apply($,j);}return _.namespace=m,_.useColors=r.useColors(),_.color=r.selectColor(m),_.extend=n,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(F!==r.namespaces&&(F=r.namespaces,C=r.enabled(m)),C),set:j=>{y=j;}}),typeof r.init=="function"&&r.init(_),_}function n(m,D){let y=r(this.namespace+(typeof D>"u"?":":D)+m);return y.log=this.log,y}function s(m){r.save(m),r.namespaces=m,r.names=[],r.skips=[];let D,y=(typeof m=="string"?m:"").split(/[\s,]+/),F=y.length;for(D=0;D"-"+D)].join(",");return r.enable(""),m}function u(m){if(m[m.length-1]==="*")return !0;let D,y;for(D=0,y=r.skips.length;D{it.formatArgs=lE;it.save=fE;it.load=dE;it.useColors=cE;it.storage=hE();it.destroy=(()=>{let e=!1;return ()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})();it.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function cE(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function lE(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Ki.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r));}),e.splice(n,0,t);}it.log=console.debug||console.log||(()=>{});function fE(e){try{e?it.storage.setItem("debug",e):it.storage.removeItem("debug");}catch{}}function dE(){let e;try{e=it.storage.getItem("debug");}catch{}return !e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function hE(){try{return localStorage}catch{}}Ki.exports=aa()(it);var{formatters:pE}=Ki.exports;pE.j=function(e){try{return JSON.stringify(e)}catch(t){return "[UnexpectedJSONParseError]: "+t.message}};});var qf=B((_C,Bf)=>{Bf.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n{var mE=U("os"),Yf=U("tty"),lt=qf(),{env:Be}=process,rr;lt("no-color")||lt("no-colors")||lt("color=false")||lt("color=never")?rr=0:(lt("color")||lt("colors")||lt("color=true")||lt("color=always"))&&(rr=1);"FORCE_COLOR"in Be&&(Be.FORCE_COLOR==="true"?rr=1:Be.FORCE_COLOR==="false"?rr=0:rr=Be.FORCE_COLOR.length===0?1:Math.min(parseInt(Be.FORCE_COLOR,10),3));function ua(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ca(e,t){if(rr===0)return 0;if(lt("color=16m")||lt("color=full")||lt("color=truecolor"))return 3;if(lt("color=256"))return 2;if(e&&!t&&rr===void 0)return 0;let r=rr||0;if(Be.TERM==="dumb")return r;if(process.platform==="win32"){let n=mE.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Be)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Be)||Be.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Be)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Be.TEAMCITY_VERSION)?1:0;if(Be.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Be){let n=parseInt((Be.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Be.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return /-256(color)?$/i.test(Be.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Be.TERM)||"COLORTERM"in Be?1:r}function gE(e){let t=ca(e,e&&e.isTTY);return ua(t)}Wf.exports={supportsColor:gE,stdout:ua(ca(!0,Yf.isatty(1))),stderr:ua(ca(!0,Yf.isatty(2)))};});var Hf=B((We,Xi)=>{var DE=U("tty"),Qi=U("util");We.init=SE;We.log=EE;We.formatArgs=wE;We.save=_E;We.load=FE;We.useColors=yE;We.destroy=Qi.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");We.colors=[6,2,3,4,5,1];try{let e=Uf();e&&(e.stderr||e).level>=2&&(We.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]);}catch{}We.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[t];return /^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function yE(){return "colors"in We.inspectOpts?!!We.inspectOpts.colors:DE.isatty(process.stderr.fd)}function wE(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${t} \x1B[0m`;e[0]=o+e[0].split(` +`),d+=E.join(" ");}};n._getLoggerInstance=()=>le,n._hasOutput=()=>j,n._setHasOutput=()=>{j=!0;};let we;n.recommendCommands=function(E=!0){return oe("[boolean]",[E],arguments.length),we=E,n},n.getUsageInstance=()=>m,n.getValidationInstance=()=>D,n.getCommandInstance=()=>s,n.terminalWidth=()=>(oe([],0),ce.process.stdColumns),Object.defineProperty(n,"argv",{get:()=>n._parseArgs(e),enumerable:!0}),n._parseArgs=function(S,h,w,T){let A=!!w;S=S||e,v.__=F.__,v.configuration=n.getParserConfiguration();let b=!!v.configuration["populate--"],z=Object.assign({},v.configuration,{"populate--":!0}),Q=ce.Parser.detailed(S,Object.assign({},v,{configuration:Object.assign({"parse-positional-numbers":!1},z)})),re=Q.argv;G&&(re=Object.assign({},re,G));let Ae=Q.aliases;re.$0=n.$0,n.parsed=Q;try{if(Ce(),h)return n._postProcess(re,b,w);Ne&&~[Ne].concat(Ae[Ne]||[]).filter(pe=>pe.length>1).indexOf(""+re._[re._.length-1])&&(re._.pop(),re[Ne]=!0);let Fe=s.getCommands(),Pe=o.completionKey in re,cn=re[Ne]||Pe,Cr=cn&&(Fe.length>1||Fe[0]!=="$0");if(re._.length){if(Fe.length){let Te;for(let pe=T||0,Dt;re._[pe]!==void 0;pe++)if(Dt=String(re._[pe]),~Fe.indexOf(Dt)&&Dt!==x){let Xn=s.runCommand(Dt,n,Q,pe+1);return n._postProcess(Xn,b)}else if(!Te&&Dt!==x){Te=Dt;break}if(s.hasDefaultCommand()&&!Cr){let pe=s.runCommand(null,n,Q);return n._postProcess(pe,b)}we&&Te&&!cn&&D.recommendCommands(Te,Fe);}x&&~re._.indexOf(x)&&!Pe&&(ie&&Mn(!0),n.showCompletionScript(),n.exit(0));}else if(s.hasDefaultCommand()&&!Cr){let Te=s.runCommand(null,n,Q);return n._postProcess(Te,b)}if(Pe){ie&&Mn(!0),S=[].concat(S);let Te=S.slice(S.indexOf(`--${o.completionKey}`)+1);return o.getCompletion(Te,pe=>{(pe||[]).forEach(Dt=>{le.log(Dt);}),n.exit(0);}),n._postProcess(re,!b,w)}if(j||Object.keys(re).forEach(Te=>{Te===Ne&&re[Te]?(ie&&Mn(!0),A=!0,n.showHelp("log"),n.exit(0)):Te===R&&re[Te]&&(ie&&Mn(!0),A=!0,m.showVersion(),n.exit(0));}),!A&&v.skipValidation.length>0&&(A=Object.keys(re).some(Te=>v.skipValidation.indexOf(Te)>=0&&re[Te]===!0)),!A){if(Q.error)throw new nt(Q.error.message);Pe||n._runValidation(re,Ae,{},Q.error);}}catch(Fe){if(Fe instanceof nt)m.fail(Fe.message,Fe);else throw Fe}return n._postProcess(re,b,w)},n._postProcess=function(E,S,h=!1){return Ut(E)||h||(S||(E=n._copyDoubleDash(E)),(n.getParserConfiguration()["parse-positional-numbers"]||n.getParserConfiguration()["parse-positional-numbers"]===void 0)&&(E=n._parsePositionalNumbers(E))),E},n._copyDoubleDash=function(E){if(!E._||!E["--"])return E;E._.push.apply(E._,E["--"]);try{delete E["--"];}catch{}return E},n._parsePositionalNumbers=function(E){let S=E["--"]?E["--"]:E._;for(let h=0,w;(w=S[h])!==void 0;h++)ce.Parser.looksLikeNumber(w)&&Number.isSafeInteger(Math.floor(parseFloat(`${w}`)))&&(S[h]=Number(w));return E},n._runValidation=function(S,h,w,T,A=!1){if(T)throw new nt(T.message);D.nonOptionCount(S),D.requiredArguments(S);let b=!1;ye&&(b=D.unknownCommands(S)),K&&!b?D.unknownArguments(S,h,w,A):de&&D.unknownArguments(S,h,{},!1,!1),D.customChecks(S,h),D.limitedChoices(S),D.implications(S),D.conflicting(S);};function Ce(){if(!ve)return;let E=ce.getEnv("LC_ALL")||ce.getEnv("LC_MESSAGES")||ce.getEnv("LANG")||ce.getEnv("LANGUAGE")||"en_US";n.locale(E.replace(/[.:].*/,""));}return n.help(),n.version(),n}var ff=(e,t)=>ce.path.relative(e,t);function Aw(e){return !!e&&typeof e._parseArgs=="function"}var Ko,Qo,{readFileSync:Mw}=U("fs"),{inspect:Tw}=U("util"),{resolve:jw}=U("path"),Iw=rl(),Nw=Ro(),df={assert:{notStrictEqual:Kl.notStrictEqual,strictEqual:Kl.strictEqual},cliui:Bl(),findUp:Ul(),getEnv:e=>process.env[e],getCallerFile:Hl(),getProcessArgvBin:lf,inspect:Tw,mainFilename:(Qo=(Ko=U?.main)===null||Ko===void 0?void 0:Ko.filename)!==null&&Qo!==void 0?Qo:process.cwd(),Parser:Nw,path:U("path"),process:{argv:()=>process.argv,cwd:process.cwd,execPath:()=>process.execPath,exit:e=>{process.exit(e);},nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:Mw,require:U,requireDirectory:Zl(),stringWidth:ki(),y18n:Iw({directory:jw(__dirname,"../locales"),updateFiles:!1})},of=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):10;if(process&&process.version&&Number(process.version.match(/v([^.]+)/)[1]){var{Yargs:Pw,processArgv:Rw}=pf();Gr(Rw.hideBin(process.argv));mf.exports=Gr;function Gr(e,t){let r=Pw(e,t,U);return Bw(r),r}function Bw(e){Object.keys(e).forEach(t=>{t==="argv"?Gr.__defineGetter__(t,e.__lookupGetter__(t)):typeof e[t]=="function"?Gr[t]=e[t].bind(e):(Gr.__defineGetter__("$0",()=>e.$0),Gr.__defineGetter__("parsed",()=>e.parsed));});}});var yf=B(Df=>{var qw=U("util"),Hi=Br(),gf=hr().Memory,na=Df.Argv=function(e,t){gf.call(this,e),e=e||{},this.type="argv",this.readOnly=!0,this.options=e,this.usage=t,typeof e.parseValues=="boolean"?(this.parseValues=e.parseValues,delete e.parseValues):this.parseValues=!1,typeof e.transform=="function"?(this.transform=e.transform,delete e.transform):this.transform=!1,typeof e.separator=="string"||e.separator instanceof RegExp?(this.separator=e.separator,delete e.separator):this.separator="";};qw.inherits(na,gf);na.prototype.loadSync=function(){return this.loadArgv(),this.store};na.prototype.loadArgv=function(){var e=this,t,r;if(t=Yw(this.options)?this.options:typeof this.options=="object"?ra()(process.argv.slice(2)).options(this.options):ra()(process.argv.slice(2)),typeof this.usage=="string"&&t.usage(this.usage),r=t.argv,!!r)return this.transform&&(r=Hi.transform(r,this.transform)),this.readOnly=!1,Object.keys(r).forEach(function(n){var s=r[n];typeof s<"u"&&(e.parseValues&&(s=Hi.parseValues(s)),e.separator?e.set(Hi.key.apply(Hi,n.split(e.separator)),s):e.set(n,s));}),this.showHelp=t.showHelp,this.help=t.help,this.readOnly=!0,this.store};function Yw(e){return (typeof e=="function"||typeof e=="object")&&"argv"in e}});var Ef=B(wf=>{var Ww=U("util"),Vi=Br(),vf=hr().Memory,ia=wf.Env=function(e){vf.call(this,e),e=e||{},this.type="env",this.readOnly=!0,this.whitelist=e.whitelist||[],this.separator=e.separator||"",this.lowerCase=e.lowerCase||!1,this.parseValues=e.parseValues||!1,this.transform=e.transform||!1,{}.toString.call(e.match)==="[object RegExp]"&&typeof e!="string"&&(this.match=e.match),e instanceof Array&&(this.whitelist=e),(typeof e=="string"||e instanceof RegExp)&&(this.separator=e);};Ww.inherits(ia,vf);ia.prototype.loadSync=function(){return this.loadEnv(),this.store};ia.prototype.loadEnv=function(){var e=this,t=process.env;return this.lowerCase&&(t={},Object.keys(process.env).forEach(function(r){t[r.toLowerCase()]=process.env[r];})),this.transform&&(t=Vi.transform(t,this.transform)),this.readOnly=!1,Object.keys(t).filter(function(r){return e.match&&e.whitelist.length?r.match(e.match)||e.whitelist.indexOf(r)!==-1:e.match?r.match(e.match):!e.whitelist.length||e.whitelist.indexOf(r)!==-1}).forEach(function(r){var n=t[r];e.parseValues&&(n=Vi.parseValues(n)),e.separator?e.set(Vi.key.apply(Vi,r.split(e.separator)),n):e.set(r,n);}),this.readOnly=!0,this.store};});var Sf=B((lC,Ff)=>{var Uw=U("crypto"),zw={stringify:function(e,t,r){return JSON.stringify(e,t||null,r||2)},parse:JSON.parse};Ff.exports=sa;function sa(e){if(e=e||{},this.secret=typeof e!="string"?e.secret:e,this.format=e.format||zw,this.alg=e.alg||"aes-256-ctr",!this.secret)throw new Error("Secret is a required option")}sa.prototype.encrypt=function(t,r){var n=this;return Object.keys(t).reduce(function(s,o){var u=n.format.stringify(t[o]);return s[o]={alg:n.alg,value:_f(u,{alg:n.alg,secret:n.secret,encs:{input:"utf8",output:"hex"}})},s},{})};sa.prototype.decrypt=function(t,r){var n=this;return Object.keys(t).reduce(function(s,o){var u=_f(t[o].value,{alg:t[o].alg||n.alg,secret:n.secret,encs:{input:"hex",output:"utf8"}});return s[o]=n.format.parse(u),s},{})};function _f(e,t){var r=t.encs,n=Uw.createCipher(t.alg,t.secret);return n.update(e,r.input,r.output)+n.final(r.output)}});var bf=B(Of=>{var Je=U("fs"),Tn=U("path"),Hw=U("util"),Vw=Sf(),Gw=Ni(),Cf=hr().Memory,Jw=Je.exists||Tn.exists,Zw=Je.existsSync||Tn.existsSync,zt=Of.File=function(e){if(!e||!e.file)throw new Error("Missing required option `file`");if(Cf.call(this,e),this.type="file",this.file=e.file,this.dir=e.dir||process.cwd(),this.format=e.format||Gw.json,this.secure=e.secure,this.spacing=e.json_spacing||e.spacing||2,this.secure){if(this.secure=Buffer.isBuffer(this.secure)||typeof this.secure=="string"?{secret:this.secure.toString()}:this.secure,this.secure.alg=this.secure.alg||"aes-256-ctr",this.secure.secretPath&&(this.secure.secret=Je.readFileSync(this.secure.secretPath,"utf8")),!this.secure.secret)throw new Error("secure.secret option is required");this.keys=new Vw({secret:this.secure.secret,alg:this.secure.alg,format:this.format});}e.search&&this.search(this.dir);};Hw.inherits(zt,Cf);zt.prototype.save=function(e,t){this.saveToFile(this.file,e,t);};zt.prototype.saveToFile=function(e,t,r){r||(r=t,t=this.format),Je.writeFile(e,this.stringify(t),r);};zt.prototype.saveSync=function(){return Je.writeFileSync(this.file,this.stringify()),this.store};zt.prototype.load=function(e){var t=this;Jw(t.file,function(r){if(!r)return e(null,{});Je.readFile(t.file,function(n,s){if(n)return e(n);try{var o=s.toString();o.charAt(0)==="\uFEFF"&&(o=o.substr(1)),t.store=t.parse(o);}catch(u){return e(new Error("Error parsing your configuration file: ["+t.file+"]: "+u.message))}e(null,t.store);});});};zt.prototype.loadSync=function(){if(!Zw(this.file))return this.store={},this.store;try{var e=Je.readFileSync(this.file,"utf8");e.charAt(0)==="\uFEFF"&&(e=e.substr(1)),this.store=this.parse(e);}catch(t){throw new Error("Error parsing your configuration file: ["+this.file+"]: "+t.message)}return this.store};zt.prototype.stringify=function(e){var t=this.store;return e||(e=this.format),this.secure&&(t=this.keys.encrypt(t)),e.stringify(t,null,this.spacing)};zt.prototype.parse=function(e){var t=this.format.parse(e);return this.secure?this.keys.decrypt(t):t};zt.prototype.search=function(e){var t=!0,r,n,s;if(e=e||process.cwd(),this.file[0]==="/")try{s=Je.statSync(Je.realpathSync(this.file)),s.isFile()&&(r=this.file,t=!1);}catch{}if(t&&e)try{var o=Je.statSync(Je.realpathSync(e));t=o.isDirectory();}catch{return !1}for(;t;)try{s=Je.statSync(Je.realpathSync(r=Tn.join(e,this.file))),t=s.isDirectory();}catch{if(n=e,e=Tn.dirname(e),n===e){try{s=Je.statSync(Je.realpathSync(r=Tn.join(this.dir,this.file))),s.isDirectory()&&(r=void 0);}catch{}t=!1;}}return this.file=r||this.file,r};});var Tf=B(Mf=>{var Kw=U("util"),xf=hr().Memory,Af=Mf.Literal=function(t){xf.call(this,t),t=t||{},this.type="literal",this.readOnly=!0,this.store=t.store||t;};Kw.inherits(Af,xf);Af.prototype.loadSync=function(){return this.store};});var Li=B((hC,If)=>{var Gi=Br(),jf=Xc().Provider,ct=If.exports=new jf;ct.version=el().version;ct.__defineGetter__("Argv",function(){return yf().Argv});ct.__defineGetter__("Env",function(){return Ef().Env});ct.__defineGetter__("File",function(){return bf().File});ct.__defineGetter__("Literal",function(){return Tf().Literal});ct.__defineGetter__("Memory",function(){return hr().Memory});ct.key=Gi.key;ct.path=Gi.path;ct.loadFiles=Gi.loadFiles;ct.loadFilesSync=Gi.loadFilesSync;ct.formats=Ni();ct.Provider=jf;});var kf=B((yC,$f)=>{var Zr=1e3,Kr=Zr*60,Qr=Kr*60,pr=Qr*24,rE=pr*7,nE=pr*365.25;$f.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return iE(e);if(r==="number"&&isFinite(e))return t.long?oE(e):sE(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function iE(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*nE;case"weeks":case"week":case"w":return r*rE;case"days":case"day":case"d":return r*pr;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Qr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Kr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Zr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function sE(e){var t=Math.abs(e);return t>=pr?Math.round(e/pr)+"d":t>=Qr?Math.round(e/Qr)+"h":t>=Kr?Math.round(e/Kr)+"m":t>=Zr?Math.round(e/Zr)+"s":e+"ms"}function oE(e){var t=Math.abs(e);return t>=pr?Zi(e,t,pr,"day"):t>=Qr?Zi(e,t,Qr,"hour"):t>=Kr?Zi(e,t,Kr,"minute"):t>=Zr?Zi(e,t,Zr,"second"):e+" ms"}function Zi(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var aa=B((vC,Pf)=>{function aE(e){r.debug=r,r.default=r,r.coerce=d,r.disable=o,r.enable=s,r.enabled=u,r.humanize=kf(),r.destroy=g,Object.keys(e).forEach(m=>{r[m]=e[m];}),r.names=[],r.skips=[],r.formatters={};function t(m){let D=0;for(let y=0;y{if(J==="%%")return "%";M++;let te=r.formatters[X];if(typeof te=="function"){let L=j[M];J=te.call($,L),j.splice(M,1),M--;}return J}),r.formatArgs.call($,j),($.log||r.log).apply($,j);}return _.namespace=m,_.useColors=r.useColors(),_.color=r.selectColor(m),_.extend=n,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(F!==r.namespaces&&(F=r.namespaces,C=r.enabled(m)),C),set:j=>{y=j;}}),typeof r.init=="function"&&r.init(_),_}function n(m,D){let y=r(this.namespace+(typeof D>"u"?":":D)+m);return y.log=this.log,y}function s(m){r.save(m),r.namespaces=m,r.names=[],r.skips=[];let D,y=(typeof m=="string"?m:"").split(/[\s,]+/),F=y.length;for(D=0;D"-"+D)].join(",");return r.enable(""),m}function u(m){if(m[m.length-1]==="*")return !0;let D,y;for(D=0,y=r.skips.length;D{it.formatArgs=cE;it.save=lE;it.load=fE;it.useColors=uE;it.storage=dE();it.destroy=(()=>{let e=!1;return ()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));}})();it.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function uE(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function cE(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Ki.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(r++,s==="%c"&&(n=r));}),e.splice(n,0,t);}it.log=console.debug||console.log||(()=>{});function lE(e){try{e?it.storage.setItem("debug",e):it.storage.removeItem("debug");}catch{}}function fE(){let e;try{e=it.storage.getItem("debug");}catch{}return !e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function dE(){try{return localStorage}catch{}}Ki.exports=aa()(it);var{formatters:hE}=Ki.exports;hE.j=function(e){try{return JSON.stringify(e)}catch(t){return "[UnexpectedJSONParseError]: "+t.message}};});var qf=B((wC,Bf)=>{Bf.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n{var pE=U("os"),Yf=U("tty"),lt=qf(),{env:Be}=process,rr;lt("no-color")||lt("no-colors")||lt("color=false")||lt("color=never")?rr=0:(lt("color")||lt("colors")||lt("color=true")||lt("color=always"))&&(rr=1);"FORCE_COLOR"in Be&&(Be.FORCE_COLOR==="true"?rr=1:Be.FORCE_COLOR==="false"?rr=0:rr=Be.FORCE_COLOR.length===0?1:Math.min(parseInt(Be.FORCE_COLOR,10),3));function ua(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ca(e,t){if(rr===0)return 0;if(lt("color=16m")||lt("color=full")||lt("color=truecolor"))return 3;if(lt("color=256"))return 2;if(e&&!t&&rr===void 0)return 0;let r=rr||0;if(Be.TERM==="dumb")return r;if(process.platform==="win32"){let n=pE.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Be)return ["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Be)||Be.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Be)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Be.TEAMCITY_VERSION)?1:0;if(Be.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Be){let n=parseInt((Be.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Be.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return /-256(color)?$/i.test(Be.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Be.TERM)||"COLORTERM"in Be?1:r}function mE(e){let t=ca(e,e&&e.isTTY);return ua(t)}Wf.exports={supportsColor:mE,stdout:ua(ca(!0,Yf.isatty(1))),stderr:ua(ca(!0,Yf.isatty(2)))};});var Hf=B((We,Xi)=>{var gE=U("tty"),Qi=U("util");We.init=FE;We.log=wE;We.formatArgs=yE;We.save=EE;We.load=_E;We.useColors=DE;We.destroy=Qi.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");We.colors=[6,2,3,4,5,1];try{let e=Uf();e&&(e.stderr||e).level>=2&&(We.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]);}catch{}We.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(s,o)=>o.toUpperCase()),n=process.env[t];return /^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function DE(){return "colors"in We.inspectOpts?!!We.inspectOpts.colors:gE.isatty(process.stderr.fd)}function yE(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${s};1m${t} \x1B[0m`;e[0]=o+e[0].split(` `).join(` -`+o),e.push(s+"m+"+Xi.exports.humanize(this.diff)+"\x1B[0m");}else e[0]=vE()+t+" "+e[0];}function vE(){return We.inspectOpts.hideDate?"":new Date().toISOString()+" "}function EE(...e){return process.stderr.write(Qi.format(...e)+` -`)}function _E(e){e?process.env.DEBUG=e:delete process.env.DEBUG;}function FE(){return process.env.DEBUG}function SE(e){e.inspectOpts={};let t=Object.keys(We.inspectOpts);for(let r=0;rt.trim()).join(" ")};zf.O=function(e){return this.inspectOpts.colors=this.useColors,Qi.inspect(e,this.inspectOpts)};});var qe=B((SC,la)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?la.exports=Rf():la.exports=Hf();});var Gf=B((CC,Vf)=>{Vf.exports=CE;function Xr(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function CE(e){if(e=e||{},e.circles)return OE(e);return e.proto?n:r;function t(s,o){for(var u=Object.keys(s),c=new Array(u.length),d=0;d{var bE=U("util"),mr=qe()("log4js:configuration"),es=[],ts=[],Jf=e=>!e,Zf=e=>e&&typeof e=="object"&&!Array.isArray(e),xE=e=>/^[A-Za-z][A-Za-z0-9_]*$/g.test(e),AE=e=>e&&typeof e=="number"&&Number.isInteger(e),ME=e=>{ts.push(e),mr(`Added listener, now ${ts.length} listeners`);},TE=e=>{es.push(e),mr(`Added pre-processing listener, now ${es.length} listeners`);},Kf=(e,t,r)=>{(Array.isArray(t)?t:[t]).forEach(s=>{if(s)throw new Error(`Problem with log4js configuration: (${bE.inspect(e,{depth:5})}) - ${r}`)});},jE=e=>{mr("New configuration to be validated: ",e),Kf(e,Jf(Zf(e)),"must be an object."),mr(`Calling pre-processing listeners (${es.length})`),es.forEach(t=>t(e)),mr("Configuration pre-processing finished."),mr(`Calling configuration listeners (${ts.length})`),ts.forEach(t=>t(e)),mr("Configuration finished.");};Qf.exports={configure:jE,addListener:ME,addPreProcessingListener:TE,throwExceptionIf:Kf,anObject:Zf,anInteger:AE,validIdentifier:xE,not:Jf};});var rs=B((bC,ft)=>{function Xf(e,t){for(var r=e.toString();r.length-1?s:o,c=Dr(t.getHours()),d=Dr(t.getMinutes()),g=Dr(t.getSeconds()),m=Xf(t.getMilliseconds(),3),D=IE(t.getTimezoneOffset()),y=e.replace(/dd/g,r).replace(/MM/g,n).replace(/y{1,4}/g,u).replace(/hh/g,c).replace(/mm/g,d).replace(/ss/g,g).replace(/SSS/g,m).replace(/O/g,D);return y}function nr(e,t,r,n){e["set"+(n?"":"UTC")+t](r);}function NE(e,t,r){var n=e.indexOf("O")<0,s=!1,o=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(D,y){nr(D,"FullYear",y,n);}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(D,y){nr(D,"Month",y-1,n),D.getMonth()!==y-1&&(s=!0);}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(D,y){s&&nr(D,"Month",D.getMonth()-1,n),nr(D,"Date",y,n);}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(D,y){nr(D,"Hours",y,n);}},{pattern:/mm/,regexp:"\\d\\d",fn:function(D,y){nr(D,"Minutes",y,n);}},{pattern:/ss/,regexp:"\\d\\d",fn:function(D,y){nr(D,"Seconds",y,n);}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(D,y){nr(D,"Milliseconds",y,n);}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(D,y){y==="Z"?y=0:y=y.replace(":","");var F=Math.abs(y),C=(y>0?-1:1)*(F%100+Math.floor(F/100)*60);D.setUTCMinutes(D.getUTCMinutes()+C);}}],u=o.reduce(function(D,y){return y.pattern.test(D.regexp)?(y.index=D.regexp.match(y.pattern).index,D.regexp=D.regexp.replace(y.pattern,"("+y.regexp+")")):y.index=-1,D},{regexp:e,index:[]}),c=o.filter(function(D){return D.index>-1});c.sort(function(D,y){return D.index-y.index});var d=new RegExp(u.regexp),g=d.exec(t);if(g){var m=r||ft.exports.now();return c.forEach(function(D,y){D.fn(m,g[y+1]);}),m}throw new Error("String '"+t+"' could not be parsed as '"+e+"'")}function LE(e,t,r){if(!e)throw new Error("pattern must be supplied");return NE(e,t,r)}function $E(){return new Date}ft.exports=ed;ft.exports.asString=ed;ft.exports.parse=LE;ft.exports.now=$E;ft.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS";ft.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO";ft.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS";ft.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS";});var da=B((xC,dd)=>{var ir=rs(),td=U("os"),Nn=U("util"),In=U("path"),rd=U("url"),nd=qe()("log4js:layouts"),id={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[90,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[91,39],yellow:[33,39]};function sd(e){return e?`\x1B[${id[e][0]}m`:""}function od(e){return e?`\x1B[${id[e][1]}m`:""}function kE(e,t){return sd(t)+e+od(t)}function ad(e,t){return kE(Nn.format("[%s] [%s] %s - ",ir.asString(e.startTime),e.level.toString(),e.categoryName),t)}function ud(e){return ad(e)+Nn.format(...e.data)}function ns(e){return ad(e,e.level.colour)+Nn.format(...e.data)}function cd(e){return Nn.format(...e.data)}function ld(e){return e.data[0]}function fd(e,t){let r="%r %p %c - %m%n",n=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflosCMAF%])(\{([^}]+)\})?|([^%]+)/;e=e||r;function s(I,W){let k=I.categoryName;if(W){let G=parseInt(W,10),K=k.split(".");GK&&(k=ye.slice(-K).join(In.sep));}return k}function w(I){return I.lineNumber?`${I.lineNumber}`:""}function M(I){return I.columnNumber?`${I.columnNumber}`:""}function P(I){return I.callStack||""}function J(I){return I.className||""}function X(I){return I.functionName||""}function te(I){return I.functionAlias||""}function L(I){return I.callerName||""}let ee={c:s,d:o,h:u,m:c,n:d,p:g,r:m,"[":D,"]":y,y:_,z:C,"%":F,x:j,X:$,f:x,l:w,o:M,s:P,C:J,M:X,A:te,F:L};function Z(I,W,k){return ee[I](W,k)}function q(I,W){let k;return I?(k=parseInt(I.slice(1),10),k>0?W.slice(0,k):W.slice(k)):W}function Y(I,W){let k;if(I)if(I.charAt(0)==="-")for(k=parseInt(I.slice(1),10);W.length{var Le=gr(),hd=["white","grey","black","blue","cyan","green","magenta","red","yellow"],en=class e{constructor(t,r,n){this.level=t,this.levelStr=r,this.colour=n;}toString(){return this.levelStr}static getLevel(t,r){return t?t instanceof e?t:(t instanceof Object&&t.levelStr&&(t=t.levelStr),e[t.toString().toUpperCase()]||r):r}static addLevels(t){t&&(Object.keys(t).forEach(n=>{let s=n.toUpperCase();e[s]=new e(t[n].value,s,t[n].colour);let o=e.levels.findIndex(u=>u.levelStr===s);o>-1?e.levels[o]=e[s]:e.levels.push(e[s]);}),e.levels.sort((n,s)=>n.level-s.level));}isLessThanOrEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level<=t.level}isGreaterThanOrEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level>=t.level}isEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level===t.level}};en.levels=[];en.addLevels({ALL:{value:Number.MIN_VALUE,colour:"grey"},TRACE:{value:5e3,colour:"blue"},DEBUG:{value:1e4,colour:"cyan"},INFO:{value:2e4,colour:"green"},WARN:{value:3e4,colour:"yellow"},ERROR:{value:4e4,colour:"red"},FATAL:{value:5e4,colour:"magenta"},MARK:{value:9007199254740992,colour:"grey"},OFF:{value:Number.MAX_VALUE,colour:"grey"}});Le.addListener(e=>{let t=e.levels;t&&(Le.throwExceptionIf(e,Le.not(Le.anObject(t)),"levels must be an object"),Object.keys(t).forEach(n=>{Le.throwExceptionIf(e,Le.not(Le.validIdentifier(n)),`level name "${n}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)`),Le.throwExceptionIf(e,Le.not(Le.anObject(t[n])),`level "${n}" must be an object`),Le.throwExceptionIf(e,Le.not(t[n].value),`level "${n}" must have a 'value' property`),Le.throwExceptionIf(e,Le.not(Le.anInteger(t[n].value)),`level "${n}".value must have an integer value`),Le.throwExceptionIf(e,Le.not(t[n].colour),`level "${n}" must have a 'colour' property`),Le.throwExceptionIf(e,Le.not(hd.indexOf(t[n].colour)>-1),`level "${n}".colour must be one of ${hd.join(", ")}`);}));});Le.addListener(e=>{en.addLevels(e.levels);});pd.exports=en;});var Sd=B($n=>{var{parse:Dd,stringify:yd}=JSON,{keys:PE}=Object,Ln=String,wd="string",md={},is="object",vd=(e,t)=>t,RE=e=>e instanceof Ln?Ln(e):e,BE=(e,t)=>typeof t===wd?new Ln(t):t,Ed=(e,t,r,n)=>{let s=[];for(let o=PE(r),{length:u}=o,c=0;c{let n=Ln(t.push(r)-1);return e.set(r,n),n},_d=(e,t)=>{let r=Dd(e,BE).map(RE),n=r[0],s=t||vd,o=typeof n===is&&n?Ed(r,new Set,n,s):n;return s.call({"":o},"",o)};$n.parse=_d;var Fd=(e,t,r)=>{let n=t&&typeof t===is?(m,D)=>m===""||-1Dd(Fd(e));$n.toJSON=qE;var YE=e=>_d(yd(e));$n.fromJSON=YE;});var ma=B((TC,xd)=>{var Cd=Sd(),Od=yr(),ha=class{constructor(){let t={__LOG4JS_undefined__:void 0,__LOG4JS_NaN__:+"abc",__LOG4JS_Infinity__:1/0,"__LOG4JS_-Infinity__":-1/0};this.deMap=t,this.serMap={},Object.keys(this.deMap).forEach(r=>{let n=this.deMap[r];this.serMap[n]=r;});}canSerialise(t){return typeof t=="string"?!1:t in this.serMap}serialise(t){return this.canSerialise(t)?this.serMap[t]:t}canDeserialise(t){return t in this.deMap}deserialise(t){return this.canDeserialise(t)?this.deMap[t]:t}},bd=new ha,pa=class e{constructor(t,r,n,s,o,u){if(this.startTime=new Date,this.categoryName=t,this.data=n,this.level=r,this.context=Object.assign({},s),this.pid=process.pid,this.error=u,typeof o<"u"){if(!o||typeof o!="object"||Array.isArray(o))throw new TypeError("Invalid location type passed to LoggingEvent constructor");this.constructor._getLocationKeys().forEach(c=>{typeof o[c]<"u"&&(this[c]=o[c]);});}}static _getLocationKeys(){return ["fileName","lineNumber","columnNumber","callStack","className","functionName","functionAlias","callerName"]}serialise(){return Cd.stringify(this,(t,r)=>(r instanceof Error&&(r=Object.assign({message:r.message,stack:r.stack},r)),bd.serialise(r)))}static deserialise(t){let r;try{let n=Cd.parse(t,(s,o)=>{if(o&&o.message&&o.stack){let u=new Error(o);Object.keys(o).forEach(c=>{u[c]=o[c];}),o=u;}return bd.deserialise(o)});this._getLocationKeys().forEach(s=>{typeof n[s]<"u"&&(n.location||(n.location={}),n.location[s]=n[s]);}),r=new e(n.categoryName,Od.getLevel(n.level.levelStr),n.data,n.context,n.location,n.error),r.startTime=new Date(n.startTime),r.pid=n.pid,n.cluster&&(r.cluster=n.cluster);}catch(n){r=new e("log4js",Od.ERROR,["Unable to parse log:",t,"because: ",n]);}return r}};xd.exports=pa;});var os=B((jC,Td)=>{var dt=qe()("log4js:clustering"),WE=ma(),UE=gr(),tn=!1,ht=null;try{ht=U("cluster");}catch{dt("cluster module not present"),tn=!0;}var Da=[],Pn=!1,kn="NODE_APP_INSTANCE",Ad=()=>Pn&&process.env[kn]==="0",ga=()=>tn||ht&&ht.isMaster||Ad(),Md=e=>{Da.forEach(t=>t(e));},ss=(e,t)=>{if(dt("cluster message received from worker ",e,": ",t),e.topic&&e.data&&(t=e,e=void 0),t&&t.topic&&t.topic==="log4js:message"){dt("received message: ",t.data);let r=WE.deserialise(t.data);Md(r);}};tn||UE.addListener(e=>{Da.length=0,{pm2:Pn,disableClustering:tn,pm2InstanceVar:kn="NODE_APP_INSTANCE"}=e,dt(`clustering disabled ? ${tn}`),dt(`cluster.isMaster ? ${ht&&ht.isMaster}`),dt(`pm2 enabled ? ${Pn}`),dt(`pm2InstanceVar = ${kn}`),dt(`process.env[${kn}] = ${process.env[kn]}`),Pn&&process.removeListener("message",ss),ht&&ht.removeListener&&ht.removeListener("message",ss),tn||e.disableClustering?dt("Not listening for cluster messages, because clustering disabled."):Ad()?(dt("listening for PM2 broadcast messages"),process.on("message",ss)):ht&&ht.isMaster?(dt("listening for cluster messages"),ht.on("message",ss)):dt("not listening for messages, because we are not a master process");});Td.exports={onlyOnMaster:(e,t)=>ga()?e():t,isMaster:ga,send:e=>{ga()?Md(e):(Pn||(e.cluster={workerId:ht.worker.id,worker:process.pid}),process.send({topic:"log4js:message",data:e.serialise()}));},onMessage:e=>{Da.push(e);}};});var Nd=B((IC,Id)=>{function zE(e){if(typeof e=="number"&&Number.isInteger(e))return e;let t={K:1024,M:1024*1024,G:1024*1024*1024},r=Object.keys(t),n=e.slice(-1).toLocaleUpperCase(),s=e.slice(0,-1).trim();if(r.indexOf(n)<0||!Number.isInteger(Number(s)))throw Error(`maxLogSize: "${e}" is invalid`);return s*t[n]}function HE(e,t){let r=Object.assign({},t);return Object.keys(e).forEach(n=>{r[n]&&(r[n]=e[n](t[n]));}),r}function ya(e){return HE({maxLogSize:zE},e)}var jd={dateFile:ya,file:ya,fileSync:ya};Id.exports.modifyConfig=e=>jd[e.type]?jd[e.type](e):e;});var $d=B((NC,Ld)=>{var VE=console.log.bind(console);function GE(e,t){return r=>{VE(e(r,t));}}function JE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),GE(r,e.timezoneOffset)}Ld.exports.configure=JE;});var Pd=B(kd=>{function ZE(e,t){return r=>{process.stdout.write(`${e(r,t)} -`);}}function KE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),ZE(r,e.timezoneOffset)}kd.configure=KE;});var Bd=B(($C,Rd)=>{function QE(e,t){return r=>{process.stderr.write(`${e(r,t)} -`);}}function XE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),QE(r,e.timezoneOffset)}Rd.exports.configure=XE;});var Yd=B((kC,qd)=>{function e_(e,t,r,n){let s=n.getLevel(e),o=n.getLevel(t,n.FATAL);return u=>{let c=u.level;s.isLessThanOrEqualTo(c)&&o.isGreaterThanOrEqualTo(c)&&r(u);}}function t_(e,t,r,n){let s=r(e.appender);return e_(e.level,e.maxLevel,s,n)}qd.exports.configure=t_;});var zd=B((PC,Ud)=>{var Wd=qe()("log4js:categoryFilter");function r_(e,t){return typeof e=="string"&&(e=[e]),r=>{Wd(`Checking ${r.categoryName} against ${e}`),e.indexOf(r.categoryName)===-1&&(Wd("Not excluded, sending to appender"),t(r));}}function n_(e,t,r){let n=r(e.appender);return r_(e.exclude,n)}Ud.exports.configure=n_;});var Gd=B((RC,Vd)=>{var Hd=qe()("log4js:noLogFilter");function i_(e){return e.filter(r=>r!=null&&r!=="")}function s_(e,t){return r=>{Hd(`Checking data: ${r.data} against filters: ${e}`),typeof e=="string"&&(e=[e]),e=i_(e);let n=new RegExp(e.join("|"),"i");(e.length===0||r.data.findIndex(s=>n.test(s))<0)&&(Hd("Not excluded, sending to appender"),t(r));}}function o_(e,t,r){let n=r(e.appender);return s_(e.exclude,n)}Vd.exports.configure=o_;});var Qe=B(wa=>{wa.fromCallback=function(e){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")e.apply(this,arguments);else return new Promise((t,r)=>{arguments[arguments.length]=(n,s)=>{if(n)return r(n);t(s);},arguments.length++,e.apply(this,arguments);})},"name",{value:e.name})};wa.fromPromise=function(e){return Object.defineProperty(function(){let t=arguments[arguments.length-1];if(typeof t!="function")return e.apply(this,arguments);e.apply(this,arguments).then(r=>t(null,r),t);},"name",{value:e.name})};});var Zd=B((qC,Jd)=>{var sr=U("constants"),a_=process.cwd,as=null,u_=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return as||(as=a_.call(process)),as};try{process.cwd();}catch{}typeof process.chdir=="function"&&(va=process.chdir,process.chdir=function(e){as=null,va.call(process,e);},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,va));var va;Jd.exports=c_;function c_(e){sr.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=o(e.chown),e.fchown=o(e.fchown),e.lchown=o(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=u(e.chownSync),e.fchownSync=u(e.fchownSync),e.lchownSync=u(e.lchownSync),e.chmodSync=s(e.chmodSync),e.fchmodSync=s(e.fchmodSync),e.lchmodSync=s(e.lchmodSync),e.stat=c(e.stat),e.fstat=c(e.fstat),e.lstat=c(e.lstat),e.statSync=d(e.statSync),e.fstatSync=d(e.fstatSync),e.lstatSync=d(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(m,D,y){y&&process.nextTick(y);},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(m,D,y,F){F&&process.nextTick(F);},e.lchownSync=function(){}),u_==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(m){function D(y,F,C){var _=Date.now(),j=0;m(y,F,function $(x){if(x&&(x.code==="EACCES"||x.code==="EPERM"||x.code==="EBUSY")&&Date.now()-_<6e4){setTimeout(function(){e.stat(F,function(w,M){w&&w.code==="ENOENT"?m(y,F,$):C(x);});},j),j<100&&(j+=10);return}C&&C(x);});}return Object.setPrototypeOf&&Object.setPrototypeOf(D,m),D}(e.rename)),e.read=typeof e.read!="function"?e.read:function(m){function D(y,F,C,_,j,$){var x;if($&&typeof $=="function"){var w=0;x=function(M,P,J){if(M&&M.code==="EAGAIN"&&w<10)return w++,m.call(e,y,F,C,_,j,x);$.apply(this,arguments);};}return m.call(e,y,F,C,_,j,x)}return Object.setPrototypeOf&&Object.setPrototypeOf(D,m),D}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(m){return function(D,y,F,C,_){for(var j=0;;)try{return m.call(e,D,y,F,C,_)}catch($){if($.code==="EAGAIN"&&j<10){j++;continue}throw $}}}(e.readSync);function t(m){m.lchmod=function(D,y,F){m.open(D,sr.O_WRONLY|sr.O_SYMLINK,y,function(C,_){if(C){F&&F(C);return}m.fchmod(_,y,function(j){m.close(_,function($){F&&F(j||$);});});});},m.lchmodSync=function(D,y){var F=m.openSync(D,sr.O_WRONLY|sr.O_SYMLINK,y),C=!0,_;try{_=m.fchmodSync(F,y),C=!1;}finally{if(C)try{m.closeSync(F);}catch{}else m.closeSync(F);}return _};}function r(m){sr.hasOwnProperty("O_SYMLINK")&&m.futimes?(m.lutimes=function(D,y,F,C){m.open(D,sr.O_SYMLINK,function(_,j){if(_){C&&C(_);return}m.futimes(j,y,F,function($){m.close(j,function(x){C&&C($||x);});});});},m.lutimesSync=function(D,y,F){var C=m.openSync(D,sr.O_SYMLINK),_,j=!0;try{_=m.futimesSync(C,y,F),j=!1;}finally{if(j)try{m.closeSync(C);}catch{}else m.closeSync(C);}return _}):m.futimes&&(m.lutimes=function(D,y,F,C){C&&process.nextTick(C);},m.lutimesSync=function(){});}function n(m){return m&&function(D,y,F){return m.call(e,D,y,function(C){g(C)&&(C=null),F&&F.apply(this,arguments);})}}function s(m){return m&&function(D,y){try{return m.call(e,D,y)}catch(F){if(!g(F))throw F}}}function o(m){return m&&function(D,y,F,C){return m.call(e,D,y,F,function(_){g(_)&&(_=null),C&&C.apply(this,arguments);})}}function u(m){return m&&function(D,y,F){try{return m.call(e,D,y,F)}catch(C){if(!g(C))throw C}}}function c(m){return m&&function(D,y,F){typeof y=="function"&&(F=y,y=null);function C(_,j){j&&(j.uid<0&&(j.uid+=4294967296),j.gid<0&&(j.gid+=4294967296)),F&&F.apply(this,arguments);}return y?m.call(e,D,y,C):m.call(e,D,C)}}function d(m){return m&&function(D,y){var F=y?m.call(e,D,y):m.call(e,D);return F&&(F.uid<0&&(F.uid+=4294967296),F.gid<0&&(F.gid+=4294967296)),F}}function g(m){if(!m||m.code==="ENOSYS")return !0;var D=!process.getuid||process.getuid()!==0;return !!(D&&(m.code==="EINVAL"||m.code==="EPERM"))}}});var Xd=B((YC,Qd)=>{var Kd=U("stream").Stream;Qd.exports=l_;function l_(e){return {ReadStream:t,WriteStream:r};function t(n,s){if(!(this instanceof t))return new t(n,s);Kd.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,s=s||{};for(var u=Object.keys(s),c=0,d=u.length;cthis.end)throw new Error("start must be <= end");this.pos=this.start;}if(this.fd!==null){process.nextTick(function(){o._read();});return}e.open(this.path,this.flags,this.mode,function(m,D){if(m){o.emit("error",m),o.readable=!1;return}o.fd=D,o.emit("open",D),o._read();});}function r(n,s){if(!(this instanceof r))return new r(n,s);Kd.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,s=s||{};for(var o=Object.keys(s),u=0,c=o.length;u= zero");this.pos=this.start;}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush());}}});var th=B((WC,eh)=>{eh.exports=d_;var f_=Object.getPrototypeOf||function(e){return e.__proto__};function d_(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:f_(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));}),t}});var $e=B((UC,Fa)=>{var Me=U("fs"),h_=Zd(),p_=Xd(),m_=th(),us=U("util"),Ue,ls;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ue=Symbol.for("graceful-fs.queue"),ls=Symbol.for("graceful-fs.previous")):(Ue="___graceful-fs.queue",ls="___graceful-fs.previous");function g_(){}function ih(e,t){Object.defineProperty(e,Ue,{get:function(){return t}});}var wr=g_;us.debuglog?wr=us.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(wr=function(){var e=us.format.apply(us,arguments);e="GFS4: "+e.split(/\n/).join(` -GFS4: `),console.error(e);});Me[Ue]||(rh=global[Ue]||[],ih(Me,rh),Me.close=function(e){function t(r,n){return e.call(Me,r,function(s){s||nh(),typeof n=="function"&&n.apply(this,arguments);})}return Object.defineProperty(t,ls,{value:e}),t}(Me.close),Me.closeSync=function(e){function t(r){e.apply(Me,arguments),nh();}return Object.defineProperty(t,ls,{value:e}),t}(Me.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){wr(Me[Ue]),U("assert").equal(Me[Ue].length,0);}));var rh;global[Ue]||ih(global,Me[Ue]);Fa.exports=Ea(m_(Me));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Me.__patched&&(Fa.exports=Ea(Me),Me.__patched=!0);function Ea(e){h_(e),e.gracefulify=Ea,e.createReadStream=P,e.createWriteStream=J;var t=e.readFile;e.readFile=r;function r(L,ee,Z){return typeof ee=="function"&&(Z=ee,ee=null),q(L,ee,Z);function q(Y,V,I,W){return t(Y,V,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?rn([q,[Y,V,I],k,W||Date.now(),Date.now()]):typeof I=="function"&&I.apply(this,arguments);})}}var n=e.writeFile;e.writeFile=s;function s(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return n(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var o=e.appendFile;o&&(e.appendFile=u);function u(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return o(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var c=e.copyFile;c&&(e.copyFile=d);function d(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=0),Y(L,ee,Z,q);function Y(V,I,W,k,G){return c(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var g=e.readdir;e.readdir=D;var m=/^v[0-5]\./;function D(L,ee,Z){typeof ee=="function"&&(Z=ee,ee=null);var q=m.test(process.version)?function(I,W,k,G){return g(I,Y(I,W,k,G))}:function(I,W,k,G){return g(I,W,Y(I,W,k,G))};return q(L,ee,Z);function Y(V,I,W,k){return function(G,K){G&&(G.code==="EMFILE"||G.code==="ENFILE")?rn([q,[V,I,W],G,k||Date.now(),Date.now()]):(K&&K.sort&&K.sort(),typeof W=="function"&&W.call(this,G,K));}}}if(process.version.substr(0,4)==="v0.8"){var y=p_(e);$=y.ReadStream,w=y.WriteStream;}var F=e.ReadStream;F&&($.prototype=Object.create(F.prototype),$.prototype.open=x);var C=e.WriteStream;C&&(w.prototype=Object.create(C.prototype),w.prototype.open=M),Object.defineProperty(e,"ReadStream",{get:function(){return $},set:function(L){$=L;},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return w},set:function(L){w=L;},enumerable:!0,configurable:!0});var _=$;Object.defineProperty(e,"FileReadStream",{get:function(){return _},set:function(L){_=L;},enumerable:!0,configurable:!0});var j=w;Object.defineProperty(e,"FileWriteStream",{get:function(){return j},set:function(L){j=L;},enumerable:!0,configurable:!0});function $(L,ee){return this instanceof $?(F.apply(this,arguments),this):$.apply(Object.create($.prototype),arguments)}function x(){var L=this;te(L.path,L.flags,L.mode,function(ee,Z){ee?(L.autoClose&&L.destroy(),L.emit("error",ee)):(L.fd=Z,L.emit("open",Z),L.read());});}function w(L,ee){return this instanceof w?(C.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}function M(){var L=this;te(L.path,L.flags,L.mode,function(ee,Z){ee?(L.destroy(),L.emit("error",ee)):(L.fd=Z,L.emit("open",Z));});}function P(L,ee){return new e.ReadStream(L,ee)}function J(L,ee){return new e.WriteStream(L,ee)}var X=e.open;e.open=te;function te(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return X(V,I,W,function(K,ye){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}return e}function rn(e){wr("ENQUEUE",e[0].name,e[1]),Me[Ue].push(e),_a();}var cs;function nh(){for(var e=Date.now(),t=0;t2&&(Me[Ue][t][3]=e,Me[Ue][t][4]=e);_a();}function _a(){if(clearTimeout(cs),cs=void 0,Me[Ue].length!==0){var e=Me[Ue].shift(),t=e[0],r=e[1],n=e[2],s=e[3],o=e[4];if(s===void 0)wr("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-s>=6e4){wr("TIMEOUT",t.name,r);var u=r.pop();typeof u=="function"&&u.call(null,n);}else {var c=Date.now()-o,d=Math.max(o-s,1),g=Math.min(d*1.2,100);c>=g?(wr("RETRY",t.name,r),t.apply(null,r.concat([s]))):Me[Ue].push(e);}cs===void 0&&(cs=setTimeout(_a,0));}}});var Sa=B(vr=>{var sh=Qe().fromCallback,pt=$e(),D_=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof pt[e]=="function");Object.keys(pt).forEach(e=>{e!=="promises"&&(vr[e]=pt[e]);});D_.forEach(e=>{vr[e]=sh(pt[e]);});vr.exists=function(e,t){return typeof t=="function"?pt.exists(e,t):new Promise(r=>pt.exists(e,r))};vr.read=function(e,t,r,n,s,o){return typeof o=="function"?pt.read(e,t,r,n,s,o):new Promise((u,c)=>{pt.read(e,t,r,n,s,(d,g,m)=>{if(d)return c(d);u({bytesRead:g,buffer:m});});})};vr.write=function(e,t,...r){return typeof r[r.length-1]=="function"?pt.write(e,t,...r):new Promise((n,s)=>{pt.write(e,t,...r,(o,u,c)=>{if(o)return s(o);n({bytesWritten:u,buffer:c});});})};typeof pt.realpath.native=="function"&&(vr.realpath.native=sh(pt.realpath.native));});var Oa=B((HC,ah)=>{var Ca=U("path");function oh(e){return e=Ca.normalize(Ca.resolve(e)).split(Ca.sep),e.length>0?e[0]:null}var y_=/[<>:"|?*]/;function w_(e){let t=oh(e);return e=e.replace(t,""),y_.test(e)}ah.exports={getRootPath:oh,invalidWin32Path:w_};});var ch=B((VC,uh)=>{var v_=$e(),ba=U("path"),E_=Oa().invalidWin32Path,__=parseInt("0777",8);function xa(e,t,r,n){if(typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t}),process.platform==="win32"&&E_(e)){let u=new Error(e+" contains invalid WIN32 path characters.");return u.code="EINVAL",r(u)}let s=t.mode,o=t.fs||v_;s===void 0&&(s=__&~process.umask()),n||(n=null),r=r||function(){},e=ba.resolve(e),o.mkdir(e,s,u=>{if(!u)return n=n||e,r(null,n);switch(u.code){case"ENOENT":if(ba.dirname(e)===e)return r(u);xa(ba.dirname(e),t,(c,d)=>{c?r(c,d):xa(e,t,r,d);});break;default:o.stat(e,(c,d)=>{c||!d.isDirectory()?r(u,n):r(null,n);});break}});}uh.exports=xa;});var fh=B((GC,lh)=>{var F_=$e(),Aa=U("path"),S_=Oa().invalidWin32Path,C_=parseInt("0777",8);function Ma(e,t,r){(!t||typeof t!="object")&&(t={mode:t});let n=t.mode,s=t.fs||F_;if(process.platform==="win32"&&S_(e)){let o=new Error(e+" contains invalid WIN32 path characters.");throw o.code="EINVAL",o}n===void 0&&(n=C_&~process.umask()),r||(r=null),e=Aa.resolve(e);try{s.mkdirSync(e,n),r=r||e;}catch(o){if(o.code==="ENOENT"){if(Aa.dirname(e)===e)throw o;r=Ma(Aa.dirname(e),t,r),Ma(e,t,r);}else {let u;try{u=s.statSync(e);}catch{throw o}if(!u.isDirectory())throw o}}return r}lh.exports=Ma;});var st=B((JC,dh)=>{var O_=Qe().fromCallback,Ta=O_(ch()),ja=fh();dh.exports={mkdirs:Ta,mkdirsSync:ja,mkdirp:Ta,mkdirpSync:ja,ensureDir:Ta,ensureDirSync:ja};});var Ia=B((ZC,ph)=>{var Ve=$e(),hh=U("os"),fs=U("path");function b_(){let e=fs.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));e=fs.join(hh.tmpdir(),e);let t=new Date(1435410243862);Ve.writeFileSync(e,"https://github.com/jprichardson/node-fs-extra/pull/141");let r=Ve.openSync(e,"r+");return Ve.futimesSync(r,t,t),Ve.closeSync(r),Ve.statSync(e).mtime>1435410243e3}function x_(e){let t=fs.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));t=fs.join(hh.tmpdir(),t);let r=new Date(1435410243862);Ve.writeFile(t,"https://github.com/jprichardson/node-fs-extra/pull/141",n=>{if(n)return e(n);Ve.open(t,"r+",(s,o)=>{if(s)return e(s);Ve.futimes(o,r,r,u=>{if(u)return e(u);Ve.close(o,c=>{if(c)return e(c);Ve.stat(t,(d,g)=>{if(d)return e(d);e(null,g.mtime>1435410243e3);});});});});});}function A_(e){if(typeof e=="number")return Math.floor(e/1e3)*1e3;if(e instanceof Date)return new Date(Math.floor(e.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function M_(e,t,r,n){Ve.open(e,"r+",(s,o)=>{if(s)return n(s);Ve.futimes(o,t,r,u=>{Ve.close(o,c=>{n&&n(u||c);});});});}function T_(e,t,r){let n=Ve.openSync(e,"r+");return Ve.futimesSync(n,t,r),Ve.closeSync(n)}ph.exports={hasMillisRes:x_,hasMillisResSync:b_,timeRemoveMillis:A_,utimesMillis:M_,utimesMillisSync:T_};});var qn=B((KC,vh)=>{var mt=$e(),Xe=U("path"),mh=10,gh=5,j_=0,La=process.versions.node.split("."),Dh=Number.parseInt(La[0],10),yh=Number.parseInt(La[1],10),I_=Number.parseInt(La[2],10);function Rn(){if(Dh>mh)return !0;if(Dh===mh){if(yh>gh)return !0;if(yh===gh&&I_>=j_)return !0}return !1}function N_(e,t,r){Rn()?mt.stat(e,{bigint:!0},(n,s)=>{if(n)return r(n);mt.stat(t,{bigint:!0},(o,u)=>o?o.code==="ENOENT"?r(null,{srcStat:s,destStat:null}):r(o):r(null,{srcStat:s,destStat:u}));}):mt.stat(e,(n,s)=>{if(n)return r(n);mt.stat(t,(o,u)=>o?o.code==="ENOENT"?r(null,{srcStat:s,destStat:null}):r(o):r(null,{srcStat:s,destStat:u}));});}function L_(e,t){let r,n;Rn()?r=mt.statSync(e,{bigint:!0}):r=mt.statSync(e);try{Rn()?n=mt.statSync(t,{bigint:!0}):n=mt.statSync(t);}catch(s){if(s.code==="ENOENT")return {srcStat:r,destStat:null};throw s}return {srcStat:r,destStat:n}}function $_(e,t,r,n){N_(e,t,(s,o)=>{if(s)return n(s);let{srcStat:u,destStat:c}=o;return c&&c.ino&&c.dev&&c.ino===u.ino&&c.dev===u.dev?n(new Error("Source and destination must not be the same.")):u.isDirectory()&&$a(e,t)?n(new Error(Bn(e,t,r))):n(null,{srcStat:u,destStat:c})});}function k_(e,t,r){let{srcStat:n,destStat:s}=L_(e,t);if(s&&s.ino&&s.dev&&s.ino===n.ino&&s.dev===n.dev)throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&$a(e,t))throw new Error(Bn(e,t,r));return {srcStat:n,destStat:s}}function Na(e,t,r,n,s){let o=Xe.resolve(Xe.dirname(e)),u=Xe.resolve(Xe.dirname(r));if(u===o||u===Xe.parse(u).root)return s();Rn()?mt.stat(u,{bigint:!0},(c,d)=>c?c.code==="ENOENT"?s():s(c):d.ino&&d.dev&&d.ino===t.ino&&d.dev===t.dev?s(new Error(Bn(e,r,n))):Na(e,t,u,n,s)):mt.stat(u,(c,d)=>c?c.code==="ENOENT"?s():s(c):d.ino&&d.dev&&d.ino===t.ino&&d.dev===t.dev?s(new Error(Bn(e,r,n))):Na(e,t,u,n,s));}function wh(e,t,r,n){let s=Xe.resolve(Xe.dirname(e)),o=Xe.resolve(Xe.dirname(r));if(o===s||o===Xe.parse(o).root)return;let u;try{Rn()?u=mt.statSync(o,{bigint:!0}):u=mt.statSync(o);}catch(c){if(c.code==="ENOENT")return;throw c}if(u.ino&&u.dev&&u.ino===t.ino&&u.dev===t.dev)throw new Error(Bn(e,r,n));return wh(e,t,o,n)}function $a(e,t){let r=Xe.resolve(e).split(Xe.sep).filter(s=>s),n=Xe.resolve(t).split(Xe.sep).filter(s=>s);return r.reduce((s,o,u)=>s&&n[u]===o,!0)}function Bn(e,t,r){return `Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}vh.exports={checkPaths:$_,checkPathsSync:k_,checkParentPaths:Na,checkParentPathsSync:wh,isSrcSubdir:$a};});var _h=B((QC,Eh)=>{Eh.exports=function(e){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(e)}catch{return new Buffer(e)}return new Buffer(e)};});var bh=B((XC,Oh)=>{var xe=$e(),Yn=U("path"),P_=st().mkdirsSync,R_=Ia().utimesMillisSync,Wn=qn();function B_(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; +`+o),e.push(s+"m+"+Xi.exports.humanize(this.diff)+"\x1B[0m");}else e[0]=vE()+t+" "+e[0];}function vE(){return We.inspectOpts.hideDate?"":new Date().toISOString()+" "}function wE(...e){return process.stderr.write(Qi.format(...e)+` +`)}function EE(e){e?process.env.DEBUG=e:delete process.env.DEBUG;}function _E(){return process.env.DEBUG}function FE(e){e.inspectOpts={};let t=Object.keys(We.inspectOpts);for(let r=0;rt.trim()).join(" ")};zf.O=function(e){return this.inspectOpts.colors=this.useColors,Qi.inspect(e,this.inspectOpts)};});var qe=B((_C,la)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?la.exports=Rf():la.exports=Hf();});var Gf=B((FC,Vf)=>{Vf.exports=SE;function Xr(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function SE(e){if(e=e||{},e.circles)return CE(e);return e.proto?n:r;function t(s,o){for(var u=Object.keys(s),c=new Array(u.length),d=0;d{var OE=U("util"),mr=qe()("log4js:configuration"),es=[],ts=[],Jf=e=>!e,Zf=e=>e&&typeof e=="object"&&!Array.isArray(e),bE=e=>/^[A-Za-z][A-Za-z0-9_]*$/g.test(e),xE=e=>e&&typeof e=="number"&&Number.isInteger(e),AE=e=>{ts.push(e),mr(`Added listener, now ${ts.length} listeners`);},ME=e=>{es.push(e),mr(`Added pre-processing listener, now ${es.length} listeners`);},Kf=(e,t,r)=>{(Array.isArray(t)?t:[t]).forEach(s=>{if(s)throw new Error(`Problem with log4js configuration: (${OE.inspect(e,{depth:5})}) - ${r}`)});},TE=e=>{mr("New configuration to be validated: ",e),Kf(e,Jf(Zf(e)),"must be an object."),mr(`Calling pre-processing listeners (${es.length})`),es.forEach(t=>t(e)),mr("Configuration pre-processing finished."),mr(`Calling configuration listeners (${ts.length})`),ts.forEach(t=>t(e)),mr("Configuration finished.");};Qf.exports={configure:TE,addListener:AE,addPreProcessingListener:ME,throwExceptionIf:Kf,anObject:Zf,anInteger:xE,validIdentifier:bE,not:Jf};});var rs=B((CC,ft)=>{function Xf(e,t){for(var r=e.toString();r.length-1?s:o,c=Dr(t.getHours()),d=Dr(t.getMinutes()),g=Dr(t.getSeconds()),m=Xf(t.getMilliseconds(),3),D=jE(t.getTimezoneOffset()),y=e.replace(/dd/g,r).replace(/MM/g,n).replace(/y{1,4}/g,u).replace(/hh/g,c).replace(/mm/g,d).replace(/ss/g,g).replace(/SSS/g,m).replace(/O/g,D);return y}function nr(e,t,r,n){e["set"+(n?"":"UTC")+t](r);}function IE(e,t,r){var n=e.indexOf("O")<0,s=!1,o=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(D,y){nr(D,"FullYear",y,n);}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(D,y){nr(D,"Month",y-1,n),D.getMonth()!==y-1&&(s=!0);}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(D,y){s&&nr(D,"Month",D.getMonth()-1,n),nr(D,"Date",y,n);}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(D,y){nr(D,"Hours",y,n);}},{pattern:/mm/,regexp:"\\d\\d",fn:function(D,y){nr(D,"Minutes",y,n);}},{pattern:/ss/,regexp:"\\d\\d",fn:function(D,y){nr(D,"Seconds",y,n);}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(D,y){nr(D,"Milliseconds",y,n);}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(D,y){y==="Z"?y=0:y=y.replace(":","");var F=Math.abs(y),C=(y>0?-1:1)*(F%100+Math.floor(F/100)*60);D.setUTCMinutes(D.getUTCMinutes()+C);}}],u=o.reduce(function(D,y){return y.pattern.test(D.regexp)?(y.index=D.regexp.match(y.pattern).index,D.regexp=D.regexp.replace(y.pattern,"("+y.regexp+")")):y.index=-1,D},{regexp:e,index:[]}),c=o.filter(function(D){return D.index>-1});c.sort(function(D,y){return D.index-y.index});var d=new RegExp(u.regexp),g=d.exec(t);if(g){var m=r||ft.exports.now();return c.forEach(function(D,y){D.fn(m,g[y+1]);}),m}throw new Error("String '"+t+"' could not be parsed as '"+e+"'")}function NE(e,t,r){if(!e)throw new Error("pattern must be supplied");return IE(e,t,r)}function LE(){return new Date}ft.exports=ed;ft.exports.asString=ed;ft.exports.parse=NE;ft.exports.now=LE;ft.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS";ft.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO";ft.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS";ft.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS";});var da=B((OC,dd)=>{var ir=rs(),td=U("os"),In=U("util"),jn=U("path"),rd=U("url"),nd=qe()("log4js:layouts"),id={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[90,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[91,39],yellow:[33,39]};function sd(e){return e?`\x1B[${id[e][0]}m`:""}function od(e){return e?`\x1B[${id[e][1]}m`:""}function $E(e,t){return sd(t)+e+od(t)}function ad(e,t){return $E(In.format("[%s] [%s] %s - ",ir.asString(e.startTime),e.level.toString(),e.categoryName),t)}function ud(e){return ad(e)+In.format(...e.data)}function ns(e){return ad(e,e.level.colour)+In.format(...e.data)}function cd(e){return In.format(...e.data)}function ld(e){return e.data[0]}function fd(e,t){let r="%r %p %c - %m%n",n=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflosCMAF%])(\{([^}]+)\})?|([^%]+)/;e=e||r;function s(I,W){let k=I.categoryName;if(W){let G=parseInt(W,10),K=k.split(".");GK&&(k=ye.slice(-K).join(jn.sep));}return k}function v(I){return I.lineNumber?`${I.lineNumber}`:""}function M(I){return I.columnNumber?`${I.columnNumber}`:""}function P(I){return I.callStack||""}function J(I){return I.className||""}function X(I){return I.functionName||""}function te(I){return I.functionAlias||""}function L(I){return I.callerName||""}let ee={c:s,d:o,h:u,m:c,n:d,p:g,r:m,"[":D,"]":y,y:_,z:C,"%":F,x:j,X:$,f:x,l:v,o:M,s:P,C:J,M:X,A:te,F:L};function Z(I,W,k){return ee[I](W,k)}function q(I,W){let k;return I?(k=parseInt(I.slice(1),10),k>0?W.slice(0,k):W.slice(k)):W}function Y(I,W){let k;if(I)if(I.charAt(0)==="-")for(k=parseInt(I.slice(1),10);W.length{var Le=gr(),hd=["white","grey","black","blue","cyan","green","magenta","red","yellow"],en=class e{constructor(t,r,n){this.level=t,this.levelStr=r,this.colour=n;}toString(){return this.levelStr}static getLevel(t,r){return t?t instanceof e?t:(t instanceof Object&&t.levelStr&&(t=t.levelStr),e[t.toString().toUpperCase()]||r):r}static addLevels(t){t&&(Object.keys(t).forEach(n=>{let s=n.toUpperCase();e[s]=new e(t[n].value,s,t[n].colour);let o=e.levels.findIndex(u=>u.levelStr===s);o>-1?e.levels[o]=e[s]:e.levels.push(e[s]);}),e.levels.sort((n,s)=>n.level-s.level));}isLessThanOrEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level<=t.level}isGreaterThanOrEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level>=t.level}isEqualTo(t){return typeof t=="string"&&(t=e.getLevel(t)),this.level===t.level}};en.levels=[];en.addLevels({ALL:{value:Number.MIN_VALUE,colour:"grey"},TRACE:{value:5e3,colour:"blue"},DEBUG:{value:1e4,colour:"cyan"},INFO:{value:2e4,colour:"green"},WARN:{value:3e4,colour:"yellow"},ERROR:{value:4e4,colour:"red"},FATAL:{value:5e4,colour:"magenta"},MARK:{value:9007199254740992,colour:"grey"},OFF:{value:Number.MAX_VALUE,colour:"grey"}});Le.addListener(e=>{let t=e.levels;t&&(Le.throwExceptionIf(e,Le.not(Le.anObject(t)),"levels must be an object"),Object.keys(t).forEach(n=>{Le.throwExceptionIf(e,Le.not(Le.validIdentifier(n)),`level name "${n}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)`),Le.throwExceptionIf(e,Le.not(Le.anObject(t[n])),`level "${n}" must be an object`),Le.throwExceptionIf(e,Le.not(t[n].value),`level "${n}" must have a 'value' property`),Le.throwExceptionIf(e,Le.not(Le.anInteger(t[n].value)),`level "${n}".value must have an integer value`),Le.throwExceptionIf(e,Le.not(t[n].colour),`level "${n}" must have a 'colour' property`),Le.throwExceptionIf(e,Le.not(hd.indexOf(t[n].colour)>-1),`level "${n}".colour must be one of ${hd.join(", ")}`);}));});Le.addListener(e=>{en.addLevels(e.levels);});pd.exports=en;});var Sd=B(Ln=>{var{parse:Dd,stringify:yd}=JSON,{keys:kE}=Object,Nn=String,vd="string",md={},is="object",wd=(e,t)=>t,PE=e=>e instanceof Nn?Nn(e):e,RE=(e,t)=>typeof t===vd?new Nn(t):t,Ed=(e,t,r,n)=>{let s=[];for(let o=kE(r),{length:u}=o,c=0;c{let n=Nn(t.push(r)-1);return e.set(r,n),n},_d=(e,t)=>{let r=Dd(e,RE).map(PE),n=r[0],s=t||wd,o=typeof n===is&&n?Ed(r,new Set,n,s):n;return s.call({"":o},"",o)};Ln.parse=_d;var Fd=(e,t,r)=>{let n=t&&typeof t===is?(m,D)=>m===""||-1Dd(Fd(e));Ln.toJSON=BE;var qE=e=>_d(yd(e));Ln.fromJSON=qE;});var ma=B((AC,xd)=>{var Cd=Sd(),Od=yr(),ha=class{constructor(){let t={__LOG4JS_undefined__:void 0,__LOG4JS_NaN__:+"abc",__LOG4JS_Infinity__:1/0,"__LOG4JS_-Infinity__":-1/0};this.deMap=t,this.serMap={},Object.keys(this.deMap).forEach(r=>{let n=this.deMap[r];this.serMap[n]=r;});}canSerialise(t){return typeof t=="string"?!1:t in this.serMap}serialise(t){return this.canSerialise(t)?this.serMap[t]:t}canDeserialise(t){return t in this.deMap}deserialise(t){return this.canDeserialise(t)?this.deMap[t]:t}},bd=new ha,pa=class e{constructor(t,r,n,s,o,u){if(this.startTime=new Date,this.categoryName=t,this.data=n,this.level=r,this.context=Object.assign({},s),this.pid=process.pid,this.error=u,typeof o<"u"){if(!o||typeof o!="object"||Array.isArray(o))throw new TypeError("Invalid location type passed to LoggingEvent constructor");this.constructor._getLocationKeys().forEach(c=>{typeof o[c]<"u"&&(this[c]=o[c]);});}}static _getLocationKeys(){return ["fileName","lineNumber","columnNumber","callStack","className","functionName","functionAlias","callerName"]}serialise(){return Cd.stringify(this,(t,r)=>(r instanceof Error&&(r=Object.assign({message:r.message,stack:r.stack},r)),bd.serialise(r)))}static deserialise(t){let r;try{let n=Cd.parse(t,(s,o)=>{if(o&&o.message&&o.stack){let u=new Error(o);Object.keys(o).forEach(c=>{u[c]=o[c];}),o=u;}return bd.deserialise(o)});this._getLocationKeys().forEach(s=>{typeof n[s]<"u"&&(n.location||(n.location={}),n.location[s]=n[s]);}),r=new e(n.categoryName,Od.getLevel(n.level.levelStr),n.data,n.context,n.location,n.error),r.startTime=new Date(n.startTime),r.pid=n.pid,n.cluster&&(r.cluster=n.cluster);}catch(n){r=new e("log4js",Od.ERROR,["Unable to parse log:",t,"because: ",n]);}return r}};xd.exports=pa;});var os=B((MC,Td)=>{var dt=qe()("log4js:clustering"),YE=ma(),WE=gr(),tn=!1,ht=null;try{ht=U("cluster");}catch{dt("cluster module not present"),tn=!0;}var Da=[],kn=!1,$n="NODE_APP_INSTANCE",Ad=()=>kn&&process.env[$n]==="0",ga=()=>tn||ht&&ht.isMaster||Ad(),Md=e=>{Da.forEach(t=>t(e));},ss=(e,t)=>{if(dt("cluster message received from worker ",e,": ",t),e.topic&&e.data&&(t=e,e=void 0),t&&t.topic&&t.topic==="log4js:message"){dt("received message: ",t.data);let r=YE.deserialise(t.data);Md(r);}};tn||WE.addListener(e=>{Da.length=0,{pm2:kn,disableClustering:tn,pm2InstanceVar:$n="NODE_APP_INSTANCE"}=e,dt(`clustering disabled ? ${tn}`),dt(`cluster.isMaster ? ${ht&&ht.isMaster}`),dt(`pm2 enabled ? ${kn}`),dt(`pm2InstanceVar = ${$n}`),dt(`process.env[${$n}] = ${process.env[$n]}`),kn&&process.removeListener("message",ss),ht&&ht.removeListener&&ht.removeListener("message",ss),tn||e.disableClustering?dt("Not listening for cluster messages, because clustering disabled."):Ad()?(dt("listening for PM2 broadcast messages"),process.on("message",ss)):ht&&ht.isMaster?(dt("listening for cluster messages"),ht.on("message",ss)):dt("not listening for messages, because we are not a master process");});Td.exports={onlyOnMaster:(e,t)=>ga()?e():t,isMaster:ga,send:e=>{ga()?Md(e):(kn||(e.cluster={workerId:ht.worker.id,worker:process.pid}),process.send({topic:"log4js:message",data:e.serialise()}));},onMessage:e=>{Da.push(e);}};});var Nd=B((TC,Id)=>{function UE(e){if(typeof e=="number"&&Number.isInteger(e))return e;let t={K:1024,M:1024*1024,G:1024*1024*1024},r=Object.keys(t),n=e.slice(-1).toLocaleUpperCase(),s=e.slice(0,-1).trim();if(r.indexOf(n)<0||!Number.isInteger(Number(s)))throw Error(`maxLogSize: "${e}" is invalid`);return s*t[n]}function zE(e,t){let r=Object.assign({},t);return Object.keys(e).forEach(n=>{r[n]&&(r[n]=e[n](t[n]));}),r}function ya(e){return zE({maxLogSize:UE},e)}var jd={dateFile:ya,file:ya,fileSync:ya};Id.exports.modifyConfig=e=>jd[e.type]?jd[e.type](e):e;});var $d=B((jC,Ld)=>{var HE=console.log.bind(console);function VE(e,t){return r=>{HE(e(r,t));}}function GE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),VE(r,e.timezoneOffset)}Ld.exports.configure=GE;});var Pd=B(kd=>{function JE(e,t){return r=>{process.stdout.write(`${e(r,t)} +`);}}function ZE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),JE(r,e.timezoneOffset)}kd.configure=ZE;});var Bd=B((NC,Rd)=>{function KE(e,t){return r=>{process.stderr.write(`${e(r,t)} +`);}}function QE(e,t){let r=t.colouredLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),KE(r,e.timezoneOffset)}Rd.exports.configure=QE;});var Yd=B((LC,qd)=>{function XE(e,t,r,n){let s=n.getLevel(e),o=n.getLevel(t,n.FATAL);return u=>{let c=u.level;s.isLessThanOrEqualTo(c)&&o.isGreaterThanOrEqualTo(c)&&r(u);}}function e_(e,t,r,n){let s=r(e.appender);return XE(e.level,e.maxLevel,s,n)}qd.exports.configure=e_;});var zd=B(($C,Ud)=>{var Wd=qe()("log4js:categoryFilter");function t_(e,t){return typeof e=="string"&&(e=[e]),r=>{Wd(`Checking ${r.categoryName} against ${e}`),e.indexOf(r.categoryName)===-1&&(Wd("Not excluded, sending to appender"),t(r));}}function r_(e,t,r){let n=r(e.appender);return t_(e.exclude,n)}Ud.exports.configure=r_;});var Gd=B((kC,Vd)=>{var Hd=qe()("log4js:noLogFilter");function n_(e){return e.filter(r=>r!=null&&r!=="")}function i_(e,t){return r=>{Hd(`Checking data: ${r.data} against filters: ${e}`),typeof e=="string"&&(e=[e]),e=n_(e);let n=new RegExp(e.join("|"),"i");(e.length===0||r.data.findIndex(s=>n.test(s))<0)&&(Hd("Not excluded, sending to appender"),t(r));}}function s_(e,t,r){let n=r(e.appender);return i_(e.exclude,n)}Vd.exports.configure=s_;});var Qe=B(va=>{va.fromCallback=function(e){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")e.apply(this,arguments);else return new Promise((t,r)=>{arguments[arguments.length]=(n,s)=>{if(n)return r(n);t(s);},arguments.length++,e.apply(this,arguments);})},"name",{value:e.name})};va.fromPromise=function(e){return Object.defineProperty(function(){let t=arguments[arguments.length-1];if(typeof t!="function")return e.apply(this,arguments);e.apply(this,arguments).then(r=>t(null,r),t);},"name",{value:e.name})};});var Zd=B((RC,Jd)=>{var sr=U("constants"),o_=process.cwd,as=null,a_=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return as||(as=o_.call(process)),as};try{process.cwd();}catch{}typeof process.chdir=="function"&&(wa=process.chdir,process.chdir=function(e){as=null,wa.call(process,e);},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,wa));var wa;Jd.exports=u_;function u_(e){sr.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=o(e.chown),e.fchown=o(e.fchown),e.lchown=o(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=u(e.chownSync),e.fchownSync=u(e.fchownSync),e.lchownSync=u(e.lchownSync),e.chmodSync=s(e.chmodSync),e.fchmodSync=s(e.fchmodSync),e.lchmodSync=s(e.lchmodSync),e.stat=c(e.stat),e.fstat=c(e.fstat),e.lstat=c(e.lstat),e.statSync=d(e.statSync),e.fstatSync=d(e.fstatSync),e.lstatSync=d(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(m,D,y){y&&process.nextTick(y);},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(m,D,y,F){F&&process.nextTick(F);},e.lchownSync=function(){}),a_==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(m){function D(y,F,C){var _=Date.now(),j=0;m(y,F,function $(x){if(x&&(x.code==="EACCES"||x.code==="EPERM"||x.code==="EBUSY")&&Date.now()-_<6e4){setTimeout(function(){e.stat(F,function(v,M){v&&v.code==="ENOENT"?m(y,F,$):C(x);});},j),j<100&&(j+=10);return}C&&C(x);});}return Object.setPrototypeOf&&Object.setPrototypeOf(D,m),D}(e.rename)),e.read=typeof e.read!="function"?e.read:function(m){function D(y,F,C,_,j,$){var x;if($&&typeof $=="function"){var v=0;x=function(M,P,J){if(M&&M.code==="EAGAIN"&&v<10)return v++,m.call(e,y,F,C,_,j,x);$.apply(this,arguments);};}return m.call(e,y,F,C,_,j,x)}return Object.setPrototypeOf&&Object.setPrototypeOf(D,m),D}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(m){return function(D,y,F,C,_){for(var j=0;;)try{return m.call(e,D,y,F,C,_)}catch($){if($.code==="EAGAIN"&&j<10){j++;continue}throw $}}}(e.readSync);function t(m){m.lchmod=function(D,y,F){m.open(D,sr.O_WRONLY|sr.O_SYMLINK,y,function(C,_){if(C){F&&F(C);return}m.fchmod(_,y,function(j){m.close(_,function($){F&&F(j||$);});});});},m.lchmodSync=function(D,y){var F=m.openSync(D,sr.O_WRONLY|sr.O_SYMLINK,y),C=!0,_;try{_=m.fchmodSync(F,y),C=!1;}finally{if(C)try{m.closeSync(F);}catch{}else m.closeSync(F);}return _};}function r(m){sr.hasOwnProperty("O_SYMLINK")&&m.futimes?(m.lutimes=function(D,y,F,C){m.open(D,sr.O_SYMLINK,function(_,j){if(_){C&&C(_);return}m.futimes(j,y,F,function($){m.close(j,function(x){C&&C($||x);});});});},m.lutimesSync=function(D,y,F){var C=m.openSync(D,sr.O_SYMLINK),_,j=!0;try{_=m.futimesSync(C,y,F),j=!1;}finally{if(j)try{m.closeSync(C);}catch{}else m.closeSync(C);}return _}):m.futimes&&(m.lutimes=function(D,y,F,C){C&&process.nextTick(C);},m.lutimesSync=function(){});}function n(m){return m&&function(D,y,F){return m.call(e,D,y,function(C){g(C)&&(C=null),F&&F.apply(this,arguments);})}}function s(m){return m&&function(D,y){try{return m.call(e,D,y)}catch(F){if(!g(F))throw F}}}function o(m){return m&&function(D,y,F,C){return m.call(e,D,y,F,function(_){g(_)&&(_=null),C&&C.apply(this,arguments);})}}function u(m){return m&&function(D,y,F){try{return m.call(e,D,y,F)}catch(C){if(!g(C))throw C}}}function c(m){return m&&function(D,y,F){typeof y=="function"&&(F=y,y=null);function C(_,j){j&&(j.uid<0&&(j.uid+=4294967296),j.gid<0&&(j.gid+=4294967296)),F&&F.apply(this,arguments);}return y?m.call(e,D,y,C):m.call(e,D,C)}}function d(m){return m&&function(D,y){var F=y?m.call(e,D,y):m.call(e,D);return F&&(F.uid<0&&(F.uid+=4294967296),F.gid<0&&(F.gid+=4294967296)),F}}function g(m){if(!m||m.code==="ENOSYS")return !0;var D=!process.getuid||process.getuid()!==0;return !!(D&&(m.code==="EINVAL"||m.code==="EPERM"))}}});var Xd=B((BC,Qd)=>{var Kd=U("stream").Stream;Qd.exports=c_;function c_(e){return {ReadStream:t,WriteStream:r};function t(n,s){if(!(this instanceof t))return new t(n,s);Kd.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,s=s||{};for(var u=Object.keys(s),c=0,d=u.length;cthis.end)throw new Error("start must be <= end");this.pos=this.start;}if(this.fd!==null){process.nextTick(function(){o._read();});return}e.open(this.path,this.flags,this.mode,function(m,D){if(m){o.emit("error",m),o.readable=!1;return}o.fd=D,o.emit("open",D),o._read();});}function r(n,s){if(!(this instanceof r))return new r(n,s);Kd.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,s=s||{};for(var o=Object.keys(s),u=0,c=o.length;u= zero");this.pos=this.start;}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush());}}});var th=B((qC,eh)=>{eh.exports=f_;var l_=Object.getPrototypeOf||function(e){return e.__proto__};function f_(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:l_(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));}),t}});var $e=B((YC,Fa)=>{var Me=U("fs"),d_=Zd(),h_=Xd(),p_=th(),us=U("util"),Ue,ls;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ue=Symbol.for("graceful-fs.queue"),ls=Symbol.for("graceful-fs.previous")):(Ue="___graceful-fs.queue",ls="___graceful-fs.previous");function m_(){}function ih(e,t){Object.defineProperty(e,Ue,{get:function(){return t}});}var vr=m_;us.debuglog?vr=us.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(vr=function(){var e=us.format.apply(us,arguments);e="GFS4: "+e.split(/\n/).join(` +GFS4: `),console.error(e);});Me[Ue]||(rh=global[Ue]||[],ih(Me,rh),Me.close=function(e){function t(r,n){return e.call(Me,r,function(s){s||nh(),typeof n=="function"&&n.apply(this,arguments);})}return Object.defineProperty(t,ls,{value:e}),t}(Me.close),Me.closeSync=function(e){function t(r){e.apply(Me,arguments),nh();}return Object.defineProperty(t,ls,{value:e}),t}(Me.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){vr(Me[Ue]),U("assert").equal(Me[Ue].length,0);}));var rh;global[Ue]||ih(global,Me[Ue]);Fa.exports=Ea(p_(Me));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Me.__patched&&(Fa.exports=Ea(Me),Me.__patched=!0);function Ea(e){d_(e),e.gracefulify=Ea,e.createReadStream=P,e.createWriteStream=J;var t=e.readFile;e.readFile=r;function r(L,ee,Z){return typeof ee=="function"&&(Z=ee,ee=null),q(L,ee,Z);function q(Y,V,I,W){return t(Y,V,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?rn([q,[Y,V,I],k,W||Date.now(),Date.now()]):typeof I=="function"&&I.apply(this,arguments);})}}var n=e.writeFile;e.writeFile=s;function s(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return n(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var o=e.appendFile;o&&(e.appendFile=u);function u(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return o(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var c=e.copyFile;c&&(e.copyFile=d);function d(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=0),Y(L,ee,Z,q);function Y(V,I,W,k,G){return c(V,I,W,function(K){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}var g=e.readdir;e.readdir=D;var m=/^v[0-5]\./;function D(L,ee,Z){typeof ee=="function"&&(Z=ee,ee=null);var q=m.test(process.version)?function(I,W,k,G){return g(I,Y(I,W,k,G))}:function(I,W,k,G){return g(I,W,Y(I,W,k,G))};return q(L,ee,Z);function Y(V,I,W,k){return function(G,K){G&&(G.code==="EMFILE"||G.code==="ENFILE")?rn([q,[V,I,W],G,k||Date.now(),Date.now()]):(K&&K.sort&&K.sort(),typeof W=="function"&&W.call(this,G,K));}}}if(process.version.substr(0,4)==="v0.8"){var y=h_(e);$=y.ReadStream,v=y.WriteStream;}var F=e.ReadStream;F&&($.prototype=Object.create(F.prototype),$.prototype.open=x);var C=e.WriteStream;C&&(v.prototype=Object.create(C.prototype),v.prototype.open=M),Object.defineProperty(e,"ReadStream",{get:function(){return $},set:function(L){$=L;},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return v},set:function(L){v=L;},enumerable:!0,configurable:!0});var _=$;Object.defineProperty(e,"FileReadStream",{get:function(){return _},set:function(L){_=L;},enumerable:!0,configurable:!0});var j=v;Object.defineProperty(e,"FileWriteStream",{get:function(){return j},set:function(L){j=L;},enumerable:!0,configurable:!0});function $(L,ee){return this instanceof $?(F.apply(this,arguments),this):$.apply(Object.create($.prototype),arguments)}function x(){var L=this;te(L.path,L.flags,L.mode,function(ee,Z){ee?(L.autoClose&&L.destroy(),L.emit("error",ee)):(L.fd=Z,L.emit("open",Z),L.read());});}function v(L,ee){return this instanceof v?(C.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}function M(){var L=this;te(L.path,L.flags,L.mode,function(ee,Z){ee?(L.destroy(),L.emit("error",ee)):(L.fd=Z,L.emit("open",Z));});}function P(L,ee){return new e.ReadStream(L,ee)}function J(L,ee){return new e.WriteStream(L,ee)}var X=e.open;e.open=te;function te(L,ee,Z,q){return typeof Z=="function"&&(q=Z,Z=null),Y(L,ee,Z,q);function Y(V,I,W,k,G){return X(V,I,W,function(K,ye){K&&(K.code==="EMFILE"||K.code==="ENFILE")?rn([Y,[V,I,W,k],K,G||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments);})}}return e}function rn(e){vr("ENQUEUE",e[0].name,e[1]),Me[Ue].push(e),_a();}var cs;function nh(){for(var e=Date.now(),t=0;t2&&(Me[Ue][t][3]=e,Me[Ue][t][4]=e);_a();}function _a(){if(clearTimeout(cs),cs=void 0,Me[Ue].length!==0){var e=Me[Ue].shift(),t=e[0],r=e[1],n=e[2],s=e[3],o=e[4];if(s===void 0)vr("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-s>=6e4){vr("TIMEOUT",t.name,r);var u=r.pop();typeof u=="function"&&u.call(null,n);}else {var c=Date.now()-o,d=Math.max(o-s,1),g=Math.min(d*1.2,100);c>=g?(vr("RETRY",t.name,r),t.apply(null,r.concat([s]))):Me[Ue].push(e);}cs===void 0&&(cs=setTimeout(_a,0));}}});var Sa=B(wr=>{var sh=Qe().fromCallback,pt=$e(),g_=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof pt[e]=="function");Object.keys(pt).forEach(e=>{e!=="promises"&&(wr[e]=pt[e]);});g_.forEach(e=>{wr[e]=sh(pt[e]);});wr.exists=function(e,t){return typeof t=="function"?pt.exists(e,t):new Promise(r=>pt.exists(e,r))};wr.read=function(e,t,r,n,s,o){return typeof o=="function"?pt.read(e,t,r,n,s,o):new Promise((u,c)=>{pt.read(e,t,r,n,s,(d,g,m)=>{if(d)return c(d);u({bytesRead:g,buffer:m});});})};wr.write=function(e,t,...r){return typeof r[r.length-1]=="function"?pt.write(e,t,...r):new Promise((n,s)=>{pt.write(e,t,...r,(o,u,c)=>{if(o)return s(o);n({bytesWritten:u,buffer:c});});})};typeof pt.realpath.native=="function"&&(wr.realpath.native=sh(pt.realpath.native));});var Oa=B((UC,ah)=>{var Ca=U("path");function oh(e){return e=Ca.normalize(Ca.resolve(e)).split(Ca.sep),e.length>0?e[0]:null}var D_=/[<>:"|?*]/;function y_(e){let t=oh(e);return e=e.replace(t,""),D_.test(e)}ah.exports={getRootPath:oh,invalidWin32Path:y_};});var ch=B((zC,uh)=>{var v_=$e(),ba=U("path"),w_=Oa().invalidWin32Path,E_=parseInt("0777",8);function xa(e,t,r,n){if(typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t}),process.platform==="win32"&&w_(e)){let u=new Error(e+" contains invalid WIN32 path characters.");return u.code="EINVAL",r(u)}let s=t.mode,o=t.fs||v_;s===void 0&&(s=E_&~process.umask()),n||(n=null),r=r||function(){},e=ba.resolve(e),o.mkdir(e,s,u=>{if(!u)return n=n||e,r(null,n);switch(u.code){case"ENOENT":if(ba.dirname(e)===e)return r(u);xa(ba.dirname(e),t,(c,d)=>{c?r(c,d):xa(e,t,r,d);});break;default:o.stat(e,(c,d)=>{c||!d.isDirectory()?r(u,n):r(null,n);});break}});}uh.exports=xa;});var fh=B((HC,lh)=>{var __=$e(),Aa=U("path"),F_=Oa().invalidWin32Path,S_=parseInt("0777",8);function Ma(e,t,r){(!t||typeof t!="object")&&(t={mode:t});let n=t.mode,s=t.fs||__;if(process.platform==="win32"&&F_(e)){let o=new Error(e+" contains invalid WIN32 path characters.");throw o.code="EINVAL",o}n===void 0&&(n=S_&~process.umask()),r||(r=null),e=Aa.resolve(e);try{s.mkdirSync(e,n),r=r||e;}catch(o){if(o.code==="ENOENT"){if(Aa.dirname(e)===e)throw o;r=Ma(Aa.dirname(e),t,r),Ma(e,t,r);}else {let u;try{u=s.statSync(e);}catch{throw o}if(!u.isDirectory())throw o}}return r}lh.exports=Ma;});var st=B((VC,dh)=>{var C_=Qe().fromCallback,Ta=C_(ch()),ja=fh();dh.exports={mkdirs:Ta,mkdirsSync:ja,mkdirp:Ta,mkdirpSync:ja,ensureDir:Ta,ensureDirSync:ja};});var Ia=B((GC,ph)=>{var Ve=$e(),hh=U("os"),fs=U("path");function O_(){let e=fs.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));e=fs.join(hh.tmpdir(),e);let t=new Date(1435410243862);Ve.writeFileSync(e,"https://github.com/jprichardson/node-fs-extra/pull/141");let r=Ve.openSync(e,"r+");return Ve.futimesSync(r,t,t),Ve.closeSync(r),Ve.statSync(e).mtime>1435410243e3}function b_(e){let t=fs.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));t=fs.join(hh.tmpdir(),t);let r=new Date(1435410243862);Ve.writeFile(t,"https://github.com/jprichardson/node-fs-extra/pull/141",n=>{if(n)return e(n);Ve.open(t,"r+",(s,o)=>{if(s)return e(s);Ve.futimes(o,r,r,u=>{if(u)return e(u);Ve.close(o,c=>{if(c)return e(c);Ve.stat(t,(d,g)=>{if(d)return e(d);e(null,g.mtime>1435410243e3);});});});});});}function x_(e){if(typeof e=="number")return Math.floor(e/1e3)*1e3;if(e instanceof Date)return new Date(Math.floor(e.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function A_(e,t,r,n){Ve.open(e,"r+",(s,o)=>{if(s)return n(s);Ve.futimes(o,t,r,u=>{Ve.close(o,c=>{n&&n(u||c);});});});}function M_(e,t,r){let n=Ve.openSync(e,"r+");return Ve.futimesSync(n,t,r),Ve.closeSync(n)}ph.exports={hasMillisRes:b_,hasMillisResSync:O_,timeRemoveMillis:x_,utimesMillis:A_,utimesMillisSync:M_};});var Bn=B((JC,wh)=>{var mt=$e(),Xe=U("path"),mh=10,gh=5,T_=0,La=process.versions.node.split("."),Dh=Number.parseInt(La[0],10),yh=Number.parseInt(La[1],10),j_=Number.parseInt(La[2],10);function Pn(){if(Dh>mh)return !0;if(Dh===mh){if(yh>gh)return !0;if(yh===gh&&j_>=T_)return !0}return !1}function I_(e,t,r){Pn()?mt.stat(e,{bigint:!0},(n,s)=>{if(n)return r(n);mt.stat(t,{bigint:!0},(o,u)=>o?o.code==="ENOENT"?r(null,{srcStat:s,destStat:null}):r(o):r(null,{srcStat:s,destStat:u}));}):mt.stat(e,(n,s)=>{if(n)return r(n);mt.stat(t,(o,u)=>o?o.code==="ENOENT"?r(null,{srcStat:s,destStat:null}):r(o):r(null,{srcStat:s,destStat:u}));});}function N_(e,t){let r,n;Pn()?r=mt.statSync(e,{bigint:!0}):r=mt.statSync(e);try{Pn()?n=mt.statSync(t,{bigint:!0}):n=mt.statSync(t);}catch(s){if(s.code==="ENOENT")return {srcStat:r,destStat:null};throw s}return {srcStat:r,destStat:n}}function L_(e,t,r,n){I_(e,t,(s,o)=>{if(s)return n(s);let{srcStat:u,destStat:c}=o;return c&&c.ino&&c.dev&&c.ino===u.ino&&c.dev===u.dev?n(new Error("Source and destination must not be the same.")):u.isDirectory()&&$a(e,t)?n(new Error(Rn(e,t,r))):n(null,{srcStat:u,destStat:c})});}function $_(e,t,r){let{srcStat:n,destStat:s}=N_(e,t);if(s&&s.ino&&s.dev&&s.ino===n.ino&&s.dev===n.dev)throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&$a(e,t))throw new Error(Rn(e,t,r));return {srcStat:n,destStat:s}}function Na(e,t,r,n,s){let o=Xe.resolve(Xe.dirname(e)),u=Xe.resolve(Xe.dirname(r));if(u===o||u===Xe.parse(u).root)return s();Pn()?mt.stat(u,{bigint:!0},(c,d)=>c?c.code==="ENOENT"?s():s(c):d.ino&&d.dev&&d.ino===t.ino&&d.dev===t.dev?s(new Error(Rn(e,r,n))):Na(e,t,u,n,s)):mt.stat(u,(c,d)=>c?c.code==="ENOENT"?s():s(c):d.ino&&d.dev&&d.ino===t.ino&&d.dev===t.dev?s(new Error(Rn(e,r,n))):Na(e,t,u,n,s));}function vh(e,t,r,n){let s=Xe.resolve(Xe.dirname(e)),o=Xe.resolve(Xe.dirname(r));if(o===s||o===Xe.parse(o).root)return;let u;try{Pn()?u=mt.statSync(o,{bigint:!0}):u=mt.statSync(o);}catch(c){if(c.code==="ENOENT")return;throw c}if(u.ino&&u.dev&&u.ino===t.ino&&u.dev===t.dev)throw new Error(Rn(e,r,n));return vh(e,t,o,n)}function $a(e,t){let r=Xe.resolve(e).split(Xe.sep).filter(s=>s),n=Xe.resolve(t).split(Xe.sep).filter(s=>s);return r.reduce((s,o,u)=>s&&n[u]===o,!0)}function Rn(e,t,r){return `Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}wh.exports={checkPaths:L_,checkPathsSync:$_,checkParentPaths:Na,checkParentPathsSync:vh,isSrcSubdir:$a};});var _h=B((ZC,Eh)=>{Eh.exports=function(e){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(e)}catch{return new Buffer(e)}return new Buffer(e)};});var bh=B((KC,Oh)=>{var xe=$e(),qn=U("path"),k_=st().mkdirsSync,P_=Ia().utimesMillisSync,Yn=Bn();function R_(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; - see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:s}=Wn.checkPathsSync(e,t,"copy");return Wn.checkParentPathsSync(e,n,t,"copy"),q_(s,e,t,r)}function q_(e,t,r,n){if(n.filter&&!n.filter(t,r))return;let s=Yn.dirname(r);return xe.existsSync(s)||P_(s),Fh(e,t,r,n)}function Fh(e,t,r,n){if(!(n.filter&&!n.filter(t,r)))return Y_(e,t,r,n)}function Y_(e,t,r,n){let o=(n.dereference?xe.statSync:xe.lstatSync)(t);if(o.isDirectory())return H_(o,e,t,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return W_(o,e,t,r,n);if(o.isSymbolicLink())return J_(e,t,r,n)}function W_(e,t,r,n,s){return t?U_(e,r,n,s):Sh(e,r,n,s)}function U_(e,t,r,n){if(n.overwrite)return xe.unlinkSync(r),Sh(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Sh(e,t,r,n){return typeof xe.copyFileSync=="function"?(xe.copyFileSync(t,r),xe.chmodSync(r,e.mode),n.preserveTimestamps?R_(r,e.atime,e.mtime):void 0):z_(e,t,r,n)}function z_(e,t,r,n){let o=_h()(65536),u=xe.openSync(t,"r"),c=xe.openSync(r,"w",e.mode),d=0;for(;dG_(n,e,t,r));}function G_(e,t,r,n){let s=Yn.join(t,e),o=Yn.join(r,e),{destStat:u}=Wn.checkPathsSync(s,o,"copy");return Fh(u,s,o,n)}function J_(e,t,r,n){let s=xe.readlinkSync(t);if(n.dereference&&(s=Yn.resolve(process.cwd(),s)),e){let o;try{o=xe.readlinkSync(r);}catch(u){if(u.code==="EINVAL"||u.code==="UNKNOWN")return xe.symlinkSync(s,r);throw u}if(n.dereference&&(o=Yn.resolve(process.cwd(),o)),Wn.isSrcSubdir(s,o))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${o}'.`);if(xe.statSync(r).isDirectory()&&Wn.isSrcSubdir(o,s))throw new Error(`Cannot overwrite '${o}' with '${s}'.`);return Z_(s,r)}else return xe.symlinkSync(s,r)}function Z_(e,t){return xe.unlinkSync(t),xe.symlinkSync(e,t)}Oh.exports=B_;});var ka=B((eO,xh)=>{xh.exports={copySync:bh()};});var xt=B((tO,Mh)=>{var K_=Qe().fromPromise,Ah=Sa();function Q_(e){return Ah.access(e).then(()=>!0).catch(()=>!1)}Mh.exports={pathExists:K_(Q_),pathExistsSync:Ah.existsSync};});var Rh=B((rO,Ph)=>{var ze=$e(),Un=U("path"),X_=st().mkdirs,eF=xt().pathExists,tF=Ia().utimesMillis,zn=qn();function rF(e,t,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; + see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:s}=Yn.checkPathsSync(e,t,"copy");return Yn.checkParentPathsSync(e,n,t,"copy"),B_(s,e,t,r)}function B_(e,t,r,n){if(n.filter&&!n.filter(t,r))return;let s=qn.dirname(r);return xe.existsSync(s)||k_(s),Fh(e,t,r,n)}function Fh(e,t,r,n){if(!(n.filter&&!n.filter(t,r)))return q_(e,t,r,n)}function q_(e,t,r,n){let o=(n.dereference?xe.statSync:xe.lstatSync)(t);if(o.isDirectory())return z_(o,e,t,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return Y_(o,e,t,r,n);if(o.isSymbolicLink())return G_(e,t,r,n)}function Y_(e,t,r,n,s){return t?W_(e,r,n,s):Sh(e,r,n,s)}function W_(e,t,r,n){if(n.overwrite)return xe.unlinkSync(r),Sh(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Sh(e,t,r,n){return typeof xe.copyFileSync=="function"?(xe.copyFileSync(t,r),xe.chmodSync(r,e.mode),n.preserveTimestamps?P_(r,e.atime,e.mtime):void 0):U_(e,t,r,n)}function U_(e,t,r,n){let o=_h()(65536),u=xe.openSync(t,"r"),c=xe.openSync(r,"w",e.mode),d=0;for(;dV_(n,e,t,r));}function V_(e,t,r,n){let s=qn.join(t,e),o=qn.join(r,e),{destStat:u}=Yn.checkPathsSync(s,o,"copy");return Fh(u,s,o,n)}function G_(e,t,r,n){let s=xe.readlinkSync(t);if(n.dereference&&(s=qn.resolve(process.cwd(),s)),e){let o;try{o=xe.readlinkSync(r);}catch(u){if(u.code==="EINVAL"||u.code==="UNKNOWN")return xe.symlinkSync(s,r);throw u}if(n.dereference&&(o=qn.resolve(process.cwd(),o)),Yn.isSrcSubdir(s,o))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${o}'.`);if(xe.statSync(r).isDirectory()&&Yn.isSrcSubdir(o,s))throw new Error(`Cannot overwrite '${o}' with '${s}'.`);return J_(s,r)}else return xe.symlinkSync(s,r)}function J_(e,t){return xe.unlinkSync(t),xe.symlinkSync(e,t)}Oh.exports=R_;});var ka=B((QC,xh)=>{xh.exports={copySync:bh()};});var xt=B((XC,Mh)=>{var Z_=Qe().fromPromise,Ah=Sa();function K_(e){return Ah.access(e).then(()=>!0).catch(()=>!1)}Mh.exports={pathExists:Z_(K_),pathExistsSync:Ah.existsSync};});var Rh=B((eO,Ph)=>{var ze=$e(),Wn=U("path"),Q_=st().mkdirs,X_=xt().pathExists,eF=Ia().utimesMillis,Un=Bn();function tF(e,t,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended; - see https://github.com/jprichardson/node-fs-extra/issues/269`),zn.checkPaths(e,t,"copy",(s,o)=>{if(s)return n(s);let{srcStat:u,destStat:c}=o;zn.checkParentPaths(e,u,t,"copy",d=>d?n(d):r.filter?Ih(Th,c,e,t,r,n):Th(c,e,t,r,n));});}function Th(e,t,r,n,s){let o=Un.dirname(r);eF(o,(u,c)=>{if(u)return s(u);if(c)return Pa(e,t,r,n,s);X_(o,d=>d?s(d):Pa(e,t,r,n,s));});}function Ih(e,t,r,n,s,o){Promise.resolve(s.filter(r,n)).then(u=>u?e(t,r,n,s,o):o(),u=>o(u));}function Pa(e,t,r,n,s){return n.filter?Ih(jh,e,t,r,n,s):jh(e,t,r,n,s)}function jh(e,t,r,n,s){(n.dereference?ze.stat:ze.lstat)(t,(u,c)=>{if(u)return s(u);if(c.isDirectory())return oF(c,e,t,r,n,s);if(c.isFile()||c.isCharacterDevice()||c.isBlockDevice())return nF(c,e,t,r,n,s);if(c.isSymbolicLink())return cF(e,t,r,n,s)});}function nF(e,t,r,n,s,o){return t?iF(e,r,n,s,o):Nh(e,r,n,s,o)}function iF(e,t,r,n,s){if(n.overwrite)ze.unlink(r,o=>o?s(o):Nh(e,t,r,n,s));else return n.errorOnExist?s(new Error(`'${r}' already exists`)):s()}function Nh(e,t,r,n,s){return typeof ze.copyFile=="function"?ze.copyFile(t,r,o=>o?s(o):Lh(e,r,n,s)):sF(e,t,r,n,s)}function sF(e,t,r,n,s){let o=ze.createReadStream(t);o.on("error",u=>s(u)).once("open",()=>{let u=ze.createWriteStream(r,{mode:e.mode});u.on("error",c=>s(c)).on("open",()=>o.pipe(u)).once("close",()=>Lh(e,r,n,s));});}function Lh(e,t,r,n){ze.chmod(t,e.mode,s=>s?n(s):r.preserveTimestamps?tF(t,e.atime,e.mtime,n):n());}function oF(e,t,r,n,s,o){return t?t&&!t.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):$h(r,n,s,o):aF(e,r,n,s,o)}function aF(e,t,r,n,s){ze.mkdir(r,o=>{if(o)return s(o);$h(t,r,n,u=>u?s(u):ze.chmod(r,e.mode,s));});}function $h(e,t,r,n){ze.readdir(e,(s,o)=>s?n(s):kh(o,e,t,r,n));}function kh(e,t,r,n,s){let o=e.pop();return o?uF(e,o,t,r,n,s):s()}function uF(e,t,r,n,s,o){let u=Un.join(r,t),c=Un.join(n,t);zn.checkPaths(u,c,"copy",(d,g)=>{if(d)return o(d);let{destStat:m}=g;Pa(m,u,c,s,D=>D?o(D):kh(e,r,n,s,o));});}function cF(e,t,r,n,s){ze.readlink(t,(o,u)=>{if(o)return s(o);if(n.dereference&&(u=Un.resolve(process.cwd(),u)),e)ze.readlink(r,(c,d)=>c?c.code==="EINVAL"||c.code==="UNKNOWN"?ze.symlink(u,r,s):s(c):(n.dereference&&(d=Un.resolve(process.cwd(),d)),zn.isSrcSubdir(u,d)?s(new Error(`Cannot copy '${u}' to a subdirectory of itself, '${d}'.`)):e.isDirectory()&&zn.isSrcSubdir(d,u)?s(new Error(`Cannot overwrite '${d}' with '${u}'.`)):lF(u,r,s)));else return ze.symlink(u,r,s)});}function lF(e,t,r){ze.unlink(t,n=>n?r(n):ze.symlink(e,t,r));}Ph.exports=rF;});var Ra=B((nO,Bh)=>{var fF=Qe().fromCallback;Bh.exports={copy:fF(Rh())};});var Jh=B((iO,Gh)=>{var qh=$e(),zh=U("path"),_e=U("assert"),Hn=process.platform==="win32";function Hh(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{e[r]=e[r]||qh[r],r=r+"Sync",e[r]=e[r]||qh[r];}),e.maxBusyTries=e.maxBusyTries||3;}function Ba(e,t,r){let n=0;typeof t=="function"&&(r=t,t={}),_e(e,"rimraf: missing path"),_e.strictEqual(typeof e,"string","rimraf: path should be a string"),_e.strictEqual(typeof r,"function","rimraf: callback function required"),_e(t,"rimraf: invalid options argument provided"),_e.strictEqual(typeof t,"object","rimraf: options should be object"),Hh(t),Yh(e,t,function s(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&nYh(e,t,s),u)}o.code==="ENOENT"&&(o=null);}r(o);});}function Yh(e,t,r){_e(e),_e(t),_e(typeof r=="function"),t.lstat(e,(n,s)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&Hn)return Wh(e,t,n,r);if(s&&s.isDirectory())return ds(e,t,n,r);t.unlink(e,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return Hn?Wh(e,t,o,r):ds(e,t,o,r);if(o.code==="EISDIR")return ds(e,t,o,r)}return r(o)});});}function Wh(e,t,r,n){_e(e),_e(t),_e(typeof n=="function"),r&&_e(r instanceof Error),t.chmod(e,438,s=>{s?n(s.code==="ENOENT"?null:r):t.stat(e,(o,u)=>{o?n(o.code==="ENOENT"?null:r):u.isDirectory()?ds(e,t,r,n):t.unlink(e,n);});});}function Uh(e,t,r){let n;_e(e),_e(t),r&&_e(r instanceof Error);try{t.chmodSync(e,438);}catch(s){if(s.code==="ENOENT")return;throw r}try{n=t.statSync(e);}catch(s){if(s.code==="ENOENT")return;throw r}n.isDirectory()?hs(e,t,r):t.unlinkSync(e);}function ds(e,t,r,n){_e(e),_e(t),r&&_e(r instanceof Error),_e(typeof n=="function"),t.rmdir(e,s=>{s&&(s.code==="ENOTEMPTY"||s.code==="EEXIST"||s.code==="EPERM")?dF(e,t,n):s&&s.code==="ENOTDIR"?n(r):n(s);});}function dF(e,t,r){_e(e),_e(t),_e(typeof r=="function"),t.readdir(e,(n,s)=>{if(n)return r(n);let o=s.length,u;if(o===0)return t.rmdir(e,r);s.forEach(c=>{Ba(zh.join(e,c),t,d=>{if(!u){if(d)return r(u=d);--o===0&&t.rmdir(e,r);}});});});}function Vh(e,t){let r;t=t||{},Hh(t),_e(e,"rimraf: missing path"),_e.strictEqual(typeof e,"string","rimraf: path should be a string"),_e(t,"rimraf: missing options"),_e.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e);}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&Hn&&Uh(e,t,n);}try{r&&r.isDirectory()?hs(e,t,null):t.unlinkSync(e);}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return Hn?Uh(e,t,n):hs(e,t,n);if(n.code!=="EISDIR")throw n;hs(e,t,n);}}function hs(e,t,r){_e(e),_e(t),r&&_e(r instanceof Error);try{t.rmdirSync(e);}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")hF(e,t);else if(n.code!=="ENOENT")throw n}}function hF(e,t){if(_e(e),_e(t),t.readdirSync(e).forEach(r=>Vh(zh.join(e,r),t)),Hn){let r=Date.now();do try{return t.rmdirSync(e,t)}catch{}while(Date.now()-r<500)}else return t.rmdirSync(e,t)}Gh.exports=Ba;Ba.sync=Vh;});var Vn=B((sO,Kh)=>{var pF=Qe().fromCallback,Zh=Jh();Kh.exports={remove:pF(Zh),removeSync:Zh.sync};});var sp=B((oO,ip)=>{var mF=Qe().fromCallback,ep=$e(),tp=U("path"),rp=st(),np=Vn(),Qh=mF(function(t,r){r=r||function(){},ep.readdir(t,(n,s)=>{if(n)return rp.mkdirs(t,r);s=s.map(u=>tp.join(t,u)),o();function o(){let u=s.pop();if(!u)return r();np.remove(u,c=>{if(c)return r(c);o();});}});});function Xh(e){let t;try{t=ep.readdirSync(e);}catch{return rp.mkdirsSync(e)}t.forEach(r=>{r=tp.join(e,r),np.removeSync(r);});}ip.exports={emptyDirSync:Xh,emptydirSync:Xh,emptyDir:Qh,emptydir:Qh};});var cp=B((aO,up)=>{var gF=Qe().fromCallback,op=U("path"),Gn=$e(),ap=st(),DF=xt().pathExists;function yF(e,t){function r(){Gn.writeFile(e,"",n=>{if(n)return t(n);t();});}Gn.stat(e,(n,s)=>{if(!n&&s.isFile())return t();let o=op.dirname(e);DF(o,(u,c)=>{if(u)return t(u);if(c)return r();ap.mkdirs(o,d=>{if(d)return t(d);r();});});});}function wF(e){let t;try{t=Gn.statSync(e);}catch{}if(t&&t.isFile())return;let r=op.dirname(e);Gn.existsSync(r)||ap.mkdirsSync(r),Gn.writeFileSync(e,"");}up.exports={createFile:gF(yF),createFileSync:wF};});var pp=B((uO,hp)=>{var vF=Qe().fromCallback,fp=U("path"),Er=$e(),dp=st(),lp=xt().pathExists;function EF(e,t,r){function n(s,o){Er.link(s,o,u=>{if(u)return r(u);r(null);});}lp(t,(s,o)=>{if(s)return r(s);if(o)return r(null);Er.lstat(e,u=>{if(u)return u.message=u.message.replace("lstat","ensureLink"),r(u);let c=fp.dirname(t);lp(c,(d,g)=>{if(d)return r(d);if(g)return n(e,t);dp.mkdirs(c,m=>{if(m)return r(m);n(e,t);});});});});}function _F(e,t){if(Er.existsSync(t))return;try{Er.lstatSync(e);}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=fp.dirname(t);return Er.existsSync(n)||dp.mkdirsSync(n),Er.linkSync(e,t)}hp.exports={createLink:vF(EF),createLinkSync:_F};});var gp=B((cO,mp)=>{var or=U("path"),Jn=$e(),FF=xt().pathExists;function SF(e,t,r){if(or.isAbsolute(e))return Jn.lstat(e,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:e,toDst:e}));{let n=or.dirname(t),s=or.join(n,e);return FF(s,(o,u)=>o?r(o):u?r(null,{toCwd:s,toDst:e}):Jn.lstat(e,c=>c?(c.message=c.message.replace("lstat","ensureSymlink"),r(c)):r(null,{toCwd:e,toDst:or.relative(n,e)})))}}function CF(e,t){let r;if(or.isAbsolute(e)){if(r=Jn.existsSync(e),!r)throw new Error("absolute srcpath does not exist");return {toCwd:e,toDst:e}}else {let n=or.dirname(t),s=or.join(n,e);if(r=Jn.existsSync(s),r)return {toCwd:s,toDst:e};if(r=Jn.existsSync(e),!r)throw new Error("relative srcpath does not exist");return {toCwd:e,toDst:or.relative(n,e)}}}mp.exports={symlinkPaths:SF,symlinkPathsSync:CF};});var wp=B((lO,yp)=>{var Dp=$e();function OF(e,t,r){if(r=typeof t=="function"?t:r,t=typeof t=="function"?!1:t,t)return r(null,t);Dp.lstat(e,(n,s)=>{if(n)return r(null,"file");t=s&&s.isDirectory()?"dir":"file",r(null,t);});}function bF(e,t){let r;if(t)return t;try{r=Dp.lstatSync(e);}catch{return "file"}return r&&r.isDirectory()?"dir":"file"}yp.exports={symlinkType:OF,symlinkTypeSync:bF};});var Op=B((fO,Cp)=>{var xF=Qe().fromCallback,Ep=U("path"),nn=$e(),_p=st(),AF=_p.mkdirs,MF=_p.mkdirsSync,Fp=gp(),TF=Fp.symlinkPaths,jF=Fp.symlinkPathsSync,Sp=wp(),IF=Sp.symlinkType,NF=Sp.symlinkTypeSync,vp=xt().pathExists;function LF(e,t,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,vp(t,(s,o)=>{if(s)return n(s);if(o)return n(null);TF(e,t,(u,c)=>{if(u)return n(u);e=c.toDst,IF(c.toCwd,r,(d,g)=>{if(d)return n(d);let m=Ep.dirname(t);vp(m,(D,y)=>{if(D)return n(D);if(y)return nn.symlink(e,t,g,n);AF(m,F=>{if(F)return n(F);nn.symlink(e,t,g,n);});});});});});}function $F(e,t,r){if(nn.existsSync(t))return;let s=jF(e,t);e=s.toDst,r=NF(s.toCwd,r);let o=Ep.dirname(t);return nn.existsSync(o)||MF(o),nn.symlinkSync(e,t,r)}Cp.exports={createSymlink:xF(LF),createSymlinkSync:$F};});var xp=B((dO,bp)=>{var ps=cp(),ms=pp(),gs=Op();bp.exports={createFile:ps.createFile,createFileSync:ps.createFileSync,ensureFile:ps.createFile,ensureFileSync:ps.createFileSync,createLink:ms.createLink,createLinkSync:ms.createLinkSync,ensureLink:ms.createLink,ensureLinkSync:ms.createLinkSync,createSymlink:gs.createSymlink,createSymlinkSync:gs.createSymlinkSync,ensureSymlink:gs.createSymlink,ensureSymlinkSync:gs.createSymlinkSync};});var jp=B((hO,Tp)=>{var sn;try{sn=$e();}catch{sn=U("fs");}function kF(e,t,r){r==null&&(r=t,t={}),typeof t=="string"&&(t={encoding:t}),t=t||{};var n=t.fs||sn,s=!0;"throws"in t&&(s=t.throws),n.readFile(e,t,function(o,u){if(o)return r(o);u=Mp(u);var c;try{c=JSON.parse(u,t?t.reviver:null);}catch(d){return s?(d.message=e+": "+d.message,r(d)):r(null,null)}r(null,c);});}function PF(e,t){t=t||{},typeof t=="string"&&(t={encoding:t});var r=t.fs||sn,n=!0;"throws"in t&&(n=t.throws);try{var s=r.readFileSync(e,t);return s=Mp(s),JSON.parse(s,t.reviver)}catch(o){if(n)throw o.message=e+": "+o.message,o;return null}}function Ap(e,t){var r,n=` -`;typeof t=="object"&&t!==null&&(t.spaces&&(r=t.spaces),t.EOL&&(n=t.EOL));var s=JSON.stringify(e,t?t.replacer:null,r);return s.replace(/\n/g,n)+n}function RF(e,t,r,n){n==null&&(n=r,r={}),r=r||{};var s=r.fs||sn,o="";try{o=Ap(t,r);}catch(u){n&&n(u,null);return}s.writeFile(e,o,r,n);}function BF(e,t,r){r=r||{};var n=r.fs||sn,s=Ap(t,r);return n.writeFileSync(e,s,r)}function Mp(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e=e.replace(/^\uFEFF/,""),e}var qF={readFile:kF,readFileSync:PF,writeFile:RF,writeFileSync:BF};Tp.exports=qF;});var ys=B((pO,Np)=>{var Ip=Qe().fromCallback,Ds=jp();Np.exports={readJson:Ip(Ds.readFile),readJsonSync:Ds.readFileSync,writeJson:Ip(Ds.writeFile),writeJsonSync:Ds.writeFileSync};});var kp=B((mO,$p)=>{var YF=U("path"),WF=st(),UF=xt().pathExists,Lp=ys();function zF(e,t,r,n){typeof r=="function"&&(n=r,r={});let s=YF.dirname(e);UF(s,(o,u)=>{if(o)return n(o);if(u)return Lp.writeJson(e,t,r,n);WF.mkdirs(s,c=>{if(c)return n(c);Lp.writeJson(e,t,r,n);});});}$p.exports=zF;});var Rp=B((gO,Pp)=>{var HF=$e(),VF=U("path"),GF=st(),JF=ys();function ZF(e,t,r){let n=VF.dirname(e);HF.existsSync(n)||GF.mkdirsSync(n),JF.writeJsonSync(e,t,r);}Pp.exports=ZF;});var qp=B((DO,Bp)=>{var KF=Qe().fromCallback,Ze=ys();Ze.outputJson=KF(kp());Ze.outputJsonSync=Rp();Ze.outputJSON=Ze.outputJson;Ze.outputJSONSync=Ze.outputJsonSync;Ze.writeJSON=Ze.writeJson;Ze.writeJSONSync=Ze.writeJsonSync;Ze.readJSON=Ze.readJson;Ze.readJSONSync=Ze.readJsonSync;Bp.exports=Ze;});var Vp=B((yO,Hp)=>{var Up=$e(),QF=U("path"),XF=ka().copySync,zp=Vn().removeSync,eS=st().mkdirpSync,Yp=qn();function tS(e,t,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:s}=Yp.checkPathsSync(e,t,"move");return Yp.checkParentPathsSync(e,s,t,"move"),eS(QF.dirname(t)),rS(e,t,n)}function rS(e,t,r){if(r)return zp(t),Wp(e,t,r);if(Up.existsSync(t))throw new Error("dest already exists.");return Wp(e,t,r)}function Wp(e,t,r){try{Up.renameSync(e,t);}catch(n){if(n.code!=="EXDEV")throw n;return nS(e,t,r)}}function nS(e,t,r){return XF(e,t,{overwrite:r,errorOnExist:!0}),zp(e)}Hp.exports=tS;});var Jp=B((wO,Gp)=>{Gp.exports={moveSync:Vp()};});var em=B((vO,Xp)=>{var iS=$e(),sS=U("path"),oS=Ra().copy,Qp=Vn().remove,aS=st().mkdirp,uS=xt().pathExists,Zp=qn();function cS(e,t,r,n){typeof r=="function"&&(n=r,r={});let s=r.overwrite||r.clobber||!1;Zp.checkPaths(e,t,"move",(o,u)=>{if(o)return n(o);let{srcStat:c}=u;Zp.checkParentPaths(e,c,t,"move",d=>{if(d)return n(d);aS(sS.dirname(t),g=>g?n(g):lS(e,t,s,n));});});}function lS(e,t,r,n){if(r)return Qp(t,s=>s?n(s):Kp(e,t,r,n));uS(t,(s,o)=>s?n(s):o?n(new Error("dest already exists.")):Kp(e,t,r,n));}function Kp(e,t,r,n){iS.rename(e,t,s=>s?s.code!=="EXDEV"?n(s):fS(e,t,r,n):n());}function fS(e,t,r,n){oS(e,t,{overwrite:r,errorOnExist:!0},o=>o?n(o):Qp(e,n));}Xp.exports=cS;});var rm=B((EO,tm)=>{var dS=Qe().fromCallback;tm.exports={move:dS(em())};});var om=B((_O,sm)=>{var hS=Qe().fromCallback,Zn=$e(),nm=U("path"),im=st(),pS=xt().pathExists;function mS(e,t,r,n){typeof r=="function"&&(n=r,r="utf8");let s=nm.dirname(e);pS(s,(o,u)=>{if(o)return n(o);if(u)return Zn.writeFile(e,t,r,n);im.mkdirs(s,c=>{if(c)return n(c);Zn.writeFile(e,t,r,n);});});}function gS(e,...t){let r=nm.dirname(e);if(Zn.existsSync(r))return Zn.writeFileSync(e,...t);im.mkdirsSync(r),Zn.writeFileSync(e,...t);}sm.exports={outputFile:hS(mS),outputFileSync:gS};});var Ya=B((FO,qa)=>{qa.exports=Object.assign({},Sa(),ka(),Ra(),sp(),xp(),qp(),st(),Jp(),rm(),om(),xt(),Vn());var am=U("fs");Object.getOwnPropertyDescriptor(am,"promises")&&Object.defineProperty(qa.exports,"promises",{get(){return am.promises}});});var cm=B((SO,um)=>{um.exports=()=>new Date;});var fm=B((CO,lm)=>{var DS=qe()("streamroller:fileNameFormatter"),yS=U("path"),wS=".gz",vS=".";lm.exports=({file:e,keepFileExt:t,needsIndex:r,alwaysIncludeDate:n,compress:s,fileNameSep:o})=>{let u=o||vS,c=yS.join(e.dir,e.name),d=F=>F+e.ext,g=(F,C,_)=>(r||!_)&&C?F+u+C:F,m=(F,C,_)=>(C>0||n)&&_?F+u+_:F,D=(F,C)=>C&&s?F+wS:F,y=t?[m,g,d,D]:[d,m,g,D];return ({date:F,index:C})=>(DS(`_formatFileName: date=${F}, index=${C}`),y.reduce((_,j)=>j(_,C,F),c))};});var mm=B((OO,pm)=>{var _r=qe()("streamroller:fileNameParser"),dm=".gz",hm=rs(),ES=".";pm.exports=({file:e,keepFileExt:t,pattern:r,fileNameSep:n})=>{let s=n||ES,o=(y,F)=>y.endsWith(dm)?(_r("it is gzipped"),F.isCompressed=!0,y.slice(0,-1*dm.length)):y,u="__NOT_MATCHING__",D=[o,t?y=>y.startsWith(e.name)&&y.endsWith(e.ext)?(_r("it starts and ends with the right things"),y.slice(e.name.length+1,-1*e.ext.length)):u:y=>y.startsWith(e.base)?(_r("it starts with the right things"),y.slice(e.base.length+1)):u,r?(y,F)=>{let C=y.split(s),_=C[C.length-1];_r("items: ",C,", indexStr: ",_);let j=y;_!==void 0&&_.match(/^\d+$/)?(j=y.slice(0,-1*(_.length+1)),_r(`dateStr is ${j}`),r&&!j&&(j=_,_="0")):_="0";try{let $=hm.parse(r,j,new Date(0,0));return hm.asString(r,$)!==j?y:(F.index=parseInt(_,10),F.date=j,F.timestamp=$.getTime(),"")}catch($){return _r(`Problem parsing ${j} as ${r}, error was: `,$),y}}:(y,F)=>y.match(/^\d+$/)?(_r("it has an index"),F.index=parseInt(y,10),""):y];return y=>{let F={filename:y,index:0,isCompressed:!1};return D.reduce((_,j)=>j(_,F),y)?null:F}};});var Dm=B((bO,gm)=>{var et=qe()("streamroller:moveAndMaybeCompressFile"),Ht=Ya(),_S=U("zlib"),FS=function(e){let t={mode:parseInt("0600",8),compress:!1},r=Object.assign({},t,e);return et(`_parseOption: moveAndMaybeCompressFile called with option=${JSON.stringify(r)}`),r},SS=async(e,t,r)=>{if(r=FS(r),e===t){et("moveAndMaybeCompressFile: source and target are the same, not doing anything");return}if(await Ht.pathExists(e))if(et(`moveAndMaybeCompressFile: moving file from ${e} to ${t} ${r.compress?"with":"without"} compress`),r.compress)await new Promise((n,s)=>{let o=!1,u=Ht.createWriteStream(t,{mode:r.mode,flags:"wx"}).on("open",()=>{o=!0;let c=Ht.createReadStream(e).on("open",()=>{c.pipe(_S.createGzip()).pipe(u);}).on("error",d=>{et(`moveAndMaybeCompressFile: error reading ${e}`,d),u.destroy(d);});}).on("finish",()=>{et(`moveAndMaybeCompressFile: finished compressing ${t}, deleting ${e}`),Ht.unlink(e).then(n).catch(c=>{et(`moveAndMaybeCompressFile: error deleting ${e}, truncating instead`,c),Ht.truncate(e).then(n).catch(d=>{et(`moveAndMaybeCompressFile: error truncating ${e}`,d),s(d);});});}).on("error",c=>{o?(et(`moveAndMaybeCompressFile: error writing ${t}, deleting`,c),Ht.unlink(t).then(()=>{s(c);}).catch(d=>{et(`moveAndMaybeCompressFile: error deleting ${t}`,d),s(d);})):(et(`moveAndMaybeCompressFile: error creating ${t}`,c),s(c));});}).catch(()=>{});else {et(`moveAndMaybeCompressFile: renaming ${e} to ${t}`);try{await Ht.move(e,t,{overwrite:!0});}catch(n){if(et(`moveAndMaybeCompressFile: error renaming ${e} to ${t}`,n),n.code!=="ENOENT"){et("moveAndMaybeCompressFile: trying copy+truncate instead");try{await Ht.copy(e,t,{overwrite:!0}),await Ht.truncate(e);}catch(s){et("moveAndMaybeCompressFile: error copy+truncate",s);}}}}};gm.exports=SS;});var Es=B((xO,ym)=>{var ot=qe()("streamroller:RollingFileWriteStream"),Sr=Ya(),Fr=U("path"),CS=U("os"),ws=cm(),vs=rs(),{Writable:OS}=U("stream"),bS=fm(),xS=mm(),AS=Dm(),MS=e=>(ot(`deleteFiles: files to delete: ${e}`),Promise.all(e.map(t=>Sr.unlink(t).catch(r=>{ot(`deleteFiles: error when unlinking ${t}, ignoring. Error was ${r}`);})))),Wa=class extends OS{constructor(t,r){if(ot(`constructor: creating RollingFileWriteStream. path=${t}`),typeof t!="string"||t.length===0)throw new Error(`Invalid filename: ${t}`);if(t.endsWith(Fr.sep))throw new Error(`Filename is a directory: ${t}`);t.indexOf(`~${Fr.sep}`)===0&&(t=t.replace("~",CS.homedir())),super(r),this.options=this._parseOption(r),this.fileObject=Fr.parse(t),this.fileObject.dir===""&&(this.fileObject=Fr.parse(Fr.join(process.cwd(),t))),this.fileFormatter=bS({file:this.fileObject,alwaysIncludeDate:this.options.alwaysIncludePattern,needsIndex:this.options.maxSize 0`);if(n.numBackups||n.numBackups===0){if(n.numBackups<0)throw new Error(`options.numBackups (${n.numBackups}) should be >= 0`);if(n.numBackups>=Number.MAX_SAFE_INTEGER)throw new Error(`options.numBackups (${n.numBackups}) should be < Number.MAX_SAFE_INTEGER`);n.numToKeep=n.numBackups+1;}else if(n.numToKeep<=0)throw new Error(`options.numToKeep (${n.numToKeep}) should be > 0`);return ot(`_parseOption: creating stream with option=${JSON.stringify(n)}`),n}_final(t){this.currentFileStream.end("",this.options.encoding,t);}_write(t,r,n){this._shouldRoll().then(()=>{ot(`_write: writing chunk. file=${this.currentFileStream.path} state=${JSON.stringify(this.state)} chunk=${t}`),this.currentFileStream.write(t,r,s=>{this.state.currentSize+=t.length,n(s);});});}async _shouldRoll(){(this._dateChanged()||this._tooBig())&&(ot(`_shouldRoll: rolling because dateChanged? ${this._dateChanged()} or tooBig? ${this._tooBig()}`),await this._roll());}_dateChanged(){return this.state.currentDate&&this.state.currentDate!==vs(this.options.pattern,ws())}_tooBig(){return this.state.currentSize>=this.options.maxSize}_roll(){return ot("_roll: closing the current stream"),new Promise((t,r)=>{this.currentFileStream.end("",this.options.encoding,()=>{this._moveOldFiles().then(t).catch(r);});})}async _moveOldFiles(){let t=await this._getExistingFiles(),r=this.state.currentDate?t.filter(n=>n.date===this.state.currentDate):t;for(let n=r.length;n>=0;n--){ot(`_moveOldFiles: i = ${n}`);let s=this.fileFormatter({date:this.state.currentDate,index:n}),o=this.fileFormatter({date:this.state.currentDate,index:n+1}),u={compress:this.options.compress&&n===0,mode:this.options.mode};await AS(s,o,u);}this.state.currentSize=0,this.state.currentDate=this.state.currentDate?vs(this.options.pattern,ws()):null,ot(`_moveOldFiles: finished rolling files. state=${JSON.stringify(this.state)}`),this._renewWriteStream(),await new Promise((n,s)=>{this.currentFileStream.write("","utf8",()=>{this._clean().then(n).catch(s);});});}async _getExistingFiles(){let t=await Sr.readdir(this.fileObject.dir).catch(()=>[]);ot(`_getExistingFiles: files=${t}`);let r=t.map(s=>this.fileNameParser(s)).filter(s=>s),n=s=>(s.timestamp?s.timestamp:ws().getTime())-s.index;return r.sort((s,o)=>n(s)-n(o)),r}_renewWriteStream(){let t=this.fileFormatter({date:this.state.currentDate,index:0}),r=o=>{try{return Sr.mkdirSync(o,{recursive:!0})}catch(u){if(u.code==="ENOENT")return r(Fr.dirname(o)),r(o);if(u.code!=="EEXIST"&&u.code!=="EROFS")throw u;try{if(Sr.statSync(o).isDirectory())return o;throw u}catch{throw u}}};r(this.fileObject.dir);let n={flags:this.options.flags,encoding:this.options.encoding,mode:this.options.mode},s=function(o,u,c){return o[c]=o[u],delete o[u],o};Sr.appendFileSync(t,"",s({...n},"flags","flag")),this.currentFileStream=Sr.createWriteStream(t,n),this.currentFileStream.on("error",o=>{this.emit("error",o);});}async _clean(){let t=await this._getExistingFiles();if(ot(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${t.length}`),ot("_clean: existing files are: ",t),this._tooManyFiles(t.length)){let r=t.slice(0,t.length-this.options.numToKeep).map(n=>Fr.format({dir:this.fileObject.dir,base:n.filename}));await MS(r);}}_tooManyFiles(t){return this.options.numToKeep>0&&t>this.options.numToKeep}};ym.exports=Wa;});var vm=B((AO,wm)=>{var TS=Es(),Ua=class extends TS{constructor(t,r,n,s){s||(s={}),r&&(s.maxSize=r),!s.numBackups&&s.numBackups!==0&&(!n&&n!==0&&(n=1),s.numBackups=n),super(t,s),this.backups=s.numBackups,this.size=this.options.maxSize;}get theStream(){return this.currentFileStream}};wm.exports=Ua;});var _m=B((MO,Em)=>{var jS=Es(),za=class extends jS{constructor(t,r,n){r&&typeof r=="object"&&(n=r,r=null),n||(n={}),r||(r="yyyy-MM-dd"),n.pattern=r,!n.numBackups&&n.numBackups!==0?(!n.daysToKeep&&n.daysToKeep!==0?n.daysToKeep=1:process.emitWarning("options.daysToKeep is deprecated due to the confusion it causes when used together with file size rolling. Please use options.numBackups instead.","DeprecationWarning","streamroller-DEP0001"),n.numBackups=n.daysToKeep):n.daysToKeep=n.numBackups,super(t,n),this.mode=this.options.mode;}get theStream(){return this.currentFileStream}};Em.exports=za;});var Ha=B((TO,Fm)=>{Fm.exports={RollingFileWriteStream:Es(),RollingFileStream:vm(),DateRollingFileStream:_m()};});var xm=B((jO,bm)=>{var Sm=qe()("log4js:file"),Va=U("path"),IS=Ha(),Om=U("os"),NS=Om.EOL,_s=!1,Fs=new Set;function Cm(){Fs.forEach(e=>{e.sighupHandler();});}function LS(e,t,r,n,s,o){if(typeof e!="string"||e.length===0)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Va.sep))throw new Error(`Filename is a directory: ${e}`);e.indexOf(`~${Va.sep}`)===0&&(e=e.replace("~",Om.homedir())),e=Va.normalize(e),n=!n&&n!==0?5:n,Sm("Creating file appender (",e,", ",r,", ",n,", ",s,", ",o,")");function u(g,m,D,y){let F=new IS.RollingFileStream(g,m,D,y);return F.on("error",C=>{console.error("log4js.fileAppender - Writing to file %s, error happened ",g,C);}),F.on("drain",()=>{process.emit("log4js:pause",!1);}),F}let c=u(e,r,n,s),d=function(g){if(c.writable){if(s.removeColor===!0){let m=/\x1b[[0-9;]*m/g;g.data=g.data.map(D=>typeof D=="string"?D.replace(m,""):D);}c.write(t(g,o)+NS,"utf8")||process.emit("log4js:pause",!0);}};return d.reopen=function(){c.end(()=>{c=u(e,r,n,s);});},d.sighupHandler=function(){Sm("SIGHUP handler called."),d.reopen();},d.shutdown=function(g){Fs.delete(d),Fs.size===0&&_s&&(process.removeListener("SIGHUP",Cm),_s=!1),c.end("","utf-8",g);},Fs.add(d),_s||(process.on("SIGHUP",Cm),_s=!0),d}function $S(e,t){let r=t.basicLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),e.mode=e.mode||384,LS(e.filename,r,e.maxLogSize,e.backups,e,e.timezoneOffset)}bm.exports.configure=$S;});var Mm=B((IO,Am)=>{var kS=Ha(),PS=U("os"),RS=PS.EOL;function BS(e,t,r){let n=new kS.DateRollingFileStream(e,t,r);return n.on("error",s=>{console.error("log4js.dateFileAppender - Writing to file %s, error happened ",e,s);}),n.on("drain",()=>{process.emit("log4js:pause",!1);}),n}function qS(e,t,r,n,s){n.maxSize=n.maxLogSize;let o=BS(e,t,n),u=function(c){o.writable&&(o.write(r(c,s)+RS,"utf8")||process.emit("log4js:pause",!0));};return u.shutdown=function(c){o.end("","utf-8",c);},u}function YS(e,t){let r=t.basicLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),e.alwaysIncludePattern||(e.alwaysIncludePattern=!1),e.mode=e.mode||384,qS(e.filename,e.pattern,r,e,e.timezoneOffset)}Am.exports.configure=YS;});var Nm=B((NO,Im)=>{var Vt=qe()("log4js:fileSync"),Mt=U("path"),At=U("fs"),Tm=U("os"),WS=Tm.EOL;function jm(e,t){let r=n=>{try{return At.mkdirSync(n,{recursive:!0})}catch(s){if(s.code==="ENOENT")return r(Mt.dirname(n)),r(n);if(s.code!=="EEXIST"&&s.code!=="EROFS")throw s;try{if(At.statSync(n).isDirectory())return n;throw s}catch{throw s}}};r(Mt.dirname(e)),At.appendFileSync(e,"",{mode:t.mode,flag:t.flags});}var Ga=class{constructor(t,r,n,s){if(Vt("In RollingFileStream"),r<0)throw new Error(`maxLogSize (${r}) should be > 0`);this.filename=t,this.size=r,this.backups=n,this.options=s,this.currentSize=0;function o(u){let c=0;try{c=At.statSync(u).size;}catch{jm(u,s);}return c}this.currentSize=o(this.filename);}shouldRoll(){return Vt("should roll with current size %d, and max size %d",this.currentSize,this.size),this.currentSize>=this.size}roll(t){let r=this,n=new RegExp(`^${Mt.basename(t)}`);function s(g){return n.test(g)}function o(g){return parseInt(g.slice(`${Mt.basename(t)}.`.length),10)||0}function u(g,m){return o(g)-o(m)}function c(g){let m=o(g);if(Vt(`Index of ${g} is ${m}`),r.backups===0)At.truncateSync(t,0);else if(m ${t}.${m+1}`),At.renameSync(Mt.join(Mt.dirname(t),g),`${t}.${m+1}`);}}function d(){Vt("Renaming the old files"),At.readdirSync(Mt.dirname(t)).filter(s).sort(u).reverse().forEach(c);}Vt("Rolling, rolling, rolling"),d();}write(t,r){let n=this;function s(){Vt("writing the chunk to the file"),n.currentSize+=t.length,At.appendFileSync(n.filename,t);}Vt("in write"),this.shouldRoll()&&(this.currentSize=0,this.roll(this.filename)),s();}};function US(e,t,r,n,s,o){if(typeof e!="string"||e.length===0)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Mt.sep))throw new Error(`Filename is a directory: ${e}`);e.indexOf(`~${Mt.sep}`)===0&&(e=e.replace("~",Tm.homedir())),e=Mt.normalize(e),n=!n&&n!==0?5:n,Vt("Creating fileSync appender (",e,", ",r,", ",n,", ",s,", ",o,")");function u(d,g,m){let D;return g?D=new Ga(d,g,m,s):D=(y=>(jm(y,s),{write(F){At.appendFileSync(y,F);}}))(d),D}let c=u(e,r,n);return d=>{c.write(t(d,o)+WS);}}function zS(e,t){let r=t.basicLayout;e.layout&&(r=t.layout(e.layout.type,e.layout));let n={flags:e.flags||"a",encoding:e.encoding||"utf8",mode:e.mode||384};return US(e.filename,r,e.maxLogSize,e.backups,n,e.timezoneOffset)}Im.exports.configure=zS;});var $m=B((LO,Lm)=>{var Tt=qe()("log4js:tcp"),HS=U("net");function VS(e,t){let r=!1,n=[],s,o=3,u="__LOG4JS__";function c(D){Tt("Writing log event to socket"),r=s.write(`${t(D)}${u}`,"utf8");}function d(){let D;for(Tt("emptying buffer");D=n.shift();)c(D);}function g(){Tt(`appender creating socket to ${e.host||"localhost"}:${e.port||5e3}`),u=`${e.endMsg||"__LOG4JS__"}`,s=HS.createConnection(e.port||5e3,e.host||"localhost"),s.on("connect",()=>{Tt("socket connected"),d(),r=!0;}),s.on("drain",()=>{Tt("drain event received, emptying buffer"),r=!0,d();}),s.on("timeout",s.end.bind(s)),s.on("error",D=>{Tt("connection error",D),r=!1,d();}),s.on("close",g);}g();function m(D){r?c(D):(Tt("buffering log event because it cannot write at the moment"),n.push(D));}return m.shutdown=function(D){Tt("shutdown called"),n.length&&o?(Tt("buffer has items, waiting 100ms to empty"),o-=1,setTimeout(()=>{m.shutdown(D);},100)):(s.removeAllListeners("close"),s.end(D));},m}function GS(e,t){Tt(`configure with config = ${e}`);let r=function(n){return n.serialise()};return e.layout&&(r=t.layout(e.layout.type,e.layout)),VS(e,r)}Lm.exports.configure=GS;});var Ka=B(($O,Za)=>{var Ja=U("path"),ar=qe()("log4js:appenders"),gt=gr(),km=os(),JS=yr(),ZS=da(),KS=Nd(),St=new Map;St.set("console",$d());St.set("stdout",Pd());St.set("stderr",Bd());St.set("logLevelFilter",Yd());St.set("categoryFilter",zd());St.set("noLogFilter",Gd());St.set("file",xm());St.set("dateFile",Mm());St.set("fileSync",Nm());St.set("tcp",$m());var Kn=new Map,Ss=(e,t)=>{let r;try{let n=`${e}.cjs`;r=U.resolve(n),ar("Loading module from ",n);}catch{r=e,ar("Loading module from ",e);}try{return U(r)}catch(n){gt.throwExceptionIf(t,n.code!=="MODULE_NOT_FOUND",`appender "${e}" could not be loaded (error was: ${n})`);return}},QS=(e,t)=>St.get(e)||Ss(`./${e}`,t)||Ss(e,t)||U.main&&U.main.filename&&Ss(Ja.join(Ja.dirname(U.main.filename),e),t)||Ss(Ja.join(process.cwd(),e),t),Cs=new Set,Pm=(e,t)=>{if(Kn.has(e))return Kn.get(e);if(!t.appenders[e])return !1;if(Cs.has(e))throw new Error(`Dependency loop detected for appender ${e}.`);Cs.add(e),ar(`Creating appender ${e}`);let r=XS(e,t);return Cs.delete(e),Kn.set(e,r),r},XS=(e,t)=>{let r=t.appenders[e],n=r.type.configure?r.type:QS(r.type,t);return gt.throwExceptionIf(t,gt.not(n),`appender "${e}" is not valid (type "${r.type}" could not be found)`),n.appender&&(process.emitWarning(`Appender ${r.type} exports an appender function.`,"DeprecationWarning","log4js-node-DEP0001"),ar("[log4js-node-DEP0001]",`DEPRECATION: Appender ${r.type} exports an appender function.`)),n.shutdown&&(process.emitWarning(`Appender ${r.type} exports a shutdown function.`,"DeprecationWarning","log4js-node-DEP0002"),ar("[log4js-node-DEP0002]",`DEPRECATION: Appender ${r.type} exports a shutdown function.`)),ar(`${e}: clustering.isMaster ? ${km.isMaster()}`),ar(`${e}: appenderModule is ${U("util").inspect(n)}`),km.onlyOnMaster(()=>(ar(`calling appenderModule.configure for ${e} / ${r.type}`),n.configure(KS.modifyConfig(r),ZS,s=>Pm(s,t),JS)),()=>{})},Rm=e=>{if(Kn.clear(),Cs.clear(),!e)return;let t=[];Object.values(e.categories).forEach(r=>{t.push(...r.appenders);}),Object.keys(e.appenders).forEach(r=>{(t.includes(r)||e.appenders[r].type==="tcp-server"||e.appenders[r].type==="multiprocess")&&Pm(r,e);});},Bm=()=>{Rm();};Bm();gt.addListener(e=>{gt.throwExceptionIf(e,gt.not(gt.anObject(e.appenders)),'must have a property "appenders" of type object.');let t=Object.keys(e.appenders);gt.throwExceptionIf(e,gt.not(t.length),"must define at least one appender."),t.forEach(r=>{gt.throwExceptionIf(e,gt.not(e.appenders[r].type),`appender "${r}" is not valid (must be an object with property "type")`);});});gt.addListener(Rm);Za.exports=Kn;Za.exports.init=Bm;});var eu=B((PO,Os)=>{var Qn=qe()("log4js:categories"),je=gr(),Qa=yr(),qm=Ka(),ur=new Map;function Ym(e,t,r){if(t.inherit===!1)return;let n=r.lastIndexOf(".");if(n<0)return;let s=r.slice(0,n),o=e.categories[s];o||(o={inherit:!0,appenders:[]}),Ym(e,o,s),!e.categories[s]&&o.appenders&&o.appenders.length&&o.level&&(e.categories[s]=o),t.appenders=t.appenders||[],t.level=t.level||o.level,o.appenders.forEach(u=>{t.appenders.includes(u)||t.appenders.push(u);}),t.parent=o;}function e2(e){if(!e.categories)return;Object.keys(e.categories).forEach(r=>{let n=e.categories[r];Ym(e,n,r);});}je.addPreProcessingListener(e=>e2(e));je.addListener(e=>{je.throwExceptionIf(e,je.not(je.anObject(e.categories)),'must have a property "categories" of type object.');let t=Object.keys(e.categories);je.throwExceptionIf(e,je.not(t.length),"must define at least one category."),t.forEach(r=>{let n=e.categories[r];je.throwExceptionIf(e,[je.not(n.appenders),je.not(n.level)],`category "${r}" is not valid (must be an object with properties "appenders" and "level")`),je.throwExceptionIf(e,je.not(Array.isArray(n.appenders)),`category "${r}" is not valid (appenders must be an array of appender names)`),je.throwExceptionIf(e,je.not(n.appenders.length),`category "${r}" is not valid (appenders must contain at least one appender name)`),Object.prototype.hasOwnProperty.call(n,"enableCallStack")&&je.throwExceptionIf(e,typeof n.enableCallStack!="boolean",`category "${r}" is not valid (enableCallStack must be boolean type)`),n.appenders.forEach(s=>{je.throwExceptionIf(e,je.not(qm.get(s)),`category "${r}" is not valid (appender "${s}" is not defined)`);}),je.throwExceptionIf(e,je.not(Qa.getLevel(n.level)),`category "${r}" is not valid (level "${n.level}" not recognised; valid levels are ${Qa.levels.join(", ")})`);}),je.throwExceptionIf(e,je.not(e.categories.default),'must define a "default" category.');});var Xa=e=>{if(ur.clear(),!e)return;Object.keys(e.categories).forEach(r=>{let n=e.categories[r],s=[];n.appenders.forEach(o=>{s.push(qm.get(o)),Qn(`Creating category ${r}`),ur.set(r,{appenders:s,level:Qa.getLevel(n.level),enableCallStack:n.enableCallStack||!1});});});},Wm=()=>{Xa();};Wm();je.addListener(Xa);var on=e=>{if(Qn(`configForCategory: searching for config for ${e}`),ur.has(e))return Qn(`configForCategory: ${e} exists in config, returning it`),ur.get(e);let t;return e.indexOf(".")>0?(Qn(`configForCategory: ${e} has hierarchy, cloning from parents`),t={...on(e.slice(0,e.lastIndexOf(".")))}):(ur.has("default")||Xa({categories:{default:{appenders:["out"],level:"OFF"}}}),Qn("configForCategory: cloning default category"),t={...ur.get("default")}),ur.set(e,t),t},t2=e=>on(e).appenders,r2=e=>on(e).level,n2=(e,t)=>{on(e).level=t;},i2=e=>on(e).enableCallStack===!0,s2=(e,t)=>{on(e).enableCallStack=t;};Os.exports=ur;Os.exports=Object.assign(Os.exports,{appendersForCategory:t2,getLevelForCategory:r2,setLevelForCategory:n2,getEnableCallStackForCategory:i2,setEnableCallStackForCategory:s2,init:Wm});});var Zm=B((RO,Jm)=>{var Um=qe()("log4js:logger"),o2=ma(),jt=yr(),a2=os(),bs=eu(),Hm=gr(),u2=/^(?:\s*)at (?:(.+) \()?(?:([^(]+?):(\d+):(\d+))\)?$/,tu=1,Vm=3;function zm(e,t=Vm+tu){try{let r=e.stack.split(` -`).slice(t);if(!r.length)return null;let n=u2.exec(r[0]);if(n&&n.length===5){let s="",o="",u="";return n[1]&&n[1]!==""&&([o,u]=n[1].replace(/[[\]]/g,"").split(" as "),u=u||"",o.includes(".")&&([s,o]=o.split("."))),{fileName:n[2],lineNumber:parseInt(n[3],10),columnNumber:parseInt(n[4],10),callStack:r.join(` -`),className:s,functionName:o,functionAlias:u,callerName:n[1]||""}}else console.error("log4js.logger - defaultParseCallStack error");}catch(r){console.error("log4js.logger - defaultParseCallStack error",r);}return null}var Xn=class{constructor(t){if(!t)throw new Error("No category provided.");this.category=t,this.context={},this.callStackSkipIndex=0,this.parseCallStack=zm,Um(`Logger created (${this.category}, ${this.level})`);}get level(){return jt.getLevel(bs.getLevelForCategory(this.category),jt.OFF)}set level(t){bs.setLevelForCategory(this.category,jt.getLevel(t,this.level));}get useCallStack(){return bs.getEnableCallStackForCategory(this.category)}set useCallStack(t){bs.setEnableCallStackForCategory(this.category,t===!0);}get callStackLinesToSkip(){return this.callStackSkipIndex}set callStackLinesToSkip(t){if(typeof t!="number")throw new TypeError("Must be a number");if(t<0)throw new RangeError("Must be >= 0");this.callStackSkipIndex=t;}log(t,...r){let n=jt.getLevel(t);n?this.isLevelEnabled(n)&&this._log(n,r):Hm.validIdentifier(t)&&r.length>0?(this.log(jt.WARN,"log4js:logger.log: valid log-level not found as first parameter given:",t),this.log(jt.INFO,`[${t}]`,...r)):this.log(jt.INFO,t,...r);}isLevelEnabled(t){return this.level.isLessThanOrEqualTo(t)}_log(t,r){Um(`sending log data (${t}) to appenders`);let n=r.find(u=>u instanceof Error),s;if(this.useCallStack){try{n&&(s=this.parseCallStack(n,this.callStackSkipIndex+tu));}catch{}s=s||this.parseCallStack(new Error,this.callStackSkipIndex+Vm+tu);}let o=new o2(this.category,t,r,this.context,s,n);a2.send(o);}addContext(t,r){this.context[t]=r;}removeContext(t){delete this.context[t];}clearContext(){this.context={};}setParseCallStackFunction(t){if(typeof t=="function")this.parseCallStack=t;else if(typeof t>"u")this.parseCallStack=zm;else throw new TypeError("Invalid type passed to setParseCallStackFunction")}};function Gm(e){let t=jt.getLevel(e),n=t.toString().toLowerCase().replace(/_([a-z])/g,o=>o[1].toUpperCase()),s=n[0].toUpperCase()+n.slice(1);Xn.prototype[`is${s}Enabled`]=function(){return this.isLevelEnabled(t)},Xn.prototype[n]=function(...o){this.log(t,...o);};}jt.levels.forEach(Gm);Hm.addListener(()=>{jt.levels.forEach(Gm);});Jm.exports=Xn;});var Xm=B((BO,Qm)=>{var an=yr(),c2=':remote-addr - - ":method :url HTTP/:http-version" :status :content-length ":referrer" ":user-agent"';function l2(e){return e.originalUrl||e.url}function f2(e,t,r){let n=o=>{let u=o.concat();for(let c=0;cn.source?n.source:n);t=new RegExp(r.join("|"));}return t}function h2(e,t,r){let n=t;if(r){let s=r.find(o=>{let u=!1;return o.from&&o.to?u=e>=o.from&&e<=o.to:u=o.codes.indexOf(e)!==-1,u});s&&(n=an.getLevel(s.level,n));}return n}Qm.exports=function(t,r){typeof r=="string"||typeof r=="function"?r={format:r}:r=r||{};let n=t,s=an.getLevel(r.level,an.INFO),o=r.format||c2;return (u,c,d)=>{if(typeof u._logging<"u")return d();if(typeof r.nolog!="function"){let g=d2(r.nolog);if(g&&g.test(u.originalUrl))return d()}if(n.isLevelEnabled(s)||r.level==="auto"){let g=new Date,{writeHead:m}=c;u._logging=!0,c.writeHead=(F,C)=>{c.writeHead=m,c.writeHead(F,C),c.__statusCode=F,c.__headers=C||{};};let D=!1,y=()=>{if(D)return;if(D=!0,typeof r.nolog=="function"&&r.nolog(u,c)===!0){u._logging=!1;return}c.responseTime=new Date-g,c.statusCode&&r.level==="auto"&&(s=an.INFO,c.statusCode>=300&&(s=an.WARN),c.statusCode>=400&&(s=an.ERROR)),s=h2(c.statusCode,s,r.statusRules);let F=f2(u,c,r.tokens||[]);if(r.context&&n.addContext("res",c),typeof o=="function"){let C=o(u,c,_=>Km(_,F));C&&n.log(s,C);}else n.log(s,Km(o,F));r.context&&n.removeContext("res");};c.on("end",y),c.on("finish",y),c.on("error",y),c.on("close",y);}return d()}};});var ig=B((qO,ng)=>{var eg=qe()("log4js:recording"),xs=[];function p2(){return function(e){eg(`received logEvent, number of events now ${xs.length+1}`),eg("log event was ",e),xs.push(e);}}function tg(){return xs.slice()}function rg(){xs.length=0;}ng.exports={configure:p2,replay:tg,playback:tg,reset:rg,erase:rg};});var fg=B((YO,lg)=>{var cr=qe()("log4js:main"),m2=U("fs"),g2=Gf()({proto:!0}),D2=gr(),y2=da(),w2=yr(),sg=Ka(),og=eu(),v2=Zm(),E2=os(),_2=Xm(),F2=ig(),un=!1;function S2(e){if(!un)return;cr("Received log event ",e),og.appendersForCategory(e.categoryName).forEach(r=>{r(e);});}function C2(e){cr(`Loading configuration from ${e}`);try{return JSON.parse(m2.readFileSync(e,"utf8"))}catch(t){throw new Error(`Problem reading config from file "${e}". Error was ${t.message}`,t)}}function ag(e){un&&ug();let t=e;return typeof t=="string"&&(t=C2(e)),cr(`Configuration is ${t}`),D2.configure(g2(t)),E2.onMessage(S2),un=!0,cg}function O2(){return un}function b2(){return F2}function ug(e=()=>{}){if(typeof e!="function")throw new TypeError("Invalid callback passed to shutdown");cr("Shutdown called. Disabling all log writing."),un=!1;let t=Array.from(sg.values());sg.init(),og.init();let r=t.reduce((u,c)=>c.shutdown?u+1:u,0);r===0&&(cr("No appenders with shutdown functions found."),e());let n=0,s;cr(`Found ${r} appenders with shutdown functions.`);function o(u){s=s||u,n+=1,cr(`Appender shutdowns complete: ${n} / ${r}`),n>=r&&(cr("All shutdown functions completed."),e(s));}t.filter(u=>u.shutdown).forEach(u=>u.shutdown(o));}function x2(e){return un||ag(process.env.LOG4JS_CONFIG||{appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"OFF"}}}),new v2(e||"default")}var cg={getLogger:x2,configure:ag,isConfigured:O2,shutdown:ug,connectLogger:_2,levels:w2,addLayout:y2.addLayout,recording:b2};lg.exports=cg;});var dg=Qs(Wu());var Lf=Qs($i());var Jr=class e{nconf=Lf.default;_rootPath;_devmode;_appVersion;_logLevel;_dateFormat;_logDateFormat;_logFilePath;_ipAddress;_port;_login;_password;_limitTime;_settingsFilePath;ratioEnabled=!1;ratioLimit=2;constructor(t){process.env.UV_THREADPOOL_SIZE=os$1.cpus().length.toString(),this._rootPath=t??e.getRootDir(),this.init(),this._login=this.getParam("login"),this._password=this.getParam("password"),this._devmode=this.getParam("node_env")==="development",this._appVersion=this.getParam("version"),this._logLevel=this._devmode?"trace":this.getParam("log_level"),this._dateFormat=this.getParam("date_format"),this._logDateFormat=this.getParam("log_date_format"),this._logFilePath=this.getParam("log_file_path"),this._ipAddress=this.getParam("ip_address"),this._port=parseInt(this.getParam("tcp_port"),10),this._limitTime=parseInt(this.getParam("limit_time"),10),this._settingsFilePath=this.getParam("settings_file_path"),this.setRatio(),this.check();}get rootPath(){return this._rootPath}get devmode(){return this._devmode}get appVersion(){return this._appVersion}get logLevel(){return this._logLevel}get dateFormat(){return this._dateFormat}get logDateFormat(){return this._logDateFormat}get logFilePath(){return this._logFilePath}get ipAddress(){return this._ipAddress}get port(){return this._port}get login(){return this._login}get password(){return this._password}get limitTime(){return this._limitTime}get settingsFilePath(){return this._settingsFilePath}init(){let t=path.normalize(`${this.rootPath}/config.json`);this.nconf.env(),this.nconf.file("config",t),this.nconf.file("package",path.normalize(`${this.rootPath}/package.json`)),this.nconf.defaults({node_env:"production",log_level:"info",log_file_path:"/var/log/transmission/torrentclear.log",date_format:"DD.MM.YYYY_HH:mm:ss",log_date_format:"dd.MM.yyyy_hh:mm:ss.SSS",ip_address:"127.0.0.1",tcp_port:"9091",limit_time:"604800",settings_file_path:"/etc/transmission-daemon/settings.json"}),this.nconf.load(),this.settingsFileExists();let r=path.normalize(this.getParam("settings_file_path"));this.nconf.file("transmission",r),this.nconf.load();}setRatio(){this.ratioEnabled=!!this.getParam("ratio-limit-enabled"),this.ratioEnabled&&(this.ratioLimit=parseFloat(this.getParam("ratio-limit")));}check(){let t=this.getParam("login"),r=this.getParam("password");if(t===void 0||t===""||r===void 0||r==="")throw new Error("Login or password must be filled in config.json file or Environment")}settingsFileExists(){let t=path.normalize(this.getParam("settings_file_path"));if(!fs.existsSync(t)){let r=path.resolve(t);if(!fs.existsSync(r))throw new Error(`Transmission settings file not found on path ${t}`)}}static getRootDir(){let t=url.fileURLToPath(url.pathToFileURL(__filename).toString()),n=path.dirname(t);for(;!fs.existsSync(path.join(n,"package.json"));)n=path.join(n,"..");return path.normalize(n)}getParam(t){let r=this.nconf.get(t);return r===void 0&&(r=this.nconf.get(t.toUpperCase())),r}};var A2=Qs(fg());var As=class{log4js;_config;_logger;constructor(t){this.log4js=A2,this._config=new Jr(t),this.init(),this._logger=this.log4js.getLogger();}get logger(){return this._logger}get config(){return this._config}init(){let t={appenders:{console:{type:"console",layout:{type:"pattern",pattern:`[%d{${this.config.logDateFormat}}] : %[[%p]%] : %m`}},logFile:{type:"file",filename:this.config.logFilePath,maxLogSize:"10M",compress:!0,layout:{type:"pattern",pattern:`[%d{${this.config.logDateFormat}}] : [%p] : %m`}}},categories:{default:{appenders:this.config.devmode?["console"]:["console","logFile"],level:this.config.logLevel,enableCallStack:!!this.config.devmode}}};this.log4js.configure(t);}};var Ms=class{_config;_logger;_connect;regexSuccess=/success/i;regexTorrentInfo=/(?<=Name:\s)(.*?)(?=\s*Hash:)|(?<=State:\s)(.*?)(?=\s*Location:)|(?<=Location:\s)(.*?)(?=\s*Percent Done:)|(?<=Percent Done:\s)(.*?)%(?=\s*ETA:)|(?<=Ratio:\s)(.*?)(?=\s*Corrupt DL:)|(?<=Date finished:\s)(.*?)(?=\s*Date started:|$)/g;fileOrDirsState={FILE:1,DIR:2,NOTFOUND:3,UNKNOWN:4};_torrentInfo;_torrentSuccessCount=0;_torrentProcessCount=0;_torrentIDs=[];constructor(t){this._config=new Jr(t),this._logger=new As(t).logger,this._connect=this.connectCommandCreate(),this._torrentInfo={id:0,name:"",state:"",location:"",percent:0,ratio:0,dateDone:"",dateDifference:0};}get connect(){return this._connect}get config(){return this._config}get logger(){return this._logger}get torrentInfo(){return this._torrentInfo}set torrentInfo(t){this._torrentInfo=t;}get torrentSuccessCount(){return this._torrentSuccessCount}set torrentSuccessCount(t){this._torrentSuccessCount=t;}get torrentProcessCount(){return this._torrentProcessCount}set torrentProcessCount(t){this._torrentProcessCount=t;}get torrentIDs(){return this._torrentIDs}async main(){try{this.startInfo(),await this.getIDs(),await this.torrentsProcess(),this.endInfo();}catch(t){this.logger.error(t.message),this.endInfo(!0);}}startInfo(){this.logger.info("##############################################################################################"),this.logger.info(`transmission-torrentclear: "${this.config.appVersion}"`),this.logger.info("==============================================================================================");}endInfo(t=!1){this.logger.info("=============================================================================================="),t?this.logger.error("Failed to complete torrent verification process"):this.logger.info("Completing the torrent verification process"),this.logger.info(`############################################################################################## -`);}async getIDs(){try{let t=`${this.connect} --list`;this.logger.debug(`Run command: "${t}"`);let n=(await this.command(t)).toString().match(/^\s+(\d+)\s.*?$/gim);if(n===null||n.length<1){this.logger.info("Torrents not found");return}this.logger.debug("Torrents list:");for(let s of n){this.logger.debug(`torrent: "${s.trim()}"`);let o=s.trim().match(/^(\d+).+$/i);if(o!==null){let u=o[1];this.logger.debug(`ID found: "${u}"`),this.torrentIDs.push(Number(u));}}this.torrentIDs.length>0&&this.logger.info(`IDs found: ${this.torrentIDs.join(", ")}`),this.torrentProcessCount=this.torrentIDs.length;}catch(t){throw this.logger.trace(t),t}}async torrentsProcess(){try{if(this.torrentIDs.length>0)for(let t of this.torrentIDs)this.logger.info("=============================================================================================="),this.logger.info(`TORRENT ID: "${t}" START PROCESS ...`),await this.getTorrentInfo(t),this.torrentInfo.percent===100?this.checkRatio(this.torrentInfo.ratio)?(this.logger.debug("==> ACTION: Torrent delete on Ratio Limit"),await this.clearTorrent(),this.torrentSuccessCount++,this.logger.info(`Stopping and deleting a torrent "${this.torrentInfo.name}" by ratio limit completed successfully`)):this.checkDateDifference(this.torrentInfo.dateDifference)?(this.logger.debug("==> ACTION: Torrent delete on Date Difference"),await this.clearTorrent(),this.torrentSuccessCount++,this.logger.info(`Stopping and deleting a torrent "${this.torrentInfo.name}" by datetime limit completed successfully`)):this.logger.info("NO ACTION NEEDED (DATE AND RATIO)"):this.logger.info("NO ACTION NEEDED (< 100)");}catch(t){throw this.logger.trace(t),t}}async clearTorrent(){try{let t=path.normalize(`${this.torrentInfo.location}/${this.torrentInfo.name}`);this.logger.debug(`normalized torrentPath: "${t}"`);let r=await this.isFileOrDirectoryOrUnknown(t);r===this.fileOrDirsState.FILE?(this.logger.info(`Torrent: "${this.torrentInfo.name}" is a FILE`),await this.torrentStop(),await this.torrentRemove()):r===this.fileOrDirsState.DIR?(this.logger.info(`Torrent: "${this.torrentInfo.name}" is a DIRECTORY`),await this.torrentStop(),await this.torrentRemoveAndDelete()):r===this.fileOrDirsState.NOTFOUND?(this.logger.warn(`Torrent: "${this.torrentInfo.name}" FILE NOT FOUND`),await this.torrentStop(),await this.torrentRemove()):this.logger.debug(`Torrent: "${this.torrentInfo.name}" is neither a file or a directory`);}catch(t){throw this.logger.trace(t),t}}async torrentStop(){try{let t=`${this.connect} --torrent ${this.torrentInfo.id} --stop`;this.logger.debug(`Stop torrent: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`),this.logger.debug(`Run command: "${t}"`);let r=await this.command(t);if(r=r.replace(/(\r\n|\n|\r)/gm,""),this.logger.debug(`execResultStop: ${r}`),!this.regexSuccess.test(r))throw new Error(`Failed to stop torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${r}`)}catch(t){throw this.logger.trace(t),t}}async torrentRemove(){try{let t=`${this.connect} --torrent ${this.torrentInfo.id} --remove`;this.logger.debug(`Remove torrent without deleting file: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`),this.logger.debug(`Run command: "${t}"`);let r=await this.command(t);if(r=r.replace(/(\r\n|\n|\r)/gm,""),this.logger.debug(`execResultRemove: ${r}`),!this.regexSuccess.test(r))throw new Error(`Failed to remove (no del) torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${r}`)}catch(t){throw this.logger.trace(t),t}}async torrentRemoveAndDelete(){try{let t=`${this.connect} --torrent ${this.torrentInfo.id} --remove-and-delete`;this.logger.debug(`Remove torrent with deleting file: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`),this.logger.debug(`Run command: "${t}"`);let r=await this.command(t);if(r=r.replace(/(\r\n|\n|\r)/gm,""),this.logger.debug(`execResultRemoveAndDelete: ${r}`),!this.regexSuccess.test(r))throw new Error(`Failed to remove and delete torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${r}`)}catch(t){throw this.logger.trace(t),t}}checkRatio(t){return t>=this.config.ratioLimit?(this.logger.info(`Torrent has reached the Ratio limit: "${t}" >= "${this.config.ratioLimit}"`),!0):!1}checkDateDifference(t){return t>=this.config.limitTime?(this.logger.info(`Torrent has reached the Date difference limit: "${t}" >= "${this.config.limitTime}"`),!0):!1}async getTorrentInfo(t){try{let r=`${this.connect} --torrent ${t} --info`;this.logger.debug(`Run command: "${r}"`);let s=(await this.command(r)).toString().matchAll(this.regexTorrentInfo),o=Array.from(s);if(o.length<1)throw new Error("Torrent info data is EMPTY");let u=o[0][1];if(u===void 0||u==="")throw new Error(`Torrent name not found in torrent info: "${t}"`);let c=o[1][2];if(c===void 0||c==="")throw new Error(`Torrent state not found in torrent info: "${t}"`);let d=o[2][3];if(d===void 0||d==="")throw new Error(`Torrent location not found in torrent info: "${t}"`);let g=o[3][4];if(g===void 0||g==="")throw new Error(`Torrent percent not found in torrent info: "${t}"`);let m=o[4][5];if(m===void 0||m==="")throw new Error(`Torrent ratio not found in torrent info: "${t}"`);let D=o[5][6];if(D===void 0||D==="")throw new Error(`Torrent date done not found in torrent info: "${t}"`);let y=Date.now(),F=Date.parse(D.trim());this.torrentInfo={id:Number(t),name:u.trim(),state:c.trim(),location:d.trim(),percent:Number(g.trim()),ratio:Number(m.trim()),dateDone:this.dateFormat(F),dateDifference:Math.round((y-F)/1e3)},this.logger.debug(`Torrent ID "${this.torrentInfo.id}" info:`),this.logger.debug(` Name: "${this.torrentInfo.name}"`),this.logger.debug(` State: "${this.torrentInfo.state}"`),this.logger.debug(` Location: "${this.torrentInfo.location}"`),this.logger.debug(` Percent Done: "${this.torrentInfo.percent}%"`),this.logger.debug(` Ratio: "${this.torrentInfo.ratio}" | limit: "${this.config.ratioLimit}"`),this.logger.debug(` Date finished: "${this.torrentInfo.dateDone}"`),this.logger.debug(` Date Difference: "${this.torrentInfo.dateDifference}" | limit: "${this.config.limitTime}"`);}catch(r){throw this.logger.trace(r),r}}connectCommandCreate(){return `transmission-remote ${this.config.ipAddress}:${this.config.port} --auth ${this.config.login}:${this.config.password}`}dateFormat(t){let r=new Date(t);return (0, dg.default)(r).format(this.config.dateFormat)}async command(t){try{return child_process.execSync(t,{timeout:2e3,encoding:"utf8"})}catch(r){throw this.logger.trace(r),r}}async isFileOrDirectoryOrUnknown(t){try{let r=fs.lstatSync(t),n=r.isFile(),s=r.isDirectory();return n?this.fileOrDirsState.FILE:s?this.fileOrDirsState.DIR:this.fileOrDirsState.UNKNOWN}catch(r){if(r.code==="ENOENT")return this.fileOrDirsState.NOTFOUND;throw this.logger.trace(r),r}}};new Ms().main(); + see https://github.com/jprichardson/node-fs-extra/issues/269`),Un.checkPaths(e,t,"copy",(s,o)=>{if(s)return n(s);let{srcStat:u,destStat:c}=o;Un.checkParentPaths(e,u,t,"copy",d=>d?n(d):r.filter?Ih(Th,c,e,t,r,n):Th(c,e,t,r,n));});}function Th(e,t,r,n,s){let o=Wn.dirname(r);X_(o,(u,c)=>{if(u)return s(u);if(c)return Pa(e,t,r,n,s);Q_(o,d=>d?s(d):Pa(e,t,r,n,s));});}function Ih(e,t,r,n,s,o){Promise.resolve(s.filter(r,n)).then(u=>u?e(t,r,n,s,o):o(),u=>o(u));}function Pa(e,t,r,n,s){return n.filter?Ih(jh,e,t,r,n,s):jh(e,t,r,n,s)}function jh(e,t,r,n,s){(n.dereference?ze.stat:ze.lstat)(t,(u,c)=>{if(u)return s(u);if(c.isDirectory())return sF(c,e,t,r,n,s);if(c.isFile()||c.isCharacterDevice()||c.isBlockDevice())return rF(c,e,t,r,n,s);if(c.isSymbolicLink())return uF(e,t,r,n,s)});}function rF(e,t,r,n,s,o){return t?nF(e,r,n,s,o):Nh(e,r,n,s,o)}function nF(e,t,r,n,s){if(n.overwrite)ze.unlink(r,o=>o?s(o):Nh(e,t,r,n,s));else return n.errorOnExist?s(new Error(`'${r}' already exists`)):s()}function Nh(e,t,r,n,s){return typeof ze.copyFile=="function"?ze.copyFile(t,r,o=>o?s(o):Lh(e,r,n,s)):iF(e,t,r,n,s)}function iF(e,t,r,n,s){let o=ze.createReadStream(t);o.on("error",u=>s(u)).once("open",()=>{let u=ze.createWriteStream(r,{mode:e.mode});u.on("error",c=>s(c)).on("open",()=>o.pipe(u)).once("close",()=>Lh(e,r,n,s));});}function Lh(e,t,r,n){ze.chmod(t,e.mode,s=>s?n(s):r.preserveTimestamps?eF(t,e.atime,e.mtime,n):n());}function sF(e,t,r,n,s,o){return t?t&&!t.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):$h(r,n,s,o):oF(e,r,n,s,o)}function oF(e,t,r,n,s){ze.mkdir(r,o=>{if(o)return s(o);$h(t,r,n,u=>u?s(u):ze.chmod(r,e.mode,s));});}function $h(e,t,r,n){ze.readdir(e,(s,o)=>s?n(s):kh(o,e,t,r,n));}function kh(e,t,r,n,s){let o=e.pop();return o?aF(e,o,t,r,n,s):s()}function aF(e,t,r,n,s,o){let u=Wn.join(r,t),c=Wn.join(n,t);Un.checkPaths(u,c,"copy",(d,g)=>{if(d)return o(d);let{destStat:m}=g;Pa(m,u,c,s,D=>D?o(D):kh(e,r,n,s,o));});}function uF(e,t,r,n,s){ze.readlink(t,(o,u)=>{if(o)return s(o);if(n.dereference&&(u=Wn.resolve(process.cwd(),u)),e)ze.readlink(r,(c,d)=>c?c.code==="EINVAL"||c.code==="UNKNOWN"?ze.symlink(u,r,s):s(c):(n.dereference&&(d=Wn.resolve(process.cwd(),d)),Un.isSrcSubdir(u,d)?s(new Error(`Cannot copy '${u}' to a subdirectory of itself, '${d}'.`)):e.isDirectory()&&Un.isSrcSubdir(d,u)?s(new Error(`Cannot overwrite '${d}' with '${u}'.`)):cF(u,r,s)));else return ze.symlink(u,r,s)});}function cF(e,t,r){ze.unlink(t,n=>n?r(n):ze.symlink(e,t,r));}Ph.exports=tF;});var Ra=B((tO,Bh)=>{var lF=Qe().fromCallback;Bh.exports={copy:lF(Rh())};});var Jh=B((rO,Gh)=>{var qh=$e(),zh=U("path"),_e=U("assert"),zn=process.platform==="win32";function Hh(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{e[r]=e[r]||qh[r],r=r+"Sync",e[r]=e[r]||qh[r];}),e.maxBusyTries=e.maxBusyTries||3;}function Ba(e,t,r){let n=0;typeof t=="function"&&(r=t,t={}),_e(e,"rimraf: missing path"),_e.strictEqual(typeof e,"string","rimraf: path should be a string"),_e.strictEqual(typeof r,"function","rimraf: callback function required"),_e(t,"rimraf: invalid options argument provided"),_e.strictEqual(typeof t,"object","rimraf: options should be object"),Hh(t),Yh(e,t,function s(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&nYh(e,t,s),u)}o.code==="ENOENT"&&(o=null);}r(o);});}function Yh(e,t,r){_e(e),_e(t),_e(typeof r=="function"),t.lstat(e,(n,s)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&zn)return Wh(e,t,n,r);if(s&&s.isDirectory())return ds(e,t,n,r);t.unlink(e,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return zn?Wh(e,t,o,r):ds(e,t,o,r);if(o.code==="EISDIR")return ds(e,t,o,r)}return r(o)});});}function Wh(e,t,r,n){_e(e),_e(t),_e(typeof n=="function"),r&&_e(r instanceof Error),t.chmod(e,438,s=>{s?n(s.code==="ENOENT"?null:r):t.stat(e,(o,u)=>{o?n(o.code==="ENOENT"?null:r):u.isDirectory()?ds(e,t,r,n):t.unlink(e,n);});});}function Uh(e,t,r){let n;_e(e),_e(t),r&&_e(r instanceof Error);try{t.chmodSync(e,438);}catch(s){if(s.code==="ENOENT")return;throw r}try{n=t.statSync(e);}catch(s){if(s.code==="ENOENT")return;throw r}n.isDirectory()?hs(e,t,r):t.unlinkSync(e);}function ds(e,t,r,n){_e(e),_e(t),r&&_e(r instanceof Error),_e(typeof n=="function"),t.rmdir(e,s=>{s&&(s.code==="ENOTEMPTY"||s.code==="EEXIST"||s.code==="EPERM")?fF(e,t,n):s&&s.code==="ENOTDIR"?n(r):n(s);});}function fF(e,t,r){_e(e),_e(t),_e(typeof r=="function"),t.readdir(e,(n,s)=>{if(n)return r(n);let o=s.length,u;if(o===0)return t.rmdir(e,r);s.forEach(c=>{Ba(zh.join(e,c),t,d=>{if(!u){if(d)return r(u=d);--o===0&&t.rmdir(e,r);}});});});}function Vh(e,t){let r;t=t||{},Hh(t),_e(e,"rimraf: missing path"),_e.strictEqual(typeof e,"string","rimraf: path should be a string"),_e(t,"rimraf: missing options"),_e.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e);}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&zn&&Uh(e,t,n);}try{r&&r.isDirectory()?hs(e,t,null):t.unlinkSync(e);}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return zn?Uh(e,t,n):hs(e,t,n);if(n.code!=="EISDIR")throw n;hs(e,t,n);}}function hs(e,t,r){_e(e),_e(t),r&&_e(r instanceof Error);try{t.rmdirSync(e);}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")dF(e,t);else if(n.code!=="ENOENT")throw n}}function dF(e,t){if(_e(e),_e(t),t.readdirSync(e).forEach(r=>Vh(zh.join(e,r),t)),zn){let r=Date.now();do try{return t.rmdirSync(e,t)}catch{}while(Date.now()-r<500)}else return t.rmdirSync(e,t)}Gh.exports=Ba;Ba.sync=Vh;});var Hn=B((nO,Kh)=>{var hF=Qe().fromCallback,Zh=Jh();Kh.exports={remove:hF(Zh),removeSync:Zh.sync};});var sp=B((iO,ip)=>{var pF=Qe().fromCallback,ep=$e(),tp=U("path"),rp=st(),np=Hn(),Qh=pF(function(t,r){r=r||function(){},ep.readdir(t,(n,s)=>{if(n)return rp.mkdirs(t,r);s=s.map(u=>tp.join(t,u)),o();function o(){let u=s.pop();if(!u)return r();np.remove(u,c=>{if(c)return r(c);o();});}});});function Xh(e){let t;try{t=ep.readdirSync(e);}catch{return rp.mkdirsSync(e)}t.forEach(r=>{r=tp.join(e,r),np.removeSync(r);});}ip.exports={emptyDirSync:Xh,emptydirSync:Xh,emptyDir:Qh,emptydir:Qh};});var cp=B((sO,up)=>{var mF=Qe().fromCallback,op=U("path"),Vn=$e(),ap=st(),gF=xt().pathExists;function DF(e,t){function r(){Vn.writeFile(e,"",n=>{if(n)return t(n);t();});}Vn.stat(e,(n,s)=>{if(!n&&s.isFile())return t();let o=op.dirname(e);gF(o,(u,c)=>{if(u)return t(u);if(c)return r();ap.mkdirs(o,d=>{if(d)return t(d);r();});});});}function yF(e){let t;try{t=Vn.statSync(e);}catch{}if(t&&t.isFile())return;let r=op.dirname(e);Vn.existsSync(r)||ap.mkdirsSync(r),Vn.writeFileSync(e,"");}up.exports={createFile:mF(DF),createFileSync:yF};});var pp=B((oO,hp)=>{var vF=Qe().fromCallback,fp=U("path"),Er=$e(),dp=st(),lp=xt().pathExists;function wF(e,t,r){function n(s,o){Er.link(s,o,u=>{if(u)return r(u);r(null);});}lp(t,(s,o)=>{if(s)return r(s);if(o)return r(null);Er.lstat(e,u=>{if(u)return u.message=u.message.replace("lstat","ensureLink"),r(u);let c=fp.dirname(t);lp(c,(d,g)=>{if(d)return r(d);if(g)return n(e,t);dp.mkdirs(c,m=>{if(m)return r(m);n(e,t);});});});});}function EF(e,t){if(Er.existsSync(t))return;try{Er.lstatSync(e);}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=fp.dirname(t);return Er.existsSync(n)||dp.mkdirsSync(n),Er.linkSync(e,t)}hp.exports={createLink:vF(wF),createLinkSync:EF};});var gp=B((aO,mp)=>{var or=U("path"),Gn=$e(),_F=xt().pathExists;function FF(e,t,r){if(or.isAbsolute(e))return Gn.lstat(e,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:e,toDst:e}));{let n=or.dirname(t),s=or.join(n,e);return _F(s,(o,u)=>o?r(o):u?r(null,{toCwd:s,toDst:e}):Gn.lstat(e,c=>c?(c.message=c.message.replace("lstat","ensureSymlink"),r(c)):r(null,{toCwd:e,toDst:or.relative(n,e)})))}}function SF(e,t){let r;if(or.isAbsolute(e)){if(r=Gn.existsSync(e),!r)throw new Error("absolute srcpath does not exist");return {toCwd:e,toDst:e}}else {let n=or.dirname(t),s=or.join(n,e);if(r=Gn.existsSync(s),r)return {toCwd:s,toDst:e};if(r=Gn.existsSync(e),!r)throw new Error("relative srcpath does not exist");return {toCwd:e,toDst:or.relative(n,e)}}}mp.exports={symlinkPaths:FF,symlinkPathsSync:SF};});var vp=B((uO,yp)=>{var Dp=$e();function CF(e,t,r){if(r=typeof t=="function"?t:r,t=typeof t=="function"?!1:t,t)return r(null,t);Dp.lstat(e,(n,s)=>{if(n)return r(null,"file");t=s&&s.isDirectory()?"dir":"file",r(null,t);});}function OF(e,t){let r;if(t)return t;try{r=Dp.lstatSync(e);}catch{return "file"}return r&&r.isDirectory()?"dir":"file"}yp.exports={symlinkType:CF,symlinkTypeSync:OF};});var Op=B((cO,Cp)=>{var bF=Qe().fromCallback,Ep=U("path"),nn=$e(),_p=st(),xF=_p.mkdirs,AF=_p.mkdirsSync,Fp=gp(),MF=Fp.symlinkPaths,TF=Fp.symlinkPathsSync,Sp=vp(),jF=Sp.symlinkType,IF=Sp.symlinkTypeSync,wp=xt().pathExists;function NF(e,t,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,wp(t,(s,o)=>{if(s)return n(s);if(o)return n(null);MF(e,t,(u,c)=>{if(u)return n(u);e=c.toDst,jF(c.toCwd,r,(d,g)=>{if(d)return n(d);let m=Ep.dirname(t);wp(m,(D,y)=>{if(D)return n(D);if(y)return nn.symlink(e,t,g,n);xF(m,F=>{if(F)return n(F);nn.symlink(e,t,g,n);});});});});});}function LF(e,t,r){if(nn.existsSync(t))return;let s=TF(e,t);e=s.toDst,r=IF(s.toCwd,r);let o=Ep.dirname(t);return nn.existsSync(o)||AF(o),nn.symlinkSync(e,t,r)}Cp.exports={createSymlink:bF(NF),createSymlinkSync:LF};});var xp=B((lO,bp)=>{var ps=cp(),ms=pp(),gs=Op();bp.exports={createFile:ps.createFile,createFileSync:ps.createFileSync,ensureFile:ps.createFile,ensureFileSync:ps.createFileSync,createLink:ms.createLink,createLinkSync:ms.createLinkSync,ensureLink:ms.createLink,ensureLinkSync:ms.createLinkSync,createSymlink:gs.createSymlink,createSymlinkSync:gs.createSymlinkSync,ensureSymlink:gs.createSymlink,ensureSymlinkSync:gs.createSymlinkSync};});var jp=B((fO,Tp)=>{var sn;try{sn=$e();}catch{sn=U("fs");}function $F(e,t,r){r==null&&(r=t,t={}),typeof t=="string"&&(t={encoding:t}),t=t||{};var n=t.fs||sn,s=!0;"throws"in t&&(s=t.throws),n.readFile(e,t,function(o,u){if(o)return r(o);u=Mp(u);var c;try{c=JSON.parse(u,t?t.reviver:null);}catch(d){return s?(d.message=e+": "+d.message,r(d)):r(null,null)}r(null,c);});}function kF(e,t){t=t||{},typeof t=="string"&&(t={encoding:t});var r=t.fs||sn,n=!0;"throws"in t&&(n=t.throws);try{var s=r.readFileSync(e,t);return s=Mp(s),JSON.parse(s,t.reviver)}catch(o){if(n)throw o.message=e+": "+o.message,o;return null}}function Ap(e,t){var r,n=` +`;typeof t=="object"&&t!==null&&(t.spaces&&(r=t.spaces),t.EOL&&(n=t.EOL));var s=JSON.stringify(e,t?t.replacer:null,r);return s.replace(/\n/g,n)+n}function PF(e,t,r,n){n==null&&(n=r,r={}),r=r||{};var s=r.fs||sn,o="";try{o=Ap(t,r);}catch(u){n&&n(u,null);return}s.writeFile(e,o,r,n);}function RF(e,t,r){r=r||{};var n=r.fs||sn,s=Ap(t,r);return n.writeFileSync(e,s,r)}function Mp(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e=e.replace(/^\uFEFF/,""),e}var BF={readFile:$F,readFileSync:kF,writeFile:PF,writeFileSync:RF};Tp.exports=BF;});var ys=B((dO,Np)=>{var Ip=Qe().fromCallback,Ds=jp();Np.exports={readJson:Ip(Ds.readFile),readJsonSync:Ds.readFileSync,writeJson:Ip(Ds.writeFile),writeJsonSync:Ds.writeFileSync};});var kp=B((hO,$p)=>{var qF=U("path"),YF=st(),WF=xt().pathExists,Lp=ys();function UF(e,t,r,n){typeof r=="function"&&(n=r,r={});let s=qF.dirname(e);WF(s,(o,u)=>{if(o)return n(o);if(u)return Lp.writeJson(e,t,r,n);YF.mkdirs(s,c=>{if(c)return n(c);Lp.writeJson(e,t,r,n);});});}$p.exports=UF;});var Rp=B((pO,Pp)=>{var zF=$e(),HF=U("path"),VF=st(),GF=ys();function JF(e,t,r){let n=HF.dirname(e);zF.existsSync(n)||VF.mkdirsSync(n),GF.writeJsonSync(e,t,r);}Pp.exports=JF;});var qp=B((mO,Bp)=>{var ZF=Qe().fromCallback,Ze=ys();Ze.outputJson=ZF(kp());Ze.outputJsonSync=Rp();Ze.outputJSON=Ze.outputJson;Ze.outputJSONSync=Ze.outputJsonSync;Ze.writeJSON=Ze.writeJson;Ze.writeJSONSync=Ze.writeJsonSync;Ze.readJSON=Ze.readJson;Ze.readJSONSync=Ze.readJsonSync;Bp.exports=Ze;});var Vp=B((gO,Hp)=>{var Up=$e(),KF=U("path"),QF=ka().copySync,zp=Hn().removeSync,XF=st().mkdirpSync,Yp=Bn();function eS(e,t,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:s}=Yp.checkPathsSync(e,t,"move");return Yp.checkParentPathsSync(e,s,t,"move"),XF(KF.dirname(t)),tS(e,t,n)}function tS(e,t,r){if(r)return zp(t),Wp(e,t,r);if(Up.existsSync(t))throw new Error("dest already exists.");return Wp(e,t,r)}function Wp(e,t,r){try{Up.renameSync(e,t);}catch(n){if(n.code!=="EXDEV")throw n;return rS(e,t,r)}}function rS(e,t,r){return QF(e,t,{overwrite:r,errorOnExist:!0}),zp(e)}Hp.exports=eS;});var Jp=B((DO,Gp)=>{Gp.exports={moveSync:Vp()};});var em=B((yO,Xp)=>{var nS=$e(),iS=U("path"),sS=Ra().copy,Qp=Hn().remove,oS=st().mkdirp,aS=xt().pathExists,Zp=Bn();function uS(e,t,r,n){typeof r=="function"&&(n=r,r={});let s=r.overwrite||r.clobber||!1;Zp.checkPaths(e,t,"move",(o,u)=>{if(o)return n(o);let{srcStat:c}=u;Zp.checkParentPaths(e,c,t,"move",d=>{if(d)return n(d);oS(iS.dirname(t),g=>g?n(g):cS(e,t,s,n));});});}function cS(e,t,r,n){if(r)return Qp(t,s=>s?n(s):Kp(e,t,r,n));aS(t,(s,o)=>s?n(s):o?n(new Error("dest already exists.")):Kp(e,t,r,n));}function Kp(e,t,r,n){nS.rename(e,t,s=>s?s.code!=="EXDEV"?n(s):lS(e,t,r,n):n());}function lS(e,t,r,n){sS(e,t,{overwrite:r,errorOnExist:!0},o=>o?n(o):Qp(e,n));}Xp.exports=uS;});var rm=B((vO,tm)=>{var fS=Qe().fromCallback;tm.exports={move:fS(em())};});var om=B((wO,sm)=>{var dS=Qe().fromCallback,Jn=$e(),nm=U("path"),im=st(),hS=xt().pathExists;function pS(e,t,r,n){typeof r=="function"&&(n=r,r="utf8");let s=nm.dirname(e);hS(s,(o,u)=>{if(o)return n(o);if(u)return Jn.writeFile(e,t,r,n);im.mkdirs(s,c=>{if(c)return n(c);Jn.writeFile(e,t,r,n);});});}function mS(e,...t){let r=nm.dirname(e);if(Jn.existsSync(r))return Jn.writeFileSync(e,...t);im.mkdirsSync(r),Jn.writeFileSync(e,...t);}sm.exports={outputFile:dS(pS),outputFileSync:mS};});var Ya=B((EO,qa)=>{qa.exports=Object.assign({},Sa(),ka(),Ra(),sp(),xp(),qp(),st(),Jp(),rm(),om(),xt(),Hn());var am=U("fs");Object.getOwnPropertyDescriptor(am,"promises")&&Object.defineProperty(qa.exports,"promises",{get(){return am.promises}});});var cm=B((_O,um)=>{um.exports=()=>new Date;});var fm=B((FO,lm)=>{var gS=qe()("streamroller:fileNameFormatter"),DS=U("path"),yS=".gz",vS=".";lm.exports=({file:e,keepFileExt:t,needsIndex:r,alwaysIncludeDate:n,compress:s,fileNameSep:o})=>{let u=o||vS,c=DS.join(e.dir,e.name),d=F=>F+e.ext,g=(F,C,_)=>(r||!_)&&C?F+u+C:F,m=(F,C,_)=>(C>0||n)&&_?F+u+_:F,D=(F,C)=>C&&s?F+yS:F,y=t?[m,g,d,D]:[d,m,g,D];return ({date:F,index:C})=>(gS(`_formatFileName: date=${F}, index=${C}`),y.reduce((_,j)=>j(_,C,F),c))};});var mm=B((SO,pm)=>{var _r=qe()("streamroller:fileNameParser"),dm=".gz",hm=rs(),wS=".";pm.exports=({file:e,keepFileExt:t,pattern:r,fileNameSep:n})=>{let s=n||wS,o=(y,F)=>y.endsWith(dm)?(_r("it is gzipped"),F.isCompressed=!0,y.slice(0,-1*dm.length)):y,u="__NOT_MATCHING__",D=[o,t?y=>y.startsWith(e.name)&&y.endsWith(e.ext)?(_r("it starts and ends with the right things"),y.slice(e.name.length+1,-1*e.ext.length)):u:y=>y.startsWith(e.base)?(_r("it starts with the right things"),y.slice(e.base.length+1)):u,r?(y,F)=>{let C=y.split(s),_=C[C.length-1];_r("items: ",C,", indexStr: ",_);let j=y;_!==void 0&&_.match(/^\d+$/)?(j=y.slice(0,-1*(_.length+1)),_r(`dateStr is ${j}`),r&&!j&&(j=_,_="0")):_="0";try{let $=hm.parse(r,j,new Date(0,0));return hm.asString(r,$)!==j?y:(F.index=parseInt(_,10),F.date=j,F.timestamp=$.getTime(),"")}catch($){return _r(`Problem parsing ${j} as ${r}, error was: `,$),y}}:(y,F)=>y.match(/^\d+$/)?(_r("it has an index"),F.index=parseInt(y,10),""):y];return y=>{let F={filename:y,index:0,isCompressed:!1};return D.reduce((_,j)=>j(_,F),y)?null:F}};});var Dm=B((CO,gm)=>{var et=qe()("streamroller:moveAndMaybeCompressFile"),Ht=Ya(),ES=U("zlib"),_S=function(e){let t={mode:parseInt("0600",8),compress:!1},r=Object.assign({},t,e);return et(`_parseOption: moveAndMaybeCompressFile called with option=${JSON.stringify(r)}`),r},FS=async(e,t,r)=>{if(r=_S(r),e===t){et("moveAndMaybeCompressFile: source and target are the same, not doing anything");return}if(await Ht.pathExists(e))if(et(`moveAndMaybeCompressFile: moving file from ${e} to ${t} ${r.compress?"with":"without"} compress`),r.compress)await new Promise((n,s)=>{let o=!1,u=Ht.createWriteStream(t,{mode:r.mode,flags:"wx"}).on("open",()=>{o=!0;let c=Ht.createReadStream(e).on("open",()=>{c.pipe(ES.createGzip()).pipe(u);}).on("error",d=>{et(`moveAndMaybeCompressFile: error reading ${e}`,d),u.destroy(d);});}).on("finish",()=>{et(`moveAndMaybeCompressFile: finished compressing ${t}, deleting ${e}`),Ht.unlink(e).then(n).catch(c=>{et(`moveAndMaybeCompressFile: error deleting ${e}, truncating instead`,c),Ht.truncate(e).then(n).catch(d=>{et(`moveAndMaybeCompressFile: error truncating ${e}`,d),s(d);});});}).on("error",c=>{o?(et(`moveAndMaybeCompressFile: error writing ${t}, deleting`,c),Ht.unlink(t).then(()=>{s(c);}).catch(d=>{et(`moveAndMaybeCompressFile: error deleting ${t}`,d),s(d);})):(et(`moveAndMaybeCompressFile: error creating ${t}`,c),s(c));});}).catch(()=>{});else {et(`moveAndMaybeCompressFile: renaming ${e} to ${t}`);try{await Ht.move(e,t,{overwrite:!0});}catch(n){if(et(`moveAndMaybeCompressFile: error renaming ${e} to ${t}`,n),n.code!=="ENOENT"){et("moveAndMaybeCompressFile: trying copy+truncate instead");try{await Ht.copy(e,t,{overwrite:!0}),await Ht.truncate(e);}catch(s){et("moveAndMaybeCompressFile: error copy+truncate",s);}}}}};gm.exports=FS;});var Es=B((OO,ym)=>{var ot=qe()("streamroller:RollingFileWriteStream"),Sr=Ya(),Fr=U("path"),SS=U("os"),vs=cm(),ws=rs(),{Writable:CS}=U("stream"),OS=fm(),bS=mm(),xS=Dm(),AS=e=>(ot(`deleteFiles: files to delete: ${e}`),Promise.all(e.map(t=>Sr.unlink(t).catch(r=>{ot(`deleteFiles: error when unlinking ${t}, ignoring. Error was ${r}`);})))),Wa=class extends CS{constructor(t,r){if(ot(`constructor: creating RollingFileWriteStream. path=${t}`),typeof t!="string"||t.length===0)throw new Error(`Invalid filename: ${t}`);if(t.endsWith(Fr.sep))throw new Error(`Filename is a directory: ${t}`);t.indexOf(`~${Fr.sep}`)===0&&(t=t.replace("~",SS.homedir())),super(r),this.options=this._parseOption(r),this.fileObject=Fr.parse(t),this.fileObject.dir===""&&(this.fileObject=Fr.parse(Fr.join(process.cwd(),t))),this.fileFormatter=OS({file:this.fileObject,alwaysIncludeDate:this.options.alwaysIncludePattern,needsIndex:this.options.maxSize 0`);if(n.numBackups||n.numBackups===0){if(n.numBackups<0)throw new Error(`options.numBackups (${n.numBackups}) should be >= 0`);if(n.numBackups>=Number.MAX_SAFE_INTEGER)throw new Error(`options.numBackups (${n.numBackups}) should be < Number.MAX_SAFE_INTEGER`);n.numToKeep=n.numBackups+1;}else if(n.numToKeep<=0)throw new Error(`options.numToKeep (${n.numToKeep}) should be > 0`);return ot(`_parseOption: creating stream with option=${JSON.stringify(n)}`),n}_final(t){this.currentFileStream.end("",this.options.encoding,t);}_write(t,r,n){this._shouldRoll().then(()=>{ot(`_write: writing chunk. file=${this.currentFileStream.path} state=${JSON.stringify(this.state)} chunk=${t}`),this.currentFileStream.write(t,r,s=>{this.state.currentSize+=t.length,n(s);});});}async _shouldRoll(){(this._dateChanged()||this._tooBig())&&(ot(`_shouldRoll: rolling because dateChanged? ${this._dateChanged()} or tooBig? ${this._tooBig()}`),await this._roll());}_dateChanged(){return this.state.currentDate&&this.state.currentDate!==ws(this.options.pattern,vs())}_tooBig(){return this.state.currentSize>=this.options.maxSize}_roll(){return ot("_roll: closing the current stream"),new Promise((t,r)=>{this.currentFileStream.end("",this.options.encoding,()=>{this._moveOldFiles().then(t).catch(r);});})}async _moveOldFiles(){let t=await this._getExistingFiles(),r=this.state.currentDate?t.filter(n=>n.date===this.state.currentDate):t;for(let n=r.length;n>=0;n--){ot(`_moveOldFiles: i = ${n}`);let s=this.fileFormatter({date:this.state.currentDate,index:n}),o=this.fileFormatter({date:this.state.currentDate,index:n+1}),u={compress:this.options.compress&&n===0,mode:this.options.mode};await xS(s,o,u);}this.state.currentSize=0,this.state.currentDate=this.state.currentDate?ws(this.options.pattern,vs()):null,ot(`_moveOldFiles: finished rolling files. state=${JSON.stringify(this.state)}`),this._renewWriteStream(),await new Promise((n,s)=>{this.currentFileStream.write("","utf8",()=>{this._clean().then(n).catch(s);});});}async _getExistingFiles(){let t=await Sr.readdir(this.fileObject.dir).catch(()=>[]);ot(`_getExistingFiles: files=${t}`);let r=t.map(s=>this.fileNameParser(s)).filter(s=>s),n=s=>(s.timestamp?s.timestamp:vs().getTime())-s.index;return r.sort((s,o)=>n(s)-n(o)),r}_renewWriteStream(){let t=this.fileFormatter({date:this.state.currentDate,index:0}),r=o=>{try{return Sr.mkdirSync(o,{recursive:!0})}catch(u){if(u.code==="ENOENT")return r(Fr.dirname(o)),r(o);if(u.code!=="EEXIST"&&u.code!=="EROFS")throw u;try{if(Sr.statSync(o).isDirectory())return o;throw u}catch{throw u}}};r(this.fileObject.dir);let n={flags:this.options.flags,encoding:this.options.encoding,mode:this.options.mode},s=function(o,u,c){return o[c]=o[u],delete o[u],o};Sr.appendFileSync(t,"",s({...n},"flags","flag")),this.currentFileStream=Sr.createWriteStream(t,n),this.currentFileStream.on("error",o=>{this.emit("error",o);});}async _clean(){let t=await this._getExistingFiles();if(ot(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${t.length}`),ot("_clean: existing files are: ",t),this._tooManyFiles(t.length)){let r=t.slice(0,t.length-this.options.numToKeep).map(n=>Fr.format({dir:this.fileObject.dir,base:n.filename}));await AS(r);}}_tooManyFiles(t){return this.options.numToKeep>0&&t>this.options.numToKeep}};ym.exports=Wa;});var wm=B((bO,vm)=>{var MS=Es(),Ua=class extends MS{constructor(t,r,n,s){s||(s={}),r&&(s.maxSize=r),!s.numBackups&&s.numBackups!==0&&(!n&&n!==0&&(n=1),s.numBackups=n),super(t,s),this.backups=s.numBackups,this.size=this.options.maxSize;}get theStream(){return this.currentFileStream}};vm.exports=Ua;});var _m=B((xO,Em)=>{var TS=Es(),za=class extends TS{constructor(t,r,n){r&&typeof r=="object"&&(n=r,r=null),n||(n={}),r||(r="yyyy-MM-dd"),n.pattern=r,!n.numBackups&&n.numBackups!==0?(!n.daysToKeep&&n.daysToKeep!==0?n.daysToKeep=1:process.emitWarning("options.daysToKeep is deprecated due to the confusion it causes when used together with file size rolling. Please use options.numBackups instead.","DeprecationWarning","streamroller-DEP0001"),n.numBackups=n.daysToKeep):n.daysToKeep=n.numBackups,super(t,n),this.mode=this.options.mode;}get theStream(){return this.currentFileStream}};Em.exports=za;});var Ha=B((AO,Fm)=>{Fm.exports={RollingFileWriteStream:Es(),RollingFileStream:wm(),DateRollingFileStream:_m()};});var xm=B((MO,bm)=>{var Sm=qe()("log4js:file"),Va=U("path"),jS=Ha(),Om=U("os"),IS=Om.EOL,_s=!1,Fs=new Set;function Cm(){Fs.forEach(e=>{e.sighupHandler();});}function NS(e,t,r,n,s,o){if(typeof e!="string"||e.length===0)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Va.sep))throw new Error(`Filename is a directory: ${e}`);e.indexOf(`~${Va.sep}`)===0&&(e=e.replace("~",Om.homedir())),e=Va.normalize(e),n=!n&&n!==0?5:n,Sm("Creating file appender (",e,", ",r,", ",n,", ",s,", ",o,")");function u(g,m,D,y){let F=new jS.RollingFileStream(g,m,D,y);return F.on("error",C=>{console.error("log4js.fileAppender - Writing to file %s, error happened ",g,C);}),F.on("drain",()=>{process.emit("log4js:pause",!1);}),F}let c=u(e,r,n,s),d=function(g){if(c.writable){if(s.removeColor===!0){let m=/\x1b[[0-9;]*m/g;g.data=g.data.map(D=>typeof D=="string"?D.replace(m,""):D);}c.write(t(g,o)+IS,"utf8")||process.emit("log4js:pause",!0);}};return d.reopen=function(){c.end(()=>{c=u(e,r,n,s);});},d.sighupHandler=function(){Sm("SIGHUP handler called."),d.reopen();},d.shutdown=function(g){Fs.delete(d),Fs.size===0&&_s&&(process.removeListener("SIGHUP",Cm),_s=!1),c.end("","utf-8",g);},Fs.add(d),_s||(process.on("SIGHUP",Cm),_s=!0),d}function LS(e,t){let r=t.basicLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),e.mode=e.mode||384,NS(e.filename,r,e.maxLogSize,e.backups,e,e.timezoneOffset)}bm.exports.configure=LS;});var Mm=B((TO,Am)=>{var $S=Ha(),kS=U("os"),PS=kS.EOL;function RS(e,t,r){let n=new $S.DateRollingFileStream(e,t,r);return n.on("error",s=>{console.error("log4js.dateFileAppender - Writing to file %s, error happened ",e,s);}),n.on("drain",()=>{process.emit("log4js:pause",!1);}),n}function BS(e,t,r,n,s){n.maxSize=n.maxLogSize;let o=RS(e,t,n),u=function(c){o.writable&&(o.write(r(c,s)+PS,"utf8")||process.emit("log4js:pause",!0));};return u.shutdown=function(c){o.end("","utf-8",c);},u}function qS(e,t){let r=t.basicLayout;return e.layout&&(r=t.layout(e.layout.type,e.layout)),e.alwaysIncludePattern||(e.alwaysIncludePattern=!1),e.mode=e.mode||384,BS(e.filename,e.pattern,r,e,e.timezoneOffset)}Am.exports.configure=qS;});var Nm=B((jO,Im)=>{var Vt=qe()("log4js:fileSync"),Mt=U("path"),At=U("fs"),Tm=U("os"),YS=Tm.EOL;function jm(e,t){let r=n=>{try{return At.mkdirSync(n,{recursive:!0})}catch(s){if(s.code==="ENOENT")return r(Mt.dirname(n)),r(n);if(s.code!=="EEXIST"&&s.code!=="EROFS")throw s;try{if(At.statSync(n).isDirectory())return n;throw s}catch{throw s}}};r(Mt.dirname(e)),At.appendFileSync(e,"",{mode:t.mode,flag:t.flags});}var Ga=class{constructor(t,r,n,s){if(Vt("In RollingFileStream"),r<0)throw new Error(`maxLogSize (${r}) should be > 0`);this.filename=t,this.size=r,this.backups=n,this.options=s,this.currentSize=0;function o(u){let c=0;try{c=At.statSync(u).size;}catch{jm(u,s);}return c}this.currentSize=o(this.filename);}shouldRoll(){return Vt("should roll with current size %d, and max size %d",this.currentSize,this.size),this.currentSize>=this.size}roll(t){let r=this,n=new RegExp(`^${Mt.basename(t)}`);function s(g){return n.test(g)}function o(g){return parseInt(g.slice(`${Mt.basename(t)}.`.length),10)||0}function u(g,m){return o(g)-o(m)}function c(g){let m=o(g);if(Vt(`Index of ${g} is ${m}`),r.backups===0)At.truncateSync(t,0);else if(m ${t}.${m+1}`),At.renameSync(Mt.join(Mt.dirname(t),g),`${t}.${m+1}`);}}function d(){Vt("Renaming the old files"),At.readdirSync(Mt.dirname(t)).filter(s).sort(u).reverse().forEach(c);}Vt("Rolling, rolling, rolling"),d();}write(t,r){let n=this;function s(){Vt("writing the chunk to the file"),n.currentSize+=t.length,At.appendFileSync(n.filename,t);}Vt("in write"),this.shouldRoll()&&(this.currentSize=0,this.roll(this.filename)),s();}};function WS(e,t,r,n,s,o){if(typeof e!="string"||e.length===0)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Mt.sep))throw new Error(`Filename is a directory: ${e}`);e.indexOf(`~${Mt.sep}`)===0&&(e=e.replace("~",Tm.homedir())),e=Mt.normalize(e),n=!n&&n!==0?5:n,Vt("Creating fileSync appender (",e,", ",r,", ",n,", ",s,", ",o,")");function u(d,g,m){let D;return g?D=new Ga(d,g,m,s):D=(y=>(jm(y,s),{write(F){At.appendFileSync(y,F);}}))(d),D}let c=u(e,r,n);return d=>{c.write(t(d,o)+YS);}}function US(e,t){let r=t.basicLayout;e.layout&&(r=t.layout(e.layout.type,e.layout));let n={flags:e.flags||"a",encoding:e.encoding||"utf8",mode:e.mode||384};return WS(e.filename,r,e.maxLogSize,e.backups,n,e.timezoneOffset)}Im.exports.configure=US;});var $m=B((IO,Lm)=>{var Tt=qe()("log4js:tcp"),zS=U("net");function HS(e,t){let r=!1,n=[],s,o=3,u="__LOG4JS__";function c(D){Tt("Writing log event to socket"),r=s.write(`${t(D)}${u}`,"utf8");}function d(){let D;for(Tt("emptying buffer");D=n.shift();)c(D);}function g(){Tt(`appender creating socket to ${e.host||"localhost"}:${e.port||5e3}`),u=`${e.endMsg||"__LOG4JS__"}`,s=zS.createConnection(e.port||5e3,e.host||"localhost"),s.on("connect",()=>{Tt("socket connected"),d(),r=!0;}),s.on("drain",()=>{Tt("drain event received, emptying buffer"),r=!0,d();}),s.on("timeout",s.end.bind(s)),s.on("error",D=>{Tt("connection error",D),r=!1,d();}),s.on("close",g);}g();function m(D){r?c(D):(Tt("buffering log event because it cannot write at the moment"),n.push(D));}return m.shutdown=function(D){Tt("shutdown called"),n.length&&o?(Tt("buffer has items, waiting 100ms to empty"),o-=1,setTimeout(()=>{m.shutdown(D);},100)):(s.removeAllListeners("close"),s.end(D));},m}function VS(e,t){Tt(`configure with config = ${e}`);let r=function(n){return n.serialise()};return e.layout&&(r=t.layout(e.layout.type,e.layout)),HS(e,r)}Lm.exports.configure=VS;});var Ka=B((NO,Za)=>{var Ja=U("path"),ar=qe()("log4js:appenders"),gt=gr(),km=os(),GS=yr(),JS=da(),ZS=Nd(),St=new Map;St.set("console",$d());St.set("stdout",Pd());St.set("stderr",Bd());St.set("logLevelFilter",Yd());St.set("categoryFilter",zd());St.set("noLogFilter",Gd());St.set("file",xm());St.set("dateFile",Mm());St.set("fileSync",Nm());St.set("tcp",$m());var Zn=new Map,Ss=(e,t)=>{let r;try{let n=`${e}.cjs`;r=U.resolve(n),ar("Loading module from ",n);}catch{r=e,ar("Loading module from ",e);}try{return U(r)}catch(n){gt.throwExceptionIf(t,n.code!=="MODULE_NOT_FOUND",`appender "${e}" could not be loaded (error was: ${n})`);return}},KS=(e,t)=>St.get(e)||Ss(`./${e}`,t)||Ss(e,t)||U.main&&U.main.filename&&Ss(Ja.join(Ja.dirname(U.main.filename),e),t)||Ss(Ja.join(process.cwd(),e),t),Cs=new Set,Pm=(e,t)=>{if(Zn.has(e))return Zn.get(e);if(!t.appenders[e])return !1;if(Cs.has(e))throw new Error(`Dependency loop detected for appender ${e}.`);Cs.add(e),ar(`Creating appender ${e}`);let r=QS(e,t);return Cs.delete(e),Zn.set(e,r),r},QS=(e,t)=>{let r=t.appenders[e],n=r.type.configure?r.type:KS(r.type,t);return gt.throwExceptionIf(t,gt.not(n),`appender "${e}" is not valid (type "${r.type}" could not be found)`),n.appender&&(process.emitWarning(`Appender ${r.type} exports an appender function.`,"DeprecationWarning","log4js-node-DEP0001"),ar("[log4js-node-DEP0001]",`DEPRECATION: Appender ${r.type} exports an appender function.`)),n.shutdown&&(process.emitWarning(`Appender ${r.type} exports a shutdown function.`,"DeprecationWarning","log4js-node-DEP0002"),ar("[log4js-node-DEP0002]",`DEPRECATION: Appender ${r.type} exports a shutdown function.`)),ar(`${e}: clustering.isMaster ? ${km.isMaster()}`),ar(`${e}: appenderModule is ${U("util").inspect(n)}`),km.onlyOnMaster(()=>(ar(`calling appenderModule.configure for ${e} / ${r.type}`),n.configure(ZS.modifyConfig(r),JS,s=>Pm(s,t),GS)),()=>{})},Rm=e=>{if(Zn.clear(),Cs.clear(),!e)return;let t=[];Object.values(e.categories).forEach(r=>{t.push(...r.appenders);}),Object.keys(e.appenders).forEach(r=>{(t.includes(r)||e.appenders[r].type==="tcp-server"||e.appenders[r].type==="multiprocess")&&Pm(r,e);});},Bm=()=>{Rm();};Bm();gt.addListener(e=>{gt.throwExceptionIf(e,gt.not(gt.anObject(e.appenders)),'must have a property "appenders" of type object.');let t=Object.keys(e.appenders);gt.throwExceptionIf(e,gt.not(t.length),"must define at least one appender."),t.forEach(r=>{gt.throwExceptionIf(e,gt.not(e.appenders[r].type),`appender "${r}" is not valid (must be an object with property "type")`);});});gt.addListener(Rm);Za.exports=Zn;Za.exports.init=Bm;});var eu=B(($O,Os)=>{var Kn=qe()("log4js:categories"),je=gr(),Qa=yr(),qm=Ka(),ur=new Map;function Ym(e,t,r){if(t.inherit===!1)return;let n=r.lastIndexOf(".");if(n<0)return;let s=r.slice(0,n),o=e.categories[s];o||(o={inherit:!0,appenders:[]}),Ym(e,o,s),!e.categories[s]&&o.appenders&&o.appenders.length&&o.level&&(e.categories[s]=o),t.appenders=t.appenders||[],t.level=t.level||o.level,o.appenders.forEach(u=>{t.appenders.includes(u)||t.appenders.push(u);}),t.parent=o;}function XS(e){if(!e.categories)return;Object.keys(e.categories).forEach(r=>{let n=e.categories[r];Ym(e,n,r);});}je.addPreProcessingListener(e=>XS(e));je.addListener(e=>{je.throwExceptionIf(e,je.not(je.anObject(e.categories)),'must have a property "categories" of type object.');let t=Object.keys(e.categories);je.throwExceptionIf(e,je.not(t.length),"must define at least one category."),t.forEach(r=>{let n=e.categories[r];je.throwExceptionIf(e,[je.not(n.appenders),je.not(n.level)],`category "${r}" is not valid (must be an object with properties "appenders" and "level")`),je.throwExceptionIf(e,je.not(Array.isArray(n.appenders)),`category "${r}" is not valid (appenders must be an array of appender names)`),je.throwExceptionIf(e,je.not(n.appenders.length),`category "${r}" is not valid (appenders must contain at least one appender name)`),Object.prototype.hasOwnProperty.call(n,"enableCallStack")&&je.throwExceptionIf(e,typeof n.enableCallStack!="boolean",`category "${r}" is not valid (enableCallStack must be boolean type)`),n.appenders.forEach(s=>{je.throwExceptionIf(e,je.not(qm.get(s)),`category "${r}" is not valid (appender "${s}" is not defined)`);}),je.throwExceptionIf(e,je.not(Qa.getLevel(n.level)),`category "${r}" is not valid (level "${n.level}" not recognised; valid levels are ${Qa.levels.join(", ")})`);}),je.throwExceptionIf(e,je.not(e.categories.default),'must define a "default" category.');});var Xa=e=>{if(ur.clear(),!e)return;Object.keys(e.categories).forEach(r=>{let n=e.categories[r],s=[];n.appenders.forEach(o=>{s.push(qm.get(o)),Kn(`Creating category ${r}`),ur.set(r,{appenders:s,level:Qa.getLevel(n.level),enableCallStack:n.enableCallStack||!1});});});},Wm=()=>{Xa();};Wm();je.addListener(Xa);var on=e=>{if(Kn(`configForCategory: searching for config for ${e}`),ur.has(e))return Kn(`configForCategory: ${e} exists in config, returning it`),ur.get(e);let t;return e.indexOf(".")>0?(Kn(`configForCategory: ${e} has hierarchy, cloning from parents`),t={...on(e.slice(0,e.lastIndexOf(".")))}):(ur.has("default")||Xa({categories:{default:{appenders:["out"],level:"OFF"}}}),Kn("configForCategory: cloning default category"),t={...ur.get("default")}),ur.set(e,t),t},e2=e=>on(e).appenders,t2=e=>on(e).level,r2=(e,t)=>{on(e).level=t;},n2=e=>on(e).enableCallStack===!0,i2=(e,t)=>{on(e).enableCallStack=t;};Os.exports=ur;Os.exports=Object.assign(Os.exports,{appendersForCategory:e2,getLevelForCategory:t2,setLevelForCategory:r2,getEnableCallStackForCategory:n2,setEnableCallStackForCategory:i2,init:Wm});});var Zm=B((kO,Jm)=>{var Um=qe()("log4js:logger"),s2=ma(),jt=yr(),o2=os(),bs=eu(),Hm=gr(),a2=/^(?:\s*)at (?:(.+) \()?(?:([^(]+?):(\d+):(\d+))\)?$/,tu=1,Vm=3;function zm(e,t=Vm+tu){try{let r=e.stack.split(` +`).slice(t);if(!r.length)return null;let n=a2.exec(r[0]);if(n&&n.length===5){let s="",o="",u="";return n[1]&&n[1]!==""&&([o,u]=n[1].replace(/[[\]]/g,"").split(" as "),u=u||"",o.includes(".")&&([s,o]=o.split("."))),{fileName:n[2],lineNumber:parseInt(n[3],10),columnNumber:parseInt(n[4],10),callStack:r.join(` +`),className:s,functionName:o,functionAlias:u,callerName:n[1]||""}}else console.error("log4js.logger - defaultParseCallStack error");}catch(r){console.error("log4js.logger - defaultParseCallStack error",r);}return null}var Qn=class{constructor(t){if(!t)throw new Error("No category provided.");this.category=t,this.context={},this.callStackSkipIndex=0,this.parseCallStack=zm,Um(`Logger created (${this.category}, ${this.level})`);}get level(){return jt.getLevel(bs.getLevelForCategory(this.category),jt.OFF)}set level(t){bs.setLevelForCategory(this.category,jt.getLevel(t,this.level));}get useCallStack(){return bs.getEnableCallStackForCategory(this.category)}set useCallStack(t){bs.setEnableCallStackForCategory(this.category,t===!0);}get callStackLinesToSkip(){return this.callStackSkipIndex}set callStackLinesToSkip(t){if(typeof t!="number")throw new TypeError("Must be a number");if(t<0)throw new RangeError("Must be >= 0");this.callStackSkipIndex=t;}log(t,...r){let n=jt.getLevel(t);n?this.isLevelEnabled(n)&&this._log(n,r):Hm.validIdentifier(t)&&r.length>0?(this.log(jt.WARN,"log4js:logger.log: valid log-level not found as first parameter given:",t),this.log(jt.INFO,`[${t}]`,...r)):this.log(jt.INFO,t,...r);}isLevelEnabled(t){return this.level.isLessThanOrEqualTo(t)}_log(t,r){Um(`sending log data (${t}) to appenders`);let n=r.find(u=>u instanceof Error),s;if(this.useCallStack){try{n&&(s=this.parseCallStack(n,this.callStackSkipIndex+tu));}catch{}s=s||this.parseCallStack(new Error,this.callStackSkipIndex+Vm+tu);}let o=new s2(this.category,t,r,this.context,s,n);o2.send(o);}addContext(t,r){this.context[t]=r;}removeContext(t){delete this.context[t];}clearContext(){this.context={};}setParseCallStackFunction(t){if(typeof t=="function")this.parseCallStack=t;else if(typeof t>"u")this.parseCallStack=zm;else throw new TypeError("Invalid type passed to setParseCallStackFunction")}};function Gm(e){let t=jt.getLevel(e),n=t.toString().toLowerCase().replace(/_([a-z])/g,o=>o[1].toUpperCase()),s=n[0].toUpperCase()+n.slice(1);Qn.prototype[`is${s}Enabled`]=function(){return this.isLevelEnabled(t)},Qn.prototype[n]=function(...o){this.log(t,...o);};}jt.levels.forEach(Gm);Hm.addListener(()=>{jt.levels.forEach(Gm);});Jm.exports=Qn;});var Xm=B((PO,Qm)=>{var an=yr(),u2=':remote-addr - - ":method :url HTTP/:http-version" :status :content-length ":referrer" ":user-agent"';function c2(e){return e.originalUrl||e.url}function l2(e,t,r){let n=o=>{let u=o.concat();for(let c=0;cn.source?n.source:n);t=new RegExp(r.join("|"));}return t}function d2(e,t,r){let n=t;if(r){let s=r.find(o=>{let u=!1;return o.from&&o.to?u=e>=o.from&&e<=o.to:u=o.codes.indexOf(e)!==-1,u});s&&(n=an.getLevel(s.level,n));}return n}Qm.exports=function(t,r){typeof r=="string"||typeof r=="function"?r={format:r}:r=r||{};let n=t,s=an.getLevel(r.level,an.INFO),o=r.format||u2;return (u,c,d)=>{if(typeof u._logging<"u")return d();if(typeof r.nolog!="function"){let g=f2(r.nolog);if(g&&g.test(u.originalUrl))return d()}if(n.isLevelEnabled(s)||r.level==="auto"){let g=new Date,{writeHead:m}=c;u._logging=!0,c.writeHead=(F,C)=>{c.writeHead=m,c.writeHead(F,C),c.__statusCode=F,c.__headers=C||{};};let D=!1,y=()=>{if(D)return;if(D=!0,typeof r.nolog=="function"&&r.nolog(u,c)===!0){u._logging=!1;return}c.responseTime=new Date-g,c.statusCode&&r.level==="auto"&&(s=an.INFO,c.statusCode>=300&&(s=an.WARN),c.statusCode>=400&&(s=an.ERROR)),s=d2(c.statusCode,s,r.statusRules);let F=l2(u,c,r.tokens||[]);if(r.context&&n.addContext("res",c),typeof o=="function"){let C=o(u,c,_=>Km(_,F));C&&n.log(s,C);}else n.log(s,Km(o,F));r.context&&n.removeContext("res");};c.on("end",y),c.on("finish",y),c.on("error",y),c.on("close",y);}return d()}};});var ig=B((RO,ng)=>{var eg=qe()("log4js:recording"),xs=[];function h2(){return function(e){eg(`received logEvent, number of events now ${xs.length+1}`),eg("log event was ",e),xs.push(e);}}function tg(){return xs.slice()}function rg(){xs.length=0;}ng.exports={configure:h2,replay:tg,playback:tg,reset:rg,erase:rg};});var fg=B((BO,lg)=>{var cr=qe()("log4js:main"),p2=U("fs"),m2=Gf()({proto:!0}),g2=gr(),D2=da(),y2=yr(),sg=Ka(),og=eu(),v2=Zm(),w2=os(),E2=Xm(),_2=ig(),un=!1;function F2(e){if(!un)return;cr("Received log event ",e),og.appendersForCategory(e.categoryName).forEach(r=>{r(e);});}function S2(e){cr(`Loading configuration from ${e}`);try{return JSON.parse(p2.readFileSync(e,"utf8"))}catch(t){throw new Error(`Problem reading config from file "${e}". Error was ${t.message}`,t)}}function ag(e){un&&ug();let t=e;return typeof t=="string"&&(t=S2(e)),cr(`Configuration is ${t}`),g2.configure(m2(t)),w2.onMessage(F2),un=!0,cg}function C2(){return un}function O2(){return _2}function ug(e=()=>{}){if(typeof e!="function")throw new TypeError("Invalid callback passed to shutdown");cr("Shutdown called. Disabling all log writing."),un=!1;let t=Array.from(sg.values());sg.init(),og.init();let r=t.reduce((u,c)=>c.shutdown?u+1:u,0);r===0&&(cr("No appenders with shutdown functions found."),e());let n=0,s;cr(`Found ${r} appenders with shutdown functions.`);function o(u){s=s||u,n+=1,cr(`Appender shutdowns complete: ${n} / ${r}`),n>=r&&(cr("All shutdown functions completed."),e(s));}t.filter(u=>u.shutdown).forEach(u=>u.shutdown(o));}function b2(e){return un||ag(process.env.LOG4JS_CONFIG||{appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"OFF"}}}),new v2(e||"default")}var cg={getLogger:b2,configure:ag,isConfigured:C2,shutdown:ug,connectLogger:E2,levels:y2,addLayout:D2.addLayout,recording:O2};lg.exports=cg;});var dg=Qs(Wu());var Lf=Qs(Li());var Jr=class e{nconf=Lf.default;_rootPath;_devmode;_appVersion;_logLevel;_dateFormat;_logDateFormat;_logFilePath;_ipAddress;_port;_login;_password;_limitTime;_settingsFilePath;ratioEnabled=!1;ratioLimit=2;constructor(t){this._rootPath=t??e.getRootDir(),this.init(),this._devmode=this.getParam("node_env")==="development",this._appVersion=this.getParam("version"),this._logLevel=this._devmode?"trace":this.getParam("log_level"),this._dateFormat=this.getParam("date_format"),this._logDateFormat=this.getParam("log_date_format"),this._logFilePath=this.getParam("log_file_path"),this._login=this.getParam("login"),this._password=this.getParam("password"),this._ipAddress=this.getParam("ip_address"),this._port=parseInt(this.getParam("tcp_port"),10),this._limitTime=parseInt(this.getParam("limit_time"),10),this._settingsFilePath=this.getParam("settings_file_path"),this.setRatio();}get rootPath(){return this._rootPath}get devmode(){return this._devmode}get appVersion(){return this._appVersion}get logLevel(){return this._logLevel}get dateFormat(){return this._dateFormat}get logDateFormat(){return this._logDateFormat}get logFilePath(){return this._logFilePath}get ipAddress(){return this._ipAddress}get port(){return this._port}get login(){return this._login}get password(){return this._password}get limitTime(){return this._limitTime}get settingsFilePath(){return this._settingsFilePath}init(){let t=path.normalize(`${this.rootPath}/config.json`),r=path.normalize(`${this.rootPath}/package.json`);this.checkFileExists(t),this.checkFileExists(r),this.nconf.env(),this.nconf.file("config",t),this.nconf.file("package",r),this.nconf.defaults({node_env:"production",log_level:"info",log_file_path:"/var/log/transmission/torrentclear.log",date_format:"DD.MM.YYYY_HH:mm:ss",log_date_format:"dd.MM.yyyy_hh:mm:ss.SSS",ip_address:"127.0.0.1",tcp_port:"9091",limit_time:"604800",settings_file_path:"/etc/transmission-daemon/settings.json"});let n=this.getParam("settings_file_path"),s=path.normalize(n);this.checkFileExists(s),this.nconf.file("transmission",s);}setRatio(){this.ratioEnabled=!!this.getParam("ratio-limit-enabled");let t=this.getParam("ratio-limit");this.ratioEnabled&&(this.ratioLimit=parseFloat(t));}checkFileExists(t){if(!fs.existsSync(t)){let r=path.resolve(t);if(!fs.existsSync(r))throw new Error(`File not found on path "${t}" or relative path "${r}"`)}}static getRootDir(){let t=url.fileURLToPath(String(url.pathToFileURL(__filename))),n=path.dirname(t);for(;!fs.existsSync(path.join(n,"package.json"));)n=path.join(n,"..");return String(path.normalize(n))}getParam(t){let r=this.nconf.get(t);if((r===void 0||r==="")&&(r=this.nconf.get(t.toUpperCase())),r===void 0||r==="")throw new Error(`Parameter "${t}" incorrect value "${r}" of type "${typeof r}"`);return String(r)}};var x2=Qs(fg());var As=class{log4js;_config;_logger;constructor(t){this.log4js=x2,this._config=new Jr(t),this.init(),this._logger=this.log4js.getLogger();}get logger(){return this._logger}get config(){return this._config}init(){let t={appenders:{console:{type:"console",layout:{type:"pattern",pattern:`[%d{${this.config.logDateFormat}}] : %[[%p]%] : %m`}},logFile:{type:"file",filename:this.config.logFilePath,maxLogSize:"10M",compress:!0,layout:{type:"pattern",pattern:`[%d{${this.config.logDateFormat}}] : [%p] : %m`}}},categories:{default:{appenders:this.config.devmode?["console"]:["console","logFile"],level:this.config.logLevel,enableCallStack:!!this.config.devmode}}};this.log4js.configure(t);}};var Ms=class{_config;_logger;_connect;regexSuccess=/success/i;regexTorrentInfo=/(?<=Name:\s)(.*?)(?=\s*Hash:)|(?<=State:\s)(.*?)(?=\s*Location:)|(?<=Location:\s)(.*?)(?=\s*Percent Done:)|(?<=Percent Done:\s)(.*?)%(?=\s*ETA:)|(?<=Ratio:\s)(.*?)(?=\s*Corrupt DL:)|(?<=Date finished:\s)(.*?)(?=\s*Date started:|$)/g;fileOrDirsState={FILE:1,DIR:2,NOTFOUND:3,UNKNOWN:4};_torrentInfo;_torrentSuccessCount=0;_torrentProcessCount=0;_torrentIDs=[];constructor(t){this._config=new Jr(t),this._logger=new As(t).logger,this._connect=this.connectCommandCreate(),this._torrentInfo={id:0,name:"",state:"",location:"",percent:0,ratio:0,dateDone:"",dateDifference:0};}get connect(){return this._connect}get config(){return this._config}get logger(){return this._logger}get torrentInfo(){return this._torrentInfo}set torrentInfo(t){this._torrentInfo=t;}get torrentSuccessCount(){return this._torrentSuccessCount}set torrentSuccessCount(t){this._torrentSuccessCount=t;}get torrentProcessCount(){return this._torrentProcessCount}set torrentProcessCount(t){this._torrentProcessCount=t;}get torrentIDs(){return this._torrentIDs}main(){try{this.startInfo(),this.getIDs(),this.torrentsProcess(),this.endInfo();}catch(t){this.logger.error(t.message),this.endInfo(!0);}}startInfo(){this.logger.info("##############################################################################################"),this.logger.info(`transmission-torrentclear: "${this.config.appVersion}"`),this.logger.info("==============================================================================================");}endInfo(t=!1){this.logger.info("=============================================================================================="),t?this.logger.error("Failed to complete torrent verification process"):this.logger.info("Completing the torrent verification process"),this.logger.info(`############################################################################################## +`);}getIDs(){try{let t=`${this.connect} --list`;this.logger.debug(`Run command: "${t}"`);let n=this.command(t).toString().match(/^\s+(\d+)\s.*?$/gim);if(n===null||n.length<1){this.logger.info("Torrents not found");return}this.logger.debug("Torrents list:");for(let s of n){this.logger.debug(`torrent: "${s.trim()}"`);let o=s.trim().match(/^(\d+).+$/i);if(o!==null){let u=o[1];this.logger.debug(`ID found: "${u}"`),this.torrentIDs.push(Number(u));}}this.torrentIDs.length>0&&this.logger.info(`IDs found: ${this.torrentIDs.join(", ")}`),this.torrentProcessCount=this.torrentIDs.length;}catch(t){throw this.logger.trace(t),t}}torrentsProcess(){try{if(this.torrentIDs.length>0)for(let t of this.torrentIDs)this.logger.info("=============================================================================================="),this.logger.info(`TORRENT ID: "${t}" START PROCESS ...`),this.getTorrentInfo(t),this.torrentInfo.percent===100?this.checkRatio(this.torrentInfo.ratio)?(this.logger.debug("==> ACTION: Torrent delete on Ratio Limit"),this.clearTorrent(),this.torrentSuccessCount++,this.logger.info(`Stopping and deleting a torrent "${this.torrentInfo.name}" by ratio limit completed successfully`)):this.checkDateDifference(this.torrentInfo.dateDifference)?(this.logger.debug("==> ACTION: Torrent delete on Date Difference"),this.clearTorrent(),this.torrentSuccessCount++,this.logger.info(`Stopping and deleting a torrent "${this.torrentInfo.name}" by datetime limit completed successfully`)):this.logger.info("NO ACTION NEEDED (DATE AND RATIO)"):this.logger.info("NO ACTION NEEDED (< 100)");}catch(t){throw this.logger.trace(t),t}}clearTorrent(){try{let t=path.normalize(`${this.torrentInfo.location}/${this.torrentInfo.name}`);this.logger.debug(`normalized torrentPath: "${t}"`);let r=this.isFileOrDirectoryOrUnknown(t);r===this.fileOrDirsState.FILE?(this.logger.info(`Torrent: "${this.torrentInfo.name}" is a FILE`),this.torrentStop(),this.torrentRemove()):r===this.fileOrDirsState.DIR?(this.logger.info(`Torrent: "${this.torrentInfo.name}" is a DIRECTORY`),this.torrentStop(),this.torrentRemoveAndDelete()):r===this.fileOrDirsState.NOTFOUND?(this.logger.warn(`Torrent: "${this.torrentInfo.name}" FILE NOT FOUND`),this.torrentStop(),this.torrentRemove()):this.logger.debug(`Torrent: "${this.torrentInfo.name}" is neither a file or a directory`);}catch(t){throw this.logger.trace(t),t}}torrentStop(){try{let t=`${this.connect} --torrent ${this.torrentInfo.id} --stop`;this.logger.debug(`Stop torrent: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`),this.logger.debug(`Run command: "${t}"`);let r=this.command(t);if(r=r.replace(/(\r\n|\n|\r)/gm,""),this.logger.debug(`execResultStop: ${r}`),!this.regexSuccess.test(r))throw new Error(`Failed to stop torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${r}`)}catch(t){throw this.logger.trace(t),t}}torrentRemove(){try{let t=`${this.connect} --torrent ${this.torrentInfo.id} --remove`;this.logger.debug(`Remove torrent without deleting file: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`),this.logger.debug(`Run command: "${t}"`);let r=this.command(t);if(r=r.replace(/(\r\n|\n|\r)/gm,""),this.logger.debug(`execResultRemove: ${r}`),!this.regexSuccess.test(r))throw new Error(`Failed to remove (no del) torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${r}`)}catch(t){throw this.logger.trace(t),t}}torrentRemoveAndDelete(){try{let t=`${this.connect} --torrent ${this.torrentInfo.id} --remove-and-delete`;this.logger.debug(`Remove torrent with deleting file: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`),this.logger.debug(`Run command: "${t}"`);let r=this.command(t);if(r=r.replace(/(\r\n|\n|\r)/gm,""),this.logger.debug(`execResultRemoveAndDelete: ${r}`),!this.regexSuccess.test(r))throw new Error(`Failed to remove and delete torrent (${this.torrentInfo.id}) "${this.torrentInfo.name}". Reason: Negative result of exec command: ${r}`)}catch(t){throw this.logger.trace(t),t}}checkRatio(t){return t>=this.config.ratioLimit?(this.logger.info(`Torrent has reached the Ratio limit: "${t}" >= "${this.config.ratioLimit}"`),!0):!1}checkDateDifference(t){return t>=this.config.limitTime?(this.logger.info(`Torrent has reached the Date difference limit: "${t}" >= "${this.config.limitTime}"`),!0):!1}getTorrentInfo(t){try{let r=`${this.connect} --torrent ${t} --info`;this.logger.debug(`Run command: "${r}"`);let s=this.command(r).toString().matchAll(this.regexTorrentInfo),o=Array.from(s);if(o.length<1)throw new Error("Torrent info data is EMPTY");let u=o[0][1];if(u===void 0||u==="")throw new Error(`Torrent name not found in torrent info: "${t}"`);let c=o[1][2];if(c===void 0||c==="")throw new Error(`Torrent state not found in torrent info: "${t}"`);let d=o[2][3];if(d===void 0||d==="")throw new Error(`Torrent location not found in torrent info: "${t}"`);let g=o[3][4];if(g===void 0||g==="")throw new Error(`Torrent percent not found in torrent info: "${t}"`);let m=o[4][5];if(m===void 0||m==="")throw new Error(`Torrent ratio not found in torrent info: "${t}"`);let D=o[5][6];if(D===void 0||D==="")throw new Error(`Torrent date done not found in torrent info: "${t}"`);let y=Date.now(),F=Date.parse(D.trim());this.torrentInfo={id:Number(t),name:u.trim(),state:c.trim(),location:d.trim(),percent:Number(g.trim()),ratio:Number(m.trim()),dateDone:this.dateFormat(F),dateDifference:Math.round((y-F)/1e3)},this.logger.debug(`Torrent ID "${this.torrentInfo.id}" info:`),this.logger.debug(` Name: "${this.torrentInfo.name}"`),this.logger.debug(` State: "${this.torrentInfo.state}"`),this.logger.debug(` Location: "${this.torrentInfo.location}"`),this.logger.debug(` Percent Done: "${this.torrentInfo.percent}%"`),this.logger.debug(` Ratio: "${this.torrentInfo.ratio}" | limit: "${this.config.ratioLimit}"`),this.logger.debug(` Date finished: "${this.torrentInfo.dateDone}"`),this.logger.debug(` Date Difference: "${this.torrentInfo.dateDifference}" | limit: "${this.config.limitTime}"`);}catch(r){throw this.logger.trace(r),r}}connectCommandCreate(){return `transmission-remote ${this.config.ipAddress}:${this.config.port} --auth ${this.config.login}:${this.config.password}`}dateFormat(t){let r=new Date(t);return (0, dg.default)(r).format(this.config.dateFormat)}command(t){try{return child_process.execSync(t,{timeout:2e3,encoding:"utf8"})}catch(r){throw this.logger.trace(r),r}}isFileOrDirectoryOrUnknown(t){try{let r=fs.lstatSync(t),n=r.isFile(),s=r.isDirectory();return n?this.fileOrDirsState.FILE:s?this.fileOrDirsState.DIR:this.fileOrDirsState.UNKNOWN}catch(r){if(r.code==="ENOENT")return this.fileOrDirsState.NOTFOUND;throw this.logger.trace(r),r}}};new Ms().main(); /*! Bundled license information: moment/moment.js: diff --git a/package.json b/package.json index 4b8b0d9..dc7d143 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,8 @@ "@types/jest": "29.5.14", "@types/nconf": "0.10.7", "@types/node": "22.10.0", - "@typescript-eslint/eslint-plugin": "7.18.0", - "@typescript-eslint/parser": "7.18.0", + "@typescript-eslint/eslint-plugin": "8.14.0", + "@typescript-eslint/parser": "8.14.0", "eslint": "8.57.1", "eslint-plugin-github": "5.1.2", "eslint-plugin-jest": "28.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 28e58b2..5e059c9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,20 +24,20 @@ importers: specifier: 22.10.0 version: 22.10.0 '@typescript-eslint/eslint-plugin': - specifier: 7.18.0 - version: 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) + specifier: 8.14.0 + version: 8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) '@typescript-eslint/parser': - specifier: 7.18.0 - version: 7.18.0(eslint@8.57.1)(typescript@5.7.2) + specifier: 8.14.0 + version: 8.14.0(eslint@8.57.1)(typescript@5.7.2) eslint: specifier: 8.57.1 version: 8.57.1 eslint-plugin-github: specifier: 5.1.2 - version: 5.1.2(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) + version: 5.1.2(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) eslint-plugin-jest: specifier: 28.9.0 - version: 28.9.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2) + version: 28.9.0(@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2) eslint-plugin-jsonc: specifier: 2.18.2 version: 2.18.2(eslint@8.57.1) @@ -408,10 +408,6 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.11.0': - resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint-community/regexpp@4.11.1': resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} @@ -726,12 +722,12 @@ packages: '@types/yargs@17.0.32': resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} - '@typescript-eslint/eslint-plugin@7.18.0': - resolution: {integrity: sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/eslint-plugin@8.14.0': + resolution: {integrity: sha512-tqp8H7UWFaZj0yNO6bycd5YjMwxa6wIHOLZvWPkidwbgLCsBMetQoGj7DPuAlWa2yGO3H48xmPwjhsSPPCGU5w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: @@ -758,11 +754,11 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.18.0': - resolution: {integrity: sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/parser@8.14.0': + resolution: {integrity: sha512-2p82Yn9juUJq0XynBXtFCyrBDb6/dJombnz6vbo6mgQEtWHfvHbQuEa9kAOVIt1c9YFwi7H6WxtPj1kg+80+RA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: @@ -782,23 +778,22 @@ packages: resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/scope-manager@7.18.0': - resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/scope-manager@8.13.0': resolution: {integrity: sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.14.0': + resolution: {integrity: sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.16.0': resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@7.18.0': - resolution: {integrity: sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/type-utils@8.14.0': + resolution: {integrity: sha512-Xcz9qOtZuGusVOH5Uk07NGs39wrKkf3AxlkK79RBK6aJC1l03CobXjJbwBPSidetAOV+5rEVuiT1VSBUOAsanQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: @@ -818,14 +813,14 @@ packages: resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/types@7.18.0': - resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/types@8.13.0': resolution: {integrity: sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.14.0': + resolution: {integrity: sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.16.0': resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -839,17 +834,17 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@7.18.0': - resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/typescript-estree@8.13.0': + resolution: {integrity: sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/typescript-estree@8.13.0': - resolution: {integrity: sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==} + '@typescript-eslint/typescript-estree@8.14.0': + resolution: {integrity: sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -866,18 +861,18 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.18.0': - resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - '@typescript-eslint/utils@8.13.0': resolution: {integrity: sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.14.0': + resolution: {integrity: sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.16.0': resolution: {integrity: sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -892,14 +887,14 @@ packages: resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/visitor-keys@7.18.0': - resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/visitor-keys@8.13.0': resolution: {integrity: sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.14.0': + resolution: {integrity: sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.16.0': resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1214,15 +1209,6 @@ packages: supports-color: optional: true - debug@4.3.6: - resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - debug@4.3.7: resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} @@ -1753,10 +1739,6 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} - ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} - engines: {node: '>= 4'} - ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -2746,12 +2728,6 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true - ts-api-utils@1.3.0: - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' - ts-api-utils@1.4.0: resolution: {integrity: sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==} engines: {node: '>=16'} @@ -3247,8 +3223,6 @@ snapshots: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.11.0': {} - '@eslint-community/regexpp@4.11.1': {} '@eslint/compat@1.2.3(eslint@8.57.1)': @@ -3642,19 +3616,19 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2)': dependencies: - '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.7.2) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/type-utils': 7.18.0(eslint@8.57.1)(typescript@5.7.2) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 7.18.0 + '@eslint-community/regexpp': 4.11.1 + '@typescript-eslint/parser': 8.14.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.14.0 + '@typescript-eslint/type-utils': 8.14.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/utils': 8.14.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.14.0 eslint: 8.57.1 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.7.2) + ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -3691,13 +3665,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2)': + '@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.3.6 + '@typescript-eslint/scope-manager': 8.14.0 + '@typescript-eslint/types': 8.14.0 + '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.14.0 + debug: 4.3.7 eslint: 8.57.1 optionalDependencies: typescript: 5.7.2 @@ -3722,31 +3696,31 @@ snapshots: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - '@typescript-eslint/scope-manager@7.18.0': - dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - '@typescript-eslint/scope-manager@8.13.0': dependencies: '@typescript-eslint/types': 8.13.0 '@typescript-eslint/visitor-keys': 8.13.0 + '@typescript-eslint/scope-manager@8.14.0': + dependencies: + '@typescript-eslint/types': 8.14.0 + '@typescript-eslint/visitor-keys': 8.14.0 + '@typescript-eslint/scope-manager@8.16.0': dependencies: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/visitor-keys': 8.16.0 - '@typescript-eslint/type-utils@7.18.0(eslint@8.57.1)(typescript@5.7.2)': + '@typescript-eslint/type-utils@8.14.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.2) - '@typescript-eslint/utils': 7.18.0(eslint@8.57.1)(typescript@5.7.2) - debug: 4.3.6 - eslint: 8.57.1 - ts-api-utils: 1.3.0(typescript@5.7.2) + '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.14.0(eslint@8.57.1)(typescript@5.7.2) + debug: 4.3.7 + ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: + - eslint - supports-color '@typescript-eslint/type-utils@8.16.0(eslint@8.57.1)(typescript@5.7.2)': @@ -3763,10 +3737,10 @@ snapshots: '@typescript-eslint/types@6.21.0': {} - '@typescript-eslint/types@7.18.0': {} - '@typescript-eslint/types@8.13.0': {} + '@typescript-eslint/types@8.14.0': {} + '@typescript-eslint/types@8.16.0': {} '@typescript-eslint/typescript-estree@6.21.0(typescript@5.7.2)': @@ -3778,31 +3752,31 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.7.2) + ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.7.2)': + '@typescript-eslint/typescript-estree@8.13.0(typescript@5.7.2)': dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - debug: 4.3.6 - globby: 11.1.0 + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/visitor-keys': 8.13.0 + debug: 4.3.7 + fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.7.2) + ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.13.0(typescript@5.7.2)': + '@typescript-eslint/typescript-estree@8.14.0(typescript@5.7.2)': dependencies: - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/visitor-keys': 8.13.0 + '@typescript-eslint/types': 8.14.0 + '@typescript-eslint/visitor-keys': 8.14.0 debug: 4.3.7 fast-glob: 3.3.2 is-glob: 4.0.3 @@ -3829,23 +3803,23 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.18.0(eslint@8.57.1)(typescript@5.7.2)': + '@typescript-eslint/utils@8.13.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.13.0 + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.7.2) eslint: 8.57.1 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.13.0(eslint@8.57.1)(typescript@5.7.2)': + '@typescript-eslint/utils@8.14.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) - '@typescript-eslint/scope-manager': 8.13.0 - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.14.0 + '@typescript-eslint/types': 8.14.0 + '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.7.2) eslint: 8.57.1 transitivePeerDependencies: - supports-color @@ -3868,14 +3842,14 @@ snapshots: '@typescript-eslint/types': 6.21.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@7.18.0': + '@typescript-eslint/visitor-keys@8.13.0': dependencies: - '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/types': 8.13.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.13.0': + '@typescript-eslint/visitor-keys@8.14.0': dependencies: - '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/types': 8.14.0 eslint-visitor-keys: 3.4.3 '@typescript-eslint/visitor-keys@8.16.0': @@ -4218,10 +4192,6 @@ snapshots: dependencies: ms: 2.1.2 - debug@4.3.6: - dependencies: - ms: 2.1.2 - debug@4.3.7: dependencies: ms: 2.1.3 @@ -4465,11 +4435,11 @@ snapshots: esquery: 1.6.0 jsonc-eslint-parser: 2.4.0 - eslint-module-utils@2.11.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): + eslint-module-utils@2.11.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/parser': 8.14.0(eslint@8.57.1)(typescript@5.7.2) eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: @@ -4486,7 +4456,7 @@ snapshots: eslint: 8.57.1 ignore: 5.3.2 - eslint-plugin-github@5.1.2(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2): + eslint-plugin-github@5.1.2(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2): dependencies: '@eslint/compat': 1.2.3(eslint@8.57.1) '@eslint/eslintrc': 3.2.0 @@ -4498,7 +4468,7 @@ snapshots: eslint-plugin-escompat: 3.11.4(eslint@8.57.1) eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1) eslint-plugin-i18n-text: 1.0.1(eslint@8.57.1) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1) eslint-plugin-jsx-a11y: 6.10.0(eslint@8.57.1) eslint-plugin-no-only-tests: 3.3.0 eslint-plugin-prettier: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.4.1) @@ -4520,7 +4490,7 @@ snapshots: dependencies: eslint: 8.57.1 - eslint-plugin-import@2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1): + eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -4531,7 +4501,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -4542,18 +4512,18 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 7.18.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/parser': 8.14.0(eslint@8.57.1)(typescript@5.7.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2): + eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2): dependencies: '@typescript-eslint/utils': 8.13.0(eslint@8.57.1)(typescript@5.7.2) eslint: 8.57.1 optionalDependencies: - '@typescript-eslint/eslint-plugin': 7.18.0(@typescript-eslint/parser@7.18.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/eslint-plugin': 8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) jest: 29.7.0(@types/node@22.10.0) transitivePeerDependencies: - supports-color @@ -4911,8 +4881,6 @@ snapshots: human-signals@2.1.0: {} - ignore@5.3.1: {} - ignore@5.3.2: {} import-fresh@3.3.0: @@ -6070,10 +6038,6 @@ snapshots: tree-kill@1.2.2: {} - ts-api-utils@1.3.0(typescript@5.7.2): - dependencies: - typescript: 5.7.2 - ts-api-utils@1.4.0(typescript@5.7.2): dependencies: typescript: 5.7.2 diff --git a/src/class/config.ts b/src/class/config.ts index 25f457d..7bd7b02 100644 --- a/src/class/config.ts +++ b/src/class/config.ts @@ -1,7 +1,6 @@ import { fileURLToPath, pathToFileURL } from 'node:url'; import { dirname, normalize, join, resolve } from 'node:path'; import { existsSync } from 'node:fs'; -import { cpus } from 'node:os'; import nconf from 'nconf'; /** @@ -68,11 +67,11 @@ class Config { /** * Transmission-daemon access login */ - private readonly _login: string | undefined; + private readonly _login: string; /** * Transmission-daemon access password */ - private readonly _password: string | undefined; + private readonly _password: string; /** * Torrent limit time * After how many days should the torrent be deleted even if it has not reached the distribution coefficient = 2 @@ -91,29 +90,26 @@ class Config { /** * Transmission setting "ratio-limit" * If `"ratio-limit-enabled": true` - * else default 2 + * else default `2.0` */ - ratioLimit = 2; + ratioLimit = 2.0; constructor(root_path?: string) { - process.env.UV_THREADPOOL_SIZE = cpus().length.toString(); - // this._rootPath = root_path ?? Config.getRootDir(); this.init(); - this._login = this.getParam('login'); - this._password = this.getParam('password'); this._devmode = this.getParam('node_env') === 'development'; this._appVersion = this.getParam('version'); this._logLevel = this._devmode ? 'trace' : this.getParam('log_level'); this._dateFormat = this.getParam('date_format'); this._logDateFormat = this.getParam('log_date_format'); this._logFilePath = this.getParam('log_file_path'); + this._login = this.getParam('login'); + this._password = this.getParam('password'); this._ipAddress = this.getParam('ip_address'); this._port = parseInt(this.getParam('tcp_port'), 10); this._limitTime = parseInt(this.getParam('limit_time'), 10); this._settingsFilePath = this.getParam('settings_file_path'); this.setRatio(); - this.check(); } get rootPath(): string { @@ -152,11 +148,11 @@ class Config { return this._port; } - get login(): string | undefined { + get login(): string { return this._login; } - get password(): string | undefined { + get password(): string { return this._password; } @@ -175,9 +171,12 @@ class Config { */ private init(): void { const configFile: string = normalize(`${this.rootPath}/config.json`); + const packageFile: string = normalize(`${this.rootPath}/package.json`); + this.checkFileExists(configFile); + this.checkFileExists(packageFile); this.nconf.env(); this.nconf.file('config', configFile); - this.nconf.file('package', normalize(`${this.rootPath}/package.json`)); + this.nconf.file('package', packageFile); this.nconf.defaults({ node_env: 'production', log_level: 'info', @@ -189,11 +188,11 @@ class Config { limit_time: '604800', settings_file_path: '/etc/transmission-daemon/settings.json' }); - this.nconf.load(); - this.settingsFileExists(); - const settingFile: string = normalize(this.getParam('settings_file_path')); + const settingFilePath: string = this.getParam('settings_file_path'); + const settingFile: string = normalize(settingFilePath); + this.checkFileExists(settingFile); this.nconf.file('transmission', settingFile); - this.nconf.load(); + // this.check(); } /** @@ -201,29 +200,29 @@ class Config { */ private setRatio(): void { this.ratioEnabled = Boolean(this.getParam('ratio-limit-enabled')); - if (this.ratioEnabled) this.ratioLimit = parseFloat(this.getParam('ratio-limit')); + const ratioLimit: string = this.getParam('ratio-limit'); + if (this.ratioEnabled) this.ratioLimit = parseFloat(ratioLimit); } /** * Check login or password not found */ - check(): void { - const login: string = this.getParam('login'); - const password: string = this.getParam('password'); - if (login === undefined || login === '' || password === undefined || password === '') { - throw new Error('Login or password must be filled in config.json file or Environment'); - } - } + // check(): void { + // const login: string = this.getParam('login'); + // const password: string = this.getParam('password'); + // if (login === '' || password === '') { + // throw new Error('Login or password must be filled in config.json file or Environment'); + // } + // } /** - * Check exists transmission `settings.json` file + * Check exists any file */ - settingsFileExists(): void { - const settingsFilePath: string = normalize(this.getParam('settings_file_path')); - if (!existsSync(settingsFilePath)) { - const relativeSettingsPath: string = resolve(settingsFilePath); - if (!existsSync(relativeSettingsPath)) { - throw new Error(`Transmission settings file not found on path ${settingsFilePath}`); + checkFileExists(file_path: string): void { + if (!existsSync(file_path)) { + const relativePath: string = resolve(file_path) as string; + if (!existsSync(relativePath)) { + throw new Error(`File not found on path "${file_path}" or relative path "${relativePath}"`); } } } @@ -233,27 +232,30 @@ class Config { * @returns {string} application root path */ private static getRootDir(): string { - const filename: string = fileURLToPath(pathToFileURL(__filename).toString()); + const filename: string = fileURLToPath(String(pathToFileURL(__filename))); const dir = dirname(filename); let currentDir: string = dir; while (!existsSync(join(currentDir, 'package.json'))) { currentDir = join(currentDir, '..'); } - return normalize(currentDir); + return String(normalize(currentDir)); } /** * Get param value - * @param param_name - parameter name - * @returns parameter value + * @param {string} param_name - parameter name + * @returns {string} parameter value */ - private getParam(param_name: string): string { + getParam(param_name: string): string { // From config file. Example: login | log_level - let param = this.nconf.get(param_name); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let param: any = this.nconf.get(param_name); // Else not found from config file, get from Environment (uppercase). // Example: LOGIN | LOG_LEVEL - if (param === undefined) param = this.nconf.get(param_name.toUpperCase()); - return param; + if (param === undefined || param === '') param = this.nconf.get(param_name.toUpperCase()); + if (param === undefined || param === '') + throw new Error(`Parameter "${param_name}" incorrect value "${param}" of type "${typeof param}"`); + return String(param); } } diff --git a/src/class/torrentclear.ts b/src/class/torrentclear.ts index d0b7dd6..6aee5eb 100644 --- a/src/class/torrentclear.ts +++ b/src/class/torrentclear.ts @@ -6,7 +6,6 @@ import type { Logger } from 'log4js'; // import { Config } from './config'; import { ServerLogger } from './server-logger'; -// import { Metrics } from './metrics'; // import type { TorrentInfoI, FileOrDirsStateI } from '../types'; @@ -138,13 +137,13 @@ class Torrentclear { /** * Main function. Start program. */ - async main(): Promise { + main(): void { try { this.startInfo(); // get torrents ID from torrents list - await this.getIDs(); + this.getIDs(); // check torrents - await this.torrentsProcess(); + this.torrentsProcess(); this.endInfo(); // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (error: any) { @@ -179,12 +178,12 @@ class Torrentclear { * Get all torrents IDs from transmission-daemon * @set this `torrentIDs` - IDs array list */ - private async getIDs(): Promise { + private getIDs(): void { try { // List all torrents const command = `${this.connect} --list`; this.logger.debug(`Run command: "${command}"`); - const execResult: string = await this.command(command); + const execResult: string = this.command(command); const resultTorrentsList: RegExpMatchArray | null = execResult.toString().match(/^\s+(\d+)\s.*?$/gim); if (resultTorrentsList === null || resultTorrentsList.length < 1) { this.logger.info(`Torrents not found`); @@ -211,7 +210,7 @@ class Torrentclear { /** * Checking torrents. If the deletion conditions match, then the torrent is deleted */ - private async torrentsProcess(): Promise { + private torrentsProcess(): void { try { // If torrents > 0 if (this.torrentIDs.length > 0) { @@ -222,7 +221,7 @@ class Torrentclear { ); this.logger.info(`TORRENT ID: "${id}" START PROCESS ...`); // get torrent information - await this.getTorrentInfo(id); + this.getTorrentInfo(id); // Only done torrents if (this.torrentInfo.percent === 100) { // If OK. Check Ratio @@ -230,7 +229,7 @@ class Torrentclear { if (checkRatio) { // ==> ACTION: Delete on Ratio this.logger.debug(`==> ACTION: Torrent delete on Ratio Limit`); - await this.clearTorrent(); + this.clearTorrent(); this.torrentSuccessCount++; this.logger.info( `Stopping and deleting a torrent "${this.torrentInfo.name}" by ratio limit completed successfully` @@ -242,7 +241,7 @@ class Torrentclear { if (checkDateDifference) { // ==> ACTION: Delete on Date Difference this.logger.debug(`==> ACTION: Torrent delete on Date Difference`); - await this.clearTorrent(); + this.clearTorrent(); this.torrentSuccessCount++; this.logger.info( `Stopping and deleting a torrent "${this.torrentInfo.name}" by datetime limit completed successfully` @@ -268,28 +267,28 @@ class Torrentclear { * Check torrent is a File or a Directory. * If is a File check extensions (mkv, avi, mp4 defaults) */ - private async clearTorrent(): Promise { + private clearTorrent(): void { try { - const torrentPath: string = normalize(`${this.torrentInfo.location}/${this.torrentInfo.name}`); + const torrentPath: string = normalize(`${this.torrentInfo.location}/${this.torrentInfo.name}`) as string; this.logger.debug(`normalized torrentPath: "${torrentPath}"`); - const fileOrDir: number = await this.isFileOrDirectoryOrUnknown(torrentPath); + const fileOrDir: number = this.isFileOrDirectoryOrUnknown(torrentPath); if (fileOrDir === this.fileOrDirsState.FILE) { // Is File this.logger.info(`Torrent: "${this.torrentInfo.name}" is a FILE`); - await this.torrentStop(); - await this.torrentRemove(); + this.torrentStop(); + this.torrentRemove(); } else if (fileOrDir === this.fileOrDirsState.DIR) { // Is Directory this.logger.info(`Torrent: "${this.torrentInfo.name}" is a DIRECTORY`); // If Directory: Remove torrent and delete folder with files inside - await this.torrentStop(); - await this.torrentRemoveAndDelete(); + this.torrentStop(); + this.torrentRemoveAndDelete(); } else if (fileOrDir === this.fileOrDirsState.NOTFOUND) { // File not Found into target directory this.logger.warn(`Torrent: "${this.torrentInfo.name}" FILE NOT FOUND`); // Only remove torrent - await this.torrentStop(); - await this.torrentRemove(); + this.torrentStop(); + this.torrentRemove(); } else { // Unknown type: no next action this.logger.debug(`Torrent: "${this.torrentInfo.name}" is neither a file or a directory`); @@ -303,12 +302,12 @@ class Torrentclear { /** * Stop torrent command execution. */ - private async torrentStop(): Promise { + private torrentStop(): void { try { const command = `${this.connect} --torrent ${this.torrentInfo.id} --stop`; this.logger.debug(`Stop torrent: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`); this.logger.debug(`Run command: "${command}"`); - let execResultStop: string = await this.command(command); + let execResultStop: string = this.command(command); execResultStop = execResultStop.replace(/(\r\n|\n|\r)/gm, ''); this.logger.debug(`execResultStop: ${execResultStop}`); if (!this.regexSuccess.test(execResultStop)) { @@ -326,12 +325,12 @@ class Torrentclear { * Remove torrent command execution. * DOES NOT DELETE FILES (removes only from the transmission) */ - private async torrentRemove(): Promise { + private torrentRemove(): void { try { const command = `${this.connect} --torrent ${this.torrentInfo.id} --remove`; this.logger.debug(`Remove torrent without deleting file: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`); this.logger.debug(`Run command: "${command}"`); - let execResult: string = await this.command(command); + let execResult: string = this.command(command); execResult = execResult.replace(/(\r\n|\n|\r)/gm, ''); this.logger.debug(`execResultRemove: ${execResult}`); if (!this.regexSuccess.test(execResult)) { @@ -349,12 +348,12 @@ class Torrentclear { * Remove torrent command execution. * DELETES INCLUDING ALL TORRENT FILES */ - private async torrentRemoveAndDelete(): Promise { + private torrentRemoveAndDelete(): void { try { const command = `${this.connect} --torrent ${this.torrentInfo.id} --remove-and-delete`; this.logger.debug(`Remove torrent with deleting file: (${this.torrentInfo.id}) "${this.torrentInfo.name}"`); this.logger.debug(`Run command: "${command}"`); - let execResult: string = await this.command(command); + let execResult: string = this.command(command); execResult = execResult.replace(/(\r\n|\n|\r)/gm, ''); this.logger.debug(`execResultRemoveAndDelete: ${execResult}`); if (!this.regexSuccess.test(execResult)) { @@ -403,11 +402,11 @@ class Torrentclear { * @param {number} id - Torrent ID * @set this `_torrentInfo` - Torrent info object */ - private async getTorrentInfo(id: number): Promise { + private getTorrentInfo(id: number): void { try { const command = `${this.connect} --torrent ${id} --info`; this.logger.debug(`Run command: "${command}"`); - const execResult: string = await this.command(command); + const execResult: string = this.command(command); const matchAll: IterableIterator = execResult.toString().matchAll(this.regexTorrentInfo); const matchArray: RegExpMatchArray[] = Array.from(matchAll); if (matchArray.length < 1) throw new Error(`Torrent info data is EMPTY`); @@ -481,9 +480,9 @@ class Torrentclear { * @param {string} command - Command to a connect * @returns {string} Execution result */ - private async command(command: string): Promise { + private command(command: string): string { try { - return execSync(command, { timeout: 2000, encoding: 'utf8' }); + return execSync(command, { timeout: 2000, encoding: 'utf8' }) as string; } catch (error) { this.logger.trace(error); throw error; @@ -495,7 +494,7 @@ class Torrentclear { * @param {string} path - torrent path * @returns {number} `FILE: 1` torrent is File, `DIR: 2` torrent is Directory, `NOTFOUND: 3`, `UNKNOWN: 4` - not File, not Directory */ - private async isFileOrDirectoryOrUnknown(path: string): Promise { + private isFileOrDirectoryOrUnknown(path: string): number { try { const stat: Stats = lstatSync(path); const isFile: boolean = stat.isFile(); From 0161c12cf1f173e02985ee792d87cb4f83f0170b Mon Sep 17 00:00:00 2001 From: GregoryGost Date: Wed, 27 Nov 2024 16:38:33 +0300 Subject: [PATCH 14/19] more check dist --- .github/workflows/check-dist.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 896f746..f566a16 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -61,9 +61,11 @@ jobs: ls -la ./ exit 1 fi - if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then + if [ "$(git diff --ignore-space-at-eol --ignore-cr-at-eol --text dist/ | wc -l)" -gt "0" ]; then echo "Detected uncommitted changes after build. See status below:" - git diff --stat --ignore-space-at-eol --text dist/ + git diff --stat --ignore-space-at-eol --ignore-cr-at-eol --text dist/ + echo "And git diff --cached:" + git diff --cached --ignore-space-at-eol --ignore-cr-at-eol --text dist/ exit 1 fi From a85749f93be2c476b979798219c16975dd021f31 Mon Sep 17 00:00:00 2001 From: GregoryGost Date: Wed, 27 Nov 2024 16:39:43 +0300 Subject: [PATCH 15/19] check dist --- .github/workflows/check-dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index f566a16..4ac5192 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -65,7 +65,7 @@ jobs: echo "Detected uncommitted changes after build. See status below:" git diff --stat --ignore-space-at-eol --ignore-cr-at-eol --text dist/ echo "And git diff --cached:" - git diff --cached --ignore-space-at-eol --ignore-cr-at-eol --text dist/ + git diff --cached exit 1 fi From 4fd5b4440c113854dc411e4a034c709881685733 Mon Sep 17 00:00:00 2001 From: GregoryGost Date: Wed, 27 Nov 2024 16:44:48 +0300 Subject: [PATCH 16/19] fix git config core filemode --- .github/workflows/check-dist.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 4ac5192..df5eaa3 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -56,16 +56,15 @@ jobs: - name: Compare Directories id: diff run: | + git config core.filemode false if [ ! -d dist/ ]; then echo "Expected dist/ directory does not exist. See status below:" ls -la ./ exit 1 fi - if [ "$(git diff --ignore-space-at-eol --ignore-cr-at-eol --text dist/ | wc -l)" -gt "0" ]; then + if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then echo "Detected uncommitted changes after build. See status below:" - git diff --stat --ignore-space-at-eol --ignore-cr-at-eol --text dist/ - echo "And git diff --cached:" - git diff --cached + git diff --stat --ignore-space-at-eol --text dist/ exit 1 fi From d8af7ec9635724183f967ba7dc88d4c7209136f0 Mon Sep 17 00:00:00 2001 From: GregoryGost Date: Wed, 27 Nov 2024 16:51:51 +0300 Subject: [PATCH 17/19] update readme.md --- .github/workflows/check-dist.yml | 1 + README.md | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index df5eaa3..e338b09 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -56,6 +56,7 @@ jobs: - name: Compare Directories id: diff run: | + echo "Compare Directories" git config core.filemode false if [ ! -d dist/ ]; then echo "Expected dist/ directory does not exist. See status below:" diff --git a/README.md b/README.md index 75f44ed..5eb6a34 100644 --- a/README.md +++ b/README.md @@ -96,15 +96,14 @@ node -v v20.17.0 ``` -Далее создаем папку под приложение, делаем файл исполняемым. Создаем фейковый файл `package.json` (нужно для корректного -определения корневой дирректории и нахождения файла конфигурации) +Далее создаем папку под приложение, скачиваем файлы `index.js` и `package.json`. Делаем файл `index.js` исполняемым. ```shell mkdir /opt/torrentclear cd /opt/torrentclear -wget https://raw.githubusercontent.com/GregoryGost/transmission-torrentclear/refs/heads/main/dist/index.js +wget -O index.js https://raw.githubusercontent.com/GregoryGost/transmission-torrentclear/refs/heads/main/dist/index.js +wget -O package.json https://raw.githubusercontent.com/GregoryGost/transmission-torrentclear/refs/heads/main/package.json chmod +x index.js -echo '{"version":"3.0.2"}' > package.json ``` ### Конфигурирование @@ -214,16 +213,18 @@ bash nodesource_setup.sh apt update && apt upgrade -y ``` -Для обновления можно просто перекачать `index.js` файл +Для обновления можно просто перекачать файлы `index.js` и `package.json` ```shell wget -O index.js https://raw.githubusercontent.com/GregoryGost/transmission-torrentclear/refs/heads/main/dist/index.js +wget -O package.json https://raw.githubusercontent.com/GregoryGost/transmission-torrentclear/refs/heads/main/package.json ``` -Если вы хотите обновить из другой ветки, просто поменяйте её название в пути скачивания +Если вы хотите обновить из другой ветки, просто поменяйте её название в пути скачивания. Пример для ветки `develop` ```shell wget -O index.js https://raw.githubusercontent.com/GregoryGost/transmission-torrentclear/refs/heads/develop/dist/index.js +wget -O package.json https://raw.githubusercontent.com/GregoryGost/transmission-torrentclear/refs/heads/develop/package.json ``` ## Ротация логов From d1108ad874f24bcd8f5314170853c378df1256bf Mon Sep 17 00:00:00 2001 From: GregoryGost Date: Wed, 27 Nov 2024 17:01:41 +0300 Subject: [PATCH 18/19] 3.1.0 up --- README.md | 1 + package.json | 4 ++-- pnpm-lock.yaml | 47 +++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5eb6a34..0d18006 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ История версий: +- v3.1.0 - (27.11.2024) Переход на инструмент сборки бандла TSUP. Изменение config. - v3.0.2 - (04.10.2024) 100% покрытие тестами. Исправление регулярного выражения для получения информации о торрент файле. - v3.0.1 - (29.09.2024) Поддержка актуальности библиотек. diff --git a/package.json b/package.json index dc7d143..8f8ffbb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gregory-gost/transmission-torrentclear", - "version": "3.0.3", + "version": "3.1.0", "description": "Torrent clear script for transmission-daemon service", "license": "GPL-3", "keywords": [ @@ -41,7 +41,7 @@ "@typescript-eslint/eslint-plugin": "8.14.0", "@typescript-eslint/parser": "8.14.0", "eslint": "8.57.1", - "eslint-plugin-github": "5.1.2", + "eslint-plugin-github": "5.1.3", "eslint-plugin-jest": "28.9.0", "eslint-plugin-jsonc": "2.18.2", "eslint-plugin-prettier": "5.2.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5e059c9..79a1cbb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,8 +33,8 @@ importers: specifier: 8.57.1 version: 8.57.1 eslint-plugin-github: - specifier: 5.1.2 - version: 5.1.2(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) + specifier: 5.1.3 + version: 5.1.3(eslint@8.57.1)(typescript@5.7.2) eslint-plugin-jest: specifier: 28.9.0 version: 28.9.0(@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2) @@ -1409,8 +1409,13 @@ packages: peerDependencies: eslint: '>=4.19.1' - eslint-plugin-github@5.1.2: - resolution: {integrity: sha512-8AwCtjp3oyTk7VnqoqhuWyf9OXqO6JMLzBjBogwziohHHVYD8n7elaCmXP5bgsED/3u1B+HgzcicdCsP2UmX5w==} + eslint-plugin-filenames@1.3.2: + resolution: {integrity: sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w==} + peerDependencies: + eslint: '*' + + eslint-plugin-github@5.1.3: + resolution: {integrity: sha512-/0lyEqLLodXW3p+D9eYtmEp6e9DcJmV5FhnE9wNWV1bcqyShuZFXn5kOeJIvxSbFbdbrKiNO8zFiV/VXeSpRSw==} hasBin: true peerDependencies: eslint: ^8 || ^9 @@ -2158,15 +2163,27 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + + lodash.kebabcase@4.1.1: + resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==} + lodash.memoize@4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.snakecase@4.1.1: + resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} + lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + lodash.upperfirst@4.3.1: + resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} + lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -4456,17 +4473,28 @@ snapshots: eslint: 8.57.1 ignore: 5.3.2 - eslint-plugin-github@5.1.2(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2): + eslint-plugin-filenames@1.3.2(eslint@8.57.1): + dependencies: + eslint: 8.57.1 + lodash.camelcase: 4.3.0 + lodash.kebabcase: 4.1.1 + lodash.snakecase: 4.1.1 + lodash.upperfirst: 4.3.1 + + eslint-plugin-github@5.1.3(eslint@8.57.1)(typescript@5.7.2): dependencies: '@eslint/compat': 1.2.3(eslint@8.57.1) '@eslint/eslintrc': 3.2.0 '@eslint/js': 9.15.0 '@github/browserslist-config': 1.0.0 + '@typescript-eslint/eslint-plugin': 8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/parser': 8.14.0(eslint@8.57.1)(typescript@5.7.2) aria-query: 5.3.1 eslint: 8.57.1 eslint-config-prettier: 9.1.0(eslint@8.57.1) eslint-plugin-escompat: 3.11.4(eslint@8.57.1) eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1) + eslint-plugin-filenames: 1.3.2(eslint@8.57.1) eslint-plugin-i18n-text: 1.0.1(eslint@8.57.1) eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1) eslint-plugin-jsx-a11y: 6.10.0(eslint@8.57.1) @@ -4480,7 +4508,6 @@ snapshots: typescript-eslint: 8.16.0(eslint@8.57.1)(typescript@5.7.2) transitivePeerDependencies: - '@types/eslint' - - '@typescript-eslint/parser' - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color @@ -5471,12 +5498,20 @@ snapshots: dependencies: p-locate: 5.0.0 + lodash.camelcase@4.3.0: {} + + lodash.kebabcase@4.1.1: {} + lodash.memoize@4.1.2: {} lodash.merge@4.6.2: {} + lodash.snakecase@4.1.1: {} + lodash.sortby@4.7.0: {} + lodash.upperfirst@4.3.1: {} + lodash@4.17.21: {} log4js@6.9.1: From 84c5ff1878d84ea66dcb3a96000b92912c1e271a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 14:03:34 +0000 Subject: [PATCH 19/19] Bump the development group across 1 directory with 2 updates Bumps the development group with 2 updates in the / directory: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.14.0 to 8.16.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.16.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.14.0 to 8.16.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.16.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development ... Signed-off-by: dependabot[bot] --- package.json | 4 +- pnpm-lock.yaml | 192 ++++++++----------------------------------------- 2 files changed, 32 insertions(+), 164 deletions(-) diff --git a/package.json b/package.json index 8f8ffbb..fe9e05b 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,8 @@ "@types/jest": "29.5.14", "@types/nconf": "0.10.7", "@types/node": "22.10.0", - "@typescript-eslint/eslint-plugin": "8.14.0", - "@typescript-eslint/parser": "8.14.0", + "@typescript-eslint/eslint-plugin": "8.16.0", + "@typescript-eslint/parser": "8.16.0", "eslint": "8.57.1", "eslint-plugin-github": "5.1.3", "eslint-plugin-jest": "28.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 79a1cbb..0e5ec4c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,11 +24,11 @@ importers: specifier: 22.10.0 version: 22.10.0 '@typescript-eslint/eslint-plugin': - specifier: 8.14.0 - version: 8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) + specifier: 8.16.0 + version: 8.16.0(@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) '@typescript-eslint/parser': - specifier: 8.14.0 - version: 8.14.0(eslint@8.57.1)(typescript@5.7.2) + specifier: 8.16.0 + version: 8.16.0(eslint@8.57.1)(typescript@5.7.2) eslint: specifier: 8.57.1 version: 8.57.1 @@ -37,7 +37,7 @@ importers: version: 5.1.3(eslint@8.57.1)(typescript@5.7.2) eslint-plugin-jest: specifier: 28.9.0 - version: 28.9.0(@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2) + version: 28.9.0(@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2) eslint-plugin-jsonc: specifier: 2.18.2 version: 2.18.2(eslint@8.57.1) @@ -412,6 +412,10 @@ packages: resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint/compat@1.2.3': resolution: {integrity: sha512-wlZhwlDFxkxIZ571aH0FoK4h4Vwx7P3HJx62Gp8hTc10bfpwT2x0nULuAHmQSJBOWPgPeVf+9YtnD4j50zVHmA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -722,17 +726,6 @@ packages: '@types/yargs@17.0.32': resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} - '@typescript-eslint/eslint-plugin@8.14.0': - resolution: {integrity: sha512-tqp8H7UWFaZj0yNO6bycd5YjMwxa6wIHOLZvWPkidwbgLCsBMetQoGj7DPuAlWa2yGO3H48xmPwjhsSPPCGU5w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/eslint-plugin@8.16.0': resolution: {integrity: sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -754,16 +747,6 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.14.0': - resolution: {integrity: sha512-2p82Yn9juUJq0XynBXtFCyrBDb6/dJombnz6vbo6mgQEtWHfvHbQuEa9kAOVIt1c9YFwi7H6WxtPj1kg+80+RA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/parser@8.16.0': resolution: {integrity: sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -782,23 +765,10 @@ packages: resolution: {integrity: sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.14.0': - resolution: {integrity: sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.16.0': resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.14.0': - resolution: {integrity: sha512-Xcz9qOtZuGusVOH5Uk07NGs39wrKkf3AxlkK79RBK6aJC1l03CobXjJbwBPSidetAOV+5rEVuiT1VSBUOAsanQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/type-utils@8.16.0': resolution: {integrity: sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -817,10 +787,6 @@ packages: resolution: {integrity: sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.14.0': - resolution: {integrity: sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.16.0': resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -843,15 +809,6 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.14.0': - resolution: {integrity: sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.16.0': resolution: {integrity: sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -867,12 +824,6 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.14.0': - resolution: {integrity: sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.16.0': resolution: {integrity: sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -891,10 +842,6 @@ packages: resolution: {integrity: sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.14.0': - resolution: {integrity: sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.16.0': resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2745,8 +2692,8 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true - ts-api-utils@1.4.0: - resolution: {integrity: sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==} + ts-api-utils@1.4.2: + resolution: {integrity: sha512-ZF5gQIQa/UmzfvxbHZI3JXN0/Jt+vnAfAviNRAMc491laiK6YCLpCW9ft8oaCRFOTxCZtUTE6XB0ZQAe3olntw==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' @@ -3242,6 +3189,8 @@ snapshots: '@eslint-community/regexpp@4.11.1': {} + '@eslint-community/regexpp@4.12.1': {} + '@eslint/compat@1.2.3(eslint@8.57.1)': optionalDependencies: eslint: 8.57.1 @@ -3633,27 +3582,9 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2)': - dependencies: - '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.14.0(eslint@8.57.1)(typescript@5.7.2) - '@typescript-eslint/scope-manager': 8.14.0 - '@typescript-eslint/type-utils': 8.14.0(eslint@8.57.1)(typescript@5.7.2) - '@typescript-eslint/utils': 8.14.0(eslint@8.57.1)(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.14.0 - eslint: 8.57.1 - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 1.4.0(typescript@5.7.2) - optionalDependencies: - typescript: 5.7.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2)': dependencies: - '@eslint-community/regexpp': 4.11.1 + '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 8.16.0(eslint@8.57.1)(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.16.0 '@typescript-eslint/type-utils': 8.16.0(eslint@8.57.1)(typescript@5.7.2) @@ -3663,7 +3594,7 @@ snapshots: graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.4.0(typescript@5.7.2) + ts-api-utils: 1.4.2(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -3682,19 +3613,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2)': - dependencies: - '@typescript-eslint/scope-manager': 8.14.0 - '@typescript-eslint/types': 8.14.0 - '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.14.0 - debug: 4.3.7 - eslint: 8.57.1 - optionalDependencies: - typescript: 5.7.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@typescript-eslint/scope-manager': 8.16.0 @@ -3718,35 +3636,18 @@ snapshots: '@typescript-eslint/types': 8.13.0 '@typescript-eslint/visitor-keys': 8.13.0 - '@typescript-eslint/scope-manager@8.14.0': - dependencies: - '@typescript-eslint/types': 8.14.0 - '@typescript-eslint/visitor-keys': 8.14.0 - '@typescript-eslint/scope-manager@8.16.0': dependencies: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/visitor-keys': 8.16.0 - '@typescript-eslint/type-utils@8.14.0(eslint@8.57.1)(typescript@5.7.2)': - dependencies: - '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.7.2) - '@typescript-eslint/utils': 8.14.0(eslint@8.57.1)(typescript@5.7.2) - debug: 4.3.7 - ts-api-utils: 1.4.0(typescript@5.7.2) - optionalDependencies: - typescript: 5.7.2 - transitivePeerDependencies: - - eslint - - supports-color - '@typescript-eslint/type-utils@8.16.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) '@typescript-eslint/utils': 8.16.0(eslint@8.57.1)(typescript@5.7.2) debug: 4.3.7 eslint: 8.57.1 - ts-api-utils: 1.4.0(typescript@5.7.2) + ts-api-utils: 1.4.2(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -3756,8 +3657,6 @@ snapshots: '@typescript-eslint/types@8.13.0': {} - '@typescript-eslint/types@8.14.0': {} - '@typescript-eslint/types@8.16.0': {} '@typescript-eslint/typescript-estree@6.21.0(typescript@5.7.2)': @@ -3769,7 +3668,7 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.7.2) + ts-api-utils: 1.4.2(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -3784,22 +3683,7 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.7.2) - optionalDependencies: - typescript: 5.7.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/typescript-estree@8.14.0(typescript@5.7.2)': - dependencies: - '@typescript-eslint/types': 8.14.0 - '@typescript-eslint/visitor-keys': 8.14.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.7.2) + ts-api-utils: 1.4.2(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -3814,7 +3698,7 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.7.2) + ts-api-utils: 1.4.2(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -3831,17 +3715,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.14.0(eslint@8.57.1)(typescript@5.7.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) - '@typescript-eslint/scope-manager': 8.14.0 - '@typescript-eslint/types': 8.14.0 - '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.7.2) - eslint: 8.57.1 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.16.0(eslint@8.57.1)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) @@ -3864,11 +3737,6 @@ snapshots: '@typescript-eslint/types': 8.13.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.14.0': - dependencies: - '@typescript-eslint/types': 8.14.0 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.16.0': dependencies: '@typescript-eslint/types': 8.16.0 @@ -4452,11 +4320,11 @@ snapshots: esquery: 1.6.0 jsonc-eslint-parser: 2.4.0 - eslint-module-utils@2.11.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): + eslint-module-utils@2.11.0(@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.14.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/parser': 8.16.0(eslint@8.57.1)(typescript@5.7.2) eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: @@ -4487,8 +4355,8 @@ snapshots: '@eslint/eslintrc': 3.2.0 '@eslint/js': 9.15.0 '@github/browserslist-config': 1.0.0 - '@typescript-eslint/eslint-plugin': 8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) - '@typescript-eslint/parser': 8.14.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/parser': 8.16.0(eslint@8.57.1)(typescript@5.7.2) aria-query: 5.3.1 eslint: 8.57.1 eslint-config-prettier: 9.1.0(eslint@8.57.1) @@ -4496,7 +4364,7 @@ snapshots: eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.1) eslint-plugin-filenames: 1.3.2(eslint@8.57.1) eslint-plugin-i18n-text: 1.0.1(eslint@8.57.1) - eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1) + eslint-plugin-import: 2.30.0(@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1) eslint-plugin-jsx-a11y: 6.10.0(eslint@8.57.1) eslint-plugin-no-only-tests: 3.3.0 eslint-plugin-prettier: 5.2.1(eslint-config-prettier@9.1.0(eslint@8.57.1))(eslint@8.57.1)(prettier@3.4.1) @@ -4517,7 +4385,7 @@ snapshots: dependencies: eslint: 8.57.1 - eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1): + eslint-plugin-import@2.30.0(@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.8 @@ -4528,7 +4396,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) + eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -4539,18 +4407,18 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.14.0(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/parser': 8.16.0(eslint@8.57.1)(typescript@5.7.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2): + eslint-plugin-jest@28.9.0(@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(jest@29.7.0(@types/node@22.10.0))(typescript@5.7.2): dependencies: '@typescript-eslint/utils': 8.13.0(eslint@8.57.1)(typescript@5.7.2) eslint: 8.57.1 optionalDependencies: - '@typescript-eslint/eslint-plugin': 8.14.0(@typescript-eslint/parser@8.14.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) + '@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) jest: 29.7.0(@types/node@22.10.0) transitivePeerDependencies: - supports-color @@ -6073,7 +5941,7 @@ snapshots: tree-kill@1.2.2: {} - ts-api-utils@1.4.0(typescript@5.7.2): + ts-api-utils@1.4.2(typescript@5.7.2): dependencies: typescript: 5.7.2