@cyberismo/backend 0.0.21 → 0.0.22

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 (126) hide show
  1. package/dist/app.d.ts +5 -2
  2. package/dist/app.js +22 -9
  3. package/dist/app.js.map +1 -1
  4. package/dist/auth/index.d.ts +16 -0
  5. package/dist/auth/index.js +15 -0
  6. package/dist/auth/index.js.map +1 -0
  7. package/dist/auth/keycloak.d.ts +27 -0
  8. package/dist/auth/keycloak.js +81 -0
  9. package/dist/auth/keycloak.js.map +1 -0
  10. package/dist/auth/mock.d.ts +23 -0
  11. package/dist/auth/mock.js +28 -0
  12. package/dist/auth/mock.js.map +1 -0
  13. package/dist/auth/types.d.ts +16 -0
  14. package/dist/auth/types.js +14 -0
  15. package/dist/auth/types.js.map +1 -0
  16. package/dist/domain/auth/index.d.ts +14 -0
  17. package/dist/domain/auth/index.js +30 -0
  18. package/dist/domain/auth/index.js.map +1 -0
  19. package/dist/domain/calculations/index.js +3 -1
  20. package/dist/domain/calculations/index.js.map +1 -1
  21. package/dist/domain/calculations/service.js +13 -11
  22. package/dist/domain/calculations/service.js.map +1 -1
  23. package/dist/domain/cardTypes/index.js +5 -3
  24. package/dist/domain/cardTypes/index.js.map +1 -1
  25. package/dist/domain/cardTypes/service.js +24 -72
  26. package/dist/domain/cardTypes/service.js.map +1 -1
  27. package/dist/domain/cards/index.js +19 -15
  28. package/dist/domain/cards/index.js.map +1 -1
  29. package/dist/domain/cards/lib.js +95 -93
  30. package/dist/domain/cards/lib.js.map +1 -1
  31. package/dist/domain/cards/service.d.ts +2 -1
  32. package/dist/domain/cards/service.js +60 -87
  33. package/dist/domain/cards/service.js.map +1 -1
  34. package/dist/domain/fieldTypes/index.js +4 -2
  35. package/dist/domain/fieldTypes/index.js.map +1 -1
  36. package/dist/domain/graphModels/index.js +3 -1
  37. package/dist/domain/graphModels/index.js.map +1 -1
  38. package/dist/domain/graphViews/index.js +3 -1
  39. package/dist/domain/graphViews/index.js.map +1 -1
  40. package/dist/domain/labels/index.js +4 -2
  41. package/dist/domain/labels/index.js.map +1 -1
  42. package/dist/domain/labels/service.d.ts +1 -1
  43. package/dist/domain/labels/service.js +2 -2
  44. package/dist/domain/labels/service.js.map +1 -1
  45. package/dist/domain/linkTypes/index.js +4 -2
  46. package/dist/domain/linkTypes/index.js.map +1 -1
  47. package/dist/domain/logicPrograms/index.js +3 -1
  48. package/dist/domain/logicPrograms/index.js.map +1 -1
  49. package/dist/domain/mcp/index.d.ts +15 -0
  50. package/dist/domain/mcp/index.js +127 -0
  51. package/dist/domain/mcp/index.js.map +1 -0
  52. package/dist/domain/project/index.js +7 -5
  53. package/dist/domain/project/index.js.map +1 -1
  54. package/dist/domain/project/service.js +18 -14
  55. package/dist/domain/project/service.js.map +1 -1
  56. package/dist/domain/reports/index.js +3 -1
  57. package/dist/domain/reports/index.js.map +1 -1
  58. package/dist/domain/resources/index.js +6 -4
  59. package/dist/domain/resources/index.js.map +1 -1
  60. package/dist/domain/resources/service.js +66 -64
  61. package/dist/domain/resources/service.js.map +1 -1
  62. package/dist/domain/templates/index.js +5 -3
  63. package/dist/domain/templates/index.js.map +1 -1
  64. package/dist/domain/tree/index.js +3 -1
  65. package/dist/domain/tree/index.js.map +1 -1
  66. package/dist/domain/workflows/index.js +3 -1
  67. package/dist/domain/workflows/index.js.map +1 -1
  68. package/dist/export.d.ts +6 -5
  69. package/dist/export.js +15 -11
  70. package/dist/export.js.map +1 -1
  71. package/dist/index.d.ts +8 -2
  72. package/dist/index.js +5 -3
  73. package/dist/index.js.map +1 -1
  74. package/dist/main.js +29 -2
  75. package/dist/main.js.map +1 -1
  76. package/dist/middleware/auth.d.ts +40 -0
  77. package/dist/middleware/auth.js +68 -0
  78. package/dist/middleware/auth.js.map +1 -0
  79. package/dist/middleware/commandManager.d.ts +2 -2
  80. package/dist/middleware/commandManager.js +9 -11
  81. package/dist/middleware/commandManager.js.map +1 -1
  82. package/dist/public/THIRD-PARTY.txt +37 -11
  83. package/dist/public/assets/index-B_lh6qtv.css +1 -0
  84. package/dist/public/assets/{index-Ca10XaMv.js → index-CEol8Bfi.js} +43823 -43030
  85. package/dist/public/config.json +1 -0
  86. package/dist/public/index.html +2 -2
  87. package/dist/types.d.ts +25 -0
  88. package/dist/types.js +13 -1
  89. package/dist/types.js.map +1 -1
  90. package/package.json +8 -5
  91. package/src/app.ts +34 -14
  92. package/src/auth/index.ts +17 -0
  93. package/src/auth/keycloak.ts +109 -0
  94. package/src/auth/mock.ts +38 -0
  95. package/src/auth/types.ts +18 -0
  96. package/src/domain/auth/index.ts +35 -0
  97. package/src/domain/calculations/index.ts +13 -6
  98. package/src/domain/calculations/service.ts +16 -14
  99. package/src/domain/cardTypes/index.ts +24 -16
  100. package/src/domain/cardTypes/service.ts +41 -95
  101. package/src/domain/cards/index.ts +62 -44
  102. package/src/domain/cards/lib.ts +105 -100
  103. package/src/domain/cards/service.ts +73 -89
  104. package/src/domain/fieldTypes/index.ts +23 -16
  105. package/src/domain/graphModels/index.ts +13 -6
  106. package/src/domain/graphViews/index.ts +13 -6
  107. package/src/domain/labels/index.ts +5 -2
  108. package/src/domain/labels/service.ts +2 -2
  109. package/src/domain/linkTypes/index.ts +14 -7
  110. package/src/domain/logicPrograms/index.ts +3 -0
  111. package/src/domain/mcp/index.ts +159 -0
  112. package/src/domain/project/index.ts +17 -8
  113. package/src/domain/project/service.ts +20 -16
  114. package/src/domain/reports/index.ts +13 -6
  115. package/src/domain/resources/index.ts +6 -1
  116. package/src/domain/resources/service.ts +102 -97
  117. package/src/domain/templates/index.ts +31 -19
  118. package/src/domain/tree/index.ts +3 -1
  119. package/src/domain/workflows/index.ts +13 -6
  120. package/src/export.ts +16 -13
  121. package/src/index.ts +10 -3
  122. package/src/main.ts +44 -2
  123. package/src/middleware/auth.ts +90 -0
  124. package/src/middleware/commandManager.ts +11 -14
  125. package/src/types.ts +27 -0
  126. package/dist/public/assets/index-CRSBseQM.css +0 -1
