@meltemi/diagrams-layout 0.0.0-stage → 1.9.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 (99) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -2
  3. package/dist/audit.d.ts +58 -0
  4. package/dist/audit.d.ts.map +1 -0
  5. package/dist/audit.js +239 -0
  6. package/dist/audit.js.map +1 -0
  7. package/dist/checks.d.ts +38 -0
  8. package/dist/checks.d.ts.map +1 -0
  9. package/dist/checks.js +331 -0
  10. package/dist/checks.js.map +1 -0
  11. package/dist/constraints.d.ts +20 -0
  12. package/dist/constraints.d.ts.map +1 -0
  13. package/dist/constraints.js +149 -0
  14. package/dist/constraints.js.map +1 -0
  15. package/dist/engine.d.ts +96 -0
  16. package/dist/engine.d.ts.map +1 -0
  17. package/dist/engine.js +3 -0
  18. package/dist/engine.js.map +1 -0
  19. package/dist/frame.d.ts +17 -0
  20. package/dist/frame.d.ts.map +1 -0
  21. package/dist/frame.js +51 -0
  22. package/dist/frame.js.map +1 -0
  23. package/dist/free.d.ts +75 -0
  24. package/dist/free.d.ts.map +1 -0
  25. package/dist/free.js +122 -0
  26. package/dist/free.js.map +1 -0
  27. package/dist/geometry.d.ts +58 -0
  28. package/dist/geometry.d.ts.map +1 -0
  29. package/dist/geometry.js +223 -0
  30. package/dist/geometry.js.map +1 -0
  31. package/dist/icons.d.ts +16 -0
  32. package/dist/icons.d.ts.map +1 -0
  33. package/dist/icons.js +94 -0
  34. package/dist/icons.js.map +1 -0
  35. package/dist/index.d.ts +20 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +19 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/layout.d.ts +206 -0
  40. package/dist/layout.d.ts.map +1 -0
  41. package/dist/layout.js +3527 -0
  42. package/dist/layout.js.map +1 -0
  43. package/dist/mark.d.ts +24 -0
  44. package/dist/mark.d.ts.map +1 -0
  45. package/dist/mark.js +60 -0
  46. package/dist/mark.js.map +1 -0
  47. package/dist/markers.d.ts +62 -0
  48. package/dist/markers.d.ts.map +1 -0
  49. package/dist/markers.js +255 -0
  50. package/dist/markers.js.map +1 -0
  51. package/dist/measure.d.ts +38 -0
  52. package/dist/measure.d.ts.map +1 -0
  53. package/dist/measure.js +44 -0
  54. package/dist/measure.js.map +1 -0
  55. package/dist/messages/en.d.ts +160 -0
  56. package/dist/messages/en.d.ts.map +1 -0
  57. package/dist/messages/en.js +163 -0
  58. package/dist/messages/en.js.map +1 -0
  59. package/dist/messages/es.d.ts +4 -0
  60. package/dist/messages/es.d.ts.map +1 -0
  61. package/dist/messages/es.js +104 -0
  62. package/dist/messages/es.js.map +1 -0
  63. package/dist/messages/index.d.ts +86 -0
  64. package/dist/messages/index.d.ts.map +1 -0
  65. package/dist/messages/index.js +17 -0
  66. package/dist/messages/index.js.map +1 -0
  67. package/dist/routing.d.ts +94 -0
  68. package/dist/routing.d.ts.map +1 -0
  69. package/dist/routing.js +549 -0
  70. package/dist/routing.js.map +1 -0
  71. package/dist/scene.d.ts +220 -0
  72. package/dist/scene.d.ts.map +1 -0
  73. package/dist/scene.js +5 -0
  74. package/dist/scene.js.map +1 -0
  75. package/dist/sequence.d.ts +17 -0
  76. package/dist/sequence.d.ts.map +1 -0
  77. package/dist/sequence.js +875 -0
  78. package/dist/sequence.js.map +1 -0
  79. package/dist/shapes.d.ts +140 -0
  80. package/dist/shapes.d.ts.map +1 -0
  81. package/dist/shapes.js +1030 -0
  82. package/dist/shapes.js.map +1 -0
  83. package/dist/styles.d.ts +58 -0
  84. package/dist/styles.d.ts.map +1 -0
  85. package/dist/styles.js +106 -0
  86. package/dist/styles.js.map +1 -0
  87. package/dist/text.d.ts +8 -0
  88. package/dist/text.d.ts.map +1 -0
  89. package/dist/text.js +28 -0
  90. package/dist/text.js.map +1 -0
  91. package/dist/theme.d.ts +100 -0
  92. package/dist/theme.d.ts.map +1 -0
  93. package/dist/theme.js +246 -0
  94. package/dist/theme.js.map +1 -0
  95. package/dist/viewport.d.ts +98 -0
  96. package/dist/viewport.d.ts.map +1 -0
  97. package/dist/viewport.js +177 -0
  98. package/dist/viewport.js.map +1 -0
  99. package/package.json +49 -3
