@rushstack/lockfile-explorer 2.1.7 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.json +38 -0
  2. package/CHANGELOG.md +15 -1
  3. package/bin/lockfile-explorer +1 -1
  4. package/bin/lockfile-lint +1 -1
  5. package/dist/app.488eeffc8a0c899a054c.css +1 -0
  6. package/dist/app.55bea5774c40f4ed1bf2.js +1 -0
  7. package/dist/index.html +1 -1
  8. package/dist/rush-themed-ui.js +2 -2
  9. package/lib-esm/assets/lint-init/lockfile-lint-template.json +42 -0
  10. package/lib-esm/cli/explorer/ExplorerCommandLineParser.js +204 -0
  11. package/lib-esm/cli/explorer/ExplorerCommandLineParser.js.map +1 -0
  12. package/lib-esm/cli/lint/LintCommandLineParser.js +31 -0
  13. package/lib-esm/cli/lint/LintCommandLineParser.js.map +1 -0
  14. package/lib-esm/cli/lint/actions/CheckAction.js +138 -0
  15. package/lib-esm/cli/lint/actions/CheckAction.js.map +1 -0
  16. package/lib-esm/cli/lint/actions/InitAction.js +38 -0
  17. package/lib-esm/cli/lint/actions/InitAction.js.map +1 -0
  18. package/lib-esm/constants/common.js +5 -0
  19. package/lib-esm/constants/common.js.map +1 -0
  20. package/lib-esm/graph/IPnpmfileModule.js +4 -0
  21. package/lib-esm/graph/IPnpmfileModule.js.map +1 -0
  22. package/lib-esm/graph/PnpmfileRunner.js +86 -0
  23. package/lib-esm/graph/PnpmfileRunner.js.map +1 -0
  24. package/lib-esm/graph/lfxGraphLoader.js +459 -0
  25. package/lib-esm/graph/lfxGraphLoader.js.map +1 -0
  26. package/lib-esm/graph/lockfilePath.js +117 -0
  27. package/lib-esm/graph/lockfilePath.js.map +1 -0
  28. package/lib-esm/graph/pnpmfileRunnerWorkerThread.js +59 -0
  29. package/lib-esm/graph/pnpmfileRunnerWorkerThread.js.map +1 -0
  30. package/lib-esm/schemas/lockfile-lint.schema.json +45 -0
  31. package/lib-esm/start-explorer.js +6 -0
  32. package/lib-esm/start-explorer.js.map +1 -0
  33. package/lib-esm/start-lint.js +6 -0
  34. package/lib-esm/start-lint.js.map +1 -0
  35. package/lib-esm/state/index.js +4 -0
  36. package/lib-esm/state/index.js.map +1 -0
  37. package/lib-esm/utils/init.js +77 -0
  38. package/lib-esm/utils/init.js.map +1 -0
  39. package/lib-esm/utils/shrinkwrap.js +44 -0
  40. package/lib-esm/utils/shrinkwrap.js.map +1 -0
  41. package/package.json +30 -8
  42. package/dist/app.c67214284d4725ea5913.js +0 -1
  43. package/dist/app.e74e7004c99e392a3c70.css +0 -1
  44. package/dist/initappcontext.js +0 -14
  45. /package/{lib → lib-commonjs}/assets/lint-init/lockfile-lint-template.json +0 -0
  46. /package/{lib → lib-commonjs}/cli/explorer/ExplorerCommandLineParser.js +0 -0
  47. /package/{lib → lib-commonjs}/cli/explorer/ExplorerCommandLineParser.js.map +0 -0
  48. /package/{lib → lib-commonjs}/cli/lint/LintCommandLineParser.js +0 -0
  49. /package/{lib → lib-commonjs}/cli/lint/LintCommandLineParser.js.map +0 -0
  50. /package/{lib → lib-commonjs}/cli/lint/actions/CheckAction.js +0 -0
  51. /package/{lib → lib-commonjs}/cli/lint/actions/CheckAction.js.map +0 -0
  52. /package/{lib → lib-commonjs}/cli/lint/actions/InitAction.js +0 -0
  53. /package/{lib → lib-commonjs}/cli/lint/actions/InitAction.js.map +0 -0
  54. /package/{lib → lib-commonjs}/constants/common.js +0 -0
  55. /package/{lib → lib-commonjs}/constants/common.js.map +0 -0
  56. /package/{lib → lib-commonjs}/graph/IPnpmfileModule.js +0 -0
  57. /package/{lib → lib-commonjs}/graph/IPnpmfileModule.js.map +0 -0
  58. /package/{lib → lib-commonjs}/graph/PnpmfileRunner.js +0 -0
  59. /package/{lib → lib-commonjs}/graph/PnpmfileRunner.js.map +0 -0
  60. /package/{lib → lib-commonjs}/graph/lfxGraphLoader.js +0 -0
  61. /package/{lib → lib-commonjs}/graph/lfxGraphLoader.js.map +0 -0
  62. /package/{lib → lib-commonjs}/graph/lockfilePath.js +0 -0
  63. /package/{lib → lib-commonjs}/graph/lockfilePath.js.map +0 -0
  64. /package/{lib → lib-commonjs}/graph/pnpmfileRunnerWorkerThread.js +0 -0
  65. /package/{lib → lib-commonjs}/graph/pnpmfileRunnerWorkerThread.js.map +0 -0
  66. /package/{lib → lib-commonjs}/schemas/lockfile-lint.schema.json +0 -0
  67. /package/{lib → lib-commonjs}/start-explorer.js +0 -0
  68. /package/{lib → lib-commonjs}/start-explorer.js.map +0 -0
  69. /package/{lib → lib-commonjs}/start-lint.js +0 -0
  70. /package/{lib → lib-commonjs}/start-lint.js.map +0 -0
  71. /package/{lib → lib-commonjs}/state/index.js +0 -0
  72. /package/{lib → lib-commonjs}/state/index.js.map +0 -0
  73. /package/{lib → lib-commonjs}/utils/init.js +0 -0
  74. /package/{lib → lib-commonjs}/utils/init.js.map +0 -0
  75. /package/{lib → lib-commonjs}/utils/shrinkwrap.js +0 -0
  76. /package/{lib → lib-commonjs}/utils/shrinkwrap.js.map +0 -0
  77. /package/{lib → lib-dts}/cli/explorer/ExplorerCommandLineParser.d.ts +0 -0
  78. /package/{lib → lib-dts}/cli/explorer/ExplorerCommandLineParser.d.ts.map +0 -0
  79. /package/{lib → lib-dts}/cli/lint/LintCommandLineParser.d.ts +0 -0
  80. /package/{lib → lib-dts}/cli/lint/LintCommandLineParser.d.ts.map +0 -0
  81. /package/{lib → lib-dts}/cli/lint/actions/CheckAction.d.ts +0 -0
  82. /package/{lib → lib-dts}/cli/lint/actions/CheckAction.d.ts.map +0 -0
  83. /package/{lib → lib-dts}/cli/lint/actions/InitAction.d.ts +0 -0
  84. /package/{lib → lib-dts}/cli/lint/actions/InitAction.d.ts.map +0 -0
  85. /package/{lib → lib-dts}/constants/common.d.ts +0 -0
  86. /package/{lib → lib-dts}/constants/common.d.ts.map +0 -0
  87. /package/{lib → lib-dts}/graph/IPnpmfileModule.d.ts +0 -0
  88. /package/{lib → lib-dts}/graph/IPnpmfileModule.d.ts.map +0 -0
  89. /package/{lib → lib-dts}/graph/PnpmfileRunner.d.ts +0 -0
  90. /package/{lib → lib-dts}/graph/PnpmfileRunner.d.ts.map +0 -0
  91. /package/{lib → lib-dts}/graph/lfxGraphLoader.d.ts +0 -0
  92. /package/{lib → lib-dts}/graph/lfxGraphLoader.d.ts.map +0 -0
  93. /package/{lib → lib-dts}/graph/lockfilePath.d.ts +0 -0
  94. /package/{lib → lib-dts}/graph/lockfilePath.d.ts.map +0 -0
  95. /package/{lib → lib-dts}/graph/pnpmfileRunnerWorkerThread.d.ts +0 -0
  96. /package/{lib → lib-dts}/graph/pnpmfileRunnerWorkerThread.d.ts.map +0 -0
  97. /package/{lib → lib-dts}/start-explorer.d.ts +0 -0
  98. /package/{lib → lib-dts}/start-explorer.d.ts.map +0 -0
  99. /package/{lib → lib-dts}/start-lint.d.ts +0 -0
  100. /package/{lib → lib-dts}/start-lint.d.ts.map +0 -0
  101. /package/{lib → lib-dts}/state/index.d.ts +0 -0
  102. /package/{lib → lib-dts}/state/index.d.ts.map +0 -0
  103. /package/{lib → lib-dts}/utils/init.d.ts +0 -0
  104. /package/{lib → lib-dts}/utils/init.d.ts.map +0 -0
  105. /package/{lib → lib-dts}/utils/shrinkwrap.d.ts +0 -0
  106. /package/{lib → lib-dts}/utils/shrinkwrap.d.ts.map +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lockfilePath.js","sourceRoot":"","sources":["../../src/graph/lockfilePath.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/**\n * For example, retrieves `d` from `/a/b/c/d`.\n */\nexport function getBaseNameOf(importerPath: string): string {\n if (importerPath.length === 0) {\n return '';\n }\n\n const index: number = importerPath.lastIndexOf('/');\n if (index === importerPath.length - 1) {\n throw new Error('Error: Path has a trailing slash');\n }\n if (index >= 0) {\n return importerPath.substring(index + 1);\n }\n return importerPath;\n}\n\n/**\n * For example, retrieves `/a/b/c` from `/a/b/c/d`.\n */\nexport function getParentOf(importerPath: string): string {\n if (importerPath === '' || importerPath === '.' || importerPath === '/') {\n throw new Error('Error: Path has no parent');\n }\n\n const index: number = importerPath.lastIndexOf('/');\n if (index === importerPath.length - 1) {\n throw new Error('Error: Path has a trailing slash');\n }\n if (index === 0) {\n return '/';\n }\n if (index < 0) {\n return '.';\n }\n return importerPath.substring(0, index);\n}\n\n/**\n * Cheaply resolves a relative path against a base path, assuming the paths are delimited by `/`,\n * and assuming the basePath is already in normal form. An error occurs if the relative path\n * goes above the root folder.\n *\n * @example\n * ```ts\n * getAbsolutePath(`a/b/c`, `d/e`) === `a/b/c/d/e`\n * getAbsolutePath(`/a/b/c`, `d/e`) === `/a/b/c/d/e`\n * getAbsolutePath(`/a/b/c`, `/d/e`) === `/d/e`\n * getAbsolutePath(`a/b/c`, `../../f`) === `a/f`\n * getAbsolutePath(`a/b/c`, `.././/f`) === `a/b/f`\n * getAbsolutePath(`a/b/c`, `../../..`) === `.`\n * getAbsolutePath(`C:/a/b`, `../d`) === `C:/a/d`\n * getAbsolutePath(`a/b/c`, `../../../..`) === ERROR\n *\n * // Degenerate cases:\n * getAbsolutePath(`a/b/c/`, `d/`) === `a/b/c/d` // trailing slashes are discarded\n * getAbsolutePath(`./../c`, `d`) === `./../c/d` // basePath assumed to be normal form\n * getAbsolutePath(`C:\\\\`, `\\\\a`) === `C:\\\\/\\\\a` // backslashes not supported\n * ```\n */\nexport function getAbsolute(basePath: string, relativePath: string): string {\n let leadingSlash: boolean;\n let stack: string[];\n\n // Discard intermediary slashes\n const relativeParts: string[] = relativePath.split('/').filter((part: string) => part.length > 0);\n if (relativePath.startsWith('/')) {\n stack = [];\n leadingSlash = true;\n } else {\n // Discard intermediary slashes\n stack = basePath.split('/').filter((part: string) => part.length > 0);\n leadingSlash = basePath.startsWith('/');\n }\n\n for (const part of relativeParts) {\n if (part === '.') {\n // current directory, do nothing\n continue;\n } else if (part === '..') {\n if (stack.length === 0) {\n throw new Error('getAbsolutePath(): relativePath goes above the root folder');\n }\n stack.pop();\n } else {\n stack.push(part);\n }\n }\n if (leadingSlash) {\n return '/' + stack.join('/');\n } else {\n return stack.length === 0 ? '.' : stack.join('/');\n }\n}\n\n/**\n * Returns the two parts joined by exactly one `/`, assuming the parts are already\n * in normalized form. The `/` is not added if either part is an empty string.\n */\nexport function join(leftPart: string, rightPart: string): string {\n if (leftPart.length === 0) {\n return rightPart;\n }\n if (rightPart.length === 0) {\n return leftPart;\n }\n\n const leftEndsWithSlash: boolean = leftPart[leftPart.length - 1] === '/';\n const rightStartsWithSlash: boolean = rightPart[0] === '/';\n\n if (leftEndsWithSlash && rightStartsWithSlash) {\n return leftPart + rightPart.substring(1);\n }\n if (leftEndsWithSlash || rightStartsWithSlash) {\n return leftPart + rightPart;\n }\n return leftPart + '/' + rightPart;\n}\n"]}
@@ -0,0 +1,59 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ import { parentPort, workerData } from 'node:worker_threads';
4
+ import * as path from 'node:path';
5
+ // debugger;
6
+ const { pnpmfilePath } = workerData;
7
+ const resolvedPath = path.resolve(pnpmfilePath);
8
+ let pnpmfileModule = undefined;
9
+ let pnpmfileModuleError = undefined;
10
+ try {
11
+ pnpmfileModule = require(resolvedPath);
12
+ }
13
+ catch (error) {
14
+ pnpmfileModuleError = error;
15
+ }
16
+ // eslint-disable-next-line @rushstack/no-new-null
17
+ const threadParentPort = parentPort;
18
+ if (!threadParentPort) {
19
+ throw new Error('Not running in a worker thread');
20
+ }
21
+ threadParentPort.on('message', async (message) => {
22
+ const { id, packageJson } = message;
23
+ if (pnpmfileModuleError) {
24
+ threadParentPort.postMessage({
25
+ kind: 'error',
26
+ id,
27
+ error: pnpmfileModuleError.message
28
+ });
29
+ return;
30
+ }
31
+ try {
32
+ if (!pnpmfileModule || !pnpmfileModule.hooks || typeof pnpmfileModule.hooks.readPackage !== 'function') {
33
+ // No transformation needed
34
+ threadParentPort.postMessage({
35
+ kind: 'return',
36
+ id,
37
+ result: packageJson
38
+ });
39
+ return;
40
+ }
41
+ const pnpmContext = {
42
+ log: (logMessage) => threadParentPort.postMessage({
43
+ kind: 'log',
44
+ id,
45
+ log: logMessage
46
+ })
47
+ };
48
+ const result = await pnpmfileModule.hooks.readPackage({ ...packageJson }, pnpmContext);
49
+ threadParentPort.postMessage({ kind: 'return', id, result });
50
+ }
51
+ catch (e) {
52
+ threadParentPort.postMessage({
53
+ kind: 'error',
54
+ id,
55
+ error: e.message
56
+ });
57
+ }
58
+ });
59
+ //# sourceMappingURL=pnpmfileRunnerWorkerThread.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pnpmfileRunnerWorkerThread.js","sourceRoot":"","sources":["../../src/graph/pnpmfileRunnerWorkerThread.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,UAAU,EAAE,UAAU,EAAoB,MAAM,qBAAqB,CAAC;AAC/E,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AA6BlC,YAAY;AAEZ,MAAM,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC;AACpC,MAAM,YAAY,GAAW,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;AAExD,IAAI,cAAc,GAAgC,SAAS,CAAC;AAC5D,IAAI,mBAAmB,GAAsB,SAAS,CAAC;AAEvD,IAAI,CAAC;IACH,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACzC,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,mBAAmB,GAAG,KAAK,CAAC;AAC9B,CAAC;AAED,kDAAkD;AAClD,MAAM,gBAAgB,GAAuB,UAAU,CAAC;AAExD,IAAI,CAAC,gBAAgB,EAAE,CAAC;IACtB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;AACpD,CAAC;AAED,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,OAAwB,EAAE,EAAE;IAChE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAEpC,IAAI,mBAAmB,EAAE,CAAC;QACxB,gBAAgB,CAAC,WAAW,CAAC;YAC3B,IAAI,EAAE,OAAO;YACb,EAAE;YACF,KAAK,EAAE,mBAAmB,CAAC,OAAO;SACH,CAAC,CAAC;QACnC,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,KAAK,IAAI,OAAO,cAAc,CAAC,KAAK,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;YACvG,2BAA2B;YAC3B,gBAAgB,CAAC,WAAW,CAAC;gBAC3B,IAAI,EAAE,QAAQ;gBACd,EAAE;gBACF,MAAM,EAAE,WAAW;aACa,CAAC,CAAC;YACpC,OAAO;QACT,CAAC;QAED,MAAM,WAAW,GAAwB;YACvC,GAAG,EAAE,CAAC,UAAU,EAAE,EAAE,CAClB,gBAAgB,CAAC,WAAW,CAAC;gBAC3B,IAAI,EAAE,KAAK;gBACX,EAAE;gBACF,GAAG,EAAE,UAAU;aACc,CAAC;SACnC,CAAC;QAEF,MAAM,MAAM,GAAiB,MAAM,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,EAAE,EAAE,WAAW,CAAC,CAAC;QAErG,gBAAgB,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAmC,CAAC,CAAC;IAChG,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,gBAAgB,CAAC,WAAW,CAAC;YAC3B,IAAI,EAAE,OAAO;YACb,EAAE;YACF,KAAK,EAAG,CAAW,CAAC,OAAO;SACI,CAAC,CAAC;IACrC,CAAC;AACH,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { parentPort, workerData, type MessagePort } from 'node:worker_threads';\nimport * as path from 'node:path';\n\nimport type { IPackageJson } from '@rushstack/node-core-library';\n\nimport type { IPnpmfileModule, IReadPackageContext } from './IPnpmfileModule';\n\nexport interface IRequestMessage {\n id: number;\n packageJson: IPackageJson;\n packageJsonFullPath: string;\n}\n\nexport interface IResponseMessageLog {\n kind: 'log';\n id: number;\n log: string;\n}\nexport interface IResponseMessageError {\n kind: 'error';\n id: number;\n error: string;\n}\nexport interface IResponseMessageReturn {\n kind: 'return';\n id: number;\n result?: unknown;\n}\nexport type ResponseMessage = IResponseMessageLog | IResponseMessageError | IResponseMessageReturn;\n\n// debugger;\n\nconst { pnpmfilePath } = workerData;\nconst resolvedPath: string = path.resolve(pnpmfilePath);\n\nlet pnpmfileModule: IPnpmfileModule | undefined = undefined;\nlet pnpmfileModuleError: Error | undefined = undefined;\n\ntry {\n pnpmfileModule = require(resolvedPath);\n} catch (error) {\n pnpmfileModuleError = error;\n}\n\n// eslint-disable-next-line @rushstack/no-new-null\nconst threadParentPort: null | MessagePort = parentPort;\n\nif (!threadParentPort) {\n throw new Error('Not running in a worker thread');\n}\n\nthreadParentPort.on('message', async (message: IRequestMessage) => {\n const { id, packageJson } = message;\n\n if (pnpmfileModuleError) {\n threadParentPort.postMessage({\n kind: 'error',\n id,\n error: pnpmfileModuleError.message\n } satisfies IResponseMessageError);\n return;\n }\n\n try {\n if (!pnpmfileModule || !pnpmfileModule.hooks || typeof pnpmfileModule.hooks.readPackage !== 'function') {\n // No transformation needed\n threadParentPort.postMessage({\n kind: 'return',\n id,\n result: packageJson\n } satisfies IResponseMessageReturn);\n return;\n }\n\n const pnpmContext: IReadPackageContext = {\n log: (logMessage) =>\n threadParentPort.postMessage({\n kind: 'log',\n id,\n log: logMessage\n } satisfies IResponseMessageLog)\n };\n\n const result: IPackageJson = await pnpmfileModule.hooks.readPackage({ ...packageJson }, pnpmContext);\n\n threadParentPort.postMessage({ kind: 'return', id, result } satisfies IResponseMessageReturn);\n } catch (e) {\n threadParentPort.postMessage({\n kind: 'error',\n id,\n error: (e as Error).message\n } satisfies IResponseMessageError);\n }\n});\n"]}
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "title": "Lockfile Lint Configuration",
4
+ "description": "The lockfile-explorer.json configuration file for lockfile-lint tool.",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "$schema": {
9
+ "description": "Part of the JSON Schema standard, this optional keyword declares the URL of the schema that the file conforms to. Editors may download the schema and use it to perform syntax highlighting.",
10
+ "type": "string"
11
+ },
12
+ "rules": {
13
+ "description": "The rules adopted by Monorepo and the lockfile-lint will help to check.",
14
+ "type": "array",
15
+ "items": {
16
+ "type": "object",
17
+ "oneOf": [
18
+ {
19
+ "type": "object",
20
+ "required": ["rule", "project", "requiredVersions"],
21
+ "properties": {
22
+ "rule": {
23
+ "description": "Rule name applied to the project.",
24
+ "const": "restrict-versions"
25
+ },
26
+ "project": {
27
+ "description": "Project name.",
28
+ "type": "string"
29
+ },
30
+ "requiredVersions": {
31
+ "description": "List of restrict dependency version.",
32
+ "type": "object",
33
+ "patternProperties": {
34
+ ".*": {
35
+ "type": "string"
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ ]
42
+ }
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,6 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ import { ExplorerCommandLineParser } from './cli/explorer/ExplorerCommandLineParser';
4
+ const parser = new ExplorerCommandLineParser();
5
+ parser.executeAsync().catch(console.error); // CommandLineParser.executeAsync() should never reject the promise
6
+ //# sourceMappingURL=start-explorer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-explorer.js","sourceRoot":"","sources":["../src/start-explorer.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAErF,MAAM,MAAM,GAA8B,IAAI,yBAAyB,EAAE,CAAC;AAE1E,MAAM,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,mEAAmE","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { ExplorerCommandLineParser } from './cli/explorer/ExplorerCommandLineParser';\n\nconst parser: ExplorerCommandLineParser = new ExplorerCommandLineParser();\n\nparser.executeAsync().catch(console.error); // CommandLineParser.executeAsync() should never reject the promise\n"]}
@@ -0,0 +1,6 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ import { LintCommandLineParser } from './cli/lint/LintCommandLineParser';
4
+ const parser = new LintCommandLineParser();
5
+ parser.executeAsync().catch(console.error); // CommandLineParser.executeAsync() should never reject the promise
6
+ //# sourceMappingURL=start-lint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-lint.js","sourceRoot":"","sources":["../src/start-lint.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,MAAM,MAAM,GAA0B,IAAI,qBAAqB,EAAE,CAAC;AAElE,MAAM,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,mEAAmE","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { LintCommandLineParser } from './cli/lint/LintCommandLineParser';\n\nconst parser: LintCommandLineParser = new LintCommandLineParser();\n\nparser.executeAsync().catch(console.error); // CommandLineParser.executeAsync() should never reject the promise\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ export {};
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type { IJsonLfxWorkspace } from '../../build/lfx-shared';\n\nexport interface IAppState {\n lockfileExplorerProjectRoot: string;\n currentWorkingDirectory: string;\n projectRoot: string;\n pnpmLockfileLocation: string;\n pnpmfileLocation: string;\n appVersion: string;\n debugMode: boolean;\n lfxWorkspace: IJsonLfxWorkspace;\n}\n"]}
@@ -0,0 +1,77 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ // This function will read the current directory and try to figure out if it's a rush project or regular pnpm workspace
4
+ // Currently it will throw error if neither can be determined
5
+ import path from 'node:path';
6
+ import { FileSystem, Path } from '@rushstack/node-core-library';
7
+ import { RushConfiguration } from '@microsoft/rush-lib/lib/api/RushConfiguration';
8
+ import * as lockfilePath from '../graph/lockfilePath';
9
+ export const init = (options) => {
10
+ const { lockfileExplorerProjectRoot, appVersion, debugMode, subspaceName } = options;
11
+ const currentWorkingDirectory = path.resolve(process.cwd());
12
+ let appState;
13
+ let currentFolder = Path.convertToSlashes(currentWorkingDirectory);
14
+ while (currentFolder.includes('/')) {
15
+ // Look for a rush.json [rush project] or pnpm-lock.yaml file [regular pnpm workspace]
16
+ const rushJsonPath = currentFolder + '/rush.json';
17
+ const pnpmLockPath = currentFolder + '/pnpm-lock.yaml';
18
+ if (FileSystem.exists(rushJsonPath)) {
19
+ console.log('Found a Rush workspace: ', rushJsonPath);
20
+ const rushConfiguration = RushConfiguration.loadFromConfigurationFile(rushJsonPath);
21
+ const subspace = rushConfiguration.getSubspace(subspaceName);
22
+ const commonTempFolder = subspace.getSubspaceTempFolderPath();
23
+ const pnpmLockfileAbsolutePath = path.join(commonTempFolder, 'pnpm-lock.yaml');
24
+ const relativeCommonTempFolder = Path.convertToSlashes(path.relative(currentFolder, subspace.getSubspaceTempFolderPath()));
25
+ const pnpmLockfileRelativePath = lockfilePath.join(relativeCommonTempFolder, 'pnpm-lock.yaml');
26
+ const pnpmFileRelativePath = lockfilePath.join(relativeCommonTempFolder, '.pnpmfile.cjs');
27
+ const relativeCommonConfigFolder = Path.convertToSlashes(path.relative(currentFolder, subspace.getSubspaceConfigFolderPath()));
28
+ const rushPnpmFileRelativePath = lockfilePath.join(relativeCommonConfigFolder, '.pnpmfile.cjs');
29
+ appState = {
30
+ currentWorkingDirectory,
31
+ appVersion,
32
+ debugMode,
33
+ lockfileExplorerProjectRoot,
34
+ pnpmLockfileLocation: pnpmLockfileAbsolutePath,
35
+ pnpmfileLocation: commonTempFolder + '/.pnpmfile.cjs',
36
+ projectRoot: currentFolder,
37
+ lfxWorkspace: {
38
+ workspaceRootFullPath: currentFolder,
39
+ pnpmLockfilePath: Path.convertToSlashes(pnpmLockfileRelativePath),
40
+ pnpmLockfileFolder: Path.convertToSlashes(path.dirname(pnpmLockfileRelativePath)),
41
+ pnpmfilePath: Path.convertToSlashes(pnpmFileRelativePath),
42
+ rushConfig: {
43
+ rushVersion: rushConfiguration.rushConfigurationJson.rushVersion,
44
+ subspaceName: subspaceName !== null && subspaceName !== void 0 ? subspaceName : '',
45
+ rushPnpmfilePath: rushPnpmFileRelativePath
46
+ }
47
+ }
48
+ };
49
+ break;
50
+ }
51
+ else if (FileSystem.exists(pnpmLockPath)) {
52
+ appState = {
53
+ currentWorkingDirectory,
54
+ appVersion,
55
+ debugMode,
56
+ lockfileExplorerProjectRoot,
57
+ pnpmLockfileLocation: currentFolder + '/pnpm-lock.yaml',
58
+ pnpmfileLocation: currentFolder + '/.pnpmfile.cjs',
59
+ projectRoot: currentFolder,
60
+ lfxWorkspace: {
61
+ workspaceRootFullPath: currentFolder,
62
+ pnpmLockfilePath: Path.convertToSlashes(path.relative(currentFolder, pnpmLockPath)),
63
+ pnpmLockfileFolder: '',
64
+ pnpmfilePath: '.pnpmfile.cjs',
65
+ rushConfig: undefined
66
+ }
67
+ };
68
+ break;
69
+ }
70
+ currentFolder = currentFolder.substring(0, currentFolder.lastIndexOf('/'));
71
+ }
72
+ if (!appState) {
73
+ throw new Error('Could not find a Rush or PNPM workspace!');
74
+ }
75
+ return appState;
76
+ };
77
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/utils/init.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n// This function will read the current directory and try to figure out if it's a rush project or regular pnpm workspace\n// Currently it will throw error if neither can be determined\n\nimport path from 'node:path';\n\nimport { FileSystem, Path } from '@rushstack/node-core-library';\nimport { RushConfiguration } from '@microsoft/rush-lib/lib/api/RushConfiguration';\nimport type { Subspace } from '@microsoft/rush-lib/lib/api/Subspace';\n\nimport * as lockfilePath from '../graph/lockfilePath';\nimport type { IAppState } from '../state';\n\nexport const init = (options: {\n lockfileExplorerProjectRoot: string;\n appVersion: string;\n debugMode: boolean;\n subspaceName: string;\n}): Omit<IAppState, 'graph'> => {\n const { lockfileExplorerProjectRoot, appVersion, debugMode, subspaceName } = options;\n const currentWorkingDirectory: string = path.resolve(process.cwd());\n\n let appState: IAppState | undefined;\n let currentFolder: string = Path.convertToSlashes(currentWorkingDirectory);\n while (currentFolder.includes('/')) {\n // Look for a rush.json [rush project] or pnpm-lock.yaml file [regular pnpm workspace]\n const rushJsonPath: string = currentFolder + '/rush.json';\n const pnpmLockPath: string = currentFolder + '/pnpm-lock.yaml';\n if (FileSystem.exists(rushJsonPath)) {\n console.log('Found a Rush workspace: ', rushJsonPath);\n\n const rushConfiguration: RushConfiguration = RushConfiguration.loadFromConfigurationFile(rushJsonPath);\n const subspace: Subspace = rushConfiguration.getSubspace(subspaceName);\n const commonTempFolder: string = subspace.getSubspaceTempFolderPath();\n const pnpmLockfileAbsolutePath: string = path.join(commonTempFolder, 'pnpm-lock.yaml');\n\n const relativeCommonTempFolder: string = Path.convertToSlashes(\n path.relative(currentFolder, subspace.getSubspaceTempFolderPath())\n );\n const pnpmLockfileRelativePath: string = lockfilePath.join(relativeCommonTempFolder, 'pnpm-lock.yaml');\n const pnpmFileRelativePath: string = lockfilePath.join(relativeCommonTempFolder, '.pnpmfile.cjs');\n\n const relativeCommonConfigFolder: string = Path.convertToSlashes(\n path.relative(currentFolder, subspace.getSubspaceConfigFolderPath())\n );\n const rushPnpmFileRelativePath: string = lockfilePath.join(relativeCommonConfigFolder, '.pnpmfile.cjs');\n\n appState = {\n currentWorkingDirectory,\n appVersion,\n debugMode,\n lockfileExplorerProjectRoot,\n pnpmLockfileLocation: pnpmLockfileAbsolutePath,\n pnpmfileLocation: commonTempFolder + '/.pnpmfile.cjs',\n projectRoot: currentFolder,\n lfxWorkspace: {\n workspaceRootFullPath: currentFolder,\n pnpmLockfilePath: Path.convertToSlashes(pnpmLockfileRelativePath),\n pnpmLockfileFolder: Path.convertToSlashes(path.dirname(pnpmLockfileRelativePath)),\n pnpmfilePath: Path.convertToSlashes(pnpmFileRelativePath),\n rushConfig: {\n rushVersion: rushConfiguration.rushConfigurationJson.rushVersion,\n subspaceName: subspaceName ?? '',\n rushPnpmfilePath: rushPnpmFileRelativePath\n }\n }\n };\n break;\n } else if (FileSystem.exists(pnpmLockPath)) {\n appState = {\n currentWorkingDirectory,\n appVersion,\n debugMode,\n lockfileExplorerProjectRoot,\n pnpmLockfileLocation: currentFolder + '/pnpm-lock.yaml',\n pnpmfileLocation: currentFolder + '/.pnpmfile.cjs',\n projectRoot: currentFolder,\n lfxWorkspace: {\n workspaceRootFullPath: currentFolder,\n pnpmLockfilePath: Path.convertToSlashes(path.relative(currentFolder, pnpmLockPath)),\n pnpmLockfileFolder: '',\n pnpmfilePath: '.pnpmfile.cjs',\n rushConfig: undefined\n }\n };\n\n break;\n }\n\n currentFolder = currentFolder.substring(0, currentFolder.lastIndexOf('/'));\n }\n\n if (!appState) {\n throw new Error('Could not find a Rush or PNPM workspace!');\n }\n\n return appState;\n};\n"]}
@@ -0,0 +1,44 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2
+ // See LICENSE in the project root for license information.
3
+ import * as dependencyPathLockfilePreV9 from '@pnpm/dependency-path-lockfile-pre-v9';
4
+ export function convertLockfileV6DepPathToV5DepPath(newDepPath) {
5
+ if (!newDepPath.includes('@', 2) || newDepPath.startsWith('file:'))
6
+ return newDepPath;
7
+ const index = newDepPath.indexOf('@', newDepPath.indexOf('/@') + 2);
8
+ if (newDepPath.includes('(') && index > dependencyPathLockfilePreV9.indexOfPeersSuffix(newDepPath))
9
+ return newDepPath;
10
+ return `${newDepPath.substring(0, index)}/${newDepPath.substring(index + 1)}`;
11
+ }
12
+ export function parseDependencyPath(shrinkwrapFileMajorVersion, newDepPath) {
13
+ let dependencyPath = newDepPath;
14
+ if (shrinkwrapFileMajorVersion === 6) {
15
+ dependencyPath = convertLockfileV6DepPathToV5DepPath(newDepPath);
16
+ }
17
+ const packageInfo = dependencyPathLockfilePreV9.parse(dependencyPath);
18
+ return {
19
+ name: packageInfo.name,
20
+ peersSuffix: packageInfo.peersSuffix,
21
+ version: packageInfo.version
22
+ };
23
+ }
24
+ export function getShrinkwrapFileMajorVersion(lockfileVersion) {
25
+ let shrinkwrapFileMajorVersion;
26
+ if (typeof lockfileVersion === 'string') {
27
+ const isDotIncluded = lockfileVersion.includes('.');
28
+ shrinkwrapFileMajorVersion = parseInt(lockfileVersion.substring(0, isDotIncluded ? lockfileVersion.indexOf('.') : undefined), 10);
29
+ }
30
+ else if (typeof lockfileVersion === 'number') {
31
+ shrinkwrapFileMajorVersion = Math.floor(lockfileVersion);
32
+ }
33
+ else {
34
+ shrinkwrapFileMajorVersion = 0;
35
+ }
36
+ if (shrinkwrapFileMajorVersion < 5 || shrinkwrapFileMajorVersion > 6) {
37
+ throw new Error('The current lockfile version is not supported.');
38
+ }
39
+ return shrinkwrapFileMajorVersion;
40
+ }
41
+ export function splicePackageWithVersion(shrinkwrapFileMajorVersion, dependencyPackageName, dependencyPackageVersion) {
42
+ return `/${dependencyPackageName}${shrinkwrapFileMajorVersion === 6 ? '@' : '/'}${dependencyPackageVersion}`;
43
+ }
44
+ //# sourceMappingURL=shrinkwrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shrinkwrap.js","sourceRoot":"","sources":["../../src/utils/shrinkwrap.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,KAAK,2BAA2B,MAAM,uCAAuC,CAAC;AAQrF,MAAM,UAAU,mCAAmC,CAAC,UAAkB;IACpE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,UAAU,CAAC;IACtF,MAAM,KAAK,GAAW,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5E,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,GAAG,2BAA2B,CAAC,kBAAkB,CAAC,UAAU,CAAC;QAChG,OAAO,UAAU,CAAC;IACpB,OAAO,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;AAChF,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,0BAAkC,EAAE,UAAkB;IACxF,IAAI,cAAc,GAAW,UAAU,CAAC;IACxC,IAAI,0BAA0B,KAAK,CAAC,EAAE,CAAC;QACrC,cAAc,GAAG,mCAAmC,CAAC,UAAU,CAAC,CAAC;IACnE,CAAC;IACD,MAAM,WAAW,GACf,2BAA2B,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACpD,OAAO;QACL,IAAI,EAAE,WAAW,CAAC,IAAc;QAChC,WAAW,EAAE,WAAW,CAAC,WAAW;QACpC,OAAO,EAAE,WAAW,CAAC,OAAiB;KACvC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,eAAgC;IAC5E,IAAI,0BAAkC,CAAC;IACvC,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE,CAAC;QACxC,MAAM,aAAa,GAAY,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC7D,0BAA0B,GAAG,QAAQ,CACnC,eAAe,CAAC,SAAS,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EACtF,EAAE,CACH,CAAC;IACJ,CAAC;SAAM,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE,CAAC;QAC/C,0BAA0B,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAC3D,CAAC;SAAM,CAAC;QACN,0BAA0B,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,IAAI,0BAA0B,GAAG,CAAC,IAAI,0BAA0B,GAAG,CAAC,EAAE,CAAC;QACrE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,CAAC;IAED,OAAO,0BAA0B,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,0BAAkC,EAClC,qBAA6B,EAC7B,wBAAgC;IAEhC,OAAO,IAAI,qBAAqB,GAC9B,0BAA0B,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAC3C,GAAG,wBAAwB,EAAE,CAAC;AAChC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport * as dependencyPathLockfilePreV9 from '@pnpm/dependency-path-lockfile-pre-v9';\n\ninterface IPackageInfo {\n name: string;\n peersSuffix: string | undefined;\n version: string;\n}\n\nexport function convertLockfileV6DepPathToV5DepPath(newDepPath: string): string {\n if (!newDepPath.includes('@', 2) || newDepPath.startsWith('file:')) return newDepPath;\n const index: number = newDepPath.indexOf('@', newDepPath.indexOf('/@') + 2);\n if (newDepPath.includes('(') && index > dependencyPathLockfilePreV9.indexOfPeersSuffix(newDepPath))\n return newDepPath;\n return `${newDepPath.substring(0, index)}/${newDepPath.substring(index + 1)}`;\n}\n\nexport function parseDependencyPath(shrinkwrapFileMajorVersion: number, newDepPath: string): IPackageInfo {\n let dependencyPath: string = newDepPath;\n if (shrinkwrapFileMajorVersion === 6) {\n dependencyPath = convertLockfileV6DepPathToV5DepPath(newDepPath);\n }\n const packageInfo: ReturnType<typeof dependencyPathLockfilePreV9.parse> =\n dependencyPathLockfilePreV9.parse(dependencyPath);\n return {\n name: packageInfo.name as string,\n peersSuffix: packageInfo.peersSuffix,\n version: packageInfo.version as string\n };\n}\n\nexport function getShrinkwrapFileMajorVersion(lockfileVersion: string | number): number {\n let shrinkwrapFileMajorVersion: number;\n if (typeof lockfileVersion === 'string') {\n const isDotIncluded: boolean = lockfileVersion.includes('.');\n shrinkwrapFileMajorVersion = parseInt(\n lockfileVersion.substring(0, isDotIncluded ? lockfileVersion.indexOf('.') : undefined),\n 10\n );\n } else if (typeof lockfileVersion === 'number') {\n shrinkwrapFileMajorVersion = Math.floor(lockfileVersion);\n } else {\n shrinkwrapFileMajorVersion = 0;\n }\n\n if (shrinkwrapFileMajorVersion < 5 || shrinkwrapFileMajorVersion > 6) {\n throw new Error('The current lockfile version is not supported.');\n }\n\n return shrinkwrapFileMajorVersion;\n}\n\nexport function splicePackageWithVersion(\n shrinkwrapFileMajorVersion: number,\n dependencyPackageName: string,\n dependencyPackageVersion: string\n): string {\n return `/${dependencyPackageName}${\n shrinkwrapFileMajorVersion === 6 ? '@' : '/'\n }${dependencyPackageVersion}`;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rushstack/lockfile-explorer",
3
- "version": "2.1.7",
3
+ "version": "2.2.1",
4
4
  "description": "Rush Lockfile Explorer: The UI for solving version conflicts quickly in a large monorepo",
5
5
  "keywords": [
6
6
  "conflict",
@@ -47,7 +47,7 @@
47
47
  "@pnpm/lockfile.types": "1002.0.1",
48
48
  "@pnpm/types": "1000.8.0",
49
49
  "@types/semver": "7.5.0",
50
- "@rushstack/heft": "1.1.14",
50
+ "@rushstack/heft": "1.2.0",
51
51
  "@rushstack/lockfile-explorer-web": "0.0.0",
52
52
  "local-node-rig": "1.0.0"
53
53
  },
@@ -60,16 +60,38 @@
60
60
  "open": "~8.4.0",
61
61
  "semver": "~7.5.4",
62
62
  "update-notifier": "~5.1.0",
63
- "@microsoft/rush-lib": "5.167.0",
64
- "@rushstack/node-core-library": "5.19.1",
65
- "@rushstack/terminal": "0.21.0",
66
- "@rushstack/ts-command-line": "5.2.0",
67
- "@rushstack/rush-sdk": "5.167.0"
63
+ "@microsoft/rush-lib": "5.169.1",
64
+ "@rushstack/rush-sdk": "5.169.1",
65
+ "@rushstack/node-core-library": "5.20.0",
66
+ "@rushstack/terminal": "0.22.0",
67
+ "@rushstack/ts-command-line": "5.3.0"
68
68
  },
69
+ "exports": {
70
+ "./lib/*.schema.json": "./lib-commonjs/*.schema.json",
71
+ "./lib/*": {
72
+ "types": "./lib-dts/*.d.ts",
73
+ "import": "./lib-esm/*.js",
74
+ "require": "./lib-commonjs/*.js"
75
+ },
76
+ "./package.json": "./package.json"
77
+ },
78
+ "typesVersions": {
79
+ "*": {
80
+ "lib/*": [
81
+ "lib-dts/*"
82
+ ]
83
+ }
84
+ },
85
+ "sideEffects": [
86
+ "lib-commonjs/start-explorer.js",
87
+ "lib-commonjs/start-lint.js",
88
+ "lib-esm/start-explorer.js",
89
+ "lib-esm/start-lint.js"
90
+ ],
69
91
  "scripts": {
70
92
  "build": "heft build --clean",
71
93
  "start": "heft start",
72
- "serve": "node ./lib/start-explorer.js --debug",
94
+ "serve": "node ./lib-commonjs/start-explorer.js --debug",
73
95
  "test": "heft test",
74
96
  "_phase:build": "heft run --only build -- --clean",
75
97
  "_phase:test": "heft run --only test -- --clean"
@@ -1 +0,0 @@
1
- !function(){var e,t={294:function(e,t,n){var r,o;e.exports=(r=n(257),o=n(399),function(){"use strict";var e,t,n={635:function(e,t,n){var r=n(345),o=n.n(r),a=n(386),l=n.n(a)()(o());l.push([e.id,".dVadg6u2kwiGWhobva5n{padding:4px 8px;border:1px solid #107c10;border-radius:2px}.dVadg6u2kwiGWhobva5n:hover{cursor:pointer;background-color:#dff6dd}.dVadg6u2kwiGWhobva5n:disabled{cursor:default;background-color:#fff;color:#666;border-color:#ab9e8e}",""]),l.locals={ButtonWrapper:"dVadg6u2kwiGWhobva5n"},t.A=l},104:function(e,t,n){var r=n(345),o=n.n(r),a=n(386),l=n.n(a)()(o());l.push([e.id,"button{all:unset}.i8BZVdjUfbst7_tarHzS{background-color:#fff;width:25px;min-width:25px;height:25px;border-radius:4px;display:flex;align-items:center;justify-content:center;border:1px solid #000;cursor:pointer}.i8BZVdjUfbst7_tarHzS:hover{background-color:#dff6dd}.l0YazbYK7P8YQSDvX2o0{color:#107c10}.w9I3BjE7cnjsfBLB3UyI{padding-left:15px;font-size:15px;line-height:1;-webkit-user-select:none;-moz-user-select:none;user-select:none}",""]),l.locals={CheckboxRoot:"i8BZVdjUfbst7_tarHzS",CheckboxIndicator:"l0YazbYK7P8YQSDvX2o0",Label:"w9I3BjE7cnjsfBLB3UyI"},t.A=l},775:function(e,t,n){var r=n(345),o=n.n(r),a=n(386),l=n.n(a)()(o());l.push([e.id,".FYuNNcaXqlTXB7M6DHBZ{border:solid 1px #666;border-radius:4px;padding:.4em}",""]),l.locals={InputWrapper:"FYuNNcaXqlTXB7M6DHBZ"},t.A=l},631:function(e,t,n){var r=n(345),o=n.n(r),a=n(386),l=n.n(a)()(o());l.push([e.id,'.gQUln75LgrNAv33iEQhx{border-radius:4px;overflow:hidden;--scrollbar-size: 6px;height:100%}.YABN5ZbWRfbX8Bbj41KF{width:100%;height:100%;border-radius:inherit}.YABN5ZbWRfbX8Bbj41KF>*{padding-right:8px}.ICjBreoW5ZAqZ9txdiH9{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none;padding:2px;background:#f3f2f1;transition:background 160ms ease-out}.ICjBreoW5ZAqZ9txdiH9:hover{background:#f3f2f1}.ICjBreoW5ZAqZ9txdiH9[data-orientation=vertical]{width:var(--scrollbar-size)}.ICjBreoW5ZAqZ9txdiH9[data-orientation=horizontal]{flex-direction:column;height:var(--scrollbar-size)}.SNDfMaHFMf5swwou75WQ{flex:1;background:#107c10;border-radius:var(--scrollbar-size);position:relative}.SNDfMaHFMf5swwou75WQ::before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:100%;height:100%;min-width:44px;min-height:44px}.KxOpf0j2WwULFJnM_2Up{background:#f3f2f1}',""]),l.locals={ScrollAreaRoot:"gQUln75LgrNAv33iEQhx",ScrollAreaViewport:"YABN5ZbWRfbX8Bbj41KF",ScrollAreaScrollbar:"ICjBreoW5ZAqZ9txdiH9",ScrollAreaThumb:"SNDfMaHFMf5swwou75WQ",ScrollAreaCorner:"KxOpf0j2WwULFJnM_2Up"},t.A=l},759:function(e,t,n){var r=n(345),o=n.n(r),a=n(386),l=n.n(a)()(o());l.push([e.id,"button,fieldset,input{all:unset}.YhXMGBOKBRuKAvsx8mwk{display:flex;flex-direction:column;width:100%}.t08yVQir831gIp_A2xsP{flex-shrink:0;display:flex;border-bottom:1px solid #107c10}.L7_6rMInDO6tBxFRFiuO{font-family:inherit;padding:0 20px;height:45px;flex:1;display:flex;align-items:center;justify-content:center;font-size:15px;line-height:1;color:#000;-webkit-user-select:none;-moz-user-select:none;user-select:none}.L7_6rMInDO6tBxFRFiuO:hover{color:#107c10;cursor:pointer}.L7_6rMInDO6tBxFRFiuO[data-state=active]{color:#107c10;box-shadow:inset 0 -1px 0 0 currentColor,0 1px 0 0 currentColor}.L7_6rMInDO6tBxFRFiuO:focus{position:relative;box-shadow:0 0 0 2px #107c10}.kLJtm9LC8LxOdvGhZdw_{flex-grow:1;padding:12px;border-bottom-left-radius:6px;border-bottom-right-radius:6px;outline:none}.kLJtm9LC8LxOdvGhZdw_:focus{box-shadow:0 0 0 2px #000}",""]),l.locals={TabsRoot:"YhXMGBOKBRuKAvsx8mwk",TabsList:"t08yVQir831gIp_A2xsP",TabsTrigger:"L7_6rMInDO6tBxFRFiuO",TabsContent:"kLJtm9LC8LxOdvGhZdw_"},t.A=l},30:function(e,t,n){var r=n(345),o=n.n(r),a=n(386),l=n.n(a)()(o());l.push([e.id,'.EEW4moi09VKPLYf_QQjc{font-weight:bold;line-height:1.2;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:24px}.J7ir6XIWo7jdiI2ntfcg{font-weight:bold;line-height:1.2;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:21px}.SWvmPuRvIE0SV9q04VZG{font-weight:bold;line-height:1.2;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:19px}.QHCu9OO40pSJaXahbkYF{font-weight:bold;line-height:1.2;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:16px}.oK4n_cRPbdF5MN5Ed_h2{font-weight:bold;line-height:1.2;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:14px}.odUGt__AQTdr_z7W6Fk7{font-weight:bold;line-height:1.2;margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:12px}.f_gEnP5sMtd6eYNOiYQQ{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;margin:0;font-weight:normal;line-height:1.5;font-size:14px}.aLGFzKvQOPA_BfQw5vqO{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:12px}',""]),l.locals={H1:"EEW4moi09VKPLYf_QQjc",H2:"J7ir6XIWo7jdiI2ntfcg",H3:"SWvmPuRvIE0SV9q04VZG",H4:"QHCu9OO40pSJaXahbkYF",H5:"oK4n_cRPbdF5MN5Ed_h2",H6:"odUGt__AQTdr_z7W6Fk7",ParagraphStyles:"f_gEnP5sMtd6eYNOiYQQ",SpanStyles:"aLGFzKvQOPA_BfQw5vqO"},t.A=l},386:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var l={};if(r)for(var c=0;c<this.length;c++){var s=this[c][0];null!=s&&(l[s]=!0)}for(var i=0;i<e.length;i++){var d=[].concat(e[i]);r&&l[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},345:function(e){e.exports=function(e){return e[1]}},405:function(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o},37:function(e,t,n){e.exports=n(405)},534:function(e){var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},l=[],c=0;c<e.length;c++){var s=e[c],i=r.base?s[0]+r.base:s[0],d=a[i]||0,u="".concat(i," ").concat(d);a[i]=d+1;var p=n(u),f={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==p)t[p].references++,t[p].updater(f);else{var m=o(f,r);r.byIndex=c,t.splice(c,0,{identifier:u,updater:m,references:1})}l.push(u)}return l}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var l=0;l<a.length;l++){var c=n(a[l]);t[c].references--}for(var s=r(e,o),i=0;i<a.length;i++){var d=n(a[i]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}a=s}}},629:function(e){var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},466:function(e){e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},390:function(e,t,n){e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},863:function(e){e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},247:function(e){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},155:function(e){e.exports=r},514:function(e){e.exports=o}},a={};function l(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={id:e,exports:{}};return n[e](r,r.exports,l),r.exports}l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},l.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);l.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var c=2&r&&n;("object"==typeof c||"function"==typeof c)&&!~e.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach(function(e){a[e]=function(){return n[e]}});return a.default=function(){return n},l.d(o,a),o},l.d=function(e,t){for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nc=void 0;var c={};l.r(c),l.d(c,{Button:function(){return I},Checkbox:function(){return Jt},Input:function(){return en},ScrollArea:function(){return Me},Tabs:function(){return Tt},Text:function(){return P}});var s=l(155),i=l.t(s,2),d=l.n(s),u=l(534),p=l.n(u),f=l(863),m=l.n(f),h=l(629),v=l.n(h),y=l(390),g=l.n(y),b=l(466),E=l.n(b),w=l(247),k=l.n(w),x=l(30),S={};S.styleTagTransform=k(),S.setAttributes=g(),S.insert=v().bind(null,"head"),S.domAPI=m(),S.insertStyleElement=E(),p()(x.A,S);var C=x.A&&x.A.locals?x.A.locals:void 0;const P=({type:e,bold:t=!1,children:n,className:r,size:o})=>{const a=Object.assign({fontWeight:t?"bold":"normal"},o?{fontSize:o}:{});switch(e){case"h1":return d().createElement("h1",{className:`${C.H1} ${r||""}`,style:a},n);case"h2":return d().createElement("h2",{className:`${C.H2} ${r||""}`,style:a},n);case"h3":return d().createElement("h3",{className:`${C.H3} ${r||""}`,style:a},n);case"h4":return d().createElement("h4",{className:`${C.H4} ${r||""}`,style:a},n);case"h5":return d().createElement("h5",{className:`${C.H5} ${r||""}`,style:a},n);case"h6":return d().createElement("h6",{className:`${C.H6} ${r||""}`,style:a},n);case"p":default:return d().createElement("p",{className:`${C.ParagraphStyles} ${r||""}`,style:a},n);case"span":return d().createElement("span",{className:`${C.SpanStyles} ${r||""}`,style:a},n)}};var N=l(635),T={};T.styleTagTransform=k(),T.setAttributes=g(),T.insert=v().bind(null,"head"),T.domAPI=m(),T.insertStyleElement=E(),p()(N.A,T);var j=N.A&&N.A.locals?N.A.locals:void 0;const I=({children:e,disabled:t=!1,onClick:n})=>d().createElement("button",{disabled:t,className:j.ButtonWrapper,onClick:n},d().createElement(P,{type:"span",size:14},e));function A(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function R(...e){return t=>{let n=!1;const r=e.map(e=>{const r=A(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():A(e[t],null)}}}}function O(...e){return s.useCallback(R(...e),e)}l(514);var _=l(37);function D(e){const t=function(e){const t=s.forwardRef((e,t)=>{const{children:n,...r}=e;if(s.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==s.Fragment&&(o.ref=t?R(t,e):e),s.cloneElement(n,o)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),n=s.forwardRef((e,n)=>{const{children:r,...o}=e,a=s.Children.toArray(r),l=a.find(F);if(l){const e=l.props.children,r=a.map(t=>t===l?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t);return(0,_.jsx)(t,{...o,ref:n,children:s.isValidElement(e)?s.cloneElement(e,void 0,r):null})}return(0,_.jsx)(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var M=Symbol("radix.slottable");function F(e){return s.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===M}var L=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=D(`Primitive.${t}`),r=s.forwardRef((e,r)=>{const{asChild:o,...a}=e,l=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,_.jsx)(l,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),B=globalThis?.document?s.useLayoutEffect:()=>{},z=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=s.useState(),r=s.useRef(null),o=s.useRef(e),a=s.useRef("none"),l=e?"mounted":"unmounted",[c,i]=function(e,t){return s.useReducer((e,n)=>t[e][n]??e,e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const e=H(r.current);a.current="mounted"===c?e:"none"},[c]),B(()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,l=H(t);i(e?"MOUNT":"none"===l||"none"===t?.display?"UNMOUNT":n&&r!==l?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,i]),B(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,l=a=>{const l=H(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&l&&(i("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=H(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}i("ANIMATION_END")},[t,i]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:s.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):s.Children.only(n),a=O(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}(o));return"function"==typeof n||r.isPresent?s.cloneElement(o,{ref:a}):null};function H(e){return e?.animationName||"none"}function $(e,t=[]){let n=[];const r=()=>{const t=n.map(e=>s.createContext(e));return function(n){const r=n?.[e]||t;return s.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){const o=s.createContext(r),a=n.length;n=[...n,r];const l=t=>{const{scope:n,children:r,...l}=t,c=n?.[e]?.[a]||o,i=s.useMemo(()=>l,Object.values(l));return(0,_.jsx)(c.Provider,{value:i,children:r})};return l.displayName=t+"Provider",[l,function(n,l){const c=l?.[e]?.[a]||o,i=s.useContext(c);if(i)return i;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},U(r,...t)]}function U(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function W(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...e)=>t.current?.(...e),[])}z.displayName="Presence";var V=s.createContext(void 0);function K(e){const t=s.useContext(V);return e||t||"ltr"}function X(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}"undefined"==typeof window||!window.document||window.document.createElement;var Y="ScrollArea",[Z,J]=$(Y),[G,Q]=Z(Y),q=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...l}=e,[c,i]=s.useState(null),[d,u]=s.useState(null),[p,f]=s.useState(null),[m,h]=s.useState(null),[v,y]=s.useState(null),[g,b]=s.useState(0),[E,w]=s.useState(0),[k,x]=s.useState(!1),[S,C]=s.useState(!1),P=O(t,e=>i(e)),N=K(o);return(0,_.jsx)(G,{scope:n,type:r,dir:N,scrollHideDelay:a,scrollArea:c,viewport:d,onViewportChange:u,content:p,onContentChange:f,scrollbarX:m,onScrollbarXChange:h,scrollbarXEnabled:k,onScrollbarXEnabledChange:x,scrollbarY:v,onScrollbarYChange:y,scrollbarYEnabled:S,onScrollbarYEnabledChange:C,onCornerWidthChange:b,onCornerHeightChange:w,children:(0,_.jsx)(L.div,{dir:N,...l,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});q.displayName=Y;var ee="ScrollAreaViewport",te=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,l=Q(ee,n),c=O(t,s.useRef(null),l.onViewportChange);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,_.jsx)(L.div,{"data-radix-scroll-area-viewport":"",...a,ref:c,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,_.jsx)("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});te.displayName=ee;var ne="ScrollAreaScrollbar",re=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Q(ne,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:l}=o,c="horizontal"===e.orientation;return s.useEffect(()=>(c?a(!0):l(!0),()=>{c?a(!1):l(!1)}),[c,a,l]),"hover"===o.type?(0,_.jsx)(oe,{...r,ref:t,forceMount:n}):"scroll"===o.type?(0,_.jsx)(ae,{...r,ref:t,forceMount:n}):"auto"===o.type?(0,_.jsx)(le,{...r,ref:t,forceMount:n}):"always"===o.type?(0,_.jsx)(ce,{...r,ref:t}):null});re.displayName=ne;var oe=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Q(ne,e.__scopeScrollArea),[a,l]=s.useState(!1);return s.useEffect(()=>{const e=o.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),l(!0)},r=()=>{t=window.setTimeout(()=>l(!1),o.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[o.scrollArea,o.scrollHideDelay]),(0,_.jsx)(z,{present:n||a,children:(0,_.jsx)(le,{"data-state":a?"visible":"hidden",...r,ref:t})})}),ae=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Q(ne,e.__scopeScrollArea),a="horizontal"===e.orientation,l=Pe(()=>i("SCROLL_END"),100),[c,i]=(d={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},s.useReducer((e,t)=>d[e][t]??e,"hidden"));var d;return s.useEffect(()=>{if("idle"===c){const e=window.setTimeout(()=>i("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[c,o.scrollHideDelay,i]),s.useEffect(()=>{const e=o.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(i("SCROLL"),l()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[o.viewport,a,i,l]),(0,_.jsx)(z,{present:n||"hidden"!==c,children:(0,_.jsx)(ce,{"data-state":"hidden"===c?"hidden":"visible",...r,ref:t,onPointerEnter:X(e.onPointerEnter,()=>i("POINTER_ENTER")),onPointerLeave:X(e.onPointerLeave,()=>i("POINTER_LEAVE"))})})}),le=s.forwardRef((e,t)=>{const n=Q(ne,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,l]=s.useState(!1),c="horizontal"===e.orientation,i=Pe(()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;l(c?e:t)}},10);return Ne(n.viewport,i),Ne(n.content,i),(0,_.jsx)(z,{present:r||a,children:(0,_.jsx)(ce,{"data-state":a?"visible":"hidden",...o,ref:t})})}),ce=s.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=Q(ne,e.__scopeScrollArea),a=s.useRef(null),l=s.useRef(0),[c,i]=s.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Ee(c.viewport,c.content),u={...r,sizes:c,onSizesChange:i,hasThumb:Boolean(d>0&&d<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:e=>l.current=e};function p(e,t){return function(e,t,n,r="ltr"){const o=we(n),a=t||o/2,l=o-a,c=n.scrollbar.paddingStart+a,s=n.scrollbar.size-n.scrollbar.paddingEnd-l,i=n.content-n.viewport;return xe([c,s],"ltr"===r?[0,i]:[-1*i,0])(e)}(e,l.current,c,t)}return"horizontal"===n?(0,_.jsx)(se,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const e=ke(o.viewport.scrollLeft,c,o.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollLeft=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollLeft=p(e,o.dir))}}):"vertical"===n?(0,_.jsx)(ie,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const e=ke(o.viewport.scrollTop,c);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollTop=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollTop=p(e))}}):null}),se=s.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=Q(ne,e.__scopeScrollArea),[l,c]=s.useState(),i=s.useRef(null),d=O(t,i,a.onScrollbarXChange);return s.useEffect(()=>{i.current&&c(getComputedStyle(i.current))},[i]),(0,_.jsx)(pe,{"data-orientation":"horizontal",...o,ref:d,sizes:n,style:{bottom:0,left:"rtl"===a.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===a.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":we(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Se(r,n)&&t.preventDefault()}},onResize:()=>{i.current&&a.viewport&&l&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:i.current.clientWidth,paddingStart:be(l.paddingLeft),paddingEnd:be(l.paddingRight)}})}})}),ie=s.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=Q(ne,e.__scopeScrollArea),[l,c]=s.useState(),i=s.useRef(null),d=O(t,i,a.onScrollbarYChange);return s.useEffect(()=>{i.current&&c(getComputedStyle(i.current))},[i]),(0,_.jsx)(pe,{"data-orientation":"vertical",...o,ref:d,sizes:n,style:{top:0,right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":we(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Se(r,n)&&t.preventDefault()}},onResize:()=>{i.current&&a.viewport&&l&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:i.current.clientHeight,paddingStart:be(l.paddingTop),paddingEnd:be(l.paddingBottom)}})}})}),[de,ue]=Z(ne),pe=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:i,onDragScroll:d,onWheelScroll:u,onResize:p,...f}=e,m=Q(ne,n),[h,v]=s.useState(null),y=O(t,e=>v(e)),g=s.useRef(null),b=s.useRef(""),E=m.viewport,w=r.content-r.viewport,k=W(u),x=W(i),S=Pe(p,10);function C(e){if(g.current){const t=e.clientX-g.current.left,n=e.clientY-g.current.top;d({x:t,y:n})}}return s.useEffect(()=>{const e=e=>{const t=e.target,n=h?.contains(t);n&&k(e,w)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[E,h,w,k]),s.useEffect(x,[r,x]),Ne(h,S),Ne(m.content,S),(0,_.jsx)(de,{scope:n,scrollbar:h,hasThumb:o,onThumbChange:W(a),onThumbPointerUp:W(l),onThumbPositionChange:x,onThumbPointerDown:W(c),children:(0,_.jsx)(L.div,{...f,ref:y,style:{position:"absolute",...f.style},onPointerDown:X(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),g.current=h.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),C(e))}),onPointerMove:X(e.onPointerMove,C),onPointerUp:X(e.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,m.viewport&&(m.viewport.style.scrollBehavior=""),g.current=null})})})}),fe="ScrollAreaThumb",me=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ue(fe,e.__scopeScrollArea);return(0,_.jsx)(z,{present:n||o.hasThumb,children:(0,_.jsx)(he,{ref:t,...r})})}),he=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=Q(fe,n),l=ue(fe,n),{onThumbPositionChange:c}=l,i=O(t,e=>l.onThumbChange(e)),d=s.useRef(void 0),u=Pe(()=>{d.current&&(d.current(),d.current=void 0)},100);return s.useEffect(()=>{const e=a.viewport;if(e){const t=()=>{if(u(),!d.current){const t=Ce(e,c);d.current=t,c()}};return c(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[a.viewport,u,c]),(0,_.jsx)(L.div,{"data-state":l.hasThumb?"visible":"hidden",...o,ref:i,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:X(e.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;l.onThumbPointerDown({x:n,y:r})}),onPointerUp:X(e.onPointerUp,l.onThumbPointerUp)})});me.displayName=fe;var ve="ScrollAreaCorner",ye=s.forwardRef((e,t)=>{const n=Q(ve,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?(0,_.jsx)(ge,{...e,ref:t}):null});ye.displayName=ve;var ge=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Q(ve,n),[a,l]=s.useState(0),[c,i]=s.useState(0),d=Boolean(a&&c);return Ne(o.scrollbarX,()=>{const e=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(e),i(e)}),Ne(o.scrollbarY,()=>{const e=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(e),l(e)}),d?(0,_.jsx)(L.div,{...r,ref:t,style:{width:a,height:c,position:"absolute",right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:0,...e.style}}):null});function be(e){return e?parseInt(e,10):0}function Ee(e,t){const n=e/t;return isNaN(n)?0:n}function we(e){const t=Ee(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function ke(e,t,n="ltr"){const r=we(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,l=t.content-t.viewport,c=a-r,s=function(e,[t,n]){return Math.min(n,Math.max(t,e))}(e,"ltr"===n?[0,l]:[-1*l,0]);return xe([0,l],[0,c])(s)}function xe(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Se(e,t){return e>0&&e<t}var Ce=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},l=n.left!==a.left,c=n.top!==a.top;(l||c)&&t(),n=a,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Pe(e,t){const n=W(e),r=s.useRef(0);return s.useEffect(()=>()=>window.clearTimeout(r.current),[]),s.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ne(e,t){const n=W(t);B(()=>{let t=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var Te=q,je=te,Ie=re,Ae=me,Re=ye,Oe=l(631),_e={};_e.styleTagTransform=k(),_e.setAttributes=g(),_e.insert=v().bind(null,"head"),_e.domAPI=m(),_e.insertStyleElement=E(),p()(Oe.A,_e);var De=Oe.A&&Oe.A.locals?Oe.A.locals:void 0;const Me=({children:e})=>d().createElement(Te,{className:De.ScrollAreaRoot},d().createElement(je,{className:De.ScrollAreaViewport},e),d().createElement(Ie,{className:De.ScrollAreaScrollbar,orientation:"vertical"},d().createElement(Ae,{className:De.ScrollAreaThumb})),d().createElement(Ie,{className:De.ScrollAreaScrollbar,orientation:"horizontal"},d().createElement(Ae,{className:De.ScrollAreaThumb})),d().createElement(Re,{className:De.ScrollAreaCorner}));Map;var Fe=i[" useId ".trim().toString()]||(()=>{}),Le=0;function Be(e){const[t,n]=s.useState(Fe());return B(()=>{e||n(e=>e??String(Le++))},[e]),e||(t?`radix-${t}`:"")}var ze=i[" useInsertionEffect ".trim().toString()]||B;function He({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,l]=function({defaultProp:e,onChange:t}){const[n,r]=s.useState(e),o=s.useRef(n),a=s.useRef(t);return ze(()=>{a.current=t},[t]),s.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),c=void 0!==e,i=c?e:o;{const t=s.useRef(void 0!==e);s.useEffect(()=>{const e=t.current;if(e!==c){const t=e?"controlled":"uncontrolled",n=c?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=c},[c,r])}const d=s.useCallback(t=>{if(c){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&l.current?.(n)}else a(t)},[c,e,a,l]);return[i,d]}Symbol("RADIX:SYNC_STATE");var $e="rovingFocusGroup.onEntryFocus",Ue={bubbles:!1,cancelable:!0},We="RovingFocusGroup",[Ve,Ke,Xe]=function(e){const t=e+"CollectionProvider",[n,r]=$(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:t,children:n}=e,r=s.useRef(null),a=s.useRef(new Map).current;return(0,_.jsx)(o,{scope:t,itemMap:a,collectionRef:r,children:n})};l.displayName=t;const c=e+"CollectionSlot",i=D(c),d=s.forwardRef((e,t)=>{const{scope:n,children:r}=e,o=O(t,a(c,n).collectionRef);return(0,_.jsx)(i,{ref:o,children:r})});d.displayName=c;const u=e+"CollectionItemSlot",p="data-radix-collection-item",f=D(u),m=s.forwardRef((e,t)=>{const{scope:n,children:r,...o}=e,l=s.useRef(null),c=O(t,l),i=a(u,n);return s.useEffect(()=>(i.itemMap.set(l,{ref:l,...o}),()=>{i.itemMap.delete(l)})),(0,_.jsx)(f,{[p]:"",ref:c,children:r})});return m.displayName=u,[{Provider:l,Slot:d,ItemSlot:m},function(t){const n=a(e+"CollectionConsumer",t);return s.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}(We),[Ye,Ze]=$(We,[Xe]),[Je,Ge]=Ye(We),Qe=s.forwardRef((e,t)=>(0,_.jsx)(Ve.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,_.jsx)(Ve.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,_.jsx)(qe,{...e,ref:t})})}));Qe.displayName=We;var qe=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:i,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...p}=e,f=s.useRef(null),m=O(t,f),h=K(a),[v,y]=He({prop:l,defaultProp:c??null,onChange:i,caller:We}),[g,b]=s.useState(!1),E=W(d),w=Ke(n),k=s.useRef(!1),[x,S]=s.useState(0);return s.useEffect(()=>{const e=f.current;if(e)return e.addEventListener($e,E),()=>e.removeEventListener($e,E)},[E]),(0,_.jsx)(Je,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:v,onItemFocus:s.useCallback(e=>y(e),[y]),onItemShiftTab:s.useCallback(()=>b(!0),[]),onFocusableItemAdd:s.useCallback(()=>S(e=>e+1),[]),onFocusableItemRemove:s.useCallback(()=>S(e=>e-1),[]),children:(0,_.jsx)(L.div,{tabIndex:g||0===x?-1:0,"data-orientation":r,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:X(e.onMouseDown,()=>{k.current=!0}),onFocus:X(e.onFocus,e=>{const t=!k.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent($e,Ue);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter(e=>e.focusable);rt([e.find(e=>e.active),e.find(e=>e.id===v),...e].filter(Boolean).map(e=>e.ref.current),u)}}k.current=!1}),onBlur:X(e.onBlur,()=>b(!1))})})}),et="RovingFocusGroupItem",tt=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:l,...c}=e,i=Be(),d=a||i,u=Ge(et,n),p=u.currentTabStopId===d,f=Ke(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:v}=u;return s.useEffect(()=>{if(r)return m(),()=>h()},[r,m,h]),(0,_.jsx)(Ve.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:(0,_.jsx)(L.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...c,ref:t,onMouseDown:X(e.onMouseDown,e=>{r?u.onItemFocus(d):e.preventDefault()}),onFocus:X(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:X(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:nt[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=f().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const a=o.indexOf(e.currentTarget);o=u.loop?(r=a+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(a+1)}setTimeout(()=>rt(o))}var n,r}),children:"function"==typeof l?l({isCurrentTabStop:p,hasTabStop:null!=v}):l})})});tt.displayName=et;var nt={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rt(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var ot=Qe,at=tt,lt="Tabs",[ct,st]=$(lt,[Ze]),it=Ze(),[dt,ut]=ct(lt),pt=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:l="horizontal",dir:c,activationMode:s="automatic",...i}=e,d=K(c),[u,p]=He({prop:r,onChange:o,defaultProp:a??"",caller:lt});return(0,_.jsx)(dt,{scope:n,baseId:Be(),value:u,onValueChange:p,orientation:l,dir:d,activationMode:s,children:(0,_.jsx)(L.div,{dir:d,"data-orientation":l,...i,ref:t})})});pt.displayName=lt;var ft="TabsList",mt=s.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=ut(ft,n),l=it(n);return(0,_.jsx)(ot,{asChild:!0,...l,orientation:a.orientation,dir:a.dir,loop:r,children:(0,_.jsx)(L.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});mt.displayName=ft;var ht="TabsTrigger",vt=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,l=ut(ht,n),c=it(n),s=bt(l.baseId,r),i=Et(l.baseId,r),d=r===l.value;return(0,_.jsx)(at,{asChild:!0,...c,focusable:!o,active:d,children:(0,_.jsx)(L.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":i,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:s,...a,ref:t,onMouseDown:X(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():l.onValueChange(r)}),onKeyDown:X(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&l.onValueChange(r)}),onFocus:X(e.onFocus,()=>{const e="manual"!==l.activationMode;d||o||!e||l.onValueChange(r)})})})});vt.displayName=ht;var yt="TabsContent",gt=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...l}=e,c=ut(yt,n),i=bt(c.baseId,r),d=Et(c.baseId,r),u=r===c.value,p=s.useRef(u);return s.useEffect(()=>{const e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,_.jsx)(z,{present:o||u,children:({present:n})=>(0,_.jsx)(L.div,{"data-state":u?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":i,hidden:!n,id:d,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:n&&a})})});function bt(e,t){return`${e}-trigger-${t}`}function Et(e,t){return`${e}-content-${t}`}gt.displayName=yt;var wt=pt,kt=mt,xt=vt,St=gt,Ct=l(759),Pt={};Pt.styleTagTransform=k(),Pt.setAttributes=g(),Pt.insert=v().bind(null,"head"),Pt.domAPI=m(),Pt.insertStyleElement=E(),p()(Ct.A,Pt);var Nt=Ct.A&&Ct.A.locals?Ct.A.locals:void 0;const Tt=({items:e,def:t,value:n,onChange:r,renderChildren:o})=>{const a=e=>void 0===e.value?e.header:e.value;return d().createElement(wt,{className:Nt.TabsRoot,defaultValue:t||e[0].header,value:n,onValueChange:r},d().createElement(kt,{className:Nt.TabsList,"aria-label":"Manage your account"},e.map(e=>d().createElement(xt,{key:e.header,className:Nt.TabsTrigger,value:a(e)},e.header))),o?o():e.map((e,t)=>e.body?d().createElement(St,{key:`${t}`,className:Nt.TabsContent,value:a(e)},e.body):null))};var jt="Checkbox",[It,At]=$(jt),[Rt,Ot]=It(jt);function _t(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:l,name:c,onCheckedChange:i,required:d,value:u="on",internal_do_not_use_render:p}=e,[f,m]=He({prop:n,defaultProp:o??!1,onChange:i,caller:jt}),[h,v]=s.useState(null),[y,g]=s.useState(null),b=s.useRef(!1),E=!h||!!l||!!h.closest("form"),w={checked:f,disabled:a,setChecked:m,control:h,setControl:v,name:c,form:l,value:u,hasConsumerStoppedPropagationRef:b,required:d,defaultChecked:!Ut(o)&&o,isFormControl:E,bubbleInput:y,setBubbleInput:g};return(0,_.jsx)(Rt,{scope:t,...w,children:$t(p)?p(w):r})}var Dt="CheckboxTrigger",Mt=s.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:l,disabled:c,checked:i,required:d,setControl:u,setChecked:p,hasConsumerStoppedPropagationRef:f,isFormControl:m,bubbleInput:h}=Ot(Dt,e),v=O(o,u),y=s.useRef(i);return s.useEffect(()=>{const e=a?.form;if(e){const t=()=>p(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[a,p]),(0,_.jsx)(L.button,{type:"button",role:"checkbox","aria-checked":Ut(i)?"mixed":i,"aria-required":d,"data-state":Wt(i),"data-disabled":c?"":void 0,disabled:c,value:l,...r,ref:v,onKeyDown:X(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:X(n,e=>{p(e=>!!Ut(e)||!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});Mt.displayName=Dt;var Ft=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:l,disabled:c,value:s,onCheckedChange:i,form:d,...u}=e;return(0,_.jsx)(_t,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:c,required:l,onCheckedChange:i,name:r,form:d,value:s,internal_do_not_use_render:({isFormControl:e})=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Mt,{...u,ref:t,__scopeCheckbox:n}),e&&(0,_.jsx)(Ht,{__scopeCheckbox:n})]})})});Ft.displayName=jt;var Lt="CheckboxIndicator",Bt=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Ot(Lt,n);return(0,_.jsx)(z,{present:r||Ut(a.checked)||!0===a.checked,children:(0,_.jsx)(L.span,{"data-state":Wt(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Bt.displayName=Lt;var zt="CheckboxBubbleInput",Ht=s.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:l,required:c,disabled:i,name:d,value:u,form:p,bubbleInput:f,setBubbleInput:m}=Ot(zt,e),h=O(n,m),v=function(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(a),y=function(e){const[t,n]=s.useState(void 0);return B(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(r);s.useEffect(()=>{const e=f;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!o.current;if(v!==a&&n){const t=new Event("click",{bubbles:r});e.indeterminate=Ut(a),n.call(e,!Ut(a)&&a),e.dispatchEvent(t)}},[f,v,a,o]);const g=s.useRef(!Ut(a)&&a);return(0,_.jsx)(L.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??g.current,required:c,disabled:i,name:d,value:u,form:p,...t,tabIndex:-1,ref:h,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function $t(e){return"function"==typeof e}function Ut(e){return"indeterminate"===e}function Wt(e){return Ut(e)?"indeterminate":e?"checked":"unchecked"}Ht.displayName=zt;var Vt=["color"],Kt=(0,s.forwardRef)(function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,Vt);return(0,s.createElement)("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),(0,s.createElement)("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Xt=l(104),Yt={};Yt.styleTagTransform=k(),Yt.setAttributes=g(),Yt.insert=v().bind(null,"head"),Yt.domAPI=m(),Yt.insertStyleElement=E(),p()(Xt.A,Yt);var Zt=Xt.A&&Xt.A.locals?Xt.A.locals:void 0;const Jt=({label:e,isChecked:t,onChecked:n})=>d().createElement("form",null,d().createElement("div",{style:{display:"flex",alignItems:"center"}},d().createElement(Ft,{className:Zt.CheckboxRoot,defaultChecked:!0,checked:t,onCheckedChange:n,id:e},d().createElement(Bt,{className:Zt.CheckboxIndicator},d().createElement(Kt,null))),d().createElement("label",{className:Zt.Label,htmlFor:e},e)));var Gt=l(775),Qt={};Qt.styleTagTransform=k(),Qt.setAttributes=g(),Qt.insert=v().bind(null,"head"),Qt.domAPI=m(),Qt.insertStyleElement=E(),p()(Gt.A,Qt);var qt=Gt.A&&Gt.A.locals?Gt.A.locals:void 0;const en=({value:e,placeholder:t,onChange:n,type:r="text"})=>d().createElement("input",{type:r,value:e,placeholder:t,onChange:n,className:qt.InputWrapper});return c}())},383:function(e,t,n){"use strict";var r,o,a=n(257),l=n(112),c=n(237),s="HK80a6ZVkdxoTKzrP9Eq",i="HqAzbQwu1zc9yH8ZQESI";!function(e){e[e.Project=1]="Project",e[e.Package=2]="Package",e[e.SideBySide=3]="SideBySide",e[e.Doppelganger=4]="Doppelganger"}(r||(r={})),function(e){e.Regular="regular",e.Dev="dev",e.Peer="peer"}(o||(o={}));class d{constructor(e){this.resolvedEntry=void 0,this.name=e.name,this.versionPath=e.versionPath,this.entryId=e.entryId,this.originalSpecifier=e.originalSpecifier,this.dependencyKind=e.dependencyKind,this.peerDependencyMeta=e.peerDependencyMeta,this.containingEntry=e.containingEntry}}class u{constructor(e){this.dependencies=[],this.transitivePeerDependencies=new Set,this.referrers=[],this.kind=e.kind,this.entryId=e.entryId,this.rawEntryId=e.rawEntryId,this.packageJsonFolderPath=e.packageJsonFolderPath,this.entryPackageName=e.entryPackageName,this.displayText=e.displayText,this.entryPackageVersion=e.entryPackageVersion,this.entrySuffix=e.entrySuffix}}class p{constructor(e){this.entries=[],this.workspace=Object.assign({},e)}}const f=window.appContext.serviceUrl;var m=n(294),h="OcndyDBetZor3ptzTnTX",v="Wg5pG3RVf6SQ51i0tVkd",y="NBIr3yosJ9gX6LZcnC7T";const g=null,b=c.wA,E=c.d4;var w=n(590);const k="LOCKFILE_EXPLORER_BOOKMARKS",x="LOCKFILE_EXPLORER_PROJECT_FILTER",S="LOCKFILE_EXPLORER_PACKAGE_FILTER",C=e=>e===r.Project?localStorage.getItem(x)||"":localStorage.getItem(S)||"",P={allEntries:[],filters:{[r.Project]:!1,[r.Package]:!0,[r.SideBySide]:!1,[r.Doppelganger]:!1},selectedEntryStack:[],selectedEntryForwardStack:[],bookmarkedEntries:[]},N=(0,w.Z0)({name:"entry",initialState:P,reducers:{loadEntries:(e,t)=>{e.allEntries=t.payload;const n=(()=>{const e=JSON.parse(localStorage.getItem(k)||"{}"),t=new Set;for(const n of Object.keys(e))t.add(n);return t})();for(const r of t.payload)n.has(r.rawEntryId)&&e.bookmarkedEntries.push(r)},setFilter:(e,t)=>{e.filters[t.payload.filter]=t.payload.state},clearStackAndPush:(e,t)=>{e.selectedEntryStack=[t.payload],e.selectedEntryForwardStack=[]},pushToStack:(e,t)=>{e.selectedEntryStack.push(t.payload),e.selectedEntryForwardStack=[],t.payload.kind===r.Package?(e.filters[r.Project]=!1,e.filters[r.Package]=!0):(e.filters[r.Project]=!0,e.filters[r.Package]=!1)},popStack:e=>{if(e.selectedEntryStack.length>1){const t=e.selectedEntryStack.pop();e.selectedEntryForwardStack.push(t),e.selectedEntryStack.length>=1&&(e.selectedEntryStack[e.selectedEntryStack.length-1].kind===r.Package?(e.filters[r.Project]=!1,e.filters[r.Package]=!0):(e.filters[r.Project]=!0,e.filters[r.Package]=!1))}},forwardStack:e=>{if(e.selectedEntryForwardStack.length>0){const t=e.selectedEntryForwardStack.pop();e.selectedEntryStack.push(t),t.kind===r.Package?(e.filters[r.Project]=!1,e.filters[r.Package]=!0):(e.filters[r.Project]=!0,e.filters[r.Package]=!1)}},addBookmark:(e,t)=>{e.bookmarkedEntries.includes(t.payload)||(e.bookmarkedEntries.push(t.payload),(e=>{const t=e.rawEntryId,n=JSON.parse(localStorage.getItem(k)||"{}");n[t]=!0,localStorage.setItem(k,JSON.stringify(n))})(t.payload))},removeBookmark:(e,t)=>{e.bookmarkedEntries=e.bookmarkedEntries.filter(e=>e.rawEntryId!==t.payload.rawEntryId),(e=>{const t=e.rawEntryId,n=JSON.parse(localStorage.getItem(k)||"{}");delete n[t],localStorage.setItem(k,JSON.stringify(n))})(t.payload)}}}),T=e=>e.entry.selectedEntryStack.length?e.entry.selectedEntryStack[e.entry.selectedEntryStack.length-1]:void 0,j=e=>{const t=[];return e.entry.filters[r.Package]?t.push(...e.entry.allEntries.filter(e=>e.kind===r.Package)):e.entry.filters[r.Project]&&t.push(...e.entry.allEntries.filter(e=>e.kind===r.Project)),t},{loadEntries:I,setFilter:A,clearStackAndPush:R,pushToStack:O,popStack:_,forwardStack:D,addBookmark:M,removeBookmark:F}=N.actions,L=N.reducer,B=({group:e})=>{const t=E(T),n=E(e=>e.entry.filters),o=b(),l=(0,a.useRef)(null),c=(0,a.useCallback)(e=>()=>{o(O(e))},[o]);return(0,a.useEffect)(()=>{var n;t&&t.entryPackageName===e.entryName&&(null===(n=l.current)||void 0===n||n.scrollIntoView({behavior:"smooth"}))},[t,e]),n[r.Project]?a.createElement("div",{className:h,ref:l},e.versions.map(e=>a.createElement("div",{key:e.rawEntryId,onClick:c(e),className:`${v} ${(null==t?void 0:t.rawEntryId)===e.rawEntryId?y:""}`},a.createElement(m.Text,{type:"h5"},e.entryPackageName)))):a.createElement("div",{className:h,ref:l},a.createElement(m.Text,{type:"h5",bold:!0},e.entryName),e.versions.map(e=>a.createElement("div",{key:e.rawEntryId,onClick:c(e),className:`${v} ${(null==t?void 0:t.rawEntryId)===e.rawEntryId?y:""}`},a.createElement(m.Text,{type:"p"},e.entryPackageVersion," ",e.entrySuffix&&`[${e.entrySuffix}]`))))},z=()=>{const e=b(),[t,n]=(0,a.useState)(""),[o,l]=(0,a.useState)(""),c=E(j),s=E(e=>e.entry.filters),i=(0,a.useCallback)(e=>t=>{e===r.Project?n(t.target.value):l(t.target.value),((e,t)=>{t===r.Project?localStorage.setItem(x,e):localStorage.setItem(S,e)})(t.target.value,e)},[]);(0,a.useEffect)(()=>{n(C(r.Project)),l(C(r.Package))},[]);const d=(0,a.useCallback)((t,n)=>()=>{e(A({filter:t,state:n}))},[e]),u=(0,a.useCallback)(t=>{"Projects"===t?(e(A({filter:r.Project,state:!0})),e(A({filter:r.Package,state:!1}))):(e(A({filter:r.Package,state:!0})),e(A({filter:r.Project,state:!1})))},[e,s]);return c?a.createElement("div",{className:"yk7wrFMnnNyYLABMBhz_"},a.createElement("div",{className:"X00sOTmx1ir4Oc41DIvM"},a.createElement(m.Tabs,{items:[{header:"Projects"},{header:"Packages"}],value:s[r.Project]?"Projects":"Packages",onChange:u}),a.createElement(m.Input,{type:"search",placeholder:"Filter...",value:s[r.Project]?t:o,onChange:i(s[r.Project]?r.Project:r.Package)}),a.createElement(m.ScrollArea,null,(()=>{let e=c;t&&s[r.Project]?e=c.filter(e=>-1!==e.entryPackageName.indexOf(t)):o&&s[r.Package]&&(e=c.filter(e=>-1!==e.entryPackageName.indexOf(o)));const n=e.reduce((e,t)=>{const n=e[t.entryPackageName]||[];return n.push(t),e[t.entryPackageName]=n,e},{});let a=[];for(const[e,t]of Object.entries(n))a.push({entryName:e,versions:t});return s[r.SideBySide]&&(a=a.filter(e=>e.versions.length>1)),s[r.Doppelganger]&&(a=a.filter(e=>(e=>{const t=new Set;for(const n of e){if(t.has(n.entryPackageVersion))return!0;t.add(n.entryPackageVersion)}return!1})(e.versions))),s[r.Project]&&(a=a.sort((e,t)=>e.entryName>t.entryName?1:t.entryName>e.entryName?-1:0)),a})().map(e=>a.createElement(B,{group:e,key:e.entryName}))),s[r.Package]?a.createElement("div",{className:"K6dDN5KzjLkbPPFWUaly"},a.createElement(m.Text,{type:"h5",bold:!0},"Filters"),a.createElement(m.Checkbox,{label:"Must have side-by-side versions",isChecked:s[r.SideBySide],onChecked:d(r.SideBySide,!s[r.SideBySide])}),a.createElement(m.Checkbox,{label:"Must have doppelgangers",isChecked:s[r.Doppelganger],onChecked:d(r.Doppelganger,!s[r.Doppelganger])})):null)):g},H=window.appContext.serviceUrl;async function $(e){try{const t=await fetch(`${H}/api/package-json`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectPath:e})});return await t.json()}catch(e){return void console.error("Could not load package json file: ",e)}}const U={specChanges:new Map},W=(0,w.Z0)({name:"workspace",initialState:U,reducers:{loadSpecChanges:(e,t)=>{e.specChanges=t.payload}}}),{loadSpecChanges:V}=W.actions,K=W.reducer,X=(e,t)=>{var n,r;switch(null===(n=e.get(t))||void 0===n?void 0:n.type){case"add":return"[Added by .pnpmfile.cjs]";case"diff":return`[Changed from ${null===(r=e.get(t))||void 0===r?void 0:r.from}]`;case"remove":return"[Deleted by .pnpmfile.cjs]";default:return"No Change"}},Y=(e,t)=>{if(!e)return!1;for(const n of e.dependencies)if(t.has(n.name))return!0;return!1};var Z=n(514);const J=e=>a.createElement(Z.f4,{theme:Z.Zj.vsLight,code:e.code,language:e.language},({className:e,style:t,tokens:n,getLineProps:r,getTokenProps:o})=>a.createElement("pre",{style:t},n.map((e,t)=>a.createElement("div",Object.assign({key:t},r({line:e})),e.map((e,t)=>a.createElement("span",Object.assign({key:t},o({token:e}))))))));var G="rXOH6AJQU2eYrNAXbp4V";const Q="PACKAGE_JSON",q="PACKAGE_SPEC",ee="PARSED_PACKAGE_JSON",te=()=>{const e=b(),[t,n]=(0,a.useState)(void 0),[o,l]=(0,a.useState)(void 0),[c,s]=(0,a.useState)(""),i=E(T),d=E(e=>e.workspace.specChanges),[u,p]=(0,a.useState)(ee),f=(0,a.useCallback)(e=>{p(e)},[]);(0,a.useEffect)(()=>{(async function(){const e=await async function(){try{const e=await fetch(`${H}/api/pnpmfile`);return await e.text()}catch(e){return console.error("Could not load cjs file: ",e),"Missing CJS"}}();s(e)})().catch(e=>{console.error(`Failed to load project's pnpm file: ${e}`)})},[]),(0,a.useEffect)(()=>{i&&(i.entryPackageName?async function(t){const r=await $(t);n(r);const o=await async function(e){try{const t=await fetch(`${H}/api/package-spec`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectPath:e})});return await t.json()}catch(e){return void console.error("Could not load cjs file: ",e)}}(t);if(l(o),r&&o){const t=((e,t)=>{const n=new Map,r=new Map;for(const[t,r]of Object.entries(Object.assign(Object.assign(Object.assign({},e.dependencies),e.devDependencies),e.peerDependencies)))n.set(t,r);for(const[e,n]of Object.entries(Object.assign(Object.assign(Object.assign({},t.dependencies),t.devDependencies),t.peerDependencies)))r.set(e,n);const o=new Map;for(const e of n.keys())r.has(e)?r.get(e)!==n.get(e)&&o.set(e,{type:"diff",packageName:e,from:n.get(e),to:r.get(e)}):o.set(e,{type:"remove",packageName:e});for(const e of r.keys())n.has(e)||o.set(e,{type:"add",packageName:e});return o})(r,o);e(V(t))}}(i.packageJsonFolderPath).catch(e=>{console.error(`Failed to load project information: ${e}`)}):console.log("The selected entry has no entry name: ",i.entryPackageName))},[e,i]);const h=e=>t=>{var n;const[r,o]=t;if(!d.has(r))return e?a.createElement(m.Text,{type:"p",key:r},r,":"):a.createElement(m.Text,{type:"p",key:r},o);switch(null===(n=d.get(r))||void 0===n?void 0:n.type){case"add":return e?a.createElement(m.Text,{type:"p",key:r},a.createElement("span",{className:"nTIc62ACgp5xMWIvZ4cn"},r)):a.createElement(m.Text,{type:"p",key:r},o," ",X(d,r));case"diff":return e?a.createElement(m.Text,{type:"p",key:r},a.createElement("span",{className:"I4A8ZZlpCL3Op0c53VjN"},r)):a.createElement(m.Text,{type:"p",key:r},o," ",X(d,r));case"remove":return e?a.createElement(m.Text,{type:"p",key:r},a.createElement("span",{className:"iavWjvHy9s5MhCZ_ncgb"},r)):a.createElement(m.Text,{type:"p",key:r},o," ",X(d,r));default:return e?a.createElement(m.Text,{type:"p",key:r},r,":"):a.createElement(m.Text,{type:"p",key:r},o)}};return a.createElement("div",{className:"kzgyQkswpx6xUEo4zOa8"},a.createElement(m.Tabs,{items:[{header:"package spec "+(Y(i,d)?"*":""),value:ee},{header:"package.json",value:Q},{header:".pnpmfile.cjs",value:q}],value:u,onChange:f}),a.createElement("div",{className:"e2KEBfZCHwEMeH4j6wS7"},a.createElement(m.ScrollArea,null,a.createElement("div",{className:"zjGuydlDBdLj1kQnKe4V"},(()=>{switch(u){case Q:return t?a.createElement(J,{code:JSON.stringify(t,null,2),language:"json"}):a.createElement(m.Text,{type:"h5",bold:!0},"Please select a Project or Package to view it's package.json");case q:return c?a.createElement(J,{code:c,language:"js"}):a.createElement(m.Text,{type:"h5",bold:!0},"Couldn't load the pnpmfile.cjs file - does it exist in the expected location? (/common/config/rush/.pnpmfile.cjs)");case ee:return o?a.createElement("div",{className:"Ko0YQxSlY0hCIDTfmNlr"},a.createElement("div",{className:G},a.createElement(m.Text,{type:"h5",bold:!0},"Package Name:"),a.createElement(m.Text,{type:"p"},(null==i?void 0:i.kind)===r.Project?o.name:null==i?void 0:i.displayText)),a.createElement("div",{className:G},a.createElement(m.Text,{type:"h5",bold:!0},"Version:"),a.createElement(m.Text,{type:"p"},(null==i?void 0:i.entryPackageVersion)||o.version)),a.createElement("div",{className:"hqNteMkwhYXuZqHE_8MJ"},a.createElement("div",null,a.createElement(m.Text,{type:"h5",bold:!0},"Dependencies"),o.dependencies&&Object.entries(o.dependencies).map(h(!0)),a.createElement(m.Text,{type:"h5",bold:!0},"Dev Dependencies"),o.devDependencies&&Object.entries(o.devDependencies).map(h(!0)),a.createElement(m.Text,{type:"h5",bold:!0},"Peer Dependencies"),o.peerDependencies&&Object.entries(o.peerDependencies).map(h(!0))),a.createElement("div",null,a.createElement(m.Text,{type:"h5",bold:!0}," "),o.dependencies&&Object.entries(o.dependencies).map(h(!1)),a.createElement(m.Text,{type:"h5",bold:!0}," "),o.devDependencies&&Object.entries(o.devDependencies).map(h(!1)),a.createElement(m.Text,{type:"h5",bold:!0}," "),o.peerDependencies&&Object.entries(o.peerDependencies).map(h(!1))))):a.createElement(m.Text,{type:"h5",bold:!0},"Please select a Project or Package to view the parsed package.json");default:return null}})()))))};var ne,re,oe="_R50_3JsFs2FC9kVffQL",ae="mRQWdzXzOM1NpFUpYnhP",le="rIv2KvSZ0CKMbctSHL04",ce="wzeVrHi3oyOhEe6qD3PX",se="lGp34XdOFjHfZNwiilgC";!function(e){e[e.Determinant=0]="Determinant",e[e.TransitiveReferrer=1]="TransitiveReferrer"}(ne||(ne={})),function(e){e.Regular="dependencies",e.Dev="devDependencies",e.Peer="peerDependencies"}(re||(re={}));const ie=()=>{var e,t;const n=E(T),r=E(e=>e.workspace.specChanges),l=b(),[c,i]=(0,a.useState)(null),[d,u]=(0,a.useState)([]),[p,f]=(0,a.useState)(new Map);(0,a.useEffect)(()=>{(async function(e){const t=new Map;await Promise.all(e.map(async e=>{const n=await $(e.packageJsonFolderPath);return t.set(e.rawEntryId,n),n})),f(t)})((null==n?void 0:n.referrers)||[]).catch(e=>{console.error(`Failed to load referrers package.json: ${e}`)}),n&&i(null)},[n]);const h=(0,a.useCallback)(e=>()=>{if(c&&c.entryId===e.entryId)e.resolvedEntry?l(O(e.resolvedEntry)):((...e)=>{window.appContext.debugMode&&console.log("Diagnostic: ",...e)})("No resolved entry for dependency:",e.entryId);else if(n){if(console.log("dependency to trace: ",e),i(e),e.dependencyKind!==o.Peer)return;const t=[n],r=new Set,a=new Set,l=new Set;for(l.add(n);t.length;){const n=t.pop();if(n)for(const o of n.referrers){let c=!1;for(const t of o.dependencies)if(t.name===e.name){r.add(o),c=!0;break}if(!c){o.transitivePeerDependencies.has(e.name)?a.add(o):console.error('Error analyzing influencers: A referrer appears to be missing its "transitivePeerDependencies" field in the YAML file: ',e,o,n);for(const e of n.referrers)l.has(e)||(t.push(e),l.add(e))}}}const c=[];for(const e of r.values())c.push({entry:e,type:ne.Determinant});for(const e of a.values())c.push({entry:e,type:ne.TransitiveReferrer});u(c)}},[n,c]),v=(0,a.useCallback)(e=>()=>{l(O(e))},[n]);return n?a.createElement(a.Fragment,null,a.createElement("div",{className:"KWDuEbG1GmwLxFmPPppw"},a.createElement("div",{className:s},a.createElement(m.Text,{type:"h4",bold:!0},"Direct Referrers"),a.createElement("div",{className:oe},a.createElement(m.ScrollArea,null,null===(e=n.referrers)||void 0===e?void 0:e.map(e=>{var t;return a.createElement("div",{className:ae,key:e.rawEntryId,onClick:v(e)},a.createElement(m.Text,{type:"h5",bold:!0},"Name: ",e.displayText),a.createElement("div",null,a.createElement(m.Text,{type:"p"},"Entry ID: ",e.rawEntryId),a.createElement(m.Text,{type:"p"},"Dependency version: ",null===(t=((e,t)=>{var n;const r=p.get(e);if(!r)return;const o=[re.Regular,re.Dev,re.Peer];for(const e of o){const o=null===(n=r[e])||void 0===n?void 0:n[t];if(o)return{type:e,version:o}}})(e.rawEntryId,n.entryPackageName))||void 0===t?void 0:t.version)))})))),a.createElement("div",{className:s},a.createElement(m.Text,{type:"h4",bold:!0},"Direct Dependencies"),a.createElement("div",{className:oe},a.createElement(m.ScrollArea,null,null===(t=n.dependencies)||void 0===t?void 0:t.map(e=>a.createElement("div",{className:`${ae} ${(null==c?void 0:c.entryId)===e.entryId&&"GbZbP1wHbcReGrxpZ3Ra"}`,key:e.entryId||e.name,onClick:h(e)},a.createElement(m.Text,{type:"h5",bold:!0},"Name: ",e.name," ",e.dependencyKind===o.Peer?(e.peerDependencyMeta.optional?"(Optional)":"(Non-optional)")+" Peer Dependency":""),a.createElement("div",null,a.createElement(m.Text,{type:"p"},"Version: ",e.versionPath),a.createElement(m.Text,{type:"p"},"Entry ID: ",e.entryId)))))))),c?a.createElement("div",{className:"xSxHmjxIXTOSskLhma3A"},a.createElement(m.ScrollArea,null,a.createElement("div",{className:se},a.createElement(m.Text,{type:"h5",bold:!0},"Selected Dependency:"," "),a.createElement(m.Text,{type:"span"},c.name,": ",c.versionPath)),a.createElement("div",{className:se},a.createElement(m.Text,{type:"h5",bold:!0},"package.json spec:"," "),a.createElement(m.Text,{type:"span"},c.dependencyKind===o.Peer?`"${c.peerDependencyMeta.version}" ${c.peerDependencyMeta.optional?"Optional":"Required"} Peer`:c.versionPath)),a.createElement("div",{className:se},a.createElement(m.Text,{type:"h5",bold:!0},".pnpmfile.cjs:"," "),a.createElement(m.Text,{type:"span"},r.has(c.name)?X(r,c.name):"No Effect")))):g,(()=>{if(!n)return g;if(!n.dependencies.filter(e=>e.dependencyKind===o.Peer).length)return a.createElement("div",{className:`${s} ${le}`},a.createElement(m.Text,{type:"h5"},"No peer dependencies."));if(!c||c.dependencyKind!==o.Peer)return a.createElement("div",{className:`${s} ${le}`},a.createElement(m.Text,{type:"h5"},"Select a peer dependency to view its influencers"));const e=d.filter(e=>e.type===ne.Determinant),t=d.filter(e=>e.type===ne.TransitiveReferrer);return a.createElement("div",{className:`${s} ${le}`},a.createElement(m.ScrollArea,null,a.createElement(m.Text,{type:"h5",bold:!0},"Determinants:"),e.length?e.map(({entry:e})=>a.createElement("a",{className:ce,key:e.rawEntryId,onClick:v(e)},e.displayText)):a.createElement(m.Text,{type:"p"},"(none)"),a.createElement(m.Text,{type:"h5",bold:!0,className:"aKaZTElUypfUGQWhNJON"},"Transitive Referencers:"),t.length?t.map(({entry:e})=>a.createElement("a",{className:ce,key:e.rawEntryId,onClick:v(e)},e.displayText)):a.createElement(m.Text,{type:"p"},"(none)")))})()):a.createElement("div",{className:`${s} ${le}`},a.createElement(m.Text,{type:"h5",bold:!0},"Select an entry to view its details"))};const de=()=>{const e=E(e=>e.entry.bookmarkedEntries),t=b(),n=(0,a.useCallback)(e=>()=>{t(R(e))},[t]),r=(0,a.useCallback)(e=>()=>{t(F(e))},[t]);return a.createElement("div",{className:`${s} aM5oGgiHs9rRHcHdAqFh`},a.createElement(m.ScrollArea,null,a.createElement(m.Text,{type:"h5"},"Bookmarks"),a.createElement("hr",null),e.map(e=>a.createElement("div",{key:e.rawEntryId,className:"Ci1rEoM4eR29ZJcnvJJE"},a.createElement("div",{onClick:n(e),className:"RNRBHB_iXGOnzVd_Ry9b"},a.createElement(m.Text,{type:"p"},e.displayText)),a.createElement(m.Button,{onClick:r(e)},"Remove")))))};var ue="dklLbMzvzbuzLd2XJh3W",pe="vJvmAdZ2VafvyXjc16Mz";const fe=()=>{const e=E(T),t=E(t=>!!e&&t.entry.bookmarkedEntries.includes(e)),n=E(e=>e.entry.selectedEntryStack),r=E(e=>e.entry.selectedEntryForwardStack),o=b(),l=(0,a.useCallback)(()=>{e&&o(M(e))},[o,e]),c=(0,a.useCallback)(()=>{e&&o(F(e))},[o,e]),s=(0,a.useCallback)(()=>{o(_())},[o]),i=(0,a.useCallback)(()=>{o(D())},[o]),d=()=>a.createElement("div",{className:"LkGUkEuAC1lrNLYWXZAB"},a.createElement(m.Button,{disabled:n.length<=1,onClick:s},"Back"),a.createElement(m.Button,{disabled:0===r.length,onClick:i},"Forward"),t?a.createElement(m.Button,{onClick:c,disabled:!e},"Remove Bookmark"):a.createElement(m.Button,{onClick:l,disabled:!e},"Add Bookmark"));return e?a.createElement("div",{className:ue},a.createElement(m.ScrollArea,null,a.createElement("div",{className:pe},a.createElement("div",{className:"Hd2WYHIwrFrldD0I8qDj"},a.createElement(m.Text,{type:"h5",bold:!0},"Selected entry:"),a.createElement("span",null,e.displayText)),d()),a.createElement("div",null,a.createElement(m.Text,{type:"p"},"Package Entry: ",e.rawEntryId),a.createElement(m.Text,{type:"p"},"Package JSON path: ",e.packageJsonFolderPath)))):a.createElement("div",{className:ue},a.createElement("div",{className:pe},a.createElement(m.Text,{type:"h5",bold:!0},"No Entry Selected"),d()))};var me="wR2C2OTixe7QR738j44h",he="Oo_rkIqOkO0j8slDAm5V";const ve=()=>{const e=window.appContext.appVersion;return a.createElement("div",{className:"mqcpXwTQfD4A2eS4QRMa"},a.createElement("div",{className:"gxAXHLK7j_oYpFDmIJLR"},a.createElement("a",{href:"https://lfx.rushstack.io/",target:"_blank",rel:"noreferrer"},a.createElement("img",{className:me,src:n(201)}))),a.createElement("div",null,a.createElement("a",{href:"https://lfx.rushstack.io/",target:"_blank",rel:"noreferrer"},a.createElement("div",{className:"rHArsuIMBTbIFs5o2cuw"},a.createElement("img",{className:me,src:n(158)})),a.createElement("div",{className:"P6XzPBuW8Osze59RSui1"},a.createElement("img",{className:me,src:n(405)})),a.createElement("div",{className:he},e)),a.createElement("a",{href:"https://lfx.rushstack.io/",target:"_blank",rel:"noreferrer"},a.createElement("div",{className:he},"lfx.rushstack.io"))))};const ye=()=>{const[e,t]=(0,a.useState)(!0),[n,r]=(0,a.useState)(!1),[o,l]=(0,a.useState)(!1);async function c(){await async function(){try{return await fetch(`${H}/api/health`),!0}catch(e){return!1}}()?t(!0):t(!1),r(!1)}(0,a.useEffect)(()=>{window.setInterval(c,2e3)},[]);const i=(0,a.useCallback)(()=>{r(!0),l(!0),c().catch(e=>{console.error(`Unexpected exception: ${e}`)})},[]);return e?null:a.createElement("div",{className:"uVMB4BjTN3pGKpcO9hFB"},a.createElement("div",{className:`gyz87hLRy_DyMUyraMaM ${s}`},a.createElement(m.Text,{type:"h5",bold:!0},"The Lockfile Explorer server has disconnected!"),o?a.createElement(m.Text,{type:"p"},'We were still not able to connect to the server. Are you sure the "lockfile-explorer" shell command is running?'):a.createElement(m.Text,{type:"p"},'Please restart the "lockfile-explorer" shell command to continue using this application.'),a.createElement("div",{className:"UkJzWedRWYeVMPCVDmCS"},a.createElement(m.Button,{disabled:n,onClick:i},"Check Again"),n?a.createElement(m.Text,{type:"p"},"Checking..."):null)))},ge=(0,w.U1)({reducer:{entry:L,workspace:K},middleware:e=>e({serializableCheck:!1})}),be=document.getElementById("root");l.createRoot(be).render(a.createElement(c.Kq,{store:ge},a.createElement(()=>{const e=b();return(0,a.useEffect)(()=>{(async function(){const t=await async function(){console.log("Loading graph");const e=await fetch(`${f}/api/graph`);return function(e){const t=new p(e.workspace),n=t.entries;function r(e){const t=n[e];if(void 0===t)throw new Error("Invalid jsonId");return t}const o=e.entries;for(const e of o){const t={kind:e.kind,entryId:e.entryId,rawEntryId:e.rawEntryId,packageJsonFolderPath:e.packageJsonFolderPath,entryPackageName:e.entryPackageName,displayText:e.displayText,entryPackageVersion:e.entryPackageVersion,entrySuffix:e.entrySuffix};n.push(new u(t))}for(let e=0;e<o.length;++e){const n=o[e],a=t.entries[e];for(const e of n.dependencies){const t=new d({name:e.name,versionPath:e.versionPath,entryId:e.entryId,originalSpecifier:e.originalSpecifier,dependencyKind:e.dependencyKind,peerDependencyMeta:{name:e.peerDependencyMeta.name,version:e.peerDependencyMeta.version,optional:e.peerDependencyMeta.optional},containingEntry:a});e.resolvedEntryJsonId&&(t.resolvedEntry=r(e.resolvedEntryJsonId)),a.dependencies.push(t)}for(const e of n.transitivePeerDependencies)a.transitivePeerDependencies.add(e);for(const e of n.referrerJsonIds)a.referrers.push(r(e))}return t}(await e.json()).entries}();e(I(t))})().catch(e=>{console.log(`Failed to read lockfile: ${e}`)})},[e]),a.createElement(a.Fragment,null,a.createElement(ye,null),a.createElement("div",{className:"uXEYthi0e8fjYu_FisVm"},a.createElement("div",{className:"ms-Grid",dir:"ltr"},a.createElement("div",{className:"ms-Grid-row"},a.createElement("div",{className:`ms-Grid-col ms-sm3 ${i}`},a.createElement(z,null)),a.createElement("div",{className:`ms-Grid-col ms-sm7 ${i}`},a.createElement(fe,null),a.createElement(te,null),a.createElement(ie,null)),a.createElement("div",{className:`ms-Grid-col ms-sm2 ${i}`},a.createElement(ve,null),a.createElement(de,null))))))},null)))},201:function(e,t,n){"use strict";e.exports=n.p+"d39919ddc699d58b84ba.svg"},158:function(e,t,n){"use strict";e.exports=n.p+"d13d30e9b42faf842d2f.svg"},405:function(e,t,n){"use strict";e.exports=n.p+"510f03f81080fd3cfd63.svg"}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var a=n[e]={exports:{}};return t[e].call(a.exports,a,a.exports,r),a.exports}r.m=t,e=[],r.O=function(t,n,o,a){if(!n){var l=1/0;for(d=0;d<e.length;d++){n=e[d][0],o=e[d][1],a=e[d][2];for(var c=!0,s=0;s<n.length;s++)(!1&a||l>=a)&&Object.keys(r.O).every(function(e){return r.O[e](n[s])})?n.splice(s--,1):(c=!1,a<l&&(l=a));if(c){e.splice(d--,1);var i=o();void 0!==i&&(t=i)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[n,o,a]},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}(),function(){var e={524:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,a,l=n[0],c=n[1],s=n[2],i=0;if(l.some(function(t){return 0!==e[t]})){for(o in c)r.o(c,o)&&(r.m[o]=c[o]);if(s)var d=s(r)}for(t&&t(n);i<l.length;i++)a=l[i],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(d)},n=self.webpackChunk_rushstack_lockfile_explorer_web=self.webpackChunk_rushstack_lockfile_explorer_web||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var o=r.O(void 0,[162],function(){return r(383)});o=r.O(o)}();
@@ -1 +0,0 @@
1
- .HK80a6ZVkdxoTKzrP9Eq{background-color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.141);padding:12px}.uXEYthi0e8fjYu_FisVm{display:flex;flex-direction:row;flex-wrap:nowrap}.uXEYthi0e8fjYu_FisVm>*{width:100%}.FFuReYR1pIswEW7Az6w9{flex-grow:1}.HqAzbQwu1zc9yH8ZQESI{display:flex;flex-direction:column;height:100vh;overflow-y:scroll}.yk7wrFMnnNyYLABMBhz_{background-color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.141);height:calc(100% - 24px);margin-top:12px;padding:0 12px}.X00sOTmx1ir4Oc41DIvM{display:flex;flex-direction:column;height:calc(100% - 35px)}.X00sOTmx1ir4Oc41DIvM>*+*{margin-top:12px}.ZcSkxw5an6poYOzXiz_9{border:1px solid #fff;cursor:pointer;padding:4px 8px}.ZcSkxw5an6poYOzXiz_9:hover{border:1px solid #000}.OcndyDBetZor3ptzTnTX>*+*{margin-top:4px}.Wg5pG3RVf6SQ51i0tVkd{cursor:pointer;padding:4px 8px}.Wg5pG3RVf6SQ51i0tVkd:hover{background:#dff6dd}.NBIr3yosJ9gX6LZcnC7T{background-color:#dff6dd}.PoJj8_8xv9BXiMVPKFVE{flex:1;height:100%}.K6dDN5KzjLkbPPFWUaly{border-top:1px solid #000;padding-top:24px}.K6dDN5KzjLkbPPFWUaly>*+*{margin-top:4px}.kzgyQkswpx6xUEo4zOa8{background-color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.141);flex:1;margin-top:12px;min-height:400px}.e2KEBfZCHwEMeH4j6wS7{height:calc(100% - 46px);padding:0 12px}.zjGuydlDBdLj1kQnKe4V{padding-top:12px}.nTIc62ACgp5xMWIvZ4cn{background-color:#107c10}.iavWjvHy9s5MhCZ_ncgb,.nTIc62ACgp5xMWIvZ4cn{border-radius:2px;color:#fff;padding:2px 4px}.iavWjvHy9s5MhCZ_ncgb{background-color:red}.I4A8ZZlpCL3Op0c53VjN{background-color:#b8860b;border-radius:2px;color:#fff;padding:2px 4px}.Ko0YQxSlY0hCIDTfmNlr h5{margin-bottom:8px}.Ko0YQxSlY0hCIDTfmNlr>*+*{margin-top:8px}.rXOH6AJQU2eYrNAXbp4V>*{display:inline}.rXOH6AJQU2eYrNAXbp4V>*+*{margin-left:12px}.hqNteMkwhYXuZqHE_8MJ{align-items:flex-start;display:flex}.hqNteMkwhYXuZqHE_8MJ>*+*{margin-left:12px}.hqNteMkwhYXuZqHE_8MJ div>*+*{margin-top:4px}.KWDuEbG1GmwLxFmPPppw{display:flex;flex:1;justify-content:space-between;min-height:400px;padding-top:12px}.KWDuEbG1GmwLxFmPPppw>*{width:calc(50% - 36px)}._R50_3JsFs2FC9kVffQL{height:calc(100% - 24px);margin-top:8px}.mRQWdzXzOM1NpFUpYnhP{border:1px solid #fff;cursor:pointer;margin-top:12px}.mRQWdzXzOM1NpFUpYnhP:hover{border:1px solid #107c10}.mRQWdzXzOM1NpFUpYnhP>*+*{margin-top:8px}.GbZbP1wHbcReGrxpZ3Ra{background-color:#dff6dd}.rIv2KvSZ0CKMbctSHL04{margin:12px 0}.xSxHmjxIXTOSskLhma3A{background-color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.141);margin-top:12px;padding:12px}.wzeVrHi3oyOhEe6qD3PX{cursor:pointer;display:block}.wzeVrHi3oyOhEe6qD3PX:hover{color:#107c10;text-decoration:underline}.lGp34XdOFjHfZNwiilgC{align-items:center;display:flex}.lGp34XdOFjHfZNwiilgC span{margin-left:4px}.aKaZTElUypfUGQWhNJON{margin-top:12px}.aM5oGgiHs9rRHcHdAqFh{height:calc(100vh - 138px);margin:12px 0}.Ci1rEoM4eR29ZJcnvJJE{cursor:pointer;margin-top:8px;padding:4px 0}.Ci1rEoM4eR29ZJcnvJJE>*+*{margin-top:8px}.RNRBHB_iXGOnzVd_Ry9b:hover{background:#dff6dd}.dklLbMzvzbuzLd2XJh3W{background-color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.141);margin-top:12px;padding:12px}.dklLbMzvzbuzLd2XJh3W>*+*{margin-top:8px}.vJvmAdZ2VafvyXjc16Mz{display:flex;justify-content:space-between}.Hd2WYHIwrFrldD0I8qDj{align-items:center;display:flex}.Hd2WYHIwrFrldD0I8qDj>*+*{margin-left:8px}.LkGUkEuAC1lrNLYWXZAB{display:flex}.LkGUkEuAC1lrNLYWXZAB>*{height:21px}.LkGUkEuAC1lrNLYWXZAB>*+*{margin-left:8px}.mqcpXwTQfD4A2eS4QRMa{display:flex}.mqcpXwTQfD4A2eS4QRMa>*+*{margin-left:12px}.mqcpXwTQfD4A2eS4QRMa a{text-decoration:none}.gxAXHLK7j_oYpFDmIJLR{height:64px;padding-top:5px}.rHArsuIMBTbIFs5o2cuw{height:20px;padding-top:7px}.P6XzPBuW8Osze59RSui1{height:20px;padding-top:5px}.wR2C2OTixe7QR738j44h{height:100%;-o-object-fit:contain;object-fit:contain}.Oo_rkIqOkO0j8slDAm5V{color:#ab9e8e;font-family:Tahoma,sans-serif;font-size:14px;padding-top:4px}.uVMB4BjTN3pGKpcO9hFB{background-color:rgba(0,0,0,.251);bottom:0;left:0;position:absolute;right:0;top:0;z-index:10}.gyz87hLRy_DyMUyraMaM{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.gyz87hLRy_DyMUyraMaM>*+*{margin-top:12px}.UkJzWedRWYeVMPCVDmCS{align-items:center;display:flex}.UkJzWedRWYeVMPCVDmCS>*+*{margin-left:8px}body,html{background-color:#f3f2f1;box-sizing:border-box;font-family:Tahoma,sans-serif;height:100%;margin:0}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3
- // See LICENSE in the project root for license information.
4
- // This file is copied into the dist folder when the web app is being loaded
5
- // from Webpack dev server. In a production release, a generated script is served by the
6
- // Node.js service with the live context object.
7
- // eslint-disable-next-line no-console
8
- console.log('Loaded stub/initappcontext.js');
9
- window.appContext = {
10
- serviceUrl: 'http://localhost:8091',
11
- appVersion: '(dev)',
12
- debugMode: true
13
- };
14
- //# sourceMappingURL=initappcontext.js.map