@tumaet/apollon 4.9.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -63
- package/dist/assets/style.css +2 -1
- package/dist/export.js +189 -205
- package/dist/exportFonts-B_CLIgms.js +5 -0
- package/dist/exportStyles-sXOp3rln.js +5 -0
- package/dist/fontStack-BKkvgDI3.js +4 -0
- package/dist/index.d.ts +237 -58
- package/dist/index.js +16850 -36346
- package/dist/internals.d.ts +2 -10
- package/dist/internals.js +28 -46
- package/dist/versionConverter-C-s36Ory.js +4769 -0
- package/package.json +33 -79
- package/dist/exportFonts-DxO9jrR1.js +0 -19
- package/dist/exportStyles-Co-WBqTa.js +0 -5
- package/dist/external/LICENSE-InterFont +0 -92
- package/dist/external/exportFonts-DxO9jrR1.js +0 -19
- package/dist/external/exportStyles-Co-WBqTa.js +0 -5
- package/dist/external/index.js +0 -22191
- package/dist/fontStack-DOtVH2j8.js +0 -5
- package/dist/react/App.d.ts +0 -9
- package/dist/react/LICENSE-InterFont +0 -92
- package/dist/react/apollon-editor.d.ts +0 -184
- package/dist/react/components/AlignmentGuides.d.ts +0 -1
- package/dist/react/components/AssessmentSelectableElement.d.ts +0 -10
- package/dist/react/components/AssessmentSelectionDebug.d.ts +0 -1
- package/dist/react/components/CustomBackground.d.ts +0 -1
- package/dist/react/components/CustomControls.d.ts +0 -8
- package/dist/react/components/CustomMiniMap.d.ts +0 -1
- package/dist/react/components/DraggableGhost.d.ts +0 -13
- package/dist/react/components/Icon/ArrowBackIcon.d.ts +0 -4
- package/dist/react/components/Icon/ArrowForwardIcon.d.ts +0 -4
- package/dist/react/components/Icon/CheckIcon.d.ts +0 -4
- package/dist/react/components/Icon/CrossIcon.d.ts +0 -4
- package/dist/react/components/Icon/DeleteIcon.d.ts +0 -4
- package/dist/react/components/Icon/DragHandleIcon.d.ts +0 -4
- package/dist/react/components/Icon/EditIcon.d.ts +0 -4
- package/dist/react/components/Icon/ExclamationIcon.d.ts +0 -4
- package/dist/react/components/Icon/InfiniteIcon.d.ts +0 -4
- package/dist/react/components/Icon/MapIcon.d.ts +0 -4
- package/dist/react/components/Icon/PaintRollerIcon.d.ts +0 -2
- package/dist/react/components/Icon/RedoIcon.d.ts +0 -2
- package/dist/react/components/Icon/SouthEastArrowIcon.d.ts +0 -4
- package/dist/react/components/Icon/SwapHorizIcon.d.ts +0 -4
- package/dist/react/components/Icon/UndoIcon.d.ts +0 -2
- package/dist/react/components/Icon/index.d.ts +0 -14
- package/dist/react/components/ReconnectConnectionLine.d.ts +0 -2
- package/dist/react/components/ScrollOverlay.d.ts +0 -7
- package/dist/react/components/Sidebar.d.ts +0 -2
- package/dist/react/components/collaboration/CollaborationLayer.d.ts +0 -25
- package/dist/react/components/collaboration/coordinates.d.ts +0 -7
- package/dist/react/components/index.d.ts +0 -18
- package/dist/react/components/popovers/DefaultNodeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/DefaultNodeGiveFeedbackPopover.d.ts +0 -2
- package/dist/react/components/popovers/DefaultNodeSeeFeedbackPopover.d.ts +0 -2
- package/dist/react/components/popovers/GenericPopover.d.ts +0 -17
- package/dist/react/components/popovers/GiveFeedbackAssessmentBox.d.ts +0 -7
- package/dist/react/components/popovers/PopoverManager.d.ts +0 -10
- package/dist/react/components/popovers/SeeFeedbackAssessmentBox.d.ts +0 -5
- package/dist/react/components/popovers/activityDiagram/ActivitySwimlaneEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/activityDiagram/index.d.ts +0 -1
- package/dist/react/components/popovers/bpmnDiagram/BPMNEndEventEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/bpmnDiagram/BPMNGatewayEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/bpmnDiagram/BPMNIntermediateEventEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/bpmnDiagram/BPMNPoolEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/bpmnDiagram/BPMNStartEventEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/bpmnDiagram/BPMNTaskEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/bpmnDiagram/index.d.ts +0 -6
- package/dist/react/components/popovers/classDiagram/ClassEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/classDiagram/ClassGiveFeedbackPopover.d.ts +0 -2
- package/dist/react/components/popovers/classDiagram/ClassSeeFeedbackPopover.d.ts +0 -2
- package/dist/react/components/popovers/classDiagram/EditableAttributesList.d.ts +0 -6
- package/dist/react/components/popovers/classDiagram/EditableMethodsList.d.ts +0 -6
- package/dist/react/components/popovers/classDiagram/index.d.ts +0 -6
- package/dist/react/components/popovers/communicationDiagram/CommunicationObjectNameEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/communicationDiagram/CommunicationObjectNameGiveFeedbackPopover.d.ts +0 -2
- package/dist/react/components/popovers/communicationDiagram/CommunicationObjectNameSeeFeedbackPopover.d.ts +0 -2
- package/dist/react/components/popovers/communicationDiagram/index.d.ts +0 -3
- package/dist/react/components/popovers/componentDiagram/ComponentEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/componentDiagram/ComponentSubsystemEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/componentDiagram/index.d.ts +0 -2
- package/dist/react/components/popovers/deploymentDiagram/DeploymentComponentEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/deploymentDiagram/DeploymentNodeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/deploymentDiagram/index.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/ActivityDiagramEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/BPMNDiagramEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/ClassDiagramEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/CommunicationDiagramEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/ComponentDiagramEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/DeploymentDiagramEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/EdgeGiveFeedbackPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/EdgeSeeFeedbackPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/EdgeTypePreviewIcon.d.ts +0 -3
- package/dist/react/components/popovers/edgePopovers/EdgeTypeSelect.d.ts +0 -9
- package/dist/react/components/popovers/edgePopovers/FlowChartEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/ObjectDiagramEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/PetriNetEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/ReachabilityGraphEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/SwapEndsButton.d.ts +0 -9
- package/dist/react/components/popovers/edgePopovers/SyntaxTreeEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/UseCaseDiagramEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/edgePopovers/index.d.ts +0 -8
- package/dist/react/components/popovers/index.d.ts +0 -3
- package/dist/react/components/popovers/objectDiagram/ObjectEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/objectDiagram/ObjectGiveFeedbackPopover.d.ts +0 -2
- package/dist/react/components/popovers/objectDiagram/ObjectSeeFeedbackPopover.d.ts +0 -2
- package/dist/react/components/popovers/objectDiagram/index.d.ts +0 -3
- package/dist/react/components/popovers/petriNetDiagram/PetriNetPlaceEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/petriNetDiagram/index.d.ts +0 -1
- package/dist/react/components/popovers/reachabilityGraphDiagram/ReachabilityGraphMarkingEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/reachabilityGraphDiagram/index.d.ts +0 -1
- package/dist/react/components/popovers/sfcDiagram/SfcActionTableEditPopover.d.ts +0 -3
- package/dist/react/components/popovers/sfcDiagram/SfcEdgeEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/sfcDiagram/index.d.ts +0 -2
- package/dist/react/components/popovers/syntaxTreeDiagram/SyntaxTreeNonterminalEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/syntaxTreeDiagram/SyntaxTreeTerminalEditPopover.d.ts +0 -2
- package/dist/react/components/popovers/syntaxTreeDiagram/index.d.ts +0 -2
- package/dist/react/components/popovers/types.d.ts +0 -6
- package/dist/react/components/react/Apollon.d.ts +0 -50
- package/dist/react/components/react/ApollonControl.d.ts +0 -18
- package/dist/react/components/react/context.d.ts +0 -16
- package/dist/react/components/react/useApollonSubscription.d.ts +0 -17
- package/dist/react/components/svgs/AssessmentIcon.d.ts +0 -8
- package/dist/react/components/svgs/StyledElements.d.ts +0 -2
- package/dist/react/components/svgs/edges/InlineMarker.d.ts +0 -70
- package/dist/react/components/svgs/edges/index.d.ts +0 -1
- package/dist/react/components/svgs/index.d.ts +0 -3
- package/dist/react/components/svgs/nodes/CustomText.d.ts +0 -10
- package/dist/react/components/svgs/nodes/HeaderSection.d.ts +0 -14
- package/dist/react/components/svgs/nodes/InterfaceLabel.d.ts +0 -26
- package/dist/react/components/svgs/nodes/MultilineText.d.ts +0 -51
- package/dist/react/components/svgs/nodes/RowBlockSection.d.ts +0 -15
- package/dist/react/components/svgs/nodes/SeparationLine.d.ts +0 -8
- package/dist/react/components/svgs/nodes/StereotypeAndName.d.ts +0 -54
- package/dist/react/components/svgs/nodes/activityDiagram/ActivityActionNodeSVG.d.ts +0 -6
- package/dist/react/components/svgs/nodes/activityDiagram/ActivityFinalNodeSVG.d.ts +0 -2
- package/dist/react/components/svgs/nodes/activityDiagram/ActivityForkNodeHorizontalSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/activityDiagram/ActivityForkNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/activityDiagram/ActivityInitialNodeSVG.d.ts +0 -2
- package/dist/react/components/svgs/nodes/activityDiagram/ActivityMergeNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/activityDiagram/ActivityObjectNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/activityDiagram/ActivitySVG.d.ts +0 -6
- package/dist/react/components/svgs/nodes/activityDiagram/ActivitySwimlaneSVG.d.ts +0 -9
- package/dist/react/components/svgs/nodes/activityDiagram/index.d.ts +0 -9
- package/dist/react/components/svgs/nodes/bpmnDiagram/BPMNAnnotationNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/bpmnDiagram/BPMNDataObjectNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/bpmnDiagram/BPMNDataStoreNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/bpmnDiagram/BPMNEventNodeSVG.d.ts +0 -8
- package/dist/react/components/svgs/nodes/bpmnDiagram/BPMNGatewayNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/bpmnDiagram/BPMNGroupNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/bpmnDiagram/BPMNPoolNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/bpmnDiagram/BPMNSubprocessNodeSVG.d.ts +0 -8
- package/dist/react/components/svgs/nodes/bpmnDiagram/BPMNTaskNodeSVG.d.ts +0 -6
- package/dist/react/components/svgs/nodes/bpmnDiagram/index.d.ts +0 -9
- package/dist/react/components/svgs/nodes/classDiagram/ClassSVG.d.ts +0 -10
- package/dist/react/components/svgs/nodes/classDiagram/ColorDescriptionSVG.d.ts +0 -10
- package/dist/react/components/svgs/nodes/classDiagram/PackageSVG.d.ts +0 -6
- package/dist/react/components/svgs/nodes/classDiagram/TitleAndDescriptionSVG.d.ts +0 -11
- package/dist/react/components/svgs/nodes/classDiagram/index.d.ts +0 -4
- package/dist/react/components/svgs/nodes/communicationDiagram/CommunicationObjectNameSVG.d.ts +0 -6
- package/dist/react/components/svgs/nodes/communicationDiagram/index.d.ts +0 -1
- package/dist/react/components/svgs/nodes/componentDiagram/ComponentInterfaceNodeSVG.d.ts +0 -9
- package/dist/react/components/svgs/nodes/componentDiagram/ComponentNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/componentDiagram/ComponentSubsystemNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/componentDiagram/index.d.ts +0 -3
- package/dist/react/components/svgs/nodes/deploymentDiagram/DeploymentArtifactSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/deploymentDiagram/DeploymentComponentSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/deploymentDiagram/DeploymentInterfaceSVG.d.ts +0 -9
- package/dist/react/components/svgs/nodes/deploymentDiagram/DeploymentNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/deploymentDiagram/index.d.ts +0 -4
- package/dist/react/components/svgs/nodes/flowchartDiagram/FlowchartDecisionNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/flowchartDiagram/FlowchartFunctionCallNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/flowchartDiagram/FlowchartInputOutputNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/flowchartDiagram/FlowchartProcessNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/flowchartDiagram/FlowchartTerminalNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/flowchartDiagram/index.d.ts +0 -5
- package/dist/react/components/svgs/nodes/index.d.ts +0 -13
- package/dist/react/components/svgs/nodes/objectDiagram/ObjectNameSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/objectDiagram/index.d.ts +0 -1
- package/dist/react/components/svgs/nodes/petriNetDiagram/PetriNetPlaceSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/petriNetDiagram/PetriNetTransitionSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/petriNetDiagram/index.d.ts +0 -2
- package/dist/react/components/svgs/nodes/reachabilityGraphDiagram/ReachabilityGraphMarkingSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/reachabilityGraphDiagram/index.d.ts +0 -1
- package/dist/react/components/svgs/nodes/sfcDiagram/SfcActionTableNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/sfcDiagram/SfcJumpNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/sfcDiagram/SfcStartNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/sfcDiagram/SfcStepNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/sfcDiagram/SfcTransitionBranchNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/sfcDiagram/index.d.ts +0 -5
- package/dist/react/components/svgs/nodes/syntaxTreeDiagram/SyntaxTreeNonterminalNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/syntaxTreeDiagram/SyntaxTreeTerminalNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/syntaxTreeDiagram/index.d.ts +0 -2
- package/dist/react/components/svgs/nodes/useCaseDiagram/UseCaseActorNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/useCaseDiagram/UseCaseNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/useCaseDiagram/UseCaseSystemNodeSVG.d.ts +0 -7
- package/dist/react/components/svgs/nodes/useCaseDiagram/index.d.ts +0 -3
- package/dist/react/components/toolbars/NodeToolbar.d.ts +0 -7
- package/dist/react/components/toolbars/edgeToolBar/CustomEdgeToolBar.d.ts +0 -12
- package/dist/react/components/toolbars/edgeToolBar/index.d.ts +0 -1
- package/dist/react/components/toolbars/index.d.ts +0 -1
- package/dist/react/components/ui/DividerLine.d.ts +0 -9
- package/dist/react/components/ui/HeaderSwitchElement.d.ts +0 -7
- package/dist/react/components/ui/PrimaryButton.d.ts +0 -8
- package/dist/react/components/ui/StereotypeButtonGroup.d.ts +0 -8
- package/dist/react/components/ui/StyleEditor/ColorButtons.d.ts +0 -11
- package/dist/react/components/ui/StyleEditor/EdgeStyleEditor.d.ts +0 -11
- package/dist/react/components/ui/StyleEditor/NodeStyleEditor.d.ts +0 -22
- package/dist/react/components/ui/StyleEditor/index.d.ts +0 -2
- package/dist/react/components/ui/TextField.d.ts +0 -3
- package/dist/react/components/ui/Typography.d.ts +0 -3
- package/dist/react/components/ui/index.d.ts +0 -7
- package/dist/react/components/wrapper/AssessmentSelectableWrapper.d.ts +0 -11
- package/dist/react/components/wrapper/FeedbackDropzone.d.ts +0 -10
- package/dist/react/components/wrapper/index.d.ts +0 -2
- package/dist/react/constants.d.ts +0 -261
- package/dist/react/edges/Connection.d.ts +0 -36
- package/dist/react/edges/EdgeProps.d.ts +0 -24
- package/dist/react/edges/GenericEdge.d.ts +0 -78
- package/dist/react/edges/edgeTypes/ActivityDiagramEdge.d.ts +0 -2
- package/dist/react/edges/edgeTypes/BPMNDiagramEdge.d.ts +0 -2
- package/dist/react/edges/edgeTypes/ClassDiagramEdge.d.ts +0 -2
- package/dist/react/edges/edgeTypes/CommunicationDiagramEdge.d.ts +0 -2
- package/dist/react/edges/edgeTypes/ComponentDiagramEdge.d.ts +0 -2
- package/dist/react/edges/edgeTypes/DeploymentDiagramEdge.d.ts +0 -2
- package/dist/react/edges/edgeTypes/FlowChartEdge.d.ts +0 -2
- package/dist/react/edges/edgeTypes/ObjectDiagramEdge.d.ts +0 -2
- package/dist/react/edges/edgeTypes/PetriNetEdge.d.ts +0 -2
- package/dist/react/edges/edgeTypes/ReachabilityGraphArc.d.ts +0 -2
- package/dist/react/edges/edgeTypes/SfcDiagramEdge.d.ts +0 -2
- package/dist/react/edges/edgeTypes/SyntaxTreeEdge.d.ts +0 -2
- package/dist/react/edges/edgeTypes/UseCaseDiagramEdge.d.ts +0 -2
- package/dist/react/edges/edgeTypes/index.d.ts +0 -6
- package/dist/react/edges/index.d.ts +0 -3
- package/dist/react/edges/labelTypes/EdgeEndLabels.d.ts +0 -19
- package/dist/react/edges/labelTypes/EdgeIncludeExtendLabel.d.ts +0 -10
- package/dist/react/edges/labelTypes/EdgeMiddleLabels.d.ts +0 -18
- package/dist/react/edges/labelTypes/EdgeMultipleLabels.d.ts +0 -14
- package/dist/react/edges/labelTypes/messageLayout.d.ts +0 -51
- package/dist/react/edges/types.d.ts +0 -153
- package/dist/react/enums/Quadrant.d.ts +0 -6
- package/dist/react/enums/index.d.ts +0 -1
- package/dist/react/export/exportErrors.d.ts +0 -10
- package/dist/react/export/index.d.ts +0 -13
- package/dist/react/export/normalizeExportSvg.d.ts +0 -16
- package/dist/react/export/preProcessSvgForPdf.d.ts +0 -20
- package/dist/react/export/svgToPdf.d.ts +0 -17
- package/dist/react/export/svgToPng.d.ts +0 -38
- package/dist/react/exportFonts-DSRUaduf.js +0 -20
- package/dist/react/exportStyles-yVX7Dykt.js +0 -6
- package/dist/react/fontStack.d.ts +0 -14
- package/dist/react/hooks/index.d.ts +0 -18
- package/dist/react/hooks/useAssessmentSelection.d.ts +0 -13
- package/dist/react/hooks/useConnect.d.ts +0 -7
- package/dist/react/hooks/useDiagramModifiable.d.ts +0 -1
- package/dist/react/hooks/useDragOver.d.ts +0 -2
- package/dist/react/hooks/useDropFeedback.d.ts +0 -7
- package/dist/react/hooks/useEdgeConfig.d.ts +0 -83
- package/dist/react/hooks/useEdgeLineJumps.d.ts +0 -27
- package/dist/react/hooks/useEdgeToolbar.d.ts +0 -6
- package/dist/react/hooks/useEdges.d.ts +0 -9
- package/dist/react/hooks/useElementInteractions.d.ts +0 -6
- package/dist/react/hooks/useGoToNextAssessment.d.ts +0 -1
- package/dist/react/hooks/useHandleDelete.d.ts +0 -1
- package/dist/react/hooks/useHandleFinder.d.ts +0 -11
- package/dist/react/hooks/useHandleOnResize.d.ts +0 -4
- package/dist/react/hooks/useIsOnlyThisElementSelected.d.ts +0 -1
- package/dist/react/hooks/useKeyboardShortcuts.d.ts +0 -1
- package/dist/react/hooks/useNodeDrag.d.ts +0 -2
- package/dist/react/hooks/useNodeDragStop.d.ts +0 -2
- package/dist/react/hooks/usePaneClicked.d.ts +0 -3
- package/dist/react/hooks/usePopoverAnchor.d.ts +0 -26
- package/dist/react/hooks/useReactiveElement.d.ts +0 -10
- package/dist/react/hooks/useReconnect.d.ts +0 -2
- package/dist/react/hooks/useRemoteDraggingNodes.d.ts +0 -20
- package/dist/react/hooks/useSelectionForCopyPaste.d.ts +0 -10
- package/dist/react/hooks/useStepPathEdge.d.ts +0 -62
- package/dist/react/hooks/useStraightPathEdge.d.ts +0 -23
- package/dist/react/hooks/useViewPointCenter.d.ts +0 -2
- package/dist/react/index.d.ts +0 -9
- package/dist/react/internals.d.ts +0 -5
- package/dist/react/logger.d.ts +0 -10
- package/dist/react/nodes/TitleAndDescriptionNode.d.ts +0 -7
- package/dist/react/nodes/activityDiagram/Activity.d.ts +0 -3
- package/dist/react/nodes/activityDiagram/ActivityActionNode.d.ts +0 -3
- package/dist/react/nodes/activityDiagram/ActivityFinalNode.d.ts +0 -3
- package/dist/react/nodes/activityDiagram/ActivityForkNode.d.ts +0 -3
- package/dist/react/nodes/activityDiagram/ActivityForkNodeHorizontal.d.ts +0 -3
- package/dist/react/nodes/activityDiagram/ActivityInitialNode.d.ts +0 -3
- package/dist/react/nodes/activityDiagram/ActivityMergeNode.d.ts +0 -3
- package/dist/react/nodes/activityDiagram/ActivityObjectNode.d.ts +0 -3
- package/dist/react/nodes/activityDiagram/ActivitySwimlane.d.ts +0 -3
- package/dist/react/nodes/activityDiagram/index.d.ts +0 -9
- package/dist/react/nodes/bpmn/BPMNAnnotation.d.ts +0 -3
- package/dist/react/nodes/bpmn/BPMNCallActivity.d.ts +0 -3
- package/dist/react/nodes/bpmn/BPMNDataObject.d.ts +0 -3
- package/dist/react/nodes/bpmn/BPMNDataStore.d.ts +0 -3
- package/dist/react/nodes/bpmn/BPMNEndEvent.d.ts +0 -3
- package/dist/react/nodes/bpmn/BPMNGateway.d.ts +0 -3
- package/dist/react/nodes/bpmn/BPMNGroup.d.ts +0 -3
- package/dist/react/nodes/bpmn/BPMNIntermediateEvent.d.ts +0 -3
- package/dist/react/nodes/bpmn/BPMNPool.d.ts +0 -3
- package/dist/react/nodes/bpmn/BPMNStartEvent.d.ts +0 -3
- package/dist/react/nodes/bpmn/BPMNSubprocess.d.ts +0 -3
- package/dist/react/nodes/bpmn/BPMNTask.d.ts +0 -3
- package/dist/react/nodes/bpmn/BPMNTransaction.d.ts +0 -3
- package/dist/react/nodes/bpmn/index.d.ts +0 -13
- package/dist/react/nodes/classDiagram/Class.d.ts +0 -3
- package/dist/react/nodes/classDiagram/ColorDescription.d.ts +0 -3
- package/dist/react/nodes/classDiagram/Package.d.ts +0 -3
- package/dist/react/nodes/classDiagram/index.d.ts +0 -3
- package/dist/react/nodes/communicationDiagram/CommunicationObjectName.d.ts +0 -3
- package/dist/react/nodes/communicationDiagram/index.d.ts +0 -1
- package/dist/react/nodes/componentDiagram/Component.d.ts +0 -3
- package/dist/react/nodes/componentDiagram/ComponentInterface.d.ts +0 -3
- package/dist/react/nodes/componentDiagram/ComponentSubsystem.d.ts +0 -3
- package/dist/react/nodes/componentDiagram/index.d.ts +0 -3
- package/dist/react/nodes/deploymentDiagram/DeploymentArtifact.d.ts +0 -3
- package/dist/react/nodes/deploymentDiagram/DeploymentComponent.d.ts +0 -3
- package/dist/react/nodes/deploymentDiagram/DeploymentInterface.d.ts +0 -3
- package/dist/react/nodes/deploymentDiagram/DeploymentNode.d.ts +0 -3
- package/dist/react/nodes/deploymentDiagram/index.d.ts +0 -4
- package/dist/react/nodes/flowchart/FlowchartDecision.d.ts +0 -3
- package/dist/react/nodes/flowchart/FlowchartFunctionCall.d.ts +0 -3
- package/dist/react/nodes/flowchart/FlowchartInputOutput.d.ts +0 -3
- package/dist/react/nodes/flowchart/FlowchartProcess.d.ts +0 -3
- package/dist/react/nodes/flowchart/FlowchartTerminal.d.ts +0 -3
- package/dist/react/nodes/flowchart/index.d.ts +0 -5
- package/dist/react/nodes/index.d.ts +0 -8
- package/dist/react/nodes/objectDiagram/ObjectName.d.ts +0 -3
- package/dist/react/nodes/objectDiagram/index.d.ts +0 -1
- package/dist/react/nodes/petriNetDiagram/PetriNetPlace.d.ts +0 -3
- package/dist/react/nodes/petriNetDiagram/PetriNetTransition.d.ts +0 -3
- package/dist/react/nodes/petriNetDiagram/index.d.ts +0 -2
- package/dist/react/nodes/reachabilityGraphDiagram/ReachabilityGraphMarking.d.ts +0 -3
- package/dist/react/nodes/reachabilityGraphDiagram/index.d.ts +0 -1
- package/dist/react/nodes/sfcDiagram/SfcActionTable.d.ts +0 -3
- package/dist/react/nodes/sfcDiagram/SfcJump.d.ts +0 -3
- package/dist/react/nodes/sfcDiagram/SfcStart.d.ts +0 -3
- package/dist/react/nodes/sfcDiagram/SfcStep.d.ts +0 -3
- package/dist/react/nodes/sfcDiagram/SfcTransitionBranch.d.ts +0 -3
- package/dist/react/nodes/sfcDiagram/index.d.ts +0 -5
- package/dist/react/nodes/syntaxTreeDiagram/SyntaxTreeNonterminal.d.ts +0 -3
- package/dist/react/nodes/syntaxTreeDiagram/SyntaxTreeTerminal.d.ts +0 -3
- package/dist/react/nodes/types.d.ts +0 -73
- package/dist/react/nodes/useCaseDiagram/UseCase.d.ts +0 -3
- package/dist/react/nodes/useCaseDiagram/UseCaseActor.d.ts +0 -3
- package/dist/react/nodes/useCaseDiagram/UseCaseSystem.d.ts +0 -3
- package/dist/react/nodes/useCaseDiagram/index.d.ts +0 -3
- package/dist/react/nodes/wrappers/DefaultNodeWrapper.d.ts +0 -49
- package/dist/react/nodes/wrappers/index.d.ts +0 -1
- package/dist/react/overlay/OverlayLayer.d.ts +0 -8
- package/dist/react/overlay/RegionMount.d.ts +0 -10
- package/dist/react/overlay/overlayStore.d.ts +0 -20
- package/dist/react/overlay/types.d.ts +0 -48
- package/dist/react/react.d.ts +0 -5
- package/dist/react/react.js +0 -28177
- package/dist/react/services/migration/EdgeTransformer.d.ts +0 -11
- package/dist/react/store/alignmentGuidesStore.d.ts +0 -13
- package/dist/react/store/assessmentSelectionStore.d.ts +0 -17
- package/dist/react/store/context.d.ts +0 -22
- package/dist/react/store/diagramStore.d.ts +0 -70
- package/dist/react/store/edgeGeometryStore.d.ts +0 -18
- package/dist/react/store/index.d.ts +0 -7
- package/dist/react/store/metadataStore.d.ts +0 -39
- package/dist/react/store/popoverStore.d.ts +0 -9
- package/dist/react/styles/theme.d.ts +0 -51
- package/dist/react/sync/headless.d.ts +0 -16
- package/dist/react/sync/perfCounters.d.ts +0 -6
- package/dist/react/sync/ydoc.d.ts +0 -9
- package/dist/react/sync/yjsSync.d.ts +0 -63
- package/dist/react/types/DiagramType.d.ts +0 -16
- package/dist/react/types/SVG.d.ts +0 -8
- package/dist/react/types/index.d.ts +0 -3
- package/dist/react/types/locationPopover.d.ts +0 -5
- package/dist/react/types/nodes/DropNodeDate.d.ts +0 -7
- package/dist/react/types/nodes/NodeProps.d.ts +0 -101
- package/dist/react/types/nodes/enums/ClassType.d.ts +0 -5
- package/dist/react/types/nodes/enums/index.d.ts +0 -1
- package/dist/react/types/nodes/index.d.ts +0 -3
- package/dist/react/typings.d.ts +0 -186
- package/dist/react/utils/alignmentUtils.d.ts +0 -32
- package/dist/react/utils/bpmnConstraints.d.ts +0 -5
- package/dist/react/utils/collaboration.d.ts +0 -19
- package/dist/react/utils/copyPasteUtils.d.ts +0 -32
- package/dist/react/utils/deepPartial.d.ts +0 -3
- package/dist/react/utils/diagramTypeUtils.d.ts +0 -6
- package/dist/react/utils/edgeUtils.d.ts +0 -167
- package/dist/react/utils/exportFonts.d.ts +0 -11
- package/dist/react/utils/exportStyles.d.ts +0 -30
- package/dist/react/utils/exportUtils.d.ts +0 -11
- package/dist/react/utils/geometry/bendHandles.d.ts +0 -42
- package/dist/react/utils/geometry/edgeLabelLayout.d.ts +0 -123
- package/dist/react/utils/geometry/interfaceLabelLayout.d.ts +0 -44
- package/dist/react/utils/helpers.d.ts +0 -14
- package/dist/react/utils/index.d.ts +0 -19
- package/dist/react/utils/interactiveUtils.d.ts +0 -6
- package/dist/react/utils/layoutUtils.d.ts +0 -30
- package/dist/react/utils/nodeUtils.d.ts +0 -15
- package/dist/react/utils/paletteLayout.d.ts +0 -70
- package/dist/react/utils/pathParsing.d.ts +0 -54
- package/dist/react/utils/popoverUtils.d.ts +0 -3
- package/dist/react/utils/quadrantUtils.d.ts +0 -3
- package/dist/react/utils/requiredInterfaceUtils.d.ts +0 -18
- package/dist/react/utils/storeUtils.d.ts +0 -1
- package/dist/react/utils/svgTextLayout.d.ts +0 -86
- package/dist/react/utils/swimlaneUtils.d.ts +0 -58
- package/dist/react/utils/textUtils.d.ts +0 -1
- package/dist/react/utils/v3Typings.d.ts +0 -135
- package/dist/react/utils/versionConverter.d.ts +0 -60
- package/dist/yjsSync-BCNFF_EI.js +0 -45418
|
@@ -0,0 +1,4769 @@
|
|
|
1
|
+
import { t as e } from "./fontStack-BKkvgDI3.js";
|
|
2
|
+
import { createContext as t, useCallback as n, useContext as r, useMemo as i, useState as a } from "react";
|
|
3
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
|
+
import { layoutNextLineRange as l, layoutWithLines as u, materializeLineRange as d, measureNaturalWidth as f, prepareWithSegments as p } from "@chenglou/pretext";
|
|
5
|
+
import { useStore as m } from "zustand";
|
|
6
|
+
import { useShallow as h } from "zustand/shallow";
|
|
7
|
+
import { Check as g, TriangleAlert as _, X as v } from "lucide-react";
|
|
8
|
+
import * as y from "yjs";
|
|
9
|
+
import { Awareness as b, applyAwarenessUpdate as x, encodeAwarenessUpdate as S } from "y-protocols/awareness";
|
|
10
|
+
//#region lib/types/DiagramType.ts
|
|
11
|
+
var C = {
|
|
12
|
+
ClassDiagram: "ClassDiagram",
|
|
13
|
+
ObjectDiagram: "ObjectDiagram",
|
|
14
|
+
ActivityDiagram: "ActivityDiagram",
|
|
15
|
+
UseCaseDiagram: "UseCaseDiagram",
|
|
16
|
+
CommunicationDiagram: "CommunicationDiagram",
|
|
17
|
+
ComponentDiagram: "ComponentDiagram",
|
|
18
|
+
DeploymentDiagram: "DeploymentDiagram",
|
|
19
|
+
PetriNet: "PetriNet",
|
|
20
|
+
ReachabilityGraph: "ReachabilityGraph",
|
|
21
|
+
SyntaxTree: "SyntaxTree",
|
|
22
|
+
Flowchart: "Flowchart",
|
|
23
|
+
BPMN: "BPMN",
|
|
24
|
+
Sfc: "Sfc"
|
|
25
|
+
}, w = /* @__PURE__ */ function(e) {
|
|
26
|
+
return e.en = "en", e.de = "de", e;
|
|
27
|
+
}({}), T = /* @__PURE__ */ function(e) {
|
|
28
|
+
return e.Modelling = "Modelling", e.Exporting = "Exporting", e.Assessment = "Assessment", e;
|
|
29
|
+
}({}), E = /* @__PURE__ */ function(e) {
|
|
30
|
+
return e.Modelling = "Modelling", e.Exporting = "Exporting", e.Highlight = "Highlight", e;
|
|
31
|
+
}({}), D = ({ children: t, fill: n = "var(--apollon-primary-contrast, #000000)", x: r = "50%", y: i = "50%", dominantBaseline: a = "central", textAnchor: o = "middle", fontWeight: c = "400", fontFamily: l = e, pointerEvents: u = "none", noX: d = !1, noY: f = !1, ...p }) => {
|
|
32
|
+
let m = {};
|
|
33
|
+
return d || (m.x = r), f || (m.y = i), /* @__PURE__ */ s("text", {
|
|
34
|
+
...m,
|
|
35
|
+
fill: n,
|
|
36
|
+
dominantBaseline: a,
|
|
37
|
+
textAnchor: o,
|
|
38
|
+
fontWeight: c,
|
|
39
|
+
fontFamily: l,
|
|
40
|
+
pointerEvents: u,
|
|
41
|
+
...p,
|
|
42
|
+
children: t
|
|
43
|
+
});
|
|
44
|
+
}, O = e, ee = (e) => {
|
|
45
|
+
let t = e.fontWeight ?? 400, n = e.fontStyle ?? "normal", r = e.fontFamily ?? O;
|
|
46
|
+
return `${n} ${t} ${e.fontSize}px ${r}`;
|
|
47
|
+
}, k = /* @__PURE__ */ new Map(), te = 256, ne = (e, t, n) => {
|
|
48
|
+
let r = `${n}${t}${e}`, i = k.get(r);
|
|
49
|
+
if (i) return k.delete(r), k.set(r, i), i;
|
|
50
|
+
let a = p(e, t, { whiteSpace: n });
|
|
51
|
+
if (k.size >= te) {
|
|
52
|
+
let e = k.keys().next().value;
|
|
53
|
+
e !== void 0 && k.delete(e);
|
|
54
|
+
}
|
|
55
|
+
return k.set(r, a), a;
|
|
56
|
+
}, re = () => {
|
|
57
|
+
k.clear();
|
|
58
|
+
}, A = (e, t) => Math.max(1, Math.floor(e / t));
|
|
59
|
+
typeof document < "u" && document.fonts && document.fonts.ready.then(re).catch(() => {});
|
|
60
|
+
var ie = (e, t, n, r = {}) => {
|
|
61
|
+
let i = e ?? "";
|
|
62
|
+
if (!i) return {
|
|
63
|
+
lines: [],
|
|
64
|
+
maxLineWidth: 0,
|
|
65
|
+
overflow: !1
|
|
66
|
+
};
|
|
67
|
+
let a = typeof n == "string" ? n : ee(n), o = r.lineHeight ?? (typeof n == "string" ? 16 : Math.round(n.fontSize * 1.2)), s = r.whiteSpace ?? "pre-wrap", c = Math.max(1, t);
|
|
68
|
+
try {
|
|
69
|
+
let e = u(ne(i, a, s), c, o), t = e.lines.map((e) => e.text), n = e.lines.reduce((e, t) => Math.max(e, t.width), 0), l = !1;
|
|
70
|
+
return r.maxLines !== void 0 && t.length > r.maxLines && (t = t.slice(0, r.maxLines), n = e.lines.slice(0, r.maxLines).reduce((e, t) => Math.max(e, t.width), 0), l = !0), {
|
|
71
|
+
lines: t,
|
|
72
|
+
maxLineWidth: n,
|
|
73
|
+
overflow: l
|
|
74
|
+
};
|
|
75
|
+
} catch {
|
|
76
|
+
return {
|
|
77
|
+
lines: s === "pre-wrap" ? i.split(/\r?\n/) : [i],
|
|
78
|
+
maxLineWidth: c,
|
|
79
|
+
overflow: !1
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}, ae = (e, t, n) => {
|
|
83
|
+
let r = Math.min(Math.abs(e), t) / t, i = Math.sqrt(Math.max(0, 1 - r * r));
|
|
84
|
+
return 2 * n * i;
|
|
85
|
+
}, oe = (e, t, n) => {
|
|
86
|
+
let r = 1 - Math.min(Math.abs(e), t) / t;
|
|
87
|
+
return 2 * n * Math.max(0, r);
|
|
88
|
+
}, se = "…", ce = (e, t, n, r, i, a, o) => {
|
|
89
|
+
let s = typeof r == "string" ? r : ee(r), c = o.paddingX ?? 0, u = o.paddingY ?? 0, p = o.maxLines ?? 32, m = o.whiteSpace ?? "pre-wrap", h = {
|
|
90
|
+
lines: [],
|
|
91
|
+
lineHeight: i,
|
|
92
|
+
lineOffsets: [],
|
|
93
|
+
blockHeight: 0,
|
|
94
|
+
overflow: !1
|
|
95
|
+
}, g = (e) => {
|
|
96
|
+
let n = m === "pre-wrap" ? e.split(/\r?\n/) : [e], r = Math.max(0, t - 2 * c), a = n.length, o = -(a * i) / 2;
|
|
97
|
+
return {
|
|
98
|
+
lines: n.map((e) => ({
|
|
99
|
+
text: e,
|
|
100
|
+
width: r
|
|
101
|
+
})),
|
|
102
|
+
lineHeight: i,
|
|
103
|
+
lineOffsets: n.map((e, t) => o + (t + .5) * i),
|
|
104
|
+
blockHeight: a * i,
|
|
105
|
+
overflow: !1
|
|
106
|
+
};
|
|
107
|
+
}, _ = e ?? "";
|
|
108
|
+
if (!_) return h;
|
|
109
|
+
let v = Math.max(0, t / 2 - c), y = Math.max(0, n / 2 - u);
|
|
110
|
+
if (v <= 0 || y <= 0) return h;
|
|
111
|
+
let b;
|
|
112
|
+
try {
|
|
113
|
+
b = ne(_, s, m);
|
|
114
|
+
} catch {
|
|
115
|
+
return g(_);
|
|
116
|
+
}
|
|
117
|
+
let x = Math.max(1, Math.floor(2 * y / i)), S = Math.min(x, p), C = (e) => l(b, e, v * 2) === null, w = (e) => {
|
|
118
|
+
let t = -(e * i) / 2;
|
|
119
|
+
return Array.from({ length: e }, (e, n) => t + (n + .5) * i);
|
|
120
|
+
}, T = null;
|
|
121
|
+
for (let e = 1; e <= S; e++) {
|
|
122
|
+
let t = -(e * i) / 2, n = Array(e);
|
|
123
|
+
for (let r = 0; r < e; r++) {
|
|
124
|
+
let e = t + r * i, o = e + i;
|
|
125
|
+
n[r] = a(Math.max(Math.abs(e), Math.abs(o)), y, v);
|
|
126
|
+
}
|
|
127
|
+
if (n.some((e) => e <= 0)) break;
|
|
128
|
+
let r = {
|
|
129
|
+
segmentIndex: 0,
|
|
130
|
+
graphemeIndex: 0
|
|
131
|
+
}, o = [];
|
|
132
|
+
for (let t = 0; t < e; t++) {
|
|
133
|
+
let e = l(b, r, n[t]);
|
|
134
|
+
if (e === null) break;
|
|
135
|
+
o.push(d(b, e)), r = e.end;
|
|
136
|
+
}
|
|
137
|
+
if (o.length < e || C(r)) return {
|
|
138
|
+
lines: o.map((e) => ({
|
|
139
|
+
text: e.text,
|
|
140
|
+
width: e.width
|
|
141
|
+
})),
|
|
142
|
+
lineHeight: i,
|
|
143
|
+
lineOffsets: w(o.length),
|
|
144
|
+
blockHeight: o.length * i,
|
|
145
|
+
overflow: !1
|
|
146
|
+
};
|
|
147
|
+
T = o;
|
|
148
|
+
}
|
|
149
|
+
if (T && T.length > 0) {
|
|
150
|
+
let e = T.map((e) => ({
|
|
151
|
+
text: e.text,
|
|
152
|
+
width: e.width
|
|
153
|
+
})), t = e[e.length - 1];
|
|
154
|
+
return t.text = `${t.text.trimEnd()}${se}`, {
|
|
155
|
+
lines: e,
|
|
156
|
+
lineHeight: i,
|
|
157
|
+
lineOffsets: w(T.length),
|
|
158
|
+
blockHeight: T.length * i,
|
|
159
|
+
overflow: !0
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
let E = Math.min(f(b), v * 2), D = l(b, {
|
|
163
|
+
segmentIndex: 0,
|
|
164
|
+
graphemeIndex: 0
|
|
165
|
+
}, E);
|
|
166
|
+
if (!D) return h;
|
|
167
|
+
let O = d(b, D);
|
|
168
|
+
return {
|
|
169
|
+
lines: [{
|
|
170
|
+
text: O.text,
|
|
171
|
+
width: O.width
|
|
172
|
+
}],
|
|
173
|
+
lineHeight: i,
|
|
174
|
+
lineOffsets: [0],
|
|
175
|
+
blockHeight: i,
|
|
176
|
+
overflow: !C(D.end)
|
|
177
|
+
};
|
|
178
|
+
}, le = (e, t, n, r, i, a = {}) => ce(e, t, n, r, i, ae, a), ue = (e, t, n, r, i, a = {}) => ce(e, t, n, r, i, oe, a), de = e, j = ({ text: e, x: t, y: n, maxWidth: r, fontSize: a, fontWeight: o = 400, fontFamily: c = de, fontStyle: l, lineHeight: u, verticalAnchor: d = "middle", textAnchor: f = "middle", fill: p = "var(--apollon-primary-contrast, #000000)", maxLines: m, pointerEvents: h = "none", ...g }) => {
|
|
179
|
+
let _ = u ?? Math.round(a * 1.2), v = i(() => ({
|
|
180
|
+
fontSize: a,
|
|
181
|
+
fontWeight: o,
|
|
182
|
+
fontFamily: c,
|
|
183
|
+
fontStyle: l
|
|
184
|
+
}), [
|
|
185
|
+
a,
|
|
186
|
+
o,
|
|
187
|
+
c,
|
|
188
|
+
l
|
|
189
|
+
]), y = i(() => ie(e, r, v, {
|
|
190
|
+
lineHeight: _,
|
|
191
|
+
maxLines: m
|
|
192
|
+
}), [
|
|
193
|
+
e,
|
|
194
|
+
r,
|
|
195
|
+
v,
|
|
196
|
+
_,
|
|
197
|
+
m
|
|
198
|
+
]);
|
|
199
|
+
if (!e || y.lines.length === 0) return null;
|
|
200
|
+
let b = y.overflow && y.lines.length > 0 ? y.lines.map((e, t) => t === y.lines.length - 1 ? `${e.trimEnd()}…` : e) : y.lines, x = b.length, S;
|
|
201
|
+
S = d === "top" ? n : d === "bottom" ? n - (x - 1) * _ : n - (x - 1) * _ / 2;
|
|
202
|
+
let C = e.trim() ? e : void 0, w = /* @__PURE__ */ s("text", {
|
|
203
|
+
x: t,
|
|
204
|
+
y: n,
|
|
205
|
+
textAnchor: f,
|
|
206
|
+
dominantBaseline: "middle",
|
|
207
|
+
fontSize: a,
|
|
208
|
+
fontWeight: o,
|
|
209
|
+
fontFamily: c,
|
|
210
|
+
fontStyle: l,
|
|
211
|
+
fill: p,
|
|
212
|
+
pointerEvents: h,
|
|
213
|
+
...g,
|
|
214
|
+
children: b.map((e, n) => /* @__PURE__ */ s("tspan", {
|
|
215
|
+
x: t,
|
|
216
|
+
y: S + n * _,
|
|
217
|
+
"aria-hidden": "true",
|
|
218
|
+
children: e
|
|
219
|
+
}, n))
|
|
220
|
+
});
|
|
221
|
+
return C ? /* @__PURE__ */ s("g", {
|
|
222
|
+
role: "img",
|
|
223
|
+
"aria-label": C,
|
|
224
|
+
children: w
|
|
225
|
+
}) : w;
|
|
226
|
+
}, fe = t(null), pe = t(null), me = t(null), he = t(null), ge = t(null), _e = t(null), ve = t(null), M = (e) => {
|
|
227
|
+
let t = r(fe);
|
|
228
|
+
if (!t) throw Error("DiagramStoreContext not provided");
|
|
229
|
+
return m(t, e);
|
|
230
|
+
}, N = (e) => {
|
|
231
|
+
let t = r(pe);
|
|
232
|
+
if (!t) throw Error("MetadataStoreContext not provided");
|
|
233
|
+
return m(t, e);
|
|
234
|
+
}, ye = (e) => {
|
|
235
|
+
let t = r(me);
|
|
236
|
+
if (!t) throw Error("PopoverStoreContext not provided");
|
|
237
|
+
return m(t, e);
|
|
238
|
+
}, be = (e) => {
|
|
239
|
+
let t = r(he);
|
|
240
|
+
if (!t) throw Error("AssessmentSelectionStoreContext not provided");
|
|
241
|
+
return m(t, e);
|
|
242
|
+
}, xe = (e) => {
|
|
243
|
+
let t = r(ge);
|
|
244
|
+
if (!t) throw Error("AlignmentGuidesStoreContext not provided");
|
|
245
|
+
return m(t, e);
|
|
246
|
+
}, Se = (e) => {
|
|
247
|
+
let t = r(_e);
|
|
248
|
+
if (!t) throw Error("EdgeGeometryStoreContext not provided");
|
|
249
|
+
return m(t, e);
|
|
250
|
+
}, Ce = (e) => {
|
|
251
|
+
let t = r(ve);
|
|
252
|
+
if (!t) throw Error("OverlayStoreContext not provided");
|
|
253
|
+
return m(t, e);
|
|
254
|
+
}, P = ({ score: e, x: t, y: n }) => {
|
|
255
|
+
if (e === void 0) return null;
|
|
256
|
+
let r = t + 14, i = n + 14, a = e > 0 ? "positive" : e < 0 ? "negative" : "zero", o = e > 0 ? g : e < 0 ? v : _, l = `var(--apollon-assessment-${a}-text)`;
|
|
257
|
+
return /* @__PURE__ */ c("g", {
|
|
258
|
+
className: "apollon-assessment-icon",
|
|
259
|
+
children: [/* @__PURE__ */ s("circle", {
|
|
260
|
+
cx: r,
|
|
261
|
+
cy: i,
|
|
262
|
+
r: 14,
|
|
263
|
+
fill: `var(--apollon-assessment-${a}-bg)`,
|
|
264
|
+
stroke: l,
|
|
265
|
+
strokeWidth: 1.5
|
|
266
|
+
}), /* @__PURE__ */ s(o, {
|
|
267
|
+
width: 17,
|
|
268
|
+
height: 17,
|
|
269
|
+
x: r - 17 / 2,
|
|
270
|
+
y: i - 17 / 2,
|
|
271
|
+
color: l,
|
|
272
|
+
strokeWidth: 2.5
|
|
273
|
+
})]
|
|
274
|
+
});
|
|
275
|
+
}, we = (e, t) => {
|
|
276
|
+
let n = e + 2 * t;
|
|
277
|
+
return Math.ceil(n / q.EXTRA_SPACE_FOR_EXTENSION) * q.EXTRA_SPACE_FOR_EXTENSION;
|
|
278
|
+
}, Te = (e, t, n, r, i) => {
|
|
279
|
+
let a = e + t * r + n * i;
|
|
280
|
+
return Math.ceil(a / q.EXTRA_SPACE_FOR_EXTENSION) * q.EXTRA_SPACE_FOR_EXTENSION;
|
|
281
|
+
}, Ee = "var(--apollon-primary-contrast, #000000)", De = "var(--apollon-background, #ffffff)", F = (e) => ({
|
|
282
|
+
strokeColor: e.strokeColor || Ee,
|
|
283
|
+
fillColor: e.fillColor || De,
|
|
284
|
+
textColor: e.textColor || Ee
|
|
285
|
+
}), Oe = (e) => ({
|
|
286
|
+
strokeColor: e?.strokeColor || Ee,
|
|
287
|
+
textColor: e?.textColor || Ee
|
|
288
|
+
}), ke = (e) => {
|
|
289
|
+
let { isAssessmentSelectionMode: t, highlightedElementId: n, selectedElementIds: r } = be(h((e) => ({
|
|
290
|
+
isAssessmentSelectionMode: e.isAssessmentSelectionMode,
|
|
291
|
+
highlightedElementId: e.highlightedElementId,
|
|
292
|
+
selectedElementIds: e.selectedElementIds
|
|
293
|
+
}))), { selectElement: a, setHighlightedElement: o, selectMultipleElements: s } = be(h((e) => ({
|
|
294
|
+
selectElement: e.selectElement,
|
|
295
|
+
setHighlightedElement: e.setHighlightedElement,
|
|
296
|
+
selectMultipleElements: e.selectMultipleElements
|
|
297
|
+
}))), { nodes: c } = M(h((e) => ({ nodes: e.nodes }))), { mode: l, readonly: u } = N(h((e) => ({
|
|
298
|
+
mode: e.mode,
|
|
299
|
+
readonly: e.readonly
|
|
300
|
+
}))), d = i(() => l === T.Assessment && u, [l, u]), f = (e) => {
|
|
301
|
+
let t = [], n = c.filter((t) => t.parentId === e);
|
|
302
|
+
for (let e of n) t.push(e), t.push(...f(e.id));
|
|
303
|
+
return t;
|
|
304
|
+
}, p = (e) => {
|
|
305
|
+
let t = c.find((t) => t.id === e);
|
|
306
|
+
if (!t) return [];
|
|
307
|
+
let n = [];
|
|
308
|
+
t.data && "attributes" in t.data && Array.isArray(t.data.attributes) && n.push(...t.data.attributes.map((e) => e.id)), t.data && "methods" in t.data && Array.isArray(t.data.methods) && n.push(...t.data.methods.map((e) => e.id));
|
|
309
|
+
let r = f(e);
|
|
310
|
+
for (let e of r) n.push(e.id), n.push(...p(e.id));
|
|
311
|
+
return n;
|
|
312
|
+
};
|
|
313
|
+
return {
|
|
314
|
+
isSelected: r.includes(e),
|
|
315
|
+
isHighlighted: n === e,
|
|
316
|
+
showAssessmentInteraction: d && t,
|
|
317
|
+
handleElementClick: (n) => {
|
|
318
|
+
if (!(!d || !t) && (n.stopPropagation(), n.preventDefault(), a(e), c.find((t) => t.id === e))) {
|
|
319
|
+
let t = p(e);
|
|
320
|
+
t.length > 0 && s([e, ...t]);
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
handleElementMouseEnter: () => {
|
|
324
|
+
!d || !t || o(e);
|
|
325
|
+
},
|
|
326
|
+
handleElementMouseLeave: () => {
|
|
327
|
+
!d || !t || o(null);
|
|
328
|
+
},
|
|
329
|
+
isReadonlyAssessmentMode: d,
|
|
330
|
+
isAssessmentSelectionMode: t
|
|
331
|
+
};
|
|
332
|
+
}, Ae = ({ elementId: e, elementType: t = "default" }) => {
|
|
333
|
+
let { setAssessments: r } = M(h((e) => ({ setAssessments: e.setAssessments })));
|
|
334
|
+
return n((n) => {
|
|
335
|
+
n.preventDefault(), n.stopPropagation();
|
|
336
|
+
let i = n.dataTransfer.getData("text/plain"), a = JSON.parse(i), o = {
|
|
337
|
+
modelElementId: e,
|
|
338
|
+
elementType: t,
|
|
339
|
+
score: a.credits,
|
|
340
|
+
feedback: a.feedback,
|
|
341
|
+
dropInfo: a,
|
|
342
|
+
correctionStatus: { status: "NOT_VALIDATED" }
|
|
343
|
+
};
|
|
344
|
+
r((t) => ({
|
|
345
|
+
...t,
|
|
346
|
+
[e]: o
|
|
347
|
+
}));
|
|
348
|
+
}, [e, t]);
|
|
349
|
+
}, je = ({ children: e, elementId: t, elementType: n, asElement: r = "g", className: i }) => {
|
|
350
|
+
let { mode: c, readonly: l } = N(h((e) => ({
|
|
351
|
+
mode: e.mode,
|
|
352
|
+
readonly: e.readonly
|
|
353
|
+
}))), [u, d] = a(!1), f = Ae({
|
|
354
|
+
elementId: t,
|
|
355
|
+
elementType: n
|
|
356
|
+
});
|
|
357
|
+
if (!(c === T.Assessment && !l)) return /* @__PURE__ */ s(o, { children: e });
|
|
358
|
+
let p = (e) => {
|
|
359
|
+
e.preventDefault(), e.stopPropagation(), d(!0);
|
|
360
|
+
}, m = (e) => {
|
|
361
|
+
e.preventDefault(), d(!1);
|
|
362
|
+
}, g = (e) => {
|
|
363
|
+
e.preventDefault(), e.stopPropagation(), e.dataTransfer.dropEffect = "move", u || d(!0);
|
|
364
|
+
}, _ = (e) => {
|
|
365
|
+
e.preventDefault(), e.stopPropagation(), d(!1), f(e);
|
|
366
|
+
}, v = (() => {
|
|
367
|
+
if (u) return r === "path" ? { stroke: "var(--apollon-dropzone-accent, #0064ff)" } : { outline: "3px solid var(--apollon-dropzone-accent-fill, rgba(0, 100, 255, 0.4))" };
|
|
368
|
+
})();
|
|
369
|
+
return r === "div" ? /* @__PURE__ */ s("div", {
|
|
370
|
+
id: t,
|
|
371
|
+
onDrop: _,
|
|
372
|
+
onDragEnter: p,
|
|
373
|
+
onDragLeave: m,
|
|
374
|
+
onDragOver: g,
|
|
375
|
+
style: v,
|
|
376
|
+
className: i,
|
|
377
|
+
children: e
|
|
378
|
+
}) : /* @__PURE__ */ s("g", {
|
|
379
|
+
id: t,
|
|
380
|
+
onDrop: _,
|
|
381
|
+
onDragEnter: p,
|
|
382
|
+
onDragLeave: m,
|
|
383
|
+
onDragOver: g,
|
|
384
|
+
style: v,
|
|
385
|
+
children: e
|
|
386
|
+
});
|
|
387
|
+
}, I = /* @__PURE__ */ function(e) {
|
|
388
|
+
return e.Abstract = "Abstract", e.Interface = "Interface", e.Enumeration = "Enumeration", e;
|
|
389
|
+
}({}), Me = () => {}, L = {
|
|
390
|
+
error: Me,
|
|
391
|
+
warn: Me,
|
|
392
|
+
debug: Me
|
|
393
|
+
}, R = "silent";
|
|
394
|
+
function Ne(e) {
|
|
395
|
+
L = {
|
|
396
|
+
...L,
|
|
397
|
+
...e
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
function Pe(e) {
|
|
401
|
+
R = e;
|
|
402
|
+
}
|
|
403
|
+
var Fe = {
|
|
404
|
+
debug: (...e) => R === "debug" ? L.debug(...e) : void 0,
|
|
405
|
+
warn: (...e) => R === "debug" || R === "warn" ? L.warn(...e) : void 0,
|
|
406
|
+
error: (...e) => R === "silent" ? void 0 : L.error(...e)
|
|
407
|
+
}, Ie = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
408
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(r);
|
|
409
|
+
return /* @__PURE__ */ c("svg", {
|
|
410
|
+
width: d,
|
|
411
|
+
height: f,
|
|
412
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
413
|
+
overflow: "visible",
|
|
414
|
+
...i,
|
|
415
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s(V, {
|
|
416
|
+
x: 0,
|
|
417
|
+
y: 0,
|
|
418
|
+
width: t,
|
|
419
|
+
height: n,
|
|
420
|
+
rx: 10,
|
|
421
|
+
ry: 10,
|
|
422
|
+
fill: p,
|
|
423
|
+
stroke: m
|
|
424
|
+
}), /* @__PURE__ */ s(j, {
|
|
425
|
+
text: l,
|
|
426
|
+
x: t / 2,
|
|
427
|
+
y: 22,
|
|
428
|
+
maxWidth: t - 24,
|
|
429
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
430
|
+
fontWeight: "600",
|
|
431
|
+
fill: g,
|
|
432
|
+
verticalAnchor: "top",
|
|
433
|
+
maxLines: A(n - 28, Y.NAME_LINE_HEIGHT)
|
|
434
|
+
})] }), o && /* @__PURE__ */ s(P, {
|
|
435
|
+
x: t - 15,
|
|
436
|
+
y: -15,
|
|
437
|
+
score: u
|
|
438
|
+
})]
|
|
439
|
+
});
|
|
440
|
+
}, z = ({ y: e, width: t, strokeColor: n = "var(--apollon-primary-contrast, #000000)" }) => /* @__PURE__ */ s("line", {
|
|
441
|
+
x1: "0",
|
|
442
|
+
x2: t,
|
|
443
|
+
y1: e,
|
|
444
|
+
y2: e,
|
|
445
|
+
stroke: n,
|
|
446
|
+
strokeWidth: Y.LINE_WIDTH
|
|
447
|
+
}), Le = ({ showStereotype: e, stereotype: t, name: n, width: r, headerHeight: i, isUnderlined: a = !1, textColor: l, fill: u = "var(--apollon-background, white)" }) => /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("rect", {
|
|
448
|
+
x: Y.LINE_WIDTH / 2,
|
|
449
|
+
y: Y.LINE_WIDTH / 2,
|
|
450
|
+
width: r - Y.LINE_WIDTH,
|
|
451
|
+
height: i - Y.LINE_WIDTH / 2,
|
|
452
|
+
fill: u
|
|
453
|
+
}), /* @__PURE__ */ c(D, {
|
|
454
|
+
x: r / 2,
|
|
455
|
+
y: i / 2,
|
|
456
|
+
dominantBaseline: "middle",
|
|
457
|
+
textAnchor: "middle",
|
|
458
|
+
fontWeight: "bold",
|
|
459
|
+
textDecoration: a ? "underline" : "normal",
|
|
460
|
+
fill: l,
|
|
461
|
+
children: [e && /* @__PURE__ */ s("tspan", {
|
|
462
|
+
x: r / 2,
|
|
463
|
+
dy: "-8",
|
|
464
|
+
fontSize: "85%",
|
|
465
|
+
children: `«${t}»`
|
|
466
|
+
}), /* @__PURE__ */ s("tspan", {
|
|
467
|
+
x: r / 2,
|
|
468
|
+
dy: e ? "18" : "0",
|
|
469
|
+
fontStyle: t === I.Abstract ? "italic" : "normal",
|
|
470
|
+
children: n
|
|
471
|
+
})]
|
|
472
|
+
})] }), Re = ({ elementId: e, width: t, itemHeight: n, yOffset: r = 0, children: i }) => {
|
|
473
|
+
let { mode: a, readonly: o, view: l } = N(h((e) => ({
|
|
474
|
+
mode: e.mode,
|
|
475
|
+
readonly: e.readonly,
|
|
476
|
+
view: e.view
|
|
477
|
+
}))), { isInteractiveSelected: u, toggleInteractiveElement: d } = M(h((t) => ({
|
|
478
|
+
isInteractiveSelected: t.interactiveElements[e] || t.interactiveRelationships[e] || !1,
|
|
479
|
+
toggleInteractiveElement: t.toggleInteractiveElement
|
|
480
|
+
}))), { isSelected: f, isHighlighted: p, showAssessmentInteraction: m, handleElementClick: g, handleElementMouseEnter: _, handleElementMouseLeave: v } = ke(e), y = be((t) => t.highlightedElements[e]), b = y ? /* @__PURE__ */ s("rect", {
|
|
481
|
+
"aria-hidden": !0,
|
|
482
|
+
x: 0,
|
|
483
|
+
y: r,
|
|
484
|
+
width: t,
|
|
485
|
+
height: n,
|
|
486
|
+
fill: y,
|
|
487
|
+
stroke: y,
|
|
488
|
+
strokeWidth: 1,
|
|
489
|
+
rx: 2,
|
|
490
|
+
pointerEvents: "none"
|
|
491
|
+
}) : null;
|
|
492
|
+
return a === T.Modelling && l === E.Highlight && !o ? /* @__PURE__ */ c("g", {
|
|
493
|
+
className: "nodrag nopan",
|
|
494
|
+
"data-apollon-element-id": e,
|
|
495
|
+
style: { cursor: "pointer" },
|
|
496
|
+
onPointerDown: (t) => {
|
|
497
|
+
t.stopPropagation(), t.preventDefault(), d(e);
|
|
498
|
+
},
|
|
499
|
+
children: [i, u && /* @__PURE__ */ s("rect", {
|
|
500
|
+
x: 0,
|
|
501
|
+
y: r,
|
|
502
|
+
width: t,
|
|
503
|
+
height: n,
|
|
504
|
+
fill: mn,
|
|
505
|
+
fillOpacity: .18,
|
|
506
|
+
stroke: mn,
|
|
507
|
+
strokeWidth: 2,
|
|
508
|
+
rx: 2,
|
|
509
|
+
pointerEvents: "none"
|
|
510
|
+
})]
|
|
511
|
+
}) : m ? /* @__PURE__ */ c("g", {
|
|
512
|
+
className: "nodrag nopan",
|
|
513
|
+
"data-apollon-element-id": e,
|
|
514
|
+
style: { cursor: m ? "pointer" : "default" },
|
|
515
|
+
onPointerDown: (e) => {
|
|
516
|
+
g(e);
|
|
517
|
+
},
|
|
518
|
+
onMouseEnter: _,
|
|
519
|
+
onMouseLeave: v,
|
|
520
|
+
children: [
|
|
521
|
+
i,
|
|
522
|
+
(f || p) && /* @__PURE__ */ s("rect", {
|
|
523
|
+
x: 0,
|
|
524
|
+
y: r,
|
|
525
|
+
width: t,
|
|
526
|
+
height: n,
|
|
527
|
+
fill: f ? hn : gn,
|
|
528
|
+
stroke: f ? mn : _n,
|
|
529
|
+
strokeWidth: f ? 2 : 1,
|
|
530
|
+
rx: 2,
|
|
531
|
+
pointerEvents: "none"
|
|
532
|
+
}),
|
|
533
|
+
b
|
|
534
|
+
]
|
|
535
|
+
}) : /* @__PURE__ */ c("g", {
|
|
536
|
+
"data-apollon-element-id": e,
|
|
537
|
+
children: [i, b]
|
|
538
|
+
});
|
|
539
|
+
}, B = ({ items: e, padding: t, itemHeight: n, offsetFromTop: r, width: i, showAssessmentResults: a = !1, itemElementType: o }) => /* @__PURE__ */ s("g", {
|
|
540
|
+
transform: `translate(0, ${r})`,
|
|
541
|
+
children: e.map((e, r) => {
|
|
542
|
+
let l = r * n, u = l - 12, d = i - 15, { fillColor: f, textColor: p } = F(e);
|
|
543
|
+
return /* @__PURE__ */ c(Re, {
|
|
544
|
+
elementId: e.id,
|
|
545
|
+
width: i,
|
|
546
|
+
itemHeight: n,
|
|
547
|
+
yOffset: l,
|
|
548
|
+
children: [/* @__PURE__ */ c(je, {
|
|
549
|
+
elementId: e.id,
|
|
550
|
+
elementType: o,
|
|
551
|
+
children: [/* @__PURE__ */ s("rect", {
|
|
552
|
+
x: Y.LINE_WIDTH / 2,
|
|
553
|
+
y: l + Y.LINE_WIDTH / 2,
|
|
554
|
+
width: i - Y.LINE_WIDTH,
|
|
555
|
+
height: n - Y.LINE_WIDTH,
|
|
556
|
+
fill: f
|
|
557
|
+
}), /* @__PURE__ */ s(D, {
|
|
558
|
+
x: t,
|
|
559
|
+
y: 15 + r * n,
|
|
560
|
+
dominantBaseline: "middle",
|
|
561
|
+
textAnchor: "start",
|
|
562
|
+
fill: p,
|
|
563
|
+
children: e.name
|
|
564
|
+
})]
|
|
565
|
+
}), a && typeof e.score == "number" && /* @__PURE__ */ s(P, {
|
|
566
|
+
score: e.score,
|
|
567
|
+
x: d,
|
|
568
|
+
y: u
|
|
569
|
+
})]
|
|
570
|
+
}, e.id);
|
|
571
|
+
})
|
|
572
|
+
}), V = ({ stroke: e = "var(--apollon-primary-contrast, #000000)", fill: t = "var(--apollon-background, white)", ...n }) => /* @__PURE__ */ s("rect", {
|
|
573
|
+
stroke: e,
|
|
574
|
+
fill: t,
|
|
575
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
576
|
+
...n
|
|
577
|
+
}), H = ({ id: e, width: t, height: n, SIDEBAR_PREVIEW_SCALE: r, svgAttributes: i, showAssessmentResults: a = !1, data: l }) => {
|
|
578
|
+
let { attributes: u, methods: d, name: f, stereotype: p } = l, m = !!p, g = m ? Y.DEFAULT_HEADER_HEIGHT_WITH_STEREOTYPE : Y.DEFAULT_HEADER_HEIGHT, _ = Y.DEFAULT_ATTRIBUTE_HEIGHT, v = Y.DEFAULT_METHOD_HEIGHT, y = Y.DEFAULT_PADDING, b = M(h((e) => e.assessments)), x = (e) => e.map((e) => {
|
|
579
|
+
let t = b[e.id]?.score;
|
|
580
|
+
return {
|
|
581
|
+
...e,
|
|
582
|
+
score: t
|
|
583
|
+
};
|
|
584
|
+
}), S = x(u), C = x(d), w = b[e]?.score, T = t * (r ?? 1), E = n * (r ?? 1), { fillColor: D, strokeColor: O, textColor: ee } = F(l);
|
|
585
|
+
return /* @__PURE__ */ s("svg", {
|
|
586
|
+
width: T,
|
|
587
|
+
height: E,
|
|
588
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
589
|
+
overflow: "visible",
|
|
590
|
+
...i,
|
|
591
|
+
children: /* @__PURE__ */ c(Re, {
|
|
592
|
+
elementId: e,
|
|
593
|
+
width: t,
|
|
594
|
+
itemHeight: g,
|
|
595
|
+
yOffset: 0,
|
|
596
|
+
children: [
|
|
597
|
+
/* @__PURE__ */ s(V, {
|
|
598
|
+
x: 0,
|
|
599
|
+
y: 0,
|
|
600
|
+
width: t,
|
|
601
|
+
height: n,
|
|
602
|
+
stroke: O
|
|
603
|
+
}),
|
|
604
|
+
/* @__PURE__ */ s(Le, {
|
|
605
|
+
showStereotype: m,
|
|
606
|
+
stereotype: p,
|
|
607
|
+
name: f,
|
|
608
|
+
width: t,
|
|
609
|
+
headerHeight: g,
|
|
610
|
+
textColor: ee,
|
|
611
|
+
fill: D
|
|
612
|
+
}),
|
|
613
|
+
u.length >= 0 && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(z, {
|
|
614
|
+
y: g,
|
|
615
|
+
width: t,
|
|
616
|
+
strokeColor: O
|
|
617
|
+
}), /* @__PURE__ */ s(B, {
|
|
618
|
+
items: S,
|
|
619
|
+
padding: y,
|
|
620
|
+
itemHeight: _,
|
|
621
|
+
width: t,
|
|
622
|
+
offsetFromTop: g,
|
|
623
|
+
showAssessmentResults: a,
|
|
624
|
+
itemElementType: "attribute"
|
|
625
|
+
})] }),
|
|
626
|
+
d.length >= 0 && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(z, {
|
|
627
|
+
y: g + u.length * _,
|
|
628
|
+
width: t,
|
|
629
|
+
strokeColor: O
|
|
630
|
+
}), /* @__PURE__ */ s(B, {
|
|
631
|
+
items: C,
|
|
632
|
+
padding: y,
|
|
633
|
+
itemHeight: v,
|
|
634
|
+
width: t,
|
|
635
|
+
offsetFromTop: g + u.length * v,
|
|
636
|
+
showAssessmentResults: a,
|
|
637
|
+
itemElementType: "method"
|
|
638
|
+
})] }),
|
|
639
|
+
a && /* @__PURE__ */ s(P, {
|
|
640
|
+
score: w,
|
|
641
|
+
x: t - 15,
|
|
642
|
+
y: -15
|
|
643
|
+
})
|
|
644
|
+
]
|
|
645
|
+
})
|
|
646
|
+
});
|
|
647
|
+
};
|
|
648
|
+
//#endregion
|
|
649
|
+
//#region lib/components/svgs/nodes/classDiagram/ColorDescriptionSVG.tsx
|
|
650
|
+
function ze({ width: e, height: t, data: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i }) {
|
|
651
|
+
let a = Y.LINE_WIDTH, o = e * (i ?? 1), l = t * (i ?? 1), { name: u } = n, { strokeColor: d, fillColor: f, textColor: p } = F(n);
|
|
652
|
+
return /* @__PURE__ */ s("svg", {
|
|
653
|
+
width: o,
|
|
654
|
+
height: l,
|
|
655
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
656
|
+
overflow: "visible",
|
|
657
|
+
...r,
|
|
658
|
+
children: /* @__PURE__ */ c("g", { children: [
|
|
659
|
+
/* @__PURE__ */ s("path", {
|
|
660
|
+
d: `M 0 0 L ${e - 15} 0 L ${e - 15} 15 L ${e} 15 L ${e} ${t} L 0 ${t} L 0 0 Z`,
|
|
661
|
+
strokeWidth: a,
|
|
662
|
+
strokeMiterlimit: "10",
|
|
663
|
+
stroke: d,
|
|
664
|
+
fill: f
|
|
665
|
+
}),
|
|
666
|
+
/* @__PURE__ */ s("path", {
|
|
667
|
+
d: `M ${e - 15} 0 L ${e - 15} 15 L ${e} 15 L ${e - 15} 0 Z`,
|
|
668
|
+
strokeWidth: a,
|
|
669
|
+
strokeMiterlimit: "10",
|
|
670
|
+
stroke: d,
|
|
671
|
+
fill: f
|
|
672
|
+
}),
|
|
673
|
+
/* @__PURE__ */ s(j, {
|
|
674
|
+
text: u,
|
|
675
|
+
x: e / 2,
|
|
676
|
+
y: t / 2,
|
|
677
|
+
maxWidth: e - 24,
|
|
678
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
679
|
+
fontWeight: "600",
|
|
680
|
+
fill: p,
|
|
681
|
+
maxLines: A(t - 16, Y.NAME_LINE_HEIGHT)
|
|
682
|
+
})
|
|
683
|
+
] })
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
//#endregion
|
|
687
|
+
//#region lib/components/svgs/nodes/classDiagram/PackageSVG.tsx
|
|
688
|
+
var Be = 10, Ve = 5, He = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
689
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), p = r.strokeColor || "var(--apollon-primary-contrast, #000000)", m = r.fillColor || "var(--apollon-background, white)", g = r.textColor || "var(--apollon-primary-contrast, #000000)";
|
|
690
|
+
return /* @__PURE__ */ c("svg", {
|
|
691
|
+
width: d,
|
|
692
|
+
height: f,
|
|
693
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
694
|
+
overflow: "visible",
|
|
695
|
+
...i,
|
|
696
|
+
children: [/* @__PURE__ */ c("g", { children: [
|
|
697
|
+
/* @__PURE__ */ s("rect", {
|
|
698
|
+
x: 0,
|
|
699
|
+
y: 0,
|
|
700
|
+
width: 40,
|
|
701
|
+
height: Be,
|
|
702
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
703
|
+
stroke: p,
|
|
704
|
+
fill: m
|
|
705
|
+
}),
|
|
706
|
+
/* @__PURE__ */ s("rect", {
|
|
707
|
+
x: 0,
|
|
708
|
+
y: Be,
|
|
709
|
+
width: t,
|
|
710
|
+
height: n - Be,
|
|
711
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
712
|
+
stroke: p,
|
|
713
|
+
fill: m
|
|
714
|
+
}),
|
|
715
|
+
/* @__PURE__ */ s(j, {
|
|
716
|
+
text: l,
|
|
717
|
+
x: t / 2,
|
|
718
|
+
y: 22,
|
|
719
|
+
maxWidth: t - 24,
|
|
720
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
721
|
+
fontWeight: "600",
|
|
722
|
+
fill: g,
|
|
723
|
+
verticalAnchor: "top",
|
|
724
|
+
maxLines: A(n - Be - Ve - 16, Y.NAME_LINE_HEIGHT)
|
|
725
|
+
})
|
|
726
|
+
] }), o && /* @__PURE__ */ s(P, {
|
|
727
|
+
x: t - 15,
|
|
728
|
+
y: -5,
|
|
729
|
+
score: u
|
|
730
|
+
})]
|
|
731
|
+
});
|
|
732
|
+
}, Ue = ({ id: e, width: t, height: n, data: r, SIDEBAR_PREVIEW_SCALE: i, svgAttributes: a, showAssessmentResults: l = !1 }) => {
|
|
733
|
+
let { name: u, attributes: d, methods: f } = r, p = Y.DEFAULT_HEADER_HEIGHT, m = Y.DEFAULT_ATTRIBUTE_HEIGHT, g = Y.DEFAULT_METHOD_HEIGHT, _ = Y.DEFAULT_PADDING, v = M(h((e) => e.assessments)), y = (e) => e.map((e) => {
|
|
734
|
+
let t = v[e.id]?.score;
|
|
735
|
+
return {
|
|
736
|
+
...e,
|
|
737
|
+
score: t
|
|
738
|
+
};
|
|
739
|
+
}), b = y(d), x = y(f), S = v[e]?.score, C = t * (i ?? 1), w = n * (i ?? 1), { fillColor: T, strokeColor: E, textColor: D } = F(r);
|
|
740
|
+
return /* @__PURE__ */ s("svg", {
|
|
741
|
+
width: C,
|
|
742
|
+
height: w,
|
|
743
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
744
|
+
overflow: "visible",
|
|
745
|
+
...a,
|
|
746
|
+
children: /* @__PURE__ */ c("g", { children: [
|
|
747
|
+
/* @__PURE__ */ s(V, {
|
|
748
|
+
x: 0,
|
|
749
|
+
y: 0,
|
|
750
|
+
width: t,
|
|
751
|
+
height: n,
|
|
752
|
+
stroke: E
|
|
753
|
+
}),
|
|
754
|
+
/* @__PURE__ */ s(Le, {
|
|
755
|
+
showStereotype: !1,
|
|
756
|
+
stereotype: void 0,
|
|
757
|
+
name: u,
|
|
758
|
+
width: t,
|
|
759
|
+
headerHeight: p,
|
|
760
|
+
isUnderlined: !0,
|
|
761
|
+
fill: T,
|
|
762
|
+
textColor: D
|
|
763
|
+
}),
|
|
764
|
+
d.length > 0 && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(z, {
|
|
765
|
+
y: p,
|
|
766
|
+
width: t,
|
|
767
|
+
strokeColor: E
|
|
768
|
+
}), /* @__PURE__ */ s(B, {
|
|
769
|
+
items: b,
|
|
770
|
+
padding: _,
|
|
771
|
+
itemHeight: m,
|
|
772
|
+
width: t,
|
|
773
|
+
offsetFromTop: p,
|
|
774
|
+
showAssessmentResults: l,
|
|
775
|
+
itemElementType: "attribute"
|
|
776
|
+
})] }),
|
|
777
|
+
f.length > 0 && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(z, {
|
|
778
|
+
y: p + d.length * m,
|
|
779
|
+
width: t,
|
|
780
|
+
strokeColor: E
|
|
781
|
+
}), /* @__PURE__ */ s(B, {
|
|
782
|
+
items: x,
|
|
783
|
+
padding: _,
|
|
784
|
+
itemHeight: g,
|
|
785
|
+
width: t,
|
|
786
|
+
offsetFromTop: p + d.length * g,
|
|
787
|
+
showAssessmentResults: l,
|
|
788
|
+
itemElementType: "method"
|
|
789
|
+
})] }),
|
|
790
|
+
l && /* @__PURE__ */ s(P, {
|
|
791
|
+
score: S,
|
|
792
|
+
x: t - 15,
|
|
793
|
+
y: -15
|
|
794
|
+
})
|
|
795
|
+
] })
|
|
796
|
+
});
|
|
797
|
+
}, We = ({ id: e, svgAttributes: t, SIDEBAR_PREVIEW_SCALE: n, showAssessmentResults: r = !1, width: i, height: a }) => {
|
|
798
|
+
let o = M(h((e) => e.assessments))[e]?.score;
|
|
799
|
+
return /* @__PURE__ */ c("svg", {
|
|
800
|
+
width: i * (n ?? 1),
|
|
801
|
+
height: a * (n ?? 1),
|
|
802
|
+
viewBox: `0 0 ${i} ${a}`,
|
|
803
|
+
overflow: "visible",
|
|
804
|
+
...t,
|
|
805
|
+
children: [/* @__PURE__ */ s("circle", {
|
|
806
|
+
cx: i / 2,
|
|
807
|
+
cy: a / 2,
|
|
808
|
+
r: i / 2,
|
|
809
|
+
fill: "var(--apollon-primary-contrast, #000000)"
|
|
810
|
+
}), r && /* @__PURE__ */ s(P, {
|
|
811
|
+
x: i - 15,
|
|
812
|
+
y: -15,
|
|
813
|
+
score: o
|
|
814
|
+
})]
|
|
815
|
+
});
|
|
816
|
+
}, Ge = ({ id: e, svgAttributes: t, SIDEBAR_PREVIEW_SCALE: n, showAssessmentResults: r = !1, width: i, height: a }) => {
|
|
817
|
+
let o = M(h((e) => e.assessments))[e]?.score;
|
|
818
|
+
return /* @__PURE__ */ c("svg", {
|
|
819
|
+
width: i * (n ?? 1),
|
|
820
|
+
height: a * (n ?? 1),
|
|
821
|
+
viewBox: `0 0 ${i} ${a}`,
|
|
822
|
+
overflow: "visible",
|
|
823
|
+
...t,
|
|
824
|
+
children: [
|
|
825
|
+
/* @__PURE__ */ s("circle", {
|
|
826
|
+
cx: i / 2,
|
|
827
|
+
cy: a / 2,
|
|
828
|
+
r: i / 2,
|
|
829
|
+
fill: "var(--apollon-primary-contrast, #000000)"
|
|
830
|
+
}),
|
|
831
|
+
/* @__PURE__ */ s("circle", {
|
|
832
|
+
cx: i / 2,
|
|
833
|
+
cy: a / 2,
|
|
834
|
+
r: i / 2 * .8,
|
|
835
|
+
fill: "var(--apollon-primary-contrast, #000000)",
|
|
836
|
+
stroke: "var(--apollon-background, white)",
|
|
837
|
+
strokeWidth: Y.LINE_WIDTH
|
|
838
|
+
}),
|
|
839
|
+
r && /* @__PURE__ */ s(P, {
|
|
840
|
+
x: i - 15,
|
|
841
|
+
y: -15,
|
|
842
|
+
score: o
|
|
843
|
+
})
|
|
844
|
+
]
|
|
845
|
+
});
|
|
846
|
+
}, Ke = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
847
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(r);
|
|
848
|
+
return /* @__PURE__ */ c("svg", {
|
|
849
|
+
width: d,
|
|
850
|
+
height: f,
|
|
851
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
852
|
+
overflow: "visible",
|
|
853
|
+
...i,
|
|
854
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s(V, {
|
|
855
|
+
x: 0,
|
|
856
|
+
y: 0,
|
|
857
|
+
width: t,
|
|
858
|
+
height: n,
|
|
859
|
+
rx: 10,
|
|
860
|
+
ry: 10,
|
|
861
|
+
fill: p,
|
|
862
|
+
stroke: m
|
|
863
|
+
}), /* @__PURE__ */ s(j, {
|
|
864
|
+
text: l,
|
|
865
|
+
x: t / 2,
|
|
866
|
+
y: n / 2,
|
|
867
|
+
maxWidth: t - 16,
|
|
868
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
869
|
+
fontWeight: "bold",
|
|
870
|
+
fill: g,
|
|
871
|
+
maxLines: A(n - 16, Y.NAME_LINE_HEIGHT)
|
|
872
|
+
})] }), o && /* @__PURE__ */ s(P, {
|
|
873
|
+
x: t - 15,
|
|
874
|
+
y: -15,
|
|
875
|
+
score: u
|
|
876
|
+
})]
|
|
877
|
+
});
|
|
878
|
+
}, qe = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
879
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(r);
|
|
880
|
+
return /* @__PURE__ */ c("svg", {
|
|
881
|
+
width: d,
|
|
882
|
+
height: f,
|
|
883
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
884
|
+
overflow: "visible",
|
|
885
|
+
...i,
|
|
886
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s(V, {
|
|
887
|
+
x: 0,
|
|
888
|
+
y: 0,
|
|
889
|
+
width: t,
|
|
890
|
+
height: n,
|
|
891
|
+
fill: p,
|
|
892
|
+
stroke: m
|
|
893
|
+
}), /* @__PURE__ */ s(j, {
|
|
894
|
+
text: l,
|
|
895
|
+
x: t / 2,
|
|
896
|
+
y: n / 2,
|
|
897
|
+
maxWidth: t - 16,
|
|
898
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
899
|
+
fontWeight: "bold",
|
|
900
|
+
fill: g,
|
|
901
|
+
maxLines: A(n - 16, Y.NAME_LINE_HEIGHT)
|
|
902
|
+
})] }), o && /* @__PURE__ */ s(P, {
|
|
903
|
+
x: t - 15,
|
|
904
|
+
y: -15,
|
|
905
|
+
score: u
|
|
906
|
+
})]
|
|
907
|
+
});
|
|
908
|
+
}, Je = 16, Ye = "bold", Xe = Math.round(Je * 1.2), Ze = 8, Qe = 6, $e = ({ id: e, width: t, height: n, data: r, svgAttributes: a, SIDEBAR_PREVIEW_SCALE: o, showAssessmentResults: l = !1 }) => {
|
|
909
|
+
let { name: u } = r, d = M(h((e) => e.assessments))[e]?.score, f = t * (o ?? 1), p = n * (o ?? 1), { fillColor: m, strokeColor: g, textColor: _ } = F(r), v = i(() => ue(u, t, n, {
|
|
910
|
+
fontSize: Je,
|
|
911
|
+
fontWeight: Ye
|
|
912
|
+
}, Xe, {
|
|
913
|
+
paddingX: Ze,
|
|
914
|
+
paddingY: Qe
|
|
915
|
+
}), [
|
|
916
|
+
u,
|
|
917
|
+
t,
|
|
918
|
+
n
|
|
919
|
+
]), y = t / 2, b = n / 2;
|
|
920
|
+
return /* @__PURE__ */ c("svg", {
|
|
921
|
+
width: f,
|
|
922
|
+
height: p,
|
|
923
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
924
|
+
overflow: "visible",
|
|
925
|
+
...a,
|
|
926
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s("polyline", {
|
|
927
|
+
points: `
|
|
928
|
+
${t / 2},0
|
|
929
|
+
${t},${n / 2}
|
|
930
|
+
${t / 2},${n}
|
|
931
|
+
0,${n / 2}
|
|
932
|
+
${t / 2},0`,
|
|
933
|
+
fill: m,
|
|
934
|
+
stroke: g,
|
|
935
|
+
strokeWidth: Y.LINE_WIDTH
|
|
936
|
+
}), v.lines.length > 0 && /* @__PURE__ */ s(D, {
|
|
937
|
+
x: y,
|
|
938
|
+
y: b,
|
|
939
|
+
textAnchor: "middle",
|
|
940
|
+
fontSize: Je,
|
|
941
|
+
fontWeight: Ye,
|
|
942
|
+
dominantBaseline: "middle",
|
|
943
|
+
fill: _,
|
|
944
|
+
children: v.lines.map((e, t) => /* @__PURE__ */ s("tspan", {
|
|
945
|
+
x: y,
|
|
946
|
+
y: b + v.lineOffsets[t],
|
|
947
|
+
children: e.text
|
|
948
|
+
}, t))
|
|
949
|
+
})] }), l && /* @__PURE__ */ s(P, {
|
|
950
|
+
x: t - 15,
|
|
951
|
+
y: -15,
|
|
952
|
+
score: d
|
|
953
|
+
})]
|
|
954
|
+
});
|
|
955
|
+
}, et = ({ id: e, width: t, height: n, svgAttributes: r, data: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
956
|
+
let l = M(h((e) => e.assessments))[e]?.score, u = t * (a ?? 1), d = n * (a ?? 1), f = i.fillColor || "var(--apollon-primary-contrast, #000000)";
|
|
957
|
+
return /* @__PURE__ */ c("svg", {
|
|
958
|
+
width: u,
|
|
959
|
+
height: d,
|
|
960
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
961
|
+
overflow: "visible",
|
|
962
|
+
...r,
|
|
963
|
+
children: [/* @__PURE__ */ s("rect", {
|
|
964
|
+
x: 0,
|
|
965
|
+
y: 0,
|
|
966
|
+
width: t,
|
|
967
|
+
height: n,
|
|
968
|
+
fill: f
|
|
969
|
+
}), o && /* @__PURE__ */ s(P, {
|
|
970
|
+
x: t - 15,
|
|
971
|
+
y: -15,
|
|
972
|
+
score: l
|
|
973
|
+
})]
|
|
974
|
+
});
|
|
975
|
+
}, tt = ({ id: e, width: t, height: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, showAssessmentResults: a = !1, data: o }) => {
|
|
976
|
+
let l = M(h((e) => e.assessments))[e]?.score, u = t * (i ?? 1), d = n * (i ?? 1), f = o.fillColor || "var(--apollon-primary-contrast, #000000)";
|
|
977
|
+
return /* @__PURE__ */ c("svg", {
|
|
978
|
+
width: u,
|
|
979
|
+
height: d,
|
|
980
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
981
|
+
overflow: "visible",
|
|
982
|
+
...r,
|
|
983
|
+
children: [/* @__PURE__ */ s("rect", {
|
|
984
|
+
x: 0,
|
|
985
|
+
y: 0,
|
|
986
|
+
width: t,
|
|
987
|
+
height: n,
|
|
988
|
+
fill: f
|
|
989
|
+
}), a && /* @__PURE__ */ s(P, {
|
|
990
|
+
x: t - 15,
|
|
991
|
+
y: -15,
|
|
992
|
+
score: l
|
|
993
|
+
})]
|
|
994
|
+
});
|
|
995
|
+
}, nt = ({ width: e, height: t, data: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, id: a, showAssessmentResults: o = !1 }) => {
|
|
996
|
+
let l = n.lanes ?? [], u = (n.orientation ?? "vertical") === "vertical", d = M(h((e) => e.assessments))[a]?.score, f = e * (i ?? 1), p = t * (i ?? 1), { fillColor: m, strokeColor: g, textColor: _ } = F(n), v = Zt(l, u ? e : t);
|
|
997
|
+
return /* @__PURE__ */ c("svg", {
|
|
998
|
+
width: f,
|
|
999
|
+
height: p,
|
|
1000
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
1001
|
+
overflow: "visible",
|
|
1002
|
+
...r,
|
|
1003
|
+
children: [
|
|
1004
|
+
/* @__PURE__ */ s(V, {
|
|
1005
|
+
x: 0,
|
|
1006
|
+
y: 0,
|
|
1007
|
+
width: e,
|
|
1008
|
+
height: t,
|
|
1009
|
+
fill: m,
|
|
1010
|
+
stroke: g
|
|
1011
|
+
}),
|
|
1012
|
+
u ? /* @__PURE__ */ s("line", {
|
|
1013
|
+
x1: 0,
|
|
1014
|
+
y1: 30,
|
|
1015
|
+
x2: e,
|
|
1016
|
+
y2: 30,
|
|
1017
|
+
stroke: g,
|
|
1018
|
+
strokeWidth: Y.LINE_WIDTH
|
|
1019
|
+
}) : /* @__PURE__ */ s("line", {
|
|
1020
|
+
x1: 30,
|
|
1021
|
+
y1: 0,
|
|
1022
|
+
x2: 30,
|
|
1023
|
+
y2: t,
|
|
1024
|
+
stroke: g,
|
|
1025
|
+
strokeWidth: Y.LINE_WIDTH
|
|
1026
|
+
}),
|
|
1027
|
+
l.map((n, r) => {
|
|
1028
|
+
let { start: i, extent: a } = v[r], o = i + a / 2;
|
|
1029
|
+
return /* @__PURE__ */ c("g", { children: [r > 0 && (u ? /* @__PURE__ */ s("line", {
|
|
1030
|
+
x1: i,
|
|
1031
|
+
y1: 0,
|
|
1032
|
+
x2: i,
|
|
1033
|
+
y2: t,
|
|
1034
|
+
stroke: g,
|
|
1035
|
+
strokeWidth: Y.LINE_WIDTH
|
|
1036
|
+
}) : /* @__PURE__ */ s("line", {
|
|
1037
|
+
x1: 0,
|
|
1038
|
+
y1: i,
|
|
1039
|
+
x2: e,
|
|
1040
|
+
y2: i,
|
|
1041
|
+
stroke: g,
|
|
1042
|
+
strokeWidth: Y.LINE_WIDTH
|
|
1043
|
+
})), u ? /* @__PURE__ */ s(j, {
|
|
1044
|
+
text: n.name,
|
|
1045
|
+
x: o,
|
|
1046
|
+
y: 30 / 2,
|
|
1047
|
+
maxWidth: a - 8,
|
|
1048
|
+
maxLines: 1,
|
|
1049
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
1050
|
+
fill: _
|
|
1051
|
+
}) : /* @__PURE__ */ s(j, {
|
|
1052
|
+
text: n.name,
|
|
1053
|
+
x: 30 / 2,
|
|
1054
|
+
y: o,
|
|
1055
|
+
maxWidth: a - 8,
|
|
1056
|
+
maxLines: 1,
|
|
1057
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
1058
|
+
fill: _,
|
|
1059
|
+
transform: `rotate(-90, ${30 / 2}, ${o})`
|
|
1060
|
+
})] }, n.id);
|
|
1061
|
+
}),
|
|
1062
|
+
o && /* @__PURE__ */ s(P, {
|
|
1063
|
+
x: e - 15,
|
|
1064
|
+
y: -15,
|
|
1065
|
+
score: d
|
|
1066
|
+
})
|
|
1067
|
+
]
|
|
1068
|
+
});
|
|
1069
|
+
}, rt = 90, it = 16, at = Math.round(it * 1.2), ot = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
1070
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(r), _ = Math.max(0, (t - rt) / 2), v = Math.max(at, n - 118), y = Math.max(2, A(v, at));
|
|
1071
|
+
return /* @__PURE__ */ c("svg", {
|
|
1072
|
+
width: d,
|
|
1073
|
+
height: f,
|
|
1074
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1075
|
+
overflow: "visible",
|
|
1076
|
+
...i,
|
|
1077
|
+
children: [
|
|
1078
|
+
/* @__PURE__ */ c("g", {
|
|
1079
|
+
transform: `translate(${_}, 0)`,
|
|
1080
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
1081
|
+
stroke: m,
|
|
1082
|
+
children: [
|
|
1083
|
+
/* @__PURE__ */ s("circle", {
|
|
1084
|
+
cx: 45,
|
|
1085
|
+
cy: 25,
|
|
1086
|
+
r: 15,
|
|
1087
|
+
fill: p
|
|
1088
|
+
}),
|
|
1089
|
+
/* @__PURE__ */ s("line", {
|
|
1090
|
+
x1: 45,
|
|
1091
|
+
y1: 40,
|
|
1092
|
+
x2: 45,
|
|
1093
|
+
y2: 80
|
|
1094
|
+
}),
|
|
1095
|
+
/* @__PURE__ */ s("line", {
|
|
1096
|
+
x1: 15,
|
|
1097
|
+
y1: 55,
|
|
1098
|
+
x2: 75,
|
|
1099
|
+
y2: 55
|
|
1100
|
+
}),
|
|
1101
|
+
/* @__PURE__ */ s("line", {
|
|
1102
|
+
x1: 45,
|
|
1103
|
+
y1: 80,
|
|
1104
|
+
x2: 15,
|
|
1105
|
+
y2: 110
|
|
1106
|
+
}),
|
|
1107
|
+
/* @__PURE__ */ s("line", {
|
|
1108
|
+
x1: 45,
|
|
1109
|
+
y1: 80,
|
|
1110
|
+
x2: 75,
|
|
1111
|
+
y2: 110
|
|
1112
|
+
})
|
|
1113
|
+
]
|
|
1114
|
+
}),
|
|
1115
|
+
/* @__PURE__ */ s(j, {
|
|
1116
|
+
text: l,
|
|
1117
|
+
x: t / 2,
|
|
1118
|
+
y: 127.5,
|
|
1119
|
+
maxWidth: t,
|
|
1120
|
+
fontSize: it,
|
|
1121
|
+
fontWeight: "bold",
|
|
1122
|
+
lineHeight: at,
|
|
1123
|
+
fill: g,
|
|
1124
|
+
verticalAnchor: "top",
|
|
1125
|
+
maxLines: y
|
|
1126
|
+
}),
|
|
1127
|
+
o && /* @__PURE__ */ s(P, {
|
|
1128
|
+
x: t - 15,
|
|
1129
|
+
y: -15,
|
|
1130
|
+
score: u
|
|
1131
|
+
})
|
|
1132
|
+
]
|
|
1133
|
+
});
|
|
1134
|
+
}, st = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
1135
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(r);
|
|
1136
|
+
return /* @__PURE__ */ c("svg", {
|
|
1137
|
+
width: d,
|
|
1138
|
+
height: f,
|
|
1139
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1140
|
+
overflow: "visible",
|
|
1141
|
+
...i,
|
|
1142
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s(V, {
|
|
1143
|
+
x: 0,
|
|
1144
|
+
y: 0,
|
|
1145
|
+
width: t,
|
|
1146
|
+
height: n,
|
|
1147
|
+
fill: p,
|
|
1148
|
+
stroke: m
|
|
1149
|
+
}), /* @__PURE__ */ s(j, {
|
|
1150
|
+
text: l,
|
|
1151
|
+
x: t / 2,
|
|
1152
|
+
y: 22,
|
|
1153
|
+
maxWidth: t - 24,
|
|
1154
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
1155
|
+
fontWeight: "600",
|
|
1156
|
+
fill: g,
|
|
1157
|
+
verticalAnchor: "top",
|
|
1158
|
+
maxLines: A(n - 28, Y.NAME_LINE_HEIGHT)
|
|
1159
|
+
})] }), o && /* @__PURE__ */ s(P, {
|
|
1160
|
+
x: t - 15,
|
|
1161
|
+
y: -15,
|
|
1162
|
+
score: u
|
|
1163
|
+
})]
|
|
1164
|
+
});
|
|
1165
|
+
}, ct = 16, lt = 600, ut = Math.round(ct * 1.2), dt = 8, ft = 6, pt = ({ id: e, width: t, height: n, data: r, svgAttributes: a, SIDEBAR_PREVIEW_SCALE: o, showAssessmentResults: l = !1 }) => {
|
|
1166
|
+
let { name: u } = r, d = M(h((e) => e.assessments))[e]?.score, f = t * (o ?? 1), p = n * (o ?? 1), { fillColor: m, strokeColor: g, textColor: _ } = F(r), v = i(() => le(u, t, n, {
|
|
1167
|
+
fontSize: ct,
|
|
1168
|
+
fontWeight: lt
|
|
1169
|
+
}, ut, {
|
|
1170
|
+
paddingX: dt,
|
|
1171
|
+
paddingY: ft
|
|
1172
|
+
}), [
|
|
1173
|
+
u,
|
|
1174
|
+
t,
|
|
1175
|
+
n
|
|
1176
|
+
]), y = t / 2, b = n / 2;
|
|
1177
|
+
return /* @__PURE__ */ c("svg", {
|
|
1178
|
+
width: f,
|
|
1179
|
+
height: p,
|
|
1180
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1181
|
+
overflow: "visible",
|
|
1182
|
+
...a,
|
|
1183
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s("ellipse", {
|
|
1184
|
+
cx: y,
|
|
1185
|
+
cy: b,
|
|
1186
|
+
rx: t / 2,
|
|
1187
|
+
ry: n / 2,
|
|
1188
|
+
fill: m,
|
|
1189
|
+
stroke: g,
|
|
1190
|
+
strokeWidth: Y.LINE_WIDTH
|
|
1191
|
+
}), v.lines.length > 0 && /* @__PURE__ */ s(D, {
|
|
1192
|
+
x: y,
|
|
1193
|
+
y: b,
|
|
1194
|
+
textAnchor: "middle",
|
|
1195
|
+
fontSize: ct,
|
|
1196
|
+
fontWeight: String(lt),
|
|
1197
|
+
dominantBaseline: "middle",
|
|
1198
|
+
fill: _,
|
|
1199
|
+
children: v.lines.map((e, t) => /* @__PURE__ */ s("tspan", {
|
|
1200
|
+
x: y,
|
|
1201
|
+
y: b + v.lineOffsets[t],
|
|
1202
|
+
children: e.text
|
|
1203
|
+
}, t))
|
|
1204
|
+
})] }), l && /* @__PURE__ */ s(P, {
|
|
1205
|
+
x: t - 15,
|
|
1206
|
+
y: -15,
|
|
1207
|
+
score: d
|
|
1208
|
+
})]
|
|
1209
|
+
});
|
|
1210
|
+
}, mt = ({ id: e, width: t, height: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, showAssessmentResults: a = !1, data: o }) => {
|
|
1211
|
+
let l = M(h((e) => e.assessments))[e]?.score, u = t * (i ?? 1), d = n * (i ?? 1), { name: f, isComponentHeaderShown: p } = o, { fillColor: m, strokeColor: g, textColor: _ } = F(o);
|
|
1212
|
+
return /* @__PURE__ */ c("svg", {
|
|
1213
|
+
width: u,
|
|
1214
|
+
height: d,
|
|
1215
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1216
|
+
overflow: "visible",
|
|
1217
|
+
...r,
|
|
1218
|
+
children: [/* @__PURE__ */ c("g", { children: [
|
|
1219
|
+
/* @__PURE__ */ s(V, {
|
|
1220
|
+
x: 0,
|
|
1221
|
+
y: 0,
|
|
1222
|
+
width: t,
|
|
1223
|
+
height: n,
|
|
1224
|
+
fill: m,
|
|
1225
|
+
stroke: g
|
|
1226
|
+
}),
|
|
1227
|
+
/* @__PURE__ */ c("g", {
|
|
1228
|
+
transform: `translate(${t - 32}, 8)`,
|
|
1229
|
+
children: [/* @__PURE__ */ s("path", {
|
|
1230
|
+
d: "M 4.8 0 L 24 0 L 24 24 L 4.8 24 L 4.8 19.2 L 0 19.2 L 0 14.4 L 4.8 14.4 L 4.8 9.6 L 0 9.6 L 0 4.8 L 4.8 4.8 Z",
|
|
1231
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1232
|
+
strokeMiterlimit: "10",
|
|
1233
|
+
stroke: g,
|
|
1234
|
+
fill: "none"
|
|
1235
|
+
}), /* @__PURE__ */ s("path", {
|
|
1236
|
+
d: "M 4.8 4.8 L 9.6 4.8 L 9.6 9.6 L 4.8 9.6 M 4.8 14.4 L 9.6 14.4 L 9.6 19.2 L 4.8 19.2",
|
|
1237
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1238
|
+
strokeMiterlimit: "10",
|
|
1239
|
+
stroke: g,
|
|
1240
|
+
fill: "none"
|
|
1241
|
+
})]
|
|
1242
|
+
}),
|
|
1243
|
+
/* @__PURE__ */ s(kn, {
|
|
1244
|
+
name: f,
|
|
1245
|
+
stereotype: "component",
|
|
1246
|
+
showStereotype: !!p,
|
|
1247
|
+
width: t,
|
|
1248
|
+
height: n,
|
|
1249
|
+
fill: _
|
|
1250
|
+
})
|
|
1251
|
+
] }), a && /* @__PURE__ */ s(P, {
|
|
1252
|
+
x: t - 15,
|
|
1253
|
+
y: -15,
|
|
1254
|
+
score: l
|
|
1255
|
+
})]
|
|
1256
|
+
});
|
|
1257
|
+
}, ht = 1e5, gt = ({ name: e, width: t, height: n, fill: r, side: i = "bottom" }) => {
|
|
1258
|
+
if (!e) return null;
|
|
1259
|
+
let a = Y.DEFAULT_PADDING / 2, o = Y.NAME_LINE_HEIGHT / 2, c = t / 2, l = n / 2, u = t / 2, d = u + a, f = u + a, p = {
|
|
1260
|
+
bottom: {
|
|
1261
|
+
x: c,
|
|
1262
|
+
y: l + f + o,
|
|
1263
|
+
textAnchor: "middle",
|
|
1264
|
+
verticalAnchor: "top"
|
|
1265
|
+
},
|
|
1266
|
+
top: {
|
|
1267
|
+
x: c,
|
|
1268
|
+
y: l - f - o,
|
|
1269
|
+
textAnchor: "middle",
|
|
1270
|
+
verticalAnchor: "bottom"
|
|
1271
|
+
},
|
|
1272
|
+
left: {
|
|
1273
|
+
x: c - d,
|
|
1274
|
+
y: l,
|
|
1275
|
+
textAnchor: "end",
|
|
1276
|
+
verticalAnchor: "middle"
|
|
1277
|
+
},
|
|
1278
|
+
right: {
|
|
1279
|
+
x: c + d,
|
|
1280
|
+
y: l,
|
|
1281
|
+
textAnchor: "start",
|
|
1282
|
+
verticalAnchor: "middle"
|
|
1283
|
+
},
|
|
1284
|
+
"bottom-right": {
|
|
1285
|
+
x: c + d,
|
|
1286
|
+
y: l + f + o,
|
|
1287
|
+
textAnchor: "start",
|
|
1288
|
+
verticalAnchor: "top"
|
|
1289
|
+
},
|
|
1290
|
+
"bottom-left": {
|
|
1291
|
+
x: c - d,
|
|
1292
|
+
y: l + f + o,
|
|
1293
|
+
textAnchor: "end",
|
|
1294
|
+
verticalAnchor: "top"
|
|
1295
|
+
},
|
|
1296
|
+
"top-right": {
|
|
1297
|
+
x: c + d,
|
|
1298
|
+
y: l - f - o,
|
|
1299
|
+
textAnchor: "start",
|
|
1300
|
+
verticalAnchor: "bottom"
|
|
1301
|
+
},
|
|
1302
|
+
"top-left": {
|
|
1303
|
+
x: c - d,
|
|
1304
|
+
y: l - f - o,
|
|
1305
|
+
textAnchor: "end",
|
|
1306
|
+
verticalAnchor: "bottom"
|
|
1307
|
+
}
|
|
1308
|
+
}[i];
|
|
1309
|
+
return /* @__PURE__ */ s(j, {
|
|
1310
|
+
text: e,
|
|
1311
|
+
x: p.x,
|
|
1312
|
+
y: p.y,
|
|
1313
|
+
verticalAnchor: p.verticalAnchor,
|
|
1314
|
+
textAnchor: p.textAnchor,
|
|
1315
|
+
maxWidth: ht,
|
|
1316
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
1317
|
+
lineHeight: Y.NAME_LINE_HEIGHT,
|
|
1318
|
+
fontWeight: "bold",
|
|
1319
|
+
fill: r
|
|
1320
|
+
});
|
|
1321
|
+
}, _t = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1, labelSide: l }) => {
|
|
1322
|
+
let { name: u } = r, d = M(h((e) => e.assessments))[e]?.score, f = t * (a ?? 1), p = n * (a ?? 1), { fillColor: m, strokeColor: g, textColor: _ } = F(r);
|
|
1323
|
+
return /* @__PURE__ */ c("svg", {
|
|
1324
|
+
width: f,
|
|
1325
|
+
height: p,
|
|
1326
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1327
|
+
overflow: "visible",
|
|
1328
|
+
...i,
|
|
1329
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s("circle", {
|
|
1330
|
+
cx: t / 2,
|
|
1331
|
+
cy: n / 2,
|
|
1332
|
+
r: t / 2,
|
|
1333
|
+
strokeWidth: Y.LINE_WIDTH_EDGE,
|
|
1334
|
+
stroke: g,
|
|
1335
|
+
fill: m
|
|
1336
|
+
}), /* @__PURE__ */ s(gt, {
|
|
1337
|
+
name: u,
|
|
1338
|
+
width: t,
|
|
1339
|
+
height: n,
|
|
1340
|
+
fill: _,
|
|
1341
|
+
side: l
|
|
1342
|
+
})] }), o && /* @__PURE__ */ s(P, {
|
|
1343
|
+
x: t - 15,
|
|
1344
|
+
y: -15,
|
|
1345
|
+
score: d
|
|
1346
|
+
})]
|
|
1347
|
+
});
|
|
1348
|
+
}, vt = 48, yt = ({ id: e, width: t, height: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, showAssessmentResults: a = !1, data: o }) => {
|
|
1349
|
+
let { name: l, isComponentSubsystemHeaderShown: u } = o, d = M(h((e) => e.assessments))[e]?.score, f = t * (i ?? 1), p = n * (i ?? 1), { fillColor: m, strokeColor: g, textColor: _ } = F(o);
|
|
1350
|
+
return /* @__PURE__ */ c("svg", {
|
|
1351
|
+
width: f,
|
|
1352
|
+
height: p,
|
|
1353
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1354
|
+
overflow: "visible",
|
|
1355
|
+
...r,
|
|
1356
|
+
children: [/* @__PURE__ */ c("g", { children: [
|
|
1357
|
+
/* @__PURE__ */ s(V, {
|
|
1358
|
+
x: 0,
|
|
1359
|
+
y: 0,
|
|
1360
|
+
width: t,
|
|
1361
|
+
height: n,
|
|
1362
|
+
fill: m,
|
|
1363
|
+
stroke: g
|
|
1364
|
+
}),
|
|
1365
|
+
/* @__PURE__ */ c("g", {
|
|
1366
|
+
transform: `translate(${t - 32}, 8)`,
|
|
1367
|
+
children: [/* @__PURE__ */ s("path", {
|
|
1368
|
+
d: "M 4.8 0 L 24 0 L 24 24 L 4.8 24 L 4.8 19.2 L 0 19.2 L 0 14.4 L 4.8 14.4 L 4.8 9.6 L 0 9.6 L 0 4.8 L 4.8 4.8 Z",
|
|
1369
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1370
|
+
strokeMiterlimit: "10",
|
|
1371
|
+
stroke: g,
|
|
1372
|
+
fill: "none"
|
|
1373
|
+
}), /* @__PURE__ */ s("path", {
|
|
1374
|
+
d: "M 4.8 4.8 L 9.6 4.8 L 9.6 9.6 L 4.8 9.6 M 4.8 14.4 L 9.6 14.4 L 9.6 19.2 L 4.8 19.2",
|
|
1375
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1376
|
+
strokeMiterlimit: "10",
|
|
1377
|
+
stroke: g,
|
|
1378
|
+
fill: "none"
|
|
1379
|
+
})]
|
|
1380
|
+
}),
|
|
1381
|
+
/* @__PURE__ */ s(kn, {
|
|
1382
|
+
name: l,
|
|
1383
|
+
stereotype: "subsystem",
|
|
1384
|
+
showStereotype: !!u,
|
|
1385
|
+
width: t,
|
|
1386
|
+
height: n,
|
|
1387
|
+
sideReserve: vt,
|
|
1388
|
+
verticalAnchor: "top",
|
|
1389
|
+
fill: _
|
|
1390
|
+
})
|
|
1391
|
+
] }), a && /* @__PURE__ */ s(P, {
|
|
1392
|
+
x: t - 15,
|
|
1393
|
+
y: -15,
|
|
1394
|
+
score: d
|
|
1395
|
+
})]
|
|
1396
|
+
});
|
|
1397
|
+
}, bt = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
1398
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(r);
|
|
1399
|
+
return /* @__PURE__ */ c("svg", {
|
|
1400
|
+
width: d,
|
|
1401
|
+
height: f,
|
|
1402
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1403
|
+
overflow: "visible",
|
|
1404
|
+
...i,
|
|
1405
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s(V, {
|
|
1406
|
+
x: 0,
|
|
1407
|
+
y: 0,
|
|
1408
|
+
width: t,
|
|
1409
|
+
height: n,
|
|
1410
|
+
rx: 10,
|
|
1411
|
+
ry: 10,
|
|
1412
|
+
fill: p,
|
|
1413
|
+
stroke: m
|
|
1414
|
+
}), /* @__PURE__ */ s(j, {
|
|
1415
|
+
text: l,
|
|
1416
|
+
x: t / 2,
|
|
1417
|
+
y: n / 2,
|
|
1418
|
+
maxWidth: t - 24,
|
|
1419
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
1420
|
+
fontWeight: "600",
|
|
1421
|
+
fill: g,
|
|
1422
|
+
maxLines: A(n - 16, Y.NAME_LINE_HEIGHT)
|
|
1423
|
+
})] }), o && /* @__PURE__ */ s(P, {
|
|
1424
|
+
x: t - 15,
|
|
1425
|
+
y: -15,
|
|
1426
|
+
score: u
|
|
1427
|
+
})]
|
|
1428
|
+
});
|
|
1429
|
+
}, xt = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
1430
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(r);
|
|
1431
|
+
return /* @__PURE__ */ c("svg", {
|
|
1432
|
+
width: d,
|
|
1433
|
+
height: f,
|
|
1434
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1435
|
+
overflow: "visible",
|
|
1436
|
+
...i,
|
|
1437
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s(V, {
|
|
1438
|
+
x: 0,
|
|
1439
|
+
y: 0,
|
|
1440
|
+
width: t,
|
|
1441
|
+
height: n,
|
|
1442
|
+
fill: p,
|
|
1443
|
+
stroke: m
|
|
1444
|
+
}), /* @__PURE__ */ s(j, {
|
|
1445
|
+
text: l,
|
|
1446
|
+
x: t / 2,
|
|
1447
|
+
y: n / 2,
|
|
1448
|
+
maxWidth: t - 16,
|
|
1449
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
1450
|
+
fontWeight: "600",
|
|
1451
|
+
fill: g,
|
|
1452
|
+
maxLines: A(n - 16, Y.NAME_LINE_HEIGHT)
|
|
1453
|
+
})] }), o && /* @__PURE__ */ s(P, {
|
|
1454
|
+
x: t - 15,
|
|
1455
|
+
y: -15,
|
|
1456
|
+
score: u
|
|
1457
|
+
})]
|
|
1458
|
+
});
|
|
1459
|
+
}, St = 16, Ct = 600, wt = Math.round(St * 1.2), Tt = 8, Et = 6, Dt = ({ id: e, width: t, height: n, data: r, svgAttributes: a, SIDEBAR_PREVIEW_SCALE: o, showAssessmentResults: l = !1 }) => {
|
|
1460
|
+
let { name: u } = r, d = M(h((e) => e.assessments))[e]?.score, f = t * (o ?? 1), p = n * (o ?? 1), { fillColor: m, strokeColor: g, textColor: _ } = F(r), v = i(() => ue(u, t, n, {
|
|
1461
|
+
fontSize: St,
|
|
1462
|
+
fontWeight: Ct
|
|
1463
|
+
}, wt, {
|
|
1464
|
+
paddingX: Tt,
|
|
1465
|
+
paddingY: Et
|
|
1466
|
+
}), [
|
|
1467
|
+
u,
|
|
1468
|
+
t,
|
|
1469
|
+
n
|
|
1470
|
+
]), y = t / 2, b = n / 2;
|
|
1471
|
+
return /* @__PURE__ */ c("svg", {
|
|
1472
|
+
width: f,
|
|
1473
|
+
height: p,
|
|
1474
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1475
|
+
overflow: "visible",
|
|
1476
|
+
...a,
|
|
1477
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s("polygon", {
|
|
1478
|
+
points: `${t / 2},0 ${t},${n / 2} ${t / 2},${n} 0,${n / 2}`,
|
|
1479
|
+
stroke: g,
|
|
1480
|
+
fill: m,
|
|
1481
|
+
strokeWidth: Y.LINE_WIDTH
|
|
1482
|
+
}), v.lines.length > 0 && /* @__PURE__ */ s(D, {
|
|
1483
|
+
x: y,
|
|
1484
|
+
y: b,
|
|
1485
|
+
textAnchor: "middle",
|
|
1486
|
+
fontSize: St,
|
|
1487
|
+
fontWeight: String(Ct),
|
|
1488
|
+
dominantBaseline: "middle",
|
|
1489
|
+
fill: _,
|
|
1490
|
+
children: v.lines.map((e, t) => /* @__PURE__ */ s("tspan", {
|
|
1491
|
+
x: y,
|
|
1492
|
+
y: b + v.lineOffsets[t],
|
|
1493
|
+
children: e.text
|
|
1494
|
+
}, t))
|
|
1495
|
+
})] }), l && /* @__PURE__ */ s(P, {
|
|
1496
|
+
x: t - 15,
|
|
1497
|
+
y: -15,
|
|
1498
|
+
score: d
|
|
1499
|
+
})]
|
|
1500
|
+
});
|
|
1501
|
+
}, Ot = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
1502
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(r);
|
|
1503
|
+
return /* @__PURE__ */ c("svg", {
|
|
1504
|
+
width: d,
|
|
1505
|
+
height: f,
|
|
1506
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1507
|
+
overflow: "visible",
|
|
1508
|
+
...i,
|
|
1509
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s("path", {
|
|
1510
|
+
d: `M20,0 L${t},0 L${t - 20},${n} L0,${n} Z`,
|
|
1511
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
1512
|
+
stroke: m,
|
|
1513
|
+
fill: p
|
|
1514
|
+
}), /* @__PURE__ */ s(j, {
|
|
1515
|
+
text: l,
|
|
1516
|
+
x: t / 2,
|
|
1517
|
+
y: n / 2,
|
|
1518
|
+
maxWidth: t - 48,
|
|
1519
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
1520
|
+
fontWeight: "600",
|
|
1521
|
+
fill: g,
|
|
1522
|
+
maxLines: A(n - 16, Y.NAME_LINE_HEIGHT)
|
|
1523
|
+
})] }), o && /* @__PURE__ */ s(P, {
|
|
1524
|
+
x: t - 15,
|
|
1525
|
+
y: -15,
|
|
1526
|
+
score: u
|
|
1527
|
+
})]
|
|
1528
|
+
});
|
|
1529
|
+
}, kt = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
1530
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(r);
|
|
1531
|
+
return /* @__PURE__ */ c("svg", {
|
|
1532
|
+
width: d,
|
|
1533
|
+
height: f,
|
|
1534
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1535
|
+
overflow: "visible",
|
|
1536
|
+
...i,
|
|
1537
|
+
children: [/* @__PURE__ */ c("g", { children: [
|
|
1538
|
+
/* @__PURE__ */ s(V, {
|
|
1539
|
+
x: 0,
|
|
1540
|
+
y: 0,
|
|
1541
|
+
width: t,
|
|
1542
|
+
height: n,
|
|
1543
|
+
fill: p,
|
|
1544
|
+
stroke: m
|
|
1545
|
+
}),
|
|
1546
|
+
/* @__PURE__ */ s("line", {
|
|
1547
|
+
x1: 10,
|
|
1548
|
+
y1: 0,
|
|
1549
|
+
x2: 10,
|
|
1550
|
+
y2: n,
|
|
1551
|
+
stroke: m,
|
|
1552
|
+
strokeWidth: Y.LINE_WIDTH
|
|
1553
|
+
}),
|
|
1554
|
+
/* @__PURE__ */ s("line", {
|
|
1555
|
+
x1: t - 10,
|
|
1556
|
+
y1: 0,
|
|
1557
|
+
x2: t - 10,
|
|
1558
|
+
y2: n,
|
|
1559
|
+
stroke: m,
|
|
1560
|
+
strokeWidth: Y.LINE_WIDTH
|
|
1561
|
+
}),
|
|
1562
|
+
/* @__PURE__ */ s(j, {
|
|
1563
|
+
text: l,
|
|
1564
|
+
x: t / 2,
|
|
1565
|
+
y: n / 2,
|
|
1566
|
+
maxWidth: t - 36,
|
|
1567
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
1568
|
+
fontWeight: "600",
|
|
1569
|
+
fill: g,
|
|
1570
|
+
maxLines: A(n - 16, Y.NAME_LINE_HEIGHT)
|
|
1571
|
+
})
|
|
1572
|
+
] }), o && /* @__PURE__ */ s(P, {
|
|
1573
|
+
x: t - 15,
|
|
1574
|
+
y: -15,
|
|
1575
|
+
score: u
|
|
1576
|
+
})]
|
|
1577
|
+
});
|
|
1578
|
+
}, At = ({ id: e, width: t, height: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, showAssessmentResults: a = !1, data: o }) => {
|
|
1579
|
+
let { name: l, stereotype: u, isComponentHeaderShown: d } = o, f = !!d && !!u && u.length > 0, p = M(h((e) => e.assessments))[e]?.score, m = t * (i ?? 1), g = n * (i ?? 1), { fillColor: _, strokeColor: v, textColor: y } = F(o);
|
|
1580
|
+
return /* @__PURE__ */ c("svg", {
|
|
1581
|
+
width: m,
|
|
1582
|
+
height: g,
|
|
1583
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1584
|
+
overflow: "visible",
|
|
1585
|
+
...r,
|
|
1586
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ c("g", { children: [
|
|
1587
|
+
/* @__PURE__ */ s("path", {
|
|
1588
|
+
d: `M 0 8 l 8 -8 H ${t} l -8 8 Z`,
|
|
1589
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
1590
|
+
stroke: v,
|
|
1591
|
+
fill: _
|
|
1592
|
+
}),
|
|
1593
|
+
/* @__PURE__ */ s("path", {
|
|
1594
|
+
d: `M ${t} 0 V ${n - 8} l -8 8 V 8 Z`,
|
|
1595
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
1596
|
+
stroke: v,
|
|
1597
|
+
fill: _
|
|
1598
|
+
}),
|
|
1599
|
+
/* @__PURE__ */ s(V, {
|
|
1600
|
+
x: "0",
|
|
1601
|
+
y: "8",
|
|
1602
|
+
width: t - 8,
|
|
1603
|
+
height: n - 8,
|
|
1604
|
+
stroke: v,
|
|
1605
|
+
fill: _
|
|
1606
|
+
})
|
|
1607
|
+
] }), /* @__PURE__ */ s(kn, {
|
|
1608
|
+
name: l,
|
|
1609
|
+
stereotype: u,
|
|
1610
|
+
showStereotype: f,
|
|
1611
|
+
width: t,
|
|
1612
|
+
height: n,
|
|
1613
|
+
sideReserve: 24,
|
|
1614
|
+
verticalAnchor: "top",
|
|
1615
|
+
nameTextDecoration: "underline",
|
|
1616
|
+
fill: y
|
|
1617
|
+
})] }), a && /* @__PURE__ */ s(P, {
|
|
1618
|
+
x: t - 15,
|
|
1619
|
+
y: -15,
|
|
1620
|
+
score: p
|
|
1621
|
+
})]
|
|
1622
|
+
});
|
|
1623
|
+
}, jt = ({ id: e, width: t, height: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, showAssessmentResults: a = !1, data: o }) => {
|
|
1624
|
+
let { name: l, isComponentHeaderShown: u } = o, d = M(h((e) => e.assessments))[e]?.score, f = t * (i ?? 1), p = n * (i ?? 1), { fillColor: m, strokeColor: g, textColor: _ } = F(o);
|
|
1625
|
+
return /* @__PURE__ */ c("svg", {
|
|
1626
|
+
width: f,
|
|
1627
|
+
height: p,
|
|
1628
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1629
|
+
overflow: "visible",
|
|
1630
|
+
...r,
|
|
1631
|
+
children: [/* @__PURE__ */ c("g", { children: [
|
|
1632
|
+
/* @__PURE__ */ s(V, {
|
|
1633
|
+
x: 0,
|
|
1634
|
+
y: 0,
|
|
1635
|
+
width: t,
|
|
1636
|
+
height: n,
|
|
1637
|
+
stroke: g,
|
|
1638
|
+
fill: m
|
|
1639
|
+
}),
|
|
1640
|
+
/* @__PURE__ */ c("g", {
|
|
1641
|
+
transform: `translate(${t - 32}, 8)`,
|
|
1642
|
+
children: [/* @__PURE__ */ s("path", {
|
|
1643
|
+
d: "M 4.8 0 L 24 0 L 24 24 L 4.8 24 L 4.8 19.2 L 0 19.2 L 0 14.4 L 4.8 14.4 L 4.8 9.6 L 0 9.6 L 0 4.8 L 4.8 4.8 Z",
|
|
1644
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1645
|
+
strokeMiterlimit: "10",
|
|
1646
|
+
stroke: g,
|
|
1647
|
+
fill: m
|
|
1648
|
+
}), /* @__PURE__ */ s("path", {
|
|
1649
|
+
d: "M 4.8 4.8 L 9.6 4.8 L 9.6 9.6 L 4.8 9.6 M 4.8 14.4 L 9.6 14.4 L 9.6 19.2 L 4.8 19.2",
|
|
1650
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1651
|
+
strokeMiterlimit: "10",
|
|
1652
|
+
stroke: g,
|
|
1653
|
+
fill: "none"
|
|
1654
|
+
})]
|
|
1655
|
+
}),
|
|
1656
|
+
/* @__PURE__ */ s(kn, {
|
|
1657
|
+
name: l,
|
|
1658
|
+
stereotype: "component",
|
|
1659
|
+
showStereotype: !!u,
|
|
1660
|
+
width: t,
|
|
1661
|
+
height: n,
|
|
1662
|
+
fill: _
|
|
1663
|
+
})
|
|
1664
|
+
] }), a && /* @__PURE__ */ s(P, {
|
|
1665
|
+
x: t - 15,
|
|
1666
|
+
y: -15,
|
|
1667
|
+
score: d
|
|
1668
|
+
})]
|
|
1669
|
+
});
|
|
1670
|
+
}, Mt = ({ id: e, width: t, height: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, showAssessmentResults: a = !1, data: o }) => {
|
|
1671
|
+
let { name: l } = o, u = M(h((e) => e.assessments))[e]?.score, d = t * (i ?? 1), f = n * (i ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(o);
|
|
1672
|
+
return /* @__PURE__ */ c("svg", {
|
|
1673
|
+
width: d,
|
|
1674
|
+
height: f,
|
|
1675
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1676
|
+
overflow: "visible",
|
|
1677
|
+
...r,
|
|
1678
|
+
children: [/* @__PURE__ */ c("g", { children: [
|
|
1679
|
+
/* @__PURE__ */ s(V, {
|
|
1680
|
+
x: 0,
|
|
1681
|
+
y: 0,
|
|
1682
|
+
width: t,
|
|
1683
|
+
height: n,
|
|
1684
|
+
stroke: m,
|
|
1685
|
+
fill: p
|
|
1686
|
+
}),
|
|
1687
|
+
/* @__PURE__ */ c("g", {
|
|
1688
|
+
transform: `translate(${t - 25}, 7)`,
|
|
1689
|
+
children: [/* @__PURE__ */ s("path", {
|
|
1690
|
+
d: "M 0 0 L 13 0 L 19.2 7.25 L 19.2 24 L 0 24 L 0 0 Z",
|
|
1691
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1692
|
+
strokeMiterlimit: "10",
|
|
1693
|
+
stroke: m,
|
|
1694
|
+
fill: p
|
|
1695
|
+
}), /* @__PURE__ */ s("path", {
|
|
1696
|
+
d: "M 13 0 L 13 7.25 L 19.2 7.25",
|
|
1697
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1698
|
+
strokeMiterlimit: "10",
|
|
1699
|
+
stroke: m,
|
|
1700
|
+
fill: "none"
|
|
1701
|
+
})]
|
|
1702
|
+
}),
|
|
1703
|
+
/* @__PURE__ */ s(j, {
|
|
1704
|
+
text: l,
|
|
1705
|
+
x: t / 2,
|
|
1706
|
+
y: 25,
|
|
1707
|
+
maxWidth: t - 60,
|
|
1708
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
1709
|
+
fontWeight: "bold",
|
|
1710
|
+
fill: g,
|
|
1711
|
+
verticalAnchor: "top",
|
|
1712
|
+
maxLines: A(n - 16, Y.NAME_LINE_HEIGHT)
|
|
1713
|
+
})
|
|
1714
|
+
] }), a && /* @__PURE__ */ s(P, {
|
|
1715
|
+
x: t - 15,
|
|
1716
|
+
y: -15,
|
|
1717
|
+
score: u
|
|
1718
|
+
})]
|
|
1719
|
+
});
|
|
1720
|
+
}, Nt = ({ id: e, width: t, height: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, showAssessmentResults: a = !1, data: o, labelSide: l }) => {
|
|
1721
|
+
let { name: u } = o, d = M(h((e) => e.assessments))[e]?.score, f = t * (i ?? 1), p = n * (i ?? 1), { fillColor: m, strokeColor: g, textColor: _ } = F(o);
|
|
1722
|
+
return /* @__PURE__ */ c("svg", {
|
|
1723
|
+
width: f,
|
|
1724
|
+
height: p,
|
|
1725
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1726
|
+
overflow: "visible",
|
|
1727
|
+
...r,
|
|
1728
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s("circle", {
|
|
1729
|
+
cx: t / 2,
|
|
1730
|
+
cy: n / 2,
|
|
1731
|
+
r: t / 2,
|
|
1732
|
+
strokeWidth: Y.LINE_WIDTH_EDGE,
|
|
1733
|
+
stroke: g,
|
|
1734
|
+
fill: m
|
|
1735
|
+
}), /* @__PURE__ */ s(gt, {
|
|
1736
|
+
name: u,
|
|
1737
|
+
width: t,
|
|
1738
|
+
height: n,
|
|
1739
|
+
fill: _,
|
|
1740
|
+
side: l
|
|
1741
|
+
})] }), a && /* @__PURE__ */ s(P, {
|
|
1742
|
+
x: t - 15,
|
|
1743
|
+
y: -15,
|
|
1744
|
+
score: d
|
|
1745
|
+
})]
|
|
1746
|
+
});
|
|
1747
|
+
}, Pt = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
1748
|
+
let { name: l, taskType: u, marker: d } = r, f = M(h((e) => e.assessments))[e]?.score, p = t * (a ?? 1), m = n * (a ?? 1), { fillColor: g, strokeColor: _, textColor: v } = F(r), y = (() => {
|
|
1749
|
+
switch (u) {
|
|
1750
|
+
case "user": return /* @__PURE__ */ c("g", {
|
|
1751
|
+
transform: "translate(10,10)",
|
|
1752
|
+
children: [/* @__PURE__ */ s("circle", {
|
|
1753
|
+
cx: 10,
|
|
1754
|
+
cy: 4,
|
|
1755
|
+
r: 4,
|
|
1756
|
+
fill: "none",
|
|
1757
|
+
stroke: _,
|
|
1758
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
1759
|
+
}), /* @__PURE__ */ s("polyline", {
|
|
1760
|
+
points: "4 16, 4 11, 16 11, 16 16",
|
|
1761
|
+
fill: "none",
|
|
1762
|
+
stroke: _,
|
|
1763
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
1764
|
+
})]
|
|
1765
|
+
});
|
|
1766
|
+
case "send": return /* @__PURE__ */ c("g", {
|
|
1767
|
+
transform: "translate(10,10)",
|
|
1768
|
+
children: [/* @__PURE__ */ s("polyline", {
|
|
1769
|
+
points: "0.2 3, 19.8 3, 10 11, 0.2 3",
|
|
1770
|
+
fill: _,
|
|
1771
|
+
stroke: _,
|
|
1772
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1773
|
+
strokeLinecap: "round",
|
|
1774
|
+
strokeLinejoin: "round"
|
|
1775
|
+
}), /* @__PURE__ */ s("polyline", {
|
|
1776
|
+
points: "0 5.5, 0 17, 20 17, 20 5.5, 10 13.5, 0 5.5",
|
|
1777
|
+
fill: _,
|
|
1778
|
+
stroke: _,
|
|
1779
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1780
|
+
strokeLinecap: "round",
|
|
1781
|
+
strokeLinejoin: "round"
|
|
1782
|
+
})]
|
|
1783
|
+
});
|
|
1784
|
+
case "receive": return /* @__PURE__ */ s("g", {
|
|
1785
|
+
transform: "translate(10,10)",
|
|
1786
|
+
children: /* @__PURE__ */ s("polyline", {
|
|
1787
|
+
points: "0 3, 0 17, 20 17, 20 3, 10 11, 0 3, 20 3",
|
|
1788
|
+
fill: "none",
|
|
1789
|
+
stroke: _,
|
|
1790
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1791
|
+
strokeLinecap: "round",
|
|
1792
|
+
strokeLinejoin: "round"
|
|
1793
|
+
})
|
|
1794
|
+
});
|
|
1795
|
+
case "manual": return /* @__PURE__ */ s("g", {
|
|
1796
|
+
transform: "translate(10,10)",
|
|
1797
|
+
children: /* @__PURE__ */ s("path", {
|
|
1798
|
+
d: "M5 1.5C5 2.5 5 8 5 8M5 1.5C5 0.499993 7 0.500007 7 1.5M5 1.5C5 1.5 5 4.00001 5 3.00001C5 2 3 1.93337 3 3.00001C3 4.06664 3 10 3 10C3 10 3 8.25001 3 7.25001C3 6.25 1 6.25 1 7.25001C1 8.25001 1 12 1 12L3 14V16H9V14L11 12V8.56252C11 8.56252 11 5 11 4C11 3 9 3 9 4C9 5 9 3.00001 9 3.00001M7 1.5C7 2.49999 7 8 7 8M7 1.5C7 1.5 7 4.00001 7 3.00001C7 2.00001 9 2.00001 9 3.00001M9 3.00001V8",
|
|
1799
|
+
fill: "none",
|
|
1800
|
+
stroke: _,
|
|
1801
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1802
|
+
strokeLinejoin: "round"
|
|
1803
|
+
})
|
|
1804
|
+
});
|
|
1805
|
+
case "business-rule": return /* @__PURE__ */ c("g", {
|
|
1806
|
+
transform: "translate(10,10)",
|
|
1807
|
+
children: [
|
|
1808
|
+
/* @__PURE__ */ s("rect", {
|
|
1809
|
+
x: 2,
|
|
1810
|
+
y: 2,
|
|
1811
|
+
width: 16,
|
|
1812
|
+
height: 16,
|
|
1813
|
+
fill: "none",
|
|
1814
|
+
stroke: _,
|
|
1815
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1816
|
+
strokeLinejoin: "round"
|
|
1817
|
+
}),
|
|
1818
|
+
/* @__PURE__ */ s("rect", {
|
|
1819
|
+
x: 2,
|
|
1820
|
+
y: 2,
|
|
1821
|
+
width: 16,
|
|
1822
|
+
height: 4,
|
|
1823
|
+
fill: "currentColor",
|
|
1824
|
+
stroke: _,
|
|
1825
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1826
|
+
strokeLinejoin: "round"
|
|
1827
|
+
}),
|
|
1828
|
+
/* @__PURE__ */ s("polyline", {
|
|
1829
|
+
points: "2 10, 18 10",
|
|
1830
|
+
stroke: _,
|
|
1831
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1832
|
+
strokeLinecap: "round",
|
|
1833
|
+
strokeLinejoin: "round"
|
|
1834
|
+
}),
|
|
1835
|
+
/* @__PURE__ */ s("polyline", {
|
|
1836
|
+
points: "2 14, 18 14",
|
|
1837
|
+
stroke: _,
|
|
1838
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1839
|
+
strokeLinecap: "round",
|
|
1840
|
+
strokeLinejoin: "round"
|
|
1841
|
+
}),
|
|
1842
|
+
/* @__PURE__ */ s("polyline", {
|
|
1843
|
+
points: "6 2, 6 18",
|
|
1844
|
+
stroke: _,
|
|
1845
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1846
|
+
strokeLinecap: "round",
|
|
1847
|
+
strokeLinejoin: "round"
|
|
1848
|
+
})
|
|
1849
|
+
]
|
|
1850
|
+
});
|
|
1851
|
+
case "script": return /* @__PURE__ */ c("g", {
|
|
1852
|
+
transform: "translate(10,10)",
|
|
1853
|
+
children: [
|
|
1854
|
+
/* @__PURE__ */ s("rect", {
|
|
1855
|
+
x: 2,
|
|
1856
|
+
y: 2,
|
|
1857
|
+
width: 16,
|
|
1858
|
+
height: 16,
|
|
1859
|
+
fill: "none",
|
|
1860
|
+
stroke: _,
|
|
1861
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1862
|
+
strokeLinejoin: "round"
|
|
1863
|
+
}),
|
|
1864
|
+
/* @__PURE__ */ s("polyline", {
|
|
1865
|
+
points: "6 6, 12 6",
|
|
1866
|
+
fill: "none",
|
|
1867
|
+
stroke: _,
|
|
1868
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1869
|
+
strokeLinecap: "round",
|
|
1870
|
+
strokeLinejoin: "round"
|
|
1871
|
+
}),
|
|
1872
|
+
/* @__PURE__ */ s("polyline", {
|
|
1873
|
+
points: "6 10, 14 10",
|
|
1874
|
+
fill: "none",
|
|
1875
|
+
stroke: _,
|
|
1876
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1877
|
+
strokeLinecap: "round",
|
|
1878
|
+
strokeLinejoin: "round"
|
|
1879
|
+
}),
|
|
1880
|
+
/* @__PURE__ */ s("polyline", {
|
|
1881
|
+
points: "6 14, 10 14",
|
|
1882
|
+
fill: "none",
|
|
1883
|
+
stroke: _,
|
|
1884
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1885
|
+
strokeLinecap: "round",
|
|
1886
|
+
strokeLinejoin: "round"
|
|
1887
|
+
})
|
|
1888
|
+
]
|
|
1889
|
+
});
|
|
1890
|
+
default: return null;
|
|
1891
|
+
}
|
|
1892
|
+
})(), b = (() => {
|
|
1893
|
+
switch (d) {
|
|
1894
|
+
case "parallel multi instance": return /* @__PURE__ */ c("g", {
|
|
1895
|
+
transform: `translate(${t / 2 - 7}, ${n - 16})`,
|
|
1896
|
+
children: [
|
|
1897
|
+
/* @__PURE__ */ s("polyline", {
|
|
1898
|
+
points: "3 3, 3 11",
|
|
1899
|
+
stroke: _,
|
|
1900
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1901
|
+
strokeLinecap: "round",
|
|
1902
|
+
strokeLinejoin: "round"
|
|
1903
|
+
}),
|
|
1904
|
+
/* @__PURE__ */ s("polyline", {
|
|
1905
|
+
points: "7 3, 7 11",
|
|
1906
|
+
stroke: _,
|
|
1907
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1908
|
+
strokeLinecap: "round",
|
|
1909
|
+
strokeLinejoin: "round"
|
|
1910
|
+
}),
|
|
1911
|
+
/* @__PURE__ */ s("polyline", {
|
|
1912
|
+
points: "11 3, 11 11",
|
|
1913
|
+
stroke: _,
|
|
1914
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1915
|
+
strokeLinecap: "round",
|
|
1916
|
+
strokeLinejoin: "round"
|
|
1917
|
+
})
|
|
1918
|
+
]
|
|
1919
|
+
});
|
|
1920
|
+
case "sequential multi instance": return /* @__PURE__ */ c("g", {
|
|
1921
|
+
transform: `translate(${t / 2 - 7}, ${n - 16})`,
|
|
1922
|
+
children: [
|
|
1923
|
+
/* @__PURE__ */ s("polyline", {
|
|
1924
|
+
points: "3 3, 11 3",
|
|
1925
|
+
stroke: _,
|
|
1926
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1927
|
+
strokeLinecap: "round",
|
|
1928
|
+
strokeLinejoin: "round"
|
|
1929
|
+
}),
|
|
1930
|
+
/* @__PURE__ */ s("polyline", {
|
|
1931
|
+
points: "3 7, 11 7",
|
|
1932
|
+
stroke: _,
|
|
1933
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1934
|
+
strokeLinecap: "round",
|
|
1935
|
+
strokeLinejoin: "round"
|
|
1936
|
+
}),
|
|
1937
|
+
/* @__PURE__ */ s("polyline", {
|
|
1938
|
+
points: "3 11, 11 11",
|
|
1939
|
+
stroke: _,
|
|
1940
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1941
|
+
strokeLinecap: "round",
|
|
1942
|
+
strokeLinejoin: "round"
|
|
1943
|
+
})
|
|
1944
|
+
]
|
|
1945
|
+
});
|
|
1946
|
+
case "loop": return /* @__PURE__ */ c("g", {
|
|
1947
|
+
transform: `translate(${t / 2 - 7}, ${n - 16})`,
|
|
1948
|
+
children: [/* @__PURE__ */ s("path", {
|
|
1949
|
+
d: "M7,3 A 4 4 30 1 1 3.535 5",
|
|
1950
|
+
fill: "none",
|
|
1951
|
+
stroke: _,
|
|
1952
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1953
|
+
strokeLinecap: "round",
|
|
1954
|
+
strokeLinejoin: "round"
|
|
1955
|
+
}), /* @__PURE__ */ s("path", {
|
|
1956
|
+
d: "M9.5,1.5 L7,3 L8,6",
|
|
1957
|
+
fill: "none",
|
|
1958
|
+
stroke: _,
|
|
1959
|
+
strokeWidth: Y.ICON_LINE_WIDTH,
|
|
1960
|
+
strokeLinecap: "round",
|
|
1961
|
+
strokeLinejoin: "round"
|
|
1962
|
+
})]
|
|
1963
|
+
});
|
|
1964
|
+
default: return null;
|
|
1965
|
+
}
|
|
1966
|
+
})();
|
|
1967
|
+
return /* @__PURE__ */ c("svg", {
|
|
1968
|
+
width: p,
|
|
1969
|
+
height: m,
|
|
1970
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
1971
|
+
overflow: "visible",
|
|
1972
|
+
...i,
|
|
1973
|
+
children: [/* @__PURE__ */ c("g", { children: [
|
|
1974
|
+
/* @__PURE__ */ s(V, {
|
|
1975
|
+
x: 0,
|
|
1976
|
+
y: 0,
|
|
1977
|
+
width: t,
|
|
1978
|
+
height: n,
|
|
1979
|
+
rx: 10,
|
|
1980
|
+
ry: 10,
|
|
1981
|
+
fill: g,
|
|
1982
|
+
stroke: _
|
|
1983
|
+
}),
|
|
1984
|
+
y,
|
|
1985
|
+
/* @__PURE__ */ s(j, {
|
|
1986
|
+
text: l,
|
|
1987
|
+
x: t / 2,
|
|
1988
|
+
y: n / 2,
|
|
1989
|
+
maxWidth: t - 16,
|
|
1990
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
1991
|
+
fontWeight: "bold",
|
|
1992
|
+
fill: v,
|
|
1993
|
+
maxLines: A(n - (u ? 30 : 8) - (d ? 20 : 8), 19)
|
|
1994
|
+
}),
|
|
1995
|
+
b
|
|
1996
|
+
] }), o && /* @__PURE__ */ s(P, {
|
|
1997
|
+
x: t - 15,
|
|
1998
|
+
y: -15,
|
|
1999
|
+
score: f
|
|
2000
|
+
})]
|
|
2001
|
+
});
|
|
2002
|
+
}, U = ({ width: e, height: t, svgAttributes: n, SIDEBAR_PREVIEW_SCALE: r, variant: i, data: a, id: o, showAssessmentResults: l = !1 }) => {
|
|
2003
|
+
let { name: u, eventType: d } = a, f = M(h((e) => e.assessments))[o]?.score, p = e * (r ?? 1), m = t * (r ?? 1), g = Math.min(e, t) / 2, _ = i === "intermediate", v = i === "end", { fillColor: y, strokeColor: b, textColor: x } = F(a), S = (() => {
|
|
2004
|
+
let n = `translate(${e / 2 - 10},${t / 2 - 10})`, r = d;
|
|
2005
|
+
if (!r) return null;
|
|
2006
|
+
if (i === "start") switch (r) {
|
|
2007
|
+
case "message": return /* @__PURE__ */ s("g", {
|
|
2008
|
+
transform: n,
|
|
2009
|
+
children: /* @__PURE__ */ s("polyline", {
|
|
2010
|
+
points: "0 3, 0 17, 20 17, 20 3, 10 11, 0 3, 20 3",
|
|
2011
|
+
fill: "none",
|
|
2012
|
+
stroke: b,
|
|
2013
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2014
|
+
})
|
|
2015
|
+
});
|
|
2016
|
+
case "timer": return /* @__PURE__ */ c("g", {
|
|
2017
|
+
transform: n,
|
|
2018
|
+
children: [/* @__PURE__ */ s("circle", {
|
|
2019
|
+
cx: 10,
|
|
2020
|
+
cy: 10,
|
|
2021
|
+
r: 10,
|
|
2022
|
+
fill: "none",
|
|
2023
|
+
stroke: b,
|
|
2024
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2025
|
+
}), /* @__PURE__ */ s("polyline", {
|
|
2026
|
+
points: "10 4, 10 10, 13 13",
|
|
2027
|
+
strokeLinecap: "round",
|
|
2028
|
+
strokeLinejoin: "round",
|
|
2029
|
+
fill: "none",
|
|
2030
|
+
stroke: b,
|
|
2031
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2032
|
+
})]
|
|
2033
|
+
});
|
|
2034
|
+
case "conditional": return /* @__PURE__ */ c("g", {
|
|
2035
|
+
transform: n,
|
|
2036
|
+
children: [
|
|
2037
|
+
/* @__PURE__ */ s("rect", {
|
|
2038
|
+
x: 2,
|
|
2039
|
+
y: 2,
|
|
2040
|
+
width: 16,
|
|
2041
|
+
height: 16,
|
|
2042
|
+
fill: "none",
|
|
2043
|
+
stroke: b,
|
|
2044
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2045
|
+
}),
|
|
2046
|
+
/* @__PURE__ */ s("polyline", {
|
|
2047
|
+
points: "6 7, 14 7",
|
|
2048
|
+
stroke: b,
|
|
2049
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2050
|
+
}),
|
|
2051
|
+
/* @__PURE__ */ s("polyline", {
|
|
2052
|
+
points: "6 13, 14 13",
|
|
2053
|
+
stroke: b,
|
|
2054
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2055
|
+
})
|
|
2056
|
+
]
|
|
2057
|
+
});
|
|
2058
|
+
case "signal": return /* @__PURE__ */ s("g", {
|
|
2059
|
+
transform: n,
|
|
2060
|
+
children: /* @__PURE__ */ s("polyline", {
|
|
2061
|
+
points: "10 3, 3 15, 17 15, 10 3",
|
|
2062
|
+
fill: "none",
|
|
2063
|
+
stroke: b,
|
|
2064
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2065
|
+
})
|
|
2066
|
+
});
|
|
2067
|
+
}
|
|
2068
|
+
if (i === "intermediate") switch (r) {
|
|
2069
|
+
case "message-catch": return /* @__PURE__ */ s("g", {
|
|
2070
|
+
transform: n,
|
|
2071
|
+
children: /* @__PURE__ */ s("polyline", {
|
|
2072
|
+
points: "0 3, 0 17, 20 17, 20 3, 10 11, 0 3, 20 3",
|
|
2073
|
+
fill: "none",
|
|
2074
|
+
stroke: b,
|
|
2075
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2076
|
+
})
|
|
2077
|
+
});
|
|
2078
|
+
case "message-throw": return /* @__PURE__ */ c("g", {
|
|
2079
|
+
transform: n,
|
|
2080
|
+
children: [/* @__PURE__ */ s("polyline", {
|
|
2081
|
+
points: "0.2 3, 19.8 3, 10 11, 0.2 3",
|
|
2082
|
+
fill: b,
|
|
2083
|
+
stroke: b,
|
|
2084
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2085
|
+
}), /* @__PURE__ */ s("polyline", {
|
|
2086
|
+
points: "0 5.5, 0 17, 20 17, 20 5.5, 10 13.5, 0 5.5",
|
|
2087
|
+
fill: b,
|
|
2088
|
+
stroke: b,
|
|
2089
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2090
|
+
})]
|
|
2091
|
+
});
|
|
2092
|
+
case "timer-catch": return /* @__PURE__ */ c("g", {
|
|
2093
|
+
transform: n,
|
|
2094
|
+
children: [/* @__PURE__ */ s("circle", {
|
|
2095
|
+
cx: 10,
|
|
2096
|
+
cy: 10,
|
|
2097
|
+
r: 10,
|
|
2098
|
+
fill: "none",
|
|
2099
|
+
stroke: b,
|
|
2100
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2101
|
+
}), /* @__PURE__ */ s("polyline", {
|
|
2102
|
+
points: "10 4, 10 10, 13 13",
|
|
2103
|
+
strokeLinecap: "round",
|
|
2104
|
+
strokeLinejoin: "round",
|
|
2105
|
+
fill: "none",
|
|
2106
|
+
stroke: b,
|
|
2107
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2108
|
+
})]
|
|
2109
|
+
});
|
|
2110
|
+
case "escalation-throw": return /* @__PURE__ */ s("g", {
|
|
2111
|
+
transform: n,
|
|
2112
|
+
children: /* @__PURE__ */ s("polyline", {
|
|
2113
|
+
points: "10 3, 4 15, 10 12, 16 15, 10 3",
|
|
2114
|
+
stroke: b,
|
|
2115
|
+
fill: b,
|
|
2116
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2117
|
+
})
|
|
2118
|
+
});
|
|
2119
|
+
case "conditional-catch": return /* @__PURE__ */ c("g", {
|
|
2120
|
+
transform: n,
|
|
2121
|
+
children: [
|
|
2122
|
+
/* @__PURE__ */ s("rect", {
|
|
2123
|
+
x: 2,
|
|
2124
|
+
y: 2,
|
|
2125
|
+
width: 16,
|
|
2126
|
+
height: 16,
|
|
2127
|
+
fill: "none",
|
|
2128
|
+
stroke: b,
|
|
2129
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2130
|
+
}),
|
|
2131
|
+
/* @__PURE__ */ s("polyline", {
|
|
2132
|
+
points: "6 7, 14 7",
|
|
2133
|
+
stroke: b,
|
|
2134
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2135
|
+
}),
|
|
2136
|
+
/* @__PURE__ */ s("polyline", {
|
|
2137
|
+
points: "6 13, 14 13",
|
|
2138
|
+
stroke: b,
|
|
2139
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2140
|
+
})
|
|
2141
|
+
]
|
|
2142
|
+
});
|
|
2143
|
+
case "link-catch": return /* @__PURE__ */ s("g", {
|
|
2144
|
+
transform: n,
|
|
2145
|
+
children: /* @__PURE__ */ s("polyline", {
|
|
2146
|
+
points: "3 7, 13 7, 13 4, 18 10, 13 16, 13 13, 3 13, 3 7",
|
|
2147
|
+
fill: "none",
|
|
2148
|
+
stroke: b,
|
|
2149
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2150
|
+
})
|
|
2151
|
+
});
|
|
2152
|
+
case "link-throw": return /* @__PURE__ */ s("g", {
|
|
2153
|
+
transform: n,
|
|
2154
|
+
children: /* @__PURE__ */ s("polyline", {
|
|
2155
|
+
points: "3 7, 13 7, 13 4, 18 10, 13 16, 13 13, 3 13, 3 7",
|
|
2156
|
+
fill: b,
|
|
2157
|
+
stroke: b,
|
|
2158
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2159
|
+
})
|
|
2160
|
+
});
|
|
2161
|
+
case "compensation-throw": return /* @__PURE__ */ c("g", {
|
|
2162
|
+
transform: n,
|
|
2163
|
+
children: [/* @__PURE__ */ s("polyline", {
|
|
2164
|
+
points: "3 10, 9 6, 9 14, 3 10",
|
|
2165
|
+
fill: b,
|
|
2166
|
+
stroke: b,
|
|
2167
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2168
|
+
}), /* @__PURE__ */ s("polyline", {
|
|
2169
|
+
points: "10 10, 16 6, 16 14, 10 10",
|
|
2170
|
+
fill: b,
|
|
2171
|
+
stroke: b,
|
|
2172
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2173
|
+
})]
|
|
2174
|
+
});
|
|
2175
|
+
case "signal-catch": return /* @__PURE__ */ s("g", {
|
|
2176
|
+
transform: n,
|
|
2177
|
+
children: /* @__PURE__ */ s("polyline", {
|
|
2178
|
+
points: "10 3, 3 15, 17 15, 10 3",
|
|
2179
|
+
fill: "none",
|
|
2180
|
+
stroke: b,
|
|
2181
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2182
|
+
})
|
|
2183
|
+
});
|
|
2184
|
+
case "signal-throw": return /* @__PURE__ */ s("g", {
|
|
2185
|
+
transform: n,
|
|
2186
|
+
children: /* @__PURE__ */ s("polyline", {
|
|
2187
|
+
points: "10 3, 3 15, 17 15, 10 3",
|
|
2188
|
+
fill: b,
|
|
2189
|
+
stroke: b,
|
|
2190
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2191
|
+
})
|
|
2192
|
+
});
|
|
2193
|
+
}
|
|
2194
|
+
if (i === "end") switch (r) {
|
|
2195
|
+
case "message": return /* @__PURE__ */ c("g", {
|
|
2196
|
+
transform: n,
|
|
2197
|
+
children: [/* @__PURE__ */ s("polyline", {
|
|
2198
|
+
points: "0.2 3, 19.8 3, 10 11, 0.2 3",
|
|
2199
|
+
fill: b,
|
|
2200
|
+
stroke: b,
|
|
2201
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2202
|
+
}), /* @__PURE__ */ s("polyline", {
|
|
2203
|
+
points: "0 5.5, 0 17, 20 17, 20 5.5, 10 13.5, 0 5.5",
|
|
2204
|
+
fill: b,
|
|
2205
|
+
stroke: b,
|
|
2206
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2207
|
+
})]
|
|
2208
|
+
});
|
|
2209
|
+
case "escalation": return /* @__PURE__ */ s("g", {
|
|
2210
|
+
transform: n,
|
|
2211
|
+
children: /* @__PURE__ */ s("polyline", {
|
|
2212
|
+
points: "10 3, 4 15, 10 12, 16 15, 10 3",
|
|
2213
|
+
stroke: b,
|
|
2214
|
+
fill: b,
|
|
2215
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2216
|
+
})
|
|
2217
|
+
});
|
|
2218
|
+
case "error": return /* @__PURE__ */ s("g", {
|
|
2219
|
+
transform: n,
|
|
2220
|
+
children: /* @__PURE__ */ s("polyline", {
|
|
2221
|
+
points: "3 16, 6 4, 13 11, 17 4, 14 16, 7 10, 3 16",
|
|
2222
|
+
fill: b,
|
|
2223
|
+
stroke: b,
|
|
2224
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2225
|
+
})
|
|
2226
|
+
});
|
|
2227
|
+
case "compensation": return /* @__PURE__ */ c("g", {
|
|
2228
|
+
transform: n,
|
|
2229
|
+
children: [/* @__PURE__ */ s("polyline", {
|
|
2230
|
+
points: "3 10, 9 6, 9 14, 3 10",
|
|
2231
|
+
fill: b,
|
|
2232
|
+
stroke: b,
|
|
2233
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2234
|
+
}), /* @__PURE__ */ s("polyline", {
|
|
2235
|
+
points: "10 10, 16 6, 16 14, 10 10",
|
|
2236
|
+
fill: b,
|
|
2237
|
+
stroke: b,
|
|
2238
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2239
|
+
})]
|
|
2240
|
+
});
|
|
2241
|
+
case "signal": return /* @__PURE__ */ s("g", {
|
|
2242
|
+
transform: n,
|
|
2243
|
+
children: /* @__PURE__ */ s("polyline", {
|
|
2244
|
+
points: "10 3, 3 15, 17 15, 10 3",
|
|
2245
|
+
fill: b,
|
|
2246
|
+
stroke: b,
|
|
2247
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2248
|
+
})
|
|
2249
|
+
});
|
|
2250
|
+
case "terminate": return /* @__PURE__ */ s("g", {
|
|
2251
|
+
transform: n,
|
|
2252
|
+
children: /* @__PURE__ */ s("circle", {
|
|
2253
|
+
cx: 10,
|
|
2254
|
+
cy: 10,
|
|
2255
|
+
r: 8,
|
|
2256
|
+
fill: b,
|
|
2257
|
+
stroke: b,
|
|
2258
|
+
strokeWidth: Y.ICON_LINE_WIDTH
|
|
2259
|
+
})
|
|
2260
|
+
});
|
|
2261
|
+
}
|
|
2262
|
+
return null;
|
|
2263
|
+
})();
|
|
2264
|
+
return /* @__PURE__ */ c("svg", {
|
|
2265
|
+
width: p,
|
|
2266
|
+
height: m,
|
|
2267
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
2268
|
+
overflow: "visible",
|
|
2269
|
+
...n,
|
|
2270
|
+
children: [
|
|
2271
|
+
/* @__PURE__ */ s("circle", {
|
|
2272
|
+
cx: e / 2,
|
|
2273
|
+
cy: t / 2,
|
|
2274
|
+
r: g,
|
|
2275
|
+
strokeWidth: v ? Y.LINE_WIDTH * 2 : Y.LINE_WIDTH,
|
|
2276
|
+
stroke: b,
|
|
2277
|
+
fill: y
|
|
2278
|
+
}),
|
|
2279
|
+
_ && /* @__PURE__ */ s("circle", {
|
|
2280
|
+
cx: e / 2,
|
|
2281
|
+
cy: t / 2,
|
|
2282
|
+
r: g - 3.5,
|
|
2283
|
+
stroke: b,
|
|
2284
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
2285
|
+
fill: y
|
|
2286
|
+
}),
|
|
2287
|
+
S,
|
|
2288
|
+
u && /* @__PURE__ */ s(D, {
|
|
2289
|
+
x: e / 2,
|
|
2290
|
+
y: t + 10,
|
|
2291
|
+
textAnchor: "middle",
|
|
2292
|
+
fontWeight: "normal",
|
|
2293
|
+
fontSize: 14,
|
|
2294
|
+
dominantBaseline: "hanging",
|
|
2295
|
+
fill: x,
|
|
2296
|
+
children: u
|
|
2297
|
+
}),
|
|
2298
|
+
l && /* @__PURE__ */ s(P, {
|
|
2299
|
+
x: e - 15,
|
|
2300
|
+
y: -15,
|
|
2301
|
+
score: f
|
|
2302
|
+
})
|
|
2303
|
+
]
|
|
2304
|
+
});
|
|
2305
|
+
}, Ft = ({ width: e, height: t, svgAttributes: n, SIDEBAR_PREVIEW_SCALE: r, id: i, data: a, showAssessmentResults: o = !1 }) => {
|
|
2306
|
+
let { name: l, gatewayType: u = "exclusive" } = a, d = M(h((e) => e.assessments))[i]?.score, f = e * (r ?? 1), p = t * (r ?? 1), m = e / 2, g = t / 2, _ = Math.min(e, t) / 2, v = [
|
|
2307
|
+
`${m},${g - _}`,
|
|
2308
|
+
`${m + _},${g}`,
|
|
2309
|
+
`${m},${g + _}`,
|
|
2310
|
+
`${m - _},${g}`
|
|
2311
|
+
].join(" "), { fillColor: y, strokeColor: b, textColor: x } = F(a);
|
|
2312
|
+
return /* @__PURE__ */ c("svg", {
|
|
2313
|
+
width: f,
|
|
2314
|
+
height: p,
|
|
2315
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
2316
|
+
overflow: "visible",
|
|
2317
|
+
...n,
|
|
2318
|
+
children: [
|
|
2319
|
+
/* @__PURE__ */ s("polygon", {
|
|
2320
|
+
points: v,
|
|
2321
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
2322
|
+
stroke: b,
|
|
2323
|
+
fill: y
|
|
2324
|
+
}),
|
|
2325
|
+
u === "exclusive" && /* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s("line", {
|
|
2326
|
+
x1: 13,
|
|
2327
|
+
y1: 13,
|
|
2328
|
+
x2: e - 13,
|
|
2329
|
+
y2: t - 13,
|
|
2330
|
+
stroke: b,
|
|
2331
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2332
|
+
}), /* @__PURE__ */ s("line", {
|
|
2333
|
+
x1: 13,
|
|
2334
|
+
y1: t - 13,
|
|
2335
|
+
x2: e - 13,
|
|
2336
|
+
y2: 13,
|
|
2337
|
+
stroke: b,
|
|
2338
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2339
|
+
})] }),
|
|
2340
|
+
u === "parallel" && /* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s("line", {
|
|
2341
|
+
x1: e / 2,
|
|
2342
|
+
y1: 10,
|
|
2343
|
+
x2: e / 2,
|
|
2344
|
+
y2: t - 10,
|
|
2345
|
+
stroke: b,
|
|
2346
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2347
|
+
}), /* @__PURE__ */ s("line", {
|
|
2348
|
+
x1: 10,
|
|
2349
|
+
y1: t / 2,
|
|
2350
|
+
x2: e - 10,
|
|
2351
|
+
y2: t / 2,
|
|
2352
|
+
stroke: b,
|
|
2353
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2354
|
+
})] }),
|
|
2355
|
+
u === "inclusive" && /* @__PURE__ */ s("circle", {
|
|
2356
|
+
cx: e / 2,
|
|
2357
|
+
cy: t / 2,
|
|
2358
|
+
r: Math.min(e, t) / 2 - 12,
|
|
2359
|
+
fill: "none",
|
|
2360
|
+
stroke: b,
|
|
2361
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2362
|
+
}),
|
|
2363
|
+
u === "event-based" && /* @__PURE__ */ c("g", { children: [
|
|
2364
|
+
/* @__PURE__ */ s("circle", {
|
|
2365
|
+
cx: e / 2,
|
|
2366
|
+
cy: t / 2,
|
|
2367
|
+
r: Math.min(e, t) / 2 - 9,
|
|
2368
|
+
fill: "none",
|
|
2369
|
+
stroke: b,
|
|
2370
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2371
|
+
}),
|
|
2372
|
+
/* @__PURE__ */ s("circle", {
|
|
2373
|
+
cx: e / 2,
|
|
2374
|
+
cy: t / 2,
|
|
2375
|
+
r: Math.min(e, t) / 2 - 12,
|
|
2376
|
+
fill: "none",
|
|
2377
|
+
stroke: b,
|
|
2378
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2379
|
+
}),
|
|
2380
|
+
/* @__PURE__ */ s("path", {
|
|
2381
|
+
d: `M${e / 2} ${t / 2 - 4} L${e / 2 + 3.5} ${t / 2 - 1} L${e / 2 + 2} ${t / 2 + 3.5} L${e / 2 - 2} ${t / 2 + 3.5} L${e / 2 - 3.5} ${t / 2 - 1} Z`,
|
|
2382
|
+
fill: "none",
|
|
2383
|
+
stroke: b,
|
|
2384
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2385
|
+
})
|
|
2386
|
+
] }),
|
|
2387
|
+
u === "complex" && /* @__PURE__ */ c("g", { children: [
|
|
2388
|
+
/* @__PURE__ */ s("line", {
|
|
2389
|
+
x1: 13,
|
|
2390
|
+
y1: 13,
|
|
2391
|
+
x2: e - 13,
|
|
2392
|
+
y2: t - 13,
|
|
2393
|
+
stroke: b,
|
|
2394
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2395
|
+
}),
|
|
2396
|
+
/* @__PURE__ */ s("line", {
|
|
2397
|
+
x1: 13,
|
|
2398
|
+
y1: t - 13,
|
|
2399
|
+
x2: e - 13,
|
|
2400
|
+
y2: 13,
|
|
2401
|
+
stroke: b,
|
|
2402
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2403
|
+
}),
|
|
2404
|
+
/* @__PURE__ */ s("line", {
|
|
2405
|
+
x1: e / 2,
|
|
2406
|
+
y1: 10,
|
|
2407
|
+
x2: e / 2,
|
|
2408
|
+
y2: t - 10,
|
|
2409
|
+
stroke: b,
|
|
2410
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2411
|
+
}),
|
|
2412
|
+
/* @__PURE__ */ s("line", {
|
|
2413
|
+
x1: 10,
|
|
2414
|
+
y1: t / 2,
|
|
2415
|
+
x2: e - 10,
|
|
2416
|
+
y2: t / 2,
|
|
2417
|
+
stroke: b,
|
|
2418
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2419
|
+
})
|
|
2420
|
+
] }),
|
|
2421
|
+
l && /* @__PURE__ */ s(D, {
|
|
2422
|
+
x: e / 2,
|
|
2423
|
+
y: t + 10,
|
|
2424
|
+
textAnchor: "middle",
|
|
2425
|
+
fontSize: 14,
|
|
2426
|
+
dominantBaseline: "hanging",
|
|
2427
|
+
fill: x,
|
|
2428
|
+
children: l
|
|
2429
|
+
}),
|
|
2430
|
+
o && /* @__PURE__ */ s(P, {
|
|
2431
|
+
x: e - 15,
|
|
2432
|
+
y: -15,
|
|
2433
|
+
score: d
|
|
2434
|
+
})
|
|
2435
|
+
]
|
|
2436
|
+
});
|
|
2437
|
+
}, W = ({ width: e, height: t, data: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, id: a, showAssessmentResults: l = !1, variant: u = "subprocess" }) => {
|
|
2438
|
+
let { name: d } = n, f = M(h((e) => e.assessments))[a]?.score, p = e * (i ?? 1), m = t * (i ?? 1), g = u === "transaction", _ = u === "call", v = !g && !_, { fillColor: y, strokeColor: b, textColor: x } = F(n);
|
|
2439
|
+
return /* @__PURE__ */ c("svg", {
|
|
2440
|
+
width: p,
|
|
2441
|
+
height: m,
|
|
2442
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
2443
|
+
overflow: "visible",
|
|
2444
|
+
...r,
|
|
2445
|
+
children: [
|
|
2446
|
+
g && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(V, {
|
|
2447
|
+
x: 0,
|
|
2448
|
+
y: 0,
|
|
2449
|
+
width: e,
|
|
2450
|
+
height: t,
|
|
2451
|
+
rx: 10,
|
|
2452
|
+
ry: 10,
|
|
2453
|
+
fill: y,
|
|
2454
|
+
stroke: b
|
|
2455
|
+
}), /* @__PURE__ */ s(V, {
|
|
2456
|
+
x: 3,
|
|
2457
|
+
y: 3,
|
|
2458
|
+
width: e - 6,
|
|
2459
|
+
height: t - 6,
|
|
2460
|
+
rx: 7,
|
|
2461
|
+
ry: 7,
|
|
2462
|
+
fill: "none",
|
|
2463
|
+
stroke: b
|
|
2464
|
+
})] }),
|
|
2465
|
+
_ && /* @__PURE__ */ s(V, {
|
|
2466
|
+
x: 0,
|
|
2467
|
+
y: 0,
|
|
2468
|
+
width: e,
|
|
2469
|
+
height: t,
|
|
2470
|
+
strokeWidth: Y.LINE_WIDTH * 3,
|
|
2471
|
+
rx: 10,
|
|
2472
|
+
ry: 10,
|
|
2473
|
+
fill: y,
|
|
2474
|
+
stroke: b
|
|
2475
|
+
}),
|
|
2476
|
+
v && /* @__PURE__ */ c(o, { children: [
|
|
2477
|
+
/* @__PURE__ */ s(V, {
|
|
2478
|
+
x: 0,
|
|
2479
|
+
y: 0,
|
|
2480
|
+
width: e,
|
|
2481
|
+
height: t,
|
|
2482
|
+
rx: 10,
|
|
2483
|
+
ry: 10,
|
|
2484
|
+
fill: y,
|
|
2485
|
+
stroke: b
|
|
2486
|
+
}),
|
|
2487
|
+
/* @__PURE__ */ s("rect", {
|
|
2488
|
+
x: e / 2 - 7,
|
|
2489
|
+
y: t - 14,
|
|
2490
|
+
width: 14,
|
|
2491
|
+
height: 14,
|
|
2492
|
+
fill: "none",
|
|
2493
|
+
stroke: b,
|
|
2494
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2495
|
+
}),
|
|
2496
|
+
/* @__PURE__ */ s("line", {
|
|
2497
|
+
x1: e / 2 - 4,
|
|
2498
|
+
y1: t - 7,
|
|
2499
|
+
x2: e / 2 + 4,
|
|
2500
|
+
y2: t - 7,
|
|
2501
|
+
stroke: b,
|
|
2502
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2503
|
+
}),
|
|
2504
|
+
/* @__PURE__ */ s("line", {
|
|
2505
|
+
x1: e / 2,
|
|
2506
|
+
y1: t - 11,
|
|
2507
|
+
x2: e / 2,
|
|
2508
|
+
y2: t - 3,
|
|
2509
|
+
stroke: b,
|
|
2510
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2511
|
+
})
|
|
2512
|
+
] }),
|
|
2513
|
+
/* @__PURE__ */ s(j, {
|
|
2514
|
+
text: d,
|
|
2515
|
+
x: e / 2,
|
|
2516
|
+
y: t / 2,
|
|
2517
|
+
maxWidth: e - 16,
|
|
2518
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
2519
|
+
fontWeight: "bold",
|
|
2520
|
+
fill: x,
|
|
2521
|
+
maxLines: A(t - (v ? 28 : 16), Y.NAME_LINE_HEIGHT)
|
|
2522
|
+
}),
|
|
2523
|
+
l && /* @__PURE__ */ s(P, {
|
|
2524
|
+
x: e - 15,
|
|
2525
|
+
y: -15,
|
|
2526
|
+
score: f
|
|
2527
|
+
})
|
|
2528
|
+
]
|
|
2529
|
+
});
|
|
2530
|
+
}, It = ({ width: e, height: t, data: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, id: a, showAssessmentResults: o = !1 }) => {
|
|
2531
|
+
let { name: l } = n, u = M(h((e) => e.assessments))[a]?.score, d = e * (i ?? 1), f = t * (i ?? 1), { strokeColor: p, textColor: m } = F(n), g = n.fillColor || "none";
|
|
2532
|
+
return /* @__PURE__ */ c("svg", {
|
|
2533
|
+
width: d,
|
|
2534
|
+
height: f,
|
|
2535
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
2536
|
+
overflow: "visible",
|
|
2537
|
+
...r,
|
|
2538
|
+
children: [
|
|
2539
|
+
/* @__PURE__ */ s("path", {
|
|
2540
|
+
d: `M20,0 L10,0 A 10 10 280 0 0 0 10 L0,${t - 10} A 10 10 180 0 0 10 ${t} L20, ${t}`,
|
|
2541
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
2542
|
+
stroke: p,
|
|
2543
|
+
fill: g
|
|
2544
|
+
}),
|
|
2545
|
+
/* @__PURE__ */ s("rect", {
|
|
2546
|
+
x: 19,
|
|
2547
|
+
y: 0,
|
|
2548
|
+
width: e - 20,
|
|
2549
|
+
height: t,
|
|
2550
|
+
fill: g,
|
|
2551
|
+
stroke: "none",
|
|
2552
|
+
strokeWidth: 0
|
|
2553
|
+
}),
|
|
2554
|
+
/* @__PURE__ */ s(j, {
|
|
2555
|
+
text: l,
|
|
2556
|
+
x: (e + 20) / 2,
|
|
2557
|
+
y: t / 2,
|
|
2558
|
+
maxWidth: e - 28,
|
|
2559
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
2560
|
+
fontWeight: "bold",
|
|
2561
|
+
fill: m,
|
|
2562
|
+
maxLines: A(t - 16, Y.NAME_LINE_HEIGHT)
|
|
2563
|
+
}),
|
|
2564
|
+
o && /* @__PURE__ */ s(P, {
|
|
2565
|
+
x: e - 15,
|
|
2566
|
+
y: -15,
|
|
2567
|
+
score: u
|
|
2568
|
+
})
|
|
2569
|
+
]
|
|
2570
|
+
});
|
|
2571
|
+
}, Lt = ({ width: e, height: t, data: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, id: a, showAssessmentResults: o = !1 }) => {
|
|
2572
|
+
let { name: l } = n, u = M(h((e) => e.assessments))[a]?.score, d = e * (i ?? 1), f = t * (i ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(n);
|
|
2573
|
+
return /* @__PURE__ */ c("svg", {
|
|
2574
|
+
width: d,
|
|
2575
|
+
height: f,
|
|
2576
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
2577
|
+
overflow: "visible",
|
|
2578
|
+
...r,
|
|
2579
|
+
children: [
|
|
2580
|
+
/* @__PURE__ */ s("path", {
|
|
2581
|
+
d: `M0,0 L0,${t} L${e},${t} L${e},15 L${e - 15},0 L${e - 15},15 L${e},15 L${e - 15},0 L0,0`,
|
|
2582
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
2583
|
+
stroke: m,
|
|
2584
|
+
fill: p
|
|
2585
|
+
}),
|
|
2586
|
+
/* @__PURE__ */ s(D, {
|
|
2587
|
+
x: e / 2,
|
|
2588
|
+
y: t + 10,
|
|
2589
|
+
textAnchor: "middle",
|
|
2590
|
+
fontSize: 14,
|
|
2591
|
+
dominantBaseline: "hanging",
|
|
2592
|
+
fill: g,
|
|
2593
|
+
children: l
|
|
2594
|
+
}),
|
|
2595
|
+
o && /* @__PURE__ */ s(P, {
|
|
2596
|
+
x: e - 15,
|
|
2597
|
+
y: -15,
|
|
2598
|
+
score: u
|
|
2599
|
+
})
|
|
2600
|
+
]
|
|
2601
|
+
});
|
|
2602
|
+
}, Rt = ({ width: e, height: t, data: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, id: a, showAssessmentResults: o = !1 }) => {
|
|
2603
|
+
let { name: l } = n, u = M(h((e) => e.assessments))[a]?.score, d = e * (i ?? 1), f = t * (i ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(n);
|
|
2604
|
+
return /* @__PURE__ */ c("svg", {
|
|
2605
|
+
width: d,
|
|
2606
|
+
height: f,
|
|
2607
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
2608
|
+
overflow: "visible",
|
|
2609
|
+
...r,
|
|
2610
|
+
children: [
|
|
2611
|
+
/* @__PURE__ */ s("path", {
|
|
2612
|
+
d: `M 0 10 L 0 ${t - 10} A ${e / 2} 10 0 0 0 ${e} ${t - 10} L ${e} 10 A ${e / 2} 10 180 0 0 0 10`,
|
|
2613
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
2614
|
+
stroke: m,
|
|
2615
|
+
fill: p
|
|
2616
|
+
}),
|
|
2617
|
+
/* @__PURE__ */ s("path", {
|
|
2618
|
+
d: `M 0 30 A ${e / 2} 10 0 0 0 ${e} 30`,
|
|
2619
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
2620
|
+
stroke: m,
|
|
2621
|
+
fill: "none"
|
|
2622
|
+
}),
|
|
2623
|
+
/* @__PURE__ */ s("path", {
|
|
2624
|
+
d: `M 0 20 A ${e / 2} 10 0 0 0 ${e} 20`,
|
|
2625
|
+
stroke: m,
|
|
2626
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
2627
|
+
fill: "none"
|
|
2628
|
+
}),
|
|
2629
|
+
/* @__PURE__ */ s("path", {
|
|
2630
|
+
d: `M 0 10 A ${e / 2} 10 0 0 0 ${e} 10`,
|
|
2631
|
+
stroke: m,
|
|
2632
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
2633
|
+
fill: "none"
|
|
2634
|
+
}),
|
|
2635
|
+
/* @__PURE__ */ s(D, {
|
|
2636
|
+
x: e / 2,
|
|
2637
|
+
y: t + 10,
|
|
2638
|
+
textAnchor: "middle",
|
|
2639
|
+
fontSize: 14,
|
|
2640
|
+
dominantBaseline: "hanging",
|
|
2641
|
+
fill: g,
|
|
2642
|
+
children: l
|
|
2643
|
+
}),
|
|
2644
|
+
o && /* @__PURE__ */ s(P, {
|
|
2645
|
+
x: e - 15,
|
|
2646
|
+
y: -15,
|
|
2647
|
+
score: u
|
|
2648
|
+
})
|
|
2649
|
+
]
|
|
2650
|
+
});
|
|
2651
|
+
}, zt = ({ width: e, height: t, data: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, id: a, showAssessmentResults: o = !1 }) => {
|
|
2652
|
+
let { name: l } = n, u = M(h((e) => e.assessments))[a]?.score, d = e * (i ?? 1), f = t * (i ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(n);
|
|
2653
|
+
return /* @__PURE__ */ c("svg", {
|
|
2654
|
+
width: d,
|
|
2655
|
+
height: f,
|
|
2656
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
2657
|
+
overflow: "visible",
|
|
2658
|
+
...r,
|
|
2659
|
+
children: [
|
|
2660
|
+
/* @__PURE__ */ s(V, {
|
|
2661
|
+
x: 0,
|
|
2662
|
+
y: 0,
|
|
2663
|
+
width: e,
|
|
2664
|
+
height: t,
|
|
2665
|
+
fill: p,
|
|
2666
|
+
stroke: m
|
|
2667
|
+
}),
|
|
2668
|
+
/* @__PURE__ */ s("line", {
|
|
2669
|
+
x1: 40,
|
|
2670
|
+
y1: 0,
|
|
2671
|
+
x2: 40,
|
|
2672
|
+
y2: t,
|
|
2673
|
+
stroke: m,
|
|
2674
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2675
|
+
}),
|
|
2676
|
+
/* @__PURE__ */ s(D, {
|
|
2677
|
+
x: 40 / 2,
|
|
2678
|
+
y: t / 2,
|
|
2679
|
+
textAnchor: "middle",
|
|
2680
|
+
transform: `rotate(-90, ${40 / 2}, ${t / 2})`,
|
|
2681
|
+
fill: g,
|
|
2682
|
+
children: l
|
|
2683
|
+
}),
|
|
2684
|
+
o && /* @__PURE__ */ s(P, {
|
|
2685
|
+
x: e - 15,
|
|
2686
|
+
y: -15,
|
|
2687
|
+
score: u
|
|
2688
|
+
})
|
|
2689
|
+
]
|
|
2690
|
+
});
|
|
2691
|
+
}, Bt = ({ width: e, height: t, data: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i, id: a, showAssessmentResults: o = !1 }) => {
|
|
2692
|
+
let { name: l } = n, u = M(h((e) => e.assessments))[a]?.score, d = e * (i ?? 1), f = t * (i ?? 1), { strokeColor: p, textColor: m } = F(n), g = n.fillColor || "none";
|
|
2693
|
+
return /* @__PURE__ */ c("svg", {
|
|
2694
|
+
width: d,
|
|
2695
|
+
height: f,
|
|
2696
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
2697
|
+
overflow: "visible",
|
|
2698
|
+
...r,
|
|
2699
|
+
children: [
|
|
2700
|
+
/* @__PURE__ */ s("rect", {
|
|
2701
|
+
x: 0,
|
|
2702
|
+
y: 0,
|
|
2703
|
+
width: e,
|
|
2704
|
+
height: t,
|
|
2705
|
+
stroke: p,
|
|
2706
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
2707
|
+
fill: g,
|
|
2708
|
+
strokeDasharray: "10",
|
|
2709
|
+
rx: 10,
|
|
2710
|
+
ry: 10
|
|
2711
|
+
}),
|
|
2712
|
+
/* @__PURE__ */ s(j, {
|
|
2713
|
+
text: l,
|
|
2714
|
+
x: e / 2,
|
|
2715
|
+
y: t / 2,
|
|
2716
|
+
maxWidth: e - 16,
|
|
2717
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
2718
|
+
fontWeight: "bold",
|
|
2719
|
+
fill: m,
|
|
2720
|
+
maxLines: A(t - 16, Y.NAME_LINE_HEIGHT)
|
|
2721
|
+
}),
|
|
2722
|
+
o && /* @__PURE__ */ s(P, {
|
|
2723
|
+
x: e - 15,
|
|
2724
|
+
y: -15,
|
|
2725
|
+
score: u
|
|
2726
|
+
})
|
|
2727
|
+
]
|
|
2728
|
+
});
|
|
2729
|
+
}, Vt = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
2730
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(r);
|
|
2731
|
+
return /* @__PURE__ */ c("svg", {
|
|
2732
|
+
width: d,
|
|
2733
|
+
height: f,
|
|
2734
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
2735
|
+
overflow: "visible",
|
|
2736
|
+
...i,
|
|
2737
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s(V, {
|
|
2738
|
+
x: 0,
|
|
2739
|
+
y: 0,
|
|
2740
|
+
width: t,
|
|
2741
|
+
height: n,
|
|
2742
|
+
rx: 10,
|
|
2743
|
+
ry: 10,
|
|
2744
|
+
fill: p,
|
|
2745
|
+
stroke: m
|
|
2746
|
+
}), /* @__PURE__ */ s(j, {
|
|
2747
|
+
text: l,
|
|
2748
|
+
x: t / 2,
|
|
2749
|
+
y: n / 2,
|
|
2750
|
+
maxWidth: t - 16,
|
|
2751
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
2752
|
+
fontWeight: "bold",
|
|
2753
|
+
fill: g,
|
|
2754
|
+
maxLines: A(n - 16, Y.NAME_LINE_HEIGHT)
|
|
2755
|
+
})] }), o && /* @__PURE__ */ s(P, {
|
|
2756
|
+
x: t - 15,
|
|
2757
|
+
y: -15,
|
|
2758
|
+
score: u
|
|
2759
|
+
})]
|
|
2760
|
+
});
|
|
2761
|
+
}, Ht = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
2762
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(r);
|
|
2763
|
+
return /* @__PURE__ */ c("svg", {
|
|
2764
|
+
width: d,
|
|
2765
|
+
height: f,
|
|
2766
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
2767
|
+
overflow: "visible",
|
|
2768
|
+
...i,
|
|
2769
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s(V, {
|
|
2770
|
+
x: 0,
|
|
2771
|
+
y: 0,
|
|
2772
|
+
width: t,
|
|
2773
|
+
height: n,
|
|
2774
|
+
fill: p,
|
|
2775
|
+
stroke: m
|
|
2776
|
+
}), /* @__PURE__ */ s(j, {
|
|
2777
|
+
text: l,
|
|
2778
|
+
x: t / 2,
|
|
2779
|
+
y: n / 2,
|
|
2780
|
+
maxWidth: t - 16,
|
|
2781
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
2782
|
+
fontWeight: "bold",
|
|
2783
|
+
fill: g,
|
|
2784
|
+
maxLines: A(n - 16, Y.NAME_LINE_HEIGHT)
|
|
2785
|
+
})] }), o && /* @__PURE__ */ s(P, {
|
|
2786
|
+
x: t - 15,
|
|
2787
|
+
y: -15,
|
|
2788
|
+
score: u
|
|
2789
|
+
})]
|
|
2790
|
+
});
|
|
2791
|
+
}, Ut = ({ id: e, width: t, height: n, data: r, SIDEBAR_PREVIEW_SCALE: i, svgAttributes: a, showAssessmentResults: l = !1 }) => {
|
|
2792
|
+
let { name: u, attributes: d = [], methods: f = [] } = r, p = Y.DEFAULT_HEADER_HEIGHT, m = Y.DEFAULT_ATTRIBUTE_HEIGHT, g = Y.DEFAULT_METHOD_HEIGHT, _ = Y.DEFAULT_PADDING, v = M(h((e) => e.assessments)), y = (e) => e.map((e) => {
|
|
2793
|
+
let t = v[e.id]?.score;
|
|
2794
|
+
return {
|
|
2795
|
+
...e,
|
|
2796
|
+
score: t
|
|
2797
|
+
};
|
|
2798
|
+
}), b = y(d), x = y(f), S = v[e]?.score, C = t * (i ?? 1), w = n * (i ?? 1), { fillColor: T, strokeColor: E, textColor: D } = F(r);
|
|
2799
|
+
return /* @__PURE__ */ s("svg", {
|
|
2800
|
+
width: C,
|
|
2801
|
+
height: w,
|
|
2802
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
2803
|
+
overflow: "visible",
|
|
2804
|
+
...a,
|
|
2805
|
+
children: /* @__PURE__ */ c("g", { children: [
|
|
2806
|
+
/* @__PURE__ */ s(V, {
|
|
2807
|
+
x: 0,
|
|
2808
|
+
y: 0,
|
|
2809
|
+
width: t,
|
|
2810
|
+
height: n,
|
|
2811
|
+
stroke: E
|
|
2812
|
+
}),
|
|
2813
|
+
/* @__PURE__ */ s(Le, {
|
|
2814
|
+
showStereotype: !1,
|
|
2815
|
+
stereotype: void 0,
|
|
2816
|
+
name: u,
|
|
2817
|
+
width: t,
|
|
2818
|
+
headerHeight: p,
|
|
2819
|
+
isUnderlined: !0,
|
|
2820
|
+
fill: T,
|
|
2821
|
+
textColor: D
|
|
2822
|
+
}),
|
|
2823
|
+
d.length > 0 && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(z, {
|
|
2824
|
+
y: p,
|
|
2825
|
+
width: t,
|
|
2826
|
+
strokeColor: E
|
|
2827
|
+
}), /* @__PURE__ */ s(B, {
|
|
2828
|
+
items: b,
|
|
2829
|
+
padding: _,
|
|
2830
|
+
itemHeight: m,
|
|
2831
|
+
width: t,
|
|
2832
|
+
offsetFromTop: p,
|
|
2833
|
+
showAssessmentResults: l,
|
|
2834
|
+
itemElementType: "attribute"
|
|
2835
|
+
})] }),
|
|
2836
|
+
f.length > 0 && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(z, {
|
|
2837
|
+
y: p + d.length * m,
|
|
2838
|
+
width: t,
|
|
2839
|
+
strokeColor: E
|
|
2840
|
+
}), /* @__PURE__ */ s(B, {
|
|
2841
|
+
items: x,
|
|
2842
|
+
padding: _,
|
|
2843
|
+
itemHeight: g,
|
|
2844
|
+
width: t,
|
|
2845
|
+
offsetFromTop: p + d.length * g,
|
|
2846
|
+
showAssessmentResults: l,
|
|
2847
|
+
itemElementType: "method"
|
|
2848
|
+
})] }),
|
|
2849
|
+
l && /* @__PURE__ */ s(P, {
|
|
2850
|
+
score: S,
|
|
2851
|
+
x: t - 15,
|
|
2852
|
+
y: -15
|
|
2853
|
+
})
|
|
2854
|
+
] })
|
|
2855
|
+
});
|
|
2856
|
+
}, Wt = ({ id: e, svgAttributes: t, SIDEBAR_PREVIEW_SCALE: n, showAssessmentResults: r = !1, data: i, width: a, height: o }) => {
|
|
2857
|
+
let { name: l, tokens: u, capacity: d } = i, f = M(h((e) => e.assessments))[e]?.score, p = n ?? 1, m = a * p, g = o * p, _ = Y.DEFAULT_ATTRIBUTE_HEIGHT, v = _ * p, y = o + _, b = g + v, x = a / 2, S = o / 2, { fillColor: C, strokeColor: w, textColor: T } = F(i), E = () => {
|
|
2858
|
+
if (u === 0) return null;
|
|
2859
|
+
if (u <= 5) {
|
|
2860
|
+
let e = [];
|
|
2861
|
+
return u === 1 ? e.push({
|
|
2862
|
+
x,
|
|
2863
|
+
y: S
|
|
2864
|
+
}) : u === 2 ? (e.push({
|
|
2865
|
+
x,
|
|
2866
|
+
y: 13.25
|
|
2867
|
+
}), e.push({
|
|
2868
|
+
x,
|
|
2869
|
+
y: 46.75
|
|
2870
|
+
})) : u === 3 ? (e.push({
|
|
2871
|
+
x: 15.06,
|
|
2872
|
+
y: 21.37
|
|
2873
|
+
}), e.push({
|
|
2874
|
+
x: 44.93,
|
|
2875
|
+
y: 21.37
|
|
2876
|
+
}), e.push({
|
|
2877
|
+
x,
|
|
2878
|
+
y: 47.25
|
|
2879
|
+
})) : u === 4 ? (e.push({
|
|
2880
|
+
x,
|
|
2881
|
+
y: 12.25
|
|
2882
|
+
}), e.push({
|
|
2883
|
+
x,
|
|
2884
|
+
y: 47.75
|
|
2885
|
+
}), e.push({
|
|
2886
|
+
x: 12.25,
|
|
2887
|
+
y: S
|
|
2888
|
+
}), e.push({
|
|
2889
|
+
x: 47.75,
|
|
2890
|
+
y: S
|
|
2891
|
+
})) : u === 5 && (e.push({
|
|
2892
|
+
x: 19.27,
|
|
2893
|
+
y: 15.24
|
|
2894
|
+
}), e.push({
|
|
2895
|
+
x: 40.72,
|
|
2896
|
+
y: 15.24
|
|
2897
|
+
}), e.push({
|
|
2898
|
+
x: 47.35,
|
|
2899
|
+
y: 35.64
|
|
2900
|
+
}), e.push({
|
|
2901
|
+
x: 12.65,
|
|
2902
|
+
y: 35.64
|
|
2903
|
+
}), e.push({
|
|
2904
|
+
x,
|
|
2905
|
+
y: 48.25
|
|
2906
|
+
})), e.map((e, t) => /* @__PURE__ */ s("circle", {
|
|
2907
|
+
cx: e.x,
|
|
2908
|
+
cy: e.y,
|
|
2909
|
+
r: "9.25",
|
|
2910
|
+
fill: w
|
|
2911
|
+
}, t));
|
|
2912
|
+
} else return /* @__PURE__ */ s(D, {
|
|
2913
|
+
fontWeight: "bold",
|
|
2914
|
+
x,
|
|
2915
|
+
y: S,
|
|
2916
|
+
fill: T,
|
|
2917
|
+
children: u
|
|
2918
|
+
});
|
|
2919
|
+
};
|
|
2920
|
+
return /* @__PURE__ */ c("svg", {
|
|
2921
|
+
width: m,
|
|
2922
|
+
height: b,
|
|
2923
|
+
viewBox: `0 0 ${a} ${y}`,
|
|
2924
|
+
overflow: "visible",
|
|
2925
|
+
...t,
|
|
2926
|
+
children: [
|
|
2927
|
+
/* @__PURE__ */ s("circle", {
|
|
2928
|
+
cx: x,
|
|
2929
|
+
cy: S,
|
|
2930
|
+
r: a / 2,
|
|
2931
|
+
fill: C,
|
|
2932
|
+
stroke: w,
|
|
2933
|
+
strokeWidth: Y.LINE_WIDTH
|
|
2934
|
+
}),
|
|
2935
|
+
typeof d == "number" && /* @__PURE__ */ c(D, {
|
|
2936
|
+
x: a + 8,
|
|
2937
|
+
y: -8,
|
|
2938
|
+
textAnchor: "middle",
|
|
2939
|
+
fill: T,
|
|
2940
|
+
children: ["C=", d]
|
|
2941
|
+
}),
|
|
2942
|
+
/* @__PURE__ */ s(D, {
|
|
2943
|
+
x: a / 2,
|
|
2944
|
+
y: o + _ / 2,
|
|
2945
|
+
textAnchor: "middle",
|
|
2946
|
+
fontWeight: "600",
|
|
2947
|
+
dominantBaseline: "middle",
|
|
2948
|
+
fill: T,
|
|
2949
|
+
children: l
|
|
2950
|
+
}),
|
|
2951
|
+
E(),
|
|
2952
|
+
r && /* @__PURE__ */ s(P, {
|
|
2953
|
+
x: a - 15,
|
|
2954
|
+
y: -15,
|
|
2955
|
+
score: f
|
|
2956
|
+
})
|
|
2957
|
+
]
|
|
2958
|
+
});
|
|
2959
|
+
}, Gt = ({ id: e, svgAttributes: t, SIDEBAR_PREVIEW_SCALE: n, showAssessmentResults: r = !1, width: i, height: a, data: o }) => {
|
|
2960
|
+
let { name: l } = o, u = M(h((e) => e.assessments))[e]?.score, d = n ?? 1, f = i * d, p = a * d, m = Y.DEFAULT_ATTRIBUTE_HEIGHT, g = m * d, _ = a + m, v = p + g, { fillColor: y, strokeColor: b, textColor: x } = F(o);
|
|
2961
|
+
return /* @__PURE__ */ c("svg", {
|
|
2962
|
+
width: f,
|
|
2963
|
+
height: v,
|
|
2964
|
+
viewBox: `0 0 ${i} ${_}`,
|
|
2965
|
+
overflow: "visible",
|
|
2966
|
+
...t,
|
|
2967
|
+
children: [
|
|
2968
|
+
/* @__PURE__ */ s(V, {
|
|
2969
|
+
x: 0,
|
|
2970
|
+
y: 0,
|
|
2971
|
+
width: i,
|
|
2972
|
+
height: a,
|
|
2973
|
+
fill: y,
|
|
2974
|
+
stroke: b
|
|
2975
|
+
}),
|
|
2976
|
+
/* @__PURE__ */ s(D, {
|
|
2977
|
+
x: i / 2,
|
|
2978
|
+
y: a + m / 2,
|
|
2979
|
+
textAnchor: "middle",
|
|
2980
|
+
fontWeight: "600",
|
|
2981
|
+
dominantBaseline: "middle",
|
|
2982
|
+
fill: x,
|
|
2983
|
+
children: l
|
|
2984
|
+
}),
|
|
2985
|
+
r && /* @__PURE__ */ s(P, {
|
|
2986
|
+
x: i - 15,
|
|
2987
|
+
y: -15,
|
|
2988
|
+
score: u
|
|
2989
|
+
})
|
|
2990
|
+
]
|
|
2991
|
+
});
|
|
2992
|
+
}, Kt = ({ width: e, height: t, data: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i }) => {
|
|
2993
|
+
let { name: a } = n, o = e * (i ?? 1), l = t * (i ?? 1), { fillColor: u, strokeColor: d, textColor: f } = F(n);
|
|
2994
|
+
return /* @__PURE__ */ c("svg", {
|
|
2995
|
+
width: o,
|
|
2996
|
+
height: l,
|
|
2997
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
2998
|
+
overflow: "visible",
|
|
2999
|
+
...r,
|
|
3000
|
+
children: [
|
|
3001
|
+
/* @__PURE__ */ s(V, {
|
|
3002
|
+
x: 0,
|
|
3003
|
+
y: 0,
|
|
3004
|
+
width: e,
|
|
3005
|
+
height: t,
|
|
3006
|
+
fill: u,
|
|
3007
|
+
stroke: d
|
|
3008
|
+
}),
|
|
3009
|
+
/* @__PURE__ */ s("rect", {
|
|
3010
|
+
x: 5,
|
|
3011
|
+
y: 5,
|
|
3012
|
+
width: e - 10,
|
|
3013
|
+
height: t - 10,
|
|
3014
|
+
fill: "none",
|
|
3015
|
+
stroke: d,
|
|
3016
|
+
strokeWidth: Y.LINE_WIDTH
|
|
3017
|
+
}),
|
|
3018
|
+
/* @__PURE__ */ s(j, {
|
|
3019
|
+
text: a,
|
|
3020
|
+
x: e / 2,
|
|
3021
|
+
y: t / 2,
|
|
3022
|
+
maxWidth: e - 16,
|
|
3023
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
3024
|
+
fontWeight: "600",
|
|
3025
|
+
fill: f,
|
|
3026
|
+
maxLines: A(t - 16, Y.NAME_LINE_HEIGHT)
|
|
3027
|
+
})
|
|
3028
|
+
]
|
|
3029
|
+
});
|
|
3030
|
+
}, qt = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: o = !1 }) => {
|
|
3031
|
+
let { name: l } = r, u = M(h((e) => e.assessments))[e]?.score, d = t * (a ?? 1), f = n * (a ?? 1), { fillColor: p, strokeColor: m, textColor: g } = F(r);
|
|
3032
|
+
return /* @__PURE__ */ c("svg", {
|
|
3033
|
+
width: d,
|
|
3034
|
+
height: f,
|
|
3035
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
3036
|
+
overflow: "visible",
|
|
3037
|
+
...i,
|
|
3038
|
+
children: [/* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s(V, {
|
|
3039
|
+
x: 0,
|
|
3040
|
+
y: 0,
|
|
3041
|
+
width: t,
|
|
3042
|
+
height: n,
|
|
3043
|
+
fill: p,
|
|
3044
|
+
stroke: m
|
|
3045
|
+
}), /* @__PURE__ */ s(j, {
|
|
3046
|
+
text: l,
|
|
3047
|
+
x: t / 2,
|
|
3048
|
+
y: n / 2,
|
|
3049
|
+
maxWidth: t - 16,
|
|
3050
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
3051
|
+
fontWeight: "600",
|
|
3052
|
+
fill: g,
|
|
3053
|
+
maxLines: A(n - 16, Y.NAME_LINE_HEIGHT)
|
|
3054
|
+
})] }), o && /* @__PURE__ */ s(P, {
|
|
3055
|
+
x: t - 15,
|
|
3056
|
+
y: -15,
|
|
3057
|
+
score: u
|
|
3058
|
+
})]
|
|
3059
|
+
});
|
|
3060
|
+
}, Jt = ({ width: e, height: t, data: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i }) => {
|
|
3061
|
+
let { name: a } = n, o = e * (i ?? 1), l = t * (i ?? 1), u = (t - 20) / 2, { fillColor: d, strokeColor: f, textColor: p } = F(n);
|
|
3062
|
+
return /* @__PURE__ */ c("svg", {
|
|
3063
|
+
width: o,
|
|
3064
|
+
height: l,
|
|
3065
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
3066
|
+
overflow: "visible",
|
|
3067
|
+
...r,
|
|
3068
|
+
children: [
|
|
3069
|
+
/* @__PURE__ */ s("rect", {
|
|
3070
|
+
x: 0,
|
|
3071
|
+
y: 0,
|
|
3072
|
+
width: e,
|
|
3073
|
+
height: t,
|
|
3074
|
+
fill: "none",
|
|
3075
|
+
stroke: "none"
|
|
3076
|
+
}),
|
|
3077
|
+
/* @__PURE__ */ s("polyline", {
|
|
3078
|
+
points: `8,${u} 8,${u + 20} 28,${u + 10} 8,${u}`,
|
|
3079
|
+
fill: d,
|
|
3080
|
+
stroke: f,
|
|
3081
|
+
strokeWidth: Y.LINE_WIDTH,
|
|
3082
|
+
strokeLinejoin: "miter"
|
|
3083
|
+
}),
|
|
3084
|
+
/* @__PURE__ */ s("text", {
|
|
3085
|
+
fill: p,
|
|
3086
|
+
x: 36,
|
|
3087
|
+
y: u + 10,
|
|
3088
|
+
style: { fontWeight: 600 },
|
|
3089
|
+
dominantBaseline: "middle",
|
|
3090
|
+
children: a
|
|
3091
|
+
})
|
|
3092
|
+
]
|
|
3093
|
+
});
|
|
3094
|
+
}, Yt = ({ width: e, height: t, data: n, svgAttributes: r, SIDEBAR_PREVIEW_SCALE: i }) => {
|
|
3095
|
+
let { name: a, showHint: o } = n, l = i ?? 1, u = e * l, d = t * l, f = Y.DEFAULT_ATTRIBUTE_HEIGHT, p = f * l, m = t + f, h = d + p, g = e / 2, _ = t / 2, v = Math.min(e, t) / 2, { strokeColor: y } = F(n), b = n.fillColor || "var(--apollon-primary-contrast, #000000)";
|
|
3096
|
+
return /* @__PURE__ */ c("svg", {
|
|
3097
|
+
width: u,
|
|
3098
|
+
height: h,
|
|
3099
|
+
viewBox: `0 0 ${e} ${m}`,
|
|
3100
|
+
overflow: "visible",
|
|
3101
|
+
...r,
|
|
3102
|
+
children: [/* @__PURE__ */ s("circle", {
|
|
3103
|
+
cx: g,
|
|
3104
|
+
cy: _,
|
|
3105
|
+
r: v,
|
|
3106
|
+
fill: b,
|
|
3107
|
+
stroke: y,
|
|
3108
|
+
strokeWidth: Y.LINE_WIDTH
|
|
3109
|
+
}), o && /* @__PURE__ */ s(D, {
|
|
3110
|
+
x: g,
|
|
3111
|
+
y: t + f / 2,
|
|
3112
|
+
textAnchor: "middle",
|
|
3113
|
+
dominantBaseline: "middle",
|
|
3114
|
+
children: a
|
|
3115
|
+
})]
|
|
3116
|
+
});
|
|
3117
|
+
}, Xt = ({ width: e, height: t, svgAttributes: n, SIDEBAR_PREVIEW_SCALE: r, data: i }) => {
|
|
3118
|
+
let a = i.actionRows ?? [], o = e * (r ?? 1), l = t * (r ?? 1), u = Math.floor(t / 30) - 1, d = Array.from({ length: u }, (e, t) => (t + 1) * 30), { strokeColor: f } = F(i);
|
|
3119
|
+
return /* @__PURE__ */ c("svg", {
|
|
3120
|
+
width: o,
|
|
3121
|
+
height: l,
|
|
3122
|
+
viewBox: `0 0 ${e} ${t}`,
|
|
3123
|
+
overflow: "visible",
|
|
3124
|
+
...n,
|
|
3125
|
+
children: [
|
|
3126
|
+
/* @__PURE__ */ s(V, {
|
|
3127
|
+
x: 0,
|
|
3128
|
+
y: 0,
|
|
3129
|
+
width: e,
|
|
3130
|
+
height: t,
|
|
3131
|
+
fill: "none",
|
|
3132
|
+
stroke: f
|
|
3133
|
+
}),
|
|
3134
|
+
d.map((t) => /* @__PURE__ */ s("line", {
|
|
3135
|
+
x1: 0,
|
|
3136
|
+
y1: t,
|
|
3137
|
+
x2: e,
|
|
3138
|
+
y2: t,
|
|
3139
|
+
stroke: f,
|
|
3140
|
+
strokeWidth: Y.LINE_WIDTH
|
|
3141
|
+
}, t)),
|
|
3142
|
+
a.map((n, r) => {
|
|
3143
|
+
let i = r * 30;
|
|
3144
|
+
if (i + 30 > t) return null;
|
|
3145
|
+
let { fillColor: a, textColor: o } = F(n);
|
|
3146
|
+
return /* @__PURE__ */ c("g", { children: [
|
|
3147
|
+
/* @__PURE__ */ s("rect", {
|
|
3148
|
+
x: 0,
|
|
3149
|
+
y: i,
|
|
3150
|
+
width: e,
|
|
3151
|
+
height: 30,
|
|
3152
|
+
fill: a,
|
|
3153
|
+
stroke: n.strokeColor ?? f,
|
|
3154
|
+
strokeWidth: Y.LINE_WIDTH
|
|
3155
|
+
}),
|
|
3156
|
+
/* @__PURE__ */ s(D, {
|
|
3157
|
+
x: 15,
|
|
3158
|
+
y: i + 15,
|
|
3159
|
+
textAnchor: "middle",
|
|
3160
|
+
dominantBaseline: "middle",
|
|
3161
|
+
fontSize: "14",
|
|
3162
|
+
fontWeight: "normal",
|
|
3163
|
+
fill: o,
|
|
3164
|
+
children: n.identifier
|
|
3165
|
+
}),
|
|
3166
|
+
/* @__PURE__ */ s(D, {
|
|
3167
|
+
x: 40,
|
|
3168
|
+
y: i + 15,
|
|
3169
|
+
textAnchor: "start",
|
|
3170
|
+
dominantBaseline: "middle",
|
|
3171
|
+
fontSize: "14",
|
|
3172
|
+
fontWeight: "normal",
|
|
3173
|
+
fill: o,
|
|
3174
|
+
children: n.name
|
|
3175
|
+
})
|
|
3176
|
+
] }, n.id);
|
|
3177
|
+
}),
|
|
3178
|
+
/* @__PURE__ */ s("line", {
|
|
3179
|
+
x1: 30,
|
|
3180
|
+
y1: 0,
|
|
3181
|
+
x2: 30,
|
|
3182
|
+
y2: t,
|
|
3183
|
+
stroke: f,
|
|
3184
|
+
strokeWidth: Y.LINE_WIDTH
|
|
3185
|
+
})
|
|
3186
|
+
]
|
|
3187
|
+
});
|
|
3188
|
+
}, G = (e, t) => {
|
|
3189
|
+
if (Object.is(e, t)) return !0;
|
|
3190
|
+
if (typeof e != "object" || typeof t != "object" || e === null || t === null) return !1;
|
|
3191
|
+
if (Array.isArray(e)) {
|
|
3192
|
+
if (!Array.isArray(t) || e.length !== t.length) return !1;
|
|
3193
|
+
for (let n = 0; n < e.length; n++) if (!G(e[n], t[n])) return !1;
|
|
3194
|
+
return !0;
|
|
3195
|
+
}
|
|
3196
|
+
if (Array.isArray(t)) return !1;
|
|
3197
|
+
let n = e, r = t, i = /* @__PURE__ */ new Set();
|
|
3198
|
+
for (let e of Object.keys(n)) n[e] !== void 0 && i.add(e);
|
|
3199
|
+
for (let e of Object.keys(r)) r[e] !== void 0 && i.add(e);
|
|
3200
|
+
for (let e of i) if (!G(n[e], r[e])) return !1;
|
|
3201
|
+
return !0;
|
|
3202
|
+
}, Zt = (e, t) => {
|
|
3203
|
+
let n = e.length;
|
|
3204
|
+
if (n === 0) return [];
|
|
3205
|
+
let r;
|
|
3206
|
+
if (!e.some((e) => e.size != null && e.size > 0)) r = e.map(() => t / n);
|
|
3207
|
+
else {
|
|
3208
|
+
let i = e.slice(0, n - 1).map((e) => e.size ?? t / n), a = i.reduce((e, t) => e + t, 0), o = t - 40;
|
|
3209
|
+
if (a > o && a > 0) {
|
|
3210
|
+
let e = o / a;
|
|
3211
|
+
for (let t = 0; t < i.length; t++) i[t] *= e;
|
|
3212
|
+
a = o;
|
|
3213
|
+
}
|
|
3214
|
+
r = [...i, Math.max(t - a, 40)];
|
|
3215
|
+
}
|
|
3216
|
+
let i = 0;
|
|
3217
|
+
return r.map((e) => {
|
|
3218
|
+
let t = i;
|
|
3219
|
+
return i += e, {
|
|
3220
|
+
start: t,
|
|
3221
|
+
extent: e
|
|
3222
|
+
};
|
|
3223
|
+
});
|
|
3224
|
+
}, Qt = (e, t) => {
|
|
3225
|
+
let n = Zt(e, t);
|
|
3226
|
+
return e.map((e, t) => ({
|
|
3227
|
+
...e,
|
|
3228
|
+
size: n[t].extent
|
|
3229
|
+
}));
|
|
3230
|
+
}, $t = (e, t) => {
|
|
3231
|
+
for (let n = 0; n < e.length; n++) if (t < e[n].start + e[n].extent) return n;
|
|
3232
|
+
return Math.max(e.length - 1, 0);
|
|
3233
|
+
}, en = (e, t, n, r, i = 0) => {
|
|
3234
|
+
if (t < 0 || t >= e.length - 1) return e;
|
|
3235
|
+
let a = Zt(e, r), o = a.map((e) => e.extent), s = n;
|
|
3236
|
+
if (i > 0) {
|
|
3237
|
+
let e = a[t + 1].start + s;
|
|
3238
|
+
s = Math.round(e / i) * i - a[t + 1].start;
|
|
3239
|
+
}
|
|
3240
|
+
return s = Math.max(s, 40 - o[t]), s = Math.min(s, o[t + 1] - 40), o[t] += s, o[t + 1] -= s, e.map((e, t) => ({
|
|
3241
|
+
...e,
|
|
3242
|
+
size: o[t]
|
|
3243
|
+
}));
|
|
3244
|
+
}, tn = (e, t, n) => {
|
|
3245
|
+
let r = e.width ?? 0, i = e.height ?? 0;
|
|
3246
|
+
return {
|
|
3247
|
+
x: Math.min(Math.max(e.position.y, 0), Math.max(t - r, 0)),
|
|
3248
|
+
y: Math.min(Math.max(e.position.x, 0), Math.max(n - i, 0))
|
|
3249
|
+
};
|
|
3250
|
+
}, nn = [
|
|
3251
|
+
"Swift",
|
|
3252
|
+
"Bold",
|
|
3253
|
+
"Clever",
|
|
3254
|
+
"Bright",
|
|
3255
|
+
"Calm",
|
|
3256
|
+
"Eager",
|
|
3257
|
+
"Kind",
|
|
3258
|
+
"Noble"
|
|
3259
|
+
], rn = [
|
|
3260
|
+
"Falcon",
|
|
3261
|
+
"Otter",
|
|
3262
|
+
"Panda",
|
|
3263
|
+
"Lynx",
|
|
3264
|
+
"Dolphin",
|
|
3265
|
+
"Owl",
|
|
3266
|
+
"Fox",
|
|
3267
|
+
"Crane"
|
|
3268
|
+
], an = () => `${nn[Math.floor(Math.random() * nn.length)]} ${rn[Math.floor(Math.random() * rn.length)]}`, on = (e) => {
|
|
3269
|
+
let t = 0;
|
|
3270
|
+
for (let n = 0; n < e.length; n += 1) t = (t << 5) - t + e.charCodeAt(n), t |= 0;
|
|
3271
|
+
return yn[Math.abs(t) % yn.length];
|
|
3272
|
+
}, sn = (e) => {
|
|
3273
|
+
if (typeof e != "object" || !e) return null;
|
|
3274
|
+
let { x: t, y: n, zoom: r } = e;
|
|
3275
|
+
return !Number.isFinite(t) || !Number.isFinite(n) || !Number.isFinite(r) || r <= 0 ? null : {
|
|
3276
|
+
x: t,
|
|
3277
|
+
y: n,
|
|
3278
|
+
zoom: r
|
|
3279
|
+
};
|
|
3280
|
+
}, cn = (e) => {
|
|
3281
|
+
if (!Array.isArray(e)) return null;
|
|
3282
|
+
let t = [];
|
|
3283
|
+
for (let n of e) {
|
|
3284
|
+
if (typeof n != "object" || !n) continue;
|
|
3285
|
+
let { id: e, position: r, width: i, height: a } = n;
|
|
3286
|
+
if (typeof e != "string" || typeof r != "object" || !r) continue;
|
|
3287
|
+
let { x: o, y: s } = r;
|
|
3288
|
+
if (!Number.isFinite(o) || !Number.isFinite(s)) continue;
|
|
3289
|
+
let c = {
|
|
3290
|
+
id: e,
|
|
3291
|
+
position: {
|
|
3292
|
+
x: o,
|
|
3293
|
+
y: s
|
|
3294
|
+
}
|
|
3295
|
+
};
|
|
3296
|
+
(i === null || Number.isFinite(i)) && (c.width = i), (a === null || Number.isFinite(a)) && (c.height = a), t.push(c);
|
|
3297
|
+
}
|
|
3298
|
+
return t;
|
|
3299
|
+
}, K = 10;
|
|
3300
|
+
function ln(e, t) {
|
|
3301
|
+
let n = 1 / Math.SQRT2;
|
|
3302
|
+
return {
|
|
3303
|
+
x: e - e * n,
|
|
3304
|
+
y: t - t * n
|
|
3305
|
+
};
|
|
3306
|
+
}
|
|
3307
|
+
function un(e, t, n, r) {
|
|
3308
|
+
let i = Math.cos(Math.PI / 4), a = Math.sin(Math.PI / 4), o = (t, n) => Math.round(e + t * i - n * a), s = (e, n) => Math.round(t + e * a + n * i), c = r / 2, l = o(0, 0), u = s(0, 0);
|
|
3309
|
+
return `M${o(-n, -c)},${s(-n, -c)} L${l},${u} L${o(-n, c)},${s(-n, c)}`;
|
|
3310
|
+
}
|
|
3311
|
+
var dn = ({ id: e, width: t, height: n, data: r, svgAttributes: i, SIDEBAR_PREVIEW_SCALE: a, showAssessmentResults: l = !1 }) => {
|
|
3312
|
+
let { name: u, isInitialMarking: d } = r, f = M(h((e) => e.assessments))[e]?.score, p = t * (a ?? 1), m = n * (a ?? 1), { fillColor: g, strokeColor: _, textColor: v } = F(r), y = ln(K, K), b = En.STROKE_WIDTH.arrow;
|
|
3313
|
+
return /* @__PURE__ */ c("svg", {
|
|
3314
|
+
width: p,
|
|
3315
|
+
height: m,
|
|
3316
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
3317
|
+
overflow: "visible",
|
|
3318
|
+
...i,
|
|
3319
|
+
children: [/* @__PURE__ */ c("g", { children: [
|
|
3320
|
+
/* @__PURE__ */ s(V, {
|
|
3321
|
+
x: 0,
|
|
3322
|
+
y: 0,
|
|
3323
|
+
width: t,
|
|
3324
|
+
height: n,
|
|
3325
|
+
rx: K,
|
|
3326
|
+
ry: K,
|
|
3327
|
+
fill: g,
|
|
3328
|
+
stroke: _
|
|
3329
|
+
}),
|
|
3330
|
+
/* @__PURE__ */ s(j, {
|
|
3331
|
+
text: u,
|
|
3332
|
+
x: t / 2,
|
|
3333
|
+
y: n / 2,
|
|
3334
|
+
maxWidth: t - 16,
|
|
3335
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
3336
|
+
fontWeight: "600",
|
|
3337
|
+
fill: v,
|
|
3338
|
+
maxLines: A(n - 16, Y.NAME_LINE_HEIGHT)
|
|
3339
|
+
}),
|
|
3340
|
+
d && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("line", {
|
|
3341
|
+
x1: -50,
|
|
3342
|
+
y1: -50,
|
|
3343
|
+
x2: y.x,
|
|
3344
|
+
y2: y.y,
|
|
3345
|
+
strokeWidth: Y.LINE_WIDTH_EDGE,
|
|
3346
|
+
stroke: _
|
|
3347
|
+
}), /* @__PURE__ */ s("path", {
|
|
3348
|
+
d: un(y.x, y.y, 18, 15.588),
|
|
3349
|
+
fill: "none",
|
|
3350
|
+
stroke: _,
|
|
3351
|
+
strokeWidth: b,
|
|
3352
|
+
strokeLinecap: "round",
|
|
3353
|
+
strokeLinejoin: "round"
|
|
3354
|
+
})] })
|
|
3355
|
+
] }), l && /* @__PURE__ */ s(P, {
|
|
3356
|
+
x: t - 15,
|
|
3357
|
+
y: -15,
|
|
3358
|
+
score: f
|
|
3359
|
+
})]
|
|
3360
|
+
});
|
|
3361
|
+
}, q = Object.freeze({
|
|
3362
|
+
MIN_SCALE_TO_ZOOM_OUT: .4,
|
|
3363
|
+
MAX_SCALE_TO_ZOOM_IN: 2.5,
|
|
3364
|
+
MOUSE_UP_OFFSET_PX: 5,
|
|
3365
|
+
SNAP_TO_GRID_PX: 5,
|
|
3366
|
+
EXTRA_SPACE_FOR_EXTENSION: 10,
|
|
3367
|
+
PASTE_OFFSET_PX: 20
|
|
3368
|
+
}), J = Object.freeze({
|
|
3369
|
+
"--apollon-primary": "#3e8acc",
|
|
3370
|
+
"--apollon-primary-contrast": "#000000",
|
|
3371
|
+
"--apollon-secondary": "#6c757d",
|
|
3372
|
+
"--apollon-alert-warning-yellow": "#ffc107",
|
|
3373
|
+
"--apollon-alert-warning-background": "#fff3cd",
|
|
3374
|
+
"--apollon-alert-warning-border": "#ffeeba",
|
|
3375
|
+
"--apollon-interactive-selection": "#f39c12",
|
|
3376
|
+
"--apollon-dropzone-accent": "#0064ff",
|
|
3377
|
+
"--apollon-on-collaboration-cursor": "#ffffff",
|
|
3378
|
+
"--apollon-assessment-positive-text": "#166534",
|
|
3379
|
+
"--apollon-assessment-positive-bg": "#dcfce7",
|
|
3380
|
+
"--apollon-assessment-negative-text": "#991b1b",
|
|
3381
|
+
"--apollon-assessment-negative-bg": "#fee2e2",
|
|
3382
|
+
"--apollon-assessment-zero-text": "#1e40af",
|
|
3383
|
+
"--apollon-assessment-zero-bg": "#dbeafe",
|
|
3384
|
+
"--apollon-collaboration-color-1": "#ffb61e",
|
|
3385
|
+
"--apollon-collaboration-color-2": "#37b24d",
|
|
3386
|
+
"--apollon-collaboration-color-3": "#1c7ed6",
|
|
3387
|
+
"--apollon-collaboration-color-4": "#f03e3e",
|
|
3388
|
+
"--apollon-collaboration-color-5": "#ae3ec9",
|
|
3389
|
+
"--apollon-collaboration-color-6": "#0ca678",
|
|
3390
|
+
"--apollon-collaboration-color-7": "#f76707",
|
|
3391
|
+
"--apollon-collaboration-color-8": "#1098ad",
|
|
3392
|
+
"--apollon-guide-vertical": "#d63031",
|
|
3393
|
+
"--apollon-guide-horizontal": "#0984e3",
|
|
3394
|
+
"--apollon-background": "#ffffff",
|
|
3395
|
+
"--apollon-background-inverse": "#000000",
|
|
3396
|
+
"--apollon-background-variant": "#f8f9fa",
|
|
3397
|
+
"--apollon-hover-neutral": "color-mix(in srgb, var(--apollon-primary-contrast, #000000) 7.5%, transparent)",
|
|
3398
|
+
"--apollon-gray": "#e9ecef",
|
|
3399
|
+
"--apollon-grid": "rgba(36, 39, 36, 0.1)",
|
|
3400
|
+
"--apollon-gray-variant": "#495057",
|
|
3401
|
+
"--apollon-alert-danger-color": "#721c24",
|
|
3402
|
+
"--apollon-alert-danger-background": "#f8d7da",
|
|
3403
|
+
"--apollon-alert-danger-border": "#f5c6cb",
|
|
3404
|
+
"--apollon-switch-box-border-color": "#dee2e6",
|
|
3405
|
+
"--apollon-list-group-color": "#ffffff",
|
|
3406
|
+
"--apollon-btn-outline-secondary-color": "#6c757d",
|
|
3407
|
+
"--apollon-modal-bottom-border": "#e9ecef"
|
|
3408
|
+
}), fn = J["--apollon-primary-contrast"], pn = J["--apollon-background"], mn = `var(--apollon-interactive-selection, ${J["--apollon-interactive-selection"]})`, hn = `color-mix(in srgb, var(--apollon-interactive-selection, ${J["--apollon-interactive-selection"]}) 18%, transparent)`, gn = `color-mix(in srgb, var(--apollon-interactive-selection, ${J["--apollon-interactive-selection"]}) 10%, transparent)`, _n = `color-mix(in srgb, var(--apollon-interactive-selection, ${J["--apollon-interactive-selection"]}) 50%, transparent)`, vn = `color-mix(in srgb, var(--apollon-interactive-selection, ${J["--apollon-interactive-selection"]}) 50%, transparent)`, yn = Object.freeze(Array.from({ length: 8 }, (e, t) => `var(--apollon-collaboration-color-${t + 1}, ${J[`--apollon-collaboration-color-${t + 1}`]})`)), Y = Object.freeze({
|
|
3409
|
+
DEFAULT_FONT: `400 16px ${e}`,
|
|
3410
|
+
DEFAULT_HEADER_HEIGHT: 40,
|
|
3411
|
+
DEFAULT_HEADER_HEIGHT_WITH_STEREOTYPE: 50,
|
|
3412
|
+
DEFAULT_ATTRIBUTE_HEIGHT: 30,
|
|
3413
|
+
DEFAULT_METHOD_HEIGHT: 30,
|
|
3414
|
+
DEFAULT_PADDING: 10,
|
|
3415
|
+
LINE_WIDTH: 2,
|
|
3416
|
+
LINE_WIDTH_INTERFACE: 2,
|
|
3417
|
+
LINE_WIDTH_EDGE: 2,
|
|
3418
|
+
ICON_LINE_WIDTH: 1.5,
|
|
3419
|
+
NAME_FONT_SIZE: 16,
|
|
3420
|
+
NAME_LINE_HEIGHT: 19,
|
|
3421
|
+
STEREOTYPE_LINE_HEIGHT: 15,
|
|
3422
|
+
STEREOTYPE_NAME_GAP: 4
|
|
3423
|
+
}), X = () => {
|
|
3424
|
+
let e = crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
3425
|
+
e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128;
|
|
3426
|
+
let t = Array.from(e, (e) => e.toString(16).padStart(2, "0"));
|
|
3427
|
+
return `${t.slice(0, 4).join("")}-${t.slice(4, 6).join("")}-${t.slice(6, 8).join("")}-${t.slice(8, 10).join("")}-${t.slice(10, 16).join("")}`;
|
|
3428
|
+
}, Z = 30, bn = Z / 2, Q = Object.freeze({
|
|
3429
|
+
SIZE: Z,
|
|
3430
|
+
RADIUS: bn,
|
|
3431
|
+
STROKE_WIDTH: 2,
|
|
3432
|
+
SOCKET_GAP: 4
|
|
3433
|
+
}), xn = 11, Sn = Object.freeze({
|
|
3434
|
+
MARKER_PADDING: -3,
|
|
3435
|
+
SOURCE_CONNECTION_POINT_PADDING: 3,
|
|
3436
|
+
STEP_BORDER_RADIUS: 0,
|
|
3437
|
+
EDGE_HIGHLIGHT_STROKE_WIDTH: 15,
|
|
3438
|
+
EDGE_LINE_JUMP_HEIGHT: 10,
|
|
3439
|
+
EDGE_LINE_JUMP_WIDTH: 16,
|
|
3440
|
+
STUB_LENGTH: 30,
|
|
3441
|
+
BEND_MIN_LENGTH: 100,
|
|
3442
|
+
BEND_HANDLE_SCREEN_LENGTH_PX: 34,
|
|
3443
|
+
BEND_HANDLE_CORNER_CLEARANCE_PX: 10,
|
|
3444
|
+
BEND_HANDLE_MIN_SEGMENT_SCREEN_PX: 54,
|
|
3445
|
+
BEND_HANDLE_SAFE_AREA_PX: 25,
|
|
3446
|
+
ENDPOINT_HIT_TARGET_SIZE: 24,
|
|
3447
|
+
BEND_SNAP_GRID_PX: q.SNAP_TO_GRID_PX,
|
|
3448
|
+
ORTHOGONAL_DOGLEG_TOLERANCE_PX: 2,
|
|
3449
|
+
ORTHOGONAL_ARM_OVERLAP_PX: 10,
|
|
3450
|
+
LABEL_GAP: 14,
|
|
3451
|
+
LABEL_LINE_HEIGHT: 14,
|
|
3452
|
+
LABEL_NOMINAL_HALF_EXTENT: 40
|
|
3453
|
+
}), Cn = Object.freeze({
|
|
3454
|
+
BASE: 0,
|
|
3455
|
+
HEADER_SWITCH: 1,
|
|
3456
|
+
DRAGGABLE_GHOST: 2,
|
|
3457
|
+
MINIMAP: 5,
|
|
3458
|
+
PANEL: 10,
|
|
3459
|
+
MODAL: 9998,
|
|
3460
|
+
LABEL: 9998,
|
|
3461
|
+
DRAGGABLE_ELEMENT: 9999,
|
|
3462
|
+
TOOLTIP: 1e4
|
|
3463
|
+
}), wn = bn, Tn = Object.freeze({
|
|
3464
|
+
"black-rhombus": {
|
|
3465
|
+
type: "rhombus",
|
|
3466
|
+
filled: !0,
|
|
3467
|
+
size: 18,
|
|
3468
|
+
widthFactor: 1,
|
|
3469
|
+
heightFactor: .618
|
|
3470
|
+
},
|
|
3471
|
+
"white-rhombus": {
|
|
3472
|
+
type: "rhombus",
|
|
3473
|
+
filled: !1,
|
|
3474
|
+
size: 18,
|
|
3475
|
+
widthFactor: 1,
|
|
3476
|
+
heightFactor: .618
|
|
3477
|
+
},
|
|
3478
|
+
"white-triangle": {
|
|
3479
|
+
type: "triangle",
|
|
3480
|
+
filled: !1,
|
|
3481
|
+
size: 18,
|
|
3482
|
+
widthFactor: 1,
|
|
3483
|
+
heightFactor: .866
|
|
3484
|
+
},
|
|
3485
|
+
"black-triangle": {
|
|
3486
|
+
type: "triangle",
|
|
3487
|
+
filled: !0,
|
|
3488
|
+
size: 18,
|
|
3489
|
+
widthFactor: 1,
|
|
3490
|
+
heightFactor: .866
|
|
3491
|
+
},
|
|
3492
|
+
"black-arrow": {
|
|
3493
|
+
type: "arrow",
|
|
3494
|
+
filled: !1,
|
|
3495
|
+
size: 18,
|
|
3496
|
+
widthFactor: 1,
|
|
3497
|
+
heightFactor: .866
|
|
3498
|
+
},
|
|
3499
|
+
"required-interface": {
|
|
3500
|
+
type: "semicircle",
|
|
3501
|
+
filled: !1,
|
|
3502
|
+
size: wn,
|
|
3503
|
+
widthFactor: 1,
|
|
3504
|
+
heightFactor: 1,
|
|
3505
|
+
arcSpanDegrees: 150
|
|
3506
|
+
},
|
|
3507
|
+
"required-interface-quarter": {
|
|
3508
|
+
type: "semicircle",
|
|
3509
|
+
filled: !1,
|
|
3510
|
+
size: wn,
|
|
3511
|
+
widthFactor: 1,
|
|
3512
|
+
heightFactor: 1,
|
|
3513
|
+
arcSpanDegrees: 90
|
|
3514
|
+
},
|
|
3515
|
+
"required-interface-threequarter": {
|
|
3516
|
+
type: "semicircle",
|
|
3517
|
+
filled: !1,
|
|
3518
|
+
size: wn,
|
|
3519
|
+
widthFactor: 1,
|
|
3520
|
+
heightFactor: 1,
|
|
3521
|
+
arcSpanDegrees: 270
|
|
3522
|
+
},
|
|
3523
|
+
"bpmn-white-triangle": {
|
|
3524
|
+
type: "triangle",
|
|
3525
|
+
filled: !1,
|
|
3526
|
+
size: xn,
|
|
3527
|
+
widthFactor: 1,
|
|
3528
|
+
heightFactor: .866
|
|
3529
|
+
},
|
|
3530
|
+
"bpmn-black-triangle": {
|
|
3531
|
+
type: "triangle",
|
|
3532
|
+
filled: !0,
|
|
3533
|
+
size: xn,
|
|
3534
|
+
widthFactor: 1,
|
|
3535
|
+
heightFactor: .866
|
|
3536
|
+
},
|
|
3537
|
+
"bpmn-white-circle": {
|
|
3538
|
+
type: "circle",
|
|
3539
|
+
filled: !1,
|
|
3540
|
+
size: xn,
|
|
3541
|
+
widthFactor: 1,
|
|
3542
|
+
heightFactor: 1
|
|
3543
|
+
},
|
|
3544
|
+
"bpmn-arrow": {
|
|
3545
|
+
type: "arrow",
|
|
3546
|
+
filled: !1,
|
|
3547
|
+
size: xn,
|
|
3548
|
+
widthFactor: 1,
|
|
3549
|
+
heightFactor: .866
|
|
3550
|
+
}
|
|
3551
|
+
}), En = Object.freeze({ STROKE_WIDTH: Object.freeze({
|
|
3552
|
+
triangle: 1.3,
|
|
3553
|
+
arrow: 1.5,
|
|
3554
|
+
rhombus: 1.3,
|
|
3555
|
+
circle: 1.3,
|
|
3556
|
+
semicircle: 2
|
|
3557
|
+
}) }), $ = Object.freeze({
|
|
3558
|
+
SIDEBAR_PREVIEW_SCALE: .8,
|
|
3559
|
+
DEFAULT_ELEMENT_WIDTH: 160
|
|
3560
|
+
}), Dn = Object.freeze({
|
|
3561
|
+
[C.ClassDiagram]: [
|
|
3562
|
+
{
|
|
3563
|
+
type: "package",
|
|
3564
|
+
width: $.DEFAULT_ELEMENT_WIDTH,
|
|
3565
|
+
height: 120,
|
|
3566
|
+
defaultData: { name: "Package" },
|
|
3567
|
+
svg: He
|
|
3568
|
+
},
|
|
3569
|
+
{
|
|
3570
|
+
type: "class",
|
|
3571
|
+
width: $.DEFAULT_ELEMENT_WIDTH,
|
|
3572
|
+
height: 100,
|
|
3573
|
+
defaultData: {
|
|
3574
|
+
name: "Class",
|
|
3575
|
+
methods: [{
|
|
3576
|
+
id: X(),
|
|
3577
|
+
name: "+ method()"
|
|
3578
|
+
}],
|
|
3579
|
+
attributes: [{
|
|
3580
|
+
id: X(),
|
|
3581
|
+
name: "+ attribute: Type"
|
|
3582
|
+
}]
|
|
3583
|
+
},
|
|
3584
|
+
svg: H
|
|
3585
|
+
},
|
|
3586
|
+
{
|
|
3587
|
+
type: "class",
|
|
3588
|
+
width: $.DEFAULT_ELEMENT_WIDTH,
|
|
3589
|
+
height: 110,
|
|
3590
|
+
defaultData: {
|
|
3591
|
+
name: "Abstract",
|
|
3592
|
+
stereotype: I.Abstract,
|
|
3593
|
+
methods: [{
|
|
3594
|
+
id: X(),
|
|
3595
|
+
name: "+ method()"
|
|
3596
|
+
}],
|
|
3597
|
+
attributes: [{
|
|
3598
|
+
id: X(),
|
|
3599
|
+
name: "+ attribute: Type"
|
|
3600
|
+
}]
|
|
3601
|
+
},
|
|
3602
|
+
svg: H
|
|
3603
|
+
},
|
|
3604
|
+
{
|
|
3605
|
+
type: "class",
|
|
3606
|
+
width: $.DEFAULT_ELEMENT_WIDTH,
|
|
3607
|
+
height: 140,
|
|
3608
|
+
defaultData: {
|
|
3609
|
+
name: "Enumeration",
|
|
3610
|
+
stereotype: I.Enumeration,
|
|
3611
|
+
methods: [],
|
|
3612
|
+
attributes: [
|
|
3613
|
+
{
|
|
3614
|
+
id: X(),
|
|
3615
|
+
name: "Case 1"
|
|
3616
|
+
},
|
|
3617
|
+
{
|
|
3618
|
+
id: X(),
|
|
3619
|
+
name: "Case 2"
|
|
3620
|
+
},
|
|
3621
|
+
{
|
|
3622
|
+
id: X(),
|
|
3623
|
+
name: "Case 3"
|
|
3624
|
+
}
|
|
3625
|
+
]
|
|
3626
|
+
},
|
|
3627
|
+
svg: H
|
|
3628
|
+
},
|
|
3629
|
+
{
|
|
3630
|
+
type: "class",
|
|
3631
|
+
width: $.DEFAULT_ELEMENT_WIDTH,
|
|
3632
|
+
height: 110,
|
|
3633
|
+
defaultData: {
|
|
3634
|
+
name: "Interface",
|
|
3635
|
+
stereotype: I.Interface,
|
|
3636
|
+
methods: [{
|
|
3637
|
+
id: X(),
|
|
3638
|
+
name: "+ method()"
|
|
3639
|
+
}],
|
|
3640
|
+
attributes: [{
|
|
3641
|
+
id: X(),
|
|
3642
|
+
name: "+ attribute: Type"
|
|
3643
|
+
}]
|
|
3644
|
+
},
|
|
3645
|
+
svg: H
|
|
3646
|
+
}
|
|
3647
|
+
],
|
|
3648
|
+
[C.ObjectDiagram]: [{
|
|
3649
|
+
type: "objectName",
|
|
3650
|
+
width: $.DEFAULT_ELEMENT_WIDTH,
|
|
3651
|
+
height: 70,
|
|
3652
|
+
defaultData: {
|
|
3653
|
+
name: "Object",
|
|
3654
|
+
attributes: [{
|
|
3655
|
+
id: X(),
|
|
3656
|
+
name: "attribute = value"
|
|
3657
|
+
}],
|
|
3658
|
+
methods: []
|
|
3659
|
+
},
|
|
3660
|
+
svg: Ue
|
|
3661
|
+
}],
|
|
3662
|
+
[C.ActivityDiagram]: [
|
|
3663
|
+
{
|
|
3664
|
+
type: "activity",
|
|
3665
|
+
width: $.DEFAULT_ELEMENT_WIDTH,
|
|
3666
|
+
height: 120,
|
|
3667
|
+
defaultData: { name: "Activity" },
|
|
3668
|
+
svg: Ie
|
|
3669
|
+
},
|
|
3670
|
+
{
|
|
3671
|
+
type: "activityInitialNode",
|
|
3672
|
+
width: 50,
|
|
3673
|
+
height: 50,
|
|
3674
|
+
defaultData: { name: "ActivityInitialNode" },
|
|
3675
|
+
svg: We
|
|
3676
|
+
},
|
|
3677
|
+
{
|
|
3678
|
+
type: "activityFinalNode",
|
|
3679
|
+
width: 50,
|
|
3680
|
+
height: 50,
|
|
3681
|
+
defaultData: { name: "ActivityFinalNode" },
|
|
3682
|
+
svg: Ge
|
|
3683
|
+
},
|
|
3684
|
+
{
|
|
3685
|
+
type: "activityActionNode",
|
|
3686
|
+
width: $.DEFAULT_ELEMENT_WIDTH,
|
|
3687
|
+
height: 120,
|
|
3688
|
+
defaultData: { name: "Action" },
|
|
3689
|
+
svg: Ke
|
|
3690
|
+
},
|
|
3691
|
+
{
|
|
3692
|
+
type: "activityObjectNode",
|
|
3693
|
+
width: $.DEFAULT_ELEMENT_WIDTH,
|
|
3694
|
+
height: 120,
|
|
3695
|
+
defaultData: { name: "Object" },
|
|
3696
|
+
svg: qe
|
|
3697
|
+
},
|
|
3698
|
+
{
|
|
3699
|
+
type: "activityMergeNode",
|
|
3700
|
+
width: $.DEFAULT_ELEMENT_WIDTH,
|
|
3701
|
+
height: 120,
|
|
3702
|
+
defaultData: { name: "Condition" },
|
|
3703
|
+
svg: $e
|
|
3704
|
+
},
|
|
3705
|
+
{
|
|
3706
|
+
type: "activityForkNode",
|
|
3707
|
+
width: 20,
|
|
3708
|
+
height: 100,
|
|
3709
|
+
defaultData: { name: "Fork" },
|
|
3710
|
+
svg: et
|
|
3711
|
+
},
|
|
3712
|
+
{
|
|
3713
|
+
type: "activityForkNodeHorizontal",
|
|
3714
|
+
width: 100,
|
|
3715
|
+
height: 20,
|
|
3716
|
+
defaultData: { name: "Fork" },
|
|
3717
|
+
svg: tt
|
|
3718
|
+
},
|
|
3719
|
+
{
|
|
3720
|
+
type: "activitySwimlane",
|
|
3721
|
+
width: 160,
|
|
3722
|
+
height: 100,
|
|
3723
|
+
dropWidth: 400,
|
|
3724
|
+
dropHeight: 240,
|
|
3725
|
+
defaultData: {
|
|
3726
|
+
name: "",
|
|
3727
|
+
orientation: "vertical",
|
|
3728
|
+
lanes: [{
|
|
3729
|
+
id: "lane-1",
|
|
3730
|
+
name: "Lane 1"
|
|
3731
|
+
}, {
|
|
3732
|
+
id: "lane-2",
|
|
3733
|
+
name: "Lane 2"
|
|
3734
|
+
}]
|
|
3735
|
+
},
|
|
3736
|
+
svg: nt
|
|
3737
|
+
}
|
|
3738
|
+
],
|
|
3739
|
+
[C.UseCaseDiagram]: [
|
|
3740
|
+
{
|
|
3741
|
+
type: "useCase",
|
|
3742
|
+
width: 160,
|
|
3743
|
+
height: 100,
|
|
3744
|
+
defaultData: { name: "Use Case" },
|
|
3745
|
+
svg: pt
|
|
3746
|
+
},
|
|
3747
|
+
{
|
|
3748
|
+
type: "useCaseActor",
|
|
3749
|
+
width: 100,
|
|
3750
|
+
height: 150,
|
|
3751
|
+
defaultData: { name: "Actor" },
|
|
3752
|
+
svg: ot
|
|
3753
|
+
},
|
|
3754
|
+
{
|
|
3755
|
+
type: "useCaseSystem",
|
|
3756
|
+
width: 160,
|
|
3757
|
+
height: 120,
|
|
3758
|
+
defaultData: { name: "System" },
|
|
3759
|
+
svg: st
|
|
3760
|
+
}
|
|
3761
|
+
],
|
|
3762
|
+
[C.CommunicationDiagram]: [{
|
|
3763
|
+
type: "communicationObjectName",
|
|
3764
|
+
width: 160,
|
|
3765
|
+
height: 70,
|
|
3766
|
+
defaultData: {
|
|
3767
|
+
name: "Object",
|
|
3768
|
+
methods: [],
|
|
3769
|
+
attributes: [{
|
|
3770
|
+
id: X(),
|
|
3771
|
+
name: "attribute = value"
|
|
3772
|
+
}]
|
|
3773
|
+
},
|
|
3774
|
+
svg: Ut
|
|
3775
|
+
}],
|
|
3776
|
+
[C.ComponentDiagram]: [
|
|
3777
|
+
{
|
|
3778
|
+
type: "component",
|
|
3779
|
+
width: 180,
|
|
3780
|
+
height: 120,
|
|
3781
|
+
defaultData: {
|
|
3782
|
+
name: "Component",
|
|
3783
|
+
isComponentHeaderShown: !0
|
|
3784
|
+
},
|
|
3785
|
+
svg: mt
|
|
3786
|
+
},
|
|
3787
|
+
{
|
|
3788
|
+
type: "componentSubsystem",
|
|
3789
|
+
width: 180,
|
|
3790
|
+
height: 120,
|
|
3791
|
+
defaultData: {
|
|
3792
|
+
name: "Subsystem",
|
|
3793
|
+
isComponentSubsystemHeaderShown: !0
|
|
3794
|
+
},
|
|
3795
|
+
svg: yt
|
|
3796
|
+
},
|
|
3797
|
+
{
|
|
3798
|
+
type: "componentInterface",
|
|
3799
|
+
width: Z,
|
|
3800
|
+
height: Z,
|
|
3801
|
+
defaultData: { name: "Interface" },
|
|
3802
|
+
svg: _t,
|
|
3803
|
+
marginTop: 10
|
|
3804
|
+
}
|
|
3805
|
+
],
|
|
3806
|
+
[C.DeploymentDiagram]: [
|
|
3807
|
+
{
|
|
3808
|
+
type: "deploymentNode",
|
|
3809
|
+
width: 160,
|
|
3810
|
+
height: 100,
|
|
3811
|
+
defaultData: {
|
|
3812
|
+
name: "Node",
|
|
3813
|
+
isComponentHeaderShown: !0,
|
|
3814
|
+
stereotype: "node"
|
|
3815
|
+
},
|
|
3816
|
+
svg: At
|
|
3817
|
+
},
|
|
3818
|
+
{
|
|
3819
|
+
type: "deploymentComponent",
|
|
3820
|
+
width: 160,
|
|
3821
|
+
height: 100,
|
|
3822
|
+
defaultData: {
|
|
3823
|
+
name: "Component",
|
|
3824
|
+
isComponentHeaderShown: !0
|
|
3825
|
+
},
|
|
3826
|
+
svg: jt
|
|
3827
|
+
},
|
|
3828
|
+
{
|
|
3829
|
+
type: "deploymentArtifact",
|
|
3830
|
+
width: 160,
|
|
3831
|
+
height: 50,
|
|
3832
|
+
defaultData: { name: "Artifact" },
|
|
3833
|
+
svg: Mt
|
|
3834
|
+
},
|
|
3835
|
+
{
|
|
3836
|
+
type: "deploymentInterface",
|
|
3837
|
+
width: Z,
|
|
3838
|
+
height: Z,
|
|
3839
|
+
defaultData: { name: "Interface" },
|
|
3840
|
+
svg: Nt,
|
|
3841
|
+
marginTop: 10
|
|
3842
|
+
}
|
|
3843
|
+
],
|
|
3844
|
+
[C.SyntaxTree]: [{
|
|
3845
|
+
type: "syntaxTreeNonterminal",
|
|
3846
|
+
width: 160,
|
|
3847
|
+
height: 100,
|
|
3848
|
+
defaultData: { name: "Nonterminal" },
|
|
3849
|
+
svg: Vt
|
|
3850
|
+
}, {
|
|
3851
|
+
type: "syntaxTreeTerminal",
|
|
3852
|
+
width: 160,
|
|
3853
|
+
height: 100,
|
|
3854
|
+
defaultData: { name: "Terminal" },
|
|
3855
|
+
svg: Ht
|
|
3856
|
+
}],
|
|
3857
|
+
[C.PetriNet]: [{
|
|
3858
|
+
type: "petriNetTransition",
|
|
3859
|
+
width: 30,
|
|
3860
|
+
height: 60,
|
|
3861
|
+
defaultData: { name: "Transition" },
|
|
3862
|
+
svg: Gt,
|
|
3863
|
+
marginTop: 15
|
|
3864
|
+
}, {
|
|
3865
|
+
type: "petriNetPlace",
|
|
3866
|
+
width: 60,
|
|
3867
|
+
height: 60,
|
|
3868
|
+
defaultData: { name: "Place" },
|
|
3869
|
+
svg: Wt,
|
|
3870
|
+
marginTop: 5
|
|
3871
|
+
}],
|
|
3872
|
+
[C.ReachabilityGraph]: [{
|
|
3873
|
+
type: "reachabilityGraphMarking",
|
|
3874
|
+
width: 160,
|
|
3875
|
+
height: 120,
|
|
3876
|
+
defaultData: { name: "Marking" },
|
|
3877
|
+
svg: dn
|
|
3878
|
+
}],
|
|
3879
|
+
[C.Flowchart]: [
|
|
3880
|
+
{
|
|
3881
|
+
type: "flowchartTerminal",
|
|
3882
|
+
width: 160,
|
|
3883
|
+
height: 70,
|
|
3884
|
+
defaultData: { name: "Terminal" },
|
|
3885
|
+
svg: bt
|
|
3886
|
+
},
|
|
3887
|
+
{
|
|
3888
|
+
type: "flowchartProcess",
|
|
3889
|
+
width: 160,
|
|
3890
|
+
height: 70,
|
|
3891
|
+
defaultData: { name: "Process" },
|
|
3892
|
+
svg: xt
|
|
3893
|
+
},
|
|
3894
|
+
{
|
|
3895
|
+
type: "flowchartDecision",
|
|
3896
|
+
width: 160,
|
|
3897
|
+
height: 70,
|
|
3898
|
+
defaultData: { name: "Decision" },
|
|
3899
|
+
svg: Dt
|
|
3900
|
+
},
|
|
3901
|
+
{
|
|
3902
|
+
type: "flowchartInputOutput",
|
|
3903
|
+
width: 140,
|
|
3904
|
+
height: 70,
|
|
3905
|
+
defaultData: { name: "Input/Output" },
|
|
3906
|
+
svg: Ot
|
|
3907
|
+
},
|
|
3908
|
+
{
|
|
3909
|
+
type: "flowchartFunctionCall",
|
|
3910
|
+
width: 160,
|
|
3911
|
+
height: 70,
|
|
3912
|
+
defaultData: { name: "Function Call" },
|
|
3913
|
+
svg: kt
|
|
3914
|
+
}
|
|
3915
|
+
],
|
|
3916
|
+
[C.BPMN]: [
|
|
3917
|
+
{
|
|
3918
|
+
type: "bpmnTask",
|
|
3919
|
+
width: 160,
|
|
3920
|
+
height: 60,
|
|
3921
|
+
defaultData: { name: "Task" },
|
|
3922
|
+
svg: Pt
|
|
3923
|
+
},
|
|
3924
|
+
{
|
|
3925
|
+
type: "bpmnSubprocess",
|
|
3926
|
+
width: 160,
|
|
3927
|
+
height: 60,
|
|
3928
|
+
defaultData: { name: "Subprocess" },
|
|
3929
|
+
svg: W
|
|
3930
|
+
},
|
|
3931
|
+
{
|
|
3932
|
+
type: "bpmnTransaction",
|
|
3933
|
+
width: 160,
|
|
3934
|
+
height: 60,
|
|
3935
|
+
defaultData: {
|
|
3936
|
+
name: "Transaction",
|
|
3937
|
+
variant: "transaction"
|
|
3938
|
+
},
|
|
3939
|
+
svg: W
|
|
3940
|
+
},
|
|
3941
|
+
{
|
|
3942
|
+
type: "bpmnCallActivity",
|
|
3943
|
+
width: 160,
|
|
3944
|
+
height: 60,
|
|
3945
|
+
defaultData: {
|
|
3946
|
+
name: "Call Activity",
|
|
3947
|
+
variant: "call"
|
|
3948
|
+
},
|
|
3949
|
+
svg: W
|
|
3950
|
+
},
|
|
3951
|
+
{
|
|
3952
|
+
type: "bpmnGroup",
|
|
3953
|
+
width: 160,
|
|
3954
|
+
height: 60,
|
|
3955
|
+
defaultData: { name: "Group" },
|
|
3956
|
+
svg: Bt
|
|
3957
|
+
},
|
|
3958
|
+
{
|
|
3959
|
+
type: "bpmnAnnotation",
|
|
3960
|
+
width: 160,
|
|
3961
|
+
height: 60,
|
|
3962
|
+
defaultData: { name: "Annotation" },
|
|
3963
|
+
svg: It
|
|
3964
|
+
},
|
|
3965
|
+
{
|
|
3966
|
+
type: "bpmnStartEvent",
|
|
3967
|
+
width: 40,
|
|
3968
|
+
height: 40,
|
|
3969
|
+
defaultData: {
|
|
3970
|
+
name: "",
|
|
3971
|
+
variant: "start"
|
|
3972
|
+
},
|
|
3973
|
+
svg: U
|
|
3974
|
+
},
|
|
3975
|
+
{
|
|
3976
|
+
type: "bpmnIntermediateEvent",
|
|
3977
|
+
width: 40,
|
|
3978
|
+
height: 40,
|
|
3979
|
+
defaultData: {
|
|
3980
|
+
name: "",
|
|
3981
|
+
variant: "intermediate"
|
|
3982
|
+
},
|
|
3983
|
+
svg: U
|
|
3984
|
+
},
|
|
3985
|
+
{
|
|
3986
|
+
type: "bpmnEndEvent",
|
|
3987
|
+
width: 40,
|
|
3988
|
+
height: 40,
|
|
3989
|
+
defaultData: {
|
|
3990
|
+
name: "",
|
|
3991
|
+
variant: "end"
|
|
3992
|
+
},
|
|
3993
|
+
svg: U
|
|
3994
|
+
},
|
|
3995
|
+
{
|
|
3996
|
+
type: "bpmnGateway",
|
|
3997
|
+
width: 40,
|
|
3998
|
+
height: 40,
|
|
3999
|
+
defaultData: { name: "" },
|
|
4000
|
+
svg: Ft
|
|
4001
|
+
},
|
|
4002
|
+
{
|
|
4003
|
+
type: "bpmnDataObject",
|
|
4004
|
+
width: 40,
|
|
4005
|
+
height: 60,
|
|
4006
|
+
defaultData: { name: "" },
|
|
4007
|
+
svg: Lt
|
|
4008
|
+
},
|
|
4009
|
+
{
|
|
4010
|
+
type: "bpmnDataStore",
|
|
4011
|
+
width: 60,
|
|
4012
|
+
height: 60,
|
|
4013
|
+
defaultData: { name: "" },
|
|
4014
|
+
svg: Rt
|
|
4015
|
+
},
|
|
4016
|
+
{
|
|
4017
|
+
type: "bpmnPool",
|
|
4018
|
+
width: 160,
|
|
4019
|
+
height: 80,
|
|
4020
|
+
defaultData: { name: "Pool" },
|
|
4021
|
+
svg: zt
|
|
4022
|
+
}
|
|
4023
|
+
],
|
|
4024
|
+
[C.Sfc]: [
|
|
4025
|
+
{
|
|
4026
|
+
type: "sfcStart",
|
|
4027
|
+
width: 160,
|
|
4028
|
+
height: 70,
|
|
4029
|
+
defaultData: { name: "Start" },
|
|
4030
|
+
svg: Kt
|
|
4031
|
+
},
|
|
4032
|
+
{
|
|
4033
|
+
type: "sfcStep",
|
|
4034
|
+
width: 160,
|
|
4035
|
+
height: 70,
|
|
4036
|
+
defaultData: { name: "Step" },
|
|
4037
|
+
svg: qt
|
|
4038
|
+
},
|
|
4039
|
+
{
|
|
4040
|
+
type: "sfcJump",
|
|
4041
|
+
width: 96,
|
|
4042
|
+
height: 48,
|
|
4043
|
+
defaultData: { name: "Jump" },
|
|
4044
|
+
svg: Jt
|
|
4045
|
+
},
|
|
4046
|
+
{
|
|
4047
|
+
type: "sfcTransitionBranch",
|
|
4048
|
+
width: 30,
|
|
4049
|
+
height: 30,
|
|
4050
|
+
defaultData: {
|
|
4051
|
+
name: "Branch",
|
|
4052
|
+
showHint: !0
|
|
4053
|
+
},
|
|
4054
|
+
svg: Yt
|
|
4055
|
+
},
|
|
4056
|
+
{
|
|
4057
|
+
type: "sfcActionTable",
|
|
4058
|
+
width: 160,
|
|
4059
|
+
height: 30,
|
|
4060
|
+
defaultData: {
|
|
4061
|
+
name: "Action Table",
|
|
4062
|
+
actionRows: [{
|
|
4063
|
+
id: "1",
|
|
4064
|
+
identifier: "A",
|
|
4065
|
+
name: "Actions",
|
|
4066
|
+
fillColor: "",
|
|
4067
|
+
strokeColor: ""
|
|
4068
|
+
}]
|
|
4069
|
+
},
|
|
4070
|
+
svg: Xt
|
|
4071
|
+
}
|
|
4072
|
+
]
|
|
4073
|
+
}), On = Object.freeze({
|
|
4074
|
+
type: "colorDescription",
|
|
4075
|
+
width: 160,
|
|
4076
|
+
height: 50,
|
|
4077
|
+
defaultData: { name: "Color Description" },
|
|
4078
|
+
svg: ze
|
|
4079
|
+
}), kn = ({ name: e, stereotype: t, showStereotype: n, width: r, height: a, sideReserve: l, verticalAnchor: u = "center", topAnchorY: d = 30, nameTextDecoration: f, fontWeight: p = "bold", fill: m }) => {
|
|
4080
|
+
let h = l ?? Y.DEFAULT_PADDING * 2, g = r / 2, _ = Math.max(1, r - h), v = A(u === "top" ? a - d - Y.NAME_LINE_HEIGHT : n ? a - Y.STEREOTYPE_LINE_HEIGHT - Y.STEREOTYPE_NAME_GAP - 8 : a - 16, Y.NAME_LINE_HEIGHT), y = i(() => {
|
|
4081
|
+
if (!e) return 0;
|
|
4082
|
+
let t = ie(e, _, {
|
|
4083
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
4084
|
+
fontWeight: p
|
|
4085
|
+
}, {
|
|
4086
|
+
lineHeight: Y.NAME_LINE_HEIGHT,
|
|
4087
|
+
maxLines: v
|
|
4088
|
+
});
|
|
4089
|
+
return Math.max(1, t.lines.length);
|
|
4090
|
+
}, [
|
|
4091
|
+
e,
|
|
4092
|
+
_,
|
|
4093
|
+
v,
|
|
4094
|
+
p
|
|
4095
|
+
]), { stereotypeCenterY: b, nameFirstLineCenterY: x } = (() => {
|
|
4096
|
+
if (u === "top") return {
|
|
4097
|
+
stereotypeCenterY: d - Y.STEREOTYPE_LINE_HEIGHT / 2,
|
|
4098
|
+
nameFirstLineCenterY: n ? d + Y.STEREOTYPE_LINE_HEIGHT - Y.STEREOTYPE_NAME_GAP : d
|
|
4099
|
+
};
|
|
4100
|
+
let e = n ? Y.STEREOTYPE_LINE_HEIGHT + Y.STEREOTYPE_NAME_GAP + y * Y.NAME_LINE_HEIGHT : y * Y.NAME_LINE_HEIGHT, t = a / 2 - e / 2;
|
|
4101
|
+
return {
|
|
4102
|
+
stereotypeCenterY: t + Y.STEREOTYPE_LINE_HEIGHT / 2,
|
|
4103
|
+
nameFirstLineCenterY: n ? t + Y.STEREOTYPE_LINE_HEIGHT + Y.STEREOTYPE_NAME_GAP + Y.NAME_LINE_HEIGHT / 2 : t + Y.NAME_LINE_HEIGHT / 2
|
|
4104
|
+
};
|
|
4105
|
+
})();
|
|
4106
|
+
return /* @__PURE__ */ c(o, { children: [n && t && t.length > 0 && /* @__PURE__ */ s(D, {
|
|
4107
|
+
x: g,
|
|
4108
|
+
y: b,
|
|
4109
|
+
textAnchor: "middle",
|
|
4110
|
+
fontWeight: String(p),
|
|
4111
|
+
dominantBaseline: "middle",
|
|
4112
|
+
fill: m,
|
|
4113
|
+
fontSize: "0.8em",
|
|
4114
|
+
children: `«${t}»`
|
|
4115
|
+
}), /* @__PURE__ */ s(j, {
|
|
4116
|
+
text: e,
|
|
4117
|
+
x: g,
|
|
4118
|
+
y: x,
|
|
4119
|
+
maxWidth: _,
|
|
4120
|
+
fontSize: Y.NAME_FONT_SIZE,
|
|
4121
|
+
lineHeight: Y.NAME_LINE_HEIGHT,
|
|
4122
|
+
fontWeight: p,
|
|
4123
|
+
fill: m,
|
|
4124
|
+
verticalAnchor: "top",
|
|
4125
|
+
maxLines: v,
|
|
4126
|
+
textDecoration: f
|
|
4127
|
+
})] });
|
|
4128
|
+
}, An = "store", jn = (e) => e.getMap("nodes"), Mn = (e) => e.getMap("edges"), Nn = (e) => e.getMap("assessments"), Pn = (e) => e.getMap("diagramMetadata"), Fn = (e, t) => {
|
|
4129
|
+
let n = new Map(Array.from(t, ([e, t]) => [e, t]));
|
|
4130
|
+
for (let t of Array.from(e.keys())) n.has(t) || e.delete(t);
|
|
4131
|
+
for (let [t, r] of n) (!e.has(t) || !G(e.get(t), r)) && e.set(t, r);
|
|
4132
|
+
}, In = /* @__PURE__ */ function(e) {
|
|
4133
|
+
return e[e.YjsSYNC = 0] = "YjsSYNC", e[e.YjsUpdate = 1] = "YjsUpdate", e[e.AwarenessSync = 2] = "AwarenessSync", e[e.AwarenessUpdate = 3] = "AwarenessUpdate", e;
|
|
4134
|
+
}({}), Ln = class e {
|
|
4135
|
+
stopYjsObserver;
|
|
4136
|
+
sendBroadcastMessage = null;
|
|
4137
|
+
ydoc;
|
|
4138
|
+
diagramStore;
|
|
4139
|
+
metadataStore;
|
|
4140
|
+
awareness;
|
|
4141
|
+
constructor(e, t, n) {
|
|
4142
|
+
this.ydoc = e, this.diagramStore = t, this.metadataStore = n, this.awareness = new b(this.ydoc), this.stopYjsObserver = this.startYjsObserver(), this.diagramStore.getState().setDraggingNodesPublisher(this.setLocalAwarenessDraggingNodes);
|
|
4143
|
+
}
|
|
4144
|
+
stopSync() {
|
|
4145
|
+
this.stopYjsObserver();
|
|
4146
|
+
}
|
|
4147
|
+
broadcastFullState = () => {
|
|
4148
|
+
if (!this.sendBroadcastMessage) return;
|
|
4149
|
+
let e = y.encodeStateAsUpdate(this.ydoc);
|
|
4150
|
+
this.sendFramedMessage(1, e);
|
|
4151
|
+
};
|
|
4152
|
+
setSendBroadcastMessage = (e) => {
|
|
4153
|
+
if (this.sendBroadcastMessage = e, this.awareness.getLocalState()) {
|
|
4154
|
+
let e = S(this.awareness, [this.awareness.clientID]);
|
|
4155
|
+
this.sendFramedMessage(3, e);
|
|
4156
|
+
}
|
|
4157
|
+
};
|
|
4158
|
+
setLocalAwarenessUser = (e) => {
|
|
4159
|
+
this.awareness.setLocalStateField("user", e);
|
|
4160
|
+
};
|
|
4161
|
+
setLocalAwarenessCursor = (e) => {
|
|
4162
|
+
this.awareness.setLocalStateField("cursor", e);
|
|
4163
|
+
};
|
|
4164
|
+
setLocalAwarenessViewport = (e) => {
|
|
4165
|
+
this.awareness.setLocalStateField("viewport", e);
|
|
4166
|
+
};
|
|
4167
|
+
setLocalAwarenessFollowing = (e) => {
|
|
4168
|
+
this.awareness.setLocalStateField("followingClientId", e);
|
|
4169
|
+
};
|
|
4170
|
+
setLocalAwarenessSelectedElement = (e) => {
|
|
4171
|
+
this.awareness.setLocalStateField("selectedElementId", e);
|
|
4172
|
+
};
|
|
4173
|
+
setLocalAwarenessDraggingNodes = (e) => {
|
|
4174
|
+
this.awareness.setLocalStateField("draggingNodes", e);
|
|
4175
|
+
};
|
|
4176
|
+
setLocalAwarenessState = (e) => {
|
|
4177
|
+
let t = this.awareness.getLocalState();
|
|
4178
|
+
this.awareness.setLocalState({
|
|
4179
|
+
...t,
|
|
4180
|
+
...e
|
|
4181
|
+
});
|
|
4182
|
+
};
|
|
4183
|
+
subscribeToAwarenessChanges = (e) => {
|
|
4184
|
+
let t = () => e(this.getTypedStates());
|
|
4185
|
+
return this.awareness.on("change", t), () => {
|
|
4186
|
+
this.awareness.off("change", t);
|
|
4187
|
+
};
|
|
4188
|
+
};
|
|
4189
|
+
getAwarenessStates = () => this.getTypedStates();
|
|
4190
|
+
getCollaborators = () => {
|
|
4191
|
+
let e = this.getTypedStates(), t = this.awareness.clientID, n = /* @__PURE__ */ new Map();
|
|
4192
|
+
for (let [r, i] of e.entries()) {
|
|
4193
|
+
let e = i.user;
|
|
4194
|
+
if (!e) continue;
|
|
4195
|
+
let a = e.id ?? `__client_${r}`, o = n.get(a);
|
|
4196
|
+
o ? (o.clientIds.push(r), r === t && (o.isLocal = !0)) : n.set(a, {
|
|
4197
|
+
id: a,
|
|
4198
|
+
name: e.name,
|
|
4199
|
+
color: e.color,
|
|
4200
|
+
imageUrl: e.imageUrl,
|
|
4201
|
+
clientIds: [r],
|
|
4202
|
+
isLocal: r === t
|
|
4203
|
+
});
|
|
4204
|
+
}
|
|
4205
|
+
return Array.from(n.values());
|
|
4206
|
+
};
|
|
4207
|
+
subscribeToCollaboratorChanges = (e) => {
|
|
4208
|
+
let t = "", n = ({ added: n, removed: r }) => {
|
|
4209
|
+
let i = this.computeParticipantSignature();
|
|
4210
|
+
n.length === 0 && r.length === 0 && i === t || (t = i, e(this.getCollaborators()));
|
|
4211
|
+
};
|
|
4212
|
+
return this.awareness.on("change", n), () => {
|
|
4213
|
+
this.awareness.off("change", n);
|
|
4214
|
+
};
|
|
4215
|
+
};
|
|
4216
|
+
getLocalAwarenessClientId = () => this.awareness.clientID;
|
|
4217
|
+
static narrowState(e) {
|
|
4218
|
+
if (typeof e != "object" || !e) return null;
|
|
4219
|
+
let t = e, n = t.user;
|
|
4220
|
+
if (n != null && (typeof n != "object" || typeof n.name != "string" || typeof n.color != "string")) return null;
|
|
4221
|
+
let r = { ...t };
|
|
4222
|
+
return t.viewport != null && (r.viewport = sn(t.viewport)), t.draggingNodes != null && (r.draggingNodes = cn(t.draggingNodes)), t.followingClientId != null && typeof t.followingClientId != "number" && (r.followingClientId = null), r;
|
|
4223
|
+
}
|
|
4224
|
+
getTypedStates() {
|
|
4225
|
+
let t = this.awareness.getStates(), n = /* @__PURE__ */ new Map();
|
|
4226
|
+
for (let [r, i] of t.entries()) {
|
|
4227
|
+
let t = e.narrowState(i);
|
|
4228
|
+
t && n.set(r, t);
|
|
4229
|
+
}
|
|
4230
|
+
return n;
|
|
4231
|
+
}
|
|
4232
|
+
computeParticipantSignature = () => {
|
|
4233
|
+
let e = this.getTypedStates(), t = [];
|
|
4234
|
+
for (let [n, r] of e.entries()) {
|
|
4235
|
+
let e = r.user;
|
|
4236
|
+
e && t.push(`${n}:${e.id ?? ""}:${e.name}:${e.color}:${e.imageUrl ?? ""}`);
|
|
4237
|
+
}
|
|
4238
|
+
return t.sort(), t.join("|");
|
|
4239
|
+
};
|
|
4240
|
+
sendFramedMessage = (t, n) => {
|
|
4241
|
+
if (!this.sendBroadcastMessage) return;
|
|
4242
|
+
let r = new Uint8Array(1 + n.length);
|
|
4243
|
+
r[0] = t, r.set(n, 1);
|
|
4244
|
+
let i = e.uint8ToBase64(r);
|
|
4245
|
+
this.sendBroadcastMessage(i);
|
|
4246
|
+
};
|
|
4247
|
+
applyUpdate = (e, t) => {
|
|
4248
|
+
y.applyUpdate(this.ydoc, e, t);
|
|
4249
|
+
};
|
|
4250
|
+
handleReceivedData = (t) => {
|
|
4251
|
+
let n = e.base64ToUint8(t), r = n[0];
|
|
4252
|
+
if (r === 1) {
|
|
4253
|
+
let e = n.slice(1);
|
|
4254
|
+
this.applyUpdate(e, "remote");
|
|
4255
|
+
} else if (r === 0) {
|
|
4256
|
+
let e = y.encodeStateAsUpdate(this.ydoc);
|
|
4257
|
+
this.sendFramedMessage(1, e);
|
|
4258
|
+
} else if (r === 3) {
|
|
4259
|
+
let e = n.slice(1);
|
|
4260
|
+
x(this.awareness, e, "remote");
|
|
4261
|
+
} else if (r === 2) {
|
|
4262
|
+
let e = Array.from(this.awareness.getStates().keys()), t = S(this.awareness, e);
|
|
4263
|
+
this.sendFramedMessage(3, t);
|
|
4264
|
+
}
|
|
4265
|
+
};
|
|
4266
|
+
startYjsObserver = () => {
|
|
4267
|
+
let e = () => this.diagramStore.getState().previewMode === !0, t = (t, n) => {
|
|
4268
|
+
n.origin !== "store" && !this.isUndoRedoTransaction(n) && !e() && this.diagramStore.getState().updateNodesFromYjs();
|
|
4269
|
+
}, n = (t, n) => {
|
|
4270
|
+
n.origin !== "store" && !this.isUndoRedoTransaction(n) && !e() && this.diagramStore.getState().updateEdgesFromYjs();
|
|
4271
|
+
}, r = (t, n) => {
|
|
4272
|
+
n.origin !== "store" && !this.isUndoRedoTransaction(n) && !e() && this.metadataStore.getState().updateMetaDataFromYjs();
|
|
4273
|
+
}, i = (t, n) => {
|
|
4274
|
+
n.origin !== "store" && !this.isUndoRedoTransaction(n) && !e() && this.diagramStore.getState().updateAssessmentFromYjs();
|
|
4275
|
+
}, a = (e, t, n, r) => {
|
|
4276
|
+
this.sendBroadcastMessage && (r.origin === "store" || this.isUndoRedoTransaction(r)) && this.sendFramedMessage(1, e), this.isUndoRedoTransaction(r) && (this.diagramStore.getState().updateNodesFromYjs(), this.diagramStore.getState().updateEdgesFromYjs(), this.diagramStore.getState().updateAssessmentFromYjs(), this.diagramStore.getState().updateUndoRedoState());
|
|
4277
|
+
}, o = ({ added: e, updated: t, removed: n }, r) => {
|
|
4278
|
+
if (r === "remote") return;
|
|
4279
|
+
let i = [
|
|
4280
|
+
...e,
|
|
4281
|
+
...t,
|
|
4282
|
+
...n
|
|
4283
|
+
];
|
|
4284
|
+
if (i.length === 0) return;
|
|
4285
|
+
let a = S(this.awareness, i);
|
|
4286
|
+
this.sendFramedMessage(3, a);
|
|
4287
|
+
};
|
|
4288
|
+
return jn(this.ydoc).observe(t), Mn(this.ydoc).observe(n), Nn(this.ydoc).observe(i), Pn(this.ydoc).observe(r), this.ydoc.on("update", a), this.awareness.on("update", o), () => {
|
|
4289
|
+
jn(this.ydoc).unobserve(t), Mn(this.ydoc).unobserve(n), Nn(this.ydoc).unobserve(i), Pn(this.ydoc).unobserve(r), this.ydoc.off("update", a), this.awareness.off("update", o);
|
|
4290
|
+
};
|
|
4291
|
+
};
|
|
4292
|
+
isUndoRedoTransaction(e) {
|
|
4293
|
+
let t = this.diagramStore.getState().undoManager;
|
|
4294
|
+
return t ? t === e.origin : !1;
|
|
4295
|
+
}
|
|
4296
|
+
static uint8ToBase64(e) {
|
|
4297
|
+
let t = e.toBase64;
|
|
4298
|
+
if (typeof t == "function") return t.call(e);
|
|
4299
|
+
let n = "";
|
|
4300
|
+
for (let t = 0; t < e.length; t++) n += String.fromCharCode(e[t]);
|
|
4301
|
+
return btoa(n);
|
|
4302
|
+
}
|
|
4303
|
+
static base64ToUint8(e) {
|
|
4304
|
+
let t = atob(e), n = new Uint8Array(t.length);
|
|
4305
|
+
for (let e = 0; e < t.length; e++) n[e] = t.charCodeAt(e);
|
|
4306
|
+
return n;
|
|
4307
|
+
}
|
|
4308
|
+
};
|
|
4309
|
+
//#endregion
|
|
4310
|
+
//#region lib/services/migration/EdgeTransformer.ts
|
|
4311
|
+
function Rn(e) {
|
|
4312
|
+
let t = e.data ?? {}, n = Object.prototype.hasOwnProperty.call(t, "computedSegments");
|
|
4313
|
+
if (e.data != null && !n) return e;
|
|
4314
|
+
let r = { ...t };
|
|
4315
|
+
return delete r.computedSegments, {
|
|
4316
|
+
...e,
|
|
4317
|
+
data: r
|
|
4318
|
+
};
|
|
4319
|
+
}
|
|
4320
|
+
function zn(e) {
|
|
4321
|
+
let t = e.edges.map(Rn);
|
|
4322
|
+
return t.some((t, n) => t !== e.edges[n]) ? {
|
|
4323
|
+
...e,
|
|
4324
|
+
edges: t
|
|
4325
|
+
} : e;
|
|
4326
|
+
}
|
|
4327
|
+
//#endregion
|
|
4328
|
+
//#region lib/utils/versionConverter.ts
|
|
4329
|
+
function Bn(e, t, n, r) {
|
|
4330
|
+
return !(e === "componentInterface" || e === "deploymentInterface") || n === Q.SIZE && r === Q.SIZE ? {
|
|
4331
|
+
position: t,
|
|
4332
|
+
width: n,
|
|
4333
|
+
height: r
|
|
4334
|
+
} : {
|
|
4335
|
+
position: {
|
|
4336
|
+
x: t.x + (n - Q.SIZE) / 2,
|
|
4337
|
+
y: t.y + (r - Q.SIZE) / 2
|
|
4338
|
+
},
|
|
4339
|
+
width: Q.SIZE,
|
|
4340
|
+
height: Q.SIZE
|
|
4341
|
+
};
|
|
4342
|
+
}
|
|
4343
|
+
function Vn(e) {
|
|
4344
|
+
let t = {
|
|
4345
|
+
id: "converted-diagram-" + Date.now(),
|
|
4346
|
+
title: "Converted Diagram",
|
|
4347
|
+
model: {
|
|
4348
|
+
version: "3.0.0",
|
|
4349
|
+
type: e.type,
|
|
4350
|
+
size: e.size,
|
|
4351
|
+
interactive: {
|
|
4352
|
+
elements: {},
|
|
4353
|
+
relationships: {}
|
|
4354
|
+
},
|
|
4355
|
+
elements: {},
|
|
4356
|
+
relationships: {},
|
|
4357
|
+
assessments: {}
|
|
4358
|
+
}
|
|
4359
|
+
};
|
|
4360
|
+
return e.interactive?.elements && e.interactive.elements.forEach((e) => {
|
|
4361
|
+
t.model.interactive.elements[e] = !0;
|
|
4362
|
+
}), e.interactive?.relationships && e.interactive.relationships.forEach((e) => {
|
|
4363
|
+
t.model.interactive.relationships[e] = !0;
|
|
4364
|
+
}), e.elements && e.elements.forEach((e) => {
|
|
4365
|
+
t.model.elements[e.id] = e;
|
|
4366
|
+
}), e.relationships && e.relationships.forEach((e) => {
|
|
4367
|
+
t.model.relationships[e.id] = e;
|
|
4368
|
+
}), e.assessments && e.assessments.forEach((e) => {
|
|
4369
|
+
t.model.assessments[e.modelElementId] = e;
|
|
4370
|
+
}), $n(t);
|
|
4371
|
+
}
|
|
4372
|
+
function Hn(e) {
|
|
4373
|
+
return e && e.version && e.version.startsWith("2.") && e.size && e.type && Array.isArray(e.elements) && Array.isArray(e.relationships) && Array.isArray(e.assessments) && e.interactive && Array.isArray(e.interactive.elements) && Array.isArray(e.interactive.relationships) && !e.model;
|
|
4374
|
+
}
|
|
4375
|
+
function Un(e) {
|
|
4376
|
+
return {
|
|
4377
|
+
Up: "top",
|
|
4378
|
+
Right: "right",
|
|
4379
|
+
Down: "bottom",
|
|
4380
|
+
Left: "left",
|
|
4381
|
+
Upright: "right-top",
|
|
4382
|
+
Upleft: "left-top",
|
|
4383
|
+
Downright: "right-bottom",
|
|
4384
|
+
Downleft: "left-bottom",
|
|
4385
|
+
RightTop: "top-right",
|
|
4386
|
+
RightBottom: "bottom-right",
|
|
4387
|
+
LeftTop: "top-left",
|
|
4388
|
+
LeftBottom: "bottom-left",
|
|
4389
|
+
Topright: "top-right",
|
|
4390
|
+
Topleft: "top-left",
|
|
4391
|
+
Bottomright: "bottom-right",
|
|
4392
|
+
Bottomleft: "bottom-left"
|
|
4393
|
+
}[e] || e.toLowerCase();
|
|
4394
|
+
}
|
|
4395
|
+
function Wn(e) {
|
|
4396
|
+
return {
|
|
4397
|
+
Class: "class",
|
|
4398
|
+
AbstractClass: "class",
|
|
4399
|
+
Interface: "class",
|
|
4400
|
+
Enumeration: "class",
|
|
4401
|
+
Package: "package",
|
|
4402
|
+
ClassAttribute: "classAttribute",
|
|
4403
|
+
ClassMethod: "classMethod",
|
|
4404
|
+
ActivityInitialNode: "activityInitialNode",
|
|
4405
|
+
ActivityFinalNode: "activityFinalNode",
|
|
4406
|
+
ActivityActionNode: "activityActionNode",
|
|
4407
|
+
ActivityObjectNode: "activityObjectNode",
|
|
4408
|
+
ActivityForkNode: "activityForkNode",
|
|
4409
|
+
ActivityForkNodeHorizontal: "activityForkNodeHorizontal",
|
|
4410
|
+
ActivityMergeNode: "activityMergeNode",
|
|
4411
|
+
ActivityDecisionNode: "activityMergeNode",
|
|
4412
|
+
Activity: "activity",
|
|
4413
|
+
UseCase: "useCase",
|
|
4414
|
+
UseCaseActor: "useCaseActor",
|
|
4415
|
+
UseCaseSystem: "useCaseSystem",
|
|
4416
|
+
CommunicationObject: "communicationObjectName",
|
|
4417
|
+
Component: "component",
|
|
4418
|
+
ComponentInterface: "componentInterface",
|
|
4419
|
+
Subsystem: "componentSubsystem",
|
|
4420
|
+
DeploymentNode: "deploymentNode",
|
|
4421
|
+
DeploymentComponent: "deploymentComponent",
|
|
4422
|
+
DeploymentArtifact: "deploymentArtifact",
|
|
4423
|
+
DeploymentInterface: "deploymentInterface",
|
|
4424
|
+
ObjectName: "objectName",
|
|
4425
|
+
ObjectAttribute: "objectAttribute",
|
|
4426
|
+
ObjectMethod: "objectMethod",
|
|
4427
|
+
PetriNetPlace: "petriNetPlace",
|
|
4428
|
+
PetriNetTransition: "petriNetTransition",
|
|
4429
|
+
ReachabilityGraphMarking: "reachabilityGraphMarking",
|
|
4430
|
+
SyntaxTreeNonterminal: "syntaxTreeNonterminal",
|
|
4431
|
+
SyntaxTreeTerminal: "syntaxTreeTerminal",
|
|
4432
|
+
FlowchartProcess: "flowchartProcess",
|
|
4433
|
+
FlowchartDecision: "flowchartDecision",
|
|
4434
|
+
FlowchartInputOutput: "flowchartInputOutput",
|
|
4435
|
+
FlowchartFunctionCall: "flowchartFunctionCall",
|
|
4436
|
+
FlowchartTerminal: "flowchartTerminal",
|
|
4437
|
+
BPMNTask: "bpmnTask",
|
|
4438
|
+
BPMNGateway: "bpmnGateway",
|
|
4439
|
+
BPMNStartEvent: "bpmnStartEvent",
|
|
4440
|
+
BPMNIntermediateEvent: "bpmnIntermediateEvent",
|
|
4441
|
+
BPMNEndEvent: "bpmnEndEvent",
|
|
4442
|
+
BPMNSubprocess: "bpmnSubprocess",
|
|
4443
|
+
BPMNTransaction: "bpmnTransaction",
|
|
4444
|
+
BPMNCallActivity: "bpmnCallActivity",
|
|
4445
|
+
BPMNAnnotation: "bpmnAnnotation",
|
|
4446
|
+
BPMNDataObject: "bpmnDataObject",
|
|
4447
|
+
BPMNDataStore: "bpmnDataStore",
|
|
4448
|
+
BPMNPool: "bpmnPool",
|
|
4449
|
+
BPMNGroup: "bpmnGroup",
|
|
4450
|
+
SfcStart: "sfcStart",
|
|
4451
|
+
SfcStep: "sfcStep",
|
|
4452
|
+
SfcActionTable: "sfcActionTable",
|
|
4453
|
+
SfcTransitionBranch: "sfcTransitionBranch",
|
|
4454
|
+
SfcJump: "sfcJump",
|
|
4455
|
+
SfcPreviewSpacer: "sfcPreviewSpacer",
|
|
4456
|
+
ColorDescription: "colorDescription",
|
|
4457
|
+
TitleAndDescription: "titleAndDesctiption"
|
|
4458
|
+
}[e] || e.toLowerCase();
|
|
4459
|
+
}
|
|
4460
|
+
function Gn(e, t) {
|
|
4461
|
+
return e === "BPMNFlow" && t ? {
|
|
4462
|
+
sequence: "BPMNSequenceFlow",
|
|
4463
|
+
message: "BPMNMessageFlow",
|
|
4464
|
+
association: "BPMNAssociationFlow",
|
|
4465
|
+
dataAssociation: "BPMNDataAssociationFlow"
|
|
4466
|
+
}[t] || "BPMNSequenceFlow" : {
|
|
4467
|
+
ClassBidirectional: "ClassBidirectional",
|
|
4468
|
+
ClassUnidirectional: "ClassUnidirectional",
|
|
4469
|
+
ClassInheritance: "ClassInheritance",
|
|
4470
|
+
ClassRealization: "ClassRealization",
|
|
4471
|
+
ClassDependency: "ClassDependency",
|
|
4472
|
+
ClassAggregation: "ClassAggregation",
|
|
4473
|
+
ClassComposition: "ClassComposition",
|
|
4474
|
+
ActivityControlFlow: "ActivityControlFlow",
|
|
4475
|
+
UseCaseAssociation: "UseCaseAssociation",
|
|
4476
|
+
UseCaseInclude: "UseCaseInclude",
|
|
4477
|
+
UseCaseExtend: "UseCaseExtend",
|
|
4478
|
+
UseCaseGeneralization: "UseCaseGeneralization",
|
|
4479
|
+
CommunicationLink: "CommunicationLink",
|
|
4480
|
+
ComponentDependency: "ComponentDependency",
|
|
4481
|
+
ComponentInterfaceProvided: "ComponentProvidedInterface",
|
|
4482
|
+
ComponentInterfaceRequired: "ComponentRequiredInterface",
|
|
4483
|
+
ComponentInterfaceRequiredQuarter: "ComponentRequiredQuarterInterface",
|
|
4484
|
+
ComponentInterfaceRequiredThreeQuarter: "ComponentRequiredThreeQuarterInterface",
|
|
4485
|
+
DeploymentDependency: "DeploymentDependency",
|
|
4486
|
+
DeploymentAssociation: "DeploymentAssociation",
|
|
4487
|
+
DeploymentInterfaceProvided: "DeploymentProvidedInterface",
|
|
4488
|
+
DeploymentInterfaceRequired: "DeploymentRequiredInterface",
|
|
4489
|
+
DeploymentInterfaceRequiredQuarter: "DeploymentRequiredQuarterInterface",
|
|
4490
|
+
DeploymentInterfaceRequiredThreeQuarter: "DeploymentRequiredThreeQuarterInterface",
|
|
4491
|
+
ObjectLink: "ObjectLink",
|
|
4492
|
+
PetriNetArc: "PetriNetArc",
|
|
4493
|
+
ReachabilityGraphArc: "ReachabilityGraphArc",
|
|
4494
|
+
SyntaxTreeLink: "SyntaxTreeLink",
|
|
4495
|
+
FlowchartFlowline: "FlowChartFlowline"
|
|
4496
|
+
}[e] || e;
|
|
4497
|
+
}
|
|
4498
|
+
function Kn(e, t) {
|
|
4499
|
+
return {
|
|
4500
|
+
x: e.bounds.x - t.bounds.x,
|
|
4501
|
+
y: e.bounds.y - t.bounds.y
|
|
4502
|
+
};
|
|
4503
|
+
}
|
|
4504
|
+
function qn(e) {
|
|
4505
|
+
return e.sort((e, t) => (e.bounds?.y ?? 0) - (t.bounds?.y ?? 0));
|
|
4506
|
+
}
|
|
4507
|
+
function Jn(e, t) {
|
|
4508
|
+
let n = {
|
|
4509
|
+
name: e.name,
|
|
4510
|
+
...e.fillColor && { fillColor: e.fillColor },
|
|
4511
|
+
...e.strokeColor && { strokeColor: e.strokeColor },
|
|
4512
|
+
...e.textColor && { textColor: e.textColor },
|
|
4513
|
+
...e.highlight && { highlight: e.highlight },
|
|
4514
|
+
...e.assessmentNote && { assessmentNote: e.assessmentNote }
|
|
4515
|
+
};
|
|
4516
|
+
switch (e.type) {
|
|
4517
|
+
case "Class":
|
|
4518
|
+
case "AbstractClass":
|
|
4519
|
+
case "Interface":
|
|
4520
|
+
case "Enumeration": {
|
|
4521
|
+
let r = [], i = [];
|
|
4522
|
+
qn(Object.values(t)).forEach((t) => {
|
|
4523
|
+
t.owner === e.id && (t.type === "ClassAttribute" ? r.push({
|
|
4524
|
+
id: t.id,
|
|
4525
|
+
name: t.name,
|
|
4526
|
+
...t.fillColor && { fillColor: t.fillColor },
|
|
4527
|
+
...t.textColor && { textColor: t.textColor }
|
|
4528
|
+
}) : t.type === "ClassMethod" && i.push({
|
|
4529
|
+
id: t.id,
|
|
4530
|
+
name: t.name,
|
|
4531
|
+
...t.fillColor && { fillColor: t.fillColor },
|
|
4532
|
+
...t.textColor && { textColor: t.textColor }
|
|
4533
|
+
}));
|
|
4534
|
+
});
|
|
4535
|
+
let a;
|
|
4536
|
+
return e.type === "AbstractClass" ? a = I.Abstract : e.type === "Interface" ? a = I.Interface : e.type === "Enumeration" && (a = I.Enumeration), {
|
|
4537
|
+
...n,
|
|
4538
|
+
methods: i,
|
|
4539
|
+
attributes: r,
|
|
4540
|
+
...a && { stereotype: a }
|
|
4541
|
+
};
|
|
4542
|
+
}
|
|
4543
|
+
case "ObjectName": {
|
|
4544
|
+
let r = [], i = [];
|
|
4545
|
+
return qn(Object.values(t)).forEach((t) => {
|
|
4546
|
+
t.owner === e.id && (t.type === "ObjectAttribute" ? r.push({
|
|
4547
|
+
id: t.id,
|
|
4548
|
+
name: t.name,
|
|
4549
|
+
...t.fillColor && { fillColor: t.fillColor },
|
|
4550
|
+
...t.textColor && { textColor: t.textColor }
|
|
4551
|
+
}) : t.type === "ObjectMethod" && i.push({
|
|
4552
|
+
id: t.id,
|
|
4553
|
+
name: t.name,
|
|
4554
|
+
...t.fillColor && { fillColor: t.fillColor },
|
|
4555
|
+
...t.textColor && { textColor: t.textColor }
|
|
4556
|
+
}));
|
|
4557
|
+
}), {
|
|
4558
|
+
...n,
|
|
4559
|
+
methods: i,
|
|
4560
|
+
attributes: r
|
|
4561
|
+
};
|
|
4562
|
+
}
|
|
4563
|
+
case "CommunicationObject": {
|
|
4564
|
+
let r = [], i = [];
|
|
4565
|
+
return qn(Object.values(t)).forEach((t) => {
|
|
4566
|
+
t.owner === e.id && (t.type === "ObjectAttribute" ? r.push({
|
|
4567
|
+
id: t.id,
|
|
4568
|
+
name: t.name,
|
|
4569
|
+
...t.fillColor && { fillColor: t.fillColor },
|
|
4570
|
+
...t.textColor && { textColor: t.textColor }
|
|
4571
|
+
}) : t.type === "ObjectMethod" && i.push({
|
|
4572
|
+
id: t.id,
|
|
4573
|
+
name: t.name,
|
|
4574
|
+
...t.fillColor && { fillColor: t.fillColor },
|
|
4575
|
+
...t.textColor && { textColor: t.textColor }
|
|
4576
|
+
}));
|
|
4577
|
+
}), {
|
|
4578
|
+
...n,
|
|
4579
|
+
methods: i,
|
|
4580
|
+
attributes: r
|
|
4581
|
+
};
|
|
4582
|
+
}
|
|
4583
|
+
case "Component": return {
|
|
4584
|
+
...n,
|
|
4585
|
+
isComponentHeaderShown: e.displayStereotype !== !1
|
|
4586
|
+
};
|
|
4587
|
+
case "ComponentSubsystem": return {
|
|
4588
|
+
...n,
|
|
4589
|
+
isComponentSubsystemHeaderShown: e.displayStereotype !== !1
|
|
4590
|
+
};
|
|
4591
|
+
case "DeploymentNode": return {
|
|
4592
|
+
...n,
|
|
4593
|
+
isComponentHeaderShown: e.displayStereotype !== !1,
|
|
4594
|
+
stereotype: e.stereotype || ""
|
|
4595
|
+
};
|
|
4596
|
+
case "DeploymentComponent": return {
|
|
4597
|
+
...n,
|
|
4598
|
+
isComponentHeaderShown: e.displayStereotype !== !1
|
|
4599
|
+
};
|
|
4600
|
+
case "PetriNetPlace": {
|
|
4601
|
+
let t = "Infinity";
|
|
4602
|
+
if (e.capacity !== void 0) {
|
|
4603
|
+
if (typeof e.capacity == "number") t = e.capacity;
|
|
4604
|
+
else if (typeof e.capacity == "string") if (e.capacity === "Infinity" || e.capacity === "∞") t = "Infinity";
|
|
4605
|
+
else {
|
|
4606
|
+
let n = parseFloat(e.capacity);
|
|
4607
|
+
t = isNaN(n) ? "Infinity" : n;
|
|
4608
|
+
}
|
|
4609
|
+
}
|
|
4610
|
+
return {
|
|
4611
|
+
...n,
|
|
4612
|
+
tokens: e.amountOfTokens || 0,
|
|
4613
|
+
capacity: t
|
|
4614
|
+
};
|
|
4615
|
+
}
|
|
4616
|
+
case "BPMNTask": return {
|
|
4617
|
+
...n,
|
|
4618
|
+
taskType: e.taskType || "default",
|
|
4619
|
+
marker: e.marker || "none"
|
|
4620
|
+
};
|
|
4621
|
+
case "BPMNGateway": return {
|
|
4622
|
+
...n,
|
|
4623
|
+
gatewayType: e.gatewayType || "exclusive"
|
|
4624
|
+
};
|
|
4625
|
+
case "BPMNStartEvent": return {
|
|
4626
|
+
...n,
|
|
4627
|
+
eventType: e.eventType || "default"
|
|
4628
|
+
};
|
|
4629
|
+
case "BPMNIntermediateEvent": return {
|
|
4630
|
+
...n,
|
|
4631
|
+
eventType: e.eventType || "default"
|
|
4632
|
+
};
|
|
4633
|
+
case "BPMNEndEvent": return {
|
|
4634
|
+
...n,
|
|
4635
|
+
eventType: e.eventType || "default"
|
|
4636
|
+
};
|
|
4637
|
+
case "ReachabilityGraphMarking": return {
|
|
4638
|
+
...n,
|
|
4639
|
+
isInitialMarking: e.isInitialMarking || !1
|
|
4640
|
+
};
|
|
4641
|
+
case "BPMNSubprocess":
|
|
4642
|
+
case "BPMNTransaction":
|
|
4643
|
+
case "BPMNCallActivity":
|
|
4644
|
+
case "BPMNAnnotation":
|
|
4645
|
+
case "BPMNDataObject":
|
|
4646
|
+
case "BPMNDataStore":
|
|
4647
|
+
case "BPMNPool":
|
|
4648
|
+
case "BPMNGroup": return n;
|
|
4649
|
+
default: return n;
|
|
4650
|
+
}
|
|
4651
|
+
}
|
|
4652
|
+
function Yn(e) {
|
|
4653
|
+
return e ? Array.isArray(e) ? e : typeof e == "object" && e ? Object.values(e).map((e) => ({
|
|
4654
|
+
text: e.name,
|
|
4655
|
+
direction: e.direction === "source" ? "target" : "source",
|
|
4656
|
+
id: e.id
|
|
4657
|
+
})) : [] : [];
|
|
4658
|
+
}
|
|
4659
|
+
function Xn(e, t) {
|
|
4660
|
+
let n = Wn(e.type), r = {
|
|
4661
|
+
x: e.bounds.x,
|
|
4662
|
+
y: e.bounds.y
|
|
4663
|
+
};
|
|
4664
|
+
if (e.owner) {
|
|
4665
|
+
let n = t[e.owner];
|
|
4666
|
+
n && (r = Kn(e, n));
|
|
4667
|
+
}
|
|
4668
|
+
let i = Jn(e, t), a = Bn(n, r, e.bounds.width, e.bounds.height);
|
|
4669
|
+
return {
|
|
4670
|
+
id: e.id,
|
|
4671
|
+
type: n,
|
|
4672
|
+
position: a.position,
|
|
4673
|
+
width: a.width,
|
|
4674
|
+
height: a.height,
|
|
4675
|
+
measured: {
|
|
4676
|
+
width: a.width,
|
|
4677
|
+
height: a.height
|
|
4678
|
+
},
|
|
4679
|
+
data: i,
|
|
4680
|
+
...e.owner && { parentId: e.owner }
|
|
4681
|
+
};
|
|
4682
|
+
}
|
|
4683
|
+
function Zn(e) {
|
|
4684
|
+
let t = Gn(e.type, e.flowType), n = [];
|
|
4685
|
+
return e.path && e.path.length > 0 && (n = e.path.map((t) => ({
|
|
4686
|
+
x: t.x + e.bounds.x,
|
|
4687
|
+
y: t.y + e.bounds.y
|
|
4688
|
+
}))), {
|
|
4689
|
+
id: e.id,
|
|
4690
|
+
source: e.source.element,
|
|
4691
|
+
target: e.target.element,
|
|
4692
|
+
type: t,
|
|
4693
|
+
sourceHandle: Un(e.source.direction || ""),
|
|
4694
|
+
targetHandle: Un(e.target.direction || ""),
|
|
4695
|
+
data: {
|
|
4696
|
+
label: e.name || "",
|
|
4697
|
+
sourceMultiplicity: e.source.multiplicity || "",
|
|
4698
|
+
targetMultiplicity: e.target.multiplicity || "",
|
|
4699
|
+
sourceRole: e.source.role || "",
|
|
4700
|
+
targetRole: e.target.role || "",
|
|
4701
|
+
isManuallyLayouted: e.isManuallyLayouted || !1,
|
|
4702
|
+
messages: Yn(e.messages),
|
|
4703
|
+
...e.flowType && { flowType: e.flowType },
|
|
4704
|
+
...e.fillColor && { fillColor: e.fillColor },
|
|
4705
|
+
...e.strokeColor && { strokeColor: e.strokeColor },
|
|
4706
|
+
...e.textColor && { textColor: e.textColor },
|
|
4707
|
+
...e.highlight && { highlight: e.highlight },
|
|
4708
|
+
...e.assessmentNote && { assessmentNote: e.assessmentNote },
|
|
4709
|
+
points: n
|
|
4710
|
+
}
|
|
4711
|
+
};
|
|
4712
|
+
}
|
|
4713
|
+
function Qn(e) {
|
|
4714
|
+
return {
|
|
4715
|
+
modelElementId: e.modelElementId,
|
|
4716
|
+
elementType: e.elementType,
|
|
4717
|
+
score: e.score,
|
|
4718
|
+
...e.feedback && { feedback: e.feedback },
|
|
4719
|
+
...e.dropInfo && { dropInfo: e.dropInfo },
|
|
4720
|
+
...e.label && { label: e.label },
|
|
4721
|
+
...e.labelColor && { labelColor: e.labelColor },
|
|
4722
|
+
...e.correctionStatus && { correctionStatus: e.correctionStatus }
|
|
4723
|
+
};
|
|
4724
|
+
}
|
|
4725
|
+
function $n(e) {
|
|
4726
|
+
let t = e.model || e, n = e.id || "converted-diagram-" + Date.now(), r = e.title || "", i = Object.values(t.elements).filter((e) => ![
|
|
4727
|
+
"ClassAttribute",
|
|
4728
|
+
"ClassMethod",
|
|
4729
|
+
"ObjectAttribute",
|
|
4730
|
+
"ObjectMethod"
|
|
4731
|
+
].includes(e.type)).map((e) => Xn(e, t.elements)), a = Object.values(t.relationships).map((e) => Zn(e)), o = {};
|
|
4732
|
+
return t.assessments && Object.entries(t.assessments).forEach(([e, t]) => {
|
|
4733
|
+
try {
|
|
4734
|
+
o[e] = Qn(t);
|
|
4735
|
+
} catch (t) {
|
|
4736
|
+
Fe.warn(`Failed to convert assessment for element ${e}:`, t);
|
|
4737
|
+
}
|
|
4738
|
+
}), {
|
|
4739
|
+
version: "4.0.0",
|
|
4740
|
+
id: n,
|
|
4741
|
+
title: r,
|
|
4742
|
+
type: t.type,
|
|
4743
|
+
nodes: i,
|
|
4744
|
+
edges: a,
|
|
4745
|
+
assessments: o,
|
|
4746
|
+
interactive: t.interactive && (Object.values(t.interactive.elements ?? {}).some(Boolean) || Object.values(t.interactive.relationships ?? {}).some(Boolean)) ? {
|
|
4747
|
+
elements: Object.fromEntries(Object.entries(t.interactive.elements ?? {}).filter(([, e]) => e)),
|
|
4748
|
+
relationships: Object.fromEntries(Object.entries(t.interactive.relationships ?? {}).filter(([, e]) => e))
|
|
4749
|
+
} : void 0
|
|
4750
|
+
};
|
|
4751
|
+
}
|
|
4752
|
+
function er(e) {
|
|
4753
|
+
let t = e && e.model && e.model.version && typeof e.model.version == "string" && e.model.version.startsWith("3.") && e.model.elements && e.model.relationships && typeof e.model.elements == "object" && typeof e.model.relationships == "object", n = e && e.version && typeof e.version == "string" && e.version.startsWith("3.") && e.elements && e.relationships && typeof e.elements == "object" && typeof e.relationships == "object";
|
|
4754
|
+
return !!(t || n);
|
|
4755
|
+
}
|
|
4756
|
+
function tr(e) {
|
|
4757
|
+
return e && e.version && e.version.startsWith("4.") && Array.isArray(e.nodes) && Array.isArray(e.edges) && e.edges.every((e) => typeof e == "object" && !!e && e.data != null && typeof e.data == "object");
|
|
4758
|
+
}
|
|
4759
|
+
function nr(e) {
|
|
4760
|
+
let t;
|
|
4761
|
+
if (tr(e)) t = e;
|
|
4762
|
+
else if (er(e)) t = $n(e);
|
|
4763
|
+
else if (Hn(e)) t = Vn(e);
|
|
4764
|
+
else if (e.model) return nr(e.model);
|
|
4765
|
+
else throw Error("Unsupported diagram format. Only 2.x.x, 3.x.x and 4.x.x formats are supported.");
|
|
4766
|
+
return zn(t);
|
|
4767
|
+
}
|
|
4768
|
+
//#endregion
|
|
4769
|
+
export { Ht as $, ve as $t, En as A, Ke as At, Zt as B, Ne as Bt, Sn as C, st as Ct, vn as D, et as Dt, hn as E, tt as Et, X as F, ze as Ft, Xt as G, we as Gt, Qt as H, je as Ht, dn as I, H as It, qt as J, ge as Jt, Yt as K, Oe as Kt, on as L, Ie as Lt, fn as M, We as Mt, Cn as N, Ue as Nt, Q as O, $e as Ot, Dn as P, He as Pt, Ut as Q, pe as Qt, an as R, Fe as Rt, $ as S, pt as St, mn as T, nt as Tt, en as U, ke as Ut, $t as V, I as Vt, G as W, Te as Wt, Gt as X, fe as Xt, Kt as Y, he as Yt, Wt as Z, _e as Zt, jn as _, xt as _t, Wn as a, N as an, It as at, J as b, _t as bt, Hn as c, ie as cn, U as ct, In as d, w as dn, Mt as dt, me as en, Vt as et, Ln as f, C as fn, jt as ft, Mn as g, Dt as gt, Pn as h, Ot as ht, Yn as i, Se as in, Lt as it, Tn as j, Ge as jt, Y as k, qe as kt, er as l, T as ln, Pt as lt, Nn as m, kt as mt, Gn as n, be as nn, zt as nt, $n as o, Ce as on, W as ot, An as p, At as pt, Jt as q, P as qt, Un as r, M as rn, Rt as rt, nr as s, ye as sn, Ft as st, Vn as t, xe as tn, Bt as tt, tr as u, E as un, Nt as ut, Fn as v, bt as vt, pn as w, ot as wt, On as x, mt as xt, q as y, yt, tn as z, Pe as zt };
|