@@ -0,0 +1,68 @@
1
+ /**
2
+ Cyberismo
3
+ Copyright © Cyberismo Ltd and contributors 2026
4
+ This program is free software: you can redistribute it and/or modify it under
5
+ the terms of the GNU Affero General Public License version 3 as published by
6
+ the Free Software Foundation. This program is distributed in the hope that it
7
+ will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
8
+ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
+ See the GNU Affero General Public License for more details.
10
+ You should have received a copy of the GNU Affero General Public
11
+ License along with this program. If not, see <https://www.gnu.org/licenses/>.
12
+ */
13
+ import { UserRole } from '../types.js';
14
+ const roleLevel = {
15
+ [UserRole.Reader]: 0,
16
+ [UserRole.Editor]: 1,
17
+ [UserRole.Admin]: 2,
18
+ };
19
+ /**
20
+ * Create authentication middleware from an AuthProvider.
21
+ * Validates the user and attaches user info to the context.
22
+ */
23
+ export function createAuthMiddleware(provider) {
24
+ return async (c, next) => {
25
+ const user = await provider.authenticate(c.req.raw);
26
+ if (user) {
27
+ c.set('user', user);
28
+ }
29
+ else {
30
+ return c.json({ error: 'Unauthorized' }, 401);
31
+ }
32
+ await next();
33
+ };
34
+ }
35
+ /**
36
+ * Check if the current user has at least the required role
37
+ */
38
+ export function hasRole(c, minimumRole) {
39
+ const user = c.get('user');
40
+ if (!user) {
41
+ return false;
42
+ }
43
+ return roleLevel[user.role] >= roleLevel[minimumRole];
44
+ }
45
+ /**
46
+ * Require minimum role middleware factory
47
+ * Returns a middleware that checks if the user has at least the required role
48
+ */
49
+ export function requireRole(minimumRole) {
50
+ return async (c, next) => {
51
+ const user = c.get('user');
52
+ if (!user) {
53
+ return c.json({ error: 'Unauthorized' }, 401);
54
+ }
55
+ if (!hasRole(c, minimumRole)) {
56
+ return c.json({ error: 'Forbidden' }, 403);
57
+ }
58
+ await next();
59
+ };
60
+ }
61
+ /**
62
+ * Get current user from context
63
+ * Returns null if not authenticated
64
+ */
65
+ export function getCurrentUser(c) {
66
+ return c.get('user') || null;
67
+ }
68
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/middleware/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAIF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAUvC,MAAM,SAAS,GAA6B;IAC1C,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;IACpB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;IACpB,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAsB;IAEtB,OAAO,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEpD,IAAI,IAAI,EAAE,CAAC;YACT,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACtB,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,GAAG,CAAC,CAAC;QAChD,CAAC;QAED,MAAM,IAAI,EAAE,CAAC;IACf,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,CAAU,EAAE,WAAqB;IACvD,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,WAAW,CAAC,CAAC;AACxD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,WAAqB;IAC/C,OAAO,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE;QACvB,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAE3B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,GAAG,CAAC,CAAC;QAChD,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC;YAC7B,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,GAAG,CAAC,CAAC;QAC7C,CAAC;QAED,MAAM,IAAI,EAAE,CAAC;IACf,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,CAAU;IACvC,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC;AAC/B,CAAC"}
@@ -10,11 +10,11 @@
10
10
  License along with this program. If not, see <https://www.gnu.org/licenses/>.
