From 126f73710632f149d9f05c6501b8c10c39266c5b Mon Sep 17 00:00:00 2001 From: WalterNorthwoods Date: Mon, 15 May 2017 10:37:09 -0400 Subject: [PATCH] 1.7.10 * Fixed routing of Links to rotated nodes with "...Side" Spots. * Fixed routing of Link.AvoidsNodes Links that also had Link.adjusting set to Link.End. --- api/index.html | 2 +- api/symbols/ActionTool.html | 2 +- api/symbols/Adornment.html | 2 +- api/symbols/AnimationManager.html | 2 +- api/symbols/Binding.html | 2 +- api/symbols/Brush.html | 2 +- api/symbols/ChangedEvent.html | 2 +- api/symbols/CircularEdge.html | 2 +- api/symbols/CircularLayout.html | 2 +- api/symbols/CircularVertex.html | 2 +- api/symbols/ClickCreatingTool.html | 2 +- api/symbols/ClickSelectingTool.html | 2 +- api/symbols/CommandHandler.html | 2 +- api/symbols/ContextMenuTool.html | 2 +- api/symbols/Diagram.html | 282 +--- api/symbols/DiagramEvent.html | 2 +- api/symbols/DragSelectingTool.html | 2 +- api/symbols/DraggingTool.html | 2 +- api/symbols/ForceDirectedEdge.html | 2 +- api/symbols/ForceDirectedLayout.html | 2 +- api/symbols/ForceDirectedVertex.html | 2 +- api/symbols/Geometry.html | 2 +- api/symbols/GraphLinksModel.html | 2 +- api/symbols/GraphObject.html | 2 +- api/symbols/GridLayout.html | 2 +- api/symbols/Group.html | 2 +- api/symbols/HTMLInfo.html | 2 +- api/symbols/InputEvent.html | 2 +- api/symbols/Iterable.html | 2 +- api/symbols/Iterator.html | 2 +- api/symbols/Layer.html | 2 +- api/symbols/LayeredDigraphEdge.html | 2 +- api/symbols/LayeredDigraphLayout.html | 2 +- api/symbols/LayeredDigraphVertex.html | 2 +- api/symbols/Layout.html | 2 +- api/symbols/LayoutEdge.html | 2 +- api/symbols/LayoutNetwork.html | 2 +- api/symbols/LayoutVertex.html | 2 +- api/symbols/Link.html | 2 +- api/symbols/LinkReshapingTool.html | 2 +- api/symbols/LinkingBaseTool.html | 2 +- api/symbols/LinkingTool.html | 2 +- api/symbols/List.html | 2 +- api/symbols/Map.html | 2 +- api/symbols/Margin.html | 2 +- api/symbols/Model.html | 2 +- api/symbols/Node.html | 2 +- api/symbols/Overview.html | 4 +- api/symbols/Palette.html | 4 +- api/symbols/Panel.html | 2 +- api/symbols/PanningTool.html | 2 +- api/symbols/Part.html | 2 +- api/symbols/PathFigure.html | 2 +- api/symbols/PathSegment.html | 2 +- api/symbols/Picture.html | 2 +- api/symbols/Placeholder.html | 2 +- api/symbols/Point.html | 2 +- api/symbols/Rect.html | 2 +- api/symbols/RelinkingTool.html | 2 +- api/symbols/ResizingTool.html | 2 +- api/symbols/RotatingTool.html | 2 +- api/symbols/RowColumnDefinition.html | 2 +- api/symbols/Set.html | 2 +- api/symbols/Shape.html | 2 +- api/symbols/Size.html | 2 +- api/symbols/Spot.html | 2 +- api/symbols/TextBlock.html | 2 +- api/symbols/TextEditingTool.html | 2 +- api/symbols/Tool.html | 2 +- api/symbols/ToolManager.html | 2 +- api/symbols/Transaction.html | 2 +- api/symbols/TreeEdge.html | 2 +- api/symbols/TreeLayout.html | 2 +- api/symbols/TreeModel.html | 2 +- api/symbols/TreeVertex.html | 2 +- api/symbols/UndoManager.html | 2 +- doc/changelog.html | 10 + extensions/GuidedDraggingTool.js | 9 +- package.json | 2 +- release/go-debug.js | 2030 +++++++++++----------- release/go.js | 2226 ++++++++++++------------- 81 files changed, 2222 insertions(+), 2491 deletions(-) diff --git a/api/index.html b/api/index.html index ba0fb49d4..ff183c683 100644 --- a/api/index.html +++ b/api/index.html @@ -1105,7 +1105,7 @@

GoJS Class Index

diff --git a/api/symbols/ActionTool.html b/api/symbols/ActionTool.html index 06e65a52a..97084d013 100644 --- a/api/symbols/ActionTool.html +++ b/api/symbols/ActionTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Adornment.html b/api/symbols/Adornment.html index 0e798f87c..815cba2fe 100644 --- a/api/symbols/Adornment.html +++ b/api/symbols/Adornment.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/AnimationManager.html b/api/symbols/AnimationManager.html index 672db09c6..5a2e2e84c 100644 --- a/api/symbols/AnimationManager.html +++ b/api/symbols/AnimationManager.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Binding.html b/api/symbols/Binding.html index 8617da517..5d2507bf7 100644 --- a/api/symbols/Binding.html +++ b/api/symbols/Binding.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Brush.html b/api/symbols/Brush.html index 60ed9c827..0e760fbc6 100644 --- a/api/symbols/Brush.html +++ b/api/symbols/Brush.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ChangedEvent.html b/api/symbols/ChangedEvent.html index 2eff4ba5e..27aea3f26 100644 --- a/api/symbols/ChangedEvent.html +++ b/api/symbols/ChangedEvent.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/CircularEdge.html b/api/symbols/CircularEdge.html index 48daa742a..38fc2223f 100644 --- a/api/symbols/CircularEdge.html +++ b/api/symbols/CircularEdge.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/CircularLayout.html b/api/symbols/CircularLayout.html index e39dfcb0f..30043df73 100644 --- a/api/symbols/CircularLayout.html +++ b/api/symbols/CircularLayout.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/CircularVertex.html b/api/symbols/CircularVertex.html index 939a4fc78..b0b14a1c4 100644 --- a/api/symbols/CircularVertex.html +++ b/api/symbols/CircularVertex.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ClickCreatingTool.html b/api/symbols/ClickCreatingTool.html index 03a8face5..d3efcf72d 100644 --- a/api/symbols/ClickCreatingTool.html +++ b/api/symbols/ClickCreatingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ClickSelectingTool.html b/api/symbols/ClickSelectingTool.html index e8dd5b22d..b31f7d81f 100644 --- a/api/symbols/ClickSelectingTool.html +++ b/api/symbols/ClickSelectingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/CommandHandler.html b/api/symbols/CommandHandler.html index 21a8eac0c..2d152051f 100644 --- a/api/symbols/CommandHandler.html +++ b/api/symbols/CommandHandler.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ContextMenuTool.html b/api/symbols/ContextMenuTool.html index 9d727b133..883eee3e1 100644 --- a/api/symbols/ContextMenuTool.html +++ b/api/symbols/ContextMenuTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Diagram.html b/api/symbols/Diagram.html index 148f7cbab..a92e89e74 100644 --- a/api/symbols/Diagram.html +++ b/api/symbols/Diagram.html @@ -1111,7 +1111,7 @@
@@ -2763,26 +2763,6 @@

Properties Summary - - - -
- mouseDown -
-
- - -
- - -
- -

- -

- - - @@ -2905,46 +2885,6 @@

Properties Summary - - - -
- mouseMove -
-
- - -
- - -
- -

- -

- - - - - - -
- mouseOut -
-
- - -
- - -
- -

- -

- - - @@ -2975,46 +2915,6 @@

Properties Summary - - - -
- mouseUp -
-
- - -
- - -
- -

- -

- - - - - - -
- mouseWheel -
-
- - -
- - -
- -

- -

- - - @@ -3135,66 +3035,6 @@

Properties Summary - - - -
- pointerDown -
-
- - -
- - -
- -

- -

- - - - - - -
- pointerLeave -
-
- - -
- - -
- -

- -

- - - - - - -
- pointerMove -
-
- - -
- - -
- -

- -

- - - @@ -3237,46 +3077,6 @@

Properties Summary - - - -
- preventDefault -
-
- - -
- - -
- -

- -

- - - - - - -
- redrawLater -
-
- - -
- - -
- -

- -

- - - @@ -3517,66 +3317,6 @@

Properties Summary - - - -
- touchEnd -
-
- - -
- - -
- -

- -

- - - - - - -
- touchMove -
-
- - -
- - -
- -

- -

- - - - - - -
- touchStart -
-
- - -
- - -
- -

- -

- - - @@ -3637,26 +3377,6 @@

Properties Summary - - - -
- windowResize -
-
- - -
- - -
- -

- -

- - - diff --git a/api/symbols/DiagramEvent.html b/api/symbols/DiagramEvent.html index 80d705828..b16a3cbd6 100644 --- a/api/symbols/DiagramEvent.html +++ b/api/symbols/DiagramEvent.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/DragSelectingTool.html b/api/symbols/DragSelectingTool.html index 2c90b7150..e2baf7c63 100644 --- a/api/symbols/DragSelectingTool.html +++ b/api/symbols/DragSelectingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/DraggingTool.html b/api/symbols/DraggingTool.html index 96b30f9fb..d3a8e3d0f 100644 --- a/api/symbols/DraggingTool.html +++ b/api/symbols/DraggingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ForceDirectedEdge.html b/api/symbols/ForceDirectedEdge.html index fb5460add..2076446db 100644 --- a/api/symbols/ForceDirectedEdge.html +++ b/api/symbols/ForceDirectedEdge.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ForceDirectedLayout.html b/api/symbols/ForceDirectedLayout.html index ee4569c16..b6de61ccc 100644 --- a/api/symbols/ForceDirectedLayout.html +++ b/api/symbols/ForceDirectedLayout.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ForceDirectedVertex.html b/api/symbols/ForceDirectedVertex.html index e71c4d267..daf57afc4 100644 --- a/api/symbols/ForceDirectedVertex.html +++ b/api/symbols/ForceDirectedVertex.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Geometry.html b/api/symbols/Geometry.html index 8a6cc11e8..d1ce18255 100644 --- a/api/symbols/Geometry.html +++ b/api/symbols/Geometry.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/GraphLinksModel.html b/api/symbols/GraphLinksModel.html index e25ee502d..622f229ce 100644 --- a/api/symbols/GraphLinksModel.html +++ b/api/symbols/GraphLinksModel.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/GraphObject.html b/api/symbols/GraphObject.html index 10d5422a6..402277b81 100644 --- a/api/symbols/GraphObject.html +++ b/api/symbols/GraphObject.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/GridLayout.html b/api/symbols/GridLayout.html index 7485e5e4e..e25473b2d 100644 --- a/api/symbols/GridLayout.html +++ b/api/symbols/GridLayout.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Group.html b/api/symbols/Group.html index 52b9aca57..ff371cc1c 100644 --- a/api/symbols/Group.html +++ b/api/symbols/Group.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/HTMLInfo.html b/api/symbols/HTMLInfo.html index 18f781372..7dff8cd44 100644 --- a/api/symbols/HTMLInfo.html +++ b/api/symbols/HTMLInfo.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/InputEvent.html b/api/symbols/InputEvent.html index 7a35ebf04..63c977aaf 100644 --- a/api/symbols/InputEvent.html +++ b/api/symbols/InputEvent.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Iterable.html b/api/symbols/Iterable.html index d0a02ddbe..48a328104 100644 --- a/api/symbols/Iterable.html +++ b/api/symbols/Iterable.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Iterator.html b/api/symbols/Iterator.html index 00c0fcf30..2f30f0c2a 100644 --- a/api/symbols/Iterator.html +++ b/api/symbols/Iterator.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Layer.html b/api/symbols/Layer.html index ed91cb914..9c1b01840 100644 --- a/api/symbols/Layer.html +++ b/api/symbols/Layer.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LayeredDigraphEdge.html b/api/symbols/LayeredDigraphEdge.html index 966e3f9a9..9498b56c6 100644 --- a/api/symbols/LayeredDigraphEdge.html +++ b/api/symbols/LayeredDigraphEdge.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LayeredDigraphLayout.html b/api/symbols/LayeredDigraphLayout.html index ba753f671..a32eea105 100644 --- a/api/symbols/LayeredDigraphLayout.html +++ b/api/symbols/LayeredDigraphLayout.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LayeredDigraphVertex.html b/api/symbols/LayeredDigraphVertex.html index b12eede2a..3f87cec7a 100644 --- a/api/symbols/LayeredDigraphVertex.html +++ b/api/symbols/LayeredDigraphVertex.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Layout.html b/api/symbols/Layout.html index 1debd3c54..ee5c60c11 100644 --- a/api/symbols/Layout.html +++ b/api/symbols/Layout.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LayoutEdge.html b/api/symbols/LayoutEdge.html index 0686e8152..e652dfc57 100644 --- a/api/symbols/LayoutEdge.html +++ b/api/symbols/LayoutEdge.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LayoutNetwork.html b/api/symbols/LayoutNetwork.html index be1887387..4c8d4e000 100644 --- a/api/symbols/LayoutNetwork.html +++ b/api/symbols/LayoutNetwork.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LayoutVertex.html b/api/symbols/LayoutVertex.html index 1f3d9ef8f..2f64dfbda 100644 --- a/api/symbols/LayoutVertex.html +++ b/api/symbols/LayoutVertex.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Link.html b/api/symbols/Link.html index b24f50ee1..41b749894 100644 --- a/api/symbols/Link.html +++ b/api/symbols/Link.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LinkReshapingTool.html b/api/symbols/LinkReshapingTool.html index ffb217009..ab2b73488 100644 --- a/api/symbols/LinkReshapingTool.html +++ b/api/symbols/LinkReshapingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LinkingBaseTool.html b/api/symbols/LinkingBaseTool.html index 98750f018..caafbd9c4 100644 --- a/api/symbols/LinkingBaseTool.html +++ b/api/symbols/LinkingBaseTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/LinkingTool.html b/api/symbols/LinkingTool.html index 44310c6d8..74a03ab2f 100644 --- a/api/symbols/LinkingTool.html +++ b/api/symbols/LinkingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/List.html b/api/symbols/List.html index 08ba03f5e..77e6e89f6 100644 --- a/api/symbols/List.html +++ b/api/symbols/List.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Map.html b/api/symbols/Map.html index 45cea0337..0c63b9257 100644 --- a/api/symbols/Map.html +++ b/api/symbols/Map.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Margin.html b/api/symbols/Margin.html index 7396e72a7..db42562d4 100644 --- a/api/symbols/Margin.html +++ b/api/symbols/Margin.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Model.html b/api/symbols/Model.html index b197d1a8c..2caf6df02 100644 --- a/api/symbols/Model.html +++ b/api/symbols/Model.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Node.html b/api/symbols/Node.html index 66e8648fd..5a4ebc405 100644 --- a/api/symbols/Node.html +++ b/api/symbols/Node.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Overview.html b/api/symbols/Overview.html index 2f74bc214..aba8dbc65 100644 --- a/api/symbols/Overview.html +++ b/api/symbols/Overview.html @@ -1111,7 +1111,7 @@
@@ -1264,7 +1264,7 @@

Properties Summary -
Properties borrowed from class Diagram:
allowClipboard, allowCopy, allowDelete, allowDragOut, allowDrop, allowGroup, allowHorizontalScroll, allowInsert, allowLink, allowMove, allowRelink, allowReshape, allowResize, allowRotate, allowSelect, allowTextEdit, allowUndo, allowUngroup, allowVerticalScroll, allowZoom, animationManager, autoScale, autoScrollRegion, click, commandHandler, contentAlignment, contextClick, contextMenu, currentCursor, currentTool, CycleAll, CycleDestinationTree, CycleNotDirected, CycleNotUndirected, CycleSourceTree, defaultCursor, defaultTool, div, documentBounds, DocumentScroll, doubleClick, firstInput, fixedBounds, grid, groupSelectionAdornmentTemplate, groupTemplate, groupTemplateMap, hasHorizontalScrollbar, hasVerticalScrollbar, highlighteds, InfiniteScroll, initialAutoScale, initialContentAlignment, initialDocumentSpot, initialPosition, initialScale, initialViewportSpot, isEnabled, isModelReadOnly, isModified, isMouseCaptured, isReadOnly, isTreePathToChildren, lastInput, layers, layout, links, linkSelectionAdornmentTemplate, linkTemplate, linkTemplateMap, maxScale, maxSelectionCount, minScale, model, mouseDown, mouseDragOver, mouseDrop, mouseHold, mouseHover, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, nodes, nodeSelectionAdornmentTemplate, nodeTemplate, nodeTemplateMap, None, padding, parts, pointerDown, pointerLeave, pointerMove, position, positionComputation, preventDefault, redrawLater, scale, scaleComputation, scrollHorizontalLineChange, scrollMargin, scrollMode, scrollVerticalLineChange, selection, skipsUndoManager, toolManager, toolTip, touchEnd, touchMove, touchStart, undoManager, Uniform, UniformToFill, validCycle, viewportBounds, windowResize, zoomPoint
+
Properties borrowed from class Diagram:
allowClipboard, allowCopy, allowDelete, allowDragOut, allowDrop, allowGroup, allowHorizontalScroll, allowInsert, allowLink, allowMove, allowRelink, allowReshape, allowResize, allowRotate, allowSelect, allowTextEdit, allowUndo, allowUngroup, allowVerticalScroll, allowZoom, animationManager, autoScale, autoScrollRegion, click, commandHandler, contentAlignment, contextClick, contextMenu, currentCursor, currentTool, CycleAll, CycleDestinationTree, CycleNotDirected, CycleNotUndirected, CycleSourceTree, defaultCursor, defaultTool, div, documentBounds, DocumentScroll, doubleClick, firstInput, fixedBounds, grid, groupSelectionAdornmentTemplate, groupTemplate, groupTemplateMap, hasHorizontalScrollbar, hasVerticalScrollbar, highlighteds, InfiniteScroll, initialAutoScale, initialContentAlignment, initialDocumentSpot, initialPosition, initialScale, initialViewportSpot, isEnabled, isModelReadOnly, isModified, isMouseCaptured, isReadOnly, isTreePathToChildren, lastInput, layers, layout, links, linkSelectionAdornmentTemplate, linkTemplate, linkTemplateMap, maxScale, maxSelectionCount, minScale, model, mouseDragOver, mouseDrop, mouseHold, mouseHover, mouseOver, nodes, nodeSelectionAdornmentTemplate, nodeTemplate, nodeTemplateMap, None, padding, parts, position, positionComputation, scale, scaleComputation, scrollHorizontalLineChange, scrollMargin, scrollMode, scrollVerticalLineChange, selection, skipsUndoManager, toolManager, toolTip, undoManager, Uniform, UniformToFill, validCycle, viewportBounds, zoomPoint
diff --git a/api/symbols/Palette.html b/api/symbols/Palette.html index 679a650c7..ad65c35b6 100644 --- a/api/symbols/Palette.html +++ b/api/symbols/Palette.html @@ -1111,7 +1111,7 @@
@@ -1187,7 +1187,7 @@

Constructor -
Properties borrowed from class Diagram:
allowClipboard, allowCopy, allowDelete, allowDragOut, allowDrop, allowGroup, allowHorizontalScroll, allowInsert, allowLink, allowMove, allowRelink, allowReshape, allowResize, allowRotate, allowSelect, allowTextEdit, allowUndo, allowUngroup, allowVerticalScroll, allowZoom, animationManager, autoScale, autoScrollRegion, click, commandHandler, contentAlignment, contextClick, contextMenu, currentCursor, currentTool, CycleAll, CycleDestinationTree, CycleNotDirected, CycleNotUndirected, CycleSourceTree, defaultCursor, defaultTool, div, documentBounds, DocumentScroll, doubleClick, firstInput, fixedBounds, grid, groupSelectionAdornmentTemplate, groupTemplate, groupTemplateMap, hasHorizontalScrollbar, hasVerticalScrollbar, highlighteds, InfiniteScroll, initialAutoScale, initialContentAlignment, initialDocumentSpot, initialPosition, initialScale, initialViewportSpot, isEnabled, isModelReadOnly, isModified, isMouseCaptured, isReadOnly, isTreePathToChildren, lastInput, layers, layout, links, linkSelectionAdornmentTemplate, linkTemplate, linkTemplateMap, maxScale, maxSelectionCount, minScale, model, mouseDown, mouseDragOver, mouseDrop, mouseHold, mouseHover, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, nodes, nodeSelectionAdornmentTemplate, nodeTemplate, nodeTemplateMap, None, padding, parts, pointerDown, pointerLeave, pointerMove, position, positionComputation, preventDefault, redrawLater, scale, scaleComputation, scrollHorizontalLineChange, scrollMargin, scrollMode, scrollVerticalLineChange, selection, skipsUndoManager, toolManager, toolTip, touchEnd, touchMove, touchStart, undoManager, Uniform, UniformToFill, validCycle, viewportBounds, windowResize, zoomPoint
+
Properties borrowed from class Diagram:
allowClipboard, allowCopy, allowDelete, allowDragOut, allowDrop, allowGroup, allowHorizontalScroll, allowInsert, allowLink, allowMove, allowRelink, allowReshape, allowResize, allowRotate, allowSelect, allowTextEdit, allowUndo, allowUngroup, allowVerticalScroll, allowZoom, animationManager, autoScale, autoScrollRegion, click, commandHandler, contentAlignment, contextClick, contextMenu, currentCursor, currentTool, CycleAll, CycleDestinationTree, CycleNotDirected, CycleNotUndirected, CycleSourceTree, defaultCursor, defaultTool, div, documentBounds, DocumentScroll, doubleClick, firstInput, fixedBounds, grid, groupSelectionAdornmentTemplate, groupTemplate, groupTemplateMap, hasHorizontalScrollbar, hasVerticalScrollbar, highlighteds, InfiniteScroll, initialAutoScale, initialContentAlignment, initialDocumentSpot, initialPosition, initialScale, initialViewportSpot, isEnabled, isModelReadOnly, isModified, isMouseCaptured, isReadOnly, isTreePathToChildren, lastInput, layers, layout, links, linkSelectionAdornmentTemplate, linkTemplate, linkTemplateMap, maxScale, maxSelectionCount, minScale, model, mouseDragOver, mouseDrop, mouseHold, mouseHover, mouseOver, nodes, nodeSelectionAdornmentTemplate, nodeTemplate, nodeTemplateMap, None, padding, parts, position, positionComputation, scale, scaleComputation, scrollHorizontalLineChange, scrollMargin, scrollMode, scrollVerticalLineChange, selection, skipsUndoManager, toolManager, toolTip, undoManager, Uniform, UniformToFill, validCycle, viewportBounds, zoomPoint
diff --git a/api/symbols/Panel.html b/api/symbols/Panel.html index fde15bfba..7c27b5079 100644 --- a/api/symbols/Panel.html +++ b/api/symbols/Panel.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/PanningTool.html b/api/symbols/PanningTool.html index 9a78acb91..9d14a2c92 100644 --- a/api/symbols/PanningTool.html +++ b/api/symbols/PanningTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Part.html b/api/symbols/Part.html index 180969d2b..2c587129f 100644 --- a/api/symbols/Part.html +++ b/api/symbols/Part.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/PathFigure.html b/api/symbols/PathFigure.html index b48fca4f3..1e633b6d0 100644 --- a/api/symbols/PathFigure.html +++ b/api/symbols/PathFigure.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/PathSegment.html b/api/symbols/PathSegment.html index d03b54097..d2f760d93 100644 --- a/api/symbols/PathSegment.html +++ b/api/symbols/PathSegment.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Picture.html b/api/symbols/Picture.html index 24d3d5510..edec28de9 100644 --- a/api/symbols/Picture.html +++ b/api/symbols/Picture.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Placeholder.html b/api/symbols/Placeholder.html index 70bd17d4c..228f85f92 100644 --- a/api/symbols/Placeholder.html +++ b/api/symbols/Placeholder.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Point.html b/api/symbols/Point.html index e4d263f4a..805e03c5a 100644 --- a/api/symbols/Point.html +++ b/api/symbols/Point.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Rect.html b/api/symbols/Rect.html index c524569e7..097e7b8a0 100644 --- a/api/symbols/Rect.html +++ b/api/symbols/Rect.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/RelinkingTool.html b/api/symbols/RelinkingTool.html index d8a4acea9..c4e61949d 100644 --- a/api/symbols/RelinkingTool.html +++ b/api/symbols/RelinkingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ResizingTool.html b/api/symbols/ResizingTool.html index 7e26ad688..ca5772ada 100644 --- a/api/symbols/ResizingTool.html +++ b/api/symbols/ResizingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/RotatingTool.html b/api/symbols/RotatingTool.html index 8519f5696..10b3e8f3e 100644 --- a/api/symbols/RotatingTool.html +++ b/api/symbols/RotatingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/RowColumnDefinition.html b/api/symbols/RowColumnDefinition.html index 54fef1647..669b1bce6 100644 --- a/api/symbols/RowColumnDefinition.html +++ b/api/symbols/RowColumnDefinition.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Set.html b/api/symbols/Set.html index 69d9ba7b7..399e81275 100644 --- a/api/symbols/Set.html +++ b/api/symbols/Set.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Shape.html b/api/symbols/Shape.html index 431c78bd8..22f59668f 100644 --- a/api/symbols/Shape.html +++ b/api/symbols/Shape.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Size.html b/api/symbols/Size.html index f5f78ed8b..370de63b3 100644 --- a/api/symbols/Size.html +++ b/api/symbols/Size.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Spot.html b/api/symbols/Spot.html index 8abc956cd..5acdf4b85 100644 --- a/api/symbols/Spot.html +++ b/api/symbols/Spot.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/TextBlock.html b/api/symbols/TextBlock.html index 2ff3ec445..cf26b6f40 100644 --- a/api/symbols/TextBlock.html +++ b/api/symbols/TextBlock.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/TextEditingTool.html b/api/symbols/TextEditingTool.html index b83de5962..377ea44e3 100644 --- a/api/symbols/TextEditingTool.html +++ b/api/symbols/TextEditingTool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Tool.html b/api/symbols/Tool.html index dceb68583..11dfdd788 100644 --- a/api/symbols/Tool.html +++ b/api/symbols/Tool.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/ToolManager.html b/api/symbols/ToolManager.html index 6ea8434bd..bbf32ca3d 100644 --- a/api/symbols/ToolManager.html +++ b/api/symbols/ToolManager.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/Transaction.html b/api/symbols/Transaction.html index 433a58d3e..e4dc69772 100644 --- a/api/symbols/Transaction.html +++ b/api/symbols/Transaction.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/TreeEdge.html b/api/symbols/TreeEdge.html index 080ab75fe..aa5464ee3 100644 --- a/api/symbols/TreeEdge.html +++ b/api/symbols/TreeEdge.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/TreeLayout.html b/api/symbols/TreeLayout.html index 030ff81b2..1cf95ef0c 100644 --- a/api/symbols/TreeLayout.html +++ b/api/symbols/TreeLayout.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/TreeModel.html b/api/symbols/TreeModel.html index a5ebd47f0..9890b1073 100644 --- a/api/symbols/TreeModel.html +++ b/api/symbols/TreeModel.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/TreeVertex.html b/api/symbols/TreeVertex.html index 38957b6b3..3b7e5cb47 100644 --- a/api/symbols/TreeVertex.html +++ b/api/symbols/TreeVertex.html @@ -1111,7 +1111,7 @@
diff --git a/api/symbols/UndoManager.html b/api/symbols/UndoManager.html index 65e5bb0c5..70b56da9c 100644 --- a/api/symbols/UndoManager.html +++ b/api/symbols/UndoManager.html @@ -1111,7 +1111,7 @@
diff --git a/doc/changelog.html b/doc/changelog.html index 9e51744c9..a4e174180 100644 --- a/doc/changelog.html +++ b/doc/changelog.html @@ -68,6 +68,16 @@

GoJS Change Log

} +

Changes for 1.7.10

+ +

Changes for 1.7.9

  • diff --git a/extensions/GuidedDraggingTool.js b/extensions/GuidedDraggingTool.js index d4f90eff2..ff8881ddf 100644 --- a/extensions/GuidedDraggingTool.js +++ b/extensions/GuidedDraggingTool.js @@ -103,11 +103,12 @@ GuidedDraggingTool.prototype.doDragOver = function(pt, obj) { /** * On a mouse-up, snaps the selected part to the nearest guideline. -* If no guidelines are showing, the part remains at its position. +* If not snapping, the part remains at its position. * This calls {@link #guidelineSnap}. * @this {GuidedDraggingTool} */ GuidedDraggingTool.prototype.doDropOnto = function(pt, obj) { + this.clearGuidelines(); // gets the selected (perhaps copied) Part var partItr = (this.copiedParts || this.draggedParts).iterator; if (partItr.next()) { @@ -117,8 +118,8 @@ GuidedDraggingTool.prototype.doDropOnto = function(pt, obj) { var e = this.diagram.lastInput; var snap = this.isGuidelineSnapEnabled && !e.shift; - this.showHorizontalMatches(part, this.isGuidelineEnabled, snap); - this.showVerticalMatches(part, this.isGuidelineEnabled, snap); + this.showHorizontalMatches(part, false, snap); // false means don't show guidelines + this.showVerticalMatches(part, false, snap); } } @@ -462,4 +463,4 @@ Object.defineProperty(GuidedDraggingTool.prototype, "isGuidelineSnapEnabled", { this._isGuidelineSnapEnabled = val; } } -}); \ No newline at end of file +}); diff --git a/package.json b/package.json index b7340f2f7..3305e9e8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gojs", - "version": "1.7.9", + "version": "1.7.10", "description": "Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams", "keywords": [ "diagram", "chart", "tree", "flowchart", "orgchart", "uml", "bpmn", "graphics", "editor", "inspector", "drawing", "canvas", "shape", "svg", "hierarchy", "node", "link", "group", "vertex", "edge", "connection", "port", "label", "arrowhead", "family-tree", "decision-tree", "mindmap", "tournament", "treeview", "pipe-tree", "genogram", "ivr-tree", "parse-tree", "concept-map", "euler", "visualization", "entity-relationship", "er-diagram", "friend-wheel", "radial", "graph-distances", "graph-paths", "sankey", "pert", "gantt", "timeline", "monitor", "layer", "swimlane", "spreadsheet", "virtualization", "flow", "process", "state", "sequential-function", "grafcet", "sequence", "circuit", "record", "field", "table", "dataflow", "data-flow", "planogram", "seating", "pipes", "overview", "palette", "comment", "layout", "grid-layout", "tree-layout", "force-directed", "layered", "hierarchical", "circular", "fishbone", "ishikawa", "parallel", "serpentine", "treemap", "tree-map", "freehand", "polygon", "polyline", "bezier", "panel", "view", "model", "databinding", "data-binding", "binding", "transaction", "coordinates", "subgraph", "selection", "highlight", "tooltip", "context-menu", "tool", "command", "validation", "button", "template", "legend", "grid", "printing" ], "homepage": "https://gojs.net", diff --git a/release/go-debug.js b/release/go-debug.js index 1c3c3f1d6..62845028d 100644 --- a/release/go-debug.js +++ b/release/go-debug.js @@ -1,33 +1,33 @@ /* - * GoJS v1.7.9 JavaScript Library for HTML Diagrams + * GoJS v1.7.10 JavaScript Library for HTML Diagrams * Northwoods Software, https://www.nwoods.com/ * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation. * Copyright (C) 1998-2017 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.7.9/doc/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.7.10/doc/license.html. */ (function(window) { var f,aa={};if(!window.document||void 0===window.document.createElement("canvas").getContext)throw window.console&&window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."),Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.");if(!Object.defineProperty)throw Error("GoJS requires a newer version of JavaScript"); Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return g.apply(a,e.concat(d.call(arguments)))}function c(){}var d=Array.prototype.slice,e=d.call(arguments,1),g=this;c.prototype=this.prototype;b.prototype=new c;return b}); (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c=d.length)){var e=D.vb(b,d);if(null!==e&&"function"!==typeof e){if(b.hasOwnProperty(d)){var g=Object.getPrototypeOf(b);if(g&&g.Fw&&g.Fw[d])continue}else if(D.Rx(b,d))continue;""===c&&(c=b+"\n");c+=' unknown property "'+d+'" has value: '+e+" at "+a+"\n"}}return c},ux:function(a,b){if(null!==b&&void 0!==b&&"number"!==typeof b&&"string"!== -typeof b&&"boolean"!==typeof b&&"function"!==typeof b)if(void 0!==D.Gd(b)){if(!v.Sw.contains(b))if(v.Sw.add(b),v.tw.add(v.OE(a,b)),b instanceof K||b instanceof L||b instanceof ma)for(var c=b.j;c.next();)v.ux(a+"["+c.key+"]",c.value);else for(c in b){var d=D.vb(b,c);if(void 0!==d&&null!==d&&D.Ta(d)&&d!==b.Fw){if(b instanceof na){if(d===b.hi)continue}else if(b instanceof x){if("data"===c||d===b.Nd)continue;if("itemArray"===c||d===b.cj)continue;if(b instanceof F&&d===b.Ll)continue}else if(!(b instanceof -E))if(b instanceof oa){if("archetypeGroupData"===c||d===b.az)continue}else if(b instanceof ra){if("archetypeLinkData"===c||d===b.cz)continue;if("archetypeLabelNodeData"===c||d===b.bz)continue}else if(b instanceof ta){if("archetypeNodeData"===c||d===b.ql)continue}else if(b instanceof M){if("nodeDataArray"===c||d===b.we)continue;if("linkDataArray"===c||d===b.bf||d===b.ii)continue;if(d===b.Fc)continue;if(d===b.xg)continue}else if(b instanceof va||b instanceof wa||b instanceof xa)continue;v.ux(a+"."+ +typeof b&&"boolean"!==typeof b&&"function"!==typeof b)if(void 0!==D.Gd(b)){if(!v.Sw.contains(b))if(v.Sw.add(b),v.tw.add(v.OE(a,b)),b instanceof K||b instanceof L||b instanceof ma)for(var c=b.j;c.next();)v.ux(a+"["+c.key+"]",c.value);else for(c in b){var d=D.vb(b,c);if(void 0!==d&&null!==d&&D.Ta(d)&&d!==b.Fw){if(b instanceof na){if(d===b.gi)continue}else if(b instanceof x){if("data"===c||d===b.Nd)continue;if("itemArray"===c||d===b.bj)continue;if(b instanceof F&&d===b.Ll)continue}else if(!(b instanceof +E))if(b instanceof oa){if("archetypeGroupData"===c||d===b.az)continue}else if(b instanceof ra){if("archetypeLinkData"===c||d===b.cz)continue;if("archetypeLabelNodeData"===c||d===b.bz)continue}else if(b instanceof ta){if("archetypeNodeData"===c||d===b.ql)continue}else if(b instanceof M){if("nodeDataArray"===c||d===b.we)continue;if("linkDataArray"===c||d===b.bf||d===b.hi)continue;if(d===b.Fc)continue;if(d===b.xg)continue}else if(b instanceof va||b instanceof wa||b instanceof xa)continue;v.ux(a+"."+ c,d)}}}else if(Array.isArray(b))for(c=0;c=a.length?a.push(c):a.splice(b,0,c):D.k("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Ug:function(a, b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):D.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},Ty:[],O:function(){var a=D.Ty.pop();return void 0===a?new O:a},Fb:function(a,b){var c=D.Ty.pop();if(void 0===c)return new O(a,b);c.x=a;c.y=b;return c},A:function(a){D.Ty.push(a)},lC:[],Cm:function(){var a=D.lC.pop();return void 0===a?new Ca:a},Rk:function(a){D.lC.push(a)},Uy:[],Of:function(){var a=D.Uy.pop();return void 0===a?new B:a},sg:function(a,b,c,d){var e=D.Uy.pop(); -if(void 0===e)return new B(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},Kb:function(a){D.Uy.push(a)},mC:[],Pf:function(){var a=D.mC.pop();return void 0===a?new Da:a},He:function(a){D.mC.push(a)},Vy:null,v:function(){var a=D.Vy;return null!==a?(D.Vy=null,a):new Ea},u:function(a){a.reset();D.Vy=a},kC:[],tb:function(){var a=D.kC.pop();return void 0===a?[]:a},Ba:function(a){a.length=0;D.kC.push(a)},Eo:Object.freeze([]),Gm:1,uc:function(a){a.__gohashid=D.Gm++},rq:function(a){var b=a.__gohashid; -void 0===b&&(b=D.Gm++,a.__gohashid=b);return b},Gd:function(a){return a.__gohashid},ja:function(a,b){b.hz=a;aa[a]=b},Sa:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},Bi:function(a){a.EH=!0},defineProperty:function(a,b,c,d,e){D.h(a,"function","Util.defineProperty:classfunc");D.h(b,"object","Util.defineProperty:propobj");D.h(c,"function","Util.defineProperty:getter");D.h(d,"function","Util.defineProperty:setter");for(var g in b){b=b[g];c={get:c,set:d, -enumerable:!0};if(void 0!==e)for(var h in e)c[h]=e[h];Object.defineProperty(a.prototype,g,c);e=Object.getOwnPropertyDescriptor(a.prototype,g);b&&e&&Object.defineProperty(a.prototype,b,e);break}},FK:!1,w:function(a,b,c,d){D.h(a,"function","Util.defineReadOnlyProperty:classfunc");D.h(b,"object","Util.defineReadOnlyProperty:propobj");D.h(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var g=b[e];b={get:c,set:function(a){D.k('The property "'+g+'" is read-only and cannot be set to '+ +if(void 0===e)return new B(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},Kb:function(a){D.Uy.push(a)},mC:[],Pf:function(){var a=D.mC.pop();return void 0===a?new Da:a},He:function(a){D.mC.push(a)},Vy:null,v:function(){var a=D.Vy;return null!==a?(D.Vy=null,a):new Ea},u:function(a){a.reset();D.Vy=a},kC:[],tb:function(){var a=D.kC.pop();return void 0===a?[]:a},Ba:function(a){a.length=0;D.kC.push(a)},Do:Object.freeze([]),Gm:1,uc:function(a){a.__gohashid=D.Gm++},qq:function(a){var b=a.__gohashid; +void 0===b&&(b=D.Gm++,a.__gohashid=b);return b},Gd:function(a){return a.__gohashid},ja:function(a,b){b.hz=a;aa[a]=b},Sa:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},Ai:function(a){a.EH=!0},defineProperty:function(a,b,c,d,e){D.h(a,"function","Util.defineProperty:classfunc");D.h(b,"object","Util.defineProperty:propobj");D.h(c,"function","Util.defineProperty:getter");D.h(d,"function","Util.defineProperty:setter");for(var g in b){b=b[g];c={get:c,set:d, +enumerable:!0};if(void 0!==e)for(var h in e)c[h]=e[h];Object.defineProperty(a.prototype,g,c);e=Object.getOwnPropertyDescriptor(a.prototype,g);b&&e&&Object.defineProperty(a.prototype,b,e);break}},GK:!1,w:function(a,b,c,d){D.h(a,"function","Util.defineReadOnlyProperty:classfunc");D.h(b,"object","Util.defineReadOnlyProperty:propobj");D.h(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var g=b[e];b={get:c,set:function(a){D.k('The property "'+g+'" is read-only and cannot be set to '+ a)},enumerable:!0};if(void 0!==d)for(var h in d)b[h]=d[h];Object.defineProperty(a.prototype,e,b);d=Object.getOwnPropertyDescriptor(a.prototype,e);g&&d&&Object.defineProperty(a.prototype,g,d);break}},ke:function(a,b){for(var c in b)b[c]=!0;a.prototype.Fw=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?D.rf(a):null===a?"*":""},rf:function(a){if("function"===typeof a){if(a.hz)return a.hz;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9, c).trim();if(""!==b)return a.hz=b}else if("object"===typeof a&&a.constructor)return D.rf(a.constructor);return typeof a},s:function(a,b,c){D.h(a,"function","Util.defineEnumValue:classfunc");D.h(b,"string","Util.defineEnumValue:name");D.h(c,"number","Util.defineEnumValue:num");c=new za(a,b,c);Object.freeze(c);a[b]=c;var d=a.lv;d instanceof ma||(d=new ma("string",za),a.lv=d);d.add(b,c);return c},vb:function(a,b){if(!a||!b)return null;var c=void 0;try{"function"===typeof b?c=b(a):"function"===typeof a.getAttribute? (c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){v&&D.trace("property get error: "+d.toString())}return c},Ua:function(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){v&&D.trace("property set error: "+d.toString())}},Zu:function(a,b){D.h(a,"object","Setting properties requires Objects as arguments");D.h(b,"object","Setting properties requires Objects as arguments");var c=a instanceof x,d=a instanceof E,e;for(e in b){""=== e&&D.k("Setting properties requires non-empty property names");var g=a,h=e;if(c||d){var k=e.indexOf(".");if(0c;c++)b[c]=c;for(var d=0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0, -g="",h=0;hc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;cc;c++)b[c]=c;for(var d=0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0, +g="",h=0;hc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;cd;d++)b[D.Vg("7ca11abfd7330390")](D.Vg(c[d-1]),10,15*d+0);b[D.Vg("7ca11abfd022028846")]=D.Vg("39f046ebb36e4b");for(d=1;5>d;d++)b[D.Vg("7ca11abfd7330390")](D.Vg(c[d- 1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])D.s=function(a,b){var c=new za(a,b,2);Object.freeze(c);a[b]=c;var d=a.lv;d instanceof ma||(d=new ma("string",za),a.lv=d);d.add(b,c);return c};return a}();function za(a,b,c){D.uc(this);this.vC=a;this.Xb=b;this.IH=c}D.ja("EnumValue",za);za.prototype.toString=function(){return D.rf(this.vC)+"."+this.Xb};D.w(za,{Ne:"classType"},function(){return this.vC});D.w(za,{name:"name"},function(){return this.Xb});D.w(za,{value:"value"},function(){return this.IH}); @@ -54,18 +54,18 @@ D.ke(La,{key:!0,value:!0});D.w(La,{j:"iterator"},function(){return this});La.pro La.prototype.each=function(a){this.key=-1;a(this.value);return this};La.prototype.map=function(a){return new La(a(this.value))};La.prototype.filter=function(a){return a(this.value)?new La(this.value):Ka};La.prototype.concat=function(a){return new Ma(this,a.j)};D.w(La,{count:"count"},function(){return 1});La.prototype.Rf=function(){this.value=null};La.prototype.toString=function(){return"SingletonIterator("+this.value+")"};function Ma(a,b){this.Dl=a;this.El=b;this.mv=!1}D.ke(Ma,{key:!0,value:!0}); D.w(Ma,{j:"iterator"},function(){return this});Ma.prototype.reset=Ma.prototype.reset=function(){this.Dl.reset();this.El.reset();this.mv=!1};Ma.prototype.next=Ma.prototype.next=function(){if(!this.mv){var a=this.Dl;if(a.next())return this.key=a.key,this.value=a.value,!0;this.mv=!0}return this.mv&&(a=this.El,a.next())?(this.key=a.key,this.value=a.value,!0):!1};Ma.prototype.hasNext=function(){return this.next()}; Ma.prototype.first=Ma.prototype.first=function(){this.reset();return this.next()?this.value:null};Ma.prototype.any=function(a){return this.Dl.any(a)||this.El.any(a)?!0:!1};Ma.prototype.all=function(a){return this.Dl.all(a)&&this.El.all(a)?!0:!1};Ma.prototype.each=function(a){this.Dl.each(a);this.El.each(a);return this};Ma.prototype.map=function(a){return new Ma(this.Dl.map(a),this.El.map(a))};Ma.prototype.filter=function(a){return new Ma(this.Dl.filter(a),this.El.filter(a))}; -Ma.prototype.concat=function(a){return new Ma(this,a.j)};D.w(Ma,{count:"count"},function(){return this.Dl.count+this.El.count});Ma.prototype.Rf=function(){this.value=this.key=null};Ma.prototype.toString=function(){return"ConcatIterator()"};function Na(a){this.Ec=a;this.ni=null;a.Wb=null;this.$a=a.G;this.Dc=-1}D.ke(Na,{key:!0,value:!0});D.w(Na,{j:"iterator"},function(){return this});D.defineProperty(Na,{Eq:"predicate"},function(){return this.ni},function(a){this.ni=a}); -Na.prototype.reset=Na.prototype.reset=function(){var a=this.Ec;a.Wb=null;this.$a=a.G;this.Dc=-1};Na.prototype.next=Na.prototype.next=function(){var a=this.Ec;if(a.G!==this.$a){if(0>this.key)return!1;D.Va(a)}var a=a.o,b=a.length,c=++this.Dc,d=this.ni;if(null!==d)for(;cthis.key)return!1;D.Va(a)}var b=--this.Dc;if(0<=b)return this.key=b,this.value=a.o[b],!0;this.Rf();return!1};Pa.prototype.hasNext=function(){return this.next()}; -Pa.prototype.first=Pa.prototype.first=function(){var a=this.Ec;this.$a=a.G;var b=a.o;this.Dc=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};Pa.prototype.any=function(a){var b=this.Ec;b.dj=null;var c=b.G,d=b.o,e=d.length;this.Dc=e;for(e-=1;0<=e;e--){if(a(d[e]))return!0;b.G!==c&&D.Va(b)}return!1};Pa.prototype.all=function(a){var b=this.Ec;b.dj=null;var c=b.G,d=b.o,e=d.length;this.Dc=e;for(e-=1;0<=e;e--){if(!a(d[e]))return!1;b.G!==c&&D.Va(b)}return!0}; -Pa.prototype.each=function(a){var b=this.Ec;b.dj=null;var c=b.G,d=b.o,e=d.length;this.Dc=e;for(e-=1;0<=e;e--)a(d[e]),b.G!==c&&D.Va(b);return this};Pa.prototype.map=function(a){var b=this.Ec;b.dj=null;var c=b.G,d=[],e=b.o,g=e.length;this.Dc=g;for(g-=1;0<=g;g--)d.push(a(e[g])),b.G!==c&&D.Va(b);a=new K;a.o=d;a.Rc();return a.j}; -Pa.prototype.filter=function(a){var b=this.Ec;b.dj=null;var c=b.G,d=[],e=b.o,g=e.length;this.Dc=g;for(g-=1;0<=g;g--){var h=e[g];a(h)&&d.push(h);b.G!==c&&D.Va(b)}a=new K(b.ca);a.o=d;a.Rc();return a.j};Pa.prototype.concat=function(a){this.Ec.dj=null;return new Ma(this,a.j)};D.w(Pa,{count:"count"},function(){return this.Ec.o.length});Pa.prototype.Rf=function(){this.key=-1;this.value=null;this.$a=-1;this.Ec.dj=this}; +Ma.prototype.concat=function(a){return new Ma(this,a.j)};D.w(Ma,{count:"count"},function(){return this.Dl.count+this.El.count});Ma.prototype.Rf=function(){this.value=this.key=null};Ma.prototype.toString=function(){return"ConcatIterator()"};function Na(a){this.Ec=a;this.mi=null;a.Wb=null;this.$a=a.G;this.Dc=-1}D.ke(Na,{key:!0,value:!0});D.w(Na,{j:"iterator"},function(){return this});D.defineProperty(Na,{Eq:"predicate"},function(){return this.mi},function(a){this.mi=a}); +Na.prototype.reset=Na.prototype.reset=function(){var a=this.Ec;a.Wb=null;this.$a=a.G;this.Dc=-1};Na.prototype.next=Na.prototype.next=function(){var a=this.Ec;if(a.G!==this.$a){if(0>this.key)return!1;D.Va(a)}var a=a.o,b=a.length,c=++this.Dc,d=this.mi;if(null!==d)for(;cthis.key)return!1;D.Va(a)}var b=--this.Dc;if(0<=b)return this.key=b,this.value=a.o[b],!0;this.Rf();return!1};Pa.prototype.hasNext=function(){return this.next()}; +Pa.prototype.first=Pa.prototype.first=function(){var a=this.Ec;this.$a=a.G;var b=a.o;this.Dc=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};Pa.prototype.any=function(a){var b=this.Ec;b.cj=null;var c=b.G,d=b.o,e=d.length;this.Dc=e;for(e-=1;0<=e;e--){if(a(d[e]))return!0;b.G!==c&&D.Va(b)}return!1};Pa.prototype.all=function(a){var b=this.Ec;b.cj=null;var c=b.G,d=b.o,e=d.length;this.Dc=e;for(e-=1;0<=e;e--){if(!a(d[e]))return!1;b.G!==c&&D.Va(b)}return!0}; +Pa.prototype.each=function(a){var b=this.Ec;b.cj=null;var c=b.G,d=b.o,e=d.length;this.Dc=e;for(e-=1;0<=e;e--)a(d[e]),b.G!==c&&D.Va(b);return this};Pa.prototype.map=function(a){var b=this.Ec;b.cj=null;var c=b.G,d=[],e=b.o,g=e.length;this.Dc=g;for(g-=1;0<=g;g--)d.push(a(e[g])),b.G!==c&&D.Va(b);a=new K;a.o=d;a.Rc();return a.j}; +Pa.prototype.filter=function(a){var b=this.Ec;b.cj=null;var c=b.G,d=[],e=b.o,g=e.length;this.Dc=g;for(g-=1;0<=g;g--){var h=e[g];a(h)&&d.push(h);b.G!==c&&D.Va(b)}a=new K(b.ca);a.o=d;a.Rc();return a.j};Pa.prototype.concat=function(a){this.Ec.cj=null;return new Ma(this,a.j)};D.w(Pa,{count:"count"},function(){return this.Ec.o.length});Pa.prototype.Rf=function(){this.key=-1;this.value=null;this.$a=-1;this.Ec.cj=this}; Pa.prototype.toString=function(){return"ListIteratorBackwards("+this.Dc+"/"+this.Ec.count+")"}; -function K(a){D.uc(this);this.J=!1;this.o=[];this.G=0;this.dj=this.Wb=null;void 0===a||null===a?this.ca=null:"string"===typeof a?"object"===a||"string"===a||"number"===a||"boolean"===a||"function"===a?this.ca=a:D.ua(a,"the string 'object', 'number', 'string', 'boolean', or 'function'","List constructor: type"):"function"===typeof a?this.ca=a===Object?"object":a===String?"string":a===Number?"number":a===Boolean?"boolean":a===Function?"function":a:D.ua(a,"null, a primitive type name, or a class type", +function K(a){D.uc(this);this.J=!1;this.o=[];this.G=0;this.cj=this.Wb=null;void 0===a||null===a?this.ca=null:"string"===typeof a?"object"===a||"string"===a||"number"===a||"boolean"===a||"function"===a?this.ca=a:D.ua(a,"the string 'object', 'number', 'string', 'boolean', or 'function'","List constructor: type"):"function"===typeof a?this.ca=a===Object?"object":a===String?"string":a===Number?"number":a===Boolean?"boolean":a===Function?"function":a:D.ua(a,"null, a primitive type name, or a class type", "List constructor: type")}D.ja("List",K);K.prototype.oh=function(a){null!==this.ca&&("string"===typeof this.ca?typeof a===this.ca&&null!==a||D.hc(a,this.ca):a instanceof this.ca||D.hc(a,this.ca))};K.prototype.Rc=function(){var a=this.G;a++;999999999=g)return this;(0>b||b>=e-1)&&D.ua(b,"0 <= from < length",K,"sortRange:from");if(2===g)return c=d[b],e=d[b+1],0=e)d.sort(a);else for(g=d.slice(0,c),g.sort(a),a=0;a=e)for(g=d.slice(b), g.sort(a),a=b;a=this.o.length)return Ka;var a=this.Wb;return null!==a?(a.reset(),a):new Na(this)}); -D.w(K,{bo:"iteratorBackwards"},function(){if(0>=this.o.length)return Ka;var a=this.dj;return null!==a?(a.reset(),a):new Pa(this)});function Qa(a){this.pi=a;a.Wb=null;this.$a=a.G;this.bb=null}D.ke(Qa,{key:!0,value:!0});D.w(Qa,{j:"iterator"},function(){return this});Qa.prototype.reset=Qa.prototype.reset=function(){var a=this.pi;a.Wb=null;this.$a=a.G;this.bb=null}; -Qa.prototype.next=Qa.prototype.next=function(){var a=this.pi;if(a.G!==this.$a){if(null===this.key)return!1;D.Va(a)}var b=this.bb,b=null===b?a.Ka:b.fb;if(null!==b)return this.bb=b,this.value=b.value,this.key=b.key,!0;this.Rf();return!1};Qa.prototype.hasNext=function(){return this.next()};Qa.prototype.first=Qa.prototype.first=function(){var a=this.pi;this.$a=a.G;a=a.Ka;if(null!==a){this.bb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; -Qa.prototype.any=function(a){var b=this.pi;b.Wb=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;){if(a(d.value))return!0;b.G!==c&&D.Va(b);d=d.fb}return!1};Qa.prototype.all=function(a){var b=this.pi;b.Wb=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;){if(!a(d.value))return!1;b.G!==c&&D.Va(b);d=d.fb}return!0};Qa.prototype.each=function(a){var b=this.pi;b.Wb=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;)a(d.value),b.G!==c&&D.Va(b),d=d.fb;return this}; -Qa.prototype.map=function(a){var b=this.pi;b.Wb=null;for(var c=new K,d=b.G,e=b.Ka;null!==e;)c.add(a(e.value)),b.G!==d&&D.Va(b),e=e.fb;return c.j};Qa.prototype.filter=function(a){var b=this.pi;b.Wb=null;for(var c=new K(b.ca),d=b.G,e=b.Ka;null!==e;){var g=e.value;a(g)&&c.add(g);b.G!==d&&D.Va(b);e=e.fb}return c.j};Qa.prototype.concat=function(a){this.pi.Wb=null;return new Ma(this,a.j)};D.w(Qa,{count:"count"},function(){return this.pi.yd}); -Qa.prototype.Rf=function(){this.value=this.key=null;this.$a=-1;this.pi.Wb=this};Qa.prototype.toString=function(){return null!==this.bb?"SetIterator@"+this.bb.value:"SetIterator"}; -function L(a){D.uc(this);this.J=!1;void 0===a||null===a?this.ca=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ca=a:D.ua(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.ca=a===Object?"object":a===String?"string":a===Number?"number":a:D.ua(a,"null, a primitive type name, or a class type","Set constructor: type");this.zd={};this.yd=0;this.Wb=null;this.G=0;this.gi=this.Ka=null}D.ja("Set",L); +D.w(K,{ao:"iteratorBackwards"},function(){if(0>=this.o.length)return Ka;var a=this.cj;return null!==a?(a.reset(),a):new Pa(this)});function Qa(a){this.oi=a;a.Wb=null;this.$a=a.G;this.bb=null}D.ke(Qa,{key:!0,value:!0});D.w(Qa,{j:"iterator"},function(){return this});Qa.prototype.reset=Qa.prototype.reset=function(){var a=this.oi;a.Wb=null;this.$a=a.G;this.bb=null}; +Qa.prototype.next=Qa.prototype.next=function(){var a=this.oi;if(a.G!==this.$a){if(null===this.key)return!1;D.Va(a)}var b=this.bb,b=null===b?a.Ka:b.fb;if(null!==b)return this.bb=b,this.value=b.value,this.key=b.key,!0;this.Rf();return!1};Qa.prototype.hasNext=function(){return this.next()};Qa.prototype.first=Qa.prototype.first=function(){var a=this.oi;this.$a=a.G;a=a.Ka;if(null!==a){this.bb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; +Qa.prototype.any=function(a){var b=this.oi;b.Wb=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;){if(a(d.value))return!0;b.G!==c&&D.Va(b);d=d.fb}return!1};Qa.prototype.all=function(a){var b=this.oi;b.Wb=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;){if(!a(d.value))return!1;b.G!==c&&D.Va(b);d=d.fb}return!0};Qa.prototype.each=function(a){var b=this.oi;b.Wb=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;)a(d.value),b.G!==c&&D.Va(b),d=d.fb;return this}; +Qa.prototype.map=function(a){var b=this.oi;b.Wb=null;for(var c=new K,d=b.G,e=b.Ka;null!==e;)c.add(a(e.value)),b.G!==d&&D.Va(b),e=e.fb;return c.j};Qa.prototype.filter=function(a){var b=this.oi;b.Wb=null;for(var c=new K(b.ca),d=b.G,e=b.Ka;null!==e;){var g=e.value;a(g)&&c.add(g);b.G!==d&&D.Va(b);e=e.fb}return c.j};Qa.prototype.concat=function(a){this.oi.Wb=null;return new Ma(this,a.j)};D.w(Qa,{count:"count"},function(){return this.oi.yd}); +Qa.prototype.Rf=function(){this.value=this.key=null;this.$a=-1;this.oi.Wb=this};Qa.prototype.toString=function(){return null!==this.bb?"SetIterator@"+this.bb.value:"SetIterator"}; +function L(a){D.uc(this);this.J=!1;void 0===a||null===a?this.ca=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ca=a:D.ua(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.ca=a===Object?"object":a===String?"string":a===Number?"number":a:D.ua(a,"null, a primitive type name, or a class type","Set constructor: type");this.zd={};this.yd=0;this.Wb=null;this.G=0;this.fi=this.Ka=null}D.ja("Set",L); L.prototype.oh=function(a){null!==this.ca&&("string"===typeof this.ca?typeof a===this.ca&&null!==a||D.hc(a,this.ca):a instanceof this.ca||D.hc(a,this.ca))};L.prototype.Rc=function(){var a=this.G;a++;999999999=this.yd)return Ka;var a=this.Wb;return null!==a?(a.reset(),a):new Qa(this)});function Sa(a){this.Ma=a;this.$a=a.G;this.bb=null}D.ke(Sa,{key:!0,value:!0});D.w(Sa,{j:"iterator"},function(){return this});Sa.prototype.reset=Sa.prototype.reset=function(){this.$a=this.Ma.G;this.bb=null}; Sa.prototype.next=Sa.prototype.next=function(){var a=this.Ma;if(a.G!==this.$a){if(null===this.key)return!1;D.Va(a)}var b=this.bb,b=null===b?a.Ka:b.fb;if(null!==b)return this.bb=b,this.value=this.key=a=b.key,!0;this.Rf();return!1};Sa.prototype.hasNext=function(){return this.next()};Sa.prototype.first=Sa.prototype.first=function(){var a=this.Ma;this.$a=a.G;a=a.Ka;return null!==a?(this.bb=a,this.value=this.key=a=a.key):null}; Sa.prototype.any=function(a){var b=this.Ma,c=b.G;this.bb=null;for(var d=b.Ka;null!==d;){if(a(d.key))return!0;b.G!==c&&D.Va(b);d=d.fb}return!1};Sa.prototype.all=function(a){var b=this.Ma,c=b.G;this.bb=null;for(var d=b.Ka;null!==d;){if(!a(d.key))return!1;b.G!==c&&D.Va(b);d=d.fb}return!0};Sa.prototype.each=function(a){var b=this.Ma,c=b.G;this.bb=null;for(var d=b.Ka;null!==d;)a(d.key),b.G!==c&&D.Va(b),d=d.fb;return this}; @@ -100,76 +100,76 @@ Sa.prototype.toString=function(){return null!==this.bb?"MapKeySetIterator@"+this Ta.prototype.set=Ta.prototype.set=function(){D.k("This Set is read-only: "+this.toString());return!1};Ta.prototype.contains=Ta.prototype.contains=function(a){return this.Ma.contains(a)};Ta.prototype.has=Ta.prototype.has=function(a){return this.contains(a)};Ta.prototype.remove=Ta.prototype["delete"]=Ta.prototype.remove=function(){D.k("This Set is read-only: "+this.toString());return!1};Ta.prototype.clear=Ta.prototype.clear=function(){D.k("This Set is read-only: "+this.toString())}; Ta.prototype.first=Ta.prototype.first=function(){var a=this.Ma.Ka;return null!==a?a.key:null};Ta.prototype.any=function(a){for(var b=this.Ma.Ka;null!==b;){if(a(b.key))return!0;b=b.fb}return!1};Ta.prototype.all=function(a){for(var b=this.Ma.Ka;null!==b;){if(!a(b.key))return!1;b=b.fb}return!0};Ta.prototype.each=function(a){for(var b=this.Ma.Ka;null!==b;)a(b.key),b=b.fb;return this};Ta.prototype.map=function(a){for(var b=new L,c=this.Ma.Ka;null!==c;)b.add(a(c.key)),c=c.fb;return b}; Ta.prototype.filter=function(a){for(var b=new L(this.Ma.af),c=this.Ma.Ka;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.fb}return b};Ta.prototype.concat=function(a){return this.eH().Sc(a)};Ta.prototype.copy=function(){return new Ta(this.Ma)};Ta.prototype.toSet=Ta.prototype.eH=function(){var a=new L(this.Ma.af),b=this.Ma.zd,c;for(c in b)a.add(b[c].key);return a};Ta.prototype.toArray=Ta.prototype.mc=function(){var a=this.Ma.zd,b=Array(this.Ma.yd),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; -Ta.prototype.toList=function(){var a=new K(this.Ma.af),b=this.Ma.zd,c;for(c in b)a.add(b[c].key);return a};D.w(Ta,{count:"count"},function(){return this.Ma.yd});D.w(Ta,{size:"size"},function(){return this.Ma.yd});D.w(Ta,{j:"iterator"},function(){return 0>=this.Ma.yd?Ka:new Sa(this.Ma)});function Ya(a){this.Ma=a;a.ej=null;this.$a=a.G;this.bb=null}D.ke(Ya,{key:!0,value:!0});D.w(Ya,{j:"iterator"},function(){return this}); -Ya.prototype.reset=Ya.prototype.reset=function(){var a=this.Ma;a.ej=null;this.$a=a.G;this.bb=null};Ya.prototype.next=Ya.prototype.next=function(){var a=this.Ma;if(a.G!==this.$a){if(null===this.key)return!1;D.Va(a)}var b=this.bb,b=null===b?a.Ka:b.fb;if(null!==b)return this.bb=b,this.value=b.value,this.key=b.key,!0;this.Rf();return!1};Ya.prototype.hasNext=function(){return this.next()}; -Ya.prototype.first=Ya.prototype.first=function(){var a=this.Ma;this.$a=a.G;a=a.Ka;if(null!==a){this.bb=a;var b=a.value;this.key=a.key;return this.value=b}return null};Ya.prototype.any=function(a){var b=this.Ma;b.ej=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;){if(a(d.value))return!0;b.G!==c&&D.Va(b);d=d.fb}return!1};Ya.prototype.all=function(a){var b=this.Ma;b.ej=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;){if(!a(d.value))return!1;b.G!==c&&D.Va(b);d=d.fb}return!0}; -Ya.prototype.each=function(a){var b=this.Ma;b.ej=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;)a(d.value),b.G!==c&&D.Va(b),d=d.fb;return this};Ya.prototype.map=function(a){var b=this.Ma;b.ej=null;var c=b.G;this.bb=null;for(var d=new K,e=b.Ka;null!==e;)d.add(a(e.value)),b.G!==c&&D.Va(b),e=e.fb;return d.j};Ya.prototype.filter=function(a){var b=this.Ma;b.ej=null;var c=b.G;this.bb=null;for(var d=new K(b.af),e=b.Ka;null!==e;){var g=e.value;a(g)&&d.add(g);b.G!==c&&D.Va(b);e=e.fb}return d.j}; -Ya.prototype.concat=function(a){this.Ma.ej=null;return new Ma(this,a.j)};D.w(Ya,{count:"count"},function(){return this.Ma.yd});Ya.prototype.Rf=function(){this.value=this.key=null;this.$a=-1;this.Ma.ej=this};Ya.prototype.toString=function(){return null!==this.bb?"MapValueSetIterator@"+this.bb.value:"MapValueSetIterator"};function Ra(a,b){this.key=a;this.value=b;this.Hp=this.fb=null}D.ke(Ra,{key:!0,value:!0});Ra.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"}; +Ta.prototype.toList=function(){var a=new K(this.Ma.af),b=this.Ma.zd,c;for(c in b)a.add(b[c].key);return a};D.w(Ta,{count:"count"},function(){return this.Ma.yd});D.w(Ta,{size:"size"},function(){return this.Ma.yd});D.w(Ta,{j:"iterator"},function(){return 0>=this.Ma.yd?Ka:new Sa(this.Ma)});function Ya(a){this.Ma=a;a.dj=null;this.$a=a.G;this.bb=null}D.ke(Ya,{key:!0,value:!0});D.w(Ya,{j:"iterator"},function(){return this}); +Ya.prototype.reset=Ya.prototype.reset=function(){var a=this.Ma;a.dj=null;this.$a=a.G;this.bb=null};Ya.prototype.next=Ya.prototype.next=function(){var a=this.Ma;if(a.G!==this.$a){if(null===this.key)return!1;D.Va(a)}var b=this.bb,b=null===b?a.Ka:b.fb;if(null!==b)return this.bb=b,this.value=b.value,this.key=b.key,!0;this.Rf();return!1};Ya.prototype.hasNext=function(){return this.next()}; +Ya.prototype.first=Ya.prototype.first=function(){var a=this.Ma;this.$a=a.G;a=a.Ka;if(null!==a){this.bb=a;var b=a.value;this.key=a.key;return this.value=b}return null};Ya.prototype.any=function(a){var b=this.Ma;b.dj=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;){if(a(d.value))return!0;b.G!==c&&D.Va(b);d=d.fb}return!1};Ya.prototype.all=function(a){var b=this.Ma;b.dj=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;){if(!a(d.value))return!1;b.G!==c&&D.Va(b);d=d.fb}return!0}; +Ya.prototype.each=function(a){var b=this.Ma;b.dj=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;)a(d.value),b.G!==c&&D.Va(b),d=d.fb;return this};Ya.prototype.map=function(a){var b=this.Ma;b.dj=null;var c=b.G;this.bb=null;for(var d=new K,e=b.Ka;null!==e;)d.add(a(e.value)),b.G!==c&&D.Va(b),e=e.fb;return d.j};Ya.prototype.filter=function(a){var b=this.Ma;b.dj=null;var c=b.G;this.bb=null;for(var d=new K(b.af),e=b.Ka;null!==e;){var g=e.value;a(g)&&d.add(g);b.G!==c&&D.Va(b);e=e.fb}return d.j}; +Ya.prototype.concat=function(a){this.Ma.dj=null;return new Ma(this,a.j)};D.w(Ya,{count:"count"},function(){return this.Ma.yd});Ya.prototype.Rf=function(){this.value=this.key=null;this.$a=-1;this.Ma.dj=this};Ya.prototype.toString=function(){return null!==this.bb?"MapValueSetIterator@"+this.bb.value:"MapValueSetIterator"};function Ra(a,b){this.key=a;this.value=b;this.Gp=this.fb=null}D.ke(Ra,{key:!0,value:!0});Ra.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"}; function $a(a){this.Ma=a;a.Wb=null;this.$a=a.G;this.bb=null}D.ke($a,{key:!0,value:!0});D.w($a,{j:"iterator"},function(){return this});$a.prototype.reset=$a.prototype.reset=function(){var a=this.Ma;a.Wb=null;this.$a=a.G;this.bb=null};$a.prototype.next=$a.prototype.next=function(){var a=this.Ma;if(a.G!==this.$a){if(null===this.key)return!1;D.Va(a)}var b=this.bb,b=null===b?a.Ka:b.fb;if(null!==b)return this.bb=b,this.key=b.key,this.value=b.value,!0;this.Rf();return!1};$a.prototype.hasNext=function(){return this.next()}; $a.prototype.first=$a.prototype.first=function(){var a=this.Ma;this.$a=a.G;a=a.Ka;return null!==a?(this.bb=a,this.key=a.key,this.value=a.value,a):null};$a.prototype.any=function(a){var b=this.Ma;b.Wb=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;){if(a(d))return!0;b.G!==c&&D.Va(b);d=d.fb}return!1};$a.prototype.all=function(a){var b=this.Ma;b.Wb=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;){if(!a(d))return!1;b.G!==c&&D.Va(b);d=d.fb}return!0}; $a.prototype.each=function(a){var b=this.Ma;b.Wb=null;var c=b.G;this.bb=null;for(var d=b.Ka;null!==d;)a(d),b.G!==c&&D.Va(b),d=d.fb;return this};$a.prototype.map=function(a){var b=this.Ma;b.Wb=null;var c=b.G;this.bb=null;for(var d=new K,e=b.Ka;null!==e;)d.add(a(e)),b.G!==c&&D.Va(b),e=e.fb;return d.j};$a.prototype.filter=function(a){var b=this.Ma;b.Wb=null;var c=b.G;this.bb=null;for(var d=new K,e=b.Ka;null!==e;)a(e)&&d.add(e),b.G!==c&&D.Va(b),e=e.fb;return d.j}; $a.prototype.concat=function(a){this.Ma.Wb=null;return new Ma(this,a.j)};D.w($a,{count:"count"},function(){return this.Ma.yd});$a.prototype.Rf=function(){this.value=this.key=null;this.$a=-1;this.Ma.Wb=this};$a.prototype.toString=function(){return null!==this.bb?"MapIterator@"+this.bb:"MapIterator"}; -function ma(a,b){D.uc(this);this.J=!1;void 0===a||null===a?this.af=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.af=a:D.ua(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.af=a===Object?"object":a===String?"string":a===Number?"number":a:D.ua(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.zi=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"=== -b||"function"===b?this.zi=b:D.ua(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.zi=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:D.ua(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.zd={};this.yd=0;this.ej=this.Wb=null;this.G=0;this.gi=this.Ka=null}D.ja("Map",ma); -function bb(a,b){null!==a.af&&("string"===typeof a.af?typeof b===a.af&&null!==b||D.hc(b,a.af):b instanceof a.af||D.hc(b,a.af))}ma.prototype.Rc=function(){var a=this.G;a++;999999999=this.count)return Ka;var a=this.Wb;return null!==a?(a.reset(),a):new $a(this)});D.w(ma,{$F:"iteratorKeys"},function(){return 0>=this.count?Ka:new Sa(this)});D.w(ma,{aG:"iteratorValues"},function(){if(0>=this.count)return Ka;var a=this.ej;return null!==a?(a.reset(),a):new Ya(this)});function O(a,b){void 0===a?this.M=this.L=0:"number"===typeof a&&"number"===typeof b?(this.L=a,this.M=b):D.k("Invalid arguments to Point constructor: "+a+", "+b);this.J=!1} -D.ja("Point",O);D.Bi(O);D.ke(O,{x:!0,y:!0});O.prototype.assign=function(a){this.L=a.L;this.M=a.M};O.prototype.setTo=O.prototype.n=function(a,b){v&&(D.h(a,"number",O,"setTo:x"),D.h(b,"number",O,"setTo:y"));this.L=a;this.M=b;return this};O.prototype.set=O.prototype.set=function(a){v&&D.l(a,O,O,"set:p");this.Ra();this.L=a.L;this.M=a.M;return this};O.prototype.copy=function(){var a=new O;a.L=this.L;a.M=this.M;return a};f=O.prototype;f.Na=function(){this.J=!0;Object.freeze(this);return this}; -f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Ra=function(a){if(this.J){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; +ma.prototype.remove=ma.prototype["delete"]=ma.prototype.remove=function(a){if(null===a)return!1;v&&bb(this,a);this.J&&D.pa(this,a);var b=a;if(D.Ta(a)&&(b=D.Gd(a),void 0===b))return!1;a=this.zd[b];if(void 0===a)return!1;var c=a.fb,d=a.Gp;null!==c&&(c.Gp=d);null!==d&&(d.fb=c);this.Ka===a&&(this.Ka=c);this.fi===a&&(this.fi=d);delete this.zd[b];this.yd--;this.Rc();return!0};ma.prototype.clear=ma.prototype.clear=function(){this.J&&D.pa(this);this.zd={};this.yd=0;this.fi=this.Ka=null;this.Rc()}; +ma.prototype.copy=function(){var a=new ma(this.af,this.yi),b=this.zd,c;for(c in b){var d=b[c];a.add(d.key,d.value)}return a};ma.prototype.toArray=ma.prototype.mc=function(){var a=this.zd,b=Array(this.yd),c=0,d;for(d in a){var e=a[d];b[c]=new Ra(e.key,e.value);c++}return b};ma.prototype.toKeySet=ma.prototype.Yj=function(){return new Ta(this)};D.w(ma,{count:"count"},function(){return this.yd});D.w(ma,{size:"size"},function(){return this.yd}); +D.w(ma,{j:"iterator"},function(){if(0>=this.count)return Ka;var a=this.Wb;return null!==a?(a.reset(),a):new $a(this)});D.w(ma,{$F:"iteratorKeys"},function(){return 0>=this.count?Ka:new Sa(this)});D.w(ma,{aG:"iteratorValues"},function(){if(0>=this.count)return Ka;var a=this.dj;return null!==a?(a.reset(),a):new Ya(this)});function O(a,b){void 0===a?this.M=this.L=0:"number"===typeof a&&"number"===typeof b?(this.L=a,this.M=b):D.k("Invalid arguments to Point constructor: "+a+", "+b);this.J=!1} +D.ja("Point",O);D.Ai(O);D.ke(O,{x:!0,y:!0});O.prototype.assign=function(a){this.L=a.L;this.M=a.M};O.prototype.setTo=O.prototype.n=function(a,b){v&&(D.h(a,"number",O,"setTo:x"),D.h(b,"number",O,"setTo:y"));this.L=a;this.M=b;return this};O.prototype.set=O.prototype.set=function(a){v&&D.l(a,O,O,"set:p");this.Qa();this.L=a.L;this.M=a.M;return this};O.prototype.copy=function(){var a=new O;a.L=this.L;a.M=this.M;return a};f=O.prototype;f.Na=function(){this.J=!0;Object.freeze(this);return this}; +f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Qa=function(a){if(this.J){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; O.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new O(c,e)}return new O};O.stringify=function(a){v&&D.l(a,O);return a.x.toString()+" "+a.y.toString()};O.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};O.prototype.equals=O.prototype.P=function(a){return a instanceof O?this.L===a.x&&this.M===a.y:!1}; -O.prototype.equalTo=O.prototype.Gx=function(a,b){return this.L===a&&this.M===b};O.prototype.equalsApprox=O.prototype.Tc=function(a){return Q(this.L,a.x)&&Q(this.M,a.y)};O.prototype.add=O.prototype.add=function(a){v&&D.l(a,O,O,"add:p");this.Ra();this.L+=a.x;this.M+=a.y;return this};O.prototype.subtract=O.prototype.xo=function(a){v&&D.l(a,O,O,"subtract:p");this.Ra();this.L-=a.x;this.M-=a.y;return this}; -O.prototype.offset=O.prototype.offset=function(a,b){v&&(D.p(a,O,"offset:dx"),D.p(b,O,"offset:dy"));this.Ra();this.L+=a;this.M+=b;return this};O.prototype.rotate=O.prototype.rotate=function(a){v&&D.p(a,O,"rotate:angle");this.Ra();if(0===a)return this;var b=this.L,c=this.M;if(0===b&&0===c)return this;var d=0,e=0;360<=a?a-=360:0>a&&(a+=360);90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(a=a*Math.PI/180,d=Math.cos(a),e=Math.sin(a));this.L=d*b-e*c;this.M=e*b+d*c;return this}; -O.prototype.scale=O.prototype.scale=function(a,b){v&&(D.p(a,O,"scale:sx"),D.p(b,O,"scale:sy"));this.L*=a;this.M*=b;return this};O.prototype.distanceSquaredPoint=O.prototype.Df=function(a){v&&D.l(a,O,O,"distanceSquaredPoint:p");var b=a.x-this.L;a=a.y-this.M;return b*b+a*a};O.prototype.distanceSquared=O.prototype.lq=function(a,b){v&&(D.p(a,O,"distanceSquared:px"),D.p(b,O,"distanceSquared:py"));var c=a-this.L,d=b-this.M;return c*c+d*d}; -O.prototype.normalize=O.prototype.normalize=function(){this.Ra();var a=this.L,b=this.M,c=Math.sqrt(a*a+b*b);0a&&(a+=360);90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(a=a*Math.PI/180,d=Math.cos(a),e=Math.sin(a));this.L=d*b-e*c;this.M=e*b+d*c;return this}; +O.prototype.scale=O.prototype.scale=function(a,b){v&&(D.p(a,O,"scale:sx"),D.p(b,O,"scale:sy"));this.L*=a;this.M*=b;return this};O.prototype.distanceSquaredPoint=O.prototype.Df=function(a){v&&D.l(a,O,O,"distanceSquaredPoint:p");var b=a.x-this.L;a=a.y-this.M;return b*b+a*a};O.prototype.distanceSquared=O.prototype.kq=function(a,b){v&&(D.p(a,O,"distanceSquared:px"),D.p(b,O,"distanceSquared:py"));var c=a-this.L,d=b-this.M;return c*c+d*d}; +O.prototype.normalize=O.prototype.normalize=function(){this.Qa();var a=this.L,b=this.M,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}O.prototype.projectOntoLineSegment=function(a,b,c,d){v&&(D.p(a,O,"projectOntoLineSegment:px"),D.p(b,O,"projectOntoLineSegment:py"),D.p(c,O,"projectOntoLineSegment:qx"),D.p(d,O,"projectOntoLineSegment:qy"));eb(a,b,c,d,this.L,this.M,this);return this}; O.prototype.projectOntoLineSegmentPoint=function(a,b){v&&(D.l(a,O,O,"projectOntoLineSegmentPoint:p"),D.l(b,O,O,"projectOntoLineSegmentPoint:q"));eb(a.x,a.y,b.x,b.y,this.L,this.M,this);return this};O.prototype.snapToGrid=function(a,b,c,d){v&&(D.p(a,O,"snapToGrid:originx"),D.p(b,O,"snapToGrid:originy"),D.p(c,O,"snapToGrid:cellwidth"),D.p(d,O,"snapToGrid:cellheight"));fb(this.L,this.M,a,b,c,d,this);return this}; -O.prototype.snapToGridPoint=function(a,b){v&&(D.l(a,O,O,"snapToGridPoint:p"),D.l(b,Ca,O,"snapToGridPoint:q"));fb(this.L,this.M,a.x,a.y,b.width,b.height,this);return this};O.prototype.setRectSpot=O.prototype.uo=function(a,b){v&&(D.l(a,B,O,"setRectSpot:r"),D.l(b,R,O,"setRectSpot:spot"));this.Ra();this.L=a.x+b.x*a.width+b.offsetX;this.M=a.y+b.y*a.height+b.offsetY;return this}; -O.prototype.setSpot=O.prototype.av=function(a,b,c,d,e){v&&(D.p(a,O,"setSpot:x"),D.p(b,O,"setSpot:y"),D.p(c,O,"setSpot:w"),D.p(d,O,"setSpot:h"),(0>c||0>d)&&D.k("Point.setSpot:Width and height cannot be negative"),D.l(e,R,O,"setSpot:spot"));this.Ra();this.L=a+e.x*c+e.offsetX;this.M=b+e.y*d+e.offsetY;return this};O.prototype.transform=function(a){v&&D.l(a,Da,O,"transform:t");a.wb(this);return this};function gb(a,b){v&&D.l(b,Da,O,"transformInverted:t");b.Di(a);return a}var ib; +O.prototype.snapToGridPoint=function(a,b){v&&(D.l(a,O,O,"snapToGridPoint:p"),D.l(b,Ca,O,"snapToGridPoint:q"));fb(this.L,this.M,a.x,a.y,b.width,b.height,this);return this};O.prototype.setRectSpot=O.prototype.to=function(a,b){v&&(D.l(a,B,O,"setRectSpot:r"),D.l(b,R,O,"setRectSpot:spot"));this.Qa();this.L=a.x+b.x*a.width+b.offsetX;this.M=a.y+b.y*a.height+b.offsetY;return this}; +O.prototype.setSpot=O.prototype.av=function(a,b,c,d,e){v&&(D.p(a,O,"setSpot:x"),D.p(b,O,"setSpot:y"),D.p(c,O,"setSpot:w"),D.p(d,O,"setSpot:h"),(0>c||0>d)&&D.k("Point.setSpot:Width and height cannot be negative"),D.l(e,R,O,"setSpot:spot"));this.Qa();this.L=a+e.x*c+e.offsetX;this.M=b+e.y*d+e.offsetY;return this};O.prototype.transform=function(a){v&&D.l(a,Da,O,"transform:t");a.wb(this);return this};function gb(a,b){v&&D.l(b,Da,O,"transformInverted:t");b.Ci(a);return a}var ib; O.distanceLineSegmentSquared=ib=function(a,b,c,d,e,g){v&&(D.p(a,O,"distanceLineSegmentSquared:px"),D.p(b,O,"distanceLineSegmentSquared:py"),D.p(c,O,"distanceLineSegmentSquared:ax"),D.p(d,O,"distanceLineSegmentSquared:ay"),D.p(e,O,"distanceLineSegmentSquared:bx"),D.p(g,O,"distanceLineSegmentSquared:by"));var h=e-c,k=g-d,l=h*h+k*k;c-=a;d-=b;var m=-c*h-d*k;if(0>=m||m>=l)return h=e-a,k=g-b,Math.min(c*c+d*d,h*h+k*k);a=h*d-k*c;return a*a/l};var jb; O.distanceSquared=jb=function(a,b,c,d){v&&(D.p(a,O,"distanceSquared:px"),D.p(b,O,"distanceSquared:py"),D.p(c,O,"distanceSquared:qx"),D.p(d,O,"distanceSquared:qy"));a=c-a;b=d-b;return a*a+b*b};var rb; -O.direction=rb=function(a,b,c,d){v&&(D.p(a,O,"direction:px"),D.p(b,O,"direction:py"),D.p(c,O,"direction:qx"),D.p(d,O,"direction:qy"));a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d};D.defineProperty(O,{x:"x"},function(){return this.L},function(a){this.Ra(a);v&&D.h(a,"number",O,"x");this.L=a}); -D.defineProperty(O,{y:"y"},function(){return this.M},function(a){this.Ra(a);v&&D.h(a,"number",O,"y");this.M=a});O.prototype.isReal=O.prototype.F=function(){return isFinite(this.x)&&isFinite(this.y)};function Ca(a,b){void 0===a?this.Ha=this.Ia=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.Ia=a,this.Ha=b):D.k("Invalid arguments to Size constructor: "+a+", "+b);this.J=!1}D.ja("Size",Ca);D.Bi(Ca);D.ke(Ca,{width:!0,height:!0}); -Ca.prototype.assign=function(a){this.Ia=a.Ia;this.Ha=a.Ha};Ca.prototype.setTo=Ca.prototype.n=function(a,b){v&&(D.h(a,"number",Ca,"setTo:w"),D.h(b,"number",Ca,"setTo:h"),0>a&&D.ua(a,">= 0",Ca,"setTo:w"),0>b&&D.ua(b,">= 0",Ca,"setTo:h"));this.Ia=a;this.Ha=b;return this};Ca.prototype.set=Ca.prototype.set=function(a){v&&D.l(a,Ca,Ca,"set:s");this.Ra();this.Ia=a.Ia;this.Ha=a.Ha;return this};Ca.prototype.copy=function(){var a=new Ca;a.Ia=this.Ia;a.Ha=this.Ha;return a};f=Ca.prototype; -f.Na=function(){this.J=!0;Object.freeze(this);return this};f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Ra=function(a){if(this.J){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; +O.direction=rb=function(a,b,c,d){v&&(D.p(a,O,"direction:px"),D.p(b,O,"direction:py"),D.p(c,O,"direction:qx"),D.p(d,O,"direction:qy"));a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d};D.defineProperty(O,{x:"x"},function(){return this.L},function(a){this.Qa(a);v&&D.h(a,"number",O,"x");this.L=a}); +D.defineProperty(O,{y:"y"},function(){return this.M},function(a){this.Qa(a);v&&D.h(a,"number",O,"y");this.M=a});O.prototype.isReal=O.prototype.F=function(){return isFinite(this.x)&&isFinite(this.y)};function Ca(a,b){void 0===a?this.Ha=this.Ia=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.Ia=a,this.Ha=b):D.k("Invalid arguments to Size constructor: "+a+", "+b);this.J=!1}D.ja("Size",Ca);D.Ai(Ca);D.ke(Ca,{width:!0,height:!0}); +Ca.prototype.assign=function(a){this.Ia=a.Ia;this.Ha=a.Ha};Ca.prototype.setTo=Ca.prototype.n=function(a,b){v&&(D.h(a,"number",Ca,"setTo:w"),D.h(b,"number",Ca,"setTo:h"),0>a&&D.ua(a,">= 0",Ca,"setTo:w"),0>b&&D.ua(b,">= 0",Ca,"setTo:h"));this.Ia=a;this.Ha=b;return this};Ca.prototype.set=Ca.prototype.set=function(a){v&&D.l(a,Ca,Ca,"set:s");this.Qa();this.Ia=a.Ia;this.Ha=a.Ha;return this};Ca.prototype.copy=function(){var a=new Ca;a.Ia=this.Ia;a.Ha=this.Ha;return a};f=Ca.prototype; +f.Na=function(){this.J=!0;Object.freeze(this);return this};f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Qa=function(a){if(this.J){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; Ca.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new Ca(c,e)}return new Ca};Ca.stringify=function(a){v&&D.l(a,Ca);return a.width.toString()+" "+a.height.toString()};Ca.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};Ca.prototype.equals=Ca.prototype.P=function(a){return a instanceof Ca?this.Ia===a.width&&this.Ha===a.height:!1}; -Ca.prototype.equalTo=Ca.prototype.Gx=function(a,b){return this.Ia===a&&this.Ha===b};Ca.prototype.equalsApprox=Ca.prototype.Tc=function(a){return Q(this.Ia,a.width)&&Q(this.Ha,a.height)};D.defineProperty(Ca,{width:"width"},function(){return this.Ia},function(a){this.Ra(a);v&&D.h(a,"number",Ca,"width");0>a&&D.ua(a,">= 0",Ca,"width");this.Ia=a}); -D.defineProperty(Ca,{height:"height"},function(){return this.Ha},function(a){this.Ra(a);v&&D.h(a,"number",Ca,"height");0>a&&D.ua(a,">= 0",Ca,"height");this.Ha=a});Ca.prototype.isReal=Ca.prototype.F=function(){return isFinite(this.width)&&isFinite(this.height)}; +Ca.prototype.equalTo=Ca.prototype.Gx=function(a,b){return this.Ia===a&&this.Ha===b};Ca.prototype.equalsApprox=Ca.prototype.Tc=function(a){return Q(this.Ia,a.width)&&Q(this.Ha,a.height)};D.defineProperty(Ca,{width:"width"},function(){return this.Ia},function(a){this.Qa(a);v&&D.h(a,"number",Ca,"width");0>a&&D.ua(a,">= 0",Ca,"width");this.Ia=a}); +D.defineProperty(Ca,{height:"height"},function(){return this.Ha},function(a){this.Qa(a);v&&D.h(a,"number",Ca,"height");0>a&&D.ua(a,">= 0",Ca,"height");this.Ha=a});Ca.prototype.isReal=Ca.prototype.F=function(){return isFinite(this.width)&&isFinite(this.height)}; function B(a,b,c,d){void 0===a?this.Ha=this.Ia=this.M=this.L=0:a instanceof O?b instanceof O?(this.L=Math.min(a.L,b.L),this.M=Math.min(a.M,b.M),this.Ia=Math.abs(a.L-b.L),this.Ha=Math.abs(a.M-b.M)):b instanceof Ca?(this.L=a.L,this.M=a.M,this.Ia=b.Ia,this.Ha=b.Ha):D.k("Incorrect arguments supplied to Rect constructor"):"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.L=a,this.M=b,this.Ia=c,this.Ha=d):D.k("Invalid arguments to Rect constructor: "+ -a+", "+b+", "+c+", "+d);this.J=!1}D.ja("Rect",B);D.Bi(B);D.ke(B,{x:!0,y:!0,width:!0,height:!0});B.prototype.assign=function(a){this.L=a.L;this.M=a.M;this.Ia=a.Ia;this.Ha=a.Ha};function xb(a,b,c){a.Ia=b;a.Ha=c}B.prototype.setTo=B.prototype.n=function(a,b,c,d){v&&(D.h(a,"number",B,"setTo:x"),D.h(b,"number",B,"setTo:y"),D.h(c,"number",B,"setTo:w"),D.h(d,"number",B,"setTo:h"),0>c&&D.ua(c,">= 0",B,"setTo:w"),0>d&&D.ua(d,">= 0",B,"setTo:h"));this.L=a;this.M=b;this.Ia=c;this.Ha=d;return this}; -B.prototype.set=B.prototype.set=function(a){v&&D.l(a,B,B,"set:r");this.Ra();this.L=a.L;this.M=a.M;this.Ia=a.Ia;this.Ha=a.Ha;return this};B.prototype.setPoint=B.prototype.fh=function(a){v&&D.l(a,O,B,"setPoint:p");this.Ra();this.L=a.L;this.M=a.M;return this};B.prototype.setSize=function(a){v&&D.l(a,Ca,B,"setSize:s");this.Ra();this.Ia=a.Ia;this.Ha=a.Ha;return this};B.prototype.copy=function(){var a=new B;a.L=this.L;a.M=this.M;a.Ia=this.Ia;a.Ha=this.Ha;return a};f=B.prototype; -f.Na=function(){this.J=!0;Object.freeze(this);return this};f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Ra=function(a){if(this.J){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; +a+", "+b+", "+c+", "+d);this.J=!1}D.ja("Rect",B);D.Ai(B);D.ke(B,{x:!0,y:!0,width:!0,height:!0});B.prototype.assign=function(a){this.L=a.L;this.M=a.M;this.Ia=a.Ia;this.Ha=a.Ha};function xb(a,b,c){a.Ia=b;a.Ha=c}B.prototype.setTo=B.prototype.n=function(a,b,c,d){v&&(D.h(a,"number",B,"setTo:x"),D.h(b,"number",B,"setTo:y"),D.h(c,"number",B,"setTo:w"),D.h(d,"number",B,"setTo:h"),0>c&&D.ua(c,">= 0",B,"setTo:w"),0>d&&D.ua(d,">= 0",B,"setTo:h"));this.L=a;this.M=b;this.Ia=c;this.Ha=d;return this}; +B.prototype.set=B.prototype.set=function(a){v&&D.l(a,B,B,"set:r");this.Qa();this.L=a.L;this.M=a.M;this.Ia=a.Ia;this.Ha=a.Ha;return this};B.prototype.setPoint=B.prototype.fh=function(a){v&&D.l(a,O,B,"setPoint:p");this.Qa();this.L=a.L;this.M=a.M;return this};B.prototype.setSize=function(a){v&&D.l(a,Ca,B,"setSize:s");this.Qa();this.Ia=a.Ia;this.Ha=a.Ha;return this};B.prototype.copy=function(){var a=new B;a.L=this.L;a.M=this.M;a.Ia=this.Ia;a.Ha=this.Ha;return a};f=B.prototype; +f.Na=function(){this.J=!0;Object.freeze(this);return this};f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Qa=function(a){if(this.J){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; B.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));for(var h=0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new B(c,e,g,h)}return new B};B.stringify=function(a){v&&D.l(a,B);return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}; B.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};B.prototype.equals=B.prototype.P=function(a){return a instanceof B?this.L===a.x&&this.M===a.y&&this.Ia===a.width&&this.Ha===a.height:!1};B.prototype.equalTo=B.prototype.Gx=function(a,b,c,d){return this.L===a&&this.M===b&&this.Ia===c&&this.Ha===d};B.prototype.equalsApprox=B.prototype.Tc=function(a){return Q(this.L,a.x)&&Q(this.M,a.y)&&Q(this.Ia,a.width)&&Q(this.Ha,a.height)}; function yb(a,b){return zb(a.L,b.x)&&zb(a.M,b.y)&&zb(a.Ia,b.width)&&zb(a.Ha,b.height)}B.prototype.containsPoint=B.prototype.Oa=function(a){v&&D.l(a,O,B,"containsPoint:p");return this.L<=a.x&&this.L+this.Ia>=a.x&&this.M<=a.y&&this.M+this.Ha>=a.y};B.prototype.containsRect=B.prototype.Nk=function(a){v&&D.l(a,B,B,"containsRect:r");return this.L<=a.x&&a.x+a.width<=this.L+this.Ia&&this.M<=a.y&&a.y+a.height<=this.M+this.Ha}; -B.prototype.contains=B.prototype.contains=function(a,b,c,d){v?(D.p(a,B,"contains:x"),D.p(b,B,"contains:y"),void 0===c?c=0:D.p(c,B,"contains:w"),void 0===d?d=0:D.p(d,B,"contains:h"),(0>c||0>d)&&D.k("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.L<=a&&a+c<=this.L+this.Ia&&this.M<=b&&b+d<=this.M+this.Ha};B.prototype.reset=function(){this.Ra();this.Ha=this.Ia=this.M=this.L=0}; -B.prototype.offset=B.prototype.offset=function(a,b){v&&(D.p(a,B,"offset:dx"),D.p(b,B,"offset:dy"));this.Ra();this.L+=a;this.M+=b;return this};B.prototype.inflate=B.prototype.Ff=function(a,b){v&&(D.p(a,B,"inflate:w"),D.p(b,B,"inflate:h"));return Db(this,b,a,b,a)};B.prototype.addMargin=B.prototype.kx=function(a){v&&D.l(a,Ib,B,"addMargin:m");return Db(this,a.top,a.right,a.bottom,a.left)}; -B.prototype.subtractMargin=B.prototype.rK=function(a){v&&D.l(a,Ib,B,"subtractMargin:m");return Db(this,-a.top,-a.right,-a.bottom,-a.left)};B.prototype.grow=function(a,b,c,d){v&&(D.p(a,B,"grow:t"),D.p(b,B,"grow:r"),D.p(c,B,"grow:b"),D.p(d,B,"grow:l"));return Db(this,a,b,c,d)};function Db(a,b,c,d,e){a.Ra();var g=a.Ia;c+e<=-g?(a.L+=g/2,a.Ia=0):(a.L-=e,a.Ia+=c+e);c=a.Ha;b+d<=-c?(a.M+=c/2,a.Ha=0):(a.M-=b,a.Ha+=b+d);return a} +B.prototype.contains=B.prototype.contains=function(a,b,c,d){v?(D.p(a,B,"contains:x"),D.p(b,B,"contains:y"),void 0===c?c=0:D.p(c,B,"contains:w"),void 0===d?d=0:D.p(d,B,"contains:h"),(0>c||0>d)&&D.k("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.L<=a&&a+c<=this.L+this.Ia&&this.M<=b&&b+d<=this.M+this.Ha};B.prototype.reset=function(){this.Qa();this.Ha=this.Ia=this.M=this.L=0}; +B.prototype.offset=B.prototype.offset=function(a,b){v&&(D.p(a,B,"offset:dx"),D.p(b,B,"offset:dy"));this.Qa();this.L+=a;this.M+=b;return this};B.prototype.inflate=B.prototype.Ff=function(a,b){v&&(D.p(a,B,"inflate:w"),D.p(b,B,"inflate:h"));return Db(this,b,a,b,a)};B.prototype.addMargin=B.prototype.kx=function(a){v&&D.l(a,Ib,B,"addMargin:m");return Db(this,a.top,a.right,a.bottom,a.left)}; +B.prototype.subtractMargin=B.prototype.sK=function(a){v&&D.l(a,Ib,B,"subtractMargin:m");return Db(this,-a.top,-a.right,-a.bottom,-a.left)};B.prototype.grow=function(a,b,c,d){v&&(D.p(a,B,"grow:t"),D.p(b,B,"grow:r"),D.p(c,B,"grow:b"),D.p(d,B,"grow:l"));return Db(this,a,b,c,d)};function Db(a,b,c,d,e){a.Qa();var g=a.Ia;c+e<=-g?(a.L+=g/2,a.Ia=0):(a.L-=e,a.Ia+=c+e);c=a.Ha;b+d<=-c?(a.M+=c/2,a.Ha=0):(a.M-=b,a.Ha+=b+d);return a} B.prototype.intersectRect=function(a){v&&D.l(a,B,B,"intersectRect:r");return Lb(this,a.x,a.y,a.width,a.height)};B.prototype.intersect=B.prototype.KF=function(a,b,c,d){v&&(D.p(a,B,"intersect:x"),D.p(b,B,"intersect:y"),D.p(c,B,"intersect:w"),D.p(d,B,"intersect:h"),(0>c||0>d)&&D.k("Rect.intersect:Width and height cannot be negative"));return Lb(this,a,b,c,d)}; -function Lb(a,b,c,d,e){a.Ra();var g=Math.max(a.L,b),h=Math.max(a.M,c);b=Math.min(a.L+a.Ia,b+d);c=Math.min(a.M+a.Ha,c+e);a.L=g;a.M=h;a.Ia=Math.max(0,b-g);a.Ha=Math.max(0,c-h);return a}B.prototype.intersectsRect=B.prototype.fg=function(a){v&&D.l(a,B,B,"intersectsRect:r");return this.LF(a.x,a.y,a.width,a.height)}; +function Lb(a,b,c,d,e){a.Qa();var g=Math.max(a.L,b),h=Math.max(a.M,c);b=Math.min(a.L+a.Ia,b+d);c=Math.min(a.M+a.Ha,c+e);a.L=g;a.M=h;a.Ia=Math.max(0,b-g);a.Ha=Math.max(0,c-h);return a}B.prototype.intersectsRect=B.prototype.fg=function(a){v&&D.l(a,B,B,"intersectsRect:r");return this.LF(a.x,a.y,a.width,a.height)}; B.prototype.intersects=B.prototype.LF=function(a,b,c,d){v&&(D.p(a,B,"intersects:x"),D.p(b,B,"intersects:y"),D.p(a,B,"intersects:w"),D.p(b,B,"intersects:h"),(0>c||0>d)&&D.k("Rect.intersects:Width and height cannot be negative"));var e=this.Ia,g=this.L;if(Infinity!==e&&Infinity!==c&&(e+=g,c+=a,isNaN(c)||isNaN(e)||g>c||a>e))return!1;a=this.Ha;c=this.M;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0}; -function Mb(a,b){var c=a.Ia,d=b.width+10+10,e=a.L,g=b.x-10;if(e>d+g||g>c+e)return!1;c=a.Ha;d=b.height+10+10;e=a.M;g=b.y-10;return e>d+g||g>c+e?!1:!0}B.prototype.unionPoint=B.prototype.Ki=function(a){v&&D.l(a,O,B,"unionPoint:p");return Pb(this,a.x,a.y,0,0)};B.prototype.unionRect=B.prototype.Xh=function(a){v&&D.l(a,B,B,"unionRect:r");return Pb(this,a.L,a.M,a.Ia,a.Ha)}; -B.prototype.union=B.prototype.jH=function(a,b,c,d){this.Ra();v?(D.p(a,B,"union:x"),D.p(b,B,"union:y"),void 0===c?c=0:D.p(c,B,"union:w"),void 0===d?d=0:D.p(d,B,"union:h"),(0>c||0>d)&&D.k("Rect.union:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return Pb(this,a,b,c,d)};function Pb(a,b,c,d,e){var g=Math.min(a.L,b),h=Math.min(a.M,c);b=Math.max(a.L+a.Ia,b+d);c=Math.max(a.M+a.Ha,c+e);a.L=g;a.M=h;a.Ia=b-g;a.Ha=c-h;return a} -B.prototype.setSpot=B.prototype.av=function(a,b,c){v&&(D.p(a,B,"setSpot:x"),D.p(b,B,"setSpot:y"),D.l(c,R,B,"setSpot:spot"));this.Ra();this.L=a-c.offsetX-c.x*this.Ia;this.M=b-c.offsetY-c.y*this.Ha;return this};var Qb; +function Mb(a,b){var c=a.Ia,d=b.width+10+10,e=a.L,g=b.x-10;if(e>d+g||g>c+e)return!1;c=a.Ha;d=b.height+10+10;e=a.M;g=b.y-10;return e>d+g||g>c+e?!1:!0}B.prototype.unionPoint=B.prototype.Ji=function(a){v&&D.l(a,O,B,"unionPoint:p");return Pb(this,a.x,a.y,0,0)};B.prototype.unionRect=B.prototype.Wh=function(a){v&&D.l(a,B,B,"unionRect:r");return Pb(this,a.L,a.M,a.Ia,a.Ha)}; +B.prototype.union=B.prototype.jH=function(a,b,c,d){this.Qa();v?(D.p(a,B,"union:x"),D.p(b,B,"union:y"),void 0===c?c=0:D.p(c,B,"union:w"),void 0===d?d=0:D.p(d,B,"union:h"),(0>c||0>d)&&D.k("Rect.union:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return Pb(this,a,b,c,d)};function Pb(a,b,c,d,e){var g=Math.min(a.L,b),h=Math.min(a.M,c);b=Math.max(a.L+a.Ia,b+d);c=Math.max(a.M+a.Ha,c+e);a.L=g;a.M=h;a.Ia=b-g;a.Ha=c-h;return a} +B.prototype.setSpot=B.prototype.av=function(a,b,c){v&&(D.p(a,B,"setSpot:x"),D.p(b,B,"setSpot:y"),D.l(c,R,B,"setSpot:spot"));this.Qa();this.L=a-c.offsetX-c.x*this.Ia;this.M=b-c.offsetY-c.y*this.Ha;return this};var Qb; B.contains=Qb=function(a,b,c,d,e,g,h,k){v?(D.p(a,B,"contains:rx"),D.p(b,B,"contains:ry"),D.p(c,B,"contains:rw"),D.p(d,B,"contains:rh"),D.p(e,B,"contains:x"),D.p(g,B,"contains:y"),void 0===h?h=0:D.p(h,B,"contains:w"),void 0===k?k=0:D.p(k,B,"contains:h"),(0>c||0>d||0>h||0>k)&&D.k("Rect.contains:Width and height cannot be negative")):(void 0===h&&(h=0),void 0===k&&(k=0));return a<=e&&e+h<=a+c&&b<=g&&g+k<=b+d}; -B.intersects=function(a,b,c,d,e,g,h,k){v&&(D.p(a,B,"intersects:rx"),D.p(b,B,"intersects:ry"),D.p(c,B,"intersects:rw"),D.p(d,B,"intersects:rh"),D.p(e,B,"intersects:x"),D.p(g,B,"intersects:y"),D.p(h,B,"intersects:w"),D.p(k,B,"intersects:h"),(0>c||0>d||0>h||0>k)&&D.k("Rect.intersects:Width and height cannot be negative"));c+=a;h+=e;if(a>h||e>c)return!1;a=d+b;k+=g;return b>k||g>a?!1:!0};D.defineProperty(B,{x:"x"},function(){return this.L},function(a){this.Ra(a);v&&D.h(a,"number",B,"x");this.L=a}); -D.defineProperty(B,{y:"y"},function(){return this.M},function(a){this.Ra(a);v&&D.h(a,"number",B,"y");this.M=a});D.defineProperty(B,{width:"width"},function(){return this.Ia},function(a){this.Ra(a);v&&D.h(a,"number",B,"width");0>a&&D.ua(a,">= 0",B,"width");this.Ia=a});D.defineProperty(B,{height:"height"},function(){return this.Ha},function(a){this.Ra(a);v&&D.h(a,"number",B,"height");0>a&&D.ua(a,">= 0",B,"height");this.Ha=a}); -D.defineProperty(B,{left:"left"},function(){return this.L},function(a){this.Ra(a);v&&D.h(a,"number",B,"left");this.L=a});D.defineProperty(B,{top:"top"},function(){return this.M},function(a){this.Ra(a);v&&D.h(a,"number",B,"top");this.M=a});D.defineProperty(B,{right:"right"},function(){return this.L+this.Ia},function(a){this.Ra(a);v&&D.p(a,B,"right");this.L+=a-(this.L+this.Ia)}); -D.defineProperty(B,{bottom:"bottom"},function(){return this.M+this.Ha},function(a){this.Ra(a);v&&D.p(a,B,"top");this.M+=a-(this.M+this.Ha)});D.defineProperty(B,{position:"position"},function(){return new O(this.L,this.M)},function(a){this.Ra(a);v&&D.l(a,O,B,"position");this.L=a.x;this.M=a.y});D.defineProperty(B,{size:"size"},function(){return new Ca(this.Ia,this.Ha)},function(a){this.Ra(a);v&&D.l(a,Ca,B,"size");this.Ia=a.width;this.Ha=a.height}); -D.defineProperty(B,{cm:"center"},function(){return new O(this.L+this.Ia/2,this.M+this.Ha/2)},function(a){this.Ra(a);v&&D.l(a,O,B,"center");this.L=a.x-this.Ia/2;this.M=a.y-this.Ha/2});D.defineProperty(B,{oa:"centerX"},function(){return this.L+this.Ia/2},function(a){this.Ra(a);v&&D.p(a,B,"centerX");this.L=a-this.Ia/2});D.defineProperty(B,{va:"centerY"},function(){return this.M+this.Ha/2},function(a){this.Ra(a);v&&D.p(a,B,"centerY");this.M=a-this.Ha/2}); +B.intersects=function(a,b,c,d,e,g,h,k){v&&(D.p(a,B,"intersects:rx"),D.p(b,B,"intersects:ry"),D.p(c,B,"intersects:rw"),D.p(d,B,"intersects:rh"),D.p(e,B,"intersects:x"),D.p(g,B,"intersects:y"),D.p(h,B,"intersects:w"),D.p(k,B,"intersects:h"),(0>c||0>d||0>h||0>k)&&D.k("Rect.intersects:Width and height cannot be negative"));c+=a;h+=e;if(a>h||e>c)return!1;a=d+b;k+=g;return b>k||g>a?!1:!0};D.defineProperty(B,{x:"x"},function(){return this.L},function(a){this.Qa(a);v&&D.h(a,"number",B,"x");this.L=a}); +D.defineProperty(B,{y:"y"},function(){return this.M},function(a){this.Qa(a);v&&D.h(a,"number",B,"y");this.M=a});D.defineProperty(B,{width:"width"},function(){return this.Ia},function(a){this.Qa(a);v&&D.h(a,"number",B,"width");0>a&&D.ua(a,">= 0",B,"width");this.Ia=a});D.defineProperty(B,{height:"height"},function(){return this.Ha},function(a){this.Qa(a);v&&D.h(a,"number",B,"height");0>a&&D.ua(a,">= 0",B,"height");this.Ha=a}); +D.defineProperty(B,{left:"left"},function(){return this.L},function(a){this.Qa(a);v&&D.h(a,"number",B,"left");this.L=a});D.defineProperty(B,{top:"top"},function(){return this.M},function(a){this.Qa(a);v&&D.h(a,"number",B,"top");this.M=a});D.defineProperty(B,{right:"right"},function(){return this.L+this.Ia},function(a){this.Qa(a);v&&D.p(a,B,"right");this.L+=a-(this.L+this.Ia)}); +D.defineProperty(B,{bottom:"bottom"},function(){return this.M+this.Ha},function(a){this.Qa(a);v&&D.p(a,B,"top");this.M+=a-(this.M+this.Ha)});D.defineProperty(B,{position:"position"},function(){return new O(this.L,this.M)},function(a){this.Qa(a);v&&D.l(a,O,B,"position");this.L=a.x;this.M=a.y});D.defineProperty(B,{size:"size"},function(){return new Ca(this.Ia,this.Ha)},function(a){this.Qa(a);v&&D.l(a,Ca,B,"size");this.Ia=a.width;this.Ha=a.height}); +D.defineProperty(B,{cm:"center"},function(){return new O(this.L+this.Ia/2,this.M+this.Ha/2)},function(a){this.Qa(a);v&&D.l(a,O,B,"center");this.L=a.x-this.Ia/2;this.M=a.y-this.Ha/2});D.defineProperty(B,{oa:"centerX"},function(){return this.L+this.Ia/2},function(a){this.Qa(a);v&&D.p(a,B,"centerX");this.L=a-this.Ia/2});D.defineProperty(B,{va:"centerY"},function(){return this.M+this.Ha/2},function(a){this.Qa(a);v&&D.p(a,B,"centerY");this.M=a-this.Ha/2}); B.prototype.isReal=B.prototype.F=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};B.prototype.isEmpty=function(){return 0===this.width&&0===this.height}; -function Ib(a,b,c,d){void 0===a?this.uh=this.nh=this.Dh=this.Eh=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(d=b,this.top=a,this.right=b,this.bottom=a,this.left=d):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):D.k("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this.J=!1}D.ja("Margin",Ib);D.Bi(Ib);D.ke(Ib,{top:!0,right:!0,bottom:!0,left:!0});Ib.prototype.assign=function(a){this.Eh=a.Eh;this.Dh=a.Dh;this.nh=a.nh;this.uh=a.uh}; -Ib.prototype.setTo=Ib.prototype.n=function(a,b,c,d){v&&(D.h(a,"number",Ib,"setTo:t"),D.h(b,"number",Ib,"setTo:r"),D.h(c,"number",Ib,"setTo:b"),D.h(d,"number",Ib,"setTo:l"));this.Ra();this.Eh=a;this.Dh=b;this.nh=c;this.uh=d;return this};Ib.prototype.set=Ib.prototype.set=function(a){v&&D.l(a,Ib,Ib,"assign:m");this.Ra();this.Eh=a.Eh;this.Dh=a.Dh;this.nh=a.nh;this.uh=a.uh;return this};Ib.prototype.copy=function(){var a=new Ib;a.Eh=this.Eh;a.Dh=this.Dh;a.nh=this.nh;a.uh=this.uh;return a};f=Ib.prototype; -f.Na=function(){this.J=!0;Object.freeze(this);return this};f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Ra=function(a){if(this.J){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; +function Ib(a,b,c,d){void 0===a?this.uh=this.nh=this.Dh=this.Eh=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(d=b,this.top=a,this.right=b,this.bottom=a,this.left=d):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):D.k("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this.J=!1}D.ja("Margin",Ib);D.Ai(Ib);D.ke(Ib,{top:!0,right:!0,bottom:!0,left:!0});Ib.prototype.assign=function(a){this.Eh=a.Eh;this.Dh=a.Dh;this.nh=a.nh;this.uh=a.uh}; +Ib.prototype.setTo=Ib.prototype.n=function(a,b,c,d){v&&(D.h(a,"number",Ib,"setTo:t"),D.h(b,"number",Ib,"setTo:r"),D.h(c,"number",Ib,"setTo:b"),D.h(d,"number",Ib,"setTo:l"));this.Qa();this.Eh=a;this.Dh=b;this.nh=c;this.uh=d;return this};Ib.prototype.set=Ib.prototype.set=function(a){v&&D.l(a,Ib,Ib,"assign:m");this.Qa();this.Eh=a.Eh;this.Dh=a.Dh;this.nh=a.nh;this.uh=a.uh;return this};Ib.prototype.copy=function(){var a=new Ib;a.Eh=this.Eh;a.Dh=this.Dh;a.nh=this.nh;a.uh=this.uh;return a};f=Ib.prototype; +f.Na=function(){this.J=!0;Object.freeze(this);return this};f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Qa=function(a){if(this.J){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}}; Ib.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new Ib;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new Ib(c);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));if(isNaN(g))return new Ib(c,e);for(var h=NaN;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return isNaN(h)?new Ib(c,e):new Ib(c,e,g,h)}return new Ib}; Ib.stringify=function(a){v&&D.l(a,Ib);return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()};Ib.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};Ib.prototype.equals=Ib.prototype.P=function(a){return a instanceof Ib?this.Eh===a.top&&this.Dh===a.right&&this.nh===a.bottom&&this.uh===a.left:!1};Ib.prototype.equalTo=Ib.prototype.Gx=function(a,b,c,d){return this.Eh===a&&this.Dh===b&&this.nh===c&&this.uh===d}; -Ib.prototype.equalsApprox=Ib.prototype.Tc=function(a){return Q(this.Eh,a.top)&&Q(this.Dh,a.right)&&Q(this.nh,a.bottom)&&Q(this.uh,a.left)};D.defineProperty(Ib,{top:"top"},function(){return this.Eh},function(a){this.Ra(a);v&&D.p(a,Ib,"top");this.Eh=a});D.defineProperty(Ib,{right:"right"},function(){return this.Dh},function(a){this.Ra(a);v&&D.p(a,Ib,"right");this.Dh=a});D.defineProperty(Ib,{bottom:"bottom"},function(){return this.nh},function(a){this.Ra(a);v&&D.p(a,Ib,"bottom");this.nh=a}); -D.defineProperty(Ib,{left:"left"},function(){return this.uh},function(a){this.Ra(a);v&&D.p(a,Ib,"left");this.uh=a});Ib.prototype.isReal=Ib.prototype.F=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function Da(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}D.Bi(Da);D.ke(Da,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0}); +Ib.prototype.equalsApprox=Ib.prototype.Tc=function(a){return Q(this.Eh,a.top)&&Q(this.Dh,a.right)&&Q(this.nh,a.bottom)&&Q(this.uh,a.left)};D.defineProperty(Ib,{top:"top"},function(){return this.Eh},function(a){this.Qa(a);v&&D.p(a,Ib,"top");this.Eh=a});D.defineProperty(Ib,{right:"right"},function(){return this.Dh},function(a){this.Qa(a);v&&D.p(a,Ib,"right");this.Dh=a});D.defineProperty(Ib,{bottom:"bottom"},function(){return this.nh},function(a){this.Qa(a);v&&D.p(a,Ib,"bottom");this.nh=a}); +D.defineProperty(Ib,{left:"left"},function(){return this.uh},function(a){this.Qa(a);v&&D.p(a,Ib,"left");this.uh=a});Ib.prototype.isReal=Ib.prototype.F=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function Da(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}D.Ai(Da);D.ke(Da,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0}); Da.prototype.set=Da.prototype.set=function(a){v&&D.l(a,Da,Da,"set:t");this.m11=a.m11;this.m12=a.m12;this.m21=a.m21;this.m22=a.m22;this.dx=a.dx;this.dy=a.dy;return this};Da.prototype.copy=function(){var a=new Da;a.m11=this.m11;a.m12=this.m12;a.m21=this.m21;a.m22=this.m22;a.dx=this.dx;a.dy=this.dy;return a};Da.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"}; Da.prototype.equals=Da.prototype.P=function(a){return a instanceof Da?this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy:!1};Da.prototype.isIdentity=Da.prototype.xu=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};Da.prototype.reset=Da.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0;return this}; Da.prototype.multiply=Da.prototype.multiply=function(a){v&&D.l(a,Da,Da,"multiply:matrix");var b=this.m12*a.m11+this.m22*a.m12,c=this.m11*a.m21+this.m21*a.m22,d=this.m12*a.m21+this.m22*a.m22,e=this.m11*a.dx+this.m21*a.dy+this.dx,g=this.m12*a.dx+this.m22*a.dy+this.dy;this.m11=this.m11*a.m11+this.m21*a.m12;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=g;return this}; @@ -177,36 +177,36 @@ Da.prototype.multiplyInverted=Da.prototype.pB=function(a){v&&D.l(a,Da,Da,"multip Da.prototype.invert=Da.prototype.Sx=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),b=-this.m12*a,c=-this.m21*a,d=this.m11*a,e=a*(this.m21*this.dy-this.m22*this.dx),g=a*(this.m12*this.dx-this.m11*this.dy);this.m11=this.m22*a;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=g;return this}; Da.prototype.rotate=Da.prototype.rotate=function(a,b,c){v&&(D.p(a,Da,"rotate:angle"),D.p(b,Da,"rotate:rx"),D.p(c,Da,"rotate:ry"));360<=a?a-=360:0>a&&(a+=360);if(0===a)return this;this.translate(b,c);var d=0,e=0;90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(e=a*Math.PI/180,d=Math.cos(e),e=Math.sin(e));a=this.m12*d+this.m22*e;var g=this.m11*-e+this.m21*d,h=this.m12*-e+this.m22*d;this.m11=this.m11*d+this.m21*e;this.m12=a;this.m21=g;this.m22=h;this.translate(-b,-c);return this}; Da.prototype.translate=Da.prototype.translate=function(a,b){v&&(D.p(a,Da,"translate:x"),D.p(b,Da,"translate:y"));this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b;return this};Da.prototype.scale=Da.prototype.scale=function(a,b){void 0===b&&(b=a);v&&(D.p(a,Da,"translate:sx"),D.p(b,Da,"translate:sy"));this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b;return this}; -Da.prototype.transformPoint=Da.prototype.wb=function(a){v&&D.l(a,O,Da,"transformPoint:p");var b=a.L,c=a.M;a.L=b*this.m11+c*this.m21+this.dx;a.M=b*this.m12+c*this.m22+this.dy;return a};Da.prototype.invertedTransformPoint=Da.prototype.Di=function(a){v&&D.l(a,O,Da,"invertedTransformPoint:p");var b=1/(this.m11*this.m22-this.m12*this.m21),c=-this.m12*b,d=this.m11*b,e=b*(this.m12*this.dx-this.m11*this.dy),g=a.L,h=a.M;a.L=g*this.m22*b+h*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.M=g*c+h*d+e;return a}; +Da.prototype.transformPoint=Da.prototype.wb=function(a){v&&D.l(a,O,Da,"transformPoint:p");var b=a.L,c=a.M;a.L=b*this.m11+c*this.m21+this.dx;a.M=b*this.m12+c*this.m22+this.dy;return a};Da.prototype.invertedTransformPoint=Da.prototype.Ci=function(a){v&&D.l(a,O,Da,"invertedTransformPoint:p");var b=1/(this.m11*this.m22-this.m12*this.m21),c=-this.m12*b,d=this.m11*b,e=b*(this.m12*this.dx-this.m11*this.dy),g=a.L,h=a.M;a.L=g*this.m22*b+h*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.M=g*c+h*d+e;return a}; Da.prototype.transformRect=Da.prototype.iH=function(a){v&&D.l(a,B,Da,"transformRect:rect");var b=a.L,c=a.M,d=b+a.Ia,e=c+a.Ha,g=this.m11,h=this.m12,k=this.m21,l=this.m22,m=this.dx,n=this.dy,p=b*g+c*k+m,q=b*h+c*l+n,r=d*g+c*k+m,c=d*h+c*l+n,s=b*g+e*k+m,b=b*h+e*l+n,g=d*g+e*k+m,d=d*h+e*l+n,e=p,h=q,p=Math.min(p,r),e=Math.max(e,r),h=Math.min(h,c),q=Math.max(q,c),p=Math.min(p,s),e=Math.max(e,s),h=Math.min(h,b),q=Math.max(q,b),p=Math.min(p,g),e=Math.max(e,g),h=Math.min(h,d),q=Math.max(q,d);a.L=p;a.M=h;a.Ia= -e-p;a.Ha=q-h;return a};function R(a,b,c,d){void 0===a?this.Lg=this.Kg=this.M=this.L=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this.J=!1}D.ja("Spot",R);D.Bi(R);D.ke(R,{x:!0,y:!0,offsetX:!0,offsetY:!0});R.prototype.assign=function(a){this.L=a.L;this.M=a.M;this.Kg=a.Kg;this.Lg=a.Lg}; -R.prototype.setTo=R.prototype.n=function(a,b,c,d){v&&(Rb(a,"setTo:x"),Rb(b,"setTo:y"),Vb(c,"setTo:offx"),Vb(d,"setTo:offy"));this.Ra();this.L=a;this.M=b;this.Kg=c;this.Lg=d;return this};R.prototype.set=R.prototype.set=function(a){v&&D.l(a,R,R,"set:s");this.Ra();this.L=a.L;this.M=a.M;this.Kg=a.Kg;this.Lg=a.Lg;return this};R.prototype.copy=function(){var a=new R;a.L=this.L;a.M=this.M;a.Kg=this.Kg;a.Lg=this.Lg;return a};f=R.prototype;f.Na=function(){this.J=!0;Object.freeze(this);return this}; -f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Ra=function(a){if(this.J){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}};function Yb(a,b){a.L=NaN;a.M=NaN;a.Kg=b;return a}function Rb(a,b){(isNaN(a)||1a)&&D.ua(a,"0 <= "+b+" <= 1",R,b)} +e-p;a.Ha=q-h;return a};function R(a,b,c,d){void 0===a?this.Lg=this.Kg=this.M=this.L=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d);this.J=!1}D.ja("Spot",R);D.Ai(R);D.ke(R,{x:!0,y:!0,offsetX:!0,offsetY:!0});R.prototype.assign=function(a){this.L=a.L;this.M=a.M;this.Kg=a.Kg;this.Lg=a.Lg}; +R.prototype.setTo=R.prototype.n=function(a,b,c,d){v&&(Rb(a,"setTo:x"),Rb(b,"setTo:y"),Vb(c,"setTo:offx"),Vb(d,"setTo:offy"));this.Qa();this.L=a;this.M=b;this.Kg=c;this.Lg=d;return this};R.prototype.set=R.prototype.set=function(a){v&&D.l(a,R,R,"set:s");this.Qa();this.L=a.L;this.M=a.M;this.Kg=a.Kg;this.Lg=a.Lg;return this};R.prototype.copy=function(){var a=new R;a.L=this.L;a.M=this.M;a.Kg=this.Kg;a.Lg=this.Lg;return a};f=R.prototype;f.Na=function(){this.J=!0;Object.freeze(this);return this}; +f.V=function(){return Object.isFrozen(this)?this:this.copy().freeze()};f.freeze=function(){this.J=!0;return this};f.Ya=function(){Object.isFrozen(this)&&D.k("cannot thaw constant: "+this);this.J=!1;return this};f.Qa=function(a){if(this.J){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);D.k(b)}};function Yb(a,b){a.L=NaN;a.M=NaN;a.Kg=b;return a}function Rb(a,b){(isNaN(a)||1a)&&D.ua(a,"0 <= "+b+" <= 1",R,b)} function Vb(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&D.ua(a,"real number, not NaN or Infinity",R,b)}var Zb; R.parse=Zb=function(a){if("string"===typeof a){a=a.trim();if("None"===a)return cc;if("TopLeft"===a)return dc;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return ec;if("TopRight"===a)return fc;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return gc;if("Center"===a)return hc;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return rc;if("BottomLeft"===a)return sc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return tc;if("BottomRight"===a)return uc;if("TopSide"===a)return vc;if("LeftSide"=== a)return wc;if("RightSide"===a)return xc;if("BottomSide"===a)return Bc;if("TopBottomSides"===a)return Cc;if("LeftRightSides"===a)return Jc;if("TopLeftSides"===a)return Kc;if("TopRightSides"===a)return Lc;if("BottomLeftSides"===a)return Mc;if("BottomRightSides"===a)return Nc;if("NotTopSide"===a)return Oc;if("NotLeftSide"===a)return Pc;if("NotRightSide"===a)return Sc;if("NotBottomSide"===a)return Tc;if("AllSides"===a)return Uc;if("Default"===a)return Vc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; var d=a[b++];void 0!==d&&0=2*Math.PI?(rd(a,b,c,d,e,e+Math.PI,h),rd(a,b,c,d,e+Math.PI,e+2*Math.PI,h),a.path.push(["M",l,g])):(b+=d*Math.cos(e),c+=d*Math.sin(e),k=180*k/Math.PI,e=h?0:1,h=180<=k===!!h?0:1,0!==a.path.length?a.path.push(["L",b,c]):a.path.push(["M",b,c]),a.path.push(["A",d,d,k,h,e,l,g]))}}function qd(a,b,c,d,e,g,h){var k=new jd;k.Zb=[b,c,d,e,g,h];b={};Ad(a,"g",b,k);k=a.addElement("g",b);a.Ef.push(k)} -f.ib=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+D.Gm++,b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,e,g,h;c=pd(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",yM:this.shadowBlur/2});d=pd(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});e=pd(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});g=pd(this,"feOffset",{"in":"comp",result:"offsetBlur", -dx:this.shadowOffsetX,dy:this.shadowOffsetY});h=pd(this,"feMerge",{});h.appendChild(pd(this,"feMergeNode",{"in":"offsetBlur"}));h.appendChild(pd(this,"feMergeNode",{"in":"SourceGraphic"}));b.appendChild(c);b.appendChild(d);b.appendChild(e);b.appendChild(g);b.appendChild(h);0b?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.or?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.or?this.clip():this.fill()}; -f.Wj=function(){this.or||this.stroke()};D.defineProperty(Dd,{dq:"clipInsteadOfFill"},function(){return this.or},function(a){this.or=a});f=Dd.prototype;f.NB=function(a,b,c){this.st=a;this.tt=b;this.Ng=c};f.vo=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};f.wo=function(){this.shadowOffsetX=this.st;this.shadowOffsetY=this.tt;this.shadowBlur=this.Ng}; -f.JA=function(a,b){var c=this.xa;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else if(void 0!==c.mozDash)c.mozDash=a,c.mozDashOffset=b;else return!1;return!0};f.EA=function(){var a=this.xa;void 0!==a.setLineDash?(a.setLineDash(D.Eo),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=D.Eo,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0)}; +f.transform=function(a,b,c,d,e,g){1===a&&0===b&&0===c&&1===d&&0===e&&0===g||this.xa.transform(a,b,c,d,e,g)};f.translate=function(a,b){this.xa.translate(a,b)};f.Wg=function(a){if(a instanceof Ba&&a.type===Ed){var b=a.No;a=a.jz;a>b?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.or?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.or?this.clip():this.fill()}; +f.Wj=function(){this.or||this.stroke()};D.defineProperty(Dd,{cq:"clipInsteadOfFill"},function(){return this.or},function(a){this.or=a});f=Dd.prototype;f.NB=function(a,b,c){this.st=a;this.tt=b;this.Ng=c};f.uo=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};f.vo=function(){this.shadowOffsetX=this.st;this.shadowOffsetY=this.tt;this.shadowBlur=this.Ng}; +f.JA=function(a,b){var c=this.xa;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else if(void 0!==c.mozDash)c.mozDash=a,c.mozDashOffset=b;else return!1;return!0};f.EA=function(){var a=this.xa;void 0!==a.setLineDash?(a.setLineDash(D.Do),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=D.Do,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0)}; f.Be=function(a){a&&(this.ez="");this.dz=this.fz=""}; var Fd=(Math.sqrt(2)-1)/3*4,Gd=(new O(0,0)).Na(),Hd=(new B(0,0,0,0)).Na(),Sd=(new Ib(0,0,0,0)).Na(),Td=(new Ib(2,2,2,2)).Na(),Ud=(new O(6,6)).Na(),Vd=(new O(-Infinity,-Infinity)).Na(),Wd=(new O(Infinity,Infinity)).Na(),Xd=(new Ca(0,0)).Na(),Yd=(new Ca(1,1)).Na(),Zd=(new Ca(6,6)).Na(),$d=(new Ca(8,8)).Na(),ae=(new Ca(10,10)).Na(),he=(new Ca(Infinity,Infinity)).Na(),ie=(new O(NaN,NaN)).Na(),je=(new Ca(NaN,NaN)).Na(),ke=(new B(NaN,NaN,NaN,NaN)).Na(),le=(new R(.156,.156)).Na(),me=(new R(.844,.844)).Na(), ne=new la,oe=new la,pe=null;function qe(a){if(0>=a)return 0;var b=pe;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);pe=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)}function Q(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8c,g=0>d,h=0,k=h=0;ag;++g){m=.5*(d+e);if(m===d||m===e)break;k=l/(m+b);h=c/(m+a);k=k*k+h*h-1;if(0k)e=m;else break}n=b*n/(m+b)-n;p=a*p/(m+a)-p;a=Math.sqrt(n*n+p*p)}else a=Math.abs(p-m);else p=l*l-m*m,a=l*n,a=u-1?!0:null!==l[m+1].match(/[A- break;case "C":for(;!c();){var N=e(),H=h(),A=g();V(t,N.x,N.y,H.x,H.y,A.x,A.y)}break;case "S":for(;!c();)N=k(),H=h(),A=g(),V(t,N.x,N.y,H.x,H.y,A.x,A.y);break;case "Q":for(;!c();)H=h(),A=g(),xf(t,H.x,H.y,A.x,A.y);break;case "T":for(;!c();)r=H=k(),A=g(),xf(t,H.x,H.y,A.x,A.y);break;case "B":for(;!c();){var A=parseFloat(d()),N=parseFloat(d()),H=parseFloat(d()),W=parseFloat(d()),fa=parseFloat(d()),S=fa,ba=!1;c()||(S=parseFloat(d()),c()||(ba=0!==parseFloat(d())));n===n.toLowerCase()&&(H+=s.x,W+=s.y);t.arcTo(A, N,H,W,fa,S,ba)}break;case "A":for(;!c();)N=Math.abs(parseFloat(d())),H=Math.abs(parseFloat(d())),W=parseFloat(d()),fa=!!parseFloat(d()),S=!!parseFloat(d()),A=g(),yf(t,N,H,W,fa,S,A.x,A.y);break;case "Z":A=t.q.lc.o[t.q.lc.length-1];X(t);s=q;break;case "F":A="";for(N=1;l[m+N];)if(null!==l[m+N].match(/[Uu]/))N++;else if(null===l[m+N].match(/[A-Za-z]/))N++;else{A=l[m+N];break}A.match(/[Mm]/)?y=!0:zf(t);break;case "U":A="";for(N=1;l[m+N];)if(null!==l[m+N].match(/[Ff]/))N++;else if(null===l[m+N].match(/[A-Za-z]/))N++; else{A=l[m+N];break}A.match(/[Mm]/)?w=!0:t.ib(!1)}q=t.q;D.u(t);if(b)for(t=q.lc.j;t.next();)A=t.value,A.wu=!0;return q};function Af(a,b){for(var c=a.length,d=D.O(),e=0;eh&&(h+=360),s.Le+=h);0>a&&(s.Le=180-s.Le,s.yf=-s.yf);0>d&&(s.Le=-s.Le,s.yf=-s.yf);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case Qf:h=s.H;k=s.I;s.H=h* -a+k*c+e;s.I=h*b+k*d+g;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.Zj+=h);0>a&&(s.Zj=180-s.Zj,s.sm=!s.sm);0>d&&(s.Zj=-s.Zj,s.sm=!s.sm);s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:D.k("Unknown Segment type: "+s.type)}}}}this.lb=!0;return this}; -Ye.prototype.Oa=function(a,b,c,d){var e=a.x,g=a.y,h=this.mb.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.lc.o,s=r.length,u=0;uh&&(h+=360),s.Le+=h);0>a&&(s.Le=180-s.Le,s.yf=-s.yf);0>d&&(s.Le=-s.Le,s.yf=-s.yf);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case Qf:h=s.H;k=s.I;s.H=h* +a+k*c+e;s.I=h*b+k*d+g;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.Zj+=h);0>a&&(s.Zj=180-s.Zj,s.tm=!s.tm);0>d&&(s.Zj=-s.Zj,s.tm=!s.tm);s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:D.k("Unknown Segment type: "+s.type)}}}}this.lb=!0;return this}; +Ye.prototype.Oa=function(a,b,c,d){var e=a.x,g=a.y,h=this.mb.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.lc.o,s=r.length,u=0;u=a)return 0;if((e>h?e-h:h-e)<(g>k?g-k:k-g)){if(e=a=0,ge)return 0}else if(ee)return 0;return 0a?a=0:1=g)return d=(g-h)/p,c=c[k],k=c[2*n],e=c[2*n+1],b.n(k+(c[2*n+2]-k)*d,e+(c[2*n+3]-e)*d),b;h+=p}b.n(NaN,NaN);return b}; Ye.prototype.getFractionForPoint=Ye.prototype.MI=function(a){if(this.type===qf){var b=this.ma,c=this.ka,d=this.H,e=this.I;if(b!==d||c!==e){var g=a.x;a=a.y;var h=0,k=0;return b===d?(c=k?k===c?0:1:Math.abs(a-c)/(k-h)):c===e?(b=k?k===b?0:1:Math.abs(g-b)/(k-h)):((g-b)*(g-b)+(a-c)*(a-c))/((d-b)*(d-b)+(e-c)*(e-c))}}else if(this.type===rf){if(b=this.ma,c=this.ka,d=this.H,e=this.I,b!==d||c!==e){var h=d-b,k=e-c,l=2*h+2*k,g=a.x; a=a.y;g=Math.min(Math.max(g,b),d);a=Math.min(Math.max(a,c),e);var b=Math.abs(g-b),d=Math.abs(g-d),c=Math.abs(a-c),e=Math.abs(a-e),m=Math.min(b,d,c,e);if(m===c)return g/l;if(m===d)return(h+a)/l;if(m===e)return(2*h+k-g)/l;if(m===b)return(2*h+2*k-a)/l}}else{for(var e=this.MA,h=this.Mx,k=this.Nx,l=D.O(),c=Infinity,b=d=0,g=e.length,n=m=0,p=0;pa?0:1a?0:1a?"M"+this.ma.toString()+" "+this.ka.toString():"M"+this.ma.toFixed(a)+" "+this.ka.toFixed(a),c=this.Db.o,d=c.length,e=0;ea&&(a+=360),this.Pd=a,this.df=0,v&&D.p(d,Wf,"x1"),this.Ch=Math.max(d,0),v&&D.p(e,Wf,"y1"),this.Mg=Math.max(e,0),this.vp="boolean"===typeof h?!!h:!1,this.Mo=!!k):(v&&D.p(d,Wf,"x1"),this.Pd=d,v&&D.p(e, -Wf,"y1"),this.df=e,v&&D.p(g,Wf,"x2"),a===Pf&&(g=Math.max(g,0)),this.Ch=g,"number"===typeof h?(a===Pf&&(h=Math.max(h,0)),this.Mg=h):this.Mg=0,this.Mo=this.vp=!1);this.fi=!1;this.lb=!0;this.vg=null}D.ja("PathSegment",Wf);D.Bi(Wf);Wf.prototype.copy=function(){var a=new Wf;a.ca=this.ca;a.Ab=this.Ab;a.Ib=this.Ib;a.Pd=this.Pd;a.df=this.df;a.Ch=this.Ch;a.Mg=this.Mg;a.vp=this.vp;a.Mo=this.Mo;a.fi=this.fi;a.lb=this.lb;return a}; -Wf.prototype.equalsApprox=Wf.prototype.Tc=function(a){if(!(a instanceof Wf)||this.type!==a.type||this.Tx!==a.Tx)return!1;switch(this.type){case Cf:case uf:return Q(this.H,a.H)&&Q(this.I,a.I);case Df:return Q(this.H,a.H)&&Q(this.I,a.I)&&Q(this.Bc,a.Bc)&&Q(this.Xc,a.Xc)&&Q(this.Sh,a.Sh)&&Q(this.Th,a.Th);case Of:return Q(this.H,a.H)&&Q(this.I,a.I)&&Q(this.Bc,a.Bc)&&Q(this.Xc,a.Xc);case Pf:return Q(this.Le,a.Le)&&Q(this.yf,a.yf)&&Q(this.oa,a.oa)&&Q(this.va,a.va)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY, -a.radiusY);case Qf:return this.sm===a.sm&&this.Yx===a.Yx&&Q(this.Zj,a.Zj)&&Q(this.H,a.H)&&Q(this.I,a.I)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY,a.radiusY);default:return!1}};Wf.prototype.oc=function(a){a.Ne===Wf?this.type=a:D.Xj(this,a)}; -Wf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Cf:b=0>a?"M"+this.H.toString()+" "+this.I.toString():"M"+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case uf:b=0>a?"L"+this.H.toString()+" "+this.I.toString():"L"+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Df:b=0>a?"C"+this.Bc.toString()+" "+this.Xc.toString()+" "+this.Sh.toString()+" "+this.Th.toString()+" "+this.H.toString()+" "+this.I.toString():"C"+this.Bc.toFixed(a)+" "+this.Xc.toFixed(a)+" "+this.Sh.toFixed(a)+ -" "+this.Th.toFixed(a)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Of:b=0>a?"Q"+this.Bc.toString()+" "+this.Xc.toString()+" "+this.H.toString()+" "+this.I.toString():"Q"+this.Bc.toFixed(a)+" "+this.Xc.toFixed(a)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Pf:b=0>a?"B"+this.Le.toString()+" "+this.yf.toString()+" "+this.oa.toString()+" "+this.va.toString()+" "+this.radiusX:"B"+this.Le.toFixed(a)+" "+this.yf.toFixed(a)+" "+this.oa.toFixed(a)+" "+this.va.toFixed(a)+" "+this.radiusX; -break;case Qf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Zj.toString()+" "+(this.Yx?1:0)+" "+(this.sm?1:0)+" "+this.H.toString()+" "+this.I.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Zj.toFixed(a)+" "+(this.Yx?1:0)+" "+(this.sm?1:0)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;default:b=this.type.toString()}return b+(this.fi?"z":"")};var Cf;Wf.Move=Cf=D.s(Wf,"Move",0);var uf;Wf.Line=uf=D.s(Wf,"Line",1);var Df; -Wf.Bezier=Df=D.s(Wf,"Bezier",2);var Of;Wf.QuadraticBezier=Of=D.s(Wf,"QuadraticBezier",3);var Pf;Wf.Arc=Pf=D.s(Wf,"Arc",4);var Qf;Wf.SvgArc=Qf=D.s(Wf,"SvgArc",4);Wf.prototype.freeze=function(){this.J=!0;return this};Wf.prototype.Ya=function(){this.J=!1;return this};Wf.prototype.close=Wf.prototype.close=function(){this.fi=!0;return this}; +function Wf(a,b,c,d,e,g,h,k){D.uc(this);this.J=!1;void 0===a?a=uf:v&&D.Da(a,Wf,Wf,"constructor:type");this.ca=a;void 0!==b?(v&&D.p(b,Wf,"ex"),this.Ab=b):this.Ab=0;void 0!==c?(v&&D.p(c,Wf,"ey"),this.Ib=c):this.Ib=0;void 0===d&&(d=0);void 0===e&&(e=0);void 0===g&&(g=0);void 0===h&&(h=0);a===Qf?(a=g%360,0>a&&(a+=360),this.Pd=a,this.df=0,v&&D.p(d,Wf,"x1"),this.Ch=Math.max(d,0),v&&D.p(e,Wf,"y1"),this.Mg=Math.max(e,0),this.tp="boolean"===typeof h?!!h:!1,this.Lo=!!k):(v&&D.p(d,Wf,"x1"),this.Pd=d,v&&D.p(e, +Wf,"y1"),this.df=e,v&&D.p(g,Wf,"x2"),a===Pf&&(g=Math.max(g,0)),this.Ch=g,"number"===typeof h?(a===Pf&&(h=Math.max(h,0)),this.Mg=h):this.Mg=0,this.Lo=this.tp=!1);this.ei=!1;this.lb=!0;this.vg=null}D.ja("PathSegment",Wf);D.Ai(Wf);Wf.prototype.copy=function(){var a=new Wf;a.ca=this.ca;a.Ab=this.Ab;a.Ib=this.Ib;a.Pd=this.Pd;a.df=this.df;a.Ch=this.Ch;a.Mg=this.Mg;a.tp=this.tp;a.Lo=this.Lo;a.ei=this.ei;a.lb=this.lb;return a}; +Wf.prototype.equalsApprox=Wf.prototype.Tc=function(a){if(!(a instanceof Wf)||this.type!==a.type||this.Tx!==a.Tx)return!1;switch(this.type){case Cf:case uf:return Q(this.H,a.H)&&Q(this.I,a.I);case Df:return Q(this.H,a.H)&&Q(this.I,a.I)&&Q(this.Bc,a.Bc)&&Q(this.Xc,a.Xc)&&Q(this.Rh,a.Rh)&&Q(this.Sh,a.Sh);case Of:return Q(this.H,a.H)&&Q(this.I,a.I)&&Q(this.Bc,a.Bc)&&Q(this.Xc,a.Xc);case Pf:return Q(this.Le,a.Le)&&Q(this.yf,a.yf)&&Q(this.oa,a.oa)&&Q(this.va,a.va)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY, +a.radiusY);case Qf:return this.tm===a.tm&&this.Yx===a.Yx&&Q(this.Zj,a.Zj)&&Q(this.H,a.H)&&Q(this.I,a.I)&&Q(this.radiusX,a.radiusX)&&Q(this.radiusY,a.radiusY);default:return!1}};Wf.prototype.oc=function(a){a.Ne===Wf?this.type=a:D.Xj(this,a)}; +Wf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Cf:b=0>a?"M"+this.H.toString()+" "+this.I.toString():"M"+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case uf:b=0>a?"L"+this.H.toString()+" "+this.I.toString():"L"+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Df:b=0>a?"C"+this.Bc.toString()+" "+this.Xc.toString()+" "+this.Rh.toString()+" "+this.Sh.toString()+" "+this.H.toString()+" "+this.I.toString():"C"+this.Bc.toFixed(a)+" "+this.Xc.toFixed(a)+" "+this.Rh.toFixed(a)+ +" "+this.Sh.toFixed(a)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Of:b=0>a?"Q"+this.Bc.toString()+" "+this.Xc.toString()+" "+this.H.toString()+" "+this.I.toString():"Q"+this.Bc.toFixed(a)+" "+this.Xc.toFixed(a)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;case Pf:b=0>a?"B"+this.Le.toString()+" "+this.yf.toString()+" "+this.oa.toString()+" "+this.va.toString()+" "+this.radiusX:"B"+this.Le.toFixed(a)+" "+this.yf.toFixed(a)+" "+this.oa.toFixed(a)+" "+this.va.toFixed(a)+" "+this.radiusX; +break;case Qf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Zj.toString()+" "+(this.Yx?1:0)+" "+(this.tm?1:0)+" "+this.H.toString()+" "+this.I.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Zj.toFixed(a)+" "+(this.Yx?1:0)+" "+(this.tm?1:0)+" "+this.H.toFixed(a)+" "+this.I.toFixed(a);break;default:b=this.type.toString()}return b+(this.ei?"z":"")};var Cf;Wf.Move=Cf=D.s(Wf,"Move",0);var uf;Wf.Line=uf=D.s(Wf,"Line",1);var Df; +Wf.Bezier=Df=D.s(Wf,"Bezier",2);var Of;Wf.QuadraticBezier=Of=D.s(Wf,"QuadraticBezier",3);var Pf;Wf.Arc=Pf=D.s(Wf,"Arc",4);var Qf;Wf.SvgArc=Qf=D.s(Wf,"SvgArc",4);Wf.prototype.freeze=function(){this.J=!0;return this};Wf.prototype.Ya=function(){this.J=!1;return this};Wf.prototype.close=Wf.prototype.close=function(){this.ei=!0;return this}; function Rf(a,b){if(null!==a.vg&&!1===b.lb)return a.vg;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.vg=[],a.vg;var e=a.Pd,g=a.df,h=Ve(c=r?h=Math.PI:1<=r&&(h=0);!l&&0h&&(h+=2*Math.PI);l=b>g?1:b/g;r=b>g?g/b:1;b=Ve(b>g?b:g,n,n+h,!0);g=D.Pf();g.reset();g.translate(c,d);g.rotate(a.Pd,0,0);g.scale(l,r);Af(b,g);D.He(g);a.vg=b;return a.vg} -D.defineProperty(Wf,{Tx:"isClosed"},function(){return this.fi},function(a){this.fi!==a&&(this.fi=a,this.lb=!0)});D.defineProperty(Wf,{type:"type"},function(){return this.ca},function(a){v&&D.Da(a,Wf,Wf,"type");this.J&&D.pa(this,a);this.ca=a;this.lb=!0});D.defineProperty(Wf,{H:"endX"},function(){return this.Ab},function(a){v&&D.p(a,Wf,"endX");this.J&&D.pa(this,a);this.Ab=a;this.lb=!0}); +D.defineProperty(Wf,{Tx:"isClosed"},function(){return this.ei},function(a){this.ei!==a&&(this.ei=a,this.lb=!0)});D.defineProperty(Wf,{type:"type"},function(){return this.ca},function(a){v&&D.Da(a,Wf,Wf,"type");this.J&&D.pa(this,a);this.ca=a;this.lb=!0});D.defineProperty(Wf,{H:"endX"},function(){return this.Ab},function(a){v&&D.p(a,Wf,"endX");this.J&&D.pa(this,a);this.Ab=a;this.lb=!0}); D.defineProperty(Wf,{I:"endY"},function(){return this.Ib},function(a){v&&D.p(a,Wf,"endY");this.J&&D.pa(this,a);this.Ib=a;this.lb=!0});D.defineProperty(Wf,{Bc:"point1X"},function(){return this.Pd},function(a){v&&D.p(a,Wf,"point1X");this.J&&D.pa(this,a);this.Pd=a;this.lb=!0});D.defineProperty(Wf,{Xc:"point1Y"},function(){return this.df},function(a){v&&D.p(a,Wf,"point1Y");this.J&&D.pa(this,a);this.df=a;this.lb=!0}); -D.defineProperty(Wf,{Sh:"point2X"},function(){return this.Ch},function(a){v&&D.p(a,Wf,"point2X");this.J&&D.pa(this,a);this.Ch=a;this.lb=!0});D.defineProperty(Wf,{Th:"point2Y"},function(){return this.Mg},function(a){v&&D.p(a,Wf,"point2Y");this.J&&D.pa(this,a);this.Mg=a;this.lb=!0});D.defineProperty(Wf,{oa:"centerX"},function(){return this.Pd},function(a){v&&D.p(a,Wf,"centerX");this.J&&D.pa(this,a);this.Pd=a;this.lb=!0}); +D.defineProperty(Wf,{Rh:"point2X"},function(){return this.Ch},function(a){v&&D.p(a,Wf,"point2X");this.J&&D.pa(this,a);this.Ch=a;this.lb=!0});D.defineProperty(Wf,{Sh:"point2Y"},function(){return this.Mg},function(a){v&&D.p(a,Wf,"point2Y");this.J&&D.pa(this,a);this.Mg=a;this.lb=!0});D.defineProperty(Wf,{oa:"centerX"},function(){return this.Pd},function(a){v&&D.p(a,Wf,"centerX");this.J&&D.pa(this,a);this.Pd=a;this.lb=!0}); D.defineProperty(Wf,{va:"centerY"},function(){return this.df},function(a){v&&D.p(a,Wf,"centerY");this.J&&D.pa(this,a);this.df=a;this.lb=!0});D.defineProperty(Wf,{radiusX:"radiusX"},function(){return this.Ch},function(a){v&&D.p(a,Wf,"radiusX");0>a&&D.ua(a,">= zero",Wf,"radiusX");this.J&&D.pa(this,a);this.Ch=a;this.lb=!0});D.defineProperty(Wf,{radiusY:"radiusY"},function(){return this.Mg},function(a){v&&D.p(a,Wf,"radiusY");0>a&&D.ua(a,">= zero",Wf,"radiusY");this.J&&D.pa(this,a);this.Mg=a;this.lb=!0}); -D.defineProperty(Wf,{Le:"startAngle"},function(){return this.Ab},function(a){this.Ab!==a&&(this.J&&D.pa(this,a),v&&D.p(a,Wf,"startAngle"),a%=360,0>a&&(a+=360),this.Ab=a,this.lb=!0)});D.defineProperty(Wf,{yf:"sweepAngle"},function(){return this.Ib},function(a){v&&D.p(a,Wf,"sweepAngle");this.J&&D.pa(this,a);360a&&(a=-360);this.Ib=a;this.lb=!0});D.defineProperty(Wf,{sm:"isClockwiseArc"},function(){return this.Mo},function(a){this.J&&D.pa(this,a);this.Mo=a;this.lb=!0}); -D.defineProperty(Wf,{Yx:"isLargeArc"},function(){return this.vp},function(a){this.J&&D.pa(this,a);this.vp=a;this.lb=!0});D.defineProperty(Wf,{Zj:"xAxisRotation"},function(){return this.Pd},function(a){v&&D.p(a,Wf,"xAxisRotation");a%=360;0>a&&(a+=360);this.J&&D.pa(this,a);this.Pd=a;this.lb=!0}); +D.defineProperty(Wf,{Le:"startAngle"},function(){return this.Ab},function(a){this.Ab!==a&&(this.J&&D.pa(this,a),v&&D.p(a,Wf,"startAngle"),a%=360,0>a&&(a+=360),this.Ab=a,this.lb=!0)});D.defineProperty(Wf,{yf:"sweepAngle"},function(){return this.Ib},function(a){v&&D.p(a,Wf,"sweepAngle");this.J&&D.pa(this,a);360a&&(a=-360);this.Ib=a;this.lb=!0});D.defineProperty(Wf,{tm:"isClockwiseArc"},function(){return this.Lo},function(a){this.J&&D.pa(this,a);this.Lo=a;this.lb=!0}); +D.defineProperty(Wf,{Yx:"isLargeArc"},function(){return this.tp},function(a){this.J&&D.pa(this,a);this.tp=a;this.lb=!0});D.defineProperty(Wf,{Zj:"xAxisRotation"},function(){return this.Pd},function(a){v&&D.p(a,Wf,"xAxisRotation");a%=360;0>a&&(a+=360);this.J&&D.pa(this,a);this.Pd=a;this.lb=!0}); function Yf(){this.ba=null;this.lA=(new O(0,0)).freeze();this.sz=(new O(0,0)).freeze();this.zv=this.ww=0;this.Av=1;this.kw="";this.ex=this.Ov=!1;this.Lv=this.Bv=0;this.ak=this.Wv=this.gw=!1;this.Rr=null;this.ax=0;this.Qg=this.$w=null}D.ja("InputEvent",Yf); Yf.prototype.copy=function(){var a=new Yf;a.ba=this.ba;a.lA.assign(this.qe);a.sz.assign(this.ha);a.ww=this.ww;a.zv=this.zv;a.Av=this.Av;a.kw=this.kw;a.Ov=this.Ov;a.ex=this.ex;a.Bv=this.Bv;a.Lv=this.Lv;a.gw=this.gw;a.Wv=this.Wv;a.ak=this.ak;a.Rr=this.Rr;a.ax=this.ax;a.$w=this.$w;a.Qg=this.Qg;return a}; Yf.prototype.toString=function(){var a="^";0!==this.Kd&&(a+="M:"+this.Kd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Oe&&(a+="C:"+this.Oe);0!==this.im&&(a+="D:"+this.im);this.Mc&&(a+="h");this.bubbles&&(a+="b");null!==this.ha&&(a+="@"+this.ha.toString());return a};D.defineProperty(Yf,{g:"diagram"},function(){return this.ba},function(a){this.ba=a});D.defineProperty(Yf,{qe:"viewPoint"},function(){return this.lA},function(a){D.l(a,O,Yf,"viewPoint");this.lA.assign(a)}); @@ -324,7 +324,7 @@ D.defineProperty(Yf,{up:"up"},function(){return this.ex},function(a){this.ex=a}) D.defineProperty(Yf,{bubbles:"bubbles"},function(){return this.ak},function(a){this.ak=a});D.defineProperty(Yf,{event:"event"},function(){return this.Rr},function(a){this.Rr=a});D.w(Yf,{Mj:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});D.w(Yf,{Wk:"isMac"},function(){return D.Wk});D.defineProperty(Yf,{timestamp:"timestamp"},function(){return this.ax},function(a){this.ax=a}); D.defineProperty(Yf,{gh:"targetDiagram"},function(){return this.$w},function(a){this.$w=a});D.defineProperty(Yf,{We:"targetObject"},function(){return this.Qg},function(a){this.Qg=a});D.defineProperty(Yf,{control:"control"},function(){return 0!==(this.Kd&1)},function(a){this.Kd=a?this.Kd|1:this.Kd&-2});D.defineProperty(Yf,{shift:"shift"},function(){return 0!==(this.Kd&4)},function(a){this.Kd=a?this.Kd|4:this.Kd&-5}); D.defineProperty(Yf,{alt:"alt"},function(){return 0!==(this.Kd&2)},function(a){this.Kd=a?this.Kd|2:this.Kd&-3});D.defineProperty(Yf,{Hu:"meta"},function(){return 0!==(this.Kd&8)},function(a){this.Kd=a?this.Kd|8:this.Kd&-9});D.defineProperty(Yf,{left:"left"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?0===this.button:0!==(this.buttons&1)},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); -D.defineProperty(Yf,{right:"right"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?2===this.button:0!==(this.buttons&2)},function(a){this.buttons=a?this.buttons|2:this.buttons&-3});D.defineProperty(Yf,{YL:"middle"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?1===this.button:0!==(this.buttons&4)},function(a){this.buttons=a?this.buttons|4:this.buttons&-5}); +D.defineProperty(Yf,{right:"right"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?2===this.button:0!==(this.buttons&2)},function(a){this.buttons=a?this.buttons|2:this.buttons&-3});D.defineProperty(Yf,{ZL:"middle"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?1===this.button:0!==(this.buttons&4)},function(a){this.buttons=a?this.buttons|4:this.buttons&-5}); function $f(){this.ba=null;this.Xb="";this.Gw=this.Yw=null;this.lr=!1}D.ja("DiagramEvent",$f);$f.prototype.copy=function(){var a=new $f;a.ba=this.ba;a.Xb=this.Xb;a.Yw=this.Yw;a.Gw=this.Gw;a.lr=this.lr;return a};$f.prototype.toString=function(){var a="*"+this.name;null!==this.PB&&(a+=":"+this.PB.toString());null!==this.uB&&(a+="("+this.uB.toString()+")");return a};D.defineProperty($f,{g:"diagram"},function(){return this.ba},function(a){this.ba=a}); D.defineProperty($f,{name:"name"},function(){return this.Xb},function(a){this.Xb=a});D.defineProperty($f,{PB:"subject"},function(){return this.Yw},function(a){this.Yw=a});D.defineProperty($f,{uB:"parameter"},function(){return this.Gw},function(a){this.Gw=a});D.defineProperty($f,{cancel:"cancel"},function(){return this.lr},function(a){this.lr!==a&&D.Pn("DiagramEvent.cancel","2.0");this.lr=a});function ag(){this.mr=bg;this.ln=this.vw="";this.Ls=this.Ms=this.Qs=this.Rs=this.Ps=this.ba=this.ve=null} D.ja("ChangedEvent",ag);var cg;ag.Transaction=cg=D.s(ag,"Transaction",-1);var bg;ag.Property=bg=D.s(ag,"Property",0);var dg;ag.Insert=dg=D.s(ag,"Insert",1);var og;ag.Remove=og=D.s(ag,"Remove",2);ag.prototype.clear=ag.prototype.clear=function(){this.Ls=this.Ms=this.Qs=this.Rs=this.Ps=this.ba=this.ve=null}; @@ -335,21 +335,21 @@ ag.prototype.canRedo=ag.prototype.canRedo=function(){return null!==this.ga||null D.defineProperty(ag,{Jc:"change"},function(){return this.mr},function(a){v&&D.Da(a,ag,ag,"change");this.mr=a});D.defineProperty(ag,{xf:"modelChange"},function(){return this.vw},function(a){v&&D.h(a,"string",ag,"modelChange");this.vw=a});D.defineProperty(ag,{propertyName:"propertyName"},function(){return this.ln},function(a){v&&"string"!==typeof a&&D.h(a,"function",ag,"propertyName");this.ln=a}); D.w(ag,{YF:"isTransactionFinished"},function(){return this.mr===cg&&("CommittedTransaction"===this.ln||"FinishedUndo"===this.ln||"FinishedRedo"===this.ln)});D.defineProperty(ag,{object:"object"},function(){return this.Ps},function(a){this.Ps=a});D.defineProperty(ag,{oldValue:"oldValue"},function(){return this.Rs},function(a){this.Rs=a});D.defineProperty(ag,{Tj:"oldParam"},function(){return this.Qs},function(a){this.Qs=a}); D.defineProperty(ag,{newValue:"newValue"},function(){return this.Ms},function(a){this.Ms=a});D.defineProperty(ag,{Rj:"newParam"},function(){return this.Ls},function(a){this.Ls=a}); -function M(a){1d)return;D.Ug(a.we,d)}Xg(a,"nodeDataArray",og,"nodeDataArray",a,b,null,d,null);a.hv(b)} M.prototype.removeNodeDataCollection=function(a){if(D.isArray(a))for(var b=D.cb(a),c=0;cb&&(b=D.cb(a));D.Ih(a,b,c);Xg(this,"",dg,"",a,null,c,null,b)}; -M.prototype.removeArrayItem=M.prototype.vG=function(a,b){void 0===b&&(b=-1);v&&(D.Wt(a,M,"removeArrayItem:arr"),D.p(b,M,"removeArrayItem:idx"));a===this.we&&D.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=D.cb(a)-1);var c=D.La(a,b);D.Ug(a,b);Xg(this,"",og,"",a,c,null,b,null)};D.defineProperty(M,{po:"nodeCategoryProperty"},function(){return this.fn},function(a){var b=this.fn;b!==a&&(Yg(a,M,"nodeCategoryProperty"),this.fn=a,this.i("nodeCategoryProperty",b,a))}); +M.prototype.removeArrayItem=M.prototype.vG=function(a,b){void 0===b&&(b=-1);v&&(D.Wt(a,M,"removeArrayItem:arr"),D.p(b,M,"removeArrayItem:idx"));a===this.we&&D.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=D.cb(a)-1);var c=D.La(a,b);D.Ug(a,b);Xg(this,"",og,"",a,c,null,b,null)};D.defineProperty(M,{oo:"nodeCategoryProperty"},function(){return this.fn},function(a){var b=this.fn;b!==a&&(Yg(a,M,"nodeCategoryProperty"),this.fn=a,this.i("nodeCategoryProperty",b,a))}); M.prototype.getCategoryForNodeData=M.prototype.QA=function(a){if(null===a)return"";var b=this.fn;if(""===b)return"";b=D.vb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;D.k("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; M.prototype.setCategoryForNodeData=M.prototype.Gy=function(a,b){D.h(b,"string",M,"setCategoryForNodeData:cat");if(null!==a){var c=this.fn;if(""!==c)if(this.ie(a)){var d=D.vb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),Xg(this,"nodeCategory",bg,c,a,d,b))}else D.Ua(a,c,b)}}; -function Y(a,b){M.call(this);2D.am(d,a.newValue)&&D.Ih(d,c,a.newValue));return}}else if(a.Jc=== -og){c=a.Tj;if("linkDataArray"===a.xf){d=a.oldValue;D.Ta(d)&&"number"===typeof c&&(e=this.eg(d),b?(this.ii.add(d),D.La(this.bf,c)!==d&&D.Ih(this.bf,c,d),void 0!==e&&this.pd.add(e,d)):(this.ii.remove(d),D.La(this.bf,c)===d&&D.Ug(this.bf,c),void 0!==e&&this.pd.remove(e)));return}if("linkLabelKeys"===a.xf){d=this.Sk(a.object);D.isArray(d)&&"number"===typeof c&&(b?0>D.am(d,a.newValue)&&D.Ih(d,c,a.newValue):(c=D.am(d,a.newValue),0<=c&&D.Ug(d,c)));return}}M.prototype.Gn.call(this,a,b)}; -D.defineProperty(Y,{sA:"archetypeNodeData"},function(){return this.ql},function(a){var b=this.ql;b!==a&&(null!==a&&D.l(a,Object,Y,"archetypeNodeData"),this.ql=a,this.i("archetypeNodeData",b,a))});Y.prototype.io=function(a){if(void 0!==a){var b=this.ql;if(null!==b){var c=this.Fe(a);null===c&&(c=this.copyNodeData(b),D.Ua(c,this.wk,a),this.Xl(c))}return a}}; -D.defineProperty(Y,{fo:"linkFromKeyProperty"},function(){return this.ji},function(a){var b=this.ji;b!==a&&(Yg(a,Y,"linkFromKeyProperty"),this.ji=a,this.i("linkFromKeyProperty",b,a))});Y.prototype.getFromKeyForLinkData=Y.prototype.pm=function(a){if(null!==a){var b=this.ji;if(""!==b&&(b=D.vb(a,b),void 0!==b)){if(Zg(b))return b;D.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; -Y.prototype.setFromKeyForLinkData=Y.prototype.FB=function(a,b){null===b&&(b=void 0);void 0===b||Zg(b)||D.hc(b,"number or string",Y,"setFromKeyForLinkData:key");if(null!==a){var c=this.ji;if(""!==c)if(b=this.io(b),this.Lh(a)){var d=D.vb(a,c);d!==b&&(dh(this,d,a),D.Ua(a,c,b),null===this.Fe(b)&&ch(this,b,a),Xg(this,"linkFromKey",bg,c,a,d,b),"string"===typeof c&&this.Nb(a,c))}else D.Ua(a,c,b)}}; -D.defineProperty(Y,{ho:"linkToKeyProperty"},function(){return this.ki},function(a){var b=this.ki;b!==a&&(Yg(a,Y,"linkToKeyProperty"),this.ki=a,this.i("linkToKeyProperty",b,a))});Y.prototype.getToKeyForLinkData=Y.prototype.qm=function(a){if(null!==a){var b=this.ki;if(""!==b&&(b=D.vb(a,b),void 0!==b)){if(Zg(b))return b;D.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; -Y.prototype.setToKeyForLinkData=Y.prototype.LB=function(a,b){null===b&&(b=void 0);void 0===b||Zg(b)||D.hc(b,"number or string",Y,"setToKeyForLinkData:key");if(null!==a){var c=this.ki;if(""!==c)if(b=this.io(b),this.Lh(a)){var d=D.vb(a,c);d!==b&&(dh(this,d,a),D.Ua(a,c,b),null===this.Fe(b)&&ch(this,b,a),Xg(this,"linkToKey",bg,c,a,d,b),"string"===typeof c&&this.Nb(a,c))}else D.Ua(a,c,b)}}; -D.defineProperty(Y,{Du:"linkFromPortIdProperty"},function(){return this.an},function(a){var b=this.an;b!==a&&(Yg(a,Y,"linkFromPortIdProperty"),a!==this.fo&&a!==this.ho||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.an=a,this.i("linkFromPortIdProperty",b,a))});Y.prototype.getFromPortIdForLinkData=Y.prototype.NI=function(a){if(null===a)return"";var b=this.an;if(""===b)return"";a=D.vb(a,b);return void 0===a?"":a}; +f.wB=function(a){M.prototype.wB.call(this,a);var b=a.insertedLinkKeys;if(D.isArray(b))for(var c=D.cb(b),d=0;dD.am(d,a.newValue)&&D.Ih(d,c,a.newValue));return}}else if(a.Jc=== +og){c=a.Tj;if("linkDataArray"===a.xf){d=a.oldValue;D.Ta(d)&&"number"===typeof c&&(e=this.eg(d),b?(this.hi.add(d),D.La(this.bf,c)!==d&&D.Ih(this.bf,c,d),void 0!==e&&this.pd.add(e,d)):(this.hi.remove(d),D.La(this.bf,c)===d&&D.Ug(this.bf,c),void 0!==e&&this.pd.remove(e)));return}if("linkLabelKeys"===a.xf){d=this.Sk(a.object);D.isArray(d)&&"number"===typeof c&&(b?0>D.am(d,a.newValue)&&D.Ih(d,c,a.newValue):(c=D.am(d,a.newValue),0<=c&&D.Ug(d,c)));return}}M.prototype.Gn.call(this,a,b)}; +D.defineProperty(Y,{sA:"archetypeNodeData"},function(){return this.ql},function(a){var b=this.ql;b!==a&&(null!==a&&D.l(a,Object,Y,"archetypeNodeData"),this.ql=a,this.i("archetypeNodeData",b,a))});Y.prototype.ho=function(a){if(void 0!==a){var b=this.ql;if(null!==b){var c=this.Fe(a);null===c&&(c=this.copyNodeData(b),D.Ua(c,this.wk,a),this.Xl(c))}return a}}; +D.defineProperty(Y,{eo:"linkFromKeyProperty"},function(){return this.ii},function(a){var b=this.ii;b!==a&&(Yg(a,Y,"linkFromKeyProperty"),this.ii=a,this.i("linkFromKeyProperty",b,a))});Y.prototype.getFromKeyForLinkData=Y.prototype.qm=function(a){if(null!==a){var b=this.ii;if(""!==b&&(b=D.vb(a,b),void 0!==b)){if(Zg(b))return b;D.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; +Y.prototype.setFromKeyForLinkData=Y.prototype.FB=function(a,b){null===b&&(b=void 0);void 0===b||Zg(b)||D.hc(b,"number or string",Y,"setFromKeyForLinkData:key");if(null!==a){var c=this.ii;if(""!==c)if(b=this.ho(b),this.Lh(a)){var d=D.vb(a,c);d!==b&&(dh(this,d,a),D.Ua(a,c,b),null===this.Fe(b)&&ch(this,b,a),Xg(this,"linkFromKey",bg,c,a,d,b),"string"===typeof c&&this.Nb(a,c))}else D.Ua(a,c,b)}}; +D.defineProperty(Y,{fo:"linkToKeyProperty"},function(){return this.ji},function(a){var b=this.ji;b!==a&&(Yg(a,Y,"linkToKeyProperty"),this.ji=a,this.i("linkToKeyProperty",b,a))});Y.prototype.getToKeyForLinkData=Y.prototype.rm=function(a){if(null!==a){var b=this.ji;if(""!==b&&(b=D.vb(a,b),void 0!==b)){if(Zg(b))return b;D.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; +Y.prototype.setToKeyForLinkData=Y.prototype.LB=function(a,b){null===b&&(b=void 0);void 0===b||Zg(b)||D.hc(b,"number or string",Y,"setToKeyForLinkData:key");if(null!==a){var c=this.ji;if(""!==c)if(b=this.ho(b),this.Lh(a)){var d=D.vb(a,c);d!==b&&(dh(this,d,a),D.Ua(a,c,b),null===this.Fe(b)&&ch(this,b,a),Xg(this,"linkToKey",bg,c,a,d,b),"string"===typeof c&&this.Nb(a,c))}else D.Ua(a,c,b)}}; +D.defineProperty(Y,{Du:"linkFromPortIdProperty"},function(){return this.an},function(a){var b=this.an;b!==a&&(Yg(a,Y,"linkFromPortIdProperty"),a!==this.eo&&a!==this.fo||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.an=a,this.i("linkFromPortIdProperty",b,a))});Y.prototype.getFromPortIdForLinkData=Y.prototype.NI=function(a){if(null===a)return"";var b=this.an;if(""===b)return"";a=D.vb(a,b);return void 0===a?"":a}; Y.prototype.setFromPortIdForLinkData=Y.prototype.GB=function(a,b){D.h(b,"string",Y,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.an;if(""!==c)if(this.Lh(a)){var d=D.vb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),Xg(this,"linkFromPortId",bg,c,a,d,b),"string"===typeof c&&this.Nb(a,c))}else D.Ua(a,c,b)}}; -D.defineProperty(Y,{Fu:"linkToPortIdProperty"},function(){return this.bn},function(a){var b=this.bn;b!==a&&(Yg(a,Y,"linkToPortIdProperty"),a!==this.fo&&a!==this.ho||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.bn=a,this.i("linkToPortIdProperty",b,a))});Y.prototype.getToPortIdForLinkData=Y.prototype.SI=function(a){if(null===a)return"";var b=this.bn;if(""===b)return"";a=D.vb(a,b);return void 0===a?"":a}; +D.defineProperty(Y,{Fu:"linkToPortIdProperty"},function(){return this.bn},function(a){var b=this.bn;b!==a&&(Yg(a,Y,"linkToPortIdProperty"),a!==this.eo&&a!==this.fo||D.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.bn=a,this.i("linkToPortIdProperty",b,a))});Y.prototype.getToPortIdForLinkData=Y.prototype.SI=function(a){if(null===a)return"";var b=this.bn;if(""===b)return"";a=D.vb(a,b);return void 0===a?"":a}; Y.prototype.setToPortIdForLinkData=Y.prototype.MB=function(a,b){D.h(b,"string",Y,"setToPortIdForLinkData:portname");if(null!==a){var c=this.bn;if(""!==c)if(this.Lh(a)){var d=D.vb(a,c);void 0===d&&(d="");d!==b&&(D.Ua(a,c,b),Xg(this,"linkToPortId",bg,c,a,d,b),"string"===typeof c&&this.Nb(a,c))}else D.Ua(a,c,b)}};D.defineProperty(Y,{Eu:"linkLabelKeysProperty"},function(){return this.Ig},function(a){var b=this.Ig;b!==a&&(Yg(a,Y,"linkLabelKeysProperty"),this.Ig=a,this.i("linkLabelKeysProperty",b,a))}); -Y.prototype.getLabelKeysForLinkData=Y.prototype.Sk=function(a){if(null===a)return D.Eo;var b=this.Ig;if(""===b)return D.Eo;a=D.vb(a,b);return void 0===a?D.Eo:a}; -Y.prototype.setLabelKeysForLinkData=Y.prototype.TG=function(a,b){D.Wt(b,Y,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.Ig;if(""!==c)if(this.Lh(a)){var d=D.vb(a,c);void 0===d&&(d=D.Eo);if(d!==b){for(var e=D.cb(d),g=0;ge||(D.Ug(d,e),this.Lh(a)&&(dh(this,b,a),Xg(this,"linkLabelKeys",og,c,a,b,null,e,null)))}else void 0!==d&&D.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; -D.defineProperty(Y,{Zg:"linkDataArray"},function(){return this.bf},function(a){var b=this.bf;if(b!==a){D.Wt(a,Y,"linkDataArray");this.pd.clear();for(var c=D.cb(a),d=0;de||(D.Ug(d,e),this.Lh(a)&&(dh(this,b,a),Xg(this,"linkLabelKeys",og,c,a,b,null,e,null)))}else void 0!==d&&D.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +D.defineProperty(Y,{Zg:"linkDataArray"},function(){return this.bf},function(a){var b=this.bf;if(b!==a){D.Wt(a,Y,"linkDataArray");this.pd.clear();for(var c=D.cb(a),d=0;dd)return;D.Ug(a.bf,d)}Xg(a,"linkDataArray",og,"linkDataArray",a,b,null,d,null);c=a.pm(b);dh(a,c,b);c=a.qm(b);dh(a,c,b);d=a.Sk(b);if(D.isArray(d))for(var e=D.cb(d),g=0;gd)return;D.Ug(a.bf,d)}Xg(a,"linkDataArray",og,"linkDataArray",a,b,null,d,null);c=a.qm(b);dh(a,c,b);c=a.rm(b);dh(a,c,b);d=a.Sk(b);if(D.isArray(d))for(var e=D.cb(d),g=0;ga.Wh&&D.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Wh;d&&b&&a.rd("CommittingTransaction",c,a.Dj);var e=0;if(0a.Ij;e--)g=d.ea(e),null!==g&&g.clear(), -d.jd(e),a.Nz=!0;e=a.fG;0===e&&(e=1);0=e&&(g=d.ea(0),null!==g&&g.clear(),d.jd(0),a.sh--);d.add(b);a.sh++;d.freeze();g=b}a.rd("CommittedTransaction",c,g)}else{a.bj=!0;try{a.isEnabled&&null!==g&&(g.uu=!0,g.undo())}finally{a.rd("RolledBackTransaction",c,g),a.bj=!1}null!==g&&g.clear()}a.Kv=null;return!0}if(a.isEnabled&&!b&&null!==g){a=e;c=g.bg;for(b=c.count-1;b>=a;b--)d=c.ea(b),null!==d&&d.undo(),c.Ya(),c.jd(b);c.freeze()}return!1} -pg.prototype.canUndo=pg.prototype.canUndo=function(){if(!this.isEnabled||0=this.Wh&&!this.Dz&&(a=a.g,null!==a&&!1===a.ao||D.trace("Change not within a transaction: "+c.toString()))}}; -pg.prototype.skipsEvent=function(a){if(null===a||0>a.Jc.value)return!0;a=a.object;if(a instanceof P){if(a=a.layer,null!==a&&a.Uc)return!0}else if(a instanceof Ug&&a.Uc)return!0;return!1};D.w(pg,{KJ:"models"},function(){return this.Sz.j});D.defineProperty(pg,{isEnabled:"isEnabled"},function(){return this.mf},function(a){this.mf=a});D.w(pg,{hH:"transactionToUndo"},function(){return 0<=this.Ij&&this.Ij<=this.history.count-1?this.history.ea(this.Ij):null}); -D.w(pg,{gH:"transactionToRedo"},function(){return this.Ija.Vh&&D.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Vh;d&&b&&a.rd("CommittingTransaction",c,a.Cj);var e=0;if(0a.Hj;e--)g=d.ea(e),null!==g&&g.clear(), +d.jd(e),a.Nz=!0;e=a.fG;0===e&&(e=1);0=e&&(g=d.ea(0),null!==g&&g.clear(),d.jd(0),a.sh--);d.add(b);a.sh++;d.freeze();g=b}a.rd("CommittedTransaction",c,g)}else{a.aj=!0;try{a.isEnabled&&null!==g&&(g.uu=!0,g.undo())}finally{a.rd("RolledBackTransaction",c,g),a.aj=!1}null!==g&&g.clear()}a.Kv=null;return!0}if(a.isEnabled&&!b&&null!==g){a=e;c=g.bg;for(b=c.count-1;b>=a;b--)d=c.ea(b),null!==d&&d.undo(),c.Ya(),c.jd(b);c.freeze()}return!1} +pg.prototype.canUndo=pg.prototype.canUndo=function(){if(!this.isEnabled||0=this.Vh&&!this.Dz&&(a=a.g,null!==a&&!1===a.$n||D.trace("Change not within a transaction: "+c.toString()))}}; +pg.prototype.skipsEvent=function(a){if(null===a||0>a.Jc.value)return!0;a=a.object;if(a instanceof P){if(a=a.layer,null!==a&&a.Uc)return!0}else if(a instanceof Ug&&a.Uc)return!0;return!1};D.w(pg,{LJ:"models"},function(){return this.Sz.j});D.defineProperty(pg,{isEnabled:"isEnabled"},function(){return this.mf},function(a){this.mf=a});D.w(pg,{hH:"transactionToUndo"},function(){return 0<=this.Hj&&this.Hj<=this.history.count-1?this.history.ea(this.Hj):null}); +D.w(pg,{gH:"transactionToRedo"},function(){return this.Hjb.Qh||(b.scale=a))};oa.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.Oy);D.p(a,oa,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.bm!==Rh)return!1;a*=b.scale;return ab.Qh?!1:b.sx}; -oa.prototype.increaseZoom=function(a){void 0===a&&(a=this.Oy);D.p(a,oa,"increaseZoom:factor");var b=this.g;null!==b&&b.bm===Rh&&(a*=b.scale,ab.Qh||(b.scale=a))};oa.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.Oy);D.p(a,oa,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.bm!==Rh)return!1;a*=b.scale;return ab.Qh?!1:b.sx};oa.prototype.resetZoom=function(a){void 0===a&&(a=this.Bx);D.p(a,oa,"resetZoom:newscale");var b=this.g;null===b||ab.Qh||(b.scale=a)}; -oa.prototype.canResetZoom=function(a){void 0===a&&(a=this.Bx);D.p(a,oa,"canResetZoom:newscale");var b=this.g;return null===b||ab.Qh?!1:b.sx};oa.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.oA&&!isNaN(this.Oz)&&a.dd.P(this.nA)?(a.scale=this.Oz,a.position=this.vD,this.oA=NaN,this.nA=Hd):(this.Oz=b,this.vD=c.copy(),a.zoomToFit(),this.oA=a.scale,this.nA=a.dd.copy())}};oa.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.sx}; -oa.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&D.l(a,F,oa,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.sj&&(this.sj.next()?a=this.sj.value:this.sj=null)}catch(c){this.sj=null}null===a&&(0b.Ph||(b.scale=a))};oa.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.Oy);D.p(a,oa,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.bm!==Rh)return!1;a*=b.scale;return ab.Ph?!1:b.sx}; +oa.prototype.increaseZoom=function(a){void 0===a&&(a=this.Oy);D.p(a,oa,"increaseZoom:factor");var b=this.g;null!==b&&b.bm===Rh&&(a*=b.scale,ab.Ph||(b.scale=a))};oa.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.Oy);D.p(a,oa,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.bm!==Rh)return!1;a*=b.scale;return ab.Ph?!1:b.sx};oa.prototype.resetZoom=function(a){void 0===a&&(a=this.Bx);D.p(a,oa,"resetZoom:newscale");var b=this.g;null===b||ab.Ph||(b.scale=a)}; +oa.prototype.canResetZoom=function(a){void 0===a&&(a=this.Bx);D.p(a,oa,"canResetZoom:newscale");var b=this.g;return null===b||ab.Ph?!1:b.sx};oa.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.oA&&!isNaN(this.Oz)&&a.dd.P(this.nA)?(a.scale=this.Oz,a.position=this.vD,this.oA=NaN,this.nA=Hd):(this.Oz=b,this.vD=c.copy(),a.zoomToFit(),this.oA=a.scale,this.nA=a.dd.copy())}};oa.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.sx}; +oa.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&D.l(a,F,oa,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.rj&&(this.rj.next()?a=this.rj.value:this.rj=null)}catch(c){this.rj=null}null===a&&(0e||Math.abs(b.y-a.y)>d};D.w(Vg,{g:"diagram"},function(){return this.ba});D.defineProperty(Vg,{name:"name"},function(){return this.Xb},function(a){D.h(a,"string",Vg,"name");this.Xb=a}); D.defineProperty(Vg,{isEnabled:"isEnabled"},function(){return this.mf},function(a){D.h(a,"boolean",Vg,"isEnabled");this.mf=a});D.defineProperty(Vg,{wa:"isActive"},function(){return this.iD},function(a){D.h(a,"boolean",Vg,"isActive");this.iD=a});D.defineProperty(Vg,{Qf:"transactionResult"},function(){return this.tE},function(a){null!==a&&D.h(a,"string",Vg,"transactionResult");this.tE=a}); -function Qh(){Vg.call(this);0e&&(e=k),l>g&&(g=l))}}Infinity===c?b.n(0,0,0,0):b.n(c,d,e-c,g-d)} -function Oi(a,b){if(null===a.jc){var c=a.g;if(!(null===c||b&&(c.nb||c.Gf))&&null!==a.fc){var d=c.ra;d.isEnabled&&d.UF?null!==d.Dj&&0c.ta)){var d=a.g;if(null!==d&&!d.nb){var e=a.qj;if(null!==e){var g=null,h=null;null===c.aa&&(g=Yi(a,c.m(0),!1),null!==g&&(h=g.Y));var k=null,l=null;null===c.da&&(k=Yi(a,c.m(c.ta-1),!0),null!==k&&(l=k.Y));e.isValidLink(h,g,l,k)?b?(c.hq=c.m(0),c.iq=c.m(c.ta-1),c.zm=!1,c.aa=h,null!==g&&(c.dg=g.ud),c.da=l,null!==k&&(c.jh=k.ud),c.Lc!==a.zw&&d.Ja("LinkRelinked",c,a.zw),c.kd!==a.Aw&&d.Ja("LinkRelinked",c,a.Aw)):Zi(e,h,g,l,k):Zi(e,null,null,null,null)}}}} +Qh.prototype.computeMove=function(a,b,c,d){void 0===d&&(d=new O);d.assign(b);if(null===a)return d;void 0===c&&(c=null);var e=b;if(this.Vx&&(this.iJ||null===c||null!==this.g&&this.g.U.up)&&(e=D.O(),c=e,c.assign(b),null!==a)){var g=this.g;if(null!==g){var h=g.Wn,k=this.FF,g=k.width,k=k.height,l=this.UI,m=l.x,l=l.y,n=this.TI;if(null!==h){var p=h.Qx;isNaN(g)&&(g=p.width);isNaN(k)&&(k=p.height);h=h.EF;isNaN(m)&&(m=h.x);isNaN(l)&&(l=h.y)}h=D.Fb(0,0);h.av(0,0,g,k,n);fb(b.x,b.y,m+h.x,l+h.y,g,k,c);D.A(h)}}c= +null!==a.fF?a.fF(a,b,e):e;k=a.KJ;g=k.x;isNaN(g)&&(g=a.location.x);k=k.y;isNaN(k)&&(k=a.location.y);h=a.EJ;m=h.x;isNaN(m)&&(m=a.location.x);h=h.y;isNaN(h)&&(h=a.location.y);d.n(Math.max(g,Math.min(c.x,m)),Math.max(k,Math.min(c.y,h)));e!==b&&D.A(e);return d};function Ti(a,b){if(null===b)return!0;var c=b.Y;return null===c||c instanceof da||c.layer.Uc||a.fc&&a.fc.contains(c)||a.jc&&a.jc.contains(c)?!0:!1} +function Ui(a,b,c,d){var e=a.g;if(null!==e){a.Ej&&(null!==a.sd&&(a.sd.aa=null,a.sd.da=null),Vi(a,!1));var g=Wi(e,b,null,function(b){return!Ti(a,b)}),h=e.U;h.We=g;var k=e.Eb,l=!1;try{e.Eb=!0;l=Ji(a,h,g);if(!a.wa&&null===Zh)return;if(null===g){var m=e.OJ;null!==m&&(m(h),l=!0)}if(!a.wa&&null===Zh)return;a.doDragOver(b,g);if(!a.wa&&null===Zh)return}finally{e.Eb=k,l&&e.hg()}(e.ye||e.ze)&&(c||d)&&e.FA(h.qe)}} +function Ji(a,b,c){var d=!1,e=a.ek.length,g=0c.ta)){var d=a.g;if(null!==d&&!d.nb){var e=a.pj;if(null!==e){var g=null,h=null;null===c.aa&&(g=Yi(a,c.m(0),!1),null!==g&&(h=g.Y));var k=null,l=null;null===c.da&&(k=Yi(a,c.m(c.ta-1),!0),null!==k&&(l=k.Y));e.isValidLink(h,g,l,k)?b?(c.gq=c.m(0),c.hq=c.m(c.ta-1),c.zm=!1,c.aa=h,null!==g&&(c.dg=g.ud),c.da=l,null!==k&&(c.jh=k.ud),c.Lc!==a.zw&&d.Ja("LinkRelinked",c,a.zw),c.kd!==a.Aw&&d.Ja("LinkRelinked",c,a.Aw)):Zi(e,h,g,l,k):Zi(e,null,null,null,null)}}}} Qh.prototype.doDragOver=function(){}; -function $i(a,b){var c=a.g;if(null!==c){a.Fj&&Vi(a,!0);Ei(a);var d=Wi(c,b,null,function(b){return!Ti(a,b)}),e=c.U;e.We=d;if(null!==d){e.Mc=!1;for(var g=d;null!==g;){var h=g.lB;if(null!==h&&(h(e,g),e.Mc))break;g=Xi(g)}}else g=c.lB,null!==g&&g(e);if(a.wa||null!==Zh){for(e=(a.jc||a.fc).j;e.next();)g=e.key,g instanceof G&&g.Hd.each(function(a){a.zm=!1});a.doDropOnto(b,d);if(a.wa||null!==Zh){d=D.Of();for(e=c.selection.j;e.next();)g=e.value,g instanceof G&&aj(c,g.getAvoidableRect(d));D.Kb(d)}}}} +function $i(a,b){var c=a.g;if(null!==c){a.Ej&&Vi(a,!0);Ei(a);var d=Wi(c,b,null,function(b){return!Ti(a,b)}),e=c.U;e.We=d;if(null!==d){e.Mc=!1;for(var g=d;null!==g;){var h=g.lB;if(null!==h&&(h(e,g),e.Mc))break;g=Xi(g)}}else g=c.lB,null!==g&&g(e);if(a.wa||null!==Zh){for(e=(a.jc||a.fc).j;e.next();)g=e.key,g instanceof G&&g.Hd.each(function(a){a.zm=!1});a.doDropOnto(b,d);if(a.wa||null!==Zh){d=D.Of();for(e=c.selection.j;e.next();)g=e.value,g instanceof G&&aj(c,g.getAvoidableRect(d));D.Kb(d)}}}} Qh.prototype.doDropOnto=function(){};Qh.prototype.doMouseMove=function(){if(this.wa){var a=this.g;if(null!==a&&null!==this.Nn&&null!==this.fc){var b=!1,c=!1;this.mayCopy()?(b=!0,a.kc="copy",Oi(this,!1),Yh(this,this.jc),Pi(this,this.jc,!1),Fi(this,this.jc)):this.mayMove()?(c=!0,a.kc="default",Ii(this),Pi(this,this.fc,!0)):this.mayDragOut()?(a.kc="no-drop",Oi(this,!1),Pi(this,this.jc,!1)):Ii(this);Ui(this,a.U.ha,c,b)}}}; -Qh.prototype.doMouseUp=function(){if(this.wa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.jc?(Ii(this),Oi(this,!0),Yh(this,this.jc),Pi(this,this.jc,!1),Fi(this,this.jc),null!==this.jc&&a.OG(this.jc.Yj())):(b=!0,Ii(this),this.mayMove()&&(Pi(this,this.fc,!0),Ui(this,a.U.ha,!0,!1)));this.Lr=!0;$i(this,a.U.ha);if(this.wa){this.jc=null;if(b&&null!==this.fc)for(b=this.fc.j;b.next();){var d=b.key;d instanceof G&&(d=d.Pa,null===d||null===d.placeholder||this.fc.contains(d)||d.placeholder.K())}a.zc(); -Fi(this,this.fc);this.Qf=c?"Copy":"Move";a.Ja(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};Qh.prototype.mayCopy=function(){if(!this.PF)return!1;var a=this.g;if(null===a||a.nb||a.Gf||!a.$p||!a.Kk||(D.Wk?!a.U.alt:!a.U.control))return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.oe()&&b.canCopy())return!0}return null!==this.sd&&this.Fj&&this.sd.canCopy()?!0:!1}; -Qh.prototype.mayDragOut=function(){if(!this.PF)return!1;var a=this.g;if(null===a||!a.Tt||!a.Kk||a.Zl)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.oe()&&b.canCopy())return!0}return null!==this.sd&&this.Fj&&this.sd.canCopy()?!0:!1};Qh.prototype.mayMove=function(){var a=this.g;if(null===a||a.nb||!a.Zl)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.oe()&&b.canMove())return!0}return null!==this.sd&&this.Fj&&this.sd.canMove()?!0:!1};var Gi=new K(Qh),Zh=null,$h=null; -Qh.prototype.getDraggingSource=function(){return Zh};Qh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.HE||a.nb||a.Gf||!a.$p)return!1;var b=Zh;return null===b||null===b.g||b.g.ga.gm!==a.ga.gm?!1:!0};Qh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Xa.Ii();bj(a);a=Zh;null!==a&&null!==a.g&&(a.g.kc="copy")}};Qh.prototype.doSimulatedDragLeave=function(){var a=Zh;null!==a&&a.doSimulatedDragOut();this.doCancel()}; +Qh.prototype.doMouseUp=function(){if(this.wa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.jc?(Ii(this),Oi(this,!0),Yh(this,this.jc),Pi(this,this.jc,!1),Fi(this,this.jc),null!==this.jc&&a.OG(this.jc.Yj())):(b=!0,Ii(this),this.mayMove()&&(Pi(this,this.fc,!0),Ui(this,a.U.ha,!0,!1)));this.Lr=!0;$i(this,a.U.ha);if(this.wa){this.jc=null;if(b&&null!==this.fc)for(b=this.fc.j;b.next();){var d=b.key;d instanceof G&&(d=d.Ra,null===d||null===d.placeholder||this.fc.contains(d)||d.placeholder.K())}a.zc(); +Fi(this,this.fc);this.Qf=c?"Copy":"Move";a.Ja(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};Qh.prototype.mayCopy=function(){if(!this.PF)return!1;var a=this.g;if(null===a||a.nb||a.Gf||!a.Zp||!a.Kk||(D.Wk?!a.U.alt:!a.U.control))return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.oe()&&b.canCopy())return!0}return null!==this.sd&&this.Ej&&this.sd.canCopy()?!0:!1}; +Qh.prototype.mayDragOut=function(){if(!this.PF)return!1;var a=this.g;if(null===a||!a.Tt||!a.Kk||a.Zl)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.oe()&&b.canCopy())return!0}return null!==this.sd&&this.Ej&&this.sd.canCopy()?!0:!1};Qh.prototype.mayMove=function(){var a=this.g;if(null===a||a.nb||!a.Zl)return!1;for(a=a.selection.j;a.next();){var b=a.value;if(b.oe()&&b.canMove())return!0}return null!==this.sd&&this.Ej&&this.sd.canMove()?!0:!1};var Gi=new K(Qh),Zh=null,$h=null; +Qh.prototype.getDraggingSource=function(){return Zh};Qh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.HE||a.nb||a.Gf||!a.Zp)return!1;var b=Zh;return null===b||null===b.g||b.g.ga.gm!==a.ga.gm?!1:!0};Qh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Xa.Hi();bj(a);a=Zh;null!==a&&null!==a.g&&(a.g.kc="copy")}};Qh.prototype.doSimulatedDragLeave=function(){var a=Zh;null!==a&&a.doSimulatedDragOut();this.doCancel()}; Qh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=Zh;null!==b&&null!==b.fc&&this.mayDragIn()&&(a.kc="copy",cj(this,b.fc.Yj(),!1),Pi(this,this.jc,!1),Ui(this,a.U.ha,!1,!0))}}; Qh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=Zh;if(null!==b){var c=b.g;b.Lr=!0;Ii(this);this.mayDragIn()&&(this.ac("Drop"),cj(this,b.fc.Yj(),!0),Pi(this,this.jc,!1),null!==this.jc&&a.OG(this.jc.Yj()),$i(this,a.U.ha),a.zc(),b=a.selection,null!==this.jc?this.Qf="ExternalCopy":b=new L(F),this.jc=null,a.doFocus(),a.Ja("ExternalObjectsDropped",b,c),this.dl())}}}; -function cj(a,b,c){if(null===a.jc){var d=a.g;if(null!==d&&!d.nb&&!d.Gf){d.Eb=!c;d.ar=!c;a.cl=d.U.ha;d=d.gq(b,d,!0);c=D.Of();Ni(b,c);var e=c.x+c.width/2,g=c.y+c.height/2;D.Kb(c);var h=a.Ww;c=new ma(F);var k=D.O();for(b=b.j;b.next();){var l=b.value,m=d.na(l);l.oe()&&l.canCopy()?(l=l.location,k.n(h.x-(e-l.x),h.y-(g-l.y)),m.location=k,m.hf(),c.add(m,ci(k))):l instanceof J&&l.canCopy()&&m.$k(h.x-e,h.y-g)}D.A(k);for(d=d.j;d.next();)e=d.value,e instanceof J&&e.canCopy()&&c.add(e,ci());a.jc=c;Xh(a,c.Yj()); -null!==a.sd&&(c=a.sd,d=c.so,c.$k(a.cl.x-(d.x+d.width/2),a.cl.y-(d.y+d.height/2)))}}}Qh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.kc="":a.kc="no-drop")};function qi(a){this.point=a;this.UG=Gd}D.ja("DraggingInfo",qi);function Qi(a,b,c){this.Wc=a;this.info=b;this.VI=c} +function cj(a,b,c){if(null===a.jc){var d=a.g;if(null!==d&&!d.nb&&!d.Gf){d.Eb=!c;d.ar=!c;a.cl=d.U.ha;d=d.fq(b,d,!0);c=D.Of();Ni(b,c);var e=c.x+c.width/2,g=c.y+c.height/2;D.Kb(c);var h=a.Ww;c=new ma(F);var k=D.O();for(b=b.j;b.next();){var l=b.value,m=d.na(l);l.oe()&&l.canCopy()?(l=l.location,k.n(h.x-(e-l.x),h.y-(g-l.y)),m.location=k,m.hf(),c.add(m,ci(k))):l instanceof J&&l.canCopy()&&m.$k(h.x-e,h.y-g)}D.A(k);for(d=d.j;d.next();)e=d.value,e instanceof J&&e.canCopy()&&c.add(e,ci());a.jc=c;Xh(a,c.Yj()); +null!==a.sd&&(c=a.sd,d=c.ro,c.$k(a.cl.x-(d.x+d.width/2),a.cl.y-(d.y+d.height/2)))}}}Qh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.kc="":a.kc="no-drop")};function qi(a){this.point=a;this.UG=Gd}D.ja("DraggingInfo",qi);function Qi(a,b,c){this.Wc=a;this.info=b;this.VI=c} function dj(){0=d&&(d=.1);for(var e=this,g=b.Qn(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,g=g.j;g.next();){var h=g.value,k=h.Y;if(k instanceof G){var l=h.eb(hc,D.O()),m=c.x-l.x,n=c.y-l.y;D.A(l);l=m*m+n*n;lc){if(null!==this.sc&&a===this.ah&&b===this.bh)return!0;var d=b.ud;null===d&&(d="");if(a.Jx(d).count>=c)return!1}return!0}; -dj.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.zq;if(null!==this.g&&this.g.gb===this&&(null!==a.layer&&!a.layer.Ut||!0!==b.cH))return!1;var c=b.wK;if(Infinity>c){if(null!==this.sc&&a===this.dh&&b===this.eh)return!0;var d=b.ud;null===d&&(d="");if(a.Xg(d).count>=c)return!1}return!0};dj.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.Y,d=b.Y;return null!==c&&c===d}; +c instanceof G&&(null===c.layer||c.layer.Ut))?b:null};dj.prototype.isValidFrom=function(a,b){if(null===a||null===b)return this.yq;if(null!==this.g&&this.g.gb===this&&(null!==a.layer&&!a.layer.Ut||!0!==b.vF))return!1;var c=b.OA;if(Infinity>c){if(null!==this.sc&&a===this.ah&&b===this.bh)return!0;var d=b.ud;null===d&&(d="");if(a.Jx(d).count>=c)return!1}return!0}; +dj.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.yq;if(null!==this.g&&this.g.gb===this&&(null!==a.layer&&!a.layer.Ut||!0!==b.cH))return!1;var c=b.xK;if(Infinity>c){if(null!==this.sc&&a===this.dh&&b===this.eh)return!0;var d=b.ud;null===d&&(d="");if(a.Xg(d).count>=c)return!1}return!0};dj.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.Y,d=b.Y;return null!==c&&c===d}; dj.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.Y;if(!(c instanceof G))return!1;var d=a.ud;null===d&&(d="");var e=b.Y;if(!(e instanceof G))return!1;var g=b.ud;null===g&&(g="");for(e=e.Xg(g);e.next();)if(g=e.value,g.aa===c&&g.dg===d)return!0;return!1}; -dj.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.KI&&d.vK||!this.isInSameNode(b,d))&&(b.JI&&d.uK||!this.isLinked(b,d)))||null!==this.sc&&(null!==a&&this.isLabelDependentOnLink(a,this.sc)||null!==c&&this.isLabelDependentOnLink(c,this.sc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.sc))return!1;if(null!==a){var e=a.iy;if(null!==e&&!e(a,b,c,d,this.sc))return!1}if(null!== +dj.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.KI&&d.wK||!this.isInSameNode(b,d))&&(b.JI&&d.vK||!this.isLinked(b,d)))||null!==this.sc&&(null!==a&&this.isLabelDependentOnLink(a,this.sc)||null!==c&&this.isLabelDependentOnLink(c,this.sc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.sc))return!1;if(null!==a){var e=a.iy;if(null!==e&&!e(a,b,c,d,this.sc))return!1}if(null!== c&&(e=c.iy,null!==e&&!e(a,b,c,d,this.sc)))return!1;e=this.iy;return null!==e?e(a,b,c,d,this.sc):!0};dj.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Ac;if(null===c)return!1;if(c===b)return!0;var d=new L(G);d.add(a);return ej(this,c,b,d)};function ej(a,b,c,d){if(b===c)return!0;var e=b.aa;if(null!==e&&e.uf&&(d.add(e),ej(a,e.Ac,c,d)))return!0;b=b.da;return null!==b&&b.uf&&(d.add(b),ej(a,b.Ac,c,d))?!0:!1} -dj.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.zq;var d=null!==this.g?this.g.CK:fj;if(d!==fj){if(d===gj){if(null!==c&&!c.Vc)return!0;for(d=b.Hd;d.next();){var e=d.value;if(e!==c&&e.Vc&&e.da===b)return!1}return!hj(this,a,b,c,!0)}if(d===ij){if(null!==c&&!c.Vc)return!0;for(d=a.Hd;d.next();)if(e=d.value,e!==c&&e.Vc&&e.aa===a)return!1;return!hj(this,a,b,c,!0)}if(d===jj)return a===b?a=!0:(d=new L(G),d.add(b),a=kj(this,d,a,b,c)),!a;if(d===lj)return!hj(this, +dj.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.yq;var d=null!==this.g?this.g.DK:fj;if(d!==fj){if(d===gj){if(null!==c&&!c.Vc)return!0;for(d=b.Hd;d.next();){var e=d.value;if(e!==c&&e.Vc&&e.da===b)return!1}return!hj(this,a,b,c,!0)}if(d===ij){if(null!==c&&!c.Vc)return!0;for(d=a.Hd;d.next();)if(e=d.value,e!==c&&e.Vc&&e.aa===a)return!1;return!hj(this,a,b,c,!0)}if(d===jj)return a===b?a=!0:(d=new L(G),d.add(b),a=kj(this,d,a,b,c)),!a;if(d===lj)return!hj(this, a,b,c,!1);if(d===mj)return a===b?a=!0:(d=new L(G),d.add(b),a=nj(this,d,a,b,c)),!a}return!0};function hj(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var g=b.Hd;g.next();){var h=g.value;if(h!==d&&(!e||h.Vc)&&h.da===b&&(h=h.aa,h!==b&&hj(a,h,c,d,e)))return!0}return!1}function kj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Hd;g.next();){var h=g.value;if(h!==e&&h.da===c&&(h=h.aa,h!==c&&kj(a,b,h,d,e)))return!0}return!1} function nj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Hd;g.next();){var h=g.value;if(h!==e){var k=h.aa,h=h.da,k=k===c?h:k;if(k!==c&&nj(a,b,k,d,e))return!0}}return!1}D.defineProperty(dj,{iy:"linkValidation"},function(){return this.Il},function(a){null!==a&&D.h(a,"function",dj,"linkValidation");this.Il=a});D.defineProperty(dj,{uy:"portTargeted"},function(){return this.VD},function(a){null!==a&&D.h(a,"function",dj,"portTargeted");this.VD=a}); function ra(){0b.iu+1&&cb.iu+1&&c=c.x)d=0>=c.y?d+225:1<=c.y?d+135:d+180;else if(1<=c.x)0>=c.y?d+=315:1<=c.y&&(d+=45);else if(0>=c.y)d+=270;else if(1<=c.y)d+=90;else break a;0>d?d+=360:360<=d&&(d-=360);a.cursor=22.5>d?"e-resize":67.5>d?"se-resize":112.5>d?"s-resize":157.5>d?"sw-resize":202.5>d?"w-resize":247.5>d?"nw-resize":292.5>d?"n-resize":337.5>d? "ne-resize":"e-resize"}else if(a instanceof x)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};D.defineProperty(Uj,{qu:"handleArchetype"},function(){return this.xl},function(a){null!==a&&D.l(a,P,Uj,"handleArchetype");this.xl=a});D.w(Uj,{handle:"handle"},function(){return this.nc});D.defineProperty(Uj,{zb:"adornedObject"},function(){return this.Qc},function(a){null!==a&&D.l(a,P,Uj,"adornedObject");this.Qc=a}); Uj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.nb&&a.Vt&&a.U.left?null!==this.findToolHandleAt(a.Kc.ha,this.name):!1}; -Uj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.nc=this.findToolHandleAt(a.Kc.ha,this.name),null!==this.nc&&(this.Qc=this.nc.Y.zb,this.Fp.set(this.zb.eb(this.handle.alignment.nG())),this.QD.set(this.Qc.Y.location),this.LD.set(this.Qc.Ea),this.zz=this.computeCellSize(),this.Bz=this.computeMinSize(),this.Az=this.computeMaxSize(),a.jf=!0,this.HD=a.Xa.isEnabled,a.Xa.isEnabled=!1,this.ac(this.name),this.wa=!0))}; -Uj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.dl(),this.Qc=this.nc=null,this.wa=a.jf=!1,a.Xa.isEnabled=this.HD)};Uj.prototype.doCancel=function(){null!==this.zb&&(this.zb.Ea=this.oG,this.zb.Y.location=this.RJ);this.stopTool()};Uj.prototype.doMouseMove=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Bz,c=this.Az,d=this.zz,e=this.zb.xF(a.U.ha,D.O()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);a.hg();D.A(e)}}; +Uj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.nc=this.findToolHandleAt(a.Kc.ha,this.name),null!==this.nc&&(this.Qc=this.nc.Y.zb,this.Ep.set(this.zb.eb(this.handle.alignment.nG())),this.QD.set(this.Qc.Y.location),this.LD.set(this.Qc.Ea),this.zz=this.computeCellSize(),this.Bz=this.computeMinSize(),this.Az=this.computeMaxSize(),a.jf=!0,this.HD=a.Xa.isEnabled,a.Xa.isEnabled=!1,this.ac(this.name),this.wa=!0))}; +Uj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.dl(),this.Qc=this.nc=null,this.wa=a.jf=!1,a.Xa.isEnabled=this.HD)};Uj.prototype.doCancel=function(){null!==this.zb&&(this.zb.Ea=this.oG,this.zb.Y.location=this.SJ);this.stopTool()};Uj.prototype.doMouseMove=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Bz,c=this.Az,d=this.zz,e=this.zb.xF(a.U.ha,D.O()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);a.hg();D.A(e)}}; Uj.prototype.doMouseUp=function(){var a=this.g;if(this.wa&&null!==a){var b=this.Bz,c=this.Az,d=this.zz,e=this.zb.xF(a.U.ha,D.O()),g=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,g);this.resize(b);D.A(e);a.zc();this.Qf=this.name;a.Ja("PartResized",this.zb,this.oG)}this.stopTool()}; -Uj.prototype.resize=function(a){if(null!==this.g){var b=this.zb,c=b.Y;b.Ea=a.size;c.hf();a=this.zb.eb(this.handle.alignment.nG());c instanceof I?(a=c.position.copy().xo(a).add(this.Fp),c.move(a)):c.location=c.location.copy().xo(a).add(this.Fp)}}; +Uj.prototype.resize=function(a){if(null!==this.g){var b=this.zb,c=b.Y;b.Ea=a.size;c.hf();a=this.zb.eb(this.handle.alignment.nG());c instanceof I?(a=c.position.copy().wo(a).add(this.Ep),c.move(a)):c.location=c.location.copy().wo(a).add(this.Ep)}}; Uj.prototype.computeResize=function(a,b,c,d,e,g){b.Zd()&&(b=hc);var h=this.zb.Ga,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!g){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=D.O();fb(a.x,a.y,k,l,e.width,e.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p=b.y?(a.width=Math.max(Math.min(q.x-k,d.width),c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height), a.height=Math.max(n-a.y,c.height),g||(b=a.height/a.width,p=b.y?(a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=n-a.y,g||(a.width=a.height/p,a.x= k+.5*(m-k-a.width))):1<=b.y&&(a.height=Math.max(Math.min(q.y-l,d.height),c.height),g||(a.width=a.height/p,a.x=k+.5*(m-k-a.width)));D.A(q);return a};Uj.prototype.computeReshape=function(){var a=Xj;this.zb instanceof z&&(a=Yj(this.zb));return!(a===Zj||a===ak||null!==this.g&&this.g.U.shift)};Uj.prototype.computeMinSize=function(){var a=this.zb.ig.copy(),b=this.ig;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; Uj.prototype.computeMaxSize=function(){var a=this.zb.kf.copy(),b=this.kf;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.nK),180),c=Math.min(Math.abs(this.mK),b/2);(null===this.g||!this.g.U.shift)&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};D.defineProperty(bk,{nK:"snapAngleMultiple"},function(){return this.aE},function(a){D.h(a,"number",bk,"snapAngleMultiple");this.aE=a}); -D.defineProperty(bk,{mK:"snapAngleEpsilon"},function(){return this.$D},function(a){D.h(a,"number",bk,"snapAngleEpsilon");this.$D=a});D.w(bk,{fM:"originalAngle"},function(){return this.Bw});function dk(){Vg.call(this);0a&&(a+=360));var b=Math.min(Math.abs(this.oK),180),c=Math.min(Math.abs(this.nK),b/2);(null===this.g||!this.g.U.shift)&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};D.defineProperty(bk,{oK:"snapAngleMultiple"},function(){return this.aE},function(a){D.h(a,"number",bk,"snapAngleMultiple");this.aE=a}); +D.defineProperty(bk,{nK:"snapAngleEpsilon"},function(){return this.$D},function(a){D.h(a,"number",bk,"snapAngleEpsilon");this.$D=a});D.w(bk,{gM:"originalAngle"},function(){return this.Bw});function dk(){Vg.call(this);0e.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ya.U.Oe?!1:!0};ok.prototype.doStart=function(){this.wa||null===this.ih||this.doActivate()}; -ok.prototype.doActivate=function(){if(!this.wa){var a=this.g;if(null!==a){var b=this.ih;null===b&&(b=a.Ge(a.U.ha,function(a){return a instanceof na?a:null}));if(null!==b&&(this.ih=b,null!==b.Y)){this.wa=!0;this.$a=xk;var c=this.rI;null!==b.bH&&(c=b.bH);this.Ck=this.ih.copy();var d=new B(this.ih.eb(dc),this.ih.eb(uc));a.gK(d);if(c instanceof fk)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();"function"=== -typeof c.focus&&c.focus();"function"===typeof c.select&&this.Fy&&(c.select(),c.setSelectionRange(0,9999));a.Ej.appendChild(c)}this.Cj=c}}}};ok.prototype.doCancel=function(){null!==this.Nl&&this.Cj instanceof HTMLElement&&(this.Cj.style.border=this.Nl,this.Nl=null);this.stopTool()};ok.prototype.doMouseUp=function(){!this.wa&&this.canStart()&&this.doActivate()};ok.prototype.doMouseDown=function(){this.wa&&this.acceptText(tk)}; -ok.prototype.acceptText=function(a){switch(a){case tk:if(this.$a===Bk)this.Cj instanceof HTMLElement&&this.Cj.focus();else if(this.$a===xk||this.$a===Ak||this.$a===yk)this.$a=zk,Ek(this);break;case sk:case vk:case uk:if(vk===a&&!0===this.hA.Zx)break;if(this.$a===xk||this.$a===Ak||this.$a===yk)this.$a=zk,Ek(this)}}; -function Ek(a){var b=a.ih,c=a.g,d=a.Cj;if(null!==b&&null!==d){var e=b.text,g="";d instanceof fk?null!==d.bC&&(g=d.bC()):(g=d.value,g="function"===typeof g?g():g);a.isValidText(b,e,g)?(a.ac(a.name),a.$a=Bk,d instanceof fk?d.show(b,c,a):null!==a.Nl&&(d.style.border=a.Nl,a.Nl=null),a.Qf=a.name,b.text=g,null!==b.aH&&b.aH(b,e,g),null!==c&&c.Ja("TextEdited",b,e),a.dl(),a.stopTool(),null!==c&&c.doFocus()):(a.$a=Ak,null!==b.KA&&b.KA(a,e,g),d instanceof fk?d.show(b,c,a):(null===a.Nl&&(a.Nl=d.style.border, -d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}}ok.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.$a=qk;this.ih=null;if(null!==this.Cj){var b=this.Cj;if(b instanceof fk)b.Yn(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.Ej.removeChild(b)}}this.wa=!1}};ok.prototype.doFocus=function(){v&&D.Pn("TextEditingTool.doFocus","2.0");Ck(this)};ok.prototype.doBlur=function(){v&&D.Pn("TextEditingTool.doBlur","2.0");Dk(this)}; -function Ck(a){if(null!==a.Cj){var b=a.nz;a.$a===xk&&(a.$a=yk);"function"===typeof b.select&&a.Fy&&(b.select(),b.setSelectionRange(0,9999))}}function Dk(a){if(null!==a.Cj){var b=a.nz;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.Fy&&(b.select(),b.setSelectionRange(0,9999))}}ok.prototype.isValidText=function(a,b,c){D.l(a,na,ok,"isValidText:textblock");var d=this.RB;if(null!==d&&!d(a,b,c))return!1;d=a.RB;return null===d||d(a,b,c)?!0:!1}; +ok.prototype.doActivate=function(){if(!this.wa){var a=this.g;if(null!==a){var b=this.ih;null===b&&(b=a.Ge(a.U.ha,function(a){return a instanceof na?a:null}));if(null!==b&&(this.ih=b,null!==b.Y)){this.wa=!0;this.$a=xk;var c=this.rI;null!==b.bH&&(c=b.bH);this.Ck=this.ih.copy();var d=new B(this.ih.eb(dc),this.ih.eb(uc));a.hK(d);if(c instanceof fk)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();"function"=== +typeof c.focus&&c.focus();"function"===typeof c.select&&this.Fy&&(c.select(),c.setSelectionRange(0,9999));a.Dj.appendChild(c)}this.Bj=c}}}};ok.prototype.doCancel=function(){null!==this.Nl&&this.Bj instanceof HTMLElement&&(this.Bj.style.border=this.Nl,this.Nl=null);this.stopTool()};ok.prototype.doMouseUp=function(){!this.wa&&this.canStart()&&this.doActivate()};ok.prototype.doMouseDown=function(){this.wa&&this.acceptText(tk)}; +ok.prototype.acceptText=function(a){switch(a){case tk:if(this.$a===Bk)this.Bj instanceof HTMLElement&&this.Bj.focus();else if(this.$a===xk||this.$a===Ak||this.$a===yk)this.$a=zk,Ek(this);break;case sk:case vk:case uk:if(vk===a&&!0===this.hA.Zx)break;if(this.$a===xk||this.$a===Ak||this.$a===yk)this.$a=zk,Ek(this)}}; +function Ek(a){var b=a.ih,c=a.g,d=a.Bj;if(null!==b&&null!==d){var e=b.text,g="";d instanceof fk?null!==d.bC&&(g=d.bC()):(g=d.value,g="function"===typeof g?g():g);a.isValidText(b,e,g)?(a.ac(a.name),a.$a=Bk,d instanceof fk?d.show(b,c,a):null!==a.Nl&&(d.style.border=a.Nl,a.Nl=null),a.Qf=a.name,b.text=g,null!==b.aH&&b.aH(b,e,g),null!==c&&c.Ja("TextEdited",b,e),a.dl(),a.stopTool(),null!==c&&c.doFocus()):(a.$a=Ak,null!==b.KA&&b.KA(a,e,g),d instanceof fk?d.show(b,c,a):(null===a.Nl&&(a.Nl=d.style.border, +d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}}ok.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.$a=qk;this.ih=null;if(null!==this.Bj){var b=this.Bj;if(b instanceof fk)b.Xn(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.Dj.removeChild(b)}}this.wa=!1}};ok.prototype.doFocus=function(){v&&D.Pn("TextEditingTool.doFocus","2.0");Ck(this)};ok.prototype.doBlur=function(){v&&D.Pn("TextEditingTool.doBlur","2.0");Dk(this)}; +function Ck(a){if(null!==a.Bj){var b=a.nz;a.$a===xk&&(a.$a=yk);"function"===typeof b.select&&a.Fy&&(b.select(),b.setSelectionRange(0,9999))}}function Dk(a){if(null!==a.Bj){var b=a.nz;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.Fy&&(b.select(),b.setSelectionRange(0,9999))}}ok.prototype.isValidText=function(a,b,c){D.l(a,na,ok,"isValidText:textblock");var d=this.RB;if(null!==d&&!d(a,b,c))return!1;d=a.RB;return null===d||d(a,b,c)?!0:!1}; D.defineProperty(ok,{RB:"textValidation"},function(){return this.Sl},function(a){null!==a&&D.h(a,"function",ok,"textValidation");this.Sl=a});D.defineProperty(ok,{iG:"minimumEditorScale"},function(){return this.BD},function(a){null!==a&&D.h(a,"number",ok,"minimumEditorScale");this.BD=a});D.defineProperty(ok,{Fy:"selectsTextOnActivate"},function(){return this.YD},function(a){null!==a&&D.h(a,"boolean",ok,"selectsTextOnActivate");this.YD=a}); -D.defineProperty(ok,{state:"state"},function(){return this.$a},function(a){this.$a!==a&&(D.Da(a,ok,ok,"starting"),this.$a=a)});ok.prototype.measureTemporaryTextBlock=ok.prototype.FJ=function(a){var b=this.Ck;b.text=a;Fk(b,this.ih.wp,Infinity);return b};function Lh(){Vg.call(this);this.name="ToolManager";this.xH=new K(Vg);this.yH=new K(Vg);this.zH=new K(Vg);this.fD=this.gD=850;this.VC=(new Ca(2,2)).Na();this.qE=5E3;this.FD=Wh;this.dD=Gk;this.Jv=this.JC=null;this.xn=-1}D.Sa(Lh,Vg); +D.defineProperty(ok,{state:"state"},function(){return this.$a},function(a){this.$a!==a&&(D.Da(a,ok,ok,"starting"),this.$a=a)});ok.prototype.measureTemporaryTextBlock=ok.prototype.GJ=function(a){var b=this.Ck;b.text=a;Fk(b,this.ih.vp,Infinity);return b};function Lh(){Vg.call(this);this.name="ToolManager";this.xH=new K(Vg);this.yH=new K(Vg);this.zH=new K(Vg);this.fD=this.gD=850;this.VC=(new Ca(2,2)).Na();this.qE=5E3;this.FD=Wh;this.dD=Gk;this.Jv=this.JC=null;this.xn=-1}D.Sa(Lh,Vg); D.ja("ToolManager",Lh);var Wh;Lh.WheelScroll=Wh=D.s(Lh,"WheelScroll",0);var Vh;Lh.WheelZoom=Vh=D.s(Lh,"WheelZoom",1);Lh.WheelNone=D.s(Lh,"WheelNone",2);var Gk;Lh.GestureZoom=Gk=D.s(Lh,"GestureZoom",3);var Hk;Lh.GestureCancel=Hk=D.s(Lh,"GestureCancel",4);var Ik;Lh.GestureNone=Ik=D.s(Lh,"GestureNone",5);D.defineProperty(Lh,{Ku:"mouseWheelBehavior"},function(){return this.FD},function(a){D.Da(a,Lh,Lh,"mouseWheelBehavior");this.FD=a}); -D.defineProperty(Lh,{qq:"gestureBehavior"},function(){return this.dD},function(a){D.Da(a,Lh,Lh,"gestureBehavior");this.dD=a});Lh.prototype.initializeStandardTools=function(){this.JH=new ek;this.uG=new ai;this.xJ=new Cj;this.HG=new Uj;this.dK=new bk;this.eG=new ra;this.De=new Qh;this.vI=new mk;this.SJ=new nk;this.yA=new hk;this.QB=new ok;this.$H=new ta;this.aI=new dk}; +D.defineProperty(Lh,{pq:"gestureBehavior"},function(){return this.dD},function(a){D.Da(a,Lh,Lh,"gestureBehavior");this.dD=a});Lh.prototype.initializeStandardTools=function(){this.JH=new ek;this.uG=new ai;this.yJ=new Cj;this.HG=new Uj;this.eK=new bk;this.eG=new ra;this.De=new Qh;this.vI=new mk;this.TJ=new nk;this.yA=new hk;this.QB=new ok;this.$H=new ta;this.aI=new dk}; Lh.prototype.updateAdornments=function(a){var b=this.fm;if(b instanceof da&&this.Jv===a){var c=b.zb;(null!==a?c.Y===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -Lh.prototype.doMouseDown=function(){var a=this.g;if(null!==a){var b=a.U;b.Mj&&this.qq===Hk&&(b.bubbles=!1);if(b.yu){this.cancelWaitAfter();if(this.qq===Ik){b.bubbles=!0;return}if(this.qq===Hk)return;if(a.gb.canStartMultiTouch()){a.gb.standardPinchZoomStart();return}}var c=a.ra;c.uA&&0!==c.Wh&&D.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var c=this.lf.length,d=0;de.right&&(c.x-=d.width+5);c.xe.bottom?c.y-(d.height+5):c.y+20;c.ye.right&&(c.x-=d.width+5);c.xe.bottom?c.y-(d.height+5):c.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}D.w(gh,{bL:"animationReasons"},function(){return this.vv}); -gh.prototype.canStart=function(){return!0};gh.prototype.prepareAutomaticAnimation=gh.prototype.qo=function(a){this.mf&&(this.ok||this.ba.ao)&&(this.vv.add(a),this.canStart(a)&&(this.nk&&this.Ii(),this.wc=!0))};function cl(a){if(a.mf&&(a.vv.clear(),a.wc))if(!a.Jo)a.wc=!1;else if(0===a.Io){var b=+new Date;a.Io=b;requestAnimationFrame(function(){if(!1!==a.wc&&!a.nk&&a.Io===b){var c=a.ba;c.Hj("temporaryPixelRatio")&&(c.Bk=1);dl(c);a.wc=!1;c.Ja("AnimationStarting");el(a,b)}})}} +D.defineProperty(Lh,{yK:"toolTipDuration"},function(){return this.qE},function(a){D.h(a,"number",Lh,"toolTipDuration");this.qE=a});D.defineProperty(Lh,{JH:"actionTool"},function(){return this.findTool("Action")},function(a){Vk(this,"Action",a,this.lf)});D.defineProperty(Lh,{uG:"relinkingTool"},function(){return this.findTool("Relinking")},function(a){Vk(this,"Relinking",a,this.lf)}); +D.defineProperty(Lh,{yJ:"linkReshapingTool"},function(){return this.findTool("LinkReshaping")},function(a){Vk(this,"LinkReshaping",a,this.lf)});D.defineProperty(Lh,{HG:"resizingTool"},function(){return this.findTool("Resizing")},function(a){Vk(this,"Resizing",a,this.lf)});D.defineProperty(Lh,{eK:"rotatingTool"},function(){return this.findTool("Rotating")},function(a){Vk(this,"Rotating",a,this.lf)}); +D.defineProperty(Lh,{eG:"linkingTool"},function(){return this.findTool("Linking")},function(a){Vk(this,"Linking",a,this.jg)});D.defineProperty(Lh,{De:"draggingTool"},function(){return this.findTool("Dragging")},function(a){Vk(this,"Dragging",a,this.jg)});D.defineProperty(Lh,{vI:"dragSelectingTool"},function(){return this.findTool("DragSelecting")},function(a){Vk(this,"DragSelecting",a,this.jg)}); +D.defineProperty(Lh,{TJ:"panningTool"},function(){return this.findTool("Panning")},function(a){Vk(this,"Panning",a,this.jg)});D.defineProperty(Lh,{yA:"contextMenuTool"},function(){return this.findTool("ContextMenu")},function(a){Vk(this,"ContextMenu",a,this.kg)});D.defineProperty(Lh,{QB:"textEditingTool"},function(){return this.findTool("TextEditing")},function(a){Vk(this,"TextEditing",a,this.kg)}); +D.defineProperty(Lh,{$H:"clickCreatingTool"},function(){return this.findTool("ClickCreating")},function(a){Vk(this,"ClickCreating",a,this.kg)});D.defineProperty(Lh,{aI:"clickSelectingTool"},function(){return this.findTool("ClickSelecting")},function(a){Vk(this,"ClickSelecting",a,this.kg)}); +function gh(){this.KC=al;this.Gr=this.Hr=this.ba=null;this.Ho=this.Ir=this.Jr=0;this.Io=this.wc=this.pp=this.nk=!1;this.ok=this.mf=!0;this.Hv=this.Gv=this.FC=null;this.EC=0;this.Iv=null;this.vv=new L("string");this.wz=600;this.AH=new O(0,0);this.tC=this.sC=this.uE=!1;this.gn=new ma(P,bl)}D.ja("AnimationManager",gh);gh.prototype.Yc=function(a){this.ba=a};function al(a,b,c,d){a/=d/2;return 1>a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}D.w(gh,{cL:"animationReasons"},function(){return this.vv}); +gh.prototype.canStart=function(){return!0};gh.prototype.prepareAutomaticAnimation=gh.prototype.po=function(a){this.mf&&(this.ok||this.ba.$n)&&(this.vv.add(a),this.canStart(a)&&(this.nk&&this.Hi(),this.wc=!0))};function cl(a){if(a.mf&&(a.vv.clear(),a.wc))if(!a.Io)a.wc=!1;else if(0===a.Ho){var b=+new Date;a.Ho=b;requestAnimationFrame(function(){if(!1!==a.wc&&!a.nk&&a.Ho===b){var c=a.ba;c.Gj("temporaryPixelRatio")&&(c.Bk=1);dl(c);a.wc=!1;c.Ja("AnimationStarting");el(a,b)}})}} function fl(a,b,c,d,e,g){if(a.wc&&(v&&D.l(b,P,gh,"addPropToAnimation:obj"),!("position"===c&&d.P(e)||b instanceof F&&!b.NF))){var h=a.gn;if(h.contains(b)){var h=h.na(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=gl(d));h.yx&&void 0!==l[c]?h.eu[c]=gl(e):(g||(h.eu[c]=gl(e)),l[c]=gl(e));g&&0===c.indexOf("position:")&&b instanceof F&&(h.eu.location=gl(b.location))}else k=new la,l=new la,k[c]=gl(d),l[c]=gl(e),d=l,e=k.position,e instanceof O&&!e.F()&&a.vv.contains("Expand SubGraph")&&e.assign(d.position),k= -new bl(k,l,g),g&&0===c.indexOf("position:")&&b instanceof F&&(k.eu.location=gl(b.location)),h.add(b,k);a.Jo=!0}}function gl(a){return a instanceof O?a.copy():a instanceof Ca?a.copy():a} -function el(a,b){var c;function d(){if(!1!==g.nk&&g.Io===b){var a=+new Date,c=a>s?m:a-r;hl(g);il(g,e,q,h,c,m);g.Gv&&g.Gv();bj(e);jl(g);a>s?kl(g):requestAnimationFrame(d)}}void 0===c&&(c=new la);var e=a.ba;if(null!==e){a.nk=!0;var g=a,h=c.EL||a.KC,k=c.dM||null,l=c.eM||null,m=c.duration||a.wz,n=a.AH;for(c=a.gn.j;c.next();){var p=c.value.start.position;p instanceof O&&(p.F()||p.assign(n))}a.FC=h;a.Gv=k;a.Hv=l;a.EC=m;a.Iv=a.gn;var q=a.Iv;for(c=q.j;c.next();)k=c.value.end,k["position:placeholder"]&&(l= -k["position:placeholder"],n=l.eb(dc),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n);hl(a);il(a,e,q,h,0,m);bj(a.ba);jl(a);var r=+new Date,s=r+m;g.Io===b&&requestAnimationFrame(function(){d()})}}function hl(a){if(!a.qp){var b=a.ba;a.uE=b.Eb;a.sC=b.Ue;a.tC=b.cv;b.Eb=!0;b.Ue=!0;b.cv=!0;a.qp=!0}}function jl(a){var b=a.ba;b.Eb=a.uE;b.Ue=a.sC;b.cv=a.tC;a.qp=!1} +new bl(k,l,g),g&&0===c.indexOf("position:")&&b instanceof F&&(k.eu.location=gl(b.location)),h.add(b,k);a.Io=!0}}function gl(a){return a instanceof O?a.copy():a instanceof Ca?a.copy():a} +function el(a,b){var c;function d(){if(!1!==g.nk&&g.Ho===b){var a=+new Date,c=a>s?m:a-r;hl(g);il(g,e,q,h,c,m);g.Gv&&g.Gv();bj(e);jl(g);a>s?kl(g):requestAnimationFrame(d)}}void 0===c&&(c=new la);var e=a.ba;if(null!==e){a.nk=!0;var g=a,h=c.FL||a.KC,k=c.eM||null,l=c.fM||null,m=c.duration||a.wz,n=a.AH;for(c=a.gn.j;c.next();){var p=c.value.start.position;p instanceof O&&(p.F()||p.assign(n))}a.FC=h;a.Gv=k;a.Hv=l;a.EC=m;a.Iv=a.gn;var q=a.Iv;for(c=q.j;c.next();)k=c.value.end,k["position:placeholder"]&&(l= +k["position:placeholder"],n=l.eb(dc),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n);hl(a);il(a,e,q,h,0,m);bj(a.ba);jl(a);var r=+new Date,s=r+m;g.Ho===b&&requestAnimationFrame(function(){d()})}}function hl(a){if(!a.pp){var b=a.ba;a.uE=b.Eb;a.sC=b.Ue;a.tC=b.cv;b.Eb=!0;b.Ue=!0;b.cv=!0;a.pp=!0}}function jl(a){var b=a.ba;b.Eb=a.uE;b.Ue=a.sC;b.cv=a.tC;a.pp=!1} function il(a,b,c,d,e,g){for(c=c.j;c.next();){var h=c.key,k=c.value,l=k.start,k=k.end,m;for(m in k)if(("position"!==m||!k["position:placeholder"]&&!k["position:node"])&&void 0!==ll[m])ll[m](h,l[m],k[m],d,e,g)}d=b.aB;b.aB=!0;m=a.KC;0!==a.Jr&&0!==a.Ir&&(c=a.Jr,b.Bb=m(e,c,a.Ir-c,g));null!==a.Hr&&null!==a.Gr&&(c=a.Hr,a=a.Gr,b.rb=new O(m(e,c.x,a.x-c.x,g),m(e,c.y,a.y-c.y,g)));b.aB=d} -gh.prototype.stopAnimation=gh.prototype.Ii=function(){!0===this.wc&&(this.wc=!1,this.Jo&&this.ba.Se());this.nk&&this.mf&&kl(this)}; -function kl(a){a.nk=!1;a.Jo=!1;hl(a);for(var b=a.ba,c=a.FC,d=a.EC,e=a.Iv.j;e.next();){var g=e.key,h=e.value,k=h.start,l=h.end,m=h.eu,n;for(n in l)if(void 0!==ll[n]){var p=n;!h.yx||"position:node"!==p&&"position:placeholder"!==p||(p="position");ll[p](g,k[n],void 0!==m[n]?m[n]:h.yx?k[n]:l[n],c,d,d)}h.yx&&void 0!==m.location&&g instanceof F&&(g.location=m.location);h.xy&&g instanceof F&&g.Jd(!1)}for(c=a.ba.links;c.next();)d=c.value,null!==d.Kp&&(d.points=d.Kp,d.Kp=null);b.jy.clear();b.Bk=null;b.zc(); -b.qa();b.hg();ml(b);jl(a);a.Hv&&a.Hv();a.Io=0;a.Iv=null;a.Hv=null;a.Gv=null;a.Hr=null;a.Gr=null;a.Jr=0;a.Ir=0;a.gn=new ma(P,bl);b.Ja("AnimationFinished");b.Se()} +gh.prototype.stopAnimation=gh.prototype.Hi=function(){!0===this.wc&&(this.wc=!1,this.Io&&this.ba.Se());this.nk&&this.mf&&kl(this)}; +function kl(a){a.nk=!1;a.Io=!1;hl(a);for(var b=a.ba,c=a.FC,d=a.EC,e=a.Iv.j;e.next();){var g=e.key,h=e.value,k=h.start,l=h.end,m=h.eu,n;for(n in l)if(void 0!==ll[n]){var p=n;!h.yx||"position:node"!==p&&"position:placeholder"!==p||(p="position");ll[p](g,k[n],void 0!==m[n]?m[n]:h.yx?k[n]:l[n],c,d,d)}h.yx&&void 0!==m.location&&g instanceof F&&(g.location=m.location);h.xy&&g instanceof F&&g.Jd(!1)}for(c=a.ba.links;c.next();)d=c.value,null!==d.Jp&&(d.points=d.Jp,d.Jp=null);b.jy.clear();b.Bk=null;b.zc(); +b.qa();b.hg();ml(b);jl(a);a.Hv&&a.Hv();a.Ho=0;a.Iv=null;a.Hv=null;a.Gv=null;a.Hr=null;a.Gr=null;a.Jr=0;a.Ir=0;a.gn=new ma(P,bl);b.Ja("AnimationFinished");b.Se()} function nl(a,b,c){var d=b.$,e=c.$,g=null;c instanceof I&&(g=c.placeholder);null!==g?(d=g.eb(dc),d.x+=g.padding.left,d.y+=g.padding.top,fl(a,b,"position",d,b.position,!1)):fl(a,b,"position",new O(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);fl(a,b,"scale",.01,b.scale,!1);if(b instanceof I)for(b=b.Nc;b.next();)g=b.value,g instanceof G&&nl(a,g,c)} -function ol(a,b,c){if(b.isVisible()){var d=null;c instanceof I&&(d=c.placeholder);null!==d?fl(a,b,"position:placeholder",b.position,d,!0):fl(a,b,"position:node",b.position,c,!0);fl(a,b,"scale",b.scale,.01,!0);a.wc&&(d=a.gn,d.contains(b)&&(d.na(b).xy=!0));if(b instanceof I)for(b=b.Nc;b.next();)d=b.value,d instanceof G&&ol(a,d,c)}}function pl(a,b,c){a.wc&&(null===a.Hr&&b.F()&&null===a.Gr&&(a.Hr=b.copy()),a.Gr=c.copy(),a.Jo=!0)} -function ql(a,b,c){a.wc&&a.ba.ao&&(0===a.Jr&&0===a.Ir&&(a.Jr=b),a.Ir=c,a.Jo=!0)}D.defineProperty(gh,{isEnabled:"isEnabled"},function(){return this.mf},function(a){D.h(a,"boolean",gh,"isEnabled");this.mf=a});D.defineProperty(gh,{duration:"duration"},function(){return this.wz},function(a){D.h(a,"number",gh,"duration");1>a&&D.ua(a,">= 1",gh,"duration");this.wz=a});D.w(gh,{tf:"isAnimating"},function(){return this.nk});D.w(gh,{oJ:"isTicking"},function(){return this.qp}); +function ol(a,b,c){if(b.isVisible()){var d=null;c instanceof I&&(d=c.placeholder);null!==d?fl(a,b,"position:placeholder",b.position,d,!0):fl(a,b,"position:node",b.position,c,!0);fl(a,b,"scale",b.scale,.01,!0);a.wc&&(d=a.gn,d.contains(b)&&(d.na(b).xy=!0));if(b instanceof I)for(b=b.Nc;b.next();)d=b.value,d instanceof G&&ol(a,d,c)}}function pl(a,b,c){a.wc&&(null===a.Hr&&b.F()&&null===a.Gr&&(a.Hr=b.copy()),a.Gr=c.copy(),a.Io=!0)} +function ql(a,b,c){a.wc&&a.ba.$n&&(0===a.Jr&&0===a.Ir&&(a.Jr=b),a.Ir=c,a.Io=!0)}D.defineProperty(gh,{isEnabled:"isEnabled"},function(){return this.mf},function(a){D.h(a,"boolean",gh,"isEnabled");this.mf=a});D.defineProperty(gh,{duration:"duration"},function(){return this.wz},function(a){D.h(a,"number",gh,"duration");1>a&&D.ua(a,">= 1",gh,"duration");this.wz=a});D.w(gh,{tf:"isAnimating"},function(){return this.nk});D.w(gh,{pJ:"isTicking"},function(){return this.pp}); D.defineProperty(gh,{VF:"isInitial"},function(){return this.ok},function(a){D.h(a,"boolean",gh,"isInitial");this.ok=a});function bl(a,b,c){this.start=a;this.end=b;this.eu=new la;this.yx=c;this.xy=!1} var ll={opacity:function(a,b,c,d,e,g){a.opacity=d(e,b,c-b,g)},position:function(a,b,c,d,e,g){e!==g?a.Jy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)):a.position=new O(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},"position:node":function(a,b,c,d,e,g){var h=a.$,k=c.$;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==g?a.Jy(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g)):a.position=new O(d(e,b.x,c-b.x,g),d(e,b.y,h-b.y,g))},"position:placeholder":function(a,b,c,d,e,g){e!==g?a.Jy(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)): a.position=new O(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g))},scale:function(a,b,c,d,e,g){a.scale=d(e,b,c-b,g)},visible:function(a,b,c,d,e,g){a.visible=e!==g?b:c}};function Ug(){0=d.count)a=d.count;else if(d.ea(a)===b)return-1;d.Xd(a,b);b.ru(c);d=this.g;null!==d&&(c?d.qa():d.tq(b));wl(this,a,b);return a}; +f.i=function(a,b,c,d,e){var g=this.g;null!==g&&g.hd(bg,a,this,b,c,d,e)};f.sq=function(a,b,c){var d=this.qb;b.lw=this;if(a>=d.count)a=d.count;else if(d.ea(a)===b)return-1;d.Xd(a,b);b.ru(c);d=this.g;null!==d&&(c?d.qa():d.sq(b));wl(this,a,b);return a}; f.sf=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.sf(a,b,c);var d=this.qb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.ea(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.su(c);d.jd(a);d=this.g;null!==d&&(c?d.qa():d.sf(b));b.lw=null;return a}; -function wl(a,b,c){b=xl(a,b,c);if(c instanceof I&&null!==c&&isNaN(c.Do)){if(0!==c.Nc.count){for(var d=-1,e=a.qb.o,g=e.length,h=0;hd&&k.Pa===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var g=b-1,h=NaN;0<=g;){h=a.ea(g).Do;if(!isNaN(h))break;g--}for(var k=b+1,l=NaN;kd)for(;;){if(-1===g||h<=d){g++;if(g===b)break;a.jd(b);a.Xd(g,c);return g}for(h=NaN;0<=--g&&(h=a.ea(g).Do,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.jd(b);a.Xd(k,c);return k}for(l=NaN;++kd&&k.Ra===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var g=b-1,h=NaN;0<=g;){h=a.ea(g).Co;if(!isNaN(h))break;g--}for(var k=b+1,l=NaN;kd)for(;;){if(-1===g||h<=d){g++;if(g===b)break;a.jd(b);a.Xd(g,c);return g}for(h=NaN;0<=--g&&(h=a.ea(g).Co,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.jd(b);a.Xd(k,c);return k}for(l=NaN;++ka||1parseInt(e[1],10)&&(D.trace("Warning: You have entered a license key for GoJS version 1.7 or later, but this library is version "+ -D.vfo+". This license key will do nothing until you upgrade to GoJS 1.7 or later."),D.Dx.licenseKey=!0);this.Fl=1;this.Ym=0;this.wD=new O;this.sE=500;this.xv=new O;this.ut=null;this.Cl=!1;this.preventDefault=this.wy=this.qG=this.rG=this.pG=this.mo=this.$g=this.no=this.ko=this.lo=this.dC=this.UB=this.VB=this.WB=this.Ql=this.ht=this.Pl=this.gt=null;this.zl=new Kl;void 0!==a&&Ll(this,a);this.fw=!1;this.GD=1;this.$c=!1}D.ja("Diagram",E); -E.prototype.clear=E.prototype.clear=function(){var a=null;null!==this.Ad&&(a=this.Ad.Y);this.ga.clear();for(var b=this.cc.length,c=0;cparseInt(e[1],10)&&(D.trace("Warning: You have entered a license key for GoJS version 1.7 or later, but this library is version "+ +D.vfo+". This license key will do nothing until you upgrade to GoJS 1.7 or later."),D.Dx.licenseKey=!0);this.Fl=1;this.Ym=0;this.wD=new O;this.sE=500;this.xv=new O;this.ut=null;this.Cl=!1;this.preventDefault=this.wy=this.qG=this.rG=this.pG=this.lo=this.$g=this.mo=this.jo=this.ko=this.dC=this.UB=this.VB=this.WB=this.Ql=this.ht=this.Pl=this.gt=null;this.zl=new Kl;void 0!==a&&Ll(this,a);this.fw=!1;this.GD=1;this.$c=!1}D.ja("Diagram",E); +E.prototype.clear=E.prototype.clear=function(){var a=null;null!==this.Ad&&(a=this.Ad.Y);this.ga.clear();for(var b=this.cc.length,c=0;c=a)return b;for(var c=this.cc.j;c.next();)b+="\n "+c.value.toString(a-1);return b};E.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.ba instanceof E?b.ba:null}; -D.defineProperty(E,{Ej:"div"},function(){return this.Sb},function(a){null!==a&&D.l(a,HTMLDivElement,E,"div");if(this.Sb!==a){zl=[];var b=this.Sb;null!==b?(b.ba=void 0,b.innerHTML="",null!==this.Mb&&(this.Mb.removeEventListener("touchstart",this.WB,!1),this.Mb.removeEventListener("touchmove",this.VB,!1),this.Mb.removeEventListener("touchend",this.UB,!1),this.Mb.Ud.ba=null),b=this.kb,null!==b&&(b.lf.each(function(a){a.cancelWaitAfter()}),b.jg.each(function(a){a.cancelWaitAfter()}),b.kg.each(function(a){a.cancelWaitAfter()})), -b.cancelWaitAfter(),this.gb.doCancel(),this.od=this.Mb=null,window.removeEventListener("resize",this.dC,!1),window.removeEventListener("mousemove",this.lo,!0),window.removeEventListener("mousedown",this.ko,!0),window.removeEventListener("mouseup",this.no,!0),window.removeEventListener("mousewheel",this.$g,!0),window.removeEventListener("DOMMouseScroll",this.$g,!0),window.removeEventListener("mouseout",this.mo,!0)):this.th=!1;this.Sb=null;if(null!==a){if(b=a.ba)b.Ej=null;Ll(this,a);this.Gq()}}}); -function Ol(a){var b=a.Mb;b.addEventListener("touchstart",a.WB,!1);b.addEventListener("touchmove",a.VB,!1);b.addEventListener("touchend",a.UB,!1);b.addEventListener("mousemove",a.lo,!1);b.addEventListener("mousedown",a.ko,!1);b.addEventListener("mouseup",a.no,!1);b.addEventListener("mousewheel",a.$g,!1);b.addEventListener("DOMMouseScroll",a.$g,!1);b.addEventListener("mouseout",a.mo,!1);b.addEventListener("keydown",a.qJ,!1);b.addEventListener("keyup",a.rJ,!1);b.addEventListener("selectstart",function(a){a.preventDefault(); -return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.kb.qq===Hk&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.pG,!1);b.addEventListener("pointermove",a.rG,!1);b.addEventListener("pointerleave",a.qG,!1);window.addEventListener("resize",a.dC,!1)}E.prototype.computePixelRatio=function(){return null!==this.Bk?this.Bk:this.GD};E.prototype.doMouseMove=function(){this.gb.doMouseMove()}; +E.prototype.toString=function(a){void 0===a&&(a=0);var b="";this.Dj&&this.Dj.id&&(b=this.Dj.id);b='Diagram "'+b+'"';if(0>=a)return b;for(var c=this.cc.j;c.next();)b+="\n "+c.value.toString(a-1);return b};E.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.ba instanceof E?b.ba:null}; +D.defineProperty(E,{Dj:"div"},function(){return this.Sb},function(a){null!==a&&D.l(a,HTMLDivElement,E,"div");if(this.Sb!==a){zl=[];var b=this.Sb;null!==b?(b.ba=void 0,b.innerHTML="",null!==this.Mb&&(this.Mb.removeEventListener("touchstart",this.WB,!1),this.Mb.removeEventListener("touchmove",this.VB,!1),this.Mb.removeEventListener("touchend",this.UB,!1),this.Mb.Ud.ba=null),b=this.kb,null!==b&&(b.lf.each(function(a){a.cancelWaitAfter()}),b.jg.each(function(a){a.cancelWaitAfter()}),b.kg.each(function(a){a.cancelWaitAfter()})), +b.cancelWaitAfter(),this.gb.doCancel(),this.od=this.Mb=null,window.removeEventListener("resize",this.dC,!1),window.removeEventListener("mousemove",this.ko,!0),window.removeEventListener("mousedown",this.jo,!0),window.removeEventListener("mouseup",this.mo,!0),window.removeEventListener("mousewheel",this.$g,!0),window.removeEventListener("DOMMouseScroll",this.$g,!0),window.removeEventListener("mouseout",this.lo,!0)):this.th=!1;this.Sb=null;if(null!==a){if(b=a.ba)b.Dj=null;Ll(this,a);this.Gq()}}}); +function Ol(a){var b=a.Mb;b.addEventListener("touchstart",a.WB,!1);b.addEventListener("touchmove",a.VB,!1);b.addEventListener("touchend",a.UB,!1);b.addEventListener("mousemove",a.ko,!1);b.addEventListener("mousedown",a.jo,!1);b.addEventListener("mouseup",a.mo,!1);b.addEventListener("mousewheel",a.$g,!1);b.addEventListener("DOMMouseScroll",a.$g,!1);b.addEventListener("mouseout",a.lo,!1);b.addEventListener("keydown",a.rJ,!1);b.addEventListener("keyup",a.sJ,!1);b.addEventListener("selectstart",function(a){a.preventDefault(); +return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.kb.pq===Hk&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.pG,!1);b.addEventListener("pointermove",a.rG,!1);b.addEventListener("pointerleave",a.qG,!1);window.addEventListener("resize",a.dC,!1)}E.prototype.computePixelRatio=function(){return null!==this.Bk?this.Bk:this.GD};E.prototype.doMouseMove=function(){this.gb.doMouseMove()}; E.prototype.doMouseDown=function(){this.gb.doMouseDown()};E.prototype.doMouseUp=function(){this.gb.doMouseUp()};E.prototype.doMouseWheel=function(){this.gb.doMouseWheel()};E.prototype.doKeyDown=function(){this.gb.doKeyDown()};E.prototype.doKeyUp=function(){this.gb.doKeyUp()};E.prototype.doFocus=function(){this.focus()};E.prototype.focus=E.prototype.focus=function(){this.Mb&&this.Mb.focus()}; function dl(a){if(null!==a.Mb){var b=a.Sb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.yl?a.Rd:0,d=a.lk?a.Rd:0,e=a.qd;a.qd=a.computePixelRatio();a.qd!==e&&(a.cs=!0,a.Se());if(b.clientWidth!==a.Ob+c||b.clientHeight!==a.Rb+d)a.Sm=!0,a.Me=!0,b=a.Vb,null!==b&&b.ay&&a.bm===Rh&&b.N(),a.ge||a.Se()}}} function Il(a){var b=new Ug;b.name="Background";a.Ot(b);b=new Ug;b.name="";a.Ot(b);b=new Ug;b.name="Foreground";a.Ot(b);b=new Ug;b.name="Adornment";b.Uc=!0;a.Ot(b);b=new Ug;b.name="Tool";b.Uc=!0;b.OF=!0;a.Ot(b);b=new Ug;b.name="Grid";b.Cf=!1;b.qg=!1;b.Uc=!0;a.OH(b,a.km("Background"))} function Pl(a){a.Ad=new x(Ql);a.Ad.name="GRID";var b=new z;b.Jb="LineH";b.stroke="lightgray";b.jb=.5;b.interval=1;a.Ad.add(b);b=new z;b.Jb="LineH";b.stroke="gray";b.jb=.5;b.interval=5;a.Ad.add(b);b=new z;b.Jb="LineH";b.stroke="gray";b.jb=1;b.interval=10;a.Ad.add(b);b=new z;b.Jb="LineV";b.stroke="lightgray";b.jb=.5;b.interval=1;a.Ad.add(b);b=new z;b.Jb="LineV";b.stroke="gray";b.jb=.5;b.interval=5;a.Ad.add(b);b=new z;b.Jb="LineV";b.stroke="gray";b.jb=1;b.interval=10;a.Ad.add(b);b=new F;b.add(a.Ad); -b.Kf="Grid";b.Do=0;b.Wx=!1;b.NF=!1;b.qg=!1;b.ky="GRID";a.add(b);a.qb.remove(b);a.Ad.visible=!1}function Rl(){this.ba.isEnabled?this.ba.uI(this):Sl(this.ba)}function Tl(a){this.ba.isEnabled?(this.ba.$z=!0,this.ba.bA=a.target.scrollTop,this.ba.aA=a.target.scrollLeft):Sl(this.ba)} +b.Kf="Grid";b.Co=0;b.Wx=!1;b.NF=!1;b.qg=!1;b.ky="GRID";a.add(b);a.qb.remove(b);a.Ad.visible=!1}function Rl(){this.ba.isEnabled?this.ba.uI(this):Sl(this.ba)}function Tl(a){this.ba.isEnabled?(this.ba.$z=!0,this.ba.bA=a.target.scrollTop,this.ba.aA=a.target.scrollLeft):Sl(this.ba)} E.prototype.diagramScroll=E.prototype.uI=function(a){if(this.$z&&null!==this.Mb){this.Mw=!0;var b=this.dd,c=this.ub,d=b.width,e=c.width,g=b.height,h=c.height,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,r=this.scale,s;s=a.scrollLeft;if(this.gs)switch(this.Yz){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var u=s;el&&(this.position=s.n(-(this.Qw.scrollWidth-this.Ob)+u-this.Ob/r+k,this.position.y))),a.DH&&this.ze&&(bn&&(this.position=s.n(this.position.x,-(this.Qw.scrollHeight-this.Rb)+a.scrollTop-this.Rb/r+m))),D.A(s),Ul(this),this.Sm=this.Mw=!1,b=this.dd,c=this.ub,k=b.right,l=c.right, m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,e>=d&&p>=q&&k<=l&&(this.lt.style.width="1px"),h>=g&&b>=c&&m<=n&&(this.lt.style.height="1px"))}};E.prototype.computeBounds=E.prototype.Kh=function(){0c&&(e=c),ea.Qh&&(e=a.Qh),e):b===am?(e=l>k?(h-a.Rd)/d:(g-a.Rd)/e,e>c&&(e=c),ea.Qh&&(e=a.Qh),e):a.scale}E.prototype.zoomToFit=E.prototype.zoomToFit=function(){this.scale=Xl(this,$l)}; +function Vl(a){if(a.uF.F()){var b=a.uF.copy();b.kx(a.padding);return b}for(var c=!0,d=a.cc.o,e=d.length,g=0;gc&&(e=c),ea.Ph&&(e=a.Ph),e):b===am?(e=l>k?(h-a.Rd)/d:(g-a.Rd)/e,e>c&&(e=c),ea.Ph&&(e=a.Ph),e):a.scale}E.prototype.zoomToFit=E.prototype.zoomToFit=function(){this.scale=Xl(this,$l)}; E.prototype.zoomToRect=function(a,b){void 0===b&&(b=$l);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===$l||b===am)if(isNaN(c))e=this.ub.height*this.scale/d;else if(isNaN(d))e=this.ub.width*this.scale/c;else var e=this.Ob,g=this.Rb,e=b===am?g/d>e/c?(g-(this.lk?this.Rd:0))/d:(e-(this.yl?this.Rd:0))/c:Math.min(g/d,e/c);this.scale=e;this.position=new O(a.x,a.y)}};D.defineProperty(E,{aB:null},function(){return this.$c},function(a){this.$c=a}); E.prototype.alignDocument=function(a,b){this.mk&&Zl(this,this.Kh());var c=this.dd,d=this.ub;this.position=new O(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))}; function Yl(a,b,c,d,e,g,h){var k=b.x,l=b.y;if(h||a.CB===Al)g.fd()&&(d>c.width&&(k=c.x+(g.x*c.width+g.offsetX)-(g.x*d-g.offsetX)),e>c.height&&(l=c.y+(g.y*c.height+g.offsetY)-(g.y*e-g.offsetY))),g=a.LG,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lc.touches.length)&&c.preventDefault();c.cancelBubble=!0;return!1} -E.prototype.qJ=function(a){if(!this.ba.isEnabled)return!1;var b=this.ba.Tb;bm(this.ba,this.ba,a,b,!1);b.key=String.fromCharCode(a.which);b.jm=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 48:b.key="0";break;case 187:case 61:case 107:b.key= +E.prototype.rJ=function(a){if(!this.ba.isEnabled)return!1;var b=this.ba.Tb;bm(this.ba,this.ba,a,b,!1);b.key=String.fromCharCode(a.which);b.jm=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 48:b.key="0";break;case 187:case 61:case 107:b.key= "Add";break;case 189:case 173:case 109:b.key="Subtract";break;case 27:b.key="Esc"}this.ba.doKeyDown();return 187!==a.which&&189!==a.which&&48!==a.which&&107!==a.which&&109!==a.which&&61!==a.which&&173!==a.which||!0!==a.ctrlKey?ga(this.ba,b,a):(a.cancelBubble=!0,a.preventDefault(),a.stopPropagation(),!1)}; -E.prototype.rJ=function(a){if(!this.ba.isEnabled)return!1;var b=this.ba.Tb;bm(this.ba,this.ba,a,b,!1);b.key=String.fromCharCode(a.which);b.up=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 93:a.preventDefault()}this.ba.doKeyUp(); -return ga(this.ba,b,a)};E.prototype.gp=function(a){var b=this.Mb;if(null===b)return new O(0,0);var c=this.Ob,d=this.Rb,b=b.getBoundingClientRect(),c=a.clientX-c/b.width*b.left;a=a.clientY-d/b.height*b.top;return null!==this.Ic?(a=new O(c,a),gb(a,this.Ic),a):new O(c,a)}; -function cm(a,b,c){var d=a.Mb,e=a.Ob,g=a.Rb,h=0,k=0;null!==d&&(d=d.getBoundingClientRect(),h=b.clientX-e/d.width*d.left,k=b.clientY-g/d.height*d.top);c.qe.n(h,k);null!==a.Ic?(b=D.Fb(h,k),a.Ic.Di(b),c.ha.assign(b),D.A(b)):c.ha.n(h,k)} -function Zf(a,b,c,d){var e=null;if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.pj[0])e=a.pj[c];else return;c=a.Mb;b=a.Ob;a=a.Rb;var g=0,h=0;null!==c&&null!==e&&(c=c.getBoundingClientRect(),g=e.clientX-b/c.width*c.left,h=e.clientY-a/c.height*c.top);d.n(g,h)}E.prototype.invalidateDocumentBounds=E.prototype.zc=function(){this.mk||(this.mk=!0,this.Se(!0))};function ml(a){a.ge||Si(a);a.mk&&Zl(a,a.Kh())} -E.prototype.redraw=E.prototype.Gq=function(){this.$c||this.ge||(this.qa(),fm(this),Ul(this),this.zc(),this.hg())};E.prototype.isUpdateRequested=function(){return this.Zf};E.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Xa,c=b.isEnabled;b.Ii();b.isEnabled=!1;bj(this);this.th=!1;b.isEnabled=c;null!==a&&D.setTimeout(a,1)}; -E.prototype.requestUpdate=E.prototype.Se=function(a){void 0===a&&(a=!1);if(!0!==this.Zf&&!(this.$c||!1===a&&this.ge)){this.Zf=!0;var b=this;requestAnimationFrame(function(){b.Zf&&b.hg()})}};E.prototype.maybeUpdate=E.prototype.hg=function(){if(!this.ep||this.Zf)this.ep&&(this.ep=!1),bj(this)};function gm(a,b){a.Xa.tf||a.$c||!a.Sm||Sl(a)||(b&&Si(a),Wl(a,!1))} -function bj(a){if(!a.ge&&(a.Zf=!1,null!==a.Sb)){a.ge=!0;var b=a.Xa,c=a.Wz;if(!b.qp&&0!==c.length){for(var d=c.o,e=d.length,g=0;gb.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.oj[0])e=a.oj[c];else return;c=a.Mb;b=a.Ob;a=a.Rb;var g=0,h=0;null!==c&&null!==e&&(c=c.getBoundingClientRect(),g=e.clientX-b/c.width*c.left,h=e.clientY-a/c.height*c.top);d.n(g,h)}E.prototype.invalidateDocumentBounds=E.prototype.zc=function(){this.mk||(this.mk=!0,this.Se(!0))};function ml(a){a.ge||Si(a);a.mk&&Zl(a,a.Kh())} +E.prototype.redraw=E.prototype.Gq=function(){this.$c||this.ge||(this.qa(),fm(this),Ul(this),this.zc(),this.hg())};E.prototype.isUpdateRequested=function(){return this.Zf};E.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Xa,c=b.isEnabled;b.Hi();b.isEnabled=!1;bj(this);this.th=!1;b.isEnabled=c;null!==a&&D.setTimeout(a,1)}; +E.prototype.requestUpdate=E.prototype.Se=function(a){void 0===a&&(a=!1);if(!0!==this.Zf&&!(this.$c||!1===a&&this.ge)){this.Zf=!0;var b=this;requestAnimationFrame(function(){b.Zf&&b.hg()})}};E.prototype.maybeUpdate=E.prototype.hg=function(){if(!this.dp||this.Zf)this.dp&&(this.dp=!1),bj(this)};function gm(a,b){a.Xa.tf||a.$c||!a.Sm||Sl(a)||(b&&Si(a),Wl(a,!1))} +function bj(a){if(!a.ge&&(a.Zf=!1,null!==a.Sb)){a.ge=!0;var b=a.Xa,c=a.Wz;if(!b.pp&&0!==c.length){for(var d=c.o,e=d.length,g=0;gb;b++){var c=a.Eg.j;if(null===c||0===a.Eg.count)break;a.Eg=new L(F);a.aC(c,a.Eg);v&&22===b&&D.trace("failure to validate parts")}a.og.each(function(a){a instanceof I&&0!==(a.Ca&65536)!==!1&&(a.Ca^=65536)})}} -E.prototype.aC=function(a,b){for(a.reset();a.next();){var c=a.value;!c.oe()||c instanceof I||(c.um()?(Fk(c,Infinity,Infinity),c.pc()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof I&&c.isVisible()&&Im(this,c);for(a.reset();a.next();)c=a.value,c instanceof J&&c.isVisible()&&(c.um()?(Fk(c,Infinity,Infinity),c.pc()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof da&&c.isVisible()&&(c.um()?(Fk(c,Infinity,Infinity),c.pc()):b.add(c))}; +E.prototype.aC=function(a,b){for(a.reset();a.next();){var c=a.value;!c.oe()||c instanceof I||(c.vm()?(Fk(c,Infinity,Infinity),c.pc()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof I&&c.isVisible()&&Im(this,c);for(a.reset();a.next();)c=a.value,c instanceof J&&c.isVisible()&&(c.vm()?(Fk(c,Infinity,Infinity),c.pc()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof da&&c.isVisible()&&(c.vm()?(Fk(c,Infinity,Infinity),c.pc()):b.add(c))}; function Im(a,b){for(var c=D.tb(),d=D.tb(),e=b.Nc;e.next();){var g=e.value;g.isVisible()&&(g instanceof I?(Jm(g)||Km(g)||Lm(g))&&Im(a,g):g instanceof J?g.aa===b||g.da===b?d.push(g):c.push(g):(Fk(g,Infinity,Infinity),g.pc()))}for(var e=c.length,h=0;hp+1&&(k=Math.max((A-p)*c+W,k)),r+1y+1&&(l=a.position.x*c));if(a.gs)switch(a.Yz){case "negative":l=-(b.scrollWidth-l-b.clientWidth);break;case "reverse":l=b.scrollWidth-l-b.clientWidth}b.scrollLeft=l;a.WA&&a.ze&&(r+1p+1&&(b.scrollTop=a.position.y*c));h&&(a.cs=!0);m=a.Ob;n=a.Rb;b.style.width=m+(a.yl?a.Rd:0)+ "px";b.style.height=n+(a.lk?a.Rd:0)+"px";a.$z=!1;return d!==m||e!==n||a.Xa.wc?(p=a.ub,a.Pu(g,p,c,a.scale,h),!1):!0} -E.prototype.add=E.prototype.add=function(a){D.l(a,F,E,"add:part");var b=a.g;if(b!==this){null!==b&&D.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.ar&&(a.Gl="Tool");var c=a.Kf,b=this.km(c);null===b&&(b=this.km(""));null===b&&D.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.tq(99999999,a,a.g===this),0<=c&&this.hd(dg,"parts",b,null,a,null,c),b.Uc||this.zc(),a.N(Sm),c=a.gy,null!== +E.prototype.add=E.prototype.add=function(a){D.l(a,F,E,"add:part");var b=a.g;if(b!==this){null!==b&&D.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.ar&&(a.Gl="Tool");var c=a.Kf,b=this.km(c);null===b&&(b=this.km(""));null===b&&D.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.sq(99999999,a,a.g===this),0<=c&&this.hd(dg,"parts",b,null,a,null,c),b.Uc||this.zc(),a.N(Sm),c=a.gy,null!== c&&c(a,null,b))}}; -E.prototype.tq=function(a){if(a instanceof G){if(this.Ep.add(a),a instanceof I){var b=a.Pa;null===b?this.Tl.add(a):b.en.add(a);b=a.Vb;null!==b&&(b.g=this)}}else a instanceof J?this.yp.add(a):a instanceof da||this.qb.add(a);var c=this;Tm(a,function(a){Um(c,a)});(a instanceof da||a instanceof I&&null!==a.Qb)&&a.K();b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.ck.add(b,a):this.Ti.add(b,a)),Tm(a,function(a){Vm(c,a)}));!0!==Km(a)&&!0!==Lm(a)||this.Eg.add(a);Wm(a,!0,this);Xm(a)?(a.$.F()&&this.qa(vl(a, +E.prototype.sq=function(a){if(a instanceof G){if(this.Dp.add(a),a instanceof I){var b=a.Ra;null===b?this.Tl.add(a):b.en.add(a);b=a.Vb;null!==b&&(b.g=this)}}else a instanceof J?this.xp.add(a):a instanceof da||this.qb.add(a);var c=this;Tm(a,function(a){Um(c,a)});(a instanceof da||a instanceof I&&null!==a.Qb)&&a.K();b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.ck.add(b,a):this.Si.add(b,a)),Tm(a,function(a){Vm(c,a)}));!0!==Km(a)&&!0!==Lm(a)||this.Eg.add(a);Wm(a,!0,this);Xm(a)?(a.$.F()&&this.qa(vl(a, a.$)),this.zc()):a.isVisible()&&a.$.F()&&this.qa(vl(a,a.$));this.Se()}; -E.prototype.sf=function(a){a.Yt();if(a instanceof G){if(this.Ep.remove(a),a instanceof I){var b=a.Pa;null===b?this.Tl.remove(a):b.en.remove(a);b=a.Vb;null!==b&&(b.g=null)}}else a instanceof J?this.yp.remove(a):a instanceof da||this.qb.remove(a);var c=this;Tm(a,function(a){Ym(c,a)});b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.ck.remove(b):this.Ti.remove(b)),Tm(a,function(a){Zm(c,a)}));this.Eg.remove(a);Xm(a)?(a.$.F()&&this.qa(vl(a,a.$)),this.zc()):a.isVisible()&&a.$.F()&&this.qa(vl(a, +E.prototype.sf=function(a){a.Yt();if(a instanceof G){if(this.Dp.remove(a),a instanceof I){var b=a.Ra;null===b?this.Tl.remove(a):b.en.remove(a);b=a.Vb;null!==b&&(b.g=null)}}else a instanceof J?this.xp.remove(a):a instanceof da||this.qb.remove(a);var c=this;Tm(a,function(a){Ym(c,a)});b=a.data;null!==b&&(a instanceof da||(a instanceof J?this.ck.remove(b):this.Si.remove(b)),Tm(a,function(a){Zm(c,a)}));this.Eg.remove(a);Xm(a)?(a.$.F()&&this.qa(vl(a,a.$)),this.zc()):a.isVisible()&&a.$.F()&&this.qa(vl(a, a.$));this.Se()};E.prototype.remove=E.prototype.remove=function(a){D.l(a,F,E,"remove:part");$m(this,a,!0)};function $m(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.hb=!1,b.Yg=!1,b.N(an),c&&b.On(),c=d.sf(-1,b,!1),0<=c&&a.hd(og,"parts",d,b,null,c,null),a=b.gy,null!==a&&a(b,d,null))} -E.prototype.removeParts=E.prototype.zB=function(a,b){if(D.isArray(a))for(var c=D.cb(a),d=0;dd&&this.zc()}; E.prototype.addLayerAfter=function(a,b){bn(this,a,b);a.Yc(this);var c=this.cc,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ve&&this.hd(og,"layers",this,a,null,d,null));for(var e=c.count,g=0;gd&&this.zc()}; -E.prototype.removeLayer=function(a){D.l(a,Ug,E,"removeLayer:layer");a.g!==this&&D.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.cc,c=b.indexOf(a);if(b.remove(a)){for(b=a.qb.copy().j;b.next();){var d=b.value,e=d.Kf;d.Kf=e!==a.name?e:""}null!==this.ve&&this.hd(og,"layers",this,a,null,c,null);this.qa();this.zc()}}};E.prototype.findLayer=E.prototype.km=function(a){for(var b=this.co;b.next();){var c=b.value;if(c.name===a)return c}return null}; +E.prototype.removeLayer=function(a){D.l(a,Ug,E,"removeLayer:layer");a.g!==this&&D.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.cc,c=b.indexOf(a);if(b.remove(a)){for(b=a.qb.copy().j;b.next();){var d=b.value,e=d.Kf;d.Kf=e!==a.name?e:""}null!==this.ve&&this.hd(og,"layers",this,a,null,c,null);this.qa();this.zc()}}};E.prototype.findLayer=E.prototype.km=function(a){for(var b=this.bo;b.next();){var c=b.value;if(c.name===a)return c}return null}; E.prototype.addModelChangedListener=E.prototype.QH=function(a){D.h(a,"function",E,"addModelChangedListener:listener");null===this.wh&&(this.wh=new K("function"));this.wh.add(a);this.ga.An(a)};E.prototype.removeModelChangedListener=function(a){D.h(a,"function",E,"removeModelChangedListener:listener");null!==this.wh&&(this.wh.remove(a),0===this.wh.count&&(this.wh=null));this.ga.Su(a)}; -E.prototype.addChangedListener=E.prototype.An=function(a){D.h(a,"function",E,"addChangedListener:listener");null===this.Oi&&(this.Oi=new K("function"));this.Oi.add(a)};E.prototype.removeChangedListener=E.prototype.Su=function(a){D.h(a,"function",E,"removeChangedListener:listener");null!==this.Oi&&(this.Oi.remove(a),0===this.Oi.count&&(this.Oi=null))}; -E.prototype.tx=function(a){this.Eb||this.ra.HF(a);a.Jc!==cg&&(this.Fi=!0);if(null!==this.Oi){var b=this.Oi,c=b.length;if(1===c)b=b.ea(0),b(a);else if(0!==c)for(var d=b.mc(),e=0;ea.Qh&&(c=a.Qh);e=D.Fb(a.rb.x+h/b-h/c,a.rb.y+k/b-k/c);a.position=e;D.A(e);a.Bb=c;a.Pu(d,a.ub,b,c,!1);a.$c=!1;Wl(a, +E.prototype.addChangedListener=E.prototype.An=function(a){D.h(a,"function",E,"addChangedListener:listener");null===this.Ni&&(this.Ni=new K("function"));this.Ni.add(a)};E.prototype.removeChangedListener=E.prototype.Su=function(a){D.h(a,"function",E,"removeChangedListener:listener");null!==this.Ni&&(this.Ni.remove(a),0===this.Ni.count&&(this.Ni=null))}; +E.prototype.tx=function(a){this.Eb||this.ra.HF(a);a.Jc!==cg&&(this.Ei=!0);if(null!==this.Ni){var b=this.Ni,c=b.length;if(1===c)b=b.ea(0),b(a);else if(0!==c)for(var d=b.mc(),e=0;ea.Ph&&(c=a.Ph);e=D.Fb(a.rb.x+h/b-h/c,a.rb.y+k/b-k/c);a.position=e;D.A(e);a.Bb=c;a.Pu(d,a.ub,b,c,!1);a.$c=!1;Wl(a, !1);c=a.Xa;c.wc&&ql(c,b,a.Bb);a.qa();fm(a)}} -E.prototype.Pu=function(a,b,c,d,e){a.P(b)||(void 0===e&&(e=!1),e||fm(this),Ul(this),d=this.Vb,null===d||!d.ay||this.bm!==Rh||e||a.width===b.width&&a.height===b.height||d.N(),d=this.gb,!0===this.Um&&d instanceof Lh&&(this.U.ha=this.YB(this.U.qe),Jk(d,this)),this.$c||this.MF(a,b),im(this),this.Fh.scale=c,this.Fh.position.x=a.x,this.Fh.position.y=a.y,this.Fh.bounds.set(a),this.Fh.isScroll=e,this.Ja("ViewportBoundsChanged",this.Fh,a),this.dB&&this.links.each(function(a){a.Oh&&a.$.fg(b)&&a.gc()}))}; +E.prototype.Pu=function(a,b,c,d,e){a.P(b)||(void 0===e&&(e=!1),e||fm(this),Ul(this),d=this.Vb,null===d||!d.ay||this.bm!==Rh||e||a.width===b.width&&a.height===b.height||d.N(),d=this.gb,!0===this.Um&&d instanceof Lh&&(this.U.ha=this.YB(this.U.qe),Jk(d,this)),this.$c||this.MF(a,b),im(this),this.Fh.scale=c,this.Fh.position.x=a.x,this.Fh.position.y=a.y,this.Fh.bounds.set(a),this.Fh.isScroll=e,this.Ja("ViewportBoundsChanged",this.Fh,a),this.dB&&this.links.each(function(a){a.Jj&&a.$.fg(b)&&a.gc()}))}; function im(a,b){void 0===b&&(b=null);var c=a.Ad;if(null!==c&&c.visible){for(var d=D.Cm(),e=1,g=1,h=c.ya.o,k=h.length,l=0;ln||(dn(m.Jb)?g=g*n/We(g,n):e=e*n/We(e,n))}h=c.Qx;d.n(g*h.width,e*h.height);h=g=l=k=0;if(null!==b)k=b.width,l=b.height,g=b.x,h=b.y;else{e=D.Of();g=a.ub;e.n(g.x,g.y,g.width,g.height);for(h=a.Ew.j;h.next();)g=h.value.ub,g.F()&&Pb(e,g.x,g.y,g.width,g.height);if(!e.F()){D.Kb(e);return}k=e.width;l=e.height;g=e.x;h=e.y;D.Kb(e)}c.width=k+2*d.width;c.height= l+2*d.height;e=D.O();fb(g,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);D.Rk(d);c.Y.location=e;D.A(e)}}E.prototype.clearSelection=E.prototype.vx=function(){var a=0a&&D.ua(a,">= 0",E,"scrollHorizontalLineChange"),this.Nw=a,this.i("scrollHorizontalLineChange",b,a))}); -D.defineProperty(E,{Yu:"scrollVerticalLineChange"},function(){return this.Rw},function(a){var b=this.Rw;b!==a&&(D.h(a,"number",E,"scrollVerticalLineChange"),0>a&&D.ua(a,">= 0",E,"scrollVerticalLineChange"),this.Rw=a,this.i("scrollVerticalLineChange",b,a))});D.defineProperty(E,{U:"lastInput"},function(){return this.Tb},function(a){v&&D.l(a,Yf,E,"lastInput");this.Tb=a});D.defineProperty(E,{Kc:"firstInput"},function(){return this.Zi},function(a){v&&D.l(a,Yf,E,"firstInput");this.Zi=a}); +D.defineProperty(E,{Yu:"scrollVerticalLineChange"},function(){return this.Rw},function(a){var b=this.Rw;b!==a&&(D.h(a,"number",E,"scrollVerticalLineChange"),0>a&&D.ua(a,">= 0",E,"scrollVerticalLineChange"),this.Rw=a,this.i("scrollVerticalLineChange",b,a))});D.defineProperty(E,{U:"lastInput"},function(){return this.Tb},function(a){v&&D.l(a,Yf,E,"lastInput");this.Tb=a});D.defineProperty(E,{Kc:"firstInput"},function(){return this.Yi},function(a){v&&D.l(a,Yf,E,"firstInput");this.Yi=a}); D.defineProperty(E,{kc:"currentCursor"},function(){return this.Fv},function(a){""===a&&(a=this.Fr);var b=this.Fv;if(b!==a){D.h(a,"string",E,"currentCursor");var c=this.Mb,d=this.Sb;null!==c&&(this.Fv=a,c.style.cursor=a,d.style.cursor=a,c.style.cursor===b&&(c.style.cursor="-webkit-"+a,d.style.cursor="-webkit-"+a,c.style.cursor===b&&(c.style.cursor="-moz-"+a,d.style.cursor="-moz-"+a,c.style.cursor===b&&(c.style.cursor=a,d.style.cursor=a))))}}); -D.defineProperty(E,{nL:"defaultCursor"},function(){return this.Fr},function(a){""===a&&(a="auto");var b=this.Fr;b!==a&&(D.h(a,"string",E,"defaultCursor"),this.Fr=a,this.i("defaultCursor",b,a))});D.defineProperty(E,{click:"click"},function(){return this.Pi},function(a){var b=this.Pi;b!==a&&(null!==a&&D.h(a,"function",E,"click"),this.Pi=a,this.i("click",b,a))}); -D.defineProperty(E,{cu:"doubleClick"},function(){return this.Wi},function(a){var b=this.Wi;b!==a&&(null!==a&&D.h(a,"function",E,"doubleClick"),this.Wi=a,this.i("doubleClick",b,a))});D.defineProperty(E,{xA:"contextClick"},function(){return this.Ri},function(a){var b=this.Ri;b!==a&&(null!==a&&D.h(a,"function",E,"contextClick"),this.Ri=a,this.i("contextClick",b,a))}); -D.defineProperty(E,{oB:"mouseOver"},function(){return this.lj},function(a){var b=this.lj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseOver"),this.lj=a,this.i("mouseOver",b,a))});D.defineProperty(E,{nB:"mouseHover"},function(){return this.kj},function(a){var b=this.kj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHover"),this.kj=a,this.i("mouseHover",b,a))}); -D.defineProperty(E,{mB:"mouseHold"},function(){return this.jj},function(a){var b=this.jj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHold"),this.jj=a,this.i("mouseHold",b,a))});D.defineProperty(E,{NJ:"mouseDragOver"},function(){return this.xw},function(a){var b=this.xw;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDragOver"),this.xw=a,this.i("mouseDragOver",b,a))}); -D.defineProperty(E,{lB:"mouseDrop"},function(){return this.ij},function(a){var b=this.ij;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDrop"),this.ij=a,this.i("mouseDrop",b,a))});D.defineProperty(E,{TB:"toolTip"},function(){return this.uj},function(a){var b=this.uj;b!==a&&(!v||null===a||a instanceof da||a instanceof fk||D.k("Diagram.toolTip must be an Adornment or HTMLInfo."),this.uj=a,this.i("toolTip",b,a))}); -D.defineProperty(E,{contextMenu:"contextMenu"},function(){return this.Si},function(a){var b=this.Si;b!==a&&(!v||a instanceof da||a instanceof fk||D.k("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Si=a,this.i("contextMenu",b,a))});D.defineProperty(E,{xb:"commandHandler"},function(){return this.iz},function(a){var b=this.iz;b!==a&&(D.l(a,oa,E,"commandHandler"),null!==a.g&&D.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Yc(null),this.iz=a,a.Yc(this))}); +D.defineProperty(E,{oL:"defaultCursor"},function(){return this.Fr},function(a){""===a&&(a="auto");var b=this.Fr;b!==a&&(D.h(a,"string",E,"defaultCursor"),this.Fr=a,this.i("defaultCursor",b,a))});D.defineProperty(E,{click:"click"},function(){return this.Oi},function(a){var b=this.Oi;b!==a&&(null!==a&&D.h(a,"function",E,"click"),this.Oi=a,this.i("click",b,a))}); +D.defineProperty(E,{cu:"doubleClick"},function(){return this.Vi},function(a){var b=this.Vi;b!==a&&(null!==a&&D.h(a,"function",E,"doubleClick"),this.Vi=a,this.i("doubleClick",b,a))});D.defineProperty(E,{xA:"contextClick"},function(){return this.Qi},function(a){var b=this.Qi;b!==a&&(null!==a&&D.h(a,"function",E,"contextClick"),this.Qi=a,this.i("contextClick",b,a))}); +D.defineProperty(E,{oB:"mouseOver"},function(){return this.kj},function(a){var b=this.kj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseOver"),this.kj=a,this.i("mouseOver",b,a))});D.defineProperty(E,{nB:"mouseHover"},function(){return this.jj},function(a){var b=this.jj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHover"),this.jj=a,this.i("mouseHover",b,a))}); +D.defineProperty(E,{mB:"mouseHold"},function(){return this.ij},function(a){var b=this.ij;b!==a&&(null!==a&&D.h(a,"function",E,"mouseHold"),this.ij=a,this.i("mouseHold",b,a))});D.defineProperty(E,{OJ:"mouseDragOver"},function(){return this.xw},function(a){var b=this.xw;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDragOver"),this.xw=a,this.i("mouseDragOver",b,a))}); +D.defineProperty(E,{lB:"mouseDrop"},function(){return this.hj},function(a){var b=this.hj;b!==a&&(null!==a&&D.h(a,"function",E,"mouseDrop"),this.hj=a,this.i("mouseDrop",b,a))});D.defineProperty(E,{TB:"toolTip"},function(){return this.tj},function(a){var b=this.tj;b!==a&&(!v||null===a||a instanceof da||a instanceof fk||D.k("Diagram.toolTip must be an Adornment or HTMLInfo."),this.tj=a,this.i("toolTip",b,a))}); +D.defineProperty(E,{contextMenu:"contextMenu"},function(){return this.Ri},function(a){var b=this.Ri;b!==a&&(!v||a instanceof da||a instanceof fk||D.k("Diagram.contextMenu must be an Adornment or HTMLInfo."),this.Ri=a,this.i("contextMenu",b,a))});D.defineProperty(E,{xb:"commandHandler"},function(){return this.iz},function(a){var b=this.iz;b!==a&&(D.l(a,oa,E,"commandHandler"),null!==a.g&&D.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Yc(null),this.iz=a,a.Yc(this))}); D.defineProperty(E,{kb:"toolManager"},function(){return this.iA},function(a){var b=this.iA;b!==a&&(D.l(a,Lh,E,"toolManager"),null!==a.g&&D.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Yc(null),this.iA=a,a.Yc(this))});D.defineProperty(E,{bu:"defaultTool"},function(){return this.oz},function(a){var b=this.oz;b!==a&&(D.l(a,Vg,E,"defaultTool"),this.oz=a,this.gb===b&&(this.gb=a))}); D.defineProperty(E,{gb:"currentTool"},function(){return this.lz},function(a){var b=this.lz;null!==b&&(b.wa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.bu);null!==a&&(D.l(a,Vg,E,"currentTool"),this.lz=a,a.Yc(this),a.doStart())});D.w(E,{selection:"selection"},function(){return this.Uw}); -D.defineProperty(E,{EJ:"maxSelectionCount"},function(){return this.sw},function(a){var b=this.sw;if(b!==a)if(D.h(a,"number",E,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.sw=a,this.i("maxSelectionCount",b,a),!this.ra.ob&&(a=this.selection.count-a,0= 0",E,"maxSelectionCount")}); -D.defineProperty(E,{PJ:"nodeSelectionAdornmentTemplate"},function(){return this.yw},function(a){var b=this.yw;b!==a&&(D.l(a,da,E,"nodeSelectionAdornmentTemplate"),this.yw=a,this.i("nodeSelectionAdornmentTemplate",b,a))});D.defineProperty(E,{WI:"groupSelectionAdornmentTemplate"},function(){return this.Vv},function(a){var b=this.Vv;b!==a&&(D.l(a,da,E,"groupSelectionAdornmentTemplate"),this.Vv=a,this.i("groupSelectionAdornmentTemplate",b,a))}); -D.defineProperty(E,{yJ:"linkSelectionAdornmentTemplate"},function(){return this.nw},function(a){var b=this.nw;b!==a&&(D.l(a,da,E,"linkSelectionAdornmentTemplate"),this.nw=a,this.i("linkSelectionAdornmentTemplate",b,a))});D.w(E,{rm:"highlighteds"},function(){return this.Zv}); -D.defineProperty(E,{Fi:"isModified"},function(){var a=this.ra;return a.isEnabled?null!==a.Dj?!0:this.fw&&this.sh!==a.Ij:this.fw},function(a){if(this.fw!==a){D.h(a,"boolean",E,"isModified");this.fw=a;var b=this.ra;!a&&b.isEnabled&&(this.sh=b.Ij);a||gn(this)}});function gn(a){var b=a.Fi;a.xE!==b&&(a.xE=b,a.Ja("Modified"))} -D.defineProperty(E,{ga:"model"},function(){return this.ve},function(a){var b=this.ve;if(b!==a){D.l(a,M,E,"model");this.gb.doCancel();null!==b&&b.ra!==a.ra&&b.ra.UF&&D.k("Do not replace a Diagram.model while a transaction is in progress.");this.Xa.Ii();this.vx();this.th=!1;this.ep=!0;this.sh=-2;this.Zf=!1;var c=this.ge;this.ge=!0;this.Xa.qo("Model");null!==b&&(null!==this.wh&&this.wh.each(function(a){b.Su(a)}),b.Su(this.DD),b instanceof Y&&hn(this,b.Zg),hn(this,b.ng));this.ve=a;a.An(this.CD);jn(this, +D.defineProperty(E,{FJ:"maxSelectionCount"},function(){return this.sw},function(a){var b=this.sw;if(b!==a)if(D.h(a,"number",E,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.sw=a,this.i("maxSelectionCount",b,a),!this.ra.ob&&(a=this.selection.count-a,0= 0",E,"maxSelectionCount")}); +D.defineProperty(E,{QJ:"nodeSelectionAdornmentTemplate"},function(){return this.yw},function(a){var b=this.yw;b!==a&&(D.l(a,da,E,"nodeSelectionAdornmentTemplate"),this.yw=a,this.i("nodeSelectionAdornmentTemplate",b,a))});D.defineProperty(E,{WI:"groupSelectionAdornmentTemplate"},function(){return this.Vv},function(a){var b=this.Vv;b!==a&&(D.l(a,da,E,"groupSelectionAdornmentTemplate"),this.Vv=a,this.i("groupSelectionAdornmentTemplate",b,a))}); +D.defineProperty(E,{zJ:"linkSelectionAdornmentTemplate"},function(){return this.nw},function(a){var b=this.nw;b!==a&&(D.l(a,da,E,"linkSelectionAdornmentTemplate"),this.nw=a,this.i("linkSelectionAdornmentTemplate",b,a))});D.w(E,{sm:"highlighteds"},function(){return this.Zv}); +D.defineProperty(E,{Ei:"isModified"},function(){var a=this.ra;return a.isEnabled?null!==a.Cj?!0:this.fw&&this.sh!==a.Hj:this.fw},function(a){if(this.fw!==a){D.h(a,"boolean",E,"isModified");this.fw=a;var b=this.ra;!a&&b.isEnabled&&(this.sh=b.Hj);a||gn(this)}});function gn(a){var b=a.Ei;a.xE!==b&&(a.xE=b,a.Ja("Modified"))} +D.defineProperty(E,{ga:"model"},function(){return this.ve},function(a){var b=this.ve;if(b!==a){D.l(a,M,E,"model");this.gb.doCancel();null!==b&&b.ra!==a.ra&&b.ra.UF&&D.k("Do not replace a Diagram.model while a transaction is in progress.");this.Xa.Hi();this.vx();this.th=!1;this.dp=!0;this.sh=-2;this.Zf=!1;var c=this.ge;this.ge=!0;this.Xa.po("Model");null!==b&&(null!==this.wh&&this.wh.each(function(a){b.Su(a)}),b.Su(this.DD),b instanceof Y&&hn(this,b.Zg),hn(this,b.ng));this.ve=a;a.An(this.CD);jn(this, a.ng);a instanceof Y&&kn(this,a.Zg);a.Su(this.CD);a.An(this.DD);null!==this.wh&&this.wh.each(function(b){a.An(b)});this.ge=c;this.$c||this.qa();null!==b&&(a.ra.isEnabled=b.ra.isEnabled)}});D.defineProperty(E,{ab:null},function(){return this.uD},function(a){this.uD=a});D.w(E,{jy:null},function(){return this.wH}); -function El(a,b){if(b.ga===a.ga){var c=b.Jc,d=b.propertyName;if(c===cg&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.kb,c.lf.each(function(b){b.Yc(a)}),c.jg.each(function(b){b.Yc(a)}),c.kg.each(function(b){b.Yc(a)}),a.ge||a.th||(a.Mv=!0,a.ep&&(a.Zf=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Xa;e.tf&&!a.Eb&&e.Ii();a.Ja("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Xa,e.tf&&!a.Eb&&e.Ii());else if(a.ab){a.ab=!1;try{var g=b.xf;if(""!==g)if(c===bg){if("linkFromKey"===g){var h= -b.object,k=a.cg(h);if(null!==k){var l=b.newValue,m=a.Qe(l);k.aa=m}}else if("linkToKey"===g)h=b.object,k=a.cg(h),null!==k&&(l=b.newValue,m=a.Qe(l),k.da=m);else if("linkFromPortId"===g){if(h=b.object,k=a.cg(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.dg=n)}}else if("linkToPortId"===g)h=b.object,k=a.cg(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.jh=n));else if("nodeGroupKey"===g){var h=b.object,p=a.Nh(h);if(null!==p){var q=b.newValue;if(void 0!==q){var r=a.Qe(q);p.Pa=r instanceof I? -r:null}else p.Pa=null}}else if("linkLabelKeys"===g){if(h=b.object,k=a.cg(h),null!==k){var s=b.oldValue,u=b.newValue;if(D.isArray(s))for(var t=D.cb(s),y=0;yl)){var m=l;rn(k)&&m++;k.sf(m);sn(k,m,l)}}}}function Vm(a,b){var c=b.cj;if(D.isArray(c)){var d=a.Wm.na(c);if(null===d)d=[],d.push(b),a.Wm.add(c,d);else{for(c=0;cl)){var m=l;rn(k)&&m++;k.sf(m);sn(k,m,l)}}}}function Vm(a,b){var c=b.bj;if(D.isArray(c)){var d=a.Wm.na(c);if(null===d)d=[],d.push(b),a.Wm.add(c,d);else{for(c=0;cthis.scale&&(this.scale=a)):D.ua(a,"> 0",E,"minScale"))});D.defineProperty(E,{Qh:"maxScale"},function(){return this.rw},function(a){D.p(a,E,"maxScale");var b=this.rw;b!==a&&(0 0",E,"maxScale"))}); -D.defineProperty(E,{Fm:"zoomPoint"},function(){return this.jx},function(a){this.jx.P(a)||(D.l(a,O,E,"zoomPoint"),this.jx=a=a.V())});D.defineProperty(E,{UE:"contentAlignment"},function(){return this.Po},function(a){var b=this.Po;b.P(a)||(D.l(a,R,E,"contentAlignment"),this.Po=a=a.V(),this.i("contentAlignment",b,a),Wl(this,!1))}); -D.defineProperty(E,{JL:"initialContentAlignment"},function(){return this.kp},function(a){var b=this.kp;b.P(a)||(D.l(a,R,E,"initialContentAlignment"),this.kp=a=a.V(),this.i("initialContentAlignment",b,a))});D.defineProperty(E,{padding:"padding"},function(){return this.of},function(a){"number"===typeof a?a=new Ib(a):D.l(a,Ib,E,"padding");var b=this.of;b.P(a)||(this.of=a=a.V(),this.zc(),this.i("padding",b,a))});D.w(E,{og:"nodes"},function(){return this.Ep.j});D.w(E,{links:"links"},function(){return this.yp.j}); -D.w(E,{Gi:"parts"},function(){return this.qb.j});E.prototype.findTopLevelNodesAndLinks=function(){for(var a=new L(F),b=this.Ep.j;b.next();){var c=b.value;c.yq&&a.add(c)}for(b=this.yp.j;b.next();)c=b.value,c.yq&&a.add(c);return a.j};E.prototype.findTopLevelGroups=function(){return this.Tl.j}; +D.defineProperty(E,{Qh:"minScale"},function(){return this.uw},function(a){D.p(a,E,"minScale");var b=this.uw;b!==a&&(0this.scale&&(this.scale=a)):D.ua(a,"> 0",E,"minScale"))});D.defineProperty(E,{Ph:"maxScale"},function(){return this.rw},function(a){D.p(a,E,"maxScale");var b=this.rw;b!==a&&(0 0",E,"maxScale"))}); +D.defineProperty(E,{Fm:"zoomPoint"},function(){return this.jx},function(a){this.jx.P(a)||(D.l(a,O,E,"zoomPoint"),this.jx=a=a.V())});D.defineProperty(E,{UE:"contentAlignment"},function(){return this.Oo},function(a){var b=this.Oo;b.P(a)||(D.l(a,R,E,"contentAlignment"),this.Oo=a=a.V(),this.i("contentAlignment",b,a),Wl(this,!1))}); +D.defineProperty(E,{KL:"initialContentAlignment"},function(){return this.jp},function(a){var b=this.jp;b.P(a)||(D.l(a,R,E,"initialContentAlignment"),this.jp=a=a.V(),this.i("initialContentAlignment",b,a))});D.defineProperty(E,{padding:"padding"},function(){return this.of},function(a){"number"===typeof a?a=new Ib(a):D.l(a,Ib,E,"padding");var b=this.of;b.P(a)||(this.of=a=a.V(),this.zc(),this.i("padding",b,a))});D.w(E,{og:"nodes"},function(){return this.Dp.j});D.w(E,{links:"links"},function(){return this.xp.j}); +D.w(E,{Fi:"parts"},function(){return this.qb.j});E.prototype.findTopLevelNodesAndLinks=function(){for(var a=new L(F),b=this.Dp.j;b.next();){var c=b.value;c.xq&&a.add(c)}for(b=this.xp.j;b.next();)c=b.value,c.xq&&a.add(c);return a.j};E.prototype.findTopLevelGroups=function(){return this.Tl.j}; D.defineProperty(E,{Vb:"layout"},function(){return this.te},function(a){var b=this.te;b!==a&&(D.l(a,Wg,E,"layout"),null!==b&&(b.g=null,b.group=null),this.te=a,a.g=this,a.group=null,this.wv=!0,this.i("layout",b,a),this.Se())});E.prototype.layoutDiagram=function(a){Si(this);a&&xn(this,!0);jm(this,!1)};function xn(a,b){for(var c=a.Tl.j;c.next();)Fn(a,c.value,b);null!==a.Vb&&(b?a.Vb.If=!1:a.Vb.N())} -function Fn(a,b,c){if(null!==b){for(var d=b.en.j;d.next();)Fn(a,d.value,c);null!==b.Vb&&(c?b.Vb.If=!1:b.Vb.N())}}function jm(a,b){if(!a.pz){var c=a.Vb,d=a.ab;a.ab=!0;try{var e=a.ra.Wh;0===e&&a.ac("Layout");var g=a.Xa;1!==a.ra.Wh||g.tf||g.wc||b||g.qo("Layout");for(var h=a.Tl.j;h.next();)Gn(a,h.value,b);c.If||b&&!c.XF&&0!==e||(c.doLayout(a),Si(a),c.If=!0)}finally{0===e&&a.Td("Layout"),a.wv=!c.If,a.ab=d}}} -function Gn(a,b,c){if(null!==b){for(var d=b.en.j;d.next();)Gn(a,d.value,c);d=b.Vb;null===d||d.If||c&&!d.XF||(b.oo=!b.location.F(),d.doLayout(b),b.N(Hn),d.If=!0,Im(a,b))}}D.defineProperty(E,{$d:"isTreePathToChildren"},function(){return this.iw},function(a){var b=this.iw;if(b!==a&&(D.h(a,"boolean",E,"isTreePathToChildren"),this.iw=a,this.i("isTreePathToChildren",b,a),!this.ra.ob))for(a=this.og;a.next();)In(a.value)}); -E.prototype.findTreeRoots=function(){for(var a=new K(G),b=this.og;b.next();){var c=b.value;c.yq&&null===c.Rn()&&a.add(c)}return a.j};D.defineProperty(E,{ZB:"treeCollapsePolicy"},function(){return this.bx},function(a){var b=this.bx;b!==a&&(a!==Cl&&a!==en&&a!==fn&&D.k("Unknown Diagram.treeCollapsePolicy: "+a),this.bx=a,this.i("treeCollapsePolicy",b,a))});D.defineProperty(E,{Ph:null},function(){return this.jD},function(a){this.jD=a}); +function Fn(a,b,c){if(null!==b){for(var d=b.en.j;d.next();)Fn(a,d.value,c);null!==b.Vb&&(c?b.Vb.If=!1:b.Vb.N())}}function jm(a,b){if(!a.pz){var c=a.Vb,d=a.ab;a.ab=!0;try{var e=a.ra.Vh;0===e&&a.ac("Layout");var g=a.Xa;1!==a.ra.Vh||g.tf||g.wc||b||g.po("Layout");for(var h=a.Tl.j;h.next();)Gn(a,h.value,b);c.If||b&&!c.XF&&0!==e||(c.doLayout(a),Si(a),c.If=!0)}finally{0===e&&a.Td("Layout"),a.wv=!c.If,a.ab=d}}} +function Gn(a,b,c){if(null!==b){for(var d=b.en.j;d.next();)Gn(a,d.value,c);d=b.Vb;null===d||d.If||c&&!d.XF||(b.no=!b.location.F(),d.doLayout(b),b.N(Hn),d.If=!0,Im(a,b))}}D.defineProperty(E,{$d:"isTreePathToChildren"},function(){return this.iw},function(a){var b=this.iw;if(b!==a&&(D.h(a,"boolean",E,"isTreePathToChildren"),this.iw=a,this.i("isTreePathToChildren",b,a),!this.ra.ob))for(a=this.og;a.next();)In(a.value)}); +E.prototype.findTreeRoots=function(){for(var a=new K(G),b=this.og;b.next();){var c=b.value;c.xq&&null===c.Rn()&&a.add(c)}return a.j};D.defineProperty(E,{ZB:"treeCollapsePolicy"},function(){return this.bx},function(a){var b=this.bx;b!==a&&(a!==Cl&&a!==en&&a!==fn&&D.k("Unknown Diagram.treeCollapsePolicy: "+a),this.bx=a,this.i("treeCollapsePolicy",b,a))});D.defineProperty(E,{Oh:null},function(){return this.jD},function(a){this.jD=a}); function Bl(a){function b(a){var b=a.toLowerCase(),h=new K("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new ma("string",K),d=new ma("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified"); b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");a.rz=c;a.qz=d} function Ga(a,b){var c=a.qz.na(b);return null!==c?c:a.qz.na(b.toLowerCase())}function Jn(a,b){var c=a.rz.na(b);if(null!==c)return c;c=a.rz.na(b.toLowerCase());if(null!==c)return c;D.k("Unknown DiagramEvent name: "+b);return null}E.prototype.addDiagramListener=E.prototype.pA=function(a,b){D.h(a,"string",E,"addDiagramListener:name");D.h(b,"function",E,"addDiagramListener:listener");var c=Jn(this,a);null!==c&&c.add(b)}; E.prototype.removeDiagramListener=E.prototype.xG=function(a,b){D.h(a,"string",E,"removeDiagramListener:name");D.h(b,"function",E,"addDiagramListener:listener");var c=Jn(this,a);null!==c&&c.remove(b)}; E.prototype.raiseDiagramEvent=E.prototype.Ja=function(a,b,c){v&&D.h(a,"string",E,"raiseDiagramEvent:name");var d=Jn(this,a),e=new $f;e.g=this;a=Ga(this,a);null!==a&&(e.name=a);void 0!==b&&(e.PB=b);void 0!==c&&(e.uB=c);b=d.length;if(1===b)d=d.ea(0),d(e);else if(0!==b)for(c=d.mc(),a=0;a=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.ub,g=a.scale,e=D.sg(0,0,e.width*g,e.height*g),h=D.Fb(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(k=Math.max(a.Xu,1),k|=0,h.x+=k,b.x>e.x+e.width-d.right/2&&(h.x+=k),b.x>e.x+e.width-d.right/4&&(h.x+=4*k));b.y>=e.y&&b.ye.y+e.height-d.bottom&&(k=Math.max(a.Yu,1),k|=0,h.y+=k,b.y>e.y+e.height-d.bottom/2&&(h.y+=k),b.y>e.y+e.height-d.bottom/4&&(h.y+=4*k));h.Tc(Gd)||(c=new O(c.x+h.x/g,c.y+h.y/g));D.Kb(e);D.A(h);return c}E.prototype.makeSvg=E.prototype.makeSVG=function(a){void 0===a&&(a=new la);a.context="svg";a=Qn(this,a);return null!==a?a.Am:null}; -E.prototype.makeImage=function(a){void 0===a&&(a=new la);var b=(a.document||document).createElement("img");b.src=this.zJ(a);return b}; -E.prototype.makeImageData=E.prototype.zJ=function(a){void 0===a&&(a=new la);var b=Qn(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.Ok.getImageData(0,0,b.width,b.height);case "blob":b=b.Ud;c=a.callback;if("function"!==typeof c){D.k('Error: Diagram.makeImageData called with "returnType: toBlob", but no "callback" function property defined.');break}if("function"===typeof b.toBlob)return b.toBlob(c,a.type,a.details),"toBlob";if("function"=== +E.prototype.makeImage=function(a){void 0===a&&(a=new la);var b=(a.document||document).createElement("img");b.src=this.AJ(a);return b}; +E.prototype.makeImageData=E.prototype.AJ=function(a){void 0===a&&(a=new la);var b=Qn(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.Ok.getImageData(0,0,b.width,b.height);case "blob":b=b.Ud;c=a.callback;if("function"!==typeof c){D.k('Error: Diagram.makeImageData called with "returnType: toBlob", but no "callback" function property defined.');break}if("function"===typeof b.toBlob)return b.toBlob(c,a.type,a.details),"toBlob";if("function"=== typeof b.msToBlob)return c(b.msToBlob()),"msToBlob";c(null);break;default:return b.toDataURL(a.type,a.details)}}return""};var Rn=!1; -function Qn(a,b){a.Xa.Ii();a.hg();if(null===a.Mb)return null;"object"!==typeof b&&D.k("properties argument must be an Object.");var c=!1,d=b.size||null,e=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(e="NaN");var g=b.maxSize;void 0===b.maxSize&&(c=!0,g="svg"===b.context?new Ca(Infinity,Infinity):new Ca(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,q=b.elementFinished||null,r= -b.showTemporary;void 0===r&&(r=!n);n=b.showGrid;void 0===n&&(n=r);null!==d&&isNaN(d.width)&&isNaN(d.height)&&(d=null);"number"===typeof l?l=new Ib(l):l instanceof Ib||(l=new Ib(0));l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.$o=!1;a.od.Be(!0);var s=new ka(null,p),u=s.Ok;if(!(d||e||k||h)){s.width=a.Ob+Math.ceil(l.left+l.right);s.height=a.Rb+Math.ceil(l.top+l.bottom);if("svg"===b.context)return u=new od(s.Ud,p,q),Pm(a,u,l,new Ca(s.width, -s.height),a.Bb,a.rb,k,m,r,n),a.$o=!0,u;Pm(a,u,l,new Ca(s.width,s.height),a.Bb,a.rb,k,m,r,n);a.$o=!0;return s}var t=a.xb.Bx,y=new O(0,0),w=a.dd.copy();w.rK(a.padding);if(r)for(var C=!0,C=a.cc.o,A=C.length,N=0;Nt?(e=t,h=w.width,ba=w.height):(h=g.width,ba=g.height)):(h=w.width*e,ba=w.height*e):(e=t,h=w.width,ba=w.height);null!==l?(h+=S,ba+=C):l=new Ib(0);null!==g&&(d=g.width,g=g.height,"svg"!==b.context&&c&&!Rn&&(h>d||ba>g)&&(D.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(ba)+" vs 2000x2000) Consider increasing the max size."), -Rn=!0),isNaN(d)&&(d=2E3),isNaN(g)&&(g=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(g)&&(ba=Math.min(ba,g)));s.width=Math.ceil(h);s.height=Math.ceil(ba);if("svg"===b.context)return u=new od(s.Ud,p,q),Pm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ba)),e,y,k,m,r,n),a.$o=!0,u;Pm(a,u,l,new Ca(Math.ceil(h),Math.ceil(ba)),e,y,k,m,r,n);a.$o=!0;return s}E.inherit=function(a,b){D.h(a,"function",E,"inherit");D.h(b,"function",E,"inherit");b.EH&&D.k("Cannot inherit from "+D.rf(b));D.Sa(a,b)}; -function Kl(){this.fE=null;this.GH="63ad05bbe23a1786468a4c741b6d2";this.Xi=this.GH===this._tk?!0:null} -function Sn(a){var b="f",c=window[D.Vg("76a715b2f73f148a")][D.Vg("72ba13b5")],d=D.Vg;if(window[d("7da7")]&&window[d("7da7")][d("76a115b6ed251eaf4692")]){a.Xi=!0;var e=window[d("7da7")][d("76a115b6ed251eaf4692")],e=d(e).split(d("39e9"));if(6>e.length)return;var g=d(e[1]).split(".");if("7da71ca0"!==e[4])return;var h=d(D[d("6cae19")]).split(".");if(g[0]>h[0]||g[0]===h[0]&&g[1]>=h[1]){g=c[d("76ad18b4f73e")];for(h=c[d("73a612b6fb191d")](d("35e7"))+2;h -g&&d(e[2])!==d("7da71ca0ad381e90")&&(g=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));0>g&&(g=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));a.Xi=!(0<=g&&gg&&d(D.adym)!==d("7da71ca0ad381e90")&&(g=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));a.Xi=!(0<=g&&ge.length)return;var g=d(e[1]).split(".");if("7da71ca0"!==e[4])return;var h=d(D[d("6cae19")]).split(".");if(g[0]>h[0]||g[0]===h[0]&&g[1]>=h[1]){g=c[d("76ad18b4f73e")];for(h=c[d("73a612b6fb191d")](d("35e7"))+2;h +g&&d(e[2])!==d("7da71ca0ad381e90")&&(g=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));0>g&&(g=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));a.Wi=!(0<=g&&gg&&d(D.adym)!==d("7da71ca0ad381e90")&&(g=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));a.Wi=!(0<=g&&gb.timeStamp-a.Ym)b.preventDefault();else if(a.Cl)b.preventDefault();else{a.cd=a.Tb;a.Tb=c;bm(a,a,b,c,!0);c.jm=!0;c.Oe=b.detail;if(D.RF||D.SF)b.timeStamp-a.Ymb.timeStamp-a.Ym){b.preventDefault();return}a.Ym=b.timeStamp}if(D.Zn&&null!==a.ut)a.ut=null,b.preventDefault();else{a.cd=a.Tb;a.Tb=c;bm(a, -a,b,c,!0);c.up=!0;c.Oe=b.detail;if(D.RF||D.SF)c.Oe=a.Fl;c.bubbles=b.bubbles;b.target.ba&&(c.gh=b.target.ba);a.simulatedMouseUp(b,null,new O,c.gh)||(a.doMouseUp(),Di(a),ga(a,c,b))}}};a.$g=function(b){if(a.isEnabled){var c=a.cd;a.cd=a.Tb;a.Tb=c;bm(a,a,b,c,!0);c.bubbles=!0;c.im=void 0!==b.wheelDelta?b.wheelDelta:-40*b.detail;a.doMouseWheel();ga(a,c,b)}};a.mo=function(){if(a.isEnabled){a.Um=!1;var b=a.gb;b.cancelWaitAfter();b instanceof Lh&&b.hideToolTip()}};a.WB=function(b){if(a.isEnabled){a.Ct=!1;a.Cl= +e=D.createElement("div");c.style.position="absolute";c.style.overflow="auto";c.style.width=a.Ob+"px";c.style.height=a.Rb+"px";c.style.zIndex="1";e.style.position="absolute";e.style.width="1px";e.style.height="1px";a.Sb.appendChild(c);c.appendChild(e);c.onscroll=Rl;c.onmousedown=Tl;c.ontouchstart=Tl;c.ba=a;c.CH=!0;c.DH=!0;a.Qw=c;a.lt=e;a.wy=D.YE(function(){a.Bk=null;a.qa()},300,!1);a.dC=D.YE(function(){dl(a)},250,!1);a.preventDefault=function(a){a.preventDefault();return!1};a.ko=function(b){if(a.isEnabled){a.Um= +!0;var c=a.cd;D.Yn&&c.Mj?(b.preventDefault(),b.simulated=!0,a.ut=b):(a.cd=a.Tb,a.Tb=c,bm(a,a,b,c,!0),a.simulatedMouseMove(b,null,b.target.ba)||(a.doMouseMove(),a.gb.isBeyondDragSize()&&(a.Fl=0),ga(a,c,b)))}};a.jo=function(b){if(a.isEnabled){a.Um=!0;var c=a.cd;if(D.Yn&&null!==a.ut)a.ut=b,b.preventDefault();else if(D.Yn&&400>b.timeStamp-a.Ym)b.preventDefault();else if(a.Cl)b.preventDefault();else{a.cd=a.Tb;a.Tb=c;bm(a,a,b,c,!0);c.jm=!0;c.Oe=b.detail;if(D.RF||D.SF)b.timeStamp-a.Ymb.timeStamp-a.Ym){b.preventDefault();return}a.Ym=b.timeStamp}if(D.Yn&&null!==a.ut)a.ut=null,b.preventDefault();else{a.cd=a.Tb;a.Tb=c;bm(a, +a,b,c,!0);c.up=!0;c.Oe=b.detail;if(D.RF||D.SF)c.Oe=a.Fl;c.bubbles=b.bubbles;b.target.ba&&(c.gh=b.target.ba);a.simulatedMouseUp(b,null,new O,c.gh)||(a.doMouseUp(),Di(a),ga(a,c,b))}}};a.$g=function(b){if(a.isEnabled){var c=a.cd;a.cd=a.Tb;a.Tb=c;bm(a,a,b,c,!0);c.bubbles=!0;c.im=void 0!==b.wheelDelta?b.wheelDelta:-40*b.detail;a.doMouseWheel();ga(a,c,b)}};a.lo=function(){if(a.isEnabled){a.Um=!1;var b=a.gb;b.cancelWaitAfter();b instanceof Lh&&b.hideToolTip()}};a.WB=function(b){if(a.isEnabled){a.Ct=!1;a.Cl= !0;var c=a.cd;a.cd=a.Tb;a.Tb=c;dm(a,b,b.targetTouches[0],c,1a.Iw)){var c=a.pj;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.cd,a.cd=a.Tb,a.Tb=c,em(a,b,b,c,!0),a.simulatedMouseMove(b,null,c.gh)||(a.doMouseMove(),ga(a,c,b)))}};a.qG=function(b){if("touch"===b.pointerType){var c=a.TD;void 0!==c[b.pointerId]&&(a.Iw--,delete c[b.pointerId],c=a.pj,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null))}};d.Be(!0);Ol(a)} +b;c.timestamp=Date.now();c.gh=null===d?b.target.ba:d.ba?d.ba:null;c.We=null;a.simulatedMouseUp(e?e:b,null,new O,c.gh)||a.doMouseUp();ga(a,c,b);a.Cl=!1}}};a.pG=function(b){if("touch"===b.pointerType){var c=a.TD;void 0===c[b.pointerId]&&(a.Iw++,c[b.pointerId]=b);a.oj[0]=null;a.oj[1]=null;for(var d in c)if(null===a.oj[0])a.oj[0]=c[d];else if(null===a.oj[1]){a.oj[1]=c[d];break}a.isEnabled&&(a.Ct=!1,a.Cl=!0,c=a.cd,a.cd=a.Tb,a.Tb=c,dm(a,b,b,c,1a.Iw)){var c=a.oj;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.cd,a.cd=a.Tb,a.Tb=c,em(a,b,b,c,!0),a.simulatedMouseMove(b,null,c.gh)||(a.doMouseMove(),ga(a,c,b)))}};a.qG=function(b){if("touch"===b.pointerType){var c=a.TD;void 0!==c[b.pointerId]&&(a.Iw--,delete c[b.pointerId],c=a.oj,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null))}};d.Be(!0);Ol(a)} function Tn(a){1a)&&D.ua(a,"0 <= loc <= 1",Ba,"addColorStop:loc");D.h(b,"string",Ba,"addColorStop:color");v&&!Aa(b)&&D.k('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.qh&&(this.qh=new ma("number","string"));this.qh.add(a,b);this.ca===Bg&&(this.type=Cg);this.rh=null}; -D.defineProperty(Ba,{type:"type"},function(){return this.ca},function(a){this.J&&D.pa(this,a);D.Da(a,Ba,Ba,"type");this.ca=a;this.start.Zd()&&(a===Cg?this.start=ec:a===Ed&&(this.start=hc));this.end.Zd()&&(a===Cg?this.end=tc:a===Ed&&(this.end=hc));this.rh=null});D.defineProperty(Ba,{color:"color"},function(){return this.No},function(a){this.J&&D.pa(this,a);v&&!Aa(a)&&D.k('Color "'+a+'" is not a valid color string for Brush.color');this.No=a;this.rh=null}); -D.defineProperty(Ba,{start:"start"},function(){return this.Pp},function(a){this.J&&D.pa(this,a);D.l(a,R,Ba,"start");this.Pp=a.V();this.rh=null});D.defineProperty(Ba,{end:"end"},function(){return this.bp},function(a){this.J&&D.pa(this,a);D.l(a,R,Ba,"end");this.bp=a.V();this.rh=null});D.defineProperty(Ba,{dv:"startRadius"},function(){return this.Xw},function(a){this.J&&D.pa(this,a);D.p(a,Ba,"startRadius");0>a&&D.ua(a,">= zero",Ba,"startRadius");this.Xw=a;this.rh=null}); +D.defineProperty(Ba,{type:"type"},function(){return this.ca},function(a){this.J&&D.pa(this,a);D.Da(a,Ba,Ba,"type");this.ca=a;this.start.Zd()&&(a===Cg?this.start=ec:a===Ed&&(this.start=hc));this.end.Zd()&&(a===Cg?this.end=tc:a===Ed&&(this.end=hc));this.rh=null});D.defineProperty(Ba,{color:"color"},function(){return this.Mo},function(a){this.J&&D.pa(this,a);v&&!Aa(a)&&D.k('Color "'+a+'" is not a valid color string for Brush.color');this.Mo=a;this.rh=null}); +D.defineProperty(Ba,{start:"start"},function(){return this.Op},function(a){this.J&&D.pa(this,a);D.l(a,R,Ba,"start");this.Op=a.V();this.rh=null});D.defineProperty(Ba,{end:"end"},function(){return this.ap},function(a){this.J&&D.pa(this,a);D.l(a,R,Ba,"end");this.ap=a.V();this.rh=null});D.defineProperty(Ba,{dv:"startRadius"},function(){return this.Xw},function(a){this.J&&D.pa(this,a);D.p(a,Ba,"startRadius");0>a&&D.ua(a,">= zero",Ba,"startRadius");this.Xw=a;this.rh=null}); D.defineProperty(Ba,{du:"endRadius"},function(){return this.Rv},function(a){this.J&&D.pa(this,a);D.p(a,Ba,"endRadius");0>a&&D.ua(a,">= zero",Ba,"endRadius");this.Rv=a;this.rh=null});D.defineProperty(Ba,{Lk:"colorStops"},function(){return this.qh},function(a){this.J&&D.pa(this,a);v&&D.l(a,ma,Ba,"colorStops");this.qh=a;this.rh=null});D.defineProperty(Ba,{pattern:"pattern"},function(){return this.Hw},function(a){this.J&&D.pa(this,a);this.Hw=a;this.rh=null}); Ba.randomColor=function(a,b){void 0===a&&(a=128);v&&(D.p(a,Ba,"randomColor:min"),(0>a||255d.length&&(d="0"+d);2>e.length&&(e="0"+e);2>c.length&&(c="0"+c);return"#"+ d+e+c};var co=(new ka(null)).Ok,Aa;Ba.isValidColor=Aa=function(a){if("black"===a)return!0;if(""===a)return!1;v&&D.h(a,"string",Ba,"isValidColor");co.fillStyle="#000000";var b=co.fillStyle;co.fillStyle=a;if(co.fillStyle!==b)return!0;co.fillStyle="#FFFFFF";b=co.fillStyle;co.fillStyle=a;return co.fillStyle!==b};var eo=new Zn,fo=new Zn,ho=new Zn,io=new Zn;Ba.lighten=function(a){return jo(a)}; @@ -1043,98 +1043,98 @@ io.mg;c=-.969266*ho.Oc+1.8760108*ho.Ld+.041556*ho.gd;d=.0556434*ho.Oc+-.2040259* 255,h=eo.gd/255,k=Math.max(e,g,h),d=Math.min(e,g,h),l=k-d,d=(k+d)/2;if(0===l)c=e=0;else{switch(k){case e:c=(g-h)/l%6;break;case g:c=(h-e)/l+2;break;case h:c=(e-g)/l+4}c*=60;0>c&&(c+=360);e=l/(1-Math.abs(2*d-1))}fo.Oc=Math.round(c);fo.Ld=Math.round(100*e);fo.gd=Math.round(100*d);fo.mg=eo.mg;fo.gd=Math.min(100,Math.max(0,fo.gd+100*a));return"hsla("+fo.Oc+", "+fo.Ld+"%, "+fo.gd+"%, "+fo.mg+")";default:return D.k("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}} function ko(a){co.clearRect(0,0,1,1);co.fillStyle="#000000";var b=co.fillStyle;co.fillStyle=a;co.fillStyle!==b?(co.fillRect(0,0,1,1),a=co.getImageData(0,0,1,1).data,eo.Oc=a[0],eo.Ld=a[1],eo.gd=a[2],eo.mg=a[3]/255):(co.fillStyle="#FFFFFF",b=co.fillStyle,co.fillStyle=a,co.fillStyle===b&&v&&D.k('Color "'+a+'" is not a valid color string for RGBA color conversion'),eo.Oc=0,eo.Ld=0,eo.gd=0,eo.mg=1)}function no(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)} function to(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}var so=216/24389,ro=24389/27,po=[95.047,100,108.883];function oo(a){return a>so?Math.pow(a,1/3):(ro*a+16)/116}function qo(a){var b=a*a*a;return b>so?b:(116*a-16)/ro} -function P(){D.uc(this);this.T=4225027;this.Gc=1;this.Bh=null;this.Xb="";this.ic=this.Lb=null;this.rb=(new O(NaN,NaN)).freeze();this.Ye=je;this.mi=Xd;this.li=he;this.Ic=new Da;this.Li=new Da;this.gj=new Da;this.Bb=this.Zo=1;this.tg=0;this.Og=uo;this.cn=Sd;this.Bd=(new B(NaN,NaN,NaN,NaN)).freeze();this.bc=(new B(NaN,NaN,NaN,NaN)).freeze();this.ad=(new B(0,0,NaN,NaN)).freeze();this.Z=this.Ws=this.Xs=null;this.Hm=this.re=Vc;this.it=0;this.rj=1;this.pr=0;this.Qi=1;this.yt=null;this.mt=-Infinity;this.on= -0;this.pn=Gd;this.qn=uj;this.yr="";this.Cc=this.la=null;this.Lo=-1;this.un=this.wg=this.tl=this.Op=null;this.Xz=Dj;this.kn=null}D.Bi(P);D.ja("GraphObject",P); -P.prototype.cloneProtected=function(a){a.T=this.T|6144;a.Gc=this.Gc;a.Xb=this.Xb;a.Lb=this.Lb;a.ic=this.ic;a.rb.assign(this.rb);a.Ye=this.Ye.V();a.mi=this.mi.V();a.li=this.li.V();a.gj=this.gj.copy();a.Bb=this.Bb;a.tg=this.tg;a.Og=this.Og;a.cn=this.cn.V();a.Bd.assign(this.Bd);a.bc.assign(this.bc);a.ad.assign(this.ad);a.Ws=this.Ws;null!==this.Z&&(a.Z=this.Z.copy());a.re=this.re.V();a.Hm=this.Hm.V();a.it=this.it;a.rj=this.rj;a.pr=this.pr;a.Qi=this.Qi;a.yt=this.yt;a.mt=this.mt;a.on=this.on;a.pn=this.pn.V(); -a.qn=this.qn;a.yr=this.yr;null!==this.la&&(a.la=this.la.copy());a.Cc=this.Cc;a.Lo=this.Lo;null!==this.tl&&(a.tl=D.dm(this.tl));null!==this.wg&&(a.wg=this.wg.copy());a.un=this.un};P.prototype.addCopyProperty=P.prototype.NH=function(a){var b=this.tl;if(D.isArray(b))for(var c=0;ck;)k+=g[n++%l],p=!p;q=!1}else k=g[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}} -P.prototype.raiseChangedEvent=P.prototype.hd=function(a,b,c,d,e,g,h){var k=this.Y;if(null!==k&&(k.ro(a,b,c,d,e,g,h),Fo(this)&&c===this&&a===bg&&Go(this,k,b),c===k&&0!==(k.T&16777216)&&null!==k.data))for(a=this.ya.o,c=a.length,d=0;da&&(a+=360));return a};P.prototype.getDocumentScale=P.prototype.Gj=function(){if(0!==(this.T&4096)===!1)return this.Zo;var a=this.Bb;return null!==this.Q?a*this.Q.Gj():a};P.prototype.getLocalPoint=P.prototype.xF=function(a,b){void 0===b&&(b=new O);b.assign(a);this.Hh.Di(b);return b}; -P.prototype.getNearestIntersectionPoint=P.prototype.yF=function(a,b,c){return this.Vn(a.x,a.y,b.x,b.y,c)};f=P.prototype;f.Vn=function(a,b,c,d,e){var g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),q=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.$l)return g=this.$,Je(g.left,g.top,g.right,g.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.n(0,0);d=this.Ga;c=Je(0,0,d.width,d.height,h,a,b,c,e);e.transform(g);return c}; +P.prototype.getDocumentAngle=P.prototype.pm=function(){var a;a=this.Hh;1===a.m11&&0===a.m12?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360));return a};P.prototype.getDocumentScale=P.prototype.Fj=function(){if(0!==(this.T&4096)===!1)return this.Yo;var a=this.Bb;return null!==this.Q?a*this.Q.Fj():a};P.prototype.getLocalPoint=P.prototype.xF=function(a,b){void 0===b&&(b=new O);b.assign(a);this.Hh.Ci(b);return b}; +P.prototype.getNearestIntersectionPoint=P.prototype.yF=function(a,b,c){return this.Un(a.x,a.y,b.x,b.y,c)};f=P.prototype;f.Un=function(a,b,c,d,e){var g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),q=h*(g.m12*g.dx-g.m11*g.dy);if(null!==this.$l)return g=this.$,Je(g.left,g.top,g.right,g.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.n(0,0);d=this.Ga;c=Je(0,0,d.width,d.height,h,a,b,c,e);e.transform(g);return c}; function Fk(a,b,c,d,e){if(!1!==Jm(a)){var g=a.margin,h=g.right+g.left,g=g.top+g.bottom;b=Math.max(b-h,0);c=Math.max(c-g,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-g,0);var h=a.angle,g=0,g=a.Ea,k=0;a instanceof z&&(k=a.jb);90===h||270===h?(b=isFinite(g.height)?g.height+k:b,c=isFinite(g.width)?g.width+k:c):(b=isFinite(g.width)?g.width+k:b,c=isFinite(g.height)?g.height+k:c);var g=d||0,k=e||0,l=a instanceof x;switch(Ko(a,!0)){case Xj:k=g=0;l&&(c=b=Infinity);break;case pf:isFinite(b)&&b>d&&(g=b);isFinite(c)&& -c>e&&(k=c);break;case wo:isFinite(b)&&b>d&&(g=b);k=0;l&&(c=Infinity);break;case vo:isFinite(c)&&c>e&&(k=c),g=0,l&&(b=Infinity)}var l=a.kf,m=a.ig;g>l.width&&m.widthl.height&&m.heighta.height||this.hi.nf>a.width))&&(c=!0);this.T=c?this.T|256:this.T&-257;this.bc.F()|| -D.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.bc.toString());this.oy(g,this.bc);Lo(this,!1);D.Kb(g)};f.zj=function(){}; +c>e&&(k=c);break;case wo:isFinite(b)&&b>d&&(g=b);k=0;l&&(c=Infinity);break;case vo:isFinite(c)&&c>e&&(k=c),g=0,l&&(b=Infinity)}var l=a.kf,m=a.ig;g>l.width&&m.widthl.height&&m.heighta.height||this.gi.nf>a.width))&&(c=!0);this.T=c?this.T|256:this.T&-257;this.bc.F()|| +D.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.bc.toString());this.oy(g,this.bc);Lo(this,!1);D.Kb(g)};f.yj=function(){}; function Mo(a,b,c,d,e){var g=a.$;g.x=b;g.y=c;g.width=d;g.height=e;if(!a.Ea.F()){g=a.Bd;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=g.width+b;g=g.height+h;d+=b;e+=h;b=Ko(a,!0);c===d&&g===e&&(b=Xj);switch(b){case Xj:if(c>d||g>e)hm(a,!0),Fk(a,c>d?d:c,g>e?e:g);break;case pf:hm(a,!0);Fk(a,d,e,0,0);break;case wo:hm(a,!0);Fk(a,d,g,0,0);break;case vo:hm(a,!0),Fk(a,c,e,0,0)}}} -f.oy=function(a,b){var c=this.Y;null!==c&&null!==c.g&&(c.to!==this&&c.FG!==this&&c.JG!==this||No(c,!0),this.qa(),yb(a,b)||(c.Vk(),this.Os(c)))};f.Os=function(a){null!==this.ud&&(No(a,!0),a instanceof G&&Oo(a,this))};D.defineProperty(P,{Rq:"shadowVisible"},function(){return this.un},function(a){var b=this.un;b!==a&&(v&&null!==a&&D.h(a,"boolean",P,"shadowVisible"),this.un=a,this.qa(),this.i("shadowVisible",b,a))}); +f.oy=function(a,b){var c=this.Y;null!==c&&null!==c.g&&(c.so!==this&&c.FG!==this&&c.JG!==this||No(c,!0),this.qa(),yb(a,b)||(c.Vk(),this.Os(c)))};f.Os=function(a){null!==this.ud&&(No(a,!0),a instanceof G&&Oo(a,this))};D.defineProperty(P,{Rq:"shadowVisible"},function(){return this.un},function(a){var b=this.un;b!==a&&(v&&null!==a&&D.h(a,"boolean",P,"shadowVisible"),this.un=a,this.qa(),this.i("shadowVisible",b,a))}); P.prototype.Ee=function(a,b){if(this.visible){var c=this.bc;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)){var d=this.opacity,e=1;if(1!==d){if(0===d)return;e=a.globalAlpha;a.globalAlpha=e*d}if(a instanceof od)a:{if(this.visible){var g=null,h=a.by;if(this instanceof x&&(this.type===Po||this.type===Qo))Ro(this,a,b);else{var k=this.bc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.Q;0!==(this.T&4096)===!0&&So(this);var c=0!==(this.T&256),n=!1;this instanceof -na&&(a.font=this.font);if(c){n=m.kh()?m.Ga:m.$;if(null!==this.wg)var p=this.wg,q=p.x,r=p.y,s=p.width,p=p.height;else q=Math.max(k.x,n.x),r=Math.max(k.y,n.y),s=Math.min(k.right,n.right)-q,p=Math.min(k.bottom,n.bottom)-r;if(q>k.width+k.x||k.x>n.width+n.x||r>k.height+k.y||k.y>n.height+n.y)break a;n=!0;qd(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}if(this.Kj()){var u=this;if(!u.isVisible())break a}a.Mh.Zb=[1,0,0,1,0,0];q=!1;this.Kj()&&this.Xk&&b.Hj("drawShadows")&&(r=this.tn,a.NB(r.x* -b.scale*b.qd,r.y*b.scale*b.qd,u.Ng),a.wo(),a.shadowColor=u.sn);u=!1;this.Y&&b.Hj("drawShadows")&&(u=this.Y.Xk);!0===this.Rq?(a.wo(),!1===q&&u&&(qd(a,1,0,0,1,0,0),a.ib(),q=!0)):!1===this.Rq&&a.vo();null!==this.ic&&(To(this,a,this.ic,!0,!0),!1===q&&u&&(qd(a,1,0,0,1,0,0),a.ib(),q=!0),this.ic instanceof Ba&&this.ic.type===Ed?(a.beginPath(),a.rect(k.x,k.y,k.width,k.height),a.Wg(this.ic)):a.fillRect(k.x,k.y,k.width,k.height));this instanceof x?qd(a,l.m11,l.m12,l.m21,l.m22,l.dx,l.dy):a.Mh.Zb=[l.m11,l.m12, +na&&(a.font=this.font);if(c){n=m.kh()?m.Ga:m.$;if(null!==this.wg)var p=this.wg,q=p.x,r=p.y,s=p.width,p=p.height;else q=Math.max(k.x,n.x),r=Math.max(k.y,n.y),s=Math.min(k.right,n.right)-q,p=Math.min(k.bottom,n.bottom)-r;if(q>k.width+k.x||k.x>n.width+n.x||r>k.height+k.y||k.y>n.height+n.y)break a;n=!0;qd(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}if(this.Kj()){var u=this;if(!u.isVisible())break a}a.Mh.Zb=[1,0,0,1,0,0];q=!1;this.Kj()&&this.Xk&&b.Gj("drawShadows")&&(r=this.tn,a.NB(r.x* +b.scale*b.qd,r.y*b.scale*b.qd,u.Ng),a.vo(),a.shadowColor=u.sn);u=!1;this.Y&&b.Gj("drawShadows")&&(u=this.Y.Xk);!0===this.Rq?(a.vo(),!1===q&&u&&(qd(a,1,0,0,1,0,0),a.ib(),q=!0)):!1===this.Rq&&a.uo();null!==this.ic&&(To(this,a,this.ic,!0,!0),!1===q&&u&&(qd(a,1,0,0,1,0,0),a.ib(),q=!0),this.ic instanceof Ba&&this.ic.type===Ed?(a.beginPath(),a.rect(k.x,k.y,k.width,k.height),a.Wg(this.ic)):a.fillRect(k.x,k.y,k.width,k.height));this instanceof x?qd(a,l.m11,l.m12,l.m21,l.m22,l.dx,l.dy):a.Mh.Zb=[l.m11,l.m12, l.m21,l.m22,l.dx,l.dy];null!==this.Lb&&(!1===q&&u&&(qd(a,1,0,0,1,0,0),a.ib(),q=!0),s=this.Ga,l=k=0,r=s.width,s=s.height,p=0,this instanceof z&&(s=this.pb.mb,k=s.x,l=s.y,r=s.width,s=s.height,p=this.Pg),To(this,a,this.Lb,!0,!1),this.Lb instanceof Ba&&this.Lb.type===Ed?(a.beginPath(),a.rect(k-p/2,l-p/2,r+p,s+p),a.Wg(this.Lb)):a.fillRect(k-p/2,l-p/2,r+p,s+p));u&&(null!==this.Lb||null!==this.ic||null!==m&&0!==(m.T&512)||null!==m&&(m.type===Nl||m.type===Vj)&&m.Vd()!==this)?(Uo(this,!0),null===this.Rq&& -a.vo()):Uo(this,!1);this.Pk(a,b);u&&0!==(this.T&512)===!0&&a.wo();this.Kj()&&u&&a.vo();c&&(a.restore(),n&&a.Ef.pop());this instanceof x&&(g=a.Ef.pop());!0===q&&a.Ef.pop();null!==a.kF&&(null===g&&(h===a.by?(qd(a,1,0,0,1,0,0),g=a.Ef.pop()):g=a.by),a.kF(this,g))}}}}else{if(this instanceof x&&(this.type===Po||this.type===Qo)){Ro(this,a,b);1!==d&&(a.globalAlpha=e);return}this instanceof J&&this.Gu(!1);v&&v.Aj&&v.zI(a,this);g=this.transform;h=this.Q;0!==(this.T&4096)===!0&&So(this);m=0!==(this.T&256);a.dq&& +a.uo()):Uo(this,!1);this.Pk(a,b);u&&0!==(this.T&512)===!0&&a.vo();this.Kj()&&u&&a.uo();c&&(a.restore(),n&&a.Ef.pop());this instanceof x&&(g=a.Ef.pop());!0===q&&a.Ef.pop();null!==a.kF&&(null===g&&(h===a.by?(qd(a,1,0,0,1,0,0),g=a.Ef.pop()):g=a.by),a.kF(this,g))}}}}else{if(this instanceof x&&(this.type===Po||this.type===Qo)){Ro(this,a,b);1!==d&&(a.globalAlpha=e);return}this instanceof J&&this.Gu(!1);v&&v.zj&&v.zI(a,this);g=this.transform;h=this.Q;0!==(this.T&4096)===!0&&So(this);m=0!==(this.T&256);a.cq&& (m=!1);this instanceof na&&(a.font=this.font);if(m){v&&v.jF&&D.trace("clip"+this.toString());n=h.kh()?h.Ga:h.$;null!==this.wg?(q=this.wg,k=q.x,l=q.y,u=q.width,q=q.height):(k=Math.max(c.x,n.x),l=Math.max(c.y,n.y),u=Math.min(c.right,n.right)-k,q=Math.min(c.bottom,n.bottom)-l);if(k>c.width+c.x||c.x>n.width+n.x||l>c.height+c.y||c.y>n.height+n.y){1!==d&&(a.globalAlpha=e);return}v&&v.jF&&v.BI(a,k,l,u,q);a.save();a.beginPath();a.rect(k,l,u,q);a.clip()}if(this.Kj()){if(!this.isVisible()){1!==d&&(a.globalAlpha= -e);return}this.Xk&&b.Hj("drawShadows")&&(n=this.tn,a.NB(n.x*b.scale*b.qd,n.y*b.scale*b.qd,this.Ng),a.wo(),a.shadowColor=this.sn)}n=!1;this.Y&&b.Hj("drawShadows")&&(n=this.Y.Xk);!0===this.Rq?a.wo():!1===this.Rq&&a.vo();null!==this.ic&&(To(this,a,this.ic,!0,!0),this.ic instanceof Ba&&this.ic.type===Ed?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Wg(this.ic)):a.fillRect(c.x,c.y,c.width,c.height));g.xu()||a.transform(g.m11,g.m12,g.m21,g.m22,g.dx,g.dy);null!==this.Lb&&(u=this.Ga,k=c=0,l=u.width,u= -u.height,q=0,this instanceof z&&(u=this.pb.mb,c=u.x,k=u.y,l=u.width,u=u.height,q=this.Pg),To(this,a,this.Lb,!0,!1),this.Lb instanceof Ba&&this.Lb.type===Ed?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Wg(this.Lb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));v&&v.Aj&&v.AI(a,this);n&&(null!==this.Lb||null!==this.ic||null!==h&&0!==(h.T&512)||null!==h&&(h.type===Nl||h.type===Vj)&&h.Vd()!==this)?(Uo(this,!0),null===this.Rq&&a.vo()):Uo(this,!1);this.Pk(a,b);n&&0!==(this.T&512)===!0&&a.wo();this.Kj()&&n&&a.vo();m? +e);return}this.Xk&&b.Gj("drawShadows")&&(n=this.tn,a.NB(n.x*b.scale*b.qd,n.y*b.scale*b.qd,this.Ng),a.vo(),a.shadowColor=this.sn)}n=!1;this.Y&&b.Gj("drawShadows")&&(n=this.Y.Xk);!0===this.Rq?a.vo():!1===this.Rq&&a.uo();null!==this.ic&&(To(this,a,this.ic,!0,!0),this.ic instanceof Ba&&this.ic.type===Ed?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Wg(this.ic)):a.fillRect(c.x,c.y,c.width,c.height));g.xu()||a.transform(g.m11,g.m12,g.m21,g.m22,g.dx,g.dy);null!==this.Lb&&(u=this.Ga,k=c=0,l=u.width,u= +u.height,q=0,this instanceof z&&(u=this.pb.mb,c=u.x,k=u.y,l=u.width,u=u.height,q=this.Pg),To(this,a,this.Lb,!0,!1),this.Lb instanceof Ba&&this.Lb.type===Ed?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Wg(this.Lb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));v&&v.zj&&v.AI(a,this);n&&(null!==this.Lb||null!==this.ic||null!==h&&0!==(h.T&512)||null!==h&&(h.type===Nl||h.type===Vj)&&h.Vd()!==this)?(Uo(this,!0),null===this.Rq&&a.uo()):Uo(this,!1);this.Pk(a,b);n&&0!==(this.T&512)===!0&&a.vo();this.Kj()&&n&&a.uo();m? (a.restore(),this instanceof x?a.Be(!0):a.Be(!1)):g.xu()||(h=1/(g.m11*g.m22-g.m12*g.m21),a.transform(g.m22*h,-g.m12*h,-g.m21*h,g.m11*h,h*(g.m21*g.dy-g.m22*g.dx),h*(g.m12*g.dx-g.m11*g.dy)))}1!==d&&(a.globalAlpha=e)}}}; function Ro(a,b,c){var d=a.bc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.ic&&(To(a,b,a.ic,!0,!0),a.ic instanceof Ba&&a.ic.type===Ed?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Wg(a.ic)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Lb&&(To(a,b,a.Lb,!0,!1),a.Lb instanceof Ba&&a.Lb.type===Ed?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Wg(a.Lb)):b.fillRect(d.x,d.y,d.width,d.height)),a.Pk(b,c))}P.prototype.Pk=function(){}; -function To(a,b,c,d,e){if(null!==c){var g=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Bg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ga,g=h.width,h=h.height;if(e)var l=a.$,g=l.width,h=l.height;var m=b instanceof Dd;if(m&&c.rh&&(c.type===$n||c.Oo===g&&c.jz===h))k=c.rh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.$,g=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*g+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*g+c.end.offsetX;q=c.end.y*h+c.end.offsetY; -l+=r;p+=r;n+=s;q+=s;if(c.type===Cg)k=b.createLinearGradient(l,n,p,q);else if(c.type===Ed)s=isNaN(c.du)?Math.max(g,h)/2:c.du,isNaN(c.dv)?(r=0,s=Math.max(g,h)/2):r=c.dv,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===$n)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else D.hc(c.type,"Brush type");if(c.type!==$n&&(e=c.Lk,null!==e))for(e=e.j;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.rh=k,null!==k&&(c.Oo=g,c.jz=h),null===k&&c.type===$n&&-1!==c.Oo)){c.Oo=-1;var t=a.g;null!==t&& --1===c.Oo&&D.setTimeout(function(){t.Gq()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}P.prototype.isContainedBy=P.prototype.tm=function(a){if(a instanceof x)a:{if(this!==a&&null!==a)for(var b=this.Q;null!==b;){if(b===a){a=!0;break a}b=b.Q}a=!1}else a=!1;return a};P.prototype.isVisibleObject=P.prototype.Oj=function(){if(!this.visible)return!1;var a=this.Q;return null!==a?a.Oj():!0}; +function To(a,b,c,d,e){if(null!==c){var g=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===Bg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ga,g=h.width,h=h.height;if(e)var l=a.$,g=l.width,h=l.height;var m=b instanceof Dd;if(m&&c.rh&&(c.type===$n||c.No===g&&c.jz===h))k=c.rh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.$,g=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*g+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*g+c.end.offsetX;q=c.end.y*h+c.end.offsetY; +l+=r;p+=r;n+=s;q+=s;if(c.type===Cg)k=b.createLinearGradient(l,n,p,q);else if(c.type===Ed)s=isNaN(c.du)?Math.max(g,h)/2:c.du,isNaN(c.dv)?(r=0,s=Math.max(g,h)/2):r=c.dv,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===$n)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else D.hc(c.type,"Brush type");if(c.type!==$n&&(e=c.Lk,null!==e))for(e=e.j;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.rh=k,null!==k&&(c.No=g,c.jz=h),null===k&&c.type===$n&&-1!==c.No)){c.No=-1;var t=a.g;null!==t&& +-1===c.No&&D.setTimeout(function(){t.Gq()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}P.prototype.isContainedBy=P.prototype.um=function(a){if(a instanceof x)a:{if(this!==a&&null!==a)for(var b=this.Q;null!==b;){if(b===a){a=!0;break a}b=b.Q}a=!1}else a=!1;return a};P.prototype.isVisibleObject=P.prototype.Oj=function(){if(!this.visible)return!1;var a=this.Q;return null!==a?a.Oj():!0}; P.prototype.isEnabledObject=P.prototype.vu=function(){for(var a=this instanceof x?this:this.Q;null!==a&&a.isEnabled;)a=a.Q;return null===a};D.defineProperty(P,{lF:"enabledChanged"},function(){return null!==this.la?this.la.Pr:null},function(a){Ao(this);var b=this.la.Pr;b!==a&&(null!==a&&D.h(a,"function",P,"enabledChanged"),this.la.Pr=a,this.i("enabledChanged",b,a))}); -function So(a){if(0!==(a.T&2048)===!0){var b=a.Ic;b.reset();if(!a.bc.F()||!a.Bd.F()){Vo(a,!1);return}b.translate(a.bc.x,a.bc.y);b.translate(-a.Fa.x,-a.Fa.y);var c=a.Ga;Io(a,b,c.x,c.y,c.width,c.height);Vo(a,!1);Wo(a,!0)}0!==(a.T&4096)===!0&&(b=a.Q,null===b?(a.Li.set(a.Ic),a.Zo=a.scale,Wo(a,!1)):null!==b.Hh&&(c=a.Li,c.reset(),b.kh()?c.multiply(b.Li):null!==b.Q&&c.multiply(b.Q.Li),c.multiply(a.Ic),a.Zo=a.scale*b.Zo,Wo(a,!1)))} -function Io(a,b,c,d,e,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=hc;a.Kj()&&a.Lf.fd()&&(h=a.Lf);var k=D.O();if(a instanceof F&&a.vf!==a)for(c=a.vf,d=c.Ga,k.av(d.x,d.y,d.width,d.height,h),c.gj.wb(k),k.offset(-c.Fa.x,-c.Fa.y),h=c.Q;null!==h&&h!==a;)h.gj.wb(k),k.offset(-h.Fa.x,-h.Fa.y),h=h.Q;else k.av(c,d,e,g,h);b.rotate(a.angle,k.x,k.y);D.A(k)}}f=P.prototype;f.K=function(a){void 0===a&&(a=!1);if(!0!==Jm(this)){hm(this,!0);Lo(this,!0);var b=this.Q;null===b||a||b.K()}}; -f.wq=function(){!0!==Jm(this)&&(hm(this,!0),Lo(this,!0))};function Xo(a){if(!1===Km(a)){var b=a.Q;null!==b?b.K():a.Kj()&&(b=a.g,null!==b&&(b.Eg.add(a),a instanceof G&&a.gg(),b.Se()));Lo(a,!0)}}f.$i=function(){0!==(this.T&2048)===!1&&(Vo(this,!0),Wo(this,!0))};f.ZA=function(){Wo(this,!0)};f.qa=function(){var a=this.Y;null!==a&&a.qa()}; +function So(a){if(0!==(a.T&2048)===!0){var b=a.Ic;b.reset();if(!a.bc.F()||!a.Bd.F()){Vo(a,!1);return}b.translate(a.bc.x,a.bc.y);b.translate(-a.Fa.x,-a.Fa.y);var c=a.Ga;Io(a,b,c.x,c.y,c.width,c.height);Vo(a,!1);Wo(a,!0)}0!==(a.T&4096)===!0&&(b=a.Q,null===b?(a.Ki.set(a.Ic),a.Yo=a.scale,Wo(a,!1)):null!==b.Hh&&(c=a.Ki,c.reset(),b.kh()?c.multiply(b.Ki):null!==b.Q&&c.multiply(b.Q.Ki),c.multiply(a.Ic),a.Yo=a.scale*b.Yo,Wo(a,!1)))} +function Io(a,b,c,d,e,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=hc;a.Kj()&&a.Lf.fd()&&(h=a.Lf);var k=D.O();if(a instanceof F&&a.vf!==a)for(c=a.vf,d=c.Ga,k.av(d.x,d.y,d.width,d.height,h),c.fj.wb(k),k.offset(-c.Fa.x,-c.Fa.y),h=c.Q;null!==h&&h!==a;)h.fj.wb(k),k.offset(-h.Fa.x,-h.Fa.y),h=h.Q;else k.av(c,d,e,g,h);b.rotate(a.angle,k.x,k.y);D.A(k)}}f=P.prototype;f.K=function(a){void 0===a&&(a=!1);if(!0!==Jm(this)){hm(this,!0);Lo(this,!0);var b=this.Q;null===b||a||b.K()}}; +f.vq=function(){!0!==Jm(this)&&(hm(this,!0),Lo(this,!0))};function Xo(a){if(!1===Km(a)){var b=a.Q;null!==b?b.K():a.Kj()&&(b=a.g,null!==b&&(b.Eg.add(a),a instanceof G&&a.gg(),b.Se()));Lo(a,!0)}}f.Zi=function(){0!==(this.T&2048)===!1&&(Vo(this,!0),Wo(this,!0))};f.ZA=function(){Wo(this,!0)};f.qa=function(){var a=this.Y;null!==a&&a.qa()}; function Ko(a,b){var c=a.stretch,d=a.Q;if(null!==d&&d.ca===ea)return Yo(a,d.me(a.$b),d.le(a.column),b);if(null!==d&&d.ca===Nl&&d.Vd()===a)return Zo(a,pf,b);if(c===uo){if(null!==d){if(d.ca===Vj&&d.Vd()===a)return Zo(a,pf,b);c=d.je;return c===uo?Zo(a,Xj,b):Zo(a,c,b)}return Zo(a,Xj,b)}return Zo(a,c,b)} function Yo(a,b,c,d){var e=a.stretch;if(e!==uo)return Zo(a,e,d);var g=e=null;switch(b.stretch){case vo:g=!0;break;case pf:g=!0}switch(c.stretch){case wo:e=!0;break;case pf:e=!0}b=a.Q.je;null===e&&(e=b===wo||b===pf);null===g&&(g=b===vo||b===pf);return!0===e&&!0===g?Zo(a,pf,d):!0===e?Zo(a,wo,d):!0===g?Zo(a,vo,d):Zo(a,Xj,d)} function Zo(a,b,c){if(c)return b;if(b===Xj)return Xj;c=a.Ea;if(c.F())return Xj;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===wo)return Xj;if(b===pf)return vo}else{if(b===vo)return Xj;if(b===pf)return wo}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===vo)return Xj;if(b===pf)return wo}else{if(b===wo)return Xj;if(b===pf)return vo}return b} -D.defineProperty(P,{Nq:"segmentOrientation"},function(){return this.qn},function(a){var b=this.qn;b!==a&&(v&&D.Da(a,J,P,"segmentOrientation"),this.qn=a,this.K(),this.i("segmentOrientation",b,a),a===uj&&(this.angle=0))});D.defineProperty(P,{Te:"segmentIndex"},function(){return this.mt},function(a){v&&D.h(a,"number",P,"segmentIndex");a=Math.round(a);var b=this.mt;b!==a&&(this.mt=a,this.K(),this.i("segmentIndex",b,a))}); +D.defineProperty(P,{Nq:"segmentOrientation"},function(){return this.qn},function(a){var b=this.qn;b!==a&&(v&&D.Da(a,J,P,"segmentOrientation"),this.qn=a,this.K(),this.i("segmentOrientation",b,a),a===Aj&&(this.angle=0))});D.defineProperty(P,{Te:"segmentIndex"},function(){return this.mt},function(a){v&&D.h(a,"number",P,"segmentIndex");a=Math.round(a);var b=this.mt;b!==a&&(this.mt=a,this.K(),this.i("segmentIndex",b,a))}); D.defineProperty(P,{DB:"segmentFraction"},function(){return this.on},function(a){v&&D.h(a,"number",P,"segmentFraction");isNaN(a)?a=0:0>a?a=0:1a||1=a&&D.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Bb=a,this.$i(),this.K(),this.i("scale",b,a))});D.defineProperty(P,{angle:"angle"},function(){return this.tg},function(a){var b=this.tg;b!==a&&(v&&D.p(a,P,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.tg=a,this.K(),this.$i(),this.i("angle",b,a)))}); +D.defineProperty(P,{position:"position"},function(){return this.rb},function(a){v&&D.l(a,O,P,"position");var b=a.x,c=a.y,d=this.rb,e=d.x,g=d.y;(e===b||isNaN(e)&&isNaN(b))&&(g===c||isNaN(g)&&isNaN(c))?this.KB():(a=a.V(),this.JB(a,d)&&this.i("position",d,a))});P.prototype.KB=function(){};P.prototype.JB=function(a){this.rb=a;Xo(this);this.Zi();return!0};P.prototype.Jy=function(a,b){this.rb.n(a,b);this.Zi()};D.w(P,{$:"actualBounds"},function(){return this.bc}); +D.defineProperty(P,{scale:"scale"},function(){return this.Bb},function(a){var b=this.Bb;b!==a&&(v&&D.p(a,P,"scale"),0>=a&&D.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Bb=a,this.Zi(),this.K(),this.i("scale",b,a))});D.defineProperty(P,{angle:"angle"},function(){return this.tg},function(a){var b=this.tg;b!==a&&(v&&D.p(a,P,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.tg=a,$o(this),this.K(),this.Zi(),this.i("angle",b,a)))}); D.defineProperty(P,{Ea:"desiredSize"},function(){return this.Ye},function(a){v&&D.l(a,Ca,P,"desiredSize");var b=a.width,c=a.height,d=this.Ye,e=d.width,g=d.height;(e===b||isNaN(e)&&isNaN(b))&&(g===c||isNaN(g)&&isNaN(c))||(this.Ye=a=a.V(),this.K(),this instanceof z&&this.Re(),this.i("desiredSize",d,a),Fo(this)&&(a=this.Y,null!==a&&(Go(this,a,"width"),Go(this,a,"height"))))}); D.defineProperty(P,{width:"width"},function(){return this.Ye.width},function(a){var b=this.Ye.width;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",P,"width"),b=this.Ye,this.Ye=a=(new Ca(a,this.Ye.height)).freeze(),this.K(),this instanceof z&&this.Re(),this.i("desiredSize",b,a),Fo(this)&&(a=this.Y,null!==a&&Go(this,a,"width")))}); D.defineProperty(P,{height:"height"},function(){return this.Ye.height},function(a){var b=this.Ye.height;b===a||isNaN(b)&&isNaN(a)||(v&&D.h(a,"number",P,"height"),b=this.Ye,this.Ye=a=(new Ca(this.Ye.width,a)).freeze(),this.K(),this instanceof z&&this.Re(),this.i("desiredSize",b,a),Fo(this)&&(a=this.Y,null!==a&&Go(this,a,"height")))}); -D.defineProperty(P,{ig:"minSize"},function(){return this.mi},function(a){var b=this.mi;b.P(a)||(v&&D.l(a,Ca,P,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.mi=a,this.K(),this.i("minSize",b,a))});D.defineProperty(P,{kf:"maxSize"},function(){return this.li},function(a){var b=this.li;b.P(a)||(v&&D.l(a,Ca,P,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.li=a,this.K(),this.i("maxSize",b,a))}); -D.w(P,{Fa:"measuredBounds"},function(){return this.Bd});D.w(P,{Ga:"naturalBounds"},function(){return this.ad},{configurable:!0});D.defineProperty(P,{margin:"margin"},function(){return this.cn},function(a){"number"===typeof a?a=new Ib(a):v&&D.l(a,Ib,P,"margin");var b=this.cn;b.P(a)||(this.cn=a=a.V(),this.K(),this.i("margin",b,a))});D.w(P,{transform:null},function(){0!==(this.T&2048)===!0&&So(this);return this.Ic});D.w(P,{Hh:null},function(){0!==(this.T&4096)===!0&&So(this);return this.Li}); +D.defineProperty(P,{ig:"minSize"},function(){return this.li},function(a){var b=this.li;b.P(a)||(v&&D.l(a,Ca,P,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.li=a,this.K(),this.i("minSize",b,a))});D.defineProperty(P,{kf:"maxSize"},function(){return this.ki},function(a){var b=this.ki;b.P(a)||(v&&D.l(a,Ca,P,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.ki=a,this.K(),this.i("maxSize",b,a))}); +D.w(P,{Fa:"measuredBounds"},function(){return this.Bd});D.w(P,{Ga:"naturalBounds"},function(){return this.ad},{configurable:!0});D.defineProperty(P,{margin:"margin"},function(){return this.cn},function(a){"number"===typeof a?a=new Ib(a):v&&D.l(a,Ib,P,"margin");var b=this.cn;b.P(a)||(this.cn=a=a.V(),this.K(),this.i("margin",b,a))});D.w(P,{transform:null},function(){0!==(this.T&2048)===!0&&So(this);return this.Ic});D.w(P,{Hh:null},function(){0!==(this.T&4096)===!0&&So(this);return this.Ki}); D.defineProperty(P,{alignment:"alignment"},function(){return this.re},function(a){var b=this.re;b.P(a)||(v&&D.l(a,R,P,"alignment"),a.Zd()&&!a.ed()&&D.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.re=a=a.V(),Xo(this),this.i("alignment",b,a))});D.defineProperty(P,{column:"column"},function(){return this.pr},function(a){v&&D.p(a,P,"column");a=Math.round(a);var b=this.pr;b!==a&&(0>a&&D.ua(a,">= 0",P,"column"),this.pr=a,this.K(),this.i("column",b,a))}); -D.defineProperty(P,{fI:"columnSpan"},function(){return this.Qi},function(a){v&&D.h(a,"number",P,"columnSpan");a=Math.round(a);var b=this.Qi;b!==a&&(1>a&&D.ua(a,">= 1",P,"columnSpan"),this.Qi=a,this.K(),this.i("columnSpan",b,a))});D.defineProperty(P,{$b:"row"},function(){return this.it},function(a){v&&D.p(a,P,"row");a=Math.round(a);var b=this.it;b!==a&&(0>a&&D.ua(a,">= 0",P,"row"),this.it=a,this.K(),this.i("row",b,a))}); -D.defineProperty(P,{rowSpan:"rowSpan"},function(){return this.rj},function(a){v&&D.h(a,"number",P,"rowSpan");a=Math.round(a);var b=this.rj;b!==a&&(1>a&&D.ua(a,">= 1",P,"rowSpan"),this.rj=a,this.K(),this.i("rowSpan",b,a))});D.defineProperty(P,{Ky:"spanAllocation"},function(){return this.yt},function(a){var b=this.yt;b!==a&&(null!==a&&D.h(a,"function",P,"spanAllocation"),this.yt=a,this.K(),this.i("spanAllocation",b,a))}); +D.defineProperty(P,{fI:"columnSpan"},function(){return this.Pi},function(a){v&&D.h(a,"number",P,"columnSpan");a=Math.round(a);var b=this.Pi;b!==a&&(1>a&&D.ua(a,">= 1",P,"columnSpan"),this.Pi=a,this.K(),this.i("columnSpan",b,a))});D.defineProperty(P,{$b:"row"},function(){return this.it},function(a){v&&D.p(a,P,"row");a=Math.round(a);var b=this.it;b!==a&&(0>a&&D.ua(a,">= 0",P,"row"),this.it=a,this.K(),this.i("row",b,a))}); +D.defineProperty(P,{rowSpan:"rowSpan"},function(){return this.qj},function(a){v&&D.h(a,"number",P,"rowSpan");a=Math.round(a);var b=this.qj;b!==a&&(1>a&&D.ua(a,">= 1",P,"rowSpan"),this.qj=a,this.K(),this.i("rowSpan",b,a))});D.defineProperty(P,{Ky:"spanAllocation"},function(){return this.yt},function(a){var b=this.yt;b!==a&&(null!==a&&D.h(a,"function",P,"spanAllocation"),this.yt=a,this.K(),this.i("spanAllocation",b,a))}); D.defineProperty(P,{Gh:"alignmentFocus"},function(){return this.Hm},function(a){var b=this.Hm;b.P(a)||(v&&D.l(a,R,P,"alignmentFocus"),!a.Zd()||a.ed()||a.P(cc)&&this instanceof G||D.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Hm=a=a.V(),this.K(),this.i("alignmentFocus",b,a))}); D.defineProperty(P,{ud:"portId"},function(){return this.Ws},function(a){var b=this.Ws;if(b!==a){v&&null!==a&&D.h(a,"string",P,"portId");var c=this.Y;null===c||c instanceof G||(D.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&bp(c,this);this.Ws=a;if(null!==a&&c){c.Uk=!0;null===c.xe&&cp(c);var d=this.ud;null!==d&&c.xe.add(d,this)}this.i("portId",b,a)}});function dp(a){var b=a.Y;if(b instanceof G&&(null!==a.ud||a===b.port)){var c=b.g;null===c||c.ra.ob||Oo(b,a)}} function $o(a){var b=a.g;null===b||b.ra.ob||(a instanceof x?a instanceof G?a.gg():ep(a,a,function(a){dp(a)}):dp(a))}D.defineProperty(P,{Hb:"toSpot"},function(){return null!==this.Z?this.Z.Gk:cc},function(a){this.Wd();var b=this.Z.Gk;b.P(a)||(v&&D.l(a,R,P,"toSpot"),a=a.V(),this.Z.Gk=a,this.i("toSpot",b,a),dp(this))}); D.defineProperty(P,{Dm:"toEndSegmentLength"},function(){return null!==this.Z?this.Z.Ek:10},function(a){this.Wd();var b=this.Z.Ek;b!==a&&(v&&D.h(a,"number",P,"toEndSegmentLength"),0>a&&D.ua(a,">= 0",P,"toEndSegmentLength"),this.Z.Ek=a,this.i("toEndSegmentLength",b,a),dp(this))}); D.defineProperty(P,{fv:"toEndSegmentDirection"},function(){return null!==this.Z?this.Z.Dk:Do},function(a){this.Wd();var b=this.Z.Dk;b!==a&&(D.Pn("GraphObject.toEndSegmentDirection","2.0"),v&&D.Da(a,G,P,"toEndSegmentDirection"),this.Z.Dk=a,this.i("toEndSegmentDirection",b,a),dp(this))});D.defineProperty(P,{gv:"toShortLength"},function(){return null!==this.Z?this.Z.Fk:0},function(a){this.Wd();var b=this.Z.Fk;b!==a&&(v&&D.h(a,"number",P,"toShortLength"),this.Z.Fk=a,this.i("toShortLength",b,a),dp(this))}); -D.defineProperty(P,{cH:"toLinkable"},function(){return null!==this.Z?this.Z.Gt:null},function(a){this.Wd();var b=this.Z.Gt;b!==a&&(v&&null!==a&&D.h(a,"boolean",P,"toLinkable"),this.Z.Gt=a,this.i("toLinkable",b,a))});D.defineProperty(P,{wK:"toMaxLinks"},function(){return null!==this.Z?this.Z.Ht:Infinity},function(a){this.Wd();var b=this.Z.Ht;b!==a&&(v&&D.h(a,"number",P,"toMaxLinks"),0>a&&D.ua(a,">= 0",P,"toMaxLinks"),this.Z.Ht=a,this.i("toMaxLinks",b,a))}); +D.defineProperty(P,{cH:"toLinkable"},function(){return null!==this.Z?this.Z.Gt:null},function(a){this.Wd();var b=this.Z.Gt;b!==a&&(v&&null!==a&&D.h(a,"boolean",P,"toLinkable"),this.Z.Gt=a,this.i("toLinkable",b,a))});D.defineProperty(P,{xK:"toMaxLinks"},function(){return null!==this.Z?this.Z.Ht:Infinity},function(a){this.Wd();var b=this.Z.Ht;b!==a&&(v&&D.h(a,"number",P,"toMaxLinks"),0>a&&D.ua(a,">= 0",P,"toMaxLinks"),this.Z.Ht=a,this.i("toMaxLinks",b,a))}); D.defineProperty(P,{Gb:"fromSpot"},function(){return null!==this.Z?this.Z.jk:cc},function(a){this.Wd();var b=this.Z.jk;b.P(a)||(v&&D.l(a,R,P,"fromSpot"),a=a.V(),this.Z.jk=a,this.i("fromSpot",b,a),dp(this))});D.defineProperty(P,{om:"fromEndSegmentLength"},function(){return null!==this.Z?this.Z.hk:10},function(a){this.Wd();var b=this.Z.hk;b!==a&&(v&&D.h(a,"number",P,"fromEndSegmentLength"),0>a&&D.ua(a,">= 0",P,"fromEndSegmentLength"),this.Z.hk=a,this.i("fromEndSegmentLength",b,a),dp(this))}); D.defineProperty(P,{mu:"fromEndSegmentDirection"},function(){return null!==this.Z?this.Z.gk:Do},function(a){this.Wd();var b=this.Z.gk;b!==a&&(D.Pn("GraphObject.fromEndSegmentDirection","2.0"),v&&D.Da(a,G,P,"fromEndSegmentDirection"),this.Z.gk=a,this.i("fromEndSegmentDirection",b,a),dp(this))}); D.defineProperty(P,{nu:"fromShortLength"},function(){return null!==this.Z?this.Z.ik:0},function(a){this.Wd();var b=this.Z.ik;b!==a&&(v&&D.h(a,"number",P,"fromShortLength"),this.Z.ik=a,this.i("fromShortLength",b,a),dp(this))});D.defineProperty(P,{vF:"fromLinkable"},function(){return null!==this.Z?this.Z.Sr:null},function(a){this.Wd();var b=this.Z.Sr;b!==a&&(v&&null!==a&&D.h(a,"boolean",P,"fromLinkable"),this.Z.Sr=a,this.i("fromLinkable",b,a))}); D.defineProperty(P,{OA:"fromMaxLinks"},function(){return null!==this.Z?this.Z.Tr:Infinity},function(a){this.Wd();var b=this.Z.Tr;b!==a&&(v&&D.h(a,"number",P,"fromMaxLinks"),0>a&&D.ua(a,">= 0",P,"fromMaxLinks"),this.Z.Tr=a,this.i("fromMaxLinks",b,a))});D.defineProperty(P,{cursor:"cursor"},function(){return this.yr},function(a){var b=this.yr;b!==a&&(D.h(a,"string",P,"cursor"),this.yr=a,this.i("cursor",b,a))}); -D.defineProperty(P,{click:"click"},function(){return null!==this.la?this.la.Pi:null},function(a){Ao(this);var b=this.la.Pi;b!==a&&(null!==a&&D.h(a,"function",P,"click"),this.la.Pi=a,this.i("click",b,a))});D.defineProperty(P,{cu:"doubleClick"},function(){return null!==this.la?this.la.Wi:null},function(a){Ao(this);var b=this.la.Wi;b!==a&&(null!==a&&D.h(a,"function",P,"doubleClick"),this.la.Wi=a,this.i("doubleClick",b,a))}); -D.defineProperty(P,{xA:"contextClick"},function(){return null!==this.la?this.la.Ri:null},function(a){Ao(this);var b=this.la.Ri;b!==a&&(null!==a&&D.h(a,"function",P,"contextClick"),this.la.Ri=a,this.i("contextClick",b,a))});D.defineProperty(P,{Iu:"mouseEnter"},function(){return null!==this.la?this.la.Gs:null},function(a){Ao(this);var b=this.la.Gs;b!==a&&(null!==a&&D.h(a,"function",P,"mouseEnter"),this.la.Gs=a,this.i("mouseEnter",b,a))}); -D.defineProperty(P,{Ju:"mouseLeave"},function(){return null!==this.la?this.la.Hs:null},function(a){Ao(this);var b=this.la.Hs;b!==a&&(null!==a&&D.h(a,"function",P,"mouseLeave"),this.la.Hs=a,this.i("mouseLeave",b,a))});D.defineProperty(P,{oB:"mouseOver"},function(){return null!==this.la?this.la.lj:null},function(a){Ao(this);var b=this.la.lj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseOver"),this.la.lj=a,this.i("mouseOver",b,a))}); -D.defineProperty(P,{nB:"mouseHover"},function(){return null!==this.la?this.la.kj:null},function(a){Ao(this);var b=this.la.kj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseHover"),this.la.kj=a,this.i("mouseHover",b,a))});D.defineProperty(P,{mB:"mouseHold"},function(){return null!==this.la?this.la.jj:null},function(a){Ao(this);var b=this.la.jj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseHold"),this.la.jj=a,this.i("mouseHold",b,a))}); -D.defineProperty(P,{LJ:"mouseDragEnter"},function(){return null!==this.la?this.la.Es:null},function(a){Ao(this);var b=this.la.Es;b!==a&&(null!==a&&D.h(a,"function",P,"mouseDragEnter"),this.la.Es=a,this.i("mouseDragEnter",b,a))});D.defineProperty(P,{MJ:"mouseDragLeave"},function(){return null!==this.la?this.la.Fs:null},function(a){Ao(this);var b=this.la.Fs;b!==a&&(null!==a&&D.h(a,"function",P,"mouseDragLeave"),this.la.Fs=a,this.i("mouseDragLeave",b,a))}); -D.defineProperty(P,{lB:"mouseDrop"},function(){return null!==this.la?this.la.ij:null},function(a){Ao(this);var b=this.la.ij;b!==a&&(null!==a&&D.h(a,"function",P,"mouseDrop"),this.la.ij=a,this.i("mouseDrop",b,a))});D.defineProperty(P,{BE:"actionDown"},function(){return null!==this.la?this.la.Yq:null},function(a){Ao(this);var b=this.la.Yq;b!==a&&(null!==a&&D.h(a,"function",P,"actionDown"),this.la.Yq=a,this.i("actionDown",b,a))}); +D.defineProperty(P,{click:"click"},function(){return null!==this.la?this.la.Oi:null},function(a){Ao(this);var b=this.la.Oi;b!==a&&(null!==a&&D.h(a,"function",P,"click"),this.la.Oi=a,this.i("click",b,a))});D.defineProperty(P,{cu:"doubleClick"},function(){return null!==this.la?this.la.Vi:null},function(a){Ao(this);var b=this.la.Vi;b!==a&&(null!==a&&D.h(a,"function",P,"doubleClick"),this.la.Vi=a,this.i("doubleClick",b,a))}); +D.defineProperty(P,{xA:"contextClick"},function(){return null!==this.la?this.la.Qi:null},function(a){Ao(this);var b=this.la.Qi;b!==a&&(null!==a&&D.h(a,"function",P,"contextClick"),this.la.Qi=a,this.i("contextClick",b,a))});D.defineProperty(P,{Iu:"mouseEnter"},function(){return null!==this.la?this.la.Gs:null},function(a){Ao(this);var b=this.la.Gs;b!==a&&(null!==a&&D.h(a,"function",P,"mouseEnter"),this.la.Gs=a,this.i("mouseEnter",b,a))}); +D.defineProperty(P,{Ju:"mouseLeave"},function(){return null!==this.la?this.la.Hs:null},function(a){Ao(this);var b=this.la.Hs;b!==a&&(null!==a&&D.h(a,"function",P,"mouseLeave"),this.la.Hs=a,this.i("mouseLeave",b,a))});D.defineProperty(P,{oB:"mouseOver"},function(){return null!==this.la?this.la.kj:null},function(a){Ao(this);var b=this.la.kj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseOver"),this.la.kj=a,this.i("mouseOver",b,a))}); +D.defineProperty(P,{nB:"mouseHover"},function(){return null!==this.la?this.la.jj:null},function(a){Ao(this);var b=this.la.jj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseHover"),this.la.jj=a,this.i("mouseHover",b,a))});D.defineProperty(P,{mB:"mouseHold"},function(){return null!==this.la?this.la.ij:null},function(a){Ao(this);var b=this.la.ij;b!==a&&(null!==a&&D.h(a,"function",P,"mouseHold"),this.la.ij=a,this.i("mouseHold",b,a))}); +D.defineProperty(P,{MJ:"mouseDragEnter"},function(){return null!==this.la?this.la.Es:null},function(a){Ao(this);var b=this.la.Es;b!==a&&(null!==a&&D.h(a,"function",P,"mouseDragEnter"),this.la.Es=a,this.i("mouseDragEnter",b,a))});D.defineProperty(P,{NJ:"mouseDragLeave"},function(){return null!==this.la?this.la.Fs:null},function(a){Ao(this);var b=this.la.Fs;b!==a&&(null!==a&&D.h(a,"function",P,"mouseDragLeave"),this.la.Fs=a,this.i("mouseDragLeave",b,a))}); +D.defineProperty(P,{lB:"mouseDrop"},function(){return null!==this.la?this.la.hj:null},function(a){Ao(this);var b=this.la.hj;b!==a&&(null!==a&&D.h(a,"function",P,"mouseDrop"),this.la.hj=a,this.i("mouseDrop",b,a))});D.defineProperty(P,{BE:"actionDown"},function(){return null!==this.la?this.la.Yq:null},function(a){Ao(this);var b=this.la.Yq;b!==a&&(null!==a&&D.h(a,"function",P,"actionDown"),this.la.Yq=a,this.i("actionDown",b,a))}); D.defineProperty(P,{CE:"actionMove"},function(){return null!==this.la?this.la.Zq:null},function(a){Ao(this);var b=this.la.Zq;b!==a&&(null!==a&&D.h(a,"function",P,"actionMove"),this.la.Zq=a,this.i("actionMove",b,a))});D.defineProperty(P,{DE:"actionUp"},function(){return null!==this.la?this.la.$q:null},function(a){Ao(this);var b=this.la.$q;b!==a&&(null!==a&&D.h(a,"function",P,"actionUp"),this.la.$q=a,this.i("actionUp",b,a))}); -D.defineProperty(P,{AE:"actionCancel"},function(){return null!==this.la?this.la.Xq:null},function(a){Ao(this);var b=this.la.Xq;b!==a&&(null!==a&&D.h(a,"function",P,"actionCancel"),this.la.Xq=a,this.i("actionCancel",b,a))});D.defineProperty(P,{TB:"toolTip"},function(){return null!==this.la?this.la.uj:null},function(a){Ao(this);var b=this.la.uj;b!==a&&(!v||null===a||a instanceof da||a instanceof fk||D.k("GraphObject.toolTip must be an Adornment or HTMLInfo."),this.la.uj=a,this.i("toolTip",b,a))}); -D.defineProperty(P,{contextMenu:"contextMenu"},function(){return null!==this.la?this.la.Si:null},function(a){Ao(this);var b=this.la.Si;b!==a&&(!v||a instanceof da||a instanceof fk||D.k("GraphObject.contextMenu must be an Adornment or HTMLInfo."),this.la.Si=a,this.i("contextMenu",b,a))});P.prototype.bind=P.prototype.bind=function(a){a.Qg=this;var b=this.mm();null!==b&&fp(b)&&D.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.Cc&&(this.Cc=new K(lh));this.Cc.add(a)}; +D.defineProperty(P,{AE:"actionCancel"},function(){return null!==this.la?this.la.Xq:null},function(a){Ao(this);var b=this.la.Xq;b!==a&&(null!==a&&D.h(a,"function",P,"actionCancel"),this.la.Xq=a,this.i("actionCancel",b,a))});D.defineProperty(P,{TB:"toolTip"},function(){return null!==this.la?this.la.tj:null},function(a){Ao(this);var b=this.la.tj;b!==a&&(!v||null===a||a instanceof da||a instanceof fk||D.k("GraphObject.toolTip must be an Adornment or HTMLInfo."),this.la.tj=a,this.i("toolTip",b,a))}); +D.defineProperty(P,{contextMenu:"contextMenu"},function(){return null!==this.la?this.la.Ri:null},function(a){Ao(this);var b=this.la.Ri;b!==a&&(!v||a instanceof da||a instanceof fk||D.k("GraphObject.contextMenu must be an Adornment or HTMLInfo."),this.la.Ri=a,this.i("contextMenu",b,a))});P.prototype.bind=P.prototype.bind=function(a){a.Qg=this;var b=this.mm();null!==b&&fp(b)&&D.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.Cc&&(this.Cc=new K(lh));this.Cc.add(a)}; P.prototype.findTemplateBinder=P.prototype.mm=function(){for(var a=this instanceof x?this:this.Q;null!==a;){if(null!==a.rl)return a;a=a.Q}return null};P.prototype.setProperties=function(a){D.Zu(this,a)};var gp; P.make=gp=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var g=hp.na(a);"function"===typeof g?(c=D.dm(arguments),d=g(c),D.Ta(d)||D.k('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):e=aa[a]}null===d&&(void 0!==e&&null!==e&&e.constructor||D.k("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),d=new e);g=1;if(d instanceof E&&1e)&&D.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.Ie=!0, a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&D.k("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.Ie=!1,a.index=e);e=new la;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);D.Zu(a,e)}else D.Zu(a,b);else D.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var hp=new ma("string","function"); P.getBuilders=function(){var a=new ma("string","function"),b;for(b in hp)if(b!==b.toLowerCase()){var c=hp.na(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};var jp;P.defineBuilder=jp=function(a,b){D.h(a,"string",P,"defineBuilder:name");D.h(b,"function",P,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||D.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);hp.add(a,b)};var kp; @@ -1147,286 +1147,286 @@ jp("SubGraphExpanderButton",function(){var a=gp("Button",{_subGraphExpandedFigur !0;d.Je?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});jp("ContextMenuButton",function(){var a=gp("Button");a.stretch=wo;var b=a.Fd("ButtonBorder");b instanceof z&&(b.Jb="Rectangle",b.C=new R(0,0,2,3),b.D=new R(1,1,-2,-2));return a}); jp("PanelExpanderButton",function(a){var b=kp(a,"COLLAPSIBLE"),c=gp("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},gp(z,"TriangleUp",{name:"ButtonIcon",Ea:new Ca(6,4)},(new lh("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).ny(b)));a=c.Fd("ButtonBorder");a instanceof z&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var g=c.g;if(null!==g&&!g.nb){var h=c.mm();null===h&&(h=c.Y);null!==h&&(h=h.Fd(b),null!==h&& (g.ac("Collapse/Expand Panel"),h.visible=!h.visible,g.Td("Collapse/Expand Panel")))}};return c}); -jp("CheckBoxButton",function(a){var b=kp(a);a=gp("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},gp(z,{name:"ButtonIcon",LI:"M0 4 L3 9 9 0",jb:2,stretch:pf,PA:Zj,visible:!1},""!==b?(new lh("visible",b)).AJ():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.nb||""!==b&&e.ga.nb)){a.Mc=!0;var g=d.Fd("ButtonIcon");e.ac("checkbox");g.visible=!g.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.Td("checkbox")}};return a}); +jp("CheckBoxButton",function(a){var b=kp(a);a=gp("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},gp(z,{name:"ButtonIcon",LI:"M0 4 L3 9 9 0",jb:2,stretch:pf,PA:Zj,visible:!1},""!==b?(new lh("visible",b)).BJ():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.nb||""!==b&&e.ga.nb)){a.Mc=!0;var g=d.Fd("ButtonIcon");e.ac("checkbox");g.visible=!g.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.Td("checkbox")}};return a}); jp("CheckBox",function(a){a=kp(a);a=gp("CheckBoxButton",a,{name:"Button",margin:new Ib(0,1,0,0)});var b=gp(x,"Horizontal",a,{tu:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,Iu:a.Iu,Ju:a.Ju,click:a.click,_buttonClick:a.click});a.Iu=null;a.Ju=null;a.click=null;return b}); -function Bo(){this.Pr=this.Si=this.uj=this.Xq=this.$q=this.Zq=this.Yq=this.ij=this.Fs=this.Es=this.jj=this.kj=this.lj=this.Hs=this.Gs=this.Ri=this.Wi=this.Pi=null}Bo.prototype.copy=function(){var a=new Bo;a.Pi=this.Pi;a.Wi=this.Wi;a.Ri=this.Ri;a.Gs=this.Gs;a.Hs=this.Hs;a.lj=this.lj;a.kj=this.kj;a.jj=this.jj;a.Es=this.Es;a.Fs=this.Fs;a.ij=this.ij;a.Yq=this.Yq;a.Zq=this.Zq;a.$q=this.$q;a.Xq=this.Xq;a.uj=this.uj;a.Si=this.Si;a.Pr=this.Pr;return a}; -function x(a){P.call(this);void 0===a?this.ca=ck:(D.Da(a,x,x,"type"),this.ca=a);this.ya=new K(P);this.of=Sd;this.ca===Ql&&(this.$n=!0);this.Cr=Vc;this.Vi=uo;this.ca===ea&&lp(this);this.Yp=Zj;this.$r=ae;this.as=Gd;this.Xr=0;this.Wr=100;this.Zr=10;this.Yr=0;this.rl=this.Nd=this.kk=this.Pm=this.Rm=null;this.ms=NaN;this.Gg=this.cj=null;this.sp="category";this.Fg=null;this.wj=new B(NaN,NaN,NaN,NaN);this.Ck=this.jt=this.wn=null;this.$j=""}D.Sa(x,P);D.Bi(x);D.ja("Panel",x); -function lp(a){a.dk=Sd;a.ci=1;a.Ui=null;a.Mm=null;a.bi=1;a.ai=null;a.Lm=null;a.he=[];a.de=[];a.nn=mp;a.Km=mp;a.vj=0;a.fj=0} -x.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.ca=this.ca;a.of=this.of.V();a.Cr=this.Cr.V();a.Vi=this.Vi;if(a.ca===ea){a.dk=this.dk.V();a.ci=this.ci;a.Ui=this.Ui;a.Mm=this.Mm;a.bi=this.bi;a.ai=this.ai;a.Lm=this.Lm;var b=[];if(0a&&D.ua(a,">= 0",x,"padding"),a=new Ib(a)):(D.l(a,Ib,x,"padding"),0>a.left&&D.ua(a.left,">= 0",x,"padding:value.left"),0>a.right&&D.ua(a.right,">= 0",x,"padding:value.right"),0>a.top&&D.ua(a.top,">= 0",x,"padding:value.top"),0>a.bottom&&D.ua(a.bottom,">= 0",x,"padding:value.bottom"));var b=this.of;b.P(a)||(this.of=a=a.V(),this.K(),this.i("padding",b,a))}); -D.defineProperty(x,{hm:"defaultAlignment"},function(){return this.Cr},function(a){var b=this.Cr;b.P(a)||(v&&D.l(a,R,x,"defaultAlignment"),this.Cr=a=a.V(),this.K(),this.i("defaultAlignment",b,a))});D.defineProperty(x,{je:"defaultStretch"},function(){return this.Vi},function(a){var b=this.Vi;b!==a&&(D.Da(a,P,x,"defaultStretch"),this.Vi=a,this.K(),this.i("defaultStretch",b,a))}); -D.defineProperty(x,{tL:"defaultSeparatorPadding"},function(){return void 0===this.dk?Sd:this.dk},function(a){if(void 0!==this.dk){"number"===typeof a?a=new Ib(a):v&&D.l(a,Ib,x,"defaultSeparatorPadding");var b=this.dk;b.P(a)||(this.dk=a=a.V(),this.K(),this.i("defaultSeparatorPadding",b,a))}}); -D.defineProperty(x,{rL:"defaultRowSeparatorStroke"},function(){return void 0===this.Ui?null:this.Ui},function(a){var b=this.Ui;b!==a&&(null===a||"string"===typeof a||a instanceof Ba)&&(a instanceof Ba&&a.freeze(),this.Ui=a,this.qa(),this.i("defaultRowSeparatorStroke",b,a))}); -D.defineProperty(x,{sL:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.ci?1:this.ci},function(a){if(void 0!==this.ci){var b=this.ci;b!==a&&isFinite(a)&&0<=a&&(this.ci=a,this.K(),this.i("defaultRowSeparatorStrokeWidth",b,a))}}); -D.defineProperty(x,{qL:"defaultRowSeparatorDashArray"},function(){return void 0===this.Mm?null:this.Mm},function(a){if(void 0!==this.Mm){var b=this.Mm;if(b!==a){null===a||Array.isArray(a)||D.hc(a,"Array",x,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.Qx,e=d.width,d=d.height,g=this.Ga,h=g.width,g=g.height,k=Math.ceil(h/e),l=Math.ceil(g/d),m=this.EF;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.ya.o,q=p.length,r=0;r +f.Pk=function(a,b){if(this.ca===Ql){var c=this.Fj()*b.scale;0>=c&&(c=1);var d=this.Qx,e=d.width,d=d.height,g=this.Ga,h=g.width,g=g.height,k=Math.ceil(h/e),l=Math.ceil(g/d),m=this.EF;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.ya.o,q=p.length,r=0;r e*u*c))){var s=n[r],t=!1,C=!0,A=w.ZG;null!==A&&(t=!0,C=a.JA(A,w.Bf));if("LineV"===w.Jb){a.lineWidth=w.jb;To(this,a,w.stroke,!1,!1);a.beginPath();for(var N=y=Math.floor(-m.x/e);N<=y+k;N++){var H=N*e+m.x;0<=H&&H=e&&(e=1);d=c.$;h=this.ya.o;g=this.Rm;k=h.length;for(l=0;lthis.TA*q.interval*c.qf.Nx/this.pu*e))for(r=q.Fa,u=q.jb*q.scale,s=q.Gh,s.Zd()&&(s=ec),p=0;pg.height)continue}else if(l.position>g.width)continue;var m=l.Pq;isNaN(m)&&(m=c?a.ci:a.bi);var n=l.Oq;null===n&&(n=c?a.Ui:a.ai);0!==m&&null!==n&&(To(a,b,n,!1,!1),b.beginPath(),n=l.position+m,c?n>g.height&&(m-=n-g.height):n>g.width&&(m-=n-g.width),l=l.position+m/2,b.lineWidth=m,n=a.padding,c?(l+=n.top,m=n.left,n=g.width-n.right,b.moveTo(m,l),b.lineTo(n,l)):(l+= +a.stroke()}else if("BarV"===w.Jb)for(To(this,a,w.fill,!0,!1),w=w.width,isNaN(w)&&(w=e),N=y=Math.floor(-m.x/e);N<=y+k;N++)H=N*e+m.x,0<=H&&H=e&&(e=1);d=c.$;h=this.ya.o;g=this.Rm;k=h.length;for(l=0;lthis.TA*q.interval*c.qf.Nx/this.pu*e))for(r=q.Fa,u=q.jb*q.scale,s=q.Gh,s.Zd()&&(s=ec),p=0;pg.height)continue}else if(l.position>g.width)continue;var m=l.Pq;isNaN(m)&&(m=c?a.bi:a.ai);var n=l.Oq;null===n&&(n=c?a.Ti:a.$h);0!==m&&null!==n&&(To(a,b,n,!1,!1),b.beginPath(),n=l.position+m,c?n>g.height&&(m-=n-g.height):n>g.width&&(m-=n-g.width),l=l.position+m/2,b.lineWidth=m,n=a.padding,c?(l+=n.top,m=n.left,n=g.width-n.right,b.moveTo(m,l),b.lineTo(n,l)):(l+= n.left,m=n.top,n=g.height-n.bottom,b.moveTo(l,m),b.lineTo(l,n)),b.stroke())}}} -function qp(a,b,c,d,e){for(var g=d.length,h=a.$,k=0;km)){var n=l.ff(),p=l.Pq;isNaN(p)&&(p=c?a.ci:a.bi);var q=l.Oq;null===q&&(q=c?a.Ui:a.ai);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Qa;p+n>m&&(n=m-p);0>=n||(m=a.padding,To(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}} +function qp(a,b,c,d,e){for(var g=d.length,h=a.$,k=0;km)){var n=l.ff(),p=l.Pq;isNaN(p)&&(p=c?a.bi:a.ai);var q=l.Oq;null===q&&(q=c?a.Ti:a.$h);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Pa;p+n>m&&(n=m-p);0>=n||(m=a.padding,To(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}} function op(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dm&&e.set(s),D.A(s));D.A(n);g&&e.transform(h)}return c}; -f.K=function(a){P.prototype.K.call(this,a);if(this.ca===Nl||this.ca===rj)a=this.Vd(),null!==a&&a.K(!0);a=this.ya.o;for(var b=a.length,c=0;cm&&e.set(s),D.A(s));D.A(n);g&&e.transform(h)}return c}; +f.K=function(a){P.prototype.K.call(this,a);if(this.ca===Nl||this.ca===rj)a=this.Vd(),null!==a&&a.K(!0);a=this.ya.o;for(var b=a.length,c=0;cMd&&(fd=Math.max(Md-pc,0));var ig=0===$.Qa;$.Qa+=fd;Md=Math.max(Md-(fd+(ig?pc:0)),0)}1!==ca.Qi||oc!==Xj&&oc!==vo||($=this.le(mc),pc=$.ff(),fd=Math.max(ff-$.Qa,0),fd+pc>ed&&(fd=Math.max(ed-pc,0)),ig=0===$.Qa,$.Qa+=fd,ed=Math.max(ed-(fd+(ig?pc:0)),0));ni&&ca.wq()}}}D.Ba(bf);for(var Hc=0,Cb=0,Kb=this.eq,qa=0;qa=this.Mq);ab++)$=this.me(ca.$b+ab),Nd.height+=Math.max($.Qj,isNaN($.pf)?$.wf:Math.min($.pf,$.wf));for(ab=1;ab=this.eq);ab++)$=this.le(ca.column+ab),Nd.width+=Math.max($.Qj,isNaN($.pf)?$.wf:Math.min($.pf,$.wf));ob.width+=Nd.width;ob.height+=Nd.height;Ac=ca.margin;Hf=Ac.right+Ac.left;hg=Ac.top+Ac.bottom;Fk(ca,ob.width,ob.height,wj,xj);for(var If=ca.Fa,ff=Math.max(If.width+Hf,0),gf=Math.max(If.height+hg,0),Ch=0,ab=0;ab=this.Mq);ab++)$=this.me(ca.$b+ab),Ch+=$.total||0;if(Ch=nd)&&!(ca.$b+ab>=this.Mq);ab++){var $=this.me(ca.$b+ab),qc=$.Za||0,Od=zj(ca,$,jg);v&&"number"!==typeof Od&&D.k(ca+" spanAllocation does not return a number: "+Od);$.Qa=Math.min($.wf,qc+Od);$.Za!==qc&&(nd-=$.Za-qc)}for(;0qc&&($.Qa=Math.min($.wf,qc+nd),$.Za!==qc&&(nd-=$.Za-qc));if(0===$.index)break;$=this.me($.index-1)}}for(var Lg= -0,ab=0;ab=this.eq);ab++)$=this.le(ca.column+ab),Lg+=$.total||0;if(Lg=nd)&&!(ca.column+ab>=this.eq);ab++)$=this.le(ca.column+ab),qc=$.Za||0,Od=zj(ca,$,jg),v&&"number"!==typeof Od&&D.k(ca+" spanAllocation does not return a number: "+Od),$.Qa=Math.min($.wf,qc+Od),$.Za!==qc&&(nd-=$.Za-qc);for(;0qc&&($.Qa=Math.min($.wf,qc+nd),$.Za!==qc&&(nd-=$.Za-qc));if(0===$.index)break; -$=this.le($.index-1)}}}D.Ba(Oe);D.Rk(Nd);D.Rk(ob);for(var kg=0,xe=0,oc=Ko(this,!0),pi=this.Ea,Ok=this.kf,Kf=Cb=Hc=0,jf=0,Kb=this.eq,qa=0;qasi)Fk(bc,Infinity,Infinity),ye=bc.Fa,lf.Xh(ye),this.ph.add(ye);else{var xd=bc.Te,wt=bc.DB,tp=bc.Gh;tp.Zd()&&(tp=hc);var lg=bc.Nq,jw=bc.EB,Tk=0,Uk=0,um=0;if(xd<-si||xd>=si){var xt=Rk.hG, -Lf=Rk.gG;lg!==uj&&(um=Rk.computeAngle(bc,lg,Lf),bc.tg=um);Tk=xt.x-Ng.x;Uk=xt.y-Ng.y}else{var Qd,mf;if(0<=xd)Qd=Fh.ea(xd),mf=xdzt+10?0<=xd?ui.Yb(Qd):Qd.Yb(ui):zt>yt+10?0<=xd?mf.Yb(vi):vi.Yb(mf):0<=xd?ui.Yb(vi):vi.Yb(ui)}else Lf=0<=xd?Qd.Yb(mf):mf.Yb(Qd);lg!== -uj&&(um=Rk.computeAngle(bc,lg,Lf),bc.tg=um);Tk=Qd.x+(mf.x-Qd.x)*wt-Ng.x;Uk=Qd.y+(mf.y-Qd.y)*wt-Ng.y}Fk(bc,Infinity,Infinity);var ye=bc.Fa,sm=bc.Ga,Vk=0;bc instanceof z&&(Vk=bc.jb);var wi=sm.width+Vk,Aj=sm.height+Vk;Og.reset();Og.translate(-ye.x,-ye.y);Og.scale(bc.scale,bc.scale);Og.rotate(lg===uj?bc.angle:Lf,wi/2,Aj/2);lg!==Vp&&lg!==Wp||Og.rotate(90,wi/2,Aj/2);lg!==Xp&&lg!==Yp||Og.rotate(-90,wi/2,Aj/2);lg===Zp&&(45Lf||225Lf)&&Og.rotate(-Lf,wi/2,Aj/2);var Fj=new B(0,0,wi,Aj);Sk.uo(Fj, -tp);Og.wb(Sk);var kw=-Sk.x+Vk/2,lw=-Sk.y+Vk/2;Pg.assign(jw);isNaN(Pg.x)&&(Pg.x=0<=xd?wi/2+3:-(wi/2+3));isNaN(Pg.y)&&(Pg.y=-(Aj/2+3));Pg.rotate(Lf);Tk+=Pg.x;Uk+=Pg.y;Fj.set(ye);Fj.x=Tk+kw;Fj.y=Uk+lw;this.ph.add(Fj);lf.Xh(Fj)}}if(this instanceof J)for(var At=this.Jf;At.next();)Fk(At.value,Infinity,Infinity);this.wj=lf;var up=this.hj;up.n(up.x+lf.x,up.y+lf.y);xb(e,lf.width||0,lf.height||0);D.He(Og);D.A(Sk);D.A(Pg)}}}break;case "Grid":break;case "Graduated":var mw=a,nw=b,ow=c,pw=d,Qg=this.Vd();this.Pm= -[];var Gj=Qg.margin,qw=Gj.right+Gj.left,rw=Gj.top+Gj.bottom;Fk(Qg,mw,nw,ow,pw);var Bt=Qg.Fa,sw=Bt.height,tw=Math.max(Bt.width+qw,0),uw=Math.max(sw+rw,0),Ct=new B(-Gj.left,-Gj.top,tw,uw);this.Pm.push(Ct);e.assign(Ct);for(var Xk=Qg.qf,Dt=Qg.jb,vp=Xk.MA,Hj=Xk.Mx,xi=Xk.Nx,vw=vp.length,wp=0,xp=0,Ij=D.tb(),yp=0;ypyd&&(yd+=360);Et.push(yd)}wp=Ft;xp=Gt}Ij.push(Et)}var Ht; -if(null===this.kk){for(var It=[],Ap=this.ya.o,Jt=Ap.length,Bp=0;Bpxw&&Kt.push(Lt)}}}this.kk=It}Ht=this.kk;var Mt=this.ya.o,yw=Mt.length,Gh=0,Nt=0,Ot=xi;this.Rm=[];for(var vm=[],wm=0;wmQt*Pt*xi/this.pu)){var fe=this.DF,Rt=Ht[wm],yi=Hj[0][0],Mf=0,zd=0,Nt=xi*Hh.CF-1E-4,Ot=xi*Hh.AF+1E-4,Kj=Qt*Pt;if(fethis.Tk+Kj&&(zi=Math.floor((fe-this.Tk)/Kj),fe-=zi*Kj);for(;fe<=this.SA;){var Dp;a:{for(var zw=Rt.length,Ep=0;Epxi&&(Gh=xi),Nt<=Gh&&Gh<=Ot)){for(var yd=Ij[Mf][zd],Lj=Hj[Mf][zd];Mf -yi&&zdxm?0Dm;Dm++){switch(Dm){case 0:ge.n(Am,Bm);break;case 1:ge.n(Am+Ip,Bm);break;case 2:ge.n(Am,Bm+Jp);break;case 3:ge.n(Am+Ip,Bm+Jp)}ge.rotate(Zt+Ih.angle);ge.offset(Xt,Yt);0===Cm&&0===Dm?Bi.n(ge.x,ge.y,0,0):Bi.Ki(ge);ge.offset(-Xt,-Yt);ge.rotate(-Zt-Ih.angle)}D.A(ge);this.Pm.push(Bi);Pb(Cw, -Bi.x,Bi.y,Bi.width,Bi.height)}else if(Ai instanceof na){var $k=Ai,$t=Gp,Fw=e;null===this.Ck&&(this.Ck=new na);var Nf=this.Ck;pp($k,Nf);var Lp=$k.Gh;Lp.Zd()&&(Lp=ec);for(var Jh=$k.Nq,Gw=$k.EB,Ci=null,Em=0,Fm=0,Rg=0,Mp=0,Hw=$t.length,Gm=0;GmRg||225Rg)&&Sg.rotate(-Rg,Oj/2,Pj/2);var au=D.sg(0,0,Oj,Pj),al=D.O();al.uo(au,Lp);Sg.wb(al);var Iw=-al.x,Jw=-al.y,Tg=D.O();Tg.assign(Gw);isNaN(Tg.x)&&(Tg.x=Oj/2+3);isNaN(Tg.y)&&(Tg.y=-(Pj/2+3));Tg.rotate(Rg);var Em=Em+(Tg.x+Iw),Fm=Fm+(Tg.y+Jw),Np=new B(Em,Fm,Kh.width,Kh.height),Kw=new B(Kh.x,Kh.y,Kh.width,Kh.height),Lw=new B(Nj.x,Nj.y,Nj.width, -Nj.height),bu=new $p;bu.fq(Nf.hi);ng.push(Mp);ng.push(Nf.ue);ng.push(bu);ng.push(Np);ng.push(Kw);ng.push(Lw);0===Gm?Ci=Np.copy():Ci.Xh(Np);D.A(Tg);D.A(al);D.Kb(au);D.He(Sg)}this.Pm.push(Ci);Pb(Fw,Ci.x,Ci.y,Ci.width,Ci.height)}hm(Ai,!1)}}break;case "TableRow":case "TableColumn":D.k(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:D.k("Unknown panel type: "+n)}}var nf=e.width,of=e.height,Hm=this.padding,Mw=Hm.top+ +0;mcMd&&(fd=Math.max(Md-pc,0));var ig=0===$.Pa;$.Pa+=fd;Md=Math.max(Md-(fd+(ig?pc:0)),0)}1!==ca.Pi||oc!==Xj&&oc!==vo||($=this.le(mc),pc=$.ff(),fd=Math.max(ff-$.Pa,0),fd+pc>ed&&(fd=Math.max(ed-pc,0)),ig=0===$.Pa,$.Pa+=fd,ed=Math.max(ed-(fd+(ig?pc:0)),0));ni&&ca.vq()}}}D.Ba(bf);for(var Hc=0,Cb=0,Kb=this.dq,qa=0;qa=this.Mq);ab++)$=this.me(ca.$b+ab),Nd.height+=Math.max($.Qj,isNaN($.pf)?$.wf:Math.min($.pf,$.wf));for(ab=1;ab=this.dq);ab++)$=this.le(ca.column+ab),Nd.width+=Math.max($.Qj,isNaN($.pf)?$.wf:Math.min($.pf,$.wf));ob.width+=Nd.width;ob.height+=Nd.height;Ac=ca.margin;Hf=Ac.right+Ac.left;hg=Ac.top+Ac.bottom;Fk(ca,ob.width,ob.height,vj,wj);for(var If=ca.Fa,ff=Math.max(If.width+Hf,0),gf=Math.max(If.height+hg,0),Ch=0,ab=0;ab=this.Mq);ab++)$=this.me(ca.$b+ab),Ch+=$.total||0;if(Ch=nd)&&!(ca.$b+ab>=this.Mq);ab++){var $=this.me(ca.$b+ab),qc=$.Za||0,Od=yj(ca,$,jg);v&&"number"!==typeof Od&&D.k(ca+" spanAllocation does not return a number: "+Od);$.Pa=Math.min($.wf,qc+Od);$.Za!==qc&&(nd-=$.Za-qc)}for(;0qc&&($.Pa=Math.min($.wf,qc+nd),$.Za!==qc&&(nd-=$.Za-qc));if(0===$.index)break;$=this.me($.index-1)}}for(var Lg= +0,ab=0;ab=this.dq);ab++)$=this.le(ca.column+ab),Lg+=$.total||0;if(Lg=nd)&&!(ca.column+ab>=this.dq);ab++)$=this.le(ca.column+ab),qc=$.Za||0,Od=yj(ca,$,jg),v&&"number"!==typeof Od&&D.k(ca+" spanAllocation does not return a number: "+Od),$.Pa=Math.min($.wf,qc+Od),$.Za!==qc&&(nd-=$.Za-qc);for(;0qc&&($.Pa=Math.min($.wf,qc+nd),$.Za!==qc&&(nd-=$.Za-qc));if(0===$.index)break; +$=this.le($.index-1)}}}D.Ba(Oe);D.Rk(Nd);D.Rk(ob);for(var kg=0,xe=0,oc=Ko(this,!0),pi=this.Ea,Nk=this.kf,Kf=Cb=Hc=0,jf=0,Kb=this.dq,qa=0;qasi)Fk(bc,Infinity,Infinity),ye=bc.Fa,lf.Wh(ye),this.ph.add(ye);else{var xd=bc.Te,yt=bc.DB,tp=bc.Gh;tp.Zd()&&(tp=hc);var lg=bc.Nq,jw=bc.EB,Sk=0,Tk=0,um=0;if(xd<-si||xd>=si){var zt=Qk.hG, +Lf=Qk.gG;lg!==Aj&&(um=Qk.computeAngle(bc,lg,Lf),bc.tg=um);Sk=zt.x-Ng.x;Tk=zt.y-Ng.y}else{var Qd,mf;if(0<=xd)Qd=Fh.ea(xd),mf=xdBt+10?0<=xd?ui.Yb(Qd):Qd.Yb(ui):Bt>At+10?0<=xd?mf.Yb(vi):vi.Yb(mf):0<=xd?ui.Yb(vi):vi.Yb(ui)}else Lf=0<=xd?Qd.Yb(mf):mf.Yb(Qd);lg!== +Aj&&(um=Qk.computeAngle(bc,lg,Lf),bc.tg=um);Sk=Qd.x+(mf.x-Qd.x)*yt-Ng.x;Tk=Qd.y+(mf.y-Qd.y)*yt-Ng.y}Fk(bc,Infinity,Infinity);var ye=bc.Fa,sm=bc.Ga,Uk=0;bc instanceof z&&(Uk=bc.jb);var wi=sm.width+Uk,zj=sm.height+Uk;Og.reset();Og.translate(-ye.x,-ye.y);Og.scale(bc.scale,bc.scale);Og.rotate(lg===Aj?bc.angle:Lf,wi/2,zj/2);lg!==Vp&&lg!==Wp||Og.rotate(90,wi/2,zj/2);lg!==Xp&&lg!==Yp||Og.rotate(-90,wi/2,zj/2);lg===Zp&&(45Lf||225Lf)&&Og.rotate(-Lf,wi/2,zj/2);var Ej=new B(0,0,wi,zj);Rk.to(Ej, +tp);Og.wb(Rk);var kw=-Rk.x+Uk/2,lw=-Rk.y+Uk/2;Pg.assign(jw);isNaN(Pg.x)&&(Pg.x=0<=xd?wi/2+3:-(wi/2+3));isNaN(Pg.y)&&(Pg.y=-(zj/2+3));Pg.rotate(Lf);Sk+=Pg.x;Tk+=Pg.y;Ej.set(ye);Ej.x=Sk+kw;Ej.y=Tk+lw;this.ph.add(Ej);lf.Wh(Ej)}}if(this instanceof J)for(var Ct=this.Jf;Ct.next();)Fk(Ct.value,Infinity,Infinity);this.vj=lf;var up=this.gj;up.n(up.x+lf.x,up.y+lf.y);xb(e,lf.width||0,lf.height||0);D.He(Og);D.A(Rk);D.A(Pg)}}}break;case "Grid":break;case "Graduated":var mw=a,nw=b,ow=c,pw=d,Qg=this.Vd();this.Pm= +[];var Fj=Qg.margin,qw=Fj.right+Fj.left,rw=Fj.top+Fj.bottom;Fk(Qg,mw,nw,ow,pw);var Dt=Qg.Fa,sw=Dt.height,tw=Math.max(Dt.width+qw,0),uw=Math.max(sw+rw,0),Et=new B(-Fj.left,-Fj.top,tw,uw);this.Pm.push(Et);e.assign(Et);for(var Wk=Qg.qf,Ft=Qg.jb,vp=Wk.MA,Gj=Wk.Mx,xi=Wk.Nx,vw=vp.length,wp=0,xp=0,Hj=D.tb(),yp=0;ypyd&&(yd+=360);Gt.push(yd)}wp=Ht;xp=It}Hj.push(Gt)}var Jt; +if(null===this.kk){for(var Kt=[],Ap=this.ya.o,Lt=Ap.length,Bp=0;Bpxw&&Mt.push(Nt)}}}this.kk=Kt}Jt=this.kk;var Ot=this.ya.o,yw=Ot.length,Gh=0,Pt=0,Qt=xi;this.Rm=[];for(var vm=[],wm=0;wmSt*Rt*xi/this.pu)){var fe=this.DF,Tt=Jt[wm],yi=Gj[0][0],Mf=0,zd=0,Pt=xi*Hh.CF-1E-4,Qt=xi*Hh.AF+1E-4,Jj=St*Rt;if(fethis.Tk+Jj&&(zi=Math.floor((fe-this.Tk)/Jj),fe-=zi*Jj);for(;fe<=this.SA;){var Dp;a:{for(var zw=Tt.length,Ep=0;Epxi&&(Gh=xi),Pt<=Gh&&Gh<=Qt)){for(var yd=Hj[Mf][zd],Kj=Gj[Mf][zd];Mf +yi&&zdxm?0Dm;Dm++){switch(Dm){case 0:ge.n(Am,Bm);break;case 1:ge.n(Am+Ip,Bm);break;case 2:ge.n(Am,Bm+Jp);break;case 3:ge.n(Am+Ip,Bm+Jp)}ge.rotate(au+Ih.angle);ge.offset(Zt,$t);0===Cm&&0===Dm?Bi.n(ge.x,ge.y,0,0):Bi.Ji(ge);ge.offset(-Zt,-$t);ge.rotate(-au-Ih.angle)}D.A(ge);this.Pm.push(Bi);Pb(Cw, +Bi.x,Bi.y,Bi.width,Bi.height)}else if(Ai instanceof na){var Zk=Ai,bu=Gp,Fw=e;null===this.Ck&&(this.Ck=new na);var Nf=this.Ck;pp(Zk,Nf);var Lp=Zk.Gh;Lp.Zd()&&(Lp=ec);for(var Jh=Zk.Nq,Gw=Zk.EB,Ci=null,Em=0,Fm=0,Rg=0,Mp=0,Hw=bu.length,Gm=0;GmRg||225Rg)&&Sg.rotate(-Rg,Nj/2,Oj/2);var cu=D.sg(0,0,Nj,Oj),$k=D.O();$k.to(cu,Lp);Sg.wb($k);var Iw=-$k.x,Jw=-$k.y,Tg=D.O();Tg.assign(Gw);isNaN(Tg.x)&&(Tg.x=Nj/2+3);isNaN(Tg.y)&&(Tg.y=-(Oj/2+3));Tg.rotate(Rg);var Em=Em+(Tg.x+Iw),Fm=Fm+(Tg.y+Jw),Np=new B(Em,Fm,Kh.width,Kh.height),Kw=new B(Kh.x,Kh.y,Kh.width,Kh.height),Lw=new B(Mj.x,Mj.y,Mj.width, +Mj.height),du=new $p;du.eq(Nf.gi);ng.push(Mp);ng.push(Nf.ue);ng.push(du);ng.push(Np);ng.push(Kw);ng.push(Lw);0===Gm?Ci=Np.copy():Ci.Wh(Np);D.A(Tg);D.A($k);D.Kb(cu);D.He(Sg)}this.Pm.push(Ci);Pb(Fw,Ci.x,Ci.y,Ci.width,Ci.height)}hm(Ai,!1)}}break;case "TableRow":case "TableColumn":D.k(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:D.k("Unknown panel type: "+n)}}var nf=e.width,of=e.height,Hm=this.padding,Mw=Hm.top+ Hm.bottom,nf=nf+(Hm.left+Hm.right),of=of+Mw;isFinite(g.width)&&(nf=g.width);isFinite(g.height)&&(of=g.height);nf=Math.min(k.width,nf);of=Math.min(k.height,of);nf=Math.max(h.width,nf);of=Math.max(h.height,of);nf=Math.max(c,nf);of=Math.max(d,of);e.width=nf;e.height=of;xb(this.ad,nf,of);Ho(this,0,0,nf,of)};x.prototype.findMainElement=x.prototype.Vd=function(){if(null===this.wn){var a=this.ya.o,b=a.length;if(0===b)return null;for(var c=0;cc||p>d)this.K(),Fk(this,n>c?c:n,p>d?d:p);break;case pf:this.K(!0);Fk(this,c+r,d+s,0,0);break;case wo:this.K(!0);Fk(this,c+r,p+s,0,0);break;case vo:this.K(!0),Fk(this,n+r,d+s,0,0)}}k=this.$;k.x=a;k.y=b; +x.prototype.yj=function(a,b,c,d){var e=this.vj,g=this.ya.o,h=D.sg(0,0,0,0);if(0===g.length){var k=this.$;k.x=a;k.y=b;k.width=c;k.height=d}else{if(!this.Ea.F()){var l=Ko(this,!0),m=this.Bd,n=m.width,p=m.height,q=this.margin,r=q.left+q.right,s=q.top+q.bottom;n===c&&p===d&&(l=Xj);switch(l){case Xj:if(n>c||p>d)this.K(),Fk(this,n>c?c:n,p>d?d:p);break;case pf:this.K(!0);Fk(this,c+r,d+s,0,0);break;case wo:this.K(!0);Fk(this,c+r,p+s,0,0);break;case vo:this.K(!0),Fk(this,n+r,d+s,0,0)}}k=this.$;k.x=a;k.y=b; k.width=c;k.height=d;var u=this.ca.Xb;switch(u){case "Position":for(var t=g.length,y=e.x-this.padding.left,w=e.y-this.padding.top,C=0;C=this.Mq);Ne++){var ii=this.me(Wa+Ne);de.height+=ii.total}for(Ne=1;Ne=this.eq);Ne++){var ji=this.le(Ld+Ne);de.width+=ji.total}var wj=uh.Za+de.width,xj=th.Za+de.height;h.x=$b;h.y=Gc;h.width=wj;h.height=xj;var Kb=$b,wh=Gc,xh=wj,qa=xj;$b+wj>e.width&&(xh=Math.max(e.width-$b,0));Gc+xj>e.height&&(qa=Math.max(e.height-Gc,0));var ca=ub.alignment,ac=0,gg=0,ki=0,mc=0;if(ca.ed()){ca=this.hm;ca.fd()||(ca=hc);var ac=ca.x,gg=ca.y,ki=ca.offsetX,mc=ca.offsetY,li=uh.alignment, -nc=th.alignment;li.fd()&&(ac=li.x,ki=li.offsetX);nc.fd()&&(gg=nc.y,mc=nc.offsetY)}else ac=ca.x,gg=ca.y,ki=ca.offsetX,mc=ca.offsetY;if(isNaN(ac)||isNaN(gg))gg=ac=.5,mc=ki=0;var bf=ee.width,Oe=ee.height,cf=ub.margin,ve=cf.left+cf.right,we=cf.top+cf.bottom,ed=Yo(ub,th,uh,!1);!isNaN(ub.Ea.width)||ed!==pf&&ed!==wo||(bf=Math.max(wj-ve,0));!isNaN(ub.Ea.height)||ed!==pf&&ed!==vo||(Oe=Math.max(xj-we,0));var Md=ub.kf,yh=ub.ig,bf=Math.min(Md.width,bf),Oe=Math.min(Md.height,Oe),bf=Math.max(yh.width,bf),Oe=Math.max(yh.height, -Oe),$=Oe+we;h.x+=h.width*ac-(bf+ve)*ac+ki+cf.left;h.y+=h.height*gg-$*gg+mc+cf.top;ub.visible&&(Qb(Kb,wh,xh,qa,h.x,h.y,ee.width,ee.height)?ub.pc(h.x,h.y,bf,Oe):ub.pc(h.x,h.y,bf,Oe,new B(Kb,wh,xh,qa)))}else{ub.$i();ub.bc.Ya();var wd=ub.bc,zh=D.sg(wd.x,wd.y,wd.width,wd.height);wd.x=md.type===Po?Me:$b;wd.y=md.type===Qo?jc:Gc;wd.width=ee.width;wd.height=ee.height;ub.bc.freeze();Lo(ub,!1);if(!yb(zh,wd)){var mi=ub.Y;null!==mi&&(mi.Vk(),ub.Os(mi))}D.Kb(zh)}}}}D.Rk(de);for(Wa=0;Wa=ig){var Kg=this.hG,ob=this.gG;yj!==uj&&(Jg=this.computeAngle(pc,yj,ob),pc.angle=Jg);Ig=Kg.x;Jf=Kg.y}else{var Xb=void 0,Ic=void 0;if(0<=Cb)Xb=Hc.o[Cb],Ic=Cb -nd+10?0<=Cb?Nd.Yb(Xb):Xb.Yb(Nd):nd>Ch+10?0<=Cb?Ic.Yb(ab):ab.Yb(Ic):0<=Cb?Nd.Yb(ab):ab.Yb(Nd)}else ob=0<=Cb?Xb.Yb(Ic):Ic.Yb(Xb);yj!==uj&&(Jg=this.computeAngle(pc,yj,ob),pc.angle=Jg);Ig=Xb.x+(Ic.x-Xb.x)*oi;Jf=Xb.y+(Ic.y-Xb.y)*oi}if(Hg.P(cc))pc.location=new O(Ig,Jf);else{Hg.Zd()&&(Hg=hc);var jg=D.Pf();jg.reset();jg.scale(pc.scale,pc.scale);jg.rotate(pc.angle,0,0);var zj=pc.Ga,qc=D.sg(0,0,zj.width,zj.height),Od=D.O();Od.uo(qc,Hg);jg.wb(Od);var Lg=-Od.x,kg=-Od.y,xe=rp.copy();isNaN(xe.x)&&(xe.x=0<=Cb?Od.x+ -3:-(Od.x+3));isNaN(xe.y)&&(xe.y=-(Od.y+3));xe.rotate(ob);Ig+=xe.x;Jf+=xe.y;jg.iH(qc);var Lg=Lg+qc.x,kg=kg+qc.y,pi=D.Fb(Ig+Lg,Jf+kg);pc.move(pi);D.A(pi);D.A(Od);D.Kb(qc);D.He(jg)}}this.Gu(!1)}break;case "Grid":break;case "Graduated":if(null!==this.Pm){var Ok=this.Vd(),Kf=this.Rm,jf=this.Pm,Dh=0,Pe=jf[Dh];Dh++;Ok.pc(Pe.x-e.x,Pe.y-e.y,Pe.width,Pe.height);for(var Pd=g.length,Mg=0;Mg=this.Mq);Ne++){var ii=this.me(Wa+Ne);de.height+=ii.total}for(Ne=1;Ne=this.dq);Ne++){var ji=this.le(Ld+Ne);de.width+=ji.total}var vj=uh.Za+de.width,wj=th.Za+de.height;h.x=$b;h.y=Gc;h.width=vj;h.height=wj;var Kb=$b,wh=Gc,xh=vj,qa=wj;$b+vj>e.width&&(xh=Math.max(e.width-$b,0));Gc+wj>e.height&&(qa=Math.max(e.height-Gc,0));var ca=ub.alignment,ac=0,gg=0,ki=0,mc=0;if(ca.ed()){ca=this.hm;ca.fd()||(ca=hc);var ac=ca.x,gg=ca.y,ki=ca.offsetX,mc=ca.offsetY,li=uh.alignment, +nc=th.alignment;li.fd()&&(ac=li.x,ki=li.offsetX);nc.fd()&&(gg=nc.y,mc=nc.offsetY)}else ac=ca.x,gg=ca.y,ki=ca.offsetX,mc=ca.offsetY;if(isNaN(ac)||isNaN(gg))gg=ac=.5,mc=ki=0;var bf=ee.width,Oe=ee.height,cf=ub.margin,ve=cf.left+cf.right,we=cf.top+cf.bottom,ed=Yo(ub,th,uh,!1);!isNaN(ub.Ea.width)||ed!==pf&&ed!==wo||(bf=Math.max(vj-ve,0));!isNaN(ub.Ea.height)||ed!==pf&&ed!==vo||(Oe=Math.max(wj-we,0));var Md=ub.kf,yh=ub.ig,bf=Math.min(Md.width,bf),Oe=Math.min(Md.height,Oe),bf=Math.max(yh.width,bf),Oe=Math.max(yh.height, +Oe),$=Oe+we;h.x+=h.width*ac-(bf+ve)*ac+ki+cf.left;h.y+=h.height*gg-$*gg+mc+cf.top;ub.visible&&(Qb(Kb,wh,xh,qa,h.x,h.y,ee.width,ee.height)?ub.pc(h.x,h.y,bf,Oe):ub.pc(h.x,h.y,bf,Oe,new B(Kb,wh,xh,qa)))}else{ub.Zi();ub.bc.Ya();var wd=ub.bc,zh=D.sg(wd.x,wd.y,wd.width,wd.height);wd.x=md.type===Po?Me:$b;wd.y=md.type===Qo?jc:Gc;wd.width=ee.width;wd.height=ee.height;ub.bc.freeze();Lo(ub,!1);if(!yb(zh,wd)){var mi=ub.Y;null!==mi&&(mi.Vk(),ub.Os(mi))}D.Kb(zh)}}}}D.Rk(de);for(Wa=0;Wa=ig){var Kg=this.hG,ob=this.gG;xj!==Aj&&(Jg=this.computeAngle(pc,xj,ob),pc.angle=Jg);Ig=Kg.x;Jf=Kg.y}else{var Xb=void 0,Ic=void 0;if(0<=Cb)Xb=Hc.o[Cb],Ic=Cb +nd+10?0<=Cb?Nd.Yb(Xb):Xb.Yb(Nd):nd>Ch+10?0<=Cb?Ic.Yb(ab):ab.Yb(Ic):0<=Cb?Nd.Yb(ab):ab.Yb(Nd)}else ob=0<=Cb?Xb.Yb(Ic):Ic.Yb(Xb);xj!==Aj&&(Jg=this.computeAngle(pc,xj,ob),pc.angle=Jg);Ig=Xb.x+(Ic.x-Xb.x)*oi;Jf=Xb.y+(Ic.y-Xb.y)*oi}if(Hg.P(cc))pc.location=new O(Ig,Jf);else{Hg.Zd()&&(Hg=hc);var jg=D.Pf();jg.reset();jg.scale(pc.scale,pc.scale);jg.rotate(pc.angle,0,0);var yj=pc.Ga,qc=D.sg(0,0,yj.width,yj.height),Od=D.O();Od.to(qc,Hg);jg.wb(Od);var Lg=-Od.x,kg=-Od.y,xe=rp.copy();isNaN(xe.x)&&(xe.x=0<=Cb?Od.x+ +3:-(Od.x+3));isNaN(xe.y)&&(xe.y=-(Od.y+3));xe.rotate(ob);Ig+=xe.x;Jf+=xe.y;jg.iH(qc);var Lg=Lg+qc.x,kg=kg+qc.y,pi=D.Fb(Ig+Lg,Jf+kg);pc.move(pi);D.A(pi);D.A(Od);D.Kb(qc);D.He(jg)}}this.Gu(!1)}break;case "Grid":break;case "Graduated":if(null!==this.Pm){var Nk=this.Vd(),Kf=this.Rm,jf=this.Pm,Dh=0,Pe=jf[Dh];Dh++;Nk.pc(Pe.x-e.x,Pe.y-e.y,Pe.width,Pe.height);for(var Pd=g.length,Mg=0;Mgq.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=n;n=n instanceof x?n:null;q=D.Pf();q.set(h);if(null!==n?n.Qk(a,b,c,d,e,q):Jo(p,a,d, +f.Qk=function(a,b,c,d,e,g){if(!1===this.qg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=D.Pf(),h.reset());h.multiply(this.transform);if(this.Jn(a,h))return eq(this,b,c,e),void 0===g&&D.He(h),!0;if(this.fg(a,h)){if(!this.Zn)for(var k=Pp(this),l=this.ya.o,m=l.length;m--;){var n=l[m];if(n.visible||n===k){var p=n.$,q=this.Ga;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=n;n=n instanceof x?n:null;q=D.Pf();q.set(h);if(null!==n?n.Qk(a,b,c,d,e,q):Jo(p,a,d, q))null!==b&&(p=b(p)),null===p||null!==c&&!c(p)||e.add(p);D.He(q)}}}void 0===g&&D.He(h);return d}void 0===g&&D.He(h);return!1};function eq(a,b,c,d){for(var e=a.ya.o,g=e.length;g--;){var h=e[g];if(h.visible){var k=h.$,l=a.Ga;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof x&&eq(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}} f.Qn=function(a,b,c,d,e,g){if(!1===this.qg)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ga,k=this.kh(),l=k?a:gb(D.Fb(a.x,a.y),this.transform),m=k?b:gb(D.Fb(b.x,b.y),this.transform),n=l.Df(m),p=0u.width||s.y>u.height||0>s.x+s.width||0>s.y+s.height||(r.kh()?(s=r.transform,gb(k.set(a),s),gb(l.set(b),s)):(k.set(a),l.set(b)),s=r,r=r instanceof x?r:null,null!==r?!r.Qn(k,l,c,d,e,g):!s.sF(k,l,e))||(null!==c&&(s=c(s)),null===s||null!==d&&!d(s)||g.add(s))}}D.A(k);D.A(l)}return e? +n&&ib(l.x,l.y,h.width,h.height,h.width,0)u.width||s.y>u.height||0>s.x+s.width||0>s.y+s.height||(r.kh()?(s=r.transform,gb(k.set(a),s),gb(l.set(b),s)):(k.set(a),l.set(b)),s=r,r=r instanceof x?r:null,null!==r?!r.Qn(k,l,c,d,e,g):!s.sF(k,l,e))||(null!==c&&(s=c(s)),null===s||null!==d&&!d(s)||g.add(s))}}D.A(k);D.A(l)}return e? p:h}return!1};function Qp(a){var b=null;a instanceof z&&(b=a.C,b===Vc&&(b=null),a=a.qf,null!==a&&null===b&&(b=a.C));null===b&&(b=dc);return b}function Rp(a){var b=null;a instanceof z&&(b=a.D,b===Vc&&(b=null),a=a.qf,null!==a&&null===b&&(b=a.D));null===b&&(b=uc);return b}x.prototype.add=x.prototype.add=function(a){D.l(a,P,x,"add:element");this.Xd(this.ya.count,a)};x.prototype.elt=x.prototype.ea=function(a){return this.ya.ea(a)}; -x.prototype.insertAt=x.prototype.Xd=function(a,b){b instanceof F&&D.k("Cannot add a Part to a Panel: "+b+"; use a Panel instead");if(this===b||this.tm(b))this===b&&D.k("Cannot make a Panel contain itself: "+this.toString()),D.k("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.Q;null!==c&&c!==this&&D.k("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+b.toString()+", already contained by "+c.toString()+", cannot be shared by this Panel: "+ +x.prototype.insertAt=x.prototype.Xd=function(a,b){b instanceof F&&D.k("Cannot add a Part to a Panel: "+b+"; use a Panel instead");if(this===b||this.um(b))this===b&&D.k("Cannot make a Panel contain itself: "+this.toString()),D.k("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.Q;null!==c&&c!==this&&D.k("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+b.toString()+", already contained by "+c.toString()+", cannot be shared by this Panel: "+ this.toString());this.ca!==Ql||b instanceof z||D.k("Can only add Shapes to a Grid Panel, not: "+b);this.ca!==np||b instanceof z||b instanceof na||D.k("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+b);b.xm(this);b.kn=null;if(null!==this.Yk){var d=b.data;null!==d&&"object"===typeof d&&(null===this.Fg&&(this.Fg=new ma(Object,x)),this.Fg.add(d,b))}var e=this.ya,d=-1;if(c===this){for(var g=-1,h=this.ya.o,k=h.length,l=0;l=e.count&& a>=e.count)return;e.jd(g);d=g}else D.k("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Xd(a,b);this.K();b.K();null!==b.ud?this.Uk=!0:b instanceof x&&!0===b.Uk&&(this.Uk=!0);this.kk=null;c=this.Y;null!==c&&(c.Ll=null,c.tk=NaN,this.Uk&&c instanceof G&&(c.Uk=!0),c.Uk&&c instanceof G&&(c.xe=null),e=this.g,null!==e&&e.ra.ob||(-1!==d&&c.hd(og,"elements",this,b,null,d,null),c.hd(dg,"elements",this,null,b,null,a),this.vu()||fq(this,b,!1)))}; D.defineProperty(x,{Uk:null},function(){return 0!==(this.T&8388608)},function(a){0!==(this.T&8388608)!==a&&(this.T^=8388608)});function gq(a,b){a.T=b?a.T|16777216:a.T&-16777217}x.prototype.remove=x.prototype.remove=function(a){D.l(a,P,x,"remove:element");for(var b=this.ya.o,c=b.length,d=-1,e=0;ea&&D.ua(a,">= 0",x,"getRowDefinition:idx");a=Math.round(a);var b=this.he;if(void 0===b[a]){var c=new fh;c.xm(this);c.Ie=!0;c.index=a;b[a]=c}return b[a]};x.prototype.removeRowDefinition=x.prototype.zG=function(a){v&&D.p(a,x,"removeRowDefinition:idx");0>a&&D.ua(a,">= 0",x,"removeRowDefinition:idx");a=Math.round(a);var b=this.he;this.hd(og,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.K()}; -D.w(x,{eq:"columnCount"},function(){return void 0===this.de?0:this.de.length});x.prototype.getColumnDefinition=x.prototype.le=function(a){v&&D.p(a,x,"getColumnDefinition:idx");0>a&&D.ua(a,">= 0",x,"getColumnDefinition:idx");a=Math.round(a);var b=this.de;if(void 0===b[a]){var c=new fh;c.xm(this);c.Ie=!1;c.index=a;b[a]=c}return b[a]}; +D.w(x,{dq:"columnCount"},function(){return void 0===this.de?0:this.de.length});x.prototype.getColumnDefinition=x.prototype.le=function(a){v&&D.p(a,x,"getColumnDefinition:idx");0>a&&D.ua(a,">= 0",x,"getColumnDefinition:idx");a=Math.round(a);var b=this.de;if(void 0===b[a]){var c=new fh;c.xm(this);c.Ie=!1;c.index=a;b[a]=c}return b[a]}; x.prototype.removeColumnDefinition=x.prototype.wG=function(a){v&&D.p(a,x,"removeColumnDefinition:idx");0>a&&D.ua(a,">= 0",x,"removeColumnDefinition:idx");a=Math.round(a);var b=this.de;this.hd(og,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.K()}; -D.defineProperty(x,{fK:"rowSizing"},function(){return void 0===this.nn?mp:this.nn},function(a){if(void 0!==this.nn){var b=this.nn;b!==a&&(a!==mp&&a!==Tp&&D.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.nn=a,this.K(),this.i("rowSizing",b,a))}}); +D.defineProperty(x,{gK:"rowSizing"},function(){return void 0===this.nn?mp:this.nn},function(a){if(void 0!==this.nn){var b=this.nn;b!==a&&(a!==mp&&a!==Tp&&D.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.nn=a,this.K(),this.i("rowSizing",b,a))}}); D.defineProperty(x,{eI:"columnSizing"},function(){return void 0===this.Km?mp:this.Km},function(a){if(void 0!==this.Km){var b=this.Km;b!==a&&(a!==mp&&a!==Tp&&D.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Km=a,this.K(),this.i("columnSizing",b,a))}}); -D.defineProperty(x,{fH:"topIndex"},function(){return void 0===this.vj?0:this.vj},function(a){if(void 0!==this.vj){var b=this.vj;b!==a&&((!isFinite(a)||0>a)&&D.k("Panel.topIndex must be greater than zero and a real number, not: "+a),this.vj=a,this.K(),this.i("topIndex",b,a))}}); -D.defineProperty(x,{cG:"leftIndex"},function(){return void 0===this.fj?0:this.fj},function(a){if(void 0!==this.fj){var b=this.fj;b!==a&&((!isFinite(a)||0>a)&&D.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.fj=a,this.K(),this.i("leftIndex",b,a))}});x.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==ea)return NaN;for(var b=0,c=this.he,d=c.length,e=this.vj;ea)return-1;if(this.type!==ea)return NaN;for(var b=0,c=this.de,d=c.length,e=this.fj;ea)&&D.k("Panel.topIndex must be greater than zero and a real number, not: "+a),this.uj=a,this.K(),this.i("topIndex",b,a))}}); +D.defineProperty(x,{cG:"leftIndex"},function(){return void 0===this.ej?0:this.ej},function(a){if(void 0!==this.ej){var b=this.ej;b!==a&&((!isFinite(a)||0>a)&&D.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.ej=a,this.K(),this.i("leftIndex",b,a))}});x.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==ea)return NaN;for(var b=0,c=this.he,d=c.length,e=this.uj;ea)return-1;if(this.type!==ea)return NaN;for(var b=0,c=this.de,d=c.length,e=this.ej;e=c.elements.count&&!(c instanceof F)){if(1===c.elements.count){var d=null!==c.Yk;if(!d)for(var e=b.j;e.next();)if("itemArray"=== -e.value.ev){d=!0;break}}d||(D.trace("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),hq=!0)}}))}var hq=!1;x.prototype.copyTemplate=function(){var a=this.copy();a.DK(function(a){a instanceof x&&(a.rl=null,a.Nd=null);var c=a.Cc;null!==c&&(a.Cc=null,c.each(function(c){a.bind(c.copy())}))});return a}; +function Oh(a){var b=a.rl;if(null===b)null!==a.data&&D.k("Template cannot have .data be non-null: "+a),a.rl=b=new K(lh);else if(b.J)return;var c=new K(P);gq(a,!1);ep(a,a,function(a,d){var e=d.Cc;if(null!==e)for(ap(d,!1),e=e.j;e.next();){var g=e.value;g.mode===nh&&ap(d,!0);var h=g.Uq;null!==h&&("/"===h&&gq(a,!0),h=oh(g,a,d),null!==h&&(c.add(h),null===h.Np&&(h.Np=new K(lh)),h.Np.add(g)));b.add(g)}if(d instanceof x&&d.type===ea){if(0=c.elements.count&&!(c instanceof F)){if(1===c.elements.count){var d=null!==c.Yk;if(!d)for(var e=b.j;e.next();)if("itemArray"=== +e.value.ev){d=!0;break}}d||(D.trace("Auto, Spot, or Graduated Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),hq=!0)}}))}var hq=!1;x.prototype.copyTemplate=function(){var a=this.copy();a.EK(function(a){a instanceof x&&(a.rl=null,a.Nd=null);var c=a.Cc;null!==c&&(a.Cc=null,c.each(function(c){a.bind(c.copy())}))});return a}; x.prototype.updateTargetBindings=x.prototype.Nb=function(a){var b=this.rl;if(null!==b)for(void 0===a&&(a=""),b=b.j;b.next();){var c=b.value,d=c.WG;if(""===a||""===d||d===a)if(d=c.ev,null!==c.jI||""!==d){var d=this.data,e=c.Uq;if(null!==e)d=""===e?this:"/"===e?this:"."===e?this:".."===e?this:this.Fd(e);else{var g=this.g;null!==g&&c.$x&&(d=g.ga.Zk)}if(null===d)v&&D.trace("Binding error: missing GraphObject named "+e+" in "+this.toString());else{var g=this,h=c.Bm;if(-1!==h){if(g=this.Ix(h),null===g)continue}else null!== -c.Qg&&(g=c.Qg);"/"===e?d=g.Y:"."===e?d=g:".."===e&&(d=g.Q);e=c.Dt;if(0!==e){if(!(g instanceof x))continue;h=g;1===e?g=h.le(c.Vp):2===e&&(g=h.me(c.Vp))}void 0!==g&&c.lH(g,d)}}}}; -D.defineProperty(x,{Yk:"itemArray"},function(){return this.cj},function(a){var b=this.cj;if(b!==a){v&&null!==a&&!D.isArray(a)&&D.k("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.g;null!==c&&null!==b&&Zm(c,this);this.cj=a;null!==c&&null!==a&&Vm(c,this);this.i("itemArray",b,a);null!==c&&c.ra.ob||this.yB()}});function rn(a){return a.type===Vj||a.type===Nl||a.type===rj||a.type===ea&&0a;)this.sf(this.ya.length-1);a=this.Yk;if(null!==a)for(var b=D.cb(a),c=0;cc)){var d;d=iq(a,b);var e=a.pJ,g=null;null!==e&&(g=e.na(d));null===g&&(jq||(jq=!0,D.trace('No item template Panel found for category "'+d+'" on '+a),D.trace(" Using default item template."),d=new x,e=new na,e.bind(new lh("text","",ja)),d.add(e),kq=d),g=kq);d=g;null!==d&&(Oh(d),d=d.copy(),0!==(d.T&16777216)&&(e=a.mm(),null!==e&&gq(e,!0)),"object"===typeof b&&(null===a.Fg&&(a.Fg=new ma(Object,x)),a.Fg.add(b,d)),e=c,rn(a)&&e++,a.Xd(e,d),d.Nd=b,sn(a,e, +function qn(a,b,c){if(!(void 0===b||null===b||0>c)){var d;d=iq(a,b);var e=a.qJ,g=null;null!==e&&(g=e.na(d));null===g&&(jq||(jq=!0,D.trace('No item template Panel found for category "'+d+'" on '+a),D.trace(" Using default item template."),d=new x,e=new na,e.bind(new lh("text","",ja)),d.add(e),kq=d),g=kq);d=g;null!==d&&(Oh(d),d=d.copy(),0!==(d.T&16777216)&&(e=a.mm(),null!==e&&gq(e,!0)),"object"===typeof b&&(null===a.Fg&&(a.Fg=new ma(Object,x)),a.Fg.add(b,d)),e=c,rn(a)&&e++,a.Xd(e,d),d.Nd=b,sn(a,e, c),d.Nd=null,d.data=b)}}function sn(a,b,c){for(a=a.ya;ba&&D.ua(a,">= 0",fh,"height"),this.pf=a,this.Qa=this.Za,null!==this.Q&&this.Q.K(),this.rd("height",b,a))});D.defineProperty(fh,{width:"width"},function(){return this.pf},function(a){var b=this.pf;b!==a&&(v&&D.h(a,"number",fh,"width"),0>a&&D.ua(a,">= 0",fh,"width"),this.pf=a,this.Qa=this.Za,null!==this.Q&&this.Q.K(),this.rd("width",b,a))}); -D.defineProperty(fh,{Qj:"minimum"},function(){return this.vk},function(a){var b=this.vk;b!==a&&(v&&D.h(a,"number",fh,"minimum"),(0>a||!isFinite(a))&&D.ua(a,">= 0",fh,"minimum"),this.vk=a,this.Qa=this.Za,null!==this.Q&&this.Q.K(),this.rd("minimum",b,a))});D.defineProperty(fh,{wf:"maximum"},function(){return this.uk},function(a){var b=this.uk;b!==a&&(v&&D.h(a,"number",fh,"maximum"),0>a&&D.ua(a,">= 0",fh,"maximum"),this.uk=a,this.Qa=this.Za,null!==this.Q&&this.Q.K(),this.rd("maximum",b,a))}); +D.defineProperty(fh,{height:"height"},function(){return this.pf},function(a){var b=this.pf;b!==a&&(v&&D.h(a,"number",fh,"height"),0>a&&D.ua(a,">= 0",fh,"height"),this.pf=a,this.Pa=this.Za,null!==this.Q&&this.Q.K(),this.rd("height",b,a))});D.defineProperty(fh,{width:"width"},function(){return this.pf},function(a){var b=this.pf;b!==a&&(v&&D.h(a,"number",fh,"width"),0>a&&D.ua(a,">= 0",fh,"width"),this.pf=a,this.Pa=this.Za,null!==this.Q&&this.Q.K(),this.rd("width",b,a))}); +D.defineProperty(fh,{Qj:"minimum"},function(){return this.vk},function(a){var b=this.vk;b!==a&&(v&&D.h(a,"number",fh,"minimum"),(0>a||!isFinite(a))&&D.ua(a,">= 0",fh,"minimum"),this.vk=a,this.Pa=this.Za,null!==this.Q&&this.Q.K(),this.rd("minimum",b,a))});D.defineProperty(fh,{wf:"maximum"},function(){return this.uk},function(a){var b=this.uk;b!==a&&(v&&D.h(a,"number",fh,"maximum"),0>a&&D.ua(a,">= 0",fh,"maximum"),this.uk=a,this.Pa=this.Za,null!==this.Q&&this.Q.K(),this.rd("maximum",b,a))}); D.defineProperty(fh,{alignment:"alignment"},function(){return this.re},function(a){var b=this.re;b.P(a)||(v&&D.l(a,R,fh,"alignment"),this.re=a.V(),null!==this.Q&&this.Q.K(),this.rd("alignment",b,a))});D.defineProperty(fh,{stretch:"stretch"},function(){return this.Og},function(a){var b=this.Og;b!==a&&(v&&D.Da(a,P,fh,"stretch"),this.Og=a,null!==this.Q&&this.Q.K(),this.rd("stretch",b,a))}); D.defineProperty(fh,{QG:"separatorPadding"},function(){return this.zk},function(a){"number"===typeof a?a=new Ib(a):null!==a&&v&&D.l(a,Ib,fh,"separatorPadding");var b=this.zk;null!==a&&null!==b&&b.P(a)||(null!==a&&(a=a.V()),this.zk=a,null!==this.Q&&this.Q.K(),this.rd("separatorPadding",b,a))}); D.defineProperty(fh,{Oq:"separatorStroke"},function(){return this.qt},function(a){var b=this.qt;b!==a&&(null===a||"string"===typeof a||a instanceof Ba)&&(a instanceof Ba&&a.freeze(),this.qt=a,null!==this.Q&&this.Q.K(),this.rd("separatorStroke",b,a))});D.defineProperty(fh,{Pq:"separatorStrokeWidth"},function(){return this.rt},function(a){var b=this.rt;b!==a&&(this.rt=a,null!==this.Q&&this.Q.K(),this.rd("separatorStrokeWidth",b,a))}); -D.defineProperty(fh,{uM:"separatorDashArray"},function(){return this.oi},function(a){var b=this.oi;if(b!==a){null===a||Array.isArray(a)||D.hc(a,"Array",fh,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){for(var g=d.Fa,h=Math.max(1,g.width),g=g.height,k=c[0],l=c[1],m=0,n=0,p=0,q=0,r=0,s=0,u=q=0,t=D.tb(),y=2;yp&&(p=1);for(var e=c=p,m=h/2,n=0===m?!1:!0,y=0,q=t[y],p=q[0],s=q[1],r=q[2],q=q[3],w=0;.1<=u;){0===w&&(n?(e=c,e-=m,u-=m,n=!1):e=c,0===e&&(e=1));if(e>u){D.Ba(t);return}e> q?(w=e-q,e=q):w=0;var C=Math.sqrt(e*e/(1+r*r));0>p&&(C=-C);k+=C;l+=r*C;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(g/2));0===w&&d.Pk(a,b);a.translate(h/2,g/2);a.rotate(-s);a.translate(-k,-l);u-=e;q-=e;if(0!==w){y++;if(y===t.length){D.Ba(t);return}q=t[y];p=q[0];s=q[1];r=q[2];q=q[3];e=w}}D.Ba(t)}} -z.prototype.Pk=function(a,b){if(null!==this.yc||null!==this.Od){null!==this.Od&&To(this,a,this.Od,!0,!1);null!==this.yc&&To(this,a,this.yc,!1,!1);var c=this.Pg;if(0===c){var d=this.Y;d instanceof da&&d.type===rj&&"Selection"===d.Ed&&d.zb instanceof z&&d.$f.Vd()===d.zb&&(c=d.zb.jb)}a.lineWidth=c;a.lineJoin=this.Tp;a.lineCap=this.Rp;a.miterLimit=this.vn;var e=!1;this.Y&&b.Hj("drawShadows")&&(e=this.Y.Xk);var g=!0;null!==this.yc&&null===this.Od&&(g=!1);var d=!1,h=!0,k=this.ZG;null!==k&&(d=!0,h=a.JA(k, +z.prototype.Pk=function(a,b){if(null!==this.yc||null!==this.Od){null!==this.Od&&To(this,a,this.Od,!0,!1);null!==this.yc&&To(this,a,this.yc,!1,!1);var c=this.Pg;if(0===c){var d=this.Y;d instanceof da&&d.type===rj&&"Selection"===d.Ed&&d.zb instanceof z&&d.$f.Vd()===d.zb&&(c=d.zb.jb)}a.lineWidth=c;a.lineJoin=this.Sp;a.lineCap=this.Qp;a.miterLimit=this.vn;var e=!1;this.Y&&b.Gj("drawShadows")&&(e=this.Y.Xk);var g=!0;null!==this.yc&&null===this.Od&&(g=!1);var d=!1,h=!0,k=this.ZG;null!==k&&(d=!0,h=a.JA(k, this.Bf));var l=this.pb;if(null!==l){if(l.ca===qf)a.beginPath(),d&&!h?Eo(a,l.xc,l.Hc,l.Ab,l.Ib,k,this.Bf):(a.moveTo(l.xc,l.Hc),a.lineTo(l.Ab,l.Ib)),null!==this.Od&&a.Wg(this.Od),0!==c&&null!==this.yc&&a.Wj();else if(l.ca===rf){var m=l.xc,n=l.Hc,p=l.Ab,q=l.Ib,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.Od&&(a.beginPath(),a.rect(l,r,m,n),a.Wg(this.Od));if(null!==this.yc){var s=p=0,u=0;g&&e&&(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= 0,a.shadowBlur=0);d&&!h?(h=D.tb(),h.push(l),h.push(r),h.push(l+m),h.push(r),h.push(l+m),h.push(r+n),h.push(l),h.push(r+n),h.push(l),h.push(r),a.beginPath(),nq(a,h,k,this.Bf),a.Wj(),D.Ba(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.Wj());g&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.ca===sf)m=l.xc,n=l.Hc,p=l.Ab,q=l.Ib,l=Math.abs(p-m)/2,r=Math.abs(q-n)/2,m=Math.min(m,p)+l,n=Math.min(n,q)+r,a.beginPath(),a.moveTo(m,n-r),a.bezierCurveTo(m+Fd*l,n-r,m+l,n-Fd*r,m+l,n),a.bezierCurveTo(m+ l,n+Fd*r,m+Fd*l,n+r,m,n+r),a.bezierCurveTo(m-Fd*l,n+r,m-l,n+Fd*r,m-l,n),a.bezierCurveTo(m-l,n-Fd*r,m-Fd*l,n-r,m,n-r),a.closePath(),null!==this.Od&&a.Wg(this.Od),d&&!h&&(h=D.tb(),Be(m,n-r,m+Fd*l,n-r,m+l,n-Fd*r,m+l,n,.5,h),Be(m+l,n,m+l,n+Fd*r,m+Fd*l,n+r,m,n+r,.5,h),Be(m,n+r,m-Fd*l,n+r,m-l,n+Fd*r,m-l,n,.5,h),Be(m-l,n,m-l,n-Fd*r,m-Fd*l,n-r,m,n-r,.5,h),a.beginPath(),nq(a,h,k,this.Bf),D.Ba(h)),0!==c&&null!==this.yc&&(g&&e?(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= 0,a.shadowBlur=0,a.Wj(),a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u):a.Wj());else if(l.ca===Ze){r=l.fk;n=r.length;for(q=0;qy.yf);else{var t=Rf(y,m),w=t.length;if(0===w){a.lineTo(y.oa,y.va);break}for(var C=0;Ce)){var g=.001,h=c.length,k=b[0],l=b[1];if(4===e)Eo(a,k,l,b[2],b[3],c,d);else{a.moveTo(k,l);for(var m=g=0,n=0,p=0,q=0,r=p=0,s=D.tb(),u=2;ur&&(g=r);g>p?(t=g-p,g=p):t=0;var y=Math.sqrt(g*g/(1+q*q));0>n&&(y=-y);k+=y;l+= q*y;e?a.lineTo(k,l):a.moveTo(k,l);r-=g;p-=g;if(0!==t){u++;if(u===s.length){D.Ba(s);return}p=s[u];n=p[0];q=p[1];p=p[2];g=t}else e=!e}D.Ba(s)}}}z.prototype.getDocumentPoint=z.prototype.eb=function(a,b){void 0===b&&(b=new O);if(a instanceof R){a.Zd()&&D.k("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var c=this.Ga,d=this.jb;b.n(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY)}else b.set(a);this.Hh.wb(b);return b}; z.prototype.Mk=function(a,b){var c=this.qf;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.mb,e=this.jb/2;c.type!==qf||b||(e+=2);var g=D.Of();g.assign(d);g.Ff(e+2,e+2);if(!g.Oa(a))return D.Kb(g),!1;d=e+1E-4;if(c.type===qf){if(null===this.stroke)return!1;d=(c.H-c.ma)*(a.x-c.ma)+(c.I-c.ka)*(a.y-c.ka);if(0>(c.ma-c.H)*(a.x-c.H)+(c.ka-c.I)*(a.y-c.I)||0>d)return!1;D.Kb(g);return re(c.ma,c.ka,c.H,c.I,e,a.x,a.y)}if(c.type===rf){var h=c.ma,k=c.ka,l=c.H,m=c.I;g.x=Math.min(h,l);g.y=Math.min(k, m);g.width=Math.abs(l-h);g.height=Math.abs(m-k);if(null===this.fill){g.Ff(-d,-d);if(g.Oa(a))return D.Kb(g),!1;g.Ff(d,d)}null!==this.stroke&&g.Ff(e,e);e=g.Oa(a);D.Kb(g);return e}if(c.type===sf){var h=c.ma,k=c.ka,l=c.H,m=c.I,c=Math.min(h,l),n=Math.min(k,m),h=Math.abs(l-h)/2,k=Math.abs(m-k)/2,c=a.x-(c+h),n=a.y-(n+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=c*c/(h*h)+n*n/(k*k))return D.Kb(g),!1;h+=d;k+=d}null!==this.stroke&&(h+=e,k+=e);D.Kb(g);return 0>=h||0>=k?!1:1>=c*c/(h*h)+n*n/(k*k)}if(c.type=== Ze)return D.Kb(g),null===this.fill?Uf(c,a.x,a.y,e):c.Oa(a,e,1=this.jb)n=Ie(p.xc,p.Hc,p.Ab,p.Ib,g,h,k,l,e);else{var r=0,s=0;p.xc===p.Ab?(r=m,s=0):(b=(p.Ib-p.Hc)/(p.Ab-p.xc),s=m/Math.sqrt(1+b*b),r=s*b);d=D.tb();b=new O;Ie(p.xc+ +d=l,c=h.copy(),h=h.mb,e/=h.width,d/=h.height,isFinite(e)||(e=1),isFinite(d)||(d=1),1===e&&1===d||c.scale(e,d),v&&c.freeze(),this.pb=c):null!==this.pb&&zb(this.pb.np,a-g)&&zb(this.pb.lp,b-g)||(this.pb=z.makeGeometry(this,k,l));h=this.pb.mb;Infinity===a||Infinity===b?Ho(this,h.x-g/2,h.y-g/2,0===a&&0===k?0:h.width+g,0===b&&0===l?0:h.height+g):Ho(this,-(g/2),-(g/2),m+g,n+g)}; +function Up(a,b,c,d){if(!1!==Jm(a)){a.Bd.Ya();var e=a.Pg;0===e&&d instanceof da&&d.type===rj&&d.zb instanceof z&&(e=d.zb.jb);e*=a.Bb;d instanceof J&&null!==d.pb?(b=d.pb.mb,Ho(a,b.x-e/2,b.y-e/2,b.width+e,b.height+e)):Ho(a,-(e/2),-(e/2),b+e,c+e);a.Bd.freeze();a.Bd.F()||D.k("Non-real measuredBounds has been set. Object "+a+", measuredBounds: "+a.Bd.toString());hm(a,!1)}}function Yj(a){var b=a.PA;return null!==a.Yf?b===uo?pf:b:b===uo?ne[a.Jb].je:b}z.prototype.yj=function(a,b,c,d){Mo(this,a,b,c,d)}; +z.prototype.getNearestIntersectionPoint=z.prototype.yF=function(a,b,c){return this.Un(a.x,a.y,b.x,b.y,c)}; +z.prototype.Un=function(a,b,c,d,e){var g=this.transform,h=1/(g.m11*g.m22-g.m12*g.m21),k=g.m22*h,l=-g.m12*h,m=-g.m21*h,n=g.m11*h,p=h*(g.m21*g.dy-g.m22*g.dx),q=h*(g.m12*g.dx-g.m11*g.dy),g=a*k+b*m+p,h=a*l+b*n+q,k=c*k+d*m+p,l=c*l+d*n+q,m=this.jb/2,p=this.pb;null===p&&(Fk(this,Infinity,Infinity),p=this.pb);q=p.mb;n=!1;if(p.type===qf)if(1.5>=this.jb)n=Ie(p.xc,p.Hc,p.Ab,p.Ib,g,h,k,l,e);else{var r=0,s=0;p.xc===p.Ab?(r=m,s=0):(b=(p.Ib-p.Hc)/(p.Ab-p.xc),s=m/Math.sqrt(1+b*b),r=s*b);d=D.tb();b=new O;Ie(p.xc+ r,p.Hc+s,p.Ab+r,p.Ib+s,g,h,k,l,b)&&d.push(b);b=new O;Ie(p.xc-r,p.Hc-s,p.Ab-r,p.Ib-s,g,h,k,l,b)&&d.push(b);b=new O;Ie(p.xc+r,p.Hc+s,p.xc-r,p.Hc-s,g,h,k,l,b)&&d.push(b);b=new O;Ie(p.Ab+r,p.Ib+s,p.Ab-r,p.Ib-s,g,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return D.Ba(d),!1;n=!0;s=Infinity;for(r=0;rMath.abs(c)){n=h-b-c*(g-d);if(0>a*a*c*c+t*t-n*n){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+t*t-n*n);k=(-(a*a*c*n)+a*t*m)/(t*t+a*a*c*c)+d;a=(-(a*a*c*n)-a*t*m)/(t*t+a*a*c*c)+d;l=c*(k-d)+n+b;b=c*(a-d)+n+b;d=Math.abs((g-k)*(g-k))+Math.abs((h-l)*(h-l));h=Math.abs((g-a)*(g-a))+Math.abs((h-b)*(h- b));dk){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(k);l=b+m;b-=m;d=Math.abs(l-h);h=Math.abs(b-h);dc?a-c:c-a)<(b>d?b-d:d-b)?(e=be||zb(l.y,e))&&(l.ye||zb(l.x,e))&&(l.x=h&&d<=a}a=h&&g<=a} -z.prototype.sF=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.Mk(a,!0))return!0;var e=a.Df(b);b=e;1.5e)return!0;return!1}if(c&&null!==this.fill&&this.Mk(a,!0))return!0;var e=a.Df(b);b=e;1.5=e||jb(b,g,0,-p)>=e||jb(b,g,0,p)>=e||jb(b,g,n,0)>= -e?!1:!0}else if(g.type===Ze){h=g.mb;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&ib(a.x,a.y,k,l,m,l)>e&&ib(a.x,a.y,m,h,k,h)>e&&ib(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?Uf(g,a.x,a.y,b):g.Oa(a,b,!0))return!0}else{c=g.lc;for(b=0;be)return!1;l=k.Db.o;m=l.length;for(h=0;he)return!1;break;case Df:g=D.tb(); -Be(n,p,q.Bc,q.Xc,q.Sh,q.Th,q.H,q.I,.8,g);n=d(g,a);D.Ba(g);if(n)return!1;n=q.H;p=q.I;if(a.lq(n,p)>e)return!1;break;case Of:g=D.tb();Fe(n,p,q.Bc,q.Xc,q.H,q.I,.8,g);n=d(g,a);D.Ba(g);if(n)return!1;n=q.H;p=q.I;if(a.lq(n,p)>e)return!1;break;case Pf:case Qf:var r=q.type===Pf?Rf(q,k):Sf(q,k,n,p),s=r.length;if(0===s){n=q.oa;p=q.va;if(a.lq(n,p)>e)return!1;break}q=null;g=D.tb();for(b=0;bm&&a.xh&&a.ye&&ib(a.x,a.y,k,l,m,l)>e&&ib(a.x,a.y,m,h,k,h)>e&&ib(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?Uf(g,a.x,a.y,b):g.Oa(a,b,!0))return!0}else{c=g.lc;for(b=0;be)return!1;l=k.Db.o;m=l.length;for(h=0;he)return!1;break;case Df:g=D.tb(); +Be(n,p,q.Bc,q.Xc,q.Rh,q.Sh,q.H,q.I,.8,g);n=d(g,a);D.Ba(g);if(n)return!1;n=q.H;p=q.I;if(a.kq(n,p)>e)return!1;break;case Of:g=D.tb();Fe(n,p,q.Bc,q.Xc,q.H,q.I,.8,g);n=d(g,a);D.Ba(g);if(n)return!1;n=q.H;p=q.I;if(a.kq(n,p)>e)return!1;break;case Pf:case Qf:var r=q.type===Pf?Rf(q,k):Sf(q,k,n,p),s=r.length;if(0===s){n=q.oa;p=q.va;if(a.kq(n,p)>e)return!1;break}q=null;g=D.tb();for(b=0;b= 0",z,"strokeWidth:value")}); -D.defineProperty(z,{zM:"strokeCap"},function(){return this.Rp},function(a){var b=this.Rp;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?D.ua(a,'"butt", "round", or "square"',z,"strokeCap"):(this.Rp=a,this.qa(),this.i("strokeCap",b,a)))}); -D.defineProperty(z,{BM:"strokeJoin"},function(){return this.Tp},function(a){var b=this.Tp;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?D.ua(a,'"miter", "bevel", or "round"',z,"strokeJoin"):(this.Tp=a,this.qa(),this.i("strokeJoin",b,a)))}); -D.defineProperty(z,{CM:"strokeMiterLimit"},function(){return this.vn},function(a){var b=this.vn;if(b!==a)if(v&&D.p(a,z,"strokeMiterLimit"),1<=a){this.vn=a;this.qa();var c=this.Y;null!==c&&(c.tk=NaN);this.i("strokeMiterLimit",b,a)}else D.ua(a,"value >= 1",z,"strokeWidth:value")}); -D.defineProperty(z,{ZG:"strokeDashArray"},function(){return this.Sp},function(a){var b=this.Sp;if(b!==a){null===a||Array.isArray(a)||D.hc(a,"Array",z,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e= 1",z,"strokeWidth:value")}); +D.defineProperty(z,{ZG:"strokeDashArray"},function(){return this.Rp},function(a){var b=this.Rp;if(b!==a){null===a||Array.isArray(a)||D.hc(a,"Array",z,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1a?a=0:1a?a=0:1a?a=0:1a?a=0:1n*l*l&&(h=!0);b.od!==a&&(h=!1);!1===b.Hj("textGreeking")&&(h=!1);n=this.ti;l=this.ui;switch(this.ju){case yo:a.translate(c, -0);a.scale(-1,1);break;case xo:a.translate(0,d);a.scale(1,-1);break;case zo:a.translate(c,d),a.scale(-1,-1)}var m=this.ue,p=(n+e+l)*m;d>p&&(k=this.Vl,k=k.y*d-k.y*p+k.offsetY);for(var p=this.hi,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,y=c,w=e,C=g,A=0;h?("left"===C?A=0:"right"===C?A=y-r:"center"===C&&(A=(y-r)/2),s.fillRect(0+A,t+.25*w,r,1)):("left"===C?A=0:"right"===C?A=y:"center"===C&&(A=y/2),s.fillText(u,0+A,t+w-.25*w),u=w/20|0,0===u&&(u=1),"right"===C?A-=r:"center"=== +na.prototype.Pk=function(a,b){if(null!==this.yc&&0!==this.Sd.length&&null!==this.zg){var c=this.Ga.width,d=this.Ga.height,e=Mq(this),g=a.textAlign=this.Rl,h=b.gs;"start"===g&&(g=h?"right":"left");"end"===g&&(g=h?"left":"right");To(this,a,this.yc,!0,!1);(this.qk||this.pk)&&To(this,a,this.yc,!1,!1);var k=0,h=!1,l=D.Fb(0,0);this.Hh.wb(l);var m=D.Fb(0,e);this.Hh.wb(m);var n=l.Df(m);D.A(l);D.A(m);l=b.scale;8>n*l*l&&(h=!0);b.od!==a&&(h=!1);!1===b.Gj("textGreeking")&&(h=!1);n=this.si;l=this.ti;switch(this.ju){case yo:a.translate(c, +0);a.scale(-1,1);break;case xo:a.translate(0,d);a.scale(1,-1);break;case zo:a.translate(c,d),a.scale(-1,-1)}var m=this.ue,p=(n+e+l)*m;d>p&&(k=this.Vl,k=k.y*d-k.y*p+k.offsetY);for(var p=this.gi,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,y=c,w=e,C=g,A=0;h?("left"===C?A=0:"right"===C?A=y-r:"center"===C&&(A=(y-r)/2),s.fillRect(0+A,t+.25*w,r,1)):("left"===C?A=0:"right"===C?A=y:"center"===C&&(A=y/2),s.fillText(u,0+A,t+w-.25*w),u=w/20|0,0===u&&(u=1),"right"===C?A-=r:"center"=== C&&(A-=r/2),this.qk&&(s.beginPath(),s.lineWidth=u,s.moveTo(0+A,t+w-.2*w),s.lineTo(0+A+r,t+w-.2*w),s.stroke()),this.pk&&(s.beginPath(),s.lineWidth=u,t=t+w-w/2.2|0,0!==u%2&&(t+=.5),s.moveTo(0+A,t),s.lineTo(0+A+r,t),s.stroke()));k+=e+l}switch(this.ju){case yo:a.scale(-1,1);a.translate(-c,0);break;case xo:a.scale(1,-1);a.translate(0,-d);break;case zo:a.scale(-1,-1),a.translate(-c,-d)}}}; -na.prototype.computeAngle=function(a,b){var c=0;switch(a){default:case uj:c=0;break;case uq:c=b;break;case Vp:c=b+90;break;case Xp:c=b-90;break;case Nq:c=b+180;break;case Oq:c=Ue(b);90c&&(c-=180);break;case Wp:c=Ue(b+90);90c&&(c-=180);break;case Yp:c=Ue(b-90);90c&&(c-=180);break;case Zp:c=Ue(b);if(45c||225c)return 0;90c&&(c-=180)}return Ue(c)}; -na.prototype.jo=function(a,b,c,d){this.wp=a;var e=this.hi;e.reset();var g=0,h=0;if(isNaN(this.Ea.width)){g=this.Sd.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===g.length)g=0;else if(this.Zx){for(var k=h=0,l=!1;!l;){var m=g.indexOf("\n",k);-1===m&&(m=g.length,l=!0);k=Pq(g.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.zg);k>h&&(h=k);k=m+1}g=h}else h=g.indexOf("\n",0),0<=h&&(g=g.substr(0,h)),g=k=Pq(g,this.zg);g=Math.min(g,a/this.scale);g=Math.max(8,g)}else g=this.Ea.width;null!==this.Q&&(g=Math.min(g, -this.Q.kf.width),g=Math.max(g,this.Q.ig.width));h=Lq(this,g,e);m=h=isNaN(this.Ea.height)?Math.min(h,b/this.scale):this.Ea.height;if(0!==e.nf&&1!==e.Xe.length&&this.nj===Iq&&(b=this.zg,l=this.nj===Iq?Qq(b):0,k=this.ti+this.ui,k=Math.max(0,Mq(this)+k),m=Math.min(this.CJ-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Xe.length))){k=e.Xe[m];for(a=Math.max(1,a-l);Pq(k,b)>a&&1=a.vh)return new Ca(0,l);if(a.Ik===Gq){c.xj=1;g=Pq(b,k);if(0===h||g<=d)return c.nf=g,c.zf.push(c.nf),c.Xe.push(b),new Ca(g,l);var m=Rq(b);b=b.substr(m.length);for(var n=Rq(b),g=Pq(m+n,k);0d&&1c&&(c-=180);break;case Wp:c=Ue(b+90);90c&&(c-=180);break;case Yp:c=Ue(b-90);90c&&(c-=180);break;case Zp:c=Ue(b);if(45c||225c)return 0;90c&&(c-=180)}return Ue(c)}; +na.prototype.io=function(a,b,c,d){this.vp=a;var e=this.gi;e.reset();var g=0,h=0;if(isNaN(this.Ea.width)){g=this.Sd.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===g.length)g=0;else if(this.Zx){for(var k=h=0,l=!1;!l;){var m=g.indexOf("\n",k);-1===m&&(m=g.length,l=!0);k=Pq(g.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.zg);k>h&&(h=k);k=m+1}g=h}else h=g.indexOf("\n",0),0<=h&&(g=g.substr(0,h)),g=k=Pq(g,this.zg);g=Math.min(g,a/this.scale);g=Math.max(8,g)}else g=this.Ea.width;null!==this.Q&&(g=Math.min(g, +this.Q.kf.width),g=Math.max(g,this.Q.ig.width));h=Lq(this,g,e);m=h=isNaN(this.Ea.height)?Math.min(h,b/this.scale):this.Ea.height;if(0!==e.nf&&1!==e.Xe.length&&this.mj===Iq&&(b=this.zg,l=this.mj===Iq?Qq(b):0,k=this.si+this.ti,k=Math.max(0,Mq(this)+k),m=Math.min(this.DJ-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Xe.length))){k=e.Xe[m];for(a=Math.max(1,a-l);Pq(k,b)>a&&1=a.vh)return new Ca(0,l);if(a.Ik===Gq){c.wj=1;g=Pq(b,k);if(0===h||g<=d)return c.nf=g,c.zf.push(c.nf),c.Xe.push(b),new Ca(g,l);var m=Rq(b);b=b.substr(m.length);for(var n=Rq(b),g=Pq(m+n,k);0d&&1d;){n=1;g=Pq(m.substr(0,n),k);for(h=0;g<=d;)n++,h=g,g=Pq(m.substr(0,n),k);1===n?(c.zf[a.ue+p]=g,e=Math.max(e,g)):(c.zf[a.ue+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Xe[a.ue+p]=m.substr(0,n);p++;m=m.substr(n);if(a.ue+p>a.vh)break}n=Rq(b);for(g=Pq(m+n,k);0a.vh))break}c.xj=Math.min(a.vh,p);c.nf=Math.max(c.nf,e);return new Ca(c.nf,l*c.xj)}function Rq(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)} +n).replace(/^\s+|\s+$/g,""),k);m=m.replace(/^\s+|\s+$/g,"");if(""!==m&&("\u00ad"===m[m.length-1]&&(m=m.substring(0,m.length-1)+"\u2010"),0===n.length?(c.zf.push(g),e=Math.max(e,g)):(h=Pq(m,k),c.zf.push(h),e=Math.max(e,h)),c.Xe.push(m),p++,a.ue+p>a.vh))break}c.wj=Math.min(a.vh,p);c.nf=Math.max(c.nf,e);return new Ca(c.nf,l*c.wj)}function Rq(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)} function Pq(a,b){Eq!==b&&(Eq=Fq.font=b);return Fq.measureText(a).width}function Mq(a){if(null!==a.Om)return a.Om;var b=a.zg;Eq!==b&&(Eq=Fq.font=b);var c=0;void 0!==zq[b]&&5E3>Aq?c=zq[b]:(c=1.3*Fq.measureText("M").width,zq[b]=c,Aq++);return a.Om=c}function Qq(a){Eq!==a&&(Eq=Fq.font=a);var b=0;void 0!==Bq[a]&&5E3>Cq?b=Bq[a]:(b=Fq.measureText(Dq).width,Bq[a]=b,Cq++);return b} -function Lq(a,b,c){var d=a.Sd.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.ti+a.ui,e=Math.max(0,Mq(a)+e);if(0===d.length)return c.nf=0,a.ue=1,e;if(!a.Zx){var g=d.indexOf("\n",0);0<=g&&(d=d.substr(0,g))}for(var g=0,h=a.ue=0,k=-1,l=!1;!l;)k=d.indexOf("\n",h),-1===k&&(k=d.length,l=!0),h<=k&&(h=d.substr(h,k-h),a.Ik!==Gq?(c.xj=0,h=Kq(a,h,c,b),g+=h.height,a.ue+=c.xj):(Kq(a,h,c,b),g+=e,a.ue++),a.ue===a.vh&&(l=!0)),h=k+1;return a.qw=g} +function Lq(a,b,c){var d=a.Sd.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.si+a.ti,e=Math.max(0,Mq(a)+e);if(0===d.length)return c.nf=0,a.ue=1,e;if(!a.Zx){var g=d.indexOf("\n",0);0<=g&&(d=d.substr(0,g))}for(var g=0,h=a.ue=0,k=-1,l=!1;!l;)k=d.indexOf("\n",h),-1===k&&(k=d.length,l=!0),h<=k&&(h=d.substr(h,k-h),a.Ik!==Gq?(c.wj=0,h=Kq(a,h,c,b),g+=h.height,a.ue+=c.wj):(Kq(a,h,c,b),g+=e,a.ue++),a.ue===a.vh&&(l=!0)),h=k+1;return a.qw=g} D.defineProperty(na,{RB:"textValidation"},function(){return this.Sl},function(a){var b=this.Sl;b!==a&&(null!==a&&D.h(a,"function",na,"textValidation"),this.Sl=a,this.i("textValidation",b,a))});D.defineProperty(na,{aH:"textEdited"},function(){return this.Et},function(a){var b=this.Et;b!==a&&(null!==a&&D.h(a,"function",na,"textEdited"),this.Et=a,this.i("textEdited",b,a))}); -D.defineProperty(na,{wM:"spacingAbove"},function(){return this.ti},function(a){var b=this.ti;b!==a&&(v&&D.h(a,"number",na,"spacingAbove"),this.ti=a,this.i("spacingAbove",b,a))});D.defineProperty(na,{xM:"spacingBelow"},function(){return this.ui},function(a){var b=this.ui;b!==a&&(v&&D.h(a,"number",na,"spacingBelow"),this.ui=a,this.i("spacingBelow",b,a))}); -D.defineProperty(na,{CJ:"maxLines"},function(){return this.vh},function(a){var b=this.vh;b!==a&&(v&&D.h(a,"number",na,"maxLines"),a=Math.floor(a),0>=a&&D.ua(a,"> 0",na,"maxLines"),this.vh=a,this.i("maxLines",b,a),this.K())});D.w(na,{XL:"metrics"},function(){return this.hi});D.defineProperty(na,{fL:"choices"},function(){return this.nr},function(a){var b=this.nr;b!==a&&(null===a||Array.isArray(a)||D.hc(a,"Array",na,"choices:value"),this.nr=a,this.i("choices",b,a))}); -function $p(){this.nf=this.xj=0;this.zf=[];this.Xe=[]}$p.prototype.reset=function(){this.nf=this.xj=0;this.zf=[];this.Xe=[]};$p.prototype.fq=function(a){this.xj=a.xj;this.nf=a.nf;this.zf=D.dm(a.zf);this.Xe=D.dm(a.Xe)};D.w($p,{cL:"arrSize"},function(){return this.zf});D.w($p,{dL:"arrText"},function(){return this.Xe});D.w($p,{WL:"maxLineWidth"},function(){return this.nf}); -function Fl(){P.call(this);this.Ze=null;this.xt="";this.Ak=ke;this.jp=pf;this.xi=this.$e=null;this.ip=hc;this.yg=Xj;this.Up=null;this.Kz=!1;this.dp=!0;this.ow=!1;this.Mp=null}D.Sa(Fl,P);D.ja("Picture",Fl);Fl.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.element=this.Ze;a.xt=this.xt;a.Ak=this.Ak.V();a.jp=this.jp;a.yg=this.yg;a.$e=this.$e;a.xi=this.xi;a.ip=this.ip.V();a.dp=this.dp;a.Mp=this.Mp}; +D.defineProperty(na,{xM:"spacingAbove"},function(){return this.si},function(a){var b=this.si;b!==a&&(v&&D.h(a,"number",na,"spacingAbove"),this.si=a,this.i("spacingAbove",b,a))});D.defineProperty(na,{yM:"spacingBelow"},function(){return this.ti},function(a){var b=this.ti;b!==a&&(v&&D.h(a,"number",na,"spacingBelow"),this.ti=a,this.i("spacingBelow",b,a))}); +D.defineProperty(na,{DJ:"maxLines"},function(){return this.vh},function(a){var b=this.vh;b!==a&&(v&&D.h(a,"number",na,"maxLines"),a=Math.floor(a),0>=a&&D.ua(a,"> 0",na,"maxLines"),this.vh=a,this.i("maxLines",b,a),this.K())});D.w(na,{YL:"metrics"},function(){return this.gi});D.defineProperty(na,{gL:"choices"},function(){return this.nr},function(a){var b=this.nr;b!==a&&(null===a||Array.isArray(a)||D.hc(a,"Array",na,"choices:value"),this.nr=a,this.i("choices",b,a))}); +function $p(){this.nf=this.wj=0;this.zf=[];this.Xe=[]}$p.prototype.reset=function(){this.nf=this.wj=0;this.zf=[];this.Xe=[]};$p.prototype.eq=function(a){this.wj=a.wj;this.nf=a.nf;this.zf=D.dm(a.zf);this.Xe=D.dm(a.Xe)};D.w($p,{dL:"arrSize"},function(){return this.zf});D.w($p,{eL:"arrText"},function(){return this.Xe});D.w($p,{XL:"maxLineWidth"},function(){return this.nf}); +function Fl(){P.call(this);this.Ze=null;this.xt="";this.Ak=ke;this.ip=pf;this.wi=this.$e=null;this.hp=hc;this.yg=Xj;this.Tp=null;this.Kz=!1;this.cp=!0;this.ow=!1;this.Lp=null}D.Sa(Fl,P);D.ja("Picture",Fl);Fl.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.element=this.Ze;a.xt=this.xt;a.Ak=this.Ak.V();a.ip=this.ip;a.yg=this.yg;a.$e=this.$e;a.wi=this.wi;a.hp=this.hp.V();a.cp=this.cp;a.Lp=this.Lp}; Fl.prototype.oc=function(a){a===Xj||a===Zj||a===ak?this.aJ=a:P.prototype.oc.call(this,a)};Fl.prototype.toString=function(){return"Picture("+this.source+")#"+D.Gd(this)};var Sq=new la,Tq=0,zl=[];function Uq(){var a=zl;if(0===a.length)for(var b=window.document.getElementsByTagName("canvas"),c=b.length,d=0;d=d.width&&(e=e+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case pf:n=d.width;p=d.height;break;case Zj:case ak:var s=0;q===Zj?(s=Math.min(d.height/p,d.width/n),n*=s,p*=s):q===ak&&(s=Math.max(d.height/p,d.width/n),n*=s,p*=s,n>=d.width&&(e=(e+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/p)*h),k*=1/(n/d.width),h*=1/(p/d.height), -n=d.width,p=d.height)}var q=this.Gj()*b.scale,u=k*h/(n*q*p*q),s=Sq[this.source],q=null;if(void 0!==s&&16s.aq.length&&(Zq(s,4,l,m),Zq(s,16,l,m));for(var l=s.aq,m=l.length,q=l[0],t=0;t=d.width&&(e=e+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(g=g+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case pf:n=d.width;p=d.height;break;case Zj:case ak:var s=0;q===Zj?(s=Math.min(d.height/p,d.width/n),n*=s,p*=s):q===ak&&(s=Math.max(d.height/p,d.width/n),n*=s,p*=s,n>=d.width&&(e=(e+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(g=(g+r.offsetY+(p*r.y-d.height*r.y)/p)*h),k*=1/(n/d.width),h*=1/(p/d.height), +n=d.width,p=d.height)}var q=this.Fj()*b.scale,u=k*h/(n*q*p*q),s=Sq[this.source],q=null;if(void 0!==s&&16s.$p.length&&(Zq(s,4,l,m),Zq(s,16,l,m));for(var l=s.$p,m=l.length,q=l[0],t=0;th&&a.y>k&&a.righth&&b.y>k&&b.right=c.EJ)){this.S^=4096;var d=!1;if(null!==c){d=c.Eb;c.Eb=!0;var e=c.selection;e.Ya();a?e.add(this):e.remove(this);e.freeze()}this.i("isSelected",b,a);this.ne();a=this.iK;null!==a&&a(this);null!==c&&(c.Se(),c.Eb=d)}}}); -D.defineProperty(F,{Yg:"isHighlighted"},function(){return 0!==(this.S&524288)},function(a){var b=0!==(this.S&524288);if(b!==a){v&&D.h(a,"boolean",F,"isHighlighted");this.S^=524288;var c=this.g;null!==c&&(c=c.rm,c.Ya(),a?c.add(this):c.remove(this),c.freeze());this.i("isHighlighted",b,a);this.qa();a=this.ZI;null!==a&&a(this)}}); +D.defineProperty(F,{hb:"isSelected"},function(){return 0!==(this.S&4096)},function(a){var b=0!==(this.S&4096);if(b!==a){v&&D.h(a,"boolean",F,"isSelected");var c=this.g;if(!a||this.canSelect()&&!(null!==c&&c.selection.count>=c.FJ)){this.S^=4096;var d=!1;if(null!==c){d=c.Eb;c.Eb=!0;var e=c.selection;e.Ya();a?e.add(this):e.remove(this);e.freeze()}this.i("isSelected",b,a);this.ne();a=this.jK;null!==a&&a(this);null!==c&&(c.Se(),c.Eb=d)}}}); +D.defineProperty(F,{Yg:"isHighlighted"},function(){return 0!==(this.S&524288)},function(a){var b=0!==(this.S&524288);if(b!==a){v&&D.h(a,"boolean",F,"isHighlighted");this.S^=524288;var c=this.g;null!==c&&(c=c.sm,c.Ya(),a?c.add(this):c.remove(this),c.freeze());this.i("isHighlighted",b,a);this.qa();a=this.ZI;null!==a&&a(this)}}); D.defineProperty(F,{Xk:"isShadowed"},function(){return 0!==(this.S&8192)},function(a){var b=0!==(this.S&8192);b!==a&&(v&&D.h(a,"boolean",F,"isShadowed"),this.S^=8192,this.i("isShadowed",b,a),this.qa())});function Lm(a){return 0!==(a.S&32768)}function hr(a,b){a.S=b?a.S|32768:a.S&-32769}function No(a,b){a.S=b?a.S|65536:a.S&-65537}function rl(a){return 0!==(a.S&131072)}F.prototype.Mf=function(a){this.S=a?this.S|131072:this.S&-131073};function qr(a,b){a.S=b?a.S|1048576:a.S&-1048577} D.defineProperty(F,{NF:"isAnimated"},function(){return 0!==(this.S&262144)},function(a){var b=0!==(this.S&262144);b!==a&&(v&&D.h(a,"boolean",F,"isAnimated"),this.S^=262144,this.i("isAnimated",b,a))});D.defineProperty(F,{ZI:"highlightedChanged"},function(){return this.bs},function(a){var b=this.bs;b!==a&&(null!==a&&D.h(a,"function",F,"highlightedChanged"),this.bs=a,this.i("highlightedChanged",b,a))}); -D.defineProperty(F,{Ey:"selectionObjectName"},function(){return this.pt},function(a){var b=this.pt;b!==a&&(v&&D.h(a,"string",F,"selectionObjectName"),this.pt=a,this.rn=null,this.i("selectionObjectName",b,a))});D.defineProperty(F,{hK:"selectionAdornmentTemplate"},function(){return this.nt},function(a){var b=this.nt;b!==a&&(v&&D.l(a,da,F,"selectionAdornmentTemplate"),this instanceof J&&(a.type=rj),this.nt=a,this.i("selectionAdornmentTemplate",b,a))}); -D.w(F,{to:"selectionObject"},function(){if(null===this.rn){var a=this.Ey;null!==a&&""!==a?(a=this.Fd(a),this.rn=null!==a?a:this):this instanceof J?(a=this.path,this.rn=null!==a?a:this):this.rn=this}return this.rn});D.defineProperty(F,{iK:"selectionChanged"},function(){return this.ot},function(a){var b=this.ot;b!==a&&(null!==a&&D.h(a,"function",F,"selectionChanged"),this.ot=a,this.i("selectionChanged",b,a))}); -D.defineProperty(F,{EG:"resizeAdornmentTemplate"},function(){return this.bt},function(a){var b=this.bt;b!==a&&(v&&D.l(a,da,F,"resizeAdornmentTemplate"),this.bt=a,this.i("resizeAdornmentTemplate",b,a))});D.defineProperty(F,{GG:"resizeObjectName"},function(){return this.dt},function(a){var b=this.dt;b!==a&&(v&&D.h(a,"string",F,"resizeObjectName"),this.dt=a,this.Ip=null,this.i("resizeObjectName",b,a))}); -D.w(F,{FG:"resizeObject"},function(){if(null===this.Ip){var a=this.GG;null!==a&&""!==a?(a=this.Fd(a),this.Ip=null!==a?a:this):this.Ip=this}return this.Ip});D.defineProperty(F,{$J:"resizeCellSize"},function(){return this.ct},function(a){var b=this.ct;b.P(a)||(v&&D.l(a,Ca,F,"resizeCellSize"),this.ct=a=a.V(),this.i("resizeCellSize",b,a))}); -D.defineProperty(F,{bK:"rotateAdornmentTemplate"},function(){return this.et},function(a){var b=this.et;b!==a&&(v&&D.l(a,da,F,"rotateAdornmentTemplate"),this.et=a,this.i("rotateAdornmentTemplate",b,a))});D.defineProperty(F,{cK:"rotateObjectName"},function(){return this.ft},function(a){var b=this.ft;b!==a&&(v&&D.h(a,"string",F,"rotateObjectName"),this.ft=a,this.Jp=null,this.i("rotateObjectName",b,a))}); -D.w(F,{JG:"rotateObject"},function(){if(null===this.Jp){var a=this.cK;null!==a&&""!==a?(a=this.Fd(a),this.Jp=null!==a?a:this):this.Jp=this}return this.Jp});D.defineProperty(F,{text:"text"},function(){return this.Sd},function(a){var b=this.Sd;b!==a&&(v&&D.h(a,"string",F,"text"),this.Sd=a,this.i("text",b,a))}); -D.defineProperty(F,{Pa:"containingGroup"},function(){return this.sl},function(a){if(this.oe()){var b=this.sl;if(b!==a){v&&null!==a&&D.l(a,I,F,"containingGroup");null===a||this!==a&&!a.Ei(this)||(this===a&&D.k("Cannot make a Group a member of itself: "+this.toString()),D.k("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.N(an);var c=this.g;null!==b?rr(b,this):this instanceof I&&null!==c&&c.Tl.remove(this);this.sl=a;null!==a?sr(a,this):this instanceof +D.defineProperty(F,{Ey:"selectionObjectName"},function(){return this.pt},function(a){var b=this.pt;b!==a&&(v&&D.h(a,"string",F,"selectionObjectName"),this.pt=a,this.rn=null,this.i("selectionObjectName",b,a))});D.defineProperty(F,{iK:"selectionAdornmentTemplate"},function(){return this.nt},function(a){var b=this.nt;b!==a&&(v&&D.l(a,da,F,"selectionAdornmentTemplate"),this instanceof J&&(a.type=rj),this.nt=a,this.i("selectionAdornmentTemplate",b,a))}); +D.w(F,{so:"selectionObject"},function(){if(null===this.rn){var a=this.Ey;null!==a&&""!==a?(a=this.Fd(a),this.rn=null!==a?a:this):this instanceof J?(a=this.path,this.rn=null!==a?a:this):this.rn=this}return this.rn});D.defineProperty(F,{jK:"selectionChanged"},function(){return this.ot},function(a){var b=this.ot;b!==a&&(null!==a&&D.h(a,"function",F,"selectionChanged"),this.ot=a,this.i("selectionChanged",b,a))}); +D.defineProperty(F,{EG:"resizeAdornmentTemplate"},function(){return this.bt},function(a){var b=this.bt;b!==a&&(v&&D.l(a,da,F,"resizeAdornmentTemplate"),this.bt=a,this.i("resizeAdornmentTemplate",b,a))});D.defineProperty(F,{GG:"resizeObjectName"},function(){return this.dt},function(a){var b=this.dt;b!==a&&(v&&D.h(a,"string",F,"resizeObjectName"),this.dt=a,this.Hp=null,this.i("resizeObjectName",b,a))}); +D.w(F,{FG:"resizeObject"},function(){if(null===this.Hp){var a=this.GG;null!==a&&""!==a?(a=this.Fd(a),this.Hp=null!==a?a:this):this.Hp=this}return this.Hp});D.defineProperty(F,{aK:"resizeCellSize"},function(){return this.ct},function(a){var b=this.ct;b.P(a)||(v&&D.l(a,Ca,F,"resizeCellSize"),this.ct=a=a.V(),this.i("resizeCellSize",b,a))}); +D.defineProperty(F,{cK:"rotateAdornmentTemplate"},function(){return this.et},function(a){var b=this.et;b!==a&&(v&&D.l(a,da,F,"rotateAdornmentTemplate"),this.et=a,this.i("rotateAdornmentTemplate",b,a))});D.defineProperty(F,{dK:"rotateObjectName"},function(){return this.ft},function(a){var b=this.ft;b!==a&&(v&&D.h(a,"string",F,"rotateObjectName"),this.ft=a,this.Ip=null,this.i("rotateObjectName",b,a))}); +D.w(F,{JG:"rotateObject"},function(){if(null===this.Ip){var a=this.dK;null!==a&&""!==a?(a=this.Fd(a),this.Ip=null!==a?a:this):this.Ip=this}return this.Ip});D.defineProperty(F,{text:"text"},function(){return this.Sd},function(a){var b=this.Sd;b!==a&&(v&&D.h(a,"string",F,"text"),this.Sd=a,this.i("text",b,a))}); +D.defineProperty(F,{Ra:"containingGroup"},function(){return this.sl},function(a){if(this.oe()){var b=this.sl;if(b!==a){v&&null!==a&&D.l(a,I,F,"containingGroup");null===a||this!==a&&!a.Di(this)||(this===a&&D.k("Cannot make a Group a member of itself: "+this.toString()),D.k("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.N(an);var c=this.g;null!==b?rr(b,this):this instanceof I&&null!==c&&c.Tl.remove(this);this.sl=a;null!==a?sr(a,this):this instanceof I&&null!==c&&c.Tl.add(this);this.N(Sm);if(null!==c){var d=this.data,e=c.ga;null!==d&&e instanceof Y&&e.HB(d,e.Cb(null!==a?a.data:null))}d=this.TE;null!==d&&(e=!0,null!==c&&(e=c.ab,c.ab=!0),d(this,b,a),null!==c&&(c.ab=e));if(this instanceof I)for(c=new L(F),Mh(c,this,!0,0,!0),c=c.j;c.next();)if(d=c.value,d instanceof G)for(d=d.Hd;d.next();)wn(d.value);if(this instanceof G)for(d=this.Hd;d.next();)wn(d.value);this.i("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&wl(b,-1,a))}}else D.k("cannot set the Part.containingGroup of a Link or Adornment")}); -f=F.prototype;f.Vk=function(){var a=this.Pa;null!==a&&(a.K(),null!==a.Qb&&a.Qb.K(),a.gg())};f.qa=function(){var a=this.g;null!==a&&!Km(this)&&!Lm(this)&&this.isVisible()&&this.bc.F()&&a.qa(vl(this,this.bc))};f.K=function(){x.prototype.K.call(this);var a=this.g;null!==a&&(a.Eg.add(this),this instanceof G&&null!==this.Ac&&Xo(this.Ac),a.Se(!0))};f.ru=function(a){a||(a=this.sl,null!==a&&sr(a,this))};f.su=function(a){a||(a=this.sl,null!==a&&rr(a,this))}; -f.On=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.ga,null!==b&&b.Ay(a))}};D.defineProperty(F,{TE:"containingGroupChanged"},function(){return this.qr},function(a){var b=this.qr;b!==a&&(null!==a&&D.h(a,"function",F,"containingGroupChanged"),this.qr=a,this.i("containingGroupChanged",b,a))});F.prototype.findSubGraphLevel=function(){return tr(this,this)};function tr(a,b){var c=b.Pa;return null!==c?1+tr(a,c):b instanceof G&&(c=b.Ac,null!==c)?tr(a,c):0} -F.prototype.findTopLevelPart=function(){return ur(this,this)};function ur(a,b){var c=b.Pa;return null!==c?ur(a,c):b instanceof G&&(c=b.Ac,null!==c)?ur(a,c):b}D.w(F,{yq:"isTopLevel"},function(){return null!==this.Pa||this instanceof G&&this.uf?!1:!0});F.prototype.isMemberOf=F.prototype.Ei=function(a){return a instanceof I?vr(this,this,a):!1};function vr(a,b,c){if(b===c||null===c)return!1;var d=b.Pa;return null===d||d!==c&&!vr(a,d,c)?b instanceof G&&(b=b.Ac,null!==b)?vr(a,b,c):!1:!0} -F.prototype.findCommonContainingGroup=F.prototype.FI=function(a){if(null===a)return null;v&&D.l(a,F,F,"findCommonContainingGroup:other");if(this===a)return this.Pa;for(var b=this;null!==b;)b instanceof I&&qr(b,!0),b=b.Pa;for(var c=null,b=a;null!==b;){if(0!==(b.S&1048576)){c=b;break}b=b.Pa}for(b=this;null!==b;)b instanceof I&&qr(b,!1),b=b.Pa;return c}; -D.defineProperty(F,{tJ:"layoutConditions"},function(){return this.ps},function(a){var b=this.ps;b!==a&&(v&&D.h(a,"number",F,"layoutConditions"),this.ps=a,this.i("layoutConditions",b,a))});F.prototype.canLayout=function(){if(!this.cB||!this.isVisible())return!1;var a=this.layer;return null!==a&&a.Uc||this instanceof G&&this.uf?!1:!0}; -F.prototype.invalidateLayout=F.prototype.N=function(a){void 0===a&&(a=16777215);var b;this.cB&&0!==(a&this.tJ)?(b=this.layer,null!==b&&b.Uc||this instanceof G&&this.uf?b=!1:(b=this.g,b=null!==b&&b.ra.ob?!1:!0)):b=!1;if(b)if(b=this.sl,null!==b){var c=b.Vb;null!==c?c.N():b.N(a)}else a=this.g,null!==a&&(c=a.Vb,null!==c&&c.N())};function Xm(a){if(!a.isVisible())return!1;a=a.layer;return null!==a&&a.Uc?!1:!0} -D.defineProperty(F,{fF:"dragComputation"},function(){return this.Kr},function(a){var b=this.Kr;b!==a&&(null!==a&&D.h(a,"function",F,"dragComputation"),this.Kr=a,this.i("dragComputation",b,a))});D.defineProperty(F,{lK:"shadowOffset"},function(){return this.tn},function(a){var b=this.tn;b.P(a)||(v&&D.l(a,O,F,"shadowOffset"),this.tn=a=a.V(),this.qa(),this.i("shadowOffset",b,a))}); +f=F.prototype;f.Vk=function(){var a=this.Ra;null!==a&&(a.K(),null!==a.Qb&&a.Qb.K(),a.gg())};f.qa=function(){var a=this.g;null!==a&&!Km(this)&&!Lm(this)&&this.isVisible()&&this.bc.F()&&a.qa(vl(this,this.bc))};f.K=function(){x.prototype.K.call(this);var a=this.g;null!==a&&(a.Eg.add(this),this instanceof G&&null!==this.Ac&&Xo(this.Ac),a.Se(!0))};f.ru=function(a){a||(a=this.sl,null!==a&&sr(a,this))};f.su=function(a){a||(a=this.sl,null!==a&&rr(a,this))}; +f.On=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.ga,null!==b&&b.Ay(a))}};D.defineProperty(F,{TE:"containingGroupChanged"},function(){return this.qr},function(a){var b=this.qr;b!==a&&(null!==a&&D.h(a,"function",F,"containingGroupChanged"),this.qr=a,this.i("containingGroupChanged",b,a))});F.prototype.findSubGraphLevel=function(){return tr(this,this)};function tr(a,b){var c=b.Ra;return null!==c?1+tr(a,c):b instanceof G&&(c=b.Ac,null!==c)?tr(a,c):0} +F.prototype.findTopLevelPart=function(){return ur(this,this)};function ur(a,b){var c=b.Ra;return null!==c?ur(a,c):b instanceof G&&(c=b.Ac,null!==c)?ur(a,c):b}D.w(F,{xq:"isTopLevel"},function(){return null!==this.Ra||this instanceof G&&this.uf?!1:!0});F.prototype.isMemberOf=F.prototype.Di=function(a){return a instanceof I?vr(this,this,a):!1};function vr(a,b,c){if(b===c||null===c)return!1;var d=b.Ra;return null===d||d!==c&&!vr(a,d,c)?b instanceof G&&(b=b.Ac,null!==b)?vr(a,b,c):!1:!0} +F.prototype.findCommonContainingGroup=F.prototype.FI=function(a){if(null===a)return null;v&&D.l(a,F,F,"findCommonContainingGroup:other");if(this===a)return this.Ra;for(var b=this;null!==b;)b instanceof I&&qr(b,!0),b=b.Ra;for(var c=null,b=a;null!==b;){if(0!==(b.S&1048576)){c=b;break}b=b.Ra}for(b=this;null!==b;)b instanceof I&&qr(b,!1),b=b.Ra;return c}; +D.defineProperty(F,{uJ:"layoutConditions"},function(){return this.ps},function(a){var b=this.ps;b!==a&&(v&&D.h(a,"number",F,"layoutConditions"),this.ps=a,this.i("layoutConditions",b,a))});F.prototype.canLayout=function(){if(!this.cB||!this.isVisible())return!1;var a=this.layer;return null!==a&&a.Uc||this instanceof G&&this.uf?!1:!0}; +F.prototype.invalidateLayout=F.prototype.N=function(a){void 0===a&&(a=16777215);var b;this.cB&&0!==(a&this.uJ)?(b=this.layer,null!==b&&b.Uc||this instanceof G&&this.uf?b=!1:(b=this.g,b=null!==b&&b.ra.ob?!1:!0)):b=!1;if(b)if(b=this.sl,null!==b){var c=b.Vb;null!==c?c.N():b.N(a)}else a=this.g,null!==a&&(c=a.Vb,null!==c&&c.N())};function Xm(a){if(!a.isVisible())return!1;a=a.layer;return null!==a&&a.Uc?!1:!0} +D.defineProperty(F,{fF:"dragComputation"},function(){return this.Kr},function(a){var b=this.Kr;b!==a&&(null!==a&&D.h(a,"function",F,"dragComputation"),this.Kr=a,this.i("dragComputation",b,a))});D.defineProperty(F,{mK:"shadowOffset"},function(){return this.tn},function(a){var b=this.tn;b.P(a)||(v&&D.l(a,O,F,"shadowOffset"),this.tn=a=a.V(),this.qa(),this.i("shadowOffset",b,a))}); D.defineProperty(F,{shadowColor:"shadowColor"},function(){return this.sn},function(a){var b=this.sn;b!==a&&(v&&D.h(a,"string",F,"shadowColor"),this.sn=a,this.qa(),this.i("shadowColor",b,a))});D.defineProperty(F,{shadowBlur:"shadowBlur"},function(){return this.Ng},function(a){var b=this.Ng;b!==a&&(v&&D.h(a,"number",F,"shadowBlur"),this.Ng=a,this.qa(),this.i("shadowBlur",b,a))}); function da(a){0===arguments.length?F.call(this,ck):F.call(this,a);this.S&=-257;this.Gl="Adornment";this.Qc=null;this.JD=0;this.yE=!1;this.Qb=this.ph=null}D.Sa(da,F);D.ja("Adornment",da);da.prototype.toString=function(){var a=this.$f;return"Adornment("+this.Ed+")"+(null!==a?a.toString():"")};da.prototype.updateRelationshipsFromData=function(){}; da.prototype.Gu=function(a){var b=this.zb.Y,c=this.zb;if(b instanceof J&&c instanceof z){var d=b.path,c=d.qf;b.Gu(a);c=d.qf;a=this.ya.o;b=a.length;for(d=0;da&&(a=1);var b=this.g;if(null!==b&&!b.Ph){b.Ph=!0;var c=new L(G);c.add(this);Hr(this,c,b.$d,a,b.Xa,this,b.ZB===Cl);b.Ph=!1}}; +G.prototype.findTreeParts=function(a){void 0===a&&(a=Infinity);D.h(a,"number",G,"findTreeParts:level");var b=new L(F);Mh(b,this,!1,a,!0);return b};G.prototype.collapseTree=G.prototype.collapseTree=function(a){void 0===a&&(a=1);D.p(a,G,"collapseTree:level");1>a&&(a=1);var b=this.g;if(null!==b&&!b.Oh){b.Oh=!0;var c=new L(G);c.add(this);Hr(this,c,b.$d,a,b.Xa,this,b.ZB===Cl);b.Oh=!1}}; function Hr(a,b,c,d,e,g,h){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.Ph){b.Ph=!0;var c=new L(G);c.add(this);Jr(this,c,b.$d,a,b.Xa,this,b.ZB===Cl);b.Ph=!1}};function Jr(a,b,c,d,e,g,h){for(var k=g===a?!1:a.td,l=c?a.Jx():a.Xg();l.next();){var m=l.value;m.Vc&&(k||m.lh||m.gc(),m=m.RA(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.Jd(!0),m.Vk(),h&&nl(e,m,g)),2a&&(a=2);var b=this.g;if(null!==b&&!b.Oh){b.Oh=!0;var c=new L(G);c.add(this);Jr(this,c,b.$d,a,b.Xa,this,b.ZB===Cl);b.Oh=!1}};function Jr(a,b,c,d,e,g,h){for(var k=g===a?!1:a.td,l=c?a.Jx():a.Xg();l.next();){var m=l.value;m.Vc&&(k||m.lh||m.gc(),m=m.RA(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.Jd(!0),m.Vk(),h&&nl(e,m,g)),2a&&(a-=180);break;case Wp:a=Ue(c+90);90a&&(a-=180);break;case Yp:a=Ue(c-90);90a&&(a-=180);break;case Zp:a=Ue(c);if(45a||225a)return 0;90a&&(a-=180)}return Ue(a)}; -D.defineProperty(J,{aa:"fromNode"},function(){return this.Ag},function(a){var b=this.Ag;if(b!==a){v&&null!==a&&D.l(a,G,J,"fromNode");var c=this.Lc;null!==b&&(this.Rg!==b&&Er(b,this,c),Pr(this),this.N(an));this.Ag=a;null!==a&&this.Jd(a.isVisible());this.Yi=null;this.gc();var d=this.g;if(null!==d){var e=this.data,g=d.ga;if(null!==e)if(g instanceof Y){var h=null!==a?a.data:null;g.FB(e,g.Cb(h))}else g instanceof xg&&(h=null!==a?a.data:null,d.$d?g.Hi(e,g.Cb(h)):(null!==b&&g.Hi(b.data,void 0),g.Hi(h,g.Cb(null!== +var Yp;J.OrientMinus90Upright=Yp=D.s(J,"OrientMinus90Upright",27);var Zp;J.OrientUpright45=Zp=D.s(J,"OrientUpright45",28);f=J.prototype;f.Wd=function(){null===this.Z&&(this.Z=new Co)};f.vm=function(){var a=this.aa;if(null!==a){var b=a.findVisibleNode();null!==b&&(a=b);if(Km(a)||Lm(a))return!1}a=this.da;return null!==a&&(b=a.findVisibleNode(),null!==b&&(a=b),Km(a)||Lm(a))?!1:!0};f.JB=function(){return!1};f.KB=function(){};f.oe=function(){return!1}; +J.prototype.computeAngle=function(a,b,c){a=0;switch(b){default:case Aj:a=0;break;case uq:a=c;break;case Vp:a=c+90;break;case Xp:a=c-90;break;case Nq:a=c+180;break;case Oq:a=Ue(c);90a&&(a-=180);break;case Wp:a=Ue(c+90);90a&&(a-=180);break;case Yp:a=Ue(c-90);90a&&(a-=180);break;case Zp:a=Ue(c);if(45a||225a)return 0;90a&&(a-=180)}return Ue(a)}; +D.defineProperty(J,{aa:"fromNode"},function(){return this.Ag},function(a){var b=this.Ag;if(b!==a){v&&null!==a&&D.l(a,G,J,"fromNode");var c=this.Lc;null!==b&&(this.Rg!==b&&Er(b,this,c),Pr(this),this.N(an));this.Ag=a;null!==a&&this.Jd(a.isVisible());this.Xi=null;this.gc();var d=this.g;if(null!==d){var e=this.data,g=d.ga;if(null!==e)if(g instanceof Y){var h=null!==a?a.data:null;g.FB(e,g.Cb(h))}else g instanceof xg&&(h=null!==a?a.data:null,d.$d?g.Gi(e,g.Cb(h)):(null!==b&&g.Gi(b.data,void 0),g.Gi(h,g.Cb(null!== this.Rg?this.Rg.data:null))))}e=this.Lc;g=this.wF;null!==g&&(h=!0,null!==d&&(h=d.ab,d.ab=!0),g(this,c,e),null!==d&&(d.ab=h));null!==a&&(this.Rg!==a&&Dr(a,this,e),Qr(this),this.N(Sm));this.i("fromNode",b,a);wn(this)}}); -D.defineProperty(J,{dg:"fromPortId"},function(){return this.di},function(a){var b=this.di;if(b!==a){v&&D.h(a,"string",J,"fromPortId");var c=this.Lc;null!==c&&Cr(this.aa,c);Pr(this);this.di=a;var d=this.Lc;null!==d&&Cr(this.aa,d);var e=this.g;if(null!==e){var g=this.data,h=e.ga;null!==g&&h instanceof Y&&h.GB(g,a)}c!==d&&(this.Yi=null,this.gc(),g=this.wF,null!==g&&(h=!0,null!==e&&(h=e.ab,e.ab=!0),g(this,c,d),null!==e&&(e.ab=h)));Qr(this);this.i("fromPortId",b,a)}}); -D.w(J,{Lc:"fromPort"},function(){var a=this.Ag;return null===a?null:a.lm(this.di)});D.defineProperty(J,{wF:"fromPortChanged"},function(){return this.Ur},function(a){var b=this.Ur;b!==a&&(null!==a&&D.h(a,"function",J,"fromPortChanged"),this.Ur=a,this.i("fromPortChanged",b,a))}); -D.defineProperty(J,{da:"toNode"},function(){return this.Rg},function(a){var b=this.Rg;if(b!==a){v&&null!==a&&D.l(a,G,J,"toNode");var c=this.kd;null!==b&&(this.Ag!==b&&Er(b,this,c),Pr(this),this.N(an));this.Rg=a;null!==a&&this.Jd(a.isVisible());this.Yi=null;this.gc();var d=this.g;if(null!==d){var e=this.data,g=d.ga;if(null!==e)if(g instanceof Y){var h=null!==a?a.data:null;g.LB(e,g.Cb(h))}else g instanceof xg&&(h=null!==a?a.data:null,d.$d?(null!==b&&g.Hi(b.data,void 0),g.Hi(h,g.Cb(null!==this.Ag?this.Ag.data: -null))):g.Hi(e,g.Cb(h)))}e=this.kd;g=this.dH;null!==g&&(h=!0,null!==d&&(h=d.ab,d.ab=!0),g(this,c,e),null!==d&&(d.ab=h));null!==a&&(this.Ag!==a&&Dr(a,this,e),Qr(this),this.N(Sm));this.i("toNode",b,a);wn(this)}}); -D.defineProperty(J,{jh:"toPortId"},function(){return this.yi},function(a){var b=this.yi;if(b!==a){v&&D.h(a,"string",J,"toPortId");var c=this.kd;null!==c&&Cr(this.da,c);Pr(this);this.yi=a;var d=this.kd;null!==d&&Cr(this.da,d);var e=this.g;if(null!==e){var g=this.data,h=e.ga;null!==g&&h instanceof Y&&h.MB(g,a)}c!==d&&(this.Yi=null,this.gc(),g=this.dH,null!==g&&(h=!0,null!==e&&(h=e.ab,e.ab=!0),g(this,c,d),null!==e&&(e.ab=h)));Qr(this);this.i("toPortId",b,a)}}); -D.w(J,{kd:"toPort"},function(){var a=this.Rg;return null===a?null:a.lm(this.yi)});D.defineProperty(J,{dH:"toPortChanged"},function(){return this.It},function(a){var b=this.It;b!==a&&(null!==a&&D.h(a,"function",J,"toPortChanged"),this.It=a,this.i("toPortChanged",b,a))});D.defineProperty(J,{Gb:"fromSpot"},function(){return null!==this.Z?this.Z.jk:Vc},function(a){this.Wd();var b=this.Z.jk;b.P(a)||(v&&D.l(a,R,J,"fromSpot"),a=a.V(),this.Z.jk=a,this.i("fromSpot",b,a),this.gc())}); +D.defineProperty(J,{dg:"fromPortId"},function(){return this.ci},function(a){var b=this.ci;if(b!==a){v&&D.h(a,"string",J,"fromPortId");var c=this.Lc;null!==c&&Cr(this.aa,c);Pr(this);this.ci=a;var d=this.Lc;null!==d&&Cr(this.aa,d);var e=this.g;if(null!==e){var g=this.data,h=e.ga;null!==g&&h instanceof Y&&h.GB(g,a)}c!==d&&(this.Xi=null,this.gc(),g=this.wF,null!==g&&(h=!0,null!==e&&(h=e.ab,e.ab=!0),g(this,c,d),null!==e&&(e.ab=h)));Qr(this);this.i("fromPortId",b,a)}}); +D.w(J,{Lc:"fromPort"},function(){var a=this.Ag;return null===a?null:a.lm(this.ci)});D.defineProperty(J,{wF:"fromPortChanged"},function(){return this.Ur},function(a){var b=this.Ur;b!==a&&(null!==a&&D.h(a,"function",J,"fromPortChanged"),this.Ur=a,this.i("fromPortChanged",b,a))}); +D.defineProperty(J,{da:"toNode"},function(){return this.Rg},function(a){var b=this.Rg;if(b!==a){v&&null!==a&&D.l(a,G,J,"toNode");var c=this.kd;null!==b&&(this.Ag!==b&&Er(b,this,c),Pr(this),this.N(an));this.Rg=a;null!==a&&this.Jd(a.isVisible());this.Xi=null;this.gc();var d=this.g;if(null!==d){var e=this.data,g=d.ga;if(null!==e)if(g instanceof Y){var h=null!==a?a.data:null;g.LB(e,g.Cb(h))}else g instanceof xg&&(h=null!==a?a.data:null,d.$d?(null!==b&&g.Gi(b.data,void 0),g.Gi(h,g.Cb(null!==this.Ag?this.Ag.data: +null))):g.Gi(e,g.Cb(h)))}e=this.kd;g=this.dH;null!==g&&(h=!0,null!==d&&(h=d.ab,d.ab=!0),g(this,c,e),null!==d&&(d.ab=h));null!==a&&(this.Ag!==a&&Dr(a,this,e),Qr(this),this.N(Sm));this.i("toNode",b,a);wn(this)}}); +D.defineProperty(J,{jh:"toPortId"},function(){return this.xi},function(a){var b=this.xi;if(b!==a){v&&D.h(a,"string",J,"toPortId");var c=this.kd;null!==c&&Cr(this.da,c);Pr(this);this.xi=a;var d=this.kd;null!==d&&Cr(this.da,d);var e=this.g;if(null!==e){var g=this.data,h=e.ga;null!==g&&h instanceof Y&&h.MB(g,a)}c!==d&&(this.Xi=null,this.gc(),g=this.dH,null!==g&&(h=!0,null!==e&&(h=e.ab,e.ab=!0),g(this,c,d),null!==e&&(e.ab=h)));Qr(this);this.i("toPortId",b,a)}}); +D.w(J,{kd:"toPort"},function(){var a=this.Rg;return null===a?null:a.lm(this.xi)});D.defineProperty(J,{dH:"toPortChanged"},function(){return this.It},function(a){var b=this.It;b!==a&&(null!==a&&D.h(a,"function",J,"toPortChanged"),this.It=a,this.i("toPortChanged",b,a))});D.defineProperty(J,{Gb:"fromSpot"},function(){return null!==this.Z?this.Z.jk:Vc},function(a){this.Wd();var b=this.Z.jk;b.P(a)||(v&&D.l(a,R,J,"fromSpot"),a=a.V(),this.Z.jk=a,this.i("fromSpot",b,a),this.gc())}); D.defineProperty(J,{om:"fromEndSegmentLength"},function(){return null!==this.Z?this.Z.hk:NaN},function(a){this.Wd();var b=this.Z.hk;b!==a&&(v&&D.h(a,"number",J,"fromEndSegmentLength"),0>a&&D.ua(a,">= 0",J,"fromEndSegmentLength"),this.Z.hk=a,this.i("fromEndSegmentLength",b,a),this.gc())}); D.defineProperty(J,{mu:"fromEndSegmentDirection"},function(){return null!==this.Z?this.Z.gk:xr},function(a){this.Wd();var b=this.Z.gk;b!==a&&(D.Pn("Link.fromEndSegmentDirection","2.0"),v&&D.Da(a,G,J,"fromEndSegmentDirection"),this.Z.gk=a,this.i("fromEndSegmentDirection",b,a),this.gc())}); D.defineProperty(J,{nu:"fromShortLength"},function(){return null!==this.Z?this.Z.ik:NaN},function(a){this.Wd();var b=this.Z.ik;b!==a&&(v&&D.h(a,"number",J,"fromShortLength"),this.Z.ik=a,this.i("fromShortLength",b,a),this.gc())});D.defineProperty(J,{Hb:"toSpot"},function(){return null!==this.Z?this.Z.Gk:Vc},function(a){this.Wd();var b=this.Z.Gk;b.P(a)||(v&&D.l(a,R,J,"toSpot"),a=a.V(),this.Z.Gk=a,this.i("toSpot",b,a),this.gc())}); D.defineProperty(J,{Dm:"toEndSegmentLength"},function(){return null!==this.Z?this.Z.Ek:NaN},function(a){this.Wd();var b=this.Z.Ek;b!==a&&(v&&D.h(a,"number",J,"toEndSegmentLength"),0>a&&D.ua(a,">= 0",J,"toEndSegmentLength"),this.Z.Ek=a,this.i("toEndSegmentLength",b,a),this.gc())}); D.defineProperty(J,{fv:"toEndSegmentDirection"},function(){return null!==this.Z?this.Z.Dk:xr},function(a){this.Wd();var b=this.Z.Dk;b!==a&&(D.Pn("Link.toEndSegmentDirection","2.0"),v&&D.Da(a,G,J,"toEndSegmentDirection"),this.Z.Dk=a,this.i("toEndSegmentDirection",b,a),this.gc())});D.defineProperty(J,{gv:"toShortLength"},function(){return null!==this.Z?this.Z.Fk:NaN},function(a){this.Wd();var b=this.Z.Fk;b!==a&&(v&&D.h(a,"number",J,"toShortLength"),this.Z.Fk=a,this.i("toShortLength",b,a),this.gc())}); -function wn(a){var b=a.aa,c=a.da;null!==b?null!==c?Rr(a,b.FI(c)):Rr(a,null):Rr(a,null)}function Rr(a,b){var c=a.sl;if(c!==b){null!==c&&rr(c,a);a.sl=b;null!==b&&sr(b,a);var d=a.TE;if(null!==d){var e=!0,g=a.g;null!==g&&(e=g.ab,g.ab=!0);d(a,c,b);null!==g&&(g.ab=e)}!a.lh||a.iE!==c&&a.jE!==c||a.gc()}}J.prototype.Vk=function(){var a=this.Pa;null!==a&&this.aa!==a&&this.da!==a&&a.wx&&F.prototype.Vk.call(this)}; -J.prototype.getOtherNode=J.prototype.RA=function(a){v&&D.l(a,G,J,"getOtherNode:node");var b=this.aa;return a===b?this.da:b};J.prototype.getOtherPort=function(a){v&&D.l(a,P,J,"getOtherPort:port");var b=this.Lc;return a===b?this.kd:b};D.w(J,{LL:"isLabeledLink"},function(){return null===this.Af?!1:0=d&&(h=d-1);var l=this.m(h-1),g=this.m(h);Ae(e.x,e.y,k.x,k.y,l.x,l.y,g.x,g.y,.5,a);b=Math.min(g.x,b);c=Math.min(g.y,c);e=g}else for(e=this.m(0),g=this.m(1),b=Math.min(e.x,g.x),c=Math.min(e.y,g.y),a.n(e.x,e.y,0,0),a.Ki(g),h=2;h=d&&(h=d-1);var l=this.m(h-1),g=this.m(h);Ae(e.x,e.y,k.x,k.y,l.x,l.y,g.x,g.y,.5,a);b=Math.min(g.x,b);c=Math.min(g.y,c);e=g}else for(e=this.m(0),g=this.m(1),b=Math.min(e.x,g.x),c=Math.min(e.y,g.y),a.n(e.x,e.y,0,0),a.Ji(g),h=2;hc&&(c=-c)):zb(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.Df(d)),g.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}D.Ba(g);b=this.m(h);g=this.m(h+1);b.x===g.x?b.y>g.y?a.n(b.x,b.y-(e/2-c)):a.n(b.x,b.y+(e/2-c)):b.y===g.y?b.x>g.x?a.n(b.x-(e/2-c),b.y):a.n(b.x+(e/2-c),b.y):(c=(e/2-c)/d,a.n(b.x+c*(g.x-b.x),b.y+c*(g.y-b.y)));return a};D.w(J,{gG:"midAngle"},function(){this.Ao();return this.computeMidAngle()}); +return a}e=0;g=D.tb();for(h=0;hc&&(c=-c)):zb(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.Df(d)),g.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}D.Ba(g);b=this.m(h);g=this.m(h+1);b.x===g.x?b.y>g.y?a.n(b.x,b.y-(e/2-c)):a.n(b.x,b.y+(e/2-c)):b.y===g.y?b.x>g.x?a.n(b.x-(e/2-c),b.y):a.n(b.x+(e/2-c),b.y):(c=(e/2-c)/d,a.n(b.x+c*(g.x-b.x),b.y+c*(g.y-b.y)));return a};D.w(J,{gG:"midAngle"},function(){this.zo();return this.computeMidAngle()}); J.prototype.computeMidAngle=function(){var a=this.ta;if(2>a)return NaN;if(this.computeCurve()===Sj&&4<=a&&!this.rc){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),b=this.m(c),d=this.m(c+1),a=this.m(c+2),c=this.m(c+3),e=d.x,d=d.y,g=a.x,a=a.y,h=(e+g)/2,k=(d+a)/2;return rb(((b.x+e)/2+h)/2,((b.y+d)/2+k)/2,(h+(g+c.x)/2)/2,(k+(a+c.y)/2)/2)}if(0e+10))?e>c+10?d.Yb(a):b.Yb(a):b.Yb(d);b=this.m(c-1);d=this.m(c);a=this.m(c+1);c=b.Df(d);e=d.Df(a);return c>e+10?b.Yb(d):e>c+10?d.Yb(a):b.Yb(a)}; D.defineProperty(J,{points:"points"},function(){return this.bd},function(a){var b=this.bd;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var e=0;em&&(p=-p),u=(0>l?-1:1)*p+r,t=n*(u- -r)+s);var r=h.x+2*k/3,s=h.y+2*l/3,y=r,w=s;Q(l,0)?w=0l?-1:1)*p+r,w=n*(y-r)+s);this.cq();this.Ai(h);this.yj(u,t);this.yj(y,w);this.Ai(q);this.fh(0,this.getLinkPoint(b,c,d,!0,!1,e,g));this.fh(3,this.getLinkPoint(e,g,a,!1,!1,b,c))}else d=this.getLinkPoint(b,c,d,!0,!1,e,g),a=this.getLinkPoint(e,g,a,!1,!1,b,c),this.hasCurviness()?(q=a.x-d.x,e=a.y-d.y,g=this.computeCurviness(),b=d.x+q/2,c=d.y+e/2,h=b,k=c,Q(e,0)?k=0g&&(h=-h),h=(0>e?-1:1)*h+b, -k=q*(h-b)+c),this.Ai(d),this.yj(h,k)):this.Ai(d),this.Ai(a)}else{p=this.Oh;q&&(n&&p||m)&&this.cq();var C=m?this.computeCurviness():0,p=this.getLinkPoint(b,c,d,!0,n,e,g),r=u=s=0;if(n||!k||m)if(t=this.computeEndSegmentLength(b,c,d,!0),r=this.getLinkDirection(b,c,p,d,!0,n,e,g),m&&(k||d.P(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(r-=n?90:30,0>C&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),m&&(t+=Math.abs(C)*(n?1:2)),0===r?s=t:90===r?u=t:180===r?s=-t:270===r?u=-t:(s=t*Math.cos(r*Math.PI/180),u=t*Math.sin(r*Math.PI/ +J.prototype.insertPointAt=J.prototype.B=function(a,b,c){v&&(D.p(b,J,"insertPointAt:x"),D.p(c,J,"insertPointAt:y"));null===this.cf&&D.k("Call Link.startRoute before modifying the points of the route.");this.bd.Xd(a,new O(b,c))};J.prototype.addPoint=J.prototype.zi=function(a){v&&(D.l(a,O,J,"addPoint"),a.F()||D.k("Link.addPoint called with a Point that does not have real numbers: "+a.toString()));null===this.cf&&D.k("Call Link.startRoute before modifying the points of the route.");this.bd.add(a)}; +J.prototype.addPointAt=J.prototype.xj=function(a,b){v&&(D.p(a,J,"insertPointAt:x"),D.p(b,J,"insertPointAt:y"));null===this.cf&&D.k("Call Link.startRoute before modifying the points of the route.");this.bd.add(new O(a,b))};J.prototype.removePoint=J.prototype.yG=function(a){null===this.cf&&D.k("Call Link.startRoute before modifying the points of the route.");this.bd.jd(a)}; +J.prototype.clearPoints=J.prototype.bq=function(){null===this.cf&&D.k("Call Link.startRoute before modifying the points of the route.");this.bd.clear()};J.prototype.movePoints=J.prototype.$k=function(a,b){for(var c=new K(O),d=this.bd.j;d.next();){var e=d.value;c.add((new O(e.x+a,e.y+b)).freeze())}c.freeze();d=this.bd;this.bd=c;this.K();Tr(this);e=this.g;null!==e&&e.Xa.wc&&(this.Jp=c);this.i("points",d,c)};J.prototype.startRoute=J.prototype.ym=function(){null===this.cf&&(this.cf=this.bd,this.bd=this.bd.copy())}; +J.prototype.commitRoute=J.prototype.Aj=function(){if(null!==this.cf){for(var a=this.cf,b=this.bd,c=Infinity,d=Infinity,e=a.o,g=e.length,h=0;hm&&(p=-p),u=(0>l?-1:1)*p+r,t=n*(u- +r)+s);var r=h.x+2*k/3,s=h.y+2*l/3,y=r,w=s;Q(l,0)?w=0l?-1:1)*p+r,w=n*(y-r)+s);this.bq();this.zi(h);this.xj(u,t);this.xj(y,w);this.zi(q);this.fh(0,this.getLinkPoint(b,c,d,!0,!1,e,g));this.fh(3,this.getLinkPoint(e,g,a,!1,!1,b,c))}else d=this.getLinkPoint(b,c,d,!0,!1,e,g),a=this.getLinkPoint(e,g,a,!1,!1,b,c),this.hasCurviness()?(q=a.x-d.x,e=a.y-d.y,g=this.computeCurviness(),b=d.x+q/2,c=d.y+e/2,h=b,k=c,Q(e,0)?k=0g&&(h=-h),h=(0>e?-1:1)*h+b, +k=q*(h-b)+c),this.zi(d),this.xj(h,k)):this.zi(d),this.zi(a)}else{p=this.Jj;q&&(n&&p||m)&&this.bq();var C=m?this.computeCurviness():0,p=this.getLinkPoint(b,c,d,!0,n,e,g),r=u=s=0;if(n||!k||m)if(t=this.computeEndSegmentLength(b,c,d,!0),r=this.getLinkDirection(b,c,p,d,!0,n,e,g),m&&(k||d.P(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(r-=n?90:30,0>C&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),m&&(t+=Math.abs(C)*(n?1:2)),0===r?s=t:90===r?u=t:180===r?s=-t:270===r?u=-t:(s=t*Math.cos(r*Math.PI/180),u=t*Math.sin(r*Math.PI/ 180)),d.Zd()&&m){var A=c.eb(hc,D.O()),N=D.Fb(A.x+1E3*s,A.y+1E3*u);this.getLinkPointFromPoint(b,c,A,N,!0,p);D.A(A);D.A(N)}var t=this.getLinkPoint(e,g,a,!1,n,b,c),H=w=y=0;if(n||!l||m)A=this.computeEndSegmentLength(e,g,a,!1),H=this.getLinkDirection(e,g,t,a,!1,n,b,c),m&&(l||d.P(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(H+=n?0:30,0>C&&(H+=180)),0>H?H+=360:360<=H&&(H-=360),m&&(A+=Math.abs(C)*(n?1:2)),0===H?y=A:90===H?w=A:180===H?y=-A:270===H?w=-A:(y=A*Math.cos(H*Math.PI/180),w=A*Math.sin(H*Math.PI/180)),a.Zd()&& -m&&(A=g.eb(hc,D.O()),N=D.Fb(A.x+1E3*y,A.y+1E3*w),this.getLinkPointFromPoint(e,g,A,N,!1,t),D.A(A),D.A(N));a=p;if(n||!k||m)a=new O(p.x+s,p.y+u);d=t;if(n||!l||m)d=new O(t.x+y,t.y+w);!q&&!n&&k&&3Math.abs(b.y-a.y)?(b.x=b.x>=a.x?a.x+9E9:a.x-9E9,b.y=a.y):(b.y=b.y>=a.y?a.y+9E9:a.y-9E9,b.x=a.x);return b} -J.prototype.getLinkPointFromPoint=function(a,b,c,d,e,g){void 0===g&&(g=new O);if(null===a||null===b)return g.assign(c),g;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var h=e=0,k=0,l=0;a=null;e=b.Q;null===e||e.kh()||(e=e.Q);if(null===e)e=d.x,h=d.y,k=c.x,l=c.y;else{a=e.Hh;e=1/(a.m11*a.m22-a.m12*a.m21);var k=a.m22*e,l=-a.m12*e,m=-a.m21*e,n=a.m11*e,p=e*(a.m21*a.dy-a.m22*a.dx),q=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*k+d.y*m+p;h=d.x*l+d.y*n+q;k=c.x*k+c.y*m+p;l=c.x*l+c.y*n+q}b.Vn(e,h,k,l, +J.prototype.getLinkPointFromPoint=function(a,b,c,d,e,g){void 0===g&&(g=new O);if(null===a||null===b)return g.assign(c),g;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var h=e=0,k=0,l=0;a=null;e=b.Q;null===e||e.kh()||(e=e.Q);if(null===e)e=d.x,h=d.y,k=c.x,l=c.y;else{a=e.Hh;e=1/(a.m11*a.m22-a.m12*a.m21);var k=a.m22*e,l=-a.m12*e,m=-a.m21*e,n=a.m11*e,p=e*(a.m21*a.dy-a.m22*a.dx),q=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*k+d.y*m+p;h=d.x*l+d.y*n+q;k=c.x*k+c.y*m+p;l=c.x*l+c.y*n+q}b.Un(e,h,k,l, g);null!==a&&g.transform(a);return g};function Yr(a,b){var c=b.Xs;null===c&&(c=new Zr,c.port=b,c.Wc=b.Y,b.Xs=c);return $r(c,a)} -J.prototype.getLinkPoint=function(a,b,c,d,e,g,h,k){void 0===k&&(k=new O);if(c.fd())return b.eb(c,k),k;if(c.Lj()){var l=Yr(this,b);if(null!==l){k.assign(l.Aq);if(e&&this.Cy===Or){var m=Yr(this,h);if(null!==m&&l.Mn=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.Jj(vc)||c.Jj(Bc))&&a.x>=n.x&&a.x<=n.x+n.width&&(k.x=a.x);D.A(l);D.A(m)}}return k}}c=b.eb(hc,D.O());l=g=null;this.ta> +J.prototype.getLinkPoint=function(a,b,c,d,e,g,h,k){void 0===k&&(k=new O);if(c.fd())return b.eb(c,k),k;if(c.Lj()){var l=Yr(this,b);if(null!==l){k.assign(l.Aq);if(e&&this.Cy===Or){var m=Yr(this,h);if(null!==m&&l.Mn=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.Ij(vc)||c.Ij(Bc))&&a.x>=n.x&&a.x<=n.x+n.width&&(k.x=a.x);D.A(l);D.A(m)}}return k}}c=b.eb(hc,D.O());l=g=null;this.ta> (e?6:2)?(l=d?this.m(1):this.m(this.ta-2),e&&(l=Xr(c,l.copy()))):(g=D.O(),l=h.eb(hc,g),e&&(l=Xr(c,l)),D.A(g));this.getLinkPointFromPoint(a,b,c,l,d,k);D.A(c);return k}; J.prototype.getLinkDirection=function(a,b,c,d,e,g,h,k){a:if(d.fd())c=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(g?6:2)?(n=e?this.m(1):this.m(this.ta-2),n=g?Xr(l,n.copy()):c):(m=D.O(),n=k.eb(hc,m),D.A(m));c=0;c=Math.abs(n.x-l.x)>Math.abs(n.y- -l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;D.A(l)}d.Zd()&&h.Ei(a)&&(c+=180,360<=c&&(c-=360));a=xr;a=e?this.mu:this.fv;a===xr&&(a=e?b.mu:b.fv);switch(a){case yr:b=b.Tn();c+=b;360<=c&&(c-=360);break;case xr:case Do:b=b.Tn();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c}; +l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;D.A(l)}d.Zd()&&h.Di(a)&&(c+=180,360<=c&&(c-=360));a=xr;a=e?this.mu:this.fv;a===xr&&(a=e?b.mu:b.fv);switch(a){case yr:b=b.pm();c+=b;360<=c&&(c-=360);break;case xr:case Do:if(d.mJ())break;b=b.pm();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c}; J.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Lj()&&(a=Yr(this,b),null!==a))return a.Fx;a=NaN;a=d?this.om:this.Dm;null!==b&&isNaN(a)&&(a=d?b.om:b.Dm);isNaN(a)&&(a=10);return a};J.prototype.computeSpot=function(a){return a?Vr(this,this.Lc):Wr(this,this.kd)};function Vr(a,b){if(null===b)return hc;var c=a.Gb;c.ed()&&null!==b&&(c=b.Gb);return c===Vc?cc:c}function Wr(a,b){if(null===b)return hc;var c=a.Hb;c.ed()&&null!==b&&(c=b.Hb);return c===Vc?cc:c} J.prototype.computeOtherPoint=function(a,b){var c=b.eb(hc),d;d=b.Xs;d=null!==d?$r(d,this):null;null!==d&&(c=d.Aq);return c};J.prototype.computeShortLength=function(a){if(a){if(a=this.nu,isNaN(a)){var b=this.Lc;null!==b&&(a=b.nu)}}else a=this.gv,isNaN(a)&&(b=this.kd,null!==b&&(a=b.gv));return isNaN(a)?0:a}; -J.prototype.Qk=function(a,b,c,d,e,g){if(!1===this.qg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=D.Pf(),h.reset());h.multiply(this.transform);if(this.Jn(a,h))return eq(this,b,c,e),void 0===g&&D.He(h),!0;if(this.fg(a,h)){var k=!1;if(!this.$n)for(var l=this.ya.o,m=l.length;m--;){var n=l[m];if(n.visible||n===this.vf){var p=n.$,q=this.Ga;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=D.Pf();p.set(h);if(n instanceof x)k=n.Qk(a,b,c,d,e,p);else if(this.path=== +J.prototype.Qk=function(a,b,c,d,e,g){if(!1===this.qg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=D.Pf(),h.reset());h.multiply(this.transform);if(this.Jn(a,h))return eq(this,b,c,e),void 0===g&&D.He(h),!0;if(this.fg(a,h)){var k=!1;if(!this.Zn)for(var l=this.ya.o,m=l.length;m--;){var n=l[m];if(n.visible||n===this.vf){var p=n.$,q=this.Ga;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=D.Pf();p.set(h);if(n instanceof x)k=n.Qk(a,b,c,d,e,p);else if(this.path=== n){if(n instanceof z){var k=n,r=a,s=d,q=p;if(!1===k.qg)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,t=q;if(k.Jn(u,t))k=!0;else{if(void 0===t&&(t=k.transform,u.Nk(k.$))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,y=D.O(),w=D.O(),C=D.O(),A=D.Pf();A.set(t);A.pB(k.transform);A.Sx();w.x=r;w.y=s;w.transform(A);y.x=q;y.y=s;y.transform(A);t=!1;rq(k,y,w,C)?t=!0:(y.x=r,y.y=u,y.transform(A),rq(k,y,w,C)?t=!0:(w.x=q,w.y=u,w.transform(A),rq(k,y,w,C)?t=!0:(y.x=q,y.y=s,y.transform(A),rq(k,y,w,C)&& -(t=!0))));D.He(A);D.A(y);D.A(w);D.A(C);k=t}}else k=k.Jn(r,q)}}else k=Jo(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&(e instanceof L&&e.add(n),e instanceof K&&e.add(n)));D.He(p)}}}void 0===g&&D.He(h);return k||null!==this.background||null!==this.$l}void 0===g&&D.He(h);return!1};D.w(J,{rc:"isOrthogonal"},function(){return 2===(this.mn.value&2)});D.w(J,{Oh:"isAvoiding"},function(){return 4===(this.mn.value&4)}); -J.prototype.computeCurve=function(){if(null===this.Yi){var a=this.Lc,b=this.rc;this.Yi=null!==a&&a===this.kd&&!b}return this.Yi?Sj:this.gf};J.prototype.computeCorner=function(){if(this.gf===Sj)return 0;var a=this.BA;if(isNaN(a)||0>a)a=10;return a};J.prototype.findMidLabel=function(){for(var a=this.path,b=this.ya.o,c=b.length,d=0;da)a=10;return a};J.prototype.findMidLabel=function(){for(var a=this.path,b=this.ya.o,c=b.length,d=0;dl?-Math.PI/2:Math.PI/2:(n=Math.atan(l/Math.abs(k)),0>k&&(n=Math.PI-n));var h=b.x,p=b.y,l=d.x-h,q=d.y-p,r=Math.sqrt(l*l+q*q),k=0;zb(l,0)?k=0>q?-Math.PI/2:Math.PI/2:(k=Math.atan(q/Math.abs(l)),0>l&&(k=Math.PI-k));m=r/m;n=k-n;this.fh(a,b);for(a+= 1;al?-Math.PI/2:Math.PI/2:(q=Math.atan(l/Math.abs(k)),0>k&&(q=Math.PI-q)),k=q+n,b*=m,this.ia(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.fh(c,d)}}return!0;case Nr:g=this.m(a);p=this.m(c);if(!g.Tc(b)||!p.Tc(d)){var e=g.x,g=g.y,h=p.x,p=p.y,m=(h-e)*(h-e)+(p-g)*(p-g),k=b.x,n=b.y,l=d.x,q=d.y,r=0,s=1;0!==l-k?(r=(q-n)/(l-k),s=Math.sqrt(1+1/(r*r))):r=9E9;this.fh(a,b);for(a+=1;ab?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=-45<=d&&45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.$.copy(),k=g.$.copy();if(h.F()&&k.F()){h.Ff(8,8);k.Ff(8,8);h.Ki(a);k.Ki(c);var l,m;if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l=new O(c.x,a.y),m=new O(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x,c.x,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xb?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=-45<=d&&45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.$.copy(),k=g.$.copy();if(h.F()&&k.F()){h.Ff(8,8);k.Ff(8,8);h.Ji(a);k.Ji(c);var l,m;if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l=new O(c.x,a.y),m=new O(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x,c.x,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.Oa(a)||h.Oa(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new O(Math.max((a.x+c.x)/2,a.x),a.y),m=new O(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,k.right,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.left,m.x=l.x,m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.yh.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new O(a.x,Math.max((a.y+c.y)/2,a.y)),m=new O(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.y,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.y,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.Oa(a)||h.Oa(c))?l.x=this.computeMidOrthoPosition(a.x, c.x,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new O(a.x,Math.min((a.y+c.y)/2,a.y)),m=new O(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xk&&0!==cs(s,c.x,c.y)){ds(this,s,c.x,c.y,d,!0);h=this.m(2);if(4>this.ta)0===b||180=== +q.y,q.x+q.width,q.y+q.height,n.x,n.y,a.x,a.y,t)&&(u=c=t.copy(),d=a.Yb(t)));D.A(t)}h=h.copy().Wh(k);h.Ff(2*s.Fn,2*s.En);bs(s,a,b,c,d,h);k=cs(s,c.x,c.y);!s.abort&&999999<=k&&(Mn(s),k=s.VG,h.Ff(s.Fn*k,s.En*k),bs(s,a,b,c,d,h),k=cs(s,c.x,c.y));!s.abort&&999999<=k&&(Mn(s),k=s.bG,h.Ff(s.Fn*k,s.En*k),bs(s,a,b,c,d,h),k=cs(s,c.x,c.y));!s.abort&&999999<=k&&s.mH&&(Mn(s),bs(s,a,b,c,d,s.mb),k=cs(s,c.x,c.y));if(!s.abort&&999999>k&&0!==cs(s,c.x,c.y)){ds(this,s,c.x,c.y,d,!0);h=this.m(2);if(4>this.ta)0===b||180=== b?(h.x=a.x,h.y=c.y):(h.x=c.x,h.y=a.y),this.ia(2,h.x,h.y),this.B(3,h.x,h.y);else if(c=this.m(3),0===b||180===b)Q(h.x,c.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.ia(2,h,a.y),this.ia(3,h,c.y)):Q(h.y,c.y)?(Math.abs(a.y-h.y)<=s.En/2&&(this.ia(2,h.x,a.y),this.ia(3,c.x,a.y)),this.B(2,h.x,a.y)):this.ia(2,a.x,h.y);else if(90===b||270===b)Q(h.y,c.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.ia(2,a.x,h),this.ia(3,c.x,h)):Q(h.x,c.x)?(Math.abs(a.x-h.x)<=s.Fn/2&&(this.ia(2,a.x,h.y),this.ia(3, -a.x,c.y)),this.B(2,a.x,h.y)):this.ia(2,h.x,a.y);null!==r&&(a=this.m(1),c=this.m(2),a.x!==c.x&&a.y!==c.y?0===b||180===b?this.B(2,a.x,c.y):this.B(2,c.x,a.y):0===b||180===b?this.B(2,e.x,r.y):this.B(2,r.x,e.y));null!==u&&(0===d||180===d?this.yj(g.x,u.y):this.yj(u.x,g.y));b=!0}else b=!1}}}else b=!1;b||(this.Ai(l),this.Ai(m))}};J.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2}; -function Mi(a){if(null===a.g||!a.Oh)return!1;var b=a.points.o,c=b.length;if(4>c)return!1;a=ha(a.g,!0,a.Pa,null);for(var d=1;dc)return!1;a=ha(a.g,!0,a.Ra,null);for(var d=1;da)return new Ye(qf);var b=!1,c=this.g;null!==c&&Sr(this)&&c.ul.contains(this)&&null!==this.Kw&&(b=!0);var d=c=0,e=this.m(0).copy(),g=e.copy(),c=this.bd.o,h=this.computeCurve();if(h===Sj&&3<=a&&!zb(this.Sq,0))if(3===a)var k=this.m(1),c=Math.min(e.x,k.x),d=Math.min(e.y,k.y),k=this.m(2),c=Math.min(c,k.x),d=Math.min(d,k.y);else{if(this.rc)for(k=0;k=a&&(k=a-1),c=this.m(k), g.x=Math.min(c.x,g.x),g.y=Math.min(c.y,g.y);c=g.x;d=g.y}else{for(k=0;k=e)retur function hs(a,b,c,d,e,g,h){if(!h&&Sr(a)){h=[];var k=0;a.isVisible()&&(k=is(a,e,g,h));var l=e.x,l=e.y;if(0p-10)m--,p=Math.max(q-5,g.x);else break;q=g.y-10+d;n=p+c;p=g.y+d;a.gf===tj?T(b,n,p,!1,!1):V(b,l,q,n,q,n,p)}else if(Q(e.x,g.x))if(e.yp-10)m--,p=Math.max(q-5,g.y);else break;q=g.x-10+c;n=g.x+c;p+=d;a.gf===tj?T(b,n,p,!1,!1):V(b,q,l,q,p,n,p)}}b.lineTo(g.x+c,g.y+d)} -function is(a,b,c,d){var e=a.g;if(null===e||b.P(c))return 0;for(e=e.co;e.next();){var g=e.value;if(null!==g&&g.visible)for(var g=g.qb.o,h=g.length,k=0;kh.x&&n.x>m.x||m.xh.y&&n.y>m.y||m.yu&&Math.min(h,y)q&&!Q(h,y)){n.x=u;n.y=q;n=!0;break a}}else if(!Q(q,s)&&Q(h,y)&&Math.min(q,s)h&&Math.min(u,t)p&&!Q(u,t)){n.x=p;n.y=h;n=!0;break a}n.x=0;n.y=0;n=!1}n&&(e?c.push(k.x):c.push(k.y));h=m}D.A(k)}D.w(J,{iu:"firstPickIndex"},function(){var a;2>=this.ta?a=0:((a=this.rc)||(a=this.computeSpot(!0)!==cc),a=a?1:0);return a});D.w(J,{ey:"lastPickIndex"},function(){var a=this.ta;if(0===a)a=0;else if(2>=a)a-=1;else{var b;(b=this.rc)||(b=this.computeSpot(!1)!==cc);a=b?a-2:a-1}return a});function Sr(a){a=a.gf;return a===sj||a===tj} -function Ur(a,b){if(b||Sr(a)){var c=a.g;null===c||c.ul.contains(a)||null===a.Kw||c.ul.add(a,a.Kw)}}function Bj(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Uc){var d=c.g;if(null!==d)for(var e=!1,d=d.co;d.next();){var g=d.value;if(g.visible)if(g===c)for(var e=!0,h=!1,g=g.qb.o,k=g.length,l=0;l=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Wf=Math.floor((a.x-this.ce)/this.ce)*this.ce;this.Xf=Math.floor((b-this.Md)/this.Md)*this.Md;this.ws=Math.ceil((c+2*this.ce)/this.ce)*this.ce;this.xs=Math.ceil((d+2*this.Md)/this.Md)*this.Md;a=1+(Math.ceil((this.ws-this.Wf)/this.ce)|0);b=1+(Math.ceil((this.xs-this.Xf)/this.Md)|0);if(null===this.nd||this.ynthis.ws||a+cthis.xs||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.yn)|0;for(c=Math.min(b+e-1,this.zn)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.nd[a][e])return!1;return!0}; +Kn.prototype.zq=function(a,b,c,d){if(a>this.ws||a+cthis.xs||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.yn)|0;for(c=Math.min(b+e-1,this.zn)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.nd[a][e])return!1;return!0}; function ls(a,b,c,d,e,g,h,k,l){if(!(bh||cl)){var m,n;m=b|0;n=c|0;var p=a.nd[m][n];if(1<=p&&999999>p)for(e?n+=d:m+=d,p+=1;g<=m&&m<=h&&k<=n&&n<=l&&!(p>=a.nd[m][n]);)a.nd[m][n]=p,p+=1,e?n+=d:m+=d;m=e?n:m;if(e)if(0m;c+=d)ls(a,b,c,1,!e,g,h,k,l),ls(a,b,c,-1,!e,g,h,k,l);else if(0m;b+=d)ls(a,b,c,1,!e,g,h,k,l),ls(a,b,c,-1,!e,g,h, k,l)}}function ms(a,b,c,d,e,g,h,k,l){b|=0;c|=0;var m=0,n=1;for(a.nd[b][c]=n;0===m&&b>g&&bk&&cg&&bk&&c=Math.abs(h-b)&&1>=Math.abs(k-d))a.abort=!0;else{var l=g.x,m=g.y,n=g.x+g.width,p=g.y+g.height,l=l-a.Wf,l=l/a.ce,m=m-a.Xf,m=m/a.Md,n=n-a.Wf,n=n/a.ce,p=p-a.Xf,p=p/a.Md;g=Math.max(0,Math.min(a.yn,l|0));n=Math.min(a.yn,Math.max(0,n|0));m=Math.max(0,Math.min(a.zn,m|0));p=Math.min(a.zn,Math.max(0,p|0));h|=0;k|=0;b|=0;d|=0;l=0===c|| 90===c?1:-1;c=90===c||270===c;0===a.nd[h][k]?(ms(a,h,k,l,c,g,n,m,p),ms(a,h,k,1,!c,g,n,m,p),ms(a,h,k,-1,!c,g,n,m,p)):ms(a,h,k,l,c,h,k,h,k);0===a.nd[b][d]?(ns(a,b,d,0===e||90===e?1:-1,90===e||270===e,g,n,m,p),ns(a,b,d,1,!(90===e||270===e),g,n,m,p),ns(a,b,d,-1,!(90===e||270===e),g,n,m,p)):ns(a,b,d,l,c,b,d,b,d);a.abort||(ls(a,h,k,1,!1,g,n,m,p),ls(a,h,k,-1,!1,g,n,m,p),ls(a,h,k,1,!0,g,n,m,p),ls(a,h,k,-1,!0,g,n,m,p))}}}function Zr(){D.uc(this);this.port=this.Wc=null;this.lg=[];this.Cq=!1} D.ke(Zr,{Wc:!0,port:!0,lg:!0,Cq:!0});Zr.prototype.toString=function(){for(var a=this.lg,b=this.Wc.toString()+" "+a.length.toString()+":",c=0;c=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case D.Zc|D.wd:return c>a&&c<=180+a?180:270;case D.wd|D.md:return c>180-a&&c<=360-a?270:0;case D.md|D.ld:return c>a&&c<=180+a?90:0;case D.ld|D.Zc:return c>180-a&&c<=360-a?180:90;case D.Zc|D.wd|D.md:return 90180+a&&c<=360- -a?270:0;case D.wd|D.md|D.ld:return 180a&&180>=c?90:0;case D.md|D.ld|D.Zc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case D.ld|D.Zc|D.wd:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(D.Zc|D.wd|D.md|D.ld)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Zr.prototype.vq=function(){this.lg.length=0}; -function $r(a,b){var c=a.lg;if(0===c.length){a:if(!a.Cq){c=a.Cq;a.Cq=!0;var d,e=null,g=a.Wc,g=g instanceof I?g:null;if(null===g||g.Je)d=a.Wc.oF(a.port.ud);else{if(!g.$.F()){a.Cq=c;break a}e=g;d=e.nF()}var h=a.lg.length=0,k=a.port.eb(dc,D.O()),l=a.port.eb(uc,D.O()),g=D.sg(k.x,k.y,0,0);g.Ki(l);D.A(k);D.A(l);k=D.Fb(g.x+g.width/2,g.y+g.height/2);for(d=d.j;d.next();)if(l=d.value,l.isVisible()){var m=l.Lc===a.port||l.aa.Ei(e),n=l.computeSpot(m);if(n.Lj()&&(m=m?l.kd:l.Lc,null!==m)){var p=m.Y;if(null!==p){var m= -l.computeOtherPoint(p,m),p=k.Yb(m),n=os(g,n,p,l.rc),q=0;0===n?(q=D.md,180Math.abs(H)?(C=Math.abs(H)/ -q,q=Math.abs(H)):C=1;break;case D.Zc:r>Math.abs(N)?(C=Math.abs(N)/r,r=Math.abs(N)):C=1;break;case D.wd:m>Math.abs(H)?(C=Math.abs(H)/m,m=Math.abs(H)):C=1;break;default:case D.md:p>Math.abs(N)?(C=Math.abs(N)/p,p=Math.abs(N)):C=1}w=0}var W=u.Aq;if(e===zr){t=u.link.computeThickness();t*=C;W.set(A);switch(y){case D.ld:W.x=A.x+H/2+q/2-w-t/2;break;case D.Zc:W.y=A.y+N/2+r/2-w-t/2;break;case D.wd:W.x=A.x+H/2-m/2+w+t/2;break;default:case D.md:W.y=A.y+N/2-p/2+w+t/2}w+=t}else t=.5,e===wr&&(t=(u.sq+1)/(u.Mn+1)), -W.x=A.x+H*t,W.y=A.y+N*t}D.A(k);D.A(d);D.A(l);D.A(n);A=a.lg;for(H=0;Hb.Ke?1:a.angleb.angle?1:0}; -Zr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Wc,this.port,cc,b.Lc===this.port),d=a.sq;if(0>d)return c;var e=a.Mn;if(1>=e||!b.rc)return c;var b=a.py,g=a.Aq;if(a.Ke===D.Zc||a.Ke===D.ld)d=e-1-d;return((a=a.Ke===D.Zc||a.Ke===D.md)?b.ya&&180>=c?90:0;case D.md|D.ld|D.Zc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case D.ld|D.Zc|D.wd:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(D.Zc|D.wd|D.md|D.ld)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Zr.prototype.uq=function(){this.lg.length=0}; +function $r(a,b){var c=a.lg;if(0===c.length){a:if(!a.Cq){c=a.Cq;a.Cq=!0;var d,e=null,g=a.Wc,g=g instanceof I?g:null;if(null===g||g.Je)d=a.Wc.oF(a.port.ud);else{if(!g.$.F()){a.Cq=c;break a}e=g;d=e.nF()}var h=a.lg.length=0,k=a.port.eb(dc,D.O()),l=a.port.eb(uc,D.O()),g=D.sg(k.x,k.y,0,0);g.Ji(l);D.A(k);D.A(l);k=D.Fb(g.x+g.width/2,g.y+g.height/2);l=a.port.pm();for(d=d.j;d.next();){var m=d.value;if(m.isVisible()){var n=m.Lc===a.port||m.aa.Di(e),p=m.computeSpot(n);if(p.Lj()&&(n=n?m.kd:m.Lc,null!==n)){var q= +n.Y;if(null!==q){n=m.computeOtherPoint(q,n);q=k.Yb(n);q-=l;0>q&&(q+=360);var p=os(g,p,q,m.rc),r=0;0===p?(r=D.md,180 +Math.abs(H)?(C=Math.abs(H)/q,q=Math.abs(H)):C=1;break;case D.Zc:r>Math.abs(N)?(C=Math.abs(N)/r,r=Math.abs(N)):C=1;break;case D.wd:p>Math.abs(H)?(C=Math.abs(H)/p,p=Math.abs(H)):C=1;break;default:case D.md:n>Math.abs(N)?(C=Math.abs(N)/n,n=Math.abs(N)):C=1}w=0}var W=u.Aq;if(e===zr){t=u.link.computeThickness();t*=C;W.set(A);switch(y){case D.ld:W.x=A.x+H/2+q/2-w-t/2;break;case D.Zc:W.y=A.y+N/2+r/2-w-t/2;break;case D.wd:W.x=A.x+H/2-p/2+w+t/2;break;default:case D.md:W.y=A.y+N/2-n/2+w+t/2}w+=t}else t=.5, +e===wr&&(t=(u.rq+1)/(u.Mn+1)),W.x=A.x+H*t,W.y=A.y+N*t}D.A(k);D.A(l);D.A(d);D.A(m);A=a.lg;for(H=0;Hb.Ke?1:a.angleb.angle?1:0}; +Zr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Wc,this.port,cc,b.Lc===this.port),d=a.rq;if(0>d)return c;var e=a.Mn;if(1>=e||!b.rc)return c;var b=a.py,g=a.Aq;if(a.Ke===D.Zc||a.Ke===D.ld)d=e-1-d;return((a=a.Ke===D.Zc||a.Ke===D.md)?b.ye&&(e=k.right);k.bottom>g&&(g=k.bottom)}}isFinite(c)&&isFinite(d)?a.n(c,d,e-c,g-d):(b=b.location,c=this.padding,a.n(b.x+c.left,b.y+c.top,0,0));return a}; -D.defineProperty(Wj,{padding:"padding"},function(){return this.of},function(a){"number"===typeof a?a=new Ib(a):D.l(a,Ib,Wj,"padding");var b=this.of;b.P(a)||(this.of=a=a.V(),this.i("padding",b,a))});function Wg(){0=c-1?(h=0,e=d,g+=k+20,k=0):h++}null!==a&&a.Td("Layout")}this.If=!0};Wg.prototype.oo=function(a){return!a.location.F()||a instanceof I&&a.oo?!0:!1}; -function ss(a,b,c,d,e,g,h,k){for(c=c.j;c.next();){var l=c.value;d&&!l.yq||null!==e&&!e(l)||!l.canLayout()||(g&&l instanceof G?l.uf||(l instanceof I?null===l.Vb?ss(a,b,l.Nc,!1,e,g,h,k):(ts(l),b.add(l)):(ts(l),b.add(l))):h&&l instanceof J?b.add(l):!k||!l.oe()||l instanceof G||(ts(l),b.add(l)))}}function ts(a){var b=a.$;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.hf()} -Wg.prototype.collectParts=Wg.prototype.bI=function(a){var b=new L(F);a instanceof E?(ss(this,b,a.og,!0,null,!0,!0,!0),ss(this,b,a.links,!0,null,!0,!0,!0),ss(this,b,a.Gi,!0,null,!0,!0,!0)):a instanceof I?ss(this,b,a.Nc,!1,null,!0,!0,!0):ss(this,b,a.j,!1,null,!0,!0,!0);return b};D.defineProperty(Wg,{Ae:"arrangementOrigin"},function(){return this.fr},function(a){D.l(a,O,Wg,"arrangementOrigin");this.fr.P(a)||(this.fr.assign(a),this.N())}); +Wg.prototype.doLayout=function(a){null===a&&D.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");var b=new L(F);a instanceof E?(ss(this,b,a.og,!0,this.no,!0,!1,!0),ss(this,b,a.Fi,!0,this.no,!0,!1,!0)):a instanceof I?ss(this,b,a.Nc,!1,this.no,!0,!1,!0):b.Sc(a.j);var c=b.count;if(0=c-1?(h=0,e=d,g+=k+20,k=0):h++}null!==a&&a.Td("Layout")}this.If=!0};Wg.prototype.no=function(a){return!a.location.F()||a instanceof I&&a.no?!0:!1}; +function ss(a,b,c,d,e,g,h,k){for(c=c.j;c.next();){var l=c.value;d&&!l.xq||null!==e&&!e(l)||!l.canLayout()||(g&&l instanceof G?l.uf||(l instanceof I?null===l.Vb?ss(a,b,l.Nc,!1,e,g,h,k):(ts(l),b.add(l)):(ts(l),b.add(l))):h&&l instanceof J?b.add(l):!k||!l.oe()||l instanceof G||(ts(l),b.add(l)))}}function ts(a){var b=a.$;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.hf()} +Wg.prototype.collectParts=Wg.prototype.bI=function(a){var b=new L(F);a instanceof E?(ss(this,b,a.og,!0,null,!0,!0,!0),ss(this,b,a.links,!0,null,!0,!0,!0),ss(this,b,a.Fi,!0,null,!0,!0,!0)):a instanceof I?ss(this,b,a.Nc,!1,null,!0,!0,!0):ss(this,b,a.j,!1,null,!0,!0,!0);return b};D.defineProperty(Wg,{Ae:"arrangementOrigin"},function(){return this.fr},function(a){D.l(a,O,Wg,"arrangementOrigin");this.fr.P(a)||(this.fr.assign(a),this.N())}); Wg.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.eb(dc),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a}; function va(){D.uc(this);this.te=null;if(this.vertexes)for(var a=this.vertexes.j;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.j;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new L(wa);this.edges=new L(xa);this.my=new ma(G,wa);this.hy=new ma(J,xa)}D.ja("LayoutNetwork",va); va.prototype.clear=function(){if(this.vertexes)for(var a=this.vertexes.j;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.j;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new L(wa);this.edges=new L(xa);this.my=new ma(G,wa);this.hy=new ma(J,xa)}; va.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Vb?"("+this.Vb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0}; wa.smartComparer=function(a,b){v&&D.l(a,wa,wa,"smartComparer:m");v&&D.l(b,wa,wa,"smartComparer:n");if(null!==a){if(null!==b){var c=a.Cd,d=b.Cd;if(null!==c){if(null!==d){for(var c=c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=g&&0>=h&&(g=1);a=this.spacing.width;isFinite(a)||(a=0);c=this.spacing.height;isFinite(c)||(c=0);null!==b&&b.ac("Layout");d=[];switch(this.alignment){case Hs:var k=a,l=c,m=Math.max(this.bq.width,1);if(!isFinite(m))for(var n=m=0;n=g&&0>=h&&(g=1);a=this.spacing.width;isFinite(a)||(a=0);c=this.spacing.height;isFinite(c)||(c=0);null!==b&&b.ac("Layout");d=[];switch(this.alignment){case Hs:var k=a,l=c,m=Math.max(this.aq.width,1);if(!isFinite(m))for(var n=m=0;ng-1||0h)d.push(new B(0,y,h+k,C)),w=0,t=u,y+=C,C=0;C=Math.max(C,N);N=0;switch(s){case Gs:N=-q.width;break;default:N=0}p.moveTo(t+N,y);switch(s){case Gs:t-=A;break; -default:t+=A}w++}d.push(new B(0,y,h+k,C));break;case zs:k=g;l=a;m=c;n=Math.max(this.bq.width,1);p=y=A=0;q=D.O();for(g=0;g=A&&(h-=A);for(var A=N=0,H=Math.max(this.bq.height,1),fa=p=0,S=!0,ba=D.O(),g=0;g=A&&(h-=A);for(var A=N=0,H=Math.max(this.aq.height,1),fa=p=0,S=!0,ba=D.O(),g=0;gk-1||0h){d.push(new B(0,S?w-p:w,h+l,fa+p+m));for(W=0;WA&&(e.width+=e.x-A,e.x=A)}for(k=g=h=e=0;kd?1:0}; +D.defineProperty(Un,{oH:"wrappingWidth"},function(){return this.Mt},function(a){this.Mt!==a&&(D.h(a,"number",Un,"wrappingWidth"),0d?1:0}; Un.smartComparer=function(a,b){v&&D.l(a,F,Un,"standardComparer:a");v&&D.l(b,F,Un,"standardComparer:b");if(null!==a){if(null!==b){for(var c=a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=a.count)1===a.count&&(a=a.first(),a.oa=0,a.va=0);else{var b=new K($s);b.Sc(a.j);a=new K($s);var c=new K($s),d;d=this.sort(b);var e=this.xz,g=this.aD,h=this.fe,k=this.ap,l=this.yz,m=this.Mr,b=this.vl,n=this.rE,p=this.Tg,q=this.Dv,e=this.ag,g=this.ly,h=this.UJ;if(!isFinite(h)|| +Is.prototype.doLayout=function(a){null===a&&D.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));a=this.network.vertexes;if(1>=a.count)1===a.count&&(a=a.first(),a.oa=0,a.va=0);else{var b=new K($s);b.Sc(a.j);a=new K($s);var c=new K($s),d;d=this.sort(b);var e=this.xz,g=this.aD,h=this.fe,k=this.$o,l=this.yz,m=this.Mr,b=this.vl,n=this.rE,p=this.Tg,q=this.Dv,e=this.ag,g=this.ly,h=this.VJ;if(!isFinite(h)|| 0>=h)h=NaN;k=this.VH;if(!isFinite(k)||0>=k)k=1;l=this.Le;isFinite(l)||(l=0);m=this.yf;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Xs&&g===Ys?e=Js:e===Xs&&g!==Ys&&(g=Ys,e=this.ag);if((this.direction===Ss||this.direction===Ts)&&this.sorting!==Ms){for(var r=0;!(r>=d.length);r+=2){a.add(d.ea(r));if(r+1>=d.length)break;c.add(d.ea(r+1))}this.direction===Ss?(this.ag===Xs&&a.reverse(),d=new K($s),d.Sc(a),d.Sc(c)):(this.ag===Xs&&c.reverse(),d=new K($s),d.Sc(c),d.Sc(a))}for(var s= d.length,u=n=0,r=0;rm&&(0===r||r===d.length-1)&&(t/=2);n+=t;u++}if(isNaN(h)||e===Xs){isNaN(b)&&(b=6);if(e!==Js&&e!==Xs){t=-Infinity;for(r=0;rh?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.xz=e;this.aD=g;this.fe=h;this.ap=k;this.yz=l;this.Mr=m;this.vl=b;this.rE=n;this.Tg=p;this.Dv=q;b=d;d=this.xz;e=this.fe;g=this.yz;k=this.Mr;l=this.vl;m=this.Tg;n=this.Dv;if(this.direction!==Ss&&this.direction!==Ts||d!==Xs)if(this.direction===Ss||this.direction===Ts){h=0;switch(d){case Ws:h=180*dt(this,e,m,g,n)/Math.PI;break;case Js:n=b=0;h=a.first();null!==h&&(b=at(h,Math.PI/2));h=c.first();null!==h&&(n=at(h,Math.PI/2));h=180*dt(this,e,m,g,l+(b+ +m*Math.PI/180);r>h?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.xz=e;this.aD=g;this.fe=h;this.$o=k;this.yz=l;this.Mr=m;this.vl=b;this.rE=n;this.Tg=p;this.Dv=q;b=d;d=this.xz;e=this.fe;g=this.yz;k=this.Mr;l=this.vl;m=this.Tg;n=this.Dv;if(this.direction!==Ss&&this.direction!==Ts||d!==Xs)if(this.direction===Ss||this.direction===Ts){h=0;switch(d){case Ws:h=180*dt(this,e,m,g,n)/Math.PI;break;case Js:n=b=0;h=a.first();null!==h&&(b=at(h,Math.PI/2));h=c.first();null!==h&&(n=at(h,Math.PI/2));h=180*dt(this,e,m,g,l+(b+ n)/2)/Math.PI;break;case Vs:h=k/b.length}if(this.direction===Ss){switch(d){case Ws:et(this,a,g,Us);break;case Js:ft(this,a,g,Us);break;case Vs:gt(this,a,k/2,g,Us)}switch(d){case Ws:et(this,c,g+h,Ls);break;case Js:ft(this,c,g+h,Ls);break;case Vs:gt(this,c,k/2,g+h,Ls)}}else{switch(d){case Ws:et(this,c,g,Us);break;case Js:ft(this,c,g,Us);break;case Vs:gt(this,c,k/2,g,Us)}switch(d){case Ws:et(this,a,g+h,Ls);break;case Js:ft(this,a,g+h,Ls);break;case Vs:gt(this,a,k/2,g+h,Ls)}}}else switch(d){case Ws:et(this, b,g,this.direction);break;case Js:ft(this,b,g,this.direction);break;case Vs:gt(this,b,k,g,this.direction);break;case Xs:ht(this,b,k,g,this.direction)}else ht(this,b,k,g-k/2,Ls)}this.updateParts();this.network=null;this.If=!0}; function gt(a,b,c,d,e){var g=a.Mr,h=a.fe;a=a.Tg;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;lc){for(g=d+(e===Ls?g:-g);0>g;)g+=360;g%=360;180=n.length-1)break;kt(a,l,m,n,p,e,g)||lt(a,l,m,n,p,e,g);l=g.x;m=g.y}D.A(g);a.hn++;if(!(23Math.abs(r)?Math.abs(l-g)<(n[0].width+n[n.length-1].width)/2&&(h=0):h=0Math.abs(q)?0:q;q=!1;q=Math.abs(g)>Math.abs(p)?0p:0a.hn?a.fe-h/(2*Math.PI):5>n.length&&10=p.length-1)break;kt(a,l,m,p,q,e,n)||lt(a,l,m,p,q,e,n);l=n.x;m=n.y}D.A(n);a.hn++;if(!(23=p.length-1)break;kt(a,l,m,p,q,e,n)||lt(a,l,m,p,q,e,n);l=n.x;m=n.y}D.A(n);a.hn++;if(!(23a.hn?a.fe-g/(2*Math.PI):a.fe-(0k){m=b-a;if(m<-k)return h.x=m,h.y=n,!1;p=!0}}else if(m=b-a,m<-k){m=b+a;if(m>k)return h.x=m,h.y=n,!1;p=!0}n=Math.sqrt(1-Math.min(1,m*m/(k*k)))*l;0>c!==p&&(n=-n);if(Math.abs(c-n)>(d[e].height+d[e+1].height)/2)return h.x=m,h.y=n,!1;h.x=m;h.y=n;return!0} function lt(a,b,c,d,e,g,h){var k=a.fe,l=a.Tg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.vl;d=!1;if(0<=b!==(g===Ls)){if(n=c-a,n<-l){n=c+a;if(n>l){h.x=m;h.y=n;return}d=!0}}else if(n=c+a,n>l){n=c-a;if(n<-l){h.x=m;h.y=n;return}d=!0}m=Math.sqrt(1-Math.min(1,n*n/(l*l)))*k;0>b!==d&&(m=-m);h.x=m;h.y=n}Is.prototype.commitLayout=function(){this.commitNodes();this.zu&&this.commitLinks()}; Is.prototype.commitNodes=function(){for(var a=this.KH,b=this.network.vertexes.j;b.next();){var c=b.value;c.x+=a.x;c.y+=a.y;c.commit()}};Is.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()}; -function ct(a,b,c,d,e){var g=a.BH;if(.001>Math.abs(a.ap-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;for(var h=0,k=0,k=void 0!==d&&void 0!==e?e/(g+1):Math.PI/(2*(g+1)),l=0,m=0;m<=g;m++)l=void 0!==d&&void 0!==e?d+m*e/g:m*Math.PI/(2*g),l=Math.sin(l),h+=Math.sqrt(1-a*a*l*l)*k;return void 0!==d&&void 0!==e?(b>c?b:c)*h:4*(b>c?b:c)*h}function bt(a,b,c,d,e){var g=0,g=void 0!==d&&void 0!==e?ct(a,1,c,d,e):ct(a,1,c);return b/g} -function dt(a,b,c,d,e){if(.001>Math.abs(a.ap-1))return e/b;var g=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-g*g*l*l)*a;if(h>=e)return k*a}} +function ct(a,b,c,d,e){var g=a.BH;if(.001>Math.abs(a.$o-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;for(var h=0,k=0,k=void 0!==d&&void 0!==e?e/(g+1):Math.PI/(2*(g+1)),l=0,m=0;m<=g;m++)l=void 0!==d&&void 0!==e?d+m*e/g:m*Math.PI/(2*g),l=Math.sin(l),h+=Math.sqrt(1-a*a*l*l)*k;return void 0!==d&&void 0!==e?(b>c?b:c)*h:4*(b>c?b:c)*h}function bt(a,b,c,d,e){var g=0,g=void 0!==d&&void 0!==e?ct(a,1,c,d,e):ct(a,1,c);return b/g} +function dt(a,b,c,d,e){if(.001>Math.abs(a.$o-1))return e/b;var g=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-g*g*l*l)*a;if(h>=e)return k*a}} Is.prototype.sort=function(a){switch(this.sorting){case Qs:break;case Rs:a.reverse();break;case Os:a.sort(this.comparer);break;case Ps:a.sort(this.comparer);a.reverse();break;case Ms:for(var b=[],c=0;ce&&(e=k,g=h)}else for(h=0;he&&(e=k,g=h);d.add(a.ea(g));b[g]=-1;g=a.ea(g);e=0;for(h=g.tc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&& b[e]++;for(g=g.qc;g.next();)e=a.indexOf(g.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(g=0;ga[g].indexOf(l)&&a[g].push(l);for(b=b.tc;b.next();)l=d.indexOf(b.value.fromVertex),l!==g&&0>a[g].indexOf(l)&&a[g].push(l)}h=[];for(g=0;ga[b[p]].indexOf(b[p===b.length-1?0:p+1])&&u.push(p===b.length-1?0:p+1);if(0===u.length)for(p=0;pN.indexOf(S)||baN.indexOf(S)|| ba=t?l+1:l)),w+=l=t&&l++,A>=t&&A++,l>A&&(N=A,A=l,l=N),A-l<(b.length+2)/2===(lq||q===l||(s=q>l?q-l:l-q,p+=qh-s?1:-1);b.splice(0>p?l:l+1,0,m);c.splice(k,1);k--}else g=!1;if(g)break;else b.push(c[0]),c.splice(0,1)}for(g=0;gq||q===l||(s=q>l?q-l:l-q,p+=qh-s?1:-1);b.splice(0>p?l:l+1,0,m);c.splice(k,1);k--}else g=!1;if(g)break;else b.push(c[0]),c.splice(0,1)}for(g=0;g=a?a:360,this.N())}); D.defineProperty(Is,{ag:"arrangement"},function(){return this.xd},function(a){this.xd!==a&&(D.Da(a,Is,Is,"arrangement"),a===Xs||a===Js||a===Ws||a===Vs)&&(this.xd=a,this.N())});D.defineProperty(Is,{direction:"direction"},function(){return this.fa},function(a){this.fa!==a&&(D.Da(a,Is,Is,"direction"),a===Ls||a===Us||a===Ss||a===Ts)&&(this.fa=a,this.N())}); -D.defineProperty(Is,{sorting:"sorting"},function(){return this.ri},function(a){this.ri!==a&&(D.Da(a,Is,Is,"sorting"),a===Qs||a===Rs||a===Os||Ps||a===Ms)&&(this.ri=a,this.N())});D.defineProperty(Is,{comparer:"comparer"},function(){return this.$h},function(a){this.$h!==a&&(D.h(a,"function",Is,"comparer"),this.$h=a,this.N())});D.defineProperty(Is,{spacing:"spacing"},function(){return this.si},function(a){this.si!==a&&(D.h(a,"number",Is,"spacing"),this.si=a,this.N())}); -D.defineProperty(Is,{ly:"nodeDiameterFormula"},function(){return this.Ns},function(a){this.Ns!==a&&(D.Da(a,Is,Is,"nodeDiameterFormula"),a===Ns||a===Ys)&&(this.Ns=a,this.N())});D.w(Is,{LH:"actualXRadius"},function(){return this.fe});D.w(Is,{MH:"actualYRadius"},function(){return this.Tg});D.w(Is,{GK:"actualSpacing"},function(){return this.vl});D.w(Is,{KH:"actualCenter"},function(){return isNaN(this.Ae.x)||isNaN(this.Ae.y)?new O(0,0):new O(this.Ae.x+this.LH,this.Ae.y+this.MH)});var Js; +D.defineProperty(Is,{sorting:"sorting"},function(){return this.qi},function(a){this.qi!==a&&(D.Da(a,Is,Is,"sorting"),a===Qs||a===Rs||a===Os||Ps||a===Ms)&&(this.qi=a,this.N())});D.defineProperty(Is,{comparer:"comparer"},function(){return this.Zh},function(a){this.Zh!==a&&(D.h(a,"function",Is,"comparer"),this.Zh=a,this.N())});D.defineProperty(Is,{spacing:"spacing"},function(){return this.ri},function(a){this.ri!==a&&(D.h(a,"number",Is,"spacing"),this.ri=a,this.N())}); +D.defineProperty(Is,{ly:"nodeDiameterFormula"},function(){return this.Ns},function(a){this.Ns!==a&&(D.Da(a,Is,Is,"nodeDiameterFormula"),a===Ns||a===Ys)&&(this.Ns=a,this.N())});D.w(Is,{LH:"actualXRadius"},function(){return this.fe});D.w(Is,{MH:"actualYRadius"},function(){return this.Tg});D.w(Is,{HK:"actualSpacing"},function(){return this.vl});D.w(Is,{KH:"actualCenter"},function(){return isNaN(this.Ae.x)||isNaN(this.Ae.y)?new O(0,0):new O(this.Ae.x+this.LH,this.Ae.y+this.MH)});var Js; Is.ConstantSpacing=Js=D.s(Is,"ConstantSpacing",0);var Ws;Is.ConstantDistance=Ws=D.s(Is,"ConstantDistance",1);var Vs;Is.ConstantAngle=Vs=D.s(Is,"ConstantAngle",2);var Xs;Is.Packed=Xs=D.s(Is,"Packed",3);var Ls;Is.Clockwise=Ls=D.s(Is,"Clockwise",4);var Us;Is.Counterclockwise=Us=D.s(Is,"Counterclockwise",5);var Ss;Is.BidirectionalLeft=Ss=D.s(Is,"BidirectionalLeft",6);var Ts;Is.BidirectionalRight=Ts=D.s(Is,"BidirectionalRight",7);var Qs;Is.Forwards=Qs=D.s(Is,"Forwards",8);var Rs; -Is.Reverse=Rs=D.s(Is,"Reverse",9);var Os;Is.Ascending=Os=D.s(Is,"Ascending",10);var Ps;Is.Descending=Ps=D.s(Is,"Descending",11);var Ms;Is.Optimized=Ms=D.s(Is,"Optimized",12);var Ns;Is.Pythagorean=Ns=D.s(Is,"Pythagorean",13);var Ys;Is.Circular=Ys=D.s(Is,"Circular",14);function Ks(){this.pq=-Infinity;this.Wq=this.Co=null} -Ks.prototype.compare=function(a,b){if(0this.pq||Math.abs(a)a&&0this.oq||Math.abs(a)a&&0g?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new O(n.x+n.width+d.width,n.y),l[1]=new O(n.x,n.y+n.height+d.height),g=2):(p=eu(l,g, -e,k,n.width,n.height,d),q=l[p],r=new O(q.x+n.width+d.width,q.y),s=new O(q.x,q.y+n.height+d.height),p+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().mb,d=this.network.vertexes.j;d.next();){if(d.value.mb.fg(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Sg?a.Sg=new K(ku):a.Sg.clear();a.Sg.Sc(a.network.vertexes);var c=a.Sg;c.sort(function(a,b){return null===a||null===b||a===b?0:b.pg-a.pg});for(var d=c.count-1;0<=d&&1>=c.ea(d).pg;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=qe((m+s+n*n*4/(h*h))/s);h=(m-1)*p/2;m=(m-1)*q/2;g.mb=new B(k-r.x-h,l-r.y-m,p+2*h,q+2*m);g.focus=new O(r.x+h,r.y+m)}a.network=d;return c}function ju(a,b,c){v&&(D.l(b,cu,vt,"popNetwork:oldnet"),D.p(c,vt,"popNetwork:level"));for(c=a.network.vertexes.j;c.next();){var d=c.value;d.network=b;if(null!==d.Vh){var e=d.Vh.ea(d.BB);d.pg=e.Ry;var g=e.hC,h=e.iC;d.mb=new B(d.oa-g,d.va-h,e.Sy,e.Qy);d.focus=new O(g,h);d.BB--}}for(c=a.network.edges.j;c.next();)c.value.network=b;a.network=b} -function lu(a,b,c){v&&(D.l(b,ku,vt,"surroundNode:oldnet"),D.p(c,vt,"surroundNode:level"));var d=b.In;if(null!==d&&0!==d.count){c=b.oa;var e=b.va,g=b.width,h=b.height;null!==b.Vh&&0=p.pg?l++:(k=!0,m++,h+=Math.atan2(b.va-p.va,b.oa-p.oa))}if(0!==l)for(0this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().mb,d=this.network.vertexes.j;d.next();){if(d.value.mb.fg(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Sg?a.Sg=new K(ku):a.Sg.clear();a.Sg.Sc(a.network.vertexes);var c=a.Sg;c.sort(function(a,b){return null===a||null===b||a===b?0:b.pg-a.pg});for(var d=c.count-1;0<=d&&1>=c.ea(d).pg;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=qe((m+s+n*n*4/(h*h))/s);h=(m-1)*p/2;m=(m-1)*q/2;g.mb=new B(k-r.x-h,l-r.y-m,p+2*h,q+2*m);g.focus=new O(r.x+h,r.y+m)}a.network=d;return c}function ju(a,b,c){v&&(D.l(b,ot,nt,"popNetwork:oldnet"),D.p(c,nt,"popNetwork:level"));for(c=a.network.vertexes.j;c.next();){var d=c.value;d.network=b;if(null!==d.Uh){var e=d.Uh.ea(d.BB);d.pg=e.Ry;var g=e.hC,h=e.iC;d.mb=new B(d.oa-g,d.va-h,e.Sy,e.Qy);d.focus=new O(g,h);d.BB--}}for(c=a.network.edges.j;c.next();)c.value.network=b;a.network=b} +function lu(a,b,c){v&&(D.l(b,ku,nt,"surroundNode:oldnet"),D.p(c,nt,"surroundNode:level"));var d=b.In;if(null!==d&&0!==d.count){c=b.oa;var e=b.va,g=b.width,h=b.height;null!==b.Uh&&0=p.pg?l++:(k=!0,m++,h+=Math.atan2(b.va-p.va,b.oa-p.oa))}if(0!==l)for(0>1)+m)*(0===k%2?1:-1);l.oa=c+n*Math.cos(p);l.va=e+n*Math.sin(p);k++}}} -function eu(a,b,c,d,e,g,h){var k=9E19,l=-1,m=0;a:for(;mn.y&&a[q].x-n.xn.x&&a[q].y-n.yl+h?(d=d+g-k,e=e-l-h,qe(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,qe(d*d+e*e)):e+cl+h?e-(l+h):e+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.oa,e=d,g=c.va,h=g,c=1;ch-g)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.oa-b.oa}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.va-b.va});for(var h=a.ei,m=0,n=0,p=0,c=0;cn.y&&a[q].x-n.xn.x&&a[q].y-n.yl+h?(d=d+g-k,e=e-l-h,qe(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,qe(d*d+e*e)):e+cl+h?e-(l+h):e+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.oa,e=d,g=c.va,h=g,c=1;ch-g)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.oa-b.oa}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.va-b.va});for(var h=a.di,m=0,n=0,p=0,c=0;ch||p-d>h){if(g)break}else if(l-r>h||r-l>h){if(!g)break}else{var s=nu(k,e);1>s?(n=a.vy,null===n&&(a.vy=n=new Ia(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(e.R.right-k.R.x),n=(1+n)*m):dr?(p=Math.abs(e.R.bottom-k.R.y),p=(1+p)*s):ds?(n=a.vy,null===n&&(a.vy=n=new Ia(0)),m=n.random(),s= -n.random(),n=(d>p?1:-1)*(1+(e.width>k.width?e.width:k.width))*m,p=(l>r?1:-1)*(1+(e.height>k.height?e.height:k.height))*s):(m=g.stiffness*(s-g.length),n=(p-d)/s*m,p=(r-l)/s*m),k.forceX+=n,k.forceY+=p,e.forceX-=n,e.forceY-=p;c=0;d=Math.max(a.ei/20,50);for(e=0;ed&&(g=d),h<-d?h=-d:h>d&&(h=d),k.oa+=g,k.va+=h,c=Math.max(c,g*g+h*h));return c>a.mF*a.mF}vt.prototype.moveFixedVertex=function(){}; -vt.prototype.commitLayout=function(){this.IB();this.commitNodes();this.zu&&this.commitLinks()};vt.prototype.IB=function(){if(this.Qq)for(var a=this.network.edges.j;a.next();){var b=a.value.link;null!==b&&(b.Gb=Vc,b.Hb=Vc)}};vt.prototype.commitNodes=function(){var a=0,b=0;if(this.UH){var c=D.Of();this.Kh(this.network,c);b=this.Ae;a=b.x-c.x;b=b.y-c.y;D.Kb(c)}for(var c=D.Of(),d=this.network.vertexes.j;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.mb),c.x+=a,c.y+=b,e.mb=c;e.commit()}D.Kb(c)}; -vt.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()};vt.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Xo:a};vt.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Wo:a};vt.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.Uo:a};vt.prototype.electricalFieldX=function(){return 0};vt.prototype.electricalFieldY=function(){return 0}; -vt.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Vo:a};vt.prototype.gravitationalFieldX=function(){return 0};vt.prototype.gravitationalFieldY=function(){return 0};vt.prototype.isFixed=function(a){return a.isFixed};D.w(vt,{jL:"currentIteration"},function(){return this.ns});D.defineProperty(vt,{LE:"arrangementSpacing"},function(){return this.ug},function(a){D.l(a,Ca,vt,"arrangementSpacing");this.ug.P(a)||(this.ug.assign(a),this.N())}); -D.defineProperty(vt,{UH:"arrangesToOrigin"},function(){return this.gr},function(a){this.gr!==a&&(D.h(a,"boolean",vt,"arrangesToOrigin"),this.gr=a,this.N())});D.defineProperty(vt,{Qq:"setsPortSpots"},function(){return this.qi},function(a){this.qi!==a&&(D.h(a,"boolean",vt,"setsPortSpots"),this.qi=a,this.N())});D.defineProperty(vt,{comments:"comments"},function(){return this.Zh},function(a){this.Zh!==a&&(D.h(a,"boolean",vt,"comments"),this.Zh=a,this.N())}); -D.defineProperty(vt,{jB:"maxIterations"},function(){return this.Bp},function(a){this.Bp!==a&&(D.h(a,"number",vt,"maxIterations"),0<=a&&(this.Bp=a,this.N()))});D.defineProperty(vt,{mF:"epsilonDistance"},function(){return this.Qr},function(a){this.Qr!==a&&(D.h(a,"number",vt,"epsilonDistance"),0p?1:-1)*(1+(e.width>k.width?e.width:k.width))*m,p=(l>r?1:-1)*(1+(e.height>k.height?e.height:k.height))*s):(m=g.stiffness*(s-g.length),n=(p-d)/s*m,p=(r-l)/s*m),k.forceX+=n,k.forceY+=p,e.forceX-=n,e.forceY-=p;c=0;d=Math.max(a.di/20,50);for(e=0;ed&&(g=d),h<-d?h=-d:h>d&&(h=d),k.oa+=g,k.va+=h,c=Math.max(c,g*g+h*h));return c>a.mF*a.mF}nt.prototype.moveFixedVertex=function(){}; +nt.prototype.commitLayout=function(){this.IB();this.commitNodes();this.zu&&this.commitLinks()};nt.prototype.IB=function(){if(this.Qq)for(var a=this.network.edges.j;a.next();){var b=a.value.link;null!==b&&(b.Gb=Vc,b.Hb=Vc)}};nt.prototype.commitNodes=function(){var a=0,b=0;if(this.UH){var c=D.Of();this.Kh(this.network,c);b=this.Ae;a=b.x-c.x;b=b.y-c.y;D.Kb(c)}for(var c=D.Of(),d=this.network.vertexes.j;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.mb),c.x+=a,c.y+=b,e.mb=c;e.commit()}D.Kb(c)}; +nt.prototype.commitLinks=function(){for(var a=this.network.edges.j;a.next();)a.value.commit()};nt.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Wo:a};nt.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Vo:a};nt.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.To:a};nt.prototype.electricalFieldX=function(){return 0};nt.prototype.electricalFieldY=function(){return 0}; +nt.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Uo:a};nt.prototype.gravitationalFieldX=function(){return 0};nt.prototype.gravitationalFieldY=function(){return 0};nt.prototype.isFixed=function(a){return a.isFixed};D.w(nt,{kL:"currentIteration"},function(){return this.ns});D.defineProperty(nt,{LE:"arrangementSpacing"},function(){return this.ug},function(a){D.l(a,Ca,nt,"arrangementSpacing");this.ug.P(a)||(this.ug.assign(a),this.N())}); +D.defineProperty(nt,{UH:"arrangesToOrigin"},function(){return this.gr},function(a){this.gr!==a&&(D.h(a,"boolean",nt,"arrangesToOrigin"),this.gr=a,this.N())});D.defineProperty(nt,{Qq:"setsPortSpots"},function(){return this.pi},function(a){this.pi!==a&&(D.h(a,"boolean",nt,"setsPortSpots"),this.pi=a,this.N())});D.defineProperty(nt,{comments:"comments"},function(){return this.Yh},function(a){this.Yh!==a&&(D.h(a,"boolean",nt,"comments"),this.Yh=a,this.N())}); +D.defineProperty(nt,{jB:"maxIterations"},function(){return this.Ap},function(a){this.Ap!==a&&(D.h(a,"number",nt,"maxIterations"),0<=a&&(this.Ap=a,this.N()))});D.defineProperty(nt,{mF:"epsilonDistance"},function(){return this.Qr},function(a){this.Qr!==a&&(D.h(a,"number",nt,"epsilonDistance"),0b.toVertex.index&&(a.By(b),b.rev=!0);break;case ru:for(d=this.network.vertexes.j;d.next();)a=d.value,a.kq=-1,a.finish=-1;for(a=this.network.edges.j;a.next();)a.value.forest=!1;this.Js=0;for(d.reset();d.next();)b=d.value,0===b.tc.count&&Bu(this,b);for(d.reset();d.next();)b=d.value,-1===b.kq&&Bu(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,g=e.finish,e.kqb.toVertex.index&&(a.By(b),b.rev=!0);break;case ru:for(d=this.network.vertexes.j;d.next();)a=d.value,a.jq=-1,a.finish=-1;for(a=this.network.edges.j;a.next();)a.value.forest=!1;this.Js=0;for(d.reset();d.next();)b=d.value,0===b.tc.count&&Bu(this,b);for(d.reset();d.next();)b=d.value,-1===b.jq&&Bu(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,g=e.finish,e.jqu&&0u&&0d[this.Vf]&&(this.pw=d[b]-1,this.Vf=b),d[b]=c&&(l=k.Ve);var m=null;0<=c&&(m=k.Pe);var n=0,p=[],q=k.near;null!==q&&q.layer===k.layer&&(p[n]=q.column-1,n++);if(null!==l)for(q=0;q>1,g[h]=0!==(n&1)?p[m]:p[m-1]+p[m]>>1)}Fu(a,b,d);return g}function Nu(a,b,c,d,e,g){if(b.component===d){b.component=c;var h=0,k=0;if(e)for(var l=b.qc;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&Nu(a,m,c,d,e,g)}if(g)for(l=b.tc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&Nu(a,m,c,d,e,g)}} function Ou(a,b,c,d,e,g){if(b.component===d){b.component=c;if(e)for(var h=b.qc;h.next();)Ou(a,h.value.toVertex,c,d,e,g);if(g)for(b=b.tc;b.next();)Ou(a,b.value.fromVertex,c,d,e,g)}}function yu(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid)return b}return null}function zu(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.qc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} -function Au(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.tc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function Bu(a,b){b.kq=a.Js;a.Js++;for(var c=b.qc;c.next();){var d=c.value,e=d.toVertex;-1===e.kq&&(d.forest=!0,Bu(a,e))}b.finish=a.Js;a.Js++} -qu.prototype.assignLayers=function(){switch(this.xp){case Pu:Qu(this);break;case Ru:for(var a=0,b=this.network.vertexes.j;b.next();)a=Su(this,b.value),this.yb=Math.max(a,this.yb);for(b.reset();b.next();)a=b.value,a.layer=this.yb-a.layer;break;default:case su:Qu(this);for(b=this.network.vertexes.j;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.tc.count&&Tu(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.yb=-1;for(b.reset();b.next();){var c=b.value;c.layer-= +function Au(a){for(a=a.vertexes.j;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.tc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function Bu(a,b){b.jq=a.Js;a.Js++;for(var c=b.qc;c.next();){var d=c.value,e=d.toVertex;-1===e.jq&&(d.forest=!0,Bu(a,e))}b.finish=a.Js;a.Js++} +qu.prototype.assignLayers=function(){switch(this.wp){case Pu:Qu(this);break;case Ru:for(var a=0,b=this.network.vertexes.j;b.next();)a=Su(this,b.value),this.yb=Math.max(a,this.yb);for(b.reset();b.next();)a=b.value,a.layer=this.yb-a.layer;break;default:case su:Qu(this);for(b=this.network.vertexes.j;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.tc.count&&Tu(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.yb=-1;for(b.reset();b.next();){var c=b.value;c.layer-= a;this.yb=Math.max(this.yb,c.layer)}}};function Qu(a){for(var b=a.network.vertexes.j;b.next();){var c=Uu(a,b.value);a.yb=Math.max(c,a.yb)}}function Uu(a,b){var c=0;if(-1===b.layer){for(var d=b.qc;d.next();)var e=d.value,g=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,Uu(a,g)+e);b.layer=c}else c=b.layer;return c}function Su(a,b){var c=0;if(-1===b.layer){for(var d=b.tc;d.next();)var e=d.value,g=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,Su(a,g)+e);b.layer=c}else c=b.layer;return c} function Tu(a,b){if(!b.valid){b.valid=!0;for(var c=b.qc;c.next();)Tu(a,c.value.toVertex);for(c=a.network.vertexes.j;c.next();)c.value.component=-1;for(var d=b.Ve.o,e=d.length,g=0;gh&&Nu(a,k,0,-1,!0,!1)}for(Nu(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.j;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.Ve.o,e=s.length,g=0;gd)&&!n&&(h=l,d=m)}if(0>g){for(c.reset();c.next();)g=c.value,1===g.component&&(g.layer-=e);b.component=0}else h.component=0}}} function Du(a,b,c){return 90===a.fa?c&&!b.rev||!c&&b.rev?270:90:180===a.fa?c&&!b.rev||!c&&b.rev?0:180:270===a.fa?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0} -qu.prototype.initializeIndices=function(){switch(this.lp){default:case Vu:for(var a=this.network.vertexes.j;a.next();){var b=a.value,c=b.layer;b.index=this.se[c];this.se[c]++}break;case tu:a=this.network.vertexes.j;for(b=this.yb;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Wu(this,c);break;case Xu:for(a=this.network.vertexes.j,b=0;b<=this.yb;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Yu(this,c)}}; +qu.prototype.initializeIndices=function(){switch(this.kp){default:case Vu:for(var a=this.network.vertexes.j;a.next();){var b=a.value,c=b.layer;b.index=this.se[c];this.se[c]++}break;case tu:a=this.network.vertexes.j;for(b=this.yb;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Wu(this,c);break;case Xu:for(a=this.network.vertexes.j,b=0;b<=this.yb;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Yu(this,c)}}; function Wu(a,b){var c=b.layer;b.index=a.se[c];a.se[c]++;for(var c=b.Pe.mc(),d=!0;d;)for(var d=!1,e=0;eh.portFromColOffset&&(d=!0,c[e]=h,c[e+1]=g)}for(e=0;eh.portToColOffset&&(d=!0,c[e]=h,c[e+1]=g)}for(e=0;e=h;d--)g=$u(this,d,-1)||g;e=this.countCrossings();e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,1)||g;e=this.countCrossings();e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1, +e=h;d--)g=$u(this,d,-1)||g;e=this.countCrossings();e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,1)||g;e=this.countCrossings();e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1, d=h;d<=c;d++)g=$u(this,d,-1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,0)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,0)||g;e>=a?Iu(this,b):(a=e,b=Hu(this))}break;default:case uu:for(c=this.yb,h=0,k=a+1;(d=this.countCrossings())=h;d--)g=$u(this,d,-1)||g;e=this.countCrossings();e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,1)||g;e=this.countCrossings(); e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,-1)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=$u(this,d,0)||g;e>=a?Iu(this,b):(a=e,b=Hu(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=$u(this,d,0)||g;e>=a?Iu(this,b):(a=e,b=Hu(this))}}Iu(this,b)}; function Zu(a,b,c){v&&(D.p(b,qu,"medianBarycenterCrossingReduction:unfixedLayer"),D.p(c,qu,"medianBarycenterCrossingReduction:direction"));var d=0,e=Eu(a,b),g=a.se[b],h=Mu(a,b,c);c=Lu(a,b,c);for(d=0;dg+1&&(q+=4*(w-g),r+=4*(w-(g+1)))}A=d[g].qc.j;for(A.reset();A.next();)if(w=A.value,C=w.toVertex,w.valid&&C.layer===b){for(w=0;d[w]!==C;)w++;w===g+1&&(r+=1)}A=d[g+1].tc.j;for(A.reset();A.next();)if(w=A.value,C=w.fromVertex,w.valid&&C.layer===b){for(w=0;d[w]!==C;)w++;wg+1&&(q+=4*(w-(g+1)),r+=4*(w-g))}A=d[g+1].qc.j;for(A.reset();A.next();)if(w=A.value,C=w.toVertex,w.valid&& C.layer===b){for(w=0;d[w]!==C;)w++;w===g&&(q+=1)}var w=C=0,A=h[d[g].index],N=k[d[g].index],H=h[d[g+1].index],W=k[d[g+1].index];-1!==A&&(C+=Math.abs(A-s),w+=Math.abs(A-y));-1!==N&&(C+=Math.abs(N-s),w+=Math.abs(N-y));-1!==H&&(C+=Math.abs(H-u),w+=Math.abs(H-t));-1!==W&&(C+=Math.abs(W-u),w+=Math.abs(W-t));if(r>1)+8*d;this.Pb*=8}if(0!==(this.oj&dv))for(b=!0;b;){b=!1;for(a=this.Vf+1;a<=this.yb;a++)b=ev(this,a,1)||b; -for(a=this.Vf-1;0<=a;a--)b=ev(this,a,-1)||b;b=ev(this,this.Vf,0)||b}if(0!==(this.oj&fv)){for(a=this.Vf+1;a<=this.yb;a++)gv(this,a,1);for(a=this.Vf-1;0<=a;a--)gv(this,a,-1);gv(this,this.Vf,0)}c&&(hv(this,-1),hv(this,1));if(0!==(this.oj&dv))for(b=!0;b;){b=!1;b=ev(this,this.Vf,0)||b;for(a=this.Vf+1;a<=this.yb;a++)b=ev(this,a,0)||b;for(a=this.Vf-1;0<=a;a--)b=ev(this,a,0)||b}}; +qu.prototype.straightenAndPack=function(){var a=0,b=!1,c=0!==(this.nj&cv),a=this.nj===vu;1E3>1)+8*d;this.Pb*=8}if(0!==(this.nj&dv))for(b=!0;b;){b=!1;for(a=this.Vf+1;a<=this.yb;a++)b=ev(this,a,1)||b; +for(a=this.Vf-1;0<=a;a--)b=ev(this,a,-1)||b;b=ev(this,this.Vf,0)||b}if(0!==(this.nj&fv)){for(a=this.Vf+1;a<=this.yb;a++)gv(this,a,1);for(a=this.Vf-1;0<=a;a--)gv(this,a,-1);gv(this,this.Vf,0)}c&&(hv(this,-1),hv(this,1));if(0!==(this.nj&dv))for(b=!0;b;){b=!1;b=ev(this,this.Vf,0)||b;for(a=this.Vf+1;a<=this.yb;a++)b=ev(this,a,0)||b;for(a=this.Vf-1;0<=a;a--)b=ev(this,a,0)||b}}; function ev(a,b,c){v&&(D.p(b,qu,"bendStraighten:unfixedLayer"),D.p(c,qu,"bendStraighten:direction"));for(var d=!1;iv(a,b,c);)d=!0;return d} function iv(a,b,c){v&&(D.p(b,qu,"shiftbendStraighten:unfixedLayer"),D.p(c,qu,"shiftbendStraighten:direction"));var d=0,e=Eu(a,b),g=a.se[b],h=Lu(a,b,-1);if(0c)for(d=0;dd-1||n-e[d-1].column-1>p+a.nodeMinColumnSpace(e[d-1],!1)?n-1:n,p=0,p=d+1>=g||e[d+1].column-n-1>q+a.nodeMinColumnSpace(e[d+1],!0)?n+1:n,s=q= 0,u=0,t=0,y=0,w=0;if(0>=c)for(var C=e[d].tc.j;C.next();){var w=C.value,A=w.fromVertex;w.valid&&A.layer!==b&&(t=Gu(w),y=w.portFromColOffset,w=w.portToColOffset,A=A.column,q+=(Math.abs(n+w-(A+y))+1)*t,s+=(Math.abs(r+w-(A+y))+1)*t,u+=(Math.abs(p+w-(A+y))+1)*t)}if(0<=c)for(C=e[d].qc.j;C.next();)w=C.value,A=w.toVertex,w.valid&&A.layer!==b&&(t=Gu(w),y=w.portFromColOffset,w=w.portToColOffset,A=A.column,q+=(Math.abs(n+y-(A+w))+1)*t,s+=(Math.abs(r+y-(A+w))+1)*t,u+=(Math.abs(p+y-(A+w))+1)*t);w=y=t=0;C=h[e[d].index]; @@ -2002,11 +2002,11 @@ qu.prototype.commitLayout=function(){if(this.Qq)for(var a=Cu(this,!0),b=Cu(this, qu.prototype.commitNodes=function(){this.Hg=[];this.Uf=[];this.Tf=[];this.Ub=[];for(var a=0;a<=this.yb;a++)this.Hg[a]=0,this.Uf[a]=0,this.Tf[a]=0,this.Ub[a]=0;for(a=this.network.vertexes.j;a.next();){var b=a.value,c=b.layer;this.Hg[c]=Math.max(this.Hg[c],this.nodeMinLayerSpace(b,!0));this.Uf[c]=Math.max(this.Uf[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.Zm,c=0;c<=this.yb;c++){var e=d;0>=this.Hg[c]+this.Uf[c]&&(e=0);0=m.R.bottom?(Fa=m.R.y+m.R.height,b.B(U++,sa,Fa+hb),b.B(U++,sa,Fa),b.B(U++,sa,Fa-mb)):(b.B(U++,sa,pa+hb),b.B(U++, sa,pa),b.B(U++,sa,pa-mb)):270===this.fa?pa<=m.R.y?(Fa=m.R.y,b.B(U++,sa,Fa-mb),b.B(U++,sa,Fa),b.B(U++,sa,Fa+hb)):(b.B(U++,sa,pa-mb),b.B(U++,sa,pa),b.B(U++,sa,pa+hb)):0===this.fa&&(sa>=m.R.right?(Fa=m.R.x+m.R.width,b.B(U++,Fa+hb,pa),b.B(U++,Fa,pa),b.B(U++,Fa-mb,pa)):(b.B(U++,sa+hb,pa),b.B(U++,sa,pa),b.B(U++,sa-mb,pa)));else{b.B(U++,Xa,pb);var be=0;if(180===this.fa||0===this.fa){if(180===this.fa?sa>=m.R.right:sa<=m.R.x)be=(0===this.fa?-mb:hb)/2;b.B(U++,Xa+be,pa)}else{if(270===this.fa?pa>=m.R.bottom: @@ -2016,26 +2016,26 @@ b.B(U++,sa,pa)}else if(S)mb=Math.max(10,this.Hg[l.layer]),hb=Math.max(10,this.Uf this.fa){if(180===this.fa?sa<=l.R.x:sa>=l.R.right)be=(0===this.fa?hb:-mb)/2;b.B(U++,sa+be,pb)}else{if(270===this.fa?pa<=l.R.y:pa>=l.R.bottom)be=(90===this.fa?hb:-mb)/2;b.B(U++,Xa,pa+be)}b.B(U++,sa,pa)}}else{for(;null!==l&&l!==m;){Oa=ua=null;for(var Dg=l.qc.j;Dg.next();){var Ef=Dg.value;if(Ef.link===c.link&&(ua=Ef.toVertex,Oa=Ef.fromVertex,null!==Oa.Cd&&(Oa=null),null===ua.Cd))break}var Xa=0,pb=0,sa=0,pa=0,lb=0,mb=0,hb=0;if(ua!==m)if(Xa=b.m(U-1).x,pb=b.m(U-1).y,sa=ua.oa,pa=ua.va,ba)if(180===this.fa|| 0===this.fa){var se=null!==Oa?Oa.va:pb;se!==pa&&(lb=this.Ub[ua.layer],2===U&&(lb=0===this.fa?Math.max(lb,Xa):Math.min(lb,Xa)),b.B(U++,lb,pb),b.B(U++,lb,pa))}else{var Id=null!==Oa?Oa.oa:Xa;Id!==sa&&(lb=this.Ub[ua.layer],2===U&&(lb=90===this.fa?Math.max(lb,pb):Math.min(lb,pb)),b.B(U++,Xa,lb),b.B(U++,sa,lb))}else mb=Math.max(10,this.Hg[ua.layer]),hb=Math.max(10,this.Uf[ua.layer]),180===this.fa?(b.B(U++,sa+hb,pa),S&&b.B(U++,sa,pa),b.B(U++,sa-mb,pa)):90===this.fa?(b.B(U++,sa,pa-mb),S&&b.B(U++,sa,pa),b.B(U++, sa,pa+hb)):270===this.fa?(b.B(U++,sa,pa+hb),S&&b.B(U++,sa,pa),b.B(U++,sa,pa-mb)):(b.B(U++,sa-mb,pa),S&&b.B(U++,sa,pa),b.B(U++,sa+hb,pa));l=ua}ba&&(Xa=b.m(U-1).x,pb=b.m(U-1).y,sa=b.m(U).x,pa=b.m(U).y,180===this.fa||0===this.fa?pb!==pa&&(lb=0===this.fa?Math.min(Math.max((sa+Xa)/2,this.Ub[m.layer]),sa):Math.max(Math.min((sa+Xa)/2,this.Ub[m.layer]),sa),b.B(U++,lb,pb),b.B(U++,lb,pa)):Xa!==sa&&(lb=90===this.fa?Math.min(Math.max((pa+pb)/2,this.Ub[m.layer]),pa):Math.max(Math.min((pa+pb)/2,this.Ub[m.layer]), -pa),b.B(U++,Xa,lb),b.B(U++,sa,lb)))}if(null!==d&&S){if(null!==h){if(b.computeSpot(!0)===cc){var Ab=b.m(0),Ke=b.m(2);Ab.P(Ke)||b.ia(1,(Ab.x+Ke.x)/2,(Ab.y+Ke.y)/2)}fa=b.getLinkPoint(e,h,cc,!0,!1,g,k);fa.F()||fa.set(e.$.cm);b.ia(0,fa.x,fa.y)}null!==k&&(b.computeSpot(!1)===cc&&(Ab=b.m(b.ta-1),Ke=b.m(b.ta-3),Ab.P(Ke)||b.ia(b.ta-2,(Ab.x+Ke.x)/2,(Ab.y+Ke.y)/2)),fa=b.getLinkPoint(g,k,cc,!1,!1,e,h),fa.F()||fa.set(g.$.cm),b.ia(b.ta-1,fa.x,fa.y))}b.Bj();c.commit()}}}for(var ld=new K(J),eg=this.network.edges.j;eg.next();){var Ff= +pa),b.B(U++,Xa,lb),b.B(U++,sa,lb)))}if(null!==d&&S){if(null!==h){if(b.computeSpot(!0)===cc){var Ab=b.m(0),Ke=b.m(2);Ab.P(Ke)||b.ia(1,(Ab.x+Ke.x)/2,(Ab.y+Ke.y)/2)}fa=b.getLinkPoint(e,h,cc,!0,!1,g,k);fa.F()||fa.set(e.$.cm);b.ia(0,fa.x,fa.y)}null!==k&&(b.computeSpot(!1)===cc&&(Ab=b.m(b.ta-1),Ke=b.m(b.ta-3),Ab.P(Ke)||b.ia(b.ta-2,(Ab.x+Ke.x)/2,(Ab.y+Ke.y)/2)),fa=b.getLinkPoint(g,k,cc,!1,!1,e,h),fa.F()||fa.set(g.$.cm),b.ia(b.ta-1,fa.x,fa.y))}b.Aj();c.commit()}}}for(var ld=new K(J),eg=this.network.edges.j;eg.next();){var Ff= eg.value.link;null!==Ff&&Ff.rc&&!ld.contains(Ff)&&ld.add(Ff)}if(0ic.y&&(Gf=Qc.y>ic.y?0:ad.x -Nb.x&&(tb=fi.x>Nb.x?0:Rc.yb.layer?1:a.efb.ef?1:a.Ceb.Ce?1:0:0};qu.prototype.MG=function(a,b){return a instanceof mv&&b instanceof mv&&a!==b?a.firstb.first||a.Jib.Ji||a.efb.ef?1:a.Ceb.Ce?1:0:0}; -qu.prototype.Dy=function(a,b){return a instanceof mv&&b instanceof mv&&a!==b?a.peb.pe||a.Jib.Ji||a.efb.ef?1:a.Ceb.Ce?1:0:0};function nv(a,b){v&&(D.p(a,qu,"isApprox:a"),D.p(b,qu,"isApprox:b"));var c=a-b;return-1c}function ov(a,b,c,d){v&&(D.p(a,qu,"isUnoccupied2:px"),D.p(b,qu,"isUnoccupied2:py"),D.p(c,qu,"isUnoccupied2:qx"),D.p(d,qu,"isUnoccupied2:qy"));return!0} +1),Qc=Eb.m(Tb+2),Gf=0;qb.yic.y&&(Gf=Qc.y>ic.y?0:ad.x +Nb.x&&(tb=fi.x>Nb.x?0:Rc.yb.layer?1:a.efb.ef?1:a.Ceb.Ce?1:0:0};qu.prototype.MG=function(a,b){return a instanceof mv&&b instanceof mv&&a!==b?a.firstb.first||a.Iib.Ii||a.efb.ef?1:a.Ceb.Ce?1:0:0}; +qu.prototype.Dy=function(a,b){return a instanceof mv&&b instanceof mv&&a!==b?a.peb.pe||a.Iib.Ii||a.efb.ef?1:a.Ceb.Ce?1:0:0};function nv(a,b){v&&(D.p(a,qu,"isApprox:a"),D.p(b,qu,"isApprox:b"));var c=a-b;return-1c}function ov(a,b,c,d){v&&(D.p(a,qu,"isUnoccupied2:px"),D.p(b,qu,"isUnoccupied2:py"),D.p(c,qu,"isUnoccupied2:qx"),D.p(d,qu,"isUnoccupied2:qy"));return!0} function Eu(a,b){var c,d=a.se[b];if(d>=a.xh.length){c=[];for(var e=0;ea&&(this.oj=a,this.N()))});D.defineProperty(qu,{Qq:"setsPortSpots"},function(){return this.qi},function(a){this.qi!==a&&(D.h(a,"boolean",qu,"setsPortSpots"),this.qi=a,this.N())});D.defineProperty(qu,{dG:"linkSpacing"},function(){return this.ss},function(a){this.ss!==a&&(D.h(a,"number",qu,"linkSpacing"),0<=a&&(this.ss=a,this.N()))});D.w(qu,{BJ:"maxLayer"},function(){return this.yb}); -D.w(qu,{UL:"maxIndex"},function(){return this.pw});D.w(qu,{TL:"maxColumn"},function(){return this.Pb});D.w(qu,{ZL:"minIndexLayer"},function(){return this.Bs});D.w(qu,{VL:"maxIndexLayer"},function(){return this.Vf});var ru;qu.CycleDepthFirst=ru=D.s(qu,"CycleDepthFirst",0);var xu;qu.CycleGreedy=xu=D.s(qu,"CycleGreedy",1);var su;qu.LayerOptimalLinkLength=su=D.s(qu,"LayerOptimalLinkLength",0);var Pu;qu.LayerLongestPathSink=Pu=D.s(qu,"LayerLongestPathSink",1);var Ru; +D.defineProperty(qu,{hL:"columnSpacing"},function(){return this.ee},function(a){this.ee!==a&&(D.h(a,"number",qu,"columnSpacing"),0a&&(this.nj=a,this.N()))});D.defineProperty(qu,{Qq:"setsPortSpots"},function(){return this.pi},function(a){this.pi!==a&&(D.h(a,"boolean",qu,"setsPortSpots"),this.pi=a,this.N())});D.defineProperty(qu,{dG:"linkSpacing"},function(){return this.ss},function(a){this.ss!==a&&(D.h(a,"number",qu,"linkSpacing"),0<=a&&(this.ss=a,this.N()))});D.w(qu,{CJ:"maxLayer"},function(){return this.yb}); +D.w(qu,{VL:"maxIndex"},function(){return this.pw});D.w(qu,{UL:"maxColumn"},function(){return this.Pb});D.w(qu,{$L:"minIndexLayer"},function(){return this.Bs});D.w(qu,{WL:"maxIndexLayer"},function(){return this.Vf});var ru;qu.CycleDepthFirst=ru=D.s(qu,"CycleDepthFirst",0);var xu;qu.CycleGreedy=xu=D.s(qu,"CycleGreedy",1);var su;qu.LayerOptimalLinkLength=su=D.s(qu,"LayerOptimalLinkLength",0);var Pu;qu.LayerLongestPathSink=Pu=D.s(qu,"LayerLongestPathSink",1);var Ru; qu.LayerLongestPathSource=Ru=D.s(qu,"LayerLongestPathSource",2);var tu;qu.InitDepthFirstOut=tu=D.s(qu,"InitDepthFirstOut",0);var Xu;qu.InitDepthFirstIn=Xu=D.s(qu,"InitDepthFirstIn",1);var Vu;qu.InitNaive=Vu=D.s(qu,"InitNaive",2);var av;qu.AggressiveNone=av=D.s(qu,"AggressiveNone",0);var uu;qu.AggressiveLess=uu=D.s(qu,"AggressiveLess",1);var bv;qu.AggressiveMore=bv=D.s(qu,"AggressiveMore",2);qu.PackNone=0;var cv;qu.PackExpand=cv=1;var dv;qu.PackStraighten=dv=2;var fv;qu.PackMedian=fv=4;var vu; -qu.PackAll=vu=7;function mv(){this.index=this.Ce=this.ef=this.pe=this.first=this.layer=0;this.link=null;this.Ji=0}D.ke(mv,{layer:!0,first:!0,pe:!0,ef:!0,Ce:!0,index:!0,link:!0,Ji:!0});function wu(){va.call(this)}D.Sa(wu,va);D.ja("LayeredDigraphNetwork",wu);wu.prototype.createVertex=function(){return new pv};wu.prototype.createEdge=function(){return new qv}; -function pv(){wa.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.kq=NaN;this.Dn=0;this.qB=this.rB=null}D.Sa(pv,wa);D.ja("LayeredDigraphVertex",pv);function qv(){xa.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}D.Sa(qv,xa);D.ja("LayeredDigraphEdge",qv); -function Z(){0b.level)return!1;a.removeChild(c.parent,c)}return!0} Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){v&&D.l(a,wv,Z,"removeChild:p");v&&D.l(b,wv,Z,"removeChild:c");for(var c=a.children,d=0,e=0;eg?gw(a,k,ua,C,A):hw(a,k,ua,C,A);ua=A.x;C=A.width;A=A.height;break;case Vv:for(m=0;m=a?0:135>=a?90:225>=a?180:315>=a?270:0} function ew(a){v&&D.l(a,wv,Z,"computeLayerSpacing:v");var b=bw(a),b=90===b||270===b,c=a.layerSpacing;if(0=a&&(this.za.nodeIndentPastParent=a,this.N()))}); @@ -2119,36 +2119,36 @@ D.defineProperty(Z,{breadthLimit:"breadthLimit"},function(){return this.za.bread D.defineProperty(Z,{rowIndent:"rowIndent"},function(){return this.za.rowIndent},function(a){this.za.rowIndent!==a&&(D.h(a,"number",Z,"rowIndent"),0<=a&&(this.za.rowIndent=a,this.N()))});D.defineProperty(Z,{commentSpacing:"commentSpacing"},function(){return this.za.commentSpacing},function(a){this.za.commentSpacing!==a&&(D.h(a,"number",Z,"commentSpacing"),this.za.commentSpacing=a,this.N())}); D.defineProperty(Z,{commentMargin:"commentMargin"},function(){return this.za.commentMargin},function(a){this.za.commentMargin!==a&&(D.h(a,"number",Z,"commentMargin"),this.za.commentMargin=a,this.N())});D.defineProperty(Z,{setsPortSpot:"setsPortSpot"},function(){return this.za.setsPortSpot},function(a){this.za.setsPortSpot!==a&&(D.h(a,"boolean",Z,"setsPortSpot"),this.za.setsPortSpot=a,this.N())}); D.defineProperty(Z,{portSpot:"portSpot"},function(){return this.za.portSpot},function(a){D.l(a,R,Z,"portSpot");this.za.portSpot.P(a)||(this.za.portSpot=a,this.N())});D.defineProperty(Z,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.za.setsChildPortSpot},function(a){this.za.setsChildPortSpot!==a&&(D.h(a,"boolean",Z,"setsChildPortSpot"),this.za.setsChildPortSpot=a,this.N())}); -D.defineProperty(Z,{childPortSpot:"childPortSpot"},function(){return this.za.childPortSpot},function(a){D.l(a,R,Z,"childPortSpot");this.za.childPortSpot.P(a)||(this.za.childPortSpot=a,this.N())});D.defineProperty(Z,{aL:"alternateSorting"},function(){return this.Aa.sorting},function(a){this.Aa.sorting!==a&&(D.Da(a,Z,Z,"alternateSorting"),a===Ov||a===Pv||a===Qv||Rv)&&(this.Aa.sorting=a,this.N())}); -D.defineProperty(Z,{PK:"alternateComparer"},function(){return this.Aa.comparer},function(a){this.Aa.comparer!==a&&(D.h(a,"function",Z,"alternateComparer"),this.Aa.comparer=a,this.N())});D.defineProperty(Z,{JK:"alternateAngle"},function(){return this.Aa.angle},function(a){this.Aa.angle!==a&&(D.h(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.Aa.angle=a,this.N())}); -D.defineProperty(Z,{IK:"alternateAlignment"},function(){return this.Aa.alignment},function(a){this.Aa.alignment!==a&&(D.Da(a,Z,Z,"alternateAlignment"),this.Aa.alignment=a,this.N())});D.defineProperty(Z,{TK:"alternateNodeIndent"},function(){return this.Aa.nodeIndent},function(a){this.Aa.nodeIndent!==a&&(D.h(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.Aa.nodeIndent=a,this.N()))}); -D.defineProperty(Z,{UK:"alternateNodeIndentPastParent"},function(){return this.Aa.nodeIndentPastParent},function(a){this.Aa.nodeIndentPastParent!==a&&(D.h(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.Aa.nodeIndentPastParent=a,this.N()))});D.defineProperty(Z,{VK:"alternateNodeSpacing"},function(){return this.Aa.nodeSpacing},function(a){this.Aa.nodeSpacing!==a&&(D.h(a,"number",Z,"alternateNodeSpacing"),this.Aa.nodeSpacing=a,this.N())}); -D.defineProperty(Z,{RK:"alternateLayerSpacing"},function(){return this.Aa.layerSpacing},function(a){this.Aa.layerSpacing!==a&&(D.h(a,"number",Z,"alternateLayerSpacing"),this.Aa.layerSpacing=a,this.N())});D.defineProperty(Z,{SK:"alternateLayerSpacingParentOverlap"},function(){return this.Aa.layerSpacingParentOverlap},function(a){this.Aa.layerSpacingParentOverlap!==a&&(D.h(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.Aa.layerSpacingParentOverlap=a,this.N()))}); -D.defineProperty(Z,{OK:"alternateCompaction"},function(){return this.Aa.compaction},function(a){this.Aa.compaction!==a&&(D.Da(a,Z,Z,"alternateCompaction"),a===Zv||a===aw)&&(this.Aa.compaction=a,this.N())});D.defineProperty(Z,{KK:"alternateBreadthLimit"},function(){return this.Aa.breadthLimit},function(a){this.Aa.breadthLimit!==a&&(D.h(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.Aa.breadthLimit=a,this.N()))}); -D.defineProperty(Z,{YK:"alternateRowSpacing"},function(){return this.Aa.rowSpacing},function(a){this.Aa.rowSpacing!==a&&(D.h(a,"number",Z,"alternateRowSpacing"),this.Aa.rowSpacing=a,this.N())});D.defineProperty(Z,{XK:"alternateRowIndent"},function(){return this.Aa.rowIndent},function(a){this.Aa.rowIndent!==a&&(D.h(a,"number",Z,"alternateRowIndent"),0<=a&&(this.Aa.rowIndent=a,this.N()))}); -D.defineProperty(Z,{NK:"alternateCommentSpacing"},function(){return this.Aa.commentSpacing},function(a){this.Aa.commentSpacing!==a&&(D.h(a,"number",Z,"alternateCommentSpacing"),this.Aa.commentSpacing=a,this.N())});D.defineProperty(Z,{MK:"alternateCommentMargin"},function(){return this.Aa.commentMargin},function(a){this.Aa.commentMargin!==a&&(D.h(a,"number",Z,"alternateCommentMargin"),this.Aa.commentMargin=a,this.N())}); -D.defineProperty(Z,{$K:"alternateSetsPortSpot"},function(){return this.Aa.setsPortSpot},function(a){this.Aa.setsPortSpot!==a&&(D.h(a,"boolean",Z,"alternateSetsPortSpot"),this.Aa.setsPortSpot=a,this.N())});D.defineProperty(Z,{WK:"alternatePortSpot"},function(){return this.Aa.portSpot},function(a){D.l(a,R,Z,"alternatePortSpot");this.Aa.portSpot.P(a)||(this.Aa.portSpot=a,this.N())}); -D.defineProperty(Z,{ZK:"alternateSetsChildPortSpot"},function(){return this.Aa.setsChildPortSpot},function(a){this.Aa.setsChildPortSpot!==a&&(D.h(a,"boolean",Z,"alternateSetsChildPortSpot"),this.Aa.setsChildPortSpot=a,this.N())});D.defineProperty(Z,{LK:"alternateChildPortSpot"},function(){return this.Aa.childPortSpot},function(a){D.l(a,R,Z,"alternateChildPortSpot");this.Aa.childPortSpot.P(a)||(this.Aa.childPortSpot=a,this.N())});var rv;Z.PathDefault=rv=D.s(Z,"PathDefault",-1);var sv; +D.defineProperty(Z,{childPortSpot:"childPortSpot"},function(){return this.za.childPortSpot},function(a){D.l(a,R,Z,"childPortSpot");this.za.childPortSpot.P(a)||(this.za.childPortSpot=a,this.N())});D.defineProperty(Z,{bL:"alternateSorting"},function(){return this.Aa.sorting},function(a){this.Aa.sorting!==a&&(D.Da(a,Z,Z,"alternateSorting"),a===Ov||a===Pv||a===Qv||Rv)&&(this.Aa.sorting=a,this.N())}); +D.defineProperty(Z,{QK:"alternateComparer"},function(){return this.Aa.comparer},function(a){this.Aa.comparer!==a&&(D.h(a,"function",Z,"alternateComparer"),this.Aa.comparer=a,this.N())});D.defineProperty(Z,{KK:"alternateAngle"},function(){return this.Aa.angle},function(a){this.Aa.angle!==a&&(D.h(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.Aa.angle=a,this.N())}); +D.defineProperty(Z,{JK:"alternateAlignment"},function(){return this.Aa.alignment},function(a){this.Aa.alignment!==a&&(D.Da(a,Z,Z,"alternateAlignment"),this.Aa.alignment=a,this.N())});D.defineProperty(Z,{UK:"alternateNodeIndent"},function(){return this.Aa.nodeIndent},function(a){this.Aa.nodeIndent!==a&&(D.h(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.Aa.nodeIndent=a,this.N()))}); +D.defineProperty(Z,{VK:"alternateNodeIndentPastParent"},function(){return this.Aa.nodeIndentPastParent},function(a){this.Aa.nodeIndentPastParent!==a&&(D.h(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.Aa.nodeIndentPastParent=a,this.N()))});D.defineProperty(Z,{WK:"alternateNodeSpacing"},function(){return this.Aa.nodeSpacing},function(a){this.Aa.nodeSpacing!==a&&(D.h(a,"number",Z,"alternateNodeSpacing"),this.Aa.nodeSpacing=a,this.N())}); +D.defineProperty(Z,{SK:"alternateLayerSpacing"},function(){return this.Aa.layerSpacing},function(a){this.Aa.layerSpacing!==a&&(D.h(a,"number",Z,"alternateLayerSpacing"),this.Aa.layerSpacing=a,this.N())});D.defineProperty(Z,{TK:"alternateLayerSpacingParentOverlap"},function(){return this.Aa.layerSpacingParentOverlap},function(a){this.Aa.layerSpacingParentOverlap!==a&&(D.h(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.Aa.layerSpacingParentOverlap=a,this.N()))}); +D.defineProperty(Z,{PK:"alternateCompaction"},function(){return this.Aa.compaction},function(a){this.Aa.compaction!==a&&(D.Da(a,Z,Z,"alternateCompaction"),a===Zv||a===aw)&&(this.Aa.compaction=a,this.N())});D.defineProperty(Z,{LK:"alternateBreadthLimit"},function(){return this.Aa.breadthLimit},function(a){this.Aa.breadthLimit!==a&&(D.h(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.Aa.breadthLimit=a,this.N()))}); +D.defineProperty(Z,{ZK:"alternateRowSpacing"},function(){return this.Aa.rowSpacing},function(a){this.Aa.rowSpacing!==a&&(D.h(a,"number",Z,"alternateRowSpacing"),this.Aa.rowSpacing=a,this.N())});D.defineProperty(Z,{YK:"alternateRowIndent"},function(){return this.Aa.rowIndent},function(a){this.Aa.rowIndent!==a&&(D.h(a,"number",Z,"alternateRowIndent"),0<=a&&(this.Aa.rowIndent=a,this.N()))}); +D.defineProperty(Z,{OK:"alternateCommentSpacing"},function(){return this.Aa.commentSpacing},function(a){this.Aa.commentSpacing!==a&&(D.h(a,"number",Z,"alternateCommentSpacing"),this.Aa.commentSpacing=a,this.N())});D.defineProperty(Z,{NK:"alternateCommentMargin"},function(){return this.Aa.commentMargin},function(a){this.Aa.commentMargin!==a&&(D.h(a,"number",Z,"alternateCommentMargin"),this.Aa.commentMargin=a,this.N())}); +D.defineProperty(Z,{aL:"alternateSetsPortSpot"},function(){return this.Aa.setsPortSpot},function(a){this.Aa.setsPortSpot!==a&&(D.h(a,"boolean",Z,"alternateSetsPortSpot"),this.Aa.setsPortSpot=a,this.N())});D.defineProperty(Z,{XK:"alternatePortSpot"},function(){return this.Aa.portSpot},function(a){D.l(a,R,Z,"alternatePortSpot");this.Aa.portSpot.P(a)||(this.Aa.portSpot=a,this.N())}); +D.defineProperty(Z,{$K:"alternateSetsChildPortSpot"},function(){return this.Aa.setsChildPortSpot},function(a){this.Aa.setsChildPortSpot!==a&&(D.h(a,"boolean",Z,"alternateSetsChildPortSpot"),this.Aa.setsChildPortSpot=a,this.N())});D.defineProperty(Z,{MK:"alternateChildPortSpot"},function(){return this.Aa.childPortSpot},function(a){D.l(a,R,Z,"alternateChildPortSpot");this.Aa.childPortSpot.P(a)||(this.Aa.childPortSpot=a,this.N())});var rv;Z.PathDefault=rv=D.s(Z,"PathDefault",-1);var sv; Z.PathDestination=sv=D.s(Z,"PathDestination",0);var zv;Z.PathSource=zv=D.s(Z,"PathSource",1);var Ov;Z.SortingForwards=Ov=D.s(Z,"SortingForwards",10);var Pv;Z.SortingReverse=Pv=D.s(Z,"SortingReverse",11);var Qv;Z.SortingAscending=Qv=D.s(Z,"SortingAscending",12);var Rv;Z.SortingDescending=Rv=D.s(Z,"SortingDescending",13);var Tw;Z.AlignmentCenterSubtrees=Tw=D.s(Z,"AlignmentCenterSubtrees",20);var Sv;Z.AlignmentCenterChildren=Sv=D.s(Z,"AlignmentCenterChildren",21);var cw; Z.AlignmentStart=cw=D.s(Z,"AlignmentStart",22);var dw;Z.AlignmentEnd=dw=D.s(Z,"AlignmentEnd",23);var Uv;Z.AlignmentBus=Uv=D.s(Z,"AlignmentBus",24);var Jv;Z.AlignmentBusBranching=Jv=D.s(Z,"AlignmentBusBranching",25);var Vv;Z.AlignmentTopLeftBus=Vv=D.s(Z,"AlignmentTopLeftBus",26);var Wv;Z.AlignmentBottomRightBus=Wv=D.s(Z,"AlignmentBottomRightBus",27);var Zv;Z.CompactionNone=Zv=D.s(Z,"CompactionNone",30);var aw;Z.CompactionBlock=aw=D.s(Z,"CompactionBlock",31);var tv; Z.StyleLayered=tv=D.s(Z,"StyleLayered",40);var Nv;Z.StyleLastParents=Nv=D.s(Z,"StyleLastParents",41);var Mv;Z.StyleAlternating=Mv=D.s(Z,"StyleAlternating",42);var Lv;Z.StyleRootOnly=Lv=D.s(Z,"StyleRootOnly",43);var vv;Z.ArrangementVertical=vv=D.s(Z,"ArrangementVertical",50);var bx;Z.ArrangementHorizontal=bx=D.s(Z,"ArrangementHorizontal",51);var yv;Z.ArrangementFixedRoots=yv=D.s(Z,"ArrangementFixedRoots",52);var uv;Z.LayerIndividual=uv=D.s(Z,"LayerIndividual",60);var Hv; Z.LayerSiblings=Hv=D.s(Z,"LayerSiblings",61);var Gv;Z.LayerUniform=Gv=D.s(Z,"LayerUniform",62);function xv(){va.call(this)}D.Sa(xv,va);D.ja("TreeNetwork",xv);xv.prototype.createVertex=function(){return new wv};xv.prototype.createEdge=function(){return new dx}; -function wv(){wa.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.sa=new O(0,0);this.sb=new Ca(0,0);this.Wa=new O(0,0);this.Lq=this.Kq=this.eK=!1;this.Wu=this.Bu=null;this.sorting=Ov;this.comparer=ys;this.angle=0;this.alignment=Sv;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=aw;this.breadthLimit= +function wv(){wa.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.sa=new O(0,0);this.sb=new Ca(0,0);this.Wa=new O(0,0);this.Lq=this.Kq=this.fK=!1;this.Wu=this.Bu=null;this.sorting=Ov;this.comparer=ys;this.angle=0;this.alignment=Sv;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=aw;this.breadthLimit= 0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=Vc;this.setsChildPortSpot=!0;this.childPortSpot=Vc}D.Sa(wv,wa);D.ja("TreeVertex",wv); wv.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.sorting=a.sorting,this.comparer=a.comparer,this.angle=a.angle,this.alignment=a.alignment,this.nodeIndent=a.nodeIndent,this.nodeIndentPastParent=a.nodeIndentPastParent,this.nodeSpacing=a.nodeSpacing,this.layerSpacing=a.layerSpacing,this.layerSpacingParentOverlap=a.layerSpacingParentOverlap,this.compaction=a.compaction,this.breadthLimit=a.breadthLimit,this.rowSpacing=a.rowSpacing,this.rowIndent=a.rowIndent,this.commentSpacing=a.commentSpacing, -this.commentMargin=a.commentMargin,this.setsPortSpot=a.setsPortSpot,this.portSpot=a.portSpot,this.setsChildPortSpot=a.setsChildPortSpot,this.childPortSpot=a.childPortSpot)};D.w(wv,{Hn:"childrenCount"},function(){return this.children.length});D.defineProperty(wv,{rM:"relativePosition"},function(){return this.sa},function(a){this.sa.set(a)});D.defineProperty(wv,{EM:"subtreeSize"},function(){return this.sb},function(a){this.sb.set(a)}); -D.defineProperty(wv,{DM:"subtreeOffset"},function(){return this.Wa},function(a){this.Wa.set(a)});function dx(){xa.call(this);this.at=new O(0,0)}D.Sa(dx,xa);D.ja("TreeEdge",dx); -dx.prototype.commit=function(){var a=this.link;if(null!==a&&!a.Oh){var b=this.network.Vb,c=null,d=null;switch(b.Sf){case sv:c=this.fromVertex;d=this.toVertex;break;case zv:c=this.toVertex;d=this.fromVertex;break;default:D.k("Unhandled path value "+b.Sf.toString())}if(null!==c&&null!==d)if(b=this.at,0!==b.x||0!==b.y||c.eK){var d=c.mb,e=bw(c),g=ew(c),h=c.rowSpacing;a.Ao();var k=a.gf===Sj,l=a.rc,m=0,n,p;a.ym();if(l||k){for(m=2;4q.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-fw(c))))):c.alignment===cw?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-fw(c))))):c.alignment===cw?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-fw(c))))):c.alignment===cw?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-fw(c))))):c.alignment===cw?(r=d.left+b.x,0===b.x&&n.x=a.length?a.push(c):a.splice(b,0,c):w.k("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Hg:function(a, -b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):w.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},vy:[],K:function(){var a=w.vy.pop();return void 0===a?new z:a},xb:function(a,b){var c=w.vy.pop();if(void 0===c)return new z(a,b);c.x=a;c.y=b;return c},v:function(a){w.vy.push(a)},JB:[],im:function(){var a=w.JB.pop();return void 0===a?new ha:a},Ak:function(a){w.JB.push(a)},wy:[],Ef:function(){var a=w.wy.pop();return void 0===a?new A:a},hg:function(a,b,c,d){var e=w.wy.pop(); -if(void 0===e)return new A(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},Db:function(a){w.wy.push(a)},KB:[],Ff:function(){var a=w.KB.pop();return void 0===a?new ia:a},ue:function(a){w.KB.push(a)},xy:null,s:function(){var a=w.xy;return null!==a?(w.xy=null,a):new ja},q:function(a){a.reset();w.xy=a},IB:[],lb:function(){var a=w.IB.pop();return void 0===a?[]:a},wa:function(a){a.length=0;w.IB.push(a)},io:Object.freeze([]),mm:1,mc:function(a){a.__gohashid=w.mm++},Xp:function(a){var b=a.__gohashid; -void 0===b&&(b=w.mm++,a.__gohashid=b);return b},Kd:function(a){return a.__gohashid},fa:function(a,b){b.Gy=a;da[a]=b},La:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},ji:function(a){a.SG=!0},defineProperty:function(a,b,c,d,e){w.j(a,"function","Util.defineProperty:classfunc");w.j(b,"object","Util.defineProperty:propobj");w.j(c,"function","Util.defineProperty:getter");w.j(d,"function","Util.defineProperty:setter");for(var f in b){b=b[f];c={get:c,set:d, -enumerable:!0};if(void 0!==e)for(var h in e)c[h]=e[h];Object.defineProperty(a.prototype,f,c);e=Object.getOwnPropertyDescriptor(a.prototype,f);b&&e&&Object.defineProperty(a.prototype,b,e);break}},WJ:!1,u:function(a,b,c,d){w.j(a,"function","Util.defineReadOnlyProperty:classfunc");w.j(b,"object","Util.defineReadOnlyProperty:propobj");w.j(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var f=b[e];b={get:c,set:function(a){w.k('The property "'+f+'" is read-only and cannot be set to '+ +Hl:function(a){return Array.prototype.slice.call(a)},Da:function(a,b){Array.isArray(a);return a[b]},mE:function(a,b,c){Array.isArray(a)?a[b]=c:w.k("Cannot replace an object in an HTMLCollection or NodeList at "+b)},El:function(a,b){if(Array.isArray(a))return a.indexOf(b);for(var c=a.length,d=0;d=a.length?a.push(c):a.splice(b,0,c):w.k("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Hg:function(a, +b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):w.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},vy:[],K:function(){var a=w.vy.pop();return void 0===a?new z:a},xb:function(a,b){var c=w.vy.pop();if(void 0===c)return new z(a,b);c.x=a;c.y=b;return c},v:function(a){w.vy.push(a)},JB:[],im:function(){var a=w.JB.pop();return void 0===a?new ha:a},zk:function(a){w.JB.push(a)},wy:[],Ef:function(){var a=w.wy.pop();return void 0===a?new A:a},hg:function(a,b,c,d){var e=w.wy.pop(); +if(void 0===e)return new A(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},Db:function(a){w.wy.push(a)},KB:[],Ff:function(){var a=w.KB.pop();return void 0===a?new ia:a},ue:function(a){w.KB.push(a)},xy:null,s:function(){var a=w.xy;return null!==a?(w.xy=null,a):new ja},q:function(a){a.reset();w.xy=a},IB:[],lb:function(){var a=w.IB.pop();return void 0===a?[]:a},wa:function(a){a.length=0;w.IB.push(a)},ho:Object.freeze([]),mm:1,mc:function(a){a.__gohashid=w.mm++},Wp:function(a){var b=a.__gohashid; +void 0===b&&(b=w.mm++,a.__gohashid=b);return b},Kd:function(a){return a.__gohashid},fa:function(a,b){b.Gy=a;da[a]=b},Ka:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},ji:function(a){a.SG=!0},defineProperty:function(a,b,c,d,e){w.j(a,"function","Util.defineProperty:classfunc");w.j(b,"object","Util.defineProperty:propobj");w.j(c,"function","Util.defineProperty:getter");w.j(d,"function","Util.defineProperty:setter");for(var f in b){b=b[f];c={get:c,set:d, +enumerable:!0};if(void 0!==e)for(var h in e)c[h]=e[h];Object.defineProperty(a.prototype,f,c);e=Object.getOwnPropertyDescriptor(a.prototype,f);b&&e&&Object.defineProperty(a.prototype,b,e);break}},XJ:!1,u:function(a,b,c,d){w.j(a,"function","Util.defineReadOnlyProperty:classfunc");w.j(b,"object","Util.defineReadOnlyProperty:propobj");w.j(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var f=b[e];b={get:c,set:function(a){w.k('The property "'+f+'" is read-only and cannot be set to '+ a)},enumerable:!0};if(void 0!==d)for(var h in d)b[h]=d[h];Object.defineProperty(a.prototype,e,b);d=Object.getOwnPropertyDescriptor(a.prototype,e);f&&d&&Object.defineProperty(a.prototype,f,d);break}},$d:function(a,b){for(var c in b)b[c]=!0;a.prototype.OG=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?w.jf(a):null===a?"*":""},jf:function(a){if("function"===typeof a){if(a.Gy)return a.Gy;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9, c).trim();if(""!==b)return a.Gy=b}else if("object"===typeof a&&a.constructor)return w.jf(a.constructor);return typeof a},p:function(a,b,c){w.j(a,"function","Util.defineEnumValue:classfunc");w.j(b,"string","Util.defineEnumValue:name");w.j(c,"number","Util.defineEnumValue:num");c=new ea(a,b,c);Object.freeze(c);a[b]=c;var d=a.Ru;d instanceof ka||(d=new ka("string",ea),a.Ru=d);d.add(b,c);return c},sb:function(a,b){if(!a||!b)return null;var c=void 0;try{"function"===typeof b?c=b(a):"function"===typeof a.getAttribute? -(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c},Ma:function(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){}},Fu:function(a,b){w.j(a,"object","Setting properties requires Objects as arguments");w.j(b,"object","Setting properties requires Objects as arguments");var c=a instanceof C,d=a instanceof D,e;for(e in b){""===e&&w.k("Setting properties requires non-empty property names");var f=a,h=e;if(c||d){var k= +(c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c},La:function(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){}},Fu:function(a,b){w.j(a,"object","Setting properties requires Objects as arguments");w.j(b,"object","Setting properties requires Objects as arguments");var c=a instanceof C,d=a instanceof D,e;for(e in b){""===e&&w.k("Setting properties requires non-empty property names");var f=a,h=e;if(c||d){var k= e.indexOf(".");if(0c;c++)b[c]=c;for(var d=0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0,f="",h=0;hc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;cc;c++)b[c]=c;for(var d=0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0,f="",h=0;hc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;cd;d++)b[w.Ig("7ca11abfd7330390")](w.Ig(c[d-1]),10,15*d+0);b[w.Ig("7ca11abfd022028846")]=w.Ig("39f046ebb36e4b");for(d=1;5>d;d++)b[w.Ig("7ca11abfd7330390")](w.Ig(c[d- 1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])w.p=function(a,b){var c=new ea(a,b,2);Object.freeze(c);a[b]=c;var d=a.Ru;d instanceof ka||(d=new ka("string",ea),a.Ru=d);d.add(b,c);return c};return a}();function ea(a,b,c){w.mc(this);this.XB=a;this.Qb=b;this.WG=c}w.fa("EnumValue",ea);ea.prototype.toString=function(){return w.jf(this.XB)+"."+this.Qb};w.u(ea,{De:"classType"},function(){return this.XB});w.u(ea,{name:"name"},function(){return this.Qb});w.u(ea,{value:"value"},function(){return this.WG}); var pa;ea.findName=pa=function(a,b){if(void 0===b||null===b||""===b)return null;w.j(a,"function","findName:classfunc");w.j(b,"string","EnumValue.findName:name");var c=a.Ru;return c instanceof ka?c.ja(b):null};function ra(){this.VB=[]}ra.prototype.toString=function(){return this.VB.join("")};ra.prototype.add=function(a){""!==a&&this.VB.push(a)};function sa(){} function ta(a){void 0===a&&(a=42);this.seed=a;this.qy=48271;this.Qu=2147483647;this.HB=this.Qu/this.qy;this.DG=this.Qu%this.qy;this.CG=1/this.Qu;this.random()}ta.prototype.random=function(){var a=this.seed%this.HB*this.qy-this.seed/this.HB*this.DG;this.seed=0this.key)return!1;w.Na(a)}var a=a.n,b=a.length,c=++this.uc,d=this.Wh;if(null!==d)for(;cthis.key)return!1;w.Ma(a)}var a=a.n,b=a.length,c=++this.uc,d=this.Wh;if(null!==d)for(;cthis.key)return!1;w.Na(a)}var b=--this.uc;if(0<=b)return this.key=b,this.value=a.n[b],!0;this.Hf();return!1};Aa.prototype.hasNext=function(){return this.next()}; -Aa.prototype.first=Aa.prototype.first=function(){var a=this.vc;this.Ta=a.C;var b=a.n;this.uc=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};Aa.prototype.any=function(a){var b=this.vc;b.Li=null;var c=b.C,d=b.n,e=d.length;this.uc=e;for(e-=1;0<=e;e--){if(a(d[e]))return!0;b.C!==c&&w.Na(b)}return!1};Aa.prototype.all=function(a){var b=this.vc;b.Li=null;var c=b.C,d=b.n,e=d.length;this.uc=e;for(e-=1;0<=e;e--){if(!a(d[e]))return!1;b.C!==c&&w.Na(b)}return!0}; -Aa.prototype.each=function(a){var b=this.vc;b.Li=null;var c=b.C,d=b.n,e=d.length;this.uc=e;for(e-=1;0<=e;e--)a(d[e]),b.C!==c&&w.Na(b);return this};Aa.prototype.map=function(a){var b=this.vc;b.Li=null;var c=b.C,d=[],e=b.n,f=e.length;this.uc=f;for(f-=1;0<=f;f--)d.push(a(e[f])),b.C!==c&&w.Na(b);a=new I;a.n=d;a.Fc();return a.i}; -Aa.prototype.filter=function(a){var b=this.vc;b.Li=null;var c=b.C,d=[],e=b.n,f=e.length;this.uc=f;for(f-=1;0<=f;f--){var h=e[f];a(h)&&d.push(h);b.C!==c&&w.Na(b)}a=new I(b.ma);a.n=d;a.Fc();return a.i};Aa.prototype.concat=function(a){this.vc.Li=null;return new xa(this,a.i)};w.u(Aa,{count:"count"},function(){return this.vc.n.length});Aa.prototype.Hf=function(){this.key=-1;this.value=null;this.Ta=-1;this.vc.Li=this}; +w.u(Aa,{i:"iterator"},function(){return this});Aa.prototype.reset=Aa.prototype.reset=function(){var a=this.vc;a.Li=null;this.Ta=a.C;this.uc=a.n.length};Aa.prototype.next=Aa.prototype.next=function(){var a=this.vc;if(a.C!==this.Ta){if(0>this.key)return!1;w.Ma(a)}var b=--this.uc;if(0<=b)return this.key=b,this.value=a.n[b],!0;this.Hf();return!1};Aa.prototype.hasNext=function(){return this.next()}; +Aa.prototype.first=Aa.prototype.first=function(){var a=this.vc;this.Ta=a.C;var b=a.n;this.uc=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};Aa.prototype.any=function(a){var b=this.vc;b.Li=null;var c=b.C,d=b.n,e=d.length;this.uc=e;for(e-=1;0<=e;e--){if(a(d[e]))return!0;b.C!==c&&w.Ma(b)}return!1};Aa.prototype.all=function(a){var b=this.vc;b.Li=null;var c=b.C,d=b.n,e=d.length;this.uc=e;for(e-=1;0<=e;e--){if(!a(d[e]))return!1;b.C!==c&&w.Ma(b)}return!0}; +Aa.prototype.each=function(a){var b=this.vc;b.Li=null;var c=b.C,d=b.n,e=d.length;this.uc=e;for(e-=1;0<=e;e--)a(d[e]),b.C!==c&&w.Ma(b);return this};Aa.prototype.map=function(a){var b=this.vc;b.Li=null;var c=b.C,d=[],e=b.n,f=e.length;this.uc=f;for(f-=1;0<=f;f--)d.push(a(e[f])),b.C!==c&&w.Ma(b);a=new I;a.n=d;a.Fc();return a.i}; +Aa.prototype.filter=function(a){var b=this.vc;b.Li=null;var c=b.C,d=[],e=b.n,f=e.length;this.uc=f;for(f-=1;0<=f;f--){var h=e[f];a(h)&&d.push(h);b.C!==c&&w.Ma(b)}a=new I(b.ma);a.n=d;a.Fc();return a.i};Aa.prototype.concat=function(a){this.vc.Li=null;return new xa(this,a.i)};w.u(Aa,{count:"count"},function(){return this.vc.n.length});Aa.prototype.Hf=function(){this.key=-1;this.value=null;this.Ta=-1;this.vc.Li=this}; Aa.prototype.toString=function(){return"ListIteratorBackwards("+this.uc+"/"+this.vc.count+")"}; function I(a){w.mc(this);this.Q=!1;this.n=[];this.C=0;this.Li=this.Ob=null;void 0===a||null===a?this.ma=null:"string"===typeof a?"object"===a||"string"===a||"number"===a||"boolean"===a||"function"===a?this.ma=a:w.Ea(a,"the string 'object', 'number', 'string', 'boolean', or 'function'","List constructor: type"):"function"===typeof a?this.ma=a===Object?"object":a===String?"string":a===Number?"number":a===Boolean?"boolean":a===Function?"function":a:w.Ea(a,"null, a primitive type name, or a class type", "List constructor: type")}w.fa("List",I);I.prototype.Fc=function(){var a=this.C;a++;999999999a||a>=b.length)&&w.Ea(a,"0 <= i < length",I,"elt:i");return b[a]};I.prototype.get=I.prototype.get=function(a){return this.da(a)};I.prototype.setElt=I.prototype.gg=function(a,b){var c=this.n;(0>a||a>=c.length)&&w.Ea(a,"0 <= i < length",I,"setElt:i");this.Q&&w.la(this,a);c[a]=b};I.prototype.set=I.prototype.set=function(a,b){this.gg(a,b)}; -I.prototype.first=I.prototype.first=function(){var a=this.n;return 0===a.length?null:a[0]};I.prototype.last=I.prototype.ee=function(){var a=this.n,b=a.length;return 0a&&w.Ea(a,">= 0",I,"insertAt:i");this.Q&&w.la(this,a);var c=this.n;a>=c.length?c.push(b):c.splice(a,0,b);this.Fc();return!0}; +I.prototype.indexOf=I.prototype.indexOf=function(a){return null===a?-1:this.n.indexOf(a)};I.prototype.elt=I.prototype.ea=function(a){var b=this.n;(0>a||a>=b.length)&&w.Ea(a,"0 <= i < length",I,"elt:i");return b[a]};I.prototype.get=I.prototype.get=function(a){return this.ea(a)};I.prototype.setElt=I.prototype.gg=function(a,b){var c=this.n;(0>a||a>=c.length)&&w.Ea(a,"0 <= i < length",I,"setElt:i");this.Q&&w.la(this,a);c[a]=b};I.prototype.set=I.prototype.set=function(a,b){this.gg(a,b)}; +I.prototype.first=I.prototype.first=function(){var a=this.n;return 0===a.length?null:a[0]};I.prototype.last=I.prototype.ee=function(){var a=this.n,b=a.length;return 0a&&w.Ea(a,">= 0",I,"insertAt:i");this.Q&&w.la(this,a);var c=this.n;a>=c.length?c.push(b):c.splice(a,0,b);this.Fc();return!0}; I.prototype.remove=I.prototype["delete"]=I.prototype.remove=function(a){if(null===a)return!1;this.Q&&w.la(this,a);var b=this.n;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.Fc();return!0};I.prototype.removeAt=I.prototype.Yc=function(a){var b=this.n;(0>a||a>=b.length)&&w.Ea(a,"0 <= i < length",I,"removeAt:i");this.Q&&w.la(this,a);a===b.length-1?b.pop():b.splice(a,1);this.Fc()}; I.prototype.removeRange=I.prototype.removeRange=function(a,b){var c=this.n,d=c.length;if(0>a)a=0;else if(a>=d)return this;if(0>b)return this;b>=d&&(b=d-1);if(a>b)return this;this.Q&&w.la(this);for(var e=a,f=b+1;f=f)return this;(0>b||b>=e-1)&&w.Ea(b,"0 <= from < length",I,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0=e)d.sort(a);else for(f=d.slice(0,c),f.sort(a),a=0;a=e)for(f=d.slice(b),f.sort(a),a=b;a=this.n.length)return va;var a=this.Ob;return null!==a?(a.reset(),a):new ya(this)}); -w.u(I,{In:"iteratorBackwards"},function(){if(0>=this.n.length)return va;var a=this.Li;return null!==a?(a.reset(),a):new Aa(this)});function Ba(a){this.Yh=a;a.Ob=null;this.Ta=a.C;this.Va=null}w.$d(Ba,{key:!0,value:!0});w.u(Ba,{i:"iterator"},function(){return this});Ba.prototype.reset=Ba.prototype.reset=function(){var a=this.Yh;a.Ob=null;this.Ta=a.C;this.Va=null}; -Ba.prototype.next=Ba.prototype.next=function(){var a=this.Yh;if(a.C!==this.Ta){if(null===this.key)return!1;w.Na(a)}var b=this.Va,b=null===b?a.Ca:b.Xa;if(null!==b)return this.Va=b,this.value=b.value,this.key=b.key,!0;this.Hf();return!1};Ba.prototype.hasNext=function(){return this.next()};Ba.prototype.first=Ba.prototype.first=function(){var a=this.Yh;this.Ta=a.C;a=a.Ca;if(null!==a){this.Va=a;var b=a.value;this.key=a.key;return this.value=b}return null}; -Ba.prototype.any=function(a){var b=this.Yh;b.Ob=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(a(d.value))return!0;b.C!==c&&w.Na(b);d=d.Xa}return!1};Ba.prototype.all=function(a){var b=this.Yh;b.Ob=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(!a(d.value))return!1;b.C!==c&&w.Na(b);d=d.Xa}return!0};Ba.prototype.each=function(a){var b=this.Yh;b.Ob=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;)a(d.value),b.C!==c&&w.Na(b),d=d.Xa;return this}; -Ba.prototype.map=function(a){var b=this.Yh;b.Ob=null;for(var c=new I,d=b.C,e=b.Ca;null!==e;)c.add(a(e.value)),b.C!==d&&w.Na(b),e=e.Xa;return c.i};Ba.prototype.filter=function(a){var b=this.Yh;b.Ob=null;for(var c=new I(b.ma),d=b.C,e=b.Ca;null!==e;){var f=e.value;a(f)&&c.add(f);b.C!==d&&w.Na(b);e=e.Xa}return c.i};Ba.prototype.concat=function(a){this.Yh.Ob=null;return new xa(this,a.i)};w.u(Ba,{count:"count"},function(){return this.Yh.nd}); +w.u(I,{Hn:"iteratorBackwards"},function(){if(0>=this.n.length)return va;var a=this.Li;return null!==a?(a.reset(),a):new Aa(this)});function Ba(a){this.Yh=a;a.Ob=null;this.Ta=a.C;this.Va=null}w.$d(Ba,{key:!0,value:!0});w.u(Ba,{i:"iterator"},function(){return this});Ba.prototype.reset=Ba.prototype.reset=function(){var a=this.Yh;a.Ob=null;this.Ta=a.C;this.Va=null}; +Ba.prototype.next=Ba.prototype.next=function(){var a=this.Yh;if(a.C!==this.Ta){if(null===this.key)return!1;w.Ma(a)}var b=this.Va,b=null===b?a.Ca:b.Xa;if(null!==b)return this.Va=b,this.value=b.value,this.key=b.key,!0;this.Hf();return!1};Ba.prototype.hasNext=function(){return this.next()};Ba.prototype.first=Ba.prototype.first=function(){var a=this.Yh;this.Ta=a.C;a=a.Ca;if(null!==a){this.Va=a;var b=a.value;this.key=a.key;return this.value=b}return null}; +Ba.prototype.any=function(a){var b=this.Yh;b.Ob=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(a(d.value))return!0;b.C!==c&&w.Ma(b);d=d.Xa}return!1};Ba.prototype.all=function(a){var b=this.Yh;b.Ob=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(!a(d.value))return!1;b.C!==c&&w.Ma(b);d=d.Xa}return!0};Ba.prototype.each=function(a){var b=this.Yh;b.Ob=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;)a(d.value),b.C!==c&&w.Ma(b),d=d.Xa;return this}; +Ba.prototype.map=function(a){var b=this.Yh;b.Ob=null;for(var c=new I,d=b.C,e=b.Ca;null!==e;)c.add(a(e.value)),b.C!==d&&w.Ma(b),e=e.Xa;return c.i};Ba.prototype.filter=function(a){var b=this.Yh;b.Ob=null;for(var c=new I(b.ma),d=b.C,e=b.Ca;null!==e;){var f=e.value;a(f)&&c.add(f);b.C!==d&&w.Ma(b);e=e.Xa}return c.i};Ba.prototype.concat=function(a){this.Yh.Ob=null;return new xa(this,a.i)};w.u(Ba,{count:"count"},function(){return this.Yh.nd}); Ba.prototype.Hf=function(){this.value=this.key=null;this.Ta=-1;this.Yh.Ob=this};Ba.prototype.toString=function(){return null!==this.Va?"SetIterator@"+this.Va.value:"SetIterator"}; function J(a){w.mc(this);this.Q=!1;void 0===a||null===a?this.ma=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ma=a:w.Ea(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.ma=a===Object?"object":a===String?"string":a===Number?"number":a:w.Ea(a,"null, a primitive type name, or a class type","Set constructor: type");this.od={};this.nd=0;this.Ob=null;this.C=0;this.Rh=this.Ca=null}w.fa("Set",J); J.prototype.Fc=function(){var a=this.C;a++;999999999=this.nd)return va;var a=this.Ob;return null!==a?(a.reset(),a):new Ba(this)});function Da(a){this.Fa=a;this.Ta=a.C;this.Va=null}w.$d(Da,{key:!0,value:!0});w.u(Da,{i:"iterator"},function(){return this});Da.prototype.reset=Da.prototype.reset=function(){this.Ta=this.Fa.C;this.Va=null}; -Da.prototype.next=Da.prototype.next=function(){var a=this.Fa;if(a.C!==this.Ta){if(null===this.key)return!1;w.Na(a)}var b=this.Va,b=null===b?a.Ca:b.Xa;if(null!==b)return this.Va=b,this.value=this.key=a=b.key,!0;this.Hf();return!1};Da.prototype.hasNext=function(){return this.next()};Da.prototype.first=Da.prototype.first=function(){var a=this.Fa;this.Ta=a.C;a=a.Ca;return null!==a?(this.Va=a,this.value=this.key=a=a.key):null}; -Da.prototype.any=function(a){var b=this.Fa,c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(a(d.key))return!0;b.C!==c&&w.Na(b);d=d.Xa}return!1};Da.prototype.all=function(a){var b=this.Fa,c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(!a(d.key))return!1;b.C!==c&&w.Na(b);d=d.Xa}return!0};Da.prototype.each=function(a){var b=this.Fa,c=b.C;this.Va=null;for(var d=b.Ca;null!==d;)a(d.key),b.C!==c&&w.Na(b),d=d.Xa;return this}; -Da.prototype.map=function(a){var b=this.Fa,c=b.C;this.Va=null;for(var d=new I,e=b.Ca;null!==e;)d.add(a(e.key)),b.C!==c&&w.Na(b),e=e.Xa;return d.i};Da.prototype.filter=function(a){var b=this.Fa,c=b.C;this.Va=null;for(var d=new I(b.Qh),e=b.Ca;null!==e;){var f=e.key;a(f)&&d.add(f);b.C!==c&&w.Na(b);e=e.Xa}return d.i};Da.prototype.concat=function(a){return new xa(this,a.i)};w.u(Da,{count:"count"},function(){return this.Fa.nd});Da.prototype.Hf=function(){this.value=this.key=null;this.Ta=-1}; -Da.prototype.toString=function(){return null!==this.Va?"MapKeySetIterator@"+this.Va.value:"MapKeySetIterator"};function Ea(a){w.mc(this);this.Q=!0;this.Fa=a}w.La(Ea,J);Ea.prototype.freeze=function(){return this};Ea.prototype.Ra=function(){return this};Ea.prototype.toString=function(){return"MapKeySet("+this.Fa.toString()+")"};Ea.prototype.add=Ea.prototype.add=function(){w.k("This Set is read-only: "+this.toString());return!1}; +Da.prototype.next=Da.prototype.next=function(){var a=this.Fa;if(a.C!==this.Ta){if(null===this.key)return!1;w.Ma(a)}var b=this.Va,b=null===b?a.Ca:b.Xa;if(null!==b)return this.Va=b,this.value=this.key=a=b.key,!0;this.Hf();return!1};Da.prototype.hasNext=function(){return this.next()};Da.prototype.first=Da.prototype.first=function(){var a=this.Fa;this.Ta=a.C;a=a.Ca;return null!==a?(this.Va=a,this.value=this.key=a=a.key):null}; +Da.prototype.any=function(a){var b=this.Fa,c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(a(d.key))return!0;b.C!==c&&w.Ma(b);d=d.Xa}return!1};Da.prototype.all=function(a){var b=this.Fa,c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(!a(d.key))return!1;b.C!==c&&w.Ma(b);d=d.Xa}return!0};Da.prototype.each=function(a){var b=this.Fa,c=b.C;this.Va=null;for(var d=b.Ca;null!==d;)a(d.key),b.C!==c&&w.Ma(b),d=d.Xa;return this}; +Da.prototype.map=function(a){var b=this.Fa,c=b.C;this.Va=null;for(var d=new I,e=b.Ca;null!==e;)d.add(a(e.key)),b.C!==c&&w.Ma(b),e=e.Xa;return d.i};Da.prototype.filter=function(a){var b=this.Fa,c=b.C;this.Va=null;for(var d=new I(b.Qh),e=b.Ca;null!==e;){var f=e.key;a(f)&&d.add(f);b.C!==c&&w.Ma(b);e=e.Xa}return d.i};Da.prototype.concat=function(a){return new xa(this,a.i)};w.u(Da,{count:"count"},function(){return this.Fa.nd});Da.prototype.Hf=function(){this.value=this.key=null;this.Ta=-1}; +Da.prototype.toString=function(){return null!==this.Va?"MapKeySetIterator@"+this.Va.value:"MapKeySetIterator"};function Ea(a){w.mc(this);this.Q=!0;this.Fa=a}w.Ka(Ea,J);Ea.prototype.freeze=function(){return this};Ea.prototype.Ra=function(){return this};Ea.prototype.toString=function(){return"MapKeySet("+this.Fa.toString()+")"};Ea.prototype.add=Ea.prototype.add=function(){w.k("This Set is read-only: "+this.toString());return!1}; Ea.prototype.set=Ea.prototype.set=function(){w.k("This Set is read-only: "+this.toString());return!1};Ea.prototype.contains=Ea.prototype.contains=function(a){return this.Fa.contains(a)};Ea.prototype.has=Ea.prototype.has=function(a){return this.contains(a)};Ea.prototype.remove=Ea.prototype["delete"]=Ea.prototype.remove=function(){w.k("This Set is read-only: "+this.toString());return!1};Ea.prototype.clear=Ea.prototype.clear=function(){w.k("This Set is read-only: "+this.toString())}; Ea.prototype.first=Ea.prototype.first=function(){var a=this.Fa.Ca;return null!==a?a.key:null};Ea.prototype.any=function(a){for(var b=this.Fa.Ca;null!==b;){if(a(b.key))return!0;b=b.Xa}return!1};Ea.prototype.all=function(a){for(var b=this.Fa.Ca;null!==b;){if(!a(b.key))return!1;b=b.Xa}return!0};Ea.prototype.each=function(a){for(var b=this.Fa.Ca;null!==b;)a(b.key),b=b.Xa;return this};Ea.prototype.map=function(a){for(var b=new J,c=this.Fa.Ca;null!==c;)b.add(a(c.key)),c=c.Xa;return b}; Ea.prototype.filter=function(a){for(var b=new J(this.Fa.Qh),c=this.Fa.Ca;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.Xa}return b};Ea.prototype.concat=function(a){return this.rG().Hc(a)};Ea.prototype.copy=function(){return new Ea(this.Fa)};Ea.prototype.toSet=Ea.prototype.rG=function(){var a=new J(this.Fa.Qh),b=this.Fa.od,c;for(c in b)a.add(b[c].key);return a};Ea.prototype.toArray=Ea.prototype.ec=function(){var a=this.Fa.od,b=Array(this.Fa.nd),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; Ea.prototype.toList=function(){var a=new I(this.Fa.Qh),b=this.Fa.od,c;for(c in b)a.add(b[c].key);return a};w.u(Ea,{count:"count"},function(){return this.Fa.nd});w.u(Ea,{size:"size"},function(){return this.Fa.nd});w.u(Ea,{i:"iterator"},function(){return 0>=this.Fa.nd?va:new Da(this.Fa)});function Fa(a){this.Fa=a;a.Mi=null;this.Ta=a.C;this.Va=null}w.$d(Fa,{key:!0,value:!0});w.u(Fa,{i:"iterator"},function(){return this}); -Fa.prototype.reset=Fa.prototype.reset=function(){var a=this.Fa;a.Mi=null;this.Ta=a.C;this.Va=null};Fa.prototype.next=Fa.prototype.next=function(){var a=this.Fa;if(a.C!==this.Ta){if(null===this.key)return!1;w.Na(a)}var b=this.Va,b=null===b?a.Ca:b.Xa;if(null!==b)return this.Va=b,this.value=b.value,this.key=b.key,!0;this.Hf();return!1};Fa.prototype.hasNext=function(){return this.next()}; -Fa.prototype.first=Fa.prototype.first=function(){var a=this.Fa;this.Ta=a.C;a=a.Ca;if(null!==a){this.Va=a;var b=a.value;this.key=a.key;return this.value=b}return null};Fa.prototype.any=function(a){var b=this.Fa;b.Mi=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(a(d.value))return!0;b.C!==c&&w.Na(b);d=d.Xa}return!1};Fa.prototype.all=function(a){var b=this.Fa;b.Mi=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(!a(d.value))return!1;b.C!==c&&w.Na(b);d=d.Xa}return!0}; -Fa.prototype.each=function(a){var b=this.Fa;b.Mi=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;)a(d.value),b.C!==c&&w.Na(b),d=d.Xa;return this};Fa.prototype.map=function(a){var b=this.Fa;b.Mi=null;var c=b.C;this.Va=null;for(var d=new I,e=b.Ca;null!==e;)d.add(a(e.value)),b.C!==c&&w.Na(b),e=e.Xa;return d.i};Fa.prototype.filter=function(a){var b=this.Fa;b.Mi=null;var c=b.C;this.Va=null;for(var d=new I(b.Qh),e=b.Ca;null!==e;){var f=e.value;a(f)&&d.add(f);b.C!==c&&w.Na(b);e=e.Xa}return d.i}; -Fa.prototype.concat=function(a){this.Fa.Mi=null;return new xa(this,a.i)};w.u(Fa,{count:"count"},function(){return this.Fa.nd});Fa.prototype.Hf=function(){this.value=this.key=null;this.Ta=-1;this.Fa.Mi=this};Fa.prototype.toString=function(){return null!==this.Va?"MapValueSetIterator@"+this.Va.value:"MapValueSetIterator"};function Ca(a,b){this.key=a;this.value=b;this.jp=this.Xa=null}w.$d(Ca,{key:!0,value:!0});Ca.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"}; -function Ga(a){this.Fa=a;a.Ob=null;this.Ta=a.C;this.Va=null}w.$d(Ga,{key:!0,value:!0});w.u(Ga,{i:"iterator"},function(){return this});Ga.prototype.reset=Ga.prototype.reset=function(){var a=this.Fa;a.Ob=null;this.Ta=a.C;this.Va=null};Ga.prototype.next=Ga.prototype.next=function(){var a=this.Fa;if(a.C!==this.Ta){if(null===this.key)return!1;w.Na(a)}var b=this.Va,b=null===b?a.Ca:b.Xa;if(null!==b)return this.Va=b,this.key=b.key,this.value=b.value,!0;this.Hf();return!1};Ga.prototype.hasNext=function(){return this.next()}; -Ga.prototype.first=Ga.prototype.first=function(){var a=this.Fa;this.Ta=a.C;a=a.Ca;return null!==a?(this.Va=a,this.key=a.key,this.value=a.value,a):null};Ga.prototype.any=function(a){var b=this.Fa;b.Ob=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(a(d))return!0;b.C!==c&&w.Na(b);d=d.Xa}return!1};Ga.prototype.all=function(a){var b=this.Fa;b.Ob=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(!a(d))return!1;b.C!==c&&w.Na(b);d=d.Xa}return!0}; -Ga.prototype.each=function(a){var b=this.Fa;b.Ob=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;)a(d),b.C!==c&&w.Na(b),d=d.Xa;return this};Ga.prototype.map=function(a){var b=this.Fa;b.Ob=null;var c=b.C;this.Va=null;for(var d=new I,e=b.Ca;null!==e;)d.add(a(e)),b.C!==c&&w.Na(b),e=e.Xa;return d.i};Ga.prototype.filter=function(a){var b=this.Fa;b.Ob=null;var c=b.C;this.Va=null;for(var d=new I,e=b.Ca;null!==e;)a(e)&&d.add(e),b.C!==c&&w.Na(b),e=e.Xa;return d.i}; +Fa.prototype.reset=Fa.prototype.reset=function(){var a=this.Fa;a.Mi=null;this.Ta=a.C;this.Va=null};Fa.prototype.next=Fa.prototype.next=function(){var a=this.Fa;if(a.C!==this.Ta){if(null===this.key)return!1;w.Ma(a)}var b=this.Va,b=null===b?a.Ca:b.Xa;if(null!==b)return this.Va=b,this.value=b.value,this.key=b.key,!0;this.Hf();return!1};Fa.prototype.hasNext=function(){return this.next()}; +Fa.prototype.first=Fa.prototype.first=function(){var a=this.Fa;this.Ta=a.C;a=a.Ca;if(null!==a){this.Va=a;var b=a.value;this.key=a.key;return this.value=b}return null};Fa.prototype.any=function(a){var b=this.Fa;b.Mi=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(a(d.value))return!0;b.C!==c&&w.Ma(b);d=d.Xa}return!1};Fa.prototype.all=function(a){var b=this.Fa;b.Mi=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(!a(d.value))return!1;b.C!==c&&w.Ma(b);d=d.Xa}return!0}; +Fa.prototype.each=function(a){var b=this.Fa;b.Mi=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;)a(d.value),b.C!==c&&w.Ma(b),d=d.Xa;return this};Fa.prototype.map=function(a){var b=this.Fa;b.Mi=null;var c=b.C;this.Va=null;for(var d=new I,e=b.Ca;null!==e;)d.add(a(e.value)),b.C!==c&&w.Ma(b),e=e.Xa;return d.i};Fa.prototype.filter=function(a){var b=this.Fa;b.Mi=null;var c=b.C;this.Va=null;for(var d=new I(b.Qh),e=b.Ca;null!==e;){var f=e.value;a(f)&&d.add(f);b.C!==c&&w.Ma(b);e=e.Xa}return d.i}; +Fa.prototype.concat=function(a){this.Fa.Mi=null;return new xa(this,a.i)};w.u(Fa,{count:"count"},function(){return this.Fa.nd});Fa.prototype.Hf=function(){this.value=this.key=null;this.Ta=-1;this.Fa.Mi=this};Fa.prototype.toString=function(){return null!==this.Va?"MapValueSetIterator@"+this.Va.value:"MapValueSetIterator"};function Ca(a,b){this.key=a;this.value=b;this.ip=this.Xa=null}w.$d(Ca,{key:!0,value:!0});Ca.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"}; +function Ga(a){this.Fa=a;a.Ob=null;this.Ta=a.C;this.Va=null}w.$d(Ga,{key:!0,value:!0});w.u(Ga,{i:"iterator"},function(){return this});Ga.prototype.reset=Ga.prototype.reset=function(){var a=this.Fa;a.Ob=null;this.Ta=a.C;this.Va=null};Ga.prototype.next=Ga.prototype.next=function(){var a=this.Fa;if(a.C!==this.Ta){if(null===this.key)return!1;w.Ma(a)}var b=this.Va,b=null===b?a.Ca:b.Xa;if(null!==b)return this.Va=b,this.key=b.key,this.value=b.value,!0;this.Hf();return!1};Ga.prototype.hasNext=function(){return this.next()}; +Ga.prototype.first=Ga.prototype.first=function(){var a=this.Fa;this.Ta=a.C;a=a.Ca;return null!==a?(this.Va=a,this.key=a.key,this.value=a.value,a):null};Ga.prototype.any=function(a){var b=this.Fa;b.Ob=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(a(d))return!0;b.C!==c&&w.Ma(b);d=d.Xa}return!1};Ga.prototype.all=function(a){var b=this.Fa;b.Ob=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;){if(!a(d))return!1;b.C!==c&&w.Ma(b);d=d.Xa}return!0}; +Ga.prototype.each=function(a){var b=this.Fa;b.Ob=null;var c=b.C;this.Va=null;for(var d=b.Ca;null!==d;)a(d),b.C!==c&&w.Ma(b),d=d.Xa;return this};Ga.prototype.map=function(a){var b=this.Fa;b.Ob=null;var c=b.C;this.Va=null;for(var d=new I,e=b.Ca;null!==e;)d.add(a(e)),b.C!==c&&w.Ma(b),e=e.Xa;return d.i};Ga.prototype.filter=function(a){var b=this.Fa;b.Ob=null;var c=b.C;this.Va=null;for(var d=new I,e=b.Ca;null!==e;)a(e)&&d.add(e),b.C!==c&&w.Ma(b),e=e.Xa;return d.i}; Ga.prototype.concat=function(a){this.Fa.Ob=null;return new xa(this,a.i)};w.u(Ga,{count:"count"},function(){return this.Fa.nd});Ga.prototype.Hf=function(){this.value=this.key=null;this.Ta=-1;this.Fa.Ob=this};Ga.prototype.toString=function(){return null!==this.Va?"MapIterator@"+this.Va:"MapIterator"}; function ka(a,b){w.mc(this);this.Q=!1;void 0===a||null===a?this.Qh=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.Qh=a:w.Ea(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.Qh=a===Object?"object":a===String?"string":a===Number?"number":a:w.Ea(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.pt=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"=== b||"function"===b?this.pt=b:w.Ea(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.pt=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:w.Ea(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.od={};this.nd=0;this.Mi=this.Ob=null;this.C=0;this.Rh=this.Ca=null}w.fa("Map",ka); ka.prototype.Fc=function(){var a=this.C;a++;999999999=this.count)return va;var a=this.Ob;return null!==a?(a.reset(),a):new Ga(this)});w.u(ka,{sF:"iteratorKeys"},function(){return 0>=this.count?va:new Da(this)});w.u(ka,{tF:"iteratorValues"},function(){if(0>=this.count)return va;var a=this.Mi;return null!==a?(a.reset(),a):new Fa(this)});function z(a,b){void 0===a?this.y=this.x=0:(this.x=a,this.y=b)}w.fa("Point",z);w.ji(z);w.$d(z,{x:!0,y:!0});z.prototype.assign=function(a){this.x=a.x;this.y=a.y}; z.prototype.setTo=z.prototype.m=function(a,b){this.x=a;this.y=b;return this};z.prototype.set=z.prototype.set=function(a){this.x=a.x;this.y=a.y;return this};z.prototype.copy=function(){var a=new z;a.x=this.x;a.y=this.y;return a};z.prototype.Ga=function(){Object.freeze(this);return this};z.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};z.prototype.freeze=function(){return this};z.prototype.Ra=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this}; z.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new z(c,e)}return new z};z.stringify=function(a){return a.x.toString()+" "+a.y.toString()};z.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};z.prototype.equals=z.prototype.L=function(a){return a instanceof z?this.x===a.x&&this.y===a.y:!1}; -z.prototype.equalTo=z.prototype.hx=function(a,b){return this.x===a&&this.y===b};z.prototype.equalsApprox=z.prototype.Ic=function(a){return K(this.x,a.x)&&K(this.y,a.y)};z.prototype.add=z.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};z.prototype.subtract=z.prototype.$n=function(a){this.x-=a.x;this.y-=a.y;return this};z.prototype.offset=z.prototype.offset=function(a,b){this.x+=a;this.y+=b;return this}; +z.prototype.equalTo=z.prototype.hx=function(a,b){return this.x===a&&this.y===b};z.prototype.equalsApprox=z.prototype.Ic=function(a){return K(this.x,a.x)&&K(this.y,a.y)};z.prototype.add=z.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};z.prototype.subtract=z.prototype.Zn=function(a){this.x-=a.x;this.y-=a.y;return this};z.prototype.offset=z.prototype.offset=function(a,b){this.x+=a;this.y+=b;return this}; z.prototype.rotate=z.prototype.rotate=function(a){if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;var d=0,e=0;360<=a?a-=360:0>a&&(a+=360);90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(a=a*Math.PI/180,d=Math.cos(a),e=Math.sin(a));this.x=d*b-e*c;this.y=e*b+d*c;return this};z.prototype.scale=z.prototype.scale=function(a,b){this.x*=a;this.y*=b;return this};z.prototype.distanceSquaredPoint=z.prototype.vf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a}; -z.prototype.distanceSquared=z.prototype.Rp=function(a,b){var c=a-this.x,d=b-this.y;return c*c+d*d};z.prototype.normalize=z.prototype.normalize=function(){var a=this.x,b=this.y,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}z.prototype.projectOntoLineSegment=function(a,b,c,d){Ia(a,b,c,d,this.x,this.y,this);return this};z.prototype.projectOntoLineSegmentPoint=function(a,b){Ia(a.x,a.y,b.x,b.y,this.x,this.y,this);return this};z.prototype.snapToGrid=function(a,b,c,d){Ka(this.x,this.y,a,b,c,d,this);return this}; -z.prototype.snapToGridPoint=function(a,b){Ka(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};z.prototype.setRectSpot=z.prototype.Xn=function(a,b){this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};z.prototype.setSpot=z.prototype.Hu=function(a,b,c,d,e){this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this};z.prototype.transform=function(a){a.nb(this);return this};function La(a,b){b.li(a);return a}var Ma; +z.prototype.snapToGridPoint=function(a,b){Ka(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};z.prototype.setRectSpot=z.prototype.Wn=function(a,b){this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};z.prototype.setSpot=z.prototype.Hu=function(a,b,c,d,e){this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this};z.prototype.transform=function(a){a.nb(this);return this};function La(a,b){b.li(a);return a}var Ma; z.distanceLineSegmentSquared=Ma=function(a,b,c,d,e,f){var h=e-c,k=f-d,l=h*h+k*k;c-=a;d-=b;var m=-c*h-d*k;if(0>=m||m>=l)return h=e-a,k=f-b,Math.min(c*c+d*d,h*h+k*k);a=h*d-k*c;return a*a/l};var Na;z.distanceSquared=Na=function(a,b,c,d){a=c-a;b=d-b;return a*a+b*b};var Oa;z.direction=Oa=function(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d}; z.prototype.isReal=z.prototype.H=function(){return isFinite(this.x)&&isFinite(this.y)};function ha(a,b){void 0===a?this.height=this.width=0:(this.width=a,this.height=b)}w.fa("Size",ha);w.ji(ha);w.$d(ha,{width:!0,height:!0});ha.prototype.assign=function(a){this.width=a.width;this.height=a.height};ha.prototype.setTo=ha.prototype.m=function(a,b){this.width=a;this.height=b;return this};ha.prototype.set=ha.prototype.set=function(a){this.width=a.width;this.height=a.height;return this}; ha.prototype.copy=function(){var a=new ha;a.width=this.width;a.height=this.height;return a};ha.prototype.Ga=function(){Object.freeze(this);return this};ha.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};ha.prototype.freeze=function(){return this};ha.prototype.Ra=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this}; @@ -117,15 +117,15 @@ A.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.hei A.prototype.setSize=function(a){this.width=a.width;this.height=a.height;return this};A.prototype.copy=function(){var a=new A;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};A.prototype.Ga=function(){Object.freeze(this);return this};A.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};A.prototype.freeze=function(){return this};A.prototype.Ra=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this}; A.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var h=0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new A(c,e,f,h)}return new A};A.stringify=function(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}; A.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};A.prototype.equals=A.prototype.L=function(a){return a instanceof A?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};A.prototype.equalTo=A.prototype.hx=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};A.prototype.equalsApprox=A.prototype.Ic=function(a){return K(this.x,a.x)&&K(this.y,a.y)&&K(this.width,a.width)&&K(this.height,a.height)}; -function Qa(a,b){return Va(a.x,b.x)&&Va(a.y,b.y)&&Va(a.width,b.width)&&Va(a.height,b.height)}A.prototype.containsPoint=A.prototype.Ha=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};A.prototype.containsRect=A.prototype.wk=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height}; +function Qa(a,b){return Va(a.x,b.x)&&Va(a.y,b.y)&&Va(a.width,b.width)&&Va(a.height,b.height)}A.prototype.containsPoint=A.prototype.Ha=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};A.prototype.containsRect=A.prototype.vk=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height}; A.prototype.contains=A.prototype.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};A.prototype.reset=function(){this.height=this.width=this.y=this.x=0};A.prototype.offset=A.prototype.offset=function(a,b){this.x+=a;this.y+=b;return this};A.prototype.inflate=A.prototype.xf=function(a,b){return Xa(this,b,a,b,a)};A.prototype.addMargin=A.prototype.Lw=function(a){return Xa(this,a.top,a.right,a.bottom,a.left)}; -A.prototype.subtractMargin=A.prototype.HJ=function(a){return Xa(this,-a.top,-a.right,-a.bottom,-a.left)};A.prototype.grow=function(a,b,c,d){return Xa(this,a,b,c,d)};function Xa(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}A.prototype.intersectRect=function(a){return Ya(this,a.x,a.y,a.width,a.height)};A.prototype.intersect=A.prototype.cF=function(a,b,c,d){return Ya(this,a,b,c,d)}; +A.prototype.subtractMargin=A.prototype.IJ=function(a){return Xa(this,-a.top,-a.right,-a.bottom,-a.left)};A.prototype.grow=function(a,b,c,d){return Xa(this,a,b,c,d)};function Xa(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}A.prototype.intersectRect=function(a){return Ya(this,a.x,a.y,a.width,a.height)};A.prototype.intersect=A.prototype.cF=function(a,b,c,d){return Ya(this,a,b,c,d)}; function Ya(a,b,c,d,e){var f=Math.max(a.x,b),h=Math.max(a.y,c);b=Math.min(a.x+a.width,b+d);c=Math.min(a.y+a.height,c+e);a.x=f;a.y=h;a.width=Math.max(0,b-f);a.height=Math.max(0,c-h);return a}A.prototype.intersectsRect=A.prototype.Tf=function(a){return this.dF(a.x,a.y,a.width,a.height)}; A.prototype.intersects=A.prototype.dF=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function $a(a,b){var c=a.width,d=b.width+10+10,e=a.x,f=b.x-10;if(e>d+f||f>c+e)return!1;c=a.height;d=b.height+10+10;e=a.y;f=b.y-10;return e>d+f||f>c+e?!1:!0}A.prototype.unionPoint=A.prototype.ri=function(a){return ab(this,a.x,a.y,0,0)}; A.prototype.unionRect=A.prototype.Gh=function(a){return ab(this,a.x,a.y,a.width,a.height)};A.prototype.union=A.prototype.wG=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return ab(this,a,b,c,d)};function ab(a,b,c,d,e){var f=Math.min(a.x,b),h=Math.min(a.y,c);b=Math.max(a.x+a.width,b+d);c=Math.max(a.y+a.height,c+e);a.x=f;a.y=h;a.width=b-f;a.height=c-h;return a}A.prototype.setSpot=A.prototype.Hu=function(a,b,c){this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this}; var cb;A.contains=cb=function(a,b,c,d,e,f,h,k){void 0===h&&(h=0);void 0===k&&(k=0);return a<=e&&e+h<=a+c&&b<=f&&f+k<=b+d};A.intersects=function(a,b,c,d,e,f,h,k){c+=a;h+=e;if(a>h||e>c)return!1;a=d+b;k+=f;return b>k||f>a?!1:!0};w.defineProperty(A,{left:"left"},function(){return this.x},function(a){this.x=a});w.defineProperty(A,{top:"top"},function(){return this.y},function(a){this.y=a});w.defineProperty(A,{right:"right"},function(){return this.x+this.width},function(a){this.x+=a-(this.x+this.width)}); w.defineProperty(A,{bottom:"bottom"},function(){return this.y+this.height},function(a){this.y+=a-(this.y+this.height)});w.defineProperty(A,{position:"position"},function(){return new z(this.x,this.y)},function(a){this.x=a.x;this.y=a.y});w.defineProperty(A,{size:"size"},function(){return new ha(this.width,this.height)},function(a){this.width=a.width;this.height=a.height}); -w.defineProperty(A,{Hl:"center"},function(){return new z(this.x+this.width/2,this.y+this.height/2)},function(a){this.x=a.x-this.width/2;this.y=a.y-this.height/2});w.defineProperty(A,{ka:"centerX"},function(){return this.x+this.width/2},function(a){this.x=a-this.width/2});w.defineProperty(A,{ra:"centerY"},function(){return this.y+this.height/2},function(a){this.y=a-this.height/2});A.prototype.isReal=A.prototype.H=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)}; +w.defineProperty(A,{Gl:"center"},function(){return new z(this.x+this.width/2,this.y+this.height/2)},function(a){this.x=a.x-this.width/2;this.y=a.y-this.height/2});w.defineProperty(A,{ka:"centerX"},function(){return this.x+this.width/2},function(a){this.x=a-this.width/2});w.defineProperty(A,{ra:"centerY"},function(){return this.y+this.height/2},function(a){this.y=a-this.height/2});A.prototype.isReal=A.prototype.H=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)}; A.prototype.isEmpty=function(){return 0===this.width&&0===this.height};function db(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(d=b,this.top=a,this.right=b,this.bottom=a,this.left=d):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):w.k("Invalid arguments to Margin constructor")}w.fa("Margin",db);w.ji(db);w.$d(db,{top:!0,right:!0,bottom:!0,left:!0}); db.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left};db.prototype.setTo=db.prototype.m=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};db.prototype.set=db.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};db.prototype.copy=function(){var a=new db;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a}; db.prototype.Ga=function(){Object.freeze(this);return this};db.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};db.prototype.freeze=function(){return this};db.prototype.Ra=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this}; @@ -149,46 +149,46 @@ a)return Ub;if("RightSide"===a)return Vb;if("BottomSide"===a)return Wb;if("TopBo var d=a[b++];void 0!==d&&0b.offset?1:-1});for(k=0;k=2*Math.PI?(Qc(a,b,c,d,e,e+Math.PI,h),Qc(a,b,c,d,e+Math.PI,e+2*Math.PI,h),a.path.push(["M",l,f])):(b+=d*Math.cos(e),c+=d*Math.sin(e),k=180*k/Math.PI,e=h?0:1,h=180<=k===!!h?0:1,0!==a.path.length?a.path.push(["L",b,c]):a.path.push(["M",b,c]),a.path.push(["A",d,d,k,h,e,l,f]))}}function Pc(a,b,c,d,e,f,h){var k=new Kc;k.Tb=[b,c,d,e,f,h];b={};Sc(a,"g",b,k);k=a.addElement("g",b);a.wf.push(k)} -g.$a=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+w.mm++,b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,e,f,h;c=Oc(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",JL:this.shadowBlur/2});d=Oc(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});e=Oc(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});f=Oc(this,"feOffset",{"in":"comp",result:"offsetBlur", -dx:this.shadowOffsetX,dy:this.shadowOffsetY});h=Oc(this,"feMerge",{});h.appendChild(Oc(this,"feMergeNode",{"in":"offsetBlur"}));h.appendChild(Oc(this,"feMergeNode",{"in":"SourceGraphic"}));b.appendChild(c);b.appendChild(d);b.appendChild(e);b.appendChild(f);b.appendChild(h);0b?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.Sq?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.Sq?this.clip():this.fill()}; -g.Ej=function(){this.Sq||this.stroke()};w.defineProperty(Wc,{Jp:"clipInsteadOfFill"},function(){return this.Sq},function(a){this.Sq=a});g=Wc.prototype;g.lB=function(a,b,c){this.Xs=a;this.Ys=b;this.Bg=c};g.Yn=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};g.Zn=function(){this.shadowOffsetX=this.Xs;this.shadowOffsetY=this.Ys;this.shadowBlur=this.Bg}; -g.gA=function(a,b){var c=this.ta;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else if(void 0!==c.mozDash)c.mozDash=a,c.mozDashOffset=b;else return!1;return!0};g.dA=function(){var a=this.ta;void 0!==a.setLineDash?(a.setLineDash(w.io),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=w.io,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0)}; +g.transform=function(a,b,c,d,e,f){1===a&&0===b&&0===c&&1===d&&0===e&&0===f||this.ta.transform(a,b,c,d,e,f)};g.translate=function(a,b){this.ta.translate(a,b)};g.Jg=function(a){if(a instanceof ga&&a.type===bd){var b=a.ro;a=a.Iy;a>b?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.Sq?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.Sq?this.clip():this.fill()}; +g.Dj=function(){this.Sq||this.stroke()};w.defineProperty(Wc,{Ip:"clipInsteadOfFill"},function(){return this.Sq},function(a){this.Sq=a});g=Wc.prototype;g.lB=function(a,b,c){this.Xs=a;this.Ys=b;this.Bg=c};g.Xn=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};g.Yn=function(){this.shadowOffsetX=this.Xs;this.shadowOffsetY=this.Ys;this.shadowBlur=this.Bg}; +g.gA=function(a,b){var c=this.ta;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else if(void 0!==c.mozDash)c.mozDash=a,c.mozDashOffset=b;else return!1;return!0};g.dA=function(){var a=this.ta;void 0!==a.setLineDash?(a.setLineDash(w.ho),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=w.ho,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0)}; g.Ee=function(a){a&&(this.Ey="");this.Dy=this.Fy=""}; var cd=(Math.sqrt(2)-1)/3*4,dd=(new z(0,0)).Ga(),ed=(new A(0,0,0,0)).Ga(),fd=(new db(0,0,0,0)).Ga(),kd=(new db(2,2,2,2)).Ga(),ld=(new z(6,6)).Ga(),md=(new z(-Infinity,-Infinity)).Ga(),nd=(new z(Infinity,Infinity)).Ga(),od=(new ha(0,0)).Ga(),pd=(new ha(1,1)).Ga(),yd=(new ha(6,6)).Ga(),zd=(new ha(8,8)).Ga(),Ad=(new ha(10,10)).Ga(),Bd=(new ha(Infinity,Infinity)).Ga(),Cd=(new z(NaN,NaN)).Ga(),Dd=(new ha(NaN,NaN)).Ga(),Nd=(new A(NaN,NaN,NaN,NaN)).Ga(),Od=(new L(.156,.156)).Ga(),Pd=(new L(.844,.844)).Ga(), Qd=new sa,Rd=new sa,Sd=null;function Td(a){if(0>=a)return 0;var b=Sd;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);Sd=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)}function K(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8c,f=0>d,h=0,k=h=0;af;++f){m=.5*(d+e);if(m===d||m===e)break;k=l/(m+b);h=c/(m+a);k=k*k+h*h-1;if(0k)e=m;else break}n=b*n/(m+b)-n;p=a*p/(m+a)-p;a=Math.sqrt(n*n+p*p)}else a=Math.abs(p-m);else p=l*l-m*m,a=l*n,aa?"M"+this.ia.toString()+" "+this.ga.toString()+"L"+this.D.toString()+" "+this.F.toString():"M"+this.ia.toFixed(a)+" "+this.ga.toFixed(a)+"L"+this.D.toFixed(a)+" "+this.F.toFixed(a);case Fe:var b=new A(this.ia,this.ga,0,0);b.wG(this.D,this.F,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+" "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+ "V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case Ne:b=new A(this.ia,this.ga,0,0);b.wG(this.D,this.F,0,0);if(0>a){var c=b.left.toString()+" "+(b.y+b.height/2).toString(),d=b.right.toString()+" "+(b.y+b.height/2).toString();return"M"+c+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+d+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+c}c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);d=b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/ 2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+d+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case Be:for(var b="",c=this.dc.n,d=c.length,e=0;e=u-1?!0:null!==l[m+1].match(/[A- break;case "C":for(;!c();){var H=e(),E=h(),y=f();N(t,H.x,H.y,E.x,E.y,y.x,y.y)}break;case "S":for(;!c();)H=k(),E=h(),y=f(),N(t,H.x,H.y,E.x,E.y,y.x,y.y);break;case "Q":for(;!c();)E=h(),y=f(),Se(t,E.x,E.y,y.x,y.y);break;case "T":for(;!c();)r=E=k(),y=f(),Se(t,E.x,E.y,y.x,y.y);break;case "B":for(;!c();){var y=parseFloat(d()),H=parseFloat(d()),E=parseFloat(d()),V=parseFloat(d()),ba=parseFloat(d()),Q=ba,$=!1;c()||(Q=parseFloat(d()),c()||($=0!==parseFloat(d())));n===n.toLowerCase()&&(E+=s.x,V+=s.y);t.arcTo(y, H,E,V,ba,Q,$)}break;case "A":for(;!c();)H=Math.abs(parseFloat(d())),E=Math.abs(parseFloat(d())),V=parseFloat(d()),ba=!!parseFloat(d()),Q=!!parseFloat(d()),y=f(),Te(t,H,E,V,ba,Q,y.x,y.y);break;case "Z":y=t.o.dc.n[t.o.dc.length-1];O(t);s=q;break;case "F":y="";for(H=1;l[m+H];)if(null!==l[m+H].match(/[Uu]/))H++;else if(null===l[m+H].match(/[A-Za-z]/))H++;else{y=l[m+H];break}y.match(/[Mm]/)?x=!0:Ue(t);break;case "U":y="";for(H=1;l[m+H];)if(null!==l[m+H].match(/[Ff]/))H++;else if(null===l[m+H].match(/[A-Za-z]/))H++; else{y=l[m+H];break}y.match(/[Mm]/)?v=!0:t.$a(!1)}q=t.o;w.q(t);if(b)for(t=q.dc.i;t.next();)y=t.value,y.bu=!0;return q};function Ve(a,b){for(var c=a.length,d=w.K(),e=0;eh&&(h+=360),s.ye+=h);0>a&&(s.ye=180-s.ye,s.pf=-s.pf);0>d&&(s.ye=-s.ye,s.pf=-s.pf);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case qf:h=s.D;k=s.F;s.D=h* -a+k*c+e;s.F=h*b+k*d+f;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.Hj+=h);0>a&&(s.Hj=180-s.Hj,s.Wl=!s.Wl);0>d&&(s.Hj=-s.Hj,s.Wl=!s.Wl);s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:w.k("Unknown Segment type: "+s.type)}}}}this.bb=!0;return this}; +a+k*c+e;s.F=h*b+k*d+f;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.Gj+=h);0>a&&(s.Gj=180-s.Gj,s.Xl=!s.Xl);0>d&&(s.Gj=-s.Gj,s.Xl=!s.Xl);s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:w.k("Unknown Segment type: "+s.type)}}}}this.bb=!0;return this}; Ae.prototype.Ha=function(a,b,c,d){var e=a.x,f=a.y,h=this.cb.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.dc.n,s=r.length,u=0;u=a)return 0;if((e>h?e-h:h-e)<(f>k?f-k:k-f)){if(e=a=0,fe)return 0}else if(ee)return 0;return 0a?a=0:1=f)return d=(f-h)/p,c=c[k],k=c[2*n],e=c[2*n+1],b.m(k+(c[2*n+2]-k)*d,e+(c[2*n+3]-e)*d),b;h+=p}b.m(NaN,NaN);return b}; Ae.prototype.getFractionForPoint=Ae.prototype.WH=function(a){if(this.type===Ee){var b=this.ia,c=this.ga,d=this.D,e=this.F;if(b!==d||c!==e){var f=a.x;a=a.y;var h=0,k=0;return b===d?(c=k?k===c?0:1:Math.abs(a-c)/(k-h)):c===e?(b=k?k===b?0:1:Math.abs(f-b)/(k-h)):((f-b)*(f-b)+(a-c)*(a-c))/((d-b)*(d-b)+(e-c)*(e-c))}}else if(this.type===Fe){if(b=this.ia,c=this.ga,d=this.D,e=this.F,b!==d||c!==e){var h=d-b,k=e-c,l=2*h+2*k,f=a.x; a=a.y;f=Math.min(Math.max(f,b),d);a=Math.min(Math.max(a,c),e);var b=Math.abs(f-b),d=Math.abs(f-d),c=Math.abs(a-c),e=Math.abs(a-e),m=Math.min(b,d,c,e);if(m===c)return f/l;if(m===d)return(h+a)/l;if(m===e)return(2*h+k-f)/l;if(m===b)return(2*h+2*k-a)/l}}else{for(var e=this.jA,h=this.nx,k=this.ox,l=w.K(),c=Infinity,b=d=0,f=e.length,n=m=0,p=0;pa?0:1a?0:1a?"M"+this.ia.toString()+" "+this.ga.toString():"M"+this.ia.toFixed(a)+" "+this.ga.toFixed(a),c=this.vb.n,d=c.length,e=0;ea&&(a+=360),this.Bd=a,this.Ve=0,this.mh=Math.max(d,0),this.Ag=Math.max(e,0),this.Xo="boolean"===typeof h?!!h:!1,this.qo=!!k):(this.Bd=d,this.Ve=e,a===pf&&(f=Math.max(f,0)),this.mh=f,"number"===typeof h?(a===pf&&(h=Math.max(h,0)),this.Ag=h):this.Ag=0,this.qo=this.Xo=!1);this.Ph=!1;this.bb= -!0;this.kg=null}w.fa("PathSegment",wf);w.ji(wf);wf.prototype.copy=function(){var a=new wf;a.ma=this.ma;a.yb=this.yb;a.Gb=this.Gb;a.Bd=this.Bd;a.Ve=this.Ve;a.mh=this.mh;a.Ag=this.Ag;a.Xo=this.Xo;a.qo=this.qo;a.Ph=this.Ph;a.bb=this.bb;return a}; +function wf(a,b,c,d,e,f,h,k){w.mc(this);this.Q=!1;void 0===a&&(a=Pe);this.ma=a;this.yb=void 0!==b?b:0;this.Gb=void 0!==c?c:0;void 0===d&&(d=0);void 0===e&&(e=0);void 0===f&&(f=0);void 0===h&&(h=0);a===qf?(a=f%360,0>a&&(a+=360),this.Bd=a,this.Ve=0,this.mh=Math.max(d,0),this.Ag=Math.max(e,0),this.Wo="boolean"===typeof h?!!h:!1,this.po=!!k):(this.Bd=d,this.Ve=e,a===pf&&(f=Math.max(f,0)),this.mh=f,"number"===typeof h?(a===pf&&(h=Math.max(h,0)),this.Ag=h):this.Ag=0,this.po=this.Wo=!1);this.Ph=!1;this.bb= +!0;this.kg=null}w.fa("PathSegment",wf);w.ji(wf);wf.prototype.copy=function(){var a=new wf;a.ma=this.ma;a.yb=this.yb;a.Gb=this.Gb;a.Bd=this.Bd;a.Ve=this.Ve;a.mh=this.mh;a.Ag=this.Ag;a.Wo=this.Wo;a.po=this.po;a.Ph=this.Ph;a.bb=this.bb;return a}; wf.prototype.equalsApprox=wf.prototype.Ic=function(a){if(!(a instanceof wf)||this.type!==a.type||this.vx!==a.vx)return!1;switch(this.type){case mf:case Pe:return K(this.D,a.D)&&K(this.F,a.F);case nf:return K(this.D,a.D)&&K(this.F,a.F)&&K(this.sc,a.sc)&&K(this.Pc,a.Pc)&&K(this.Ah,a.Ah)&&K(this.Bh,a.Bh);case of:return K(this.D,a.D)&&K(this.F,a.F)&&K(this.sc,a.sc)&&K(this.Pc,a.Pc);case pf:return K(this.ye,a.ye)&&K(this.pf,a.pf)&&K(this.ka,a.ka)&&K(this.ra,a.ra)&&K(this.radiusX,a.radiusX)&&K(this.radiusY, -a.radiusY);case qf:return this.Wl===a.Wl&&this.zx===a.zx&&K(this.Hj,a.Hj)&&K(this.D,a.D)&&K(this.F,a.F)&&K(this.radiusX,a.radiusX)&&K(this.radiusY,a.radiusY);default:return!1}};wf.prototype.gc=function(a){a.De===wf?this.type=a:w.Fj(this,a)}; +a.radiusY);case qf:return this.Xl===a.Xl&&this.zx===a.zx&&K(this.Gj,a.Gj)&&K(this.D,a.D)&&K(this.F,a.F)&&K(this.radiusX,a.radiusX)&&K(this.radiusY,a.radiusY);default:return!1}};wf.prototype.gc=function(a){a.De===wf?this.type=a:w.Ej(this,a)}; wf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case mf:b=0>a?"M"+this.D.toString()+" "+this.F.toString():"M"+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case Pe:b=0>a?"L"+this.D.toString()+" "+this.F.toString():"L"+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case nf:b=0>a?"C"+this.sc.toString()+" "+this.Pc.toString()+" "+this.Ah.toString()+" "+this.Bh.toString()+" "+this.D.toString()+" "+this.F.toString():"C"+this.sc.toFixed(a)+" "+this.Pc.toFixed(a)+" "+this.Ah.toFixed(a)+ " "+this.Bh.toFixed(a)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case of:b=0>a?"Q"+this.sc.toString()+" "+this.Pc.toString()+" "+this.D.toString()+" "+this.F.toString():"Q"+this.sc.toFixed(a)+" "+this.Pc.toFixed(a)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case pf:b=0>a?"B"+this.ye.toString()+" "+this.pf.toString()+" "+this.ka.toString()+" "+this.ra.toString()+" "+this.radiusX:"B"+this.ye.toFixed(a)+" "+this.pf.toFixed(a)+" "+this.ka.toFixed(a)+" "+this.ra.toFixed(a)+" "+this.radiusX; -break;case qf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Hj.toString()+" "+(this.zx?1:0)+" "+(this.Wl?1:0)+" "+this.D.toString()+" "+this.F.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Hj.toFixed(a)+" "+(this.zx?1:0)+" "+(this.Wl?1:0)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;default:b=this.type.toString()}return b+(this.Ph?"z":"")};var mf;wf.Move=mf=w.p(wf,"Move",0);var Pe;wf.Line=Pe=w.p(wf,"Line",1);var nf; +break;case qf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Gj.toString()+" "+(this.zx?1:0)+" "+(this.Xl?1:0)+" "+this.D.toString()+" "+this.F.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Gj.toFixed(a)+" "+(this.zx?1:0)+" "+(this.Xl?1:0)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;default:b=this.type.toString()}return b+(this.Ph?"z":"")};var mf;wf.Move=mf=w.p(wf,"Move",0);var Pe;wf.Line=Pe=w.p(wf,"Line",1);var nf; wf.Bezier=nf=w.p(wf,"Bezier",2);var of;wf.QuadraticBezier=of=w.p(wf,"QuadraticBezier",3);var pf;wf.Arc=pf=w.p(wf,"Arc",4);var qf;wf.SvgArc=qf=w.p(wf,"SvgArc",4);wf.prototype.freeze=function(){this.Q=!0;return this};wf.prototype.Ra=function(){this.Q=!1;return this};wf.prototype.close=wf.prototype.close=function(){this.Ph=!0;return this}; function rf(a,b){if(null!==a.kg&&!1===b.bb)return a.kg;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.kg=[],a.kg;var e=a.Bd,f=a.Ve,h=xe(c=r?h=Math.PI:1<=r&&(h=0);!l&&0h&&(h+=2*Math.PI);l=b>f?1:b/f;r=b>f?f/b:1;b=xe(b>f?b:f,n,n+h,!0);f=w.Ff();f.reset();f.translate(c,d);f.rotate(a.Bd,0,0);f.scale(l,r);Ve(b,f);w.ue(f);a.kg=b;return a.kg} w.defineProperty(wf,{vx:"isClosed"},function(){return this.Ph},function(a){this.Ph!==a&&(this.Ph=a,this.bb=!0)});w.defineProperty(wf,{type:"type"},function(){return this.ma},function(a){this.Q&&w.la(this,a);this.ma=a;this.bb=!0});w.defineProperty(wf,{D:"endX"},function(){return this.yb},function(a){this.Q&&w.la(this,a);this.yb=a;this.bb=!0});w.defineProperty(wf,{F:"endY"},function(){return this.Gb},function(a){this.Q&&w.la(this,a);this.Gb=a;this.bb=!0}); w.defineProperty(wf,{sc:"point1X"},function(){return this.Bd},function(a){this.Q&&w.la(this,a);this.Bd=a;this.bb=!0});w.defineProperty(wf,{Pc:"point1Y"},function(){return this.Ve},function(a){this.Q&&w.la(this,a);this.Ve=a;this.bb=!0});w.defineProperty(wf,{Ah:"point2X"},function(){return this.mh},function(a){this.Q&&w.la(this,a);this.mh=a;this.bb=!0});w.defineProperty(wf,{Bh:"point2Y"},function(){return this.Ag},function(a){this.Q&&w.la(this,a);this.Ag=a;this.bb=!0}); w.defineProperty(wf,{ka:"centerX"},function(){return this.Bd},function(a){this.Q&&w.la(this,a);this.Bd=a;this.bb=!0});w.defineProperty(wf,{ra:"centerY"},function(){return this.Ve},function(a){this.Q&&w.la(this,a);this.Ve=a;this.bb=!0});w.defineProperty(wf,{radiusX:"radiusX"},function(){return this.mh},function(a){0>a&&w.Ea(a,">= zero",wf,"radiusX");this.Q&&w.la(this,a);this.mh=a;this.bb=!0}); w.defineProperty(wf,{radiusY:"radiusY"},function(){return this.Ag},function(a){0>a&&w.Ea(a,">= zero",wf,"radiusY");this.Q&&w.la(this,a);this.Ag=a;this.bb=!0});w.defineProperty(wf,{ye:"startAngle"},function(){return this.yb},function(a){this.yb!==a&&(this.Q&&w.la(this,a),a%=360,0>a&&(a+=360),this.yb=a,this.bb=!0)});w.defineProperty(wf,{pf:"sweepAngle"},function(){return this.Gb},function(a){this.Q&&w.la(this,a);360a&&(a=-360);this.Gb=a;this.bb=!0}); -w.defineProperty(wf,{Wl:"isClockwiseArc"},function(){return this.qo},function(a){this.Q&&w.la(this,a);this.qo=a;this.bb=!0});w.defineProperty(wf,{zx:"isLargeArc"},function(){return this.Xo},function(a){this.Q&&w.la(this,a);this.Xo=a;this.bb=!0});w.defineProperty(wf,{Hj:"xAxisRotation"},function(){return this.Bd},function(a){a%=360;0>a&&(a+=360);this.Q&&w.la(this,a);this.Bd=a;this.bb=!0}); -function yf(){this.Z=null;this.Kz=(new z(0,0)).freeze();this.Ry=(new z(0,0)).freeze();this.ev=this.bw=0;this.fv=1;this.Rv="";this.Gw=this.tv=!1;this.qv=this.gv=0;this.Jj=this.Cv=this.Nv=!1;this.tr=null;this.Ew=0;this.Dg=this.Dw=null}w.fa("InputEvent",yf); -yf.prototype.copy=function(){var a=new yf;a.Z=this.Z;a.Kz.assign(this.bf);a.Ry.assign(this.ca);a.bw=this.bw;a.ev=this.ev;a.fv=this.fv;a.Rv=this.Rv;a.tv=this.tv;a.Gw=this.Gw;a.gv=this.gv;a.qv=this.qv;a.Nv=this.Nv;a.Cv=this.Cv;a.Jj=this.Jj;a.tr=this.tr;a.Ew=this.Ew;a.Dw=this.Dw;a.Dg=this.Dg;return a}; -yf.prototype.toString=function(){var a="^";0!==this.wd&&(a+="M:"+this.wd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Fe&&(a+="C:"+this.Fe);0!==this.Nl&&(a+="D:"+this.Nl);this.Ac&&(a+="h");this.bubbles&&(a+="b");null!==this.ca&&(a+="@"+this.ca.toString());return a};w.defineProperty(yf,{g:"diagram"},function(){return this.Z},function(a){this.Z=a});w.defineProperty(yf,{bf:"viewPoint"},function(){return this.Kz},function(a){w.G(a,z,yf,"viewPoint");this.Kz.assign(a)}); -w.defineProperty(yf,{ca:"documentPoint"},function(){return this.Ry},function(a){w.G(a,z,yf,"documentPoint");this.Ry.assign(a)});yf.prototype.getMultiTouchViewPoint=yf.prototype.qx=function(a,b){var c=this.g;if(null===c)return b;zf(c,this.event,a,b);return b};yf.prototype.getMultiTouchDocumentPoint=function(a,b){var c=this.g;if(null===c)return b;zf(c,this.event,a,b);b.assign(c.vB(b));return b};w.defineProperty(yf,{wd:"modifiers"},function(){return this.bw},function(a){this.bw=a}); -w.defineProperty(yf,{button:"button"},function(){return this.ev},function(a){this.ev=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}});w.defineProperty(yf,{buttons:"buttons"},function(){return this.fv},function(a){this.fv=a});w.defineProperty(yf,{key:"key"},function(){return this.Rv},function(a){this.Rv=a});w.defineProperty(yf,{Ol:"down"},function(){return this.tv},function(a){this.tv=a}); -w.defineProperty(yf,{up:"up"},function(){return this.Gw},function(a){this.Gw=a});w.defineProperty(yf,{Fe:"clickCount"},function(){return this.gv},function(a){this.gv=a});w.defineProperty(yf,{Nl:"delta"},function(){return this.qv},function(a){this.qv=a});w.defineProperty(yf,{du:"isMultiTouch"},function(){return this.Nv},function(a){this.Nv=a});w.defineProperty(yf,{Ac:"handled"},function(){return this.Cv},function(a){this.Cv=a}); -w.defineProperty(yf,{bubbles:"bubbles"},function(){return this.Jj},function(a){this.Jj=a});w.defineProperty(yf,{event:"event"},function(){return this.tr},function(a){this.tr=a});w.u(yf,{vj:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});w.u(yf,{Fk:"isMac"},function(){return w.Fk});w.defineProperty(yf,{timestamp:"timestamp"},function(){return this.Ew},function(a){this.Ew=a}); +w.defineProperty(wf,{Xl:"isClockwiseArc"},function(){return this.po},function(a){this.Q&&w.la(this,a);this.po=a;this.bb=!0});w.defineProperty(wf,{zx:"isLargeArc"},function(){return this.Wo},function(a){this.Q&&w.la(this,a);this.Wo=a;this.bb=!0});w.defineProperty(wf,{Gj:"xAxisRotation"},function(){return this.Bd},function(a){a%=360;0>a&&(a+=360);this.Q&&w.la(this,a);this.Bd=a;this.bb=!0}); +function yf(){this.Z=null;this.Kz=(new z(0,0)).freeze();this.Ry=(new z(0,0)).freeze();this.ev=this.bw=0;this.fv=1;this.Rv="";this.Gw=this.tv=!1;this.qv=this.gv=0;this.Ij=this.Cv=this.Nv=!1;this.tr=null;this.Ew=0;this.Dg=this.Dw=null}w.fa("InputEvent",yf); +yf.prototype.copy=function(){var a=new yf;a.Z=this.Z;a.Kz.assign(this.bf);a.Ry.assign(this.da);a.bw=this.bw;a.ev=this.ev;a.fv=this.fv;a.Rv=this.Rv;a.tv=this.tv;a.Gw=this.Gw;a.gv=this.gv;a.qv=this.qv;a.Nv=this.Nv;a.Cv=this.Cv;a.Ij=this.Ij;a.tr=this.tr;a.Ew=this.Ew;a.Dw=this.Dw;a.Dg=this.Dg;return a}; +yf.prototype.toString=function(){var a="^";0!==this.wd&&(a+="M:"+this.wd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Fe&&(a+="C:"+this.Fe);0!==this.Ml&&(a+="D:"+this.Ml);this.Ac&&(a+="h");this.bubbles&&(a+="b");null!==this.da&&(a+="@"+this.da.toString());return a};w.defineProperty(yf,{g:"diagram"},function(){return this.Z},function(a){this.Z=a});w.defineProperty(yf,{bf:"viewPoint"},function(){return this.Kz},function(a){w.G(a,z,yf,"viewPoint");this.Kz.assign(a)}); +w.defineProperty(yf,{da:"documentPoint"},function(){return this.Ry},function(a){w.G(a,z,yf,"documentPoint");this.Ry.assign(a)});yf.prototype.getMultiTouchViewPoint=yf.prototype.qx=function(a,b){var c=this.g;if(null===c)return b;zf(c,this.event,a,b);return b};yf.prototype.getMultiTouchDocumentPoint=function(a,b){var c=this.g;if(null===c)return b;zf(c,this.event,a,b);b.assign(c.vB(b));return b};w.defineProperty(yf,{wd:"modifiers"},function(){return this.bw},function(a){this.bw=a}); +w.defineProperty(yf,{button:"button"},function(){return this.ev},function(a){this.ev=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}});w.defineProperty(yf,{buttons:"buttons"},function(){return this.fv},function(a){this.fv=a});w.defineProperty(yf,{key:"key"},function(){return this.Rv},function(a){this.Rv=a});w.defineProperty(yf,{Nl:"down"},function(){return this.tv},function(a){this.tv=a}); +w.defineProperty(yf,{up:"up"},function(){return this.Gw},function(a){this.Gw=a});w.defineProperty(yf,{Fe:"clickCount"},function(){return this.gv},function(a){this.gv=a});w.defineProperty(yf,{Ml:"delta"},function(){return this.qv},function(a){this.qv=a});w.defineProperty(yf,{du:"isMultiTouch"},function(){return this.Nv},function(a){this.Nv=a});w.defineProperty(yf,{Ac:"handled"},function(){return this.Cv},function(a){this.Cv=a}); +w.defineProperty(yf,{bubbles:"bubbles"},function(){return this.Ij},function(a){this.Ij=a});w.defineProperty(yf,{event:"event"},function(){return this.tr},function(a){this.tr=a});w.u(yf,{uj:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});w.u(yf,{Ek:"isMac"},function(){return w.Ek});w.defineProperty(yf,{timestamp:"timestamp"},function(){return this.Ew},function(a){this.Ew=a}); w.defineProperty(yf,{Vg:"targetDiagram"},function(){return this.Dw},function(a){this.Dw=a});w.defineProperty(yf,{Pe:"targetObject"},function(){return this.Dg},function(a){this.Dg=a});w.defineProperty(yf,{control:"control"},function(){return 0!==(this.wd&1)},function(a){this.wd=a?this.wd|1:this.wd&-2});w.defineProperty(yf,{shift:"shift"},function(){return 0!==(this.wd&4)},function(a){this.wd=a?this.wd|4:this.wd&-5}); w.defineProperty(yf,{alt:"alt"},function(){return 0!==(this.wd&2)},function(a){this.wd=a?this.wd|2:this.wd&-3});w.defineProperty(yf,{mu:"meta"},function(){return 0!==(this.wd&8)},function(a){this.wd=a?this.wd|8:this.wd&-9});w.defineProperty(yf,{left:"left"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?0===this.button:0!==(this.buttons&1)},function(a){this.buttons=a?this.buttons|1:this.buttons&-2}); -w.defineProperty(yf,{right:"right"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?2===this.button:0!==(this.buttons&2)},function(a){this.buttons=a?this.buttons|2:this.buttons&-3});w.defineProperty(yf,{mL:"middle"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?1===this.button:0!==(this.buttons&4)},function(a){this.buttons=a?this.buttons|4:this.buttons&-5}); +w.defineProperty(yf,{right:"right"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?2===this.button:0!==(this.buttons&2)},function(a){this.buttons=a?this.buttons|2:this.buttons&-3});w.defineProperty(yf,{nL:"middle"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?1===this.button:0!==(this.buttons&4)},function(a){this.buttons=a?this.buttons|4:this.buttons&-5}); function Af(){this.Z=null;this.Qb="";this.kw=this.Bw=null;this.Pq=!1}w.fa("DiagramEvent",Af);Af.prototype.copy=function(){var a=new Af;a.Z=this.Z;a.Qb=this.Qb;a.Bw=this.Bw;a.kw=this.kw;a.Pq=this.Pq;return a};Af.prototype.toString=function(){var a="*"+this.name;null!==this.nB&&(a+=":"+this.nB.toString());null!==this.SA&&(a+="("+this.SA.toString()+")");return a};w.defineProperty(Af,{g:"diagram"},function(){return this.Z},function(a){this.Z=a}); w.defineProperty(Af,{name:"name"},function(){return this.Qb},function(a){this.Qb=a});w.defineProperty(Af,{nB:"subject"},function(){return this.Bw},function(a){this.Bw=a});w.defineProperty(Af,{SA:"parameter"},function(){return this.kw},function(a){this.kw=a});w.defineProperty(Af,{cancel:"cancel"},function(){return this.Pq},function(a){this.Pq!==a&&w.Ft("DiagramEvent.cancel","2.0");this.Pq=a});function Bf(){this.Qq=Mf;this.Tm=this.aw="";this.ps=this.qs=this.us=this.vs=this.ts=this.Z=this.ke=null} w.fa("ChangedEvent",Bf);var Nf;Bf.Transaction=Nf=w.p(Bf,"Transaction",-1);var Mf;Bf.Property=Mf=w.p(Bf,"Property",0);var Of;Bf.Insert=Of=w.p(Bf,"Insert",1);var Pf;Bf.Remove=Pf=w.p(Bf,"Remove",2);Bf.prototype.clear=Bf.prototype.clear=function(){this.ps=this.qs=this.us=this.vs=this.ts=this.Z=this.ke=null}; -Bf.prototype.copy=function(){var a=new Bf;a.Qq=this.Qq;a.aw=this.aw;a.Tm=this.Tm;a.ke=this.ke;a.Z=this.Z;a.ts=this.ts;var b=this.vs;a.vs=w.Qa(b)&&"function"===typeof b.S?b.S():b;b=this.us;a.us=w.Qa(b)&&"function"===typeof b.S?b.S():b;b=this.qs;a.qs=w.Qa(b)&&"function"===typeof b.S?b.S():b;b=this.ps;a.ps=w.Qa(b)&&"function"===typeof b.S?b.S():b;return a};Bf.prototype.gc=function(a){a.De===Bf?this.yc=a:w.Fj(this,a)}; -Bf.prototype.toString=function(){var a="",a=this.yc===Nf?a+"* ":this.yc===Mf?a+(null!==this.ba?"!m":"!d"):a+((null!==this.ba?"!m":"!d")+this.yc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.of&&this.of!==this.propertyName&&(a+=" "+this.of);a+=": ";this.yc===Nf?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Qf(this.object)),null!==this.oldValue&&(a+=" old: "+Qf(this.oldValue)),null!==this.Bj&&(a+=" "+this.Bj),null!==this.newValue&& -(a+=" new: "+Qf(this.newValue)),null!==this.Aj&&(a+=" "+this.Aj));return a};Bf.prototype.getValue=Bf.prototype.ja=function(a){return a?this.oldValue:this.newValue};Bf.prototype.getParam=function(a){return a?this.Bj:this.Aj};Bf.prototype.canUndo=Bf.prototype.canUndo=function(){return null!==this.ba||null!==this.g?!0:!1};Bf.prototype.undo=Bf.prototype.undo=function(){this.canUndo()&&(null!==this.ba?this.ba.nn(this,!0):null!==this.g&&this.g.nn(this,!0))}; +Bf.prototype.copy=function(){var a=new Bf;a.Qq=this.Qq;a.aw=this.aw;a.Tm=this.Tm;a.ke=this.ke;a.Z=this.Z;a.ts=this.ts;var b=this.vs;a.vs=w.Qa(b)&&"function"===typeof b.S?b.S():b;b=this.us;a.us=w.Qa(b)&&"function"===typeof b.S?b.S():b;b=this.qs;a.qs=w.Qa(b)&&"function"===typeof b.S?b.S():b;b=this.ps;a.ps=w.Qa(b)&&"function"===typeof b.S?b.S():b;return a};Bf.prototype.gc=function(a){a.De===Bf?this.yc=a:w.Ej(this,a)}; +Bf.prototype.toString=function(){var a="",a=this.yc===Nf?a+"* ":this.yc===Mf?a+(null!==this.ba?"!m":"!d"):a+((null!==this.ba?"!m":"!d")+this.yc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.of&&this.of!==this.propertyName&&(a+=" "+this.of);a+=": ";this.yc===Nf?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Qf(this.object)),null!==this.oldValue&&(a+=" old: "+Qf(this.oldValue)),null!==this.Aj&&(a+=" "+this.Aj),null!==this.newValue&& +(a+=" new: "+Qf(this.newValue)),null!==this.zj&&(a+=" "+this.zj));return a};Bf.prototype.getValue=Bf.prototype.ja=function(a){return a?this.oldValue:this.newValue};Bf.prototype.getParam=function(a){return a?this.Aj:this.zj};Bf.prototype.canUndo=Bf.prototype.canUndo=function(){return null!==this.ba||null!==this.g?!0:!1};Bf.prototype.undo=Bf.prototype.undo=function(){this.canUndo()&&(null!==this.ba?this.ba.nn(this,!0):null!==this.g&&this.g.nn(this,!0))}; Bf.prototype.canRedo=Bf.prototype.canRedo=function(){return null!==this.ba||null!==this.g?!0:!1};Bf.prototype.redo=Bf.prototype.redo=function(){this.canRedo()&&(null!==this.ba?this.ba.nn(this,!1):null!==this.g&&this.g.nn(this,!1))};w.defineProperty(Bf,{ba:"model"},function(){return this.ke},function(a){this.ke=a});w.defineProperty(Bf,{g:"diagram"},function(){return this.Z},function(a){this.Z=a});w.defineProperty(Bf,{yc:"change"},function(){return this.Qq},function(a){this.Qq=a}); w.defineProperty(Bf,{of:"modelChange"},function(){return this.aw},function(a){this.aw=a});w.defineProperty(Bf,{propertyName:"propertyName"},function(){return this.Tm},function(a){this.Tm=a});w.u(Bf,{rF:"isTransactionFinished"},function(){return this.Qq===Nf&&("CommittedTransaction"===this.Tm||"FinishedUndo"===this.Tm||"FinishedRedo"===this.Tm)});w.defineProperty(Bf,{object:"object"},function(){return this.ts},function(a){this.ts=a}); -w.defineProperty(Bf,{oldValue:"oldValue"},function(){return this.vs},function(a){this.vs=a});w.defineProperty(Bf,{Bj:"oldParam"},function(){return this.us},function(a){this.us=a});w.defineProperty(Bf,{newValue:"newValue"},function(){return this.qs},function(a){this.qs=a});w.defineProperty(Bf,{Aj:"newParam"},function(){return this.ps},function(a){this.ps=a}); -function F(a){1=d)return"[]";var e=new ra;e.add("[ ");c&&1d)return;w.Hg(a.Ce,d)}tg(a,"nodeDataArray",Pf,"nodeDataArray",a,b,null,d,null);a.Nu(b)} +F.prototype.makeNodeDataKeyUnique=F.prototype.HA=function(a){if(null!==a){var b=this.ek;if(""!==b){var c=this.ub(a);if(void 0===c||this.Ec.contains(c)){var d=this.$o;if(null!==d&&(c=d(this,a),void 0!==c&&null!==c&&!this.Ec.contains(c))){w.La(a,b,c);return}if("string"===typeof c){for(d=2;this.Ec.contains(c+d);)d++;w.La(a,b,c+d)}else if(void 0===c||"number"===typeof c){for(d=-this.Ec.count-1;this.Ec.contains(d);)d--;w.La(a,b,d)}else w.k("Model.getKeyForNodeData returned something other than a string or a number: "+ +c)}}}};F.prototype.addNodeData=F.prototype.Bl=function(a){null!==a&&(w.Wp(a),this.Ge(a)||wg(this,a,!0))};function wg(a,b,c){var d=a.ub(b);if(void 0===d||a.Ec.ja(d)!==b)a.HA(b),d=a.ub(b),void 0===d?w.k("Model.makeNodeDataKeyUnique failed on "+b+". Data not added to Model."):(a.Ec.add(d,b),d=null,c&&(d=w.Ya(a.Ce),w.qh(a.Ce,d,b)),tg(a,"nodeDataArray",Of,"nodeDataArray",a,null,b,null,d),a.lq(b),a.kq(b))} +F.prototype.addNodeDataCollection=function(a){if(w.isArray(a))for(var b=w.Ya(a),c=0;cd)return;w.Hg(a.Ce,d)}tg(a,"nodeDataArray",Pf,"nodeDataArray",a,b,null,d,null);a.Nu(b)} F.prototype.removeNodeDataCollection=function(a){if(w.isArray(a))for(var b=w.Ya(a),c=0;cb&&(b=w.Ya(a));w.qh(a,b,c);tg(this,"",Of,"",a,null,c,null,b)};F.prototype.removeArrayItem=F.prototype.NF=function(a,b){void 0===b&&(b=-1);a===this.Ce&&w.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=w.Ya(a)-1);var c=w.Da(a,b);w.Hg(a,b);tg(this,"",Pf,"",a,c,null,b,null)}; -w.defineProperty(F,{Tn:"nodeCategoryProperty"},function(){return this.Om},function(a){var b=this.Om;b!==a&&(ug(a,F,"nodeCategoryProperty"),this.Om=a,this.h("nodeCategoryProperty",b,a))});F.prototype.getCategoryForNodeData=F.prototype.nA=function(a){if(null===a)return"";var b=this.Om;if(""===b)return"";b=w.sb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;w.k("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; -F.prototype.setCategoryForNodeData=F.prototype.gy=function(a,b){w.j(b,"string",F,"setCategoryForNodeData:cat");if(null!==a){var c=this.Om;if(""!==c)if(this.Ge(a)){var d=w.sb(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),tg(this,"nodeCategory",Mf,c,a,d,b))}else w.Ma(a,c,b)}}; -function P(a,b){F.call(this);2w.Fl(d,a.newValue)&&w.qh(d,c,a.newValue));return}}else if(a.yc=== -Pf){c=a.Bj;if("linkDataArray"===a.of){d=a.oldValue;w.Qa(d)&&"number"===typeof c&&(e=this.Sf(d),b?(this.Pi.add(d),w.Da(this.df,c)!==d&&w.qh(this.df,c,d),void 0!==e&&this.ad.add(e,d)):(this.Pi.remove(d),w.Da(this.df,c)===d&&w.Hg(this.df,c),void 0!==e&&this.ad.remove(e)));return}if("linkLabelKeys"===a.of){d=this.Bk(a.object);w.isArray(d)&&"number"===typeof c&&(b?0>w.Fl(d,a.newValue)&&w.qh(d,c,a.newValue):(c=w.Fl(d,a.newValue),0<=c&&w.Hg(d,c)));return}}F.prototype.nn.call(this,a,b)}; -w.defineProperty(P,{Rz:"archetypeNodeData"},function(){return this.pm},function(a){var b=this.pm;b!==a&&(null!==a&&w.G(a,Object,P,"archetypeNodeData"),this.pm=a,this.h("archetypeNodeData",b,a))});P.prototype.Mn=function(a){if(void 0!==a){var b=this.pm;if(null!==b){var c=this.te(a);null===c&&(c=this.copyNodeData(b),w.Ma(c,this.fk,a),this.Cl(c))}return a}}; -w.defineProperty(P,{Kn:"linkFromKeyProperty"},function(){return this.Sh},function(a){var b=this.Sh;b!==a&&(ug(a,P,"linkFromKeyProperty"),this.Sh=a,this.h("linkFromKeyProperty",b,a))});P.prototype.getFromKeyForLinkData=P.prototype.Tl=function(a){if(null!==a){var b=this.Sh;if(""!==b&&(b=w.sb(a,b),void 0!==b)){if(vg(b))return b;w.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; -P.prototype.setFromKeyForLinkData=P.prototype.dB=function(a,b){null===b&&(b=void 0);void 0===b||vg(b)||w.yd(b,"number or string",P,"setFromKeyForLinkData:key");if(null!==a){var c=this.Sh;if(""!==c)if(b=this.Mn(b),this.th(a)){var d=w.sb(a,c);d!==b&&(Rg(this,d,a),w.Ma(a,c,b),null===this.te(b)&&zg(this,b,a),tg(this,"linkFromKey",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.Ma(a,c,b)}}; -w.defineProperty(P,{Ln:"linkToKeyProperty"},function(){return this.Th},function(a){var b=this.Th;b!==a&&(ug(a,P,"linkToKeyProperty"),this.Th=a,this.h("linkToKeyProperty",b,a))});P.prototype.getToKeyForLinkData=P.prototype.Ul=function(a){if(null!==a){var b=this.Th;if(""!==b&&(b=w.sb(a,b),void 0!==b)){if(vg(b))return b;w.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; -P.prototype.setToKeyForLinkData=P.prototype.jB=function(a,b){null===b&&(b=void 0);void 0===b||vg(b)||w.yd(b,"number or string",P,"setToKeyForLinkData:key");if(null!==a){var c=this.Th;if(""!==c)if(b=this.Mn(b),this.th(a)){var d=w.sb(a,c);d!==b&&(Rg(this,d,a),w.Ma(a,c,b),null===this.te(b)&&zg(this,b,a),tg(this,"linkToKey",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.Ma(a,c,b)}}; -w.defineProperty(P,{iu:"linkFromPortIdProperty"},function(){return this.Jm},function(a){var b=this.Jm;b!==a&&(ug(a,P,"linkFromPortIdProperty"),a!==this.Kn&&a!==this.Ln||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Jm=a,this.h("linkFromPortIdProperty",b,a))});P.prototype.getFromPortIdForLinkData=P.prototype.XH=function(a){if(null===a)return"";var b=this.Jm;if(""===b)return"";a=w.sb(a,b);return void 0===a?"":a}; -P.prototype.setFromPortIdForLinkData=P.prototype.eB=function(a,b){w.j(b,"string",P,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.Jm;if(""!==c)if(this.th(a)){var d=w.sb(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),tg(this,"linkFromPortId",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.Ma(a,c,b)}}; -w.defineProperty(P,{ku:"linkToPortIdProperty"},function(){return this.Km},function(a){var b=this.Km;b!==a&&(ug(a,P,"linkToPortIdProperty"),a!==this.Kn&&a!==this.Ln||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Km=a,this.h("linkToPortIdProperty",b,a))});P.prototype.getToPortIdForLinkData=P.prototype.aI=function(a){if(null===a)return"";var b=this.Km;if(""===b)return"";a=w.sb(a,b);return void 0===a?"":a}; -P.prototype.setToPortIdForLinkData=P.prototype.kB=function(a,b){w.j(b,"string",P,"setToPortIdForLinkData:portname");if(null!==a){var c=this.Km;if(""!==c)if(this.th(a)){var d=w.sb(a,c);void 0===d&&(d="");d!==b&&(w.Ma(a,c,b),tg(this,"linkToPortId",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.Ma(a,c,b)}};w.defineProperty(P,{ju:"linkLabelKeysProperty"},function(){return this.wg},function(a){var b=this.wg;b!==a&&(ug(a,P,"linkLabelKeysProperty"),this.wg=a,this.h("linkLabelKeysProperty",b,a))}); -P.prototype.getLabelKeysForLinkData=P.prototype.Bk=function(a){if(null===a)return w.io;var b=this.wg;if(""===b)return w.io;a=w.sb(a,b);return void 0===a?w.io:a}; -P.prototype.setLabelKeysForLinkData=P.prototype.gG=function(a,b){w.Tz(b,P,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.wg;if(""!==c)if(this.th(a)){var d=w.sb(a,c);void 0===d&&(d=w.io);if(d!==b){for(var e=w.Ya(d),f=0;fe||(w.Hg(d,e),this.th(a)&&(Rg(this,b,a),tg(this,"linkLabelKeys",Pf,c,a,b,null,e,null)))}else void 0!==d&&w.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; -w.defineProperty(P,{Ng:"linkDataArray"},function(){return this.df},function(a){var b=this.df;if(b!==a){w.Tz(a,P,"linkDataArray");this.ad.clear();for(var c=w.Ya(a),d=0;dd)return;w.Hg(a.df,d)}tg(a,"linkDataArray",Pf,"linkDataArray",a,b,null,d,null);c=a.Tl(b);Rg(a,c,b);c=a.Ul(b);Rg(a,c,b);d=a.Bk(b);if(w.isArray(d))for(var e=w.Ya(d),f=0;fw.El(d,a.newValue)&&w.qh(d,c,a.newValue));return}}else if(a.yc=== +Pf){c=a.Aj;if("linkDataArray"===a.of){d=a.oldValue;w.Qa(d)&&"number"===typeof c&&(e=this.Sf(d),b?(this.Pi.add(d),w.Da(this.df,c)!==d&&w.qh(this.df,c,d),void 0!==e&&this.ad.add(e,d)):(this.Pi.remove(d),w.Da(this.df,c)===d&&w.Hg(this.df,c),void 0!==e&&this.ad.remove(e)));return}if("linkLabelKeys"===a.of){d=this.Ak(a.object);w.isArray(d)&&"number"===typeof c&&(b?0>w.El(d,a.newValue)&&w.qh(d,c,a.newValue):(c=w.El(d,a.newValue),0<=c&&w.Hg(d,c)));return}}F.prototype.nn.call(this,a,b)}; +w.defineProperty(P,{Rz:"archetypeNodeData"},function(){return this.pm},function(a){var b=this.pm;b!==a&&(null!==a&&w.G(a,Object,P,"archetypeNodeData"),this.pm=a,this.h("archetypeNodeData",b,a))});P.prototype.Ln=function(a){if(void 0!==a){var b=this.pm;if(null!==b){var c=this.te(a);null===c&&(c=this.copyNodeData(b),w.La(c,this.ek,a),this.Bl(c))}return a}}; +w.defineProperty(P,{Jn:"linkFromKeyProperty"},function(){return this.Sh},function(a){var b=this.Sh;b!==a&&(ug(a,P,"linkFromKeyProperty"),this.Sh=a,this.h("linkFromKeyProperty",b,a))});P.prototype.getFromKeyForLinkData=P.prototype.Tl=function(a){if(null!==a){var b=this.Sh;if(""!==b&&(b=w.sb(a,b),void 0!==b)){if(vg(b))return b;w.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}}; +P.prototype.setFromKeyForLinkData=P.prototype.dB=function(a,b){null===b&&(b=void 0);void 0===b||vg(b)||w.yd(b,"number or string",P,"setFromKeyForLinkData:key");if(null!==a){var c=this.Sh;if(""!==c)if(b=this.Ln(b),this.th(a)){var d=w.sb(a,c);d!==b&&(Rg(this,d,a),w.La(a,c,b),null===this.te(b)&&zg(this,b,a),tg(this,"linkFromKey",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.La(a,c,b)}}; +w.defineProperty(P,{Kn:"linkToKeyProperty"},function(){return this.Th},function(a){var b=this.Th;b!==a&&(ug(a,P,"linkToKeyProperty"),this.Th=a,this.h("linkToKeyProperty",b,a))});P.prototype.getToKeyForLinkData=P.prototype.Ul=function(a){if(null!==a){var b=this.Th;if(""!==b&&(b=w.sb(a,b),void 0!==b)){if(vg(b))return b;w.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}}; +P.prototype.setToKeyForLinkData=P.prototype.jB=function(a,b){null===b&&(b=void 0);void 0===b||vg(b)||w.yd(b,"number or string",P,"setToKeyForLinkData:key");if(null!==a){var c=this.Th;if(""!==c)if(b=this.Ln(b),this.th(a)){var d=w.sb(a,c);d!==b&&(Rg(this,d,a),w.La(a,c,b),null===this.te(b)&&zg(this,b,a),tg(this,"linkToKey",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.La(a,c,b)}}; +w.defineProperty(P,{iu:"linkFromPortIdProperty"},function(){return this.Jm},function(a){var b=this.Jm;b!==a&&(ug(a,P,"linkFromPortIdProperty"),a!==this.Jn&&a!==this.Kn||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Jm=a,this.h("linkFromPortIdProperty",b,a))});P.prototype.getFromPortIdForLinkData=P.prototype.XH=function(a){if(null===a)return"";var b=this.Jm;if(""===b)return"";a=w.sb(a,b);return void 0===a?"":a}; +P.prototype.setFromPortIdForLinkData=P.prototype.eB=function(a,b){w.j(b,"string",P,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.Jm;if(""!==c)if(this.th(a)){var d=w.sb(a,c);void 0===d&&(d="");d!==b&&(w.La(a,c,b),tg(this,"linkFromPortId",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.La(a,c,b)}}; +w.defineProperty(P,{ku:"linkToPortIdProperty"},function(){return this.Km},function(a){var b=this.Km;b!==a&&(ug(a,P,"linkToPortIdProperty"),a!==this.Jn&&a!==this.Kn||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Km=a,this.h("linkToPortIdProperty",b,a))});P.prototype.getToPortIdForLinkData=P.prototype.aI=function(a){if(null===a)return"";var b=this.Km;if(""===b)return"";a=w.sb(a,b);return void 0===a?"":a}; +P.prototype.setToPortIdForLinkData=P.prototype.kB=function(a,b){w.j(b,"string",P,"setToPortIdForLinkData:portname");if(null!==a){var c=this.Km;if(""!==c)if(this.th(a)){var d=w.sb(a,c);void 0===d&&(d="");d!==b&&(w.La(a,c,b),tg(this,"linkToPortId",Mf,c,a,d,b),"string"===typeof c&&this.Hb(a,c))}else w.La(a,c,b)}};w.defineProperty(P,{ju:"linkLabelKeysProperty"},function(){return this.wg},function(a){var b=this.wg;b!==a&&(ug(a,P,"linkLabelKeysProperty"),this.wg=a,this.h("linkLabelKeysProperty",b,a))}); +P.prototype.getLabelKeysForLinkData=P.prototype.Ak=function(a){if(null===a)return w.ho;var b=this.wg;if(""===b)return w.ho;a=w.sb(a,b);return void 0===a?w.ho:a}; +P.prototype.setLabelKeysForLinkData=P.prototype.gG=function(a,b){w.Tz(b,P,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.wg;if(""!==c)if(this.th(a)){var d=w.sb(a,c);void 0===d&&(d=w.ho);if(d!==b){for(var e=w.Ya(d),f=0;fe||(w.Hg(d,e),this.th(a)&&(Rg(this,b,a),tg(this,"linkLabelKeys",Pf,c,a,b,null,e,null)))}else void 0!==d&&w.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +w.defineProperty(P,{Ng:"linkDataArray"},function(){return this.df},function(a){var b=this.df;if(b!==a){w.Tz(a,P,"linkDataArray");this.ad.clear();for(var c=w.Ya(a),d=0;dd)return;w.Hg(a.df,d)}tg(a,"linkDataArray",Pf,"linkDataArray",a,b,null,d,null);c=a.Tl(b);Rg(a,c,b);c=a.Ul(b);Rg(a,c,b);d=a.Ak(b);if(w.isArray(d))for(var e=w.Ya(d),f=0;fa.Fh&&w.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Fh;d&&b&&a.cd("CommittingTransaction",c,a.lj);var e=0;if(0a.qj;e--)f=d.da(e),null!==f&&f.clear(), -d.Yc(e),a.kz=!0;e=a.xF;0===e&&(e=1);0=e&&(f=d.da(0),null!==f&&f.clear(),d.Yc(0),a.dh--);d.add(b);a.dh++;d.freeze();f=b}a.cd("CommittedTransaction",c,f)}else{a.Ki=!0;try{a.isEnabled&&null!==f&&(f.$t=!0,f.undo())}finally{a.cd("RolledBackTransaction",c,f),a.Ki=!1}null!==f&&f.clear()}a.pv=null;return!0}if(a.isEnabled&&!b&&null!==f){a=e;c=f.Qf;for(b=c.count-1;b>=a;b--)d=c.da(b),null!==d&&d.undo(),c.Ra(),c.Yc(b);c.freeze()}return!1} +function ch(a,b,c){if(a.gb)return!1;a.Uz&&1>a.Fh&&w.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Fh;d&&b&&a.cd("CommittingTransaction",c,a.lj);var e=0;if(0a.qj;e--)f=d.ea(e),null!==f&&f.clear(), +d.Yc(e),a.kz=!0;e=a.xF;0===e&&(e=1);0=e&&(f=d.ea(0),null!==f&&f.clear(),d.Yc(0),a.dh--);d.add(b);a.dh++;d.freeze();f=b}a.cd("CommittedTransaction",c,f)}else{a.Ki=!0;try{a.isEnabled&&null!==f&&(f.$t=!0,f.undo())}finally{a.cd("RolledBackTransaction",c,f),a.Ki=!1}null!==f&&f.clear()}a.pv=null;return!0}if(a.isEnabled&&!b&&null!==f){a=e;c=f.Qf;for(b=c.count-1;b>=a;b--)d=c.ea(b),null!==d&&d.undo(),c.Ra(),c.Yc(b);c.freeze()}return!1} Rf.prototype.canUndo=Rf.prototype.canUndo=function(){if(!this.isEnabled||0=this.Fh&&!this.az&&(a=a.g,null!==a&&!1===a.Hn||w.trace("Change not within a transaction: "+c.toString()))}}; -Rf.prototype.skipsEvent=function(a){if(null===a||0>a.yc.value)return!0;a=a.object;if(a instanceof G){if(a=a.layer,null!==a&&a.Kc)return!0}else if(a instanceof og&&a.Kc)return!0;return!1};w.u(Rf,{VI:"models"},function(){return this.pz.i});w.defineProperty(Rf,{isEnabled:"isEnabled"},function(){return this.cf},function(a){this.cf=a});w.u(Rf,{tG:"transactionToUndo"},function(){return 0<=this.qj&&this.qj<=this.history.count-1?this.history.da(this.qj):null}); -w.u(Rf,{sG:"transactionToRedo"},function(){return this.qj=this.Fh&&!this.az&&(a=a.g,null!==a&&!1===a.Gn||w.trace("Change not within a transaction: "+c.toString()))}}; +Rf.prototype.skipsEvent=function(a){if(null===a||0>a.yc.value)return!0;a=a.object;if(a instanceof G){if(a=a.layer,null!==a&&a.Kc)return!0}else if(a instanceof og&&a.Kc)return!0;return!1};w.u(Rf,{WI:"models"},function(){return this.pz.i});w.defineProperty(Rf,{isEnabled:"isEnabled"},function(){return this.cf},function(a){this.cf=a});w.u(Rf,{tG:"transactionToUndo"},function(){return 0<=this.qj&&this.qj<=this.history.count-1?this.history.ea(this.qj):null}); +w.u(Rf,{sG:"transactionToRedo"},function(){return this.qjb.xh||(b.scale=a))};qg.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.py);w.Fd(a,qg,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.Gl!==mh)return!1;a*=b.scale;return ab.xh?!1:b.Sw}; -qg.prototype.increaseZoom=function(a){void 0===a&&(a=this.py);w.Fd(a,qg,"increaseZoom:factor");var b=this.g;null!==b&&b.Gl===mh&&(a*=b.scale,ab.xh||(b.scale=a))};qg.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.py);w.Fd(a,qg,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.Gl!==mh)return!1;a*=b.scale;return ab.xh?!1:b.Sw};qg.prototype.resetZoom=function(a){void 0===a&&(a=this.$w);w.Fd(a,qg,"resetZoom:newscale");var b=this.g;null===b||ab.xh||(b.scale=a)}; +""}};qg.prototype.canPasteSelection=function(){var a=this.g;return null===a||a.eb||a.yf||!a.Ep||!a.Pz||null===dh||eh!==a.ba.Kl?!1:!0};qg.prototype.undo=function(){var a=this.g;null!==a&&a.oa.undo()};qg.prototype.canUndo=function(){var a=this.g;return null===a||a.eb||a.yf?!1:a.iE&&a.oa.canUndo()};qg.prototype.redo=function(){var a=this.g;null!==a&&a.oa.redo()};qg.prototype.canRedo=function(){var a=this.g;return null===a||a.eb||a.yf?!1:a.iE&&a.oa.canRedo()}; +qg.prototype.decreaseZoom=function(a){void 0===a&&(a=1/this.py);w.Fd(a,qg,"decreaseZoom:factor");var b=this.g;null!==b&&b.Fl===mh&&(a*=b.scale,ab.xh||(b.scale=a))};qg.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.py);w.Fd(a,qg,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.Fl!==mh)return!1;a*=b.scale;return ab.xh?!1:b.Sw}; +qg.prototype.increaseZoom=function(a){void 0===a&&(a=this.py);w.Fd(a,qg,"increaseZoom:factor");var b=this.g;null!==b&&b.Fl===mh&&(a*=b.scale,ab.xh||(b.scale=a))};qg.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.py);w.Fd(a,qg,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.Fl!==mh)return!1;a*=b.scale;return ab.xh?!1:b.Sw};qg.prototype.resetZoom=function(a){void 0===a&&(a=this.$w);w.Fd(a,qg,"resetZoom:newscale");var b=this.g;null===b||ab.xh||(b.scale=a)}; qg.prototype.canResetZoom=function(a){void 0===a&&(a=this.$w);w.Fd(a,qg,"canResetZoom:newscale");var b=this.g;return null===b||ab.xh?!1:b.Sw};qg.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.Nz&&!isNaN(this.lz)&&a.qe.L(this.Mz)?(a.scale=this.lz,a.position=this.WC,this.Nz=NaN,this.Mz=ed):(this.lz=b,this.WC=c.copy(),a.zoomToFit(),this.Nz=a.scale,this.Mz=a.qe.copy())}};qg.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.Sw}; -qg.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&w.G(a,S,qg,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.bj&&(this.bj.next()?a=this.bj.value:this.bj=null)}catch(c){this.bj=null}null===a&&(0e||Math.abs(b.y-a.y)>d};w.u(pg,{g:"diagram"},function(){return this.Z});w.defineProperty(pg,{name:"name"},function(){return this.Qb},function(a){w.j(a,"string",pg,"name");this.Qb=a}); +pg.prototype.isBeyondDragSize=function(a,b){var c=this.g;if(null===c)return!1;void 0===a&&(a=c.zc.bf);void 0===b&&(b=c.R.bf);var d=c.ab.MH,e=d.width,d=d.height;c.zc.uj&&(e+=6,d+=6);return Math.abs(b.x-a.x)>e||Math.abs(b.y-a.y)>d};w.u(pg,{g:"diagram"},function(){return this.Z});w.defineProperty(pg,{name:"name"},function(){return this.Qb},function(a){w.j(a,"string",pg,"name");this.Qb=a}); w.defineProperty(pg,{isEnabled:"isEnabled"},function(){return this.cf},function(a){w.j(a,"boolean",pg,"isEnabled");this.cf=a});w.defineProperty(pg,{sa:"isActive"},function(){return this.JC},function(a){w.j(a,"boolean",pg,"isActive");this.JC=a});w.defineProperty(pg,{Gf:"transactionResult"},function(){return this.UD},function(a){null!==a&&w.j(a,"string",pg,"transactionResult");this.UD=a}); -function lh(){pg.call(this);0e&&(e=k),l>f&&(f=l))}}Infinity===c?b.m(0,0,0,0):b.m(c,d,e-c,f-d)} -function Di(a,b){if(null===a.bc){var c=a.g;if(!(null===c||b&&(c.eb||c.yf))&&null!==a.Xb){var d=c.oa;d.isEnabled&&d.mF?null!==d.lj&&0c.qa)){var d=a.g;if(null!==d&&!d.eb){var e=a.$i;if(null!==e){var f=null,h=null;null===c.Y&&(f=Ni(a,c.l(0),!1),null!==f&&(h=f.U));var k=null,l=null;null===c.$&&(k=Ni(a,c.l(c.qa-1),!0),null!==k&&(l=k.U));e.isValidLink(h,f,l,k)?b?(c.Np=c.l(0),c.Op=c.l(c.qa-1),c.fm=!1,c.Y=h,null!==f&&(c.Lg=f.Qd),c.$=l,null!==k&&(c.Eh=k.Qd),c.Jc!==a.ew&&d.Aa("LinkRelinked",c,a.ew),c.jd!==a.fw&&d.Aa("LinkRelinked",c,a.fw)):Oi(e,h,f,l,k):Oi(e,null,null,null,null)}}}} +function Ki(a,b){var c=a.ed;if(null!==c&&!(2>c.qa)){var d=a.g;if(null!==d&&!d.eb){var e=a.$i;if(null!==e){var f=null,h=null;null===c.Y&&(f=Ni(a,c.l(0),!1),null!==f&&(h=f.U));var k=null,l=null;null===c.$&&(k=Ni(a,c.l(c.qa-1),!0),null!==k&&(l=k.U));e.isValidLink(h,f,l,k)?b?(c.Mp=c.l(0),c.Np=c.l(c.qa-1),c.fm=!1,c.Y=h,null!==f&&(c.Lg=f.Qd),c.$=l,null!==k&&(c.Eh=k.Qd),c.Jc!==a.ew&&d.Aa("LinkRelinked",c,a.ew),c.jd!==a.fw&&d.Aa("LinkRelinked",c,a.fw)):Oi(e,h,f,l,k):Oi(e,null,null,null,null)}}}} lh.prototype.doDragOver=function(){}; function Pi(a,b){var c=a.g;if(null!==c){a.nj&&Ki(a,!0);Vh(a);var d=Li(c,b,null,function(b){return!Ii(a,b)}),e=c.R;e.Pe=d;if(null!==d){e.Ac=!1;for(var f=d;null!==f;){var h=f.KA;if(null!==h&&(h(e,f),e.Ac))break;f=Mi(f)}}else f=c.KA,null!==f&&f(e);if(a.sa||null!==Oh){for(e=(a.bc||a.Xb).i;e.next();)f=e.key,f instanceof T&&f.fe.each(function(a){a.fm=!1});a.doDropOnto(b,d);if(a.sa||null!==Oh){d=w.Ef();for(e=c.selection.i;e.next();)f=e.value,f instanceof T&&Qi(c,f.getAvoidableRect(d));w.Db(d)}}}} -lh.prototype.doDropOnto=function(){};lh.prototype.doMouseMove=function(){if(this.sa){var a=this.g;if(null!==a&&null!==this.un&&null!==this.Xb){var b=!1,c=!1;this.mayCopy()?(b=!0,a.cc="copy",Di(this,!1),Nh(this,this.bc),Ei(this,this.bc,!1),Wh(this,this.bc)):this.mayMove()?(c=!0,a.cc="default",Zh(this),Ei(this,this.Xb,!0)):this.mayDragOut()?(a.cc="no-drop",Di(this,!1),Ei(this,this.bc,!1)):Zh(this);Ji(this,a.R.ca,c,b)}}}; -lh.prototype.doMouseUp=function(){if(this.sa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.bc?(Zh(this),Di(this,!0),Nh(this,this.bc),Ei(this,this.bc,!1),Wh(this,this.bc),null!==this.bc&&a.cG(this.bc.Gj())):(b=!0,Zh(this),this.mayMove()&&(Ei(this,this.Xb,!0),Ji(this,a.R.ca,!0,!1)));this.or=!0;Pi(this,a.R.ca);if(this.sa){this.bc=null;if(b&&null!==this.Xb)for(b=this.Xb.i;b.next();){var d=b.key;d instanceof T&&(d=d.Ka,null===d||null===d.placeholder||this.Xb.contains(d)||d.placeholder.I())}a.rc(); -Wh(this,this.Xb);this.Gf=c?"Copy":"Move";a.Aa(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};lh.prototype.mayCopy=function(){if(!this.hF)return!1;var a=this.g;if(null===a||a.eb||a.yf||!a.Fp||!a.tk||(w.Fk?!a.R.alt:!a.R.control))return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.de()&&b.canCopy())return!0}return null!==this.ed&&this.nj&&this.ed.canCopy()?!0:!1}; -lh.prototype.mayDragOut=function(){if(!this.hF)return!1;var a=this.g;if(null===a||!a.yt||!a.tk||a.El)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.de()&&b.canCopy())return!0}return null!==this.ed&&this.nj&&this.ed.canCopy()?!0:!1};lh.prototype.mayMove=function(){var a=this.g;if(null===a||a.eb||!a.El)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.de()&&b.canMove())return!0}return null!==this.ed&&this.nj&&this.ed.canMove()?!0:!1};var Xh=new I(lh),Oh=null,Ph=null; -lh.prototype.getDraggingSource=function(){return Oh};lh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.hE||a.eb||a.yf||!a.Fp)return!1;var b=Oh;return null===b||null===b.g||b.g.ba.Ll!==a.ba.Ll?!1:!0};lh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Pa.pi();Ri(a);a=Oh;null!==a&&null!==a.g&&(a.g.cc="copy")}};lh.prototype.doSimulatedDragLeave=function(){var a=Oh;null!==a&&a.doSimulatedDragOut();this.doCancel()}; -lh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=Oh;null!==b&&null!==b.Xb&&this.mayDragIn()&&(a.cc="copy",Si(this,b.Xb.Gj(),!1),Ei(this,this.bc,!1),Ji(this,a.R.ca,!1,!0))}}; -lh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=Oh;if(null!==b){var c=b.g;b.or=!0;Zh(this);this.mayDragIn()&&(this.Ub("Drop"),Si(this,b.Xb.Gj(),!0),Ei(this,this.bc,!1),null!==this.bc&&a.cG(this.bc.Gj()),Pi(this,a.R.ca),a.rc(),b=a.selection,null!==this.bc?this.Gf="ExternalCopy":b=new J(S),this.bc=null,a.doFocus(),a.Aa("ExternalObjectsDropped",b,c),this.Lk())}}}; -function Si(a,b,c){if(null===a.bc){var d=a.g;if(null!==d&&!d.eb&&!d.yf){d.wb=!c;d.Eq=!c;a.Kk=d.R.ca;d=d.Mp(b,d,!0);c=w.Ef();Ci(b,c);var e=c.x+c.width/2,f=c.y+c.height/2;w.Db(c);var h=a.zw;c=new ka(S);var k=w.K();for(b=b.i;b.next();){var l=b.value,m=d.ja(l);l.de()&&l.canCopy()?(l=l.location,k.m(h.x-(e-l.x),h.y-(f-l.y)),m.location=k,m.Ze(),c.add(m,Sh(k))):l instanceof W&&l.canCopy()&&m.Hk(h.x-e,h.y-f)}w.v(k);for(d=d.i;d.next();)e=d.value,e instanceof W&&e.canCopy()&&c.add(e,Sh());a.bc=c;Mh(a,c.Gj()); -null!==a.ed&&(c=a.ed,d=c.Wn,c.Hk(a.Kk.x-(d.x+d.width/2),a.Kk.y-(d.y+d.height/2)))}}}lh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.cc="":a.cc="no-drop")};function Th(a){this.point=a;this.hG=dd}w.fa("DraggingInfo",Th);function Fi(a,b,c){this.Oc=a;this.info=b;this.dI=c} +lh.prototype.doDropOnto=function(){};lh.prototype.doMouseMove=function(){if(this.sa){var a=this.g;if(null!==a&&null!==this.un&&null!==this.Xb){var b=!1,c=!1;this.mayCopy()?(b=!0,a.cc="copy",Di(this,!1),Nh(this,this.bc),Ei(this,this.bc,!1),Wh(this,this.bc)):this.mayMove()?(c=!0,a.cc="default",Zh(this),Ei(this,this.Xb,!0)):this.mayDragOut()?(a.cc="no-drop",Di(this,!1),Ei(this,this.bc,!1)):Zh(this);Ji(this,a.R.da,c,b)}}}; +lh.prototype.doMouseUp=function(){if(this.sa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.bc?(Zh(this),Di(this,!0),Nh(this,this.bc),Ei(this,this.bc,!1),Wh(this,this.bc),null!==this.bc&&a.cG(this.bc.Fj())):(b=!0,Zh(this),this.mayMove()&&(Ei(this,this.Xb,!0),Ji(this,a.R.da,!0,!1)));this.or=!0;Pi(this,a.R.da);if(this.sa){this.bc=null;if(b&&null!==this.Xb)for(b=this.Xb.i;b.next();){var d=b.key;d instanceof T&&(d=d.Pa,null===d||null===d.placeholder||this.Xb.contains(d)||d.placeholder.I())}a.rc(); +Wh(this,this.Xb);this.Gf=c?"Copy":"Move";a.Aa(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};lh.prototype.mayCopy=function(){if(!this.hF)return!1;var a=this.g;if(null===a||a.eb||a.yf||!a.Ep||!a.sk||(w.Ek?!a.R.alt:!a.R.control))return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.de()&&b.canCopy())return!0}return null!==this.ed&&this.nj&&this.ed.canCopy()?!0:!1}; +lh.prototype.mayDragOut=function(){if(!this.hF)return!1;var a=this.g;if(null===a||!a.yt||!a.sk||a.Dl)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.de()&&b.canCopy())return!0}return null!==this.ed&&this.nj&&this.ed.canCopy()?!0:!1};lh.prototype.mayMove=function(){var a=this.g;if(null===a||a.eb||!a.Dl)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.de()&&b.canMove())return!0}return null!==this.ed&&this.nj&&this.ed.canMove()?!0:!1};var Xh=new I(lh),Oh=null,Ph=null; +lh.prototype.getDraggingSource=function(){return Oh};lh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.hE||a.eb||a.yf||!a.Ep)return!1;var b=Oh;return null===b||null===b.g||b.g.ba.Kl!==a.ba.Kl?!1:!0};lh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Oa.pi();Ri(a);a=Oh;null!==a&&null!==a.g&&(a.g.cc="copy")}};lh.prototype.doSimulatedDragLeave=function(){var a=Oh;null!==a&&a.doSimulatedDragOut();this.doCancel()}; +lh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=Oh;null!==b&&null!==b.Xb&&this.mayDragIn()&&(a.cc="copy",Si(this,b.Xb.Fj(),!1),Ei(this,this.bc,!1),Ji(this,a.R.da,!1,!0))}}; +lh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=Oh;if(null!==b){var c=b.g;b.or=!0;Zh(this);this.mayDragIn()&&(this.Ub("Drop"),Si(this,b.Xb.Fj(),!0),Ei(this,this.bc,!1),null!==this.bc&&a.cG(this.bc.Fj()),Pi(this,a.R.da),a.rc(),b=a.selection,null!==this.bc?this.Gf="ExternalCopy":b=new J(S),this.bc=null,a.doFocus(),a.Aa("ExternalObjectsDropped",b,c),this.Kk())}}}; +function Si(a,b,c){if(null===a.bc){var d=a.g;if(null!==d&&!d.eb&&!d.yf){d.wb=!c;d.Eq=!c;a.Jk=d.R.da;d=d.Lp(b,d,!0);c=w.Ef();Ci(b,c);var e=c.x+c.width/2,f=c.y+c.height/2;w.Db(c);var h=a.zw;c=new ka(S);var k=w.K();for(b=b.i;b.next();){var l=b.value,m=d.ja(l);l.de()&&l.canCopy()?(l=l.location,k.m(h.x-(e-l.x),h.y-(f-l.y)),m.location=k,m.Ze(),c.add(m,Sh(k))):l instanceof W&&l.canCopy()&&m.Gk(h.x-e,h.y-f)}w.v(k);for(d=d.i;d.next();)e=d.value,e instanceof W&&e.canCopy()&&c.add(e,Sh());a.bc=c;Mh(a,c.Fj()); +null!==a.ed&&(c=a.ed,d=c.Vn,c.Gk(a.Jk.x-(d.x+d.width/2),a.Jk.y-(d.y+d.height/2)))}}}lh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.cc="":a.cc="no-drop")};function Th(a){this.point=a;this.hG=dd}w.fa("DraggingInfo",Th);function Fi(a,b,c){this.Oc=a;this.info=b;this.dI=c} function Ti(){0=d&&(d=.1);for(var e=this,f=b.wn(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,f=f.i;f.next();){var h=f.value,k=h.U;if(k instanceof T){var l=h.Wa(Gb,w.K()),m=c.x-l.x,n=c.y-l.y;w.v(l);l=m*m+n*n;lc){if(null!==this.kc&&a===this.Pg&&b===this.Qg)return!0;var d=b.Qd;null===d&&(d="");if(a.kx(d).count>=c)return!1}return!0}; -Ti.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.cq;if(null!==this.g&&this.g.Za===this&&(null!==a.layer&&!a.layer.zt||!0!==b.pG))return!1;var c=b.NJ;if(Infinity>c){if(null!==this.kc&&a===this.Rg&&b===this.Sg)return!0;var d=b.Qd;null===d&&(d="");if(a.Kg(d).count>=c)return!1}return!0};Ti.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.U,d=b.U;return null!==c&&c===d}; +Ti.prototype.findTargetPort=function(a){var b=this.g,c=b.R.da,d=this.KF;0>=d&&(d=.1);for(var e=this,f=b.wn(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,f=f.i;f.next();){var h=f.value,k=h.U;if(k instanceof T){var l=h.Wa(Gb,w.K()),m=c.x-l.x,n=c.y-l.y;w.v(l);l=m*m+n*n;lc){if(null!==this.kc&&a===this.Pg&&b===this.Qg)return!0;var d=b.Qd;null===d&&(d="");if(a.kx(d).count>=c)return!1}return!0}; +Ti.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.bq;if(null!==this.g&&this.g.Za===this&&(null!==a.layer&&!a.layer.zt||!0!==b.pG))return!1;var c=b.OJ;if(Infinity>c){if(null!==this.kc&&a===this.Rg&&b===this.Sg)return!0;var d=b.Qd;null===d&&(d="");if(a.Kg(d).count>=c)return!1}return!0};Ti.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.U,d=b.U;return null!==c&&c===d}; Ti.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.U;if(!(c instanceof T))return!1;var d=a.Qd;null===d&&(d="");var e=b.U;if(!(e instanceof T))return!1;var f=b.Qd;null===f&&(f="");for(e=e.Kg(f);e.next();)if(f=e.value,f.Y===c&&f.Lg===d)return!0;return!1}; -Ti.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.UH&&d.MJ||!this.isInSameNode(b,d))&&(b.TH&&d.LJ||!this.isLinked(b,d)))||null!==this.kc&&(null!==a&&this.isLabelDependentOnLink(a,this.kc)||null!==c&&this.isLabelDependentOnLink(c,this.kc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.kc))return!1;if(null!==a){var e=a.Ix;if(null!==e&&!e(a,b,c,d,this.kc))return!1}if(null!== +Ti.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.UH&&d.NJ||!this.isInSameNode(b,d))&&(b.TH&&d.MJ||!this.isLinked(b,d)))||null!==this.kc&&(null!==a&&this.isLabelDependentOnLink(a,this.kc)||null!==c&&this.isLabelDependentOnLink(c,this.kc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.kc))return!1;if(null!==a){var e=a.Ix;if(null!==e&&!e(a,b,c,d,this.kc))return!1}if(null!== c&&(e=c.Ix,null!==e&&!e(a,b,c,d,this.kc)))return!1;e=this.Ix;return null!==e?e(a,b,c,d,this.kc):!0};Ti.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Mc;if(null===c)return!1;if(c===b)return!0;var d=new J(T);d.add(a);return Ui(this,c,b,d)};function Ui(a,b,c,d){if(b===c)return!0;var e=b.Y;if(null!==e&&e.mf&&(d.add(e),Ui(a,e.Mc,c,d)))return!0;b=b.$;return null!==b&&b.mf&&(d.add(b),Ui(a,b.Mc,c,d))?!0:!1} -Ti.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.cq;var d=null!==this.g?this.g.TJ:Vi;if(d!==Vi){if(d===Wi){if(null!==c&&!c.Lc)return!0;for(d=b.fe;d.next();){var e=d.value;if(e!==c&&e.Lc&&e.$===b)return!1}return!Xi(this,a,b,c,!0)}if(d===Yi){if(null!==c&&!c.Lc)return!0;for(d=a.fe;d.next();)if(e=d.value,e!==c&&e.Lc&&e.Y===a)return!1;return!Xi(this,a,b,c,!0)}if(d===Zi)return a===b?a=!0:(d=new J(T),d.add(b),a=$i(this,d,a,b,c)),!a;if(d===aj)return!Xi(this, +Ti.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.bq;var d=null!==this.g?this.g.UJ:Vi;if(d!==Vi){if(d===Wi){if(null!==c&&!c.Lc)return!0;for(d=b.fe;d.next();){var e=d.value;if(e!==c&&e.Lc&&e.$===b)return!1}return!Xi(this,a,b,c,!0)}if(d===Yi){if(null!==c&&!c.Lc)return!0;for(d=a.fe;d.next();)if(e=d.value,e!==c&&e.Lc&&e.Y===a)return!1;return!Xi(this,a,b,c,!0)}if(d===Zi)return a===b?a=!0:(d=new J(T),d.add(b),a=$i(this,d,a,b,c)),!a;if(d===aj)return!Xi(this, a,b,c,!1);if(d===bj)return a===b?a=!0:(d=new J(T),d.add(b),a=cj(this,d,a,b,c)),!a}return!0};function Xi(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.fe;f.next();){var h=f.value;if(h!==d&&(!e||h.Lc)&&h.$===b&&(h=h.Y,h!==b&&Xi(a,h,c,d,e)))return!0}return!1}function $i(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.fe;f.next();){var h=f.value;if(h!==e&&h.$===c&&(h=h.Y,h!==c&&$i(a,b,h,d,e)))return!0}return!1} -function cj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.fe;f.next();){var h=f.value;if(h!==e){var k=h.Y,h=h.$,k=k===c?h:k;if(k!==c&&cj(a,b,k,d,e))return!0}}return!1}w.defineProperty(Ti,{Ix:"linkValidation"},function(){return this.ol},function(a){null!==a&&w.j(a,"function",Ti,"linkValidation");this.ol=a});w.defineProperty(Ti,{Sx:"portTargeted"},function(){return this.uD},function(a){null!==a&&w.j(a,"function",Ti,"portTargeted");this.uD=a}); -function dj(){0b.Nt+1&&cb.Nt+1&&c=c.x)d=0>=c.y?d+225:1<=c.y?d+135:d+180;else if(1<=c.x)0>=c.y?d+=315:1<=c.y&&(d+=45);else if(0>=c.y)d+=270;else if(1<=c.y)d+=90;else break a;0>d?d+=360:360<=d&&(d-=360);a.cursor=22.5>d?"e-resize":67.5>d?"se-resize":112.5>d?"s-resize":157.5>d?"sw-resize":202.5>d?"w-resize":247.5>d?"nw-resize":292.5>d?"n-resize":337.5>d? -"ne-resize":"e-resize"}else if(a instanceof C)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};w.defineProperty(Kj,{Vt:"handleArchetype"},function(){return this.dl},function(a){null!==a&&w.G(a,G,Kj,"handleArchetype");this.dl=a});w.u(Kj,{handle:"handle"},function(){return this.fc});w.defineProperty(Kj,{rb:"adornedObject"},function(){return this.Dc},function(a){null!==a&&w.G(a,G,Kj,"adornedObject");this.Dc=a}); -Kj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.eb&&a.At&&a.R.left?null!==this.findToolHandleAt(a.zc.ca,this.name):!1}; -Kj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.fc=this.findToolHandleAt(a.zc.ca,this.name),null!==this.fc&&(this.Dc=this.fc.U.rb,this.hp.set(this.rb.Wa(this.handle.alignment.FF())),this.pD.set(this.Dc.U.location),this.kD.set(this.Dc.Ba),this.Xy=this.computeCellSize(),this.Zy=this.computeMinSize(),this.Yy=this.computeMaxSize(),a.$e=!0,this.hD=a.Pa.isEnabled,a.Pa.isEnabled=!1,this.Ub(this.name),this.sa=!0))}; -Kj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.Lk(),this.Dc=this.fc=null,this.sa=a.$e=!1,a.Pa.isEnabled=this.hD)};Kj.prototype.doCancel=function(){null!==this.rb&&(this.rb.Ba=this.GF,this.rb.U.location=this.cJ);this.stopTool()};Kj.prototype.doMouseMove=function(){var a=this.g;if(this.sa&&null!==a){var b=this.Zy,c=this.Yy,d=this.Xy,e=this.rb.RE(a.R.ca,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.Zf();w.v(e)}}; -Kj.prototype.doMouseUp=function(){var a=this.g;if(this.sa&&null!==a){var b=this.Zy,c=this.Yy,d=this.Xy,e=this.rb.RE(a.R.ca,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);w.v(e);a.rc();this.Gf=this.name;a.Aa("PartResized",this.rb,this.GF)}this.stopTool()}; -Kj.prototype.resize=function(a){if(null!==this.g){var b=this.rb,c=b.U;b.Ba=a.size;c.Ze();a=this.rb.Wa(this.handle.alignment.FF());c instanceof U?(a=c.position.copy().$n(a).add(this.hp),c.move(a)):c.location=c.location.copy().$n(a).add(this.hp)}}; +"ne-resize":"e-resize"}else if(a instanceof C)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};w.defineProperty(Kj,{Vt:"handleArchetype"},function(){return this.cl},function(a){null!==a&&w.G(a,G,Kj,"handleArchetype");this.cl=a});w.u(Kj,{handle:"handle"},function(){return this.fc});w.defineProperty(Kj,{rb:"adornedObject"},function(){return this.Dc},function(a){null!==a&&w.G(a,G,Kj,"adornedObject");this.Dc=a}); +Kj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.eb&&a.At&&a.R.left?null!==this.findToolHandleAt(a.zc.da,this.name):!1}; +Kj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.fc=this.findToolHandleAt(a.zc.da,this.name),null!==this.fc&&(this.Dc=this.fc.U.rb,this.gp.set(this.rb.Wa(this.handle.alignment.FF())),this.pD.set(this.Dc.U.location),this.kD.set(this.Dc.Ba),this.Xy=this.computeCellSize(),this.Zy=this.computeMinSize(),this.Yy=this.computeMaxSize(),a.$e=!0,this.hD=a.Oa.isEnabled,a.Oa.isEnabled=!1,this.Ub(this.name),this.sa=!0))}; +Kj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.Kk(),this.Dc=this.fc=null,this.sa=a.$e=!1,a.Oa.isEnabled=this.hD)};Kj.prototype.doCancel=function(){null!==this.rb&&(this.rb.Ba=this.GF,this.rb.U.location=this.dJ);this.stopTool()};Kj.prototype.doMouseMove=function(){var a=this.g;if(this.sa&&null!==a){var b=this.Zy,c=this.Yy,d=this.Xy,e=this.rb.RE(a.R.da,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.Zf();w.v(e)}}; +Kj.prototype.doMouseUp=function(){var a=this.g;if(this.sa&&null!==a){var b=this.Zy,c=this.Yy,d=this.Xy,e=this.rb.RE(a.R.da,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);w.v(e);a.rc();this.Gf=this.name;a.Aa("PartResized",this.rb,this.GF)}this.stopTool()}; +Kj.prototype.resize=function(a){if(null!==this.g){var b=this.rb,c=b.U;b.Ba=a.size;c.Ze();a=this.rb.Wa(this.handle.alignment.FF());c instanceof U?(a=c.position.copy().Zn(a).add(this.gp),c.move(a)):c.location=c.location.copy().Zn(a).add(this.gp)}}; Kj.prototype.computeResize=function(a,b,c,d,e,f){b.Od()&&(b=Gb);var h=this.rb.Ia,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!f){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=w.K();Ka(a.x,a.y,k,l,e.width,e.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),f||(b=a.height/a.width,p=b.y?(a.width=Math.max(Math.min(q.x-k,d.width),c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height), a.height=Math.max(n-a.y,c.height),f||(b=a.height/a.width,p=b.y?(a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=n-a.y,f||(a.width=a.height/p,a.x= k+.5*(m-k-a.width))):1<=b.y&&(a.height=Math.max(Math.min(q.y-l,d.height),c.height),f||(a.width=a.height/p,a.x=k+.5*(m-k-a.width)));w.v(q);return a};Kj.prototype.computeReshape=function(){var a=Nj;this.rb instanceof X&&(a=Oj(this.rb));return!(a===Pj||a===Qj||null!==this.g&&this.g.R.shift)};Kj.prototype.computeMinSize=function(){var a=this.rb.zh.copy(),b=this.zh;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; Kj.prototype.computeMaxSize=function(){var a=this.rb.Bf.copy(),b=this.Bf;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.DJ),180),c=Math.min(Math.abs(this.CJ),b/2);(null===this.g||!this.g.R.shift)&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};w.defineProperty(Rj,{DJ:"snapAngleMultiple"},function(){return this.AD},function(a){w.j(a,"number",Rj,"snapAngleMultiple");this.AD=a}); -w.defineProperty(Rj,{CJ:"snapAngleEpsilon"},function(){return this.zD},function(a){w.j(a,"number",Rj,"snapAngleEpsilon");this.zD=a});w.u(Rj,{tL:"originalAngle"},function(){return this.gw});function Tj(){pg.call(this);0a&&(a+=360));var b=Math.min(Math.abs(this.EJ),180),c=Math.min(Math.abs(this.DJ),b/2);(null===this.g||!this.g.R.shift)&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};w.defineProperty(Rj,{EJ:"snapAngleMultiple"},function(){return this.AD},function(a){w.j(a,"number",Rj,"snapAngleMultiple");this.AD=a}); +w.defineProperty(Rj,{DJ:"snapAngleEpsilon"},function(){return this.zD},function(a){w.j(a,"number",Rj,"snapAngleEpsilon");this.zD=a});w.u(Rj,{uL:"originalAngle"},function(){return this.gw});function Tj(){pg.call(this);0e.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ye.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ya.R.Fe?!1:!0};fk.prototype.doStart=function(){this.sa||null===this.Xg||this.doActivate()}; -fk.prototype.doActivate=function(){if(!this.sa){var a=this.g;if(null!==a){var b=this.Xg;null===b&&(b=a.Je(a.R.ca,function(a){return a instanceof Hh?a:null}));if(null!==b&&(this.Xg=b,null!==b.U)){this.sa=!0;this.Ta=ok;var c=this.GH;null!==b.oG&&(c=b.oG);this.lk=this.Xg.copy();var d=new A(this.Xg.Wa(xb),this.Xg.Wa(Lb));a.vJ(d);if(c instanceof Wj)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();"function"=== -typeof c.focus&&c.focus();"function"===typeof c.select&&this.ey&&(c.select(),c.setSelectionRange(0,9999));a.mj.appendChild(c)}this.kj=c}}}};fk.prototype.doCancel=function(){null!==this.sl&&this.kj instanceof HTMLElement&&(this.kj.style.border=this.sl,this.sl=null);this.stopTool()};fk.prototype.doMouseUp=function(){!this.sa&&this.canStart()&&this.doActivate()};fk.prototype.doMouseDown=function(){this.sa&&this.acceptText(kk)}; +fk.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;if(null===a||a.eb||!a.R.left||this.isBeyondDragSize())return!1;var b=a.Je(a.R.da,null,function(a){return a instanceof Hh});if(null===b||!b.fA||!b.U.canEdit())return!1;b=b.U;return null===b||this.lG===gk&&!b.fb||this.lG===nk&&2>a.R.Fe?!1:!0};fk.prototype.doStart=function(){this.sa||null===this.Xg||this.doActivate()}; +fk.prototype.doActivate=function(){if(!this.sa){var a=this.g;if(null!==a){var b=this.Xg;null===b&&(b=a.Je(a.R.da,function(a){return a instanceof Hh?a:null}));if(null!==b&&(this.Xg=b,null!==b.U)){this.sa=!0;this.Ta=ok;var c=this.GH;null!==b.oG&&(c=b.oG);this.kk=this.Xg.copy();var d=new A(this.Xg.Wa(xb),this.Xg.Wa(Lb));a.wJ(d);if(c instanceof Wj)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();"function"=== +typeof c.focus&&c.focus();"function"===typeof c.select&&this.ey&&(c.select(),c.setSelectionRange(0,9999));a.mj.appendChild(c)}this.kj=c}}}};fk.prototype.doCancel=function(){null!==this.rl&&this.kj instanceof HTMLElement&&(this.kj.style.border=this.rl,this.rl=null);this.stopTool()};fk.prototype.doMouseUp=function(){!this.sa&&this.canStart()&&this.doActivate()};fk.prototype.doMouseDown=function(){this.sa&&this.acceptText(kk)}; fk.prototype.acceptText=function(a){switch(a){case kk:if(this.Ta===sk)this.kj instanceof HTMLElement&&this.kj.focus();else if(this.Ta===ok||this.Ta===rk||this.Ta===pk)this.Ta=qk,vk(this);break;case jk:case mk:case lk:if(mk===a&&!0===this.Gz.Ax)break;if(this.Ta===ok||this.Ta===rk||this.Ta===pk)this.Ta=qk,vk(this)}}; -function vk(a){var b=a.Xg,c=a.g,d=a.kj;if(null!==b&&null!==d){var e=b.text,f="";d instanceof Wj?null!==d.zB&&(f=d.zB()):(f=d.value,f="function"===typeof f?f():f);a.isValidText(b,e,f)?(a.Ub(a.name),a.Ta=sk,d instanceof Wj?d.show(b,c,a):null!==a.sl&&(d.style.border=a.sl,a.sl=null),a.Gf=a.name,b.text=f,null!==b.nG&&b.nG(b,e,f),null!==c&&c.Aa("TextEdited",b,e),a.Lk(),a.stopTool(),null!==c&&c.doFocus()):(a.Ta=rk,null!==b.hA&&b.hA(a,e,f),d instanceof Wj?d.show(b,c,a):(null===a.sl&&(a.sl=d.style.border, -d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}}fk.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.Ta=hk;this.Xg=null;if(null!==this.kj){var b=this.kj;if(b instanceof Wj)b.En(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.mj.removeChild(b)}}this.sa=!1}};fk.prototype.doFocus=function(){tk(this)};fk.prototype.doBlur=function(){uk(this)}; +function vk(a){var b=a.Xg,c=a.g,d=a.kj;if(null!==b&&null!==d){var e=b.text,f="";d instanceof Wj?null!==d.zB&&(f=d.zB()):(f=d.value,f="function"===typeof f?f():f);a.isValidText(b,e,f)?(a.Ub(a.name),a.Ta=sk,d instanceof Wj?d.show(b,c,a):null!==a.rl&&(d.style.border=a.rl,a.rl=null),a.Gf=a.name,b.text=f,null!==b.nG&&b.nG(b,e,f),null!==c&&c.Aa("TextEdited",b,e),a.Kk(),a.stopTool(),null!==c&&c.doFocus()):(a.Ta=rk,null!==b.hA&&b.hA(a,e,f),d instanceof Wj?d.show(b,c,a):(null===a.rl&&(a.rl=d.style.border, +d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}}fk.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.Ta=hk;this.Xg=null;if(null!==this.kj){var b=this.kj;if(b instanceof Wj)b.Dn(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.mj.removeChild(b)}}this.sa=!1}};fk.prototype.doFocus=function(){tk(this)};fk.prototype.doBlur=function(){uk(this)}; function tk(a){if(null!==a.kj){var b=a.My;a.Ta===ok&&(a.Ta=pk);"function"===typeof b.select&&a.ey&&(b.select(),b.setSelectionRange(0,9999))}}function uk(a){if(null!==a.kj){var b=a.My;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.ey&&(b.select(),b.setSelectionRange(0,9999))}}fk.prototype.isValidText=function(a,b,c){w.G(a,Hh,fk,"isValidText:textblock");var d=this.pB;if(null!==d&&!d(a,b,c))return!1;d=a.pB;return null===d||d(a,b,c)?!0:!1}; -w.defineProperty(fk,{pB:"textValidation"},function(){return this.xl},function(a){null!==a&&w.j(a,"function",fk,"textValidation");this.xl=a});w.defineProperty(fk,{AF:"minimumEditorScale"},function(){return this.bD},function(a){null!==a&&w.j(a,"number",fk,"minimumEditorScale");this.bD=a});w.defineProperty(fk,{ey:"selectsTextOnActivate"},function(){return this.xD},function(a){null!==a&&w.j(a,"boolean",fk,"selectsTextOnActivate");this.xD=a}); -w.defineProperty(fk,{state:"state"},function(){return this.Ta},function(a){this.Ta!==a&&(w.mb(a,fk,fk,"starting"),this.Ta=a)});fk.prototype.measureTemporaryTextBlock=fk.prototype.QI=function(a){var b=this.lk;b.text=a;wk(b,this.Xg.Yo,Infinity);return b};function fh(){pg.call(this);this.name="ToolManager";this.KG=new I(pg);this.LG=new I(pg);this.MG=new I(pg);this.GC=this.HC=850;this.wC=(new ha(2,2)).Ga();this.RD=5E3;this.fD=Lh;this.EC=xk;this.ov=this.kC=null;this.en=-1}w.La(fh,pg); +w.defineProperty(fk,{pB:"textValidation"},function(){return this.wl},function(a){null!==a&&w.j(a,"function",fk,"textValidation");this.wl=a});w.defineProperty(fk,{AF:"minimumEditorScale"},function(){return this.bD},function(a){null!==a&&w.j(a,"number",fk,"minimumEditorScale");this.bD=a});w.defineProperty(fk,{ey:"selectsTextOnActivate"},function(){return this.xD},function(a){null!==a&&w.j(a,"boolean",fk,"selectsTextOnActivate");this.xD=a}); +w.defineProperty(fk,{state:"state"},function(){return this.Ta},function(a){this.Ta!==a&&(w.mb(a,fk,fk,"starting"),this.Ta=a)});fk.prototype.measureTemporaryTextBlock=fk.prototype.RI=function(a){var b=this.kk;b.text=a;wk(b,this.Xg.Xo,Infinity);return b};function fh(){pg.call(this);this.name="ToolManager";this.KG=new I(pg);this.LG=new I(pg);this.MG=new I(pg);this.GC=this.HC=850;this.wC=(new ha(2,2)).Ga();this.RD=5E3;this.fD=Lh;this.EC=xk;this.ov=this.kC=null;this.en=-1}w.Ka(fh,pg); w.fa("ToolManager",fh);var Lh;fh.WheelScroll=Lh=w.p(fh,"WheelScroll",0);var Kh;fh.WheelZoom=Kh=w.p(fh,"WheelZoom",1);fh.WheelNone=w.p(fh,"WheelNone",2);var xk;fh.GestureZoom=xk=w.p(fh,"GestureZoom",3);var yk;fh.GestureCancel=yk=w.p(fh,"GestureCancel",4);var zk;fh.GestureNone=zk=w.p(fh,"GestureNone",5);w.defineProperty(fh,{pu:"mouseWheelBehavior"},function(){return this.fD},function(a){w.mb(a,fh,fh,"mouseWheelBehavior");this.fD=a}); -w.defineProperty(fh,{Wp:"gestureBehavior"},function(){return this.EC},function(a){w.mb(a,fh,fh,"gestureBehavior");this.EC=a});fh.prototype.initializeStandardTools=function(){this.XG=new Uj;this.MF=new Qh;this.HI=new mj;this.XF=new Kj;this.sJ=new Rj;this.wF=new dj;this.re=new lh;this.LH=new dk;this.dJ=new ek;this.Yz=new Yj;this.oB=new fk;this.nH=new Vj;this.oH=new Tj}; -fh.prototype.updateAdornments=function(a){var b=this.Kl;if(b instanceof hh&&this.ov===a){var c=b.rb;(null!==a?c.U===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}}; -fh.prototype.doMouseDown=function(){var a=this.g;if(null!==a){var b=a.R;b.vj&&this.Wp===yk&&(b.bubbles=!1);if(b.du){this.cancelWaitAfter();if(this.Wp===zk){b.bubbles=!0;return}if(this.Wp===yk)return;if(a.Za.canStartMultiTouch()){a.Za.standardPinchZoomStart();return}}var c=a.oa;c.Uz&&0!==c.Fh&&w.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var c=this.af.length,d=0;de.right&&(c.x-=d.width+5);c.xe.bottom?c.y-(d.height+5):c.y+20;c.ye.right&&(c.x-=d.width+5);c.xe.bottom?c.y-(d.height+5):c.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}w.u(Ug,{sK:"animationReasons"},function(){return this.av}); -Ug.prototype.canStart=function(){return!0};Ug.prototype.prepareAutomaticAnimation=Ug.prototype.Un=function(a){this.cf&&(this.Xj||this.Z.Hn)&&(this.av.add(a),this.canStart(a)&&(this.Wj&&this.pi(),this.pc=!0))};function Ek(a){if(a.cf&&(a.av.clear(),a.pc))if(!a.no)a.pc=!1;else if(0===a.mo){var b=+new Date;a.mo=b;requestAnimationFrame(function(){if(!1!==a.pc&&!a.Wj&&a.mo===b){var c=a.Z;c.pj("temporaryPixelRatio")&&(c.kk=1);Fk(c);a.pc=!1;c.Aa("AnimationStarting");Gk(a,b)}})}} -function Hk(a,b,c,d,e,f){if(!(!a.pc||"position"===c&&d.L(e)||b instanceof S&&!b.fF)){var h=a.Pm;if(h.contains(b)){var h=h.ja(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=Tk(d));h.Xw&&void 0!==l[c]?h.It[c]=Tk(e):(f||(h.It[c]=Tk(e)),l[c]=Tk(e));f&&0===c.indexOf("position:")&&b instanceof S&&(h.It.location=Tk(b.location))}else k=new sa,l=new sa,k[c]=Tk(d),l[c]=Tk(e),d=l,e=k.position,e instanceof z&&!e.H()&&a.av.contains("Expand SubGraph")&&e.assign(d.position),k=new Dk(k,l,f),f&&0===c.indexOf("position:")&& -b instanceof S&&(k.It.location=Tk(b.location)),h.add(b,k);a.no=!0}}function Tk(a){return a instanceof z?a.copy():a instanceof ha?a.copy():a} -function Gk(a,b){var c;function d(){if(!1!==f.Wj&&f.mo===b){var a=+new Date,c=a>s?m:a-r;Zk(f);$k(f,e,q,h,c,m);f.lv&&f.lv();Ri(e);al(f);a>s?bl(f):requestAnimationFrame(d)}}void 0===c&&(c=new sa);var e=a.Z;if(null!==e){a.Wj=!0;var f=a,h=c.RK||a.lC,k=c.rL||null,l=c.sL||null,m=c.duration||a.Uy,n=a.NG;for(c=a.Pm.i;c.next();){var p=c.value.start.position;p instanceof z&&(p.H()||p.assign(n))}a.gC=h;a.lv=k;a.mv=l;a.fC=m;a.nv=a.Pm;var q=a.nv;for(c=q.i;c.next();)k=c.value.end,k["position:placeholder"]&&(l= -k["position:placeholder"],n=l.Wa(xb),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n);Zk(a);$k(a,e,q,h,0,m);Ri(a.Z);al(a);var r=+new Date,s=r+m;f.mo===b&&requestAnimationFrame(function(){d()})}}function Zk(a){if(!a.To){var b=a.Z;a.VD=b.wb;a.TB=b.Ne;a.UB=b.Ju;b.wb=!0;b.Ne=!0;b.Ju=!0;a.To=!0}}function al(a){var b=a.Z;b.wb=a.VD;b.Ne=a.TB;b.Ju=a.UB;a.To=!1} -function $k(a,b,c,d,e,f){for(c=c.i;c.next();){var h=c.key,k=c.value,l=k.start,k=k.end,m;for(m in k)if(("position"!==m||!k["position:placeholder"]&&!k["position:node"])&&void 0!==cl[m])cl[m](h,l[m],k[m],d,e,f)}d=b.yA;b.yA=!0;m=a.lC;0!==a.mr&&0!==a.lr&&(c=a.mr,b.tb=m(e,c,a.lr-c,f));null!==a.kr&&null!==a.jr&&(c=a.kr,a=a.jr,b.ib=new z(m(e,c.x,a.x-c.x,f),m(e,c.y,a.y-c.y,f)));b.yA=d}Ug.prototype.stopAnimation=Ug.prototype.pi=function(){!0===this.pc&&(this.pc=!1,this.no&&this.Z.Le());this.Wj&&this.cf&&bl(this)}; -function bl(a){a.Wj=!1;a.no=!1;Zk(a);for(var b=a.Z,c=a.gC,d=a.fC,e=a.nv.i;e.next();){var f=e.key,h=e.value,k=h.start,l=h.end,m=h.It,n;for(n in l)if(void 0!==cl[n]){var p=n;!h.Xw||"position:node"!==p&&"position:placeholder"!==p||(p="position");cl[p](f,k[n],void 0!==m[n]?m[n]:h.Xw?k[n]:l[n],c,d,d)}h.Xw&&void 0!==m.location&&f instanceof S&&(f.location=m.location);h.Wx&&f instanceof S&&f.vd(!1)}for(c=a.Z.links;c.next();)d=c.value,null!==d.mp&&(d.points=d.mp,d.mp=null);b.Jx.clear();b.kk=null;b.rc();b.na(); -b.Zf();dl(b);al(a);a.mv&&a.mv();a.mo=0;a.nv=null;a.mv=null;a.lv=null;a.kr=null;a.jr=null;a.mr=0;a.lr=0;a.Pm=new ka(G,Dk);b.Aa("AnimationFinished");b.Le()} -function el(a,b,c){var d=b.W,e=c.W,f=null;c instanceof U&&(f=c.placeholder);null!==f?(d=f.Wa(xb),d.x+=f.padding.left,d.y+=f.padding.top,Hk(a,b,"position",d,b.position,!1)):Hk(a,b,"position",new z(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);Hk(a,b,"scale",.01,b.scale,!1);if(b instanceof U)for(b=b.Nc;b.next();)f=b.value,f instanceof T&&el(a,f,c)} -function fl(a,b,c){if(b.isVisible()){var d=null;c instanceof U&&(d=c.placeholder);null!==d?Hk(a,b,"position:placeholder",b.position,d,!0):Hk(a,b,"position:node",b.position,c,!0);Hk(a,b,"scale",b.scale,.01,!0);a.pc&&(d=a.Pm,d.contains(b)&&(d.ja(b).Wx=!0));if(b instanceof U)for(b=b.Nc;b.next();)d=b.value,d instanceof T&&fl(a,d,c)}}function gl(a,b,c){a.pc&&(null===a.kr&&b.H()&&null===a.jr&&(a.kr=b.copy()),a.jr=c.copy(),a.no=!0)} -function hl(a,b,c){a.pc&&a.Z.Hn&&(0===a.mr&&0===a.lr&&(a.mr=b),a.lr=c,a.no=!0)}w.defineProperty(Ug,{isEnabled:"isEnabled"},function(){return this.cf},function(a){w.j(a,"boolean",Ug,"isEnabled");this.cf=a});w.defineProperty(Ug,{duration:"duration"},function(){return this.Uy},function(a){w.j(a,"number",Ug,"duration");1>a&&w.Ea(a,">= 1",Ug,"duration");this.Uy=a});w.u(Ug,{lf:"isAnimating"},function(){return this.Wj});w.u(Ug,{yI:"isTicking"},function(){return this.To}); -w.defineProperty(Ug,{nF:"isInitial"},function(){return this.Xj},function(a){w.j(a,"boolean",Ug,"isInitial");this.Xj=a});function Dk(a,b,c){this.start=a;this.end=b;this.It=new sa;this.Xw=c;this.Wx=!1} +function Ug(){this.lC=Ck;this.jr=this.kr=this.Z=null;this.lo=this.lr=this.mr=0;this.mo=this.pc=this.So=this.Vj=!1;this.Wj=this.cf=!0;this.mv=this.lv=this.gC=null;this.fC=0;this.nv=null;this.av=new J("string");this.Uy=600;this.NG=new z(0,0);this.UB=this.TB=this.VD=!1;this.Pm=new ka(G,Dk)}w.fa("AnimationManager",Ug);Ug.prototype.Qc=function(a){this.Z=a};function Ck(a,b,c,d){a/=d/2;return 1>a?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}w.u(Ug,{tK:"animationReasons"},function(){return this.av}); +Ug.prototype.canStart=function(){return!0};Ug.prototype.prepareAutomaticAnimation=Ug.prototype.Tn=function(a){this.cf&&(this.Wj||this.Z.Gn)&&(this.av.add(a),this.canStart(a)&&(this.Vj&&this.pi(),this.pc=!0))};function Ek(a){if(a.cf&&(a.av.clear(),a.pc))if(!a.mo)a.pc=!1;else if(0===a.lo){var b=+new Date;a.lo=b;requestAnimationFrame(function(){if(!1!==a.pc&&!a.Vj&&a.lo===b){var c=a.Z;c.pj("temporaryPixelRatio")&&(c.jk=1);Fk(c);a.pc=!1;c.Aa("AnimationStarting");Gk(a,b)}})}} +function Sk(a,b,c,d,e,f){if(!(!a.pc||"position"===c&&d.L(e)||b instanceof S&&!b.fF)){var h=a.Pm;if(h.contains(b)){var h=h.ja(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=Yk(d));h.Xw&&void 0!==l[c]?h.It[c]=Yk(e):(f||(h.It[c]=Yk(e)),l[c]=Yk(e));f&&0===c.indexOf("position:")&&b instanceof S&&(h.It.location=Yk(b.location))}else k=new sa,l=new sa,k[c]=Yk(d),l[c]=Yk(e),d=l,e=k.position,e instanceof z&&!e.H()&&a.av.contains("Expand SubGraph")&&e.assign(d.position),k=new Dk(k,l,f),f&&0===c.indexOf("position:")&& +b instanceof S&&(k.It.location=Yk(b.location)),h.add(b,k);a.mo=!0}}function Yk(a){return a instanceof z?a.copy():a instanceof ha?a.copy():a} +function Gk(a,b){var c;function d(){if(!1!==f.Vj&&f.lo===b){var a=+new Date,c=a>s?m:a-r;Zk(f);$k(f,e,q,h,c,m);f.lv&&f.lv();Ri(e);al(f);a>s?bl(f):requestAnimationFrame(d)}}void 0===c&&(c=new sa);var e=a.Z;if(null!==e){a.Vj=!0;var f=a,h=c.SK||a.lC,k=c.sL||null,l=c.tL||null,m=c.duration||a.Uy,n=a.NG;for(c=a.Pm.i;c.next();){var p=c.value.start.position;p instanceof z&&(p.H()||p.assign(n))}a.gC=h;a.lv=k;a.mv=l;a.fC=m;a.nv=a.Pm;var q=a.nv;for(c=q.i;c.next();)k=c.value.end,k["position:placeholder"]&&(l= +k["position:placeholder"],n=l.Wa(xb),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n);Zk(a);$k(a,e,q,h,0,m);Ri(a.Z);al(a);var r=+new Date,s=r+m;f.lo===b&&requestAnimationFrame(function(){d()})}}function Zk(a){if(!a.So){var b=a.Z;a.VD=b.wb;a.TB=b.Ne;a.UB=b.Ju;b.wb=!0;b.Ne=!0;b.Ju=!0;a.So=!0}}function al(a){var b=a.Z;b.wb=a.VD;b.Ne=a.TB;b.Ju=a.UB;a.So=!1} +function $k(a,b,c,d,e,f){for(c=c.i;c.next();){var h=c.key,k=c.value,l=k.start,k=k.end,m;for(m in k)if(("position"!==m||!k["position:placeholder"]&&!k["position:node"])&&void 0!==cl[m])cl[m](h,l[m],k[m],d,e,f)}d=b.yA;b.yA=!0;m=a.lC;0!==a.mr&&0!==a.lr&&(c=a.mr,b.tb=m(e,c,a.lr-c,f));null!==a.kr&&null!==a.jr&&(c=a.kr,a=a.jr,b.ib=new z(m(e,c.x,a.x-c.x,f),m(e,c.y,a.y-c.y,f)));b.yA=d}Ug.prototype.stopAnimation=Ug.prototype.pi=function(){!0===this.pc&&(this.pc=!1,this.mo&&this.Z.Le());this.Vj&&this.cf&&bl(this)}; +function bl(a){a.Vj=!1;a.mo=!1;Zk(a);for(var b=a.Z,c=a.gC,d=a.fC,e=a.nv.i;e.next();){var f=e.key,h=e.value,k=h.start,l=h.end,m=h.It,n;for(n in l)if(void 0!==cl[n]){var p=n;!h.Xw||"position:node"!==p&&"position:placeholder"!==p||(p="position");cl[p](f,k[n],void 0!==m[n]?m[n]:h.Xw?k[n]:l[n],c,d,d)}h.Xw&&void 0!==m.location&&f instanceof S&&(f.location=m.location);h.Wx&&f instanceof S&&f.vd(!1)}for(c=a.Z.links;c.next();)d=c.value,null!==d.lp&&(d.points=d.lp,d.lp=null);b.Jx.clear();b.jk=null;b.rc();b.na(); +b.Zf();dl(b);al(a);a.mv&&a.mv();a.lo=0;a.nv=null;a.mv=null;a.lv=null;a.kr=null;a.jr=null;a.mr=0;a.lr=0;a.Pm=new ka(G,Dk);b.Aa("AnimationFinished");b.Le()} +function el(a,b,c){var d=b.W,e=c.W,f=null;c instanceof U&&(f=c.placeholder);null!==f?(d=f.Wa(xb),d.x+=f.padding.left,d.y+=f.padding.top,Sk(a,b,"position",d,b.position,!1)):Sk(a,b,"position",new z(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);Sk(a,b,"scale",.01,b.scale,!1);if(b instanceof U)for(b=b.Nc;b.next();)f=b.value,f instanceof T&&el(a,f,c)} +function fl(a,b,c){if(b.isVisible()){var d=null;c instanceof U&&(d=c.placeholder);null!==d?Sk(a,b,"position:placeholder",b.position,d,!0):Sk(a,b,"position:node",b.position,c,!0);Sk(a,b,"scale",b.scale,.01,!0);a.pc&&(d=a.Pm,d.contains(b)&&(d.ja(b).Wx=!0));if(b instanceof U)for(b=b.Nc;b.next();)d=b.value,d instanceof T&&fl(a,d,c)}}function gl(a,b,c){a.pc&&(null===a.kr&&b.H()&&null===a.jr&&(a.kr=b.copy()),a.jr=c.copy(),a.mo=!0)} +function hl(a,b,c){a.pc&&a.Z.Gn&&(0===a.mr&&0===a.lr&&(a.mr=b),a.lr=c,a.mo=!0)}w.defineProperty(Ug,{isEnabled:"isEnabled"},function(){return this.cf},function(a){w.j(a,"boolean",Ug,"isEnabled");this.cf=a});w.defineProperty(Ug,{duration:"duration"},function(){return this.Uy},function(a){w.j(a,"number",Ug,"duration");1>a&&w.Ea(a,">= 1",Ug,"duration");this.Uy=a});w.u(Ug,{lf:"isAnimating"},function(){return this.Vj});w.u(Ug,{zI:"isTicking"},function(){return this.So}); +w.defineProperty(Ug,{nF:"isInitial"},function(){return this.Wj},function(a){w.j(a,"boolean",Ug,"isInitial");this.Wj=a});function Dk(a,b,c){this.start=a;this.end=b;this.It=new sa;this.Xw=c;this.Wx=!1} var cl={opacity:function(a,b,c,d,e,f){a.opacity=d(e,b,c-b,f)},position:function(a,b,c,d,e,f){e!==f?a.jy(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)):a.position=new z(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f))},"position:node":function(a,b,c,d,e,f){var h=a.W,k=c.W;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==f?a.jy(d(e,b.x,c-b.x,f),d(e,b.y,h-b.y,f)):a.position=new z(d(e,b.x,c-b.x,f),d(e,b.y,h-b.y,f))},"position:placeholder":function(a,b,c,d,e,f){e!==f?a.jy(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)): -a.position=new z(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f))},scale:function(a,b,c,d,e,f){a.scale=d(e,b,c-b,f)},visible:function(a,b,c,d,e,f){a.visible=e!==f?b:c}};function og(){0=a)return b;for(var c=0,d=0,e=0,f=0,h=0,k=this.zb.i;k.next();){var l=k.value;l instanceof U?e++:l instanceof T?d++:l instanceof W?f++:l instanceof hh?h++:c++}k="";0=d.count)a=d.count;else if(d.da(a)===b)return-1;d.Md(a,b);b.Wt(c);d=this.g;null!==d&&(c?d.na():d.Zp(b));nl(this,a,b);return a}; -g.kf=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.kf(a,b,c);var d=this.zb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.da(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Xt(c);d.Yc(a);d=this.g;null!==d&&(c?d.na():d.kf(b));b.Sv=null;return a}; -function nl(a,b,c){b=ol(a,b,c);if(c instanceof U&&null!==c&&isNaN(c.ho)){if(0!==c.Nc.count){for(var d=-1,e=a.zb.n,f=e.length,h=0;hd&&k.Ka===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,h=NaN;0<=f;){h=a.da(f).ho;if(!isNaN(h))break;f--}for(var k=b+1,l=NaN;kd)for(;;){if(-1===f||h<=d){f++;if(f===b)break;a.Yc(b);a.Md(f,c);return f}for(h=NaN;0<=--f&&(h=a.da(f).ho,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.Yc(b);a.Md(k,c);return k}for(l=NaN;++k=d.count)a=d.count;else if(d.ea(a)===b)return-1;d.Md(a,b);b.Wt(c);d=this.g;null!==d&&(c?d.na():d.Yp(b));nl(this,a,b);return a}; +g.kf=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.kf(a,b,c);var d=this.zb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.ea(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Xt(c);d.Yc(a);d=this.g;null!==d&&(c?d.na():d.kf(b));b.Sv=null;return a}; +function nl(a,b,c){b=ol(a,b,c);if(c instanceof U&&null!==c&&isNaN(c.fo)){if(0!==c.Nc.count){for(var d=-1,e=a.zb.n,f=e.length,h=0;hd&&k.Pa===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,h=NaN;0<=f;){h=a.ea(f).fo;if(!isNaN(h))break;f--}for(var k=b+1,l=NaN;kd)for(;;){if(-1===f||h<=d){f++;if(f===b)break;a.Yc(b);a.Md(f,c);return f}for(h=NaN;0<=--f&&(h=a.ea(f).fo,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.Yc(b);a.Md(k,c);return k}for(l=NaN;++ka||1parseInt(e[1],10)&&(w.trace("Warning: You have entered a license key for GoJS version 1.7 or later, but this library is version "+ -w.vfo+". This license key will do nothing until you upgrade to GoJS 1.7 or later."),w.bx.licenseKey=!0);this.ll=1;this.Gm=0;this.XC=new z;this.TD=500;this.cv=new z;this.Zs=null;this.il=!1;this.preventDefault=this.Vx=this.IF=this.JF=this.HF=this.Qn=this.Og=this.Rn=this.On=this.Pn=this.BB=this.sB=this.tB=this.uB=this.vl=this.Ms=this.ul=this.Ls=null;this.fl=new Bl;void 0!==a&&Cl(this,a);this.Mv=!1;this.gD=1;this.Sc=!1}w.fa("Diagram",D); -D.prototype.clear=D.prototype.clear=function(){var a=null;null!==this.pd&&(a=this.pd.U);this.ba.clear();for(var b=this.ac.length,c=0;cparseInt(e[1],10)&&(w.trace("Warning: You have entered a license key for GoJS version 1.7 or later, but this library is version "+ +w.vfo+". This license key will do nothing until you upgrade to GoJS 1.7 or later."),w.bx.licenseKey=!0);this.kl=1;this.Gm=0;this.XC=new z;this.TD=500;this.cv=new z;this.Zs=null;this.hl=!1;this.preventDefault=this.Vx=this.IF=this.JF=this.HF=this.Pn=this.Og=this.Qn=this.Nn=this.On=this.BB=this.sB=this.tB=this.uB=this.ul=this.Ms=this.tl=this.Ls=null;this.el=new Bl;void 0!==a&&Cl(this,a);this.Mv=!1;this.gD=1;this.Sc=!1}w.fa("Diagram",D); +D.prototype.clear=D.prototype.clear=function(){var a=null;null!==this.pd&&(a=this.pd.U);this.ba.clear();for(var b=this.ac.length,c=0;c=a)return b;for(var c=this.ac.i;c.next();)b+="\n "+c.value.toString(a-1);return b};D.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.Z instanceof D?b.Z:null}; w.defineProperty(D,{mj:"div"},function(){return this.Mb},function(a){null!==a&&w.G(a,HTMLDivElement,D,"div");if(this.Mb!==a){ql=[];var b=this.Mb;null!==b?(b.Z=void 0,b.innerHTML="",null!==this.Fb&&(this.Fb.removeEventListener("touchstart",this.uB,!1),this.Fb.removeEventListener("touchmove",this.tB,!1),this.Fb.removeEventListener("touchend",this.sB,!1),this.Fb.Hd.Z=null),b=this.ab,null!==b&&(b.af.each(function(a){a.cancelWaitAfter()}),b.$f.each(function(a){a.cancelWaitAfter()}),b.ag.each(function(a){a.cancelWaitAfter()})), -b.cancelWaitAfter(),this.Za.doCancel(),this.rf=this.Fb=null,window.removeEventListener("resize",this.BB,!1),window.removeEventListener("mousemove",this.Pn,!0),window.removeEventListener("mousedown",this.On,!0),window.removeEventListener("mouseup",this.Rn,!0),window.removeEventListener("mousewheel",this.Og,!0),window.removeEventListener("DOMMouseScroll",this.Og,!0),window.removeEventListener("mouseout",this.Qn,!0)):this.eh=!1;this.Mb=null;if(null!==a){if(b=a.Z)b.mj=null;Cl(this,a);this.Ux()}}}); -function Fl(a){var b=a.Fb;b.addEventListener("touchstart",a.uB,!1);b.addEventListener("touchmove",a.tB,!1);b.addEventListener("touchend",a.sB,!1);b.addEventListener("mousemove",a.Pn,!1);b.addEventListener("mousedown",a.On,!1);b.addEventListener("mouseup",a.Rn,!1);b.addEventListener("mousewheel",a.Og,!1);b.addEventListener("DOMMouseScroll",a.Og,!1);b.addEventListener("mouseout",a.Qn,!1);b.addEventListener("keydown",a.AI,!1);b.addEventListener("keyup",a.BI,!1);b.addEventListener("selectstart",function(a){a.preventDefault(); -return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.ab.Wp===yk&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.HF,!1);b.addEventListener("pointermove",a.JF,!1);b.addEventListener("pointerleave",a.IF,!1);window.addEventListener("resize",a.BB,!1)}D.prototype.computePixelRatio=function(){return null!==this.kk?this.kk:this.gD};D.prototype.doMouseMove=function(){this.Za.doMouseMove()}; +b.cancelWaitAfter(),this.Za.doCancel(),this.rf=this.Fb=null,window.removeEventListener("resize",this.BB,!1),window.removeEventListener("mousemove",this.On,!0),window.removeEventListener("mousedown",this.Nn,!0),window.removeEventListener("mouseup",this.Qn,!0),window.removeEventListener("mousewheel",this.Og,!0),window.removeEventListener("DOMMouseScroll",this.Og,!0),window.removeEventListener("mouseout",this.Pn,!0)):this.eh=!1;this.Mb=null;if(null!==a){if(b=a.Z)b.mj=null;Cl(this,a);this.Ux()}}}); +function Fl(a){var b=a.Fb;b.addEventListener("touchstart",a.uB,!1);b.addEventListener("touchmove",a.tB,!1);b.addEventListener("touchend",a.sB,!1);b.addEventListener("mousemove",a.On,!1);b.addEventListener("mousedown",a.Nn,!1);b.addEventListener("mouseup",a.Qn,!1);b.addEventListener("mousewheel",a.Og,!1);b.addEventListener("DOMMouseScroll",a.Og,!1);b.addEventListener("mouseout",a.Pn,!1);b.addEventListener("keydown",a.BI,!1);b.addEventListener("keyup",a.CI,!1);b.addEventListener("selectstart",function(a){a.preventDefault(); +return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.ab.Vp===yk&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.HF,!1);b.addEventListener("pointermove",a.JF,!1);b.addEventListener("pointerleave",a.IF,!1);window.addEventListener("resize",a.BB,!1)}D.prototype.computePixelRatio=function(){return null!==this.jk?this.jk:this.gD};D.prototype.doMouseMove=function(){this.Za.doMouseMove()}; D.prototype.doMouseDown=function(){this.Za.doMouseDown()};D.prototype.doMouseUp=function(){this.Za.doMouseUp()};D.prototype.doMouseWheel=function(){this.Za.doMouseWheel()};D.prototype.doKeyDown=function(){this.Za.doKeyDown()};D.prototype.doKeyUp=function(){this.Za.doKeyUp()};D.prototype.doFocus=function(){this.focus()};D.prototype.focus=D.prototype.focus=function(){this.Fb&&this.Fb.focus()}; -function Fk(a){if(null!==a.Fb){var b=a.Mb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.el?a.Dd:0,d=a.Uj?a.Dd:0,e=a.Ad;a.Ad=a.computePixelRatio();a.Ad!==e&&(a.Gr=!0,a.Le());if(b.clientWidth!==a.Ib+c||b.clientHeight!==a.Lb+d)a.Am=!0,a.Be=!0,b=a.Sb,null!==b&&b.Cx&&a.Gl===mh&&b.J(),a.Xd||a.Le()}}} +function Fk(a){if(null!==a.Fb){var b=a.Mb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.dl?a.Dd:0,d=a.Tj?a.Dd:0,e=a.Ad;a.Ad=a.computePixelRatio();a.Ad!==e&&(a.Gr=!0,a.Le());if(b.clientWidth!==a.Ib+c||b.clientHeight!==a.Lb+d)a.Am=!0,a.Be=!0,b=a.Sb,null!==b&&b.Cx&&a.Fl===mh&&b.J(),a.Xd||a.Le()}}} function zl(a){var b=new og;b.name="Background";a.tt(b);b=new og;b.name="";a.tt(b);b=new og;b.name="Foreground";a.tt(b);b=new og;b.name="Adornment";b.Kc=!0;a.tt(b);b=new og;b.name="Tool";b.Kc=!0;b.gF=!0;a.tt(b);b=new og;b.name="Grid";b.uf=!1;b.Tg=!1;b.Kc=!0;a.bH(b,a.Kt("Background"))} function Gl(a){a.pd=new C(Hl);a.pd.name="GRID";var b=new X;b.Cb="LineH";b.stroke="lightgray";b.kb=.5;b.interval=1;a.pd.add(b);b=new X;b.Cb="LineH";b.stroke="gray";b.kb=.5;b.interval=5;a.pd.add(b);b=new X;b.Cb="LineH";b.stroke="gray";b.kb=1;b.interval=10;a.pd.add(b);b=new X;b.Cb="LineV";b.stroke="lightgray";b.kb=.5;b.interval=1;a.pd.add(b);b=new X;b.Cb="LineV";b.stroke="gray";b.kb=.5;b.interval=5;a.pd.add(b);b=new X;b.Cb="LineV";b.stroke="gray";b.kb=1;b.interval=10;a.pd.add(b);b=new S;b.add(a.pd); -b.Xf="Grid";b.ho=0;b.AA=!1;b.fF=!1;b.Tg=!1;b.EA="GRID";a.add(b);a.zb.remove(b);a.pd.visible=!1}function Il(){this.Z.isEnabled?this.Z.KH(this):Jl(this.Z)}function Kl(a){this.Z.isEnabled?(this.Z.yz=!0,this.Z.Az=a.target.scrollTop,this.Z.zz=a.target.scrollLeft):Jl(this.Z)} +b.Xf="Grid";b.fo=0;b.AA=!1;b.fF=!1;b.Tg=!1;b.EA="GRID";a.add(b);a.zb.remove(b);a.pd.visible=!1}function Il(){this.Z.isEnabled?this.Z.KH(this):Jl(this.Z)}function Kl(a){this.Z.isEnabled?(this.Z.yz=!0,this.Z.Az=a.target.scrollTop,this.Z.zz=a.target.scrollLeft):Jl(this.Z)} D.prototype.diagramScroll=D.prototype.KH=function(a){if(this.yz&&null!==this.Fb){this.qw=!0;var b=this.qe,c=this.pb,d=b.width,e=c.width,f=b.height,h=c.height,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,r=this.scale,s;s=a.scrollLeft;if(this.Kr)switch(this.wz){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var u=s;el&&(this.position=s.m(-(this.uw.scrollWidth-this.Ib)+u-this.Ib/r+k,this.position.y))),a.RG&&this.ne&&(bn&&(this.position=s.m(this.position.x,-(this.uw.scrollHeight-this.Lb)+a.scrollTop-this.Lb/r+m))),w.v(s),Ll(this),this.Am=this.qw=!1,b=this.qe,c=this.pb,k=b.right,l=c.right, m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,e>=d&&p>=q&&k<=l&&(this.Qs.style.width="1px"),h>=f&&b>=c&&m<=n&&(this.Qs.style.height="1px"))}};D.prototype.computeBounds=D.prototype.sh=function(){0c&&(e=c),ea.xh&&(e=a.xh),e):b===Sl?(e=l>k?(h-a.Dd)/d:(f-a.Dd)/e,e>c&&(e=c),ea.xh&&(e=a.xh),e):a.scale}D.prototype.zoomToFit=D.prototype.zoomToFit=function(){this.scale=Ol(this,Rl)}; -D.prototype.zoomToRect=function(a,b){void 0===b&&(b=Rl);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Rl||b===Sl)if(isNaN(c))e=this.pb.height*this.scale/d;else if(isNaN(d))e=this.pb.width*this.scale/c;else var e=this.Ib,f=this.Lb,e=b===Sl?f/d>e/c?(f-(this.Uj?this.Dd:0))/d:(e-(this.el?this.Dd:0))/c:Math.min(f/d,e/c);this.scale=e;this.position=new z(a.x,a.y)}};w.defineProperty(D,{yA:null},function(){return this.Sc},function(a){this.Sc=a}); -D.prototype.alignDocument=function(a,b){this.Vj&&Ql(this,this.sh());var c=this.qe,d=this.pb;this.position=new z(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))}; +function Nl(a,b){if((b||a.eh)&&!a.Sc&&null!==a.Fb&&!a.Oa.lf&&a.qe.H()){a.Sc=!0;var c=a.qm;b&&a.fl!==mh&&(c=a.fl);var d=c!==mh?Ol(a,c):a.scale,c=a.pb.copy(),e=a.Ib/d,f=a.Lb/d,h=null,k=a.Oa;k.pc&&(h=a.ib.copy());a.position.Ra();var l=a.so;b&&!l.fd()&&a.Mo.fd()&&(l=a.Mo);Pl(a,a.ib,a.qe,e,f,l,b);a.position.freeze();null!==h&&gl(k,h,a.ib);e=a.scale;a.scale=d;a.Sc=!1;d=a.pb;d.Ic(c)||a.uu(c,d,e,a.scale,!1)}} +function Ol(a,b){var c=a.ob.$w;if(null===a.Fb)return c;a.Uj&&Ql(a,a.sh());var d=a.qe;if(!d.H())return c;var e=d.width,d=d.height,f=a.Ib,h=a.Lb,k=f/e,l=h/d;return b===Rl?(e=Math.min(l,k),e>c&&(e=c),ea.xh&&(e=a.xh),e):b===Sl?(e=l>k?(h-a.Dd)/d:(f-a.Dd)/e,e>c&&(e=c),ea.xh&&(e=a.xh),e):a.scale}D.prototype.zoomToFit=D.prototype.zoomToFit=function(){this.scale=Ol(this,Rl)}; +D.prototype.zoomToRect=function(a,b){void 0===b&&(b=Rl);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Rl||b===Sl)if(isNaN(c))e=this.pb.height*this.scale/d;else if(isNaN(d))e=this.pb.width*this.scale/c;else var e=this.Ib,f=this.Lb,e=b===Sl?f/d>e/c?(f-(this.Tj?this.Dd:0))/d:(e-(this.dl?this.Dd:0))/c:Math.min(f/d,e/c);this.scale=e;this.position=new z(a.x,a.y)}};w.defineProperty(D,{yA:null},function(){return this.Sc},function(a){this.Sc=a}); +D.prototype.alignDocument=function(a,b){this.Uj&&Ql(this,this.sh());var c=this.qe,d=this.pb;this.position=new z(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))}; function Pl(a,b,c,d,e,f,h){var k=b.x,l=b.y;if(h||a.$A===rl)f.fd()&&(d>c.width&&(k=c.x+(f.x*c.width+f.offsetX)-(f.x*d-f.offsetX)),e>c.height&&(l=c.y+(f.y*c.height+f.offsetY)-(f.y*e-f.offsetY))),f=a.$F,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lb.touches.length)&&b.preventDefault();b.cancelBubble=!0;return!1} -D.prototype.AI=function(a){if(!this.Z.isEnabled)return!1;var b=this.Z.Pb;Tl(this.Z,this.Z,a,b,!1);b.key=String.fromCharCode(a.which);b.Ol=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 48:b.key="0";break;case 187:case 61:case 107:b.key= +D.prototype.BI=function(a){if(!this.Z.isEnabled)return!1;var b=this.Z.Pb;Tl(this.Z,this.Z,a,b,!1);b.key=String.fromCharCode(a.which);b.Nl=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 48:b.key="0";break;case 187:case 61:case 107:b.key= "Add";break;case 189:case 173:case 109:b.key="Subtract";break;case 27:b.key="Esc"}this.Z.doKeyDown();return 187!==a.which&&189!==a.which&&48!==a.which&&107!==a.which&&109!==a.which&&61!==a.which&&173!==a.which||!0!==a.ctrlKey?Xl(b,a):(a.cancelBubble=!0,a.preventDefault(),a.stopPropagation(),!1)}; -D.prototype.BI=function(a){if(!this.Z.isEnabled)return!1;var b=this.Z.Pb;Tl(this.Z,this.Z,a,b,!1);b.key=String.fromCharCode(a.which);b.up=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 93:a.preventDefault()}this.Z.doKeyUp(); -return Xl(b,a)};D.prototype.yr=function(a){var b=this.Fb;if(null===b)return new z(0,0);var c=this.Ib,d=this.Lb,b=b.getBoundingClientRect(),c=a.clientX-c/b.width*b.left;a=a.clientY-d/b.height*b.top;return null!==this.dd?(a=new z(c,a),La(a,this.dd),a):new z(c,a)};function Ul(a,b,c){var d=a.Fb,e=a.Ib,f=a.Lb,h=0,k=0;null!==d&&(d=d.getBoundingClientRect(),h=b.clientX-e/d.width*d.left,k=b.clientY-f/d.height*d.top);c.bf.m(h,k);null!==a.dd?(b=w.xb(h,k),a.dd.li(b),c.ca.assign(b),w.v(b)):c.ca.m(h,k)} -function zf(a,b,c,d){var e=null;if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.Zi[0])e=a.Zi[c];else return;c=a.Fb;b=a.Ib;a=a.Lb;var f=0,h=0;null!==c&&null!==e&&(c=c.getBoundingClientRect(),f=e.clientX-b/c.width*c.left,h=e.clientY-a/c.height*c.top);d.m(f,h)}D.prototype.invalidateDocumentBounds=D.prototype.rc=function(){this.Vj||(this.Vj=!0,this.Le(!0))};function dl(a){a.Xd||Hi(a);a.Vj&&Ql(a,a.sh())} -D.prototype.redraw=D.prototype.Ux=function(){this.Sc||this.Xd||(this.na(),Yl(this),Ll(this),this.rc(),this.Zf())};D.prototype.isUpdateRequested=function(){return this.Nf};D.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Pa,c=b.isEnabled;b.pi();b.isEnabled=!1;Ri(this);this.eh=!1;b.isEnabled=c;null!==a&&w.setTimeout(a,1)}; -D.prototype.requestUpdate=D.prototype.Le=function(a){void 0===a&&(a=!1);if(!0!==this.Nf&&!(this.Sc||!1===a&&this.Xd)){this.Nf=!0;var b=this;requestAnimationFrame(function(){b.Nf&&b.Zf()})}};D.prototype.maybeUpdate=D.prototype.Zf=function(){if(!this.Io||this.Nf)this.Io&&(this.Io=!1),Ri(this)};function Zl(a,b){a.Pa.lf||a.Sc||!a.Am||Jl(a)||(b&&Hi(a),Nl(a,!1))} -function Ri(a){if(!a.Xd&&(a.Nf=!1,null!==a.Mb)){a.Xd=!0;var b=a.Pa,c=a.uz;if(!b.To&&0!==c.length){for(var d=c.n,e=d.length,f=0;fb;b++){var c=a.sg.i;if(null===c||0===a.sg.count)break;a.sg=new J(S);a.yB(c,a.sg)}a.eg.each(function(a){a instanceof U&&0!==(a.ya&65536)!==!1&&(a.ya^=65536)})}} -D.prototype.yB=function(a,b){for(a.reset();a.next();){var c=a.value;!c.de()||c instanceof U||(c.Yl()?(wk(c,Infinity,Infinity),c.hc()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof U&&c.isVisible()&&em(this,c);for(a.reset();a.next();)c=a.value,c instanceof W&&c.isVisible()&&(c.Yl()?(wk(c,Infinity,Infinity),c.hc()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof hh&&c.isVisible()&&(c.Yl()?(wk(c,Infinity,Infinity),c.hc()):b.add(c))}; -function em(a,b){for(var c=w.lb(),d=w.lb(),e=b.Nc;e.next();){var f=e.value;f.isVisible()&&(f instanceof U?(hm(f)||Bm(f)||Cm(f))&&em(a,f):f instanceof W?f.Y===b||f.$===b?d.push(f):c.push(f):(wk(f,Infinity,Infinity),f.hc()))}for(var e=c.length,h=0;hb.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.Zi[0])e=a.Zi[c];else return;c=a.Fb;b=a.Ib;a=a.Lb;var f=0,h=0;null!==c&&null!==e&&(c=c.getBoundingClientRect(),f=e.clientX-b/c.width*c.left,h=e.clientY-a/c.height*c.top);d.m(f,h)}D.prototype.invalidateDocumentBounds=D.prototype.rc=function(){this.Uj||(this.Uj=!0,this.Le(!0))};function dl(a){a.Xd||Hi(a);a.Uj&&Ql(a,a.sh())} +D.prototype.redraw=D.prototype.Ux=function(){this.Sc||this.Xd||(this.na(),Yl(this),Ll(this),this.rc(),this.Zf())};D.prototype.isUpdateRequested=function(){return this.Nf};D.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Oa,c=b.isEnabled;b.pi();b.isEnabled=!1;Ri(this);this.eh=!1;b.isEnabled=c;null!==a&&w.setTimeout(a,1)}; +D.prototype.requestUpdate=D.prototype.Le=function(a){void 0===a&&(a=!1);if(!0!==this.Nf&&!(this.Sc||!1===a&&this.Xd)){this.Nf=!0;var b=this;requestAnimationFrame(function(){b.Nf&&b.Zf()})}};D.prototype.maybeUpdate=D.prototype.Zf=function(){if(!this.Ho||this.Nf)this.Ho&&(this.Ho=!1),Ri(this)};function Zl(a,b){a.Oa.lf||a.Sc||!a.Am||Jl(a)||(b&&Hi(a),Nl(a,!1))} +function Ri(a){if(!a.Xd&&(a.Nf=!1,null!==a.Mb)){a.Xd=!0;var b=a.Oa,c=a.uz;if(!b.So&&0!==c.length){for(var d=c.n,e=d.length,f=0;fb;b++){var c=a.sg.i;if(null===c||0===a.sg.count)break;a.sg=new J(S);a.yB(c,a.sg)}a.eg.each(function(a){a instanceof U&&0!==(a.ya&65536)!==!1&&(a.ya^=65536)})}} +D.prototype.yB=function(a,b){for(a.reset();a.next();){var c=a.value;!c.de()||c instanceof U||(c.Zl()?(wk(c,Infinity,Infinity),c.hc()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof U&&c.isVisible()&&gm(this,c);for(a.reset();a.next();)c=a.value,c instanceof W&&c.isVisible()&&(c.Zl()?(wk(c,Infinity,Infinity),c.hc()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof hh&&c.isVisible()&&(c.Zl()?(wk(c,Infinity,Infinity),c.hc()):b.add(c))}; +function gm(a,b){for(var c=w.lb(),d=w.lb(),e=b.Nc;e.next();){var f=e.value;f.isVisible()&&(f instanceof U?(Am(f)||Bm(f)||Cm(f))&&gm(a,f):f instanceof W?f.Y===b||f.$===b?d.push(f):c.push(f):(wk(f,Infinity,Infinity),f.hc()))}for(var e=c.length,h=0;hx+1&& -(H=Math.max((t-x)*c+a.Ib,H)),q+k+1p+1&&(k=Math.max((y-p)*c+a.Lb,k)),r+l+1x+1&&(H=Math.max((t-x)*c+a.Ib,H)),q+1p+1&&(k=Math.max((y-p)*c+V,k)),r+1x+1&&(l=a.position.x*c));if(a.Kr)switch(a.wz){case "negative":l=-(b.scrollWidth-l-b.clientWidth);break;case "reverse":l=b.scrollWidth-l-b.clientWidth}b.scrollLeft=l;a.tA&&a.ne&&(r+1p+1&&(b.scrollTop=a.position.y*c));h&&(a.Gr=!0);m=a.Ib;n=a.Lb;b.style.width=m+(a.el?a.Dd:0)+ -"px";b.style.height=n+(a.Uj?a.Dd:0)+"px";a.yz=!1;return d!==m||e!==n||a.Pa.pc?(p=a.pb,a.uu(f,p,c,a.scale,h),!1):!0} -D.prototype.add=D.prototype.add=function(a){w.G(a,S,D,"add:part");var b=a.g;if(b!==this){null!==b&&w.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.Eq&&(a.ml="Tool");var c=a.Xf,b=this.Kt(c);null===b&&(b=this.Kt(""));null===b&&w.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.Zp(99999999,a,a.g===this),0<=c&&this.Xc(Of,"parts",b,null,a,null,c),b.Kc||this.rc(),a.J(Jm),c=a.Fx,null!== +t.x),Math.abs(r.y-t.y)));La(r,v);La(t,v);m.push(new A(Math.min(r.x,t.x),Math.min(r.y,t.y),Math.abs(r.x-t.x),Math.abs(r.y-t.y)));this.el.km(this)&&(h=0x+1&& +(H=Math.max((t-x)*c+a.Ib,H)),q+k+1p+1&&(k=Math.max((y-p)*c+a.Lb,k)),r+l+1x+1&&(H=Math.max((t-x)*c+a.Ib,H)),q+1p+1&&(k=Math.max((y-p)*c+V,k)),r+1x+1&&(l=a.position.x*c));if(a.Kr)switch(a.wz){case "negative":l=-(b.scrollWidth-l-b.clientWidth);break;case "reverse":l=b.scrollWidth-l-b.clientWidth}b.scrollLeft=l;a.tA&&a.ne&&(r+1p+1&&(b.scrollTop=a.position.y*c));h&&(a.Gr=!0);m=a.Ib;n=a.Lb;b.style.width=m+(a.dl?a.Dd:0)+ +"px";b.style.height=n+(a.Tj?a.Dd:0)+"px";a.yz=!1;return d!==m||e!==n||a.Oa.pc?(p=a.pb,a.uu(f,p,c,a.scale,h),!1):!0} +D.prototype.add=D.prototype.add=function(a){w.G(a,S,D,"add:part");var b=a.g;if(b!==this){null!==b&&w.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.Eq&&(a.ll="Tool");var c=a.Xf,b=this.Kt(c);null===b&&(b=this.Kt(""));null===b&&w.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.Yp(99999999,a,a.g===this),0<=c&&this.Xc(Of,"parts",b,null,a,null,c),b.Kc||this.rc(),a.J(Jm),c=a.Fx,null!== c&&c(a,null,b))}}; -D.prototype.Zp=function(a){if(a instanceof T){if(this.gp.add(a),a instanceof U){var b=a.Ka;null===b?this.yl.add(a):b.dp.add(a);b=a.Sb;null!==b&&(b.g=this)}}else a instanceof W?this.$o.add(a):a instanceof hh||this.zb.add(a);var c=this;Km(a,function(a){Lm(c,a)});(a instanceof hh||a instanceof U&&null!==a.Kb)&&a.I();b=a.data;null!==b&&(a instanceof hh||(a instanceof W?this.Lj.add(b,a):this.Ai.add(b,a)),Km(a,function(a){Mm(c,a)}));!0!==Bm(a)&&!0!==Cm(a)||this.sg.add(a);Nm(a,!0,this);Om(a)?(a.W.H()&&this.na(ml(a, +D.prototype.Yp=function(a){if(a instanceof T){if(this.fp.add(a),a instanceof U){var b=a.Pa;null===b?this.xl.add(a):b.cp.add(a);b=a.Sb;null!==b&&(b.g=this)}}else a instanceof W?this.Zo.add(a):a instanceof hh||this.zb.add(a);var c=this;Km(a,function(a){Lm(c,a)});(a instanceof hh||a instanceof U&&null!==a.Kb)&&a.I();b=a.data;null!==b&&(a instanceof hh||(a instanceof W?this.Kj.add(b,a):this.Ai.add(b,a)),Km(a,function(a){Mm(c,a)}));!0!==Bm(a)&&!0!==Cm(a)||this.sg.add(a);Nm(a,!0,this);Om(a)?(a.W.H()&&this.na(ml(a, a.W)),this.rc()):a.isVisible()&&a.W.H()&&this.na(ml(a,a.W));this.Le()}; -D.prototype.kf=function(a){a.Bt();if(a instanceof T){if(this.gp.remove(a),a instanceof U){var b=a.Ka;null===b?this.yl.remove(a):b.dp.remove(a);b=a.Sb;null!==b&&(b.g=null)}}else a instanceof W?this.$o.remove(a):a instanceof hh||this.zb.remove(a);var c=this;Km(a,function(a){Pm(c,a)});b=a.data;null!==b&&(a instanceof hh||(a instanceof W?this.Lj.remove(b):this.Ai.remove(b)),Km(a,function(a){Qm(c,a)}));this.sg.remove(a);Om(a)?(a.W.H()&&this.na(ml(a,a.W)),this.rc()):a.isVisible()&&a.W.H()&&this.na(ml(a, +D.prototype.kf=function(a){a.Bt();if(a instanceof T){if(this.fp.remove(a),a instanceof U){var b=a.Pa;null===b?this.xl.remove(a):b.cp.remove(a);b=a.Sb;null!==b&&(b.g=null)}}else a instanceof W?this.Zo.remove(a):a instanceof hh||this.zb.remove(a);var c=this;Km(a,function(a){Pm(c,a)});b=a.data;null!==b&&(a instanceof hh||(a instanceof W?this.Kj.remove(b):this.Ai.remove(b)),Km(a,function(a){Qm(c,a)}));this.sg.remove(a);Om(a)?(a.W.H()&&this.na(ml(a,a.W)),this.rc()):a.isVisible()&&a.W.H()&&this.na(ml(a, a.W));this.Le()};D.prototype.remove=D.prototype.remove=function(a){w.G(a,S,D,"remove:part");Rm(this,a,!0)};function Rm(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.fb=!1,b.Mg=!1,b.J(Sm),c&&b.vn(),c=d.kf(-1,b,!1),0<=c&&a.Xc(Pf,"parts",d,b,null,c,null),a=b.Fx,null!==a&&a(b,d,null))} -D.prototype.removeParts=D.prototype.XA=function(a,b){if(w.isArray(a))for(var c=w.Ya(a),d=0;dd&&this.rc()}; -D.prototype.addLayerAfter=function(a,b){Tm(this,a,b);a.Qc(this);var c=this.ac,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ke&&this.Xc(Pf,"layers",this,a,null,d,null));for(var e=c.count,f=0;fd&&this.rc()}; +D.prototype.removeParts=D.prototype.XA=function(a,b){if(w.isArray(a))for(var c=w.Ya(a),d=0;dd&&this.rc()}; +D.prototype.addLayerAfter=function(a,b){Tm(this,a,b);a.Qc(this);var c=this.ac,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ke&&this.Xc(Pf,"layers",this,a,null,d,null));for(var e=c.count,f=0;fd&&this.rc()}; D.prototype.removeLayer=function(a){w.G(a,og,D,"removeLayer:layer");a.g!==this&&w.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.ac,c=b.indexOf(a);if(b.remove(a)){for(b=a.zb.copy().i;b.next();){var d=b.value,e=d.Xf;d.Xf=e!==a.name?e:""}null!==this.ke&&this.Xc(Pf,"layers",this,a,null,c,null);this.na();this.rc()}}};D.prototype.findLayer=D.prototype.Kt=function(a){for(var b=this.Gx;b.next();){var c=b.value;if(c.name===a)return c}return null}; D.prototype.addModelChangedListener=D.prototype.dH=function(a){w.j(a,"function",D,"addModelChangedListener:listener");null===this.gh&&(this.gh=new I("function"));this.gh.add(a);this.ba.fn(a)};D.prototype.removeModelChangedListener=function(a){w.j(a,"function",D,"removeModelChangedListener:listener");null!==this.gh&&(this.gh.remove(a),0===this.gh.count&&(this.gh=null));this.ba.xu(a)}; D.prototype.addChangedListener=D.prototype.fn=function(a){w.j(a,"function",D,"addChangedListener:listener");null===this.vi&&(this.vi=new I("function"));this.vi.add(a)};D.prototype.removeChangedListener=D.prototype.xu=function(a){w.j(a,"function",D,"removeChangedListener:listener");null!==this.vi&&(this.vi.remove(a),0===this.vi.count&&(this.vi=null))}; -D.prototype.Tw=function(a){this.wb||this.oa.$E(a);a.yc!==Nf&&(this.ni=!0);if(null!==this.vi){var b=this.vi,c=b.length;if(1===c)b=b.da(0),b(a);else if(0!==c)for(var d=b.ec(),e=0;ea.xh&&(c=a.xh);e=w.xb(a.ib.x+h/b-h/c,a.ib.y+k/b-k/c);a.position=e;w.v(e);a.tb=c;a.uu(d,a.pb,b,c,!1);a.Sc=!1;Nl(a, -!1);c=a.Pa;c.pc&&hl(c,b,a.tb);a.na();Yl(a)}} -D.prototype.uu=function(a,b,c,d,e){a.L(b)||(void 0===e&&(e=!1),e||Yl(this),Ll(this),d=this.Sb,null===d||!d.Cx||this.Gl!==mh||e||a.width===b.width&&a.height===b.height||d.J(),d=this.Za,!0===this.Cm&&d instanceof fh&&(this.R.ca=this.vB(this.R.bf),Ak(d,this)),this.Sc||this.eF(a,b),am(this),this.nh.scale=c,this.nh.position.x=a.x,this.nh.position.y=a.y,this.nh.bounds.set(a),this.nh.isScroll=e,this.Aa("ViewportBoundsChanged",this.nh,a),this.BA&&this.links.each(function(a){a.sj&&a.W.Tf(b)&&a.Yb()}))}; +D.prototype.Tw=function(a){this.wb||this.oa.$E(a);a.yc!==Nf&&(this.ni=!0);if(null!==this.vi){var b=this.vi,c=b.length;if(1===c)b=b.ea(0),b(a);else if(0!==c)for(var d=b.ec(),e=0;ea.xh&&(c=a.xh);e=w.xb(a.ib.x+h/b-h/c,a.ib.y+k/b-k/c);a.position=e;w.v(e);a.tb=c;a.uu(d,a.pb,b,c,!1);a.Sc=!1;Nl(a, +!1);c=a.Oa;c.pc&&hl(c,b,a.tb);a.na();Yl(a)}} +D.prototype.uu=function(a,b,c,d,e){a.L(b)||(void 0===e&&(e=!1),e||Yl(this),Ll(this),d=this.Sb,null===d||!d.Cx||this.Fl!==mh||e||a.width===b.width&&a.height===b.height||d.J(),d=this.Za,!0===this.Cm&&d instanceof fh&&(this.R.da=this.vB(this.R.bf),Ak(d,this)),this.Sc||this.eF(a,b),am(this),this.nh.scale=c,this.nh.position.x=a.x,this.nh.position.y=a.y,this.nh.bounds.set(a),this.nh.isScroll=e,this.Aa("ViewportBoundsChanged",this.nh,a),this.BA&&this.links.each(function(a){a.Wl&&a.W.Tf(b)&&a.Yb()}))}; function am(a,b){void 0===b&&(b=null);var c=a.pd;if(null!==c&&c.visible){for(var d=w.im(),e=1,f=1,h=c.xa.n,k=h.length,l=0;ln||(Vm(m.Cb)?f=f*n/ye(f,n):e=e*n/ye(e,n))}h=c.sx;d.m(f*h.width,e*h.height);h=f=l=k=0;if(null!==b)k=b.width,l=b.height,f=b.x,h=b.y;else{e=w.Ef();f=a.pb;e.m(f.x,f.y,f.width,f.height);for(h=a.jw.i;h.next();)f=h.value.pb,f.H()&&ab(e,f.x,f.y,f.width,f.height);if(!e.H()){w.Db(e);return}k=e.width;l=e.height;f=e.x;h=e.y;w.Db(e)}c.width=k+2*d.width;c.height= -l+2*d.height;e=w.K();Ka(f,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);w.Ak(d);c.U.location=e;w.v(e)}}D.prototype.clearSelection=D.prototype.Uw=function(){var a=0a&&w.Ea(a,">= 0",D,"scrollHorizontalLineChange"),this.rw=a,this.h("scrollHorizontalLineChange",b,a))}); w.defineProperty(D,{Du:"scrollVerticalLineChange"},function(){return this.vw},function(a){var b=this.vw;b!==a&&(w.j(a,"number",D,"scrollVerticalLineChange"),0>a&&w.Ea(a,">= 0",D,"scrollVerticalLineChange"),this.vw=a,this.h("scrollVerticalLineChange",b,a))});w.defineProperty(D,{R:"lastInput"},function(){return this.Pb},function(a){this.Pb=a});w.defineProperty(D,{zc:"firstInput"},function(){return this.Hi},function(a){this.Hi=a}); w.defineProperty(D,{cc:"currentCursor"},function(){return this.kv},function(a){""===a&&(a=this.ir);var b=this.kv;if(b!==a){w.j(a,"string",D,"currentCursor");var c=this.Fb,d=this.Mb;null!==c&&(this.kv=a,c.style.cursor=a,d.style.cursor=a,c.style.cursor===b&&(c.style.cursor="-webkit-"+a,d.style.cursor="-webkit-"+a,c.style.cursor===b&&(c.style.cursor="-moz-"+a,d.style.cursor="-moz-"+a,c.style.cursor===b&&(c.style.cursor=a,d.style.cursor=a))))}}); -w.defineProperty(D,{FK:"defaultCursor"},function(){return this.ir},function(a){""===a&&(a="auto");var b=this.ir;b!==a&&(w.j(a,"string",D,"defaultCursor"),this.ir=a,this.h("defaultCursor",b,a))});w.defineProperty(D,{click:"click"},function(){return this.wi},function(a){var b=this.wi;b!==a&&(null!==a&&w.j(a,"function",D,"click"),this.wi=a,this.h("click",b,a))}); +w.defineProperty(D,{GK:"defaultCursor"},function(){return this.ir},function(a){""===a&&(a="auto");var b=this.ir;b!==a&&(w.j(a,"string",D,"defaultCursor"),this.ir=a,this.h("defaultCursor",b,a))});w.defineProperty(D,{click:"click"},function(){return this.wi},function(a){var b=this.wi;b!==a&&(null!==a&&w.j(a,"function",D,"click"),this.wi=a,this.h("click",b,a))}); w.defineProperty(D,{Gt:"doubleClick"},function(){return this.Ei},function(a){var b=this.Ei;b!==a&&(null!==a&&w.j(a,"function",D,"doubleClick"),this.Ei=a,this.h("doubleClick",b,a))});w.defineProperty(D,{Xz:"contextClick"},function(){return this.yi},function(a){var b=this.yi;b!==a&&(null!==a&&w.j(a,"function",D,"contextClick"),this.yi=a,this.h("contextClick",b,a))}); w.defineProperty(D,{NA:"mouseOver"},function(){return this.Vi},function(a){var b=this.Vi;b!==a&&(null!==a&&w.j(a,"function",D,"mouseOver"),this.Vi=a,this.h("mouseOver",b,a))});w.defineProperty(D,{MA:"mouseHover"},function(){return this.Ui},function(a){var b=this.Ui;b!==a&&(null!==a&&w.j(a,"function",D,"mouseHover"),this.Ui=a,this.h("mouseHover",b,a))}); -w.defineProperty(D,{LA:"mouseHold"},function(){return this.Ti},function(a){var b=this.Ti;b!==a&&(null!==a&&w.j(a,"function",D,"mouseHold"),this.Ti=a,this.h("mouseHold",b,a))});w.defineProperty(D,{YI:"mouseDragOver"},function(){return this.cw},function(a){var b=this.cw;b!==a&&(null!==a&&w.j(a,"function",D,"mouseDragOver"),this.cw=a,this.h("mouseDragOver",b,a))}); +w.defineProperty(D,{LA:"mouseHold"},function(){return this.Ti},function(a){var b=this.Ti;b!==a&&(null!==a&&w.j(a,"function",D,"mouseHold"),this.Ti=a,this.h("mouseHold",b,a))});w.defineProperty(D,{ZI:"mouseDragOver"},function(){return this.cw},function(a){var b=this.cw;b!==a&&(null!==a&&w.j(a,"function",D,"mouseDragOver"),this.cw=a,this.h("mouseDragOver",b,a))}); w.defineProperty(D,{KA:"mouseDrop"},function(){return this.Si},function(a){var b=this.Si;b!==a&&(null!==a&&w.j(a,"function",D,"mouseDrop"),this.Si=a,this.h("mouseDrop",b,a))});w.defineProperty(D,{rB:"toolTip"},function(){return this.dj},function(a){var b=this.dj;b!==a&&(this.dj=a,this.h("toolTip",b,a))});w.defineProperty(D,{contextMenu:"contextMenu"},function(){return this.zi},function(a){var b=this.zi;b!==a&&(this.zi=a,this.h("contextMenu",b,a))}); w.defineProperty(D,{ob:"commandHandler"},function(){return this.Hy},function(a){var b=this.Hy;b!==a&&(w.G(a,qg,D,"commandHandler"),null!==a.g&&w.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Qc(null),this.Hy=a,a.Qc(this))});w.defineProperty(D,{ab:"toolManager"},function(){return this.Hz},function(a){var b=this.Hz;b!==a&&(w.G(a,fh,D,"toolManager"),null!==a.g&&w.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Qc(null),this.Hz=a,a.Qc(this))}); w.defineProperty(D,{Et:"defaultTool"},function(){return this.Ny},function(a){var b=this.Ny;b!==a&&(w.G(a,pg,D,"defaultTool"),this.Ny=a,this.Za===b&&(this.Za=a))});w.defineProperty(D,{Za:"currentTool"},function(){return this.Ky},function(a){var b=this.Ky;null!==b&&(b.sa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.Et);null!==a&&(w.G(a,pg,D,"currentTool"),this.Ky=a,a.Qc(this),a.doStart())});w.u(D,{selection:"selection"},function(){return this.xw}); -w.defineProperty(D,{OI:"maxSelectionCount"},function(){return this.Zv},function(a){var b=this.Zv;if(b!==a)if(w.j(a,"number",D,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Zv=a,this.h("maxSelectionCount",b,a),!this.oa.gb&&(a=this.selection.count-a,0= 0",D,"maxSelectionCount")}); -w.defineProperty(D,{aJ:"nodeSelectionAdornmentTemplate"},function(){return this.dw},function(a){var b=this.dw;b!==a&&(w.G(a,hh,D,"nodeSelectionAdornmentTemplate"),this.dw=a,this.h("nodeSelectionAdornmentTemplate",b,a))});w.defineProperty(D,{eI:"groupSelectionAdornmentTemplate"},function(){return this.Bv},function(a){var b=this.Bv;b!==a&&(w.G(a,hh,D,"groupSelectionAdornmentTemplate"),this.Bv=a,this.h("groupSelectionAdornmentTemplate",b,a))}); -w.defineProperty(D,{II:"linkSelectionAdornmentTemplate"},function(){return this.Uv},function(a){var b=this.Uv;b!==a&&(w.G(a,hh,D,"linkSelectionAdornmentTemplate"),this.Uv=a,this.h("linkSelectionAdornmentTemplate",b,a))});w.u(D,{Vl:"highlighteds"},function(){return this.Fv}); +w.defineProperty(D,{QI:"maxSelectionCount"},function(){return this.Zv},function(a){var b=this.Zv;if(b!==a)if(w.j(a,"number",D,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Zv=a,this.h("maxSelectionCount",b,a),!this.oa.gb&&(a=this.selection.count-a,0= 0",D,"maxSelectionCount")}); +w.defineProperty(D,{bJ:"nodeSelectionAdornmentTemplate"},function(){return this.dw},function(a){var b=this.dw;b!==a&&(w.G(a,hh,D,"nodeSelectionAdornmentTemplate"),this.dw=a,this.h("nodeSelectionAdornmentTemplate",b,a))});w.defineProperty(D,{eI:"groupSelectionAdornmentTemplate"},function(){return this.Bv},function(a){var b=this.Bv;b!==a&&(w.G(a,hh,D,"groupSelectionAdornmentTemplate"),this.Bv=a,this.h("groupSelectionAdornmentTemplate",b,a))}); +w.defineProperty(D,{JI:"linkSelectionAdornmentTemplate"},function(){return this.Uv},function(a){var b=this.Uv;b!==a&&(w.G(a,hh,D,"linkSelectionAdornmentTemplate"),this.Uv=a,this.h("linkSelectionAdornmentTemplate",b,a))});w.u(D,{Vl:"highlighteds"},function(){return this.Fv}); w.defineProperty(D,{ni:"isModified"},function(){var a=this.oa;return a.isEnabled?null!==a.lj?!0:this.Mv&&this.dh!==a.qj:this.Mv},function(a){if(this.Mv!==a){w.j(a,"boolean",D,"isModified");this.Mv=a;var b=this.oa;!a&&b.isEnabled&&(this.dh=b.qj);a||Ym(this)}});function Ym(a){var b=a.ni;a.YD!==b&&(a.YD=b,a.Aa("Modified"))} -w.defineProperty(D,{ba:"model"},function(){return this.ke},function(a){var b=this.ke;if(b!==a){w.G(a,F,D,"model");this.Za.doCancel();null!==b&&b.oa!==a.oa&&b.oa.mF&&w.k("Do not replace a Diagram.model while a transaction is in progress.");this.Pa.pi();this.Uw();this.eh=!1;this.Io=!0;this.dh=-2;this.Nf=!1;var c=this.Xd;this.Xd=!0;this.Pa.Un("Model");null!==b&&(null!==this.gh&&this.gh.each(function(a){b.xu(a)}),b.xu(this.dD),b instanceof P&&Zm(this,b.Ng),Zm(this,b.dg));this.ke=a;a.fn(this.cD);$m(this, +w.defineProperty(D,{ba:"model"},function(){return this.ke},function(a){var b=this.ke;if(b!==a){w.G(a,F,D,"model");this.Za.doCancel();null!==b&&b.oa!==a.oa&&b.oa.mF&&w.k("Do not replace a Diagram.model while a transaction is in progress.");this.Oa.pi();this.Uw();this.eh=!1;this.Ho=!0;this.dh=-2;this.Nf=!1;var c=this.Xd;this.Xd=!0;this.Oa.Tn("Model");null!==b&&(null!==this.gh&&this.gh.each(function(a){b.xu(a)}),b.xu(this.dD),b instanceof P&&Zm(this,b.Ng),Zm(this,b.dg));this.ke=a;a.fn(this.cD);$m(this, a.dg);a instanceof P&&an(this,a.Ng);a.xu(this.cD);a.fn(this.dD);null!==this.gh&&this.gh.each(function(b){a.fn(b)});this.Xd=c;this.Sc||this.na();null!==b&&(a.oa.isEnabled=b.oa.isEnabled)}});w.defineProperty(D,{Ua:null},function(){return this.VC},function(a){this.VC=a});w.u(D,{Jx:null},function(){return this.JG}); -function vl(a,b){if(b.ba===a.ba){var c=b.yc,d=b.propertyName;if(c===Nf&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.ab,c.af.each(function(b){b.Qc(a)}),c.$f.each(function(b){b.Qc(a)}),c.ag.each(function(b){b.Qc(a)}),a.Xd||a.eh||(a.rv=!0,a.Io&&(a.Nf=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Pa;e.lf&&!a.wb&&e.pi();a.Aa("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Pa,e.lf&&!a.wb&&e.pi());else if(a.Ua){a.Ua=!1;try{var f=b.of;if(""!==f)if(c===Mf){if("linkFromKey"===f){var h= -b.object,k=a.Rf(h);if(null!==k){var l=b.newValue,m=a.Ie(l);k.Y=m}}else if("linkToKey"===f)h=b.object,k=a.Rf(h),null!==k&&(l=b.newValue,m=a.Ie(l),k.$=m);else if("linkFromPortId"===f){if(h=b.object,k=a.Rf(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.Lg=n)}}else if("linkToPortId"===f)h=b.object,k=a.Rf(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.Eh=n));else if("nodeGroupKey"===f){var h=b.object,p=a.vh(h);if(null!==p){var q=b.newValue;if(void 0!==q){var r=a.Ie(q);p.Ka=r instanceof U?r: -null}else p.Ka=null}}else if("linkLabelKeys"===f){if(h=b.object,k=a.Rf(h),null!==k){var s=b.oldValue,u=b.newValue;if(w.isArray(s))for(var t=w.Ya(s),x=0;xl)){var m=l;hn(k)&&m++;k.kf(m);jn(k,m,l)}}}}function Mm(a,b){var c=b.$j;if(w.isArray(c)){var d=a.Em.ja(c);if(null===d)d=[],d.push(b),a.Em.add(c,d);else{for(c=0;cl)){var m=l;hn(k)&&m++;k.kf(m);jn(k,m,l)}}}}function Mm(a,b){var c=b.Zj;if(w.isArray(c)){var d=a.Em.ja(c);if(null===d)d=[],d.push(b),a.Em.add(c,d);else{for(c=0;cthis.scale&&(this.scale=a)):w.Ea(a,"> 0",D,"minScale"))});w.defineProperty(D,{xh:"maxScale"},function(){return this.Yv},function(a){w.Fd(a,D,"maxScale");var b=this.Yv;b!==a&&(0 0",D,"maxScale"))}); -w.defineProperty(D,{lm:"zoomPoint"},function(){return this.Kw},function(a){this.Kw.L(a)||(w.G(a,z,D,"zoomPoint"),this.Kw=a=a.S())});w.defineProperty(D,{tE:"contentAlignment"},function(){return this.to},function(a){var b=this.to;b.L(a)||(w.G(a,L,D,"contentAlignment"),this.to=a=a.S(),this.h("contentAlignment",b,a),Nl(this,!1))}); -w.defineProperty(D,{WK:"initialContentAlignment"},function(){return this.No},function(a){var b=this.No;b.L(a)||(w.G(a,L,D,"initialContentAlignment"),this.No=a=a.S(),this.h("initialContentAlignment",b,a))});w.defineProperty(D,{padding:"padding"},function(){return this.ff},function(a){"number"===typeof a?a=new db(a):w.G(a,db,D,"padding");var b=this.ff;b.L(a)||(this.ff=a=a.S(),this.rc(),this.h("padding",b,a))});w.u(D,{eg:"nodes"},function(){return this.gp.i});w.u(D,{links:"links"},function(){return this.$o.i}); -w.u(D,{Jk:"parts"},function(){return this.zb.i});D.prototype.findTopLevelNodesAndLinks=function(){for(var a=new J(S),b=this.gp.i;b.next();){var c=b.value;c.bq&&a.add(c)}for(b=this.$o.i;b.next();)c=b.value,c.bq&&a.add(c);return a.i};D.prototype.findTopLevelGroups=function(){return this.yl.i}; -w.defineProperty(D,{Sb:"layout"},function(){return this.ie},function(a){var b=this.ie;b!==a&&(w.G(a,rg,D,"layout"),null!==b&&(b.g=null,b.group=null),this.ie=a,a.g=this,a.group=null,this.bv=!0,this.h("layout",b,a),this.Le())});D.prototype.layoutDiagram=function(a){Hi(this);a&&on(this,!0);bm(this,!1)};function on(a,b){for(var c=a.yl.i;c.next();)wn(a,c.value,b);null!==a.Sb&&(b?a.Sb.zf=!1:a.Sb.J())} -function wn(a,b,c){if(null!==b){for(var d=b.dp.i;d.next();)wn(a,d.value,c);null!==b.Sb&&(c?b.Sb.zf=!1:b.Sb.J())}}function bm(a,b){if(!a.Oy){var c=a.Sb,d=a.Ua;a.Ua=!0;try{var e=a.oa.Fh;0===e&&a.Ub("Layout");var f=a.Pa;1!==a.oa.Fh||f.lf||f.pc||b||f.Un("Layout");for(var h=a.yl.i;h.next();)xn(a,h.value,b);c.zf||b&&!c.qF&&0!==e||(c.doLayout(a),Hi(a),c.zf=!0)}finally{0===e&&a.Gd("Layout"),a.bv=!c.zf,a.Ua=d}}} -function xn(a,b,c){if(null!==b){for(var d=b.dp.i;d.next();)xn(a,d.value,c);d=b.Sb;null===d||d.zf||c&&!d.qF||(b.Sn=!b.location.H(),d.doLayout(b),b.J(yn),d.zf=!0,em(a,b))}}w.defineProperty(D,{Pd:"isTreePathToChildren"},function(){return this.Pv},function(a){var b=this.Pv;if(b!==a&&(w.j(a,"boolean",D,"isTreePathToChildren"),this.Pv=a,this.h("isTreePathToChildren",b,a),!this.oa.gb))for(a=this.eg;a.next();)zn(a.value)}); -D.prototype.findTreeRoots=function(){for(var a=new I(T),b=this.eg;b.next();){var c=b.value;c.bq&&null===c.xn()&&a.add(c)}return a.i};w.defineProperty(D,{wB:"treeCollapsePolicy"},function(){return this.Fw},function(a){var b=this.Fw;b!==a&&(a!==tl&&a!==Wm&&a!==Xm&&w.k("Unknown Diagram.treeCollapsePolicy: "+a),this.Fw=a,this.h("treeCollapsePolicy",b,a))});w.defineProperty(D,{wh:null},function(){return this.KC},function(a){this.KC=a}); +w.defineProperty(D,{lm:"zoomPoint"},function(){return this.Kw},function(a){this.Kw.L(a)||(w.G(a,z,D,"zoomPoint"),this.Kw=a=a.S())});w.defineProperty(D,{tE:"contentAlignment"},function(){return this.so},function(a){var b=this.so;b.L(a)||(w.G(a,L,D,"contentAlignment"),this.so=a=a.S(),this.h("contentAlignment",b,a),Nl(this,!1))}); +w.defineProperty(D,{XK:"initialContentAlignment"},function(){return this.Mo},function(a){var b=this.Mo;b.L(a)||(w.G(a,L,D,"initialContentAlignment"),this.Mo=a=a.S(),this.h("initialContentAlignment",b,a))});w.defineProperty(D,{padding:"padding"},function(){return this.ff},function(a){"number"===typeof a?a=new db(a):w.G(a,db,D,"padding");var b=this.ff;b.L(a)||(this.ff=a=a.S(),this.rc(),this.h("padding",b,a))});w.u(D,{eg:"nodes"},function(){return this.fp.i});w.u(D,{links:"links"},function(){return this.Zo.i}); +w.u(D,{Ik:"parts"},function(){return this.zb.i});D.prototype.findTopLevelNodesAndLinks=function(){for(var a=new J(S),b=this.fp.i;b.next();){var c=b.value;c.aq&&a.add(c)}for(b=this.Zo.i;b.next();)c=b.value,c.aq&&a.add(c);return a.i};D.prototype.findTopLevelGroups=function(){return this.xl.i}; +w.defineProperty(D,{Sb:"layout"},function(){return this.ie},function(a){var b=this.ie;b!==a&&(w.G(a,rg,D,"layout"),null!==b&&(b.g=null,b.group=null),this.ie=a,a.g=this,a.group=null,this.bv=!0,this.h("layout",b,a),this.Le())});D.prototype.layoutDiagram=function(a){Hi(this);a&&on(this,!0);bm(this,!1)};function on(a,b){for(var c=a.xl.i;c.next();)wn(a,c.value,b);null!==a.Sb&&(b?a.Sb.zf=!1:a.Sb.J())} +function wn(a,b,c){if(null!==b){for(var d=b.cp.i;d.next();)wn(a,d.value,c);null!==b.Sb&&(c?b.Sb.zf=!1:b.Sb.J())}}function bm(a,b){if(!a.Oy){var c=a.Sb,d=a.Ua;a.Ua=!0;try{var e=a.oa.Fh;0===e&&a.Ub("Layout");var f=a.Oa;1!==a.oa.Fh||f.lf||f.pc||b||f.Tn("Layout");for(var h=a.xl.i;h.next();)xn(a,h.value,b);c.zf||b&&!c.qF&&0!==e||(c.doLayout(a),Hi(a),c.zf=!0)}finally{0===e&&a.Gd("Layout"),a.bv=!c.zf,a.Ua=d}}} +function xn(a,b,c){if(null!==b){for(var d=b.cp.i;d.next();)xn(a,d.value,c);d=b.Sb;null===d||d.zf||c&&!d.qF||(b.Rn=!b.location.H(),d.doLayout(b),b.J(yn),d.zf=!0,gm(a,b))}}w.defineProperty(D,{Pd:"isTreePathToChildren"},function(){return this.Pv},function(a){var b=this.Pv;if(b!==a&&(w.j(a,"boolean",D,"isTreePathToChildren"),this.Pv=a,this.h("isTreePathToChildren",b,a),!this.oa.gb))for(a=this.eg;a.next();)zn(a.value)}); +D.prototype.findTreeRoots=function(){for(var a=new I(T),b=this.eg;b.next();){var c=b.value;c.aq&&null===c.xn()&&a.add(c)}return a.i};w.defineProperty(D,{wB:"treeCollapsePolicy"},function(){return this.Fw},function(a){var b=this.Fw;b!==a&&(a!==tl&&a!==Wm&&a!==Xm&&w.k("Unknown Diagram.treeCollapsePolicy: "+a),this.Fw=a,this.h("treeCollapsePolicy",b,a))});w.defineProperty(D,{wh:null},function(){return this.KC},function(a){this.KC=a}); function sl(a){function b(a){var b=a.toLowerCase(),h=new I("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new ka("string",I),d=new ka("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified"); b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");a.Qy=c;a.Py=d} function oa(a,b){var c=a.Py.ja(b);return null!==c?c:a.Py.ja(b.toLowerCase())}function An(a,b){var c=a.Qy.ja(b);if(null!==c)return c;c=a.Qy.ja(b.toLowerCase());if(null!==c)return c;w.k("Unknown DiagramEvent name: "+b);return null}D.prototype.addDiagramListener=D.prototype.Oz=function(a,b){w.j(a,"string",D,"addDiagramListener:name");w.j(b,"function",D,"addDiagramListener:listener");var c=An(this,a);null!==c&&c.add(b)}; -D.prototype.removeDiagramListener=D.prototype.PF=function(a,b){w.j(a,"string",D,"removeDiagramListener:name");w.j(b,"function",D,"addDiagramListener:listener");var c=An(this,a);null!==c&&c.remove(b)};D.prototype.raiseDiagramEvent=D.prototype.Aa=function(a,b,c){var d=An(this,a),e=new Af;e.g=this;a=oa(this,a);null!==a&&(e.name=a);void 0!==b&&(e.nB=b);void 0!==c&&(e.SA=c);b=d.length;if(1===b)d=d.da(0),d(e);else if(0!==b)for(c=d.ec(),a=0;a=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.pb,f=a.scale,e=w.hg(0,0,e.width*f,e.height*f),h=w.xb(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(k=Math.max(a.Cu,1),k|=0,h.x+=k,b.x>e.x+e.width-d.right/2&&(h.x+=k),b.x>e.x+e.width-d.right/4&&(h.x+=4*k));b.y>=e.y&&b.ye.y+e.height-d.bottom&&(k=Math.max(a.Du,1),k|=0,h.y+=k,b.y>e.y+e.height-d.bottom/2&&(h.y+=k),b.y>e.y+e.height-d.bottom/4&&(h.y+=4*k));h.Ic(dd)||(c=new z(c.x+h.x/f,c.y+h.y/f));w.Db(e);w.v(h);return c}D.prototype.makeSvg=D.prototype.makeSVG=function(a){void 0===a&&(a=new sa);a.context="svg";a=In(this,a);return null!==a?a.gm:null}; -D.prototype.makeImage=function(a){void 0===a&&(a=new sa);var b=(a.document||document).createElement("img");b.src=this.JI(a);return b}; -D.prototype.makeImageData=D.prototype.JI=function(a){void 0===a&&(a=new sa);var b=In(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.xk.getImageData(0,0,b.width,b.height);case "blob":b=b.Hd;c=a.callback;if("function"!==typeof c){w.k('Error: Diagram.makeImageData called with "returnType: toBlob", but no "callback" function property defined.');break}if("function"===typeof b.toBlob)return b.toBlob(c,a.type,a.details),"toBlob";if("function"=== +D.prototype.makeImage=function(a){void 0===a&&(a=new sa);var b=(a.document||document).createElement("img");b.src=this.KI(a);return b}; +D.prototype.makeImageData=D.prototype.KI=function(a){void 0===a&&(a=new sa);var b=In(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.wk.getImageData(0,0,b.width,b.height);case "blob":b=b.Hd;c=a.callback;if("function"!==typeof c){w.k('Error: Diagram.makeImageData called with "returnType: toBlob", but no "callback" function property defined.');break}if("function"===typeof b.toBlob)return b.toBlob(c,a.type,a.details),"toBlob";if("function"=== typeof b.msToBlob)return c(b.msToBlob()),"msToBlob";c(null);break;default:return b.toDataURL(a.type,a.details)}}return""};var Jn=!1; -function In(a,b){a.Pa.pi();a.Zf();if(null===a.Fb)return null;"object"!==typeof b&&w.k("properties argument must be an Object.");var c=!1,d=b.size||null,e=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(e="NaN");var f=b.maxSize;void 0===b.maxSize&&(c=!0,f="svg"===b.context?new ha(Infinity,Infinity):new ha(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,q=b.elementFinished||null,r= -b.showTemporary;void 0===r&&(r=!n);n=b.showGrid;void 0===n&&(n=r);null!==d&&isNaN(d.width)&&isNaN(d.height)&&(d=null);"number"===typeof l?l=new db(l):l instanceof db||(l=new db(0));l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.Eo=!1;a.rf.Ee(!0);var s=new Vc(null,p),u=s.xk;if(!(d||e||k||h)){s.width=a.Ib+Math.ceil(l.left+l.right);s.height=a.Lb+Math.ceil(l.top+l.bottom);if("svg"===b.context)return u=new Nc(s.Hd,p,q),Gm(a,u,l,new ha(s.width, -s.height),a.tb,a.ib,k,m,r,n),a.Eo=!0,u;Gm(a,u,l,new ha(s.width,s.height),a.tb,a.ib,k,m,r,n);a.Eo=!0;return s}var t=a.ob.$w,x=new z(0,0),v=a.qe.copy();v.HJ(a.padding);if(r)for(var B=!0,B=a.ac.n,y=B.length,H=0;Ht?(e=t,h=v.width,$=v.height):(h=f.width,$=f.height)):(h=v.width*e,$=v.height*e):(e=t,h=v.width,$=v.height);null!==l?(h+=Q,$+=B):l=new db(0);null!==f&&(d=f.width,f=f.height,"svg"!==b.context&&c&&!Jn&&(h>d||$>f)&&(w.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil($)+" vs 2000x2000) Consider increasing the max size."), -Jn=!0),isNaN(d)&&(d=2E3),isNaN(f)&&(f=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(f)&&($=Math.min($,f)));s.width=Math.ceil(h);s.height=Math.ceil($);if("svg"===b.context)return u=new Nc(s.Hd,p,q),Gm(a,u,l,new ha(Math.ceil(h),Math.ceil($)),e,x,k,m,r,n),a.Eo=!0,u;Gm(a,u,l,new ha(Math.ceil(h),Math.ceil($)),e,x,k,m,r,n);a.Eo=!0;return s}D.inherit=function(a,b){w.j(a,"function",D,"inherit");w.j(b,"function",D,"inherit");b.SG&&w.k("Cannot inherit from "+w.jf(b));w.La(a,b)}; +Jn=!0),isNaN(d)&&(d=2E3),isNaN(f)&&(f=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(f)&&($=Math.min($,f)));s.width=Math.ceil(h);s.height=Math.ceil($);if("svg"===b.context)return u=new Nc(s.Hd,p,q),Gm(a,u,l,new ha(Math.ceil(h),Math.ceil($)),e,x,k,m,r,n),a.Do=!0,u;Gm(a,u,l,new ha(Math.ceil(h),Math.ceil($)),e,x,k,m,r,n);a.Do=!0;return s}D.inherit=function(a,b){w.j(a,"function",D,"inherit");w.j(b,"function",D,"inherit");b.SG&&w.k("Cannot inherit from "+w.jf(b));w.Ka(a,b)}; function Bl(){this.FD=null;this.UG="63ad05bbe23a1786468a4c741b6d2";this.Fi=this.UG===this._tk?!0:null} function Kn(a){var b="f",c=window[w.Ig("76a715b2f73f148a")][w.Ig("72ba13b5")],d=w.Ig;if(window[d("7da7")]&&window[d("7da7")][d("76a115b6ed251eaf4692")]){a.Fi=!0;var e=window[d("7da7")][d("76a115b6ed251eaf4692")],e=d(e).split(d("39e9"));if(6>e.length)return;var f=d(e[1]).split(".");if("7da71ca0"!==e[4])return;var h=d(w[d("6cae19")]).split(".");if(f[0]>h[0]||f[0]===h[0]&&f[1]>=h[1]){f=c[d("76ad18b4f73e")];for(h=c[d("73a612b6fb191d")](d("35e7"))+2;h f&&d(e[2])!==d("7da71ca0ad381e90")&&(f=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));0>f&&(f=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));a.Fi=!(0<=f&&ff&&d(w.adym)!==d("7da71ca0ad381e90")&&(f=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));a.Fi=!(0<=f&&fb.timeStamp-a.Gm)b.preventDefault();else if(a.il)b.preventDefault();else{a.Uc=a.Pb;a.Pb=c;Tl(a,a,b,c,!0);c.Ol=!0;c.Fe=b.detail;if(w.jF||w.kF)b.timeStamp-a.Gmb.timeStamp-a.Gm){b.preventDefault();return}a.Gm=b.timeStamp}if(w.Fn&&null!==a.Zs)a.Zs=null,b.preventDefault();else{a.Uc=a.Pb;a.Pb=c;Tl(a, -a,b,c,!0);c.up=!0;c.Fe=b.detail;if(w.jF||w.kF)c.Fe=a.ll;c.bubbles=b.bubbles;b.target.Z&&(c.Vg=b.target.Z);a.simulatedMouseUp(b,null,new z,c.Vg)||(a.doMouseUp(),Uh(a),Xl(c,b))}}};a.Og=function(b){if(a.isEnabled){var c=a.Uc;a.Uc=a.Pb;a.Pb=c;Tl(a,a,b,c,!0);c.bubbles=!0;c.Nl=void 0!==b.wheelDelta?b.wheelDelta:-40*b.detail;a.doMouseWheel();Xl(c,b)}};a.Qn=function(){if(a.isEnabled){a.Cm=!1;var b=a.Za;b.cancelWaitAfter();b instanceof fh&&b.hideToolTip()}};a.uB=function(b){if(a.isEnabled){a.gt=!1;a.il=!0; +"relative");a.Mb.style["-webkit-tap-highlight-color"]="rgba(255, 255, 255, 0)";a.Mb.style["-ms-touch-action"]="none";a.Mb.innerHTML="";a.Mb.Z=a;var c=new Vc(a);c.Hd.innerHTML="This text is displayed if your browser does not support the Canvas HTML element.";void 0!==c.style&&(c.style.position="absolute",c.style.top="0px",c.style.left="0px","rtl"===window.getComputedStyle(a.Mb,null).getPropertyValue("direction")&&(a.Kr=!0),c.style.zIndex="2",c.style.TL="none",c.style.webkitUserSelect="none",c.style.MozUserSelect= +"none");a.Ib=a.Mb.clientWidth||1;a.Lb=a.Mb.clientHeight||1;a.Fb=c;a.rf=c.wk;var d=a.rf;a.gD=(window.devicePixelRatio||1)/(d.ta.webkitBackingStorePixelRatio||d.ta.mozBackingStorePixelRatio||d.ta.msBackingStorePixelRatio||d.ta.oBackingStorePixelRatio||d.ta.backingStorePixelRatio||1);a.Ad=a.computePixelRatio();Im(a,a.Ib,a.Lb);a.uv=d[w.Ig("7eba17a4ca3b1a8346")][w.Ig("78a118b7")](d,w.km,4,4);a.Mb.insertBefore(c.Hd,a.Mb.firstChild);c=new Vc(null);c.width=1;c.height=1;a.Ty=c;a.AC=c.wk;var c=w.createElement("div"), +e=w.createElement("div");c.style.position="absolute";c.style.overflow="auto";c.style.width=a.Ib+"px";c.style.height=a.Lb+"px";c.style.zIndex="1";e.style.position="absolute";e.style.width="1px";e.style.height="1px";a.Mb.appendChild(c);c.appendChild(e);c.onscroll=Il;c.onmousedown=Kl;c.ontouchstart=Kl;c.Z=a;c.QG=!0;c.RG=!0;a.uw=c;a.Qs=e;a.Vx=w.wE(function(){a.jk=null;a.na()},300,!1);a.BB=w.wE(function(){Fk(a)},250,!1);a.preventDefault=function(a){a.preventDefault();return!1};a.On=function(b){if(a.isEnabled){a.Cm= +!0;var c=a.Uc;w.En&&c.uj?(b.preventDefault(),b.simulated=!0,a.Zs=b):(a.Uc=a.Pb,a.Pb=c,Tl(a,a,b,c,!0),a.simulatedMouseMove(b,null,b.target.Z)||(a.doMouseMove(),a.Za.isBeyondDragSize()&&(a.kl=0),Xl(c,b)))}};a.Nn=function(b){if(a.isEnabled){a.Cm=!0;var c=a.Uc;if(w.En&&null!==a.Zs)a.Zs=b,b.preventDefault();else if(w.En&&400>b.timeStamp-a.Gm)b.preventDefault();else if(a.hl)b.preventDefault();else{a.Uc=a.Pb;a.Pb=c;Tl(a,a,b,c,!0);c.Nl=!0;c.Fe=b.detail;if(w.jF||w.kF)b.timeStamp-a.Gmb.timeStamp-a.Gm){b.preventDefault();return}a.Gm=b.timeStamp}if(w.En&&null!==a.Zs)a.Zs=null,b.preventDefault();else{a.Uc=a.Pb;a.Pb=c;Tl(a, +a,b,c,!0);c.up=!0;c.Fe=b.detail;if(w.jF||w.kF)c.Fe=a.kl;c.bubbles=b.bubbles;b.target.Z&&(c.Vg=b.target.Z);a.simulatedMouseUp(b,null,new z,c.Vg)||(a.doMouseUp(),Uh(a),Xl(c,b))}}};a.Og=function(b){if(a.isEnabled){var c=a.Uc;a.Uc=a.Pb;a.Pb=c;Tl(a,a,b,c,!0);c.bubbles=!0;c.Ml=void 0!==b.wheelDelta?b.wheelDelta:-40*b.detail;a.doMouseWheel();Xl(c,b)}};a.Pn=function(){if(a.isEnabled){a.Cm=!1;var b=a.Za;b.cancelWaitAfter();b instanceof fh&&b.hideToolTip()}};a.uB=function(b){if(a.isEnabled){a.gt=!1;a.hl=!0; var c=a.Uc;a.Uc=a.Pb;a.Pb=c;Vl(a,b,b.targetTouches[0],c,1a.mw)){var c=a.Zi;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.Uc,a.Uc=a.Pb,a.Pb=c,Wl(a,b,b,c,!0),a.simulatedMouseMove(b,null,c.Vg)||(a.doMouseMove(),Xl(c,b)))}};a.IF=function(b){if("touch"===b.pointerType){var c=a.sD;void 0!==c[b.pointerId]&&(a.mw--,delete c[b.pointerId],c=a.Zi,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null))}};d.Ee(!0);Fl(a)} -function Ln(a){1a)&&w.Ea(a,"0 <= loc <= 1",ga,"addColorStop:loc");w.j(b,"string",ga,"addColorStop:color");null===this.ah&&(this.ah=new ka("number","string"));this.ah.add(a,b);this.ma===mg&&(this.type=ng);this.bh=null}; -w.defineProperty(ga,{type:"type"},function(){return this.ma},function(a){this.Q&&w.la(this,a);w.mb(a,ga,ga,"type");this.ma=a;this.start.Od()&&(a===ng?this.start=yb:a===bd&&(this.start=Gb));this.end.Od()&&(a===ng?this.end=Kb:a===bd&&(this.end=Gb));this.bh=null});w.defineProperty(ga,{color:"color"},function(){return this.ro},function(a){this.Q&&w.la(this,a);this.ro=a;this.bh=null}); -w.defineProperty(ga,{start:"start"},function(){return this.rp},function(a){this.Q&&w.la(this,a);w.G(a,L,ga,"start");this.rp=a.S();this.bh=null});w.defineProperty(ga,{end:"end"},function(){return this.Go},function(a){this.Q&&w.la(this,a);w.G(a,L,ga,"end");this.Go=a.S();this.bh=null});w.defineProperty(ga,{Ku:"startRadius"},function(){return this.Aw},function(a){this.Q&&w.la(this,a);w.Fd(a,ga,"startRadius");0>a&&w.Ea(a,">= zero",ga,"startRadius");this.Aw=a;this.bh=null}); -w.defineProperty(ga,{Ht:"endRadius"},function(){return this.wv},function(a){this.Q&&w.la(this,a);w.Fd(a,ga,"endRadius");0>a&&w.Ea(a,">= zero",ga,"endRadius");this.wv=a;this.bh=null});w.defineProperty(ga,{uk:"colorStops"},function(){return this.ah},function(a){this.Q&&w.la(this,a);this.ah=a;this.bh=null});w.defineProperty(ga,{pattern:"pattern"},function(){return this.lw},function(a){this.Q&&w.la(this,a);this.lw=a;this.bh=null}); -ga.randomColor=function(a,b){void 0===a&&(a=128);void 0===b&&(b=Math.max(a,255));var c=Math.abs(b-a),d=Math.floor(a+Math.random()*c).toString(16),e=Math.floor(a+Math.random()*c).toString(16),c=Math.floor(a+Math.random()*c).toString(16);2>d.length&&(d="0"+d);2>e.length&&(e="0"+e);2>c.length&&(c="0"+c);return"#"+d+e+c};var Vn=(new Vc(null)).xk,fa; +w.defineProperty(ga,{type:"type"},function(){return this.ma},function(a){this.Q&&w.la(this,a);w.mb(a,ga,ga,"type");this.ma=a;this.start.Od()&&(a===ng?this.start=yb:a===bd&&(this.start=Gb));this.end.Od()&&(a===ng?this.end=Kb:a===bd&&(this.end=Gb));this.bh=null});w.defineProperty(ga,{color:"color"},function(){return this.qo},function(a){this.Q&&w.la(this,a);this.qo=a;this.bh=null}); +w.defineProperty(ga,{start:"start"},function(){return this.qp},function(a){this.Q&&w.la(this,a);w.G(a,L,ga,"start");this.qp=a.S();this.bh=null});w.defineProperty(ga,{end:"end"},function(){return this.Fo},function(a){this.Q&&w.la(this,a);w.G(a,L,ga,"end");this.Fo=a.S();this.bh=null});w.defineProperty(ga,{Ku:"startRadius"},function(){return this.Aw},function(a){this.Q&&w.la(this,a);w.Fd(a,ga,"startRadius");0>a&&w.Ea(a,">= zero",ga,"startRadius");this.Aw=a;this.bh=null}); +w.defineProperty(ga,{Ht:"endRadius"},function(){return this.wv},function(a){this.Q&&w.la(this,a);w.Fd(a,ga,"endRadius");0>a&&w.Ea(a,">= zero",ga,"endRadius");this.wv=a;this.bh=null});w.defineProperty(ga,{tk:"colorStops"},function(){return this.ah},function(a){this.Q&&w.la(this,a);this.ah=a;this.bh=null});w.defineProperty(ga,{pattern:"pattern"},function(){return this.lw},function(a){this.Q&&w.la(this,a);this.lw=a;this.bh=null}); +ga.randomColor=function(a,b){void 0===a&&(a=128);void 0===b&&(b=Math.max(a,255));var c=Math.abs(b-a),d=Math.floor(a+Math.random()*c).toString(16),e=Math.floor(a+Math.random()*c).toString(16),c=Math.floor(a+Math.random()*c).toString(16);2>d.length&&(d="0"+d);2>e.length&&(e="0"+e);2>c.length&&(c="0"+c);return"#"+d+e+c};var Vn=(new Vc(null)).wk,fa; ga.isValidColor=fa=function(a){if("black"===a)return!0;if(""===a)return!1;Vn.fillStyle="#000000";var b=Vn.fillStyle;Vn.fillStyle=a;if(Vn.fillStyle!==b)return!0;Vn.fillStyle="#FFFFFF";b=Vn.fillStyle;Vn.fillStyle=a;return Vn.fillStyle!==b};var Wn=new Rn,Xn=new Rn,Yn=new Rn,Zn=new Rn;ga.lighten=function(a){return $n(a)}; -ga.prototype.lightenBy=function(a,b){this.Q&&w.la(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?Tn:b;if(this.type===mg)ao(this.color),this.color=bo(c,d);else if((this.type===ng||this.type===bd)&&null!==this.uk)for(var e=this.uk.i;e.next();)ao(e.value),this.addColorStop(e.key,bo(c,d));return this};var $n;ga.lightenBy=$n=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Tn:c;ao(a);return bo(b,c)};ga.darken=function(a){return co(a)}; -ga.prototype.darkenBy=function(a,b){this.Q&&w.la(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?Tn:b;if(this.type===mg)ao(this.color),this.color=bo(-c,d);else if((this.type===ng||this.type===bd)&&null!==this.uk)for(var e=this.uk.i;e.next();)ao(e.value),this.addColorStop(e.key,bo(-c,d));return this};var co;ga.darkenBy=co=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Tn:c;ao(a);return bo(-b,c)}; +ga.prototype.lightenBy=function(a,b){this.Q&&w.la(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?Tn:b;if(this.type===mg)ao(this.color),this.color=bo(c,d);else if((this.type===ng||this.type===bd)&&null!==this.tk)for(var e=this.tk.i;e.next();)ao(e.value),this.addColorStop(e.key,bo(c,d));return this};var $n;ga.lightenBy=$n=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Tn:c;ao(a);return bo(b,c)};ga.darken=function(a){return co(a)}; +ga.prototype.darkenBy=function(a,b){this.Q&&w.la(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?Tn:b;if(this.type===mg)ao(this.color),this.color=bo(-c,d);else if((this.type===ng||this.type===bd)&&null!==this.tk)for(var e=this.tk.i;e.next();)ao(e.value),this.addColorStop(e.key,bo(-c,d));return this};var co;ga.darkenBy=co=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Tn:c;ao(a);return bo(-b,c)}; function bo(a,b){switch(b){case Tn:var c=100*eo(Wn.Bc),d=100*eo(Wn.xd),e=100*eo(Wn.Wc);Yn.Bc=.4124564*c+.3575761*d+.1804375*e;Yn.xd=.2126729*c+.7151522*d+.072175*e;Yn.Wc=.0193339*c+.119192*d+.9503041*e;Yn.cg=Wn.cg;c=fo(Yn.Bc/ho[0]);d=fo(Yn.xd/ho[1]);e=fo(Yn.Wc/ho[2]);Zn.Bc=116*d-16;Zn.xd=500*(c-d);Zn.Wc=200*(d-e);Zn.cg=Yn.cg;Zn.Bc=Math.min(100,Math.max(0,Zn.Bc+100*a));c=(Zn.Bc+16)/116;d=c-Zn.Wc/200;Yn.Bc=ho[0]*io(Zn.xd/500+c);Yn.xd=ho[1]*(Zn.Bc>jo*ko?Math.pow(c,3):Zn.Bc/jo);Yn.Wc=ho[2]*io(d);Yn.cg= Zn.cg;c=-.969266*Yn.Bc+1.8760108*Yn.xd+.041556*Yn.Wc;d=.0556434*Yn.Bc+-.2040259*Yn.xd+1.0572252*Yn.Wc;Wn.Bc=255*lo((3.2404542*Yn.Bc+-1.5371385*Yn.xd+-.4985314*Yn.Wc)/100);Wn.xd=255*lo(c/100);Wn.Wc=255*lo(d/100);Wn.cg=Yn.cg;Wn.Bc=Math.round(Wn.Bc);255Wn.Bc&&(Wn.Bc=0);Wn.xd=Math.round(Wn.xd);255Wn.xd&&(Wn.xd=0);Wn.Wc=Math.round(Wn.Wc);255Wn.Wc&&(Wn.Wc=0);return"rgba("+Wn.Bc+", "+Wn.xd+", "+Wn.Wc+", "+Wn.cg+")";case Un:var e=Wn.Bc/255,f=Wn.xd/ 255,h=Wn.Wc/255,k=Math.max(e,f,h),d=Math.min(e,f,h),l=k-d,d=(k+d)/2;if(0===l)c=e=0;else{switch(k){case e:c=(f-h)/l%6;break;case f:c=(h-e)/l+2;break;case h:c=(e-f)/l+4}c*=60;0>c&&(c+=360);e=l/(1-Math.abs(2*d-1))}Xn.Bc=Math.round(c);Xn.xd=Math.round(100*e);Xn.Wc=Math.round(100*d);Xn.cg=Wn.cg;Xn.Wc=Math.min(100,Math.max(0,Xn.Wc+100*a));return"hsla("+Xn.Bc+", "+Xn.xd+"%, "+Xn.Wc+"%, "+Xn.cg+")";default:return w.k("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}} function ao(a){Vn.clearRect(0,0,1,1);Vn.fillStyle="#000000";var b=Vn.fillStyle;Vn.fillStyle=a;Vn.fillStyle!==b?(Vn.fillRect(0,0,1,1),a=Vn.getImageData(0,0,1,1).data,Wn.Bc=a[0],Wn.xd=a[1],Wn.Wc=a[2],Wn.cg=a[3]/255):(Vn.fillStyle="#FFFFFF",Vn.fillStyle=a,Wn.Bc=0,Wn.xd=0,Wn.Wc=0,Wn.cg=1)}function eo(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function lo(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}var ko=216/24389,jo=24389/27,ho=[95.047,100,108.883]; function fo(a){return a>ko?Math.pow(a,1/3):(jo*a+16)/116}function io(a){var b=a*a*a;return b>ko?b:(116*a-16)/jo} -function G(){w.mc(this);this.P=4225027;this.wc=1;this.lh=null;this.Qb="";this.$b=this.Eb=null;this.ib=(new z(NaN,NaN)).freeze();this.Re=Dd;this.Vh=od;this.Uh=Bd;this.dd=new ia;this.om=new ia;this.Qi=new ia;this.tb=this.Do=1;this.ig=0;this.Cg=mo;this.Lm=fd;this.qd=(new A(NaN,NaN,NaN,NaN)).freeze();this.nc=(new A(NaN,NaN,NaN,NaN)).freeze();this.Tc=(new A(0,0,NaN,NaN)).freeze();this.V=this.As=this.Bs=null;this.nm=this.ge=rc;this.Ns=0;this.aj=1;this.Tq=0;this.xi=1;this.ct=null;this.Rs=-Infinity;this.Wm= -0;this.Xm=dd;this.Ym=kj;this.br="";this.tc=this.ha=null;this.po=-1;this.bn=this.lg=this.$k=this.qp=null;this.vz=nj;this.Sm=null}w.ji(G);w.fa("GraphObject",G); +function G(){w.mc(this);this.P=4225027;this.wc=1;this.lh=null;this.Qb="";this.$b=this.Eb=null;this.ib=(new z(NaN,NaN)).freeze();this.Re=Dd;this.Vh=od;this.Uh=Bd;this.dd=new ia;this.om=new ia;this.Qi=new ia;this.tb=this.Co=1;this.ig=0;this.Cg=mo;this.Lm=fd;this.qd=(new A(NaN,NaN,NaN,NaN)).freeze();this.nc=(new A(NaN,NaN,NaN,NaN)).freeze();this.Tc=(new A(0,0,NaN,NaN)).freeze();this.V=this.As=this.Bs=null;this.nm=this.ge=rc;this.Ns=0;this.aj=1;this.Tq=0;this.xi=1;this.ct=null;this.Rs=-Infinity;this.Wm= +0;this.Xm=dd;this.Ym=kj;this.br="";this.tc=this.ha=null;this.oo=-1;this.bn=this.lg=this.Zk=this.pp=null;this.vz=nj;this.Sm=null}w.ji(G);w.fa("GraphObject",G); G.prototype.cloneProtected=function(a){a.P=this.P|6144;a.wc=this.wc;a.Qb=this.Qb;a.Eb=this.Eb;a.$b=this.$b;a.ib.assign(this.ib);a.Re=this.Re.S();a.Vh=this.Vh.S();a.Uh=this.Uh.S();a.Qi=this.Qi.copy();a.tb=this.tb;a.ig=this.ig;a.Cg=this.Cg;a.Lm=this.Lm.S();a.qd.assign(this.qd);a.nc.assign(this.nc);a.Tc.assign(this.Tc);a.As=this.As;null!==this.V&&(a.V=this.V.copy());a.ge=this.ge.S();a.nm=this.nm.S();a.Ns=this.Ns;a.aj=this.aj;a.Tq=this.Tq;a.xi=this.xi;a.ct=this.ct;a.Rs=this.Rs;a.Wm=this.Wm;a.Xm=this.Xm.S(); -a.Ym=this.Ym;a.br=this.br;null!==this.ha&&(a.ha=this.ha.copy());a.tc=this.tc;a.po=this.po;null!==this.$k&&(a.$k=w.Il(this.$k));null!==this.lg&&(a.lg=this.lg.copy());a.bn=this.bn};G.prototype.addCopyProperty=G.prototype.aH=function(a){var b=this.$k;if(w.isArray(b))for(var c=0;ck;)k+=f[n++%l],p=!p;q=!1}else k=f[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}} -G.prototype.raiseChangedEvent=G.prototype.Xc=function(a,b,c,d,e,f,h){var k=this.U;if(null!==k&&(k.Vn(a,b,c,d,e,f,h),xo(this)&&c===this&&a===Mf&&yo(this,k,b),c===k&&0!==(k.P&16777216)&&null!==k.data))for(a=this.xa.n,c=a.length,d=0;dk;)k+=f[n++%l],p=!p;q=!1}else k=f[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}} +G.prototype.raiseChangedEvent=G.prototype.Xc=function(a,b,c,d,e,f,h){var k=this.U;if(null!==k&&(k.Un(a,b,c,d,e,f,h),xo(this)&&c===this&&a===Mf&&yo(this,k,b),c===k&&0!==(k.P&16777216)&&null!==k.data))for(a=this.xa.n,c=a.length,d=0;da&&(a+=360));return a};G.prototype.getDocumentScale=G.prototype.oj=function(){if(0!==(this.P&4096)===!1)return this.Do;var a=this.tb;return null!==this.O?a*this.O.oj():a};G.prototype.getLocalPoint=G.prototype.RE=function(a,b){void 0===b&&(b=new z);b.assign(a);this.ph.li(b);return b}; -G.prototype.getNearestIntersectionPoint=G.prototype.SE=function(a,b,c){return this.Bn(a.x,a.y,b.x,b.y,c)};g=G.prototype;g.Bn=function(a,b,c,d,e){var f=this.transform,h=1/(f.m11*f.m22-f.m12*f.m21),k=f.m22*h,l=-f.m12*h,m=-f.m21*h,n=f.m11*h,p=h*(f.m21*f.dy-f.m22*f.dx),q=h*(f.m12*f.dx-f.m11*f.dy);if(null!==this.jn)return f=this.W,ke(f.left,f.top,f.right,f.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.m(0,0);d=this.Ia;c=ke(0,0,d.width,d.height,h,a,b,c,e);e.transform(f);return c}; -function wk(a,b,c,d,e){if(!1!==hm(a)){var f=a.margin,h=f.right+f.left,f=f.top+f.bottom;b=Math.max(b-h,0);c=Math.max(c-f,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-f,0);var h=a.angle,f=0,f=a.Ba,k=0;a instanceof X&&(k=a.kb);90===h||270===h?(b=isFinite(f.height)?f.height+k:b,c=isFinite(f.width)?f.width+k:c):(b=isFinite(f.width)?f.width+k:b,c=isFinite(f.height)?f.height+k:c);var f=d||0,k=e||0,l=a instanceof C;switch(Co(a,!0)){case Nj:k=f=0;l&&(c=b=Infinity);break;case De:isFinite(b)&&b>d&&(f=b);isFinite(c)&& -c>e&&(k=c);break;case oo:isFinite(b)&&b>d&&(f=b);k=0;l&&(c=Infinity);break;case no:isFinite(c)&&c>e&&(k=c),f=0,l&&(b=Infinity)}var l=a.Bf,m=a.zh;f>l.width&&m.widthl.height&&m.heighta&&(a+=360));return a};G.prototype.getDocumentScale=G.prototype.oj=function(){if(0!==(this.P&4096)===!1)return this.Co;var a=this.tb;return null!==this.O?a*this.O.oj():a};G.prototype.getLocalPoint=G.prototype.RE=function(a,b){void 0===b&&(b=new z);b.assign(a);this.ph.li(b);return b}; +G.prototype.getNearestIntersectionPoint=G.prototype.SE=function(a,b,c){return this.An(a.x,a.y,b.x,b.y,c)};g=G.prototype;g.An=function(a,b,c,d,e){var f=this.transform,h=1/(f.m11*f.m22-f.m12*f.m21),k=f.m22*h,l=-f.m12*h,m=-f.m21*h,n=f.m11*h,p=h*(f.m21*f.dy-f.m22*f.dx),q=h*(f.m12*f.dx-f.m11*f.dy);if(null!==this.jn)return f=this.W,ke(f.left,f.top,f.right,f.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.m(0,0);d=this.Ia;c=ke(0,0,d.width,d.height,h,a,b,c,e);e.transform(f);return c}; +function wk(a,b,c,d,e){if(!1!==Am(a)){var f=a.margin,h=f.right+f.left,f=f.top+f.bottom;b=Math.max(b-h,0);c=Math.max(c-f,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-f,0);var h=a.angle,f=0,f=a.Ba,k=0;a instanceof X&&(k=a.kb);90===h||270===h?(b=isFinite(f.height)?f.height+k:b,c=isFinite(f.width)?f.width+k:c):(b=isFinite(f.width)?f.width+k:b,c=isFinite(f.height)?f.height+k:c);var f=d||0,k=e||0,l=a instanceof C;switch(Co(a,!0)){case Nj:k=f=0;l&&(c=b=Infinity);break;case De:isFinite(b)&&b>d&&(f=b);isFinite(c)&& +c>e&&(k=c);break;case oo:isFinite(b)&&b>d&&(f=b);k=0;l&&(c=Infinity);break;case no:isFinite(c)&&c>e&&(k=c),f=0,l&&(b=Infinity)}var l=a.Bf,m=a.zh;f>l.width&&m.widthl.height&&m.heighta.height||this.Oi.ef>a.width))&&(c=!0);this.P=c?this.P|256:this.P&-257;this.nc.H()|| w.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.nc.toString());this.Nx(f,this.nc);Do(this,!1);w.Db(f)};g.ij=function(){}; function Eo(a,b,c,d,e){var f=a.W;f.x=b;f.y=c;f.width=d;f.height=e;if(!a.Ba.H()){f=a.qd;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=f.width+b;f=f.height+h;d+=b;e+=h;b=Co(a,!0);c===d&&f===e&&(b=Nj);switch(b){case Nj:if(c>d||f>e)$l(a,!0),wk(a,c>d?d:c,f>e?e:f);break;case De:$l(a,!0);wk(a,d,e,0,0);break;case oo:$l(a,!0);wk(a,d,f,0,0);break;case no:$l(a,!0),wk(a,c,e,0,0)}}} -g.Nx=function(a,b){var c=this.U;null!==c&&null!==c.g&&(c.Eu!==this&&c.VF!==this&&c.YF!==this||Fo(c,!0),this.na(),Qa(a,b)||(c.Ek(),this.ss(c)))};g.ss=function(a){null!==this.Qd&&(Fo(a,!0),a instanceof T&&Go(a,this))};w.defineProperty(G,{uq:"shadowVisible"},function(){return this.bn},function(a){var b=this.bn;b!==a&&(this.bn=a,this.na(),this.h("shadowVisible",b,a))}); +g.Nx=function(a,b){var c=this.U;null!==c&&null!==c.g&&(c.Eu!==this&&c.VF!==this&&c.YF!==this||Fo(c,!0),this.na(),Qa(a,b)||(c.Dk(),this.ss(c)))};g.ss=function(a){null!==this.Qd&&(Fo(a,!0),a instanceof T&&Go(a,this))};w.defineProperty(G,{uq:"shadowVisible"},function(){return this.bn},function(a){var b=this.bn;b!==a&&(this.bn=a,this.na(),this.h("shadowVisible",b,a))}); G.prototype.se=function(a,b){if(this.visible){var c=this.nc;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)){var d=this.opacity,e=1;if(1!==d){if(0===d)return;e=a.globalAlpha;a.globalAlpha=e*d}if(a instanceof Nc)a:{if(this.visible){var f=null,h=a.Dx;if(this instanceof C&&(this.type===Ho||this.type===Io))Jo(this,a,b);else{var k=this.nc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.O;0!==(this.P&4096)===!0&&Ko(this);var c=0!==(this.P&256),n=!1;this instanceof -Hh&&(a.font=this.font);if(c){n=m.Yg()?m.Ia:m.W;if(null!==this.lg)var p=this.lg,q=p.x,r=p.y,s=p.width,p=p.height;else q=Math.max(k.x,n.x),r=Math.max(k.y,n.y),s=Math.min(k.right,n.right)-q,p=Math.min(k.bottom,n.bottom)-r;if(q>k.width+k.x||k.x>n.width+n.x||r>k.height+k.y||k.y>n.height+n.y)break a;n=!0;Pc(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}if(this.tj()){var u=this;if(!u.isVisible())break a}a.uh.Tb=[1,0,0,1,0,0];q=!1;this.tj()&&this.Zl&&b.pj("drawShadows")&&(r=this.an,a.lB(r.x* -b.scale*b.Ad,r.y*b.scale*b.Ad,u.Bg),a.Zn(),a.shadowColor=u.$m);u=!1;this.U&&b.pj("drawShadows")&&(u=this.U.Zl);!0===this.uq?(a.Zn(),!1===q&&u&&(Pc(a,1,0,0,1,0,0),a.$a(),q=!0)):!1===this.uq&&a.Yn();null!==this.$b&&(Lo(this,a,this.$b,!0,!0),!1===q&&u&&(Pc(a,1,0,0,1,0,0),a.$a(),q=!0),this.$b instanceof ga&&this.$b.type===bd?(a.beginPath(),a.rect(k.x,k.y,k.width,k.height),a.Jg(this.$b)):a.fillRect(k.x,k.y,k.width,k.height));this instanceof C?Pc(a,l.m11,l.m12,l.m21,l.m22,l.dx,l.dy):a.uh.Tb=[l.m11,l.m12, +Hh&&(a.font=this.font);if(c){n=m.Yg()?m.Ia:m.W;if(null!==this.lg)var p=this.lg,q=p.x,r=p.y,s=p.width,p=p.height;else q=Math.max(k.x,n.x),r=Math.max(k.y,n.y),s=Math.min(k.right,n.right)-q,p=Math.min(k.bottom,n.bottom)-r;if(q>k.width+k.x||k.x>n.width+n.x||r>k.height+k.y||k.y>n.height+n.y)break a;n=!0;Pc(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}if(this.sj()){var u=this;if(!u.isVisible())break a}a.uh.Tb=[1,0,0,1,0,0];q=!1;this.sj()&&this.$l&&b.pj("drawShadows")&&(r=this.an,a.lB(r.x* +b.scale*b.Ad,r.y*b.scale*b.Ad,u.Bg),a.Yn(),a.shadowColor=u.$m);u=!1;this.U&&b.pj("drawShadows")&&(u=this.U.$l);!0===this.uq?(a.Yn(),!1===q&&u&&(Pc(a,1,0,0,1,0,0),a.$a(),q=!0)):!1===this.uq&&a.Xn();null!==this.$b&&(Lo(this,a,this.$b,!0,!0),!1===q&&u&&(Pc(a,1,0,0,1,0,0),a.$a(),q=!0),this.$b instanceof ga&&this.$b.type===bd?(a.beginPath(),a.rect(k.x,k.y,k.width,k.height),a.Jg(this.$b)):a.fillRect(k.x,k.y,k.width,k.height));this instanceof C?Pc(a,l.m11,l.m12,l.m21,l.m22,l.dx,l.dy):a.uh.Tb=[l.m11,l.m12, l.m21,l.m22,l.dx,l.dy];null!==this.Eb&&(!1===q&&u&&(Pc(a,1,0,0,1,0,0),a.$a(),q=!0),s=this.Ia,l=k=0,r=s.width,s=s.height,p=0,this instanceof X&&(s=this.hb.cb,k=s.x,l=s.y,r=s.width,s=s.height,p=this.fi),Lo(this,a,this.Eb,!0,!1),this.Eb instanceof ga&&this.Eb.type===bd?(a.beginPath(),a.rect(k-p/2,l-p/2,r+p,s+p),a.Jg(this.Eb)):a.fillRect(k-p/2,l-p/2,r+p,s+p));u&&(null!==this.Eb||null!==this.$b||null!==m&&0!==(m.P&512)||null!==m&&(m.type===El||m.type===Lj)&&m.Jd()!==this)?(Mo(this,!0),null===this.uq&& -a.Yn()):Mo(this,!1);this.yk(a,b);u&&0!==(this.P&512)===!0&&a.Zn();this.tj()&&u&&a.Yn();c&&(a.restore(),n&&a.wf.pop());this instanceof C&&(f=a.wf.pop());!0===q&&a.wf.pop();null!==a.EE&&(null===f&&(h===a.Dx?(Pc(a,1,0,0,1,0,0),f=a.wf.pop()):f=a.Dx),a.EE(this,f))}}}}else{if(this instanceof C&&(this.type===Ho||this.type===Io)){Jo(this,a,b);1!==d&&(a.globalAlpha=e);return}this instanceof W&&this.lu(!1);f=this.transform;h=this.O;0!==(this.P&4096)===!0&&Ko(this);m=0!==(this.P&256);a.Jp&&(m=!1);this instanceof -Hh&&(a.font=this.font);if(m){n=h.Yg()?h.Ia:h.W;null!==this.lg?(q=this.lg,k=q.x,l=q.y,u=q.width,q=q.height):(k=Math.max(c.x,n.x),l=Math.max(c.y,n.y),u=Math.min(c.right,n.right)-k,q=Math.min(c.bottom,n.bottom)-l);if(k>c.width+c.x||c.x>n.width+n.x||l>c.height+c.y||c.y>n.height+n.y){1!==d&&(a.globalAlpha=e);return}a.save();a.beginPath();a.rect(k,l,u,q);a.clip()}if(this.tj()){if(!this.isVisible()){1!==d&&(a.globalAlpha=e);return}this.Zl&&b.pj("drawShadows")&&(n=this.an,a.lB(n.x*b.scale*b.Ad,n.y*b.scale* -b.Ad,this.Bg),a.Zn(),a.shadowColor=this.$m)}n=!1;this.U&&b.pj("drawShadows")&&(n=this.U.Zl);!0===this.uq?a.Zn():!1===this.uq&&a.Yn();null!==this.$b&&(Lo(this,a,this.$b,!0,!0),this.$b instanceof ga&&this.$b.type===bd?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Jg(this.$b)):a.fillRect(c.x,c.y,c.width,c.height));f.cu()||a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);null!==this.Eb&&(u=this.Ia,k=c=0,l=u.width,u=u.height,q=0,this instanceof X&&(u=this.hb.cb,c=u.x,k=u.y,l=u.width,u=u.height,q=this.fi), -Lo(this,a,this.Eb,!0,!1),this.Eb instanceof ga&&this.Eb.type===bd?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Jg(this.Eb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));n&&(null!==this.Eb||null!==this.$b||null!==h&&0!==(h.P&512)||null!==h&&(h.type===El||h.type===Lj)&&h.Jd()!==this)?(Mo(this,!0),null===this.uq&&a.Yn()):Mo(this,!1);this.yk(a,b);n&&0!==(this.P&512)===!0&&a.Zn();this.tj()&&n&&a.Yn();m?(a.restore(),this instanceof C?a.Ee(!0):a.Ee(!1)):f.cu()||(h=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*h,-f.m12* +a.Xn()):Mo(this,!1);this.xk(a,b);u&&0!==(this.P&512)===!0&&a.Yn();this.sj()&&u&&a.Xn();c&&(a.restore(),n&&a.wf.pop());this instanceof C&&(f=a.wf.pop());!0===q&&a.wf.pop();null!==a.EE&&(null===f&&(h===a.Dx?(Pc(a,1,0,0,1,0,0),f=a.wf.pop()):f=a.Dx),a.EE(this,f))}}}}else{if(this instanceof C&&(this.type===Ho||this.type===Io)){Jo(this,a,b);1!==d&&(a.globalAlpha=e);return}this instanceof W&&this.lu(!1);f=this.transform;h=this.O;0!==(this.P&4096)===!0&&Ko(this);m=0!==(this.P&256);a.Ip&&(m=!1);this instanceof +Hh&&(a.font=this.font);if(m){n=h.Yg()?h.Ia:h.W;null!==this.lg?(q=this.lg,k=q.x,l=q.y,u=q.width,q=q.height):(k=Math.max(c.x,n.x),l=Math.max(c.y,n.y),u=Math.min(c.right,n.right)-k,q=Math.min(c.bottom,n.bottom)-l);if(k>c.width+c.x||c.x>n.width+n.x||l>c.height+c.y||c.y>n.height+n.y){1!==d&&(a.globalAlpha=e);return}a.save();a.beginPath();a.rect(k,l,u,q);a.clip()}if(this.sj()){if(!this.isVisible()){1!==d&&(a.globalAlpha=e);return}this.$l&&b.pj("drawShadows")&&(n=this.an,a.lB(n.x*b.scale*b.Ad,n.y*b.scale* +b.Ad,this.Bg),a.Yn(),a.shadowColor=this.$m)}n=!1;this.U&&b.pj("drawShadows")&&(n=this.U.$l);!0===this.uq?a.Yn():!1===this.uq&&a.Xn();null!==this.$b&&(Lo(this,a,this.$b,!0,!0),this.$b instanceof ga&&this.$b.type===bd?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Jg(this.$b)):a.fillRect(c.x,c.y,c.width,c.height));f.cu()||a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);null!==this.Eb&&(u=this.Ia,k=c=0,l=u.width,u=u.height,q=0,this instanceof X&&(u=this.hb.cb,c=u.x,k=u.y,l=u.width,u=u.height,q=this.fi), +Lo(this,a,this.Eb,!0,!1),this.Eb instanceof ga&&this.Eb.type===bd?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Jg(this.Eb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));n&&(null!==this.Eb||null!==this.$b||null!==h&&0!==(h.P&512)||null!==h&&(h.type===El||h.type===Lj)&&h.Jd()!==this)?(Mo(this,!0),null===this.uq&&a.Xn()):Mo(this,!1);this.xk(a,b);n&&0!==(this.P&512)===!0&&a.Yn();this.sj()&&n&&a.Xn();m?(a.restore(),this instanceof C?a.Ee(!0):a.Ee(!1)):f.cu()||(h=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*h,-f.m12* h,-f.m21*h,f.m11*h,h*(f.m21*f.dy-f.m22*f.dx),h*(f.m12*f.dx-f.m11*f.dy)))}1!==d&&(a.globalAlpha=e)}}}; -function Jo(a,b,c){var d=a.nc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.$b&&(Lo(a,b,a.$b,!0,!0),a.$b instanceof ga&&a.$b.type===bd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Jg(a.$b)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Eb&&(Lo(a,b,a.Eb,!0,!1),a.Eb instanceof ga&&a.Eb.type===bd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Jg(a.Eb)):b.fillRect(d.x,d.y,d.width,d.height)),a.yk(b,c))}G.prototype.yk=function(){}; -function Lo(a,b,c,d,e){if(null!==c){var f=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===mg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ia,f=h.width,h=h.height;if(e)var l=a.W,f=l.width,h=l.height;var m=b instanceof Wc;if(m&&c.bh&&(c.type===Sn||c.so===f&&c.Iy===h))k=c.bh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.W,f=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*f+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*f+c.end.offsetX;q=c.end.y*h+c.end.offsetY; -l+=r;p+=r;n+=s;q+=s;if(c.type===ng)k=b.createLinearGradient(l,n,p,q);else if(c.type===bd)s=isNaN(c.Ht)?Math.max(f,h)/2:c.Ht,isNaN(c.Ku)?(r=0,s=Math.max(f,h)/2):r=c.Ku,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===Sn)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else w.yd(c.type,"Brush type");if(c.type!==Sn&&(e=c.uk,null!==e))for(e=e.i;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.bh=k,null!==k&&(c.so=f,c.Iy=h),null===k&&c.type===Sn&&-1!==c.so)){c.so=-1;var t=a.g;null!==t&& --1===c.so&&w.setTimeout(function(){t.Ux()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}G.prototype.isContainedBy=G.prototype.Xl=function(a){if(a instanceof C)a:{if(this!==a&&null!==a)for(var b=this.O;null!==b;){if(b===a){a=!0;break a}b=b.O}a=!1}else a=!1;return a};G.prototype.isVisibleObject=G.prototype.xj=function(){if(!this.visible)return!1;var a=this.O;return null!==a?a.xj():!0}; +function Jo(a,b,c){var d=a.nc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.$b&&(Lo(a,b,a.$b,!0,!0),a.$b instanceof ga&&a.$b.type===bd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Jg(a.$b)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Eb&&(Lo(a,b,a.Eb,!0,!1),a.Eb instanceof ga&&a.Eb.type===bd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Jg(a.Eb)):b.fillRect(d.x,d.y,d.width,d.height)),a.xk(b,c))}G.prototype.xk=function(){}; +function Lo(a,b,c,d,e){if(null!==c){var f=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===mg)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ia,f=h.width,h=h.height;if(e)var l=a.W,f=l.width,h=l.height;var m=b instanceof Wc;if(m&&c.bh&&(c.type===Sn||c.ro===f&&c.Iy===h))k=c.bh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.W,f=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*f+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*f+c.end.offsetX;q=c.end.y*h+c.end.offsetY; +l+=r;p+=r;n+=s;q+=s;if(c.type===ng)k=b.createLinearGradient(l,n,p,q);else if(c.type===bd)s=isNaN(c.Ht)?Math.max(f,h)/2:c.Ht,isNaN(c.Ku)?(r=0,s=Math.max(f,h)/2):r=c.Ku,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===Sn)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else w.yd(c.type,"Brush type");if(c.type!==Sn&&(e=c.tk,null!==e))for(e=e.i;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.bh=k,null!==k&&(c.ro=f,c.Iy=h),null===k&&c.type===Sn&&-1!==c.ro)){c.ro=-1;var t=a.g;null!==t&& +-1===c.ro&&w.setTimeout(function(){t.Ux()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}G.prototype.isContainedBy=G.prototype.Yl=function(a){if(a instanceof C)a:{if(this!==a&&null!==a)for(var b=this.O;null!==b;){if(b===a){a=!0;break a}b=b.O}a=!1}else a=!1;return a};G.prototype.isVisibleObject=G.prototype.wj=function(){if(!this.visible)return!1;var a=this.O;return null!==a?a.wj():!0}; G.prototype.isEnabledObject=G.prototype.au=function(){for(var a=this instanceof C?this:this.O;null!==a&&a.isEnabled;)a=a.O;return null===a};w.defineProperty(G,{FE:"enabledChanged"},function(){return null!==this.ha?this.ha.rr:null},function(a){so(this);var b=this.ha.rr;b!==a&&(null!==a&&w.j(a,"function",G,"enabledChanged"),this.ha.rr=a,this.h("enabledChanged",b,a))}); -function Ko(a){if(0!==(a.P&2048)===!0){var b=a.dd;b.reset();if(!a.nc.H()||!a.qd.H()){No(a,!1);return}b.translate(a.nc.x,a.nc.y);b.translate(-a.za.x,-a.za.y);var c=a.Ia;Ao(a,b,c.x,c.y,c.width,c.height);No(a,!1);Oo(a,!0)}0!==(a.P&4096)===!0&&(b=a.O,null===b?(a.om.set(a.dd),a.Do=a.scale,Oo(a,!1)):null!==b.ph&&(c=a.om,c.reset(),b.Yg()?c.multiply(b.om):null!==b.O&&c.multiply(b.O.om),c.multiply(a.dd),a.Do=a.scale*b.Do,Oo(a,!1)))} -function Ao(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=Gb;a.tj()&&a.Af.fd()&&(h=a.Af);var k=w.K();if(a instanceof S&&a.Yf!==a)for(c=a.Yf,d=c.Ia,k.Hu(d.x,d.y,d.width,d.height,h),c.Qi.nb(k),k.offset(-c.za.x,-c.za.y),h=c.O;null!==h&&h!==a;)h.Qi.nb(k),k.offset(-h.za.x,-h.za.y),h=h.O;else k.Hu(c,d,e,f,h);b.rotate(a.angle,k.x,k.y);w.v(k)}}g=G.prototype;g.I=function(a){void 0===a&&(a=!1);if(!0!==hm(this)){$l(this,!0);Do(this,!0);var b=this.O;null===b||a||b.I()}}; -g.aq=function(){!0!==hm(this)&&($l(this,!0),Do(this,!0))};function Po(a){if(!1===Bm(a)){var b=a.O;null!==b?b.I():a.tj()&&(b=a.g,null!==b&&(b.sg.add(a),a instanceof T&&a.Uf(),b.Le()));Do(a,!0)}}g.Ii=function(){0!==(this.P&2048)===!1&&(No(this,!0),Oo(this,!0))};g.wA=function(){Oo(this,!0)};g.na=function(){var a=this.U;null!==a&&a.na()}; +function Ko(a){if(0!==(a.P&2048)===!0){var b=a.dd;b.reset();if(!a.nc.H()||!a.qd.H()){No(a,!1);return}b.translate(a.nc.x,a.nc.y);b.translate(-a.za.x,-a.za.y);var c=a.Ia;Ao(a,b,c.x,c.y,c.width,c.height);No(a,!1);Oo(a,!0)}0!==(a.P&4096)===!0&&(b=a.O,null===b?(a.om.set(a.dd),a.Co=a.scale,Oo(a,!1)):null!==b.ph&&(c=a.om,c.reset(),b.Yg()?c.multiply(b.om):null!==b.O&&c.multiply(b.O.om),c.multiply(a.dd),a.Co=a.scale*b.Co,Oo(a,!1)))} +function Ao(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=Gb;a.sj()&&a.Af.fd()&&(h=a.Af);var k=w.K();if(a instanceof S&&a.Yf!==a)for(c=a.Yf,d=c.Ia,k.Hu(d.x,d.y,d.width,d.height,h),c.Qi.nb(k),k.offset(-c.za.x,-c.za.y),h=c.O;null!==h&&h!==a;)h.Qi.nb(k),k.offset(-h.za.x,-h.za.y),h=h.O;else k.Hu(c,d,e,f,h);b.rotate(a.angle,k.x,k.y);w.v(k)}}g=G.prototype;g.I=function(a){void 0===a&&(a=!1);if(!0!==Am(this)){$l(this,!0);Do(this,!0);var b=this.O;null===b||a||b.I()}}; +g.$p=function(){!0!==Am(this)&&($l(this,!0),Do(this,!0))};function Po(a){if(!1===Bm(a)){var b=a.O;null!==b?b.I():a.sj()&&(b=a.g,null!==b&&(b.sg.add(a),a instanceof T&&a.Uf(),b.Le()));Do(a,!0)}}g.Ii=function(){0!==(this.P&2048)===!1&&(No(this,!0),Oo(this,!0))};g.wA=function(){Oo(this,!0)};g.na=function(){var a=this.U;null!==a&&a.na()}; function Co(a,b){var c=a.stretch,d=a.O;if(null!==d&&d.ma===Qo)return Ro(a,d.be(a.Zb),d.ae(a.column),b);if(null!==d&&d.ma===El&&d.Jd()===a)return So(a,De,b);if(c===mo){if(null!==d){if(d.ma===Lj&&d.Jd()===a)return So(a,De,b);c=d.Zd;return c===mo?So(a,Nj,b):So(a,c,b)}return So(a,Nj,b)}return So(a,c,b)} function Ro(a,b,c,d){var e=a.stretch;if(e!==mo)return So(a,e,d);var f=e=null;switch(b.stretch){case no:f=!0;break;case De:f=!0}switch(c.stretch){case oo:e=!0;break;case De:e=!0}b=a.O.Zd;null===e&&(e=b===oo||b===De);null===f&&(f=b===no||b===De);return!0===e&&!0===f?So(a,De,d):!0===e?So(a,oo,d):!0===f?So(a,no,d):So(a,Nj,d)} function So(a,b,c){if(c)return b;if(b===Nj)return Nj;c=a.Ba;if(c.H())return Nj;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===oo)return Nj;if(b===De)return no}else{if(b===no)return Nj;if(b===De)return oo}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===no)return Nj;if(b===De)return oo}else{if(b===oo)return Nj;if(b===De)return no}return b} w.defineProperty(G,{qq:"segmentOrientation"},function(){return this.Ym},function(a){var b=this.Ym;b!==a&&(this.Ym=a,this.I(),this.h("segmentOrientation",b,a),a===kj&&(this.angle=0))});w.defineProperty(G,{Me:"segmentIndex"},function(){return this.Rs},function(a){a=Math.round(a);var b=this.Rs;b!==a&&(this.Rs=a,this.I(),this.h("segmentIndex",b,a))}); w.defineProperty(G,{aB:"segmentFraction"},function(){return this.Wm},function(a){isNaN(a)?a=0:0>a?a=0:1a||1=a&&w.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.tb=a,this.Ii(),this.I(),this.h("scale",b,a))});w.defineProperty(G,{angle:"angle"},function(){return this.ig},function(a){var b=this.ig;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.ig=a,this.I(),this.Ii(),this.h("angle",b,a)))}); +w.defineProperty(G,{scale:"scale"},function(){return this.tb},function(a){var b=this.tb;b!==a&&(0>=a&&w.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.tb=a,this.Ii(),this.I(),this.h("scale",b,a))});w.defineProperty(G,{angle:"angle"},function(){return this.ig},function(a){var b=this.ig;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.ig=a,To(this),this.I(),this.Ii(),this.h("angle",b,a)))}); w.defineProperty(G,{Ba:"desiredSize"},function(){return this.Re},function(a){var b=a.width,c=a.height,d=this.Re,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.Re=a=a.S(),this.I(),this instanceof X&&this.Ke(),this.h("desiredSize",d,a),xo(this)&&(a=this.U,null!==a&&(yo(this,a,"width"),yo(this,a,"height"))))}); w.defineProperty(G,{width:"width"},function(){return this.Re.width},function(a){var b=this.Re.width;b===a||isNaN(b)&&isNaN(a)||(b=this.Re,this.Re=a=(new ha(a,this.Re.height)).freeze(),this.I(),this instanceof X&&this.Ke(),this.h("desiredSize",b,a),xo(this)&&(a=this.U,null!==a&&yo(this,a,"width")))}); w.defineProperty(G,{height:"height"},function(){return this.Re.height},function(a){var b=this.Re.height;b===a||isNaN(b)&&isNaN(a)||(b=this.Re,this.Re=a=(new ha(this.Re.width,a)).freeze(),this.I(),this instanceof X&&this.Ke(),this.h("desiredSize",b,a),xo(this)&&(a=this.U,null!==a&&yo(this,a,"height")))}); @@ -1051,29 +1051,29 @@ w.defineProperty(G,{alignment:"alignment"},function(){return this.ge},function(a w.defineProperty(G,{tH:"columnSpan"},function(){return this.xi},function(a){a=Math.round(a);var b=this.xi;b!==a&&(1>a&&w.Ea(a,">= 1",G,"columnSpan"),this.xi=a,this.I(),this.h("columnSpan",b,a))});w.defineProperty(G,{Zb:"row"},function(){return this.Ns},function(a){a=Math.round(a);var b=this.Ns;b!==a&&(0>a&&w.Ea(a,">= 0",G,"row"),this.Ns=a,this.I(),this.h("row",b,a))}); w.defineProperty(G,{rowSpan:"rowSpan"},function(){return this.aj},function(a){a=Math.round(a);var b=this.aj;b!==a&&(1>a&&w.Ea(a,">= 1",G,"rowSpan"),this.aj=a,this.I(),this.h("rowSpan",b,a))});w.defineProperty(G,{ky:"spanAllocation"},function(){return this.ct},function(a){var b=this.ct;b!==a&&(null!==a&&w.j(a,"function",G,"spanAllocation"),this.ct=a,this.I(),this.h("spanAllocation",b,a))}); w.defineProperty(G,{oh:"alignmentFocus"},function(){return this.nm},function(a){var b=this.nm;b.L(a)||(!a.Od()||a.Vc()||a.L(tb)&&this instanceof T||w.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.nm=a=a.S(),this.I(),this.h("alignmentFocus",b,a))}); -w.defineProperty(G,{Qd:"portId"},function(){return this.As},function(a){var b=this.As;if(b!==a){var c=this.U;null===c||c instanceof T||(w.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Vo(c,this);this.As=a;if(null!==a&&c){c.Dk=!0;null===c.le&&Wo(c);var d=this.Qd;null!==d&&c.le.add(d,this)}this.h("portId",b,a)}});function Xo(a){var b=a.U;if(b instanceof T&&(null!==a.Qd||a===b.port)){var c=b.g;null===c||c.oa.gb||Go(b,a)}} -function To(a){var b=a.g;null===b||b.oa.gb||(a instanceof C?a instanceof T?a.Uf():Yo(a,a,function(a){Xo(a)}):Xo(a))}w.defineProperty(G,{Bb:"toSpot"},function(){return null!==this.V?this.V.pk:tb},function(a){this.Ld();var b=this.V.pk;b.L(a)||(a=a.S(),this.V.pk=a,this.h("toSpot",b,a),Xo(this))}); -w.defineProperty(G,{jm:"toEndSegmentLength"},function(){return null!==this.V?this.V.nk:10},function(a){this.Ld();var b=this.V.nk;b!==a&&(0>a&&w.Ea(a,">= 0",G,"toEndSegmentLength"),this.V.nk=a,this.h("toEndSegmentLength",b,a),Xo(this))});w.defineProperty(G,{Lu:"toEndSegmentDirection"},function(){return null!==this.V?this.V.mk:vo},function(a){this.Ld();var b=this.V.mk;b!==a&&(w.Ft("GraphObject.toEndSegmentDirection","2.0"),this.V.mk=a,this.h("toEndSegmentDirection",b,a),Xo(this))}); -w.defineProperty(G,{Mu:"toShortLength"},function(){return null!==this.V?this.V.ok:0},function(a){this.Ld();var b=this.V.ok;b!==a&&(this.V.ok=a,this.h("toShortLength",b,a),Xo(this))});w.defineProperty(G,{pG:"toLinkable"},function(){return null!==this.V?this.V.kt:null},function(a){this.Ld();var b=this.V.kt;b!==a&&(this.V.kt=a,this.h("toLinkable",b,a))}); -w.defineProperty(G,{NJ:"toMaxLinks"},function(){return null!==this.V?this.V.lt:Infinity},function(a){this.Ld();var b=this.V.lt;b!==a&&(0>a&&w.Ea(a,">= 0",G,"toMaxLinks"),this.V.lt=a,this.h("toMaxLinks",b,a))});w.defineProperty(G,{Ab:"fromSpot"},function(){return null!==this.V?this.V.Sj:tb},function(a){this.Ld();var b=this.V.Sj;b.L(a)||(a=a.S(),this.V.Sj=a,this.h("fromSpot",b,a),Xo(this))}); -w.defineProperty(G,{Sl:"fromEndSegmentLength"},function(){return null!==this.V?this.V.Qj:10},function(a){this.Ld();var b=this.V.Qj;b!==a&&(0>a&&w.Ea(a,">= 0",G,"fromEndSegmentLength"),this.V.Qj=a,this.h("fromEndSegmentLength",b,a),Xo(this))});w.defineProperty(G,{Rt:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.Pj:vo},function(a){this.Ld();var b=this.V.Pj;b!==a&&(w.Ft("GraphObject.fromEndSegmentDirection","2.0"),this.V.Pj=a,this.h("fromEndSegmentDirection",b,a),Xo(this))}); -w.defineProperty(G,{St:"fromShortLength"},function(){return null!==this.V?this.V.Rj:0},function(a){this.Ld();var b=this.V.Rj;b!==a&&(this.V.Rj=a,this.h("fromShortLength",b,a),Xo(this))});w.defineProperty(G,{PE:"fromLinkable"},function(){return null!==this.V?this.V.ur:null},function(a){this.Ld();var b=this.V.ur;b!==a&&(this.V.ur=a,this.h("fromLinkable",b,a))}); +w.defineProperty(G,{Qd:"portId"},function(){return this.As},function(a){var b=this.As;if(b!==a){var c=this.U;null===c||c instanceof T||(w.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Vo(c,this);this.As=a;if(null!==a&&c){c.Ck=!0;null===c.le&&Wo(c);var d=this.Qd;null!==d&&c.le.add(d,this)}this.h("portId",b,a)}});function Xo(a){var b=a.U;if(b instanceof T&&(null!==a.Qd||a===b.port)){var c=b.g;null===c||c.oa.gb||Go(b,a)}} +function To(a){var b=a.g;null===b||b.oa.gb||(a instanceof C?a instanceof T?a.Uf():Yo(a,a,function(a){Xo(a)}):Xo(a))}w.defineProperty(G,{Bb:"toSpot"},function(){return null!==this.V?this.V.ok:tb},function(a){this.Ld();var b=this.V.ok;b.L(a)||(a=a.S(),this.V.ok=a,this.h("toSpot",b,a),Xo(this))}); +w.defineProperty(G,{jm:"toEndSegmentLength"},function(){return null!==this.V?this.V.mk:10},function(a){this.Ld();var b=this.V.mk;b!==a&&(0>a&&w.Ea(a,">= 0",G,"toEndSegmentLength"),this.V.mk=a,this.h("toEndSegmentLength",b,a),Xo(this))});w.defineProperty(G,{Lu:"toEndSegmentDirection"},function(){return null!==this.V?this.V.lk:vo},function(a){this.Ld();var b=this.V.lk;b!==a&&(w.Ft("GraphObject.toEndSegmentDirection","2.0"),this.V.lk=a,this.h("toEndSegmentDirection",b,a),Xo(this))}); +w.defineProperty(G,{Mu:"toShortLength"},function(){return null!==this.V?this.V.nk:0},function(a){this.Ld();var b=this.V.nk;b!==a&&(this.V.nk=a,this.h("toShortLength",b,a),Xo(this))});w.defineProperty(G,{pG:"toLinkable"},function(){return null!==this.V?this.V.kt:null},function(a){this.Ld();var b=this.V.kt;b!==a&&(this.V.kt=a,this.h("toLinkable",b,a))}); +w.defineProperty(G,{OJ:"toMaxLinks"},function(){return null!==this.V?this.V.lt:Infinity},function(a){this.Ld();var b=this.V.lt;b!==a&&(0>a&&w.Ea(a,">= 0",G,"toMaxLinks"),this.V.lt=a,this.h("toMaxLinks",b,a))});w.defineProperty(G,{Ab:"fromSpot"},function(){return null!==this.V?this.V.Rj:tb},function(a){this.Ld();var b=this.V.Rj;b.L(a)||(a=a.S(),this.V.Rj=a,this.h("fromSpot",b,a),Xo(this))}); +w.defineProperty(G,{Rl:"fromEndSegmentLength"},function(){return null!==this.V?this.V.Pj:10},function(a){this.Ld();var b=this.V.Pj;b!==a&&(0>a&&w.Ea(a,">= 0",G,"fromEndSegmentLength"),this.V.Pj=a,this.h("fromEndSegmentLength",b,a),Xo(this))});w.defineProperty(G,{Rt:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.Oj:vo},function(a){this.Ld();var b=this.V.Oj;b!==a&&(w.Ft("GraphObject.fromEndSegmentDirection","2.0"),this.V.Oj=a,this.h("fromEndSegmentDirection",b,a),Xo(this))}); +w.defineProperty(G,{St:"fromShortLength"},function(){return null!==this.V?this.V.Qj:0},function(a){this.Ld();var b=this.V.Qj;b!==a&&(this.V.Qj=a,this.h("fromShortLength",b,a),Xo(this))});w.defineProperty(G,{PE:"fromLinkable"},function(){return null!==this.V?this.V.ur:null},function(a){this.Ld();var b=this.V.ur;b!==a&&(this.V.ur=a,this.h("fromLinkable",b,a))}); w.defineProperty(G,{lA:"fromMaxLinks"},function(){return null!==this.V?this.V.vr:Infinity},function(a){this.Ld();var b=this.V.vr;b!==a&&(0>a&&w.Ea(a,">= 0",G,"fromMaxLinks"),this.V.vr=a,this.h("fromMaxLinks",b,a))});w.defineProperty(G,{cursor:"cursor"},function(){return this.br},function(a){var b=this.br;b!==a&&(w.j(a,"string",G,"cursor"),this.br=a,this.h("cursor",b,a))}); w.defineProperty(G,{click:"click"},function(){return null!==this.ha?this.ha.wi:null},function(a){so(this);var b=this.ha.wi;b!==a&&(null!==a&&w.j(a,"function",G,"click"),this.ha.wi=a,this.h("click",b,a))});w.defineProperty(G,{Gt:"doubleClick"},function(){return null!==this.ha?this.ha.Ei:null},function(a){so(this);var b=this.ha.Ei;b!==a&&(null!==a&&w.j(a,"function",G,"doubleClick"),this.ha.Ei=a,this.h("doubleClick",b,a))}); w.defineProperty(G,{Xz:"contextClick"},function(){return null!==this.ha?this.ha.yi:null},function(a){so(this);var b=this.ha.yi;b!==a&&(null!==a&&w.j(a,"function",G,"contextClick"),this.ha.yi=a,this.h("contextClick",b,a))});w.defineProperty(G,{nu:"mouseEnter"},function(){return null!==this.ha?this.ha.ks:null},function(a){so(this);var b=this.ha.ks;b!==a&&(null!==a&&w.j(a,"function",G,"mouseEnter"),this.ha.ks=a,this.h("mouseEnter",b,a))}); w.defineProperty(G,{ou:"mouseLeave"},function(){return null!==this.ha?this.ha.ls:null},function(a){so(this);var b=this.ha.ls;b!==a&&(null!==a&&w.j(a,"function",G,"mouseLeave"),this.ha.ls=a,this.h("mouseLeave",b,a))});w.defineProperty(G,{NA:"mouseOver"},function(){return null!==this.ha?this.ha.Vi:null},function(a){so(this);var b=this.ha.Vi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseOver"),this.ha.Vi=a,this.h("mouseOver",b,a))}); w.defineProperty(G,{MA:"mouseHover"},function(){return null!==this.ha?this.ha.Ui:null},function(a){so(this);var b=this.ha.Ui;b!==a&&(null!==a&&w.j(a,"function",G,"mouseHover"),this.ha.Ui=a,this.h("mouseHover",b,a))});w.defineProperty(G,{LA:"mouseHold"},function(){return null!==this.ha?this.ha.Ti:null},function(a){so(this);var b=this.ha.Ti;b!==a&&(null!==a&&w.j(a,"function",G,"mouseHold"),this.ha.Ti=a,this.h("mouseHold",b,a))}); -w.defineProperty(G,{WI:"mouseDragEnter"},function(){return null!==this.ha?this.ha.hs:null},function(a){so(this);var b=this.ha.hs;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDragEnter"),this.ha.hs=a,this.h("mouseDragEnter",b,a))});w.defineProperty(G,{XI:"mouseDragLeave"},function(){return null!==this.ha?this.ha.js:null},function(a){so(this);var b=this.ha.js;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDragLeave"),this.ha.js=a,this.h("mouseDragLeave",b,a))}); +w.defineProperty(G,{XI:"mouseDragEnter"},function(){return null!==this.ha?this.ha.hs:null},function(a){so(this);var b=this.ha.hs;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDragEnter"),this.ha.hs=a,this.h("mouseDragEnter",b,a))});w.defineProperty(G,{YI:"mouseDragLeave"},function(){return null!==this.ha?this.ha.js:null},function(a){so(this);var b=this.ha.js;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDragLeave"),this.ha.js=a,this.h("mouseDragLeave",b,a))}); w.defineProperty(G,{KA:"mouseDrop"},function(){return null!==this.ha?this.ha.Si:null},function(a){so(this);var b=this.ha.Si;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDrop"),this.ha.Si=a,this.h("mouseDrop",b,a))});w.defineProperty(G,{bE:"actionDown"},function(){return null!==this.ha?this.ha.Bq:null},function(a){so(this);var b=this.ha.Bq;b!==a&&(null!==a&&w.j(a,"function",G,"actionDown"),this.ha.Bq=a,this.h("actionDown",b,a))}); w.defineProperty(G,{cE:"actionMove"},function(){return null!==this.ha?this.ha.Cq:null},function(a){so(this);var b=this.ha.Cq;b!==a&&(null!==a&&w.j(a,"function",G,"actionMove"),this.ha.Cq=a,this.h("actionMove",b,a))});w.defineProperty(G,{dE:"actionUp"},function(){return null!==this.ha?this.ha.Dq:null},function(a){so(this);var b=this.ha.Dq;b!==a&&(null!==a&&w.j(a,"function",G,"actionUp"),this.ha.Dq=a,this.h("actionUp",b,a))}); w.defineProperty(G,{aE:"actionCancel"},function(){return null!==this.ha?this.ha.Aq:null},function(a){so(this);var b=this.ha.Aq;b!==a&&(null!==a&&w.j(a,"function",G,"actionCancel"),this.ha.Aq=a,this.h("actionCancel",b,a))});w.defineProperty(G,{rB:"toolTip"},function(){return null!==this.ha?this.ha.dj:null},function(a){so(this);var b=this.ha.dj;b!==a&&(this.ha.dj=a,this.h("toolTip",b,a))}); -w.defineProperty(G,{contextMenu:"contextMenu"},function(){return null!==this.ha?this.ha.zi:null},function(a){so(this);var b=this.ha.zi;b!==a&&(this.ha.zi=a,this.h("contextMenu",b,a))});G.prototype.bind=G.prototype.bind=function(a){a.Dg=this;var b=this.Ql();null!==b&&Zo(b)&&w.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.tc&&(this.tc=new I(Zg));this.tc.add(a)}; -G.prototype.findTemplateBinder=G.prototype.Ql=function(){for(var a=this instanceof C?this:this.O;null!==a;){if(null!==a.Yk)return a;a=a.O}return null};G.prototype.setProperties=function(a){w.Fu(this,a)};var $o; -G.make=$o=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var f=ap.ja(a);"function"===typeof f?(c=w.Il(arguments),d=f(c),w.Qa(d)||w.k('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):e=da[a]}null===d&&(void 0!==e&&null!==e&&e.constructor||w.k("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),d=new e);f=1;if(d instanceof D&&1e)&&w.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.ve=!0, a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&w.k("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.ve=!1,a.index=e);e=new sa;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);w.Fu(a,e)}else w.Fu(a,b);else w.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var ap=new ka("string","function"); G.getBuilders=function(){var a=new ka("string","function"),b;for(b in ap)if(b!==b.toLowerCase()){var c=ap.ja(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};var cp;G.defineBuilder=cp=function(a,b){w.j(a,"string",G,"defineBuilder:name");w.j(b,"function",G,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||w.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);ap.add(a,b)};var dp; @@ -1084,278 +1084,278 @@ cp("TreeExpanderButton",function(){var a=$o("Button",{_treeExpandedFigure:"Minus a.Ac=!0;d.gd?e.collapseTree(d):e.expandTree(d)}}};return a}); cp("SubGraphExpanderButton",function(){var a=$o("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},$o(X,{name:"ButtonIcon",Cb:"MinusLine",Ba:yd},(new Zg("figure","isSubGraphExpanded",function(a,c){var d=c.O;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).Mx()));a.click=function(a,c){var d=c.U;d instanceof hh&&(d=d.Of);if(d instanceof U){var e=d.g;if(null!==e){e=e.ob;if(d.we){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.Ac= !0;d.we?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});cp("ContextMenuButton",function(){var a=$o("Button");a.stretch=oo;var b=a.ud("ButtonBorder");b instanceof X&&(b.Cb="Rectangle",b.A=new L(0,0,2,3),b.B=new L(1,1,-2,-2));return a}); -cp("PanelExpanderButton",function(a){var b=dp(a,"COLLAPSIBLE"),c=$o("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},$o(X,"TriangleUp",{name:"ButtonIcon",Ba:new ha(6,4)},(new Zg("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Mx(b)));a=c.ud("ButtonBorder");a instanceof X&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var f=c.g;if(null!==f&&!f.eb){var h=c.Ql();null===h&&(h=c.U);null!==h&&(h=h.ud(b),null!==h&& +cp("PanelExpanderButton",function(a){var b=dp(a,"COLLAPSIBLE"),c=$o("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},$o(X,"TriangleUp",{name:"ButtonIcon",Ba:new ha(6,4)},(new Zg("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Mx(b)));a=c.ud("ButtonBorder");a instanceof X&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var f=c.g;if(null!==f&&!f.eb){var h=c.Pl();null===h&&(h=c.U);null!==h&&(h=h.ud(b),null!==h&& (f.Ub("Collapse/Expand Panel"),h.visible=!h.visible,f.Gd("Collapse/Expand Panel")))}};return c}); -cp("CheckBoxButton",function(a){var b=dp(a);a=$o("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},$o(X,{name:"ButtonIcon",VH:"M0 4 L3 9 9 0",kb:2,stretch:De,mA:Pj,visible:!1},""!==b?(new Zg("visible",b)).KI():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.eb||""!==b&&e.ba.eb)){a.Ac=!0;var f=d.ud("ButtonIcon");e.Ub("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.Gd("checkbox")}};return a}); +cp("CheckBoxButton",function(a){var b=dp(a);a=$o("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},$o(X,{name:"ButtonIcon",VH:"M0 4 L3 9 9 0",kb:2,stretch:De,mA:Pj,visible:!1},""!==b?(new Zg("visible",b)).LI():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.eb||""!==b&&e.ba.eb)){a.Ac=!0;var f=d.ud("ButtonIcon");e.Ub("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.Gd("checkbox")}};return a}); cp("CheckBox",function(a){a=dp(a);a=$o("CheckBoxButton",a,{name:"Button",margin:new db(0,1,0,0)});var b=$o(C,"Horizontal",a,{ux:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,nu:a.nu,ou:a.ou,click:a.click,_buttonClick:a.click});a.nu=null;a.ou=null;a.click=null;return b}); function to(){this.rr=this.zi=this.dj=this.Aq=this.Dq=this.Cq=this.Bq=this.Si=this.js=this.hs=this.Ti=this.Ui=this.Vi=this.ls=this.ks=this.yi=this.Ei=this.wi=null}to.prototype.copy=function(){var a=new to;a.wi=this.wi;a.Ei=this.Ei;a.yi=this.yi;a.ks=this.ks;a.ls=this.ls;a.Vi=this.Vi;a.Ui=this.Ui;a.Ti=this.Ti;a.hs=this.hs;a.js=this.js;a.Si=this.Si;a.Bq=this.Bq;a.Cq=this.Cq;a.Dq=this.Dq;a.Aq=this.Aq;a.dj=this.dj;a.zi=this.zi;a.rr=this.rr;return a}; -function C(a){G.call(this);void 0===a?this.ma=Sj:(w.mb(a,C,C,"type"),this.ma=a);this.xa=new I(G);this.ff=fd;this.ma===Hl&&(this.Gn=!0);this.fr=rc;this.Ci=mo;this.ma===Qo&&ep(this);this.Dp=Pj;this.Dr=Ad;this.Er=dd;this.Ar=0;this.zr=100;this.Cr=10;this.Br=0;this.Yk=this.Vd=this.Tj=this.xm=this.zm=null;this.Qr=NaN;this.ug=this.$j=null;this.Vo="category";this.tg=null;this.fj=new A(NaN,NaN,NaN,NaN);this.lk=this.Os=this.dn=null;this.Ij=""}w.La(C,G);w.ji(C);w.fa("Panel",C); -function ep(a){a.Mj=fd;a.Mh=1;a.Bi=null;a.um=null;a.Lh=1;a.Kh=null;a.tm=null;a.Yd=[];a.Td=[];a.Vm=fp;a.sm=fp;a.ej=0;a.Ni=0} -C.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.ma=this.ma;a.ff=this.ff.S();a.fr=this.fr.S();a.Ci=this.Ci;if(a.ma===Qo){a.Mj=this.Mj.S();a.Mh=this.Mh;a.Bi=this.Bi;a.um=this.um;a.Lh=this.Lh;a.Kh=this.Kh;a.tm=this.tm;var b=[];if(0a&&w.Ea(a,">= 0",C,"padding"),a=new db(a)):(w.G(a,db,C,"padding"),0>a.left&&w.Ea(a.left,">= 0",C,"padding:value.left"),0>a.right&&w.Ea(a.right,">= 0",C,"padding:value.right"),0>a.top&&w.Ea(a.top,">= 0",C,"padding:value.top"),0>a.bottom&&w.Ea(a.bottom,">= 0",C,"padding:value.bottom"));var b=this.ff;b.L(a)||(this.ff=a=a.S(),this.I(),this.h("padding",b,a))}); -w.defineProperty(C,{Ml:"defaultAlignment"},function(){return this.fr},function(a){var b=this.fr;b.L(a)||(this.fr=a=a.S(),this.I(),this.h("defaultAlignment",b,a))});w.defineProperty(C,{Zd:"defaultStretch"},function(){return this.Ci},function(a){var b=this.Ci;b!==a&&(w.mb(a,G,C,"defaultStretch"),this.Ci=a,this.I(),this.h("defaultStretch",b,a))}); -w.defineProperty(C,{LK:"defaultSeparatorPadding"},function(){return void 0===this.Mj?fd:this.Mj},function(a){if(void 0!==this.Mj){"number"===typeof a&&(a=new db(a));var b=this.Mj;b.L(a)||(this.Mj=a=a.S(),this.I(),this.h("defaultSeparatorPadding",b,a))}}); -w.defineProperty(C,{JK:"defaultRowSeparatorStroke"},function(){return void 0===this.Bi?null:this.Bi},function(a){var b=this.Bi;b!==a&&(null===a||"string"===typeof a||a instanceof ga)&&(a instanceof ga&&a.freeze(),this.Bi=a,this.na(),this.h("defaultRowSeparatorStroke",b,a))}); -w.defineProperty(C,{KK:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.Mh?1:this.Mh},function(a){if(void 0!==this.Mh){var b=this.Mh;b!==a&&isFinite(a)&&0<=a&&(this.Mh=a,this.I(),this.h("defaultRowSeparatorStrokeWidth",b,a))}}); -w.defineProperty(C,{IK:"defaultRowSeparatorDashArray"},function(){return void 0===this.um?null:this.um},function(a){if(void 0!==this.um){var b=this.um;if(b!==a){null===a||Array.isArray(a)||w.yd(a,"Array",C,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.sx,e=d.width,d=d.height,f=this.Ia,h=f.width,f=f.height,k=Math.ceil(h/e),l=Math.ceil(f/d),m=this.YE;a.save();a.beginPath();a.rect(0,0,h,f);a.clip();for(var n=[],p=this.xa.n,q=p.length,r=0;r +g.xk=function(a,b){if(this.ma===Hl){var c=this.oj()*b.scale;0>=c&&(c=1);var d=this.sx,e=d.width,d=d.height,f=this.Ia,h=f.width,f=f.height,k=Math.ceil(h/e),l=Math.ceil(f/d),m=this.YE;a.save();a.beginPath();a.rect(0,0,h,f);a.clip();for(var n=[],p=this.xa.n,q=p.length,r=0;r e*u*c))){var s=n[r],t=!1,B=!0,y=v.mG;null!==y&&(t=!0,B=a.gA(y,v.tf));if("LineV"===v.Cb){a.lineWidth=v.kb;Lo(this,a,v.stroke,!1,!1);a.beginPath();for(var H=x=Math.floor(-m.x/e);H<=x+k;H++){var E=H*e+m.x;0<=E&&E=e&&(e=1);d=c.W;h=this.xa.n;f=this.zm;k=h.length;for(l=0;lthis.qA*q.interval*c.hf.ox/this.Ut*e))for(r=q.za,u=q.kb*q.scale,s=q.oh,s.Od()&&(s=yb),p=0;p=e&&(e=1);d=c.W;h=this.xa.n;f=this.zm;k=h.length;for(l=0;lthis.qA*q.interval*c.hf.ox/this.Ut*e))for(r=q.za,u=q.kb*q.scale,s=q.oh,s.Od()&&(s=yb),p=0;pf.height)continue}else if(l.position>f.width)continue;var m=l.sq;isNaN(m)&&(m=c?a.Mh:a.Lh);var n=l.rq;null===n&&(n=c?a.Bi:a.Kh);0!==m&&null!==n&&(Lo(a,b,n,!1,!1),b.beginPath(),n=l.position+m,c?n>f.height&&(m-=n-f.height):n>f.width&&(m-=n-f.width),l=l.position+m/2,b.lineWidth=m,n=a.padding,c?(l+=n.top,m=n.left,n=f.width-n.right,b.moveTo(m,l),b.lineTo(n,l)):(l+= n.left,m=n.top,n=f.height-n.bottom,b.moveTo(l,m),b.lineTo(l,n)),b.stroke())}}} function jp(a,b,c,d,e){for(var f=d.length,h=a.W,k=0;km)){var n=l.Xe(),p=l.sq;isNaN(p)&&(p=c?a.Mh:a.Lh);var q=l.rq;null===q&&(q=c?a.Bi:a.Kh);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Ja;p+n>m&&(n=m-p);0>=n||(m=a.padding,Lo(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}} function hp(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dm&&e.set(s),w.v(s));w.v(n);f&&e.transform(h)}return c}; -g.I=function(a){G.prototype.I.call(this,a);if(this.ma===El||this.ma===hj)a=this.Jd(),null!==a&&a.I(!0);a=this.xa.n;for(var b=a.length,c=0;cm&&e.set(s),w.v(s));w.v(n);f&&e.transform(h)}return c}; +g.I=function(a){G.prototype.I.call(this,a);if(this.ma===El||this.ma===hj)a=this.Jd(),null!==a&&a.I(!0);a=this.xa.n;for(var b=a.length,c=0;cId&&(ad=Math.max(Id-lc,0));var fg=0===Z.Ja;Z.Ja+=ad;Id=Math.max(Id-(ad+(fg?lc:0)),0)}1!==aa.xi||kc!==Nj&&kc!==no||(Z=this.ae(ic),lc=Z.Xe(),ad=Math.max(bf-Z.Ja,0),ad+lc>$c&&(ad=Math.max($c-lc,0)),fg=0===Z.Ja,Z.Ja+=ad,$c=Math.max($c-(ad+(fg?lc:0)),0));li&&aa.aq()}}}w.wa(Ye);for(var Ec=0,wb=0,Eb=this.Kp,ma=0;maId&&(ad=Math.max(Id-lc,0));var fg=0===Z.Ja;Z.Ja+=ad;Id=Math.max(Id-(ad+(fg?lc:0)),0)}1!==aa.xi||kc!==Nj&&kc!==no||(Z=this.ae(ic),lc=Z.Xe(),ad=Math.max(bf-Z.Ja,0),ad+lc>$c&&(ad=Math.max($c-lc,0)),fg=0===Z.Ja,Z.Ja+=ad,$c=Math.max($c-(ad+(fg?lc:0)),0));li&&aa.$p()}}}w.wa(Ye);for(var Ec=0,wb=0,Eb=this.Jp,ma=0;ma=this.pq);Za++)Z=this.be(aa.Zb+Za),Jd.height+=Math.max(Z.zj,isNaN(Z.gf)?Z.nf:Math.min(Z.gf,Z.nf));for(Za=1;Za=this.Kp);Za++)Z=this.ae(aa.column+Za),Jd.width+=Math.max(Z.zj,isNaN(Z.gf)?Z.nf:Math.min(Z.gf,Z.nf));kb.width+=Jd.width;kb.height+= +Hf*sj:null!==se[aa.Zb]?Id:qb.Ja||Id,Fc=Math.max(0,Fc-qb.Xe()));kb.m(Math.max(rb.yj,Math.min(Sb,rb.nf)),Math.max(qb.yj,Math.min(Fc,qb.nf)));kc=Ro(aa,qb,rb,!1);switch(kc){case oo:kb.height=Math.max(kb.height,qb.Ja+Id);break;case no:kb.width=Math.max(kb.width,rb.Ja+$c)}wc=aa.margin;Ff=wc.right+wc.left;eg=wc.top+wc.bottom;aa.$p();wk(aa,kb.width,kb.height,rb.yj,qb.yj);Gf=aa.za;bf=Math.max(Gf.width+Ff,0);cf=Math.max(Gf.height+eg,0);isFinite($c)&&(bf=Math.min(bf,kb.width));isFinite(Id)&&(cf=Math.min(cf, +kb.height));var df=0,df=qb.Ja;qb.Ja=Math.max(qb.Ja,cf);ad=qb.Ja-df;Id=Math.max(Id-ad,0);df=rb.Ja;rb.Ja=Math.max(rb.Ja,bf);ad=rb.Ja-df;$c=Math.max($c-ad,0)}w.wa(Ze);for(var Jd=w.im(),Eb=Le.length,ma=0;ma=this.pq);Za++)Z=this.be(aa.Zb+Za),Jd.height+=Math.max(Z.yj,isNaN(Z.gf)?Z.nf:Math.min(Z.gf,Z.nf));for(Za=1;Za=this.Jp);Za++)Z=this.ae(aa.column+Za),Jd.width+=Math.max(Z.yj,isNaN(Z.gf)?Z.nf:Math.min(Z.gf,Z.nf));kb.width+=Jd.width;kb.height+= Jd.height;wc=aa.margin;Ff=wc.right+wc.left;eg=wc.top+wc.bottom;wk(aa,kb.width,kb.height,qj,rj);for(var Gf=aa.za,bf=Math.max(Gf.width+Ff,0),cf=Math.max(Gf.height+eg,0),yh=0,Za=0;Za=this.pq);Za++)Z=this.be(aa.Zb+Za),yh+=Z.total||0;if(yh=jd)&&!(aa.Zb+Za>=this.pq);Za++){var Z=this.be(aa.Zb+Za),mc=Z.Sa||0,ef=tj(aa,Z,gg);Z.Ja=Math.min(Z.nf,mc+ef);Z.Sa!==mc&&(jd-=Z.Sa-mc)}for(;0mc&&(Z.Ja=Math.min(Z.nf,mc+jd),Z.Sa!==mc&&(jd-=Z.Sa-mc));if(0===Z.index)break;Z=this.be(Z.index-1)}}for(var Ig=0,Za=0;Za=this.Kp);Za++)Z=this.ae(aa.column+Za),Ig+=Z.total||0;if(Ig=jd)&&!(aa.column+Za>=this.Kp);Za++)Z=this.ae(aa.column+Za),mc=Z.Sa||0,ef=tj(aa,Z,gg),Z.Ja=Math.min(Z.nf,mc+ef),Z.Sa!==mc&&(jd-=Z.Sa-mc);for(;0mc&&(Z.Ja=Math.min(Z.nf,mc+jd),Z.Sa!==mc&& -(jd-=Z.Sa-mc));if(0===Z.index)break;Z=this.ae(Z.index-1)}}}w.wa(Le);w.Ak(Jd);w.Ak(kb);for(var hg=0,te=0,kc=Co(this,!0),ni=this.Ba,Lk=this.Bf,If=wb=Ec=0,ff=0,Eb=this.Kp,ma=0;mamc&&(Z.Ja=Math.min(Z.nf,mc+jd),Z.Sa!==mc&&(jd-=Z.Sa-mc));if(0===Z.index)break;Z=this.be(Z.index-1)}}for(var Ig=0,Za=0;Za=this.Jp);Za++)Z=this.ae(aa.column+Za),Ig+=Z.total||0;if(Ig=jd)&&!(aa.column+Za>=this.Jp);Za++)Z=this.ae(aa.column+Za),mc=Z.Sa||0,ef=tj(aa,Z,gg),Z.Ja=Math.min(Z.nf,mc+ef),Z.Sa!==mc&&(jd-=Z.Sa-mc);for(;0mc&&(Z.Ja=Math.min(Z.nf,mc+jd),Z.Sa!==mc&& +(jd-=Z.Sa-mc));if(0===Z.index)break;Z=this.ae(Z.index-1)}}}w.wa(Le);w.zk(Jd);w.zk(kb);for(var hg=0,te=0,kc=Co(this,!0),ni=this.Ba,Kk=this.Bf,If=wb=Ec=0,ff=0,Eb=this.Jp,ma=0;maqi)wk(Yb,Infinity,Infinity),ue=Yb.za,hf.Gh(ue),this.$g.add(ue);else{var vd=Yb.Me,rt=Yb.aB,np=Yb.oh;np.Od()&&(np=Gb);var ig=Yb.qq,cw=Yb.bB,Qk=0,Rk=0, -om=0;if(vd<-qi||vd>=qi){var st=Ok.zF,Jf=Ok.yF;ig!==kj&&(om=Ok.computeAngle(Yb,ig,Jf),Yb.ig=om);Qk=st.x-Kg.x;Rk=st.y-Kg.y}else{var Ld,jf;if(0<=vd)Ld=Bh.da(vd),jf=vdut+10?0<=vd?si.Rb(Ld):Ld.Rb(si):ut>tt+10?0<=vd?jf.Rb(ti):ti.Rb(jf):0<=vd?si.Rb(ti):ti.Rb(si)}else Jf= -0<=vd?Ld.Rb(jf):jf.Rb(Ld);ig!==kj&&(om=Ok.computeAngle(Yb,ig,Jf),Yb.ig=om);Qk=Ld.x+(jf.x-Ld.x)*rt-Kg.x;Rk=Ld.y+(jf.y-Ld.y)*rt-Kg.y}wk(Yb,Infinity,Infinity);var ue=Yb.za,mm=Yb.Ia,Sk=0;Yb instanceof X&&(Sk=Yb.kb);var ui=mm.width+Sk,uj=mm.height+Sk;Lg.reset();Lg.translate(-ue.x,-ue.y);Lg.scale(Yb.scale,Yb.scale);Lg.rotate(ig===kj?Yb.angle:Jf,ui/2,uj/2);ig!==Pp&&ig!==Qp||Lg.rotate(90,ui/2,uj/2);ig!==Rp&&ig!==Sp||Lg.rotate(-90,ui/2,uj/2);ig===Tp&&(45Jf||225Jf)&&Lg.rotate(-Jf,ui/2,uj/ -2);var zj=new A(0,0,ui,uj);Pk.Xn(zj,np);Lg.nb(Pk);var dw=-Pk.x+Sk/2,ew=-Pk.y+Sk/2;Mg.assign(cw);isNaN(Mg.x)&&(Mg.x=0<=vd?ui/2+3:-(ui/2+3));isNaN(Mg.y)&&(Mg.y=-(uj/2+3));Mg.rotate(Jf);Qk+=Mg.x;Rk+=Mg.y;zj.set(ue);zj.x=Qk+dw;zj.y=Rk+ew;this.$g.add(zj);hf.Gh(zj)}}if(this instanceof W)for(var vt=this.Wf;vt.next();)wk(vt.value,Infinity,Infinity);this.fj=hf;var op=this.Ri;op.m(op.x+hf.x,op.y+hf.y);Pa(e,hf.width||0,hf.height||0);w.ue(Lg);w.v(Pk);w.v(Mg)}}}break;case "Grid":break;case "Graduated":var fw= -a,gw=b,hw=c,iw=d,Ng=this.Jd();this.xm=[];var Aj=Ng.margin,jw=Aj.right+Aj.left,kw=Aj.top+Aj.bottom;wk(Ng,fw,gw,hw,iw);var wt=Ng.za,lw=wt.height,mw=Math.max(wt.width+jw,0),nw=Math.max(lw+kw,0),xt=new A(-Aj.left,-Aj.top,mw,nw);this.xm.push(xt);e.assign(xt);for(var Uk=Ng.hf,yt=Ng.kb,pp=Uk.jA,Bj=Uk.nx,vi=Uk.ox,ow=pp.length,qp=0,rp=0,Cj=w.lb(),sp=0;sp -wd&&(wd+=360);zt.push(wd)}qp=At;rp=Bt}Cj.push(zt)}var Ct;if(null===this.Tj){for(var Dt=[],up=this.xa.n,Et=up.length,vp=0;vpqw&&Ft.push(Gt)}}}this.Tj=Dt}Ct=this.Tj;var Ht=this.xa.n,rw=Ht.length,Ch=0,It=0,Jt=vi;this.zm=[];for(var pm=[],qm=0;qmLt*Kt*vi/this.Ut)){var be=this.XE,Mt=Ct[qm],wi=Bj[0][0],Kf=0,xd=0,It=vi*Dh.WE-1E-4,Jt=vi*Dh.UE+1E-4,Ej=Lt*Kt;if(bethis.Ck+Ej&&(xi=Math.floor((be-this.Ck)/Ej),be-=xi*Ej);for(;be<=this.pA;){var xp;a:{for(var sw=Mt.length,yp=0;ypvi&&(Ch=vi),It<=Ch&& -Ch<=Jt)){for(var wd=Cj[Kf][xd],Fj=Bj[Kf][xd];Kfwi&&xdrm?0wm;wm++){switch(wm){case 0:ce.m(tm,um);break;case 1:ce.m(tm+Dp,um);break;case 2:ce.m(tm,um+Ep);break;case 3:ce.m(tm+Dp,um+Ep)}ce.rotate(Ut+Eh.angle);ce.offset(St,Tt);0===vm&&0===wm?zi.m(ce.x,ce.y,0,0):zi.ri(ce);ce.offset(-St,-Tt);ce.rotate(-Ut- -Eh.angle)}w.v(ce);this.xm.push(zi);ab(vw,zi.x,zi.y,zi.width,zi.height)}else if(yi instanceof Hh){var Xk=yi,Vt=Bp,yw=e;null===this.lk&&(this.lk=new Hh);var Lf=this.lk;ip(Xk,Lf);var Gp=Xk.oh;Gp.Od()&&(Gp=yb);for(var Fh=Xk.qq,zw=Xk.bB,Ai=null,xm=0,ym=0,Og=0,Hp=0,Aw=Vt.length,zm=0;zmOg||225Og)&&Pg.rotate(-Og,Ij/2,Jj/2);var Wt=w.hg(0,0,Ij,Jj),Yk=w.K();Yk.Xn(Wt,Gp);Pg.nb(Yk);var Bw=-Yk.x,Cw=-Yk.y,Qg=w.K();Qg.assign(zw);isNaN(Qg.x)&&(Qg.x=Ij/2+3);isNaN(Qg.y)&&(Qg.y=-(Jj/2+3));Qg.rotate(Og);var xm=xm+(Qg.x+Bw),ym=ym+(Qg.y+Cw),Ip=new A(xm,ym,Gh.width,Gh.height),Dw=new A(Gh.x,Gh.y,Gh.width,Gh.height), -Ew=new A(Hj.x,Hj.y,Hj.width,Hj.height),Xt=new Up;Xt.Lp(Lf.Oi);kg.push(Hp);kg.push(Lf.je);kg.push(Xt);kg.push(Ip);kg.push(Dw);kg.push(Ew);0===zm?Ai=Ip.copy():Ai.Gh(Ip);w.v(Qg);w.v(Yk);w.Db(Wt);w.ue(Pg)}this.xm.push(Ai);ab(yw,Ai.x,Ai.y,Ai.width,Ai.height)}$l(yi,!1)}}break;case "TableRow":case "TableColumn":w.k(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:w.k("Unknown panel type: "+n)}}var kf=e.width,lf=e.height, -Am=this.padding,Fw=Am.top+Am.bottom,kf=kf+(Am.left+Am.right),lf=lf+Fw;isFinite(f.width)&&(kf=f.width);isFinite(f.height)&&(lf=f.height);kf=Math.min(k.width,kf);lf=Math.min(k.height,lf);kf=Math.max(h.width,kf);lf=Math.max(h.height,lf);kf=Math.max(c,kf);lf=Math.max(d,lf);e.width=kf;e.height=lf;Pa(this.Tc,kf,lf);zo(this,0,0,kf,lf)}; +break;case "Viewbox":var Jg=a,Ah=b,hm=c,kt=d;1qi)wk(Yb,Infinity,Infinity),ue=Yb.za,hf.Gh(ue),this.$g.add(ue);else{var vd=Yb.Me,tt=Yb.aB,np=Yb.oh;np.Od()&&(np=Gb);var ig=Yb.qq,cw=Yb.bB,Pk=0,Qk=0, +nm=0;if(vd<-qi||vd>=qi){var ut=Nk.zF,Jf=Nk.yF;ig!==kj&&(nm=Nk.computeAngle(Yb,ig,Jf),Yb.ig=nm);Pk=ut.x-Kg.x;Qk=ut.y-Kg.y}else{var Ld,jf;if(0<=vd)Ld=Bh.ea(vd),jf=vdwt+10?0<=vd?si.Rb(Ld):Ld.Rb(si):wt>vt+10?0<=vd?jf.Rb(ti):ti.Rb(jf):0<=vd?si.Rb(ti):ti.Rb(si)}else Jf= +0<=vd?Ld.Rb(jf):jf.Rb(Ld);ig!==kj&&(nm=Nk.computeAngle(Yb,ig,Jf),Yb.ig=nm);Pk=Ld.x+(jf.x-Ld.x)*tt-Kg.x;Qk=Ld.y+(jf.y-Ld.y)*tt-Kg.y}wk(Yb,Infinity,Infinity);var ue=Yb.za,lm=Yb.Ia,Rk=0;Yb instanceof X&&(Rk=Yb.kb);var ui=lm.width+Rk,uj=lm.height+Rk;Lg.reset();Lg.translate(-ue.x,-ue.y);Lg.scale(Yb.scale,Yb.scale);Lg.rotate(ig===kj?Yb.angle:Jf,ui/2,uj/2);ig!==Pp&&ig!==Qp||Lg.rotate(90,ui/2,uj/2);ig!==Rp&&ig!==Sp||Lg.rotate(-90,ui/2,uj/2);ig===Tp&&(45Jf||225Jf)&&Lg.rotate(-Jf,ui/2,uj/ +2);var zj=new A(0,0,ui,uj);Ok.Wn(zj,np);Lg.nb(Ok);var dw=-Ok.x+Rk/2,ew=-Ok.y+Rk/2;Mg.assign(cw);isNaN(Mg.x)&&(Mg.x=0<=vd?ui/2+3:-(ui/2+3));isNaN(Mg.y)&&(Mg.y=-(uj/2+3));Mg.rotate(Jf);Pk+=Mg.x;Qk+=Mg.y;zj.set(ue);zj.x=Pk+dw;zj.y=Qk+ew;this.$g.add(zj);hf.Gh(zj)}}if(this instanceof W)for(var xt=this.Wf;xt.next();)wk(xt.value,Infinity,Infinity);this.fj=hf;var op=this.Ri;op.m(op.x+hf.x,op.y+hf.y);Pa(e,hf.width||0,hf.height||0);w.ue(Lg);w.v(Ok);w.v(Mg)}}}break;case "Grid":break;case "Graduated":var fw= +a,gw=b,hw=c,iw=d,Ng=this.Jd();this.xm=[];var Aj=Ng.margin,jw=Aj.right+Aj.left,kw=Aj.top+Aj.bottom;wk(Ng,fw,gw,hw,iw);var yt=Ng.za,lw=yt.height,mw=Math.max(yt.width+jw,0),nw=Math.max(lw+kw,0),zt=new A(-Aj.left,-Aj.top,mw,nw);this.xm.push(zt);e.assign(zt);for(var Tk=Ng.hf,At=Ng.kb,pp=Tk.jA,Bj=Tk.nx,vi=Tk.ox,ow=pp.length,qp=0,rp=0,Cj=w.lb(),sp=0;sp +wd&&(wd+=360);Bt.push(wd)}qp=Ct;rp=Dt}Cj.push(Bt)}var Et;if(null===this.Sj){for(var Ft=[],up=this.xa.n,Gt=up.length,vp=0;vpqw&&Ht.push(It)}}}this.Sj=Ft}Et=this.Sj;var Jt=this.xa.n,rw=Jt.length,Ch=0,Kt=0,Lt=vi;this.zm=[];for(var om=[],pm=0;pmNt*Mt*vi/this.Ut)){var be=this.XE,Ot=Et[pm],wi=Bj[0][0],Kf=0,xd=0,Kt=vi*Dh.WE-1E-4,Lt=vi*Dh.UE+1E-4,Ej=Nt*Mt;if(bethis.Bk+Ej&&(xi=Math.floor((be-this.Bk)/Ej),be-=xi*Ej);for(;be<=this.pA;){var xp;a:{for(var sw=Ot.length,yp=0;ypvi&&(Ch=vi),Kt<=Ch&& +Ch<=Lt)){for(var wd=Cj[Kf][xd],Fj=Bj[Kf][xd];Kfwi&&xdqm?0vm;vm++){switch(vm){case 0:ce.m(sm,tm);break;case 1:ce.m(sm+Dp,tm);break;case 2:ce.m(sm,tm+Ep);break;case 3:ce.m(sm+Dp,tm+Ep)}ce.rotate(Wt+Eh.angle);ce.offset(Ut,Vt);0===um&&0===vm?zi.m(ce.x,ce.y,0,0):zi.ri(ce);ce.offset(-Ut,-Vt);ce.rotate(-Wt- +Eh.angle)}w.v(ce);this.xm.push(zi);ab(vw,zi.x,zi.y,zi.width,zi.height)}else if(yi instanceof Hh){var Wk=yi,Xt=Bp,yw=e;null===this.kk&&(this.kk=new Hh);var Lf=this.kk;ip(Wk,Lf);var Gp=Wk.oh;Gp.Od()&&(Gp=yb);for(var Fh=Wk.qq,zw=Wk.bB,Ai=null,wm=0,xm=0,Og=0,Hp=0,Aw=Xt.length,ym=0;ymOg||225Og)&&Pg.rotate(-Og,Ij/2,Jj/2);var Yt=w.hg(0,0,Ij,Jj),Xk=w.K();Xk.Wn(Yt,Gp);Pg.nb(Xk);var Bw=-Xk.x,Cw=-Xk.y,Qg=w.K();Qg.assign(zw);isNaN(Qg.x)&&(Qg.x=Ij/2+3);isNaN(Qg.y)&&(Qg.y=-(Jj/2+3));Qg.rotate(Og);var wm=wm+(Qg.x+Bw),xm=xm+(Qg.y+Cw),Ip=new A(wm,xm,Gh.width,Gh.height),Dw=new A(Gh.x,Gh.y,Gh.width,Gh.height), +Ew=new A(Hj.x,Hj.y,Hj.width,Hj.height),Zt=new Up;Zt.Kp(Lf.Oi);kg.push(Hp);kg.push(Lf.je);kg.push(Zt);kg.push(Ip);kg.push(Dw);kg.push(Ew);0===ym?Ai=Ip.copy():Ai.Gh(Ip);w.v(Qg);w.v(Xk);w.Db(Yt);w.ue(Pg)}this.xm.push(Ai);ab(yw,Ai.x,Ai.y,Ai.width,Ai.height)}$l(yi,!1)}}break;case "TableRow":case "TableColumn":w.k(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:w.k("Unknown panel type: "+n)}}var kf=e.width,lf=e.height, +zm=this.padding,Fw=zm.top+zm.bottom,kf=kf+(zm.left+zm.right),lf=lf+Fw;isFinite(f.width)&&(kf=f.width);isFinite(f.height)&&(lf=f.height);kf=Math.min(k.width,kf);lf=Math.min(k.height,lf);kf=Math.max(h.width,kf);lf=Math.max(h.height,lf);kf=Math.max(c,kf);lf=Math.max(d,lf);e.width=kf;e.height=lf;Pa(this.Tc,kf,lf);zo(this,0,0,kf,lf)}; C.prototype.findMainElement=C.prototype.Jd=function(){if(null===this.dn){var a=this.xa.n,b=a.length;if(0===b)return null;for(var c=0;cc||p>d)this.I(),wk(this,n>c?c:n,p>d?d:p);break;case De:this.I(!0);wk(this,c+r,d+s,0,0);break;case oo:this.I(!0);wk(this,c+r,p+s,0,0);break;case no:this.I(!0),wk(this,n+r,d+s,0,0)}}k=this.W;k.x=a;k.y=b; k.width=c;k.height=d;var u=this.ma.Qb;switch(u){case "Position":for(var t=f.length,x=e.x-this.padding.left,v=e.y-this.padding.top,B=0;B=this.pq);Ke++){var gi=this.be(Ta+Ke);Je.height+=gi.total}for(Ke=1;Ke=this.Kp);Ke++){var hi=this.ae(Hd+Ke);Je.width+=hi.total}var qj=qh.Sa+Je.width,rj=ph.Sa+Je.height;h.x=Xb;h.y=Dc;h.width=qj;h.height=rj;var Eb=Xb,sh=Dc,th=qj,ma=rj;Xb+qj>e.width&&(th=Math.max(e.width-Xb,0));Dc+rj>e.height&&(ma=Math.max(e.height-Dc,0));var aa=pb.alignment,ae=0,dg=0,ii=0,ic=0;if(aa.Vc()){aa=this.Ml;aa.fd()||(aa=Gb);var ae=aa.x,dg=aa.y,ii=aa.offsetX,ic=aa.offsetY,ji=qh.alignment, +Math.min(this.Ni,gc-1);Xe!==gc&&(void 0===this.Td[Xe]||0===this.Td[Xe].Sa);)Xe++;for(var Xe=Math.min(Xe,gc-1),Gd=-this.Td[Xe].ib,Je=w.im(),Ta=0;Ta=this.pq);Ke++){var gi=this.be(Ta+Ke);Je.height+=gi.total}for(Ke=1;Ke=this.Jp);Ke++){var hi=this.ae(Hd+Ke);Je.width+=hi.total}var qj=qh.Sa+Je.width,rj=ph.Sa+Je.height;h.x=Xb;h.y=Dc;h.width=qj;h.height=rj;var Eb=Xb,sh=Dc,th=qj,ma=rj;Xb+qj>e.width&&(th=Math.max(e.width-Xb,0));Dc+rj>e.height&&(ma=Math.max(e.height-Dc,0));var aa=pb.alignment,ae=0,dg=0,ii=0,ic=0;if(aa.Vc()){aa=this.Ll;aa.fd()||(aa=Gb);var ae=aa.x,dg=aa.y,ii=aa.offsetX,ic=aa.offsetY,ji=qh.alignment, jc=ph.alignment;ji.fd()&&(ae=ji.x,ii=ji.offsetX);jc.fd()&&(dg=jc.y,ic=jc.offsetY)}else ae=aa.x,dg=aa.y,ii=aa.offsetX,ic=aa.offsetY;if(isNaN(ae)||isNaN(dg))dg=ae=.5,ic=ii=0;var Ye=$d.width,Le=$d.height,Ze=pb.margin,re=Ze.left+Ze.right,se=Ze.top+Ze.bottom,$c=Ro(pb,ph,qh,!1);!isNaN(pb.Ba.width)||$c!==De&&$c!==oo||(Ye=Math.max(qj-re,0));!isNaN(pb.Ba.height)||$c!==De&&$c!==no||(Le=Math.max(rj-se,0));var Id=pb.Bf,uh=pb.zh,Ye=Math.min(Id.width,Ye),Le=Math.min(Id.height,Le),Ye=Math.max(uh.width,Ye),Le=Math.max(uh.height, -Le),Z=Le+se;h.x+=h.width*ae-(Ye+re)*ae+ii+Ze.left;h.y+=h.height*dg-Z*dg+ic+Ze.top;pb.visible&&(cb(Eb,sh,th,ma,h.x,h.y,$d.width,$d.height)?pb.hc(h.x,h.y,Ye,Le):pb.hc(h.x,h.y,Ye,Le,new A(Eb,sh,th,ma)))}else{pb.Ii();pb.nc.Ra();var ud=pb.nc,vh=w.hg(ud.x,ud.y,ud.width,ud.height);ud.x=id.type===Ho?Ie:Xb;ud.y=id.type===Io?fc:Dc;ud.width=$d.width;ud.height=$d.height;pb.nc.freeze();Do(pb,!1);if(!Qa(vh,ud)){var ki=pb.U;null!==ki&&(ki.Ek(),pb.ss(ki))}w.Db(vh)}}}}w.Ak(Je);for(Ta=0;Ta=fg){var Hg=this.zF,kb=this.yF;sj!==kj&&(Gg=this.computeAngle(lc,sj,kb),lc.angle=Gg);Fg=Hg.x;Hf=Hg.y}else{var Sb=void 0,Fc=void 0;if(0<=wb)Sb=Ec.n[wb],Fc=wb -jd+10?0<=wb?Jd.Rb(Sb):Sb.Rb(Jd):jd>yh+10?0<=wb?Fc.Rb(Za):Za.Rb(Fc):0<=wb?Jd.Rb(Za):Za.Rb(Jd)}else kb=0<=wb?Sb.Rb(Fc):Fc.Rb(Sb);sj!==kj&&(Gg=this.computeAngle(lc,sj,kb),lc.angle=Gg);Fg=Sb.x+(Fc.x-Sb.x)*mi;Hf=Sb.y+(Fc.y-Sb.y)*mi}if(Eg.L(tb))lc.location=new z(Fg,Hf);else{Eg.Od()&&(Eg=Gb);var gg=w.Ff();gg.reset();gg.scale(lc.scale,lc.scale);gg.rotate(lc.angle,0,0);var tj=lc.Ia,mc=w.hg(0,0,tj.width,tj.height),ef=w.K();ef.Xn(mc,Eg);gg.nb(ef);var Ig=-ef.x,hg=-ef.y,te=lp.copy();isNaN(te.x)&&(te.x=0<=wb?ef.x+ -3:-(ef.x+3));isNaN(te.y)&&(te.y=-(ef.y+3));te.rotate(kb);Fg+=te.x;Hf+=te.y;gg.vG(mc);var Ig=Ig+mc.x,hg=hg+mc.y,ni=w.xb(Fg+Ig,Hf+hg);lc.move(ni);w.v(ni);w.v(ef);w.Db(mc);w.ue(gg)}}this.lu(!1)}break;case "Grid":break;case "Graduated":if(null!==this.xm){var Lk=this.Jd(),If=this.zm,ff=this.xm,zh=0,Me=ff[zh];zh++;Lk.hc(Me.x-e.x,Me.y-e.y,Me.width,Me.height);for(var Kd=f.length,Jg=0;Jgyh+10?0<=wb?Fc.Rb(Za):Za.Rb(Fc):0<=wb?Jd.Rb(Za):Za.Rb(Jd)}else kb=0<=wb?Sb.Rb(Fc):Fc.Rb(Sb);sj!==kj&&(Gg=this.computeAngle(lc,sj,kb),lc.angle=Gg);Fg=Sb.x+(Fc.x-Sb.x)*mi;Hf=Sb.y+(Fc.y-Sb.y)*mi}if(Eg.L(tb))lc.location=new z(Fg,Hf);else{Eg.Od()&&(Eg=Gb);var gg=w.Ff();gg.reset();gg.scale(lc.scale,lc.scale);gg.rotate(lc.angle,0,0);var tj=lc.Ia,mc=w.hg(0,0,tj.width,tj.height),ef=w.K();ef.Wn(mc,Eg);gg.nb(ef);var Ig=-ef.x,hg=-ef.y,te=lp.copy();isNaN(te.x)&&(te.x=0<=wb?ef.x+ +3:-(ef.x+3));isNaN(te.y)&&(te.y=-(ef.y+3));te.rotate(kb);Fg+=te.x;Hf+=te.y;gg.vG(mc);var Ig=Ig+mc.x,hg=hg+mc.y,ni=w.xb(Fg+Ig,Hf+hg);lc.move(ni);w.v(ni);w.v(ef);w.Db(mc);w.ue(gg)}}this.lu(!1)}break;case "Grid":break;case "Graduated":if(null!==this.xm){var Kk=this.Jd(),If=this.zm,ff=this.xm,zh=0,Me=ff[zh];zh++;Kk.hc(Me.x-e.x,Me.y-e.y,Me.width,Me.height);for(var Kd=f.length,Jg=0;Jgq.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=n;n=n instanceof C?n:null;q=w.Ff();q.set(h);if(null!==n?n.zk(a,b,c,d,e,q):Bo(p,a,d, +g.yk=function(a,b,c,d,e,f){if(!1===this.Tg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=f;void 0===f&&(h=w.Ff(),h.reset());h.multiply(this.transform);if(this.qn(a,h))return Zp(this,b,c,e),void 0===f&&w.ue(h),!0;if(this.Tf(a,h)){if(!this.Fn)for(var k=Jp(this),l=this.xa.n,m=l.length;m--;){var n=l[m];if(n.visible||n===k){var p=n.W,q=this.Ia;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=n;n=n instanceof C?n:null;q=w.Ff();q.set(h);if(null!==n?n.yk(a,b,c,d,e,q):Bo(p,a,d, q))null!==b&&(p=b(p)),null===p||null!==c&&!c(p)||e.add(p);w.ue(q)}}}void 0===f&&w.ue(h);return d}void 0===f&&w.ue(h);return!1};function Zp(a,b,c,d){for(var e=a.xa.n,f=e.length;f--;){var h=e[f];if(h.visible){var k=h.W,l=a.Ia;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof C&&Zp(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}} g.wn=function(a,b,c,d,e,f){if(!1===this.Tg)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ia,k=this.Yg(),l=k?a:La(w.xb(a.x,a.y),this.transform),m=k?b:La(w.xb(b.x,b.y),this.transform),n=l.vf(m),p=0u.width||s.y>u.height||0>s.x+s.width||0>s.y+s.height||(r.Yg()?(s=r.transform,La(k.set(a),s),La(l.set(b),s)):(k.set(a),l.set(b)),s=r,r=r instanceof C?r:null,null!==r?!r.wn(k,l,c,d,e,f):!s.ME(k,l,e))||(null!==c&&(s=c(s)),null===s||null!==d&&!d(s)||f.add(s))}}w.v(k);w.v(l)}return e? -p:h}return!1};function Kp(a){var b=null;a instanceof X&&(b=a.A,b===rc&&(b=null),a=a.hf,null!==a&&null===b&&(b=a.A));null===b&&(b=xb);return b}function Lp(a){var b=null;a instanceof X&&(b=a.B,b===rc&&(b=null),a=a.hf,null!==a&&null===b&&(b=a.B));null===b&&(b=Lb);return b}C.prototype.add=C.prototype.add=function(a){w.G(a,G,C,"add:element");this.Md(this.xa.count,a)};C.prototype.elt=C.prototype.da=function(a){return this.xa.da(a)}; -C.prototype.insertAt=C.prototype.Md=function(a,b){b instanceof S&&w.k("Cannot add a Part to a Panel: "+b+"; use a Panel instead");if(this===b||this.Xl(b))this===b&&w.k("Cannot make a Panel contain itself: "+this.toString()),w.k("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.O;null!==c&&c!==this&&w.k("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+b.toString()+", already contained by "+c.toString()+", cannot be shared by this Panel: "+ +n&&Ma(l.x,l.y,h.width,h.height,h.width,0)u.width||s.y>u.height||0>s.x+s.width||0>s.y+s.height||(r.Yg()?(s=r.transform,La(k.set(a),s),La(l.set(b),s)):(k.set(a),l.set(b)),s=r,r=r instanceof C?r:null,null!==r?!r.wn(k,l,c,d,e,f):!s.ME(k,l,e))||(null!==c&&(s=c(s)),null===s||null!==d&&!d(s)||f.add(s))}}w.v(k);w.v(l)}return e? +p:h}return!1};function Kp(a){var b=null;a instanceof X&&(b=a.A,b===rc&&(b=null),a=a.hf,null!==a&&null===b&&(b=a.A));null===b&&(b=xb);return b}function Lp(a){var b=null;a instanceof X&&(b=a.B,b===rc&&(b=null),a=a.hf,null!==a&&null===b&&(b=a.B));null===b&&(b=Lb);return b}C.prototype.add=C.prototype.add=function(a){w.G(a,G,C,"add:element");this.Md(this.xa.count,a)};C.prototype.elt=C.prototype.ea=function(a){return this.xa.ea(a)}; +C.prototype.insertAt=C.prototype.Md=function(a,b){b instanceof S&&w.k("Cannot add a Part to a Panel: "+b+"; use a Panel instead");if(this===b||this.Yl(b))this===b&&w.k("Cannot make a Panel contain itself: "+this.toString()),w.k("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.O;null!==c&&c!==this&&w.k("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+b.toString()+", already contained by "+c.toString()+", cannot be shared by this Panel: "+ this.toString());this.ma!==Hl||b instanceof X||w.k("Can only add Shapes to a Grid Panel, not: "+b);this.ma!==gp||b instanceof X||b instanceof Hh||w.k("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+b);b.dm(this);b.Sm=null;if(null!==this.dq){var d=b.data;null!==d&&"object"===typeof d&&(null===this.tg&&(this.tg=new ka(Object,C)),this.tg.add(d,b))}var e=this.xa,d=-1;if(c===this){for(var f=-1,h=this.xa.n,k=h.length,l=0;l=e.count&& -a>=e.count)return;e.Yc(f);d=f}else w.k("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Md(a,b);this.I();b.I();null!==b.Qd?this.Dk=!0:b instanceof C&&!0===b.Dk&&(this.Dk=!0);this.Tj=null;c=this.U;null!==c&&(c.Nm=null,c.ck=NaN,this.Dk&&c instanceof T&&(c.Dk=!0),c.Dk&&c instanceof T&&(c.le=null),e=this.g,null!==e&&e.oa.gb||(-1!==d&&c.Xc(Pf,"elements",this,b,null,d,null),c.Xc(Of,"elements",this,null,b,null,a),this.au()||$p(this,b,!1)))}; -w.defineProperty(C,{Dk:null},function(){return 0!==(this.P&8388608)},function(a){0!==(this.P&8388608)!==a&&(this.P^=8388608)});function aq(a,b){a.P=b?a.P|16777216:a.P&-16777217}C.prototype.remove=C.prototype.remove=function(a){w.G(a,G,C,"remove:element");for(var b=this.xa.n,c=b.length,d=-1,e=0;ea&&w.Ea(a,">= 0",C,"getRowDefinition:idx");a=Math.round(a);var b=this.Yd;if(void 0===b[a]){var c=new Tg;c.dm(this);c.ve=!0;c.index=a;b[a]=c}return b[a]};C.prototype.removeRowDefinition=C.prototype.RF=function(a){0>a&&w.Ea(a,">= 0",C,"removeRowDefinition:idx");a=Math.round(a);var b=this.Yd;this.Xc(Pf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.I()};w.u(C,{Kp:"columnCount"},function(){return void 0===this.Td?0:this.Td.length}); +a>=e.count)return;e.Yc(f);d=f}else w.k("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Md(a,b);this.I();b.I();null!==b.Qd?this.Ck=!0:b instanceof C&&!0===b.Ck&&(this.Ck=!0);this.Sj=null;c=this.U;null!==c&&(c.Nm=null,c.bk=NaN,this.Ck&&c instanceof T&&(c.Ck=!0),c.Ck&&c instanceof T&&(c.le=null),e=this.g,null!==e&&e.oa.gb||(-1!==d&&c.Xc(Pf,"elements",this,b,null,d,null),c.Xc(Of,"elements",this,null,b,null,a),this.au()||$p(this,b,!1)))}; +w.defineProperty(C,{Ck:null},function(){return 0!==(this.P&8388608)},function(a){0!==(this.P&8388608)!==a&&(this.P^=8388608)});function aq(a,b){a.P=b?a.P|16777216:a.P&-16777217}C.prototype.remove=C.prototype.remove=function(a){w.G(a,G,C,"remove:element");for(var b=this.xa.n,c=b.length,d=-1,e=0;ea&&w.Ea(a,">= 0",C,"getRowDefinition:idx");a=Math.round(a);var b=this.Yd;if(void 0===b[a]){var c=new Tg;c.dm(this);c.ve=!0;c.index=a;b[a]=c}return b[a]};C.prototype.removeRowDefinition=C.prototype.RF=function(a){0>a&&w.Ea(a,">= 0",C,"removeRowDefinition:idx");a=Math.round(a);var b=this.Yd;this.Xc(Pf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.I()};w.u(C,{Jp:"columnCount"},function(){return void 0===this.Td?0:this.Td.length}); C.prototype.getColumnDefinition=C.prototype.ae=function(a){0>a&&w.Ea(a,">= 0",C,"getColumnDefinition:idx");a=Math.round(a);var b=this.Td;if(void 0===b[a]){var c=new Tg;c.dm(this);c.ve=!1;c.index=a;b[a]=c}return b[a]};C.prototype.removeColumnDefinition=C.prototype.OF=function(a){0>a&&w.Ea(a,">= 0",C,"removeColumnDefinition:idx");a=Math.round(a);var b=this.Td;this.Xc(Pf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.I()}; -w.defineProperty(C,{uJ:"rowSizing"},function(){return void 0===this.Vm?fp:this.Vm},function(a){if(void 0!==this.Vm){var b=this.Vm;b!==a&&(a!==fp&&a!==Np&&w.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Vm=a,this.I(),this.h("rowSizing",b,a))}}); +w.defineProperty(C,{vJ:"rowSizing"},function(){return void 0===this.Vm?fp:this.Vm},function(a){if(void 0!==this.Vm){var b=this.Vm;b!==a&&(a!==fp&&a!==Np&&w.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Vm=a,this.I(),this.h("rowSizing",b,a))}}); w.defineProperty(C,{sH:"columnSizing"},function(){return void 0===this.sm?fp:this.sm},function(a){if(void 0!==this.sm){var b=this.sm;b!==a&&(a!==fp&&a!==Np&&w.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.sm=a,this.I(),this.h("columnSizing",b,a))}}); -w.defineProperty(C,{RL:"topIndex"},function(){return void 0===this.ej?0:this.ej},function(a){if(void 0!==this.ej){var b=this.ej;b!==a&&((!isFinite(a)||0>a)&&w.k("Panel.topIndex must be greater than zero and a real number, not: "+a),this.ej=a,this.I(),this.h("topIndex",b,a))}}); -w.defineProperty(C,{dL:"leftIndex"},function(){return void 0===this.Ni?0:this.Ni},function(a){if(void 0!==this.Ni){var b=this.Ni;b!==a&&((!isFinite(a)||0>a)&&w.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.Ni=a,this.I(),this.h("leftIndex",b,a))}});C.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==Qo)return NaN;for(var b=0,c=this.Yd,d=c.length,e=this.ej;ea)return-1;if(this.type!==Qo)return NaN;for(var b=0,c=this.Td,d=c.length,e=this.Ni;ea;)this.kf(this.xa.length-1);a=this.dq;if(null!==a)for(var b=w.Ya(a),c=0;ca)&&w.k("Panel.topIndex must be greater than zero and a real number, not: "+a),this.ej=a,this.I(),this.h("topIndex",b,a))}}); +w.defineProperty(C,{eL:"leftIndex"},function(){return void 0===this.Ni?0:this.Ni},function(a){if(void 0!==this.Ni){var b=this.Ni;b!==a&&((!isFinite(a)||0>a)&&w.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.Ni=a,this.I(),this.h("leftIndex",b,a))}});C.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==Qo)return NaN;for(var b=0,c=this.Yd,d=c.length,e=this.ej;ea)return-1;if(this.type!==Qo)return NaN;for(var b=0,c=this.Td,d=c.length,e=this.Ni;ea;)this.kf(this.xa.length-1);a=this.dq;if(null!==a)for(var b=w.Ya(a),c=0;cc)){var d;d=bq(a,b);var e=a.zI,f=null;null!==e&&(f=e.ja(d));null===f&&(cq||(cq=!0,w.trace('No item template Panel found for category "'+d+'" on '+a),w.trace(" Using default item template."),d=new C,e=new Hh,e.bind(new Zg("text","",Qf)),d.add(e),dq=d),f=dq);d=f;null!==d&&(jh(d),d=d.copy(),0!==(d.P&16777216)&&(e=a.Ql(),null!==e&&aq(e,!0)),"object"===typeof b&&(null===a.tg&&(a.tg=new ka(Object,C)),a.tg.add(b,d)),e=c,hn(a)&&e++,a.Md(e,d),d.Vd=b,jn(a,e, -c),d.Vd=null,d.data=b)}}function jn(a,b,c){for(a=a.xa;bc)){var d;d=bq(a,b);var e=a.AI,f=null;null!==e&&(f=e.ja(d));null===f&&(cq||(cq=!0,w.trace('No item template Panel found for category "'+d+'" on '+a),w.trace(" Using default item template."),d=new C,e=new Hh,e.bind(new Zg("text","",Qf)),d.add(e),dq=d),f=dq);d=f;null!==d&&(jh(d),d=d.copy(),0!==(d.P&16777216)&&(e=a.Pl(),null!==e&&aq(e,!0)),"object"===typeof b&&(null===a.tg&&(a.tg=new ka(Object,C)),a.tg.add(b,d)),e=c,hn(a)&&e++,a.Md(e,d),d.Vd=b,jn(a,e, +c),d.Vd=null,d.data=b)}}function jn(a,b,c){for(a=a.xa;ba&&w.Ea(a,">= 0",Tg,"height"),this.gf=a,this.Ja=this.Sa,null!==this.O&&this.O.I(),this.cd("height",b,a))});w.defineProperty(Tg,{width:"width"},function(){return this.gf},function(a){var b=this.gf;b!==a&&(0>a&&w.Ea(a,">= 0",Tg,"width"),this.gf=a,this.Ja=this.Sa,null!==this.O&&this.O.I(),this.cd("width",b,a))}); -w.defineProperty(Tg,{zj:"minimum"},function(){return this.ek},function(a){var b=this.ek;b!==a&&((0>a||!isFinite(a))&&w.Ea(a,">= 0",Tg,"minimum"),this.ek=a,this.Ja=this.Sa,null!==this.O&&this.O.I(),this.cd("minimum",b,a))});w.defineProperty(Tg,{nf:"maximum"},function(){return this.dk},function(a){var b=this.dk;b!==a&&(0>a&&w.Ea(a,">= 0",Tg,"maximum"),this.dk=a,this.Ja=this.Sa,null!==this.O&&this.O.I(),this.cd("maximum",b,a))}); +w.defineProperty(Tg,{yj:"minimum"},function(){return this.dk},function(a){var b=this.dk;b!==a&&((0>a||!isFinite(a))&&w.Ea(a,">= 0",Tg,"minimum"),this.dk=a,this.Ja=this.Sa,null!==this.O&&this.O.I(),this.cd("minimum",b,a))});w.defineProperty(Tg,{nf:"maximum"},function(){return this.ck},function(a){var b=this.ck;b!==a&&(0>a&&w.Ea(a,">= 0",Tg,"maximum"),this.ck=a,this.Ja=this.Sa,null!==this.O&&this.O.I(),this.cd("maximum",b,a))}); w.defineProperty(Tg,{alignment:"alignment"},function(){return this.ge},function(a){var b=this.ge;b.L(a)||(this.ge=a.S(),null!==this.O&&this.O.I(),this.cd("alignment",b,a))});w.defineProperty(Tg,{stretch:"stretch"},function(){return this.Cg},function(a){var b=this.Cg;b!==a&&(this.Cg=a,null!==this.O&&this.O.I(),this.cd("stretch",b,a))}); -w.defineProperty(Tg,{dG:"separatorPadding"},function(){return this.ik},function(a){"number"===typeof a&&(a=new db(a));var b=this.ik;null!==a&&null!==b&&b.L(a)||(null!==a&&(a=a.S()),this.ik=a,null!==this.O&&this.O.I(),this.cd("separatorPadding",b,a))});w.defineProperty(Tg,{rq:"separatorStroke"},function(){return this.Vs},function(a){var b=this.Vs;b!==a&&(null===a||"string"===typeof a||a instanceof ga)&&(a instanceof ga&&a.freeze(),this.Vs=a,null!==this.O&&this.O.I(),this.cd("separatorStroke",b,a))}); +w.defineProperty(Tg,{dG:"separatorPadding"},function(){return this.hk},function(a){"number"===typeof a&&(a=new db(a));var b=this.hk;null!==a&&null!==b&&b.L(a)||(null!==a&&(a=a.S()),this.hk=a,null!==this.O&&this.O.I(),this.cd("separatorPadding",b,a))});w.defineProperty(Tg,{rq:"separatorStroke"},function(){return this.Vs},function(a){var b=this.Vs;b!==a&&(null===a||"string"===typeof a||a instanceof ga)&&(a instanceof ga&&a.freeze(),this.Vs=a,null!==this.O&&this.O.I(),this.cd("separatorStroke",b,a))}); w.defineProperty(Tg,{sq:"separatorStrokeWidth"},function(){return this.Ws},function(a){var b=this.Ws;b!==a&&(this.Ws=a,null!==this.O&&this.O.I(),this.cd("separatorStrokeWidth",b,a))}); -w.defineProperty(Tg,{FL:"separatorDashArray"},function(){return this.Xh},function(a){var b=this.Xh;if(b!==a){null===a||Array.isArray(a)||w.yd(a,"Array",Tg,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){for(var f=d.za,h=Math.max(1,f.width),f=f.height,k=c[0],l=c[1],m=0,n=0,p=0,q=0,r=0,s=0,u=q=0,t=w.lb(),x=2;xp&&(p=1);for(var e=c=p,m=h/2,n=0===m?!1:!0,x=0,q=t[x],p=q[0],s=q[1],r=q[2],q=q[3],v=0;.1<=u;){0===v&&(n?(e=c,e-=m,u-=m,n=!1):e=c,0===e&&(e=1));if(e>u){w.wa(t);return}e> -q?(v=e-q,e=q):v=0;var B=Math.sqrt(e*e/(1+r*r));0>p&&(B=-B);k+=B;l+=r*B;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(f/2));0===v&&d.yk(a,b);a.translate(h/2,f/2);a.rotate(-s);a.translate(-k,-l);u-=e;q-=e;if(0!==v){x++;if(x===t.length){w.wa(t);return}q=t[x];p=q[0];s=q[1];r=q[2];q=q[3];e=v}}w.wa(t)}} -X.prototype.yk=function(a,b){if(null!==this.qc||null!==this.zd){null!==this.zd&&Lo(this,a,this.zd,!0,!1);null!==this.qc&&Lo(this,a,this.qc,!1,!1);var c=this.fi;if(0===c){var d=this.U;d instanceof hh&&d.type===hj&&"Selection"===d.td&&d.rb instanceof X&&d.Of.Jd()===d.rb&&(c=d.rb.kb)}a.lineWidth=c;a.lineJoin=this.wp;a.lineCap=this.tp;a.miterLimit=this.cn;var e=!1;this.U&&b.pj("drawShadows")&&(e=this.U.Zl);var f=!0;null!==this.qc&&null===this.zd&&(f=!1);var d=!1,h=!0,k=this.mG;null!==k&&(d=!0,h=a.gA(k, -this.tf));var l=this.hb;if(null!==l){if(l.ma===Ee)a.beginPath(),d&&!h?wo(a,l.xc,l.Gc,l.yb,l.Gb,k,this.tf):(a.moveTo(l.xc,l.Gc),a.lineTo(l.yb,l.Gb)),null!==this.zd&&a.Jg(this.zd),0!==c&&null!==this.qc&&a.Ej();else if(l.ma===Fe){var m=l.xc,n=l.Gc,p=l.yb,q=l.Gb,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.zd&&(a.beginPath(),a.rect(l,r,m,n),a.Jg(this.zd));if(null!==this.qc){var s=p=0,u=0;f&&e&&(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= -0,a.shadowBlur=0);d&&!h?(h=w.lb(),h.push(l),h.push(r),h.push(l+m),h.push(r),h.push(l+m),h.push(r+n),h.push(l),h.push(r+n),h.push(l),h.push(r),a.beginPath(),gq(a,h,k,this.tf),a.Ej(),w.wa(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.Ej());f&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.ma===Ne)m=l.xc,n=l.Gc,p=l.yb,q=l.Gb,l=Math.abs(p-m)/2,r=Math.abs(q-n)/2,m=Math.min(m,p)+l,n=Math.min(n,q)+r,a.beginPath(),a.moveTo(m,n-r),a.bezierCurveTo(m+cd*l,n-r,m+l,n-cd*r,m+l,n),a.bezierCurveTo(m+ +q?(v=e-q,e=q):v=0;var B=Math.sqrt(e*e/(1+r*r));0>p&&(B=-B);k+=B;l+=r*B;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(f/2));0===v&&d.xk(a,b);a.translate(h/2,f/2);a.rotate(-s);a.translate(-k,-l);u-=e;q-=e;if(0!==v){x++;if(x===t.length){w.wa(t);return}q=t[x];p=q[0];s=q[1];r=q[2];q=q[3];e=v}}w.wa(t)}} +X.prototype.xk=function(a,b){if(null!==this.qc||null!==this.zd){null!==this.zd&&Lo(this,a,this.zd,!0,!1);null!==this.qc&&Lo(this,a,this.qc,!1,!1);var c=this.fi;if(0===c){var d=this.U;d instanceof hh&&d.type===hj&&"Selection"===d.td&&d.rb instanceof X&&d.Of.Jd()===d.rb&&(c=d.rb.kb)}a.lineWidth=c;a.lineJoin=this.vp;a.lineCap=this.sp;a.miterLimit=this.cn;var e=!1;this.U&&b.pj("drawShadows")&&(e=this.U.$l);var f=!0;null!==this.qc&&null===this.zd&&(f=!1);var d=!1,h=!0,k=this.mG;null!==k&&(d=!0,h=a.gA(k, +this.tf));var l=this.hb;if(null!==l){if(l.ma===Ee)a.beginPath(),d&&!h?wo(a,l.xc,l.Gc,l.yb,l.Gb,k,this.tf):(a.moveTo(l.xc,l.Gc),a.lineTo(l.yb,l.Gb)),null!==this.zd&&a.Jg(this.zd),0!==c&&null!==this.qc&&a.Dj();else if(l.ma===Fe){var m=l.xc,n=l.Gc,p=l.yb,q=l.Gb,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.zd&&(a.beginPath(),a.rect(l,r,m,n),a.Jg(this.zd));if(null!==this.qc){var s=p=0,u=0;f&&e&&(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= +0,a.shadowBlur=0);d&&!h?(h=w.lb(),h.push(l),h.push(r),h.push(l+m),h.push(r),h.push(l+m),h.push(r+n),h.push(l),h.push(r+n),h.push(l),h.push(r),a.beginPath(),gq(a,h,k,this.tf),a.Dj(),w.wa(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.Dj());f&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.ma===Ne)m=l.xc,n=l.Gc,p=l.yb,q=l.Gb,l=Math.abs(p-m)/2,r=Math.abs(q-n)/2,m=Math.min(m,p)+l,n=Math.min(n,q)+r,a.beginPath(),a.moveTo(m,n-r),a.bezierCurveTo(m+cd*l,n-r,m+l,n-cd*r,m+l,n),a.bezierCurveTo(m+ l,n+cd*r,m+cd*l,n+r,m,n+r),a.bezierCurveTo(m-cd*l,n+r,m-l,n+cd*r,m-l,n),a.bezierCurveTo(m-l,n-cd*r,m-cd*l,n-r,m,n-r),a.closePath(),null!==this.zd&&a.Jg(this.zd),d&&!h&&(h=w.lb(),Xd(m,n-r,m+cd*l,n-r,m+l,n-cd*r,m+l,n,.5,h),Xd(m+l,n,m+l,n+cd*r,m+cd*l,n+r,m,n+r,.5,h),Xd(m,n+r,m-cd*l,n+r,m-l,n+cd*r,m-l,n,.5,h),Xd(m-l,n,m-l,n-cd*r,m-cd*l,n-r,m,n-r,.5,h),a.beginPath(),gq(a,h,k,this.tf),w.wa(h)),0!==c&&null!==this.qc&&(f&&e?(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= -0,a.shadowBlur=0,a.Ej(),a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u):a.Ej());else if(l.ma===Be){r=l.Oj;n=r.length;for(q=0;qx.pf);else{var t=rf(x,m),v=t.length;if(0===v){a.lineTo(x.ka,x.ra);break}for(var B=0;Be)){var f=.001,h=c.length,k=b[0],l=b[1];if(4===e)wo(a,k,l,b[2],b[3],c,d);else{a.moveTo(k,l);for(var m=f=0,n=0,p=0,q=0,r=p=0,s=w.lb(),u=2;ur&&(f=r);f>p?(t=f-p,f=p):t=0;var x=Math.sqrt(f*f/(1+q*q));0>n&&(x=-x);k+=x;l+= q*x;e?a.lineTo(k,l):a.moveTo(k,l);r-=f;p-=f;if(0!==t){u++;if(u===s.length){w.wa(s);return}p=s[u];n=p[0];q=p[1];p=p[2];f=t}else e=!e}w.wa(s)}}}X.prototype.getDocumentPoint=X.prototype.Wa=function(a,b){void 0===b&&(b=new z);if(a instanceof L){a.Od()&&w.k("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var c=this.Ia,d=this.kb;b.m(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY)}else b.set(a);this.ph.nb(b);return b}; -X.prototype.vk=function(a,b){var c=this.hf;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.cb,e=this.kb/2;c.type!==Ee||b||(e+=2);var f=w.Ef();f.assign(d);f.xf(e+2,e+2);if(!f.Ha(a))return w.Db(f),!1;d=e+1E-4;if(c.type===Ee){if(null===this.stroke)return!1;d=(c.D-c.ia)*(a.x-c.ia)+(c.F-c.ga)*(a.y-c.ga);if(0>(c.ia-c.D)*(a.x-c.D)+(c.ga-c.F)*(a.y-c.F)||0>d)return!1;w.Db(f);return Ud(c.ia,c.ga,c.D,c.F,e,a.x,a.y)}if(c.type===Fe){var h=c.ia,k=c.ga,l=c.D,m=c.F;f.x=Math.min(h,l);f.y=Math.min(k, +X.prototype.uk=function(a,b){var c=this.hf;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.cb,e=this.kb/2;c.type!==Ee||b||(e+=2);var f=w.Ef();f.assign(d);f.xf(e+2,e+2);if(!f.Ha(a))return w.Db(f),!1;d=e+1E-4;if(c.type===Ee){if(null===this.stroke)return!1;d=(c.D-c.ia)*(a.x-c.ia)+(c.F-c.ga)*(a.y-c.ga);if(0>(c.ia-c.D)*(a.x-c.D)+(c.ga-c.F)*(a.y-c.F)||0>d)return!1;w.Db(f);return Ud(c.ia,c.ga,c.D,c.F,e,a.x,a.y)}if(c.type===Fe){var h=c.ia,k=c.ga,l=c.D,m=c.F;f.x=Math.min(h,l);f.y=Math.min(k, m);f.width=Math.abs(l-h);f.height=Math.abs(m-k);if(null===this.fill){f.xf(-d,-d);if(f.Ha(a))return w.Db(f),!1;f.xf(d,d)}null!==this.stroke&&f.xf(e,e);e=f.Ha(a);w.Db(f);return e}if(c.type===Ne){var h=c.ia,k=c.ga,l=c.D,m=c.F,c=Math.min(h,l),n=Math.min(k,m),h=Math.abs(l-h)/2,k=Math.abs(m-k)/2,c=a.x-(c+h),n=a.y-(n+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=c*c/(h*h)+n*n/(k*k))return w.Db(f),!1;h+=d;k+=d}null!==this.stroke&&(h+=e,k+=e);w.Db(f);return 0>=h||0>=k?!1:1>=c*c/(h*h)+n*n/(k*k)}if(c.type=== Be)return w.Db(f),null===this.fill?uf(c,a.x,a.y,e):c.Ha(a,e,1=this.kb)n=je(p.xc,p.Gc,p.yb,p.Gb,f,h,k,l,e);else{var r=0,s=0;p.xc===p.yb?(r=m,s=0):(b=(p.Gb-p.Gc)/(p.yb-p.xc),s=m/Math.sqrt(1+b*b),r=s*b);d=w.lb();b=new z;je(p.xc+ +d=l,c=h.copy(),h=h.cb,e/=h.width,d/=h.height,isFinite(e)||(e=1),isFinite(d)||(d=1),1===e&&1===d||c.scale(e,d),this.hb=c):null!==this.hb&&Va(this.hb.Qo,a-f)&&Va(this.hb.Oo,b-f)||(this.hb=X.makeGeometry(this,k,l));h=this.hb.cb;Infinity===a||Infinity===b?zo(this,h.x-f/2,h.y-f/2,0===a&&0===k?0:h.width+f,0===b&&0===l?0:h.height+f):zo(this,-(f/2),-(f/2),m+f,n+f)}; +function Op(a,b,c,d){if(!1!==Am(a)){a.qd.Ra();var e=a.fi;0===e&&d instanceof hh&&d.type===hj&&d.rb instanceof X&&(e=d.rb.kb);e*=a.tb;d instanceof W&&null!==d.hb?(b=d.hb.cb,zo(a,b.x-e/2,b.y-e/2,b.width+e,b.height+e)):zo(a,-(e/2),-(e/2),b+e,c+e);a.qd.freeze();a.qd.H()||w.k("Non-real measuredBounds has been set. Object "+a+", measuredBounds: "+a.qd.toString());$l(a,!1)}}function Oj(a){var b=a.mA;return null!==a.Mf?b===mo?De:b:b===mo?Qd[a.Cb].Zd:b}X.prototype.ij=function(a,b,c,d){Eo(this,a,b,c,d)}; +X.prototype.getNearestIntersectionPoint=X.prototype.SE=function(a,b,c){return this.An(a.x,a.y,b.x,b.y,c)}; +X.prototype.An=function(a,b,c,d,e){var f=this.transform,h=1/(f.m11*f.m22-f.m12*f.m21),k=f.m22*h,l=-f.m12*h,m=-f.m21*h,n=f.m11*h,p=h*(f.m21*f.dy-f.m22*f.dx),q=h*(f.m12*f.dx-f.m11*f.dy),f=a*k+b*m+p,h=a*l+b*n+q,k=c*k+d*m+p,l=c*l+d*n+q,m=this.kb/2,p=this.hb;null===p&&(wk(this,Infinity,Infinity),p=this.hb);q=p.cb;n=!1;if(p.type===Ee)if(1.5>=this.kb)n=je(p.xc,p.Gc,p.yb,p.Gb,f,h,k,l,e);else{var r=0,s=0;p.xc===p.yb?(r=m,s=0):(b=(p.Gb-p.Gc)/(p.yb-p.xc),s=m/Math.sqrt(1+b*b),r=s*b);d=w.lb();b=new z;je(p.xc+ r,p.Gc+s,p.yb+r,p.Gb+s,f,h,k,l,b)&&d.push(b);b=new z;je(p.xc-r,p.Gc-s,p.yb-r,p.Gb-s,f,h,k,l,b)&&d.push(b);b=new z;je(p.xc+r,p.Gc+s,p.xc-r,p.Gc-s,f,h,k,l,b)&&d.push(b);b=new z;je(p.yb+r,p.Gb+s,p.yb-r,p.Gb-s,f,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return w.wa(d),!1;n=!0;s=Infinity;for(r=0;rMath.abs(c)){n=h-b-c*(f-d);if(0>a*a*c*c+t*t-n*n){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+t*t-n*n);k=(-(a*a*c*n)+a*t*m)/(t*t+a*a*c*c)+d;a=(-(a*a*c*n)-a*t*m)/(t*t+a*a*c*c)+d;l=c*(k-d)+n+b;b=c*(a-d)+n+b;d=Math.abs((f-k)*(f-k))+Math.abs((h-l)*(h-l));h=Math.abs((f-a)*(f-a))+Math.abs((h-b)*(h- b));dk){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(k);l=b+m;b-=m;d=Math.abs(l-h);h=Math.abs(b-h);dc?a-c:c-a)<(b>d?b-d:d-b)?(e=be||Va(l.y,e))&&(l.ye||Va(l.x,e))&&(l.x=h&&d<=a}a=h&&f<=a} -X.prototype.ME=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.vk(a,!0))return!0;var e=a.vf(b);b=e;1.5e)return!0;return!1}if(c&&null!==this.fill&&this.uk(a,!0))return!0;var e=a.vf(b);b=e;1.5=e||Na(b,f,0,-p)>=e||Na(b,f,0,p)>=e||Na(b,f,n,0)>= -e?!1:!0}else if(f.type===Be){h=f.cb;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&Ma(a.x,a.y,k,l,m,l)>e&&Ma(a.x,a.y,m,h,k,h)>e&&Ma(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?uf(f,a.x,a.y,b):f.Ha(a,b,!0))return!0}else{c=f.dc;for(b=0;be)return!1;l=k.vb.n;m=l.length;for(h=0;he)return!1;break;case nf:f=w.lb(); -Xd(n,p,q.sc,q.Pc,q.Ah,q.Bh,q.D,q.F,.8,f);n=d(f,a);w.wa(f);if(n)return!1;n=q.D;p=q.F;if(a.Rp(n,p)>e)return!1;break;case of:f=w.lb();ge(n,p,q.sc,q.Pc,q.D,q.F,.8,f);n=d(f,a);w.wa(f);if(n)return!1;n=q.D;p=q.F;if(a.Rp(n,p)>e)return!1;break;case pf:case qf:var r=q.type===pf?rf(q,k):sf(q,k,n,p),s=r.length;if(0===s){n=q.ka;p=q.ra;if(a.Rp(n,p)>e)return!1;break}q=null;f=w.lb();for(b=0;bm&&a.xh&&a.ye&&Ma(a.x,a.y,k,l,m,l)>e&&Ma(a.x,a.y,m,h,k,h)>e&&Ma(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?uf(f,a.x,a.y,b):f.Ha(a,b,!0))return!0}else{c=f.dc;for(b=0;be)return!1;l=k.vb.n;m=l.length;for(h=0;he)return!1;break;case nf:f=w.lb(); +Xd(n,p,q.sc,q.Pc,q.Ah,q.Bh,q.D,q.F,.8,f);n=d(f,a);w.wa(f);if(n)return!1;n=q.D;p=q.F;if(a.Qp(n,p)>e)return!1;break;case of:f=w.lb();ge(n,p,q.sc,q.Pc,q.D,q.F,.8,f);n=d(f,a);w.wa(f);if(n)return!1;n=q.D;p=q.F;if(a.Qp(n,p)>e)return!1;break;case pf:case qf:var r=q.type===pf?rf(q,k):sf(q,k,n,p),s=r.length;if(0===s){n=q.ka;p=q.ra;if(a.Qp(n,p)>e)return!1;break}q=null;f=w.lb();for(b=0;b= 0",X,"strokeWidth:value")});w.defineProperty(X,{KL:"strokeCap"},function(){return this.tp},function(a){var b=this.tp;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?w.Ea(a,'"butt", "round", or "square"',X,"strokeCap"):(this.tp=a,this.na(),this.h("strokeCap",b,a)))}); -w.defineProperty(X,{ML:"strokeJoin"},function(){return this.wp},function(a){var b=this.wp;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?w.Ea(a,'"miter", "bevel", or "round"',X,"strokeJoin"):(this.wp=a,this.na(),this.h("strokeJoin",b,a)))});w.defineProperty(X,{NL:"strokeMiterLimit"},function(){return this.cn},function(a){var b=this.cn;if(b!==a)if(1<=a){this.cn=a;this.na();var c=this.U;null!==c&&(c.ck=NaN);this.h("strokeMiterLimit",b,a)}else w.Ea(a,"value >= 1",X,"strokeWidth:value")}); -w.defineProperty(X,{mG:"strokeDashArray"},function(){return this.vp},function(a){var b=this.vp;if(b!==a){null===a||Array.isArray(a)||w.yd(a,"Array",X,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e= 0",X,"strokeWidth:value")});w.defineProperty(X,{LL:"strokeCap"},function(){return this.sp},function(a){var b=this.sp;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?w.Ea(a,'"butt", "round", or "square"',X,"strokeCap"):(this.sp=a,this.na(),this.h("strokeCap",b,a)))}); +w.defineProperty(X,{NL:"strokeJoin"},function(){return this.vp},function(a){var b=this.vp;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?w.Ea(a,'"miter", "bevel", or "round"',X,"strokeJoin"):(this.vp=a,this.na(),this.h("strokeJoin",b,a)))});w.defineProperty(X,{OL:"strokeMiterLimit"},function(){return this.cn},function(a){var b=this.cn;if(b!==a)if(1<=a){this.cn=a;this.na();var c=this.U;null!==c&&(c.bk=NaN);this.h("strokeMiterLimit",b,a)}else w.Ea(a,"value >= 1",X,"strokeWidth:value")}); +w.defineProperty(X,{mG:"strokeDashArray"},function(){return this.tp},function(a){var b=this.tp;if(b!==a){null===a||Array.isArray(a)||w.yd(a,"Array",X,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1a?a=0:1a?a=0:1a?a=0:1a?a=0:1a?a=0:1n*l*l&&(h=!0);b.rf!==a&&(h=!1);!1===b.pj("textGreeking")&&(h=!1);n=this.bi;l=this.ci;switch(this.Ot){case qo:a.translate(c, -0);a.scale(-1,1);break;case po:a.translate(0,d);a.scale(1,-1);break;case ro:a.translate(c,d),a.scale(-1,-1)}var m=this.je,p=(n+e+l)*m;d>p&&(k=this.Al,k=k.y*d-k.y*p+k.offsetY);for(var p=this.Oi,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,x=c,v=e,B=f,y=0;h?("left"===B?y=0:"right"===B?y=x-r:"center"===B&&(y=(x-r)/2),s.fillRect(0+y,t+.25*v,r,1)):("left"===B?y=0:"right"===B?y=x:"center"===B&&(y=x/2),s.fillText(u,0+y,t+v-.25*v),u=v/20|0,0===u&&(u=1),"right"===B?y-=r:"center"=== -B&&(y-=r/2),this.Zj&&(s.beginPath(),s.lineWidth=u,s.moveTo(0+y,t+v-.2*v),s.lineTo(0+y+r,t+v-.2*v),s.stroke()),this.Yj&&(s.beginPath(),s.lineWidth=u,t=t+v-v/2.2|0,0!==u%2&&(t+=.5),s.moveTo(0+y,t),s.lineTo(0+y+r,t),s.stroke()));k+=e+l}switch(this.Ot){case qo:a.scale(-1,1);a.translate(-c,0);break;case po:a.scale(1,-1);a.translate(0,-d);break;case ro:a.scale(-1,-1),a.translate(-c,-d)}}}; +Hh.prototype.xk=function(a,b){if(null!==this.qc&&0!==this.Ed.length&&null!==this.ng){var c=this.Ia.width,d=this.Ia.height,e=Eq(this),f=a.textAlign=this.vl,h=b.Kr;"start"===f&&(f=h?"right":"left");"end"===f&&(f=h?"left":"right");Lo(this,a,this.qc,!0,!1);(this.Yj||this.Xj)&&Lo(this,a,this.qc,!1,!1);var k=0,h=!1,l=w.xb(0,0);this.ph.nb(l);var m=w.xb(0,e);this.ph.nb(m);var n=l.vf(m);w.v(l);w.v(m);l=b.scale;8>n*l*l&&(h=!0);b.rf!==a&&(h=!1);!1===b.pj("textGreeking")&&(h=!1);n=this.bi;l=this.ci;switch(this.Ot){case qo:a.translate(c, +0);a.scale(-1,1);break;case po:a.translate(0,d);a.scale(1,-1);break;case ro:a.translate(c,d),a.scale(-1,-1)}var m=this.je,p=(n+e+l)*m;d>p&&(k=this.zl,k=k.y*d-k.y*p+k.offsetY);for(var p=this.Oi,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,x=c,v=e,B=f,y=0;h?("left"===B?y=0:"right"===B?y=x-r:"center"===B&&(y=(x-r)/2),s.fillRect(0+y,t+.25*v,r,1)):("left"===B?y=0:"right"===B?y=x:"center"===B&&(y=x/2),s.fillText(u,0+y,t+v-.25*v),u=v/20|0,0===u&&(u=1),"right"===B?y-=r:"center"=== +B&&(y-=r/2),this.Yj&&(s.beginPath(),s.lineWidth=u,s.moveTo(0+y,t+v-.2*v),s.lineTo(0+y+r,t+v-.2*v),s.stroke()),this.Xj&&(s.beginPath(),s.lineWidth=u,t=t+v-v/2.2|0,0!==u%2&&(t+=.5),s.moveTo(0+y,t),s.lineTo(0+y+r,t),s.stroke()));k+=e+l}switch(this.Ot){case qo:a.scale(-1,1);a.translate(-c,0);break;case po:a.scale(1,-1);a.translate(0,-d);break;case ro:a.scale(-1,-1),a.translate(-c,-d)}}}; Hh.prototype.computeAngle=function(a,b){var c=0;switch(a){default:case kj:c=0;break;case nq:c=b;break;case Pp:c=b+90;break;case Rp:c=b-90;break;case Fq:c=b+180;break;case Gq:c=we(b);90c&&(c-=180);break;case Qp:c=we(b+90);90c&&(c-=180);break;case Sp:c=we(b-90);90c&&(c-=180);break;case Tp:c=we(b);if(45c||225c)return 0;90c&&(c-=180)}return we(c)}; -Hh.prototype.Nn=function(a,b,c,d){this.Yo=a;var e=this.Oi;e.reset();var f=0,h=0;if(isNaN(this.Ba.width)){f=this.Ed.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===f.length)f=0;else if(this.Ax){for(var k=h=0,l=!1;!l;){var m=f.indexOf("\n",k);-1===m&&(m=f.length,l=!0);k=Hq(f.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.ng);k>h&&(h=k);k=m+1}f=h}else h=f.indexOf("\n",0),0<=h&&(f=f.substr(0,h)),f=k=Hq(f,this.ng);f=Math.min(f,a/this.scale);f=Math.max(8,f)}else f=this.Ba.width;null!==this.O&&(f=Math.min(f, -this.O.Bf.width),f=Math.max(f,this.O.zh.width));h=Dq(this,f,e);m=h=isNaN(this.Ba.height)?Math.min(h,b/this.scale):this.Ba.height;if(0!==e.ef&&1!==e.Qe.length&&this.Xi===Bq&&(b=this.ng,l=this.Xi===Bq?Iq(b):0,k=this.bi+this.ci,k=Math.max(0,Eq(this)+k),m=Math.min(this.MI-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Qe.length))){k=e.Qe[m];for(a=Math.max(1,a-l);Hq(k,b)>a&&1h&&(h=k);k=m+1}f=h}else h=f.indexOf("\n",0),0<=h&&(f=f.substr(0,h)),f=k=Hq(f,this.ng);f=Math.min(f,a/this.scale);f=Math.max(8,f)}else f=this.Ba.width;null!==this.O&&(f=Math.min(f, +this.O.Bf.width),f=Math.max(f,this.O.zh.width));h=Dq(this,f,e);m=h=isNaN(this.Ba.height)?Math.min(h,b/this.scale):this.Ba.height;if(0!==e.ef&&1!==e.Qe.length&&this.Xi===Bq&&(b=this.ng,l=this.Xi===Bq?Iq(b):0,k=this.bi+this.ci,k=Math.max(0,Eq(this)+k),m=Math.min(this.NI-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Qe.length))){k=e.Qe[m];for(a=Math.max(1,a-l);Hq(k,b)>a&&1=a.fh)return new ha(0,l);if(a.rk===zq){c.gj=1;f=Hq(b,k);if(0===h||f<=d)return c.ef=f,c.qf.push(c.ef),c.Qe.push(b),new ha(f,l);var m=Jq(b);b=b.substr(m.length);for(var n=Jq(b),f=Hq(m+n,k);0d&&1=a.fh)return new ha(0,l);if(a.qk===zq){c.gj=1;f=Hq(b,k);if(0===h||f<=d)return c.ef=f,c.qf.push(c.ef),c.Qe.push(b),new ha(f,l);var m=Jq(b);b=b.substr(m.length);for(var n=Jq(b),f=Hq(m+n,k);0d&&1d;){n=1;f=Hq(m.substr(0,n),k);for(h=0;f<=d;)n++,h=f,f=Hq(m.substr(0,n),k);1===n?(c.qf[a.je+p]=f,e=Math.max(e,f)):(c.qf[a.je+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Qe[a.je+p]=m.substr(0,n);p++;m=m.substr(n);if(a.je+p>a.fh)break}n=Jq(b);for(f=Hq(m+n,k);0a.fh))break}c.gj=Math.min(a.fh,p);c.ef=Math.max(c.ef,e);return new ha(c.ef,l*c.gj)}function Jq(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)} function Hq(a,b){xq!==b&&(xq=yq.font=b);return yq.measureText(a).width}function Eq(a){if(null!==a.wm)return a.wm;var b=a.ng;xq!==b&&(xq=yq.font=b);var c=0;void 0!==sq[b]&&5E3>tq?c=sq[b]:(c=1.3*yq.measureText("M").width,sq[b]=c,tq++);return a.wm=c}function Iq(a){xq!==a&&(xq=yq.font=a);var b=0;void 0!==uq[a]&&5E3>vq?b=uq[a]:(b=yq.measureText(wq).width,uq[a]=b,vq++);return b} -function Dq(a,b,c){var d=a.Ed.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.bi+a.ci,e=Math.max(0,Eq(a)+e);if(0===d.length)return c.ef=0,a.je=1,e;if(!a.Ax){var f=d.indexOf("\n",0);0<=f&&(d=d.substr(0,f))}for(var f=0,h=a.je=0,k=-1,l=!1;!l;)k=d.indexOf("\n",h),-1===k&&(k=d.length,l=!0),h<=k&&(h=d.substr(h,k-h),a.rk!==zq?(c.gj=0,h=Cq(a,h,c,b),f+=h.height,a.je+=c.gj):(Cq(a,h,c,b),f+=e,a.je++),a.je===a.fh&&(l=!0)),h=k+1;return a.Xv=f} -w.defineProperty(Hh,{pB:"textValidation"},function(){return this.xl},function(a){var b=this.xl;b!==a&&(null!==a&&w.j(a,"function",Hh,"textValidation"),this.xl=a,this.h("textValidation",b,a))});w.defineProperty(Hh,{nG:"textEdited"},function(){return this.it},function(a){var b=this.it;b!==a&&(null!==a&&w.j(a,"function",Hh,"textEdited"),this.it=a,this.h("textEdited",b,a))}); -w.defineProperty(Hh,{HL:"spacingAbove"},function(){return this.bi},function(a){var b=this.bi;b!==a&&(this.bi=a,this.h("spacingAbove",b,a))});w.defineProperty(Hh,{IL:"spacingBelow"},function(){return this.ci},function(a){var b=this.ci;b!==a&&(this.ci=a,this.h("spacingBelow",b,a))});w.defineProperty(Hh,{MI:"maxLines"},function(){return this.fh},function(a){var b=this.fh;b!==a&&(a=Math.floor(a),0>=a&&w.Ea(a,"> 0",Hh,"maxLines"),this.fh=a,this.h("maxLines",b,a),this.I())});w.u(Hh,{lL:"metrics"},function(){return this.Oi}); -w.defineProperty(Hh,{xK:"choices"},function(){return this.Rq},function(a){var b=this.Rq;b!==a&&(null===a||Array.isArray(a)||w.yd(a,"Array",Hh,"choices:value"),this.Rq=a,this.h("choices",b,a))});function Up(){this.ef=this.gj=0;this.qf=[];this.Qe=[]}Up.prototype.reset=function(){this.ef=this.gj=0;this.qf=[];this.Qe=[]};Up.prototype.Lp=function(a){this.gj=a.gj;this.ef=a.ef;this.qf=w.Il(a.qf);this.Qe=w.Il(a.Qe)};w.u(Up,{tK:"arrSize"},function(){return this.qf});w.u(Up,{uK:"arrText"},function(){return this.Qe}); -w.u(Up,{kL:"maxLineWidth"},function(){return this.ef});function wl(){G.call(this);this.Se=null;this.bt="";this.jk=Nd;this.Mo=De;this.gi=this.Te=null;this.Lo=Gb;this.mg=Nj;this.xp=null;this.hz=!1;this.yv=!0;this.Vv=!1;this.op=null}w.La(wl,G);w.fa("Picture",wl);wl.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.element=this.Se;a.bt=this.bt;a.jk=this.jk.S();a.Mo=this.Mo;a.mg=this.mg;a.Te=this.Te;a.gi=this.gi;a.Lo=this.Lo.S();a.yv=this.yv;a.op=this.op}; +function Dq(a,b,c){var d=a.Ed.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.bi+a.ci,e=Math.max(0,Eq(a)+e);if(0===d.length)return c.ef=0,a.je=1,e;if(!a.Ax){var f=d.indexOf("\n",0);0<=f&&(d=d.substr(0,f))}for(var f=0,h=a.je=0,k=-1,l=!1;!l;)k=d.indexOf("\n",h),-1===k&&(k=d.length,l=!0),h<=k&&(h=d.substr(h,k-h),a.qk!==zq?(c.gj=0,h=Cq(a,h,c,b),f+=h.height,a.je+=c.gj):(Cq(a,h,c,b),f+=e,a.je++),a.je===a.fh&&(l=!0)),h=k+1;return a.Xv=f} +w.defineProperty(Hh,{pB:"textValidation"},function(){return this.wl},function(a){var b=this.wl;b!==a&&(null!==a&&w.j(a,"function",Hh,"textValidation"),this.wl=a,this.h("textValidation",b,a))});w.defineProperty(Hh,{nG:"textEdited"},function(){return this.it},function(a){var b=this.it;b!==a&&(null!==a&&w.j(a,"function",Hh,"textEdited"),this.it=a,this.h("textEdited",b,a))}); +w.defineProperty(Hh,{IL:"spacingAbove"},function(){return this.bi},function(a){var b=this.bi;b!==a&&(this.bi=a,this.h("spacingAbove",b,a))});w.defineProperty(Hh,{JL:"spacingBelow"},function(){return this.ci},function(a){var b=this.ci;b!==a&&(this.ci=a,this.h("spacingBelow",b,a))});w.defineProperty(Hh,{NI:"maxLines"},function(){return this.fh},function(a){var b=this.fh;b!==a&&(a=Math.floor(a),0>=a&&w.Ea(a,"> 0",Hh,"maxLines"),this.fh=a,this.h("maxLines",b,a),this.I())});w.u(Hh,{mL:"metrics"},function(){return this.Oi}); +w.defineProperty(Hh,{yK:"choices"},function(){return this.Rq},function(a){var b=this.Rq;b!==a&&(null===a||Array.isArray(a)||w.yd(a,"Array",Hh,"choices:value"),this.Rq=a,this.h("choices",b,a))});function Up(){this.ef=this.gj=0;this.qf=[];this.Qe=[]}Up.prototype.reset=function(){this.ef=this.gj=0;this.qf=[];this.Qe=[]};Up.prototype.Kp=function(a){this.gj=a.gj;this.ef=a.ef;this.qf=w.Hl(a.qf);this.Qe=w.Hl(a.Qe)};w.u(Up,{uK:"arrSize"},function(){return this.qf});w.u(Up,{vK:"arrText"},function(){return this.Qe}); +w.u(Up,{lL:"maxLineWidth"},function(){return this.ef});function wl(){G.call(this);this.Se=null;this.bt="";this.ik=Nd;this.Lo=De;this.gi=this.Te=null;this.Ko=Gb;this.mg=Nj;this.wp=null;this.hz=!1;this.yv=!0;this.Vv=!1;this.np=null}w.Ka(wl,G);w.fa("Picture",wl);wl.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.element=this.Se;a.bt=this.bt;a.ik=this.ik.S();a.Lo=this.Lo;a.mg=this.mg;a.Te=this.Te;a.gi=this.gi;a.Ko=this.Ko.S();a.yv=this.yv;a.np=this.np}; wl.prototype.gc=function(a){a===Nj||a===Pj||a===Qj?this.kI=a:G.prototype.gc.call(this,a)};wl.prototype.toString=function(){return"Picture("+this.source+")#"+w.Kd(this)};var Kq=new sa,Lq=0,ql=[];function Mq(){var a=ql;if(0===a.length)for(var b=window.document.getElementsByTagName("canvas"),c=b.length,d=0;d=d.width&&(e=e+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(f=f+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case De:n=d.width;p=d.height;break;case Pj:case Qj:var s=0;q===Pj?(s=Math.min(d.height/p,d.width/n),n*=s,p*=s):q===Qj&&(s=Math.max(d.height/p,d.width/n),n*=s,p*=s,n>=d.width&&(e=(e+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(f=(f+r.offsetY+(p*r.y-d.height*r.y)/p)*h),k*=1/(n/d.width),h*=1/(p/d.height), -n=d.width,p=d.height)}var q=this.oj()*b.scale,u=k*h/(n*q*p*q),s=Kq[this.source],q=null;if(void 0!==s&&16s.Gp.length&&(Rq(s,4,l,m),Rq(s,16,l,m));for(var l=s.Gp,m=l.length,q=l[0],t=0;t=d.width&&(e=e+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(f=f+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case De:n=d.width;p=d.height;break;case Pj:case Qj:var s=0;q===Pj?(s=Math.min(d.height/p,d.width/n),n*=s,p*=s):q===Qj&&(s=Math.max(d.height/p,d.width/n),n*=s,p*=s,n>=d.width&&(e=(e+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(f=(f+r.offsetY+(p*r.y-d.height*r.y)/p)*h),k*=1/(n/d.width),h*=1/(p/d.height), +n=d.width,p=d.height)}var q=this.oj()*b.scale,u=k*h/(n*q*p*q),s=Kq[this.source],q=null;if(void 0!==s&&16s.Fp.length&&(Rq(s,4,l,m),Rq(s,16,l,m));for(var l=s.Fp,m=l.length,q=l[0],t=0;th&&a.y>k&&a.righth&&b.y>k&&b.righth&&a.y>k&&a.righth&&b.y>k&&b.right=c.OI)){this.N^=4096;var d=!1;if(null!==c){d=c.wb;c.wb=!0;var e=c.selection;e.Ra();a?e.add(this):e.remove(this);e.freeze()}this.h("isSelected",b,a);this.ce();a=this.yJ;null!==a&&a(this);null!==c&&(c.Le(),c.wb=d)}}}); -w.defineProperty(S,{Mg:"isHighlighted"},function(){return 0!==(this.N&524288)},function(a){var b=0!==(this.N&524288);if(b!==a){this.N^=524288;var c=this.g;null!==c&&(c=c.Vl,c.Ra(),a?c.add(this):c.remove(this),c.freeze());this.h("isHighlighted",b,a);this.na();a=this.iI;null!==a&&a(this)}});w.defineProperty(S,{Zl:"isShadowed"},function(){return 0!==(this.N&8192)},function(a){var b=0!==(this.N&8192);b!==a&&(this.N^=8192,this.h("isShadowed",b,a),this.na())});function Cm(a){return 0!==(a.N&32768)} +w.defineProperty(S,{mJ:"reshapable"},function(){return 0!==(this.N&512)},function(a){var b=0!==(this.N&512);b!==a&&(this.N^=512,this.h("reshapable",b,a),this.ce())});w.defineProperty(S,{nJ:"resizable"},function(){return 0!==(this.N&1024)},function(a){var b=0!==(this.N&1024);b!==a&&(this.N^=1024,this.h("resizable",b,a),this.ce())});w.defineProperty(S,{qJ:"rotatable"},function(){return 0!==(this.N&2048)},function(a){var b=0!==(this.N&2048);b!==a&&(this.N^=2048,this.h("rotatable",b,a),this.ce())}); +w.defineProperty(S,{fb:"isSelected"},function(){return 0!==(this.N&4096)},function(a){var b=0!==(this.N&4096);if(b!==a){var c=this.g;if(!a||this.canSelect()&&!(null!==c&&c.selection.count>=c.QI)){this.N^=4096;var d=!1;if(null!==c){d=c.wb;c.wb=!0;var e=c.selection;e.Ra();a?e.add(this):e.remove(this);e.freeze()}this.h("isSelected",b,a);this.ce();a=this.zJ;null!==a&&a(this);null!==c&&(c.Le(),c.wb=d)}}}); +w.defineProperty(S,{Mg:"isHighlighted"},function(){return 0!==(this.N&524288)},function(a){var b=0!==(this.N&524288);if(b!==a){this.N^=524288;var c=this.g;null!==c&&(c=c.Vl,c.Ra(),a?c.add(this):c.remove(this),c.freeze());this.h("isHighlighted",b,a);this.na();a=this.iI;null!==a&&a(this)}});w.defineProperty(S,{$l:"isShadowed"},function(){return 0!==(this.N&8192)},function(a){var b=0!==(this.N&8192);b!==a&&(this.N^=8192,this.h("isShadowed",b,a),this.na())});function Cm(a){return 0!==(a.N&32768)} function $q(a,b){a.N=b?a.N|32768:a.N&-32769}function Fo(a,b){a.N=b?a.N|65536:a.N&-65537}function il(a){return 0!==(a.N&131072)}S.prototype.Cf=function(a){this.N=a?this.N|131072:this.N&-131073};function ir(a,b){a.N=b?a.N|1048576:a.N&-1048577}w.defineProperty(S,{fF:"isAnimated"},function(){return 0!==(this.N&262144)},function(a){var b=0!==(this.N&262144);b!==a&&(this.N^=262144,this.h("isAnimated",b,a))}); w.defineProperty(S,{iI:"highlightedChanged"},function(){return this.Fr},function(a){var b=this.Fr;b!==a&&(null!==a&&w.j(a,"function",S,"highlightedChanged"),this.Fr=a,this.h("highlightedChanged",b,a))});w.defineProperty(S,{cB:"selectionObjectName"},function(){return this.Us},function(a){var b=this.Us;b!==a&&(this.Us=a,this.Zm=null,this.h("selectionObjectName",b,a))}); -w.defineProperty(S,{xJ:"selectionAdornmentTemplate"},function(){return this.Ss},function(a){var b=this.Ss;b!==a&&(this instanceof W&&(a.type=hj),this.Ss=a,this.h("selectionAdornmentTemplate",b,a))});w.u(S,{Eu:"selectionObject"},function(){if(null===this.Zm){var a=this.cB;null!==a&&""!==a?(a=this.ud(a),this.Zm=null!==a?a:this):this instanceof W?(a=this.path,this.Zm=null!==a?a:this):this.Zm=this}return this.Zm}); -w.defineProperty(S,{yJ:"selectionChanged"},function(){return this.Ts},function(a){var b=this.Ts;b!==a&&(null!==a&&w.j(a,"function",S,"selectionChanged"),this.Ts=a,this.h("selectionChanged",b,a))});w.defineProperty(S,{UF:"resizeAdornmentTemplate"},function(){return this.Gs},function(a){var b=this.Gs;b!==a&&(this.Gs=a,this.h("resizeAdornmentTemplate",b,a))}); -w.defineProperty(S,{WF:"resizeObjectName"},function(){return this.Is},function(a){var b=this.Is;b!==a&&(this.Is=a,this.kp=null,this.h("resizeObjectName",b,a))});w.u(S,{VF:"resizeObject"},function(){if(null===this.kp){var a=this.WF;null!==a&&""!==a?(a=this.ud(a),this.kp=null!==a?a:this):this.kp=this}return this.kp});w.defineProperty(S,{nJ:"resizeCellSize"},function(){return this.Hs},function(a){var b=this.Hs;b.L(a)||(this.Hs=a=a.S(),this.h("resizeCellSize",b,a))}); -w.defineProperty(S,{qJ:"rotateAdornmentTemplate"},function(){return this.Js},function(a){var b=this.Js;b!==a&&(this.Js=a,this.h("rotateAdornmentTemplate",b,a))});w.defineProperty(S,{rJ:"rotateObjectName"},function(){return this.Ks},function(a){var b=this.Ks;b!==a&&(this.Ks=a,this.lp=null,this.h("rotateObjectName",b,a))});w.u(S,{YF:"rotateObject"},function(){if(null===this.lp){var a=this.rJ;null!==a&&""!==a?(a=this.ud(a),this.lp=null!==a?a:this):this.lp=this}return this.lp}); +w.defineProperty(S,{yJ:"selectionAdornmentTemplate"},function(){return this.Ss},function(a){var b=this.Ss;b!==a&&(this instanceof W&&(a.type=hj),this.Ss=a,this.h("selectionAdornmentTemplate",b,a))});w.u(S,{Eu:"selectionObject"},function(){if(null===this.Zm){var a=this.cB;null!==a&&""!==a?(a=this.ud(a),this.Zm=null!==a?a:this):this instanceof W?(a=this.path,this.Zm=null!==a?a:this):this.Zm=this}return this.Zm}); +w.defineProperty(S,{zJ:"selectionChanged"},function(){return this.Ts},function(a){var b=this.Ts;b!==a&&(null!==a&&w.j(a,"function",S,"selectionChanged"),this.Ts=a,this.h("selectionChanged",b,a))});w.defineProperty(S,{UF:"resizeAdornmentTemplate"},function(){return this.Gs},function(a){var b=this.Gs;b!==a&&(this.Gs=a,this.h("resizeAdornmentTemplate",b,a))}); +w.defineProperty(S,{WF:"resizeObjectName"},function(){return this.Is},function(a){var b=this.Is;b!==a&&(this.Is=a,this.jp=null,this.h("resizeObjectName",b,a))});w.u(S,{VF:"resizeObject"},function(){if(null===this.jp){var a=this.WF;null!==a&&""!==a?(a=this.ud(a),this.jp=null!==a?a:this):this.jp=this}return this.jp});w.defineProperty(S,{oJ:"resizeCellSize"},function(){return this.Hs},function(a){var b=this.Hs;b.L(a)||(this.Hs=a=a.S(),this.h("resizeCellSize",b,a))}); +w.defineProperty(S,{rJ:"rotateAdornmentTemplate"},function(){return this.Js},function(a){var b=this.Js;b!==a&&(this.Js=a,this.h("rotateAdornmentTemplate",b,a))});w.defineProperty(S,{sJ:"rotateObjectName"},function(){return this.Ks},function(a){var b=this.Ks;b!==a&&(this.Ks=a,this.kp=null,this.h("rotateObjectName",b,a))});w.u(S,{YF:"rotateObject"},function(){if(null===this.kp){var a=this.sJ;null!==a&&""!==a?(a=this.ud(a),this.kp=null!==a?a:this):this.kp=this}return this.kp}); w.defineProperty(S,{text:"text"},function(){return this.Ed},function(a){var b=this.Ed;b!==a&&(this.Ed=a,this.h("text",b,a))}); -w.defineProperty(S,{Ka:"containingGroup"},function(){return this.Zk},function(a){if(this.de()){var b=this.Zk;if(b!==a){null===a||this!==a&&!a.mi(this)||(this===a&&w.k("Cannot make a Group a member of itself: "+this.toString()),w.k("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.J(Sm);var c=this.g;null!==b?jr(b,this):this instanceof U&&null!==c&&c.yl.remove(this);this.Zk=a;null!==a?kr(a,this):this instanceof U&&null!==c&&c.yl.add(this);this.J(Jm); +w.defineProperty(S,{Pa:"containingGroup"},function(){return this.Yk},function(a){if(this.de()){var b=this.Yk;if(b!==a){null===a||this!==a&&!a.mi(this)||(this===a&&w.k("Cannot make a Group a member of itself: "+this.toString()),w.k("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.J(Sm);var c=this.g;null!==b?jr(b,this):this instanceof U&&null!==c&&c.xl.remove(this);this.Yk=a;null!==a?kr(a,this):this instanceof U&&null!==c&&c.xl.add(this);this.J(Jm); if(null!==c){var d=this.data,e=c.ba;null!==d&&e instanceof P&&e.fB(d,e.ub(null!==a?a.data:null))}d=this.sE;null!==d&&(e=!0,null!==c&&(e=c.Ua,c.Ua=!0),d(this,b,a),null!==c&&(c.Ua=e));if(this instanceof U)for(c=new J(S),gh(c,this,!0,0,!0),c=c.i;c.next();)if(d=c.value,d instanceof T)for(d=d.fe;d.next();)nn(d.value);if(this instanceof T)for(d=this.fe;d.next();)nn(d.value);this.h("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&nl(b,-1,a))}}else w.k("cannot set the Part.containingGroup of a Link or Adornment")}); -g=S.prototype;g.Ek=function(){var a=this.Ka;null!==a&&(a.I(),null!==a.Kb&&a.Kb.I(),a.Uf())};g.na=function(){var a=this.g;null!==a&&!Bm(this)&&!Cm(this)&&this.isVisible()&&this.nc.H()&&a.na(ml(this,this.nc))};g.I=function(){C.prototype.I.call(this);var a=this.g;null!==a&&(a.sg.add(this),this instanceof T&&null!==this.Mc&&Po(this.Mc),a.Le(!0))};g.Wt=function(a){a||(a=this.Zk,null!==a&&kr(a,this))};g.Xt=function(a){a||(a=this.Zk,null!==a&&jr(a,this))}; -g.vn=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.ba,null!==b&&b.Zx(a))}};w.defineProperty(S,{sE:"containingGroupChanged"},function(){return this.Uq},function(a){var b=this.Uq;b!==a&&(null!==a&&w.j(a,"function",S,"containingGroupChanged"),this.Uq=a,this.h("containingGroupChanged",b,a))});S.prototype.findSubGraphLevel=function(){return lr(this,this)};function lr(a,b){var c=b.Ka;return null!==c?1+lr(a,c):b instanceof T&&(c=b.Mc,null!==c)?lr(a,c):0} -S.prototype.findTopLevelPart=function(){return mr(this,this)};function mr(a,b){var c=b.Ka;return null!==c?mr(a,c):b instanceof T&&(c=b.Mc,null!==c)?mr(a,c):b}w.u(S,{bq:"isTopLevel"},function(){return null!==this.Ka||this instanceof T&&this.mf?!1:!0});S.prototype.isMemberOf=S.prototype.mi=function(a){return a instanceof U?nr(this,this,a):!1};function nr(a,b,c){if(b===c||null===c)return!1;var d=b.Ka;return null===d||d!==c&&!nr(a,d,c)?b instanceof T&&(b=b.Mc,null!==b)?nr(a,b,c):!1:!0} -S.prototype.findCommonContainingGroup=S.prototype.PH=function(a){if(null===a)return null;if(this===a)return this.Ka;for(var b=this;null!==b;)b instanceof U&&ir(b,!0),b=b.Ka;for(var c=null,b=a;null!==b;){if(0!==(b.N&1048576)){c=b;break}b=b.Ka}for(b=this;null!==b;)b instanceof U&&ir(b,!1),b=b.Ka;return c};w.defineProperty(S,{DI:"layoutConditions"},function(){return this.Tr},function(a){var b=this.Tr;b!==a&&(this.Tr=a,this.h("layoutConditions",b,a))}); -S.prototype.canLayout=function(){if(!this.oF||!this.isVisible())return!1;var a=this.layer;return null!==a&&a.Kc||this instanceof T&&this.mf?!1:!0};S.prototype.invalidateLayout=S.prototype.J=function(a){void 0===a&&(a=16777215);var b;this.oF&&0!==(a&this.DI)?(b=this.layer,null!==b&&b.Kc||this instanceof T&&this.mf?b=!1:(b=this.g,b=null!==b&&b.oa.gb?!1:!0)):b=!1;if(b)if(b=this.Zk,null!==b){var c=b.Sb;null!==c?c.J():b.J(a)}else a=this.g,null!==a&&(c=a.Sb,null!==c&&c.J())}; -function Om(a){if(!a.isVisible())return!1;a=a.layer;return null!==a&&a.Kc?!1:!0}w.defineProperty(S,{DE:"dragComputation"},function(){return this.nr},function(a){var b=this.nr;b!==a&&(null!==a&&w.j(a,"function",S,"dragComputation"),this.nr=a,this.h("dragComputation",b,a))});w.defineProperty(S,{BJ:"shadowOffset"},function(){return this.an},function(a){var b=this.an;b.L(a)||(this.an=a=a.S(),this.na(),this.h("shadowOffset",b,a))}); -w.defineProperty(S,{shadowColor:"shadowColor"},function(){return this.$m},function(a){var b=this.$m;b!==a&&(this.$m=a,this.na(),this.h("shadowColor",b,a))});w.defineProperty(S,{shadowBlur:"shadowBlur"},function(){return this.Bg},function(a){var b=this.Bg;b!==a&&(this.Bg=a,this.na(),this.h("shadowBlur",b,a))});function hh(a){0===arguments.length?S.call(this,Sj):S.call(this,a);this.N&=-257;this.ml="Adornment";this.Dc=null;this.iD=0;this.ZD=!1;this.Kb=this.$g=null}w.La(hh,S);w.fa("Adornment",hh); +g=S.prototype;g.Dk=function(){var a=this.Pa;null!==a&&(a.I(),null!==a.Kb&&a.Kb.I(),a.Uf())};g.na=function(){var a=this.g;null!==a&&!Bm(this)&&!Cm(this)&&this.isVisible()&&this.nc.H()&&a.na(ml(this,this.nc))};g.I=function(){C.prototype.I.call(this);var a=this.g;null!==a&&(a.sg.add(this),this instanceof T&&null!==this.Mc&&Po(this.Mc),a.Le(!0))};g.Wt=function(a){a||(a=this.Yk,null!==a&&kr(a,this))};g.Xt=function(a){a||(a=this.Yk,null!==a&&jr(a,this))}; +g.vn=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.ba,null!==b&&b.Zx(a))}};w.defineProperty(S,{sE:"containingGroupChanged"},function(){return this.Uq},function(a){var b=this.Uq;b!==a&&(null!==a&&w.j(a,"function",S,"containingGroupChanged"),this.Uq=a,this.h("containingGroupChanged",b,a))});S.prototype.findSubGraphLevel=function(){return lr(this,this)};function lr(a,b){var c=b.Pa;return null!==c?1+lr(a,c):b instanceof T&&(c=b.Mc,null!==c)?lr(a,c):0} +S.prototype.findTopLevelPart=function(){return mr(this,this)};function mr(a,b){var c=b.Pa;return null!==c?mr(a,c):b instanceof T&&(c=b.Mc,null!==c)?mr(a,c):b}w.u(S,{aq:"isTopLevel"},function(){return null!==this.Pa||this instanceof T&&this.mf?!1:!0});S.prototype.isMemberOf=S.prototype.mi=function(a){return a instanceof U?nr(this,this,a):!1};function nr(a,b,c){if(b===c||null===c)return!1;var d=b.Pa;return null===d||d!==c&&!nr(a,d,c)?b instanceof T&&(b=b.Mc,null!==b)?nr(a,b,c):!1:!0} +S.prototype.findCommonContainingGroup=S.prototype.PH=function(a){if(null===a)return null;if(this===a)return this.Pa;for(var b=this;null!==b;)b instanceof U&&ir(b,!0),b=b.Pa;for(var c=null,b=a;null!==b;){if(0!==(b.N&1048576)){c=b;break}b=b.Pa}for(b=this;null!==b;)b instanceof U&&ir(b,!1),b=b.Pa;return c};w.defineProperty(S,{EI:"layoutConditions"},function(){return this.Tr},function(a){var b=this.Tr;b!==a&&(this.Tr=a,this.h("layoutConditions",b,a))}); +S.prototype.canLayout=function(){if(!this.oF||!this.isVisible())return!1;var a=this.layer;return null!==a&&a.Kc||this instanceof T&&this.mf?!1:!0};S.prototype.invalidateLayout=S.prototype.J=function(a){void 0===a&&(a=16777215);var b;this.oF&&0!==(a&this.EI)?(b=this.layer,null!==b&&b.Kc||this instanceof T&&this.mf?b=!1:(b=this.g,b=null!==b&&b.oa.gb?!1:!0)):b=!1;if(b)if(b=this.Yk,null!==b){var c=b.Sb;null!==c?c.J():b.J(a)}else a=this.g,null!==a&&(c=a.Sb,null!==c&&c.J())}; +function Om(a){if(!a.isVisible())return!1;a=a.layer;return null!==a&&a.Kc?!1:!0}w.defineProperty(S,{DE:"dragComputation"},function(){return this.nr},function(a){var b=this.nr;b!==a&&(null!==a&&w.j(a,"function",S,"dragComputation"),this.nr=a,this.h("dragComputation",b,a))});w.defineProperty(S,{CJ:"shadowOffset"},function(){return this.an},function(a){var b=this.an;b.L(a)||(this.an=a=a.S(),this.na(),this.h("shadowOffset",b,a))}); +w.defineProperty(S,{shadowColor:"shadowColor"},function(){return this.$m},function(a){var b=this.$m;b!==a&&(this.$m=a,this.na(),this.h("shadowColor",b,a))});w.defineProperty(S,{shadowBlur:"shadowBlur"},function(){return this.Bg},function(a){var b=this.Bg;b!==a&&(this.Bg=a,this.na(),this.h("shadowBlur",b,a))});function hh(a){0===arguments.length?S.call(this,Sj):S.call(this,a);this.N&=-257;this.ll="Adornment";this.Dc=null;this.iD=0;this.ZD=!1;this.Kb=this.$g=null}w.Ka(hh,S);w.fa("Adornment",hh); hh.prototype.toString=function(){var a=this.Of;return"Adornment("+this.td+")"+(null!==a?a.toString():"")};hh.prototype.updateRelationshipsFromData=function(){};hh.prototype.lu=function(a){var b=this.rb.U,c=this.rb;if(b instanceof W&&c instanceof X){var d=b.path,c=d.hf;b.lu(a);c=d.hf;a=this.xa.n;b=a.length;for(d=0;da&&(a=1);var b=this.g;if(null!==b&&!b.wh){b.wh=!0;var c=new J(T);c.add(this);zr(this,c,b.Pd,a,b.Pa,this,b.wB===tl);b.wh=!1}}; -function zr(a,b,c,d,e,f,h){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.wh){b.wh=!0;var c=new J(T);c.add(this);Br(this,c,b.Pd,a,b.Pa,this,b.wB===tl);b.wh=!1}};function Br(a,b,c,d,e,f,h){for(var k=f===a?!1:a.gd,l=c?a.kx():a.Kg();l.next();){var m=l.value;m.Lc&&(k||m.Zg||m.Yb(),m=m.oA(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.vd(!0),m.Ek(),h&&el(e,m,f)),2a&&(a=1);var b=this.g;if(null!==b&&!b.wh){b.wh=!0;var c=new J(T);c.add(this);zr(this,c,b.Pd,a,b.Oa,this,b.wB===tl);b.wh=!1}}; +function zr(a,b,c,d,e,f,h){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.wh){b.wh=!0;var c=new J(T);c.add(this);Br(this,c,b.Pd,a,b.Oa,this,b.wB===tl);b.wh=!1}};function Br(a,b,c,d,e,f,h){for(var k=f===a?!1:a.gd,l=c?a.kx():a.Kg();l.next();){var m=l.value;m.Lc&&(k||m.Zg||m.Yb(),m=m.oA(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.vd(!0),m.Dk(),h&&el(e,m,f)),2a&&(a-=180);break;case Qp:a=we(c+90);90a&&(a-=180);break;case Sp:a=we(c-90);90a&&(a-=180);break;case Tp:a=we(c);if(45a||225a)return 0;90a&&(a-=180)}return we(a)}; w.defineProperty(W,{Y:"fromNode"},function(){return this.og},function(a){var b=this.og;if(b!==a){var c=this.Jc;null!==b&&(this.Eg!==b&&wr(b,this,c),Hr(this),this.J(Sm));this.og=a;null!==a&&this.vd(a.isVisible());this.Gi=null;this.Yb();var d=this.g;if(null!==d){var e=this.data,f=d.ba;if(null!==e)if(f instanceof P){var h=null!==a?a.data:null;f.dB(e,f.ub(h))}else f instanceof Zf&&(h=null!==a?a.data:null,d.Pd?f.oi(e,f.ub(h)):(null!==b&&f.oi(b.data,void 0),f.oi(h,f.ub(null!==this.Eg?this.Eg.data:null))))}e= this.Jc;f=this.QE;null!==f&&(h=!0,null!==d&&(h=d.Ua,d.Ua=!0),f(this,c,e),null!==d&&(d.Ua=h));null!==a&&(this.Eg!==a&&vr(a,this,e),Ir(this),this.J(Jm));this.h("fromNode",b,a);nn(this)}}); -w.defineProperty(W,{Lg:"fromPortId"},function(){return this.Nh},function(a){var b=this.Nh;if(b!==a){var c=this.Jc;null!==c&&ur(this.Y,c);Hr(this);this.Nh=a;var d=this.Jc;null!==d&&ur(this.Y,d);var e=this.g;if(null!==e){var f=this.data,h=e.ba;null!==f&&h instanceof P&&h.eB(f,a)}c!==d&&(this.Gi=null,this.Yb(),f=this.QE,null!==f&&(h=!0,null!==e&&(h=e.Ua,e.Ua=!0),f(this,c,d),null!==e&&(e.Ua=h)));Ir(this);this.h("fromPortId",b,a)}});w.u(W,{Jc:"fromPort"},function(){var a=this.og;return null===a?null:a.Pl(this.Nh)}); +w.defineProperty(W,{Lg:"fromPortId"},function(){return this.Nh},function(a){var b=this.Nh;if(b!==a){var c=this.Jc;null!==c&&ur(this.Y,c);Hr(this);this.Nh=a;var d=this.Jc;null!==d&&ur(this.Y,d);var e=this.g;if(null!==e){var f=this.data,h=e.ba;null!==f&&h instanceof P&&h.eB(f,a)}c!==d&&(this.Gi=null,this.Yb(),f=this.QE,null!==f&&(h=!0,null!==e&&(h=e.Ua,e.Ua=!0),f(this,c,d),null!==e&&(e.Ua=h)));Ir(this);this.h("fromPortId",b,a)}});w.u(W,{Jc:"fromPort"},function(){var a=this.og;return null===a?null:a.Ol(this.Nh)}); w.defineProperty(W,{QE:"fromPortChanged"},function(){return this.wr},function(a){var b=this.wr;b!==a&&(null!==a&&w.j(a,"function",W,"fromPortChanged"),this.wr=a,this.h("fromPortChanged",b,a))}); w.defineProperty(W,{$:"toNode"},function(){return this.Eg},function(a){var b=this.Eg;if(b!==a){var c=this.jd;null!==b&&(this.og!==b&&wr(b,this,c),Hr(this),this.J(Sm));this.Eg=a;null!==a&&this.vd(a.isVisible());this.Gi=null;this.Yb();var d=this.g;if(null!==d){var e=this.data,f=d.ba;if(null!==e)if(f instanceof P){var h=null!==a?a.data:null;f.jB(e,f.ub(h))}else f instanceof Zf&&(h=null!==a?a.data:null,d.Pd?(null!==b&&f.oi(b.data,void 0),f.oi(h,f.ub(null!==this.og?this.og.data:null))):f.oi(e,f.ub(h)))}e= this.jd;f=this.qG;null!==f&&(h=!0,null!==d&&(h=d.Ua,d.Ua=!0),f(this,c,e),null!==d&&(d.Ua=h));null!==a&&(this.og!==a&&vr(a,this,e),Ir(this),this.J(Jm));this.h("toNode",b,a);nn(this)}}); -w.defineProperty(W,{Eh:"toPortId"},function(){return this.hi},function(a){var b=this.hi;if(b!==a){var c=this.jd;null!==c&&ur(this.$,c);Hr(this);this.hi=a;var d=this.jd;null!==d&&ur(this.$,d);var e=this.g;if(null!==e){var f=this.data,h=e.ba;null!==f&&h instanceof P&&h.kB(f,a)}c!==d&&(this.Gi=null,this.Yb(),f=this.qG,null!==f&&(h=!0,null!==e&&(h=e.Ua,e.Ua=!0),f(this,c,d),null!==e&&(e.Ua=h)));Ir(this);this.h("toPortId",b,a)}});w.u(W,{jd:"toPort"},function(){var a=this.Eg;return null===a?null:a.Pl(this.hi)}); -w.defineProperty(W,{qG:"toPortChanged"},function(){return this.mt},function(a){var b=this.mt;b!==a&&(null!==a&&w.j(a,"function",W,"toPortChanged"),this.mt=a,this.h("toPortChanged",b,a))});w.defineProperty(W,{Ab:"fromSpot"},function(){return null!==this.V?this.V.Sj:rc},function(a){this.Ld();var b=this.V.Sj;b.L(a)||(a=a.S(),this.V.Sj=a,this.h("fromSpot",b,a),this.Yb())}); -w.defineProperty(W,{Sl:"fromEndSegmentLength"},function(){return null!==this.V?this.V.Qj:NaN},function(a){this.Ld();var b=this.V.Qj;b!==a&&(0>a&&w.Ea(a,">= 0",W,"fromEndSegmentLength"),this.V.Qj=a,this.h("fromEndSegmentLength",b,a),this.Yb())});w.defineProperty(W,{Rt:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.Pj:pr},function(a){this.Ld();var b=this.V.Pj;b!==a&&(w.Ft("Link.fromEndSegmentDirection","2.0"),this.V.Pj=a,this.h("fromEndSegmentDirection",b,a),this.Yb())}); -w.defineProperty(W,{St:"fromShortLength"},function(){return null!==this.V?this.V.Rj:NaN},function(a){this.Ld();var b=this.V.Rj;b!==a&&(this.V.Rj=a,this.h("fromShortLength",b,a),this.Yb())});w.defineProperty(W,{Bb:"toSpot"},function(){return null!==this.V?this.V.pk:rc},function(a){this.Ld();var b=this.V.pk;b.L(a)||(a=a.S(),this.V.pk=a,this.h("toSpot",b,a),this.Yb())}); -w.defineProperty(W,{jm:"toEndSegmentLength"},function(){return null!==this.V?this.V.nk:NaN},function(a){this.Ld();var b=this.V.nk;b!==a&&(0>a&&w.Ea(a,">= 0",W,"toEndSegmentLength"),this.V.nk=a,this.h("toEndSegmentLength",b,a),this.Yb())});w.defineProperty(W,{Lu:"toEndSegmentDirection"},function(){return null!==this.V?this.V.mk:pr},function(a){this.Ld();var b=this.V.mk;b!==a&&(w.Ft("Link.toEndSegmentDirection","2.0"),this.V.mk=a,this.h("toEndSegmentDirection",b,a),this.Yb())}); -w.defineProperty(W,{Mu:"toShortLength"},function(){return null!==this.V?this.V.ok:NaN},function(a){this.Ld();var b=this.V.ok;b!==a&&(this.V.ok=a,this.h("toShortLength",b,a),this.Yb())});function nn(a){var b=a.Y,c=a.$;null!==b?null!==c?Jr(a,b.PH(c)):Jr(a,null):Jr(a,null)}function Jr(a,b){var c=a.Zk;if(c!==b){null!==c&&jr(c,a);a.Zk=b;null!==b&&kr(b,a);var d=a.sE;if(null!==d){var e=!0,f=a.g;null!==f&&(e=f.Ua,f.Ua=!0);d(a,c,b);null!==f&&(f.Ua=e)}!a.Zg||a.JD!==c&&a.KD!==c||a.Yb()}} -W.prototype.Ek=function(){var a=this.Ka;null!==a&&this.Y!==a&&this.$!==a&&a.Vw&&S.prototype.Ek.call(this)};W.prototype.getOtherNode=W.prototype.oA=function(a){var b=this.Y;return a===b?this.$:b};W.prototype.getOtherPort=function(a){var b=this.Jc;return a===b?this.jd:b};w.u(W,{YK:"isLabeledLink"},function(){return null===this.sf?!1:0a&&w.Ea(a,">= 0",W,"fromEndSegmentLength"),this.V.Pj=a,this.h("fromEndSegmentLength",b,a),this.Yb())});w.defineProperty(W,{Rt:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.Oj:pr},function(a){this.Ld();var b=this.V.Oj;b!==a&&(w.Ft("Link.fromEndSegmentDirection","2.0"),this.V.Oj=a,this.h("fromEndSegmentDirection",b,a),this.Yb())}); +w.defineProperty(W,{St:"fromShortLength"},function(){return null!==this.V?this.V.Qj:NaN},function(a){this.Ld();var b=this.V.Qj;b!==a&&(this.V.Qj=a,this.h("fromShortLength",b,a),this.Yb())});w.defineProperty(W,{Bb:"toSpot"},function(){return null!==this.V?this.V.ok:rc},function(a){this.Ld();var b=this.V.ok;b.L(a)||(a=a.S(),this.V.ok=a,this.h("toSpot",b,a),this.Yb())}); +w.defineProperty(W,{jm:"toEndSegmentLength"},function(){return null!==this.V?this.V.mk:NaN},function(a){this.Ld();var b=this.V.mk;b!==a&&(0>a&&w.Ea(a,">= 0",W,"toEndSegmentLength"),this.V.mk=a,this.h("toEndSegmentLength",b,a),this.Yb())});w.defineProperty(W,{Lu:"toEndSegmentDirection"},function(){return null!==this.V?this.V.lk:pr},function(a){this.Ld();var b=this.V.lk;b!==a&&(w.Ft("Link.toEndSegmentDirection","2.0"),this.V.lk=a,this.h("toEndSegmentDirection",b,a),this.Yb())}); +w.defineProperty(W,{Mu:"toShortLength"},function(){return null!==this.V?this.V.nk:NaN},function(a){this.Ld();var b=this.V.nk;b!==a&&(this.V.nk=a,this.h("toShortLength",b,a),this.Yb())});function nn(a){var b=a.Y,c=a.$;null!==b?null!==c?Jr(a,b.PH(c)):Jr(a,null):Jr(a,null)}function Jr(a,b){var c=a.Yk;if(c!==b){null!==c&&jr(c,a);a.Yk=b;null!==b&&kr(b,a);var d=a.sE;if(null!==d){var e=!0,f=a.g;null!==f&&(e=f.Ua,f.Ua=!0);d(a,c,b);null!==f&&(f.Ua=e)}!a.Zg||a.JD!==c&&a.KD!==c||a.Yb()}} +W.prototype.Dk=function(){var a=this.Pa;null!==a&&this.Y!==a&&this.$!==a&&a.Vw&&S.prototype.Dk.call(this)};W.prototype.getOtherNode=W.prototype.oA=function(a){var b=this.Y;return a===b?this.$:b};W.prototype.getOtherPort=function(a){var b=this.Jc;return a===b?this.jd:b};w.u(W,{ZK:"isLabeledLink"},function(){return null===this.sf?!1:0=d&&(h=d-1);var l=this.l(h-1),f=this.l(h);Wd(e.x,e.y,k.x,k.y,l.x,l.y,f.x,f.y,.5,a);b=Math.min(f.x,b);c=Math.min(f.y,c);e=f}else for(e=this.l(0),f=this.l(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.m(e.x,e.y,0,0),a.ri(f),h=2;h=d&&(h=d-1);var l=this.l(h-1),f=this.l(h);Wd(e.x,e.y,k.x,k.y,l.x,l.y,f.x,f.y,.5,a);b=Math.min(f.x,b);c=Math.min(f.y,c);e=f}else for(e=this.l(0),f=this.l(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.m(e.x,e.y,0,0),a.ri(f),h=2;hc&&(c=-c)):Va(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.vf(d)),f.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}w.wa(f);b=this.l(h);f=this.l(h+1);b.x===f.x?b.y>f.y?a.m(b.x,b.y-(e/2-c)):a.m(b.x,b.y+(e/2-c)):b.y===f.y?b.x>f.x?a.m(b.x-(e/2-c),b.y):a.m(b.x+(e/2-c),b.y):(c=(e/2-c)/d,a.m(b.x+c*(f.x-b.x),b.y+c*(f.y-b.y)));return a};w.u(W,{yF:"midAngle"},function(){this.co();return this.computeMidAngle()}); +return a}e=0;f=w.lb();for(h=0;hc&&(c=-c)):Va(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.vf(d)),f.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}w.wa(f);b=this.l(h);f=this.l(h+1);b.x===f.x?b.y>f.y?a.m(b.x,b.y-(e/2-c)):a.m(b.x,b.y+(e/2-c)):b.y===f.y?b.x>f.x?a.m(b.x-(e/2-c),b.y):a.m(b.x+(e/2-c),b.y):(c=(e/2-c)/d,a.m(b.x+c*(f.x-b.x),b.y+c*(f.y-b.y)));return a};w.u(W,{yF:"midAngle"},function(){this.bo();return this.computeMidAngle()}); W.prototype.computeMidAngle=function(){var a=this.qa;if(2>a)return NaN;if(this.computeCurve()===xj&&4<=a&&!this.jc){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),b=this.l(c),d=this.l(c+1),a=this.l(c+2),c=this.l(c+3),e=d.x,d=d.y,f=a.x,a=a.y,h=(e+f)/2,k=(d+a)/2;return Oa(((b.x+e)/2+h)/2,((b.y+d)/2+k)/2,(h+(f+c.x)/2)/2,(k+(a+c.y)/2)/2)}if(0e+10))?e>c+10?d.Rb(a):b.Rb(a):b.Rb(d);b=this.l(c-1);d=this.l(c);a=this.l(c+1);c=b.vf(d);e=d.vf(a);return c>e+10?b.Rb(d):e>c+10?d.Rb(a):b.Rb(a)}; w.defineProperty(W,{points:"points"},function(){return this.bd},function(a){var b=this.bd;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var e=0;em&&(p=-p),u=(0>l?-1:1)*p+r,t=n*(u- -r)+s);var r=h.x+2*k/3,s=h.y+2*l/3,x=r,v=s;K(l,0)?v=0l?-1:1)*p+r,v=n*(x-r)+s);this.Ip();this.ii(h);this.hj(u,t);this.hj(x,v);this.ii(q);this.Ug(0,this.getLinkPoint(b,c,d,!0,!1,e,f));this.Ug(3,this.getLinkPoint(e,f,a,!1,!1,b,c))}else d=this.getLinkPoint(b,c,d,!0,!1,e,f),a=this.getLinkPoint(e,f,a,!1,!1,b,c),this.hasCurviness()?(q=a.x-d.x,e=a.y-d.y,f=this.computeCurviness(),b=d.x+q/2,c=d.y+e/2,h=b,k=c,K(e,0)?k=0f&&(h=-h),h=(0>e?-1:1)*h+b, -k=q*(h-b)+c),this.ii(d),this.hj(h,k)):this.ii(d),this.ii(a)}else{p=this.sj;q&&(n&&p||m)&&this.Ip();var B=m?this.computeCurviness():0,p=this.getLinkPoint(b,c,d,!0,n,e,f),r=u=s=0;if(n||!k||m)if(t=this.computeEndSegmentLength(b,c,d,!0),r=this.getLinkDirection(b,c,p,d,!0,n,e,f),m&&(k||d.L(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(r-=n?90:30,0>B&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),m&&(t+=Math.abs(B)*(n?1:2)),0===r?s=t:90===r?u=t:180===r?s=-t:270===r?u=-t:(s=t*Math.cos(r*Math.PI/180),u=t*Math.sin(r*Math.PI/ +W.prototype.addPointAt=W.prototype.hj=function(a,b){null===this.Ue&&w.k("Call Link.startRoute before modifying the points of the route.");this.bd.add(new z(a,b))};W.prototype.removePoint=W.prototype.QF=function(a){null===this.Ue&&w.k("Call Link.startRoute before modifying the points of the route.");this.bd.Yc(a)};W.prototype.clearPoints=W.prototype.Hp=function(){null===this.Ue&&w.k("Call Link.startRoute before modifying the points of the route.");this.bd.clear()}; +W.prototype.movePoints=W.prototype.Gk=function(a,b){for(var c=new I(z),d=this.bd.i;d.next();){var e=d.value;c.add((new z(e.x+a,e.y+b)).freeze())}c.freeze();d=this.bd;this.bd=c;this.I();Lr(this);e=this.g;null!==e&&e.Oa.pc&&(this.lp=c);this.h("points",d,c)};W.prototype.startRoute=W.prototype.em=function(){null===this.Ue&&(this.Ue=this.bd,this.bd=this.bd.copy())}; +W.prototype.commitRoute=W.prototype.jj=function(){if(null!==this.Ue){for(var a=this.Ue,b=this.bd,c=Infinity,d=Infinity,e=a.n,f=e.length,h=0;hm&&(p=-p),u=(0>l?-1:1)*p+r,t=n*(u- +r)+s);var r=h.x+2*k/3,s=h.y+2*l/3,x=r,v=s;K(l,0)?v=0l?-1:1)*p+r,v=n*(x-r)+s);this.Hp();this.ii(h);this.hj(u,t);this.hj(x,v);this.ii(q);this.Ug(0,this.getLinkPoint(b,c,d,!0,!1,e,f));this.Ug(3,this.getLinkPoint(e,f,a,!1,!1,b,c))}else d=this.getLinkPoint(b,c,d,!0,!1,e,f),a=this.getLinkPoint(e,f,a,!1,!1,b,c),this.hasCurviness()?(q=a.x-d.x,e=a.y-d.y,f=this.computeCurviness(),b=d.x+q/2,c=d.y+e/2,h=b,k=c,K(e,0)?k=0f&&(h=-h),h=(0>e?-1:1)*h+b, +k=q*(h-b)+c),this.ii(d),this.hj(h,k)):this.ii(d),this.ii(a)}else{p=this.Wl;q&&(n&&p||m)&&this.Hp();var B=m?this.computeCurviness():0,p=this.getLinkPoint(b,c,d,!0,n,e,f),r=u=s=0;if(n||!k||m)if(t=this.computeEndSegmentLength(b,c,d,!0),r=this.getLinkDirection(b,c,p,d,!0,n,e,f),m&&(k||d.L(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(r-=n?90:30,0>B&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),m&&(t+=Math.abs(B)*(n?1:2)),0===r?s=t:90===r?u=t:180===r?s=-t:270===r?u=-t:(s=t*Math.cos(r*Math.PI/180),u=t*Math.sin(r*Math.PI/ 180)),d.Od()&&m){var y=c.Wa(Gb,w.K()),H=w.xb(y.x+1E3*s,y.y+1E3*u);this.getLinkPointFromPoint(b,c,y,H,!0,p);w.v(y);w.v(H)}var t=this.getLinkPoint(e,f,a,!1,n,b,c),E=v=x=0;if(n||!l||m)y=this.computeEndSegmentLength(e,f,a,!1),E=this.getLinkDirection(e,f,t,a,!1,n,b,c),m&&(l||d.L(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(E+=n?0:30,0>B&&(E+=180)),0>E?E+=360:360<=E&&(E-=360),m&&(y+=Math.abs(B)*(n?1:2)),0===E?x=y:90===E?v=y:180===E?x=-y:270===E?v=-y:(x=y*Math.cos(E*Math.PI/180),v=y*Math.sin(E*Math.PI/180)),a.Od()&& -m&&(y=f.Wa(Gb,w.K()),H=w.xb(y.x+1E3*x,y.y+1E3*v),this.getLinkPointFromPoint(e,f,y,H,!1,t),w.v(y),w.v(H));a=p;if(n||!k||m)a=new z(p.x+s,p.y+u);d=t;if(n||!l||m)d=new z(t.x+x,t.y+v);!q&&!n&&k&&3Math.abs(b.y-a.y)?(b.x=b.x>=a.x?a.x+9E9:a.x-9E9,b.y=a.y):(b.y=b.y>=a.y?a.y+9E9:a.y-9E9,b.x=a.x);return b} -W.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new z);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var h=e=0,k=0,l=0;a=null;e=b.O;null===e||e.Yg()||(e=e.O);if(null===e)e=d.x,h=d.y,k=c.x,l=c.y;else{a=e.ph;e=1/(a.m11*a.m22-a.m12*a.m21);var k=a.m22*e,l=-a.m12*e,m=-a.m21*e,n=a.m11*e,p=e*(a.m21*a.dy-a.m22*a.dx),q=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*k+d.y*m+p;h=d.x*l+d.y*n+q;k=c.x*k+c.y*m+p;l=c.x*l+c.y*n+q}b.Bn(e,h,k,l, +W.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new z);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var h=e=0,k=0,l=0;a=null;e=b.O;null===e||e.Yg()||(e=e.O);if(null===e)e=d.x,h=d.y,k=c.x,l=c.y;else{a=e.ph;e=1/(a.m11*a.m22-a.m12*a.m21);var k=a.m22*e,l=-a.m12*e,m=-a.m21*e,n=a.m11*e,p=e*(a.m21*a.dy-a.m22*a.dx),q=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*k+d.y*m+p;h=d.x*l+d.y*n+q;k=c.x*k+c.y*m+p;l=c.x*l+c.y*n+q}b.An(e,h,k,l, f);null!==a&&f.transform(a);return f};function Qr(a,b){var c=b.Bs;null===c&&(c=new Rr,c.port=b,c.Oc=b.U,b.Bs=c);return Sr(c,a)} -W.prototype.getLinkPoint=function(a,b,c,d,e,f,h,k){void 0===k&&(k=new z);if(c.fd())return b.Wa(c,k),k;if(c.uj()){var l=Qr(this,b);if(null!==l){k.assign(l.eq);if(e&&this.ay===Gr){var m=Qr(this,h);if(null!==m&&l.tn=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.rj(Tb)||c.rj(Wb))&&a.x>=n.x&&a.x<=n.x+n.width&&(k.x=a.x);w.v(l);w.v(m)}}return k}}c=b.Wa(Gb,w.K());l=f=null;this.qa> +W.prototype.getLinkPoint=function(a,b,c,d,e,f,h,k){void 0===k&&(k=new z);if(c.fd())return b.Wa(c,k),k;if(c.tj()){var l=Qr(this,b);if(null!==l){k.assign(l.eq);if(e&&this.ay===Gr){var m=Qr(this,h);if(null!==m&&l.tn=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.rj(Tb)||c.rj(Wb))&&a.x>=n.x&&a.x<=n.x+n.width&&(k.x=a.x);w.v(l);w.v(m)}}return k}}c=b.Wa(Gb,w.K());l=f=null;this.qa> (e?6:2)?(l=d?this.l(1):this.l(this.qa-2),e&&(l=Pr(c,l.copy()))):(f=w.K(),l=h.Wa(Gb,f),e&&(l=Pr(c,l)),w.v(f));this.getLinkPointFromPoint(a,b,c,l,d,k);w.v(c);return k}; -W.prototype.getLinkDirection=function(a,b,c,d,e,f,h,k){a:if(d.fd())c=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(n=e?this.l(1):this.l(this.qa-2),n=f?Pr(l,n.copy()):c):(m=w.K(),n=k.Wa(Gb,m),w.v(m));c=0;c=Math.abs(n.x-l.x)>Math.abs(n.y- -l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;w.v(l)}d.Od()&&h.mi(a)&&(c+=180,360<=c&&(c-=360));a=pr;a=e?this.Rt:this.Lu;a===pr&&(a=e?b.Rt:b.Lu);switch(a){case qr:b=b.zn();c+=b;360<=c&&(c-=360);break;case pr:case vo:b=b.zn();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c}; -W.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.uj()&&(a=Qr(this,b),null!==a))return a.gx;a=NaN;a=d?this.Sl:this.jm;null!==b&&isNaN(a)&&(a=d?b.Sl:b.jm);isNaN(a)&&(a=10);return a};W.prototype.computeSpot=function(a){return a?Nr(this,this.Jc):Or(this,this.jd)};function Nr(a,b){if(null===b)return Gb;var c=a.Ab;c.Vc()&&null!==b&&(c=b.Ab);return c===rc?tb:c}function Or(a,b){if(null===b)return Gb;var c=a.Bb;c.Vc()&&null!==b&&(c=b.Bb);return c===rc?tb:c} +W.prototype.getLinkDirection=function(a,b,c,d,e,f,h,k){a:if(d.fd())c=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(n=e?this.l(1):this.l(this.qa-2),n=f?Pr(l,n.copy()):c):(m=w.K(),n=k.Wa(Gb,m),w.v(m));c=0;c=Math.abs(n.x-l.x)>Math.abs(n.y- +l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;w.v(l)}d.Od()&&h.mi(a)&&(c+=180,360<=c&&(c-=360));a=pr;a=e?this.Rt:this.Lu;a===pr&&(a=e?b.Rt:b.Lu);switch(a){case qr:b=b.Sl();c+=b;360<=c&&(c-=360);break;case pr:case vo:if(d.wI())break;b=b.Sl();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c}; +W.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.tj()&&(a=Qr(this,b),null!==a))return a.gx;a=NaN;a=d?this.Rl:this.jm;null!==b&&isNaN(a)&&(a=d?b.Rl:b.jm);isNaN(a)&&(a=10);return a};W.prototype.computeSpot=function(a){return a?Nr(this,this.Jc):Or(this,this.jd)};function Nr(a,b){if(null===b)return Gb;var c=a.Ab;c.Vc()&&null!==b&&(c=b.Ab);return c===rc?tb:c}function Or(a,b){if(null===b)return Gb;var c=a.Bb;c.Vc()&&null!==b&&(c=b.Bb);return c===rc?tb:c} W.prototype.computeOtherPoint=function(a,b){var c=b.Wa(Gb),d;d=b.Bs;d=null!==d?Sr(d,this):null;null!==d&&(c=d.eq);return c};W.prototype.computeShortLength=function(a){if(a){if(a=this.St,isNaN(a)){var b=this.Jc;null!==b&&(a=b.St)}}else a=this.Mu,isNaN(a)&&(b=this.jd,null!==b&&(a=b.Mu));return isNaN(a)?0:a}; -W.prototype.zk=function(a,b,c,d,e,f){if(!1===this.Tg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=f;void 0===f&&(h=w.Ff(),h.reset());h.multiply(this.transform);if(this.qn(a,h))return Zp(this,b,c,e),void 0===f&&w.ue(h),!0;if(this.Tf(a,h)){var k=!1;if(!this.Gn)for(var l=this.xa.n,m=l.length;m--;){var n=l[m];if(n.visible||n===this.Yf){var p=n.W,q=this.Ia;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=w.Ff();p.set(h);if(n instanceof C)k=n.zk(a,b,c,d,e,p);else if(this.path=== -n){if(n instanceof X){var k=n,r=a,s=d,q=p;if(!1===k.Tg)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,t=q;if(k.qn(u,t))k=!0;else{if(void 0===t&&(t=k.transform,u.wk(k.W))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,x=w.K(),v=w.K(),B=w.K(),y=w.Ff();y.set(t);y.BF(k.transform);y.tx();v.x=r;v.y=s;v.transform(y);x.x=q;x.y=s;x.transform(y);t=!1;kq(k,x,v,B)?t=!0:(x.x=r,x.y=u,x.transform(y),kq(k,x,v,B)?t=!0:(v.x=q,v.y=u,v.transform(y),kq(k,x,v,B)?t=!0:(x.x=q,x.y=s,x.transform(y),kq(k,x,v,B)&& -(t=!0))));w.ue(y);w.v(x);w.v(v);w.v(B);k=t}}else k=k.qn(r,q)}}else k=Bo(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&(e instanceof J&&e.add(n),e instanceof I&&e.add(n)));w.ue(p)}}}void 0===f&&w.ue(h);return k||null!==this.background||null!==this.jn}void 0===f&&w.ue(h);return!1};w.u(W,{jc:"isOrthogonal"},function(){return 2===(this.Um.value&2)});w.u(W,{sj:"isAvoiding"},function(){return 4===(this.Um.value&4)}); +W.prototype.yk=function(a,b,c,d,e,f){if(!1===this.Tg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=f;void 0===f&&(h=w.Ff(),h.reset());h.multiply(this.transform);if(this.qn(a,h))return Zp(this,b,c,e),void 0===f&&w.ue(h),!0;if(this.Tf(a,h)){var k=!1;if(!this.Fn)for(var l=this.xa.n,m=l.length;m--;){var n=l[m];if(n.visible||n===this.Yf){var p=n.W,q=this.Ia;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=w.Ff();p.set(h);if(n instanceof C)k=n.yk(a,b,c,d,e,p);else if(this.path=== +n){if(n instanceof X){var k=n,r=a,s=d,q=p;if(!1===k.Tg)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,t=q;if(k.qn(u,t))k=!0;else{if(void 0===t&&(t=k.transform,u.vk(k.W))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,x=w.K(),v=w.K(),B=w.K(),y=w.Ff();y.set(t);y.BF(k.transform);y.tx();v.x=r;v.y=s;v.transform(y);x.x=q;x.y=s;x.transform(y);t=!1;kq(k,x,v,B)?t=!0:(x.x=r,x.y=u,x.transform(y),kq(k,x,v,B)?t=!0:(v.x=q,v.y=u,v.transform(y),kq(k,x,v,B)?t=!0:(x.x=q,x.y=s,x.transform(y),kq(k,x,v,B)&& +(t=!0))));w.ue(y);w.v(x);w.v(v);w.v(B);k=t}}else k=k.qn(r,q)}}else k=Bo(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&(e instanceof J&&e.add(n),e instanceof I&&e.add(n)));w.ue(p)}}}void 0===f&&w.ue(h);return k||null!==this.background||null!==this.jn}void 0===f&&w.ue(h);return!1};w.u(W,{jc:"isOrthogonal"},function(){return 2===(this.Um.value&2)});w.u(W,{Wl:"isAvoiding"},function(){return 4===(this.Um.value&4)}); W.prototype.computeCurve=function(){if(null===this.Gi){var a=this.Jc,b=this.jc;this.Gi=null!==a&&a===this.jd&&!b}return this.Gi?xj:this.Ye};W.prototype.computeCorner=function(){if(this.Ye===xj)return 0;var a=this.aA;if(isNaN(a)||0>a)a=10;return a};W.prototype.findMidLabel=function(){for(var a=this.path,b=this.xa.n,c=b.length,d=0;dl?-Math.PI/2:Math.PI/2:(n=Math.atan(l/Math.abs(k)),0>k&&(n=Math.PI-n));var h=b.x,p=b.y,l=d.x-h,q=d.y-p,r=Math.sqrt(l*l+q*q),k=0;Va(l,0)?k=0>q?-Math.PI/2:Math.PI/2:(k=Math.atan(q/Math.abs(l)),0>l&&(k=Math.PI-k));m=r/m;n=k-n;this.Ug(a,b);for(a+= -1;al?-Math.PI/2:Math.PI/2:(q=Math.atan(l/Math.abs(k)),0>k&&(q=Math.PI-q)),k=q+n,b*=m,this.ea(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.Ug(c,d)}}return!0;case Fr:f=this.l(a);p=this.l(c);if(!f.Ic(b)||!p.Ic(d)){var e=f.x,f=f.y,h=p.x,p=p.y,m=(h-e)*(h-e)+(p-f)*(p-f),k=b.x,n=b.y,l=d.x,q=d.y,r=0,s=1;0!==l-k?(r=(q-n)/(l-k),s=Math.sqrt(1+1/(r*r))):r=9E9;this.Ug(a,b);for(a+=1;al?-Math.PI/2:Math.PI/2:(q=Math.atan(l/Math.abs(k)),0>k&&(q=Math.PI-q)),k=q+n,b*=m,this.ca(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.Ug(c,d)}}return!0;case Fr:f=this.l(a);p=this.l(c);if(!f.Ic(b)||!p.Ic(d)){var e=f.x,f=f.y,h=p.x,p=p.y,m=(h-e)*(h-e)+(p-f)*(p-f),k=b.x,n=b.y,l=d.x,q=d.y,r=0,s=1;0!==l-k?(r=(q-n)/(l-k),s=Math.sqrt(1+1/(r*r))):r=9E9;this.Ug(a,b);for(a+=1;ab?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=-45<=d&&45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.W.copy(),k=f.W.copy();if(h.H()&&k.H()){h.xf(8,8);k.xf(8,8);h.ri(a);k.ri(c);var l,m;if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l=new z(c.x,a.y),m=new z(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x,c.x,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.Ha(a)||h.Ha(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new z(Math.max((a.x+c.x)/2,a.x),a.y),m=new z(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.yh.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new z(a.x,Math.max((a.y+c.y)/2,a.y)),m=new z(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.y,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.y,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.Ha(a)||h.Ha(c))?l.x=this.computeMidOrthoPosition(a.x, c.x,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new z(a.x,Math.min((a.y+c.y)/2,a.y)),m=new z(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xk&&0!==Vr(s,c.x,c.y)){Wr(this,s,c.x,c.y,d,!0);h=this.l(2);if(4>this.qa)0===b||180=== -b?(h.x=a.x,h.y=c.y):(h.x=c.x,h.y=a.y),this.ea(2,h.x,h.y),this.w(3,h.x,h.y);else if(c=this.l(3),0===b||180===b)K(h.x,c.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.ea(2,h,a.y),this.ea(3,h,c.y)):K(h.y,c.y)?(Math.abs(a.y-h.y)<=s.ln/2&&(this.ea(2,h.x,a.y),this.ea(3,c.x,a.y)),this.w(2,h.x,a.y)):this.ea(2,a.x,h.y);else if(90===b||270===b)K(h.y,c.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.ea(2,a.x,h),this.ea(3,c.x,h)):K(h.x,c.x)?(Math.abs(a.x-h.x)<=s.mn/2&&(this.ea(2,a.x,h.y),this.ea(3, -a.x,c.y)),this.w(2,a.x,h.y)):this.ea(2,h.x,a.y);null!==r&&(a=this.l(1),c=this.l(2),a.x!==c.x&&a.y!==c.y?0===b||180===b?this.w(2,a.x,c.y):this.w(2,c.x,a.y):0===b||180===b?this.w(2,e.x,r.y):this.w(2,r.x,e.y));null!==u&&(0===d||180===d?this.hj(f.x,u.y):this.hj(u.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.ii(l),this.ii(m))}};W.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2}; -function Bi(a){if(null===a.g||!a.sj)return!1;var b=a.points.n,c=b.length;if(4>c)return!1;a=Bn(a.g,!0,a.Ka,null);for(var d=1;dc)return!1;a=Bn(a.g,!0,a.Pa,null);for(var d=1;da)return new Ae(Ee);var b=!1,c=this.g;null!==c&&Kr(this)&&c.al.contains(this)&&null!==this.ow&&(b=!0);var d=c=0,e=this.l(0).copy(),f=e.copy(),c=this.bd.n,h=this.computeCurve();if(h===xj&&3<=a&&!Va(this.vq,0))if(3===a)var k=this.l(1),c=Math.min(e.x,k.x),d=Math.min(e.y,k.y),k=this.l(2),c=Math.min(c,k.x),d=Math.min(d,k.y);else{if(this.jc)for(k=0;k=a&&(k=a-1),c=this.l(k), +W.prototype.makeGeometry=function(){var a=this.qa;if(2>a)return new Ae(Ee);var b=!1,c=this.g;null!==c&&Kr(this)&&c.$k.contains(this)&&null!==this.ow&&(b=!0);var d=c=0,e=this.l(0).copy(),f=e.copy(),c=this.bd.n,h=this.computeCurve();if(h===xj&&3<=a&&!Va(this.vq,0))if(3===a)var k=this.l(1),c=Math.min(e.x,k.x),d=Math.min(e.y,k.y),k=this.l(2),c=Math.min(c,k.x),d=Math.min(d,k.y);else{if(this.jc)for(k=0;k=a&&(k=a-1),c=this.l(k), f.x=Math.min(c.x,f.x),f.y=Math.min(c.y,f.y);c=f.x;d=f.y}else{for(k=0;kx?r>q?(u.x=v-y,u.y=q-y,t.x=v+s,t.y=q+s):(u.x=v-y,u.y=q+y,t.x=v+s,t.y=q-s):r>q?(u.x=v+y,u.y=q-y,t.x=v-s,t.y=q+s):(u.x=v+y,u.y=q+y,t.x=v-s,t.y=q-s));Va(x,v)&&Va(q,r)&&(q>p?(B>v?(u.x= v-y,u.y=q-y,t.x=v+s):(u.x=v+y,u.y=q-y,t.x=v-s),t.y=q+s):(B>v?(u.x=v-y,u.y=q+y,t.x=v+s):(u.x=v+y,u.y=q+y,t.x=v-s),t.y=q-s));if(Va(x,v)&&Va(v,B)||Va(p,q)&&Va(q,r))x=.5*(x+B),p=.5*(p+r),u.x=x,u.y=p,t.x=x,t.y=p;1===k?(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y)):2===k&&Va(b.x,this.l(0).x)&&Va(b.y,this.l(0).y)&&(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y));N(l,e.x-c,e.y-d,h.x-c,h.y-d,m.x-c,m.y-d);f.set(h);e.set(a);b=m}}k=b.x;b=b.y;f=this.l(this.qa-1);0!==this.computeShortLength(!1)&&(f=Xr(this,f.copy(),!1,dd));k=.5*(k+f.x); @@ -1678,88 +1678,88 @@ function Yr(a,b,c,d){for(var e=a.qa,f=b;Va(b.x,f.x)&&Va(b.y,f.y);){if(c>=e)retur function $r(a,b,c,d,e,f,h){if(!h&&Kr(a)){h=[];var k=0;a.isVisible()&&(k=as(a,e,f,h));var l=e.x,l=e.y;if(0p-10)m--,p=Math.max(q-5,f.x);else break;q=f.y-10+d;n=p+c;p=f.y+d;a.Ye===jj?M(b,n,p,!1,!1):N(b,l,q,n,q,n,p)}else if(K(e.x,f.x))if(e.yp-10)m--,p=Math.max(q-5,f.y);else break;q=f.x-10+c;n=f.x+c;p+=d;a.Ye===jj?M(b,n,p,!1,!1):N(b,q,l,q,p,n,p)}}b.lineTo(f.x+c,f.y+d)} -function as(a,b,c,d){var e=a.g;if(null===e||b.L(c))return 0;for(e=e.Gx;e.next();){var f=e.value;if(null!==f&&f.visible)for(var f=f.zb.n,h=f.length,k=0;kh.x&&n.x>m.x||m.xh.y&&n.y>m.y||m.yu&&Math.min(h,x)q&&!K(h,x)){n.x=u;n.y=q;n=!0;break a}}else if(!K(q,s)&&K(h,x)&&Math.min(q,s)h&&Math.min(u,t)p&&!K(u,t)){n.x=p;n.y=h;n=!0;break a}n.x=0;n.y=0;n=!1}n&&(e?c.push(k.x):c.push(k.y));h=m}w.v(k)}w.u(W,{Nt:"firstPickIndex"},function(){var a;2>=this.qa?a=0:((a=this.jc)||(a=this.computeSpot(!0)!==tb),a=a?1:0);return a});w.u(W,{Ex:"lastPickIndex"},function(){var a=this.qa;if(0===a)a=0;else if(2>=a)a-=1;else{var b;(b=this.jc)||(b=this.computeSpot(!1)!==tb);a=b?a-2:a-1}return a});function Kr(a){a=a.Ye;return a===ij||a===jj} -function Mr(a,b){if(b||Kr(a)){var c=a.g;null===c||c.al.contains(a)||null===a.ow||c.al.add(a,a.ow)}}function lj(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Kc){var d=c.g;if(null!==d)for(var e=!1,d=d.Gx;d.next();){var f=d.value;if(f.visible)if(f===c)for(var e=!0,h=!1,f=f.zb.n,k=f.length,l=0;l=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.xg=Math.floor((a.x-this.ze)/this.ze)*this.ze;this.yg=Math.floor((b-this.Ae)/this.Ae)*this.Ae;this.$r=Math.ceil((c+2*this.ze)/this.ze)*this.ze;this.as=Math.ceil((d+2*this.Ae)/this.Ae)*this.Ae;a=1+(Math.ceil((this.$r-this.xg)/this.ze)|0);b=1+(Math.ceil((this.as-this.yg)/this.Ae)|0);if(null===this.md||this.Bpthis.$r||a+cthis.as||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.Bp)|0;for(c=Math.min(b+e-1,this.Cp)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.md[a][e])return!1;return!0}; +Cn.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.xg=Math.floor((a.x-this.ze)/this.ze)*this.ze;this.yg=Math.floor((b-this.Ae)/this.Ae)*this.Ae;this.$r=Math.ceil((c+2*this.ze)/this.ze)*this.ze;this.as=Math.ceil((d+2*this.Ae)/this.Ae)*this.Ae;a=1+(Math.ceil((this.$r-this.xg)/this.ze)|0);b=1+(Math.ceil((this.as-this.yg)/this.Ae)|0);if(null===this.md||this.Apthis.$r||a+cthis.as||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.Ap)|0;for(c=Math.min(b+e-1,this.Bp)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.md[a][e])return!1;return!0}; function ds(a,b,c,d,e,f,h,k,l){if(!(bh||cl)){var m,n;m=b|0;n=c|0;var p=a.md[m][n];if(1<=p&&999999>p)for(e?n+=d:m+=d,p+=1;f<=m&&m<=h&&k<=n&&n<=l&&!(p>=a.md[m][n]);)a.md[m][n]=p,p+=1,e?n+=d:m+=d;m=e?n:m;if(e)if(0m;c+=d)ds(a,b,c,1,!e,f,h,k,l),ds(a,b,c,-1,!e,f,h,k,l);else if(0m;b+=d)ds(a,b,c,1,!e,f,h,k,l),ds(a,b,c,-1,!e,f,h, k,l)}}function es(a,b,c,d,e,f,h,k,l){b|=0;c|=0;var m=0,n=1;for(a.md[b][c]=n;0===m&&b>f&&bk&&cf&&bk&&c=Math.abs(h-b)&&1>=Math.abs(k-d))a.abort=!0;else{var l=f.x,m=f.y,n=f.x+f.width,p=f.y+f.height,l=l-a.xg,l=l/a.ze,m=m-a.yg,m=m/a.Ae,n=n-a.xg,n=n/a.ze,p=p-a.yg,p=p/a.Ae;f=Math.max(0,Math.min(a.Bp,l|0));n=Math.min(a.Bp,Math.max(0,n|0));m=Math.max(0,Math.min(a.Cp,m|0));p=Math.min(a.Cp,Math.max(0,p|0));h|=0;k|=0;b|=0;d|=0;l=0===c|| +function Ur(a,b,c,d,e,f){if(null!==a.md){a.abort=!1;var h=b.x,k=b.y;if(Tr(a,h,k)&&(h-=a.xg,h/=a.ze,k-=a.yg,k/=a.Ae,b=d.x,d=d.y,Tr(a,b,d)))if(b-=a.xg,b/=a.ze,d-=a.yg,d/=a.Ae,1>=Math.abs(h-b)&&1>=Math.abs(k-d))a.abort=!0;else{var l=f.x,m=f.y,n=f.x+f.width,p=f.y+f.height,l=l-a.xg,l=l/a.ze,m=m-a.yg,m=m/a.Ae,n=n-a.xg,n=n/a.ze,p=p-a.yg,p=p/a.Ae;f=Math.max(0,Math.min(a.Ap,l|0));n=Math.min(a.Ap,Math.max(0,n|0));m=Math.max(0,Math.min(a.Bp,m|0));p=Math.min(a.Bp,Math.max(0,p|0));h|=0;k|=0;b|=0;d|=0;l=0===c|| 90===c?1:-1;c=90===c||270===c;0===a.md[h][k]?(es(a,h,k,l,c,f,n,m,p),es(a,h,k,1,!c,f,n,m,p),es(a,h,k,-1,!c,f,n,m,p)):es(a,h,k,l,c,h,k,h,k);0===a.md[b][d]?(fs(a,b,d,0===e||90===e?1:-1,90===e||270===e,f,n,m,p),fs(a,b,d,1,!(90===e||270===e),f,n,m,p),fs(a,b,d,-1,!(90===e||270===e),f,n,m,p)):fs(a,b,d,l,c,b,d,b,d);a.abort||(ds(a,h,k,1,!1,f,n,m,p),ds(a,h,k,-1,!1,f,n,m,p),ds(a,h,k,1,!0,f,n,m,p),ds(a,h,k,-1,!0,f,n,m,p))}}}function Rr(){w.mc(this);this.port=this.Oc=null;this.bg=[];this.gq=!1} w.$d(Rr,{Oc:!0,port:!0,bg:!0,gq:!0});Rr.prototype.toString=function(){for(var a=this.bg,b=this.Oc.toString()+" "+a.length.toString()+":",c=0;c=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case w.Rc|w.kd:return c>a&&c<=180+a?180:270;case w.kd|w.$c:return c>180-a&&c<=360-a?270:0;case w.$c|w.Zc:return c>a&&c<=180+a?90:0;case w.Zc|w.Rc:return c>180-a&&c<=360-a?180:90;case w.Rc|w.kd|w.$c:return 90180+a&&c<=360- -a?270:0;case w.kd|w.$c|w.Zc:return 180a&&180>=c?90:0;case w.$c|w.Zc|w.Rc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case w.Zc|w.Rc|w.kd:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(w.Rc|w.kd|w.$c|w.Zc)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Rr.prototype.$p=function(){this.bg.length=0}; -function Sr(a,b){var c=a.bg;if(0===c.length){a:if(!a.gq){c=a.gq;a.gq=!0;var d,e=null,f=a.Oc,f=f instanceof U?f:null;if(null===f||f.we)d=a.Oc.IE(a.port.Qd);else{if(!f.W.H()){a.gq=c;break a}e=f;d=e.HE()}var h=a.bg.length=0,k=a.port.Wa(xb,w.K()),l=a.port.Wa(Lb,w.K()),f=w.hg(k.x,k.y,0,0);f.ri(l);w.v(k);w.v(l);k=w.xb(f.x+f.width/2,f.y+f.height/2);for(d=d.i;d.next();)if(l=d.value,l.isVisible()){var m=l.Jc===a.port||l.Y.mi(e),n=l.computeSpot(m);if(n.uj()&&(m=m?l.jd:l.Jc,null!==m)){var p=m.U;if(null!==p){var m= -l.computeOtherPoint(p,m),p=k.Rb(m),n=gs(f,n,p,l.jc),q=0;0===n?(q=w.$c,180Math.abs(E)?(B=Math.abs(E)/ -q,q=Math.abs(E)):B=1;break;case w.Rc:r>Math.abs(H)?(B=Math.abs(H)/r,r=Math.abs(H)):B=1;break;case w.kd:m>Math.abs(E)?(B=Math.abs(E)/m,m=Math.abs(E)):B=1;break;default:case w.$c:p>Math.abs(H)?(B=Math.abs(H)/p,p=Math.abs(H)):B=1}v=0}var V=u.eq;if(e===rr){t=u.link.computeThickness();t*=B;V.set(y);switch(x){case w.Zc:V.x=y.x+E/2+q/2-v-t/2;break;case w.Rc:V.y=y.y+H/2+r/2-v-t/2;break;case w.kd:V.x=y.x+E/2-m/2+v+t/2;break;default:case w.$c:V.y=y.y+H/2-p/2+v+t/2}v+=t}else t=.5,e===or&&(t=(u.Yp+1)/(u.tn+1)), -V.x=y.x+E*t,V.y=y.y+H*t}w.v(k);w.v(d);w.v(l);w.v(n);y=a.bg;for(E=0;Eb.xe?1:a.angleb.angle?1:0}; -Rr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Oc,this.port,tb,b.Jc===this.port),d=a.Yp;if(0>d)return c;var e=a.tn;if(1>=e||!b.jc)return c;var b=a.Ox,f=a.eq;if(a.xe===w.Rc||a.xe===w.Zc)d=e-1-d;return((a=a.xe===w.Rc||a.xe===w.$c)?b.ya&&180>=c?90:0;case w.$c|w.Zc|w.Rc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case w.Zc|w.Rc|w.kd:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(w.Rc|w.kd|w.$c|w.Zc)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Rr.prototype.Zp=function(){this.bg.length=0}; +function Sr(a,b){var c=a.bg;if(0===c.length){a:if(!a.gq){c=a.gq;a.gq=!0;var d,e=null,f=a.Oc,f=f instanceof U?f:null;if(null===f||f.we)d=a.Oc.IE(a.port.Qd);else{if(!f.W.H()){a.gq=c;break a}e=f;d=e.HE()}var h=a.bg.length=0,k=a.port.Wa(xb,w.K()),l=a.port.Wa(Lb,w.K()),f=w.hg(k.x,k.y,0,0);f.ri(l);w.v(k);w.v(l);k=w.xb(f.x+f.width/2,f.y+f.height/2);l=a.port.Sl();for(d=d.i;d.next();){var m=d.value;if(m.isVisible()){var n=m.Jc===a.port||m.Y.mi(e),p=m.computeSpot(n);if(p.tj()&&(n=n?m.jd:m.Jc,null!==n)){var q= +n.U;if(null!==q){n=m.computeOtherPoint(q,n);q=k.Rb(n);q-=l;0>q&&(q+=360);var p=gs(f,p,q,m.jc),r=0;0===p?(r=w.$c,180 +Math.abs(E)?(B=Math.abs(E)/q,q=Math.abs(E)):B=1;break;case w.Rc:r>Math.abs(H)?(B=Math.abs(H)/r,r=Math.abs(H)):B=1;break;case w.kd:p>Math.abs(E)?(B=Math.abs(E)/p,p=Math.abs(E)):B=1;break;default:case w.$c:n>Math.abs(H)?(B=Math.abs(H)/n,n=Math.abs(H)):B=1}v=0}var V=u.eq;if(e===rr){t=u.link.computeThickness();t*=B;V.set(y);switch(x){case w.Zc:V.x=y.x+E/2+q/2-v-t/2;break;case w.Rc:V.y=y.y+H/2+r/2-v-t/2;break;case w.kd:V.x=y.x+E/2-p/2+v+t/2;break;default:case w.$c:V.y=y.y+H/2-n/2+v+t/2}v+=t}else t=.5, +e===or&&(t=(u.Xp+1)/(u.tn+1)),V.x=y.x+E*t,V.y=y.y+H*t}w.v(k);w.v(l);w.v(d);w.v(m);y=a.bg;for(E=0;Eb.xe?1:a.angleb.angle?1:0}; +Rr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Oc,this.port,tb,b.Jc===this.port),d=a.Xp;if(0>d)return c;var e=a.tn;if(1>=e||!b.jc)return c;var b=a.Ox,f=a.eq;if(a.xe===w.Rc||a.xe===w.Zc)d=e-1-d;return((a=a.xe===w.Rc||a.xe===w.$c)?b.ye&&(e=k.right);k.bottom>f&&(f=k.bottom)}}isFinite(c)&&isFinite(d)?a.m(c,d,e-c,f-d):(b=b.location,c=this.padding,a.m(b.x+c.left,b.y+c.top,0,0));return a}; -w.defineProperty(Mj,{padding:"padding"},function(){return this.ff},function(a){"number"===typeof a?a=new db(a):w.G(a,db,Mj,"padding");var b=this.ff;b.L(a)||(this.ff=a=a.S(),this.h("padding",b,a))});function rg(){0e&&(e=k.right);k.bottom>f&&(f=k.bottom)}}isFinite(c)&&isFinite(d)?a.m(c,d,e-c,f-d):(b=b.location,c=this.padding,a.m(b.x+c.left,b.y+c.top,0,0));return a}; +w.defineProperty(Mj,{padding:"padding"},function(){return this.ff},function(a){"number"===typeof a?a=new db(a):w.G(a,db,Mj,"padding");var b=this.ff;b.L(a)||(this.ff=a=a.S(),this.h("padding",b,a))});function rg(){0=c-1?(h=0,e=d,f+=k+20,k=0):h++}null!==a&&a.Gd("Layout")}this.zf=!0};rg.prototype.Sn=function(a){return!a.location.H()||a instanceof U&&a.Sn?!0:!1}; -function ks(a,b,c,d,e,f,h,k){for(c=c.i;c.next();){var l=c.value;d&&!l.bq||null!==e&&!e(l)||!l.canLayout()||(f&&l instanceof T?l.mf||(l instanceof U?null===l.Sb?ks(a,b,l.Nc,!1,e,f,h,k):(ls(l),b.add(l)):(ls(l),b.add(l))):h&&l instanceof W?b.add(l):!k||!l.de()||l instanceof T||(ls(l),b.add(l)))}}function ls(a){var b=a.W;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ze()} -rg.prototype.collectParts=rg.prototype.pH=function(a){var b=new J(S);a instanceof D?(ks(this,b,a.eg,!0,null,!0,!0,!0),ks(this,b,a.links,!0,null,!0,!0,!0),ks(this,b,a.Jk,!0,null,!0,!0,!0)):a instanceof U?ks(this,b,a.Nc,!1,null,!0,!0,!0):ks(this,b,a.i,!1,null,!0,!0,!0);return b};w.defineProperty(rg,{oe:"arrangementOrigin"},function(){return this.Jq},function(a){w.G(a,z,rg,"arrangementOrigin");this.Jq.L(a)||(this.Jq.assign(a),this.J())}); +rg.prototype.doLayout=function(a){null===a&&w.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");var b=new J(S);a instanceof D?(ks(this,b,a.eg,!0,this.Rn,!0,!1,!0),ks(this,b,a.Ik,!0,this.Rn,!0,!1,!0)):a instanceof U?ks(this,b,a.Nc,!1,this.Rn,!0,!1,!0):b.Hc(a.i);var c=b.count;if(0=c-1?(h=0,e=d,f+=k+20,k=0):h++}null!==a&&a.Gd("Layout")}this.zf=!0};rg.prototype.Rn=function(a){return!a.location.H()||a instanceof U&&a.Rn?!0:!1}; +function ks(a,b,c,d,e,f,h,k){for(c=c.i;c.next();){var l=c.value;d&&!l.aq||null!==e&&!e(l)||!l.canLayout()||(f&&l instanceof T?l.mf||(l instanceof U?null===l.Sb?ks(a,b,l.Nc,!1,e,f,h,k):(ls(l),b.add(l)):(ls(l),b.add(l))):h&&l instanceof W?b.add(l):!k||!l.de()||l instanceof T||(ls(l),b.add(l)))}}function ls(a){var b=a.W;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Ze()} +rg.prototype.collectParts=rg.prototype.pH=function(a){var b=new J(S);a instanceof D?(ks(this,b,a.eg,!0,null,!0,!0,!0),ks(this,b,a.links,!0,null,!0,!0,!0),ks(this,b,a.Ik,!0,null,!0,!0,!0)):a instanceof U?ks(this,b,a.Nc,!1,null,!0,!0,!0):ks(this,b,a.i,!1,null,!0,!0,!0);return b};w.defineProperty(rg,{oe:"arrangementOrigin"},function(){return this.Jq},function(a){w.G(a,z,rg,"arrangementOrigin");this.Jq.L(a)||(this.Jq.assign(a),this.J())}); rg.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.Wa(xb),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a}; function sg(){w.mc(this);this.ie=null;if(this.vertexes)for(var a=this.vertexes.i;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.i;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new J(ms);this.edges=new J(ns);this.Lx=new ka(T,ms);this.Hx=new ka(W,ns)}w.fa("LayoutNetwork",sg); sg.prototype.clear=function(){if(this.vertexes)for(var a=this.vertexes.i;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.i;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new J(ms);this.edges=new J(ns);this.Lx=new ka(T,ms);this.Hx=new ka(W,ns)}; sg.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Sb?"("+this.Sb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0}; ms.smartComparer=function(a,b){if(null!==a){if(null!==b){var c=a.rd,d=b.rd;if(null!==c){if(null!==d){for(var c=c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=f&&0>=h&&(f=1);a=this.spacing.width;isFinite(a)||(a=0);c=this.spacing.height;isFinite(c)||(c=0);null!==b&&b.Ub("Layout");d=[];switch(this.alignment){case Bs:var k=a,l=c,m=Math.max(this.Hp.width,1);if(!isFinite(m))for(var n=m=0;n=f&&0>=h&&(f=1);a=this.spacing.width;isFinite(a)||(a=0);c=this.spacing.height;isFinite(c)||(c=0);null!==b&&b.Ub("Layout");d=[];switch(this.alignment){case Bs:var k=a,l=c,m=Math.max(this.Gp.width,1);if(!isFinite(m))for(var n=m=0;nf-1||0h)d.push(new A(0,x,h+k,B)),v=0,t=u,x+=B,B=0;B=Math.max(B,H);H=0;switch(s){case As:H=-q.width;break;default:H=0}p.moveTo(t+H,x);switch(s){case As:t-=y;break; -default:t+=y}v++}d.push(new A(0,x,h+k,B));break;case ts:k=f;l=a;m=c;n=Math.max(this.Hp.width,1);p=x=y=0;q=w.K();for(f=0;f=y&&(h-=y);for(var y=H=0,E=Math.max(this.Hp.height,1),ba=p=0,Q=!0,$=w.K(),f=0;f=y&&(h-=y);for(var y=H=0,E=Math.max(this.Gp.height,1),ba=p=0,Q=!0,$=w.K(),f=0;fk-1||0h){d.push(new A(0,Q?v-p:v,h+l,ba+p+m));for(V=0;Vy&&(e.width+=e.x-y,e.x=y)}for(k=f=h=e=0;kd?1:0}; Mn.smartComparer=function(a,b){if(null!==a){if(null!==b){for(var c=a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=a.count)1===a.count&&(a=a.first(),a.ka=0,a.ra=0);else{var b=new I(Us);b.Hc(a.i);a=new I(Us);var c=new I(Us),d;d=this.sort(b);var e=this.Vy,f=this.BC,h=this.Wd,k=this.Fo,l=this.Wy,m=this.pr,b=this.bl,n=this.SD,p=this.Gg,q=this.iv,e=this.Pf,f=this.Kx,h=this.fJ;if(!isFinite(h)|| -0>=h)h=NaN;k=this.iH;if(!isFinite(k)||0>=k)k=1;l=this.ye;isFinite(l)||(l=0);m=this.pf;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Rs&&f===Ss?e=Ds:e===Rs&&f!==Ss&&(f=Ss,e=this.Pf);if((this.direction===Ms||this.direction===Ns)&&this.sorting!==Gs){for(var r=0;!(r>=d.length);r+=2){a.add(d.da(r));if(r+1>=d.length)break;c.add(d.da(r+1))}this.direction===Ms?(this.Pf===Rs&&a.reverse(),d=new I(Us),d.Hc(a),d.Hc(c)):(this.Pf===Rs&&c.reverse(),d=new I(Us),d.Hc(c),d.Hc(a))}for(var s= -d.length,u=n=0,r=0;rm&&(0===r||r===d.length-1)&&(t/=2);n+=t;u++}if(isNaN(h)||e===Rs){isNaN(b)&&(b=6);if(e!==Ds&&e!==Rs){t=-Infinity;for(r=0;rh?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.Vy=e;this.BC=f;this.Wd=h;this.Fo=k;this.Wy=l;this.pr=m;this.bl=b;this.SD=n;this.Gg=p;this.iv=q;b=d;d=this.Vy;e=this.Wd;f=this.Wy;k=this.pr;l=this.bl;m=this.Gg;n=this.iv;if(this.direction!==Ms&&this.direction!==Ns||d!==Rs)if(this.direction===Ms||this.direction===Ns){h=0;switch(d){case Qs:h=180*Ys(this,e,m,f,n)/Math.PI;break;case Ds:n=b=0;h=a.first();null!==h&&(b=Vs(h,Math.PI/2));h=c.first();null!==h&&(n=Vs(h,Math.PI/2));h=180*Ys(this,e,m,f,l+(b+ +Cs.prototype.doLayout=function(a){null===a&&w.k("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts");null===this.network&&(this.network=this.makeNetwork(a));a=this.network.vertexes;if(1>=a.count)1===a.count&&(a=a.first(),a.ka=0,a.ra=0);else{var b=new I(Us);b.Hc(a.i);a=new I(Us);var c=new I(Us),d;d=this.sort(b);var e=this.Vy,f=this.BC,h=this.Wd,k=this.Eo,l=this.Wy,m=this.pr,b=this.al,n=this.SD,p=this.Gg,q=this.iv,e=this.Pf,f=this.Kx,h=this.gJ;if(!isFinite(h)|| +0>=h)h=NaN;k=this.iH;if(!isFinite(k)||0>=k)k=1;l=this.ye;isFinite(l)||(l=0);m=this.pf;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Rs&&f===Ss?e=Ds:e===Rs&&f!==Ss&&(f=Ss,e=this.Pf);if((this.direction===Ms||this.direction===Ns)&&this.sorting!==Gs){for(var r=0;!(r>=d.length);r+=2){a.add(d.ea(r));if(r+1>=d.length)break;c.add(d.ea(r+1))}this.direction===Ms?(this.Pf===Rs&&a.reverse(),d=new I(Us),d.Hc(a),d.Hc(c)):(this.Pf===Rs&&c.reverse(),d=new I(Us),d.Hc(c),d.Hc(a))}for(var s= +d.length,u=n=0,r=0;rm&&(0===r||r===d.length-1)&&(t/=2);n+=t;u++}if(isNaN(h)||e===Rs){isNaN(b)&&(b=6);if(e!==Ds&&e!==Rs){t=-Infinity;for(r=0;rh?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.Vy=e;this.BC=f;this.Wd=h;this.Eo=k;this.Wy=l;this.pr=m;this.al=b;this.SD=n;this.Gg=p;this.iv=q;b=d;d=this.Vy;e=this.Wd;f=this.Wy;k=this.pr;l=this.al;m=this.Gg;n=this.iv;if(this.direction!==Ms&&this.direction!==Ns||d!==Rs)if(this.direction===Ms||this.direction===Ns){h=0;switch(d){case Qs:h=180*Ys(this,e,m,f,n)/Math.PI;break;case Ds:n=b=0;h=a.first();null!==h&&(b=Vs(h,Math.PI/2));h=c.first();null!==h&&(n=Vs(h,Math.PI/2));h=180*Ys(this,e,m,f,l+(b+ n)/2)/Math.PI;break;case Ps:h=k/b.length}if(this.direction===Ms){switch(d){case Qs:Zs(this,a,f,Os);break;case Ds:$s(this,a,f,Os);break;case Ps:at(this,a,k/2,f,Os)}switch(d){case Qs:Zs(this,c,f+h,Fs);break;case Ds:$s(this,c,f+h,Fs);break;case Ps:at(this,c,k/2,f+h,Fs)}}else{switch(d){case Qs:Zs(this,c,f,Os);break;case Ds:$s(this,c,f,Os);break;case Ps:at(this,c,k/2,f,Os)}switch(d){case Qs:Zs(this,a,f+h,Fs);break;case Ds:$s(this,a,f+h,Fs);break;case Ps:at(this,a,k/2,f+h,Fs)}}}else switch(d){case Qs:Zs(this, b,f,this.direction);break;case Ds:$s(this,b,f,this.direction);break;case Ps:at(this,b,k,f,this.direction);break;case Rs:bt(this,b,k,f,this.direction)}else bt(this,b,k,f-k/2,Fs)}this.updateParts();this.network=null;this.zf=!0}; -function at(a,b,c,d,e){var f=a.pr,h=a.Wd;a=a.Gg;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;lc){for(f=d+(e===Fs?f:-f);0>f;)f+=360;f%=360;180c){for(f=d+(e===Fs?f:-f);0>f;)f+=360;f%=360;180=n.length-1)break;et(a,l,m,n,p,e,f)||ft(a,l,m,n,p,e,f);l=f.x;m=f.y}w.v(f);a.Qm++;if(!(23Math.abs(r)?Math.abs(l-f)<(n[0].width+n[n.length-1].width)/2&&(h=0):h=0Math.abs(q)?0:q;q=!1;q=Math.abs(f)>Math.abs(p)?0p:0a.Qm?a.Wd-h/(2*Math.PI):5>n.length&&10=p.length-1)break;et(a,l,m,p,q,e,n)||ft(a,l,m,p,q,e,n);l=n.x;m=n.y}w.v(n);a.Qm++;if(!(23a.Qm?a.Wd-f/(2*Math.PI):a.Wd-(0k){m=b-a;if(m<-k)return h.x=m,h.y=n,!1;p=!0}}else if(m=b-a,m<-k){m=b+a;if(m>k)return h.x=m,h.y=n,!1;p=!0}n=Math.sqrt(1-Math.min(1,m*m/(k*k)))*l;0>c!==p&&(n=-n);if(Math.abs(c-n)>(d[e].height+d[e+1].height)/2)return h.x=m,h.y=n,!1;h.x=m;h.y=n;return!0} -function ft(a,b,c,d,e,f,h){var k=a.Wd,l=a.Gg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.bl;d=!1;if(0<=b!==(f===Fs)){if(n=c-a,n<-l){n=c+a;if(n>l){h.x=m;h.y=n;return}d=!0}}else if(n=c+a,n>l){n=c-a;if(n<-l){h.x=m;h.y=n;return}d=!0}m=Math.sqrt(1-Math.min(1,n*n/(l*l)))*k;0>b!==d&&(m=-m);h.x=m;h.y=n}Cs.prototype.commitLayout=function(){this.commitNodes();this.eu&&this.commitLinks()}; +function ct(a,b,c,d,e){for(var f=a.Wd,h=a.Gg,k=a.Eo,l=f*Math.cos(d*Math.PI/180),m=h*Math.sin(d*Math.PI/180),n=w.K(),p=b.ec(),q=0;q=p.length-1)break;et(a,l,m,p,q,e,n)||ft(a,l,m,p,q,e,n);l=n.x;m=n.y}w.v(n);a.Qm++;if(!(23a.Qm?a.Wd-f/(2*Math.PI):a.Wd-(0k){m=b-a;if(m<-k)return h.x=m,h.y=n,!1;p=!0}}else if(m=b-a,m<-k){m=b+a;if(m>k)return h.x=m,h.y=n,!1;p=!0}n=Math.sqrt(1-Math.min(1,m*m/(k*k)))*l;0>c!==p&&(n=-n);if(Math.abs(c-n)>(d[e].height+d[e+1].height)/2)return h.x=m,h.y=n,!1;h.x=m;h.y=n;return!0} +function ft(a,b,c,d,e,f,h){var k=a.Wd,l=a.Gg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.al;d=!1;if(0<=b!==(f===Fs)){if(n=c-a,n<-l){n=c+a;if(n>l){h.x=m;h.y=n;return}d=!0}}else if(n=c+a,n>l){n=c-a;if(n<-l){h.x=m;h.y=n;return}d=!0}m=Math.sqrt(1-Math.min(1,n*n/(l*l)))*k;0>b!==d&&(m=-m);h.x=m;h.y=n}Cs.prototype.commitLayout=function(){this.commitNodes();this.eu&&this.commitLinks()}; Cs.prototype.commitNodes=function(){for(var a=this.YG,b=this.network.vertexes.i;b.next();){var c=b.value;c.x+=a.x;c.y+=a.y;c.commit()}};Cs.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()}; -function Xs(a,b,c,d,e){var f=a.PG;if(.001>Math.abs(a.Fo-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;for(var h=0,k=0,k=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1)),l=0,m=0;m<=f;m++)l=void 0!==d&&void 0!==e?d+m*e/f:m*Math.PI/(2*f),l=Math.sin(l),h+=Math.sqrt(1-a*a*l*l)*k;return void 0!==d&&void 0!==e?(b>c?b:c)*h:4*(b>c?b:c)*h}function Ws(a,b,c,d,e){var f=0,f=void 0!==d&&void 0!==e?Xs(a,1,c,d,e):Xs(a,1,c);return b/f} -function Ys(a,b,c,d,e){if(.001>Math.abs(a.Fo-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-f*f*l*l)*a;if(h>=e)return k*a}} -Cs.prototype.sort=function(a){switch(this.sorting){case Ks:break;case Ls:a.reverse();break;case Is:a.sort(this.comparer);break;case Js:a.sort(this.comparer);a.reverse();break;case Gs:for(var b=[],c=0;ce&&(e=k,f=h)}else for(h=0;he&&(e=k,f=h);d.add(a.da(f));b[f]=-1;f=a.da(f);e=0;for(h=f.lc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&& -b[e]++;for(f=f.ic;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(f=0;fa[f].indexOf(l)&&a[f].push(l);for(b=b.lc;b.next();)l=d.indexOf(b.value.fromVertex),l!==f&&0>a[f].indexOf(l)&&a[f].push(l)}h=[];for(f=0;fMath.abs(a.Eo-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;for(var h=0,k=0,k=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1)),l=0,m=0;m<=f;m++)l=void 0!==d&&void 0!==e?d+m*e/f:m*Math.PI/(2*f),l=Math.sin(l),h+=Math.sqrt(1-a*a*l*l)*k;return void 0!==d&&void 0!==e?(b>c?b:c)*h:4*(b>c?b:c)*h}function Ws(a,b,c,d,e){var f=0,f=void 0!==d&&void 0!==e?Xs(a,1,c,d,e):Xs(a,1,c);return b/f} +function Ys(a,b,c,d,e){if(.001>Math.abs(a.Eo-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-f*f*l*l)*a;if(h>=e)return k*a}} +Cs.prototype.sort=function(a){switch(this.sorting){case Ks:break;case Ls:a.reverse();break;case Is:a.sort(this.comparer);break;case Js:a.sort(this.comparer);a.reverse();break;case Gs:for(var b=[],c=0;ce&&(e=k,f=h)}else for(h=0;he&&(e=k,f=h);d.add(a.ea(f));b[f]=-1;f=a.ea(f);e=0;for(h=f.lc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&& +b[e]++;for(f=f.ic;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(f=0;fa[f].indexOf(l)&&a[f].push(l);for(b=b.lc;b.next();)l=d.indexOf(b.value.fromVertex),l!==f&&0>a[f].indexOf(l)&&a[f].push(l)}h=[];for(f=0;fa[b[p]].indexOf(b[p===b.length-1?0:p+1])&&u.push(p===b.length-1?0:p+1);if(0===u.length)for(p=0;pH.indexOf(Q)||$H.indexOf(Q)|| $=t?l+1:l)),v+=l=t&&l++,y>=t&&y++,l>y&&(H=y,y=l,l=H),y-l<(b.length+2)/2===(lq||q===l||(s=q>l?q-l:l-q,p+=qh-s?1:-1);b.splice(0>p?l:l+1,0,m);c.splice(k,1);k--}else f=!1;if(f)break;else b.push(c[0]),c.splice(0,1)}for(f=0;fq||q===l||(s=q>l?q-l:l-q,p+=qh-s?1:-1);b.splice(0>p?l:l+1,0,m);c.splice(k,1);k--}else f=!1;if(f)break;else b.push(c[0]),c.splice(0,1)}for(f=0;f=a?a:360,this.J())}); w.defineProperty(Cs,{Pf:"arrangement"},function(){return this.ld},function(a){this.ld!==a&&(w.mb(a,Cs,Cs,"arrangement"),a===Rs||a===Ds||a===Qs||a===Ps)&&(this.ld=a,this.J())});w.defineProperty(Cs,{direction:"direction"},function(){return this.aa},function(a){this.aa!==a&&(w.mb(a,Cs,Cs,"direction"),a===Fs||a===Os||a===Ms||a===Ns)&&(this.aa=a,this.J())}); w.defineProperty(Cs,{sorting:"sorting"},function(){return this.$h},function(a){this.$h!==a&&(w.mb(a,Cs,Cs,"sorting"),a===Ks||a===Ls||a===Is||Js||a===Gs)&&(this.$h=a,this.J())});w.defineProperty(Cs,{comparer:"comparer"},function(){return this.Jh},function(a){this.Jh!==a&&(w.j(a,"function",Cs,"comparer"),this.Jh=a,this.J())});w.defineProperty(Cs,{spacing:"spacing"},function(){return this.ai},function(a){this.ai!==a&&(w.j(a,"number",Cs,"spacing"),this.ai=a,this.J())}); -w.defineProperty(Cs,{Kx:"nodeDiameterFormula"},function(){return this.rs},function(a){this.rs!==a&&(w.mb(a,Cs,Cs,"nodeDiameterFormula"),a===Hs||a===Ss)&&(this.rs=a,this.J())});w.u(Cs,{ZG:"actualXRadius"},function(){return this.Wd});w.u(Cs,{$G:"actualYRadius"},function(){return this.Gg});w.u(Cs,{XJ:"actualSpacing"},function(){return this.bl});w.u(Cs,{YG:"actualCenter"},function(){return isNaN(this.oe.x)||isNaN(this.oe.y)?new z(0,0):new z(this.oe.x+this.ZG,this.oe.y+this.$G)});var Ds; +w.defineProperty(Cs,{Kx:"nodeDiameterFormula"},function(){return this.rs},function(a){this.rs!==a&&(w.mb(a,Cs,Cs,"nodeDiameterFormula"),a===Hs||a===Ss)&&(this.rs=a,this.J())});w.u(Cs,{ZG:"actualXRadius"},function(){return this.Wd});w.u(Cs,{$G:"actualYRadius"},function(){return this.Gg});w.u(Cs,{YJ:"actualSpacing"},function(){return this.al});w.u(Cs,{YG:"actualCenter"},function(){return isNaN(this.oe.x)||isNaN(this.oe.y)?new z(0,0):new z(this.oe.x+this.ZG,this.oe.y+this.$G)});var Ds; Cs.ConstantSpacing=Ds=w.p(Cs,"ConstantSpacing",0);var Qs;Cs.ConstantDistance=Qs=w.p(Cs,"ConstantDistance",1);var Ps;Cs.ConstantAngle=Ps=w.p(Cs,"ConstantAngle",2);var Rs;Cs.Packed=Rs=w.p(Cs,"Packed",3);var Fs;Cs.Clockwise=Fs=w.p(Cs,"Clockwise",4);var Os;Cs.Counterclockwise=Os=w.p(Cs,"Counterclockwise",5);var Ms;Cs.BidirectionalLeft=Ms=w.p(Cs,"BidirectionalLeft",6);var Ns;Cs.BidirectionalRight=Ns=w.p(Cs,"BidirectionalRight",7);var Ks;Cs.Forwards=Ks=w.p(Cs,"Forwards",8);var Ls; -Cs.Reverse=Ls=w.p(Cs,"Reverse",9);var Is;Cs.Ascending=Is=w.p(Cs,"Ascending",10);var Js;Cs.Descending=Js=w.p(Cs,"Descending",11);var Gs;Cs.Optimized=Gs=w.p(Cs,"Optimized",12);var Hs;Cs.Pythagorean=Hs=w.p(Cs,"Pythagorean",13);var Ss;Cs.Circular=Ss=w.p(Cs,"Circular",14);function Es(){this.Vp=-Infinity;this.zq=this.fo=null} -Es.prototype.compare=function(a,b){if(0this.Vp||Math.abs(a)a&&0this.Up||Math.abs(a)a&&0f?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new z(n.x+n.width+d.width,n.y),l[1]=new z(n.x,n.y+n.height+d.height),f=2):(p=Zt(l,f,e,k,n.width,n.height,d),q=l[p],r=new z(q.x+n.width+d.width, -q.y),s=new z(q.x,q.y+n.height+d.height),p+1f?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new z(n.x+n.width+d.width,n.y),l[1]=new z(n.x,n.y+n.height+d.height),f=2):(p=st(l,f,e,k,n.width,n.height,d),q=l[p],r=new z(q.x+n.width+d.width, +q.y),s=new z(q.x,q.y+n.height+d.height),p+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().cb,d=this.network.vertexes.i;d.next();){if(d.value.cb.Tf(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Fg?a.Fg=new I(du):a.Fg.clear();a.Fg.Hc(a.network.vertexes);var c=a.Fg;c.sort(function(a,b){return null===a||null===b||a===b?0:b.fg-a.fg});for(var d=c.count-1;0<=d&&1>=c.da(d).fg;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=Td((m+s+n*n*4/(h*h))/ -s);h=(m-1)*p/2;m=(m-1)*q/2;f.cb=new A(k-r.x-h,l-r.y-m,p+2*h,q+2*m);f.focus=new z(r.x+h,r.y+m)}a.network=d;return c}function cu(a,b){for(var c=a.network.vertexes.i;c.next();){var d=c.value;d.network=b;if(null!==d.Dh){var e=d.Dh.da(d.ZA);d.fg=e.ty;var f=e.FB,h=e.GB;d.cb=new A(d.ka-f,d.ra-h,e.uy,e.sy);d.focus=new z(f,h);d.ZA--}}for(c=a.network.edges.i;c.next();)c.value.network=b;a.network=b} -function eu(a,b){var c=b.pn;if(null!==c&&0!==c.count){var d=b.ka,e=b.ra,f=b.width,h=b.height;null!==b.Dh&&0=p.fg?l++:(k=!0,m++,h+=Math.atan2(b.ra-p.ra,b.ka-p.ka))}if(0!==l)for(0>1)+n)*(0===k%2?1:-1);l.ka=d+p*Math.cos(q);l.ra=e+p*Math.sin(q);k++}}}function Zt(a,b,c,d,e,f,h){var k=9E19,l=-1,m=0;a:for(;mn.y&&a[q].x-n.xn.x&&a[q].y-n.ya.network.vertexes.count)return!1;null===a.Fg?a.Fg=new I(du):a.Fg.clear();a.Fg.Hc(a.network.vertexes);var c=a.Fg;c.sort(function(a,b){return null===a||null===b||a===b?0:b.fg-a.fg});for(var d=c.count-1;0<=d&&1>=c.ea(d).fg;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=Td((m+s+n*n*4/(h*h))/ +s);h=(m-1)*p/2;m=(m-1)*q/2;f.cb=new A(k-r.x-h,l-r.y-m,p+2*h,q+2*m);f.focus=new z(r.x+h,r.y+m)}a.network=d;return c}function cu(a,b){for(var c=a.network.vertexes.i;c.next();){var d=c.value;d.network=b;if(null!==d.Dh){var e=d.Dh.ea(d.ZA);d.fg=e.ty;var f=e.FB,h=e.GB;d.cb=new A(d.ka-f,d.ra-h,e.uy,e.sy);d.focus=new z(f,h);d.ZA--}}for(c=a.network.edges.i;c.next();)c.value.network=b;a.network=b} +function eu(a,b){var c=b.pn;if(null!==c&&0!==c.count){var d=b.ka,e=b.ra,f=b.width,h=b.height;null!==b.Dh&&0=p.fg?l++:(k=!0,m++,h+=Math.atan2(b.ra-p.ra,b.ka-p.ka))}if(0!==l)for(0>1)+n)*(0===k%2?1:-1);l.ka=d+p*Math.cos(q);l.ra=e+p*Math.sin(q);k++}}}function st(a,b,c,d,e,f,h){var k=9E19,l=-1,m=0;a:for(;mn.y&&a[q].x-n.xn.x&&a[q].y-n.yl+h?(d=d+f-k,e=e-l-h,Td(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,Td(d*d+e*e)):e+cl+h?e-(l+h):e+cr?(p=Math.abs(e.M.bottom-k.M.y),p=(1+p)*s):ds?(n=a.Tx,null===n&&(a.Tx=n=new ta(0)),m=n.random(),s= n.random(),n=(d>p?1:-1)*(1+(e.width>k.width?e.width:k.width))*m,p=(l>r?1:-1)*(1+(e.height>k.height?e.height:k.height))*s):(m=f.stiffness*(s-f.length),n=(p-d)/s*m,p=(r-l)/s*m),k.forceX+=n,k.forceY+=p,e.forceX-=n,e.forceY-=p;c=0;d=Math.max(a.Oh/20,50);for(e=0;ed&&(f=d),h<-d?h=-d:h>d&&(h=d),k.ka+=f,k.ra+=h,c=Math.max(c,f*f+h*h));return c>a.GE*a.GE}ht.prototype.moveFixedVertex=function(){}; ht.prototype.commitLayout=function(){this.gB();this.commitNodes();this.eu&&this.commitLinks()};ht.prototype.gB=function(){if(this.tq)for(var a=this.network.edges.i;a.next();){var b=a.value.link;null!==b&&(b.Ab=rc,b.Bb=rc)}};ht.prototype.commitNodes=function(){var a=0,b=0;if(this.hH){var c=w.Ef();this.sh(this.network,c);b=this.oe;a=b.x-c.x;b=b.y-c.y;w.Db(c)}for(var c=w.Ef(),d=this.network.vertexes.i;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.cb),c.x+=a,c.y+=b,e.cb=c;e.commit()}w.Db(c)}; -ht.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()};ht.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Bo:a};ht.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Ao:a};ht.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.yo:a};ht.prototype.electricalFieldX=function(){return 0};ht.prototype.electricalFieldY=function(){return 0}; -ht.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.zo:a};ht.prototype.gravitationalFieldX=function(){return 0};ht.prototype.gravitationalFieldY=function(){return 0};ht.prototype.isFixed=function(a){return a.isFixed};w.u(ht,{BK:"currentIteration"},function(){return this.Rr});w.defineProperty(ht,{lE:"arrangementSpacing"},function(){return this.jg},function(a){w.G(a,ha,ht,"arrangementSpacing");this.jg.L(a)||(this.jg.assign(a),this.J())}); +ht.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()};ht.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Ao:a};ht.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.zo:a};ht.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.xo:a};ht.prototype.electricalFieldX=function(){return 0};ht.prototype.electricalFieldY=function(){return 0}; +ht.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.yo:a};ht.prototype.gravitationalFieldX=function(){return 0};ht.prototype.gravitationalFieldY=function(){return 0};ht.prototype.isFixed=function(a){return a.isFixed};w.u(ht,{CK:"currentIteration"},function(){return this.Rr});w.defineProperty(ht,{lE:"arrangementSpacing"},function(){return this.jg},function(a){w.G(a,ha,ht,"arrangementSpacing");this.jg.L(a)||(this.jg.assign(a),this.J())}); w.defineProperty(ht,{hH:"arrangesToOrigin"},function(){return this.Kq},function(a){this.Kq!==a&&(w.j(a,"boolean",ht,"arrangesToOrigin"),this.Kq=a,this.J())});w.defineProperty(ht,{tq:"setsPortSpots"},function(){return this.Zh},function(a){this.Zh!==a&&(w.j(a,"boolean",ht,"setsPortSpots"),this.Zh=a,this.J())});w.defineProperty(ht,{comments:"comments"},function(){return this.Ih},function(a){this.Ih!==a&&(w.j(a,"boolean",ht,"comments"),this.Ih=a,this.J())}); -w.defineProperty(ht,{IA:"maxIterations"},function(){return this.cp},function(a){this.cp!==a&&(w.j(a,"number",ht,"maxIterations"),0<=a&&(this.cp=a,this.J()))});w.defineProperty(ht,{GE:"epsilonDistance"},function(){return this.sr},function(a){this.sr!==a&&(w.j(a,"number",ht,"epsilonDistance"),0b.toVertex.index&&(a.$x(b),b.rev=!0);break;case ku:for(d=this.network.vertexes.i;d.next();)a=d.value,a.Qp=-1,a.finish=-1;for(a=this.network.edges.i;a.next();)a.value.forest=!1;this.ns=0;for(d.reset();d.next();)b=d.value,0===b.lc.count&&uu(this,b);for(d.reset();d.next();)b=d.value,-1===b.Qp&&uu(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.Qpb.toVertex.index&&(a.$x(b),b.rev=!0);break;case ku:for(d=this.network.vertexes.i;d.next();)a=d.value,a.Pp=-1,a.finish=-1;for(a=this.network.edges.i;a.next();)a.value.forest=!1;this.ns=0;for(d.reset();d.next();)b=d.value,0===b.lc.count&&uu(this,b);for(d.reset();d.next();)b=d.value,-1===b.Pp&&uu(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.Ppu&&0u&&0u&&0u&&0d[this.Lf]&&(this.Wv=d[b]-1,this.Lf=b),d[b]=c&&(l=k.Oe);var m=null;0<=c&&(m=k.He);var n=0,p=[],q=k.near;null!==q&&q.layer===k.layer&&(p[n]=q.column-1,n++);if(null!==l)for(q=0;q>1,f[h]=0!==(n&1)?p[m]:p[m-1]+p[m]>>1)}yu(a,b,d);return f}function Gu(a,b,c,d,e,f){if(b.component===d){b.component=c;var h=0,k=0;if(e)for(var l=b.ic;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&Gu(a,m,c,d,e,f)}if(f)for(l=b.lc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&Gu(a,m,c,d,e,f)}} function Hu(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var h=b.ic;h.next();)Hu(a,h.value.toVertex,c,d,e,f);if(f)for(b=b.lc;b.next();)Hu(a,b.value.fromVertex,c,d,e,f)}}function ru(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid)return b}return null}function su(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.ic;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} -function tu(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.lc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function uu(a,b){b.Qp=a.ns;a.ns++;for(var c=b.ic;c.next();){var d=c.value,e=d.toVertex;-1===e.Qp&&(d.forest=!0,uu(a,e))}b.finish=a.ns;a.ns++} -ju.prototype.assignLayers=function(){switch(this.Zo){case Iu:Ju(this);break;case Ku:for(var a=0,b=this.network.vertexes.i;b.next();)a=Lu(this,b.value),this.qb=Math.max(a,this.qb);for(b.reset();b.next();)a=b.value,a.layer=this.qb-a.layer;break;default:case lu:Ju(this);for(b=this.network.vertexes.i;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.lc.count&&Mu(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.qb=-1;for(b.reset();b.next();){var c=b.value;c.layer-= +function tu(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.lc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function uu(a,b){b.Pp=a.ns;a.ns++;for(var c=b.ic;c.next();){var d=c.value,e=d.toVertex;-1===e.Pp&&(d.forest=!0,uu(a,e))}b.finish=a.ns;a.ns++} +ju.prototype.assignLayers=function(){switch(this.Yo){case Iu:Ju(this);break;case Ku:for(var a=0,b=this.network.vertexes.i;b.next();)a=Lu(this,b.value),this.qb=Math.max(a,this.qb);for(b.reset();b.next();)a=b.value,a.layer=this.qb-a.layer;break;default:case lu:Ju(this);for(b=this.network.vertexes.i;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.lc.count&&Mu(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.qb=-1;for(b.reset();b.next();){var c=b.value;c.layer-= a;this.qb=Math.max(this.qb,c.layer)}}};function Ju(a){for(var b=a.network.vertexes.i;b.next();){var c=Nu(a,b.value);a.qb=Math.max(c,a.qb)}}function Nu(a,b){var c=0;if(-1===b.layer){for(var d=b.ic;d.next();)var e=d.value,f=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,Nu(a,f)+e);b.layer=c}else c=b.layer;return c}function Lu(a,b){var c=0;if(-1===b.layer){for(var d=b.lc;d.next();)var e=d.value,f=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,Lu(a,f)+e);b.layer=c}else c=b.layer;return c} function Mu(a,b){if(!b.valid){b.valid=!0;for(var c=b.ic;c.next();)Mu(a,c.value.toVertex);for(c=a.network.vertexes.i;c.next();)c.value.component=-1;for(var d=b.Oe.n,e=d.length,f=0;fh&&Gu(a,k,0,-1,!0,!1)}for(Gu(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.i;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.Oe.n,e=s.length,f=0;fd)&&!n&&(h=l,d=m)}if(0>f){for(c.reset();c.next();)f=c.value,1===f.component&&(f.layer-=e);b.component=0}else h.component=0}}} function wu(a,b,c){return 90===a.aa?c&&!b.rev||!c&&b.rev?270:90:180===a.aa?c&&!b.rev||!c&&b.rev?0:180:270===a.aa?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0} -ju.prototype.initializeIndices=function(){switch(this.Oo){default:case Ou:for(var a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;b.index=this.he[c];this.he[c]++}break;case mu:a=this.network.vertexes.i;for(b=this.qb;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Pu(this,c);break;case Qu:for(a=this.network.vertexes.i,b=0;b<=this.qb;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Ru(this,c)}}; +ju.prototype.initializeIndices=function(){switch(this.No){default:case Ou:for(var a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;b.index=this.he[c];this.he[c]++}break;case mu:a=this.network.vertexes.i;for(b=this.qb;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Pu(this,c);break;case Qu:for(a=this.network.vertexes.i,b=0;b<=this.qb;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Ru(this,c)}}; function Pu(a,b){var c=b.layer;b.index=a.he[c];a.he[c]++;for(var c=b.He.ec(),d=!0;d;)for(var d=!1,e=0;eh.portFromColOffset&&(d=!0,c[e]=h,c[e+1]=f)}for(e=0;eh.portToColOffset&&(d=!0,c[e]=h,c[e+1]=f)}for(e=0;e=h;d--)f=Tu(this,d,-1)||f;e=this.countCrossings();e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,1)||f;e=this.countCrossings();e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1, +e=h;d--)f=Tu(this,d,-1)||f;e=this.countCrossings();e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,1)||f;e=this.countCrossings();e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1, d=h;d<=c;d++)f=Tu(this,d,-1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,0)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,0)||f;e>=a?Bu(this,b):(a=e,b=Au(this))}break;default:case nu:for(c=this.qb,h=0,k=a+1;(d=this.countCrossings())=h;d--)f=Tu(this,d,-1)||f;e=this.countCrossings();e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,1)||f;e=this.countCrossings(); e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,-1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,0)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,0)||f;e>=a?Bu(this,b):(a=e,b=Au(this))}}Bu(this,b)}; function Su(a,b,c){var d=0,e=xu(a,b),f=a.he[b],h=Fu(a,b,c);c=Eu(a,b,c);for(d=0;d=this.vg[c]+this.Kf[c]&&(e=0);0=m.M.bottom?(za=m.M.y+m.M.height,b.w(R++,na,za+eb),b.w(R++,na,za),b.w(R++,na,za-ib)):(b.w(R++,na,la+eb),b.w(R++, na,la),b.w(R++,na,la-ib)):270===this.aa?la<=m.M.y?(za=m.M.y,b.w(R++,na,za-ib),b.w(R++,na,za),b.w(R++,na,za+eb)):(b.w(R++,na,la-ib),b.w(R++,na,la),b.w(R++,na,la+eb)):0===this.aa&&(na>=m.M.right?(za=m.M.x+m.M.width,b.w(R++,za+eb,la),b.w(R++,za,la),b.w(R++,za-ib,la)):(b.w(R++,na+eb,la),b.w(R++,na,la),b.w(R++,na-ib,la)));else{b.w(R++,Ua,lb);var Yd=0;if(180===this.aa||0===this.aa){if(180===this.aa?na>=m.M.right:na<=m.M.x)Yd=(0===this.aa?-ib:eb)/2;b.w(R++,Ua+Yd,la)}else{if(270===this.aa?la>=m.M.bottom: la<=m.M.y)Yd=(90===this.aa?-ib:eb)/2;b.w(R++,na,lb+Yd)}b.w(R++,na,la)}else ib=Math.max(10,this.vg[qa.layer]),eb=Math.max(10,this.Kf[qa.layer]),180===this.aa?(Q&&b.w(R++,na-ib,la),b.w(R++,na,la),Q&&b.w(R++,na+eb,la)):90===this.aa?(Q&&b.w(R++,na,la+eb),b.w(R++,na,la),Q&&b.w(R++,na,la-ib)):270===this.aa?(Q&&b.w(R++,na,la-ib),b.w(R++,na,la),Q&&b.w(R++,na,la+eb)):(Q&&b.w(R++,na+eb,la),b.w(R++,na,la),Q&&b.w(R++,na-ib,la));m=qa}if(null===k||b.computeSpot(!1)!==tb||$)if(Ua=b.l(R-1).x,lb=b.l(R-1).y,na=b.l(R).x, la=b.l(R).y,$){var qd=this.Kf[l.layer],uc=0;180===this.aa||0===this.aa?(uc=lb,uc>=l.M.y&&uc<=l.M.bottom&&(180===this.aa?na>=l.M.x:na<=l.M.right)&&(za=l.ka+(180===this.aa?-qd:qd),uc=uc=l.M.x&&uc<=l.M.right&&(270===this.aa?la>=l.M.y:la<=l.M.bottom)&&(za=l.ra+(270===this.aa?-qd:qd),uc=uc=l.M.x?(za=l.M.x+l.M.width,b.ea(R-2,za,lb),b.ea(R-1,za+eb,lb)):90===this.aa&&la<=l.M.bottom?(za=l.M.y,b.ea(R-2,Ua,za),b.ea(R-1,Ua,za-ib)):270===this.aa&&la>=l.M.y?(za=l.M.y+l.M.height,b.ea(R-2,Ua,za),b.ea(R-1,Ua,za+eb)):0===this.aa&&na<=l.M.right&&(za=l.M.x,b.ea(R-2,za,lb),b.ea(R-1,za-ib,lb));else{ib=Math.max(10,this.vg[l.layer]);eb=Math.max(10,this.Kf[l.layer]);Yd=0;if(180===this.aa||0=== +b.w(R++,na,la)}else if(Q)ib=Math.max(10,this.vg[l.layer]),eb=Math.max(10,this.Kf[l.layer]),180===this.aa&&na>=l.M.x?(za=l.M.x+l.M.width,b.ca(R-2,za,lb),b.ca(R-1,za+eb,lb)):90===this.aa&&la<=l.M.bottom?(za=l.M.y,b.ca(R-2,Ua,za),b.ca(R-1,Ua,za-ib)):270===this.aa&&la>=l.M.y?(za=l.M.y+l.M.height,b.ca(R-2,Ua,za),b.ca(R-1,Ua,za+eb)):0===this.aa&&na<=l.M.right&&(za=l.M.x,b.ca(R-2,za,lb),b.ca(R-1,za-ib,lb));else{ib=Math.max(10,this.vg[l.layer]);eb=Math.max(10,this.Kf[l.layer]);Yd=0;if(180===this.aa||0=== this.aa){if(180===this.aa?na<=l.M.x:na>=l.M.right)Yd=(0===this.aa?eb:-ib)/2;b.w(R++,na+Yd,lb)}else{if(270===this.aa?la<=l.M.y:la>=l.M.bottom)Yd=(90===this.aa?eb:-ib)/2;b.w(R++,Ua,la+Yd)}b.w(R++,na,la)}}else{for(;null!==l&&l!==m;){Ja=qa=null;for(var Ag=l.ic.i;Ag.next();){var Cf=Ag.value;if(Cf.link===c.link&&(qa=Cf.toVertex,Ja=Cf.fromVertex,null!==Ja.rd&&(Ja=null),null===qa.rd))break}var Ua=0,lb=0,na=0,la=0,hb=0,ib=0,eb=0;if(qa!==m)if(Ua=b.l(R-1).x,lb=b.l(R-1).y,na=qa.ka,la=qa.ra,$)if(180===this.aa|| 0===this.aa){var oe=null!==Ja?Ja.ra:lb;oe!==la&&(hb=this.Nb[qa.layer],2===R&&(hb=0===this.aa?Math.max(hb,Ua):Math.min(hb,Ua)),b.w(R++,hb,lb),b.w(R++,hb,la))}else{var Ed=null!==Ja?Ja.ka:Ua;Ed!==na&&(hb=this.Nb[qa.layer],2===R&&(hb=90===this.aa?Math.max(hb,lb):Math.min(hb,lb)),b.w(R++,Ua,hb),b.w(R++,na,hb))}else ib=Math.max(10,this.vg[qa.layer]),eb=Math.max(10,this.Kf[qa.layer]),180===this.aa?(b.w(R++,na+eb,la),Q&&b.w(R++,na,la),b.w(R++,na-ib,la)):90===this.aa?(b.w(R++,na,la-ib),Q&&b.w(R++,na,la),b.w(R++, na,la+eb)):270===this.aa?(b.w(R++,na,la+eb),Q&&b.w(R++,na,la),b.w(R++,na,la-ib)):(b.w(R++,na-ib,la),Q&&b.w(R++,na,la),b.w(R++,na+eb,la));l=qa}$&&(Ua=b.l(R-1).x,lb=b.l(R-1).y,na=b.l(R).x,la=b.l(R).y,180===this.aa||0===this.aa?lb!==la&&(hb=0===this.aa?Math.min(Math.max((na+Ua)/2,this.Nb[m.layer]),na):Math.max(Math.min((na+Ua)/2,this.Nb[m.layer]),na),b.w(R++,hb,lb),b.w(R++,hb,la)):Ua!==na&&(hb=90===this.aa?Math.min(Math.max((la+lb)/2,this.Nb[m.layer]),la):Math.max(Math.min((la+lb)/2,this.Nb[m.layer]), -la),b.w(R++,Ua,hb),b.w(R++,na,hb)))}if(null!==d&&Q){if(null!==h){if(b.computeSpot(!0)===tb){var ub=b.l(0),Ge=b.l(2);ub.L(Ge)||b.ea(1,(ub.x+Ge.x)/2,(ub.y+Ge.y)/2)}ba=b.getLinkPoint(e,h,tb,!0,!1,f,k);ba.H()||ba.set(e.W.Hl);b.ea(0,ba.x,ba.y)}null!==k&&(b.computeSpot(!1)===tb&&(ub=b.l(b.qa-1),Ge=b.l(b.qa-3),ub.L(Ge)||b.ea(b.qa-2,(ub.x+Ge.x)/2,(ub.y+Ge.y)/2)),ba=b.getLinkPoint(f,k,tb,!1,!1,e,h),ba.H()||ba.set(f.W.Hl),b.ea(b.qa-1,ba.x,ba.y))}b.jj();c.commit()}}}for(var gd=new I(W),bg=this.network.edges.i;bg.next();){var Df= +la),b.w(R++,Ua,hb),b.w(R++,na,hb)))}if(null!==d&&Q){if(null!==h){if(b.computeSpot(!0)===tb){var ub=b.l(0),Ge=b.l(2);ub.L(Ge)||b.ca(1,(ub.x+Ge.x)/2,(ub.y+Ge.y)/2)}ba=b.getLinkPoint(e,h,tb,!0,!1,f,k);ba.H()||ba.set(e.W.Gl);b.ca(0,ba.x,ba.y)}null!==k&&(b.computeSpot(!1)===tb&&(ub=b.l(b.qa-1),Ge=b.l(b.qa-3),ub.L(Ge)||b.ca(b.qa-2,(ub.x+Ge.x)/2,(ub.y+Ge.y)/2)),ba=b.getLinkPoint(f,k,tb,!1,!1,e,h),ba.H()||ba.set(f.W.Gl),b.ca(b.qa-1,ba.x,ba.y))}b.jj();c.commit()}}}for(var gd=new I(W),bg=this.network.edges.i;bg.next();){var Df= bg.value.link;null!==Df&&Df.jc&&!gd.contains(Df)&&gd.add(Df)}if(0zc.y&&(Ef=Mc.y>zc.y?0:rd.xRb.x&&(ob=di.x>Rb.x?0:hd.yb.layer?1:a.Web.We?1:a.peb.pe?1:0:0};ju.prototype.aG=function(a,b){return a instanceof fv&&b instanceof fv&&a!==b?a.firstb.first||a.qib.qi||a.Web.We?1:a.peb.pe?1:0:0}; ju.prototype.by=function(a,b){return a instanceof fv&&b instanceof fv&&a!==b?a.eeb.ee||a.qib.qi||a.Web.We?1:a.peb.pe?1:0:0};function gv(a,b){var c=a-b;return-1c}function xu(a,b){var c,d=a.he[b];if(d>=a.hh.length){c=[];for(var e=0;ea&&(this.Yi=a,this.J()))});w.defineProperty(ju,{tq:"setsPortSpots"},function(){return this.Zh},function(a){this.Zh!==a&&(w.j(a,"boolean",ju,"setsPortSpots"),this.Zh=a,this.J())});w.defineProperty(ju,{vF:"linkSpacing"},function(){return this.Wr},function(a){this.Wr!==a&&(w.j(a,"number",ju,"linkSpacing"),0<=a&&(this.Wr=a,this.J()))});w.u(ju,{LI:"maxLayer"},function(){return this.qb}); -w.u(ju,{iL:"maxIndex"},function(){return this.Wv});w.u(ju,{hL:"maxColumn"},function(){return this.Jb});w.u(ju,{nL:"minIndexLayer"},function(){return this.es});w.u(ju,{jL:"maxIndexLayer"},function(){return this.Lf});var ku;ju.CycleDepthFirst=ku=w.p(ju,"CycleDepthFirst",0);var qu;ju.CycleGreedy=qu=w.p(ju,"CycleGreedy",1);var lu;ju.LayerOptimalLinkLength=lu=w.p(ju,"LayerOptimalLinkLength",0);var Iu;ju.LayerLongestPathSink=Iu=w.p(ju,"LayerLongestPathSink",1);var Ku; +w.defineProperty(ju,{DH:"cycleRemoveOption"},function(){return this.wo},function(a){this.wo!==a&&(w.mb(a,ju,ju,"cycleRemoveOption"),a===qu||a===ku)&&(this.wo=a,this.J())});w.defineProperty(ju,{DI:"layeringOption"},function(){return this.Yo},function(a){this.Yo!==a&&(w.mb(a,ju,ju,"layeringOption"),a===lu||a===Iu||a===Ku)&&(this.Yo=a,this.J())}); +w.defineProperty(ju,{pI:"initializeOption"},function(){return this.No},function(a){this.No!==a&&(w.mb(a,ju,ju,"initializeOption"),a===mu||a===Qu||a===Ou)&&(this.No=a,this.J())});w.defineProperty(ju,{dL:"iterations"},function(){return this.Fm},function(a){this.Fm!==a&&(w.Fd(a,pu,"iterations"),0<=a&&(this.Fm=a,this.J()))});w.defineProperty(ju,{fH:"aggressiveOption"},function(){return this.jo},function(a){this.jo!==a&&(w.mb(a,ju,ju,"aggressiveOption"),a===Uu||a===nu||a===Vu)&&(this.jo=a,this.J())}); +w.defineProperty(ju,{yL:"packOption"},function(){return this.Yi},function(a){this.Yi!==a&&(w.j(a,"number",ju,"packOption"),0<=a&&8>a&&(this.Yi=a,this.J()))});w.defineProperty(ju,{tq:"setsPortSpots"},function(){return this.Zh},function(a){this.Zh!==a&&(w.j(a,"boolean",ju,"setsPortSpots"),this.Zh=a,this.J())});w.defineProperty(ju,{vF:"linkSpacing"},function(){return this.Wr},function(a){this.Wr!==a&&(w.j(a,"number",ju,"linkSpacing"),0<=a&&(this.Wr=a,this.J()))});w.u(ju,{MI:"maxLayer"},function(){return this.qb}); +w.u(ju,{jL:"maxIndex"},function(){return this.Wv});w.u(ju,{iL:"maxColumn"},function(){return this.Jb});w.u(ju,{oL:"minIndexLayer"},function(){return this.es});w.u(ju,{kL:"maxIndexLayer"},function(){return this.Lf});var ku;ju.CycleDepthFirst=ku=w.p(ju,"CycleDepthFirst",0);var qu;ju.CycleGreedy=qu=w.p(ju,"CycleGreedy",1);var lu;ju.LayerOptimalLinkLength=lu=w.p(ju,"LayerOptimalLinkLength",0);var Iu;ju.LayerLongestPathSink=Iu=w.p(ju,"LayerLongestPathSink",1);var Ku; ju.LayerLongestPathSource=Ku=w.p(ju,"LayerLongestPathSource",2);var mu;ju.InitDepthFirstOut=mu=w.p(ju,"InitDepthFirstOut",0);var Qu;ju.InitDepthFirstIn=Qu=w.p(ju,"InitDepthFirstIn",1);var Ou;ju.InitNaive=Ou=w.p(ju,"InitNaive",2);var Uu;ju.AggressiveNone=Uu=w.p(ju,"AggressiveNone",0);var nu;ju.AggressiveLess=nu=w.p(ju,"AggressiveLess",1);var Vu;ju.AggressiveMore=Vu=w.p(ju,"AggressiveMore",2);ju.PackNone=0;var Wu;ju.PackExpand=Wu=1;var Xu;ju.PackStraighten=Xu=2;var Zu;ju.PackMedian=Zu=4;var ou; -ju.PackAll=ou=7;function fv(){this.index=this.pe=this.We=this.ee=this.first=this.layer=0;this.link=null;this.qi=0}w.$d(fv,{layer:!0,first:!0,ee:!0,We:!0,pe:!0,index:!0,link:!0,qi:!0});function pu(){sg.call(this)}w.La(pu,sg);w.fa("LayeredDigraphNetwork",pu);pu.prototype.createVertex=function(){return new hv};pu.prototype.createEdge=function(){return new iv}; -function hv(){ms.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.Qp=NaN;this.kn=0;this.OA=this.PA=null}w.La(hv,ms);w.fa("LayeredDigraphVertex",hv);function iv(){ns.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}w.La(iv,ns);w.fa("LayeredDigraphEdge",iv); -function Y(){0b.level)return!1;a.removeChild(c.parent,c)}return!0}Y.prototype.removeChild=function(a,b){if(null!==a&&null!==b){for(var c=a.children,d=0,e=0;ef?Zv(a,k,qa,B,y):$v(a,k,qa,B,y);qa=y.x;B=y.width;y=y.height;break;case Nv:for(m=0;ms&&($za&&(Jw(a,-za,0,gb,m-1),Kw(E,-za,0),Kw(V,-za,0),za=0)}n.pa.m(za,ca);B=Math.max(B,ba);y=Math.max(y,H+(0===R?0:x)+Ja.height);$=ba}else{0s&&(caza&&(Jw(a,0,-za,gb,m-1),Kw(E,0,-za),Kw(V,0,-za),za=0);n.pa.m($,za);y=Math.max(y,Q);B=Math.max(B,H+(0===R?0:x)+Ja.width);ca=Q}Ra++}0q&&(q=0),135q&&(q=0),135v&&(v=0),p===Ov&&(l+=u/2+a.T.y),k+=d+c):b?(null===a.comments?d>B&&(p=Ow(p,d-B,0),k=p.x,l=p.y,B=d,q=0):B=Mw(a,B,q),0>q&&(k-=q,q=0),135y&&(p=Ow(p,0,e-y),k=p.x,l=p.y,y=e,v=0):y=Nw(a,y,v),0>v&&(l-=v,v=0),k+=d+c);if(0f[0].x?f[2].assign(f[1]):f[1].assign(f[2])),f[3].yf[0].x?f[3].assign(f[2]):f[2].assign(f[3])),p[0].m(q+d,0),p[1].m(p[0].x,e),p[2].yf[0].y?f[2].assign(f[1]):f[1].assign(f[2])),f[3].xf[0].y?f[3].assign(f[2]):f[2].assign(f[3])),p[0].m(0,v+e),p[1].m(d,p[0].y),p[2].xf[0].y?f[2].assign(f[1]):f[1].assign(f[2])),f[3].xf[0].y?f[3].assign(f[2]):f[2].assign(f[3])),p[0].m(0,v+e),p[1].m(d,p[0].y),p[2].xc?Zv(b,e,Ra,H,E):$v(b,e,Ra,H,E);Ra=E.x;H=E.width;E=E.height;break;case Nv:for(k=0;kr&&(bar&&(Qp&&(p=0),135B&&(B=0));b.Oa.m(p,B);b.jb.m(H,E)}} +V+(0===$?0:v)+qa.width),Q+=gb+qa.height),ca++;0<$&&(d?(E+=Math.max(0,s),bap&&(p=0),135B&&(B=0));b.Na.m(p,B);b.jb.m(H,E)}} function Zv(a,b,c,d,e){var f=b.length;if(0===f)return new A(c,0,d,e);if(1===f){var h=b[0];d=h.jb.width;e=h.jb.height;return new A(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===Uv(a),n=0,p=0,q=0,r=0;rm&&(d-=m),e=Math.max(e,Math.max(v, -q)+b+s.height),0>h.pa.x&&(c=Sw(a,h.pa.x,!1,c,k))):(h.pa.m(d+b,c+k/2-h.T.y-h.Oa.y),d=Math.max(d,Math.max(x,p)+b+s.width),m=c+k/2-h.T.y-h.Oa.y,e=Math.max(e,m+s.height),0>m&&(e-=m),0>h.pa.y&&(c=Sw(a,h.pa.y,!0,c,k))));return new A(c,0,d,e)} +0,x=p,v=q;m?(p=c+k,q=0):(p=0,q=c+k);for(r=0;rm&&(d-=m),e=Math.max(e,Math.max(v, +q)+b+s.height),0>h.pa.x&&(c=Sw(a,h.pa.x,!1,c,k))):(h.pa.m(d+b,c+k/2-h.T.y-h.Na.y),d=Math.max(d,Math.max(x,p)+b+s.width),m=c+k/2-h.T.y-h.Na.y,e=Math.max(e,m+s.height),0>m&&(e-=m),0>h.pa.y&&(c=Sw(a,h.pa.y,!0,c,k))));return new A(c,0,d,e)} function $v(a,b,c,d,e){var f=b.length;if(0===f)return new A(c,0,d,e);if(1===f){var h=b[0];d=h.jb.width;e=h.jb.height;return new A(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===Uv(a),n=0,p=0,q=0,r=0;rp&&(d-=p),e=Math.max(e,Math.abs(Math.min(v, -q))+l+s.height),0>h.pa.x&&(c=Sw(a,h.pa.x,!1,c,k))):(h.pa.m(-d-s.width-l,c+k/2-h.T.y-h.Oa.y),d=Math.max(d,Math.abs(Math.min(x,p))+l+s.width),p=c+k/2-h.T.y-h.Oa.y,e=Math.max(e,p+s.height),0>p&&(e-=p),0>h.pa.y&&(c=Sw(a,h.pa.y,!0,c,k))));for(r=0;rp&&(d-=p),e=Math.max(e,Math.abs(Math.min(v, +q))+l+s.height),0>h.pa.x&&(c=Sw(a,h.pa.x,!1,c,k))):(h.pa.m(-d-s.width-l,c+k/2-h.T.y-h.Na.y),d=Math.max(d,Math.abs(Math.min(x,p))+l+s.width),p=c+k/2-h.T.y-h.Na.y,e=Math.max(e,p+s.height),0>p&&(e-=p),0>h.pa.y&&(c=Sw(a,h.pa.y,!0,c,k))));for(r=0;rd&&(d=c+a.width);0>c&&(d-=c);return d;case Vv:return a.width>b?a.width:b;case Wv:return 2*a.T.x>b?a.width:b+a.width-2*a.T.x;case Mv:case Bv:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case Nv:return a.width-a.T.x+a.nodeSpacing/2+b;case Ov:return Math.max(a.width,a.T.x+a.nodeSpacing/2+b);default:return b}} function Nw(a,b,c){switch(a.alignment){case Kv:case Lw:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case Vv:return a.height>b?a.height:b;case Wv:return 2*a.T.y>b?a.height:b+a.height-2*a.T.y;case Mv:case Bv:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case Nv:return a.height-a.T.y+a.nodeSpacing/2+b;case Ov:return Math.max(a.height,a.T.y+a.nodeSpacing/2+b);default:return b}} function Ow(a,b,c){switch(a){case Lw:b/=2;c/=2;break;case Kv:b/=2;c/=2;break;case Vv:c=b=0;break;case Wv:break;default:w.k("Unhandled alignment value "+a.toString())}return new z(b,c)}function Gw(a,b,c,d,e,f){b=Ow(b,c,d);Jw(a,b.x,b.y,e,f)}function Jw(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].pa;f.x+=b;f.y+=c}} @@ -2004,7 +2004,7 @@ Math.max(0,c)+h.width;h=s}else{c=e;d=9999999;if(!(null===p||2>p.length||null===q b.length+l.length);for(d=f=e=0;fe;)t=l[f++],n[d++].m(t.x,t.y+m);l=aw(a,d);for(e=0;ep.length||null===f||2>f.length)e=null;else{n=aw(a,p.length+f.length);for(m=x=l=0;lf;)e=p[l++],n[m++].m(e.x,e.y);e=aw(a,m);for(l=0;l=a?0:135>=a?90:225>=a?180:315>=a?270:0} function Xv(a){var b=Uv(a),b=90===b||270===b,c=a.layerSpacing;if(0=a&&(this.ua.nodeIndentPastParent=a,this.J()))}); @@ -2026,35 +2026,35 @@ w.defineProperty(Y,{breadthLimit:"breadthLimit"},function(){return this.ua.bread w.defineProperty(Y,{rowIndent:"rowIndent"},function(){return this.ua.rowIndent},function(a){this.ua.rowIndent!==a&&(w.j(a,"number",Y,"rowIndent"),0<=a&&(this.ua.rowIndent=a,this.J()))});w.defineProperty(Y,{commentSpacing:"commentSpacing"},function(){return this.ua.commentSpacing},function(a){this.ua.commentSpacing!==a&&(w.j(a,"number",Y,"commentSpacing"),this.ua.commentSpacing=a,this.J())}); w.defineProperty(Y,{commentMargin:"commentMargin"},function(){return this.ua.commentMargin},function(a){this.ua.commentMargin!==a&&(w.j(a,"number",Y,"commentMargin"),this.ua.commentMargin=a,this.J())});w.defineProperty(Y,{setsPortSpot:"setsPortSpot"},function(){return this.ua.setsPortSpot},function(a){this.ua.setsPortSpot!==a&&(w.j(a,"boolean",Y,"setsPortSpot"),this.ua.setsPortSpot=a,this.J())}); w.defineProperty(Y,{portSpot:"portSpot"},function(){return this.ua.portSpot},function(a){w.G(a,L,Y,"portSpot");this.ua.portSpot.L(a)||(this.ua.portSpot=a,this.J())});w.defineProperty(Y,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.ua.setsChildPortSpot},function(a){this.ua.setsChildPortSpot!==a&&(w.j(a,"boolean",Y,"setsChildPortSpot"),this.ua.setsChildPortSpot=a,this.J())}); -w.defineProperty(Y,{childPortSpot:"childPortSpot"},function(){return this.ua.childPortSpot},function(a){w.G(a,L,Y,"childPortSpot");this.ua.childPortSpot.L(a)||(this.ua.childPortSpot=a,this.J())});w.defineProperty(Y,{rK:"alternateSorting"},function(){return this.va.sorting},function(a){this.va.sorting!==a&&(w.mb(a,Y,Y,"alternateSorting"),a===Gv||a===Hv||a===Iv||Jv)&&(this.va.sorting=a,this.J())}); -w.defineProperty(Y,{fK:"alternateComparer"},function(){return this.va.comparer},function(a){this.va.comparer!==a&&(w.j(a,"function",Y,"alternateComparer"),this.va.comparer=a,this.J())});w.defineProperty(Y,{$J:"alternateAngle"},function(){return this.va.angle},function(a){this.va.angle!==a&&(w.j(a,"number",Y,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.va.angle=a,this.J())}); -w.defineProperty(Y,{ZJ:"alternateAlignment"},function(){return this.va.alignment},function(a){this.va.alignment!==a&&(w.mb(a,Y,Y,"alternateAlignment"),this.va.alignment=a,this.J())});w.defineProperty(Y,{jK:"alternateNodeIndent"},function(){return this.va.nodeIndent},function(a){this.va.nodeIndent!==a&&(w.j(a,"number",Y,"alternateNodeIndent"),0<=a&&(this.va.nodeIndent=a,this.J()))}); -w.defineProperty(Y,{kK:"alternateNodeIndentPastParent"},function(){return this.va.nodeIndentPastParent},function(a){this.va.nodeIndentPastParent!==a&&(w.j(a,"number",Y,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.va.nodeIndentPastParent=a,this.J()))});w.defineProperty(Y,{lK:"alternateNodeSpacing"},function(){return this.va.nodeSpacing},function(a){this.va.nodeSpacing!==a&&(w.j(a,"number",Y,"alternateNodeSpacing"),this.va.nodeSpacing=a,this.J())}); -w.defineProperty(Y,{hK:"alternateLayerSpacing"},function(){return this.va.layerSpacing},function(a){this.va.layerSpacing!==a&&(w.j(a,"number",Y,"alternateLayerSpacing"),this.va.layerSpacing=a,this.J())});w.defineProperty(Y,{iK:"alternateLayerSpacingParentOverlap"},function(){return this.va.layerSpacingParentOverlap},function(a){this.va.layerSpacingParentOverlap!==a&&(w.j(a,"number",Y,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.va.layerSpacingParentOverlap=a,this.J()))}); -w.defineProperty(Y,{eK:"alternateCompaction"},function(){return this.va.compaction},function(a){this.va.compaction!==a&&(w.mb(a,Y,Y,"alternateCompaction"),a===Rv||a===Tv)&&(this.va.compaction=a,this.J())});w.defineProperty(Y,{aK:"alternateBreadthLimit"},function(){return this.va.breadthLimit},function(a){this.va.breadthLimit!==a&&(w.j(a,"number",Y,"alternateBreadthLimit"),0<=a&&(this.va.breadthLimit=a,this.J()))}); -w.defineProperty(Y,{oK:"alternateRowSpacing"},function(){return this.va.rowSpacing},function(a){this.va.rowSpacing!==a&&(w.j(a,"number",Y,"alternateRowSpacing"),this.va.rowSpacing=a,this.J())});w.defineProperty(Y,{nK:"alternateRowIndent"},function(){return this.va.rowIndent},function(a){this.va.rowIndent!==a&&(w.j(a,"number",Y,"alternateRowIndent"),0<=a&&(this.va.rowIndent=a,this.J()))}); -w.defineProperty(Y,{dK:"alternateCommentSpacing"},function(){return this.va.commentSpacing},function(a){this.va.commentSpacing!==a&&(w.j(a,"number",Y,"alternateCommentSpacing"),this.va.commentSpacing=a,this.J())});w.defineProperty(Y,{cK:"alternateCommentMargin"},function(){return this.va.commentMargin},function(a){this.va.commentMargin!==a&&(w.j(a,"number",Y,"alternateCommentMargin"),this.va.commentMargin=a,this.J())}); -w.defineProperty(Y,{qK:"alternateSetsPortSpot"},function(){return this.va.setsPortSpot},function(a){this.va.setsPortSpot!==a&&(w.j(a,"boolean",Y,"alternateSetsPortSpot"),this.va.setsPortSpot=a,this.J())});w.defineProperty(Y,{mK:"alternatePortSpot"},function(){return this.va.portSpot},function(a){w.G(a,L,Y,"alternatePortSpot");this.va.portSpot.L(a)||(this.va.portSpot=a,this.J())}); -w.defineProperty(Y,{pK:"alternateSetsChildPortSpot"},function(){return this.va.setsChildPortSpot},function(a){this.va.setsChildPortSpot!==a&&(w.j(a,"boolean",Y,"alternateSetsChildPortSpot"),this.va.setsChildPortSpot=a,this.J())});w.defineProperty(Y,{bK:"alternateChildPortSpot"},function(){return this.va.childPortSpot},function(a){w.G(a,L,Y,"alternateChildPortSpot");this.va.childPortSpot.L(a)||(this.va.childPortSpot=a,this.J())});var jv;Y.PathDefault=jv=w.p(Y,"PathDefault",-1);var kv; +w.defineProperty(Y,{childPortSpot:"childPortSpot"},function(){return this.ua.childPortSpot},function(a){w.G(a,L,Y,"childPortSpot");this.ua.childPortSpot.L(a)||(this.ua.childPortSpot=a,this.J())});w.defineProperty(Y,{sK:"alternateSorting"},function(){return this.va.sorting},function(a){this.va.sorting!==a&&(w.mb(a,Y,Y,"alternateSorting"),a===Gv||a===Hv||a===Iv||Jv)&&(this.va.sorting=a,this.J())}); +w.defineProperty(Y,{gK:"alternateComparer"},function(){return this.va.comparer},function(a){this.va.comparer!==a&&(w.j(a,"function",Y,"alternateComparer"),this.va.comparer=a,this.J())});w.defineProperty(Y,{aK:"alternateAngle"},function(){return this.va.angle},function(a){this.va.angle!==a&&(w.j(a,"number",Y,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.va.angle=a,this.J())}); +w.defineProperty(Y,{$J:"alternateAlignment"},function(){return this.va.alignment},function(a){this.va.alignment!==a&&(w.mb(a,Y,Y,"alternateAlignment"),this.va.alignment=a,this.J())});w.defineProperty(Y,{kK:"alternateNodeIndent"},function(){return this.va.nodeIndent},function(a){this.va.nodeIndent!==a&&(w.j(a,"number",Y,"alternateNodeIndent"),0<=a&&(this.va.nodeIndent=a,this.J()))}); +w.defineProperty(Y,{lK:"alternateNodeIndentPastParent"},function(){return this.va.nodeIndentPastParent},function(a){this.va.nodeIndentPastParent!==a&&(w.j(a,"number",Y,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.va.nodeIndentPastParent=a,this.J()))});w.defineProperty(Y,{mK:"alternateNodeSpacing"},function(){return this.va.nodeSpacing},function(a){this.va.nodeSpacing!==a&&(w.j(a,"number",Y,"alternateNodeSpacing"),this.va.nodeSpacing=a,this.J())}); +w.defineProperty(Y,{iK:"alternateLayerSpacing"},function(){return this.va.layerSpacing},function(a){this.va.layerSpacing!==a&&(w.j(a,"number",Y,"alternateLayerSpacing"),this.va.layerSpacing=a,this.J())});w.defineProperty(Y,{jK:"alternateLayerSpacingParentOverlap"},function(){return this.va.layerSpacingParentOverlap},function(a){this.va.layerSpacingParentOverlap!==a&&(w.j(a,"number",Y,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.va.layerSpacingParentOverlap=a,this.J()))}); +w.defineProperty(Y,{fK:"alternateCompaction"},function(){return this.va.compaction},function(a){this.va.compaction!==a&&(w.mb(a,Y,Y,"alternateCompaction"),a===Rv||a===Tv)&&(this.va.compaction=a,this.J())});w.defineProperty(Y,{bK:"alternateBreadthLimit"},function(){return this.va.breadthLimit},function(a){this.va.breadthLimit!==a&&(w.j(a,"number",Y,"alternateBreadthLimit"),0<=a&&(this.va.breadthLimit=a,this.J()))}); +w.defineProperty(Y,{pK:"alternateRowSpacing"},function(){return this.va.rowSpacing},function(a){this.va.rowSpacing!==a&&(w.j(a,"number",Y,"alternateRowSpacing"),this.va.rowSpacing=a,this.J())});w.defineProperty(Y,{oK:"alternateRowIndent"},function(){return this.va.rowIndent},function(a){this.va.rowIndent!==a&&(w.j(a,"number",Y,"alternateRowIndent"),0<=a&&(this.va.rowIndent=a,this.J()))}); +w.defineProperty(Y,{eK:"alternateCommentSpacing"},function(){return this.va.commentSpacing},function(a){this.va.commentSpacing!==a&&(w.j(a,"number",Y,"alternateCommentSpacing"),this.va.commentSpacing=a,this.J())});w.defineProperty(Y,{dK:"alternateCommentMargin"},function(){return this.va.commentMargin},function(a){this.va.commentMargin!==a&&(w.j(a,"number",Y,"alternateCommentMargin"),this.va.commentMargin=a,this.J())}); +w.defineProperty(Y,{rK:"alternateSetsPortSpot"},function(){return this.va.setsPortSpot},function(a){this.va.setsPortSpot!==a&&(w.j(a,"boolean",Y,"alternateSetsPortSpot"),this.va.setsPortSpot=a,this.J())});w.defineProperty(Y,{nK:"alternatePortSpot"},function(){return this.va.portSpot},function(a){w.G(a,L,Y,"alternatePortSpot");this.va.portSpot.L(a)||(this.va.portSpot=a,this.J())}); +w.defineProperty(Y,{qK:"alternateSetsChildPortSpot"},function(){return this.va.setsChildPortSpot},function(a){this.va.setsChildPortSpot!==a&&(w.j(a,"boolean",Y,"alternateSetsChildPortSpot"),this.va.setsChildPortSpot=a,this.J())});w.defineProperty(Y,{cK:"alternateChildPortSpot"},function(){return this.va.childPortSpot},function(a){w.G(a,L,Y,"alternateChildPortSpot");this.va.childPortSpot.L(a)||(this.va.childPortSpot=a,this.J())});var jv;Y.PathDefault=jv=w.p(Y,"PathDefault",-1);var kv; Y.PathDestination=kv=w.p(Y,"PathDestination",0);var rv;Y.PathSource=rv=w.p(Y,"PathSource",1);var Gv;Y.SortingForwards=Gv=w.p(Y,"SortingForwards",10);var Hv;Y.SortingReverse=Hv=w.p(Y,"SortingReverse",11);var Iv;Y.SortingAscending=Iv=w.p(Y,"SortingAscending",12);var Jv;Y.SortingDescending=Jv=w.p(Y,"SortingDescending",13);var Lw;Y.AlignmentCenterSubtrees=Lw=w.p(Y,"AlignmentCenterSubtrees",20);var Kv;Y.AlignmentCenterChildren=Kv=w.p(Y,"AlignmentCenterChildren",21);var Vv; Y.AlignmentStart=Vv=w.p(Y,"AlignmentStart",22);var Wv;Y.AlignmentEnd=Wv=w.p(Y,"AlignmentEnd",23);var Mv;Y.AlignmentBus=Mv=w.p(Y,"AlignmentBus",24);var Bv;Y.AlignmentBusBranching=Bv=w.p(Y,"AlignmentBusBranching",25);var Nv;Y.AlignmentTopLeftBus=Nv=w.p(Y,"AlignmentTopLeftBus",26);var Ov;Y.AlignmentBottomRightBus=Ov=w.p(Y,"AlignmentBottomRightBus",27);var Rv;Y.CompactionNone=Rv=w.p(Y,"CompactionNone",30);var Tv;Y.CompactionBlock=Tv=w.p(Y,"CompactionBlock",31);var lv; Y.StyleLayered=lv=w.p(Y,"StyleLayered",40);var Fv;Y.StyleLastParents=Fv=w.p(Y,"StyleLastParents",41);var Ev;Y.StyleAlternating=Ev=w.p(Y,"StyleAlternating",42);var Dv;Y.StyleRootOnly=Dv=w.p(Y,"StyleRootOnly",43);var nv;Y.ArrangementVertical=nv=w.p(Y,"ArrangementVertical",50);var Uw;Y.ArrangementHorizontal=Uw=w.p(Y,"ArrangementHorizontal",51);var qv;Y.ArrangementFixedRoots=qv=w.p(Y,"ArrangementFixedRoots",52);var mv;Y.LayerIndividual=mv=w.p(Y,"LayerIndividual",60);var zv; -Y.LayerSiblings=zv=w.p(Y,"LayerSiblings",61);var yv;Y.LayerUniform=yv=w.p(Y,"LayerUniform",62);function pv(){sg.call(this)}w.La(pv,sg);w.fa("TreeNetwork",pv);pv.prototype.createVertex=function(){return new ov};pv.prototype.createEdge=function(){return new Ww}; -function ov(){ms.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.pa=new z(0,0);this.jb=new ha(0,0);this.Oa=new z(0,0);this.oq=this.nq=this.tJ=!1;this.Bu=this.gu=null;this.sorting=Gv;this.comparer=ss;this.angle=0;this.alignment=Kv;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=Tv;this.breadthLimit= -0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=rc;this.setsChildPortSpot=!0;this.childPortSpot=rc}w.La(ov,ms);w.fa("TreeVertex",ov); +Y.LayerSiblings=zv=w.p(Y,"LayerSiblings",61);var yv;Y.LayerUniform=yv=w.p(Y,"LayerUniform",62);function pv(){sg.call(this)}w.Ka(pv,sg);w.fa("TreeNetwork",pv);pv.prototype.createVertex=function(){return new ov};pv.prototype.createEdge=function(){return new Ww}; +function ov(){ms.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.pa=new z(0,0);this.jb=new ha(0,0);this.Na=new z(0,0);this.oq=this.nq=this.uJ=!1;this.Bu=this.gu=null;this.sorting=Gv;this.comparer=ss;this.angle=0;this.alignment=Kv;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=Tv;this.breadthLimit= +0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=rc;this.setsChildPortSpot=!0;this.childPortSpot=rc}w.Ka(ov,ms);w.fa("TreeVertex",ov); ov.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.sorting=a.sorting,this.comparer=a.comparer,this.angle=a.angle,this.alignment=a.alignment,this.nodeIndent=a.nodeIndent,this.nodeIndentPastParent=a.nodeIndentPastParent,this.nodeSpacing=a.nodeSpacing,this.layerSpacing=a.layerSpacing,this.layerSpacingParentOverlap=a.layerSpacingParentOverlap,this.compaction=a.compaction,this.breadthLimit=a.breadthLimit,this.rowSpacing=a.rowSpacing,this.rowIndent=a.rowIndent,this.commentSpacing=a.commentSpacing, -this.commentMargin=a.commentMargin,this.setsPortSpot=a.setsPortSpot,this.portSpot=a.portSpot,this.setsChildPortSpot=a.setsChildPortSpot,this.childPortSpot=a.childPortSpot)};w.u(ov,{on:"childrenCount"},function(){return this.children.length});w.defineProperty(ov,{CL:"relativePosition"},function(){return this.pa},function(a){this.pa.set(a)});w.defineProperty(ov,{PL:"subtreeSize"},function(){return this.jb},function(a){this.jb.set(a)}); -w.defineProperty(ov,{OL:"subtreeOffset"},function(){return this.Oa},function(a){this.Oa.set(a)});function Ww(){ns.call(this);this.Fs=new z(0,0)}w.La(Ww,ns);w.fa("TreeEdge",Ww); -Ww.prototype.commit=function(){var a=this.link;if(null!==a&&!a.sj){var b=this.network.Sb,c=null,d=null;switch(b.If){case kv:c=this.fromVertex;d=this.toVertex;break;case rv:c=this.toVertex;d=this.fromVertex;break;default:w.k("Unhandled path value "+b.If.toString())}if(null!==c&&null!==d)if(b=this.Fs,0!==b.x||0!==b.y||c.tJ){var d=c.cb,e=Uv(c),f=Xv(c),h=c.rowSpacing;a.co();var k=a.Ye===xj,l=a.jc,m=0,n,p;a.em();if(l||k){for(m=2;4q.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Yv(c))))):c.alignment===Vv?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Yv(c))))):c.alignment===Vv?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Yv(c))))):c.alignment===Vv?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Yv(c))))):c.alignment===Vv?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Yv(c))))):c.alignment===Vv?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Yv(c))))):c.alignment===Vv?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Yv(c))))):c.alignment===Vv?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Yv(c))))):c.alignment===Vv?(r=d.left+b.x,0===b.x&&n.x