@oxide/design-system 1.7.7--canary.fc65d31.0 → 1.7.7--canary.5c25e1b.0

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 (130) hide show
  1. package/components/dist/index.d.ts +2 -5
  2. package/components/dist/index.js +126 -1729
  3. package/components/dist/index.js.map +1 -1
  4. package/package.json +1 -2
  5. package/components/dist/architecture-I3QFYML2-YZWO3N3B.js +0 -14
  6. package/components/dist/architecture-I3QFYML2-YZWO3N3B.js.map +0 -1
  7. package/components/dist/architectureDiagram-UYN6MBPD-HXPGIDN7.js +0 -8846
  8. package/components/dist/architectureDiagram-UYN6MBPD-HXPGIDN7.js.map +0 -1
  9. package/components/dist/blockDiagram-ZHA2E4KO-OAYYKCLF.js +0 -3721
  10. package/components/dist/blockDiagram-ZHA2E4KO-OAYYKCLF.js.map +0 -1
  11. package/components/dist/c4Diagram-6F5ED5ID-TBHFK2XY.js +0 -2599
  12. package/components/dist/c4Diagram-6F5ED5ID-TBHFK2XY.js.map +0 -1
  13. package/components/dist/chunk-2DDKDUUO.js +0 -439
  14. package/components/dist/chunk-2DDKDUUO.js.map +0 -1
  15. package/components/dist/chunk-2NHDMTP7.js +0 -26905
  16. package/components/dist/chunk-2NHDMTP7.js.map +0 -1
  17. package/components/dist/chunk-4IJS44L3.js +0 -22
  18. package/components/dist/chunk-4IJS44L3.js.map +0 -1
  19. package/components/dist/chunk-562WOS3Z.js +0 -1109
  20. package/components/dist/chunk-562WOS3Z.js.map +0 -1
  21. package/components/dist/chunk-6UD2HOKB.js +0 -17082
  22. package/components/dist/chunk-6UD2HOKB.js.map +0 -1
  23. package/components/dist/chunk-76BOQ7BT.js +0 -63
  24. package/components/dist/chunk-76BOQ7BT.js.map +0 -1
  25. package/components/dist/chunk-7I5DT373.js +0 -97
  26. package/components/dist/chunk-7I5DT373.js.map +0 -1
  27. package/components/dist/chunk-BPREMNVP.js +0 -1875
  28. package/components/dist/chunk-BPREMNVP.js.map +0 -1
  29. package/components/dist/chunk-BVYAEHG3.js +0 -122
  30. package/components/dist/chunk-BVYAEHG3.js.map +0 -1
  31. package/components/dist/chunk-BW7DFBOS.js +0 -152
  32. package/components/dist/chunk-BW7DFBOS.js.map +0 -1
  33. package/components/dist/chunk-EZG2MNHW.js +0 -59
  34. package/components/dist/chunk-EZG2MNHW.js.map +0 -1
  35. package/components/dist/chunk-G6QWNAHJ.js +0 -43
  36. package/components/dist/chunk-G6QWNAHJ.js.map +0 -1
  37. package/components/dist/chunk-H72D3HRR.js +0 -1244
  38. package/components/dist/chunk-H72D3HRR.js.map +0 -1
  39. package/components/dist/chunk-K532NZMW.js +0 -46
  40. package/components/dist/chunk-K532NZMW.js.map +0 -1
  41. package/components/dist/chunk-LC3BX2KL.js +0 -25
  42. package/components/dist/chunk-LC3BX2KL.js.map +0 -1
  43. package/components/dist/chunk-LQ2ABR7F.js +0 -5665
  44. package/components/dist/chunk-LQ2ABR7F.js.map +0 -1
  45. package/components/dist/chunk-M6L3MM6K.js +0 -22
  46. package/components/dist/chunk-M6L3MM6K.js.map +0 -1
  47. package/components/dist/chunk-MWA4PRRW.js +0 -122
  48. package/components/dist/chunk-MWA4PRRW.js.map +0 -1
  49. package/components/dist/chunk-ND3FLKHU.js +0 -570
  50. package/components/dist/chunk-ND3FLKHU.js.map +0 -1
  51. package/components/dist/chunk-NIVHLOPB.js +0 -2621
  52. package/components/dist/chunk-NIVHLOPB.js.map +0 -1
  53. package/components/dist/chunk-R6F6FFK7.js +0 -65
  54. package/components/dist/chunk-R6F6FFK7.js.map +0 -1
  55. package/components/dist/chunk-RN5R3L7O.js +0 -2041
  56. package/components/dist/chunk-RN5R3L7O.js.map +0 -1
  57. package/components/dist/chunk-RWDBBMDN.js +0 -10910
  58. package/components/dist/chunk-RWDBBMDN.js.map +0 -1
  59. package/components/dist/chunk-T7HPDS4Z.js +0 -573
  60. package/components/dist/chunk-T7HPDS4Z.js.map +0 -1
  61. package/components/dist/chunk-TG4YEU4Q.js +0 -23
  62. package/components/dist/chunk-TG4YEU4Q.js.map +0 -1
  63. package/components/dist/chunk-U5WCXBW2.js +0 -48
  64. package/components/dist/chunk-U5WCXBW2.js.map +0 -1
  65. package/components/dist/chunk-V6PWN6OH.js +0 -1875
  66. package/components/dist/chunk-V6PWN6OH.js.map +0 -1
  67. package/components/dist/chunk-VLTHNCSD.js +0 -48
  68. package/components/dist/chunk-VLTHNCSD.js.map +0 -1
  69. package/components/dist/chunk-WDK4G4UR.js +0 -2791
  70. package/components/dist/chunk-WDK4G4UR.js.map +0 -1
  71. package/components/dist/chunk-WLVQWTC6.js +0 -77
  72. package/components/dist/chunk-WLVQWTC6.js.map +0 -1
  73. package/components/dist/chunk-YDLS5R4M.js +0 -48
  74. package/components/dist/chunk-YDLS5R4M.js.map +0 -1
  75. package/components/dist/chunk-YGFBWU2Q.js +0 -7
  76. package/components/dist/chunk-YGFBWU2Q.js.map +0 -1
  77. package/components/dist/chunk-ZBL4CWCH.js +0 -2120
  78. package/components/dist/chunk-ZBL4CWCH.js.map +0 -1
  79. package/components/dist/classDiagram-LNE6IOMH-VRQHEQWM.js +0 -40
  80. package/components/dist/classDiagram-LNE6IOMH-VRQHEQWM.js.map +0 -1
  81. package/components/dist/classDiagram-v2-MQ7JQ4JX-5GB4NXXM.js +0 -40
  82. package/components/dist/classDiagram-v2-MQ7JQ4JX-5GB4NXXM.js.map +0 -1
  83. package/components/dist/dagre-4EVJKHTY-XW45LMKR.js +0 -734
  84. package/components/dist/dagre-4EVJKHTY-XW45LMKR.js.map +0 -1
  85. package/components/dist/diagram-QW4FP2JN-J2YMUPB5.js +0 -226
  86. package/components/dist/diagram-QW4FP2JN-J2YMUPB5.js.map +0 -1
  87. package/components/dist/erDiagram-6RL3IURR-HQULDVJI.js +0 -1381
  88. package/components/dist/erDiagram-6RL3IURR-HQULDVJI.js.map +0 -1
  89. package/components/dist/flowDiagram-7ASYPVHJ-2542732I.js +0 -2349
  90. package/components/dist/flowDiagram-7ASYPVHJ-2542732I.js.map +0 -1
  91. package/components/dist/ganttDiagram-NTVNEXSI-V66YQQB3.js +0 -2413
  92. package/components/dist/ganttDiagram-NTVNEXSI-V66YQQB3.js.map +0 -1
  93. package/components/dist/gitGraph-YCYPL57B-AAXPWQN7.js +0 -14
  94. package/components/dist/gitGraph-YCYPL57B-AAXPWQN7.js.map +0 -1
  95. package/components/dist/gitGraphDiagram-NRZ2UAAF-5DU6QMYZ.js +0 -1763
  96. package/components/dist/gitGraphDiagram-NRZ2UAAF-5DU6QMYZ.js.map +0 -1
  97. package/components/dist/info-46DW6VJ7-43TTIEYF.js +0 -14
  98. package/components/dist/info-46DW6VJ7-43TTIEYF.js.map +0 -1
  99. package/components/dist/infoDiagram-A4XQUW5V-UZERSQDI.js +0 -54
  100. package/components/dist/infoDiagram-A4XQUW5V-UZERSQDI.js.map +0 -1
  101. package/components/dist/journeyDiagram-G5WM74LC-RVKMRGRW.js +0 -1244
  102. package/components/dist/journeyDiagram-G5WM74LC-RVKMRGRW.js.map +0 -1
  103. package/components/dist/kanban-definition-QRCXZQQD-NWU5I3TK.js +0 -1119
  104. package/components/dist/kanban-definition-QRCXZQQD-NWU5I3TK.js.map +0 -1
  105. package/components/dist/katex-WNZY3CE5.js +0 -14484
  106. package/components/dist/katex-WNZY3CE5.js.map +0 -1
  107. package/components/dist/mindmap-definition-GWI6TPTV-MISEH6LG.js +0 -6013
  108. package/components/dist/mindmap-definition-GWI6TPTV-MISEH6LG.js.map +0 -1
  109. package/components/dist/packet-W2GHVCYJ-FBZCFIPR.js +0 -14
  110. package/components/dist/packet-W2GHVCYJ-FBZCFIPR.js.map +0 -1
  111. package/components/dist/pie-BEWT4RHE-UFFBBCXM.js +0 -14
  112. package/components/dist/pie-BEWT4RHE-UFFBBCXM.js.map +0 -1
  113. package/components/dist/pieDiagram-YF2LJOPJ-IXEVHPCM.js +0 -223
  114. package/components/dist/pieDiagram-YF2LJOPJ-IXEVHPCM.js.map +0 -1
  115. package/components/dist/quadrantDiagram-OS5C2QUG-MW26UCZV.js +0 -1408
  116. package/components/dist/quadrantDiagram-OS5C2QUG-MW26UCZV.js.map +0 -1
  117. package/components/dist/requirementDiagram-MIRIMTAZ-BX24AAHL.js +0 -1175
  118. package/components/dist/requirementDiagram-MIRIMTAZ-BX24AAHL.js.map +0 -1
  119. package/components/dist/sankeyDiagram-Y46BX6SQ-5RKUGG63.js +0 -1278
  120. package/components/dist/sankeyDiagram-Y46BX6SQ-5RKUGG63.js.map +0 -1
  121. package/components/dist/sequenceDiagram-G6AWOVSC-2T3JBUZ2.js +0 -3529
  122. package/components/dist/sequenceDiagram-G6AWOVSC-2T3JBUZ2.js.map +0 -1
  123. package/components/dist/stateDiagram-MAYHULR4-HZ5EGLPA.js +0 -505
  124. package/components/dist/stateDiagram-MAYHULR4-HZ5EGLPA.js.map +0 -1
  125. package/components/dist/stateDiagram-v2-4JROLMXI-DN2FEZV3.js +0 -40
  126. package/components/dist/stateDiagram-v2-4JROLMXI-DN2FEZV3.js.map +0 -1
  127. package/components/dist/timeline-definition-U7ZMHBDA-GB6AKKW4.js +0 -1260
  128. package/components/dist/timeline-definition-U7ZMHBDA-GB6AKKW4.js.map +0 -1
  129. package/components/dist/xychartDiagram-6QU3TZC5-BFFLEHUP.js +0 -1877
  130. package/components/dist/xychartDiagram-6QU3TZC5-BFFLEHUP.js.map +0 -1
@@ -1,70 +1,3 @@
1
- import {
2
- version
3
- } from "./chunk-YGFBWU2Q.js";
4
- import {
5
- selectSvgElement
6
- } from "./chunk-TG4YEU4Q.js";
7
- import {
8
- JSON_SCHEMA,
9
- load
10
- } from "./chunk-WDK4G4UR.js";
11
- import {
12
- registerLayoutLoaders
13
- } from "./chunk-WLVQWTC6.js";
14
- import "./chunk-ND3FLKHU.js";
15
- import "./chunk-LQ2ABR7F.js";
16
- import "./chunk-BW7DFBOS.js";
17
- import "./chunk-M6L3MM6K.js";
18
- import {
19
- registerIconPacks
20
- } from "./chunk-H72D3HRR.js";
21
- import {
22
- dedent
23
- } from "./chunk-NIVHLOPB.js";
24
- import {
25
- cleanAndMerge,
26
- decodeEntities,
27
- encodeEntities,
28
- isDetailedError,
29
- removeDirectives,
30
- utils_default
31
- } from "./chunk-T7HPDS4Z.js";
32
- import "./chunk-7I5DT373.js";
33
- import {
34
- UnknownDiagramError,
35
- __name,
36
- addDirective,
37
- assignWithDepth_default,
38
- configureSvgSize,
39
- defaultConfig,
40
- detectType,
41
- detectors,
42
- evaluate,
43
- frontMatterRegex,
44
- getConfig,
45
- getDiagram,
46
- getDiagramLoader,
47
- getSiteConfig,
48
- log,
49
- purify,
50
- registerDiagram,
51
- registerLazyLoadedDiagrams,
52
- reset,
53
- saveConfigFromInitialize,
54
- select_default,
55
- setConfig,
56
- setLogLevel,
57
- setSiteConfig,
58
- styles_default,
59
- themes_default,
60
- updateSiteConfig
61
- } from "./chunk-RWDBBMDN.js";
62
- import {
63
- isEmpty_default
64
- } from "./chunk-BVYAEHG3.js";
65
- import "./chunk-562WOS3Z.js";
66
- import "./chunk-K532NZMW.js";
67
-
68
1
  // components/src/asciidoc/index.tsx
69
2
  import asciidoctor2 from "@asciidoctor/core";
70
3
  import { Content as Content4 } from "@oxide/react-asciidoc";