@@ -0,0 +1,163 @@
1
+ const ids = (values) => values.map((id) => `\`${id}\``).join(", ");
2
+ const subject = (owner) => (owner === null ? "the frame" : `\`${owner}\``);
3
+ /**
4
+ * The layout's words in English. `drawing` holds the words the layout adds to drawings, which are
5
+ * content: they are read only in the content language a caller passes (`drawingWords`). The other
6
+ * groups are what the layout says about the person's text, written in the interface language when
7
+ * a diagnostic is made. Sentences with values are functions, so each language builds its own
8
+ * grammar; code in them (keywords, ids, samples) stays as written.
9
+ */
10
+ export const en = {
11
+ /** The type lines of C4 entities, drawn under their names, and the titles of boundaries. */
12
+ drawing: {
13
+ c4: {
14
+ person: "Person",
15
+ system: "Software System",
16
+ container: "Container",
17
+ component: "Component",
18
+ externalPerson: "External Person",
19
+ externalSystem: "External Software System",
20
+ externalContainer: "External Container",
21
+ externalComponent: "External Component",
22
+ },
23
+ },
24
+ /** The messages of the layout's diagnostics; the code of each is in its comment. */
25
+ diagnostics: {
26
+ /** `layout.overlap`: two boxes of the same layer. */
27
+ overlap: (a, b) => `\`${a}\` and \`${b}\` overlap.`,
28
+ /** `layout.overlap`: a box out of the group that declares it. */
29
+ crossesGroup: (shape, group) => `\`${shape}\` crosses the edge of its group \`${group}\`.`,
30
+ /** `layout.overlap`: a box on a group that does not declare it. */
31
+ overlapsGroup: (shape, group) => `\`${shape}\` overlaps the group \`${group}\`, which does not declare it.`,
32
+ /** `layout.container-margin`. */
33
+ containerMargin: (shape, group) => `\`${shape}\` is too close to the edge or title band of its group \`${group}\`.`,
34
+ /** `layout.label-under-connector`: the relation whose label it is, the connector it lies on. */
35
+ labelUnderConnector: (label, connector) => `The label of \`${label}\` lies on the connector of \`${connector}\`.`,
36
+ /** `layout.connector-overlap`: two relations and the length they share, in pixels. */
37
+ connectorOverlap: (a, b, length) => `The connectors of \`${a}\` and \`${b}\` run along each other for ${length} px.`,
38
+ /** `layout.connector-crossing`: a relation and the box it runs through. */
39
+ connectorCrossing: (relation, box) => `The connector of \`${relation}\` runs through \`${box}\`.`,
40
+ /** `layout.label-cut`: a text (shortened), its owner, how far it goes beyond, and what. */
41
+ labelCut: (text, owner, overflow, by) => `The text "${text}" of ${subject(owner)} goes ${overflow} px beyond ${by === "picture" ? "the picture" : by === "background" ? "its label" : "its shape"}.`,
42
+ /** `layout.label-overlap`: a text (shortened), its owner, and what it lies on. */
43
+ labelOverlap: (text, owner, other) => `The text "${text}" of ${subject(owner)} overlaps ${other.kind === "text"
44
+ ? `the text "${other.text}" of ${subject(other.owner)}`
45
+ : other.kind === "box"
46
+ ? `the box of \`${other.owner}\``
47
+ : `the connector of \`${other.owner}\``}.`,
48
+ /** `layout.unknown-theme`: the name written and the theme drawn instead. */
49
+ unknownTheme: (written, fallback) => `Unknown theme "${written}"; rendering with ${fallback}.`,
50
+ /** `layout.missing-placement`: a group of a free diagram without `place`. */
51
+ groupWithoutPlace: (group) => `Group \`${group}\` has no \`place\` statement; in free diagrams the places of its children are relative to its interior.`,
52
+ /** `layout.missing-placement`: an element of a `layout manual` diagram without `place`. */
53
+ elementWithoutPlace: (element) => `\`${element}\` has no \`place\` statement; \`layout manual\` needs a position for every element.`,
54
+ /** `layout.missing-placement`: a group with only one of `place` and `size`. */
55
+ groupHalfPlaced: (group, written) => `Group \`${group}\` has ${written === "place" ? "a `place` but no `size`" : "a `size` but no `place`"}; give both, or neither to fit its children.`,
56
+ /** `layout.missing-placement`: a group with nothing to fit and no place or size. */
57
+ groupUnplaced: (group) => `Group \`${group}\` has no placed children and no \`place\`/\`size\` of its own.`,
58
+ /** `layout.mode-unsupported`: the mode and the elements that are not placed. */
59
+ modeUnsupported: (mode, elements) => `\`layout ${mode}\` needs a layout engine to position ${ids(elements)}.`,
60
+ /** `layout.placement-ignored`. */
61
+ placementIgnored: "`layout auto` arranges every element, so `place` statements and route waypoints are ignored.",
62
+ /** `layout.image-unavailable`: the path written and the image object. */
63
+ imageUnavailable: (source, element) => `The image "${source}" of \`${element}\` cannot be drawn; a placeholder is drawn instead.`,
64
+ /** `layout.icon-missing`: an element drawn as its icon (`shape icon`) without one. */
65
+ iconMissing: (element) => `\`${element}\` is drawn as its icon, but it has no \`icon\`; a placeholder is drawn instead.`,
66
+ /** `layout.label-position-ignored`: an element whose icon is not the centre piece. */
67
+ labelPositionIgnored: (element) => `The \`labelPosition\` of \`${element}\` has no effect: its icon is not the centre piece.`,
68
+ /**
69
+ * `layout.label-position-ignored` of a `labelPosition` the theme gives: the first element it
70
+ * styles. Reported once, when no element it styles has its icon as the centre piece.
71
+ */
72
+ labelPositionIgnoredByTheme: (element) => `The \`labelPosition\` the theme gives \`${element}\` and the elements styled like it has no effect: none has its icon as the centre piece.`,
73
+ /**
74
+ * `layout.text-overflow` of an icon shape whose written size leaves its icon under its least
75
+ * size: the element, its size and the size that holds the icon.
76
+ */
77
+ iconTooSmall: (element, width, height, needsWidth, needsHeight) => `\`${element}\` is ${width} × ${height} px, too small to draw its icon: it needs ${needsWidth} × ${needsHeight} px.`,
78
+ /** `layout.engine-failed`: the engine's name and its own words, which end the sentence. */
79
+ engineFailed: (engine, reason) => `The ${engine} layout engine failed: ${reason}`,
80
+ /**
81
+ * `layout.constraint-conflict` of `align`, `row` and `column`: the constraint, its elements,
82
+ * the edge, the element furthest off, by how many pixels, and the first element.
83
+ */
84
+ alignConflict: (kind, elements, edge, worst, off, first) => `\`${kind}\` cannot hold for ${ids(elements)}: the ${edge} of \`${worst}\` is ${off} px off \`${first}\`.`,
85
+ /** `layout.constraint-conflict` of `order`: the element out of order and the one before it. */
86
+ orderConflict: (elements, current, axis, previous) => `\`order\` cannot hold for ${ids(elements)}: \`${current}\` is not ${axis === "x" ? "right of" : "below"} \`${previous}\`.`,
87
+ /** `layout.constraint-conflict` of `distance`: the gap there is and the one asked for. */
88
+ distanceConflict: (a, b, gap, distance) => `\`distance\` cannot hold: \`${a}\` and \`${b}\` are ${gap} px apart, less than ${distance} px.`,
89
+ /** `layout.unmeasured-font`: fonts that are not bundled and characters no font covers. */
90
+ unmeasuredFont: (fonts, characters) => {
91
+ const parts = [];
92
+ if (fonts.length > 0)
93
+ parts.push(`font ${ids(fonts)} is not bundled`);
94
+ if (characters.length > 0) {
95
+ const verb = characters.length === 1 ? "is" : "are";
96
+ parts.push(`${characters.join(" ")} ${verb} not covered by the bundled fonts`);
97
+ }
98
+ return `Some text is measured with estimates: ${parts.join("; ")}.`;
99
+ },
100
+ /** `layout.too-large` of `preset document`. */
101
+ tooWideForDocument: (width, max) => `The content is ${width} px wide; \`preset document\` reads best up to ${max} px.`,
102
+ /** `layout.too-large` of `preset slide`. */
103
+ tooLargeForSlide: (width, height, slideWidth, slideHeight) => `The content is ${width} × ${height} px; a slide is ${slideWidth} × ${slideHeight} px.`,
104
+ /** `layout.too-large` of `canvas`. */
105
+ tooLargeForCanvas: (width, height, canvasWidth, canvasHeight) => `The content is ${width} × ${height} px; the canvas is ${canvasWidth} × ${canvasHeight} px.`,
106
+ /** `layout.text-overflow`: the element, its width, the widest text and the width it needs. */
107
+ textOverflow: (element, width, withIcon, text, needs) => `\`${element}\` is ${width} px wide but ${withIcon ? "its icon and text" : "its text"} "${text}" needs ${needs} px.`,
108
+ /**
109
+ * `layout.text-overflow` of a shape whose text needs a taller box: the element, its size, the
110
+ * widest text and the size it needs; only the heights when the width is enough.
111
+ */
112
+ textOverflowTall: (element, width, height, withIcon, text, needsWidth, needsHeight) => `\`${element}\` is ${needsWidth === width ? `${height} px tall` : `${width} × ${height} px`} but ${withIcon ? "its icon and text" : "its text"} "${text}" needs ${needsWidth === width ? needsHeight : `${needsWidth} × ${needsHeight}`} px.`,
113
+ },
114
+ /** The hints of the layout's diagnostics. */
115
+ hints: {
116
+ /** `layout.label-cut` by the edge of the picture. */
117
+ labelCutByPicture: "Give the diagram room: a larger `canvas`, or move the element inward.",
118
+ /** `layout.label-cut` by a shape or a label. */
119
+ labelCut: "Shorten the text, or give the element a `size` that fits it.",
120
+ /** `layout.label-overlap` on a connector. */
121
+ labelOnConnector: "Move one of them, give the connector a `route`, or place the label with `label <relation> at <n>%`.",
122
+ /** `layout.label-overlap` on a text or a box. */
123
+ labelOverlap: "Move one of them apart, or place the label with `label <relation> at <n>%`.",
124
+ /** `layout.unknown-theme`: the built-in themes and those the file can name. */
125
+ themes: (builtIn, inScope) => `Built-in themes: ${builtIn.join(", ")}${inScope.length > 0 ? `; themes in scope: ${inScope.join(", ")}` : ""}.`,
126
+ /** `layout.missing-placement`. */
127
+ addPlace: (id) => `Add \`place ${id} at (x, y)\` to a placement block.`,
128
+ /** `layout.missing-placement` of a group without placed children. */
129
+ addPlaceAndSize: (id) => `Add \`place ${id} at (x, y)\` and \`size ${id} (w, h)\`.`,
130
+ /** `layout.mode-unsupported`. */
131
+ engine: "Hosts pass an engine in `LayoutOptions.engine`; the command line uses ELK. Or place every element.",
132
+ /** `layout.placement-ignored`. */
133
+ assisted: "Use `layout assisted` to keep placed elements where they are.",
134
+ /** `layout.image-unavailable` when the host reads images. */
135
+ imageFile: "Check that the file exists in the project and is a PNG, JPEG, GIF, WebP or SVG image.",
136
+ /** `layout.image-unavailable` when the host does not read images. */
137
+ imageHost: "Hosts pass `LayoutOptions.images`; the command line and the editor read the project's images.",
138
+ /** `layout.icon-missing`: the element, as code. */
139
+ iconMissing: (element) => `Give \`${element}\` an icon with \`style ${element} { icon "<pack>:<name>" }\`, or another shape.`,
140
+ /** `layout.label-position-ignored`. */
141
+ labelPositionIgnored: "Set `iconPosition center` or `shape icon` to put the label at an edge, or remove `labelPosition`.",
142
+ /**
143
+ * `layout.label-position-ignored` on kinds whose icon is never the centre piece: groups, tags,
144
+ * notes, free texts, icons and images, sequence and C4 kinds.
145
+ */
146
+ labelPositionNeverUsed: "Remove `labelPosition`: it only places the label of a node, decision, data store or box whose icon is the centre piece.",
147
+ /** `layout.label-position-ignored` of a `labelPosition` the theme gives. */
148
+ labelPositionIgnoredByTheme: "Set `iconPosition center` or `shape icon` on the elements, or remove `labelPosition` from the theme.",
149
+ /** `layout.text-overflow` of an icon shape too small for its icon: the size that holds it. */
150
+ iconTooSmall: (element, width, height) => `Use \`size ${element} (${width}, ${height})\`, or remove its \`size\` to draw the icon at its \`iconSize\`.`,
151
+ /** `layout.constraint-conflict`. */
152
+ constraint: "Placed elements never move; change a `place` or the constraint.",
153
+ /** `layout.unmeasured-font`. */
154
+ bundledFonts: "Bundled fonts: Inter, IBM Plex Sans and Cascadia Mono. Leave extra room with `size` if needed.",
155
+ /** `layout.too-large`. */
156
+ tooLarge: "Split the diagram into views or story scenes; text is never shrunk to fit the canvas.",
157
+ /** `layout.text-overflow`: the size that fits, as code. */
158
+ textOverflow: (element, width, height) => `Use \`size ${element} (${width}, ${height})\`, or shorten the text.`,
159
+ /** `layout.overlap` of a box declared before a box that holds it: the outer and inner boxes. */
160
+ stackOrder: (outer, inner) => `Declare \`${outer}\` before \`${inner}\` to draw a stack.`,
161
+ },
162
+ };
163
+ //# sourceMappingURL=en.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/messages/en.ts"],"names":[],"mappings":"AAUA,MAAM,GAAG,GAAG,CAAC,MAAyB,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtF,MAAM,OAAO,GAAG,CAAC,KAAoB,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC;AAE1F;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,4FAA4F;IAC5F,OAAO,EAAE;QACP,EAAE,EAAE;YACF,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE,iBAA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A6D;QAC7D,SAAS,EACP,uFAAuF;QACzF,qEAAqE;QACrE,SAAS,EACP,+FAA+F;QACjG,mDAAmD;QACnD,WAAW,EAAE,CAAC,OAAe,EAAE,EAAE,CAC/B,UAAU,OAAO,2BAA2B,OAAO,gDAAgD;QACrG,uCAAuC;QACvC,oBAAoB,EAClB,mGAAmG;QACrG;;;WAGG;QACH,sBAAsB,EACpB,yHAAyH;QAC3H,4EAA4E;QAC5E,2BAA2B,EACzB,sGAAsG;QACxG,8FAA8F;QAC9F,YAAY,EAAE,CAAC,OAAe,EAAE,KAAa,EAAE,MAAc,EAAE,EAAE,CAC/D,cAAc,OAAO,KAAK,KAAK,KAAK,MAAM,mEAAmE;QAC/G,oCAAoC;QACpC,UAAU,EAAE,iEAAiE;QAC7E,gCAAgC;QAChC,YAAY,EACV,gGAAgG;QAClG,0BAA0B;QAC1B,QAAQ,EACN,uFAAuF;QACzF,2DAA2D;QAC3D,YAAY,EAAE,CAAC,OAAe,EAAE,KAAa,EAAE,MAAc,EAAE,EAAE,CAC/D,cAAc,OAAO,KAAK,KAAK,KAAK,MAAM,2BAA2B;QACvE,gGAAgG;QAChG,UAAU,EAAE,CAAC,KAAa,EAAE,KAAa,EAAE,EAAE,CAC3C,aAAa,KAAK,eAAe,KAAK,qBAAqB;KAC9D;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { en } from "./en.js";
2
+ /** The layout's words in Spanish. */
3
+ export declare const es: typeof en;
4
+ //# sourceMappingURL=es.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../src/messages/es.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAmBlC,qCAAqC;AACrC,eAAO,MAAM,EAAE,EAAE,OAAO,EAqIvB,CAAC"}
@@ -0,0 +1,104 @@
1
+ import { decimal, list } from "@meltemi/diagrams-i18n";
2
+ const code = (value) => `\`${value}\``;
3
+ const ids = (values) => list("es", values.map(code));
4
+ /** A number in prose, with the decimal comma. */
5
+ const n = (value) => decimal("es", value, 6);
6
+ /** "de `api`", or "del marco" for the frame. */
7
+ const of = (owner) => (owner === null ? "del marco" : `de ${code(owner)}`);
8
+ /** The edges constraints align, with their article. */
9
+ const EDGES = {
10
+ top: "el borde superior",
11
+ middle: "el centro vertical",
12
+ bottom: "el borde inferior",
13
+ left: "el borde izquierdo",
14
+ center: "el centro horizontal",
15
+ right: "el borde derecho",
16
+ };
17
+ /** The layout's words in Spanish. */
18
+ export const es = {
19
+ drawing: {
20
+ c4: {
21
+ person: "Persona",
22
+ system: "Sistema de software",
23
+ container: "Contenedor",
24
+ component: "Componente",
25
+ externalPerson: "Persona externa",
26
+ externalSystem: "Sistema de software externo",
27
+ externalContainer: "Contenedor externo",
28
+ externalComponent: "Componente externo",
29
+ },
30
+ },
31
+ diagnostics: {
32
+ overlap: (a, b) => `${code(a)} y ${code(b)} se superponen.`,
33
+ crossesGroup: (shape, group) => `${code(shape)} cruza el borde de su grupo ${code(group)}.`,
34
+ overlapsGroup: (shape, group) => `${code(shape)} se superpone al grupo ${code(group)}, que no lo declara.`,
35
+ containerMargin: (shape, group) => `${code(shape)} está demasiado cerca del borde o de la banda del título de su grupo ${code(group)}.`,
36
+ labelUnderConnector: (label, connector) => `La etiqueta de ${code(label)} queda sobre el conector de ${code(connector)}.`,
37
+ connectorOverlap: (a, b, length) => `Los conectores de ${code(a)} y ${code(b)} se superponen a lo largo de ${n(length)} px.`,
38
+ connectorCrossing: (relation, box) => `El conector de ${code(relation)} atraviesa ${code(box)}.`,
39
+ labelCut: (text, owner, overflow, by) => `El texto "${text}" ${of(owner)} sobresale ${n(overflow)} px ${by === "picture" ? "del dibujo" : by === "background" ? "de su etiqueta" : "de su forma"}.`,
40
+ labelOverlap: (text, owner, other) => `El texto "${text}" ${of(owner)} se superpone ${other.kind === "text"
41
+ ? `al texto "${other.text}" ${of(other.owner)}`
42
+ : other.kind === "box"
43
+ ? `a la caja de ${code(other.owner)}`
44
+ : `al conector de ${code(other.owner)}`}.`,
45
+ unknownTheme: (written, fallback) => `Tema desconocido "${written}"; se dibuja con ${fallback}.`,
46
+ groupWithoutPlace: (group) => `El grupo ${code(group)} no tiene una instrucción \`place\`; en los diagramas libres, las posiciones de sus hijos son relativas a su interior.`,
47
+ elementWithoutPlace: (element) => `${code(element)} no tiene una instrucción \`place\`; \`layout manual\` necesita una posición para cada elemento.`,
48
+ groupHalfPlaced: (group, written) => `El grupo ${code(group)} tiene ${written === "place" ? "un `place` pero no un `size`" : "un `size` pero no un `place`"}; da los dos, o ninguno para que se ajuste a sus hijos.`,
49
+ groupUnplaced: (group) => `El grupo ${code(group)} no tiene hijos colocados ni un \`place\`/\`size\` propio.`,
50
+ modeUnsupported: (mode, elements) => `\`layout ${mode}\` necesita un motor de disposición para colocar ${ids(elements)}.`,
51
+ placementIgnored: "`layout auto` organiza todos los elementos, así que se ignoran las instrucciones `place` y los puntos de paso de las rutas.",
52
+ imageUnavailable: (source, element) => `La imagen "${source}" de ${code(element)} no se puede dibujar; en su lugar se dibuja un marcador de posición.`,
53
+ iconMissing: (element) => `${code(element)} se dibuja como su icono, pero no tiene \`icon\`; en su lugar se dibuja un marcador de posición.`,
54
+ labelPositionIgnored: (element) => `El \`labelPosition\` de ${code(element)} no tiene efecto: su icono no ocupa el centro.`,
55
+ labelPositionIgnoredByTheme: (element) => `El \`labelPosition\` que el tema da a ${code(element)} y a los elementos con su mismo estilo no tiene efecto: en ninguno el icono ocupa el centro.`,
56
+ iconTooSmall: (element, width, height, needsWidth, needsHeight) => `${code(element)} mide ${n(width)} × ${n(height)} px, demasiado pequeño para dibujar su icono: necesita ${n(needsWidth)} × ${n(needsHeight)} px.`,
57
+ engineFailed: (engine, reason) => `Falló el motor de disposición ${engine}: ${reason}`,
58
+ alignConflict: (kind, elements, edge, worst, off, first) => `${code(kind)} no se puede cumplir para ${ids(elements)}: ${EDGES[edge]} de ${code(worst)} está desplazado ${n(off)} px respecto de ${code(first)}.`,
59
+ orderConflict: (elements, current, axis, previous) => `\`order\` no se puede cumplir para ${ids(elements)}: ${code(current)} no está ${axis === "x" ? "a la derecha de" : "debajo de"} ${code(previous)}.`,
60
+ distanceConflict: (a, b, gap, distance) => `\`distance\` no se puede cumplir: ${code(a)} y ${code(b)} están a ${n(gap)} px, menos de ${n(distance)} px.`,
61
+ unmeasuredFont: (fonts, characters) => {
62
+ const parts = [];
63
+ if (fonts.length > 0) {
64
+ parts.push(fonts.length === 1
65
+ ? `la fuente ${ids(fonts)} no está incluida`
66
+ : `las fuentes ${ids(fonts)} no están incluidas`);
67
+ }
68
+ if (characters.length > 0) {
69
+ const covered = characters.length === 1 ? "está cubierto" : "están cubiertos";
70
+ parts.push(`${characters.join(" ")} no ${covered} por las fuentes incluidas`);
71
+ }
72
+ return `Parte del texto se mide con estimaciones: ${parts.join("; ")}.`;
73
+ },
74
+ tooWideForDocument: (width, max) => `El contenido mide ${n(width)} px de ancho; \`preset document\` se lee mejor hasta ${n(max)} px.`,
75
+ tooLargeForSlide: (width, height, slideWidth, slideHeight) => `El contenido mide ${n(width)} × ${n(height)} px; una diapositiva mide ${n(slideWidth)} × ${n(slideHeight)} px.`,
76
+ tooLargeForCanvas: (width, height, canvasWidth, canvasHeight) => `El contenido mide ${n(width)} × ${n(height)} px; el lienzo mide ${n(canvasWidth)} × ${n(canvasHeight)} px.`,
77
+ textOverflow: (element, width, withIcon, text, needs) => `${code(element)} mide ${n(width)} px de ancho, pero ${withIcon ? `su icono y su texto "${text}" necesitan` : `su texto "${text}" necesita`} ${n(needs)} px.`,
78
+ textOverflowTall: (element, width, height, withIcon, text, needsWidth, needsHeight) => `${code(element)} mide ${needsWidth === width ? `${n(height)} px de alto` : `${n(width)} × ${n(height)} px`}, pero ${withIcon ? `su icono y su texto "${text}" necesitan` : `su texto "${text}" necesita`} ${needsWidth === width ? n(needsHeight) : `${n(needsWidth)} × ${n(needsHeight)}`} px.`,
79
+ },
80
+ hints: {
81
+ labelCutByPicture: "Dale espacio al diagrama: un `canvas` más grande, o mueve el elemento hacia dentro.",
82
+ labelCut: "Acorta el texto o dale al elemento un `size` en el que quepa.",
83
+ labelOnConnector: "Mueve uno de los dos, dale una `route` al conector o coloca la etiqueta con `label <relation> at <n>%`.",
84
+ labelOverlap: "Separa uno de los dos o coloca la etiqueta con `label <relation> at <n>%`.",
85
+ themes: (builtIn, inScope) => `Temas integrados: ${builtIn.join(", ")}${inScope.length > 0 ? `; temas disponibles: ${inScope.join(", ")}` : ""}.`,
86
+ addPlace: (id) => `Agrega \`place ${id} at (x, y)\` a un bloque \`placement\`.`,
87
+ addPlaceAndSize: (id) => `Agrega \`place ${id} at (x, y)\` y \`size ${id} (w, h)\`.`,
88
+ engine: "Las aplicaciones anfitrionas pasan un motor en `LayoutOptions.engine`; la línea de comandos usa ELK. O coloca cada elemento.",
89
+ assisted: "Usa `layout assisted` para mantener los elementos colocados donde están.",
90
+ imageFile: "Comprueba que el archivo existe en el proyecto y es una imagen PNG, JPEG, GIF, WebP o SVG.",
91
+ imageHost: "Las aplicaciones anfitrionas pasan `LayoutOptions.images`; la línea de comandos y el editor leen las imágenes del proyecto.",
92
+ iconMissing: (element) => `Dale un icono a ${code(element)} con \`style ${element} { icon "<pack>:<name>" }\`, o elige otra forma.`,
93
+ labelPositionIgnored: "Pon `iconPosition center` o `shape icon` para llevar la etiqueta a un borde, o quita `labelPosition`.",
94
+ labelPositionNeverUsed: "Quita `labelPosition`: solo coloca la etiqueta de un nodo, una decisión, un almacén de datos o una caja cuyo icono ocupa el centro.",
95
+ labelPositionIgnoredByTheme: "Pon `iconPosition center` o `shape icon` en los elementos, o quita `labelPosition` del tema.",
96
+ iconTooSmall: (element, width, height) => `Usa \`size ${element} (${width}, ${height})\` o quita su \`size\` para dibujar el icono a su \`iconSize\`.`,
97
+ constraint: "Los elementos colocados nunca se mueven; cambia un `place` o la restricción.",
98
+ bundledFonts: "Fuentes incluidas: Inter, IBM Plex Sans y Cascadia Mono. Deja espacio de más con `size` si hace falta.",
99
+ tooLarge: "Divide el diagrama en vistas o en escenas de una historia; el texto nunca se reduce para que quepa en el lienzo.",
100
+ textOverflow: (element, width, height) => `Usa \`size ${element} (${width}, ${height})\` o acorta el texto.`,
101
+ stackOrder: (outer, inner) => `Declara ${code(outer)} antes de ${code(inner)} para dibujar una pila.`,
102
+ },
103
+ };
104
+ //# sourceMappingURL=es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es.js","sourceRoot":"","sources":["../../src/messages/es.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAIvD,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;AAC/C,MAAM,GAAG,GAAG,CAAC,MAAyB,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AACxE,iDAAiD;AACjD,MAAM,CAAC,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AACrD,gDAAgD;AAChD,MAAM,EAAE,GAAG,CAAC,KAAoB,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAE1F,uDAAuD;AACvD,MAAM,KAAK,GAAwC;IACjD,GAAG,EAAE,mBAAmB;IACxB,MAAM,EAAE,oBAAoB;IAC5B,MAAM,EAAE,mBAAmB;IAC3B,IAAI,EAAE,oBAAoB;IAC1B,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE,kBAAkB;CAC1B,CAAC;AAEF,qCAAqC;AACrC,MAAM,CAAC,MAAM,EAAE,GAAc;IAC3B,OAAO,EAAE;QACP,EAAE,EAAE;YAC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KAAK,KAAK,KAAK,MAAM,wBAAwB;QACpE,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAC3B,WAAW,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,yBAAyB;KAC1E;CACF,CAAC"}
@@ -0,0 +1,86 @@
1
+ import { type Locale } from "@meltemi/diagrams-i18n";
2
+ import { en } from "./en.js";
3
+ export type { CutBy, LabelObstacle } from "./en.js";
4
+ /**
5
+ * The layout's words. Without a locale, the interface language: diagnostics and their hints are
6
+ * written in it when they are made, so read them at report time, never at module load.
7
+ */
8
+ export declare const messages: (locale?: Locale) => {
9
+ drawing: {
10
+ c4: {
11
+ person: string;
12
+ system: string;
13
+ container: string;
14
+ component: string;
15
+ externalPerson: string;
16
+ externalSystem: string;
17
+ externalContainer: string;
18
+ externalComponent: string;
19
+ };
20
+ };
21
+ diagnostics: {
22
+ overlap: (a: string, b: string) => string;
23
+ crossesGroup: (shape: string, group: string) => string;
24
+ overlapsGroup: (shape: string, group: string) => string;
25
+ containerMargin: (shape: string, group: string) => string;
26
+ labelUnderConnector: (label: string, connector: string) => string;
27
+ connectorOverlap: (a: string, b: string, length: number) => string;
28
+ connectorCrossing: (relation: string, box: string) => string;
29
+ labelCut: (text: string, owner: string | null, overflow: number, by: import("./en.js").CutBy) => string;
30
+ labelOverlap: (text: string, owner: string | null, other: import("./en.js").LabelObstacle) => string;
31
+ unknownTheme: (written: string, fallback: string) => string;
32
+ groupWithoutPlace: (group: string) => string;
33
+ elementWithoutPlace: (element: string) => string;
34
+ groupHalfPlaced: (group: string, written: "place" | "size") => string;
35
+ groupUnplaced: (group: string) => string;
36
+ modeUnsupported: (mode: string, elements: readonly string[]) => string;
37
+ placementIgnored: string;
38
+ imageUnavailable: (source: string, element: string) => string;
39
+ iconMissing: (element: string) => string;
40
+ labelPositionIgnored: (element: string) => string;
41
+ labelPositionIgnoredByTheme: (element: string) => string;
42
+ iconTooSmall: (element: string, width: number, height: number, needsWidth: number, needsHeight: number) => string;
43
+ engineFailed: (engine: string, reason: string) => string;
44
+ alignConflict: (kind: string, elements: readonly string[], edge: import("@meltemi/diagrams-model").AlignEdge, worst: string, off: number, first: string) => string;
45
+ orderConflict: (elements: readonly string[], current: string, axis: "x" | "y", previous: string) => string;
46
+ distanceConflict: (a: string, b: string, gap: number, distance: number) => string;
47
+ unmeasuredFont: (fonts: readonly string[], characters: readonly string[]) => string;
48
+ tooWideForDocument: (width: number, max: number) => string;
49
+ tooLargeForSlide: (width: number, height: number, slideWidth: number, slideHeight: number) => string;
50
+ tooLargeForCanvas: (width: number, height: number, canvasWidth: number, canvasHeight: number) => string;
51
+ textOverflow: (element: string, width: number, withIcon: boolean, text: string, needs: number) => string;
52
+ textOverflowTall: (element: string, width: number, height: number, withIcon: boolean, text: string, needsWidth: number, needsHeight: number) => string;
53
+ };
54
+ hints: {
55
+ labelCutByPicture: string;
56
+ labelCut: string;
57
+ labelOnConnector: string;
58
+ labelOverlap: string;
59
+ themes: (builtIn: readonly string[], inScope: readonly string[]) => string;
60
+ addPlace: (id: string) => string;
61
+ addPlaceAndSize: (id: string) => string;
62
+ engine: string;
63
+ assisted: string;
64
+ imageFile: string;
65
+ imageHost: string;
66
+ iconMissing: (element: string) => string;
67
+ labelPositionIgnored: string;
68
+ labelPositionNeverUsed: string;
69
+ labelPositionIgnoredByTheme: string;
70
+ iconTooSmall: (element: string, width: number, height: number) => string;
71
+ constraint: string;
72
+ bundledFonts: string;
73
+ tooLarge: string;
74
+ textOverflow: (element: string, width: number, height: number) => string;
75
+ stackOrder: (outer: string, inner: string) => string;
76
+ };
77
+ };
78
+ /** The layout's words in one language. */
79
+ export type LayoutWords = typeof en;
80
+ /**
81
+ * The words the layout adds to drawings (the type lines of C4 entities). Drawings are content:
82
+ * callers always pass the content language (the project's `locale` or an export's), so the same
83
+ * sources draw the same text on every machine, whatever the interface language.
84
+ */
85
+ export declare function drawingWords(locale: Locale): LayoutWords["drawing"];
86
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAG7B,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAkB,CAAC;AAExC,0CAA0C;AAC1C,MAAM,MAAM,WAAW,GAAG,OAAO,EAAE,CAAC;AAEpC;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,CAEnE"}
@@ -0,0 +1,17 @@
1
+ import { catalog } from "@meltemi/diagrams-i18n";
2
+ import { en } from "./en.js";
3
+ import { es } from "./es.js";
4
+ /**
5
+ * The layout's words. Without a locale, the interface language: diagnostics and their hints are
6
+ * written in it when they are made, so read them at report time, never at module load.
7
+ */
8
+ export const messages = catalog(en, es);
9
+ /**
10
+ * The words the layout adds to drawings (the type lines of C4 entities). Drawings are content:
11
+ * callers always pass the content language (the project's `locale` or an export's), so the same
12
+ * sources draw the same text on every machine, whatever the interface language.
13
+ */
14
+ export function drawingWords(locale) {
15
+ return messages(locale).drawing;
16
+ }
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAI7B;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAKxC;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,MAAc;IACzC,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;AAClC,CAAC"}
@@ -0,0 +1,94 @@
1
+ import type { Point, Routing } from "@meltemi/diagrams-model";
2
+ import { type Box, type Side } from "./geometry.js";
3
+ /** One end of a connector: its box and port, with the side and position of a named port. */
4
+ export interface ConnectorEnd {
5
+ readonly box: Box;
6
+ /** A compass side, `auto`, or a named port. */
7
+ readonly port: string;
8
+ /**
9
+ * A named port or a point of a side: its side and position on `box`, or, on a turned element,
10
+ * the side it faces and its `point` on the turned outline, which `box` (the drawn box) holds.
11
+ */
12
+ readonly named: {
13
+ readonly side: Side;
14
+ readonly position: number;
15
+ readonly point?: Point;
16
+ } | null;
17
+ }
18
+ /** Spacing between parallel relations. */
19
+ export declare const LANE_SPACING = 16;
20
+ /** The point of a named port: its position along the side, left to right or top to bottom. */
21
+ export declare function portPoint(box: Box, side: Side, position: number): Point;
22
+ /** Outward unit normal of a side. */
23
+ export declare function sideNormal(side: Side): Point;
24
+ /** The side of a point lying on a box's border. */
25
+ export declare function sideOfPoint(box: Box, point: Point): Side;
26
+ /** How far each end of a connector moves along its side: one lane for both, or one per end. */
27
+ export type Lanes = number | {
28
+ readonly from: number;
29
+ readonly to: number;
30
+ };
31
+ /**
32
+ * The anchors and the default points of a connector (decision 0006), with named ports anchored at
33
+ * their point and free ends moved along their sides by their lanes (`lane`, in pixels).
34
+ */
35
+ export declare function anchorPoints(from: ConnectorEnd, to: ConnectorEnd, via: readonly Point[], lane: Lanes): {
36
+ points: Point[];
37
+ fromSide: Side;
38
+ toSide: Side;
39
+ };
40
+ /**
41
+ * Inserts one elbow between consecutive points that differ on both axes. The first segment leaves
42
+ * along the normal of `firstSide`; with `lastSide`, the last one enters along its normal, and two
43
+ * points without waypoints are joined like ports (none, one or two elbows, or stubs).
44
+ */
45
+ export declare function orthogonalize(points: readonly Point[], firstSide: Side, lastSide?: Side): Point[];
46
+ /**
47
+ * A smooth cubic curve through `points` (Catmull-Rom), leaving and entering perpendicular to the
48
+ * box sides. The curve ends at `end`, the base of the end's head when there is one, and starts at
49
+ * `start`, the base of the start's head; the returned polyline samples it for labels and checks.
50
+ */
51
+ export declare function bezierThrough(points: readonly Point[], fromSide: Side, toSide: Side, end: Point, start?: Point): {
52
+ d: string;
53
+ samples: Point[];
54
+ };
55
+ /** Applies a route kind to anchors and waypoints. `auto` keeps the default points. */
56
+ export declare function shapeRoute(kind: Routing, points: readonly Point[], anchors: {
57
+ first: Point;
58
+ last: Point;
59
+ via: readonly Point[];
60
+ }, fromSide: Side, toSide: Side): Point[];
61
+ /**
62
+ * Moves the first or last point of an orthogonal route along its segment onto the border of
63
+ * `box`, when the segment runs into the box from outside or stops short of it.
64
+ */
65
+ export declare function snapEnd(points: readonly Point[], box: Box, end: "first" | "last"): Point[];
66
+ /** Whether a segment passes through the inside of a box (Liang–Barsky clipping). */
67
+ export declare function segmentCrossesBox(a: Point, b: Point, box: Box): boolean;
68
+ /** The boxes a route passes through. */
69
+ export declare function crossedBoxes<T extends Box>(points: readonly Point[], boxes: readonly T[]): T[];
70
+ /**
71
+ * An orthogonal route between two boxes that passes through fewer of `obstacles` than `current`
72
+ * does: L and Z routes between the middles of every pair of sides, leaving and entering each box
73
+ * straight, ranked by the obstacles they cross, then by length and bends. Undefined when no such
74
+ * route crosses fewer boxes. `extra` counts other things a route crosses (the labels of its ends).
75
+ */
76
+ export declare function avoidingRoute(from: Box, to: Box, obstacles: readonly Box[], current: readonly Point[], extra?: (route: readonly Point[]) => number): {
77
+ points: Point[];
78
+ fromSide: Side;
79
+ toSide: Side;
80
+ } | undefined;
81
+ /** An end of a detour: its box, the point of its border and the side it leaves or enters by. */
82
+ export interface DetourEnd {
83
+ readonly box: Box;
84
+ readonly point: Point;
85
+ readonly side: Side;
86
+ }
87
+ /**
88
+ * The shortest orthogonal route from `from` to `to` that passes through none of `obstacles` and
89
+ * neither end box. It leaves and enters square to the ends' sides with a 20 px stub and runs along
90
+ * the lines through the stubs and 20 px outside every box near the ends; each change of direction
91
+ * costs 40 px. Undefined when every way is blocked.
92
+ */
93
+ export declare function detourRoute(from: DetourEnd, to: DetourEnd, obstacles: readonly Box[]): Point[] | undefined;
94
+ //# sourceMappingURL=routing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../src/routing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAML,KAAK,GAAG,EACR,KAAK,IAAI,EACV,MAAM,eAAe,CAAC;AAEvB,4FAA4F;AAC5F,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;IAClB,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE;QACd,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;QACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;KACxB,GAAG,IAAI,CAAC;CACV;AAOD,0CAA0C;AAC1C,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,8FAA8F;AAC9F,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,KAAK,CAWvE;AAID,qCAAqC;AACrC,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,KAAK,CAW5C;AAED,mDAAmD;AACnD,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CASxD;AAUD,+FAA+F;AAC/F,MAAM,MA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