11
11
  */
12
12
  import type { MiddlewareHandler } from 'hono';
13
- import { CommandManager } from '@cyberismo/data-handler';
13
+ import type { CommandManager } from '@cyberismo/data-handler';
14
14
  declare module 'hono' {
15
15
  interface ContextVariableMap {
16
16
  commands: CommandManager;
17
17
  projectPath: string;
18
18
  }
19
19
  }
20
- export declare const attachCommandManager: (projectPath?: string) => MiddlewareHandler;
20
+ export declare const attachCommandManager: (commands: CommandManager) => MiddlewareHandler;
@@ -9,19 +9,17 @@
9
9
  You should have received a copy of the GNU Affero General Public
10
10
  License along with this program. If not, see <https://www.gnu.org/licenses/>.
11
11
  */
12
- import { CommandManager } from '@cyberismo/data-handler';
13
- export const attachCommandManager = (projectPath) => {
12
+ import { getCurrentUser } from './auth.js';
13
+ export const attachCommandManager = (commands) => {
14
14
  return async (c, next) => {
15
- if (!projectPath) {
16
- return c.text('project_path environment variable not set.', 500);
15
+ c.set('commands', commands);
16
+ c.set('projectPath', commands.project.basePath);
17
+ const user = getCurrentUser(c);
18
+ if (user) {
19
+ await commands.runAsAuthor({ name: user.name, email: user.email }, () => next());
17
20
  }
18
- try {
19
- c.set('commands', await CommandManager.getInstance(projectPath));
20
- c.set('projectPath', projectPath);
21
- await next();
22
- }
23
- catch (error) {
24
- return c.text(`Failed to initialize CommandManager: ${error instanceof Error ? error.message : 'Unknown error'}`, 500);
21
+ else {
22
+ throw new Error('CommandManager expects a user');
25
23
  }
26
24
  };
27
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"commandManager.js","sourceRoot":"","sources":["../../src/middleware/commandManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAGF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAUzD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,WAAoB,EACD,EAAE;IACrB,OAAO,KAAK,EAAE,CAAU,EAAE,IAAI,EAAE,EAAE;QAChC,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO,CAAC,CAAC,IAAI,CAAC,4CAA4C,EAAE,GAAG,CAAC,CAAC;QACnE,CAAC;QAED,IAAI,CAAC;YACH,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,cAAc,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;YACjE,CAAC,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;YAClC,MAAM,IAAI,EAAE,CAAC;QACf,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,CAAC,IAAI,CACX,wCAAwC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,EAClG,GAAG,CACJ,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"commandManager.js","sourceRoot":"","sources":["../../src/middleware/commandManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAIF,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAU3C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,QAAwB,EACL,EAAE;IACrB,OAAO,KAAK,EAAE,CAAU,EAAE,IAAI,EAAE,EAAE;QAChC,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC5B,CAAC,CAAC,GAAG,CAAC,aAAa,EAAE,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,IAAI,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CACtE,IAAI,EAAE,CACP,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -912,7 +912,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
912
912
  ---
913
913
 
914
914
  Name: @mui/material
915
- Version: 7.3.7
915
+ Version: 7.3.8
916
916
  License: MIT
917
917
  Private: false
918
918
  Description: Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.
@@ -1465,7 +1465,7 @@ SOFTWARE.
1465
1465
  ---
1466
1466
 
1467
1467
  Name: @cyberismo/data-handler
1468
- Version: 0.0.21
1468
+ Version: 0.0.22
1469
1469
  License: AGPL-3.0
1470
1470
  Private: false
1471
1471
  Description: Command handler for cards and web service
@@ -1581,7 +1581,7 @@ SOFTWARE.
1581
1581
  ---
1582
1582
 
1583
1583
  Name: i18next
1584
- Version: 25.8.1
1584
+ Version: 25.8.13
1585
1585
  License: MIT
1586
1586
  Private: false
1587
1587
  Description: i18next internationalization framework
@@ -1733,12 +1733,38 @@ SOFTWARE.
1733
1733
  ---
1734
1734
 
1735
1735
  Name: react-resizable-panels
1736
- Version: 3.0.6
1736
+ Version: 4.7.0
1737
1737
  License: MIT
1738
1738
  Private: false
1739
- Description: React components for resizable panel groups/layouts
1740
- Repository: git+https://github.com/bvaughn/react-resizable-panels.git
1741
- Author: Brian Vaughn <brian.david.vaughn@gmail.com>
1739
+ Repository: https://github.com/bvaughn/react-resizable-panels.git
1740
+ Homepage: https://react-resizable-panels.vercel.app/
1741
+ Author: Brian Vaughn <brian.david.vaughn@gmail.com> (https://github.com/bvaughn/)
1742
+ Contributors:
1743
+ Brian Vaughn <brian.david.vaughn@gmail.com> (https://github.com/bvaughn/)
1744
+ License Copyright:
1745
+ ===
1746
+
1747
+ The MIT License (MIT)
1748
+
1749
+ Copyright (c) 2018 Brian Vaughn
1750
+
1751
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1752
+ of this software and associated documentation files (the "Software"), to deal
1753
+ in the Software without restriction, including without limitation the rights
1754
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1755
+ copies of the Software, and to permit persons to whom the Software is
1756
+ furnished to do so, subject to the following conditions:
1757
+
1758
+ The above copyright notice and this permission notice shall be included in all
1759
+ copies or substantial portions of the Software.
1760
+
1761
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1762
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1763
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1764
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1765
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1766
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1767
+ SOFTWARE.
1742
1768
 
1743
1769
  ---
1744
1770
 
@@ -2330,7 +2356,7 @@ Author: kenny wong <wowohoo@qq.com>
2330
2356
  ---
2331
2357
 
2332
2358
  Name: @uiw/codemirror-theme-github
2333
- Version: 4.25.2
2359
+ Version: 4.25.5
2334
2360
  License: MIT
2335
2361
  Private: false
2336
2362
  Description: Theme github for CodeMirror.
@@ -2473,7 +2499,7 @@ THE SOFTWARE.
2473
2499
  ---
2474
2500
 
2475
2501
  Name: semver
2476
- Version: 7.7.3
2502
+ Version: 7.7.4
2477
2503
  License: ISC
2478
2504
  Private: false
2479
2505
  Description: The semantic version parser used by npm.
@@ -4551,7 +4577,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4551
4577
  ---
4552
4578
 
4553
4579
  Name: html-react-parser
4554
- Version: 5.2.16
4580
+ Version: 5.2.17
4555
4581
  License: MIT
4556
4582
  Private: false
4557
4583
  Description: HTML to React parser.
@@ -4586,7 +4612,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4586
4612
  ---
4587
4613
 
4588
4614
  Name: html-dom-parser
4589
- Version: 5.1.7
4615
+ Version: 5.1.8
4590
4616
  License: MIT
4591
4617
  Private: false
4592
4618
  Description: HTML to DOM parser.
@@ -0,0 +1 @@
1
+ @media(max-width:800px){.breadcrumbs{display:none}}[role=treeitem][aria-selected=false]:hover{.treenode{background-color:var(--joy-palette-background-level1, #dedede)}}[role=treeitem][aria-selected=true]{outline:none}.resizeHandle{width:2px}.resizeHandle:hover,.resizeHandle:active{background-color:var(--joy-palette-primary-500, #0b6bcb)}.cyberismo-svg-wrapper svg{max-height:100vh}.doc .MuiButton-root{margin-top:12px}.doc table.tableblock{border-collapse:collapse}.doc{color:var(--joy-palette-text-primary, #333);font-size:inherit;-ms-hyphens:auto;hyphens:auto;line-height:1.6;margin:0;padding:0}@media screen and (min-width:1024px){.doc{-webkit-box-flex:1;-ms-flex:auto;flex:auto;font-size:.94444rem;margin:0;min-width:0}}.doc h1,.doc h2,.doc h3,.doc h4,.doc h5,.doc h6{color:var(--joy-palette-text-primary, #191919);font-weight:400;-ms-hyphens:none;hyphens:none;line-height:1.3;margin:1rem 0 0}.doc>h1.page:first-child{font-size:2rem;margin:1.5rem 0}@media screen and (min-width:769px){.doc>h1.page:first-child{margin-top:2.5rem}}.doc>h1.page:first-child+aside.toc.embedded{margin-top:-.5rem}.doc>h2#name+.sectionbody{margin-top:1rem}#preamble+.sect1,.doc .sect1+.sect1{margin-top:2rem}.doc h1.sect0{background:var(--joy-palette-background-surface, #f0f0f0);font-size:1.8em;margin:1.5rem -1rem 0;padding:.5rem 1rem}.doc h2:not(.discrete){border-bottom:1px solid var(--joy-palette-divider, #e1e1e1);margin-left:-1rem;margin-right:-1rem;padding:.4rem 1rem .1rem}.doc h3:not(.discrete),.doc h4:not(.discrete){font-weight:600}.doc h1 .anchor,.doc h2 .anchor,.doc h3 .anchor,.doc h4 .anchor,.doc h5 .anchor,.doc h6 .anchor{position:absolute;text-decoration:none;width:1.75ex;margin-left:-1.5ex;visibility:hidden;font-size:.8em;font-weight:400;padding-top:.05em}.doc h1 .anchor:before,.doc h2 .anchor:before,.doc h3 .anchor:before,.doc h4 .anchor:before,.doc h5 .anchor:before,.doc h6 .anchor:before{content:"§"}.doc h1:hover .anchor,.doc h2:hover .anchor,.doc h3:hover .anchor,.doc h4:hover .anchor,.doc h5:hover .anchor,.doc h6:hover .anchor{visibility:visible}.doc dl,.doc p{margin:0}.doc a{color:var(--joy-palette-primary-600, #1565c0)}.doc a:hover{color:var(--joy-palette-primary-700, #104d92)}.doc a.bare{-ms-hyphens:none;hyphens:none}.doc a.unresolved{color:var(--joy-palette-danger-500, #d32f2f)}.doc i.fa{-ms-hyphens:none;hyphens:none;font-style:normal}.doc .colist>table code,.doc p code,.doc thead code{color:var(--joy-palette-text-primary, #222);background:var(--joy-palette-background-level1, #fafafa);border-radius:.25em;font-size:.95em;padding:.125em .25em}.doc code,.doc pre{-ms-hyphens:none;hyphens:none}.doc pre{font-size:.88889rem;line-height:1.5;margin:0}.doc blockquote{margin:0}.doc .paragraph.lead>p{font-size:1rem}.doc .right{float:right}.doc .left{float:left}.doc .float-gap.right{margin:0 1rem 1rem 0}.doc .float-gap.left{margin:0 0 1rem 1rem}.doc .float-group:after{content:"";display:table;clear:both}.doc .text-left{text-align:left}.doc .text-center{text-align:center}.doc .text-right{text-align:right}.doc .text-justify{text-align:justify}.doc .stretch{width:100%}.doc .big{font-size:larger}.doc .small{font-size:smaller}.doc .underline{text-decoration:underline}.doc .line-through{text-decoration:line-through}.doc .dlist,.doc .exampleblock,.doc .hdlist,.doc .imageblock,.doc .listingblock,.doc .literalblock,.doc .olist,.doc .paragraph,.doc .partintro,.doc .quoteblock,.doc .sidebarblock,.doc .tabs,.doc .ulist,.doc .verseblock,.doc .videoblock,.doc details,.doc hr{margin:1rem 0 0}.doc .tablecontainer,.doc .tablecontainer+*,.doc :not(.tablecontainer)>table.tableblock,.doc :not(.tablecontainer)>table.tableblock+*,.doc>table.tableblock,.doc>table.tableblock+*{margin-top:1.5rem}.doc table.tableblock{font-size:.83333rem}.doc p.tableblock+p.tableblock{margin-top:.5rem}.doc table.tableblock pre{font-size:inherit}.doc td.tableblock>.content{word-wrap:anywhere}.doc td.tableblock>.content>:first-child{margin-top:0}.doc table.tableblock td{padding:.5rem}.doc table.tableblock th{padding:.5rem;background:var(--joy-palette-background-level1, #fbfcfe)}.doc table.tableblock,.doc table.tableblock>*>tr>*{border:0 solid var(--joy-palette-divider, #e1e1e1)}.doc table.grid-all>*>tr>*{border-width:1px}.doc table.grid-cols>*>tr>*{border-width:0 1px}.doc table.grid-rows>*>tr>*{border-width:1px 0}.doc table.grid-all>thead th,.doc table.grid-rows>thead th{border-bottom-width:2.5px}.doc table.frame-all{border-width:1px}.doc table.frame-ends{border-width:1px 0}.doc table.frame-sides{border-width:0 1px}.doc table.frame-none>colgroup+*>:first-child>*,.doc table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}.doc table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}.doc table.frame-ends>*>tr>:first-child,.doc table.frame-none>*>tr>:first-child{border-left-width:0}.doc table.frame-ends>*>tr>:last-child,.doc table.frame-none>*>tr>:last-child{border-right-width:0}.doc table.stripes-all>tbody>tr,.doc table.stripes-even>tbody>tr:nth-of-type(2n),.doc table.stripes-hover>tbody>tr:hover,.doc table.stripes-odd>tbody>tr:nth-of-type(odd){background:var(--joy-palette-background-level1, #fafafa)}.doc table.tableblock>tfoot{background:var(--joy-palette-background-surface, #f0f0f0)}.doc .halign-left{text-align:left}.doc .halign-right{text-align:right}.doc .halign-center{text-align:center}.doc .valign-top{vertical-align:top}.doc .valign-bottom{vertical-align:bottom}.doc .valign-middle{vertical-align:middle}.doc .admonitionblock{margin:1.4rem 0 0}.doc .admonitionblock p,.doc .admonitionblock td.content{font-size:.88889rem}.doc .admonitionblock td.content>.title+*,.doc .admonitionblock td.content>:not(.title):first-child{margin-top:0}.doc .admonitionblock td.content pre{font-size:.83333rem}.doc .admonitionblock>table{table-layout:fixed;position:relative;width:100%}.doc .admonitionblock td.content{padding:1rem 1rem .75rem;background:var(--joy-palette-background-level1, #fafafa);width:100%;word-wrap:anywhere}.doc .admonitionblock td.icon{font-size:.83333rem;left:0;line-height:1;padding:0;position:absolute;top:0;-webkit-transform:translate(-.5rem,-50%);transform:translate(-.5rem,-50%)}.doc .admonitionblock td.icon i{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:.45rem;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-filter:initial;filter:none;height:1.25rem;padding:0 .5rem;vertical-align:initial;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.doc .admonitionblock td.icon i:after{content:attr(title);font-weight:600;font-style:normal;text-transform:uppercase}.doc .admonitionblock td.icon i.icon-caution{background-color:#a0439c;color:#fff}.doc .admonitionblock td.icon i.icon-important{background-color:#d32f2f;color:#fff}.doc .admonitionblock td.icon i.icon-note{background-color:#217ee7;color:#fff}.doc .admonitionblock td.icon i.icon-tip{background-color:#41af46;color:#fff}.doc .admonitionblock td.icon i.icon-warning{background-color:#e18114;color:#fff}.doc .imageblock,.doc .videoblock{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.doc .imageblock .content{-ms-flex-item-align:stretch;align-self:stretch;text-align:center}.doc .imageblock.text-left,.doc .videoblock.text-left{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.doc .imageblock.text-left .content{text-align:left}.doc .imageblock.text-right,.doc .videoblock.text-right{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.doc .imageblock.text-right .content{text-align:right}.doc .image>img,.doc .image>object,.doc .image>svg,.doc .imageblock img,.doc .imageblock object,.doc .imageblock svg{display:inline-block;max-height:75vh;max-width:100%;vertical-align:middle}.doc .image:not(.left):not(.right)>img{margin-top:-.2em}.doc .videoblock iframe,.doc .videoblock video{max-width:100%;vertical-align:middle}#preamble .abstract blockquote{background:var(--joy-palette-background-surface, #f0f0f0);border-left:5px solid var(--joy-palette-divider, #e1e1e1);color:var(--joy-palette-text-secondary, #4a4a4a);font-size:.88889rem;padding:.75em 1em}.doc .quoteblock,.doc .verseblock{background:var(--joy-palette-background-level1, #fafafa);border-left:5px solid var(--joy-palette-neutral-500, #5d5d5d);color:var(--joy-palette-text-secondary, #5d5d5d)}.doc .quoteblock{padding:.25rem 2rem 1.25rem}.doc .quoteblock .attribution{color:var(--joy-palette-text-tertiary, #8e8e8e);font-size:.83333rem;margin-top:.75rem}.doc .quoteblock blockquote{margin-top:1rem}.doc .quoteblock .paragraph{font-style:italic}.doc .quoteblock cite{padding-left:1em}.doc .verseblock{font-size:1.15em;padding:1rem 2rem}.doc .verseblock pre{font-family:inherit;font-size:inherit}.doc ol,.doc ul{margin:0;padding:0 0 0 2rem}.doc ol.none,.doc ol.unnumbered,.doc ol.unstyled,.doc ul.checklist,.doc ul.no-bullet,.doc ul.none,.doc ul.unstyled{list-style-type:none}.doc ol.unnumbered,.doc ul.no-bullet{padding-left:1.25rem}.doc ol.unstyled,.doc ul.unstyled{padding-left:0}.doc ul.circle{list-style-type:circle}.doc ul.disc{list-style-type:disc}.doc ul.square{list-style-type:square}.doc ul.circle ul:not([class]),.doc ul.disc ul:not([class]),.doc ul.square ul:not([class]){list-style:inherit}.doc ol.arabic{list-style-type:decimal}.doc ol.decimal{list-style-type:decimal-leading-zero}.doc ol.loweralpha{list-style-type:lower-alpha}.doc ol.upperalpha{list-style-type:upper-alpha}.doc ol.lowerroman{list-style-type:lower-roman}.doc ol.upperroman{list-style-type:upper-roman}.doc ol.lowergreek{list-style-type:lower-greek}.doc ul.checklist{padding-left:1.75rem}.doc .dlist .dlist,.doc .dlist .olist,.doc .dlist .ulist,.doc .olist .dlist,.doc .olist .olist,.doc .olist .ulist,.doc .olist li+li,.doc .ulist .dlist,.doc .ulist .olist,.doc .ulist .ulist,.doc .ulist li+li{margin-top:.5rem}.doc .admonitionblock .listingblock,.doc .olist .listingblock,.doc .ulist .listingblock{padding:0}.doc .admonitionblock .title,.doc .exampleblock .title,.doc .imageblock .title,.doc .listingblock .title,.doc .literalblock .title,.doc .openblock .title,.doc .videoblock .title,.doc table.tableblock caption{color:var(--joy-palette-text-secondary, #5d5d5d);font-size:.88889rem;font-style:italic;font-weight:600;-ms-hyphens:none;hyphens:none;letter-spacing:.01em;padding-bottom:.075rem}.doc table.tableblock caption{text-align:left}.doc .olist .title,.doc .ulist .title{font-style:italic;font-weight:600;margin-bottom:.25rem}.doc .imageblock .title,.doc .videoblock .title{margin-top:.5rem;padding-bottom:0}.doc details{margin-left:1rem}.doc details>summary{display:block;position:relative;line-height:1.6;margin-bottom:.5rem}.doc details>summary::-webkit-details-marker{display:none}.doc details>summary:before{content:"";border:solid transparent;border-left:solid;border-width:.3em 0 .3em .5em;position:absolute;top:.5em;left:-1rem;-webkit-transform:translateX(15%);transform:translate(15%)}.doc details[open]>summary:before{border-color:currentColor transparent transparent;border-width:.5rem .3rem 0;-webkit-transform:translateY(15%);transform:translateY(15%)}.doc details>summary:after{content:"";width:1rem;height:1em;position:absolute;top:.3em;left:-1rem}.doc details.result{margin-top:.25rem}.doc details.result>summary{color:var(--joy-palette-text-secondary, #5d5d5d);font-style:italic;margin-bottom:0}.doc details.result>.content{margin-left:-1rem}.doc .exampleblock>.content,.doc details.result>.content{background:var(--joy-palette-background-body, #fff);border:.25rem solid var(--joy-palette-neutral-500, #5d5d5d);border-radius:.5rem;padding:.75rem}.doc .exampleblock>.content:after,.doc details.result>.content:after{content:"";display:table;clear:both}.doc .exampleblock>.content>:first-child,.doc details>.content>:first-child{margin-top:0}.doc .sidebarblock{background:var(--joy-palette-neutral-softBg, #e1e1e1);border-radius:.75rem;padding:.75rem 1.5rem}.doc .sidebarblock>.content>.title{font-size:1.25rem;font-weight:600;line-height:1.3;margin-bottom:.5rem;text-align:center}.doc .sidebarblock>.content>.title+*,.doc .sidebarblock>.content>:not(.title):first-child{margin-top:0}.doc .listingblock.wrap pre,.doc table.tableblock pre{white-space:pre-wrap}.doc .listingblock pre:not(.highlight),.doc .literalblock pre,.doc pre.highlight>code{background:var(--joy-palette-background-level1, #fafafa);-webkit-box-shadow:inset 0 0 1.75px var(--joy-palette-divider, #e1e1e1);box-shadow:inset 0 0 1.75px var(--joy-palette-divider, #e1e1e1);display:block;overflow-x:auto;padding:.875em}.doc .listingblock>.content{position:relative}.doc .source-toolbox{display:-webkit-box;display:-ms-flexbox;display:flex;visibility:hidden;position:absolute;top:.25rem;right:.5rem;color:gray;font-family:Roboto,sans-serif;font-size:.72222rem;line-height:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:1}.doc .listingblock:hover .source-toolbox{visibility:visible}.doc .source-toolbox .source-lang{text-transform:uppercase;letter-spacing:.075em}.doc .source-toolbox>:not(:last-child):after{content:"|";letter-spacing:0;padding:0 1ch}.doc .source-toolbox .copy-button{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:none;border:none;color:inherit;outline:none;padding:0;font-size:inherit;line-height:inherit;width:1em;height:1em}.doc .source-toolbox .copy-icon{-webkit-box-flex:0;-ms-flex:none;flex:none;width:inherit;height:inherit}.doc .source-toolbox img.copy-icon{-webkit-filter:invert(50.2%);filter:invert(50.2%)}.doc .source-toolbox svg.copy-icon{fill:currentColor}.doc .source-toolbox .copy-toast{-webkit-box-flex:0;-ms-flex:none;flex:none;position:relative;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:1em;background-color:var(--joy-palette-neutral-800, #333);border-radius:.25em;padding:.5em;color:var(--joy-palette-common-white, #fff);cursor:auto;opacity:0;-webkit-transition:opacity .5s ease .5s;transition:opacity .5s ease .5s}.doc .source-toolbox .copy-toast:after{content:"";position:absolute;top:0;width:1em;height:1em;border:.55em solid transparent;border-left-color:var(--joy-palette-neutral-800, #333);-webkit-transform:rotate(-90deg) translateX(50%) translateY(50%);transform:rotate(-90deg) translate(50%) translateY(50%);-webkit-transform-origin:left;transform-origin:left}.doc .source-toolbox .copy-button.clicked .copy-toast{opacity:1;-webkit-transition:none;transition:none}.doc .language-console .hljs-meta{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.doc .dlist dt{font-style:italic}.doc .dlist dd{margin:0 0 0 1.5rem}.doc .dlist dd+dt,.doc .dlist dd>p:first-child{margin-top:.5rem}.doc td.hdlist1,.doc td.hdlist2{padding:.5rem 0 0;vertical-align:top}.doc tr:first-child>.hdlist1,.doc tr:first-child>.hdlist2{padding-top:0}.doc td.hdlist1{font-weight:600;padding-right:.25rem}.doc td.hdlist2{padding-left:.25rem}.doc .colist{font-size:.88889rem;margin:.25rem 0 -.25rem}.doc .colist>table>tbody>tr>:first-child,.doc .colist>table>tr>:first-child{padding:.25em .5rem 0;vertical-align:top}.doc .colist>table>tbody>tr>:last-child,.doc .colist>table>tr>:last-child{padding:.25rem 0}.doc .conum[data-value]{border:1px solid;border-radius:100%;display:inline-block;font-family:Roboto,sans-serif;font-size:.75rem;font-style:normal;line-height:1.2;text-align:center;width:1.25em;height:1.25em;letter-spacing:-.25ex;text-indent:-.25ex}.doc .conum[data-value]:after{content:attr(data-value)}.doc .conum[data-value]+b{display:none}.doc hr{border:solid var(--joy-palette-divider, #e1e1e1);border-width:2px 0 0;height:0}.doc b.button{white-space:nowrap}.doc b.button:before{content:"[";padding-right:.25em}.doc b.button:after{content:"]";padding-left:.25em}.doc kbd{display:inline-block;font-size:.66667rem;background:var(--joy-palette-background-level1, #fafafa);border:1px solid var(--joy-palette-neutral-400, #c1c1c1);border-radius:.25em;-webkit-box-shadow:0 1px 0 var(--joy-palette-neutral-400, #c1c1c1),0 0 0 .1em var(--joy-palette-background-body, #fff) inset;box-shadow:0 1px 0 var(--joy-palette-neutral-400, #c1c1c1),inset 0 0 0 .1em var(--joy-palette-background-body, #fff);padding:.25em .5em;vertical-align:text-bottom;white-space:nowrap}.doc .keyseq,.doc kbd{line-height:1}.doc .keyseq{font-size:.88889rem}.doc .keyseq kbd{margin:0 .125em}.doc .keyseq kbd:first-child{margin-left:0}.doc .keyseq kbd:last-child{margin-right:0}.doc .menuseq,.doc .path{-ms-hyphens:none;hyphens:none}.doc .menuseq i.caret:before{content:"›";font-size:1.1em;font-weight:600;line-height:.90909}.doc :not(pre).nowrap{white-space:nowrap}.doc .nobreak{-ms-hyphens:none;hyphens:none;word-wrap:normal}.doc :not(pre).pre-wrap{white-space:pre-wrap}#footnotes{font-size:.85em;line-height:1.5;margin:2rem -.5rem 0}.doc td.tableblock>.content #footnotes{margin:2rem 0 0}#footnotes hr{border-top-width:1px;margin-top:0;width:20%}#footnotes .footnote{margin:.5em 0 0 1em}#footnotes .footnote+.footnote{margin-top:.25em}#footnotes .footnote>a:first-of-type{display:inline-block;margin-left:-2em;text-align:right;width:1.5em}.toc-menu{color:var(--joy-palette-text-secondary, #5d5d5d)}.toc.sidebar .toc-menu{margin-right:.75rem;position:sticky;top:6rem}.toc .toc-menu h3{color:var(--joy-palette-text-primary, #333);font-size:.88889rem;font-weight:600;line-height:1.3;margin:0 -.5px;padding-bottom:.25rem}.toc.sidebar .toc-menu h3{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:2.5rem;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.toc .toc-menu ul{font-size:.83333rem;line-height:1.2;list-style:none;margin:0;padding:0}.toc.sidebar .toc-menu ul{max-height:calc(100vh - 8.5rem);overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:none}@supports (scrollbar-width: none){.toc.sidebar .toc-menu ul{scrollbar-width:none}}.toc .toc-menu ul::-webkit-scrollbar{width:0;height:0}@media screen and (min-width:1024px){.toc .toc-menu h3{font-size:.83333rem}.toc .toc-menu ul{font-size:.75rem}}.toc .toc-menu li{margin:0}.toc .toc-menu li[data-level="2"] a{padding-left:1.25rem}.toc .toc-menu li[data-level="3"] a{padding-left:2rem}.toc .toc-menu a{color:inherit;border-left:2px solid var(--joy-palette-divider, #e1e1e1);display:inline-block;padding:.25rem 0 .25rem .5rem;text-decoration:none}.sidebar.toc .toc-menu a{display:block;outline:none}.toc .toc-menu a:hover{color:var(--joy-palette-primary-600, #1565c0)}.toc .toc-menu a.is-active{border-left-color:var(--joy-palette-primary-500, #2a7ee4);color:var(--joy-palette-primary-500, #2a7ee4)}.sidebar.toc .toc-menu a:focus{background:var(--joy-palette-background-level1, #fafafa)}.toc .toc-menu .is-hidden-toc{display:none!important}.contentSidebar{min-width:160px}.doc .videoblock .content{position:relative;width:100%;max-width:100%}.doc .videoblock .content:before{content:"";display:block;padding-top:56.25%}.doc .videoblock .content>iframe,.doc .videoblock .content>video{position:absolute;inset:0;width:100%!important;height:100%!important;border:0;background:#000;display:block}