@@ -114,8 +47,8 @@ var classed = {
114
47
 
115
48
  // components/src/asciidoc/Admonition.tsx
116
49
  import { jsx, jsxs } from "react/jsx-runtime";
117
- var Admonition = ({ node: node2 }) => {
118
- const attrs2 = node2.attributes;
50
+ var Admonition = ({ node }) => {
51
+ const attrs2 = node.attributes;
119
52
  let icon;
120
53
  if (attrs2.name === "caution") {
121
54
  icon = /* @__PURE__ */ jsx(Error12, {});
@@ -127,12 +60,12 @@ var Admonition = ({ node: node2 }) => {
127
60
  return /* @__PURE__ */ jsxs("div", { className: `admonitionblock ${attrs2.name}`, children: [
128
61
  /* @__PURE__ */ jsx("div", { className: "admonition-icon", children: icon }),
129
62
  /* @__PURE__ */ jsxs("div", { className: "admonition-content content", children: [
130
- /* @__PURE__ */ jsx(Title, { text: node2.title }),
63
+ /* @__PURE__ */ jsx(Title, { text: node.title }),
131
64
  /* @__PURE__ */ jsx("div", { children: titleCase(attrs2.name.toString()) }),
132
65
  /* @__PURE__ */ jsxs("div", { children: [
133
- /* @__PURE__ */ jsx(Title, { text: node2.title }),
134
- node2.content && parse(node2.content),
135
- /* @__PURE__ */ jsx(Content, { blocks: node2.blocks })
66
+ /* @__PURE__ */ jsx(Title, { text: node.title }),
67
+ node.content && parse(node.content),
68
+ /* @__PURE__ */ jsx(Content, { blocks: node.blocks })
136
69
  ] })
137
70
  ] })
138
71
  ] });
@@ -177,1536 +110,9 @@ var Warning12 = ({ className }) => /* @__PURE__ */ jsx(
177
110
  );
178
111
  var Admonition_default = Admonition;
179
112
 
180
- // node_modules/stylis/src/Enum.js
181
- var COMMENT = "comm";
182
- var RULESET = "rule";
183
- var DECLARATION = "decl";
184
- var IMPORT = "@import";
185
- var KEYFRAMES = "@keyframes";
186
- var LAYER = "@layer";
187
-
188
- // node_modules/stylis/src/Utility.js
189
- var abs = Math.abs;
190
- var from = String.fromCharCode;
191
- function trim(value) {
192
- return value.trim();
193
- }
194
- function replace(value, pattern, replacement) {
195
- return value.replace(pattern, replacement);
196
- }
197
- function indexof(value, search, position2) {
198
- return value.indexOf(search, position2);
199
- }
200
- function charat(value, index) {
201
- return value.charCodeAt(index) | 0;
202
- }
203
- function substr(value, begin, end) {
204
- return value.slice(begin, end);
205
- }
206
- function strlen(value) {
207
- return value.length;
208
- }
209
- function sizeof(value) {
210
- return value.length;
211
- }
212
- function append(value, array) {
213
- return array.push(value), value;
214
- }
215
-
216
- // node_modules/stylis/src/Tokenizer.js
217
- var line = 1;
218
- var column = 1;
219
- var length = 0;
220
- var position = 0;
221
- var character = 0;
222
- var characters = "";
223
- function node(value, root, parent, type, props, children, length2, siblings) {
224
- return { value, root, parent, type, props, children, line, column, length: length2, return: "", siblings };
225
- }
226
- function char() {
227
- return character;
228
- }
229
- function prev() {
230
- character = position > 0 ? charat(characters, --position) : 0;
231
- if (column--, character === 10)
232
- column = 1, line--;
233
- return character;
234
- }
235
- function next() {
236
- character = position < length ? charat(characters, position++) : 0;
237
- if (column++, character === 10)
238
- column = 1, line++;
239
- return character;
240
- }
241
- function peek() {
242
- return charat(characters, position);
243
- }
244
- function caret() {
245
- return position;
246
- }
247
- function slice(begin, end) {
248
- return substr(characters, begin, end);
249
- }
250
- function token(type) {
251
- switch (type) {
252
- case 0:
253
- case 9:
254
- case 10:
255
- case 13:
256
- case 32:
257
- return 5;
258
- case 33:
259
- case 43:
260
- case 44:
261
- case 47:
262
- case 62:
263
- case 64:
264
- case 126:
265
- case 59:
266
- case 123:
267
- case 125:
268
- return 4;
269
- case 58:
270
- return 3;
271
- case 34:
272
- case 39:
273
- case 40:
274
- case 91:
275
- return 2;
276
- case 41:
277
- case 93:
278
- return 1;
279
- }
280
- return 0;
281
- }
282
- function alloc(value) {
283
- return line = column = 1, length = strlen(characters = value), position = 0, [];
284
- }
285
- function dealloc(value) {
286
- return characters = "", value;
287
- }
288
- function delimit(type) {
289
- return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
290
- }
291
- function whitespace(type) {
292
- while (character = peek())
293
- if (character < 33)
294
- next();
295
- else
296
- break;
297
- return token(type) > 2 || token(character) > 3 ? "" : " ";
298
- }
299
- function escaping(index, count) {
300
- while (--count && next())
301
- if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
302
- break;
303
- return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
304
- }
305
- function delimiter(type) {
306
- while (next())
307
- switch (character) {
308
- case type:
309
- return position;
310
- case 34:
311
- case 39:
312
- if (type !== 34 && type !== 39)
313
- delimiter(character);
314
- break;
315
- case 40:
316
- if (type === 41)
317
- delimiter(type);
318
- break;
319
- case 92:
320
- next();
321
- break;
322
- }
323
- return position;
324
- }
325
- function commenter(type, index) {
326
- while (next())
327
- if (type + character === 47 + 10)
328
- break;
329
- else if (type + character === 42 + 42 && peek() === 47)
330
- break;
331
- return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
332
- }
333
- function identifier(index) {
334
- while (!token(peek()))
335
- next();
336
- return slice(index, position);
337
- }
338
-
339
- // node_modules/stylis/src/Parser.js
340
- function compile(value) {
341
- return dealloc(parse2("", null, null, null, [""], value = alloc(value), 0, [0], value));
342
- }
343
- function parse2(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
344
- var index = 0;
345
- var offset2 = 0;
346
- var length2 = pseudo;
347
- var atrule = 0;
348
- var property = 0;
349
- var previous = 0;
350
- var variable = 1;
351
- var scanning = 1;
352
- var ampersand = 1;
353
- var character2 = 0;
354
- var type = "";
355
- var props = rules;
356
- var children = rulesets;
357
- var reference = rule;
358
- var characters2 = type;
359
- while (scanning)
360
- switch (previous = character2, character2 = next()) {
361
- case 40:
362
- if (previous != 108 && charat(characters2, length2 - 1) == 58) {
363
- if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs(index ? points[index - 1] : 0)) != -1)
364
- ampersand = -1;
365
- break;
366
- }
367
- case 34:
368
- case 39:
369
- case 91:
370
- characters2 += delimit(character2);
371
- break;
372
- case 9:
373
- case 10:
374
- case 13:
375
- case 32:
376
- characters2 += whitespace(previous);
377
- break;
378
- case 92:
379
- characters2 += escaping(caret() - 1, 7);
380
- continue;
381
- case 47:
382
- switch (peek()) {
383
- case 42:
384
- case 47:
385
- append(comment(commenter(next(), caret()), root, parent, declarations), declarations);
386
- if ((token(previous || 1) == 5 || token(peek() || 1) == 5) && strlen(characters2) && substr(characters2, -1, void 0) !== " ")
387
- characters2 += " ";
388
- break;
389
- default:
390
- characters2 += "/";
391
- }
392
- break;
393
- case 123 * variable:
394
- points[index++] = strlen(characters2) * ampersand;
395
- case 125 * variable:
396
- case 59:
397
- case 0:
398
- switch (character2) {
399
- case 0:
400
- case 125:
401
- scanning = 0;
402
- case 59 + offset2:
403
- if (ampersand == -1)
404
- characters2 = replace(characters2, /\f/g, "");
405
- if (property > 0 && (strlen(characters2) - length2 || variable === 0 && previous === 47))
406
- append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations);
407
- break;
408
- case 59:
409
- characters2 += ";";
410
- default:
411
- append(reference = ruleset(characters2, root, parent, index, offset2, rules, points, type, props = [], children = [], length2, rulesets), rulesets);
412
- if (character2 === 123)
413
- if (offset2 === 0)
414
- parse2(characters2, root, reference, reference, props, rulesets, length2, points, children);
415
- else
416
- switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
417
- case 100:
418
- case 108:
419
- case 109:
420
- case 115:
421
- parse2(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2, children), children), rules, children, length2, points, rule ? props : children);
422
- break;
423
- default:
424
- parse2(characters2, reference, reference, reference, [""], children, 0, points, children);
425
- }
426
- }
427
- index = offset2 = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
428
- break;
429
- case 58:
430
- length2 = 1 + strlen(characters2), property = previous;
431
- default:
432
- if (variable < 1) {
433
- if (character2 == 123)
434
- --variable;
435
- else if (character2 == 125 && variable++ == 0 && prev() == 125)
436
- continue;
437
- }
438
- switch (characters2 += from(character2), character2 * variable) {
439
- case 38:
440
- ampersand = offset2 > 0 ? 1 : (characters2 += "\f", -1);
441
- break;
442
- case 44:
443
- points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
444
- break;
445
- case 64:
446
- if (peek() === 45)
447
- characters2 += delimit(next());
448
- atrule = peek(), offset2 = length2 = strlen(type = characters2 += identifier(caret())), character2++;
449
- break;
450
- case 45:
451
- if (previous === 45 && strlen(characters2) == 2)
452
- variable = 0;
453
- }
454
- }
455
- return rulesets;
456
- }
457
- function ruleset(value, root, parent, index, offset2, rules, points, type, props, children, length2, siblings) {
458
- var post = offset2 - 1;
459
- var rule = offset2 === 0 ? rules : [""];
460
- var size2 = sizeof(rule);
461
- for (var i = 0, j = 0, k = 0; i < index; ++i)
462
- for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size2; ++x)
463
- if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
464
- props[k++] = z;
465
- return node(value, root, parent, offset2 === 0 ? RULESET : type, props, children, length2, siblings);
466
- }
467
- function comment(value, root, parent, siblings) {
468
- return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);
469
- }
470
- function declaration(value, root, parent, length2, siblings) {
471
- return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2, siblings);
472
- }
473
-
474
- // node_modules/stylis/src/Serializer.js
475
- function serialize(children, callback) {
476
- var output = "";
477
- for (var i = 0; i < children.length; i++)
478
- output += callback(children[i], i, children, callback) || "";
479
- return output;
480
- }
481
- function stringify(element, index, children, callback) {
482
- switch (element.type) {
483
- case LAYER:
484
- if (element.children.length)
485
- break;
486
- case IMPORT:
487
- case DECLARATION:
488
- return element.return = element.return || element.value;
489
- case COMMENT:
490
- return "";
491
- case KEYFRAMES:
492
- return element.return = element.value + "{" + serialize(element.children, callback) + "}";
493
- case RULESET:
494
- if (!strlen(element.value = element.props.join(",")))
495
- return "";
496
- }
497
- return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
498
- }
499
-
500
- // node_modules/mermaid/dist/mermaid.core.mjs
501
- var id = "c4";
502
- var detector = /* @__PURE__ */ __name((txt) => {
503
- return /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt);
504
- }, "detector");
505
- var loader = /* @__PURE__ */ __name(async () => {
506
- const { diagram: diagram2 } = await import("./c4Diagram-6F5ED5ID-TBHFK2XY.js");
507
- return { id, diagram: diagram2 };
508
- }, "loader");
509
- var plugin = {
510
- id,
511
- detector,
512
- loader
513
- };
514
- var c4Detector_default = plugin;
515
- var id2 = "flowchart";
516
- var detector2 = /* @__PURE__ */ __name((txt, config) => {
517
- if (config?.flowchart?.defaultRenderer === "dagre-wrapper" || config?.flowchart?.defaultRenderer === "elk") {
518
- return false;
519
- }
520
- return /^\s*graph/.test(txt);
521
- }, "detector");
522
- var loader2 = /* @__PURE__ */ __name(async () => {
523
- const { diagram: diagram2 } = await import("./flowDiagram-7ASYPVHJ-2542732I.js");
524
- return { id: id2, diagram: diagram2 };
525
- }, "loader");
526
- var plugin2 = {
527
- id: id2,
528
- detector: detector2,
529
- loader: loader2
530
- };
531
- var flowDetector_default = plugin2;
532
- var id3 = "flowchart-v2";
533
- var detector3 = /* @__PURE__ */ __name((txt, config) => {
534
- if (config?.flowchart?.defaultRenderer === "dagre-d3") {
535
- return false;
536
- }
537
- if (config?.flowchart?.defaultRenderer === "elk") {
538
- config.layout = "elk";
539
- }
540
- if (/^\s*graph/.test(txt) && config?.flowchart?.defaultRenderer === "dagre-wrapper") {
541
- return true;
542
- }
543
- return /^\s*flowchart/.test(txt);
544
- }, "detector");
545
- var loader3 = /* @__PURE__ */ __name(async () => {
546
- const { diagram: diagram2 } = await import("./flowDiagram-7ASYPVHJ-2542732I.js");
547
- return { id: id3, diagram: diagram2 };
548
- }, "loader");
549
- var plugin3 = {
550
- id: id3,
551
- detector: detector3,
552
- loader: loader3
553
- };
554
- var flowDetector_v2_default = plugin3;
555
- var id4 = "er";
556
- var detector4 = /* @__PURE__ */ __name((txt) => {
557
- return /^\s*erDiagram/.test(txt);
558
- }, "detector");
559
- var loader4 = /* @__PURE__ */ __name(async () => {
560
- const { diagram: diagram2 } = await import("./erDiagram-6RL3IURR-HQULDVJI.js");
561
- return { id: id4, diagram: diagram2 };
562
- }, "loader");
563
- var plugin4 = {
564
- id: id4,
565
- detector: detector4,
566
- loader: loader4
567
- };
568
- var erDetector_default = plugin4;
569
- var id5 = "gitGraph";
570
- var detector5 = /* @__PURE__ */ __name((txt) => {
571
- return /^\s*gitGraph/.test(txt);
572
- }, "detector");
573
- var loader5 = /* @__PURE__ */ __name(async () => {
574
- const { diagram: diagram2 } = await import("./gitGraphDiagram-NRZ2UAAF-5DU6QMYZ.js");
575
- return { id: id5, diagram: diagram2 };
576
- }, "loader");
577
- var plugin5 = {
578
- id: id5,
579
- detector: detector5,
580
- loader: loader5
581
- };
582
- var gitGraphDetector_default = plugin5;
583
- var id6 = "gantt";
584
- var detector6 = /* @__PURE__ */ __name((txt) => {
585
- return /^\s*gantt/.test(txt);
586
- }, "detector");
587
- var loader6 = /* @__PURE__ */ __name(async () => {
588
- const { diagram: diagram2 } = await import("./ganttDiagram-NTVNEXSI-V66YQQB3.js");
589
- return { id: id6, diagram: diagram2 };
590
- }, "loader");
591
- var plugin6 = {
592
- id: id6,
593
- detector: detector6,
594
- loader: loader6
595
- };
596
- var ganttDetector_default = plugin6;
597
- var id7 = "info";
598
- var detector7 = /* @__PURE__ */ __name((txt) => {
599
- return /^\s*info/.test(txt);
600
- }, "detector");
601
- var loader7 = /* @__PURE__ */ __name(async () => {
602
- const { diagram: diagram2 } = await import("./infoDiagram-A4XQUW5V-UZERSQDI.js");
603
- return { id: id7, diagram: diagram2 };
604
- }, "loader");
605
- var info = {
606
- id: id7,
607
- detector: detector7,
608
- loader: loader7
609
- };
610
- var id8 = "pie";
611
- var detector8 = /* @__PURE__ */ __name((txt) => {
612
- return /^\s*pie/.test(txt);
613
- }, "detector");
614
- var loader8 = /* @__PURE__ */ __name(async () => {
615
- const { diagram: diagram2 } = await import("./pieDiagram-YF2LJOPJ-IXEVHPCM.js");
616
- return { id: id8, diagram: diagram2 };
617
- }, "loader");
618
- var pie = {
619
- id: id8,
620
- detector: detector8,
621
- loader: loader8
622
- };
623
- var id9 = "quadrantChart";
624
- var detector9 = /* @__PURE__ */ __name((txt) => {
625
- return /^\s*quadrantChart/.test(txt);
626
- }, "detector");
627
- var loader9 = /* @__PURE__ */ __name(async () => {
628
- const { diagram: diagram2 } = await import("./quadrantDiagram-OS5C2QUG-MW26UCZV.js");
629
- return { id: id9, diagram: diagram2 };
630
- }, "loader");
631
- var plugin7 = {
632
- id: id9,
633
- detector: detector9,
634
- loader: loader9
635
- };
636
- var quadrantDetector_default = plugin7;
637
- var id10 = "xychart";
638
- var detector10 = /* @__PURE__ */ __name((txt) => {
639
- return /^\s*xychart-beta/.test(txt);
640
- }, "detector");
641
- var loader10 = /* @__PURE__ */ __name(async () => {
642
- const { diagram: diagram2 } = await import("./xychartDiagram-6QU3TZC5-BFFLEHUP.js");
643
- return { id: id10, diagram: diagram2 };
644
- }, "loader");
645
- var plugin8 = {
646
- id: id10,
647
- detector: detector10,
648
- loader: loader10
649
- };
650
- var xychartDetector_default = plugin8;
651
- var id11 = "requirement";
652
- var detector11 = /* @__PURE__ */ __name((txt) => {
653
- return /^\s*requirement(Diagram)?/.test(txt);
654
- }, "detector");
655
- var loader11 = /* @__PURE__ */ __name(async () => {
656
- const { diagram: diagram2 } = await import("./requirementDiagram-MIRIMTAZ-BX24AAHL.js");
657
- return { id: id11, diagram: diagram2 };
658
- }, "loader");
659
- var plugin9 = {
660
- id: id11,
661
- detector: detector11,
662
- loader: loader11
663
- };
664
- var requirementDetector_default = plugin9;
665
- var id12 = "sequence";
666
- var detector12 = /* @__PURE__ */ __name((txt) => {
667
- return /^\s*sequenceDiagram/.test(txt);
668
- }, "detector");
669
- var loader12 = /* @__PURE__ */ __name(async () => {
670
- const { diagram: diagram2 } = await import("./sequenceDiagram-G6AWOVSC-2T3JBUZ2.js");
671
- return { id: id12, diagram: diagram2 };
672
- }, "loader");
673
- var plugin10 = {
674
- id: id12,
675
- detector: detector12,
676
- loader: loader12
677
- };
678
- var sequenceDetector_default = plugin10;
679
- var id13 = "class";
680
- var detector13 = /* @__PURE__ */ __name((txt, config) => {
681
- if (config?.class?.defaultRenderer === "dagre-wrapper") {
682
- return false;
683
- }
684
- return /^\s*classDiagram/.test(txt);
685
- }, "detector");
686
- var loader13 = /* @__PURE__ */ __name(async () => {
687
- const { diagram: diagram2 } = await import("./classDiagram-LNE6IOMH-VRQHEQWM.js");
688
- return { id: id13, diagram: diagram2 };
689
- }, "loader");
690
- var plugin11 = {
691
- id: id13,
692
- detector: detector13,
693
- loader: loader13
694
- };
695
- var classDetector_default = plugin11;
696
- var id14 = "classDiagram";
697
- var detector14 = /* @__PURE__ */ __name((txt, config) => {
698
- if (/^\s*classDiagram/.test(txt) && config?.class?.defaultRenderer === "dagre-wrapper") {
699
- return true;
700
- }
701
- return /^\s*classDiagram-v2/.test(txt);
702
- }, "detector");
703
- var loader14 = /* @__PURE__ */ __name(async () => {
704
- const { diagram: diagram2 } = await import("./classDiagram-v2-MQ7JQ4JX-5GB4NXXM.js");
705
- return { id: id14, diagram: diagram2 };
706
- }, "loader");
707
- var plugin12 = {
708
- id: id14,
709
- detector: detector14,
710
- loader: loader14
711
- };
712
- var classDetector_V2_default = plugin12;
713
- var id15 = "state";
714
- var detector15 = /* @__PURE__ */ __name((txt, config) => {
715
- if (config?.state?.defaultRenderer === "dagre-wrapper") {
716
- return false;
717
- }
718
- return /^\s*stateDiagram/.test(txt);
719
- }, "detector");
720
- var loader15 = /* @__PURE__ */ __name(async () => {
721
- const { diagram: diagram2 } = await import("./stateDiagram-MAYHULR4-HZ5EGLPA.js");
722
- return { id: id15, diagram: diagram2 };
723
- }, "loader");
724
- var plugin13 = {
725
- id: id15,
726
- detector: detector15,
727
- loader: loader15
728
- };
729
- var stateDetector_default = plugin13;
730
- var id16 = "stateDiagram";
731
- var detector16 = /* @__PURE__ */ __name((txt, config) => {
732
- if (/^\s*stateDiagram-v2/.test(txt)) {
733
- return true;
734
- }
735
- if (/^\s*stateDiagram/.test(txt) && config?.state?.defaultRenderer === "dagre-wrapper") {
736
- return true;
737
- }
738
- return false;
739
- }, "detector");
740
- var loader16 = /* @__PURE__ */ __name(async () => {
741
- const { diagram: diagram2 } = await import("./stateDiagram-v2-4JROLMXI-DN2FEZV3.js");
742
- return { id: id16, diagram: diagram2 };
743
- }, "loader");
744
- var plugin14 = {
745
- id: id16,
746
- detector: detector16,
747
- loader: loader16
748
- };
749
- var stateDetector_V2_default = plugin14;
750
- var id17 = "journey";
751
- var detector17 = /* @__PURE__ */ __name((txt) => {
752
- return /^\s*journey/.test(txt);
753
- }, "detector");
754
- var loader17 = /* @__PURE__ */ __name(async () => {
755
- const { diagram: diagram2 } = await import("./journeyDiagram-G5WM74LC-RVKMRGRW.js");
756
- return { id: id17, diagram: diagram2 };
757
- }, "loader");
758
- var plugin15 = {
759
- id: id17,
760
- detector: detector17,
761
- loader: loader17
762
- };
763
- var journeyDetector_default = plugin15;
764
- var draw = /* @__PURE__ */ __name((_text, id26, version2) => {
765
- log.debug("rendering svg for syntax error\n");
766
- const svg = selectSvgElement(id26);
767
- const g = svg.append("g");
768
- svg.attr("viewBox", "0 0 2412 512");
769
- configureSvgSize(svg, 100, 512, true);
770
- g.append("path").attr("class", "error-icon").attr(
771
- "d",
772
- "m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"
773
- );
774
- g.append("path").attr("class", "error-icon").attr(
775
- "d",
776
- "m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"
777
- );
778
- g.append("path").attr("class", "error-icon").attr(
779
- "d",
780
- "m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"
781
- );
782
- g.append("path").attr("class", "error-icon").attr(
783
- "d",
784
- "m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"
785
- );
786
- g.append("path").attr("class", "error-icon").attr(
787
- "d",
788
- "m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"
789
- );
790
- g.append("path").attr("class", "error-icon").attr(
791
- "d",
792
- "m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"
793
- );
794
- g.append("text").attr("class", "error-text").attr("x", 1440).attr("y", 250).attr("font-size", "150px").style("text-anchor", "middle").text("Syntax error in text");
795
- g.append("text").attr("class", "error-text").attr("x", 1250).attr("y", 400).attr("font-size", "100px").style("text-anchor", "middle").text(`mermaid version ${version2}`);
796
- }, "draw");
797
- var renderer = { draw };
798
- var errorRenderer_default = renderer;
799
- var diagram = {
800
- db: {},
801
- renderer,
802
- parser: {
803
- parse: /* @__PURE__ */ __name(() => {
804
- return;
805
- }, "parse")
806
- }
807
- };
808
- var errorDiagram_default = diagram;
809
- var id18 = "flowchart-elk";
810
- var detector18 = /* @__PURE__ */ __name((txt, config = {}) => {
811
- if (
812
- // If diagram explicitly states flowchart-elk
813
- /^\s*flowchart-elk/.test(txt) || // If a flowchart/graph diagram has their default renderer set to elk
814
- /^\s*flowchart|graph/.test(txt) && config?.flowchart?.defaultRenderer === "elk"
815
- ) {
816
- config.layout = "elk";
817
- return true;
818
- }
819
- return false;
820
- }, "detector");
821
- var loader18 = /* @__PURE__ */ __name(async () => {
822
- const { diagram: diagram2 } = await import("./flowDiagram-7ASYPVHJ-2542732I.js");
823
- return { id: id18, diagram: diagram2 };
824
- }, "loader");
825
- var plugin16 = {
826
- id: id18,
827
- detector: detector18,
828
- loader: loader18
829
- };
830
- var detector_default = plugin16;
831
- var id19 = "timeline";
832
- var detector19 = /* @__PURE__ */ __name((txt) => {
833
- return /^\s*timeline/.test(txt);
834
- }, "detector");
835
- var loader19 = /* @__PURE__ */ __name(async () => {
836
- const { diagram: diagram2 } = await import("./timeline-definition-U7ZMHBDA-GB6AKKW4.js");
837
- return { id: id19, diagram: diagram2 };
838
- }, "loader");
839
- var plugin17 = {
840
- id: id19,
841
- detector: detector19,
842
- loader: loader19
843
- };
844
- var detector_default2 = plugin17;
845
- var id20 = "mindmap";
846
- var detector20 = /* @__PURE__ */ __name((txt) => {
847
- return /^\s*mindmap/.test(txt);
848
- }, "detector");
849
- var loader20 = /* @__PURE__ */ __name(async () => {
850
- const { diagram: diagram2 } = await import("./mindmap-definition-GWI6TPTV-MISEH6LG.js");
851
- return { id: id20, diagram: diagram2 };
852
- }, "loader");
853
- var plugin18 = {
854
- id: id20,
855
- detector: detector20,
856
- loader: loader20
857
- };
858
- var detector_default3 = plugin18;
859
- var id21 = "kanban";
860
- var detector21 = /* @__PURE__ */ __name((txt) => {
861
- return /^\s*kanban/.test(txt);
862
- }, "detector");
863
- var loader21 = /* @__PURE__ */ __name(async () => {
864
- const { diagram: diagram2 } = await import("./kanban-definition-QRCXZQQD-NWU5I3TK.js");
865
- return { id: id21, diagram: diagram2 };
866
- }, "loader");
867
- var plugin19 = {
868
- id: id21,
869
- detector: detector21,
870
- loader: loader21
871
- };
872
- var detector_default4 = plugin19;
873
- var id22 = "sankey";
874
- var detector22 = /* @__PURE__ */ __name((txt) => {
875
- return /^\s*sankey-beta/.test(txt);
876
- }, "detector");
877
- var loader22 = /* @__PURE__ */ __name(async () => {
878
- const { diagram: diagram2 } = await import("./sankeyDiagram-Y46BX6SQ-5RKUGG63.js");
879
- return { id: id22, diagram: diagram2 };
880
- }, "loader");
881
- var plugin20 = {
882
- id: id22,
883
- detector: detector22,
884
- loader: loader22
885
- };
886
- var sankeyDetector_default = plugin20;
887
- var id23 = "packet";
888
- var detector23 = /* @__PURE__ */ __name((txt) => {
889
- return /^\s*packet-beta/.test(txt);
890
- }, "detector");
891
- var loader23 = /* @__PURE__ */ __name(async () => {
892
- const { diagram: diagram2 } = await import("./diagram-QW4FP2JN-J2YMUPB5.js");
893
- return { id: id23, diagram: diagram2 };
894
- }, "loader");
895
- var packet = {
896
- id: id23,
897
- detector: detector23,
898
- loader: loader23
899
- };
900
- var id24 = "block";
901
- var detector24 = /* @__PURE__ */ __name((txt) => {
902
- return /^\s*block-beta/.test(txt);
903
- }, "detector");
904
- var loader24 = /* @__PURE__ */ __name(async () => {
905
- const { diagram: diagram2 } = await import("./blockDiagram-ZHA2E4KO-OAYYKCLF.js");
906
- return { id: id24, diagram: diagram2 };
907
- }, "loader");
908
- var plugin21 = {
909
- id: id24,
910
- detector: detector24,
911
- loader: loader24
912
- };
913
- var blockDetector_default = plugin21;
914
- var id25 = "architecture";
915
- var detector25 = /* @__PURE__ */ __name((txt) => {
916
- return /^\s*architecture/.test(txt);
917
- }, "detector");
918
- var loader25 = /* @__PURE__ */ __name(async () => {
919
- const { diagram: diagram2 } = await import("./architectureDiagram-UYN6MBPD-HXPGIDN7.js");
920
- return { id: id25, diagram: diagram2 };
921
- }, "loader");
922
- var architecture = {
923
- id: id25,
924
- detector: detector25,
925
- loader: loader25
926
- };
927
- var architectureDetector_default = architecture;
928
- var hasLoadedDiagrams = false;
929
- var addDiagrams = /* @__PURE__ */ __name(() => {
930
- if (hasLoadedDiagrams) {
931
- return;
932
- }
933
- hasLoadedDiagrams = true;
934
- registerDiagram("error", errorDiagram_default, (text) => {
935
- return text.toLowerCase().trim() === "error";
936
- });
937
- registerDiagram(
938
- "---",
939
- // --- diagram type may appear if YAML front-matter is not parsed correctly
940
- {
941
- db: {
942
- clear: /* @__PURE__ */ __name(() => {
943
- }, "clear")
944
- },
945
- styles: {},
946
- // should never be used
947
- renderer: {
948
- draw: /* @__PURE__ */ __name(() => {
949
- }, "draw")
950
- },
951
- parser: {
952
- parse: /* @__PURE__ */ __name(() => {
953
- throw new Error(
954
- "Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks"
955
- );
956
- }, "parse")
957
- },
958
- init: /* @__PURE__ */ __name(() => null, "init")
959
- // no op
960
- },
961
- (text) => {
962
- return text.toLowerCase().trimStart().startsWith("---");
963
- }
964
- );
965
- registerLazyLoadedDiagrams(
966
- c4Detector_default,
967
- detector_default4,
968
- classDetector_V2_default,
969
- classDetector_default,
970
- erDetector_default,
971
- ganttDetector_default,
972
- info,
973
- pie,
974
- requirementDetector_default,
975
- sequenceDetector_default,
976
- detector_default,
977
- flowDetector_v2_default,
978
- flowDetector_default,
979
- detector_default3,
980
- detector_default2,
981
- gitGraphDetector_default,
982
- stateDetector_V2_default,
983
- stateDetector_default,
984
- journeyDetector_default,
985
- quadrantDetector_default,
986
- sankeyDetector_default,
987
- packet,
988
- xychartDetector_default,
989
- blockDetector_default,
990
- architectureDetector_default
991
- );
992
- }, "addDiagrams");
993
- var loadRegisteredDiagrams = /* @__PURE__ */ __name(async () => {
994
- log.debug(`Loading registered diagrams`);
995
- const results = await Promise.allSettled(
996
- Object.entries(detectors).map(async ([key, { detector: detector26, loader: loader26 }]) => {
997
- if (loader26) {
998
- try {
999
- getDiagram(key);
1000
- } catch {
1001
- try {
1002
- const { diagram: diagram2, id: id26 } = await loader26();
1003
- registerDiagram(id26, diagram2, detector26);
1004
- } catch (err) {
1005
- log.error(`Failed to load external diagram with key ${key}. Removing from detectors.`);
1006
- delete detectors[key];
1007
- throw err;
1008
- }
1009
- }
1010
- }
1011
- })
1012
- );
1013
- const failed = results.filter((result) => result.status === "rejected");
1014
- if (failed.length > 0) {
1015
- log.error(`Failed to load ${failed.length} external diagrams`);
1016
- for (const res of failed) {
1017
- log.error(res);
1018
- }
1019
- throw new Error(`Failed to load ${failed.length} external diagrams`);
1020
- }
1021
- }, "loadRegisteredDiagrams");
1022
- var SVG_ROLE = "graphics-document document";
1023
- function setA11yDiagramInfo(svg, diagramType) {
1024
- svg.attr("role", SVG_ROLE);
1025
- if (diagramType !== "") {
1026
- svg.attr("aria-roledescription", diagramType);
1027
- }
1028
- }
1029
- __name(setA11yDiagramInfo, "setA11yDiagramInfo");
1030
- function addSVGa11yTitleDescription(svg, a11yTitle, a11yDesc, baseId) {
1031
- if (svg.insert === void 0) {
1032
- return;
1033
- }
1034
- if (a11yDesc) {
1035
- const descId = `chart-desc-${baseId}`;
1036
- svg.attr("aria-describedby", descId);
1037
- svg.insert("desc", ":first-child").attr("id", descId).text(a11yDesc);
1038
- }
1039
- if (a11yTitle) {
1040
- const titleId = `chart-title-${baseId}`;
1041
- svg.attr("aria-labelledby", titleId);
1042
- svg.insert("title", ":first-child").attr("id", titleId).text(a11yTitle);
1043
- }
1044
- }
1045
- __name(addSVGa11yTitleDescription, "addSVGa11yTitleDescription");
1046
- var Diagram = class _Diagram {
1047
- constructor(type, text, db, parser, renderer2) {
1048
- this.type = type;
1049
- this.text = text;
1050
- this.db = db;
1051
- this.parser = parser;
1052
- this.renderer = renderer2;
1053
- }
1054
- static {
1055
- __name(this, "Diagram");
1056
- }
1057
- static async fromText(text, metadata = {}) {
1058
- const config = getConfig();
1059
- const type = detectType(text, config);
1060
- text = encodeEntities(text) + "\n";
1061
- try {
1062
- getDiagram(type);
1063
- } catch {
1064
- const loader26 = getDiagramLoader(type);
1065
- if (!loader26) {
1066
- throw new UnknownDiagramError(`Diagram ${type} not found.`);
1067
- }
1068
- const { id: id26, diagram: diagram2 } = await loader26();
1069
- registerDiagram(id26, diagram2);
1070
- }
1071
- const { db, parser, renderer: renderer2, init: init2 } = getDiagram(type);
1072
- if (parser.parser) {
1073
- parser.parser.yy = db;
1074
- }
1075
- db.clear?.();
1076
- init2?.(config);
1077
- if (metadata.title) {
1078
- db.setDiagramTitle?.(metadata.title);
1079
- }
1080
- await parser.parse(text);
1081
- return new _Diagram(type, text, db, parser, renderer2);
1082
- }
1083
- async render(id26, version2) {
1084
- await this.renderer.draw(this.text, id26, version2, this);
1085
- }
1086
- getParser() {
1087
- return this.parser;
1088
- }
1089
- getType() {
1090
- return this.type;
1091
- }
1092
- };
1093
- var interactionFunctions = [];
1094
- var attachFunctions = /* @__PURE__ */ __name(() => {
1095
- interactionFunctions.forEach((f) => {
1096
- f();
1097
- });
1098
- interactionFunctions = [];
1099
- }, "attachFunctions");
1100
- var cleanupComments = /* @__PURE__ */ __name((text) => {
1101
- return text.replace(/^\s*%%(?!{)[^\n]+\n?/gm, "").trimStart();
1102
- }, "cleanupComments");
1103
- function extractFrontMatter(text) {
1104
- const matches = text.match(frontMatterRegex);
1105
- if (!matches) {
1106
- return {
1107
- text,
1108
- metadata: {}
1109
- };
1110
- }
1111
- let parsed = load(matches[1], {
1112
- // To support config, we need JSON schema.
1113
- // https://www.yaml.org/spec/1.2/spec.html#id2803231
1114
- schema: JSON_SCHEMA
1115
- }) ?? {};
1116
- parsed = typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
1117
- const metadata = {};
1118
- if (parsed.displayMode) {
1119
- metadata.displayMode = parsed.displayMode.toString();
1120
- }
1121
- if (parsed.title) {
1122
- metadata.title = parsed.title.toString();
1123
- }
1124
- if (parsed.config) {
1125
- metadata.config = parsed.config;
1126
- }
1127
- return {
1128
- text: text.slice(matches[0].length),
1129
- metadata
1130
- };
1131
- }
1132
- __name(extractFrontMatter, "extractFrontMatter");
1133
- var cleanupText = /* @__PURE__ */ __name((code) => {
1134
- return code.replace(/\r\n?/g, "\n").replace(
1135
- /<(\w+)([^>]*)>/g,
1136
- (match, tag, attributes) => "<" + tag + attributes.replace(/="([^"]*)"/g, "='$1'") + ">"
1137
- );
1138
- }, "cleanupText");
1139
- var processFrontmatter = /* @__PURE__ */ __name((code) => {
1140
- const { text, metadata } = extractFrontMatter(code);
1141
- const { displayMode, title, config = {} } = metadata;
1142
- if (displayMode) {
1143
- if (!config.gantt) {
1144
- config.gantt = {};
1145
- }
1146
- config.gantt.displayMode = displayMode;
1147
- }
1148
- return { title, config, text };
1149
- }, "processFrontmatter");
1150
- var processDirectives = /* @__PURE__ */ __name((code) => {
1151
- const initDirective = utils_default.detectInit(code) ?? {};
1152
- const wrapDirectives = utils_default.detectDirective(code, "wrap");
1153
- if (Array.isArray(wrapDirectives)) {
1154
- initDirective.wrap = wrapDirectives.some(({ type }) => type === "wrap");
1155
- } else if (wrapDirectives?.type === "wrap") {
1156
- initDirective.wrap = true;
1157
- }
1158
- return {
1159
- text: removeDirectives(code),
1160
- directive: initDirective
1161
- };
1162
- }, "processDirectives");
1163
- function preprocessDiagram(code) {
1164
- const cleanedCode = cleanupText(code);
1165
- const frontMatterResult = processFrontmatter(cleanedCode);
1166
- const directiveResult = processDirectives(frontMatterResult.text);
1167
- const config = cleanAndMerge(frontMatterResult.config, directiveResult.directive);
1168
- code = cleanupComments(directiveResult.text);
1169
- return {
1170
- code,
1171
- title: frontMatterResult.title,
1172
- config
1173
- };
1174
- }
1175
- __name(preprocessDiagram, "preprocessDiagram");
1176
- function toBase64(str) {
1177
- const utf8Bytes = new TextEncoder().encode(str);
1178
- const utf8Str = Array.from(utf8Bytes, (byte) => String.fromCodePoint(byte)).join("");
1179
- return btoa(utf8Str);
1180
- }
1181
- __name(toBase64, "toBase64");
1182
- var MAX_TEXTLENGTH = 5e4;
1183
- var MAX_TEXTLENGTH_EXCEEDED_MSG = "graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa";
1184
- var SECURITY_LVL_SANDBOX = "sandbox";
1185
- var SECURITY_LVL_LOOSE = "loose";
1186
- var XMLNS_SVG_STD = "http://www.w3.org/2000/svg";
1187
- var XMLNS_XLINK_STD = "http://www.w3.org/1999/xlink";
1188
- var XMLNS_XHTML_STD = "http://www.w3.org/1999/xhtml";
1189
- var IFRAME_WIDTH = "100%";
1190
- var IFRAME_HEIGHT = "100%";
1191
- var IFRAME_STYLES = "border:0;margin:0;";
1192
- var IFRAME_BODY_STYLE = "margin:0";
1193
- var IFRAME_SANDBOX_OPTS = "allow-top-navigation-by-user-activation allow-popups";
1194
- var IFRAME_NOT_SUPPORTED_MSG = 'The "iframe" tag is not supported by your browser.';
1195
- var DOMPURIFY_TAGS = ["foreignobject"];
1196
- var DOMPURIFY_ATTR = ["dominant-baseline"];
1197
- function processAndSetConfigs(text) {
1198
- const processed = preprocessDiagram(text);
1199
- reset();
1200
- addDirective(processed.config ?? {});
1201
- return processed;
1202
- }
1203
- __name(processAndSetConfigs, "processAndSetConfigs");
1204
- async function parse3(text, parseOptions) {
1205
- addDiagrams();
1206
- try {
1207
- const { code, config } = processAndSetConfigs(text);
1208
- const diagram2 = await getDiagramFromText(code);
1209
- return { diagramType: diagram2.type, config };
1210
- } catch (error) {
1211
- if (parseOptions?.suppressErrors) {
1212
- return false;
1213
- }
1214
- throw error;
1215
- }
1216
- }
1217
- __name(parse3, "parse");
1218
- var cssImportantStyles = /* @__PURE__ */ __name((cssClass, element, cssClasses = []) => {
1219
- return `
1220
- .${cssClass} ${element} { ${cssClasses.join(" !important; ")} !important; }`;
1221
- }, "cssImportantStyles");
1222
- var createCssStyles = /* @__PURE__ */ __name((config, classDefs = /* @__PURE__ */ new Map()) => {
1223
- let cssStyles = "";
1224
- if (config.themeCSS !== void 0) {
1225
- cssStyles += `
1226
- ${config.themeCSS}`;
1227
- }
1228
- if (config.fontFamily !== void 0) {
1229
- cssStyles += `
1230
- :root { --mermaid-font-family: ${config.fontFamily}}`;
1231
- }
1232
- if (config.altFontFamily !== void 0) {
1233
- cssStyles += `
1234
- :root { --mermaid-alt-font-family: ${config.altFontFamily}}`;
1235
- }
1236
- if (classDefs instanceof Map) {
1237
- const htmlLabels = config.htmlLabels ?? config.flowchart?.htmlLabels;
1238
- const cssHtmlElements = ["> *", "span"];
1239
- const cssShapeElements = ["rect", "polygon", "ellipse", "circle", "path"];
1240
- const cssElements = htmlLabels ? cssHtmlElements : cssShapeElements;
1241
- classDefs.forEach((styleClassDef) => {
1242
- if (!isEmpty_default(styleClassDef.styles)) {
1243
- cssElements.forEach((cssElement) => {
1244
- cssStyles += cssImportantStyles(styleClassDef.id, cssElement, styleClassDef.styles);
1245
- });
1246
- }
1247
- if (!isEmpty_default(styleClassDef.textStyles)) {
1248
- cssStyles += cssImportantStyles(
1249
- styleClassDef.id,
1250
- "tspan",
1251
- (styleClassDef?.textStyles || []).map((s) => s.replace("color", "fill"))
1252
- );
1253
- }
1254
- });
1255
- }
1256
- return cssStyles;
1257
- }, "createCssStyles");
1258
- var createUserStyles = /* @__PURE__ */ __name((config, graphType, classDefs, svgId) => {
1259
- const userCSSstyles = createCssStyles(config, classDefs);
1260
- const allStyles = styles_default(graphType, userCSSstyles, config.themeVariables);
1261
- return serialize(compile(`${svgId}{${allStyles}}`), stringify);
1262
- }, "createUserStyles");
1263
- var cleanUpSvgCode = /* @__PURE__ */ __name((svgCode = "", inSandboxMode, useArrowMarkerUrls) => {
1264
- let cleanedUpSvg = svgCode;
1265
- if (!useArrowMarkerUrls && !inSandboxMode) {
1266
- cleanedUpSvg = cleanedUpSvg.replace(
1267
- /marker-end="url\([\d+./:=?A-Za-z-]*?#/g,
1268
- 'marker-end="url(#'
1269
- );
1270
- }
1271
- cleanedUpSvg = decodeEntities(cleanedUpSvg);
1272
- cleanedUpSvg = cleanedUpSvg.replace(/<br>/g, "<br/>");
1273
- return cleanedUpSvg;
1274
- }, "cleanUpSvgCode");
1275
- var putIntoIFrame = /* @__PURE__ */ __name((svgCode = "", svgElement) => {
1276
- const height = svgElement?.viewBox?.baseVal?.height ? svgElement.viewBox.baseVal.height + "px" : IFRAME_HEIGHT;
1277
- const base64encodedSrc = toBase64(`<body style="${IFRAME_BODY_STYLE}">${svgCode}</body>`);
1278
- return `<iframe style="width:${IFRAME_WIDTH};height:${height};${IFRAME_STYLES}" src="data:text/html;charset=UTF-8;base64,${base64encodedSrc}" sandbox="${IFRAME_SANDBOX_OPTS}">
1279
- ${IFRAME_NOT_SUPPORTED_MSG}
1280
- </iframe>`;
1281
- }, "putIntoIFrame");
1282
- var appendDivSvgG = /* @__PURE__ */ __name((parentRoot, id26, enclosingDivId, divStyle, svgXlink) => {
1283
- const enclosingDiv = parentRoot.append("div");
1284
- enclosingDiv.attr("id", enclosingDivId);
1285
- if (divStyle) {
1286
- enclosingDiv.attr("style", divStyle);
1287
- }
1288
- const svgNode = enclosingDiv.append("svg").attr("id", id26).attr("width", "100%").attr("xmlns", XMLNS_SVG_STD);
1289
- if (svgXlink) {
1290
- svgNode.attr("xmlns:xlink", svgXlink);
1291
- }
1292
- svgNode.append("g");
1293
- return parentRoot;
1294
- }, "appendDivSvgG");
1295
- function sandboxedIframe(parentNode, iFrameId) {
1296
- return parentNode.append("iframe").attr("id", iFrameId).attr("style", "width: 100%; height: 100%;").attr("sandbox", "");
1297
- }
1298
- __name(sandboxedIframe, "sandboxedIframe");
1299
- var removeExistingElements = /* @__PURE__ */ __name((doc, id26, divId, iFrameId) => {
1300
- doc.getElementById(id26)?.remove();
1301
- doc.getElementById(divId)?.remove();
1302
- doc.getElementById(iFrameId)?.remove();
1303
- }, "removeExistingElements");
1304
- var render = /* @__PURE__ */ __name(async function(id26, text, svgContainingElement) {
1305
- addDiagrams();
1306
- const processed = processAndSetConfigs(text);
1307
- text = processed.code;
1308
- const config = getConfig();
1309
- log.debug(config);
1310
- if (text.length > (config?.maxTextSize ?? MAX_TEXTLENGTH)) {
1311
- text = MAX_TEXTLENGTH_EXCEEDED_MSG;
1312
- }
1313
- const idSelector = "#" + id26;
1314
- const iFrameID = "i" + id26;
1315
- const iFrameID_selector = "#" + iFrameID;
1316
- const enclosingDivID = "d" + id26;
1317
- const enclosingDivID_selector = "#" + enclosingDivID;
1318
- const removeTempElements = /* @__PURE__ */ __name(() => {
1319
- const tmpElementSelector = isSandboxed ? iFrameID_selector : enclosingDivID_selector;
1320
- const node2 = select_default(tmpElementSelector).node();
1321
- if (node2 && "remove" in node2) {
1322
- node2.remove();
1323
- }
1324
- }, "removeTempElements");
1325
- let root = select_default("body");
1326
- const isSandboxed = config.securityLevel === SECURITY_LVL_SANDBOX;
1327
- const isLooseSecurityLevel = config.securityLevel === SECURITY_LVL_LOOSE;
1328
- const fontFamily = config.fontFamily;
1329
- if (svgContainingElement !== void 0) {
1330
- if (svgContainingElement) {
1331
- svgContainingElement.innerHTML = "";
1332
- }
1333
- if (isSandboxed) {
1334
- const iframe = sandboxedIframe(select_default(svgContainingElement), iFrameID);
1335
- root = select_default(iframe.nodes()[0].contentDocument.body);
1336
- root.node().style.margin = 0;
1337
- } else {
1338
- root = select_default(svgContainingElement);
1339
- }
1340
- appendDivSvgG(root, id26, enclosingDivID, `font-family: ${fontFamily}`, XMLNS_XLINK_STD);
1341
- } else {
1342
- removeExistingElements(document, id26, enclosingDivID, iFrameID);
1343
- if (isSandboxed) {
1344
- const iframe = sandboxedIframe(select_default("body"), iFrameID);
1345
- root = select_default(iframe.nodes()[0].contentDocument.body);
1346
- root.node().style.margin = 0;
1347
- } else {
1348
- root = select_default("body");
1349
- }
1350
- appendDivSvgG(root, id26, enclosingDivID);
1351
- }
1352
- let diag;
1353
- let parseEncounteredException;
1354
- try {
1355
- diag = await Diagram.fromText(text, { title: processed.title });
1356
- } catch (error) {
1357
- if (config.suppressErrorRendering) {
1358
- removeTempElements();
1359
- throw error;
1360
- }
1361
- diag = await Diagram.fromText("error");
1362
- parseEncounteredException = error;
1363
- }
1364
- const element = root.select(enclosingDivID_selector).node();
1365
- const diagramType = diag.type;
1366
- const svg = element.firstChild;
1367
- const firstChild = svg.firstChild;
1368
- const diagramClassDefs = diag.renderer.getClasses?.(text, diag);
1369
- const rules = createUserStyles(config, diagramType, diagramClassDefs, idSelector);
1370
- const style1 = document.createElement("style");
1371
- style1.innerHTML = rules;
1372
- svg.insertBefore(style1, firstChild);
1373
- try {
1374
- await diag.renderer.draw(text, id26, version, diag);
1375
- } catch (e) {
1376
- if (config.suppressErrorRendering) {
1377
- removeTempElements();
1378
- } else {
1379
- errorRenderer_default.draw(text, id26, version);
1380
- }
1381
- throw e;
1382
- }
1383
- const svgNode = root.select(`${enclosingDivID_selector} svg`);
1384
- const a11yTitle = diag.db.getAccTitle?.();
1385
- const a11yDescr = diag.db.getAccDescription?.();
1386
- addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr);
1387
- root.select(`[id="${id26}"]`).selectAll("foreignobject > *").attr("xmlns", XMLNS_XHTML_STD);
1388
- let svgCode = root.select(enclosingDivID_selector).node().innerHTML;
1389
- log.debug("config.arrowMarkerAbsolute", config.arrowMarkerAbsolute);
1390
- svgCode = cleanUpSvgCode(svgCode, isSandboxed, evaluate(config.arrowMarkerAbsolute));
1391
- if (isSandboxed) {
1392
- const svgEl = root.select(enclosingDivID_selector + " svg").node();
1393
- svgCode = putIntoIFrame(svgCode, svgEl);
1394
- } else if (!isLooseSecurityLevel) {
1395
- svgCode = purify.sanitize(svgCode, {
1396
- ADD_TAGS: DOMPURIFY_TAGS,
1397
- ADD_ATTR: DOMPURIFY_ATTR,
1398
- HTML_INTEGRATION_POINTS: { foreignobject: true }
1399
- });
1400
- }
1401
- attachFunctions();
1402
- if (parseEncounteredException) {
1403
- throw parseEncounteredException;
1404
- }
1405
- removeTempElements();
1406
- return {
1407
- diagramType,
1408
- svg: svgCode,
1409
- bindFunctions: diag.db.bindFunctions
1410
- };
1411
- }, "render");
1412
- function initialize(userOptions = {}) {
1413
- const options = assignWithDepth_default({}, userOptions);
1414
- if (options?.fontFamily && !options.themeVariables?.fontFamily) {
1415
- if (!options.themeVariables) {
1416
- options.themeVariables = {};
1417
- }
1418
- options.themeVariables.fontFamily = options.fontFamily;
1419
- }
1420
- saveConfigFromInitialize(options);
1421
- if (options?.theme && options.theme in themes_default) {
1422
- options.themeVariables = themes_default[options.theme].getThemeVariables(
1423
- options.themeVariables
1424
- );
1425
- } else if (options) {
1426
- options.themeVariables = themes_default.default.getThemeVariables(options.themeVariables);
1427
- }
1428
- const config = typeof options === "object" ? setSiteConfig(options) : getSiteConfig();
1429
- setLogLevel(config.logLevel);
1430
- addDiagrams();
1431
- }
1432
- __name(initialize, "initialize");
1433
- var getDiagramFromText = /* @__PURE__ */ __name((text, metadata = {}) => {
1434
- const { code } = preprocessDiagram(text);
1435
- return Diagram.fromText(code, metadata);
1436
- }, "getDiagramFromText");
1437
- function addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr) {
1438
- setA11yDiagramInfo(svgNode, diagramType);
1439
- addSVGa11yTitleDescription(svgNode, a11yTitle, a11yDescr, svgNode.attr("id"));
1440
- }
1441
- __name(addA11yInfo, "addA11yInfo");
1442
- var mermaidAPI = Object.freeze({
1443
- render,
1444
- parse: parse3,
1445
- getDiagramFromText,
1446
- initialize,
1447
- getConfig,
1448
- setConfig,
1449
- getSiteConfig,
1450
- updateSiteConfig,
1451
- reset: /* @__PURE__ */ __name(() => {
1452
- reset();
1453
- }, "reset"),
1454
- globalReset: /* @__PURE__ */ __name(() => {
1455
- reset(defaultConfig);
1456
- }, "globalReset"),
1457
- defaultConfig
1458
- });
1459
- setLogLevel(getConfig().logLevel);
1460
- reset(getConfig());
1461
- var handleError = /* @__PURE__ */ __name((error, errors, parseError) => {
1462
- log.warn(error);
1463
- if (isDetailedError(error)) {
1464
- if (parseError) {
1465
- parseError(error.str, error.hash);
1466
- }
1467
- errors.push({ ...error, message: error.str, error });
1468
- } else {
1469
- if (parseError) {
1470
- parseError(error);
1471
- }
1472
- if (error instanceof Error) {
1473
- errors.push({
1474
- str: error.message,
1475
- message: error.message,
1476
- hash: error.name,
1477
- error
1478
- });
1479
- }
1480
- }
1481
- }, "handleError");
1482
- var run = /* @__PURE__ */ __name(async function(options = {
1483
- querySelector: ".mermaid"
1484
- }) {
1485
- try {
1486
- await runThrowsErrors(options);
1487
- } catch (e) {
1488
- if (isDetailedError(e)) {
1489
- log.error(e.str);
1490
- }
1491
- if (mermaid.parseError) {
1492
- mermaid.parseError(e);
1493
- }
1494
- if (!options.suppressErrors) {
1495
- log.error("Use the suppressErrors option to suppress these errors");
1496
- throw e;
1497
- }
1498
- }
1499
- }, "run");
1500
- var runThrowsErrors = /* @__PURE__ */ __name(async function({ postRenderCallback, querySelector, nodes } = {
1501
- querySelector: ".mermaid"
1502
- }) {
1503
- const conf = mermaidAPI.getConfig();
1504
- log.debug(`${!postRenderCallback ? "No " : ""}Callback function found`);
1505
- let nodesToProcess;
1506
- if (nodes) {
1507
- nodesToProcess = nodes;
1508
- } else if (querySelector) {
1509
- nodesToProcess = document.querySelectorAll(querySelector);
1510
- } else {
1511
- throw new Error("Nodes and querySelector are both undefined");
1512
- }
1513
- log.debug(`Found ${nodesToProcess.length} diagrams`);
1514
- if (conf?.startOnLoad !== void 0) {
1515
- log.debug("Start On Load: " + conf?.startOnLoad);
1516
- mermaidAPI.updateSiteConfig({ startOnLoad: conf?.startOnLoad });
1517
- }
1518
- const idGenerator = new utils_default.InitIDGenerator(conf.deterministicIds, conf.deterministicIDSeed);
1519
- let txt;
1520
- const errors = [];
1521
- for (const element of Array.from(nodesToProcess)) {
1522
- log.info("Rendering diagram: " + element.id);
1523
- if (element.getAttribute("data-processed")) {
1524
- continue;
1525
- }
1526
- element.setAttribute("data-processed", "true");
1527
- const id26 = `mermaid-${idGenerator.next()}`;
1528
- txt = element.innerHTML;
1529
- txt = dedent(utils_default.entityDecode(txt)).trim().replace(/<br\s*\/?>/gi, "<br/>");
1530
- const init2 = utils_default.detectInit(txt);
1531
- if (init2) {
1532
- log.debug("Detected early reinit: ", init2);
1533
- }
1534
- try {
1535
- const { svg, bindFunctions } = await render2(id26, txt, element);
1536
- element.innerHTML = svg;
1537
- if (postRenderCallback) {
1538
- await postRenderCallback(id26);
1539
- }
1540
- if (bindFunctions) {
1541
- bindFunctions(element);
1542
- }
1543
- } catch (error) {
1544
- handleError(error, errors, mermaid.parseError);
1545
- }
1546
- }
1547
- if (errors.length > 0) {
1548
- throw errors[0];
1549
- }
1550
- }, "runThrowsErrors");
1551
- var initialize2 = /* @__PURE__ */ __name(function(config) {
1552
- mermaidAPI.initialize(config);
1553
- }, "initialize");
1554
- var init = /* @__PURE__ */ __name(async function(config, nodes, callback) {
1555
- log.warn("mermaid.init is deprecated. Please use run instead.");
1556
- if (config) {
1557
- initialize2(config);
1558
- }
1559
- const runOptions = { postRenderCallback: callback, querySelector: ".mermaid" };
1560
- if (typeof nodes === "string") {
1561
- runOptions.querySelector = nodes;
1562
- } else if (nodes) {
1563
- if (nodes instanceof HTMLElement) {
1564
- runOptions.nodes = [nodes];
1565
- } else {
1566
- runOptions.nodes = nodes;
1567
- }
1568
- }
1569
- await run(runOptions);
1570
- }, "init");
1571
- var registerExternalDiagrams = /* @__PURE__ */ __name(async (diagrams, {
1572
- lazyLoad = true
1573
- } = {}) => {
1574
- addDiagrams();
1575
- registerLazyLoadedDiagrams(...diagrams);
1576
- if (lazyLoad === false) {
1577
- await loadRegisteredDiagrams();
1578
- }
1579
- }, "registerExternalDiagrams");
1580
- var contentLoaded = /* @__PURE__ */ __name(function() {
1581
- if (mermaid.startOnLoad) {
1582
- const { startOnLoad } = mermaidAPI.getConfig();
1583
- if (startOnLoad) {
1584
- mermaid.run().catch((err) => log.error("Mermaid failed to initialize", err));
1585
- }
1586
- }
1587
- }, "contentLoaded");
1588
- if (typeof document !== "undefined") {
1589
- window.addEventListener("load", contentLoaded, false);
1590
- }
1591
- var setParseErrorHandler = /* @__PURE__ */ __name(function(parseErrorHandler) {
1592
- mermaid.parseError = parseErrorHandler;
1593
- }, "setParseErrorHandler");
1594
- var executionQueue = [];
1595
- var executionQueueRunning = false;
1596
- var executeQueue = /* @__PURE__ */ __name(async () => {
1597
- if (executionQueueRunning) {
1598
- return;
1599
- }
1600
- executionQueueRunning = true;
1601
- while (executionQueue.length > 0) {
1602
- const f = executionQueue.shift();
1603
- if (f) {
1604
- try {
1605
- await f();
1606
- } catch (e) {
1607
- log.error("Error executing queue", e);
1608
- }
1609
- }
1610
- }
1611
- executionQueueRunning = false;
1612
- }, "executeQueue");
1613
- var parse22 = /* @__PURE__ */ __name(async (text, parseOptions) => {
1614
- return new Promise((resolve, reject) => {
1615
- const performCall = /* @__PURE__ */ __name(() => new Promise((res, rej) => {
1616
- mermaidAPI.parse(text, parseOptions).then(
1617
- (r) => {
1618
- res(r);
1619
- resolve(r);
1620
- },
1621
- (e) => {
1622
- log.error("Error parsing", e);
1623
- mermaid.parseError?.(e);
1624
- rej(e);
1625
- reject(e);
1626
- }
1627
- );
1628
- }), "performCall");
1629
- executionQueue.push(performCall);
1630
- executeQueue().catch(reject);
1631
- });
1632
- }, "parse");
1633
- var render2 = /* @__PURE__ */ __name((id26, text, container) => {
1634
- return new Promise((resolve, reject) => {
1635
- const performCall = /* @__PURE__ */ __name(() => new Promise((res, rej) => {
1636
- mermaidAPI.render(id26, text, container).then(
1637
- (r) => {
1638
- res(r);
1639
- resolve(r);
1640
- },
1641
- (e) => {
1642
- log.error("Error parsing", e);
1643
- mermaid.parseError?.(e);
1644
- rej(e);
1645
- reject(e);
1646
- }
1647
- );
1648
- }), "performCall");
1649
- executionQueue.push(performCall);
1650
- executeQueue().catch(reject);
1651
- });
1652
- }, "render");
1653
- var mermaid = {
1654
- startOnLoad: true,
1655
- mermaidAPI,
1656
- parse: parse22,
1657
- render: render2,
1658
- init,
1659
- run,
1660
- registerExternalDiagrams,
1661
- registerLayoutLoaders,
1662
- initialize: initialize2,
1663
- parseError: void 0,
1664
- contentLoaded,
1665
- setParseErrorHandler,
1666
- detectType,
1667
- registerIconPacks
1668
- };
1669
- var mermaid_default = mermaid;
1670
-
1671
- // components/src/asciidoc/Mermaid.tsx
1672
- import { memo, useId, useState } from "react";
1673
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1674
- mermaid_default.initialize({
1675
- startOnLoad: false,
1676
- theme: "dark"
1677
- });
1678
- var Mermaid = memo(function Mermaid2({ content }) {
1679
- const [showSource, setShowSource] = useState(false);
1680
- const id26 = `mermaid-diagram-${useId().replace(/:/g, "_")}`;
1681
- const mermaidRef = async (node2) => {
1682
- if (node2) {
1683
- const { svg } = await mermaid_default.render(id26, content);
1684
- node2.innerHTML = svg;
1685
- }
1686
- };
1687
- return /* @__PURE__ */ jsxs2(Fragment, { children: [
1688
- /* @__PURE__ */ jsxs2(
1689
- "button",
1690
- {
1691
- className: "absolute right-2 top-2 text-mono-xs text-tertiary",
1692
- onClick: () => setShowSource(!showSource),
1693
- children: [
1694
- showSource ? "Hide" : "Show",
1695
- " Source ",
1696
- /* @__PURE__ */ jsx2("span", { className: "text-quinary", children: "|" }),
1697
- " ",
1698
- "Mermaid"
1699
- ]
1700
- }
1701
- ),
1702
- !showSource ? /* @__PURE__ */ jsx2("code", { ref: mermaidRef, className: "w-full" }) : /* @__PURE__ */ jsx2("code", { children: content })
1703
- ] });
1704
- });
1705
- var Mermaid_default = Mermaid;
1706
-
1707
113
  // icons/react/Link16Icon.tsx
1708
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1709
- var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs3(
114
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
115
+ var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs2(
1710
116
  "svg",
1711
117
  {
1712
118
  width: 16,
@@ -1717,10 +123,10 @@ var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs3(
1717
123
  "aria-labelledby": titleId,
1718
124
  ...props,
1719
125
  children: [
1720
- title ? /* @__PURE__ */ jsx3("title", { id: titleId, children: title }) : null,
1721
- /* @__PURE__ */ jsxs3("g", { fill: "currentColor", children: [
1722
- /* @__PURE__ */ jsx3("path", { d: "m6.586 12.243 1.59-1.591a.75.75 0 0 1 1.061 0l.354.353a.75.75 0 0 1 0 1.06L8 13.658A4 4 0 0 1 2.343 8l1.591-1.591a.75.75 0 0 1 1.06 0l.354.354a.75.75 0 0 1 0 1.06l-1.59 1.591a2 2 0 1 0 2.828 2.829ZM12.066 9.591a.75.75 0 0 1-1.06 0l-.354-.354a.75.75 0 0 1 0-1.06l1.59-1.591a2 2 0 1 0-2.828-2.829l-1.59 1.591a.75.75 0 0 1-1.061 0l-.354-.353a.75.75 0 0 1 0-1.06L8 2.342A4 4 0 0 1 13.657 8l-1.591 1.591Z" }),
1723
- /* @__PURE__ */ jsx3("path", { d: "M9.945 5.702a.75.75 0 0 0-1.061 0L5.702 8.884a.75.75 0 0 0 0 1.06l.353.354a.75.75 0 0 0 1.061 0l3.182-3.182a.75.75 0 0 0 0-1.06l-.353-.354Z" })
126
+ title ? /* @__PURE__ */ jsx2("title", { id: titleId, children: title }) : null,
127
+ /* @__PURE__ */ jsxs2("g", { fill: "currentColor", children: [
128
+ /* @__PURE__ */ jsx2("path", { d: "m6.586 12.243 1.59-1.591a.75.75 0 0 1 1.061 0l.354.353a.75.75 0 0 1 0 1.06L8 13.658A4 4 0 0 1 2.343 8l1.591-1.591a.75.75 0 0 1 1.06 0l.354.354a.75.75 0 0 1 0 1.06l-1.59 1.591a2 2 0 1 0 2.828 2.829ZM12.066 9.591a.75.75 0 0 1-1.06 0l-.354-.354a.75.75 0 0 1 0-1.06l1.59-1.591a2 2 0 1 0-2.828-2.829l-1.59 1.591a.75.75 0 0 1-1.061 0l-.354-.353a.75.75 0 0 1 0-1.06L8 2.342A4 4 0 0 1 13.657 8l-1.591 1.591Z" }),
129
+ /* @__PURE__ */ jsx2("path", { d: "M9.945 5.702a.75.75 0 0 0-1.061 0L5.702 8.884a.75.75 0 0 0 0 1.06l.353.354a.75.75 0 0 0 1.061 0l3.182-3.182a.75.75 0 0 0 0-1.06l-.353-.354Z" })
1724
130
  ] })
1725
131
  ]
1726
132
  }
@@ -1728,12 +134,12 @@ var Link16Icon = ({ title, titleId, ...props }) => /* @__PURE__ */ jsxs3(
1728
134
  var Link16Icon_default = Link16Icon;
1729
135
 
1730
136
  // icons/react/Checkmark12Icon.tsx
1731
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
137
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1732
138
  var Checkmark12Icon = ({
1733
139
  title,
1734
140
  titleId,
1735
141
  ...props
1736
- }) => /* @__PURE__ */ jsxs4(
142
+ }) => /* @__PURE__ */ jsxs3(
1737
143
  "svg",
1738
144
  {
1739
145
  width: 12,
@@ -1744,8 +150,8 @@ var Checkmark12Icon = ({
1744
150
  "aria-labelledby": titleId,
1745
151
  ...props,
1746
152
  children: [
1747
- title ? /* @__PURE__ */ jsx4("title", { id: titleId, children: title }) : null,
1748
- /* @__PURE__ */ jsx4(
153
+ title ? /* @__PURE__ */ jsx3("title", { id: titleId, children: title }) : null,
154
+ /* @__PURE__ */ jsx3(
1749
155
  "path",
1750
156
  {
1751
157
  fillRule: "evenodd",
@@ -1760,12 +166,12 @@ var Checkmark12Icon = ({
1760
166
  var Checkmark12Icon_default = Checkmark12Icon;
1761
167
 
1762
168
  // icons/react/DirectionRightIcon.tsx
1763
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
169
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1764
170
  var DirectionRightIcon = ({
1765
171
  title,
1766
172
  titleId,
1767
173
  ...props
1768
- }) => /* @__PURE__ */ jsxs5(
174
+ }) => /* @__PURE__ */ jsxs4(
1769
175
  "svg",
1770
176
  {
1771
177
  width: 12,
@@ -1776,8 +182,8 @@ var DirectionRightIcon = ({
1776
182
  "aria-labelledby": titleId,
1777
183
  ...props,
1778
184
  children: [
1779
- title ? /* @__PURE__ */ jsx5("title", { id: titleId, children: title }) : null,
1780
- /* @__PURE__ */ jsx5(
185
+ title ? /* @__PURE__ */ jsx4("title", { id: titleId, children: title }) : null,
186
+ /* @__PURE__ */ jsx4(
1781
187
  "path",
1782
188
  {
1783
189
  d: "M8.807 6.597a.667.667 0 0 0 0-1.194l-5.842-2.92A.667.667 0 0 0 2 3.079v5.842c0 .496.522.818.965.596l5.842-2.92Z",
@@ -1790,12 +196,12 @@ var DirectionRightIcon = ({
1790
196
  var DirectionRightIcon_default = DirectionRightIcon;
1791
197
 
1792
198
  // icons/react/SelectArrows6Icon.tsx
1793
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
199
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1794
200
  var SelectArrows6Icon = ({
1795
201
  title,
1796
202
  titleId,
1797
203
  ...props
1798
- }) => /* @__PURE__ */ jsxs6(
204
+ }) => /* @__PURE__ */ jsxs5(
1799
205
  "svg",
1800
206
  {
1801
207
  width: 6,
@@ -1806,8 +212,8 @@ var SelectArrows6Icon = ({
1806
212
  "aria-labelledby": titleId,
1807
213
  ...props,
1808
214
  children: [
1809
- title ? /* @__PURE__ */ jsx6("title", { id: titleId, children: title }) : null,
1810
- /* @__PURE__ */ jsx6(
215
+ title ? /* @__PURE__ */ jsx5("title", { id: titleId, children: title }) : null,
216
+ /* @__PURE__ */ jsx5(
1811
217
  "path",
1812
218
  {
1813
219
  fillRule: "evenodd",
@@ -1822,32 +228,32 @@ var SelectArrows6Icon = ({
1822
228
  var SelectArrows6Icon_default = SelectArrows6Icon;
1823
229
 
1824
230
  // components/src/asciidoc/Section.tsx
1825
- import { Content as Content2, parse as parse4 } from "@oxide/react-asciidoc";
231
+ import { Content as Content2, parse as parse2 } from "@oxide/react-asciidoc";
1826
232
  import cn2 from "classnames";
1827
233
  import { createElement as createElement2 } from "react";
1828
- import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
234
+ import { Fragment, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1829
235
  var stripAnchors = (str) => str.replace(/<a[^>]*>(.*?)<\/a>/gi, "$1");
1830
- var Section = ({ node: node2 }) => {
1831
- const level = node2.level;
236
+ var Section = ({ node }) => {
237
+ const level = node.level;
1832
238
  let title = "";
1833
- let sectNum = node2.num;
239
+ let sectNum = node.num;
1834
240
  sectNum = sectNum === "." ? "" : sectNum;
1835
- title = /* @__PURE__ */ jsxs7(Fragment2, { children: [
1836
- /* @__PURE__ */ jsx7("span", { className: "anchor", id: node2.id || "", "aria-hidden": "true" }),
1837
- /* @__PURE__ */ jsxs7("a", { className: "link group", href: `#${node2.id}`, children: [
1838
- parse4(stripAnchors(node2.title)),
1839
- /* @__PURE__ */ jsx7(Link16Icon_default, { className: "ml-2 hidden text-accent-secondary group-hover:inline-block" })
241
+ title = /* @__PURE__ */ jsxs6(Fragment, { children: [
242
+ /* @__PURE__ */ jsx6("span", { className: "anchor", id: node.id || "", "aria-hidden": "true" }),
243
+ /* @__PURE__ */ jsxs6("a", { className: "link group", href: `#${node.id}`, children: [
244
+ parse2(stripAnchors(node.title)),
245
+ /* @__PURE__ */ jsx6(Link16Icon_default, { className: "ml-2 hidden text-accent-secondary group-hover:inline-block" })
1840
246
  ] })
1841
247
  ] });
1842
248
  if (level === 0) {
1843
- return /* @__PURE__ */ jsxs7(Fragment2, { children: [
1844
- /* @__PURE__ */ jsx7("h1", { className: cn2("sect0", node2.role), "data-sectnum": sectNum, children: title }),
1845
- /* @__PURE__ */ jsx7(Content2, { blocks: node2.blocks })
249
+ return /* @__PURE__ */ jsxs6(Fragment, { children: [
250
+ /* @__PURE__ */ jsx6("h1", { className: cn2("sect0", node.role), "data-sectnum": sectNum, children: title }),
251
+ /* @__PURE__ */ jsx6(Content2, { blocks: node.blocks })
1846
252
  ] });
1847
253
  } else {
1848
- return /* @__PURE__ */ jsxs7("div", { className: cn2(`sect${level}`, node2.role), children: [
254
+ return /* @__PURE__ */ jsxs6("div", { className: cn2(`sect${level}`, node.role), children: [
1849
255
  createElement2(`h${level + 1}`, { "data-sectnum": sectNum }, title),
1850
- /* @__PURE__ */ jsx7("div", { className: "sectionbody", children: /* @__PURE__ */ jsx7(Content2, { blocks: node2.blocks }) })
256
+ /* @__PURE__ */ jsx6("div", { className: "sectionbody", children: /* @__PURE__ */ jsx6(Content2, { blocks: node.blocks }) })
1851
257
  ] });
1852
258
  }
1853
259
  };
@@ -1855,18 +261,18 @@ var Section_default = Section;
1855
261
 
1856
262
  // components/src/asciidoc/Table.tsx
1857
263
  import { Table as InnerTable } from "@oxide/react-asciidoc";
1858
- import { jsx as jsx8 } from "react/jsx-runtime";
1859
- var Table = ({ node: node2 }) => /* @__PURE__ */ jsx8("div", { className: "table-wrapper", children: /* @__PURE__ */ jsx8(InnerTable, { node: node2 }) });
264
+ import { jsx as jsx7 } from "react/jsx-runtime";
265
+ var Table = ({ node }) => /* @__PURE__ */ jsx7("div", { className: "table-wrapper", children: /* @__PURE__ */ jsx7(InnerTable, { node }) });
1860
266
  var Table_default = Table;
1861
267
 
1862
268
  // components/src/asciidoc/TableOfContents.tsx
1863
269
  import * as Accordion from "@radix-ui/react-accordion";
1864
270
  import { Link } from "@remix-run/react";
1865
271
  import cn3 from "classnames";
1866
- import { Fragment as Fragment3, useCallback, useEffect, useMemo, useRef, useState as useState2 } from "react";
1867
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
272
+ import { Fragment as Fragment2, useCallback, useEffect, useMemo, useRef, useState } from "react";
273
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1868
274
  function useIntersectionObserver(elements, callback, options) {
1869
- const [observer, setObserver] = useState2(null);
275
+ const [observer, setObserver] = useState(null);
1870
276
  useEffect(() => {
1871
277
  const observer2 = new IntersectionObserver(callback, options);
1872
278
  setObserver(observer2);
@@ -1898,9 +304,9 @@ function findParentSection(element) {
1898
304
  const sect2Wrapper = element.closest(".sect2");
1899
305
  return sect2Wrapper ? sect2Wrapper : element.closest(".sect1");
1900
306
  }
1901
- function newSection(node2, element, wrapper, parent) {
307
+ function newSection(node, element, wrapper, parent) {
1902
308
  return {
1903
- node: node2,
309
+ node,
1904
310
  element,
1905
311
  wrapper,
1906
312
  parent,
@@ -1940,7 +346,7 @@ function maxIndex(nums) {
1940
346
  }, void 0);
1941
347
  }
1942
348
  function useActiveSectionTracking(initialSections, onSectionChange, debug = false) {
1943
- const [sectionWrappers, setSectionWrappers] = useState2(
349
+ const [sectionWrappers, setSectionWrappers] = useState(
1944
350
  buildSectionTree(initialSections)
1945
351
  );
1946
352
  const sectionMeasurements = useRef([]);
@@ -1954,7 +360,7 @@ function useActiveSectionTracking(initialSections, onSectionChange, debug = fals
1954
360
  const wrapperActivator = useCallback(
1955
361
  (entries) => {
1956
362
  for (const entry of entries) {
1957
- const index = sectionWrappers.findIndex((node2) => node2.wrapper === entry.target);
363
+ const index = sectionWrappers.findIndex((node) => node.wrapper === entry.target);
1958
364
  const covered = entry.intersectionRect.height / (entry.rootBounds?.height || 1);
1959
365
  sectionMeasurements.current[index] = covered;
1960
366
  }
@@ -1993,7 +399,7 @@ function useActiveSectionTracking(initialSections, onSectionChange, debug = fals
1993
399
  return "0px";
1994
400
  }
1995
401
  });
1996
- debugNode = /* @__PURE__ */ jsx9(
402
+ debugNode = /* @__PURE__ */ jsx8(
1997
403
  "div",
1998
404
  {
1999
405
  style: {
@@ -2020,13 +426,13 @@ var DesktopOutline = ({
2020
426
  activeItem
2021
427
  }) => {
2022
428
  const renderToc = (sections) => {
2023
- return sections.map((item) => /* @__PURE__ */ jsxs8(Fragment3, { children: [
2024
- /* @__PURE__ */ jsx9(
429
+ return sections.map((item) => /* @__PURE__ */ jsxs7(Fragment2, { children: [
430
+ /* @__PURE__ */ jsx8(
2025
431
  "li",
2026
432
  {
2027
433
  "data-level": item.level,
2028
434
  className: cn3("mb-0 list-none text-sans-sm", item.level > 2 && "hidden"),
2029
- children: /* @__PURE__ */ jsx9(
435
+ children: /* @__PURE__ */ jsx8(
2030
436
  Link,
2031
437
  {
2032
438
  to: `#${item.id}`,
@@ -2037,7 +443,7 @@ var DesktopOutline = ({
2037
443
  style: {
2038
444
  paddingLeft: `${0.5 + item.level * 0.5}rem`
2039
445
  },
2040
- children: /* @__PURE__ */ jsx9("span", { dangerouslySetInnerHTML: { __html: item.title } })
446
+ children: /* @__PURE__ */ jsx8("span", { dangerouslySetInnerHTML: { __html: item.title } })
2041
447
  }
2042
448
  )
2043
449
  }
@@ -2046,7 +452,7 @@ var DesktopOutline = ({
2046
452
  ] }, item.id));
2047
453
  };
2048
454
  if (toc && toc.length > 0) {
2049
- return /* @__PURE__ */ jsx9("ul", { className: "toc", children: renderToc(toc) });
455
+ return /* @__PURE__ */ jsx8("ul", { className: "toc", children: renderToc(toc) });
2050
456
  }
2051
457
  return null;
2052
458
  };
@@ -2056,8 +462,8 @@ var SmallScreenOutline = ({
2056
462
  title
2057
463
  }) => {
2058
464
  const renderToc = (sections) => {
2059
- return sections.map((item) => /* @__PURE__ */ jsxs8(Fragment3, { children: [
2060
- /* @__PURE__ */ jsx9(
465
+ return sections.map((item) => /* @__PURE__ */ jsxs7(Fragment2, { children: [
466
+ /* @__PURE__ */ jsx8(
2061
467
  "li",
2062
468
  {
2063
469
  "data-level": item.level,
@@ -2065,7 +471,7 @@ var SmallScreenOutline = ({
2065
471
  "AccordionContent hydrated list-none text-sans-sm",
2066
472
  item.level > 2 && "hidden"
2067
473
  ),
2068
- children: /* @__PURE__ */ jsx9(
474
+ children: /* @__PURE__ */ jsx8(
2069
475
  Link,
2070
476
  {
2071
477
  to: `#${item.id}`,
@@ -2076,7 +482,7 @@ var SmallScreenOutline = ({
2076
482
  style: {
2077
483
  paddingLeft: `${0.5 + item.level * 0.5}rem`
2078
484
  },
2079
- children: /* @__PURE__ */ jsx9("span", { dangerouslySetInnerHTML: { __html: item.title } })
485
+ children: /* @__PURE__ */ jsx8("span", { dangerouslySetInnerHTML: { __html: item.title } })
2080
486
  }
2081
487
  )
2082
488
  }
@@ -2085,19 +491,19 @@ var SmallScreenOutline = ({
2085
491
  ] }, item.id));
2086
492
  };
2087
493
  if (toc && toc.length > 0) {
2088
- return /* @__PURE__ */ jsx9(
494
+ return /* @__PURE__ */ jsx8(
2089
495
  Accordion.Root,
2090
496
  {
2091
497
  type: "single",
2092
498
  className: "sticky top-[calc(var(--header-height)-1px)] z-10 -mt-px mb-10 block max-h-[calc(100vh-var(--header-height)+1px)] w-full overflow-y-scroll border-b border-t bg-default border-secondary 1200:hidden print:hidden",
2093
499
  collapsible: true,
2094
- children: /* @__PURE__ */ jsxs8(Accordion.Item, { value: `small-toc-${title}`, children: [
2095
- /* @__PURE__ */ jsx9(Accordion.Header, { children: /* @__PURE__ */ jsxs8(Accordion.Trigger, { className: "flex h-[--toc-header-height] w-full items-center justify-between px-4 text-sans-md text-default hover:bg-hover 400:px-6 600:px-8 [&>svg]:data-[state=open]:rotate-90", children: [
500
+ children: /* @__PURE__ */ jsxs7(Accordion.Item, { value: `small-toc-${title}`, children: [
501
+ /* @__PURE__ */ jsx8(Accordion.Header, { children: /* @__PURE__ */ jsxs7(Accordion.Trigger, { className: "flex h-[--toc-header-height] w-full items-center justify-between px-4 text-sans-md text-default hover:bg-hover 400:px-6 600:px-8 [&>svg]:data-[state=open]:rotate-90", children: [
2096
502
  "Table of Contents",
2097
503
  " ",
2098
- /* @__PURE__ */ jsx9(DirectionRightIcon_default, { className: "transition-all text-tertiary" })
504
+ /* @__PURE__ */ jsx8(DirectionRightIcon_default, { className: "transition-all text-tertiary" })
2099
505
  ] }) }),
2100
- /* @__PURE__ */ jsx9(Accordion.Content, { className: "AccordionContent hydrated w-full border-t px-4 border-secondary 400:px-6 600:px-8", children: /* @__PURE__ */ jsx9("div", { className: "py-4", children: renderToc(toc) }) })
506
+ /* @__PURE__ */ jsx8(Accordion.Content, { className: "AccordionContent hydrated w-full border-t px-4 border-secondary 400:px-6 600:px-8", children: /* @__PURE__ */ jsx8("div", { className: "py-4", children: renderToc(toc) }) })
2101
507
  ] })
2102
508
  }
2103
509
  );
@@ -3633,36 +2039,35 @@ var loadAsciidoctor = ({
3633
2039
  constructor() {
3634
2040
  this.baseConverter = new ad2.Html5Converter();
3635
2041
  }
3636
- convert(node2, transform) {
3637
- switch (node2.getNodeName()) {
2042
+ convert(node, transform) {
2043
+ switch (node.getNodeName()) {
3638
2044
  case "inline_callout":
3639
- return convertInlineCallout(node2);
2045
+ return convertInlineCallout(node);
3640
2046
  default:
3641
2047
  break;
3642
2048
  }
3643
- return this.baseConverter.convert(node2, transform);
2049
+ return this.baseConverter.convert(node, transform);
3644
2050
  }
3645
2051
  }
3646
2052
  extensions.forEach((extension) => ad2.Extensions.register(extension));
3647
2053
  ad2.ConverterFactory.register(new InlineConverter2(), ["html5"]);
3648
2054
  return ad2;
3649
2055
  };
3650
- function convertInlineCallout(node2) {
3651
- return `<i class="conum" data-value="${node2.getText()}"></i>`;
2056
+ function convertInlineCallout(node) {
2057
+ return `<i class="conum" data-value="${node.getText()}"></i>`;
3652
2058
  }
3653
- var handleDocument = async (document2) => {
3654
- const doc = prepareDocument(document2);
2059
+ var handleDocument = async (document) => {
2060
+ const doc = prepareDocument(document);
3655
2061
  return await processDocument(doc, highlight);
3656
2062
  };
3657
2063
 
3658
2064
  // components/src/asciidoc/index.tsx
3659
- import { jsx as jsx10 } from "react/jsx-runtime";
3660
- var MinimalDocument = ({ document: document2 }) => /* @__PURE__ */ jsx10("div", { id: "content", className: "asciidoc-body w-full", children: /* @__PURE__ */ jsx10(Content4, { blocks: document2.blocks }) });
2065
+ import { jsx as jsx9 } from "react/jsx-runtime";
2066
+ var MinimalDocument = ({ document }) => /* @__PURE__ */ jsx9("div", { id: "content", className: "asciidoc-body w-full", children: /* @__PURE__ */ jsx9(Content4, { blocks: document.blocks }) });
3661
2067
  var AsciiDocBlocks = {
3662
2068
  Admonition: Admonition_default,
3663
2069
  Table: Table_default,
3664
2070
  Section: Section_default,
3665
- Mermaid: Mermaid_default,
3666
2071
  MinimalDocument
3667
2072
  };
3668
2073
  var renderWithBreaks = (text) => {
@@ -3687,20 +2092,20 @@ var QUOTE_TAGS = {
3687
2092
  "latexmath": ["\\(", "\\)"]
3688
2093
  };
3689
2094
  var chop = (str) => str.substring(0, str.length - 1);
3690
- var convertInlineQuoted = (node2) => {
3691
- const type = node2.getType();
2095
+ var convertInlineQuoted = (node) => {
2096
+ const type = node.getType();
3692
2097
  const quoteTag = QUOTE_TAGS[type];
3693
2098
  const [open, close, tag] = quoteTag || ["", ""];
3694
- let text = node2.getText();
2099
+ let text = node.getText();
3695
2100
  if (type === "monospaced") {
3696
2101
  text = renderWithBreaks(text);
3697
2102
  }
3698
- const id26 = node2.getId();
3699
- const role = node2.getRole();
3700
- const idAttr = id26 ? `id="${id26}"` : "";
2103
+ const id = node.getId();
2104
+ const role = node.getRole();
2105
+ const idAttr = id ? `id="${id}"` : "";
3701
2106
  const classAttr = role ? `class="${role}"` : "";
3702
2107
  const attrs2 = `${idAttr} ${classAttr}`;
3703
- if (id26 || role) {
2108
+ if (id || role) {
3704
2109
  if (tag) {
3705
2110
  return `${chop(open)} ${attrs2}>${text}${close}`;
3706
2111
  } else {
@@ -3710,8 +2115,8 @@ var convertInlineQuoted = (node2) => {
3710
2115
  return `${open}${text}${close}`;
3711
2116
  }
3712
2117
  };
3713
- function convertInlineCallout2(node2) {
3714
- return `<i class="conum" data-value="${node2.getText()}"></i>`;
2118
+ function convertInlineCallout2(node) {
2119
+ return `<i class="conum" data-value="${node.getText()}"></i>`;
3715
2120
  }
3716
2121
  var ad = asciidoctor2();
3717
2122
  var InlineConverter = class {
@@ -3719,22 +2124,22 @@ var InlineConverter = class {
3719
2124
  constructor() {
3720
2125
  this.baseConverter = new ad.Html5Converter();
3721
2126
  }
3722
- convert(node2, transform) {
3723
- switch (node2.getNodeName()) {
2127
+ convert(node, transform) {
2128
+ switch (node.getNodeName()) {
3724
2129
  case "inline_quoted":
3725
- return convertInlineQuoted(node2);
2130
+ return convertInlineQuoted(node);
3726
2131
  case "inline_callout":
3727
- return convertInlineCallout2(node2);
2132
+ return convertInlineCallout2(node);
3728
2133
  default:
3729
2134
  break;
3730
2135
  }
3731
- return this.baseConverter.convert(node2, transform);
2136
+ return this.baseConverter.convert(node, transform);
3732
2137
  }
3733
2138
  };
3734
2139
 
3735
2140
  // components/src/ui/badge/Badge.tsx
3736
2141
  import cn4 from "classnames";
3737
- import { jsx as jsx11 } from "react/jsx-runtime";
2142
+ import { jsx as jsx10 } from "react/jsx-runtime";
3738
2143
  var badgeColors = {
3739
2144
  default: {
3740
2145
  default: `ring-1 ring-inset bg-accent-secondary text-accent ring-[rgba(var(--base-green-800-rgb),0.15)]`,
@@ -3759,7 +2164,7 @@ var Badge = ({
3759
2164
  color = "default",
3760
2165
  variant = "default"
3761
2166
  }) => {
3762
- return /* @__PURE__ */ jsx11(
2167
+ return /* @__PURE__ */ jsx10(
3763
2168
  "span",
3764
2169
  {
3765
2170
  className: cn4(
@@ -3769,7 +2174,7 @@ var Badge = ({
3769
2174
  badgeColors[variant][color],
3770
2175
  className
3771
2176
  ),
3772
- children: /* @__PURE__ */ jsx11("span", { children })
2177
+ children: /* @__PURE__ */ jsx10("span", { children })
3773
2178
  }
3774
2179
  );
3775
2180
  };
@@ -3777,7 +2182,7 @@ var Badge = ({
3777
2182
  // components/src/ui/button/Button.tsx
3778
2183
  import cn5 from "classnames";
3779
2184
  import { forwardRef } from "react";
3780
- import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
2185
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
3781
2186
  var buttonSizes = ["sm", "icon", "base"];
3782
2187
  var variants = ["primary", "secondary", "ghost", "danger"];
3783
2188
  var sizeStyle = {
@@ -3817,7 +2222,7 @@ var Button = forwardRef(
3817
2222
  ...rest
3818
2223
  }, ref) => {
3819
2224
  const isDisabled = disabled || loading;
3820
- return /* @__PURE__ */ jsxs9(
2225
+ return /* @__PURE__ */ jsxs8(
3821
2226
  "button",
3822
2227
  {
3823
2228
  className: cn5(buttonStyle({ size: size2, variant }), className, {
@@ -3830,8 +2235,8 @@ var Button = forwardRef(
3830
2235
  "aria-disabled": isDisabled,
3831
2236
  ...rest,
3832
2237
  children: [
3833
- loading && /* @__PURE__ */ jsx12(Spinner, { className: "absolute", variant }),
3834
- /* @__PURE__ */ jsx12("span", { className: cn5("flex items-center", innerClassName, { invisible: loading }), children })
2238
+ loading && /* @__PURE__ */ jsx11(Spinner, { className: "absolute", variant }),
2239
+ /* @__PURE__ */ jsx11("span", { className: cn5("flex items-center", innerClassName, { invisible: loading }), children })
3835
2240
  ]
3836
2241
  }
3837
2242
  );
@@ -3840,8 +2245,8 @@ var Button = forwardRef(
3840
2245
 
3841
2246
  // components/src/ui/spinner/Spinner.tsx
3842
2247
  import cn6 from "classnames";
3843
- import { useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
3844
- import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
2248
+ import { useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "react";
2249
+ import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
3845
2250
  var spinnerSizes = ["base", "lg"];
3846
2251
  var spinnerVariants = ["primary", "secondary", "ghost", "danger"];
3847
2252
  var Spinner = ({
@@ -3853,7 +2258,7 @@ var Spinner = ({
3853
2258
  const center = size2 === "lg" ? 18 : 6;
3854
2259
  const radius = size2 === "lg" ? 16 : 5;
3855
2260
  const strokeWidth = size2 === "lg" ? 3 : 2;
3856
- return /* @__PURE__ */ jsxs10(
2261
+ return /* @__PURE__ */ jsxs9(
3857
2262
  "svg",
3858
2263
  {
3859
2264
  width: frameSize,
@@ -3864,7 +2269,7 @@ var Spinner = ({
3864
2269
  "aria-labelledby": "Spinner",
3865
2270
  className: cn6("spinner", `spinner-${variant}`, `spinner-${size2}`, className),
3866
2271
  children: [
3867
- /* @__PURE__ */ jsx13(
2272
+ /* @__PURE__ */ jsx12(
3868
2273
  "circle",
3869
2274
  {
3870
2275
  fill: "none",
@@ -3877,7 +2282,7 @@ var Spinner = ({
3877
2282
  strokeOpacity: 0.2
3878
2283
  }
3879
2284
  ),
3880
- /* @__PURE__ */ jsx13(
2285
+ /* @__PURE__ */ jsx12(
3881
2286
  "circle",
3882
2287
  {
3883
2288
  className: "path",
@@ -3895,7 +2300,7 @@ var Spinner = ({
3895
2300
  );
3896
2301
  };
3897
2302
  var SpinnerLoader = ({ isLoading, children = null, minTime = 500 }) => {
3898
- const [isVisible, setIsVisible] = useState3(isLoading);
2303
+ const [isVisible, setIsVisible] = useState2(isLoading);
3899
2304
  const hideTimeout = useRef2(null);
3900
2305
  const loadingStartTime = useRef2(0);
3901
2306
  useEffect2(() => {
@@ -3918,24 +2323,24 @@ var SpinnerLoader = ({ isLoading, children = null, minTime = 500 }) => {
3918
2323
  clearTimeout(hideTimeout.current);
3919
2324
  };
3920
2325
  }, [isLoading, minTime]);
3921
- return isVisible ? /* @__PURE__ */ jsx13(Spinner, {}) : /* @__PURE__ */ jsx13(Fragment4, { children });
2326
+ return isVisible ? /* @__PURE__ */ jsx12(Spinner, {}) : /* @__PURE__ */ jsx12(Fragment3, { children });
3922
2327
  };
3923
2328
 
3924
2329
  // components/src/ui/tabs/Tabs.tsx
3925
2330
  import { Content as Content5, List, Root as Root2, Trigger as Trigger2 } from "@radix-ui/react-tabs";
3926
2331
  import cn7 from "classnames";
3927
- import { jsx as jsx14 } from "react/jsx-runtime";
2332
+ import { jsx as jsx13 } from "react/jsx-runtime";
3928
2333
  var Tabs = {
3929
- Root: ({ className, ...props }) => /* @__PURE__ */ jsx14(Root2, { ...props, className: cn7("ox-tabs", className) }),
3930
- Trigger: ({ children, className, ...props }) => /* @__PURE__ */ jsx14(Trigger2, { ...props, className: cn7("ox-tab", className), children: /* @__PURE__ */ jsx14("div", { children }) }),
3931
- List: ({ className, ...props }) => /* @__PURE__ */ jsx14(List, { ...props, className: cn7("ox-tabs-list", className) }),
3932
- Content: ({ className, ...props }) => /* @__PURE__ */ jsx14(Content5, { ...props, className: cn7("ox-tabs-panel", className) })
2334
+ Root: ({ className, ...props }) => /* @__PURE__ */ jsx13(Root2, { ...props, className: cn7("ox-tabs", className) }),
2335
+ Trigger: ({ children, className, ...props }) => /* @__PURE__ */ jsx13(Trigger2, { ...props, className: cn7("ox-tab", className), children: /* @__PURE__ */ jsx13("div", { children }) }),
2336
+ List: ({ className, ...props }) => /* @__PURE__ */ jsx13(List, { ...props, className: cn7("ox-tabs-list", className) }),
2337
+ Content: ({ className, ...props }) => /* @__PURE__ */ jsx13(Content5, { ...props, className: cn7("ox-tabs-panel", className) })
3933
2338
  };
3934
2339
 
3935
2340
  // components/src/ui/checkbox/Checkbox.tsx
3936
2341
  import cn8 from "classnames";
3937
- import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
3938
- var Check = () => /* @__PURE__ */ jsx15(Checkmark12Icon_default, { className: "pointer-events-none absolute left-0.5 top-0.5 h-3 w-3 fill-current text-accent" });
2342
+ import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
2343
+ var Check = () => /* @__PURE__ */ jsx14(Checkmark12Icon_default, { className: "pointer-events-none absolute left-0.5 top-0.5 h-3 w-3 fill-current text-accent" });
3939
2344
  var Indeterminate = classed.div`absolute w-2 h-0.5 left-1 top-[7px] bg-accent pointer-events-none`;
3940
2345
  var inputStyle = `
3941
2346
  appearance-none border border-default bg-default h-4 w-4 rounded-sm absolute left-0 outline-none
@@ -3949,9 +2354,9 @@ var Checkbox = ({
3949
2354
  children,
3950
2355
  className,
3951
2356
  ...inputProps
3952
- }) => /* @__PURE__ */ jsxs11("label", { className: "inline-flex items-center", children: [
3953
- /* @__PURE__ */ jsxs11("span", { className: "relative h-4 w-4", children: [
3954
- /* @__PURE__ */ jsx15(
2357
+ }) => /* @__PURE__ */ jsxs10("label", { className: "inline-flex items-center", children: [
2358
+ /* @__PURE__ */ jsxs10("span", { className: "relative h-4 w-4", children: [
2359
+ /* @__PURE__ */ jsx14(
3955
2360
  "input",
3956
2361
  {
3957
2362
  className: cn8(inputStyle, className),
@@ -3960,17 +2365,17 @@ var Checkbox = ({
3960
2365
  ...inputProps
3961
2366
  }
3962
2367
  ),
3963
- inputProps.checked && !indeterminate && /* @__PURE__ */ jsx15(Check, {}),
3964
- indeterminate && /* @__PURE__ */ jsx15(Indeterminate, {})
2368
+ inputProps.checked && !indeterminate && /* @__PURE__ */ jsx14(Check, {}),
2369
+ indeterminate && /* @__PURE__ */ jsx14(Indeterminate, {})
3965
2370
  ] }),
3966
- children && /* @__PURE__ */ jsx15("span", { className: "ml-2.5 text-sans-md text-secondary", children })
2371
+ children && /* @__PURE__ */ jsx14("span", { className: "ml-2.5 text-sans-md text-secondary", children })
3967
2372
  ] });
3968
2373
 
3969
2374
  // components/src/ui/listbox/Listbox.tsx
3970
2375
  import { FloatingPortal, flip, offset, size, useFloating } from "@floating-ui/react";
3971
2376
  import { Listbox as Select } from "@headlessui/react";
3972
2377
  import cn9 from "classnames";
3973
- import { Fragment as Fragment5, jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
2378
+ import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
3974
2379
  var Listbox = ({
3975
2380
  name,
3976
2381
  selected,
@@ -3999,14 +2404,14 @@ var Listbox = ({
3999
2404
  const selectedItem = selected && items.find((i) => i.value === selected);
4000
2405
  const noItems = !isLoading && items.length === 0;
4001
2406
  const isDisabled = disabled || noItems;
4002
- return /* @__PURE__ */ jsx16("div", { className: cn9("relative", className), children: /* @__PURE__ */ jsx16(
2407
+ return /* @__PURE__ */ jsx15("div", { className: cn9("relative", className), children: /* @__PURE__ */ jsx15(
4003
2408
  Select,
4004
2409
  {
4005
2410
  value: selected,
4006
2411
  onChange: (val) => val !== null && onChange(val),
4007
2412
  disabled: isDisabled || isLoading,
4008
- children: ({ open }) => /* @__PURE__ */ jsxs12(Fragment5, { children: [
4009
- /* @__PURE__ */ jsxs12(
2413
+ children: ({ open }) => /* @__PURE__ */ jsxs11(Fragment4, { children: [
2414
+ /* @__PURE__ */ jsxs11(
4010
2415
  Select.Button,
4011
2416
  {
4012
2417
  name,
@@ -4022,34 +2427,34 @@ var Listbox = ({
4022
2427
  ),
4023
2428
  ...props,
4024
2429
  children: [
4025
- /* @__PURE__ */ jsx16("div", { className: "w-full px-3 text-left", children: selectedItem ? (
2430
+ /* @__PURE__ */ jsx15("div", { className: "w-full px-3 text-left", children: selectedItem ? (
4026
2431
  // labelString is one line, which is what we need when label is a ReactNode
4027
2432
  selectedItem.labelString || selectedItem.label
4028
- ) : /* @__PURE__ */ jsx16("span", { className: "text-quaternary", children: noItems ? "No items" : placeholder }) }),
4029
- !isDisabled && /* @__PURE__ */ jsx16(SpinnerLoader, { isLoading }),
4030
- /* @__PURE__ */ jsx16(
2433
+ ) : /* @__PURE__ */ jsx15("span", { className: "text-quaternary", children: noItems ? "No items" : placeholder }) }),
2434
+ !isDisabled && /* @__PURE__ */ jsx15(SpinnerLoader, { isLoading }),
2435
+ /* @__PURE__ */ jsx15(
4031
2436
  "div",
4032
2437
  {
4033
2438
  className: "ml-3 flex h-[calc(100%-12px)] items-center border-l px-3 border-secondary",
4034
2439
  "aria-hidden": true,
4035
- children: /* @__PURE__ */ jsx16(SelectArrows6Icon_default, { className: "h-[14px] w-2 text-tertiary" })
2440
+ children: /* @__PURE__ */ jsx15(SelectArrows6Icon_default, { className: "h-[14px] w-2 text-tertiary" })
4036
2441
  }
4037
2442
  )
4038
2443
  ]
4039
2444
  }
4040
2445
  ),
4041
- /* @__PURE__ */ jsx16(FloatingPortal, { children: /* @__PURE__ */ jsx16(
2446
+ /* @__PURE__ */ jsx15(FloatingPortal, { children: /* @__PURE__ */ jsx15(
4042
2447
  Select.Options,
4043
2448
  {
4044
2449
  ref: refs.setFloating,
4045
2450
  style: floatingStyles,
4046
2451
  className: "ox-menu pointer-events-auto z-50 overflow-y-auto !outline-none",
4047
- children: items.map((item) => /* @__PURE__ */ jsx16(
2452
+ children: items.map((item) => /* @__PURE__ */ jsx15(
4048
2453
  Select.Option,
4049
2454
  {
4050
2455
  value: item.value,
4051
2456
  className: "relative border-b border-secondary last:border-0",
4052
- children: ({ active, selected: selected2 }) => /* @__PURE__ */ jsx16(
2457
+ children: ({ active, selected: selected2 }) => /* @__PURE__ */ jsx15(
4053
2458
  "div",
4054
2459
  {
4055
2460
  className: cn9(
@@ -4095,12 +2500,4 @@ export {
4095
2500
  useIntersectionObserver,
4096
2501
  variants
4097
2502
  };
4098
- /*! Bundled license information:
4099
-
4100
- mermaid/dist/mermaid.core.mjs:
4101
- (*! Check if previously processed *)
4102
- (*!
4103
- * Wait for document loaded before starting the execution
4104
- *)
4105
- */
4106
2503
  //# sourceMappingURL=index.js.map