diff --git a/api/index.html b/api/index.html index b0c5279d3..ff00d98f6 100644 --- a/api/index.html +++ b/api/index.html @@ -970,7 +970,7 @@

Collection Classes

GoJS Class Index

@@ -999,7 +999,7 @@

GoJS Class Index

ClickCreatingTool

The ClickCreatingTool lets the user create a node by clicking where they want the new node to be. More... By default a double-click is required to start this tool; set #isDoubleClick to false if you want a single-click to create a node.

This tool is a standard mouse-up tool, the ToolManager.clickCreatingTool. However, it will not be able to start running unless you have set the #archetypeNodeData property to an object that can be copied and added to the diagram's model.

This tool does not utilize any Adornments or tool handles. This tool does conduct a transaction when inserting the new node.

-

ClickSelectingTool

The ClickSelectingTool selects and deselects Parts when there is a click. More... It does this by calling Tool.standardMouseSelect. It is also responsible for handling and dispatching click events on GraphObjects by calling Tool.standardMouseClick.

This tool is a standard mouse-up tool, the ToolManager.clickSelectingTool.

This tool does not utilize any Adornments or tool handles. This tool does not modify the model or conduct any transaction.

An example customization of this tool is shown in the Tree Map sample, where the Tool.standardMouseSelect method is overridden to permit the user to cycle through the chain of containing groups, changing the selection on each click to the next containing group.

+

ClickSelectingTool

The ClickSelectingTool selects and deselects Parts when there is a click. More... It does this by calling Tool.standardMouseSelect. It is also responsible for handling and dispatching click events on GraphObjects by calling Tool.standardMouseClick.

Note that this tool avoids raising click events on objects that are in temporary layers. This is to prevent parts such as selection adornments from interfering with clicking on selected nodes or links. (Adornments are in the "Adornment" Layer, which Layer.isTemporary.) However this means that if you add a GraphObject.click event handler on a GraphObject in an Adornment, it will not be called. You can get it to be called by setting GraphObject.isActionable to true on that object in the adornment.

This tool is a standard mouse-up tool, the ToolManager.clickSelectingTool.

This tool does not utilize any Adornments or tool handles. This tool does not modify the model or conduct any transaction.

An example customization of this tool is shown in the Tree Map sample, where the Tool.standardMouseSelect method is overridden to permit the user to cycle through the chain of containing groups, changing the selection on each click to the next containing group.

CommandHandler

The Diagram.commandHandler implements various commands such as CommandHandler.deleteSelection or CommandHandler.redo. More... The CommandHandler includes keyboard event handling to interpret key presses as commands.

CommandHandlers cannot be shared amongst multiple Diagrams.

You may define a CommandHandler subclass and override methods. However you must seriously consider calling the base method in order to gets its default behavior. There may be situations where not calling the base method may cause subtle bugs, but that depends on the method. Please read the Introduction page on Extensions for how to override methods and how to call a base method.

There is an example custom CommandHandler in the extensions directory: DrawCommandHandler.js, which provides alignment commands and additional behaviors for the arrow keys.

For additional discussion, please read the Introduction page on Commands.

Keyboard Shortcuts

The CommandHandler implements the following command bindings for keyboard input in #doKeyDown:
  • Ctrl-X & Shift-Del invoke #cutSelection
  • Ctrl-C & Ctrl-Insert invoke #copySelection
  • Ctrl-V & Shift-Insert invoke #pasteSelection
  • Del invokes #deleteSelection
  • Ctrl-A invokes #selectAll
  • Ctrl-Z & Alt-Backspace invoke undo
  • Ctrl-Y & Alt-Shift-Backspace invoke redo
  • Up & Down & Left & Right (arrow keys) invoke Diagram.scroll
  • PageUp & PageDown invoke Diagram.scroll
  • Home & End set Diagram.position
  • Ctrl-- & Keypad-- (minus) invoke #decreaseZoom
  • Ctrl-+ & Keypad-+ (plus) invoke #increaseZoom
  • Ctrl-0 invokes #resetZoom
  • Shift-Z invokes #zoomToFit; repeat to return to the original scale and position
  • Ctrl-G invokes #groupSelection
  • Ctrl-Shift-G invokes #ungroupSelection
  • F2 invokes #editTextBlock
  • Menu Key invokes #showContextMenu
  • Esc invokes #stopCommand

On a Macintosh the Command key is used as the modifier instead of the Control key.

On touch devices there is a default context menu that shows many commonly-used commands when you hold a finger down on the diagram.

@@ -1011,7 +1011,7 @@

GoJS Class Index

DraggingTool

The DraggingTool is used to move or copy selected parts with the mouse. More... This sets the Part.location property; you may want to save the location to the model by using a TwoWay Binding on the "location" property in your Parts/Nodes/Groups templates.

Dragging the selection moves parts for which Part.canMove is true. If the user holds down the Control key (Option key on Mac), this tool will make a copy of the parts being dragged, for those parts for which Part.canCopy is true.

When the drag starts it calls #computeEffectiveCollection to find the actual collection of Parts to be dragged. Normally this collection includes not only the Diagram.selection, but also parts that belong to those selected parts, such as members of groups. If #dragsTree is true, the effective collection also includes all of the nodes and links that constitute the subtree starting from selected nodes. The result of #computeEffectiveCollection is not a Set but a Map which remembers the original Part.location for all of the dragged parts. This map is saved as the value of #draggedParts.

During the drag if the user holds down the Control/Option key this tool makes a copy of the #draggedParts and proceeds to drag it around. (It only copies the Diagram.selection, not the whole effective collection, if #copiesEffectiveCollection is false.) The collection of copied parts is held by #copiedParts. It too is a Map remembering the original locations of the parts. #copiedParts will be null when this tool is moving (not copying) at the moment.

Each Part's movement is limited by the #computeMove method. By default it limits the Part.location to be within the bounds given by Part.minLocation and Part.maxLocation. (Those default to minus Infinity to plus Infinity.) As a further convenience, the value of NaN in minLocation and maxLocation cause #computeMove to use the part's current location. So, for example, an easy way to declare that the user may only drag a node horizontally is to just set:

$(go.Node,
  . . .
  { minLocation: new go.Point(-Infinity, NaN), maxLocation: new go.Point(Infinity, NaN) },
  . . .
)

If you set #isGridSnapEnabled to true, dragged or copied parts will be snapped to points on a grid. The snapping occurs continuously during a drag unless you set #isGridSnapRealtime to false. Normally the grid points come from the Diagram.grid, even if that grid is not GraphObject.visible. However you can override those grid's properties for the snapping grid cell size and offset by setting the properties here: #gridSnapCellSize and #gridSnapOrigin. This computes the point to snap to for each dragged part. The resulting point is used as the new Part.location.

For the most general control over where a part may be dragged, either set the Part.dragComputation property or override #computeMove. For the common case of wanting to keep member nodes within the Group that they are members of, you can do something like:

 // this is a Part.dragComputation function for limiting where a Node may be dragged
 function stayInGroup(part, pt, gridpt) {
   // don't constrain top-level nodes
   var grp = part.containingGroup;
   if (grp === null) return pt;
   // try to stay within the background Shape of the Group
   var back = grp.findObject("SHAPE");
   if (back === null) return pt;
   // allow dragging a Node out of a Group if the Shift key is down
   //if (part.diagram.lastInput.shift) return pt;
   var p1 = back.getDocumentPoint(go.Spot.TopLeft);
   var p2 = back.getDocumentPoint(go.Spot.BottomRight);
   var b = part.actualBounds;
   var loc = part.location;
   // find the padding inside the group's placeholder that is around the member parts
   var m = (grp.placeholder !== null ? grp.placeholder.padding : new go.Margin(0));
   // now limit the location appropriately
   var x = Math.max(p1.x + m.left, Math.min(pt.x, p2.x - m.right - b.width - 1)) + (loc.x-b.x);
   var y = Math.max(p1.y + m.top, Math.min(pt.y, p2.y - m.bottom - b.height - 1)) + (loc.y-b.y);
   return new go.Point(x, y);
 }
Note that this expects there to be a "SHAPE" object within the Group's visual tree that delimits where the part may be dragged within the group. This also expects that Group.computesBoundsIncludingLinks is false. Then in your node template(s), just set:
$(go.Node,
  . . .,
  { dragComputation: stayInGroup },
  . . .
)

This tool does not utilize any Adornments or tool handles. If the drag is successful, it raises the "SelectionMoved" or "SelectionCopied" DiagramEvent and produces a "Move" or a "Copy" transaction.

-

DragSelectingTool

The DragSelectingTool lets the user select multiple parts within a rectangular area drawn by the user. More... There is a temporary part, the #box, that shows the current area encompassed between the mouse-down point and the current mouse point. The default drag selection box is a magenta rectangle. You can change the #box to customize its appearance -- see its documentation for an example.

This tool is a standard mouse-move tool, the ToolManager.dragSelectingTool. However this cannot start running unless there has been a motionless delay after the mouse-down event of at least #delay milliseconds.

This tool does not utilize any Adornments or tool handles, but it does temporarily add the #box part to the diagram. This tool does not modify the model or conduct any transaction.

Selection occurs on a mouse-up when it calls #selectInRect with the value of #computeBoxBounds. Selectable parts are selected when their bounds fall entirely within the rectangle, unless #isPartialInclusion is set to true.

If you implement your own drag-in-the-background-to-do-something tool, you may need to disable this tool or insert your new tool in the ToolManager.mouseMoveTools list before this tool, in order for your tool to run. There are two examples of such tools defined in the extensions directory: Drag Creating Tool and Drag Zooming Tool.

+

DragSelectingTool

The DragSelectingTool lets the user select multiple parts within a rectangular area drawn by the user. More... There is a temporary part, the #box, that shows the current area encompassed between the mouse-down point and the current mouse point. The default drag selection box is a magenta rectangle. You can change the #box to customize its appearance -- see its documentation for an example.

This tool is a standard mouse-move tool, the ToolManager.dragSelectingTool. However this cannot start running unless there has been a motionless delay after the mouse-down event of at least #delay milliseconds.

This tool does not utilize any Adornments or tool handles, but it does temporarily add the #box part to the diagram. This tool does not modify the model or conduct any transaction.

Selection occurs on a mouse-up when it calls #selectInRect with the value of #computeBoxBounds. Selectable parts are selected when their bounds fall entirely within the rectangle, unless #isPartialInclusion is set to true.

If you implement your own drag-in-the-background-to-do-something tool, you may need to disable this tool or insert your new tool in the ToolManager.mouseMoveTools list before this tool, in order for your tool to run. There are examples of such tools defined in the extensions directory: Realtime Drag Selecting Tool, Drag Creating Tool, and Drag Zooming Tool.

ForceDirectedEdge

This holds ForceDirectedLayout-specific information about Links. More...

This class inherits from LayoutEdge.

@@ -1021,7 +1021,7 @@

GoJS Class Index

Geometry

The Geometry class is used to define the "shape" of a Shape. More... A Geometry can be simple straight lines, rectangles, or ellipses. A Geometry can also be an arbitrarily complex path, consisting of a list of PathFigures.

A Geometry must not be modified once it has been used by a Shape. However, a Geometry may be shared by multiple Shapes.

-

GraphLinksModel

GraphLinksModels support links between nodes and grouping nodes and links into subgraphs. More... GraphLinksModels hold node data and link data in separate arrays. Node data is normally represented in a Diagram by instances of Node, but they could be represented by simple Parts or by Groups. Link data should be represented by instances of Link.

Each link data object is assumed to have two values, one referring to the node that the link is coming from and one that the link is going to. The #linkFromKeyProperty property names the property on the link data whose value is the key of the "from" node. The #linkToKeyProperty property names the property on the link data whose value is the key of the "to" node. The default values for these properties are "from" and "to" respectively.

For example, one can define a graph consisting of two nodes with one link connecting them:

 model.nodeDataArray = [
   { key: "Alpha" },
   { key: "Beta" }
 ];
 model.linkDataArray = [
   { from: "Alpha", to: "Beta" }
 ];

If you want to have subgraphs in your diagram, where a group node contains some number of nodes and links, you need to declare that some node data actually represent groups, and you need to provide a reference from a member node data to its containing group node data. The #nodeIsGroupProperty property names the property on a node data that is true if that node data represents a group. The #nodeGroupKeyProperty property names the property on a node data whose value is the key of the containing group's node data. The default values for these properties are "isGroup" and "group" respectively.

For example, one can define a graph consisting of one group containing a subgraph of two nodes connected by a link, with a second link from that group to a third node that is not a member of that group:

 model.nodeDataArray = [
   { key: "Group1", isGroup: true},
   { key: "Alpha", group: "Group1" },
   { key: "Beta", group: "Group1" },
   { key: "Gamma" }
 ];
 model.linkDataArray = [
   { from: "Alpha", to: "Beta" },
   { from: "Group1", to: "Gamma" }
 ];

GraphLinksModels also support distinguishing the "port" element of a node to which a link can connect, at either end of the link. This identification is a string that names the "port" element in the node. However, you need to set the #linkFromPortIdProperty and/or #linkToPortIdProperty properties before the model is able to get the "port id" information from the link data.

For example, one can define a graph consisting of a "subtraction" node and two inputs and one output. The "subtraction" node has two distinct inputs called "subtrahend" and "minuend"; the output is called "difference".

 model.linkFromPortIdProperty = "fromPort";  // necessary to remember portIds
 model.linkToPortIdProperty = "toPort";
 model.nodeDataArray = [
   { key: 1, constant: 5 },  // a constant input node
   { key: 2, constant: 2 },  // another constant node
   { key: 3, operation: "subtract" },
   { key: 4, value: 3 }  // the output node
 ];
 model.linkDataArray = [
   { from: 1, to: 3, toPort: "subtrahend" },
   { from: 2, to: 3, toPort: "minuend" },
   { from: 3, to: 4, fromPort: "difference" }
 ];
In this case links connected to node 3 (which is the subtraction operation) are distinguished by port id. The connections to the other nodes do not have any port identification, presumably because there is only one port on those nodes, representing the node value.

This model does not support the modification of whether a node data object is a group.

This model cannot detect the modification of the #linkDataArray array or the modification of any link data object. If you want to add or remove link data from the #linkDataArray, call the #addLinkData or #removeLinkData methods. If you want to modify the node a link connects to, call the #setFromKeyForLinkData and/or #setToKeyForLinkData methods. If you want to change the membership of a node data in a group, call the #setGroupKeyForNodeData method.

+

GraphLinksModel

GraphLinksModels support links between nodes and grouping nodes and links into subgraphs. More... GraphLinksModels hold node data and link data in separate arrays. Node data is normally represented in a Diagram by instances of Node, but they could be represented by simple Parts or by Groups. Link data should be represented by instances of Link.

Each link data object is assumed to have two values, one referring to the node that the link is coming from and one that the link is going to. The #linkFromKeyProperty property names the property on the link data whose value is the key of the "from" node. The #linkToKeyProperty property names the property on the link data whose value is the key of the "to" node. The default values for these properties are "from" and "to" respectively.

For example, one can define a graph consisting of two nodes with one link connecting them:

 model.nodeDataArray = [
   { key: "Alpha" },
   { key: "Beta" }
 ];
 model.linkDataArray = [
   { from: "Alpha", to: "Beta" }
 ];

If you want to have subgraphs in your diagram, where a group node contains some number of nodes and links, you need to declare that some node data actually represent groups, and you need to provide a reference from a member node data to its containing group node data. The #nodeIsGroupProperty property names the property on a node data that is true if that node data represents a group. The #nodeGroupKeyProperty property names the property on a node data whose value is the key of the containing group's node data. The default values for these properties are "isGroup" and "group" respectively.

For example, one can define a graph consisting of one group containing a subgraph of two nodes connected by a link, with a second link from that group to a third node that is not a member of that group:

 model.nodeDataArray = [
   { key: "Group1", isGroup: true},
   { key: "Alpha", group: "Group1" },
   { key: "Beta", group: "Group1" },
   { key: "Gamma" }
 ];
 model.linkDataArray = [
   { from: "Alpha", to: "Beta" },
   { from: "Group1", to: "Gamma" }
 ];

GraphLinksModels also support distinguishing the "port" element of a node to which a link can connect, at either end of the link. This identification is a string that names the "port" element in the node. However, you need to set the #linkFromPortIdProperty and/or #linkToPortIdProperty properties before the model is able to get the "port id" information from the link data.

For example, one can define a graph consisting of a "subtraction" node and two inputs and one output. The "subtraction" node has two distinct inputs called "subtrahend" and "minuend"; the output is called "difference".

 model.linkFromPortIdProperty = "fromPort";  // necessary to remember portIds
 model.linkToPortIdProperty = "toPort";
 model.nodeDataArray = [
   { key: 1, constant: 5 },  // a constant input node
   { key: 2, constant: 2 },  // another constant node
   { key: 3, operation: "subtract" },
   { key: 4, value: 3 }  // the output node
 ];
 model.linkDataArray = [
   { from: 1, to: 3, toPort: "subtrahend" },
   { from: 2, to: 3, toPort: "minuend" },
   { from: 3, to: 4, fromPort: "difference" }
 ];
In this case links connected to node 3 (which is the subtraction operation) are distinguished by port id. The connections to the other nodes do not have any port identification, presumably because there is only one port on those nodes, representing the node value.

Note that there is no requirement that the link data objects have any kind of unique identifier, unlike for node data. There is no expectation that there be references to link data in the model, so there is no need for such an identifier. When there are multiple links connecting two ports, the only way to distinguish the links in the model is by reference to the particular link data object. This is why there are two methods on the Diagram class for Nodes, Diagram.findNodeForKey and Diagram.findNodeForData, but there is only the one method for Links, Diagram.findLinkForData.

However you may wish to add your own unique identifiers on the link data. One way to implement this is by setting a property on the link data each time one is added to the model:

 model.addChangedListener(function(e) {
   if (e.change === go.ChangedEvent.Insert && e.modelChange === "linkDataArray") {
     var id = e.model.modelData.linkCounter;  // keep the counter on the Model.modelData object
     if (typeof id !== 'number') id = 0;
     e.model.modelData.linkCounter = id + 1;
     e.newValue.id = id;  // e.newValue is the link data object that was added
   }
 });
Note how the counter is kept on the Model.modelData object, so that it can be saved and loaded automatically. Remember to re-establish the listener on a newly constructed model, including those constructed by Model.fromJson.

This model does not support the modification of whether a node data object is a group.

This model cannot detect the modification of the #linkDataArray array or the modification of any link data object. If you want to add or remove link data from the #linkDataArray, call the #addLinkData or #removeLinkData methods. If you want to modify the node a link connects to, call the #setFromKeyForLinkData and/or #setToKeyForLinkData methods. If you want to change the membership of a node data in a group, call the #setGroupKeyForNodeData method.

GraphObject

This is the abstract base class for all graphical objects. More... Classes inheriting from GraphObject include: Shape, TextBlock, Picture, and Panel. From the Panel class the Part class is derived, from which the Node and Link classes derive.

It is very common to make use of the static function GraphObject.make in order to build up a visual tree of GraphObjects. You can see many examples of this throughout the Introduction, starting at Building Objects, and the Samples, starting with Minimal Sample.

Since GraphObject is an abstract class, programmers do not create GraphObjects themselves, but this class defines many properties used by all kinds of GraphObjects.

The only visual properties on GraphObject are #background and #areaBackground. However one can control whether the GraphObject is drawn at all by setting #visible, or by setting #opacity to zero if you still want the GraphObject to occupy space. Also, if you want to control whether any mouse or touch events "see" the GraphObject, you can set #pickable to false.

For more information about specifying how things get drawn, see the properties on the Shape, TextBlock, and Picture classes.

GraphObject Sizing

GraphObject defines most of the properties that cause objects to size themselves differently. The most prominent ones include:

  • The #desiredSize, #minSize, and #maxSize properties are used to explicitly set or limit the size of visual elements. #width and #height are convenience properties that set the #desiredSize width and height, respectively.
  • The #angle and #scale properties are used to transform visual elements.
  • The #stretch property determines how a GraphObject will fill its visual space, contextually granted to it by its containing Panel. Top-level (Part) GraphObjects are not affected by this property because they are always granted infinite space.

All GraphObjects in a Diagram are measured and then arranged by their containing Panels in a tree-like fashion. After measuring and arranging, a GraphObject will have valid values for the read-only properties #naturalBounds, #measuredBounds, and #actualBounds.

  • The #naturalBounds of a GraphObject describe its local size, without any transformations (#scale, #angle) affecting it.
  • The #measuredBounds of a GraphObject describe its size relative to its containing Panel.
  • The #actualBounds of a GraphObject describe its position and given size inside of its panel. This size may be smaller than #measuredBounds, for instance if a GraphObject with a large #desiredSize is placed in a Panel of a smaller #desiredSize. Smaller #actualBounds than #measuredBounds typically means an object will be cropped.

See the Introduction page on sizing for usage information and examples.

GraphObject Size and Position within Panel

Several GraphObject properties guide the containing Panel for how to size and position the object within the panel.
  • The #alignment specifies where the object should be relative to some area of the panel. For example, an alignment value of Spot.BottomRight means that the GraphObject should be at the bottom-right corner of the panel.
  • The #alignmentFocus specifies precisely which point of the GraphObject should be aligned at the #alignment spot.
  • The #column and #row properties are only used by Panel.Table panels, to indicate where the GraphObject should be.
  • The #columnSpan and #rowSpan properties tell the Panel.Table panel how large the GraphObject should be.
  • The #isPanelMain property indicates to some kinds of Panels that the GraphObject is the "primary" object that other panel children should be measured with or positioned in.
  • The #margin property tells the containing Panel how much extra space to put around this GraphObject.
  • The #position property is used to determine the relative position of GraphObjects when they are elements of a Panel.Position panel.

See the Introduction page on Panels and Table Panels for an overview of the capabilities.

Top-level GraphObjects are Parts

A Part is a derived class of GraphObject representing a top-level object. All top-level GraphObjects must be Parts, and Node, Link, Group, and Adornment derive from Part. The position of a Part determines the point of the Part's top-left corner in document coordinates. See also Part.location, which supports an way to specify the position based on a different spot of a different element within the Part.

There are several read-only properties that help navigate up the visual tree.

  • #panel returns the Panel that directly contains this GraphObject
  • #part returns the Part that this GraphObject is in, perhaps via intervening Panels; this is frequently used in order to get to the model data, Panel.data
  • #layer returns the Layer that this GraphObject's Part is in
  • #diagram returns the Diagram that this GraphObject's Part's Layer is in

See the Visual Tree sample for a diagram displaying the visual tree of a simple diagram.

User Interaction

GraphObjects have several properties enabling dynamic customizable interaction. There are several definable functions that execute on input events: #mouseDragEnter, #mouseDragLeave, #mouseDrop, #mouseEnter, #mouseHold, #mouseHover, #mouseLeave, and #mouseOver. For example, you could define mouse enter-and-leave event handlers to modify the appearance of a link as the mouse passes over it:

myDiagram.linkTemplate =
  $(go.Link,
    $(go.Shape,
      { strokeWidth: 2, stroke: "gray" },  // default color is "gray"
      { // here E is the InputEvent and OBJ is this Shape
        mouseEnter: function(e, obj) { obj.strokeWidth = 4; obj.stroke = "dodgerblue"; },
        mouseLeave: function(e, obj) { obj.strokeWidth = 2; obj.stroke = "gray"; }
      }));

There are #click, #doubleClick, and #contextClick functions that execute when a user appropriately clicks the GraphObject. These click functions are called with the InputEvent as the first argument and this GraphObject as the second argument. For example, you could define a click event handler on a Node that goes to another page:

myDiagram.nodeTemplate =
  $(go.Node, "Auto",
    $(go.Shape, "RoundedRectangle",
      new go.Binding("fill", "color")),
    $(go.TextBlock,
      { name: "TB", margin: 3 },
      new go.Binding("text", "key")),
    { // second arg will be this GraphObject, which in this case is the Node itself:
      click: function(e, node) {
        window.open("http://en.wikipedia.org/Wiki/" + node.data.key);
      }
    });

Note: you may prefer defining DiagramEvent listeners on the Diagram rather than on individual GraphObjects. DiagramEvents also include more general events that do not necessarily correspond to input events.

The properties #actionCancel, #actionDown, #actionMove, and #actionUp define functions to execute when the GraphObject's #isActionable property is set to true (default false). See the ActionTool for more detail.

See the Introduction page on Events for a more general discussion.

GraphObjects as Ports

In GoJS, Links can only connect to elements within a Node that are specified as "ports", and by default the only port is the Node itself. Setting the #portId of a GraphObject inside a Node allows that object to act as a port. Note: the only kind of model that can save which port a link is connected with, i.e. portIds that are not an empty string, is a GraphLinksModel whose GraphLinksModel.linkFromPortIdProperty and GraphLinksModel.linkToPortIdProperty have been set to name properties on the link data objects.

GraphObjects have several properties that are only relevant when they are acting as ports. These port-related properties are:

  • #portId, which must be set to a string that is unique within the Node, in order for this GraphObject to be treated as a "port", rather than the whole node
  • #fromSpot and #toSpot, where a link should connect with this port
  • #fromEndSegmentLength and #toEndSegmentLength, the length of the link segment adjacent to this port
  • #fromEndSegmentDirection and #toEndSegmentDirection, the orientation of the link when connecting to this port
  • #fromShortLength and #toShortLength, the distance the link should terminate before touching this port
  • #fromLinkable and #toLinkable, whether the user may draw links connecting with this port
  • #fromLinkableDuplicates and #toLinkableDuplicates, whether the user may draw multiple links between the same pair of ports
  • #fromLinkableSelfNode and #toLinkableSelfNode, whether the user may draw a link between ports on the same node
  • #fromMaxLinks and #toMaxLinks, to limit the number of links connecting with this port in a particular direction

See the Introduction page on ports and link connection points for port usage information and examples.

GraphObjects as labels on a Link

GraphObjects can also be used as "labels" on a Link. In addition to the #alignmentFocus property, these properties direct a Link Panel to position a "label" at a particular point along the route of the link, in a particular manner:

  • #segmentIndex, which segment the label should be on
  • #segmentFraction, how far along the segment the label should be
  • #segmentOffset, where the label should be positioned relative to the segment
  • #segmentOrientation, how the label should be rotated relative to the angle of the segment

See the Introduction page on link labels for examples of how to make use of labels on Links.

Interactive Behavior

There are several properties that specify fairly high-level interactive behavior:

  • #cursor, a CSS string specifying a cursor
  • #contextMenu, an Adornment
  • #toolTip, an Adornment

For more information, please read the Introduction page about Context Menus and the page about ToolTips.

Also see the Basic sample for examples of how to show context menus and tooltips.

@@ -1065,7 +1065,7 @@

GoJS Class Index

Margin

A Margin represents a band of space outside or inside a rectangular area, with possibly different values on each of the four sides. More...

Example uses include GraphObject.margin, Panel.padding, and Diagram.padding.

Use the static functions Margin.parse and Margin.stringify to convert to and from a standard string representation that is independent of the current locale.

When an instance of this class is the value of a property of a GraphObject class or Diagram or CommandHandler or a Tool class, you should treat the object as if it were frozen or read-only -- you cannot modify its properties. This allows the property to return a value without allocating a new instance. If you need to do your own calculations with the value, call #copy to make a new instance with the same values that you can modify.

Many methods modify the object's properties and then return a reference to "this" object. The only instance method to allocate a new object is the #copy method. The static Margin.parse method also allocates a new object.

The "Debug" implementation of this class is significantly slower than the "Release" implementation, mostly due to additional error checking.

You cannot inherit from this class.

-

Model

Models hold the essential data of a diagram, describing the basic entities and their properties and relationships without specifying the appearance and behavior of the Nodes and Links and Groups that represent them visually. More... Models tend to hold only relatively simple data, making them easy to persist by serialization as JSON or XML formatted text.

Models hold simple data objects, not Parts such as Nodes or Links. Node data is normally represented in a Diagram by instances of Node, but they could be represented by simple Parts or by Groups. A Diagram constructs Parts for its Diagram.model's data by copying templates. Templates are Panels of GraphObjects that get some property values from the model data, accessible via the Panel.data property, using data Binding. See Using Models and Data Binding for an introduction.

This Model class only supports holding an array of node data and interpreting properties on that data to be able to refer to them using unique key values. To support simple tree-structured graphs, use a TreeModel, which inherits from this class. To support links and grouping, use a GraphLinksModel.

Each node data object is assumed to have a unique key value. The #nodeKeyProperty property names the property on the node data whose value is the unique key for that node data object. The default value for this property is "key". You should not have a TwoWay data binding on the node key property, because that might cause the property value to be set to a duplicate key value.

The key values must be either strings or numbers or undefined. If the key is undefined, or if there are duplicate key values, the model will automatically try to assign a new unique key value. Caution: if your keys are numbers, do not try to use string representations of those numbers as keys. Conversely, if your keys are strings that happen to have number syntax, do not try to use those number values. Sometimes JavaScript will automatically convert from string to number or vice-versa, but sometimes it won't.

For example, one can define a graph consisting of just two nodes:

 model.nodeDataArray = [
   { key: "Alpha" },
   { key: "Beta" }
 ];

This model cannot detect the modification of the #nodeDataArray array or the modification of any node data object. If you want to add or remove node data from the #nodeDataArray, call the #addNodeData or #removeNodeData methods.

If you want to modify a node data object, it depends on whether the property you want to change is a structural property that the model needs to know about, or whether it is a property that is only used for data binding or other application-specific purposes.

For the former case, call the appropriate method, such as #setKeyForNodeData, #setCategoryForNodeData, GraphLinksModel.setToKeyForLinkData, or GraphLinksModel.setGroupKeyForNodeData. These methods have names that start with "set", "add", "insert", or "remove".

For the latter case, when setting an application-specific property, typically for data binding, and to support undo/redo, call #setDataProperty.

The #copyNodeData method can be called to make a shallow copy of a node data object. However, if some of those property values are Arrays that want not to be shared but to be copied, you can set #copiesArrays to true. This is typically very useful when dealing with data bound item arrays. Furthermore if the items in those copied Arrays are in fact Objects that need to be copied, you can also set #copiesArrayObjects to true, causing a copied Array to refer to newly shallow-copied objects of the original array.

Each model comes with its own UndoManager that is initially not enabled. You will need to set UndoManager.isEnabled to true in order for the UndoManager to record model changes and for your users to perform undo and redo.

You can temporarily turn off the recording of changes by setting #skipsUndoManager to true. A number of places within the system do that routinely in order to avoid recording temporary changes, so be sure to remember the original value beforehand and restore it afterwards.

One normally saves a diagram by just saving its model. If you can use JSON-formatted text, this is easy to do -- just call #toJson to get the string representation of the model, and save that string. Load the diagram by replacing the Diagram.model with one created by calling the static function Model.fromJson:

  myDiagram.model = go.Model.fromJson(loadedString);
Note that JSON and other textual data formats cannot faithfully store all JavaScript functions. #toJson and Model.fromJson do not try to save and load functional property values. You should arrange that all such functions, including event handlers, are established by your app. #toJson and Model.fromJson also cannot handle circular references; any sharing of references will be lost too. They also skip properties that are not enumerable, those whose names start with an underscore, and those whose values are undefined.

Note that models also do not store the templates used by diagrams, nor any transient or temporary parts such as Adornments, nor any tools, nor any UndoManager state, nor any event listeners. These objects and all other properties of diagrams must be established by your app. You can add any number of properties to the #modelData object, which is serialized and deserialized into JSON just like any other model data for nodes or links. However #modelData is associated with the model as a whole and does not depend on the existence of any node data or link data.

+

Model

Models hold the essential data of a diagram, describing the basic entities and their properties and relationships without specifying the appearance and behavior of the Nodes and Links and Groups that represent them visually. More... Models tend to hold only relatively simple data, making them easy to persist by serialization as JSON or XML formatted text.

Models hold simple data objects, not Parts such as Nodes or Links. Node data is normally represented in a Diagram by instances of Node, but they could be represented by simple Parts or by Groups. A Diagram constructs Parts for its Diagram.model's data by copying templates. Templates are Panels of GraphObjects that get some property values from the model data, accessible via the Panel.data property, using data Binding. See Using Models and Data Binding for an introduction.

This Model class only supports holding an array of node data and interpreting properties on that data to be able to refer to them using unique key values. To support simple tree-structured graphs, use a TreeModel, which inherits from this class. To support links and grouping, use a GraphLinksModel.

Each node data object is assumed to have a unique key value. The #nodeKeyProperty property names the property on the node data whose value is the unique key for that node data object. The default value for this property is "key". You should not have a TwoWay data binding on the node key property, because that might cause the property value to be set to a duplicate key value.

The key values must be either strings or numbers or undefined. If the key is undefined, or if there are duplicate key values, the model will automatically try to assign a new unique key value. Caution: if your keys are numbers, do not try to use string representations of those numbers as keys. Conversely, if your keys are strings that happen to have number syntax, do not try to use those number values. Sometimes JavaScript will automatically convert from string to number or vice-versa, but sometimes it won't.

For example, one can define a graph consisting of just two nodes:

 model.nodeDataArray = [
   { key: "Alpha" },
   { key: "Beta" }
 ];

This model cannot detect the modification of the #nodeDataArray array or the modification of any node data object. If you want to add or remove node data from the #nodeDataArray, call the #addNodeData or #removeNodeData methods.

If you want to modify a node data object, it depends on whether the property you want to change is a structural property that the model needs to know about, or whether it is a property that is only used for data binding or other application-specific purposes.

For the former case, call the appropriate method, such as #setKeyForNodeData, #setCategoryForNodeData, GraphLinksModel.setToKeyForLinkData, or GraphLinksModel.setGroupKeyForNodeData. These methods have names that start with "set", "add", "insert", or "remove".

For the latter case, when setting an application-specific property, typically for data binding, and to support undo/redo, call #setDataProperty.

The #copyNodeData method can be called to make a shallow copy of a node data object. However, if some of those property values are Arrays that want not to be shared but to be copied, you can set #copiesArrays to true. This is typically very useful when dealing with data bound item arrays. Furthermore if the items in those copied Arrays are in fact Objects that need to be copied, you can also set #copiesArrayObjects to true, causing a copied Array to refer to newly shallow-copied objects of the original array.

Each model comes with its own UndoManager that is initially not enabled. You will need to set UndoManager.isEnabled to true in order for the UndoManager to record model changes and for your users to perform undo and redo.

You can temporarily turn off the recording of changes by setting #skipsUndoManager to true. A number of places within the system do that routinely in order to avoid recording temporary changes, so be sure to remember the original value beforehand and restore it afterwards.

One normally saves a diagram by just saving its model. If you can use JSON-formatted text, this is easy to do -- just call #toJson to get the string representation of the model, and save that string. Load the diagram by replacing the Diagram.model with one created by calling the static function Model.fromJson:

  myDiagram.model = go.Model.fromJson(loadedString);
Note that JSON and other textual data formats cannot faithfully store all JavaScript functions. #toJson and Model.fromJson do not try to save and load functional property values. You should arrange that all such functions, including event handlers, are established by your app. #toJson and Model.fromJson also cannot handle circular references; any sharing of references will be lost too. They also skip properties that are not enumerable, those whose names start with an underscore, and those whose values are undefined.

Note that models also do not store the templates used by diagrams, nor any transient or temporary parts such as Adornments, nor any tools, nor any UndoManager state, nor any event listeners. These objects and all other properties of diagrams must be established by your app.

You can add any number of properties to the #modelData object, which is serialized and deserialized into JSON just like any other model data for nodes or links. However #modelData is associated with the model as a whole and does not depend on the existence of any node data or link data.

Node

A Node is a Part that may connect to other nodes with Links, or that may be a member of a Group. More...

Group inherits from Node, enabling nodes to logically contain other nodes and links.

For a more general discussion of how to define nodes, see Introduction to Nodes.

Although you can create a Node and Diagram.add it to a Diagram, this does not update the Model. It is more common to create a node by adding a node data object to the model by calling Model.addNodeData. For example:

  myDiagram.startTransaction("make new node");
  myDiagram.model.addNodeData({ key: "Omega" });
  myDiagram.commitTransaction("make new node");

This will cause a Node or simple Part to be created (copying the template found in Diagram.nodeTemplateMap), added to the Diagram in some Layer (based on Part.layerName), and bound to the node data (resulting in Panel.data referring to that node data object). If you do not keep a reference to that JavaScript object, as the above code does not, you can retrieve it later by calling Model.findNodeDataForKey.

It is very common to initialize a Diagram by setting Model.nodeDataArray to a JavaScript Array of JavaScript objects holding the properties that you need in your model. Nearly all of the samples do this kind of initialization.

You can delete a Node by either calling Diagram.remove or by calling Model.removeNodeData. The latter obviously will modify the Model; the former does so if the Node was created from model data. Commands such as CommandHandler.deleteSelection call these methods within a transaction.

You can find all of the Links that are connected with a Node by calling #findLinksConnected. Because links normally have a direction, you can find all of the links that have their Link.toNode be a given Node by calling #findLinksInto. Similarly, you can call #findLinksOutOf to find all of the links coming out from a node; such links have their Link.fromNode be that node. For tree-structured graphs, use #findTreeChildrenLinks or #findTreeParentLink.

If you are not so interested in the links but are interested in the nodes at the other end of the links connecting with a node, there are other methods that you can call. #findNodesConnected returns all of the nodes that are at the other end of the links that connect with a given node. #findNodesInto and #findNodesOutOf return the subsets of those nodes considering only those links that go into or come out of the given node. For tree-structured graphs, use #findTreeChildrenNodes or #findTreeParentNode.

For example, to operate on the data of all of the destination nodes:

var it = somenode.findNodesOutOf();
while (it.next()) {
  var child = it.value;
  if (child.data.text.indexOf("special") >= 0) { ... }
}

You can link two nodes by creating a new Link, setting its Link.toNode and Link.fromNode (in either order), and Diagram.adding it to the diagram. But it is more common to add a link data object to the Diagram.model by calling GraphLinksModel.addLinkData. Just creating and adding a Link will not update the model.

Thus to add a link when using a GraphLinksModel you should do something like:

  myDiagram.startTransaction("make new link");
  myDiagram.model.addLinkData({ from: "Alpha", to: "Beta" });
  myDiagram.commitTransaction("make new link");

Where you would substitute the keys of the actual nodes that you want to connect with a link. If you are using a TreeModel, there are no link data objects, so you just need to call TreeModel.setParentKeyForNodeData to specify the "parent" node's key for a "child" node data.

To find a Link given a link data object in the GraphLinksModel, call Diagram.findLinkForData. When using a TreeModel, call either Diagram.findNodeForData or Diagram.findNodeForKey to get a Node, and then call #findTreeParentLink to get the Link, if any exists.

To find a link that connects two nodes, call #findLinksTo or #findLinksBetween. With the former method, the direction matters; with the latter method it returns links in either direction.

As links connect with a node or are disconnected, you may want to update the appearance of the node. You can set the #linkConnected and #linkDisconnected properties to be functions that are called. These functions must not modify any link relationships -- the properties just exist to update the appearance of the node. A typical usage would be to change the color or figure of a shape.

You can control whether the user may draw a new link or reconnect a link between a pair of Nodes by affecting the result of LinkingBaseTool.isValidLink. You can override that predicate on LinkingTool and RelinkingTool, but it is easier to set the #linkValidation or LinkingBaseTool.linkValidation functional property.

For a more general discussion of validation, see Introduction to Validation.

Nodes also support the ability to provide logical and physical distinctions in the connection points that links use at a node. These connection objects are called "ports". By default the port object will be the whole Node. However, you can set the GraphObject.portId property on any GraphObject in the visual tree of a node to cause that element to be treated as a "port". The "port id" is just a string that ought to be unique amongst all of the port elements in the node.

In the case of a node only having a single port, you should set the GraphObject.portId as an empty string. When there is no such element declared as the default port, it uses the whole node. You can use the #port property to get the only port element.

When a node should have multiple ports, i.e. multiple GraphObjects acting as separate connection points for links, you should set each port's GraphObject.portId to a string value that is unique for the node. When there may be multiple ports on a node, you can get a collection of elements representing ports by using the #ports property. Use the #findPort method to find a particular port element by name.

Note: the only kind of model that can save port information, i.e. portIds that are not an empty string, for links is a GraphLinksModel whose GraphLinksModel.linkFromPortIdProperty and GraphLinksModel.linkToPortIdProperty have been set to name properties on the link data objects.

For a more general discussion of ports, see Introduction to Ports.

All of the "findLinks..." and "findNodes..." methods mentioned above take an optional port id argument. When no argument is passed, these methods consider all links connecting with the node. When a port id argument is provided, these methods only consider links that connect with that port in the given node. Thus when navigating through the diagram, you can easily look at all of the nodes that links coming out of a given node go to. Or you can just look at those nodes at the ends of links coming out of a particular port.

You can also control the default connecting behavior of Links at each port. Because a port can be any GraphObject, they are all properties on GraphObject. The properties are duplicated so that you can guide the "from" ends of links differently from the "to" ends of links. The properties include:

The "...Spot" and "...Length" and "...Direction" properties control the position and routing of links at a port. The "...Linkable..." and "...MaxLinks" properties control whether or not users can draw a new link or reconnect an existing link from or to a port. (The "...Spot" and "...Length" and "...Direction" properties also exist on Link, to override for a particular link the default values that come from a port element.)

For a more general discussion of link points, see Introduction to Link Connection Points.

When the graph is tree-structured, you can use several functions for traversing the tree:

  • #findTreeParentNode
  • #findTreeChildrenNodes
  • #findTreeParentLink
  • #findTreeChildrenLinks
  • #findTreeRoot
  • #findTreeParts
  • #findCommonTreeParent
  • #isInTreeOf
  • #findTreeLevel

Determining whether a tree grows from the root via links that go out to the children or vice-versa is controlled for the whole diagram by the Diagram.isTreePathToChildren property. However an individual link will be ignored by the above functions if Link.isTreeLink is false.

The Node class also supports the notion of expanding and collapsing a subtree of nodes and links, causing those nodes and links to be shown or hidden. Principally this is a matter of setting Node.isTreeExpanded. Of course if the diagram's graph is not tree-structured, these concepts and properties might not apply.

If you want to change the appearance of the node you can do so in a function that you assign to the #treeExpandedChanged property. This function must not modify any link relationships or expand or collapse any subtrees -- the property just exists to update the appearance of the node.

There is an option for link routing to try to avoid crossing over nodes: Link.routing = Link.AvoidsNodes. You can control whether such links should avoid or ignore a node by setting #avoidable. Set #avoidableMargin to control the area beyond the GraphObject.actualBounds where AvoidsNodes links should not go.

For more discussion and examples, see Nodes, Ports, and Link Points.

For more about trees, see Trees, and SubTrees.

Only Nodes that are in Diagrams can have connections via Links. Templates should not be connected with Links, be labels of Links, be members of Groups, or have any Adornments.

@@ -1111,7 +1111,7 @@

GoJS Class Index

TextEditingTool

The TextEditingTool is used to let the user interactively edit text in place. More... This sets the TextBlock.text property; you may want to save the changed text to the model by using a TwoWay Binding on the "text" property of editable TextBlocks.

Typically this is used by setting the TextBlock.editable property to true on a particular TextBlock in a part. When the part is selected and the user clicks on the TextBlock or invokes the CommandHandler.editTextBlock command, this tool is started and it uses an HTMLTextArea to perform in-place text editing. (For more details see the description for TextEditingTool.doActivate.)

The TextBlock is accessible as the TextEditingTool.textBlock property. The text editor is accessible as the TextEditingTool.currentTextEditor property. From the text editor control one can access the TextBlock being edited via the 'textEditingTool' property to get to this tool, from which one can use the TextEditingTool.textBlock property.

You can disable mouse clicking from starting this text editing tool by setting Tool.isEnabled to false. You can disable the F2 key from starting this text editing tool by making sure Part.canEdit returns false, by either setting Diagram.allowTextEdit to false or by setting Part.textEditable to false.

-

Tool

Tools handle mouse events and keyboard events. More... The currently running tool, Diagram.currentTool, receives all input events from the Diagram.

Most tools are "mode-less" tools that are managed by the ToolManager, which chooses the current tool based on the kind and position of the mouse event and the parts in the diagram. The ToolManager has properties holding instances of most of the pre-defined Tool classes. These classes include:

The ToolManager chooses a tool to make current by finding in its lists of tools the first tool whose #canStart method returns true.

A tool is in the "running" state when it is the value of Diagram.currentTool. The Diagram.currentTool property setter will call #doStop on the old tool and then call #doStart on the new tool.

A tool can then go into the "active" state once it decides it can actually do something. This happens with a call to #doActivate, normally called by the ToolManager. Later it is deactivated (#doDeactivate) and then stopped. #isActive should be true when the tool is "active". Often tools should ignore certain common events, such as calls to #doMouseMove, unless the tool is "active".

You can prevent a "mode-less" tool (i.e. one managed by the ToolManager) from being started by the ToolManager by setting isEnabled to false.

You can also go into a particular "mode" by setting Diagram.currentTool explicitly, thereby circumventing the normal operation of the ToolManager. This ignores the isEnabled property and does not call the #canStart predicate. The behavior will depend on the tool -- not all of the predefined tools support operating as a "modal" tool.

Tools cannot be shared amongst multiple Diagrams.

If you define a Tool subclass, you may override any of the methods whose names start with "do" and any other methods that are documented to be overridable, such as #canStart. However you must seriously consider calling the base method in order to gets its default behavior. There may be situations where not calling the base method may cause subtle bugs. But that depends on the method and the tool. Please read the Introduction page on Extensions for how to override methods and how to call this base method.

+

Tool

Tools handle mouse, keyboard, and touch events. More... The currently running tool, Diagram.currentTool, receives all input events from the Diagram via canonicalized InputEvents.

Most tools are "mode-less" tools that are managed by the ToolManager, which chooses the current tool based on the kind and position of the mouse event and the parts in the diagram. The ToolManager has properties holding instances of most of the pre-defined Tool classes. These classes include:

The ToolManager chooses a tool to run as the diagram's current tool by finding in its lists of tools the first tool whose #canStart method returns true. The ToolManager then sets Diagram.currentTool to be that tool.

A tool is in the "running" state when it is the value of Diagram.currentTool. The Diagram.currentTool property setter will call #doStop on the old tool and then call #doStart on the new tool.

A tool can then go into the "active" state once it decides it can actually do something. This happens with a call to #doActivate, normally called by the ToolManager. Later it is deactivated (#doDeactivate) and then stopped. #isActive should be true when the tool is "active". Often tools should ignore certain common events, such as calls to #doMouseMove, unless the tool #isActive.

You can prevent a "mode-less" tool (i.e. one managed by the ToolManager) from being started by the ToolManager by setting isEnabled to false.

You can also go into a particular "mode" by setting Diagram.currentTool explicitly, thereby circumventing the normal operation of the ToolManager. This ignores the isEnabled property and does not call the #canStart predicate. The behavior will depend on the tool -- not all of the predefined tools support operating as a "modal" tool.

Tools cannot be shared amongst multiple Diagrams.

If you define a Tool subclass, you may override any of the methods whose names start with "do" and any other methods that are documented to be overridable, such as #canStart. However you must seriously consider calling the base method in order to gets its default behavior. There may be situations where not calling the base method may cause subtle bugs. But that depends on the method and the tool. Please read the Introduction page on Extensions for how to override methods and how to call the base method.

ToolManager

This special Tool is responsible for managing all of the Diagram's mode-less tools, which you can access as the Diagram.toolManager. More...

Mode-less tools are tools that are present in one of the following lists: #mouseDownTools, #mouseMoveTools, or #mouseUpTools. This ToolManager tool is normally the Diagram.defaultTool, so it is also usually the Diagram.currentTool when the user is doing "nothing".

When this tool is running as the current tool, it handles mouse-down, mouse-move, and mouse-up events and the corresponding touch events. For each event it iterates over each of the tools in the corresponding list, calling the tool's Tool.canStart predicate. If that predicate returns true, it starts that tool by making it the diagram's current tool. It then activates the tool and passes on the event to the tool by calling the corresponding method (either Tool.doMouseDown, Tool.doMouseMove, or Tool.doMouseUp).

Because this tool is typically the one running as the diagram's current tool when the user isn't "doing" anything, this tool can also handle other events, such as mouse wheel events and keyboard commands.

Keyboard events are just passed on to the Diagram.commandHandler's CommandHandler.doKeyDown or CommandHandler.doKeyUp method.

This tool also is responsible for showing tooltips. Tooltip Adornments may be declared as any GraphObject.toolTip, or as the Diagram.toolTip if the mouse or finger remains motionless in the background of the diagram.

This tool does not utilize any tool handles. This tool does not conduct any transactions. But of course some of the tools that the ToolManager starts can show tool handles and/or conduct their own transactions.

diff --git a/api/symbols/ActionTool.html b/api/symbols/ActionTool.html index 782e59193..11ae89985 100644 --- a/api/symbols/ActionTool.html +++ b/api/symbols/ActionTool.html @@ -974,7 +974,7 @@

Collection Classes

@@ -1014,7 +1014,7 @@

Constructor -
You do not normally need to create an instance of this tool because one already exists as the ToolManager.actionTool. +
You do not normally need to create an instance of this tool because one already exists as the ToolManager.actionTool. More...

The Tool.name of this tool is "Action". diff --git a/api/symbols/Adornment.html b/api/symbols/Adornment.html index 35a542ce2..e67dc03ab 100644 --- a/api/symbols/Adornment.html +++ b/api/symbols/Adornment.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/AnimationManager.html b/api/symbols/AnimationManager.html index 5704123ea..f1e879c99 100644 --- a/api/symbols/AnimationManager.html +++ b/api/symbols/AnimationManager.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/Binding.html b/api/symbols/Binding.html index 599668677..00a9c28d4 100644 --- a/api/symbols/Binding.html +++ b/api/symbols/Binding.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/Brush.html b/api/symbols/Brush.html index 4930ed7a6..f62c7dd75 100644 --- a/api/symbols/Brush.html +++ b/api/symbols/Brush.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/ChangedEvent.html b/api/symbols/ChangedEvent.html index c0d54c5a2..2761cfa87 100644 --- a/api/symbols/ChangedEvent.html +++ b/api/symbols/ChangedEvent.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/CircularEdge.html b/api/symbols/CircularEdge.html index 488b3dcc0..1f1b83236 100644 --- a/api/symbols/CircularEdge.html +++ b/api/symbols/CircularEdge.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/CircularLayout.html b/api/symbols/CircularLayout.html index f140dbce8..d18fb313b 100644 --- a/api/symbols/CircularLayout.html +++ b/api/symbols/CircularLayout.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/CircularVertex.html b/api/symbols/CircularVertex.html index b1b39cd74..fdd634774 100644 --- a/api/symbols/CircularVertex.html +++ b/api/symbols/CircularVertex.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/ClickCreatingTool.html b/api/symbols/ClickCreatingTool.html index e750a5e7d..e59885082 100644 --- a/api/symbols/ClickCreatingTool.html +++ b/api/symbols/ClickCreatingTool.html @@ -974,7 +974,7 @@

Collection Classes

@@ -1014,7 +1014,7 @@

Constructor -
You do not normally need to create an instance of this tool because one already exists as the ToolManager.clickCreatingTool, which you can modify. +
You do not normally need to create an instance of this tool because one already exists as the ToolManager.clickCreatingTool, which you can modify. More...

The Tool.name of this tool is "ClickCreating". diff --git a/api/symbols/ClickSelectingTool.html b/api/symbols/ClickSelectingTool.html index d8e0eb551..84e2583a8 100644 --- a/api/symbols/ClickSelectingTool.html +++ b/api/symbols/ClickSelectingTool.html @@ -974,7 +974,7 @@

Collection Classes

@@ -991,7 +991,7 @@

Tool. - The ClickSelectingTool selects and deselects Parts when there is a click. It does this by calling Tool.standardMouseSelect. It is also responsible for handling and dispatching click events on GraphObjects by calling Tool.standardMouseClick.

This tool is a standard mouse-up tool, the ToolManager.clickSelectingTool.

This tool does not utilize any Adornments or tool handles. This tool does not modify the model or conduct any transaction.

An example customization of this tool is shown in the Tree Map sample, where the Tool.standardMouseSelect method is overridden to permit the user to cycle through the chain of containing groups, changing the selection on each click to the next containing group. + The ClickSelectingTool selects and deselects Parts when there is a click. It does this by calling Tool.standardMouseSelect. It is also responsible for handling and dispatching click events on GraphObjects by calling Tool.standardMouseClick.

Note that this tool avoids raising click events on objects that are in temporary layers. This is to prevent parts such as selection adornments from interfering with clicking on selected nodes or links. (Adornments are in the "Adornment" Layer, which Layer.isTemporary.) However this means that if you add a GraphObject.click event handler on a GraphObject in an Adornment, it will not be called. You can get it to be called by setting GraphObject.isActionable to true on that object in the adornment.

This tool is a standard mouse-up tool, the ToolManager.clickSelectingTool.

This tool does not utilize any Adornments or tool handles. This tool does not modify the model or conduct any transaction.

An example customization of this tool is shown in the Tree Map sample, where the Tool.standardMouseSelect method is overridden to permit the user to cycle through the chain of containing groups, changing the selection on each click to the next containing group.

@@ -1014,7 +1014,7 @@

Constructor -
You do not normally need to create an instance of this tool because one already exists as the ToolManager.clickSelectingTool. +
You do not normally need to create an instance of this tool because one already exists as the ToolManager.clickSelectingTool. More...

The Tool.name of this tool is "ClickSelecting". diff --git a/api/symbols/CommandHandler.html b/api/symbols/CommandHandler.html index 37723caaf..a60b8345c 100644 --- a/api/symbols/CommandHandler.html +++ b/api/symbols/CommandHandler.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/ContextMenuTool.html b/api/symbols/ContextMenuTool.html index eb89e04b9..3ace9f197 100644 --- a/api/symbols/ContextMenuTool.html +++ b/api/symbols/ContextMenuTool.html @@ -974,7 +974,7 @@

Collection Classes

@@ -1014,7 +1014,7 @@

Constructor -
You do not normally need to create an instance of this tool because one already exists as the ToolManager.contextMenuTool, which you can modify. +
You do not normally need to create an instance of this tool because one already exists as the ToolManager.contextMenuTool, which you can modify. More...

The Tool.name of this tool is "ContextMenu". @@ -1205,7 +1205,7 @@

Method Summary -
If there is something found by findObjectWithContextMenu, call showContextMenu with that object's GraphObject.contextMenu or Diagram.contextMenu. More... Once a context menu is being shown, if a click occurs on a part of the context menu, call Tool.standardMouseClick. Otherwise if the click occurs elsewhere, just stop this tool. Unlike some tools, a mouse-up should not stop this tool. +
If there is something found by findObjectWithContextMenu, call showContextMenu with that object's GraphObject.contextMenu or the Diagram.contextMenu. More... If nothing is found or there is no context menu, call showDefaultContextMenu.

Once a context menu is being shown, if a click occurs on a part of the context menu, call Tool.standardMouseClick. Otherwise if the click occurs elsewhere, just stop this tool. Unlike most tools, the first mouse-up should not stop this tool. diff --git a/api/symbols/Diagram.html b/api/symbols/Diagram.html index 6352da961..0eeb688fe 100644 --- a/api/symbols/Diagram.html +++ b/api/symbols/Diagram.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/DiagramEvent.html b/api/symbols/DiagramEvent.html index fde337a0d..dede7a4b1 100644 --- a/api/symbols/DiagramEvent.html +++ b/api/symbols/DiagramEvent.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/DragSelectingTool.html b/api/symbols/DragSelectingTool.html index a125cdc0e..e96891637 100644 --- a/api/symbols/DragSelectingTool.html +++ b/api/symbols/DragSelectingTool.html @@ -974,7 +974,7 @@

Collection Classes

@@ -991,7 +991,7 @@

Tool. - The DragSelectingTool lets the user select multiple parts within a rectangular area drawn by the user. There is a temporary part, the box, that shows the current area encompassed between the mouse-down point and the current mouse point. The default drag selection box is a magenta rectangle. You can change the box to customize its appearance -- see its documentation for an example.

This tool is a standard mouse-move tool, the ToolManager.dragSelectingTool. However this cannot start running unless there has been a motionless delay after the mouse-down event of at least delay milliseconds.

This tool does not utilize any Adornments or tool handles, but it does temporarily add the box part to the diagram. This tool does not modify the model or conduct any transaction.

Selection occurs on a mouse-up when it calls selectInRect with the value of computeBoxBounds. Selectable parts are selected when their bounds fall entirely within the rectangle, unless isPartialInclusion is set to true.

If you implement your own drag-in-the-background-to-do-something tool, you may need to disable this tool or insert your new tool in the ToolManager.mouseMoveTools list before this tool, in order for your tool to run. There are two examples of such tools defined in the extensions directory: Drag Creating Tool and Drag Zooming Tool. + The DragSelectingTool lets the user select multiple parts within a rectangular area drawn by the user. There is a temporary part, the box, that shows the current area encompassed between the mouse-down point and the current mouse point. The default drag selection box is a magenta rectangle. You can change the box to customize its appearance -- see its documentation for an example.

This tool is a standard mouse-move tool, the ToolManager.dragSelectingTool. However this cannot start running unless there has been a motionless delay after the mouse-down event of at least delay milliseconds.

This tool does not utilize any Adornments or tool handles, but it does temporarily add the box part to the diagram. This tool does not modify the model or conduct any transaction.

Selection occurs on a mouse-up when it calls selectInRect with the value of computeBoxBounds. Selectable parts are selected when their bounds fall entirely within the rectangle, unless isPartialInclusion is set to true.

If you implement your own drag-in-the-background-to-do-something tool, you may need to disable this tool or insert your new tool in the ToolManager.mouseMoveTools list before this tool, in order for your tool to run. There are examples of such tools defined in the extensions directory: Realtime Drag Selecting Tool, Drag Creating Tool, and Drag Zooming Tool.

@@ -1014,7 +1014,7 @@

Constructor -
You do not normally need to create an instance of this tool because one already exists as the ToolManager.dragSelectingTool, which you can modify. +
You do not normally need to create an instance of this tool because one already exists as the ToolManager.dragSelectingTool, which you can modify. More...

The Tool.name of this tool is "DragSelecting". @@ -1052,7 +1052,7 @@

Properties Summary -
Gets or sets the Part used as the "rubber-band selection box" that is stretched to follow the mouse, as feedback for what area will be passed to selectInRect upon a mouse-up. More...

Initially this is a Part containing only a simple magenta rectangular Shape. The object to be resized during dragging should be named "SHAPE". Setting this property does not raise any events.

Here is an example of changing the selection box to be a thicker bright green rectangle:
  myDiagram.toolManager.dragSelectingTool.box =
    $(go.Part,
      { layerName: "Tool" },
      $(go.Shape,
        { name: "SHAPE", fill: null, stroke: "chartreuse", strokeWidth: 3 }));
Note that the Part should be put into a Layer that Layer.isTemporary.

Modifying this property while this tool Tool.isActive might have no effect. +

Gets or sets the Part used as the "rubber-band selection box" that is stretched to follow the mouse, as feedback for what area will be passed to selectInRect upon a mouse-up. More...

Initially this is a Part containing only a simple magenta rectangular Shape. The object to be resized during dragging should be named "SHAPE". Setting this property does not raise any events.

Here is an example of changing the selection box to be a thicker bright green rectangle:
  myDiagram.toolManager.dragSelectingTool.box =
    $(go.Part,
      { layerName: "Tool", selectable: false },
      $(go.Shape,
        { name: "SHAPE", fill: null, stroke: "chartreuse", strokeWidth: 3 }));
Note that the Part should be put into a Layer that Layer.isTemporary.

Modifying this property while this tool Tool.isActive might have no effect.

diff --git a/api/symbols/DraggingTool.html b/api/symbols/DraggingTool.html index 6945db51b..da025656b 100644 --- a/api/symbols/DraggingTool.html +++ b/api/symbols/DraggingTool.html @@ -974,7 +974,7 @@

Collection Classes

@@ -1014,7 +1014,7 @@

Constructor -
You do not normally need to create an instance of this tool because one already exists as the ToolManager.draggingTool, which you can modify. +
You do not normally need to create an instance of this tool because one already exists as the ToolManager.draggingTool, which you can modify. More...

The Tool.name of this tool is "Dragging". diff --git a/api/symbols/ForceDirectedEdge.html b/api/symbols/ForceDirectedEdge.html index c462aef2f..b6835e25e 100644 --- a/api/symbols/ForceDirectedEdge.html +++ b/api/symbols/ForceDirectedEdge.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/ForceDirectedLayout.html b/api/symbols/ForceDirectedLayout.html index 16ea209a0..1037910a6 100644 --- a/api/symbols/ForceDirectedLayout.html +++ b/api/symbols/ForceDirectedLayout.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/ForceDirectedVertex.html b/api/symbols/ForceDirectedVertex.html index 5b69a97c8..e51bb0c88 100644 --- a/api/symbols/ForceDirectedVertex.html +++ b/api/symbols/ForceDirectedVertex.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/Geometry.html b/api/symbols/Geometry.html index bc4463eff..fdf2b265d 100644 --- a/api/symbols/Geometry.html +++ b/api/symbols/Geometry.html @@ -974,7 +974,7 @@

Collection Classes

diff --git a/api/symbols/GraphLinksModel.html b/api/symbols/GraphLinksModel.html index c602464bb..62ca6f2ec 100644 --- a/api/symbols/GraphLinksModel.html +++ b/api/symbols/GraphLinksModel.html @@ -974,7 +974,7 @@

Collection Classes

@@ -991,7 +991,7 @@

Model. - GraphLinksModels support links between nodes and grouping nodes and links into subgraphs. GraphLinksModels hold node data and link data in separate arrays. Node data is normally represented in a Diagram by instances of Node, but they could be represented by simple Parts or by Groups. Link data should be represented by instances of Link.

Each link data object is assumed to have two values, one referring to the node that the link is coming from and one that the link is going to. The linkFromKeyProperty property names the property on the link data whose value is the key of the "from" node. The linkToKeyProperty property names the property on the link data whose value is the key of the "to" node. The default values for these properties are "from" and "to" respectively.

For example, one can define a graph consisting of two nodes with one link connecting them:

 model.nodeDataArray = [
   { key: "Alpha" },
   { key: "Beta" }
 ];
 model.linkDataArray = [
   { from: "Alpha", to: "Beta" }
 ];

If you want to have subgraphs in your diagram, where a group node contains some number of nodes and links, you need to declare that some node data actually represent groups, and you need to provide a reference from a member node data to its containing group node data. The nodeIsGroupProperty property names the property on a node data that is true if that node data represents a group. The nodeGroupKeyProperty property names the property on a node data whose value is the key of the containing group's node data. The default values for these properties are "isGroup" and "group" respectively.

For example, one can define a graph consisting of one group containing a subgraph of two nodes connected by a link, with a second link from that group to a third node that is not a member of that group:

 model.nodeDataArray = [
   { key: "Group1", isGroup: true},
   { key: "Alpha", group: "Group1" },
   { key: "Beta", group: "Group1" },
   { key: "Gamma" }
 ];
 model.linkDataArray = [
   { from: "Alpha", to: "Beta" },
   { from: "Group1", to: "Gamma" }
 ];

GraphLinksModels also support distinguishing the "port" element of a node to which a link can connect, at either end of the link. This identification is a string that names the "port" element in the node. However, you need to set the linkFromPortIdProperty and/or linkToPortIdProperty properties before the model is able to get the "port id" information from the link data.

For example, one can define a graph consisting of a "subtraction" node and two inputs and one output. The "subtraction" node has two distinct inputs called "subtrahend" and "minuend"; the output is called "difference".

 model.linkFromPortIdProperty = "fromPort";  // necessary to remember portIds
 model.linkToPortIdProperty = "toPort";
 model.nodeDataArray = [
   { key: 1, constant: 5 },  // a constant input node
   { key: 2, constant: 2 },  // another constant node
   { key: 3, operation: "subtract" },
   { key: 4, value: 3 }  // the output node
 ];
 model.linkDataArray = [
   { from: 1, to: 3, toPort: "subtrahend" },
   { from: 2, to: 3, toPort: "minuend" },
   { from: 3, to: 4, fromPort: "difference" }
 ];
In this case links connected to node 3 (which is the subtraction operation) are distinguished by port id. The connections to the other nodes do not have any port identification, presumably because there is only one port on those nodes, representing the node value.

This model does not support the modification of whether a node data object is a group.

This model cannot detect the modification of the linkDataArray array or the modification of any link data object. If you want to add or remove link data from the linkDataArray, call the addLinkData or removeLinkData methods. If you want to modify the node a link connects to, call the setFromKeyForLinkData and/or setToKeyForLinkData methods. If you want to change the membership of a node data in a group, call the setGroupKeyForNodeData method. + GraphLinksModels support links between nodes and grouping nodes and links into subgraphs. GraphLinksModels hold node data and link data in separate arrays. Node data is normally represented in a Diagram by instances of Node, but they could be represented by simple Parts or by Groups. Link data should be represented by instances of Link.

Each link data object is assumed to have two values, one referring to the node that the link is coming from and one that the link is going to. The linkFromKeyProperty property names the property on the link data whose value is the key of the "from" node. The linkToKeyProperty property names the property on the link data whose value is the key of the "to" node. The default values for these properties are "from" and "to" respectively.

For example, one can define a graph consisting of two nodes with one link connecting them:

 model.nodeDataArray = [
   { key: "Alpha" },
   { key: "Beta" }
 ];
 model.linkDataArray = [
   { from: "Alpha", to: "Beta" }
 ];

If you want to have subgraphs in your diagram, where a group node contains some number of nodes and links, you need to declare that some node data actually represent groups, and you need to provide a reference from a member node data to its containing group node data. The nodeIsGroupProperty property names the property on a node data that is true if that node data represents a group. The nodeGroupKeyProperty property names the property on a node data whose value is the key of the containing group's node data. The default values for these properties are "isGroup" and "group" respectively.

For example, one can define a graph consisting of one group containing a subgraph of two nodes connected by a link, with a second link from that group to a third node that is not a member of that group:

 model.nodeDataArray = [
   { key: "Group1", isGroup: true},
   { key: "Alpha", group: "Group1" },
   { key: "Beta", group: "Group1" },
   { key: "Gamma" }
 ];
 model.linkDataArray = [
   { from: "Alpha", to: "Beta" },
   { from: "Group1", to: "Gamma" }
 ];

GraphLinksModels also support distinguishing the "port" element of a node to which a link can connect, at either end of the link. This identification is a string that names the "port" element in the node. However, you need to set the linkFromPortIdProperty and/or linkToPortIdProperty properties before the model is able to get the "port id" information from the link data.

For example, one can define a graph consisting of a "subtraction" node and two inputs and one output. The "subtraction" node has two distinct inputs called "subtrahend" and "minuend"; the output is called "difference".

 model.linkFromPortIdProperty = "fromPort";  // necessary to remember portIds
 model.linkToPortIdProperty = "toPort";
 model.nodeDataArray = [
   { key: 1, constant: 5 },  // a constant input node
   { key: 2, constant: 2 },  // another constant node
   { key: 3, operation: "subtract" },
   { key: 4, value: 3 }  // the output node
 ];
 model.linkDataArray = [
   { from: 1, to: 3, toPort: "subtrahend" },
   { from: 2, to: 3, toPort: "minuend" },
   { from: 3, to: 4, fromPort: "difference" }
 ];
In this case links connected to node 3 (which is the subtraction operation) are distinguished by port id. The connections to the other nodes do not have any port identification, presumably because there is only one port on those nodes, representing the node value.

Note that there is no requirement that the link data objects have any kind of unique identifier, unlike for node data. There is no expectation that there be references to link data in the model, so there is no need for such an identifier. When there are multiple links connecting two ports, the only way to distinguish the links in the model is by reference to the particular link data object. This is why there are two methods on the Diagram class for Nodes, Diagram.findNodeForKey and Diagram.findNodeForData, but there is only the one method for Links, Diagram.findLinkForData.

However you may wish to add your own unique identifiers on the link data. One way to implement this is by setting a property on the link data each time one is added to the model:

 model.addChangedListener(function(e) {
   if (e.change === go.ChangedEvent.Insert && e.modelChange === "linkDataArray") {
     var id = e.model.modelData.linkCounter;  // keep the counter on the Model.modelData object
     if (typeof id !== 'number') id = 0;
     e.model.modelData.linkCounter = id + 1;
     e.newValue.id = id;  // e.newValue is the link data object that was added
   }
 });
Note how the counter is kept on the Model.modelData object, so that it can be saved and loaded automatically. Remember to re-establish the listener on a newly constructed model, including those constructed by Model.fromJson.

This model does not support the modification of whether a node data object is a group.

This model cannot detect the modification of the linkDataArray array or the modification of any link data object. If you want to add or remove link data from the linkDataArray, call the addLinkData or removeLinkData methods. If you want to modify the node a link connects to, call the setFromKeyForLinkData and/or setToKeyForLinkData methods. If you want to change the membership of a node data in a group, call the setGroupKeyForNodeData method.

diff --git a/api/symbols/GraphObject.html b/api/symbols/GraphObject.html index a36b99d04..69da15fed 100644 --- a/api/symbols/GraphObject.html +++ b/api/symbols/GraphObject.html @@ -974,7 +974,7 @@

Collection Classes

@@ -2060,7 +2060,7 @@

Properties Summary -
Gets or sets the function to execute when the user moves the mouse into this object without holding down any buttons. More... This property is used by the ToolManager.

If this property value is a function, it is called with an InputEvent, this GraphObject, and any previous GraphObject that the mouse was in. The InputEvent.targetObject provides the GraphObject that was found at the mouse point before looking up the visual tree of GraphObject.panels to get to this object. By default this property is null.

This function is called with Diagram.skipsUndoManager temporarily set to true, so that any changes to GraphObjects are not recorded in the UndoManager. You do not need to start and commit any transaction in this function. After calling this function the diagram will be updated immediately.

For example, consider the situation where one wants to display buttons that the user can click whenever the user passes the mouse over a node, and the buttons automatically disappear when the mouse leaves the node. This can be implemented by showing an Adornment holding the buttons.

var nodeContextMenu =
  $(go.Adornment, "Spot",
    { background: "transparent" },  // to help detect when the mouse leaves the area
    $(go.Placeholder),
    $(go.Panel, "Vertical",
      { alignment: go.Spot.Right, alignmentFocus: go.Spot.Left },
      $("Button",
        $(go.TextBlock, "Command 1"),
        {
          click: function(e, obj) {
            var node = obj.part.adornedPart;
            alert("Command 1 on " + node.data.text);
            node.removeAdornment("ContextMenuOver");
          }
        }),
      $("Button",
        $(go.TextBlock, "Command 2"),
        {
          click: function(e, obj) {
            var node = obj.part.adornedPart;
            alert("Command 2 on " + node.data.text);
            node.removeAdornment("ContextMenuOver");
          }
        })
      ));
Then in the definition of the Node we can implement a mouseEnter event handler:
myDiagram.nodeTemplate =
  $(go.Node,
    . . .
    {
      mouseEnter: function(e, node) {
        nodeContextMenu.adornedObject = node;
        nodeContextMenu.mouseLeave = function(ev, cm) {
          node.removeAdornment("ContextMenuOver");
        };
        node.addAdornment("ContextMenuOver", nodeContextMenu);
      }
    });
Note how it automatically defines a mouseLeave event handler too. The context menu Adornment is removed either when the mouse leaves the area of the Adornment or when the user executes a button click event handler. +
Gets or sets the function to execute when the user moves the mouse into this object without holding down any buttons. More... This property is used by the ToolManager.

If this property value is a function, it is called with an InputEvent, this GraphObject that the mouse is now in, and any previous GraphObject that the mouse was in. The InputEvent.targetObject provides the GraphObject that was found at the mouse point before looking up the visual tree of GraphObject.panels to get to this object. By default this property is null.

This function is called with Diagram.skipsUndoManager temporarily set to true, so that any changes to GraphObjects are not recorded in the UndoManager. You do not need to start and commit any transaction in this function. After calling this function the diagram will be updated immediately.

For example, consider the situation where one wants to display buttons that the user can click whenever the user passes the mouse over a node, and the buttons automatically disappear when the mouse leaves the node. This can be implemented by showing an Adornment holding the buttons.

var nodeContextMenu =
  $(go.Adornment, "Spot",
    { background: "transparent" },  // to help detect when the mouse leaves the area
    $(go.Placeholder),
    $(go.Panel, "Vertical",
      { alignment: go.Spot.Right, alignmentFocus: go.Spot.Left },
      $("Button",
        $(go.TextBlock, "Command 1"),
        {
          click: function(e, obj) {
            var node = obj.part.adornedPart;
            alert("Command 1 on " + node.data.text);
            node.removeAdornment("ContextMenuOver");
          }
        }),
      $("Button",
        $(go.TextBlock, "Command 2"),
        {
          click: function(e, obj) {
            var node = obj.part.adornedPart;
            alert("Command 2 on " + node.data.text);
            node.removeAdornment("ContextMenuOver");
          }
        })
      ));
Then in the definition of the Node we can implement a mouseEnter event handler:
myDiagram.nodeTemplate =
  $(go.Node,
    . . .
    {
      mouseEnter: function(e, node) {
        nodeContextMenu.adornedObject = node;
        nodeContextMenu.mouseLeave = function(ev, cm) {
          node.removeAdornment("ContextMenuOver");
        };
        node.addAdornment("ContextMenuOver", nodeContextMenu);
      }
    });
Note how it automatically defines a mouseLeave event handler too. The context menu Adornment is removed either when the mouse leaves the area of the Adornment or when the user executes a button click event handler.

See also:
    @@ -2149,7 +2149,7 @@

    Properties Summary -
    Gets or sets the function to execute when the user moves the mouse into this object without holding down any buttons. More... This property is used by the ToolManager.

    If this property value is a function, it is called with an InputEvent, this GraphObject, and any previous GraphObject that the mouse had been in. The InputEvent.targetObject provides the GraphObject that was found at the mouse point before looking up the visual tree of GraphObject.panels to get to this object. By default this property is null.

    This function is called with Diagram.skipsUndoManager temporarily set to true, so that any changes to GraphObjects are not recorded in the UndoManager. You do not need to start and commit any transaction in this function. After calling this function the diagram will be updated immediately.

    For example, the Flow Chart sample automatically shows and hides the ports as the mouse passes over a node. The node template includes the following settings:

    myDiagram.nodeTemplate =
      $(go.Node,
        . . .
        {
          . . .
          // handle mouse enter/leave events to show/hide the ports
          mouseEnter: function (e, obj) { showPorts(obj.part, true); },
          mouseLeave: function (e, obj) { showPorts(obj.part, false); }
          . . .
        });
    
    where the showPorts function is defined to set the visible property of each of the port elements of the node. +
    Gets or sets the function to execute when the user moves the mouse into this object without holding down any buttons. More... This property is used by the ToolManager.

    If this property value is a function, it is called with an InputEvent, this GraphObject that the mouse has left, and any next GraphObject that the mouse is now in. The InputEvent.targetObject provides the GraphObject that was found at the mouse point before looking up the visual tree of GraphObject.panels to get to this object. By default this property is null.

    This function is called with Diagram.skipsUndoManager temporarily set to true, so that any changes to GraphObjects are not recorded in the UndoManager. You do not need to start and commit any transaction in this function. After calling this function the diagram will be updated immediately.

    For example, the Flow Chart sample automatically shows and hides the ports as the mouse passes over a node. The node template includes the following settings:

    myDiagram.nodeTemplate =
      $(go.Node,
        . . .
        {
          . . .
          // handle mouse enter/leave events to show/hide the ports
          mouseEnter: function (e, obj) { showPorts(obj.part, true); },
          mouseLeave: function (e, obj) { showPorts(obj.part, false); }
          . . .
        });
    
    where the showPorts function is defined to set the visible property of each of the port elements of the node.

    See also:
      diff --git a/api/symbols/GridLayout.html b/api/symbols/GridLayout.html index 215086f54..3cec6c288 100644 --- a/api/symbols/GridLayout.html +++ b/api/symbols/GridLayout.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Group.html b/api/symbols/Group.html index b05370881..c68961f05 100644 --- a/api/symbols/Group.html +++ b/api/symbols/Group.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/InputEvent.html b/api/symbols/InputEvent.html index c7443bfd6..aaf01ce8d 100644 --- a/api/symbols/InputEvent.html +++ b/api/symbols/InputEvent.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Iterable.html b/api/symbols/Iterable.html index 05a6506af..fe75273c4 100644 --- a/api/symbols/Iterable.html +++ b/api/symbols/Iterable.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Iterator.html b/api/symbols/Iterator.html index ee0db0e49..3a475e4bf 100644 --- a/api/symbols/Iterator.html +++ b/api/symbols/Iterator.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Layer.html b/api/symbols/Layer.html index 5467f4bd4..fcd8a37c6 100644 --- a/api/symbols/Layer.html +++ b/api/symbols/Layer.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/LayeredDigraphEdge.html b/api/symbols/LayeredDigraphEdge.html index ac4a15815..169e2c564 100644 --- a/api/symbols/LayeredDigraphEdge.html +++ b/api/symbols/LayeredDigraphEdge.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/LayeredDigraphLayout.html b/api/symbols/LayeredDigraphLayout.html index 0e5c5cebb..4f0ac963e 100644 --- a/api/symbols/LayeredDigraphLayout.html +++ b/api/symbols/LayeredDigraphLayout.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/LayeredDigraphVertex.html b/api/symbols/LayeredDigraphVertex.html index e1f0d0b31..b6b6537c0 100644 --- a/api/symbols/LayeredDigraphVertex.html +++ b/api/symbols/LayeredDigraphVertex.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Layout.html b/api/symbols/Layout.html index d481a0224..fda5f8113 100644 --- a/api/symbols/Layout.html +++ b/api/symbols/Layout.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/LayoutEdge.html b/api/symbols/LayoutEdge.html index 79fedbeda..4c427461e 100644 --- a/api/symbols/LayoutEdge.html +++ b/api/symbols/LayoutEdge.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/LayoutNetwork.html b/api/symbols/LayoutNetwork.html index c703a1831..6602e916e 100644 --- a/api/symbols/LayoutNetwork.html +++ b/api/symbols/LayoutNetwork.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/LayoutVertex.html b/api/symbols/LayoutVertex.html index 9040d05b8..69b9d5d27 100644 --- a/api/symbols/LayoutVertex.html +++ b/api/symbols/LayoutVertex.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Link.html b/api/symbols/Link.html index 1e0b4cee3..14d39c351 100644 --- a/api/symbols/Link.html +++ b/api/symbols/Link.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/LinkReshapingTool.html b/api/symbols/LinkReshapingTool.html index 403d6ceeb..a470ba300 100644 --- a/api/symbols/LinkReshapingTool.html +++ b/api/symbols/LinkReshapingTool.html @@ -974,7 +974,7 @@

      Collection Classes

      @@ -1014,7 +1014,7 @@

      Constructor -
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.linkReshapingTool, which you can modify. +
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.linkReshapingTool, which you can modify. More...

      The Tool.name of this tool is "LinkReshaping". diff --git a/api/symbols/LinkingBaseTool.html b/api/symbols/LinkingBaseTool.html index 35f82d2f8..05c5c404b 100644 --- a/api/symbols/LinkingBaseTool.html +++ b/api/symbols/LinkingBaseTool.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/LinkingTool.html b/api/symbols/LinkingTool.html index f2e484c47..d538151a6 100644 --- a/api/symbols/LinkingTool.html +++ b/api/symbols/LinkingTool.html @@ -974,7 +974,7 @@

      Collection Classes

      @@ -1014,7 +1014,7 @@

      Constructor -
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.linkingTool, which you can modify. +
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.linkingTool, which you can modify. More...

      The Tool.name of this tool is "Linking". diff --git a/api/symbols/List.html b/api/symbols/List.html index 560c282ab..232a72327 100644 --- a/api/symbols/List.html +++ b/api/symbols/List.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Map.html b/api/symbols/Map.html index f361c3518..bcf818c90 100644 --- a/api/symbols/Map.html +++ b/api/symbols/Map.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Margin.html b/api/symbols/Margin.html index 4a8c7c262..b57510ea5 100644 --- a/api/symbols/Margin.html +++ b/api/symbols/Margin.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Model.html b/api/symbols/Model.html index 7dbc6806e..a31e97248 100644 --- a/api/symbols/Model.html +++ b/api/symbols/Model.html @@ -974,7 +974,7 @@

      Collection Classes

      @@ -989,7 +989,7 @@

      - Models hold the essential data of a diagram, describing the basic entities and their properties and relationships without specifying the appearance and behavior of the Nodes and Links and Groups that represent them visually. Models tend to hold only relatively simple data, making them easy to persist by serialization as JSON or XML formatted text.

      Models hold simple data objects, not Parts such as Nodes or Links. Node data is normally represented in a Diagram by instances of Node, but they could be represented by simple Parts or by Groups. A Diagram constructs Parts for its Diagram.model's data by copying templates. Templates are Panels of GraphObjects that get some property values from the model data, accessible via the Panel.data property, using data Binding. See Using Models and Data Binding for an introduction.

      This Model class only supports holding an array of node data and interpreting properties on that data to be able to refer to them using unique key values. To support simple tree-structured graphs, use a TreeModel, which inherits from this class. To support links and grouping, use a GraphLinksModel.

      Each node data object is assumed to have a unique key value. The nodeKeyProperty property names the property on the node data whose value is the unique key for that node data object. The default value for this property is "key". You should not have a TwoWay data binding on the node key property, because that might cause the property value to be set to a duplicate key value.

      The key values must be either strings or numbers or undefined. If the key is undefined, or if there are duplicate key values, the model will automatically try to assign a new unique key value. Caution: if your keys are numbers, do not try to use string representations of those numbers as keys. Conversely, if your keys are strings that happen to have number syntax, do not try to use those number values. Sometimes JavaScript will automatically convert from string to number or vice-versa, but sometimes it won't.

      For example, one can define a graph consisting of just two nodes:

       model.nodeDataArray = [
         { key: "Alpha" },
         { key: "Beta" }
       ];
      

      This model cannot detect the modification of the nodeDataArray array or the modification of any node data object. If you want to add or remove node data from the nodeDataArray, call the addNodeData or removeNodeData methods.

      If you want to modify a node data object, it depends on whether the property you want to change is a structural property that the model needs to know about, or whether it is a property that is only used for data binding or other application-specific purposes.

      For the former case, call the appropriate method, such as setKeyForNodeData, setCategoryForNodeData, GraphLinksModel.setToKeyForLinkData, or GraphLinksModel.setGroupKeyForNodeData. These methods have names that start with "set", "add", "insert", or "remove".

      For the latter case, when setting an application-specific property, typically for data binding, and to support undo/redo, call setDataProperty.

      The copyNodeData method can be called to make a shallow copy of a node data object. However, if some of those property values are Arrays that want not to be shared but to be copied, you can set copiesArrays to true. This is typically very useful when dealing with data bound item arrays. Furthermore if the items in those copied Arrays are in fact Objects that need to be copied, you can also set copiesArrayObjects to true, causing a copied Array to refer to newly shallow-copied objects of the original array.

      Each model comes with its own UndoManager that is initially not enabled. You will need to set UndoManager.isEnabled to true in order for the UndoManager to record model changes and for your users to perform undo and redo.

      You can temporarily turn off the recording of changes by setting skipsUndoManager to true. A number of places within the system do that routinely in order to avoid recording temporary changes, so be sure to remember the original value beforehand and restore it afterwards.

      One normally saves a diagram by just saving its model. If you can use JSON-formatted text, this is easy to do -- just call toJson to get the string representation of the model, and save that string. Load the diagram by replacing the Diagram.model with one created by calling the static function Model.fromJson:

        myDiagram.model = go.Model.fromJson(loadedString);
      
      Note that JSON and other textual data formats cannot faithfully store all JavaScript functions. toJson and Model.fromJson do not try to save and load functional property values. You should arrange that all such functions, including event handlers, are established by your app. toJson and Model.fromJson also cannot handle circular references; any sharing of references will be lost too. They also skip properties that are not enumerable, those whose names start with an underscore, and those whose values are undefined.

      Note that models also do not store the templates used by diagrams, nor any transient or temporary parts such as Adornments, nor any tools, nor any UndoManager state, nor any event listeners. These objects and all other properties of diagrams must be established by your app. You can add any number of properties to the modelData object, which is serialized and deserialized into JSON just like any other model data for nodes or links. However modelData is associated with the model as a whole and does not depend on the existence of any node data or link data. + Models hold the essential data of a diagram, describing the basic entities and their properties and relationships without specifying the appearance and behavior of the Nodes and Links and Groups that represent them visually. Models tend to hold only relatively simple data, making them easy to persist by serialization as JSON or XML formatted text.

      Models hold simple data objects, not Parts such as Nodes or Links. Node data is normally represented in a Diagram by instances of Node, but they could be represented by simple Parts or by Groups. A Diagram constructs Parts for its Diagram.model's data by copying templates. Templates are Panels of GraphObjects that get some property values from the model data, accessible via the Panel.data property, using data Binding. See Using Models and Data Binding for an introduction.

      This Model class only supports holding an array of node data and interpreting properties on that data to be able to refer to them using unique key values. To support simple tree-structured graphs, use a TreeModel, which inherits from this class. To support links and grouping, use a GraphLinksModel.

      Each node data object is assumed to have a unique key value. The nodeKeyProperty property names the property on the node data whose value is the unique key for that node data object. The default value for this property is "key". You should not have a TwoWay data binding on the node key property, because that might cause the property value to be set to a duplicate key value.

      The key values must be either strings or numbers or undefined. If the key is undefined, or if there are duplicate key values, the model will automatically try to assign a new unique key value. Caution: if your keys are numbers, do not try to use string representations of those numbers as keys. Conversely, if your keys are strings that happen to have number syntax, do not try to use those number values. Sometimes JavaScript will automatically convert from string to number or vice-versa, but sometimes it won't.

      For example, one can define a graph consisting of just two nodes:

       model.nodeDataArray = [
         { key: "Alpha" },
         { key: "Beta" }
       ];
      

      This model cannot detect the modification of the nodeDataArray array or the modification of any node data object. If you want to add or remove node data from the nodeDataArray, call the addNodeData or removeNodeData methods.

      If you want to modify a node data object, it depends on whether the property you want to change is a structural property that the model needs to know about, or whether it is a property that is only used for data binding or other application-specific purposes.

      For the former case, call the appropriate method, such as setKeyForNodeData, setCategoryForNodeData, GraphLinksModel.setToKeyForLinkData, or GraphLinksModel.setGroupKeyForNodeData. These methods have names that start with "set", "add", "insert", or "remove".

      For the latter case, when setting an application-specific property, typically for data binding, and to support undo/redo, call setDataProperty.

      The copyNodeData method can be called to make a shallow copy of a node data object. However, if some of those property values are Arrays that want not to be shared but to be copied, you can set copiesArrays to true. This is typically very useful when dealing with data bound item arrays. Furthermore if the items in those copied Arrays are in fact Objects that need to be copied, you can also set copiesArrayObjects to true, causing a copied Array to refer to newly shallow-copied objects of the original array.

      Each model comes with its own UndoManager that is initially not enabled. You will need to set UndoManager.isEnabled to true in order for the UndoManager to record model changes and for your users to perform undo and redo.

      You can temporarily turn off the recording of changes by setting skipsUndoManager to true. A number of places within the system do that routinely in order to avoid recording temporary changes, so be sure to remember the original value beforehand and restore it afterwards.

      One normally saves a diagram by just saving its model. If you can use JSON-formatted text, this is easy to do -- just call toJson to get the string representation of the model, and save that string. Load the diagram by replacing the Diagram.model with one created by calling the static function Model.fromJson:

        myDiagram.model = go.Model.fromJson(loadedString);
      
      Note that JSON and other textual data formats cannot faithfully store all JavaScript functions. toJson and Model.fromJson do not try to save and load functional property values. You should arrange that all such functions, including event handlers, are established by your app. toJson and Model.fromJson also cannot handle circular references; any sharing of references will be lost too. They also skip properties that are not enumerable, those whose names start with an underscore, and those whose values are undefined.

      Note that models also do not store the templates used by diagrams, nor any transient or temporary parts such as Adornments, nor any tools, nor any UndoManager state, nor any event listeners. These objects and all other properties of diagrams must be established by your app.

      You can add any number of properties to the modelData object, which is serialized and deserialized into JSON just like any other model data for nodes or links. However modelData is associated with the model as a whole and does not depend on the existence of any node data or link data.

      diff --git a/api/symbols/Node.html b/api/symbols/Node.html index 73198f6e8..c28016920 100644 --- a/api/symbols/Node.html +++ b/api/symbols/Node.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Overview.html b/api/symbols/Overview.html index 73d688baf..585badd40 100644 --- a/api/symbols/Overview.html +++ b/api/symbols/Overview.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Palette.html b/api/symbols/Palette.html index a856a4857..d9a745fc0 100644 --- a/api/symbols/Palette.html +++ b/api/symbols/Palette.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Panel.html b/api/symbols/Panel.html index 85ee79ede..36310337b 100644 --- a/api/symbols/Panel.html +++ b/api/symbols/Panel.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/PanningTool.html b/api/symbols/PanningTool.html index abca5c4b1..3b3591347 100644 --- a/api/symbols/PanningTool.html +++ b/api/symbols/PanningTool.html @@ -974,7 +974,7 @@

      Collection Classes

      @@ -1014,7 +1014,7 @@

      Constructor -
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.panningTool. +
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.panningTool. More...

      The Tool.name of this tool is "Panning". diff --git a/api/symbols/Part.html b/api/symbols/Part.html index ae877b175..b080e13f0 100644 --- a/api/symbols/Part.html +++ b/api/symbols/Part.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/PathFigure.html b/api/symbols/PathFigure.html index 080f9c94b..37b5a64d6 100644 --- a/api/symbols/PathFigure.html +++ b/api/symbols/PathFigure.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/PathSegment.html b/api/symbols/PathSegment.html index 35c61e475..efa79609a 100644 --- a/api/symbols/PathSegment.html +++ b/api/symbols/PathSegment.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Picture.html b/api/symbols/Picture.html index e1a47331e..ced14194b 100644 --- a/api/symbols/Picture.html +++ b/api/symbols/Picture.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Placeholder.html b/api/symbols/Placeholder.html index bca477ce5..1b0b8f63e 100644 --- a/api/symbols/Placeholder.html +++ b/api/symbols/Placeholder.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Point.html b/api/symbols/Point.html index b5864ba9a..df2b6f847 100644 --- a/api/symbols/Point.html +++ b/api/symbols/Point.html @@ -974,7 +974,7 @@

      Collection Classes

      @@ -1012,7 +1012,7 @@

      Constructor -
      The default constructor produces the Point(0,0). More... +
      The default constructor produces the Point(0,0). More... This constructor may take either zero arguments or two arguments.
      Parameters:
      diff --git a/api/symbols/Rect.html b/api/symbols/Rect.html index e41883234..770fa8e95 100644 --- a/api/symbols/Rect.html +++ b/api/symbols/Rect.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/RelinkingTool.html b/api/symbols/RelinkingTool.html index cbe5e4bfc..db643c84a 100644 --- a/api/symbols/RelinkingTool.html +++ b/api/symbols/RelinkingTool.html @@ -974,7 +974,7 @@

      Collection Classes

      @@ -1014,7 +1014,7 @@

      Constructor -
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.relinkingTool, which you can modify. +
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.relinkingTool, which you can modify. More...

      The Tool.name of this tool is "Relinking". diff --git a/api/symbols/ResizingTool.html b/api/symbols/ResizingTool.html index f64c0a737..1c1beacc2 100644 --- a/api/symbols/ResizingTool.html +++ b/api/symbols/ResizingTool.html @@ -974,7 +974,7 @@

      Collection Classes

      @@ -1014,7 +1014,7 @@

      Constructor -
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.resizingTool, which you can modify. +
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.resizingTool, which you can modify. More...

      The Tool.name of this tool is "Resizing". diff --git a/api/symbols/RotatingTool.html b/api/symbols/RotatingTool.html index 7c96ba4c9..4650817fc 100644 --- a/api/symbols/RotatingTool.html +++ b/api/symbols/RotatingTool.html @@ -974,7 +974,7 @@

      Collection Classes

      @@ -1014,7 +1014,7 @@

      Constructor -
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.rotatingTool, which you can modify. +
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.rotatingTool, which you can modify. More...

      The Tool.name of this tool is "Rotating". diff --git a/api/symbols/RowColumnDefinition.html b/api/symbols/RowColumnDefinition.html index ede9dd152..536fb450f 100644 --- a/api/symbols/RowColumnDefinition.html +++ b/api/symbols/RowColumnDefinition.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Set.html b/api/symbols/Set.html index cd578b57e..eed8c8934 100644 --- a/api/symbols/Set.html +++ b/api/symbols/Set.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Shape.html b/api/symbols/Shape.html index 76977e7aa..777e65ff1 100644 --- a/api/symbols/Shape.html +++ b/api/symbols/Shape.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/Size.html b/api/symbols/Size.html index a72e35aa5..7ba9fc1b7 100644 --- a/api/symbols/Size.html +++ b/api/symbols/Size.html @@ -974,7 +974,7 @@

      Collection Classes

      @@ -1012,7 +1012,7 @@

      Constructor -
      The default constructor produces the Size(0,0). More... +
      The default constructor produces the Size(0,0). More... This constructor may take either zero arguments or two arguments.
      Parameters:
      diff --git a/api/symbols/Spot.html b/api/symbols/Spot.html index aeb97e722..a9e3540ef 100644 --- a/api/symbols/Spot.html +++ b/api/symbols/Spot.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/TextBlock.html b/api/symbols/TextBlock.html index ec3ddc4e4..963c0404a 100644 --- a/api/symbols/TextBlock.html +++ b/api/symbols/TextBlock.html @@ -974,7 +974,7 @@

      Collection Classes

      diff --git a/api/symbols/TextEditingTool.html b/api/symbols/TextEditingTool.html index cb2b9ce35..b8246f3b5 100644 --- a/api/symbols/TextEditingTool.html +++ b/api/symbols/TextEditingTool.html @@ -974,7 +974,7 @@

      Collection Classes

      @@ -1014,7 +1014,7 @@

      Constructor -
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.textEditingTool, which you can modify. +
      You do not normally need to create an instance of this tool because one already exists as the ToolManager.textEditingTool, which you can modify. More...

      The Tool.name of this tool is "TextEditing". diff --git a/api/symbols/Tool.html b/api/symbols/Tool.html index 316cc36a1..95920c517 100644 --- a/api/symbols/Tool.html +++ b/api/symbols/Tool.html @@ -974,7 +974,7 @@

      Collection Classes

      @@ -989,7 +989,7 @@

      - Tools handle mouse events and keyboard events. The currently running tool, Diagram.currentTool, receives all input events from the Diagram.

      Most tools are "mode-less" tools that are managed by the ToolManager, which chooses the current tool based on the kind and position of the mouse event and the parts in the diagram. The ToolManager has properties holding instances of most of the pre-defined Tool classes. These classes include:

      The ToolManager chooses a tool to make current by finding in its lists of tools the first tool whose canStart method returns true.

      A tool is in the "running" state when it is the value of Diagram.currentTool. The Diagram.currentTool property setter will call doStop on the old tool and then call doStart on the new tool.

      A tool can then go into the "active" state once it decides it can actually do something. This happens with a call to doActivate, normally called by the ToolManager. Later it is deactivated (doDeactivate) and then stopped. isActive should be true when the tool is "active". Often tools should ignore certain common events, such as calls to doMouseMove, unless the tool is "active".

      You can prevent a "mode-less" tool (i.e. one managed by the ToolManager) from being started by the ToolManager by setting isEnabled to false.

      You can also go into a particular "mode" by setting Diagram.currentTool explicitly, thereby circumventing the normal operation of the ToolManager. This ignores the isEnabled property and does not call the canStart predicate. The behavior will depend on the tool -- not all of the predefined tools support operating as a "modal" tool.

      Tools cannot be shared amongst multiple Diagrams.

      If you define a Tool subclass, you may override any of the methods whose names start with "do" and any other methods that are documented to be overridable, such as canStart. However you must seriously consider calling the base method in order to gets its default behavior. There may be situations where not calling the base method may cause subtle bugs. But that depends on the method and the tool. Please read the Introduction page on Extensions for how to override methods and how to call this base method. + Tools handle mouse, keyboard, and touch events. The currently running tool, Diagram.currentTool, receives all input events from the Diagram via canonicalized InputEvents.

      Most tools are "mode-less" tools that are managed by the ToolManager, which chooses the current tool based on the kind and position of the mouse event and the parts in the diagram. The ToolManager has properties holding instances of most of the pre-defined Tool classes. These classes include:

      The ToolManager chooses a tool to run as the diagram's current tool by finding in its lists of tools the first tool whose canStart method returns true. The ToolManager then sets Diagram.currentTool to be that tool.

      A tool is in the "running" state when it is the value of Diagram.currentTool. The Diagram.currentTool property setter will call doStop on the old tool and then call doStart on the new tool.

      A tool can then go into the "active" state once it decides it can actually do something. This happens with a call to doActivate, normally called by the ToolManager. Later it is deactivated (doDeactivate) and then stopped. isActive should be true when the tool is "active". Often tools should ignore certain common events, such as calls to doMouseMove, unless the tool isActive.

      You can prevent a "mode-less" tool (i.e. one managed by the ToolManager) from being started by the ToolManager by setting isEnabled to false.

      You can also go into a particular "mode" by setting Diagram.currentTool explicitly, thereby circumventing the normal operation of the ToolManager. This ignores the isEnabled property and does not call the canStart predicate. The behavior will depend on the tool -- not all of the predefined tools support operating as a "modal" tool.

      Tools cannot be shared amongst multiple Diagrams.

      If you define a Tool subclass, you may override any of the methods whose names start with "do" and any other methods that are documented to be overridable, such as canStart. However you must seriously consider calling the base method in order to gets its default behavior. There may be situations where not calling the base method may cause subtle bugs. But that depends on the method and the tool. Please read the Introduction page on Extensions for how to override methods and how to call the base method.

      @@ -1068,7 +1068,7 @@

      Properties Summary -
      Gets or sets whether this tool is started and is actively doing something. More...

      You can set this to true after your tool is started (i.e. when it is the Diagram.currentTool and doStart had been called), but when it is not yet in a state that it is actually "doing" something, because it is waiting for the right circumstances. This is typically only important when the tool is used in a modal fashion.

      The default value is false. +

      Gets or sets whether this tool is started and is actively doing something. More...

      You can set this to true after your tool is started (i.e. when it is the Diagram.currentTool and doStart had been called), but when it is not yet in a state that it is actually "doing" something, because it is waiting for the right circumstances. This is typically only important when the tool is used in a modal fashion.

      The default value is false. This is normally set by doActivate and doDeactivate.

      @@ -1104,7 +1104,7 @@

      Properties Summary -
      Gets or sets the name of this tool. More... The initial name is an empty string.

      This name is sometimes used by tools that use Adornments as the Part.category for their Adornments. It is also sometimes used by tools that conduct transactions as the transaction name. +

      Gets or sets the name of this tool. More... The default name is an empty string, but the constructor for each instance of a subclass of Tool will initialize it appropriately. For example, the name of the DragSelectingTool is "DragSelecting".

      This name is sometimes used by tools that use Adornments as the Part.category for their Adornments. It is also sometimes used by tools that conduct transactions as the transaction name.

      @@ -1122,7 +1122,7 @@

      Properties Summary -
      Gets or sets the name of the transaction to be committed by stopTransaction; if null, the transaction will be rolled back. More...

      If this is non-null at the time of a call to stopTransaction, it calls Diagram.commitTransaction with this transaction name; if this is null at that time, it calls Diagram.rollbackTransaction.

      The default value is null; startTransaction will also set this to null.

      This property exists so that no matter what execution path occurs to end the usage of a tool, any ongoing transaction can be properly committed or rolled-back. +

      Gets or sets the name of the transaction to be committed by stopTransaction; if null, the transaction will be rolled back. More...

      If this is non-null at the time of a call to stopTransaction, it calls Diagram.commitTransaction with this transaction name; if this is null at that time, it calls Diagram.rollbackTransaction.

      The default value is null; startTransaction will also set this to null. Because a value of null when stopTransaction is called will rollback the transaction, it is important that your code sets this property to a non-null value when it thinks it has succeeded.

      This property exists so that no matter what execution path occurs to end the usage of a tool, any ongoing transaction can be properly committed or rolled-back.

      @@ -1191,7 +1191,7 @@

      Method Summary
      Returns:
      -
      {boolean} true if isEnabled is true and if the Diagram.toolManager can make this tool the current one and then call the doStart method.
      +
      {boolean} true if isEnabled is true and if the Diagram.toolManager can make this tool the Diagram.currentTool and then call the doStart method.

      @@ -1214,7 +1214,7 @@

      Method Summary -
      Called by ToolManager#domousedown and ToolManager#domousemove, this method determines whether or not to allow pinch zooming from a multi-touch event. More... By default this predicate just returns true. This method may be overridden. Please read the Introduction page on Extensions for how to override methods and how to call this base method. +
      Called by ToolManager.doMouseDown and ToolManager.doMouseMove, this method determines whether or not to allow pinch zooming from a multi-touch event. More... By default this predicate just returns true. This method may be overridden. Please read the Introduction page on Extensions for how to override methods and how to call this base method.

      See also:
        @@ -1272,7 +1272,7 @@

        Method Summary -
        The diagram will call this method when the user wishes to cancel the current tool's operation. More... Typically this is called when the user hits the ESCAPE key. This should restore the original state and then call stopTool.

        By default this method just calls stopTool. This method may be overridden. Please read the Introduction page on Extensions for how to override methods and how to call this base method. +

        The diagram will call this method when the user wishes to cancel the current tool's operation. More... Typically this is called when the user hits the ESCAPE key. This should restore the original state of what was modified by this tool, and then it should call stopTool. This method is not responsible for cleaning up any side-effects that should be performed by doDeactivate and/or doStop, which will always be called whether the tool stops normally or abnormally.

        By default this method just calls stopTool. You will want to override this method even in tools that call startTransaction and stopTransaction, because the UndoManager might not be enabled. This method may be overridden. Please read the Introduction page on Extensions for how to override methods and how to call this base method. @@ -1593,7 +1593,7 @@

        Method Summary -
        Implement the standard behavior for mouse clicks, searching for and calling click handler functions on GraphObjects or on Diagram, and raising the corresponding DiagramEvent. More...

        A click on a GraphObject of the diagram will raise one of the following DiagramEvents: "ObjectSingleClicked", "ObjectDoubleClicked", or "ObjectContextClicked". This will also look at the corresponding click property: GraphObject.click, GraphObject.doubleClick, or GraphObject.contextClick. If the value is a function, this will call it, passing the current InputEvent and the GraphObject. If the value is null, it tries looking at the parent GraphObject.panel, and so on, walking up the visual tree until it finds the appropriate function to call. After calling the click function, if the value of InputEvent.handled is false, this method will continue walking up the visual tree looking for more click functions to call. Once it has looked at the top-level object (a Part) for a click function, this method stops.

        A click in the background of the diagram will raise one of the following DiagramEvents: "BackgroundSingleClicked", "BackgroundDoubleClicked", or "BackgroundContextClicked". This will also look at the corresponding click property: Diagram.click, Diagram.doubleClick, or Diagram.contextClick. If the value is a function, this will call it, passing the current InputEvent.

        This method is not responsible for selecting or deselecting any parts. Call standardMouseSelect for that functionality.

        This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Introduction page on Extensions for how to override methods and how to call this base method. +

        Implement the standard behavior for mouse clicks, searching for and calling click handler functions on GraphObjects or on Diagram, and raising the corresponding DiagramEvent. More...

        A click on a GraphObject of the diagram will raise one of the following DiagramEvents: "ObjectSingleClicked", "ObjectDoubleClicked", or "ObjectContextClicked". This will also look at the corresponding click property: GraphObject.click, GraphObject.doubleClick, or GraphObject.contextClick. If the value is a function, this will call it, passing the current InputEvent and the GraphObject. If the value is null, it tries looking at the parent GraphObject.panel, and so on, walking up the visual tree until it finds the appropriate function to call. After calling the click function, if the value of InputEvent.handled is false, this method will continue walking up the visual tree looking for more click functions to call. Once it has looked at the top-level object (a Part) for a click function, this method stops.

        A click in the background of the diagram will raise one of the following DiagramEvents: "BackgroundSingleClicked", "BackgroundDoubleClicked", or "BackgroundContextClicked". This will also look at the corresponding click property: Diagram.click, Diagram.doubleClick, or Diagram.contextClick. If the value is a function, this will call it, passing the current InputEvent.

        This method is not responsible for selecting or deselecting any parts. Call standardMouseSelect for that functionality.

        The ClickSelectingTool calls this method in its override of doMouseUp in order to raise "click" events. Note that by default GraphObjects in Layers that are Layer.isTemporary will not be "clicked". To change that behavior it is easiest to set GraphObject.isActionable to true on those objects for which you wish to handle "click" events. Then the ActionTool's doMouseUp override will raise the standard "click" events.

        This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Introduction page on Extensions for how to override methods and how to call this base method.

        @@ -1652,7 +1652,7 @@

        Method Summary -
        Implement the standard behavior for selecting parts with the mouse, depending on the control and shift modifier keys. More...

        Control-clicking on a part will select it if it wasn't already, and will deselect if it had been selected. Shift-clicking on a part will add it to the selection (if it wasn't already). Otherwise, clicking on a part will select it (if it wasn't already).

        Note that there are restrictions on selection. For example, a part cannot be selected in this manner if Part.selectable is false, or if Diagram.maxSelectionCount would be exceeded.

        A left click in the background of the diagram with no modifier keys clears the selection.

        This method does not implement any click event behavior -- that is implemented by standardMouseClick.

        This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Introduction page on Extensions for how to override methods and how to call this base method. +

        Implement the standard behavior for selecting parts with the mouse, depending on the control and shift modifier keys. More...

        Control-clicking on a part will select it if it wasn't already, and will deselect if it had been selected. Shift-clicking on a part will add it to the selection (if it wasn't already). Otherwise, clicking on a part will select it (if it wasn't already).

        Note that there are restrictions on selection. For example, a part cannot be selected in this manner if Part.selectable is false, or if Diagram.maxSelectionCount would be exceeded.

        A left click in the background of the diagram with no modifier keys clears the selection.

        This method does not implement any click event behavior -- that is implemented by standardMouseClick.

        The ClickSelectingTool calls this method in its override of doMouseUp in order to change the selection.

        This method may be overridden, but you should consider calling this base method in order to get all of its functionality. Please read the Introduction page on Extensions for how to override methods and how to call this base method. diff --git a/api/symbols/ToolManager.html b/api/symbols/ToolManager.html index e7983dd0b..802f299f9 100644 --- a/api/symbols/ToolManager.html +++ b/api/symbols/ToolManager.html @@ -974,7 +974,7 @@

        Collection Classes

        @@ -1014,7 +1014,7 @@

        Constructor -
        You do not normally need to create an instance of this tool because one already exists as the Diagram.toolManager, which you can modify. More...

        The constructor produces a ToolManager that manages no tools. Call initializeStandardTools to create various tools, initialize the tool properties such as draggingTool, and initialize the three mouse tool lists with those newly created tools. +

        You do not normally need to create an instance of this tool because one already exists as the Diagram.toolManager, which you can modify. More...

        The Tool.name of this tool is "ToolManager".

        The constructor produces a ToolManager that manages no tools. Call initializeStandardTools to create various tools, initialize the tool properties such as draggingTool, and initialize the three mouse tool lists with those newly created tools. @@ -1195,6 +1195,8 @@

        Properties Summary
        gestureBehavior + 1.5 +
        @@ -1726,7 +1728,7 @@

        Method Summary -
        Initialize the three mouse tool lists with instances of the standard tools. More... This adds tools to the following three mouse tool lists: mouseDownTools, mouseMoveTools, or mouseUpTools. This also sets the various tool properties of this ToolManager to those newly created tools. Please read the Introduction page on Extensions for how to override methods and how to call this base method. +
        Initialize the three mouse tool lists with instances of the standard tools. More... This adds new instances of tools to the following three mouse tool lists: mouseDownTools, mouseMoveTools, or mouseUpTools. This also sets the various tool properties of this ToolManager to those newly created tools. Please read the Introduction page on Extensions for how to override methods and how to call this base method. diff --git a/api/symbols/Transaction.html b/api/symbols/Transaction.html index 262badb48..1983863fd 100644 --- a/api/symbols/Transaction.html +++ b/api/symbols/Transaction.html @@ -974,7 +974,7 @@

        Collection Classes

        diff --git a/api/symbols/TreeEdge.html b/api/symbols/TreeEdge.html index e7433b4da..6daeef054 100644 --- a/api/symbols/TreeEdge.html +++ b/api/symbols/TreeEdge.html @@ -974,7 +974,7 @@

        Collection Classes

        diff --git a/api/symbols/TreeLayout.html b/api/symbols/TreeLayout.html index 0dd6b43ea..5a7d0c386 100644 --- a/api/symbols/TreeLayout.html +++ b/api/symbols/TreeLayout.html @@ -974,7 +974,7 @@

        Collection Classes

        diff --git a/api/symbols/TreeModel.html b/api/symbols/TreeModel.html index fe13d7996..a0fe241bd 100644 --- a/api/symbols/TreeModel.html +++ b/api/symbols/TreeModel.html @@ -974,7 +974,7 @@

        Collection Classes

        diff --git a/api/symbols/TreeVertex.html b/api/symbols/TreeVertex.html index 93cdafc75..0057d2715 100644 --- a/api/symbols/TreeVertex.html +++ b/api/symbols/TreeVertex.html @@ -974,7 +974,7 @@

        Collection Classes

        diff --git a/api/symbols/UndoManager.html b/api/symbols/UndoManager.html index 368059444..61c42f505 100644 --- a/api/symbols/UndoManager.html +++ b/api/symbols/UndoManager.html @@ -974,7 +974,7 @@

        Collection Classes

        diff --git a/assets/images/screenshots/Spiral.png b/assets/images/screenshots/Spiral.png new file mode 100644 index 000000000..7b5344317 Binary files /dev/null and b/assets/images/screenshots/Spiral.png differ diff --git a/doc/changelog.html b/doc/changelog.html index 7d728b8fb..8c666c848 100644 --- a/doc/changelog.html +++ b/doc/changelog.html @@ -53,6 +53,26 @@

        GoJS® Change Log

        } +

        Changes for 1.5.4

        + +

        Changes for 1.5.3

        • The transaction name argument to UndoManager.commitTransaction (or Model.commitTransaction or Diagram.commitTransaction) is now optional, diff --git a/extensions/RealtimeDragSelecting.html b/extensions/RealtimeDragSelecting.html new file mode 100644 index 000000000..1fc650fec --- /dev/null +++ b/extensions/RealtimeDragSelecting.html @@ -0,0 +1,97 @@ + + + + Realtime Drag Selecting Tool + + + + + + + + + + +
          +
          +

          + This sample demonstrates the RealtimeDragSelectingTool, which replaces the standard DragSelectingTool. + Press in the background, wait briefly, and then drag to start selecting Nodes or Links that intersect with the box. + You can press or release Control (Command on Mac) or Shift while dragging to see how the selection changes. +

          +

          + Load it in your own app by including RealtimeDragSelectingTool.js. + Initialize your Diagram by setting ToolManager.dragSelectingTool to a new instance of this tool. + For example: +

          +
          +    myDiagram.toolManager.dragSelectingTool = new go.RealtimeDragSelectingTool();
          +  
          + or +
          +    $(go.Diagram, { . . .,
          +                    toolManager: $(RealtimeDragSelectingTool, { isPartialInclusion: true }),
          +                    . . . })
          +  
          +
          + + diff --git a/extensions/RealtimeDragSelectingTool.js b/extensions/RealtimeDragSelectingTool.js new file mode 100644 index 000000000..3a9f95850 --- /dev/null +++ b/extensions/RealtimeDragSelectingTool.js @@ -0,0 +1,127 @@ +"use strict"; +/* +* Copyright (C) 1998-2015 by Northwoods Software Corporation. All Rights Reserved. +*/ + +// A custom DragSelectingTool for selecting and deselecting Parts during a drag. + +/** +* @constructor +* @extends DragSelectingTool +* @class +* The RealtimeDragSelectingTool selects and deselects Parts within the {@link DragSelectingTool#box} +* during a drag, not just at the end of the drag. +*/ +function RealtimeDragSelectingTool() { + go.DragSelectingTool.call(this); + this._originalSelection = null; + this._temporarySelection = null; +} + +go.Diagram.inherit(RealtimeDragSelectingTool, go.DragSelectingTool); + +/** +* Remember the original collection of selected Parts. +* @this {RealtimeDragSelectingTool} +*/ +RealtimeDragSelectingTool.prototype.doActivate = function() { + go.DragSelectingTool.prototype.doActivate.call(this); + // keep a copy of the original Set of selected Parts + this._originalSelection = this.diagram.selection.copy(); + // these Part.isSelected may have been temporarily modified + this._temporarySelection = new go.Set(go.Part); +}; + +/** +* Release any references to selected Parts. +* @this {RealtimeDragSelectingTool} +*/ +RealtimeDragSelectingTool.prototype.doDeactivate = function() { + this._originalSelection = null; + this._temporarySelection = null; + go.DragSelectingTool.prototype.doDeactivate.call(this); +}; + +/** +* Restore the selection which may have been modified during a drag. +* @this {RealtimeDragSelectingTool} +*/ +RealtimeDragSelectingTool.prototype.doCancel = function() { + var orig = this._originalSelection; + if (orig !== null) { + orig.each(function(p) { p.isSelected = true; }); + this._temporarySelection.each(function(p) { if (!orig.contains(p)) p.isSelected = false; }); + } + go.DragSelectingTool.prototype.doCancel.call(this); +}; + +/** +* @this {RealtimeDragSelectingTool} +*/ +RealtimeDragSelectingTool.prototype.doMouseMove = function() { + if (this.isActive) { + go.DragSelectingTool.prototype.doMouseMove.call(this); + this.selectInRect(this.computeBoxBounds()); + } +}; + +/** +* @this {RealtimeDragSelectingTool} +*/ +RealtimeDragSelectingTool.prototype.doKeyDown = function() { + if (this.isActive) { + go.DragSelectingTool.prototype.doKeyDown.call(this); + this.selectInRect(this.computeBoxBounds()); + } +}; + +/** +* @this {RealtimeDragSelectingTool} +*/ +RealtimeDragSelectingTool.prototype.doKeyUp = function() { + if (this.isActive) { + go.DragSelectingTool.prototype.doKeyUp.call(this); + this.selectInRect(this.computeBoxBounds()); + } +}; + +/** +* @ignore +* Platform detection to use Meta (Command) key on Mac keyboard +*/ +RealtimeDragSelectingTool.isMac = navigator.platform.toUpperCase().indexOf("MAC") >= 0; + +/** +* @expose +* @this {RealtimeDragSelectingTool} +* @param {Rect} r a rectangular bounds in document coordinates. +*/ +RealtimeDragSelectingTool.prototype.selectInRect = function(r) { + var diagram = this.diagram; + var orig = this._originalSelection; + var temp = this._temporarySelection; + if (diagram === null || orig === null) return; + var e = diagram.lastInput; + diagram.raiseDiagramEvent("ChangingSelection"); + var found = diagram.findObjectsIn(r, null, + function(p) { return (p instanceof go.Part) && p.canSelect(); }, + this.isPartialInclusion, + new go.Set(go.Part)); + if (RealtimeDragSelectingTool.isMac ? e.meta : e.control) { // toggle or deselect + if (e.shift) { // deselect only + temp.each(function(p) { if (!found.contains(p)) p.isSelected = orig.contains(p); }); + found.each(function(p) { p.isSelected = false; temp.add(p); }); + } else { // toggle selectedness of parts based on _originalSelection + temp.each(function(p) { if (!found.contains(p)) p.isSelected = orig.contains(p); }); + found.each(function(p) { p.isSelected = !orig.contains(p); temp.add(p); }); + } + } else if (e.shift) { // extend selection only + temp.each(function(p) { if (!found.contains(p)) p.isSelected = orig.contains(p); }); + found.each(function(p) { p.isSelected = true; temp.add(p); }); + } else { // select found parts, and unselect all other previously selected parts + temp.each(function(p) { if (!found.contains(p)) p.isSelected = false; }); + orig.each(function(p) { if (!found.contains(p)) p.isSelected = false; }); + found.each(function(p) { p.isSelected = true; temp.add(p); }); + } + diagram.raiseDiagramEvent("ChangedSelection"); +}; diff --git a/extensions/Spiral.html b/extensions/Spiral.html new file mode 100644 index 000000000..5327cd906 --- /dev/null +++ b/extensions/Spiral.html @@ -0,0 +1,104 @@ + + + +Spiral Layout + + + + + + + + + + +
          +
          +

          + This sample demonstrates a custom Layout, SpiralLayout, which assumes the graph consists of a chain of nodes. + The layout is defined in its own file, as SpiralLayout.js. +

          +
          + + diff --git a/extensions/SpiralLayout.js b/extensions/SpiralLayout.js new file mode 100644 index 000000000..d31c2749b --- /dev/null +++ b/extensions/SpiralLayout.js @@ -0,0 +1,138 @@ +"use strict"; +/* +* Copyright (C) 1998-2015 by Northwoods Software Corporation. All Rights Reserved. +*/ + +// A custom Layout that lays out a chain of nodes in a spiral + +/** +* @constructor +* @extends Layout +* @class +* This layout assumes the graph is a chain of Nodes, +* {@link #spacing} controls the spacing between nodes. +*/ +function SpiralLayout() { + go.Layout.call(this); + this._spacing = 100; + this._clockwise = true; +} +go.Diagram.inherit(SpiralLayout, go.Layout); + +/** +* This method actually positions all of the Nodes, assuming that the ordering of the nodes +* is given by a single link from one node to the next. +* This respects the {@link #spacing} property to affect the layout. +* @this {SpiralLayout} +* @param {Diagram|Group|Iterable} coll the collection of Parts to layout. +*/ +SpiralLayout.prototype.doLayout = function(coll) { + var diagram = this.diagram; + if (coll instanceof go.Diagram) { + diagram = coll; + coll = coll.nodes; // use all links connecting with these nodes + } else if (coll instanceof go.Group) { + diagram = coll.diagram; + coll = coll.memberParts; + } + + var root = null; + // find a root node -- one without any incoming links + var it = coll.iterator; + while (it.next()) { + var n = it.value; + if (!(n instanceof go.Node)) continue; + if (root === null) root = n; + if (n.findLinksInto().count === 0) { + root = n; + break; + } + } + // couldn't find a root node + if (root === null) return; + + var space = this.spacing; + + // implementations of doLayout that do not make use of a LayoutNetwork + // need to perform their own transactions + if (diagram !== null) diagram.startTransaction("Spiral Layout"); + + // treat the root node specially: it goes in the center + var r = this.diameter(root)/4; + var c = (this.clockwise ? 1 : -1); + var angle = c * Math.PI; + root.location = new go.Point(0, 0); + var rootlink = root.findLinksOutOf().first(); + if (rootlink !== null) rootlink.curviness = c * r; + + // now locate each of the following nodes, in order, along a spiral + var node = (rootlink !== null ? rootlink.toNode : null); + while (node !== null) { + var nextlink = node.findLinksOutOf().first(); + var nextnode = (nextlink !== null ? nextlink.toNode : null); + + // involute spiral + var cos = Math.cos(angle); + var sin = Math.sin(angle); + var x = r * (cos + angle * sin); + var y = r * (sin - angle * cos); + node.location = new go.Point(x, y); + + var dia = this.diameter(node)/2 + this.diameter(nextnode)/2; + angle += c * Math.atan((dia + space) / Math.sqrt(x * x + y * y)); + node = nextnode; + } + + if (diagram !== null) diagram.commitTransaction("Spiral Layout"); +}; + +/** +* @ignore +* Compute the effective diameter of a Node. +* @this {SpiralLayout} +* @param {Node} node +* @return {number} +*/ +SpiralLayout.prototype.diameter = function(node) { + if (!node) return 0; + var b = node.actualBounds; + return Math.sqrt(b.width*b.width + b.height*b.height); +}; + +// Public properties + +/** +* Gets or sets the spacing between nodes. +* The default value is 100. +* @name SpiralLayout#spacing +* @function. +* @return {number} +*/ +Object.defineProperty(SpiralLayout.prototype, "spacing", { + get: function() { return this._spacing; }, + set: function(val) { + if (typeof val !== "number") throw new Error("new value for SpiralLayout.spacing must be a number, not: " + val); + if (this._spacing !== val) { + this._spacing = val; + this.invalidateLayout(); + } + } +}); + +/** +* Gets or sets whether the spiral should go clockwise or counter-clockwise. +* The default value is true. +* @name SpiralLayout#clockwise +* @function. +* @return {boolean} +*/ +Object.defineProperty(SpiralLayout.prototype, "clockwise", { + get: function() { return this._clockwise; }, + set: function(val) { + if (typeof val !== "boolean") throw new Error("new value for SpiralLayout.clockwise must be a boolean, not: " + val); + if (this._clockwise !== val) { + this._clockwise = val; + this.invalidateLayout(); + } + } +}); diff --git a/extensions/goSamples.js b/extensions/goSamples.js index 15d56e0ef..8f0079072 100644 --- a/extensions/goSamples.js +++ b/extensions/goSamples.js @@ -139,9 +139,11 @@ var myMenu = '\
        • Fishbone Layout
        • \
        • Parallel Layout
        • \
        • Serpentine Layout
        • \ +
        • Spiral Layout
        • \
        • Tree Map Layout
        • \
        • Table Layout
        • \
          \ +
        • Realtime Selecting
        • \
        • Drag Creating
        • \
        • Drag Zooming
        • \
        • Freehand Drawing
        • \ diff --git a/index.html b/index.html index f099a2673..aa8e13a69 100644 --- a/index.html +++ b/index.html @@ -201,15 +201,15 @@

          Interactive Diagrams for the Web

          -

          GoJS is a feature-rich JavaScript library for implementing interactive diagrams across modern browsers and platforms. - GoJS makes constructing diagrams of complex Nodes, Links, and Groups easy with customizable templates and layouts. +

          GoJS is a feature-rich JavaScript library for implementing interactive diagrams across modern web browsers and platforms. + GoJS makes constructing diagrams of complex nodes, links, and groups easy with customizable templates and layouts.

          GoJS offers many advanced features for user interactivity such as drag-and-drop, copy-and-paste, in-place text editing, templates, data binding and models, transactional state and undo management, palettes, overviews, event handlers, commands, and an extensible tool system for custom operations.

          GoJS is pure JavaScript, so users get interactivity without requiring round-trips to servers and without plugins such as Flash or Silverlight. - GoJS normally runs completely in the browser, without any server-side requirements. + GoJS normally runs completely in the browser, rendering to a Canvas element or SVG without any server-side requirements. GoJS does not depend on any JavaScript libraries or frameworks, so it should work with any HTML5 or JavaScript framework or with no framework at all.

          diff --git a/intro/goIntro.js b/intro/goIntro.js index 6d79407ab..92b872644 100644 --- a/intro/goIntro.js +++ b/intro/goIntro.js @@ -159,10 +159,7 @@ var myMenu = '\
        • Diagram SVG
        • \
        • Printing
        • \
        • Server-side Images
        • \ -
        • Deployment
        • \ - \ +
        • Deployment
        • \
        '; //]]> \ No newline at end of file diff --git a/intro/performance.html b/intro/performance.html index 8f2eac4f6..49ac10a09 100644 --- a/intro/performance.html +++ b/intro/performance.html @@ -13,28 +13,87 @@

        Performance Considerations

        - This page contains design suggestions to increase the performance of your diagrams. - The optimizations available depend on the nature of your diagrams, and we encourage you to experiment. + Getting good performance for your diagrams does not require any effort on your part when + the diagrams are limited to a few hundreds of nodes and links, especially on the desktop. + However when your app might deal with thousands or tens of thousands of nodes and links, + you may need to adapt your implementation to avoid expensive features.

        -

        Give as many GraphObjects as possible static sizes

        -

        - In general, setting GraphObject.desiredSize (ones that may be dynamically sized like Pictures, TextBlocks, etc) in your templates will speed up the measure and arrange portion of diagram initialization. + The perceived performance of your diagram depends on many different factors.

        +
          +
        • JavaScript code is normally several to many times slower than Java or .NET code + on the same hardware platform.
        • +
        • JavaScript code performance varies between different browsers and versions of browsers.
        • +
        • Memory limitations, particularly on mobile devices, affect performance.
        • +
        • There can be a wide variation of drawing performance on different platforms.
        • +
        • Drawing and animation effects take resources.
        • +
        • Complicated nodes or links are slower to build and update and draw than simple ones.
        • +
        • Some layouts are inherently slower than others.
        • +
        +

        Effects and Appearances

        +

        + Shadows are relatively expensive to draw, so consider not setting Part.isShadowed to true. + Gradient Brushes are slower to draw than solid colors. + Complex Shape Geometrys are slower to draw than simpler ones, and they require more + computation when computing intersections. +

        - If you have Pictures and you know their size beforehand, its best to set a desiredSize so that each of them does not have to re-measure once the image is loaded. This may also avoid re-layouts due to images loading. + Animation takes up resources; consider setting AnimationManager.isEnabled to false.

        -

        Virtualization

        +

        Constructing and Sizing Nodes

        +

        + Keep your Nodes and Links as simple as you can make it. + Limit how many GraphObjects that you use in your templates. + Use simpler Panel types when feasible -- the "Table" Panel is the most featureful, + but maybe you can just use a "Horizontal" or a "Vertical" or a "Spot" or an "Auto" Panel. + A Panel should have two or more elements in them (although there can be exceptions). + If you have no elements in a Panel, delete the panel. + If you have only one element in a Panel, consider removing the panel and merging the element + into the panel's containing panel. +

        +

        + Do not include objects that not visible. + Limit how much data binding that you use, and avoid Bindings with no source property name + or that are Binding.ofObject. +

        +

        + If you have a Picture and you know its intended size beforehand, + it's best to set its GraphObject.desiredSize + (or GraphObject.width and GraphObject.height) + so that it does not have to re-measured once the image loads. + When nodes change size a Layout might need to be performed again, + so having fixed size nodes helps reduce diagram layouts. + In general, setting GraphObject.desiredSize on the elements of your nodes, + especially Pictures, will speed up how quickly GoJS can measure and arrange + the Panels that form your Nodes or Links. +

        +

        Layouts

        - For Diagrams with many nodes and links that only display a fraction of these at a time, you could implement some form of virtualization to optimize your Diagram. + GridLayout and TreeLayout are fast. LayeredDigraphLayout is slow.

        +

        Virtualization

        - The Virtualized Tree sample contains 123,456 total nodes, yet is fairly quick to render, because it only constructs nodes that are visible. + For diagrams with many nodes and links that only display a fraction of them at a time, + you could implement some form of virtualization to optimize your diagram. + The Virtualized Tree sample contains 123,456 + total nodes, yet is fairly quick to load and render, because it only constructs nodes + and links that intersect with the viewport. +

        +

        + But this does complicate the implementation of the diagram, because you need to use a + separate model from the Diagram.model and manage adding and removing Nodes and + Links when the viewport changes. + Furthermore layout is more complicated because it needs to work on LayoutVertexes + and LayoutEdges, not on Nodes and Links. +

        +

        + Other virtualization samples are listed at Unlisted Samples.

        Other considerations

        @@ -44,19 +103,18 @@

        Other considerations

        set Diagram.div to null in order for the page to garbage collect the memory.

        - Shadows and animation slow down rendering and can be turned off. LayeredDigraphLayout is the slowest of the layouts. Templates can be simplified to reduce rendering and re-measuring. The number of TextBlocks, the complexity of shapes, gradient Brushes all impact performance slightly, and reducing their use in aggregate may result in a performance gain. -

        - -

        - Depening on your app, it may be worthwhile to selectively toggle off some features (like shadows and animation) or to use simpler templates altogether, when slower environments are present, such as on mobile devices. + Depending on your app, it may be worthwhile to selectively toggle off some features + (like shadows and animation) or to use simpler templates altogether, + when slower environments are present, such as on mobile devices.

        -

        - You can use multiple templates depending on your zoom level. If you are zoomed out far enough (and therefore have a lot of nodes on the screen) you can switch to a simplified template so that rendering (when panning, dragging, etc) is faster. The process of switching templates has a performance cost, though, since Parts have to rebuild themselves. + You can use multiple templates depending on your zoom level. + If you are zoomed out far enough (and therefore have a lot of nodes on the screen) + you can switch to a simplified template so that rendering (when panning, dragging, etc) is faster. + The process of switching templates has a performance cost, though, + since Parts have to rebuild themselves.

        - -
        diff --git a/intro/shapes.html b/intro/shapes.html index fc22b1d16..210aa20d6 100644 --- a/intro/shapes.html +++ b/intro/shapes.html @@ -15,6 +15,10 @@

        Shapes

        Use the Shape class to paint a geometrical figure. You can control what kind of shape is drawn and how it is stroked and filled.

        +

        +Shapes, like TextBlocks and Pictures, are "atomic" objects -- they cannot contain any other objects. +So a Shape will never draw some text or an image. +

        Figures

        @@ -139,7 +143,7 @@

        Geometry

        Geometry objects may be shared by multiple Shapes. Note that there may be no need to specify the GraphObject.desiredSize or GraphObject.width and GraphObject.height, because the Geometry defines its own sizes. -If the size is set or imposed by the containing Panel, the effective geometry is determined by the Shape.geometryStretch property. +If the size is set or if is imposed by the containing Panel, the effective geometry is determined by the Shape.geometryStretch property. Depending on the value of the geometryStretch property, this may result in extra empty space or the clipping of the shape.

        @@ -233,7 +237,7 @@ 

        Custom Figures

        As shown above, one can easily create custom shapes just by setting Shape.geometry or Shape.geometryString. This is particularly convenient when importing SVG. However it is also possible to define additional named figures, which is convenient when you want to be able to easily -change the geometry of an existing Shape, typically by data binding the Shape.figure property. +specify or change the geometry of an existing Shape by setting or data binding the Shape.figure property.

        The static function Shape.defineFigureGenerator can be used to define new figure names. @@ -261,7 +265,7 @@

        Custom Figures

        .add(new go.PathSegment(go.PathSegment.Arc, 270, 90, w - p1, p1, p1, p1)) .add(new go.PathSegment(go.PathSegment.Line, w, h)) .add(new go.PathSegment(go.PathSegment.Line, 0, h).close())); - // don't intersect with two top corners + // don't intersect with two top corners when used in an "Auto" Panel geo.spot1 = new go.Spot(0, 0, 0.3 * p1, 0.3 * p1); geo.spot2 = new go.Spot(1, 1, -0.3 * p1, 0); return geo; @@ -284,7 +288,7 @@

        Custom Figures

        .add(new go.PathSegment(go.PathSegment.Arc, 0, 90, w - p1, h - p1, p1, p1)) .add(new go.PathSegment(go.PathSegment.Line, p1, h)) .add(new go.PathSegment(go.PathSegment.Arc, 90, 90, p1, h - p1, p1, p1).close())); - // don't intersect with two bottom corners + // don't intersect with two bottom corners when used in an "Auto" Panel geo.spot1 = new go.Spot(0, 0, 0.3 * p1, 0); geo.spot2 = new go.Spot(1, 1, -0.3 * p1, -0.3 * p1); return geo; @@ -306,8 +310,12 @@

        Custom Figures

        }, new go.Binding("figure", "fig"), new go.Binding("parameter1", "p1")), - $(go.TextBlock, - new go.Binding("text", "fig")) + $(go.Panel, "Vertical", + $(go.TextBlock, + new go.Binding("text", "fig")), + $(go.TextBlock, { stroke: "blue" }, + new go.Binding("text", "parameter1", function(p1) { return p1; }).ofObject("SHAPE")) + ) ); diagram.model = new go.Model([ diff --git a/intro/tools.html b/intro/tools.html index 1c1db44af..df5e5fa9a 100644 --- a/intro/tools.html +++ b/intro/tools.html @@ -189,6 +189,7 @@

        ResizingTool

        You can limit the minimum and maximum size for the resized object by setting GraphObject.maxSize and GraphObject.minSize. +Note that these GraphObject properties are set on the Part.resizeObject, not on the Part itself.

           diagram.initialContentAlignment = go.Spot.Center;
        @@ -252,7 +253,8 @@ 

        ResizingTool

        For example, to allow the user to only change the width of a Shape in a Node, the Adornment should have only two resize handles: one at the left and one at the right. The Adornment is implemented as a Spot Panel that surrounds a Placeholder, -representing the adorned Shape, with two rectangular blue Shapes, each representing a handle. +representing the adorned Shape, with two rectangular blue Shapes, each representing a handle. +There is also a TextBlock placed above the adorned shape showing the shape's current width.

           diagram.initialContentAlignment = go.Spot.Center;
        @@ -262,12 +264,19 @@ 

        ResizingTool

        resizeAdornmentTemplate: // specify what resize handles there are and how they look $(go.Adornment, "Spot", $(go.Placeholder), // takes size and position of adorned object - $(go.Shape, // left resize handle + $(go.Shape, "Circle", // left resize handle { alignment: go.Spot.Left, cursor: "col-resize", - desiredSize: new go.Size(6, 6), fill: "lightblue", stroke: "dodgerblue" }), - $(go.Shape, // right resize handle + desiredSize: new go.Size(9, 9), fill: "lightblue", stroke: "dodgerblue" }), + $(go.Shape, "Circle", // right resize handle { alignment: go.Spot.Right, cursor: "col-resize", - desiredSize: new go.Size(6, 6), fill: "lightblue", stroke: "dodgerblue" })), + desiredSize: new go.Size(9, 9), fill: "lightblue", stroke: "dodgerblue" }), + $(go.TextBlock, // show the width as text + { alignment: go.Spot.Top, alignmentFocus: new go.Spot(0.5, 1, 0, -2), + stroke: "dodgerblue" }, + new go.Binding("text", "adornedObject", + function(shp) { return shp.naturalBounds.width.toFixed(0); }) + .ofObject()) + ), selectionAdorned: false }, // don't show selection Adornment, a rectangle $(go.Shape, "RoundedRectangle", { name: "SHAPE", fill: "orange", width: 50, height: 30, @@ -280,6 +289,12 @@

        ResizingTool

        Note also that because Part.selectionAdorned is false, there is no blue rectangle default selection adornment.

        +

        +There are examples custom resizing tools defined in the samples and extensions directories: +Resize Multiple Tool (in Floor Plan Editor), +Lane Resizing Tool (in Swim Lanes), and +Lane Resizing Tool (in Swim Lanes Vertical). +

        RotatingTool

        @@ -368,6 +383,12 @@

        RotatingTool

        diagram.commandHandler.selectAll();
        +

        +There are examples custom rotating tools defined in the samples and extensions directories: +Rotate Multiple Tool (in Floor Plan Editor), +Top Rotating Tool (in Draggable Link), and +Horizontal Text Rotating Tool (in Seating Chart). +

        RelinkingTool

        @@ -505,6 +526,13 @@

        LinkReshapingTool

        At the current time they cannot be customized by setting a property on the Link. Also at the current time resegmenting is not supported on Bezier-curved links.

        +

        +If you want your users to be able to reshape Shape geometries that are not Link paths, +there is the Geometry Reshaping Tool +used by the Polygon Drawing and +Freehand Drawing samples in the extensions directory. +It is defined in a separate JS file that you can load into your app. +

        Tools and Tool Parts

        @@ -550,6 +578,13 @@

        DragSelectingTool

        Finally note also that the box is not an Adornment because it does not "adorn" any Part. It is just an unbound Part that is used temporarily by the DragSelectingTool.

        +

        +There are examples of in-the-background-dragging tools defined in the extensions directory: +Realtime Drag Selecting Tool, +Drag Creating Tool, and +Drag Zooming Tool. +Each is defined in a separate JS file that you can load into your app. +

        LinkingTool and RelinkingTool

        @@ -619,6 +654,12 @@

        LinkingTool and RelinkingTool

        If your app also supports relinking you will probably want to do the same customizations on the RelinkingTool.

        +

        +There are examples of linking tools defined in the samples and extensions directories: +Polyline Linking Tool, +Messaging Tool (in Sequence Diagram), and +Custom Linking Tool (in Grafcet Diagram) +

        diff --git a/release/go-debug.js b/release/go-debug.js index 7e2e2b630..c0b11614f 100644 --- a/release/go-debug.js +++ b/release/go-debug.js @@ -1,1418 +1,1347 @@ /* - * GoJS v1.5.3 JavaScript Library for HTML Canvas Diagrams + * GoJS v1.5.4 JavaScript Library for HTML Diagrams * Northwoods Software, http://www.nwoods.com/ * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation. * Copyright (C) 1998-2015 by Northwoods Software Corporation. All Rights Reserved. - * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: http://www.gojs.net/1.5.3/doc/license.html. + * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: http://www.gojs.net/1.5.4/doc/license.html. */ -(function(window) { var e,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(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c=a.length?a.push(c):a.splice(b,0,c):w.m("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Vi:function(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):w.m("Cannot remove an object from an HTMLCollection or NodeList at "+b)},ky:[],P:function(){var a=w.ky.pop();return void 0===a?new I:a},nc:function(a,b){var c=w.ky.pop();if(void 0===c)return new I(a,b);c.x=a;c.y=b;return c},B:function(a){w.ky.push(a)},eC:[],Ul:function(){var a=w.eC.pop();return void 0=== -a?new na:a},sk:function(a){w.eC.push(a)},ly:[],ig:function(){var a=w.ly.pop();return void 0===a?new x:a},yk:function(a,b,c,d){var f=w.ly.pop();if(void 0===f)return new x(a,b,c,d);f.x=a;f.y=b;f.width=c;f.height=d;return f},tc:function(a){w.ly.push(a)},fC:[],yh:function(){var a=w.fC.pop();return void 0===a?new oa:a},mf:function(a){w.fC.push(a)},my:null,u:function(){var a=w.my;return null!==a?(w.my=null,a):new qa},v:function(a){a.reset();w.my=a},dC:[],rb:function(){var a=w.dC.pop();return void 0===a? -[]:a},Aa:function(a){a.length=0;w.dC.push(a)},zh:Object.freeze([]),gC:1,oc:function(a){a.__gohashid=w.gC++},Jt:function(a){var b=a.__gohashid;void 0===b&&(b=w.gC++,a.__gohashid=b);return b},cd:function(a){return a.__gohashid},g:function(a,b,c){"name"!==b&&"length"!==b&&(a[b]=c)},ma:function(a,b){b.vy=a;aa[a]=b},Na:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},$h:function(a){a.SH=!0},defineProperty:function(a,b,c,d,f){w.h(a,"function","Util.defineProperty:classfunc"); -w.h(b,"object","Util.defineProperty:propobj");w.h(c,"function","Util.defineProperty:getter");w.h(d,"function","Util.defineProperty:setter");for(var g in b){var h=b[g];b={get:c,set:d};if(void 0!==f)for(var k in f)b[k]=f[k];Object.defineProperty(a.prototype,g,b);f=Object.getOwnPropertyDescriptor(a.prototype,g);h&&f&&Object.defineProperty(a.prototype,h,f);if(t&&h){var l=h.charAt(0).toUpperCase()+h.slice(1);h===l&&w.m('Defining capitalized property "'+l+'"!?');Object.defineProperty(a.prototype,l,{get:function(){w.MA|| -w.NA||w.trace('Getting the property "'+l+'" is probably not what you intended: it is capitalized but should be spelled "'+h+'"')},set:function(){w.m('Setting the property "'+l+'" is probably not what you intended: it is capitalized but should be spelled "'+h+'"')}})}break}},A:function(a,b,c,d){w.h(a,"function","Util.defineReadOnlyProperty:classfunc");w.h(b,"object","Util.defineReadOnlyProperty:propobj");w.h(c,"function","Util.defineReadOnlyProperty:getter");for(var f in b){var g=b[f];b={get:c,set:function(a){w.m('The property "'+ -g+'" is read-only and cannot be set to '+a)}};if(void 0!==d)for(var h in d)b[h]=d[h];Object.defineProperty(a.prototype,f,b);d=Object.getOwnPropertyDescriptor(a.prototype,f);g&&d&&Object.defineProperty(a.prototype,g,d);if(t&&g){var k=g.charAt(0).toUpperCase()+g.slice(1);Object.defineProperty(a.prototype,k,{get:function(){w.MA||w.NA||w.trace('Getting the property "'+k+'" is probably not what you intended: it is capitalized but should be spelled "'+g+'"')},set:function(){w.m('Setting the read-only property "'+ -k+'" is probably not what you intended: it is capitalized but should be spelled "'+g+'", and cannot be set anyway')}})}break}},ke:function(a,b){for(var c in b)b[c]=!0;a.prototype.AD=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?w.Jg(a):null===a?"*":""},Jg:function(a){if("function"===typeof a){if(a.vy)return a.vy;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9,c).trim();if(""!==b)return a.vy=b}else if("object"===typeof a&&a.constructor)return w.Jg(a.constructor); -return typeof a},w:function(a,b,c){w.h(a,"function","Util.defineEnumValue:classfunc");w.h(b,"string","Util.defineEnumValue:name");w.h(c,"number","Util.defineEnumValue:num");c=new ia(a,b,c);Object.freeze(c);a[b]=c;var d=a.Fu;d instanceof ra||(d=new ra("string",ia),a.Fu=d);d.add(b,c);return c},Cb: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){t&&w.trace("property get error: "+ -d.toString())}return c},Xa: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){t&&w.trace("property set error: "+d.toString())}},tu:function(a,b){w.h(a,"object","Setting properties requires Objects as arguments");w.h(b,"object","Setting properties requires Objects as arguments");var c=t;null===c&&(t=w);var d=a instanceof G,f=a instanceof y,g;for(g in b){""===g&&w.m("Setting properties requires non-empty property names");var h= -a,k=g;if(d||f){var l=g.indexOf(".");if(0=d.length)){var f=w.Cb(b,d);null===f||"function"=== -typeof f||w.jx(b,d)||(""===c&&(c=b+"\n"),c+=' unknown property "'+d+'" has value: '+f+" at "+a+"\n")}return c},Hw:function(a,b){if(null!==b&&"number"!==typeof b&&"string"!==typeof b&&"boolean"!==typeof b&&"function"!==typeof b)if(void 0!==w.cd(b)){if(!w.ew.contains(b))if(w.ew.add(b),w.Mv.add(w.zE(a,b)),b instanceof J||b instanceof K||b instanceof ra)for(var c=b.k;c.next();)w.Hw(a+"["+c.key+"]",c.value);else for(c in b){var d=w.Cb(b,c);if(void 0!==d&&null!==d&&w.ab(d)&&d!==b.AD){if(b instanceof va){if(d=== -b.Cj)continue}else if(b instanceof G){if("data"===c||d===b.Dh)continue;if("itemArray"===c||d===b.Ai)continue;if(b instanceof z&&d===b.fl)continue}else if(!(b instanceof y))if(b instanceof wa){if("archetypeGroupData"===c||d===b.py)continue}else if(b instanceof ya){if("archetypeLinkData"===c||d===b.sy)continue;if("archetypeLabelNodeData"===c||d===b.qy)continue}else if(b instanceof za){if("archetypeNodeData"===c||d===b.Nk)continue}else if(b instanceof L){if("nodeDataArray"===c||d===b.Af)continue;if("linkDataArray"=== -c||d===b.Oh||d===b.tm)continue;if(d===b.Dc)continue;if(d===b.ng)continue}else if(b instanceof Ba||b instanceof Ca||b instanceof Ea)continue;w.Hw(a+"."+c,d)}}}else if(Array.isArray(b))for(c=0;cc;c++)b[c]=c;for(var d=0,f=0,c=0;256>c;c++)d=(d+b[c]+119)%256,f=b[c],b[c]=b[d],b[d]=f; -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=[],f=0,c=0;cd;d++)b[w.Ma("7ca11abfd7330390")](w.Ma(c[d-1]),10,15*d+0);b[w.Ma("7ca11abfd022028846")]=w.Ma("39f046ebb36e4b");for(d=1;5>d;d++)b[w.Ma("7ca11abfd7330390")](w.Ma(c[d- -1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])w.w=function(a,b){var c=new ia(a,b,2);Object.freeze(c);a[b]=c;var d=a.Fu;d instanceof ra||(d=new ra("string",ia),a.Fu=d);d.add(b,c);return c};return a}();function ia(a,b,c){w.oc(this);this.nC=a;this.ec=b;this.XH=c}ia.prototype.toString=function(){return w.Jg(this.nC)+"."+this.ec};w.A(ia,{Pe:"classType"},function(){return this.nC});w.A(ia,{name:"name"},function(){return this.ec});w.A(ia,{value:"value"},function(){return this.XH});var Ga; -ia.findName=Ga=function(a,b){if(null===b||""===b)return null;w.h(a,"function","findName:classfunc");w.h(b,"string","EnumValue.findName:name");var c=a.Fu;return c instanceof ra?c.Da(b):null};function Fa(){this.mC=[]}Fa.prototype.toString=function(){return this.mC.join("")};Fa.prototype.add=function(a){""!==a&&this.mC.push(a)};function ua(){} -function Ia(a){void 0===a&&(a=42);this.seed=a;this.ay=48271;this.Eu=2147483647;this.aC=this.Eu/this.ay;this.AH=this.Eu%this.ay;this.wH=1/this.Eu;this.random()}Ia.prototype.random=function(){var a=this.seed%this.aC*this.ay-this.seed/this.aC*this.AH;this.seed=0a||a>=b.length)&&w.ka(a,"0 <= i < length",J,"elt:i");return b[a]}; -J.prototype.setElt=J.prototype.set=J.prototype.Wg=function(a,b){t&&(this.$g(b),w.p(a,J,"setElt:i"));var c=this.q;(0>a||a>=c.length)&&w.ka(a,"0 <= i < length",J,"setElt:i");w.K(this,a);c[a]=b};J.prototype.first=J.prototype.first=function(){var a=this.q;return 0===a.length?null:a[0]};J.prototype.last=J.prototype.Vd=function(){var a=this.q,b=a.length;return 0a&&w.ka(a,">= 0",J,"insertAt:i");w.K(this,a);var c=this.q;a>=c.length?c.push(b):c.splice(a,0,b);this.fe();return!0};J.prototype.remove=J.prototype["delete"]=J.prototype.remove=function(a){if(null===a)return!1;t&&this.$g(a);w.K(this,a);var b=this.q;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.fe();return!0}; -J.prototype.removeAt=J.prototype.vd=function(a){t&&w.p(a,J,"removeAt:i");var b=this.q;(0>a||a>=b.length)&&w.ka(a,"0 <= i < length",J,"removeAt:i");w.K(this,a);a===b.length-1?b.pop():b.splice(a,1);this.fe()}; -J.prototype.removeRange=J.prototype.removeRange=function(a,b){t&&(w.p(a,J,"removeRange:from"),w.p(b,J,"removeRange:to"));var c=this.q;(0>a||a>=c.length)&&w.ka(a,"0 <= from < length",J,"elt:from");(0>b||b>=c.length)&&w.ka(b,"0 <= to < length",J,"elt:to");w.K(this,a);var d=c.slice((b||a)+1||c.length);c.length=0>a?c.length+a:a;c.push.apply(c,d);this.fe()};J.prototype.copy=function(){for(var a=new J(this.ja),b=this.q,c=this.count,d=0;d=g)return this;(0>b||b>=f-1)&&w.ka(b,"0 <= from < length",J,"sortRange:from");if(2===g)return c=d[b],f=d[b+1],0=f)d.sort(a);else for(g=d.slice(0,c),g.sort(a),a=0;a=f)for(g=d.slice(b),g.sort(a), -a=b;a=this.q.length)return Na;var a=this.Nd;return null!==a?(a.reset(),a):new Ra(this)}); -w.A(J,{qn:"iteratorBackwards"},function(){if(0>=this.q.length)return Na;var a=this.xo;return null!==a?(a.reset(),a):new Sa(this)});function Ta(a){this.kl=a;this.reset()}w.ke(Ta,{key:!0,value:!0});w.A(Ta,{k:"iterator"},function(){return this});Ta.prototype.reset=Ta.prototype.reset=function(){var a=this.kl;a.Nd=null;this.hb=a.aa;this.Lb=null}; -Ta.prototype.next=Ta.prototype.hasNext=Ta.prototype.next=function(){var a=this.kl;a.aa!==this.hb&&w.Wb(a);var b=this.Lb,b=null===b?a.lb:b.ac;if(null!==b)return this.Lb=b,this.value=b.value,this.key=b.key,!0;this.og();return!1};Ta.prototype.first=Ta.prototype.first=function(){var a=this.kl;this.hb=a.aa;a=a.lb;if(null!==a){this.Lb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; -Ta.prototype.any=function(a){var b=this.kl;b.Nd=null;var c=b.aa;this.Lb=null;for(var d=b.lb;null!==d;){if(a(d.value))return!0;b.aa!==c&&w.Wb(b);d=d.ac}return!1};Ta.prototype.all=function(a){var b=this.kl;b.Nd=null;var c=b.aa;this.Lb=null;for(var d=b.lb;null!==d;){if(!a(d.value))return!1;b.aa!==c&&w.Wb(b);d=d.ac}return!0};Ta.prototype.each=function(a){var b=this.kl;b.Nd=null;var c=b.aa;this.Lb=null;for(var d=b.lb;null!==d;)a(d.value),b.aa!==c&&w.Wb(b),d=d.ac};w.A(Ta,{count:"count"},function(){return this.kl.jd}); -Ta.prototype.og=function(){this.value=this.key=null;this.hb=-1;this.kl.Nd=this};Ta.prototype.toString=function(){return null!==this.Lb?"SetIterator@"+this.Lb.value:"SetIterator"}; -function K(a){w.oc(this);this.Ua=!1;void 0===a||null===a?this.ja=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ja=a:w.ka(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.ja=a===Object?"object":a===String?"string":a===Number?"number":a:w.ka(a,"null, a primitive type name, or a class type","Set constructor: type");this.kd={};this.jd=0;this.Nd=null;this.aa=0;this.Nh=this.lb=null}w.ma("Set",K); -K.prototype.$g=function(a){null!==this.ja&&("string"===typeof this.ja?typeof a===this.ja&&null!==a||w.xc(a,this.ja):a instanceof this.ja||w.xc(a,this.ja))};K.prototype.fe=function(){var a=this.aa;a++;999999999=this.jd)return Na;var a=this.Nd;return null!==a?(a.reset(),a):new Ta(this)});function Xa(a){this.gb=a;this.reset()}w.ke(Xa,{key:!0,value:!0});w.A(Xa,{k:"iterator"},function(){return this});Xa.prototype.reset=Xa.prototype.reset=function(){this.hb=this.gb.aa;this.Lb=null}; -Xa.prototype.next=Xa.prototype.hasNext=Xa.prototype.next=function(){var a=this.gb;a.aa!==this.hb&&w.Wb(a);var b=this.Lb,b=null===b?a.lb:b.ac;if(null!==b)return this.Lb=b,this.value=this.key=a=b.key,!0;this.og();return!1};Xa.prototype.first=Xa.prototype.first=function(){var a=this.gb;this.hb=a.aa;a=a.lb;return null!==a?(this.Lb=a,this.value=this.key=a=a.key):null};Xa.prototype.any=function(a){var b=this.gb,c=b.aa;this.Lb=null;for(var d=b.lb;null!==d;){if(a(d.key))return!0;b.aa!==c&&w.Wb(b);d=d.ac}return!1}; -Xa.prototype.all=function(a){var b=this.gb,c=b.aa;this.Lb=null;for(var d=b.lb;null!==d;){if(!a(d.key))return!1;b.aa!==c&&w.Wb(b);d=d.ac}return!0};Xa.prototype.each=function(a){var b=this.gb,c=b.aa;this.Lb=null;for(var d=b.lb;null!==d;)a(d.key),b.aa!==c&&w.Wb(b),d=d.ac};w.A(Xa,{count:"count"},function(){return this.gb.jd});Xa.prototype.og=function(){this.value=this.key=null;this.hb=-1};Xa.prototype.toString=function(){return null!==this.Lb?"MapKeySetIterator@"+this.Lb.value:"MapKeySetIterator"}; -function Ya(a){w.oc(this);this.Ua=!0;this.gb=a}w.Na(Ya,K);Ya.prototype.freeze=function(){return this};Ya.prototype.Sa=function(){return this};Ya.prototype.toString=function(){return"MapKeySet("+this.gb.toString()+")"};Ya.prototype.add=Ya.prototype.set=Ya.prototype.add=function(){w.m("This Set is read-only: "+this.toString());return!1};Ya.prototype.contains=Ya.prototype.has=Ya.prototype.contains=function(a){return this.gb.contains(a)}; -Ya.prototype.remove=Ya.prototype["delete"]=Ya.prototype.remove=function(){w.m("This Set is read-only: "+this.toString());return!1};Ya.prototype.clear=Ya.prototype.clear=function(){w.m("This Set is read-only: "+this.toString())};Ya.prototype.first=Ya.prototype.first=function(){var a=this.gb.lb;return null!==a?a.key:null};Ya.prototype.any=function(a){for(var b=this.gb.lb;null!==b;){if(a(b.key))return!0;b=b.ac}return!1}; -Ya.prototype.all=function(a){for(var b=this.gb.lb;null!==b;){if(!a(b.key))return!1;b=b.ac}return!0};Ya.prototype.each=function(a){for(var b=this.gb.lb;null!==b;)a(b.key),b=b.ac};Ya.prototype.copy=function(){return new Ya(this.gb)};Ya.prototype.toSet=function(){var a=new K(this.gb.Mh),b=this.gb.kd,c;for(c in b)a.add(b[c].key);return a};Ya.prototype.toArray=Ya.prototype.bf=function(){var a=this.gb.kd,b=Array(this.gb.jd),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; -Ya.prototype.toList=function(){var a=new J(this.ja),b=this.gb.kd,c;for(c in b)a.add(b[c].key);return a};w.A(Ya,{count:"count"},function(){return this.gb.jd});w.A(Ya,{size:"size"},function(){return this.gb.jd});w.A(Ya,{k:"iterator"},function(){return 0>=this.gb.jd?Na:new Xa(this.gb)});function $a(a){this.gb=a;this.reset()}w.ke($a,{key:!0,value:!0});w.A($a,{k:"iterator"},function(){return this});$a.prototype.reset=$a.prototype.reset=function(){var a=this.gb;a.yo=null;this.hb=a.aa;this.Lb=null}; -$a.prototype.next=$a.prototype.hasNext=$a.prototype.next=function(){var a=this.gb;a.aa!==this.hb&&w.Wb(a);var b=this.Lb,b=null===b?a.lb:b.ac;if(null!==b)return this.Lb=b,this.value=b.value,this.key=b.key,!0;this.og();return!1};$a.prototype.first=$a.prototype.first=function(){var a=this.gb;this.hb=a.aa;a=a.lb;if(null!==a){this.Lb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; -$a.prototype.any=function(a){var b=this.gb;b.yo=null;var c=b.aa;this.Lb=null;for(var d=b.lb;null!==d;){if(a(d.value))return!0;b.aa!==c&&w.Wb(b);d=d.ac}return!1};$a.prototype.all=function(a){var b=this.gb;b.yo=null;var c=b.aa;this.Lb=null;for(var d=b.lb;null!==d;){if(!a(d.value))return!1;b.aa!==c&&w.Wb(b);d=d.ac}return!0};$a.prototype.each=function(a){var b=this.gb;b.yo=null;var c=b.aa;this.Lb=null;for(var d=b.lb;null!==d;)a(d.value),b.aa!==c&&w.Wb(b),d=d.ac};w.A($a,{count:"count"},function(){return this.gb.jd}); -$a.prototype.og=function(){this.value=this.key=null;this.hb=-1;this.gb.yo=this};$a.prototype.toString=function(){return null!==this.Lb?"MapValueSetIterator@"+this.Lb.value:"MapValueSetIterator"};function Ua(a,b){this.key=a;this.value=b;this.Fo=this.ac=null}w.ke(Ua,{key:!0,value:!0});Ua.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};function ab(a){this.gb=a;this.reset()}w.ke(ab,{key:!0,value:!0});w.A(ab,{k:"iterator"},function(){return this}); -ab.prototype.reset=ab.prototype.reset=function(){var a=this.gb;a.Nd=null;this.hb=a.aa;this.Lb=null};ab.prototype.next=ab.prototype.hasNext=ab.prototype.next=function(){var a=this.gb;a.aa!==this.hb&&w.Wb(a);var b=this.Lb,b=null===b?a.lb:b.ac;if(null!==b)return this.Lb=b,this.key=b.key,this.value=b.value,!0;this.og();return!1};ab.prototype.first=ab.prototype.first=function(){var a=this.gb;this.hb=a.aa;a=a.lb;return null!==a?(this.Lb=a,this.key=a.key,this.value=a.value,a):null}; -ab.prototype.any=function(a){var b=this.gb;b.Nd=null;var c=b.aa;this.Lb=null;for(var d=b.lb;null!==d;){if(a(d))return!0;b.aa!==c&&w.Wb(b);d=d.ac}return!1};ab.prototype.all=function(a){var b=this.gb;b.Nd=null;var c=b.aa;this.Lb=null;for(var d=b.lb;null!==d;){if(!a(d))return!1;b.aa!==c&&w.Wb(b);d=d.ac}return!0};ab.prototype.each=function(a){var b=this.gb;b.Nd=null;var c=b.aa;this.Lb=null;for(var d=b.lb;null!==d;)a(d),b.aa!==c&&w.Wb(b),d=d.ac};w.A(ab,{count:"count"},function(){return this.gb.jd}); -ab.prototype.og=function(){this.value=this.key=null;this.hb=-1;this.gb.Nd=this};ab.prototype.toString=function(){return null!==this.Lb?"MapIterator@"+this.Lb:"MapIterator"}; -function ra(a,b){w.oc(this);this.Ua=!1;void 0===a||null===a?this.Mh=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.Mh=a:w.ka(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.Mh=a===Object?"object":a===String?"string":a===Number?"number":a:w.ka(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.Qi=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"=== -b||"function"===b?this.Qi=b:w.ka(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.Qi=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:w.ka(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.kd={};this.jd=0;this.yo=this.Nd=null;this.aa=0;this.Nh=this.lb=null}w.ma("Map",ra); -function bb(a,b){null!==a.Mh&&("string"===typeof a.Mh?typeof b===a.Mh&&null!==b||w.xc(b,a.Mh):b instanceof a.Mh||w.xc(b,a.Mh))}ra.prototype.fe=function(){var a=this.aa;a++;999999999=this.count)return Na;var a=this.Nd;return null!==a?(a.reset(),a):new ab(this)});w.A(ra,{UK:"iteratorKeys"},function(){return 0>=this.count?Na:new Xa(this)});w.A(ra,{TF:"iteratorValues"},function(){if(0>=this.count)return Na;var a=this.yo;return null!==a?(a.reset(),a):new $a(this)});function I(a,b){void 0===a?this.N=this.M=0:"number"===typeof a&&"number"===typeof b?(this.M=a,this.N=b):w.m("Invalid arguments to Point constructor");this.Ua=!1}w.ma("Point",I);w.$h(I); -w.ke(I,{x:!0,y:!0});I.prototype.assign=function(a){this.M=a.M;this.N=a.N};I.prototype.setTo=I.prototype.o=function(a,b){t&&(w.h(a,"number",I,"setTo:x"),w.h(b,"number",I,"setTo:y"));this.M=a;this.N=b;return this};I.prototype.set=I.prototype.set=function(a){t&&w.l(a,I,I,"set:p");w.K(this);this.M=a.M;this.N=a.N;return this};I.prototype.copy=function(){var a=new I;a.M=this.M;a.N=this.N;return a};I.prototype.Qa=function(){this.Ua=!0;Object.freeze(this);return this}; -I.prototype.ea=function(){return Object.isFrozen(this)?this:this.copy().freeze()};I.prototype.freeze=function(){this.Ua=!0;return this};I.prototype.Sa=function(){Object.isFrozen(this)&&w.m("cannot thaw constant: "+this);this.Ua=!1;return this};I.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 f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));return new I(c,f)}return new I}; -I.stringify=function(a){return a instanceof I?a.x.toString()+" "+a.y.toString():a.toString()};I.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};I.prototype.equals=I.prototype.O=function(a){return a instanceof I?this.M===a.x&&this.N===a.y:!1};I.prototype.equalTo=I.prototype.Yw=function(a,b){return this.M===a&&this.N===b};I.prototype.equalsApprox=I.prototype.Ue=function(a){return M.I(this.M,a.x)&&M.I(this.N,a.y)}; -I.prototype.add=I.prototype.add=function(a){t&&w.l(a,I,I,"add:p");w.K(this);this.M+=a.x;this.N+=a.y;return this};I.prototype.subtract=I.prototype.xu=function(a){t&&w.l(a,I,I,"subtract:p");w.K(this);this.M-=a.x;this.N-=a.y;return this};I.prototype.offset=I.prototype.offset=function(a,b){t&&(w.p(a,I,"offset:dx"),w.p(b,I,"offset:dy"));w.K(this);this.M+=a;this.N+=b;return this}; -I.prototype.rotate=I.prototype.rotate=function(a){t&&w.p(a,I,"rotate:angle");w.K(this);if(0===a)return this;var b=this.M,c=this.N;if(0===b&&0===c)return this;var d=0,f=0;90===a?(d=0,f=1):180===a?(d=-1,f=0):270===a?(d=0,f=-1):(a=a*Math.PI/180,d=Math.cos(a),f=Math.sin(a));this.M=d*b-f*c;this.N=f*b+d*c;return this};I.prototype.scale=I.prototype.scale=function(a,b){t&&(w.p(a,I,"scale:sx"),w.p(b,I,"scale:sy"));this.M*=a;this.N*=b;return this}; -I.prototype.distanceSquaredPoint=I.prototype.nk=function(a){t&&w.l(a,I,I,"distanceSquaredPoint:p");var b=a.x-this.M;a=a.y-this.N;return b*b+a*a};I.prototype.distanceSquared=I.prototype.At=function(a,b){t&&(w.p(a,I,"distanceSquared:px"),w.p(b,I,"distanceSquared:py"));var c=a-this.M,d=b-this.N;return c*c+d*d};I.prototype.normalize=I.prototype.normalize=function(){w.K(this);var a=this.M,b=this.N,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} -I.prototype.projectOntoLineSegment=function(a,b,c,d){t&&(w.p(a,I,"projectOntoLineSegment:px"),w.p(b,I,"projectOntoLineSegment:py"),w.p(c,I,"projectOntoLineSegment:qx"),w.p(d,I,"projectOntoLineSegment:qy"));M.vn(a,b,c,d,this.M,this.N,this);return this};I.prototype.projectOntoLineSegmentPoint=function(a,b){t&&(w.l(a,I,I,"projectOntoLineSegmentPoint:p"),w.l(b,I,I,"projectOntoLineSegmentPoint:q"));M.vn(a.x,a.y,b.x,b.y,this.M,this.N,this);return this}; -I.prototype.snapToGrid=function(a,b,c,d){t&&(w.p(a,I,"snapToGrid:originx"),w.p(b,I,"snapToGrid:originy"),w.p(c,I,"snapToGrid:cellwidth"),w.p(d,I,"snapToGrid:cellheight"));M.Dt(this.M,this.N,a,b,c,d,this);return this};I.prototype.snapToGridPoint=function(a,b){t&&(w.l(a,I,I,"snapToGridPoint:p"),w.l(b,na,I,"snapToGridPoint:q"));M.Dt(this.M,this.N,a.x,a.y,b.width,b.height,this);return this}; -I.prototype.setRectSpot=I.prototype.uu=function(a,b){t&&(w.l(a,x,I,"setRectSpot:r"),w.l(b,P,I,"setRectSpot:spot"));w.K(this);this.M=a.x+b.x*a.width+b.offsetX;this.N=a.y+b.y*a.height+b.offsetY;return this}; -I.prototype.setSpot=I.prototype.vu=function(a,b,c,d,f){t&&(w.p(a,I,"setSpot:x"),w.p(b,I,"setSpot:y"),w.p(c,I,"setSpot:w"),w.p(d,I,"setSpot:h"),(0>c||0>d)&&w.m("Point.setSpot:Width and height cannot be negative"),w.l(f,P,I,"setSpot:spot"));w.K(this);this.M=a+f.x*c+f.offsetX;this.N=b+f.y*d+f.offsetY;return this};I.prototype.transform=function(a){t&&w.l(a,oa,I,"transform:t");a.kb(this);return this};function eb(a,b){t&&w.l(b,oa,I,"transformInverted:t");b.di(a);return a}var hb; -I.distanceLineSegmentSquared=hb=function(a,b,c,d,f,g){t&&(w.p(a,I,"distanceLineSegmentSquared:px"),w.p(b,I,"distanceLineSegmentSquared:py"),w.p(c,I,"distanceLineSegmentSquared:ax"),w.p(d,I,"distanceLineSegmentSquared:ay"),w.p(f,I,"distanceLineSegmentSquared:bx"),w.p(g,I,"distanceLineSegmentSquared:by"));var h=f-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=f-a,k=g-b,Math.min(c*c+d*d,h*h+k*k);a=h*d-k*c;return a*a/l};var ib; -I.distanceSquared=ib=function(a,b,c,d){t&&(w.p(a,I,"distanceSquared:px"),w.p(b,I,"distanceSquared:py"),w.p(c,I,"distanceSquared:qx"),w.p(d,I,"distanceSquared:qy"));a=c-a;b=d-b;return a*a+b*b};var nb; -I.direction=nb=function(a,b,c,d){t&&(w.p(a,I,"direction:px"),w.p(b,I,"direction:py"),w.p(c,I,"direction:qx"),w.p(d,I,"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};w.g(I,"x",I.prototype.x);w.defineProperty(I,{x:"x"},function(){return this.M},function(a){w.K(this,a);t&&w.h(a,"number",I,"x");this.M=a});w.g(I,"y",I.prototype.y); -w.defineProperty(I,{y:"y"},function(){return this.N},function(a){w.K(this,a);t&&w.h(a,"number",I,"y");this.N=a});I.prototype.isReal=I.prototype.J=function(){return isFinite(this.x)&&isFinite(this.y)};function na(a,b){void 0===a?this.Ea=this.Fa=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.Fa=a,this.Ea=b):w.m("Invalid arguments to Size constructor");this.Ua=!1}w.ma("Size",na);w.$h(na);w.ke(na,{width:!0,height:!0}); -na.prototype.assign=function(a){this.Fa=a.Fa;this.Ea=a.Ea};na.prototype.setTo=na.prototype.o=function(a,b){t&&(w.h(a,"number",na,"setTo:w"),w.h(b,"number",na,"setTo:h"),0>a&&w.ka(a,">= 0",na,"setTo:w"),0>b&&w.ka(b,">= 0",na,"setTo:h"));this.Fa=a;this.Ea=b;return this};na.prototype.set=na.prototype.set=function(a){t&&w.l(a,na,na,"set:s");w.K(this);this.Fa=a.Fa;this.Ea=a.Ea;return this};na.prototype.copy=function(){var a=new na;a.Fa=this.Fa;a.Ea=this.Ea;return a}; -na.prototype.Qa=function(){this.Ua=!0;Object.freeze(this);return this};na.prototype.ea=function(){return Object.isFrozen(this)?this:this.copy().freeze()};na.prototype.freeze=function(){this.Ua=!0;return this};na.prototype.Sa=function(){Object.isFrozen(this)&&w.m("cannot thaw constant: "+this);this.Ua=!1;return this}; -na.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 f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));return new na(c,f)}return new na};na.stringify=function(a){return a instanceof na?a.width.toString()+" "+a.height.toString():a.toString()};na.prototype.toString=function(){return"Size("+this.width+","+this.height+")"}; -na.prototype.equals=na.prototype.O=function(a){return a instanceof na?this.Fa===a.width&&this.Ea===a.height:!1};na.prototype.equalTo=na.prototype.Yw=function(a,b){return this.Fa===a&&this.Ea===b};na.prototype.equalsApprox=na.prototype.Ue=function(a){return M.I(this.Fa,a.width)&&M.I(this.Ea,a.height)};w.g(na,"width",na.prototype.width);w.defineProperty(na,{width:"width"},function(){return this.Fa},function(a){w.K(this,a);t&&w.h(a,"number",na,"width");0>a&&w.ka(a,">= 0",na,"width");this.Fa=a}); -w.g(na,"height",na.prototype.height);w.defineProperty(na,{height:"height"},function(){return this.Ea},function(a){w.K(this,a);t&&w.h(a,"number",na,"height");0>a&&w.ka(a,">= 0",na,"height");this.Ea=a});na.prototype.isReal=na.prototype.J=function(){return isFinite(this.width)&&isFinite(this.height)}; -function x(a,b,c,d){void 0===a?this.Ea=this.Fa=this.N=this.M=0:a instanceof I?b instanceof I?(this.M=Math.min(a.M,b.M),this.N=Math.min(a.N,b.N),this.Fa=Math.abs(a.M-b.M),this.Ea=Math.abs(a.N-b.N)):b instanceof na?(this.M=a.M,this.N=a.N,this.Fa=b.Fa,this.Ea=b.Ea):w.m("Incorrect arguments supplied"):"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.M=a,this.N=b,this.Fa=c,this.Ea=d):w.m("Invalid arguments to Rect constructor"); -this.Ua=!1}w.ma("Rect",x);w.$h(x);w.ke(x,{x:!0,y:!0,width:!0,height:!0});x.prototype.assign=function(a){this.M=a.M;this.N=a.N;this.Fa=a.Fa;this.Ea=a.Ea};function ob(a,b,c){a.Fa=b;a.Ea=c}x.prototype.setTo=x.prototype.o=function(a,b,c,d){t&&(w.h(a,"number",x,"setTo:x"),w.h(b,"number",x,"setTo:y"),w.h(c,"number",x,"setTo:w"),w.h(d,"number",x,"setTo:h"),0>c&&w.ka(c,">= 0",x,"setTo:w"),0>d&&w.ka(d,">= 0",x,"setTo:h"));this.M=a;this.N=b;this.Fa=c;this.Ea=d;return this}; -x.prototype.set=x.prototype.set=function(a){t&&w.l(a,x,x,"set:r");w.K(this);this.M=a.M;this.N=a.N;this.Fa=a.Fa;this.Ea=a.Ea;return this};x.prototype.setPoint=x.prototype.Nf=function(a){t&&w.l(a,I,x,"setPoint:p");w.K(this);this.M=a.M;this.N=a.N;return this};x.prototype.setSize=function(a){t&&w.l(a,na,x,"setSize:s");w.K(this);this.Fa=a.Fa;this.Ea=a.Ea;return this};x.prototype.copy=function(){var a=new x;a.M=this.M;a.N=this.N;a.Fa=this.Fa;a.Ea=this.Ea;return a}; -x.prototype.Qa=function(){this.Ua=!0;Object.freeze(this);return this};x.prototype.ea=function(){return Object.isFrozen(this)?this:this.copy().freeze()};x.prototype.freeze=function(){this.Ua=!0;return this};x.prototype.Sa=function(){Object.isFrozen(this)&&w.m("cannot thaw constant: "+this);this.Ua=!1;return this}; -x.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 f=0;""===a[b];)b++;(d=a[b++])&&(f=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 x(c,f,g,h)}return new x};x.stringify=function(a){return a instanceof x?a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString():a.toString()}; -x.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};x.prototype.equals=x.prototype.O=function(a){return a instanceof x?this.M===a.x&&this.N===a.y&&this.Fa===a.width&&this.Ea===a.height:!1};x.prototype.equalTo=x.prototype.Yw=function(a,b,c,d){return this.M===a&&this.N===b&&this.Fa===c&&this.Ea===d};x.prototype.equalsApprox=x.prototype.Ue=function(a){return M.I(this.M,a.x)&&M.I(this.N,a.y)&&M.I(this.Fa,a.width)&&M.I(this.Ea,a.height)}; -x.prototype.containsPoint=x.prototype.Ja=function(a){t&&w.l(a,I,x,"containsPoint:p");return this.M<=a.x&&this.M+this.Fa>=a.x&&this.N<=a.y&&this.N+this.Ea>=a.y};x.prototype.containsRect=x.prototype.jk=function(a){t&&w.l(a,x,x,"containsRect:r");return this.M<=a.x&&a.x+a.width<=this.M+this.Fa&&this.N<=a.y&&a.y+a.height<=this.N+this.Ea}; -x.prototype.contains=x.prototype.contains=function(a,b,c,d){t?(w.p(a,x,"contains:x"),w.p(b,x,"contains:y"),void 0===c?c=0:w.p(c,x,"contains:w"),void 0===d?d=0:w.p(d,x,"contains:h"),(0>c||0>d)&&w.m("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.M<=a&&a+c<=this.M+this.Fa&&this.N<=b&&b+d<=this.N+this.Ea};x.prototype.reset=function(){w.K(this);this.Ea=this.Fa=this.N=this.M=0}; -x.prototype.offset=x.prototype.offset=function(a,b){t&&(w.p(a,x,"offset:dx"),w.p(b,x,"offset:dy"));w.K(this);this.M+=a;this.N+=b;return this};x.prototype.inflate=x.prototype.ag=function(a,b){t&&(w.p(a,x,"inflate:w"),w.p(b,x,"inflate:h"));return pb(this,b,a,b,a)};x.prototype.addMargin=x.prototype.zw=function(a){t&&w.l(a,vb,x,"addMargin:m");return pb(this,a.top,a.right,a.bottom,a.left)}; -x.prototype.subtractMargin=x.prototype.AK=function(a){t&&w.l(a,vb,x,"subtractMargin:m");return pb(this,-a.top,-a.right,-a.bottom,-a.left)};x.prototype.grow=function(a,b,c,d){t&&(w.p(a,x,"grow:t"),w.p(b,x,"grow:r"),w.p(c,x,"grow:b"),w.p(d,x,"grow:l"));return pb(this,a,b,c,d)};function pb(a,b,c,d,f){w.K(a);var g=a.Fa;c+f<=-g?(a.M+=g/2,a.Fa=0):(a.M-=f,a.Fa+=c+f);c=a.Ea;b+d<=-c?(a.N+=c/2,a.Ea=0):(a.N-=b,a.Ea+=b+d);return a} -x.prototype.intersectRect=function(a){t&&w.l(a,x,x,"intersectRect:r");return wb(this,a.x,a.y,a.width,a.height)};x.prototype.intersect=function(a,b,c,d){t&&(w.p(a,x,"intersect:x"),w.p(b,x,"intersect:y"),w.p(c,x,"intersect:w"),w.p(d,x,"intersect:h"),(0>c||0>d)&&w.m("Rect.intersect:Width and height cannot be negative"));return wb(this,a,b,c,d)}; -function wb(a,b,c,d,f){w.K(a);var g=Math.max(a.M,b),h=Math.max(a.N,c);b=Math.min(a.M+a.Fa,b+d);c=Math.min(a.N+a.Ea,c+f);a.M=g;a.N=h;a.Fa=Math.max(0,b-g);a.Ea=Math.max(0,c-h);return a}x.prototype.intersectsRect=x.prototype.Kg=function(a){t&&w.l(a,x,x,"intersectsRect:r");return this.IF(a.x,a.y,a.width,a.height)}; -x.prototype.intersects=x.prototype.IF=function(a,b,c,d){t&&(w.p(a,x,"intersects:x"),w.p(b,x,"intersects:y"),w.p(a,x,"intersects:w"),w.p(b,x,"intersects:h"),(0>c||0>d)&&w.m("Rect.intersects:Width and height cannot be negative"));var f=this.Fa,g=this.M;if(Infinity!==f&&Infinity!==c&&(f+=g,c+=a,isNaN(c)||isNaN(f)||g>c||a>f))return!1;a=this.Ea;c=this.N;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0}; -function xb(a,b){var c=a.Fa,d=b.width+10+10,f=a.M,g=b.x-10;if(f>d+g||g>c+f)return!1;c=a.Ea;d=b.height+10+10;f=a.N;g=b.y-10;return f>d+g||g>c+f?!1:!0}x.prototype.unionPoint=x.prototype.lj=function(a){t&&w.l(a,I,x,"unionPoint:p");return yb(this,a.x,a.y,0,0)};x.prototype.unionRect=x.prototype.mi=function(a){t&&w.l(a,x,x,"unionRect:r");return yb(this,a.M,a.N,a.Fa,a.Ea)}; -x.prototype.union=x.prototype.qH=function(a,b,c,d){w.K(this);t?(w.p(a,x,"union:x"),w.p(b,x,"union:y"),void 0===c?c=0:w.p(c,x,"union:w"),void 0===d?d=0:w.p(d,x,"union:h"),(0>c||0>d)&&w.m("Rect.union:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return yb(this,a,b,c,d)};function yb(a,b,c,d,f){var g=Math.min(a.M,b),h=Math.min(a.N,c);b=Math.max(a.M+a.Fa,b+d);c=Math.max(a.N+a.Ea,c+f);a.M=g;a.N=h;a.Fa=b-g;a.Ea=c-h;return a} -x.prototype.setSpot=x.prototype.vu=function(a,b,c){t&&(w.p(a,x,"setSpot:x"),w.p(b,x,"setSpot:y"),w.l(c,P,x,"setSpot:spot"));w.K(this);this.M=a-c.offsetX-c.x*this.Fa;this.N=b-c.offsetY-c.y*this.Ea;return this};var Ab; -x.contains=Ab=function(a,b,c,d,f,g,h,k){t?(w.p(a,x,"contains:rx"),w.p(b,x,"contains:ry"),w.p(c,x,"contains:rw"),w.p(d,x,"contains:rh"),w.p(f,x,"contains:x"),w.p(g,x,"contains:y"),void 0===h?h=0:w.p(h,x,"contains:w"),void 0===k?k=0:w.p(k,x,"contains:h"),(0>c||0>d||0>h||0>k)&&w.m("Rect.contains:Width and height cannot be negative")):(void 0===h&&(h=0),void 0===k&&(k=0));return a<=f&&f+h<=a+c&&b<=g&&g+k<=b+d}; -x.intersects=function(a,b,c,d,f,g,h,k){t&&(w.p(a,x,"intersects:rx"),w.p(b,x,"intersects:ry"),w.p(c,x,"intersects:rw"),w.p(d,x,"intersects:rh"),w.p(f,x,"intersects:x"),w.p(g,x,"intersects:y"),w.p(h,x,"intersects:w"),w.p(k,x,"intersects:h"),(0>c||0>d||0>h||0>k)&&w.m("Rect.intersects:Width and height cannot be negative"));c+=a;h+=f;if(a>h||f>c)return!1;a=d+b;k+=g;return b>k||g>a?!1:!0};w.g(x,"x",x.prototype.x); -w.defineProperty(x,{x:"x"},function(){return this.M},function(a){w.K(this,a);t&&w.h(a,"number",x,"x");this.M=a});w.g(x,"y",x.prototype.y);w.defineProperty(x,{y:"y"},function(){return this.N},function(a){w.K(this,a);t&&w.h(a,"number",x,"y");this.N=a});w.g(x,"width",x.prototype.width);w.defineProperty(x,{width:"width"},function(){return this.Fa},function(a){w.K(this,a);t&&w.h(a,"number",x,"width");0>a&&w.ka(a,">= 0",x,"width");this.Fa=a});w.g(x,"height",x.prototype.height); -w.defineProperty(x,{height:"height"},function(){return this.Ea},function(a){w.K(this,a);t&&w.h(a,"number",x,"height");0>a&&w.ka(a,">= 0",x,"height");this.Ea=a});w.g(x,"left",x.prototype.left);w.defineProperty(x,{left:"left"},function(){return this.M},function(a){w.K(this,a);t&&w.h(a,"number",x,"left");this.M=a});w.g(x,"top",x.prototype.top);w.defineProperty(x,{top:"top"},function(){return this.N},function(a){w.K(this,a);t&&w.h(a,"number",x,"top");this.N=a});w.g(x,"right",x.prototype.right); -w.defineProperty(x,{right:"right"},function(){return this.M+this.Fa},function(a){w.K(this,a);t&&w.p(a,x,"right");this.M+=a-(this.M+this.Fa)});w.g(x,"bottom",x.prototype.bottom);w.defineProperty(x,{bottom:"bottom"},function(){return this.N+this.Ea},function(a){w.K(this,a);t&&w.p(a,x,"top");this.N+=a-(this.N+this.Ea)});w.g(x,"position",x.prototype.position); -w.defineProperty(x,{position:"position"},function(){return new I(this.M,this.N)},function(a){w.K(this,a);t&&w.l(a,I,x,"position");this.M=a.x;this.N=a.y});w.g(x,"size",x.prototype.size);w.defineProperty(x,{size:"size"},function(){return new na(this.Fa,this.Ea)},function(a){w.K(this,a);t&&w.l(a,na,x,"size");this.Fa=a.width;this.Ea=a.height});w.g(x,"center",x.prototype.hk); -w.defineProperty(x,{hk:"center"},function(){return new I(this.M+this.Fa/2,this.N+this.Ea/2)},function(a){w.K(this,a);t&&w.l(a,I,x,"center");this.M=a.x-this.Fa/2;this.N=a.y-this.Ea/2});w.g(x,"centerX",x.prototype.Ia);w.defineProperty(x,{Ia:"centerX"},function(){return this.M+this.Fa/2},function(a){w.K(this,a);t&&w.p(a,x,"centerX");this.M=a-this.Fa/2});w.g(x,"centerY",x.prototype.Va); -w.defineProperty(x,{Va:"centerY"},function(){return this.N+this.Ea/2},function(a){w.K(this,a);t&&w.p(a,x,"centerY");this.N=a-this.Ea/2});x.prototype.isReal=x.prototype.J=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};x.prototype.isEmpty=function(){return 0===this.width&&0===this.height}; -function vb(a,b,c,d){void 0===a?this.ih=this.Zg=this.nh=this.ph=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.m("Invalid arguments to Margin constructor");this.Ua=!1}w.ma("Margin",vb);w.$h(vb);w.ke(vb,{top:!0,right:!0,bottom:!0,left:!0});vb.prototype.assign=function(a){this.ph=a.ph;this.nh=a.nh;this.Zg=a.Zg;this.ih=a.ih}; -vb.prototype.setTo=vb.prototype.o=function(a,b,c,d){t&&(w.h(a,"number",vb,"setTo:t"),w.h(b,"number",vb,"setTo:r"),w.h(c,"number",vb,"setTo:b"),w.h(d,"number",vb,"setTo:l"));w.K(this);this.ph=a;this.nh=b;this.Zg=c;this.ih=d;return this};vb.prototype.set=vb.prototype.set=function(a){t&&w.l(a,vb,vb,"assign:m");w.K(this);this.ph=a.ph;this.nh=a.nh;this.Zg=a.Zg;this.ih=a.ih;return this};vb.prototype.copy=function(){var a=new vb;a.ph=this.ph;a.nh=this.nh;a.Zg=this.Zg;a.ih=this.ih;return a}; -vb.prototype.Qa=function(){this.Ua=!0;Object.freeze(this);return this};vb.prototype.ea=function(){return Object.isFrozen(this)?this:this.copy().freeze()};vb.prototype.freeze=function(){this.Ua=!0;return this};vb.prototype.Sa=function(){Object.isFrozen(this)&&w.m("cannot thaw constant: "+this);this.Ua=!1;return this}; -vb.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 vb;for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new vb(c);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));if(isNaN(g))return new vb(c,f);for(var h=NaN;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return isNaN(h)?new vb(c,f):new vb(c,f,g,h)}return new vb}; -vb.stringify=function(a){return a instanceof vb?a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString():a.toString()};vb.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};vb.prototype.equals=vb.prototype.O=function(a){return a instanceof vb?this.ph===a.top&&this.nh===a.right&&this.Zg===a.bottom&&this.ih===a.left:!1}; -vb.prototype.equalTo=vb.prototype.Yw=function(a,b,c,d){return this.ph===a&&this.nh===b&&this.Zg===c&&this.ih===d};vb.prototype.equalsApprox=vb.prototype.Ue=function(a){return M.I(this.ph,a.top)&&M.I(this.nh,a.right)&&M.I(this.Zg,a.bottom)&&M.I(this.ih,a.left)};w.g(vb,"top",vb.prototype.top);w.defineProperty(vb,{top:"top"},function(){return this.ph},function(a){w.K(this,a);t&&w.p(a,vb,"top");this.ph=a});w.g(vb,"right",vb.prototype.right); -w.defineProperty(vb,{right:"right"},function(){return this.nh},function(a){w.K(this,a);t&&w.p(a,vb,"right");this.nh=a});w.g(vb,"bottom",vb.prototype.bottom);w.defineProperty(vb,{bottom:"bottom"},function(){return this.Zg},function(a){w.K(this,a);t&&w.p(a,vb,"bottom");this.Zg=a});w.g(vb,"left",vb.prototype.left);w.defineProperty(vb,{left:"left"},function(){return this.ih},function(a){w.K(this,a);t&&w.p(a,vb,"left");this.ih=a}); -vb.prototype.isReal=vb.prototype.J=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function oa(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}w.$h(oa);w.ke(oa,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0});oa.prototype.set=oa.prototype.set=function(a){t&&w.l(a,oa,oa,"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}; -oa.prototype.copy=function(){var a=new oa;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};oa.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"};oa.prototype.equals=oa.prototype.O=function(a){return a instanceof oa?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}; -oa.prototype.reset=oa.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0};oa.prototype.multiply=oa.prototype.multiply=function(a){t&&w.l(a,oa,oa,"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,f=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=f;this.dy=g;return this}; -oa.prototype.multiplyInverted=oa.prototype.YA=function(a){t&&w.l(a,oa,oa,"multiplyInverted:matrix");var b=1/(a.m11*a.m22-a.m12*a.m21),c=a.m22*b,d=-a.m12*b,f=-a.m21*b,g=a.m11*b,h=b*(a.m21*a.dy-a.m22*a.dx),k=b*(a.m12*a.dx-a.m11*a.dy);a=this.m12*c+this.m22*d;b=this.m11*f+this.m21*g;f=this.m12*f+this.m22*g;g=this.m11*h+this.m21*k+this.dx;h=this.m12*h+this.m22*k+this.dy;this.m11=this.m11*c+this.m21*d;this.m12=a;this.m21=b;this.m22=f;this.dx=g;this.dy=h;return this}; -oa.prototype.invert=oa.prototype.FA=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),b=-this.m12*a,c=-this.m21*a,d=this.m11*a,f=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=f;this.dy=g}; -oa.prototype.rotate=oa.prototype.rotate=function(a,b,c){t&&(w.p(a,oa,"rotate:angle"),w.p(b,oa,"rotate:rx"),w.p(c,oa,"rotate:ry"));this.translate(b,c);var d=0,f=0;0===a?(d=1,f=0):90===a?(d=0,f=1):180===a?(d=-1,f=0):270===a?(d=0,f=-1):(f=a*Math.PI/180,d=Math.cos(f),f=Math.sin(f));a=this.m12*d+this.m22*f;var g=this.m11*-f+this.m21*d,h=this.m12*-f+this.m22*d;this.m11=this.m11*d+this.m21*f;this.m12=a;this.m21=g;this.m22=h;this.translate(-b,-c)}; -oa.prototype.translate=oa.prototype.translate=function(a,b){t&&(w.p(a,oa,"translate:x"),w.p(b,oa,"translate:y"));this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b};oa.prototype.scale=oa.prototype.scale=function(a,b){void 0===b&&(b=a);t&&(w.p(a,oa,"translate:sx"),w.p(b,oa,"translate:sy"));this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b}; -oa.prototype.transformPoint=oa.prototype.kb=function(a){t&&w.l(a,I,oa,"transformPoint:p");var b=a.M,c=a.N;a.M=b*this.m11+c*this.m21+this.dx;a.N=b*this.m12+c*this.m22+this.dy;return a};oa.prototype.invertedTransformPoint=oa.prototype.di=function(a){t&&w.l(a,I,oa,"invertedTransformPoint:p");var b=1/(this.m11*this.m22-this.m12*this.m21),c=-this.m12*b,d=this.m11*b,f=b*(this.m12*this.dx-this.m11*this.dy),g=a.M,h=a.N;a.M=g*this.m22*b+h*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.N=g*c+h*d+f;return a}; -oa.prototype.transformRect=oa.prototype.lH=function(a){t&&w.l(a,x,oa,"transformRect:rect");var b=a.M,c=a.N,d=b+a.Fa,f=c+a.Ea,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+f*k+m,b=b*h+f*l+n,g=d*g+f*k+m,d=d*h+f*l+n,f=p,h=q,p=Math.min(p,r),f=Math.max(f,r),h=Math.min(h,c),q=Math.max(q,c),p=Math.min(p,s),f=Math.max(f,s),h=Math.min(h,b),q=Math.max(q,b),p=Math.min(p,g),f=Math.max(f,g),h=Math.min(h,d),q=Math.max(q,d);a.M=p;a.N=h;a.Fa= -f-p;a.Ea=q-h};oa.prototype.isIdentity=oa.prototype.Pt=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};function P(a,b,c,d){void 0===a?this.wg=this.vg=this.N=this.M=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.Ua=!1}w.ma("Spot",P);w.$h(P);w.ke(P,{x:!0,y:!0,offsetX:!0,offsetY:!0});P.prototype.assign=function(a){this.M=a.M;this.N=a.N;this.vg=a.vg;this.wg=a.wg}; -P.prototype.setTo=P.prototype.o=function(a,b,c,d){t&&(Cb(a,"setTo:x"),Cb(b,"setTo:y"),Db(c,"setTo:offx"),Db(d,"setTo:offy"));w.K(this);this.M=a;this.N=b;this.vg=c;this.wg=d;return this};P.prototype.set=P.prototype.set=function(a){t&&w.l(a,P,P,"set:s");w.K(this);this.M=a.M;this.N=a.N;this.vg=a.vg;this.wg=a.wg;return this};P.prototype.copy=function(){var a=new P;a.M=this.M;a.N=this.N;a.vg=this.vg;a.wg=this.wg;return a};P.prototype.Qa=function(){this.Ua=!0;Object.freeze(this);return this}; -P.prototype.ea=function(){return Object.isFrozen(this)?this:this.copy().freeze()};P.prototype.freeze=function(){this.Ua=!0;return this};P.prototype.Sa=function(){Object.isFrozen(this)&&w.m("cannot thaw constant: "+this);this.Ua=!1;return this};function Kb(a,b){a.M=NaN;a.N=NaN;a.vg=b;return a}function Cb(a,b){(isNaN(a)||1a)&&w.ka(a,"0 <= "+b+" <= 1",P,b)}function Db(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&w.ka(a,"real number, not NaN or Infinity",P,b)}var Ob; -P.parse=Ob=function(a){if("string"===typeof a){a=a.trim();if("None"===a)return Pb;if("TopLeft"===a)return Ub;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return Vb;if("TopRight"===a)return Wb;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Xb;if("Center"===a)return ac;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return bc;if("BottomLeft"===a)return cc;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return dc;if("BottomRight"===a)return ec;if("TopSide"===a)return fc;if("LeftSide"=== -a)return gc;if("RightSide"===a)return mc;if("BottomSide"===a)return nc;if("TopBottomSides"===a)return qc;if("LeftRightSides"===a)return rc;if("TopLeftSides"===a)return sc;if("TopRightSides"===a)return xc;if("BottomLeftSides"===a)return yc;if("BottomRightSides"===a)return zc;if("NotTopSide"===a)return Ac;if("NotLeftSide"===a)return Bc;if("NotRightSide"===a)return Cc;if("NotBottomSide"===a)return Dc;if("AllSides"===a)return Jc;if("Default"===a)return Kc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; -var d=a[b++];void 0!==d&&0b.offset?1:-1});for(k=0;k=2*Math.PI?(fd(a,b,c,d,f,f+Math.PI,h),fd(a,b,c,d,f+Math.PI,f+2*Math.PI,h),a.path.push(["M",l,g])):(b+=d*Math.cos(f),c+=d*Math.sin(f),k=180*k/Math.PI,f=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,f,l,g]))}}function ed(a,b,c,d,f,g,h){var k=new ad;k.qf=[b,c,d,f,g,h];b={};hd(a,"g",b,k);k=a.addElement("g",b);a.Ff.push(k)} -e.jb=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+this.UG;this.UG++;var b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,f,g,h;c=dd(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",kL:this.shadowBlur/2});d=dd(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});f=dd(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});g=dd(this,"feOffset",{"in":"comp",result:"offsetBlur", -dx:this.shadowOffsetX,dy:this.shadowOffsetY});h=dd(this,"feMerge",{});h.appendChild(dd(this,"feMergeNode",{"in":"offsetBlur"}));h.appendChild(dd(this,"feMergeNode",{"in":"SourceGraphic"}));b.appendChild(c);b.appendChild(d);b.appendChild(f);b.appendChild(g);b.appendChild(h);0=a)return 0;var b=M.bC;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);M.bC=b}return 1>a? -(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},I:function(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8=f&&(f=1E-6);var k=0,l=0,m=0,n=0;am-n)if(a-c>f||c-a>f){if(g=(d-b)/(c-a)*(g-a)+b,g-f<=h&&h<=g+f)return!0}else return!0;else if(b- -d>f||d-b>f){if(h=(c-a)/(d-b)*(h-b)+a,h-f<=g&&g<=h+f)return!0}else return!0;return!1},Fw:function(a,b,c,d,f,g,h,k,l,m,n,p){if(M.Wd(a,b,h,k,p,c,d)&&M.Wd(a,b,h,k,p,f,g))return M.Wd(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+f)/2,u=(d+g)/2;f=(f+h)/2;g=(g+k)/2;d=(q+s)/2;c=(r+u)/2;var s=(s+f)/2,u=(u+g)/2,v=(d+s)/2,A=(c+u)/2;return M.Fw(a,b,q,r,d,c,v,A,l,m,n,p)||M.Fw(v,A,s,u,f,g,h,k,l,m,n,p)},yI:function(a,b,c,d,f,g,h,k,l){var m=(c+f)/2,n=(d+g)/2;l.x=(((a+c)/2+m)/2+(m+(f+h)/2)/2)/2;l.y=(((b+d)/2+n)/2+(n+ -(g+k)/2)/2)/2;return l},xI:function(a,b,c,d,f,g,h,k){var l=(c+f)/2,m=(d+g)/2;return nb(((a+c)/2+l)/2,((b+d)/2+m)/2,(l+(f+h)/2)/2,(m+(g+k)/2)/2)},$o:function(a,b,c,d,f,g,h,k,l,m){if(M.Wd(a,b,h,k,l,c,d)&&M.Wd(a,b,h,k,l,f,g))yb(m,a,b,0,0),yb(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+f)/2,r=(d+g)/2;f=(f+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+f)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;M.$o(a,b,n,p,d,c,s,u,l,m);M.$o(s,u,q,r,f,g,h,k,l,m)}return m},Oe:function(a,b,c,d,f,g,h,k,l,m){if(M.Wd(a,b,h,k,l,c,d)&& -M.Wd(a,b,h,k,l,f,g))0===m.length&&(m.push(a),m.push(b)),m.push(h),m.push(k);else{var n=(a+c)/2,p=(b+d)/2,q=(c+f)/2,r=(d+g)/2;f=(f+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+f)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;M.Oe(a,b,n,p,d,c,s,u,l,m);M.Oe(s,u,q,r,f,g,h,k,l,m)}return m},gB:function(a,b,c,d,f,g,h,k,l,m){if(M.Wd(a,b,f,g,m,c,d))return M.Wd(a,b,f,g,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+f)/2;d=(d+g)/2;var q=(n+c)/2,r=(p+d)/2;return M.gB(a,b,n,p,q,r,h,k,l,m)||M.gB(q,r,c,d,f,g,h,k,l,m)},jL:function(a,b,c, -d,f,g,h){h.x=((a+c)/2+(c+f)/2)/2;h.y=((b+d)/2+(d+g)/2)/2;return h},fB:function(a,b,c,d,f,g,h,k){if(M.Wd(a,b,f,g,h,c,d))yb(k,a,b,0,0),yb(k,f,g,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+f)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;M.fB(a,b,l,m,n,p,h,k);M.fB(n,p,c,d,f,g,h,k)}return k},Yp:function(a,b,c,d,f,g,h,k){if(M.Wd(a,b,f,g,h,c,d))0===k.length&&(k.push(a),k.push(b)),k.push(f),k.push(g);else{var l=(a+c)/2,m=(b+d)/2;c=(c+f)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;M.Yp(a,b,l,m,n,p,h,k);M.Yp(n,p,c,d,f,g,h,k)}return k}, -nt:function(a,b,c,d,f,g,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(M.Wd(a,b,h,k,q,c,d)&&M.Wd(a,b,h,k,q,f,g)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(0===s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(h=l=0,bh)return!1}else if(ah)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,u=(b+d)/2;c=(c+f)/2;d=(d+g)/2;f=(f+h)/2;g=(g+k)/2;var v=(s+c)/2,A=(u+d)/2;c=(c+f)/2;d=(d+g)/2;var D=(v+c)/2,B=(A+d)/ -2,H=(n-l)*(n-l)+(p-m)*(p-m),O=!1;M.nt(a,b,s,u,v,A,D,B,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b=q&&(q=1E-6);if(M.Wd(a,b,h,k,q,c,d)&&M.Wd(a,b,h,k,q,f,g)){q=(a-h)*(m-p)-(b-k)*(l-n);if(0===q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,u=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)< -(m>p?m-p:p-m)){if(a=l=0,ba)return r}else if(aa)return r;0q&&r--}else{var s=(a+c)/2,u=(b+d)/2,v=(c+f)/2,A=(d+g)/2;f=(f+h)/2;g=(g+k)/2;d=(s+v)/2;c=(u+A)/2;var v=(v+f)/2,A=(A+g)/2,D=(d+v)/2,B=(c+A)/2,r=r+M.ot(a,b,s,u,d,c,D,B,l,m,n,p,q),r=r+M.ot(D,B,v,A,f,g,h,k,l,m,n,p,q)}return r},vn:function(a,b,c,d,f,g,h){if(M.yb(a,c)){var k=0;c=0;bc)return h.x=a,h.y=c,!1;h.x=a;h.y=d;return!0}if(M.yb(b, -d)){ac)return h.x=c,h.y=b,!1;h.x=d;h.y=b;return!0}k=((a-f)*(a-c)+(b-g)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>k)return h.x=a,h.y=b,!1;if(1.000005c)return l.x=a,l.y=c,!1;l.x=a;l.y=g;return!0}h=(d-b)/(c-a);if(M.yb(k,h))return M.vn(a,b,c,d,f,g,l),!1;f=(h*a-k*f+g-b)/(h-k);if(M.yb(h,0)){ac)return l.x=c,l.y=b,!1;l.x=f;l.y=b;return!0}g=h*(f-a)+b;return M.vn(a,b,c,d,f,g,l)},VK:function(a,b,c,d,f){return M.uh(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,f)},RK:function(a,b,c,d,f,g,h,k,l,m){function n(c,d){var f=(c-a)*(c-a)+(d-b)*(d-b);f(c>a?c-a:a-c)){q=1-(c-f)*(c-f)/(q*q);if(0>q)return l;q=Math.sqrt(q);d=-m*q+g;n(c,m*q+g);n(c,d)}else{c=(d-b)/(c-a);d=1/(q*q)+c*c/(m*m);k=2*c*(b-c*a)/(m*m)-2*c*g/(m*m)-2*f/(q*q);q=k*k-4*d*(2*c*a*g/(m*m)-2*b*g/(m*m)+g*g/(m*m)+f*f/(q*q)-1+(b-c*a)*(b-c*a)/(m*m));if(0>q)return l;q=Math.sqrt(q);m=(-k+q)/(2*d);n(m,c*m-c*a+b);q=(-k-q)/(2*d);n(q, -c*q-c*a+b)}return l},Cl:function(a,b,c,d,f,g,h,k,l){var m=1E21,n=a,p=b;if(M.uh(a,b,a,d,f,g,h,k,l)){var q=(l.x-f)*(l.x-f)+(l.y-g)*(l.y-g);qm},ox:function(a,b,c){var d=b.x,f=b.y,g=c.x,h=c.y,k=a.left,l=a.right, -m=a.top,n=a.bottom;return d===g?(g=a=0,f=m):f===h?(d=k):a.Ja(b)||a.Ja(c)||M.nx(k,m,l,m,d,f,g,h)||M.nx(l,m,l,n,d,f,g,h)||M.nx(l,n,k,n,d,f,g,h)||M.nx(k,n,k,m,d,f,g,h)?!0:!1},nx:function(a,b,c,d,f,g,h,k){return 0>=M.Kw(a,b,c,d,f,g)*M.Kw(a,b,c,d,h,k)&&0>=M.Kw(f,g,h,k,a,b)*M.Kw(f,g,h,k,c,d)},Kw:function(a,b,c,d,f,g){c-=a;d-=b;a=f-a;b=g-b;g=a*d-b*c;0===g&&(g=a*c+b*d,0g&&(g=0)));return 0>g?-1:0a&&(a+=360);360<=a&&(a-=360);return a},QE:function(a,b,c,d,f,g){void 0===g&&(g=!1);var h=Math.PI;g||(d*=h/180,f*=h/180);g=dc,g=0>d,h=0,k=h=0;am;++m){b=.5*(k+l);if(b===k||b===l)break;var n=a/(b+g),p=h/(b+f),n=n*n+p*p-1;if(0n)l=b;else break}c=g*c/(b+g)-c;d=f*d/(b+f)-d;f=Math.sqrt(c*c+d*d)}else f=Math.abs(d-b);else d=a*a-b*b,f=a*c,fa?"M"+this.ta.toString()+" "+this.ua.toString()+"L"+this.D.toString()+" "+this.F.toString():"M"+this.ta.toFixed(a)+" "+this.ua.toFixed(a)+"L"+this.D.toFixed(a)+" "+this.F.toFixed(a);case pd:var b=new x(this.ta,this.ua,0,0);b.qH(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 yd:b=new x(this.ta,this.ua,0,0);b.qH(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 ld:for(var b="",c=this.wb.q,d=c.length,f=0;f=u-1?!0:null!==l[m+1].match(/[A-Za-z]/)}function d(){m++;return l[m]}function f(){var a=new I(parseFloat(d()),parseFloat(d()));n===n.toLowerCase()&&(a.x=s.x+a.x,a.y=s.y+a.y);return a}function g(){return s=f()}function h(){return r=f()}function k(){return"c"!==p.toLowerCase()&&"s"!==p.toLowerCase()?s:new I(2*s.x-r.x,2*s.y-r.y)}void 0===b&&(b=!1);"string"!==typeof a&&w.xc(a,"string",kd,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, -"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");a=a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");for(var l=a.split(" "),m=-1,n="",p="",q=new I(0,0),r=new I(0,0),s=new I(0, -0),u=l.length,v=w.u(),A=!1,D=!1,B=!0;!(m>=u-1);)if(p=n,n=d(),""!==n)switch(n.toUpperCase()){case "X":B=!0;D=A=!1;break;case "M":var H=g();null===v.dc||!0===B?(R(v,H.x,H.y,A,!1,!D),B=!1):v.moveTo(H.x,H.y);for(q=s;!c();)H=g(),v.lineTo(H.x,H.y);break;case "L":for(;!c();)H=g(),v.lineTo(H.x,H.y);break;case "H":for(;!c();)s=H=new I((n===n.toLowerCase()?s.x:0)+parseFloat(d()),s.y),v.lineTo(s.x,s.y);break;case "V":for(;!c();)s=H=new I(s.x,(n===n.toLowerCase()?s.y:0)+parseFloat(d())),v.lineTo(s.x,s.y);break; -case "C":for(;!c();){var O=f(),N=h(),H=g();S(v,O.x,O.y,N.x,N.y,H.x,H.y)}break;case "S":for(;!c();)O=k(),N=h(),H=g(),S(v,O.x,O.y,N.x,N.y,H.x,H.y);break;case "Q":for(;!c();)N=h(),H=g(),Ed(v,N.x,N.y,H.x,H.y);break;case "T":for(;!c();)r=N=k(),H=g(),Ed(v,N.x,N.y,H.x,H.y);break;case "B":for(;!c();){var H=parseFloat(d()),O=parseFloat(d()),N=parseFloat(d()),X=parseFloat(d()),ka=parseFloat(d()),V=ka,Q=!1;c()||(V=parseFloat(d()),c()||(Q=0!==parseFloat(d())));n===n.toLowerCase()&&(N+=s.x,X+=s.y);v.arcTo(H,O, -N,X,ka,V,Q)}break;case "A":for(;!c();)O=Math.abs(parseFloat(d())),N=Math.abs(parseFloat(d())),X=parseFloat(d()),ka=!!parseFloat(d()),V=!!parseFloat(d()),H=g(),Fd(v,O,N,X,ka,V,H.x,H.y);break;case "Z":H=v.s.wb.q[v.s.wb.length-1];Gd(v);s=q;break;case "F":H="";for(O=1;l[m+O];)if(null!==l[m+O].match(/[Uu]/))O++;else if(null===l[m+O].match(/[A-Za-z]/))O++;else{H=l[m+O];break}H.match(/[Mm]/)?A=!0:Hd(v);break;case "U":H="";for(O=1;l[m+O];)if(null!==l[m+O].match(/[Ff]/))O++;else if(null===l[m+O].match(/[A-Za-z]/))O++; -else{H=l[m+O];break}H.match(/[Mm]/)?D=!0:v.jb(!1)}q=v.s;w.v(v);if(b)for(v=q.wb.k;v.next();)H=v.value,H.zp=!0;return q};function Id(a,b){for(var c=a.length,d=w.P(),f=0;f=a)return 0;if((f>h?f-h:h-f)<(g>k?g-k:k-g)){if(f=a=0,gf)return 0}else if(ff)return 0;return 0a||1a)return n=(a-q)/p,w.Aa(c),new I(b+(f-b)*n,d+(g-d)*n);q+=p}b=f;d=g}w.Aa(c);return null};w.g(kd,"type",kd.prototype.type);w.defineProperty(kd,{type:"type"},function(){return this.ja},function(a){this.ja!==a&&(t&&w.Ca(a,kd,kd,"type"),w.K(this,a),this.ja=a,this.eb=!0)});w.g(kd,"startX",kd.prototype.ta); -w.defineProperty(kd,{ta:"startX"},function(){return this.rc},function(a){this.rc!==a&&(t&&w.p(a,kd,"startX"),w.K(this,a),this.rc=a,this.eb=!0)});w.g(kd,"startY",kd.prototype.ua);w.defineProperty(kd,{ua:"startY"},function(){return this.zc},function(a){this.zc!==a&&(t&&w.p(a,kd,"startY"),w.K(this,a),this.zc=a,this.eb=!0)});w.g(kd,"endX",kd.prototype.D);w.defineProperty(kd,{D:"endX"},function(){return this.tb},function(a){this.tb!==a&&(t&&w.p(a,kd,"endX"),w.K(this,a),this.tb=a,this.eb=!0)}); -w.g(kd,"endY",kd.prototype.F);w.defineProperty(kd,{F:"endY"},function(){return this.Eb},function(a){this.Eb!==a&&(t&&w.p(a,kd,"endY"),w.K(this,a),this.Eb=a,this.eb=!0)});w.g(kd,"figures",kd.prototype.wb);w.defineProperty(kd,{wb:"figures"},function(){return this.wj},function(a){this.wj!==a&&(t&&w.l(a,J,kd,"figures"),w.K(this,a),this.wj=a,this.eb=!0)});kd.prototype.add=kd.prototype.add=function(a){this.wj.add(a);return this}; -w.defineProperty(kd,{G:"spot1"},function(){return this.Li},function(a){t&&w.l(a,P,kd,"spot1");w.K(this,a);this.Li=a.ea()});w.defineProperty(kd,{H:"spot2"},function(){return this.Mi},function(a){t&&w.l(a,P,kd,"spot2");w.K(this,a);this.Mi=a.ea()});w.defineProperty(kd,{Ed:"defaultStretch"},function(){return this.vi},function(a){t&&w.Ca(a,T,kd,"stretch");w.K(this,a);this.vi=a});w.A(kd,{qb:"bounds"},function(){this.OA()&&(this.TB(),this.Eg());return this.Wu}); -function md(a,b,c,d){w.oc(this);this.Ua=!1;void 0===c&&(c=!0);this.km=c;void 0===d&&(d=!0);this.uo=d;void 0!==a?(t&&w.p(a,md,"sx"),this.rc=a):this.rc=0;void 0!==b?(t&&w.p(b,md,"sy"),this.zc=b):this.zc=0;this.Jo=new J(fe);this.fw=this.Jo.aa;this.eb=!0}w.ma("PathFigure",md);w.$h(md);md.prototype.copy=function(){var a=new md;a.km=this.km;a.uo=this.uo;a.rc=this.rc;a.zc=this.zc;for(var b=this.Jo.q,c=b.length,d=a.Jo,f=0;fa?"M"+this.ta.toString()+" "+this.ua.toString():"M"+this.ta.toFixed(a)+" "+this.ua.toFixed(a),c=this.La.q,d=c.length,f=0;fa&&(a+=360),this.md=a),void 0!==d&&(t&&w.p(d,fe,"x1"),this.xg=Math.max(d,0)),void 0!==f&&(t&&w.p(f,fe,"y1"),this.yg=Math.max(f,0)),this.Ao=!!h,this.Qn=!!k):(void 0!==d&&(t&&w.p(d,fe,"x1"),this.md=d),void 0!==f&&(t&&w.p(f,fe,"y1"),this.Je=f),void 0!==g&&(t&& -w.p(g,fe,"x2"),a===Rd&&(g=Math.max(g,0)),this.xg=g),void 0!==h&&"number"===typeof h&&(t&&w.p(h,fe,"y2"),a===Rd&&(h=Math.max(h,0)),this.yg=h));this.Lh=!1;this.eb=!0;this.oj=null}w.ma("PathSegment",fe);w.$h(fe); -fe.prototype.copy=function(){var a=new fe;a.ja=this.ja;a.tb=this.tb;a.Eb=this.Eb;void 0!==this.md&&(a.md=this.md);void 0!==this.Je&&(a.Je=this.Je);void 0!==this.xg&&(a.xg=this.xg);void 0!==this.yg&&(a.yg=this.yg);void 0!==this.Ao&&(a.Ao=this.Ao);void 0!==this.Qn&&(a.Qn=this.Qn);a.Lh=this.Lh;a.eb=this.eb;return a}; -fe.prototype.equalsApprox=fe.prototype.Ue=function(a){if(!(a instanceof fe)||this.type!==a.type||this.Nt!==a.Nt)return!1;switch(this.type){case Od:case Ad:return M.I(this.D,a.D)&&M.I(this.F,a.F);case Pd:return M.I(this.D,a.D)&&M.I(this.F,a.F)&&M.I(this.Mb,a.Mb)&&M.I(this.Zb,a.Zb)&&M.I(this.Ce,a.Ce)&&M.I(this.De,a.De);case Qd:return M.I(this.D,a.D)&&M.I(this.F,a.F)&&M.I(this.Mb,a.Mb)&&M.I(this.Zb,a.Zb);case Rd:return M.I(this.xh,a.xh)&&M.I(this.ki,a.ki)&&M.I(this.Ia,a.Ia)&&M.I(this.Va,a.Va)&&M.I(this.radiusX, -a.radiusX)&&M.I(this.radiusY,a.radiusY);case Sd:return this.qx===a.qx&&this.sx===a.sx&&M.I(this.$x,a.$x)&&M.I(this.D,a.D)&&M.I(this.F,a.F)&&M.I(this.radiusX,a.radiusX)&&M.I(this.radiusY,a.radiusY);default:return!1}}; -fe.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Od:b=0>a?"M"+this.D.toString()+" "+this.F.toString():"M"+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case Ad:b=0>a?"L"+this.D.toString()+" "+this.F.toString():"L"+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case Pd:b=0>a?"C"+this.Mb.toString()+" "+this.Zb.toString()+" "+this.Ce.toString()+" "+this.De.toString()+" "+this.D.toString()+" "+this.F.toString():"C"+this.Mb.toFixed(a)+" "+this.Zb.toFixed(a)+" "+this.Ce.toFixed(a)+ -" "+this.De.toFixed(a)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case Qd:b=0>a?"Q"+this.Mb.toString()+" "+this.Zb.toString()+" "+this.D.toString()+" "+this.F.toString():"Q"+this.Mb.toFixed(a)+" "+this.Zb.toFixed(a)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case Rd:b=0>a?"B"+this.xh.toString()+" "+this.ki.toString()+" "+this.Ia.toString()+" "+this.Va.toString()+" "+this.radiusX:"B"+this.xh.toFixed(a)+" "+this.ki.toFixed(a)+" "+this.Ia.toFixed(a)+" "+this.Va.toFixed(a)+" "+this.radiusX; -break;case Sd:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.$x.toString()+" "+(this.sx?1:0)+" "+(this.qx?1:0)+" "+this.D.toString()+" "+this.F.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.$x.toFixed(a)+" "+(this.sx?1:0)+" "+(this.qx?1:0)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;default:b=this.type.toString()}return b+(this.Lh?"z":"")};var Od;fe.Move=Od=w.w(fe,"Move",0);var Ad;fe.Line=Ad=w.w(fe,"Line",1);var Pd; -fe.Bezier=Pd=w.w(fe,"Bezier",2);var Qd;fe.QuadraticBezier=Qd=w.w(fe,"QuadraticBezier",3);var Rd;fe.Arc=Rd=w.w(fe,"Arc",4);var Sd;fe.SvgArc=Sd=w.w(fe,"SvgArc",4);fe.prototype.freeze=function(){this.Ua=!0;return this};fe.prototype.Sa=function(){this.Ua=!1;return this};fe.prototype.close=fe.prototype.close=function(){this.Lh=!0;return this}; -function Td(a,b){if(null!==a.oj&&!1===b.eb)return a.oj;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);var f=a.md,g=a.Je,h=M.QE(0,0,c=s?k=Math.PI:1<=s&&(k=0);!m&&0k&&(k+=2*Math.PI);m=b>h?1:b/h;s=b>h?h/b:1;b=M.QE(0,0,b>h?b:h,p,p+k,!0);h=w.yh();h.reset();h.translate(c,d);h.rotate(a.md,0,0);h.scale(m,s);Id(b,h);w.mf(h);a.oj=b;return a.oj}w.g(fe,"isClosed",fe.prototype.Nt); -w.defineProperty(fe,{Nt:"isClosed"},function(){return this.Lh},function(a){this.Lh!==a&&(this.Lh=a,this.eb=!0)});w.g(fe,"type",fe.prototype.type);w.defineProperty(fe,{type:"type"},function(){return this.ja},function(a){t&&w.Ca(a,fe,fe,"type");w.K(this,a);this.ja=a;this.eb=!0});w.g(fe,"endX",fe.prototype.D);w.defineProperty(fe,{D:"endX"},function(){return this.tb},function(a){t&&w.p(a,fe,"endX");w.K(this,a);this.tb=a;this.eb=!0});w.g(fe,"endY",fe.prototype.F); -w.defineProperty(fe,{F:"endY"},function(){return this.Eb},function(a){t&&w.p(a,fe,"endY");w.K(this,a);this.Eb=a;this.eb=!0});w.defineProperty(fe,{Mb:"point1X"},function(){return this.md},function(a){t&&w.p(a,fe,"point1X");w.K(this,a);this.md=a;this.eb=!0});w.defineProperty(fe,{Zb:"point1Y"},function(){return this.Je},function(a){t&&w.p(a,fe,"point1Y");w.K(this,a);this.Je=a;this.eb=!0}); -w.defineProperty(fe,{Ce:"point2X"},function(){return this.xg},function(a){t&&w.p(a,fe,"point2X");w.K(this,a);this.xg=a;this.eb=!0});w.defineProperty(fe,{De:"point2Y"},function(){return this.yg},function(a){t&&w.p(a,fe,"point2Y");w.K(this,a);this.yg=a;this.eb=!0});w.defineProperty(fe,{Ia:"centerX"},function(){return this.md},function(a){t&&w.p(a,fe,"centerX");w.K(this,a);this.md=a;this.eb=!0}); -w.defineProperty(fe,{Va:"centerY"},function(){return this.Je},function(a){t&&w.p(a,fe,"centerY");w.K(this,a);this.Je=a;this.eb=!0});w.defineProperty(fe,{radiusX:"radiusX"},function(){return this.xg},function(a){t&&w.p(a,fe,"radiusX");0>a&&w.ka(a,">= zero",fe,"radiusX");w.K(this,a);this.xg=a;this.eb=!0});w.defineProperty(fe,{radiusY:"radiusY"},function(){return this.yg},function(a){t&&w.p(a,fe,"radiusY");0>a&&w.ka(a,">= zero",fe,"radiusY");w.K(this,a);this.yg=a;this.eb=!0}); -w.defineProperty(fe,{xh:"startAngle"},function(){return this.tb},function(a){this.tb!==a&&(w.K(this,a),t&&w.p(a,fe,"startAngle"),a%=360,0>a&&(a+=360),this.tb=a,this.eb=!0)});w.defineProperty(fe,{ki:"sweepAngle"},function(){return this.Eb},function(a){t&&w.p(a,fe,"sweepAngle");w.K(this,a);360a&&(a=-360);this.Eb=a;this.eb=!0});w.defineProperty(fe,{qx:"isClockwiseArc"},function(){return this.Qn},function(a){w.K(this,a);this.Qn=a;this.eb=!0}); -w.defineProperty(fe,{sx:"isLargeArc"},function(){return this.Ao},function(a){w.K(this,a);this.Ao=a;this.eb=!0});w.defineProperty(fe,{$x:"xAxisRotation"},function(){return this.md},function(a){t&&w.p(a,fe,"xAxisRotation");a%=360;0>a&&(a+=360);w.K(this,a);this.md=a;this.eb=!0}); -function ie(){this.ba=null;this.Pz=(new I(0,0)).freeze();this.Py=(new I(0,0)).freeze();this.Tu=this.Pv=0;this.Dv="";this.tw=this.iv=!1;this.ev=this.Vu=0;this.pj=this.qv=this.zv=!1;this.Xq=null;this.sw=0;this.zg=this.qw=null}w.ma("InputEvent",ie); -ie.prototype.copy=function(){var a=new ie;a.ba=this.ba;a.Pz.assign(this.$d);a.Py.assign(this.ha);a.Pv=this.Pv;a.Tu=this.Tu;a.Dv=this.Dv;a.iv=this.iv;a.tw=this.tw;a.Vu=this.Vu;a.ev=this.ev;a.zv=this.zv;a.qv=this.qv;a.pj=this.pj;a.Xq=this.Xq;a.sw=this.sw;a.qw=this.qw;a.zg=this.zg;return a}; -ie.prototype.toString=function(){var a="^";0!==this.dd&&(a+="M:"+this.dd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Qe&&(a+="C:"+this.Qe);0!==this.mk&&(a+="D:"+this.mk);this.Vc&&(a+="h");this.bubbles&&(a+="b");null!==this.ha&&(a+="@"+this.ha.toString());return a};w.g(ie,"diagram",ie.prototype.i);w.defineProperty(ie,{i:"diagram"},function(){return this.ba},function(a){this.ba=a});w.g(ie,"viewPoint",ie.prototype.$d); -w.defineProperty(ie,{$d:"viewPoint"},function(){return this.Pz},function(a){w.l(a,I,ie,"viewPoint");this.Pz.assign(a)});w.g(ie,"documentPoint",ie.prototype.ha);w.defineProperty(ie,{ha:"documentPoint"},function(){return this.Py},function(a){w.l(a,I,ie,"documentPoint");this.Py.assign(a)});w.g(ie,"modifiers",ie.prototype.dd);w.defineProperty(ie,{dd:"modifiers"},function(){return this.Pv},function(a){this.Pv=a});w.g(ie,"button",ie.prototype.button); -w.defineProperty(ie,{button:"button"},function(){return this.Tu},function(a){this.Tu=a});w.g(ie,"key",ie.prototype.key);w.defineProperty(ie,{key:"key"},function(){return this.Dv},function(a){this.Dv=a});w.g(ie,"down",ie.prototype.pk);w.defineProperty(ie,{pk:"down"},function(){return this.iv},function(a){this.iv=a});w.g(ie,"up",ie.prototype.up);w.defineProperty(ie,{up:"up"},function(){return this.tw},function(a){this.tw=a});w.g(ie,"clickCount",ie.prototype.Qe); -w.defineProperty(ie,{Qe:"clickCount"},function(){return this.Vu},function(a){this.Vu=a});w.g(ie,"delta",ie.prototype.mk);w.defineProperty(ie,{mk:"delta"},function(){return this.ev},function(a){this.ev=a});w.defineProperty(ie,{Rt:"isMultiTouch"},function(){return this.zv},function(a){this.zv=a});w.g(ie,"handled",ie.prototype.Vc);w.defineProperty(ie,{Vc:"handled"},function(){return this.qv},function(a){this.qv=a});w.g(ie,"bubbles",ie.prototype.bubbles); -w.defineProperty(ie,{bubbles:"bubbles"},function(){return this.pj},function(a){this.pj=a});w.g(ie,"event",ie.prototype.event);w.defineProperty(ie,{event:"event"},function(){return this.Xq},function(a){this.Xq=a});w.A(ie,{Hl:"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.g(ie,"timestamp",ie.prototype.timestamp); -w.defineProperty(ie,{timestamp:"timestamp"},function(){return this.sw},function(a){this.sw=a});w.g(ie,"targetDiagram",ie.prototype.hg);w.defineProperty(ie,{hg:"targetDiagram"},function(){return this.qw},function(a){this.qw=a});w.g(ie,"targetObject",ie.prototype.se);w.defineProperty(ie,{se:"targetObject"},function(){return this.zg},function(a){this.zg=a});w.g(ie,"control",ie.prototype.control); -w.defineProperty(ie,{control:"control"},function(){return 0!==(this.dd&1)},function(a){this.dd=a?this.dd|1:this.dd&-2});w.g(ie,"shift",ie.prototype.shift);w.defineProperty(ie,{shift:"shift"},function(){return 0!==(this.dd&4)},function(a){this.dd=a?this.dd|4:this.dd&-5});w.g(ie,"alt",ie.prototype.alt);w.defineProperty(ie,{alt:"alt"},function(){return 0!==(this.dd&2)},function(a){this.dd=a?this.dd|2:this.dd&-3});w.g(ie,"meta",ie.prototype.Op); -w.defineProperty(ie,{Op:"meta"},function(){return 0!==(this.dd&8)},function(a){this.dd=a?this.dd|8:this.dd&-9});w.g(ie,"left",ie.prototype.left);w.defineProperty(ie,{left:"left"},function(){return 0===this.button},function(a){this.button=a?0:2});w.g(ie,"middle",ie.prototype.RJ);w.defineProperty(ie,{RJ:"middle"},function(){return 1===this.button},function(a){this.button=a?1:0});w.g(ie,"right",ie.prototype.right); -w.defineProperty(ie,{right:"right"},function(){return 2===this.button},function(a){this.button=a?2:0});function je(){this.ba=null;this.ec="";this.Yv=this.lw=null;this.Uu=!1}w.ma("DiagramEvent",je);je.prototype.copy=function(){var a=new je;a.ba=this.ba;a.ec=this.ec;a.lw=this.lw;a.Yv=this.Yv;a.Uu=this.Uu;return a};je.prototype.toString=function(){var a="*"+this.name;this.cancel&&(a+="x");null!==this.Vx&&(a+=":"+this.Vx.toString());null!==this.Jx&&(a+="("+this.Jx.toString()+")");return a}; -w.g(je,"diagram",je.prototype.i);w.defineProperty(je,{i:"diagram"},function(){return this.ba},function(a){this.ba=a});w.g(je,"name",je.prototype.name);w.defineProperty(je,{name:"name"},function(){return this.ec},function(a){this.ec=a});w.g(je,"subject",je.prototype.Vx);w.defineProperty(je,{Vx:"subject"},function(){return this.lw},function(a){this.lw=a});w.g(je,"parameter",je.prototype.Jx);w.defineProperty(je,{Jx:"parameter"},function(){return this.Yv},function(a){this.Yv=a});w.g(je,"cancel",je.prototype.cancel); -w.defineProperty(je,{cancel:"cancel"},function(){return this.Uu},function(a){this.Uu=a});function ke(){this.Dq=le;this.Bm=this.Ov="";this.$r=this.as=this.fs=this.gs=this.es=this.ba=this.ee=null}w.ma("ChangedEvent",ke);var ve;ke.Transaction=ve=w.w(ke,"Transaction",-1);var le;ke.Property=le=w.w(ke,"Property",0);var we;ke.Insert=we=w.w(ke,"Insert",1);var xe;ke.Remove=xe=w.w(ke,"Remove",2);ke.prototype.clear=ke.prototype.clear=function(){this.$r=this.as=this.fs=this.gs=this.es=this.ba=this.ee=null}; -ke.prototype.copy=function(){var a=new ke;a.ee=this.ee;a.ba=this.ba;a.Dq=this.Dq;a.Ov=this.Ov;a.Bm=this.Bm;a.es=this.es;var b=this.gs;a.gs=w.ab(b)&&"function"===typeof b.ea?b.ea():b;b=this.fs;a.fs=w.ab(b)&&"function"===typeof b.ea?b.ea():b;b=this.as;a.as=w.ab(b)&&"function"===typeof b.ea?b.ea():b;b=this.$r;a.$r=w.ab(b)&&"function"===typeof b.ea?b.ea():b;return a}; -ke.prototype.toString=function(){var a="",a=this.Dd===ve?a+"* ":this.Dd===le?a+(null!==this.ia?"!m":"!d"):a+((null!==this.ia?"!m":"!d")+this.Dd);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.Kf&&this.Kf!==this.propertyName&&(a+=" "+this.Kf);a+=": ";this.Dd===ve?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=ha(this.object)),null!==this.oldValue&&(a+=" old: "+ha(this.oldValue)),null!==this.gg&&(a+=" "+this.gg),null!==this.newValue&& -(a+=" new: "+ha(this.newValue)),null!==this.eg&&(a+=" "+this.eg));return a};ke.prototype.getValue=ke.prototype.Da=function(a){return a?this.oldValue:this.newValue};ke.prototype.getParam=function(a){return a?this.gg:this.eg};ke.prototype.canUndo=ke.prototype.canUndo=function(){return null!==this.ia||null!==this.i?!0:!1};ke.prototype.undo=ke.prototype.undo=function(){this.canUndo()&&(null!==this.ia?this.ia.Zm(this,!0):null!==this.i&&this.i.Zm(this,!0))}; -ke.prototype.canRedo=ke.prototype.canRedo=function(){return null!==this.ia||null!==this.i?!0:!1};ke.prototype.redo=ke.prototype.redo=function(){this.canRedo()&&(null!==this.ia?this.ia.Zm(this,!1):null!==this.i&&this.i.Zm(this,!1))};w.g(ke,"model",ke.prototype.ia);w.defineProperty(ke,{ia:"model"},function(){return this.ee},function(a){this.ee=a});w.g(ke,"diagram",ke.prototype.i);w.defineProperty(ke,{i:"diagram"},function(){return this.ba},function(a){this.ba=a});w.g(ke,"change",ke.prototype.Dd); -w.defineProperty(ke,{Dd:"change"},function(){return this.Dq},function(a){t&&w.Ca(a,ke,ke,"change");this.Dq=a});w.g(ke,"modelChange",ke.prototype.Kf);w.defineProperty(ke,{Kf:"modelChange"},function(){return this.Ov},function(a){t&&w.h(a,"string",ke,"modelChange");this.Ov=a});w.g(ke,"propertyName",ke.prototype.propertyName);w.defineProperty(ke,{propertyName:"propertyName"},function(){return this.Bm},function(a){t&&"string"!==typeof a&&w.h(a,"function",ke,"propertyName");this.Bm=a}); -w.g(ke,"isTransactionFinished",ke.prototype.CJ);w.A(ke,{CJ:"isTransactionFinished"},function(){return this.Dq===ve&&("CommittedTransaction"===this.Bm||"FinishedUndo"===this.Bm||"FinishedRedo"===this.Bm)});w.g(ke,"object",ke.prototype.object);w.defineProperty(ke,{object:"object"},function(){return this.es},function(a){this.es=a});w.g(ke,"oldValue",ke.prototype.oldValue);w.defineProperty(ke,{oldValue:"oldValue"},function(){return this.gs},function(a){this.gs=a});w.g(ke,"oldParam",ke.prototype.gg); -w.defineProperty(ke,{gg:"oldParam"},function(){return this.fs},function(a){this.fs=a});w.g(ke,"newValue",ke.prototype.newValue);w.defineProperty(ke,{newValue:"newValue"},function(){return this.as},function(a){this.as=a});w.g(ke,"newParam",ke.prototype.eg);w.defineProperty(ke,{eg:"newParam"},function(){return this.$r},function(a){this.$r=a}); -function L(a){1=d)return"[]";var f=new Fa;f.add("[ ");c&&1b||(w.Vi(this.Af,b),Ye(this,"nodeDataArray",xe,"nodeDataArray",this,a,null,b,null),this.Au(a)))}}; -L.prototype.removeNodeDataCollection=function(a){if(w.isArray(a))for(var b=w.vb(a),c=0;cb&&(b=w.vb(a));w.Ui(a,b,c);Ye(this,"",we,"",a,null,c,null,b)}; -L.prototype.removeArrayItem=function(a,b){void 0===b&&(b=-1);t&&(w.pt(a,L,"removeArrayItem:arr"),w.p(b,L,"removeArrayItem:idx"));a===this.Af&&w.m("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=w.vb(a)-1);var c=w.pb(a,b);w.Vi(a,b);Ye(this,"",xe,"",a,c,null,b,null)};w.g(L,"nodeCategoryProperty",L.prototype.Kl); -w.defineProperty(L,{Kl:"nodeCategoryProperty"},function(){return this.bs},function(a){var b=this.bs;b!==a&&(Ze(a,L,"nodeCategoryProperty"),this.bs=a,this.j("nodeCategoryProperty",b,a))});L.prototype.getCategoryForNodeData=L.prototype.vA=function(a){if(null===a)return"";var b=this.bs;if(""===b)return"";b=w.Cb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;w.m("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; -L.prototype.setCategoryForNodeData=L.prototype.Nx=function(a,b){w.h(b,"string",L,"setCategoryForNodeData:cat");if(null!==a){var c=this.bs;if(""!==c)if(this.xe(a)){var d=w.Cb(a,c);void 0===d&&(d="");d!==b&&(w.Xa(a,c,b),Ye(this,"nodeCategory",le,c,a,d,b))}else w.Xa(a,c,b)}}; -function U(a,b){2f||(w.Vi(d,f),this.Zi(a)&&(hf(this,b,a),Ye(this,"linkLabelKeys",xe,c,a,b,null)))}else void 0!==d&&w.m(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};w.g(U,"linkDataArray",U.prototype.fj); -w.defineProperty(U,{fj:"linkDataArray"},function(){return this.Oh},function(a){var b=this.Oh;if(b!==a){w.pt(a,U,"linkDataArray");for(var c=w.vb(a),d=0;db)){w.Vi(this.Oh,b);Ye(this,"linkDataArray",xe,"linkDataArray",this,a,null,b,null);b=this.Al(a);hf(this,b,a);b=this.Dl(a);hf(this,b,a);var c=this.uk(a);if(w.isArray(c))for(var d=w.vb(c),f=0;fa.cf&&w.trace("Ending transaction without having started a transaction: "+c);var d=1===a.cf;d&&b&&a.isEnabled&&a.ad("CommittingTransaction",c,a.$i);var f=0;if(0a.dj;f--)g=d.na(f),null!== -g&&g.clear(),d.vd(f),a.iz=!0;f=a.TA;0===f&&(f=1);0=f&&(g=d.na(0),null!==g&&g.clear(),d.vd(0),a.eh--);d.add(b);a.eh++;d.freeze();g=b}a.ad("CommittedTransaction",c,g)}else{a.zi=!0;try{a.isEnabled&&null!==g&&(g.yp=!0,g.undo())}finally{a.ad("RolledBackTransaction",c,g),a.zi=!1}null!==g&&g.clear()}a.dv=null;return!0}if(a.isEnabled&&!b&&null!==g){a=f;c=g.qh;for(b=c.count-1;b>=a;b--)d=c.na(b),null!==d&&d.undo(),c.Sa(),c.vd(b);c.freeze()}return!1} -ye.prototype.canUndo=ye.prototype.canUndo=function(){if(!this.isEnabled||0=this.cf&&!this.Xy&&(a=a.i,null!==a&&!1===a.zf||w.trace("Change not within a transaction: "+c.toString()))}}; -ye.prototype.skipsEvent=function(a){if(null===a||0>a.Dd.value)return!0;a=a.object;if(a instanceof T){if(a=a.layer,null!==a&&a.Ec)return!0}else if(a instanceof Ue&&a.Ec)return!0;return!1};w.A(ye,{SJ:"models"},function(){return this.oz.k});w.g(ye,"isEnabled",ye.prototype.isEnabled);w.defineProperty(ye,{isEnabled:"isEnabled"},function(){return this.ef},function(a){this.ef=a});w.A(ye,{kH:"transactionToUndo"},function(){return 0<=this.dj&&this.dj<=this.history.count-1?this.history.na(this.dj):null}); -w.A(ye,{jH:"transactionToRedo"},function(){return this.djb.Mg||(b.scale=a))};wa.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.Du);w.p(a,wa,"canDecreaseZoom:factor");var b=this.i;if(null===b||b.Wm!==Gf)return!1;a*=b.scale;return ab.Mg?!1:b.lt}; -wa.prototype.increaseZoom=function(a){void 0===a&&(a=this.Du);w.p(a,wa,"increaseZoom:factor");var b=this.i;null!==b&&b.Wm===Gf&&(a*=b.scale,ab.Mg||(b.scale=a))};wa.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.Du);w.p(a,wa,"canIncreaseZoom:factor");var b=this.i;if(null===b||b.Wm!==Gf)return!1;a*=b.scale;return ab.Mg?!1:b.lt};wa.prototype.resetZoom=function(a){void 0===a&&(a=this.zt);w.p(a,wa,"resetZoom:newscale");var b=this.i;null===b||ab.Mg||(b.scale=a)}; -wa.prototype.canResetZoom=function(a){void 0===a&&(a=this.zt);w.p(a,wa,"canResetZoom:newscale");var b=this.i;return null===b||ab.Mg?!1:b.lt};wa.prototype.zoomToFit=function(){var a=this.i;if(null!==a){var b=a.scale,c=a.position;b!==this.lE||isNaN(this.jz)?(this.jz=b,this.fD=c.copy(),a.zoomToFit(),a.rf(),this.lE=a.scale):(a.scale=this.jz,a.position=this.fD)}};wa.prototype.canZoomToFit=function(){var a=this.i;return null===a?!1:a.lt}; -wa.prototype.collapseTree=function(a){void 0===a&&(a=null);var b=this.i;if(null===b)return!1;try{b.jc("Collapse Tree");var c=new J(C);if(null!==a&&a.Xc)a.collapseTree(),c.add(a);else for(var d=b.selection.k;d.next();){var f=d.value;f instanceof C&&(a=f,a.Xc&&(a.collapseTree(),c.add(a)))}b.Ha("TreeCollapsed",c)}finally{b.je("Collapse Tree")}}; -wa.prototype.canCollapseTree=function(a){void 0===a&&(a=null);var b=this.i;if(null===b||b.nb)return!1;if(null!==a){if(!a.Xc)return!1;if(0b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.Vf[0])c=a.Vf[0],d=a.Vf[1];else return;this.doCancel();if(a.oo){a.Yy=!0;a.sD=a.scale;var f=a.Kb,g=a.Jb,h=a.cb.getBoundingClientRect(),k=c.clientX-f/h.width*h.left,l=c.clientY-g/h.height*h.top,c=d,d=c.clientX-f/h.width*h.left-k,g=c.clientY-g/h.height*h.top-l,g=Math.sqrt(d*d+g* -g);a.PD=g;b.preventDefault();b.cancelBubble=!0}else Jf(a)}}; -Ve.prototype.standardPinchZoomMove=function(){var a=this.i;if(null!==a){var b=a.R.event;this.doCancel();Jf(a);var c=null,d=null;if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.Vf[0])c=a.Vf[0],d=a.Vf[1];else return;if(a.oo&&a.Yy){var f=a.Kb,g=a.Jb,h=a.cb.getBoundingClientRect(),k=c,c=k.clientX-f/h.width*h.left,l=k.clientY-g/h.height*h.top,k=d,d=k.clientX-f/h.width*h.left,g=k.clientY-g/h.height*h.top,h=d-c,f=g-l,h=Math.sqrt(h* -h+f*f)/a.PD,c=new I((Math.min(d,c)+Math.max(d,c))/2,(Math.min(g,l)+Math.max(g,l))/2),l=a.sD*h,d=a.Fb;l!==a.scale&&d.canResetZoom(l)&&(g=a.Yl,a.Yl=c,d.resetZoom(l),a.Yl=g);b.preventDefault();b.cancelBubble=!0}}};Ve.prototype.doKeyDown=function(){var a=this.i;null!==a&&"Esc"===a.R.key&&this.doCancel()};Ve.prototype.doKeyUp=function(){};Ve.prototype.startTransaction=Ve.prototype.jc=function(a){this.uf=null;var b=this.i;return null===b?!1:b.jc(a)}; -Ve.prototype.stopTransaction=Ve.prototype.wk=function(){var a=this.i;return null===a?!1:null===this.uf?a.bq():a.je(this.uf)}; -Ve.prototype.standardMouseSelect=function(){var a=this.i;if(null!==a&&a.Le){var b=a.R,c=a.Et(b.ha,!1);if(null!==c)if(w.on?b.Op:b.control){a.Ha("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Wa;null!==b&&(b.bb=!b.bb);a.Ha("ChangedSelection")}else if(b.shift){if(!c.bb){a.Ha("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Wa;null!==b&&(b.bb=!0);a.Ha("ChangedSelection")}}else{if(!c.bb){for(b=c;null!==b&&!b.canSelect();)b=b.Wa;null!==b&&a.select(b)}}else!b.left||(w.on?b.Op:b.control)|| -b.shift||a.Iw()}};Ve.prototype.standardMouseClick=function(a,b){void 0===a&&(a=null);void 0===b&&(b=function(a){return!a.layer.Ec});var c=this.i;if(null!==c){var d=c.R,f=c.le(d.ha,a,b);d.se=f;Kf(f,d,c)}}; -function Kf(a,b,c){var d=0;b.left?d=1===b.Qe?1:2===b.Qe?2:1:b.right&&1===b.Qe&&(d=3);var f="";if(null!==a){switch(d){case 1:f="ObjectSingleClicked";break;case 2:f="ObjectDoubleClicked";break;case 3:f="ObjectContextClicked"}0!==d&&c.Ha(f,a)}else{switch(d){case 1:f="BackgroundSingleClicked";break;case 2:f="BackgroundDoubleClicked";break;case 3:f="BackgroundContextClicked"}0!==d&&c.Ha(f)}if(null!==a)for(b.Vc=!1;null!==a;){c=null;switch(d){case 1:c=a.click;break;case 2:c=a.fn?a.fn:a.click;break;case 3:c= -a.vt}if(null!==c&&(c(b,a),b.Vc))break;a=a.T}else{a=null;switch(d){case 1:a=c.click;break;case 2:a=c.fn?c.fn:c.click;break;case 3:a=c.vt}null!==a&&a(b)}} -Ve.prototype.standardMouseOver=function(){var a=this.i;if(null!==a){var b=a.R;if(null!==b.i&&!0!==a.Vb.zd){var c=a.fb;a.fb=!0;var d=a.le(b.ha,null,null);b.se=d;var f=!1;if(d!==a.Tn){var g=a.Tn,h=g;a.Tn=d;this.doCurrentObjectChanged(g,d);for(b.Vc=!1;null!==g;){var k=g.WA;if(null!==k){if(d===g)break;if(null!==d&&d.Fl(g))break;k(b,g,d);f=!0;if(b.Vc)break}g=g.T}g=h;for(b.Vc=!1;null!==d;){k=d.VA;if(null!==k){if(g===d)break;if(null!==g&&g.Fl(d))break;k(b,d,g);f=!0;if(b.Vc)break}d=d.T}d=a.Tn}if(null!==d){g= -d;for(k="";null!==g;){k=g.cursor;if(""!==k)break;g=g.T}a.fc=k;b.Vc=!1;for(g=d;null!==g;){k=g.au;if(null!==k&&(k(b,g),f=!0,b.Vc))break;g=g.T}}else a.fc="",k=a.au,null!==k&&(k(b),f=!0);f&&a.$e();a.fb=c}}};Ve.prototype.doCurrentObjectChanged=function(){}; -Ve.prototype.standardMouseWheel=function(){var a=this.i;if(null!==a){var b=a.R,c=b.mk;if(0!==c&&a.Lc.J()){var d=a.Fb,f=a.Ab.Up;if((f===Lf&&!b.shift||f===Mf&&b.control)&&(0f||Math.abs(b.y-a.y)>d};w.A(Ve,{i:"diagram"},function(){return this.ba}); -w.g(Ve,"name",Ve.prototype.name);w.defineProperty(Ve,{name:"name"},function(){return this.ec},function(a){w.h(a,"string",Ve,"name");this.ec=a});w.g(Ve,"isEnabled",Ve.prototype.isEnabled);w.defineProperty(Ve,{isEnabled:"isEnabled"},function(){return this.ef},function(a){w.h(a,"boolean",Ve,"isEnabled");this.ef=a});w.g(Ve,"isActive",Ve.prototype.sa);w.defineProperty(Ve,{sa:"isActive"},function(){return this.SC},function(a){w.h(a,"boolean",Ve,"isActive");this.SC=a});w.g(Ve,"transactionResult",Ve.prototype.uf); -w.defineProperty(Ve,{uf:"transactionResult"},function(){return this.gE},function(a){null!==a&&w.h(a,"string",Ve,"transactionResult");this.gE=a}); -function Ff(){0f&&(f=k),l>g&&(g=l))}}Infinity===c?b.o(0,0,0,0):b.o(c,d,f-c,g-d)} -function zg(a,b){if(null===a.sc){var c=a.i;if(!(null===c||b&&(c.nb||c.of))&&null!==a.gc){var d=c.oa;d.isEnabled&&d.MF?null!==d.$i&&0c.qa)){var d=a.i;if(null!==d&&!d.nb&&(d=a.Ji,null!==d)){var f=null,g=null;null===c.Y&&(f=Jg(a,c.n(0),!1),null!==f&&(g=f.Z));var h=null,k=null;null===c.fa&&(h=Jg(a,c.n(c.qa-1),!0),null!==h&&(k=h.Z));var l=d.isValidLink(g,f,k,h);b?(c.Xn=c.n(0).copy(),c.ao=c.n(c.qa-1).copy(),c.kq=!1,c.Y=g,null!==f&&(c.Ef=f.ed),c.fa=k,null!==h&&(c.kg=h.ed)):l?Kg(d,g,f,k,h):Kg(d,null,null,null,null)}}}Ff.prototype.doDragOver=function(){}; -function Lg(a,b){var c=a.i;if(null!==c){a.bi&&Fg(a,!0);jg(a);var d=Gg(c,b,null,function(b){return!Dg(a,b)}),f=c.R;f.se=d;if(null!==d){f.Vc=!1;for(var g=d;null!==g;){var h=g.Yt;if(null!==h&&(h(f,g),f.Vc))break;g=Ig(g)}}else h=c.Yt,null!==h&&h(f);if(a.sa||null!==Pf)if(a.doDropOnto(b,d),a.sa||null!==Pf)for(d=c.selection.k;d.next();)f=d.value,f instanceof C&&Mg(c,f.da)}}Ff.prototype.doDropOnto=function(){}; -Ff.prototype.doMouseMove=function(){if(this.sa){var a=this.i;if(null!==a&&null!==this.ep&&null!==this.gc){var b=!1,c=!1;this.mayCopy()?(b=!0,a.fc="copy",zg(this,!1),Of(this,this.sc),Ag(this,this.sc,!1),kg(this,this.sc)):this.mayMove()?(c=!0,a.fc="default",ng(this),Ag(this,this.gc,!0)):this.mayDragOut()?(a.fc="no-drop",zg(this,!1),Ag(this,this.sc,!1)):ng(this);Eg(this,a.R.ha,c,b)}}}; -Ff.prototype.doMouseUp=function(){if(this.sa){var a=this.i;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.sc?(ng(this),zg(this,!0),Of(this,this.sc),Ag(this,this.sc,!1),kg(this,this.sc),null!==this.sc&&a.MG(this.sc.kj())):(b=!0,ng(this),this.mayMove()&&(Ag(this,this.gc,!0),this.hw=!1,Eg(this,a.R.ha,!0,!1),this.hw=!0));this.Tq=!0;Lg(this,a.R.ha);if(this.sa){this.sc=null;if(b&&null!==this.gc)for(b=this.gc.k;b.next();){var d=b.key;d instanceof C&&(d=d.Wa,null===d||null===d.placeholder||this.gc.contains(d)|| -d.gA&&d.W())}a.uc();kg(this,this.gc);this.uf=c?"Copy":"Move";a.Ha(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};Ff.prototype.mayCopy=function(){if(!this.JA)return!1;var a=this.i;if(null===a||a.nb||a.of||!a.Sm||!a.Zh||(w.on?!a.R.alt:!a.R.control))return!1;for(a=a.selection.k;a.next();){var b=a.value;if(b.Td()&&b.canCopy())return!0}return null!==this.Uc&&this.bi&&this.Uc.canCopy()?!0:!1}; -Ff.prototype.mayDragOut=function(){if(!this.JA)return!1;var a=this.i;if(null===a||!a.kt||!a.Zh||a.Si)return!1;for(a=a.selection.k;a.next();){var b=a.value;if(b.Td()&&b.canCopy())return!0}return null!==this.Uc&&this.bi&&this.Uc.canCopy()?!0:!1};Ff.prototype.mayMove=function(){var a=this.i;if(null===a||a.nb||!a.Si)return!1;for(a=a.selection.k;a.next();){var b=a.value;if(b.Td()&&b.canMove())return!0}return null!==this.Uc&&this.bi&&this.Uc.canMove()?!0:!1};var lg=new J(Ff),Pf=null,dg=null; -Ff.prototype.mayDragIn=function(){var a=this.i;if(null===a||!a.Yz||a.nb||a.of||!a.Sm)return!1;var b=Pf;return null===b||b.i.ia.kk!==a.ia.kk?!1:!0};Ff.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.i;a.Vb.jj();Ng(a);a=Pf;null!==a&&(a.i.fc="copy")}};Ff.prototype.doSimulatedDragLeave=function(){var a=Pf;null!==a&&a.doSimulatedDragOut();this.doCancel()}; -Ff.prototype.doSimulatedDragOver=function(){var a=this.i;if(null!==a){var b=Pf;null!==b&&null!==b.gc&&this.mayDragIn()&&(a.fc="copy",Og(this,b.gc.kj(),!1),Ag(this,this.sc,!1),Eg(this,a.R.ha,!1,!0))}}; -Ff.prototype.doSimulatedDrop=function(){var a=this.i;if(null!==a){var b=Pf;null!==b&&(b.Tq=!0,ng(this),this.mayDragIn()&&(this.jc("Drop"),Og(this,b.gc.kj(),!0),Ag(this,this.sc,!1),null!==this.sc&&a.MG(this.sc.kj()),this.uf="ExternalCopy",Lg(this,a.R.ha),a.uc(),this.sc=null,a.focus(),a.Ha("ExternalObjectsDropped",a.selection),this.wk()))}}; -function Og(a,b,c){if(null===a.sc){var d=a.i;if(null!==d&&!d.nb&&!d.of){d.fb=!c;d.Kn=!c;a.ij=d.R.ha;d=d.cp(b,d,!0);c=w.ig();sg(b,c);var f=c.x+c.width/2,g=c.y+c.height/2;w.tc(c);var h=a.jw;c=new ra(z);var k=w.P();for(b=b.k;b.next();){var l=b.value;if(l.Td()&&l.canCopy()){var m=l.location,l=d.Da(l);k.o(h.x-(f-m.x),h.y-(g-m.y));l.location=k;l.Cf();c.add(l,gg(k))}}w.B(k);for(d=d.k;d.next();)f=d.value,f instanceof F&&f.canCopy()&&c.add(f,gg());a.sc=c;Nf(a,c.kj());null!==a.Uc&&(c=a.Uc,d=c.zn,c.Jl(a.ij.x- -(d.x+d.width/2),a.ij.y-(d.y+d.height/2)))}}}Ff.prototype.doSimulatedDragOut=function(){var a=this.i;null!==a&&(this.mayCopy()||this.mayMove()?a.fc="":a.fc="no-drop")};function hg(a){this.point=a;this.VG=M.Ak}w.ma("DraggingInfo",hg);function Bg(a,b,c){this.Gc=a;this.info=b;this.pJ=c} -function Xg(){0=d&&(d=.1);for(var f=this,g=b.gn(c,d,function(b){return f.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,g=g.k;g.next();){var h=g.value,k=h.Z;if(k instanceof C){var l=h.xb(ac,w.P()),m=c.x-l.x,n=c.y-l.y;w.B(l);l=m*m+n*n;lc){if(null!==this.vc&&a===this.Rg&&b===this.Sg)return!0;var d=b.ed;null===d&&(d="");if(a.ax(d).count>=c)return!1}return!0}; -Xg.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.pn;if(this.i.$a===this&&(null!==a.layer&&!a.layer.Tm||!0!==b.OB))return!1;var c=b.fH;if(Infinity>c){if(null!==this.vc&&a===this.Tg&&b===this.Ug)return!0;var d=b.ed;null===d&&(d="");if(a.Hg(d).count>=c)return!1}return!0};Xg.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.Z,d=b.Z;return null!==c&&c===d}; -Xg.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.Z;if(!(c instanceof C))return!1;var d=a.ed;null===d&&(d="");var f=b.Z;if(!(f instanceof C))return!1;var g=b.ed;null===g&&(g="");for(f=f.Hg(g);f.next();)if(g=f.value,g.Y===c&&g.Ef===d)return!0;return!1}; -Xg.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.oF&&d.eH||!this.isInSameNode(b,d))&&(b.nF&&d.dH||!this.isLinked(b,d)))||null!==this.vc&&(null!==a&&this.isLabelDependentOnLink(a,this.vc)||null!==c&&this.isLabelDependentOnLink(c,this.vc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.vc))return!1;if(null!==a){var f=a.Lp;if(null!==f&&!f(a,b,c,d,this.vc))return!1}if(null!== -c&&(f=c.Lp,null!==f&&!f(a,b,c,d,this.vc)))return!1;f=this.Lp;return null!==f?f(a,b,c,d,this.vc):!0};Xg.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.ud;if(null===c)return!1;if(c===b)return!0;var d=new K(C);d.add(a);return Yg(this,c,b,d)};function Yg(a,b,c,d){if(b===c)return!0;var f=b.Y;if(null!==f&&f.Hf&&(d.add(f),Yg(a,f.ud,c,d)))return!0;b=b.fa;return null!==b&&b.Hf&&(d.add(b),Yg(a,b.ud,c,d))?!0:!1} -Xg.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.pn;var d=this.i.sH;if(d!==Zg){if(d===$g){if(null!==c&&!c.Fc)return!0;for(d=b.Xd;d.next();){var f=d.value;if(f!==c&&f.Fc&&f.fa===b)return!1}return!ah(this,a,b,c,!0)}if(d===bh){if(null!==c&&!c.Fc)return!0;for(d=a.Xd;d.next();)if(f=d.value,f!==c&&f.Fc&&f.Y===a)return!1;return!ah(this,a,b,c,!0)}if(d===ch)return a===b?a=!0:(d=new K(C),d.add(b),a=dh(this,d,a,b,c)),!a;if(d===eh)return!ah(this,a,b,c,!1);if(d=== -fh)return a===b?a=!0:(d=new K(C),d.add(b),a=gh(this,d,a,b,c)),!a}return!0};function ah(a,b,c,d,f){if(b===c)return!0;if(null===b||null===c)return!1;for(var g=b.Xd;g.next();){var h=g.value;if(h!==d&&(!f||h.Fc)&&h.fa===b&&(h=h.Y,h!==b&&ah(a,h,c,d,f)))return!0}return!1}function dh(a,b,c,d,f){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Xd;g.next();){var h=g.value;if(h!==f&&h.fa===c&&(h=h.Y,h!==c&&dh(a,b,h,d,f)))return!0}return!1} -function gh(a,b,c,d,f){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var g=c.Xd;g.next();){var h=g.value;if(h!==f){var k=h.Y,h=h.fa,k=k===c?h:k;if(k!==c&&gh(a,b,k,d,f))return!0}}return!1}w.g(Xg,"linkValidation",Xg.prototype.Lp);w.defineProperty(Xg,{Lp:"linkValidation"},function(){return this.bl},function(a){null!==a&&w.h(a,"function",Xg,"linkValidation");this.bl=a});w.g(Xg,"portTargeted",Xg.prototype.gu); -w.defineProperty(Xg,{gu:"portTargeted"},function(){return this.DD},function(a){null!==a&&w.h(a,"function",Xg,"portTargeted");this.DD=a});function ya(){0b.Gt+1&&c=a.x)c=0>=a.y?c+225:1<=a.y?c+135:c+180;else if(1<=a.x)0>=a.y?c+=315:1<=a.y&&(c+=45);else if(0>=a.y)c+=270;else if(1<=a.y)c+=90;else break a;0>c?c+=360:360<=c&&(c-=360);b.cursor=22.5>c?"e-resize":67.5>c?"se-resize":112.5>c?"s-resize":157.5>c?"sw-resize":202.5>c?"w-resize":247.5>c?"nw-resize":292.5>c?"n-resize":337.5>c?"ne-resize":"e-resize"}else if(b instanceof G)for(b=b.elements;b.next();)zh(a, -b.value,c)}w.defineProperty(yh,{It:"handleArchetype"},function(){return this.Uk},function(a){null!==a&&w.l(a,T,yh,"handleArchetype");this.Uk=a});w.A(yh,{handle:"handle"},function(){return this.kc});w.defineProperty(yh,{Ac:"adornedObject"},function(){return this.Ob},function(a){null!==a&&w.l(a,T,yh,"adornedObject");this.Ob=a});yh.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.i;return null!==a&&!a.nb&&a.Um&&a.R.left?null!==this.findToolHandleAt(a.Bc.ha,this.name)?!0:!1:!1}; -yh.prototype.doActivate=function(){var a=this.i;null!==a&&(this.kc=this.findToolHandleAt(a.Bc.ha,this.name),null!==this.kc&&(this.Ob=this.kc.Z.Ac,this.sz.set(this.Ob.Z.location),this.Wv.set(this.Ob.ya),this.Uy=this.computeCellSize(),this.Wy=this.computeMinSize(),this.Vy=this.computeMaxSize(),a.Ae=!0,this.qD=a.Vb.isEnabled,a.Vb.isEnabled=!1,this.jc(this.name),this.sa=!0))};yh.prototype.doDeactivate=function(){var a=this.i;null!==a&&(this.wk(),this.Ob=this.kc=null,this.sa=a.Ae=!1,a.Vb.isEnabled=this.qD)}; -yh.prototype.doCancel=function(){this.Ob.ya=this.Wv;this.Ob.Z.location=this.sz;this.stopTool()};yh.prototype.doMouseMove=function(){var a=this.i;if(this.sa&&null!==a){var b=this.Wy,c=this.Vy,d=this.Uy,f=this.Ob.sF(a.R.ha,w.P()),g=Lh;this.Ob instanceof W&&(g=Mh(this.Ob));b=this.computeResize(f,this.kc.alignment,b,c,d,!(g===Nh||g===Oh||a.R.shift));this.resize(b);a.rf();w.B(f)}}; -yh.prototype.doMouseUp=function(){var a=this.i;if(this.sa&&null!==a){var b=this.Wy,c=this.Vy,d=this.Uy,f=this.Ob.sF(a.R.ha,w.P()),g=Lh;this.Ob instanceof W&&(g=Mh(this.Ob));b=this.computeResize(f,this.kc.alignment,b,c,d,!(g===Nh||g===Oh||a.R.shift));this.resize(b);w.B(f);a.uc();this.uf=this.name;a.Ha("PartResized",this.Ob,this.Wv)}this.stopTool()}; -yh.prototype.resize=function(a){if(null!==this.i){var b=this.Ac,c=b.Z,d=b.zl(),f=b.cj(),g=Math.PI*d/180,h=Math.cos(g),g=Math.sin(g),k=0d?1:0,l=90d?1:0,d=180d?1:0,m=b.Ga.width,n=b.Ga.height;b.ya=a.size;var p=c.position.copy();c.Cf();m=b.Ga.width-m;n=b.Ga.height-n;if(0!==m||0!==n)0!==m&&(p.x+=f*((a.x+m*l)*h-(a.y+n*k)*g)),0!==n&&(p.y+=f*((a.x+m*d)*g+(a.y+n*l)*h)),c.move(p)}}; -yh.prototype.computeResize=function(a,b,c,d,f,g){b.Be()&&(b=ac);var h=this.Ac.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=w.P();M.Dt(a.x,a.y,k,l,f.width,f.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)));w.B(q);return a};yh.prototype.computeMinSize=function(){var a=this.Ac.Ze.copy(),b=this.Ze;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; -yh.prototype.computeMaxSize=function(){var a=this.Ac.Yd.copy(),b=this.Yd;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.ZG),180),c=Math.min(Math.abs(this.YG),b/2);!this.i.R.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};w.g(Ph,"snapAngleMultiple",Ph.prototype.ZG);w.defineProperty(Ph,{ZG:"snapAngleMultiple"},function(){return this.ND},function(a){w.h(a,"number",Ph,"snapAngleMultiple");this.ND=a}); -w.g(Ph,"snapAngleEpsilon",Ph.prototype.YG);w.defineProperty(Ph,{YG:"snapAngleEpsilon"},function(){return this.MD},function(a){w.h(a,"number",Ph,"snapAngleEpsilon");this.MD=a});w.g(Ph,"originalAngle",Ph.prototype.WJ);w.A(Ph,{WJ:"originalAngle"},function(){return this.Vv});function Rh(){0f.right&&(c.x-=d.width+5);c.xf.bottom&&(c.y-=d.height+5);c.yf.right&&(c.x-=d.width+5);c.xf.bottom?c.y-(d.height+5):c.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}mf.prototype.prepareAnimation=mf.prototype.Ml=function(){this.ef&&(this.Bj&&this.jj(),this.zd=!0,this.jC=!1)};function ri(a){a.ef&&requestAnimationFrame(function(){!1===a.zd||a.Bj||(a.ba.Nm=1,si(a.ba),a.zd=!1,a.ba.Ha("AnimationStarting"),ti(a))})} -function ui(a,b,c,d,f){if(a.zd&&(t&&w.l(b,T,mf,"addPropToAnimation:obj"),!(b instanceof z)||b.GA)){var g=a.Eo;if(g.contains(b)){b=g.Da(b);a=b.start;var h=b.end;void 0===a[c]&&(a[c]=vi(d));h[c]=vi(f)}else a=new ua,h=new ua,a[c]=vi(d),h[c]=vi(f),g.add(b,new qi(a,h))}}function vi(a){return a instanceof I?a.copy():a instanceof na?a.copy():a} -function ti(a){var b;void 0===b&&(b=new ua);var c=a.ba;if(null!==c)if(0===a.Eo.count)a.Bj=!1,wi(c,!1),c.rf();else{a.Bj=!0;var d=b.QK||a.HH,f=b.dL||null,g=b.eL||null,h=b.duration||a.Ry;b=a.QH;for(var k=a.Eo.k;k.next();){var l=k.value.start.position;l instanceof I&&(l.J()||l.assign(b))}a.vC=d;a.av=f;a.bv=g;a.Gy=h;var m=a.GH=a.Eo;xi(a);yi(a,c,m,d,0,h,null!==a.im&&null!==a.hm);Ng(a.ba);zi(a);requestAnimationFrame(function(b){var f=b||+new Date,g=f+h;(function s(b){if(!1!==a.Bj){b=b||+new Date;var k=b> -g?h:b-f;xi(a);yi(a,c,m,d,k,h,null!==a.im&&null!==a.hm);a.av&&a.av();Ng(c);zi(a);b>g?Ai(a):requestAnimationFrame(s)}})(f)})}}var Bi={opacity:function(a,b,c,d,f,g){a.opacity=d(f,b,c-b,g)},position:function(a,b,c,d,f,g){f!==g?a.SG(d(f,b.x,c.x-b.x,g),d(f,b.y,c.y-b.y,g)):a.position=new I(d(f,b.x,c.x-b.x,g),d(f,b.y,c.y-b.y,g))},scale:function(a,b,c,d,f,g){a.scale=d(f,b,c-b,g)},visible:function(a,b,c,d,f,g){a.visible=f!==g?b:c}}; -function xi(a){if(!a.sr){var b=a.ba;a.hE=b.fb;a.kC=b.wu;a.lC=b.hq;b.fb=!0;b.wu=!0;b.hq=!0;a.sr=!0}}function zi(a){var b=a.ba;b.fb=a.hE;b.wu=a.kC;b.hq=a.lC;a.sr=!1}function yi(a,b,c,d,f,g,h){for(c=c.k;c.next();){var k=c.key,l=c.value,m=l.start,l=l.end,n;for(n in l)if(void 0!==Bi[n])Bi[n](k,m[n],l[n],d,f,g)}h&&(h=a.im,a=a.hm,n=a.y-h.y,a=d(f,h.x,a.x-h.x,g),d=d(f,h.y,n,g),f=b.px,b.px=!0,b.position=new I(a,d),b.px=f)} -mf.prototype.stopAnimation=mf.prototype.jj=function(){!0===this.zd&&(this.zd=!1,this.jC&&this.ba.$e());this.Bj&&this.ef&&(xi(this),yi(this,this.ba,this.GH,this.vC,this.Gy,this.Gy,null!==this.im&&null!==this.hm),zi(this),Ai(this))};function Ai(a){a.Bj=!1;a.im=null;a.hm=null;a.Eo=new ra(T,qi);xi(a);for(var b=a.ba.links;b.next();){var c=b.value;null!==c.Io&&(c.points=c.Io,c.Io=null)}b=a.ba;wi(b,!1);b.uc();b.rf();Ci(b);zi(a);a.bv&&a.bv();a.bv=null;a.av=null;b.Ha("AnimationFinished")} -function Pi(a,b,c){var d=b.da,f=c.da,g=null;c instanceof E&&(g=c.placeholder);null!==g?(c=g.xb(Ub),c.x+=g.padding.left,c.y+=g.padding.top,ui(a,b,"position",c,b.position)):ui(a,b,"position",new I(f.x+f.width/2-d.width/2,f.y+f.height/2-d.height/2),b.position);ui(a,b,"opacity",.01,b.opacity)}function Qi(a,b,c){a.zd&&(null===a.im&&b.J()&&null===a.hm&&(a.im=b.copy()),a.hm=c.copy())}w.g(mf,"isEnabled",mf.prototype.isEnabled); -w.defineProperty(mf,{isEnabled:"isEnabled"},function(){return this.ef},function(a){w.h(a,"boolean",mf,"isEnabled");this.ef=a});w.g(mf,"duration",mf.prototype.duration);w.defineProperty(mf,{duration:"duration"},function(){return this.Ry},function(a){w.h(a,"number",mf,"duration");1>a&&w.ka(a,">= 1",mf,"duration");this.Ry=a});w.A(mf,{rh:"isAnimating"},function(){return this.Bj});w.A(mf,{TK:"isTicking"},function(){return this.sr});function qi(a,b){this.start=a;this.end=b} -function Ue(){0=a)return b;for(var c=0,d=0,f=0,g=0,h=0,k=this.mb.k;k.next();){var l=k.value;l instanceof E?f++:l instanceof C?d++:l instanceof F?g++:l instanceof da?h++:c++}k="";0=d.count)a=d.count;else if(d.na(a)===b)return-1;d.me(a,b);b.Kt(c);d=this.i;null!==d&&(c?d.ra():d.vp(b));b instanceof E&&this.Sx(b);return a};e.nf=function(a,b,c){var d=this.mb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.na(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Lt(c);d.vd(a);d=this.i;null!==d&&(c?d.ra():d.nf(b));b.Ev=null;return a}; -e.Sx=function(a){for(;null!==a;){if(a.layer===this){var b=a;if(0!==b.Mc.count){for(var c=-1,d=-1,f=this.mb.q,g=f.length,h=0;hd&&k.Wa===b&&(d=h,0<=c))break}!(0>d)&&da||1=a)return b;for(var c=this.$b.k;c.next();)b+="\n "+c.value.toString(a-1);return b};y.prototype.checkProperties=function(){return w.check(this)};y.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.ba instanceof y?b.ba:null};w.g(y,"div",y.prototype.ok); -w.defineProperty(y,{ok:"div"},function(){return this.Sb},function(a){null!==a&&w.l(a,HTMLDivElement,y,"div");if(this.Sb!==a){Yi=[];var b=this.Sb;null!==b?(b.ba=void 0,b.innerHTML="",null!==this.cb&&(this.cb.removeEventListener("touchstart",this.iH,!1),this.cb.removeEventListener("touchmove",this.hH,!1),this.cb.removeEventListener("touchend",this.gH,!1),this.cb.Sd.ba=null),b=this.Ab,null!==b&&(b.sf.each(function(a){a.cancelWaitAfter()}),b.cg.each(function(a){a.cancelWaitAfter()}),b.dg.each(function(a){a.cancelWaitAfter()})), -b.cancelWaitAfter(),this.$a.doCancel(),this.df=this.cb=null,window.removeEventListener("resize",this.uH,!1),window.removeEventListener("mousemove",this.Rp,!0),window.removeEventListener("mousedown",this.Qp,!0),window.removeEventListener("mouseup",this.Tp,!0),window.removeEventListener("mousewheel",this.th,!0),window.removeEventListener("DOMMouseScroll",this.th,!0),window.removeEventListener("mouseout",this.Sp,!0)):this.zf=!1;this.Sb=null;if(null!==a){if(b=a.ba)b.ok=null;gj(this,a);this.ku()}}}); -function jj(a){var b=a.cb;b.addEventListener("touchstart",a.iH,!1);b.addEventListener("touchmove",a.hH,!1);b.addEventListener("touchend",a.gH,!1);b.addEventListener("mousemove",a.Rp,!1);b.addEventListener("mousedown",a.Qp,!1);b.addEventListener("mouseup",a.Tp,!1);b.addEventListener("mousewheel",a.th,!1);b.addEventListener("DOMMouseScroll",a.th,!1);b.addEventListener("mouseout",a.Sp,!1);b.addEventListener("keydown",a.IJ,!1);b.addEventListener("keyup",a.JJ,!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.kn===mi&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.dK,!1);b.addEventListener("pointermove",a.fK,!1);b.addEventListener("pointerleave",a.eK,!1);window.addEventListener("resize",a.uH,!1)}function wi(a,b){a.Nm=null;b&&a.sG()} -y.prototype.computePixelRatio=function(){if(null!==this.Nm)return this.Nm;var a=this.df;return(window.devicePixelRatio||1)/(a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1)};y.prototype.doMouseMove=function(){this.$a.doMouseMove()};y.prototype.doMouseDown=function(){this.$a.doMouseDown()};y.prototype.doMouseUp=function(){this.$a.doMouseUp()};y.prototype.doMouseWheel=function(){this.$a.doMouseWheel()}; -y.prototype.doKeyDown=function(){this.$a.doKeyDown()};y.prototype.doKeyUp=function(){this.$a.doKeyUp()};function si(a){if(null!==a.cb){var b=a.Sb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Wk?a.Qd:0,d=a.Vk?a.Qd:0,f=a.Ie;a.Ie=a.computePixelRatio();a.Ie!==f&&(a.hr=!0,a.$e());if(b.clientWidth!==a.Kb+c||b.clientHeight!==a.Jb+d)a.jm=!0,a.ce=!0,b=a.Nb,null!==b&&b.Tt&&b.L(),a.Md||a.$e()}}}y.prototype.focus=y.prototype.focus=function(){this.cb&&this.cb.focus()}; -function ba(a,b,c){void 0===b&&(b=a.df);void 0===c&&(c=!0);c&&(b.Gu="");b.In="";b.Zl=""}function dj(a){var b=new Ue;b.name="Background";a.ht(b);b=new Ue;b.name="";a.ht(b);b=new Ue;b.name="Foreground";a.ht(b);b=new Ue;b.name="Adornment";b.Ec=!0;a.ht(b);b=new Ue;b.name="Tool";b.Ec=!0;b.HA=!0;a.ht(b);b=new Ue;b.name="Grid";b.Le=!1;b.tf=!1;b.Ec=!0;a.bI(b,a.xl("Background"))} -function kj(a){a.ld=new G(lj);a.ld.name="GRID";var b=new W;b.Gb="LineH";b.stroke="lightgray";b.ob=.5;b.interval=1;a.ld.add(b);b=new W;b.Gb="LineH";b.stroke="gray";b.ob=.5;b.interval=5;a.ld.add(b);b=new W;b.Gb="LineH";b.stroke="gray";b.ob=1;b.interval=10;a.ld.add(b);b=new W;b.Gb="LineV";b.stroke="lightgray";b.ob=.5;b.interval=1;a.ld.add(b);b=new W;b.Gb="LineV";b.stroke="gray";b.ob=.5;b.interval=5;a.ld.add(b);b=new W;b.Gb="LineV";b.stroke="gray";b.ob=1;b.interval=10;a.ld.add(b);b=new z;b.add(a.ld); -b.We="Grid";b.Qt=!1;b.GA=!1;b.tf=!1;b.Vt="GRID";a.add(b);a.mb.remove(b);a.ld.visible=!1} -y.prototype.rD=function(){if(this.ba.isEnabled){var a=this.ba;if(a.zz&&null!==a.cb){a.bw=!0;var b=a.Lc,c=a.sb,d=b.width,f=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=a.scale;if(fl&&(a.position= -new I(-(a.Sj.scrollWidth-a.Kb)+this.scrollLeft-a.Kb/r+a.Lc.right,a.position.y))),this.JD&&a.Me&&(bn&&(a.position=new I(a.position.x,-(a.Tj.scrollHeight-a.Jb)+this.scrollTop-a.Jb/r+a.Lc.bottom))),w.B(s),mj(a),a.bw=!1,a.jm=!1,b=a.Lc,c=a.sb,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,f>=d&&p>=q&&k<=l&&(a.Az.style.width="1px"),h>=g&&b>=c&&m<=n&&(a.Bz.style.height="1px")}}else nj(this.ba)}; -y.prototype.Uv=function(){this.ba.isEnabled?this.ba.zz=!0:nj(this.ba)};y.prototype.computeBounds=y.prototype.Eg=function(){0c&&(f=c),fa.Mg&&(f=a.Mg),f):b===vj?(f=l>k?(h-a.Qd)/d:(g-a.Qd)/f,f>c&&(f=c),fa.Mg&&(f=a.Mg),f):a.scale}y.prototype.zoomToFit=y.prototype.zoomToFit=function(){this.scale=rj(this,uj)}; -y.prototype.zoomToRect=function(a,b){void 0===b&&(b=uj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var f=1;if(b===uj||b===vj)if(isNaN(c))f=this.sb.height*this.scale/d;else if(isNaN(d))f=this.sb.width*this.scale/c;else var f=this.Kb,g=this.Jb,f=b===vj?g/d>f/c?(g-(this.Vk?this.Qd:0))/d:(f-(this.Wk?this.Qd:0))/c:Math.min(g/d,f/c);this.scale=f;this.position=new I(a.x,a.y)}};w.g(y,"isAligning",y.prototype.px); -w.defineProperty(y,{px:null},function(){return this.Cc},function(a){this.Cc=a});y.prototype.alignDocument=function(a,b){this.yi&&tj(this,this.Eg());var c=this.Lc,d=this.sb,f=this.Cc;this.Cc=!0;this.position=new I(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));this.Cc=f;this.ra()}; -function sj(a,b,c,d,f,g,h){var k=b.x,l=b.y;if(h||a.zB===Zi)g.sd()&&(d>c.width&&(k=c.x+(g.x*c.width+g.offsetX)-(g.x*d-g.offsetX)),f>c.height&&(l=c.y+(g.y*c.height+g.offsetY)-(g.y*f-g.offsetY))),g=a.yB,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lc.touches.length)&&c.preventDefault();c.cancelBubble=!0;return!1} -y.prototype.IJ=function(a){if(!this.ba.isEnabled)return!1;var b=this.ba.Tb;xj(this.ba,this.ba,a,b,!1);b.key=String.fromCharCode(a.which);b.pk=!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?fa(this.ba,b,a):(a.cancelBubble=!0,a.preventDefault(),a.stopPropagation(),!1)}; -y.prototype.JJ=function(a){if(!this.ba.isEnabled)return!1;var b=this.ba.Tb;xj(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 fa(this.ba,b,a)};y.prototype.mo=function(a){var b=this.cb;if(null===b)return new I(0,0);var c=this.Kb,d=this.Jb,b=b.getBoundingClientRect(),c=a.clientX-c/b.width*b.left;a=a.clientY-d/b.height*b.top;return null!==this.od?(a=new I(c,a),eb(a,this.od),a):new I(c,a)}; -function yj(a,b,c){var d=a.cb,f=a.Kb,g=a.Jb,h=0,k=0;null!==d&&(d=d.getBoundingClientRect(),h=b.clientX-f/d.width*d.left,k=b.clientY-g/d.height*d.top);c.$d.o(h,k);null!==a.od?(b=w.nc(h,k),a.od.di(b),c.ha.assign(b),w.B(b)):c.ha.o(h,k)}y.prototype.invalidateDocumentBounds=y.prototype.uc=function(){this.yi||(this.yi=!0,this.$e())};function Ci(a){a.Md||oj(a);a.yi&&tj(a,a.Eg());for(a=a.ym.k;a.next();)Ci(a.value)} -y.prototype.redraw=y.prototype.ku=function(){this.Cc||this.Md||(this.ra(),Bj(this),mj(this),this.uc(),this.rf())};y.prototype.isUpdateRequested=function(){return this.Wf};y.prototype.delayInitialization=y.prototype.VI=function(a){void 0===a&&(a=null);var b=this.Vb,c=b.isEnabled;b.jj();b.isEnabled=!1;Ng(this);this.zf=!1;b.isEnabled=c;null!==a&&w.setTimeout(a,1)}; -y.prototype.requestUpdate=y.prototype.$e=function(a){void 0===a&&(a=!1);if(!0!==this.Wf&&!(this.Cc||!1===a&&this.Md)){this.Wf=!0;var b=this;requestAnimationFrame(function(){b.Wf&&b.rf()})}};y.prototype.maybeUpdate=y.prototype.rf=function(){if(!this.jo||this.Wf)this.jo&&(this.jo=!1),Ng(this)};function Cj(a,b){a.Cc||!a.jm||nj(a)||(b&&oj(a),qj(a,!1))} -function Ng(a){if(!a.Md&&(a.Wf=!1,null!==a.Sb)){a.Md=!0;var b=a.ni,c=!1,d=!1;b.rh&&(d=!0,c=a.fb,a.fb=!0);b.zd||si(a);Cj(a,!1);null!==a.ld&&(a.ld.visible&&!a.ov&&(Dj(a),a.ov=!0),!a.ld.visible&&a.ov&&(a.ov=!1));oj(a);0!==a.gm.count&&(Ej(a),oj(a));var f=!1;if(!a.zf||a.Qu)a.zf?Fj(a,!a.fv):(a.jc("Initial Layout"),!1===b.isEnabled&&b.jj(),Fj(a,!1)),f=!0;a.fv=!1;oj(a);a.Ez||b.rh||Ci(a);f&&(a.zf||(b=a.$b.q,a.Mf(b,b.length,a),Gj(a),Dj(a)),a.Ha("LayoutCompleted"));oj(a);Cj(a,!0);f&&!a.zf&&(a.zf=!0,a.je("Initial Layout"), -a.fb||a.oa.clear(),w.setTimeout(function(){a.sh=!1},1));a.kf();d&&(a.fb=c);a.Md=!1}}function Gj(a){if(a.Yk!==Gf)a.scale=rj(a,a.Yk);else if(a.$l!==Gf)a.scale=rj(a,a.$l);else{var b=a.FF;isFinite(b)&&0b;b++){var c=a.qg.k;if(null===c||0===a.qg.count)break;a.qg=new K(T);var d=a,f=a.qg;for(c.reset();c.next();){var g=c.value;!g.Td()||g instanceof E||!g.Oa()||(g.Gl()?(ai(g,Infinity,Infinity),g.Jc()):f.add(g))}for(c.reset();c.next();)g=c.value,g instanceof E&&g.Oa()&&Hj(d,g);for(c.reset();c.next();)g=c.value,g instanceof F&&(d=g,d.Oa()&&(d.Gl()?(ai(d,Infinity,Infinity),d.Jc(),d.Wt()):f.add(d)));for(c.reset();c.next();)d=c.value,d instanceof -da&&d.Oa()&&(d.Gl()?(ai(d,Infinity,Infinity),d.Jc()):f.add(d));t&&22===b&&w.trace("failure to validate parts")}} -function Hj(a,b){for(var c=w.rb(),d=w.rb(),f=b.Mc;f.next();){var g=f.value;g.Oa()&&(g instanceof E?(Ij(g)||Jj(g)||Kj(g))&&Hj(a,g):g instanceof F?g.Y==b||g.fa==b?d.push(g):c.push(g):(ai(g,Infinity,Infinity),g.Jc()))}for(var f=c.length,h=0;hk+1&&(n=Math.max((v- -k)*H+a.Kb,n)),q+1l+1&&(B=Math.max((p-l)*H+a.Jb,B)),r+1k+1&&(n=Math.max((v-k)*H+a.Kb,n)),q+1l+1&&(B=Math.max((p-l)*H+a.Jb,B)),r+1k+1&&(a.Sj.scrollLeft=a.position.x*H));a.lx&&a.Me&&(r+1l+1&&(a.Tj.scrollTop=a.position.y*H));h&&(a.hr=!0);m=a.Kb;c=a.Jb;a.Tj.style.height=c+"px";a.Tj.style.width=m+(a.Wk?a.Qd:0)+"px";a.Sj.style.width=m+"px";a.Sj.style.height=c+(a.Vk?a.Qd:0)+"px";a.zz=!1;return d!==m||f!==c||a.Vb.zd?(n=a.sb,a.eu(g,n,h),!1):!0} -y.prototype.add=y.prototype.add=function(a){w.l(a,z,y,"add:part");var b=a.i;if(b!==this){null!==b&&w.m("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.Kn&&(a.al="Tool");var c=a.We,b=this.xl(c);null===b&&(b=this.xl(""));null===b&&w.m('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.vp(99999999,a,a.i===this),0<=c&&this.Nc(we,"parts",b,null,a,null,c),b.Ec||this.uc(),a.L(Rj),c=a.Ep,null!== -c&&c(a,null,b))}}; -y.prototype.vp=function(a){if(a instanceof C){if(this.ds.add(a),a instanceof E){var b=a.Wa;null===b?this.ml.add(a):b.wm.add(a);b=a.Nb;null!==b&&(b.i=this)}}else a instanceof F?this.Gr.add(a):a instanceof da||this.mb.add(a);a.Yb&&a.W();b=a.data;if(null!==b){a instanceof da||(a instanceof F?this.Qk.add(b,a):this.ti.add(b,a));var c=this;Sj(a,function(a){Tj(c,a)})}!0!==Jj(a)&&!0!==Kj(a)||this.qg.add(a);Uj(a,!0,this);Vj(a)?(a.da.J()&&this.ra(Wi(a,a.da)),this.uc()):a.Oa()&&a.da.J()&&this.ra(Wi(a,a.da)); -this.$e()};y.prototype.nf=function(a){a.rt();if(a instanceof C){if(this.ds.remove(a),a instanceof E){var b=a.Wa;null===b?this.ml.remove(a):b.wm.remove(a);b=a.Nb;null!==b&&(b.i=null)}}else a instanceof F?this.Gr.remove(a):a instanceof da||this.mb.remove(a);b=a.data;if(null!==b){a instanceof da||(a instanceof F?this.Qk.remove(b):this.ti.remove(b));var c=this;Sj(a,function(a){Wj(c,a)})}this.qg.remove(a);Vj(a)?(a.da.J()&&this.ra(Wi(a,a.da)),this.uc()):a.Oa()&&a.da.J()&&this.ra(Wi(a,a.da));this.$e()}; -y.prototype.remove=y.prototype.remove=function(a){w.l(a,z,y,"remove:part");a.bb=!1;a.Lg=!1;var b=a.layer;if(null!==b&&b.i===this){a.L(Xj);a.en();var c=b.nf(-1,a,!1);0<=c&&this.Nc(xe,"parts",b,a,null,c,null);c=a.Ep;null!==c&&c(a,b,null)}};y.prototype.removeParts=y.prototype.oB=function(a,b){if(w.isArray(a))for(var c=w.vb(a),d=0;dd&&this.uc()}; -y.prototype.addLayerAfter=function(a,b){Yj(this,a,b);a.Oc(this);var c=this.$b,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.ee&&this.Nc(xe,"layers",this,a,null,d,null));for(var f=c.count,g=0;gd&&this.uc()}; -y.prototype.removeLayer=function(a){w.l(a,Ue,y,"removeLayer:layer");a.i!==this&&w.m("Cannot remove a Layer from another Diagram: "+a+" of "+a.i);if(""!==a.name){var b=this.$b,c=b.indexOf(a);if(b.remove(a)){for(b=a.mb.copy().k;b.next();){var d=b.value,f=d.We;d.We=f!==a.name?f:""}null!==this.ee&&this.Nc(xe,"layers",this,a,null,c,null);this.ra();this.uc()}}};y.prototype.findLayer=y.prototype.xl=function(a){for(var b=this.rn;b.next();){var c=b.value;if(c.name===a)return c}return null}; -y.prototype.addChangedListener=y.prototype.Vz=function(a){w.h(a,"function",y,"addChangedListener:listener");null===this.rj&&(this.rj=new J("function"));this.rj.add(a)};y.prototype.removeChangedListener=y.prototype.lB=function(a){w.h(a,"function",y,"removeChangedListener:listener");null!==this.rj&&(this.rj.remove(a),0===this.rj.count&&(this.rj=null))}; -y.prototype.Gw=function(a){this.fb||this.oa.xF(a);a.Dd!==ve&&(this.sh=!0);if(null!==this.rj){var b=this.rj,c=b.length;if(1===c)b=b.na(0),b(a);else if(0!==c)for(var d=b.bf(),f=0;fa.Mg&&(c=a.Mg);a.position=new I(a.Ra.x+h.x/b-h.x/c,a.Ra.y+h.y/b- -h.y/c);a.Cc=!1;a.bc=c;a.eu(d,a.sb);qj(a,!1);a.ra();Bj(a)}}y.prototype.eu=function(a,b,c){void 0===c&&(c=!1);c||Bj(this);mj(this);var d=this.Nb;null===d||!d.Tt||c||a.width===b.width&&a.height===b.height||d.L();d=this.$a;!0===this.lm&&d instanceof wf&&(this.R.ha=this.mH(this.R.$d),d.doMouseMove());this.EA(a,b);Dj(this);this.Ha("ViewportBoundsChanged",c?w.zh:null,a)}; -function Dj(a,b){void 0===b&&(b=null);var c=a.ld;if(null!==c&&c.visible){for(var d=w.Ul(),f=1,g=1,h=c.Ba.q,k=h.length,l=0;ln||(fk(m.Gb)?g=g*n/M.qF(g,n):f=f*n/M.qF(f,n))}h=c.Ht;d.o(g*h.width,f*h.height);h=g=l=k=0;if(null!==b)k=b.width,l=b.height,g=b.x,h=b.y;else{f=w.ig();g=a.sb;f.o(g.x,g.y,g.width,g.height);for(h=a.ym.k;h.next();)g=h.value.sb,g.J()&&yb(f,g.x,g.y,g.width,g.height);k=f.width;l=f.height;g=f.x;h=f.y;if(!f.J())return}c.width=k+2*d.width;c.height=l+2*d.height; -f=w.P();M.Dt(g,h,0,0,d.width,d.height,f);f.offset(-d.width,-d.height);w.sk(d);c.Z.location=f;w.B(f)}}y.prototype.clearSelection=y.prototype.Iw=function(){var a=0a&&w.ka(a,">= zero",y,"linkSpacing"),this.Ej=a,this.j("linkSpacing",b,a))});w.A(y,{rn:"layers"},function(){return this.$b.k});w.g(y,"isModelReadOnly",y.prototype.of); -w.defineProperty(y,{of:"isModelReadOnly"},function(){var a=this.ee;return null===a?!1:a.nb},function(a){var b=this.ee;null!==b&&(b.nb=a)});w.g(y,"isReadOnly",y.prototype.nb);w.defineProperty(y,{nb:"isReadOnly"},function(){return this.$k},function(a){var b=this.$k;b!==a&&(w.h(a,"boolean",y,"isReadOnly"),this.$k=a,this.j("isReadOnly",b,a))});w.g(y,"isEnabled",y.prototype.isEnabled); -w.defineProperty(y,{isEnabled:"isEnabled"},function(){return this.ef},function(a){var b=this.ef;b!==a&&(w.h(a,"boolean",y,"isEnabled"),this.ef=a,this.j("isEnabled",b,a))});w.g(y,"allowClipboard",y.prototype.Cw);w.defineProperty(y,{Cw:"allowClipboard"},function(){return this.Iu},function(a){var b=this.Iu;b!==a&&(w.h(a,"boolean",y,"allowClipboard"),this.Iu=a,this.j("allowClipboard",b,a))});w.g(y,"allowCopy",y.prototype.Zh); -w.defineProperty(y,{Zh:"allowCopy"},function(){return this.Bk},function(a){var b=this.Bk;b!==a&&(w.h(a,"boolean",y,"allowCopy"),this.Bk=a,this.j("allowCopy",b,a))});w.g(y,"allowDelete",y.prototype.ek);w.defineProperty(y,{ek:"allowDelete"},function(){return this.Ck},function(a){var b=this.Ck;b!==a&&(w.h(a,"boolean",y,"allowDelete"),this.Ck=a,this.j("allowDelete",b,a))});w.g(y,"allowDragOut",y.prototype.kt); -w.defineProperty(y,{kt:"allowDragOut"},function(){return this.Ju},function(a){var b=this.Ju;b!==a&&(w.h(a,"boolean",y,"allowDragOut"),this.Ju=a,this.j("allowDragOut",b,a))});w.g(y,"allowDrop",y.prototype.Yz);w.defineProperty(y,{Yz:"allowDrop"},function(){return this.Ku},function(a){var b=this.Ku;b!==a&&(w.h(a,"boolean",y,"allowDrop"),this.Ku=a,this.j("allowDrop",b,a))});w.g(y,"allowTextEdit",y.prototype.Xo); -w.defineProperty(y,{Xo:"allowTextEdit"},function(){return this.Lk},function(a){var b=this.Lk;b!==a&&(w.h(a,"boolean",y,"allowTextEdit"),this.Lk=a,this.j("allowTextEdit",b,a))});w.g(y,"allowGroup",y.prototype.Uo);w.defineProperty(y,{Uo:"allowGroup"},function(){return this.Dk},function(a){var b=this.Dk;b!==a&&(w.h(a,"boolean",y,"allowGroup"),this.Dk=a,this.j("allowGroup",b,a))});w.g(y,"allowUngroup",y.prototype.Yo); -w.defineProperty(y,{Yo:"allowUngroup"},function(){return this.Mk},function(a){var b=this.Mk;b!==a&&(w.h(a,"boolean",y,"allowUngroup"),this.Mk=a,this.j("allowUngroup",b,a))});w.g(y,"allowInsert",y.prototype.Sm);w.defineProperty(y,{Sm:"allowInsert"},function(){return this.Mu},function(a){var b=this.Mu;b!==a&&(w.h(a,"boolean",y,"allowInsert"),this.Mu=a,this.j("allowInsert",b,a))});w.g(y,"allowLink",y.prototype.Tm); -w.defineProperty(y,{Tm:"allowLink"},function(){return this.Ek},function(a){var b=this.Ek;b!==a&&(w.h(a,"boolean",y,"allowLink"),this.Ek=a,this.j("allowLink",b,a))});w.g(y,"allowRelink",y.prototype.fk);w.defineProperty(y,{fk:"allowRelink"},function(){return this.Gk},function(a){var b=this.Gk;b!==a&&(w.h(a,"boolean",y,"allowRelink"),this.Gk=a,this.j("allowRelink",b,a))});w.g(y,"allowMove",y.prototype.Si); -w.defineProperty(y,{Si:"allowMove"},function(){return this.Fk},function(a){var b=this.Fk;b!==a&&(w.h(a,"boolean",y,"allowMove"),this.Fk=a,this.j("allowMove",b,a))});w.g(y,"allowReshape",y.prototype.Vo);w.defineProperty(y,{Vo:"allowReshape"},function(){return this.Hk},function(a){var b=this.Hk;b!==a&&(w.h(a,"boolean",y,"allowReshape"),this.Hk=a,this.j("allowReshape",b,a))});w.g(y,"allowResize",y.prototype.Um); -w.defineProperty(y,{Um:"allowResize"},function(){return this.Ik},function(a){var b=this.Ik;b!==a&&(w.h(a,"boolean",y,"allowResize"),this.Ik=a,this.j("allowResize",b,a))});w.g(y,"allowRotate",y.prototype.Wo);w.defineProperty(y,{Wo:"allowRotate"},function(){return this.Jk},function(a){var b=this.Jk;b!==a&&(w.h(a,"boolean",y,"allowRotate"),this.Jk=a,this.j("allowRotate",b,a))});w.g(y,"allowSelect",y.prototype.Le); -w.defineProperty(y,{Le:"allowSelect"},function(){return this.Kk},function(a){var b=this.Kk;b!==a&&(w.h(a,"boolean",y,"allowSelect"),this.Kk=a,this.j("allowSelect",b,a))});w.g(y,"allowUndo",y.prototype.Zz);w.defineProperty(y,{Zz:"allowUndo"},function(){return this.Nu},function(a){var b=this.Nu;b!==a&&(w.h(a,"boolean",y,"allowUndo"),this.Nu=a,this.j("allowUndo",b,a))});w.g(y,"allowZoom",y.prototype.lt); -w.defineProperty(y,{lt:"allowZoom"},function(){return this.Pu},function(a){var b=this.Pu;b!==a&&(w.h(a,"boolean",y,"allowZoom"),this.Pu=a,this.j("allowZoom",b,a))});w.g(y,"hasVerticalScrollbar",y.prototype.lx);w.defineProperty(y,{lx:"hasVerticalScrollbar"},function(){return this.sv},function(a){var b=this.sv;b!==a&&(w.h(a,"boolean",y,"hasVerticalScrollbar"),this.sv=a,Bj(this),this.ra(),this.j("hasVerticalScrollbar",b,a),qj(this,!1))});w.g(y,"hasHorizontalScrollbar",y.prototype.kx); -w.defineProperty(y,{kx:"hasHorizontalScrollbar"},function(){return this.rv},function(a){var b=this.rv;b!==a&&(w.h(a,"boolean",y,"hasHorizontalScrollbar"),this.rv=a,Bj(this),this.ra(),this.j("hasHorizontalScrollbar",b,a),qj(this,!1))});w.g(y,"allowHorizontalScroll",y.prototype.Ke);w.defineProperty(y,{Ke:"allowHorizontalScroll"},function(){return this.Lu},function(a){var b=this.Lu;b!==a&&(w.h(a,"boolean",y,"allowHorizontalScroll"),this.Lu=a,this.j("allowHorizontalScroll",b,a),qj(this,!1))}); -w.g(y,"allowVerticalScroll",y.prototype.Me);w.defineProperty(y,{Me:"allowVerticalScroll"},function(){return this.Ou},function(a){var b=this.Ou;b!==a&&(w.h(a,"boolean",y,"allowVerticalScroll"),this.Ou=a,this.j("allowVerticalScroll",b,a),qj(this,!1))});w.g(y,"scrollHorizontalLineChange",y.prototype.eq); -w.defineProperty(y,{eq:"scrollHorizontalLineChange"},function(){return this.cw},function(a){var b=this.cw;b!==a&&(w.h(a,"number",y,"scrollHorizontalLineChange"),0>a&&w.ka(a,">= 0",y,"scrollHorizontalLineChange"),this.cw=a,this.j("scrollHorizontalLineChange",b,a))});w.g(y,"scrollVerticalLineChange",y.prototype.fq); -w.defineProperty(y,{fq:"scrollVerticalLineChange"},function(){return this.dw},function(a){var b=this.dw;b!==a&&(w.h(a,"number",y,"scrollVerticalLineChange"),0>a&&w.ka(a,">= 0",y,"scrollVerticalLineChange"),this.dw=a,this.j("scrollVerticalLineChange",b,a))});w.g(y,"lastInput",y.prototype.R);w.defineProperty(y,{R:"lastInput"},function(){return this.Tb},function(a){t&&w.l(a,ie,y,"lastInput");this.Tb=a});w.g(y,"firstInput",y.prototype.Bc); -w.defineProperty(y,{Bc:"firstInput"},function(){return this.Sk},function(a){t&&w.l(a,ie,y,"firstInput");this.Sk=a});w.g(y,"currentCursor",y.prototype.fc);w.defineProperty(y,{fc:"currentCursor"},function(){return this.Fy},function(a){""===a&&(a=this.Rq);this.Fy!==a&&(w.h(a,"string",y,"currentCursor"),null!==this.cb&&(this.Fy=a,this.cb.style.cursor=a,this.Sb.style.cursor=a))});w.g(y,"defaultCursor",y.prototype.LI); -w.defineProperty(y,{LI:"defaultCursor"},function(){return this.Rq},function(a){""===a&&(a="auto");var b=this.Rq;b!==a&&(w.h(a,"string",y,"defaultCursor"),this.Rq=a,this.j("defaultCursor",b,a))});w.g(y,"hasGestureZoom",y.prototype.rJ);w.defineProperty(y,{rJ:"hasGestureZoom"},function(){return this.oo},function(a){var b=this.oo;b!==a&&(w.h(a,"boolean",y,"hasGestureZoom"),this.oo=a,this.j("hasGestureZoom",b,a))});w.g(y,"click",y.prototype.click); -w.defineProperty(y,{click:"click"},function(){return this.pi},function(a){var b=this.pi;b!==a&&(null!==a&&w.h(a,"function",y,"click"),this.pi=a,this.j("click",b,a))});w.g(y,"doubleClick",y.prototype.fn);w.defineProperty(y,{fn:"doubleClick"},function(){return this.wi},function(a){var b=this.wi;b!==a&&(null!==a&&w.h(a,"function",y,"doubleClick"),this.wi=a,this.j("doubleClick",b,a))});w.g(y,"contextClick",y.prototype.vt); -w.defineProperty(y,{vt:"contextClick"},function(){return this.ri},function(a){var b=this.ri;b!==a&&(null!==a&&w.h(a,"function",y,"contextClick"),this.ri=a,this.j("contextClick",b,a))});w.g(y,"mouseOver",y.prototype.au);w.defineProperty(y,{au:"mouseOver"},function(){return this.Gi},function(a){var b=this.Gi;b!==a&&(null!==a&&w.h(a,"function",y,"mouseOver"),this.Gi=a,this.j("mouseOver",b,a))});w.g(y,"mouseHover",y.prototype.$t); -w.defineProperty(y,{$t:"mouseHover"},function(){return this.Fi},function(a){var b=this.Fi;b!==a&&(null!==a&&w.h(a,"function",y,"mouseHover"),this.Fi=a,this.j("mouseHover",b,a))});w.g(y,"mouseHold",y.prototype.Zt);w.defineProperty(y,{Zt:"mouseHold"},function(){return this.Ei},function(a){var b=this.Ei;b!==a&&(null!==a&&w.h(a,"function",y,"mouseHold"),this.Ei=a,this.j("mouseHold",b,a))});w.g(y,"mouseDragOver",y.prototype.kG); -w.defineProperty(y,{kG:"mouseDragOver"},function(){return this.Qv},function(a){var b=this.Qv;b!==a&&(null!==a&&w.h(a,"function",y,"mouseDragOver"),this.Qv=a,this.j("mouseDragOver",b,a))});w.g(y,"mouseDrop",y.prototype.Yt);w.defineProperty(y,{Yt:"mouseDrop"},function(){return this.Di},function(a){var b=this.Di;b!==a&&(null!==a&&w.h(a,"function",y,"mouseDrop"),this.Di=a,this.j("mouseDrop",b,a))});w.g(y,"toolTip",y.prototype.zu); -w.defineProperty(y,{zu:"toolTip"},function(){return this.Ni},function(a){var b=this.Ni;b!==a&&(null!==a&&w.l(a,da,y,"toolTip"),this.Ni=a,this.j("toolTip",b,a))});w.g(y,"contextMenu",y.prototype.contextMenu);w.defineProperty(y,{contextMenu:"contextMenu"},function(){return this.si},function(a){var b=this.si;b!==a&&(null!==a&&w.l(a,da,y,"contextMenu"),this.si=a,this.j("contextMenu",b,a))});w.g(y,"commandHandler",y.prototype.Fb); -w.defineProperty(y,{Fb:"commandHandler"},function(){return this.wy},function(a){var b=this.wy;b!==a&&(w.l(a,wa,y,"commandHandler"),null!==a.i&&w.m("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Oc(null),this.wy=a,a.Oc(this))});w.g(y,"toolManager",y.prototype.Ab); -w.defineProperty(y,{Ab:"toolManager"},function(){return this.Nz},function(a){var b=this.Nz;b!==a&&(w.l(a,wf,y,"toolManager"),null!==a.i&&w.m("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Oc(null),this.Nz=a,a.Oc(this))});w.g(y,"defaultTool",y.prototype.Rw);w.defineProperty(y,{Rw:"defaultTool"},function(){return this.Ly},function(a){var b=this.Ly;b!==a&&(w.l(a,Ve,y,"defaultTool"),this.Ly=a,this.$a===b&&(this.$a=a))});w.g(y,"currentTool",y.prototype.$a); -w.defineProperty(y,{$a:"currentTool"},function(){return this.Hy},function(a){var b=this.Hy;if(null!==b)for(b.sa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop(),b=this.ym.k;b.next();)b.value.ra();null===a&&(a=this.Rw);null!==a&&(w.l(a,Ve,y,"currentTool"),this.Hy=a,a.Oc(this),a.doStart())});w.A(y,{selection:"selection"},function(){return this.gw});w.g(y,"maxSelectionCount",y.prototype.cG); -w.defineProperty(y,{cG:"maxSelectionCount"},function(){return this.Lv},function(a){var b=this.Lv;if(b!==a)if(w.h(a,"number",y,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Lv=a,this.j("maxSelectionCount",b,a),!this.oa.zb&&(a=this.selection.count-a,0= 0",y,"maxSelectionCount")});w.g(y,"nodeSelectionAdornmentTemplate",y.prototype.nG); -w.defineProperty(y,{nG:"nodeSelectionAdornmentTemplate"},function(){return this.Sv},function(a){var b=this.Sv;b!==a&&(w.l(a,da,y,"nodeSelectionAdornmentTemplate"),this.Sv=a,this.j("nodeSelectionAdornmentTemplate",b,a))});w.g(y,"groupSelectionAdornmentTemplate",y.prototype.wF);w.defineProperty(y,{wF:"groupSelectionAdornmentTemplate"},function(){return this.pv},function(a){var b=this.pv;b!==a&&(w.l(a,da,y,"groupSelectionAdornmentTemplate"),this.pv=a,this.j("groupSelectionAdornmentTemplate",b,a))}); -w.g(y,"linkSelectionAdornmentTemplate",y.prototype.$F);w.defineProperty(y,{$F:"linkSelectionAdornmentTemplate"},function(){return this.Gv},function(a){var b=this.Gv;b!==a&&(w.l(a,da,y,"linkSelectionAdornmentTemplate"),this.Gv=a,this.j("linkSelectionAdornmentTemplate",b,a))});w.A(y,{mx:"highlighteds"},function(){return this.tv});w.g(y,"isModified",y.prototype.sh); -w.defineProperty(y,{sh:"isModified"},function(){var a=this.oa;return a.isEnabled?null!==a.$i?!0:this.fz&&this.eh!==a.dj:this.fz},function(a){if(this.fz!==a){w.h(a,"boolean",y,"isModified");this.fz=a;var b=this.oa;!a&&b.isEnabled&&(this.eh=b.dj);a||ok(this)}});function ok(a){var b=a.sh;a.jE!==b&&(a.jE=b,a.Ha("Modified"))}w.g(y,"model",y.prototype.ia); -w.defineProperty(y,{ia:"model"},function(){return this.ee},function(a){var b=this.ee;if(b!==a){w.l(a,L,y,"model");this.$a.doCancel();null!==b&&b.oa!==a.oa&&b.oa.MF&&w.m("Do not replace a Diagram.model while a transaction is in progress.");this.Vb.jj();this.Iw();this.zf=!1;this.jo=!0;this.eh=-2;this.Wf=!1;var c=this.Md;this.Md=!0;this.Vb.Ml();null!==b&&(b.lB(this.mD),b instanceof U&&pk(this,b.fj),pk(this,b.Pg));this.ee=a;a.Vz(this.lD);qk(this,a.Pg);a instanceof U&&rk(this,a.fj);a.lB(this.lD);a.Vz(this.mD); -this.Md=c;this.Cc||this.ra();null!==b&&(a.oa.isEnabled=b.oa.isEnabled)}});w.defineProperty(y,{Ta:null},function(){return this.eD},function(a){this.eD=a}); -function bj(a,b){if(b.ia===a.ia){var c=b.Dd,d=b.propertyName;if(c===ve&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.Ab,c.sf.each(function(b){b.Oc(a)}),c.cg.each(function(b){b.Oc(a)}),c.dg.each(function(b){b.Oc(a)}),a.Md||a.zf||(a.fv=!0,a.jo&&(a.Wf=!0),a.ni.Ml());else if("StartingUndo"===d||"StartingRedo"===d){var f=a.Vb;f.rh&&!a.fb&&f.jj();a.Ha("ChangingSelection")}else"StartedTransaction"===d&&(f=a.Vb,f.rh&&!a.fb&&f.jj(),a.Cv&&f.Ml());else if(a.Ta){a.Ta=!1;try{var g=b.Kf;if(""!==g)if(c===le){if("linkFromKey"=== -g){var h=b.object,k=a.Gg(h);if(null!==k){var l=b.newValue,m=a.lf(l);k.Y=m}}else if("linkToKey"===g)h=b.object,k=a.Gg(h),null!==k&&(l=b.newValue,m=a.lf(l),k.fa=m);else if("linkFromPortId"===g){if(h=b.object,k=a.Gg(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.Ef=n)}}else if("linkToPortId"===g)h=b.object,k=a.Gg(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.kg=n));else if("nodeGroupKey"===g){var h=b.object,p=a.ci(h);if(null!==p){var q=b.newValue;if(void 0!==q){var r=a.lf(q);p.Wa=r instanceof -E?r:null}else p.Wa=null}}else if("linkLabelKeys"===g){if(h=b.object,k=a.Gg(h),null!==k){var s=b.oldValue,u=b.newValue;if(w.isArray(s))for(var v=w.vb(s),A=0;Al)){var m=l;yk(k)&&m++;k.nf(m);zk(k,m,l)}}}} -function Tj(a,b){var c=b.Ai;if(w.isArray(c)){var d=a.om.Da(c);if(null===d)d=[],d.push(b),a.om.add(c,d);else{for(c=0;c=g.length)return!1;for(var h=0;hthis.scale&&(this.scale=a)):w.ka(a,"> 0",y,"minScale"))}); -w.g(y,"maxScale",y.prototype.Mg);w.defineProperty(y,{Mg:"maxScale"},function(){return this.Kv},function(a){w.p(a,y,"maxScale");var b=this.Kv;b!==a&&(0 0",y,"maxScale"))});w.g(y,"zoomPoint",y.prototype.Yl);w.defineProperty(y,{Yl:"zoomPoint"},function(){return this.xw},function(a){this.xw.O(a)||(w.l(a,I,y,"zoomPoint"),this.xw=a=a.ea())});w.g(y,"contentAlignment",y.prototype.Lw); -w.defineProperty(y,{Lw:"contentAlignment"},function(){return this.Sn},function(a){var b=this.Sn;b.O(a)||(w.l(a,P,y,"contentAlignment"),this.Sn=a=a.ea(),this.j("contentAlignment",b,a),qj(this,!1))});w.g(y,"initialContentAlignment",y.prototype.vJ);w.defineProperty(y,{vJ:"initialContentAlignment"},function(){return this.qo},function(a){var b=this.qo;b.O(a)||(w.l(a,P,y,"initialContentAlignment"),this.qo=a=a.ea(),this.j("initialContentAlignment",b,a))});w.g(y,"padding",y.prototype.padding); -w.defineProperty(y,{padding:"padding"},function(){return this.hf},function(a){"number"===typeof a?a=new vb(a):w.l(a,vb,y,"padding");var b=this.hf;b.O(a)||(this.hf=a=a.ea(),this.uc(),this.j("padding",b,a))});w.A(y,{Qg:"nodes"},function(){return this.ds.k});w.A(y,{links:"links"},function(){return this.Gr.k});w.A(y,{ii:"parts"},function(){return this.mb.k});y.prototype.findTopLevelGroups=function(){return this.ml.k};w.g(y,"layout",y.prototype.Nb); -w.defineProperty(y,{Nb:"layout"},function(){return this.de},function(a){var b=this.de;b!==a&&(w.l(a,We,y,"layout"),null!==b&&(b.i=null,b.group=null),this.de=a,a.i=this,a.group=null,this.Qu=!0,this.j("layout",b,a),this.$e())});y.prototype.layoutDiagram=function(a){oj(this);a&&Ck(this,!0);Fj(this,!1)};function Ck(a,b){for(var c=a.ml.k;c.next();)Kk(a,c.value,b);null!==a.Nb&&(b?a.Nb.pf=!1:a.Nb.L())} -function Kk(a,b,c){if(null!==b){for(var d=b.wm.k;d.next();)Kk(a,d.value,c);null!==b.Nb&&(c?b.Nb.pf=!1:b.Nb.L())}}function Fj(a,b){if(!a.My){var c=a.Nb,d=a.Cv;a.Cv=!0;var f=a.Ta;a.Ta=!0;try{a.jc("Layout");for(var g=a.ml.k;g.next();)Lk(a,g.value,b);c.pf||b&&!c.PA||(c.doLayout(a),oj(a),c.pf=!0)}finally{a.je("Layout"),a.Qu=!c.pf,a.Cv=d,a.Ta=f}}} -function Lk(a,b,c){if(null!==b){for(var d=b.wm.k;d.next();)Lk(a,d.value,c);d=b.Nb;null===d||d.pf||c&&!d.PA||(b.qz=!b.location.J(),d.doLayout(b),b.L(Mk),d.pf=!0,Hj(a,b))}}w.g(y,"isTreePathToChildren",y.prototype.td);w.defineProperty(y,{td:"isTreePathToChildren"},function(){return this.Bv},function(a){var b=this.Bv;if(b!==a&&(w.h(a,"boolean",y,"isTreePathToChildren"),this.Bv=a,this.j("isTreePathToChildren",b,a),!this.oa.zb))for(a=this.Qg;a.next();)Nk(a.value)}); -y.prototype.findTreeRoots=function(){for(var a=new J(C),b=this.Qg;b.next();){var c=b.value;c.vx&&null===c.Ft()&&a.add(c)}return a.k};w.g(y,"isCollapsingExpanding",y.prototype.oe);w.defineProperty(y,{oe:null},function(){return this.TC},function(a){this.TC=a}); -function $i(a){function b(a){var b=a.toLowerCase(),h=new J("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new ra("string",J),d=new ra("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.Oy=c;a.Ny=d} -function sa(a,b){var c=a.Ny.Da(b);return null!==c?c:a.Ny.Da(b.toLowerCase())}function Ok(a,b){var c=a.Oy.Da(b);if(null!==c)return c;c=a.Oy.Da(b.toLowerCase());if(null!==c)return c;w.m("Unknown DiagramEvent name: "+b);return null}y.prototype.addDiagramListener=y.prototype.Wz=function(a,b){w.h(a,"string",y,"addDiagramListener:name");w.h(b,"function",y,"addDiagramListener:listener");var c=Ok(this,a);null!==c&&c.add(b)}; -y.prototype.removeDiagramListener=y.prototype.xG=function(a,b){w.h(a,"string",y,"removeDiagramListener:name");w.h(b,"function",y,"addDiagramListener:listener");var c=Ok(this,a);null!==c&&c.remove(b)};y.prototype.raiseDiagramEvent=y.prototype.Ha=function(a,b,c){t&&w.h(a,"string",y,"raiseDiagramEvent:name");var d=Ok(this,a),f=new je;f.i=this;f.name=sa(this,a);void 0!==b&&(f.Vx=b);void 0!==c&&(f.Jx=c);a=d.length;if(1===a)d=d.na(0),d(f);else if(0!==a)for(b=d.bf(),c=0;c=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var f=a.sb,g=a.scale,f=w.yk(0,0,f.width*g,f.height*g),h=w.nc(0,0);if(b.x>=f.x&&b.xf.x+f.width-d.right&&(k=Math.max(a.eq,1),k|=0,h.x+=k,b.x>f.x+f.width-d.right/2&&(h.x+=k),b.x>f.x+f.width-d.right/4&&(h.x+=4*k));b.y>=f.y&&b.yf.y+f.height-d.bottom&&(k=Math.max(a.fq,1),k|=0,h.y+=k,b.y>f.y+f.height-d.bottom/2&&(h.y+=k),b.y>f.y+f.height-d.bottom/4&&(h.y+=4*k));h.Ue(M.Ak)||(c=new I(c.x+h.x/g,c.y+h.y/g));w.tc(f);w.B(h);return c}y.prototype.makeSVG=y.prototype.makeSvg=function(a){void 0===a&&(a=new ua);a.context="svg";a=Wk(this,a);return null!==a?a.Tl:null}; -y.prototype.makeImage=function(a){void 0===a&&(a=new ua);var b=(a.document||document).createElement("img");b.src=this.MJ(a);return b};y.prototype.makeImageData=y.prototype.MJ=function(a){void 0===a&&(a=new ua);var b=Wk(this,a);return null!==b?b.toDataURL(a.type,a.details):""};var Xk=!1; -function Wk(a,b){a.Vb.jj();a.rf();if(null===a.cb)return null;"object"!==typeof b&&w.m("properties argument must be an Object.");var c=!1,d=b.size||null,f=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(f="NaN");var g=b.maxSize;void 0===b.maxSize&&(c=!0,g="svg"===b.context?new na(Infinity,Infinity):new na(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 vb(l):l instanceof vb||(l=new vb(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;ba(a);var s=new ta(null,p),u=s.getContext("2d"),v=s;if(!(d||f||k||h))return s.width=a.Kb+Math.ceil(l.left+l.right),s.height=a.Jb+Math.ceil(l.top+l.bottom),"svg"===b.context&&(u=v=new cd(s.Sd,p,q),u instanceof -cd&&(a.eo=!0)),Oj(a,u,l,new na(s.width,s.height),a.bc,a.Ra,k,m,r,n),a.eo=!0,v;var A=a.Fb.zt,D=new I(0,0),B=a.Lc.copy();B.AK(a.padding);if(r)for(var H=!0,H=a.$b.q,O=H.length,N=0;NA?(f=A,h=B.width,ca=B.height):(h=g.width,ca=g.height)):(h=B.width*f,ca=B.height*f):(f=A,h=B.width,ca=B.height);null!==l?(h+=ka,ca+=H):l=new vb(0);null!==g&&(d=g.width,g=g.height,"svg"!==b.context&&c&&!Xk&&(h>d||ca>g)&&(w.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(ca)+" vs 2000x2000) Consider increasing the max size."), -Xk=!0),isNaN(d)&&(d=2E3),isNaN(g)&&(g=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(g)&&(ca=Math.min(ca,g)));s.width=Math.ceil(h);s.height=Math.ceil(ca);"svg"===b.context&&(u=v=new cd(s.Sd,p,q),u instanceof cd&&(a.eo=!0));Oj(a,u,l,new na(Math.ceil(h),Math.ceil(ca)),f,D,k,m,r,n);a.eo=!0;return v}y.inherit=function(a,b){w.h(a,"function",y,"inherit");w.h(b,"function",y,"inherit");b.SH&&w.m("Cannot inherit from "+w.Jg(b));w.Na(a,b)}; -function fj(){this.VH="63ad05bbe23a1786468a4c741b6d2";this.VH===this._tk?this.Hh=!0:Yk(this,!1)} -function Yk(a,b){var c="p",d=window[w.Ma("76a715b2f73f148a")][w.Ma("72ba13b5")];if(w.Ma("77bb5bb2f32603de")===window[w.Ma("76a715b2f73f148a")][w.Ma("6aba19a7ec351488")])try{a.Hh=!window[w.Ma("4da118b7ec2108")]([w.Ma("5bb806bfea351a904a84515e1b6d38b6")])([w.Ma("49bc19a1e6")])([w.Ma("59bd04a1e6380fa5539b")])([w.Ma("7bb8069ae7")]===w.Ma(w.Bw));if(!1===a.Hh)return;a.Hh=!window[w.Ma("4da118b7ec2108")]([w.Ma("5bb806bfea351a904a84515e1b6d38b6")])([w.Ma("49bc19a1e6")])([w.Ma("59bd04a1e6380fa5539b6c7a197c31bb4cfd3e")])([w.Ma("7bb8069ae7")]===w.Ma(w.Bw)); -if(!1===a.Hh)return}catch(f){}for(var g=d[w.Ma("76ad18b4f73e")],h=d[w.Ma("73a612b6fb191d")](w.Ma("35e7"))+2;h=d&&w.Ma(w.Bw)!==w.Ma("7da71ca0ad381e90")&&(d=c[w.Ma("73a612b6fb191d")](w.Ma("76a715b2ef3e149757")));a.Hh=!(0b.timeStamp-a.rm)b.preventDefault();else if(a.Tc=a.Tb,a.Tb=c,xj(a,a,b,c,!0),c.pk=!0,c.Qe=b.detail,a.Sk=c.copy(),!0===c.Xq.simulated)b.preventDefault(),b.simulated=!0;else if(t&&t.mG&&(window.mG=a.jp(c.ha)),Pf=null,a.doMouseDown(),1===b.button)return b.preventDefault(),!1}};a.Tp=function(b){if(a.isEnabled){a.lm=!0;var c=a.Tc;if(w.nn){if(400>b.timeStamp-a.rm){b.preventDefault();return}a.rm=b.timeStamp}if(w.nn&&null!==a.Os)a.Os=null,b.preventDefault();else{a.Tc=a.Tb;a.Tb=c;xj(a,a,b,c,!0);c.up=!0; -c.Qe=b.detail;if(w.MA||w.NA)b.timeStamp-a.rmb.touches.length&&wj(a,c);fa(a,c,b)}};a.hH=function(b){if(a.isEnabled){var c=a.Tc;a.Tc=a.Tb;a.Tb=c;var d=null;0a.ns&&wj(a,c),fa(a,c,b))}};a.fK=function(b){if("touch"===b.pointerType&&!(2>a.ns)){var c=a.Vf;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.Tc,a.Tc=a.Tb,a.Tb=c,Aj(a,b,b,c,!0),Jf(a),a.Rx(b,null,c.hg)||(a.doMouseMove(),fa(a,c,b)))}};a.eK=function(b){if("touch"===b.pointerType){var c=a.BD;void 0!==c[b.pointerId]&&(a.ns--,delete c[b.pointerId],c=a.Vf,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&& -c[1].pointerId===b.pointerId&&(c[1]=null))}};ba(a);jj(a)}function Zk(a){1a)&&w.ka(a,"0 <= loc <= 1",ma,"addColorStop:loc");w.h(b,"string",ma,"addColorStop:color");t&&!ja(b)&&w.m('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.ah&&(this.ah=new ra("number","string"));this.ah.add(a,b);this.ja===Re&&(this.type=Se);this.bh=null};w.g(ma,"type",ma.prototype.type); -w.defineProperty(ma,{type:"type"},function(){return this.ja},function(a){w.K(this,a);w.Ca(a,ma,ma,"type");this.ja=a;this.start.Be()&&(a===Se?this.start=Vb:a===Te&&(this.start=ac));this.end.Be()&&(a===Se?this.end=dc:a===Te&&(this.end=ac));this.bh=null});w.g(ma,"color",ma.prototype.color);w.defineProperty(ma,{color:"color"},function(){return this.Rn},function(a){w.K(this,a);t&&!ja(a)&&w.m('Color "'+a+'" is not a valid color string for Brush.color');this.Rn=a;this.bh=null});w.g(ma,"start",ma.prototype.start); -w.defineProperty(ma,{start:"start"},function(){return this.Mo},function(a){w.K(this,a);w.l(a,P,ma,"start");this.Mo=a.ea();this.bh=null});w.g(ma,"end",ma.prototype.end);w.defineProperty(ma,{end:"end"},function(){return this.ho},function(a){w.K(this,a);w.l(a,P,ma,"end");this.ho=a.ea();this.bh=null});w.g(ma,"startRadius",ma.prototype.jq); -w.defineProperty(ma,{jq:"startRadius"},function(){return this.kw},function(a){w.K(this,a);w.p(a,ma,"startRadius");0>a&&w.ka(a,">= zero",ma,"startRadius");this.kw=a;this.bh=null});w.g(ma,"endRadius",ma.prototype.hp);w.defineProperty(ma,{hp:"endRadius"},function(){return this.kv},function(a){w.K(this,a);w.p(a,ma,"endRadius");0>a&&w.ka(a,">= zero",ma,"endRadius");this.kv=a;this.bh=null});w.g(ma,"colorStops",ma.prototype.bp); -w.defineProperty(ma,{bp:"colorStops"},function(){return this.ah},function(a){w.K(this,a);t&&w.l(a,ra,ma,"colorStops");this.ah=a;this.bh=null});w.g(ma,"pattern",ma.prototype.pattern);w.defineProperty(ma,{pattern:"pattern"},function(){return this.Zv},function(a){w.K(this,a);this.Zv=a;this.bh=null}); -ma.randomColor=function(a,b){void 0===a&&(a=128);t&&(w.p(a,ma,"randomColor:min"),(0>a||255d.length&&(d="0"+d);2>f.length&&(f="0"+f);2>c.length&&(c="0"+c);return"#"+ -d+f+c};var fl=w.createElement("canvas").getContext("2d"),ja;ma.isValidColor=ja=function(a){if("black"===a)return!0;if(""===a)return!1;t&&w.h(a,"string",ma,"isValidColor");fl.fillStyle="#000000";var b=fl.fillStyle;fl.fillStyle=a;if(fl.fillStyle!==b)return!0;fl.fillStyle="#FFFFFF";b=fl.fillStyle;fl.fillStyle=a;return fl.fillStyle!==b}; -function T(){w.oc(this);this.la=30723;this.Uf=1;this.mh=null;this.ec="";this.yc=this.Rb=null;this.Ra=(new I(NaN,NaN)).freeze();this.xf=(new na(NaN,NaN)).freeze();this.Lj=M.Hn;this.Jj=M.cC;this.od=new oa;this.nj=new oa;this.cl=new oa;this.bc=this.hv=1;this.Mn=0;this.Vh=gl;this.Jr=M.rq;this.$c=(new x(NaN,NaN,NaN,NaN)).freeze();this.Qb=(new x(NaN,NaN,NaN,NaN)).freeze();this.Rc=(new x(0,0,NaN,NaN)).freeze();this.Xs=this.Yq=this.V=this.os=this.ps=null;this.Ys=this.Zq=Infinity;this.xq=this.Ee=Kc;this.Cs= -0;this.Rj=1;this.Eq=0;this.tj=1;this.Gs=-Infinity;this.Fs=0;this.Hs=M.Ak;this.Is=nh;this.Lq="";this.Qc=this.U=null;this.On=-1;this.Am=this.qi=this.dm=this.Lo=null}w.$h(T);w.ma("GraphObject",T); -T.prototype.cloneProtected=function(a){a.la=this.la|6144;a.Uf=this.Uf;a.ec=this.ec;a.Rb=this.Rb;a.yc=this.yc;a.Ra.assign(this.Ra);a.xf.assign(this.xf);a.Lj=this.Lj.ea();a.Jj=this.Jj.ea();a.cl=this.cl.copy();a.bc=this.bc;a.Mn=this.Mn;a.Vh=this.Vh;a.Jr=this.Jr.ea();a.$c.assign(this.$c);a.Qb.assign(this.Qb);a.Rc.assign(this.Rc);a.os=this.os;a.V=null!==this.V?this.V.copy():null;a.Yq=this.Yq;a.Zq=this.Zq;a.Xs=this.Xs;a.Ys=this.Ys;a.Ee=this.Ee.ea();a.xq=this.xq.ea();a.Cs=this.Cs;a.Rj=this.Rj;a.Eq=this.Eq; -a.tj=this.tj;a.Gs=this.Gs;a.Fs=this.Fs;a.Hs=this.Hs.ea();a.Is=this.Is;a.Lq=this.Lq;a.U=null!==this.U?this.U.copy():null;a.Qc=this.Qc;a.On=this.On;if(null!==this.dm){a.dm=w.ul(this.dm);for(var b=0;bk;)k+=g[n++%l],p=!p;q=!1}else k=g[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+f*f));0>d&&(r=-r);b+=r;c+=f*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}} -T.prototype.raiseChangedEvent=T.prototype.Nc=function(a,b,c,d,f,g,h){var k=this.Z;null!==k&&(k.yn(a,b,c,d,f,g,h),0!==(this.la&1024)&&c===this&&a===le&&ol(this,k,b))}; -function ol(a,b,c){var d=a.lp();if(null!==d)for(var f=a.Qc.k;f.next();){var g=f.value,h=null;if(null!==g.Rl){h=sf(g,d,a);if(null===h)continue;g.Xx(a,h,c,null)}else if(g.nq){var k=b.i;null!==k&&g.Xx(a,k.ia.Pp,c,k)}else{var l=d.data;if(null===l)continue;k=b.i;null!==k&&k.wu||g.Xx(a,l,c,k)}null!==h&&(k=d.$w(g.xk),null!==k&&g.rH(k,h,c))}}T.prototype.$w=function(a){return this.On===a?this:null};T.prototype.raiseChanged=T.prototype.j=function(a,b,c){this.Nc(le,a,this,b,c)}; -function pl(a,b,c,d,f){var g=a.$c,h=a.cl;h.reset();ql(a,h,b,c,d,f);a.cl=h;g.x=b;g.y=c;g.width=d;g.height=f;h.Pt()||h.lH(g)}function rl(a,b,c,d){if(!1===a.tf)return!1;d.multiply(a.transform);return c?a.Kg(b,d):a.bn(b,d)} -T.prototype.lF=function(a,b,c){if(!1===this.tf)return!1;var d=this.Ga;b=a.nk(b);var f=!1;c&&(f=hb(a.x,a.y,0,0,0,d.height)a&&(a+=360);return a}; -T.prototype.getDocumentScale=T.prototype.cj=function(){if(0!==(this.la&4096)===!1)return this.hv;var a=this.bc;return null!==this.T?a*this.T.cj():a};T.prototype.getLocalPoint=T.prototype.sF=function(a,b){void 0===b&&(b=new I);b.assign(a);this.Xf.di(b);return b};T.prototype.getNearestIntersectionPoint=T.prototype.Cl=function(a,b,c){return this.rp(a.x,a.y,b.x,b.y,c)};e=T.prototype; -e.rp=function(a,b,c,d,f){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.gk)return g=this.da,M.Cl(g.left,g.top,g.right,g.bottom,a,b,c,d,f);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;f.o(0,0);d=this.Ga;c=M.Cl(0,0,d.width,d.height,h,a,b,c,f);f.transform(g);return c}; -function ai(a,b,c,d,f){if(!1!==Ij(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);f=f||0;d=Math.max((d||0)-h,0);f=Math.max(f-g,0);var h=a.angle,g=0,g=a.ya,k=0;a.ob&&(k=a.ob);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=f||0,l=a instanceof G;switch(sl(a,!0)){case Lh:k=g=0;l&&(c=b=Infinity);break;case nd:isFinite(b)&&b>d&&(g=b);isFinite(c)&& -c>f&&(k=c);break;case il:isFinite(b)&&b>d&&(g=b);k=0;l&&(c=Infinity);break;case hl:isFinite(c)&&c>f&&(k=c),g=0,l&&(b=Infinity)}var l=a.Yd,m=a.Ze;g>l.width&&m.widthl.height&&m.heighta.height||this.Cj.gf>a.width))&&(c=!0);this.la=c?this.la|256:this.la&-257;this.Qb.J()|| -w.m("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Qb.toString());this.Fx(g,this.Qb);w.tc(g)};e.Ti=function(){}; -function ul(a,b,c,d,f){var g=a.da;g.x=b;g.y=c;g.width=d;g.height=f;if(!a.ya.J()){g=a.$c;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=g.width+b;g=g.height+h;d+=b;f+=h;b=sl(a,!0);c===d&&g===f&&(b=Lh);switch(b){case Lh:if(c>d||g>f)tl(a,!0),ai(a,c>d?d:c,g>f?f:g);break;case nd:tl(a,!0);ai(a,d,f,0,0);break;case il:tl(a,!0);ai(a,d,g,0,0);break;case hl:tl(a,!0),ai(a,c,f,0,0)}}} -e.Fx=function(){vl(this,!1);var a=this.Z;null!==a&&null!==a.i&&(a.El(),this.Tv(a),this.ra(),a=this.Z,null!==a&&(a.An!==this&&a.EG!==this&&a.GG!==this||wl(a,!0)))};e.Tv=function(a){null!==this.ed&&wl(a,!0)}; -e.kf=function(a,b){if(this.visible){var c=this.opacity,d=1;if(1!==c){if(0===c)return;d=a.globalAlpha;a.globalAlpha=d*c}if(a instanceof cd)a:{if(this.visible){var f=null,g=a.wx;if(this instanceof G&&(this.type===xl||this.type===yl))zl(this,a,b);else{var h=this.Qb;if(0!==h.width&&0!==h.height&&!isNaN(h.x)&&!isNaN(h.y)){var k=this.transform,l=this.T;0!==(this.la&4096)===!0&&Al(this);var m=0!==(this.la&256),n=!1;this instanceof va&&Bl(this,a);if(m){n=l.lg()?l.Ga:l.da;if(this.qi)var p=this.qi,q=p.x,r= -p.y,s=p.width,p=p.height;else q=Math.max(h.x,n.x),r=Math.max(h.y,n.y),s=Math.min(h.right,n.right)-q,p=Math.min(h.bottom,n.bottom)-r;if(q>h.width+h.x||h.x>n.width+n.x||r>h.height+h.y||h.y>n.height+n.y)break a;n=!0;ed(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}q=!1;if(this instanceof z&&(q=!0,!this.Oa()))break a;r=!1;s=b.Qh;this.Z&&s.drawShadows&&(r=this.Z.fi);a.aj.qf=[1,0,0,1,0,0];null!==this.yc&&(Cl(this,a,this.yc,!0,!0),this.yc instanceof ma&&this.yc.type===Te?(a.beginPath(), -a.rect(h.x,h.y,h.width,h.height),Dl(a,this.yc)):a.fillRect(h.x,h.y,h.width,h.height));q&&this.fi&&s.drawShadows&&(ed(a,1,0,0,1,0,0),h=this.Jm,a.shadowOffsetX=h.x,a.shadowOffsetY=h.y,a.shadowColor=this.Im,a.shadowBlur=this.Hm/b.scale,a.jb());this instanceof G?ed(a,k.m11,k.m12,k.m21,k.m22,k.dx,k.dy):a.aj.qf=[k.m11,k.m12,k.m21,k.m22,k.dx,k.dy];if(null!==this.Rb){var p=this.Ga,h=k=0,s=p.width,p=p.height,u=0;this instanceof W&&(p=this.Ya.qb,k=p.x,h=p.y,s=p.width,p=p.height,u=this.ve);Cl(this,a,this.Rb, -!0,!1);this.Rb instanceof ma&&this.Rb.type===Te?(a.beginPath(),a.rect(k-u/2,h-u/2,s+u,p+u),Dl(a,this.Rb)):a.fillRect(k-u/2,h-u/2,s+u,p+u)}s=h=k=0;r&&(null!==this.Rb||null!==this.yc||null!==l&&0!==(l.la&512)||null!==l&&l.type===ij&&l.$f()!==this)?(El(this,!0),k=a.shadowOffsetX,h=a.shadowOffsetY,s=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0):El(this,!1);this.qk(a,b);r&&0!==(this.la&512)===!0&&(a.shadowOffsetX=k,a.shadowOffsetY=h,a.shadowBlur=s);q&&r&&(a.shadowOffsetX=0,a.shadowOffsetY= -0,a.shadowBlur=0);m&&(a.restore(),n&&a.Ff.pop(),ba(b,a));this instanceof G&&(f=a.Ff.pop());q&&r&&a.Ff.pop();null!==a.hF&&(null===f&&(g===a.wx?(ed(a,1,0,0,1,0,0),f=a.Ff.pop()):f=a.wx),a.hF(this,f))}}}}else{if(this instanceof G&&(this.type===xl||this.type===yl)){zl(this,a,b);1!==c&&(a.globalAlpha=d);return}q=this.Qb;if(0!==q.width&&0!==q.height&&!isNaN(q.x)&&!isNaN(q.y)){t&&t.Wi&&t.$I(a,this);f=this.transform;g=this.T;0!==(this.la&4096)===!0&&Al(this);l=0!==(this.la&256);this instanceof va&&Bl(this, -a);if(l){t&&t.gF&&w.trace("clip"+this.toString());m=g.lg()?g.Ga:g.da;this.qi?(h=this.qi,n=h.x,r=h.y,k=h.width,h=h.height):(n=Math.max(q.x,m.x),r=Math.max(q.y,m.y),k=Math.min(q.right,m.right)-n,h=Math.min(q.bottom,m.bottom)-r);if(n>q.width+q.x||q.x>m.width+m.x||r>q.height+q.y||q.y>m.height+m.y){1!==c&&(a.globalAlpha=d);return}t&&t.gF&&t.bJ(a,n,r,k,h);a.save();a.beginPath();a.rect(n,r,k,h);a.clip()}r=b.Qh;m=!1;if(this instanceof z){m=!0;if(!this.Oa()){1!==c&&(a.globalAlpha=d);return}this.fi&&r.drawShadows&& -(n=this.Jm,a.shadowOffsetX=n.x*b.scale*b.Ie,a.shadowOffsetY=n.y*b.scale*b.Ie,a.shadowColor=this.Im,a.shadowBlur=this.Hm)}n=!1;this.Z&&r.drawShadows&&(n=this.Z.fi);null!==this.yc&&(Cl(this,a,this.yc,!0,!0),this.yc instanceof ma&&this.yc.type===Te?(a.beginPath(),a.rect(q.x,q.y,q.width,q.height),Dl(a,this.yc)):a.fillRect(q.x,q.y,q.width,q.height));f.Pt()||a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);null!==this.Rb&&(h=this.Ga,r=q=0,k=h.width,h=h.height,s=0,this instanceof W&&(h=this.Ya.qb,q=h.x,r= -h.y,k=h.width,h=h.height,s=this.ve),Cl(this,a,this.Rb,!0,!1),this.Rb instanceof ma&&this.Rb.type===Te?(a.beginPath(),a.rect(q-s/2,r-s/2,k+s,h+s),Dl(a,this.Rb)):a.fillRect(q-s/2,r-s/2,k+s,h+s));t&&t.Wi&&t.aJ(a,this);k=r=q=0;n&&(null!==this.Rb||null!==this.yc||null!==g&&0!==(g.la&512)||null!==g&&(g.type===ij||g.type===Jh)&&g.$f()!==this)?(El(this,!0),q=a.shadowOffsetX,r=a.shadowOffsetY,k=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0):El(this,!1);this.qk(a,b);n&&0!==(this.la&512)=== -!0&&(a.shadowOffsetX=q,a.shadowOffsetY=r,a.shadowBlur=k);m&&n&&(a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0);l?(a.restore(),this instanceof G?ba(b,a,!0):ba(b,a,!1)):f.Pt()||(g=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*g,-f.m12*g,-f.m21*g,f.m11*g,g*(f.m21*f.dy-f.m22*f.dx),g*(f.m12*f.dx-f.m11*f.dy)))}}1!==c&&(a.globalAlpha=d)}}; -function zl(a,b,c){var d=a.Qb;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.yc&&(Cl(a,b,a.yc,!0,!0),a.yc instanceof ma&&a.yc.type===Te?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),Dl(b,a.yc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Rb&&(Cl(a,b,a.Rb,!0,!1),a.Rb instanceof ma&&a.Rb.type===Te?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),Dl(b,a.Rb)):b.fillRect(d.x,d.y,d.width,d.height)),a.qk(b,c))}e.qk=function(){}; -function Dl(a,b){if(b instanceof ma&&b.type===Te&&!(a instanceof cd)){var c=b.zy,d=b.yy;d>c?(a.scale(c/d,1),a.translate((d-c)/2,0)):c>d&&(a.scale(1,d/c),a.translate(0,(c-d)/2));a.Hu?a.clip():a.fill();d>c?(a.translate(-(d-c)/2,0),a.scale(1/(c/d),1)):c>d&&(a.translate(0,-(c-d)/2),a.scale(1,1/(d/c)))}else a.Hu?a.clip():a.fill()}function Fl(a){a.Hu||a.stroke()} -function Cl(a,b,c,d,f){if(null!==c){var g=1,h=1;if("string"===typeof c)d?b.Zl!==c&&(b.fillStyle=c,b.Zl=c):b.In!==c&&(b.strokeStyle=c,b.In=c);else if(c.type===Re)c=c.color,d?b.Zl!==c&&(b.fillStyle=c,b.Zl=c):b.In!==c&&(b.strokeStyle=c,b.In=c);else{var k,h=a.Ga,g=h.width,h=h.height;if(f)var l=a.da,g=l.width,h=l.height;var m=b instanceof CanvasRenderingContext2D;if(m&&(c.bh&&c.type===el||c.zy===g&&c.yy===h))k=c.bh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;f&&(l=a.da,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;c.type===Se?k=b.createLinearGradient(l,n,p,q):c.type===Te?(s=isNaN(c.hp)?Math.max(g,h)/2:c.hp,isNaN(c.jq)?(r=0,s=Math.max(g,h)/2):r=c.jq,k=b.createRadialGradient(l,n,r,p,q,s)):c.type===el?k=b.createPattern(c.pattern,"repeat"):w.xc(c.type,"Brush type");if(c.type!==el&&(a=c.bp,null!==a))for(a=a.k;a.next();)k.addColorStop(a.key,a.value);m&&(c.bh=k,c.zy=g,c.yy=h)}d?b.Zl!==k&&(b.fillStyle= -k,b.Zl=k):b.In!==k&&(b.strokeStyle=k,b.In=k)}}}T.prototype.isContainedBy=T.prototype.Fl=function(a){if(a instanceof G)a:{if(this!==a&&null!==a)for(var b=this.T;null!==b;){if(b===a){a=!0;break a}b=b.T}a=!1}else a=!1;return a};T.prototype.isVisibleObject=T.prototype.Il=function(){if(!this.visible)return!1;var a=this.T;return null!==a?a.Il():!0}; -function Al(a){if(0!==(a.la&2048)===!0){var b=a.od;b.reset();if(!a.Qb.J()||!a.$c.J()){Gl(a,!1);return}b.translate(a.Qb.x,a.Qb.y);b.translate(-a.Ka.x,-a.Ka.y);var c=a.Ga;ql(a,b,c.x,c.y,c.width,c.height);Gl(a,!1);Hl(a,!0)}0!==(a.la&4096)===!0&&(b=a.T,null===b?(a.nj.set(a.od),a.hv=a.scale,Hl(a,!1)):null!==b.Xf&&(c=a.nj,c.reset(),b.lg()?c.multiply(b.nj):null!==b.T&&c.multiply(b.T.nj),c.multiply(a.od),a.hv=a.scale*b.hv,Hl(a,!1)))} -function ql(a,b,c,d,f,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=ac;a.Xe&&a.Xe.sd()&&(h=a.Xe);var k=w.P();if(a instanceof z&&a.cc!==a)for(c=a.cc,d=c.Ga,k.vu(d.x,d.y,d.width,d.height,h),c.cl.kb(k),k.offset(-c.Ka.x,-c.Ka.y),h=c.T;null!==h&&h!==a;)h.cl.kb(k),k.offset(-h.Ka.x,-h.Ka.y),h=h.T;else k.vu(c,d,f,g,h);b.rotate(a.angle,k.x,k.y);w.B(k)}}e=T.prototype; -e.W=function(a){void 0===a&&(a=!1);if(!0!==Ij(this)){tl(this,!0);vl(this,!0);var b=this.T;null!==b?a||b.W():(a=this.i,null!==a&&(a.qg.add(this),this instanceof C&&(a.oa.zb||this.Gf(),null!==this.ud&&Il(this.ud)),a.$e()));if(this instanceof G){if(this.ja===ij||this.ja===kh)a=this.$f(),null!==a&&a.W(!0);a=this.Ba.q;for(var b=a.length,c=0;ca?a=0:1a||1=a&&w.m("GraphObject.scale must be greater than zero"),this.bc=a,this.fh(),this.W(),this.j("scale",b,a))});w.g(T,"angle",T.prototype.angle); -w.defineProperty(T,{angle:"angle"},function(){return this.Mn},function(a){var b=this.Mn;b!==a&&(t&&w.p(a,T,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.Mn=a,this.W(),this.fh(),this.j("angle",b,a)))});w.g(T,"desiredSize",T.prototype.ya); -w.defineProperty(T,{ya:"desiredSize"},function(){return this.xf},function(a){var b=this.xf;b.O(a)||(t&&w.l(a,na,T,"desiredSize"),this.xf=a=a.ea(),this.W(),this instanceof W&&this.ze(),this.j("desiredSize",b,a),a=this.Z,null!==a&&0!==(this.la&1024)&&(ol(this,a,"width"),ol(this,a,"height")))});w.g(T,"width",T.prototype.width); -w.defineProperty(T,{width:"width"},function(){return this.xf.width},function(a){if(this.xf.width!==a){t&&w.h(a,"number",T,"width");var b=this.xf;this.xf=a=(new na(a,this.xf.height)).freeze();this.W();this instanceof W&&this.ze();this.j("desiredSize",b,a);b=this.Z;null!==b&&0!==(this.la&1024)&&ol(this,b,"width")}});w.g(T,"height",T.prototype.height); -w.defineProperty(T,{height:"height"},function(){return this.xf.height},function(a){if(this.xf.height!==a){t&&w.h(a,"number",T,"height");var b=this.xf;this.xf=a=(new na(this.xf.width,a)).freeze();this.W();this instanceof W&&this.ze();this.j("desiredSize",b,a);b=this.Z;null!==b&&0!==(this.la&1024)&&ol(this,b,"height")}});w.g(T,"minSize",T.prototype.Ze); -w.defineProperty(T,{Ze:"minSize"},function(){return this.Lj},function(a){var b=this.Lj;b.O(a)||(t&&w.l(a,na,T,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.Lj=a,this.W(),this.j("minSize",b,a))});w.g(T,"maxSize",T.prototype.Yd); -w.defineProperty(T,{Yd:"maxSize"},function(){return this.Jj},function(a){var b=this.Jj;b.O(a)||(t&&w.l(a,na,T,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.Jj=a,this.W(),this.j("maxSize",b,a))});w.A(T,{Ka:"measuredBounds"},function(){return this.$c});w.A(T,{Ga:"naturalBounds"},function(){return this.Rc},{configurable:!0});w.g(T,"margin",T.prototype.margin); -w.defineProperty(T,{margin:"margin"},function(){return this.Jr},function(a){"number"===typeof a?a=new vb(a):t&&w.l(a,vb,T,"margin");var b=this.Jr;b.O(a)||(this.Jr=a=a.ea(),this.W(),this.j("margin",b,a))});w.A(T,{transform:null},function(){0!==(this.la&2048)===!0&&Al(this);return this.od});w.A(T,{Xf:null},function(){0!==(this.la&4096)===!0&&Al(this);return this.nj});w.g(T,"alignment",T.prototype.alignment); -w.defineProperty(T,{alignment:"alignment"},function(){return this.Ee},function(a){var b=this.Ee;b.O(a)||(t?w.l(a,P,T,"alignment"):a.Be()&&!a.Wc()&&w.m("alignment must be a real Spot or Spot.Default"),this.Ee=a=a.ea(),Il(this),this.j("alignment",b,a))});w.g(T,"column",T.prototype.column);w.defineProperty(T,{column:"column"},function(){return this.Eq},function(a){t&&w.p(a,T,"column");a=Math.round(a);var b=this.Eq;b!==a&&(0>a&&w.ka(a,">= 0",T,"column"),this.Eq=a,this.W(),this.j("column",b,a))}); -w.g(T,"columnSpan",T.prototype.GE);w.defineProperty(T,{GE:"columnSpan"},function(){return this.tj},function(a){t&&w.h(a,"number",T,"columnSpan");a=Math.round(a);var b=this.tj;b!==a&&(1>a&&w.ka(a,">= 1",T,"columnSpan"),this.tj=a,this.W(),this.j("columnSpan",b,a))});w.g(T,"row",T.prototype.ic);w.defineProperty(T,{ic:"row"},function(){return this.Cs},function(a){t&&w.p(a,T,"row");a=Math.round(a);var b=this.Cs;b!==a&&(0>a&&w.ka(a,">= 0",T,"row"),this.Cs=a,this.W(),this.j("row",b,a))}); -w.g(T,"rowSpan",T.prototype.rowSpan);w.defineProperty(T,{rowSpan:"rowSpan"},function(){return this.Rj},function(a){t&&w.h(a,"number",T,"rowSpan");a=Math.round(a);var b=this.Rj;b!==a&&(1>a&&w.ka(a,">= 1",T,"rowSpan"),this.Rj=a,this.W(),this.j("rowSpan",b,a))});w.g(T,"alignmentFocus",T.prototype.Ri); -w.defineProperty(T,{Ri:"alignmentFocus"},function(){return this.xq},function(a){var b=this.xq;b.O(a)||(t?w.l(a,P,T,"alignmentFocus"):a.Be()&&!a.Wc()&&w.m("alignmentFocus must be a real Spot or Spot.Default"),this.xq=a=a.ea(),this.W(),this.j("alignmentFocus",b,a))});w.g(T,"portId",T.prototype.ed); -w.defineProperty(T,{ed:"portId"},function(){return this.os},function(a){var b=this.os;if(b!==a){t&&null!==a&&w.h(a,"string",T,"portId");var c=this.Z;null===c||c instanceof C||(w.m("portID being set on a Link: "+a),c=null);null!==b&&null!==c&&Ol(c,this);this.os=a;if(null!==a&&c){c.Jh=!0;null===c.Ad&&Pl(c);var d=this.ed;null!==d&&c.Ad.add(d,this)}this.j("portId",b,a)}});function Ql(a){var b={value:null};Rl(a,b);return b.value} -function Rl(a,b){var c=a.T;return null===c||!Rl(c,b)&&a.visible?(b.value=a,!1):!0}function Ll(a){var b=a.Z;b instanceof C&&(a=a.i,null===a||a.oa.zb||b.Gf())}w.g(T,"toSpot",T.prototype.Db);w.defineProperty(T,{Db:"toSpot"},function(){return null!==this.V?this.V.ak:Pb},function(a){null===this.V&&this.Ve();var b=this.V.ak;b.O(a)||(t&&w.l(a,P,T,"toSpot"),a=a.ea(),this.V.ak=a,this.j("toSpot",b,a),Ll(this))});w.g(T,"toEndSegmentLength",T.prototype.zk); -w.defineProperty(T,{zk:"toEndSegmentLength"},function(){return null!==this.V?this.V.Zj:10},function(a){null===this.V&&this.Ve();var b=this.V.Zj;b!==a&&(t&&w.h(a,"number",T,"toEndSegmentLength"),0>a&&w.ka(a,">= 0",T,"toEndSegmentLength"),this.V.Zj=a,this.j("toEndSegmentLength",b,a),Ll(this))});w.g(T,"toEndSegmentDirection",T.prototype.mq); -w.defineProperty(T,{mq:"toEndSegmentDirection"},function(){return null!==this.V?this.V.Yj:ml},function(a){null===this.V&&this.Ve();var b=this.V.Yj;b!==a&&(t&&w.Ca(a,C,T,"toEndSegmentDirection"),this.V.Yj=a,this.j("toEndSegmentDirection",b,a),Ll(this))});w.g(T,"toShortLength",T.prototype.oq); -w.defineProperty(T,{oq:"toShortLength"},function(){return null!==this.V?this.V.$j:0},function(a){null===this.V&&this.Ve();var b=this.V.$j;b!==a&&(t&&w.h(a,"number",T,"toShortLength"),this.V.$j=a,this.j("toShortLength",b,a),Ll(this))});w.g(T,"toLinkable",T.prototype.OB);w.defineProperty(T,{OB:"toLinkable"},function(){return this.Xs},function(a){var b=this.Xs;b!==a&&(t&&null!==a&&w.h(a,"boolean",T,"toLinkable"),this.Xs=a,this.j("toLinkable",b,a))});w.g(T,"toMaxLinks",T.prototype.fH); -w.defineProperty(T,{fH:"toMaxLinks"},function(){return this.Ys},function(a){var b=this.Ys;b!==a&&(t&&w.h(a,"number",T,"toMaxLinks"),0>a&&w.ka(a,">= 0",T,"toMaxLinks"),this.Ys=a,this.j("toMaxLinks",b,a))});w.g(T,"fromSpot",T.prototype.Bb);w.defineProperty(T,{Bb:"fromSpot"},function(){return null!==this.V?this.V.Aj:Pb},function(a){null===this.V&&this.Ve();var b=this.V.Aj;b.O(a)||(t&&w.l(a,P,T,"fromSpot"),a=a.ea(),this.V.Aj=a,this.j("fromSpot",b,a),Ll(this))});w.g(T,"fromEndSegmentLength",T.prototype.tk); -w.defineProperty(T,{tk:"fromEndSegmentLength"},function(){return null!==this.V?this.V.yj:10},function(a){null===this.V&&this.Ve();var b=this.V.yj;b!==a&&(t&&w.h(a,"number",T,"fromEndSegmentLength"),0>a&&w.ka(a,">= 0",T,"fromEndSegmentLength"),this.V.yj=a,this.j("fromEndSegmentLength",b,a),Ll(this))});w.g(T,"fromEndSegmentDirection",T.prototype.op); -w.defineProperty(T,{op:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.xj:ml},function(a){null===this.V&&this.Ve();var b=this.V.xj;b!==a&&(t&&w.Ca(a,C,T,"fromEndSegmentDirection"),this.V.xj=a,this.j("fromEndSegmentDirection",b,a),Ll(this))});w.g(T,"fromShortLength",T.prototype.pp); -w.defineProperty(T,{pp:"fromShortLength"},function(){return null!==this.V?this.V.zj:0},function(a){null===this.V&&this.Ve();var b=this.V.zj;b!==a&&(t&&w.h(a,"number",T,"fromShortLength"),this.V.zj=a,this.j("fromShortLength",b,a),Ll(this))});w.g(T,"fromLinkable",T.prototype.sA);w.defineProperty(T,{sA:"fromLinkable"},function(){return this.Yq},function(a){var b=this.Yq;b!==a&&(t&&null!==a&&w.h(a,"boolean",T,"fromLinkable"),this.Yq=a,this.j("fromLinkable",b,a))});w.g(T,"fromMaxLinks",T.prototype.pF); -w.defineProperty(T,{pF:"fromMaxLinks"},function(){return this.Zq},function(a){var b=this.Zq;b!==a&&(t&&w.h(a,"number",T,"fromMaxLinks"),0>a&&w.ka(a,">= 0",T,"fromMaxLinks"),this.Zq=a,this.j("fromMaxLinks",b,a))});w.g(T,"cursor",T.prototype.cursor);w.defineProperty(T,{cursor:"cursor"},function(){return this.Lq},function(a){var b=this.Lq;b!==a&&(w.h(a,"string",T,"cursor"),this.Lq=a,this.j("cursor",b,a))});w.g(T,"click",T.prototype.click); -w.defineProperty(T,{click:"click"},function(){return null!==this.U?this.U.pi:null},function(a){null===this.U&&jl(this);var b=this.U.pi;b!==a&&(null!==a&&w.h(a,"function",T,"click"),this.U.pi=a,this.j("click",b,a))});w.g(T,"doubleClick",T.prototype.fn);w.defineProperty(T,{fn:"doubleClick"},function(){return null!==this.U?this.U.wi:null},function(a){null===this.U&&jl(this);var b=this.U.wi;b!==a&&(null!==a&&w.h(a,"function",T,"doubleClick"),this.U.wi=a,this.j("doubleClick",b,a))}); -w.g(T,"contextClick",T.prototype.vt);w.defineProperty(T,{vt:"contextClick"},function(){return null!==this.U?this.U.ri:null},function(a){null===this.U&&jl(this);var b=this.U.ri;b!==a&&(null!==a&&w.h(a,"function",T,"contextClick"),this.U.ri=a,this.j("contextClick",b,a))});w.g(T,"mouseEnter",T.prototype.VA); -w.defineProperty(T,{VA:"mouseEnter"},function(){return null!==this.U?this.U.Vr:null},function(a){null===this.U&&jl(this);var b=this.U.Vr;b!==a&&(null!==a&&w.h(a,"function",T,"mouseEnter"),this.U.Vr=a,this.j("mouseEnter",b,a))});w.g(T,"mouseLeave",T.prototype.WA);w.defineProperty(T,{WA:"mouseLeave"},function(){return null!==this.U?this.U.Wr:null},function(a){null===this.U&&jl(this);var b=this.U.Wr;b!==a&&(null!==a&&w.h(a,"function",T,"mouseLeave"),this.U.Wr=a,this.j("mouseLeave",b,a))}); -w.g(T,"mouseOver",T.prototype.au);w.defineProperty(T,{au:"mouseOver"},function(){return null!==this.U?this.U.Gi:null},function(a){null===this.U&&jl(this);var b=this.U.Gi;b!==a&&(null!==a&&w.h(a,"function",T,"mouseOver"),this.U.Gi=a,this.j("mouseOver",b,a))});w.g(T,"mouseHover",T.prototype.$t); -w.defineProperty(T,{$t:"mouseHover"},function(){return null!==this.U?this.U.Fi:null},function(a){null===this.U&&jl(this);var b=this.U.Fi;b!==a&&(null!==a&&w.h(a,"function",T,"mouseHover"),this.U.Fi=a,this.j("mouseHover",b,a))});w.g(T,"mouseHold",T.prototype.Zt);w.defineProperty(T,{Zt:"mouseHold"},function(){return null!==this.U?this.U.Ei:null},function(a){null===this.U&&jl(this);var b=this.U.Ei;b!==a&&(null!==a&&w.h(a,"function",T,"mouseHold"),this.U.Ei=a,this.j("mouseHold",b,a))}); -w.g(T,"mouseDragEnter",T.prototype.iG);w.defineProperty(T,{iG:"mouseDragEnter"},function(){return null!==this.U?this.U.Tr:null},function(a){null===this.U&&jl(this);var b=this.U.Tr;b!==a&&(null!==a&&w.h(a,"function",T,"mouseDragEnter"),this.U.Tr=a,this.j("mouseDragEnter",b,a))});w.g(T,"mouseDragLeave",T.prototype.jG); -w.defineProperty(T,{jG:"mouseDragLeave"},function(){return null!==this.U?this.U.Ur:null},function(a){null===this.U&&jl(this);var b=this.U.Ur;b!==a&&(null!==a&&w.h(a,"function",T,"mouseDragLeave"),this.U.Ur=a,this.j("mouseDragLeave",b,a))});w.g(T,"mouseDrop",T.prototype.Yt);w.defineProperty(T,{Yt:"mouseDrop"},function(){return null!==this.U?this.U.Di:null},function(a){null===this.U&&jl(this);var b=this.U.Di;b!==a&&(null!==a&&w.h(a,"function",T,"mouseDrop"),this.U.Di=a,this.j("mouseDrop",b,a))}); -w.g(T,"actionDown",T.prototype.Sz);w.defineProperty(T,{Sz:"actionDown"},function(){return null!==this.U?this.U.tq:null},function(a){null===this.U&&jl(this);var b=this.U.tq;b!==a&&(null!==a&&w.h(a,"function",T,"actionDown"),this.U.tq=a,this.j("actionDown",b,a))});w.g(T,"actionMove",T.prototype.Tz); -w.defineProperty(T,{Tz:"actionMove"},function(){return null!==this.U?this.U.uq:null},function(a){null===this.U&&jl(this);var b=this.U.uq;b!==a&&(null!==a&&w.h(a,"function",T,"actionMove"),this.U.uq=a,this.j("actionMove",b,a))});w.g(T,"actionUp",T.prototype.Uz);w.defineProperty(T,{Uz:"actionUp"},function(){return null!==this.U?this.U.vq:null},function(a){null===this.U&&jl(this);var b=this.U.vq;b!==a&&(null!==a&&w.h(a,"function",T,"actionUp"),this.U.vq=a,this.j("actionUp",b,a))}); -w.g(T,"actionCancel",T.prototype.Rz);w.defineProperty(T,{Rz:"actionCancel"},function(){return null!==this.U?this.U.sq:null},function(a){null===this.U&&jl(this);var b=this.U.sq;b!==a&&(null!==a&&w.h(a,"function",T,"actionCancel"),this.U.sq=a,this.j("actionCancel",b,a))});w.g(T,"toolTip",T.prototype.zu); -w.defineProperty(T,{zu:"toolTip"},function(){return null!==this.U?this.U.Ni:null},function(a){null===this.U&&jl(this);var b=this.U.Ni;b!==a&&(null!==a&&w.l(a,da,T,"toolTip"),this.U.Ni=a,this.j("toolTip",b,a))});w.g(T,"contextMenu",T.prototype.contextMenu);w.defineProperty(T,{contextMenu:"contextMenu"},function(){return null!==this.U?this.U.si:null},function(a){null===this.U&&jl(this);var b=this.U.si;b!==a&&(null!==a&&w.l(a,da,T,"contextMenu"),this.U.si=a,this.j("contextMenu",b,a))}); -T.prototype.bind=T.prototype.bind=function(a){a.zg=this;var b=this.lp();null!==b&&Sl(b)&&w.m("Cannot add a Binding to a template that has already been copied: "+a);null===this.Qc&&(this.Qc=new J(pf));this.Qc.add(a)};T.prototype.findTemplateBinder=T.prototype.lp=function(){for(var a=this instanceof G?this:this.T;null!==a;){if(null!==a.am)return a;a=a.T}return null};T.fromSvg=T.fromSVG=function(a){return Tl(a)};T.prototype.setProperties=function(a){w.tu(this,a)};var Ul; -T.make=Ul=function(a,b){var c=arguments,d=null,f=null;if("function"===typeof a)f=a;else if("string"===typeof a){var g=Vl.Da(a);"function"===typeof g?(c=w.ul(arguments),d=g(c)):f=aa[a]}null===d&&(void 0===f&&(d=window.$,void 0!==d&&void 0!==d.noop&&w.m("GraphObject.make failed to complete. Is it conflicting with another $ var? (such as jQuery)"),w.m("GraphObject.make failed to complete, it may be conflicting with another var.")),null!==f&&f.constructor||w.m("GraphObject.make requires a class function or class name, not: "+ -a),d=new f);g=1;if(d instanceof y&&1f)&&w.m("Must specify non-negative integer row for RowColumnDefinition "+ -b),a.qe=!0,a.index=f):void 0!==b.column&&(f=b.column,(void 0===f||null===f||Infinity===f||isNaN(f)||0>f)&&w.m("Must specify non-negative integer column for RowColumnDefinition "+b),a.qe=!1,a.index=f);f=new ua;for(c in b)"row"!==c&&"column"!==c&&(f[c]=b[c]);w.tu(a,f)}else w.tu(a,b);else w.m('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var Vl=new ra("string","function"); -T.getBuilders=function(){var a=new ra("string","function"),b;for(b in Vl)if(b!==b.toLowerCase()){var c=Vl[b];"function"===typeof c&&a.add(b,c)}a.freeze();return a};var Gm;T.defineBuilder=Gm=function(a,b){w.h(a,"string",T,"defineBuilder:name");w.h(b,"function",T,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||w.m("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);Vl.add(a,b)}; -Gm("Button",function(){var a=new ma(Se);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new ma(Se);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=Ul(G,ij,{Mt:!0},{_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue"},Ul(W,{name:"ButtonBorder",Gb:"Rectangle",G:new P(0,0,2.761423749153968,2.761423749153968),H:new P(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.VA=function(a,b){var f=b.ye("ButtonBorder");if(f instanceof -W){var g=b._buttonFillOver;b._buttonFillNormal=f.fill;f.fill=g;g=b._buttonStrokeOver;b._buttonStrokeNormal=f.stroke;f.stroke=g}};a.WA=function(a,b){var f=b.ye("ButtonBorder");f instanceof W&&(f.fill=b._buttonFillNormal,f.stroke=b._buttonStrokeNormal)};return a}); -Gm("TreeExpanderButton",function(){var a=Ul("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Ul(W,{name:"ButtonIcon",Gb:"MinusLine",ya:M.qq},(new pf("figure","isTreeExpanded",function(a,c){var d=c.T;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).Ex()),{visible:!1},(new pf("visible","isTreeLeaf",function(a){return!a})).Ex());a.click=function(a,c){var d=c.Z;d instanceof da&&(d=d.Yh);if(d instanceof C){var f=d.i;if(null!==f){f=f.Fb;if(d.Xc){if(!f.canCollapseTree(d))return}else if(!f.canExpandTree(d))return; -a.Vc=!0;d.Xc?f.collapseTree(d):f.expandTree(d)}}};return a}); -Gm("SubGraphExpanderButton",function(){var a=Ul("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Ul(W,{name:"ButtonIcon",Gb:"MinusLine",ya:M.qq},(new pf("figure","isSubGraphExpanded",function(a,c){var d=c.T;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).Ex()));a.click=function(a,c){var d=c.Z;d instanceof da&&(d=d.Yh);if(d instanceof E){var f=d.i;if(null!==f){f=f.Fb;if(d.Ud){if(!f.canCollapseSubGraph(d))return}else if(!f.canExpandSubGraph(d))return;a.Vc= -!0;d.Ud?f.collapseSubGraph(d):f.expandSubGraph(d)}}};return a});Gm("ContextMenuButton",function(){var a=Ul("Button");a.stretch=il;var b=a.ye("ButtonBorder");b instanceof W&&(b.Gb="Rectangle",b.G=new P(0,0,2,3),b.H=new P(1,1,-2,-2));return a}); -Gm("PanelExpanderButton",function(a){var b="COLLAPSIBLE";"string"===typeof a[1]&&(b=a[1],a.splice(1,1));a=Ul("Button",Ul(W,"TriangleUp",{ya:new na(6,4)},(new pf("figure","visible",function(a){return a?"TriangleUp":"TriangleDown"})).Ex(b)));var c=a.ye("ButtonBorder");c instanceof W&&(c.stroke=null,c.fill="transparent");a.click=function(a,c){var g=c.i;if(null!==g){var h=c.Z.ye(b);null!==h&&(g.jc("Collapse/Expand Panel"),h.visible=!h.visible,g.je("Collapse/Expand Panel"))}};return a}); -function kl(){this.si=this.Ni=this.sq=this.vq=this.uq=this.tq=this.Di=this.Ur=this.Tr=this.Ei=this.Fi=this.Gi=this.Wr=this.Vr=this.ri=this.wi=this.pi=null}kl.prototype.copy=function(){var a=new kl;a.pi=this.pi;a.wi=this.wi;a.ri=this.ri;a.Vr=this.Vr;a.Wr=this.Wr;a.Gi=this.Gi;a.Fi=this.Fi;a.Ei=this.Ei;a.Tr=this.Tr;a.Ur=this.Ur;a.Di=this.Di;a.tq=this.tq;a.uq=this.uq;a.vq=this.vq;a.sq=this.sq;a.Ni=this.Ni;a.si=this.si;return a}; -function G(a){T.call(this);void 0===a?0===arguments.length?this.ja=Qh:w.m("invalid argument to Panel constructor: undefined"):(w.Ca(a,G,G,"type"),this.ja=a);this.Ba=new J(T);this.hf=M.rq;this.gh=!1;this.ja===lj&&(this.gh=!0);this.ir=!1;this.Oq=Kc;this.vi=gl;this.ja===ea&&Hm(this);this.Ro=Nh;this.br=(new na(10,10)).freeze();this.cr=M.Ak;this.am=this.Dh=null;this.xr=NaN;this.sg=this.Ai=null;this.wo="category";this.rg=null;this.Pi=new x(NaN,NaN,NaN,NaN);this.Mm=null;this.Jh=!1;this.Ds=null}w.Na(G,T); -w.$h(G);w.ma("Panel",G);function Hm(a){a.uj=M.rq;a.Gh=1;a.ui=null;a.fm=null;a.Fh=1;a.Eh=null;a.em=null;a.Pd=[];a.Hd=[];a.Fm=Im;a.cm=Im;a.Oi=0;a.Bi=0} -G.prototype.cloneProtected=function(a){T.prototype.cloneProtected.call(this,a);a.ja=this.ja;a.hf=this.hf.ea();a.gh=this.gh;a.ir=this.ir;a.Oq=this.Oq.ea();a.vi=this.vi;if(a.ja===ea){a.uj=this.uj.ea();a.Gh=this.Gh;a.ui=this.ui;a.fm=this.fm;a.Fh=this.Fh;a.Eh=this.Eh;a.em=this.em;var b=[];if(0a&&w.ka(a,">= 0",G,"padding"),a=new vb(a)):(w.l(a,vb,G,"padding"),0>a.left&&w.ka(a.left,">= 0",G,"padding:value.left"),0>a.right&&w.ka(a.right,">= 0",G,"padding:value.right"),0>a.top&&w.ka(a.top,">= 0",G,"padding:value.top"),0>a.bottom&&w.ka(a.bottom,">= 0",G,"padding:value.bottom"));var b=this.hf;b.O(a)||(this.hf=a=a.ea(),this.W(),this.j("padding",b,a))});w.g(G,"defaultAlignment",G.prototype.lk); -w.defineProperty(G,{lk:"defaultAlignment"},function(){return this.Oq},function(a){var b=this.Oq;b.O(a)||(t&&w.l(a,P,G,"defaultAlignment"),this.Oq=a=a.ea(),this.W(),this.j("defaultAlignment",b,a))});w.g(G,"defaultStretch",G.prototype.Ed);w.defineProperty(G,{Ed:"defaultStretch"},function(){return this.vi},function(a){var b=this.vi;b!==a&&(w.Ca(a,T,G,"defaultStretch"),this.vi=a,this.W(),this.j("defaultStretch",b,a))});w.g(G,"defaultSeparatorPadding",G.prototype.SI); -w.defineProperty(G,{SI:"defaultSeparatorPadding"},function(){return void 0===this.uj?M.rq:this.uj},function(a){if(void 0!==this.uj){"number"===typeof a?a=new vb(a):t&&w.l(a,vb,G,"defaultSeparatorPadding");var b=this.uj;b.O(a)||(this.uj=a=a.ea(),this.j("defaultSeparatorPadding",b,a))}});w.g(G,"defaultRowSeparatorStroke",G.prototype.QI); -w.defineProperty(G,{QI:"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 ma)&&(a instanceof ma&&a.freeze(),this.ui=a,this.j("defaultRowSeparatorStroke",b,a))});w.g(G,"defaultRowSeparatorStrokeWidth",G.prototype.RI); -w.defineProperty(G,{RI:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.Gh?1:this.Gh},function(a){if(void 0!==this.Gh){var b=this.Gh;b!==a&&isFinite(a)&&0<=a&&(this.Gh=a,this.j("defaultRowSeparatorStrokeWidth",b,a))}});w.g(G,"defaultRowSeparatorDashArray",G.prototype.OI); -w.defineProperty(G,{OI:"defaultRowSeparatorDashArray"},function(){return void 0===this.fm?null:this.fm},function(a){if(void 0!==this.fm){var b=this.fm;if(b!==a){null===a||Array.isArray(a)||w.xc(a,"Array",G,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,f=0;f=c&&(c=1);var d=this.Ht,f=d.width,d=d.height,g=this.Ga,h=g.width,g=g.height,k=Math.ceil(h/f),l=Math.ceil(g/d),m=this.zA;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.Ba.q,q=p.length,r=0;rf*s*c))break}a.stroke()}else if("LineH"===D.Gb){a.lineWidth= -D.ob;Cl(this,a,D.stroke,!1,!1);a.beginPath();for(O=A=Math.floor(-m.y/d);O<=A+l&&!(N=O*d+m.y,0<=N&&N<=g&&Jm(O,s,u)&&(v&&!B?nl(a,0,N,h,N,H,D.nd):(a.moveTo(0,N),a.lineTo(h,N)),2>d*s*c));O++);a.stroke()}else if("BarV"===D.Gb)for(Cl(this,a,D.fill,!0,!1),D=D.width,isNaN(D)&&(D=f),O=A=Math.floor(-m.x/f);O<=A+k&&!(N=O*f+m.x,0<=N&&Nf*s*c));O++);else if("BarH"===D.Gb)for(Cl(this,a,D.fill,!0,!1),D=D.height,isNaN(D)&&(D=d),O=A=Math.floor(-m.y/d);O<=A+l&&!(N=O*d+m.y,0<=N&& -N<=g&&Jm(O,s,u)&&(a.fillRect(0,N,h,D),2>d*s*c));O++);v&&(void 0!==a.setLineDash?(a.setLineDash(w.zh),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=w.zh,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0))}}a.restore();ba(b,a,!1)}else{this.ja===ea&&(a.lineCap="butt",Km(this,a,!0,this.Pd,!0),Km(this,a,!1,this.Hd,!0),Lm(this,a,!0,this.Pd),Lm(this,a,!1,this.Hd),Km(this,a,!0,this.Pd,!1),Km(this,a,!1,this.Hd,!1));(c=this.IA)&&a.save();f=this.$f();d=this.Ba.q; -h=d.length;for(g=0;gg.height&&(m-=r-g.height):r>g.width&&(m-=r-g.width);l=l.position+m/2;b.lineWidth=m;r=a.padding;c?(l+=r.top,m=r.left,r=g.width-r.right,n&&!p?nl(b,m,l,r,l,q,0):(b.moveTo(m,l),b.lineTo(r,l))):(l+=r.left,m=r.top,r=g.height-r.bottom,n&&!p?nl(b,l,m,l,r,q,0):(b.moveTo(l,m),b.lineTo(l,r)));b.stroke();n&&(void 0!==b.setLineDash?(b.setLineDash(w.zh),b.lineDashOffset=0):void 0!==b.webkitLineDash?(b.webkitLineDash=w.zh,b.webkitLineDashOffset=0):void 0!==b.mozDash&&(b.mozDash=null,b.mozDashOffset=0))}}}} -function Km(a,b,c,d,f){for(var g=d.length,h=a.da,k=0;km)){var n=l.Fg(),p=l.Cn;isNaN(p)&&(p=c?a.Gh:a.Fh);var q=l.Bn;null===q&&(q=c?a.ui:a.Eh);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Za;p+n>m&&(n=m-p);0>=n||(m=a.padding,Cl(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 Jm(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dwd&&(Hc=wd),la.Za+=Hc,wd=Math.max(wd-Hc,0));1!==xa.tj||ce!==Lh&&ce!==hl||(la=this.qd(Zc),Hc=Math.max(ef-la.Za,0),Hc>Gc&&(Hc=Gc),la.Za+=Hc,Gc=Math.max(Gc-Hc,0));vg&&xa.xp()}}}w.Aa(Ug);for(var wc=0,de=0,Qa=this.ut,pa=0;pa=this.pu);Sb++)la=this.rd(xa.ic+Sb),Le.height+=Math.max(la.hi,isNaN(la.jf)?la.Jf: -Math.min(la.jf,la.Jf));for(Sb=1;Sb=this.ut);Sb++)la=this.qd(xa.column+Sb),Le.width+=Math.max(la.hi,isNaN(la.jf)?la.Jf:Math.min(la.jf,la.Jf));ub.width+=Le.width;ub.height+=Le.height;Rb=xa.margin;Wf=Rb.right+Rb.left;Xf=Rb.top+Rb.bottom;ai(xa,ub.width,ub.height,um,Di);for(var Ke=xa.Ka,ef=Math.max(Ke.width+Wf,0),Kd=Math.max(Ke.height+Xf,0),Dh=0,Sb=0;Sb=this.pu);Sb++)la=this.rd(xa.ic+Sb),Dh+=la.total||0;if(DhMd&&(la.Za=Math.min(la.Jf,Md+Ld),la.Ib!==Md&&(Ld-=la.Ib-Md));if(-1===la.index-1)break;la=this.rd(la.index-1)}for(var Yf=0,Sb=0;Sb=this.ut);Sb++)la=this.qd(xa.column+Sb),Yf+=la.total||0;if(YfMd&&(la.Za=Math.min(la.Jf,Md+Ld),la.Ib!==Md&&(Ld-=la.Ib-Md));if(-1===la.index-1)break;la=this.qd(la.index-1)}}w.Aa($c);w.sk(Le);w.sk(ub);for(var Zf=0,ff=0,ce=sl(this,!0),Nd=this.ya,$f=this.Yd,ue=de=wc=0,xd=0,Qa=this.ut,pa=0;pa< -Qa;pa++)void 0!==this.Hd[pa]&&(la=this.qd(pa),isFinite(la.width)?(ue+=la.width,ue+=la.Fg()):Om(la)===Pm?(ue+=la.Ib,ue+=la.Fg()):0!==la.Ib&&(wc+=la.Ib,wc+=la.Fg()));var Zf=isFinite(Nd.width)?Math.min(Nd.width,$f.width):ce!==Lh&&isFinite(ae)?ae:wc,Zf=Math.max(Zf,this.Ze.width),Zf=Math.max(Zf-ue,0),Eh=Math.max(Zf/wc,1);isFinite(Eh)||(Eh=1);for(pa=0;paFh)ai(Tb,Infinity,Infinity),ee=Tb.Ka,Ne.mi(ee),this.sj.add(ee);else{var cg=Tb.Lf,Tp=Tb.qu,xm=Tb.Ri;xm.Be()&&(xm=ac);var Ki=Tb.ru,Wr=Tb.AB,Li=0,Mi=0,lk=0;if(cg<-Fh||cg>=Fh){var Up=yg.gG,Ni=yg.fG;Ki!==nh&&(lk=yg.computeAngle(Tb,Ki,Ni),Tb.angle=lk);Li=Up.x-gf.x;Mi=Up.y-gf.y}else{var Af,Hh;if(0<=cg)Af=Ii.na(cg),Hh=cgc||p>d)this.W(),ai(this,n>c?c:n,p>d?d:p);break;case nd:this.W(!0);ai(this,c+r,d+s,0,0);break;case il:this.W(!0);ai(this,c+r,p+s,0,0);break;case hl:this.W(!0),ai(this,n+r,d+s,0,0)}}k=this.da;k.x=a;k.y= -b;k.width=c;k.height=d;var u=this.ja.ec;switch(u){case "Position":for(var v=g.length,A=f.x-this.padding.left,D=f.y-this.padding.top,B=0;B=this.pu);pa++){var xa=this.rd(tb+pa);ud.height+=xa.total}for(pa=1;pa=this.ut);pa++){var Yc=this.qd($d+pa);ud.width+=Yc.total}var Tg=ae.Ib+ud.width,Ah=Xc.Ib+ud.height;h.x=Wc;h.y=Oc;h.width=Tg;h.height=Ah;var Zc=Wc,Bh=Oc,Zb=Tg,Ug=Ah;Wc+Tg>f.width&&(Zb=Math.max(f.width-Wc,0));Oc+Ah>f.height&&(Ug=Math.max(f.height-Oc,0));var $c=Qa.alignment,qe=0,Pc=0,vd=0,Gc=0;if($c.Wc()){$c= -this.lk;$c.sd()||($c=ac);var qe=$c.x,Pc=$c.y,vd=$c.offsetX,Gc=$c.offsetY,wd=ae.alignment,Uf=Xc.alignment;wd.sd()&&(qe=wd.x,vd=wd.offsetX);Uf.sd()&&(Pc=Uf.y,Gc=Uf.offsetY)}else qe=$c.x,Pc=$c.y,vd=$c.offsetX,Gc=$c.offsetY;if(isNaN(qe)||isNaN(Pc))Pc=qe=.5,Gc=vd=0;var la=Ie.width,re=Ie.height,Je=Qa.margin,ak=Je.left+Je.right,bk=Je.top+Je.bottom,Hc=Jl(Qa,Xc,ae,!1);!isNaN(Qa.ya.width)||Hc!==nd&&Hc!==il||(la=Math.max(Tg-ak,0));!isNaN(Qa.ya.height)||Hc!==nd&&Hc!==hl||(re=Math.max(Ah-bk,0));var lb=Qa.Yd,mb= -Qa.Ze,la=Math.min(lb.width,la),re=Math.min(lb.height,re),la=Math.max(mb.width,la),re=Math.max(mb.height,re),ck=re+bk;h.x+=h.width*qe-(la+ak)*qe+vd+Je.left;h.y+=h.height*Pc-ck*Pc+Gc+Je.top;Qa.visible&&(Ab(Zc,Bh,Zb,Ug,h.x,h.y,Ie.width,Ie.height)?Qa.Jc(h.x,h.y,la,re):Qa.Jc(h.x,h.y,la,re,new x(Zc,Bh,Zb,Ug)))}else{Qa.fh();Qa.Qb.Sa();var Vf=Qa.Qb;Vf.x=be.type===xl?Sg:Wc;Vf.y=be.type===yl?Tf:Oc;Vf.width=Ie.width;Vf.height=Ie.height;Qa.Qb.freeze();vl(Qa,!1)}}w.sk(ud);for(tb=0;tb=ub){var Zf=this.gG,ff=this.fG;Sb!==nh&&(Yf=this.computeAngle(Ic,Sb,ff),Ic.angle=Yf);Ld=Zf.x;Md=Zf.y}else{var Nd=void 0,$f=void 0;if(0<=Qc)Nd=te.q[Qc],$f=Qcp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof G?m:null;p=w.yh();p.set(h);if(null!==m?m.rk(a,b,c,d,f,p):rl(n,a,d,p))null!== -b&&(n=b(n)),null===n||null!==c&&!c(n)||f.add(n);w.mf(p)}}}void 0===g&&w.mf(h);return d}void 0===g&&w.mf(h);return!1};function Wm(a,b,c,d){for(var f=a.Ba.q,g=f.length;g--;){var h=f[g];if(h.visible){var k=h.da,l=a.Ga;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof G&&Wm(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}} -e.gn=function(a,b,c,d,f,g){if(!1===this.tf)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ga,k=this.lg(),l=k?a:eb(w.nc(a.x,a.y),this.transform),m=k?b:eb(w.nc(b.x,b.y),this.transform),n=l.nk(m),p=0s.width||r.y>s.height||0>r.x+r.width||0>r.y+r.height||(q.lg()?(r=q.transform,eb(k.set(a),r),eb(l.set(b),r)):(k.set(a),l.set(b)),r=q,q=q instanceof G?q:null,null!==q?!q.gn(k,l,c,d,f,g):!r.lF(k,l,f))||(null!==c&&(r=c(r)),null===r||null!==d&&!d(r)||g.add(r))}}w.B(k);w.B(l)}return f? -p:h}return!1};function Mm(a){var b=a.G;if(void 0===b||b===Kc)b=null;null===b&&a instanceof W&&(a=a.Ya,null!==a&&(b=a.G));null===b&&(b=Ub);return b}function Nm(a){var b=a.H;if(void 0===b||b===Kc)b=null;null===b&&a instanceof W&&(a=a.Ya,null!==a&&(b=a.H));null===b&&(b=ec);return b}G.prototype.add=G.prototype.add=function(a){w.l(a,T,G,"add:element");this.me(this.Ba.count,a)};G.prototype.elt=G.prototype.na=function(a){return this.Ba.na(a)}; -G.prototype.insertAt=G.prototype.me=function(a,b){b instanceof z&&w.m("Cannot add a Part to a Panel: "+b);if(this===b||this.Fl(b))this===b&&w.m("Cannot make a Panel contain itself: "+this.toString()),w.m("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.T;null!==c&&c!==this&&w.m("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.ja!==lj||b instanceof W||w.m("Can only add Shapes to a Grid Panel, not: "+b);b.Pl(this);b.Am=null;if(null!==this.Dp){var d=b.data;null!==d&&"object"===typeof d&&(null===this.rg&&(this.rg=new ra(Object,G)),this.rg.add(d,b))}var f=this.Ba,d=-1;if(c===this){for(var g=-1,h=this.Ba.q,k=h.length,l=0;l=f.count&&a>=f.count)return;f.vd(g);d=g}else w.m("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0> -a||a>f.count)a=f.count;f.me(a,b);this.W();b.W();null!==b.ed?this.Jh=!0:b instanceof G&&!0===b.Jh&&(this.Jh=!0);c=this.Z;null!==c&&(c.fl=null,c.Ij=NaN,this.Jh&&c instanceof C&&(c.Jh=!0),c.Jh&&(c.Ad=null),f=this.i,null!==f&&f.oa.zb||(-1!==d&&c.Nc(xe,"elements",this,b,null,d,null),c.Nc(we,"elements",this,null,b,null,a)))};G.prototype.remove=G.prototype.remove=function(a){w.l(a,T,G,"remove:element");for(var b=this.Ba.q,c=b.length,d=-1,f=0;fa&&w.ka(a,">= 0",G,"getRowDefinition:idx");a=Math.round(a);var b=this.Pd;if(void 0===b[a]){var c=new lf;c.Pl(this);c.qe=!0;c.index=a;b[a]=c}return b[a]};G.prototype.removeRowDefinition=G.prototype.AG=function(a){t&&w.p(a,G,"removeRowDefinition:idx");0>a&&w.ka(a,">= 0",G,"removeRowDefinition:idx");a=Math.round(a);var b=this.Pd;this.Nc(xe,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.W()}; -w.A(G,{ut:"columnCount"},function(){return void 0===this.Hd?0:this.Hd.length});G.prototype.getColumnDefinition=G.prototype.qd=function(a){t&&w.p(a,G,"getColumnDefinition:idx");0>a&&w.ka(a,">= 0",G,"getColumnDefinition:idx");a=Math.round(a);var b=this.Hd;if(void 0===b[a]){var c=new lf;c.Pl(this);c.qe=!1;c.index=a;b[a]=c}return b[a]}; -G.prototype.removeColumnDefinition=G.prototype.wG=function(a){t&&w.p(a,G,"removeColumnDefinition:idx");0>a&&w.ka(a,">= 0",G,"removeColumnDefinition:idx");a=Math.round(a);var b=this.Hd;this.Nc(xe,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.W()};w.g(G,"rowSizing",G.prototype.JG); -w.defineProperty(G,{JG:"rowSizing"},function(){return void 0===this.Fm?Im:this.Fm},function(a){if(void 0!==this.Fm){var b=this.Fm;b!==a&&(a!==Im&&a!==Pm&&w.m("rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"),this.Fm=a,this.W(),this.j("rowSizing",b,a))}});w.g(G,"columnSizing",G.prototype.FE); -w.defineProperty(G,{FE:"columnSizing"},function(){return void 0===this.cm?Im:this.cm},function(a){if(void 0!==this.cm){var b=this.cm;b!==a&&(a!==Im&&a!==Pm&&w.m("columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"),this.cm=a,this.W(),this.j("columnSizing",b,a))}});w.g(G,"topIndex",G.prototype.QB); -w.defineProperty(G,{QB:"topIndex"},function(){return void 0===this.Oi?0:this.Oi},function(a){if(void 0!==this.Oi){var b=this.Oi;b!==a&&((!isFinite(a)||0>a)&&w.m("topIndex must be greater than zero and a real number. Was "+a),this.Oi=a,this.W(),this.j("topIndex",b,a))}});w.g(G,"leftIndex",G.prototype.QA); -w.defineProperty(G,{QA:"leftIndex"},function(){return void 0===this.Bi?0:this.Bi},function(a){if(void 0!==this.Bi){var b=this.Bi;b!==a&&((!isFinite(a)||0>a)&&w.m("leftIndex must be greater than zero and a real number. Was "+a),this.Bi=a,this.W(),this.j("leftIndex",b,a))}});G.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==ea)return NaN;for(var b=0,c=this.Pd,d=c.length,f=this.Oi;fa)return-1;if(this.type!==ea)return NaN;for(var b=0,c=this.Hd,d=c.length,f=this.Bi;f=c.elements.count&&!(c instanceof z)){if(1===c.elements.count){var d=null!==c.Dp;if(!d)for(var f=b.k;f.next();)if("itemArray"===f.value.lq){d=!0; -break}}d||(w.trace("Auto or Spot Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),Xm=!0)}}))}var Xm=!1; -G.prototype.updateTargetBindings=G.prototype.Xb=function(a){var b=this.am;if(null!==b)for(void 0===a&&(a=""),b=b.k;b.next();){var c=b.value,d=c.JB;if(""===a||""===d||d===a)if(d=c.lq,null!==c.LE||""!==d){var d=this.data,f=c.Rl;if(null!==f)d=""===f?this:"."===f?this:".."===f?this:this.ye(f);else{var g=this.i;null!==g&&c.nq&&(d=g.ia.Pp)}if(null===d)t&&w.trace("Binding error: missing GraphObject named "+f+" in "+this.toString());else{var g=this,h=c.xk;if(-1!==h){if(g=this.$w(h),null===g)continue}else null!== -c.zg&&(g=c.zg);"."===f?d=g:".."===f&&(d=g.T);f=c.Hz;if(0!==f){if(!(g instanceof G))continue;h=g;1===f?g=h.qd(c.pw):2===f&&(g=h.rd(c.pw))}void 0!==g&&c.rH(g,d)}}}};w.g(G,"itemArray",G.prototype.Dp); -w.defineProperty(G,{Dp:"itemArray"},function(){return this.Ai},function(a){var b=this.Ai;if(b!==a){t&&null!==a&&!w.isArray(a)&&w.m("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.i;null!==c&&null!==b&&Wj(c,this);this.Ai=a;null!==c&&null!==a&&Tj(c,this);this.j("itemArray",b,a);null!==c&&c.oa.zb||this.jB()}});function yk(a){return a.type===Jh||a.type===ij||a.type===kh||a.type===ea&&0a;)this.nf(a);a=this.Dp;if(null!==a)for(var b=w.vb(a),c=0;cc)){var d=a.getCategoryForItemData(b,c),d=a.findTemplateForItemData(b,c,d);if(null!==d){Df(d);d=d.copy();"object"===typeof b&&(null===a.rg&&(a.rg=new ra(Object,G)),a.rg.add(b,d));var f=c;yk(a)&&f++;a.me(f,d);zk(a,f,c);d.data=b}}} -function zk(a,b,c){for(a=a.Ba;ba&&w.ka(a,">= 0",lf,"height"),this.jf=a,this.Za=this.Ib,null!==this.T&&this.T.W(),this.ad("height",b,a))});w.g(lf,"width",lf.prototype.width); -w.defineProperty(lf,{width:"width"},function(){return this.jf},function(a){var b=this.jf;b!==a&&(t&&w.h(a,"number",lf,"width"),0>a&&w.ka(a,">= 0",lf,"width"),this.jf=a,this.Za=this.Ib,null!==this.T&&this.T.W(),this.ad("width",b,a))});w.g(lf,"minimum",lf.prototype.hi); -w.defineProperty(lf,{hi:"minimum"},function(){return this.Mj},function(a){var b=this.Mj;b!==a&&(t&&w.h(a,"number",lf,"minimum"),(0>a||!isFinite(a))&&w.ka(a,">= 0",lf,"minimum"),this.Mj=a,this.Za=this.Ib,null!==this.T&&this.T.W(),this.ad("minimum",b,a))});w.g(lf,"maximum",lf.prototype.Jf); -w.defineProperty(lf,{Jf:"maximum"},function(){return this.Kj},function(a){var b=this.Kj;b!==a&&(t&&w.h(a,"number",lf,"maximum"),0>a&&w.ka(a,">= 0",lf,"maximum"),this.Kj=a,this.Za=this.Ib,null!==this.T&&this.T.W(),this.ad("maximum",b,a))});w.g(lf,"alignment",lf.prototype.alignment);w.defineProperty(lf,{alignment:"alignment"},function(){return this.Ee},function(a){var b=this.Ee;b.O(a)||(t&&w.l(a,P,lf,"alignment"),this.Ee=a.ea(),null!==this.T&&this.T.W(),this.ad("alignment",b,a))}); -w.g(lf,"stretch",lf.prototype.stretch);w.defineProperty(lf,{stretch:"stretch"},function(){return this.Vh},function(a){var b=this.Vh;b!==a&&(t&&w.Ca(a,T,lf,"stretch"),this.Vh=a,null!==this.T&&this.T.W(),this.ad("stretch",b,a))});w.g(lf,"separatorPadding",lf.prototype.CB); -w.defineProperty(lf,{CB:"separatorPadding"},function(){return this.Uj},function(a){"number"===typeof a?a=new vb(a):null!==a&&t&&w.l(a,vb,lf,"separatorPadding");var b=this.Uj;null!==a&&null!==b&&b.O(a)||(null!==a&&(a=a.ea()),this.Uj=a,null!==this.T&&this.T.W(),this.ad("separatorPadding",b,a))});w.g(lf,"separatorStroke",lf.prototype.Bn); -w.defineProperty(lf,{Bn:"separatorStroke"},function(){return this.Ms},function(a){var b=this.Ms;b!==a&&(null===a||"string"===typeof a||a instanceof ma)&&(a instanceof ma&&a.freeze(),this.Ms=a,null!==this.T&&this.T.W(),this.ad("separatorStroke",b,a))});w.g(lf,"separatorStrokeWidth",lf.prototype.Cn);w.defineProperty(lf,{Cn:"separatorStrokeWidth"},function(){return this.Ns},function(a){var b=this.Ns;b!==a&&(this.Ns=a,null!==this.T&&this.T.W(),this.ad("separatorStrokeWidth",b,a))}); -w.g(lf,"separatorDashArray",lf.prototype.PG); -w.defineProperty(lf,{PG:"separatorDashArray"},function(){return this.Rh},function(a){var b=this.Rh;if(b!==a){null===a||Array.isArray(a)||w.xc(a,"Array",lf,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,f=0;ff)){for(var k=c[0],l=c[1],p=0,q=0,r=0,s=m=0,u=q=0,v=w.rb(),A=2;Au){w.Aa(v);return}f>m?(D= -f-m,f=m):D=0;var B=Math.sqrt(f*f/(1+r*r));0>p&&(B=-B);k+=B;l+=r*B;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(g/2));0===D&&d.qk(a,b);a.translate(h/2,g/2);a.rotate(-s);a.translate(-k,-l);u-=f;m-=f;if(0!==D){q++;if(q===v.length){w.Aa(v);return}m=v[q];p=m[0];s=m[1];r=m[2];m=m[3];f=D}}w.Aa(v)}} -W.prototype.qk=function(a,b){if(null!==this.Ic||null!==this.xd){null!==this.xd&&Cl(this,a,this.xd,!0,!1);null!==this.Ic&&Cl(this,a,this.Ic,!1,!1);var c=this.ve;if(0===c){var d=this.Z;d instanceof da&&d.type===kh&&d.Ac instanceof W&&(c=d.Ac.ob)}a.lineWidth=c;a.lineJoin=this.Po;a.lineCap=this.Oo;a.miterLimit=this.Lm;var f=!1;this.Z&&b.Qh.drawShadows&&(f=this.Z.fi);var g=!0;null!==this.Ic&&null===this.xd&&(g=!1);var d=!1,h=!0,k=this.Ux;null!==k&&(d=!0,void 0!==a.setLineDash?(a.setLineDash(k),a.lineDashOffset= -this.nd):void 0!==a.webkitLineDash?(a.webkitLineDash=k,a.webkitLineDashOffset=this.nd):void 0!==a.mozDash?(a.mozDash=k,a.mozDashOffset=this.nd):h=!1);var l=this.Ya;if(null!==l){if(l.ja===od)a.beginPath(),d&&!h?nl(a,l.rc,l.zc,l.tb,l.Eb,k,this.nd):(a.moveTo(l.rc,l.zc),a.lineTo(l.tb,l.Eb)),null!==this.xd&&Dl(a,this.xd),0!==c&&null!==this.Ic&&Fl(a);else if(l.ja===pd){var m=l.rc,n=l.zc,p=l.tb,q=l.Eb,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.xd&&(a.beginPath(),a.rect(l, -r,m,n),Dl(a,this.xd));if(null!==this.Ic){var s=p=0,u=0;g&&f&&(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0);d&&!h?(h=w.rb(),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(),cn(a,h,k,this.nd),Fl(a),w.Aa(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),Fl(a));g&&f&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.ja===yd)m=l.rc,n=l.zc,p=l.tb,q=l.Eb,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+M.za*l,n-r,m+l,n-M.za*r,m+l,n),a.bezierCurveTo(m+l,n+M.za*r,m+M.za*l,n+r,m,n+r),a.bezierCurveTo(m-M.za*l,n+r,m-l,n+M.za*r,m-l,n),a.bezierCurveTo(m-l,n-M.za*r,m-M.za*l,n-r,m,n-r),a.closePath(),null!==this.xd&&Dl(a,this.xd),d&&!h&&(h=w.rb(),M.Oe(m,n-r,m+M.za*l,n-r,m+l,n-M.za*r,m+l,n,.5,h),M.Oe(m+l,n,m+l,n+M.za*r,m+M.za*l,n+r,m,n+r,.5,h),M.Oe(m,n+r,m-M.za*l,n+r,m-l,n+M.za*r,m-l,n,.5,h),M.Oe(m-l,n, -m-l,n-M.za*r,m-M.za*l,n-r,m,n-r,.5,h),a.beginPath(),cn(a,h,k,this.nd),w.Aa(h)),0!==c&&null!==this.Ic&&(u=s=p=0,g&&f&&(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0),Fl(a),g&&f&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u));else if(l.ja===ld){r=l.wj;n=r.length;for(q=0;qA.ki);else for(var v=Td(A,m),D=v.length,B=0;Bf))if(h=b[0],k=b[1],4===f)nl(a,h,k,b[2],b[3],c,d);else{a.moveTo(h,k);for(var n=0,p=0,q=0,r=p=l=0,s=w.rb(),u=2;ur&&(f=r);f>l?(v=f-l,f=l):v=0;var A=Math.sqrt(f*f/ -(1+q*q));0>n&&(A=-A);h+=A;k+=q*A;m?a.lineTo(h,k):a.moveTo(h,k);r-=f;l-=f;if(0!==v){p++;if(p===s.length){w.Aa(s);return}l=s[p];n=l[0];q=l[1];l=l[2];f=v}else m=!m}w.Aa(s)}}W.prototype.getDocumentPoint=W.prototype.xb=function(a,b){void 0===b&&(b=new I);a.Be()&&w.m("getDocumentPoint:s Spot must be real: "+a.toString());var c=this.Ga,d=this.ob;b.o(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY);this.Xf.kb(b);return b}; -W.prototype.ik=function(a,b){var c=this.Ya;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.qb,f=this.ob/2;c.type!==od||b||(f+=2);var g=w.ig();g.assign(d);g.ag(f+2,f+2);if(!g.Ja(a))return w.tc(g),!1;d=f+1E-4;if(c.type===od){if(null===this.stroke)return!1;d=(c.D-c.ta)*(a.x-c.ta)+(c.F-c.ua)*(a.y-c.ua);if(0>(c.ta-c.D)*(a.x-c.D)+(c.ua-c.F)*(a.y-c.F)||0>d)return!1;w.tc(g);return M.Wd(c.ta,c.ua,c.D,c.F,f,a.x,a.y)}if(c.type===pd){var h=c.ta,k=c.ua,l=c.D,m=c.F,c=Math.min(h,l),n=Math.min(k, -m),h=Math.abs(l-h),k=Math.abs(m-k);g.x=c;g.y=n;g.width=h;g.height=k;if(null===this.fill){g.ag(-d,-d);if(g.Ja(a))return w.tc(g),!1;g.ag(d,d)}null!==this.stroke&&g.ag(f,f);f=g.Ja(a);w.tc(g);return f}if(c.type===yd){h=c.ta;k=c.ua;l=c.D;m=c.F;c=Math.min(h,l);n=Math.min(k,m);h=Math.abs(l-h);k=Math.abs(m-k);h/=2;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.tc(g),!1;h+=d;k+=d}null!==this.stroke&&(h+=f,k+=f);w.tc(g);return 0>=h||0>=k?!1:1>=c*c/ -(h*h)+n*n/(k*k)}if(c.type===ld)return w.tc(g),null===this.fill?he(c,a.x,a.y,f):c.Ja(a,f,1=this.ob)n=M.uh(p.rc,p.zc,p.tb,p.Eb,g,h,k,l,f);else{var r=0,s=0;p.rc===p.tb?(r=m,s=0):(b=(p.Eb-p.zc)/(p.tb-p.rc),s=m/Math.sqrt(1+b*b),r=s*b);d=w.rb();b=new I;M.uh(p.rc+ -r,p.zc+s,p.tb+r,p.Eb+s,g,h,k,l,b)&&d.push(b);b=new I;M.uh(p.rc-r,p.zc-s,p.tb-r,p.Eb-s,g,h,k,l,b)&&d.push(b);b=new I;M.uh(p.rc+r,p.zc+s,p.rc-r,p.zc-s,g,h,k,l,b)&&d.push(b);b=new I;M.uh(p.tb+r,p.Eb+s,p.tb-r,p.Eb-s,g,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return w.Aa(d),!1;n=!0;s=Infinity;for(r=0;rMath.abs(c)){n=h-b-c*(g-d);if(0>a*a*c*c+v*v-n*n){f.x=NaN;f.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+v*v-n*n);k=(-(a*a*c*n)+a*v*m)/(v*v+a*a*c*c)+d;a=(-(a*a*c*n)-a*v*m)/(v*v+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){f.x=NaN;f.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)?(f=bf||M.yb(l.y,f))&&(l.yf||M.yb(l.x,f))&&(l.x=h&&d<=a}a=h&&g<=a} -W.prototype.lF=function(a,b,c){function d(a,b){for(var c=a.length,d=0;df)return!0;return!1}if(c&&null!==this.fill&&this.ik(a,!0))return!0;var f=a.nk(b);b=f;1.5=f||ib(b,g,0,-p)>=f||ib(b,g,0,p)>=f||ib(b,g,n,0)>=f?!1:!0}else if(g.type=== -ld){h=g.qb;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.yf&&hb(a.x,a.y,k,l,m,l)>f&&hb(a.x,a.y,m,h,k,h)>f&&hb(a.x,a.y,m,h,m,l)>f)return!1;b=Math.sqrt(f);if(c){if(null===this.fill?he(g,a.x,a.y,b):g.Ja(a,b,!0))return!0}else{c=g.wb;for(b=0;bf)return!1;l=k.La.q;m=l.length;for(h=0;hf)return!1;break;case Pd:g=w.rb();M.Oe(n,p,q.Mb,q.Zb, -q.Ce,q.De,q.D,q.F,.8,g);n=d(g,a);w.Aa(g);if(n)return!1;n=q.D;p=q.F;if(a.At(n,p)>f)return!1;break;case Qd:g=w.rb();M.Yp(n,p,q.Mb,q.Zb,q.D,q.F,.8,g);n=d(g,a);w.Aa(g);if(n)return!1;n=q.D;p=q.F;if(a.At(n,p)>f)return!1;break;case Rd:case Sd:var q=q.type===Rd?Td(q,k):Ud(q,k,n,p),r=q.length,s=null,g=w.rb();for(b=0;b= 0",W,"strokeWidth:value")}); -w.g(W,"strokeCap",W.prototype.aH);w.defineProperty(W,{aH:"strokeCap"},function(){return this.Oo},function(a){var b=this.Oo;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?w.ka(a,'"butt", "round", or "square"',W,"strokeCap"):(this.Oo=a,this.ra(),this.j("strokeCap",b,a)))});w.g(W,"strokeJoin",W.prototype.yK); -w.defineProperty(W,{yK:"strokeJoin"},function(){return this.Po},function(a){var b=this.Po;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?w.ka(a,'"miter", "bevel", or "round"',W,"strokeJoin"):(this.Po=a,this.ra(),this.j("strokeJoin",b,a)))});w.g(W,"strokeMiterLimit",W.prototype.zK); -w.defineProperty(W,{zK:"strokeMiterLimit"},function(){return this.Lm},function(a){var b=this.Lm;if(b!==a)if(t&&w.p(a,W,"strokeMiterLimit"),0 0",W,"strokeWidth:value")});w.g(W,"strokeDashArray",W.prototype.Ux); -w.defineProperty(W,{Ux:"strokeDashArray"},function(){return this.Km},function(a){var b=this.Km;if(b!==a){null===a||Array.isArray(a)||w.xc(a,"Array",W,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,f=0;fm*k*k&&(h=!0);b.df!==a&&(h=!1);!1===b.yA("textGreeking")&&(h=!1);for(var m=this.Wj,k=this.Xj,l=this.ff,n=0;nc&&(p=c);var g=g+m,r=q,q=a,s=g,u=c, -v=d,A=0;h?("start"===this.ge||"left"===this.ge?A=0:"end"===this.ge||"right"===this.ge?A=u-p:"center"===this.ge?A=(u-p)/2:w.m("textAlign must be start, end, left, right, or center"),q.fillRect(0+A,s+.25*v,p,1)):("start"===this.ge||"left"===this.ge?A=0:"end"===this.ge||"right"===this.ge?A=u:"center"===this.ge?A=u/2:w.m("textAlign must be start, end, left, right, or center"),q.fillText(r,0+A,s+v-.25*v),r=v/20|0,0===r&&(r=1),this.nm&&("end"===this.ge||"right"===this.ge?A-=p:"center"===this.ge&&(A-=p/ -2),q.beginPath(),q.lineWidth=r,q.moveTo(0+A,s+v-.2*v),q.lineTo(0+A+p,s+v-.2*v),q.stroke()),this.mm&&(q.beginPath(),q.lineWidth=r,s=s+v-v/2.2|0,0!==r%2&&(s+=.5),q.moveTo(0,s),q.lineTo(0+p,s),q.stroke()));g+=d+k}}}; -va.prototype.Np=function(a,b,c,d){var f=this.Cj;f.reset();var g=0,h=0;if(isNaN(this.ya.width)){g=this.we.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===g.length)g=0;else if(this.ux){for(var k=h=0,l=!1;!l;){var m=g.indexOf("\n",k);-1===m&&(m=g.length,l=!0);k=An(g.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.dh);k>h&&(h=k);k=m+1}g=h}else h=g.indexOf("\n",0),0<=h&&(g=g.substr(0,h)),g=k=An(g,this.dh);g=Math.min(g,a/this.scale);g=Math.max(8,g)}else g=this.ya.width;null!==this.T&&(g=Math.min(g,this.T.Yd.width), -g=Math.max(g,this.T.Ze.width));h=yn(this,g,f);m=h=isNaN(this.ya.height)?Math.min(h,b/this.scale):this.ya.height;if(0!==f.gf&&1!==f.Fe.length&&this.il===vn&&(b=this.dh,l=this.il===vn?Bn(b):0,k=this.Wj+this.Xj,k=Math.max(0,zn(this)+k),m=Math.max(Math.floor(m/k)-1,0),!(m+1>=f.Fe.length))){k=f.Fe[m];for(a=Math.max(1,a-l);An(k,b)>a&&1=a.Ci)return new na(0,l);if(a.Qm===tn){c.ck=1;g=An(b,k);if(0===h||g<=d)return c.gf=g,c.vf.push(c.gf),c.Fe.push(b),new na(g,l);var m=Cn(b);b=b.substr(m.length);for(var n=Cn(b),g=An(m+n,k);0d&&1d;){n=1;g=An(m.substr(0,n),k);for(h=0;g<=d;)n++,h=g,g=An(m.substr(0,n),k);1===n?(c.vf[a.ff+p]=g,f=Math.max(f,g)):(c.vf[a.ff+p]=h,f=Math.max(f,h));n--;1>n&&(n=1);c.Fe[a.ff+p]=m.substr(0,n);p++;m=m.substr(n);if(a.ff+p>a.Ci)break}n=Cn(b);for(g=An(m+n,k);0a.Ci))break}c.ck=Math.min(a.Ci,p);c.gf=Math.max(c.gf,f);return new na(c.gf,l*c.ck)}function Cn(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)}function An(a,b){rn!==b&&(rn=sn.font=b);return sn.measureText(a).width} -function zn(a){if(null!==a.ko)return a.ko;var b=a.dh;rn!==b&&(rn=sn.font=b);var c=0;void 0!==mn[b]&&5E3>nn?c=mn[b]:(c=1.3*sn.measureText("M").width,mn[b]=c,nn++);return a.ko=c}function Bn(a){rn!==a&&(rn=sn.font=a);var b=0;void 0!==on[a]&&5E3>pn?b=on[a]:(b=sn.measureText(qn).width,on[a]=b,pn++);return b} -function yn(a,b,c){var d=a.we.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),f=a.Wj+a.Xj,f=Math.max(0,zn(a)+f);if(0===d.length)return c.gf=0,a.ff=1,f;if(!a.ux){var g=d.indexOf("\n",0);0<=g&&(d=d.substr(0,g))}for(var g=0,h=a.ff=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.Qm!==tn?(c.ck=0,h=xn(a,h,c,b),g+=h.height,a.ff+=c.ck):(xn(a,h,c,b),g+=f,a.ff++),a.ff===a.Ci&&(l=!0)),h=k+1;return a.Jv=g}w.g(va,"textValidation",va.prototype.yu); -w.defineProperty(va,{yu:"textValidation"},function(){return this.ll},function(a){var b=this.ll;b!==a&&(null!==a&&w.h(a,"function",va,"textValidation"),this.ll=a,this.j("textValidation",b,a))});w.g(va,"spacingAbove",va.prototype.vK);w.defineProperty(va,{vK:"spacingAbove"},function(){return this.Wj},function(a){var b=this.Wj;b!==a&&(t&&w.h(a,"number",va,"spacingAbove"),this.Wj=a,this.j("spacingAbove",b,a))});w.g(va,"spacingBelow",va.prototype.wK); -w.defineProperty(va,{wK:"spacingBelow"},function(){return this.Xj},function(a){var b=this.Xj;b!==a&&(t&&w.h(a,"number",va,"spacingBelow"),this.Xj=a,this.j("spacingBelow",b,a))});w.g(va,"maxLines",va.prototype.PJ);w.defineProperty(va,{PJ:"maxLines"},function(){return this.Ci},function(a){var b=this.Ci;b!==a&&(t&&w.h(a,"number",va,"maxLines"),a=Math.floor(a),0>=a&&w.ka(a,"> 0",va,"maxLines"),this.Ci=a,this.j("maxLines",b,a),this.W())});w.A(va,{$K:"metrics"},function(){return this.Cj}); -function ln(){this.gf=this.ck=0;this.vf=[];this.Fe=[]}ln.prototype.reset=function(){this.gf=this.ck=0;this.vf=[];this.Fe=[]};ln.prototype.wt=function(a){this.ck=a.ck;this.gf=a.gf;this.vf=w.ul(a.vf);this.Fe=w.ul(a.Fe)};w.A(ln,{HK:"arrSize"},function(){return this.vf});w.A(ln,{IK:"arrText"},function(){return this.Fe});w.A(ln,{ZK:"maxLineWidth"},function(){return this.gf}); -function Xl(){T.call(this);this.ae=null;this.Rs="";this.Vj=(new x(NaN,NaN,NaN,NaN)).freeze();this.po=nd;this.Vs=this.yf=null;this.yv=this.dr=this.um=!1;this.mv=!0;this.Ko=null;this.pD=0}w.Na(Xl,T);w.ma("Picture",Xl);var Dn=new ua,En=0,Fn=[],Gn=-1,Yi=[],Hn;Xl.clearCache=Hn=function(a){void 0===a&&(a="");w.h(a,"string",Xl,"clearCache:url");""!==a?Dn[a]&&(delete Dn[a],En--):(Dn=new ua,En=0)}; -Xl.prototype.cloneProtected=function(a){T.prototype.cloneProtected.call(this,a);a.element=this.ae;a.Rs=this.Rs;a.Vj.assign(this.Vj);a.po=this.po;a.yf=this.yf;a.Ko=this.Ko};Xl.prototype.toString=function(){return"Picture("+this.source+")#"+w.cd(this)};w.g(Xl,"element",Xl.prototype.element); -w.defineProperty(Xl,{element:"element"},function(){return this.ae},function(a){var b=this.ae;if(b!==a){a instanceof HTMLImageElement||a instanceof HTMLVideoElement||a instanceof HTMLCanvasElement||w.m("Picture.element must be an instance of Image, Canvas, or Video.");this.dr=!1;var c=this;a instanceof HTMLCanvasElement?this.yv=!0:(this.yv=!1,a.onerror=function(a){c.dr=!0;null!==c.yf&&c.yf(c,a)});this.ae=a;!0===a.complete||void 0===a.complete?(this.um=!0,this.ya.J()||(tl(this,!1),this.W())):(Fn.push(this), --1===Gn&&(Gn=w.setInterval(function(){for(var a=[],b=Fn,c=b.length,h=0;hn.Zo.length&&(Jn(n,4,k,h),Jn(n,16,k,h));for(var r=n.Zo,s=r.length,p=r[0],u=0;uf;f++)a.lineTo(d[f].x*b,d[f].y*c); -w.Aa(d);Gd(a);b=a.s;b.G=new P(.2,.22);b.H=new P(.8,.9);w.v(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=M.vl(6);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;6>f;f++)a.lineTo(d[f].x*b,d[f].y*c);w.Aa(d);Gd(a);b=a.s;b.G=new P(.07,.25);b.H=new P(.93,.75);w.v(a);return b},Heptagon:function(a,b,c){var d=M.vl(7);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;7>f;f++)a.lineTo(d[f].x*b,d[f].y*c);w.Aa(d);Gd(a);b=a.s;b.G=new P(.2,.15);b.H=new P(.8,.85);w.v(a);return b},Octagon:function(a, -b,c){var d=M.vl(8);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;8>f;f++)a.lineTo(d[f].x*b,d[f].y*c);w.Aa(d);Gd(a);b=a.s;b.G=new P(.15,.15);b.H=new P(.85,.85);w.v(a);return b},Nonagon:function(a,b,c){var d=M.vl(9);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;9>f;f++)a.lineTo(d[f].x*b,d[f].y*c);w.Aa(d);Gd(a);b=a.s;b.G=new P(.17,.13);b.H=new P(.82,.82);w.v(a);return b},Decagon:function(a,b,c){var d=M.vl(10);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;10>f;f++)a.lineTo(d[f].x*b,d[f].y*c);w.Aa(d); -Gd(a);b=a.s;b.G=new P(.16,.16);b.H=new P(.84,.84);w.v(a);return b},Dodecagon:function(a,b,c){var d=M.vl(12);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;12>f;f++)a.lineTo(d[f].x*b,d[f].y*c);w.Aa(d);Gd(a);b=a.s;b.G=new P(.16,.16);b.H=new P(.84,.84);w.v(a);return b},FivePointedStar:function(a,b,c){var d=M.dn(5);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;10>f;f++)a.lineTo(d[f].x*b,d[f].y*c);w.Aa(d);Gd(a);b=a.s;b.G=new P(.312,.383);b.H=new P(.693,.765);w.v(a);return b},SixPointedStar:function(a,b, -c){var d=M.dn(6);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;12>f;f++)a.lineTo(d[f].x*b,d[f].y*c);w.Aa(d);Gd(a);b=a.s;b.G=new P(.17,.251);b.H=new P(.833,.755);w.v(a);return b},SevenPointedStar:function(a,b,c){var d=M.dn(7);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;14>f;f++)a.lineTo(d[f].x*b,d[f].y*c);w.Aa(d);Gd(a);b=a.s;b.G=new P(.363,.361);b.H=new P(.641,.709);w.v(a);return b},EightPointedStar:function(a,b,c){var d=M.dn(8);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;16>f;f++)a.lineTo(d[f].x* -b,d[f].y*c);w.Aa(d);Gd(a);b=a.s;b.G=new P(.252,.255);b.H=new P(.75,.75);w.v(a);return b},NinePointedStar:function(a,b,c){var d=M.dn(9);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;18>f;f++)a.lineTo(d[f].x*b,d[f].y*c);w.Aa(d);Gd(a);b=a.s;b.G=new P(.355,.361);b.H=new P(.645,.651);w.v(a);return b},TenPointedStar:function(a,b,c){var d=M.dn(10);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;20>f;f++)a.lineTo(d[f].x*b,d[f].y*c);w.Aa(d);Gd(a);b=a.s;b.G=new P(.281,.261);b.H=new P(.723,.748);w.v(a);return b}, -FivePointedBurst:function(a,b,c){var d=M.dp(5);a=w.u();R(a,d[0].x*b,d[0].y*c,!0);for(var f=1;fa&&(a=.15);var d=w.u(), -f=.2*M.za;R(d,0,.2*c,!0);S(d,0,(.2-f)*c,(.2-f)*b,0,.2*b,0);d.lineTo(.8*b,0);S(d,(.8+f)*b,0,1*b,(.2-f)*c,1*b,.2*c);d.lineTo(1*b,.8*c);S(d,1*b,(.8+f)*c,(.8+f)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);S(d,(.2-f)*b,1*c,0,(.8+f)*c,0,.8*c);d.lineTo(0,.2*c);R(d,0,a*c,!1);d.lineTo(1*b,a*c);d.jb(!1);b=d.s;b.G=new P(0,a);b.H=new P(1,1-a);w.v(d);return b},DividedProcess:function(a,b,c){a=a?a.Hc:NaN;if(isNaN(a)||.1>a)a=.1;var d=w.u();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Gd(d);R(d,0,a*c,!1); -d.lineTo(1*b,a*c);d.jb(!1);b=d.s;b.G=new P(0,a);b.H=ec;w.v(d);return b},Document:function(a,b,c){c/=.8;a=w.u();R(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);S(a,.5*b,.4*c,.5*b,1*c,0,.7*c);Gd(a);b=a.s;b.G=Ub;b.H=new P(1,.6);w.v(a);return b},ExternalOrganization:function(a,b,c){a=a?a.Hc:NaN;if(isNaN(a)||.2>a)a=.2;var d=w.u();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Gd(d);R(d,a*b,0,!1);d.lineTo(0,a*c);d.moveTo(1*b,a*c);d.lineTo((1-a)*b,0);d.moveTo(0,(1-a)*c);d.lineTo(a* -b,1*c);d.moveTo((1-a)*b,1*c);d.lineTo(1*b,(1-a)*c);d.jb(!1);b=d.s;b.G=new P(a/2,a/2);b.H=new P(1-a/2,1-a/2);w.v(d);return b},ExternalProcess:function(a,b,c){a=w.u();R(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);Gd(a);R(a,.1*b,.4*c,!1);a.lineTo(.1*b,.6*c);a.moveTo(.9*b,.6*c);a.lineTo(.9*b,.4*c);a.moveTo(.6*b,.1*c);a.lineTo(.4*b,.1*c);a.moveTo(.4*b,.9*c);a.lineTo(.6*b,.9*c);a.jb(!1);b=a.s;b.G=new P(.25,.25);b.H=new P(.75,.75);w.v(a);return b},File:function(a,b,c){a=w.u();R(a, -0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);Gd(a);R(a,.75*b,0,!1);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.25*c);a.jb(!1);b=a.s;b.G=new P(0,.25);b.H=ec;w.v(a);return b},Interrupt:function(a,b,c){a=w.u();R(a,1*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);R(a,1*b,.5*c,!1);a.lineTo(1*b,1*c);R(a,1*b,.5*c,!1);a.lineTo(1*b,0);b=a.s;b.G=new P(0,.25);b.H=new P(.5,.75);w.v(a);return b},InternalStorage:function(a,b,c){var d=a?a.Hc:NaN;a=a?a.fu:NaN;isNaN(d)&&(d= -.1);isNaN(a)&&(a=.1);var f=w.u();R(f,0,0,!0);f.lineTo(1*b,0);f.lineTo(1*b,1*c);f.lineTo(0,1*c);Gd(f);R(f,d*b,0,!1);f.lineTo(d*b,1*c);f.moveTo(0,a*c);f.lineTo(1*b,a*c);f.jb(!1);b=f.s;b.G=new P(d,a);b.H=ec;w.v(f);return b},Junction:function(a,b,c){a=w.u();var d=1/Math.SQRT2,f=(1-1/Math.SQRT2)/2,g=.5*M.za;R(a,1*b,.5*c,!0);S(a,1*b,(.5+g)*c,(.5+g)*b,1*c,.5*b,1*c);S(a,(.5-g)*b,1*c,0,(.5+g)*c,0,.5*c);S(a,0,(.5-g)*c,(.5-g)*b,0,.5*b,0);S(a,(.5+g)*b,0,1*b,(.5-g)*c,1*b,.5*c);R(a,(f+d)*b,(f+d)*c,!1);a.lineTo(f* -b,f*c);a.moveTo(f*b,(f+d)*c);a.lineTo((f+d)*b,f*c);a.jb(!1);b=a.s;b.Ed=Nh;w.v(a);return b},LinedDocument:function(a,b,c){c/=.8;a=w.u();R(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);S(a,.5*b,.4*c,.5*b,1*c,0,.7*c);Gd(a);R(a,.1*b,0,!1);a.lineTo(.1*b,.75*c);a.jb(!1);b=a.s;b.G=new P(.1,0);b.H=new P(1,.6);w.v(a);return b},LoopLimit:function(a,b,c){a=w.u();R(a,0,1*c,!0);a.lineTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);Gd(a);b=a.s;b.G=new P(0,.25); -b.H=ec;w.v(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=w.u();var d=.5*M.za;R(a,.5*b,1*c,!0);S(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);S(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);S(a,1*b,(.5+d)*c,(.5+d)*b,.9*c,.6*b,.9*c);a.lineTo(1*b,.9*c);a.lineTo(1*b,1*c);a.lineTo(.5*b,1*c);b=a.s;b.G=new P(.15,.15);b.H=new P(.85,.8);w.v(a);return b},ManualInput:function(a,b,c){a=w.u();R(a,1*b,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.25*c);Gd(a);b=a.s; -b.G=new P(0,.25);b.H=ec;w.v(a);return b},MessageFromUser:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.7);var d=w.u();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(a*b,.5*c);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Gd(d);b=d.s;b.G=Ub;b.H=new P(a,1);w.v(d);return b},MicroformProcessing:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.25);var d=w.u();R(d,0,0,!0);d.lineTo(.5*b,a*c);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.5*b,(1-a)*c);d.lineTo(0,1*c);Gd(d);b=d.s;b.G=new P(0,a);b.H=new P(1,1-a);w.v(d);return b},MicroformRecording:function(a, -b,c){a=w.u();R(a,0,0,!0);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.15*c);a.lineTo(1*b,.85*c);a.lineTo(.75*b,.75*c);a.lineTo(0,1*c);Gd(a);b=a.s;b.G=new P(0,.25);b.H=new P(1,.75);w.v(a);return b},MultiDocument:function(a,b,c){c/=.8;a=w.u();R(a,b,0,!0);a.lineTo(b,.5*c);S(a,.96*b,.47*c,.93*b,.45*c,.9*b,.44*c);a.lineTo(.9*b,.6*c);S(a,.86*b,.57*c,.83*b,.55*c,.8*b,.54*c);a.lineTo(.8*b,.7*c);S(a,.4*b,.4*c,.4*b,1*c,0,.7*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);a.lineTo(.1*b,.1*c);a.lineTo(.2*b,.1*c);a.lineTo(.2* -b,0);Gd(a);R(a,.1*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.54*c);a.moveTo(.2*b,.1*c);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.44*c);a.jb(!1);b=a.s;b.G=new P(0,.25);b.H=new P(.8,.77);w.v(a);return b},MultiProcess:function(a,b,c){a=w.u();R(a,.1*b,.1*c,!0);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);a.lineTo(1*b,0);a.lineTo(1*b,.8*c);a.lineTo(.9*b,.8*c);a.lineTo(.9*b,.9*c);a.lineTo(.8*b,.9*c);a.lineTo(.8*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);Gd(a);R(a,.2*b,.1*c,!1);a.lineTo(.9*b,.1*c); -a.lineTo(.9*b,.8*c);a.moveTo(.1*b,.2*c);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.9*c);a.jb(!1);b=a.s;b.G=new P(0,.2);b.H=new P(.8,1);w.v(a);return b},OfflineStorage:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.1);var d=1-a,f=w.u();R(f,0,0,!0);f.lineTo(1*b,0);f.lineTo(.5*b,1*c);Gd(f);R(f,.5*a*b,a*c,!1);f.lineTo((1-.5*a)*b,a*c);f.jb(!1);b=f.s;b.G=new P(d/4+.5*a,a);b.H=new P(3*d/4+.5*a,a+.5*d);w.v(f);return b},OffPageConnector:function(a,b,c){a=w.u();R(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.5*c);a.lineTo(.75* -b,1*c);a.lineTo(0,1*c);Gd(a);b=a.s;b.G=Ub;b.H=new P(.75,1);w.v(a);return b},Or:function(a,b,c){a=w.u();var d=.5*M.za;R(a,1*b,.5*c,!0);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);S(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);R(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.jb(!1);b=a.s;b.Ed=Nh;w.v(a);return b},PaperTape:function(a,b,c){c/=.8;a=w.u();R(a,0,.7*c,!0);a.lineTo(0,.3*c);S(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1* -b,.7*c);S(a,.5*b,.4*c,.5*b,1*c,0,.7*c);Gd(a);b=a.s;b.G=new P(0,.49);b.H=new P(1,.75);w.v(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Hc:NaN;a=a?a.fu:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var f=w.u();R(f,0,0,!0);f.lineTo(1*b,0);f.lineTo((1-a)*b,.5*c);f.lineTo(1*b,1*c);f.lineTo(0,1*c);Gd(f);b=f.s;b.G=new P(d,0);b.H=new P(1-a,1);w.v(f);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Hc:NaN;a=a?a.fu:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var f=w.u();R(f,0,0,!0);f.lineTo((1-a)*b,0);f.lineTo(1* -b,.5*c);f.lineTo((1-a)*b,1*c);f.lineTo(0,1*c);Gd(f);b=f.s;b.G=new P(d,0);b.H=new P(1-a,1);w.v(f);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.1);var d=w.u();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Gd(d);R(d,(1-a)*b,0,!1);d.lineTo((1-a)*b,1*c);d.moveTo(a*b,0);d.lineTo(a*b,1*c);d.jb(!1);b=d.s;b.G=new P(a,0);b.H=new P(1-a,1);w.v(d);return b},Process:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.1);var d=w.u();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1* -b,1*c);d.lineTo(0,1*c);Gd(d);R(d,a*b,0,!1);d.lineTo(a*b,1*c);d.jb(!1);b=d.s;b.G=new P(a,0);b.H=ec;w.v(d);return b},Sort:function(a,b,c){a=w.u();R(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);Gd(a);R(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.jb(!1);b=a.s;b.G=new P(.25,.25);b.H=new P(.75,.5);w.v(a);return b},Start:function(a,b,c){a=w.u();R(a,.25*b,0,!0);R(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);R(a,.25*b,0,!1);a.lineTo(.25*b,1*c);a.moveTo(.75* -b,0);a.lineTo(.75*b,1*c);a.jb(!1);b=a.s;b.G=new P(.25,0);b.H=new P(.75,1);w.v(a);return b},Terminator:function(a,b,c){a=w.u();R(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);b=a.s;b.G=new P(.23,0);b.H=new P(.77,1);w.v(a);return b},TransmittalTape:function(a,b,c){a=a?a.Hc:NaN;isNaN(a)&&(a=.1);var d=w.u();R(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.75*b,(1-a)*c);d.lineTo(0,(1-a)*c);Gd(d);b=d.s;b.G=Ub;b.H=new P(1,1-a);w.v(d);return b},AndGate:function(a, -b,c){a=w.u();var d=.5*M.za;R(a,0,0,!0);a.lineTo(.5*b,0);S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);Gd(a);b=a.s;b.G=Ub;b.H=new P(.55,1);w.v(a);return b},Buffer:function(a,b,c){a=w.u();R(a,0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);Gd(a);b=a.s;b.G=new P(0,.25);b.H=new P(.5,.75);w.v(a);return b},Clock:function(a,b,c){a=w.u();var d=.5*M.za;R(a,1*b,.5*c,!0);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);S(a,0,(.5-d)*c,(.5- -d)*b,0,.5*b,0);S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);R(a,1*b,.5*c,!1);a.lineTo(1*b,.5*c);R(a,.8*b,.75*c,!1);a.lineTo(.8*b,.25*c);a.lineTo(.6*b,.25*c);a.lineTo(.6*b,.75*c);a.lineTo(.4*b,.75*c);a.lineTo(.4*b,.25*c);a.lineTo(.2*b,.25*c);a.lineTo(.2*b,.75*c);a.jb(!1);b=a.s;b.Ed=Nh;w.v(a);return b},Ground:function(a,b,c){a=w.u();R(a,.5*b,0,!1);a.lineTo(.5*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.3*b,.8*c);a.lineTo(.7*b,.8*c);a.moveTo(.4*b,1*c);a.lineTo(.6*b,1*c);b=a.s;w.v(a);return b}, -Inverter:function(a,b,c){a=w.u();var d=.1*M.za;R(a,.8*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);R(a,1*b,.5*c,!0);S(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);S(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);S(a,.8*b,(.5-d)*c,(.9-d)*b,.4*c,.9*b,.4*c);S(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.s;b.G=new P(0,.25);b.H=new P(.4,.75);w.v(a);return b},NandGate:function(a,b,c){a=w.u();var d=M.za,f=.5*d,g=.4*d,d=.1*d;R(a,.8*b,.5*c,!0);S(a,.8*b,(.5+g)*c,(.4+f)*b,1*c,.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0, -0);a.lineTo(.4*b,0);S(a,(.4+f)*b,0,.8*b,(.5-g)*c,.8*b,.5*c);R(a,1*b,.5*c,!0);S(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);S(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);S(a,.8*b,(.5-d)*c,(.9-d)*b,.4*c,.9*b,.4*c);S(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.s;b.G=new P(0,.05);b.H=new P(.55,.95);w.v(a);return b},NorGate:function(a,b,c){a=w.u();var d=M.za,f=.5,g=d*f,h=0,k=.5;R(a,.8*b,.5*c,!0);S(a,.7*b,(k+g)*c,(h+g)*b,(k+f)*c,0,1*c);S(a,.25*b,.75*c,.25*b,.25*c,0,0);S(a,(h+g)*b,(k-f)*c,.7*b,(k-g)*c,.8*b,.5*c); -f=.1;g=.1*d;h=.9;k=.5;R(a,(h-f)*b,k*c,!0);S(a,(h-f)*b,(k-g)*c,(h-g)*b,(k-f)*c,h*b,(k-f)*c);S(a,(h+g)*b,(k-f)*c,(h+f)*b,(k-g)*c,(h+f)*b,k*c);S(a,(h+f)*b,(k+g)*c,(h+g)*b,(k+f)*c,h*b,(k+f)*c);S(a,(h-g)*b,(k+f)*c,(h-f)*b,(k+g)*c,(h-f)*b,k*c);b=a.s;b.G=new P(.2,.25);b.H=new P(.6,.75);w.v(a);return b},OrGate:function(a,b,c){a=w.u();var d=.5*M.za;R(a,0,0,!0);S(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);S(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);S(a,.25*b,.75*c,.25*b,.25*c,0,0);Gd(a);b=a.s;b.G=new P(.2,.25);b.H= -new P(.75,.75);w.v(a);return b},XnorGate:function(a,b,c){a=w.u();var d=M.za,f=.5,g=d*f,h=.2,k=.5;R(a,.1*b,0,!1);S(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);R(a,.8*b,.5*c,!0);S(a,.7*b,(k+g)*c,(h+g)*b,(k+f)*c,.2*b,1*c);S(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);S(a,(h+g)*b,(k-f)*c,.7*b,(k-g)*c,.8*b,.5*c);f=.1;g=.1*d;h=.9;k=.5;R(a,(h-f)*b,k*c,!0);S(a,(h-f)*b,(k-g)*c,(h-g)*b,(k-f)*c,h*b,(k-f)*c);S(a,(h+g)*b,(k-f)*c,(h+f)*b,(k-g)*c,(h+f)*b,k*c);S(a,(h+f)*b,(k+g)*c,(h+g)*b,(k+f)*c,h*b,(k+f)*c);S(a,(h-g)*b,(k+f)*c,(h- -f)*b,(k+g)*c,(h-f)*b,k*c);b=a.s;b.G=new P(.4,.25);b.H=new P(.65,.75);w.v(a);return b},XorGate:function(a,b,c){a=w.u();var d=.5*M.za;R(a,.1*b,0,!1);S(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);R(a,.2*b,0,!0);S(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);S(a,.9*b,(.5+d)*c,(.2+d)*b,1*c,.2*b,1*c);S(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);Gd(a);b=a.s;b.G=new P(.4,.25);b.H=new P(.8,.75);w.v(a);return b},Capacitor:function(a,b,c){a=w.u();R(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.s;w.v(a);return b}, -Resistor:function(a,b,c){a=w.u();R(a,0,.5*c,!1);a.lineTo(.1*b,0);a.lineTo(.2*b,1*c);a.lineTo(.3*b,0);a.lineTo(.4*b,1*c);a.lineTo(.5*b,0);a.lineTo(.6*b,1*c);a.lineTo(.7*b,.5*c);b=a.s;w.v(a);return b},Inductor:function(a,b,c){a=w.u();var d=.1*M.za,f=.1;R(a,(f-.5*d)*b,c,!1);S(a,(f-d)*b,c,(f-.1)*b,0,(f+.1)*b,0);f=.3;S(a,(f+.1)*b,0,(f+d)*b,c,f*b,c);S(a,(f-d)*b,c,(f-.1)*b,0,(f+.1)*b,0);f=.5;S(a,(f+.1)*b,0,(f+d)*b,c,f*b,c);S(a,(f-d)*b,c,(f-.1)*b,0,(f+.1)*b,0);f=.7;S(a,(f+.1)*b,0,(f+d)*b,c,f*b,c);S(a,(f- -d)*b,c,(f-.1)*b,0,(f+.1)*b,0);f=.9;S(a,(f+.1)*b,0,(f+d)*b,c,(f+.5*d)*b,c);b=a.s;w.v(a);return b},ACvoltageSource:function(a,b,c){a=w.u();var d=.5*M.za;R(a,0*b,.5*c,!1);S(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);S(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);S(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.s;b.Ed=Nh;w.v(a);return b},DCvoltageSource:function(a,b,c){a=w.u();R(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0); -a.lineTo(1*b,1*c);b=a.s;w.v(a);return b},Diode:function(a,b,c){a=w.u();R(a,1*b,0,!1);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);a.lineTo(1*b,1*c);b=a.s;b.G=new P(0,.25);b.H=new P(.5,.75);w.v(a);return b},Wifi:function(a,b,c){var d=b,f=c;b*=.38;c*=.6;a=w.u();var g=M.za,h=.8*g,k=.8,l=0,m=.5,d=(d-b)/2,f=(f-c)/2;R(a,l*b+d,(m+k)*c+f,!0);S(a,(l-h)*b+d,(m+k)*c+f,(l-k)*b+d,(m+h)*c+f,(l-k)*b+d,m*c+f);S(a,(l-k)*b+d,(m-h)*c+f,(l-h)*b+d,(m-k)*c+f,l*b+d,(m-k)*c+f);S(a,l*b+d,(m-k)*c+f, -(l-k+.5*h)*b+d,(m-h)*c+f,(l-k+.5*h)*b+d,m*c+f);S(a,(l-k+.5*h)*b+d,(m+h)*c+f,l*b+d,(m+k)*c+f,l*b+d,(m+k)*c+f);Gd(a);h=.4*g;k=.4;l=.2;m=.5;R(a,l*b+d,(m+k)*c+f,!0);S(a,(l-h)*b+d,(m+k)*c+f,(l-k)*b+d,(m+h)*c+f,(l-k)*b+d,m*c+f);S(a,(l-k)*b+d,(m-h)*c+f,(l-h)*b+d,(m-k)*c+f,l*b+d,(m-k)*c+f);S(a,l*b+d,(m-k)*c+f,(l-k+.5*h)*b+d,(m-h)*c+f,(l-k+.5*h)*b+d,m*c+f);S(a,(l-k+.5*h)*b+d,(m+h)*c+f,l*b+d,(m+k)*c+f,l*b+d,(m+k)*c+f);Gd(a);h=.2*g;k=.2;m=l=.5;R(a,(l-k)*b+d,m*c+f,!0);S(a,(l-k)*b+d,(m-h)*c+f,(l-h)*b+d,(m-k)* -c+f,l*b+d,(m-k)*c+f);S(a,(l+h)*b+d,(m-k)*c+f,(l+k)*b+d,(m-h)*c+f,(l+k)*b+d,m*c+f);S(a,(l+k)*b+d,(m+h)*c+f,(l+h)*b+d,(m+k)*c+f,l*b+d,(m+k)*c+f);S(a,(l-h)*b+d,(m+k)*c+f,(l-k)*b+d,(m+h)*c+f,(l-k)*b+d,m*c+f);h=.4*g;k=.4;l=.8;m=.5;R(a,l*b+d,(m-k)*c+f,!0);S(a,(l+h)*b+d,(m-k)*c+f,(l+k)*b+d,(m-h)*c+f,(l+k)*b+d,m*c+f);S(a,(l+k)*b+d,(m+h)*c+f,(l+h)*b+d,(m+k)*c+f,l*b+d,(m+k)*c+f);S(a,l*b+d,(m+k)*c+f,(l+k-.5*h)*b+d,(m+h)*c+f,(l+k-.5*h)*b+d,m*c+f);S(a,(l+k-.5*h)*b+d,(m-h)*c+f,l*b+d,(m-k)*c+f,l*b+d,(m-k)*c+f); -Gd(a);h=.8*g;k=.8;l=1;m=.5;R(a,l*b+d,(m-k)*c+f,!0);S(a,(l+h)*b+d,(m-k)*c+f,(l+k)*b+d,(m-h)*c+f,(l+k)*b+d,m*c+f);S(a,(l+k)*b+d,(m+h)*c+f,(l+h)*b+d,(m+k)*c+f,l*b+d,(m+k)*c+f);S(a,l*b+d,(m+k)*c+f,(l+k-.5*h)*b+d,(m+h)*c+f,(l+k-.5*h)*b+d,m*c+f);S(a,(l+k-.5*h)*b+d,(m-h)*c+f,l*b+d,(m-k)*c+f,l*b+d,(m-k)*c+f);Gd(a);b=a.s;w.v(a);return b},Email:function(a,b,c){a=w.u();R(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);Gd(a);R(a,0,0,!1);a.lineTo(.5*b,.6*c);a.lineTo(1*b,0);a.moveTo(0, -1*c);a.lineTo(.45*b,.54*c);a.moveTo(1*b,1*c);a.lineTo(.55*b,.54*c);a.jb(!1);b=a.s;w.v(a);return b},Ethernet:function(a,b,c){a=w.u();R(a,.35*b,0,!0);a.lineTo(.65*b,0);a.lineTo(.65*b,.4*c);a.lineTo(.35*b,.4*c);a.lineTo(.35*b,0);Gd(a);R(a,.1*b,1*c,!0,!0);a.lineTo(.4*b,1*c);a.lineTo(.4*b,.6*c);a.lineTo(.1*b,.6*c);a.lineTo(.1*b,1*c);Gd(a);R(a,.6*b,1*c,!0,!0);a.lineTo(.9*b,1*c);a.lineTo(.9*b,.6*c);a.lineTo(.6*b,.6*c);a.lineTo(.6*b,1*c);Gd(a);R(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.5* -b,.4*c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,.6*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*b,.6*c);a.jb(!1);b=a.s;w.v(a);return b},Power:function(a,b,c){a=w.u();var d=M.za,f=.4*d,g=.4,h=w.P(),k=w.P(),l=w.P(),m=w.P();M.Xi(.5,.5-g,.5+f,.5-g,.5+g,.5-f,.5+g,.5,.5,h,h,k,l,m);var n=w.nc(k.x,k.y);R(a,k.x*b,k.y*c,!0);S(a,l.x*b,l.y*c,m.x*b,m.y*c,(.5+g)*b,.5*c);S(a,(.5+g)*b,(.5+f)*c,(.5+f)*b,(.5+g)*c,.5*b,(.5+g)*c);S(a,(.5-f)*b,(.5+g)*c,(.5-g)*b,(.5+f)*c,(.5-g)*b,.5*c);M.Xi(.5-g,.5,.5-g,.5-f,.5-f,.5-g,.5,.5-g,.5, -l,m,k,h,h);S(a,l.x*b,l.y*c,m.x*b,m.y*c,k.x*b,k.y*c);f=.3*d;g=.3;M.Xi(.5-g,.5,.5-g,.5-f,.5-f,.5-g,.5,.5-g,.5,l,m,k,h,h);a.lineTo(k.x*b,k.y*c);S(a,m.x*b,m.y*c,l.x*b,l.y*c,(.5-g)*b,.5*c);S(a,(.5-g)*b,(.5+f)*c,(.5-f)*b,(.5+g)*c,.5*b,(.5+g)*c);S(a,(.5+f)*b,(.5+g)*c,(.5+g)*b,(.5+f)*c,(.5+g)*b,.5*c);M.Xi(.5,.5-g,.5+f,.5-g,.5+g,.5-f,.5+g,.5,.5,h,h,k,l,m);S(a,m.x*b,m.y*c,l.x*b,l.y*c,k.x*b,k.y*c);Gd(a);R(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);Gd(a);w.B(h);w.B(k);w.B(l);w.B(m); -w.B(n);b=a.s;b.G=new P(.25,.55);b.H=new P(.75,.8);w.v(a);return b},Fallout:function(a,b,c){a=w.u();var d=.5*M.za;R(a,0*b,.5*c,!0);S(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);S(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);var f=d=0;R(a,(.3+d)*b,(.8+f)*c,!0,!0);a.lineTo((.5+d)*b,(.5+f)*c);a.lineTo((.1+d)*b,(.5+f)*c);a.lineTo((.3+d)*b,(.8+f)*c);d=.4;f=0;Gd(a);R(a,(.3+d)*b,(.8+f)*c,!0,!0);a.lineTo((.5+d)*b,(.5+f)*c);a.lineTo((.1+d)* -b,(.5+f)*c);a.lineTo((.3+d)*b,(.8+f)*c);d=.2;f=-.3;Gd(a);R(a,(.3+d)*b,(.8+f)*c,!0,!0);a.lineTo((.5+d)*b,(.5+f)*c);a.lineTo((.1+d)*b,(.5+f)*c);a.lineTo((.3+d)*b,(.8+f)*c);Gd(a);b=a.s;b.Ed=Nh;w.v(a);return b},IrritationHazard:function(a,b,c){a=w.u();R(a,.2*b,0*c,!0);a.lineTo(.5*b,.3*c);a.lineTo(.8*b,0*c);a.lineTo(1*b,.2*c);a.lineTo(.7*b,.5*c);a.lineTo(1*b,.8*c);a.lineTo(.8*b,1*c);a.lineTo(.5*b,.7*c);a.lineTo(.2*b,1*c);a.lineTo(0*b,.8*c);a.lineTo(.3*b,.5*c);a.lineTo(0*b,.2*c);Gd(a);b=a.s;b.G=new P(.3, -.3);b.H=new P(.7,.7);w.v(a);return b},ElectricalHazard:function(a,b,c){a=w.u();R(a,.37*b,0*c,!0);a.lineTo(.5*b,.11*c);a.lineTo(.77*b,.04*c);a.lineTo(.33*b,.49*c);a.lineTo(1*b,.37*c);a.lineTo(.63*b,.86*c);a.lineTo(.77*b,.91*c);a.lineTo(.34*b,1*c);a.lineTo(.34*b,.78*c);a.lineTo(.44*b,.8*c);a.lineTo(.65*b,.56*c);a.lineTo(0*b,.68*c);Gd(a);b=a.s;w.v(a);return b},FireHazard:function(a,b,c){a=w.u();R(a,.1*b,1*c,!0);S(a,-.25*b,.63*c,.45*b,.44*c,.29*b,0*c);S(a,.48*b,.17*c,.54*b,.35*c,.51*b,.42*c);S(a,.59* -b,.29*c,.58*b,.28*c,.59*b,.18*c);S(a,.8*b,.34*c,.88*b,.43*c,.75*b,.6*c);S(a,.87*b,.48*c,.88*b,.43*c,.88*b,.31*c);S(a,1.17*b,.76*c,.82*b,.8*c,.9*b,1*c);Gd(a);b=a.s;b.G=new P(.05,.645);b.H=new P(.884,.908);w.v(a);return b},BpmnActivityLoop:function(a,b,c){a=w.u();var d=4*(Math.SQRT2-1)/3*.5;R(a,.65*b,1*c,!1);S(a,(1-d+0)*b,1*c,1*b,(.5+d+0)*c,1*b,.5*c);S(a,1*b,(.5-d+0)*c,(.5+d+0)*b,0*c,.5*b,0*c);S(a,(.5-d+0)*b,0*c,0*b,(.5-d+0)*c,0*b,.5*c);S(a,0*b,(.5+d+0)*c,(.5-d+0)*b,1*c,.35*b,.98*c);a.moveTo(.25*b, -.8*c);a.lineTo(.35*b,1*c);a.lineTo(.1*b,1*c);b=a.s;w.v(a);return b},BpmnActivityParallel:function(a,b,c){a=w.u();R(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(.5*b,0);a.lineTo(.5*b,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.s;w.v(a);return b},BpmnActivitySequential:function(a,b,c){a=w.u();R(a,0,0,!1);a.lineTo(1*b,0);a.moveTo(0,.5*c);a.lineTo(1*b,.5*c);a.moveTo(0,1*c);a.lineTo(1*b,1*c);b=a.s;w.v(a);return b},BpmnActivityAdHoc:function(a,b,c){a=w.u();R(a,0,0,!1);R(a,1*b,1*c,!1);R(a,0,.5*c,!1);S(a,.2*b,.35*c, -.3*b,.35*c,.5*b,.5*c);S(a,.7*b,.65*c,.8*b,.65*c,1*b,.5*c);b=a.s;w.v(a);return b},BpmnActivityCompensation:function(a,b,c){a=w.u();R(a,0,.5*c,!0);a.lineTo(.5*b,0);a.lineTo(.5*b,.5*c);a.lineTo(1*b,1*c);a.lineTo(1*b,0);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,1*c);Gd(a);b=a.s;w.v(a);return b},BpmnTaskMessage:function(a,b,c){a=w.u();R(a,0,.2*c,!0);a.lineTo(1*b,.2*c);a.lineTo(1*b,.8*c);a.lineTo(0,.8*c);a.lineTo(0,.8*c);Gd(a);R(a,0,.2*c,!1);a.lineTo(.5*b,.5*c);a.lineTo(1*b,.2*c);a.jb(!1);b=a.s;w.v(a);return b}, -BpmnTaskScript:function(a,b,c){a=w.u();R(a,.7*b,1*c,!0);a.lineTo(.3*b,1*c);S(a,.6*b,.5*c,0,.5*c,.3*b,0);a.lineTo(.7*b,0);S(a,.4*b,.5*c,1*b,.5*c,.7*b,1*c);Gd(a);R(a,.45*b,.73*c,!1);a.lineTo(.7*b,.73*c);a.moveTo(.38*b,.5*c);a.lineTo(.63*b,.5*c);a.moveTo(.31*b,.27*c);a.lineTo(.56*b,.27*c);a.jb(!1);b=a.s;w.v(a);return b},BpmnTaskUser:function(a,b,c){a=w.u();R(a,0,0,!1);R(a,.335*b,(1-.555)*c,!0);a.lineTo(.335*b,.595*c);a.lineTo(.665*b,.595*c);a.lineTo(.665*b,(1-.555)*c);S(a,.88*b,.46*c,.98*b,.54*c,1*b, -.68*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.68*c);S(a,.02*b,.54*c,.12*b,.46*c,.335*b,(1-.555)*c);a.lineTo(.365*b,.405*c);var d=.5-.285,f=Math.PI/4,g=4*(1-Math.cos(f))/(3*Math.sin(f)),f=g*d,g=g*d;S(a,(.5-(f+d)/2)*b,(d+(d+g)/2)*c,(.5-d)*b,(d+g)*c,(.5-d)*b,d*c);S(a,(.5-d)*b,(d-g)*c,(.5-f)*b,(d-d)*c,.5*b,(d-d)*c);S(a,(.5+f)*b,(d-d)*c,(.5+d)*b,(d-g)*c,(.5+d)*b,d*c);S(a,(.5+d)*b,(d+g)*c,(.5+(f+d)/2)*b,(d+(d+g)/2)*c,.635*b,.405*c);a.lineTo(.635*b,.405*c);a.lineTo(.665*b,(1-.555)*c);a.lineTo(.665* -b,.595*c);a.lineTo(.335*b,.595*c);R(a,.2*b,1*c,!1);a.lineTo(.2*b,.8*c);R(a,.8*b,1*c,!1);a.lineTo(.8*b,.8*c);b=a.s;w.v(a);return b},BpmnEventConditional:function(a,b,c){a=w.u();R(a,.1*b,0,!0);a.lineTo(.9*b,0);a.lineTo(.9*b,1*c);a.lineTo(.1*b,1*c);Gd(a);R(a,.2*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.moveTo(.2*b,.4*c);a.lineTo(.8*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.2*b,.8*c);a.lineTo(.8*b,.8*c);a.jb(!1);b=a.s;w.v(a);return b},BpmnEventError:function(a,b,c){a=w.u();R(a,0,1*c,!0);a.lineTo(.33* -b,0);a.lineTo(.66*b,.5*c);a.lineTo(1*b,0);a.lineTo(.66*b,1*c);a.lineTo(.33*b,.5*c);Gd(a);b=a.s;w.v(a);return b},BpmnEventEscalation:function(a,b,c){a=w.u();R(a,0,0,!1);R(a,1*b,1*c,!1);R(a,.1*b,1*c,!0);a.lineTo(.5*b,0);a.lineTo(.9*b,1*c);a.lineTo(.5*b,.5*c);Gd(a);b=a.s;w.v(a);return b},BpmnEventTimer:function(a,b,c){a=w.u();var d=.5*M.za;R(a,1*b,.5*c,!0);S(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);S(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);S(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);S(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5* -c);R(a,.5*b,0,!1);a.lineTo(.5*b,.15*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,.85*c);a.moveTo(0,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(1*b,.5*c);a.lineTo(.85*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.58*b,.1*c);a.moveTo(.5*b,.5*c);a.lineTo(.78*b,.54*c);a.jb(!1);b=a.s;b.Ed=Nh;w.v(a);return b}};for(var Ln in M.Ig)M.Ig[Ln.toLowerCase()]=Ln; -M.Ew={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8", +var v={Yh:!1,my:!1,yC:!1,OF:!1,nD:!1,RC:!1,$B:!1,assert:function(a,b){!a&&v.$B&&(ba(b),w(b))},Hr:null,enableBoundsInfo:function(a){v.Yh=!0;a&&a.vs()},disableBoundsInfo:function(a){v.Yh=!1;a&&(da(a),a.vs())},vC:function(a,b){void 0===a&&(a=v.Hr);void 0===b&&(b=a.yk("").Sa);var c=b.length,d=a.Ia.getContext("2d");d.fillStyle="rgba(255,255,0,.3)";for(var e=0;e=a.length?a.push(c):a.splice(b,0,c):w("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)}function bb(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):w("Cannot remove an object from an HTMLCollection or NodeList at "+b)}var cb=[];function db(){var a=cb.pop();return void 0===a?new K:a}function eb(a,b){var c=cb.pop();if(void 0===c)return new K(a,b);c.x=a;c.y=b;return c}function fb(a){cb.push(a)}var gb=[]; +function hb(){var a=gb.pop();return void 0===a?new ib:a}function kb(a){gb.push(a)}var mb=[];function nb(){var a=mb.pop();return void 0===a?new x:a}function ob(a,b,c,d){var e=mb.pop();if(void 0===e)return new x(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e}function pb(a){mb.push(a)}var qb=[];function rb(){var a=qb.pop();return void 0===a?new tb:a}function ub(a){qb.push(a)}var vb=null;function L(){var a=vb;return null!==a?(vb=null,a):new wb}function N(a){a.reset();vb=a}var xb=[]; +function yb(){var a=xb.pop();return void 0===a?[]:a}function zb(a){a.length=0;xb.push(a)}var Bb=Object.freeze([]),Db=1;function Jb(a){a.__gohashid=Db++}function Kb(a){var b=a.__gohashid;void 0===b&&(b=Db++,a.__gohashid=b);return b}function Lb(a){return a.__gohashid}function Mb(a,b){b.qw=a;aa[a]=b}function Nb(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a} +function O(a,b,c,d){I(a,"function","Util.defineProperty:classfunc");I(b,"object","Util.defineProperty:propobj");I(c,"function","Util.defineProperty:getter");I(d,"function","Util.defineProperty:setter");for(var e in b){var f=b[e];Object.defineProperty(a.prototype,e,{get:c,set:d});b=Object.getOwnPropertyDescriptor(a.prototype,e);f&&b&&Object.defineProperty(a.prototype,f,b);if(v&&f){var g=f.charAt(0).toUpperCase()+f.slice(1);f===g&&w('Defining capitalized property "'+g+'"!?');Object.defineProperty(a.prototype, +g,{get:function(){qa||sa||ba('Getting the property "'+g+'" is probably not what you intended: it is capitalized but should be spelled "'+f+'"')},set:function(){w('Setting the property "'+g+'" is probably not what you intended: it is capitalized but should be spelled "'+f+'"')}})}break}} +function P(a,b,c,d){I(a,"function","Util.defineReadOnlyProperty:classfunc");I(b,"object","Util.defineReadOnlyProperty:propobj");I(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var f=b[e];b={get:c,set:function(a){w('The property "'+f+'" is read-only and cannot be set to '+a)}};if(void 0!==d)for(var g in d)b[g]=d[g];Object.defineProperty(a.prototype,e,b);d=Object.getOwnPropertyDescriptor(a.prototype,e);f&&d&&Object.defineProperty(a.prototype,f,d);if(v&&f){var h=f.charAt(0).toUpperCase()+ +f.slice(1);Object.defineProperty(a.prototype,h,{get:function(){qa||sa||ba('Getting the property "'+h+'" is probably not what you intended: it is capitalized but should be spelled "'+f+'"')},set:function(){w('Setting the read-only property "'+h+'" is probably not what you intended: it is capitalized but should be spelled "'+f+'", and cannot be set anyway')}})}break}}function Tb(a,b){for(var c in b)b[c]=!0;a.prototype.cB=b} +function Ba(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?Ga(a):null===a?"*":""}function Ga(a){if("function"===typeof a){if(a.qw)return a.qw;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9,c).trim();if(""!==b)return a.qw=b}else if("object"===typeof a&&a.constructor)return Ga(a.constructor);return typeof a} +function R(a,b,c){I(a,"function","Util.defineEnumValue:classfunc");I(b,"string","Util.defineEnumValue:name");I(c,"number","Util.defineEnumValue:num");c=new Fa(a,b,c);Object.freeze(c);a[b]=c;var d=a.Rs;d instanceof Ub||(d=new Ub("string",Fa),a.Rs=d);d.add(b,c);return c}function Vb(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&&ba("property get error: "+d.toString())}return c} +function Wb(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&&ba("property set error: "+d.toString())}} +function Xb(a,b){I(a,"object","Setting properties requires Objects as arguments");I(b,"object","Setting properties requires Objects as arguments");var c=a instanceof G,d=a instanceof y,e;for(e in b){""===e&&w("Setting properties requires non-empty property names");var f=a,g=e;if(c||d){var h=e.indexOf(".");if(0=d.length)){var e=Vb(b,d);null===e||"function"===typeof e||Yb(b,d)||(""===c&&(c=b+"\n"),c+=' unknown property "'+d+'" has value: '+e+" at "+a+"\n")}return c} +function kc(a,b){if(null!==b&&"number"!==typeof b&&"string"!==typeof b&&"boolean"!==typeof b&&"function"!==typeof b)if(void 0!==Lb(b)){if(!lc.contains(b))if(lc.add(b),pc.add($b(a,b)),b instanceof S||b instanceof qc||b instanceof Ub)for(var c=b.i;c.next();)kc(a+"["+c.key+"]",c.value);else for(c in b){var d=Vb(b,c);if(void 0!==d&&null!==d&&Oa(d)&&d!==b.cB){if(b instanceof rc){if(d===b.Fi)continue}else if(b instanceof G){if("data"===c||d===b.Ng)continue;if("itemArray"===c||d===b.Gh)continue;if(b instanceof +A&&d===b.ck)continue}else if(!(b instanceof y))if(b instanceof sc){if("archetypeGroupData"===c||d===b.lw)continue}else if(b instanceof xc){if("archetypeLinkData"===c||d===b.nw)continue;if("archetypeLabelNodeData"===c||d===b.mw)continue}else if(b instanceof yc){if("archetypeNodeData"===c||d===b.Kj)continue}else if(b instanceof zc){if("nodeDataArray"===c||d===b.Je)continue;if("linkDataArray"===c||d===b.Yg||d===b.ol)continue;if(d===b.$b)continue;if(d===b.wf)continue}else if(b instanceof Ac||b instanceof +Ec||b instanceof Fc)continue;kc(a+"."+c,d)}}}else if(Array.isArray(b))for(c=0;cc;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(c=e=d=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="",g=0;gd;d++)b[Gc("7ca11abfd7330390")](Gc(c[d-1]),10,15*d+0);b[Gc("7ca11abfd022028846")]=Gc("39f046ebb36e4b");for(d=1;5>d;d++)b[Gc("7ca11abfd7330390")](Gc(c[d- +1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])R=function(a,b){var c=new Fa(a,b,2);Object.freeze(c);a[b]=c;var d=a.Rs;d instanceof Ub||(d=new Ub("string",Fa),a.Rs=d);d.add(b,c);return c};return a}();function Fa(a,b,c){Jb(this);this.Pz=a;this.Hb=b;this.VE=c}Fa.prototype.toString=function(){return Ga(this.Pz)+"."+this.Hb};P(Fa,{be:"classType"},function(){return this.Pz});P(Fa,{name:"name"},function(){return this.Hb});P(Fa,{value:"value"},function(){return this.VE});var Ic; +Fa.findName=Ic=function(a,b){if(null===b||""===b)return null;I(a,"function","findName:classfunc");I(b,"string","EnumValue.findName:name");var c=a.Rs;return c instanceof Ub?c.ma(b):null};function Jc(){this.Oz=[]}Jc.prototype.toString=function(){return this.Oz.join("")};Jc.prototype.add=function(a){""!==a&&this.Oz.push(a)};function dc(){}function Kc(a){void 0===a&&(a=42);this.seed=a;this.cw=48271;this.Qs=2147483647;this.Gz=this.Qs/this.cw;this.zE=this.Qs%this.cw;this.vE=1/this.Qs;this.random()} +Kc.prototype.random=function(){var a=this.seed%this.Gz*this.cw-this.seed/this.Gz*this.zE;this.seed=0a||a>=b.length)&&La(a,"0 <= i < length",S,"elt:i");return b[a]}; +S.prototype.setElt=S.prototype.set=S.prototype.Yf=function(a,b){v&&(this.dg(b),J(a,S,"setElt:i"));var c=this.l;(0>a||a>=c.length)&&La(a,"0 <= i < length",S,"setElt:i");Aa(this,a);c[a]=b};S.prototype.first=S.prototype.first=function(){var a=this.l;return 0===a.length?null:a[0]};S.prototype.last=S.prototype.kd=function(){var a=this.l,b=a.length;return 0a&&La(a,">= 0",S,"insertAt:i");Aa(this,a);var c=this.l;a>=c.length?c.push(b):c.splice(a,0,b);this.sd();return!0};S.prototype.remove=S.prototype["delete"]=S.prototype.remove=function(a){if(null===a)return!1;v&&this.dg(a);Aa(this,a);var b=this.l;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.sd();return!0}; +S.prototype.removeAt=S.prototype.Lc=function(a){v&&J(a,S,"removeAt:i");var b=this.l;(0>a||a>=b.length)&&La(a,"0 <= i < length",S,"removeAt:i");Aa(this,a);a===b.length-1?b.pop():b.splice(a,1);this.sd()}; +S.prototype.removeRange=S.prototype.removeRange=function(a,b){v&&(J(a,S,"removeRange:from"),J(b,S,"removeRange:to"));var c=this.l;(0>a||a>=c.length)&&La(a,"0 <= from < length",S,"elt:from");(0>b||b>=c.length)&&La(b,"0 <= to < length",S,"elt:to");Aa(this,a);var d=c.slice((b||a)+1||c.length);c.length=0>a?c.length+a:a;c.push.apply(c,d);this.sd()};S.prototype.copy=function(){for(var a=new S(this.W),b=this.l,c=this.count,d=0;d=f)return this;(0>b||b>=e-1)&&La(b,"0 <= from < length",S,"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.l.length)return Tc;var a=this.ad;return null!==a?(a.reset(),a):new Zc(this)}); +P(S,{cm:"iteratorBackwards"},function(){if(0>=this.l.length)return Tc;var a=this.fn;return null!==a?(a.reset(),a):new $c(this)});function ad(a){this.hk=a;this.reset()}Tb(ad,{key:!0,value:!0});P(ad,{i:"iterator"},function(){return this});ad.prototype.reset=ad.prototype.reset=function(){var a=this.hk;a.ad=null;this.Na=a.M;this.mb=null}; +ad.prototype.next=ad.prototype.hasNext=ad.prototype.next=function(){var a=this.hk;a.M!==this.Na&&Na(a);var b=this.mb,b=null===b?a.Ra:b.Db;if(null!==b)return this.mb=b,this.value=b.value,this.key=b.key,!0;this.xf();return!1};ad.prototype.first=ad.prototype.first=function(){var a=this.hk;this.Na=a.M;a=a.Ra;if(null!==a){this.mb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; +ad.prototype.any=function(a){var b=this.hk;b.ad=null;var c=b.M;this.mb=null;for(var d=b.Ra;null!==d;){if(a(d.value))return!0;b.M!==c&&Na(b);d=d.Db}return!1};ad.prototype.all=function(a){var b=this.hk;b.ad=null;var c=b.M;this.mb=null;for(var d=b.Ra;null!==d;){if(!a(d.value))return!1;b.M!==c&&Na(b);d=d.Db}return!0};ad.prototype.each=function(a){var b=this.hk;b.ad=null;var c=b.M;this.mb=null;for(var d=b.Ra;null!==d;)a(d.value),b.M!==c&&Na(b),d=d.Db};P(ad,{count:"count"},function(){return this.hk.yc}); +ad.prototype.xf=function(){this.value=this.key=null;this.Na=-1;this.hk.ad=this};ad.prototype.toString=function(){return null!==this.mb?"SetIterator@"+this.mb.value:"SetIterator"}; +function qc(a){Jb(this);this.va=!1;void 0===a||null===a?this.W=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.W=a:La(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.W=a===Object?"object":a===String?"string":a===Number?"number":a:La(a,"null, a primitive type name, or a class type","Set constructor: type");this.zc={};this.yc=0;this.ad=null;this.M=0;this.Xg=this.Ra=null}Mb("Set",qc); +qc.prototype.dg=function(a){null!==this.W&&("string"===typeof this.W?typeof a===this.W&&null!==a||Ca(a,this.W):a instanceof this.W||Ca(a,this.W))};qc.prototype.sd=function(){var a=this.M;a++;999999999=this.yc)return Tc;var a=this.ad;return null!==a?(a.reset(),a):new ad(this)});function cd(a){this.Ma=a;this.reset()}Tb(cd,{key:!0,value:!0});P(cd,{i:"iterator"},function(){return this});cd.prototype.reset=cd.prototype.reset=function(){this.Na=this.Ma.M;this.mb=null}; +cd.prototype.next=cd.prototype.hasNext=cd.prototype.next=function(){var a=this.Ma;a.M!==this.Na&&Na(a);var b=this.mb,b=null===b?a.Ra:b.Db;if(null!==b)return this.mb=b,this.value=this.key=a=b.key,!0;this.xf();return!1};cd.prototype.first=cd.prototype.first=function(){var a=this.Ma;this.Na=a.M;a=a.Ra;return null!==a?(this.mb=a,this.value=this.key=a=a.key):null};cd.prototype.any=function(a){var b=this.Ma,c=b.M;this.mb=null;for(var d=b.Ra;null!==d;){if(a(d.key))return!0;b.M!==c&&Na(b);d=d.Db}return!1}; +cd.prototype.all=function(a){var b=this.Ma,c=b.M;this.mb=null;for(var d=b.Ra;null!==d;){if(!a(d.key))return!1;b.M!==c&&Na(b);d=d.Db}return!0};cd.prototype.each=function(a){var b=this.Ma,c=b.M;this.mb=null;for(var d=b.Ra;null!==d;)a(d.key),b.M!==c&&Na(b),d=d.Db};P(cd,{count:"count"},function(){return this.Ma.yc});cd.prototype.xf=function(){this.value=this.key=null;this.Na=-1};cd.prototype.toString=function(){return null!==this.mb?"MapKeySetIterator@"+this.mb.value:"MapKeySetIterator"}; +function dd(a){Jb(this);this.va=!0;this.Ma=a}Nb(dd,qc);dd.prototype.freeze=function(){return this};dd.prototype.Ca=function(){return this};dd.prototype.toString=function(){return"MapKeySet("+this.Ma.toString()+")"};dd.prototype.add=dd.prototype.set=dd.prototype.add=function(){w("This Set is read-only: "+this.toString());return!1};dd.prototype.contains=dd.prototype.has=dd.prototype.contains=function(a){return this.Ma.contains(a)}; +dd.prototype.remove=dd.prototype["delete"]=dd.prototype.remove=function(){w("This Set is read-only: "+this.toString());return!1};dd.prototype.clear=dd.prototype.clear=function(){w("This Set is read-only: "+this.toString())};dd.prototype.first=dd.prototype.first=function(){var a=this.Ma.Ra;return null!==a?a.key:null};dd.prototype.any=function(a){for(var b=this.Ma.Ra;null!==b;){if(a(b.key))return!0;b=b.Db}return!1}; +dd.prototype.all=function(a){for(var b=this.Ma.Ra;null!==b;){if(!a(b.key))return!1;b=b.Db}return!0};dd.prototype.each=function(a){for(var b=this.Ma.Ra;null!==b;)a(b.key),b=b.Db};dd.prototype.copy=function(){return new dd(this.Ma)};dd.prototype.toSet=function(){var a=new qc(this.Ma.Wg),b=this.Ma.zc,c;for(c in b)a.add(b[c].key);return a};dd.prototype.toArray=dd.prototype.je=function(){var a=this.Ma.zc,b=Array(this.Ma.yc),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; +dd.prototype.toList=function(){var a=new S(this.W),b=this.Ma.zc,c;for(c in b)a.add(b[c].key);return a};P(dd,{count:"count"},function(){return this.Ma.yc});P(dd,{size:"size"},function(){return this.Ma.yc});P(dd,{i:"iterator"},function(){return 0>=this.Ma.yc?Tc:new cd(this.Ma)});function ed(a){this.Ma=a;this.reset()}Tb(ed,{key:!0,value:!0});P(ed,{i:"iterator"},function(){return this});ed.prototype.reset=ed.prototype.reset=function(){var a=this.Ma;a.gn=null;this.Na=a.M;this.mb=null}; +ed.prototype.next=ed.prototype.hasNext=ed.prototype.next=function(){var a=this.Ma;a.M!==this.Na&&Na(a);var b=this.mb,b=null===b?a.Ra:b.Db;if(null!==b)return this.mb=b,this.value=b.value,this.key=b.key,!0;this.xf();return!1};ed.prototype.first=ed.prototype.first=function(){var a=this.Ma;this.Na=a.M;a=a.Ra;if(null!==a){this.mb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; +ed.prototype.any=function(a){var b=this.Ma;b.gn=null;var c=b.M;this.mb=null;for(var d=b.Ra;null!==d;){if(a(d.value))return!0;b.M!==c&&Na(b);d=d.Db}return!1};ed.prototype.all=function(a){var b=this.Ma;b.gn=null;var c=b.M;this.mb=null;for(var d=b.Ra;null!==d;){if(!a(d.value))return!1;b.M!==c&&Na(b);d=d.Db}return!0};ed.prototype.each=function(a){var b=this.Ma;b.gn=null;var c=b.M;this.mb=null;for(var d=b.Ra;null!==d;)a(d.value),b.M!==c&&Na(b),d=d.Db};P(ed,{count:"count"},function(){return this.Ma.yc}); +ed.prototype.xf=function(){this.value=this.key=null;this.Na=-1;this.Ma.gn=this};ed.prototype.toString=function(){return null!==this.mb?"MapValueSetIterator@"+this.mb.value:"MapValueSetIterator"};function bd(a,b){this.key=a;this.value=b;this.pn=this.Db=null}Tb(bd,{key:!0,value:!0});bd.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};function fd(a){this.Ma=a;this.reset()}Tb(fd,{key:!0,value:!0});P(fd,{i:"iterator"},function(){return this}); +fd.prototype.reset=fd.prototype.reset=function(){var a=this.Ma;a.ad=null;this.Na=a.M;this.mb=null};fd.prototype.next=fd.prototype.hasNext=fd.prototype.next=function(){var a=this.Ma;a.M!==this.Na&&Na(a);var b=this.mb,b=null===b?a.Ra:b.Db;if(null!==b)return this.mb=b,this.key=b.key,this.value=b.value,!0;this.xf();return!1};fd.prototype.first=fd.prototype.first=function(){var a=this.Ma;this.Na=a.M;a=a.Ra;return null!==a?(this.mb=a,this.key=a.key,this.value=a.value,a):null}; +fd.prototype.any=function(a){var b=this.Ma;b.ad=null;var c=b.M;this.mb=null;for(var d=b.Ra;null!==d;){if(a(d))return!0;b.M!==c&&Na(b);d=d.Db}return!1};fd.prototype.all=function(a){var b=this.Ma;b.ad=null;var c=b.M;this.mb=null;for(var d=b.Ra;null!==d;){if(!a(d))return!1;b.M!==c&&Na(b);d=d.Db}return!0};fd.prototype.each=function(a){var b=this.Ma;b.ad=null;var c=b.M;this.mb=null;for(var d=b.Ra;null!==d;)a(d),b.M!==c&&Na(b),d=d.Db};P(fd,{count:"count"},function(){return this.Ma.yc}); +fd.prototype.xf=function(){this.value=this.key=null;this.Na=-1;this.Ma.ad=this};fd.prototype.toString=function(){return null!==this.mb?"MapIterator@"+this.mb:"MapIterator"}; +function Ub(a,b){Jb(this);this.va=!1;void 0===a||null===a?this.Wg=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.Wg=a:La(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.Wg=a===Object?"object":a===String?"string":a===Number?"number":a:La(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.Wh=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"===b|| +"function"===b?this.Wh=b:La(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.Wh=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:La(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.zc={};this.yc=0;this.gn=this.ad=null;this.M=0;this.Xg=this.Ra=null}Mb("Map",Ub); +function ld(a,b){null!==a.Wg&&("string"===typeof a.Wg?typeof b===a.Wg&&null!==b||Ca(b,a.Wg):b instanceof a.Wg||Ca(b,a.Wg))}Ub.prototype.sd=function(){var a=this.M;a++;999999999=this.count)return Tc;var a=this.ad;return null!==a?(a.reset(),a):new fd(this)});P(Ub,{ZI:"iteratorKeys"},function(){return 0>=this.count?Tc:new cd(this)});P(Ub,{aD:"iteratorValues"},function(){if(0>=this.count)return Tc;var a=this.gn;return null!==a?(a.reset(),a):new ed(this)});function K(a,b){void 0===a?this.B=this.A=0:"number"===typeof a&&"number"===typeof b?(this.A=a,this.B=b):w("Invalid arguments to Point constructor: "+a+", "+b);this.va=!1}Mb("Point",K); +K.ah=!0;Tb(K,{x:!0,y:!0});K.prototype.assign=function(a){this.A=a.A;this.B=a.B};K.prototype.setTo=K.prototype.k=function(a,b){v&&(I(a,"number",K,"setTo:x"),I(b,"number",K,"setTo:y"));this.A=a;this.B=b;return this};K.prototype.set=K.prototype.set=function(a){v&&H(a,K,K,"set:p");this.xa();this.A=a.A;this.B=a.B;return this};K.prototype.copy=function(){var a=new K;a.A=this.A;a.B=this.B;return a};r=K.prototype;r.Aa=function(){this.va=!0;Object.freeze(this);return this}; +r.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};r.freeze=function(){this.va=!0;return this};r.Ca=function(){Object.isFrozen(this)&&w("cannot thaw constant: "+this);this.va=!1;return this};r.xa=function(a){if(this.va){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);w(b)}}; +K.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 K(c,e)}return new K};K.stringify=function(a){return a instanceof K?a.x.toString()+" "+a.y.toString():a.toString()};K.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};K.prototype.equals=K.prototype.C=function(a){return a instanceof K?this.A===a.x&&this.B===a.y:!1}; +K.prototype.equalTo=K.prototype.cv=function(a,b){return this.A===a&&this.B===b};K.prototype.equalsApprox=K.prototype.ee=function(a){return U.u(this.A,a.x)&&U.u(this.B,a.y)};K.prototype.add=K.prototype.add=function(a){v&&H(a,K,K,"add:p");this.xa();this.A+=a.x;this.B+=a.y;return this};K.prototype.subtract=K.prototype.Is=function(a){v&&H(a,K,K,"subtract:p");this.xa();this.A-=a.x;this.B-=a.y;return this}; +K.prototype.offset=K.prototype.offset=function(a,b){v&&(J(a,K,"offset:dx"),J(b,K,"offset:dy"));this.xa();this.A+=a;this.B+=b;return this};K.prototype.rotate=K.prototype.rotate=function(a){v&&J(a,K,"rotate:angle");this.xa();if(0===a)return this;var b=this.A,c=this.B;if(0===b&&0===c)return this;var d=0,e=0;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.A=d*b-e*c;this.B=e*b+d*c;return this}; +K.prototype.scale=K.prototype.scale=function(a,b){v&&(J(a,K,"scale:sx"),J(b,K,"scale:sy"));this.A*=a;this.B*=b;return this};K.prototype.distanceSquaredPoint=K.prototype.mj=function(a){v&&H(a,K,K,"distanceSquaredPoint:p");var b=a.x-this.A;a=a.y-this.B;return b*b+a*a};K.prototype.distanceSquared=K.prototype.Ir=function(a,b){v&&(J(a,K,"distanceSquared:px"),J(b,K,"distanceSquared:py"));var c=a-this.A,d=b-this.B;return c*c+d*d}; +K.prototype.normalize=K.prototype.normalize=function(){this.xa();var a=this.A,b=this.B,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}K.prototype.projectOntoLineSegment=function(a,b,c,d){v&&(J(a,K,"projectOntoLineSegment:px"),J(b,K,"projectOntoLineSegment:py"),J(c,K,"projectOntoLineSegment:qx"),J(d,K,"projectOntoLineSegment:qy"));U.fm(a,b,c,d,this.A,this.B,this);return this}; +K.prototype.projectOntoLineSegmentPoint=function(a,b){v&&(H(a,K,K,"projectOntoLineSegmentPoint:p"),H(b,K,K,"projectOntoLineSegmentPoint:q"));U.fm(a.x,a.y,b.x,b.y,this.A,this.B,this);return this};K.prototype.snapToGrid=function(a,b,c,d){v&&(J(a,K,"snapToGrid:originx"),J(b,K,"snapToGrid:originy"),J(c,K,"snapToGrid:cellwidth"),J(d,K,"snapToGrid:cellheight"));U.Mr(this.A,this.B,a,b,c,d,this);return this}; +K.prototype.snapToGridPoint=function(a,b){v&&(H(a,K,K,"snapToGridPoint:p"),H(b,ib,K,"snapToGridPoint:q"));U.Mr(this.A,this.B,a.x,a.y,b.width,b.height,this);return this};K.prototype.setRectSpot=K.prototype.Ds=function(a,b){v&&(H(a,x,K,"setRectSpot:r"),H(b,V,K,"setRectSpot:spot"));this.xa();this.A=a.x+b.x*a.width+b.offsetX;this.B=a.y+b.y*a.height+b.offsetY;return this}; +K.prototype.setSpot=K.prototype.Es=function(a,b,c,d,e){v&&(J(a,K,"setSpot:x"),J(b,K,"setSpot:y"),J(c,K,"setSpot:w"),J(d,K,"setSpot:h"),(0>c||0>d)&&w("Point.setSpot:Width and height cannot be negative"),H(e,V,K,"setSpot:spot"));this.xa();this.A=a+e.x*c+e.offsetX;this.B=b+e.y*d+e.offsetY;return this};K.prototype.transform=function(a){v&&H(a,tb,K,"transform:t");a.Qa(this);return this};function nd(a,b){v&&H(b,tb,K,"transformInverted:t");b.mh(a);return a}var td; +K.distanceLineSegmentSquared=td=function(a,b,c,d,e,f){v&&(J(a,K,"distanceLineSegmentSquared:px"),J(b,K,"distanceLineSegmentSquared:py"),J(c,K,"distanceLineSegmentSquared:ax"),J(d,K,"distanceLineSegmentSquared:ay"),J(e,K,"distanceLineSegmentSquared:bx"),J(f,K,"distanceLineSegmentSquared:by"));var g=e-c,h=f-d,k=g*g+h*h;c-=a;d-=b;var l=-c*g-d*h;if(0>=l||l>=k)return g=e-a,h=f-b,Math.min(c*c+d*d,g*g+h*h);a=g*d-h*c;return a*a/k};var ud; +K.distanceSquared=ud=function(a,b,c,d){v&&(J(a,K,"distanceSquared:px"),J(b,K,"distanceSquared:py"),J(c,K,"distanceSquared:qx"),J(d,K,"distanceSquared:qy"));a=c-a;b=d-b;return a*a+b*b};var vd;K.direction=vd=function(a,b,c,d){v&&(J(a,K,"direction:px"),J(b,K,"direction:py"),J(c,K,"direction:qx"),J(d,K,"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}; +O(K,{x:"x"},function(){return this.A},function(a){this.xa(a);v&&I(a,"number",K,"x");this.A=a});O(K,{y:"y"},function(){return this.B},function(a){this.xa(a);v&&I(a,"number",K,"y");this.B=a});K.prototype.isReal=K.prototype.v=function(){return isFinite(this.x)&&isFinite(this.y)};function ib(a,b){void 0===a?this.oa=this.pa=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.pa=a,this.oa=b):w("Invalid arguments to Size constructor: "+a+", "+b);this.va=!1}Mb("Size",ib); +ib.ah=!0;Tb(ib,{width:!0,height:!0});ib.prototype.assign=function(a){this.pa=a.pa;this.oa=a.oa};ib.prototype.setTo=ib.prototype.k=function(a,b){v&&(I(a,"number",ib,"setTo:w"),I(b,"number",ib,"setTo:h"),0>a&&La(a,">= 0",ib,"setTo:w"),0>b&&La(b,">= 0",ib,"setTo:h"));this.pa=a;this.oa=b;return this};ib.prototype.set=ib.prototype.set=function(a){v&&H(a,ib,ib,"set:s");this.xa();this.pa=a.pa;this.oa=a.oa;return this};ib.prototype.copy=function(){var a=new ib;a.pa=this.pa;a.oa=this.oa;return a};r=ib.prototype; +r.Aa=function(){this.va=!0;Object.freeze(this);return this};r.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};r.freeze=function(){this.va=!0;return this};r.Ca=function(){Object.isFrozen(this)&&w("cannot thaw constant: "+this);this.va=!1;return this};r.xa=function(a){if(this.va){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);w(b)}}; +ib.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 ib(c,e)}return new ib};ib.stringify=function(a){return a instanceof ib?a.width.toString()+" "+a.height.toString():a.toString()};ib.prototype.toString=function(){return"Size("+this.width+","+this.height+")"}; +ib.prototype.equals=ib.prototype.C=function(a){return a instanceof ib?this.pa===a.width&&this.oa===a.height:!1};ib.prototype.equalTo=ib.prototype.cv=function(a,b){return this.pa===a&&this.oa===b};ib.prototype.equalsApprox=ib.prototype.ee=function(a){return U.u(this.pa,a.width)&&U.u(this.oa,a.height)};O(ib,{width:"width"},function(){return this.pa},function(a){this.xa(a);v&&I(a,"number",ib,"width");0>a&&La(a,">= 0",ib,"width");this.pa=a}); +O(ib,{height:"height"},function(){return this.oa},function(a){this.xa(a);v&&I(a,"number",ib,"height");0>a&&La(a,">= 0",ib,"height");this.oa=a});ib.prototype.isReal=ib.prototype.v=function(){return isFinite(this.width)&&isFinite(this.height)}; +function x(a,b,c,d){void 0===a?this.oa=this.pa=this.B=this.A=0:a instanceof K?b instanceof K?(this.A=Math.min(a.A,b.A),this.B=Math.min(a.B,b.B),this.pa=Math.abs(a.A-b.A),this.oa=Math.abs(a.B-b.B)):b instanceof ib?(this.A=a.A,this.B=a.B,this.pa=b.pa,this.oa=b.oa):w("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.A=a,this.B=b,this.pa=c,this.oa=d):w("Invalid arguments to Rect constructor: "+ +a+", "+b+", "+c+", "+d);this.va=!1}Mb("Rect",x);x.ah=!0;Tb(x,{x:!0,y:!0,width:!0,height:!0});x.prototype.assign=function(a){this.A=a.A;this.B=a.B;this.pa=a.pa;this.oa=a.oa};function wd(a,b,c){a.pa=b;a.oa=c}x.prototype.setTo=x.prototype.k=function(a,b,c,d){v&&(I(a,"number",x,"setTo:x"),I(b,"number",x,"setTo:y"),I(c,"number",x,"setTo:w"),I(d,"number",x,"setTo:h"),0>c&&La(c,">= 0",x,"setTo:w"),0>d&&La(d,">= 0",x,"setTo:h"));this.A=a;this.B=b;this.pa=c;this.oa=d;return this}; +x.prototype.set=x.prototype.set=function(a){v&&H(a,x,x,"set:r");this.xa();this.A=a.A;this.B=a.B;this.pa=a.pa;this.oa=a.oa;return this};x.prototype.setPoint=x.prototype.Ue=function(a){v&&H(a,K,x,"setPoint:p");this.xa();this.A=a.A;this.B=a.B;return this};x.prototype.setSize=function(a){v&&H(a,ib,x,"setSize:s");this.xa();this.pa=a.pa;this.oa=a.oa;return this};x.prototype.copy=function(){var a=new x;a.A=this.A;a.B=this.B;a.pa=this.pa;a.oa=this.oa;return a};r=x.prototype; +r.Aa=function(){this.va=!0;Object.freeze(this);return this};r.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};r.freeze=function(){this.va=!0;return this};r.Ca=function(){Object.isFrozen(this)&&w("cannot thaw constant: "+this);this.va=!1;return this};r.xa=function(a){if(this.va){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);w(b)}}; +x.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 g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return new x(c,e,f,g)}return new x};x.stringify=function(a){return a instanceof x?a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString():a.toString()}; +x.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};x.prototype.equals=x.prototype.C=function(a){return a instanceof x?this.A===a.x&&this.B===a.y&&this.pa===a.width&&this.oa===a.height:!1};x.prototype.equalTo=x.prototype.cv=function(a,b,c,d){return this.A===a&&this.B===b&&this.pa===c&&this.oa===d};x.prototype.equalsApprox=x.prototype.ee=function(a){return U.u(this.A,a.x)&&U.u(this.B,a.y)&&U.u(this.pa,a.width)&&U.u(this.oa,a.height)}; +x.prototype.containsPoint=x.prototype.sa=function(a){v&&H(a,K,x,"containsPoint:p");return this.A<=a.x&&this.A+this.pa>=a.x&&this.B<=a.y&&this.B+this.oa>=a.y};x.prototype.containsRect=x.prototype.lj=function(a){v&&H(a,x,x,"containsRect:r");return this.A<=a.x&&a.x+a.width<=this.A+this.pa&&this.B<=a.y&&a.y+a.height<=this.B+this.oa}; +x.prototype.contains=x.prototype.contains=function(a,b,c,d){v?(J(a,x,"contains:x"),J(b,x,"contains:y"),void 0===c?c=0:J(c,x,"contains:w"),void 0===d?d=0:J(d,x,"contains:h"),(0>c||0>d)&&w("Rect.contains:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return this.A<=a&&a+c<=this.A+this.pa&&this.B<=b&&b+d<=this.B+this.oa};x.prototype.reset=function(){this.xa();this.oa=this.pa=this.B=this.A=0}; +x.prototype.offset=x.prototype.offset=function(a,b){v&&(J(a,x,"offset:dx"),J(b,x,"offset:dy"));this.xa();this.A+=a;this.B+=b;return this};x.prototype.inflate=x.prototype.jf=function(a,b){v&&(J(a,x,"inflate:w"),J(b,x,"inflate:h"));return xd(this,b,a,b,a)};x.prototype.addMargin=x.prototype.Ju=function(a){v&&H(a,yd,x,"addMargin:m");return xd(this,a.top,a.right,a.bottom,a.left)}; +x.prototype.subtractMargin=x.prototype.CH=function(a){v&&H(a,yd,x,"subtractMargin:m");return xd(this,-a.top,-a.right,-a.bottom,-a.left)};x.prototype.grow=function(a,b,c,d){v&&(J(a,x,"grow:t"),J(b,x,"grow:r"),J(c,x,"grow:b"),J(d,x,"grow:l"));return xd(this,a,b,c,d)};function xd(a,b,c,d,e){a.xa();var f=a.pa;c+e<=-f?(a.A+=f/2,a.pa=0):(a.A-=e,a.pa+=c+e);c=a.oa;b+d<=-c?(a.B+=c/2,a.oa=0):(a.B-=b,a.oa+=b+d);return a} +x.prototype.intersectRect=function(a){v&&H(a,x,x,"intersectRect:r");return Ed(this,a.x,a.y,a.width,a.height)};x.prototype.intersect=function(a,b,c,d){v&&(J(a,x,"intersect:x"),J(b,x,"intersect:y"),J(c,x,"intersect:w"),J(d,x,"intersect:h"),(0>c||0>d)&&w("Rect.intersect:Width and height cannot be negative"));return Ed(this,a,b,c,d)}; +function Ed(a,b,c,d,e){a.xa();var f=Math.max(a.A,b),g=Math.max(a.B,c);b=Math.min(a.A+a.pa,b+d);c=Math.min(a.B+a.oa,c+e);a.A=f;a.B=g;a.pa=Math.max(0,b-f);a.oa=Math.max(0,c-g);return a}x.prototype.intersectsRect=x.prototype.Tf=function(a){v&&H(a,x,x,"intersectsRect:r");return this.UC(a.x,a.y,a.width,a.height)}; +x.prototype.intersects=x.prototype.UC=function(a,b,c,d){v&&(J(a,x,"intersects:x"),J(b,x,"intersects:y"),J(a,x,"intersects:w"),J(b,x,"intersects:h"),(0>c||0>d)&&w("Rect.intersects:Width and height cannot be negative"));var e=this.pa,f=this.A;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.oa;c=this.B;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0}; +function Fd(a,b){var c=a.pa,d=b.width+10+10,e=a.A,f=b.x-10;if(e>d+f||f>c+e)return!1;c=a.oa;d=b.height+10+10;e=a.B;f=b.y-10;return e>d+f||f>c+e?!1:!0}x.prototype.unionPoint=x.prototype.oi=function(a){v&&H(a,K,x,"unionPoint:p");return Gd(this,a.x,a.y,0,0)};x.prototype.unionRect=x.prototype.sh=function(a){v&&H(a,x,x,"unionRect:r");return Gd(this,a.A,a.B,a.pa,a.oa)}; +x.prototype.union=x.prototype.pE=function(a,b,c,d){this.xa();v?(J(a,x,"union:x"),J(b,x,"union:y"),void 0===c?c=0:J(c,x,"union:w"),void 0===d?d=0:J(d,x,"union:h"),(0>c||0>d)&&w("Rect.union:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return Gd(this,a,b,c,d)};function Gd(a,b,c,d,e){var f=Math.min(a.A,b),g=Math.min(a.B,c);b=Math.max(a.A+a.pa,b+d);c=Math.max(a.B+a.oa,c+e);a.A=f;a.B=g;a.pa=b-f;a.oa=c-g;return a} +x.prototype.setSpot=x.prototype.Es=function(a,b,c){v&&(J(a,x,"setSpot:x"),J(b,x,"setSpot:y"),H(c,V,x,"setSpot:spot"));this.xa();this.A=a-c.offsetX-c.x*this.pa;this.B=b-c.offsetY-c.y*this.oa;return this};var Hd; +x.contains=Hd=function(a,b,c,d,e,f,g,h){v?(J(a,x,"contains:rx"),J(b,x,"contains:ry"),J(c,x,"contains:rw"),J(d,x,"contains:rh"),J(e,x,"contains:x"),J(f,x,"contains:y"),void 0===g?g=0:J(g,x,"contains:w"),void 0===h?h=0:J(h,x,"contains:h"),(0>c||0>d||0>g||0>h)&&w("Rect.contains:Width and height cannot be negative")):(void 0===g&&(g=0),void 0===h&&(h=0));return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d}; +x.intersects=function(a,b,c,d,e,f,g,h){v&&(J(a,x,"intersects:rx"),J(b,x,"intersects:ry"),J(c,x,"intersects:rw"),J(d,x,"intersects:rh"),J(e,x,"intersects:x"),J(f,x,"intersects:y"),J(g,x,"intersects:w"),J(h,x,"intersects:h"),(0>c||0>d||0>g||0>h)&&w("Rect.intersects:Width and height cannot be negative"));c+=a;g+=e;if(a>g||e>c)return!1;a=d+b;h+=f;return b>h||f>a?!1:!0};O(x,{x:"x"},function(){return this.A},function(a){this.xa(a);v&&I(a,"number",x,"x");this.A=a}); +O(x,{y:"y"},function(){return this.B},function(a){this.xa(a);v&&I(a,"number",x,"y");this.B=a});O(x,{width:"width"},function(){return this.pa},function(a){this.xa(a);v&&I(a,"number",x,"width");0>a&&La(a,">= 0",x,"width");this.pa=a});O(x,{height:"height"},function(){return this.oa},function(a){this.xa(a);v&&I(a,"number",x,"height");0>a&&La(a,">= 0",x,"height");this.oa=a});O(x,{left:"left"},function(){return this.A},function(a){this.xa(a);v&&I(a,"number",x,"left");this.A=a}); +O(x,{top:"top"},function(){return this.B},function(a){this.xa(a);v&&I(a,"number",x,"top");this.B=a});O(x,{right:"right"},function(){return this.A+this.pa},function(a){this.xa(a);v&&J(a,x,"right");this.A+=a-(this.A+this.pa)});O(x,{bottom:"bottom"},function(){return this.B+this.oa},function(a){this.xa(a);v&&J(a,x,"top");this.B+=a-(this.B+this.oa)});O(x,{position:"position"},function(){return new K(this.A,this.B)},function(a){this.xa(a);v&&H(a,K,x,"position");this.A=a.x;this.B=a.y}); +O(x,{size:"size"},function(){return new ib(this.pa,this.oa)},function(a){this.xa(a);v&&H(a,ib,x,"size");this.pa=a.width;this.oa=a.height});O(x,{qk:"center"},function(){return new K(this.A+this.pa/2,this.B+this.oa/2)},function(a){this.xa(a);v&&H(a,K,x,"center");this.A=a.x-this.pa/2;this.B=a.y-this.oa/2});O(x,{wa:"centerX"},function(){return this.A+this.pa/2},function(a){this.xa(a);v&&J(a,x,"centerX");this.A=a-this.pa/2}); +O(x,{Ha:"centerY"},function(){return this.B+this.oa/2},function(a){this.xa(a);v&&J(a,x,"centerY");this.B=a-this.oa/2});x.prototype.isReal=x.prototype.v=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};x.prototype.isEmpty=function(){return 0===this.width&&0===this.height}; +function yd(a,b,c,d){void 0===a?this.lg=this.cg=this.qg=this.sg=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("Invalid arguments to Margin constructor: "+a+", "+b+", "+c+", "+d);this.va=!1}Mb("Margin",yd);yd.ah=!0;Tb(yd,{top:!0,right:!0,bottom:!0,left:!0});yd.prototype.assign=function(a){this.sg=a.sg;this.qg=a.qg;this.cg=a.cg;this.lg=a.lg}; +yd.prototype.setTo=yd.prototype.k=function(a,b,c,d){v&&(I(a,"number",yd,"setTo:t"),I(b,"number",yd,"setTo:r"),I(c,"number",yd,"setTo:b"),I(d,"number",yd,"setTo:l"));this.xa();this.sg=a;this.qg=b;this.cg=c;this.lg=d;return this};yd.prototype.set=yd.prototype.set=function(a){v&&H(a,yd,yd,"assign:m");this.xa();this.sg=a.sg;this.qg=a.qg;this.cg=a.cg;this.lg=a.lg;return this};yd.prototype.copy=function(){var a=new yd;a.sg=this.sg;a.qg=this.qg;a.cg=this.cg;a.lg=this.lg;return a};r=yd.prototype; +r.Aa=function(){this.va=!0;Object.freeze(this);return this};r.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};r.freeze=function(){this.va=!0;return this};r.Ca=function(){Object.isFrozen(this)&&w("cannot thaw constant: "+this);this.va=!1;return this};r.xa=function(a){if(this.va){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);w(b)}}; +yd.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 yd;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new yd(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new yd(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new yd(c,e):new yd(c,e,f,g)}return new yd}; +yd.stringify=function(a){return a instanceof yd?a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString():a.toString()};yd.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};yd.prototype.equals=yd.prototype.C=function(a){return a instanceof yd?this.sg===a.top&&this.qg===a.right&&this.cg===a.bottom&&this.lg===a.left:!1}; +yd.prototype.equalTo=yd.prototype.cv=function(a,b,c,d){return this.sg===a&&this.qg===b&&this.cg===c&&this.lg===d};yd.prototype.equalsApprox=yd.prototype.ee=function(a){return U.u(this.sg,a.top)&&U.u(this.qg,a.right)&&U.u(this.cg,a.bottom)&&U.u(this.lg,a.left)};O(yd,{top:"top"},function(){return this.sg},function(a){this.xa(a);v&&J(a,yd,"top");this.sg=a});O(yd,{right:"right"},function(){return this.qg},function(a){this.xa(a);v&&J(a,yd,"right");this.qg=a}); +O(yd,{bottom:"bottom"},function(){return this.cg},function(a){this.xa(a);v&&J(a,yd,"bottom");this.cg=a});O(yd,{left:"left"},function(){return this.lg},function(a){this.xa(a);v&&J(a,yd,"left");this.lg=a});yd.prototype.isReal=yd.prototype.v=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function tb(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}tb.ah=!0;Tb(tb,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0}); +tb.prototype.set=tb.prototype.set=function(a){v&&H(a,tb,tb,"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};tb.prototype.copy=function(){var a=new tb;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};tb.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"}; +tb.prototype.equals=tb.prototype.C=function(a){return a instanceof tb?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};tb.prototype.reset=tb.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}; +tb.prototype.multiply=tb.prototype.multiply=function(a){v&&H(a,tb,tb,"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,f=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=f;return this}; +tb.prototype.multiplyInverted=tb.prototype.Ry=function(a){v&&H(a,tb,tb,"multiplyInverted:matrix");var b=1/(a.m11*a.m22-a.m12*a.m21),c=a.m22*b,d=-a.m12*b,e=-a.m21*b,f=a.m11*b,g=b*(a.m21*a.dy-a.m22*a.dx),h=b*(a.m12*a.dx-a.m11*a.dy);a=this.m12*c+this.m22*d;b=this.m11*e+this.m21*f;e=this.m12*e+this.m22*f;f=this.m11*g+this.m21*h+this.dx;g=this.m12*g+this.m22*h+this.dy;this.m11=this.m11*c+this.m21*d;this.m12=a;this.m21=b;this.m22=e;this.dx=f;this.dy=g;return this}; +tb.prototype.invert=tb.prototype.By=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),f=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=f}; +tb.prototype.rotate=tb.prototype.rotate=function(a,b,c){v&&(J(a,tb,"rotate:angle"),J(b,tb,"rotate:rx"),J(c,tb,"rotate:ry"));this.translate(b,c);var d=0,e=0;0===a?(d=1,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 f=this.m11*-e+this.m21*d,g=this.m12*-e+this.m22*d;this.m11=this.m11*d+this.m21*e;this.m12=a;this.m21=f;this.m22=g;this.translate(-b,-c)}; +tb.prototype.translate=tb.prototype.translate=function(a,b){v&&(J(a,tb,"translate:x"),J(b,tb,"translate:y"));this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b};tb.prototype.scale=tb.prototype.scale=function(a,b){void 0===b&&(b=a);v&&(J(a,tb,"translate:sx"),J(b,tb,"translate:sy"));this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b}; +tb.prototype.transformPoint=tb.prototype.Qa=function(a){v&&H(a,K,tb,"transformPoint:p");var b=a.A,c=a.B;a.A=b*this.m11+c*this.m21+this.dx;a.B=b*this.m12+c*this.m22+this.dy;return a};tb.prototype.invertedTransformPoint=tb.prototype.mh=function(a){v&&H(a,K,tb,"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),f=a.A,g=a.B;a.A=f*this.m22*b+g*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.B=f*c+g*d+e;return a}; +tb.prototype.transformRect=tb.prototype.nE=function(a){v&&H(a,x,tb,"transformRect:rect");var b=a.A,c=a.B,d=b+a.pa,e=c+a.oa,f=this.m11,g=this.m12,h=this.m21,k=this.m22,l=this.dx,m=this.dy,n=b*f+c*h+l,p=b*g+c*k+m,q=d*f+c*h+l,c=d*g+c*k+m,s=b*f+e*h+l,b=b*g+e*k+m,f=d*f+e*h+l,d=d*g+e*k+m,e=n,g=p,n=Math.min(n,q),e=Math.max(e,q),g=Math.min(g,c),p=Math.max(p,c),n=Math.min(n,s),e=Math.max(e,s),g=Math.min(g,b),p=Math.max(p,b),n=Math.min(n,f),e=Math.max(e,f),g=Math.min(g,d),p=Math.max(p,d);a.A=n;a.B=g;a.pa=e- +n;a.oa=p-g};tb.prototype.isIdentity=tb.prototype.as=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};function V(a,b,c,d){void 0===a?this.Ff=this.Ef=this.B=this.A=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.va=!1}Mb("Spot",V);V.ah=!0;Tb(V,{x:!0,y:!0,offsetX:!0,offsetY:!0});V.prototype.assign=function(a){this.A=a.A;this.B=a.B;this.Ef=a.Ef;this.Ff=a.Ff}; +V.prototype.setTo=V.prototype.k=function(a,b,c,d){v&&(Id(a,"setTo:x"),Id(b,"setTo:y"),Jd(c,"setTo:offx"),Jd(d,"setTo:offy"));this.xa();this.A=a;this.B=b;this.Ef=c;this.Ff=d;return this};V.prototype.set=V.prototype.set=function(a){v&&H(a,V,V,"set:s");this.xa();this.A=a.A;this.B=a.B;this.Ef=a.Ef;this.Ff=a.Ff;return this};V.prototype.copy=function(){var a=new V;a.A=this.A;a.B=this.B;a.Ef=this.Ef;a.Ff=this.Ff;return a};r=V.prototype;r.Aa=function(){this.va=!0;Object.freeze(this);return this}; +r.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};r.freeze=function(){this.va=!0;return this};r.Ca=function(){Object.isFrozen(this)&&w("cannot thaw constant: "+this);this.va=!1;return this};r.xa=function(a){if(this.va){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);w(b)}};function Kd(a,b){a.A=NaN;a.B=NaN;a.Ef=b;return a}function Id(a,b){(isNaN(a)||1a)&&La(a,"0 <= "+b+" <= 1",V,b)} +function Jd(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&La(a,"real number, not NaN or Infinity",V,b)}var Ld; +V.parse=Ld=function(a){if("string"===typeof a){a=a.trim();if("None"===a)return Md;if("TopLeft"===a)return Nd;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return Od;if("TopRight"===a)return Pd;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Qd;if("Center"===a)return Rd;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Sd;if("BottomLeft"===a)return Td;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Ud;if("BottomRight"===a)return ce;if("TopSide"===a)return de;if("LeftSide"=== +a)return ee;if("RightSide"===a)return fe;if("BottomSide"===a)return ge;if("TopBottomSides"===a)return he;if("LeftRightSides"===a)return ie;if("TopLeftSides"===a)return je;if("TopRightSides"===a)return ke;if("BottomLeftSides"===a)return le;if("BottomRightSides"===a)return me;if("NotTopSide"===a)return re;if("NotLeftSide"===a)return se;if("NotRightSide"===a)return te;if("NotBottomSide"===a)return ue;if("AllSides"===a)return ve;if("Default"===a)return we;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; +var d=a[b++];void 0!==d&&0b.offset?1:-1});for(h=0;h=2*Math.PI?(Te(a,b,c,d,e,e+Math.PI,g),Te(a,b,c,d,e+Math.PI,e+2*Math.PI,g),a.path.push(["M",k,f])):(b+=d*Math.cos(e),c+=d*Math.sin(e),h=180*h/Math.PI,e=g?0:1,g=180<=h==!!g?0:1,0!==a.path.length?a.path.push(["L",b,c]):a.path.push(["M",b,c]),a.path.push(["A",d,d,h,g,e,k,f]))}}function Se(a,b,c,d,e,f,g){var h=new Oe;h.Be=[b,c,d,e,f,g];b={};df(a,"g",b,h);h=a.addElement("g",b);a.Ne.push(h)} +r.Pa=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+this.YD;this.YD++;var b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,e,f,g;c=Re(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",JJ:this.shadowBlur/2});d=Re(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});e=Re(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});f=Re(this,"feOffset",{"in":"comp",result:"offsetBlur", +dx:this.shadowOffsetX,dy:this.shadowOffsetY});g=Re(this,"feMerge",{});g.appendChild(Re(this,"feMergeNode",{"in":"offsetBlur"}));g.appendChild(Re(this,"feMergeNode",{"in":"SourceGraphic"}));b.appendChild(c);b.appendChild(d);b.appendChild(e);b.appendChild(f);b.appendChild(g);0=a)return 0;var b=U.Hz;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);U.Hz=b}return 1>a? +(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},u:function(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8=e&&(e=1E-6);var h=0,k=0,l=0,m=0;al-m)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=g&&g<=f+e)return!0}else return!0;else if(b- +d>e||d-b>e){if(g=(c-a)/(d-b)*(g-b)+a,g-e<=f&&f<=g+e)return!0}else return!0;return!1},Tu:function(a,b,c,d,e,f,g,h,k,l,m,n){if(U.ld(a,b,g,h,n,c,d)&&U.ld(a,b,g,h,n,e,f))return U.ld(a,b,g,h,n,l,m);var p=(a+c)/2,q=(b+d)/2,s=(c+e)/2,t=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+s)/2;c=(q+t)/2;var s=(s+e)/2,t=(t+f)/2,u=(d+s)/2,z=(c+t)/2;return U.Tu(a,b,p,q,d,c,u,z,k,l,m,n)||U.Tu(u,z,s,t,e,f,g,h,k,l,m,n)},jF:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.x=(((a+c)/2+l)/2+(l+(e+g)/2)/2)/2;k.y=(((b+d)/2+m)/2+(m+ +(f+h)/2)/2)/2;return k},iF:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return vd(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},Gn:function(a,b,c,d,e,f,g,h,k,l){if(U.ld(a,b,g,h,k,c,d)&&U.ld(a,b,g,h,k,e,f))Gd(l,a,b,0,0),Gd(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/2;var p=(p+e)/2,q=(q+f)/2,s=(d+p)/2,t=(c+q)/2;U.Gn(a,b,m,n,d,c,s,t,k,l);U.Gn(s,t,p,q,e,f,g,h,k,l)}return l},ae:function(a,b,c,d,e,f,g,h,k,l){if(U.ld(a,b,g,h,k,c,d)&& +U.ld(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/2;var p=(p+e)/2,q=(q+f)/2,s=(d+p)/2,t=(c+q)/2;U.ae(a,b,m,n,d,c,s,t,k,l);U.ae(s,t,p,q,e,f,g,h,k,l)}return l},$y:function(a,b,c,d,e,f,g,h,k,l){if(U.ld(a,b,e,f,l,c,d))return U.ld(a,b,e,f,l,h,k);var m=(a+c)/2,n=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var p=(m+c)/2,q=(n+d)/2;return U.$y(a,b,m,n,p,q,g,h,k,l)||U.$y(p,q,c,d,e,f,g,h,k,l)},BJ:function(a,b,c, +d,e,f,g){g.x=((a+c)/2+(c+e)/2)/2;g.y=((b+d)/2+(d+f)/2)/2;return g},Zy:function(a,b,c,d,e,f,g,h){if(U.ld(a,b,e,f,g,c,d))Gd(h,a,b,0,0),Gd(h,e,f,0,0);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;U.Zy(a,b,k,l,m,n,g,h);U.Zy(m,n,c,d,e,f,g,h)}return h},ro:function(a,b,c,d,e,f,g,h){if(U.ld(a,b,e,f,g,c,d))0===h.length&&(h.push(a),h.push(b)),h.push(e),h.push(f);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;U.ro(a,b,k,l,m,n,g,h);U.ro(m,n,c,d,e,f,g,h)}return h}, +Ar:function(a,b,c,d,e,f,g,h,k,l,m,n,p,q){0>=p&&(p=1E-6);if(U.ld(a,b,g,h,p,c,d)&&U.ld(a,b,g,h,p,e,f)){var s=(a-g)*(l-n)-(b-h)*(k-m);if(0===s)return!1;p=((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/s;s=((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/s;if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(g=k=0,bg)return!1}else if(ag)return!1;q.x=p;q.y=s;return!0}var s=(a+c)/2,t=(b+d)/2;c=(c+e)/2;d=(d+f)/2;e=(e+g)/2;f=(f+h)/2;var u=(s+c)/2,z=(t+d)/2;c=(c+e)/2;d=(d+f)/2;var C=(u+c)/2,B=(z+d)/ +2,F=(m-k)*(m-k)+(n-l)*(n-l),Q=!1;U.Ar(a,b,s,t,u,z,C,B,k,l,m,n,p,q)&&(b=(q.x-k)*(q.x-k)+(q.y-l)*(q.y-l),b=p&&(p=1E-6);if(U.ld(a,b,g,h,p,c,d)&&U.ld(a,b,g,h,p,e,f)){p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return q;var s=((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/p,t=((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/p;if(s>=m)return q;if((k>m?k-m:m-k)< +(l>n?l-n:n-l)){if(a=k=0,ba)return q}else if(aa)return q;0p&&q--}else{var s=(a+c)/2,t=(b+d)/2,u=(c+e)/2,z=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(s+u)/2;c=(t+z)/2;var u=(u+e)/2,z=(z+f)/2,C=(d+u)/2,B=(c+z)/2,q=q+U.Br(a,b,s,t,d,c,C,B,k,l,m,n,p),q=q+U.Br(C,B,u,z,e,f,g,h,k,l,m,n,p)}return q},fm:function(a,b,c,d,e,f,g){if(U.$a(a,c)){var h=0;c=0;bc)return g.x=a,g.y=c,!1;g.x=a;g.y=d;return!0}if(U.$a(b, +d)){ac)return g.x=c,g.y=b,!1;g.x=d;g.y=b;return!0}h=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>h)return g.x=a,g.y=b,!1;if(1.000005c)return k.x=a,k.y=c,!1;k.x=a;k.y=f;return!0}g=(d-b)/(c-a);if(U.$a(h,g))return U.fm(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(U.$a(g,0)){ac)return k.x=c,k.y=b,!1;k.x=e;k.y=b;return!0}f=g*(e-a)+b;return U.fm(a,b,c,d,e,f,k)},$I:function(a,b,c,d,e){return U.Ag(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},II:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p, +c*p-c*a+b)}return k},Ek:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(U.Ag(a,b,a,d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},mv:function(a,b,c){var d=b.x,e=b.y,f=c.x,g=c.y,h=a.left,k=a.right, +l=a.top,m=a.bottom;return d===f?(f=a=0,e=l):e===g?(d=h):a.sa(b)||a.sa(c)||U.lv(h,l,k,l,d,e,f,g)||U.lv(k,l,k,m,d,e,f,g)||U.lv(k,m,h,m,d,e,f,g)||U.lv(h,m,h,l,d,e,f,g)?!0:!1},lv:function(a,b,c,d,e,f,g,h){return 0>=U.Xu(a,b,c,d,e,f)*U.Xu(a,b,c,d,g,h)&&0>=U.Xu(e,f,g,h,a,b)*U.Xu(e,f,g,h,c,d)},Xu:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return 0>f?-1:0a&&(a+=360);360<=a&&(a-=360);return a},oC:function(a,b,c,d,e,f){void 0===f&&(f=!1);var g=Math.PI;f||(d*=g/180,e*=g/180);f=dc,f=0>d,g=0,h=g=0;al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+f),n=g/(b+e),m=m*m+n*n-1;if(0m)k=b;else break}c=f*c/(b+f)-c;d=e*d/(b+e)-d;e=Math.sqrt(c*c+d*d)}else e=Math.abs(d-b);else d=a*a-b*b,e=a*c,ea?"M"+this.ga.toString()+" "+this.ha.toString()+"L"+this.q.toString()+" "+this.s.toString():"M"+this.ga.toFixed(a)+" "+this.ha.toFixed(a)+"L"+this.q.toFixed(a)+" "+this.s.toFixed(a);case mf:var b=new x(this.ga,this.ha,0,0);b.pE(this.q,this.s,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 nf:b=new x(this.ga,this.ha,0,0);b.pE(this.q,this.s,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 hf:for(var b="",c=this.cb.l,d=c.length,e=0;e=t-1?!0:null!==k[l+1].match(/[A-Za-z]/)}function d(){l++;return k[l]}function e(){var a=new K(parseFloat(d()),parseFloat(d()));m===m.toLowerCase()&&(a.x=s.x+a.x,a.y=s.y+a.y);return a}function f(){return s=e()}function g(){return q=e()}function h(){return"c"!==n.toLowerCase()&&"s"!==n.toLowerCase()?s:new K(2*s.x-q.x,2*s.y-q.y)}void 0===b&&(b=!1);"string"!==typeof a&&Ca(a,"string",gf,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, +"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");a=a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");for(var k=a.split(" "),l=-1,m="",n="",p=new K(0,0),q=new K(0,0),s=new K(0, +0),t=k.length,u=L(),z=!1,C=!1,B=!0;!(l>=t-1);)if(n=m,m=d(),""!==m)switch(m.toUpperCase()){case "X":B=!0;C=z=!1;break;case "M":var F=f();null===u.Gb||!0===B?(W(u,F.x,F.y,z,!1,!C),B=!1):u.moveTo(F.x,F.y);for(p=s;!c();)F=f(),u.lineTo(F.x,F.y);break;case "L":for(;!c();)F=f(),u.lineTo(F.x,F.y);break;case "H":for(;!c();)s=F=new K((m===m.toLowerCase()?s.x:0)+parseFloat(d()),s.y),u.lineTo(s.x,s.y);break;case "V":for(;!c();)s=F=new K(s.x,(m===m.toLowerCase()?s.y:0)+parseFloat(d())),u.lineTo(s.x,s.y);break; +case "C":for(;!c();){var Q=e(),M=g(),F=f();X(u,Q.x,Q.y,M.x,M.y,F.x,F.y)}break;case "S":for(;!c();)Q=h(),M=g(),F=f(),X(u,Q.x,Q.y,M.x,M.y,F.x,F.y);break;case "Q":for(;!c();)M=g(),F=f(),Ff(u,M.x,M.y,F.x,F.y);break;case "T":for(;!c();)q=M=h(),F=f(),Ff(u,M.x,M.y,F.x,F.y);break;case "B":for(;!c();){var F=parseFloat(d()),Q=parseFloat(d()),M=parseFloat(d()),fa=parseFloat(d()),oa=parseFloat(d()),ca=oa,T=!1;c()||(ca=parseFloat(d()),c()||(T=0!==parseFloat(d())));m===m.toLowerCase()&&(M+=s.x,fa+=s.y);u.arcTo(F, +Q,M,fa,oa,ca,T)}break;case "A":for(;!c();)Q=Math.abs(parseFloat(d())),M=Math.abs(parseFloat(d())),fa=parseFloat(d()),oa=!!parseFloat(d()),ca=!!parseFloat(d()),F=f(),Gf(u,Q,M,fa,oa,ca,F.x,F.y);break;case "Z":F=u.m.cb.l[u.m.cb.length-1];Hf(u);s=p;break;case "F":F="";for(Q=1;k[l+Q];)if(null!==k[l+Q].match(/[Uu]/))Q++;else if(null===k[l+Q].match(/[A-Za-z]/))Q++;else{F=k[l+Q];break}F.match(/[Mm]/)?z=!0:If(u);break;case "U":F="";for(Q=1;k[l+Q];)if(null!==k[l+Q].match(/[Ff]/))Q++;else if(null===k[l+Q].match(/[A-Za-z]/))Q++; +else{F=k[l+Q];break}F.match(/[Mm]/)?C=!0:u.Pa(!1)}p=u.m;N(u);if(b)for(u=p.cb.i;u.next();)F=u.value,F.$r=!0;return p};function Jf(a,b){for(var c=a.length,d=db(),e=0;e=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f)){if(e=a=0,fe)return 0}else if(ee)return 0;return 0a||1a)return m=(a-p)/n,zb(c),new K(b+(e-b)*m,d+(f-d)*m);p+=n}b=e;d=f}zb(c);return null};O(gf,{type:"type"},function(){return this.W},function(a){this.W!==a&&(v&&Ea(a,gf,gf,"type"),Aa(this,a),this.W=a,this.Ja=!0)});O(gf,{ga:"startX"},function(){return this.Sb},function(a){this.Sb!==a&&(v&&J(a,gf,"startX"),Aa(this,a),this.Sb=a,this.Ja=!0)}); +O(gf,{ha:"startY"},function(){return this.Vb},function(a){this.Vb!==a&&(v&&J(a,gf,"startY"),Aa(this,a),this.Vb=a,this.Ja=!0)});O(gf,{q:"endX"},function(){return this.Wa},function(a){this.Wa!==a&&(v&&J(a,gf,"endX"),Aa(this,a),this.Wa=a,this.Ja=!0)});O(gf,{s:"endY"},function(){return this.fb},function(a){this.fb!==a&&(v&&J(a,gf,"endY"),Aa(this,a),this.fb=a,this.Ja=!0)});O(gf,{cb:"figures"},function(){return this.zi},function(a){this.zi!==a&&(v&&H(a,S,gf,"figures"),Aa(this,a),this.zi=a,this.Ja=!0)}); +gf.prototype.add=gf.prototype.add=function(a){this.zi.add(a);return this};O(gf,{o:"spot1"},function(){return this.Rh},function(a){v&&H(a,V,gf,"spot1");Aa(this,a);this.Rh=a.R()});O(gf,{p:"spot2"},function(){return this.Sh},function(a){v&&H(a,V,gf,"spot2");Aa(this,a);this.Sh=a.R()});O(gf,{fd:"defaultStretch"},function(){return this.Bh},function(a){v&&Ea(a,Y,gf,"stretch");Aa(this,a);this.Bh=a});P(gf,{Ya:"bounds"},function(){this.Fy()&&(this.zz(),this.Nf());return this.ht}); +function jf(a,b,c,d){Jb(this);this.va=!1;void 0===c&&(c=!0);this.fl=c;void 0===d&&(d=!0);this.bn=d;void 0!==a?(v&&J(a,jf,"sx"),this.Sb=a):this.Sb=0;void 0!==b?(v&&J(b,jf,"sy"),this.Vb=b):this.Vb=0;this.tn=new S(Xf);this.pu=this.tn.M;this.Ja=!0}Mb("PathFigure",jf);jf.ah=!0;jf.prototype.copy=function(){var a=new jf;a.fl=this.fl;a.bn=this.bn;a.Sb=this.Sb;a.Vb=this.Vb;for(var b=this.tn.l,c=b.length,d=a.tn,e=0;ea?"M"+this.ga.toString()+" "+this.ha.toString():"M"+this.ga.toFixed(a)+" "+this.ha.toFixed(a),c=this.ua.l,d=c.length,e=0;ea&&(a+=360),this.Bc=a),void 0!==d&&(v&&J(d,Xf,"x1"),this.Gf=Math.max(d,0)),void 0!==e&&(v&&J(e,Xf,"y1"),this.Hf=Math.max(e,0)),this.jn=!!g,this.zm=!!h):(void 0!==d&&(v&&J(d,Xf,"x1"),this.Bc=d),void 0!==e&&(v&&J(e,Xf,"y1"),this.$d=e),void 0!==f&&(v&&J(f,Xf,"x2"),a=== +Of&&(f=Math.max(f,0)),this.Gf=f),void 0!==g&&"number"===typeof g&&(v&&J(g,Xf,"y2"),a===Of&&(g=Math.max(g,0)),this.Hf=g));this.Vg=!1;this.Ja=!0;this.ri=null}Mb("PathSegment",Xf);Xf.ah=!0;Xf.prototype.copy=function(){var a=new Xf;a.W=this.W;a.Wa=this.Wa;a.fb=this.fb;void 0!==this.Bc&&(a.Bc=this.Bc);void 0!==this.$d&&(a.$d=this.$d);void 0!==this.Gf&&(a.Gf=this.Gf);void 0!==this.Hf&&(a.Hf=this.Hf);void 0!==this.jn&&(a.jn=this.jn);void 0!==this.zm&&(a.zm=this.zm);a.Vg=this.Vg;a.Ja=this.Ja;return a}; +Xf.prototype.equalsApprox=Xf.prototype.ee=function(a){if(!(a instanceof Xf)||this.type!==a.type||this.pv!==a.pv)return!1;switch(this.type){case Lf:case Bf:return U.u(this.q,a.q)&&U.u(this.s,a.s);case Mf:return U.u(this.q,a.q)&&U.u(this.s,a.s)&&U.u(this.pb,a.pb)&&U.u(this.Bb,a.Bb)&&U.u(this.Qd,a.Qd)&&U.u(this.Rd,a.Rd);case Nf:return U.u(this.q,a.q)&&U.u(this.s,a.s)&&U.u(this.pb,a.pb)&&U.u(this.Bb,a.Bb);case Of:return U.u(this.qh,a.qh)&&U.u(this.mi,a.mi)&&U.u(this.wa,a.wa)&&U.u(this.Ha,a.Ha)&&U.u(this.radiusX, +a.radiusX)&&U.u(this.radiusY,a.radiusY);case Uf:return this.ov===a.ov&&this.tv===a.tv&&U.u(this.aw,a.aw)&&U.u(this.q,a.q)&&U.u(this.s,a.s)&&U.u(this.radiusX,a.radiusX)&&U.u(this.radiusY,a.radiusY);default:return!1}}; +Xf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Lf:b=0>a?"M"+this.q.toString()+" "+this.s.toString():"M"+this.q.toFixed(a)+" "+this.s.toFixed(a);break;case Bf:b=0>a?"L"+this.q.toString()+" "+this.s.toString():"L"+this.q.toFixed(a)+" "+this.s.toFixed(a);break;case Mf:b=0>a?"C"+this.pb.toString()+" "+this.Bb.toString()+" "+this.Qd.toString()+" "+this.Rd.toString()+" "+this.q.toString()+" "+this.s.toString():"C"+this.pb.toFixed(a)+" "+this.Bb.toFixed(a)+" "+this.Qd.toFixed(a)+ +" "+this.Rd.toFixed(a)+" "+this.q.toFixed(a)+" "+this.s.toFixed(a);break;case Nf:b=0>a?"Q"+this.pb.toString()+" "+this.Bb.toString()+" "+this.q.toString()+" "+this.s.toString():"Q"+this.pb.toFixed(a)+" "+this.Bb.toFixed(a)+" "+this.q.toFixed(a)+" "+this.s.toFixed(a);break;case Of:b=0>a?"B"+this.qh.toString()+" "+this.mi.toString()+" "+this.wa.toString()+" "+this.Ha.toString()+" "+this.radiusX:"B"+this.qh.toFixed(a)+" "+this.mi.toFixed(a)+" "+this.wa.toFixed(a)+" "+this.Ha.toFixed(a)+" "+this.radiusX; +break;case Uf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.aw.toString()+" "+(this.tv?1:0)+" "+(this.ov?1:0)+" "+this.q.toString()+" "+this.s.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.aw.toFixed(a)+" "+(this.tv?1:0)+" "+(this.ov?1:0)+" "+this.q.toFixed(a)+" "+this.s.toFixed(a);break;default:b=this.type.toString()}return b+(this.Vg?"z":"")};var Lf;Xf.Move=Lf=R(Xf,"Move",0);var Bf;Xf.Line=Bf=R(Xf,"Line",1);var Mf; +Xf.Bezier=Mf=R(Xf,"Bezier",2);var Nf;Xf.QuadraticBezier=Nf=R(Xf,"QuadraticBezier",3);var Of;Xf.Arc=Of=R(Xf,"Arc",4);var Uf;Xf.SvgArc=Uf=R(Xf,"SvgArc",4);Xf.prototype.freeze=function(){this.va=!0;return this};Xf.prototype.Ca=function(){this.va=!1;return this};Xf.prototype.close=Xf.prototype.close=function(){this.Vg=!0;return this}; +function Vf(a,b){if(null!==a.ri&&!1===b.Ja)return a.ri;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);var e=a.Bc,f=a.$d,g=U.oC(0,0,c=s?h=Math.PI:1<=s&&(h=0);!l&&0h&&(h+=2*Math.PI);l=b>g?1:b/g;s=b>g?g/b:1;b=U.oC(0,0,b>g?b:g,n,n+h,!0);g=rb();g.reset();g.translate(c,d);g.rotate(a.Bc,0,0);g.scale(l,s);Jf(b,g);ub(g);a.ri=b;return a.ri}O(Xf,{pv:"isClosed"},function(){return this.Vg},function(a){this.Vg!==a&&(this.Vg=a,this.Ja=!0)}); +O(Xf,{type:"type"},function(){return this.W},function(a){v&&Ea(a,Xf,Xf,"type");Aa(this,a);this.W=a;this.Ja=!0});O(Xf,{q:"endX"},function(){return this.Wa},function(a){v&&J(a,Xf,"endX");Aa(this,a);this.Wa=a;this.Ja=!0});O(Xf,{s:"endY"},function(){return this.fb},function(a){v&&J(a,Xf,"endY");Aa(this,a);this.fb=a;this.Ja=!0});O(Xf,{pb:"point1X"},function(){return this.Bc},function(a){v&&J(a,Xf,"point1X");Aa(this,a);this.Bc=a;this.Ja=!0}); +O(Xf,{Bb:"point1Y"},function(){return this.$d},function(a){v&&J(a,Xf,"point1Y");Aa(this,a);this.$d=a;this.Ja=!0});O(Xf,{Qd:"point2X"},function(){return this.Gf},function(a){v&&J(a,Xf,"point2X");Aa(this,a);this.Gf=a;this.Ja=!0});O(Xf,{Rd:"point2Y"},function(){return this.Hf},function(a){v&&J(a,Xf,"point2Y");Aa(this,a);this.Hf=a;this.Ja=!0});O(Xf,{wa:"centerX"},function(){return this.Bc},function(a){v&&J(a,Xf,"centerX");Aa(this,a);this.Bc=a;this.Ja=!0}); +O(Xf,{Ha:"centerY"},function(){return this.$d},function(a){v&&J(a,Xf,"centerY");Aa(this,a);this.$d=a;this.Ja=!0});O(Xf,{radiusX:"radiusX"},function(){return this.Gf},function(a){v&&J(a,Xf,"radiusX");0>a&&La(a,">= zero",Xf,"radiusX");Aa(this,a);this.Gf=a;this.Ja=!0});O(Xf,{radiusY:"radiusY"},function(){return this.Hf},function(a){v&&J(a,Xf,"radiusY");0>a&&La(a,">= zero",Xf,"radiusY");Aa(this,a);this.Hf=a;this.Ja=!0}); +O(Xf,{qh:"startAngle"},function(){return this.Wa},function(a){this.Wa!==a&&(Aa(this,a),v&&J(a,Xf,"startAngle"),a%=360,0>a&&(a+=360),this.Wa=a,this.Ja=!0)});O(Xf,{mi:"sweepAngle"},function(){return this.fb},function(a){v&&J(a,Xf,"sweepAngle");Aa(this,a);360a&&(a=-360);this.fb=a;this.Ja=!0});O(Xf,{ov:"isClockwiseArc"},function(){return this.zm},function(a){Aa(this,a);this.zm=a;this.Ja=!0});O(Xf,{tv:"isLargeArc"},function(){return this.jn},function(a){Aa(this,a);this.jn=a;this.Ja=!0}); +O(Xf,{aw:"xAxisRotation"},function(){return this.Bc},function(a){v&&J(a,Xf,"xAxisRotation");a%=360;0>a&&(a+=360);Aa(this,a);this.Bc=a;this.Ja=!0});function $f(){this.N=null;this.Qx=(new K(0,0)).freeze();this.Kw=(new K(0,0)).freeze();this.et=this.$t=0;this.Pt="";this.Du=this.ut=!1;this.qt=this.gt=0;this.si=this.Ct=this.Lt=!1;this.mp=null;this.Cu=0;this.If=this.Au=null}Mb("InputEvent",$f); +$f.prototype.copy=function(){var a=new $f;a.N=this.N;a.Qx.assign(this.Gd);a.Kw.assign(this.U);a.$t=this.$t;a.et=this.et;a.Pt=this.Pt;a.ut=this.ut;a.Du=this.Du;a.gt=this.gt;a.qt=this.qt;a.Lt=this.Lt;a.Ct=this.Ct;a.si=this.si;a.mp=this.mp;a.Cu=this.Cu;a.Au=this.Au;a.If=this.If;return a}; +$f.prototype.toString=function(){var a="^";0!==this.Jc&&(a+="M:"+this.Jc);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.ue&&(a+="C:"+this.ue);0!==this.vk&&(a+="D:"+this.vk);this.vc&&(a+="h");this.bubbles&&(a+="b");null!==this.U&&(a+="@"+this.U.toString());return a};O($f,{g:"diagram"},function(){return this.N},function(a){this.N=a});O($f,{Gd:"viewPoint"},function(){return this.Qx},function(a){H(a,K,$f,"viewPoint");this.Qx.assign(a)}); +O($f,{U:"documentPoint"},function(){return this.Kw},function(a){H(a,K,$f,"documentPoint");this.Kw.assign(a)});O($f,{Jc:"modifiers"},function(){return this.$t},function(a){this.$t=a});O($f,{button:"button"},function(){return this.et},function(a){this.et=a});O($f,{key:"key"},function(){return this.Pt},function(a){this.Pt=a});O($f,{xk:"down"},function(){return this.ut},function(a){this.ut=a});O($f,{up:"up"},function(){return this.Du},function(a){this.Du=a}); +O($f,{ue:"clickCount"},function(){return this.gt},function(a){this.gt=a});O($f,{vk:"delta"},function(){return this.qt},function(a){this.qt=a});O($f,{bs:"isMultiTouch"},function(){return this.Lt},function(a){this.Lt=a});O($f,{vc:"handled"},function(){return this.Ct},function(a){this.Ct=a});O($f,{bubbles:"bubbles"},function(){return this.si},function(a){this.si=a});O($f,{event:"event"},function(){return this.mp},function(a){this.mp=a}); +P($f,{Jk:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});O($f,{timestamp:"timestamp"},function(){return this.Cu},function(a){this.Cu=a});O($f,{Zf:"targetDiagram"},function(){return this.Au},function(a){this.Au=a});O($f,{Sd:"targetObject"},function(){return this.If},function(a){this.If=a}); +O($f,{control:"control"},function(){return 0!==(this.Jc&1)},function(a){this.Jc=a?this.Jc|1:this.Jc&-2});O($f,{shift:"shift"},function(){return 0!==(this.Jc&4)},function(a){this.Jc=a?this.Jc|4:this.Jc&-5});O($f,{alt:"alt"},function(){return 0!==(this.Jc&2)},function(a){this.Jc=a?this.Jc|2:this.Jc&-3});O($f,{ls:"meta"},function(){return 0!==(this.Jc&8)},function(a){this.Jc=a?this.Jc|8:this.Jc&-9});O($f,{left:"left"},function(){return 0===this.button},function(a){this.button=a?0:2}); +O($f,{iJ:"middle"},function(){return 1===this.button},function(a){this.button=a?1:0});O($f,{right:"right"},function(){return 2===this.button},function(a){this.button=a?2:0});function ag(){this.N=null;this.Hb="";this.iu=this.vu=null;this.ft=!1}Mb("DiagramEvent",ag);ag.prototype.copy=function(){var a=new ag;a.N=this.N;a.Hb=this.Hb;a.vu=this.vu;a.iu=this.iu;a.ft=this.ft;return a}; +ag.prototype.toString=function(){var a="*"+this.name;this.cancel&&(a+="x");null!==this.rz&&(a+=":"+this.rz.toString());null!==this.Yy&&(a+="("+this.Yy.toString()+")");return a};O(ag,{g:"diagram"},function(){return this.N},function(a){this.N=a});O(ag,{name:"name"},function(){return this.Hb},function(a){this.Hb=a});O(ag,{rz:"subject"},function(){return this.vu},function(a){this.vu=a});O(ag,{Yy:"parameter"},function(){return this.iu},function(a){this.iu=a}); +O(ag,{cancel:"cancel"},function(){return this.ft},function(a){this.ft=a});function bg(){this.To=cg;this.vl=this.Zt="";this.nq=this.oq=this.tq=this.uq=this.sq=this.N=this.rd=null}Mb("ChangedEvent",bg);var dg;bg.Transaction=dg=R(bg,"Transaction",-1);var cg;bg.Property=cg=R(bg,"Property",0);var eg;bg.Insert=eg=R(bg,"Insert",1);var fg;bg.Remove=fg=R(bg,"Remove",2);bg.prototype.clear=bg.prototype.clear=function(){this.nq=this.oq=this.tq=this.uq=this.sq=this.N=this.rd=null}; +bg.prototype.copy=function(){var a=new bg;a.rd=this.rd;a.N=this.N;a.To=this.To;a.Zt=this.Zt;a.vl=this.vl;a.sq=this.sq;var b=this.uq;a.uq=Oa(b)&&"function"===typeof b.R?b.R():b;b=this.tq;a.tq=Oa(b)&&"function"===typeof b.R?b.R():b;b=this.oq;a.oq=Oa(b)&&"function"===typeof b.R?b.R():b;b=this.nq;a.nq=Oa(b)&&"function"===typeof b.R?b.R():b;return a}; +bg.prototype.toString=function(){var a="",a=this.ed===dg?a+"* ":this.ed===cg?a+(null!==this.V?"!m":"!d"):a+((null!==this.V?"!m":"!d")+this.ed);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.nf&&this.nf!==this.propertyName&&(a+=" "+this.nf);a+=": ";this.ed===dg?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=ma(this.object)),null!==this.oldValue&&(a+=" old: "+ma(this.oldValue)),null!==this.Xf&&(a+=" "+this.Xf),null!==this.newValue&&(a+= +" new: "+ma(this.newValue)),null!==this.Vf&&(a+=" "+this.Vf));return a};bg.prototype.getValue=bg.prototype.ma=function(a){return a?this.oldValue:this.newValue};bg.prototype.getParam=function(a){return a?this.Xf:this.Vf};bg.prototype.canUndo=bg.prototype.canUndo=function(){return null!==this.V||null!==this.g?!0:!1};bg.prototype.undo=bg.prototype.undo=function(){this.canUndo()&&(null!==this.V?this.V.Pl(this,!0):null!==this.g&&this.g.Pl(this,!0))}; +bg.prototype.canRedo=bg.prototype.canRedo=function(){return null!==this.V||null!==this.g?!0:!1};bg.prototype.redo=bg.prototype.redo=function(){this.canRedo()&&(null!==this.V?this.V.Pl(this,!1):null!==this.g&&this.g.Pl(this,!1))};O(bg,{V:"model"},function(){return this.rd},function(a){this.rd=a});O(bg,{g:"diagram"},function(){return this.N},function(a){this.N=a});O(bg,{ed:"change"},function(){return this.To},function(a){v&&Ea(a,bg,bg,"change");this.To=a}); +O(bg,{nf:"modelChange"},function(){return this.Zt},function(a){v&&I(a,"string",bg,"modelChange");this.Zt=a});O(bg,{propertyName:"propertyName"},function(){return this.vl},function(a){v&&"string"!==typeof a&&I(a,"function",bg,"propertyName");this.vl=a});P(bg,{UI:"isTransactionFinished"},function(){return this.To===dg&&("CommittedTransaction"===this.vl||"FinishedUndo"===this.vl||"FinishedRedo"===this.vl)});O(bg,{object:"object"},function(){return this.sq},function(a){this.sq=a}); +O(bg,{oldValue:"oldValue"},function(){return this.uq},function(a){this.uq=a});O(bg,{Xf:"oldParam"},function(){return this.tq},function(a){this.tq=a});O(bg,{newValue:"newValue"},function(){return this.oq},function(a){this.oq=a});O(bg,{Vf:"newParam"},function(){return this.nq},function(a){this.nq=a}); +function zc(a){1=d)return"[]";var e=new Jc;e.add("[ ");c&&1b||(bb(this.Je,b),zg(this,"nodeDataArray",fg,"nodeDataArray",this,a,null,b,null),this.Ns(a)))}};zc.prototype.removeNodeDataCollection=function(a){if(Pa(a))for(var b=la(a),c=0;cb&&(b=la(a));Za(a,b,c);zg(this,"",eg,"",a,null,c,null,b)}; +zc.prototype.removeArrayItem=function(a,b){void 0===b&&(b=-1);v&&(Ra(a,zc,"removeArrayItem:arr"),J(b,zc,"removeArrayItem:idx"));a===this.Je&&w("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=la(a)-1);var c=Ta(a,b);bb(a,b);zg(this,"",fg,"",a,c,null,b,null)};O(zc,{gm:"nodeCategoryProperty"},function(){return this.pq},function(a){var b=this.pq;b!==a&&(Ag(a,zc,"nodeCategoryProperty"),this.pq=a,this.h("nodeCategoryProperty",b,a))}); +zc.prototype.getCategoryForNodeData=zc.prototype.sy=function(a){if(null===a)return"";var b=this.pq;if(""===b)return"";b=Vb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;w("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; +zc.prototype.setCategoryForNodeData=zc.prototype.Rv=function(a,b){I(b,"string",zc,"setCategoryForNodeData:cat");if(null!==a){var c=this.pq;if(""!==c)if(this.Kd(a)){var d=Vb(a,c);void 0===d&&(d="");d!==b&&(Wb(a,c,b),zg(this,"nodeCategory",cg,c,a,d,b))}else Wb(a,c,b)}}; +function og(a,b){2e||(bb(d,e),this.ai(a)&&(Eg(this,b,a),zg(this,"linkLabelKeys",fg,c,a,b,null)))}else void 0!==d&&w(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +O(og,{rj:"linkDataArray"},function(){return this.Yg},function(a){var b=this.Yg;if(b!==a){Ra(a,og,"linkDataArray");for(var c=la(a),d=0;db)){bb(this.Yg,b);zg(this,"linkDataArray",fg,"linkDataArray",this,a,null,b,null);b=this.Ck(a);Eg(this,b,a);b=this.Fk(a);Eg(this,b,a);var c=this.pj(a);if(Pa(c))for(var d=la(c),e=0;ea.ke&&ba("Ending transaction without having started a transaction: "+c);var d=1===a.ke;d&&b&&a.isEnabled&&a.tc("CommittingTransaction",c,a.bi);var e=0;if(0a.gi;e--)f=d.Z(e),null!==f&&f.clear(), +d.Lc(e),a.ix=!0;e=a.fD;0===e&&(e=1);0=e&&(f=d.Z(0),null!==f&&f.clear(),d.Lc(0),a.hg--);d.add(b);a.hg++;d.freeze();f=b}a.tc("CommittedTransaction",c,f)}else{a.Fh=!0;try{a.isEnabled&&null!==f&&(f.Zr=!0,f.undo())}finally{a.tc("RolledBackTransaction",c,f),a.Fh=!1}null!==f&&f.clear()}a.pt=null;return!0}if(a.isEnabled&&!b&&null!==f){a=e;c=f.ug;for(b=c.count-1;b>=a;b--)d=c.Z(b),null!==d&&d.undo(),c.Ca(),c.Lc(b);c.freeze()}return!1} +gg.prototype.canUndo=gg.prototype.canUndo=function(){if(!this.isEnabled||0=this.ke&&!this.Sw&&(a=a.g,null!==a&&!1===a.Ie||ba("Change not within a transaction: "+c.toString()))}}; +gg.prototype.skipsEvent=function(a){if(null===a||0>a.ed.value)return!0;a=a.object;if(a instanceof Y){if(a=a.layer,null!==a&&a.gc)return!0}else if(a instanceof vg&&a.gc)return!0;return!1};P(gg,{QG:"models"},function(){return this.px.i});O(gg,{isEnabled:"isEnabled"},function(){return this.ne},function(a){this.ne=a});P(gg,{mE:"transactionToUndo"},function(){return 0<=this.gi&&this.gi<=this.history.count-1?this.history.Z(this.gi):null}); +P(gg,{lE:"transactionToRedo"},function(){return this.gib.xg||(b.scale=a))};sc.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.bw);J(a,sc,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.Fn!==rh)return!1;a*=b.scale;return ab.xg?!1:b.Ru}; +sc.prototype.increaseZoom=function(a){void 0===a&&(a=this.bw);J(a,sc,"increaseZoom:factor");var b=this.g;null!==b&&b.Fn===rh&&(a*=b.scale,ab.xg||(b.scale=a))};sc.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.bw);J(a,sc,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.Fn!==rh)return!1;a*=b.scale;return ab.xg?!1:b.Ru};sc.prototype.resetZoom=function(a){void 0===a&&(a=this.Zu);J(a,sc,"resetZoom:newscale");var b=this.g;null===b||ab.xg||(b.scale=a)}; +sc.prototype.canResetZoom=function(a){void 0===a&&(a=this.Zu);J(a,sc,"canResetZoom:newscale");var b=this.g;return null===b||ab.xg?!1:b.Ru};sc.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b!==this.OB||isNaN(this.jx)?(this.jx=b,this.IA=c.copy(),a.zoomToFit(),a.Ce(),this.OB=a.scale):(a.scale=this.jx,a.position=this.IA)}};sc.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.Ru}; +sc.prototype.collapseTree=function(a){void 0===a&&(a=null);var b=this.g;if(null===b)return!1;try{b.Jb("Collapse Tree");var c=new S(D);if(null!==a&&a.wc)a.collapseTree(),c.add(a);else for(var d=b.selection.i;d.next();){var e=d.value;e instanceof D&&(a=e,a.wc&&(a.collapseTree(),c.add(a)))}b.ra("TreeCollapsed",c)}finally{b.xd("Collapse Tree")}}; +sc.prototype.canCollapseTree=function(a){void 0===a&&(a=null);var b=this.g;if(null===b||b.ab)return!1;if(null!==a){if(!a.wc)return!1;if(0b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.bf[0])c=a.bf[0],d=a.bf[1];else return;this.doCancel();if(a.Wm){a.Tw=!0;a.VA=a.scale;var e=a.lb,f=a.kb,g=a.Ia.getBoundingClientRect(),h=c.clientX-e/g.width*g.left,k=c.clientY-f/g.height*g.top,c=d,d=c.clientX-e/g.width*g.left-h,f=c.clientY-f/g.height*g.top-k,f=Math.sqrt(d*d+f* +f);a.rB=f;b.preventDefault();b.cancelBubble=!0}else uh(a)}}; +wg.prototype.standardPinchZoomMove=function(){var a=this.g;if(null!==a){var b=a.F.event;this.doCancel();uh(a);var c=null,d=null;if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.bf[0])c=a.bf[0],d=a.bf[1];else return;if(a.Wm&&a.Tw){var e=a.lb,f=a.kb,g=a.Ia.getBoundingClientRect(),h=c,c=h.clientX-e/g.width*g.left,k=h.clientY-f/g.height*g.top,h=d,d=h.clientX-e/g.width*g.left,f=h.clientY-f/g.height*g.top,g=d-c,e=f-k,g=Math.sqrt(g* +g+e*e)/a.rB,c=new K((Math.min(d,c)+Math.max(d,c))/2,(Math.min(f,k)+Math.max(f,k))/2),k=a.VA*g,d=a.nb;k!==a.scale&&d.canResetZoom(k)&&(f=a.pm,a.pm=c,d.resetZoom(k),a.pm=f);b.preventDefault();b.cancelBubble=!0}}};wg.prototype.doKeyDown=function(){var a=this.g;null!==a&&"Esc"===a.F.key&&this.doCancel()};wg.prototype.doKeyUp=function(){};wg.prototype.startTransaction=wg.prototype.Jb=function(a){void 0===a&&(a=this.name);this.Ve=null;var b=this.g;return null===b?!1:b.Jb(a)}; +wg.prototype.stopTransaction=wg.prototype.wj=function(){var a=this.g;return null===a?!1:null===this.Ve?a.uo():a.xd(this.Ve)}; +wg.prototype.standardMouseSelect=function(){var a=this.g;if(null!==a&&a.Ke){var b=a.F,c=a.Nr(b.U,!1);if(null!==c)if(ta?b.ls:b.control){a.ra("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Ea;null!==b&&(b.La=!b.La);a.ra("ChangedSelection")}else if(b.shift){if(!c.La){a.ra("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Ea;null!==b&&(b.La=!0);a.ra("ChangedSelection")}}else{if(!c.La){for(b=c;null!==b&&!b.canSelect();)b=b.Ea;null!==b&&a.select(b)}}else!b.left||(ta?b.ls:b.control)|| +b.shift||a.Vu()}};wg.prototype.standardMouseClick=function(a,b){void 0===a&&(a=null);void 0===b&&(b=function(a){return!a.layer.gc});var c=this.g;if(null!==c){var d=c.F,e=c.yd(d.U,a,b);d.Sd=e;vh(e,d,c)}}; +function vh(a,b,c){var d=0;b.left?d=1===b.ue?1:2===b.ue?2:1:b.right&&1===b.ue&&(d=3);var e="";if(null!==a){switch(d){case 1:e="ObjectSingleClicked";break;case 2:e="ObjectDoubleClicked";break;case 3:e="ObjectContextClicked"}0!==d&&c.ra(e,a)}else{switch(d){case 1:e="BackgroundSingleClicked";break;case 2:e="BackgroundDoubleClicked";break;case 3:e="BackgroundContextClicked"}0!==d&&c.ra(e)}if(null!==a)for(b.vc=!1;null!==a;){c=null;switch(d){case 1:c=a.click;break;case 2:c=a.Jr?a.Jr:a.click;break;case 3:c= +a.ay}if(null!==c&&(c(b,a),b.vc))break;a=a.H}else{a=null;switch(d){case 1:a=c.click;break;case 2:a=c.Jr?c.Jr:c.click;break;case 3:a=c.ay}null!==a&&a(b)}} +wg.prototype.standardMouseOver=function(){var a=this.g;if(null!==a){var b=a.F;if(null!==b.g&&!0!==a.xb.Pc){var c=a.Ta;a.Ta=!0;var d=a.yd(b.U,null,null);b.Sd=d;var e=!1;if(d!==a.Cm){var f=a.Cm,g=f;a.Cm=d;this.doCurrentObjectChanged(f,d);for(b.vc=!1;null!==f;){var h=f.kD;if(null!==h){if(d===f)break;if(null!==d&&d.Hk(f))break;h(b,f,d);e=!0;if(b.vc)break}f=f.H}f=g;for(b.vc=!1;null!==d;){h=d.jD;if(null!==h){if(f===d)break;if(null!==f&&f.Hk(d))break;h(b,d,f);e=!0;if(b.vc)break}d=d.H}d=a.Cm}if(null!==d){f= +d;for(h="";null!==f;){h=f.cursor;if(""!==h)break;f=f.H}a.Lb=h;b.vc=!1;for(f=d;null!==f;){h=f.Qy;if(null!==h&&(h(b,f),e=!0,b.vc))break;f=f.H}}else a.Lb="",h=a.Qy,null!==h&&(h(b),e=!0);e&&a.Ed();a.Ta=c}}};wg.prototype.doCurrentObjectChanged=function(){}; +wg.prototype.standardMouseWheel=function(){var a=this.g;if(null!==a){var b=a.F,c=b.vk;if(0!==c&&a.fc.v()){var d=a.nb,e=a.eb.ns;if((e===wh&&!b.shift||e===xh&&b.control)&&(0e||Math.abs(b.y-a.y)>d};P(wg,{g:"diagram"},function(){return this.N}); +O(wg,{name:"name"},function(){return this.Hb},function(a){I(a,"string",wg,"name");this.Hb=a});O(wg,{isEnabled:"isEnabled"},function(){return this.ne},function(a){I(a,"boolean",wg,"isEnabled");this.ne=a});O(wg,{fa:"isActive"},function(){return this.uA},function(a){I(a,"boolean",wg,"isActive");this.uA=a});O(wg,{Ve:"transactionResult"},function(){return this.JB},function(a){null!==a&&I(a,"string",wg,"transactionResult");this.JB=a}); +function qh(){0e&&(e=h),k>f&&(f=k))}}Infinity===c?b.k(0,0,0,0):b.k(c,d,e-c,f-d)} +function Zh(a,b){if(null===a.Wb){var c=a.g;if(!(null===c||b&&(c.ab||c.Qe))&&null!==a.Nb){var d=c.aa;d.isEnabled&&d.ZC?null!==d.bi&&0c.ca)){var d=a.g;if(null!==d&&!d.ab&&(d=a.Ph,null!==d)){var e=null,f=null;null===c.O&&(e=ii(a,c.j(0),!1),null!==e&&(f=e.L));var g=null,h=null;null===c.T&&(g=ii(a,c.j(c.ca-1),!0),null!==g&&(h=g.L));var k=d.isValidLink(f,e,h,g);b?(c.Gm=c.j(0).copy(),c.Km=c.j(c.ca-1).copy(),c.Co=!1,c.O=f,null!==e&&(c.hf=e.Kc),c.T=h,null!==g&&(c.ag=g.Kc)):k?ji(d,f,e,h,g):ji(d,null,null,null,null)}}}qh.prototype.doDragOver=function(){}; +function ki(a,b){var c=a.g;if(null!==c){a.ei&&ei(a,!0);Hh(a);var d=fi(c,b,null,function(b){return!ci(a,b)}),e=c.F;e.Sd=d;if(null!==d){e.vc=!1;for(var f=d;null!==f;){var g=f.Ny;if(null!==g&&(g(e,f),e.vc))break;f=hi(f)}}else g=c.Ny,null!==g&&g(e);if(a.fa||null!==Ah)if(a.doDropOnto(b,d),a.fa||null!==Ah)for(d=c.selection.i;d.next();)e=d.value,e instanceof D&&li(c,e.Q)}}qh.prototype.doDropOnto=function(){}; +qh.prototype.doMouseMove=function(){if(this.fa){var a=this.g;if(null!==a&&null!==this.Gr&&null!==this.Nb){var b=!1,c=!1;this.mayCopy()?(b=!0,a.Lb="copy",Zh(this,!1),zh(this,this.Wb),$h(this,this.Wb,!1),Ih(this,this.Wb)):this.mayMove()?(c=!0,a.Lb="default",Th(this),$h(this,this.Nb,!0)):this.mayDragOut()?(a.Lb="no-drop",Zh(this,!1),$h(this,this.Wb,!1)):Th(this);di(this,a.F.U,c,b)}}}; +qh.prototype.doMouseUp=function(){if(this.fa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.Wb?(Th(this),Zh(this,!0),zh(this,this.Wb),$h(this,this.Wb,!1),Ih(this,this.Wb),null!==this.Wb&&a.SD(this.Wb.ni())):(b=!0,Th(this),this.mayMove()&&($h(this,this.Nb,!0),this.ru=!1,di(this,a.F.U,!0,!1),this.ru=!0));this.ip=!0;ki(this,a.F.U);if(this.fa){this.Wb=null;if(b&&null!==this.Nb)for(b=this.Nb.i;b.next();){var d=b.key;d instanceof D&&(d=d.Ea,null===d||null===d.placeholder||this.Nb.contains(d)|| +d.iC&&d.K())}a.Xb();Ih(this,this.Nb);this.Ve=c?"Copy":"Move";a.ra(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};qh.prototype.mayCopy=function(){if(!this.YC)return!1;var a=this.g;if(null===a||a.ab||a.Qe||!a.Dn||!a.jj||(ta?!a.F.alt:!a.F.control))return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.jd()&&b.canCopy())return!0}return null!==this.uc&&this.ei&&this.uc.canCopy()?!0:!1}; +qh.prototype.mayDragOut=function(){if(!this.YC)return!1;var a=this.g;if(null===a||!a.Lu||!a.jj||a.ok)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.jd()&&b.canCopy())return!0}return null!==this.uc&&this.ei&&this.uc.canCopy()?!0:!1};qh.prototype.mayMove=function(){var a=this.g;if(null===a||a.ab||!a.ok)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.jd()&&b.canMove())return!0}return null!==this.uc&&this.ei&&this.uc.canMove()?!0:!1};var Jh=new S(qh),Ah=null,Bh=null; +qh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.VB||a.ab||a.Qe||!a.Dn)return!1;var b=Ah;return null===b||b.g.V.tk!==a.V.tk?!1:!0};qh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.xb.li();mi(a);a=Ah;null!==a&&(a.g.Lb="copy")}};qh.prototype.doSimulatedDragLeave=function(){var a=Ah;null!==a&&a.doSimulatedDragOut();this.doCancel()}; +qh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=Ah;null!==b&&null!==b.Nb&&this.mayDragIn()&&(a.Lb="copy",ni(this,b.Nb.ni(),!1),$h(this,this.Wb,!1),di(this,a.F.U,!1,!0))}}; +qh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=Ah;null!==b&&(b.ip=!0,Th(this),this.mayDragIn()&&(this.Jb("Drop"),ni(this,b.Nb.ni(),!0),$h(this,this.Wb,!1),null!==this.Wb&&a.SD(this.Wb.ni()),this.Ve="ExternalCopy",ki(this,a.F.U),a.Xb(),this.Wb=null,a.focus(),a.ra("ExternalObjectsDropped",a.selection),this.wj()))}}; +function ni(a,b,c){if(null===a.Wb){var d=a.g;if(null!==d&&!d.ab&&!d.Qe){d.Ta=!c;d.tm=!c;a.vj=d.F.U;d=d.Ln(b,d,!0);c=nb();Yh(b,c);var e=c.x+c.width/2,f=c.y+c.height/2;pb(c);var g=a.tu;c=new Ub(A);var h=db();for(b=b.i;b.next();){var k=b.value;if(k.jd()&&k.canCopy()){var l=k.location,k=d.ma(k);h.k(g.x-(e-l.x),g.y-(f-l.y));k.location=h;k.Le();c.add(k,Eh(h))}}fb(h);for(d=d.i;d.next();)e=d.value,e instanceof E&&e.canCopy()&&c.add(e,Eh());a.Wb=c;yh(a,c.ni());null!==a.uc&&(c=a.uc,d=c.jm,c.Lk(a.vj.x-(d.x+ +d.width/2),a.vj.y-(d.y+d.height/2)))}}}qh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.Lb="":a.Lb="no-drop")};function Fh(a){this.point=a;this.ZD=U.xj}Mb("DraggingInfo",Fh);function ai(a,b,c){this.jc=a;this.info=b;this.eG=c} +function oi(){0=d&&(d=.1);for(var e=this,f=b.Yl(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,f=f.i;f.next();){var g=f.value,h=g.L;if(h instanceof D){var k=g.Za(Rd,db()),l=c.x-k.x,m=c.y-k.y;fb(k);k=l*l+m*m;kc){if(null!==this.Yb&&a===this.Cg&&b===this.Dg)return!0;var d=b.Kc;null===d&&(d="");if(a.fv(d).count>=c)return!1}return!0}; +oi.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.ao;if(this.g.Ka===this&&(null!==a.layer&&!a.layer.yr||!0!==b.fE))return!1;var c=b.GH;if(Infinity>c){if(null!==this.Yb&&a===this.Eg&&b===this.Fg)return!0;var d=b.Kc;null===d&&(d="");if(a.Rf(d).count>=c)return!1}return!0};oi.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.L,d=b.L;return null!==c&&c===d}; +oi.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.L;if(!(c instanceof D))return!1;var d=a.Kc;null===d&&(d="");var e=b.L;if(!(e instanceof D))return!1;var f=b.Kc;null===f&&(f="");for(e=e.Rf(f);e.next();)if(f=e.value,f.O===c&&f.hf===d)return!0;return!1}; +oi.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.WF&&d.FH||!this.isInSameNode(b,d))&&(b.VF&&d.EH||!this.isLinked(b,d)))||null!==this.Yb&&(null!==a&&this.isLabelDependentOnLink(a,this.Yb)||null!==c&&this.isLabelDependentOnLink(c,this.Yb))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.Yb))return!1;if(null!==a){var e=a.Bv;if(null!==e&&!e(a,b,c,d,this.Yb))return!1}if(null!== +c&&(e=c.Bv,null!==e&&!e(a,b,c,d,this.Yb)))return!1;e=this.Bv;return null!==e?e(a,b,c,d,this.Yb):!0};oi.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Uc;if(null===c)return!1;if(c===b)return!0;var d=new qc(D);d.add(a);return qi(this,c,b,d)};function qi(a,b,c,d){if(b===c)return!0;var e=b.O;if(null!==e&&e.Pe&&(d.add(e),qi(a,e.Uc,c,d)))return!0;b=b.T;return null!==b&&b.Pe&&(d.add(b),qi(a,b.Uc,c,d))?!0:!1} +oi.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.ao;var d=this.g.LH;if(d!==ri){if(d===si){if(null!==c&&!c.hc)return!0;for(d=b.md;d.next();){var e=d.value;if(e!==c&&e.hc&&e.T===b)return!1}return!ti(this,a,b,c,!0)}if(d===ui){if(null!==c&&!c.hc)return!0;for(d=a.md;d.next();)if(e=d.value,e!==c&&e.hc&&e.O===a)return!1;return!ti(this,a,b,c,!0)}if(d===vi)return a===b?a=!0:(d=new qc(D),d.add(b),a=wi(this,d,a,b,c)),!a;if(d===Gi)return!ti(this,a,b,c,!1);if(d=== +Hi)return a===b?a=!0:(d=new qc(D),d.add(b),a=Ii(this,d,a,b,c)),!a}return!0};function ti(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.md;f.next();){var g=f.value;if(g!==d&&(!e||g.hc)&&g.T===b&&(g=g.O,g!==b&&ti(a,g,c,d,e)))return!0}return!1}function wi(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.md;f.next();){var g=f.value;if(g!==e&&g.T===c&&(g=g.O,g!==c&&wi(a,b,g,d,e)))return!0}return!1} +function Ii(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.md;f.next();){var g=f.value;if(g!==e){var h=g.O,g=g.T,h=h===c?g:h;if(h!==c&&Ii(a,b,h,d,e))return!0}}return!1}O(oi,{Bv:"linkValidation"},function(){return this.Zj},function(a){null!==a&&I(a,"function",oi,"linkValidation");this.Zj=a});O(oi,{Jv:"portTargeted"},function(){return this.gB},function(a){null!==a&&I(a,"function",oi,"portTargeted");this.gB=a}); +function xc(){0b.Qr+1&&c=a.x)c=0>=a.y?c+225:1<=a.y?c+135:c+180;else if(1<=a.x)0>=a.y?c+=315:1<=a.y&&(c+=45);else if(0>=a.y)c+=270;else if(1<=a.y)c+=90;else break a;0>c?c+=360:360<=c&&(c-=360);b.cursor=22.5>c?"e-resize":67.5>c?"se-resize":112.5>c?"s-resize":157.5>c?"sw-resize":202.5>c?"w-resize":247.5>c?"nw-resize":292.5>c?"n-resize":337.5>c?"ne-resize":"e-resize"}else if(b instanceof G)for(b=b.elements;b.next();)aj(a, +b.value,c)}O($i,{Wr:"handleArchetype"},function(){return this.Rj},function(a){null!==a&&H(a,Y,$i,"handleArchetype");this.Rj=a});P($i,{handle:"handle"},function(){return this.Kb});O($i,{ac:"adornedObject"},function(){return this.qb},function(a){null!==a&&H(a,Y,$i,"adornedObject");this.qb=a});$i.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.ab&&a.zr&&a.F.left?null!==this.findToolHandleAt(a.bc.U,this.name)?!0:!1:!1}; +$i.prototype.doActivate=function(){var a=this.g;null!==a&&(this.Kb=this.findToolHandleAt(a.bc.U,this.name),null!==this.Kb&&(this.qb=this.Kb.L.ac,this.ux.set(this.qb.L.location),this.gu.set(this.qb.na),this.Pw=this.computeCellSize(),this.Rw=this.computeMinSize(),this.Qw=this.computeMaxSize(),a.ge=!0,this.TA=a.xb.isEnabled,a.xb.isEnabled=!1,this.Jb(this.name),this.fa=!0))};$i.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.wj(),this.qb=this.Kb=null,this.fa=a.ge=!1,a.xb.isEnabled=this.TA)}; +$i.prototype.doCancel=function(){this.qb.na=this.gu;this.qb.L.location=this.ux;this.stopTool()};$i.prototype.doMouseMove=function(){var a=this.g;if(this.fa&&null!==a){var b=this.Rw,c=this.Qw,d=this.Pw,e=this.qb.LC(a.F.U,db()),f=dj;this.qb instanceof pi&&(f=ej(this.qb));b=this.computeResize(e,this.Kb.alignment,b,c,d,!(f===fj||f===gj||a.F.shift));this.resize(b);a.Ce();fb(e)}}; +$i.prototype.doMouseUp=function(){var a=this.g;if(this.fa&&null!==a){var b=this.Rw,c=this.Qw,d=this.Pw,e=this.qb.LC(a.F.U,db()),f=dj;this.qb instanceof pi&&(f=ej(this.qb));b=this.computeResize(e,this.Kb.alignment,b,c,d,!(f===fj||f===gj||a.F.shift));this.resize(b);fb(e);a.Xb();this.Ve=this.name;a.ra("PartResized",this.qb,this.gu)}this.stopTool()}; +$i.prototype.resize=function(a){if(null!==this.g){var b=this.ac,c=b.L,d=b.Bk(),e=b.fi(),f=Math.PI*d/180,g=Math.cos(f),f=Math.sin(f),h=0d?1:0,k=90d?1:0,d=180d?1:0,l=b.qa.width,m=b.qa.height;b.na=a.size;var n=c.position.copy();c.Le();l=b.qa.width-l;m=b.qa.height-m;if(0!==l||0!==m)0!==l&&(n.x+=e*((a.x+l*k)*g-(a.y+m*h)*f)),0!==m&&(n.y+=e*((a.x+l*d)*f+(a.y+m*k)*g)),c.move(n)}}; +$i.prototype.computeResize=function(a,b,c,d,e,f){b.Od()&&(b=Rd);var g=this.ac.qa,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){var n=g.width,p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=db();U.Mr(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(b=a.height/a.width,n=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m- +c.height),a.height=Math.max(m-a.y,c.height),f||(b=a.height/a.width,n=b.y?(a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=a.height/ +n,a.x=h+.5*(l-h-a.width))):1<=b.y&&(a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(a.width=a.height/n,a.x=h+.5*(l-h-a.width)));fb(p);return a};$i.prototype.computeMinSize=function(){var a=this.ac.Se.copy(),b=this.Se;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; +$i.prototype.computeMaxSize=function(){var a=this.ac.Pd.copy(),b=this.Pd;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.vH),180),c=Math.min(Math.abs(this.uH),b/2);!this.g.F.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};O(hj,{vH:"snapAngleMultiple"},function(){return this.pB},function(a){I(a,"number",hj,"snapAngleMultiple");this.pB=a}); +O(hj,{uH:"snapAngleEpsilon"},function(){return this.oB},function(a){I(a,"number",hj,"snapAngleEpsilon");this.oB=a});P(hj,{pJ:"originalAngle"},function(){return this.fu});function jj(){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.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}Wg.prototype.prepareAnimation=Wg.prototype.Mk=function(){this.ne&&(this.Ei&&this.li(),this.Pc=!0,this.Lz=!1)}; +function Zj(a){a.ne&&requestAnimationFrame(function(){!1===a.Pc||a.Ei||(a.N.Hl=1,ak(a.N),a.Pc=!1,a.N.ra("AnimationStarting"),bk(a))})}function ck(a,b,c,d,e){if(a.Pc&&(v&&H(b,Y,Wg,"addPropToAnimation:obj"),!(b instanceof A)||b.VC)){var f=a.nn;if(f.contains(b)){b=f.ma(b);a=b.start;var g=b.end;void 0===a[c]&&(a[c]=dk(d));g[c]=dk(e)}else a=new dc,g=new dc,a[c]=dk(d),g[c]=dk(e),f.add(b,new Yj(a,g))}}function dk(a){return a instanceof K?a.copy():a instanceof ib?a.copy():a} +function bk(a){var b;void 0===b&&(b=new dc);var c=a.N;if(null!==c)if(0===a.nn.count)a.Ei=!1,ek(c,!1),c.Ce();else{a.Ei=!0;var d=b.HI||a.GE,e=b.nJ||null,f=b.oJ||null,g=b.duration||a.Mw;b=a.PE;for(var h=a.nn.i;h.next();){var k=h.value.start.position;k instanceof K&&(k.v()||k.assign(b))}a.Xz=d;a.mt=e;a.nt=f;a.Bw=g;var l=a.FE=a.nn;fk(a);gk(a,c,l,d,0,g,null!==a.dl&&null!==a.cl);mi(a.N);hk(a);requestAnimationFrame(function(b){var e=b||+new Date,f=e+g;(function s(b){if(!1!==a.Ei){b=b||+new Date;var h=b>f? +g:b-e;fk(a);gk(a,c,l,d,h,g,null!==a.dl&&null!==a.cl);a.mt&&a.mt();mi(c);hk(a);b>f?ik(a):requestAnimationFrame(s)}})(e)})}}var jk={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.XD(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)):a.position=new K(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 fk(a){if(!a.cn){var b=a.N;a.KB=b.Ta;a.Mz=b.Wv;a.Nz=b.Gs;b.Ta=!0;b.Wv=!0;b.Gs=!0;a.cn=!0}}function hk(a){var b=a.N;b.Ta=a.KB;b.Wv=a.Mz;b.Gs=a.Nz;a.cn=!1}function gk(a,b,c,d,e,f,g){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(void 0!==jk[m])jk[m](h,l[m],k[m],d,e,f)}g&&(g=a.dl,a=a.cl,m=a.y-g.y,a=d(e,g.x,a.x-g.x,f),d=d(e,g.y,m,f),e=b.Cy,b.Cy=!0,b.position=new K(a,d),b.Cy=e)} +Wg.prototype.stopAnimation=Wg.prototype.li=function(){!0===this.Pc&&(this.Pc=!1,this.Lz&&this.N.Ed());this.Ei&&this.ne&&(fk(this),gk(this,this.N,this.FE,this.Xz,this.Bw,this.Bw,null!==this.dl&&null!==this.cl),hk(this),ik(this))};function ik(a){a.Ei=!1;a.dl=null;a.cl=null;a.nn=new Ub(Y,Yj);fk(a);for(var b=a.N.links;b.next();){var c=b.value;null!==c.sn&&(c.points=c.sn,c.sn=null)}b=a.N;ek(b,!1);b.Xb();b.Ce();kk(b);hk(a);a.nt&&a.nt();a.nt=null;a.mt=null;b.ra("AnimationFinished");b.Ed()} +function lk(a,b,c){var d=b.Q,e=c.Q,f=null;c instanceof ka&&(f=c.placeholder);null!==f?(c=f.Za(Nd),c.x+=f.padding.left,c.y+=f.padding.top,ck(a,b,"position",c,b.position)):ck(a,b,"position",new K(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position);ck(a,b,"opacity",.01,b.opacity)}function mk(a,b,c){a.Pc&&(null===a.dl&&b.v()&&null===a.cl&&(a.dl=b.copy()),a.cl=c.copy())}O(Wg,{isEnabled:"isEnabled"},function(){return this.ne},function(a){I(a,"boolean",Wg,"isEnabled");this.ne=a}); +O(Wg,{duration:"duration"},function(){return this.Mw},function(a){I(a,"number",Wg,"duration");1>a&&La(a,">= 1",Wg,"duration");this.Mw=a});P(Wg,{vg:"isAnimating"},function(){return this.Ei});P(Wg,{TI:"isTicking"},function(){return this.cn});function Yj(a,b){this.start=a;this.end=b} +function vg(){0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.Sa.i;h.next();){var k=h.value;k instanceof ka?e++:k instanceof D?d++:k instanceof E?f++:k instanceof ea?g++:c++}h="";0=d.count)a=d.count;else if(d.Z(a)===b)return-1;d.zd(a,b);b.Xr(c);d=this.g;null!==d&&(c?d.ea():d.Xn(b));b instanceof ka&&this.Xv(b);return a};r.ye=function(a,b,c){var d=this.Sa;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.Z(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Yr(c);d.Lc(a);d=this.g;null!==d&&(c?d.ea():d.ye(b));b.Qt=null;return a}; +r.Xv=function(a){for(;null!==a;){if(a.layer===this){var b=a;if(0!==b.ic.count){for(var c=-1,d=-1,e=this.Sa.l,f=e.length,g=0;gd&&h.Ea===b&&(d=g,0<=c))break}!(0>d)&&da||1=a)return b;for(var c=this.Cb.i;c.next();)b+="\n "+c.value.toString(a-1);return b};y.prototype.checkProperties=function(){void 0===lc?lc=new qc(Object):lc.clear();pc=new Jc;kc("",this);var a=pc.toString();pc=null;return a}; +y.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.N instanceof y?b.N:null}; +O(y,{wk:"div"},function(){return this.ub},function(a){null!==a&&H(a,HTMLDivElement,y,"div");if(this.ub!==a){uk=[];var b=this.ub;null!==b?(b.N=void 0,b.innerHTML="",null!==this.Ia&&(this.Ia.removeEventListener("touchstart",this.kE,!1),this.Ia.removeEventListener("touchmove",this.jE,!1),this.Ia.removeEventListener("touchend",this.iE,!1),this.Ia.gd.N=null),b=this.eb,null!==b&&(b.De.each(function(a){a.cancelWaitAfter()}),b.of.each(function(a){a.cancelWaitAfter()}),b.pf.each(function(a){a.cancelWaitAfter()})), +b.cancelWaitAfter(),this.Ka.doCancel(),this.le=this.Ia=null,window.removeEventListener("resize",this.sE,!1),window.removeEventListener("mousemove",this.ko,!0),window.removeEventListener("mousedown",this.jo,!0),window.removeEventListener("mouseup",this.mo,!0),window.removeEventListener("mousewheel",this.zg,!0),window.removeEventListener("DOMMouseScroll",this.zg,!0),window.removeEventListener("mouseout",this.lo,!0)):this.Ie=!1;this.ub=null;if(null!==a){if(b=a.N)b.wk=null;Ek(this,a);this.vs()}}}); +function Hk(a){var b=a.Ia;b.addEventListener("touchstart",a.kE,!1);b.addEventListener("touchmove",a.jE,!1);b.addEventListener("touchend",a.iE,!1);b.addEventListener("mousemove",a.ko,!1);b.addEventListener("mousedown",a.jo,!1);b.addEventListener("mouseup",a.mo,!1);b.addEventListener("mousewheel",a.zg,!1);b.addEventListener("DOMMouseScroll",a.zg,!1);b.addEventListener("mouseout",a.lo,!1);b.addEventListener("keydown",a.zG,!1);b.addEventListener("keyup",a.AG,!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.eb.Un===Uj&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.YG,!1);b.addEventListener("pointermove",a.$G,!1);b.addEventListener("pointerleave",a.ZG,!1);window.addEventListener("resize",a.sE,!1)}function ek(a,b){a.Hl=null;b&&a.tD()} +y.prototype.computePixelRatio=function(){if(null!==this.Hl)return this.Hl;var a=this.le;return(window.devicePixelRatio||1)/(a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1)};y.prototype.doMouseMove=function(){this.Ka.doMouseMove()};y.prototype.doMouseDown=function(){this.Ka.doMouseDown()};y.prototype.doMouseUp=function(){this.Ka.doMouseUp()};y.prototype.doMouseWheel=function(){this.Ka.doMouseWheel()}; +y.prototype.doKeyDown=function(){this.Ka.doKeyDown()};y.prototype.doKeyUp=function(){this.Ka.doKeyUp()};function ak(a){if(null!==a.Ia){var b=a.ub;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Tj?a.dd:0,d=a.Sj?a.dd:0,e=a.Zd;a.Zd=a.computePixelRatio();a.Zd!==e&&(a.xp=!0,a.Ed());if(b.clientWidth!==a.lb+c||b.clientHeight!==a.kb+d)a.el=!0,a.pd=!0,b=a.yb,null!==b&&b.wv&&b.w(),a.$c||a.Ed()}}}y.prototype.focus=y.prototype.focus=function(){this.Ia&&this.Ia.focus()}; +function da(a,b,c){void 0===b&&(b=a.le);void 0===c&&(c=!0);c&&(b.Ss="");b.rm="";b.Uk=""}function Bk(a){var b=new vg;b.name="Background";a.ur(b);b=new vg;b.name="";a.ur(b);b=new vg;b.name="Foreground";a.ur(b);b=new vg;b.name="Adornment";b.gc=!0;a.ur(b);b=new vg;b.name="Tool";b.gc=!0;b.WC=!0;a.ur(b);b=new vg;b.name="Grid";b.Ke=!1;b.rf=!1;b.gc=!0;a.aF(b,a.yk("Background"))} +function Ik(a){a.Ac=new G(Jk);a.Ac.name="GRID";var b=new pi;b.ob="LineH";b.stroke="lightgray";b.Ua=.5;b.interval=1;a.Ac.add(b);b=new pi;b.ob="LineH";b.stroke="gray";b.Ua=.5;b.interval=5;a.Ac.add(b);b=new pi;b.ob="LineH";b.stroke="gray";b.Ua=1;b.interval=10;a.Ac.add(b);b=new pi;b.ob="LineV";b.stroke="lightgray";b.Ua=.5;b.interval=1;a.Ac.add(b);b=new pi;b.ob="LineV";b.stroke="gray";b.Ua=.5;b.interval=5;a.Ac.add(b);b=new pi;b.ob="LineV";b.stroke="gray";b.Ua=1;b.interval=10;a.Ac.add(b);b=new A;b.add(a.Ac); +b.ze="Grid";b.sv=!1;b.VC=!1;b.rf=!1;b.Cv="GRID";a.add(b);a.Sa.remove(b);a.Ac.visible=!1} +y.prototype.UA=function(){if(this.N.isEnabled){var a=this.N;if(a.Ax&&null!==a.Ia){a.mu=!0;var b=a.fc,c=a.Va,d=b.width,e=c.width,f=b.height,g=c.height,h=b.right,k=c.right,l=b.bottom,m=c.bottom,n=b.x,p=c.x,b=b.y,c=c.y,q=a.scale;if(ek&&(a.position= +new K(-(a.Vi.scrollWidth-a.lb)+this.scrollLeft-a.lb/q+a.fc.right,a.position.y))),this.lB&&a.te&&(bm&&(a.position=new K(a.position.x,-(a.Wi.scrollHeight-a.kb)+this.scrollTop-a.kb/q+a.fc.bottom))),fb(s),Kk(a),a.mu=!1,a.el=!1,b=a.fc,c=a.Va,h=b.right,k=c.right,l=b.bottom,m=c.bottom,n=b.x,p=c.x,b=b.y,c=c.y,e>=d&&n>=p&&h<=k&&(a.Bx.style.width="1px"),g>=f&&b>=c&&l<=m&&(a.Cx.style.height="1px")}}else Lk(this.N)}; +y.prototype.eu=function(){this.N.isEnabled?this.N.Ax=!0:Lk(this.N)};y.prototype.computeBounds=y.prototype.Nf=function(){0c&&(e=c),ea.xg&&(e=a.xg),e):b===Tk?(e=k>h?(g-a.dd)/d:(f-a.dd)/e,e>c&&(e=c),ea.xg&&(e=a.xg),e):a.scale}y.prototype.zoomToFit=y.prototype.zoomToFit=function(){this.scale=Pk(this,Sk)}; +y.prototype.zoomToRect=function(a,b){void 0===b&&(b=Sk);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Sk||b===Tk)if(isNaN(c))e=this.Va.height*this.scale/d;else if(isNaN(d))e=this.Va.width*this.scale/c;else var e=this.lb,f=this.kb,e=b===Tk?f/d>e/c?(f-(this.Sj?this.dd:0))/d:(e-(this.Tj?this.dd:0))/c:Math.min(f/d,e/c);this.scale=e;this.position=new K(a.x,a.y)}};O(y,{Cy:null},function(){return this.Zb},function(a){this.Zb=a}); +y.prototype.alignDocument=function(a,b){this.Eh&&Rk(this,this.Nf());var c=this.fc,d=this.Va,e=this.Zb;this.Zb=!0;this.position=new K(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));this.Zb=e;this.ea()}; +function Qk(a,b,c,d,e,f,g){var h=b.x,k=b.y;if(g||a.OD===vk)f.Ic()&&(d>c.width&&(h=c.x+(f.x*c.width+f.offsetX)-(f.x*d-f.offsetX)),e>c.height&&(k=c.y+(f.y*c.height+f.offsetY)-(f.y*e-f.offsetY))),f=a.ND,g=d-c.width,dc.left?h=c.left:hc.top?k=c.top:kc.touches.length)&&c.preventDefault();c.cancelBubble=!0;return!1} +y.prototype.zG=function(a){if(!this.N.isEnabled)return!1;var b=this.N.vb;Vk(this.N,this.N,a,b,!1);b.key=String.fromCharCode(a.which);b.xk=!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.N.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?ha(this.N,b,a):(a.cancelBubble=!0,a.preventDefault(),a.stopPropagation(),!1)}; +y.prototype.AG=function(a){if(!this.N.isEnabled)return!1;var b=this.N.vb;Vk(this.N,this.N,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.N.doKeyUp(); +return ha(this.N,b,a)};y.prototype.Um=function(a){var b=this.Ia;if(null===b)return new K(0,0);var c=this.lb,d=this.kb,b=b.getBoundingClientRect(),c=a.clientX-c/b.width*b.left;a=a.clientY-d/b.height*b.top;return null!==this.Dc?(a=new K(c,a),nd(a,this.Dc),a):new K(c,a)};function Wk(a,b,c){var d=a.Ia,e=a.lb,f=a.kb,g=0,h=0;null!==d&&(d=d.getBoundingClientRect(),g=b.clientX-e/d.width*d.left,h=b.clientY-f/d.height*d.top);c.Gd.k(g,h);null!==a.Dc?(b=eb(g,h),a.Dc.mh(b),c.U.assign(b),fb(b)):c.U.k(g,h)} +y.prototype.invalidateDocumentBounds=y.prototype.Xb=function(){this.Eh||(this.Eh=!0,this.Ed(!0))};function kk(a){a.$c||Mk(a);a.Eh&&Rk(a,a.Nf());for(a=a.sl.i;a.next();)kk(a.value)}y.prototype.redraw=y.prototype.vs=function(){this.Zb||this.$c||(this.ea(),Zk(this),Kk(this),this.Xb(),this.Ce())};y.prototype.isUpdateRequested=function(){return this.cf}; +y.prototype.delayInitialization=y.prototype.BF=function(a){void 0===a&&(a=null);var b=this.xb,c=b.isEnabled;b.li();b.isEnabled=!1;mi(this);this.Ie=!1;b.isEnabled=c;null!==a&&xa(a,1)};y.prototype.requestUpdate=y.prototype.Ed=function(a){void 0===a&&(a=!1);if(!0!==this.cf&&!(this.Zb||!1===a&&this.$c)){this.cf=!0;var b=this;requestAnimationFrame(function(){b.cf&&b.Ce()})}};y.prototype.maybeUpdate=y.prototype.Ce=function(){if(!this.Rm||this.cf)this.Rm&&(this.Rm=!1),mi(this)}; +function $k(a,b){a.Zb||!a.el||Lk(a)||(b&&Mk(a),Ok(a,!1))} +function mi(a){if(!a.$c&&(a.cf=!1,null!==a.ub)){a.$c=!0;var b=a.th,c=a.dB;if(!b.cn&&0!==c.length){for(var d=c.l,e=d.length,f=0;fb;b++){var c=a.zf.i;if(null===c||0===a.zf.count)break;a.zf=new qc(Y);var d=a,e=a.zf;for(c.reset();c.next();){var f=c.value;!f.jd()||f instanceof ka||!f.ya()||(f.Ik()?(wj(f,Infinity,Infinity),f.ec()):e.add(f))}for(c.reset();c.next();)f=c.value,f instanceof ka&&f.ya()&&fl(d,f);for(c.reset();c.next();)f=c.value,f instanceof E&&(d=f,d.ya()&&(d.Ik()?(wj(d,Infinity,Infinity),d.ec(),d.ks()):e.add(d)));for(c.reset();c.next();)d=c.value,d instanceof +ea&&d.ya()&&(d.Ik()?(wj(d,Infinity,Infinity),d.ec()):e.add(d));v&&22===b&&ba("failure to validate parts")}}function fl(a,b){for(var c=yb(),d=yb(),e=b.ic;e.next();){var f=e.value;f.ya()&&(f instanceof ka?(gl(f)||hl(f)||nl(f))&&fl(a,f):f instanceof E?f.O==b||f.T==b?d.push(f):c.push(f):(wj(f,Infinity,Infinity),f.ec()))}for(var e=c.length,g=0;gh+1&&(m=Math.max((u- +h)*F+a.lb,m)),p+1k+1&&(B=Math.max((n-k)*F+a.kb,B)),q+1h+1&&(m=Math.max((u-h)*F+a.lb,m)),p+1k+1&&(B=Math.max((n-k)*F+a.kb,B)),q+1h+1&&(a.Vi.scrollLeft=a.position.x*F));a.yy&&a.te&&(q+1k+1&&(a.Wi.scrollTop=a.position.y*F));g&&(a.xp=!0);l=a.lb;c=a.kb;a.Wi.style.height=c+"px";a.Wi.style.width=l+(a.Tj?a.dd:0)+"px";a.Vi.style.width=l+"px";a.Vi.style.height=c+(a.Sj?a.dd:0)+"px";a.Ax=!1;return d!==l||e!==c||a.xb.Pc?(m=a.Va,a.rs(f,m,g),!1):!0} +y.prototype.add=y.prototype.add=function(a){H(a,A,y,"add:part");var b=a.g;if(b!==this){null!==b&&w("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.tm&&(a.Yj="Tool");var c=a.ze,b=this.yk(c);null===b&&(b=this.yk(""));null===b&&w('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.Xn(99999999,a,a.g===this),0<=c&&this.kc(eg,"parts",b,null,a,null,c),b.gc||this.Xb(),a.w(Dl),c=a.ds,null!==c&&c(a, +null,b))}}; +y.prototype.Xn=function(a){if(a instanceof D){if(this.rq.add(a),a instanceof ka){var b=a.Ea;null===b?this.jk.add(a):b.ql.add(a);b=a.yb;null!==b&&(b.g=this)}}else a instanceof E?this.Vp.add(a):a instanceof ea||this.Sa.add(a);var c=this;El(a,function(a){Fl(c,a)});a.Ab&&a.K();b=a.data;null!==b&&(a instanceof ea||(a instanceof E?this.Nj.add(b,a):this.zh.add(b,a)),El(a,function(a){Gl(c,a)}));!0!==hl(a)&&!0!==nl(a)||this.zf.add(a);Hl(a,!0,this);Il(a)?(a.Q.v()&&this.ea(sk(a,a.Q)),this.Xb()):a.ya()&&a.Q.v()&& +this.ea(sk(a,a.Q));this.Ed()}; +y.prototype.ye=function(a){a.Cr();if(a instanceof D){if(this.rq.remove(a),a instanceof ka){var b=a.Ea;null===b?this.jk.remove(a):b.ql.remove(a);b=a.yb;null!==b&&(b.g=null)}}else a instanceof E?this.Vp.remove(a):a instanceof ea||this.Sa.remove(a);var c=this;El(a,function(a){Jl(c,a)});b=a.data;null!==b&&(a instanceof ea||(a instanceof E?this.Nj.remove(b):this.zh.remove(b)),El(a,function(a){Kl(c,a)}));this.zf.remove(a);Il(a)?(a.Q.v()&&this.ea(sk(a,a.Q)),this.Xb()):a.ya()&&a.Q.v()&&this.ea(sk(a,a.Q)); +this.Ed()};y.prototype.remove=y.prototype.remove=function(a){H(a,A,y,"remove:part");a.La=!1;a.wg=!1;var b=a.layer;if(null!==b&&b.g===this){a.w(Ll);a.Xl();var c=b.ye(-1,a,!1);0<=c&&this.kc(fg,"parts",b,a,null,c,null);c=a.ds;null!==c&&c(a,b,null)}};y.prototype.removeParts=y.prototype.gz=function(a,b){if(Pa(a))for(var c=la(a),d=0;dd&&this.Xb()}; +y.prototype.addLayerAfter=function(a,b){Ml(this,a,b);a.lc(this);var c=this.Cb,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.rd&&this.kc(fg,"layers",this,a,null,d,null));for(var e=c.count,f=0;fd&&this.Xb()}; +y.prototype.removeLayer=function(a){H(a,vg,y,"removeLayer:layer");a.g!==this&&w("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.Cb,c=b.indexOf(a);if(b.remove(a)){for(b=a.Sa.copy().i;b.next();){var d=b.value,e=d.ze;d.ze=e!==a.name?e:""}null!==this.rd&&this.kc(fg,"layers",this,a,null,c,null);this.ea();this.Xb()}}};y.prototype.findLayer=y.prototype.yk=function(a){for(var b=this.dm;b.next();){var c=b.value;if(c.name===a)return c}return null}; +y.prototype.addChangedListener=y.prototype.Sx=function(a){I(a,"function",y,"addChangedListener:listener");null===this.ui&&(this.ui=new S("function"));this.ui.add(a)};y.prototype.removeChangedListener=y.prototype.dz=function(a){I(a,"function",y,"removeChangedListener:listener");null!==this.ui&&(this.ui.remove(a),0===this.ui.count&&(this.ui=null))}; +y.prototype.Uu=function(a){this.Ta||this.aa.QC(a);a.ed!==dg&&(this.oh=!0);if(null!==this.ui){var b=this.ui,c=b.length;if(1===c)b=b.Z(0),b(a);else if(0!==c)for(var d=b.je(),e=0;ea.xg&&(c=a.xg);a.position=new K(a.Ba.x+g.x/b-g.x/c,a.Ba.y+g.y/b- +g.y/c);a.Zb=!1;a.Eb=c;a.rs(d,a.Va);Ok(a,!1);a.ea();Zk(a)}}y.prototype.rs=function(a,b,c){void 0===c&&(c=!1);c||Zk(this);Kk(this);var d=this.yb;null===d||!d.wv||c||a.width===b.width&&a.height===b.height||d.w();d=this.Ka;!0===this.gl&&d instanceof fh&&(this.F.U=this.oE(this.F.Gd),d.doMouseMove());this.Ay(a,b);bl(this);this.ra("ViewportBoundsChanged",c?Bb:null,a)}; +function bl(a,b){void 0===b&&(b=null);var c=a.Ac;if(null!==c&&c.visible){for(var d=hb(),e=1,f=1,g=c.ja.l,h=g.length,k=0;km||(Ol(l.ob)?f=f*m/U.JC(f,m):e=e*m/U.JC(e,m))}g=c.jv;d.k(f*g.width,e*g.height);g=f=k=h=0;if(null!==b)h=b.width,k=b.height,f=b.x,g=b.y;else{e=nb();f=a.Va;e.k(f.x,f.y,f.width,f.height);for(g=a.sl.i;g.next();)f=g.value.Va,f.v()&&Gd(e,f.x,f.y,f.width,f.height);h=e.width;k=e.height;f=e.x;g=e.y;if(!e.v())return}c.width=h+2*d.width;c.height=k+2*d.height; +e=db();U.Mr(f,g,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);kb(d);c.L.location=e;fb(e)}}y.prototype.clearSelection=y.prototype.Vu=function(){var a=0a&&La(a,">= zero",y,"linkSpacing"),this.Hi=a,this.h("linkSpacing",b,a))});P(y,{dm:"layers"},function(){return this.Cb.i});O(y,{Qe:"isModelReadOnly"},function(){var a=this.rd;return null===a?!1:a.ab},function(a){var b=this.rd;null!==b&&(b.ab=a)});O(y,{ab:"isReadOnly"},function(){return this.Xj},function(a){var b=this.Xj;b!==a&&(I(a,"boolean",y,"isReadOnly"),this.Xj=a,this.h("isReadOnly",b,a))}); +O(y,{isEnabled:"isEnabled"},function(){return this.ne},function(a){var b=this.ne;b!==a&&(I(a,"boolean",y,"isEnabled"),this.ne=a,this.h("isEnabled",b,a))});O(y,{Vx:"allowClipboard"},function(){return this.Us},function(a){var b=this.Us;b!==a&&(I(a,"boolean",y,"allowClipboard"),this.Us=a,this.h("allowClipboard",b,a))});O(y,{jj:"allowCopy"},function(){return this.yj},function(a){var b=this.yj;b!==a&&(I(a,"boolean",y,"allowCopy"),this.yj=a,this.h("allowCopy",b,a))}); +O(y,{Ml:"allowDelete"},function(){return this.zj},function(a){var b=this.zj;b!==a&&(I(a,"boolean",y,"allowDelete"),this.zj=a,this.h("allowDelete",b,a))});O(y,{Lu:"allowDragOut"},function(){return this.Vs},function(a){var b=this.Vs;b!==a&&(I(a,"boolean",y,"allowDragOut"),this.Vs=a,this.h("allowDragOut",b,a))});O(y,{VB:"allowDrop"},function(){return this.Ws},function(a){var b=this.Ws;b!==a&&(I(a,"boolean",y,"allowDrop"),this.Ws=a,this.h("allowDrop",b,a))}); +O(y,{Pu:"allowTextEdit"},function(){return this.Ij},function(a){var b=this.Ij;b!==a&&(I(a,"boolean",y,"allowTextEdit"),this.Ij=a,this.h("allowTextEdit",b,a))});O(y,{Mu:"allowGroup"},function(){return this.Aj},function(a){var b=this.Aj;b!==a&&(I(a,"boolean",y,"allowGroup"),this.Aj=a,this.h("allowGroup",b,a))});O(y,{Qu:"allowUngroup"},function(){return this.Jj},function(a){var b=this.Jj;b!==a&&(I(a,"boolean",y,"allowUngroup"),this.Jj=a,this.h("allowUngroup",b,a))}); +O(y,{Dn:"allowInsert"},function(){return this.Ys},function(a){var b=this.Ys;b!==a&&(I(a,"boolean",y,"allowInsert"),this.Ys=a,this.h("allowInsert",b,a))});O(y,{yr:"allowLink"},function(){return this.Bj},function(a){var b=this.Bj;b!==a&&(I(a,"boolean",y,"allowLink"),this.Bj=a,this.h("allowLink",b,a))});O(y,{Nl:"allowRelink"},function(){return this.Dj},function(a){var b=this.Dj;b!==a&&(I(a,"boolean",y,"allowRelink"),this.Dj=a,this.h("allowRelink",b,a))}); +O(y,{ok:"allowMove"},function(){return this.Cj},function(a){var b=this.Cj;b!==a&&(I(a,"boolean",y,"allowMove"),this.Cj=a,this.h("allowMove",b,a))});O(y,{Nu:"allowReshape"},function(){return this.Ej},function(a){var b=this.Ej;b!==a&&(I(a,"boolean",y,"allowReshape"),this.Ej=a,this.h("allowReshape",b,a))});O(y,{zr:"allowResize"},function(){return this.Fj},function(a){var b=this.Fj;b!==a&&(I(a,"boolean",y,"allowResize"),this.Fj=a,this.h("allowResize",b,a))}); +O(y,{Ou:"allowRotate"},function(){return this.Gj},function(a){var b=this.Gj;b!==a&&(I(a,"boolean",y,"allowRotate"),this.Gj=a,this.h("allowRotate",b,a))});O(y,{Ke:"allowSelect"},function(){return this.Hj},function(a){var b=this.Hj;b!==a&&(I(a,"boolean",y,"allowSelect"),this.Hj=a,this.h("allowSelect",b,a))});O(y,{WB:"allowUndo"},function(){return this.Zs},function(a){var b=this.Zs;b!==a&&(I(a,"boolean",y,"allowUndo"),this.Zs=a,this.h("allowUndo",b,a))}); +O(y,{Ru:"allowZoom"},function(){return this.at},function(a){var b=this.at;b!==a&&(I(a,"boolean",y,"allowZoom"),this.at=a,this.h("allowZoom",b,a))});O(y,{yy:"hasVerticalScrollbar"},function(){return this.Ft},function(a){var b=this.Ft;b!==a&&(I(a,"boolean",y,"hasVerticalScrollbar"),this.Ft=a,Zk(this),this.ea(),this.h("hasVerticalScrollbar",b,a),Ok(this,!1))}); +O(y,{xy:"hasHorizontalScrollbar"},function(){return this.Et},function(a){var b=this.Et;b!==a&&(I(a,"boolean",y,"hasHorizontalScrollbar"),this.Et=a,Zk(this),this.ea(),this.h("hasHorizontalScrollbar",b,a),Ok(this,!1))});O(y,{se:"allowHorizontalScroll"},function(){return this.Xs},function(a){var b=this.Xs;b!==a&&(I(a,"boolean",y,"allowHorizontalScroll"),this.Xs=a,this.h("allowHorizontalScroll",b,a),Ok(this,!1))}); +O(y,{te:"allowVerticalScroll"},function(){return this.$s},function(a){var b=this.$s;b!==a&&(I(a,"boolean",y,"allowVerticalScroll"),this.$s=a,this.h("allowVerticalScroll",b,a),Ok(this,!1))});O(y,{Bs:"scrollHorizontalLineChange"},function(){return this.nu},function(a){var b=this.nu;b!==a&&(I(a,"number",y,"scrollHorizontalLineChange"),0>a&&La(a,">= 0",y,"scrollHorizontalLineChange"),this.nu=a,this.h("scrollHorizontalLineChange",b,a))}); +O(y,{Cs:"scrollVerticalLineChange"},function(){return this.ou},function(a){var b=this.ou;b!==a&&(I(a,"number",y,"scrollVerticalLineChange"),0>a&&La(a,">= 0",y,"scrollVerticalLineChange"),this.ou=a,this.h("scrollVerticalLineChange",b,a))});O(y,{F:"lastInput"},function(){return this.vb},function(a){v&&H(a,$f,y,"lastInput");this.vb=a});O(y,{bc:"firstInput"},function(){return this.Pj},function(a){v&&H(a,$f,y,"firstInput");this.Pj=a}); +O(y,{Lb:"currentCursor"},function(){return this.Aw},function(a){""===a&&(a=this.gp);this.Aw!==a&&(I(a,"string",y,"currentCursor"),null!==this.Ia&&(this.Aw=a,this.Ia.style.cursor=a,this.ub.style.cursor=a))});O(y,{rI:"defaultCursor"},function(){return this.gp},function(a){""===a&&(a="auto");var b=this.gp;b!==a&&(I(a,"string",y,"defaultCursor"),this.gp=a,this.h("defaultCursor",b,a))}); +O(y,{KI:"hasGestureZoom"},function(){return this.Wm},function(a){var b=this.Wm;b!==a&&(I(a,"boolean",y,"hasGestureZoom"),this.Wm=a,this.h("hasGestureZoom",b,a))});O(y,{click:"click"},function(){return this.vh},function(a){var b=this.vh;b!==a&&(null!==a&&I(a,"function",y,"click"),this.vh=a,this.h("click",b,a))});O(y,{Jr:"doubleClick"},function(){return this.Ch},function(a){var b=this.Ch;b!==a&&(null!==a&&I(a,"function",y,"doubleClick"),this.Ch=a,this.h("doubleClick",b,a))}); +O(y,{ay:"contextClick"},function(){return this.xh},function(a){var b=this.xh;b!==a&&(null!==a&&I(a,"function",y,"contextClick"),this.xh=a,this.h("contextClick",b,a))});O(y,{Qy:"mouseOver"},function(){return this.Mh},function(a){var b=this.Mh;b!==a&&(null!==a&&I(a,"function",y,"mouseOver"),this.Mh=a,this.h("mouseOver",b,a))});O(y,{Py:"mouseHover"},function(){return this.Lh},function(a){var b=this.Lh;b!==a&&(null!==a&&I(a,"function",y,"mouseHover"),this.Lh=a,this.h("mouseHover",b,a))}); +O(y,{Oy:"mouseHold"},function(){return this.Kh},function(a){var b=this.Kh;b!==a&&(null!==a&&I(a,"function",y,"mouseHold"),this.Kh=a,this.h("mouseHold",b,a))});O(y,{TG:"mouseDragOver"},function(){return this.au},function(a){var b=this.au;b!==a&&(null!==a&&I(a,"function",y,"mouseDragOver"),this.au=a,this.h("mouseDragOver",b,a))});O(y,{Ny:"mouseDrop"},function(){return this.Jh},function(a){var b=this.Jh;b!==a&&(null!==a&&I(a,"function",y,"mouseDrop"),this.Jh=a,this.h("mouseDrop",b,a))}); +O(y,{wz:"toolTip"},function(){return this.Th},function(a){var b=this.Th;b!==a&&(null!==a&&H(a,ea,y,"toolTip"),this.Th=a,this.h("toolTip",b,a))});O(y,{contextMenu:"contextMenu"},function(){return this.yh},function(a){var b=this.yh;b!==a&&(null!==a&&H(a,ea,y,"contextMenu"),this.yh=a,this.h("contextMenu",b,a))}); +O(y,{nb:"commandHandler"},function(){return this.rw},function(a){var b=this.rw;b!==a&&(H(a,sc,y,"commandHandler"),null!==a.g&&w("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.lc(null),this.rw=a,a.lc(this))});O(y,{eb:"toolManager"},function(){return this.Ox},function(a){var b=this.Ox;b!==a&&(H(a,fh,y,"toolManager"),null!==a.g&&w("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.lc(null),this.Ox=a,a.lc(this))}); +O(y,{jy:"defaultTool"},function(){return this.Gw},function(a){var b=this.Gw;b!==a&&(H(a,wg,y,"defaultTool"),this.Gw=a,this.Ka===b&&(this.Ka=a))});O(y,{Ka:"currentTool"},function(){return this.Cw},function(a){var b=this.Cw;if(null!==b)for(b.fa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop(),b=this.sl.i;b.next();)b.value.ea();null===a&&(a=this.jy);null!==a&&(H(a,wg,y,"currentTool"),this.Cw=a,a.lc(this),a.doStart())});P(y,{selection:"selection"},function(){return this.qu}); +O(y,{LG:"maxSelectionCount"},function(){return this.Xt},function(a){var b=this.Xt;if(b!==a)if(I(a,"number",y,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Xt=a,this.h("maxSelectionCount",b,a),!this.aa.bb&&(a=this.selection.count-a,0= 0",y,"maxSelectionCount")}); +O(y,{VG:"nodeSelectionAdornmentTemplate"},function(){return this.cu},function(a){var b=this.cu;b!==a&&(H(a,ea,y,"nodeSelectionAdornmentTemplate"),this.cu=a,this.h("nodeSelectionAdornmentTemplate",b,a))});O(y,{fG:"groupSelectionAdornmentTemplate"},function(){return this.Bt},function(a){var b=this.Bt;b!==a&&(H(a,ea,y,"groupSelectionAdornmentTemplate"),this.Bt=a,this.h("groupSelectionAdornmentTemplate",b,a))}); +O(y,{HG:"linkSelectionAdornmentTemplate"},function(){return this.St},function(a){var b=this.St;b!==a&&(H(a,ea,y,"linkSelectionAdornmentTemplate"),this.St=a,this.h("linkSelectionAdornmentTemplate",b,a))});P(y,{kv:"highlighteds"},function(){return this.Gt});O(y,{oh:"isModified"},function(){var a=this.aa;return a.isEnabled?null!==a.bi?!0:this.ex&&this.hg!==a.gi:this.ex},function(a){if(this.ex!==a){I(a,"boolean",y,"isModified");this.ex=a;var b=this.aa;!a&&b.isEnabled&&(this.hg=b.gi);a||Pl(this)}}); +function Pl(a){var b=a.oh;a.MB!==b&&(a.MB=b,a.ra("Modified"))} +O(y,{V:"model"},function(){return this.rd},function(a){var b=this.rd;if(b!==a){H(a,zc,y,"model");this.Ka.doCancel();null!==b&&b.aa!==a.aa&&b.aa.ZC&&w("Do not replace a Diagram.model while a transaction is in progress.");this.xb.li();this.Vu();this.Ie=!1;this.Rm=!0;this.hg=-2;this.cf=!1;var c=this.$c;this.$c=!0;this.xb.Mk();null!==b&&(b.dz(this.PA),b instanceof og&&Ql(this,b.rj),Ql(this,b.Bg));this.rd=a;a.Sx(this.OA);Rl(this,a.Bg);a instanceof og&&Sl(this,a.rj);a.dz(this.OA);a.Sx(this.PA);this.$c= +c;this.Zb||this.ea();null!==b&&(a.aa.isEnabled=b.aa.isEnabled)}});O(y,{Da:null},function(){return this.HA},function(a){this.HA=a}); +function yk(a,b){if(b.V===a.V){var c=b.ed,d=b.propertyName;if(c===dg&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.eb,c.De.each(function(b){b.lc(a)}),c.of.each(function(b){b.lc(a)}),c.pf.each(function(b){b.lc(a)}),a.$c||a.Ie||(a.rt=!0,a.Rm&&(a.cf=!0),a.th.Mk());else if("StartingUndo"===d||"StartingRedo"===d){var e=a.xb;e.vg&&!a.Ta&&e.li();a.ra("ChangingSelection")}else"StartedTransaction"===d&&(e=a.xb,e.vg&&!a.Ta&&e.li(),a.Ot&&e.Mk());else if(a.Da){a.Da=!1;try{var f=b.nf;if(""!==f)if(c===cg){if("linkFromKey"=== +f){var g=b.object,h=a.Qf(g);if(null!==h){var k=b.newValue,l=a.xe(k);h.O=l}}else if("linkToKey"===f)g=b.object,h=a.Qf(g),null!==h&&(k=b.newValue,l=a.xe(k),h.T=l);else if("linkFromPortId"===f){if(g=b.object,h=a.Qf(g),null!==h){var m=b.newValue;"string"===typeof m&&(h.hf=m)}}else if("linkToPortId"===f)g=b.object,h=a.Qf(g),null!==h&&(m=b.newValue,"string"===typeof m&&(h.ag=m));else if("nodeGroupKey"===f){var g=b.object,n=a.lh(g);if(null!==n){var p=b.newValue;if(void 0!==p){var q=a.xe(p);n.Ea=q instanceof +ka?q:null}else n.Ea=null}}else if("linkLabelKeys"===f){if(g=b.object,h=a.Qf(g),null!==h){var s=b.oldValue,t=b.newValue;if(Pa(s))for(var u=la(s),z=0;zk)){var l=k;Zl(h)&&l++;h.ye(l);$l(h,l,k)}}}}function Gl(a,b){var c=b.Gh;if(Pa(c)){var d=a.jl.ma(c);if(null===d)d=[],d.push(b),a.jl.add(c,d);else{for(c=0;c=f.length)return!1;for(var g=0;gthis.scale&&(this.scale=a)):La(a,"> 0",y,"minScale"))}); +O(y,{xg:"maxScale"},function(){return this.Wt},function(a){J(a,y,"maxScale");var b=this.Wt;b!==a&&(0 0",y,"maxScale"))});O(y,{pm:"zoomPoint"},function(){return this.Hu},function(a){this.Hu.C(a)||(H(a,K,y,"zoomPoint"),this.Hu=a=a.R())});O(y,{$x:"contentAlignment"},function(){return this.Bm},function(a){var b=this.Bm;b.C(a)||(H(a,V,y,"contentAlignment"),this.Bm=a=a.R(),this.h("contentAlignment",b,a),Ok(this,!1))}); +O(y,{NI:"initialContentAlignment"},function(){return this.Ym},function(a){var b=this.Ym;b.C(a)||(H(a,V,y,"initialContentAlignment"),this.Ym=a=a.R(),this.h("initialContentAlignment",b,a))});O(y,{padding:"padding"},function(){return this.qe},function(a){"number"===typeof a?a=new yd(a):H(a,yd,y,"padding");var b=this.qe;b.C(a)||(this.qe=a=a.R(),this.Xb(),this.h("padding",b,a))});P(y,{Wf:"nodes"},function(){return this.rq.i});P(y,{links:"links"},function(){return this.Vp.i});P(y,{ph:"parts"},function(){return this.Sa.i}); +y.prototype.findTopLevelGroups=function(){return this.jk.i};O(y,{yb:"layout"},function(){return this.qd},function(a){var b=this.qd;b!==a&&(H(a,xg,y,"layout"),null!==b&&(b.g=null,b.group=null),this.qd=a,a.g=this,a.group=null,this.bt=!0,this.h("layout",b,a),this.Ed())});y.prototype.layoutDiagram=function(a){Mk(this);a&&em(this,!0);dl(this,!1)};function em(a,b){for(var c=a.jk.i;c.next();)mm(a,c.value,b);null!==a.yb&&(b?a.yb.Re=!1:a.yb.w())} +function mm(a,b,c){if(null!==b){for(var d=b.ql.i;d.next();)mm(a,d.value,c);null!==b.yb&&(c?b.yb.Re=!1:b.yb.w())}}function dl(a,b){if(!a.Hw){var c=a.yb,d=a.Ot;a.Ot=!0;var e=a.Da;a.Da=!0;try{a.Jb("Layout");for(var f=a.jk.i;f.next();)nm(a,f.value,b);c.Re||b&&!c.$C||(c.doLayout(a),Mk(a),c.Re=!0)}finally{a.xd("Layout"),a.bt=!c.Re,a.Ot=d,a.Da=e}}} +function nm(a,b,c){if(null!==b){for(var d=b.ql.i;d.next();)nm(a,d.value,c);d=b.yb;null===d||d.Re||c&&!d.$C||(b.sx=!b.location.v(),d.doLayout(b),b.w(om),d.Re=!0,fl(a,b))}}O(y,{Tc:"isTreePathToChildren"},function(){return this.Nt},function(a){var b=this.Nt;if(b!==a&&(I(a,"boolean",y,"isTreePathToChildren"),this.Nt=a,this.h("isTreePathToChildren",b,a),!this.aa.bb))for(a=this.Wf;a.next();)pm(a.value)}); +y.prototype.findTreeRoots=function(){for(var a=new S(D),b=this.Wf;b.next();){var c=b.value;c.vv&&null===c.Pr()&&a.add(c)}return a.i};O(y,{Nd:null},function(){return this.vA},function(a){this.vA=a}); +function wk(a){function b(a){var b=a.toLowerCase(),g=new S("function");c.add(a,g);c.add(b,g);d.add(a,a);d.add(b,a)}var c=new Ub("string",S),d=new Ub("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.Jw=c;a.Iw=d} +function Zb(a,b){var c=a.Iw.ma(b);return null!==c?c:a.Iw.ma(b.toLowerCase())}function qm(a,b){var c=a.Jw.ma(b);if(null!==c)return c;c=a.Jw.ma(b.toLowerCase());if(null!==c)return c;w("Unknown DiagramEvent name: "+b);return null}y.prototype.addDiagramListener=y.prototype.Tx=function(a,b){I(a,"string",y,"addDiagramListener:name");I(b,"function",y,"addDiagramListener:listener");var c=qm(this,a);null!==c&&c.add(b)}; +y.prototype.removeDiagramListener=y.prototype.xD=function(a,b){I(a,"string",y,"removeDiagramListener:name");I(b,"function",y,"addDiagramListener:listener");var c=qm(this,a);null!==c&&c.remove(b)};y.prototype.raiseDiagramEvent=y.prototype.ra=function(a,b,c){v&&I(a,"string",y,"raiseDiagramEvent:name");var d=qm(this,a),e=new ag;e.g=this;e.name=Zb(this,a);void 0!==b&&(e.rz=b);void 0!==c&&(e.Yy=c);a=d.length;if(1===a)d=d.Z(0),d(e);else if(0!==a)for(b=d.je(),c=0;c=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.Va,f=a.scale,e=ob(0,0,e.width*f,e.height*f),g=eb(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(h=Math.max(a.Bs,1),h|=0,g.x+=h,b.x>e.x+e.width-d.right/2&&(g.x+=h),b.x>e.x+e.width-d.right/4&&(g.x+=4*h));b.y>=e.y&&b.ye.y+e.height-d.bottom&&(h=Math.max(a.Cs,1),h|=0,g.y+=h,b.y>e.y+e.height-d.bottom/2&&(g.y+=h),b.y>e.y+e.height-d.bottom/4&&(g.y+=4*h));g.ee(U.xj)||(c=new K(c.x+g.x/f,c.y+g.y/f));pb(e);fb(g);return c}y.prototype.makeSVG=y.prototype.makeSvg=function(a){void 0===a&&(a=new dc);a.context="svg";a=ym(this,a);return null!==a?a.Rk:null}; +y.prototype.makeImage=function(a){void 0===a&&(a=new dc);var b=(a.document||document).createElement("img");b.src=this.IG(a);return b};y.prototype.makeImageData=y.prototype.IG=function(a){void 0===a&&(a=new dc);var b=ym(this,a);return null!==b?b.toDataURL(a.type,a.details):""};var zm=!1; +function ym(a,b){a.xb.li();a.Ce();if(null===a.Ia)return null;"object"!==typeof b&&w("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 ib(Infinity,Infinity):new ib(2E3,2E3));var g=b.position||null,h=b.parts||null,k=void 0===b.padding?1:b.padding,l=b.background||null,m=b.omitTemporary;void 0===m&&(m=!0);var n=b.document||document,p=b.elementFinished||null,q=b.showTemporary; +void 0===q&&(q=!m);m=b.showGrid;void 0===m&&(m=q);null!==d&&isNaN(d.width)&&isNaN(d.height)&&(d=null);"number"===typeof k?k=new yd(k):k instanceof yd||(k=new yd(0));k.left=Math.max(k.left,0);k.right=Math.max(k.right,0);k.top=Math.max(k.top,0);k.bottom=Math.max(k.bottom,0);a.Nm=!1;da(a);var s=new bc(null,n),t=s.getContext("2d"),u=s;if(!(d||e||h||g))return s.width=a.lb+Math.ceil(k.left+k.right),s.height=a.kb+Math.ceil(k.top+k.bottom),"svg"===b.context&&(t=u=new Qe(s.gd,n,p),t instanceof Qe&&(a.Nm=!0)), +Al(a,t,k,new ib(s.width,s.height),a.Eb,a.Ba,h,l,q,m),a.Nm=!0,u;var z=a.nb.Zu,C=new K(0,0),B=a.fc.copy();B.CH(a.padding);if(q)for(var F=!0,F=a.Cb.l,Q=F.length,M=0;Mz?(e=z,g=B.width,ja=B.height):(g=f.width,ja=f.height)):(g=B.width*e,ja=B.height*e):(e=z,g=B.width,ja=B.height);null!==k?(g+=oa,ja+=F):k=new yd(0);null!==f&&(d=f.width,f=f.height,"svg"!==b.context&&c&&!zm&&(g>d||ja>f)&&(ba("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(g)+"x"+Math.ceil(ja)+" vs 2000x2000) Consider increasing the max size."), +zm=!0),isNaN(d)&&(d=2E3),isNaN(f)&&(f=2E3),isFinite(d)&&(g=Math.min(g,d)),isFinite(f)&&(ja=Math.min(ja,f)));s.width=Math.ceil(g);s.height=Math.ceil(ja);"svg"===b.context&&(t=u=new Qe(s.gd,n,p),t instanceof Qe&&(a.Nm=!0));Al(a,t,k,new ib(Math.ceil(g),Math.ceil(ja)),e,C,h,l,q,m);a.Nm=!0;return u}y.inherit=function(a,b){I(a,"function",y,"inherit");I(b,"function",y,"inherit");b.ah&&w("Cannot inherit from "+Ga(b));Nb(a,b)}; +function Dk(){this.TE="63ad05bbe23a1786468a4c741b6d2";this.TE===this._tk?this.Rg=!0:Am(this,!1)} +function Am(a,b){var c="p",d=window[Gc("76a715b2f73f148a")][Gc("72ba13b5")];if(Gc("77bb5bb2f32603de")===window[Gc("76a715b2f73f148a")][Gc("6aba19a7ec351488")])try{a.Rg=!window[Gc("4da118b7ec2108")]([Gc("5bb806bfea351a904a84515e1b6d38b6")])([Gc("49bc19a1e6")])([Gc("59bd04a1e6380fa5539b")])([Gc("7bb8069ae7")]===Gc("7da71ca0ad381e90"));if(!1===a.Rg)return;a.Rg=!window[Gc("4da118b7ec2108")]([Gc("5bb806bfea351a904a84515e1b6d38b6")])([Gc("49bc19a1e6")])([Gc("59bd04a1e6380fa5539b6c7a197c31bb4cfd3e")])([Gc("7bb8069ae7")]===Gc("7da71ca0ad381e90")); +if(!1===a.Rg)return}catch(e){}for(var f=d[Gc("76ad18b4f73e")],g=d[Gc("73a612b6fb191d")](Gc("35e7"))+2;g=d&&Gc("7da71ca0ad381e90")!==Gc("7da71ca0ad381e90")&&(d=c[Gc("73a612b6fb191d")](Gc("76a715b2ef3e149757")));a.Rg=!(0b.timeStamp-a.ml)b.preventDefault();else if(a.pc=a.vb,a.vb=c,Vk(a,a,b,c, +!0),c.xk=!0,c.ue=b.detail,a.Pj=c.copy(),!0===c.mp.simulated)b.preventDefault(),b.simulated=!0;else if(v&&v.nD&&(window.nD=a.Qn(c.U)),Ah=null,a.doMouseDown(),1===b.button)return b.preventDefault(),!1}};a.mo=function(b){if(a.isEnabled){a.gl=!0;var c=a.pc;if(na){if(400>b.timeStamp-a.ml){b.preventDefault();return}a.ml=b.timeStamp}if(na&&null!==a.ar)a.ar=null,b.preventDefault();else{a.pc=a.vb;a.vb=c;Vk(a,a,b,c,!0);c.up=!0;c.ue=b.detail;if(qa||sa)b.timeStamp-a.mlb.touches.length&&Uk(a,c);ha(a,c,b)}};a.jE=function(b){if(a.isEnabled){var c=a.pc;a.pc=a.vb;a.vb=c;var d=null;0a.Aq&&Uk(a,c),ha(a,c,b))}};a.$G=function(b){if("touch"===b.pointerType&& +!(2>a.Aq)){var c=a.bf;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.pc,a.pc=a.vb,a.vb=c,Yk(a,b,b,c,!0),uh(a),a.Vv(b,null,c.Zf)||(a.doMouseMove(),ha(a,c,b)))}};a.ZG=function(b){if("touch"===b.pointerType){var c=a.eB;void 0!==c[b.pointerId]&&(a.Aq--,delete c[b.pointerId],c=a.bf,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null))}};da(a);Hk(a)} +function Bm(a){1a)&&La(a,"0 <= loc <= 1",Ka,"addColorStop:loc");I(b,"string",Ka,"addColorStop:color");v&&!Ia(b)&&w('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.eg&&(this.eg=new Ub("number","string"));this.eg.add(a,b);this.W===sg&&(this.type=tg);this.fg=null}; +O(Ka,{type:"type"},function(){return this.W},function(a){Aa(this,a);Ea(a,Ka,Ka,"type");this.W=a;this.start.Od()&&(a===tg?this.start=Od:a===ug&&(this.start=Rd));this.end.Od()&&(a===tg?this.end=Ud:a===ug&&(this.end=Rd));this.fg=null});O(Ka,{color:"color"},function(){return this.Am},function(a){Aa(this,a);v&&!Ia(a)&&w('Color "'+a+'" is not a valid color string for Brush.color');this.Am=a;this.fg=null}); +O(Ka,{start:"start"},function(){return this.wn},function(a){Aa(this,a);H(a,V,Ka,"start");this.wn=a.R();this.fg=null});O(Ka,{end:"end"},function(){return this.Pm},function(a){Aa(this,a);H(a,V,Ka,"end");this.Pm=a.R();this.fg=null});O(Ka,{Hs:"startRadius"},function(){return this.uu},function(a){Aa(this,a);J(a,Ka,"startRadius");0>a&&La(a,">= zero",Ka,"startRadius");this.uu=a;this.fg=null}); +O(Ka,{Kr:"endRadius"},function(){return this.wt},function(a){Aa(this,a);J(a,Ka,"endRadius");0>a&&La(a,">= zero",Ka,"endRadius");this.wt=a;this.fg=null});O(Ka,{Dr:"colorStops"},function(){return this.eg},function(a){Aa(this,a);v&&H(a,Ub,Ka,"colorStops");this.eg=a;this.fg=null});O(Ka,{pattern:"pattern"},function(){return this.ju},function(a){Aa(this,a);this.ju=a;this.fg=null}); +Ka.randomColor=function(a,b){void 0===a&&(a=128);v&&(J(a,Ka,"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 Im=za("canvas").getContext("2d"),Ia;Ka.isValidColor=Ia=function(a){if("black"===a)return!0;if(""===a)return!1;v&&I(a,"string",Ka,"isValidColor");Im.fillStyle="#000000";var b=Im.fillStyle;Im.fillStyle=a;if(Im.fillStyle!==b)return!0;Im.fillStyle="#FFFFFF";b=Im.fillStyle;Im.fillStyle=a;return Im.fillStyle!==b}; +function Y(){Jb(this);this.Y=30723;this.af=1;this.pg=null;this.Hb="";this.Ub=this.tb=null;this.Ba=(new K(NaN,NaN)).freeze();this.Ge=(new ib(NaN,NaN)).freeze();this.Oi=U.qm;this.Mi=U.Iz;this.Dc=new tb;this.qi=new tb;this.$j=new tb;this.Eb=this.tt=1;this.vm=0;this.gh=Jm;this.Yp=U.Ho;this.sc=(new x(NaN,NaN,NaN,NaN)).freeze();this.sb=(new x(NaN,NaN,NaN,NaN)).freeze();this.nc=(new x(0,0,NaN,NaN)).freeze();this.jr=this.np=this.J=this.Bq=this.Cq=null;this.kr=this.op=Infinity;this.No=this.Vd=we;this.Pq=0; +this.Ui=1;this.Uo=0;this.wi=1;this.Tq=-Infinity;this.Sq=0;this.Uq=U.xj;this.Vq=Pi;this.ap="";this.mc=this.I=null;this.xm=-1;this.ul=this.wh=this.Zk=this.vn=null}Y.ah=!0;Mb("GraphObject",Y); +Y.prototype.cloneProtected=function(a){a.Y=this.Y|6144;a.af=this.af;a.Hb=this.Hb;a.tb=this.tb;a.Ub=this.Ub;a.Ba.assign(this.Ba);a.Ge.assign(this.Ge);a.Oi=this.Oi.R();a.Mi=this.Mi.R();a.$j=this.$j.copy();a.Eb=this.Eb;a.vm=this.vm;a.gh=this.gh;a.Yp=this.Yp.R();a.sc.assign(this.sc);a.sb.assign(this.sb);a.nc.assign(this.nc);a.Bq=this.Bq;a.J=null!==this.J?this.J.copy():null;a.np=this.np;a.op=this.op;a.jr=this.jr;a.kr=this.kr;a.Vd=this.Vd.R();a.No=this.No.R();a.Pq=this.Pq;a.Ui=this.Ui;a.Uo=this.Uo;a.wi= +this.wi;a.Tq=this.Tq;a.Sq=this.Sq;a.Uq=this.Uq.R();a.Vq=this.Vq;a.ap=this.ap;a.I=null!==this.I?this.I.copy():null;a.mc=this.mc;a.xm=this.xm;if(null!==this.Zk){a.Zk=Sa(this.Zk);for(var b=0;bh;)h+=f[m++%k],n=!n;p=!1}else h=f[m++%k];h>l&&(h=l);var q=Math.sqrt(h*h/(1+e*e));0>d&&(q=-q);b+=q;c+=e*q;n?a.lineTo(b,c):a.moveTo(b,c);l-=h;n=!n}}Y.prototype.raiseChangedEvent=Y.prototype.kc=function(a,b,c,d,e,f,g){var h=this.L;null!==h&&(h.im(a,b,c,d,e,f,g),0!==(this.Y&1024)&&c===this&&a===cg&&Rm(this,h,b))}; +function Rm(a,b,c){var d=a.Sn();if(null!==d)for(var e=a.mc.i;e.next();){var f=e.value,g=null;if(null!==f.lm){g=bh(f,d,a);if(null===g)continue;f.Zv(a,g,c,null)}else if(f.Ls){var h=b.g;null!==h&&f.Zv(a,h.V.ms,c,h)}else{var k=d.data;if(null===k)continue;h=b.g;null!==h&&h.Wv||f.Zv(a,k,c,h)}null!==g&&(h=d.ev(f.Sk),null!==h&&f.qE(h,g,c))}}Y.prototype.ev=function(a){return this.xm===a?this:null};Y.prototype.raiseChanged=Y.prototype.h=function(a,b,c){this.kc(cg,a,this,b,c)}; +function Sm(a,b,c,d,e){var f=a.sc,g=a.$j;g.reset();Tm(a,g,b,c,d,e);a.$j=g;f.x=b;f.y=c;f.width=d;f.height=e;g.as()||g.nE(f)}function Um(a,b,c,d){if(!1===a.rf)return!1;d.multiply(a.transform);return c?a.Tf(b,d):a.Sl(b,d)} +Y.prototype.EC=function(a,b,c){if(!1===this.rf)return!1;var d=this.qa;b=a.mj(b);var e=!1;c&&(e=td(a.x,a.y,0,0,0,d.height)a&&(a+=360);return a}; +Y.prototype.getDocumentScale=Y.prototype.fi=function(){if(0!==(this.Y&4096)===!1)return this.tt;var a=this.Eb;return null!==this.H?a*this.H.fi():a};Y.prototype.getLocalPoint=Y.prototype.LC=function(a,b){void 0===b&&(b=new K);b.assign(a);this.df.mh(b);return b};Y.prototype.getNearestIntersectionPoint=Y.prototype.Ek=function(a,b,c){return this.Vn(a.x,a.y,b.x,b.y,c)};r=Y.prototype; +r.Vn=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.pk)return f=this.Q,U.Ek(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.k(0,0);d=this.qa;c=U.Ek(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; +function wj(a,b,c,d,e){if(!1!==gl(a)){var f=a.margin,g=f.right+f.left,f=f.top+f.bottom;b=Math.max(b-g,0);c=Math.max(c-f,0);e=e||0;d=Math.max((d||0)-g,0);e=Math.max(e-f,0);var g=a.angle,f=0,f=a.na,h=0;a.Ua&&(h=a.Ua);90===g||270===g?(b=isFinite(f.height)?f.height+h:b,c=isFinite(f.width)?f.width+h:c):(b=isFinite(f.width)?f.width+h:b,c=isFinite(f.height)?f.height+h:c);var f=d||0,h=e||0,k=a instanceof G;switch(Vm(a,!0)){case dj:h=f=0;k&&(c=b=Infinity);break;case kf:isFinite(b)&&b>d&&(f=b);isFinite(c)&& +c>e&&(h=c);break;case Lm:isFinite(b)&&b>d&&(f=b);h=0;k&&(c=Infinity);break;case Km:isFinite(c)&&c>e&&(h=c),f=0,k&&(b=Infinity)}var k=a.Pd,l=a.Se;f>k.width&&l.widthk.height&&l.heighta.height||this.Fi.pe>a.width))&&(c=!0);this.Y=c?this.Y|256:this.Y&-257;this.sb.v()||w("Non-real actualBounds has been set. Object "+ +this+", actualBounds: "+this.sb.toString());this.Fv(f,this.sb);pb(f)};r.Xh=function(){};function Wm(a,b,c,d,e){var f=a.Q;f.x=b;f.y=c;f.width=d;f.height=e;if(!a.na.v()){f=a.sc;c=a.margin;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=Vm(a,!0);c===d&&f===e&&(b=dj);switch(b){case dj:if(c>d||f>e)al(a,!0),wj(a,c>d?d:c,f>e?e:f);break;case kf:al(a,!0);wj(a,d,e,0,0);break;case Lm:al(a,!0);wj(a,d,f,0,0);break;case Km:al(a,!0),wj(a,c,e,0,0)}}} +r.Fv=function(){Xm(this,!1);var a=this.L;null!==a&&null!==a.g&&(a.Gk(),this.du(a),this.ea(),a=this.L,null!==a&&(a.km!==this&&a.GD!==this&&a.LD!==this||Ym(a,!0)))};r.du=function(a){null!==this.Kc&&Ym(a,!0)}; +r.we=function(a,b){if(this.visible){var c=this.opacity,d=1;if(1!==c){if(0===c)return;d=a.globalAlpha;a.globalAlpha=d*c}if(a instanceof Qe)a:{if(this.visible){var e=null,f=a.xv;if(this instanceof G&&(this.type===Zm||this.type===$m))an(this,a,b);else{var g=this.sb;if(0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y)){var h=this.transform,k=this.H;0!==(this.Y&4096)===!0&&bn(this);var l=0!==(this.Y&256),m=!1;this instanceof rc&&cn(this,a);if(l){m=k.uf()?k.qa:k.Q;if(this.wh)var n=this.wh,p=n.x,q=n.y, +s=n.width,n=n.height;else p=Math.max(g.x,m.x),q=Math.max(g.y,m.y),s=Math.min(g.right,m.right)-p,n=Math.min(g.bottom,m.bottom)-q;if(p>g.width+g.x||g.x>m.width+m.x||q>g.height+g.y||g.y>m.height+m.y)break a;m=!0;Se(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(p,q,s,n);a.clip()}p=!1;if(this instanceof A&&(p=!0,!this.ya()))break a;q=!1;s=b.$g;this.L&&s.drawShadows&&(q=this.L.qj);a.ci.Be=[1,0,0,1,0,0];null!==this.Ub&&(dn(this,a,this.Ub,!0,!0),this.Ub instanceof Ka&&this.Ub.type===ug?(a.beginPath(),a.rect(g.x, +g.y,g.width,g.height),en(a,this.Ub)):a.fillRect(g.x,g.y,g.width,g.height));p&&this.qj&&s.drawShadows&&(Se(a,1,0,0,1,0,0),g=this.Dl,a.shadowOffsetX=g.x,a.shadowOffsetY=g.y,a.shadowColor=this.Cl,a.shadowBlur=this.Bl/b.scale,a.Pa());this instanceof G?Se(a,h.m11,h.m12,h.m21,h.m22,h.dx,h.dy):a.ci.Be=[h.m11,h.m12,h.m21,h.m22,h.dx,h.dy];if(null!==this.tb){var n=this.qa,g=h=0,s=n.width,n=n.height,t=0;this instanceof pi&&(n=this.Fa.Ya,h=n.x,g=n.y,s=n.width,n=n.height,t=this.Hd);dn(this,a,this.tb,!0,!1);this.tb instanceof +Ka&&this.tb.type===ug?(a.beginPath(),a.rect(h-t/2,g-t/2,s+t,n+t),en(a,this.tb)):a.fillRect(h-t/2,g-t/2,s+t,n+t)}s=g=h=0;q&&(null!==this.tb||null!==this.Ub||null!==k&&0!==(k.Y&512)||null!==k&&k.type===Gk&&k.gf()!==this)?(fn(this,!0),h=a.shadowOffsetX,g=a.shadowOffsetY,s=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0):fn(this,!1);this.nj(a,b);q&&0!==(this.Y&512)===!0&&(a.shadowOffsetX=h,a.shadowOffsetY=g,a.shadowBlur=s);p&&q&&(a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0);l&& +(a.restore(),m&&a.Ne.pop(),da(b,a));this instanceof G&&(e=a.Ne.pop());p&&q&&a.Ne.pop();null!==a.zC&&(null===e&&(f===a.xv?(Se(a,1,0,0,1,0,0),e=a.Ne.pop()):e=a.xv),a.zC(this,e))}}}}else{if(this instanceof G&&(this.type===Zm||this.type===$m)){an(this,a,b);1!==c&&(a.globalAlpha=d);return}p=this.sb;if(0!==p.width&&0!==p.height&&!isNaN(p.x)&&!isNaN(p.y)){v&&v.Yh&&v.KF(a,this);e=this.transform;f=this.H;0!==(this.Y&4096)===!0&&bn(this);k=0!==(this.Y&256);this instanceof rc&&cn(this,a);if(k){v&&v.yC&&ba("clip"+ +this.toString());l=f.uf()?f.qa:f.Q;this.wh?(g=this.wh,m=g.x,q=g.y,h=g.width,g=g.height):(m=Math.max(p.x,l.x),q=Math.max(p.y,l.y),h=Math.min(p.right,l.right)-m,g=Math.min(p.bottom,l.bottom)-q);if(m>p.width+p.x||p.x>l.width+l.x||q>p.height+p.y||p.y>l.height+l.y){1!==c&&(a.globalAlpha=d);return}v&&v.yC&&v.MF(a,m,q,h,g);a.save();a.beginPath();a.rect(m,q,h,g);a.clip()}q=b.$g;l=!1;if(this instanceof A){l=!0;if(!this.ya()){1!==c&&(a.globalAlpha=d);return}this.qj&&q.drawShadows&&(m=this.Dl,a.shadowOffsetX= +m.x*b.scale*b.Zd,a.shadowOffsetY=m.y*b.scale*b.Zd,a.shadowColor=this.Cl,a.shadowBlur=this.Bl)}m=!1;this.L&&q.drawShadows&&(m=this.L.qj);null!==this.Ub&&(dn(this,a,this.Ub,!0,!0),this.Ub instanceof Ka&&this.Ub.type===ug?(a.beginPath(),a.rect(p.x,p.y,p.width,p.height),en(a,this.Ub)):a.fillRect(p.x,p.y,p.width,p.height));e.as()||a.transform(e.m11,e.m12,e.m21,e.m22,e.dx,e.dy);null!==this.tb&&(g=this.qa,q=p=0,h=g.width,g=g.height,s=0,this instanceof pi&&(g=this.Fa.Ya,p=g.x,q=g.y,h=g.width,g=g.height,s= +this.Hd),dn(this,a,this.tb,!0,!1),this.tb instanceof Ka&&this.tb.type===ug?(a.beginPath(),a.rect(p-s/2,q-s/2,h+s,g+s),en(a,this.tb)):a.fillRect(p-s/2,q-s/2,h+s,g+s));v&&v.Yh&&v.LF(a,this);h=q=p=0;m&&(null!==this.tb||null!==this.Ub||null!==f&&0!==(f.Y&512)||null!==f&&(f.type===Gk||f.type===bj)&&f.gf()!==this)?(fn(this,!0),p=a.shadowOffsetX,q=a.shadowOffsetY,h=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0):fn(this,!1);this.nj(a,b);m&&0!==(this.Y&512)===!0&&(a.shadowOffsetX=p,a.shadowOffsetY= +q,a.shadowBlur=h);l&&m&&(a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0);k?(a.restore(),this instanceof G?da(b,a,!0):da(b,a,!1)):e.as()||(f=1/(e.m11*e.m22-e.m12*e.m21),a.transform(e.m22*f,-e.m12*f,-e.m21*f,e.m11*f,f*(e.m21*e.dy-e.m22*e.dx),f*(e.m12*e.dx-e.m11*e.dy)))}}1!==c&&(a.globalAlpha=d)}}; +function an(a,b,c){var d=a.sb;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.Ub&&(dn(a,b,a.Ub,!0,!0),a.Ub instanceof Ka&&a.Ub.type===ug?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),en(b,a.Ub)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.tb&&(dn(a,b,a.tb,!0,!1),a.tb instanceof Ka&&a.tb.type===ug?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),en(b,a.tb)):b.fillRect(d.x,d.y,d.width,d.height)),a.nj(b,c))}r.nj=function(){}; +function en(a,b){if(b instanceof Ka&&b.type===ug&&!(a instanceof Qe)){var c=b.uw,d=b.tw;d>c?(a.scale(c/d,1),a.translate((d-c)/2,0)):c>d&&(a.scale(1,d/c),a.translate(0,(c-d)/2));a.Ts?a.clip():a.fill();d>c?(a.translate(-(d-c)/2,0),a.scale(1/(c/d),1)):c>d&&(a.translate(0,-(c-d)/2),a.scale(1,1/(d/c)))}else a.Ts?a.clip():a.fill()}function gn(a){a.Ts||a.stroke()} +function dn(a,b,c,d,e){if(null!==c){var f=1,g=1;if("string"===typeof c)d?b.Uk!==c&&(b.fillStyle=c,b.Uk=c):b.rm!==c&&(b.strokeStyle=c,b.rm=c);else if(c.type===sg)c=c.color,d?b.Uk!==c&&(b.fillStyle=c,b.Uk=c):b.rm!==c&&(b.strokeStyle=c,b.rm=c);else{var h,g=a.qa,f=g.width,g=g.height;if(e)var k=a.Q,f=k.width,g=k.height;var l=b instanceof CanvasRenderingContext2D;if(l&&(c.fg&&c.type===Hm||c.uw===f&&c.tw===g))h=c.fg;else{var m=k=0,n=0,p=0,q=0,s=0,s=q=0;e&&(k=a.Q,f=k.width,g=k.height,q=k.x,s=k.y);k=c.start.x* +f+c.start.offsetX;m=c.start.y*g+c.start.offsetY;n=c.end.x*f+c.end.offsetX;p=c.end.y*g+c.end.offsetY;k+=q;n+=q;m+=s;p+=s;c.type===tg?h=b.createLinearGradient(k,m,n,p):c.type===ug?(s=isNaN(c.Kr)?Math.max(f,g)/2:c.Kr,isNaN(c.Hs)?(q=0,s=Math.max(f,g)/2):q=c.Hs,h=b.createRadialGradient(k,m,q,n,p,s)):c.type===Hm?h=b.createPattern(c.pattern,"repeat"):Ca(c.type,"Brush type");if(c.type!==Hm&&(a=c.Dr,null!==a))for(a=a.i;a.next();)h.addColorStop(a.key,a.value);l&&(c.fg=h,c.uw=f,c.tw=g)}d?b.Uk!==h&&(b.fillStyle= +h,b.Uk=h):b.rm!==h&&(b.strokeStyle=h,b.rm=h)}}}Y.prototype.isContainedBy=Y.prototype.Hk=function(a){if(a instanceof G)a:{if(this!==a&&null!==a)for(var b=this.H;null!==b;){if(b===a){a=!0;break a}b=b.H}a=!1}else a=!1;return a};Y.prototype.isVisibleObject=Y.prototype.Kk=function(){if(!this.visible)return!1;var a=this.H;return null!==a?a.Kk():!0}; +function bn(a){if(0!==(a.Y&2048)===!0){var b=a.Dc;b.reset();if(!a.sb.v()||!a.sc.v()){hn(a,!1);return}b.translate(a.sb.x,a.sb.y);b.translate(-a.ta.x,-a.ta.y);var c=a.qa;Tm(a,b,c.x,c.y,c.width,c.height);hn(a,!1);jn(a,!0)}0!==(a.Y&4096)===!0&&(b=a.H,null===b?(a.qi.set(a.Dc),a.tt=a.scale,jn(a,!1)):null!==b.df&&(c=a.qi,c.reset(),b.uf()?c.multiply(b.qi):null!==b.H&&c.multiply(b.H.qi),c.multiply(a.Dc),a.tt=a.scale*b.tt,jn(a,!1)))} +function Tm(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var g=Rd;a.Ae&&a.Ae.Ic()&&(g=a.Ae);var h=db();if(a instanceof A&&a.Fb!==a)for(c=a.Fb,d=c.qa,h.Es(d.x,d.y,d.width,d.height,g),c.$j.Qa(h),h.offset(-c.ta.x,-c.ta.y),g=c.H;null!==g&&g!==a;)g.$j.Qa(h),h.offset(-g.ta.x,-g.ta.y),g=g.H;else h.Es(c,d,e,f,g);b.rotate(a.angle,h.x,h.y);fb(h)}}r=Y.prototype; +r.K=function(a){void 0===a&&(a=!1);if(!0!==gl(this)){al(this,!0);Xm(this,!0);var b=this.H;null!==b?a||b.K():(a=this.g,null!==a&&(a.zf.add(this),this instanceof D&&(a.aa.bb||this.Oe(),null!==this.Uc&&kn(this.Uc)),a.Ed(!0)));if(this instanceof G){if(this.W===Gk||this.W===Mi)a=this.gf(),null!==a&&a.K(!0);a=this.ja.l;for(var b=a.length,c=0;ca?a=0:1a||1=a&&w("GraphObject.scale must be greater than zero"),this.Eb=a,this.ig(),this.K(),this.h("scale",b,a))});O(Y,{angle:"angle"},function(){return this.vm},function(a){var b=this.vm;b!==a&&(v&&J(a,Y,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.vm=a,this.K(),this.ig(),this.h("angle",b,a)))}); +O(Y,{na:"desiredSize"},function(){return this.Ge},function(a){var b=this.Ge;b.C(a)||(v&&H(a,ib,Y,"desiredSize"),this.Ge=a=a.R(),this.K(),this instanceof pi&&this.Md(),this.h("desiredSize",b,a),a=this.L,null!==a&&0!==(this.Y&1024)&&(Rm(this,a,"width"),Rm(this,a,"height")))}); +O(Y,{width:"width"},function(){return this.Ge.width},function(a){if(this.Ge.width!==a){v&&I(a,"number",Y,"width");var b=this.Ge;this.Ge=a=(new ib(a,this.Ge.height)).freeze();this.K();this instanceof pi&&this.Md();this.h("desiredSize",b,a);b=this.L;null!==b&&0!==(this.Y&1024)&&Rm(this,b,"width")}}); +O(Y,{height:"height"},function(){return this.Ge.height},function(a){if(this.Ge.height!==a){v&&I(a,"number",Y,"height");var b=this.Ge;this.Ge=a=(new ib(this.Ge.width,a)).freeze();this.K();this instanceof pi&&this.Md();this.h("desiredSize",b,a);b=this.L;null!==b&&0!==(this.Y&1024)&&Rm(this,b,"height")}}); +O(Y,{Se:"minSize"},function(){return this.Oi},function(a){var b=this.Oi;b.C(a)||(v&&H(a,ib,Y,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.Oi=a,this.K(),this.h("minSize",b,a))});O(Y,{Pd:"maxSize"},function(){return this.Mi},function(a){var b=this.Mi;b.C(a)||(v&&H(a,ib,Y,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.Mi=a,this.K(),this.h("maxSize",b,a))});P(Y,{ta:"measuredBounds"},function(){return this.sc}); +P(Y,{qa:"naturalBounds"},function(){return this.nc},{configurable:!0});O(Y,{margin:"margin"},function(){return this.Yp},function(a){"number"===typeof a?a=new yd(a):v&&H(a,yd,Y,"margin");var b=this.Yp;b.C(a)||(this.Yp=a=a.R(),this.K(),this.h("margin",b,a))});P(Y,{transform:null},function(){0!==(this.Y&2048)===!0&&bn(this);return this.Dc});P(Y,{df:null},function(){0!==(this.Y&4096)===!0&&bn(this);return this.qi}); +O(Y,{alignment:"alignment"},function(){return this.Vd},function(a){var b=this.Vd;b.C(a)||(v&&H(a,V,Y,"alignment"),a.Od()&&!a.rc()&&w("alignment must be a real Spot or Spot.Default"),this.Vd=a=a.R(),kn(this),this.h("alignment",b,a))});O(Y,{column:"column"},function(){return this.Uo},function(a){v&&J(a,Y,"column");a=Math.round(a);var b=this.Uo;b!==a&&(0>a&&La(a,">= 0",Y,"column"),this.Uo=a,this.K(),this.h("column",b,a))}); +O(Y,{nF:"columnSpan"},function(){return this.wi},function(a){v&&I(a,"number",Y,"columnSpan");a=Math.round(a);var b=this.wi;b!==a&&(1>a&&La(a,">= 1",Y,"columnSpan"),this.wi=a,this.K(),this.h("columnSpan",b,a))});O(Y,{Pb:"row"},function(){return this.Pq},function(a){v&&J(a,Y,"row");a=Math.round(a);var b=this.Pq;b!==a&&(0>a&&La(a,">= 0",Y,"row"),this.Pq=a,this.K(),this.h("row",b,a))}); +O(Y,{rowSpan:"rowSpan"},function(){return this.Ui},function(a){v&&I(a,"number",Y,"rowSpan");a=Math.round(a);var b=this.Ui;b!==a&&(1>a&&La(a,">= 1",Y,"rowSpan"),this.Ui=a,this.K(),this.h("rowSpan",b,a))});O(Y,{ij:"alignmentFocus"},function(){return this.No},function(a){var b=this.No;b.C(a)||(v&&H(a,V,Y,"alignmentFocus"),a.Od()&&!a.rc()&&w("alignmentFocus must be a real Spot or Spot.Default"),this.No=a=a.R(),this.K(),this.h("alignmentFocus",b,a))}); +O(Y,{Kc:"portId"},function(){return this.Bq},function(a){var b=this.Bq;if(b!==a){v&&null!==a&&I(a,"string",Y,"portId");var c=this.L;null===c||c instanceof D||(w("portID being set on a Link: "+a),c=null);null!==b&&null!==c&&qn(c,this);this.Bq=a;if(null!==a&&c){c.Tg=!0;null===c.Qc&&rn(c);var d=this.Kc;null!==d&&c.Qc.add(d,this)}this.h("portId",b,a)}});function sn(a){var b={value:null};tn(a,b);return b.value}function tn(a,b){var c=a.H;return null===c||!tn(c,b)&&a.visible?(b.value=a,!1):!0} +function nn(a){var b=a.L;b instanceof D&&(a=a.g,null===a||a.aa.bb||b.Oe())}O(Y,{ib:"toSpot"},function(){return null!==this.J?this.J.ej:Md},function(a){null===this.J&&this.fe();var b=this.J.ej;b.C(a)||(v&&H(a,V,Y,"toSpot"),a=a.R(),this.J.ej=a,this.h("toSpot",b,a),nn(this))}); +O(Y,{Tk:"toEndSegmentLength"},function(){return null!==this.J?this.J.cj:10},function(a){null===this.J&&this.fe();var b=this.J.cj;b!==a&&(v&&I(a,"number",Y,"toEndSegmentLength"),0>a&&La(a,">= 0",Y,"toEndSegmentLength"),this.J.cj=a,this.h("toEndSegmentLength",b,a),nn(this))});O(Y,{Ks:"toEndSegmentDirection"},function(){return null!==this.J?this.J.bj:Pm},function(a){null===this.J&&this.fe();var b=this.J.bj;b!==a&&(v&&Ea(a,D,Y,"toEndSegmentDirection"),this.J.bj=a,this.h("toEndSegmentDirection",b,a),nn(this))}); +O(Y,{Ms:"toShortLength"},function(){return null!==this.J?this.J.dj:0},function(a){null===this.J&&this.fe();var b=this.J.dj;b!==a&&(v&&I(a,"number",Y,"toShortLength"),this.J.dj=a,this.h("toShortLength",b,a),nn(this))});O(Y,{fE:"toLinkable"},function(){return this.jr},function(a){var b=this.jr;b!==a&&(v&&null!==a&&I(a,"boolean",Y,"toLinkable"),this.jr=a,this.h("toLinkable",b,a))}); +O(Y,{GH:"toMaxLinks"},function(){return this.kr},function(a){var b=this.kr;b!==a&&(v&&I(a,"number",Y,"toMaxLinks"),0>a&&La(a,">= 0",Y,"toMaxLinks"),this.kr=a,this.h("toMaxLinks",b,a))});O(Y,{gb:"fromSpot"},function(){return null!==this.J?this.J.Di:Md},function(a){null===this.J&&this.fe();var b=this.J.Di;b.C(a)||(v&&H(a,V,Y,"fromSpot"),a=a.R(),this.J.Di=a,this.h("fromSpot",b,a),nn(this))}); +O(Y,{Ak:"fromEndSegmentLength"},function(){return null!==this.J?this.J.Bi:10},function(a){null===this.J&&this.fe();var b=this.J.Bi;b!==a&&(v&&I(a,"number",Y,"fromEndSegmentLength"),0>a&&La(a,">= 0",Y,"fromEndSegmentLength"),this.J.Bi=a,this.h("fromEndSegmentLength",b,a),nn(this))}); +O(Y,{Tr:"fromEndSegmentDirection"},function(){return null!==this.J?this.J.Ai:Pm},function(a){null===this.J&&this.fe();var b=this.J.Ai;b!==a&&(v&&Ea(a,D,Y,"fromEndSegmentDirection"),this.J.Ai=a,this.h("fromEndSegmentDirection",b,a),nn(this))});O(Y,{Ur:"fromShortLength"},function(){return null!==this.J?this.J.Ci:0},function(a){null===this.J&&this.fe();var b=this.J.Ci;b!==a&&(v&&I(a,"number",Y,"fromShortLength"),this.J.Ci=a,this.h("fromShortLength",b,a),nn(this))}); +O(Y,{HC:"fromLinkable"},function(){return this.np},function(a){var b=this.np;b!==a&&(v&&null!==a&&I(a,"boolean",Y,"fromLinkable"),this.np=a,this.h("fromLinkable",b,a))});O(Y,{XF:"fromMaxLinks"},function(){return this.op},function(a){var b=this.op;b!==a&&(v&&I(a,"number",Y,"fromMaxLinks"),0>a&&La(a,">= 0",Y,"fromMaxLinks"),this.op=a,this.h("fromMaxLinks",b,a))});O(Y,{cursor:"cursor"},function(){return this.ap},function(a){var b=this.ap;b!==a&&(I(a,"string",Y,"cursor"),this.ap=a,this.h("cursor",b,a))}); +O(Y,{click:"click"},function(){return null!==this.I?this.I.vh:null},function(a){null===this.I&&Mm(this);var b=this.I.vh;b!==a&&(null!==a&&I(a,"function",Y,"click"),this.I.vh=a,this.h("click",b,a))});O(Y,{Jr:"doubleClick"},function(){return null!==this.I?this.I.Ch:null},function(a){null===this.I&&Mm(this);var b=this.I.Ch;b!==a&&(null!==a&&I(a,"function",Y,"doubleClick"),this.I.Ch=a,this.h("doubleClick",b,a))}); +O(Y,{ay:"contextClick"},function(){return null!==this.I?this.I.xh:null},function(a){null===this.I&&Mm(this);var b=this.I.xh;b!==a&&(null!==a&&I(a,"function",Y,"contextClick"),this.I.xh=a,this.h("contextClick",b,a))});O(Y,{jD:"mouseEnter"},function(){return null!==this.I?this.I.iq:null},function(a){null===this.I&&Mm(this);var b=this.I.iq;b!==a&&(null!==a&&I(a,"function",Y,"mouseEnter"),this.I.iq=a,this.h("mouseEnter",b,a))}); +O(Y,{kD:"mouseLeave"},function(){return null!==this.I?this.I.jq:null},function(a){null===this.I&&Mm(this);var b=this.I.jq;b!==a&&(null!==a&&I(a,"function",Y,"mouseLeave"),this.I.jq=a,this.h("mouseLeave",b,a))});O(Y,{Qy:"mouseOver"},function(){return null!==this.I?this.I.Mh:null},function(a){null===this.I&&Mm(this);var b=this.I.Mh;b!==a&&(null!==a&&I(a,"function",Y,"mouseOver"),this.I.Mh=a,this.h("mouseOver",b,a))}); +O(Y,{Py:"mouseHover"},function(){return null!==this.I?this.I.Lh:null},function(a){null===this.I&&Mm(this);var b=this.I.Lh;b!==a&&(null!==a&&I(a,"function",Y,"mouseHover"),this.I.Lh=a,this.h("mouseHover",b,a))});O(Y,{Oy:"mouseHold"},function(){return null!==this.I?this.I.Kh:null},function(a){null===this.I&&Mm(this);var b=this.I.Kh;b!==a&&(null!==a&&I(a,"function",Y,"mouseHold"),this.I.Kh=a,this.h("mouseHold",b,a))}); +O(Y,{RG:"mouseDragEnter"},function(){return null!==this.I?this.I.gq:null},function(a){null===this.I&&Mm(this);var b=this.I.gq;b!==a&&(null!==a&&I(a,"function",Y,"mouseDragEnter"),this.I.gq=a,this.h("mouseDragEnter",b,a))});O(Y,{SG:"mouseDragLeave"},function(){return null!==this.I?this.I.hq:null},function(a){null===this.I&&Mm(this);var b=this.I.hq;b!==a&&(null!==a&&I(a,"function",Y,"mouseDragLeave"),this.I.hq=a,this.h("mouseDragLeave",b,a))}); +O(Y,{Ny:"mouseDrop"},function(){return null!==this.I?this.I.Jh:null},function(a){null===this.I&&Mm(this);var b=this.I.Jh;b!==a&&(null!==a&&I(a,"function",Y,"mouseDrop"),this.I.Jh=a,this.h("mouseDrop",b,a))});O(Y,{QB:"actionDown"},function(){return null!==this.I?this.I.Jo:null},function(a){null===this.I&&Mm(this);var b=this.I.Jo;b!==a&&(null!==a&&I(a,"function",Y,"actionDown"),this.I.Jo=a,this.h("actionDown",b,a))}); +O(Y,{RB:"actionMove"},function(){return null!==this.I?this.I.Ko:null},function(a){null===this.I&&Mm(this);var b=this.I.Ko;b!==a&&(null!==a&&I(a,"function",Y,"actionMove"),this.I.Ko=a,this.h("actionMove",b,a))});O(Y,{SB:"actionUp"},function(){return null!==this.I?this.I.Lo:null},function(a){null===this.I&&Mm(this);var b=this.I.Lo;b!==a&&(null!==a&&I(a,"function",Y,"actionUp"),this.I.Lo=a,this.h("actionUp",b,a))}); +O(Y,{PB:"actionCancel"},function(){return null!==this.I?this.I.Io:null},function(a){null===this.I&&Mm(this);var b=this.I.Io;b!==a&&(null!==a&&I(a,"function",Y,"actionCancel"),this.I.Io=a,this.h("actionCancel",b,a))});O(Y,{wz:"toolTip"},function(){return null!==this.I?this.I.Th:null},function(a){null===this.I&&Mm(this);var b=this.I.Th;b!==a&&(null!==a&&H(a,ea,Y,"toolTip"),this.I.Th=a,this.h("toolTip",b,a))}); +O(Y,{contextMenu:"contextMenu"},function(){return null!==this.I?this.I.yh:null},function(a){null===this.I&&Mm(this);var b=this.I.yh;b!==a&&(null!==a&&H(a,ea,Y,"contextMenu"),this.I.yh=a,this.h("contextMenu",b,a))});Y.prototype.bind=Y.prototype.bind=function(a){a.If=this;var b=this.Sn();null!==b&&un(b)&&w("Cannot add a Binding to a template that has already been copied: "+a);null===this.mc&&(this.mc=new S(Zg));this.mc.add(a)}; +Y.prototype.findTemplateBinder=Y.prototype.Sn=function(){for(var a=this instanceof G?this:this.H;null!==a;){if(null!==a.Wk)return a;a=a.H}return null};Y.fromSvg=Y.fromSVG=function(a){return vn(a)};Y.prototype.setProperties=function(a){Xb(this,a)};var wn; +Y.make=wn=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var f=xn.ma(a);"function"===typeof f?(c=Sa(arguments),d=f(c)):e=aa[a]}null===d&&(void 0===e&&(d=window.$,void 0!==d&&void 0!==d.noop&&w("GraphObject.make failed to complete. Is it conflicting with another $ var? (such as jQuery)"),w("GraphObject.make failed to complete, it may be conflicting with another var.")),null!==e&&e.constructor||w("GraphObject.make requires a class function or class name, not: "+ +a),d=new e);f=1;if(d instanceof y&&1e)&&w("Must specify non-negative integer row for RowColumnDefinition "+ +b),a.Cd=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&w("Must specify non-negative integer column for RowColumnDefinition "+b),a.Cd=!1,a.index=e);e=new dc;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Xb(a,e)}else Xb(a,b);else w('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var xn=new Ub("string","function"); +Y.getBuilders=function(){var a=new Ub("string","function"),b;for(b in xn)if(b!==b.toLowerCase()){var c=xn[b];"function"===typeof c&&a.add(b,c)}a.freeze();return a};var ko;Y.defineBuilder=ko=function(a,b){I(a,"string",Y,"defineBuilder:name");I(b,"function",Y,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||w("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);xn.add(a,b)}; +ko("Button",function(){var a=new Ka(tg);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new Ka(tg);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=wn(G,Gk,{nv:!0},{_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue"},wn(pi,{name:"ButtonBorder",ob:"Rectangle",o:new V(0,0,2.761423749153968,2.761423749153968),p:new V(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.jD=function(a,b){var e=b.Ld("ButtonBorder");if(e instanceof +pi){var f=b._buttonFillOver;b._buttonFillNormal=e.fill;e.fill=f;f=b._buttonStrokeOver;b._buttonStrokeNormal=e.stroke;e.stroke=f}};a.kD=function(a,b){var e=b.Ld("ButtonBorder");e instanceof pi&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)};return a}); +ko("TreeExpanderButton",function(){var a=wn("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},wn(pi,{name:"ButtonIcon",ob:"MinusLine",na:U.Go},(new Zg("figure","isTreeExpanded",function(a,c){var d=c.H;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).Ev()),{visible:!1},(new Zg("visible","isTreeLeaf",function(a){return!a})).Ev());a.click=function(a,c){var d=c.L;d instanceof ea&&(d=d.jh);if(d instanceof D){var e=d.g;if(null!==e){e=e.nb;if(d.wc){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; +a.vc=!0;d.wc?e.collapseTree(d):e.expandTree(d)}}};return a}); +ko("SubGraphExpanderButton",function(){var a=wn("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},wn(pi,{name:"ButtonIcon",ob:"MinusLine",na:U.Go},(new Zg("figure","isSubGraphExpanded",function(a,c){var d=c.H;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).Ev()));a.click=function(a,c){var d=c.L;d instanceof ea&&(d=d.jh);if(d instanceof ka){var e=d.g;if(null!==e){e=e.nb;if(d.Dd){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.vc= +!0;d.Dd?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});ko("ContextMenuButton",function(){var a=wn("Button");a.stretch=Lm;var b=a.Ld("ButtonBorder");b instanceof pi&&(b.ob="Rectangle",b.o=new V(0,0,2,3),b.p=new V(1,1,-2,-2));return a}); +ko("PanelExpanderButton",function(a){var b="COLLAPSIBLE";"string"===typeof a[1]&&(b=a[1],a.splice(1,1));a=wn("Button",wn(pi,"TriangleUp",{na:new ib(6,4)},(new Zg("figure","visible",function(a){return a?"TriangleUp":"TriangleDown"})).Ev(b)));var c=a.Ld("ButtonBorder");c instanceof pi&&(c.stroke=null,c.fill="transparent");a.click=function(a,c){var f=c.g;if(null!==f){var g=c.L.Ld(b);null!==g&&(f.Jb("Collapse/Expand Panel"),g.visible=!g.visible,f.xd("Collapse/Expand Panel"))}};return a}); +function Nm(){this.yh=this.Th=this.Io=this.Lo=this.Ko=this.Jo=this.Jh=this.hq=this.gq=this.Kh=this.Lh=this.Mh=this.jq=this.iq=this.xh=this.Ch=this.vh=null}Nm.prototype.copy=function(){var a=new Nm;a.vh=this.vh;a.Ch=this.Ch;a.xh=this.xh;a.iq=this.iq;a.jq=this.jq;a.Mh=this.Mh;a.Lh=this.Lh;a.Kh=this.Kh;a.gq=this.gq;a.hq=this.hq;a.Jh=this.Jh;a.Jo=this.Jo;a.Ko=this.Ko;a.Lo=this.Lo;a.Io=this.Io;a.Th=this.Th;a.yh=this.yh;return a}; +function G(a){Y.call(this);void 0===a?0===arguments.length?this.W=ij:w("invalid argument to Panel constructor: undefined"):(Ea(a,G,G,"type"),this.W=a);this.ja=new S(Y);this.qe=U.Ho;this.jg=!1;this.W===Jk&&(this.jg=!0);this.yp=!1;this.dp=we;this.Bh=Jm;this.W===ga&&lo(this);this.Bn=fj;this.rp=(new ib(10,10)).freeze();this.sp=U.xj;this.Wk=this.Ng=null;this.Mp=NaN;this.Bf=this.Gh=null;this.en="category";this.Af=null;this.Vh=new x(NaN,NaN,NaN,NaN);this.Gl=null;this.Tg=!1;this.Qq=null}Nb(G,Y);G.ah=!0; +Mb("Panel",G);function lo(a){a.xi=U.Ho;a.Qg=1;a.Ah=null;a.al=null;a.Pg=1;a.Og=null;a.$k=null;a.cd=[];a.Wc=[];a.zl=mo;a.Yk=mo;a.Uh=0;a.Hh=0} +G.prototype.cloneProtected=function(a){Y.prototype.cloneProtected.call(this,a);a.W=this.W;a.qe=this.qe.R();a.jg=this.jg;a.yp=this.yp;a.dp=this.dp.R();a.Bh=this.Bh;if(a.W===ga){a.xi=this.xi.R();a.Qg=this.Qg;a.Ah=this.Ah;a.al=this.al;a.Pg=this.Pg;a.Og=this.Og;a.$k=this.$k;var b=[];if(0a&&La(a,">= 0",G,"padding"),a=new yd(a)):(H(a,yd,G,"padding"),0>a.left&&La(a.left,">= 0",G,"padding:value.left"),0>a.right&&La(a.right,">= 0",G,"padding:value.right"),0>a.top&&La(a.top,">= 0",G,"padding:value.top"),0>a.bottom&&La(a.bottom,">= 0",G,"padding:value.bottom"));var b=this.qe;b.C(a)||(this.qe=a=a.R(),this.K(),this.h("padding",b,a))}); +O(G,{uk:"defaultAlignment"},function(){return this.dp},function(a){var b=this.dp;b.C(a)||(v&&H(a,V,G,"defaultAlignment"),this.dp=a=a.R(),this.K(),this.h("defaultAlignment",b,a))});O(G,{fd:"defaultStretch"},function(){return this.Bh},function(a){var b=this.Bh;b!==a&&(Ea(a,Y,G,"defaultStretch"),this.Bh=a,this.K(),this.h("defaultStretch",b,a))}); +O(G,{xI:"defaultSeparatorPadding"},function(){return void 0===this.xi?U.Ho:this.xi},function(a){if(void 0!==this.xi){"number"===typeof a?a=new yd(a):v&&H(a,yd,G,"defaultSeparatorPadding");var b=this.xi;b.C(a)||(this.xi=a=a.R(),this.h("defaultSeparatorPadding",b,a))}}); +O(G,{vI:"defaultRowSeparatorStroke"},function(){return void 0===this.Ah?null:this.Ah},function(a){var b=this.Ah;b!==a&&(null===a||"string"===typeof a||a instanceof Ka)&&(a instanceof Ka&&a.freeze(),this.Ah=a,this.h("defaultRowSeparatorStroke",b,a))});O(G,{wI:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.Qg?1:this.Qg},function(a){if(void 0!==this.Qg){var b=this.Qg;b!==a&&isFinite(a)&&0<=a&&(this.Qg=a,this.h("defaultRowSeparatorStrokeWidth",b,a))}}); +O(G,{uI:"defaultRowSeparatorDashArray"},function(){return void 0===this.al?null:this.al},function(a){if(void 0!==this.al){var b=this.al;if(b!==a){null===a||Array.isArray(a)||Ca(a,"Array",G,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.jv,e=d.width,d=d.height,f=this.qa,g=f.width,f=f.height,h=Math.ceil(g/e),k=Math.ceil(f/d),l=this.NC;a.save();a.beginPath();a.rect(0,0,g,f);a.clip();for(var m=[],n=this.ja.l,p=n.length,q=0;qe*s*c))break}a.stroke()}else if("LineH"===C.ob){a.lineWidth= +C.Ua;dn(this,a,C.stroke,!1,!1);a.beginPath();for(Q=z=Math.floor(-l.y/d);Q<=z+k&&!(M=Q*d+l.y,0<=M&&M<=f&&no(Q,s,t)&&(u&&!B?Qm(a,0,M,g,M,F,C.Cc):(a.moveTo(0,M),a.lineTo(g,M)),2>d*s*c));Q++);a.stroke()}else if("BarV"===C.ob)for(dn(this,a,C.fill,!0,!1),C=C.width,isNaN(C)&&(C=e),Q=z=Math.floor(-l.x/e);Q<=z+h&&!(M=Q*e+l.x,0<=M&&Me*s*c));Q++);else if("BarH"===C.ob)for(dn(this,a,C.fill,!0,!1),C=C.height,isNaN(C)&&(C=d),Q=z=Math.floor(-l.y/d);Q<=z+k&&!(M=Q*d+l.y,0<=M&& +M<=f&&no(Q,s,t)&&(a.fillRect(0,M,g,C),2>d*s*c));Q++);u&&(void 0!==a.setLineDash?(a.setLineDash(Bb),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=Bb,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0))}}a.restore();da(b,a,!1)}else{this.W===ga&&(a.lineCap="butt",oo(this,a,!0,this.cd,!0),oo(this,a,!1,this.Wc,!0),po(this,a,!0,this.cd),po(this,a,!1,this.Wc),oo(this,a,!0,this.cd,!1),oo(this,a,!1,this.Wc,!1));(c=this.XC)&&a.save();e=this.gf();d=this.ja.l;g= +d.length;for(f=0;ff.height&&(l-=q-f.height):q>f.width&&(l-=q-f.width);k=k.position+l/2;b.lineWidth=l;q=a.padding;c?(k+=q.top,l=q.left,q=f.width-q.right,m&&!n?Qm(b,l,k,q,k,p,0):(b.moveTo(l,k),b.lineTo(q,k))):(k+=q.left,l=q.top,q=f.height-q.bottom,m&&!n?Qm(b,k,l,k,q,p,0):(b.moveTo(k,l),b.lineTo(k,q)));b.stroke();m&&(void 0!==b.setLineDash?(b.setLineDash(Bb),b.lineDashOffset=0):void 0!==b.webkitLineDash?(b.webkitLineDash=Bb,b.webkitLineDashOffset=0):void 0!==b.mozDash&&(b.mozDash=null,b.mozDashOffset=0))}}}} +function oo(a,b,c,d,e){for(var f=d.length,g=a.Q,h=0;hl)){var m=k.Of(),n=k.yo;isNaN(n)&&(n=c?a.Qg:a.Pg);var p=k.xo;null===p&&(p=c?a.Ah:a.Og);null===p&&(n=0);m-=n;n=k.position+n;m+=k.Ga;n+m>l&&(m=l-n);0>=m||(l=a.padding,dn(a,b,k.background,!0,!1),c?b.fillRect(l.left,n+l.top,g.width-(l.left+l.right),m):b.fillRect(n+l.left,l.top,m,g.height-(l.top+l.bottom)))}}}} +function no(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dae&&(jd=ae),pa.Ga+=jd,ae=Math.max(ae-jd,0));1!==wa.wi||Ie!==dj&&Ie!==Km||(pa=this.Gc(Cd),jd=Math.max(Rf-pa.Ga,0),jd>id&&(jd=id),pa.Ga+=jd,id=Math.max(id-jd,0));mh&&wa.Zn()}}}zb(Ph);for(var Yc=0,Je=0,ab=this.Er,ra=0;ra=this.As);vc++)pa=this.Hc(wa.Pb+vc),vf.height+=Math.max(pa.ji,isNaN(pa.re)?pa.mf:Math.min(pa.re, +pa.mf));for(vc=1;vc=this.Er);vc++)pa=this.Gc(wa.column+vc),vf.width+=Math.max(pa.ji,isNaN(pa.re)?pa.mf:Math.min(pa.re,pa.mf));Sb.width+=vf.width;Sb.height+=vf.height;uc=wa.margin;Lg=uc.right+uc.left;Mg=uc.top+uc.bottom;wj(wa,Sb.width,Sb.height,In,Ij);for(var uf=wa.ta,Rf=Math.max(uf.width+Lg,0),ne=Math.max(uf.height+Mg,0),Ai=0,vc=0;vc=this.As);vc++)pa=this.Hc(wa.Pb+vc),Ai+=pa.total||0;if(Ai +pe&&(pa.Ga=Math.min(pa.mf,pe+oe),pa.jb!==pe&&(oe-=pa.jb-pe));if(-1===pa.index-1)break;pa=this.Hc(pa.index-1)}for(var Ng=0,vc=0;vc=this.Er);vc++)pa=this.Gc(wa.column+vc),Ng+=pa.total||0;if(Ngpe&&(pa.Ga=Math.min(pa.mf,pe+oe),pa.jb!==pe&&(oe-=pa.jb-pe));if(-1===pa.index-1)break;pa=this.Gc(pa.index-1)}}zb(Dd);kb(vf);kb(Sb);for(var Og=0,Sf=0,Ie=Vm(this,!0),qe=this.na,Pg=this.Pd,bf=Je=Yc=0,be=0,ab=this.Er,ra=0;raCi)wj(wc,Infinity,Infinity),Ke=wc.ta,xf.sh(Ke),this.vi.add(Ke);else{var Sg=wc.sf,qr=wc.Ov,Ln=wc.ij;Ln.Od()&&(Ln=Rd);var Pj=wc.Pv,yt=wc.RD,Qj=0,Rj=0,tl=0;if(Sg<-Ci||Sg>=Ci){var rr=ph.hD,Sj=ph.gD;Pj!==Pi&&(tl=ph.computeAngle(wc,Pj,Sj),wc.angle=tl);Qj=rr.x-Tf.x;Rj=rr.y-Tf.y}else{var mg,Ei;if(0<=Sg)mg=Nj.Z(Sg),Ei=Sgc||n>d)this.K(),wj(this,m>c?c:m,n>d?d:n);break;case kf:this.K(!0);wj(this,c+q,d+s,0,0);break;case Lm:this.K(!0);wj(this,c+q,n+s,0,0);break;case Km:this.K(!0),wj(this,m+q,d+s,0,0)}}h=this.Q;h.x=a;h.y=b;h.width= +c;h.height=d;var t=this.W.Hb;switch(t){case "Position":for(var u=f.length,z=e.x-this.padding.left,C=e.y-this.padding.top,B=0;B=this.As);ra++){var wa=this.Hc(Rb+ra);Zd.height+=wa.total}for(ra=1;ra=this.Er);ra++){var Bd=this.Gc(Fe+ra);Zd.width+=Bd.total}var Oh=Ge.jb+Zd.width,xi=Ad.jb+Zd.height;g.x=zd;g.y=qd;g.width=Oh;g.height=xi;var Cd=zd,yi=qd,Cc=Oh,Ph=xi;zd+Oh>e.width&&(Cc=Math.max(e.width-zd,0));qd+xi>e.height&&(Ph=Math.max(e.height-qd,0));var Dd=ab.alignment,Ye=0,rd=0,$d=0,id=0;if(Dd.rc()){Dd=this.uk;Dd.Ic()|| +(Dd=Rd);var Ye=Dd.x,rd=Dd.y,$d=Dd.offsetX,id=Dd.offsetY,ae=Ge.alignment,Jg=Ad.alignment;ae.Ic()&&(Ye=ae.x,$d=ae.offsetX);Jg.Ic()&&(rd=Jg.y,id=Jg.offsetY)}else Ye=Dd.x,rd=Dd.y,$d=Dd.offsetX,id=Dd.offsetY;if(isNaN(Ye)||isNaN(rd))rd=Ye=.5,id=$d=0;var pa=sf.width,Ze=sf.height,tf=ab.margin,il=tf.left+tf.right,jl=tf.top+tf.bottom,jd=ln(ab,Ad,Ge,!1);!isNaN(ab.na.width)||jd!==kf&&jd!==Lm||(pa=Math.max(Oh-il,0));!isNaN(ab.na.height)||jd!==kf&&jd!==Km||(Ze=Math.max(xi-jl,0));var Hb=ab.Pd,Ib=ab.Se,pa=Math.min(Hb.width, +pa),Ze=Math.min(Hb.height,Ze),pa=Math.max(Ib.width,pa),Ze=Math.max(Ib.height,Ze),kl=Ze+jl;g.x+=g.width*Ye-(pa+il)*Ye+$d+tf.left;g.y+=g.height*rd-kl*rd+id+tf.top;ab.visible&&(Hd(Cd,yi,Cc,Ph,g.x,g.y,sf.width,sf.height)?ab.ec(g.x,g.y,pa,Ze):ab.ec(g.x,g.y,pa,Ze,new x(Cd,yi,Cc,Ph)))}else{ab.ig();ab.sb.Ca();var Kg=ab.sb;Kg.x=He.type===Zm?Nh:zd;Kg.y=He.type===$m?Ig:qd;Kg.width=sf.width;Kg.height=sf.height;ab.sb.freeze();Xm(ab,!1)}}kb(Zd);for(Rb=0;Rb=Sb){var Og=this.hD,Sf=this.gD;vc!==Pi&&(Ng=this.computeAngle(kd,vc,Sf),kd.angle=Ng);oe=Og.x;pe=Og.y}else{var qe=void 0,Pg=void 0;if(0<=sd)qe=af.l[sd],Pg=sdn.width||m.y>n.height||0>m.x+m.width||0>m.y+m.height)){m=l;l=l instanceof G?l:null;n=rb();n.set(g);if(null!==l?l.oj(a,b,c,d,e,n):Um(m,a,d,n))null!==b&& +(m=b(m)),null===m||null!==c&&!c(m)||e.add(m);ub(n)}}}void 0===f&&ub(g);return d}void 0===f&&ub(g);return!1};function Ao(a,b,c,d){for(var e=a.ja.l,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.Q,k=a.qa;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof G&&Ao(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +r.Yl=function(a,b,c,d,e,f){if(!1===this.rf)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.qa,h=this.uf(),k=h?a:nd(eb(a.x,a.y),this.transform),l=h?b:nd(eb(b.x,b.y),this.transform),m=k.mj(l),n=0s.width||q.y>s.height||0>q.x+q.width||0>q.y+q.height||(p.uf()?(q=p.transform,nd(h.set(a),q),nd(k.set(b),q)):(h.set(a),k.set(b)),q=p,p=p instanceof G?p:null,null!==p?!p.Yl(h,k,c,d,e,f):!q.EC(h,k,e))||(null!==c&&(q=c(q)),null===q||null!==d&&!d(q)||f.add(q))}}fb(h);fb(k)}return e?n:g}return!1}; +function qo(a){var b=a.o;if(void 0===b||b===we)b=null;null===b&&a instanceof pi&&(a=a.Fa,null!==a&&(b=a.o));null===b&&(b=Nd);return b}function ro(a){var b=a.p;if(void 0===b||b===we)b=null;null===b&&a instanceof pi&&(a=a.Fa,null!==a&&(b=a.p));null===b&&(b=ce);return b}G.prototype.add=G.prototype.add=function(a){H(a,Y,G,"add:element");this.zd(this.ja.count,a)};G.prototype.elt=G.prototype.Z=function(a){return this.ja.Z(a)}; +G.prototype.insertAt=G.prototype.zd=function(a,b){b instanceof A&&w("Cannot add a Part to a Panel: "+b);if(this===b||this.Hk(b))this===b&&w("Cannot make a Panel contain itself: "+this.toString()),w("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.H;null!==c&&c!==this&&w("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.W!==Jk||b instanceof pi||w("Can only add Shapes to a Grid Panel, not: "+b);b.Pk(this);b.ul=null;if(null!==this.cs){var d=b.data;null!==d&&"object"===typeof d&&(null===this.Af&&(this.Af=new Ub(Object,G)),this.Af.add(d,b))}var e=this.ja,d=-1;if(c===this){for(var f=-1,g=this.ja.l,h=g.length,k=0;k=e.count&&a>=e.count)return;e.Lc(f);d=f}else w("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0> +a||a>e.count)a=e.count;e.zd(a,b);this.K();b.K();null!==b.Kc?this.Tg=!0:b instanceof G&&!0===b.Tg&&(this.Tg=!0);c=this.L;null!==c&&(c.ck=null,c.Li=NaN,this.Tg&&c instanceof D&&(c.Tg=!0),c.Tg&&(c.Qc=null),e=this.g,null!==e&&e.aa.bb||(-1!==d&&c.kc(fg,"elements",this,b,null,d,null),c.kc(eg,"elements",this,null,b,null,a)))};G.prototype.remove=G.prototype.remove=function(a){H(a,Y,G,"remove:element");for(var b=this.ja.l,c=b.length,d=-1,e=0;ea&&La(a,">= 0",G,"getRowDefinition:idx");a=Math.round(a);var b=this.cd;if(void 0===b[a]){var c=new Vg;c.Pk(this);c.Cd=!0;c.index=a;b[a]=c}return b[a]};G.prototype.removeRowDefinition=G.prototype.AD=function(a){v&&J(a,G,"removeRowDefinition:idx");0>a&&La(a,">= 0",G,"removeRowDefinition:idx");a=Math.round(a);var b=this.cd;this.kc(fg,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.K()}; +P(G,{Er:"columnCount"},function(){return void 0===this.Wc?0:this.Wc.length});G.prototype.getColumnDefinition=G.prototype.Gc=function(a){v&&J(a,G,"getColumnDefinition:idx");0>a&&La(a,">= 0",G,"getColumnDefinition:idx");a=Math.round(a);var b=this.Wc;if(void 0===b[a]){var c=new Vg;c.Pk(this);c.Cd=!1;c.index=a;b[a]=c}return b[a]}; +G.prototype.removeColumnDefinition=G.prototype.wD=function(a){v&&J(a,G,"removeColumnDefinition:idx");0>a&&La(a,">= 0",G,"removeColumnDefinition:idx");a=Math.round(a);var b=this.Wc;this.kc(fg,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.K()}; +O(G,{lH:"rowSizing"},function(){return void 0===this.zl?mo:this.zl},function(a){if(void 0!==this.zl){var b=this.zl;b!==a&&(a!==mo&&a!==to&&w("rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"),this.zl=a,this.K(),this.h("rowSizing",b,a))}}); +O(G,{mF:"columnSizing"},function(){return void 0===this.Yk?mo:this.Yk},function(a){if(void 0!==this.Yk){var b=this.Yk;b!==a&&(a!==mo&&a!==to&&w("columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"),this.Yk=a,this.K(),this.h("columnSizing",b,a))}}); +O(G,{hE:"topIndex"},function(){return void 0===this.Uh?0:this.Uh},function(a){if(void 0!==this.Uh){var b=this.Uh;b!==a&&((!isFinite(a)||0>a)&&w("topIndex must be greater than zero and a real number. Was "+a),this.Uh=a,this.K(),this.h("topIndex",b,a))}}); +O(G,{cD:"leftIndex"},function(){return void 0===this.Hh?0:this.Hh},function(a){if(void 0!==this.Hh){var b=this.Hh;b!==a&&((!isFinite(a)||0>a)&&w("leftIndex must be greater than zero and a real number. Was "+a),this.Hh=a,this.K(),this.h("leftIndex",b,a))}});G.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==ga)return NaN;for(var b=0,c=this.cd,d=c.length,e=this.Uh;ea)return-1;if(this.type!==ga)return NaN;for(var b=0,c=this.Wc,d=c.length,e=this.Hh;e=c.elements.count&&!(c instanceof A)){if(1===c.elements.count){var d=null!==c.cs;if(!d)for(var e=b.i;e.next();)if("itemArray"===e.value.Js){d=!0;break}}d||(ba("Auto or Spot Panel should not have zero or one elements: "+ +c.toString()+" in "+a.toString()),Bo=!0)}}))}var Bo=!1; +G.prototype.updateTargetBindings=G.prototype.zb=function(a){var b=this.Wk;if(null!==b)for(void 0===a&&(a=""),b=b.i;b.next();){var c=b.value,d=c.bE;if(""===a||""===d||d===a)if(d=c.Js,null!==c.sF||""!==d){var d=this.data,e=c.lm;if(null!==e)d=""===e?this:"."===e?this:".."===e?this:this.Ld(e);else{var f=this.g;null!==f&&c.Ls&&(d=f.V.ms)}if(null===d)v&&ba("Binding error: missing GraphObject named "+e+" in "+this.toString());else{var f=this,g=c.Sk;if(-1!==g){if(f=this.ev(g),null===f)continue}else null!== +c.If&&(f=c.If);"."===e?d=f:".."===e&&(d=f.H);e=c.Ix;if(0!==e){if(!(f instanceof G))continue;g=f;1===e?f=g.Gc(c.zu):2===e&&(f=g.Hc(c.zu))}void 0!==f&&c.qE(f,d)}}}};O(G,{cs:"itemArray"},function(){return this.Gh},function(a){var b=this.Gh;if(b!==a){v&&null!==a&&!Pa(a)&&w("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.g;null!==c&&null!==b&&Kl(c,this);this.Gh=a;null!==c&&null!==a&&Gl(c,this);this.h("itemArray",b,a);null!==c&&c.aa.bb||this.cz()}}); +function Zl(a){return a.type===bj||a.type===Gk||a.type===Mi||a.type===ga&&0a;)this.ye(a);a=this.cs;if(null!==a)for(var b=la(a),c=0;cc)){var d=a.getCategoryForItemData(b,c),d=a.findTemplateForItemData(b,c,d);if(null!==d){ih(d);d=d.copy();"object"===typeof b&&(null===a.Af&&(a.Af=new Ub(Object,G)),a.Af.add(b,d));var e=c;Zl(a)&&e++;a.zd(e,d);$l(a,e,c);d.data=b}}}function $l(a,b,c){for(a=a.ja;ba&&La(a,">= 0",Vg,"height"),this.re=a,this.Ga=this.jb,null!==this.H&&this.H.K(),this.tc("height",b,a))});O(Vg,{width:"width"},function(){return this.re},function(a){var b=this.re;b!==a&&(v&&I(a,"number",Vg,"width"),0>a&&La(a,">= 0",Vg,"width"),this.re=a,this.Ga=this.jb,null!==this.H&&this.H.K(),this.tc("width",b,a))}); +O(Vg,{ji:"minimum"},function(){return this.Pi},function(a){var b=this.Pi;b!==a&&(v&&I(a,"number",Vg,"minimum"),(0>a||!isFinite(a))&&La(a,">= 0",Vg,"minimum"),this.Pi=a,this.Ga=this.jb,null!==this.H&&this.H.K(),this.tc("minimum",b,a))});O(Vg,{mf:"maximum"},function(){return this.Ni},function(a){var b=this.Ni;b!==a&&(v&&I(a,"number",Vg,"maximum"),0>a&&La(a,">= 0",Vg,"maximum"),this.Ni=a,this.Ga=this.jb,null!==this.H&&this.H.K(),this.tc("maximum",b,a))}); +O(Vg,{alignment:"alignment"},function(){return this.Vd},function(a){var b=this.Vd;b.C(a)||(v&&H(a,V,Vg,"alignment"),this.Vd=a.R(),null!==this.H&&this.H.K(),this.tc("alignment",b,a))});O(Vg,{stretch:"stretch"},function(){return this.gh},function(a){var b=this.gh;b!==a&&(v&&Ea(a,Y,Vg,"stretch"),this.gh=a,null!==this.H&&this.H.K(),this.tc("stretch",b,a))}); +O(Vg,{UD:"separatorPadding"},function(){return this.Xi},function(a){"number"===typeof a?a=new yd(a):null!==a&&v&&H(a,yd,Vg,"separatorPadding");var b=this.Xi;null!==a&&null!==b&&b.C(a)||(null!==a&&(a=a.R()),this.Xi=a,null!==this.H&&this.H.K(),this.tc("separatorPadding",b,a))}); +O(Vg,{xo:"separatorStroke"},function(){return this.Zq},function(a){var b=this.Zq;b!==a&&(null===a||"string"===typeof a||a instanceof Ka)&&(a instanceof Ka&&a.freeze(),this.Zq=a,null!==this.H&&this.H.K(),this.tc("separatorStroke",b,a))});O(Vg,{yo:"separatorStrokeWidth"},function(){return this.$q},function(a){var b=this.$q;b!==a&&(this.$q=a,null!==this.H&&this.H.K(),this.tc("separatorStrokeWidth",b,a))}); +O(Vg,{pH:"separatorDashArray"},function(){return this.bh},function(a){var b=this.bh;if(b!==a){null===a||Array.isArray(a)||Ca(a,"Array",Vg,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){for(var h=c[0],k=c[1],n=0,p=0,q=0,s=l=0,t=p=0,u=yb(),z=2;zt){zb(u);return}e>l?(C=e-l, +e=l):C=0;var B=Math.sqrt(e*e/(1+q*q));0>n&&(B=-B);h+=B;k+=q*B;a.translate(h,k);a.rotate(s);a.translate(-(g/2),-(f/2));0===C&&d.nj(a,b);a.translate(g/2,f/2);a.rotate(-s);a.translate(-h,-k);t-=e;l-=e;if(0!==C){p++;if(p===u.length){zb(u);return}l=u[p];n=l[0];s=l[1];q=l[2];l=l[3];e=C}}zb(u)}} +pi.prototype.nj=function(a,b){if(null!==this.dc||null!==this.Nc){null!==this.Nc&&dn(this,a,this.Nc,!0,!1);null!==this.dc&&dn(this,a,this.dc,!1,!1);var c=this.Hd;if(0===c){var d=this.L;d instanceof ea&&d.type===Mi&&d.ac instanceof pi&&(c=d.ac.Ua)}a.lineWidth=c;a.lineJoin=this.zn;a.lineCap=this.yn;a.miterLimit=this.Fl;var e=!1;this.L&&b.$g.drawShadows&&(e=this.L.qj);var f=!0;null!==this.dc&&null===this.Nc&&(f=!1);var d=!1,g=!0,h=this.qz;null!==h&&(d=!0,void 0!==a.setLineDash?(a.setLineDash(h),a.lineDashOffset= +this.Cc):void 0!==a.webkitLineDash?(a.webkitLineDash=h,a.webkitLineDashOffset=this.Cc):void 0!==a.mozDash?(a.mozDash=h,a.mozDashOffset=this.Cc):g=!1);var k=this.Fa;if(null!==k){if(k.W===lf)a.beginPath(),d&&!g?Qm(a,k.Sb,k.Vb,k.Wa,k.fb,h,this.Cc):(a.moveTo(k.Sb,k.Vb),a.lineTo(k.Wa,k.fb)),null!==this.Nc&&en(a,this.Nc),0!==c&&null!==this.dc&&gn(a);else if(k.W===mf){var l=k.Sb,m=k.Vb,n=k.Wa,p=k.fb,k=Math.min(l,n),q=Math.min(m,p),l=Math.abs(n-l),m=Math.abs(p-m);null!==this.Nc&&(a.beginPath(),a.rect(k,q, +l,m),en(a,this.Nc));if(null!==this.dc){var s=n=0,t=0;f&&e&&(n=a.shadowOffsetX,s=a.shadowOffsetY,t=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0);d&&!g?(g=yb(),g.push(k),g.push(q),g.push(k+l),g.push(q),g.push(k+l),g.push(q+m),g.push(k),g.push(q+m),g.push(k),g.push(q),a.beginPath(),Ho(a,g,h,this.Cc),gn(a),zb(g)):0!==c&&(a.beginPath(),a.rect(k,q,l,m),gn(a));f&&e&&(a.shadowOffsetX=n,a.shadowOffsetY=s,a.shadowBlur=t)}}else if(k.W===nf)l=k.Sb,m=k.Vb,n=k.Wa,p=k.fb,k=Math.abs(n-l)/2,q=Math.abs(p- +m)/2,l=Math.min(l,n)+k,m=Math.min(m,p)+q,a.beginPath(),a.moveTo(l,m-q),a.bezierCurveTo(l+U.la*k,m-q,l+k,m-U.la*q,l+k,m),a.bezierCurveTo(l+k,m+U.la*q,l+U.la*k,m+q,l,m+q),a.bezierCurveTo(l-U.la*k,m+q,l-k,m+U.la*q,l-k,m),a.bezierCurveTo(l-k,m-U.la*q,l-U.la*k,m-q,l,m-q),a.closePath(),null!==this.Nc&&en(a,this.Nc),d&&!g&&(g=yb(),U.ae(l,m-q,l+U.la*k,m-q,l+k,m-U.la*q,l+k,m,.5,g),U.ae(l+k,m,l+k,m+U.la*q,l+U.la*k,m+q,l,m+q,.5,g),U.ae(l,m+q,l-U.la*k,m+q,l-k,m+U.la*q,l-k,m,.5,g),U.ae(l-k,m,l-k,m-U.la*q,l-U.la* +k,m-q,l,m-q,.5,g),a.beginPath(),Ho(a,g,h,this.Cc),zb(g)),0!==c&&null!==this.dc&&(t=s=n=0,f&&e&&(n=a.shadowOffsetX,s=a.shadowOffsetY,t=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0),gn(a),f&&e&&(a.shadowOffsetX=n,a.shadowOffsetY=s,a.shadowBlur=t));else if(k.W===hf){q=k.zi;m=q.length;for(p=0;pz.mi);else for(var u=Vf(z,l),C=u.length,B=0;Be))if(g=b[0],h=b[1],4===e)Qm(a,g,h,b[2],b[3],c,d);else{a.moveTo(g,h);for(var m=0,n=0,p=0,q=n=k=0,s=yb(),t=2;tq&&(e=q);e>k?(u=e-k,e=k):u=0;var z=Math.sqrt(e*e/(1+ +p*p));0>m&&(z=-z);g+=z;h+=p*z;l?a.lineTo(g,h):a.moveTo(g,h);q-=e;k-=e;if(0!==u){n++;if(n===s.length){zb(s);return}k=s[n];m=k[0];p=k[1];k=k[2];e=u}else l=!l}zb(s)}}pi.prototype.getDocumentPoint=pi.prototype.Za=function(a,b){void 0===b&&(b=new K);a.Od()&&w("getDocumentPoint:s Spot must be real: "+a.toString());var c=this.qa,d=this.Ua;b.k(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY);this.df.Qa(b);return b}; +pi.prototype.kj=function(a,b){var c=this.Fa;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.Ya,e=this.Ua/2;c.type!==lf||b||(e+=2);var f=nb();f.assign(d);f.jf(e+2,e+2);if(!f.sa(a))return pb(f),!1;d=e+1E-4;if(c.type===lf){if(null===this.stroke)return!1;d=(c.q-c.ga)*(a.x-c.ga)+(c.s-c.ha)*(a.y-c.ha);if(0>(c.ga-c.q)*(a.x-c.q)+(c.ha-c.s)*(a.y-c.s)||0>d)return!1;pb(f);return U.ld(c.ga,c.ha,c.q,c.s,e,a.x,a.y)}if(c.type===mf){var g=c.ga,h=c.ha,k=c.q,l=c.s,c=Math.min(g,k),m=Math.min(h,l), +g=Math.abs(k-g),h=Math.abs(l-h);f.x=c;f.y=m;f.width=g;f.height=h;if(null===this.fill){f.jf(-d,-d);if(f.sa(a))return pb(f),!1;f.jf(d,d)}null!==this.stroke&&f.jf(e,e);e=f.sa(a);pb(f);return e}if(c.type===nf){g=c.ga;h=c.ha;k=c.q;l=c.s;c=Math.min(g,k);m=Math.min(h,l);g=Math.abs(k-g);h=Math.abs(l-h);g/=2;h/=2;c=a.x-(c+g);m=a.y-(m+h);if(null===this.fill){g-=d;h-=d;if(0>=g||0>=h||1>=c*c/(g*g)+m*m/(h*h))return pb(f),!1;g+=d;h+=d}null!==this.stroke&&(g+=e,h+=e);pb(f);return 0>=g||0>=h?!1:1>=c*c/(g*g)+m*m/ +(h*h)}if(c.type===hf)return pb(f),null===this.fill?Zf(c,a.x,a.y,e):c.sa(a,e,1=this.Ua)m=U.Ag(n.Sb,n.Vb,n.Wa,n.fb,f,g,h,k,e);else{var q=0,s=0;n.Sb===n.Wa?(q=l,s=0):(b=(n.fb-n.Vb)/(n.Wa-n.Sb),s=l/Math.sqrt(1+b*b),q=s*b);d=yb();b=new K;U.Ag(n.Sb+ +q,n.Vb+s,n.Wa+q,n.fb+s,f,g,h,k,b)&&d.push(b);b=new K;U.Ag(n.Sb-q,n.Vb-s,n.Wa-q,n.fb-s,f,g,h,k,b)&&d.push(b);b=new K;U.Ag(n.Sb+q,n.Vb+s,n.Sb-q,n.Vb-s,f,g,h,k,b)&&d.push(b);b=new K;U.Ag(n.Wa+q,n.fb+s,n.Wa-q,n.fb-s,f,g,h,k,b)&&d.push(b);b=d.length;if(0===b)return zb(d),!1;m=!0;s=Infinity;for(q=0;qMath.abs(c)){m=g-b-c*(f-d);if(0>a*a*c*c+u*u-m*m){e.x=NaN;e.y=NaN;m=!1;break a}l=Math.sqrt(a*a*c*c+u*u-m*m);h=(-(a*a*c*m)+a*u*l)/(u*u+a*a*c*c)+d;a=(-(a*a*c*m)-a*u*l)/(u*u+a*a*c*c)+d;k=c*(h-d)+m+b;b=c*(a-d)+m+b;d=Math.abs((f-h)*(f-h))+Math.abs((g-k)*(g-k));g=Math.abs((f-a)*(f-a))+Math.abs((g-b)* +(g-b));dh){e.x=NaN;e.y=NaN;m=!1;break a}l=Math.sqrt(h);k=b+l;b-=l;d=Math.abs(k-g);g=Math.abs(b-g);dc?a-c:c-a)<(b>d?b-d:d-b)?(e=be||U.$a(k.y,e))&&(k.ye||U.$a(k.x,e))&&(k.x=g&&d<=a}a=g&&f<=a} +pi.prototype.EC=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.kj(a,!0))return!0;var e=a.mj(b);b=e;1.5=e||ud(b,f,0,-n)>=e||ud(b,f,0,n)>=e||ud(b,f,m,0)>=e?!1:!0}else if(f.type=== +hf){g=f.Ya;h=g.x;k=g.y;l=g.x+g.width;g=g.y+g.height;if(a.x>l&&a.xg&&a.ye&&td(a.x,a.y,h,k,l,k)>e&&td(a.x,a.y,l,g,h,g)>e&&td(a.x,a.y,l,g,l,k)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?Zf(f,a.x,a.y,b):f.sa(a,b,!0))return!0}else{c=f.cb;for(b=0;be)return!1;k=h.ua.l;l=k.length;for(g=0;ge)return!1;break;case Mf:f=yb();U.ae(m,n,p.pb,p.Bb,p.Qd, +p.Rd,p.q,p.s,.8,f);m=d(f,a);zb(f);if(m)return!1;m=p.q;n=p.s;if(a.Ir(m,n)>e)return!1;break;case Nf:f=yb();U.ro(m,n,p.pb,p.Bb,p.q,p.s,.8,f);m=d(f,a);zb(f);if(m)return!1;m=p.q;n=p.s;if(a.Ir(m,n)>e)return!1;break;case Of:case Uf:var p=p.type===Of?Vf(p,h):Wf(p,h,m,n),q=p.length,s=null,f=yb();for(b=0;b= 0",pi,"strokeWidth:value")});O(pi,{zH:"strokeCap"},function(){return this.yn},function(a){var b=this.yn;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?La(a,'"butt", "round", or "square"',pi,"strokeCap"):(this.yn=a,this.ea(),this.h("strokeCap",b,a)))}); +O(pi,{KJ:"strokeJoin"},function(){return this.zn},function(a){var b=this.zn;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?La(a,'"miter", "bevel", or "round"',pi,"strokeJoin"):(this.zn=a,this.ea(),this.h("strokeJoin",b,a)))});O(pi,{LJ:"strokeMiterLimit"},function(){return this.Fl},function(a){var b=this.Fl;if(b!==a)if(v&&J(a,pi,"strokeMiterLimit"),0 0",pi,"strokeWidth:value")}); +O(pi,{qz:"strokeDashArray"},function(){return this.El},function(a){var b=this.El;if(b!==a){null===a||Array.isArray(a)||Ca(a,"Array",pi,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;el*h*h&&(g=!0);b.le!==a&&(g=!1);!1===b.vy("textGreeking")&&(g=!1);for(var l=this.Zi,h=this.$i,k=this.oe,m=0;mc&&(n=c);var f=f+l,q=p,p=a,s=f,t=c,u=d,z= +0;g?("start"===this.td||"left"===this.td?z=0:"end"===this.td||"right"===this.td?z=t-n:"center"===this.td?z=(t-n)/2:w("textAlign must be start, end, left, right, or center"),p.fillRect(0+z,s+.25*u,n,1)):("start"===this.td||"left"===this.td?z=0:"end"===this.td||"right"===this.td?z=t:"center"===this.td?z=t/2:w("textAlign must be start, end, left, right, or center"),p.fillText(q,0+z,s+u-.25*u),q=u/20|0,0===q&&(q=1),this.il&&("end"===this.td||"right"===this.td?z-=n:"center"===this.td&&(z-=n/2),p.beginPath(), +p.lineWidth=q,p.moveTo(0+z,s+u-.2*u),p.lineTo(0+z+n,s+u-.2*u),p.stroke()),this.hl&&(p.beginPath(),p.lineWidth=q,s=s+u-u/2.2|0,0!==q%2&&(s+=.5),p.moveTo(0,s),p.lineTo(0+n,s),p.stroke()));f+=d+h}}}; +rc.prototype.io=function(a,b,c,d){var e=this.Fi;e.reset();var f=0,g=0;if(isNaN(this.na.width)){f=this.Jd.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===f.length)f=0;else if(this.Hy){for(var h=g=0,k=!1;!k;){var l=f.indexOf("\n",h);-1===l&&(l=f.length,k=!0);h=dp(f.substr(h,l-h).replace(/^\s+|\s+$/g,""),this.gg);h>g&&(g=h);h=l+1}f=g}else g=f.indexOf("\n",0),0<=g&&(f=f.substr(0,g)),f=h=dp(f,this.gg);f=Math.min(f,a/this.scale);f=Math.max(8,f)}else f=this.na.width;null!==this.H&&(f=Math.min(f,this.H.Pd.width), +f=Math.max(f,this.H.Se.width));g=bp(this,f,e);l=g=isNaN(this.na.height)?Math.min(g,b/this.scale):this.na.height;if(0!==e.pe&&1!==e.Wd.length&&this.fk===Zo&&(b=this.gg,k=this.fk===Zo?ep(b):0,h=this.Zi+this.$i,h=Math.max(0,cp(this)+h),l=Math.max(Math.floor(l/h)-1,0),!(l+1>=e.Wd.length))){h=e.Wd[l];for(a=Math.max(1,a-k);dp(h,b)>a&&1=a.Ih)return new ib(0,k);if(a.Kl===Xo){c.gj=1;f=dp(b,h);if(0===g||f<=d)return c.pe=f,c.Ee.push(c.pe),c.Wd.push(b),new ib(f,k);var l=fp(b);b=b.substr(l.length);for(var m=fp(b),f=dp(l+m,h);0d&&1d;){m=1;f=dp(l.substr(0,m),h);for(g=0;f<=d;)m++,g=f,f=dp(l.substr(0,m),h);1===m?(c.Ee[a.oe+n]=f,e=Math.max(e,f)):(c.Ee[a.oe+n]=g,e=Math.max(e,g));m--;1>m&&(m=1);c.Wd[a.oe+n]=l.substr(0,m);n++;l=l.substr(m);if(a.oe+n>a.Ih)break}m=fp(b);for(f=dp(l+m,h);0a.Ih))break}c.gj=Math.min(a.Ih,n);c.pe=Math.max(c.pe,e);return new ib(c.pe,k*c.gj)}function fp(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)}function dp(a,b){Vo!==b&&(Vo=Wo.font=b);return Wo.measureText(a).width} +function cp(a){if(null!==a.Sm)return a.Sm;var b=a.gg;Vo!==b&&(Vo=Wo.font=b);var c=0;void 0!==Qo[b]&&5E3>Ro?c=Qo[b]:(c=1.3*Wo.measureText("M").width,Qo[b]=c,Ro++);return a.Sm=c}function ep(a){Vo!==a&&(Vo=Wo.font=a);var b=0;void 0!==So[a]&&5E3>To?b=So[a]:(b=Wo.measureText(Uo).width,So[a]=b,To++);return b} +function bp(a,b,c){var d=a.Jd.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.Zi+a.$i,e=Math.max(0,cp(a)+e);if(0===d.length)return c.pe=0,a.oe=1,e;if(!a.Hy){var f=d.indexOf("\n",0);0<=f&&(d=d.substr(0,f))}for(var f=0,g=a.oe=0,h=-1,k=!1;!k;)h=d.indexOf("\n",g),-1===h&&(h=d.length,k=!0),g<=h&&(g=d.substr(g,h-g),a.Kl!==Xo?(c.gj=0,g=ap(a,g,c,b),f+=g.height,a.oe+=c.gj):(ap(a,g,c,b),f+=e,a.oe++),a.oe===a.Ih&&(k=!0)),g=h+1;return a.Vt=f} +O(rc,{uz:"textValidation"},function(){return this.ik},function(a){var b=this.ik;b!==a&&(null!==a&&I(a,"function",rc,"textValidation"),this.ik=a,this.h("textValidation",b,a))});O(rc,{HJ:"spacingAbove"},function(){return this.Zi},function(a){var b=this.Zi;b!==a&&(v&&I(a,"number",rc,"spacingAbove"),this.Zi=a,this.h("spacingAbove",b,a))});O(rc,{IJ:"spacingBelow"},function(){return this.$i},function(a){var b=this.$i;b!==a&&(v&&I(a,"number",rc,"spacingBelow"),this.$i=a,this.h("spacingBelow",b,a))}); +O(rc,{gJ:"maxLines"},function(){return this.Ih},function(a){var b=this.Ih;b!==a&&(v&&I(a,"number",rc,"maxLines"),a=Math.floor(a),0>=a&&La(a,"> 0",rc,"maxLines"),this.Ih=a,this.h("maxLines",b,a),this.K())});P(rc,{hJ:"metrics"},function(){return this.Fi});function Po(){this.pe=this.gj=0;this.Ee=[];this.Wd=[]}Po.prototype.reset=function(){this.pe=this.gj=0;this.Ee=[];this.Wd=[]};Po.prototype.Fr=function(a){this.gj=a.gj;this.pe=a.pe;this.Ee=Sa(a.Ee);this.Wd=Sa(a.Wd)};P(Po,{hI:"arrSize"},function(){return this.Ee}); +P(Po,{iI:"arrText"},function(){return this.Wd});P(Po,{fJ:"maxLineWidth"},function(){return this.pe});function zk(){Y.call(this);this.me=null;this.dr="";this.Yi=(new x(NaN,NaN,NaN,NaN)).freeze();this.Xm=kf;this.hr=this.aj=this.He=null;this.$w=!1;this.yt=!0;this.un=null;this.SA=0}Nb(zk,Y);Mb("Picture",zk);var gp=new dc,hp=0,uk=[]; +function ip(){var a=uk;if(0===a.length)for(var b=window.document.getElementsByTagName("canvas"),c=b.length,d=0;dm.En.length&&(np(m,4,h,g),np(m,16, +h,g));for(var q=m.En,s=q.length,n=q[0],t=0;te;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d);Hf(a);b=a.m;b.o=new V(.2,.22);b.p=new V(.8, +.9);N(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=U.rk(6);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e=1;6>e;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d);Hf(a);b=a.m;b.o=new V(.07,.25);b.p=new V(.93,.75);N(a);return b},Heptagon:function(a,b,c){var d=U.rk(7);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e=1;7>e;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d);Hf(a);b=a.m;b.o=new V(.2,.15);b.p=new V(.8,.85);N(a);return b},Octagon:function(a,b,c){var d=U.rk(8);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e= +1;8>e;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d);Hf(a);b=a.m;b.o=new V(.15,.15);b.p=new V(.85,.85);N(a);return b},Nonagon:function(a,b,c){var d=U.rk(9);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e=1;9>e;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d);Hf(a);b=a.m;b.o=new V(.17,.13);b.p=new V(.82,.82);N(a);return b},Decagon:function(a,b,c){var d=U.rk(10);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d);Hf(a);b=a.m;b.o=new V(.16,.16);b.p=new V(.84,.84);N(a);return b},Dodecagon:function(a, +b,c){var d=U.rk(12);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d);Hf(a);b=a.m;b.o=new V(.16,.16);b.p=new V(.84,.84);N(a);return b},FivePointedStar:function(a,b,c){var d=U.Wl(5);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d);Hf(a);b=a.m;b.o=new V(.312,.383);b.p=new V(.693,.765);N(a);return b},SixPointedStar:function(a,b,c){var d=U.Wl(6);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d); +Hf(a);b=a.m;b.o=new V(.17,.251);b.p=new V(.833,.755);N(a);return b},SevenPointedStar:function(a,b,c){var d=U.Wl(7);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e=1;14>e;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d);Hf(a);b=a.m;b.o=new V(.363,.361);b.p=new V(.641,.709);N(a);return b},EightPointedStar:function(a,b,c){var d=U.Wl(8);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e=1;16>e;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d);Hf(a);b=a.m;b.o=new V(.252,.255);b.p=new V(.75,.75);N(a);return b},NinePointedStar:function(a,b, +c){var d=U.Wl(9);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e=1;18>e;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d);Hf(a);b=a.m;b.o=new V(.355,.361);b.p=new V(.645,.651);N(a);return b},TenPointedStar:function(a,b,c){var d=U.Wl(10);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e=1;20>e;e++)a.lineTo(d[e].x*b,d[e].y*c);zb(d);Hf(a);b=a.m;b.o=new V(.281,.261);b.p=new V(.723,.748);N(a);return b},FivePointedBurst:function(a,b,c){var d=U.Mn(5);a=L();W(a,d[0].x*b,d[0].y*c,!0);for(var e=1;e +a&&(a=.15);var d=L(),e=.2*U.la;W(d,0,.2*c,!0);X(d,0,(.2-e)*c,(.2-e)*b,0,.2*b,0);d.lineTo(.8*b,0);X(d,(.8+e)*b,0,1*b,(.2-e)*c,1*b,.2*c);d.lineTo(1*b,.8*c);X(d,1*b,(.8+e)*c,(.8+e)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);X(d,(.2-e)*b,1*c,0,(.8+e)*c,0,.8*c);d.lineTo(0,.2*c);W(d,0,a*c,!1);d.lineTo(1*b,a*c);d.Pa(!1);b=d.m;b.o=new V(0,a);b.p=new V(1,1-a);N(d);return b},DividedProcess:function(a,b,c){a=a?a.cc:NaN;if(isNaN(a)||.1>a)a=.1;var d=L();W(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Hf(d); +W(d,0,a*c,!1);d.lineTo(1*b,a*c);d.Pa(!1);b=d.m;b.o=new V(0,a);b.p=ce;N(d);return b},Document:function(a,b,c){c/=.8;a=L();W(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);X(a,.5*b,.4*c,.5*b,1*c,0,.7*c);Hf(a);b=a.m;b.o=Nd;b.p=new V(1,.6);N(a);return b},ExternalOrganization:function(a,b,c){a=a?a.cc:NaN;if(isNaN(a)||.2>a)a=.2;var d=L();W(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Hf(d);W(d,a*b,0,!1);d.lineTo(0,a*c);d.moveTo(1*b,a*c);d.lineTo((1-a)*b,0);d.moveTo(0,(1-a)* +c);d.lineTo(a*b,1*c);d.moveTo((1-a)*b,1*c);d.lineTo(1*b,(1-a)*c);d.Pa(!1);b=d.m;b.o=new V(a/2,a/2);b.p=new V(1-a/2,1-a/2);N(d);return b},ExternalProcess:function(a,b,c){a=L();W(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);Hf(a);W(a,.1*b,.4*c,!1);a.lineTo(.1*b,.6*c);a.moveTo(.9*b,.6*c);a.lineTo(.9*b,.4*c);a.moveTo(.6*b,.1*c);a.lineTo(.4*b,.1*c);a.moveTo(.4*b,.9*c);a.lineTo(.6*b,.9*c);a.Pa(!1);b=a.m;b.o=new V(.25,.25);b.p=new V(.75,.75);N(a);return b},File:function(a,b,c){a=L(); +W(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);Hf(a);W(a,.75*b,0,!1);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.25*c);a.Pa(!1);b=a.m;b.o=new V(0,.25);b.p=ce;N(a);return b},Interrupt:function(a,b,c){a=L();W(a,1*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);W(a,1*b,.5*c,!1);a.lineTo(1*b,1*c);W(a,1*b,.5*c,!1);a.lineTo(1*b,0);b=a.m;b.o=new V(0,.25);b.p=new V(.5,.75);N(a);return b},InternalStorage:function(a,b,c){var d=a?a.cc:NaN;a=a?a.ss:NaN;isNaN(d)&&(d=.1); +isNaN(a)&&(a=.1);var e=L();W(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(1*b,1*c);e.lineTo(0,1*c);Hf(e);W(e,d*b,0,!1);e.lineTo(d*b,1*c);e.moveTo(0,a*c);e.lineTo(1*b,a*c);e.Pa(!1);b=e.m;b.o=new V(d,a);b.p=ce;N(e);return b},Junction:function(a,b,c){a=L();var d=1/Math.SQRT2,e=(1-1/Math.SQRT2)/2,f=.5*U.la;W(a,1*b,.5*c,!0);X(a,1*b,(.5+f)*c,(.5+f)*b,1*c,.5*b,1*c);X(a,(.5-f)*b,1*c,0,(.5+f)*c,0,.5*c);X(a,0,(.5-f)*c,(.5-f)*b,0,.5*b,0);X(a,(.5+f)*b,0,1*b,(.5-f)*c,1*b,.5*c);W(a,(e+d)*b,(e+d)*c,!1);a.lineTo(e*b,e*c); +a.moveTo(e*b,(e+d)*c);a.lineTo((e+d)*b,e*c);a.Pa(!1);b=a.m;b.fd=fj;N(a);return b},LinedDocument:function(a,b,c){c/=.8;a=L();W(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);X(a,.5*b,.4*c,.5*b,1*c,0,.7*c);Hf(a);W(a,.1*b,0,!1);a.lineTo(.1*b,.75*c);a.Pa(!1);b=a.m;b.o=new V(.1,0);b.p=new V(1,.6);N(a);return b},LoopLimit:function(a,b,c){a=L();W(a,0,1*c,!0);a.lineTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);Hf(a);b=a.m;b.o=new V(0,.25);b.p=ce;N(a); +return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=L();var d=.5*U.la;W(a,.5*b,1*c,!0);X(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);X(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);X(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);X(a,1*b,(.5+d)*c,(.5+d)*b,.9*c,.6*b,.9*c);a.lineTo(1*b,.9*c);a.lineTo(1*b,1*c);a.lineTo(.5*b,1*c);b=a.m;b.o=new V(.15,.15);b.p=new V(.85,.8);N(a);return b},ManualInput:function(a,b,c){a=L();W(a,1*b,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.25*c);Hf(a);b=a.m;b.o=new V(0,.25);b.p= +ce;N(a);return b},MessageFromUser:function(a,b,c){a=a?a.cc:NaN;isNaN(a)&&(a=.7);var d=L();W(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(a*b,.5*c);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Hf(d);b=d.m;b.o=Nd;b.p=new V(a,1);N(d);return b},MicroformProcessing:function(a,b,c){a=a?a.cc:NaN;isNaN(a)&&(a=.25);var d=L();W(d,0,0,!0);d.lineTo(.5*b,a*c);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.5*b,(1-a)*c);d.lineTo(0,1*c);Hf(d);b=d.m;b.o=new V(0,a);b.p=new V(1,1-a);N(d);return b},MicroformRecording:function(a,b,c){a=L(); +W(a,0,0,!0);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.15*c);a.lineTo(1*b,.85*c);a.lineTo(.75*b,.75*c);a.lineTo(0,1*c);Hf(a);b=a.m;b.o=new V(0,.25);b.p=new V(1,.75);N(a);return b},MultiDocument:function(a,b,c){c/=.8;a=L();W(a,b,0,!0);a.lineTo(b,.5*c);X(a,.96*b,.47*c,.93*b,.45*c,.9*b,.44*c);a.lineTo(.9*b,.6*c);X(a,.86*b,.57*c,.83*b,.55*c,.8*b,.54*c);a.lineTo(.8*b,.7*c);X(a,.4*b,.4*c,.4*b,1*c,0,.7*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);a.lineTo(.1*b,.1*c);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);Hf(a);W(a,.1* +b,.2*c,!1);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.54*c);a.moveTo(.2*b,.1*c);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.44*c);a.Pa(!1);b=a.m;b.o=new V(0,.25);b.p=new V(.8,.77);N(a);return b},MultiProcess:function(a,b,c){a=L();W(a,.1*b,.1*c,!0);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);a.lineTo(1*b,0);a.lineTo(1*b,.8*c);a.lineTo(.9*b,.8*c);a.lineTo(.9*b,.9*c);a.lineTo(.8*b,.9*c);a.lineTo(.8*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);Hf(a);W(a,.2*b,.1*c,!1);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.8*c);a.moveTo(.1* +b,.2*c);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.9*c);a.Pa(!1);b=a.m;b.o=new V(0,.2);b.p=new V(.8,1);N(a);return b},OfflineStorage:function(a,b,c){a=a?a.cc:NaN;isNaN(a)&&(a=.1);var d=1-a,e=L();W(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(.5*b,1*c);Hf(e);W(e,.5*a*b,a*c,!1);e.lineTo((1-.5*a)*b,a*c);e.Pa(!1);b=e.m;b.o=new V(d/4+.5*a,a);b.p=new V(3*d/4+.5*a,a+.5*d);N(e);return b},OffPageConnector:function(a,b,c){a=L();W(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.5*c);a.lineTo(.75*b,1*c);a.lineTo(0,1*c);Hf(a);b=a.m; +b.o=Nd;b.p=new V(.75,1);N(a);return b},Or:function(a,b,c){a=L();var d=.5*U.la;W(a,1*b,.5*c,!0);X(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);X(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);X(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);X(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);W(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.Pa(!1);b=a.m;b.fd=fj;N(a);return b},PaperTape:function(a,b,c){c/=.8;a=L();W(a,0,.7*c,!0);a.lineTo(0,.3*c);X(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);X(a,.5*b,.4*c,.5*b,1*c,0,.7*c); +Hf(a);b=a.m;b.o=new V(0,.49);b.p=new V(1,.75);N(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.cc:NaN;a=a?a.ss:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=L();W(e,0,0,!0);e.lineTo(1*b,0);e.lineTo((1-a)*b,.5*c);e.lineTo(1*b,1*c);e.lineTo(0,1*c);Hf(e);b=e.m;b.o=new V(d,0);b.p=new V(1-a,1);N(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.cc:NaN;a=a?a.ss:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=L();W(e,0,0,!0);e.lineTo((1-a)*b,0);e.lineTo(1*b,.5*c);e.lineTo((1-a)*b,1*c);e.lineTo(0, +1*c);Hf(e);b=e.m;b.o=new V(d,0);b.p=new V(1-a,1);N(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.cc:NaN;isNaN(a)&&(a=.1);var d=L();W(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Hf(d);W(d,(1-a)*b,0,!1);d.lineTo((1-a)*b,1*c);d.moveTo(a*b,0);d.lineTo(a*b,1*c);d.Pa(!1);b=d.m;b.o=new V(a,0);b.p=new V(1-a,1);N(d);return b},Process:function(a,b,c){a=a?a.cc:NaN;isNaN(a)&&(a=.1);var d=L();W(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Hf(d);W(d,a*b,0,!1); +d.lineTo(a*b,1*c);d.Pa(!1);b=d.m;b.o=new V(a,0);b.p=ce;N(d);return b},Sort:function(a,b,c){a=L();W(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);Hf(a);W(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.Pa(!1);b=a.m;b.o=new V(.25,.25);b.p=new V(.75,.5);N(a);return b},Start:function(a,b,c){a=L();W(a,.25*b,0,!0);W(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);W(a,.25*b,0,!1);a.lineTo(.25*b,1*c);a.moveTo(.75*b,0);a.lineTo(.75*b,1*c);a.Pa(!1);b=a.m;b.o= +new V(.25,0);b.p=new V(.75,1);N(a);return b},Terminator:function(a,b,c){a=L();W(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);b=a.m;b.o=new V(.23,0);b.p=new V(.77,1);N(a);return b},TransmittalTape:function(a,b,c){a=a?a.cc:NaN;isNaN(a)&&(a=.1);var d=L();W(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.75*b,(1-a)*c);d.lineTo(0,(1-a)*c);Hf(d);b=d.m;b.o=Nd;b.p=new V(1,1-a);N(d);return b},AndGate:function(a,b,c){a=L();var d=.5*U.la;W(a,0,0,!0);a.lineTo(.5* +b,0);X(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);X(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);Hf(a);b=a.m;b.o=Nd;b.p=new V(.55,1);N(a);return b},Buffer:function(a,b,c){a=L();W(a,0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);Hf(a);b=a.m;b.o=new V(0,.25);b.p=new V(.5,.75);N(a);return b},Clock:function(a,b,c){a=L();var d=.5*U.la;W(a,1*b,.5*c,!0);X(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);X(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);X(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);X(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);W(a,1* +b,.5*c,!1);a.lineTo(1*b,.5*c);W(a,.8*b,.75*c,!1);a.lineTo(.8*b,.25*c);a.lineTo(.6*b,.25*c);a.lineTo(.6*b,.75*c);a.lineTo(.4*b,.75*c);a.lineTo(.4*b,.25*c);a.lineTo(.2*b,.25*c);a.lineTo(.2*b,.75*c);a.Pa(!1);b=a.m;b.fd=fj;N(a);return b},Ground:function(a,b,c){a=L();W(a,.5*b,0,!1);a.lineTo(.5*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.3*b,.8*c);a.lineTo(.7*b,.8*c);a.moveTo(.4*b,1*c);a.lineTo(.6*b,1*c);b=a.m;N(a);return b},Inverter:function(a,b,c){a=L();var d=.1*U.la;W(a,.8*b,.5*c,!0);a.lineTo(0, +1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);W(a,1*b,.5*c,!0);X(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);X(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);X(a,.8*b,(.5-d)*c,(.9-d)*b,.4*c,.9*b,.4*c);X(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.m;b.o=new V(0,.25);b.p=new V(.4,.75);N(a);return b},NandGate:function(a,b,c){a=L();var d=U.la,e=.5*d,f=.4*d,d=.1*d;W(a,.8*b,.5*c,!0);X(a,.8*b,(.5+f)*c,(.4+e)*b,1*c,.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.4*b,0);X(a,(.4+e)*b,0,.8*b,(.5-f)*c,.8*b,.5*c);W(a,1*b,.5* +c,!0);X(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);X(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);X(a,.8*b,(.5-d)*c,(.9-d)*b,.4*c,.9*b,.4*c);X(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.m;b.o=new V(0,.05);b.p=new V(.55,.95);N(a);return b},NorGate:function(a,b,c){a=L();var d=U.la,e=.5,f=d*e,g=0,h=.5;W(a,.8*b,.5*c,!0);X(a,.7*b,(h+f)*c,(g+f)*b,(h+e)*c,0,1*c);X(a,.25*b,.75*c,.25*b,.25*c,0,0);X(a,(g+f)*b,(h-e)*c,.7*b,(h-f)*c,.8*b,.5*c);e=.1;f=.1*d;g=.9;h=.5;W(a,(g-e)*b,h*c,!0);X(a,(g-e)*b,(h-f)*c,(g-f)*b,(h- +e)*c,g*b,(h-e)*c);X(a,(g+f)*b,(h-e)*c,(g+e)*b,(h-f)*c,(g+e)*b,h*c);X(a,(g+e)*b,(h+f)*c,(g+f)*b,(h+e)*c,g*b,(h+e)*c);X(a,(g-f)*b,(h+e)*c,(g-e)*b,(h+f)*c,(g-e)*b,h*c);b=a.m;b.o=new V(.2,.25);b.p=new V(.6,.75);N(a);return b},OrGate:function(a,b,c){a=L();var d=.5*U.la;W(a,0,0,!0);X(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);X(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);X(a,.25*b,.75*c,.25*b,.25*c,0,0);Hf(a);b=a.m;b.o=new V(.2,.25);b.p=new V(.75,.75);N(a);return b},XnorGate:function(a,b,c){a=L();var d=U.la,e=.5, +f=d*e,g=.2,h=.5;W(a,.1*b,0,!1);X(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);W(a,.8*b,.5*c,!0);X(a,.7*b,(h+f)*c,(g+f)*b,(h+e)*c,.2*b,1*c);X(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);X(a,(g+f)*b,(h-e)*c,.7*b,(h-f)*c,.8*b,.5*c);e=.1;f=.1*d;g=.9;h=.5;W(a,(g-e)*b,h*c,!0);X(a,(g-e)*b,(h-f)*c,(g-f)*b,(h-e)*c,g*b,(h-e)*c);X(a,(g+f)*b,(h-e)*c,(g+e)*b,(h-f)*c,(g+e)*b,h*c);X(a,(g+e)*b,(h+f)*c,(g+f)*b,(h+e)*c,g*b,(h+e)*c);X(a,(g-f)*b,(h+e)*c,(g-e)*b,(h+f)*c,(g-e)*b,h*c);b=a.m;b.o=new V(.4,.25);b.p=new V(.65,.75);N(a);return b}, +XorGate:function(a,b,c){a=L();var d=.5*U.la;W(a,.1*b,0,!1);X(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);W(a,.2*b,0,!0);X(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);X(a,.9*b,(.5+d)*c,(.2+d)*b,1*c,.2*b,1*c);X(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);Hf(a);b=a.m;b.o=new V(.4,.25);b.p=new V(.8,.75);N(a);return b},Capacitor:function(a,b,c){a=L();W(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.m;N(a);return b},Resistor:function(a,b,c){a=L();W(a,0,.5*c,!1);a.lineTo(.1*b,0);a.lineTo(.2*b,1*c);a.lineTo(.3* +b,0);a.lineTo(.4*b,1*c);a.lineTo(.5*b,0);a.lineTo(.6*b,1*c);a.lineTo(.7*b,.5*c);b=a.m;N(a);return b},Inductor:function(a,b,c){a=L();var d=.1*U.la,e=.1;W(a,(e-.5*d)*b,c,!1);X(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.3;X(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);X(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.5;X(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);X(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.7;X(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);X(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.9;X(a,(e+.1)*b,0,(e+d)*b,c,(e+.5*d)*b,c);b=a.m;N(a);return b},ACvoltageSource:function(a, +b,c){a=L();var d=.5*U.la;W(a,0*b,.5*c,!1);X(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);X(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);X(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);X(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);X(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.m;b.fd=fj;N(a);return b},DCvoltageSource:function(a,b,c){a=L();W(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.m;N(a);return b},Diode:function(a,b,c){a=L();W(a,1*b,0,!1);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);a.lineTo(0,0); +a.lineTo(1*b,.5*c);a.lineTo(1*b,1*c);b=a.m;b.o=new V(0,.25);b.p=new V(.5,.75);N(a);return b},Wifi:function(a,b,c){var d=b,e=c;b*=.38;c*=.6;a=L();var f=U.la,g=.8*f,h=.8,k=0,l=.5,d=(d-b)/2,e=(e-c)/2;W(a,k*b+d,(l+h)*c+e,!0);X(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);X(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);X(a,k*b+d,(l-h)*c+e,(k-h+.5*g)*b+d,(l-g)*c+e,(k-h+.5*g)*b+d,l*c+e);X(a,(k-h+.5*g)*b+d,(l+g)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);Hf(a);g=.4*f;h=.4;k=.2;l=.5;W(a, +k*b+d,(l+h)*c+e,!0);X(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);X(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);X(a,k*b+d,(l-h)*c+e,(k-h+.5*g)*b+d,(l-g)*c+e,(k-h+.5*g)*b+d,l*c+e);X(a,(k-h+.5*g)*b+d,(l+g)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);Hf(a);g=.2*f;h=.2;l=k=.5;W(a,(k-h)*b+d,l*c+e,!0);X(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);X(a,(k+g)*b+d,(l-h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);X(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e); +X(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);g=.4*f;h=.4;k=.8;l=.5;W(a,k*b+d,(l-h)*c+e,!0);X(a,(k+g)*b+d,(l-h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);X(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);X(a,k*b+d,(l+h)*c+e,(k+h-.5*g)*b+d,(l+g)*c+e,(k+h-.5*g)*b+d,l*c+e);X(a,(k+h-.5*g)*b+d,(l-g)*c+e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);Hf(a);g=.8*f;h=.8;k=1;l=.5;W(a,k*b+d,(l-h)*c+e,!0);X(a,(k+g)*b+d,(l-h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);X(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+ +d,(l+h)*c+e,k*b+d,(l+h)*c+e);X(a,k*b+d,(l+h)*c+e,(k+h-.5*g)*b+d,(l+g)*c+e,(k+h-.5*g)*b+d,l*c+e);X(a,(k+h-.5*g)*b+d,(l-g)*c+e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);Hf(a);b=a.m;N(a);return b},Email:function(a,b,c){a=L();W(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);Hf(a);W(a,0,0,!1);a.lineTo(.5*b,.6*c);a.lineTo(1*b,0);a.moveTo(0,1*c);a.lineTo(.45*b,.54*c);a.moveTo(1*b,1*c);a.lineTo(.55*b,.54*c);a.Pa(!1);b=a.m;N(a);return b},Ethernet:function(a,b,c){a=L();W(a,.35*b,0,!0);a.lineTo(.65* +b,0);a.lineTo(.65*b,.4*c);a.lineTo(.35*b,.4*c);a.lineTo(.35*b,0);Hf(a);W(a,.1*b,1*c,!0,!0);a.lineTo(.4*b,1*c);a.lineTo(.4*b,.6*c);a.lineTo(.1*b,.6*c);a.lineTo(.1*b,1*c);Hf(a);W(a,.6*b,1*c,!0,!0);a.lineTo(.9*b,1*c);a.lineTo(.9*b,.6*c);a.lineTo(.6*b,.6*c);a.lineTo(.6*b,1*c);Hf(a);W(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.5*b,.4*c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,.6*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*b,.6*c);a.Pa(!1);b=a.m;N(a);return b},Power:function(a,b,c){a=L();var d= +U.la,e=.4*d,f=.4,g=db(),h=db(),k=db(),l=db();U.Zh(.5,.5-f,.5+e,.5-f,.5+f,.5-e,.5+f,.5,.5,g,g,h,k,l);var m=eb(h.x,h.y);W(a,h.x*b,h.y*c,!0);X(a,k.x*b,k.y*c,l.x*b,l.y*c,(.5+f)*b,.5*c);X(a,(.5+f)*b,(.5+e)*c,(.5+e)*b,(.5+f)*c,.5*b,(.5+f)*c);X(a,(.5-e)*b,(.5+f)*c,(.5-f)*b,(.5+e)*c,(.5-f)*b,.5*c);U.Zh(.5-f,.5,.5-f,.5-e,.5-e,.5-f,.5,.5-f,.5,k,l,h,g,g);X(a,k.x*b,k.y*c,l.x*b,l.y*c,h.x*b,h.y*c);e=.3*d;f=.3;U.Zh(.5-f,.5,.5-f,.5-e,.5-e,.5-f,.5,.5-f,.5,k,l,h,g,g);a.lineTo(h.x*b,h.y*c);X(a,l.x*b,l.y*c,k.x*b,k.y* +c,(.5-f)*b,.5*c);X(a,(.5-f)*b,(.5+e)*c,(.5-e)*b,(.5+f)*c,.5*b,(.5+f)*c);X(a,(.5+e)*b,(.5+f)*c,(.5+f)*b,(.5+e)*c,(.5+f)*b,.5*c);U.Zh(.5,.5-f,.5+e,.5-f,.5+f,.5-e,.5+f,.5,.5,g,g,h,k,l);X(a,l.x*b,l.y*c,k.x*b,k.y*c,h.x*b,h.y*c);Hf(a);W(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);Hf(a);fb(g);fb(h);fb(k);fb(l);fb(m);b=a.m;b.o=new V(.25,.55);b.p=new V(.75,.8);N(a);return b},Fallout:function(a,b,c){a=L();var d=.5*U.la;W(a,0*b,.5*c,!0);X(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);X(a, +(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);X(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);X(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);var e=d=0;W(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.4;e=0;Hf(a);W(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.2;e=-.3;Hf(a);W(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);Hf(a); +b=a.m;b.fd=fj;N(a);return b},IrritationHazard:function(a,b,c){a=L();W(a,.2*b,0*c,!0);a.lineTo(.5*b,.3*c);a.lineTo(.8*b,0*c);a.lineTo(1*b,.2*c);a.lineTo(.7*b,.5*c);a.lineTo(1*b,.8*c);a.lineTo(.8*b,1*c);a.lineTo(.5*b,.7*c);a.lineTo(.2*b,1*c);a.lineTo(0*b,.8*c);a.lineTo(.3*b,.5*c);a.lineTo(0*b,.2*c);Hf(a);b=a.m;b.o=new V(.3,.3);b.p=new V(.7,.7);N(a);return b},ElectricalHazard:function(a,b,c){a=L();W(a,.37*b,0*c,!0);a.lineTo(.5*b,.11*c);a.lineTo(.77*b,.04*c);a.lineTo(.33*b,.49*c);a.lineTo(1*b,.37*c); +a.lineTo(.63*b,.86*c);a.lineTo(.77*b,.91*c);a.lineTo(.34*b,1*c);a.lineTo(.34*b,.78*c);a.lineTo(.44*b,.8*c);a.lineTo(.65*b,.56*c);a.lineTo(0*b,.68*c);Hf(a);b=a.m;N(a);return b},FireHazard:function(a,b,c){a=L();W(a,.1*b,1*c,!0);X(a,-.25*b,.63*c,.45*b,.44*c,.29*b,0*c);X(a,.48*b,.17*c,.54*b,.35*c,.51*b,.42*c);X(a,.59*b,.29*c,.58*b,.28*c,.59*b,.18*c);X(a,.8*b,.34*c,.88*b,.43*c,.75*b,.6*c);X(a,.87*b,.48*c,.88*b,.43*c,.88*b,.31*c);X(a,1.17*b,.76*c,.82*b,.8*c,.9*b,1*c);Hf(a);b=a.m;b.o=new V(.05,.645);b.p= +new V(.884,.908);N(a);return b},BpmnActivityLoop:function(a,b,c){a=L();var d=4*(Math.SQRT2-1)/3*.5;W(a,.65*b,1*c,!1);X(a,(1-d+0)*b,1*c,1*b,(.5+d+0)*c,1*b,.5*c);X(a,1*b,(.5-d+0)*c,(.5+d+0)*b,0*c,.5*b,0*c);X(a,(.5-d+0)*b,0*c,0*b,(.5-d+0)*c,0*b,.5*c);X(a,0*b,(.5+d+0)*c,(.5-d+0)*b,1*c,.35*b,.98*c);a.moveTo(.25*b,.8*c);a.lineTo(.35*b,1*c);a.lineTo(.1*b,1*c);b=a.m;N(a);return b},BpmnActivityParallel:function(a,b,c){a=L();W(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(.5*b,0);a.lineTo(.5*b,1*c);a.moveTo(1*b,0);a.lineTo(1* +b,1*c);b=a.m;N(a);return b},BpmnActivitySequential:function(a,b,c){a=L();W(a,0,0,!1);a.lineTo(1*b,0);a.moveTo(0,.5*c);a.lineTo(1*b,.5*c);a.moveTo(0,1*c);a.lineTo(1*b,1*c);b=a.m;N(a);return b},BpmnActivityAdHoc:function(a,b,c){a=L();W(a,0,0,!1);W(a,1*b,1*c,!1);W(a,0,.5*c,!1);X(a,.2*b,.35*c,.3*b,.35*c,.5*b,.5*c);X(a,.7*b,.65*c,.8*b,.65*c,1*b,.5*c);b=a.m;N(a);return b},BpmnActivityCompensation:function(a,b,c){a=L();W(a,0,.5*c,!0);a.lineTo(.5*b,0);a.lineTo(.5*b,.5*c);a.lineTo(1*b,1*c);a.lineTo(1*b,0); +a.lineTo(.5*b,.5*c);a.lineTo(.5*b,1*c);Hf(a);b=a.m;N(a);return b},BpmnTaskMessage:function(a,b,c){a=L();W(a,0,.2*c,!0);a.lineTo(1*b,.2*c);a.lineTo(1*b,.8*c);a.lineTo(0,.8*c);a.lineTo(0,.8*c);Hf(a);W(a,0,.2*c,!1);a.lineTo(.5*b,.5*c);a.lineTo(1*b,.2*c);a.Pa(!1);b=a.m;N(a);return b},BpmnTaskScript:function(a,b,c){a=L();W(a,.7*b,1*c,!0);a.lineTo(.3*b,1*c);X(a,.6*b,.5*c,0,.5*c,.3*b,0);a.lineTo(.7*b,0);X(a,.4*b,.5*c,1*b,.5*c,.7*b,1*c);Hf(a);W(a,.45*b,.73*c,!1);a.lineTo(.7*b,.73*c);a.moveTo(.38*b,.5*c); +a.lineTo(.63*b,.5*c);a.moveTo(.31*b,.27*c);a.lineTo(.56*b,.27*c);a.Pa(!1);b=a.m;N(a);return b},BpmnTaskUser:function(a,b,c){a=L();W(a,0,0,!1);W(a,.335*b,(1-.555)*c,!0);a.lineTo(.335*b,.595*c);a.lineTo(.665*b,.595*c);a.lineTo(.665*b,(1-.555)*c);X(a,.88*b,.46*c,.98*b,.54*c,1*b,.68*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.68*c);X(a,.02*b,.54*c,.12*b,.46*c,.335*b,(1-.555)*c);a.lineTo(.365*b,.405*c);var d=.5-.285,e=Math.PI/4,f=4*(1-Math.cos(e))/(3*Math.sin(e)),e=f*d,f=f*d;X(a,(.5-(e+d)/2)*b,(d+ +(d+f)/2)*c,(.5-d)*b,(d+f)*c,(.5-d)*b,d*c);X(a,(.5-d)*b,(d-f)*c,(.5-e)*b,(d-d)*c,.5*b,(d-d)*c);X(a,(.5+e)*b,(d-d)*c,(.5+d)*b,(d-f)*c,(.5+d)*b,d*c);X(a,(.5+d)*b,(d+f)*c,(.5+(e+d)/2)*b,(d+(d+f)/2)*c,.635*b,.405*c);a.lineTo(.635*b,.405*c);a.lineTo(.665*b,(1-.555)*c);a.lineTo(.665*b,.595*c);a.lineTo(.335*b,.595*c);W(a,.2*b,1*c,!1);a.lineTo(.2*b,.8*c);W(a,.8*b,1*c,!1);a.lineTo(.8*b,.8*c);b=a.m;N(a);return b},BpmnEventConditional:function(a,b,c){a=L();W(a,.1*b,0,!0);a.lineTo(.9*b,0);a.lineTo(.9*b,1*c);a.lineTo(.1* +b,1*c);Hf(a);W(a,.2*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.moveTo(.2*b,.4*c);a.lineTo(.8*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.2*b,.8*c);a.lineTo(.8*b,.8*c);a.Pa(!1);b=a.m;N(a);return b},BpmnEventError:function(a,b,c){a=L();W(a,0,1*c,!0);a.lineTo(.33*b,0);a.lineTo(.66*b,.5*c);a.lineTo(1*b,0);a.lineTo(.66*b,1*c);a.lineTo(.33*b,.5*c);Hf(a);b=a.m;N(a);return b},BpmnEventEscalation:function(a,b,c){a=L();W(a,0,0,!1);W(a,1*b,1*c,!1);W(a,.1*b,1*c,!0);a.lineTo(.5*b,0);a.lineTo(.9*b,1*c);a.lineTo(.5* +b,.5*c);Hf(a);b=a.m;N(a);return b},BpmnEventTimer:function(a,b,c){a=L();var d=.5*U.la;W(a,1*b,.5*c,!0);X(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);X(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);X(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);X(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);W(a,.5*b,0,!1);a.lineTo(.5*b,.15*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,.85*c);a.moveTo(0,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(1*b,.5*c);a.lineTo(.85*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.58*b,.1*c);a.moveTo(.5*b,.5*c);a.lineTo(.78*b,.54*c);a.Pa(!1);b=a.m; +b.fd=fj;N(a);return b}};for(var pp in U.Sf)U.Sf[pp.toLowerCase()]=pp; +U.Su={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8", BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4", BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8", TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4", @@ -1420,631 +1349,606 @@ BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z", TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z", OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8", -OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};M.sK=function(){if(null!==M.Ew){for(var a in M.Ew){var b=Dd(M.Ew[a],!1);M.mj[a]=b;a.toLowerCase()!==a&&(M.mj[a.toLowerCase()]=a)}M.Ew=null}}; -M.yE=function(a){M.sK();var b=M.mj[a];if(void 0===b){b=a.toLowerCase();if("none"===b)return"None";b=M.mj[b]}return"string"===typeof b?b:b instanceof kd?a:null}; -function z(a){0===arguments.length?G.call(this):G.call(this,a);this.S=311807;this.al=this.oi="";this.As=this.xs=this.Js=this.zr=null;this.Ls="";this.Yg=this.Ks=this.Gm=null;this.zs="";this.Go=null;this.ys=(new na(NaN,NaN)).freeze();this.Bs="";this.Ho=null;this.we="";this.Ev=this.Iq=this.Pk=null;this.jh=(new I(NaN,NaN)).freeze();this.Hr="";this.dl=null;this.Ir=Ub;this.Sr=M.yH;this.Kr=M.xH;this.Sq=null;this.Ar=Mn;this.Jm=(new I(6,6)).freeze();this.Im="gray";this.Hm=4;this.hD=-1;this.IH=new x;this.fl= -null;this.Ij=NaN}w.Na(z,G);w.ma("Part",z);z.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.S=this.S&-4097|49152;a.oi=this.oi;a.al=this.al;a.zr=this.zr;a.Js=this.Js;a.xs=this.xs;a.As=this.As;a.Ls=this.Ls;a.Ks=this.Ks;a.Yg=null;a.zs=this.zs;a.ys.assign(this.ys);a.Bs=this.Bs;a.we=this.we;a.Iq=this.Iq;a.jh.assign(this.jh);a.Hr=this.Hr;a.Ir=this.Ir.ea();a.Sr=this.Sr.ea();a.Kr=this.Kr.ea();a.Sq=this.Sq;a.Ar=this.Ar;a.Jm.assign(this.Jm);a.Im=this.Im;a.Hm=this.Hm}; -z.prototype.ai=function(a){G.prototype.ai.call(this,a);a.El();a.Gm=null;a.Go=null;a.Ho=null;a.dl=null;a.fl=null};z.prototype.toString=function(){var a=w.Jg(Object.getPrototypeOf(this))+"#"+w.cd(this);null!==this.data&&(a+="("+ha(this.data)+")");return a};z.LayoutNone=0;var Rj;z.LayoutAdded=Rj=1;var Xj;z.LayoutRemoved=Xj=2;z.LayoutShown=4;z.LayoutHidden=8;z.LayoutNodeSized=16;var Mk;z.LayoutGroupLayout=Mk=32;z.LayoutNodeReplaced=64;var Mn;z.LayoutStandard=Mn=Rj|Xj|28|Mk|64;z.LayoutAll=16777215; -z.prototype.yn=function(a,b,c,d,f,g,h){var k=this.i;null!==k&&(a===we&&"elements"===b?f instanceof G&&Sj(f,function(a){Tj(k,a)}):a===xe&&"elements"===b&&f instanceof G&&Sj(f,function(a){Wj(k,a)}),k.Nc(a,b,c,d,f,g,h))};z.prototype.updateTargetBindings=z.prototype.Xb=function(a){G.prototype.Xb.call(this,a);if(null!==this.data){a=this.Ba.q;for(var b=a.length,c=0;ck&&a.y>l&&a.rightk&&b.y>l&&b.right=c.cG)){this.S^=4096;var d=!1;if(null!==c){d=c.fb;c.fb=!0;var f=c.selection;f.Sa();a?f.add(this):f.remove(this);f.freeze()}this.j("isSelected",b,a);this.ne();a=this.OG;null!==a&&a(this);null!==c&&(c.$e(),c.fb=d)}}});w.g(z,"isHighlighted",z.prototype.Lg); -w.defineProperty(z,{Lg:"isHighlighted"},function(){return 0!==(this.S&524288)},function(a){var b=0!==(this.S&524288);if(b!==a){t&&w.h(a,"boolean",z,"isHighlighted");this.S^=524288;var c=this.i;null!==c&&(c=c.mx,c.Sa(),a?c.add(this):c.remove(this),c.freeze());this.j("isHighlighted",b,a);this.ra()}});w.g(z,"isShadowed",z.prototype.fi); -w.defineProperty(z,{fi:"isShadowed"},function(){return 0!==(this.S&8192)},function(a){var b=0!==(this.S&8192);b!==a&&(t&&w.h(a,"boolean",z,"isShadowed"),this.S^=8192,this.j("isShadowed",b,a),this.ra())});function Kj(a){return 0!==(a.S&32768)}function On(a,b){a.S=b?a.S|32768:a.S&-32769}function wl(a,b){a.S=b?a.S|65536:a.S&-65537}function Ri(a){return 0!==(a.S&131072)}z.prototype.Mf=function(a){this.S=a?this.S|131072:this.S&-131073};function Un(a,b){a.S=b?a.S|1048576:a.S&-1048577} -w.g(z,"isAnimated",z.prototype.GA);w.defineProperty(z,{GA:"isAnimated"},function(){return 0!==(this.S&262144)},function(a){var b=0!==(this.S&262144);b!==a&&(t&&w.h(a,"boolean",z,"isAnimated"),this.S^=262144,this.j("isAnimated",b,a))});w.g(z,"selectionObjectName",z.prototype.su);w.defineProperty(z,{su:"selectionObjectName"},function(){return this.Ls},function(a){var b=this.Ls;b!==a&&(t&&w.h(a,"string",z,"selectionObjectName"),this.Ls=a,this.Gm=null,this.j("selectionObjectName",b,a))}); -w.g(z,"selectionAdornmentTemplate",z.prototype.NG);w.defineProperty(z,{NG:"selectionAdornmentTemplate"},function(){return this.Js},function(a){var b=this.Js;b!==a&&(t&&w.l(a,da,z,"selectionAdornmentTemplate"),this instanceof F&&(a.type=kh),this.Js=a,this.j("selectionAdornmentTemplate",b,a))});w.A(z,{An:"selectionObject"},function(){if(null===this.Gm){var a=this.su;null!==a&&""!==a?(a=this.ye(a),this.Gm=null!==a?a:this):this instanceof F?(a=this.path,this.Gm=null!==a?a:this):this.Gm=this}return this.Gm}); -w.g(z,"selectionChanged",z.prototype.OG);w.defineProperty(z,{OG:"selectionChanged"},function(){return this.Ks},function(a){var b=this.Ks;b!==a&&(null!==a&&w.h(a,"function",z,"selectionChanged"),this.Ks=a,this.j("selectionChanged",b,a))});w.g(z,"resizeAdornmentTemplate",z.prototype.sB);w.defineProperty(z,{sB:"resizeAdornmentTemplate"},function(){return this.xs},function(a){var b=this.xs;b!==a&&(t&&w.l(a,da,z,"resizeAdornmentTemplate"),this.xs=a,this.j("resizeAdornmentTemplate",b,a))}); -w.g(z,"resizeObjectName",z.prototype.tB);w.defineProperty(z,{tB:"resizeObjectName"},function(){return this.zs},function(a){var b=this.zs;b!==a&&(t&&w.h(a,"string",z,"resizeObjectName"),this.zs=a,this.Go=null,this.j("resizeObjectName",b,a))});w.A(z,{EG:"resizeObject"},function(){if(null===this.Go){var a=this.tB;null!==a&&""!==a?(a=this.ye(a),this.Go=null!==a?a:this):this.Go=this}return this.Go});w.g(z,"resizeCellSize",z.prototype.DG); -w.defineProperty(z,{DG:"resizeCellSize"},function(){return this.ys},function(a){var b=this.ys;b.O(a)||(t&&w.l(a,na,z,"resizeCellSize"),this.ys=a=a.ea(),this.j("resizeCellSize",b,a))});w.g(z,"rotateAdornmentTemplate",z.prototype.FG);w.defineProperty(z,{FG:"rotateAdornmentTemplate"},function(){return this.As},function(a){var b=this.As;b!==a&&(t&&w.l(a,da,z,"rotateAdornmentTemplate"),this.As=a,this.j("rotateAdornmentTemplate",b,a))});w.g(z,"rotateObjectName",z.prototype.HG); -w.defineProperty(z,{HG:"rotateObjectName"},function(){return this.Bs},function(a){var b=this.Bs;b!==a&&(t&&w.h(a,"string",z,"rotateObjectName"),this.Bs=a,this.Ho=null,this.j("rotateObjectName",b,a))});w.A(z,{GG:"rotateObject"},function(){if(null===this.Ho){var a=this.HG;null!==a&&""!==a?(a=this.ye(a),this.Ho=null!==a?a:this):this.Ho=this}return this.Ho});w.g(z,"text",z.prototype.text); -w.defineProperty(z,{text:"text"},function(){return this.we},function(a){var b=this.we;b!==a&&(t&&w.h(a,"string",z,"text"),this.we=a,this.j("text",b,a))});w.g(z,"containingGroup",z.prototype.Wa); -w.defineProperty(z,{Wa:"containingGroup"},function(){return this.Pk},function(a){if(this.Td()){var b=this.Pk;if(b!==a){t&&null!==a&&w.l(a,E,z,"containingGroup");null===a||this!==a&&!a.ei(this)||(this===a&&w.m("Cannot make a Group a member of itself: "+this.toString()),w.m("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.L(Xj);var c=this.i;null!==b?Vn(b,this):this instanceof E&&null!==c&&c.ml.remove(this);this.Pk=a;null!==a?Wn(a,this):this instanceof -E&&null!==c&&c.ml.add(this);this.L(Rj);if(null!==c){var d=this.data,f=c.ia;null!==d&&f instanceof U&&f.Px(d,f.Hb(null!==a?a.data:null))}d=this.hA;null!==d&&(f=!0,null!==c&&(f=c.Ta,c.Ta=!0),d(this,b,a),null!==c&&(c.Ta=f));if(this instanceof E)for(c=new K(z),Bf(c,this,!0,0,!0),c=c.k;c.next();)if(d=c.value,d instanceof C)for(d=d.Xd;d.next();)Bk(d.value);if(this instanceof C)for(d=this.Xd;d.next();)Bk(d.value);this.j("containingGroup",b,a);null!==a&&a.Sx()}}else w.m("cannot set the Part.containingGroup of a Link or Adornment")}); -e=z.prototype;e.El=function(){var a=this.Wa;null!==a&&(a.W(),null!==a.Yb&&a.Yb.W(),a.Gf())};e.ra=function(){var a=this.i;null!==a&&!Jj(this)&&!Kj(this)&&this.Oa()&&this.Qb.J()&&a.ra(Wi(this,this.Qb))};e.Kt=function(a){var b=this.Pk;null===b||a||Wn(b,this)};e.Lt=function(a){var b=this.Pk;null===b||a||Vn(b,this)};e.en=function(){var a=this.data;if(null!==a){var b=this.i;null!==b&&(b=b.ia,null!==b&&b.nB(a))}};w.g(z,"containingGroupChanged",z.prototype.hA); -w.defineProperty(z,{hA:"containingGroupChanged"},function(){return this.Iq},function(a){var b=this.Iq;b!==a&&(null!==a&&w.h(a,"function",z,"containingGroupChanged"),this.Iq=a,this.j("containingGroupChanged",b,a))});z.prototype.findSubGraphLevel=function(){return Xn(this,this)};function Xn(a,b){var c=b.Wa;return null!==c?1+Xn(a,c):b instanceof C&&(c=b.ud,null!==c)?Xn(a,c):0}z.prototype.findTopLevelPart=function(){return Yn(this,this)}; -function Yn(a,b){var c=b.Wa;return null!==c?Yn(a,c):b instanceof C&&(c=b.ud,null!==c)?Yn(a,c):b}w.A(z,{vx:"isTopLevel"},function(){return null!==this.Wa||this instanceof C&&this.Hf?!1:!0});z.prototype.isMemberOf=z.prototype.ei=function(a){return a instanceof E?Zn(this,this,a):!1};function Zn(a,b,c){if(b===c||null===c)return!1;var d=b.Wa;return null===d||d!==c&&!Zn(a,d,c)?b instanceof C&&(b=b.ud,null!==b)?Zn(a,b,c):!1:!0} -z.prototype.findCommonContainingGroup=z.prototype.iJ=function(a){if(null===a)return null;t&&w.l(a,z,z,"findCommonContainingGroup:other");if(this===a)return this instanceof E?this:null;for(var b=this;null!==b;)b instanceof E&&Un(b,!0),b=b.Wa;for(var c=null,b=a;null!==b;){if(0!==(b.S&1048576)){c=b;break}b=b.Wa}for(b=this;null!==b;)b instanceof E&&Un(b,!1),b=b.Wa;return c};w.g(z,"layoutConditions",z.prototype.WF); -w.defineProperty(z,{WF:"layoutConditions"},function(){return this.Ar},function(a){var b=this.Ar;b!==a&&(t&&w.h(a,"number",z,"layoutConditions"),this.Ar=a,this.j("layoutConditions",b,a))});z.prototype.canLayout=function(){if(!this.tx||!this.Oa())return!1;var a=this.layer;return null!==a&&a.Ec||this instanceof C&&this.Hf?!1:!0}; -z.prototype.invalidateLayout=z.prototype.L=function(a){void 0===a&&(a=16777215);var b;this.tx&&0!==(a&this.WF)?(b=this.layer,null!==b&&b.Ec||this instanceof C&&this.Hf?b=!1:(b=this.i,b=null!==b&&b.oa.zb?!1:!0)):b=!1;if(b)if(b=this.Pk,null!==b){var c=b.Nb;null!==c?c.L():b.L(a)}else a=this.i,null!==a&&(c=a.Nb,null!==c&&c.L())};function Vj(a){if(!a.Oa())return!1;a=a.layer;return null!==a&&a.Ec?!1:!0}w.g(z,"dragComputation",z.prototype.mA); -w.defineProperty(z,{mA:"dragComputation"},function(){return this.Sq},function(a){var b=this.Sq;b!==a&&(null!==a&&w.h(a,"function",z,"dragComputation"),this.Sq=a,this.j("dragComputation",b,a))});w.g(z,"shadowOffset",z.prototype.TG);w.defineProperty(z,{TG:"shadowOffset"},function(){return this.Jm},function(a){var b=this.Jm;b.O(a)||(t&&w.l(a,I,z,"shadowOffset"),this.Jm=a=a.ea(),this.ra(),this.j("shadowOffset",b,a))});w.g(z,"shadowColor",z.prototype.shadowColor); -w.defineProperty(z,{shadowColor:"shadowColor"},function(){return this.Im},function(a){var b=this.Im;b!==a&&(t&&w.h(a,"string",z,"shadowColor"),this.Im=a,this.ra(),this.j("shadowColor",b,a))});w.g(z,"shadowBlur",z.prototype.shadowBlur);w.defineProperty(z,{shadowBlur:"shadowBlur"},function(){return this.Hm},function(a){var b=this.Hm;b!==a&&(t&&w.h(a,"number",z,"shadowBlur"),this.Hm=a,this.ra(),this.j("shadowBlur",b,a))}); -function da(a){0===arguments.length?z.call(this,Qh):z.call(this,a);this.We="Adornment";this.Ob=null;this.S&=-257;this.jh=new I(NaN,NaN);this.sj=new J(x);this.Yb=null}w.Na(da,z);w.ma("Adornment",da);da.prototype.toString=function(){var a=this.Yh;return"Adornment("+this.Kc+")"+(null!==a?a.toString():"")};da.prototype.updateRelationshipsFromData=function(){}; -da.prototype.Wt=function(){var a=this.Ac.Z,b=this.Ac;if(a instanceof F&&b instanceof W){var c=a.path,b=c.Ya;a.Wt();for(var b=c.Ya,a=this.Ba.q,c=a.length,d=0;da&&(a=1);var b=this.i;if(null!==b&&!b.oe){var c=b.Vb;0!==b.oa.cf&&c.Ml();b.oe=!0;var c=b.td,d=new K(C);d.add(this);mo(this,d,c,a,this.Xc);b.oe=!1}}; -function mo(a,b,c,d,f){if(1a&&(a=2);var b=this.i;if(null!==b&&!b.oe){var c=b.Vb;0!==b.oa.cf&&c.Ml();b.oe=!0;var d=b.td,f=new K(C);f.add(this);oo(this,f,d,a,this.Xc,c,this);b.oe=!1}};function oo(a,b,c,d,f,g,h){for(var k=c?a.ax():a.Hg();k.next();){var l=k.value;l.Fc&&(f||l.Bg||l.hc(),l=l.xA(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),f||(l.Ye(!0),l.El(),Pi(g,l,h)),2a&&(a-=180);break;case uo:a=M.du(c+90);90a&&(a-=180);break;case vo:a=M.du(c-90);90a&&(a-=180);break;case wo:a=M.du(c);if(45a||225a)return 0;90a&&(a-=180)}return M.du(a)};w.g(F,"fromNode",F.prototype.Y); -w.defineProperty(F,{Y:"fromNode"},function(){return this.pg},function(a){var b=this.pg;if(b!==a){t&&null!==a&&w.l(a,C,F,"fromNode");var c=this.pd;null!==b&&(this.Ag!==b&&jo(b,this,c),xo(this),this.L(Xj));this.pg=a;this.xi=null;this.hc();var d=this.i;if(null!==d){var f=this.data,g=d.ia;if(null!==f)if(g instanceof U){var h=null!==a?a.data:null;g.Ox(f,g.Hb(h))}else g instanceof Ce&&(h=null!==a?a.data:null,d.td?g.wh(f,g.Hb(h)):(null!==b&&g.wh(b.data,void 0),g.wh(h,g.Hb(null!==this.Ag?this.Ag.data:null))))}f= -this.pd;g=this.tA;null!==g&&(h=!0,null!==d&&(h=d.Ta,d.Ta=!0),g(this,c,f),null!==d&&(d.Ta=h));null!==a&&(this.Ag!==a&&io(a,this,f),yo(this),this.L(Rj));this.j("fromNode",b,a);Bk(this)}});w.g(F,"fromPortId",F.prototype.Ef); -w.defineProperty(F,{Ef:"fromPortId"},function(){return this.Ih},function(a){var b=this.Ih;if(b!==a){t&&w.h(a,"string",F,"fromPortId");var c=this.pd;null!==c&&ho(this.Y,c);xo(this);this.Ih=a;var d=this.pd;null!==d&&ho(this.Y,d);var f=this.i;if(null!==f){var g=this.data,h=f.ia;null!==g&&h instanceof U&&h.DB(g,a)}c!==d&&(this.xi=null,this.hc(),g=this.tA,null!==g&&(h=!0,null!==f&&(h=f.Ta,f.Ta=!0),g(this,c,d),null!==f&&(f.Ta=h)));yo(this);this.j("fromPortId",b,a)}}); -w.A(F,{pd:"fromPort"},function(){var a=this.pg;return null===a?null:a.yl(this.Ih)});w.g(F,"fromPortChanged",F.prototype.tA);w.defineProperty(F,{tA:"fromPortChanged"},function(){return this.$q},function(a){var b=this.$q;b!==a&&(null!==a&&w.h(a,"function",F,"fromPortChanged"),this.$q=a,this.j("fromPortChanged",b,a))});w.g(F,"toNode",F.prototype.fa); -w.defineProperty(F,{fa:"toNode"},function(){return this.Ag},function(a){var b=this.Ag;if(b!==a){t&&null!==a&&w.l(a,C,F,"toNode");var c=this.Zd;null!==b&&(this.pg!==b&&jo(b,this,c),xo(this),this.L(Xj));this.Ag=a;this.xi=null;this.hc();var d=this.i;if(null!==d){var f=this.data,g=d.ia;if(null!==f)if(g instanceof U){var h=null!==a?a.data:null;g.Qx(f,g.Hb(h))}else g instanceof Ce&&(h=null!==a?a.data:null,d.td?(null!==b&&g.wh(b.data,void 0),g.wh(h,g.Hb(null!==this.pg?this.pg.data:null))):g.wh(f,g.Hb(h)))}f= -this.Zd;g=this.PB;null!==g&&(h=!0,null!==d&&(h=d.Ta,d.Ta=!0),g(this,c,f),null!==d&&(d.Ta=h));null!==a&&(this.pg!==a&&io(a,this,f),yo(this),this.L(Rj));this.j("toNode",b,a);Bk(this)}});w.g(F,"toPortId",F.prototype.kg); -w.defineProperty(F,{kg:"toPortId"},function(){return this.Wh},function(a){var b=this.Wh;if(b!==a){t&&w.h(a,"string",F,"toPortId");var c=this.Zd;null!==c&&ho(this.fa,c);xo(this);this.Wh=a;var d=this.Zd;null!==d&&ho(this.fa,d);var f=this.i;if(null!==f){var g=this.data,h=f.ia;null!==g&&h instanceof U&&h.HB(g,a)}c!==d&&(this.xi=null,this.hc(),g=this.PB,null!==g&&(h=!0,null!==f&&(h=f.Ta,f.Ta=!0),g(this,c,d),null!==f&&(f.Ta=h)));yo(this);this.j("toPortId",b,a)}}); -w.A(F,{Zd:"toPort"},function(){var a=this.Ag;return null===a?null:a.yl(this.Wh)});w.g(F,"toPortChanged",F.prototype.PB);w.defineProperty(F,{PB:"toPortChanged"},function(){return this.Zs},function(a){var b=this.Zs;b!==a&&(null!==a&&w.h(a,"function",F,"toPortChanged"),this.Zs=a,this.j("toPortChanged",b,a))}); -w.defineProperty(F,{Bb:"fromSpot"},function(){return null!==this.V?this.V.Aj:Kc},function(a){null===this.V&&this.Ve();var b=this.V.Aj;b.O(a)||(t&&w.l(a,P,F,"fromSpot"),a=a.ea(),this.V.Aj=a,this.j("fromSpot",b,a),this.hc())}); -w.defineProperty(F,{tk:"fromEndSegmentLength"},function(){return null!==this.V?this.V.yj:NaN},function(a){null===this.V&&this.Ve();var b=this.V.yj;b!==a&&(t&&w.h(a,"number",F,"fromEndSegmentLength"),0>a&&w.ka(a,">= 0",F,"fromEndSegmentLength"),this.V.yj=a,this.j("fromEndSegmentLength",b,a),this.hc())}); -w.defineProperty(F,{op:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.xj:ao},function(a){null===this.V&&this.Ve();var b=this.V.xj;b!==a&&(t&&w.Ca(a,C,F,"fromEndSegmentDirection"),this.V.xj=a,this.j("fromEndSegmentDirection",b,a),this.hc())});w.defineProperty(F,{pp:"fromShortLength"},function(){return null!==this.V?this.V.zj:NaN},function(a){null===this.V&&this.Ve();var b=this.V.zj;b!==a&&(t&&w.h(a,"number",F,"fromShortLength"),this.V.zj=a,this.j("fromShortLength",b,a),this.hc())}); -w.defineProperty(F,{Db:"toSpot"},function(){return null!==this.V?this.V.ak:Kc},function(a){null===this.V&&this.Ve();var b=this.V.ak;b.O(a)||(t&&w.l(a,P,F,"toSpot"),a=a.ea(),this.V.ak=a,this.j("toSpot",b,a),this.hc())}); -w.defineProperty(F,{zk:"toEndSegmentLength"},function(){return null!==this.V?this.V.Zj:NaN},function(a){null===this.V&&this.Ve();var b=this.V.Zj;b!==a&&(t&&w.h(a,"number",F,"toEndSegmentLength"),0>a&&w.ka(a,">= 0",F,"toEndSegmentLength"),this.V.Zj=a,this.j("toEndSegmentLength",b,a),this.hc())}); -w.defineProperty(F,{mq:"toEndSegmentDirection"},function(){return null!==this.V?this.V.Yj:ao},function(a){null===this.V&&this.Ve();var b=this.V.Yj;b!==a&&(t&&w.Ca(a,C,F,"toEndSegmentDirection"),this.V.Yj=a,this.j("toEndSegmentDirection",b,a),this.hc())});w.defineProperty(F,{oq:"toShortLength"},function(){return null!==this.V?this.V.$j:NaN},function(a){null===this.V&&this.Ve();var b=this.V.$j;b!==a&&(t&&w.h(a,"number",F,"toShortLength"),this.V.$j=a,this.j("toShortLength",b,a),this.hc())}); -function Bk(a){var b=a.Y,c=a.fa;null!==b?null!==c?zo(a,b.iJ(c)):zo(a,null):zo(a,null)}function zo(a,b){var c=a.Pk;if(c!==b){null!==c&&Vn(c,a);a.Pk=b;null!==b&&Wn(b,a);var d=a.hA;if(null!==d){var f=!0,g=a.i;null!==g&&(f=g.Ta,g.Ta=!0);d(a,c,b);null!==g&&(g.Ta=f)}!a.Bg||a.VD!==c&&a.XD!==c||a.hc()}}F.prototype.El=function(){var a=this.Wa;null!==a&&this.Y!==a&&this.fa!==a&&z.prototype.El.call(this)}; -F.prototype.getOtherNode=F.prototype.xA=function(a){t&&w.l(a,C,F,"getOtherNode:node");var b=this.Y;return a===b?this.fa:b};F.prototype.getOtherPort=function(a){t&&w.l(a,T,F,"getOtherPort:port");var b=this.pd;return a===b?this.Zd:b};w.A(F,{SK:"isLabeledLink"},function(){return null===this.Ge?!1:0=d&&(h=d-1);var l=this.n(h-1),g=this.n(h);M.$o(f.x,f.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);f=g}else for(f=this.n(0),g=this.n(1),b=Math.min(f.x,g.x),c=Math.min(f.y,g.y),a.o(f.x,f.y,0,0),a.lj(g),h=2;hc&&(c=-c)):M.yb(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.nk(d)),g.push(c),f+=c;for(d=h=c=0;cf/2)break;c+=d;h++}w.Aa(g);b=this.n(h);g=this.n(h+1);b.x===g.x?b.y>g.y?a.o(b.x,b.y-(f/2-c)):a.o(b.x,b.y+(f/2-c)):b.y===g.y?b.x>g.x?a.o(b.x-(f/2-c),b.y):a.o(b.x+(f/2-c),b.y):(f=(f/2-c)/d,a.o(b.x+f*(g.x-b.x),b.y+f*(g.y-b.y)));return a};w.A(F,{fG:"midAngle"},function(){this.updateRoute();return this.computeMidAngle()}); -F.prototype.computeMidAngle=function(){var a=this.qa;if(2>a)return NaN;if(this.computeCurve()===wh&&4<=a&&!this.mc){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),a=this.n(c),b=this.n(c+1),d=this.n(c+2),c=this.n(c+3);return M.xI(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0f?a.bj(b):b.bj(d)};w.g(F,"points",F.prototype.points); -w.defineProperty(F,{points:"points"},function(){return this.Sc},function(a){var b=this.Sc;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var f=0;fp&&(u-=180));0>u?u+=360:360<=u&&(u-=360);k&&(v+=Math.abs(p));0===u?r=v:90===u?s=v:180===u?r=-v:270===u?s=-v:(r=v*Math.cos(u*Math.PI/180),s=v*Math.sin(u*Math.PI/180));if(g.Be()&&k){var A=c.xb(ac,w.P()),D=w.nc(A.x+1E3*r,A.y+1E3*s);this.getLinkPointFromPoint(b,c,A,D,!0,q);w.B(A);w.B(D)}}var v=this.getLinkPoint(d,f,h,!1,l,b,c),B=0,H=0,O=0;if(l||h!==Pb||k)A= -this.computeEndSegmentLength(d,f,h,!1),O=this.getLinkDirection(d,f,v,h,!1,l,b,c),k&&(O+=l?0:30,0>p&&(O+=180)),0>O?O+=360:360<=O&&(O-=360),k&&(A+=Math.abs(p)),0===O?B=A:90===O?H=A:180===O?B=-A:270===O?H=-A:(B=A*Math.cos(O*Math.PI/180),H=A*Math.sin(O*Math.PI/180)),h.Be()&&k&&(A=f.xb(ac,w.P()),D=w.nc(A.x+1E3*B,A.y+1E3*H),this.getLinkPointFromPoint(d,f,A,D,!1,v),w.B(A),w.B(D));f=q;if(l||g!==Pb||k)f=new I(q.x+r,q.y+s);c=v;if(l||h!==Pb||k)c=new I(v.x+B,v.y+H);!n&&!l&&g===Pb&&3k&&(m=-m),r=(0>h?-1:1)*m+q,s=l*(r-q)+u),q=a.x+2*g/3,u=a.y+2*h/3,v=q,B=u,M.I(h,0)?B=0h?-1:1)*m+q,B=l*(v-q)+u),this.ap(),this.Xh(a),this.pl(r,s),this.pl(v,B),this.Xh(n),this.Nf(0, -this.getLinkPoint(b,c,Pb,!0,!1,d,f)),this.Nf(3,this.getLinkPoint(d,f,Pb,!1,!1,b,c))):(a=d,d=this.getLinkPoint(b,c,Pb,!0,!1,a,f),f=this.getLinkPoint(a,f,Pb,!1,!1,b,c),this.hasCurviness()?(h=f.x-d.x,b=f.y-d.y,c=this.computeCurviness(),a=d.x+h/2,n=d.y+b/2,g=a,k=n,M.I(b,0)?k=0c&&(g=-g),g=(0>b?-1:1)*g+a,k=h*(g-a)+n),this.Xh(d),this.pl(g,k)):this.Xh(d),this.Xh(f)));return!0}; -function Fo(a,b){Math.abs(b.x-a.x)>Math.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} -F.prototype.getLinkPointFromPoint=function(a,b,c,d,f,g){void 0===g&&(g=new I);if(null===a||null===b)return g.assign(c),g;a.Oa()||(f=a.findVisibleNode(),null!==f&&f!==a&&(b=f.port));var h=f=0,k=0,l=0;a=null;f=b.T;null===f||f.lg()||(f=f.T);if(null===f)f=d.x,h=d.y,k=c.x,l=c.y;else{a=f.Xf;f=1/(a.m11*a.m22-a.m12*a.m21);var k=a.m22*f,l=-a.m12*f,m=-a.m21*f,n=a.m11*f,p=f*(a.m21*a.dy-a.m22*a.dx),q=f*(a.m12*a.dx-a.m11*a.dy);f=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.rp(f,h,k,l,g);null!== -a&&g.transform(a);return g};function Go(a,b){var c=b.ps;null===c&&(c=new Ho,c.port=b,c.Gc=b.Z,b.ps=c);return Io(c,a)} -F.prototype.getLinkPoint=function(a,b,c,d,f,g,h,k){void 0===k&&(k=new I);if(c.sd())return b.xb(c,k),k;if(c.Bp()&&(c=Go(this,b),null!==c)){k.assign(c.Ip);if(f&&this.ou===po){var l=Go(this,h);if(c.cn=m.x&&a.x<=m.x+m.width?k.x=a.x:a.y>=m.y&&a.y<=m.y+m.height&&(k.y=a.y);w.B(c);w.B(l)}}return k}g=b.xb(ac,w.P());l=c=null;this.qa>(f?6:2)?(l=d?this.n(1):this.n(this.qa-2),f&&(l=Fo(g,l.copy()))): -(c=w.P(),l=h.xb(ac,c),f&&(l=Fo(g,l)));this.getLinkPointFromPoint(a,b,g,l,d,k);w.B(g);null!==c&&w.B(c);return k}; -F.prototype.getLinkDirection=function(a,b,c,d,f,g,h,k){a:if(d.sd())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=f?this.n(1):this.n(this.qa-2),n=g?Fo(l,n.copy()):c):(m=w.P(),n=k.xb(ac,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.B(l);null!==m&&w.B(m)}d.Be()&&h.ei(a)&&(c+=180,360<=c&&(c-=360));a=ao;a=f?this.op:this.mq;a===ao&&(a=f?b.op:b.mq);switch(a){case bo:b=b.zl();c+=b;360<=c&&(c-=360);break;case ao:case ml:b=b.zl();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}; -F.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.Bp()&&(a=Go(this,b),null!==a))return a.Xw;a=NaN;a=d?this.tk:this.zk;null!==b&&isNaN(a)&&(a=d?b.tk:b.zk);isNaN(a)&&(a=10);return a};F.prototype.computeSpot=function(a){return a?Do(this,this.pd):Eo(this,this.Zd)};function Do(a,b){if(null===b)return ac;var c=a.Bb;c.Wc()&&(void 0===b&&(b=a.pd),null!==b&&(c=b.Bb));return c===Kc?Pb:c} -function Eo(a,b){if(null===b)return ac;var c=a.Db;c.Wc()&&(void 0===b&&(b=a.Zd),null!==b&&(c=b.Db));return c===Kc?Pb:c}F.prototype.computeOtherPoint=function(a,b){var c=b.xb(ac),d;d=b.ps;d=null!==d?Io(d,this):null;null!==d&&(c=d.Ip);return c};F.prototype.computeShortLength=function(a){return a?Jo(this):Ko(this)};function Jo(a){var b=a.pp;isNaN(b)&&(a=a.pd,null!==a&&(b=a.pp));return isNaN(b)?0:b}function Ko(a){var b=a.oq;isNaN(b)&&(a=a.Zd,null!==a&&(b=a.oq));return isNaN(b)?0:b} -F.prototype.rk=function(a,b,c,d,f,g){if(!1===this.tf)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=w.yh(),h.reset());h.multiply(this.transform);if(this.bn(a,h))return Wm(this,b,c,f),void 0===g&&w.mf(h),!0;if(this.Kg(a,h)){var k=!1;if(!this.gh)for(var l=this.Ba.q,m=l.length;m--;){var n=l[m];if(n.visible||n===this.cc){var p=n.da,q=this.Ga;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=w.yh();p.set(h);if(n instanceof G)k=n.rk(a,b,c,d,f,p);else if(this.path=== -n){var k=n,r=a,s=d,q=p;if(!1===k.tf)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,v=q;if(k.bn(u,v))k=!0;else{if(void 0===v&&(v=k.transform,u.jk(k.da))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,A=w.P(),D=w.P(),B=w.P(),H=w.yh();H.set(v);H.YA(k.transform);H.FA();D.x=r;D.y=s;D.transform(H);A.x=q;A.y=s;A.transform(H);v=!1;fn(k,A,D,B)?v=!0:(A.x=r,A.y=u,A.transform(H),fn(k,A,D,B)?v=!0:(D.x=q,D.y=u,D.transform(H),fn(k,A,D,B)?v=!0:(A.x=q,A.y=s,A.transform(H),fn(k,A,D,B)&&(v=!0))));w.mf(H); -w.B(A);w.B(D);w.B(B);k=v}}else k=k.bn(r,q)}else k=rl(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&f.add(n));w.mf(p)}}}void 0===g&&w.mf(h);return k||null!==this.background||null!==this.gk}void 0===g&&w.mf(h);return!1};w.A(F,{mc:"isOrthogonal"},function(){return 2===(this.Cm.value&2)});w.A(F,{ej:"isAvoiding"},function(){return 4===(this.Cm.value&4)});F.prototype.computeCurve=function(){if(null===this.xi){var a=this.pd,b=this.mc;this.xi=null!==a&&a===this.Zd&&!b}return this.xi?wh:this.Se}; -F.prototype.computeCorner=function(){if(this.Se===wh)return 0;var a=this.Pw;if(isNaN(a)||0>a)a=10;return a};F.prototype.computeCurviness=function(){var a=this.xt;if(isNaN(a)){var b=this.wf;if(0!==b){var a=10,c=this.i;null!==c&&(a=c.Jp);c=Math.abs(b);a=a/2+((c-1)/2|0)*a;0===c%2&&(a=-a);0>b&&(a=-a)}else a=10}return a};F.prototype.computeThickness=function(){var a=this.path;return null!==a?Math.max(a.ob,1):1};F.prototype.hasCurviness=function(){return!isNaN(this.xt)||0!==this.wf&&!this.mc}; -F.prototype.adjustPoints=function(a,b,c,d){var f=this.To;if(this.mc){if(f===Zl)return!1;f===$l&&(f=Yl)}switch(f){case Zl:var g=this.n(a),h=this.n(c);if(!g.O(b)||!h.O(d)){var f=g.x,g=g.y,k=h.x-f,l=h.y-g,m=Math.sqrt(k*k+l*l);if(!M.I(m,0)){var n=0;M.I(k,0)?n=0>l?-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;M.I(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.Nf(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.Nf(c,d)}}return!0;case $l:g=this.n(a);p=this.n(c);if(!g.O(b)||!p.O(d)){var f=g.x,g=g.y,h=p.x,p=p.y,m=(h-f)*(h-f)+(p-g)*(p-g),k=b.x,n=b.y,l=d.x,q=d.y,r=0,s=1,r=0!==l-k?(q-n)/(l-k):9E9;0!==r&&(s=Math.sqrt(1+1/(r*r)));this.Nf(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=f.da.copy(),k=g.da.copy();if(h.J()&&k.J()){h.ag(8,8);k.ag(8,8);h.lj(a);k.lj(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 I(c.x,a.y),m=new I(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.Ja(a)||h.Ja(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 I(Math.max((a.x+c.x)/2,a.x),a.y),m=new I(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.bottom)0===d&&(k.Ja(a)||h.Ja(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(0===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=a.x||a.x>=k.left&&a.x<=c.x){if(90===d||270===d)l=new I(Math.min((a.x+c.x)/2,a.x),a.y),m=new I(l.x,c.y)}else l.y=270=== -d||(0===d||180===d)&&c.ya.y||180===d&&c.xa.y||0===d&&c.x>a.x&&k.bottom>a.y)l=new I(a.x,c.y),m=new I((a.x+c.x)/2,c.y),270===d?(l.y=this.computeMidOrthoPosition(a.y,c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.yk.right)? -this.computeMidOrthoPosition(a.y,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.yk.left&&a.xh.right)270===d&&(k.Ja(a)||h.Ja(c))?l.x=this.computeMidOrthoPosition(a.x,c.x,!1):c.xa.x&&(270===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=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new I(a.x,Math.max((a.y+c.y)/2,a.y)),m=new I(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.Ja(a)||h.Ja(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 I(a.x,Math.min((a.y+c.y)/2,a.y)),m=new I(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xk&&0!==Mo(f,c.x,c.y)){No(this,f,c.x,c.y,d,!0);d=this.n(2);if(4>this.qa)0===b||180===b?(d.x=a.x,d.y=c.y):(d.x=c.x,d.y=a.y),this.ca(2,d.x,d.y),this.C(3,d.x,d.y);else if(c=this.n(3),0===b|| -180===b)M.I(d.x,c.x)?(b=0===b?Math.max(d.x,a.x):Math.min(d.x,a.x),this.ca(2,b,a.y),this.ca(3,b,c.y)):M.I(d.y,c.y)?(Math.abs(a.y-d.y)<=f.Xm/2&&(this.ca(2,d.x,a.y),this.ca(3,c.x,a.y)),this.C(2,d.x,a.y)):this.ca(2,a.x,d.y);else if(90===b||270===b)M.I(d.y,c.y)?(b=90===b?Math.max(d.y,a.y):Math.min(d.y,a.y),this.ca(2,a.x,b),this.ca(3,c.x,b)):M.I(d.x,c.x)?(Math.abs(a.x-d.x)<=f.Ym/2&&(this.ca(2,a.x,d.y),this.ca(3,a.x,c.y)),this.C(2,a.x,d.y)):this.ca(2,d.x,a.y);a=!0}else a=!1}else a=!1;a||(this.Xh(l),this.Xh(m))}}; -F.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2};function rg(a){if(!a.ej)return!1;var b=a.points.q,c=b.length;if(4>c)return!1;a=ga(a.i,!0,a.Wa,null);for(var d=1;da){var b=new kd(ld),c=new md(0,0);b.wb.add(c);return b}var d=!1,b=this.i;null!==b&&0!==b.oa.cf&&Ao(this)&&(d=!0);var c=b=0,f=this.n(0).copy(),g=f.copy(),b=this.Sc.q,h=this.computeCurve();if(h===wh&&3<=a&&!M.yb(this.Dn,0))if(3===a)var k=this.n(1),b=Math.min(f.x,k.x),c=Math.min(f.y,k.y),k=this.n(2),b=Math.min(b,k.x),c=Math.min(c,k.y);else{if(this.mc)for(k=0;k=a&& -(k=a-1),b=this.n(k),g.x=Math.min(b.x,g.x),g.y=Math.min(b.y,g.y);b=g.x;c=g.y}else{for(k=0;kA?r>q?(u.x=D-H,u.y=q-H,v.x=D+s,v.y=q+s):(u.x= -D-H,u.y=q+H,v.x=D+s,v.y=q-s):r>q?(u.x=D+H,u.y=q-H,v.x=D-s,v.y=q+s):(u.x=D+H,u.y=q+H,v.x=D-s,v.y=q-s));M.yb(A,D)&&M.yb(q,r)&&(q>p?(B>D?(u.x=D-H,u.y=q-H,v.x=D+s):(u.x=D+H,u.y=q-H,v.x=D-s),v.y=q+s):(B>D?(u.x=D-H,u.y=q+H,v.x=D+s):(u.x=D+H,u.y=q+H,v.x=D-s),v.y=q-s));if(M.yb(A,D)&&M.yb(D,B)||M.yb(p,q)&&M.yb(q,r))A=.5*(A+B),p=.5*(p+r),u.x=A,u.y=p,v.x=A,v.y=p;1===k?(f.x=.5*(d.x+m.x),f.y=.5*(d.y+m.y)):2===k&&M.yb(d.x,this.n(0).x)&&M.yb(d.y,this.n(0).y)&&(f.x=.5*(d.x+m.x),f.y=.5*(d.y+m.y));S(l,f.x-b,f.y-c, -h.x-b,h.y-c,m.x-b,m.y-c);g.set(h);f.set(a);d=m}}k=d.x;d=d.y;g=this.n(this.qa-1);k=.5*(k+g.x);d=.5*(d+g.y);S(l,a.x-b,a.y-c,k-b,d-c,g.x-b,g.y-c)}else for(k=3;k=a&&(k=a-1),g=this.n(k-1),f=this.n(k),k===a-1&&0!==Ko(this)&&(f=f.copy(),Oo(this,f,!1,M.Ak)),S(l,d.x-b,d.y-c,g.x-b,g.y-c,f.x-b,f.y-c);else{g=w.P();g.assign(this.n(0));for(k=1;k=a-1){g!==u&&(0!==Ko(this)&&(u=u.copy(),Oo(this,u,!1,M.Ak)),Ro(this,l,-b,-c,g,u,d));break}k=Po(this,u, -k+1,kn.x?u.x-s:u.x+s,H=v.y>u.y?u.y+D:u.y-D,Ro(this,f,h,m,n,new I(q,B),p),Ed(f,u.x+h,u.y+m,r+h,H+m),A.o(r,H))):M.I(n.x,u.x)&&M.I(u.y,v.y)?(s=this.computeCorner(),D=Math.min(s,Math.abs(u.y-n.y)/2),D=s=Math.min(D,Math.abs(v.x-u.x)/2),M.I(s,0)?(Ro(this,f,h,m,n,u,p),A.assign(u)): -(q=u.x,H=B=u.y,B=u.y>n.y?u.y-D:u.y+D,r=v.x>u.x?u.x+s:u.x-s,Ro(this,f,h,m,n,new I(q,B),p),Ed(f,u.x+h,u.y+m,r+h,H+m),A.o(r,H))):(Ro(this,f,h,m,n,u,p),A.assign(u))}w.B(g)}b=l.s;w.v(l)}return b};function Qo(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return M.yb(a,0)?b:M.yb(b,0)?a:Math.sqrt(a*a+b*b)} -function Oo(a,b,c,d){var f=a.qa;if(!(2>f))if(c){var g=a.n(1);c=g.x-d.x;d=g.y-d.y;g=Qo(b.x,b.y,c,d);0!==g&&(f=2===f?.5*g:g,a=Jo(a),a>f&&(a=f),c=a*(c-b.x)/g,a=a*(d-b.y)/g,b.x+=c,b.y+=a)}else g=a.n(f-2),c=g.x-d.x,d=g.y-d.y,g=Qo(b.x,b.y,c,d),0!==g&&(f=2===f?.5*g:g,a=Ko(a),a>f&&(a=f),c=a*(b.x-c)/g,a=a*(b.y-d)/g,b.x-=c,b.y-=a)} -function Po(a,b,c,d){for(var f=a.qa,g=b;M.yb(b.x,g.x)&&M.yb(b.y,g.y);){if(c>=f)return f-1;g=a.n(c++)}if(!M.yb(b.x,g.x)&&!M.yb(b.y,g.y))return c-1;for(var h=g;M.yb(b.x,g.x)&&M.yb(g.x,h.x)&&(!d||(b.y>=g.y?g.y>=h.y:g.y<=h.y))||M.yb(b.y,g.y)&&M.yb(g.y,h.y)&&(!d||(b.x>=g.x?g.x>=h.x:g.x<=h.x));){if(c>=f)return f-1;h=a.n(c++)}return c-2} -function Ro(a,b,c,d,f,g,h){if(!h&&Ao(a)){h=[];var k=0;a.Oa()&&(k=So(a,f,g,h));var l=f.x,l=f.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.Se===mh?R(b,n,p,!1,!1):S(b,l,q,n,q,n,p)}else if(M.I(f.x,g.x))if(f.yp-10)m--,p=Math.max(q-5,g.y);else break;q=g.x-10+c;n=g.x+c;p+=d;a.Se===mh?R(b,n,p,!1,!1):S(b,q,l,q,p,n,p)}}b.lineTo(g.x+c,g.y+d)} -function So(a,b,c,d){var f=a.i;if(null===f||b.O(c))return 0;for(f=f.rn;f.next();){var g=f.value;if(null!==g&&g.visible)for(var g=g.mb.q,h=g.length,k=0;kh.x&&n.x>m.x||m.xh.y&&n.y>m.y||m.yu&&Math.min(h,A)q&&!M.I(h,A)){n.x=u;n.y=q;n=!0;break a}}else if(!M.I(q,s)&&M.I(h,A)&&Math.min(q, -s)h&&Math.min(u,v)p&&!M.I(u,v)){n.x=p;n.y=h;n=!0;break a}n.x=0;n.y=0;n=!1}n&&(f?c.push(k.x):c.push(k.y));h=m}w.B(k)}w.A(F,{Gt:"firstPickIndex"},function(){return 2>=this.qa?0:this.mc||Do(this)!==Pb?1:0});w.A(F,{xx:"lastPickIndex"},function(){var a=this.qa;return 0===a?0:2>=a?a-1:this.mc||Eo(this)!==Pb?a-2:a-1});function Ao(a){a=a.Se;return a===lh||a===mh}function Co(a,b){if(b||Ao(a)){var c=a.i;null===c||c.gm.contains(a)||null===a.xz||c.gm.add(a,a.xz)}} -function oh(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Ec){var d=c.i;if(null!==d)for(var f=!1,d=d.rn;d.next();){var g=d.value;if(g.visible)if(g===c)for(var f=!0,h=!1,g=g.mb.q,k=g.length,l=0;lb.links.count)1===b.links.count&&(c=b.links.q[0],c.Pn=null,c.wf=0,c.hc()),c=b.Wp,null!==b&&null!==c.Ah&&c.Ah.remove(b),c=b.bu,null!==b&&null!==c.Ah&&c.Ah.remove(b);else for(c=Math.abs(c),a=0===c%2,b=b.links.k;b.next();){var d=b.value,f=Math.abs(d.wf),g=0===f%2;f>c&&a===g&&(d.wf=0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Sf=Math.floor((a.x-this.Gd)/this.Gd)*this.Gd;this.Tf=Math.floor((b-this.wd)/this.wd)*this.wd;this.Lr=Math.ceil((c+2*this.Gd)/this.Gd)*this.Gd;this.Mr=Math.ceil((d+2*this.wd)/this.wd)*this.wd;a=1+(Math.ceil((this.Lr-this.Sf)/this.Gd)|0);b=1+(Math.ceil((this.Mr-this.Tf)/this.wd)|0);if(null===this.pc||this.Omthis.Lr||a+cthis.Mr||b+da&&(c+=a,a=0);0>b&&(f+=b,b=0);if(0>c||0>f)return!0;d=Math.min(a+c-1,this.Om)|0;for(c=Math.min(b+f-1,this.Pm)|0;a<=d;a++)for(f=b;f<=c;f++)if(0===this.pc[a][f])return!1;return!0}; -function Wo(a,b,c,d,f,g,h,k,l){if(!(bh||cl)){var m,n;m=b|0;n=c|0;var p=a.pc[m][n];if(1<=p&&999999>p)for(f?n+=d:m+=d,p+=1;g<=m&&m<=h&&k<=n&&n<=l&&!(p>=a.pc[m][n]);)a.pc[m][n]=p,p+=1,f?n+=d:m+=d;m=f?n:m;if(f)if(0m;c+=d)Wo(a,b,c,1,!f,g,h,k,l),Wo(a,b,c,-1,!f,g,h,k,l);else if(0m;b+=d)Wo(a,b,c,1,!f,g,h,k,l),Wo(a,b,c,-1,!f,g,h, -k,l)}}function Xo(a,b,c,d,f,g,h,k,l,m,n){for(var p=b|0,q=c|0,r=a.pc[p][q];0===r&&p>k&&pm&&q=Math.abs(p-d)&&1>=Math.abs(q-f))return a.abort=!0,0;p=b|0;q=c|0;r=a.pc[p][q];b=1;for(a.pc[p][q]=b;0===r&&p>k&&pm&&q=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=g.x;b=g.y;d=g.x+g.width;var p=g.y+g.height,n=n-a.Sf,n=n/a.Gd;b-=a.Tf;b/=a.wd;d-=a.Sf;d/=a.Gd;p-=a.Tf;p/=a.wd;g=Math.max(0,Math.min(a.Om,n|0));d=Math.min(a.Om,Math.max(0,d|0));b=Math.max(0,Math.min(a.Pm,b|0));var p=Math.min(a.Pm,Math.max(0,p|0)),h=h|0,k=k|0,l=l|0, -m=m|0,n=h,q=k,r=0===c||90===c?1:-1;(c=90===c||270===c)?q=Xo(a,h,k,l,m,r,c,g,d,b,p):n=Xo(a,h,k,l,m,r,c,g,d,b,p);if(!a.abort){a:{c=0===f||90===f?1:-1;f=90===f||270===f;for(var r=l|0,s=m|0,u=a.pc[r][s];0===u&&r>g&&rb&&s=Math.abs(r-h)&&1>=Math.abs(s-k)){a.abort=!0;break a}r=l|0;s=m|0;u=a.pc[r][s];for(a.pc[r][s]=999999;0===u&&r>g&&rb&&s=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case w.Pc|w.gd:return c>a&&c<=180+a?180:270;case w.gd|w.Zc:return c>180-a&&c<=360-a?270:0;case w.Zc|w.Yc:return c>a&&c<=180+a?90:0;case w.Yc|w.Pc:return c>180-a&&c<=360-a?180:90;case w.Pc|w.gd|w.Zc:return 90180+a&&c<=360- -a?270:0;case w.gd|w.Zc|w.Yc:return 180a&&180>=c?90:0;case w.Zc|w.Yc|w.Pc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case w.Yc|w.Pc|w.gd:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(w.Pc|w.gd|w.Zc|w.Yc)&&(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} -function Io(a,b){var c=a.Og;if(0===c.length){a:if(!a.Vp){c=a.Vp;a.Vp=!0;var d,f=null,g=a.Gc,g=g instanceof E?g:null;if(null===g||g.Ud)d=a.Gc.jF(a.port.ed);else{if(!g.da.J()){a.Vp=c;break a}f=g;d=f.iF()}var h=a.Og.length=0,k=a.port.xb(Ub,w.P()),l=a.port.xb(ec,w.P()),g=w.yk(k.x,k.y,0,0);g.lj(l);w.B(k);w.B(l);k=w.nc(g.x+g.width/2,g.y+g.height/2);for(d=d.k;d.next();)if(l=d.value,l.Oa()){var m=Pb,n=l.pd===a.port||l.Y.ei(f),m=n?Do(l,a.port):Eo(l,a.port);if(m.Bp()&&(n=n?l.Zd:l.pd,null!==n)){var p=n.Z;if(null!== -p){var n=l.computeOtherPoint(p,n),p=k.bj(n),m=Yo(g,m,p,l.mc),q=0;0===m?(q=w.Zc,180Math.abs(N)?(B=Math.abs(N)/ -q,q=Math.abs(N)):B=1;break;case w.Pc:r>Math.abs(O)?(B=Math.abs(O)/r,r=Math.abs(O)):B=1;break;case w.gd:n>Math.abs(N)?(B=Math.abs(N)/n,n=Math.abs(N)):B=1;break;default:case w.Zc:p>Math.abs(O)?(B=Math.abs(O)/p,p=Math.abs(O)):B=1}D=0}var X=u.Ip;if(f===co){v=u.link.computeThickness();v*=B;X.set(H);switch(A){case w.Yc:X.x=H.x+N/2+q/2-D-v/2;break;case w.Pc:X.y=H.y+O/2+r/2-D-v/2;break;case w.gd:X.x=H.x+N/2-n/2+D+v/2;break;default:case w.Zc:X.y=H.y+O/2-p/2+D+v/2}D+=v}else v=.5,f===$n&&(v=(u.tp+1)/(u.cn+1)), -X.x=H.x+N*v,X.y=H.y+O*v}w.B(k);w.B(d);w.B(l);w.B(m);H=a.Og;for(N=0;Nb.re?1:a.angleb.angle?1:0}; -Ho.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Gc,this.port,Pb,b.pd===this.port),d=a.tp;if(0>d)return c;var f=a.cn;if(1>=f||!b.mc)return c;var b=a.Gx,g=a.Ip;if(a.re===w.Pc||a.re===w.Yc)d=f-1-d;return((a=a.re===w.Pc||a.re===w.Zc)?b.yf&&(f=k.right);k.bottom>g&&(g=k.bottom)}}isFinite(c)&&isFinite(d)?a.o(c,d,f-c,g-d):(b=b.location,c=this.padding,a.o(b.x+c.left,b.y+c.top,0,0));return a}; -w.g(Kh,"padding",Kh.prototype.padding); -w.defineProperty(Kh,{padding:"padding"},function(){return this.hf},function(a){"number"===typeof a?((isNaN(a)||0>a)&&w.ka(a,">= 0",Kh,"padding"),a=new vb(a)):(w.l(a,vb,Kh,"padding"),(isNaN(a.left)||0>a.left)&&w.ka(a.left,">= 0",Kh,"padding:value.left"),(isNaN(a.right)||0>a.right)&&w.ka(a.right,">= 0",Kh,"padding:value.right"),(isNaN(a.top)||0>a.top)&&w.ka(a.top,">= 0",Kh,"padding:value.top"),(isNaN(a.bottom)||0>a.bottom)&&w.ka(a.bottom,">= 0",Kh,"padding:value.bottom"));var b=this.hf;b.O(a)||(this.hf= -a=a.ea(),this.j("padding",b,a))});function We(){0=c-1?(h=0,f=d,g+=k+20,k=0):h++}null!==a&&a.je("Layout")}this.pf=!0};We.prototype.ZA=function(a){return!a.location.J()||a instanceof E&&a.qz?!0:!1}; -function bp(a,b,c,d,f,g,h,k){for(c=c.k;c.next();){var l=c.value;d&&!l.vx||null!==f&&!f(l)||!l.canLayout()||(g&&l instanceof C?l.Hf||(l instanceof E?null===l.Nb?bp(a,b,l.Mc,!1,f,g,h,k):b.add(l):b.add(l)):h&&l instanceof F?b.add(l):!k||!l.Td()||l instanceof C||b.add(l))}} -We.prototype.collectParts=function(a){var b=new K(z);a instanceof y?(bp(this,b,a.Qg,!0,null,!0,!0,!0),bp(this,b,a.links,!0,null,!0,!0,!0),bp(this,b,a.ii,!0,null,!0,!0,!0)):a instanceof E?bp(this,b,a.Mc,!1,null,!0,!0,!0):bp(this,b,a.k,!1,null,!0,!0,!0);return b};w.g(We,"arrangementOrigin",We.prototype.Rd);w.defineProperty(We,{Rd:"arrangementOrigin"},function(){return this.yq},function(a){w.l(a,I,We,"arrangementOrigin");this.yq.O(a)||(this.yq.assign(a),this.L())}); -We.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.xb(Ub),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a};function Ba(){w.oc(this);this.de=null;this.clear()}w.ma("LayoutNetwork",Ba); -Ba.prototype.clear=function(){if(this.vertexes)for(var a=this.vertexes.k;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.k;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new K(Ca);this.edges=new K(Ea);this.bB=new ra(C,Ca);this.RA=new ra(F,Ea)}; -Ba.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Nb?"("+this.Nb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0}; -Ca.smartComparer=function(a,b){t&&w.l(a,Ca,Ca,"smartComparer:m");t&&w.l(b,Ca,Ca,"smartComparer:n");if(null!==a){if(null!==b){var c=a.yd,d=b.yd;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+)?)/),f=0;f=g&&0>=h&&(g=1);c=this.spacing.width;isFinite(c)||(c=0);a=this.spacing.height;isFinite(a)||(a=0);null!==b&&b.jc("Layout");d=[];switch(this.alignment){case im:var k= -c,l=a,m=Math.max(this.rl.width,1);if(!isFinite(m))for(var n=m=0;ng-1|| -0h)d.push(new x(0,A,h+k,B)),D=0,v=u,A+=B,B=0;B=Math.max(B,O);O=0;switch(s){case gm:O=-q.width;break;default:O=0}p.moveTo(v+O,A);switch(s){case gm:v-=H;break;default:v+=H}D++}d.push(new x(0,A,h+k,B));break;case hm:k=g;l=c;m=a;n=Math.max(this.rl.width,1);p=A=H=0;q=w.P();for(g=0;g=H&&(h-=H);for(var H=O=0,N=Math.max(this.rl.height,1),ka=p=0,V=!0,Q=w.P(),g=0;gk-1||0h){d.push(new x(0,V?D-p:D,h+l,ka+p+m));for(X=0;XH&&(f.width+=f.x-H,f.x=H)}for(k=g=h=f=0;kd?1:0}; -$k.smartComparer=function(a,b){t&&w.l(a,z,$k,"standardComparer:a");t&&w.l(b,z,$k,"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+)?)/),f=0;f=a.count)1===a.count&&(a=a.first(),a.Ia=0,a.Va=0);else{var b=new J(kp);b.he(a.k);a=new J(kp);var c=new J(kp),d;d=this.sort(b);var f=this.Sy,g=this.MC,h=this.Kd,k=this.fo,l=this.Ty,m=this.Uq,b=this.Rk,n=this.eE,p=this.Dg,q=this.Xu,f=this.Ne,g=this.cu,h=this.rG;if(!isFinite(h)|| -0>=h)h=NaN;k=this.tE;if(!isFinite(k)||0>=k)k=1;l=this.xh;isFinite(l)||(l=0);m=this.ki;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);f===Dm&&g===Em?f=Cm:f===Dm&&g!==Em&&(g=Em,f=this.Ne);if((this.direction===pm||this.direction===qm)&&this.sorting!==om){for(var r=0;!(r>=d.length);r+=2){a.add(d.na(r));if(r+1>=d.length)break;c.add(d.na(r+1))}this.direction===pm?(this.Ne===Dm&&a.reverse(),d=new J(kp),d.he(a),d.he(c)):(this.Ne===Dm&&c.reverse(),d=new J(kp),d.he(c),d.he(a))}for(var s= -d.length,u=n=0,r=0;rm&&(0===r||r===d.length-1)&&(v/=2);n+=v;u++}if(isNaN(h)||f===Dm){isNaN(b)&&(b=6);if(f!==Cm&&f!==Dm){v=-Infinity;for(r=0;rh?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.Sy=f;this.MC=g;this.Kd=h;this.fo=k;this.Ty=l;this.Uq=m;this.Rk=b;this.eE=n;this.Dg=p;this.Xu=q;b=d;d=this.Sy;f=this.Kd;g=this.Ty;k=this.Uq;l=this.Rk;m=this.Dg;n=this.Xu;if(this.direction!==pm&&this.direction!==qm||d!==Dm)if(this.direction===pm||this.direction===qm){h=0;switch(d){case Bm:h=180*op(this,f,m,g,n)/Math.PI;break;case Cm:n=b=0;h=a.first();null!==h&&(b=lp(h,Math.PI/2));h=c.first();null!==h&&(n=lp(h,Math.PI/2));h=180*op(this,f,m,g,l+(b+ -n)/2)/Math.PI;break;case tm:h=k/b.length}if(this.direction===pm){switch(d){case Bm:pp(this,a,g,sm);break;case Cm:qp(this,a,g,sm);break;case tm:rp(this,a,k/2,g,sm)}switch(d){case Bm:pp(this,c,g+h,rm);break;case Cm:qp(this,c,g+h,rm);break;case tm:rp(this,c,k/2,g+h,rm)}}else{switch(d){case Bm:pp(this,c,g,sm);break;case Cm:qp(this,c,g,sm);break;case tm:rp(this,c,k/2,g,sm)}switch(d){case Bm:pp(this,a,g+h,rm);break;case Cm:qp(this,a,g+h,rm);break;case tm:rp(this,a,k/2,g+h,rm)}}}else switch(d){case Bm:pp(this, -b,g,this.direction);break;case Cm:qp(this,b,g,this.direction);break;case tm:rp(this,b,k,g,this.direction);break;case Dm:sp(this,b,k,g,this.direction)}else sp(this,b,k,g-k/2,rm)}this.updateParts();this.network=null;this.pf=!0}; -function rp(a,b,c,d,f){var g=a.Uq,h=a.Kd;a=a.Dg;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;lc){for(g=d+(f===rm?g:-g);0>g;)g+=360;g%=360;180=n.length-1)break;vp(a,l,m,n,p,f,g)||wp(a,l,m,n,p,f,g);l=g.x;m=g.y}w.B(g);a.zm++;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.zm?a.Kd-h/(2*Math.PI):5>n.length&&10=p.length-1)break;vp(a,l,m,p,q,f,n)||wp(a,l,m,p,q,f,n);l=n.x;m=n.y}w.B(n);a.zm++;if(!(23a.zm?a.Kd-g/(2*Math.PI):a.Kd-(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[f].height+d[f+1].height)/2)return h.x=m,h.y=n,!1;h.x=m;h.y=n;return!0} -function wp(a,b,c,d,f,g,h){var k=a.Kd,l=a.Dg,m=0,n=0;a=(d[f].height+d[f+1].height)/2+a.Rk;d=!1;if(0<=b!==(g===rm)){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}jm.prototype.commitLayout=function(){this.commitNodes();this.St&&this.commitLinks()}; -jm.prototype.commitNodes=function(){for(var a=this.ZH,b=this.network.vertexes.k;b.next();){var c=b.value;c.x+=a.x;c.y+=a.y;c.commit()}};jm.prototype.commitLinks=function(){for(var a=this.network.edges.k;a.next();)a.value.commit()}; -function np(a,b,c,d,f){var g=a.RH;if(.001>Math.abs(a.fo-1))return void 0!==d&&void 0!==f?f*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!==f?f/(g+1):Math.PI/(2*(g+1)),l=0,m=0;m<=g;m++)l=void 0!==d&&void 0!==f?d+m*f/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!==f?(b>c?b:c)*h:4*(b>c?b:c)*h}function mp(a,b,c,d,f){var g=0,g=void 0!==d&&void 0!==f?np(a,1,c,d,f):np(a,1,c);return b/g} -function op(a,b,c,d,f){if(.001>Math.abs(a.fo-1))return f/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>=f)return k*a}} -jm.prototype.sort=function(a){switch(this.sorting){case mm:break;case nm:a.reverse();break;case km:a.sort(this.comparer);break;case lm:a.sort(this.comparer);a.reverse();break;case om:for(var b=[],c=0;cf&&(f=k,g=h)}else for(h=0;hf&&(f=k,g=h);d.add(a.na(g));b[g]=-1;g=a.na(g);f=0;for(h=g.wc;h.next();)f=a.indexOf(h.value.fromVertex),0>f||0<=b[f]&& -b[f]++;for(g=g.lc;g.next();)f=a.indexOf(g.value.toVertex),0>f||0<=b[f]&&b[f]++}a=[];for(b=0;ba[b].indexOf(l)&&a[b].push(l);for(c=h.wc;c.next();)l=d.indexOf(c.value.fromVertex),l!==b&&0>a[b].indexOf(l)&&a[b].push(l)}h=[];for(b=0;ba[c[p]].indexOf(c[p===c.length-1?0:p+1])&&u.push(p===c.length-1?0:p+1);if(0===u.length)for(p=0;pO.indexOf(V)||QO.indexOf(V)|| -Q=v?l+1:l)),D+=l=v&&l++,H>=v&&H++,l>H&&(O=H,H=l,l=O),H-l<(c.length+2)/2===(lq||q===l||(s=q>l?q-l:l-q,p+=qm-s?1:-1);c.splice(0>p?l:l+1,0,b);f.splice(h,1);h--}else k=!1;if(k)break;else c.push(f[0]),f.splice(0,1)}for(b=0;b=a?a:360,this.L())});w.g(jm,"arrangement",jm.prototype.Ne); -w.defineProperty(jm,{Ne:"arrangement"},function(){return this.hd},function(a){this.hd!==a&&(w.Ca(a,jm,jm,"arrangement"),a===Dm||a===Cm||a===Bm||a===tm)&&(this.hd=a,this.L())});w.g(jm,"direction",jm.prototype.direction);w.defineProperty(jm,{direction:"direction"},function(){return this.va},function(a){this.va!==a&&(w.Ca(a,jm,jm,"direction"),a===rm||a===sm||a===pm||a===qm)&&(this.va=a,this.L())});w.g(jm,"sorting",jm.prototype.sorting); -w.defineProperty(jm,{sorting:"sorting"},function(){return this.Th},function(a){this.Th!==a&&(w.Ca(a,jm,jm,"sorting"),a===mm||a===nm||a===km||lm||a===om)&&(this.Th=a,this.L())});w.g(jm,"comparer",jm.prototype.comparer);w.defineProperty(jm,{comparer:"comparer"},function(){return this.Ch},function(a){this.Ch!==a&&(w.h(a,"function",jm,"comparer"),this.Ch=a,this.L())});w.g(jm,"spacing",jm.prototype.spacing); -w.defineProperty(jm,{spacing:"spacing"},function(){return this.Uh},function(a){this.Uh!==a&&(w.h(a,"number",jm,"spacing"),this.Uh=a,this.L())});w.g(jm,"nodeDiameterFormula",jm.prototype.cu);w.defineProperty(jm,{cu:"nodeDiameterFormula"},function(){return this.cs},function(a){this.cs!==a&&(w.Ca(a,jm,jm,"nodeDiameterFormula"),a===Fm||a===Em)&&(this.cs=a,this.L())});w.A(jm,{$H:"actualXRadius"},function(){return this.Kd});w.A(jm,{aI:"actualYRadius"},function(){return this.Dg}); -w.A(jm,{GK:"actualSpacing"},function(){return this.Rk});w.A(jm,{ZH:"actualCenter"},function(){return isNaN(this.Rd.x)||isNaN(this.Rd.y)?new I(0,0):new I(this.Rd.x+this.$H,this.Rd.y+this.aI)});var Cm;jm.ConstantSpacing=Cm=w.w(jm,"ConstantSpacing",0);var Bm;jm.ConstantDistance=Bm=w.w(jm,"ConstantDistance",1);var tm;jm.ConstantAngle=tm=w.w(jm,"ConstantAngle",2);var Dm;jm.Packed=Dm=w.w(jm,"Packed",3);var rm;jm.Clockwise=rm=w.w(jm,"Clockwise",4);var sm; -jm.Counterclockwise=sm=w.w(jm,"Counterclockwise",5);var pm;jm.BidirectionalLeft=pm=w.w(jm,"BidirectionalLeft",6);var qm;jm.BidirectionalRight=qm=w.w(jm,"BidirectionalRight",7);var mm;jm.Forwards=mm=w.w(jm,"Forwards",8);var nm;jm.Reverse=nm=w.w(jm,"Reverse",9);var km;jm.Ascending=km=w.w(jm,"Ascending",10);var lm;jm.Descending=lm=w.w(jm,"Descending",11);var om;jm.Optimized=om=w.w(jm,"Optimized",12);var Fm;jm.Pythagorean=Fm=w.w(jm,"Pythagorean",13);var Em;jm.Circular=Em=w.w(jm,"Circular",14); -function ip(){this.qp=-Infinity;this.pq=this.Gn=null}ip.prototype.compare=function(a,b){if(0this.qp||Math.abs(a)a&&0g?(f=n.x+n.width/2,k=n.y+n.height/2,l[0]=new I(n.x+n.width+d.width,n.y),l[1]=new I(n.x,n.y+n.height+d.height),g=2):(p=Bp(l,g, -f,k,n.width,n.height,d),q=l[p],r=new I(q.x+n.width+d.width,q.y),s=new I(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().qb,d=this.network.vertexes.k;d.next();){if(d.value.qb.Kg(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Cg?a.Cg=new J(Hp):a.Cg.clear();a.Cg.he(a.network.vertexes);var c=a.Cg;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.na(d).fg;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=M.sqrt((m+s+n*n*4/(h*h))/s);h=(m-1)*p/2;m=(m-1)*q/2;g.qb=new x(l-r.x-h,k-r.y-m,p+2*h,q+2*m);g.focus=new I(r.x+h,r.y+m)}a.network=d;return c} -function Gp(a,b,c){t&&(w.l(b,zp,yp,"popNetwork:oldnet"),w.p(c,yp,"popNetwork:level"));for(c=a.network.vertexes.k;c.next();){var d=c.value;d.network=b;if(null!==d.vh){var f=d.vh.na(d.wB);d.fg=f.gy;var g=f.XB,h=f.YB;d.qb=new x(d.Ia-g,d.Va-h,f.jy,f.ey);d.focus=new I(g,h);d.wB--}}for(c=a.network.edges.k;c.next();)c.value.network=b;a.network=b} -function Ip(a,b,c){t&&(w.l(b,Hp,yp,"surroundNode:oldnet"),w.p(c,yp,"surroundNode:level"));var d=b.an;if(null!==d&&0!==d.count){c=b.Ia;var f=b.Va,g=b.width,h=b.height;null!==b.vh&&0=p.fg?l++:(k=!0,m++,h+=Math.atan2(b.Va-p.Va,b.Ia-p.Ia))}if(0!==l)for(0>1)+m)*(0===k%2?1:-1);l.Ia=c+n*Math.cos(p);l.Va=f+n*Math.sin(p);k++}}} -function Bp(a,b,c,d,f,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,f=f-l-h,M.sqrt(d*d+f*f)):f+ck+m?f>l+h?(d=d-k-m,f=f-l-h,M.sqrt(d*d+f*f)):f+cl+h?f-(l+h):f+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.Ia,f=d,g=c.Va,h=g,c=1;ch-g)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.Ia-b.Ia}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.Va-b.Va});for(var h=a.Kh,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=Kp(k,f);1>s?(n=a.hu,null===n&&(a.hu=n=new Ia(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(f.ga.right-k.ga.x),n=(1+n)*m):dr?(p=Math.abs(f.ga.bottom-k.ga.y),p=(1+p)*s):ds?(n=a.hu,null===n&&(a.hu=n=new Ia(0)), -m=n.random(),s=n.random(),n=(d>p?1:-1)*(1+(f.width>k.width)?f.width:k.width)*m,p=(l>r?1:-1)*(1+(f.height>k.height)?f.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,f.forceX-=n,f.forceY-=p;c=0;d=Math.max(a.Kh/20,50);for(f=0;fd&&(g=d),h<-d?h=-d:h>d&&(h=d),k.Ia+=g,k.Va+=h,c=Math.max(c,g*g+h*h));return c>a.pA*a.pA}yp.prototype.moveFixedVertex=function(){}; -yp.prototype.commitLayout=function(){this.FB();this.commitNodes();this.St&&this.commitLinks()};yp.prototype.FB=function(){if(this.Ql)for(var a=this.network.edges.k;a.next();){var b=a.value.link;null!==b&&(b.Bb=Kc,b.Db=Kc)}};yp.prototype.commitNodes=function(){var a=0,b=0;if(this.rE){var c=w.ig();this.Eg(this.network,c);b=this.Rd;a=b.x-c.x;b=b.y-c.y;w.tc(c)}for(var c=w.ig(),d=this.network.vertexes.k;d.next();){var f=d.value;if(0!==a||0!==b)c.assign(f.qb),c.x+=a,c.y+=b,f.qb=c;f.commit()}w.tc(c)}; -yp.prototype.commitLinks=function(){for(var a=this.network.edges.k;a.next();)a.value.commit()};yp.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.$n:a};yp.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Zn:a};yp.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.Wn:a};yp.prototype.electricalFieldX=function(){return 0};yp.prototype.electricalFieldY=function(){return 0}; -yp.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Yn:a};yp.prototype.gravitationalFieldX=function(){return 0};yp.prototype.gravitationalFieldY=function(){return 0};yp.prototype.isFixed=function(a){return a.isFixed};w.A(yp,{JK:"currentIteration"},function(){return this.yr});w.g(yp,"arrangementSpacing",yp.prototype.Dw);w.defineProperty(yp,{Dw:"arrangementSpacing"},function(){return this.mg},function(a){w.l(a,na,yp,"arrangementSpacing");this.mg.O(a)||(this.mg.assign(a),this.L())}); -w.g(yp,"arrangesToOrigin",yp.prototype.rE);w.defineProperty(yp,{rE:"arrangesToOrigin"},function(){return this.zq},function(a){this.zq!==a&&(w.h(a,"boolean",yp,"arrangesToOrigin"),this.zq=a,this.L())});w.g(yp,"setsPortSpots",yp.prototype.Ql);w.defineProperty(yp,{Ql:"setsPortSpots"},function(){return this.Sh},function(a){this.Sh!==a&&(w.h(a,"boolean",yp,"setsPortSpots"),this.Sh=a,this.L())});w.g(yp,"comments",yp.prototype.comments); -w.defineProperty(yp,{comments:"comments"},function(){return this.Bh},function(a){this.Bh!==a&&(w.h(a,"boolean",yp,"comments"),this.Bh=a,this.L())});w.g(yp,"maxIterations",yp.prototype.Bx);w.defineProperty(yp,{Bx:"maxIterations"},function(){return this.Co},function(a){this.Co!==a&&(w.h(a,"number",yp,"maxIterations"),0<=a&&(this.Co=a,this.L()))});w.g(yp,"epsilonDistance",yp.prototype.pA); -w.defineProperty(yp,{pA:"epsilonDistance"},function(){return this.Wq},function(a){this.Wq!==a&&(w.h(a,"number",yp,"epsilonDistance"),0b.toVertex.index&&(this.network.Kx(b),b.rev=!0);break;case Sp:for(b=this.network.vertexes.k;b.next();)a=b.value,a.gp=-1,a.finish=-1;for(a=this.network.edges.k;a.next();)a.value.forest=!1;this.Yr=0;for(b.reset();b.next();)c=b.value,0===c.wc.count&&eq(this,c);for(b.reset();b.next();)c=b.value,-1===c.gp&&eq(this,c);for(a.reset();a.next();)b=a.value,b.forest||(c=b.fromVertex, -d=c.finish,f=b.toVertex,g=f.finish,f.gps&&0s&&0b[this.Rf]&&(this.Iv=b[c]-1,this.Rf=c),b[c]h)for(var p=h+1;pn;p--)l=d[p],l.near===m&&l.Vm===m.Vm||k++;var m=0,q,r=q=p=l=0,s,u=0,v=0;s=0;var A;if(0<=c)for(n=d[h].af,m=0;mu||l===u&&q>s)&&k++,vl||u===l&&s>q)&&k++);if(0>=c)for(n=d[h].Te,m=0;mu||l===u&&p>v)&&k++, -sl||u===l&&v>p)&&k++);g[h*f+h]=k;for(n=h+1;n=c)for(k=d[h].Te,A=d[n].Te,m=0;m=c&&(l=k.af);var m=null;0<=c&&(m=k.Te);var n=0,p=0,q=k.near;null!==q&&q.layer===k.layer&&(n+=q.column-1,p++);if(null!==l)for(q=0;q=c&&(l=k.af);var m=null;0<=c&&(m=k.Te);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]=n&1?p[m]:p[m-1]+p[m]>>1)}iq(a,b,d);return g}function qq(a,b,c,d,f,g){if(b.component===d){b.component=c;var h=0,k=0;if(f)for(var l=b.lc;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&qq(a,m,c,d,f,g)}if(g)for(l=b.wc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&qq(a,m,c,d,f,g)}} -function rq(a,b,c,d,f,g){if(b.component===d){b.component=c;if(f)for(var h=b.lc;h.next();)rq(a,h.value.toVertex,c,d,f,g);if(g)for(b=b.wc;b.next();)rq(a,b.value.fromVertex,c,d,f,g)}}function bq(a){for(a=a.vertexes.k;a.next();){var b=a.value;if(b.valid)return b}return null}function cq(a){for(a=a.vertexes.k;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.lc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} -function dq(a){for(a=a.vertexes.k;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.wc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function eq(a,b){b.gp=a.Yr;a.Yr++;for(var c=b.lc;c.next();){var d=c.value,f=d.toVertex;-1===f.gp&&(d.forest=!0,eq(a,f))}b.finish=a.Yr;a.Yr++} -Z.prototype.assignLayers=function(){switch(this.Bo){case sq:tq(this);break;case uq:for(var a=0,b=this.network.vertexes.k;b.next();)a=vq(this,b.value),this.ub=Math.max(a,this.ub);for(b.reset();b.next();)a=b.value,a.layer=this.ub-a.layer;break;default:case Wp:tq(this);for(b=this.network.vertexes.k;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.wc.count&&wq(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.ub=-1;for(b.reset();b.next();){var c=b.value;c.layer-= -a;this.ub=Math.max(this.ub,c.layer)}}};function tq(a){for(var b=a.network.vertexes.k;b.next();){var c=xq(a,b.value);a.ub=Math.max(c,a.ub)}}function xq(a,b){var c=0;if(-1===b.layer){for(var d=b.lc;d.next();)var f=d.value,g=f.toVertex,f=a.linkMinLength(f),c=Math.max(c,xq(a,g)+f);b.layer=c}else c=b.layer;return c}function vq(a,b){var c=0;if(-1===b.layer){for(var d=b.wc;d.next();)var f=d.value,g=f.fromVertex,f=a.linkMinLength(f),c=Math.max(c,vq(a,g)+f);b.layer=c}else c=b.layer;return c} -function wq(a,b){if(!b.valid){b.valid=!0;for(var c=b.lc;c.next();)wq(a,c.value.toVertex);for(c=a.network.vertexes.k;c.next();)c.value.component=-1;for(var d=b.af.q,f=d.length,g=0;gk&&qq(a,h.fromVertex,0,-1,!0,!1)}for(qq(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.k;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.af.q,f=s.length,g=0;gd)&&!p&&(k=m,d=n)}if(0>g){for(c.reset();c.next();)g=c.value,1===g.component&&(g.layer-=f);b.component=0}else k.component=0}}} -function gq(a,b,c){return 90===a.va?c&&!b.rev||!c&&b.rev?270:90:180===a.va?c&&!b.rev||!c&&b.rev?0:180:270===a.va?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0} -Z.prototype.initializeIndices=function(){switch(this.ro){default:case yq:for(var a=this.network.vertexes.k;a.next();){var b=a.value,c=b.layer;b.index=this.be[c];this.be[c]++}break;case Xp:a=this.network.vertexes.k;for(b=this.ub;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&zq(this,c);break;case Aq:for(a=this.network.vertexes.k,b=0;b<=this.ub;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Bq(this,c)}}; -function zq(a,b){var c=b.layer;b.index=a.be[c];a.be[c]++;for(var c=b.Te.bf(),d=!0;d;)for(var d=!1,f=0;fh.portFromColOffset&&(d=!0,c[f]=h,c[f+1]=g)}for(f=0;fh.portToColOffset&&(d=!0,c[f]=h,c[f+1]=g)}for(f=0;f=h;d--)g=Dq(this,d,-1)||g;f=this.countCrossings();f>=a?lq(this,b):(a=f,b=kq(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Dq(this,d,1)||g;f=this.countCrossings();f>=a?lq(this,b):(a=f,b=kq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Dq(this,d,1)||g;f>=a?lq(this,b):(a=f,b=kq(this));for(g=!0;g;)for(g=!1, -d=h;d<=c;d++)g=Dq(this,d,-1)||g;f>=a?lq(this,b):(a=f,b=kq(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Dq(this,d,0)||g;f>=a?lq(this,b):(a=f,b=kq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Dq(this,d,0)||g;f>=a?lq(this,b):(a=f,b=kq(this))}break;default:case Yp:for(c=this.ub,h=0,k=a+1;(d=this.countCrossings())=h;d--)g=Dq(this,d,-1)||g;f=this.countCrossings();f>=a?lq(this,b):(a=f,b=kq(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Dq(this,d,1)||g;f=this.countCrossings(); -f>=a?lq(this,b):(a=f,b=kq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Dq(this,d,1)||g;f>=a?lq(this,b):(a=f,b=kq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Dq(this,d,-1)||g;f>=a?lq(this,b):(a=f,b=kq(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Dq(this,d,0)||g;f>=a?lq(this,b):(a=f,b=kq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Dq(this,d,0)||g;f>=a?lq(this,b):(a=f,b=kq(this))}}lq(this,b)}; -function Cq(a,b,c){t&&(w.p(b,Z,"medianBarycenterCrossingReduction:unfixedLayer"),w.p(c,Z,"medianBarycenterCrossingReduction:direction"));var d=0,f=hq(a,b),g=a.be[b],h=pq(a,b,c);c=oq(a,b,c);for(d=0;dg+1&&(q+=4*(D-g),r+=4*(D-(g+1)))}H=d[g].lc.k;for(H.reset();H.next();)if(B=H.value,B.valid&&B.toVertex.layer===b){B=B.toVertex;for(D=0;d[D]!==B;)D++;D===g+1&&(r+=1)}H=d[g+1].wc.k;for(H.reset();H.next();)if(B=H.value,B.valid&&B.fromVertex.layer===b){B=B.fromVertex;for(D=0;d[D]!==B;)D++;Dg+1&&(q+=4*(D-(g+1)),r+=4*(D-g))}H=d[g+1].lc.k;for(H.reset();H.next();)if(B=H.value, -B.valid&&B.toVertex.layer===b){B=B.toVertex;for(D=0;d[D]!==B;)D++;D===g&&(q+=1)}var D=B=0,H=h[d[g].index],O=k[d[g].index],N=h[d[g+1].index],X=k[d[g+1].index];-1!==H&&(B+=Math.abs(H-s),D+=Math.abs(H-A));-1!==O&&(B+=Math.abs(O-s),D+=Math.abs(O-A));-1!==N&&(B+=Math.abs(N-u),D+=Math.abs(N-v));-1!==X&&(B+=Math.abs(X-u),D+=Math.abs(X-v));if(r>1)+8*d;this.Pb*=8}if(0!==(this.Ii&Hq))for(b=!0;b;){b=!1;for(a=this.Rf+1;a<=this.ub;a++)b=Iq(this,a,1)||b;for(a= -this.Rf-1;0<=a;a--)b=Iq(this,a,-1)||b;b=Iq(this,this.Rf,0)||b}if(0!==(this.Ii&Jq)){for(a=this.Rf+1;a<=this.ub;a++)Kq(this,a,1);for(a=this.Rf-1;0<=a;a--)Kq(this,a,-1);Kq(this,this.Rf,0)}c&&(Lq(this,-1),Lq(this,1));if(0!==(this.Ii&Hq))for(b=!0;b;){b=!1;b=Iq(this,this.Rf,0)||b;for(a=this.Rf+1;a<=this.ub;a++)b=Iq(this,a,0)||b;for(a=this.Rf-1;0<=a;a--)b=Iq(this,a,0)||b}}; -function Iq(a,b,c){t&&(w.p(b,Z,"bendStraighten:unfixedLayer"),w.p(c,Z,"bendStraighten:direction"));for(var d=!1;Mq(a,b,c);)d=!0;return d} -function Mq(a,b,c){t&&(w.p(b,Z,"shiftbendStraighten:unfixedLayer"),w.p(c,Z,"shiftbendStraighten:direction"));var d=0,f=hq(a,b),g=a.be[b],h=oq(a,b,-1);if(0c)for(d=0;dd-1||n-f[d-1].column-1>p+a.nodeMinColumnSpace(f[d-1],!1)?n-1:n,p=0,p=d+1>=g||f[d+1].column-n-1>q+a.nodeMinColumnSpace(f[d+1],!0)?n+1:n,s=q=0, -u=0,v=0,A=0,D=0;if(0>=c)for(var B=f[d].wc.k;B.next();){var H=B.value;H.valid&&H.fromVertex.layer!==b&&(v=jq(H),A=H.portFromColOffset,D=H.portToColOffset,H=H.fromVertex.column,q+=(Math.abs(n+D-(H+A))+1)*v,s+=(Math.abs(r+D-(H+A))+1)*v,u+=(Math.abs(p+D-(H+A))+1)*v)}if(0<=c)for(B=f[d].lc.k;B.next();)H=B.value,H.valid&&H.toVertex.layer!==b&&(v=jq(H),A=H.portFromColOffset,D=H.portToColOffset,H=H.toVertex.column,q+=(Math.abs(n+A-(H+D))+1)*v,s+=(Math.abs(r+A-(H+D))+1)*v,u+=(Math.abs(p+A-(H+D))+1)*v);D=A= -v=0;B=h[f[d].index];H=k[f[d].index];-1!==B&&(v+=Math.abs(B-n),A+=Math.abs(B-r),D+=Math.abs(B-p));-1!==H&&(v+=Math.abs(H-n),A+=Math.abs(H-r),D+=Math.abs(H-p));if(s=c[d]?n=q:p<=c[d]&&(n=p));n!==k&&(h=!0,f[d].column=n)}iq(a,b,f);a.normalize()} -function Nq(a,b){t&&(w.p(b,Z,"packAux:column"),w.p(1,Z,"packAux:direction"));for(var c=!0,d=a.network.vertexes.k;d.next();){var f=d.value,g=a.nodeMinColumnSpace(f,!0),h=a.nodeMinColumnSpace(f,!1);if(f.column-g<=b&&f.column+h>=b){c=!1;break}}f=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(c.column-=1,f=!0);return f} -function Oq(a,b){t&&(w.p(b,Z,"tightPackAux:column"),w.p(1,Z,"tightPackAux:direction"));for(var c=b,c=b+1,d=0,f=[],g=[],d=0;d<=a.ub;d++)f[d]=!1,g[d]=!1;for(var h=a.network.vertexes.k;h.next();){var d=h.value,k=d.column-a.nodeMinColumnSpace(d,!0),l=d.column+a.nodeMinColumnSpace(d,!1);k<=b&&l>=b&&(f[d.layer]=!0);k<=c&&l>=c&&(g[d.layer]=!0)}k=!0;c=!1;for(d=0;d<=a.ub;d++)k=k&&!(f[d]&&g[d]);if(k)for(h.reset();h.next();)f=h.value,f.column>b&&(f.column-=1,c=!0);return c} -function Lq(a,b){t&&w.p(b,Z,"componentPack:direction");for(var c=0;c<=a.Pb;c++)for(;Nq(a,c););a.normalize();for(c=0;cf?lq(a,d):hb)for(c=a.Pb;0<=c;c--)for(d=kq(a),f=nq(a),g=f+1;ff?lq(a,d):hc)for(d.reset();d.next();)f=d.value,f.column+a.nodeMinColumnSpace(f,!1)>=b&&(f.component=a.ug);a.ug++;for(d.reset();d.next();)b=d.value,-1===b.component&&(rq(a,b,a.ug,-1,!0,!0),a.ug++);var g=0;b=[];for(g=0;gc)for(k=a.Pb;0c)for(d.reset();d.next();)c=d.value,f[c.component]&&(c.column+=1)} -Z.prototype.commitLayout=function(){if(this.Ql)for(var a=fq(this,!0),b=fq(this,!1),c=this.network.edges.k;c.next();){var d=c.value.link;null!==d&&(d.Bb=a,d.Db=b)}this.commitNodes();this.fA();this.St&&this.commitLinks()};function fq(a,b){return 270===a.va?b?Lc:Tc:90===a.va?b?Tc:Lc:180===a.va?b?Rc:Sc:b?Sc:Rc} -Z.prototype.commitNodes=function(){this.hh=[];this.tg=[];this.Qf=[];this.Ub=[];for(var a=0;a<=this.ub;a++)this.hh[a]=0,this.tg[a]=0,this.Qf[a]=0,this.Ub[a]=0;for(a=this.network.vertexes.k;a.next();){var b=a.value,c=b.layer;this.hh[c]=Math.max(this.hh[c],this.nodeMinLayerSpace(b,!0));this.tg[c]=Math.max(this.tg[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.sm,c=0;c<=this.ub;c++){var f=d;0>=this.hh[c]+this.tg[c]&&(f=0);0=Ha.ga.y&&ic<=Ha.ga.bottom&&(Da=Ha.Ia+Qf,ic=ic=Ha.ga.x&&ic<=Ha.ga.right&&(Da=Ha.Va+Qf,ic=icEb.y&&(Sf=tg.y>Eb.y?0:uc.xlc.x&&(Tf=Sg.x>lc.x?0:Ec.yb.layer?1:a.Reb.Re?1:a.ieb.ie?1:0:0}; -Z.prototype.KG=function(a,b){return a instanceof Qq&&b instanceof Qq&&a!==b?a.firstb.first||a.lib.li||a.Reb.Re?1:a.ieb.ie?1:0:0};Z.prototype.Lx=function(a,b){return a instanceof Qq&&b instanceof Qq&&a!==b?a.Vdb.Vd||a.lib.li||a.Reb.Re?1:a.ieb.ie?1:0:0};Z.prototype.I=function(a,b){t&&(w.p(a,Z,"isApprox:a"),w.p(b,Z,"isApprox:b"));var c=a-b;return-1c}; -function Rq(a,b,c,d){t&&(w.p(a,Z,"isUnoccupied2:px"),w.p(b,Z,"isUnoccupied2:py"),w.p(c,Z,"isUnoccupied2:qx"),w.p(d,Z,"isUnoccupied2:qy"));return!0}function hq(a,b){var c,d=a.be[b];if(d>=a.kh.length){c=[];for(var f=0;fa&&(this.Ii=a,this.L()))});w.g(Z,"setsPortSpots",Z.prototype.Ql);w.defineProperty(Z,{Ql:"setsPortSpots"},function(){return this.Sh},function(a){this.Sh!==a&&(w.h(a,"boolean",Z,"setsPortSpots"),this.Sh=a,this.L())});w.g(Z,"linkSpacing",Z.prototype.Jp); -w.defineProperty(Z,{Jp:"linkSpacing"},function(){return this.Ej},function(a){this.Ej!==a&&(w.h(a,"number",Z,"linkSpacing"),0<=a&&(this.Ej=a,this.L()))});w.A(Z,{OJ:"maxLayer"},function(){return this.ub});w.A(Z,{XK:"maxIndex"},function(){return this.Iv});w.A(Z,{WK:"maxColumn"},function(){return this.Pb});w.A(Z,{aL:"minIndexLayer"},function(){return this.Rr});w.A(Z,{YK:"maxIndexLayer"},function(){return this.Rf});var Sp;Z.CycleDepthFirst=Sp=w.w(Z,"CycleDepthFirst",0);var aq; -Z.CycleGreedy=aq=w.w(Z,"CycleGreedy",1);var Wp;Z.LayerOptimalLinkLength=Wp=w.w(Z,"LayerOptimalLinkLength",0);var sq;Z.LayerLongestPathSink=sq=w.w(Z,"LayerLongestPathSink",1);var uq;Z.LayerLongestPathSource=uq=w.w(Z,"LayerLongestPathSource",2);var Xp;Z.InitDepthFirstOut=Xp=w.w(Z,"InitDepthFirstOut",0);var Aq;Z.InitDepthFirstIn=Aq=w.w(Z,"InitDepthFirstIn",1);var yq;Z.InitNaive=yq=w.w(Z,"InitNaive",2);var Eq;Z.AggressiveNone=Eq=w.w(Z,"AggressiveNone",0);var Yp; -Z.AggressiveLess=Yp=w.w(Z,"AggressiveLess",1);var Fq;Z.AggressiveMore=Fq=w.w(Z,"AggressiveMore",2);Z.PackNone=0;var Gq;Z.PackExpand=Gq=1;var Hq;Z.PackStraighten=Hq=2;var Jq;Z.PackMedian=Jq=4;var Zp;Z.PackAll=Zp=7;function Qq(){this.index=this.ie=this.Re=this.Vd=this.first=this.layer=0;this.link=null;this.li=0}w.ke(Qq,{layer:!0,first:!0,Vd:!0,Re:!0,ie:!0,index:!0,link:!0,li:!0});function $p(){Ba.call(this)}w.Na($p,Ba);w.ma("LayeredDigraphNetwork",$p);$p.prototype.createVertex=function(){return new Sq}; -$p.prototype.createEdge=function(){return new Tq};function Sq(){Ca.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.gp=NaN;this.Vm=0;this.$A=this.aB=null}w.Na(Sq,Ca);w.ma("LayeredDigraphVertex",Sq);function Tq(){Ea.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}w.Na(Tq,Ea);w.ma("LayeredDigraphEdge",Tq); -function Y(){0b.level)return!1;a.removeChild(c.parent,c)}return!0} -Y.prototype.removeChild=function(a,b){if(null!==a&&null!==b){t&&w.l(a,Zq,Y,"removeChild:p");t&&w.l(b,Zq,Y,"removeChild:c");for(var c=a.children,d=0,f=0;fg?Hr(a,k,Aa,B,H):Ir(a,k,Aa,B,H);Aa=V.x;B=V.width;H=V.height;break;case vr:for(m=0;ms&&(QDa&&(Nr(a,-Da,0,Wa,m-1),Or(N,-Da,0),Or(X,-Da,0),Da=0)}n.pa.o(Da,ca);B=Math.max(B,ka);H=Math.max(H,O+(0===Pa?0:A)+Ma.height);Q=ka}else{0s&&(caDa&&(Nr(a,0,-Da,Wa,m-1),Or(N,0,-Da),Or(X,0,-Da),Da=0);n.pa.o(Q,Da);H=Math.max(H,V);B=Math.max(B,O+(0===Pa?0:A)+Ma.width);ca=V}Ha++}0< -Pa&&(b?(H+=Math.max(0,c),Qh&&(h=0),135q&&(q=0),p===wr&&(l+=u/2+a.Q.y),k+=d+c):b?(null===a.comments?d>B&&(p=Sr(p,d-B,0),k=p.x,l=p.y,B=d,h=0):B=Qr(a,B,h),0>h&&(k-=h,h=0),135H&&(p=Sr(p,0,f-H),k=p.x,l=p.y,H=f,q=0):H=Rr(a,H,q),0>q&&(l-=q,q=0),k+=d+c);if(0g[0].x?g[2].assign(g[1]):g[1].assign(g[2])),g[3].yg[0].x?g[3].assign(g[2]):g[2].assign(g[3])),p[0].o(h+d,0),p[1].o(p[0].x,f),p[2].yg[0].y?g[2].assign(g[1]):g[1].assign(g[2])),g[3].xg[0].y?g[3].assign(g[2]):g[2].assign(g[3])),p[0].o(0,q+f),p[1].o(d,p[0].y),p[2].xc?Hr(b,f,Ha,O,N):Ir(b,f,Ha,O,N);Ha=N.x;O=N.width;N=N.height;break;case vr:for(k=0;kr&&(kar&&(Vp&&(p=0),135B&&(B=0));b.Pa.o(p,B);b.ib.o(O,N)}} -function Hr(a,b,c,d,f){t&&w.l(a,Zq,Y,"layoutBusChildrenPosDir:v");var g=b.length;if(0===g)return new x(c,0,d,f);if(1===g){var h=b[0];d=h.ib.width;f=h.ib.height;return new x(c,0,d,f)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===Cr(a),n=0,p=0,q=0,r=0;rm&&(d-=m),f=Math.max(f,Math.max(D,q)+b+s.height),0>h.pa.x&&(c=as(a,h.pa.x,!1,c,k))):(h.pa.o(d+b,c+k/2-h.Q.y-h.Pa.y),d=Math.max(d,Math.max(A,p)+b+s.width),m=c+k/2-h.Q.y-h.Pa.y,f=Math.max(f,m+s.height),0>m&&(f-=m),0>h.pa.y&&(c=as(a,h.pa.y,!0,c,k))));return new x(c,0,d,f)} -function Ir(a,b,c,d,f){t&&w.l(a,Zq,Y,"layoutBusChildrenNegDir:v");var g=b.length;if(0===g)return new x(c,0,d,f);if(1===g){var h=b[0];d=h.ib.width;f=h.ib.height;return new x(c,0,d,f)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===Cr(a),n=0,p=0,q=0,r=0;rp&&(d-=p),f=Math.max(f,Math.abs(Math.min(D,q))+l+s.height),0>h.pa.x&&(c=as(a,h.pa.x,!1,c,k))):(h.pa.o(-d-s.width-l,c+k/2-h.Q.y-h.Pa.y),d=Math.max(d,Math.abs(Math.min(A,p))+l+s.width),p=c+k/2-h.Q.y-h.Pa.y,f=Math.max(f,p+s.height),0>p&&(f-=p),0>h.pa.y&&(c=as(a,h.pa.y,!0,c,k))));for(r=0;rd&&(d=c+a.width);0>c&&(d-=c);return d;case Dr:return a.width>b?a.width:b;case Er:return 2*a.Q.x>b?a.width:b+a.width-2*a.Q.x;case ur:case jr:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case vr:return a.width-a.Q.x+a.nodeSpacing/2+b;case wr:return Math.max(a.width,a.Q.x+a.nodeSpacing/2+b);default:return b}} -function Rr(a,b,c){t&&w.l(a,Zq,Y,"calculateSubheight:v");switch(a.alignment){case sr:case Pr:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case Dr:return a.height>b?a.height:b;case Er:return 2*a.Q.y>b?a.height:b+a.height-2*a.Q.y;case ur:case jr:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case vr:return a.height-a.Q.y+a.nodeSpacing/2+b;case wr:return Math.max(a.height,a.Q.y+a.nodeSpacing/2+b);default:return b}} -function Sr(a,b,c){t&&w.l(a,ia,Y,"alignOffset:align");switch(a){case Pr:b/=2;c/=2;break;case sr:b/=2;c/=2;break;case Dr:c=b=0;break;case Er:break;default:w.m("Unhandled alignment value "+a.toString())}return new I(b,c)}function Kr(a,b,c,d,f,g){t&&w.l(a,Zq,Y,"shiftRelPosAlign:v");t&&w.l(b,ia,Y,"shiftRelPosAlign:align");b=Sr(b,c,d);Nr(a,b.x,b.y,f,g)}function Nr(a,b,c,d,f){t&&w.l(a,Zq,Y,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=f;d++){var g=a[d].pa;g.x+=b;g.y+=c}} -function Lr(a,b,c,d){t&&(w.l(b,Zq,Y,"recordMidPoints:v"),w.h(c,"number",Y,"recordMidPoints:x"),w.h(d,"number",Y,"recordMidPoints:y"));var f=b.parent;switch(a.Pf){case Vq:for(a=b.wc;a.next();)b=a.value,b.fromVertex===f&&b.ts.o(c,d);break;case br:for(a=b.lc;a.next();)b=a.value,b.toVertex===f&&b.ts.o(c,d);break;default:w.m("Unhandled path value "+a.Pf.toString())}}function Or(a,b,c){for(var d=0;dp.length||null===q||2>q.length))for(m= -l=0;lv&&f.yf.y&&vb.length||null===l||2>l.length)d=null;else{n=Jr(a,b.length+l.length);for(d=g=f=0;gf;)v=l[g++],n[d++].o(v.x+m,v.y);l=Jr(a,d);for(f=0;fp.length||null===g||2>g.length)f=null;else{n=Jr(a,p.length+g.length);for(m=A=l=0;lg;)f=p[l++], -n[m++].o(f.x,f.y);f=Jr(a,m);for(l=0;lp.length||null===q||2>q.length))for(m=l=0;lg&&f.xf.x&&gb.length||null===l||2>l.length)d=null;else{n=Jr(a,b.length+l.length);for(d=g=f=0;gf;)v=l[g++],n[d++].o(v.x,v.y+m);l=Jr(a,d);for(f=0;fp.length||null===g||2>g.length)f=null;else{n=Jr(a,p.length+g.length);for(m=A=l=0;lg;)f=p[l++],n[m++].o(f.x,f.y);f=Jr(a,m);for(l=0;l=a?0:135>=a?90:225>=a?180:315>=a?270:0} -function Fr(a){t&&w.l(a,Zq,Y,"computeLayerSpacing:v");var b=Cr(a),b=90===b||270===b,c=a.layerSpacing;if(0=a&&(this.xa.nodeIndentPastParent=a,this.L()))});w.g(Y,"nodeSpacing",Y.prototype.nodeSpacing);w.defineProperty(Y,{nodeSpacing:"nodeSpacing"},function(){return this.xa.nodeSpacing},function(a){this.xa.nodeSpacing!==a&&(w.h(a,"number",Y,"nodeSpacing"),this.xa.nodeSpacing=a,this.L())}); -w.g(Y,"layerSpacing",Y.prototype.layerSpacing);w.defineProperty(Y,{layerSpacing:"layerSpacing"},function(){return this.xa.layerSpacing},function(a){this.xa.layerSpacing!==a&&(w.h(a,"number",Y,"layerSpacing"),this.xa.layerSpacing=a,this.L())});w.g(Y,"layerSpacingParentOverlap",Y.prototype.layerSpacingParentOverlap); -w.defineProperty(Y,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.xa.layerSpacingParentOverlap},function(a){this.xa.layerSpacingParentOverlap!==a&&(w.h(a,"number",Y,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.xa.layerSpacingParentOverlap=a,this.L()))});w.g(Y,"compaction",Y.prototype.compaction); -w.defineProperty(Y,{compaction:"compaction"},function(){return this.xa.compaction},function(a){this.xa.compaction!==a&&(w.Ca(a,Y,Y,"compaction"),a===zr||a===Br)&&(this.xa.compaction=a,this.L())});w.g(Y,"breadthLimit",Y.prototype.breadthLimit);w.defineProperty(Y,{breadthLimit:"breadthLimit"},function(){return this.xa.breadthLimit},function(a){this.xa.breadthLimit!==a&&(w.h(a,"number",Y,"breadthLimit"),0<=a&&(this.xa.breadthLimit=a,this.L()))});w.g(Y,"rowSpacing",Y.prototype.rowSpacing); -w.defineProperty(Y,{rowSpacing:"rowSpacing"},function(){return this.xa.rowSpacing},function(a){this.xa.rowSpacing!==a&&(w.h(a,"number",Y,"rowSpacing"),this.xa.rowSpacing=a,this.L())});w.g(Y,"rowIndent",Y.prototype.rowIndent);w.defineProperty(Y,{rowIndent:"rowIndent"},function(){return this.xa.rowIndent},function(a){this.xa.rowIndent!==a&&(w.h(a,"number",Y,"rowIndent"),0<=a&&(this.xa.rowIndent=a,this.L()))});w.g(Y,"commentSpacing",Y.prototype.commentSpacing); -w.defineProperty(Y,{commentSpacing:"commentSpacing"},function(){return this.xa.commentSpacing},function(a){this.xa.commentSpacing!==a&&(w.h(a,"number",Y,"commentSpacing"),this.xa.commentSpacing=a,this.L())});w.g(Y,"commentMargin",Y.prototype.commentMargin);w.defineProperty(Y,{commentMargin:"commentMargin"},function(){return this.xa.commentMargin},function(a){this.xa.commentMargin!==a&&(w.h(a,"number",Y,"commentMargin"),this.xa.commentMargin=a,this.L())});w.g(Y,"setsPortSpot",Y.prototype.setsPortSpot); -w.defineProperty(Y,{setsPortSpot:"setsPortSpot"},function(){return this.xa.setsPortSpot},function(a){this.xa.setsPortSpot!==a&&(w.h(a,"boolean",Y,"setsPortSpot"),this.xa.setsPortSpot=a,this.L())});w.g(Y,"portSpot",Y.prototype.portSpot);w.defineProperty(Y,{portSpot:"portSpot"},function(){return this.xa.portSpot},function(a){w.l(a,P,Y,"portSpot");this.xa.portSpot.O(a)||(this.xa.portSpot=a,this.L())});w.g(Y,"setsChildPortSpot",Y.prototype.setsChildPortSpot); -w.defineProperty(Y,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.xa.setsChildPortSpot},function(a){this.xa.setsChildPortSpot!==a&&(w.h(a,"boolean",Y,"setsChildPortSpot"),this.xa.setsChildPortSpot=a,this.L())});w.g(Y,"childPortSpot",Y.prototype.childPortSpot);w.defineProperty(Y,{childPortSpot:"childPortSpot"},function(){return this.xa.childPortSpot},function(a){w.l(a,P,Y,"childPortSpot");this.xa.childPortSpot.O(a)||(this.xa.childPortSpot=a,this.L())});w.g(Y,"alternateSorting",Y.prototype.wI); -w.defineProperty(Y,{wI:"alternateSorting"},function(){return this.wa.sorting},function(a){this.wa.sorting!==a&&(w.Ca(a,Y,Y,"alternateSorting"),a===or||a===pr||a===qr||rr)&&(this.wa.sorting=a,this.L())});w.g(Y,"alternateComparer",Y.prototype.kI);w.defineProperty(Y,{kI:"alternateComparer"},function(){return this.wa.comparer},function(a){this.wa.comparer!==a&&(w.h(a,"function",Y,"alternateComparer"),this.wa.comparer=a,this.L())});w.g(Y,"alternateAngle",Y.prototype.eI); -w.defineProperty(Y,{eI:"alternateAngle"},function(){return this.wa.angle},function(a){this.wa.angle!==a&&(w.h(a,"number",Y,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.wa.angle=a,this.L())});w.g(Y,"alternateAlignment",Y.prototype.dI);w.defineProperty(Y,{dI:"alternateAlignment"},function(){return this.wa.alignment},function(a){this.wa.alignment!==a&&(w.Ca(a,Y,Y,"alternateAlignment"),this.wa.alignment=a,this.L())});w.g(Y,"alternateNodeIndent",Y.prototype.oI); -w.defineProperty(Y,{oI:"alternateNodeIndent"},function(){return this.wa.nodeIndent},function(a){this.wa.nodeIndent!==a&&(w.h(a,"number",Y,"alternateNodeIndent"),0<=a&&(this.wa.nodeIndent=a,this.L()))});w.g(Y,"alternateNodeIndentPastParent",Y.prototype.pI); -w.defineProperty(Y,{pI:"alternateNodeIndentPastParent"},function(){return this.wa.nodeIndentPastParent},function(a){this.wa.nodeIndentPastParent!==a&&(w.h(a,"number",Y,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.wa.nodeIndentPastParent=a,this.L()))});w.g(Y,"alternateNodeSpacing",Y.prototype.qI);w.defineProperty(Y,{qI:"alternateNodeSpacing"},function(){return this.wa.nodeSpacing},function(a){this.wa.nodeSpacing!==a&&(w.h(a,"number",Y,"alternateNodeSpacing"),this.wa.nodeSpacing=a,this.L())}); -w.g(Y,"alternateLayerSpacing",Y.prototype.mI);w.defineProperty(Y,{mI:"alternateLayerSpacing"},function(){return this.wa.layerSpacing},function(a){this.wa.layerSpacing!==a&&(w.h(a,"number",Y,"alternateLayerSpacing"),this.wa.layerSpacing=a,this.L())});w.g(Y,"alternateLayerSpacingParentOverlap",Y.prototype.nI); -w.defineProperty(Y,{nI:"alternateLayerSpacingParentOverlap"},function(){return this.wa.layerSpacingParentOverlap},function(a){this.wa.layerSpacingParentOverlap!==a&&(w.h(a,"number",Y,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.wa.layerSpacingParentOverlap=a,this.L()))});w.g(Y,"alternateCompaction",Y.prototype.jI); -w.defineProperty(Y,{jI:"alternateCompaction"},function(){return this.wa.compaction},function(a){this.wa.compaction!==a&&(w.Ca(a,Y,Y,"alternateCompaction"),a===zr||a===Br)&&(this.wa.compaction=a,this.L())});w.g(Y,"alternateBreadthLimit",Y.prototype.fI);w.defineProperty(Y,{fI:"alternateBreadthLimit"},function(){return this.wa.breadthLimit},function(a){this.wa.breadthLimit!==a&&(w.h(a,"number",Y,"alternateBreadthLimit"),0<=a&&(this.wa.breadthLimit=a,this.L()))});w.g(Y,"alternateRowSpacing",Y.prototype.tI); -w.defineProperty(Y,{tI:"alternateRowSpacing"},function(){return this.wa.rowSpacing},function(a){this.wa.rowSpacing!==a&&(w.h(a,"number",Y,"alternateRowSpacing"),this.wa.rowSpacing=a,this.L())});w.g(Y,"alternateRowIndent",Y.prototype.sI);w.defineProperty(Y,{sI:"alternateRowIndent"},function(){return this.wa.rowIndent},function(a){this.wa.rowIndent!==a&&(w.h(a,"number",Y,"alternateRowIndent"),0<=a&&(this.wa.rowIndent=a,this.L()))});w.g(Y,"alternateCommentSpacing",Y.prototype.iI); -w.defineProperty(Y,{iI:"alternateCommentSpacing"},function(){return this.wa.commentSpacing},function(a){this.wa.commentSpacing!==a&&(w.h(a,"number",Y,"alternateCommentSpacing"),this.wa.commentSpacing=a,this.L())});w.g(Y,"alternateCommentMargin",Y.prototype.hI);w.defineProperty(Y,{hI:"alternateCommentMargin"},function(){return this.wa.commentMargin},function(a){this.wa.commentMargin!==a&&(w.h(a,"number",Y,"alternateCommentMargin"),this.wa.commentMargin=a,this.L())});w.g(Y,"alternateSetsPortSpot",Y.prototype.vI); -w.defineProperty(Y,{vI:"alternateSetsPortSpot"},function(){return this.wa.setsPortSpot},function(a){this.wa.setsPortSpot!==a&&(w.h(a,"boolean",Y,"alternateSetsPortSpot"),this.wa.setsPortSpot=a,this.L())});w.g(Y,"alternatePortSpot",Y.prototype.rI);w.defineProperty(Y,{rI:"alternatePortSpot"},function(){return this.wa.portSpot},function(a){w.l(a,P,Y,"alternatePortSpot");this.wa.portSpot.O(a)||(this.wa.portSpot=a,this.L())});w.g(Y,"alternateSetsChildPortSpot",Y.prototype.uI); -w.defineProperty(Y,{uI:"alternateSetsChildPortSpot"},function(){return this.wa.setsChildPortSpot},function(a){this.wa.setsChildPortSpot!==a&&(w.h(a,"boolean",Y,"alternateSetsChildPortSpot"),this.wa.setsChildPortSpot=a,this.L())});w.g(Y,"alternateChildPortSpot",Y.prototype.gI);w.defineProperty(Y,{gI:"alternateChildPortSpot"},function(){return this.wa.childPortSpot},function(a){w.l(a,P,Y,"alternateChildPortSpot");this.wa.childPortSpot.O(a)||(this.wa.childPortSpot=a,this.L())});var Uq; -Y.PathDefault=Uq=w.w(Y,"PathDefault",-1);var Vq;Y.PathDestination=Vq=w.w(Y,"PathDestination",0);var br;Y.PathSource=br=w.w(Y,"PathSource",1);var or;Y.SortingForwards=or=w.w(Y,"SortingForwards",10);var pr;Y.SortingReverse=pr=w.w(Y,"SortingReverse",11);var qr;Y.SortingAscending=qr=w.w(Y,"SortingAscending",12);var rr;Y.SortingDescending=rr=w.w(Y,"SortingDescending",13);var Pr;Y.AlignmentCenterSubtrees=Pr=w.w(Y,"AlignmentCenterSubtrees",20);var sr; -Y.AlignmentCenterChildren=sr=w.w(Y,"AlignmentCenterChildren",21);var Dr;Y.AlignmentStart=Dr=w.w(Y,"AlignmentStart",22);var Er;Y.AlignmentEnd=Er=w.w(Y,"AlignmentEnd",23);var ur;Y.AlignmentBus=ur=w.w(Y,"AlignmentBus",24);var jr;Y.AlignmentBusBranching=jr=w.w(Y,"AlignmentBusBranching",25);var vr;Y.AlignmentTopLeftBus=vr=w.w(Y,"AlignmentTopLeftBus",26);var wr;Y.AlignmentBottomRightBus=wr=w.w(Y,"AlignmentBottomRightBus",27);var zr;Y.CompactionNone=zr=w.w(Y,"CompactionNone",30);var Br; -Y.CompactionBlock=Br=w.w(Y,"CompactionBlock",31);var Wq;Y.StyleLayered=Wq=w.w(Y,"StyleLayered",40);var nr;Y.StyleLastParents=nr=w.w(Y,"StyleLastParents",41);var mr;Y.StyleAlternating=mr=w.w(Y,"StyleAlternating",42);var lr;Y.StyleRootOnly=lr=w.w(Y,"StyleRootOnly",43);var Yq;Y.ArrangementVertical=Yq=w.w(Y,"ArrangementVertical",50);var cs;Y.ArrangementHorizontal=cs=w.w(Y,"ArrangementHorizontal",51);var ar;Y.ArrangementFixedRoots=ar=w.w(Y,"ArrangementFixedRoots",52);var Xq; -Y.LayerIndividual=Xq=w.w(Y,"LayerIndividual",60);var hr;Y.LayerSiblings=hr=w.w(Y,"LayerSiblings",61);var gr;Y.LayerUniform=gr=w.w(Y,"LayerUniform",62);function $q(){Ba.call(this)}w.Na($q,Ba);w.ma("TreeNetwork",$q);$q.prototype.createVertex=function(){return new Zq};$q.prototype.createEdge=function(){return new es}; -function Zq(){Ca.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 I(0,0);this.ib=new na(0,0);this.Pa=new I(0,0);this.dq=this.cq=this.oK=!1;this.nu=this.Ut=null;this.sorting=or;this.comparer=gp;this.angle=0;this.alignment=sr;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=Br;this.breadthLimit= -0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=Kc;this.setsChildPortSpot=!0;this.childPortSpot=Kc}w.Na(Zq,Ca);w.ma("TreeVertex",Zq); -Zq.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.A(Zq,{$m:"childrenCount"},function(){return this.children.length});w.g(Zq,"relativePosition",Zq.prototype.jK);w.defineProperty(Zq,{jK:"relativePosition"},function(){return this.pa},function(a){this.pa.set(a)});w.g(Zq,"subtreeSize",Zq.prototype.CK);w.defineProperty(Zq,{CK:"subtreeSize"},function(){return this.ib},function(a){this.ib.set(a)}); -w.g(Zq,"subtreeOffset",Zq.prototype.BK);w.defineProperty(Zq,{BK:"subtreeOffset"},function(){return this.Pa},function(a){this.Pa.set(a)});function es(){Ea.call(this);this.ts=new I(0,0)}w.Na(es,Ea);w.ma("TreeEdge",es); -es.prototype.commit=function(){var a=this.link;if(null!==a&&!a.ej){var b=this.network.Nb,c=null,d=null;switch(b.Pf){case Vq:c=this.fromVertex;d=this.toVertex;break;case br:c=this.toVertex;d=this.fromVertex;break;default:w.m("Unhandled path value "+b.Pf.toString())}if(null!==c&&null!==d)if(b=this.ts,0!==b.x||0!==b.y||c.oK){var d=c.qb,f=Cr(c),g=Fr(c),h=c.rowSpacing;a.updateRoute();var k=a.Se===wh,l=a.mc,m=0,n,p;a.Sl();if(l||k){for(m=2;4q.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Gr(c))))):c.alignment===Dr?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Gr(c))))):c.alignment===Dr?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Gr(c))))):c.alignment===Dr?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Gr(c))))):c.alignment===Dr?(r=d.left+b.x,0===b.x&&n.xl?h=null:(m=parseFloat(n.getAttribute("cx")),isNaN(m)&&(m=0),n=parseFloat(n.getAttribute("cy")),isNaN(n)&&(n=0),p=new kd(yd),p.ta=0,p.ua=0,p.D=2*l,p.F=2*l,h.position=new I(m-l,n-l),h.bd=p);break;case "ellipse":p=g;h=new W;l=parseFloat(p.getAttribute("rx"));isNaN(l)||0>l?h=null:(m=parseFloat(p.getAttribute("ry")),isNaN(m)||0>m?h=null:(n=parseFloat(p.getAttribute("cx")),isNaN(n)&&(n=0),p=parseFloat(p.getAttribute("cy")), -isNaN(p)&&(p=0),q=new kd(yd),q.ta=0,q.ua=0,q.D=2*l,q.F=2*m,h.position=new I(n-l,p-m),h.bd=q));break;case "rect":q=g;h=new W;l=parseFloat(q.getAttribute("width"));if(isNaN(l)||0>l)h=null;else if(m=parseFloat(q.getAttribute("height")),isNaN(m)||0>m)h=null;else{n=parseFloat(q.getAttribute("x"));isNaN(n)&&(n=0);p=parseFloat(q.getAttribute("y"));isNaN(p)&&(p=0);var r=q.getAttribute("rx"),s=q.getAttribute("ry"),q=parseFloat(r);if(isNaN(q)||0>q)q=0;var u=parseFloat(s);if(isNaN(u)||0>u)u=0;null!==r&&""!== -r||null===s||""===s?null===r||""===r||null!==s&&""!==s||(u=q):q=u;q=Math.min(q,l/2);u=Math.min(u,m/2);s=void 0;0===q&&0===u?(s=new kd(pd),s.ta=0,s.ua=0,s.D=l,s.F=m):(s=M.za/2,r=w.u(),R(r,q,0,!0),r.lineTo(l-q,0),S(r,l-q*s,0,l,u*s,l,u),r.lineTo(l,m-u),S(r,l,m-u*s,l-q*s,m,l-q,m),r.lineTo(q,m),S(r,q*s,m,0,m-u*s,0,m-u),r.lineTo(0,u),S(r,0,u*s,q*s,0,q,0),Gd(r),s=r.s,w.v(r));h.position=new I(n,p);h.bd=s}break;case "polygon":h=js(g);break;case "polyline":h=js(g)}if(null!==h){if(h instanceof W){m=h;l=gs(a, -g,"fill");null!==l&&-1!==l.indexOf("url")?(l=l.substring(l.indexOf("#")+1,l.length-1),l=a["_brush"+l],m.fill=l instanceof ma?l:"black"):m.fill=null===l?"black":"none"===l?null:l;l=gs(a,g,"stroke");null!==l&&-1!==l.indexOf("url")?(l=l.substring(l.indexOf("#")+1,l.length-1),l=a["_brush"+l],m.stroke=l instanceof ma?l:"black"):m.stroke="none"===l?null:l;l=parseFloat(gs(a,g,"stroke-width"));isNaN(l)||(m.ob=l);l=gs(a,g,"stroke-linecap");null!==l&&(m.aH=l);l=gs(a,g,"stroke-dasharray");if(null!==l&&""!== -l){n=l.split(",");p=[];for(l=0;lg.length)return null;for(var d=null,h=new J(fe),k=1;kh&&a.y>k&&a.righth&&b.y>k&&b.right=c.LG)){this.G^=4096;var d=!1;if(null!==c){d=c.Ta;c.Ta=!0;var e=c.selection;e.Ca();a?e.add(this):e.remove(this);e.freeze()}this.h("isSelected",b,a);this.Ad();a=this.oH;null!==a&&a(this);null!==c&&(c.Ed(),c.Ta=d)}}}); +O(A,{wg:"isHighlighted"},function(){return 0!==(this.G&524288)},function(a){var b=0!==(this.G&524288);if(b!==a){v&&I(a,"boolean",A,"isHighlighted");this.G^=524288;var c=this.g;null!==c&&(c=c.kv,c.Ca(),a?c.add(this):c.remove(this),c.freeze());this.h("isHighlighted",b,a);this.ea()}});O(A,{qj:"isShadowed"},function(){return 0!==(this.G&8192)},function(a){var b=0!==(this.G&8192);b!==a&&(v&&I(a,"boolean",A,"isShadowed"),this.G^=8192,this.h("isShadowed",b,a),this.ea())}); +function nl(a){return 0!==(a.G&32768)}function sp(a,b){a.G=b?a.G|32768:a.G&-32769}function Ym(a,b){a.G=b?a.G|65536:a.G&-65537}function nk(a){return 0!==(a.G&131072)}A.prototype.Te=function(a){this.G=a?this.G|131072:this.G&-131073};function yp(a,b){a.G=b?a.G|1048576:a.G&-1048577}O(A,{VC:"isAnimated"},function(){return 0!==(this.G&262144)},function(a){var b=0!==(this.G&262144);b!==a&&(v&&I(a,"boolean",A,"isAnimated"),this.G^=262144,this.h("isAnimated",b,a))}); +O(A,{Qv:"selectionObjectName"},function(){return this.Yq},function(a){var b=this.Yq;b!==a&&(v&&I(a,"string",A,"selectionObjectName"),this.Yq=a,this.Al=null,this.h("selectionObjectName",b,a))});O(A,{nH:"selectionAdornmentTemplate"},function(){return this.Wq},function(a){var b=this.Wq;b!==a&&(v&&H(a,ea,A,"selectionAdornmentTemplate"),this instanceof E&&(a.type=Mi),this.Wq=a,this.h("selectionAdornmentTemplate",b,a))}); +P(A,{km:"selectionObject"},function(){if(null===this.Al){var a=this.Qv;null!==a&&""!==a?(a=this.Ld(a),this.Al=null!==a?a:this):this instanceof E?(a=this.path,this.Al=null!==a?a:this):this.Al=this}return this.Al});O(A,{oH:"selectionChanged"},function(){return this.Xq},function(a){var b=this.Xq;b!==a&&(null!==a&&I(a,"function",A,"selectionChanged"),this.Xq=a,this.h("selectionChanged",b,a))}); +O(A,{FD:"resizeAdornmentTemplate"},function(){return this.Kq},function(a){var b=this.Kq;b!==a&&(v&&H(a,ea,A,"resizeAdornmentTemplate"),this.Kq=a,this.h("resizeAdornmentTemplate",b,a))});O(A,{HD:"resizeObjectName"},function(){return this.Mq},function(a){var b=this.Mq;b!==a&&(v&&I(a,"string",A,"resizeObjectName"),this.Mq=a,this.qn=null,this.h("resizeObjectName",b,a))}); +P(A,{GD:"resizeObject"},function(){if(null===this.qn){var a=this.HD;null!==a&&""!==a?(a=this.Ld(a),this.qn=null!==a?a:this):this.qn=this}return this.qn});O(A,{fH:"resizeCellSize"},function(){return this.Lq},function(a){var b=this.Lq;b.C(a)||(v&&H(a,ib,A,"resizeCellSize"),this.Lq=a=a.R(),this.h("resizeCellSize",b,a))});O(A,{hH:"rotateAdornmentTemplate"},function(){return this.Nq},function(a){var b=this.Nq;b!==a&&(v&&H(a,ea,A,"rotateAdornmentTemplate"),this.Nq=a,this.h("rotateAdornmentTemplate",b,a))}); +O(A,{iH:"rotateObjectName"},function(){return this.Oq},function(a){var b=this.Oq;b!==a&&(v&&I(a,"string",A,"rotateObjectName"),this.Oq=a,this.rn=null,this.h("rotateObjectName",b,a))});P(A,{LD:"rotateObject"},function(){if(null===this.rn){var a=this.iH;null!==a&&""!==a?(a=this.Ld(a),this.rn=null!==a?a:this):this.rn=this}return this.rn});O(A,{text:"text"},function(){return this.Jd},function(a){var b=this.Jd;b!==a&&(v&&I(a,"string",A,"text"),this.Jd=a,this.h("text",b,a))}); +O(A,{Ea:"containingGroup"},function(){return this.Mj},function(a){if(this.jd()){var b=this.Mj;if(b!==a){v&&null!==a&&H(a,ka,A,"containingGroup");null===a||this!==a&&!a.nh(this)||(this===a&&w("Cannot make a Group a member of itself: "+this.toString()),w("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.w(Ll);var c=this.g;null!==b?zp(b,this):this instanceof ka&&null!==c&&c.jk.remove(this);this.Mj=a;null!==a?Ap(a,this):this instanceof ka&&null!== +c&&c.jk.add(this);this.w(Dl);if(null!==c){var d=this.data,e=c.V;null!==d&&e instanceof og&&e.Tv(d,e.hb(null!==a?a.data:null))}d=this.jC;null!==d&&(e=!0,null!==c&&(e=c.Da,c.Da=!0),d(this,b,a),null!==c&&(c.Da=e));if(this instanceof ka)for(c=new qc(A),gh(c,this,!0,0,!0),c=c.i;c.next();)if(d=c.value,d instanceof D)for(d=d.md;d.next();)dm(d.value);if(this instanceof D)for(d=this.md;d.next();)dm(d.value);this.h("containingGroup",b,a);null!==a&&a.Xv()}}else w("cannot set the Part.containingGroup of a Link or Adornment")}); +r=A.prototype;r.Gk=function(){var a=this.Ea;null!==a&&(a.K(),null!==a.Ab&&a.Ab.K(),a.Oe())};r.ea=function(){var a=this.g;null!==a&&!hl(this)&&!nl(this)&&this.ya()&&this.sb.v()&&a.ea(sk(this,this.sb))};r.Xr=function(a){var b=this.Mj;null===b||a||Ap(b,this)};r.Yr=function(a){var b=this.Mj;null===b||a||zp(b,this)};r.Xl=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.V,null!==b&&b.fz(a))}}; +O(A,{jC:"containingGroupChanged"},function(){return this.Yo},function(a){var b=this.Yo;b!==a&&(null!==a&&I(a,"function",A,"containingGroupChanged"),this.Yo=a,this.h("containingGroupChanged",b,a))});A.prototype.findSubGraphLevel=function(){return Bp(this,this)};function Bp(a,b){var c=b.Ea;return null!==c?1+Bp(a,c):b instanceof D&&(c=b.Uc,null!==c)?Bp(a,c):0}A.prototype.findTopLevelPart=function(){return Cp(this,this)}; +function Cp(a,b){var c=b.Ea;return null!==c?Cp(a,c):b instanceof D&&(c=b.Uc,null!==c)?Cp(a,c):b}P(A,{vv:"isTopLevel"},function(){return null!==this.Ea||this instanceof D&&this.Pe?!1:!0});A.prototype.isMemberOf=A.prototype.nh=function(a){return a instanceof ka?Dp(this,this,a):!1};function Dp(a,b,c){if(b===c||null===c)return!1;var d=b.Ea;return null===d||d!==c&&!Dp(a,d,c)?b instanceof D&&(b=b.Uc,null!==b)?Dp(a,b,c):!1:!0} +A.prototype.findCommonContainingGroup=A.prototype.SF=function(a){if(null===a)return null;v&&H(a,A,A,"findCommonContainingGroup:other");if(this===a)return this instanceof ka?this:null;for(var b=this;null!==b;)b instanceof ka&&yp(b,!0),b=b.Ea;for(var c=null,b=a;null!==b;){if(0!==(b.G&1048576)){c=b;break}b=b.Ea}for(b=this;null!==b;)b instanceof ka&&yp(b,!1),b=b.Ea;return c}; +O(A,{CG:"layoutConditions"},function(){return this.Pp},function(a){var b=this.Pp;b!==a&&(v&&I(a,"number",A,"layoutConditions"),this.Pp=a,this.h("layoutConditions",b,a))});A.prototype.canLayout=function(){if(!this.Gy||!this.ya())return!1;var a=this.layer;return null!==a&&a.gc||this instanceof D&&this.Pe?!1:!0}; +A.prototype.invalidateLayout=A.prototype.w=function(a){void 0===a&&(a=16777215);var b;this.Gy&&0!==(a&this.CG)?(b=this.layer,null!==b&&b.gc||this instanceof D&&this.Pe?b=!1:(b=this.g,b=null!==b&&b.aa.bb?!1:!0)):b=!1;if(b)if(b=this.Mj,null!==b){var c=b.yb;null!==c?c.w():b.w(a)}else a=this.g,null!==a&&(c=a.yb,null!==c&&c.w())};function Il(a){if(!a.ya())return!1;a=a.layer;return null!==a&&a.gc?!1:!0} +O(A,{uC:"dragComputation"},function(){return this.hp},function(a){var b=this.hp;b!==a&&(null!==a&&I(a,"function",A,"dragComputation"),this.hp=a,this.h("dragComputation",b,a))});O(A,{tH:"shadowOffset"},function(){return this.Dl},function(a){var b=this.Dl;b.C(a)||(v&&H(a,K,A,"shadowOffset"),this.Dl=a=a.R(),this.ea(),this.h("shadowOffset",b,a))}); +O(A,{shadowColor:"shadowColor"},function(){return this.Cl},function(a){var b=this.Cl;b!==a&&(v&&I(a,"string",A,"shadowColor"),this.Cl=a,this.ea(),this.h("shadowColor",b,a))});O(A,{shadowBlur:"shadowBlur"},function(){return this.Bl},function(a){var b=this.Bl;b!==a&&(v&&I(a,"number",A,"shadowBlur"),this.Bl=a,this.ea(),this.h("shadowBlur",b,a))}); +function ea(a){0===arguments.length?A.call(this,ij):A.call(this,a);this.ze="Adornment";this.qb=null;this.G&=-257;this.mg=new K(NaN,NaN);this.vi=new S(x);this.Ab=null}Nb(ea,A);Mb("Adornment",ea);ea.prototype.toString=function(){var a=this.jh;return"Adornment("+this.qc+")"+(null!==a?a.toString():"")};ea.prototype.updateRelationshipsFromData=function(){}; +ea.prototype.ks=function(){var a=this.ac.L,b=this.ac;if(a instanceof E&&b instanceof pi){var c=a.path,b=c.Fa;a.ks();for(var b=c.Fa,a=this.ja.l,c=a.length,d=0;da&&(a=1);var b=this.g;if(null!==b&&!b.Nd){var c=b.xb;0!==b.aa.ke&&c.Mk();b.Nd=!0;var c=b.Tc,d=new qc(D);d.add(this);Pp(this,d,c,a,this.wc);b.Nd=!1}}; +function Pp(a,b,c,d,e){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.Nd){var c=b.xb;0!==b.aa.ke&&c.Mk();b.Nd=!0;var d=b.Tc,e=new qc(D);e.add(this);Rp(this,e,d,a,this.wc,c,this);b.Nd=!1}};function Rp(a,b,c,d,e,f,g){for(var h=c?a.fv():a.Rf();h.next();){var k=h.value;k.hc&&(e||k.Kf||k.Ib(),k=k.uy(a),null!==k&&k!==a&&!b.contains(k)&&(b.add(k),e||(k.he(!0),k.Gk(),lk(f,k,g)),2a&&(a-=180);break;case Xp:a=U.qs(c+90);90a&&(a-=180);break;case Yp:a=U.qs(c-90);90a&&(a-=180);break;case Zp:a=U.qs(c);if(45a||225a)return 0;90a&&(a-=180)}return U.qs(a)}; +O(E,{O:"fromNode"},function(){return this.yf},function(a){var b=this.yf;if(b!==a){v&&null!==a&&H(a,D,E,"fromNode");var c=this.Ec;null!==b&&(this.Jf!==b&&Mp(b,this,c),$p(this),this.w(Ll));this.yf=a;this.Dh=null;this.Ib();var d=this.g;if(null!==d){var e=this.data,f=d.V;if(null!==e)if(f instanceof og){var g=null!==a?a.data:null;f.Sv(e,f.hb(g))}else f instanceof pg&&(g=null!==a?a.data:null,d.Tc?f.Ig(e,f.hb(g)):(null!==b&&f.Ig(b.data,void 0),f.Ig(g,f.hb(null!==this.Jf?this.Jf.data:null))))}e=this.Ec;f= +this.IC;null!==f&&(g=!0,null!==d&&(g=d.Da,d.Da=!0),f(this,c,e),null!==d&&(d.Da=g));null!==a&&(this.Jf!==a&&Lp(a,this,e),aq(this),this.w(Dl));this.h("fromNode",b,a);dm(this)}}); +O(E,{hf:"fromPortId"},function(){return this.Sg},function(a){var b=this.Sg;if(b!==a){v&&I(a,"string",E,"fromPortId");var c=this.Ec;null!==c&&Kp(this.O,c);$p(this);this.Sg=a;var d=this.Ec;null!==d&&Kp(this.O,d);var e=this.g;if(null!==e){var f=this.data,g=e.V;null!==f&&g instanceof og&&g.kz(f,a)}c!==d&&(this.Dh=null,this.Ib(),f=this.IC,null!==f&&(g=!0,null!==e&&(g=e.Da,e.Da=!0),f(this,c,d),null!==e&&(e.Da=g)));aq(this);this.h("fromPortId",b,a)}}); +P(E,{Ec:"fromPort"},function(){var a=this.yf;return null===a?null:a.zk(this.Sg)});O(E,{IC:"fromPortChanged"},function(){return this.pp},function(a){var b=this.pp;b!==a&&(null!==a&&I(a,"function",E,"fromPortChanged"),this.pp=a,this.h("fromPortChanged",b,a))}); +O(E,{T:"toNode"},function(){return this.Jf},function(a){var b=this.Jf;if(b!==a){v&&null!==a&&H(a,D,E,"toNode");var c=this.nd;null!==b&&(this.yf!==b&&Mp(b,this,c),$p(this),this.w(Ll));this.Jf=a;this.Dh=null;this.Ib();var d=this.g;if(null!==d){var e=this.data,f=d.V;if(null!==e)if(f instanceof og){var g=null!==a?a.data:null;f.Uv(e,f.hb(g))}else f instanceof pg&&(g=null!==a?a.data:null,d.Tc?(null!==b&&f.Ig(b.data,void 0),f.Ig(g,f.hb(null!==this.yf?this.yf.data:null))):f.Ig(e,f.hb(g)))}e=this.nd;f=this.gE; +null!==f&&(g=!0,null!==d&&(g=d.Da,d.Da=!0),f(this,c,e),null!==d&&(d.Da=g));null!==a&&(this.yf!==a&&Lp(a,this,e),aq(this),this.w(Dl));this.h("toNode",b,a);dm(this)}}); +O(E,{ag:"toPortId"},function(){return this.hh},function(a){var b=this.hh;if(b!==a){v&&I(a,"string",E,"toPortId");var c=this.nd;null!==c&&Kp(this.T,c);$p(this);this.hh=a;var d=this.nd;null!==d&&Kp(this.T,d);var e=this.g;if(null!==e){var f=this.data,g=e.V;null!==f&&g instanceof og&&g.oz(f,a)}c!==d&&(this.Dh=null,this.Ib(),f=this.gE,null!==f&&(g=!0,null!==e&&(g=e.Da,e.Da=!0),f(this,c,d),null!==e&&(e.Da=g)));aq(this);this.h("toPortId",b,a)}}); +P(E,{nd:"toPort"},function(){var a=this.Jf;return null===a?null:a.zk(this.hh)});O(E,{gE:"toPortChanged"},function(){return this.lr},function(a){var b=this.lr;b!==a&&(null!==a&&I(a,"function",E,"toPortChanged"),this.lr=a,this.h("toPortChanged",b,a))});O(E,{gb:"fromSpot"},function(){return null!==this.J?this.J.Di:we},function(a){null===this.J&&this.fe();var b=this.J.Di;b.C(a)||(v&&H(a,V,E,"fromSpot"),a=a.R(),this.J.Di=a,this.h("fromSpot",b,a),this.Ib())}); +O(E,{Ak:"fromEndSegmentLength"},function(){return null!==this.J?this.J.Bi:NaN},function(a){null===this.J&&this.fe();var b=this.J.Bi;b!==a&&(v&&I(a,"number",E,"fromEndSegmentLength"),0>a&&La(a,">= 0",E,"fromEndSegmentLength"),this.J.Bi=a,this.h("fromEndSegmentLength",b,a),this.Ib())}); +O(E,{Tr:"fromEndSegmentDirection"},function(){return null!==this.J?this.J.Ai:Fp},function(a){null===this.J&&this.fe();var b=this.J.Ai;b!==a&&(v&&Ea(a,D,E,"fromEndSegmentDirection"),this.J.Ai=a,this.h("fromEndSegmentDirection",b,a),this.Ib())});O(E,{Ur:"fromShortLength"},function(){return null!==this.J?this.J.Ci:NaN},function(a){null===this.J&&this.fe();var b=this.J.Ci;b!==a&&(v&&I(a,"number",E,"fromShortLength"),this.J.Ci=a,this.h("fromShortLength",b,a),this.Ib())}); +O(E,{ib:"toSpot"},function(){return null!==this.J?this.J.ej:we},function(a){null===this.J&&this.fe();var b=this.J.ej;b.C(a)||(v&&H(a,V,E,"toSpot"),a=a.R(),this.J.ej=a,this.h("toSpot",b,a),this.Ib())});O(E,{Tk:"toEndSegmentLength"},function(){return null!==this.J?this.J.cj:NaN},function(a){null===this.J&&this.fe();var b=this.J.cj;b!==a&&(v&&I(a,"number",E,"toEndSegmentLength"),0>a&&La(a,">= 0",E,"toEndSegmentLength"),this.J.cj=a,this.h("toEndSegmentLength",b,a),this.Ib())}); +O(E,{Ks:"toEndSegmentDirection"},function(){return null!==this.J?this.J.bj:Fp},function(a){null===this.J&&this.fe();var b=this.J.bj;b!==a&&(v&&Ea(a,D,E,"toEndSegmentDirection"),this.J.bj=a,this.h("toEndSegmentDirection",b,a),this.Ib())});O(E,{Ms:"toShortLength"},function(){return null!==this.J?this.J.dj:NaN},function(a){null===this.J&&this.fe();var b=this.J.dj;b!==a&&(v&&I(a,"number",E,"toShortLength"),this.J.dj=a,this.h("toShortLength",b,a),this.Ib())}); +function dm(a){var b=a.O,c=a.T;null!==b?null!==c?bq(a,b.SF(c)):bq(a,null):bq(a,null)}function bq(a,b){var c=a.Mj;if(c!==b){null!==c&&zp(c,a);a.Mj=b;null!==b&&Ap(b,a);var d=a.jC;if(null!==d){var e=!0,f=a.g;null!==f&&(e=f.Da,f.Da=!0);d(a,c,b);null!==f&&(f.Da=e)}!a.Kf||a.xB!==c&&a.zB!==c||a.Ib()}}E.prototype.Gk=function(){var a=this.Ea;null!==a&&this.O!==a&&this.T!==a&&A.prototype.Gk.call(this)}; +E.prototype.getOtherNode=E.prototype.uy=function(a){v&&H(a,D,E,"getOtherNode:node");var b=this.O;return a===b?this.T:b};E.prototype.getOtherPort=function(a){v&&H(a,Y,E,"getOtherPort:port");var b=this.Ec;return a===b?this.nd:b};P(E,{QI:"isLabeledLink"},function(){return null===this.Xd?!1:0=d&&(g=d-1);var k=this.j(g-1),f=this.j(g);U.Gn(e.x,e.y,h.x,h.y,k.x,k.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.j(0),f=this.j(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.k(e.x,e.y,0,0),a.oi(f),g=2;gc&&(c=-c)):U.$a(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.mj(d)),f.push(c),e+=c;for(d=g=c=0;ce/2)break;c+=d;g++}zb(f);b=this.j(g);f=this.j(g+1);b.x===f.x?b.y>f.y?a.k(b.x,b.y-(e/2-c)):a.k(b.x,b.y+(e/2-c)):b.y===f.y?b.x>f.x?a.k(b.x-(e/2-c),b.y):a.k(b.x+(e/2-c),b.y):(e=(e/2-c)/d,a.k(b.x+e*(f.x-b.x),b.y+e*(f.y-b.y)));return a};P(E,{gD:"midAngle"},function(){this.updateRoute();return this.computeMidAngle()}); +E.prototype.computeMidAngle=function(){var a=this.ca;if(2>a)return NaN;if(this.computeCurve()===Yi&&4<=a&&!this.Ob){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),a=this.j(c),b=this.j(c+1),d=this.j(c+2),c=this.j(c+3);return U.iF(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0e?a.di(b):b.di(d)}; +O(E,{points:"points"},function(){return this.oc},function(a){var b=this.oc;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var e=0;en&&(t-=180));0>t?t+=360:360<=t&&(t-=360);h&&(u+=Math.abs(n));0===t?q=u:90===t?s=u:180===t?q=-u:270===t?s=-u:(q=u*Math.cos(t*Math.PI/180),s=u*Math.sin(t*Math.PI/180));if(f.Od()&&h){var z=c.Za(Rd,db()),C=eb(z.x+1E3*q,z.y+1E3*s);this.getLinkPointFromPoint(b,c,z,C,!0,p);fb(z);fb(C)}}var u=this.getLinkPoint(d,e,g,!1,k,b,c),B=0,F=0,Q=0;if(k||g!==Md||h)z=this.computeEndSegmentLength(d, +e,g,!1),Q=this.getLinkDirection(d,e,u,g,!1,k,b,c),h&&(Q+=k?0:30,0>n&&(Q+=180)),0>Q?Q+=360:360<=Q&&(Q-=360),h&&(z+=Math.abs(n)),0===Q?B=z:90===Q?F=z:180===Q?B=-z:270===Q?F=-z:(B=z*Math.cos(Q*Math.PI/180),F=z*Math.sin(Q*Math.PI/180)),g.Od()&&h&&(z=e.Za(Rd,db()),C=eb(z.x+1E3*B,z.y+1E3*F),this.getLinkPointFromPoint(d,e,z,C,!1,u),fb(z),fb(C));e=p;if(k||f!==Md||h)e=new K(p.x+q,p.y+s);c=u;if(k||g!==Md||h)c=new K(u.x+B,u.y+F);!m&&!k&&f===Md&&3h&&(l=-l),q=(0>g?-1:1)*l+p,s=k*(q-p)+t),p=a.x+2*f/3,t=a.y+2*g/3,u=p,B=t,U.u(g,0)?B=0g?-1:1)*l+p,B=k*(u-p)+t),this.Kn(),this.ih(a),this.mk(q,s),this.mk(u,B),this.ih(m),this.Ue(0,this.getLinkPoint(b,c,Md,!0,!1, +d,e)),this.Ue(3,this.getLinkPoint(d,e,Md,!1,!1,b,c))):(a=d,d=this.getLinkPoint(b,c,Md,!0,!1,a,e),e=this.getLinkPoint(a,e,Md,!1,!1,b,c),this.hasCurviness()?(g=e.x-d.x,b=e.y-d.y,c=this.computeCurviness(),a=d.x+g/2,m=d.y+b/2,f=a,h=m,U.u(b,0)?h=0c&&(f=-f),f=(0>b?-1:1)*f+a,h=g*(f-a)+m),this.ih(d),this.mk(f,h)):this.ih(d),this.ih(e)));return!0}; +function hq(a,b){Math.abs(b.x-a.x)>Math.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} +E.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new K);if(null===a||null===b)return f.assign(c),f;a.ya()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var g=e=0,h=0,k=0;a=null;e=b.H;null===e||e.uf()||(e=e.H);if(null===e)e=d.x,g=d.y,h=c.x,k=c.y;else{a=e.df;e=1/(a.m11*a.m22-a.m12*a.m21);var h=a.m22*e,k=-a.m12*e,l=-a.m21*e,m=a.m11*e,n=e*(a.m21*a.dy-a.m22*a.dx),p=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*h+d.y*l+n;g=d.x*k+d.y*m+p;h=c.x*h+c.y*l+n;k=c.x*k+c.y*m+p}b.Vn(e,g,h,k,f);null!== +a&&f.transform(a);return f};function iq(a,b){var c=b.Cq;null===c&&(c=new jq,c.port=b,c.jc=b.L,b.Cq=c);return kq(c,a)} +E.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new K);if(c.Ic())return b.Za(c,h),h;if(c.$n()&&(c=iq(this,b),null!==c)){h.assign(c.eo);if(e&&this.Mv===Sp){var k=iq(this,g);if(c.Vl=l.x&&a.x<=l.x+l.width?h.x=a.x:a.y>=l.y&&a.y<=l.y+l.height&&(h.y=a.y);fb(c);fb(k)}}return h}f=b.Za(Rd,db());k=c=null;this.ca>(e?6:2)?(k=d?this.j(1):this.j(this.ca-2),e&&(k=hq(f,k.copy()))): +(c=db(),k=g.Za(Rd,c),e&&(k=hq(f,k)));this.getLinkPointFromPoint(a,b,f,k,d,h);fb(f);null!==c&&fb(c);return h}; +E.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.Ic())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)?(m=e?this.j(1):this.j(this.ca-2),m=f?hq(k,m.copy()):c):(l=db(),m=h.Za(Rd,l));c=0;c=Math.abs(m.x-k.x)>Math.abs(m.y-k.y)?m.x>=k.x?0:180: +m.y>=k.y?90:270;fb(k);null!==l&&fb(l)}d.Od()&&g.nh(a)&&(c+=180,360<=c&&(c-=360));a=Fp;a=e?this.Tr:this.Ks;a===Fp&&(a=e?b.Tr:b.Ks);switch(a){case Gp:b=b.Bk();c+=b;360<=c&&(c-=360);break;case Fp:case Pm:b=b.Bk();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}; +E.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.$n()&&(a=iq(this,b),null!==a))return a.bv;a=NaN;a=d?this.Ak:this.Tk;null!==b&&isNaN(a)&&(a=d?b.Ak:b.Tk);isNaN(a)&&(a=10);return a};E.prototype.computeSpot=function(a){return a?fq(this,this.Ec):gq(this,this.nd)};function fq(a,b){if(null===b)return Rd;var c=a.gb;c.rc()&&(void 0===b&&(b=a.Ec),null!==b&&(c=b.gb));return c===we?Md:c} +function gq(a,b){if(null===b)return Rd;var c=a.ib;c.rc()&&(void 0===b&&(b=a.nd),null!==b&&(c=b.ib));return c===we?Md:c}E.prototype.computeOtherPoint=function(a,b){var c=b.Za(Rd),d;d=b.Cq;d=null!==d?kq(d,this):null;null!==d&&(c=d.eo);return c};E.prototype.computeShortLength=function(a){return a?lq(this):mq(this)};function lq(a){var b=a.Ur;isNaN(b)&&(a=a.Ec,null!==a&&(b=a.Ur));return isNaN(b)?0:b}function mq(a){var b=a.Ms;isNaN(b)&&(a=a.nd,null!==a&&(b=a.Ms));return isNaN(b)?0:b} +E.prototype.oj=function(a,b,c,d,e,f){if(!1===this.rf)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=rb(),g.reset());g.multiply(this.transform);if(this.Sl(a,g))return Ao(this,b,c,e),void 0===f&&ub(g),!0;if(this.Tf(a,g)){var h=!1;if(!this.jg)for(var k=this.ja.l,l=k.length;l--;){var m=k[l];if(m.visible||m===this.Fb){var n=m.Q,p=this.qa;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=rb();n.set(g);if(m instanceof G)h=m.oj(a,b,c,d,e,n);else if(this.path===m){var h= +m,q=a,s=d,p=n;if(!1===h.rf)h=!1;else if(p.multiply(h.transform),s)b:{var t=q,u=p;if(h.Sl(t,u))h=!0;else{if(void 0===u&&(u=h.transform,t.lj(h.Q))){h=!0;break b}var p=t.left,q=t.right,s=t.top,t=t.bottom,z=db(),C=db(),B=db(),F=rb();F.set(u);F.Ry(h.transform);F.By();C.x=q;C.y=s;C.transform(F);z.x=p;z.y=s;z.transform(F);u=!1;Ko(h,z,C,B)?u=!0:(z.x=q,z.y=t,z.transform(F),Ko(h,z,C,B)?u=!0:(C.x=p,C.y=t,C.transform(F),Ko(h,z,C,B)?u=!0:(z.x=p,z.y=s,z.transform(F),Ko(h,z,C,B)&&(u=!0))));ub(F);fb(z);fb(C);fb(B); +h=u}}else h=h.Sl(q,p)}else h=Um(m,a,d,n);h&&(null!==b&&(m=b(m)),m&&(null===c||c(m))&&e.add(m));ub(n)}}}void 0===f&&ub(g);return h||null!==this.background||null!==this.pk}void 0===f&&ub(g);return!1};P(E,{Ob:"isOrthogonal"},function(){return 2===(this.wl.value&2)});P(E,{hi:"isAvoiding"},function(){return 4===(this.wl.value&4)});E.prototype.computeCurve=function(){if(null===this.Dh){var a=this.Ec,b=this.Ob;this.Dh=null!==a&&a===this.nd&&!b}return this.Dh?Yi:this.ve}; +E.prototype.computeCorner=function(){if(this.ve===Yi)return 0;var a=this.hy;if(isNaN(a)||0>a)a=10;return a};E.prototype.computeCurviness=function(){var a=this.Yu;if(isNaN(a)){var b=this.Fe;if(0!==b){var a=10,c=this.g;null!==c&&(a=c.Av);c=Math.abs(b);a=a/2+((c-1)/2|0)*a;0===c%2&&(a=-a);0>b&&(a=-a)}else a=10}return a};E.prototype.computeThickness=function(){var a=this.path;return null!==a?Math.max(a.Ua,1):1};E.prototype.hasCurviness=function(){return!isNaN(this.Yu)||0!==this.Fe&&!this.Ob}; +E.prototype.adjustPoints=function(a,b,c,d){var e=this.wr;if(this.Ob){if(e===An)return!1;e===Bn&&(e=zn)}switch(e){case An:var f=this.j(a),g=this.j(c);if(!f.C(b)||!g.C(d)){var e=f.x,f=f.y,h=g.x-e,k=g.y-f,l=Math.sqrt(h*h+k*k);if(!U.u(l,0)){var m=0;U.u(h,0)?m=0>k?-Math.PI/2:Math.PI/2:(m=Math.atan(k/Math.abs(h)),0>h&&(m=Math.PI-m));var g=b.x,n=b.y,k=d.x-g,p=d.y-n,q=Math.sqrt(k*k+p*p),h=0;U.u(k,0)?h=0>p?-Math.PI/2:Math.PI/2:(h=Math.atan(p/Math.abs(k)),0>k&&(h=Math.PI-h));l=q/l;m=h-m;this.Ue(a,b);for(a+= +1;ak?-Math.PI/2:Math.PI/2:(p=Math.atan(k/Math.abs(h)),0>h&&(p=Math.PI-p)),h=p+m,b*=l,this.P(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.Ue(c,d)}}return!0;case Bn:f=this.j(a);n=this.j(c);if(!f.C(b)||!n.C(d)){var e=f.x,f=f.y,g=n.x,n=n.y,l=(g-e)*(g-e)+(n-f)*(n-f),h=b.x,m=b.y,k=d.x,p=d.y,q=0,s=1,q=0!==k-h?(p-m)/(k-h):9E9;0!==q&&(s=Math.sqrt(1+1/(q*q)));this.Ue(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 g=e.Q.copy(),h=f.Q.copy();if(g.v()&&h.v()){g.jf(8,8);h.jf(8,8);g.oi(a);h.oi(c);var k,l;if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&h.right>a.x)k=new K(c.x,a.y),l=new K(c.x,(a.y+c.y)/2),180===d?(k.x=this.computeMidOrthoPosition(a.x,c.x,!1),l.x=k.x,l.y=c.y):270===d&&c.ya.y?(k.x=a.xh.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):h.right,l.x=k.x,l.y=c.y):0===d&&a.xh.top&&a.yg.bottom)180===d&&(h.sa(a)||g.sa(c))?k.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(180===d||270===d)&&(k.y=this.computeMidOrthoPosition(g.bottom,Math.min(c.y,h.top),!0)),l.x=c.x,l.y=k.y;if(k.y>g.top&&k.y=g.left&&c.x<=a.x||a.x<=h.right&&a.x>=c.x){if(90===d||270===d)k=new K(Math.max((a.x+c.x)/2,a.x),a.y),l=new K(k.x,c.y)}else k.y=270===d||(0===d||180===d)&&c.ya.y&&h.lefta.y?(k.x=a.x>h.right?this.computeMidOrthoPosition(a.x,h.right,!1):a.x>h.left&&(270===d&&a.yh.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):h.left,l.x=k.x,l.y=c.y):180===d&&a.x>h.right&&a.y>h.top&&a.yg.bottom)0===d&&(h.sa(a)||g.sa(c))?k.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(0===d||270===d)&&(k.y=this.computeMidOrthoPosition(g.bottom,Math.min(c.y,h.top),!0)),l.x=c.x,l.y=k.y;if(k.y>g.top&&k.y=a.x||a.x>=h.left&&a.x<=c.x){if(90===d||270===d)k=new K(Math.min((a.x+c.x)/2,a.x),a.y),l=new K(k.x,c.y)}else k.y=270=== +d||(0===d||180===d)&&c.ya.y||180===d&&c.xa.y||0===d&&c.x>a.x&&h.bottom>a.y)k=new K(a.x,c.y),l=new K((a.x+c.x)/2,c.y),270===d?(k.y=this.computeMidOrthoPosition(a.y,c.y,!0),l.x=c.x,l.y=k.y):180===d&&c.xa.x?(k.y=a.yh.right)? +this.computeMidOrthoPosition(a.y,c.y,!0):h.bottom,l.x=c.x,l.y=k.y):90===d&&a.yh.left&&a.xg.right)270===d&&(h.sa(a)||g.sa(c))?k.x=this.computeMidOrthoPosition(a.x,c.x,!1):c.xa.x&&(270===d||180===d)&&(k.x=this.computeMidOrthoPosition(g.right, +Math.min(c.x,h.left),!1)),l.x=k.x,l.y=c.y;if(k.x>g.left&&k.x=g.top&&c.y<=a.y||a.y<=h.bottom&&a.y>=c.y){if(0===d||180===d)k=new K(a.x,Math.max((a.y+c.y)/2,a.y)),l=new K(c.x,k.y)}else k.x=180===d||(90===d||270===d)&&c.xa.x&&h.top=a.x?(k.y=a.y>h.bottom?this.computeMidOrthoPosition(a.y,h.bottom,!0):a.y>h.top&&(180===d&&a.xh.right)?this.computeMidOrthoPosition(a.y,c.y,!0):h.top,l.x=c.x,l.y=k.y):270===d&&a.y>h.bottom&&a.x>h.left&&a.xg.right)90===d&&(h.sa(a)||g.sa(c))?k.x=this.computeMidOrthoPosition(a.x, +c.x,!1):c.xa.x&&(90===d||180===d)&&(k.x=this.computeMidOrthoPosition(g.right,Math.min(c.x,h.left),!1)),l.x=k.x,l.y=c.y;if(k.x>g.left&&k.x=a.y||a.y>=h.top&&a.y<=c.y){if(0===d||180===d)k=new K(a.x,Math.min((a.y+c.y)/2,a.y)),l=new K(c.x,k.y)}else k.x=180===d||(90===d||270===d)&&c.xh&&0!==oq(e,c.x,c.y)){pq(this,e,c.x,c.y,d,!0);d=this.j(2);if(4>this.ca)0===b||180===b?(d.x=a.x,d.y=c.y):(d.x=c.x,d.y=a.y),this.P(2,d.x,d.y),this.n(3,d.x,d.y);else if(c=this.j(3),0===b|| +180===b)U.u(d.x,c.x)?(b=0===b?Math.max(d.x,a.x):Math.min(d.x,a.x),this.P(2,b,a.y),this.P(3,b,c.y)):U.u(d.y,c.y)?(Math.abs(a.y-d.y)<=e.Hn/2&&(this.P(2,d.x,a.y),this.P(3,c.x,a.y)),this.n(2,d.x,a.y)):this.P(2,a.x,d.y);else if(90===b||270===b)U.u(d.y,c.y)?(b=90===b?Math.max(d.y,a.y):Math.min(d.y,a.y),this.P(2,a.x,b),this.P(3,c.x,b)):U.u(d.x,c.x)?(Math.abs(a.x-d.x)<=e.Jn/2&&(this.P(2,a.x,d.y),this.P(3,a.x,c.y)),this.n(2,a.x,d.y)):this.P(2,d.x,a.y);a=!0}else a=!1}else a=!1;a||(this.ih(k),this.ih(l))}}; +E.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2};function Xh(a){if(!a.hi)return!1;var b=a.points.l,c=b.length;if(4>c)return!1;a=ia(a.g,!0,a.Ea,null);for(var d=1;da){var b=new gf(hf),c=new jf(0,0);b.cb.add(c);return b}var d=!1,b=this.g;null!==b&&0!==b.aa.ke&&cq(this)&&(d=!0);var c=b=0,e=this.j(0).copy(),f=e.copy(),b=this.oc.l,g=this.computeCurve();if(g===Yi&&3<=a&&!U.$a(this.Ao,0))if(3===a)var h=this.j(1),b=Math.min(e.x,h.x),c=Math.min(e.y,h.y),h=this.j(2),b=Math.min(b,h.x),c=Math.min(c,h.y);else{if(this.Ob)for(h=0;h=a&& +(h=a-1),b=this.j(h),f.x=Math.min(b.x,f.x),f.y=Math.min(b.y,f.y);b=f.x;c=f.y}else{for(h=0;hz?q>p?(t.x=C-F,t.y=p-F,u.x=C+s,u.y=p+s):(t.x= +C-F,t.y=p+F,u.x=C+s,u.y=p-s):q>p?(t.x=C+F,t.y=p-F,u.x=C-s,u.y=p+s):(t.x=C+F,t.y=p+F,u.x=C-s,u.y=p-s));U.$a(z,C)&&U.$a(p,q)&&(p>n?(B>C?(t.x=C-F,t.y=p-F,u.x=C+s):(t.x=C+F,t.y=p-F,u.x=C-s),u.y=p+s):(B>C?(t.x=C-F,t.y=p+F,u.x=C+s):(t.x=C+F,t.y=p+F,u.x=C-s),u.y=p-s));if(U.$a(z,C)&&U.$a(C,B)||U.$a(n,p)&&U.$a(p,q))z=.5*(z+B),n=.5*(n+q),t.x=z,t.y=n,u.x=z,u.y=n;1===h?(e.x=.5*(d.x+l.x),e.y=.5*(d.y+l.y)):2===h&&U.$a(d.x,this.j(0).x)&&U.$a(d.y,this.j(0).y)&&(e.x=.5*(d.x+l.x),e.y=.5*(d.y+l.y));X(k,e.x-b,e.y-c, +g.x-b,g.y-c,l.x-b,l.y-c);f.set(g);e.set(a);d=l}}h=d.x;d=d.y;f=this.j(this.ca-1);h=.5*(h+f.x);d=.5*(d+f.y);X(k,a.x-b,a.y-c,h-b,d-c,f.x-b,f.y-c)}else for(h=3;h=a&&(h=a-1),f=this.j(h-1),e=this.j(h),h===a-1&&0!==mq(this)&&(e=e.copy(),qq(this,e,!1,U.xj)),X(k,d.x-b,d.y-c,f.x-b,f.y-c,e.x-b,e.y-c);else{f=db();f.assign(this.j(0));for(h=1;h=a-1){f!==t&&(0!==mq(this)&&(t=t.copy(),qq(this,t,!1,U.xj)),tq(this,k,-b,-c,f,t,d));break}h=rq(this,t, +h+1,hm.x?t.x-s:t.x+s,F=u.y>t.y?t.y+C:t.y-C,tq(this,e,g,l,m,new K(p,B),n),Ff(e,t.x+g,t.y+l,q+g,F+l),z.k(q,F))):U.u(m.x,t.x)&&U.u(t.y,u.y)?(s=this.computeCorner(),C=Math.min(s,Math.abs(t.y-m.y)/2),C=s=Math.min(C,Math.abs(u.x-t.x)/2),U.u(s,0)?(tq(this,e,g,l,m,t,n),z.assign(t)): +(p=t.x,F=B=t.y,B=t.y>m.y?t.y-C:t.y+C,q=u.x>t.x?t.x+s:t.x-s,tq(this,e,g,l,m,new K(p,B),n),Ff(e,t.x+g,t.y+l,q+g,F+l),z.k(q,F))):(tq(this,e,g,l,m,t,n),z.assign(t))}fb(f)}b=k.m;N(k)}return b};function sq(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return U.$a(a,0)?b:U.$a(b,0)?a:Math.sqrt(a*a+b*b)} +function qq(a,b,c,d){var e=a.ca;if(!(2>e))if(c){var f=a.j(1);c=f.x-d.x;d=f.y-d.y;f=sq(b.x,b.y,c,d);0!==f&&(e=2===e?.5*f:f,a=lq(a),a>e&&(a=e),c=a*(c-b.x)/f,a=a*(d-b.y)/f,b.x+=c,b.y+=a)}else f=a.j(e-2),c=f.x-d.x,d=f.y-d.y,f=sq(b.x,b.y,c,d),0!==f&&(e=2===e?.5*f:f,a=mq(a),a>e&&(a=e),c=a*(b.x-c)/f,a=a*(b.y-d)/f,b.x-=c,b.y-=a)} +function rq(a,b,c,d){for(var e=a.ca,f=b;U.$a(b.x,f.x)&&U.$a(b.y,f.y);){if(c>=e)return e-1;f=a.j(c++)}if(!U.$a(b.x,f.x)&&!U.$a(b.y,f.y))return c-1;for(var g=f;U.$a(b.x,f.x)&&U.$a(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||U.$a(b.y,f.y)&&U.$a(f.y,g.y)&&(!d||(b.x>=f.x?f.x>=g.x:f.x<=g.x));){if(c>=e)return e-1;g=a.j(c++)}return c-2} +function tq(a,b,c,d,e,f,g){if(!g&&cq(a)){g=[];var h=0;a.ya()&&(h=uq(a,e,f,g));var k=e.x,k=e.y;if(0n-10)l--,n=Math.max(p-5,f.x);else break;p=f.y-10+d;m=n+c;n=f.y+d;a.ve===Oi?W(b,m,n,!1,!1):X(b,k,p,m,p,m,n)}else if(U.u(e.x,f.x))if(e.yn-10)l--,n=Math.max(p-5,f.y);else break;p=f.x-10+c;m=f.x+c;n+=d;a.ve===Oi?W(b,m,n,!1,!1):X(b,p,k,p,n,m,n)}}b.lineTo(f.x+c,f.y+d)} +function uq(a,b,c,d){var e=a.g;if(null===e||b.C(c))return 0;for(e=e.dm;e.next();){var f=e.value;if(null!==f&&f.visible)for(var f=f.Sa.l,g=f.length,h=0;hg.x&&m.x>l.x||l.xg.y&&m.y>l.y||l.yt&&Math.min(g,z)p&&!U.u(g,z)){m.x=t;m.y=p;m=!0;break a}}else if(!U.u(p,s)&&U.u(g,z)&&Math.min(p, +s)g&&Math.min(t,u)n&&!U.u(t,u)){m.x=n;m.y=g;m=!0;break a}m.x=0;m.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}fb(h)}P(E,{Qr:"firstPickIndex"},function(){return 2>=this.ca?0:this.Ob||fq(this)!==Md?1:0});P(E,{yv:"lastPickIndex"},function(){var a=this.ca;return 0===a?0:2>=a?a-1:this.Ob||gq(this)!==Md?a-2:a-1});function cq(a){a=a.ve;return a===Ni||a===Oi}function eq(a,b){if(b||cq(a)){var c=a.g;null===c||c.bl.contains(a)||null===a.yx||c.bl.add(a,a.yx)}} +function Qi(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.gc){var d=c.g;if(null!==d)for(var e=!1,d=d.dm;d.next();){var f=d.value;if(f.visible)if(f===c)for(var e=!0,g=!1,f=f.Sa.l,h=f.length,k=0;kb.links.count)1===b.links.count&&(c=b.links.l[0],c.ym=null,c.Fe=0,c.Ib()),c=b.oo,null!==b&&null!==c.Kg&&c.Kg.remove(b),c=b.os,null!==b&&null!==c.Kg&&c.Kg.remove(b);else for(c=Math.abs(c),a=0===c%2,b=b.links.i;b.next();){var d=b.value,e=Math.abs(d.Fe),f=0===e%2;e>c&&a===f&&(d.Fe=0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Ze=Math.floor((a.x-this.Vc)/this.Vc)*this.Vc;this.$e=Math.floor((b-this.Mc)/this.Mc)*this.Mc;this.$p=Math.ceil((c+2*this.Vc)/this.Vc)*this.Vc;this.aq=Math.ceil((d+2*this.Mc)/this.Mc)*this.Mc;a=1+(Math.ceil((this.$p-this.Ze)/this.Vc)|0);b=1+(Math.ceil((this.aq-this.$e)/this.Mc)|0);if(null===this.Qb||this.Ilthis.$p||a+cthis.aq||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.Il)|0;for(c=Math.min(b+e-1,this.Jl)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.Qb[a][e])return!1;return!0}; +function yq(a,b,c,d,e,f,g,h,k){if(!(bg||ck)){var l,m;l=b|0;m=c|0;var n=a.Qb[l][m];if(1<=n&&999999>n)for(e?m+=d:l+=d,n+=1;f<=l&&l<=g&&h<=m&&m<=k&&!(n>=a.Qb[l][m]);)a.Qb[l][m]=n,n+=1,e?m+=d:l+=d;l=e?m:l;if(e)if(0l;c+=d)yq(a,b,c,1,!e,f,g,h,k),yq(a,b,c,-1,!e,f,g,h,k);else if(0l;b+=d)yq(a,b,c,1,!e,f,g,h,k),yq(a,b,c,-1,!e,f,g, +h,k)}}function zq(a,b,c,d,e,f,g,h,k,l,m){for(var n=b|0,p=c|0,q=a.Qb[n][p];0===q&&n>h&&nl&&p=Math.abs(n-d)&&1>=Math.abs(p-e))return a.abort=!0,0;n=b|0;p=c|0;q=a.Qb[n][p];b=1;for(a.Qb[n][p]=b;0===q&&n>h&&nl&&p=Math.abs(g-k)&&1>=Math.abs(h-l))a.abort=!0;else{var m=f.x;b=f.y;d=f.x+f.width;var n=f.y+f.height,m=m-a.Ze,m=m/a.Vc;b-=a.$e;b/=a.Mc;d-=a.Ze;d/=a.Vc;n-=a.$e;n/=a.Mc;f=Math.max(0,Math.min(a.Il,m|0));d=Math.min(a.Il,Math.max(0,d|0));b=Math.max(0,Math.min(a.Jl,b|0));var n=Math.min(a.Jl,Math.max(0,n|0)),g=g|0,h=h|0,k=k|0, +l=l|0,m=g,p=h,q=0===c||90===c?1:-1;(c=90===c||270===c)?p=zq(a,g,h,k,l,q,c,f,d,b,n):m=zq(a,g,h,k,l,q,c,f,d,b,n);if(!a.abort){a:{c=0===e||90===e?1:-1;e=90===e||270===e;for(var q=k|0,s=l|0,t=a.Qb[q][s];0===t&&q>f&&qb&&s=Math.abs(q-g)&&1>=Math.abs(s-h)){a.abort=!0;break a}q=k|0;s=l|0;t=a.Qb[q][s];for(a.Qb[q][s]=999999;0===t&&q>f&&qb&&s=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case 3:return c>a&&c<=180+a?180:270;case 5:return c>180-a&&c<=360-a?270:0;case 12:return c>a&&c<=180+a?90:0;case 10:return c>180-a&&c<=360-a?180:90;case 7:return 90180+a&&c<=360-a?270:0;case 13:return 180a&&180>=c?90:0;case 14:return c> +a&&c<=180-a?90:c>180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(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} +function kq(a,b){var c=a.Uf;if(0===c.length){a:if(!a.no){c=a.no;a.no=!0;var d,e=null,f=a.jc,f=f instanceof ka?f:null;if(null===f||f.Dd)d=a.jc.CC(a.port.Kc);else{if(!f.Q.v()){a.no=c;break a}e=f;d=e.BC()}var g=a.Uf.length=0,h=a.port.Za(Nd,db()),k=a.port.Za(ce,db()),f=ob(h.x,h.y,0,0);f.oi(k);fb(h);fb(k);h=eb(f.x+f.width/2,f.y+f.height/2);for(d=d.i;d.next();)if(k=d.value,k.ya()){var l=Md,m=k.Ec===a.port||k.O.nh(e),l=m?fq(k,a.port):gq(k,a.port);if(l.$n()&&(m=m?k.nd:k.Ec,null!==m)){var n=m.L;if(null!== +n){var m=k.computeOtherPoint(n,m),n=h.di(m),l=Aq(f,l,n,k.Ob),p=0;0===l?(p=4,180Math.abs(M)?(B=Math.abs(M)/p,p=Math.abs(M)):B=1;break;case 2:q> +Math.abs(Q)?(B=Math.abs(Q)/q,q=Math.abs(Q)):B=1;break;case 1:m>Math.abs(M)?(B=Math.abs(M)/m,m=Math.abs(M)):B=1;break;default:case 4:n>Math.abs(Q)?(B=Math.abs(Q)/n,n=Math.abs(Q)):B=1}C=0}var fa=t.eo;if(e===Hp){u=t.link.computeThickness();u*=B;fa.set(F);switch(z){case 8:fa.x=F.x+M/2+p/2-C-u/2;break;case 2:fa.y=F.y+Q/2+q/2-C-u/2;break;case 1:fa.x=F.x+M/2-m/2+C+u/2;break;default:case 4:fa.y=F.y+Q/2-n/2+C+u/2}C+=u}else u=.5,e===Ep&&(u=(t.Wn+1)/(t.Vl+1)),fa.x=F.x+M*u,fa.y=F.y+Q*u}fb(h);fb(d);fb(k);fb(l); +F=a.Uf;for(M=0;Mb.Fd?1:a.angleb.angle?1:0}; +jq.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.jc,this.port,Md,b.Ec===this.port),d=a.Wn;if(0>d)return c;var e=a.Vl;if(1>=e||!b.Ob)return c;var b=a.Gv,f=a.eo;if(2===a.Fd||8===a.Fd)d=e-1-d;return((a=2===a.Fd||4===a.Fd)?b.ye&&(e=h.right);h.bottom>f&&(f=h.bottom)}}isFinite(c)&&isFinite(d)?a.k(c,d,e-c,f-d):(b=b.location,c=this.padding,a.k(b.x+c.left,b.y+c.top,0,0));return a}; +O(cj,{padding:"padding"},function(){return this.qe},function(a){"number"===typeof a?((isNaN(a)||0>a)&&La(a,">= 0",cj,"padding"),a=new yd(a)):(H(a,yd,cj,"padding"),(isNaN(a.left)||0>a.left)&&La(a.left,">= 0",cj,"padding:value.left"),(isNaN(a.right)||0>a.right)&&La(a.right,">= 0",cj,"padding:value.right"),(isNaN(a.top)||0>a.top)&&La(a.top,">= 0",cj,"padding:value.top"),(isNaN(a.bottom)||0>a.bottom)&&La(a.bottom,">= 0",cj,"padding:value.bottom"));var b=this.qe;b.C(a)||(this.qe=a=a.R(),this.h("padding", +b,a))});function xg(){0=c-1?(g=0,e=d,f+=h+20,h=0):g++}null!==a&&a.xd("Layout")}this.Re=!0};xg.prototype.Sy=function(a){return!a.location.v()||a instanceof ka&&a.sx?!0:!1}; +function Eq(a,b,c,d,e,f,g,h){for(c=c.i;c.next();){var k=c.value;d&&!k.vv||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof D?k.Pe||(k instanceof ka?null===k.yb?Eq(a,b,k.ic,!1,e,f,g,h):b.add(k):b.add(k)):g&&k instanceof E?b.add(k):!h||!k.jd()||k instanceof D||b.add(k))}} +xg.prototype.collectParts=function(a){var b=new qc(A);a instanceof y?(Eq(this,b,a.Wf,!0,null,!0,!0,!0),Eq(this,b,a.links,!0,null,!0,!0,!0),Eq(this,b,a.ph,!0,null,!0,!0,!0)):a instanceof ka?Eq(this,b,a.ic,!1,null,!0,!0,!0):Eq(this,b,a.i,!1,null,!0,!0,!0);return b};O(xg,{vd:"arrangementOrigin"},function(){return this.Oo},function(a){H(a,K,xg,"arrangementOrigin");this.Oo.C(a)||(this.Oo.assign(a),this.w())}); +xg.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.Za(Nd),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a};function Ac(){Jb(this);this.qd=null;this.clear()}Mb("LayoutNetwork",Ac); +Ac.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 qc(Ec);this.edges=new qc(Fc);this.Wy=new Ub(D,Ec);this.Ky=new Ub(E,Fc)}; +Ac.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.yb?"("+this.yb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0}; +Ec.smartComparer=function(a,b){v&&H(a,Ec,Ec,"smartComparer:m");v&&H(b,Ec,Ec,"smartComparer:n");if(null!==a){if(null!==b){var c=a.Oc,d=b.Oc;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>=g&&(f=1);c=this.spacing.width;isFinite(c)||(c=0);a=this.spacing.height;isFinite(a)||(a=0);null!==b&&b.Jb("Layout");d=[];switch(this.alignment){case Sn:var h= +c,k=a,l=Math.max(this.In.width,1);if(!isFinite(l))for(var m=l=0;mf-1|| +0g)d.push(new x(0,z,g+h,B)),C=0,u=t,z+=B,B=0;B=Math.max(B,Q);Q=0;switch(s){case Qn:Q=-p.width;break;default:Q=0}n.moveTo(u+Q,z);switch(s){case Qn:u-=F;break;default:u+=F}C++}d.push(new x(0,z,g+h,B));break;case Rn:h=f;k=c;l=a;m=Math.max(this.In.width,1);n=z=F=0;p=db();for(f=0;f=F&&(g-=F);for(var F=Q=0,M=Math.max(this.In.height,1),oa=n=0,ca=!0,T=db(),f=0;fh-1||0g){d.push(new x(0,ca?C-n:C,g+k,oa+n+l));for(fa=0;faF&&(e.width+=e.x-F,e.x=F)}for(h=f=g=e=0;hd?1:0}; +Cm.smartComparer=function(a,b){v&&H(a,A,Cm,"standardComparer:a");v&&H(b,A,Cm,"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.wa=0,a.Ha=0);else{var b=new S(Nq);b.ud(a.i);a=new S(Nq);var c=new S(Nq),d;d=this.sort(b);var e=this.Nw,f=this.nA,g=this.Yc,h=this.Om,k=this.Ow,l=this.jp,b=this.Oj,m=this.HB,n=this.Mf,p=this.it,e=this.ef,f=this.Dv,g=this.bH;if(!isFinite(g)|| +0>=g)g=NaN;h=this.fF;if(!isFinite(h)||0>=h)h=1;k=this.qh;isFinite(k)||(k=0);l=this.mi;if(!isFinite(l)||360l)l=360;b=this.spacing;isFinite(b)||(b=NaN);e===ho&&f===io?e=fo:e===ho&&f!==io&&(f=io,e=this.ef);if((this.direction===Zn||this.direction===$n)&&this.sorting!==Yn){for(var q=0;!(q>=d.length);q+=2){a.add(d.Z(q));if(q+1>=d.length)break;c.add(d.Z(q+1))}this.direction===Zn?(this.ef===ho&&a.reverse(),d=new S(Nq),d.ud(a),d.ud(c)):(this.ef===ho&&c.reverse(),d=new S(Nq),d.ud(c),d.ud(a))}for(var s= +d.length,t=m=0,q=0;ql&&(0===q||q===d.length-1)&&(u/=2);m+=u;t++}if(isNaN(g)||e===ho){isNaN(b)&&(b=6);if(e!==fo&&e!==ho){u=-Infinity;for(q=0;qg?(g=q,n=g*h):p=t/(360<=l?s:s-1)}this.Nw=e;this.nA=f;this.Yc=g;this.Om=h;this.Ow=k;this.jp=l;this.Oj=b;this.HB=m;this.Mf=n;this.it=p;b=d;d=this.Nw;e=this.Yc;f=this.Ow;h=this.jp;k=this.Oj;l=this.Mf;m=this.it;if(this.direction!==Zn&&this.direction!==$n||d!==ho)if(this.direction===Zn||this.direction===$n){g=0;switch(d){case eo:g=180*Rq(this,e,l,f,m)/Math.PI;break;case fo:m=b=0;g=a.first();null!==g&&(b=Oq(g,Math.PI/2));g=c.first();null!==g&&(m=Oq(g,Math.PI/2));g=180*Rq(this,e,l,f,k+(b+ +m)/2)/Math.PI;break;case co:g=h/b.length}if(this.direction===Zn){switch(d){case eo:Sq(this,a,f,bo);break;case fo:Tq(this,a,f,bo);break;case co:Uq(this,a,h/2,f,bo)}switch(d){case eo:Sq(this,c,f+g,ao);break;case fo:Tq(this,c,f+g,ao);break;case co:Uq(this,c,h/2,f+g,ao)}}else{switch(d){case eo:Sq(this,c,f,bo);break;case fo:Tq(this,c,f,bo);break;case co:Uq(this,c,h/2,f,bo)}switch(d){case eo:Sq(this,a,f+g,ao);break;case fo:Tq(this,a,f+g,ao);break;case co:Uq(this,a,h/2,f+g,ao)}}}else switch(d){case eo:Sq(this, +b,f,this.direction);break;case fo:Tq(this,b,f,this.direction);break;case co:Uq(this,b,h,f,this.direction);break;case ho:Vq(this,b,h,f,this.direction)}else Vq(this,b,h,f-h/2,ao)}this.updateParts();this.network=null;this.Re=!0}; +function Uq(a,b,c,d,e){var f=a.jp,g=a.Yc;a=a.Mf;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===ao?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;Yq(a,k,l,m,n,e,f)||Zq(a,k,l,m,n,e,f);k=f.x;l=f.y}fb(f);a.tl++;if(!(23Math.abs(q)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)?0:p;p=!1;p=Math.abs(f)>Math.abs(n)?0n:0a.tl?a.Yc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;Yq(a,k,l,n,p,e,m)||Zq(a,k,l,n,p,e,m);k=m.x;l=m.y}fb(m);a.tl++;if(!(23a.tl?a.Yc-f/(2*Math.PI):a.Yc-(0h){l=b-a;if(l<-h)return g.x=l,g.y=m,!1;n=!0}}else if(l=b-a,l<-h){l=b+a;if(l>h)return g.x=l,g.y=m,!1;n=!0}m=Math.sqrt(1-Math.min(1,l*l/(h*h)))*k;0>c!==n&&(m=-m);if(Math.abs(c-m)>(d[e].height+d[e+1].height)/2)return g.x=l,g.y=m,!1;g.x=l;g.y=m;return!0} +function Zq(a,b,c,d,e,f,g){var h=a.Yc,k=a.Mf,l=0,m=0;a=(d[e].height+d[e+1].height)/2+a.Oj;d=!1;if(0<=b!==(f===ao)){if(m=c-a,m<-k){m=c+a;if(m>k){g.x=l;g.y=m;return}d=!0}}else if(m=c+a,m>k){m=c-a;if(m<-k){g.x=l;g.y=m;return}d=!0}l=Math.sqrt(1-Math.min(1,m*m/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=m}Tn.prototype.commitLayout=function(){this.commitNodes();this.uv&&this.commitLinks()}; +Tn.prototype.commitNodes=function(){for(var a=this.YE,b=this.network.vertexes.i;b.next();){var c=b.value;c.x+=a.x;c.y+=a.y;c.commit()}};Tn.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()}; +function Qq(a,b,c,d,e){var f=a.QE;if(.001>Math.abs(a.Om-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 g=0,h=0,h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1)),k=0,l=0;l<=f;l++)k=void 0!==d&&void 0!==e?d+l*e/f:l*Math.PI/(2*f),k=Math.sin(k),g+=Math.sqrt(1-a*a*k*k)*h;return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g}function Pq(a,b,c,d,e){var f=0,f=void 0!==d&&void 0!==e?Qq(a,1,c,d,e):Qq(a,1,c);return b/f} +function Rq(a,b,c,d,e){if(.001>Math.abs(a.Om-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a),g=g+(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} +Tn.prototype.sort=function(a){switch(this.sorting){case Wn:break;case Xn:a.reverse();break;case Un:a.sort(this.comparer);break;case Vn:a.sort(this.comparer);a.reverse();break;case Yn:for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);d.add(a.Z(f));b[f]=-1;f=a.Z(f);e=0;for(g=f.Tb;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++; +for(f=f.Mb;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(b=0;ba[b].indexOf(k)&&a[b].push(k);for(c=g.Tb;c.next();)k=d.indexOf(c.value.fromVertex),k!==b&&0>a[b].indexOf(k)&&a[b].push(k)}g=[];for(b=0;ba[c[n]].indexOf(c[n===c.length-1?0:n+1])&&t.push(n===c.length-1?0:n+1);if(0===t.length)for(n=0;nQ.indexOf(ca)||TQ.indexOf(ca)|| +T=u?k+1:k)),C+=k=u&&k++,F>=u&&F++,k>F&&(Q=F,F=k,k=Q),F-k<(c.length+2)/2===(kp||p===k||(s=p>k?p-k:k-p,n+=pl-s?1:-1);c.splice(0>n?k:k+1,0,b);e.splice(g,1);g--}else h=!1;if(h)break;else c.push(e[0]),e.splice(0,1)}for(b=0;b=a?a:360,this.w())}); +O(Tn,{ef:"arrangement"},function(){return this.xc},function(a){this.xc!==a&&(Ea(a,Tn,Tn,"arrangement"),a===ho||a===fo||a===eo||a===co)&&(this.xc=a,this.w())});O(Tn,{direction:"direction"},function(){return this.da},function(a){this.da!==a&&(Ea(a,Tn,Tn,"direction"),a===ao||a===bo||a===Zn||a===$n)&&(this.da=a,this.w())});O(Tn,{sorting:"sorting"},function(){return this.eh},function(a){this.eh!==a&&(Ea(a,Tn,Tn,"sorting"),a===Wn||a===Xn||a===Un||Vn||a===Yn)&&(this.eh=a,this.w())}); +O(Tn,{comparer:"comparer"},function(){return this.Mg},function(a){this.Mg!==a&&(I(a,"function",Tn,"comparer"),this.Mg=a,this.w())});O(Tn,{spacing:"spacing"},function(){return this.fh},function(a){this.fh!==a&&(I(a,"number",Tn,"spacing"),this.fh=a,this.w())});O(Tn,{Dv:"nodeDiameterFormula"},function(){return this.qq},function(a){this.qq!==a&&(Ea(a,Tn,Tn,"nodeDiameterFormula"),a===jo||a===io)&&(this.qq=a,this.w())});P(Tn,{ZE:"actualXRadius"},function(){return this.Yc});P(Tn,{$E:"actualYRadius"},function(){return this.Mf}); +P(Tn,{NH:"actualSpacing"},function(){return this.Oj});P(Tn,{YE:"actualCenter"},function(){return isNaN(this.vd.x)||isNaN(this.vd.y)?new K(0,0):new K(this.vd.x+this.ZE,this.vd.y+this.$E)});var fo;Tn.ConstantSpacing=fo=R(Tn,"ConstantSpacing",0);var eo;Tn.ConstantDistance=eo=R(Tn,"ConstantDistance",1);var co;Tn.ConstantAngle=co=R(Tn,"ConstantAngle",2);var ho;Tn.Packed=ho=R(Tn,"Packed",3);var ao;Tn.Clockwise=ao=R(Tn,"Clockwise",4);var bo;Tn.Counterclockwise=bo=R(Tn,"Counterclockwise",5);var Zn; +Tn.BidirectionalLeft=Zn=R(Tn,"BidirectionalLeft",6);var $n;Tn.BidirectionalRight=$n=R(Tn,"BidirectionalRight",7);var Wn;Tn.Forwards=Wn=R(Tn,"Forwards",8);var Xn;Tn.Reverse=Xn=R(Tn,"Reverse",9);var Un;Tn.Ascending=Un=R(Tn,"Ascending",10);var Vn;Tn.Descending=Vn=R(Tn,"Descending",11);var Yn;Tn.Optimized=Yn=R(Tn,"Optimized",12);var jo;Tn.Pythagorean=jo=R(Tn,"Pythagorean",13);var io;Tn.Circular=io=R(Tn,"Circular",14);function Lq(){this.Tn=-Infinity;this.Fo=this.om=null} +Lq.prototype.compare=function(a,b){if(0this.Tn||Math.abs(a)a&&0f?(e=m.x+m.width/2,h=m.y+m.height/2,k[0]=new K(m.x+m.width+d.width,m.y),k[1]=new K(m.x,m.y+m.height+d.height),f=2):(n=dr(k,f,e,h,m.width, +m.height,d),p=k[n],q=new K(p.x+m.width+d.width,p.y),s=new K(p.x,p.y+m.height+d.height),n+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().Ya,d=this.network.vertexes.i;d.next();){if(d.value.Ya.Tf(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Lf?a.Lf=new S(jr):a.Lf.clear();a.Lf.ud(a.network.vertexes);var c=a.Lf;c.sort(function(a,b){return null===a||null===b||a===b?0:b.qf-a.qf});for(var d=c.count-1;0<=d&&1>=c.Z(d).qf;)d--;return 1=g))){for(var l=0,m=0,n=k.count-g;ns&&(s=1);l=U.sqrt((l+s+m*m*4/(g*g))/s);g=(l-1)*n/2;l=(l-1)*p/2;f.Ya=new x(k-q.x-g,h-q.y-l,n+2*g,p+2*l);f.focus=new K(q.x+g,q.y+l)}a.network=d;return c} +function ir(a,b,c){v&&(H(b,br,ar,"popNetwork:oldnet"),J(c,ar,"popNetwork:level"));for(c=a.network.vertexes.i;c.next();){var d=c.value;d.network=b;if(null!==d.Hg){var e=d.Hg.Z(d.iz);d.qf=e.fw;var f=e.Cz,g=e.Dz;d.Ya=new x(d.wa-f,d.Ha-g,e.iw,e.ew);d.focus=new K(f,g);d.iz--}}for(c=a.network.edges.i;c.next();)c.value.network=b;a.network=b} +function pr(a,b,c){v&&(H(b,jr,ar,"surroundNode:oldnet"),J(c,ar,"surroundNode:level"));var d=b.Rl;if(null!==d&&0!==d.count){c=b.wa;var e=b.Ha,f=b.width,g=b.height;null!==b.Hg&&0=n.qf?k++:(h=!0,l++,g+=Math.atan2(b.Ha-n.Ha,b.wa-n.wa))}if(0!==k)for(0>1)+l)*(0===h%2?1:-1);k.wa=c+m*Math.cos(n);k.Ha=e+m*Math.sin(n);h++}}} +function dr(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yk+g?(d=d+f-h,e=e-k-g,U.sqrt(d*d+e*e)):e+ch+l?e>k+g?(d=d-h-l,e=e-k-g,U.sqrt(d*d+e*e)):e+ck+g?e-(k+g):e+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.wa,e=d,f=c.Ha,g=f,c=1;cg-f)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.wa-b.wa}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.Ha-b.Ha});for(var g=a.Ug,l=0,m=0,n=0,c=0;cg||n-d>g){if(f)break}else if(k-q>g||q-k>g){if(!f)break}else{var s=ur(h,e);1>s?(m=a.Kv,null===m&&(a.Kv=m=new Kc(0)),l=m.random(),s=m.random(),d>n?(m=Math.abs(e.S.right-h.S.x),m=(1+m)*l):dq?(n=Math.abs(e.S.bottom-h.S.y),n=(1+n)*s):ds?(m=a.Kv,null===m&&(a.Kv=m=new Kc(0)),l=m.random(),s= +m.random(),m=(d>n?1:-1)*(1+(e.width>h.width)?e.width:h.width)*l,n=(k>q?1:-1)*(1+(e.height>h.height)?e.height:h.height)*s):(l=f.stiffness*(s-f.length),m=(n-d)/s*l,n=(q-k)/s*l),h.forceX+=m,h.forceY+=n,e.forceX-=m,e.forceY-=n;c=0;d=Math.max(a.Ug/20,50);for(e=0;ed&&(f=d),g<-d?g=-d:g>d&&(g=d),h.wa+=f,h.Ha+=g,c=Math.max(c,f*f+g*g));return c>a.AC*a.AC}ar.prototype.moveFixedVertex=function(){}; +ar.prototype.commitLayout=function(){this.mz();this.commitNodes();this.uv&&this.commitLinks()};ar.prototype.mz=function(){if(this.zo)for(var a=this.network.edges.i;a.next();){var b=a.value.link;null!==b&&(b.gb=we,b.ib=we)}};ar.prototype.commitNodes=function(){var a=0,b=0;if(this.eF){var c=nb();this.Nf(this.network,c);b=this.vd;a=b.x-c.x;b=b.y-c.y;pb(c)}for(var c=nb(),d=this.network.vertexes.i;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.Ya),c.x+=a,c.y+=b,e.Ya=c;e.commit()}pb(c)}; +ar.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()};ar.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Jm:a};ar.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Im:a};ar.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.Fm:a};ar.prototype.electricalFieldX=function(){return 0};ar.prototype.electricalFieldY=function(){return 0}; +ar.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Hm:a};ar.prototype.gravitationalFieldX=function(){return 0};ar.prototype.gravitationalFieldY=function(){return 0};ar.prototype.isFixed=function(a){return a.isFixed};P(ar,{mI:"currentIteration"},function(){return this.Np});O(ar,{ZB:"arrangementSpacing"},function(){return this.vf},function(a){H(a,ib,ar,"arrangementSpacing");this.vf.C(a)||(this.vf.assign(a),this.w())}); +O(ar,{eF:"arrangesToOrigin"},function(){return this.Po},function(a){this.Po!==a&&(I(a,"boolean",ar,"arrangesToOrigin"),this.Po=a,this.w())});O(ar,{zo:"setsPortSpots"},function(){return this.dh},function(a){this.dh!==a&&(I(a,"boolean",ar,"setsPortSpots"),this.dh=a,this.w())});O(ar,{comments:"comments"},function(){return this.Lg},function(a){this.Lg!==a&&(I(a,"boolean",ar,"comments"),this.Lg=a,this.w())}); +O(ar,{Ly:"maxIterations"},function(){return this.ln},function(a){this.ln!==a&&(I(a,"number",ar,"maxIterations"),0<=a&&(this.ln=a,this.w()))});O(ar,{AC:"epsilonDistance"},function(){return this.lp},function(a){this.lp!==a&&(I(a,"number",ar,"epsilonDistance"),0b.toVertex.index&&(this.network.Lv(b),b.rev=!0);break;case xr:for(b=this.network.vertexes.i;b.next();)a=b.value,a.On=-1,a.finish=-1;for(a=this.network.edges.i;a.next();)a.value.forest=!1;this.lq=0;for(b.reset();b.next();)c=b.value,0===c.Tb.count&&Hr(this,c);for(b.reset();b.next();)c=b.value,-1===c.On&&Hr(this,c);for(a.reset();a.next();)b=a.value,b.forest||(c=b.fromVertex, +d=c.finish,e=b.toVertex,f=e.finish,e.Ons&&0s&&0b[this.Ye]&&(this.Ut=b[c]-1,this.Ye=c),b[c]g)for(var n=g+1;nm;n--)k=d[n],k.near===l&&k.Ol===l.Ol||h++;var l=0,p,q=p=n=k=0,s,t=0,u=0;s=0;var z;if(0<=c)for(m=d[g].ie,l=0;lt||k===t&&p>s)&&h++,uk||t===k&&s>p)&&h++);if(0>=c)for(m=d[g].de,l=0;lt||k===t&&n>u)&&h++, +sk||t===k&&u>n)&&h++);f[g*e+g]=h;for(m=g+1;m=c)for(h=d[g].de,z=d[m].de,l=0;l=c&&(k=h.ie);var l=null;0<=c&&(l=h.de);var m=0,n=0,p=h.near;null!==p&&p.layer===h.layer&&(m+=p.column-1,n++);if(null!==k)for(p=0;p=c&&(k=h.ie);var l=null;0<=c&&(l=h.de);var m=0,n=[],p=h.near;null!==p&&p.layer===h.layer&&(n[m]=p.column-1,m++);if(null!==k)for(p=0;p>1,f[g]=m&1?n[l]:n[l-1]+n[l]>>1)}Lr(a,b,d);return f}function Tr(a,b,c,d,e,f){if(b.component===d){b.component=c;var g=0,h=0;if(e)for(var k=b.Mb;k.next();){var h=k.value,l=h.toVertex,g=b.layer-l.layer,h=a.linkMinLength(h);g===h&&Tr(a,l,c,d,e,f)}if(f)for(k=b.Tb;k.next();)h=k.value,l=h.fromVertex,g=l.layer-b.layer,h=a.linkMinLength(h),g===h&&Tr(a,l,c,d,e,f)}} +function Ur(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.Mb;g.next();)Ur(a,g.value.toVertex,c,d,e,f);if(f)for(b=b.Tb;b.next();)Ur(a,b.value.fromVertex,c,d,e,f)}}function Er(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid)return b}return null}function Fr(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.Mb;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} +function Gr(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.Tb;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function Hr(a,b){b.On=a.lq;a.lq++;for(var c=b.Mb;c.next();){var d=c.value,e=d.toVertex;-1===e.On&&(d.forest=!0,Hr(a,e))}b.finish=a.lq;a.lq++} +Dn.prototype.assignLayers=function(){switch(this.kn){case Vr:Wr(this);break;case Xr:for(var a=0,b=this.network.vertexes.i;b.next();)a=Yr(this,b.value),this.Xa=Math.max(a,this.Xa);for(b.reset();b.next();)a=b.value,a.layer=this.Xa-a.layer;break;default:case yr:Wr(this);for(b=this.network.vertexes.i;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.Tb.count&&Zr(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.Xa=-1;for(b.reset();b.next();){var c=b.value;c.layer-= +a;this.Xa=Math.max(this.Xa,c.layer)}}};function Wr(a){for(var b=a.network.vertexes.i;b.next();){var c=$r(a,b.value);a.Xa=Math.max(c,a.Xa)}}function $r(a,b){var c=0;if(-1===b.layer){for(var d=b.Mb;d.next();)var e=d.value,f=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,$r(a,f)+e);b.layer=c}else c=b.layer;return c}function Yr(a,b){var c=0;if(-1===b.layer){for(var d=b.Tb;d.next();)var e=d.value,f=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,Yr(a,f)+e);b.layer=c}else c=b.layer;return c} +function Zr(a,b){if(!b.valid){b.valid=!0;for(var c=b.Mb;c.next();)Zr(a,c.value.toVertex);for(c=a.network.vertexes.i;c.next();)c.value.component=-1;for(var d=b.ie.l,e=d.length,f=0;fh&&Tr(a,g.fromVertex,0,-1,!0,!1)}for(Tr(a,b,1,-1,!0,!0);0!==b.component;){for(var h=0,d=Infinity,k=0,l=null,m=a.network.vertexes.i;m.next();){var n=m.value;if(1===n.component){for(var p=0,q=!1,s=n.ie.l,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 Jr(a,b,c){return 90===a.da?c&&!b.rev||!c&&b.rev?270:90:180===a.da?c&&!b.rev||!c&&b.rev?0:180:270===a.da?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0} +Dn.prototype.initializeIndices=function(){switch(this.Zm){default:case as:for(var a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;b.index=this.od[c];this.od[c]++}break;case zr:a=this.network.vertexes.i;for(b=this.Xa;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&bs(this,c);break;case cs:for(a=this.network.vertexes.i,b=0;b<=this.Xa;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&ds(this,c)}}; +function bs(a,b){var c=b.layer;b.index=a.od[c];a.od[c]++;for(var c=b.de.je(),d=!0;d;)for(var d=!1,e=0;eg.portFromColOffset&&(d=!0,c[e]=g,c[e+1]=f)}for(e=0;eg.portToColOffset&&(d=!0,c[e]=g,c[e+1]=f)}for(e=0;e=g;d--)f=fs(this,d,-1)||f;e=this.countCrossings();e>=a?Or(this,b):(a=e,b=Nr(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=fs(this,d,1)||f;e=this.countCrossings();e>=a?Or(this,b):(a=e,b=Nr(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=fs(this,d,1)||f;e>=a?Or(this,b):(a=e,b=Nr(this));for(f=!0;f;)for(f=!1, +d=g;d<=c;d++)f=fs(this,d,-1)||f;e>=a?Or(this,b):(a=e,b=Nr(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=fs(this,d,0)||f;e>=a?Or(this,b):(a=e,b=Nr(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=fs(this,d,0)||f;e>=a?Or(this,b):(a=e,b=Nr(this))}break;default:case Ar:for(c=this.Xa,g=0,h=a+1;(d=this.countCrossings())=g;d--)f=fs(this,d,-1)||f;e=this.countCrossings();e>=a?Or(this,b):(a=e,b=Nr(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=fs(this,d,1)||f;e=this.countCrossings(); +e>=a?Or(this,b):(a=e,b=Nr(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=fs(this,d,1)||f;e>=a?Or(this,b):(a=e,b=Nr(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=fs(this,d,-1)||f;e>=a?Or(this,b):(a=e,b=Nr(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=fs(this,d,0)||f;e>=a?Or(this,b):(a=e,b=Nr(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=fs(this,d,0)||f;e>=a?Or(this,b):(a=e,b=Nr(this))}}Or(this,b)}; +function es(a,b,c){v&&(J(b,Dn,"medianBarycenterCrossingReduction:unfixedLayer"),J(c,Dn,"medianBarycenterCrossingReduction:direction"));var d=0,e=Kr(a,b),f=a.od[b],g=Sr(a,b,c);c=Rr(a,b,c);for(d=0;df+1&&(p+=4*(C-f),q+=4*(C-(f+1)))}F=d[f].Mb.i;for(F.reset();F.next();)if(B=F.value,B.valid&&B.toVertex.layer===b){B=B.toVertex;for(C=0;d[C]!==B;)C++;C===f+1&&(q+=1)}F=d[f+1].Tb.i;for(F.reset();F.next();)if(B=F.value,B.valid&&B.fromVertex.layer===b){B=B.fromVertex;for(C=0;d[C]!==B;)C++;Cf+1&&(p+=4*(C-(f+1)),q+=4*(C-f))}F=d[f+1].Mb.i;for(F.reset();F.next();)if(B=F.value, +B.valid&&B.toVertex.layer===b){B=B.toVertex;for(C=0;d[C]!==B;)C++;C===f&&(p+=1)}var C=B=0,F=g[d[f].index],Q=h[d[f].index],M=g[d[f+1].index],fa=h[d[f+1].index];-1!==F&&(B+=Math.abs(F-s),C+=Math.abs(F-z));-1!==Q&&(B+=Math.abs(Q-s),C+=Math.abs(Q-z));-1!==M&&(B+=Math.abs(M-t),C+=Math.abs(M-u));-1!==fa&&(B+=Math.abs(fa-t),C+=Math.abs(fa-u));if(q>1)+8*d;this.rb*=8}if(0!==(this.Oh&js))for(b=!0;b;){b=!1;for(a=this.Ye+1;a<=this.Xa;a++)b=ks(this,a,1)||b; +for(a=this.Ye-1;0<=a;a--)b=ks(this,a,-1)||b;b=ks(this,this.Ye,0)||b}if(0!==(this.Oh&ls)){for(a=this.Ye+1;a<=this.Xa;a++)ms(this,a,1);for(a=this.Ye-1;0<=a;a--)ms(this,a,-1);ms(this,this.Ye,0)}c&&(ns(this,-1),ns(this,1));if(0!==(this.Oh&js))for(b=!0;b;){b=!1;b=ks(this,this.Ye,0)||b;for(a=this.Ye+1;a<=this.Xa;a++)b=ks(this,a,0)||b;for(a=this.Ye-1;0<=a;a--)b=ks(this,a,0)||b}}; +function ks(a,b,c){v&&(J(b,Dn,"bendStraighten:unfixedLayer"),J(c,Dn,"bendStraighten:direction"));for(var d=!1;os(a,b,c);)d=!0;return d} +function os(a,b,c){v&&(J(b,Dn,"shiftbendStraighten:unfixedLayer"),J(c,Dn,"shiftbendStraighten:direction"));var d=0,e=Kr(a,b),f=a.od[b],g=Rr(a,b,-1);if(0c)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?m-1:m,n=0,n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m,s=p=0,t= +0,u=0,z=0,C=0;if(0>=c)for(var B=e[d].Tb.i;B.next();){var F=B.value;F.valid&&F.fromVertex.layer!==b&&(u=Mr(F),z=F.portFromColOffset,C=F.portToColOffset,F=F.fromVertex.column,p+=(Math.abs(m+C-(F+z))+1)*u,s+=(Math.abs(q+C-(F+z))+1)*u,t+=(Math.abs(n+C-(F+z))+1)*u)}if(0<=c)for(B=e[d].Mb.i;B.next();)F=B.value,F.valid&&F.toVertex.layer!==b&&(u=Mr(F),z=F.portFromColOffset,C=F.portToColOffset,F=F.toVertex.column,p+=(Math.abs(m+z-(F+C))+1)*u,s+=(Math.abs(q+z-(F+C))+1)*u,t+=(Math.abs(n+z-(F+C))+1)*u);C=z=u= +0;B=g[e[d].index];F=h[e[d].index];-1!==B&&(u+=Math.abs(B-m),z+=Math.abs(B-q),C+=Math.abs(B-n));-1!==F&&(u+=Math.abs(F-m),z+=Math.abs(F-q),C+=Math.abs(F-n));if(s=c[d]?m=p:n<=c[d]&&(m=n));m!==h&&(g=!0,e[d].column=m)}Lr(a,b,e);a.normalize()} +function ps(a,b){v&&(J(b,Dn,"packAux:column"),J(1,Dn,"packAux:direction"));for(var c=!0,d=a.network.vertexes.i;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),g=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+g>=b){c=!1;break}}e=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(c.column-=1,e=!0);return e} +function qs(a,b){v&&(J(b,Dn,"tightPackAux:column"),J(1,Dn,"tightPackAux:direction"));for(var c=b,c=b+1,d=0,e=[],f=[],d=0;d<=a.Xa;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.i;g.next();){var d=g.value,h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.Xa;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)e=g.value,e.column>b&&(e.column-=1,c=!0);return c} +function ns(a,b){v&&J(b,Dn,"componentPack:direction");for(var c=0;c<=a.rb;c++)for(;ps(a,c););a.normalize();for(c=0;ce?Or(a,d):gb)for(c=a.rb;0<=c;c--)for(d=Nr(a),e=Qr(a),f=e+1;ee?Or(a,d):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Df);a.Df++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Ur(a,b,a.Df,-1,!0,!0),a.Df++);var f=0;b=[];for(f=0;fc)for(h=a.rb;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} +Dn.prototype.commitLayout=function(){if(this.zo)for(var a=Ir(this,!0),b=Ir(this,!1),c=this.network.edges.i;c.next();){var d=c.value.link;null!==d&&(d.gb=a,d.ib=b)}this.commitNodes();this.Zx();this.uv&&this.commitLinks()};function Ir(a,b){return 270===a.da?b?xe:Le:90===a.da?b?Le:xe:180===a.da?b?ye:ze:b?ze:ye} +Dn.prototype.commitNodes=function(){this.kg=[];this.Cf=[];this.Xe=[];this.wb=[];for(var a=0;a<=this.Xa;a++)this.kg[a]=0,this.Cf[a]=0,this.Xe[a]=0,this.wb[a]=0;for(a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;this.kg[c]=Math.max(this.kg[c],this.nodeMinLayerSpace(b,!0));this.Cf[c]=Math.max(this.Cf[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.nl,c=0;c<=this.Xa;c++){var e=d;0>=this.kg[c]+this.Cf[c]&&(e=0);0=Qa.S.y&&Mc<=Qa.S.bottom&&(Ja=Qa.wa+Fg,Mc=Mc=Qa.S.x&&Mc<=Qa.S.right&&(Ja=Qa.Ha+Fg,Mc=Mcec.y&&(Hg=kh.y>ec.y?0:Wc.xPc.x&&(Ig=Nh.x>Pc.x?0:gd.yb.layer?1:a.ceb.ce?1:a.wdb.wd?1:0:0}; +Dn.prototype.PD=function(a,b){return a instanceof ss&&b instanceof ss&&a!==b?a.firstb.first||a.rhb.rh||a.ceb.ce?1:a.wdb.wd?1:0:0};Dn.prototype.Nv=function(a,b){return a instanceof ss&&b instanceof ss&&a!==b?a.kdb.kd||a.rhb.rh||a.ceb.ce?1:a.wdb.wd?1:0:0};Dn.prototype.u=function(a,b){v&&(J(a,Dn,"isApprox:a"),J(b,Dn,"isApprox:b"));var c=a-b;return-1c}; +function ts(a,b,c,d){v&&(J(a,Dn,"isUnoccupied2:px"),J(b,Dn,"isUnoccupied2:py"),J(c,Dn,"isUnoccupied2:qx"),J(d,Dn,"isUnoccupied2:qy"));return!0}function Kr(a,b){var c,d=a.od[b];if(d>=a.ng.length){c=[];for(var e=0;ea&&(this.Oh=a,this.w()))}); +O(Dn,{zo:"setsPortSpots"},function(){return this.dh},function(a){this.dh!==a&&(I(a,"boolean",Dn,"setsPortSpots"),this.dh=a,this.w())});O(Dn,{Av:"linkSpacing"},function(){return this.Hi},function(a){this.Hi!==a&&(I(a,"number",Dn,"linkSpacing"),0<=a&&(this.Hi=a,this.w()))});P(Dn,{JG:"maxLayer"},function(){return this.Xa});P(Dn,{dJ:"maxIndex"},function(){return this.Ut});P(Dn,{cJ:"maxColumn"},function(){return this.rb});P(Dn,{jJ:"minIndexLayer"},function(){return this.eq}); +P(Dn,{eJ:"maxIndexLayer"},function(){return this.Ye});var xr;Dn.CycleDepthFirst=xr=R(Dn,"CycleDepthFirst",0);var Dr;Dn.CycleGreedy=Dr=R(Dn,"CycleGreedy",1);var yr;Dn.LayerOptimalLinkLength=yr=R(Dn,"LayerOptimalLinkLength",0);var Vr;Dn.LayerLongestPathSink=Vr=R(Dn,"LayerLongestPathSink",1);var Xr;Dn.LayerLongestPathSource=Xr=R(Dn,"LayerLongestPathSource",2);var zr;Dn.InitDepthFirstOut=zr=R(Dn,"InitDepthFirstOut",0);var cs;Dn.InitDepthFirstIn=cs=R(Dn,"InitDepthFirstIn",1);var as; +Dn.InitNaive=as=R(Dn,"InitNaive",2);var gs;Dn.AggressiveNone=gs=R(Dn,"AggressiveNone",0);var Ar;Dn.AggressiveLess=Ar=R(Dn,"AggressiveLess",1);var hs;Dn.AggressiveMore=hs=R(Dn,"AggressiveMore",2);Dn.PackNone=0;var is;Dn.PackExpand=is=1;var js;Dn.PackStraighten=js=2;var ls;Dn.PackMedian=ls=4;var Br;Dn.PackAll=Br=7;function ss(){this.index=this.wd=this.ce=this.kd=this.first=this.layer=0;this.link=null;this.rh=0}Tb(ss,{layer:!0,first:!0,kd:!0,ce:!0,wd:!0,index:!0,link:!0,rh:!0}); +function Cr(){Ac.call(this)}Nb(Cr,Ac);Mb("LayeredDigraphNetwork",Cr);Cr.prototype.createVertex=function(){return new us};Cr.prototype.createEdge=function(){return new vs};function us(){Ec.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.On=NaN;this.Ol=0;this.Ty=this.Uy=null}Nb(us,Ec);Mb("LayeredDigraphVertex",us); +function vs(){Fc.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}Nb(vs,Fc);Mb("LayeredDigraphEdge",vs);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&&H(a,Bs,Z,"removeChild:p");v&&H(b,Bs,Z,"removeChild:c");for(var c=a.children,d=0,e=0;ef?jt(a,h,Da,B,F):kt(a,h,Da,B,F);Da=ca.x;B=ca.width;F=ca.height;break;case Ys:for(l=0;ls&&(TJa&&(pt(a,-Ja,0,lb,l-1),qt(M,-Ja,0),qt(fa,-Ja,0),Ja=0)}m.ba.k(Ja,ja);B=Math.max(B,oa);F=Math.max(F,Q+(0===$a?0:z)+Xa.height);T=oa}else{0< +s&&0s&&(jaJa&&(pt(a,0,-Ja,lb,l-1),qt(M,0,-Ja),qt(fa,0,-Ja),Ja=0);m.ba.k(T,Ja);F=Math.max(F,ca);B=Math.max(B,Q+(0=== +$a?0:z)+Xa.width);ja=ca}Qa++}0<$a&&(b?(F+=Math.max(0,c),Tg&&(g=0),135p&&(p=0),n===Zs&&(k+=t/2+a.D.y),h+=d+c):b?(null===a.comments?d>B&&(n=ut(n,d-B,0),h=n.x,k=n.y,B=d,g=0):B=st(a,B,g),0>g&&(h-=g,g=0),135F&&(n=ut(n,0,e-F),h=n.x,k=n.y,F=e,p=0):F=tt(a,F,p),0>p&&(k-=p,p=0),h+=d+c);if(0<$a)f=lt(this,4),n=lt(this,4),b?(f[2].k(0, +e+c),f[3].k(f[2].x,F),n[2].k(B,f[2].y),n[3].k(n[2].x,f[3].y)):(f[2].k(d+c,0),f[3].k(B,f[2].y),n[2].k(f[2].x,F),n[3].k(f[3].x,n[2].y));else{f=lt(this,M.length+2);n=lt(this,fa.length+2);for(l=0;lf[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])),n[0].k(g+d,0),n[1].k(n[0].x,e),n[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])),n[0].k(0,p+e),n[1].k(d,n[0].y),n[2].xc?jt(b,e,Qa,Q,M):kt(b,e,Qa,Q,M);Qa=M.x;Q=M.width;M=M.height;break;case Ys:for(h=0;hq&&(oaq&&(can&&(n=0),135B&&(B=0));b.za.k(n,B);b.Oa.k(Q,M)}} +function jt(a,b,c,d,e){v&&H(a,Bs,Z,"layoutBusChildrenPosDir:v");var f=b.length;if(0===f)return new x(c,0,d,e);if(1===f){var g=b[0];d=g.Oa.width;e=g.Oa.height;return new x(c,0,d,e)}for(var h=a.nodeSpacing,k=a.rowSpacing,l=90===et(a),m=0,n=0,p=0,q=0;ql&&(d-=l),e=Math.max(e,Math.max(C,p)+b+s.height),0>g.ba.x&&(c=Dt(a,g.ba.x,!1,c,h))):(g.ba.k(d+b,c+h/2-g.D.y-g.za.y),d=Math.max(d,Math.max(z,n)+b+s.width),l=c+h/2-g.D.y-g.za.y,e=Math.max(e,l+s.height),0>l&&(e-=l),0>g.ba.y&&(c=Dt(a,g.ba.y,!0,c,h))));return new x(c,0,d,e)} +function kt(a,b,c,d,e){v&&H(a,Bs,Z,"layoutBusChildrenNegDir:v");var f=b.length;if(0===f)return new x(c,0,d,e);if(1===f){var g=b[0];d=g.Oa.width;e=g.Oa.height;return new x(c,0,d,e)}for(var h=a.nodeSpacing,k=a.rowSpacing,l=270===et(a),m=0,n=0,p=0,q=0;qn&&(d-=n),e=Math.max(e,Math.abs(Math.min(C,p))+k+s.height),0>g.ba.x&&(c=Dt(a,g.ba.x,!1,c,h))):(g.ba.k(-d-s.width-k,c+h/2-g.D.y-g.za.y),d=Math.max(d,Math.abs(Math.min(z,n))+k+s.width),n=c+h/2-g.D.y-g.za.y,e=Math.max(e,n+s.height),0>n&&(e-=n),0>g.ba.y&&(c=Dt(a,g.ba.y,!0,c,h))));for(q=0;qd&&(d=c+a.width);0>c&&(d-=c);return d;case ft:return a.width>b?a.width:b;case gt:return 2*a.D.x>b?a.width:b+a.width-2*a.D.x;case Xs:case Ms:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case Ys:return a.width-a.D.x+a.nodeSpacing/2+b;case Zs:return Math.max(a.width,a.D.x+a.nodeSpacing/2+b);default:return b}} +function tt(a,b,c){v&&H(a,Bs,Z,"calculateSubheight:v");switch(a.alignment){case Vs:case rt:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case ft:return a.height>b?a.height:b;case gt:return 2*a.D.y>b?a.height:b+a.height-2*a.D.y;case Xs:case Ms:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case Ys:return a.height-a.D.y+a.nodeSpacing/2+b;case Zs:return Math.max(a.height,a.D.y+a.nodeSpacing/2+b);default:return b}} +function ut(a,b,c){v&&H(a,Fa,Z,"alignOffset:align");switch(a){case rt:b/=2;c/=2;break;case Vs:b/=2;c/=2;break;case ft:c=b=0;break;case gt:break;default:w("Unhandled alignment value "+a.toString())}return new K(b,c)}function mt(a,b,c,d,e,f){v&&H(a,Bs,Z,"shiftRelPosAlign:v");v&&H(b,Fa,Z,"shiftRelPosAlign:align");b=ut(b,c,d);pt(a,b.x,b.y,e,f)}function pt(a,b,c,d,e){v&&H(a,Bs,Z,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].ba;f.x+=b;f.y+=c}} +function nt(a,b,c,d){v&&(H(b,Bs,Z,"recordMidPoints:v"),I(c,"number",Z,"recordMidPoints:x"),I(d,"number",Z,"recordMidPoints:y"));var e=b.parent;switch(a.We){case xs:for(a=b.Tb;a.next();)b=a.value,b.fromVertex===e&&b.Gq.k(c,d);break;case Es:for(a=b.Mb;a.next();)b=a.value,b.toVertex===e&&b.Gq.k(c,d);break;default:w("Unhandled path value "+a.We.toString())}}function qt(a,b,c){for(var d=0;dn.length||null===p||2>p.length))for(l= +k=0;ku&&e.ye.y&&ub.length||null===k||2>k.length)d=null;else{m=lt(a,b.length+k.length);for(d=f=e=0;fe;)u=k[f++],m[d++].k(u.x+l,u.y);k=lt(a,d);for(e=0;en.length||null===f||2>f.length)e=null;else{m=lt(a,n.length+f.length);for(l=z=k=0;kf;)e=n[k++], +m[l++].k(e.x,e.y);e=lt(a,l);for(k=0;kn.length||null===p||2>p.length))for(l=k=0;kf&&e.xe.x&&fb.length||null===k||2>k.length)d=null;else{m=lt(a,b.length+k.length);for(d=f=e=0;fe;)u=k[f++],m[d++].k(u.x,u.y+l);k=lt(a,d);for(e=0;en.length||null===f||2>f.length)e=null;else{m=lt(a,n.length+f.length);for(l=z=k=0;kf;)e=n[k++],m[l++].k(e.x,e.y);e=lt(a,l);for(k=0;k=a?0:135>=a?90:225>=a?180:315>=a?270:0} +function ht(a){v&&H(a,Bs,Z,"computeLayerSpacing:v");var b=et(a),b=90===b||270===b,c=a.layerSpacing;if(0=a&&(this.ka.nodeIndentPastParent=a,this.w()))});O(Z,{nodeSpacing:"nodeSpacing"},function(){return this.ka.nodeSpacing},function(a){this.ka.nodeSpacing!==a&&(I(a,"number",Z,"nodeSpacing"),this.ka.nodeSpacing=a,this.w())}); +O(Z,{layerSpacing:"layerSpacing"},function(){return this.ka.layerSpacing},function(a){this.ka.layerSpacing!==a&&(I(a,"number",Z,"layerSpacing"),this.ka.layerSpacing=a,this.w())});O(Z,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.ka.layerSpacingParentOverlap},function(a){this.ka.layerSpacingParentOverlap!==a&&(I(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.ka.layerSpacingParentOverlap=a,this.w()))}); +O(Z,{compaction:"compaction"},function(){return this.ka.compaction},function(a){this.ka.compaction!==a&&(Ea(a,Z,Z,"compaction"),a===bt||a===dt)&&(this.ka.compaction=a,this.w())});O(Z,{breadthLimit:"breadthLimit"},function(){return this.ka.breadthLimit},function(a){this.ka.breadthLimit!==a&&(I(a,"number",Z,"breadthLimit"),0<=a&&(this.ka.breadthLimit=a,this.w()))}); +O(Z,{rowSpacing:"rowSpacing"},function(){return this.ka.rowSpacing},function(a){this.ka.rowSpacing!==a&&(I(a,"number",Z,"rowSpacing"),this.ka.rowSpacing=a,this.w())});O(Z,{rowIndent:"rowIndent"},function(){return this.ka.rowIndent},function(a){this.ka.rowIndent!==a&&(I(a,"number",Z,"rowIndent"),0<=a&&(this.ka.rowIndent=a,this.w()))}); +O(Z,{commentSpacing:"commentSpacing"},function(){return this.ka.commentSpacing},function(a){this.ka.commentSpacing!==a&&(I(a,"number",Z,"commentSpacing"),this.ka.commentSpacing=a,this.w())});O(Z,{commentMargin:"commentMargin"},function(){return this.ka.commentMargin},function(a){this.ka.commentMargin!==a&&(I(a,"number",Z,"commentMargin"),this.ka.commentMargin=a,this.w())}); +O(Z,{setsPortSpot:"setsPortSpot"},function(){return this.ka.setsPortSpot},function(a){this.ka.setsPortSpot!==a&&(I(a,"boolean",Z,"setsPortSpot"),this.ka.setsPortSpot=a,this.w())});O(Z,{portSpot:"portSpot"},function(){return this.ka.portSpot},function(a){H(a,V,Z,"portSpot");this.ka.portSpot.C(a)||(this.ka.portSpot=a,this.w())}); +O(Z,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.ka.setsChildPortSpot},function(a){this.ka.setsChildPortSpot!==a&&(I(a,"boolean",Z,"setsChildPortSpot"),this.ka.setsChildPortSpot=a,this.w())});O(Z,{childPortSpot:"childPortSpot"},function(){return this.ka.childPortSpot},function(a){H(a,V,Z,"childPortSpot");this.ka.childPortSpot.C(a)||(this.ka.childPortSpot=a,this.w())}); +O(Z,{gI:"alternateSorting"},function(){return this.ia.sorting},function(a){this.ia.sorting!==a&&(Ea(a,Z,Z,"alternateSorting"),a===Rs||a===Ss||a===Ts||Us)&&(this.ia.sorting=a,this.w())});O(Z,{VH:"alternateComparer"},function(){return this.ia.comparer},function(a){this.ia.comparer!==a&&(I(a,"function",Z,"alternateComparer"),this.ia.comparer=a,this.w())}); +O(Z,{PH:"alternateAngle"},function(){return this.ia.angle},function(a){this.ia.angle!==a&&(I(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.ia.angle=a,this.w())});O(Z,{OH:"alternateAlignment"},function(){return this.ia.alignment},function(a){this.ia.alignment!==a&&(Ea(a,Z,Z,"alternateAlignment"),this.ia.alignment=a,this.w())}); +O(Z,{ZH:"alternateNodeIndent"},function(){return this.ia.nodeIndent},function(a){this.ia.nodeIndent!==a&&(I(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.ia.nodeIndent=a,this.w()))});O(Z,{$H:"alternateNodeIndentPastParent"},function(){return this.ia.nodeIndentPastParent},function(a){this.ia.nodeIndentPastParent!==a&&(I(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.ia.nodeIndentPastParent=a,this.w()))}); +O(Z,{aI:"alternateNodeSpacing"},function(){return this.ia.nodeSpacing},function(a){this.ia.nodeSpacing!==a&&(I(a,"number",Z,"alternateNodeSpacing"),this.ia.nodeSpacing=a,this.w())});O(Z,{XH:"alternateLayerSpacing"},function(){return this.ia.layerSpacing},function(a){this.ia.layerSpacing!==a&&(I(a,"number",Z,"alternateLayerSpacing"),this.ia.layerSpacing=a,this.w())}); +O(Z,{YH:"alternateLayerSpacingParentOverlap"},function(){return this.ia.layerSpacingParentOverlap},function(a){this.ia.layerSpacingParentOverlap!==a&&(I(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.ia.layerSpacingParentOverlap=a,this.w()))});O(Z,{UH:"alternateCompaction"},function(){return this.ia.compaction},function(a){this.ia.compaction!==a&&(Ea(a,Z,Z,"alternateCompaction"),a===bt||a===dt)&&(this.ia.compaction=a,this.w())}); +O(Z,{QH:"alternateBreadthLimit"},function(){return this.ia.breadthLimit},function(a){this.ia.breadthLimit!==a&&(I(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.ia.breadthLimit=a,this.w()))});O(Z,{dI:"alternateRowSpacing"},function(){return this.ia.rowSpacing},function(a){this.ia.rowSpacing!==a&&(I(a,"number",Z,"alternateRowSpacing"),this.ia.rowSpacing=a,this.w())}); +O(Z,{cI:"alternateRowIndent"},function(){return this.ia.rowIndent},function(a){this.ia.rowIndent!==a&&(I(a,"number",Z,"alternateRowIndent"),0<=a&&(this.ia.rowIndent=a,this.w()))});O(Z,{TH:"alternateCommentSpacing"},function(){return this.ia.commentSpacing},function(a){this.ia.commentSpacing!==a&&(I(a,"number",Z,"alternateCommentSpacing"),this.ia.commentSpacing=a,this.w())}); +O(Z,{SH:"alternateCommentMargin"},function(){return this.ia.commentMargin},function(a){this.ia.commentMargin!==a&&(I(a,"number",Z,"alternateCommentMargin"),this.ia.commentMargin=a,this.w())});O(Z,{fI:"alternateSetsPortSpot"},function(){return this.ia.setsPortSpot},function(a){this.ia.setsPortSpot!==a&&(I(a,"boolean",Z,"alternateSetsPortSpot"),this.ia.setsPortSpot=a,this.w())}); +O(Z,{bI:"alternatePortSpot"},function(){return this.ia.portSpot},function(a){H(a,V,Z,"alternatePortSpot");this.ia.portSpot.C(a)||(this.ia.portSpot=a,this.w())});O(Z,{eI:"alternateSetsChildPortSpot"},function(){return this.ia.setsChildPortSpot},function(a){this.ia.setsChildPortSpot!==a&&(I(a,"boolean",Z,"alternateSetsChildPortSpot"),this.ia.setsChildPortSpot=a,this.w())}); +O(Z,{RH:"alternateChildPortSpot"},function(){return this.ia.childPortSpot},function(a){H(a,V,Z,"alternateChildPortSpot");this.ia.childPortSpot.C(a)||(this.ia.childPortSpot=a,this.w())});var ws;Z.PathDefault=ws=R(Z,"PathDefault",-1);var xs;Z.PathDestination=xs=R(Z,"PathDestination",0);var Es;Z.PathSource=Es=R(Z,"PathSource",1);var Rs;Z.SortingForwards=Rs=R(Z,"SortingForwards",10);var Ss;Z.SortingReverse=Ss=R(Z,"SortingReverse",11);var Ts;Z.SortingAscending=Ts=R(Z,"SortingAscending",12);var Us; +Z.SortingDescending=Us=R(Z,"SortingDescending",13);var rt;Z.AlignmentCenterSubtrees=rt=R(Z,"AlignmentCenterSubtrees",20);var Vs;Z.AlignmentCenterChildren=Vs=R(Z,"AlignmentCenterChildren",21);var ft;Z.AlignmentStart=ft=R(Z,"AlignmentStart",22);var gt;Z.AlignmentEnd=gt=R(Z,"AlignmentEnd",23);var Xs;Z.AlignmentBus=Xs=R(Z,"AlignmentBus",24);var Ms;Z.AlignmentBusBranching=Ms=R(Z,"AlignmentBusBranching",25);var Ys;Z.AlignmentTopLeftBus=Ys=R(Z,"AlignmentTopLeftBus",26);var Zs; +Z.AlignmentBottomRightBus=Zs=R(Z,"AlignmentBottomRightBus",27);var bt;Z.CompactionNone=bt=R(Z,"CompactionNone",30);var dt;Z.CompactionBlock=dt=R(Z,"CompactionBlock",31);var ys;Z.StyleLayered=ys=R(Z,"StyleLayered",40);var Qs;Z.StyleLastParents=Qs=R(Z,"StyleLastParents",41);var Ps;Z.StyleAlternating=Ps=R(Z,"StyleAlternating",42);var Os;Z.StyleRootOnly=Os=R(Z,"StyleRootOnly",43);var As;Z.ArrangementVertical=As=R(Z,"ArrangementVertical",50);var Ft; +Z.ArrangementHorizontal=Ft=R(Z,"ArrangementHorizontal",51);var Ds;Z.ArrangementFixedRoots=Ds=R(Z,"ArrangementFixedRoots",52);var zs;Z.LayerIndividual=zs=R(Z,"LayerIndividual",60);var Ks;Z.LayerSiblings=Ks=R(Z,"LayerSiblings",61);var Js;Z.LayerUniform=Js=R(Z,"LayerUniform",62);function Cs(){Ac.call(this)}Nb(Cs,Ac);Mb("TreeNetwork",Cs);Cs.prototype.createVertex=function(){return new Bs};Cs.prototype.createEdge=function(){return new Ht}; +function Bs(){Ec.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.ba=new K(0,0);this.Oa=new ib(0,0);this.za=new K(0,0);this.wo=this.vo=this.kH=!1;this.zs=this.es=null;this.sorting=Rs;this.comparer=Jq;this.angle=0;this.alignment=Vs;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=dt;this.breadthLimit= +0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=we;this.setsChildPortSpot=!0;this.childPortSpot=we}Nb(Bs,Ec);Mb("TreeVertex",Bs); +Bs.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)};P(Bs,{Ql:"childrenCount"},function(){return this.children.length});O(Bs,{DJ:"relativePosition"},function(){return this.ba},function(a){this.ba.set(a)});O(Bs,{NJ:"subtreeSize"},function(){return this.Oa},function(a){this.Oa.set(a)});O(Bs,{MJ:"subtreeOffset"},function(){return this.za},function(a){this.za.set(a)}); +function Ht(){Fc.call(this);this.Gq=new K(0,0)}Nb(Ht,Fc);Mb("TreeEdge",Ht); +Ht.prototype.commit=function(){var a=this.link;if(null!==a&&!a.hi){var b=this.network.yb,c=null,d=null;switch(b.We){case xs:c=this.fromVertex;d=this.toVertex;break;case Es:c=this.toVertex;d=this.fromVertex;break;default:w("Unhandled path value "+b.We.toString())}if(null!==c&&null!==d)if(b=this.Gq,0!==b.x||0!==b.y||c.kH){var d=c.Ya,e=et(c),f=ht(c),g=c.rowSpacing;a.updateRoute();var h=a.ve===Yi,k=a.Ob,l=0,m,n;a.Qk();if(k||h){for(l=2;4p.y+c.rowIndent&&(q=Math.min(q,Math.max(m.y,q-it(c))))):c.alignment===ft?(q=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(q=Math.min(q,Math.max(m.x,q-it(c))))):c.alignment===ft?(q=d.left+b.x,0===b.x&&m.xp.y+c.rowIndent&&(q=Math.min(q,Math.max(m.y,q-it(c))))):c.alignment===ft?(q=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(q=Math.min(q,Math.max(m.x,q-it(c))))):c.alignment===ft?(q=d.left+b.x,0===b.x&&m.xk?g=null:(l=parseFloat(m.getAttribute("cx")),isNaN(l)&&(l=0),m=parseFloat(m.getAttribute("cy")),isNaN(m)&&(m=0),n=new gf(nf),n.ga=0,n.ha=0,n.q=2*k,n.s=2*k,g.position=new K(l-k,m-k),g.Fc=n);break;case "ellipse":n=f;g=new pi;k=parseFloat(n.getAttribute("rx"));isNaN(k)||0>k?g=null:(l=parseFloat(n.getAttribute("ry")),isNaN(l)||0>l?g=null:(m=parseFloat(n.getAttribute("cx")),isNaN(m)&&(m=0),n=parseFloat(n.getAttribute("cy")), +isNaN(n)&&(n=0),p=new gf(nf),p.ga=0,p.ha=0,p.q=2*k,p.s=2*l,g.position=new K(m-k,n-l),g.Fc=p));break;case "rect":p=f;g=new pi;k=parseFloat(p.getAttribute("width"));if(isNaN(k)||0>k)g=null;else if(l=parseFloat(p.getAttribute("height")),isNaN(l)||0>l)g=null;else{m=parseFloat(p.getAttribute("x"));isNaN(m)&&(m=0);n=parseFloat(p.getAttribute("y"));isNaN(n)&&(n=0);var q=p.getAttribute("rx"),s=p.getAttribute("ry"),p=parseFloat(q);if(isNaN(p)||0>p)p=0;var t=parseFloat(s);if(isNaN(t)||0>t)t=0;null!==q&&""!== +q||null===s||""===s?null===q||""===q||null!==s&&""!==s||(t=p):p=t;p=Math.min(p,k/2);t=Math.min(t,l/2);s=void 0;0===p&&0===t?(s=new gf(mf),s.ga=0,s.ha=0,s.q=k,s.s=l):(s=U.la/2,q=L(),W(q,p,0,!0),q.lineTo(k-p,0),X(q,k-p*s,0,k,t*s,k,t),q.lineTo(k,l-t),X(q,k,l-t*s,k-p*s,l,k-p,l),q.lineTo(p,l),X(q,p*s,l,0,l-t*s,0,l-t),q.lineTo(0,t),X(q,0,t*s,p*s,0,p,0),Hf(q),s=q.m,N(q));g.position=new K(m,n);g.Fc=s}break;case "polygon":g=Mt(f);break;case "polyline":g=Mt(f)}if(null!==g){if(g instanceof pi){l=g;k=Jt(a,f, +"fill");null!==k&&-1!==k.indexOf("url")?(k=k.substring(k.indexOf("#")+1,k.length-1),k=a["_brush"+k],l.fill=k instanceof Ka?k:"black"):l.fill=null===k?"black":"none"===k?null:k;k=Jt(a,f,"stroke");null!==k&&-1!==k.indexOf("url")?(k=k.substring(k.indexOf("#")+1,k.length-1),k=a["_brush"+k],l.stroke=k instanceof Ka?k:"black"):l.stroke="none"===k?null:k;k=parseFloat(Jt(a,f,"stroke-width"));isNaN(k)||(l.Ua=k);k=Jt(a,f,"stroke-linecap");null!==k&&(l.zH=k);k=Jt(a,f,"stroke-dasharray");if(null!==k&&""!==k){m= +k.split(",");n=[];for(k=0;kf.length)return null;for(var d=null,g=new S(Xf),h=1;h=a.length?a.push(c):a.splice(b,0,c):w.m("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Ji:function(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):w.m("Cannot remove an object from an HTMLCollection or NodeList at "+b)},Ux:[],M:function(){var a=w.Ux.pop();return void 0===a?new x:a},ic:function(a,b){var c=w.Ux.pop();if(void 0===c)return new x(a,b);c.x=a;c.y=b;return c},B:function(a){w.Ux.push(a)},FB:[],Hl:function(){var a=w.FB.pop();return void 0=== -a?new fa:a},dk:function(a){w.FB.push(a)},Vx:[],$f:function(){var a=w.Vx.pop();return void 0===a?new y:a},lk:function(a,b,c,d){var e=w.Vx.pop();if(void 0===e)return new y(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},nc:function(a){w.Vx.push(a)},GB:[],mh:function(){var a=w.GB.pop();return void 0===a?new ga:a},df:function(a){w.GB.push(a)},Wx:null,u:function(){var a=w.Wx;return null!==a?(w.Wx=null,a):new ha},v:function(a){a.reset();w.Wx=a},EB:[],lb:function(){var a=w.EB.pop();return void 0===a? -[]:a},xa:function(a){a.length=0;w.EB.push(a)},nh:Object.freeze([]),HB:1,jc:function(a){a.__gohashid=w.HB++},tt:function(a){var b=a.__gohashid;void 0===b&&(b=w.HB++,a.__gohashid=b);return b},Yc:function(a){return a.__gohashid},g:function(a,b,c){"name"!==b&&"length"!==b&&(a[b]=c)},ja:function(a,b){b.gy=a;aa[a]=b},Ia:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},Ph:function(a){a.xH=!0},defineProperty:function(a,b,c,d,e){w.i(a,"function","Util.defineProperty:classfunc"); -w.i(b,"object","Util.defineProperty:propobj");w.i(c,"function","Util.defineProperty:getter");w.i(d,"function","Util.defineProperty:setter");for(var g in b){var h=b[g];b={get:c,set:d};if(void 0!==e)for(var k in e)b[k]=e[k];Object.defineProperty(a.prototype,g,b);e=Object.getOwnPropertyDescriptor(a.prototype,g);h&&e&&Object.defineProperty(a.prototype,h,e);if(t&&h){var l=h.charAt(0).toUpperCase()+h.slice(1);h===l&&w.m('Defining capitalized property "'+l+'"!?');Object.defineProperty(a.prototype,l,{get:function(){w.uA|| -w.vA||w.trace('Getting the property "'+l+'" is probably not what you intended: it is capitalized but should be spelled "'+h+'"')},set:function(){w.m('Setting the property "'+l+'" is probably not what you intended: it is capitalized but should be spelled "'+h+'"')}})}break}},A:function(a,b,c,d){w.i(a,"function","Util.defineReadOnlyProperty:classfunc");w.i(b,"object","Util.defineReadOnlyProperty:propobj");w.i(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var g=b[e];b={get:c,set:function(a){w.m('The property "'+ -g+'" is read-only and cannot be set to '+a)}};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);if(t&&g){var k=g.charAt(0).toUpperCase()+g.slice(1);Object.defineProperty(a.prototype,k,{get:function(){w.uA||w.vA||w.trace('Getting the property "'+k+'" is probably not what you intended: it is capitalized but should be spelled "'+g+'"')},set:function(){w.m('Setting the read-only property "'+ -k+'" is probably not what you intended: it is capitalized but should be spelled "'+g+'", and cannot be set anyway')}})}break}},be:function(a,b){for(var c in b)b[c]=!0;a.prototype.$C=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?w.yg(a):null===a?"*":""},yg: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.yg(a.constructor); -return typeof a},w:function(a,b,c){w.i(a,"function","Util.defineEnumValue:classfunc");w.i(b,"string","Util.defineEnumValue:name");w.i(c,"number","Util.defineEnumValue:num");c=new ba(a,b,c);Object.freeze(c);a[b]=c;var d=a.mu;d instanceof ia||(d=new ia("string",ba),a.mu=d);d.add(b,c);return c},xb: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){t&&w.trace("property get error: "+ -d.toString())}return c},Sa: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){t&&w.trace("property set error: "+d.toString())}},au:function(a,b){w.i(a,"object","Setting properties requires Objects as arguments");w.i(b,"object","Setting properties requires Objects as arguments");var c=t;null===c&&(t=w);var d=a instanceof z,e=a instanceof C,g;for(g in b){""===g&&w.m("Setting properties requires non-empty property names");var h= -a,k=g;if(d||e){var l=g.indexOf(".");if(0=d.length)){var e=w.xb(b,d);null===e||"function"=== -typeof e||w.Ow(b,d)||(""===c&&(c=b+"\n"),c+=' unknown property "'+d+'" has value: '+e+" at "+a+"\n")}return c},ow:function(a,b){if(null!==b&&"number"!==typeof b&&"string"!==typeof b&&"boolean"!==typeof b&&"function"!==typeof b)if(void 0!==w.Yc(b)){if(!w.Mv.contains(b))if(w.Mv.add(b),w.tv.add(w.YD(a,b)),b instanceof D||b instanceof F||b instanceof ia)for(var c=b.k;c.next();)w.ow(a+"["+c.key+"]",c.value);else for(c in b){var d=w.xb(b,c);if(void 0!==d&&null!==d&&w.Xa(d)&&d!==b.$C){if(b instanceof oa){if(d=== -b.oj)continue}else if(b instanceof z){if("data"===c||d===b.rh)continue;if("itemArray"===c||d===b.oi)continue;if(b instanceof H&&d===b.Tk)continue}else if(!(b instanceof C))if(b instanceof qa){if("archetypeGroupData"===c||d===b.Zx)continue}else if(b instanceof ra){if("archetypeLinkData"===c||d===b.ay)continue;if("archetypeLabelNodeData"===c||d===b.$x)continue}else if(b instanceof sa){if("archetypeNodeData"===c||d===b.Ak)continue}else if(b instanceof I){if("nodeDataArray"===c||d===b.sf)continue;if("linkDataArray"=== -c||d===b.Dh||d===b.fm)continue;if(d===b.zc)continue;if(d===b.vh)continue}else if(b instanceof ta||b instanceof ua||b instanceof va)continue;w.ow(a+"."+c,d)}}}else if(Array.isArray(b))for(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[w.Ha("7ca11abfd7330390")](w.Ha(c[d-1]),10,15*d+0);b[w.Ha("7ca11abfd022028846")]=w.Ha("39f046ebb36e4b");for(d=1;5>d;d++)b[w.Ha("7ca11abfd7330390")](w.Ha(c[d- -1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])w.w=function(a,b){var c=new ba(a,b,2);Object.freeze(c);a[b]=c;var d=a.mu;d instanceof ia||(d=new ia("string",ba),a.mu=d);d.add(b,c);return c};return a}();function ba(a,b,c){w.jc(this);this.OB=a;this.Xb=b;this.CH=c}ba.prototype.toString=function(){return w.yg(this.OB)+"."+this.Xb};w.A(ba,{Ie:"classType"},function(){return this.OB});w.A(ba,{name:"name"},function(){return this.Xb});w.A(ba,{value:"value"},function(){return this.CH});var ya; -ba.findName=ya=function(a,b){if(null===b||""===b)return null;w.i(a,"function","findName:classfunc");w.i(b,"string","EnumValue.findName:name");var c=a.mu;return c instanceof ia?c.Aa(b):null};function xa(){this.NB=[]}xa.prototype.toString=function(){return this.NB.join("")};xa.prototype.add=function(a){""!==a&&this.NB.push(a)};function na(){} -function za(a){void 0===a&&(a=42);this.seed=a;this.Nx=48271;this.lu=2147483647;this.BB=this.lu/this.Nx;this.fH=this.lu%this.Nx;this.bH=1/this.lu;this.random()}za.prototype.random=function(){var a=this.seed%this.BB*this.Nx-this.seed/this.BB*this.fH;this.seed=0a||a>=b.length)&&w.la(a,"0 <= i < length",D,"elt:i");return b[a]}; -D.prototype.setElt=D.prototype.set=D.prototype.Mg=function(a,b){t&&(this.Pg(b),w.p(a,D,"setElt:i"));var c=this.q;(0>a||a>=c.length)&&w.la(a,"0 <= i < length",D,"setElt:i");w.N(this,a);c[a]=b};D.prototype.first=D.prototype.first=function(){var a=this.q;return 0===a.length?null:a[0]};D.prototype.last=D.prototype.Nd=function(){var a=this.q,b=a.length;return 0a&&w.la(a,">= 0",D,"insertAt:i");w.N(this,a);var c=this.q;a>=c.length?c.push(b):c.splice(a,0,b);this.Vd();return!0};D.prototype.remove=D.prototype["delete"]=D.prototype.remove=function(a){if(null===a)return!1;t&&this.Pg(a);w.N(this,a);var b=this.q;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.Vd();return!0}; -D.prototype.removeAt=D.prototype.md=function(a){t&&w.p(a,D,"removeAt:i");var b=this.q;(0>a||a>=b.length)&&w.la(a,"0 <= i < length",D,"removeAt:i");w.N(this,a);a===b.length-1?b.pop():b.splice(a,1);this.Vd()}; -D.prototype.removeRange=D.prototype.removeRange=function(a,b){t&&(w.p(a,D,"removeRange:from"),w.p(b,D,"removeRange:to"));var c=this.q;(0>a||a>=c.length)&&w.la(a,"0 <= from < length",D,"elt:from");(0>b||b>=c.length)&&w.la(b,"0 <= to < length",D,"elt:to");w.N(this,a);var d=c.slice((b||a)+1||c.length);c.length=0>a?c.length+a:a;c.push.apply(c,d);this.Vd()};D.prototype.copy=function(){for(var a=new D(this.ha),b=this.q,c=this.count,d=0;d=g)return this;(0>b||b>=e-1)&&w.la(b,"0 <= from < length",D,"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.q.length)return Ca;var a=this.Cd;return null!==a?(a.reset(),a):new Fa(this)}); -w.A(D,{Zm:"iteratorBackwards"},function(){if(0>=this.q.length)return Ca;var a=this.eo;return null!==a?(a.reset(),a):new Ga(this)});function Ia(a){this.Yk=a;this.reset()}w.be(Ia,{key:!0,value:!0});w.A(Ia,{k:"iterator"},function(){return this});Ia.prototype.reset=Ia.prototype.reset=function(){var a=this.Yk;a.Cd=null;this.bb=a.W;this.Gb=null}; -Ia.prototype.next=Ia.prototype.hasNext=Ia.prototype.next=function(){var a=this.Yk;a.W!==this.bb&&w.Qb(a);var b=this.Gb,b=null===b?a.gb:b.Vb;if(null!==b)return this.Gb=b,this.value=b.value,this.key=b.key,!0;this.dg();return!1};Ia.prototype.first=Ia.prototype.first=function(){var a=this.Yk;this.bb=a.W;a=a.gb;if(null!==a){this.Gb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; -Ia.prototype.any=function(a){var b=this.Yk;b.Cd=null;var c=b.W;this.Gb=null;for(var d=b.gb;null!==d;){if(a(d.value))return!0;b.W!==c&&w.Qb(b);d=d.Vb}return!1};Ia.prototype.all=function(a){var b=this.Yk;b.Cd=null;var c=b.W;this.Gb=null;for(var d=b.gb;null!==d;){if(!a(d.value))return!1;b.W!==c&&w.Qb(b);d=d.Vb}return!0};Ia.prototype.each=function(a){var b=this.Yk;b.Cd=null;var c=b.W;this.Gb=null;for(var d=b.gb;null!==d;)a(d.value),b.W!==c&&w.Qb(b),d=d.Vb};w.A(Ia,{count:"count"},function(){return this.Yk.cd}); -Ia.prototype.dg=function(){this.value=this.key=null;this.bb=-1;this.Yk.Cd=this};Ia.prototype.toString=function(){return null!==this.Gb?"SetIterator@"+this.Gb.value:"SetIterator"}; -function F(a){w.jc(this);this.Qa=!1;void 0===a||null===a?this.ha=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ha=a:w.la(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.ha=a===Object?"object":a===String?"string":a===Number?"number":a:w.la(a,"null, a primitive type name, or a class type","Set constructor: type");this.dd={};this.cd=0;this.Cd=null;this.W=0;this.Ch=this.gb=null}w.ja("Set",F); -F.prototype.Pg=function(a){null!==this.ha&&("string"===typeof this.ha?typeof a===this.ha&&null!==a||w.sc(a,this.ha):a instanceof this.ha||w.sc(a,this.ha))};F.prototype.Vd=function(){var a=this.W;a++;999999999=this.cd)return Ca;var a=this.Cd;return null!==a?(a.reset(),a):new Ia(this)});function Na(a){this.ab=a;this.reset()}w.be(Na,{key:!0,value:!0});w.A(Na,{k:"iterator"},function(){return this});Na.prototype.reset=Na.prototype.reset=function(){this.bb=this.ab.W;this.Gb=null}; -Na.prototype.next=Na.prototype.hasNext=Na.prototype.next=function(){var a=this.ab;a.W!==this.bb&&w.Qb(a);var b=this.Gb,b=null===b?a.gb:b.Vb;if(null!==b)return this.Gb=b,this.value=this.key=a=b.key,!0;this.dg();return!1};Na.prototype.first=Na.prototype.first=function(){var a=this.ab;this.bb=a.W;a=a.gb;return null!==a?(this.Gb=a,this.value=this.key=a=a.key):null};Na.prototype.any=function(a){var b=this.ab,c=b.W;this.Gb=null;for(var d=b.gb;null!==d;){if(a(d.key))return!0;b.W!==c&&w.Qb(b);d=d.Vb}return!1}; -Na.prototype.all=function(a){var b=this.ab,c=b.W;this.Gb=null;for(var d=b.gb;null!==d;){if(!a(d.key))return!1;b.W!==c&&w.Qb(b);d=d.Vb}return!0};Na.prototype.each=function(a){var b=this.ab,c=b.W;this.Gb=null;for(var d=b.gb;null!==d;)a(d.key),b.W!==c&&w.Qb(b),d=d.Vb};w.A(Na,{count:"count"},function(){return this.ab.cd});Na.prototype.dg=function(){this.value=this.key=null;this.bb=-1};Na.prototype.toString=function(){return null!==this.Gb?"MapKeySetIterator@"+this.Gb.value:"MapKeySetIterator"}; -function Oa(a){w.jc(this);this.Qa=!0;this.ab=a}w.Ia(Oa,F);Oa.prototype.freeze=function(){return this};Oa.prototype.Na=function(){return this};Oa.prototype.toString=function(){return"MapKeySet("+this.ab.toString()+")"};Oa.prototype.add=Oa.prototype.set=Oa.prototype.add=function(){w.m("This Set is read-only: "+this.toString());return!1};Oa.prototype.contains=Oa.prototype.has=Oa.prototype.contains=function(a){return this.ab.contains(a)}; -Oa.prototype.remove=Oa.prototype["delete"]=Oa.prototype.remove=function(){w.m("This Set is read-only: "+this.toString());return!1};Oa.prototype.clear=Oa.prototype.clear=function(){w.m("This Set is read-only: "+this.toString())};Oa.prototype.first=Oa.prototype.first=function(){var a=this.ab.gb;return null!==a?a.key:null};Oa.prototype.any=function(a){for(var b=this.ab.gb;null!==b;){if(a(b.key))return!0;b=b.Vb}return!1}; -Oa.prototype.all=function(a){for(var b=this.ab.gb;null!==b;){if(!a(b.key))return!1;b=b.Vb}return!0};Oa.prototype.each=function(a){for(var b=this.ab.gb;null!==b;)a(b.key),b=b.Vb};Oa.prototype.copy=function(){return new Oa(this.ab)};Oa.prototype.toSet=function(){var a=new F(this.ab.Bh),b=this.ab.dd,c;for(c in b)a.add(b[c].key);return a};Oa.prototype.toArray=Oa.prototype.Ue=function(){var a=this.ab.dd,b=Array(this.ab.cd),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; -Oa.prototype.toList=function(){var a=new D(this.ha),b=this.ab.dd,c;for(c in b)a.add(b[c].key);return a};w.A(Oa,{count:"count"},function(){return this.ab.cd});w.A(Oa,{size:"size"},function(){return this.ab.cd});w.A(Oa,{k:"iterator"},function(){return 0>=this.ab.cd?Ca:new Na(this.ab)});function Ra(a){this.ab=a;this.reset()}w.be(Ra,{key:!0,value:!0});w.A(Ra,{k:"iterator"},function(){return this});Ra.prototype.reset=Ra.prototype.reset=function(){var a=this.ab;a.fo=null;this.bb=a.W;this.Gb=null}; -Ra.prototype.next=Ra.prototype.hasNext=Ra.prototype.next=function(){var a=this.ab;a.W!==this.bb&&w.Qb(a);var b=this.Gb,b=null===b?a.gb:b.Vb;if(null!==b)return this.Gb=b,this.value=b.value,this.key=b.key,!0;this.dg();return!1};Ra.prototype.first=Ra.prototype.first=function(){var a=this.ab;this.bb=a.W;a=a.gb;if(null!==a){this.Gb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; -Ra.prototype.any=function(a){var b=this.ab;b.fo=null;var c=b.W;this.Gb=null;for(var d=b.gb;null!==d;){if(a(d.value))return!0;b.W!==c&&w.Qb(b);d=d.Vb}return!1};Ra.prototype.all=function(a){var b=this.ab;b.fo=null;var c=b.W;this.Gb=null;for(var d=b.gb;null!==d;){if(!a(d.value))return!1;b.W!==c&&w.Qb(b);d=d.Vb}return!0};Ra.prototype.each=function(a){var b=this.ab;b.fo=null;var c=b.W;this.Gb=null;for(var d=b.gb;null!==d;)a(d.value),b.W!==c&&w.Qb(b),d=d.Vb};w.A(Ra,{count:"count"},function(){return this.ab.cd}); -Ra.prototype.dg=function(){this.value=this.key=null;this.bb=-1;this.ab.fo=this};Ra.prototype.toString=function(){return null!==this.Gb?"MapValueSetIterator@"+this.Gb.value:"MapValueSetIterator"};function La(a,b){this.key=a;this.value=b;this.oo=this.Vb=null}w.be(La,{key:!0,value:!0});La.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};function Sa(a){this.ab=a;this.reset()}w.be(Sa,{key:!0,value:!0});w.A(Sa,{k:"iterator"},function(){return this}); -Sa.prototype.reset=Sa.prototype.reset=function(){var a=this.ab;a.Cd=null;this.bb=a.W;this.Gb=null};Sa.prototype.next=Sa.prototype.hasNext=Sa.prototype.next=function(){var a=this.ab;a.W!==this.bb&&w.Qb(a);var b=this.Gb,b=null===b?a.gb:b.Vb;if(null!==b)return this.Gb=b,this.key=b.key,this.value=b.value,!0;this.dg();return!1};Sa.prototype.first=Sa.prototype.first=function(){var a=this.ab;this.bb=a.W;a=a.gb;return null!==a?(this.Gb=a,this.key=a.key,this.value=a.value,a):null}; -Sa.prototype.any=function(a){var b=this.ab;b.Cd=null;var c=b.W;this.Gb=null;for(var d=b.gb;null!==d;){if(a(d))return!0;b.W!==c&&w.Qb(b);d=d.Vb}return!1};Sa.prototype.all=function(a){var b=this.ab;b.Cd=null;var c=b.W;this.Gb=null;for(var d=b.gb;null!==d;){if(!a(d))return!1;b.W!==c&&w.Qb(b);d=d.Vb}return!0};Sa.prototype.each=function(a){var b=this.ab;b.Cd=null;var c=b.W;this.Gb=null;for(var d=b.gb;null!==d;)a(d),b.W!==c&&w.Qb(b),d=d.Vb};w.A(Sa,{count:"count"},function(){return this.ab.cd}); -Sa.prototype.dg=function(){this.value=this.key=null;this.bb=-1;this.ab.Cd=this};Sa.prototype.toString=function(){return null!==this.Gb?"MapIterator@"+this.Gb:"MapIterator"}; -function ia(a,b){w.jc(this);this.Qa=!1;void 0===a||null===a?this.Bh=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.Bh=a:w.la(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.Bh=a===Object?"object":a===String?"string":a===Number?"number":a:w.la(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.Ei=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"=== -b||"function"===b?this.Ei=b:w.la(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.Ei=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:w.la(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.dd={};this.cd=0;this.fo=this.Cd=null;this.W=0;this.Ch=this.gb=null}w.ja("Map",ia); -function Ta(a,b){null!==a.Bh&&("string"===typeof a.Bh?typeof b===a.Bh&&null!==b||w.sc(b,a.Bh):b instanceof a.Bh||w.sc(b,a.Bh))}ia.prototype.Vd=function(){var a=this.W;a++;999999999=this.count)return Ca;var a=this.Cd;return null!==a?(a.reset(),a):new Sa(this)});w.A(ia,{EK:"iteratorKeys"},function(){return 0>=this.count?Ca:new Na(this)});w.A(ia,{qF:"iteratorValues"},function(){if(0>=this.count)return Ca;var a=this.fo;return null!==a?(a.reset(),a):new Ra(this)});function x(a,b){void 0===a||void 0===b?this.y=this.x=0:!t||"number"===typeof a&&"number"===typeof b?(this.x=a,this.y=b):w.m("Invalid arguments to Point constructor");this.Qa=!1} -w.ja("Point",x);w.Ph(x);w.be(x,{x:!0,y:!0});x.prototype.assign=function(a){this.x=a.x;this.y=a.y};x.prototype.setTo=x.prototype.o=function(a,b){t&&(w.i(a,"number",x,"setTo:x"),w.i(b,"number",x,"setTo:y"));this.x=a;this.y=b;return this};x.prototype.set=x.prototype.set=function(a){t&&w.l(a,x,x,"set:p");w.N(this);this.x=a.x;this.y=a.y;return this};x.prototype.copy=function(){var a=new x;a.x=this.x;a.y=this.y;return a};x.prototype.Ma=function(){this.Qa=!0;Object.freeze(this);return this}; -x.prototype.ba=function(){return Object.isFrozen(this)?this:this.copy().freeze()};x.prototype.freeze=function(){this.Qa=!0;return this};x.prototype.Na=function(){Object.isFrozen(this)&&w.m("cannot thaw constant: "+this);this.Qa=!1;return this};x.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 x(c,e)}return new x}; -x.stringify=function(a){return a instanceof x?a.x.toString()+" "+a.y.toString():a.toString()};x.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};x.prototype.equals=x.prototype.L=function(a){return a instanceof x?this.x===a.x&&this.y===a.y:!1};x.prototype.equalTo=x.prototype.Fw=function(a,b){return this.x===a&&this.y===b};x.prototype.equalsApprox=x.prototype.Ne=function(a){return J.I(this.x,a.x)&&J.I(this.y,a.y)}; -x.prototype.add=x.prototype.add=function(a){t&&w.l(a,x,x,"add:p");w.N(this);this.x+=a.x;this.y+=a.y;return this};x.prototype.subtract=x.prototype.eu=function(a){t&&w.l(a,x,x,"subtract:p");w.N(this);this.x-=a.x;this.y-=a.y;return this};x.prototype.offset=x.prototype.offset=function(a,b){t&&(w.p(a,x,"offset:dx"),w.p(b,x,"offset:dy"));w.N(this);this.x+=a;this.y+=b;return this}; -x.prototype.rotate=x.prototype.rotate=function(a){t&&w.p(a,x,"rotate:angle");w.N(this);if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;var d=0,e=0;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};x.prototype.scale=x.prototype.scale=function(a,b){t&&(w.p(a,x,"scale:sx"),w.p(b,x,"scale:sy"));this.x*=a;this.y*=b;return this}; -x.prototype.distanceSquaredPoint=x.prototype.Zj=function(a){t&&w.l(a,x,x,"distanceSquaredPoint:p");var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};x.prototype.distanceSquared=x.prototype.jt=function(a,b){t&&(w.p(a,x,"distanceSquared:px"),w.p(b,x,"distanceSquared:py"));var c=a-this.x,d=b-this.y;return c*c+d*d};x.prototype.normalize=x.prototype.normalize=function(){w.N(this);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} -x.prototype.projectOntoLineSegment=function(a,b,c,d){t&&(w.p(a,x,"projectOntoLineSegment:px"),w.p(b,x,"projectOntoLineSegment:py"),w.p(c,x,"projectOntoLineSegment:qx"),w.p(d,x,"projectOntoLineSegment:qy"));J.cn(a,b,c,d,this.x,this.y,this);return this};x.prototype.projectOntoLineSegmentPoint=function(a,b){t&&(w.l(a,x,x,"projectOntoLineSegmentPoint:p"),w.l(b,x,x,"projectOntoLineSegmentPoint:q"));J.cn(a.x,a.y,b.x,b.y,this.x,this.y,this);return this}; -x.prototype.snapToGrid=function(a,b,c,d){t&&(w.p(a,x,"snapToGrid:originx"),w.p(b,x,"snapToGrid:originy"),w.p(c,x,"snapToGrid:cellwidth"),w.p(d,x,"snapToGrid:cellheight"));J.nt(this.x,this.y,a,b,c,d,this);return this};x.prototype.snapToGridPoint=function(a,b){t&&(w.l(a,x,x,"snapToGridPoint:p"),w.l(b,fa,x,"snapToGridPoint:q"));J.nt(this.x,this.y,a.x,a.y,b.width,b.height,this);return this}; -x.prototype.setRectSpot=x.prototype.bu=function(a,b){t&&(w.l(a,y,x,"setRectSpot:r"),w.l(b,K,x,"setRectSpot:spot"));w.N(this);this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this}; -x.prototype.setSpot=x.prototype.cu=function(a,b,c,d,e){t&&(w.p(a,x,"setSpot:x"),w.p(b,x,"setSpot:y"),w.p(c,x,"setSpot:w"),w.p(d,x,"setSpot:h"),(0>c||0>d)&&w.m("Point.setSpot:Width and height cannot be negative"),w.l(e,K,x,"setSpot:spot"));w.N(this);this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this};x.prototype.transform=function(a){t&&w.l(a,ga,x,"transform:t");a.fb(this);return this};function Xa(a,b){t&&w.l(b,ga,x,"transformInverted:t");b.Th(a);return a}var Ya; -x.distanceLineSegmentSquared=Ya=function(a,b,c,d,e,g){t&&(w.p(a,x,"distanceLineSegmentSquared:px"),w.p(b,x,"distanceLineSegmentSquared:py"),w.p(c,x,"distanceLineSegmentSquared:ax"),w.p(d,x,"distanceLineSegmentSquared:ay"),w.p(e,x,"distanceLineSegmentSquared:bx"),w.p(g,x,"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 $a; -x.distanceSquared=$a=function(a,b,c,d){t&&(w.p(a,x,"distanceSquared:px"),w.p(b,x,"distanceSquared:py"),w.p(c,x,"distanceSquared:qx"),w.p(d,x,"distanceSquared:qy"));a=c-a;b=d-b;return a*a+b*b};var ab; -x.direction=ab=function(a,b,c,d){t&&(w.p(a,x,"direction:px"),w.p(b,x,"direction:py"),w.p(c,x,"direction:qx"),w.p(d,x,"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};x.prototype.isReal=x.prototype.J=function(){return isFinite(this.x)&&isFinite(this.y)}; -function fa(a,b){void 0===a||void 0===b?this.height=this.width=0:!t||"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.width=a,this.height=b):w.m("Invalid arguments to Size constructor");this.Qa=!1}w.ja("Size",fa);w.Ph(fa);w.be(fa,{width:!0,height:!0});fa.prototype.assign=function(a){this.width=a.width;this.height=a.height}; -fa.prototype.setTo=fa.prototype.o=function(a,b){t&&(w.i(a,"number",fa,"setTo:w"),w.i(b,"number",fa,"setTo:h"),0>a&&w.la(a,">= 0",fa,"setTo:w"),0>b&&w.la(b,">= 0",fa,"setTo:h"));this.width=a;this.height=b;return this};fa.prototype.set=fa.prototype.set=function(a){t&&w.l(a,fa,fa,"set:s");w.N(this);this.width=a.width;this.height=a.height;return this};fa.prototype.copy=function(){var a=new fa;a.width=this.width;a.height=this.height;return a};fa.prototype.Ma=function(){this.Qa=!0;Object.freeze(this);return this}; -fa.prototype.ba=function(){return Object.isFrozen(this)?this:this.copy().freeze()};fa.prototype.freeze=function(){this.Qa=!0;return this};fa.prototype.Na=function(){Object.isFrozen(this)&&w.m("cannot thaw constant: "+this);this.Qa=!1;return this};fa.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 fa(c,e)}return new fa}; -fa.stringify=function(a){return a instanceof fa?a.width.toString()+" "+a.height.toString():a.toString()};fa.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};fa.prototype.equals=fa.prototype.L=function(a){return a instanceof fa?this.width===a.width&&this.height===a.height:!1};fa.prototype.equalTo=fa.prototype.Fw=function(a,b){return this.width===a&&this.height===b};fa.prototype.equalsApprox=fa.prototype.Ne=function(a){return J.I(this.width,a.width)&&J.I(this.height,a.height)}; -fa.prototype.isReal=fa.prototype.J=function(){return isFinite(this.width)&&isFinite(this.height)}; -function y(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:a instanceof x?b instanceof x?(this.x=Math.min(a.x,b.x),this.y=Math.min(a.y,b.y),this.width=Math.abs(a.x-b.x),this.height=Math.abs(a.y-b.y)):b instanceof fa?(this.x=a.x,this.y=a.y,this.width=b.width,this.height=b.height):w.m("Incorrect arguments supplied"):!t||"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.x=a,this.y=b,this.width=c,this.height=d):w.m("Invalid arguments to Rect constructor"); -this.Qa=!1}w.ja("Rect",y);w.Ph(y);w.be(y,{x:!0,y:!0,width:!0,height:!0});y.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height};function bb(a,b,c){a.width=b;a.height=c}y.prototype.setTo=y.prototype.o=function(a,b,c,d){t&&(w.i(a,"number",y,"setTo:x"),w.i(b,"number",y,"setTo:y"),w.i(c,"number",y,"setTo:w"),w.i(d,"number",y,"setTo:h"),0>c&&w.la(c,">= 0",y,"setTo:w"),0>d&&w.la(d,">= 0",y,"setTo:h"));this.x=a;this.y=b;this.width=c;this.height=d;return this}; -y.prototype.set=y.prototype.set=function(a){t&&w.l(a,y,y,"set:r");w.N(this);this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};y.prototype.setPoint=y.prototype.Ff=function(a){t&&w.l(a,x,y,"setPoint:p");w.N(this);this.x=a.x;this.y=a.y;return this};y.prototype.setSize=function(a){t&&w.l(a,fa,y,"setSize:s");w.N(this);this.width=a.width;this.height=a.height;return this};y.prototype.copy=function(){var a=new y;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a}; -y.prototype.Ma=function(){this.Qa=!0;Object.freeze(this);return this};y.prototype.ba=function(){return Object.isFrozen(this)?this:this.copy().freeze()};y.prototype.freeze=function(){this.Qa=!0;return this};y.prototype.Na=function(){Object.isFrozen(this)&&w.m("cannot thaw constant: "+this);this.Qa=!1;return this}; -y.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 y(c,e,g,h)}return new y};y.stringify=function(a){return a instanceof y?a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString():a.toString()}; -y.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};y.prototype.equals=y.prototype.L=function(a){return a instanceof y?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};y.prototype.equalTo=y.prototype.Fw=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};y.prototype.equalsApprox=y.prototype.Ne=function(a){return J.I(this.x,a.x)&&J.I(this.y,a.y)&&J.I(this.width,a.width)&&J.I(this.height,a.height)}; -y.prototype.containsPoint=y.prototype.Ea=function(a){t&&w.l(a,x,y,"containsPoint:p");return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};y.prototype.containsRect=y.prototype.Vj=function(a){t&&w.l(a,y,y,"containsRect:r");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}; -y.prototype.contains=y.prototype.contains=function(a,b,c,d){t?(w.p(a,y,"contains:x"),w.p(b,y,"contains:y"),void 0===c?c=0:w.p(c,y,"contains:w"),void 0===d?d=0:w.p(d,y,"contains:h"),(0>c||0>d)&&w.m("Rect.contains:Width and height cannot be negative")):(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};y.prototype.reset=function(){w.N(this);this.height=this.width=this.y=this.x=0}; -y.prototype.offset=y.prototype.offset=function(a,b){t&&(w.p(a,y,"offset:dx"),w.p(b,y,"offset:dy"));w.N(this);this.x+=a;this.y+=b;return this};y.prototype.inflate=y.prototype.Sf=function(a,b){t&&(w.p(a,y,"inflate:w"),w.p(b,y,"inflate:h"));return cb(this,b,a,b,a)};y.prototype.addMargin=y.prototype.gw=function(a){t&&w.l(a,eb,y,"addMargin:m");return cb(this,a.top,a.right,a.bottom,a.left)}; -y.prototype.subtractMargin=y.prototype.aK=function(a){t&&w.l(a,eb,y,"subtractMargin:m");return cb(this,-a.top,-a.right,-a.bottom,-a.left)};y.prototype.grow=function(a,b,c,d){t&&(w.p(a,y,"grow:t"),w.p(b,y,"grow:r"),w.p(c,y,"grow:b"),w.p(d,y,"grow:l"));return cb(this,a,b,c,d)};function cb(a,b,c,d,e){w.N(a);var g=a.width;c+e<=-g?(a.x+=g/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} -y.prototype.intersectRect=function(a){t&&w.l(a,y,y,"intersectRect:r");return hb(this,a.x,a.y,a.width,a.height)};y.prototype.intersect=function(a,b,c,d){t&&(w.p(a,y,"intersect:x"),w.p(b,y,"intersect:y"),w.p(c,y,"intersect:w"),w.p(d,y,"intersect:h"),(0>c||0>d)&&w.m("Rect.intersect:Width and height cannot be negative"));return hb(this,a,b,c,d)}; -function hb(a,b,c,d,e){w.N(a);var g=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=g;a.y=h;a.width=Math.max(0,b-g);a.height=Math.max(0,c-h);return a}y.prototype.intersectsRect=y.prototype.zg=function(a){t&&w.l(a,y,y,"intersectsRect:r");return this.fF(a.x,a.y,a.width,a.height)}; -y.prototype.intersects=y.prototype.fF=function(a,b,c,d){t&&(w.p(a,y,"intersects:x"),w.p(b,y,"intersects:y"),w.p(a,y,"intersects:w"),w.p(b,y,"intersects:h"),(0>c||0>d)&&w.m("Rect.intersects:Width and height cannot be negative"));var e=this.width,g=this.x;if(Infinity!==e&&Infinity!==c&&(e+=g,c+=a,isNaN(c)||isNaN(e)||g>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 ib(a,b){var c=a.width,d=b.width+10+10,e=a.x,g=b.x-10;if(e>d+g||g>c+e)return!1;c=a.height;d=b.height+10+10;e=a.y;g=b.y-10;return e>d+g||g>c+e?!1:!0}y.prototype.unionPoint=y.prototype.Zi=function(a){t&&w.l(a,x,y,"unionPoint:p");return nb(this,a.x,a.y,0,0)};y.prototype.unionRect=y.prototype.$h=function(a){t&&w.l(a,y,y,"unionRect:r");return nb(this,a.x,a.y,a.width,a.height)}; -y.prototype.union=y.prototype.WG=function(a,b,c,d){w.N(this);t?(w.p(a,y,"union:x"),w.p(b,y,"union:y"),void 0===c?c=0:w.p(c,y,"union:w"),void 0===d?d=0:w.p(d,y,"union:h"),(0>c||0>d)&&w.m("Rect.union:Width and height cannot be negative")):(void 0===c&&(c=0),void 0===d&&(d=0));return nb(this,a,b,c,d)};function nb(a,b,c,d,e){var g=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=g;a.y=h;a.width=b-g;a.height=c-h;return a} -y.prototype.setSpot=y.prototype.cu=function(a,b,c){t&&(w.p(a,y,"setSpot:x"),w.p(b,y,"setSpot:y"),w.l(c,K,y,"setSpot:spot"));w.N(this);this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this};var ob; -y.contains=ob=function(a,b,c,d,e,g,h,k){t?(w.p(a,y,"contains:rx"),w.p(b,y,"contains:ry"),w.p(c,y,"contains:rw"),w.p(d,y,"contains:rh"),w.p(e,y,"contains:x"),w.p(g,y,"contains:y"),void 0===h?h=0:w.p(h,y,"contains:w"),void 0===k?k=0:w.p(k,y,"contains:h"),(0>c||0>d||0>h||0>k)&&w.m("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}; -y.intersects=function(a,b,c,d,e,g,h,k){t&&(w.p(a,y,"intersects:rx"),w.p(b,y,"intersects:ry"),w.p(c,y,"intersects:rw"),w.p(d,y,"intersects:rh"),w.p(e,y,"intersects:x"),w.p(g,y,"intersects:y"),w.p(h,y,"intersects:w"),w.p(k,y,"intersects:h"),(0>c||0>d||0>h||0>k)&&w.m("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};w.g(y,"left",y.prototype.left); -w.defineProperty(y,{left:"left"},function(){return this.x},function(a){w.N(this,a);t&&w.i(a,"number",y,"left");this.x=a});w.g(y,"top",y.prototype.top);w.defineProperty(y,{top:"top"},function(){return this.y},function(a){w.N(this,a);t&&w.i(a,"number",y,"top");this.y=a});w.g(y,"right",y.prototype.right);w.defineProperty(y,{right:"right"},function(){return this.x+this.width},function(a){w.N(this,a);t&&w.p(a,y,"right");this.x+=a-(this.x+this.width)});w.g(y,"bottom",y.prototype.bottom); -w.defineProperty(y,{bottom:"bottom"},function(){return this.y+this.height},function(a){w.N(this,a);t&&w.p(a,y,"top");this.y+=a-(this.y+this.height)});w.g(y,"position",y.prototype.position);w.defineProperty(y,{position:"position"},function(){return new x(this.x,this.y)},function(a){w.N(this,a);t&&w.l(a,x,y,"position");this.x=a.x;this.y=a.y});w.g(y,"size",y.prototype.size); -w.defineProperty(y,{size:"size"},function(){return new fa(this.width,this.height)},function(a){w.N(this,a);t&&w.l(a,fa,y,"size");this.width=a.width;this.height=a.height});w.g(y,"center",y.prototype.Tj);w.defineProperty(y,{Tj:"center"},function(){return new x(this.x+this.width/2,this.y+this.height/2)},function(a){w.N(this,a);t&&w.l(a,x,y,"center");this.x=a.x-this.width/2;this.y=a.y-this.height/2});w.g(y,"centerX",y.prototype.Da); -w.defineProperty(y,{Da:"centerX"},function(){return this.x+this.width/2},function(a){w.N(this,a);t&&w.p(a,y,"centerX");this.x=a-this.width/2});w.g(y,"centerY",y.prototype.Ra);w.defineProperty(y,{Ra:"centerY"},function(){return this.y+this.height/2},function(a){w.N(this,a);t&&w.p(a,y,"centerY");this.y=a-this.height/2});y.prototype.isReal=y.prototype.J=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)}; -y.prototype.isEmpty=function(){return 0===this.width&&0===this.height};function eb(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.m("Invalid arguments to Margin constructor");this.Qa=!1}w.ja("Margin",eb);w.Ph(eb);w.be(eb,{top:!0,right:!0,bottom:!0,left:!0}); -eb.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left};eb.prototype.setTo=eb.prototype.o=function(a,b,c,d){t&&(w.i(a,"number",eb,"setTo:t"),w.i(b,"number",eb,"setTo:r"),w.i(c,"number",eb,"setTo:b"),w.i(d,"number",eb,"setTo:l"));w.N(this);this.top=a;this.right=b;this.bottom=c;this.left=d;return this}; -eb.prototype.set=eb.prototype.set=function(a){t&&w.l(a,eb,eb,"assign:m");w.N(this);this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};eb.prototype.copy=function(){var a=new eb;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};eb.prototype.Ma=function(){this.Qa=!0;Object.freeze(this);return this};eb.prototype.ba=function(){return Object.isFrozen(this)?this:this.copy().freeze()};eb.prototype.freeze=function(){this.Qa=!0;return this}; -eb.prototype.Na=function(){Object.isFrozen(this)&&w.m("cannot thaw constant: "+this);this.Qa=!1;return this}; -eb.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 eb;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new eb(c);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));if(isNaN(g))return new eb(c,e);for(var h=NaN;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return isNaN(h)?new eb(c,e):new eb(c,e,g,h)}return new eb}; -eb.stringify=function(a){return a instanceof eb?a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString():a.toString()};eb.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};eb.prototype.equals=eb.prototype.L=function(a){return a instanceof eb?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1}; -eb.prototype.equalTo=eb.prototype.Fw=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d};eb.prototype.equalsApprox=eb.prototype.Ne=function(a){return J.I(this.top,a.top)&&J.I(this.right,a.right)&&J.I(this.bottom,a.bottom)&&J.I(this.left,a.left)};eb.prototype.isReal=eb.prototype.J=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function ga(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}w.Ph(ga); -w.be(ga,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0});ga.prototype.set=ga.prototype.set=function(a){t&&w.l(a,ga,ga,"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};ga.prototype.copy=function(){var a=new ga;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};ga.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"}; -ga.prototype.equals=ga.prototype.L=function(a){return a instanceof ga?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};ga.prototype.reset=ga.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}; -ga.prototype.multiply=ga.prototype.multiply=function(a){t&&w.l(a,ga,ga,"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}; -ga.prototype.multiplyInverted=ga.prototype.KF=function(a){t&&w.l(a,ga,ga,"multiplyInverted:matrix");var b=1/(a.m11*a.m22-a.m12*a.m21),c=a.m22*b,d=-a.m12*b,e=-a.m21*b,g=a.m11*b,h=b*(a.m21*a.dy-a.m22*a.dx),k=b*(a.m12*a.dx-a.m11*a.dy);a=this.m12*c+this.m22*d;b=this.m11*e+this.m21*g;e=this.m12*e+this.m22*g;g=this.m11*h+this.m21*k+this.dx;h=this.m12*h+this.m22*k+this.dy;this.m11=this.m11*c+this.m21*d;this.m12=a;this.m21=b;this.m22=e;this.dx=g;this.dy=h;return this}; -ga.prototype.invert=ga.prototype.nA=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}; -ga.prototype.rotate=ga.prototype.rotate=function(a,b,c){t&&(w.p(a,ga,"rotate:angle"),w.p(b,ga,"rotate:rx"),w.p(c,ga,"rotate:ry"));this.translate(b,c);var d=0,e=0;0===a?(d=1,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)}; -ga.prototype.translate=ga.prototype.translate=function(a,b){t&&(w.p(a,ga,"translate:x"),w.p(b,ga,"translate:y"));this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b};ga.prototype.scale=ga.prototype.scale=function(a,b){void 0===b&&(b=a);t&&(w.p(a,ga,"translate:sx"),w.p(b,ga,"translate:sy"));this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b}; -ga.prototype.transformPoint=ga.prototype.fb=function(a){t&&w.l(a,x,ga,"transformPoint:p");var b=a.x,c=a.y;a.x=b*this.m11+c*this.m21+this.dx;a.y=b*this.m12+c*this.m22+this.dy;return a};ga.prototype.invertedTransformPoint=ga.prototype.Th=function(a){t&&w.l(a,x,ga,"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.x,h=a.y;a.x=g*this.m22*b+h*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.y=g*c+h*d+e;return a}; -ga.prototype.transformRect=ga.prototype.RG=function(a){t&&w.l(a,y,ga,"transformRect:rect");var b=a.x,c=a.y,d=b+a.width,e=c+a.height,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.x=p;a.y= -h;a.width=e-p;a.height=q-h};ga.prototype.isIdentity=ga.prototype.zt=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};function K(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=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.Qa=!1}w.ja("Spot",K);w.Ph(K);w.be(K,{x:!0,y:!0,offsetX:!0,offsetY:!0}); -K.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY};K.prototype.setTo=K.prototype.o=function(a,b,c,d){t&&(pb(a,"setTo:x"),pb(b,"setTo:y"),vb(c,"setTo:offx"),vb(d,"setTo:offy"));w.N(this);this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};K.prototype.set=K.prototype.set=function(a){t&&w.l(a,K,K,"set:s");w.N(this);this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this}; -K.prototype.copy=function(){var a=new K;a.x=this.x;a.y=this.y;a.offsetX=this.offsetX;a.offsetY=this.offsetY;return a};K.prototype.Ma=function(){this.Qa=!0;Object.freeze(this);return this};K.prototype.ba=function(){return Object.isFrozen(this)?this:this.copy().freeze()};K.prototype.freeze=function(){this.Qa=!0;return this};K.prototype.Na=function(){Object.isFrozen(this)&&w.m("cannot thaw constant: "+this);this.Qa=!1;return this};function wb(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a} -function pb(a,b){(isNaN(a)||1a)&&w.la(a,"0 <= "+b+" <= 1",K,b)}function vb(a,b){(isNaN(a)||Infinity===a||-Infinity===a)&&w.la(a,"real number, not NaN or Infinity",K,b)}var xb; -K.parse=xb=function(a){if("string"===typeof a){a=a.trim();if("None"===a)return yb;if("TopLeft"===a)return Ab;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return Cb;if("TopRight"===a)return Db;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Kb;if("Center"===a)return Ob;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Pb;if("BottomLeft"===a)return Ub;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Vb;if("BottomRight"===a)return Wb;if("TopSide"===a)return Xb;if("LeftSide"=== -a)return ac;if("RightSide"===a)return bc;if("BottomSide"===a)return cc;if("TopBottomSides"===a)return dc;if("LeftRightSides"===a)return ec;if("TopLeftSides"===a)return fc;if("TopRightSides"===a)return gc;if("BottomLeftSides"===a)return mc;if("BottomRightSides"===a)return nc;if("NotTopSide"===a)return qc;if("NotLeftSide"===a)return rc;if("NotRightSide"===a)return sc;if("NotBottomSide"===a)return xc;if("AllSides"===a)return yc;if("Default"===a)return zc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; -var d=a[b++];void 0!==d&&0b.offset?1:-1});for(k=0;k=2*Math.PI?(Vc(a,b,c,d,e,e+Math.PI,h),Vc(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 Uc(a,b,c,d,e,g,h){var k=new Lc;k.jf=[b,c,d,e,g,h];b={};bd(a,"g",b,k);k=a.addElement("g",b);a.xf.push(k)} -f.eb=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+this.xG;this.xG++;var b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,e,g,h;c=Tc(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",VK:this.shadowBlur/2});d=Tc(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});e=Tc(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});g=Tc(this,"feOffset",{"in":"comp",result:"offsetBlur", -dx:this.shadowOffsetX,dy:this.shadowOffsetY});h=Tc(this,"feMerge",{});h.appendChild(Tc(this,"feMergeNode",{"in":"offsetBlur"}));h.appendChild(Tc(this,"feMergeNode",{"in":"SourceGraphic"}));b.appendChild(c);b.appendChild(d);b.appendChild(e);b.appendChild(g);b.appendChild(h);0=a)return 0;var b=J.CB;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);J.CB=b}return 1>a? -(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},I:function(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8=e&&(e=1E-6);var k=0,l=0,m=0,n=0;am-n)if(a-c>e||c-a>e){if(g=(d-b)/(c-a)*(g-a)+b,g-e<=h&&h<=g+e)return!0}else return!0;else if(b- -d>e||d-b>e){if(h=(c-a)/(d-b)*(h-b)+a,h-e<=g&&g<=h+e)return!0}else return!0;return!1},mw:function(a,b,c,d,e,g,h,k,l,m,n,p){if(J.Od(a,b,h,k,p,c,d)&&J.Od(a,b,h,k,p,e,g))return J.Od(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+e)/2,u=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(q+s)/2;c=(r+u)/2;var s=(s+e)/2,u=(u+g)/2,v=(d+s)/2,A=(c+u)/2;return J.mw(a,b,q,r,d,c,v,A,l,m,n,p)||J.mw(v,A,s,u,e,g,h,k,l,m,n,p)},eI:function(a,b,c,d,e,g,h,k,l){var m=(c+e)/2,n=(d+g)/2;l.x=(((a+c)/2+m)/2+(m+(e+h)/2)/2)/2;l.y=(((b+d)/2+n)/2+(n+ -(g+k)/2)/2)/2;return l},dI:function(a,b,c,d,e,g,h,k){var l=(c+e)/2,m=(d+g)/2;return ab(((a+c)/2+l)/2,((b+d)/2+m)/2,(l+(e+h)/2)/2,(m+(g+k)/2)/2)},Lo:function(a,b,c,d,e,g,h,k,l,m){if(J.Od(a,b,h,k,l,c,d)&&J.Od(a,b,h,k,l,e,g))nb(m,a,b,0,0),nb(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;J.Lo(a,b,n,p,d,c,s,u,l,m);J.Lo(s,u,q,r,e,g,h,k,l,m)}return m},He:function(a,b,c,d,e,g,h,k,l,m){if(J.Od(a,b,h,k,l,c,d)&& -J.Od(a,b,h,k,l,e,g))0===m.length&&(m.push(a),m.push(b)),m.push(h),m.push(k);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+g)/2,s=(d+q)/2,u=(c+r)/2;J.He(a,b,n,p,d,c,s,u,l,m);J.He(s,u,q,r,e,g,h,k,l,m)}return m},NA:function(a,b,c,d,e,g,h,k,l,m){if(J.Od(a,b,e,g,m,c,d))return J.Od(a,b,e,g,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var q=(n+c)/2,r=(p+d)/2;return J.NA(a,b,n,p,q,r,h,k,l,m)||J.NA(q,r,c,d,e,g,h,k,l,m)},UK:function(a,b,c, -d,e,g,h){h.x=((a+c)/2+(c+e)/2)/2;h.y=((b+d)/2+(d+g)/2)/2;return h},MA:function(a,b,c,d,e,g,h,k){if(J.Od(a,b,e,g,h,c,d))nb(k,a,b,0,0),nb(k,e,g,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;J.MA(a,b,l,m,n,p,h,k);J.MA(n,p,c,d,e,g,h,k)}return k},Hp:function(a,b,c,d,e,g,h,k){if(J.Od(a,b,e,g,h,c,d))0===k.length&&(k.push(a),k.push(b)),k.push(e),k.push(g);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+g)/2;var n=(l+c)/2,p=(m+d)/2;J.Hp(a,b,l,m,n,p,h,k);J.Hp(n,p,c,d,e,g,h,k)}return k}, -Ys:function(a,b,c,d,e,g,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(J.Od(a,b,h,k,q,c,d)&&J.Od(a,b,h,k,q,e,g)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(0===s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(h=l=0,bh)return!1}else if(ah)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,u=(b+d)/2;c=(c+e)/2;d=(d+g)/2;e=(e+h)/2;g=(g+k)/2;var v=(s+c)/2,A=(u+d)/2;c=(c+e)/2;d=(d+g)/2;var E=(v+c)/2,B=(A+d)/ -2,G=(n-l)*(n-l)+(p-m)*(p-m),O=!1;J.Ys(a,b,s,u,v,A,E,B,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b=q&&(q=1E-6);if(J.Od(a,b,h,k,q,c,d)&&J.Od(a,b,h,k,q,e,g)){q=(a-h)*(m-p)-(b-k)*(l-n);if(0===q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,u=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)< -(m>p?m-p:p-m)){if(a=l=0,ba)return r}else if(aa)return r;0q&&r--}else{var s=(a+c)/2,u=(b+d)/2,v=(c+e)/2,A=(d+g)/2;e=(e+h)/2;g=(g+k)/2;d=(s+v)/2;c=(u+A)/2;var v=(v+e)/2,A=(A+g)/2,E=(d+v)/2,B=(c+A)/2,r=r+J.Zs(a,b,s,u,d,c,E,B,l,m,n,p,q),r=r+J.Zs(E,B,v,A,e,g,h,k,l,m,n,p,q)}return r},cn:function(a,b,c,d,e,g,h){if(J.rb(a,c)){var k=0;c=0;bc)return h.x=a,h.y=c,!1;h.x=a;h.y=d;return!0}if(J.rb(b, -d)){ac)return h.x=c,h.y=b,!1;h.x=d;h.y=b;return!0}k=((a-e)*(a-c)+(b-g)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>k)return h.x=a,h.y=b,!1;if(1.000005c)return l.x=a,l.y=c,!1;l.x=a;l.y=g;return!0}h=(d-b)/(c-a);if(J.rb(k,h))return J.cn(a,b,c,d,e,g,l),!1;e=(h*a-k*e+g-b)/(h-k);if(J.rb(h,0)){ac)return l.x=c,l.y=b,!1;l.x=e;l.y=b;return!0}g=h*(e-a)+b;return J.cn(a,b,c,d,e,g,l)},FK:function(a,b,c,d,e){return J.ih(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},BK:function(a,b,c,d,e,g,h,k,l,m){function n(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){q=1-(c-e)*(c-e)/(q*q);if(0>q)return l;q=Math.sqrt(q);d=-m*q+g;n(c,m*q+g);n(c,d)}else{c=(d-b)/(c-a);d=1/(q*q)+c*c/(m*m);k=2*c*(b-c*a)/(m*m)-2*c*g/(m*m)-2*e/(q*q);q=k*k-4*d*(2*c*a*g/(m*m)-2*b*g/(m*m)+g*g/(m*m)+e*e/(q*q)-1+(b-c*a)*(b-c*a)/(m*m));if(0>q)return l;q=Math.sqrt(q);m=(-k+q)/(2*d);n(m,c*m-c*a+b);q=(-k-q)/(2*d);n(q, -c*q-c*a+b)}return l},pl:function(a,b,c,d,e,g,h,k,l){var m=1E21,n=a,p=b;if(J.ih(a,b,a,d,e,g,h,k,l)){var q=(l.x-e)*(l.x-e)+(l.y-g)*(l.y-g);qm},Tw:function(a,b,c){var d=b.x,e=b.y,g=c.x,h=c.y,k=a.left,l=a.right, -m=a.top,n=a.bottom;return d===g?(g=a=0,e=m):e===h?(d=k):a.Ea(b)||a.Ea(c)||J.Sw(k,m,l,m,d,e,g,h)||J.Sw(l,m,l,n,d,e,g,h)||J.Sw(l,n,k,n,d,e,g,h)||J.Sw(k,n,k,m,d,e,g,h)?!0:!1},Sw:function(a,b,c,d,e,g,h,k){return 0>=J.rw(a,b,c,d,e,g)*J.rw(a,b,c,d,h,k)&&0>=J.rw(e,g,h,k,a,b)*J.rw(e,g,h,k,c,d)},rw:function(a,b,c,d,e,g){c-=a;d-=b;a=e-a;b=g-b;g=a*d-b*c;0===g&&(g=a*c+b*d,0g&&(g=0)));return 0>g?-1:0a&&(a+=360);360<=a&&(a-=360);return a},pE:function(a,b,c,d,e,g){void 0===g&&(g=!1);var h=Math.PI;g||(d*=h/180,e*=h/180);g=dc,g=0>d,h=0,k=h=0;am;++m){b=.5*(k+l);if(b===k||b===l)break;var n=a/(b+g),p=h/(b+e),n=n*n+p*p-1;if(0n)l=b;else break}c=g*c/(b+g)-c;d=e*d/(b+e)-d;e=Math.sqrt(c*c+d*d)}else e=Math.abs(d-b);else d=a*a-b*b,e=a*c,ea?"M"+this.ra.toString()+" "+this.sa.toString()+"L"+this.D.toString()+" "+this.F.toString():"M"+this.ra.toFixed(a)+" "+this.sa.toFixed(a)+"L"+this.D.toFixed(a)+" "+this.F.toFixed(a);case jd:var b=new y(this.ra,this.sa,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 kd:b=new y(this.ra,this.sa,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 fd:for(var b="",c=this.pb.q,d=c.length,e=0;e=u-1?!0:null!==l[m+1].match(/[A-Za-z]/)}function d(){m++;return l[m]}function e(){var a=new x(parseFloat(d()),parseFloat(d()));n===n.toLowerCase()&&(a.x=s.x+a.x,a.y=s.y+a.y);return a}function g(){return s=e()}function h(){return r=e()}function k(){return"c"!==p.toLowerCase()&&"s"!==p.toLowerCase()?s:new x(2*s.x-r.x,2*s.y-r.y)}void 0===b&&(b=!1);"string"!==typeof a&&w.sc(a,"string",ed,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, -"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");a=a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");for(var l=a.split(" "),m=-1,n="",p="",q=new x(0,0),r=new x(0,0),s=new x(0, -0),u=l.length,v=w.u(),A=!1,E=!1,B=!0;!(m>=u-1);)if(p=n,n=d(),""!==n)switch(n.toUpperCase()){case "X":B=!0;E=A=!1;break;case "M":var G=g();null===v.Wb||!0===B?(L(v,G.x,G.y,A,!1,!E),B=!1):v.moveTo(G.x,G.y);for(q=s;!c();)G=g(),v.lineTo(G.x,G.y);break;case "L":for(;!c();)G=g(),v.lineTo(G.x,G.y);break;case "H":for(;!c();)s=G=new x((n===n.toLowerCase()?s.x:0)+parseFloat(d()),s.y),v.lineTo(s.x,s.y);break;case "V":for(;!c();)s=G=new x(s.x,(n===n.toLowerCase()?s.y:0)+parseFloat(d())),v.lineTo(s.x,s.y);break; -case "C":for(;!c();){var O=e(),M=h(),G=g();N(v,O.x,O.y,M.x,M.y,G.x,G.y)}break;case "S":for(;!c();)O=k(),M=h(),G=g(),N(v,O.x,O.y,M.x,M.y,G.x,G.y);break;case "Q":for(;!c();)M=h(),G=g(),yd(v,M.x,M.y,G.x,G.y);break;case "T":for(;!c();)r=M=k(),G=g(),yd(v,M.x,M.y,G.x,G.y);break;case "B":for(;!c();){var G=parseFloat(d()),O=parseFloat(d()),M=parseFloat(d()),X=parseFloat(d()),ja=parseFloat(d()),V=ja,Q=!1;c()||(V=parseFloat(d()),c()||(Q=0!==parseFloat(d())));n===n.toLowerCase()&&(M+=s.x,X+=s.y);v.arcTo(G,O, -M,X,ja,V,Q)}break;case "A":for(;!c();)O=Math.abs(parseFloat(d())),M=Math.abs(parseFloat(d())),X=parseFloat(d()),ja=!!parseFloat(d()),V=!!parseFloat(d()),G=g(),zd(v,O,M,X,ja,V,G.x,G.y);break;case "Z":G=v.s.pb.q[v.s.pb.length-1];Ad(v);s=q;break;case "F":G="";for(O=1;l[m+O];)if(null!==l[m+O].match(/[Uu]/))O++;else if(null===l[m+O].match(/[A-Za-z]/))O++;else{G=l[m+O];break}G.match(/[Mm]/)?A=!0:Bd(v);break;case "U":G="";for(O=1;l[m+O];)if(null!==l[m+O].match(/[Ff]/))O++;else if(null===l[m+O].match(/[A-Za-z]/))O++; -else{G=l[m+O];break}G.match(/[Mm]/)?E=!0:v.eb(!1)}q=v.s;w.v(v);if(b)for(v=q.pb.k;v.next();)G=v.value,G.ip=!0;return q};function Cd(a,b){for(var c=a.length,d=w.M(),e=0;e=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||1a)return n=(a-q)/p,w.xa(c),new x(b+(e-b)*n,d+(g-d)*n);q+=p}b=e;d=g}w.xa(c);return null};w.g(ed,"type",ed.prototype.type);w.defineProperty(ed,{type:"type"},function(){return this.ha},function(a){this.ha!==a&&(t&&w.za(a,ed,ed,"type"),w.N(this,a),this.ha=a,this.Ya=!0)});w.g(ed,"startX",ed.prototype.ra); -w.defineProperty(ed,{ra:"startX"},function(){return this.lc},function(a){this.lc!==a&&(t&&w.p(a,ed,"startX"),w.N(this,a),this.lc=a,this.Ya=!0)});w.g(ed,"startY",ed.prototype.sa);w.defineProperty(ed,{sa:"startY"},function(){return this.vc},function(a){this.vc!==a&&(t&&w.p(a,ed,"startY"),w.N(this,a),this.vc=a,this.Ya=!0)});w.g(ed,"endX",ed.prototype.D);w.defineProperty(ed,{D:"endX"},function(){return this.nb},function(a){this.nb!==a&&(t&&w.p(a,ed,"endX"),w.N(this,a),this.nb=a,this.Ya=!0)}); -w.g(ed,"endY",ed.prototype.F);w.defineProperty(ed,{F:"endY"},function(){return this.zb},function(a){this.zb!==a&&(t&&w.p(a,ed,"endY"),w.N(this,a),this.zb=a,this.Ya=!0)});w.g(ed,"figures",ed.prototype.pb);w.defineProperty(ed,{pb:"figures"},function(){return this.ij},function(a){this.ij!==a&&(t&&w.l(a,D,ed,"figures"),w.N(this,a),this.ij=a,this.Ya=!0)});ed.prototype.add=ed.prototype.add=function(a){this.ij.add(a);return this}; -w.defineProperty(ed,{G:"spot1"},function(){return this.zi},function(a){t&&w.l(a,K,ed,"spot1");w.N(this,a);this.zi=a.ba()});w.defineProperty(ed,{H:"spot2"},function(){return this.Ai},function(a){t&&w.l(a,K,ed,"spot2");w.N(this,a);this.Ai=a.ba()});w.defineProperty(ed,{td:"defaultStretch"},function(){return this.ji},function(a){t&&w.za(a,P,ed,"stretch");w.N(this,a);this.ji=a});w.A(ed,{kb:"bounds"},function(){this.wA()&&(this.tB(),this.tg());return this.Du}); -function gd(a,b,c,d){w.jc(this);this.Qa=!1;void 0===c&&(c=!0);this.Xl=c;void 0===d&&(d=!0);this.ao=d;void 0!==a?(t&&w.p(a,gd,"sx"),this.lc=a):this.lc=0;void 0!==b?(t&&w.p(b,gd,"sy"),this.vc=b):this.vc=0;this.so=new D(Pd);this.Nv=this.so.W;this.Ya=!0}w.ja("PathFigure",gd);w.Ph(gd);gd.prototype.copy=function(){var a=new gd;a.Xl=this.Xl;a.ao=this.ao;a.lc=this.lc;a.vc=this.vc;for(var b=this.so.q,c=b.length,d=a.so,e=0;ea?"M"+this.ra.toString()+" "+this.sa.toString():"M"+this.ra.toFixed(a)+" "+this.sa.toFixed(a),c=this.Fa.q,d=c.length,e=0;ea&&(a+=360),this.fd=a),void 0!==d&&(t&&w.p(d,Pd,"x1"),this.mg=Math.max(d,0)),void 0!==e&&(t&&w.p(e,Pd,"y1"),this.ng=Math.max(e,0)),this.io=!!h,this.zn=!!k):(void 0!==d&&(t&&w.p(d,Pd,"x1"),this.fd=d),void 0!==e&&(t&&w.p(e,Pd,"y1"),this.Ce=e),void 0!==g&&(t&& -w.p(g,Pd,"x2"),a===Hd&&(g=Math.max(g,0)),this.mg=g),void 0!==h&&"number"===typeof h&&(t&&w.p(h,Pd,"y2"),a===Hd&&(h=Math.max(h,0)),this.ng=h));this.Ah=!1;this.Ya=!0;this.aj=null}w.ja("PathSegment",Pd);w.Ph(Pd); -Pd.prototype.copy=function(){var a=new Pd;a.ha=this.ha;a.nb=this.nb;a.zb=this.zb;void 0!==this.fd&&(a.fd=this.fd);void 0!==this.Ce&&(a.Ce=this.Ce);void 0!==this.mg&&(a.mg=this.mg);void 0!==this.ng&&(a.ng=this.ng);void 0!==this.io&&(a.io=this.io);void 0!==this.zn&&(a.zn=this.zn);a.Ah=this.Ah;a.Ya=this.Ya;return a}; -Pd.prototype.equalsApprox=Pd.prototype.Ne=function(a){if(!(a instanceof Pd)||this.type!==a.type||this.xt!==a.xt)return!1;switch(this.type){case Ed:case md:return J.I(this.D,a.D)&&J.I(this.F,a.F);case Fd:return J.I(this.D,a.D)&&J.I(this.F,a.F)&&J.I(this.Ib,a.Ib)&&J.I(this.Ub,a.Ub)&&J.I(this.we,a.we)&&J.I(this.xe,a.xe);case Gd:return J.I(this.D,a.D)&&J.I(this.F,a.F)&&J.I(this.Ib,a.Ib)&&J.I(this.Ub,a.Ub);case Hd:return J.I(this.lh,a.lh)&&J.I(this.Yh,a.Yh)&&J.I(this.Da,a.Da)&&J.I(this.Ra,a.Ra)&&J.I(this.radiusX, -a.radiusX)&&J.I(this.radiusY,a.radiusY);case Id:return this.Ww===a.Ww&&this.Yw===a.Yw&&J.I(this.Mx,a.Mx)&&J.I(this.D,a.D)&&J.I(this.F,a.F)&&J.I(this.radiusX,a.radiusX)&&J.I(this.radiusY,a.radiusY);default:return!1}}; -Pd.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case Ed:b=0>a?"M"+this.D.toString()+" "+this.F.toString():"M"+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case md:b=0>a?"L"+this.D.toString()+" "+this.F.toString():"L"+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case Fd:b=0>a?"C"+this.Ib.toString()+" "+this.Ub.toString()+" "+this.we.toString()+" "+this.xe.toString()+" "+this.D.toString()+" "+this.F.toString():"C"+this.Ib.toFixed(a)+" "+this.Ub.toFixed(a)+" "+this.we.toFixed(a)+ -" "+this.xe.toFixed(a)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case Gd:b=0>a?"Q"+this.Ib.toString()+" "+this.Ub.toString()+" "+this.D.toString()+" "+this.F.toString():"Q"+this.Ib.toFixed(a)+" "+this.Ub.toFixed(a)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;case Hd:b=0>a?"B"+this.lh.toString()+" "+this.Yh.toString()+" "+this.Da.toString()+" "+this.Ra.toString()+" "+this.radiusX:"B"+this.lh.toFixed(a)+" "+this.Yh.toFixed(a)+" "+this.Da.toFixed(a)+" "+this.Ra.toFixed(a)+" "+this.radiusX; -break;case Id:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Mx.toString()+" "+(this.Yw?1:0)+" "+(this.Ww?1:0)+" "+this.D.toString()+" "+this.F.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Mx.toFixed(a)+" "+(this.Yw?1:0)+" "+(this.Ww?1:0)+" "+this.D.toFixed(a)+" "+this.F.toFixed(a);break;default:b=this.type.toString()}return b+(this.Ah?"z":"")};var Ed;Pd.Move=Ed=w.w(Pd,"Move",0);var md;Pd.Line=md=w.w(Pd,"Line",1);var Fd; -Pd.Bezier=Fd=w.w(Pd,"Bezier",2);var Gd;Pd.QuadraticBezier=Gd=w.w(Pd,"QuadraticBezier",3);var Hd;Pd.Arc=Hd=w.w(Pd,"Arc",4);var Id;Pd.SvgArc=Id=w.w(Pd,"SvgArc",4);Pd.prototype.freeze=function(){this.Qa=!0;return this};Pd.prototype.Na=function(){this.Qa=!1;return this};Pd.prototype.close=Pd.prototype.close=function(){this.Ah=!0;return this}; -function Jd(a,b){if(null!==a.aj&&!1===b.Ya)return a.aj;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);var e=a.fd,g=a.Ce,h=J.pE(0,0,c=s?k=Math.PI:1<=s&&(k=0);!m&&0k&&(k+=2*Math.PI);m=b>h?1:b/h;s=b>h?h/b:1;b=J.pE(0,0,b>h?b:h,p,p+k,!0);h=w.mh();h.reset();h.translate(c,d);h.rotate(a.fd,0,0);h.scale(m,s);Cd(b,h);w.df(h);a.aj=b;return a.aj}w.g(Pd,"isClosed",Pd.prototype.xt); -w.defineProperty(Pd,{xt:"isClosed"},function(){return this.Ah},function(a){this.Ah!==a&&(this.Ah=a,this.Ya=!0)});w.g(Pd,"type",Pd.prototype.type);w.defineProperty(Pd,{type:"type"},function(){return this.ha},function(a){t&&w.za(a,Pd,Pd,"type");w.N(this,a);this.ha=a;this.Ya=!0});w.g(Pd,"endX",Pd.prototype.D);w.defineProperty(Pd,{D:"endX"},function(){return this.nb},function(a){t&&w.p(a,Pd,"endX");w.N(this,a);this.nb=a;this.Ya=!0});w.g(Pd,"endY",Pd.prototype.F); -w.defineProperty(Pd,{F:"endY"},function(){return this.zb},function(a){t&&w.p(a,Pd,"endY");w.N(this,a);this.zb=a;this.Ya=!0});w.defineProperty(Pd,{Ib:"point1X"},function(){return this.fd},function(a){t&&w.p(a,Pd,"point1X");w.N(this,a);this.fd=a;this.Ya=!0});w.defineProperty(Pd,{Ub:"point1Y"},function(){return this.Ce},function(a){t&&w.p(a,Pd,"point1Y");w.N(this,a);this.Ce=a;this.Ya=!0}); -w.defineProperty(Pd,{we:"point2X"},function(){return this.mg},function(a){t&&w.p(a,Pd,"point2X");w.N(this,a);this.mg=a;this.Ya=!0});w.defineProperty(Pd,{xe:"point2Y"},function(){return this.ng},function(a){t&&w.p(a,Pd,"point2Y");w.N(this,a);this.ng=a;this.Ya=!0});w.defineProperty(Pd,{Da:"centerX"},function(){return this.fd},function(a){t&&w.p(a,Pd,"centerX");w.N(this,a);this.fd=a;this.Ya=!0}); -w.defineProperty(Pd,{Ra:"centerY"},function(){return this.Ce},function(a){t&&w.p(a,Pd,"centerY");w.N(this,a);this.Ce=a;this.Ya=!0});w.defineProperty(Pd,{radiusX:"radiusX"},function(){return this.mg},function(a){t&&w.p(a,Pd,"radiusX");0>a&&w.la(a,">= zero",Pd,"radiusX");w.N(this,a);this.mg=a;this.Ya=!0});w.defineProperty(Pd,{radiusY:"radiusY"},function(){return this.ng},function(a){t&&w.p(a,Pd,"radiusY");0>a&&w.la(a,">= zero",Pd,"radiusY");w.N(this,a);this.ng=a;this.Ya=!0}); -w.defineProperty(Pd,{lh:"startAngle"},function(){return this.nb},function(a){this.nb!==a&&(w.N(this,a),t&&w.p(a,Pd,"startAngle"),a%=360,0>a&&(a+=360),this.nb=a,this.Ya=!0)});w.defineProperty(Pd,{Yh:"sweepAngle"},function(){return this.zb},function(a){t&&w.p(a,Pd,"sweepAngle");w.N(this,a);360a&&(a=-360);this.zb=a;this.Ya=!0});w.defineProperty(Pd,{Ww:"isClockwiseArc"},function(){return this.zn},function(a){w.N(this,a);this.zn=a;this.Ya=!0}); -w.defineProperty(Pd,{Yw:"isLargeArc"},function(){return this.io},function(a){w.N(this,a);this.io=a;this.Ya=!0});w.defineProperty(Pd,{Mx:"xAxisRotation"},function(){return this.fd},function(a){t&&w.p(a,Pd,"xAxisRotation");a%=360;0>a&&(a+=360);w.N(this,a);this.fd=a;this.Ya=!0});function Sd(){this.Y=null;this.Bz=(new x(0,0)).freeze();this.By=(new x(0,0)).freeze();this.Au=this.wv=0;this.kv="";this.aw=this.Qu=!1;this.Mu=this.Cu=0;this.bj=this.Yu=this.gv=!1;this.Gq=null;this.$v=0;this.og=this.Yv=null} -w.ja("InputEvent",Sd);Sd.prototype.copy=function(){var a=new Sd;a.Y=this.Y;a.Bz.assign(this.We);a.By.assign(this.ga);a.wv=this.wv;a.Au=this.Au;a.kv=this.kv;a.Qu=this.Qu;a.aw=this.aw;a.Cu=this.Cu;a.Mu=this.Mu;a.gv=this.gv;a.Yu=this.Yu;a.bj=this.bj;a.Gq=this.Gq;a.$v=this.$v;a.Yv=this.Yv;a.og=this.og;return a}; -Sd.prototype.toString=function(){var a="^";0!==this.Zc&&(a+="M:"+this.Zc);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Je&&(a+="C:"+this.Je);0!==this.Yj&&(a+="D:"+this.Yj);this.Oc&&(a+="h");this.bubbles&&(a+="b");null!==this.ga&&(a+="@"+this.ga.toString());return a};w.g(Sd,"diagram",Sd.prototype.h);w.defineProperty(Sd,{h:"diagram"},function(){return this.Y},function(a){this.Y=a});w.g(Sd,"viewPoint",Sd.prototype.We); -w.defineProperty(Sd,{We:"viewPoint"},function(){return this.Bz},function(a){w.l(a,x,Sd,"viewPoint");this.Bz.assign(a)});w.g(Sd,"documentPoint",Sd.prototype.ga);w.defineProperty(Sd,{ga:"documentPoint"},function(){return this.By},function(a){w.l(a,x,Sd,"documentPoint");this.By.assign(a)});w.g(Sd,"modifiers",Sd.prototype.Zc);w.defineProperty(Sd,{Zc:"modifiers"},function(){return this.wv},function(a){this.wv=a});w.g(Sd,"button",Sd.prototype.button); -w.defineProperty(Sd,{button:"button"},function(){return this.Au},function(a){this.Au=a});w.g(Sd,"key",Sd.prototype.key);w.defineProperty(Sd,{key:"key"},function(){return this.kv},function(a){this.kv=a});w.g(Sd,"down",Sd.prototype.ak);w.defineProperty(Sd,{ak:"down"},function(){return this.Qu},function(a){this.Qu=a});w.g(Sd,"up",Sd.prototype.up);w.defineProperty(Sd,{up:"up"},function(){return this.aw},function(a){this.aw=a});w.g(Sd,"clickCount",Sd.prototype.Je); -w.defineProperty(Sd,{Je:"clickCount"},function(){return this.Cu},function(a){this.Cu=a});w.g(Sd,"delta",Sd.prototype.Yj);w.defineProperty(Sd,{Yj:"delta"},function(){return this.Mu},function(a){this.Mu=a});w.defineProperty(Sd,{At:"isMultiTouch"},function(){return this.gv},function(a){this.gv=a});w.g(Sd,"handled",Sd.prototype.Oc);w.defineProperty(Sd,{Oc:"handled"},function(){return this.Yu},function(a){this.Yu=a});w.g(Sd,"bubbles",Sd.prototype.bubbles); -w.defineProperty(Sd,{bubbles:"bubbles"},function(){return this.bj},function(a){this.bj=a});w.g(Sd,"event",Sd.prototype.event);w.defineProperty(Sd,{event:"event"},function(){return this.Gq},function(a){this.Gq=a});w.A(Sd,{ul:"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.g(Sd,"timestamp",Sd.prototype.timestamp); -w.defineProperty(Sd,{timestamp:"timestamp"},function(){return this.$v},function(a){this.$v=a});w.g(Sd,"targetDiagram",Sd.prototype.Zf);w.defineProperty(Sd,{Zf:"targetDiagram"},function(){return this.Yv},function(a){this.Yv=a});w.g(Sd,"targetObject",Sd.prototype.ie);w.defineProperty(Sd,{ie:"targetObject"},function(){return this.og},function(a){this.og=a});w.g(Sd,"control",Sd.prototype.control); -w.defineProperty(Sd,{control:"control"},function(){return 0!==(this.Zc&1)},function(a){this.Zc=a?this.Zc|1:this.Zc&-2});w.g(Sd,"shift",Sd.prototype.shift);w.defineProperty(Sd,{shift:"shift"},function(){return 0!==(this.Zc&4)},function(a){this.Zc=a?this.Zc|4:this.Zc&-5});w.g(Sd,"alt",Sd.prototype.alt);w.defineProperty(Sd,{alt:"alt"},function(){return 0!==(this.Zc&2)},function(a){this.Zc=a?this.Zc|2:this.Zc&-3});w.g(Sd,"meta",Sd.prototype.xp); -w.defineProperty(Sd,{xp:"meta"},function(){return 0!==(this.Zc&8)},function(a){this.Zc=a?this.Zc|8:this.Zc&-9});w.g(Sd,"left",Sd.prototype.left);w.defineProperty(Sd,{left:"left"},function(){return 0===this.button},function(a){this.button=a?0:2});w.g(Sd,"middle",Sd.prototype.rJ);w.defineProperty(Sd,{rJ:"middle"},function(){return 1===this.button},function(a){this.button=a?1:0});w.g(Sd,"right",Sd.prototype.right); -w.defineProperty(Sd,{right:"right"},function(){return 2===this.button},function(a){this.button=a?2:0});function Td(){this.Y=null;this.Xb="";this.Fv=this.Tv=null;this.Bu=!1}w.ja("DiagramEvent",Td);Td.prototype.copy=function(){var a=new Td;a.Y=this.Y;a.Xb=this.Xb;a.Tv=this.Tv;a.Fv=this.Fv;a.Bu=this.Bu;return a};Td.prototype.toString=function(){var a="*"+this.name;this.cancel&&(a+="x");null!==this.Hx&&(a+=":"+this.Hx.toString());null!==this.ux&&(a+="("+this.ux.toString()+")");return a}; -w.g(Td,"diagram",Td.prototype.h);w.defineProperty(Td,{h:"diagram"},function(){return this.Y},function(a){this.Y=a});w.g(Td,"name",Td.prototype.name);w.defineProperty(Td,{name:"name"},function(){return this.Xb},function(a){this.Xb=a});w.g(Td,"subject",Td.prototype.Hx);w.defineProperty(Td,{Hx:"subject"},function(){return this.Tv},function(a){this.Tv=a});w.g(Td,"parameter",Td.prototype.ux);w.defineProperty(Td,{ux:"parameter"},function(){return this.Fv},function(a){this.Fv=a});w.g(Td,"cancel",Td.prototype.cancel); -w.defineProperty(Td,{cancel:"cancel"},function(){return this.Bu},function(a){this.Bu=a});function Ud(){this.mq=fe;this.mm=this.vv="";this.Jr=this.Kr=this.Qr=this.Rr=this.Pr=this.Y=this.Ud=null}w.ja("ChangedEvent",Ud);var ge;Ud.Transaction=ge=w.w(Ud,"Transaction",-1);var fe;Ud.Property=fe=w.w(Ud,"Property",0);var he;Ud.Insert=he=w.w(Ud,"Insert",1);var ie;Ud.Remove=ie=w.w(Ud,"Remove",2);Ud.prototype.clear=Ud.prototype.clear=function(){this.Jr=this.Kr=this.Qr=this.Rr=this.Pr=this.Y=this.Ud=null}; -Ud.prototype.copy=function(){var a=new Ud;a.Ud=this.Ud;a.Y=this.Y;a.mq=this.mq;a.vv=this.vv;a.mm=this.mm;a.Pr=this.Pr;var b=this.Rr;a.Rr=w.Xa(b)&&"function"===typeof b.ba?b.ba():b;b=this.Qr;a.Qr=w.Xa(b)&&"function"===typeof b.ba?b.ba():b;b=this.Kr;a.Kr=w.Xa(b)&&"function"===typeof b.ba?b.ba():b;b=this.Jr;a.Jr=w.Xa(b)&&"function"===typeof b.ba?b.ba():b;return a}; -Ud.prototype.toString=function(){var a="",a=this.sd===ge?a+"* ":this.sd===fe?a+(null!==this.fa?"!m":"!d"):a+((null!==this.fa?"!m":"!d")+this.sd);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.Bf&&this.Bf!==this.propertyName&&(a+=" "+this.Bf);a+=": ";this.sd===ge?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=je(this.object)),null!==this.oldValue&&(a+=" old: "+je(this.oldValue)),null!==this.Yf&&(a+=" "+this.Yf),null!==this.newValue&& -(a+=" new: "+je(this.newValue)),null!==this.Wf&&(a+=" "+this.Wf));return a};Ud.prototype.getValue=Ud.prototype.Aa=function(a){return a?this.oldValue:this.newValue};Ud.prototype.getParam=function(a){return a?this.Yf:this.Wf};Ud.prototype.canUndo=Ud.prototype.canUndo=function(){return null!==this.fa||null!==this.h?!0:!1};Ud.prototype.undo=Ud.prototype.undo=function(){this.canUndo()&&(null!==this.fa?this.fa.Im(this,!0):null!==this.h&&this.h.Im(this,!0))}; -Ud.prototype.canRedo=Ud.prototype.canRedo=function(){return null!==this.fa||null!==this.h?!0:!1};Ud.prototype.redo=Ud.prototype.redo=function(){this.canRedo()&&(null!==this.fa?this.fa.Im(this,!1):null!==this.h&&this.h.Im(this,!1))};w.g(Ud,"model",Ud.prototype.fa);w.defineProperty(Ud,{fa:"model"},function(){return this.Ud},function(a){this.Ud=a});w.g(Ud,"diagram",Ud.prototype.h);w.defineProperty(Ud,{h:"diagram"},function(){return this.Y},function(a){this.Y=a});w.g(Ud,"change",Ud.prototype.sd); -w.defineProperty(Ud,{sd:"change"},function(){return this.mq},function(a){t&&w.za(a,Ud,Ud,"change");this.mq=a});w.g(Ud,"modelChange",Ud.prototype.Bf);w.defineProperty(Ud,{Bf:"modelChange"},function(){return this.vv},function(a){t&&w.i(a,"string",Ud,"modelChange");this.vv=a});w.g(Ud,"propertyName",Ud.prototype.propertyName);w.defineProperty(Ud,{propertyName:"propertyName"},function(){return this.mm},function(a){t&&"string"!==typeof a&&w.i(a,"function",Ud,"propertyName");this.mm=a}); -w.g(Ud,"isTransactionFinished",Ud.prototype.cJ);w.A(Ud,{cJ:"isTransactionFinished"},function(){return this.mq===ge&&("CommittedTransaction"===this.mm||"FinishedUndo"===this.mm||"FinishedRedo"===this.mm)});w.g(Ud,"object",Ud.prototype.object);w.defineProperty(Ud,{object:"object"},function(){return this.Pr},function(a){this.Pr=a});w.g(Ud,"oldValue",Ud.prototype.oldValue);w.defineProperty(Ud,{oldValue:"oldValue"},function(){return this.Rr},function(a){this.Rr=a});w.g(Ud,"oldParam",Ud.prototype.Yf); -w.defineProperty(Ud,{Yf:"oldParam"},function(){return this.Qr},function(a){this.Qr=a});w.g(Ud,"newValue",Ud.prototype.newValue);w.defineProperty(Ud,{newValue:"newValue"},function(){return this.Kr},function(a){this.Kr=a});w.g(Ud,"newParam",Ud.prototype.Wf);w.defineProperty(Ud,{Wf:"newParam"},function(){return this.Jr},function(a){this.Jr=a}); -function I(a){1=d)return"[]";var e=new xa;e.add("[ ");c&&1b||(w.Ji(this.sf,b),Te(this,"nodeDataArray",ie,"nodeDataArray",this,a,null,b,null),this.hu(a)))}}; -I.prototype.removeNodeDataCollection=function(a){if(w.isArray(a))for(var b=w.vb(a),c=0;cb&&(b=w.vb(a));w.Ii(a,b,c);Te(this,"",he,"",a,null,c,null,b)}; -I.prototype.removeArrayItem=function(a,b){void 0===b&&(b=-1);t&&(w.$s(a,I,"removeArrayItem:arr"),w.p(b,I,"removeArrayItem:idx"));a===this.sf&&w.m("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=w.vb(a)-1);var c=w.jb(a,b);w.Ji(a,b);Te(this,"",ie,"",a,c,null,b,null)};w.g(I,"nodeCategoryProperty",I.prototype.xl); -w.defineProperty(I,{xl:"nodeCategoryProperty"},function(){return this.Lr},function(a){var b=this.Lr;b!==a&&(Ue(a,I,"nodeCategoryProperty"),this.Lr=a,this.j("nodeCategoryProperty",b,a))});I.prototype.getCategoryForNodeData=I.prototype.eA=function(a){if(null===a)return"";var b=this.Lr;if(""===b)return"";b=w.xb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;w.m("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; -I.prototype.setCategoryForNodeData=I.prototype.zx=function(a,b){w.i(b,"string",I,"setCategoryForNodeData:cat");if(null!==a){var c=this.Lr;if(""!==c)if(this.pe(a)){var d=w.xb(a,c);void 0===d&&(d="");d!==b&&(w.Sa(a,c,b),Te(this,"nodeCategory",fe,c,a,d,b))}else w.Sa(a,c,b)}}; -function R(a,b){2e||(w.Ji(d,e),this.Mi(a)&&(Ye(this,b,a),Te(this,"linkLabelKeys",ie,c,a,b,null)))}else void 0!==d&&w.m(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};w.g(R,"linkDataArray",R.prototype.Ui); -w.defineProperty(R,{Ui:"linkDataArray"},function(){return this.Dh},function(a){var b=this.Dh;if(b!==a){w.$s(a,R,"linkDataArray");for(var c=w.vb(a),d=0;db)){w.Ji(this.Dh,b);Te(this,"linkDataArray",ie,"linkDataArray",this,a,null,b,null);b=this.nl(a);Ye(this,b,a);b=this.ql(a);Ye(this,b,a);var c=this.fk(a);if(w.isArray(c))for(var d=w.vb(c),e=0;ea.Ve&&w.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Ve;d&&b&&a.isEnabled&&a.Wc("CommittingTransaction",c,a.Ni);var e=0;if(0a.Ri;e--)g=d.na(e),null!== -g&&g.clear(),d.md(e),a.Vy=!0;e=a.BA;0===e&&(e=1);0=e&&(g=d.na(0),null!==g&&g.clear(),d.md(0),a.Ug--);d.add(b);a.Ug++;d.freeze();g=b}a.Wc("CommittedTransaction",c,g)}else{a.ni=!0;try{a.isEnabled&&null!==g&&(g.hp=!0,g.undo())}finally{a.Wc("RolledBackTransaction",c,g),a.ni=!1}null!==g&&g.clear()}a.Lu=null;return!0}if(a.isEnabled&&!b&&null!==g){a=e;c=g.eh;for(b=c.count-1;b>=a;b--)d=c.na(b),null!==d&&d.undo(),c.Na(),c.md(b);c.freeze()}return!1} -ke.prototype.canUndo=ke.prototype.canUndo=function(){if(!this.isEnabled||0=this.Ve&&!this.Jy&&(a=a.h,null!==a&&!1===a.rf||w.trace("Change not within a transaction: "+c.toString()))}}; -ke.prototype.skipsEvent=function(a){if(null===a||0>a.sd.value)return!0;a=a.object;if(a instanceof P){if(a=a.layer,null!==a&&a.Ac)return!0}else if(a instanceof De&&a.Ac)return!0;return!1};w.A(ke,{sJ:"models"},function(){return this.az.k});w.g(ke,"isEnabled",ke.prototype.isEnabled);w.defineProperty(ke,{isEnabled:"isEnabled"},function(){return this.Xe},function(a){this.Xe=a});w.A(ke,{PG:"transactionToUndo"},function(){return 0<=this.Ri&&this.Ri<=this.history.count-1?this.history.na(this.Ri):null}); -w.A(ke,{OG:"transactionToRedo"},function(){return this.Rib.Cg||(b.scale=a))};qa.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.ku);w.p(a,qa,"canDecreaseZoom:factor");var b=this.h;if(null===b||b.Fm!==Cf)return!1;a*=b.scale;return ab.Cg?!1:b.Ws}; -qa.prototype.increaseZoom=function(a){void 0===a&&(a=this.ku);w.p(a,qa,"increaseZoom:factor");var b=this.h;null!==b&&b.Fm===Cf&&(a*=b.scale,ab.Cg||(b.scale=a))};qa.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.ku);w.p(a,qa,"canIncreaseZoom:factor");var b=this.h;if(null===b||b.Fm!==Cf)return!1;a*=b.scale;return ab.Cg?!1:b.Ws};qa.prototype.resetZoom=function(a){void 0===a&&(a=this.it);w.p(a,qa,"resetZoom:newscale");var b=this.h;null===b||ab.Cg||(b.scale=a)}; -qa.prototype.canResetZoom=function(a){void 0===a&&(a=this.it);w.p(a,qa,"canResetZoom:newscale");var b=this.h;return null===b||ab.Cg?!1:b.Ws};qa.prototype.zoomToFit=function(){var a=this.h;if(null!==a){var b=a.scale,c=a.position;b!==this.LD||isNaN(this.Wy)?(this.Wy=b,this.FC=c.copy(),a.zoomToFit(),a.kf(),this.LD=a.scale):(a.scale=this.Wy,a.position=this.FC)}};qa.prototype.canZoomToFit=function(){var a=this.h;return null===a?!1:a.Ws}; -qa.prototype.collapseTree=function(a){void 0===a&&(a=null);var b=this.h;if(null===b)return!1;try{b.ac("Collapse Tree");var c=new D(S);if(null!==a&&a.Qc)a.collapseTree(),c.add(a);else for(var d=b.selection.k;d.next();){var e=d.value;e instanceof S&&(a=e,a.Qc&&(a.collapseTree(),c.add(a)))}b.Ba("TreeCollapsed",c)}finally{b.ae("Collapse Tree")}}; -qa.prototype.canCollapseTree=function(a){void 0===a&&(a=null);var b=this.h;if(null===b||b.hb)return!1;if(null!==a){if(!a.Qc)return!1;if(0b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.Lf[0])c=a.Lf[0],d=a.Lf[1];else return;this.doCancel();if(a.Vn){a.Ky=!0;a.SC=a.scale;var e=a.Fb,g=a.Eb,h=a.mb.getBoundingClientRect(),k=c.clientX-e/h.width*h.left,l=c.clientY-g/h.height*h.top,c=d,d=c.clientX-e/h.width*h.left-k,g=c.clientY-g/h.height*h.top-l,g=Math.sqrt(d*d+g* -g);a.nD=g;b.preventDefault();b.cancelBubble=!0}else Ff(a)}}; -Qe.prototype.standardPinchZoomMove=function(){var a=this.h;if(null!==a){var b=a.P.event;this.doCancel();Ff(a);var c=null,d=null;if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.Lf[0])c=a.Lf[0],d=a.Lf[1];else return;if(a.Vn&&a.Ky){var e=a.Fb,g=a.Eb,h=a.mb.getBoundingClientRect(),k=c,c=k.clientX-e/h.width*h.left,l=k.clientY-g/h.height*h.top,k=d,d=k.clientX-e/h.width*h.left,g=k.clientY-g/h.height*h.top,h=d-c,e=g-l,h=Math.sqrt(h* -h+e*e)/a.nD,c=new x((Math.min(d,c)+Math.max(d,c))/2,(Math.min(g,l)+Math.max(g,l))/2),l=a.SC*h,d=a.Ab;l!==a.scale&&d.canResetZoom(l)&&(g=a.Ll,a.Ll=c,d.resetZoom(l),a.Ll=g);b.preventDefault();b.cancelBubble=!0}}};Qe.prototype.doKeyDown=function(){var a=this.h;null!==a&&"Esc"===a.P.key&&this.doCancel()};Qe.prototype.doKeyUp=function(){};Qe.prototype.startTransaction=Qe.prototype.ac=function(a){this.mf=null;var b=this.h;return null===b?!1:b.ac(a)}; -Qe.prototype.stopTransaction=Qe.prototype.jk=function(){var a=this.h;return null===a?!1:null===this.mf?a.Lp():a.ae(this.mf)}; -Qe.prototype.standardMouseSelect=function(){var a=this.h;if(null!==a&&a.Ee){var b=a.P,c=a.ot(b.ga,!1);if(null!==c)if(w.Xm?b.xp:b.control){a.Ba("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Va;null!==b&&(b.Za=!b.Za);a.Ba("ChangedSelection")}else if(b.shift){if(!c.Za){a.Ba("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Va;null!==b&&(b.Za=!0);a.Ba("ChangedSelection")}}else{if(!c.Za){for(b=c;null!==b&&!b.canSelect();)b=b.Va;null!==b&&a.select(b)}}else!b.left||(w.Xm?b.xp:b.control)|| -b.shift||a.pw()}};Qe.prototype.standardMouseClick=function(a,b){void 0===a&&(a=null);void 0===b&&(b=function(a){return!a.layer.Ac});var c=this.h;if(null!==c){var d=c.P,e=c.re(d.ga,a,b);d.ie=e;Gf(e,d,c)}}; -function Gf(a,b,c){var d=0;b.left?d=1===b.Je?1:2===b.Je?2:1:b.right&&1===b.Je&&(d=3);var e="";if(null!==a){switch(d){case 1:e="ObjectSingleClicked";break;case 2:e="ObjectDoubleClicked";break;case 3:e="ObjectContextClicked"}0!==d&&c.Ba(e,a)}else{switch(d){case 1:e="BackgroundSingleClicked";break;case 2:e="BackgroundDoubleClicked";break;case 3:e="BackgroundContextClicked"}0!==d&&c.Ba(e)}if(null!==a)for(b.Oc=!1;null!==a;){c=null;switch(d){case 1:c=a.click;break;case 2:c=a.Pm?a.Pm:a.click;break;case 3:c= -a.ft}if(null!==c&&(c(b,a),b.Oc))break;a=a.U}else{a=null;switch(d){case 1:a=c.click;break;case 2:a=c.Pm?c.Pm:c.click;break;case 3:a=c.ft}null!==a&&a(b)}} -Qe.prototype.standardMouseOver=function(){var a=this.h;if(null!==a){var b=a.P;if(null!==b.h&&!0!==a.Pb.pd){var c=a.$a;a.$a=!0;var d=a.re(b.ga,null,null);b.ie=d;var e=!1;if(d!==a.Cn){var g=a.Cn,h=g;a.Cn=d;this.doCurrentObjectChanged(g,d);for(b.Oc=!1;null!==g;){var k=g.EA;if(null!==k){if(d===g)break;if(null!==d&&d.sl(g))break;k(b,g,d);e=!0;if(b.Oc)break}g=g.U}g=h;for(b.Oc=!1;null!==d;){k=d.DA;if(null!==k){if(g===d)break;if(null!==g&&g.sl(d))break;k(b,d,g);e=!0;if(b.Oc)break}d=d.U}d=a.Cn}if(null!==d){g= -d;for(k="";null!==g;){k=g.cursor;if(""!==k)break;g=g.U}a.Yb=k;b.Oc=!1;for(g=d;null!==g;){k=g.Jt;if(null!==k&&(k(b,g),e=!0,b.Oc))break;g=g.U}}else a.Yb="",k=a.Jt,null!==k&&(k(b),e=!0);e&&a.Se();a.$a=c}}};Qe.prototype.doCurrentObjectChanged=function(){}; -Qe.prototype.standardMouseWheel=function(){var a=this.h;if(null!==a){var b=a.P,c=b.Yj;if(0!==c&&a.Hd.J()){var d=a.Ab,e=a.tb.Dp;if((e===Hf&&!b.shift||e===If&&b.control)&&(0e||Math.abs(b.y-a.y)>d};w.A(Qe,{h:"diagram"},function(){return this.Y}); -w.g(Qe,"name",Qe.prototype.name);w.defineProperty(Qe,{name:"name"},function(){return this.Xb},function(a){w.i(a,"string",Qe,"name");this.Xb=a});w.g(Qe,"isEnabled",Qe.prototype.isEnabled);w.defineProperty(Qe,{isEnabled:"isEnabled"},function(){return this.Xe},function(a){w.i(a,"boolean",Qe,"isEnabled");this.Xe=a});w.g(Qe,"isActive",Qe.prototype.qa);w.defineProperty(Qe,{qa:"isActive"},function(){return this.rC},function(a){w.i(a,"boolean",Qe,"isActive");this.rC=a});w.g(Qe,"transactionResult",Qe.prototype.mf); -w.defineProperty(Qe,{mf:"transactionResult"},function(){return this.FD},function(a){null!==a&&w.i(a,"string",Qe,"transactionResult");this.FD=a}); -function Bf(){0e&&(e=k),l>g&&(g=l))}}Infinity===c?b.o(0,0,0,0):b.o(c,d,e-c,g-d)} -function pg(a,b){if(null===a.mc){var c=a.h;if(!(null===c||b&&(c.hb||c.ff))&&null!==a.Zb){var d=c.ka;d.isEnabled&&d.jF?null!==d.Ni&&0c.oa)){var d=a.h;if(null!==d&&!d.hb&&(d=a.xi,null!==d)){var e=null,g=null;null===c.Z&&(e=Fg(a,c.n(0),!1),null!==e&&(g=e.V));var h=null,k=null;null===c.da&&(h=Fg(a,c.n(c.oa-1),!0),null!==h&&(k=h.V));var l=d.isValidLink(g,e,k,h);b?(c.Gn=c.n(0).copy(),c.Kn=c.n(c.oa-1).copy(),c.Up=!1,c.Z=g,null!==e&&(c.Rf=e.wd),c.da=k,null!==h&&(c.Og=h.wd)):l?Gg(d,g,e,k,h):Gg(d,null,null,null,null)}}}Bf.prototype.doDragOver=function(){}; -function Hg(a,b){var c=a.h;if(null!==c){a.Rh&&Bg(a,!0);fg(a);var d=Cg(c,b,null,function(b){return!zg(a,b)}),e=c.P;e.ie=d;if(null!==d){e.Oc=!1;for(var g=d;null!==g;){var h=g.Gt;if(null!==h&&(h(e,g),e.Oc))break;g=Eg(g)}}else h=c.Gt,null!==h&&h(e);if(a.qa||null!==Lf)if(a.doDropOnto(b,d),a.qa||null!==Lf)for(d=c.selection.k;d.next();)e=d.value,e instanceof S&&Ig(c,e.ea)}}Bf.prototype.doDropOnto=function(){}; -Bf.prototype.doMouseMove=function(){if(this.qa){var a=this.h;if(null!==a&&null!==this.Qo&&null!==this.Zb){var b=!1,c=!1;this.mayCopy()?(b=!0,a.Yb="copy",pg(this,!1),Kf(this,this.mc),qg(this,this.mc,!1),gg(this,this.mc)):this.mayMove()?(c=!0,a.Yb="default",jg(this),qg(this,this.Zb,!0)):this.mayDragOut()?(a.Yb="no-drop",pg(this,!1),qg(this,this.mc,!1)):jg(this);Ag(this,a.P.ga,c,b)}}}; -Bf.prototype.doMouseUp=function(){if(this.qa){var a=this.h;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.mc?(jg(this),pg(this,!0),Kf(this,this.mc),qg(this,this.mc,!1),gg(this,this.mc),null!==this.mc&&a.oG(this.mc.Yi())):(b=!0,jg(this),this.mayMove()&&(qg(this,this.Zb,!0),this.Pv=!1,Ag(this,a.P.ga,!0,!1),this.Pv=!0));this.Cq=!0;Hg(this,a.P.ga);if(this.qa){this.mc=null;if(b&&null!==this.Zb)for(b=this.Zb.k;b.next();){var d=b.key;d instanceof S&&(d=d.Va,null===d||null===d.placeholder||this.Zb.contains(d)|| -d.Uz&&d.T())}a.oc();gg(this,this.Zb);this.mf=c?"Copy":"Move";a.Ba(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};Bf.prototype.mayCopy=function(){if(!this.rA)return!1;var a=this.h;if(null===a||a.hb||a.ff||!a.Bm||!a.Oh||(w.Xm?!a.P.alt:!a.P.control))return!1;for(a=a.selection.k;a.next();){var b=a.value;if(b.Kd()&&b.canCopy())return!0}return null!==this.Nc&&this.Rh&&this.Nc.canCopy()?!0:!1}; -Bf.prototype.mayDragOut=function(){if(!this.rA)return!1;var a=this.h;if(null===a||!a.Vs||!a.Oh||a.Gi)return!1;for(a=a.selection.k;a.next();){var b=a.value;if(b.Kd()&&b.canCopy())return!0}return null!==this.Nc&&this.Rh&&this.Nc.canCopy()?!0:!1};Bf.prototype.mayMove=function(){var a=this.h;if(null===a||a.hb||!a.Gi)return!1;for(a=a.selection.k;a.next();){var b=a.value;if(b.Kd()&&b.canMove())return!0}return null!==this.Nc&&this.Rh&&this.Nc.canMove()?!0:!1};var hg=new D(Bf),Lf=null,Mf=null; -Bf.prototype.mayDragIn=function(){var a=this.h;if(null===a||!a.Kz||a.hb||a.ff||!a.Bm)return!1;var b=Lf;return null===b||b.h.fa.Wj!==a.fa.Wj?!1:!0};Bf.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.h;a.Pb.Xi();Jg(a);a=Lf;null!==a&&(a.h.Yb="copy")}};Bf.prototype.doSimulatedDragLeave=function(){var a=Lf;null!==a&&a.doSimulatedDragOut();this.doCancel()}; -Bf.prototype.doSimulatedDragOver=function(){var a=this.h;if(null!==a){var b=Lf;null!==b&&null!==b.Zb&&this.mayDragIn()&&(a.Yb="copy",Kg(this,b.Zb.Yi(),!1),qg(this,this.mc,!1),Ag(this,a.P.ga,!1,!0))}}; -Bf.prototype.doSimulatedDrop=function(){var a=this.h;if(null!==a){var b=Lf;null!==b&&(b.Cq=!0,jg(this),this.mayDragIn()&&(this.ac("Drop"),Kg(this,b.Zb.Yi(),!0),qg(this,this.mc,!1),null!==this.mc&&a.oG(this.mc.Yi()),this.mf="ExternalCopy",Hg(this,a.P.ga),a.oc(),this.mc=null,a.focus(),a.Ba("ExternalObjectsDropped",a.selection),this.jk()))}}; -function Kg(a,b,c){if(null===a.mc){var d=a.h;if(null!==d&&!d.hb&&!d.ff){d.$a=!c;d.sn=!c;a.Wi=d.P.ga;d=d.Oo(b,d,!0);c=w.$f();og(b,c);var e=c.x+c.width/2,g=c.y+c.height/2;w.nc(c);var h=a.Rv;c=new ia(H);var k=w.M();for(b=b.k;b.next();){var l=b.value;if(l.Kd()&&l.canCopy()){var m=l.location,l=d.Aa(l);k.o(h.x-(e-m.x),h.y-(g-m.y));l.location=k;l.vf();c.add(l,Pf(k))}}w.B(k);for(d=d.k;d.next();)e=d.value,e instanceof U&&e.canCopy()&&c.add(e,Pf());a.mc=c;Jf(a,c.Yi());null!==a.Nc&&(c=a.Nc,d=c.gn,c.wl(a.Wi.x- -(d.x+d.width/2),a.Wi.y-(d.y+d.height/2)))}}}Bf.prototype.doSimulatedDragOut=function(){var a=this.h;null!==a&&(this.mayCopy()||this.mayMove()?a.Yb="":a.Yb="no-drop")};function dg(a){this.point=a;this.yG=J.nk}w.ja("DraggingInfo",dg);function rg(a,b,c){this.Cc=a;this.info=b;this.QI=c} -function Lg(){0=d&&(d=.1);for(var e=this,g=b.Qm(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,g=g.k;g.next();){var h=g.value,k=h.V;if(k instanceof S){var l=h.qb(Ob,w.M()),m=c.x-l.x,n=c.y-l.y;w.B(l);l=m*m+n*n;lc){if(null!==this.pc&&a===this.Hg&&b===this.Ig)return!0;var d=b.wd;null===d&&(d="");if(a.Iw(d).count>=c)return!1}return!0}; -Lg.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.Ym;if(this.h.Wa===this&&(null!==a.layer&&!a.layer.Cm||!0!==b.qB))return!1;var c=b.KG;if(Infinity>c){if(null!==this.pc&&a===this.Jg&&b===this.Kg)return!0;var d=b.wd;null===d&&(d="");if(a.wg(d).count>=c)return!1}return!0};Lg.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.V,d=b.V;return null!==c&&c===d}; -Lg.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.V;if(!(c instanceof S))return!1;var d=a.wd;null===d&&(d="");var e=b.V;if(!(e instanceof S))return!1;var g=b.wd;null===g&&(g="");for(e=e.wg(g);e.next();)if(g=e.value,g.Z===c&&g.Rf===d)return!0;return!1}; -Lg.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.LE&&d.JG||!this.isInSameNode(b,d))&&(b.KE&&d.IG||!this.isLinked(b,d)))||null!==this.pc&&(null!==a&&this.isLabelDependentOnLink(a,this.pc)||null!==c&&this.isLabelDependentOnLink(c,this.pc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.pc))return!1;if(null!==a){var e=a.tp;if(null!==e&&!e(a,b,c,d,this.pc))return!1}if(null!== -c&&(e=c.tp,null!==e&&!e(a,b,c,d,this.pc)))return!1;e=this.tp;return null!==e?e(a,b,c,d,this.pc):!0};Lg.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Md;if(null===c)return!1;if(c===b)return!0;var d=new F(S);d.add(a);return Mg(this,c,b,d)};function Mg(a,b,c,d){if(b===c)return!0;var e=b.Z;if(null!==e&&e.zf&&(d.add(e),Mg(a,e.Md,c,d)))return!0;b=b.da;return null!==b&&b.zf&&(d.add(b),Mg(a,b.Md,c,d))?!0:!1} -Lg.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.Ym;var d=this.h.YG;if(d!==Ng){if(d===Og){if(null!==c&&!c.Bc)return!0;for(d=b.ve;d.next();){var e=d.value;if(e!==c&&e.Bc&&e.da===b)return!1}return!Xg(this,a,b,c,!0)}if(d===Yg){if(null!==c&&!c.Bc)return!0;for(d=a.ve;d.next();)if(e=d.value,e!==c&&e.Bc&&e.Z===a)return!1;return!Xg(this,a,b,c,!0)}if(d===Zg)return a===b?a=!0:(d=new F(S),d.add(b),a=$g(this,d,a,b,c)),!a;if(d===ah)return!Xg(this,a,b,c,!1);if(d=== -bh)return a===b?a=!0:(d=new F(S),d.add(b),a=ch(this,d,a,b,c)),!a}return!0};function Xg(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var g=b.ve;g.next();){var h=g.value;if(h!==d&&(!e||h.Bc)&&h.da===b&&(h=h.Z,h!==b&&Xg(a,h,c,d,e)))return!0}return!1}function $g(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.ve;g.next();){var h=g.value;if(h!==e&&h.da===c&&(h=h.Z,h!==c&&$g(a,b,h,d,e)))return!0}return!1} -function ch(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.ve;g.next();){var h=g.value;if(h!==e){var k=h.Z,h=h.da,k=k===c?h:k;if(k!==c&&ch(a,b,k,d,e))return!0}}return!1}w.g(Lg,"linkValidation",Lg.prototype.tp);w.defineProperty(Lg,{tp:"linkValidation"},function(){return this.Pk},function(a){null!==a&&w.i(a,"function",Lg,"linkValidation");this.Pk=a});w.g(Lg,"portTargeted",Lg.prototype.Pt); -w.defineProperty(Lg,{Pt:"portTargeted"},function(){return this.cD},function(a){null!==a&&w.i(a,"function",Lg,"portTargeted");this.cD=a});function ra(){0b.qt+1&&c=a.x)c=0>=a.y?c+225:1<=a.y?c+135:c+180;else if(1<=a.x)0>=a.y?c+=315:1<=a.y&&(c+=45);else if(0>=a.y)c+=270;else if(1<=a.y)c+=90;else break a;0>c?c+=360:360<=c&&(c-=360);b.cursor=22.5>c?"e-resize":67.5>c?"se-resize":112.5>c?"s-resize":157.5>c?"sw-resize":202.5>c?"w-resize":247.5>c?"nw-resize":292.5>c?"n-resize":337.5>c?"ne-resize":"e-resize"}else if(b instanceof z)for(b=b.elements;b.next();)vh(a, -b.value,c)}w.defineProperty(uh,{st:"handleArchetype"},function(){return this.Hk},function(a){null!==a&&w.l(a,P,uh,"handleArchetype");this.Hk=a});w.A(uh,{handle:"handle"},function(){return this.cc});w.defineProperty(uh,{wc:"adornedObject"},function(){return this.Jb},function(a){null!==a&&w.l(a,P,uh,"adornedObject");this.Jb=a});uh.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.h;return null!==a&&!a.hb&&a.Dm&&a.P.left?null!==this.findToolHandleAt(a.xc.ga,this.name)?!0:!1:!1}; -uh.prototype.doActivate=function(){var a=this.h;null!==a&&(this.cc=this.findToolHandleAt(a.xc.ga,this.name),null!==this.cc&&(this.Jb=this.cc.V.wc,this.ez.set(this.Jb.V.location),this.Dv.set(this.Jb.ya),this.Gy=this.computeCellSize(),this.Iy=this.computeMinSize(),this.Hy=this.computeMaxSize(),a.te=!0,this.QC=a.Pb.isEnabled,a.Pb.isEnabled=!1,this.ac(this.name),this.qa=!0))};uh.prototype.doDeactivate=function(){var a=this.h;null!==a&&(this.jk(),this.Jb=this.cc=null,this.qa=a.te=!1,a.Pb.isEnabled=this.QC)}; -uh.prototype.doCancel=function(){this.Jb.ya=this.Dv;this.Jb.V.location=this.ez;this.stopTool()};uh.prototype.doMouseMove=function(){var a=this.h;if(this.qa&&null!==a){var b=this.Iy,c=this.Hy,d=this.Gy,e=this.Jb.PE(a.P.ga,w.M()),g=yh;this.Jb instanceof W&&(g=zh(this.Jb));b=this.computeResize(e,this.cc.alignment,b,c,d,!(g===Jh||g===Kh||a.P.shift));this.resize(b);a.kf();w.B(e)}}; -uh.prototype.doMouseUp=function(){var a=this.h;if(this.qa&&null!==a){var b=this.Iy,c=this.Hy,d=this.Gy,e=this.Jb.PE(a.P.ga,w.M()),g=yh;this.Jb instanceof W&&(g=zh(this.Jb));b=this.computeResize(e,this.cc.alignment,b,c,d,!(g===Jh||g===Kh||a.P.shift));this.resize(b);w.B(e);a.oc();this.mf=this.name;a.Ba("PartResized",this.Jb,this.Dv)}this.stopTool()}; -uh.prototype.resize=function(a){if(null!==this.h){var b=this.wc,c=b.V,d=b.ml(),e=b.Qi(),g=Math.PI*d/180,h=Math.cos(g),g=Math.sin(g),k=0d?1:0,l=90d?1:0,d=180d?1:0,m=b.Ka.width,n=b.Ka.height;b.ya=a.size;var p=c.position.copy();c.vf();m=b.Ka.width-m;n=b.Ka.height-n;if(0!==m||0!==n)0!==m&&(p.x+=e*((a.x+m*l)*h-(a.y+n*k)*g)),0!==n&&(p.y+=e*((a.x+m*d)*g+(a.y+n*l)*h)),c.move(p)}}; -uh.prototype.computeResize=function(a,b,c,d,e,g){b.ue()&&(b=Ob);var h=this.wc.Ka,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=w.M();J.nt(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)));w.B(q);return a};uh.prototype.computeMinSize=function(){var a=this.wc.Re.copy(),b=this.Re;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; -uh.prototype.computeMaxSize=function(){var a=this.wc.Pd.copy(),b=this.Pd;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.CG),180),c=Math.min(Math.abs(this.BG),b/2);!this.h.P.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};w.g(Lh,"snapAngleMultiple",Lh.prototype.CG);w.defineProperty(Lh,{CG:"snapAngleMultiple"},function(){return this.lD},function(a){w.i(a,"number",Lh,"snapAngleMultiple");this.lD=a}); -w.g(Lh,"snapAngleEpsilon",Lh.prototype.BG);w.defineProperty(Lh,{BG:"snapAngleEpsilon"},function(){return this.kD},function(a){w.i(a,"number",Lh,"snapAngleEpsilon");this.kD=a});w.g(Lh,"originalAngle",Lh.prototype.wJ);w.A(Lh,{wJ:"originalAngle"},function(){return this.Cv});function Nh(){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.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b} -gf.prototype.prepareAnimation=gf.prototype.zl=function(){this.Xe&&(this.nj&&this.Xi(),this.pd=!0,this.KB=!1)};function ni(a){a.Xe&&requestAnimationFrame(function(){!1===a.pd||a.nj||(a.Y.ym=1,oi(a.Y),a.pd=!1,a.Y.Ba("AnimationStarting"),pi(a))})} -function qi(a,b,c,d,e){if(a.pd&&(t&&w.l(b,P,gf,"addPropToAnimation:obj"),!(b instanceof H)||b.oA)){var g=a.no;if(g.contains(b)){b=g.Aa(b);a=b.start;var h=b.end;void 0===a[c]&&(a[c]=ri(d));h[c]=ri(e)}else a=new na,h=new na,a[c]=ri(d),h[c]=ri(e),g.add(b,new mi(a,h))}}function ri(a){return a instanceof x?a.copy():a instanceof fa?a.copy():a} -function pi(a){var b;void 0===b&&(b=new na);var c=a.Y;if(null!==c)if(0===a.no.count)a.nj=!1,si(c,!1),c.kf();else{a.nj=!0;var d=b.AK||a.mH,e=b.OK||null,g=b.PK||null,h=b.duration||a.Dy;b=a.vH;for(var k=a.no.k;k.next();){var l=k.value.start.position;l instanceof x&&(l.J()||l.assign(b))}a.WB=d;a.Iu=e;a.Ju=g;a.sy=h;var m=a.lH=a.no;ti(a);ui(a,c,m,d,0,h,null!==a.Vl&&null!==a.Ul);Jg(a.Y);vi(a);requestAnimationFrame(function(b){var e=b||+new Date,g=e+h;(function s(b){if(!1!==a.nj){b=b||+new Date;var k=b>g? -h:b-e;ti(a);ui(a,c,m,d,k,h,null!==a.Vl&&null!==a.Ul);a.Iu&&a.Iu();Jg(c);vi(a);b>g?wi(a):requestAnimationFrame(s)}})(e)})}}var xi={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.vG(d(e,b.x,c.x-b.x,g),d(e,b.y,c.y-b.y,g)):a.position=new x(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 ti(a){if(!a.cr){var b=a.Y;a.GD=b.$a;a.LB=b.du;a.MB=b.Rp;b.$a=!0;b.du=!0;b.Rp=!0;a.cr=!0}}function vi(a){var b=a.Y;b.$a=a.GD;b.du=a.LB;b.Rp=a.MB;a.cr=!1}function ui(a,b,c,d,e,g,h){for(c=c.k;c.next();){var k=c.key,l=c.value,m=l.start,l=l.end,n;for(n in l)if(void 0!==xi[n])xi[n](k,m[n],l[n],d,e,g)}h&&(h=a.Vl,a=a.Ul,n=a.y-h.y,a=d(e,h.x,a.x-h.x,g),d=d(e,h.y,n,g),e=b.Vw,b.Vw=!0,b.position=new x(a,d),b.Vw=e)} -gf.prototype.stopAnimation=gf.prototype.Xi=function(){!0===this.pd&&(this.pd=!1,this.KB&&this.Y.Se());this.nj&&this.Xe&&(ti(this),ui(this,this.Y,this.lH,this.WB,this.sy,this.sy,null!==this.Vl&&null!==this.Ul),vi(this),wi(this))};function wi(a){a.nj=!1;a.Vl=null;a.Ul=null;a.no=new ia(P,mi);ti(a);for(var b=a.Y.links;b.next();){var c=b.value;null!==c.ro&&(c.points=c.ro,c.ro=null)}b=a.Y;si(b,!1);b.oc();b.kf();yi(b);vi(a);a.Ju&&a.Ju();a.Ju=null;a.Iu=null;b.Ba("AnimationFinished")} -function zi(a,b,c){var d=b.ea,e=c.ea,g=null;c instanceof T&&(g=c.placeholder);null!==g?(c=g.qb(Ab),c.x+=g.padding.left,c.y+=g.padding.top,qi(a,b,"position",c,b.position)):qi(a,b,"position",new x(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position);qi(a,b,"opacity",.01,b.opacity)}function Ai(a,b,c){a.pd&&(null===a.Vl&&b.J()&&null===a.Ul&&(a.Vl=b.copy()),a.Ul=c.copy())}w.g(gf,"isEnabled",gf.prototype.isEnabled); -w.defineProperty(gf,{isEnabled:"isEnabled"},function(){return this.Xe},function(a){w.i(a,"boolean",gf,"isEnabled");this.Xe=a});w.g(gf,"duration",gf.prototype.duration);w.defineProperty(gf,{duration:"duration"},function(){return this.Dy},function(a){w.i(a,"number",gf,"duration");1>a&&w.la(a,">= 1",gf,"duration");this.Dy=a});w.A(gf,{fh:"isAnimating"},function(){return this.nj});w.A(gf,{DK:"isTicking"},function(){return this.cr});function mi(a,b){this.start=a;this.end=b} -function De(){0=a)return b;for(var c=0,d=0,e=0,g=0,h=0,k=this.Hb.k;k.next();){var l=k.value;l instanceof T?e++:l instanceof S?d++:l instanceof U?g++:l instanceof tf?h++:c++}k="";0=d.count)a=d.count;else if(d.na(a)===b)return-1;d.ce(a,b);b.ut(c);d=this.h;null!==d&&(c?d.pa():d.fp(b));b instanceof T&&this.Ex(b);return a};f.ef=function(a,b,c){var d=this.Hb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.na(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.vt(c);d.md(a);d=this.h;null!==d&&(c?d.pa():d.ef(b));b.lv=null;return a}; -f.Ex=function(a){for(;null!==a;){if(a.layer===this){var b=a;if(0!==b.Rc.count){for(var c=-1,d=-1,e=this.Hb.q,g=e.length,h=0;hd&&k.Va===b&&(d=h,0<=c))break}!(0>d)&&da||1=a)return b;for(var c=this.dc.k;c.next();)b+="\n "+c.value.toString(a-1);return b};C.prototype.checkProperties=function(){return w.check(this)};C.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.Y instanceof C?b.Y:null};w.g(C,"div",C.prototype.$j); -w.defineProperty(C,{$j:"div"},function(){return this.Nb},function(a){null!==a&&w.l(a,HTMLDivElement,C,"div");if(this.Nb!==a){Ui=[];var b=this.Nb;null!==b?(b.Y=void 0,b.innerHTML="",null!==this.mb&&(this.mb.removeEventListener("touchstart",this.NG,!1),this.mb.removeEventListener("touchmove",this.MG,!1),this.mb.removeEventListener("touchend",this.LG,!1),this.mb.Jd.Y=null),b=this.tb,null!==b&&(b.lf.each(function(a){a.cancelWaitAfter()}),b.Uf.each(function(a){a.cancelWaitAfter()}),b.Vf.each(function(a){a.cancelWaitAfter()})), -b.cancelWaitAfter(),this.Wa.doCancel(),this.Sg=this.mb=null,window.removeEventListener("resize",this.$G,!1),window.removeEventListener("mousemove",this.Ap,!0),window.removeEventListener("mousedown",this.zp,!0),window.removeEventListener("mouseup",this.Cp,!0),window.removeEventListener("mousewheel",this.hh,!0),window.removeEventListener("DOMMouseScroll",this.hh,!0),window.removeEventListener("mouseout",this.Bp,!0)):this.rf=!1;this.Nb=null;if(null!==a){if(b=a.Y)b.$j=null;cj(this,a);this.RA()}}}); -function fj(a){var b=a.mb;b.addEventListener("touchstart",a.NG,!1);b.addEventListener("touchmove",a.MG,!1);b.addEventListener("touchend",a.LG,!1);b.addEventListener("mousemove",a.Ap,!1);b.addEventListener("mousedown",a.zp,!1);b.addEventListener("mouseup",a.Cp,!1);b.addEventListener("mousewheel",a.hh,!1);b.addEventListener("DOMMouseScroll",a.hh,!1);b.addEventListener("mouseout",a.Bp,!1);b.addEventListener("keydown",a.hJ,!1);b.addEventListener("keyup",a.iJ,!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.tb.Tm===ii&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.EJ,!1);b.addEventListener("pointermove",a.GJ,!1);b.addEventListener("pointerleave",a.FJ,!1);window.addEventListener("resize",a.$G,!1)}function si(a,b){a.ym=null;b&&a.SF()} -C.prototype.computePixelRatio=function(){if(null!==this.ym)return this.ym;var a=this.Sg;return(window.devicePixelRatio||1)/(a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1)};C.prototype.doMouseMove=function(){this.Wa.doMouseMove()};C.prototype.doMouseDown=function(){this.Wa.doMouseDown()};C.prototype.doMouseUp=function(){this.Wa.doMouseUp()};C.prototype.doMouseWheel=function(){this.Wa.doMouseWheel()}; -C.prototype.doKeyDown=function(){this.Wa.doKeyDown()};C.prototype.doKeyUp=function(){this.Wa.doKeyUp()};function oi(a){if(null!==a.mb){var b=a.Nb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Jk?a.Fd:0,d=a.Ik?a.Fd:0,e=a.tf;a.tf=a.computePixelRatio();a.tf!==e&&(a.Sq=!0,a.Se());if(b.clientWidth!==a.Fb+c||b.clientHeight!==a.Eb+d)a.Wl=!0,a.Sd=!0,b=a.Lb,null!==b&&b.Ct&&b.K(),a.Bd||a.Se()}}}C.prototype.focus=C.prototype.focus=function(){this.mb&&this.mb.focus()}; -function gj(a,b,c){void 0===b&&(b=a.Sg);void 0===c&&(c=!0);c&&(b.nu="");b.qn="";b.pn=""}function $i(a){var b=new De;b.name="Background";a.Ss(b);b=new De;b.name="";a.Ss(b);b=new De;b.name="Foreground";a.Ss(b);b=new De;b.name="Adornment";b.Ac=!0;a.Ss(b);b=new De;b.name="Tool";b.Ac=!0;b.pA=!0;a.Ss(b);b=new De;b.name="Grid";b.Ee=!1;b.Cf=!1;b.Ac=!0;a.HH(b,a.mt("Background"))} -function hj(a){a.ed=new z(ij);a.ed.name="GRID";var b=new W;b.Bb="LineH";b.stroke="lightgray";b.ib=.5;b.interval=1;a.ed.add(b);b=new W;b.Bb="LineH";b.stroke="gray";b.ib=.5;b.interval=5;a.ed.add(b);b=new W;b.Bb="LineH";b.stroke="gray";b.ib=1;b.interval=10;a.ed.add(b);b=new W;b.Bb="LineV";b.stroke="lightgray";b.ib=.5;b.interval=1;a.ed.add(b);b=new W;b.Bb="LineV";b.stroke="gray";b.ib=.5;b.interval=5;a.ed.add(b);b=new W;b.Bb="LineV";b.stroke="gray";b.ib=1;b.interval=10;a.ed.add(b);b=new H;b.add(a.ed); -b.hf="Grid";b.Xw=!1;b.oA=!1;b.Cf=!1;b.kx="GRID";a.add(b);a.Hb.remove(b);a.ed.visible=!1} -C.prototype.RC=function(){if(this.Y.isEnabled){var a=this.Y;if(a.kz&&null!==a.mb){a.Jv=!0;var b=a.Hd,c=a.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=a.scale;if(el&&(a.position= -new x(-(a.Ej.scrollWidth-a.Fb)+this.scrollLeft-a.Fb/r+a.Hd.right,a.position.y))),this.hD&&a.Fe&&(bn&&(a.position=new x(a.position.x,-(a.Fj.scrollHeight-a.Eb)+this.scrollTop-a.Eb/r+a.Hd.bottom))),w.B(s),jj(a),a.Jv=!1,a.Wl=!1,b=a.Hd,c=a.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&&(a.lz.style.width="1px"),h>=g&&b>=c&&m<=n&&(a.mz.style.height="1px")}}else kj(this.Y)}; -C.prototype.Bv=function(){this.Y.isEnabled?this.Y.kz=!0:kj(this.Y)};C.prototype.computeBounds=C.prototype.tg=function(){0c&&(e=c),ea.Cg&&(e=a.Cg),e):b===sj?(e=l>k?(h-a.Fd)/d:(g-a.Fd)/e,e>c&&(e=c),ea.Cg&&(e=a.Cg),e):a.scale}C.prototype.zoomToFit=C.prototype.zoomToFit=function(){this.scale=oj(this,rj)}; -C.prototype.zoomToRect=function(a,b){void 0===b&&(b=rj);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===rj||b===sj)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.Fb,g=this.Eb,e=b===sj?g/d>e/c?(g-(this.Ik?this.Fd:0))/d:(e-(this.Jk?this.Fd:0))/c:Math.min(g/d,e/c);this.scale=e;this.position=new x(a.x,a.y)}};w.g(C,"isAligning",C.prototype.Vw); -w.defineProperty(C,{Vw:null},function(){return this.yc},function(a){this.yc=a});C.prototype.alignDocument=function(a,b){this.mi&&qj(this,this.tg());var c=this.Hd,d=this.ub,e=this.yc;this.yc=!0;this.position=new x(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));this.yc=e;this.pa()}; -function pj(a,b,c,d,e,g,h){var k=b.x,l=b.y;if(h||a.dB===Vi)g.kd()&&(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.cB,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lc.touches.length)&&c.preventDefault();c.cancelBubble=!0;return!1} -C.prototype.hJ=function(a){if(!this.Y.isEnabled)return!1;var b=this.Y.Sb;uj(this.Y,this.Y,a,b,!1);b.key=String.fromCharCode(a.which);b.ak=!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.Y.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?yj(this.Y,b,a):(a.cancelBubble=!0,a.preventDefault(),a.stopPropagation(),!1)}; -C.prototype.iJ=function(a){if(!this.Y.isEnabled)return!1;var b=this.Y.Sb;uj(this.Y,this.Y,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.Y.doKeyUp(); -return yj(this.Y,b,a)};C.prototype.Lq=function(a){var b=this.mb;if(null===b)return new x(0,0);var c=this.Fb,d=this.Eb,b=b.getBoundingClientRect(),c=a.clientX-c/b.width*b.left;a=a.clientY-d/b.height*b.top;return null!==this.Yd?(a=new x(c,a),Xa(a,this.Yd),a):new x(c,a)}; -function vj(a,b,c){var d=a.mb,e=a.Fb,g=a.Eb,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.We.o(h,k);null!==a.Yd?(b=w.ic(h,k),a.Yd.Th(b),c.ga.assign(b),w.B(b)):c.ga.o(h,k)}C.prototype.invalidateDocumentBounds=C.prototype.oc=function(){this.mi||(this.mi=!0,this.Se())};function yi(a){a.Bd||lj(a);a.mi&&qj(a,a.tg());for(a=a.jm.k;a.next();)yi(a.value)} -C.prototype.redraw=C.prototype.RA=function(){this.yc||this.Bd||(this.pa(),zj(this),jj(this),this.oc(),this.kf())};C.prototype.isUpdateRequested=function(){return this.Mf};C.prototype.delayInitialization=C.prototype.AI=function(a){void 0===a&&(a=null);var b=this.Pb,c=b.isEnabled;b.Xi();b.isEnabled=!1;Jg(this);this.rf=!1;b.isEnabled=c;null!==a&&w.setTimeout(a,1)}; -C.prototype.requestUpdate=C.prototype.Se=function(a){void 0===a&&(a=!1);if(!0!==this.Mf&&!(this.yc||!1===a&&this.Bd)){this.Mf=!0;var b=this;requestAnimationFrame(function(){b.Mf&&b.kf()})}};C.prototype.maybeUpdate=C.prototype.kf=function(){if(!this.Rn||this.Mf)this.Rn&&(this.Rn=!1),Jg(this)};function Aj(a,b){a.yc||!a.Wl||kj(a)||(b&&lj(a),nj(a,!1))} -function Jg(a){if(!a.Bd&&(a.Mf=!1,null!==a.Nb)){a.Bd=!0;var b=a.bi,c=!1,d=!1;b.fh&&(d=!0,c=a.$a,a.$a=!0);b.pd||oi(a);Aj(a,!1);null!==a.ed&&(a.ed.visible&&!a.Wu&&(Bj(a),a.Wu=!0),!a.ed.visible&&a.Wu&&(a.Wu=!1));lj(a);0!==a.Tl.count&&(Cj(a),lj(a));var e=!1;if(!a.rf||a.xu)a.rf?Dj(a,!a.Nu):(a.ac("Initial Layout"),!1===b.isEnabled&&b.Xi(),Dj(a,!1)),e=!0;a.Nu=!1;lj(a);a.pz||b.fh||yi(a);e&&(a.rf||(b=a.dc.q,a.Ef(b,b.length,a),Ej(a),Bj(a)),a.Ba("LayoutCompleted"));lj(a);Aj(a,!0);e&&!a.rf&&(a.rf=!0,a.ae("Initial Layout"), -a.$a||a.ka.clear(),w.setTimeout(function(){a.gh=!1},1));a.bf();d&&(a.$a=c);a.Bd=!1}}function Ej(a){if(a.Lk!==Cf)a.scale=oj(a,a.Lk);else if(a.Ml!==Cf)a.scale=oj(a,a.Ml);else{var b=a.cF;isFinite(b)&&0b;b++){var c=a.fg.k;if(null===c||0===a.fg.count)break;a.fg=new F(P);var d=a,e=a.fg;for(c.reset();c.next();){var g=c.value;!g.Kd()||g instanceof T||!g.Ja()||(g.tl()?(Xh(g,Infinity,Infinity),g.Fc()):e.add(g))}for(c.reset();c.next();)g=c.value,g instanceof T&&g.Ja()&&Fj(d,g);for(c.reset();c.next();)g=c.value,g instanceof U&&(d=g,d.Ja()&&(d.tl()?(Xh(d,Infinity,Infinity),d.Fc(),d.Et()):e.add(d)));for(c.reset();c.next();)d=c.value,d instanceof -tf&&d.Ja()&&(d.tl()?(Xh(d,Infinity,Infinity),d.Fc()):e.add(d));t&&22===b&&w.trace("failure to validate parts")}} -function Fj(a,b){for(var c=w.lb(),d=w.lb(),e=b.Rc;e.next();){var g=e.value;g.Ja()&&(g instanceof T?(Gj(g)||Hj(g)||Ij(g))&&Fj(a,g):g instanceof U?g.Z==b||g.da==b?d.push(g):c.push(g):(Xh(g,Infinity,Infinity),g.Fc()))}for(var e=c.length,h=0;hk+1&&(n=Math.max((v- -k)*G+a.Fb,n)),q+1l+1&&(B=Math.max((p-l)*G+a.Eb,B)),r+1k+1&&(n=Math.max((v-k)*G+a.Fb,n)),q+1l+1&&(B=Math.max((p-l)*G+a.Eb,B)),r+1k+1&&(a.Ej.scrollLeft=a.position.x*G));a.Qw&&a.Fe&&(r+1l+1&&(a.Fj.scrollTop=a.position.y*G));h&&(a.Sq=!0);m=a.Fb;c=a.Eb;a.Fj.style.height=c+"px";a.Fj.style.width=m+(a.Jk?a.Fd:0)+"px";a.Ej.style.width=m+"px";a.Ej.style.height=c+(a.Ik?a.Fd:0)+"px";a.kz=!1;return d!==m||e!==c||a.Pb.pd?(n=a.ub,a.Nt(g,n,h),!1):!0} -C.prototype.add=C.prototype.add=function(a){w.l(a,H,C,"add:part");var b=a.h;if(b!==this){null!==b&&w.m("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.sn&&(a.Ok="Tool");var c=a.hf,b=this.mt(c);null===b&&(b=this.mt(""));null===b&&w.m('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.fp(99999999,a,a.h===this),0<=c&&this.Hc(he,"parts",b,null,a,null,c),b.Ac||this.oc(),a.K(Pj),c=a.mp,null!== -c&&c(a,null,b))}}; -C.prototype.fp=function(a){if(a instanceof S){if(this.Nr.add(a),a instanceof T){var b=a.Va;null===b?this.$k.add(a):b.lo.add(a);b=a.Lb;null!==b&&(b.h=this)}}else a instanceof U?this.qr.add(a):a instanceof tf||this.Hb.add(a);a.Tb&&a.T();b=a.data;if(null!==b){a instanceof tf||(a instanceof U?this.Dk.add(b,a):this.hi.add(b,a));var c=this;Qj(a,function(a){Rj(c,a)})}!0!==Hj(a)&&!0!==Ij(a)||this.fg.add(a);Sj(a,!0,this);Tj(a)?(a.ea.J()&&this.pa(Si(a,a.ea)),this.oc()):a.Ja()&&a.ea.J()&&this.pa(Si(a,a.ea)); -this.Se()};C.prototype.ef=function(a){a.bt();if(a instanceof S){if(this.Nr.remove(a),a instanceof T){var b=a.Va;null===b?this.$k.remove(a):b.lo.remove(a);b=a.Lb;null!==b&&(b.h=null)}}else a instanceof U?this.qr.remove(a):a instanceof tf||this.Hb.remove(a);b=a.data;if(null!==b){a instanceof tf||(a instanceof U?this.Dk.remove(b):this.hi.remove(b));var c=this;Qj(a,function(a){Uj(c,a)})}this.fg.remove(a);Tj(a)?(a.ea.J()&&this.pa(Si(a,a.ea)),this.oc()):a.Ja()&&a.ea.J()&&this.pa(Si(a,a.ea));this.Se()}; -C.prototype.remove=C.prototype.remove=function(a){w.l(a,H,C,"remove:part");a.Za=!1;a.Ag=!1;var b=a.layer;if(null!==b&&b.h===this){a.K(Vj);a.Om();var c=b.ef(-1,a,!1);0<=c&&this.Hc(ie,"parts",b,a,null,c,null);c=a.mp;null!==c&&c(a,b,null)}};C.prototype.removeParts=C.prototype.WA=function(a,b){if(w.isArray(a))for(var c=w.vb(a),d=0;dd&&this.oc()}; -C.prototype.addLayerAfter=function(a,b){Wj(this,a,b);a.Ic(this);var c=this.dc,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.Ud&&this.Hc(ie,"layers",this,a,null,d,null));for(var e=c.count,g=0;gd&&this.oc()}; -C.prototype.removeLayer=function(a){w.l(a,De,C,"removeLayer:layer");a.h!==this&&w.m("Cannot remove a Layer from another Diagram: "+a+" of "+a.h);if(""!==a.name){var b=this.dc,c=b.indexOf(a);if(b.remove(a)){for(b=a.Hb.copy().k;b.next();){var d=b.value,e=d.hf;d.hf=e!==a.name?e:""}null!==this.Ud&&this.Hc(ie,"layers",this,a,null,c,null);this.pa();this.oc()}}};C.prototype.findLayer=C.prototype.mt=function(a){for(var b=this.hx;b.next();){var c=b.value;if(c.name===a)return c}return null}; -C.prototype.addChangedListener=C.prototype.Hz=function(a){w.i(a,"function",C,"addChangedListener:listener");null===this.dj&&(this.dj=new D("function"));this.dj.add(a)};C.prototype.removeChangedListener=C.prototype.TA=function(a){w.i(a,"function",C,"removeChangedListener:listener");null!==this.dj&&(this.dj.remove(a),0===this.dj.count&&(this.dj=null))}; -C.prototype.nw=function(a){this.$a||this.ka.VE(a);a.sd!==ge&&(this.gh=!0);if(null!==this.dj){var b=this.dj,c=b.length;if(1===c)b=b.na(0),b(a);else if(0!==c)for(var d=b.Ue(),e=0;ea.Cg&&(c=a.Cg);a.position=new x(a.Oa.x+h.x/b-h.x/c,a.Oa.y+h.y/b- -h.y/c);a.yc=!1;a.ec=c;a.Nt(d,a.ub);nj(a,!1);a.pa();zj(a)}}C.prototype.Nt=function(a,b,c){void 0===c&&(c=!1);c||zj(this);jj(this);var d=this.Lb;null===d||!d.Ct||c||a.width===b.width&&a.height===b.height||d.K();d=this.Wa;!0===this.Yl&&d instanceof rf&&(this.P.ga=this.SG(this.P.We),d.doMouseMove());this.mA(a,b);Bj(this);this.Ba("ViewportBoundsChanged",c?w.nh:null,a)}; -function Bj(a,b){void 0===b&&(b=null);var c=a.ed;if(null!==c&&c.visible){for(var d=w.Hl(),e=1,g=1,h=c.Ca.q,k=h.length,l=0;ln||(lk(m.Bb)?g=g*n/J.NE(g,n):e=e*n/J.NE(e,n))}h=c.rt;d.o(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=w.$f();g=a.ub;e.o(g.x,g.y,g.width,g.height);for(h=a.jm.k;h.next();)g=h.value.ub,g.J()&&nb(e,g.x,g.y,g.width,g.height);k=e.width;l=e.height;g=e.x;h=e.y;if(!e.J())return}c.width=k+2*d.width;c.height=l+2*d.height; -e=w.M();J.nt(g,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);w.dk(d);c.V.location=e;w.B(e)}}C.prototype.clearSelection=C.prototype.pw=function(){var a=0a&&w.la(a,">= zero",C,"linkSpacing"),this.qj=a,this.j("linkSpacing",b,a))});w.A(C,{hx:"layers"},function(){return this.dc.k});w.g(C,"isModelReadOnly",C.prototype.ff); -w.defineProperty(C,{ff:"isModelReadOnly"},function(){var a=this.Ud;return null===a?!1:a.hb},function(a){var b=this.Ud;null!==b&&(b.hb=a)});w.g(C,"isReadOnly",C.prototype.hb);w.defineProperty(C,{hb:"isReadOnly"},function(){return this.Nk},function(a){var b=this.Nk;b!==a&&(w.i(a,"boolean",C,"isReadOnly"),this.Nk=a,this.j("isReadOnly",b,a))});w.g(C,"isEnabled",C.prototype.isEnabled); -w.defineProperty(C,{isEnabled:"isEnabled"},function(){return this.Xe},function(a){var b=this.Xe;b!==a&&(w.i(a,"boolean",C,"isEnabled"),this.Xe=a,this.j("isEnabled",b,a))});w.g(C,"allowClipboard",C.prototype.jw);w.defineProperty(C,{jw:"allowClipboard"},function(){return this.pu},function(a){var b=this.pu;b!==a&&(w.i(a,"boolean",C,"allowClipboard"),this.pu=a,this.j("allowClipboard",b,a))});w.g(C,"allowCopy",C.prototype.Oh); -w.defineProperty(C,{Oh:"allowCopy"},function(){return this.ok},function(a){var b=this.ok;b!==a&&(w.i(a,"boolean",C,"allowCopy"),this.ok=a,this.j("allowCopy",b,a))});w.g(C,"allowDelete",C.prototype.Rj);w.defineProperty(C,{Rj:"allowDelete"},function(){return this.pk},function(a){var b=this.pk;b!==a&&(w.i(a,"boolean",C,"allowDelete"),this.pk=a,this.j("allowDelete",b,a))});w.g(C,"allowDragOut",C.prototype.Vs); -w.defineProperty(C,{Vs:"allowDragOut"},function(){return this.qu},function(a){var b=this.qu;b!==a&&(w.i(a,"boolean",C,"allowDragOut"),this.qu=a,this.j("allowDragOut",b,a))});w.g(C,"allowDrop",C.prototype.Kz);w.defineProperty(C,{Kz:"allowDrop"},function(){return this.ru},function(a){var b=this.ru;b!==a&&(w.i(a,"boolean",C,"allowDrop"),this.ru=a,this.j("allowDrop",b,a))});w.g(C,"allowTextEdit",C.prototype.Io); -w.defineProperty(C,{Io:"allowTextEdit"},function(){return this.yk},function(a){var b=this.yk;b!==a&&(w.i(a,"boolean",C,"allowTextEdit"),this.yk=a,this.j("allowTextEdit",b,a))});w.g(C,"allowGroup",C.prototype.Fo);w.defineProperty(C,{Fo:"allowGroup"},function(){return this.qk},function(a){var b=this.qk;b!==a&&(w.i(a,"boolean",C,"allowGroup"),this.qk=a,this.j("allowGroup",b,a))});w.g(C,"allowUngroup",C.prototype.Jo); -w.defineProperty(C,{Jo:"allowUngroup"},function(){return this.zk},function(a){var b=this.zk;b!==a&&(w.i(a,"boolean",C,"allowUngroup"),this.zk=a,this.j("allowUngroup",b,a))});w.g(C,"allowInsert",C.prototype.Bm);w.defineProperty(C,{Bm:"allowInsert"},function(){return this.tu},function(a){var b=this.tu;b!==a&&(w.i(a,"boolean",C,"allowInsert"),this.tu=a,this.j("allowInsert",b,a))});w.g(C,"allowLink",C.prototype.Cm); -w.defineProperty(C,{Cm:"allowLink"},function(){return this.rk},function(a){var b=this.rk;b!==a&&(w.i(a,"boolean",C,"allowLink"),this.rk=a,this.j("allowLink",b,a))});w.g(C,"allowRelink",C.prototype.Sj);w.defineProperty(C,{Sj:"allowRelink"},function(){return this.tk},function(a){var b=this.tk;b!==a&&(w.i(a,"boolean",C,"allowRelink"),this.tk=a,this.j("allowRelink",b,a))});w.g(C,"allowMove",C.prototype.Gi); -w.defineProperty(C,{Gi:"allowMove"},function(){return this.sk},function(a){var b=this.sk;b!==a&&(w.i(a,"boolean",C,"allowMove"),this.sk=a,this.j("allowMove",b,a))});w.g(C,"allowReshape",C.prototype.Go);w.defineProperty(C,{Go:"allowReshape"},function(){return this.uk},function(a){var b=this.uk;b!==a&&(w.i(a,"boolean",C,"allowReshape"),this.uk=a,this.j("allowReshape",b,a))});w.g(C,"allowResize",C.prototype.Dm); -w.defineProperty(C,{Dm:"allowResize"},function(){return this.vk},function(a){var b=this.vk;b!==a&&(w.i(a,"boolean",C,"allowResize"),this.vk=a,this.j("allowResize",b,a))});w.g(C,"allowRotate",C.prototype.Ho);w.defineProperty(C,{Ho:"allowRotate"},function(){return this.wk},function(a){var b=this.wk;b!==a&&(w.i(a,"boolean",C,"allowRotate"),this.wk=a,this.j("allowRotate",b,a))});w.g(C,"allowSelect",C.prototype.Ee); -w.defineProperty(C,{Ee:"allowSelect"},function(){return this.xk},function(a){var b=this.xk;b!==a&&(w.i(a,"boolean",C,"allowSelect"),this.xk=a,this.j("allowSelect",b,a))});w.g(C,"allowUndo",C.prototype.Lz);w.defineProperty(C,{Lz:"allowUndo"},function(){return this.uu},function(a){var b=this.uu;b!==a&&(w.i(a,"boolean",C,"allowUndo"),this.uu=a,this.j("allowUndo",b,a))});w.g(C,"allowZoom",C.prototype.Ws); -w.defineProperty(C,{Ws:"allowZoom"},function(){return this.wu},function(a){var b=this.wu;b!==a&&(w.i(a,"boolean",C,"allowZoom"),this.wu=a,this.j("allowZoom",b,a))});w.g(C,"hasVerticalScrollbar",C.prototype.Qw);w.defineProperty(C,{Qw:"hasVerticalScrollbar"},function(){return this.$u},function(a){var b=this.$u;b!==a&&(w.i(a,"boolean",C,"hasVerticalScrollbar"),this.$u=a,zj(this),this.pa(),this.j("hasVerticalScrollbar",b,a),nj(this,!1))});w.g(C,"hasHorizontalScrollbar",C.prototype.Pw); -w.defineProperty(C,{Pw:"hasHorizontalScrollbar"},function(){return this.Zu},function(a){var b=this.Zu;b!==a&&(w.i(a,"boolean",C,"hasHorizontalScrollbar"),this.Zu=a,zj(this),this.pa(),this.j("hasHorizontalScrollbar",b,a),nj(this,!1))});w.g(C,"allowHorizontalScroll",C.prototype.De);w.defineProperty(C,{De:"allowHorizontalScroll"},function(){return this.su},function(a){var b=this.su;b!==a&&(w.i(a,"boolean",C,"allowHorizontalScroll"),this.su=a,this.j("allowHorizontalScroll",b,a),nj(this,!1))}); -w.g(C,"allowVerticalScroll",C.prototype.Fe);w.defineProperty(C,{Fe:"allowVerticalScroll"},function(){return this.vu},function(a){var b=this.vu;b!==a&&(w.i(a,"boolean",C,"allowVerticalScroll"),this.vu=a,this.j("allowVerticalScroll",b,a),nj(this,!1))});w.g(C,"scrollHorizontalLineChange",C.prototype.Op); -w.defineProperty(C,{Op:"scrollHorizontalLineChange"},function(){return this.Kv},function(a){var b=this.Kv;b!==a&&(w.i(a,"number",C,"scrollHorizontalLineChange"),0>a&&w.la(a,">= 0",C,"scrollHorizontalLineChange"),this.Kv=a,this.j("scrollHorizontalLineChange",b,a))});w.g(C,"scrollVerticalLineChange",C.prototype.Pp); -w.defineProperty(C,{Pp:"scrollVerticalLineChange"},function(){return this.Lv},function(a){var b=this.Lv;b!==a&&(w.i(a,"number",C,"scrollVerticalLineChange"),0>a&&w.la(a,">= 0",C,"scrollVerticalLineChange"),this.Lv=a,this.j("scrollVerticalLineChange",b,a))});w.g(C,"lastInput",C.prototype.P);w.defineProperty(C,{P:"lastInput"},function(){return this.Sb},function(a){t&&w.l(a,Sd,C,"lastInput");this.Sb=a});w.g(C,"firstInput",C.prototype.xc); -w.defineProperty(C,{xc:"firstInput"},function(){return this.Fk},function(a){t&&w.l(a,Sd,C,"firstInput");this.Fk=a});w.g(C,"currentCursor",C.prototype.Yb);w.defineProperty(C,{Yb:"currentCursor"},function(){return this.qy},function(a){""===a&&(a=this.Aq);this.qy!==a&&(w.i(a,"string",C,"currentCursor"),null!==this.mb&&(this.qy=a,this.mb.style.cursor=a,this.Nb.style.cursor=a))});w.g(C,"defaultCursor",C.prototype.rI); -w.defineProperty(C,{rI:"defaultCursor"},function(){return this.Aq},function(a){""===a&&(a="auto");var b=this.Aq;b!==a&&(w.i(a,"string",C,"defaultCursor"),this.Aq=a,this.j("defaultCursor",b,a))});w.g(C,"hasGestureZoom",C.prototype.SI);w.defineProperty(C,{SI:"hasGestureZoom"},function(){return this.Vn},function(a){var b=this.Vn;b!==a&&(w.i(a,"boolean",C,"hasGestureZoom"),this.Vn=a,this.j("hasGestureZoom",b,a))});w.g(C,"click",C.prototype.click); -w.defineProperty(C,{click:"click"},function(){return this.di},function(a){var b=this.di;b!==a&&(null!==a&&w.i(a,"function",C,"click"),this.di=a,this.j("click",b,a))});w.g(C,"doubleClick",C.prototype.Pm);w.defineProperty(C,{Pm:"doubleClick"},function(){return this.ki},function(a){var b=this.ki;b!==a&&(null!==a&&w.i(a,"function",C,"doubleClick"),this.ki=a,this.j("doubleClick",b,a))});w.g(C,"contextClick",C.prototype.ft); -w.defineProperty(C,{ft:"contextClick"},function(){return this.fi},function(a){var b=this.fi;b!==a&&(null!==a&&w.i(a,"function",C,"contextClick"),this.fi=a,this.j("contextClick",b,a))});w.g(C,"mouseOver",C.prototype.Jt);w.defineProperty(C,{Jt:"mouseOver"},function(){return this.ui},function(a){var b=this.ui;b!==a&&(null!==a&&w.i(a,"function",C,"mouseOver"),this.ui=a,this.j("mouseOver",b,a))});w.g(C,"mouseHover",C.prototype.It); -w.defineProperty(C,{It:"mouseHover"},function(){return this.ti},function(a){var b=this.ti;b!==a&&(null!==a&&w.i(a,"function",C,"mouseHover"),this.ti=a,this.j("mouseHover",b,a))});w.g(C,"mouseHold",C.prototype.Ht);w.defineProperty(C,{Ht:"mouseHold"},function(){return this.si},function(a){var b=this.si;b!==a&&(null!==a&&w.i(a,"function",C,"mouseHold"),this.si=a,this.j("mouseHold",b,a))});w.g(C,"mouseDragOver",C.prototype.IF); -w.defineProperty(C,{IF:"mouseDragOver"},function(){return this.xv},function(a){var b=this.xv;b!==a&&(null!==a&&w.i(a,"function",C,"mouseDragOver"),this.xv=a,this.j("mouseDragOver",b,a))});w.g(C,"mouseDrop",C.prototype.Gt);w.defineProperty(C,{Gt:"mouseDrop"},function(){return this.ri},function(a){var b=this.ri;b!==a&&(null!==a&&w.i(a,"function",C,"mouseDrop"),this.ri=a,this.j("mouseDrop",b,a))});w.g(C,"toolTip",C.prototype.gu); -w.defineProperty(C,{gu:"toolTip"},function(){return this.Bi},function(a){var b=this.Bi;b!==a&&(null!==a&&w.l(a,tf,C,"toolTip"),this.Bi=a,this.j("toolTip",b,a))});w.g(C,"contextMenu",C.prototype.contextMenu);w.defineProperty(C,{contextMenu:"contextMenu"},function(){return this.gi},function(a){var b=this.gi;b!==a&&(null!==a&&w.l(a,tf,C,"contextMenu"),this.gi=a,this.j("contextMenu",b,a))});w.g(C,"commandHandler",C.prototype.Ab); -w.defineProperty(C,{Ab:"commandHandler"},function(){return this.hy},function(a){var b=this.hy;b!==a&&(w.l(a,qa,C,"commandHandler"),null!==a.h&&w.m("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Ic(null),this.hy=a,a.Ic(this))});w.g(C,"toolManager",C.prototype.tb); -w.defineProperty(C,{tb:"toolManager"},function(){return this.zz},function(a){var b=this.zz;b!==a&&(w.l(a,rf,C,"toolManager"),null!==a.h&&w.m("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Ic(null),this.zz=a,a.Ic(this))});w.g(C,"defaultTool",C.prototype.yw);w.defineProperty(C,{yw:"defaultTool"},function(){return this.xy},function(a){var b=this.xy;b!==a&&(w.l(a,Qe,C,"defaultTool"),this.xy=a,this.Wa===b&&(this.Wa=a))});w.g(C,"currentTool",C.prototype.Wa); -w.defineProperty(C,{Wa:"currentTool"},function(){return this.ty},function(a){var b=this.ty;if(null!==b)for(b.qa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop(),b=this.jm.k;b.next();)b.value.pa();null===a&&(a=this.yw);null!==a&&(w.l(a,Qe,C,"currentTool"),this.ty=a,a.Ic(this),a.doStart())});w.A(C,{selection:"selection"},function(){return this.Ov});w.g(C,"maxSelectionCount",C.prototype.AF); -w.defineProperty(C,{AF:"maxSelectionCount"},function(){return this.sv},function(a){var b=this.sv;if(b!==a)if(w.i(a,"number",C,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.sv=a,this.j("maxSelectionCount",b,a),!this.ka.sb&&(a=this.selection.count-a,0= 0",C,"maxSelectionCount")});w.g(C,"nodeSelectionAdornmentTemplate",C.prototype.NF); -w.defineProperty(C,{NF:"nodeSelectionAdornmentTemplate"},function(){return this.zv},function(a){var b=this.zv;b!==a&&(w.l(a,tf,C,"nodeSelectionAdornmentTemplate"),this.zv=a,this.j("nodeSelectionAdornmentTemplate",b,a))});w.g(C,"groupSelectionAdornmentTemplate",C.prototype.TE);w.defineProperty(C,{TE:"groupSelectionAdornmentTemplate"},function(){return this.Xu},function(a){var b=this.Xu;b!==a&&(w.l(a,tf,C,"groupSelectionAdornmentTemplate"),this.Xu=a,this.j("groupSelectionAdornmentTemplate",b,a))}); -w.g(C,"linkSelectionAdornmentTemplate",C.prototype.xF);w.defineProperty(C,{xF:"linkSelectionAdornmentTemplate"},function(){return this.nv},function(a){var b=this.nv;b!==a&&(w.l(a,tf,C,"linkSelectionAdornmentTemplate"),this.nv=a,this.j("linkSelectionAdornmentTemplate",b,a))});w.A(C,{Rw:"highlighteds"},function(){return this.av});w.g(C,"isModified",C.prototype.gh); -w.defineProperty(C,{gh:"isModified"},function(){var a=this.ka;return a.isEnabled?null!==a.Ni?!0:this.Sy&&this.Ug!==a.Ri:this.Sy},function(a){if(this.Sy!==a){w.i(a,"boolean",C,"isModified");this.Sy=a;var b=this.ka;!a&&b.isEnabled&&(this.Ug=b.Ri);a||mk(this)}});function mk(a){var b=a.gh;a.JD!==b&&(a.JD=b,a.Ba("Modified"))}w.g(C,"model",C.prototype.fa); -w.defineProperty(C,{fa:"model"},function(){return this.Ud},function(a){var b=this.Ud;if(b!==a){w.l(a,I,C,"model");this.Wa.doCancel();null!==b&&b.ka!==a.ka&&b.ka.jF&&w.m("Do not replace a Diagram.model while a transaction is in progress.");this.Pb.Xi();this.pw();this.rf=!1;this.Rn=!0;this.Ug=-2;this.Mf=!1;var c=this.Bd;this.Bd=!0;this.Pb.zl();null!==b&&(b.TA(this.MC),b instanceof R&&nk(this,b.Ui),nk(this,b.Fg));this.Ud=a;a.Hz(this.LC);ok(this,a.Fg);a instanceof R&&pk(this,a.Ui);a.TA(this.LC);a.Hz(this.MC); -this.Bd=c;this.yc||this.pa();null!==b&&(a.ka.isEnabled=b.ka.isEnabled)}});w.defineProperty(C,{Pa:null},function(){return this.EC},function(a){this.EC=a}); -function Yi(a,b){if(b.fa===a.fa){var c=b.sd,d=b.propertyName;if(c===ge&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.tb,c.lf.each(function(b){b.Ic(a)}),c.Uf.each(function(b){b.Ic(a)}),c.Vf.each(function(b){b.Ic(a)}),a.Bd||a.rf||(a.Nu=!0,a.Rn&&(a.Mf=!0),a.bi.zl());else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Pb;e.fh&&!a.$a&&e.Xi();a.Ba("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Pb,e.fh&&!a.$a&&e.Xi(),a.jv&&e.zl());else if(a.Pa){a.Pa=!1;try{var g=b.Bf;if(""!==g)if(c===fe){if("linkFromKey"=== -g){var h=b.object,k=a.vg(h);if(null!==k){var l=b.newValue,m=a.cf(l);k.Z=m}}else if("linkToKey"===g)h=b.object,k=a.vg(h),null!==k&&(l=b.newValue,m=a.cf(l),k.da=m);else if("linkFromPortId"===g){if(h=b.object,k=a.vg(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.Rf=n)}}else if("linkToPortId"===g)h=b.object,k=a.vg(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.Og=n));else if("nodeGroupKey"===g){var h=b.object,p=a.Sh(h);if(null!==p){var q=b.newValue;if(void 0!==q){var r=a.cf(q);p.Va=r instanceof -T?r:null}else p.Va=null}}else if("linkLabelKeys"===g){if(h=b.object,k=a.vg(h),null!==k){var s=b.oldValue,u=b.newValue;if(w.isArray(s))for(var v=w.vb(s),A=0;Al)){var m=l;wk(k)&&m++;k.ef(m);xk(k,m,l)}}}} -function Rj(a,b){var c=b.oi;if(w.isArray(c)){var d=a.am.Aa(c);if(null===d)d=[],d.push(b),a.am.add(c,d);else{for(c=0;c=g.length)return!1;for(var h=0;hthis.scale&&(this.scale=a)):w.la(a,"> 0",C,"minScale"))}); -w.g(C,"maxScale",C.prototype.Cg);w.defineProperty(C,{Cg:"maxScale"},function(){return this.rv},function(a){w.p(a,C,"maxScale");var b=this.rv;b!==a&&(0 0",C,"maxScale"))});w.g(C,"zoomPoint",C.prototype.Ll);w.defineProperty(C,{Ll:"zoomPoint"},function(){return this.ew},function(a){this.ew.L(a)||(w.l(a,x,C,"zoomPoint"),this.ew=a=a.ba())});w.g(C,"contentAlignment",C.prototype.sw); -w.defineProperty(C,{sw:"contentAlignment"},function(){return this.Bn},function(a){var b=this.Bn;b.L(a)||(w.l(a,K,C,"contentAlignment"),this.Bn=a=a.ba(),this.j("contentAlignment",b,a),nj(this,!1))});w.g(C,"initialContentAlignment",C.prototype.WI);w.defineProperty(C,{WI:"initialContentAlignment"},function(){return this.Xn},function(a){var b=this.Xn;b.L(a)||(w.l(a,K,C,"initialContentAlignment"),this.Xn=a=a.ba(),this.j("initialContentAlignment",b,a))});w.g(C,"padding",C.prototype.padding); -w.defineProperty(C,{padding:"padding"},function(){return this.$e},function(a){"number"===typeof a?a=new eb(a):w.l(a,eb,C,"padding");var b=this.$e;b.L(a)||(this.$e=a=a.ba(),this.oc(),this.j("padding",b,a))});w.A(C,{Gg:"nodes"},function(){return this.Nr.k});w.A(C,{links:"links"},function(){return this.qr.k});w.A(C,{hk:"parts"},function(){return this.Hb.k});C.prototype.findTopLevelGroups=function(){return this.$k.k};w.g(C,"layout",C.prototype.Lb); -w.defineProperty(C,{Lb:"layout"},function(){return this.Td},function(a){var b=this.Td;b!==a&&(w.l(a,Re,C,"layout"),null!==b&&(b.h=null,b.group=null),this.Td=a,a.h=this,a.group=null,this.xu=!0,this.j("layout",b,a),this.Se())});C.prototype.layoutDiagram=function(a){lj(this);a&&Ak(this,!0);Dj(this,!1)};function Ak(a,b){for(var c=a.$k.k;c.next();)Ik(a,c.value,b);null!==a.Lb&&(b?a.Lb.gf=!1:a.Lb.K())} -function Ik(a,b,c){if(null!==b){for(var d=b.lo.k;d.next();)Ik(a,d.value,c);null!==b.Lb&&(c?b.Lb.gf=!1:b.Lb.K())}}function Dj(a,b){if(!a.yy){var c=a.Lb,d=a.jv;a.jv=!0;var e=a.Pa;a.Pa=!0;try{a.ac("Layout");for(var g=a.$k.k;g.next();)Jk(a,g.value,b);c.gf||b&&!c.yA||(c.doLayout(a),lj(a),c.gf=!0)}finally{a.ae("Layout"),a.xu=!c.gf,a.jv=d,a.Pa=e}}} -function Jk(a,b,c){if(null!==b){for(var d=b.lo.k;d.next();)Jk(a,d.value,c);d=b.Lb;null===d||d.gf||c&&!d.yA||(b.cz=!b.location.J(),d.doLayout(b),b.K(Kk),d.gf=!0,Fj(a,b))}}w.g(C,"isTreePathToChildren",C.prototype.ld);w.defineProperty(C,{ld:"isTreePathToChildren"},function(){return this.iv},function(a){var b=this.iv;if(b!==a&&(w.i(a,"boolean",C,"isTreePathToChildren"),this.iv=a,this.j("isTreePathToChildren",b,a),!this.ka.sb))for(a=this.Gg;a.next();)Lk(a.value)}); -C.prototype.findTreeRoots=function(){for(var a=new D(S),b=this.Gg;b.next();){var c=b.value;c.$w&&null===c.pt()&&a.add(c)}return a.k};w.g(C,"isCollapsingExpanding",C.prototype.ee);w.defineProperty(C,{ee:null},function(){return this.sC},function(a){this.sC=a}); -function Wi(a){function b(a){var b=a.toLowerCase(),h=new D("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new ia("string",D),d=new ia("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.Ay=c;a.zy=d} -function la(a,b){var c=a.zy.Aa(b);return null!==c?c:a.zy.Aa(b.toLowerCase())}function Mk(a,b){var c=a.Ay.Aa(b);if(null!==c)return c;c=a.Ay.Aa(b.toLowerCase());if(null!==c)return c;w.m("Unknown DiagramEvent name: "+b);return null}C.prototype.addDiagramListener=C.prototype.Iz=function(a,b){w.i(a,"string",C,"addDiagramListener:name");w.i(b,"function",C,"addDiagramListener:listener");var c=Mk(this,a);null!==c&&c.add(b)}; -C.prototype.removeDiagramListener=C.prototype.XF=function(a,b){w.i(a,"string",C,"removeDiagramListener:name");w.i(b,"function",C,"addDiagramListener:listener");var c=Mk(this,a);null!==c&&c.remove(b)};C.prototype.raiseDiagramEvent=C.prototype.Ba=function(a,b,c){t&&w.i(a,"string",C,"raiseDiagramEvent:name");var d=Mk(this,a),e=new Td;e.h=this;e.name=la(this,a);void 0!==b&&(e.Hx=b);void 0!==c&&(e.ux=c);a=d.length;if(1===a)d=d.na(0),d(e);else if(0!==a)for(b=d.Ue(),c=0;c=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.ub,g=a.scale,e=w.lk(0,0,e.width*g,e.height*g),h=w.ic(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(k=Math.max(a.Op,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.Pp,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.Ne(J.nk)||(c=new x(c.x+h.x/g,c.y+h.y/g));w.nc(e);w.B(h);return c}C.prototype.makeSVG=C.prototype.makeSvg=function(a){void 0===a&&(a=new na);a.context="svg";a=Vk(this,a);return null!==a?a.Gl:null}; -C.prototype.makeImage=function(a){void 0===a&&(a=new na);var b=(a.document||document).createElement("img");b.src=this.mJ(a);return b};C.prototype.makeImageData=C.prototype.mJ=function(a){void 0===a&&(a=new na);var b=Vk(this,a);return null!==b?b.toDataURL(a.type,a.details):""};var Wk=!1; -function Vk(a,b){a.Pb.Xi();a.kf();if(null===a.mb)return null;"object"!==typeof b&&w.m("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 fa(Infinity,Infinity):new fa(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 eb(l):l instanceof eb||(l=new eb(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.Nn=!1;gj(a);var s=new ma(null,p),u=s.getContext("2d"),v=s;if(!(d||e||k||h))return s.width=a.Fb+Math.ceil(l.left+l.right),s.height=a.Eb+Math.ceil(l.top+l.bottom),"svg"===b.context&&(u=v=new Sc(s.Jd,p,q),u instanceof -Sc&&(a.Nn=!0)),Mj(a,u,l,new fa(s.width,s.height),a.ec,a.Oa,k,m,r,n),a.Nn=!0,v;var A=a.Ab.it,E=new x(0,0),B=a.Hd.copy();B.aK(a.padding);if(r)for(var G=!0,G=a.dc.q,O=G.length,M=0;MA?(e=A,h=B.width,ca=B.height):(h=g.width,ca=g.height)):(h=B.width*e,ca=B.height*e):(e=A,h=B.width,ca=B.height);null!==l?(h+=ja,ca+=G):l=new eb(0);null!==g&&(d=g.width,g=g.height,"svg"!==b.context&&c&&!Wk&&(h>d||ca>g)&&(w.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(ca)+" vs 2000x2000) Consider increasing the max size."), -Wk=!0),isNaN(d)&&(d=2E3),isNaN(g)&&(g=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(g)&&(ca=Math.min(ca,g)));s.width=Math.ceil(h);s.height=Math.ceil(ca);"svg"===b.context&&(u=v=new Sc(s.Jd,p,q),u instanceof Sc&&(a.Nn=!0));Mj(a,u,l,new fa(Math.ceil(h),Math.ceil(ca)),e,E,k,m,r,n);a.Nn=!0;return v}C.inherit=function(a,b){w.i(a,"function",C,"inherit");w.i(b,"function",C,"inherit");b.xH&&w.m("Cannot inherit from "+w.yg(b));w.Ia(a,b)}; -function bj(){this.AH="63ad05bbe23a1786468a4c741b6d2";this.AH===this._tk?this.wh=!0:Xk(this,!1)} -function Xk(a,b){var c="p",d=window[w.Ha("76a715b2f73f148a")][w.Ha("72ba13b5")];if(w.Ha("77bb5bb2f32603de")===window[w.Ha("76a715b2f73f148a")][w.Ha("6aba19a7ec351488")])try{a.wh=!window[w.Ha("4da118b7ec2108")]([w.Ha("5bb806bfea351a904a84515e1b6d38b6")])([w.Ha("49bc19a1e6")])([w.Ha("59bd04a1e6380fa5539b")])([w.Ha("7bb8069ae7")]===w.Ha(w.iw));if(!1===a.wh)return;a.wh=!window[w.Ha("4da118b7ec2108")]([w.Ha("5bb806bfea351a904a84515e1b6d38b6")])([w.Ha("49bc19a1e6")])([w.Ha("59bd04a1e6380fa5539b6c7a197c31bb4cfd3e")])([w.Ha("7bb8069ae7")]===w.Ha(w.iw)); -if(!1===a.wh)return}catch(e){}for(var g=d[w.Ha("76ad18b4f73e")],h=d[w.Ha("73a612b6fb191d")](w.Ha("35e7"))+2;h=d&&w.Ha(w.iw)!==w.Ha("7da71ca0ad381e90")&&(d=c[w.Ha("73a612b6fb191d")](w.Ha("76a715b2ef3e149757")));a.wh=!(0b.timeStamp-a.dm)b.preventDefault();else if(a.Mc=a.Sb,a.Sb=c,uj(a,a,b,c,!0),c.ak=!0,c.Je=b.detail,a.Fk=c.copy(),!0===c.Gq.simulated)b.preventDefault(),b.simulated=!0;else if(t&&t.MF&&(window.MF=a.Vo(c.ga)),Lf=null,a.doMouseDown(),1===b.button)return b.preventDefault(),!1}};a.Cp=function(b){if(a.isEnabled){a.Yl=!0;var c=a.Mc;if(w.Wm){if(400>b.timeStamp-a.dm){b.preventDefault();return}a.dm=b.timeStamp}if(w.Wm&&null!==a.ys)a.ys=null,b.preventDefault();else{a.Mc=a.Sb;a.Sb=c;uj(a,a,b,c,!0);c.up=!0; -c.Je=b.detail;if(w.uA||w.vA)b.timeStamp-a.dmb.touches.length&&tj(a,c);yj(a,c,b)}};a.MG=function(b){if(a.isEnabled){var c=a.Mc;a.Mc=a.Sb;a.Sb=c;var d=null;0a.Xr&&tj(a,c),yj(a,c,b))}};a.GJ=function(b){if("touch"===b.pointerType&&!(2>a.Xr)){var c=a.Lf;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.Mc,a.Mc=a.Sb,a.Sb=c,xj(a,b,b,c,!0),Ff(a),a.Dx(b,null,c.Zf)||(a.doMouseMove(),yj(a,c,b)))}};a.FJ=function(b){if("touch"===b.pointerType){var c=a.aD;void 0!==c[b.pointerId]&&(a.Xr--,delete c[b.pointerId],c=a.Lf,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId=== -b.pointerId&&(c[1]=null))}};gj(a);fj(a)}function Yk(a){1a)&&w.la(a,"0 <= loc <= 1",ea,"addColorStop:loc");w.i(b,"string",ea,"addColorStop:color");t&&!da(b)&&w.m('Color "'+b+'" is not a valid color string for Brush.addColorStop');null===this.Qg&&(this.Qg=new ia("number","string"));this.Qg.add(a,b);this.ha===Ae&&(this.type=Be);this.Rg=null};w.g(ea,"type",ea.prototype.type); -w.defineProperty(ea,{type:"type"},function(){return this.ha},function(a){w.N(this,a);w.za(a,ea,ea,"type");this.ha=a;this.start.ue()&&(a===Be?this.start=Cb:a===Ce&&(this.start=Ob));this.end.ue()&&(a===Be?this.end=Vb:a===Ce&&(this.end=Ob));this.Rg=null});w.g(ea,"color",ea.prototype.color);w.defineProperty(ea,{color:"color"},function(){return this.An},function(a){w.N(this,a);t&&!da(a)&&w.m('Color "'+a+'" is not a valid color string for Brush.color');this.An=a;this.Rg=null});w.g(ea,"start",ea.prototype.start); -w.defineProperty(ea,{start:"start"},function(){return this.vo},function(a){w.N(this,a);w.l(a,K,ea,"start");this.vo=a.ba();this.Rg=null});w.g(ea,"end",ea.prototype.end);w.defineProperty(ea,{end:"end"},function(){return this.Pn},function(a){w.N(this,a);w.l(a,K,ea,"end");this.Pn=a.ba();this.Rg=null});w.g(ea,"startRadius",ea.prototype.Tp); -w.defineProperty(ea,{Tp:"startRadius"},function(){return this.Sv},function(a){w.N(this,a);w.p(a,ea,"startRadius");0>a&&w.la(a,">= zero",ea,"startRadius");this.Sv=a;this.Rg=null});w.g(ea,"endRadius",ea.prototype.To);w.defineProperty(ea,{To:"endRadius"},function(){return this.Su},function(a){w.N(this,a);w.p(a,ea,"endRadius");0>a&&w.la(a,">= zero",ea,"endRadius");this.Su=a;this.Rg=null});w.g(ea,"colorStops",ea.prototype.No); -w.defineProperty(ea,{No:"colorStops"},function(){return this.Qg},function(a){w.N(this,a);t&&w.l(a,ia,ea,"colorStops");this.Qg=a;this.Rg=null});w.g(ea,"pattern",ea.prototype.pattern);w.defineProperty(ea,{pattern:"pattern"},function(){return this.Gv},function(a){w.N(this,a);this.Gv=a;this.Rg=null}); -ea.randomColor=function(a,b){void 0===a&&(a=128);t&&(w.p(a,ea,"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 el=w.createElement("canvas").getContext("2d"),da;ea.isValidColor=da=function(a){if("black"===a)return!0;if(""===a)return!1;t&&w.i(a,"string",ea,"isValidColor");el.fillStyle="#000000";var b=el.fillStyle;el.fillStyle=a;if(el.fillStyle!==b)return!0;el.fillStyle="#FFFFFF";b=el.fillStyle;el.fillStyle=a;return el.fillStyle!==b}; -function P(){w.jc(this);this.ia=30723;this.Kf=1;this.ah=null;this.Xb="";this.tc=this.Mb=null;this.Oa=(new x(NaN,NaN)).freeze();this.pf=(new fa(NaN,NaN)).freeze();this.xj=J.on;this.vj=J.DB;this.Yd=new ga;this.un=new ga;this.Qk=new ga;this.ec=this.Pu=1;this.vn=0;this.Kh=fl;this.tr=J.aq;this.Uc=(new y(NaN,NaN,NaN,NaN)).freeze();this.bc=(new y(NaN,NaN,NaN,NaN)).freeze();this.Lc=(new y(0,0,NaN,NaN)).freeze();this.Hs=this.Hq=this.S=this.Yr=this.Zr=null;this.Is=this.Iq=Infinity;this.gq=this.ye=zc;this.ms= -0;this.Dj=1;this.nq=0;this.fj=1;this.qs=-Infinity;this.ps=0;this.rs=J.nk;this.ss=jh;this.uq="";this.Kc=this.R=null;this.xn=-1;this.lm=this.ei=this.Ql=this.uo=null}w.Ph(P);w.ja("GraphObject",P); -P.prototype.cloneProtected=function(a){a.ia=this.ia|6144;a.Kf=this.Kf;a.Xb=this.Xb;a.Mb=this.Mb;a.tc=this.tc;a.Oa.assign(this.Oa);a.pf.assign(this.pf);a.xj=this.xj.ba();a.vj=this.vj.ba();a.Qk=this.Qk.copy();a.ec=this.ec;a.vn=this.vn;a.Kh=this.Kh;a.tr=this.tr.ba();a.Uc.assign(this.Uc);a.bc.assign(this.bc);a.Lc.assign(this.Lc);a.Yr=this.Yr;a.S=null!==this.S?this.S.copy():null;a.Hq=this.Hq;a.Iq=this.Iq;a.Hs=this.Hs;a.Is=this.Is;a.ye=this.ye.ba();a.gq=this.gq.ba();a.ms=this.ms;a.Dj=this.Dj;a.nq=this.nq; -a.fj=this.fj;a.qs=this.qs;a.ps=this.ps;a.rs=this.rs.ba();a.ss=this.ss;a.uq=this.uq;a.R=null!==this.R?this.R.copy():null;a.Kc=this.Kc;a.xn=this.xn;if(null!==this.Ql){a.Ql=w.il(this.Ql);for(var b=0;bk;)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.Hc=function(a,b,c,d,e,g,h){var k=this.V;null!==k&&(k.fn(a,b,c,d,e,g,h),0!==(this.ia&1024)&&c===this&&a===fe&&nl(this,k,b))}; -function nl(a,b,c){var d=a.Xo();if(null!==d)for(var e=a.Kc.k;e.next();){var g=e.value,h=null;if(null!==g.El){h=nf(g,d,a);if(null===h)continue;g.Jx(a,h,c,null)}else if(g.Xp){var k=b.h;null!==k&&g.Jx(a,k.fa.yp,c,k)}else{var l=d.data;if(null===l)continue;k=b.h;null!==k&&k.du||g.Jx(a,l,c,k)}null!==h&&(k=d.Hw(g.kk),null!==k&&g.XG(k,h,c))}}P.prototype.Hw=function(a){return this.xn===a?this:null};P.prototype.raiseChanged=P.prototype.j=function(a,b,c){this.Hc(fe,a,this,b,c)}; -function ol(a,b,c,d,e){var g=a.Uc,h=a.Qk;h.reset();pl(a,h,b,c,d,e);a.Qk=h;g.x=b;g.y=c;g.width=d;g.height=e;h.zt()||h.RG(g)}function ql(a,b,c,d){if(!1===a.Cf)return!1;d.multiply(a.transform);return c?a.zg(b,d):a.Lm(b,d)} -P.prototype.IE=function(a,b,c){if(!1===this.Cf)return!1;var d=this.Ka;b=a.Zj(b);var e=!1;c&&(e=Ya(a.x,a.y,0,0,0,d.height)a&&(a+=360);return a}; -P.prototype.getDocumentScale=P.prototype.Qi=function(){if(0!==(this.ia&4096)===!1)return this.Pu;var a=this.ec;return null!==this.U?a*this.U.Qi():a};P.prototype.getLocalPoint=P.prototype.PE=function(a,b){void 0===b&&(b=new x);b.assign(a);this.Nf.Th(b);return b};P.prototype.getNearestIntersectionPoint=P.prototype.pl=function(a,b,c){return this.cp(a.x,a.y,b.x,b.y,c)};f=P.prototype; -f.cp=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.el)return g=this.ea,J.pl(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.o(0,0);d=this.Ka;c=J.pl(0,0,d.width,d.height,h,a,b,c,e);e.transform(g);return c}; -function Xh(a,b,c,d,e){if(!1!==Gj(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.ya,k=0;a.ib&&(k=a.ib);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 z;switch(rl(a,!0)){case yh:k=g=0;l&&(c=b=Infinity);break;case hd:isFinite(b)&&b>d&&(g=b);isFinite(c)&& -c>e&&(k=c);break;case hl:isFinite(b)&&b>d&&(g=b);k=0;l&&(c=Infinity);break;case gl:isFinite(c)&&c>e&&(k=c),g=0,l&&(b=Infinity)}var l=a.Pd,m=a.Re;g>l.width&&m.widthl.height&&m.heighta.height||this.oj.Ze>a.width))&&(c=!0);this.ia=c?this.ia|256:this.ia&-257;this.bc.J()|| -w.m("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.bc.toString());this.px(g,this.bc);w.nc(g)};f.Hi=function(){}; -function tl(a,b,c,d,e){var g=a.ea;g.x=b;g.y=c;g.width=d;g.height=e;if(!a.ya.J()){g=a.Uc;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=rl(a,!0);c===d&&g===e&&(b=yh);switch(b){case yh:if(c>d||g>e)sl(a,!0),Xh(a,c>d?d:c,g>e?e:g);break;case hd:sl(a,!0);Xh(a,d,e,0,0);break;case hl:sl(a,!0);Xh(a,d,g,0,0);break;case gl:sl(a,!0),Xh(a,c,e,0,0)}}} -f.px=function(){ul(this,!1);var a=this.V;null!==a&&null!==a.h&&(a.rl(),this.Av(a),this.pa(),a=this.V,null!==a&&(a.$t!==this&&a.fG!==this&&a.iG!==this||vl(a,!0)))};f.Av=function(a){null!==this.wd&&vl(a,!0)}; -f.bf=function(a,b){if(this.visible){var c=this.opacity,d=1;if(1!==c){if(0===c)return;d=a.globalAlpha;a.globalAlpha=d*c}if(a instanceof Sc)a:{if(this.visible){var e=null,g=a.bx;if(this instanceof z&&(this.type===wl||this.type===xl))yl(this,a,b);else{var h=this.bc;if(0!==h.width&&0!==h.height&&!isNaN(h.x)&&!isNaN(h.y)){var k=this.transform,l=this.U;0!==(this.ia&4096)===!0&&zl(this);var m=0!==(this.ia&256),n=!1;this instanceof oa&&Al(this,a);if(m){n=l.bg()?l.Ka:l.ea;if(this.ei)var p=this.ei,q=p.x,r= -p.y,s=p.width,p=p.height;else q=Math.max(h.x,n.x),r=Math.max(h.y,n.y),s=Math.min(h.right,n.right)-q,p=Math.min(h.bottom,n.bottom)-r;if(q>h.width+h.x||h.x>n.width+n.x||r>h.height+h.y||h.y>n.height+n.y)break a;n=!0;Uc(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}q=!1;if(this instanceof H&&(q=!0,!this.Ja()))break a;r=!1;s=b.Fh;this.V&&s.drawShadows&&(r=this.V.Ti);a.Oi.jf=[1,0,0,1,0,0];null!==this.tc&&(Bl(this,a,this.tc,!0,!0),this.tc instanceof ea&&this.tc.type===Ce?(a.beginPath(), -a.rect(h.x,h.y,h.width,h.height),Cl(a,this.tc)):a.fillRect(h.x,h.y,h.width,h.height));q&&this.Ti&&s.drawShadows&&(Uc(a,1,0,0,1,0,0),h=this.um,a.shadowOffsetX=h.x,a.shadowOffsetY=h.y,a.shadowColor=this.tm,a.shadowBlur=this.sm/b.scale,a.eb());this instanceof z?Uc(a,k.m11,k.m12,k.m21,k.m22,k.dx,k.dy):a.Oi.jf=[k.m11,k.m12,k.m21,k.m22,k.dx,k.dy];if(null!==this.Mb){var p=this.Ka,h=k=0,s=p.width,p=p.height,u=0;this instanceof W&&(p=this.Ta.kb,k=p.x,h=p.y,s=p.width,p=p.height,u=this.dh);Bl(this,a,this.Mb, -!0,!1);this.Mb instanceof ea&&this.Mb.type===Ce?(a.beginPath(),a.rect(k-u/2,h-u/2,s+u,p+u),Cl(a,this.Mb)):a.fillRect(k-u/2,h-u/2,s+u,p+u)}s=h=k=0;r&&(null!==this.Mb||null!==this.tc||null!==l&&0!==(l.ia&512)||null!==l&&l.type===ej&&l.Qf()!==this)?(Dl(this,!0),k=a.shadowOffsetX,h=a.shadowOffsetY,s=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0):Dl(this,!1);this.bk(a,b);r&&0!==(this.ia&512)===!0&&(a.shadowOffsetX=k,a.shadowOffsetY=h,a.shadowBlur=s);q&&r&&(a.shadowOffsetX=0,a.shadowOffsetY= -0,a.shadowBlur=0);m&&(a.restore(),n&&a.xf.pop(),gj(b,a));this instanceof z&&(e=a.xf.pop());q&&r&&a.xf.pop();null!==a.EE&&(null===e&&(g===a.bx?(Uc(a,1,0,0,1,0,0),e=a.xf.pop()):e=a.bx),a.EE(this,e))}}}}else{if(this instanceof z&&(this.type===wl||this.type===xl)){yl(this,a,b);1!==c&&(a.globalAlpha=d);return}q=this.bc;if(0!==q.width&&0!==q.height&&!isNaN(q.x)&&!isNaN(q.y)){e=this.transform;g=this.U;0!==(this.ia&4096)===!0&&zl(this);l=0!==(this.ia&256);this instanceof oa&&Al(this,a);if(l){t&&t.FI&&w.trace("clip"+ -this.toString());m=g.bg()?g.Ka:g.ea;this.ei?(h=this.ei,n=h.x,r=h.y,k=h.width,h=h.height):(n=Math.max(q.x,m.x),r=Math.max(q.y,m.y),k=Math.min(q.right,m.right)-n,h=Math.min(q.bottom,m.bottom)-r);if(n>q.width+q.x||q.x>m.width+m.x||r>q.height+q.y||q.y>m.height+m.y){1!==c&&(a.globalAlpha=d);return}a.save();a.beginPath();a.rect(n,r,k,h);a.clip()}r=b.Fh;m=!1;if(this instanceof H){m=!0;if(!this.Ja()){1!==c&&(a.globalAlpha=d);return}this.Ti&&r.drawShadows&&(n=this.um,a.shadowOffsetX=n.x*b.scale*b.tf,a.shadowOffsetY= -n.y*b.scale*b.tf,a.shadowColor=this.tm,a.shadowBlur=this.sm)}n=!1;this.V&&r.drawShadows&&(n=this.V.Ti);null!==this.tc&&(Bl(this,a,this.tc,!0,!0),this.tc instanceof ea&&this.tc.type===Ce?(a.beginPath(),a.rect(q.x,q.y,q.width,q.height),Cl(a,this.tc)):a.fillRect(q.x,q.y,q.width,q.height));e.zt()||a.transform(e.m11,e.m12,e.m21,e.m22,e.dx,e.dy);null!==this.Mb&&(h=this.Ka,r=q=0,k=h.width,h=h.height,s=0,this instanceof W&&(h=this.Ta.kb,q=h.x,r=h.y,k=h.width,h=h.height,s=this.dh),Bl(this,a,this.Mb,!0,!1), -this.Mb instanceof ea&&this.Mb.type===Ce?(a.beginPath(),a.rect(q-s/2,r-s/2,k+s,h+s),Cl(a,this.Mb)):a.fillRect(q-s/2,r-s/2,k+s,h+s));k=r=q=0;n&&(null!==this.Mb||null!==this.tc||null!==g&&0!==(g.ia&512)||null!==g&&(g.type===ej||g.type===wh)&&g.Qf()!==this)?(Dl(this,!0),q=a.shadowOffsetX,r=a.shadowOffsetY,k=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0):Dl(this,!1);this.bk(a,b);n&&0!==(this.ia&512)===!0&&(a.shadowOffsetX=q,a.shadowOffsetY=r,a.shadowBlur=k);m&&n&&(a.shadowOffsetX=0, -a.shadowOffsetY=0,a.shadowBlur=0);l?(a.restore(),this instanceof z?gj(b,a,!0):gj(b,a,!1)):e.zt()||(g=1/(e.m11*e.m22-e.m12*e.m21),a.transform(e.m22*g,-e.m12*g,-e.m21*g,e.m11*g,g*(e.m21*e.dy-e.m22*e.dx),g*(e.m12*e.dx-e.m11*e.dy)))}}1!==c&&(a.globalAlpha=d)}}; -function yl(a,b,c){var d=a.bc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.tc&&(Bl(a,b,a.tc,!0,!0),a.tc instanceof ea&&a.tc.type===Ce?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),Cl(b,a.tc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Mb&&(Bl(a,b,a.Mb,!0,!1),a.Mb instanceof ea&&a.Mb.type===Ce?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),Cl(b,a.Mb)):b.fillRect(d.x,d.y,d.width,d.height)),a.bk(b,c))}f.bk=function(){}; -function Cl(a,b){if(b instanceof ea&&b.type===Ce&&!(a instanceof Sc)){var c=b.ky,d=b.jy;d>c?(a.scale(c/d,1),a.translate((d-c)/2,0)):c>d&&(a.scale(1,d/c),a.translate(0,(c-d)/2));a.ou?a.clip():a.fill();d>c?(a.translate(-(d-c)/2,0),a.scale(1/(c/d),1)):c>d&&(a.translate(0,-(c-d)/2),a.scale(1,1/(d/c)))}else a.ou?a.clip():a.fill()}function El(a){a.ou||a.stroke()} -function Bl(a,b,c,d,e){if(null!==c){var g=1,h=1;if("string"===typeof c)d?b.pn!==c&&(b.fillStyle=c,b.pn=c):b.qn!==c&&(b.strokeStyle=c,b.qn=c);else if(c.type===Ae)c=c.color,d?b.pn!==c&&(b.fillStyle=c,b.pn=c):b.qn!==c&&(b.strokeStyle=c,b.qn=c);else{var k,h=a.Ka,g=h.width,h=h.height;if(e)var l=a.ea,g=l.width,h=l.height;var m=b instanceof CanvasRenderingContext2D;if(m&&(c.Rg&&c.type===dl||c.ky===g&&c.jy===h))k=c.Rg;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.ea,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;c.type===Be?k=b.createLinearGradient(l,n,p,q):c.type===Ce?(s=isNaN(c.To)?Math.max(g,h)/2:c.To,isNaN(c.Tp)?(r=0,s=Math.max(g,h)/2):r=c.Tp,k=b.createRadialGradient(l,n,r,p,q,s)):c.type===dl?k=b.createPattern(c.pattern,"repeat"):w.sc(c.type,"Brush type");if(c.type!==dl&&(a=c.No,null!==a))for(a=a.k;a.next();)k.addColorStop(a.key,a.value);m&&(c.Rg=k,c.ky=g,c.jy=h)}d?b.pn!==k&&(b.fillStyle= -k,b.pn=k):b.qn!==k&&(b.strokeStyle=k,b.qn=k)}}}P.prototype.isContainedBy=P.prototype.sl=function(a){if(a instanceof z)a:{if(this!==a&&null!==a)for(var b=this.U;null!==b;){if(b===a){a=!0;break a}b=b.U}a=!1}else a=!1;return a};P.prototype.isVisibleObject=P.prototype.vl=function(){if(!this.visible)return!1;var a=this.U;return null!==a?a.vl():!0}; -function zl(a){if(0!==(a.ia&2048)===!0){var b=a.Yd;b.reset();if(!a.bc.J()||!a.Uc.J()){Fl(a,!1);return}b.translate(a.bc.x,a.bc.y);b.translate(-a.Ga.x,-a.Ga.y);var c=a.Ka;pl(a,b,c.x,c.y,c.width,c.height);Fl(a,!1);Gl(a,!0)}0!==(a.ia&4096)===!0&&(b=a.U,null===b?(a.un.set(a.Yd),a.Pu=a.scale,Gl(a,!1)):null!==b.Nf&&(c=a.un,c.reset(),b.bg()?c.multiply(b.un):null!==b.U&&c.multiply(b.U.un),c.multiply(a.Yd),a.Pu=a.scale*b.Pu,Gl(a,!1)))} -function pl(a,b,c,d,e,g){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=Ob;a.Pe&&a.Pe.kd()&&(h=a.Pe);var k=w.M();if(a instanceof H&&a.hc!==a)for(c=a.hc,d=c.Ka,k.cu(d.x,d.y,d.width,d.height,h),c.Qk.fb(k),k.offset(-c.Ga.x,-c.Ga.y),h=c.U;null!==h&&h!==a;)h.Qk.fb(k),k.offset(-h.Ga.x,-h.Ga.y),h=h.U;else k.cu(c,d,e,g,h);b.rotate(a.angle,k.x,k.y);w.B(k)}}f=P.prototype; -f.T=function(a){void 0===a&&(a=!1);if(!0!==Gj(this)){sl(this,!0);ul(this,!0);var b=this.U;null!==b?a||b.T():(a=this.h,null!==a&&(a.fg.add(this),this instanceof S&&(a.ka.sb||this.yf(),null!==this.Md&&Hl(this.Md)),a.Se()));if(this instanceof z){if(this.ha===ej||this.ha===gh)a=this.Qf(),null!==a&&a.T(!0);a=this.Ca.q;for(var b=a.length,c=0;ca?a=0:1a||1=a&&w.m("GraphObject.scale must be greater than zero"),this.ec=a,this.Vg(),this.T(),this.j("scale",b,a))});w.g(P,"angle",P.prototype.angle); -w.defineProperty(P,{angle:"angle"},function(){return this.vn},function(a){var b=this.vn;b!==a&&(t&&w.p(a,P,"angle"),a%=360,0>a&&(a+=360),b!==a&&(this.vn=a,this.T(),this.Vg(),this.j("angle",b,a)))});w.g(P,"desiredSize",P.prototype.ya); -w.defineProperty(P,{ya:"desiredSize"},function(){return this.pf},function(a){var b=this.pf;b.L(a)||(t&&w.l(a,fa,P,"desiredSize"),this.pf=a=a.ba(),this.T(),this instanceof W&&this.se(),this.j("desiredSize",b,a),a=this.V,null!==a&&0!==(this.ia&1024)&&(nl(this,a,"width"),nl(this,a,"height")))});w.g(P,"width",P.prototype.width); -w.defineProperty(P,{width:"width"},function(){return this.pf.width},function(a){if(this.pf.width!==a){t&&w.i(a,"number",P,"width");var b=this.pf;this.pf=a=(new fa(a,this.pf.height)).freeze();this.T();this instanceof W&&this.se();this.j("desiredSize",b,a);b=this.V;null!==b&&0!==(this.ia&1024)&&nl(this,b,"width")}});w.g(P,"height",P.prototype.height); -w.defineProperty(P,{height:"height"},function(){return this.pf.height},function(a){if(this.pf.height!==a){t&&w.i(a,"number",P,"height");var b=this.pf;this.pf=a=(new fa(this.pf.width,a)).freeze();this.T();this instanceof W&&this.se();this.j("desiredSize",b,a);b=this.V;null!==b&&0!==(this.ia&1024)&&nl(this,b,"height")}});w.g(P,"minSize",P.prototype.Re); -w.defineProperty(P,{Re:"minSize"},function(){return this.xj},function(a){var b=this.xj;b.L(a)||(t&&w.l(a,fa,P,"minSize"),a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.xj=a,this.T(),this.j("minSize",b,a))});w.g(P,"maxSize",P.prototype.Pd); -w.defineProperty(P,{Pd:"maxSize"},function(){return this.vj},function(a){var b=this.vj;b.L(a)||(t&&w.l(a,fa,P,"maxSize"),a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.vj=a,this.T(),this.j("maxSize",b,a))});w.A(P,{Ga:"measuredBounds"},function(){return this.Uc});w.A(P,{Ka:"naturalBounds"},function(){return this.Lc},{configurable:!0});w.g(P,"margin",P.prototype.margin); -w.defineProperty(P,{margin:"margin"},function(){return this.tr},function(a){"number"===typeof a?a=new eb(a):t&&w.l(a,eb,P,"margin");var b=this.tr;b.L(a)||(this.tr=a=a.ba(),this.T(),this.j("margin",b,a))});w.A(P,{transform:null},function(){0!==(this.ia&2048)===!0&&zl(this);return this.Yd});w.A(P,{Nf:null},function(){0!==(this.ia&4096)===!0&&zl(this);return this.un});w.g(P,"alignment",P.prototype.alignment); -w.defineProperty(P,{alignment:"alignment"},function(){return this.ye},function(a){var b=this.ye;b.L(a)||(t?w.l(a,K,P,"alignment"):a.ue()&&!a.Pc()&&w.m("alignment must be a real Spot or Spot.Default"),this.ye=a=a.ba(),Hl(this),this.j("alignment",b,a))});w.g(P,"column",P.prototype.column);w.defineProperty(P,{column:"column"},function(){return this.nq},function(a){t&&w.p(a,P,"column");a=Math.round(a);var b=this.nq;b!==a&&(0>a&&w.la(a,">= 0",P,"column"),this.nq=a,this.T(),this.j("column",b,a))}); -w.g(P,"columnSpan",P.prototype.eE);w.defineProperty(P,{eE:"columnSpan"},function(){return this.fj},function(a){t&&w.i(a,"number",P,"columnSpan");a=Math.round(a);var b=this.fj;b!==a&&(1>a&&w.la(a,">= 1",P,"columnSpan"),this.fj=a,this.T(),this.j("columnSpan",b,a))});w.g(P,"row",P.prototype.qc);w.defineProperty(P,{qc:"row"},function(){return this.ms},function(a){t&&w.p(a,P,"row");a=Math.round(a);var b=this.ms;b!==a&&(0>a&&w.la(a,">= 0",P,"row"),this.ms=a,this.T(),this.j("row",b,a))}); -w.g(P,"rowSpan",P.prototype.rowSpan);w.defineProperty(P,{rowSpan:"rowSpan"},function(){return this.Dj},function(a){t&&w.i(a,"number",P,"rowSpan");a=Math.round(a);var b=this.Dj;b!==a&&(1>a&&w.la(a,">= 1",P,"rowSpan"),this.Dj=a,this.T(),this.j("rowSpan",b,a))});w.g(P,"alignmentFocus",P.prototype.Fi); -w.defineProperty(P,{Fi:"alignmentFocus"},function(){return this.gq},function(a){var b=this.gq;b.L(a)||(t?w.l(a,K,P,"alignmentFocus"):a.ue()&&!a.Pc()&&w.m("alignmentFocus must be a real Spot or Spot.Default"),this.gq=a=a.ba(),this.T(),this.j("alignmentFocus",b,a))});w.g(P,"portId",P.prototype.wd); -w.defineProperty(P,{wd:"portId"},function(){return this.Yr},function(a){var b=this.Yr;if(b!==a){t&&null!==a&&w.i(a,"string",P,"portId");var c=this.V;null===c||c instanceof S||(w.m("portID being set on a Link: "+a),c=null);null!==b&&null!==c&&Ol(c,this);this.Yr=a;if(null!==a&&c){c.yh=!0;null===c.Wd&&Pl(c);var d=this.wd;null!==d&&c.Wd.add(d,this)}this.j("portId",b,a)}});function Ql(a){var b={value:null};Rl(a,b);return b.value} -function Rl(a,b){var c=a.U;return null===c||!Rl(c,b)&&a.visible?(b.value=a,!1):!0}function Ll(a){var b=a.V;b instanceof S&&(a=a.h,null===a||a.ka.sb||b.yf())}w.g(P,"toSpot",P.prototype.yb);w.defineProperty(P,{yb:"toSpot"},function(){return null!==this.S?this.S.Nj:yb},function(a){null===this.S&&this.Oe();var b=this.S.Nj;b.L(a)||(t&&w.l(a,K,P,"toSpot"),a=a.ba(),this.S.Nj=a,this.j("toSpot",b,a),Ll(this))});w.g(P,"toEndSegmentLength",P.prototype.mk); -w.defineProperty(P,{mk:"toEndSegmentLength"},function(){return null!==this.S?this.S.Lj:10},function(a){null===this.S&&this.Oe();var b=this.S.Lj;b!==a&&(t&&w.i(a,"number",P,"toEndSegmentLength"),0>a&&w.la(a,">= 0",P,"toEndSegmentLength"),this.S.Lj=a,this.j("toEndSegmentLength",b,a),Ll(this))});w.g(P,"toEndSegmentDirection",P.prototype.Wp); -w.defineProperty(P,{Wp:"toEndSegmentDirection"},function(){return null!==this.S?this.S.Kj:ll},function(a){null===this.S&&this.Oe();var b=this.S.Kj;b!==a&&(t&&w.za(a,S,P,"toEndSegmentDirection"),this.S.Kj=a,this.j("toEndSegmentDirection",b,a),Ll(this))});w.g(P,"toShortLength",P.prototype.Yp); -w.defineProperty(P,{Yp:"toShortLength"},function(){return null!==this.S?this.S.Mj:0},function(a){null===this.S&&this.Oe();var b=this.S.Mj;b!==a&&(t&&w.i(a,"number",P,"toShortLength"),this.S.Mj=a,this.j("toShortLength",b,a),Ll(this))});w.g(P,"toLinkable",P.prototype.qB);w.defineProperty(P,{qB:"toLinkable"},function(){return this.Hs},function(a){var b=this.Hs;b!==a&&(t&&null!==a&&w.i(a,"boolean",P,"toLinkable"),this.Hs=a,this.j("toLinkable",b,a))});w.g(P,"toMaxLinks",P.prototype.KG); -w.defineProperty(P,{KG:"toMaxLinks"},function(){return this.Is},function(a){var b=this.Is;b!==a&&(t&&w.i(a,"number",P,"toMaxLinks"),0>a&&w.la(a,">= 0",P,"toMaxLinks"),this.Is=a,this.j("toMaxLinks",b,a))});w.g(P,"fromSpot",P.prototype.wb);w.defineProperty(P,{wb:"fromSpot"},function(){return null!==this.S?this.S.mj:yb},function(a){null===this.S&&this.Oe();var b=this.S.mj;b.L(a)||(t&&w.l(a,K,P,"fromSpot"),a=a.ba(),this.S.mj=a,this.j("fromSpot",b,a),Ll(this))});w.g(P,"fromEndSegmentLength",P.prototype.ek); -w.defineProperty(P,{ek:"fromEndSegmentLength"},function(){return null!==this.S?this.S.kj:10},function(a){null===this.S&&this.Oe();var b=this.S.kj;b!==a&&(t&&w.i(a,"number",P,"fromEndSegmentLength"),0>a&&w.la(a,">= 0",P,"fromEndSegmentLength"),this.S.kj=a,this.j("fromEndSegmentLength",b,a),Ll(this))});w.g(P,"fromEndSegmentDirection",P.prototype.$o); -w.defineProperty(P,{$o:"fromEndSegmentDirection"},function(){return null!==this.S?this.S.jj:ll},function(a){null===this.S&&this.Oe();var b=this.S.jj;b!==a&&(t&&w.za(a,S,P,"fromEndSegmentDirection"),this.S.jj=a,this.j("fromEndSegmentDirection",b,a),Ll(this))});w.g(P,"fromShortLength",P.prototype.ap); -w.defineProperty(P,{ap:"fromShortLength"},function(){return null!==this.S?this.S.lj:0},function(a){null===this.S&&this.Oe();var b=this.S.lj;b!==a&&(t&&w.i(a,"number",P,"fromShortLength"),this.S.lj=a,this.j("fromShortLength",b,a),Ll(this))});w.g(P,"fromLinkable",P.prototype.bA);w.defineProperty(P,{bA:"fromLinkable"},function(){return this.Hq},function(a){var b=this.Hq;b!==a&&(t&&null!==a&&w.i(a,"boolean",P,"fromLinkable"),this.Hq=a,this.j("fromLinkable",b,a))});w.g(P,"fromMaxLinks",P.prototype.ME); -w.defineProperty(P,{ME:"fromMaxLinks"},function(){return this.Iq},function(a){var b=this.Iq;b!==a&&(t&&w.i(a,"number",P,"fromMaxLinks"),0>a&&w.la(a,">= 0",P,"fromMaxLinks"),this.Iq=a,this.j("fromMaxLinks",b,a))});w.g(P,"cursor",P.prototype.cursor);w.defineProperty(P,{cursor:"cursor"},function(){return this.uq},function(a){var b=this.uq;b!==a&&(w.i(a,"string",P,"cursor"),this.uq=a,this.j("cursor",b,a))});w.g(P,"click",P.prototype.click); -w.defineProperty(P,{click:"click"},function(){return null!==this.R?this.R.di:null},function(a){null===this.R&&il(this);var b=this.R.di;b!==a&&(null!==a&&w.i(a,"function",P,"click"),this.R.di=a,this.j("click",b,a))});w.g(P,"doubleClick",P.prototype.Pm);w.defineProperty(P,{Pm:"doubleClick"},function(){return null!==this.R?this.R.ki:null},function(a){null===this.R&&il(this);var b=this.R.ki;b!==a&&(null!==a&&w.i(a,"function",P,"doubleClick"),this.R.ki=a,this.j("doubleClick",b,a))}); -w.g(P,"contextClick",P.prototype.ft);w.defineProperty(P,{ft:"contextClick"},function(){return null!==this.R?this.R.fi:null},function(a){null===this.R&&il(this);var b=this.R.fi;b!==a&&(null!==a&&w.i(a,"function",P,"contextClick"),this.R.fi=a,this.j("contextClick",b,a))});w.g(P,"mouseEnter",P.prototype.DA); -w.defineProperty(P,{DA:"mouseEnter"},function(){return null!==this.R?this.R.Er:null},function(a){null===this.R&&il(this);var b=this.R.Er;b!==a&&(null!==a&&w.i(a,"function",P,"mouseEnter"),this.R.Er=a,this.j("mouseEnter",b,a))});w.g(P,"mouseLeave",P.prototype.EA);w.defineProperty(P,{EA:"mouseLeave"},function(){return null!==this.R?this.R.Fr:null},function(a){null===this.R&&il(this);var b=this.R.Fr;b!==a&&(null!==a&&w.i(a,"function",P,"mouseLeave"),this.R.Fr=a,this.j("mouseLeave",b,a))}); -w.g(P,"mouseOver",P.prototype.Jt);w.defineProperty(P,{Jt:"mouseOver"},function(){return null!==this.R?this.R.ui:null},function(a){null===this.R&&il(this);var b=this.R.ui;b!==a&&(null!==a&&w.i(a,"function",P,"mouseOver"),this.R.ui=a,this.j("mouseOver",b,a))});w.g(P,"mouseHover",P.prototype.It); -w.defineProperty(P,{It:"mouseHover"},function(){return null!==this.R?this.R.ti:null},function(a){null===this.R&&il(this);var b=this.R.ti;b!==a&&(null!==a&&w.i(a,"function",P,"mouseHover"),this.R.ti=a,this.j("mouseHover",b,a))});w.g(P,"mouseHold",P.prototype.Ht);w.defineProperty(P,{Ht:"mouseHold"},function(){return null!==this.R?this.R.si:null},function(a){null===this.R&&il(this);var b=this.R.si;b!==a&&(null!==a&&w.i(a,"function",P,"mouseHold"),this.R.si=a,this.j("mouseHold",b,a))}); -w.g(P,"mouseDragEnter",P.prototype.GF);w.defineProperty(P,{GF:"mouseDragEnter"},function(){return null!==this.R?this.R.Cr:null},function(a){null===this.R&&il(this);var b=this.R.Cr;b!==a&&(null!==a&&w.i(a,"function",P,"mouseDragEnter"),this.R.Cr=a,this.j("mouseDragEnter",b,a))});w.g(P,"mouseDragLeave",P.prototype.HF); -w.defineProperty(P,{HF:"mouseDragLeave"},function(){return null!==this.R?this.R.Dr:null},function(a){null===this.R&&il(this);var b=this.R.Dr;b!==a&&(null!==a&&w.i(a,"function",P,"mouseDragLeave"),this.R.Dr=a,this.j("mouseDragLeave",b,a))});w.g(P,"mouseDrop",P.prototype.Gt);w.defineProperty(P,{Gt:"mouseDrop"},function(){return null!==this.R?this.R.ri:null},function(a){null===this.R&&il(this);var b=this.R.ri;b!==a&&(null!==a&&w.i(a,"function",P,"mouseDrop"),this.R.ri=a,this.j("mouseDrop",b,a))}); -w.g(P,"actionDown",P.prototype.Ez);w.defineProperty(P,{Ez:"actionDown"},function(){return null!==this.R?this.R.cq:null},function(a){null===this.R&&il(this);var b=this.R.cq;b!==a&&(null!==a&&w.i(a,"function",P,"actionDown"),this.R.cq=a,this.j("actionDown",b,a))});w.g(P,"actionMove",P.prototype.Fz); -w.defineProperty(P,{Fz:"actionMove"},function(){return null!==this.R?this.R.dq:null},function(a){null===this.R&&il(this);var b=this.R.dq;b!==a&&(null!==a&&w.i(a,"function",P,"actionMove"),this.R.dq=a,this.j("actionMove",b,a))});w.g(P,"actionUp",P.prototype.Gz);w.defineProperty(P,{Gz:"actionUp"},function(){return null!==this.R?this.R.eq:null},function(a){null===this.R&&il(this);var b=this.R.eq;b!==a&&(null!==a&&w.i(a,"function",P,"actionUp"),this.R.eq=a,this.j("actionUp",b,a))}); -w.g(P,"actionCancel",P.prototype.Dz);w.defineProperty(P,{Dz:"actionCancel"},function(){return null!==this.R?this.R.bq:null},function(a){null===this.R&&il(this);var b=this.R.bq;b!==a&&(null!==a&&w.i(a,"function",P,"actionCancel"),this.R.bq=a,this.j("actionCancel",b,a))});w.g(P,"toolTip",P.prototype.gu); -w.defineProperty(P,{gu:"toolTip"},function(){return null!==this.R?this.R.Bi:null},function(a){null===this.R&&il(this);var b=this.R.Bi;b!==a&&(null!==a&&w.l(a,tf,P,"toolTip"),this.R.Bi=a,this.j("toolTip",b,a))});w.g(P,"contextMenu",P.prototype.contextMenu);w.defineProperty(P,{contextMenu:"contextMenu"},function(){return null!==this.R?this.R.gi:null},function(a){null===this.R&&il(this);var b=this.R.gi;b!==a&&(null!==a&&w.l(a,tf,P,"contextMenu"),this.R.gi=a,this.j("contextMenu",b,a))}); -P.prototype.bind=P.prototype.bind=function(a){a.og=this;var b=this.Xo();null!==b&&Sl(b)&&w.m("Cannot add a Binding to a template that has already been copied: "+a);null===this.Kc&&(this.Kc=new D(kf));this.Kc.add(a)};P.prototype.findTemplateBinder=P.prototype.Xo=function(){for(var a=this instanceof z?this:this.U;null!==a;){if(null!==a.Nl)return a;a=a.U}return null};P.fromSvg=P.fromSVG=function(a){return Tl(a)};P.prototype.setProperties=function(a){w.au(this,a)};var Ul; -P.make=Ul=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var g=Vl.Aa(a);"function"===typeof g?(c=w.il(arguments),d=g(c)):e=aa[a]}null===d&&(void 0===e&&(d=window.$,void 0!==d&&void 0!==d.noop&&w.m("GraphObject.make failed to complete. Is it conflicting with another $ var? (such as jQuery)"),w.m("GraphObject.make failed to complete, it may be conflicting with another var.")),null!==e&&e.constructor||w.m("GraphObject.make requires a class function or class name, not: "+ -a),d=new e);g=1;if(d instanceof C&&1e)&&w.m("Must specify non-negative integer row for RowColumnDefinition "+ -b),a.ge=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&w.m("Must specify non-negative integer column for RowColumnDefinition "+b),a.ge=!1,a.index=e);e=new na;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);w.au(a,e)}else w.au(a,b);else w.m('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var Vl=new ia("string","function"); -P.getBuilders=function(){var a=new ia("string","function"),b;for(b in Vl)if(b!==b.toLowerCase()){var c=Vl[b];"function"===typeof c&&a.add(b,c)}a.freeze();return a};var Gm;P.defineBuilder=Gm=function(a,b){w.i(a,"string",P,"defineBuilder:name");w.i(b,"function",P,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||w.m("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);Vl.add(a,b)}; -Gm("Button",function(){var a=new ea(Be);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new ea(Be);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=Ul(z,ej,{Uw:!0},{_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue"},Ul(W,{name:"ButtonBorder",Bb:"Rectangle",G:new K(0,0,2.761423749153968,2.761423749153968),H:new K(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.DA=function(a,b){var e=b.qe("ButtonBorder");if(e instanceof -W){var g=b._buttonFillOver;b._buttonFillNormal=e.fill;e.fill=g;g=b._buttonStrokeOver;b._buttonStrokeNormal=e.stroke;e.stroke=g}};a.EA=function(a,b){var e=b.qe("ButtonBorder");e instanceof W&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)};return a}); -Gm("TreeExpanderButton",function(){var a=Ul("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Ul(W,{name:"ButtonIcon",Bb:"MinusLine",ya:J.$p},(new kf("figure","isTreeExpanded",function(a,c){var d=c.U;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).ox()),{visible:!1},(new kf("visible","isTreeLeaf",function(a){return!a})).ox());a.click=function(a,c){var d=c.V;d instanceof tf&&(d=d.Nh);if(d instanceof S){var e=d.h;if(null!==e){e=e.Ab;if(d.Qc){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; -a.Oc=!0;d.Qc?e.collapseTree(d):e.expandTree(d)}}};return a}); -Gm("SubGraphExpanderButton",function(){var a=Ul("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Ul(W,{name:"ButtonIcon",Bb:"MinusLine",ya:J.$p},(new kf("figure","isSubGraphExpanded",function(a,c){var d=c.U;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).ox()));a.click=function(a,c){var d=c.V;d instanceof tf&&(d=d.Nh);if(d instanceof T){var e=d.h;if(null!==e){e=e.Ab;if(d.Ld){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.Oc= -!0;d.Ld?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});Gm("ContextMenuButton",function(){var a=Ul("Button");a.stretch=hl;var b=a.qe("ButtonBorder");b instanceof W&&(b.Bb="Rectangle",b.G=new K(0,0,2,3),b.H=new K(1,1,-2,-2));return a}); -Gm("PanelExpanderButton",function(a){var b="COLLAPSIBLE";"string"===typeof a[1]&&(b=a[1],a.splice(1,1));a=Ul("Button",Ul(W,"TriangleUp",{ya:new fa(6,4)},(new kf("figure","visible",function(a){return a?"TriangleUp":"TriangleDown"})).ox(b)));var c=a.qe("ButtonBorder");c instanceof W&&(c.stroke=null,c.fill="transparent");a.click=function(a,c){var g=c.h;if(null!==g){var h=c.V.qe(b);null!==h&&(g.ac("Collapse/Expand Panel"),h.visible=!h.visible,g.ae("Collapse/Expand Panel"))}};return a}); -function jl(){this.gi=this.Bi=this.bq=this.eq=this.dq=this.cq=this.ri=this.Dr=this.Cr=this.si=this.ti=this.ui=this.Fr=this.Er=this.fi=this.ki=this.di=null}jl.prototype.copy=function(){var a=new jl;a.di=this.di;a.ki=this.ki;a.fi=this.fi;a.Er=this.Er;a.Fr=this.Fr;a.ui=this.ui;a.ti=this.ti;a.si=this.si;a.Cr=this.Cr;a.Dr=this.Dr;a.ri=this.ri;a.cq=this.cq;a.dq=this.dq;a.eq=this.eq;a.bq=this.bq;a.Bi=this.Bi;a.gi=this.gi;return a}; -function z(a){P.call(this);void 0===a?0===arguments.length?this.ha=Mh:w.m("invalid argument to Panel constructor: undefined"):(w.za(a,z,z,"type"),this.ha=a);this.Ca=new D(P);this.$e=J.aq;this.Wg=!1;this.ha===ij&&(this.Wg=!0);this.Tq=!1;this.xq=zc;this.ji=fl;this.ha===Il&&Hm(this);this.Co=Jh;this.Mq=(new fa(10,10)).freeze();this.Nq=J.nk;this.Nl=this.rh=null;this.hr=NaN;this.hg=this.oi=null;this.co="category";this.gg=null;this.Di=new y(NaN,NaN,NaN,NaN);this.xm=null;this.yh=!1;this.ns=null}w.Ia(z,P); -w.Ph(z);w.ja("Panel",z);function Hm(a){a.gj=J.aq;a.uh=1;a.ii=null;a.Sl=null;a.th=1;a.sh=null;a.Rl=null;a.Ed=[];a.xd=[];a.qm=Im;a.Pl=Im;a.Ci=0;a.pi=0} -z.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.ha=this.ha;a.$e=this.$e.ba();a.Wg=this.Wg;a.Tq=this.Tq;a.xq=this.xq.ba();a.ji=this.ji;if(a.ha===Il){a.gj=this.gj.ba();a.uh=this.uh;a.ii=this.ii;a.Sl=this.Sl;a.th=this.th;a.sh=this.sh;a.Rl=this.Rl;var b=[];if(0a&&w.la(a,">= 0",z,"padding"),a=new eb(a)):(w.l(a,eb,z,"padding"),0>a.left&&w.la(a.left,">= 0",z,"padding:value.left"),0>a.right&&w.la(a.right,">= 0",z,"padding:value.right"),0>a.top&&w.la(a.top,">= 0",z,"padding:value.top"),0>a.bottom&&w.la(a.bottom,">= 0",z,"padding:value.bottom"));var b=this.$e;b.L(a)||(this.$e=a=a.ba(),this.T(),this.j("padding",b,a))});w.g(z,"defaultAlignment",z.prototype.Xj); -w.defineProperty(z,{Xj:"defaultAlignment"},function(){return this.xq},function(a){var b=this.xq;b.L(a)||(t&&w.l(a,K,z,"defaultAlignment"),this.xq=a=a.ba(),this.T(),this.j("defaultAlignment",b,a))});w.g(z,"defaultStretch",z.prototype.td);w.defineProperty(z,{td:"defaultStretch"},function(){return this.ji},function(a){var b=this.ji;b!==a&&(w.za(a,P,z,"defaultStretch"),this.ji=a,this.T(),this.j("defaultStretch",b,a))});w.g(z,"defaultSeparatorPadding",z.prototype.xI); -w.defineProperty(z,{xI:"defaultSeparatorPadding"},function(){return void 0===this.gj?J.aq:this.gj},function(a){if(void 0!==this.gj){"number"===typeof a?a=new eb(a):t&&w.l(a,eb,z,"defaultSeparatorPadding");var b=this.gj;b.L(a)||(this.gj=a=a.ba(),this.j("defaultSeparatorPadding",b,a))}});w.g(z,"defaultRowSeparatorStroke",z.prototype.vI); -w.defineProperty(z,{vI:"defaultRowSeparatorStroke"},function(){return void 0===this.ii?null:this.ii},function(a){var b=this.ii;b!==a&&(null===a||"string"===typeof a||a instanceof ea)&&(a instanceof ea&&a.freeze(),this.ii=a,this.j("defaultRowSeparatorStroke",b,a))});w.g(z,"defaultRowSeparatorStrokeWidth",z.prototype.wI); -w.defineProperty(z,{wI:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.uh?1:this.uh},function(a){if(void 0!==this.uh){var b=this.uh;b!==a&&isFinite(a)&&0<=a&&(this.uh=a,this.j("defaultRowSeparatorStrokeWidth",b,a))}});w.g(z,"defaultRowSeparatorDashArray",z.prototype.uI); -w.defineProperty(z,{uI:"defaultRowSeparatorDashArray"},function(){return void 0===this.Sl?null:this.Sl},function(a){if(void 0!==this.Sl){var b=this.Sl;if(b!==a){null===a||Array.isArray(a)||w.sc(a,"Array",z,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.rt,e=d.width,d=d.height,g=this.Ka,h=g.width,g=g.height,k=Math.ceil(h/e),l=Math.ceil(g/d),m=this.iA;a.save();a.beginPath();a.rect(0,0,h,g);a.clip();for(var n=[],p=this.Ca.q,q=p.length,r=0;re*s*c))break}a.stroke()}else if("LineH"===E.Bb){a.lineWidth= -E.ib;Bl(this,a,E.stroke,!1,!1);a.beginPath();for(O=A=Math.floor(-m.y/d);O<=A+l&&!(M=O*d+m.y,0<=M&&M<=g&&Jm(O,s,u)&&(v&&!B?ml(a,0,M,h,M,G,E.gd):(a.moveTo(0,M),a.lineTo(h,M)),2>d*s*c));O++);a.stroke()}else if("BarV"===E.Bb)for(Bl(this,a,E.fill,!0,!1),E=E.width,isNaN(E)&&(E=e),O=A=Math.floor(-m.x/e);O<=A+k&&!(M=O*e+m.x,0<=M&&Me*s*c));O++);else if("BarH"===E.Bb)for(Bl(this,a,E.fill,!0,!1),E=E.height,isNaN(E)&&(E=d),O=A=Math.floor(-m.y/d);O<=A+l&&!(M=O*d+m.y,0<=M&& -M<=g&&Jm(O,s,u)&&(a.fillRect(0,M,h,E),2>d*s*c));O++);v&&(void 0!==a.setLineDash?(a.setLineDash(w.nh),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=w.nh,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0))}}a.restore();gj(b,a,!1)}else{this.ha===Il&&(a.lineCap="butt",Km(this,a,!0,this.Ed,!0),Km(this,a,!1,this.xd,!0),Lm(this,a,!0,this.Ed),Lm(this,a,!1,this.xd),Km(this,a,!0,this.Ed,!1),Km(this,a,!1,this.xd,!1));(c=this.qA)&&a.save();e=this.Qf();d=this.Ca.q; -h=d.length;for(g=0;gg.height&&(m-=r-g.height):r>g.width&&(m-=r-g.width);l=l.position+m/2;b.lineWidth=m;r=a.padding;c?(l+=r.top,m=r.left,r=g.width-r.right,n&&!p?ml(b,m,l,r,l,q,0):(b.moveTo(m,l),b.lineTo(r,l))):(l+=r.left,m=r.top,r=g.height-r.bottom,n&&!p?ml(b,l,m,l,r,q,0):(b.moveTo(l,m),b.lineTo(l,r)));b.stroke();n&&(void 0!==b.setLineDash?(b.setLineDash(w.nh),b.lineDashOffset=0):void 0!==b.webkitLineDash?(b.webkitLineDash=w.nh,b.webkitLineDashOffset=0):void 0!==b.mozDash&&(b.mozDash=null,b.mozDashOffset=0))}}}} -function Km(a,b,c,d,e){for(var g=d.length,h=a.ea,k=0;km)){var n=l.ug(),p=l.jn;isNaN(p)&&(p=c?a.uh:a.th);var q=l.hn;null===q&&(q=c?a.ii:a.sh);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Ua;p+n>m&&(n=m-p);0>=n||(m=a.padding,Bl(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 Jm(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dud&&(Hc=ud),ka.Ua+=Hc,ud=Math.max(ud-Hc,0));1!==wa.fj||ce!==yh&&ce!==gl||(ka=this.hd(Zc),Hc=Math.max(df-ka.Ua,0),Hc>Gc&&(Hc=Gc),ka.Ua+=Hc,Gc=Math.max(Gc-Hc,0));vg&&wa.gp()}}}w.xa(Ug);for(var wc=0,de=0,Qa=this.et,pa=0;pa=this.Xt);Sb++)ka=this.jd(wa.qc+Sb),Le.height+=Math.max(ka.Wh,isNaN(ka.af)?ka.Af: -Math.min(ka.af,ka.Af));for(Sb=1;Sb=this.et);Sb++)ka=this.hd(wa.column+Sb),Le.width+=Math.max(ka.Wh,isNaN(ka.af)?ka.Af:Math.min(ka.af,ka.Af));ub.width+=Le.width;ub.height+=Le.height;Rb=wa.margin;Wf=Rb.right+Rb.left;Xf=Rb.top+Rb.bottom;Xh(wa,ub.width,ub.height,sm,Di);for(var Ke=wa.Ga,df=Math.max(Ke.width+Wf,0),Kd=Math.max(Ke.height+Xf,0),Dh=0,Sb=0;Sb=this.Xt);Sb++)ka=this.jd(wa.qc+Sb),Dh+=ka.total||0;if(DhMd&&(ka.Ua=Math.min(ka.Af,Md+Ld),ka.Db!==Md&&(Ld-=ka.Db-Md));if(-1===ka.index-1)break;ka=this.jd(ka.index-1)}for(var Yf=0,Sb=0;Sb=this.et);Sb++)ka=this.hd(wa.column+Sb),Yf+=ka.total||0;if(YfMd&&(ka.Ua=Math.min(ka.Af,Md+Ld),ka.Db!==Md&&(Ld-=ka.Db-Md));if(-1===ka.index-1)break;ka=this.hd(ka.index-1)}}w.xa($c);w.dk(Le);w.dk(ub);for(var Zf=0,ef=0,ce=rl(this,!0),Nd=this.ya,$f=this.Pd,ue=de=wc=0,vd=0,Qa=this.et,pa=0;pa< -Qa;pa++)void 0!==this.xd[pa]&&(ka=this.hd(pa),isFinite(ka.width)?(ue+=ka.width,ue+=ka.ug()):Om(ka)===Pm?(ue+=ka.Db,ue+=ka.ug()):0!==ka.Db&&(wc+=ka.Db,wc+=ka.ug()));var Zf=isFinite(Nd.width)?Math.min(Nd.width,$f.width):ce!==yh&&isFinite(ae)?ae:wc,Zf=Math.max(Zf,this.Re.width),Zf=Math.max(Zf-ue,0),Eh=Math.max(Zf/wc,1);isFinite(Eh)||(Eh=1);for(pa=0;paFh)Xh(Tb,Infinity,Infinity),ee=Tb.Ga,Ne.$h(ee),this.ej.add(ee);else{var cg=Tb.Df,Tp=Tb.Yt,vm=Tb.Fi;vm.ue()&&(vm=Ob);var Ki=Tb.Zt,Wr=Tb.eB,Li=0,Mi=0,ik=0;if(cg<-Fh||cg>=Fh){var Up=yg.EF,Ni=yg.DF;Ki!==jh&&(ik=yg.computeAngle(Tb,Ki,Ni),Tb.angle=ik);Li=Up.x-ff.x;Mi=Up.y-ff.y}else{var zf,Hh;if(0<=cg)zf=Ii.na(cg),Hh=cgc||p>d)this.T(),Xh(this,n>c?c:n,p>d?d:p);break;case hd:this.T(!0);Xh(this,c+r,d+s,0,0);break;case hl:this.T(!0);Xh(this,c+r,p+s,0,0);break;case gl:this.T(!0),Xh(this,n+r,d+s,0,0)}}k=this.ea;k.x=a;k.y= -b;k.width=c;k.height=d;var u=this.ha.Xb;switch(u){case "Position":for(var v=g.length,A=e.x-this.padding.left,E=e.y-this.padding.top,B=0;B=this.Xt);pa++){var wa=this.jd(tb+pa);sd.height+=wa.total}for(pa=1;pa=this.et);pa++){var Yc=this.hd($d+pa);sd.width+=Yc.total}var Tg=ae.Db+sd.width,Ah=Xc.Db+sd.height;h.x=Wc;h.y=Oc;h.width=Tg;h.height=Ah;var Zc=Wc,Bh=Oc,Zb=Tg,Ug=Ah;Wc+Tg>e.width&&(Zb=Math.max(e.width-Wc,0));Oc+Ah>e.height&&(Ug=Math.max(e.height-Oc,0));var $c=Qa.alignment,qe=0,Pc=0,td=0,Gc=0;if($c.Pc()){$c= -this.Xj;$c.kd()||($c=Ob);var qe=$c.x,Pc=$c.y,td=$c.offsetX,Gc=$c.offsetY,ud=ae.alignment,Uf=Xc.alignment;ud.kd()&&(qe=ud.x,td=ud.offsetX);Uf.kd()&&(Pc=Uf.y,Gc=Uf.offsetY)}else qe=$c.x,Pc=$c.y,td=$c.offsetX,Gc=$c.offsetY;if(isNaN(qe)||isNaN(Pc))Pc=qe=.5,Gc=td=0;var ka=Ie.width,re=Ie.height,Je=Qa.margin,Xj=Je.left+Je.right,Yj=Je.top+Je.bottom,Hc=Jl(Qa,Xc,ae,!1);!isNaN(Qa.ya.width)||Hc!==hd&&Hc!==hl||(ka=Math.max(Tg-Xj,0));!isNaN(Qa.ya.height)||Hc!==hd&&Hc!==gl||(re=Math.max(Ah-Yj,0));var lb=Qa.Pd,mb= -Qa.Re,ka=Math.min(lb.width,ka),re=Math.min(lb.height,re),ka=Math.max(mb.width,ka),re=Math.max(mb.height,re),Zj=re+Yj;h.x+=h.width*qe-(ka+Xj)*qe+td+Je.left;h.y+=h.height*Pc-Zj*Pc+Gc+Je.top;Qa.visible&&(ob(Zc,Bh,Zb,Ug,h.x,h.y,Ie.width,Ie.height)?Qa.Fc(h.x,h.y,ka,re):Qa.Fc(h.x,h.y,ka,re,new y(Zc,Bh,Zb,Ug)))}else{Qa.Vg();Qa.bc.Na();var Vf=Qa.bc;Vf.x=be.type===wl?Sg:Wc;Vf.y=be.type===xl?Tf:Oc;Vf.width=Ie.width;Vf.height=Ie.height;Qa.bc.freeze();ul(Qa,!1)}}w.dk(sd);for(tb=0;tb=ub){var Zf=this.EF,ef=this.DF;Sb!==jh&&(Yf=this.computeAngle(Ic,Sb,ef),Ic.angle=Yf);Ld=Zf.x;Md=Zf.y}else{var Nd=void 0,$f=void 0;if(0<=Qc)Nd=te.q[Qc],$f=Qcp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof z?m:null;p=w.mh();p.set(h);if(null!==m?m.ck(a,b,c,d,e,p):ql(n,a,d,p))null!== -b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);w.df(p)}}}void 0===g&&w.df(h);return d}void 0===g&&w.df(h);return!1};function Wm(a,b,c,d){for(var e=a.Ca.q,g=e.length;g--;){var h=e[g];if(h.visible){var k=h.ea,l=a.Ka;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof z&&Wm(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}} -f.Qm=function(a,b,c,d,e,g){if(!1===this.Cf)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ka,k=this.bg(),l=k?a:Xa(w.ic(a.x,a.y),this.transform),m=k?b:Xa(w.ic(b.x,b.y),this.transform),n=l.Zj(m),p=0s.width||r.y>s.height||0>r.x+r.width||0>r.y+r.height||(q.bg()?(r=q.transform,Xa(k.set(a),r),Xa(l.set(b),r)):(k.set(a),l.set(b)),r=q,q=q instanceof z?q:null,null!==q?!q.Qm(k,l,c,d,e,g):!r.IE(k,l,e))||(null!==c&&(r=c(r)),null===r||null!==d&&!d(r)||g.add(r))}}w.B(k);w.B(l)}return e? -p:h}return!1};function Mm(a){var b=a.G;if(void 0===b||b===zc)b=null;null===b&&a instanceof W&&(a=a.Ta,null!==a&&(b=a.G));null===b&&(b=Ab);return b}function Nm(a){var b=a.H;if(void 0===b||b===zc)b=null;null===b&&a instanceof W&&(a=a.Ta,null!==a&&(b=a.H));null===b&&(b=Wb);return b}z.prototype.add=z.prototype.add=function(a){w.l(a,P,z,"add:element");this.ce(this.Ca.count,a)};z.prototype.elt=z.prototype.na=function(a){return this.Ca.na(a)}; -z.prototype.insertAt=z.prototype.ce=function(a,b){b instanceof H&&w.m("Cannot add a Part to a Panel: "+b);if(this===b||this.sl(b))this===b&&w.m("Cannot make a Panel contain itself: "+this.toString()),w.m("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.U;null!==c&&c!==this&&w.m("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.ha!==ij||b instanceof W||w.m("Can only add Shapes to a Grid Panel, not: "+b);b.Cl(this);b.lm=null;if(null!==this.ax){var d=b.data;null!==d&&"object"===typeof d&&(null===this.gg&&(this.gg=new ia(Object,z)),this.gg.add(d,b))}var e=this.Ca,d=-1;if(c===this){for(var g=-1,h=this.Ca.q,k=h.length,l=0;l=e.count&&a>=e.count)return;e.md(g);d=g}else w.m("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0> -a||a>e.count)a=e.count;e.ce(a,b);this.T();b.T();null!==b.wd?this.yh=!0:b instanceof z&&!0===b.yh&&(this.yh=!0);c=this.V;null!==c&&(c.Tk=null,c.uj=NaN,this.yh&&c instanceof S&&(c.yh=!0),c.yh&&(c.Wd=null),e=this.h,null!==e&&e.ka.sb||(-1!==d&&c.Hc(ie,"elements",this,b,null,d,null),c.Hc(he,"elements",this,null,b,null,a)))};z.prototype.remove=z.prototype.remove=function(a){w.l(a,P,z,"remove:element");for(var b=this.Ca.q,c=b.length,d=-1,e=0;ea&&w.la(a,">= 0",z,"getRowDefinition:idx");a=Math.round(a);var b=this.Ed;if(void 0===b[a]){var c=new af;c.Cl(this);c.ge=!0;c.index=a;b[a]=c}return b[a]};z.prototype.removeRowDefinition=z.prototype.$F=function(a){t&&w.p(a,z,"removeRowDefinition:idx");0>a&&w.la(a,">= 0",z,"removeRowDefinition:idx");a=Math.round(a);var b=this.Ed;this.Hc(ie,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.T()}; -w.A(z,{et:"columnCount"},function(){return void 0===this.xd?0:this.xd.length});z.prototype.getColumnDefinition=z.prototype.hd=function(a){t&&w.p(a,z,"getColumnDefinition:idx");0>a&&w.la(a,">= 0",z,"getColumnDefinition:idx");a=Math.round(a);var b=this.xd;if(void 0===b[a]){var c=new af;c.Cl(this);c.ge=!1;c.index=a;b[a]=c}return b[a]}; -z.prototype.removeColumnDefinition=z.prototype.WF=function(a){t&&w.p(a,z,"removeColumnDefinition:idx");0>a&&w.la(a,">= 0",z,"removeColumnDefinition:idx");a=Math.round(a);var b=this.xd;this.Hc(ie,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.T()};w.g(z,"rowSizing",z.prototype.lG); -w.defineProperty(z,{lG:"rowSizing"},function(){return void 0===this.qm?Im:this.qm},function(a){if(void 0!==this.qm){var b=this.qm;b!==a&&(a!==Im&&a!==Pm&&w.m("rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"),this.qm=a,this.T(),this.j("rowSizing",b,a))}});w.g(z,"columnSizing",z.prototype.dE); -w.defineProperty(z,{dE:"columnSizing"},function(){return void 0===this.Pl?Im:this.Pl},function(a){if(void 0!==this.Pl){var b=this.Pl;b!==a&&(a!==Im&&a!==Pm&&w.m("columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"),this.Pl=a,this.T(),this.j("columnSizing",b,a))}});w.g(z,"topIndex",z.prototype.eK); -w.defineProperty(z,{eK:"topIndex"},function(){return void 0===this.Ci?0:this.Ci},function(a){if(void 0!==this.Ci){var b=this.Ci;b!==a&&((!isFinite(a)||0>a)&&w.m("topIndex must be greater than zero and a real number. Was "+a),this.Ci=a,this.T(),this.j("topIndex",b,a))}});w.g(z,"leftIndex",z.prototype.jJ); -w.defineProperty(z,{jJ:"leftIndex"},function(){return void 0===this.pi?0:this.pi},function(a){if(void 0!==this.pi){var b=this.pi;b!==a&&((!isFinite(a)||0>a)&&w.m("leftIndex must be greater than zero and a real number. Was "+a),this.pi=a,this.T(),this.j("leftIndex",b,a))}});z.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==Il)return NaN;for(var b=0,c=this.Ed,d=c.length,e=this.Ci;ea)return-1;if(this.type!==Il)return NaN;for(var b=0,c=this.xd,d=c.length,e=this.pi;e=c.elements.count&&!(c instanceof H)){if(1===c.elements.count){var d=null!==c.ax;if(!d)for(var e=b.k;e.next();)if("itemArray"===e.value.Vp){d=!0; -break}}d||(w.trace("Auto or Spot Panel should not have zero or one elements: "+c.toString()+" in "+a.toString()),Xm=!0)}}))}var Xm=!1; -z.prototype.updateTargetBindings=z.prototype.Rb=function(a){var b=this.Nl;if(null!==b)for(void 0===a&&(a=""),b=b.k;b.next();){var c=b.value,d=c.mB;if(""===a||""===d||d===a)if(d=c.Vp,null!==c.jE||""!==d){var d=this.data,e=c.El;if(null!==e)d=""===e?this:"."===e?this:".."===e?this:this.qe(e);else{var g=this.h;null!==g&&c.Xp&&(d=g.fa.yp)}if(null===d)t&&w.trace("Binding error: missing GraphObject named "+e+" in "+this.toString());else{var g=this,h=c.kk;if(-1!==h){if(g=this.Hw(h),null===g)continue}else null!== -c.og&&(g=c.og);"."===e?d=g:".."===e&&(d=g.U);e=c.sz;if(0!==e){if(!(g instanceof z))continue;h=g;1===e?g=h.hd(c.Xv):2===e&&(g=h.jd(c.Xv))}void 0!==g&&c.XG(g,d)}}}};w.g(z,"itemArray",z.prototype.ax); -w.defineProperty(z,{ax:"itemArray"},function(){return this.oi},function(a){var b=this.oi;if(b!==a){t&&null!==a&&!w.isArray(a)&&w.m("Panel.itemArray must be an Array-like object or null, not: "+a);var c=this.h;null!==c&&null!==b&&Uj(c,this);this.oi=a;null!==c&&null!==a&&Rj(c,this);this.j("itemArray",b,a);null!==c&&c.ka.sb||this.QA()}});function wk(a){return a.type===wh||a.type===ej||a.type===gh||a.type===Il&&0a;)this.ef(a);a=this.ax;if(null!==a)for(var b=w.vb(a),c=0;cc)){var d=a.getCategoryForItemData(b,c),d=a.findTemplateForItemData(b,c,d);if(null!==d){vf(d);d=d.copy();"object"===typeof b&&(null===a.gg&&(a.gg=new ia(Object,z)),a.gg.add(b,d));var e=c;wk(a)&&e++;a.ce(e,d);xk(a,e,c);d.data=b}}} -function xk(a,b,c){for(a=a.Ca;ba&&w.la(a,">= 0",af,"height"),this.af=a,this.Ua=this.Db,null!==this.U&&this.U.T(),this.Wc("height",b,a))});w.g(af,"width",af.prototype.width); -w.defineProperty(af,{width:"width"},function(){return this.af},function(a){var b=this.af;b!==a&&(t&&w.i(a,"number",af,"width"),0>a&&w.la(a,">= 0",af,"width"),this.af=a,this.Ua=this.Db,null!==this.U&&this.U.T(),this.Wc("width",b,a))});w.g(af,"minimum",af.prototype.Wh); -w.defineProperty(af,{Wh:"minimum"},function(){return this.yj},function(a){var b=this.yj;b!==a&&(t&&w.i(a,"number",af,"minimum"),(0>a||!isFinite(a))&&w.la(a,">= 0",af,"minimum"),this.yj=a,this.Ua=this.Db,null!==this.U&&this.U.T(),this.Wc("minimum",b,a))});w.g(af,"maximum",af.prototype.Af); -w.defineProperty(af,{Af:"maximum"},function(){return this.wj},function(a){var b=this.wj;b!==a&&(t&&w.i(a,"number",af,"maximum"),0>a&&w.la(a,">= 0",af,"maximum"),this.wj=a,this.Ua=this.Db,null!==this.U&&this.U.T(),this.Wc("maximum",b,a))});w.g(af,"alignment",af.prototype.alignment);w.defineProperty(af,{alignment:"alignment"},function(){return this.ye},function(a){var b=this.ye;b.L(a)||(t&&w.l(a,K,af,"alignment"),this.ye=a.ba(),null!==this.U&&this.U.T(),this.Wc("alignment",b,a))}); -w.g(af,"stretch",af.prototype.stretch);w.defineProperty(af,{stretch:"stretch"},function(){return this.Kh},function(a){var b=this.Kh;b!==a&&(t&&w.za(a,P,af,"stretch"),this.Kh=a,null!==this.U&&this.U.T(),this.Wc("stretch",b,a))});w.g(af,"separatorPadding",af.prototype.fB); -w.defineProperty(af,{fB:"separatorPadding"},function(){return this.Gj},function(a){"number"===typeof a?a=new eb(a):null!==a&&t&&w.l(a,eb,af,"separatorPadding");var b=this.Gj;null!==a&&null!==b&&b.L(a)||(null!==a&&(a=a.ba()),this.Gj=a,null!==this.U&&this.U.T(),this.Wc("separatorPadding",b,a))});w.g(af,"separatorStroke",af.prototype.hn); -w.defineProperty(af,{hn:"separatorStroke"},function(){return this.ws},function(a){var b=this.ws;b!==a&&(null===a||"string"===typeof a||a instanceof ea)&&(a instanceof ea&&a.freeze(),this.ws=a,null!==this.U&&this.U.T(),this.Wc("separatorStroke",b,a))});w.g(af,"separatorStrokeWidth",af.prototype.jn);w.defineProperty(af,{jn:"separatorStrokeWidth"},function(){return this.xs},function(a){var b=this.xs;b!==a&&(this.xs=a,null!==this.U&&this.U.T(),this.Wc("separatorStrokeWidth",b,a))}); -w.g(af,"separatorDashArray",af.prototype.sG); -w.defineProperty(af,{sG:"separatorDashArray"},function(){return this.Gh},function(a){var b=this.Gh;if(b!==a){null===a||Array.isArray(a)||w.sc(a,"Array",af,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){for(var k=c[0],l=c[1],p=0,q=0,r=0,s=m=0,u=q=0,v=w.lb(),A=2;Au){w.xa(v);return}e>m?(E= -e-m,e=m):E=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),-(g/2));0===E&&d.bk(a,b);a.translate(h/2,g/2);a.rotate(-s);a.translate(-k,-l);u-=e;m-=e;if(0!==E){q++;if(q===v.length){w.xa(v);return}m=v[q];p=m[0];s=m[1];r=m[2];m=m[3];e=E}}w.xa(v)}} -W.prototype.bk=function(a,b){if(null!==this.Ec||null!==this.nd){null!==this.nd&&Bl(this,a,this.nd,!0,!1);null!==this.Ec&&Bl(this,a,this.Ec,!1,!1);var c=this.dh;if(0===c){var d=this.V;d instanceof tf&&d.type===gh&&d.wc instanceof W&&(c=d.wc.ib)}a.lineWidth=c;a.lineJoin=this.yo;a.lineCap=this.xo;a.miterLimit=this.wm;var e=!1;this.V&&b.Fh.drawShadows&&(e=this.V.Ti);var g=!0;null!==this.Ec&&null===this.nd&&(g=!1);var d=!1,h=!0,k=this.Gx;null!==k&&(d=!0,void 0!==a.setLineDash?(a.setLineDash(k),a.lineDashOffset= -this.gd):void 0!==a.webkitLineDash?(a.webkitLineDash=k,a.webkitLineDashOffset=this.gd):void 0!==a.mozDash?(a.mozDash=k,a.mozDashOffset=this.gd):h=!1);var l=this.Ta;if(null!==l){if(l.ha===id)a.beginPath(),d&&!h?ml(a,l.lc,l.vc,l.nb,l.zb,k,this.gd):(a.moveTo(l.lc,l.vc),a.lineTo(l.nb,l.zb)),null!==this.nd&&Cl(a,this.nd),0!==c&&null!==this.Ec&&El(a);else if(l.ha===jd){var m=l.lc,n=l.vc,p=l.nb,q=l.zb,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.nd&&(a.beginPath(),a.rect(l, -r,m,n),Cl(a,this.nd));if(null!==this.Ec){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=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(),cn(a,h,k,this.gd),El(a),w.xa(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),El(a));g&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.ha===kd)m=l.lc,n=l.vc,p=l.nb,q=l.zb,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+J.wa*l,n-r,m+l,n-J.wa*r,m+l,n),a.bezierCurveTo(m+l,n+J.wa*r,m+J.wa*l,n+r,m,n+r),a.bezierCurveTo(m-J.wa*l,n+r,m-l,n+J.wa*r,m-l,n),a.bezierCurveTo(m-l,n-J.wa*r,m-J.wa*l,n-r,m,n-r),a.closePath(),null!==this.nd&&Cl(a,this.nd),d&&!h&&(h=w.lb(),J.He(m,n-r,m+J.wa*l,n-r,m+l,n-J.wa*r,m+l,n,.5,h),J.He(m+l,n,m+l,n+J.wa*r,m+J.wa*l,n+r,m,n+r,.5,h),J.He(m,n+r,m-J.wa*l,n+r,m-l,n+J.wa*r,m-l,n,.5,h),J.He(m-l,n, -m-l,n-J.wa*r,m-J.wa*l,n-r,m,n-r,.5,h),a.beginPath(),cn(a,h,k,this.gd),w.xa(h)),0!==c&&null!==this.Ec&&(u=s=p=0,g&&e&&(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0),El(a),g&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u));else if(l.ha===fd){r=l.ij;n=r.length;for(q=0;qA.Yh);else for(var v=Jd(A,m),E=v.length,B=0;Be))if(h=b[0],k=b[1],4===e)ml(a,h,k,b[2],b[3],c,d);else{a.moveTo(h,k);for(var n=0,p=0,q=0,r=p=l=0,s=w.lb(),u=2;ur&&(e=r);e>l?(v=e-l,e=l):v=0;var A=Math.sqrt(e*e/ -(1+q*q));0>n&&(A=-A);h+=A;k+=q*A;m?a.lineTo(h,k):a.moveTo(h,k);r-=e;l-=e;if(0!==v){p++;if(p===s.length){w.xa(s);return}l=s[p];n=l[0];q=l[1];l=l[2];e=v}else m=!m}w.xa(s)}}W.prototype.getDocumentPoint=W.prototype.qb=function(a,b){void 0===b&&(b=new x);a.ue()&&w.m("getDocumentPoint:s Spot must be real: "+a.toString());var c=this.Ka,d=this.ib;b.o(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY);this.Nf.fb(b);return b}; -W.prototype.Uj=function(a,b){var c=this.Ta;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.kb,e=this.ib/2;c.type!==id||b||(e+=2);var g=w.$f();g.assign(d);g.Sf(e+2,e+2);if(!g.Ea(a))return w.nc(g),!1;d=e+1E-4;if(c.type===id){if(null===this.stroke)return!1;d=(c.D-c.ra)*(a.x-c.ra)+(c.F-c.sa)*(a.y-c.sa);if(0>(c.ra-c.D)*(a.x-c.D)+(c.sa-c.F)*(a.y-c.F)||0>d)return!1;w.nc(g);return J.Od(c.ra,c.sa,c.D,c.F,e,a.x,a.y)}if(c.type===jd){var h=c.ra,k=c.sa,l=c.D,m=c.F,c=Math.min(h,l),n=Math.min(k, -m),h=Math.abs(l-h),k=Math.abs(m-k);g.x=c;g.y=n;g.width=h;g.height=k;if(null===this.fill){g.Sf(-d,-d);if(g.Ea(a))return w.nc(g),!1;g.Sf(d,d)}null!==this.stroke&&g.Sf(e,e);e=g.Ea(a);w.nc(g);return e}if(c.type===kd){h=c.ra;k=c.sa;l=c.D;m=c.F;c=Math.min(h,l);n=Math.min(k,m);h=Math.abs(l-h);k=Math.abs(m-k);h/=2;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.nc(g),!1;h+=d;k+=d}null!==this.stroke&&(h+=e,k+=e);w.nc(g);return 0>=h||0>=k?!1:1>=c*c/ -(h*h)+n*n/(k*k)}if(c.type===fd)return w.nc(g),null===this.fill?Rd(c,a.x,a.y,e):c.Ea(a,e,1=this.ib)n=J.ih(p.lc,p.vc,p.nb,p.zb,g,h,k,l,e);else{var r=0,s=0;p.lc===p.nb?(r=m,s=0):(b=(p.zb-p.vc)/(p.nb-p.lc),s=m/Math.sqrt(1+b*b),r=s*b);d=w.lb();b=new x;J.ih(p.lc+ -r,p.vc+s,p.nb+r,p.zb+s,g,h,k,l,b)&&d.push(b);b=new x;J.ih(p.lc-r,p.vc-s,p.nb-r,p.zb-s,g,h,k,l,b)&&d.push(b);b=new x;J.ih(p.lc+r,p.vc+s,p.lc-r,p.vc-s,g,h,k,l,b)&&d.push(b);b=new x;J.ih(p.nb+r,p.zb+s,p.nb-r,p.zb-s,g,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return w.xa(d),!1;n=!0;s=Infinity;for(r=0;rMath.abs(c)){n=h-b-c*(g-d);if(0>a*a*c*c+v*v-n*n){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+v*v-n*n);k=(-(a*a*c*n)+a*v*m)/(v*v+a*a*c*c)+d;a=(-(a*a*c*n)-a*v*m)/(v*v+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||J.rb(l.y,e))&&(l.ye||J.rb(l.x,e))&&(l.x=h&&d<=a}a=h&&g<=a} -W.prototype.IE=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.Uj(a,!0))return!0;var e=a.Zj(b);b=e;1.5=e||$a(b,g,0,-p)>=e||$a(b,g,0,p)>=e||$a(b,g,n,0)>=e?!1:!0}else if(g.type=== -fd){h=g.kb;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&Ya(a.x,a.y,k,l,m,l)>e&&Ya(a.x,a.y,m,h,k,h)>e&&Ya(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?Rd(g,a.x,a.y,b):g.Ea(a,b,!0))return!0}else{c=g.pb;for(b=0;be)return!1;l=k.Fa.q;m=l.length;for(h=0;he)return!1;break;case Fd:g=w.lb();J.He(n,p,q.Ib,q.Ub, -q.we,q.xe,q.D,q.F,.8,g);n=d(g,a);w.xa(g);if(n)return!1;n=q.D;p=q.F;if(a.jt(n,p)>e)return!1;break;case Gd:g=w.lb();J.Hp(n,p,q.Ib,q.Ub,q.D,q.F,.8,g);n=d(g,a);w.xa(g);if(n)return!1;n=q.D;p=q.F;if(a.jt(n,p)>e)return!1;break;case Hd:case Id:var q=q.type===Hd?Jd(q,k):Od(q,k,n,p),r=q.length,s=null,g=w.lb();for(b=0;b= 0",W,"strokeWidth:value")}); -w.g(W,"strokeCap",W.prototype.EG);w.defineProperty(W,{EG:"strokeCap"},function(){return this.xo},function(a){var b=this.xo;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?w.la(a,'"butt", "round", or "square"',W,"strokeCap"):(this.xo=a,this.pa(),this.j("strokeCap",b,a)))});w.g(W,"strokeJoin",W.prototype.ZJ); -w.defineProperty(W,{ZJ:"strokeJoin"},function(){return this.yo},function(a){var b=this.yo;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?w.la(a,'"miter", "bevel", or "round"',W,"strokeJoin"):(this.yo=a,this.pa(),this.j("strokeJoin",b,a)))});w.g(W,"strokeMiterLimit",W.prototype.$J); -w.defineProperty(W,{$J:"strokeMiterLimit"},function(){return this.wm},function(a){var b=this.wm;if(b!==a)if(t&&w.p(a,W,"strokeMiterLimit"),0 0",W,"strokeWidth:value")});w.g(W,"strokeDashArray",W.prototype.Gx); -w.defineProperty(W,{Gx:"strokeDashArray"},function(){return this.vm},function(a){var b=this.vm;if(b!==a){null===a||Array.isArray(a)||w.sc(a,"Array",W,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;em*k*k&&(h=!0);b.Sg!==a&&(h=!1);!1===b.hA("textGreeking")&&(h=!1);for(var m=this.Ij,k=this.Jj,l=this.Ye,n=0;nc&&(p=c);var g=g+m,r=q,q=a,s=g,u=c, -v=d,A=0;h?("start"===this.Xd||"left"===this.Xd?A=0:"end"===this.Xd||"right"===this.Xd?A=u-p:"center"===this.Xd?A=(u-p)/2:w.m("textAlign must be start, end, left, right, or center"),q.fillRect(0+A,s+.25*v,p,1)):("start"===this.Xd||"left"===this.Xd?A=0:"end"===this.Xd||"right"===this.Xd?A=u:"center"===this.Xd?A=u/2:w.m("textAlign must be start, end, left, right, or center"),q.fillText(r,0+A,s+v-.25*v),r=v/20|0,0===r&&(r=1),this.$l&&("end"===this.Xd||"right"===this.Xd?A-=p:"center"===this.Xd&&(A-=p/ -2),q.beginPath(),q.lineWidth=r,q.moveTo(0+A,s+v-.2*v),q.lineTo(0+A+p,s+v-.2*v),q.stroke()),this.Zl&&(q.beginPath(),q.lineWidth=r,s=s+v-v/2.2|0,0!==r%2&&(s+=.5),q.moveTo(0,s),q.lineTo(0+p,s),q.stroke()));g+=d+k}}}; -oa.prototype.wp=function(a,b,c,d){var e=this.oj;e.reset();var g=0,h=0;if(isNaN(this.ya.width)){g=this.oe.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===g.length)g=0;else if(this.Zw){for(var k=h=0,l=!1;!l;){var m=g.indexOf("\n",k);-1===m&&(m=g.length,l=!0);k=An(g.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.Tg);k>h&&(h=k);k=m+1}g=h}else h=g.indexOf("\n",0),0<=h&&(g=g.substr(0,h)),g=k=An(g,this.Tg);g=Math.min(g,a/this.scale);g=Math.max(8,g)}else g=this.ya.width;null!==this.U&&(g=Math.min(g,this.U.Pd.width), -g=Math.max(g,this.U.Re.width));h=yn(this,g,e);m=h=isNaN(this.ya.height)?Math.min(h,b/this.scale):this.ya.height;if(0!==e.Ze&&1!==e.ze.length&&this.Wk===vn&&(b=this.Tg,l=this.Wk===vn?Bn(b):0,k=this.Ij+this.Jj,k=Math.max(0,zn(this)+k),m=Math.max(Math.floor(m/k)-1,0),!(m+1>=e.ze.length))){k=e.ze[m];for(a=Math.max(1,a-l);An(k,b)>a&&1=a.qi)return new fa(0,l);if(a.zm===tn){c.Pj=1;g=An(b,k);if(0===h||g<=d)return c.Ze=g,c.nf.push(c.Ze),c.ze.push(b),new fa(g,l);var m=Cn(b);b=b.substr(m.length);for(var n=Cn(b),g=An(m+n,k);0d&&1d;){n=1;g=An(m.substr(0,n),k);for(h=0;g<=d;)n++,h=g,g=An(m.substr(0,n),k);1===n?(c.nf[a.Ye+p]=g,e=Math.max(e,g)):(c.nf[a.Ye+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.ze[a.Ye+p]=m.substr(0,n);p++;m=m.substr(n);if(a.Ye+p>a.qi)break}n=Cn(b);for(g=An(m+n,k);0a.qi))break}c.Pj=Math.min(a.qi,p);c.Ze=Math.max(c.Ze,e);return new fa(c.Ze,l*c.Pj)}function Cn(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)}function An(a,b){rn!==b&&(rn=sn.font=b);return sn.measureText(a).width} -function zn(a){if(null!==a.Sn)return a.Sn;var b=a.Tg;rn!==b&&(rn=sn.font=b);var c=0;void 0!==mn[b]&&5E3>nn?c=mn[b]:(c=1.3*sn.measureText("M").width,mn[b]=c,nn++);return a.Sn=c}function Bn(a){rn!==a&&(rn=sn.font=a);var b=0;void 0!==on[a]&&5E3>pn?b=on[a]:(b=sn.measureText(qn).width,on[a]=b,pn++);return b} -function yn(a,b,c){var d=a.oe.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.Ij+a.Jj,e=Math.max(0,zn(a)+e);if(0===d.length)return c.Ze=0,a.Ye=1,e;if(!a.Zw){var g=d.indexOf("\n",0);0<=g&&(d=d.substr(0,g))}for(var g=0,h=a.Ye=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.zm!==tn?(c.Pj=0,h=xn(a,h,c,b),g+=h.height,a.Ye+=c.Pj):(xn(a,h,c,b),g+=e,a.Ye++),a.Ye===a.qi&&(l=!0)),h=k+1;return a.qv=g}w.g(oa,"textValidation",oa.prototype.fu); -w.defineProperty(oa,{fu:"textValidation"},function(){return this.Zk},function(a){var b=this.Zk;b!==a&&(null!==a&&w.i(a,"function",oa,"textValidation"),this.Zk=a,this.j("textValidation",b,a))});w.g(oa,"spacingAbove",oa.prototype.WJ);w.defineProperty(oa,{WJ:"spacingAbove"},function(){return this.Ij},function(a){var b=this.Ij;b!==a&&(t&&w.i(a,"number",oa,"spacingAbove"),this.Ij=a,this.j("spacingAbove",b,a))});w.g(oa,"spacingBelow",oa.prototype.XJ); -w.defineProperty(oa,{XJ:"spacingBelow"},function(){return this.Jj},function(a){var b=this.Jj;b!==a&&(t&&w.i(a,"number",oa,"spacingBelow"),this.Jj=a,this.j("spacingBelow",b,a))});w.g(oa,"maxLines",oa.prototype.pJ);w.defineProperty(oa,{pJ:"maxLines"},function(){return this.qi},function(a){var b=this.qi;b!==a&&(t&&w.i(a,"number",oa,"maxLines"),a=Math.floor(a),0>=a&&w.la(a,"> 0",oa,"maxLines"),this.qi=a,this.j("maxLines",b,a),this.T())});w.A(oa,{KK:"metrics"},function(){return this.oj}); -function ln(){this.Ze=this.Pj=0;this.nf=[];this.ze=[]}ln.prototype.reset=function(){this.Ze=this.Pj=0;this.nf=[];this.ze=[]};ln.prototype.gt=function(a){this.Pj=a.Pj;this.Ze=a.Ze;this.nf=w.il(a.nf);this.ze=w.il(a.ze)};w.A(ln,{iK:"arrSize"},function(){return this.nf});w.A(ln,{jK:"arrText"},function(){return this.ze});w.A(ln,{JK:"maxLineWidth"},function(){return this.Ze}); -function Xl(){P.call(this);this.Qd=null;this.Bs="";this.Hj=(new y(NaN,NaN,NaN,NaN)).freeze();this.Wn=hd;this.Fs=this.qf=null;this.fv=this.Oq=this.gm=!1;this.Uu=!0;this.to=null;this.PC=0}w.Ia(Xl,P);w.ja("Picture",Xl);var Dn=new na,En=0,Fn=[],Gn=-1,Ui=[],Hn;Xl.clearCache=Hn=function(a){void 0===a&&(a="");w.i(a,"string",Xl,"clearCache:url");""!==a?Dn[a]&&(delete Dn[a],En--):(Dn=new na,En=0)}; -Xl.prototype.cloneProtected=function(a){P.prototype.cloneProtected.call(this,a);a.element=this.Qd;a.Bs=this.Bs;a.Hj.assign(this.Hj);a.Wn=this.Wn;a.qf=this.qf;a.to=this.to};Xl.prototype.toString=function(){return"Picture("+this.source+")#"+w.Yc(this)};w.g(Xl,"element",Xl.prototype.element); -w.defineProperty(Xl,{element:"element"},function(){return this.Qd},function(a){var b=this.Qd;if(b!==a){a instanceof HTMLImageElement||a instanceof HTMLVideoElement||a instanceof HTMLCanvasElement||w.m("Picture.element must be an instance of Image, Canvas, or Video.");this.Oq=!1;var c=this;a instanceof HTMLCanvasElement?this.fv=!0:(this.fv=!1,a.onerror=function(a){c.Oq=!0;null!==c.qf&&c.qf(c,a)});this.Qd=a;!0===a.complete||void 0===a.complete?(this.gm=!0,this.ya.J()||(sl(this,!1),this.T())):(Fn.push(this), --1===Gn&&(Gn=w.setInterval(function(){for(var a=[],b=Fn,c=b.length,h=0;hn.Ko.length&&(Jn(n,4,k,h),Jn(n,16,k,h));for(var r=n.Ko,s=r.length,p=r[0],u=0;ue;e++)a.lineTo(d[e].x*b,d[e].y*c); -w.xa(d);Ad(a);b=a.s;b.G=new K(.2,.22);b.H=new K(.8,.9);w.v(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=J.jl(6);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;6>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);Ad(a);b=a.s;b.G=new K(.07,.25);b.H=new K(.93,.75);w.v(a);return b},Heptagon:function(a,b,c){var d=J.jl(7);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;7>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);Ad(a);b=a.s;b.G=new K(.2,.15);b.H=new K(.8,.85);w.v(a);return b},Octagon:function(a, -b,c){var d=J.jl(8);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;8>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);Ad(a);b=a.s;b.G=new K(.15,.15);b.H=new K(.85,.85);w.v(a);return b},Nonagon:function(a,b,c){var d=J.jl(9);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;9>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);Ad(a);b=a.s;b.G=new K(.17,.13);b.H=new K(.82,.82);w.v(a);return b},Decagon:function(a,b,c){var d=J.jl(10);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d); -Ad(a);b=a.s;b.G=new K(.16,.16);b.H=new K(.84,.84);w.v(a);return b},Dodecagon:function(a,b,c){var d=J.jl(12);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);Ad(a);b=a.s;b.G=new K(.16,.16);b.H=new K(.84,.84);w.v(a);return b},FivePointedStar:function(a,b,c){var d=J.Nm(5);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);Ad(a);b=a.s;b.G=new K(.312,.383);b.H=new K(.693,.765);w.v(a);return b},SixPointedStar:function(a,b, -c){var d=J.Nm(6);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);Ad(a);b=a.s;b.G=new K(.17,.251);b.H=new K(.833,.755);w.v(a);return b},SevenPointedStar:function(a,b,c){var d=J.Nm(7);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;14>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);Ad(a);b=a.s;b.G=new K(.363,.361);b.H=new K(.641,.709);w.v(a);return b},EightPointedStar:function(a,b,c){var d=J.Nm(8);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;16>e;e++)a.lineTo(d[e].x* -b,d[e].y*c);w.xa(d);Ad(a);b=a.s;b.G=new K(.252,.255);b.H=new K(.75,.75);w.v(a);return b},NinePointedStar:function(a,b,c){var d=J.Nm(9);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;18>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);Ad(a);b=a.s;b.G=new K(.355,.361);b.H=new K(.645,.651);w.v(a);return b},TenPointedStar:function(a,b,c){var d=J.Nm(10);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;20>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.xa(d);Ad(a);b=a.s;b.G=new K(.281,.261);b.H=new K(.723,.748);w.v(a);return b}, -FivePointedBurst:function(a,b,c){var d=J.Po(5);a=w.u();L(a,d[0].x*b,d[0].y*c,!0);for(var e=1;ea&&(a=.15);var d=w.u(), -e=.2*J.wa;L(d,0,.2*c,!0);N(d,0,(.2-e)*c,(.2-e)*b,0,.2*b,0);d.lineTo(.8*b,0);N(d,(.8+e)*b,0,1*b,(.2-e)*c,1*b,.2*c);d.lineTo(1*b,.8*c);N(d,1*b,(.8+e)*c,(.8+e)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);N(d,(.2-e)*b,1*c,0,(.8+e)*c,0,.8*c);d.lineTo(0,.2*c);L(d,0,a*c,!1);d.lineTo(1*b,a*c);d.eb(!1);b=d.s;b.G=new K(0,a);b.H=new K(1,1-a);w.v(d);return b},DividedProcess:function(a,b,c){a=a?a.Dc:NaN;if(isNaN(a)||.1>a)a=.1;var d=w.u();L(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Ad(d);L(d,0,a*c,!1); -d.lineTo(1*b,a*c);d.eb(!1);b=d.s;b.G=new K(0,a);b.H=Wb;w.v(d);return b},Document:function(a,b,c){c/=.8;a=w.u();L(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);N(a,.5*b,.4*c,.5*b,1*c,0,.7*c);Ad(a);b=a.s;b.G=Ab;b.H=new K(1,.6);w.v(a);return b},ExternalOrganization:function(a,b,c){a=a?a.Dc:NaN;if(isNaN(a)||.2>a)a=.2;var d=w.u();L(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Ad(d);L(d,a*b,0,!1);d.lineTo(0,a*c);d.moveTo(1*b,a*c);d.lineTo((1-a)*b,0);d.moveTo(0,(1-a)*c);d.lineTo(a* -b,1*c);d.moveTo((1-a)*b,1*c);d.lineTo(1*b,(1-a)*c);d.eb(!1);b=d.s;b.G=new K(a/2,a/2);b.H=new K(1-a/2,1-a/2);w.v(d);return b},ExternalProcess:function(a,b,c){a=w.u();L(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);Ad(a);L(a,.1*b,.4*c,!1);a.lineTo(.1*b,.6*c);a.moveTo(.9*b,.6*c);a.lineTo(.9*b,.4*c);a.moveTo(.6*b,.1*c);a.lineTo(.4*b,.1*c);a.moveTo(.4*b,.9*c);a.lineTo(.6*b,.9*c);a.eb(!1);b=a.s;b.G=new K(.25,.25);b.H=new K(.75,.75);w.v(a);return b},File:function(a,b,c){a=w.u();L(a, -0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);Ad(a);L(a,.75*b,0,!1);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.25*c);a.eb(!1);b=a.s;b.G=new K(0,.25);b.H=Wb;w.v(a);return b},Interrupt:function(a,b,c){a=w.u();L(a,1*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);L(a,1*b,.5*c,!1);a.lineTo(1*b,1*c);L(a,1*b,.5*c,!1);a.lineTo(1*b,0);b=a.s;b.G=new K(0,.25);b.H=new K(.5,.75);w.v(a);return b},InternalStorage:function(a,b,c){var d=a?a.Dc:NaN;a=a?a.Ot:NaN;isNaN(d)&&(d= -.1);isNaN(a)&&(a=.1);var e=w.u();L(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(1*b,1*c);e.lineTo(0,1*c);Ad(e);L(e,d*b,0,!1);e.lineTo(d*b,1*c);e.moveTo(0,a*c);e.lineTo(1*b,a*c);e.eb(!1);b=e.s;b.G=new K(d,a);b.H=Wb;w.v(e);return b},Junction:function(a,b,c){a=w.u();var d=1/Math.SQRT2,e=(1-1/Math.SQRT2)/2,g=.5*J.wa;L(a,1*b,.5*c,!0);N(a,1*b,(.5+g)*c,(.5+g)*b,1*c,.5*b,1*c);N(a,(.5-g)*b,1*c,0,(.5+g)*c,0,.5*c);N(a,0,(.5-g)*c,(.5-g)*b,0,.5*b,0);N(a,(.5+g)*b,0,1*b,(.5-g)*c,1*b,.5*c);L(a,(e+d)*b,(e+d)*c,!1);a.lineTo(e* -b,e*c);a.moveTo(e*b,(e+d)*c);a.lineTo((e+d)*b,e*c);a.eb(!1);b=a.s;b.td=Jh;w.v(a);return b},LinedDocument:function(a,b,c){c/=.8;a=w.u();L(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);N(a,.5*b,.4*c,.5*b,1*c,0,.7*c);Ad(a);L(a,.1*b,0,!1);a.lineTo(.1*b,.75*c);a.eb(!1);b=a.s;b.G=new K(.1,0);b.H=new K(1,.6);w.v(a);return b},LoopLimit:function(a,b,c){a=w.u();L(a,0,1*c,!0);a.lineTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);Ad(a);b=a.s;b.G=new K(0,.25); -b.H=Wb;w.v(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=w.u();var d=.5*J.wa;L(a,.5*b,1*c,!0);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)*c,(.5+d)*b,.9*c,.6*b,.9*c);a.lineTo(1*b,.9*c);a.lineTo(1*b,1*c);a.lineTo(.5*b,1*c);b=a.s;b.G=new K(.15,.15);b.H=new K(.85,.8);w.v(a);return b},ManualInput:function(a,b,c){a=w.u();L(a,1*b,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.25*c);Ad(a);b=a.s; -b.G=new K(0,.25);b.H=Wb;w.v(a);return b},MessageFromUser:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.7);var d=w.u();L(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(a*b,.5*c);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Ad(d);b=d.s;b.G=Ab;b.H=new K(a,1);w.v(d);return b},MicroformProcessing:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.25);var d=w.u();L(d,0,0,!0);d.lineTo(.5*b,a*c);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.5*b,(1-a)*c);d.lineTo(0,1*c);Ad(d);b=d.s;b.G=new K(0,a);b.H=new K(1,1-a);w.v(d);return b},MicroformRecording:function(a, -b,c){a=w.u();L(a,0,0,!0);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.15*c);a.lineTo(1*b,.85*c);a.lineTo(.75*b,.75*c);a.lineTo(0,1*c);Ad(a);b=a.s;b.G=new K(0,.25);b.H=new K(1,.75);w.v(a);return b},MultiDocument:function(a,b,c){c/=.8;a=w.u();L(a,b,0,!0);a.lineTo(b,.5*c);N(a,.96*b,.47*c,.93*b,.45*c,.9*b,.44*c);a.lineTo(.9*b,.6*c);N(a,.86*b,.57*c,.83*b,.55*c,.8*b,.54*c);a.lineTo(.8*b,.7*c);N(a,.4*b,.4*c,.4*b,1*c,0,.7*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);a.lineTo(.1*b,.1*c);a.lineTo(.2*b,.1*c);a.lineTo(.2* -b,0);Ad(a);L(a,.1*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.54*c);a.moveTo(.2*b,.1*c);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.44*c);a.eb(!1);b=a.s;b.G=new K(0,.25);b.H=new K(.8,.77);w.v(a);return b},MultiProcess:function(a,b,c){a=w.u();L(a,.1*b,.1*c,!0);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);a.lineTo(1*b,0);a.lineTo(1*b,.8*c);a.lineTo(.9*b,.8*c);a.lineTo(.9*b,.9*c);a.lineTo(.8*b,.9*c);a.lineTo(.8*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);Ad(a);L(a,.2*b,.1*c,!1);a.lineTo(.9*b,.1*c); -a.lineTo(.9*b,.8*c);a.moveTo(.1*b,.2*c);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.9*c);a.eb(!1);b=a.s;b.G=new K(0,.2);b.H=new K(.8,1);w.v(a);return b},OfflineStorage:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.1);var d=1-a,e=w.u();L(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(.5*b,1*c);Ad(e);L(e,.5*a*b,a*c,!1);e.lineTo((1-.5*a)*b,a*c);e.eb(!1);b=e.s;b.G=new K(d/4+.5*a,a);b.H=new K(3*d/4+.5*a,a+.5*d);w.v(e);return b},OffPageConnector:function(a,b,c){a=w.u();L(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.5*c);a.lineTo(.75* -b,1*c);a.lineTo(0,1*c);Ad(a);b=a.s;b.G=Ab;b.H=new K(.75,1);w.v(a);return b},Or:function(a,b,c){a=w.u();var d=.5*J.wa;L(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);L(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.eb(!1);b=a.s;b.td=Jh;w.v(a);return b},PaperTape:function(a,b,c){c/=.8;a=w.u();L(a,0,.7*c,!0);a.lineTo(0,.3*c);N(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1* -b,.7*c);N(a,.5*b,.4*c,.5*b,1*c,0,.7*c);Ad(a);b=a.s;b.G=new K(0,.49);b.H=new K(1,.75);w.v(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Dc:NaN;a=a?a.Ot:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=w.u();L(e,0,0,!0);e.lineTo(1*b,0);e.lineTo((1-a)*b,.5*c);e.lineTo(1*b,1*c);e.lineTo(0,1*c);Ad(e);b=e.s;b.G=new K(d,0);b.H=new K(1-a,1);w.v(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Dc:NaN;a=a?a.Ot:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=w.u();L(e,0,0,!0);e.lineTo((1-a)*b,0);e.lineTo(1* -b,.5*c);e.lineTo((1-a)*b,1*c);e.lineTo(0,1*c);Ad(e);b=e.s;b.G=new K(d,0);b.H=new K(1-a,1);w.v(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.1);var d=w.u();L(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);Ad(d);L(d,(1-a)*b,0,!1);d.lineTo((1-a)*b,1*c);d.moveTo(a*b,0);d.lineTo(a*b,1*c);d.eb(!1);b=d.s;b.G=new K(a,0);b.H=new K(1-a,1);w.v(d);return b},Process:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.1);var d=w.u();L(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1* -b,1*c);d.lineTo(0,1*c);Ad(d);L(d,a*b,0,!1);d.lineTo(a*b,1*c);d.eb(!1);b=d.s;b.G=new K(a,0);b.H=Wb;w.v(d);return b},Sort:function(a,b,c){a=w.u();L(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);Ad(a);L(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.eb(!1);b=a.s;b.G=new K(.25,.25);b.H=new K(.75,.5);w.v(a);return b},Start:function(a,b,c){a=w.u();L(a,.25*b,0,!0);L(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);L(a,.25*b,0,!1);a.lineTo(.25*b,1*c);a.moveTo(.75* -b,0);a.lineTo(.75*b,1*c);a.eb(!1);b=a.s;b.G=new K(.25,0);b.H=new K(.75,1);w.v(a);return b},Terminator:function(a,b,c){a=w.u();L(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);b=a.s;b.G=new K(.23,0);b.H=new K(.77,1);w.v(a);return b},TransmittalTape:function(a,b,c){a=a?a.Dc:NaN;isNaN(a)&&(a=.1);var d=w.u();L(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.75*b,(1-a)*c);d.lineTo(0,(1-a)*c);Ad(d);b=d.s;b.G=Ab;b.H=new K(1,1-a);w.v(d);return b},AndGate:function(a, -b,c){a=w.u();var d=.5*J.wa;L(a,0,0,!0);a.lineTo(.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);Ad(a);b=a.s;b.G=Ab;b.H=new K(.55,1);w.v(a);return b},Buffer:function(a,b,c){a=w.u();L(a,0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);Ad(a);b=a.s;b.G=new K(0,.25);b.H=new K(.5,.75);w.v(a);return b},Clock:function(a,b,c){a=w.u();var d=.5*J.wa;L(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5- -d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);L(a,1*b,.5*c,!1);a.lineTo(1*b,.5*c);L(a,.8*b,.75*c,!1);a.lineTo(.8*b,.25*c);a.lineTo(.6*b,.25*c);a.lineTo(.6*b,.75*c);a.lineTo(.4*b,.75*c);a.lineTo(.4*b,.25*c);a.lineTo(.2*b,.25*c);a.lineTo(.2*b,.75*c);a.eb(!1);b=a.s;b.td=Jh;w.v(a);return b},Ground:function(a,b,c){a=w.u();L(a,.5*b,0,!1);a.lineTo(.5*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.3*b,.8*c);a.lineTo(.7*b,.8*c);a.moveTo(.4*b,1*c);a.lineTo(.6*b,1*c);b=a.s;w.v(a);return b}, -Inverter:function(a,b,c){a=w.u();var d=.1*J.wa;L(a,.8*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);L(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);N(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);N(a,.8*b,(.5-d)*c,(.9-d)*b,.4*c,.9*b,.4*c);N(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.s;b.G=new K(0,.25);b.H=new K(.4,.75);w.v(a);return b},NandGate:function(a,b,c){a=w.u();var d=J.wa,e=.5*d,g=.4*d,d=.1*d;L(a,.8*b,.5*c,!0);N(a,.8*b,(.5+g)*c,(.4+e)*b,1*c,.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0, -0);a.lineTo(.4*b,0);N(a,(.4+e)*b,0,.8*b,(.5-g)*c,.8*b,.5*c);L(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);N(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);N(a,.8*b,(.5-d)*c,(.9-d)*b,.4*c,.9*b,.4*c);N(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.s;b.G=new K(0,.05);b.H=new K(.55,.95);w.v(a);return b},NorGate:function(a,b,c){a=w.u();var d=J.wa,e=.5,g=d*e,h=0,k=.5;L(a,.8*b,.5*c,!0);N(a,.7*b,(k+g)*c,(h+g)*b,(k+e)*c,0,1*c);N(a,.25*b,.75*c,.25*b,.25*c,0,0);N(a,(h+g)*b,(k-e)*c,.7*b,(k-g)*c,.8*b,.5*c); -e=.1;g=.1*d;h=.9;k=.5;L(a,(h-e)*b,k*c,!0);N(a,(h-e)*b,(k-g)*c,(h-g)*b,(k-e)*c,h*b,(k-e)*c);N(a,(h+g)*b,(k-e)*c,(h+e)*b,(k-g)*c,(h+e)*b,k*c);N(a,(h+e)*b,(k+g)*c,(h+g)*b,(k+e)*c,h*b,(k+e)*c);N(a,(h-g)*b,(k+e)*c,(h-e)*b,(k+g)*c,(h-e)*b,k*c);b=a.s;b.G=new K(.2,.25);b.H=new K(.6,.75);w.v(a);return b},OrGate:function(a,b,c){a=w.u();var d=.5*J.wa;L(a,0,0,!0);N(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);N(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);N(a,.25*b,.75*c,.25*b,.25*c,0,0);Ad(a);b=a.s;b.G=new K(.2,.25);b.H= -new K(.75,.75);w.v(a);return b},XnorGate:function(a,b,c){a=w.u();var d=J.wa,e=.5,g=d*e,h=.2,k=.5;L(a,.1*b,0,!1);N(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);L(a,.8*b,.5*c,!0);N(a,.7*b,(k+g)*c,(h+g)*b,(k+e)*c,.2*b,1*c);N(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);N(a,(h+g)*b,(k-e)*c,.7*b,(k-g)*c,.8*b,.5*c);e=.1;g=.1*d;h=.9;k=.5;L(a,(h-e)*b,k*c,!0);N(a,(h-e)*b,(k-g)*c,(h-g)*b,(k-e)*c,h*b,(k-e)*c);N(a,(h+g)*b,(k-e)*c,(h+e)*b,(k-g)*c,(h+e)*b,k*c);N(a,(h+e)*b,(k+g)*c,(h+g)*b,(k+e)*c,h*b,(k+e)*c);N(a,(h-g)*b,(k+e)*c,(h- -e)*b,(k+g)*c,(h-e)*b,k*c);b=a.s;b.G=new K(.4,.25);b.H=new K(.65,.75);w.v(a);return b},XorGate:function(a,b,c){a=w.u();var d=.5*J.wa;L(a,.1*b,0,!1);N(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);L(a,.2*b,0,!0);N(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);N(a,.9*b,(.5+d)*c,(.2+d)*b,1*c,.2*b,1*c);N(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);Ad(a);b=a.s;b.G=new K(.4,.25);b.H=new K(.8,.75);w.v(a);return b},Capacitor:function(a,b,c){a=w.u();L(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.s;w.v(a);return b}, -Resistor:function(a,b,c){a=w.u();L(a,0,.5*c,!1);a.lineTo(.1*b,0);a.lineTo(.2*b,1*c);a.lineTo(.3*b,0);a.lineTo(.4*b,1*c);a.lineTo(.5*b,0);a.lineTo(.6*b,1*c);a.lineTo(.7*b,.5*c);b=a.s;w.v(a);return b},Inductor:function(a,b,c){a=w.u();var d=.1*J.wa,e=.1;L(a,(e-.5*d)*b,c,!1);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.3;N(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.5;N(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.7;N(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);N(a,(e- -d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.9;N(a,(e+.1)*b,0,(e+d)*b,c,(e+.5*d)*b,c);b=a.s;w.v(a);return b},ACvoltageSource:function(a,b,c){a=w.u();var d=.5*J.wa;L(a,0*b,.5*c,!1);N(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);N(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);N(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.s;b.td=Jh;w.v(a);return b},DCvoltageSource:function(a,b,c){a=w.u();L(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0); -a.lineTo(1*b,1*c);b=a.s;w.v(a);return b},Diode:function(a,b,c){a=w.u();L(a,1*b,0,!1);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);a.lineTo(1*b,1*c);b=a.s;b.G=new K(0,.25);b.H=new K(.5,.75);w.v(a);return b},Wifi:function(a,b,c){var d=b,e=c;b*=.38;c*=.6;a=w.u();var g=J.wa,h=.8*g,k=.8,l=0,m=.5,d=(d-b)/2,e=(e-c)/2;L(a,l*b+d,(m+k)*c+e,!0);N(a,(l-h)*b+d,(m+k)*c+e,(l-k)*b+d,(m+h)*c+e,(l-k)*b+d,m*c+e);N(a,(l-k)*b+d,(m-h)*c+e,(l-h)*b+d,(m-k)*c+e,l*b+d,(m-k)*c+e);N(a,l*b+d,(m-k)*c+e, -(l-k+.5*h)*b+d,(m-h)*c+e,(l-k+.5*h)*b+d,m*c+e);N(a,(l-k+.5*h)*b+d,(m+h)*c+e,l*b+d,(m+k)*c+e,l*b+d,(m+k)*c+e);Ad(a);h=.4*g;k=.4;l=.2;m=.5;L(a,l*b+d,(m+k)*c+e,!0);N(a,(l-h)*b+d,(m+k)*c+e,(l-k)*b+d,(m+h)*c+e,(l-k)*b+d,m*c+e);N(a,(l-k)*b+d,(m-h)*c+e,(l-h)*b+d,(m-k)*c+e,l*b+d,(m-k)*c+e);N(a,l*b+d,(m-k)*c+e,(l-k+.5*h)*b+d,(m-h)*c+e,(l-k+.5*h)*b+d,m*c+e);N(a,(l-k+.5*h)*b+d,(m+h)*c+e,l*b+d,(m+k)*c+e,l*b+d,(m+k)*c+e);Ad(a);h=.2*g;k=.2;m=l=.5;L(a,(l-k)*b+d,m*c+e,!0);N(a,(l-k)*b+d,(m-h)*c+e,(l-h)*b+d,(m-k)* -c+e,l*b+d,(m-k)*c+e);N(a,(l+h)*b+d,(m-k)*c+e,(l+k)*b+d,(m-h)*c+e,(l+k)*b+d,m*c+e);N(a,(l+k)*b+d,(m+h)*c+e,(l+h)*b+d,(m+k)*c+e,l*b+d,(m+k)*c+e);N(a,(l-h)*b+d,(m+k)*c+e,(l-k)*b+d,(m+h)*c+e,(l-k)*b+d,m*c+e);h=.4*g;k=.4;l=.8;m=.5;L(a,l*b+d,(m-k)*c+e,!0);N(a,(l+h)*b+d,(m-k)*c+e,(l+k)*b+d,(m-h)*c+e,(l+k)*b+d,m*c+e);N(a,(l+k)*b+d,(m+h)*c+e,(l+h)*b+d,(m+k)*c+e,l*b+d,(m+k)*c+e);N(a,l*b+d,(m+k)*c+e,(l+k-.5*h)*b+d,(m+h)*c+e,(l+k-.5*h)*b+d,m*c+e);N(a,(l+k-.5*h)*b+d,(m-h)*c+e,l*b+d,(m-k)*c+e,l*b+d,(m-k)*c+e); -Ad(a);h=.8*g;k=.8;l=1;m=.5;L(a,l*b+d,(m-k)*c+e,!0);N(a,(l+h)*b+d,(m-k)*c+e,(l+k)*b+d,(m-h)*c+e,(l+k)*b+d,m*c+e);N(a,(l+k)*b+d,(m+h)*c+e,(l+h)*b+d,(m+k)*c+e,l*b+d,(m+k)*c+e);N(a,l*b+d,(m+k)*c+e,(l+k-.5*h)*b+d,(m+h)*c+e,(l+k-.5*h)*b+d,m*c+e);N(a,(l+k-.5*h)*b+d,(m-h)*c+e,l*b+d,(m-k)*c+e,l*b+d,(m-k)*c+e);Ad(a);b=a.s;w.v(a);return b},Email:function(a,b,c){a=w.u();L(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);Ad(a);L(a,0,0,!1);a.lineTo(.5*b,.6*c);a.lineTo(1*b,0);a.moveTo(0, -1*c);a.lineTo(.45*b,.54*c);a.moveTo(1*b,1*c);a.lineTo(.55*b,.54*c);a.eb(!1);b=a.s;w.v(a);return b},Ethernet:function(a,b,c){a=w.u();L(a,.35*b,0,!0);a.lineTo(.65*b,0);a.lineTo(.65*b,.4*c);a.lineTo(.35*b,.4*c);a.lineTo(.35*b,0);Ad(a);L(a,.1*b,1*c,!0,!0);a.lineTo(.4*b,1*c);a.lineTo(.4*b,.6*c);a.lineTo(.1*b,.6*c);a.lineTo(.1*b,1*c);Ad(a);L(a,.6*b,1*c,!0,!0);a.lineTo(.9*b,1*c);a.lineTo(.9*b,.6*c);a.lineTo(.6*b,.6*c);a.lineTo(.6*b,1*c);Ad(a);L(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.5* -b,.4*c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,.6*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*b,.6*c);a.eb(!1);b=a.s;w.v(a);return b},Power:function(a,b,c){a=w.u();var d=J.wa,e=.4*d,g=.4,h=w.M(),k=w.M(),l=w.M(),m=w.M();J.Ki(.5,.5-g,.5+e,.5-g,.5+g,.5-e,.5+g,.5,.5,h,h,k,l,m);var n=w.ic(k.x,k.y);L(a,k.x*b,k.y*c,!0);N(a,l.x*b,l.y*c,m.x*b,m.y*c,(.5+g)*b,.5*c);N(a,(.5+g)*b,(.5+e)*c,(.5+e)*b,(.5+g)*c,.5*b,(.5+g)*c);N(a,(.5-e)*b,(.5+g)*c,(.5-g)*b,(.5+e)*c,(.5-g)*b,.5*c);J.Ki(.5-g,.5,.5-g,.5-e,.5-e,.5-g,.5,.5-g,.5, -l,m,k,h,h);N(a,l.x*b,l.y*c,m.x*b,m.y*c,k.x*b,k.y*c);e=.3*d;g=.3;J.Ki(.5-g,.5,.5-g,.5-e,.5-e,.5-g,.5,.5-g,.5,l,m,k,h,h);a.lineTo(k.x*b,k.y*c);N(a,m.x*b,m.y*c,l.x*b,l.y*c,(.5-g)*b,.5*c);N(a,(.5-g)*b,(.5+e)*c,(.5-e)*b,(.5+g)*c,.5*b,(.5+g)*c);N(a,(.5+e)*b,(.5+g)*c,(.5+g)*b,(.5+e)*c,(.5+g)*b,.5*c);J.Ki(.5,.5-g,.5+e,.5-g,.5+g,.5-e,.5+g,.5,.5,h,h,k,l,m);N(a,m.x*b,m.y*c,l.x*b,l.y*c,k.x*b,k.y*c);Ad(a);L(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);Ad(a);w.B(h);w.B(k);w.B(l);w.B(m); -w.B(n);b=a.s;b.G=new K(.25,.55);b.H=new K(.75,.8);w.v(a);return b},Fallout:function(a,b,c){a=w.u();var d=.5*J.wa;L(a,0*b,.5*c,!0);N(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);N(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);var e=d=0;L(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.4;e=0;Ad(a);L(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)* -b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.2;e=-.3;Ad(a);L(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);Ad(a);b=a.s;b.td=Jh;w.v(a);return b},IrritationHazard:function(a,b,c){a=w.u();L(a,.2*b,0*c,!0);a.lineTo(.5*b,.3*c);a.lineTo(.8*b,0*c);a.lineTo(1*b,.2*c);a.lineTo(.7*b,.5*c);a.lineTo(1*b,.8*c);a.lineTo(.8*b,1*c);a.lineTo(.5*b,.7*c);a.lineTo(.2*b,1*c);a.lineTo(0*b,.8*c);a.lineTo(.3*b,.5*c);a.lineTo(0*b,.2*c);Ad(a);b=a.s;b.G=new K(.3, -.3);b.H=new K(.7,.7);w.v(a);return b},ElectricalHazard:function(a,b,c){a=w.u();L(a,.37*b,0*c,!0);a.lineTo(.5*b,.11*c);a.lineTo(.77*b,.04*c);a.lineTo(.33*b,.49*c);a.lineTo(1*b,.37*c);a.lineTo(.63*b,.86*c);a.lineTo(.77*b,.91*c);a.lineTo(.34*b,1*c);a.lineTo(.34*b,.78*c);a.lineTo(.44*b,.8*c);a.lineTo(.65*b,.56*c);a.lineTo(0*b,.68*c);Ad(a);b=a.s;w.v(a);return b},FireHazard:function(a,b,c){a=w.u();L(a,.1*b,1*c,!0);N(a,-.25*b,.63*c,.45*b,.44*c,.29*b,0*c);N(a,.48*b,.17*c,.54*b,.35*c,.51*b,.42*c);N(a,.59* -b,.29*c,.58*b,.28*c,.59*b,.18*c);N(a,.8*b,.34*c,.88*b,.43*c,.75*b,.6*c);N(a,.87*b,.48*c,.88*b,.43*c,.88*b,.31*c);N(a,1.17*b,.76*c,.82*b,.8*c,.9*b,1*c);Ad(a);b=a.s;b.G=new K(.05,.645);b.H=new K(.884,.908);w.v(a);return b},BpmnActivityLoop:function(a,b,c){a=w.u();var d=4*(Math.SQRT2-1)/3*.5;L(a,.65*b,1*c,!1);N(a,(1-d+0)*b,1*c,1*b,(.5+d+0)*c,1*b,.5*c);N(a,1*b,(.5-d+0)*c,(.5+d+0)*b,0*c,.5*b,0*c);N(a,(.5-d+0)*b,0*c,0*b,(.5-d+0)*c,0*b,.5*c);N(a,0*b,(.5+d+0)*c,(.5-d+0)*b,1*c,.35*b,.98*c);a.moveTo(.25*b, -.8*c);a.lineTo(.35*b,1*c);a.lineTo(.1*b,1*c);b=a.s;w.v(a);return b},BpmnActivityParallel:function(a,b,c){a=w.u();L(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(.5*b,0);a.lineTo(.5*b,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.s;w.v(a);return b},BpmnActivitySequential:function(a,b,c){a=w.u();L(a,0,0,!1);a.lineTo(1*b,0);a.moveTo(0,.5*c);a.lineTo(1*b,.5*c);a.moveTo(0,1*c);a.lineTo(1*b,1*c);b=a.s;w.v(a);return b},BpmnActivityAdHoc:function(a,b,c){a=w.u();L(a,0,0,!1);L(a,1*b,1*c,!1);L(a,0,.5*c,!1);N(a,.2*b,.35*c, -.3*b,.35*c,.5*b,.5*c);N(a,.7*b,.65*c,.8*b,.65*c,1*b,.5*c);b=a.s;w.v(a);return b},BpmnActivityCompensation:function(a,b,c){a=w.u();L(a,0,.5*c,!0);a.lineTo(.5*b,0);a.lineTo(.5*b,.5*c);a.lineTo(1*b,1*c);a.lineTo(1*b,0);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,1*c);Ad(a);b=a.s;w.v(a);return b},BpmnTaskMessage:function(a,b,c){a=w.u();L(a,0,.2*c,!0);a.lineTo(1*b,.2*c);a.lineTo(1*b,.8*c);a.lineTo(0,.8*c);a.lineTo(0,.8*c);Ad(a);L(a,0,.2*c,!1);a.lineTo(.5*b,.5*c);a.lineTo(1*b,.2*c);a.eb(!1);b=a.s;w.v(a);return b}, -BpmnTaskScript:function(a,b,c){a=w.u();L(a,.7*b,1*c,!0);a.lineTo(.3*b,1*c);N(a,.6*b,.5*c,0,.5*c,.3*b,0);a.lineTo(.7*b,0);N(a,.4*b,.5*c,1*b,.5*c,.7*b,1*c);Ad(a);L(a,.45*b,.73*c,!1);a.lineTo(.7*b,.73*c);a.moveTo(.38*b,.5*c);a.lineTo(.63*b,.5*c);a.moveTo(.31*b,.27*c);a.lineTo(.56*b,.27*c);a.eb(!1);b=a.s;w.v(a);return b},BpmnTaskUser:function(a,b,c){a=w.u();L(a,0,0,!1);L(a,.335*b,(1-.555)*c,!0);a.lineTo(.335*b,.595*c);a.lineTo(.665*b,.595*c);a.lineTo(.665*b,(1-.555)*c);N(a,.88*b,.46*c,.98*b,.54*c,1*b, -.68*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.68*c);N(a,.02*b,.54*c,.12*b,.46*c,.335*b,(1-.555)*c);a.lineTo(.365*b,.405*c);var d=.5-.285,e=Math.PI/4,g=4*(1-Math.cos(e))/(3*Math.sin(e)),e=g*d,g=g*d;N(a,(.5-(e+d)/2)*b,(d+(d+g)/2)*c,(.5-d)*b,(d+g)*c,(.5-d)*b,d*c);N(a,(.5-d)*b,(d-g)*c,(.5-e)*b,(d-d)*c,.5*b,(d-d)*c);N(a,(.5+e)*b,(d-d)*c,(.5+d)*b,(d-g)*c,(.5+d)*b,d*c);N(a,(.5+d)*b,(d+g)*c,(.5+(e+d)/2)*b,(d+(d+g)/2)*c,.635*b,.405*c);a.lineTo(.635*b,.405*c);a.lineTo(.665*b,(1-.555)*c);a.lineTo(.665* -b,.595*c);a.lineTo(.335*b,.595*c);L(a,.2*b,1*c,!1);a.lineTo(.2*b,.8*c);L(a,.8*b,1*c,!1);a.lineTo(.8*b,.8*c);b=a.s;w.v(a);return b},BpmnEventConditional:function(a,b,c){a=w.u();L(a,.1*b,0,!0);a.lineTo(.9*b,0);a.lineTo(.9*b,1*c);a.lineTo(.1*b,1*c);Ad(a);L(a,.2*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.moveTo(.2*b,.4*c);a.lineTo(.8*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.2*b,.8*c);a.lineTo(.8*b,.8*c);a.eb(!1);b=a.s;w.v(a);return b},BpmnEventError:function(a,b,c){a=w.u();L(a,0,1*c,!0);a.lineTo(.33* -b,0);a.lineTo(.66*b,.5*c);a.lineTo(1*b,0);a.lineTo(.66*b,1*c);a.lineTo(.33*b,.5*c);Ad(a);b=a.s;w.v(a);return b},BpmnEventEscalation:function(a,b,c){a=w.u();L(a,0,0,!1);L(a,1*b,1*c,!1);L(a,.1*b,1*c,!0);a.lineTo(.5*b,0);a.lineTo(.9*b,1*c);a.lineTo(.5*b,.5*c);Ad(a);b=a.s;w.v(a);return b},BpmnEventTimer:function(a,b,c){a=w.u();var d=.5*J.wa;L(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5* -c);L(a,.5*b,0,!1);a.lineTo(.5*b,.15*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,.85*c);a.moveTo(0,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(1*b,.5*c);a.lineTo(.85*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.58*b,.1*c);a.moveTo(.5*b,.5*c);a.lineTo(.78*b,.54*c);a.eb(!1);b=a.s;b.td=Jh;w.v(a);return b}};for(var Ln in J.xg)J.xg[Ln.toLowerCase()]=Ln; -J.lw={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8", -BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4", -BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8", -TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4", -BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z", -DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z", +(function(window) { var r,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(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c=a.length?a.push(c):a.splice(b,0,c):v("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)}function Ta(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):v("Cannot remove an object from an HTMLCollection or NodeList at "+b)}var Ua=[];function Va(){var a=Ua.pop();return void 0===a?new z:a}function Wa(a,b){var c=Ua.pop();if(void 0===c)return new z(a,b);c.x=a;c.y=b;return c}function A(a){Ua.push(a)}var Xa=[]; +function Ya(){var a=Xa.pop();return void 0===a?new Za:a}function $a(a){Xa.push(a)}var ab=[];function bb(){var a=ab.pop();return void 0===a?new D:a}function db(a,b,c,d){var e=ab.pop();if(void 0===e)return new D(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e}function fb(a){ab.push(a)}var gb=[];function hb(){var a=gb.pop();return void 0===a?new ib:a}function jb(a){gb.push(a)}var lb=null;function E(){var a=lb;return null!==a?(lb=null,a):new mb}function F(a){a.reset();lb=a}var nb=[]; +function ob(){var a=nb.pop();return void 0===a?[]:a}function pb(a){a.length=0;nb.push(a)}var qb=Object.freeze([]),rb=1;function sb(a){a.__gohashid=rb++}function tb(a){var b=a.__gohashid;void 0===b&&(b=rb++,a.__gohashid=b);return b}function ub(a){return a.__gohashid}function vb(a,b){b.Wv=a;aa[a]=b}function yb(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a} +function G(a,b,c,d){w(a,"function","Util.defineProperty:classfunc");w(b,"object","Util.defineProperty:propobj");w(c,"function","Util.defineProperty:getter");w(d,"function","Util.defineProperty:setter");for(var e in b){b=b[e];Object.defineProperty(a.prototype,e,{get:c,set:d});c=Object.getOwnPropertyDescriptor(a.prototype,e);b&&c&&Object.defineProperty(a.prototype,b,c);break}} +function H(a,b,c,d){w(a,"function","Util.defineReadOnlyProperty:classfunc");w(b,"object","Util.defineReadOnlyProperty:propobj");w(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var f=b[e];b={get:c,set:function(a){v('The property "'+f+'" is read-only and cannot be set to '+a)}};if(void 0!==d)for(var g in d)b[g]=d[g];Object.defineProperty(a.prototype,e,b);d=Object.getOwnPropertyDescriptor(a.prototype,e);f&&d&&Object.defineProperty(a.prototype,f,d);break}} +function zb(a,b){for(var c in b)b[c]=!0;a.prototype.HA=b}function sa(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?xa(a):null===a?"*":""}function xa(a){if("function"===typeof a){if(a.Wv)return a.Wv;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9,c).trim();if(""!==b)return a.Wv=b}else if("object"===typeof a&&a.constructor)return xa(a.constructor);return typeof a} +function I(a,b,c){w(a,"function","Util.defineEnumValue:classfunc");w(b,"string","Util.defineEnumValue:name");w(c,"number","Util.defineEnumValue:num");c=new wa(a,b,c);Object.freeze(c);a[b]=c;var d=a.zs;d instanceof Fb||(d=new Fb("string",wa),a.zs=d);d.add(b,c);return c}function Gb(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} +function Hb(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){}} +function Ib(a,b){w(a,"object","Setting properties requires Objects as arguments");w(b,"object","Setting properties requires Objects as arguments");var c=a instanceof L,d=a instanceof M,e;for(e in b){""===e&&v("Setting properties requires non-empty property names");var f=a,g=e;if(c||d){var h=e.indexOf(".");if(0=d.length)){var e=Gb(b,d);null===e||"function"===typeof e||Ob(b,d)||(""===c&&(c=b+"\n"),c+=' unknown property "'+d+'" has value: '+e+" at "+a+"\n")}return c} +function Tb(a,b){if(null!==b&&"number"!==typeof b&&"string"!==typeof b&&"boolean"!==typeof b&&"function"!==typeof b)if(void 0!==ub(b)){if(!Ub.contains(b))if(Ub.add(b),Wb.add(Qb(a,b)),b instanceof N||b instanceof Xb||b instanceof Fb)for(var c=b.i;c.next();)Tb(a+"["+c.key+"]",c.value);else for(c in b){var d=Gb(b,c);if(void 0!==d&&null!==d&&Ea(d)&&d!==b.HA){if(b instanceof Zb){if(d===b.oi)continue}else if(b instanceof L){if("data"===c||d===b.Ag)continue;if("itemArray"===c||d===b.th)continue;if(b instanceof +O&&d===b.Kj)continue}else if(!(b instanceof M))if(b instanceof ec){if("archetypeGroupData"===c||d===b.Sv)continue}else if(b instanceof hc){if("archetypeLinkData"===c||d===b.Uv)continue;if("archetypeLabelNodeData"===c||d===b.Tv)continue}else if(b instanceof ic){if("archetypeNodeData"===c||d===b.rj)continue}else if(b instanceof jc){if("nodeDataArray"===c||d===b.Be)continue;if("linkDataArray"===c||d===b.Lg||d===b.Wk)continue;if(d===b.Vb)continue;if(d===b.Eg)continue}else if(b instanceof kc||b instanceof +lc||b instanceof sc)continue;Tb(a+"."+c,d)}}}else if(Array.isArray(b))for(c=0;cc;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(c=e=d=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="",g=0;gd;d++)b[tc("7ca11abfd7330390")](tc(c[d-1]),10,15*d+0);b[tc("7ca11abfd022028846")]=tc("39f046ebb36e4b");for(d=1;5>d;d++)b[tc("7ca11abfd7330390")](tc(c[d- +1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])I=function(a,b){var c=new wa(a,b,2);Object.freeze(c);a[b]=c;var d=a.zs;d instanceof Fb||(d=new Fb("string",wa),a.zs=d);d.add(b,c);return c};return a}();function wa(a,b,c){sb(this);this.uz=a;this.zb=b;this.mE=c}wa.prototype.toString=function(){return xa(this.uz)+"."+this.zb};H(wa,{Td:"classType"},function(){return this.uz});H(wa,{name:"name"},function(){return this.zb});H(wa,{value:"value"},function(){return this.mE});var vc; +wa.findName=vc=function(a,b){if(null===b||""===b)return null;w(a,"function","findName:classfunc");w(b,"string","EnumValue.findName:name");var c=a.zs;return c instanceof Fb?c.ja(b):null};function zc(){this.rz=[]}zc.prototype.toString=function(){return this.rz.join("")};zc.prototype.add=function(a){""!==a&&this.rz.push(a)};function Sb(){}function Ac(a){void 0===a&&(a=42);this.seed=a;this.Jv=48271;this.ys=2147483647;this.kz=this.ys/this.Jv;this.QD=this.ys%this.Jv;this.MD=1/this.ys;this.random()} +Ac.prototype.random=function(){var a=this.seed%this.kz*this.Jv-this.seed/this.kz*this.QD;this.seed=0a||a>=b.length)&&za(a,"0 <= i < length",N,"elt:i");return b[a]};N.prototype.setElt=N.prototype.set=N.prototype.Pf=function(a,b){var c=this.l;(0>a||a>=c.length)&&za(a,"0 <= i < length",N,"setElt:i");pa(this,a);c[a]=b};N.prototype.first=N.prototype.first=function(){var a=this.l;return 0===a.length?null:a[0]};N.prototype.last=N.prototype.$c=function(){var a=this.l,b=a.length;return 0a&&za(a,">= 0",N,"insertAt:i");pa(this,a);var c=this.l;a>=c.length?c.push(b):c.splice(a,0,b);this.gd();return!0};N.prototype.remove=N.prototype["delete"]=N.prototype.remove=function(a){if(null===a)return!1;pa(this,a);var b=this.l;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.gd();return!0}; +N.prototype.removeAt=N.prototype.Cc=function(a){var b=this.l;(0>a||a>=b.length)&&za(a,"0 <= i < length",N,"removeAt:i");pa(this,a);a===b.length-1?b.pop():b.splice(a,1);this.gd()};N.prototype.removeRange=N.prototype.removeRange=function(a,b){var c=this.l;(0>a||a>=c.length)&&za(a,"0 <= from < length",N,"elt:from");(0>b||b>=c.length)&&za(b,"0 <= to < length",N,"elt:to");pa(this,a);var d=c.slice((b||a)+1||c.length);c.length=0>a?c.length+a:a;c.push.apply(c,d);this.gd()}; +N.prototype.copy=function(){for(var a=new N(this.fa),b=this.l,c=this.count,d=0;d=f)return this;(0>b||b>=e-1)&&za(b,"0 <= from < length",N,"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.l.length)return Cc;var a=this.Qc;return null!==a?(a.reset(),a):new Ec(this)}); +H(N,{Il:"iteratorBackwards"},function(){if(0>=this.l.length)return Cc;var a=this.Km;return null!==a?(a.reset(),a):new Fc(this)});function Gc(a){this.Pj=a;this.reset()}zb(Gc,{key:!0,value:!0});H(Gc,{i:"iterator"},function(){return this});Gc.prototype.reset=Gc.prototype.reset=function(){var a=this.Pj;a.Qc=null;this.Fa=a.K;this.gb=null}; +Gc.prototype.next=Gc.prototype.hasNext=Gc.prototype.next=function(){var a=this.Pj;a.K!==this.Fa&&Ba(a);var b=this.gb,b=null===b?a.La:b.xb;if(null!==b)return this.gb=b,this.value=b.value,this.key=b.key,!0;this.jf();return!1};Gc.prototype.first=Gc.prototype.first=function(){var a=this.Pj;this.Fa=a.K;a=a.La;if(null!==a){this.gb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; +Gc.prototype.any=function(a){var b=this.Pj;b.Qc=null;var c=b.K;this.gb=null;for(var d=b.La;null!==d;){if(a(d.value))return!0;b.K!==c&&Ba(b);d=d.xb}return!1};Gc.prototype.all=function(a){var b=this.Pj;b.Qc=null;var c=b.K;this.gb=null;for(var d=b.La;null!==d;){if(!a(d.value))return!1;b.K!==c&&Ba(b);d=d.xb}return!0};Gc.prototype.each=function(a){var b=this.Pj;b.Qc=null;var c=b.K;this.gb=null;for(var d=b.La;null!==d;)a(d.value),b.K!==c&&Ba(b),d=d.xb};H(Gc,{count:"count"},function(){return this.Pj.tc}); +Gc.prototype.jf=function(){this.value=this.key=null;this.Fa=-1;this.Pj.Qc=this};Gc.prototype.toString=function(){return null!==this.gb?"SetIterator@"+this.gb.value:"SetIterator"}; +function Xb(a){sb(this);this.qa=!1;void 0===a||null===a?this.fa=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.fa=a:za(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.fa=a===Object?"object":a===String?"string":a===Number?"number":a:za(a,"null, a primitive type name, or a class type","Set constructor: type");this.uc={};this.tc=0;this.Qc=null;this.K=0;this.Kg=this.La=null}vb("Set",Xb); +Xb.prototype.gd=function(){var a=this.K;a++;999999999=this.tc)return Cc;var a=this.Qc;return null!==a?(a.reset(),a):new Gc(this)});function Mc(a){this.Ea=a;this.reset()}zb(Mc,{key:!0,value:!0});H(Mc,{i:"iterator"},function(){return this});Mc.prototype.reset=Mc.prototype.reset=function(){this.Fa=this.Ea.K;this.gb=null}; +Mc.prototype.next=Mc.prototype.hasNext=Mc.prototype.next=function(){var a=this.Ea;a.K!==this.Fa&&Ba(a);var b=this.gb,b=null===b?a.La:b.xb;if(null!==b)return this.gb=b,this.value=this.key=a=b.key,!0;this.jf();return!1};Mc.prototype.first=Mc.prototype.first=function(){var a=this.Ea;this.Fa=a.K;a=a.La;return null!==a?(this.gb=a,this.value=this.key=a=a.key):null};Mc.prototype.any=function(a){var b=this.Ea,c=b.K;this.gb=null;for(var d=b.La;null!==d;){if(a(d.key))return!0;b.K!==c&&Ba(b);d=d.xb}return!1}; +Mc.prototype.all=function(a){var b=this.Ea,c=b.K;this.gb=null;for(var d=b.La;null!==d;){if(!a(d.key))return!1;b.K!==c&&Ba(b);d=d.xb}return!0};Mc.prototype.each=function(a){var b=this.Ea,c=b.K;this.gb=null;for(var d=b.La;null!==d;)a(d.key),b.K!==c&&Ba(b),d=d.xb};H(Mc,{count:"count"},function(){return this.Ea.tc});Mc.prototype.jf=function(){this.value=this.key=null;this.Fa=-1};Mc.prototype.toString=function(){return null!==this.gb?"MapKeySetIterator@"+this.gb.value:"MapKeySetIterator"}; +function Pc(a){sb(this);this.qa=!0;this.Ea=a}yb(Pc,Xb);Pc.prototype.freeze=function(){return this};Pc.prototype.wa=function(){return this};Pc.prototype.toString=function(){return"MapKeySet("+this.Ea.toString()+")"};Pc.prototype.add=Pc.prototype.set=Pc.prototype.add=function(){v("This Set is read-only: "+this.toString());return!1};Pc.prototype.contains=Pc.prototype.has=Pc.prototype.contains=function(a){return this.Ea.contains(a)}; +Pc.prototype.remove=Pc.prototype["delete"]=Pc.prototype.remove=function(){v("This Set is read-only: "+this.toString());return!1};Pc.prototype.clear=Pc.prototype.clear=function(){v("This Set is read-only: "+this.toString())};Pc.prototype.first=Pc.prototype.first=function(){var a=this.Ea.La;return null!==a?a.key:null};Pc.prototype.any=function(a){for(var b=this.Ea.La;null!==b;){if(a(b.key))return!0;b=b.xb}return!1}; +Pc.prototype.all=function(a){for(var b=this.Ea.La;null!==b;){if(!a(b.key))return!1;b=b.xb}return!0};Pc.prototype.each=function(a){for(var b=this.Ea.La;null!==b;)a(b.key),b=b.xb};Pc.prototype.copy=function(){return new Pc(this.Ea)};Pc.prototype.toSet=function(){var a=new Xb(this.Ea.vp),b=this.Ea.uc,c;for(c in b)a.add(b[c].key);return a};Pc.prototype.toArray=Pc.prototype.ae=function(){var a=this.Ea.uc,b=Array(this.Ea.tc),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; +Pc.prototype.toList=function(){var a=new N(this.fa),b=this.Ea.uc,c;for(c in b)a.add(b[c].key);return a};H(Pc,{count:"count"},function(){return this.Ea.tc});H(Pc,{size:"size"},function(){return this.Ea.tc});H(Pc,{i:"iterator"},function(){return 0>=this.Ea.tc?Cc:new Mc(this.Ea)});function Qc(a){this.Ea=a;this.reset()}zb(Qc,{key:!0,value:!0});H(Qc,{i:"iterator"},function(){return this});Qc.prototype.reset=Qc.prototype.reset=function(){var a=this.Ea;a.Lm=null;this.Fa=a.K;this.gb=null}; +Qc.prototype.next=Qc.prototype.hasNext=Qc.prototype.next=function(){var a=this.Ea;a.K!==this.Fa&&Ba(a);var b=this.gb,b=null===b?a.La:b.xb;if(null!==b)return this.gb=b,this.value=b.value,this.key=b.key,!0;this.jf();return!1};Qc.prototype.first=Qc.prototype.first=function(){var a=this.Ea;this.Fa=a.K;a=a.La;if(null!==a){this.gb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; +Qc.prototype.any=function(a){var b=this.Ea;b.Lm=null;var c=b.K;this.gb=null;for(var d=b.La;null!==d;){if(a(d.value))return!0;b.K!==c&&Ba(b);d=d.xb}return!1};Qc.prototype.all=function(a){var b=this.Ea;b.Lm=null;var c=b.K;this.gb=null;for(var d=b.La;null!==d;){if(!a(d.value))return!1;b.K!==c&&Ba(b);d=d.xb}return!0};Qc.prototype.each=function(a){var b=this.Ea;b.Lm=null;var c=b.K;this.gb=null;for(var d=b.La;null!==d;)a(d.value),b.K!==c&&Ba(b),d=d.xb};H(Qc,{count:"count"},function(){return this.Ea.tc}); +Qc.prototype.jf=function(){this.value=this.key=null;this.Fa=-1;this.Ea.Lm=this};Qc.prototype.toString=function(){return null!==this.gb?"MapValueSetIterator@"+this.gb.value:"MapValueSetIterator"};function Hc(a,b){this.key=a;this.value=b;this.Um=this.xb=null}zb(Hc,{key:!0,value:!0});Hc.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};function Rc(a){this.Ea=a;this.reset()}zb(Rc,{key:!0,value:!0});H(Rc,{i:"iterator"},function(){return this}); +Rc.prototype.reset=Rc.prototype.reset=function(){var a=this.Ea;a.Qc=null;this.Fa=a.K;this.gb=null};Rc.prototype.next=Rc.prototype.hasNext=Rc.prototype.next=function(){var a=this.Ea;a.K!==this.Fa&&Ba(a);var b=this.gb,b=null===b?a.La:b.xb;if(null!==b)return this.gb=b,this.key=b.key,this.value=b.value,!0;this.jf();return!1};Rc.prototype.first=Rc.prototype.first=function(){var a=this.Ea;this.Fa=a.K;a=a.La;return null!==a?(this.gb=a,this.key=a.key,this.value=a.value,a):null}; +Rc.prototype.any=function(a){var b=this.Ea;b.Qc=null;var c=b.K;this.gb=null;for(var d=b.La;null!==d;){if(a(d))return!0;b.K!==c&&Ba(b);d=d.xb}return!1};Rc.prototype.all=function(a){var b=this.Ea;b.Qc=null;var c=b.K;this.gb=null;for(var d=b.La;null!==d;){if(!a(d))return!1;b.K!==c&&Ba(b);d=d.xb}return!0};Rc.prototype.each=function(a){var b=this.Ea;b.Qc=null;var c=b.K;this.gb=null;for(var d=b.La;null!==d;)a(d),b.K!==c&&Ba(b),d=d.xb};H(Rc,{count:"count"},function(){return this.Ea.tc}); +Rc.prototype.jf=function(){this.value=this.key=null;this.Fa=-1;this.Ea.Qc=this};Rc.prototype.toString=function(){return null!==this.gb?"MapIterator@"+this.gb:"MapIterator"}; +function Fb(a,b){sb(this);this.qa=!1;void 0===a||null===a?this.vp=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.vp=a:za(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.vp=a===Object?"object":a===String?"string":a===Number?"number":a:za(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.mu=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"===b|| +"function"===b?this.mu=b:za(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.mu=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:za(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.uc={};this.tc=0;this.Lm=this.Qc=null;this.K=0;this.Kg=this.La=null}vb("Map",Fb);Fb.prototype.gd=function(){var a=this.K;a++;999999999=this.count)return Cc;var a=this.Qc;return null!==a?(a.reset(),a):new Rc(this)});H(Fb,{kI:"iteratorKeys"},function(){return 0>=this.count?Cc:new Mc(this)});H(Fb,{yC:"iteratorValues"},function(){if(0>=this.count)return Cc;var a=this.Lm;return null!==a?(a.reset(),a):new Qc(this)});function z(a,b){void 0===a?this.y=this.x=0:(this.x=a,this.y=b);this.qa=!1}vb("Point",z);z.Og=!0;zb(z,{x:!0,y:!0}); +z.prototype.assign=function(a){this.x=a.x;this.y=a.y};z.prototype.setTo=z.prototype.k=function(a,b){this.x=a;this.y=b;return this};z.prototype.set=z.prototype.set=function(a){this.lb();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};r=z.prototype;r.va=function(){this.qa=!0;Object.freeze(this);return this};r.O=function(){return Object.isFrozen(this)?this:this.copy().freeze()};r.freeze=function(){this.qa=!0;return this}; +r.wa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.qa=!1;return this};r.lb=function(a){if(this.qa){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};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 instanceof z?a.x.toString()+" "+a.y.toString():a.toString()};z.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};z.prototype.equals=z.prototype.A=function(a){return a instanceof z?this.x===a.x&&this.y===a.y:!1};z.prototype.equalTo=z.prototype.Lu=function(a,b){return this.x===a&&this.y===b};z.prototype.equalsApprox=z.prototype.Wd=function(a){return Q.u(this.x,a.x)&&Q.u(this.y,a.y)}; +z.prototype.add=z.prototype.add=function(a){this.lb();this.x+=a.x;this.y+=a.y;return this};z.prototype.subtract=z.prototype.rs=function(a){this.lb();this.x-=a.x;this.y-=a.y;return this};z.prototype.offset=z.prototype.offset=function(a,b){this.lb();this.x+=a;this.y+=b;return this}; +z.prototype.rotate=z.prototype.rotate=function(a){this.lb();if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;var d=0,e=0;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.Wi=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a}; +z.prototype.distanceSquared=z.prototype.pr=function(a,b){var c=a-this.x,d=b-this.y;return c*c+d*d};z.prototype.normalize=z.prototype.normalize=function(){this.lb();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){Q.Kl(a,b,c,d,this.x,this.y,this);return this};z.prototype.projectOntoLineSegmentPoint=function(a,b){Q.Kl(a.x,a.y,b.x,b.y,this.x,this.y,this);return this};z.prototype.snapToGrid=function(a,b,c,d){Q.ur(this.x,this.y,a,b,c,d,this);return this}; +z.prototype.snapToGridPoint=function(a,b){Q.ur(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};z.prototype.setRectSpot=z.prototype.ms=function(a,b){this.lb();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.ns=function(a,b,c,d,e){this.lb();this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this};z.prototype.transform=function(a){a.Ka(this);return this};function Xc(a,b){b.Zg(a);return a}var Yc; +z.distanceLineSegmentSquared=Yc=function(a,b,c,d,e,f){var g=e-c,h=f-d,k=g*g+h*h;c-=a;d-=b;var l=-c*g-d*h;if(0>=l||l>=k)return g=e-a,h=f-b,Math.min(c*c+d*d,g*g+h*h);a=g*d-h*c;return a*a/k};var Zc;z.distanceSquared=Zc=function(a,b,c,d){a=c-a;b=d-b;return a*a+b*b};var $c;z.direction=$c=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.w=function(){return isFinite(this.x)&&isFinite(this.y)};function Za(a,b){void 0===a?this.height=this.width=0:(this.width=a,this.height=b);this.qa=!1}vb("Size",Za);Za.Og=!0;zb(Za,{width:!0,height:!0});Za.prototype.assign=function(a){this.width=a.width;this.height=a.height};Za.prototype.setTo=Za.prototype.k=function(a,b){this.width=a;this.height=b;return this};Za.prototype.set=Za.prototype.set=function(a){this.lb();this.width=a.width;this.height=a.height;return this}; +Za.prototype.copy=function(){var a=new Za;a.width=this.width;a.height=this.height;return a};r=Za.prototype;r.va=function(){this.qa=!0;Object.freeze(this);return this};r.O=function(){return Object.isFrozen(this)?this:this.copy().freeze()};r.freeze=function(){this.qa=!0;return this};r.wa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.qa=!1;return this}; +r.lb=function(a){if(this.qa){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};Za.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 Za(c,e)}return new Za};Za.stringify=function(a){return a instanceof Za?a.width.toString()+" "+a.height.toString():a.toString()}; +Za.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};Za.prototype.equals=Za.prototype.A=function(a){return a instanceof Za?this.width===a.width&&this.height===a.height:!1};Za.prototype.equalTo=Za.prototype.Lu=function(a,b){return this.width===a&&this.height===b};Za.prototype.equalsApprox=Za.prototype.Wd=function(a){return Q.u(this.width,a.width)&&Q.u(this.height,a.height)};Za.prototype.isReal=Za.prototype.w=function(){return isFinite(this.width)&&isFinite(this.height)}; +function D(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:a instanceof z?b instanceof z?(this.x=Math.min(a.x,b.x),this.y=Math.min(a.y,b.y),this.width=Math.abs(a.x-b.x),this.height=Math.abs(a.y-b.y)):b instanceof Za?(this.x=a.x,this.y=a.y,this.width=b.width,this.height=b.height):v("Incorrect arguments supplied to Rect constructor"):(this.x=a,this.y=b,this.width=c,this.height=d);this.qa=!1}vb("Rect",D);D.Og=!0;zb(D,{x:!0,y:!0,width:!0,height:!0}); +D.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height};function ad(a,b,c){a.width=b;a.height=c}D.prototype.setTo=D.prototype.k=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};D.prototype.set=D.prototype.set=function(a){this.lb();this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};D.prototype.setPoint=D.prototype.Ne=function(a){this.lb();this.x=a.x;this.y=a.y;return this}; +D.prototype.setSize=function(a){this.lb();this.width=a.width;this.height=a.height;return this};D.prototype.copy=function(){var a=new D;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};r=D.prototype;r.va=function(){this.qa=!0;Object.freeze(this);return this};r.O=function(){return Object.isFrozen(this)?this:this.copy().freeze()};r.freeze=function(){this.qa=!0;return this};r.wa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.qa=!1;return this}; +r.lb=function(a){if(this.qa){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};D.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 g=0;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return new D(c,e,f,g)}return new D}; +D.stringify=function(a){return a instanceof D?a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString():a.toString()};D.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};D.prototype.equals=D.prototype.A=function(a){return a instanceof D?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};D.prototype.equalTo=D.prototype.Lu=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d}; +D.prototype.equalsApprox=D.prototype.Wd=function(a){return Q.u(this.x,a.x)&&Q.u(this.y,a.y)&&Q.u(this.width,a.width)&&Q.u(this.height,a.height)};D.prototype.containsPoint=D.prototype.na=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};D.prototype.containsRect=D.prototype.Vi=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}; +D.prototype.contains=D.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};D.prototype.reset=function(){this.lb();this.height=this.width=this.y=this.x=0};D.prototype.offset=D.prototype.offset=function(a,b){this.lb();this.x+=a;this.y+=b;return this};D.prototype.inflate=D.prototype.Ze=function(a,b){return bd(this,b,a,b,a)}; +D.prototype.addMargin=D.prototype.ru=function(a){return bd(this,a.top,a.right,a.bottom,a.left)};D.prototype.subtractMargin=D.prototype.TG=function(a){return bd(this,-a.top,-a.right,-a.bottom,-a.left)};D.prototype.grow=function(a,b,c,d){return bd(this,a,b,c,d)};function bd(a,b,c,d,e){a.lb();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}D.prototype.intersectRect=function(a){return cd(this,a.x,a.y,a.width,a.height)}; +D.prototype.intersect=function(a,b,c,d){return cd(this,a,b,c,d)};function cd(a,b,c,d,e){a.lb();var f=Math.max(a.x,b),g=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=g;a.width=Math.max(0,b-f);a.height=Math.max(0,c-g);return a}D.prototype.intersectsRect=D.prototype.Gf=function(a){return this.pC(a.x,a.y,a.width,a.height)}; +D.prototype.intersects=D.prototype.pC=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 hd(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}D.prototype.unionPoint=D.prototype.Zh=function(a){return id(this,a.x,a.y,0,0)}; +D.prototype.unionRect=D.prototype.eh=function(a){return id(this,a.x,a.y,a.width,a.height)};D.prototype.union=D.prototype.FD=function(a,b,c,d){this.lb();void 0===c&&(c=0);void 0===d&&(d=0);return id(this,a,b,c,d)};function id(a,b,c,d,e){var f=Math.min(a.x,b),g=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=g;a.width=b-f;a.height=c-g;return a} +D.prototype.setSpot=D.prototype.ns=function(a,b,c){this.lb();this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this};var jd;D.contains=jd=function(a,b,c,d,e,f,g,h){void 0===g&&(g=0);void 0===h&&(h=0);return a<=e&&e+g<=a+c&&b<=f&&f+h<=b+d};D.intersects=function(a,b,c,d,e,f,g,h){c+=a;g+=e;if(a>g||e>c)return!1;a=d+b;h+=f;return b>h||f>a?!1:!0};G(D,{left:"left"},function(){return this.x},function(a){this.lb(a);this.x=a}); +G(D,{top:"top"},function(){return this.y},function(a){this.lb(a);this.y=a});G(D,{right:"right"},function(){return this.x+this.width},function(a){this.lb(a);this.x+=a-(this.x+this.width)});G(D,{bottom:"bottom"},function(){return this.y+this.height},function(a){this.lb(a);this.y+=a-(this.y+this.height)});G(D,{position:"position"},function(){return new z(this.x,this.y)},function(a){this.lb(a);this.x=a.x;this.y=a.y}); +G(D,{size:"size"},function(){return new Za(this.width,this.height)},function(a){this.lb(a);this.width=a.width;this.height=a.height});G(D,{Xj:"center"},function(){return new z(this.x+this.width/2,this.y+this.height/2)},function(a){this.lb(a);this.x=a.x-this.width/2;this.y=a.y-this.height/2});G(D,{ra:"centerX"},function(){return this.x+this.width/2},function(a){this.lb(a);this.x=a-this.width/2});G(D,{Ba:"centerY"},function(){return this.y+this.height/2},function(a){this.lb(a);this.y=a-this.height/2}); +D.prototype.isReal=D.prototype.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};D.prototype.isEmpty=function(){return 0===this.width&&0===this.height}; +function qd(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):v("Invalid arguments to Margin constructor");this.qa=!1}vb("Margin",qd);qd.Og=!0;zb(qd,{top:!0,right:!0,bottom:!0,left:!0});qd.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left}; +qd.prototype.setTo=qd.prototype.k=function(a,b,c,d){this.lb();this.top=a;this.right=b;this.bottom=c;this.left=d;return this};qd.prototype.set=qd.prototype.set=function(a){this.lb();this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};qd.prototype.copy=function(){var a=new qd;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};r=qd.prototype;r.va=function(){this.qa=!0;Object.freeze(this);return this}; +r.O=function(){return Object.isFrozen(this)?this:this.copy().freeze()};r.freeze=function(){this.qa=!0;return this};r.wa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.qa=!1;return this};r.lb=function(a){if(this.qa){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}}; +qd.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 qd;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new qd(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new qd(c,e);for(var g=NaN;""===a[b];)b++;(d=a[b++])&&(g=parseFloat(d));return isNaN(g)?new qd(c,e):new qd(c,e,f,g)}return new qd}; +qd.stringify=function(a){return a instanceof qd?a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString():a.toString()};qd.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};qd.prototype.equals=qd.prototype.A=function(a){return a instanceof qd?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1}; +qd.prototype.equalTo=qd.prototype.Lu=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d};qd.prototype.equalsApprox=qd.prototype.Wd=function(a){return Q.u(this.top,a.top)&&Q.u(this.right,a.right)&&Q.u(this.bottom,a.bottom)&&Q.u(this.left,a.left)};qd.prototype.isReal=qd.prototype.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function ib(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}ib.Og=!0; +zb(ib,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0});ib.prototype.set=ib.prototype.set=function(a){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};ib.prototype.copy=function(){var a=new ib;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};ib.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"}; +ib.prototype.equals=ib.prototype.A=function(a){return a instanceof ib?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};ib.prototype.reset=ib.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}; +ib.prototype.multiply=ib.prototype.multiply=function(a){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,f=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=f;return this}; +ib.prototype.multiplyInverted=ib.prototype.IC=function(a){var b=1/(a.m11*a.m22-a.m12*a.m21),c=a.m22*b,d=-a.m12*b,e=-a.m21*b,f=a.m11*b,g=b*(a.m21*a.dy-a.m22*a.dx),h=b*(a.m12*a.dx-a.m11*a.dy);a=this.m12*c+this.m22*d;b=this.m11*e+this.m21*f;e=this.m12*e+this.m22*f;f=this.m11*g+this.m21*h+this.dx;g=this.m12*g+this.m22*h+this.dy;this.m11=this.m11*c+this.m21*d;this.m12=a;this.m21=b;this.m22=e;this.dx=f;this.dy=g;return this}; +ib.prototype.invert=ib.prototype.ay=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),f=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=f}; +ib.prototype.rotate=ib.prototype.rotate=function(a,b,c){this.translate(b,c);var d=0,e=0;0===a?(d=1,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 f=this.m11*-e+this.m21*d,g=this.m12*-e+this.m22*d;this.m11=this.m11*d+this.m21*e;this.m12=a;this.m21=f;this.m22=g;this.translate(-b,-c)};ib.prototype.translate=ib.prototype.translate=function(a,b){this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b}; +ib.prototype.scale=ib.prototype.scale=function(a,b){void 0===b&&(b=a);this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b};ib.prototype.transformPoint=ib.prototype.Ka=function(a){var b=a.x,c=a.y;a.x=b*this.m11+c*this.m21+this.dx;a.y=b*this.m12+c*this.m22+this.dy;return a}; +ib.prototype.invertedTransformPoint=ib.prototype.Zg=function(a){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),f=a.x,g=a.y;a.x=f*this.m22*b+g*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.y=f*c+g*d+e;return a}; +ib.prototype.transformRect=ib.prototype.DD=function(a){var b=a.x,c=a.y,d=b+a.width,e=c+a.height,f=this.m11,g=this.m12,h=this.m21,k=this.m22,l=this.dx,m=this.dy,n=b*f+c*h+l,p=b*g+c*k+m,q=d*f+c*h+l,c=d*g+c*k+m,s=b*f+e*h+l,b=b*g+e*k+m,f=d*f+e*h+l,d=d*g+e*k+m,e=n,g=p,n=Math.min(n,q),e=Math.max(e,q),g=Math.min(g,c),p=Math.max(p,c),n=Math.min(n,s),e=Math.max(e,s),g=Math.min(g,b),p=Math.max(p,b),n=Math.min(n,f),e=Math.max(e,f),g=Math.min(g,d),p=Math.max(p,d);a.x=n;a.y=g;a.width=e-n;a.height=p-g}; +ib.prototype.isIdentity=ib.prototype.Kr=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};function R(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=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.qa=!1}vb("Spot",R);R.Og=!0;zb(R,{x:!0,y:!0,offsetX:!0,offsetY:!0});R.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY}; +R.prototype.setTo=R.prototype.k=function(a,b,c,d){this.lb();this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};R.prototype.set=R.prototype.set=function(a){this.lb();this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};R.prototype.copy=function(){var a=new R;a.x=this.x;a.y=this.y;a.offsetX=this.offsetX;a.offsetY=this.offsetY;return a};r=R.prototype;r.va=function(){this.qa=!0;Object.freeze(this);return this};r.O=function(){return Object.isFrozen(this)?this:this.copy().freeze()}; +r.freeze=function(){this.qa=!0;return this};r.wa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this.qa=!1;return this};r.lb=function(a){if(this.qa){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function rd(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a}var sd; +R.parse=sd=function(a){if("string"===typeof a){a=a.trim();if("None"===a)return td;if("TopLeft"===a)return ud;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return vd;if("TopRight"===a)return wd;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Cd;if("Center"===a)return Dd;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Ed;if("BottomLeft"===a)return Fd;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Gd;if("BottomRight"===a)return Hd;if("TopSide"===a)return Id;if("LeftSide"=== +a)return Jd;if("RightSide"===a)return Kd;if("BottomSide"===a)return Ld;if("TopBottomSides"===a)return Md;if("LeftRightSides"===a)return Nd;if("TopLeftSides"===a)return Od;if("TopRightSides"===a)return Pd;if("BottomLeftSides"===a)return Yd;if("BottomRightSides"===a)return Zd;if("NotTopSide"===a)return $d;if("NotLeftSide"===a)return ae;if("NotRightSide"===a)return be;if("NotBottomSide"===a)return ce;if("AllSides"===a)return de;if("Default"===a)return ee;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++; +var d=a[b++];void 0!==d&&0b.offset?1:-1});for(h=0;h=2*Math.PI?(ue(a,b,c,d,e,e+Math.PI,g),ue(a,b,c,d,e+Math.PI,e+2*Math.PI,g),a.path.push(["M",k,f])):(b+=d*Math.cos(e),c+=d*Math.sin(e),h=180*h/Math.PI,e=g?0:1,g=180<=h==!!g?0:1,0!==a.path.length?a.path.push(["L",b,c]):a.path.push(["M",b,c]),a.path.push(["A",d,d,h,g,e,k,f]))}}function te(a,b,c,d,e,f,g){var h=new pe;h.re=[b,c,d,e,f,g];b={};we(a,"g",b,h);h=a.addElement("g",b);a.Ge.push(h)} +r.Ja=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+this.oD;this.oD++;var b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,e,f,g;c=se(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",UI:this.shadowBlur/2});d=se(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});e=se(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});f=se(this,"feOffset",{"in":"comp",result:"offsetBlur", +dx:this.shadowOffsetX,dy:this.shadowOffsetY});g=se(this,"feMerge",{});g.appendChild(se(this,"feMergeNode",{"in":"offsetBlur"}));g.appendChild(se(this,"feMergeNode",{"in":"SourceGraphic"}));b.appendChild(c);b.appendChild(d);b.appendChild(e);b.appendChild(f);b.appendChild(g);0=a)return 0;var b=Q.lz;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);Q.lz=b}return 1>a? +(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)},u:function(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8=e&&(e=1E-6);var h=0,k=0,l=0,m=0;al-m)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=g&&g<=f+e)return!0}else return!0;else if(b- +d>e||d-b>e){if(g=(c-a)/(d-b)*(g-b)+a,g-e<=f&&f<=g+e)return!0}else return!0;return!1},Bu:function(a,b,c,d,e,f,g,h,k,l,m,n){if(Q.ad(a,b,g,h,n,c,d)&&Q.ad(a,b,g,h,n,e,f))return Q.ad(a,b,g,h,n,l,m);var p=(a+c)/2,q=(b+d)/2,s=(c+e)/2,t=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(p+s)/2;c=(q+t)/2;var s=(s+e)/2,t=(t+f)/2,u=(d+s)/2,x=(c+t)/2;return Q.Bu(a,b,p,q,d,c,u,x,k,l,m,n)||Q.Bu(u,x,s,t,e,f,g,h,k,l,m,n)},BE:function(a,b,c,d,e,f,g,h,k){var l=(c+e)/2,m=(d+f)/2;k.x=(((a+c)/2+l)/2+(l+(e+g)/2)/2)/2;k.y=(((b+d)/2+m)/2+(m+ +(f+h)/2)/2)/2;return k},AE:function(a,b,c,d,e,f,g,h){var k=(c+e)/2,l=(d+f)/2;return $c(((a+c)/2+k)/2,((b+d)/2+l)/2,(k+(e+g)/2)/2,(l+(f+h)/2)/2)},nn:function(a,b,c,d,e,f,g,h,k,l){if(Q.ad(a,b,g,h,k,c,d)&&Q.ad(a,b,g,h,k,e,f))id(l,a,b,0,0),id(l,g,h,0,0);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/2;var p=(p+e)/2,q=(q+f)/2,s=(d+p)/2,t=(c+q)/2;Q.nn(a,b,m,n,d,c,s,t,k,l);Q.nn(s,t,p,q,e,f,g,h,k,l)}return l},Sd:function(a,b,c,d,e,f,g,h,k,l){if(Q.ad(a,b,g,h,k,c,d)&& +Q.ad(a,b,g,h,k,e,f))0===l.length&&(l.push(a),l.push(b)),l.push(g),l.push(h);else{var m=(a+c)/2,n=(b+d)/2,p=(c+e)/2,q=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(m+p)/2;c=(n+q)/2;var p=(p+e)/2,q=(q+f)/2,s=(d+p)/2,t=(c+q)/2;Q.Sd(a,b,m,n,d,c,s,t,k,l);Q.Sd(s,t,p,q,e,f,g,h,k,l)}return l},Ey:function(a,b,c,d,e,f,g,h,k,l){if(Q.ad(a,b,e,f,l,c,d))return Q.ad(a,b,e,f,l,h,k);var m=(a+c)/2,n=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var p=(m+c)/2,q=(n+d)/2;return Q.Ey(a,b,m,n,p,q,g,h,k,l)||Q.Ey(p,q,c,d,e,f,g,h,k,l)},LI:function(a,b,c, +d,e,f,g){g.x=((a+c)/2+(c+e)/2)/2;g.y=((b+d)/2+(d+f)/2)/2;return g},Dy:function(a,b,c,d,e,f,g,h){if(Q.ad(a,b,e,f,g,c,d))id(h,a,b,0,0),id(h,e,f,0,0);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;Q.Dy(a,b,k,l,m,n,g,h);Q.Dy(m,n,c,d,e,f,g,h)}return h},Vn:function(a,b,c,d,e,f,g,h){if(Q.ad(a,b,e,f,g,c,d))0===h.length&&(h.push(a),h.push(b)),h.push(e),h.push(f);else{var k=(a+c)/2,l=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var m=(k+c)/2,n=(l+d)/2;Q.Vn(a,b,k,l,m,n,g,h);Q.Vn(m,n,c,d,e,f,g,h)}return h}, +ir:function(a,b,c,d,e,f,g,h,k,l,m,n,p,q){0>=p&&(p=1E-6);if(Q.ad(a,b,g,h,p,c,d)&&Q.ad(a,b,g,h,p,e,f)){var s=(a-g)*(l-n)-(b-h)*(k-m);if(0===s)return!1;p=((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/s;s=((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/s;if((k>m?k-m:m-k)<(l>n?l-n:n-l)){if(g=k=0,bg)return!1}else if(ag)return!1;q.x=p;q.y=s;return!0}var s=(a+c)/2,t=(b+d)/2;c=(c+e)/2;d=(d+f)/2;e=(e+g)/2;f=(f+h)/2;var u=(s+c)/2,x=(t+d)/2;c=(c+e)/2;d=(d+f)/2;var B=(u+c)/2,y=(x+d)/ +2,C=(m-k)*(m-k)+(n-l)*(n-l),K=!1;Q.ir(a,b,s,t,u,x,B,y,k,l,m,n,p,q)&&(b=(q.x-k)*(q.x-k)+(q.y-l)*(q.y-l),b=p&&(p=1E-6);if(Q.ad(a,b,g,h,p,c,d)&&Q.ad(a,b,g,h,p,e,f)){p=(a-g)*(l-n)-(b-h)*(k-m);if(0===p)return q;var s=((a*h-b*g)*(k-m)-(a-g)*(k*n-l*m))/p,t=((a*h-b*g)*(l-n)-(b-h)*(k*n-l*m))/p;if(s>=m)return q;if((k>m?k-m:m-k)< +(l>n?l-n:n-l)){if(a=k=0,ba)return q}else if(aa)return q;0p&&q--}else{var s=(a+c)/2,t=(b+d)/2,u=(c+e)/2,x=(d+f)/2;e=(e+g)/2;f=(f+h)/2;d=(s+u)/2;c=(t+x)/2;var u=(u+e)/2,x=(x+f)/2,B=(d+u)/2,y=(c+x)/2,q=q+Q.jr(a,b,s,t,d,c,B,y,k,l,m,n,p),q=q+Q.jr(B,y,u,x,e,f,g,h,k,l,m,n,p)}return q},Kl:function(a,b,c,d,e,f,g){if(Q.Sa(a,c)){var h=0;c=0;bc)return g.x=a,g.y=c,!1;g.x=a;g.y=d;return!0}if(Q.Sa(b, +d)){ac)return g.x=c,g.y=b,!1;g.x=d;g.y=b;return!0}h=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>h)return g.x=a,g.y=b,!1;if(1.000005c)return k.x=a,k.y=c,!1;k.x=a;k.y=f;return!0}g=(d-b)/(c-a);if(Q.Sa(h,g))return Q.Kl(a,b,c,d,e,f,k),!1;e=(g*a-h*e+f-b)/(g-h);if(Q.Sa(g,0)){ac)return k.x=c,k.y=b,!1;k.x=e;k.y=b;return!0}f=g*(e-a)+b;return Q.Kl(a,b,c,d,e,f,k)},mI:function(a,b,c,d,e){return Q.mg(c.x,c.y,d.x,d.y,a.x,a.y,b.x,b.y,e)},VH:function(a,b,c,d,e,f,g,h,k,l){function m(c,d){var e=(c-a)*(c-a)+(d-b)*(d-b);e(c>a?c-a:a-c)){p=1-(c-e)*(c-e)/(p*p);if(0>p)return k;p=Math.sqrt(p);d=-l*p+f;m(c,l*p+f);m(c,d)}else{c=(d-b)/(c-a);d=1/(p*p)+c*c/(l*l);h=2*c*(b-c*a)/(l*l)-2*c*f/(l*l)-2*e/(p*p);p=h*h-4*d*(2*c*a*f/(l*l)-2*b*f/(l*l)+f*f/(l*l)+e*e/(p*p)-1+(b-c*a)*(b-c*a)/(l*l));if(0>p)return k;p=Math.sqrt(p);l=(-h+p)/(2*d);m(l,c*l-c*a+b);p=(-h-p)/(2*d);m(p, +c*p-c*a+b)}return k},jk:function(a,b,c,d,e,f,g,h,k){var l=1E21,m=a,n=b;if(Q.mg(a,b,a,d,e,f,g,h,k)){var p=(k.x-e)*(k.x-e)+(k.y-f)*(k.y-f);pl},Vu:function(a,b,c){var d=b.x,e=b.y,f=c.x,g=c.y,h=a.left,k=a.right, +l=a.top,m=a.bottom;return d===f?(f=a=0,e=l):e===g?(d=h):a.na(b)||a.na(c)||Q.Uu(h,l,k,l,d,e,f,g)||Q.Uu(k,l,k,m,d,e,f,g)||Q.Uu(k,m,h,m,d,e,f,g)||Q.Uu(h,m,h,l,d,e,f,g)?!0:!1},Uu:function(a,b,c,d,e,f,g,h){return 0>=Q.Fu(a,b,c,d,e,f)*Q.Fu(a,b,c,d,g,h)&&0>=Q.Fu(e,f,g,h,a,b)*Q.Fu(e,f,g,h,c,d)},Fu:function(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return 0>f?-1:0a&&(a+=360);360<=a&&(a-=360);return a},RB:function(a,b,c,d,e,f){void 0===f&&(f=!1);var g=Math.PI;f||(d*=g/180,e*=g/180);f=dc,f=0>d,g=0,h=g=0;al;++l){b=.5*(h+k);if(b===h||b===k)break;var m=a/(b+f),n=g/(b+e),m=m*m+n*n-1;if(0m)k=b;else break}c=f*c/(b+f)-c;d=e*d/(b+e)-d;e=Math.sqrt(c*c+d*d)}else e=Math.abs(d-b);else d=a*a-b*b,e=a*c,ea?"M"+this.da.toString()+" "+this.ea.toString()+"L"+this.q.toString()+" "+this.s.toString():"M"+this.da.toFixed(a)+" "+this.ea.toFixed(a)+"L"+this.q.toFixed(a)+" "+this.s.toFixed(a);case Pe:var b=new D(this.da,this.ea,0,0);b.FD(this.q,this.s,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 Qe:b=new D(this.da,this.ea,0,0);b.FD(this.q,this.s,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 Le:for(var b="",c=this.Xa.l,d=c.length,e=0;e=t-1?!0:null!==k[l+1].match(/[A-Za-z]/)}function d(){l++;return k[l]}function e(){var a=new z(parseFloat(d()),parseFloat(d()));m===m.toLowerCase()&&(a.x=s.x+a.x,a.y=s.y+a.y);return a}function f(){return s=e()}function g(){return q=e()}function h(){return"c"!==n.toLowerCase()&&"s"!==n.toLowerCase()?s:new z(2*s.x-q.x,2*s.y-q.y)}void 0===b&&(b=!1);"string"!==typeof a&&ta(a,"string",Ke,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, +"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");a=a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");for(var k=a.split(" "),l=-1,m="",n="",p=new z(0,0),q=new z(0,0),s=new z(0, +0),t=k.length,u=E(),x=!1,B=!1,y=!0;!(l>=t-1);)if(n=m,m=d(),""!==m)switch(m.toUpperCase()){case "X":y=!0;B=x=!1;break;case "M":var C=f();null===u.yb||!0===y?(S(u,C.x,C.y,x,!1,!B),y=!1):u.moveTo(C.x,C.y);for(p=s;!c();)C=f(),u.lineTo(C.x,C.y);break;case "L":for(;!c();)C=f(),u.lineTo(C.x,C.y);break;case "H":for(;!c();)s=C=new z((m===m.toLowerCase()?s.x:0)+parseFloat(d()),s.y),u.lineTo(s.x,s.y);break;case "V":for(;!c();)s=C=new z(s.x,(m===m.toLowerCase()?s.y:0)+parseFloat(d())),u.lineTo(s.x,s.y);break; +case "C":for(;!c();){var K=e(),J=g(),C=f();T(u,K.x,K.y,J.x,J.y,C.x,C.y)}break;case "S":for(;!c();)K=h(),J=g(),C=f(),T(u,K.x,K.y,J.x,J.y,C.x,C.y);break;case "Q":for(;!c();)J=g(),C=f(),df(u,J.x,J.y,C.x,C.y);break;case "T":for(;!c();)q=J=h(),C=f(),df(u,J.x,J.y,C.x,C.y);break;case "B":for(;!c();){var C=parseFloat(d()),K=parseFloat(d()),J=parseFloat(d()),ba=parseFloat(d()),ja=parseFloat(d()),Y=ja,P=!1;c()||(Y=parseFloat(d()),c()||(P=0!==parseFloat(d())));m===m.toLowerCase()&&(J+=s.x,ba+=s.y);u.arcTo(C, +K,J,ba,ja,Y,P)}break;case "A":for(;!c();)K=Math.abs(parseFloat(d())),J=Math.abs(parseFloat(d())),ba=parseFloat(d()),ja=!!parseFloat(d()),Y=!!parseFloat(d()),C=f(),ef(u,K,J,ba,ja,Y,C.x,C.y);break;case "Z":C=u.m.Xa.l[u.m.Xa.length-1];ff(u);s=p;break;case "F":C="";for(K=1;k[l+K];)if(null!==k[l+K].match(/[Uu]/))K++;else if(null===k[l+K].match(/[A-Za-z]/))K++;else{C=k[l+K];break}C.match(/[Mm]/)?x=!0:gf(u);break;case "U":C="";for(K=1;k[l+K];)if(null!==k[l+K].match(/[Ff]/))K++;else if(null===k[l+K].match(/[A-Za-z]/))K++; +else{C=k[l+K];break}C.match(/[Mm]/)?B=!0:u.Ja(!1)}p=u.m;F(u);if(b)for(u=p.Xa.i;u.next();)C=u.value,C.Jr=!0;return p};function hf(a,b){for(var c=a.length,d=Va(),e=0;e=a)return 0;if((e>g?e-g:g-e)<(f>h?f-h:h-f)){if(e=a=0,fe)return 0}else if(ee)return 0;return 0a||1a)return m=(a-p)/n,pb(c),new z(b+(e-b)*m,d+(f-d)*m);p+=n}b=e;d=f}pb(c);return null};G(Ke,{type:"type"},function(){return this.fa},function(a){this.fa!==a&&(pa(this,a),this.fa=a,this.Da=!0)});G(Ke,{da:"startX"},function(){return this.Pb},function(a){this.Pb!==a&&(pa(this,a),this.Pb=a,this.Da=!0)});G(Ke,{ea:"startY"},function(){return this.Wb},function(a){this.Wb!==a&&(pa(this,a),this.Wb=a,this.Da=!0)}); +G(Ke,{q:"endX"},function(){return this.Wa},function(a){this.Wa!==a&&(pa(this,a),this.Wa=a,this.Da=!0)});G(Ke,{s:"endY"},function(){return this.fb},function(a){this.fb!==a&&(pa(this,a),this.fb=a,this.Da=!0)});G(Ke,{Xa:"figures"},function(){return this.ii},function(a){this.ii!==a&&(pa(this,a),this.ii=a,this.Da=!0)});Ke.prototype.add=Ke.prototype.add=function(a){this.ii.add(a);return this};G(Ke,{o:"spot1"},function(){return this.Eh},function(a){pa(this,a);this.Eh=a.O()}); +G(Ke,{p:"spot2"},function(){return this.Fh},function(a){pa(this,a);this.Fh=a.O()});G(Ke,{Vc:"defaultStretch"},function(){return this.oh},function(a){pa(this,a);this.oh=a});H(Ke,{Qa:"bounds"},function(){this.jy()&&(this.dz(),this.zf());return this.Qs});function Me(a,b,c,d){sb(this);this.qa=!1;void 0===c&&(c=!0);this.Nk=c;void 0===d&&(d=!0);this.Gm=d;this.Pb=void 0!==a?a:0;this.Wb=void 0!==b?b:0;this.Ym=new N(Cf);this.Xt=this.Ym.K;this.Da=!0}vb("PathFigure",Me);Me.Og=!0; +Me.prototype.copy=function(){var a=new Me;a.Nk=this.Nk;a.Gm=this.Gm;a.Pb=this.Pb;a.Wb=this.Wb;for(var b=this.Ym.l,c=b.length,d=a.Ym,e=0;ea?"M"+this.da.toString()+" "+this.ea.toString():"M"+this.da.toFixed(a)+" "+this.ea.toFixed(a),c=this.pa.l,d=c.length,e=0;ea&&(a+=360),this.wc=a),void 0!==d&&(this.sf=Math.max(d,0)),void 0!==e&&(this.tf=Math.max(e,0)),this.Nm=!!g,this.em=!!h):(void 0!==d&&(this.wc=d),void 0!==e&&(this.Rd=e),void 0!==f&&(a===yf&&(f=Math.max(f,0)),this.sf=f),void 0!==g&&"number"===typeof g&&(a===yf&&(g=Math.max(g,0)),this.tf=g));this.Jg=!1;this.Da=!0;this.ai=null}vb("PathSegment",Cf); +Cf.Og=!0;Cf.prototype.copy=function(){var a=new Cf;a.fa=this.fa;a.Wa=this.Wa;a.fb=this.fb;void 0!==this.wc&&(a.wc=this.wc);void 0!==this.Rd&&(a.Rd=this.Rd);void 0!==this.sf&&(a.sf=this.sf);void 0!==this.tf&&(a.tf=this.tf);void 0!==this.Nm&&(a.Nm=this.Nm);void 0!==this.em&&(a.em=this.em);a.Jg=this.Jg;a.Da=this.Da;return a}; +Cf.prototype.equalsApprox=Cf.prototype.Wd=function(a){if(!(a instanceof Cf)||this.type!==a.type||this.Xu!==a.Xu)return!1;switch(this.type){case vf:case $e:return Q.u(this.q,a.q)&&Q.u(this.s,a.s);case wf:return Q.u(this.q,a.q)&&Q.u(this.s,a.s)&&Q.u(this.kb,a.kb)&&Q.u(this.wb,a.wb)&&Q.u(this.Hd,a.Hd)&&Q.u(this.Jd,a.Jd);case xf:return Q.u(this.q,a.q)&&Q.u(this.s,a.s)&&Q.u(this.kb,a.kb)&&Q.u(this.wb,a.wb);case yf:return Q.u(this.bh,a.bh)&&Q.u(this.Xh,a.Xh)&&Q.u(this.ra,a.ra)&&Q.u(this.Ba,a.Ba)&&Q.u(this.radiusX, +a.radiusX)&&Q.u(this.radiusY,a.radiusY);case zf:return this.Wu===a.Wu&&this.$u===a.$u&&Q.u(this.Hv,a.Hv)&&Q.u(this.q,a.q)&&Q.u(this.s,a.s)&&Q.u(this.radiusX,a.radiusX)&&Q.u(this.radiusY,a.radiusY);default:return!1}}; +Cf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case vf:b=0>a?"M"+this.q.toString()+" "+this.s.toString():"M"+this.q.toFixed(a)+" "+this.s.toFixed(a);break;case $e:b=0>a?"L"+this.q.toString()+" "+this.s.toString():"L"+this.q.toFixed(a)+" "+this.s.toFixed(a);break;case wf:b=0>a?"C"+this.kb.toString()+" "+this.wb.toString()+" "+this.Hd.toString()+" "+this.Jd.toString()+" "+this.q.toString()+" "+this.s.toString():"C"+this.kb.toFixed(a)+" "+this.wb.toFixed(a)+" "+this.Hd.toFixed(a)+ +" "+this.Jd.toFixed(a)+" "+this.q.toFixed(a)+" "+this.s.toFixed(a);break;case xf:b=0>a?"Q"+this.kb.toString()+" "+this.wb.toString()+" "+this.q.toString()+" "+this.s.toString():"Q"+this.kb.toFixed(a)+" "+this.wb.toFixed(a)+" "+this.q.toFixed(a)+" "+this.s.toFixed(a);break;case yf:b=0>a?"B"+this.bh.toString()+" "+this.Xh.toString()+" "+this.ra.toString()+" "+this.Ba.toString()+" "+this.radiusX:"B"+this.bh.toFixed(a)+" "+this.Xh.toFixed(a)+" "+this.ra.toFixed(a)+" "+this.Ba.toFixed(a)+" "+this.radiusX; +break;case zf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Hv.toString()+" "+(this.$u?1:0)+" "+(this.Wu?1:0)+" "+this.q.toString()+" "+this.s.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Hv.toFixed(a)+" "+(this.$u?1:0)+" "+(this.Wu?1:0)+" "+this.q.toFixed(a)+" "+this.s.toFixed(a);break;default:b=this.type.toString()}return b+(this.Jg?"z":"")};var vf;Cf.Move=vf=I(Cf,"Move",0);var $e;Cf.Line=$e=I(Cf,"Line",1);var wf; +Cf.Bezier=wf=I(Cf,"Bezier",2);var xf;Cf.QuadraticBezier=xf=I(Cf,"QuadraticBezier",3);var yf;Cf.Arc=yf=I(Cf,"Arc",4);var zf;Cf.SvgArc=zf=I(Cf,"SvgArc",4);Cf.prototype.freeze=function(){this.qa=!0;return this};Cf.prototype.wa=function(){this.qa=!1;return this};Cf.prototype.close=Cf.prototype.close=function(){this.Jg=!0;return this}; +function Af(a,b){if(null!==a.ai&&!1===b.Da)return a.ai;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);var e=a.wc,f=a.Rd,g=Q.RB(0,0,c=s?h=Math.PI:1<=s&&(h=0);!l&&0h&&(h+=2*Math.PI);l=b>g?1:b/g;s=b>g?g/b:1;b=Q.RB(0,0,b>g?b:g,n,n+h,!0);g=hb();g.reset();g.translate(c,d);g.rotate(a.wc,0,0);g.scale(l,s);hf(b,g);jb(g);a.ai=b;return a.ai}G(Cf,{Xu:"isClosed"},function(){return this.Jg},function(a){this.Jg!==a&&(this.Jg=a,this.Da=!0)}); +G(Cf,{type:"type"},function(){return this.fa},function(a){pa(this,a);this.fa=a;this.Da=!0});G(Cf,{q:"endX"},function(){return this.Wa},function(a){pa(this,a);this.Wa=a;this.Da=!0});G(Cf,{s:"endY"},function(){return this.fb},function(a){pa(this,a);this.fb=a;this.Da=!0});G(Cf,{kb:"point1X"},function(){return this.wc},function(a){pa(this,a);this.wc=a;this.Da=!0});G(Cf,{wb:"point1Y"},function(){return this.Rd},function(a){pa(this,a);this.Rd=a;this.Da=!0}); +G(Cf,{Hd:"point2X"},function(){return this.sf},function(a){pa(this,a);this.sf=a;this.Da=!0});G(Cf,{Jd:"point2Y"},function(){return this.tf},function(a){pa(this,a);this.tf=a;this.Da=!0});G(Cf,{ra:"centerX"},function(){return this.wc},function(a){pa(this,a);this.wc=a;this.Da=!0});G(Cf,{Ba:"centerY"},function(){return this.Rd},function(a){pa(this,a);this.Rd=a;this.Da=!0});G(Cf,{radiusX:"radiusX"},function(){return this.sf},function(a){0>a&&za(a,">= zero",Cf,"radiusX");pa(this,a);this.sf=a;this.Da=!0}); +G(Cf,{radiusY:"radiusY"},function(){return this.tf},function(a){0>a&&za(a,">= zero",Cf,"radiusY");pa(this,a);this.tf=a;this.Da=!0});G(Cf,{bh:"startAngle"},function(){return this.Wa},function(a){this.Wa!==a&&(pa(this,a),a%=360,0>a&&(a+=360),this.Wa=a,this.Da=!0)});G(Cf,{Xh:"sweepAngle"},function(){return this.fb},function(a){pa(this,a);360a&&(a=-360);this.fb=a;this.Da=!0});G(Cf,{Wu:"isClockwiseArc"},function(){return this.em},function(a){pa(this,a);this.em=a;this.Da=!0}); +G(Cf,{$u:"isLargeArc"},function(){return this.Nm},function(a){pa(this,a);this.Nm=a;this.Da=!0});G(Cf,{Hv:"xAxisRotation"},function(){return this.wc},function(a){a%=360;0>a&&(a+=360);pa(this,a);this.wc=a;this.Da=!0});function Ff(){this.N=null;this.vx=(new z(0,0)).freeze();this.pw=(new z(0,0)).freeze();this.Ns=this.Ht=0;this.wt="";this.ku=this.ct=!1;this.Zs=this.Ps=0;this.bi=this.jt=this.st=!1;this.To=null;this.ju=0;this.uf=this.hu=null}vb("InputEvent",Ff); +Ff.prototype.copy=function(){var a=new Ff;a.N=this.N;a.vx.assign(this.ve);a.pw.assign(this.S);a.Ht=this.Ht;a.Ns=this.Ns;a.wt=this.wt;a.ct=this.ct;a.ku=this.ku;a.Ps=this.Ps;a.Zs=this.Zs;a.st=this.st;a.jt=this.jt;a.bi=this.bi;a.To=this.To;a.ju=this.ju;a.hu=this.hu;a.uf=this.uf;return a}; +Ff.prototype.toString=function(){var a="^";0!==this.Bc&&(a+="M:"+this.Bc);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.ke&&(a+="C:"+this.ke);0!==this.bk&&(a+="D:"+this.bk);this.qc&&(a+="h");this.bubbles&&(a+="b");null!==this.S&&(a+="@"+this.S.toString());return a};G(Ff,{g:"diagram"},function(){return this.N},function(a){this.N=a});G(Ff,{ve:"viewPoint"},function(){return this.vx},function(a){ra(a,z,Ff,"viewPoint");this.vx.assign(a)}); +G(Ff,{S:"documentPoint"},function(){return this.pw},function(a){ra(a,z,Ff,"documentPoint");this.pw.assign(a)});G(Ff,{Bc:"modifiers"},function(){return this.Ht},function(a){this.Ht=a});G(Ff,{button:"button"},function(){return this.Ns},function(a){this.Ns=a});G(Ff,{key:"key"},function(){return this.wt},function(a){this.wt=a});G(Ff,{dk:"down"},function(){return this.ct},function(a){this.ct=a});G(Ff,{up:"up"},function(){return this.ku},function(a){this.ku=a}); +G(Ff,{ke:"clickCount"},function(){return this.Ps},function(a){this.Ps=a});G(Ff,{bk:"delta"},function(){return this.Zs},function(a){this.Zs=a});G(Ff,{Lr:"isMultiTouch"},function(){return this.st},function(a){this.st=a});G(Ff,{qc:"handled"},function(){return this.jt},function(a){this.jt=a});G(Ff,{bubbles:"bubbles"},function(){return this.bi},function(a){this.bi=a});G(Ff,{event:"event"},function(){return this.To},function(a){this.To=a}); +H(Ff,{qk:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});G(Ff,{timestamp:"timestamp"},function(){return this.ju},function(a){this.ju=a});G(Ff,{Qf:"targetDiagram"},function(){return this.hu},function(a){this.hu=a});G(Ff,{Kd:"targetObject"},function(){return this.uf},function(a){this.uf=a}); +G(Ff,{control:"control"},function(){return 0!==(this.Bc&1)},function(a){this.Bc=a?this.Bc|1:this.Bc&-2});G(Ff,{shift:"shift"},function(){return 0!==(this.Bc&4)},function(a){this.Bc=a?this.Bc|4:this.Bc&-5});G(Ff,{alt:"alt"},function(){return 0!==(this.Bc&2)},function(a){this.Bc=a?this.Bc|2:this.Bc&-3});G(Ff,{Ur:"meta"},function(){return 0!==(this.Bc&8)},function(a){this.Bc=a?this.Bc|8:this.Bc&-9});G(Ff,{left:"left"},function(){return 0===this.button},function(a){this.button=a?0:2}); +G(Ff,{vI:"middle"},function(){return 1===this.button},function(a){this.button=a?1:0});G(Ff,{right:"right"},function(){return 2===this.button},function(a){this.button=a?2:0});function Gf(){this.N=null;this.zb="";this.Qt=this.cu=null;this.Os=!1}vb("DiagramEvent",Gf);Gf.prototype.copy=function(){var a=new Gf;a.N=this.N;a.zb=this.zb;a.cu=this.cu;a.Qt=this.Qt;a.Os=this.Os;return a}; +Gf.prototype.toString=function(){var a="*"+this.name;this.cancel&&(a+="x");null!==this.Yy&&(a+=":"+this.Yy.toString());null!==this.Cy&&(a+="("+this.Cy.toString()+")");return a};G(Gf,{g:"diagram"},function(){return this.N},function(a){this.N=a});G(Gf,{name:"name"},function(){return this.zb},function(a){this.zb=a});G(Gf,{Yy:"subject"},function(){return this.cu},function(a){this.cu=a});G(Gf,{Cy:"parameter"},function(){return this.Qt},function(a){this.Qt=a}); +G(Gf,{cancel:"cancel"},function(){return this.Os},function(a){this.Os=a});function Hf(){this.zo=If;this.bl=this.Gt="";this.Wp=this.Xp=this.bq=this.cq=this.aq=this.N=this.fd=null}vb("ChangedEvent",Hf);var Pf;Hf.Transaction=Pf=I(Hf,"Transaction",-1);var If;Hf.Property=If=I(Hf,"Property",0);var Qf;Hf.Insert=Qf=I(Hf,"Insert",1);var Rf;Hf.Remove=Rf=I(Hf,"Remove",2);Hf.prototype.clear=Hf.prototype.clear=function(){this.Wp=this.Xp=this.bq=this.cq=this.aq=this.N=this.fd=null}; +Hf.prototype.copy=function(){var a=new Hf;a.fd=this.fd;a.N=this.N;a.zo=this.zo;a.Gt=this.Gt;a.bl=this.bl;a.aq=this.aq;var b=this.cq;a.cq=Ea(b)&&"function"===typeof b.O?b.O():b;b=this.bq;a.bq=Ea(b)&&"function"===typeof b.O?b.O():b;b=this.Xp;a.Xp=Ea(b)&&"function"===typeof b.O?b.O():b;b=this.Wp;a.Wp=Ea(b)&&"function"===typeof b.O?b.O():b;return a}; +Hf.prototype.toString=function(){var a="",a=this.Uc===Pf?a+"* ":this.Uc===If?a+(null!==this.U?"!m":"!d"):a+((null!==this.U?"!m":"!d")+this.Uc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.af&&this.af!==this.propertyName&&(a+=" "+this.af);a+=": ";this.Uc===Pf?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Sf(this.object)),null!==this.oldValue&&(a+=" old: "+Sf(this.oldValue)),null!==this.Nf&&(a+=" "+this.Nf),null!==this.newValue&&(a+= +" new: "+Sf(this.newValue)),null!==this.Lf&&(a+=" "+this.Lf));return a};Hf.prototype.getValue=Hf.prototype.ja=function(a){return a?this.oldValue:this.newValue};Hf.prototype.getParam=function(a){return a?this.Nf:this.Lf};Hf.prototype.canUndo=Hf.prototype.canUndo=function(){return null!==this.U||null!==this.g?!0:!1};Hf.prototype.undo=Hf.prototype.undo=function(){this.canUndo()&&(null!==this.U?this.U.ul(this,!0):null!==this.g&&this.g.ul(this,!0))}; +Hf.prototype.canRedo=Hf.prototype.canRedo=function(){return null!==this.U||null!==this.g?!0:!1};Hf.prototype.redo=Hf.prototype.redo=function(){this.canRedo()&&(null!==this.U?this.U.ul(this,!1):null!==this.g&&this.g.ul(this,!1))};G(Hf,{U:"model"},function(){return this.fd},function(a){this.fd=a});G(Hf,{g:"diagram"},function(){return this.N},function(a){this.N=a});G(Hf,{Uc:"change"},function(){return this.zo},function(a){this.zo=a}); +G(Hf,{af:"modelChange"},function(){return this.Gt},function(a){this.Gt=a});G(Hf,{propertyName:"propertyName"},function(){return this.bl},function(a){this.bl=a});H(Hf,{fI:"isTransactionFinished"},function(){return this.zo===Pf&&("CommittedTransaction"===this.bl||"FinishedUndo"===this.bl||"FinishedRedo"===this.bl)});G(Hf,{object:"object"},function(){return this.aq},function(a){this.aq=a});G(Hf,{oldValue:"oldValue"},function(){return this.cq},function(a){this.cq=a}); +G(Hf,{Nf:"oldParam"},function(){return this.bq},function(a){this.bq=a});G(Hf,{newValue:"newValue"},function(){return this.Xp},function(a){this.Xp=a});G(Hf,{Lf:"newParam"},function(){return this.Wp},function(a){this.Wp=a}); +function jc(a){1=d)return"[]";var e=new zc;e.add("[ ");c&&1b||(Ta(this.Be,b),ng(this,"nodeDataArray",Rf,"nodeDataArray",this,a,null,b,null),this.vs(a)))}};jc.prototype.removeNodeDataCollection=function(a){if(Fa(a))for(var b=Ia(a),c=0;cb&&(b=Ia(a));Qa(a,b,c);ng(this,"",Qf,"",a,null,c,null,b)};jc.prototype.removeArrayItem=function(a,b){void 0===b&&(b=-1);a===this.Be&&v("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=Ia(a)-1);var c=La(a,b);Ta(a,b);ng(this,"",Rf,"",a,c,null,b,null)}; +G(jc,{Ll:"nodeCategoryProperty"},function(){return this.Yp},function(a){var b=this.Yp;b!==a&&(og(a,jc,"nodeCategoryProperty"),this.Yp=a,this.h("nodeCategoryProperty",b,a))});jc.prototype.getCategoryForNodeData=jc.prototype.Sx=function(a){if(null===a)return"";var b=this.Yp;if(""===b)return"";b=Gb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; +jc.prototype.setCategoryForNodeData=jc.prototype.wv=function(a,b){w(b,"string",jc,"setCategoryForNodeData:cat");if(null!==a){var c=this.Yp;if(""!==c)if(this.le(a)){var d=Gb(a,c);void 0===d&&(d="");d!==b&&(Hb(a,c,b),ng(this,"nodeCategory",If,c,a,d,b))}else Hb(a,c,b)}}; +function Xf(a,b){2e||(Ta(d,e),this.Mh(a)&&(sg(this,b,a),ng(this,"linkLabelKeys",Rf,c,a,b,null)))}else void 0!==d&&v(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; +G(Xf,{$i:"linkDataArray"},function(){return this.Lg},function(a){var b=this.Lg;if(b!==a){Ga(a,Xf,"linkDataArray");for(var c=Ia(a),d=0;db)){Ta(this.Lg,b);ng(this,"linkDataArray",Rf,"linkDataArray",this,a,null,b,null);b=this.hk(a);sg(this,b,a);b=this.kk(a);sg(this,b,a);var c=this.Zi(a);if(Fa(c))for(var d=Ia(c),e=0;ea.be&&Da("Ending transaction without having started a transaction: "+c);var d=1===a.be;d&&b&&a.isEnabled&&a.oc("CommittingTransaction",c,a.Nh);var e=0;if(0a.Sh;e--)f=d.Y(e),null!==f&&f.clear(), +d.Cc(e),a.Lw=!0;e=a.CC;0===e&&(e=1);0=e&&(f=d.Y(0),null!==f&&f.clear(),d.Cc(0),a.Wf--);d.add(b);a.Wf++;d.freeze();f=b}a.oc("CommittedTransaction",c,f)}else{a.sh=!0;try{a.isEnabled&&null!==f&&(f.Ir=!0,f.undo())}finally{a.oc("RolledBackTransaction",c,f),a.sh=!1}null!==f&&f.clear()}a.Ys=null;return!0}if(a.isEnabled&&!b&&null!==f){a=e;c=f.gg;for(b=c.count-1;b>=a;b--)d=c.Y(b),null!==d&&d.undo(),c.wa(),c.Cc(b);c.freeze()}return!1} +Tf.prototype.canUndo=Tf.prototype.canUndo=function(){if(!this.isEnabled||0=this.be&&!this.xw&&(a=a.g,null!==a&&!1===a.Ae||Da("Change not within a transaction: "+c.toString()))}}; +Tf.prototype.skipsEvent=function(a){if(null===a||0>a.Uc.value)return!0;a=a.object;if(a instanceof U){if(a=a.layer,null!==a&&a.bc)return!0}else if(a instanceof jg&&a.bc)return!0;return!1};H(Tf,{bG:"models"},function(){return this.Sw.i});G(Tf,{isEnabled:"isEnabled"},function(){return this.de},function(a){this.de=a});H(Tf,{BD:"transactionToUndo"},function(){return 0<=this.Sh&&this.Sh<=this.history.count-1?this.history.Y(this.Sh):null}); +H(Tf,{AD:"transactionToRedo"},function(){return this.Shb.jg||(b.scale=a))};ec.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.Iv);ua(a,ec,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.mn!==ah)return!1;a*=b.scale;return ab.jg?!1:b.zu}; +ec.prototype.increaseZoom=function(a){void 0===a&&(a=this.Iv);ua(a,ec,"increaseZoom:factor");var b=this.g;null!==b&&b.mn===ah&&(a*=b.scale,ab.jg||(b.scale=a))};ec.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.Iv);ua(a,ec,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.mn!==ah)return!1;a*=b.scale;return ab.jg?!1:b.zu};ec.prototype.resetZoom=function(a){void 0===a&&(a=this.Hu);ua(a,ec,"resetZoom:newscale");var b=this.g;null===b||ab.jg||(b.scale=a)}; +ec.prototype.canResetZoom=function(a){void 0===a&&(a=this.Hu);ua(a,ec,"canResetZoom:newscale");var b=this.g;return null===b||ab.jg?!1:b.zu};ec.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b!==this.sB||isNaN(this.Mw)?(this.Mw=b,this.mA=c.copy(),a.zoomToFit(),a.te(),this.sB=a.scale):(a.scale=this.Mw,a.position=this.mA)}};ec.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.zu}; +ec.prototype.collapseTree=function(a){void 0===a&&(a=null);var b=this.g;if(null===b)return!1;try{b.Bb("Collapse Tree");var c=new N(V);if(null!==a&&a.rc)a.collapseTree(),c.add(a);else for(var d=b.selection.i;d.next();){var e=d.value;e instanceof V&&(a=e,a.rc&&(a.collapseTree(),c.add(a)))}b.ma("TreeCollapsed",c)}finally{b.od("Collapse Tree")}}; +ec.prototype.canCollapseTree=function(a){void 0===a&&(a=null);var b=this.g;if(null===b||b.Ta)return!1;if(null!==a){if(!a.rc)return!1;if(0b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.Te[0])c=a.Te[0],d=a.Te[1];else return;this.doCancel();if(a.Am){a.yw=!0;a.zA=a.scale;var e=a.eb,f=a.cb,g=a.Oa.getBoundingClientRect(),h=c.clientX-e/g.width*g.left,k=c.clientY-f/g.height*g.top,c=d,d=c.clientX-e/g.width*g.left-h,f=c.clientY-f/g.height*g.top-k,f=Math.sqrt(d*d+f* +f);a.WA=f;b.preventDefault();b.cancelBubble=!0}else dh(a)}}; +kg.prototype.standardPinchZoomMove=function(){var a=this.g;if(null!==a){var b=a.C.event;this.doCancel();dh(a);var c=null,d=null;if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.Te[0])c=a.Te[0],d=a.Te[1];else return;if(a.Am&&a.yw){var e=a.eb,f=a.cb,g=a.Oa.getBoundingClientRect(),h=c,c=h.clientX-e/g.width*g.left,k=h.clientY-f/g.height*g.top,h=d,d=h.clientX-e/g.width*g.left,f=h.clientY-f/g.height*g.top,g=d-c,e=f-k,g=Math.sqrt(g* +g+e*e)/a.WA,c=new z((Math.min(d,c)+Math.max(d,c))/2,(Math.min(f,k)+Math.max(f,k))/2),k=a.zA*g,d=a.ib;k!==a.scale&&d.canResetZoom(k)&&(f=a.Ul,a.Ul=c,d.resetZoom(k),a.Ul=f);b.preventDefault();b.cancelBubble=!0}}};kg.prototype.doKeyDown=function(){var a=this.g;null!==a&&"Esc"===a.C.key&&this.doCancel()};kg.prototype.doKeyUp=function(){};kg.prototype.startTransaction=kg.prototype.Bb=function(a){void 0===a&&(a=this.name);this.Oe=null;var b=this.g;return null===b?!1:b.Bb(a)}; +kg.prototype.stopTransaction=kg.prototype.dj=function(){var a=this.g;return null===a?!1:null===this.Oe?a.Yn():a.od(this.Oe)}; +kg.prototype.standardMouseSelect=function(){var a=this.g;if(null!==a&&a.De){var b=a.C,c=a.wr(b.S,!1);if(null!==c)if(fa?b.Ur:b.control){a.ma("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Ca;null!==b&&(b.Ia=!b.Ia);a.ma("ChangedSelection")}else if(b.shift){if(!c.Ia){a.ma("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Ca;null!==b&&(b.Ia=!0);a.ma("ChangedSelection")}}else{if(!c.Ia){for(b=c;null!==b&&!b.canSelect();)b=b.Ca;null!==b&&a.select(b)}}else!b.left||(fa?b.Ur:b.control)|| +b.shift||a.Du()}};kg.prototype.standardMouseClick=function(a,b){void 0===a&&(a=null);void 0===b&&(b=function(a){return!a.layer.bc});var c=this.g;if(null!==c){var d=c.C,e=c.Cd(d.S,a,b);d.Kd=e;eh(e,d,c)}}; +function eh(a,b,c){var d=0;b.left?d=1===b.ke?1:2===b.ke?2:1:b.right&&1===b.ke&&(d=3);var e="";if(null!==a){switch(d){case 1:e="ObjectSingleClicked";break;case 2:e="ObjectDoubleClicked";break;case 3:e="ObjectContextClicked"}0!==d&&c.ma(e,a)}else{switch(d){case 1:e="BackgroundSingleClicked";break;case 2:e="BackgroundDoubleClicked";break;case 3:e="BackgroundContextClicked"}0!==d&&c.ma(e)}if(null!==a)for(b.qc=!1;null!==a;){c=null;switch(d){case 1:c=a.click;break;case 2:c=a.qr?a.qr:a.click;break;case 3:c= +a.Gx}if(null!==c&&(c(b,a),b.qc))break;a=a.I}else{a=null;switch(d){case 1:a=c.click;break;case 2:a=c.qr?c.qr:c.click;break;case 3:a=c.Gx}null!==a&&a(b)}} +kg.prototype.standardMouseOver=function(){var a=this.g;if(null!==a){var b=a.C;if(null!==b.g&&!0!==a.rb.Fc){var c=a.Ma;a.Ma=!0;var d=a.Cd(b.S,null,null);b.Kd=d;var e=!1;if(d!==a.hm){var f=a.hm,g=f;a.hm=d;this.doCurrentObjectChanged(f,d);for(b.qc=!1;null!==f;){var h=f.HC;if(null!==h){if(d===f)break;if(null!==d&&d.nk(f))break;h(b,f,d);e=!0;if(b.qc)break}f=f.I}f=g;for(b.qc=!1;null!==d;){h=d.GC;if(null!==h){if(f===d)break;if(null!==f&&f.nk(d))break;h(b,d,f);e=!0;if(b.qc)break}d=d.I}d=a.hm}if(null!==d){f= +d;for(h="";null!==f;){h=f.cursor;if(""!==h)break;f=f.I}a.Gb=h;b.qc=!1;for(f=d;null!==f;){h=f.vy;if(null!==h&&(h(b,f),e=!0,b.qc))break;f=f.I}}else a.Gb="",h=a.vy,null!==h&&(h(b),e=!0);e&&a.vd();a.Ma=c}}};kg.prototype.doCurrentObjectChanged=function(){}; +kg.prototype.standardMouseWheel=function(){var a=this.g;if(null!==a){var b=a.C,c=b.bk;if(0!==c&&a.Wc.w()){var d=a.ib,e=a.Ya.Wr;if((e===fh&&!b.shift||e===gh&&b.control)&&(0e||Math.abs(b.y-a.y)>d};H(kg,{g:"diagram"},function(){return this.N}); +G(kg,{name:"name"},function(){return this.zb},function(a){w(a,"string",kg,"name");this.zb=a});G(kg,{isEnabled:"isEnabled"},function(){return this.de},function(a){w(a,"boolean",kg,"isEnabled");this.de=a});G(kg,{ca:"isActive"},function(){return this.Zz},function(a){w(a,"boolean",kg,"isActive");this.Zz=a});G(kg,{Oe:"transactionResult"},function(){return this.nB},function(a){null!==a&&w(a,"string",kg,"transactionResult");this.nB=a}); +function $g(){0e&&(e=h),k>f&&(f=k))}}Infinity===c?b.k(0,0,0,0):b.k(c,d,e-c,f-d)} +function Ph(a,b){if(null===a.Qb){var c=a.g;if(!(null===c||b&&(c.Ta||c.Je))&&null!==a.Ib){var d=c.V;d.isEnabled&&d.uC?null!==d.Nh&&0c.Z)){var d=a.g;if(null!==d&&!d.Ta&&(d=a.Ch,null!==d)){var e=null,f=null;null===c.M&&(e=Zh(a,c.j(0),!1),null!==e&&(f=e.J));var g=null,h=null;null===c.R&&(g=Zh(a,c.j(c.Z-1),!0),null!==g&&(h=g.J));var k=d.isValidLink(f,e,h,g);b?(c.lm=c.j(0).copy(),c.pm=c.j(c.Z-1).copy(),c.ho=!1,c.M=f,null!==e&&(c.Ef=e.bd),c.R=h,null!==g&&(c.wg=g.bd)):k?$h(d,f,e,h,g):$h(d,null,null,null,null)}}}$g.prototype.doDragOver=function(){}; +function ai(a,b){var c=a.g;if(null!==c){a.Qh&&Vh(a,!0);xh(a);var d=Wh(c,b,null,function(b){return!Th(a,b)}),e=c.C;e.Kd=d;if(null!==d){e.qc=!1;for(var f=d;null!==f;){var g=f.sy;if(null!==g&&(g(e,f),e.qc))break;f=Yh(f)}}else g=c.sy,null!==g&&g(e);if(a.ca||null!==qh)if(a.doDropOnto(b,d),a.ca||null!==qh)for(d=c.selection.i;d.next();)e=d.value,e instanceof V&&bi(c,e.Q)}}$g.prototype.doDropOnto=function(){}; +$g.prototype.doMouseMove=function(){if(this.ca){var a=this.g;if(null!==a&&null!==this.or&&null!==this.Ib){var b=!1,c=!1;this.mayCopy()?(b=!0,a.Gb="copy",Ph(this,!1),ph(this,this.Qb),Qh(this,this.Qb,!1),yh(this,this.Qb)):this.mayMove()?(c=!0,a.Gb="default",Bh(this),Qh(this,this.Ib,!0)):this.mayDragOut()?(a.Gb="no-drop",Ph(this,!1),Qh(this,this.Qb,!1)):Bh(this);Uh(this,a.C.S,c,b)}}}; +$g.prototype.doMouseUp=function(){if(this.ca){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.Qb?(Bh(this),Ph(this,!0),ph(this,this.Qb),Qh(this,this.Qb,!1),yh(this,this.Qb),null!==this.Qb&&a.jD(this.Qb.Yh())):(b=!0,Bh(this),this.mayMove()&&(Qh(this,this.Ib,!0),this.Zt=!1,Uh(this,a.C.S,!0,!1),this.Zt=!0));this.Po=!0;ai(this,a.C.S);if(this.ca){this.Qb=null;if(b&&null!==this.Ib)for(b=this.Ib.i;b.next();){var d=b.key;d instanceof V&&(d=d.Ca,null===d||null===d.placeholder||this.Ib.contains(d)|| +d.MB&&d.H())}a.Rb();yh(this,this.Ib);this.Oe=c?"Copy":"Move";a.ma(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};$g.prototype.mayCopy=function(){if(!this.tC)return!1;var a=this.g;if(null===a||a.Ta||a.Je||!a.kn||!a.Ti||(fa?!a.C.alt:!a.C.control))return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.Zc()&&b.canCopy())return!0}return null!==this.pc&&this.Qh&&this.pc.canCopy()?!0:!1}; +$g.prototype.mayDragOut=function(){if(!this.tC)return!1;var a=this.g;if(null===a||!a.tu||!a.Ti||a.Wj)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.Zc()&&b.canCopy())return!0}return null!==this.pc&&this.Qh&&this.pc.canCopy()?!0:!1};$g.prototype.mayMove=function(){var a=this.g;if(null===a||a.Ta||!a.Wj)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.Zc()&&b.canMove())return!0}return null!==this.pc&&this.Qh&&this.pc.canMove()?!0:!1};var zh=new N($g),qh=null,rh=null; +$g.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.zB||a.Ta||a.Je||!a.kn)return!1;var b=qh;return null===b||b.g.U.$j!==a.U.$j?!1:!0};$g.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.rb.Wh();ci(a);a=qh;null!==a&&(a.g.Gb="copy")}};$g.prototype.doSimulatedDragLeave=function(){var a=qh;null!==a&&a.doSimulatedDragOut();this.doCancel()}; +$g.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=qh;null!==b&&null!==b.Ib&&this.mayDragIn()&&(a.Gb="copy",di(this,b.Ib.Yh(),!1),Qh(this,this.Qb,!1),Uh(this,a.C.S,!1,!0))}}; +$g.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=qh;null!==b&&(b.Po=!0,Bh(this),this.mayDragIn()&&(this.Bb("Drop"),di(this,b.Ib.Yh(),!0),Qh(this,this.Qb,!1),null!==this.Qb&&a.jD(this.Qb.Yh()),this.Oe="ExternalCopy",ai(this,a.C.S),a.Rb(),this.Qb=null,a.focus(),a.ma("ExternalObjectsDropped",a.selection),this.dj()))}}; +function di(a,b,c){if(null===a.Qb){var d=a.g;if(null!==d&&!d.Ta&&!d.Je){d.Ma=!c;d.Yl=!c;a.cj=d.C.S;d=d.sn(b,d,!0);c=bb();Gh(b,c);var e=c.x+c.width/2,f=c.y+c.height/2;fb(c);var g=a.au;c=new Fb(O);var h=Va();for(b=b.i;b.next();){var k=b.value;if(k.Zc()&&k.canCopy()){var l=k.location,k=d.ja(k);h.k(g.x-(e-l.x),g.y-(f-l.y));k.location=h;k.Ee();c.add(k,uh(h))}}A(h);for(d=d.i;d.next();)e=d.value,e instanceof W&&e.canCopy()&&c.add(e,uh());a.Qb=c;oh(a,c.Yh());null!==a.pc&&(c=a.pc,d=c.Pl,c.sk(a.cj.x-(d.x+d.width/ +2),a.cj.y-(d.y+d.height/2)))}}}$g.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.Gb="":a.Gb="no-drop")};function vh(a){this.point=a;this.pD=Q.ej}vb("DraggingInfo",vh);function Rh(a,b,c){this.dc=a;this.info=b;this.qF=c} +function ei(){0=d&&(d=.1);for(var e=this,f=b.Dl(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,f=f.i;f.next();){var g=f.value,h=g.J;if(h instanceof V){var k=g.Ra(Dd,Va()),l=c.x-k.x,m=c.y-k.y;A(k);k=l*l+m*m;kc){if(null!==this.Sb&&a===this.og&&b===this.pg)return!0;var d=b.bd;null===d&&(d="");if(a.Ou(d).count>=c)return!1}return!0}; +ei.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.Gn;if(this.g.Ha===this&&(null!==a.layer&&!a.layer.gr||!0!==b.vD))return!1;var c=b.YG;if(Infinity>c){if(null!==this.Sb&&a===this.qg&&b===this.rg)return!0;var d=b.bd;null===d&&(d="");if(a.Df(d).count>=c)return!1}return!0};ei.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.J,d=b.J;return null!==c&&c===d}; +ei.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.J;if(!(c instanceof V))return!1;var d=a.bd;null===d&&(d="");var e=b.J;if(!(e instanceof V))return!1;var f=b.bd;null===f&&(f="");for(e=e.Df(f);e.next();)if(f=e.value,f.M===c&&f.Ef===d)return!0;return!1}; +ei.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.hF&&d.XG||!this.isInSameNode(b,d))&&(b.gF&&d.WG||!this.isLinked(b,d)))||null!==this.Sb&&(null!==a&&this.isLabelDependentOnLink(a,this.Sb)||null!==c&&this.isLabelDependentOnLink(c,this.Sb))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.Sb))return!1;if(null!==a){var e=a.iv;if(null!==e&&!e(a,b,c,d,this.Sb))return!1}if(null!== +c&&(e=c.iv,null!==e&&!e(a,b,c,d,this.Sb)))return!1;e=this.iv;return null!==e?e(a,b,c,d,this.Sb):!0};ei.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.ud;if(null===c)return!1;if(c===b)return!0;var d=new Xb(V);d.add(a);return fi(this,c,b,d)};function fi(a,b,c,d){if(b===c)return!0;var e=b.M;if(null!==e&&e.Ie&&(d.add(e),fi(a,e.ud,c,d)))return!0;b=b.R;return null!==b&&b.Ie&&(d.add(b),fi(a,b.ud,c,d))?!0:!1} +ei.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.Gn;var d=this.g.cH;if(d!==gi){if(d===hi){if(null!==c&&!c.cc)return!0;for(d=b.Gd;d.next();){var e=d.value;if(e!==c&&e.cc&&e.R===b)return!1}return!ii(this,a,b,c,!0)}if(d===ji){if(null!==c&&!c.cc)return!0;for(d=a.Gd;d.next();)if(e=d.value,e!==c&&e.cc&&e.M===a)return!1;return!ii(this,a,b,c,!0)}if(d===ki)return a===b?a=!0:(d=new Xb(V),d.add(b),a=li(this,d,a,b,c)),!a;if(d===mi)return!ii(this,a,b,c,!1);if(d=== +ni)return a===b?a=!0:(d=new Xb(V),d.add(b),a=oi(this,d,a,b,c)),!a}return!0};function ii(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.Gd;f.next();){var g=f.value;if(g!==d&&(!e||g.cc)&&g.R===b&&(g=g.M,g!==b&&ii(a,g,c,d,e)))return!0}return!1}function li(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.Gd;f.next();){var g=f.value;if(g!==e&&g.R===c&&(g=g.M,g!==c&&li(a,b,g,d,e)))return!0}return!1} +function oi(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.Gd;f.next();){var g=f.value;if(g!==e){var h=g.M,g=g.R,h=h===c?g:h;if(h!==c&&oi(a,b,h,d,e))return!0}}return!1}G(ei,{iv:"linkValidation"},function(){return this.Gj},function(a){null!==a&&w(a,"function",ei,"linkValidation");this.Gj=a});G(ei,{pv:"portTargeted"},function(){return this.LA},function(a){null!==a&&w(a,"function",ei,"portTargeted");this.LA=a}); +function hc(){0b.yr+1&&c=a.x)c=0>=a.y?c+225:1<=a.y?c+135:c+180;else if(1<=a.x)0>=a.y?c+=315:1<=a.y&&(c+=45);else if(0>=a.y)c+=270;else if(1<=a.y)c+=90;else break a;0>c?c+=360:360<=c&&(c-=360);b.cursor=22.5>c?"e-resize":67.5>c?"se-resize":112.5>c?"s-resize":157.5>c?"sw-resize":202.5>c?"w-resize":247.5>c?"nw-resize":292.5>c?"n-resize":337.5>c?"ne-resize":"e-resize"}else if(b instanceof L)for(b=b.elements;b.next();)Qi(a, +b.value,c)}G(Pi,{Er:"handleArchetype"},function(){return this.yj},function(a){null!==a&&ra(a,U,Pi,"handleArchetype");this.yj=a});H(Pi,{handle:"handle"},function(){return this.Db});G(Pi,{Xb:"adornedObject"},function(){return this.mb},function(a){null!==a&&ra(a,U,Pi,"adornedObject");this.mb=a});Pi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.Ta&&a.hr&&a.C.left?null!==this.findToolHandleAt(a.Yb.S,this.name)?!0:!1:!1}; +Pi.prototype.doActivate=function(){var a=this.g;null!==a&&(this.Db=this.findToolHandleAt(a.Yb.S,this.name),null!==this.Db&&(this.mb=this.Db.J.Xb,this.Ww.set(this.mb.J.location),this.Ot.set(this.mb.ka),this.uw=this.computeCellSize(),this.ww=this.computeMinSize(),this.vw=this.computeMaxSize(),a.Yd=!0,this.xA=a.rb.isEnabled,a.rb.isEnabled=!1,this.Bb(this.name),this.ca=!0))};Pi.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.dj(),this.mb=this.Db=null,this.ca=a.Yd=!1,a.rb.isEnabled=this.xA)}; +Pi.prototype.doCancel=function(){this.mb.ka=this.Ot;this.mb.J.location=this.Ww;this.stopTool()};Pi.prototype.doMouseMove=function(){var a=this.g;if(this.ca&&null!==a){var b=this.ww,c=this.vw,d=this.uw,e=this.mb.iC(a.C.S,Va()),f=Ti;this.mb instanceof X&&(f=Ui(this.mb));b=this.computeResize(e,this.Db.alignment,b,c,d,!(f===Vi||f===Wi||a.C.shift));this.resize(b);a.te();A(e)}}; +Pi.prototype.doMouseUp=function(){var a=this.g;if(this.ca&&null!==a){var b=this.ww,c=this.vw,d=this.uw,e=this.mb.iC(a.C.S,Va()),f=Ti;this.mb instanceof X&&(f=Ui(this.mb));b=this.computeResize(e,this.Db.alignment,b,c,d,!(f===Vi||f===Wi||a.C.shift));this.resize(b);A(e);a.Rb();this.Oe=this.name;a.ma("PartResized",this.mb,this.Ot)}this.stopTool()}; +Pi.prototype.resize=function(a){if(null!==this.g){var b=this.Xb,c=b.J,d=b.gk(),e=b.Rh(),f=Math.PI*d/180,g=Math.cos(f),f=Math.sin(f),h=0d?1:0,k=90d?1:0,d=180d?1:0,l=b.ta.width,m=b.ta.height;b.ka=a.size;var n=c.position.copy();c.Ee();l=b.ta.width-l;m=b.ta.height-m;if(0!==l||0!==m)0!==l&&(n.x+=e*((a.x+l*k)*g-(a.y+m*h)*f)),0!==m&&(n.y+=e*((a.x+l*d)*f+(a.y+m*k)*g)),c.move(n)}}; +Pi.prototype.computeResize=function(a,b,c,d,e,f){b.Fd()&&(b=Dd);var g=this.Xb.ta,h=g.x,k=g.y,l=g.x+g.width,m=g.y+g.height,n=1;if(!f){var n=g.width,p=g.height;0>=n&&(n=1);0>=p&&(p=1);n=p/n}p=Va();Q.ur(a.x,a.y,h,k,e.width,e.height,p);a=g.copy();0>=b.x?0>=b.y?(a.x=Math.max(p.x,l-d.width),a.x=Math.min(a.x,l-c.width),a.width=Math.max(l-a.x,c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=Math.max(m-a.y,c.height),f||(b=a.height/a.width,n=b.y?(a.width=Math.max(Math.min(p.x-h,d.width),c.width),a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m- +c.height),a.height=Math.max(m-a.y,c.height),f||(b=a.height/a.width,n=b.y?(a.y=Math.max(p.y,m-d.height),a.y=Math.min(a.y,m-c.height),a.height=m-a.y,f||(a.width=a.height/ +n,a.x=h+.5*(l-h-a.width))):1<=b.y&&(a.height=Math.max(Math.min(p.y-k,d.height),c.height),f||(a.width=a.height/n,a.x=h+.5*(l-h-a.width)));A(p);return a};Pi.prototype.computeMinSize=function(){var a=this.Xb.Jf.copy(),b=this.Jf;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; +Pi.prototype.computeMaxSize=function(){var a=this.Xb.se.copy(),b=this.se;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.MG),180),c=Math.min(Math.abs(this.LG),b/2);!this.g.C.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};G(Xi,{MG:"snapAngleMultiple"},function(){return this.UA},function(a){w(a,"number",Xi,"snapAngleMultiple");this.UA=a}); +G(Xi,{LG:"snapAngleEpsilon"},function(){return this.TA},function(a){w(a,"number",Xi,"snapAngleEpsilon");this.TA=a});H(Xi,{CI:"originalAngle"},function(){return this.Nt});function Zi(){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.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}vg.prototype.prepareAnimation=vg.prototype.tk=function(){this.de&&(this.ni&&this.Wh(),this.Fc=!0,this.oz=!1)}; +function Cj(a){a.de&&requestAnimationFrame(function(){!1===a.Fc||a.ni||(a.N.nl=1,Pj(a.N),a.Fc=!1,a.N.ma("AnimationStarting"),Qj(a))})}function Rj(a,b,c,d,e){if(a.Fc&&(!(b instanceof O)||b.qC)){var f=a.Sm;if(f.contains(b)){b=f.ja(b);a=b.start;var g=b.end;void 0===a[c]&&(a[c]=Sj(d));g[c]=Sj(e)}else a=new Sb,g=new Sb,a[c]=Sj(d),g[c]=Sj(e),f.add(b,new Bj(a,g))}}function Sj(a){return a instanceof z?a.copy():a instanceof Za?a.copy():a} +function Qj(a){var b;void 0===b&&(b=new Sb);var c=a.N;if(null!==c)if(0===a.Sm.count)a.ni=!1,Tj(c,!1),c.te();else{a.ni=!0;var d=b.UH||a.YD,e=b.AI||null,f=b.BI||null,g=b.duration||a.rw;b=a.gE;for(var h=a.Sm.i;h.next();){var k=h.value.start.position;k instanceof z&&(k.w()||k.assign(b))}a.Cz=d;a.Vs=e;a.Ws=f;a.gw=g;var l=a.XD=a.Sm;Uj(a);Vj(a,c,l,d,0,g,null!==a.Lk&&null!==a.Kk);ci(a.N);Wj(a);requestAnimationFrame(function(b){var e=b||+new Date,f=e+g;(function s(b){if(!1!==a.ni){b=b||+new Date;var h=b>f? +g:b-e;Uj(a);Vj(a,c,l,d,h,g,null!==a.Lk&&null!==a.Kk);a.Vs&&a.Vs();ci(c);Wj(a);b>f?Xj(a):requestAnimationFrame(s)}})(e)})}}var Yj={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.nD(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 Uj(a){if(!a.Hm){var b=a.N;a.oB=b.Ma;a.pz=b.Bv;a.qz=b.ps;b.Ma=!0;b.Bv=!0;b.ps=!0;a.Hm=!0}}function Wj(a){var b=a.N;b.Ma=a.oB;b.Bv=a.pz;b.ps=a.qz;a.Hm=!1}function Vj(a,b,c,d,e,f,g){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(void 0!==Yj[m])Yj[m](h,l[m],k[m],d,e,f)}g&&(g=a.Lk,a=a.Kk,m=a.y-g.y,a=d(e,g.x,a.x-g.x,f),d=d(e,g.y,m,f),e=b.ey,b.ey=!0,b.position=new z(a,d),b.ey=e)} +vg.prototype.stopAnimation=vg.prototype.Wh=function(){!0===this.Fc&&(this.Fc=!1,this.oz&&this.N.vd());this.ni&&this.de&&(Uj(this),Vj(this,this.N,this.XD,this.Cz,this.gw,this.gw,null!==this.Lk&&null!==this.Kk),Wj(this),Xj(this))};function Xj(a){a.ni=!1;a.Lk=null;a.Kk=null;a.Sm=new Fb(U,Bj);Uj(a);for(var b=a.N.links;b.next();){var c=b.value;null!==c.Xm&&(c.points=c.Xm,c.Xm=null)}b=a.N;Tj(b,!1);b.Rb();b.te();Zj(b);Wj(a);a.Ws&&a.Ws();a.Ws=null;a.Vs=null;b.ma("AnimationFinished");b.vd()} +function ak(a,b,c){var d=b.Q,e=c.Q,f=null;c instanceof Wg&&(f=c.placeholder);null!==f?(c=f.Ra(ud),c.x+=f.padding.left,c.y+=f.padding.top,Rj(a,b,"position",c,b.position)):Rj(a,b,"position",new z(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position);Rj(a,b,"opacity",.01,b.opacity)}function bk(a,b,c){a.Fc&&(null===a.Lk&&b.w()&&null===a.Kk&&(a.Lk=b.copy()),a.Kk=c.copy())}G(vg,{isEnabled:"isEnabled"},function(){return this.de},function(a){w(a,"boolean",vg,"isEnabled");this.de=a}); +G(vg,{duration:"duration"},function(){return this.rw},function(a){w(a,"number",vg,"duration");1>a&&za(a,">= 1",vg,"duration");this.rw=a});H(vg,{hg:"isAnimating"},function(){return this.ni});H(vg,{eI:"isTicking"},function(){return this.Hm});function Bj(a,b){this.start=a;this.end=b} +function jg(){0=a)return b;for(var c=0,d=0,e=0,f=0,g=0,h=this.hb.i;h.next();){var k=h.value;k instanceof Wg?e++:k instanceof V?d++:k instanceof W?f++:k instanceof Vg?g++:c++}h="";0=d.count)a=d.count;else if(d.Y(a)===b)return-1;d.pd(a,b);b.Fr(c);d=this.g;null!==d&&(c?d.ba():d.Dn(b));b instanceof Wg&&this.Cv(b);return a};r.pe=function(a,b,c){var d=this.hb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.Y(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.Gr(c);d.Cc(a);d=this.g;null!==d&&(c?d.ba():d.pe(b));b.xt=null;return a}; +r.Cv=function(a){for(;null!==a;){if(a.layer===this){var b=a;if(0!==b.lc.count){for(var c=-1,d=-1,e=this.hb.l,f=e.length,g=0;gd&&h.Ca===b&&(d=g,0<=c))break}!(0>d)&&da||1=a)return b;for(var c=this.Eb.i;c.next();)b+="\n "+c.value.toString(a-1);return b};M.prototype.checkProperties=function(){void 0===Ub?Ub=new Xb(Object):Ub.clear();Wb=new zc;Tb("",this);var a=Wb.toString();Wb=null;return a}; +M.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.N instanceof M?b.N:null}; +G(M,{ck:"div"},function(){return this.pb},function(a){null!==a&&ra(a,HTMLDivElement,M,"div");if(this.pb!==a){jk=[];var b=this.pb;null!==b?(b.N=void 0,b.innerHTML="",null!==this.Oa&&(this.Oa.removeEventListener("touchstart",this.zD,!1),this.Oa.removeEventListener("touchmove",this.yD,!1),this.Oa.removeEventListener("touchend",this.xD,!1),this.Oa.Xc.N=null),b=this.Ya,null!==b&&(b.ue.each(function(a){a.cancelWaitAfter()}),b.bf.each(function(a){a.cancelWaitAfter()}),b.cf.each(function(a){a.cancelWaitAfter()})), +b.cancelWaitAfter(),this.Ha.doCancel(),this.Uf=this.Oa=null,window.removeEventListener("resize",this.JD,!1),window.removeEventListener("mousemove",this.On,!0),window.removeEventListener("mousedown",this.Nn,!0),window.removeEventListener("mouseup",this.Qn,!0),window.removeEventListener("mousewheel",this.lg,!0),window.removeEventListener("DOMMouseScroll",this.lg,!0),window.removeEventListener("mouseout",this.Pn,!0)):this.Ae=!1;this.pb=null;if(null!==a){if(b=a.N)b.ck=null;tk(this,a);this.Iy()}}}); +function wk(a){var b=a.Oa;b.addEventListener("touchstart",a.zD,!1);b.addEventListener("touchmove",a.yD,!1);b.addEventListener("touchend",a.xD,!1);b.addEventListener("mousemove",a.On,!1);b.addEventListener("mousedown",a.Nn,!1);b.addEventListener("mouseup",a.Qn,!1);b.addEventListener("mousewheel",a.lg,!1);b.addEventListener("DOMMouseScroll",a.lg,!1);b.addEventListener("mouseout",a.Pn,!1);b.addEventListener("keydown",a.LF,!1);b.addEventListener("keyup",a.MF,!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.Ya.An===xj&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.kG,!1);b.addEventListener("pointermove",a.mG,!1);b.addEventListener("pointerleave",a.lG,!1);window.addEventListener("resize",a.JD,!1)}function Tj(a,b){a.nl=null;b&&a.PC()} +M.prototype.computePixelRatio=function(){if(null!==this.nl)return this.nl;var a=this.Uf;return(window.devicePixelRatio||1)/(a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1)};M.prototype.doMouseMove=function(){this.Ha.doMouseMove()};M.prototype.doMouseDown=function(){this.Ha.doMouseDown()};M.prototype.doMouseUp=function(){this.Ha.doMouseUp()};M.prototype.doMouseWheel=function(){this.Ha.doMouseWheel()}; +M.prototype.doKeyDown=function(){this.Ha.doKeyDown()};M.prototype.doKeyUp=function(){this.Ha.doKeyUp()};function Pj(a){if(null!==a.Oa){var b=a.pb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Aj?a.Tc:0,d=a.zj?a.Tc:0,e=a.Ce;a.Ce=a.computePixelRatio();a.Ce!==e&&(a.dp=!0,a.vd());if(b.clientWidth!==a.eb+c||b.clientHeight!==a.cb+d)a.Mk=!0,a.dd=!0,b=a.vb,null!==b&&b.cv&&b.v(),a.Pc||a.vd()}}}M.prototype.focus=M.prototype.focus=function(){this.Oa&&this.Oa.focus()}; +function xk(a,b,c){void 0===b&&(b=a.Uf);void 0===c&&(c=!0);c&&(b.As="");b.Wl="";b.Vl=""}function qk(a){var b=new jg;b.name="Background";a.cr(b);b=new jg;b.name="";a.cr(b);b=new jg;b.name="Foreground";a.cr(b);b=new jg;b.name="Adornment";b.bc=!0;a.cr(b);b=new jg;b.name="Tool";b.bc=!0;b.rC=!0;a.cr(b);b=new jg;b.name="Grid";b.De=!1;b.Of=!1;b.bc=!0;a.sE(b,a.tr("Background"))} +function yk(a){a.vc=new L(zk);a.vc.name="GRID";var b=new X;b.jb="LineH";b.stroke="lightgray";b.Na=.5;b.interval=1;a.vc.add(b);b=new X;b.jb="LineH";b.stroke="gray";b.Na=.5;b.interval=5;a.vc.add(b);b=new X;b.jb="LineH";b.stroke="gray";b.Na=1;b.interval=10;a.vc.add(b);b=new X;b.jb="LineV";b.stroke="lightgray";b.Na=.5;b.interval=1;a.vc.add(b);b=new X;b.jb="LineV";b.stroke="gray";b.Na=.5;b.interval=5;a.vc.add(b);b=new X;b.jb="LineV";b.stroke="gray";b.Na=1;b.interval=10;a.vc.add(b);b=new O;b.add(a.vc); +b.Le="Grid";b.iy=!1;b.qC=!1;b.Of=!1;b.oy="GRID";a.add(b);a.hb.remove(b);a.vc.visible=!1} +M.prototype.yA=function(){if(this.N.isEnabled){var a=this.N;if(a.bx&&null!==a.Oa){a.Ut=!0;var b=a.Wc,c=a.Va,d=b.width,e=c.width,f=b.height,g=c.height,h=b.right,k=c.right,l=b.bottom,m=c.bottom,n=b.x,p=c.x,b=b.y,c=c.y,q=a.scale;if(ek&&(a.position= +new z(-(a.Ei.scrollWidth-a.eb)+this.scrollLeft-a.eb/q+a.Wc.right,a.position.y))),this.QA&&a.je&&(bm&&(a.position=new z(a.position.x,-(a.Fi.scrollHeight-a.cb)+this.scrollTop-a.cb/q+a.Wc.bottom))),A(s),Ak(a),a.Ut=!1,a.Mk=!1,b=a.Wc,c=a.Va,h=b.right,k=c.right,l=b.bottom,m=c.bottom,n=b.x,p=c.x,b=b.y,c=c.y,e>=d&&n>=p&&h<=k&&(a.ex.style.width="1px"),g>=f&&b>=c&&l<=m&&(a.gx.style.height="1px")}}else Bk(this.N)}; +M.prototype.Mt=function(){this.N.isEnabled?this.N.bx=!0:Bk(this.N)};M.prototype.computeBounds=M.prototype.zf=function(){0c&&(e=c),ea.jg&&(e=a.jg),e):b===Jk?(e=k>h?(g-a.Tc)/d:(f-a.Tc)/e,e>c&&(e=c),ea.jg&&(e=a.jg),e):a.scale}M.prototype.zoomToFit=M.prototype.zoomToFit=function(){this.scale=Fk(this,Ik)}; +M.prototype.zoomToRect=function(a,b){void 0===b&&(b=Ik);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Ik||b===Jk)if(isNaN(c))e=this.Va.height*this.scale/d;else if(isNaN(d))e=this.Va.width*this.scale/c;else var e=this.eb,f=this.cb,e=b===Jk?f/d>e/c?(f-(this.zj?this.Tc:0))/d:(e-(this.Aj?this.Tc:0))/c:Math.min(f/d,e/c);this.scale=e;this.position=new z(a.x,a.y)}};G(M,{ey:null},function(){return this.Ub},function(a){this.Ub=a}); +M.prototype.alignDocument=function(a,b){this.rh&&Hk(this,this.zf());var c=this.Wc,d=this.Va,e=this.Ub;this.Ub=!0;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));this.Ub=e;this.ba()}; +function Gk(a,b,c,d,e,f,g){var h=b.x,k=b.y;if(g||a.fD===kk)f.Jc()&&(d>c.width&&(h=c.x+(f.x*c.width+f.offsetX)-(f.x*d-f.offsetX)),e>c.height&&(k=c.y+(f.y*c.height+f.offsetY)-(f.y*e-f.offsetY))),f=a.eD,g=d-c.width,dc.left?h=c.left:hc.top?k=c.top:kb.touches.length)&&b.preventDefault();b.cancelBubble=!0;return!1} +M.prototype.LF=function(a){if(!this.N.isEnabled)return!1;var b=this.N.tb;Lk(this.N,this.N,a,b,!1);b.key=String.fromCharCode(a.which);b.dk=!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.N.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?Pk(b,a):(a.cancelBubble=!0,a.preventDefault(),a.stopPropagation(),!1)}; +M.prototype.MF=function(a){if(!this.N.isEnabled)return!1;var b=this.N.tb;Lk(this.N,this.N,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.N.doKeyUp(); +return Pk(b,a)};M.prototype.Yo=function(a){var b=this.Oa;if(null===b)return new z(0,0);var c=this.eb,d=this.cb,b=b.getBoundingClientRect(),c=a.clientX-c/b.width*b.left;a=a.clientY-d/b.height*b.top;return null!==this.kd?(a=new z(c,a),Xc(a,this.kd),a):new z(c,a)};function Mk(a,b,c){var d=a.Oa,e=a.eb,f=a.cb,g=0,h=0;null!==d&&(d=d.getBoundingClientRect(),g=b.clientX-e/d.width*d.left,h=b.clientY-f/d.height*d.top);c.ve.k(g,h);null!==a.kd?(b=Wa(g,h),a.kd.Zg(b),c.S.assign(b),A(b)):c.S.k(g,h)} +M.prototype.invalidateDocumentBounds=M.prototype.Rb=function(){this.rh||(this.rh=!0,this.vd(!0))};function Zj(a){a.Pc||Ck(a);a.rh&&Hk(a,a.zf());for(a=a.Zk.i;a.next();)Zj(a.value)}M.prototype.redraw=M.prototype.Iy=function(){this.Ub||this.Pc||(this.ba(),Qk(this),Ak(this),this.Rb(),this.te())};M.prototype.isUpdateRequested=function(){return this.Ue}; +M.prototype.delayInitialization=M.prototype.UE=function(a){void 0===a&&(a=null);var b=this.rb,c=b.isEnabled;b.Wh();b.isEnabled=!1;ci(this);this.Ae=!1;b.isEnabled=c;null!==a&&ma(a,1)};M.prototype.requestUpdate=M.prototype.vd=function(a){void 0===a&&(a=!1);if(!0!==this.Ue&&!(this.Ub||!1===a&&this.Pc)){this.Ue=!0;var b=this;requestAnimationFrame(function(){b.Ue&&b.te()})}};M.prototype.maybeUpdate=M.prototype.te=function(){if(!this.wm||this.Ue)this.wm&&(this.wm=!1),ci(this)}; +function Rk(a,b){a.Ub||!a.Mk||Bk(a)||(b&&Ck(a),Ek(a,!1))} +function ci(a){if(!a.Pc&&(a.Ue=!1,null!==a.pb)){a.Pc=!0;var b=a.gh,c=a.IA;if(!b.Hm&&0!==c.length){for(var d=c.l,e=d.length,f=0;fb;b++){var c=a.lf.i;if(null===c||0===a.lf.count)break;a.lf=new Xb(U);var d=a,e=a.lf;for(c.reset();c.next();){var f=c.value;!f.Zc()||f instanceof Wg||!f.sa()||(f.ok()?(lj(f,Infinity,Infinity),f.ac()):e.add(f))}for(c.reset();c.next();)f=c.value,f instanceof Wg&&f.sa()&&Xk(d,f);for(c.reset();c.next();)f=c.value,f instanceof W&&(d=f,d.sa()&&(d.ok()?(lj(d,Infinity,Infinity),d.ac(),d.Tr()):e.add(d)));for(c.reset();c.next();)d=c.value,d instanceof +Vg&&d.sa()&&(d.ok()?(lj(d,Infinity,Infinity),d.ac()):e.add(d))}}function Xk(a,b){for(var c=ob(),d=ob(),e=b.lc;e.next();){var f=e.value;f.sa()&&(f instanceof Wg?(Yk(f)||dl(f)||ml(f))&&Xk(a,f):f instanceof W?f.M==b||f.R==b?d.push(f):c.push(f):(lj(f,Infinity,Infinity),f.ac()))}for(var e=c.length,g=0;gh+1&&(m=Math.max((u- +h)*C+a.eb,m)),p+1k+1&&(y=Math.max((n-k)*C+a.cb,y)),q+1h+1&&(m=Math.max((u-h)*C+a.eb,m)),p+1k+1&&(y=Math.max((n-k)*C+a.cb,y)),q+1h+1&&(a.Ei.scrollLeft=a.position.x*C));a.Yx&&a.je&&(q+1k+1&&(a.Fi.scrollTop=a.position.y*C));g&&(a.dp=!0);l=a.eb;c=a.cb;a.Fi.style.height=c+"px";a.Fi.style.width=l+(a.Aj?a.Tc:0)+"px";a.Ei.style.width=l+"px";a.Ei.style.height=c+(a.zj?a.Tc:0)+"px";a.bx=!1;return d!==l||e!==c||a.rb.Fc?(m=a.Va,a.$r(f,m,g),!1):!0} +M.prototype.add=M.prototype.add=function(a){ra(a,O,M,"add:part");var b=a.g;if(b!==this){null!==b&&v("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.Yl&&(a.Fj="Tool");var c=a.Le,b=this.tr(c);null===b&&(b=this.tr(""));null===b&&v('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.Dn(99999999,a,a.g===this),0<=c&&this.ec(Qf,"parts",b,null,a,null,c),b.bc||this.Rb(),a.v(ul),c=a.Mr,null!==c&&c(a, +null,b))}}; +M.prototype.Dn=function(a){if(a instanceof V){if(this.$p.add(a),a instanceof Wg){var b=a.Ca;null===b?this.Rj.add(a):b.Qm.add(a);b=a.vb;null!==b&&(b.g=this)}}else a instanceof W?this.Dp.add(a):a instanceof Vg||this.hb.add(a);var c=this;vl(a,function(a){wl(c,a)});a.ub&&a.H();b=a.data;null!==b&&(a instanceof Vg||(a instanceof W?this.uj.add(b,a):this.mh.add(b,a)),vl(a,function(a){xl(c,a)}));!0!==dl(a)&&!0!==ml(a)||this.lf.add(a);yl(a,!0,this);zl(a)?(a.Q.w()&&this.ba(hk(a,a.Q)),this.Rb()):a.sa()&&a.Q.w()&& +this.ba(hk(a,a.Q));this.vd()}; +M.prototype.pe=function(a){a.kr();if(a instanceof V){if(this.$p.remove(a),a instanceof Wg){var b=a.Ca;null===b?this.Rj.remove(a):b.Qm.remove(a);b=a.vb;null!==b&&(b.g=null)}}else a instanceof W?this.Dp.remove(a):a instanceof Vg||this.hb.remove(a);var c=this;vl(a,function(a){Al(c,a)});b=a.data;null!==b&&(a instanceof Vg||(a instanceof W?this.uj.remove(b):this.mh.remove(b)),vl(a,function(a){Bl(c,a)}));this.lf.remove(a);zl(a)?(a.Q.w()&&this.ba(hk(a,a.Q)),this.Rb()):a.sa()&&a.Q.w()&&this.ba(hk(a,a.Q)); +this.vd()};M.prototype.remove=M.prototype.remove=function(a){ra(a,O,M,"remove:part");a.Ia=!1;a.ig=!1;var b=a.layer;if(null!==b&&b.g===this){a.v(Cl);a.Cl();var c=b.pe(-1,a,!1);0<=c&&this.ec(Rf,"parts",b,a,null,c,null);c=a.Mr;null!==c&&c(a,b,null)}};M.prototype.removeParts=M.prototype.My=function(a,b){if(Fa(a))for(var c=Ia(a),d=0;dd&&this.Rb()}; +M.prototype.addLayerAfter=function(a,b){Dl(this,a,b);a.fc(this);var c=this.Eb,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.fd&&this.ec(Rf,"layers",this,a,null,d,null));for(var e=c.count,f=0;fd&&this.Rb()}; +M.prototype.removeLayer=function(a){ra(a,jg,M,"removeLayer:layer");a.g!==this&&v("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.Eb,c=b.indexOf(a);if(b.remove(a)){for(b=a.hb.copy().i;b.next();){var d=b.value,e=d.Le;d.Le=e!==a.name?e:""}null!==this.fd&&this.ec(Rf,"layers",this,a,null,c,null);this.ba();this.Rb()}}};M.prototype.findLayer=M.prototype.tr=function(a){for(var b=this.fv;b.next();){var c=b.value;if(c.name===a)return c}return null}; +M.prototype.addChangedListener=M.prototype.xx=function(a){w(a,"function",M,"addChangedListener:listener");null===this.di&&(this.di=new N("function"));this.di.add(a)};M.prototype.removeChangedListener=M.prototype.Jy=function(a){w(a,"function",M,"removeChangedListener:listener");null!==this.di&&(this.di.remove(a),0===this.di.count&&(this.di=null))}; +M.prototype.Cu=function(a){this.Ma||this.V.mC(a);a.Uc!==Pf&&(this.ah=!0);if(null!==this.di){var b=this.di,c=b.length;if(1===c)b=b.Y(0),b(a);else if(0!==c)for(var d=b.ae(),e=0;ea.jg&&(c=a.jg);a.position=new z(a.xa.x+g.x/b-g.x/c,a.xa.y+g.y/b- +g.y/c);a.Ub=!1;a.Fb=c;a.$r(d,a.Va);Ek(a,!1);a.ba();Qk(a)}}M.prototype.$r=function(a,b,c){void 0===c&&(c=!1);c||Qk(this);Ak(this);var d=this.vb;null===d||!d.cv||c||a.width===b.width&&a.height===b.height||d.v();d=this.Ha;!0===this.Ok&&d instanceof Tg&&(this.C.S=this.ED(this.C.ve),d.doMouseMove());this.$x(a,b);Tk(this);this.ma("ViewportBoundsChanged",c?qb:null,a)}; +function Tk(a,b){void 0===b&&(b=null);var c=a.vc;if(null!==c&&c.visible){for(var d=Ya(),e=1,f=1,g=c.la.l,h=g.length,k=0;km||(Fl(l.jb)?f=f*m/Q.gC(f,m):e=e*m/Q.gC(e,m))}g=c.Su;d.k(f*g.width,e*g.height);g=f=k=h=0;if(null!==b)h=b.width,k=b.height,f=b.x,g=b.y;else{e=bb();f=a.Va;e.k(f.x,f.y,f.width,f.height);for(g=a.Zk.i;g.next();)f=g.value.Va,f.w()&&id(e,f.x,f.y,f.width,f.height);h=e.width;k=e.height;f=e.x;g=e.y;if(!e.w())return}c.width=h+2*d.width;c.height=k+2*d.height; +e=Va();Q.ur(f,g,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);$a(d);c.J.location=e;A(e)}}M.prototype.clearSelection=M.prototype.Du=function(){var a=0a&&za(a,">= zero",M,"linkSpacing"),this.qi=a,this.h("linkSpacing",b,a))});H(M,{fv:"layers"},function(){return this.Eb.i});G(M,{Je:"isModelReadOnly"},function(){var a=this.fd;return null===a?!1:a.Ta},function(a){var b=this.fd;null!==b&&(b.Ta=a)});G(M,{Ta:"isReadOnly"},function(){return this.Ej},function(a){var b=this.Ej;b!==a&&(w(a,"boolean",M,"isReadOnly"),this.Ej=a,this.h("isReadOnly",b,a))}); +G(M,{isEnabled:"isEnabled"},function(){return this.de},function(a){var b=this.de;b!==a&&(w(a,"boolean",M,"isEnabled"),this.de=a,this.h("isEnabled",b,a))});G(M,{Ax:"allowClipboard"},function(){return this.Cs},function(a){var b=this.Cs;b!==a&&(w(a,"boolean",M,"allowClipboard"),this.Cs=a,this.h("allowClipboard",b,a))});G(M,{Ti:"allowCopy"},function(){return this.fj},function(a){var b=this.fj;b!==a&&(w(a,"boolean",M,"allowCopy"),this.fj=a,this.h("allowCopy",b,a))}); +G(M,{ql:"allowDelete"},function(){return this.gj},function(a){var b=this.gj;b!==a&&(w(a,"boolean",M,"allowDelete"),this.gj=a,this.h("allowDelete",b,a))});G(M,{tu:"allowDragOut"},function(){return this.Ds},function(a){var b=this.Ds;b!==a&&(w(a,"boolean",M,"allowDragOut"),this.Ds=a,this.h("allowDragOut",b,a))});G(M,{zB:"allowDrop"},function(){return this.Es},function(a){var b=this.Es;b!==a&&(w(a,"boolean",M,"allowDrop"),this.Es=a,this.h("allowDrop",b,a))}); +G(M,{xu:"allowTextEdit"},function(){return this.pj},function(a){var b=this.pj;b!==a&&(w(a,"boolean",M,"allowTextEdit"),this.pj=a,this.h("allowTextEdit",b,a))});G(M,{uu:"allowGroup"},function(){return this.hj},function(a){var b=this.hj;b!==a&&(w(a,"boolean",M,"allowGroup"),this.hj=a,this.h("allowGroup",b,a))});G(M,{yu:"allowUngroup"},function(){return this.qj},function(a){var b=this.qj;b!==a&&(w(a,"boolean",M,"allowUngroup"),this.qj=a,this.h("allowUngroup",b,a))}); +G(M,{kn:"allowInsert"},function(){return this.Gs},function(a){var b=this.Gs;b!==a&&(w(a,"boolean",M,"allowInsert"),this.Gs=a,this.h("allowInsert",b,a))});G(M,{gr:"allowLink"},function(){return this.ij},function(a){var b=this.ij;b!==a&&(w(a,"boolean",M,"allowLink"),this.ij=a,this.h("allowLink",b,a))});G(M,{rl:"allowRelink"},function(){return this.kj},function(a){var b=this.kj;b!==a&&(w(a,"boolean",M,"allowRelink"),this.kj=a,this.h("allowRelink",b,a))}); +G(M,{Wj:"allowMove"},function(){return this.jj},function(a){var b=this.jj;b!==a&&(w(a,"boolean",M,"allowMove"),this.jj=a,this.h("allowMove",b,a))});G(M,{vu:"allowReshape"},function(){return this.lj},function(a){var b=this.lj;b!==a&&(w(a,"boolean",M,"allowReshape"),this.lj=a,this.h("allowReshape",b,a))});G(M,{hr:"allowResize"},function(){return this.mj},function(a){var b=this.mj;b!==a&&(w(a,"boolean",M,"allowResize"),this.mj=a,this.h("allowResize",b,a))}); +G(M,{wu:"allowRotate"},function(){return this.nj},function(a){var b=this.nj;b!==a&&(w(a,"boolean",M,"allowRotate"),this.nj=a,this.h("allowRotate",b,a))});G(M,{De:"allowSelect"},function(){return this.oj},function(a){var b=this.oj;b!==a&&(w(a,"boolean",M,"allowSelect"),this.oj=a,this.h("allowSelect",b,a))});G(M,{AB:"allowUndo"},function(){return this.Hs},function(a){var b=this.Hs;b!==a&&(w(a,"boolean",M,"allowUndo"),this.Hs=a,this.h("allowUndo",b,a))}); +G(M,{zu:"allowZoom"},function(){return this.Js},function(a){var b=this.Js;b!==a&&(w(a,"boolean",M,"allowZoom"),this.Js=a,this.h("allowZoom",b,a))});G(M,{Yx:"hasVerticalScrollbar"},function(){return this.mt},function(a){var b=this.mt;b!==a&&(w(a,"boolean",M,"hasVerticalScrollbar"),this.mt=a,Qk(this),this.ba(),this.h("hasVerticalScrollbar",b,a),Ek(this,!1))}); +G(M,{Xx:"hasHorizontalScrollbar"},function(){return this.lt},function(a){var b=this.lt;b!==a&&(w(a,"boolean",M,"hasHorizontalScrollbar"),this.lt=a,Qk(this),this.ba(),this.h("hasHorizontalScrollbar",b,a),Ek(this,!1))});G(M,{ie:"allowHorizontalScroll"},function(){return this.Fs},function(a){var b=this.Fs;b!==a&&(w(a,"boolean",M,"allowHorizontalScroll"),this.Fs=a,this.h("allowHorizontalScroll",b,a),Ek(this,!1))}); +G(M,{je:"allowVerticalScroll"},function(){return this.Is},function(a){var b=this.Is;b!==a&&(w(a,"boolean",M,"allowVerticalScroll"),this.Is=a,this.h("allowVerticalScroll",b,a),Ek(this,!1))});G(M,{js:"scrollHorizontalLineChange"},function(){return this.Vt},function(a){var b=this.Vt;b!==a&&(w(a,"number",M,"scrollHorizontalLineChange"),0>a&&za(a,">= 0",M,"scrollHorizontalLineChange"),this.Vt=a,this.h("scrollHorizontalLineChange",b,a))}); +G(M,{ks:"scrollVerticalLineChange"},function(){return this.Wt},function(a){var b=this.Wt;b!==a&&(w(a,"number",M,"scrollVerticalLineChange"),0>a&&za(a,">= 0",M,"scrollVerticalLineChange"),this.Wt=a,this.h("scrollVerticalLineChange",b,a))});G(M,{C:"lastInput"},function(){return this.tb},function(a){this.tb=a});G(M,{Yb:"firstInput"},function(){return this.wj},function(a){this.wj=a}); +G(M,{Gb:"currentCursor"},function(){return this.fw},function(a){""===a&&(a=this.No);this.fw!==a&&(w(a,"string",M,"currentCursor"),null!==this.Oa&&(this.fw=a,this.Oa.style.cursor=a,this.pb.style.cursor=a))});G(M,{JH:"defaultCursor"},function(){return this.No},function(a){""===a&&(a="auto");var b=this.No;b!==a&&(w(a,"string",M,"defaultCursor"),this.No=a,this.h("defaultCursor",b,a))}); +G(M,{XH:"hasGestureZoom"},function(){return this.Am},function(a){var b=this.Am;b!==a&&(w(a,"boolean",M,"hasGestureZoom"),this.Am=a,this.h("hasGestureZoom",b,a))});G(M,{click:"click"},function(){return this.ih},function(a){var b=this.ih;b!==a&&(null!==a&&w(a,"function",M,"click"),this.ih=a,this.h("click",b,a))});G(M,{qr:"doubleClick"},function(){return this.ph},function(a){var b=this.ph;b!==a&&(null!==a&&w(a,"function",M,"doubleClick"),this.ph=a,this.h("doubleClick",b,a))}); +G(M,{Gx:"contextClick"},function(){return this.kh},function(a){var b=this.kh;b!==a&&(null!==a&&w(a,"function",M,"contextClick"),this.kh=a,this.h("contextClick",b,a))});G(M,{vy:"mouseOver"},function(){return this.zh},function(a){var b=this.zh;b!==a&&(null!==a&&w(a,"function",M,"mouseOver"),this.zh=a,this.h("mouseOver",b,a))});G(M,{uy:"mouseHover"},function(){return this.yh},function(a){var b=this.yh;b!==a&&(null!==a&&w(a,"function",M,"mouseHover"),this.yh=a,this.h("mouseHover",b,a))}); +G(M,{ty:"mouseHold"},function(){return this.xh},function(a){var b=this.xh;b!==a&&(null!==a&&w(a,"function",M,"mouseHold"),this.xh=a,this.h("mouseHold",b,a))});G(M,{eG:"mouseDragOver"},function(){return this.It},function(a){var b=this.It;b!==a&&(null!==a&&w(a,"function",M,"mouseDragOver"),this.It=a,this.h("mouseDragOver",b,a))});G(M,{sy:"mouseDrop"},function(){return this.wh},function(a){var b=this.wh;b!==a&&(null!==a&&w(a,"function",M,"mouseDrop"),this.wh=a,this.h("mouseDrop",b,a))}); +G(M,{bz:"toolTip"},function(){return this.Gh},function(a){var b=this.Gh;b!==a&&(null!==a&&ra(a,Vg,M,"toolTip"),this.Gh=a,this.h("toolTip",b,a))});G(M,{contextMenu:"contextMenu"},function(){return this.lh},function(a){var b=this.lh;b!==a&&(null!==a&&ra(a,Vg,M,"contextMenu"),this.lh=a,this.h("contextMenu",b,a))}); +G(M,{ib:"commandHandler"},function(){return this.Xv},function(a){var b=this.Xv;b!==a&&(ra(a,ec,M,"commandHandler"),null!==a.g&&v("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.fc(null),this.Xv=a,a.fc(this))});G(M,{Ya:"toolManager"},function(){return this.tx},function(a){var b=this.tx;b!==a&&(ra(a,Tg,M,"toolManager"),null!==a.g&&v("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.fc(null),this.tx=a,a.fc(this))}); +G(M,{Mx:"defaultTool"},function(){return this.lw},function(a){var b=this.lw;b!==a&&(ra(a,kg,M,"defaultTool"),this.lw=a,this.Ha===b&&(this.Ha=a))});G(M,{Ha:"currentTool"},function(){return this.hw},function(a){var b=this.hw;if(null!==b)for(b.ca&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop(),b=this.Zk.i;b.next();)b.value.ba();null===a&&(a=this.Mx);null!==a&&(ra(a,kg,M,"currentTool"),this.hw=a,a.fc(this),a.doStart())});H(M,{selection:"selection"},function(){return this.Yt}); +G(M,{XF:"maxSelectionCount"},function(){return this.Et},function(a){var b=this.Et;if(b!==a)if(w(a,"number",M,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.Et=a,this.h("maxSelectionCount",b,a),!this.V.Ua&&(a=this.selection.count-a,0= 0",M,"maxSelectionCount")}); +G(M,{hG:"nodeSelectionAdornmentTemplate"},function(){return this.Kt},function(a){var b=this.Kt;b!==a&&(ra(a,Vg,M,"nodeSelectionAdornmentTemplate"),this.Kt=a,this.h("nodeSelectionAdornmentTemplate",b,a))});G(M,{rF:"groupSelectionAdornmentTemplate"},function(){return this.it},function(a){var b=this.it;b!==a&&(ra(a,Vg,M,"groupSelectionAdornmentTemplate"),this.it=a,this.h("groupSelectionAdornmentTemplate",b,a))}); +G(M,{TF:"linkSelectionAdornmentTemplate"},function(){return this.zt},function(a){var b=this.zt;b!==a&&(ra(a,Vg,M,"linkSelectionAdornmentTemplate"),this.zt=a,this.h("linkSelectionAdornmentTemplate",b,a))});H(M,{Tu:"highlighteds"},function(){return this.nt});G(M,{ah:"isModified"},function(){var a=this.V;return a.isEnabled?null!==a.Nh?!0:this.Iw&&this.Wf!==a.Sh:this.Iw},function(a){if(this.Iw!==a){w(a,"boolean",M,"isModified");this.Iw=a;var b=this.V;!a&&b.isEnabled&&(this.Wf=b.Sh);a||Gl(this)}}); +function Gl(a){var b=a.ah;a.qB!==b&&(a.qB=b,a.ma("Modified"))} +G(M,{U:"model"},function(){return this.fd},function(a){var b=this.fd;if(b!==a){ra(a,jc,M,"model");this.Ha.doCancel();null!==b&&b.V!==a.V&&b.V.uC&&v("Do not replace a Diagram.model while a transaction is in progress.");this.rb.Wh();this.Du();this.Ae=!1;this.wm=!0;this.Wf=-2;this.Ue=!1;var c=this.Pc;this.Pc=!0;this.rb.tk();null!==b&&(b.Jy(this.tA),b instanceof Xf&&Hl(this,b.$i),Hl(this,b.ng));this.fd=a;a.xx(this.sA);Il(this,a.ng);a instanceof Xf&&Jl(this,a.$i);a.Jy(this.sA);a.xx(this.tA);this.Pc=c; +this.Ub||this.ba();null!==b&&(a.V.isEnabled=b.V.isEnabled)}});G(M,{ya:null},function(){return this.lA},function(a){this.lA=a}); +function nk(a,b){if(b.U===a.U){var c=b.Uc,d=b.propertyName;if(c===Pf&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.Ya,c.ue.each(function(b){b.fc(a)}),c.bf.each(function(b){b.fc(a)}),c.cf.each(function(b){b.fc(a)}),a.Pc||a.Ae||(a.$s=!0,a.wm&&(a.Ue=!0),a.gh.tk());else if("StartingUndo"===d||"StartingRedo"===d){var e=a.rb;e.hg&&!a.Ma&&e.Wh();a.ma("ChangingSelection")}else"StartedTransaction"===d&&(e=a.rb,e.hg&&!a.Ma&&e.Wh(),a.vt&&e.tk());else if(a.ya){a.ya=!1;try{var f=b.af;if(""!==f)if(c===If){if("linkFromKey"=== +f){var g=b.object,h=a.Cf(g);if(null!==h){var k=b.newValue,l=a.oe(k);h.M=l}}else if("linkToKey"===f)g=b.object,h=a.Cf(g),null!==h&&(k=b.newValue,l=a.oe(k),h.R=l);else if("linkFromPortId"===f){if(g=b.object,h=a.Cf(g),null!==h){var m=b.newValue;"string"===typeof m&&(h.Ef=m)}}else if("linkToPortId"===f)g=b.object,h=a.Cf(g),null!==h&&(m=b.newValue,"string"===typeof m&&(h.wg=m));else if("nodeGroupKey"===f){var g=b.object,n=a.Yg(g);if(null!==n){var p=b.newValue;if(void 0!==p){var q=a.oe(p);n.Ca=q instanceof +Wg?q:null}else n.Ca=null}}else if("linkLabelKeys"===f){if(g=b.object,h=a.Cf(g),null!==h){var s=b.oldValue,t=b.newValue;if(Fa(s))for(var u=Ia(s),x=0;xk)){var l=k;Ql(h)&&l++;h.pe(l);Rl(h,l,k)}}}}function xl(a,b){var c=b.th;if(Fa(c)){var d=a.Rk.ja(c);if(null===d)d=[],d.push(b),a.Rk.add(c,d);else{for(c=0;c=f.length)return!1;for(var g=0;gthis.scale&&(this.scale=a)):za(a,"> 0",M,"minScale"))}); +G(M,{jg:"maxScale"},function(){return this.Dt},function(a){ua(a,M,"maxScale");var b=this.Dt;b!==a&&(0 0",M,"maxScale"))});G(M,{Ul:"zoomPoint"},function(){return this.pu},function(a){this.pu.A(a)||(ra(a,z,M,"zoomPoint"),this.pu=a=a.O())});G(M,{Fx:"contentAlignment"},function(){return this.gm},function(a){var b=this.gm;b.A(a)||(ra(a,R,M,"contentAlignment"),this.gm=a=a.O(),this.h("contentAlignment",b,a),Ek(this,!1))}); +G(M,{$H:"initialContentAlignment"},function(){return this.Cm},function(a){var b=this.Cm;b.A(a)||(ra(a,R,M,"initialContentAlignment"),this.Cm=a=a.O(),this.h("initialContentAlignment",b,a))});G(M,{padding:"padding"},function(){return this.ge},function(a){"number"===typeof a?a=new qd(a):ra(a,qd,M,"padding");var b=this.ge;b.A(a)||(this.ge=a=a.O(),this.Rb(),this.h("padding",b,a))});H(M,{Mf:"nodes"},function(){return this.$p.i});H(M,{links:"links"},function(){return this.Dp.i});H(M,{bj:"parts"},function(){return this.hb.i}); +M.prototype.findTopLevelGroups=function(){return this.Rj.i};G(M,{vb:"layout"},function(){return this.ed},function(a){var b=this.ed;b!==a&&(ra(a,lg,M,"layout"),null!==b&&(b.g=null,b.group=null),this.ed=a,a.g=this,a.group=null,this.Ks=!0,this.h("layout",b,a),this.vd())});M.prototype.layoutDiagram=function(a){Ck(this);a&&Wl(this,!0);Vk(this,!1)};function Wl(a,b){for(var c=a.Rj.i;c.next();)dm(a,c.value,b);null!==a.vb&&(b?a.vb.Ke=!1:a.vb.v())} +function dm(a,b,c){if(null!==b){for(var d=b.Qm.i;d.next();)dm(a,d.value,c);null!==b.vb&&(c?b.vb.Ke=!1:b.vb.v())}}function Vk(a,b){if(!a.mw){var c=a.vb,d=a.vt;a.vt=!0;var e=a.ya;a.ya=!0;try{a.Bb("Layout");for(var f=a.Rj.i;f.next();)em(a,f.value,b);c.Ke||b&&!c.wC||(c.doLayout(a),Ck(a),c.Ke=!0)}finally{a.od("Layout"),a.Ks=!c.Ke,a.vt=d,a.ya=e}}} +function em(a,b,c){if(null!==b){for(var d=b.Qm.i;d.next();)em(a,d.value,c);d=b.vb;null===d||d.Ke||c&&!d.wC||(b.Uw=!b.location.w(),d.doLayout(b),b.v(fm),d.Ke=!0,Xk(a,b))}}G(M,{Kc:"isTreePathToChildren"},function(){return this.ut},function(a){var b=this.ut;if(b!==a&&(w(a,"boolean",M,"isTreePathToChildren"),this.ut=a,this.h("isTreePathToChildren",b,a),!this.V.Ua))for(a=this.Mf;a.next();)gm(a.value)}); +M.prototype.findTreeRoots=function(){for(var a=new N(V),b=this.Mf;b.next();){var c=b.value;c.bv&&null===c.xr()&&a.add(c)}return a.i};G(M,{Ed:null},function(){return this.$z},function(a){this.$z=a}); +function lk(a){function b(a){var b=a.toLowerCase(),g=new N("function");c.add(a,g);c.add(b,g);d.add(a,a);d.add(b,a)}var c=new Fb("string",N),d=new Fb("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.ow=c;a.nw=d} +function Pb(a,b){var c=a.nw.ja(b);return null!==c?c:a.nw.ja(b.toLowerCase())}function hm(a,b){var c=a.ow.ja(b);if(null!==c)return c;c=a.ow.ja(b.toLowerCase());if(null!==c)return c;v("Unknown DiagramEvent name: "+b);return null}M.prototype.addDiagramListener=M.prototype.yx=function(a,b){w(a,"string",M,"addDiagramListener:name");w(b,"function",M,"addDiagramListener:listener");var c=hm(this,a);null!==c&&c.add(b)}; +M.prototype.removeDiagramListener=M.prototype.TC=function(a,b){w(a,"string",M,"removeDiagramListener:name");w(b,"function",M,"addDiagramListener:listener");var c=hm(this,a);null!==c&&c.remove(b)};M.prototype.raiseDiagramEvent=M.prototype.ma=function(a,b,c){var d=hm(this,a),e=new Gf;e.g=this;e.name=Pb(this,a);void 0!==b&&(e.Yy=b);void 0!==c&&(e.Cy=c);a=d.length;if(1===a)d=d.Y(0),d(e);else if(0!==a)for(b=d.ae(),c=0;c=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.Va,f=a.scale,e=db(0,0,e.width*f,e.height*f),g=Wa(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(h=Math.max(a.js,1),h|=0,g.x+=h,b.x>e.x+e.width-d.right/2&&(g.x+=h),b.x>e.x+e.width-d.right/4&&(g.x+=4*h));b.y>=e.y&&b.ye.y+e.height-d.bottom&&(h=Math.max(a.ks,1),h|=0,g.y+=h,b.y>e.y+e.height-d.bottom/2&&(g.y+=h),b.y>e.y+e.height-d.bottom/4&&(g.y+=4*h));g.Wd(Q.ej)||(c=new z(c.x+g.x/f,c.y+g.y/f));fb(e);A(g);return c}M.prototype.makeSVG=M.prototype.makeSvg=function(a){void 0===a&&(a=new Sb);a.context="svg";a=qm(this,a);return null!==a?a.zk:null}; +M.prototype.makeImage=function(a){void 0===a&&(a=new Sb);var b=(a.document||document).createElement("img");b.src=this.UF(a);return b};M.prototype.makeImageData=M.prototype.UF=function(a){void 0===a&&(a=new Sb);var b=qm(this,a);return null!==b?b.toDataURL(a.type,a.details):""};var rm=!1; +function qm(a,b){a.rb.Wh();a.te();if(null===a.Oa)return null;"object"!==typeof b&&v("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 Za(Infinity,Infinity):new Za(2E3,2E3));var g=b.position||null,h=b.parts||null,k=void 0===b.padding?1:b.padding,l=b.background||null,m=b.omitTemporary;void 0===m&&(m=!0);var n=b.document||document,p=b.elementFinished||null,q=b.showTemporary; +void 0===q&&(q=!m);m=b.showGrid;void 0===m&&(m=q);null!==d&&isNaN(d.width)&&isNaN(d.height)&&(d=null);"number"===typeof k?k=new qd(k):k instanceof qd||(k=new qd(0));k.left=Math.max(k.left,0);k.right=Math.max(k.right,0);k.top=Math.max(k.top,0);k.bottom=Math.max(k.bottom,0);a.sm=!1;xk(a);var s=new Rb(null,n),t=s.getContext("2d"),u=s;if(!(d||e||h||g))return s.width=a.eb+Math.ceil(k.left+k.right),s.height=a.cb+Math.ceil(k.top+k.bottom),"svg"===b.context&&(t=u=new re(s.Xc,n,p),t instanceof re&&(a.sm=!0)), +rl(a,t,k,new Za(s.width,s.height),a.Fb,a.xa,h,l,q,m),a.sm=!0,u;var x=a.ib.Hu,B=new z(0,0),y=a.Wc.copy();y.TG(a.padding);if(q)for(var C=!0,C=a.Eb.l,K=C.length,J=0;Jx?(e=x,g=y.width,ha=y.height):(g=f.width,ha=f.height)):(g=y.width*e,ha=y.height*e):(e=x,g=y.width,ha=y.height);null!==k?(g+=ja,ha+=C):k=new qd(0);null!==f&&(d=f.width,f=f.height,"svg"!==b.context&&c&&!rm&&(g>d||ha>f)&&(Da("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(g)+"x"+Math.ceil(ha)+" vs 2000x2000) Consider increasing the max size."),rm=!0), +isNaN(d)&&(d=2E3),isNaN(f)&&(f=2E3),isFinite(d)&&(g=Math.min(g,d)),isFinite(f)&&(ha=Math.min(ha,f)));s.width=Math.ceil(g);s.height=Math.ceil(ha);"svg"===b.context&&(t=u=new re(s.Xc,n,p),t instanceof re&&(a.sm=!0));rl(a,t,k,new Za(Math.ceil(g),Math.ceil(ha)),e,B,h,l,q,m);a.sm=!0;return u}M.inherit=function(a,b){w(a,"function",M,"inherit");w(b,"function",M,"inherit");b.Og&&v("Cannot inherit from "+xa(b));yb(a,b)}; +function sk(){this.kE="63ad05bbe23a1786468a4c741b6d2";this.kE===this._tk?this.Fg=!0:sm(this,!1)} +function sm(a,b){var c="p",d=window[tc("76a715b2f73f148a")][tc("72ba13b5")];if(tc("77bb5bb2f32603de")===window[tc("76a715b2f73f148a")][tc("6aba19a7ec351488")])try{a.Fg=!window[tc("4da118b7ec2108")]([tc("5bb806bfea351a904a84515e1b6d38b6")])([tc("49bc19a1e6")])([tc("59bd04a1e6380fa5539b")])([tc("7bb8069ae7")]===tc("7da71ca0ad381e90"));if(!1===a.Fg)return;a.Fg=!window[tc("4da118b7ec2108")]([tc("5bb806bfea351a904a84515e1b6d38b6")])([tc("49bc19a1e6")])([tc("59bd04a1e6380fa5539b6c7a197c31bb4cfd3e")])([tc("7bb8069ae7")]===tc("7da71ca0ad381e90")); +if(!1===a.Fg)return}catch(e){}for(var f=d[tc("76ad18b4f73e")],g=d[tc("73a612b6fb191d")](tc("35e7"))+2;g=d&&tc("7da71ca0ad381e90")!==tc("7da71ca0ad381e90")&&(d=c[tc("73a612b6fb191d")](tc("76a715b2ef3e149757")));a.Fg=!(0b.timeStamp-a.Uk)b.preventDefault();else if(a.ic=a.tb,a.tb=c,Lk(a,a,b,c, +!0),c.dk=!0,c.ke=b.detail,a.wj=c.copy(),!0===c.To.simulated)b.preventDefault(),b.simulated=!0;else if(qh=null,a.doMouseDown(),1===b.button)return b.preventDefault(),!1}};a.Qn=function(b){if(a.isEnabled){a.Ok=!0;var c=a.ic;if(ca){if(400>b.timeStamp-a.Uk){b.preventDefault();return}a.Uk=b.timeStamp}if(ca&&null!==a.Jq)a.Jq=null,b.preventDefault();else{a.ic=a.tb;a.tb=c;Lk(a,a,b,c,!0);c.up=!0;c.ke=b.detail;if(da||ea)b.timeStamp-a.Ukb.touches.length&&Kk(a,c);Pk(c,b)}};a.yD=function(b){if(a.isEnabled){var c=a.ic;a.ic=a.tb;a.tb=c;var d=null;0a.iq&&Kk(a,c),Pk(c,b))}};a.mG=function(b){if("touch"===b.pointerType&&!(2>a.iq)){var c= +a.Te;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.ic,a.ic=a.tb,a.tb=c,Ok(a,b,b,c,!0),dh(a),a.Av(b,null,c.Qf)||(a.doMouseMove(),Pk(c,b)))}};a.lG=function(b){if("touch"===b.pointerType){var c=a.JA;void 0!==c[b.pointerId]&&(a.iq--,delete c[b.pointerId],c=a.Te,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null))}};xk(a);wk(a)} +function tm(a){1a)&&za(a,"0 <= loc <= 1",$f,"addColorStop:loc");w(b,"string",$f,"addColorStop:color");null===this.Sf&&(this.Sf=new Fb("number","string"));this.Sf.add(a,b);this.fa===bg&&(this.type=cg);this.Tf=null}; +G($f,{type:"type"},function(){return this.fa},function(a){pa(this,a);va(a,$f,$f,"type");this.fa=a;this.start.Fd()&&(a===cg?this.start=vd:a===dg&&(this.start=Dd));this.end.Fd()&&(a===cg?this.end=Gd:a===dg&&(this.end=Dd));this.Tf=null});G($f,{color:"color"},function(){return this.fm},function(a){pa(this,a);this.fm=a;this.Tf=null});G($f,{start:"start"},function(){return this.an},function(a){pa(this,a);ra(a,R,$f,"start");this.an=a.O();this.Tf=null}); +G($f,{end:"end"},function(){return this.um},function(a){pa(this,a);ra(a,R,$f,"end");this.um=a.O();this.Tf=null});G($f,{qs:"startRadius"},function(){return this.bu},function(a){pa(this,a);ua(a,$f,"startRadius");0>a&&za(a,">= zero",$f,"startRadius");this.bu=a;this.Tf=null});G($f,{rr:"endRadius"},function(){return this.et},function(a){pa(this,a);ua(a,$f,"endRadius");0>a&&za(a,">= zero",$f,"endRadius");this.et=a;this.Tf=null}); +G($f,{lr:"colorStops"},function(){return this.Sf},function(a){pa(this,a);this.Sf=a;this.Tf=null});G($f,{pattern:"pattern"},function(){return this.Rt},function(a){pa(this,a);this.Rt=a;this.Tf=null}); +$f.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 Am=oa("canvas").getContext("2d"); +$f.isValidColor=function(a){if("black"===a)return!0;if(""===a)return!1;Am.fillStyle="#000000";var b=Am.fillStyle;Am.fillStyle=a;if(Am.fillStyle!==b)return!0;Am.fillStyle="#FFFFFF";b=Am.fillStyle;Am.fillStyle=a;return Am.fillStyle!==b}; +function U(){sb(this);this.T=30723;this.Se=1;this.cg=null;this.zb="";this.Nb=this.ob=null;this.xa=(new z(NaN,NaN)).freeze();this.ye=(new Za(NaN,NaN)).freeze();this.xi=Q.no;this.vi=Q.SD;this.kd=new ib;this.$l=new ib;this.Hj=new ib;this.Fb=this.bt=1;this.am=0;this.Tg=Bm;this.Gp=Q.mo;this.mc=(new D(NaN,NaN,NaN,NaN)).freeze();this.Cb=(new D(NaN,NaN,NaN,NaN)).freeze();this.hc=(new D(0,0,NaN,NaN)).freeze();this.Sq=this.Uo=this.G=this.jq=this.kq=null;this.Tq=this.Vo=Infinity;this.to=this.Nd=ee;this.xq=0; +this.Di=1;this.Ao=0;this.fi=1;this.Bq=-Infinity;this.Aq=0;this.Cq=Q.ej;this.Dq=Ei;this.Ho="";this.gc=this.F=null;this.cm=-1;this.al=this.jh=this.Gk=this.$m=null}U.Og=!0;vb("GraphObject",U); +U.prototype.cloneProtected=function(a){a.T=this.T|6144;a.Se=this.Se;a.zb=this.zb;a.ob=this.ob;a.Nb=this.Nb;a.xa.assign(this.xa);a.ye.assign(this.ye);a.xi=this.xi.O();a.vi=this.vi.O();a.Hj=this.Hj.copy();a.Fb=this.Fb;a.am=this.am;a.Tg=this.Tg;a.Gp=this.Gp.O();a.mc.assign(this.mc);a.Cb.assign(this.Cb);a.hc.assign(this.hc);a.jq=this.jq;a.G=null!==this.G?this.G.copy():null;a.Uo=this.Uo;a.Vo=this.Vo;a.Sq=this.Sq;a.Tq=this.Tq;a.Nd=this.Nd.O();a.to=this.to.O();a.xq=this.xq;a.Di=this.Di;a.Ao=this.Ao;a.fi= +this.fi;a.Bq=this.Bq;a.Aq=this.Aq;a.Cq=this.Cq.O();a.Dq=this.Dq;a.Ho=this.Ho;a.F=null!==this.F?this.F.copy():null;a.gc=this.gc;a.cm=this.cm;if(null!==this.Gk){a.Gk=Ka(this.Gk);for(var b=0;bh;)h+=f[m++%k],n=!n;p=!1}else h=f[m++%k];h>l&&(h=l);var q=Math.sqrt(h*h/(1+e*e));0>d&&(q=-q);b+=q;c+=e*q;n?a.lineTo(b,c):a.moveTo(b,c);l-=h;n=!n}}U.prototype.raiseChangedEvent=U.prototype.ec=function(a,b,c,d,e,f,g){var h=this.J;null!==h&&(h.Ol(a,b,c,d,e,f,g),0!==(this.T&1024)&&c===this&&a===If&&Jm(this,h,b))}; +function Jm(a,b,c){var d=a.yn();if(null!==d)for(var e=a.gc.i;e.next();){var f=e.value,g=null;if(null!==f.Ql){g=Bg(f,d,a);if(null===g)continue;f.Fv(a,g,c,null)}else if(f.ts){var h=b.g;null!==h&&f.Fv(a,h.U.Vr,c,h)}else{var k=d.data;if(null===k)continue;h=b.g;null!==h&&h.Bv||f.Fv(a,k,c,h)}null!==g&&(h=d.Nu(f.Ak),null!==h&&f.GD(h,g,c))}}U.prototype.Nu=function(a){return this.cm===a?this:null};U.prototype.raiseChanged=U.prototype.h=function(a,b,c){this.ec(If,a,this,b,c)}; +function Km(a,b,c,d,e){var f=a.mc,g=a.Hj;g.reset();Lm(a,g,b,c,d,e);a.Hj=g;f.x=b;f.y=c;f.width=d;f.height=e;g.Kr()||g.DD(f)}function Mm(a,b,c,d){if(!1===a.Of)return!1;d.multiply(a.transform);return c?a.Gf(b,d):a.xl(b,d)} +U.prototype.bC=function(a,b,c){if(!1===this.Of)return!1;var d=this.ta;b=a.Wi(b);var e=!1;c&&(e=Yc(a.x,a.y,0,0,0,d.height)a&&(a+=360);return a}; +U.prototype.getDocumentScale=U.prototype.Rh=function(){if(0!==(this.T&4096)===!1)return this.bt;var a=this.Fb;return null!==this.I?a*this.I.Rh():a};U.prototype.getLocalPoint=U.prototype.iC=function(a,b){void 0===b&&(b=new z);b.assign(a);this.Ve.Zg(b);return b};U.prototype.getNearestIntersectionPoint=U.prototype.jk=function(a,b,c){return this.Bn(a.x,a.y,b.x,b.y,c)};r=U.prototype; +r.Bn=function(a,b,c,d,e){var f=this.transform,g=1/(f.m11*f.m22-f.m12*f.m21),h=f.m22*g,k=-f.m12*g,l=-f.m21*g,m=f.m11*g,n=g*(f.m21*f.dy-f.m22*f.dx),p=g*(f.m12*f.dx-f.m11*f.dy);if(null!==this.sl)return f=this.Q,Q.jk(f.left,f.top,f.right,f.bottom,a,b,c,d,e);g=a*h+b*l+n;a=a*k+b*m+p;b=c*h+d*l+n;c=c*k+d*m+p;e.k(0,0);d=this.ta;c=Q.jk(0,0,d.width,d.height,g,a,b,c,e);e.transform(f);return c}; +function lj(a,b,c,d,e){if(!1!==Yk(a)){var f=a.margin,g=f.right+f.left,f=f.top+f.bottom;b=Math.max(b-g,0);c=Math.max(c-f,0);e=e||0;d=Math.max((d||0)-g,0);e=Math.max(e-f,0);var g=a.angle,f=0,f=a.ka,h=0;a.Na&&(h=a.Na);90===g||270===g?(b=isFinite(f.height)?f.height+h:b,c=isFinite(f.width)?f.width+h:c):(b=isFinite(f.width)?f.width+h:b,c=isFinite(f.height)?f.height+h:c);var f=d||0,h=e||0,k=a instanceof L;switch(Nm(a,!0)){case Ti:h=f=0;k&&(c=b=Infinity);break;case Ne:isFinite(b)&&b>d&&(f=b);isFinite(c)&& +c>e&&(h=c);break;case Dm:isFinite(b)&&b>d&&(f=b);h=0;k&&(c=Infinity);break;case Cm:isFinite(c)&&c>e&&(h=c),f=0,k&&(b=Infinity)}var k=a.se,l=a.Jf;f>k.width&&l.widthk.height&&l.heighta.height||this.oi.fe>a.width))&&(c=!0);this.T=c?this.T|256:this.T&-257;this.Cb.w()||v("Non-real actualBounds has been set. Object "+ +this+", actualBounds: "+this.Cb.toString());this.lv(f,this.Cb);fb(f)};r.Jh=function(){};function Om(a,b,c,d,e){var f=a.Q;f.x=b;f.y=c;f.width=d;f.height=e;if(!a.ka.w()){f=a.mc;c=a.margin;b=c.right+c.left;var g=c.top+c.bottom;c=f.width+b;f=f.height+g;d+=b;e+=g;b=Nm(a,!0);c===d&&f===e&&(b=Ti);switch(b){case Ti:if(c>d||f>e)Sk(a,!0),lj(a,c>d?d:c,f>e?e:f);break;case Ne:Sk(a,!0);lj(a,d,e,0,0);break;case Dm:Sk(a,!0);lj(a,d,f,0,0);break;case Cm:Sk(a,!0),lj(a,c,e,0,0)}}} +r.lv=function(){Pm(this,!1);var a=this.J;null!==a&&null!==a.g&&(a.lk(),this.Lt(a),this.ba(),a=this.J,null!==a&&(a.ls!==this&&a.$C!==this&&a.cD!==this||Qm(a,!0)))};r.Lt=function(a){null!==this.bd&&Qm(a,!0)}; +r.ne=function(a,b){if(this.visible){var c=this.opacity,d=1;if(1!==c){if(0===c)return;d=a.globalAlpha;a.globalAlpha=d*c}if(a instanceof re)a:{if(this.visible){var e=null,f=a.dv;if(this instanceof L&&(this.type===Rm||this.type===Sm))Tm(this,a,b);else{var g=this.Cb;if(0!==g.width&&0!==g.height&&!isNaN(g.x)&&!isNaN(g.y)){var h=this.transform,k=this.I;0!==(this.T&4096)===!0&&Um(this);var l=0!==(this.T&256),m=!1;this instanceof Zb&&Vm(this,a);if(l){m=k.gf()?k.ta:k.Q;if(this.jh)var n=this.jh,p=n.x,q=n.y, +s=n.width,n=n.height;else p=Math.max(g.x,m.x),q=Math.max(g.y,m.y),s=Math.min(g.right,m.right)-p,n=Math.min(g.bottom,m.bottom)-q;if(p>g.width+g.x||g.x>m.width+m.x||q>g.height+g.y||g.y>m.height+m.y)break a;m=!0;te(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(p,q,s,n);a.clip()}p=!1;if(this instanceof O&&(p=!0,!this.sa()))break a;q=!1;s=b.Ng;this.J&&s.drawShadows&&(q=this.J.pk);a.Oh.re=[1,0,0,1,0,0];null!==this.Nb&&(Wm(this,a,this.Nb,!0,!0),this.Nb instanceof $f&&this.Nb.type===dg?(a.beginPath(),a.rect(g.x, +g.y,g.width,g.height),Xm(a,this.Nb)):a.fillRect(g.x,g.y,g.width,g.height));p&&this.pk&&s.drawShadows&&(te(a,1,0,0,1,0,0),g=this.jl,a.shadowOffsetX=g.x,a.shadowOffsetY=g.y,a.shadowColor=this.il,a.shadowBlur=this.hl/b.scale,a.Ja());this instanceof L?te(a,h.m11,h.m12,h.m21,h.m22,h.dx,h.dy):a.Oh.re=[h.m11,h.m12,h.m21,h.m22,h.dx,h.dy];if(null!==this.ob){var n=this.ta,g=h=0,s=n.width,n=n.height,t=0;this instanceof X&&(n=this.za.Qa,h=n.x,g=n.y,s=n.width,n=n.height,t=this.eg);Wm(this,a,this.ob,!0,!1);this.ob instanceof +$f&&this.ob.type===dg?(a.beginPath(),a.rect(h-t/2,g-t/2,s+t,n+t),Xm(a,this.ob)):a.fillRect(h-t/2,g-t/2,s+t,n+t)}s=g=h=0;q&&(null!==this.ob||null!==this.Nb||null!==k&&0!==(k.T&512)||null!==k&&k.type===vk&&k.Ye()!==this)?(Ym(this,!0),h=a.shadowOffsetX,g=a.shadowOffsetY,s=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0):Ym(this,!1);this.Xi(a,b);q&&0!==(this.T&512)===!0&&(a.shadowOffsetX=h,a.shadowOffsetY=g,a.shadowBlur=s);p&&q&&(a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0);l&& +(a.restore(),m&&a.Ge.pop(),xk(b,a));this instanceof L&&(e=a.Ge.pop());p&&q&&a.Ge.pop();null!==a.XB&&(null===e&&(f===a.dv?(te(a,1,0,0,1,0,0),e=a.Ge.pop()):e=a.dv),a.XB(this,e))}}}}else{if(this instanceof L&&(this.type===Rm||this.type===Sm)){Tm(this,a,b);1!==c&&(a.globalAlpha=d);return}p=this.Cb;if(0!==p.width&&0!==p.height&&!isNaN(p.x)&&!isNaN(p.y)){e=this.transform;f=this.I;0!==(this.T&4096)===!0&&Um(this);k=0!==(this.T&256);this instanceof Zb&&Vm(this,a);if(k){l=f.gf()?f.ta:f.Q;this.jh?(g=this.jh, +m=g.x,q=g.y,h=g.width,g=g.height):(m=Math.max(p.x,l.x),q=Math.max(p.y,l.y),h=Math.min(p.right,l.right)-m,g=Math.min(p.bottom,l.bottom)-q);if(m>p.width+p.x||p.x>l.width+l.x||q>p.height+p.y||p.y>l.height+l.y){1!==c&&(a.globalAlpha=d);return}a.save();a.beginPath();a.rect(m,q,h,g);a.clip()}q=b.Ng;l=!1;if(this instanceof O){l=!0;if(!this.sa()){1!==c&&(a.globalAlpha=d);return}this.pk&&q.drawShadows&&(m=this.jl,a.shadowOffsetX=m.x*b.scale*b.Ce,a.shadowOffsetY=m.y*b.scale*b.Ce,a.shadowColor=this.il,a.shadowBlur= +this.hl)}m=!1;this.J&&q.drawShadows&&(m=this.J.pk);null!==this.Nb&&(Wm(this,a,this.Nb,!0,!0),this.Nb instanceof $f&&this.Nb.type===dg?(a.beginPath(),a.rect(p.x,p.y,p.width,p.height),Xm(a,this.Nb)):a.fillRect(p.x,p.y,p.width,p.height));e.Kr()||a.transform(e.m11,e.m12,e.m21,e.m22,e.dx,e.dy);null!==this.ob&&(g=this.ta,q=p=0,h=g.width,g=g.height,s=0,this instanceof X&&(g=this.za.Qa,p=g.x,q=g.y,h=g.width,g=g.height,s=this.eg),Wm(this,a,this.ob,!0,!1),this.ob instanceof $f&&this.ob.type===dg?(a.beginPath(), +a.rect(p-s/2,q-s/2,h+s,g+s),Xm(a,this.ob)):a.fillRect(p-s/2,q-s/2,h+s,g+s));h=q=p=0;m&&(null!==this.ob||null!==this.Nb||null!==f&&0!==(f.T&512)||null!==f&&(f.type===vk||f.type===Ri)&&f.Ye()!==this)?(Ym(this,!0),p=a.shadowOffsetX,q=a.shadowOffsetY,h=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0):Ym(this,!1);this.Xi(a,b);m&&0!==(this.T&512)===!0&&(a.shadowOffsetX=p,a.shadowOffsetY=q,a.shadowBlur=h);l&&m&&(a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0);k?(a.restore(),this instanceof +L?xk(b,a,!0):xk(b,a,!1)):e.Kr()||(f=1/(e.m11*e.m22-e.m12*e.m21),a.transform(e.m22*f,-e.m12*f,-e.m21*f,e.m11*f,f*(e.m21*e.dy-e.m22*e.dx),f*(e.m12*e.dx-e.m11*e.dy)))}}1!==c&&(a.globalAlpha=d)}}; +function Tm(a,b,c){var d=a.Cb;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.Nb&&(Wm(a,b,a.Nb,!0,!0),a.Nb instanceof $f&&a.Nb.type===dg?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),Xm(b,a.Nb)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.ob&&(Wm(a,b,a.ob,!0,!1),a.ob instanceof $f&&a.ob.type===dg?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),Xm(b,a.ob)):b.fillRect(d.x,d.y,d.width,d.height)),a.Xi(b,c))}r.Xi=function(){}; +function Xm(a,b){if(b instanceof $f&&b.type===dg&&!(a instanceof re)){var c=b.$v,d=b.Zv;d>c?(a.scale(c/d,1),a.translate((d-c)/2,0)):c>d&&(a.scale(1,d/c),a.translate(0,(c-d)/2));a.Bs?a.clip():a.fill();d>c?(a.translate(-(d-c)/2,0),a.scale(1/(c/d),1)):c>d&&(a.translate(0,-(c-d)/2),a.scale(1,1/(d/c)))}else a.Bs?a.clip():a.fill()}function Zm(a){a.Bs||a.stroke()} +function Wm(a,b,c,d,e){if(null!==c){var f=1,g=1;if("string"===typeof c)d?b.Vl!==c&&(b.fillStyle=c,b.Vl=c):b.Wl!==c&&(b.strokeStyle=c,b.Wl=c);else if(c.type===bg)c=c.color,d?b.Vl!==c&&(b.fillStyle=c,b.Vl=c):b.Wl!==c&&(b.strokeStyle=c,b.Wl=c);else{var h,g=a.ta,f=g.width,g=g.height;if(e)var k=a.Q,f=k.width,g=k.height;var l=b instanceof CanvasRenderingContext2D;if(l&&(c.Tf&&c.type===zm||c.$v===f&&c.Zv===g))h=c.Tf;else{var m=k=0,n=0,p=0,q=0,s=0,s=q=0;e&&(k=a.Q,f=k.width,g=k.height,q=k.x,s=k.y);k=c.start.x* +f+c.start.offsetX;m=c.start.y*g+c.start.offsetY;n=c.end.x*f+c.end.offsetX;p=c.end.y*g+c.end.offsetY;k+=q;n+=q;m+=s;p+=s;c.type===cg?h=b.createLinearGradient(k,m,n,p):c.type===dg?(s=isNaN(c.rr)?Math.max(f,g)/2:c.rr,isNaN(c.qs)?(q=0,s=Math.max(f,g)/2):q=c.qs,h=b.createRadialGradient(k,m,q,n,p,s)):c.type===zm?h=b.createPattern(c.pattern,"repeat"):ta(c.type,"Brush type");if(c.type!==zm&&(a=c.lr,null!==a))for(a=a.i;a.next();)h.addColorStop(a.key,a.value);l&&(c.Tf=h,c.$v=f,c.Zv=g)}d?b.Vl!==h&&(b.fillStyle= +h,b.Vl=h):b.Wl!==h&&(b.strokeStyle=h,b.Wl=h)}}}U.prototype.isContainedBy=U.prototype.nk=function(a){if(a instanceof L)a:{if(this!==a&&null!==a)for(var b=this.I;null!==b;){if(b===a){a=!0;break a}b=b.I}a=!1}else a=!1;return a};U.prototype.isVisibleObject=U.prototype.rk=function(){if(!this.visible)return!1;var a=this.I;return null!==a?a.rk():!0}; +function Um(a){if(0!==(a.T&2048)===!0){var b=a.kd;b.reset();if(!a.Cb.w()||!a.mc.w()){$m(a,!1);return}b.translate(a.Cb.x,a.Cb.y);b.translate(-a.oa.x,-a.oa.y);var c=a.ta;Lm(a,b,c.x,c.y,c.width,c.height);$m(a,!1);an(a,!0)}0!==(a.T&4096)===!0&&(b=a.I,null===b?(a.$l.set(a.kd),a.bt=a.scale,an(a,!1)):null!==b.Ve&&(c=a.$l,c.reset(),b.gf()?c.multiply(b.$l):null!==b.I&&c.multiply(b.I.$l),c.multiply(a.kd),a.bt=a.scale*b.bt,an(a,!1)))} +function Lm(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var g=Dd;a.qe&&a.qe.Jc()&&(g=a.qe);var h=Va();if(a instanceof O&&a.Kb!==a)for(c=a.Kb,d=c.ta,h.ns(d.x,d.y,d.width,d.height,g),c.Hj.Ka(h),h.offset(-c.oa.x,-c.oa.y),g=c.I;null!==g&&g!==a;)g.Hj.Ka(h),h.offset(-g.oa.x,-g.oa.y),g=g.I;else h.ns(c,d,e,f,g);b.rotate(a.angle,h.x,h.y);A(h)}}r=U.prototype; +r.H=function(a){void 0===a&&(a=!1);if(!0!==Yk(this)){Sk(this,!0);Pm(this,!0);var b=this.I;null!==b?a||b.H():(a=this.g,null!==a&&(a.lf.add(this),this instanceof V&&(a.V.Ua||this.He(),null!==this.ud&&bn(this.ud)),a.vd(!0)));if(this instanceof L){if(this.fa===vk||this.fa===si)a=this.Ye(),null!==a&&a.H(!0);a=this.la.l;for(var b=a.length,c=0;ca?a=0:1a||1=a&&v("GraphObject.scale must be greater than zero"),this.Fb=a,this.Xf(),this.H(),this.h("scale",b,a))});G(U,{angle:"angle"},function(){return this.am},function(a){var b=this.am;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.am=a,this.H(),this.Xf(),this.h("angle",b,a)))}); +G(U,{ka:"desiredSize"},function(){return this.ye},function(a){var b=this.ye;b.A(a)||(this.ye=a=a.O(),this.H(),this instanceof X&&this.Dd(),this.h("desiredSize",b,a),a=this.J,null!==a&&0!==(this.T&1024)&&(Jm(this,a,"width"),Jm(this,a,"height")))}); +G(U,{width:"width"},function(){return this.ye.width},function(a){if(this.ye.width!==a){var b=this.ye;this.ye=a=(new Za(a,this.ye.height)).freeze();this.H();this instanceof X&&this.Dd();this.h("desiredSize",b,a);b=this.J;null!==b&&0!==(this.T&1024)&&Jm(this,b,"width")}}); +G(U,{height:"height"},function(){return this.ye.height},function(a){if(this.ye.height!==a){var b=this.ye;this.ye=a=(new Za(this.ye.width,a)).freeze();this.H();this instanceof X&&this.Dd();this.h("desiredSize",b,a);b=this.J;null!==b&&0!==(this.T&1024)&&Jm(this,b,"height")}});G(U,{Jf:"minSize"},function(){return this.xi},function(a){var b=this.xi;b.A(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.xi=a,this.H(),this.h("minSize",b,a))}); +G(U,{se:"maxSize"},function(){return this.vi},function(a){var b=this.vi;b.A(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.vi=a,this.H(),this.h("maxSize",b,a))});H(U,{oa:"measuredBounds"},function(){return this.mc});H(U,{ta:"naturalBounds"},function(){return this.hc},{configurable:!0}); +G(U,{margin:"margin"},function(){return this.Gp},function(a){"number"===typeof a&&(a=new qd(a));var b=this.Gp;b.A(a)||(this.Gp=a=a.O(),this.H(),this.h("margin",b,a))});H(U,{transform:null},function(){0!==(this.T&2048)===!0&&Um(this);return this.kd});H(U,{Ve:null},function(){0!==(this.T&4096)===!0&&Um(this);return this.$l}); +G(U,{alignment:"alignment"},function(){return this.Nd},function(a){var b=this.Nd;b.A(a)||(a.Fd()&&!a.kc()&&v("alignment must be a real Spot or Spot.Default"),this.Nd=a=a.O(),bn(this),this.h("alignment",b,a))});G(U,{column:"column"},function(){return this.Ao},function(a){a=Math.round(a);var b=this.Ao;b!==a&&(0>a&&za(a,">= 0",U,"column"),this.Ao=a,this.H(),this.h("column",b,a))}); +G(U,{FE:"columnSpan"},function(){return this.fi},function(a){a=Math.round(a);var b=this.fi;b!==a&&(1>a&&za(a,">= 1",U,"columnSpan"),this.fi=a,this.H(),this.h("columnSpan",b,a))});G(U,{Tb:"row"},function(){return this.xq},function(a){a=Math.round(a);var b=this.xq;b!==a&&(0>a&&za(a,">= 0",U,"row"),this.xq=a,this.H(),this.h("row",b,a))}); +G(U,{rowSpan:"rowSpan"},function(){return this.Di},function(a){a=Math.round(a);var b=this.Di;b!==a&&(1>a&&za(a,">= 1",U,"rowSpan"),this.Di=a,this.H(),this.h("rowSpan",b,a))});G(U,{Si:"alignmentFocus"},function(){return this.to},function(a){var b=this.to;b.A(a)||(a.Fd()&&!a.kc()&&v("alignmentFocus must be a real Spot or Spot.Default"),this.to=a=a.O(),this.H(),this.h("alignmentFocus",b,a))}); +G(U,{bd:"portId"},function(){return this.jq},function(a){var b=this.jq;if(b!==a){var c=this.J;null===c||c instanceof V||(v("portID being set on a Link: "+a),c=null);null!==b&&null!==c&&jn(c,this);this.jq=a;if(null!==a&&c){c.Hg=!0;null===c.hd&&kn(c);var d=this.bd;null!==d&&c.hd.add(d,this)}this.h("portId",b,a)}});function ln(a){var b={value:null};mn(a,b);return b.value}function mn(a,b){var c=a.I;return null===c||!mn(c,b)&&a.visible?(b.value=a,!1):!0} +function fn(a){var b=a.J;b instanceof V&&(a=a.g,null===a||a.V.Ua||b.He())}G(U,{ab:"toSpot"},function(){return null!==this.G?this.G.Oi:td},function(a){null===this.G&&this.Xd();var b=this.G.Oi;b.A(a)||(a=a.O(),this.G.Oi=a,this.h("toSpot",b,a),fn(this))});G(U,{Bk:"toEndSegmentLength"},function(){return null!==this.G?this.G.Mi:10},function(a){null===this.G&&this.Xd();var b=this.G.Mi;b!==a&&(0>a&&za(a,">= 0",U,"toEndSegmentLength"),this.G.Mi=a,this.h("toEndSegmentLength",b,a),fn(this))}); +G(U,{ss:"toEndSegmentDirection"},function(){return null!==this.G?this.G.Li:Hm},function(a){null===this.G&&this.Xd();var b=this.G.Li;b!==a&&(this.G.Li=a,this.h("toEndSegmentDirection",b,a),fn(this))});G(U,{us:"toShortLength"},function(){return null!==this.G?this.G.Ni:0},function(a){null===this.G&&this.Xd();var b=this.G.Ni;b!==a&&(this.G.Ni=a,this.h("toShortLength",b,a),fn(this))});G(U,{vD:"toLinkable"},function(){return this.Sq},function(a){var b=this.Sq;b!==a&&(this.Sq=a,this.h("toLinkable",b,a))}); +G(U,{YG:"toMaxLinks"},function(){return this.Tq},function(a){var b=this.Tq;b!==a&&(0>a&&za(a,">= 0",U,"toMaxLinks"),this.Tq=a,this.h("toMaxLinks",b,a))});G(U,{Za:"fromSpot"},function(){return null!==this.G?this.G.mi:td},function(a){null===this.G&&this.Xd();var b=this.G.mi;b.A(a)||(a=a.O(),this.G.mi=a,this.h("fromSpot",b,a),fn(this))}); +G(U,{fk:"fromEndSegmentLength"},function(){return null!==this.G?this.G.ki:10},function(a){null===this.G&&this.Xd();var b=this.G.ki;b!==a&&(0>a&&za(a,">= 0",U,"fromEndSegmentLength"),this.G.ki=a,this.h("fromEndSegmentLength",b,a),fn(this))});G(U,{Br:"fromEndSegmentDirection"},function(){return null!==this.G?this.G.ji:Hm},function(a){null===this.G&&this.Xd();var b=this.G.ji;b!==a&&(this.G.ji=a,this.h("fromEndSegmentDirection",b,a),fn(this))}); +G(U,{Cr:"fromShortLength"},function(){return null!==this.G?this.G.li:0},function(a){null===this.G&&this.Xd();var b=this.G.li;b!==a&&(this.G.li=a,this.h("fromShortLength",b,a),fn(this))});G(U,{eC:"fromLinkable"},function(){return this.Uo},function(a){var b=this.Uo;b!==a&&(this.Uo=a,this.h("fromLinkable",b,a))});G(U,{iF:"fromMaxLinks"},function(){return this.Vo},function(a){var b=this.Vo;b!==a&&(0>a&&za(a,">= 0",U,"fromMaxLinks"),this.Vo=a,this.h("fromMaxLinks",b,a))}); +G(U,{cursor:"cursor"},function(){return this.Ho},function(a){var b=this.Ho;b!==a&&(w(a,"string",U,"cursor"),this.Ho=a,this.h("cursor",b,a))});G(U,{click:"click"},function(){return null!==this.F?this.F.ih:null},function(a){null===this.F&&Em(this);var b=this.F.ih;b!==a&&(null!==a&&w(a,"function",U,"click"),this.F.ih=a,this.h("click",b,a))}); +G(U,{qr:"doubleClick"},function(){return null!==this.F?this.F.ph:null},function(a){null===this.F&&Em(this);var b=this.F.ph;b!==a&&(null!==a&&w(a,"function",U,"doubleClick"),this.F.ph=a,this.h("doubleClick",b,a))});G(U,{Gx:"contextClick"},function(){return null!==this.F?this.F.kh:null},function(a){null===this.F&&Em(this);var b=this.F.kh;b!==a&&(null!==a&&w(a,"function",U,"contextClick"),this.F.kh=a,this.h("contextClick",b,a))}); +G(U,{GC:"mouseEnter"},function(){return null!==this.F?this.F.Rp:null},function(a){null===this.F&&Em(this);var b=this.F.Rp;b!==a&&(null!==a&&w(a,"function",U,"mouseEnter"),this.F.Rp=a,this.h("mouseEnter",b,a))});G(U,{HC:"mouseLeave"},function(){return null!==this.F?this.F.Sp:null},function(a){null===this.F&&Em(this);var b=this.F.Sp;b!==a&&(null!==a&&w(a,"function",U,"mouseLeave"),this.F.Sp=a,this.h("mouseLeave",b,a))}); +G(U,{vy:"mouseOver"},function(){return null!==this.F?this.F.zh:null},function(a){null===this.F&&Em(this);var b=this.F.zh;b!==a&&(null!==a&&w(a,"function",U,"mouseOver"),this.F.zh=a,this.h("mouseOver",b,a))});G(U,{uy:"mouseHover"},function(){return null!==this.F?this.F.yh:null},function(a){null===this.F&&Em(this);var b=this.F.yh;b!==a&&(null!==a&&w(a,"function",U,"mouseHover"),this.F.yh=a,this.h("mouseHover",b,a))}); +G(U,{ty:"mouseHold"},function(){return null!==this.F?this.F.xh:null},function(a){null===this.F&&Em(this);var b=this.F.xh;b!==a&&(null!==a&&w(a,"function",U,"mouseHold"),this.F.xh=a,this.h("mouseHold",b,a))});G(U,{cG:"mouseDragEnter"},function(){return null!==this.F?this.F.Pp:null},function(a){null===this.F&&Em(this);var b=this.F.Pp;b!==a&&(null!==a&&w(a,"function",U,"mouseDragEnter"),this.F.Pp=a,this.h("mouseDragEnter",b,a))}); +G(U,{dG:"mouseDragLeave"},function(){return null!==this.F?this.F.Qp:null},function(a){null===this.F&&Em(this);var b=this.F.Qp;b!==a&&(null!==a&&w(a,"function",U,"mouseDragLeave"),this.F.Qp=a,this.h("mouseDragLeave",b,a))});G(U,{sy:"mouseDrop"},function(){return null!==this.F?this.F.wh:null},function(a){null===this.F&&Em(this);var b=this.F.wh;b!==a&&(null!==a&&w(a,"function",U,"mouseDrop"),this.F.wh=a,this.h("mouseDrop",b,a))}); +G(U,{uB:"actionDown"},function(){return null!==this.F?this.F.po:null},function(a){null===this.F&&Em(this);var b=this.F.po;b!==a&&(null!==a&&w(a,"function",U,"actionDown"),this.F.po=a,this.h("actionDown",b,a))});G(U,{vB:"actionMove"},function(){return null!==this.F?this.F.qo:null},function(a){null===this.F&&Em(this);var b=this.F.qo;b!==a&&(null!==a&&w(a,"function",U,"actionMove"),this.F.qo=a,this.h("actionMove",b,a))}); +G(U,{wB:"actionUp"},function(){return null!==this.F?this.F.ro:null},function(a){null===this.F&&Em(this);var b=this.F.ro;b!==a&&(null!==a&&w(a,"function",U,"actionUp"),this.F.ro=a,this.h("actionUp",b,a))});G(U,{tB:"actionCancel"},function(){return null!==this.F?this.F.oo:null},function(a){null===this.F&&Em(this);var b=this.F.oo;b!==a&&(null!==a&&w(a,"function",U,"actionCancel"),this.F.oo=a,this.h("actionCancel",b,a))}); +G(U,{bz:"toolTip"},function(){return null!==this.F?this.F.Gh:null},function(a){null===this.F&&Em(this);var b=this.F.Gh;b!==a&&(null!==a&&ra(a,Vg,U,"toolTip"),this.F.Gh=a,this.h("toolTip",b,a))});G(U,{contextMenu:"contextMenu"},function(){return null!==this.F?this.F.lh:null},function(a){null===this.F&&Em(this);var b=this.F.lh;b!==a&&(null!==a&&ra(a,Vg,U,"contextMenu"),this.F.lh=a,this.h("contextMenu",b,a))}); +U.prototype.bind=U.prototype.bind=function(a){a.uf=this;var b=this.yn();null!==b&&nn(b)&&v("Cannot add a Binding to a template that has already been copied: "+a);null===this.gc&&(this.gc=new N(yg));this.gc.add(a)};U.prototype.findTemplateBinder=U.prototype.yn=function(){for(var a=this instanceof L?this:this.I;null!==a;){if(null!==a.Dk)return a;a=a.I}return null};U.fromSvg=U.fromSVG=function(a){return on(a)};U.prototype.setProperties=function(a){Ib(this,a)};var pn; +U.make=pn=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var f=qn.ja(a);"function"===typeof f?(c=Ka(arguments),d=f(c)):e=aa[a]}null===d&&(void 0===e&&(d=window.$,void 0!==d&&void 0!==d.noop&&v("GraphObject.make failed to complete. Is it conflicting with another $ var? (such as jQuery)"),v("GraphObject.make failed to complete, it may be conflicting with another var.")),null!==e&&e.constructor||v("GraphObject.make requires a class function or class name, not: "+ +a),d=new e);f=1;if(d instanceof M&&1e)&&v("Must specify non-negative integer row for RowColumnDefinition "+ +b),a.sd=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v("Must specify non-negative integer column for RowColumnDefinition "+b),a.sd=!1,a.index=e);e=new Sb;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);Ib(a,e)}else Ib(a,b);else v('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var qn=new Fb("string","function"); +U.getBuilders=function(){var a=new Fb("string","function"),b;for(b in qn)if(b!==b.toLowerCase()){var c=qn[b];"function"===typeof c&&a.add(b,c)}a.freeze();return a};var bo;U.defineBuilder=bo=function(a,b){w(a,"string",U,"defineBuilder:name");w(b,"function",U,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||v("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);qn.add(a,b)}; +bo("Button",function(){var a=new $f(cg);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new $f(cg);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=pn(L,vk,{by:!0},{_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue"},pn(X,{name:"ButtonBorder",jb:"Rectangle",o:new R(0,0,2.761423749153968,2.761423749153968),p:new R(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.GC=function(a,b){var e=b.Bd("ButtonBorder");if(e instanceof +X){var f=b._buttonFillOver;b._buttonFillNormal=e.fill;e.fill=f;f=b._buttonStrokeOver;b._buttonStrokeNormal=e.stroke;e.stroke=f}};a.HC=function(a,b){var e=b.Bd("ButtonBorder");e instanceof X&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)};return a}); +bo("TreeExpanderButton",function(){var a=pn("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},pn(X,{name:"ButtonIcon",jb:"MinusLine",ka:Q.lo},(new yg("figure","isTreeExpanded",function(a,c){var d=c.I;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).kv()),{visible:!1},(new yg("visible","isTreeLeaf",function(a){return!a})).kv());a.click=function(a,c){var d=c.J;d instanceof Vg&&(d=d.Wg);if(d instanceof V){var e=d.g;if(null!==e){e=e.ib;if(d.rc){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; +a.qc=!0;d.rc?e.collapseTree(d):e.expandTree(d)}}};return a}); +bo("SubGraphExpanderButton",function(){var a=pn("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},pn(X,{name:"ButtonIcon",jb:"MinusLine",ka:Q.lo},(new yg("figure","isSubGraphExpanded",function(a,c){var d=c.I;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).kv()));a.click=function(a,c){var d=c.J;d instanceof Vg&&(d=d.Wg);if(d instanceof Wg){var e=d.g;if(null!==e){e=e.ib;if(d.td){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.qc= +!0;d.td?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});bo("ContextMenuButton",function(){var a=pn("Button");a.stretch=Dm;var b=a.Bd("ButtonBorder");b instanceof X&&(b.jb="Rectangle",b.o=new R(0,0,2,3),b.p=new R(1,1,-2,-2));return a}); +bo("PanelExpanderButton",function(a){var b="COLLAPSIBLE";"string"===typeof a[1]&&(b=a[1],a.splice(1,1));a=pn("Button",pn(X,"TriangleUp",{ka:new Za(6,4)},(new yg("figure","visible",function(a){return a?"TriangleUp":"TriangleDown"})).kv(b)));var c=a.Bd("ButtonBorder");c instanceof X&&(c.stroke=null,c.fill="transparent");a.click=function(a,c){var f=c.g;if(null!==f){var g=c.J.Bd(b);null!==g&&(f.Bb("Collapse/Expand Panel"),g.visible=!g.visible,f.od("Collapse/Expand Panel"))}};return a}); +function Fm(){this.lh=this.Gh=this.oo=this.ro=this.qo=this.po=this.wh=this.Qp=this.Pp=this.xh=this.yh=this.zh=this.Sp=this.Rp=this.kh=this.ph=this.ih=null}Fm.prototype.copy=function(){var a=new Fm;a.ih=this.ih;a.ph=this.ph;a.kh=this.kh;a.Rp=this.Rp;a.Sp=this.Sp;a.zh=this.zh;a.yh=this.yh;a.xh=this.xh;a.Pp=this.Pp;a.Qp=this.Qp;a.wh=this.wh;a.po=this.po;a.qo=this.qo;a.ro=this.ro;a.oo=this.oo;a.Gh=this.Gh;a.lh=this.lh;return a}; +function L(a){U.call(this);void 0===a?0===arguments.length?this.fa=Yi:v("invalid argument to Panel constructor: undefined"):(va(a,L,L,"type"),this.fa=a);this.la=new N(U);this.ge=Q.mo;this.Yf=!1;this.fa===zk&&(this.Yf=!0);this.ep=!1;this.Ko=ee;this.oh=Bm;this.fa===cn&&co(this);this.hn=Vi;this.Zo=(new Za(10,10)).freeze();this.$o=Q.ej;this.Dk=this.Ag=null;this.sp=NaN;this.nf=this.th=null;this.Jm="category";this.mf=null;this.Ih=new D(NaN,NaN,NaN,NaN);this.ml=null;this.Hg=!1;this.yq=null}yb(L,U); +L.Og=!0;vb("Panel",L);function co(a){a.gi=Q.mo;a.Dg=1;a.nh=null;a.Ik=null;a.Cg=1;a.Bg=null;a.Hk=null;a.Sc=[];a.Lc=[];a.fl=eo;a.Fk=eo;a.Hh=0;a.uh=0} +L.prototype.cloneProtected=function(a){U.prototype.cloneProtected.call(this,a);a.fa=this.fa;a.ge=this.ge.O();a.Yf=this.Yf;a.ep=this.ep;a.Ko=this.Ko.O();a.oh=this.oh;if(a.fa===cn){a.gi=this.gi.O();a.Dg=this.Dg;a.nh=this.nh;a.Ik=this.Ik;a.Cg=this.Cg;a.Bg=this.Bg;a.Hk=this.Hk;var b=[];if(0a&&za(a,">= 0",L,"padding"),a=new qd(a)):(ra(a,qd,L,"padding"),0>a.left&&za(a.left,">= 0",L,"padding:value.left"),0>a.right&&za(a.right,">= 0",L,"padding:value.right"),0>a.top&&za(a.top,">= 0",L,"padding:value.top"),0>a.bottom&&za(a.bottom,">= 0",L,"padding:value.bottom"));var b=this.ge;b.A(a)||(this.ge=a=a.O(),this.H(),this.h("padding",b,a))}); +G(L,{ak:"defaultAlignment"},function(){return this.Ko},function(a){var b=this.Ko;b.A(a)||(this.Ko=a=a.O(),this.H(),this.h("defaultAlignment",b,a))});G(L,{Vc:"defaultStretch"},function(){return this.oh},function(a){var b=this.oh;b!==a&&(va(a,U,L,"defaultStretch"),this.oh=a,this.H(),this.h("defaultStretch",b,a))}); +G(L,{PH:"defaultSeparatorPadding"},function(){return void 0===this.gi?Q.mo:this.gi},function(a){if(void 0!==this.gi){"number"===typeof a&&(a=new qd(a));var b=this.gi;b.A(a)||(this.gi=a=a.O(),this.h("defaultSeparatorPadding",b,a))}});G(L,{NH:"defaultRowSeparatorStroke"},function(){return void 0===this.nh?null:this.nh},function(a){var b=this.nh;b!==a&&(null===a||"string"===typeof a||a instanceof $f)&&(a instanceof $f&&a.freeze(),this.nh=a,this.h("defaultRowSeparatorStroke",b,a))}); +G(L,{OH:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.Dg?1:this.Dg},function(a){if(void 0!==this.Dg){var b=this.Dg;b!==a&&isFinite(a)&&0<=a&&(this.Dg=a,this.h("defaultRowSeparatorStrokeWidth",b,a))}}); +G(L,{MH:"defaultRowSeparatorDashArray"},function(){return void 0===this.Ik?null:this.Ik},function(a){if(void 0!==this.Ik){var b=this.Ik;if(b!==a){null===a||Array.isArray(a)||ta(a,"Array",L,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.Su,e=d.width,d=d.height,f=this.ta,g=f.width,f=f.height,h=Math.ceil(g/e),k=Math.ceil(f/d),l=this.kC;a.save();a.beginPath();a.rect(0,0,g,f);a.clip();for(var m=[],n=this.la.l,p=n.length,q=0;qe*s*c))break}a.stroke()}else if("LineH"===B.jb){a.lineWidth= +B.Na;Wm(this,a,B.stroke,!1,!1);a.beginPath();for(K=x=Math.floor(-l.y/d);K<=x+k&&!(J=K*d+l.y,0<=J&&J<=f&&fo(K,s,t)&&(u&&!y?Im(a,0,J,g,J,C,B.xc):(a.moveTo(0,J),a.lineTo(g,J)),2>d*s*c));K++);a.stroke()}else if("BarV"===B.jb)for(Wm(this,a,B.fill,!0,!1),B=B.width,isNaN(B)&&(B=e),K=x=Math.floor(-l.x/e);K<=x+h&&!(J=K*e+l.x,0<=J&&Je*s*c));K++);else if("BarH"===B.jb)for(Wm(this,a,B.fill,!0,!1),B=B.height,isNaN(B)&&(B=d),K=x=Math.floor(-l.y/d);K<=x+k&&!(J=K*d+l.y,0<=J&& +J<=f&&fo(K,s,t)&&(a.fillRect(0,J,g,B),2>d*s*c));K++);u&&(void 0!==a.setLineDash?(a.setLineDash(qb),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=qb,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0))}}a.restore();xk(b,a,!1)}else{this.fa===cn&&(a.lineCap="butt",ho(this,a,!0,this.Sc,!0),ho(this,a,!1,this.Lc,!0),io(this,a,!0,this.Sc),io(this,a,!1,this.Lc),ho(this,a,!0,this.Sc,!1),ho(this,a,!1,this.Lc,!1));(c=this.sC)&&a.save();e=this.Ye();d=this.la.l;g= +d.length;for(f=0;ff.height&&(l-=q-f.height):q>f.width&&(l-=q-f.width);k=k.position+l/2;b.lineWidth=l;q=a.padding;c?(k+=q.top,l=q.left,q=f.width-q.right,m&&!n?Im(b,l,k,q,k,p,0):(b.moveTo(l,k),b.lineTo(q,k))):(k+=q.left,l=q.top,q=f.height-q.bottom,m&&!n?Im(b,k,l,k,q,p,0):(b.moveTo(k,l),b.lineTo(k,q)));b.stroke();m&&(void 0!==b.setLineDash?(b.setLineDash(qb),b.lineDashOffset=0):void 0!==b.webkitLineDash?(b.webkitLineDash=qb,b.webkitLineDashOffset=0):void 0!==b.mozDash&&(b.mozDash=null,b.mozDashOffset=0))}}}} +function ho(a,b,c,d,e){for(var f=d.length,g=a.Q,h=0;hl)){var m=k.Af(),n=k.bo;isNaN(n)&&(n=c?a.Dg:a.Cg);var p=k.ao;null===p&&(p=c?a.nh:a.Bg);null===p&&(n=0);m-=n;n=k.position+n;m+=k.Aa;n+m>l&&(m=l-n);0>=m||(l=a.padding,Wm(a,b,k.background,!0,!1),c?b.fillRect(l.left,n+l.top,g.width-(l.left+l.right),m):b.fillRect(n+l.left,l.top,m,g.height-(l.top+l.bottom)))}}}} +function fo(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dWd&&(fd=Wd),ka.Aa+=fd,Wd=Math.max(Wd-fd,0));1!==qa.fi||Fe!==Ti&&Fe!==Cm||(ka=this.zc(Ad),fd=Math.max(Mf-ka.Aa,0),fd>ed&&(fd=ed),ka.Aa+=fd,ed=Math.max(ed-fd,0));kh&&qa.En()}}}pb(Mh);for(var Vc=0,Ge=0,Sa=this.mr,la=0;la=this.hs);qc++)ka=this.Ac(qa.Tb+qc),qf.height+=Math.max(ka.Uh,isNaN(ka.he)?ka.$e:Math.min(ka.he,ka.$e));for(qc=1;qc=this.mr);qc++)ka=this.zc(qa.column+qc),qf.width+=Math.max(ka.Uh,isNaN(ka.he)?ka.$e:Math.min(ka.he,ka.$e));Nb.width+=qf.width;Nb.height+=qf.height;pc=qa.margin;Ig=pc.right+pc.left;Jg=pc.top+pc.bottom;lj(qa,Nb.width,Nb.height,An,Dj);for(var pf=qa.oa,Mf=Math.max(pf.width+ +Ig,0),le=Math.max(pf.height+Jg,0),xi=0,qc=0;qc=this.hs);qc++)ka=this.Ac(qa.Tb+qc),xi+=ka.total||0;if(xine&&(ka.Aa=Math.min(ka.$e,ne+me),ka.bb!==ne&&(me-=ka.bb-ne));if(-1===ka.index-1)break;ka=this.Ac(ka.index-1)}for(var Kg=0,qc=0;qc=this.mr);qc++)ka=this.zc(qa.column+qc),Kg+=ka.total||0;if(Kgne&&(ka.Aa=Math.min(ka.$e,ne+me),ka.bb!== +ne&&(me-=ka.bb-ne));if(-1===ka.index-1)break;ka=this.zc(ka.index-1)}}pb(Bd);$a(qf);$a(Nb);for(var Lg=0,Nf=0,Fe=Nm(this,!0),oe=this.ka,Mg=this.se,Ye=Ge=Vc=0,Xd=0,Sa=this.mr,la=0;lazi)lj(rc,Infinity,Infinity),He=rc.oa,sf.eh(He),this.ei.add(He);else{var Pg=rc.ef,hr=rc.uv,Dn=rc.Si;Dn.Fd()&&(Dn=Dd);var Kj=rc.vv,ot=rc.iD,Lj=0,Mj=0,jl=0;if(Pg<-zi||Pg>=zi){var ir=nh.EC,Nj=nh.DC;Kj!==Ei&&(jl=nh.computeAngle(rc,Kj,Nj),rc.angle=jl);Lj=ir.x-Of.x;Mj=ir.y- +Of.y}else{var ig,Bi;if(0<=Pg)ig=Ij.Y(Pg),Bi=Pgc||n>d)this.H(),lj(this,m>c?c:m,n>d?d:n);break;case Ne:this.H(!0);lj(this,c+q,d+s,0,0);break;case Dm:this.H(!0);lj(this,c+q,n+s,0,0);break;case Cm:this.H(!0),lj(this,m+q,d+s,0,0)}}h=this.Q;h.x=a;h.y=b;h.width= +c;h.height=d;var t=this.fa.zb;switch(t){case "Position":for(var u=f.length,x=e.x-this.padding.left,B=e.y-this.padding.top,y=0;y=this.hs);la++){var qa=this.Ac(Mb+la);Ud.height+=qa.total}for(la=1;la=this.mr);la++){var ih=this.zc(Ce+la);Ud.width+=ih.total}var Lh=De.bb+Ud.width,ui=zd.bb+Ud.height;g.x=yd;g.y=nd;g.width=Lh;g.height=ui;var Ad=yd,vi=nd,xc=Lh,Mh=ui;yd+Lh>e.width&&(xc=Math.max(e.width-yd,0));nd+ui>e.height&&(Mh=Math.max(e.height-nd,0));var Bd=Sa.alignment,Ue=0,od=0,Vd=0,ed=0;if(Bd.kc()){Bd=this.ak;Bd.Jc()|| +(Bd=Dd);var Ue=Bd.x,od=Bd.y,Vd=Bd.offsetX,ed=Bd.offsetY,Wd=De.alignment,Gg=zd.alignment;Wd.Jc()&&(Ue=Wd.x,Vd=Wd.offsetX);Gg.Jc()&&(od=Gg.y,ed=Gg.offsetY)}else Ue=Bd.x,od=Bd.y,Vd=Bd.offsetX,ed=Bd.offsetY;if(isNaN(Ue)||isNaN(od))od=Ue=.5,ed=Vd=0;var ka=nf.width,Ve=nf.height,of=Sa.margin,Zk=of.left+of.right,$k=of.top+of.bottom,fd=dn(Sa,zd,De,!1);!isNaN(Sa.ka.width)||fd!==Ne&&fd!==Dm||(ka=Math.max(Lh-Zk,0));!isNaN(Sa.ka.height)||fd!==Ne&&fd!==Cm||(Ve=Math.max(ui-$k,0));var Db=Sa.se,Eb=Sa.Jf,ka=Math.min(Db.width, +ka),Ve=Math.min(Db.height,Ve),ka=Math.max(Eb.width,ka),Ve=Math.max(Eb.height,Ve),al=Ve+$k;g.x+=g.width*Ue-(ka+Zk)*Ue+Vd+of.left;g.y+=g.height*od-al*od+ed+of.top;Sa.visible&&(jd(Ad,vi,xc,Mh,g.x,g.y,nf.width,nf.height)?Sa.ac(g.x,g.y,ka,Ve):Sa.ac(g.x,g.y,ka,Ve,new D(Ad,vi,xc,Mh)))}else{Sa.Xf();Sa.Cb.wa();var Hg=Sa.Cb;Hg.x=Ee.type===Rm?Kh:yd;Hg.y=Ee.type===Sm?Fg:nd;Hg.width=nf.width;Hg.height=nf.height;Sa.Cb.freeze();Pm(Sa,!1)}}$a(Ud);for(Mb=0;Mb=Nb){var Lg=this.EC,Nf=this.DC;qc!==Ei&&(Kg=this.computeAngle(gd,qc,Nf),gd.angle=Kg);me=Lg.x;ne=Lg.y}else{var oe=void 0,Mg=void 0;if(0<=pd)oe=Xe.l[pd],Mg=pdn.width||m.y>n.height||0>m.x+m.width||0>m.y+m.height)){m=l;l=l instanceof L?l:null;n=hb();n.set(g);if(null!==l?l.Yi(a,b,c,d,e,n):Mm(m,a,d,n))null!==b&& +(m=b(m)),null===m||null!==c&&!c(m)||e.add(m);jb(n)}}}void 0===f&&jb(g);return d}void 0===f&&jb(g);return!1};function to(a,b,c,d){for(var e=a.la.l,f=e.length;f--;){var g=e[f];if(g.visible){var h=g.Q,k=a.ta;h.x>k.width||h.y>k.height||0>h.x+h.width||0>h.y+h.height||(g instanceof L&&to(g,b,c,d),null!==b&&(g=b(g)),null===g||null!==c&&!c(g)||d.add(g))}}} +r.Dl=function(a,b,c,d,e,f){if(!1===this.Of)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var g=this.ta,h=this.gf(),k=h?a:Xc(Wa(a.x,a.y),this.transform),l=h?b:Xc(Wa(b.x,b.y),this.transform),m=k.Wi(l),n=0s.width||q.y>s.height||0>q.x+q.width||0>q.y+q.height||(p.gf()?(q=p.transform,Xc(h.set(a),q),Xc(k.set(b),q)):(h.set(a),k.set(b)),q=p,p=p instanceof L?p:null,null!==p?!p.Dl(h,k,c,d,e,f):!q.bC(h,k,e))||(null!==c&&(q=c(q)),null===q||null!==d&&!d(q)||f.add(q))}}A(h);A(k)}return e?n:g}return!1}; +function jo(a){var b=a.o;if(void 0===b||b===ee)b=null;null===b&&a instanceof X&&(a=a.za,null!==a&&(b=a.o));null===b&&(b=ud);return b}function ko(a){var b=a.p;if(void 0===b||b===ee)b=null;null===b&&a instanceof X&&(a=a.za,null!==a&&(b=a.p));null===b&&(b=Hd);return b}L.prototype.add=L.prototype.add=function(a){ra(a,U,L,"add:element");this.pd(this.la.count,a)};L.prototype.elt=L.prototype.Y=function(a){return this.la.Y(a)}; +L.prototype.insertAt=L.prototype.pd=function(a,b){b instanceof O&&v("Cannot add a Part to a Panel: "+b);if(this===b||this.nk(b))this===b&&v("Cannot make a Panel contain itself: "+this.toString()),v("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.I;null!==c&&c!==this&&v("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.fa!==zk||b instanceof X||v("Can only add Shapes to a Grid Panel, not: "+b);b.xk(this);b.al=null;if(null!==this.xC){var d=b.data;null!==d&&"object"===typeof d&&(null===this.mf&&(this.mf=new Fb(Object,L)),this.mf.add(d,b))}var e=this.la,d=-1;if(c===this){for(var f=-1,g=this.la.l,h=g.length,k=0;k=e.count&&a>=e.count)return;e.Cc(f);d=f}else v("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0> +a||a>e.count)a=e.count;e.pd(a,b);this.H();b.H();null!==b.bd?this.Hg=!0:b instanceof L&&!0===b.Hg&&(this.Hg=!0);c=this.J;null!==c&&(c.Kj=null,c.ui=NaN,this.Hg&&c instanceof V&&(c.Hg=!0),c.Hg&&(c.hd=null),e=this.g,null!==e&&e.V.Ua||(-1!==d&&c.ec(Rf,"elements",this,b,null,d,null),c.ec(Qf,"elements",this,null,b,null,a)))};L.prototype.remove=L.prototype.remove=function(a){ra(a,U,L,"remove:element");for(var b=this.la.l,c=b.length,d=-1,e=0;ea&&za(a,">= 0",L,"getRowDefinition:idx");a=Math.round(a);var b=this.Sc;if(void 0===b[a]){var c=new ug;c.xk(this);c.sd=!0;c.index=a;b[a]=c}return b[a]};L.prototype.removeRowDefinition=L.prototype.WC=function(a){0>a&&za(a,">= 0",L,"removeRowDefinition:idx");a=Math.round(a);var b=this.Sc;this.ec(Rf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.H()};H(L,{mr:"columnCount"},function(){return void 0===this.Lc?0:this.Lc.length}); +L.prototype.getColumnDefinition=L.prototype.zc=function(a){0>a&&za(a,">= 0",L,"getColumnDefinition:idx");a=Math.round(a);var b=this.Lc;if(void 0===b[a]){var c=new ug;c.xk(this);c.sd=!1;c.index=a;b[a]=c}return b[a]};L.prototype.removeColumnDefinition=L.prototype.SC=function(a){0>a&&za(a,">= 0",L,"removeColumnDefinition:idx");a=Math.round(a);var b=this.Lc;this.ec(Rf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.H()}; +G(L,{BG:"rowSizing"},function(){return void 0===this.fl?eo:this.fl},function(a){if(void 0!==this.fl){var b=this.fl;b!==a&&(a!==eo&&a!==mo&&v("rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"),this.fl=a,this.H(),this.h("rowSizing",b,a))}}); +G(L,{EE:"columnSizing"},function(){return void 0===this.Fk?eo:this.Fk},function(a){if(void 0!==this.Fk){var b=this.Fk;b!==a&&(a!==eo&&a!==mo&&v("columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"),this.Fk=a,this.H(),this.h("columnSizing",b,a))}}); +G(L,{aJ:"topIndex"},function(){return void 0===this.Hh?0:this.Hh},function(a){if(void 0!==this.Hh){var b=this.Hh;b!==a&&((!isFinite(a)||0>a)&&v("topIndex must be greater than zero and a real number. Was "+a),this.Hh=a,this.H(),this.h("topIndex",b,a))}}); +G(L,{lI:"leftIndex"},function(){return void 0===this.uh?0:this.uh},function(a){if(void 0!==this.uh){var b=this.uh;b!==a&&((!isFinite(a)||0>a)&&v("leftIndex must be greater than zero and a real number. Was "+a),this.uh=a,this.H(),this.h("leftIndex",b,a))}});L.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==cn)return NaN;for(var b=0,c=this.Sc,d=c.length,e=this.Hh;ea)return-1;if(this.type!==cn)return NaN;for(var b=0,c=this.Lc,d=c.length,e=this.uh;ea;)this.pe(a);a=this.xC;if(null!==a)for(var b=Ia(a),c=0;cc)){var d=a.getCategoryForItemData(b,c),d=a.findTemplateForItemData(b,c,d);if(null!==d){Yg(d);d=d.copy();"object"===typeof b&&(null===a.mf&&(a.mf=new Fb(Object,L)),a.mf.add(b,d));var e=c;Ql(a)&&e++;a.pd(e,d);Rl(a,e,c);d.data=b}}} +function Rl(a,b,c){for(a=a.la;ba&&za(a,">= 0",ug,"height"),this.he=a,this.Aa=this.bb,null!==this.I&&this.I.H(),this.oc("height",b,a))});G(ug,{width:"width"},function(){return this.he},function(a){var b=this.he;b!==a&&(0>a&&za(a,">= 0",ug,"width"),this.he=a,this.Aa=this.bb,null!==this.I&&this.I.H(),this.oc("width",b,a))}); +G(ug,{Uh:"minimum"},function(){return this.yi},function(a){var b=this.yi;b!==a&&((0>a||!isFinite(a))&&za(a,">= 0",ug,"minimum"),this.yi=a,this.Aa=this.bb,null!==this.I&&this.I.H(),this.oc("minimum",b,a))});G(ug,{$e:"maximum"},function(){return this.wi},function(a){var b=this.wi;b!==a&&(0>a&&za(a,">= 0",ug,"maximum"),this.wi=a,this.Aa=this.bb,null!==this.I&&this.I.H(),this.oc("maximum",b,a))}); +G(ug,{alignment:"alignment"},function(){return this.Nd},function(a){var b=this.Nd;b.A(a)||(this.Nd=a.O(),null!==this.I&&this.I.H(),this.oc("alignment",b,a))});G(ug,{stretch:"stretch"},function(){return this.Tg},function(a){var b=this.Tg;b!==a&&(this.Tg=a,null!==this.I&&this.I.H(),this.oc("stretch",b,a))}); +G(ug,{kD:"separatorPadding"},function(){return this.Gi},function(a){"number"===typeof a&&(a=new qd(a));var b=this.Gi;null!==a&&null!==b&&b.A(a)||(null!==a&&(a=a.O()),this.Gi=a,null!==this.I&&this.I.H(),this.oc("separatorPadding",b,a))});G(ug,{ao:"separatorStroke"},function(){return this.Hq},function(a){var b=this.Hq;b!==a&&(null===a||"string"===typeof a||a instanceof $f)&&(a instanceof $f&&a.freeze(),this.Hq=a,null!==this.I&&this.I.H(),this.oc("separatorStroke",b,a))}); +G(ug,{bo:"separatorStrokeWidth"},function(){return this.Iq},function(a){var b=this.Iq;b!==a&&(this.Iq=a,null!==this.I&&this.I.H(),this.oc("separatorStrokeWidth",b,a))}); +G(ug,{GG:"separatorDashArray"},function(){return this.Pg},function(a){var b=this.Pg;if(b!==a){null===a||Array.isArray(a)||ta(a,"Array",ug,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){for(var h=c[0],k=c[1],n=0,p=0,q=0,s=l=0,t=p=0,u=ob(),x=2;xt){pb(u);return}e>l?(B=e-l, +e=l):B=0;var y=Math.sqrt(e*e/(1+q*q));0>n&&(y=-y);h+=y;k+=q*y;a.translate(h,k);a.rotate(s);a.translate(-(g/2),-(f/2));0===B&&d.Xi(a,b);a.translate(g/2,f/2);a.rotate(-s);a.translate(-h,-k);t-=e;l-=e;if(0!==B){p++;if(p===u.length){pb(u);return}l=u[p];n=l[0];s=l[1];q=l[2];l=l[3];e=B}}pb(u)}} +X.prototype.Xi=function(a,b){if(null!==this.$b||null!==this.Dc){null!==this.Dc&&Wm(this,a,this.Dc,!0,!1);null!==this.$b&&Wm(this,a,this.$b,!1,!1);var c=this.eg;if(0===c){var d=this.J;d instanceof Vg&&d.type===si&&d.Xb instanceof X&&(c=d.Xb.Na)}a.lineWidth=c;a.lineJoin=this.dn;a.lineCap=this.cn;a.miterLimit=this.ll;var e=!1;this.J&&b.Ng.drawShadows&&(e=this.J.pk);var f=!0;null!==this.$b&&null===this.Dc&&(f=!1);var d=!1,g=!0,h=this.Xy;null!==h&&(d=!0,void 0!==a.setLineDash?(a.setLineDash(h),a.lineDashOffset= +this.xc):void 0!==a.webkitLineDash?(a.webkitLineDash=h,a.webkitLineDashOffset=this.xc):void 0!==a.mozDash?(a.mozDash=h,a.mozDashOffset=this.xc):g=!1);var k=this.za;if(null!==k){if(k.fa===Oe)a.beginPath(),d&&!g?Im(a,k.Pb,k.Wb,k.Wa,k.fb,h,this.xc):(a.moveTo(k.Pb,k.Wb),a.lineTo(k.Wa,k.fb)),null!==this.Dc&&Xm(a,this.Dc),0!==c&&null!==this.$b&&Zm(a);else if(k.fa===Pe){var l=k.Pb,m=k.Wb,n=k.Wa,p=k.fb,k=Math.min(l,n),q=Math.min(m,p),l=Math.abs(n-l),m=Math.abs(p-m);null!==this.Dc&&(a.beginPath(),a.rect(k, +q,l,m),Xm(a,this.Dc));if(null!==this.$b){var s=n=0,t=0;f&&e&&(n=a.shadowOffsetX,s=a.shadowOffsetY,t=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0);d&&!g?(g=ob(),g.push(k),g.push(q),g.push(k+l),g.push(q),g.push(k+l),g.push(q+m),g.push(k),g.push(q+m),g.push(k),g.push(q),a.beginPath(),zo(a,g,h,this.xc),Zm(a),pb(g)):0!==c&&(a.beginPath(),a.rect(k,q,l,m),Zm(a));f&&e&&(a.shadowOffsetX=n,a.shadowOffsetY=s,a.shadowBlur=t)}}else if(k.fa===Qe)l=k.Pb,m=k.Wb,n=k.Wa,p=k.fb,k=Math.abs(n-l)/2, +q=Math.abs(p-m)/2,l=Math.min(l,n)+k,m=Math.min(m,p)+q,a.beginPath(),a.moveTo(l,m-q),a.bezierCurveTo(l+Q.ia*k,m-q,l+k,m-Q.ia*q,l+k,m),a.bezierCurveTo(l+k,m+Q.ia*q,l+Q.ia*k,m+q,l,m+q),a.bezierCurveTo(l-Q.ia*k,m+q,l-k,m+Q.ia*q,l-k,m),a.bezierCurveTo(l-k,m-Q.ia*q,l-Q.ia*k,m-q,l,m-q),a.closePath(),null!==this.Dc&&Xm(a,this.Dc),d&&!g&&(g=ob(),Q.Sd(l,m-q,l+Q.ia*k,m-q,l+k,m-Q.ia*q,l+k,m,.5,g),Q.Sd(l+k,m,l+k,m+Q.ia*q,l+Q.ia*k,m+q,l,m+q,.5,g),Q.Sd(l,m+q,l-Q.ia*k,m+q,l-k,m+Q.ia*q,l-k,m,.5,g),Q.Sd(l-k,m,l-k, +m-Q.ia*q,l-Q.ia*k,m-q,l,m-q,.5,g),a.beginPath(),zo(a,g,h,this.xc),pb(g)),0!==c&&null!==this.$b&&(t=s=n=0,f&&e&&(n=a.shadowOffsetX,s=a.shadowOffsetY,t=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0),Zm(a),f&&e&&(a.shadowOffsetX=n,a.shadowOffsetY=s,a.shadowBlur=t));else if(k.fa===Le){q=k.ii;m=q.length;for(p=0;px.Xh);else for(var u=Af(x,l),B=u.length,y=0;ye))if(g=b[0],h=b[1],4===e)Im(a,g,h,b[2],b[3],c,d);else{a.moveTo(g,h);for(var m=0,n=0,p=0,q=n=k=0,s=ob(),t=2;tq&&(e=q);e>k?(u=e-k,e=k):u=0;var x=Math.sqrt(e*e/(1+ +p*p));0>m&&(x=-x);g+=x;h+=p*x;l?a.lineTo(g,h):a.moveTo(g,h);q-=e;k-=e;if(0!==u){n++;if(n===s.length){pb(s);return}k=s[n];m=k[0];p=k[1];k=k[2];e=u}else l=!l}pb(s)}}X.prototype.getDocumentPoint=X.prototype.Ra=function(a,b){void 0===b&&(b=new z);a.Fd()&&v("getDocumentPoint:s Spot must be real: "+a.toString());var c=this.ta,d=this.Na;b.k(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY);this.Ve.Ka(b);return b}; +X.prototype.Ui=function(a,b){var c=this.za;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.Qa,e=this.Na/2;c.type!==Oe||b||(e+=2);var f=bb();f.assign(d);f.Ze(e+2,e+2);if(!f.na(a))return fb(f),!1;d=e+1E-4;if(c.type===Oe){if(null===this.stroke)return!1;d=(c.q-c.da)*(a.x-c.da)+(c.s-c.ea)*(a.y-c.ea);if(0>(c.da-c.q)*(a.x-c.q)+(c.ea-c.s)*(a.y-c.s)||0>d)return!1;fb(f);return Q.ad(c.da,c.ea,c.q,c.s,e,a.x,a.y)}if(c.type===Pe){var g=c.da,h=c.ea,k=c.q,l=c.s,c=Math.min(g,k),m=Math.min(h,l), +g=Math.abs(k-g),h=Math.abs(l-h);f.x=c;f.y=m;f.width=g;f.height=h;if(null===this.fill){f.Ze(-d,-d);if(f.na(a))return fb(f),!1;f.Ze(d,d)}null!==this.stroke&&f.Ze(e,e);e=f.na(a);fb(f);return e}if(c.type===Qe){g=c.da;h=c.ea;k=c.q;l=c.s;c=Math.min(g,k);m=Math.min(h,l);g=Math.abs(k-g);h=Math.abs(l-h);g/=2;h/=2;c=a.x-(c+g);m=a.y-(m+h);if(null===this.fill){g-=d;h-=d;if(0>=g||0>=h||1>=c*c/(g*g)+m*m/(h*h))return fb(f),!1;g+=d;h+=d}null!==this.stroke&&(g+=e,h+=e);fb(f);return 0>=g||0>=h?!1:1>=c*c/(g*g)+m*m/ +(h*h)}if(c.type===Le)return fb(f),null===this.fill?Ef(c,a.x,a.y,e):c.na(a,e,1=this.Na)m=Q.mg(n.Pb,n.Wb,n.Wa,n.fb,f,g,h,k,e);else{var q=0,s=0;n.Pb===n.Wa?(q=l,s=0):(b=(n.fb-n.Wb)/(n.Wa-n.Pb),s=l/Math.sqrt(1+b*b),q=s*b);d=ob();b=new z;Q.mg(n.Pb+ +q,n.Wb+s,n.Wa+q,n.fb+s,f,g,h,k,b)&&d.push(b);b=new z;Q.mg(n.Pb-q,n.Wb-s,n.Wa-q,n.fb-s,f,g,h,k,b)&&d.push(b);b=new z;Q.mg(n.Pb+q,n.Wb+s,n.Pb-q,n.Wb-s,f,g,h,k,b)&&d.push(b);b=new z;Q.mg(n.Wa+q,n.fb+s,n.Wa-q,n.fb-s,f,g,h,k,b)&&d.push(b);b=d.length;if(0===b)return pb(d),!1;m=!0;s=Infinity;for(q=0;qMath.abs(c)){m=g-b-c*(f-d);if(0>a*a*c*c+u*u-m*m){e.x=NaN;e.y=NaN;m=!1;break a}l=Math.sqrt(a*a*c*c+u*u-m*m);h=(-(a*a*c*m)+a*u*l)/(u*u+a*a*c*c)+d;a=(-(a*a*c*m)-a*u*l)/(u*u+a*a*c*c)+d;k=c*(h-d)+m+b;b=c*(a-d)+m+b;d=Math.abs((f-h)*(f-h))+Math.abs((g-k)*(g-k));g=Math.abs((f-a)*(f-a))+Math.abs((g-b)* +(g-b));dh){e.x=NaN;e.y=NaN;m=!1;break a}l=Math.sqrt(h);k=b+l;b-=l;d=Math.abs(k-g);g=Math.abs(b-g);dc?a-c:c-a)<(b>d?b-d:d-b)?(e=be||Q.Sa(k.y,e))&&(k.ye||Q.Sa(k.x,e))&&(k.x=g&&d<=a}a=g&&f<=a} +X.prototype.bC=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.Ui(a,!0))return!0;var e=a.Wi(b);b=e;1.5=e||Zc(b,f,0,-n)>=e||Zc(b,f,0,n)>=e||Zc(b,f,m,0)>=e?!1:!0}else if(f.type=== +Le){g=f.Qa;h=g.x;k=g.y;l=g.x+g.width;g=g.y+g.height;if(a.x>l&&a.xg&&a.ye&&Yc(a.x,a.y,h,k,l,k)>e&&Yc(a.x,a.y,l,g,h,g)>e&&Yc(a.x,a.y,l,g,l,k)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?Ef(f,a.x,a.y,b):f.na(a,b,!0))return!0}else{c=f.Xa;for(b=0;be)return!1;k=h.pa.l;l=k.length;for(g=0;ge)return!1;break;case wf:f=ob();Q.Sd(m,n,p.kb,p.wb,p.Hd, +p.Jd,p.q,p.s,.8,f);m=d(f,a);pb(f);if(m)return!1;m=p.q;n=p.s;if(a.pr(m,n)>e)return!1;break;case xf:f=ob();Q.Vn(m,n,p.kb,p.wb,p.q,p.s,.8,f);m=d(f,a);pb(f);if(m)return!1;m=p.q;n=p.s;if(a.pr(m,n)>e)return!1;break;case yf:case zf:var p=p.type===yf?Af(p,h):Bf(p,h,m,n),q=p.length,s=null,f=ob();for(b=0;b= 0",X,"strokeWidth:value")});G(X,{QG:"strokeCap"},function(){return this.cn},function(a){var b=this.cn;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?za(a,'"butt", "round", or "square"',X,"strokeCap"):(this.cn=a,this.ba(),this.h("strokeCap",b,a)))}); +G(X,{VI:"strokeJoin"},function(){return this.dn},function(a){var b=this.dn;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?za(a,'"miter", "bevel", or "round"',X,"strokeJoin"):(this.dn=a,this.ba(),this.h("strokeJoin",b,a)))});G(X,{WI:"strokeMiterLimit"},function(){return this.ll},function(a){var b=this.ll;if(b!==a)if(0 0",X,"strokeWidth:value")}); +G(X,{Xy:"strokeDashArray"},function(){return this.kl},function(a){var b=this.kl;if(b!==a){null===a||Array.isArray(a)||ta(a,"Array",X,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;el*h*h&&(g=!0);b.Uf!==a&&(g=!1);!1===b.Vx("textGreeking")&&(g=!1);for(var l=this.Ii,h=this.Ji,k=this.ee,m=0;mc&&(n=c);var f=f+l,q=p,p=a,s=f,t=c,u=d,x=0; +g?("start"===this.jd||"left"===this.jd?x=0:"end"===this.jd||"right"===this.jd?x=t-n:"center"===this.jd?x=(t-n)/2:v("textAlign must be start, end, left, right, or center"),p.fillRect(0+x,s+.25*u,n,1)):("start"===this.jd||"left"===this.jd?x=0:"end"===this.jd||"right"===this.jd?x=t:"center"===this.jd?x=t/2:v("textAlign must be start, end, left, right, or center"),p.fillText(q,0+x,s+u-.25*u),q=u/20|0,0===q&&(q=1),this.Qk&&("end"===this.jd||"right"===this.jd?x-=n:"center"===this.jd&&(x-=n/2),p.beginPath(), +p.lineWidth=q,p.moveTo(0+x,s+u-.2*u),p.lineTo(0+x+n,s+u-.2*u),p.stroke()),this.Pk&&(p.beginPath(),p.lineWidth=q,s=s+u-u/2.2|0,0!==q%2&&(s+=.5),p.moveTo(0,s),p.lineTo(0+n,s),p.stroke()));f+=d+h}}}; +Zb.prototype.Mn=function(a,b,c,d){var e=this.oi;e.reset();var f=0,g=0;if(isNaN(this.ka.width)){f=this.Ad.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===f.length)f=0;else if(this.ky){for(var h=g=0,k=!1;!k;){var l=f.indexOf("\n",h);-1===l&&(l=f.length,k=!0);h=Vo(f.substr(h,l-h).replace(/^\s+|\s+$/g,""),this.Vf);h>g&&(g=h);h=l+1}f=g}else g=f.indexOf("\n",0),0<=g&&(f=f.substr(0,g)),f=h=Vo(f,this.Vf);f=Math.min(f,a/this.scale);f=Math.max(8,f)}else f=this.ka.width;null!==this.I&&(f=Math.min(f,this.I.se.width), +f=Math.max(f,this.I.Jf.width));g=To(this,f,e);l=g=isNaN(this.ka.height)?Math.min(g,b/this.scale):this.ka.height;if(0!==e.fe&&1!==e.Od.length&&this.Nj===Ro&&(b=this.Vf,k=this.Nj===Ro?Wo(b):0,h=this.Ii+this.Ji,h=Math.max(0,Uo(this)+h),l=Math.max(Math.floor(l/h)-1,0),!(l+1>=e.Od.length))){h=e.Od[l];for(a=Math.max(1,a-k);Vo(h,b)>a&&1=a.vh)return new Za(0,k);if(a.ol===Po){c.Qi=1;f=Vo(b,h);if(0===g||f<=d)return c.fe=f,c.we.push(c.fe),c.Od.push(b),new Za(f,k);var l=Xo(b);b=b.substr(l.length);for(var m=Xo(b),f=Vo(l+m,h);0d&&1d;){m=1;f=Vo(l.substr(0,m),h);for(g=0;f<=d;)m++,g=f,f=Vo(l.substr(0,m),h);1===m?(c.we[a.ee+n]=f,e=Math.max(e,f)):(c.we[a.ee+n]=g,e=Math.max(e,g));m--;1>m&&(m=1);c.Od[a.ee+n]=l.substr(0,m);n++;l=l.substr(m);if(a.ee+n>a.vh)break}m=Xo(b);for(f=Vo(l+m,h);0a.vh))break}c.Qi=Math.min(a.vh,n);c.fe=Math.max(c.fe,e);return new Za(c.fe,k*c.Qi)}function Xo(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)}function Vo(a,b){No!==b&&(No=Oo.font=b);return Oo.measureText(a).width} +function Uo(a){if(null!==a.xm)return a.xm;var b=a.Vf;No!==b&&(No=Oo.font=b);var c=0;void 0!==Io[b]&&5E3>Jo?c=Io[b]:(c=1.3*Oo.measureText("M").width,Io[b]=c,Jo++);return a.xm=c}function Wo(a){No!==a&&(No=Oo.font=a);var b=0;void 0!==Ko[a]&&5E3>Lo?b=Ko[a]:(b=Oo.measureText(Mo).width,Ko[a]=b,Lo++);return b} +function To(a,b,c){var d=a.Ad.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.Ii+a.Ji,e=Math.max(0,Uo(a)+e);if(0===d.length)return c.fe=0,a.ee=1,e;if(!a.ky){var f=d.indexOf("\n",0);0<=f&&(d=d.substr(0,f))}for(var f=0,g=a.ee=0,h=-1,k=!1;!k;)h=d.indexOf("\n",g),-1===h&&(h=d.length,k=!0),g<=h&&(g=d.substr(g,h-g),a.ol!==Po?(c.Qi=0,g=So(a,g,c,b),f+=g.height,a.ee+=c.Qi):(So(a,g,c,b),f+=e,a.ee++),a.ee===a.vh&&(k=!0)),g=h+1;return a.Ct=f} +G(Zb,{$y:"textValidation"},function(){return this.Qj},function(a){var b=this.Qj;b!==a&&(null!==a&&w(a,"function",Zb,"textValidation"),this.Qj=a,this.h("textValidation",b,a))});G(Zb,{SI:"spacingAbove"},function(){return this.Ii},function(a){var b=this.Ii;b!==a&&(this.Ii=a,this.h("spacingAbove",b,a))});G(Zb,{TI:"spacingBelow"},function(){return this.Ji},function(a){var b=this.Ji;b!==a&&(this.Ji=a,this.h("spacingBelow",b,a))}); +G(Zb,{tI:"maxLines"},function(){return this.vh},function(a){var b=this.vh;b!==a&&(a=Math.floor(a),0>=a&&za(a,"> 0",Zb,"maxLines"),this.vh=a,this.h("maxLines",b,a),this.H())});H(Zb,{uI:"metrics"},function(){return this.oi});function Ho(){this.fe=this.Qi=0;this.we=[];this.Od=[]}Ho.prototype.reset=function(){this.fe=this.Qi=0;this.we=[];this.Od=[]};Ho.prototype.nr=function(a){this.Qi=a.Qi;this.fe=a.fe;this.we=Ka(a.we);this.Od=Ka(a.Od)};H(Ho,{zH:"arrSize"},function(){return this.we}); +H(Ho,{AH:"arrText"},function(){return this.Od});H(Ho,{sI:"maxLineWidth"},function(){return this.fe});function ok(){U.call(this);this.ce=null;this.Mq="";this.Hi=(new D(NaN,NaN,NaN,NaN)).freeze();this.Bm=Ne;this.Qq=this.Ki=this.ze=null;this.Fw=!1;this.Zm=null;this.wA=0}yb(ok,U);vb("Picture",ok);var Yo=new Sb,Zo=0,jk=[]; +function $o(){var a=jk;if(0===a.length)for(var b=window.document.getElementsByTagName("canvas"),c=b.length,d=0;dm.ln.length&&(ep(m,4,h,g),ep(m,16, +h,g));for(var q=m.ln,s=q.length,n=q[0],t=0;te;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d);ff(a);b=a.m;b.o=new R(.2,.22);b.p=new R(.8, +.9);F(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=Q.Yj(6);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e=1;6>e;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d);ff(a);b=a.m;b.o=new R(.07,.25);b.p=new R(.93,.75);F(a);return b},Heptagon:function(a,b,c){var d=Q.Yj(7);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e=1;7>e;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d);ff(a);b=a.m;b.o=new R(.2,.15);b.p=new R(.8,.85);F(a);return b},Octagon:function(a,b,c){var d=Q.Yj(8);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e= +1;8>e;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d);ff(a);b=a.m;b.o=new R(.15,.15);b.p=new R(.85,.85);F(a);return b},Nonagon:function(a,b,c){var d=Q.Yj(9);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e=1;9>e;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d);ff(a);b=a.m;b.o=new R(.17,.13);b.p=new R(.82,.82);F(a);return b},Decagon:function(a,b,c){var d=Q.Yj(10);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d);ff(a);b=a.m;b.o=new R(.16,.16);b.p=new R(.84,.84);F(a);return b},Dodecagon:function(a, +b,c){var d=Q.Yj(12);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d);ff(a);b=a.m;b.o=new R(.16,.16);b.p=new R(.84,.84);F(a);return b},FivePointedStar:function(a,b,c){var d=Q.Bl(5);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d);ff(a);b=a.m;b.o=new R(.312,.383);b.p=new R(.693,.765);F(a);return b},SixPointedStar:function(a,b,c){var d=Q.Bl(6);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d); +ff(a);b=a.m;b.o=new R(.17,.251);b.p=new R(.833,.755);F(a);return b},SevenPointedStar:function(a,b,c){var d=Q.Bl(7);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e=1;14>e;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d);ff(a);b=a.m;b.o=new R(.363,.361);b.p=new R(.641,.709);F(a);return b},EightPointedStar:function(a,b,c){var d=Q.Bl(8);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e=1;16>e;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d);ff(a);b=a.m;b.o=new R(.252,.255);b.p=new R(.75,.75);F(a);return b},NinePointedStar:function(a,b, +c){var d=Q.Bl(9);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e=1;18>e;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d);ff(a);b=a.m;b.o=new R(.355,.361);b.p=new R(.645,.651);F(a);return b},TenPointedStar:function(a,b,c){var d=Q.Bl(10);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e=1;20>e;e++)a.lineTo(d[e].x*b,d[e].y*c);pb(d);ff(a);b=a.m;b.o=new R(.281,.261);b.p=new R(.723,.748);F(a);return b},FivePointedBurst:function(a,b,c){var d=Q.tn(5);a=E();S(a,d[0].x*b,d[0].y*c,!0);for(var e=1;ea&&(a=.15);var d=E(),e=.2*Q.ia;S(d,0,.2*c,!0);T(d,0,(.2-e)* +c,(.2-e)*b,0,.2*b,0);d.lineTo(.8*b,0);T(d,(.8+e)*b,0,1*b,(.2-e)*c,1*b,.2*c);d.lineTo(1*b,.8*c);T(d,1*b,(.8+e)*c,(.8+e)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);T(d,(.2-e)*b,1*c,0,(.8+e)*c,0,.8*c);d.lineTo(0,.2*c);S(d,0,a*c,!1);d.lineTo(1*b,a*c);d.Ja(!1);b=d.m;b.o=new R(0,a);b.p=new R(1,1-a);F(d);return b},DividedProcess:function(a,b,c){a=a?a.Zb:NaN;if(isNaN(a)||.1>a)a=.1;var d=E();S(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);ff(d);S(d,0,a*c,!1);d.lineTo(1*b,a*c);d.Ja(!1);b=d.m;b.o=new R(0, +a);b.p=Hd;F(d);return b},Document:function(a,b,c){c/=.8;a=E();S(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);T(a,.5*b,.4*c,.5*b,1*c,0,.7*c);ff(a);b=a.m;b.o=ud;b.p=new R(1,.6);F(a);return b},ExternalOrganization:function(a,b,c){a=a?a.Zb:NaN;if(isNaN(a)||.2>a)a=.2;var d=E();S(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);ff(d);S(d,a*b,0,!1);d.lineTo(0,a*c);d.moveTo(1*b,a*c);d.lineTo((1-a)*b,0);d.moveTo(0,(1-a)*c);d.lineTo(a*b,1*c);d.moveTo((1-a)*b,1*c);d.lineTo(1*b,(1- +a)*c);d.Ja(!1);b=d.m;b.o=new R(a/2,a/2);b.p=new R(1-a/2,1-a/2);F(d);return b},ExternalProcess:function(a,b,c){a=E();S(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);ff(a);S(a,.1*b,.4*c,!1);a.lineTo(.1*b,.6*c);a.moveTo(.9*b,.6*c);a.lineTo(.9*b,.4*c);a.moveTo(.6*b,.1*c);a.lineTo(.4*b,.1*c);a.moveTo(.4*b,.9*c);a.lineTo(.6*b,.9*c);a.Ja(!1);b=a.m;b.o=new R(.25,.25);b.p=new R(.75,.75);F(a);return b},File:function(a,b,c){a=E();S(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1* +b,1*c);a.lineTo(0,1*c);ff(a);S(a,.75*b,0,!1);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.25*c);a.Ja(!1);b=a.m;b.o=new R(0,.25);b.p=Hd;F(a);return b},Interrupt:function(a,b,c){a=E();S(a,1*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);S(a,1*b,.5*c,!1);a.lineTo(1*b,1*c);S(a,1*b,.5*c,!1);a.lineTo(1*b,0);b=a.m;b.o=new R(0,.25);b.p=new R(.5,.75);F(a);return b},InternalStorage:function(a,b,c){var d=a?a.Zb:NaN;a=a?a.as:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.1);var e=E();S(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(1* +b,1*c);e.lineTo(0,1*c);ff(e);S(e,d*b,0,!1);e.lineTo(d*b,1*c);e.moveTo(0,a*c);e.lineTo(1*b,a*c);e.Ja(!1);b=e.m;b.o=new R(d,a);b.p=Hd;F(e);return b},Junction:function(a,b,c){a=E();var d=1/Math.SQRT2,e=(1-1/Math.SQRT2)/2,f=.5*Q.ia;S(a,1*b,.5*c,!0);T(a,1*b,(.5+f)*c,(.5+f)*b,1*c,.5*b,1*c);T(a,(.5-f)*b,1*c,0,(.5+f)*c,0,.5*c);T(a,0,(.5-f)*c,(.5-f)*b,0,.5*b,0);T(a,(.5+f)*b,0,1*b,(.5-f)*c,1*b,.5*c);S(a,(e+d)*b,(e+d)*c,!1);a.lineTo(e*b,e*c);a.moveTo(e*b,(e+d)*c);a.lineTo((e+d)*b,e*c);a.Ja(!1);b=a.m;b.Vc=Vi; +F(a);return b},LinedDocument:function(a,b,c){c/=.8;a=E();S(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);T(a,.5*b,.4*c,.5*b,1*c,0,.7*c);ff(a);S(a,.1*b,0,!1);a.lineTo(.1*b,.75*c);a.Ja(!1);b=a.m;b.o=new R(.1,0);b.p=new R(1,.6);F(a);return b},LoopLimit:function(a,b,c){a=E();S(a,0,1*c,!0);a.lineTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);ff(a);b=a.m;b.o=new R(0,.25);b.p=Hd;F(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b, +c){a=E();var d=.5*Q.ia;S(a,.5*b,1*c,!0);T(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);T(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);T(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);T(a,1*b,(.5+d)*c,(.5+d)*b,.9*c,.6*b,.9*c);a.lineTo(1*b,.9*c);a.lineTo(1*b,1*c);a.lineTo(.5*b,1*c);b=a.m;b.o=new R(.15,.15);b.p=new R(.85,.8);F(a);return b},ManualInput:function(a,b,c){a=E();S(a,1*b,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.25*c);ff(a);b=a.m;b.o=new R(0,.25);b.p=Hd;F(a);return b},MessageFromUser:function(a,b,c){a=a?a.Zb:NaN;isNaN(a)&& +(a=.7);var d=E();S(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(a*b,.5*c);d.lineTo(1*b,1*c);d.lineTo(0,1*c);ff(d);b=d.m;b.o=ud;b.p=new R(a,1);F(d);return b},MicroformProcessing:function(a,b,c){a=a?a.Zb:NaN;isNaN(a)&&(a=.25);var d=E();S(d,0,0,!0);d.lineTo(.5*b,a*c);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.5*b,(1-a)*c);d.lineTo(0,1*c);ff(d);b=d.m;b.o=new R(0,a);b.p=new R(1,1-a);F(d);return b},MicroformRecording:function(a,b,c){a=E();S(a,0,0,!0);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.15*c);a.lineTo(1*b,.85*c); +a.lineTo(.75*b,.75*c);a.lineTo(0,1*c);ff(a);b=a.m;b.o=new R(0,.25);b.p=new R(1,.75);F(a);return b},MultiDocument:function(a,b,c){c/=.8;a=E();S(a,b,0,!0);a.lineTo(b,.5*c);T(a,.96*b,.47*c,.93*b,.45*c,.9*b,.44*c);a.lineTo(.9*b,.6*c);T(a,.86*b,.57*c,.83*b,.55*c,.8*b,.54*c);a.lineTo(.8*b,.7*c);T(a,.4*b,.4*c,.4*b,1*c,0,.7*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);a.lineTo(.1*b,.1*c);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);ff(a);S(a,.1*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.54*c);a.moveTo(.2*b,.1*c);a.lineTo(.9* +b,.1*c);a.lineTo(.9*b,.44*c);a.Ja(!1);b=a.m;b.o=new R(0,.25);b.p=new R(.8,.77);F(a);return b},MultiProcess:function(a,b,c){a=E();S(a,.1*b,.1*c,!0);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);a.lineTo(1*b,0);a.lineTo(1*b,.8*c);a.lineTo(.9*b,.8*c);a.lineTo(.9*b,.9*c);a.lineTo(.8*b,.9*c);a.lineTo(.8*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);ff(a);S(a,.2*b,.1*c,!1);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.8*c);a.moveTo(.1*b,.2*c);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.9*c);a.Ja(!1);b=a.m;b.o=new R(0, +.2);b.p=new R(.8,1);F(a);return b},OfflineStorage:function(a,b,c){a=a?a.Zb:NaN;isNaN(a)&&(a=.1);var d=1-a,e=E();S(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(.5*b,1*c);ff(e);S(e,.5*a*b,a*c,!1);e.lineTo((1-.5*a)*b,a*c);e.Ja(!1);b=e.m;b.o=new R(d/4+.5*a,a);b.p=new R(3*d/4+.5*a,a+.5*d);F(e);return b},OffPageConnector:function(a,b,c){a=E();S(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.5*c);a.lineTo(.75*b,1*c);a.lineTo(0,1*c);ff(a);b=a.m;b.o=ud;b.p=new R(.75,1);F(a);return b},Or:function(a,b,c){a=E();var d=.5*Q.ia; +S(a,1*b,.5*c,!0);T(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);T(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);T(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);T(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);S(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.Ja(!1);b=a.m;b.Vc=Vi;F(a);return b},PaperTape:function(a,b,c){c/=.8;a=E();S(a,0,.7*c,!0);a.lineTo(0,.3*c);T(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);T(a,.5*b,.4*c,.5*b,1*c,0,.7*c);ff(a);b=a.m;b.o=new R(0,.49);b.p=new R(1,.75);F(a);return b},PrimitiveFromCall:function(a, +b,c){var d=a?a.Zb:NaN;a=a?a.as:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=E();S(e,0,0,!0);e.lineTo(1*b,0);e.lineTo((1-a)*b,.5*c);e.lineTo(1*b,1*c);e.lineTo(0,1*c);ff(e);b=e.m;b.o=new R(d,0);b.p=new R(1-a,1);F(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Zb:NaN;a=a?a.as:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=E();S(e,0,0,!0);e.lineTo((1-a)*b,0);e.lineTo(1*b,.5*c);e.lineTo((1-a)*b,1*c);e.lineTo(0,1*c);ff(e);b=e.m;b.o=new R(d,0);b.p=new R(1-a,1);F(e);return b},Subroutine:"Procedure",Procedure:function(a, +b,c){a=a?a.Zb:NaN;isNaN(a)&&(a=.1);var d=E();S(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);ff(d);S(d,(1-a)*b,0,!1);d.lineTo((1-a)*b,1*c);d.moveTo(a*b,0);d.lineTo(a*b,1*c);d.Ja(!1);b=d.m;b.o=new R(a,0);b.p=new R(1-a,1);F(d);return b},Process:function(a,b,c){a=a?a.Zb:NaN;isNaN(a)&&(a=.1);var d=E();S(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);ff(d);S(d,a*b,0,!1);d.lineTo(a*b,1*c);d.Ja(!1);b=d.m;b.o=new R(a,0);b.p=Hd;F(d);return b},Sort:function(a,b,c){a=E();S(a,.5*b, +0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);ff(a);S(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.Ja(!1);b=a.m;b.o=new R(.25,.25);b.p=new R(.75,.5);F(a);return b},Start:function(a,b,c){a=E();S(a,.25*b,0,!0);S(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);S(a,.25*b,0,!1);a.lineTo(.25*b,1*c);a.moveTo(.75*b,0);a.lineTo(.75*b,1*c);a.Ja(!1);b=a.m;b.o=new R(.25,0);b.p=new R(.75,1);F(a);return b},Terminator:function(a,b,c){a=E();S(a,.25*b,0,!0);a.arcTo(270, +180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);b=a.m;b.o=new R(.23,0);b.p=new R(.77,1);F(a);return b},TransmittalTape:function(a,b,c){a=a?a.Zb:NaN;isNaN(a)&&(a=.1);var d=E();S(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.75*b,(1-a)*c);d.lineTo(0,(1-a)*c);ff(d);b=d.m;b.o=ud;b.p=new R(1,1-a);F(d);return b},AndGate:function(a,b,c){a=E();var d=.5*Q.ia;S(a,0,0,!0);a.lineTo(.5*b,0);T(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);T(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);ff(a); +b=a.m;b.o=ud;b.p=new R(.55,1);F(a);return b},Buffer:function(a,b,c){a=E();S(a,0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);ff(a);b=a.m;b.o=new R(0,.25);b.p=new R(.5,.75);F(a);return b},Clock:function(a,b,c){a=E();var d=.5*Q.ia;S(a,1*b,.5*c,!0);T(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);T(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);T(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);T(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);S(a,1*b,.5*c,!1);a.lineTo(1*b,.5*c);S(a,.8*b,.75*c,!1);a.lineTo(.8*b,.25*c);a.lineTo(.6*b,.25*c);a.lineTo(.6*b, +.75*c);a.lineTo(.4*b,.75*c);a.lineTo(.4*b,.25*c);a.lineTo(.2*b,.25*c);a.lineTo(.2*b,.75*c);a.Ja(!1);b=a.m;b.Vc=Vi;F(a);return b},Ground:function(a,b,c){a=E();S(a,.5*b,0,!1);a.lineTo(.5*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.3*b,.8*c);a.lineTo(.7*b,.8*c);a.moveTo(.4*b,1*c);a.lineTo(.6*b,1*c);b=a.m;F(a);return b},Inverter:function(a,b,c){a=E();var d=.1*Q.ia;S(a,.8*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);S(a,1*b,.5*c,!0);T(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6* +c);T(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);T(a,.8*b,(.5-d)*c,(.9-d)*b,.4*c,.9*b,.4*c);T(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.m;b.o=new R(0,.25);b.p=new R(.4,.75);F(a);return b},NandGate:function(a,b,c){a=E();var d=Q.ia,e=.5*d,f=.4*d,d=.1*d;S(a,.8*b,.5*c,!0);T(a,.8*b,(.5+f)*c,(.4+e)*b,1*c,.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.4*b,0);T(a,(.4+e)*b,0,.8*b,(.5-f)*c,.8*b,.5*c);S(a,1*b,.5*c,!0);T(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);T(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);T(a, +.8*b,(.5-d)*c,(.9-d)*b,.4*c,.9*b,.4*c);T(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.m;b.o=new R(0,.05);b.p=new R(.55,.95);F(a);return b},NorGate:function(a,b,c){a=E();var d=Q.ia,e=.5,f=d*e,g=0,h=.5;S(a,.8*b,.5*c,!0);T(a,.7*b,(h+f)*c,(g+f)*b,(h+e)*c,0,1*c);T(a,.25*b,.75*c,.25*b,.25*c,0,0);T(a,(g+f)*b,(h-e)*c,.7*b,(h-f)*c,.8*b,.5*c);e=.1;f=.1*d;g=.9;h=.5;S(a,(g-e)*b,h*c,!0);T(a,(g-e)*b,(h-f)*c,(g-f)*b,(h-e)*c,g*b,(h-e)*c);T(a,(g+f)*b,(h-e)*c,(g+e)*b,(h-f)*c,(g+e)*b,h*c);T(a,(g+e)*b,(h+f)*c,(g+f)*b, +(h+e)*c,g*b,(h+e)*c);T(a,(g-f)*b,(h+e)*c,(g-e)*b,(h+f)*c,(g-e)*b,h*c);b=a.m;b.o=new R(.2,.25);b.p=new R(.6,.75);F(a);return b},OrGate:function(a,b,c){a=E();var d=.5*Q.ia;S(a,0,0,!0);T(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);T(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);T(a,.25*b,.75*c,.25*b,.25*c,0,0);ff(a);b=a.m;b.o=new R(.2,.25);b.p=new R(.75,.75);F(a);return b},XnorGate:function(a,b,c){a=E();var d=Q.ia,e=.5,f=d*e,g=.2,h=.5;S(a,.1*b,0,!1);T(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);S(a,.8*b,.5*c,!0);T(a,.7* +b,(h+f)*c,(g+f)*b,(h+e)*c,.2*b,1*c);T(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);T(a,(g+f)*b,(h-e)*c,.7*b,(h-f)*c,.8*b,.5*c);e=.1;f=.1*d;g=.9;h=.5;S(a,(g-e)*b,h*c,!0);T(a,(g-e)*b,(h-f)*c,(g-f)*b,(h-e)*c,g*b,(h-e)*c);T(a,(g+f)*b,(h-e)*c,(g+e)*b,(h-f)*c,(g+e)*b,h*c);T(a,(g+e)*b,(h+f)*c,(g+f)*b,(h+e)*c,g*b,(h+e)*c);T(a,(g-f)*b,(h+e)*c,(g-e)*b,(h+f)*c,(g-e)*b,h*c);b=a.m;b.o=new R(.4,.25);b.p=new R(.65,.75);F(a);return b},XorGate:function(a,b,c){a=E();var d=.5*Q.ia;S(a,.1*b,0,!1);T(a,.35*b,.25*c,.35*b,.75*c,.1* +b,1*c);S(a,.2*b,0,!0);T(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);T(a,.9*b,(.5+d)*c,(.2+d)*b,1*c,.2*b,1*c);T(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);ff(a);b=a.m;b.o=new R(.4,.25);b.p=new R(.8,.75);F(a);return b},Capacitor:function(a,b,c){a=E();S(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.m;F(a);return b},Resistor:function(a,b,c){a=E();S(a,0,.5*c,!1);a.lineTo(.1*b,0);a.lineTo(.2*b,1*c);a.lineTo(.3*b,0);a.lineTo(.4*b,1*c);a.lineTo(.5*b,0);a.lineTo(.6*b,1*c);a.lineTo(.7*b,.5*c);b=a.m;F(a); +return b},Inductor:function(a,b,c){a=E();var d=.1*Q.ia,e=.1;S(a,(e-.5*d)*b,c,!1);T(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.3;T(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);T(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.5;T(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);T(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.7;T(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);T(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.9;T(a,(e+.1)*b,0,(e+d)*b,c,(e+.5*d)*b,c);b=a.m;F(a);return b},ACvoltageSource:function(a,b,c){a=E();var d=.5*Q.ia;S(a,0*b,.5*c,!1);T(a,0*b,(.5-d)*c,(.5-d)*b,0* +c,.5*b,0*c);T(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);T(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);T(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);T(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.m;b.Vc=Vi;F(a);return b},DCvoltageSource:function(a,b,c){a=E();S(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.m;F(a);return b},Diode:function(a,b,c){a=E();S(a,1*b,0,!1);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);a.lineTo(1*b,1*c);b=a.m;b.o=new R(0,.25);b.p=new R(.5, +.75);F(a);return b},Wifi:function(a,b,c){var d=b,e=c;b*=.38;c*=.6;a=E();var f=Q.ia,g=.8*f,h=.8,k=0,l=.5,d=(d-b)/2,e=(e-c)/2;S(a,k*b+d,(l+h)*c+e,!0);T(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);T(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);T(a,k*b+d,(l-h)*c+e,(k-h+.5*g)*b+d,(l-g)*c+e,(k-h+.5*g)*b+d,l*c+e);T(a,(k-h+.5*g)*b+d,(l+g)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);ff(a);g=.4*f;h=.4;k=.2;l=.5;S(a,k*b+d,(l+h)*c+e,!0);T(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)* +b+d,l*c+e);T(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);T(a,k*b+d,(l-h)*c+e,(k-h+.5*g)*b+d,(l-g)*c+e,(k-h+.5*g)*b+d,l*c+e);T(a,(k-h+.5*g)*b+d,(l+g)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);ff(a);g=.2*f;h=.2;l=k=.5;S(a,(k-h)*b+d,l*c+e,!0);T(a,(k-h)*b+d,(l-g)*c+e,(k-g)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);T(a,(k+g)*b+d,(l-h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);T(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);T(a,(k-g)*b+d,(l+h)*c+e,(k-h)*b+d,(l+g)*c+e,(k-h)*b+d,l*c+e);g=.4*f; +h=.4;k=.8;l=.5;S(a,k*b+d,(l-h)*c+e,!0);T(a,(k+g)*b+d,(l-h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);T(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);T(a,k*b+d,(l+h)*c+e,(k+h-.5*g)*b+d,(l+g)*c+e,(k+h-.5*g)*b+d,l*c+e);T(a,(k+h-.5*g)*b+d,(l-g)*c+e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);ff(a);g=.8*f;h=.8;k=1;l=.5;S(a,k*b+d,(l-h)*c+e,!0);T(a,(k+g)*b+d,(l-h)*c+e,(k+h)*b+d,(l-g)*c+e,(k+h)*b+d,l*c+e);T(a,(k+h)*b+d,(l+g)*c+e,(k+g)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);T(a,k*b+d,(l+h)*c+e,(k+h-.5*g)*b+d,(l+ +g)*c+e,(k+h-.5*g)*b+d,l*c+e);T(a,(k+h-.5*g)*b+d,(l-g)*c+e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);ff(a);b=a.m;F(a);return b},Email:function(a,b,c){a=E();S(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);ff(a);S(a,0,0,!1);a.lineTo(.5*b,.6*c);a.lineTo(1*b,0);a.moveTo(0,1*c);a.lineTo(.45*b,.54*c);a.moveTo(1*b,1*c);a.lineTo(.55*b,.54*c);a.Ja(!1);b=a.m;F(a);return b},Ethernet:function(a,b,c){a=E();S(a,.35*b,0,!0);a.lineTo(.65*b,0);a.lineTo(.65*b,.4*c);a.lineTo(.35*b,.4*c);a.lineTo(.35* +b,0);ff(a);S(a,.1*b,1*c,!0,!0);a.lineTo(.4*b,1*c);a.lineTo(.4*b,.6*c);a.lineTo(.1*b,.6*c);a.lineTo(.1*b,1*c);ff(a);S(a,.6*b,1*c,!0,!0);a.lineTo(.9*b,1*c);a.lineTo(.9*b,.6*c);a.lineTo(.6*b,.6*c);a.lineTo(.6*b,1*c);ff(a);S(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.5*b,.4*c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,.6*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*b,.6*c);a.Ja(!1);b=a.m;F(a);return b},Power:function(a,b,c){a=E();var d=Q.ia,e=.4*d,f=.4,g=Va(),h=Va(),k=Va(),l=Va();Q.Kh(.5,.5-f,.5+ +e,.5-f,.5+f,.5-e,.5+f,.5,.5,g,g,h,k,l);var m=Wa(h.x,h.y);S(a,h.x*b,h.y*c,!0);T(a,k.x*b,k.y*c,l.x*b,l.y*c,(.5+f)*b,.5*c);T(a,(.5+f)*b,(.5+e)*c,(.5+e)*b,(.5+f)*c,.5*b,(.5+f)*c);T(a,(.5-e)*b,(.5+f)*c,(.5-f)*b,(.5+e)*c,(.5-f)*b,.5*c);Q.Kh(.5-f,.5,.5-f,.5-e,.5-e,.5-f,.5,.5-f,.5,k,l,h,g,g);T(a,k.x*b,k.y*c,l.x*b,l.y*c,h.x*b,h.y*c);e=.3*d;f=.3;Q.Kh(.5-f,.5,.5-f,.5-e,.5-e,.5-f,.5,.5-f,.5,k,l,h,g,g);a.lineTo(h.x*b,h.y*c);T(a,l.x*b,l.y*c,k.x*b,k.y*c,(.5-f)*b,.5*c);T(a,(.5-f)*b,(.5+e)*c,(.5-e)*b,(.5+f)*c,.5* +b,(.5+f)*c);T(a,(.5+e)*b,(.5+f)*c,(.5+f)*b,(.5+e)*c,(.5+f)*b,.5*c);Q.Kh(.5,.5-f,.5+e,.5-f,.5+f,.5-e,.5+f,.5,.5,g,g,h,k,l);T(a,l.x*b,l.y*c,k.x*b,k.y*c,h.x*b,h.y*c);ff(a);S(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);ff(a);A(g);A(h);A(k);A(l);A(m);b=a.m;b.o=new R(.25,.55);b.p=new R(.75,.8);F(a);return b},Fallout:function(a,b,c){a=E();var d=.5*Q.ia;S(a,0*b,.5*c,!0);T(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);T(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);T(a,1*b,(.5+d)*c,(.5+d)*b, +1*c,.5*b,1*c);T(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);var e=d=0;S(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.4;e=0;ff(a);S(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.2;e=-.3;ff(a);S(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);ff(a);b=a.m;b.Vc=Vi;F(a);return b},IrritationHazard:function(a,b,c){a= +E();S(a,.2*b,0*c,!0);a.lineTo(.5*b,.3*c);a.lineTo(.8*b,0*c);a.lineTo(1*b,.2*c);a.lineTo(.7*b,.5*c);a.lineTo(1*b,.8*c);a.lineTo(.8*b,1*c);a.lineTo(.5*b,.7*c);a.lineTo(.2*b,1*c);a.lineTo(0*b,.8*c);a.lineTo(.3*b,.5*c);a.lineTo(0*b,.2*c);ff(a);b=a.m;b.o=new R(.3,.3);b.p=new R(.7,.7);F(a);return b},ElectricalHazard:function(a,b,c){a=E();S(a,.37*b,0*c,!0);a.lineTo(.5*b,.11*c);a.lineTo(.77*b,.04*c);a.lineTo(.33*b,.49*c);a.lineTo(1*b,.37*c);a.lineTo(.63*b,.86*c);a.lineTo(.77*b,.91*c);a.lineTo(.34*b,1*c); +a.lineTo(.34*b,.78*c);a.lineTo(.44*b,.8*c);a.lineTo(.65*b,.56*c);a.lineTo(0*b,.68*c);ff(a);b=a.m;F(a);return b},FireHazard:function(a,b,c){a=E();S(a,.1*b,1*c,!0);T(a,-.25*b,.63*c,.45*b,.44*c,.29*b,0*c);T(a,.48*b,.17*c,.54*b,.35*c,.51*b,.42*c);T(a,.59*b,.29*c,.58*b,.28*c,.59*b,.18*c);T(a,.8*b,.34*c,.88*b,.43*c,.75*b,.6*c);T(a,.87*b,.48*c,.88*b,.43*c,.88*b,.31*c);T(a,1.17*b,.76*c,.82*b,.8*c,.9*b,1*c);ff(a);b=a.m;b.o=new R(.05,.645);b.p=new R(.884,.908);F(a);return b},BpmnActivityLoop:function(a,b,c){a= +E();var d=4*(Math.SQRT2-1)/3*.5;S(a,.65*b,1*c,!1);T(a,(1-d+0)*b,1*c,1*b,(.5+d+0)*c,1*b,.5*c);T(a,1*b,(.5-d+0)*c,(.5+d+0)*b,0*c,.5*b,0*c);T(a,(.5-d+0)*b,0*c,0*b,(.5-d+0)*c,0*b,.5*c);T(a,0*b,(.5+d+0)*c,(.5-d+0)*b,1*c,.35*b,.98*c);a.moveTo(.25*b,.8*c);a.lineTo(.35*b,1*c);a.lineTo(.1*b,1*c);b=a.m;F(a);return b},BpmnActivityParallel:function(a,b,c){a=E();S(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(.5*b,0);a.lineTo(.5*b,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.m;F(a);return b},BpmnActivitySequential:function(a, +b,c){a=E();S(a,0,0,!1);a.lineTo(1*b,0);a.moveTo(0,.5*c);a.lineTo(1*b,.5*c);a.moveTo(0,1*c);a.lineTo(1*b,1*c);b=a.m;F(a);return b},BpmnActivityAdHoc:function(a,b,c){a=E();S(a,0,0,!1);S(a,1*b,1*c,!1);S(a,0,.5*c,!1);T(a,.2*b,.35*c,.3*b,.35*c,.5*b,.5*c);T(a,.7*b,.65*c,.8*b,.65*c,1*b,.5*c);b=a.m;F(a);return b},BpmnActivityCompensation:function(a,b,c){a=E();S(a,0,.5*c,!0);a.lineTo(.5*b,0);a.lineTo(.5*b,.5*c);a.lineTo(1*b,1*c);a.lineTo(1*b,0);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,1*c);ff(a);b=a.m;F(a);return b}, +BpmnTaskMessage:function(a,b,c){a=E();S(a,0,.2*c,!0);a.lineTo(1*b,.2*c);a.lineTo(1*b,.8*c);a.lineTo(0,.8*c);a.lineTo(0,.8*c);ff(a);S(a,0,.2*c,!1);a.lineTo(.5*b,.5*c);a.lineTo(1*b,.2*c);a.Ja(!1);b=a.m;F(a);return b},BpmnTaskScript:function(a,b,c){a=E();S(a,.7*b,1*c,!0);a.lineTo(.3*b,1*c);T(a,.6*b,.5*c,0,.5*c,.3*b,0);a.lineTo(.7*b,0);T(a,.4*b,.5*c,1*b,.5*c,.7*b,1*c);ff(a);S(a,.45*b,.73*c,!1);a.lineTo(.7*b,.73*c);a.moveTo(.38*b,.5*c);a.lineTo(.63*b,.5*c);a.moveTo(.31*b,.27*c);a.lineTo(.56*b,.27*c);a.Ja(!1); +b=a.m;F(a);return b},BpmnTaskUser:function(a,b,c){a=E();S(a,0,0,!1);S(a,.335*b,(1-.555)*c,!0);a.lineTo(.335*b,.595*c);a.lineTo(.665*b,.595*c);a.lineTo(.665*b,(1-.555)*c);T(a,.88*b,.46*c,.98*b,.54*c,1*b,.68*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.68*c);T(a,.02*b,.54*c,.12*b,.46*c,.335*b,(1-.555)*c);a.lineTo(.365*b,.405*c);var d=.5-.285,e=Math.PI/4,f=4*(1-Math.cos(e))/(3*Math.sin(e)),e=f*d,f=f*d;T(a,(.5-(e+d)/2)*b,(d+(d+f)/2)*c,(.5-d)*b,(d+f)*c,(.5-d)*b,d*c);T(a,(.5-d)*b,(d-f)*c,(.5-e)*b,(d- +d)*c,.5*b,(d-d)*c);T(a,(.5+e)*b,(d-d)*c,(.5+d)*b,(d-f)*c,(.5+d)*b,d*c);T(a,(.5+d)*b,(d+f)*c,(.5+(e+d)/2)*b,(d+(d+f)/2)*c,.635*b,.405*c);a.lineTo(.635*b,.405*c);a.lineTo(.665*b,(1-.555)*c);a.lineTo(.665*b,.595*c);a.lineTo(.335*b,.595*c);S(a,.2*b,1*c,!1);a.lineTo(.2*b,.8*c);S(a,.8*b,1*c,!1);a.lineTo(.8*b,.8*c);b=a.m;F(a);return b},BpmnEventConditional:function(a,b,c){a=E();S(a,.1*b,0,!0);a.lineTo(.9*b,0);a.lineTo(.9*b,1*c);a.lineTo(.1*b,1*c);ff(a);S(a,.2*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.moveTo(.2*b, +.4*c);a.lineTo(.8*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.2*b,.8*c);a.lineTo(.8*b,.8*c);a.Ja(!1);b=a.m;F(a);return b},BpmnEventError:function(a,b,c){a=E();S(a,0,1*c,!0);a.lineTo(.33*b,0);a.lineTo(.66*b,.5*c);a.lineTo(1*b,0);a.lineTo(.66*b,1*c);a.lineTo(.33*b,.5*c);ff(a);b=a.m;F(a);return b},BpmnEventEscalation:function(a,b,c){a=E();S(a,0,0,!1);S(a,1*b,1*c,!1);S(a,.1*b,1*c,!0);a.lineTo(.5*b,0);a.lineTo(.9*b,1*c);a.lineTo(.5*b,.5*c);ff(a);b=a.m;F(a);return b},BpmnEventTimer:function(a, +b,c){a=E();var d=.5*Q.ia;S(a,1*b,.5*c,!0);T(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);T(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);T(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);T(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);S(a,.5*b,0,!1);a.lineTo(.5*b,.15*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,.85*c);a.moveTo(0,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(1*b,.5*c);a.lineTo(.85*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.58*b,.1*c);a.moveTo(.5*b,.5*c);a.lineTo(.78*b,.54*c);a.Ja(!1);b=a.m;b.Vc=Vi;F(a);return b}}; +for(var gp in Q.Ff)Q.Ff[gp.toLowerCase()]=gp; +Q.Au={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8", +OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4", +BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4", +BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3", +Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z", +BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z", TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z", OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8", -OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};J.TJ=function(){if(null!==J.lw){for(var a in J.lw){var b=xd(J.lw[a],!1);J.$i[a]=b;a.toLowerCase()!==a&&(J.$i[a.toLowerCase()]=a)}J.lw=null}}; -J.XD=function(a){J.TJ();var b=J.$i[a];if(void 0===b){b=a.toLowerCase();if("none"===b)return"None";b=J.$i[b]}return"string"===typeof b?b:b instanceof ed?a:null}; -function H(a){0===arguments.length?z.call(this):z.call(this,a);this.Q=311807;this.Ok=this.ci="";this.ks=this.gs=this.ts=this.jr=null;this.vs="";this.ai=this.us=this.rm=null;this.js="";this.po=null;this.hs=(new fa(NaN,NaN)).freeze();this.ls="";this.qo=null;this.oe="";this.lv=this.rq=this.Ck=null;this.Yg=(new x(NaN,NaN)).freeze();this.rr="";this.Rk=null;this.sr=Ab;this.Br=J.dH;this.ur=J.cH;this.Bq=null;this.kr=Mn;this.um=(new x(6,6)).freeze();this.tm="gray";this.sm=4;this.HC=-1;this.nH=new y;this.Tk= -null;this.uj=NaN}w.Ia(H,z);w.ja("Part",H);H.prototype.cloneProtected=function(a){z.prototype.cloneProtected.call(this,a);a.Q=this.Q&-4097|49152;a.ci=this.ci;a.Ok=this.Ok;a.jr=this.jr;a.ts=this.ts;a.gs=this.gs;a.ks=this.ks;a.vs=this.vs;a.us=this.us;a.ai=null;a.js=this.js;a.hs.assign(this.hs);a.ls=this.ls;a.oe=this.oe;a.rq=this.rq;a.Yg.assign(this.Yg);a.rr=this.rr;a.sr=this.sr.ba();a.Br=this.Br.ba();a.ur=this.ur.ba();a.Bq=this.Bq;a.kr=this.kr;a.um.assign(this.um);a.tm=this.tm;a.sm=this.sm}; -H.prototype.Qh=function(a){z.prototype.Qh.call(this,a);a.rl();a.rm=null;a.po=null;a.qo=null;a.Rk=null;a.Tk=null};H.prototype.toString=function(){var a=w.yg(Object.getPrototypeOf(this))+"#"+w.Yc(this);null!==this.data&&(a+="("+je(this.data)+")");return a};H.LayoutNone=0;var Pj;H.LayoutAdded=Pj=1;var Vj;H.LayoutRemoved=Vj=2;H.LayoutShown=4;H.LayoutHidden=8;H.LayoutNodeSized=16;var Kk;H.LayoutGroupLayout=Kk=32;H.LayoutNodeReplaced=64;var Mn;H.LayoutStandard=Mn=Pj|Vj|28|Kk|64;H.LayoutAll=16777215; -H.prototype.fn=function(a,b,c,d,e,g,h){var k=this.h;null!==k&&(a===he&&"elements"===b?e instanceof z&&Qj(e,function(a){Rj(k,a)}):a===ie&&"elements"===b&&e instanceof z&&Qj(e,function(a){Uj(k,a)}),k.Hc(a,b,c,d,e,g,h))};H.prototype.updateTargetBindings=H.prototype.Rb=function(a){z.prototype.Rb.call(this,a);if(null!==this.data){a=this.Ca.q;for(var b=a.length,c=0;ck&&a.y>l&&a.rightk&&b.y>l&&b.right=c.AF)){this.Q^=4096;var d=!1;if(null!==c){d=c.$a;c.$a=!0;var e=c.selection;e.Na();a?e.add(this):e.remove(this);e.freeze()}this.j("isSelected",b,a);this.de();a=this.rG;null!==a&&a(this);null!==c&&(c.Se(),c.$a=d)}}});w.g(H,"isHighlighted",H.prototype.Ag); -w.defineProperty(H,{Ag:"isHighlighted"},function(){return 0!==(this.Q&524288)},function(a){var b=0!==(this.Q&524288);if(b!==a){t&&w.i(a,"boolean",H,"isHighlighted");this.Q^=524288;var c=this.h;null!==c&&(c=c.Rw,c.Na(),a?c.add(this):c.remove(this),c.freeze());this.j("isHighlighted",b,a);this.pa()}});w.g(H,"isShadowed",H.prototype.Ti); -w.defineProperty(H,{Ti:"isShadowed"},function(){return 0!==(this.Q&8192)},function(a){var b=0!==(this.Q&8192);b!==a&&(t&&w.i(a,"boolean",H,"isShadowed"),this.Q^=8192,this.j("isShadowed",b,a),this.pa())});function Ij(a){return 0!==(a.Q&32768)}function On(a,b){a.Q=b?a.Q|32768:a.Q&-32769}function vl(a,b){a.Q=b?a.Q|65536:a.Q&-65537}function Bi(a){return 0!==(a.Q&131072)}H.prototype.Ef=function(a){this.Q=a?this.Q|131072:this.Q&-131073};function Un(a,b){a.Q=b?a.Q|1048576:a.Q&-1048577} -w.g(H,"isAnimated",H.prototype.oA);w.defineProperty(H,{oA:"isAnimated"},function(){return 0!==(this.Q&262144)},function(a){var b=0!==(this.Q&262144);b!==a&&(t&&w.i(a,"boolean",H,"isAnimated"),this.Q^=262144,this.j("isAnimated",b,a))});w.g(H,"selectionObjectName",H.prototype.xx);w.defineProperty(H,{xx:"selectionObjectName"},function(){return this.vs},function(a){var b=this.vs;b!==a&&(t&&w.i(a,"string",H,"selectionObjectName"),this.vs=a,this.rm=null,this.j("selectionObjectName",b,a))}); -w.g(H,"selectionAdornmentTemplate",H.prototype.qG);w.defineProperty(H,{qG:"selectionAdornmentTemplate"},function(){return this.ts},function(a){var b=this.ts;b!==a&&(t&&w.l(a,tf,H,"selectionAdornmentTemplate"),this instanceof U&&(a.type=gh),this.ts=a,this.j("selectionAdornmentTemplate",b,a))});w.A(H,{$t:"selectionObject"},function(){if(null===this.rm){var a=this.xx;null!==a&&""!==a?(a=this.qe(a),this.rm=null!==a?a:this):this instanceof U?(a=this.path,this.rm=null!==a?a:this):this.rm=this}return this.rm}); -w.g(H,"selectionChanged",H.prototype.rG);w.defineProperty(H,{rG:"selectionChanged"},function(){return this.us},function(a){var b=this.us;b!==a&&(null!==a&&w.i(a,"function",H,"selectionChanged"),this.us=a,this.j("selectionChanged",b,a))});w.g(H,"resizeAdornmentTemplate",H.prototype.YA);w.defineProperty(H,{YA:"resizeAdornmentTemplate"},function(){return this.gs},function(a){var b=this.gs;b!==a&&(t&&w.l(a,tf,H,"resizeAdornmentTemplate"),this.gs=a,this.j("resizeAdornmentTemplate",b,a))}); -w.g(H,"resizeObjectName",H.prototype.ZA);w.defineProperty(H,{ZA:"resizeObjectName"},function(){return this.js},function(a){var b=this.js;b!==a&&(t&&w.i(a,"string",H,"resizeObjectName"),this.js=a,this.po=null,this.j("resizeObjectName",b,a))});w.A(H,{fG:"resizeObject"},function(){if(null===this.po){var a=this.ZA;null!==a&&""!==a?(a=this.qe(a),this.po=null!==a?a:this):this.po=this}return this.po});w.g(H,"resizeCellSize",H.prototype.eG); -w.defineProperty(H,{eG:"resizeCellSize"},function(){return this.hs},function(a){var b=this.hs;b.L(a)||(t&&w.l(a,fa,H,"resizeCellSize"),this.hs=a=a.ba(),this.j("resizeCellSize",b,a))});w.g(H,"rotateAdornmentTemplate",H.prototype.hG);w.defineProperty(H,{hG:"rotateAdornmentTemplate"},function(){return this.ks},function(a){var b=this.ks;b!==a&&(t&&w.l(a,tf,H,"rotateAdornmentTemplate"),this.ks=a,this.j("rotateAdornmentTemplate",b,a))});w.g(H,"rotateObjectName",H.prototype.jG); -w.defineProperty(H,{jG:"rotateObjectName"},function(){return this.ls},function(a){var b=this.ls;b!==a&&(t&&w.i(a,"string",H,"rotateObjectName"),this.ls=a,this.qo=null,this.j("rotateObjectName",b,a))});w.A(H,{iG:"rotateObject"},function(){if(null===this.qo){var a=this.jG;null!==a&&""!==a?(a=this.qe(a),this.qo=null!==a?a:this):this.qo=this}return this.qo});w.g(H,"text",H.prototype.text); -w.defineProperty(H,{text:"text"},function(){return this.oe},function(a){var b=this.oe;b!==a&&(t&&w.i(a,"string",H,"text"),this.oe=a,this.j("text",b,a))});w.g(H,"containingGroup",H.prototype.Va); -w.defineProperty(H,{Va:"containingGroup"},function(){return this.Ck},function(a){if(this.Kd()){var b=this.Ck;if(b!==a){t&&null!==a&&w.l(a,T,H,"containingGroup");null===a||this!==a&&!a.Uh(this)||(this===a&&w.m("Cannot make a Group a member of itself: "+this.toString()),w.m("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.K(Vj);var c=this.h;null!==b?Vn(b,this):this instanceof T&&null!==c&&c.$k.remove(this);this.Ck=a;null!==a?Wn(a,this):this instanceof -T&&null!==c&&c.$k.add(this);this.K(Pj);if(null!==c){var d=this.data,e=c.fa;null!==d&&e instanceof R&&e.Bx(d,e.Cb(null!==a?a.data:null))}d=this.Vz;null!==d&&(e=!0,null!==c&&(e=c.Pa,c.Pa=!0),d(this,b,a),null!==c&&(c.Pa=e));if(this instanceof T)for(c=new F(H),sf(c,this,!0,0,!0),c=c.k;c.next();)if(d=c.value,d instanceof S)for(d=d.ve;d.next();)zk(d.value);if(this instanceof S)for(d=this.ve;d.next();)zk(d.value);this.j("containingGroup",b,a);null!==a&&a.Ex()}}else w.m("cannot set the Part.containingGroup of a Link or Adornment")}); -f=H.prototype;f.rl=function(){var a=this.Va;null!==a&&(a.T(),null!==a.Tb&&a.Tb.T(),a.yf())};f.pa=function(){var a=this.h;null!==a&&!Hj(this)&&!Ij(this)&&this.Ja()&&this.bc.J()&&a.pa(Si(this,this.bc))};f.ut=function(a){var b=this.Ck;null===b||a||Wn(b,this)};f.vt=function(a){var b=this.Ck;null===b||a||Vn(b,this)};f.Om=function(){var a=this.data;if(null!==a){var b=this.h;null!==b&&(b=b.fa,null!==b&&b.VA(a))}};w.g(H,"containingGroupChanged",H.prototype.Vz); -w.defineProperty(H,{Vz:"containingGroupChanged"},function(){return this.rq},function(a){var b=this.rq;b!==a&&(null!==a&&w.i(a,"function",H,"containingGroupChanged"),this.rq=a,this.j("containingGroupChanged",b,a))});H.prototype.findSubGraphLevel=function(){return Xn(this,this)};function Xn(a,b){var c=b.Va;return null!==c?1+Xn(a,c):b instanceof S&&(c=b.Md,null!==c)?Xn(a,c):0}H.prototype.findTopLevelPart=function(){return Yn(this,this)}; -function Yn(a,b){var c=b.Va;return null!==c?Yn(a,c):b instanceof S&&(c=b.Md,null!==c)?Yn(a,c):b}w.A(H,{$w:"isTopLevel"},function(){return null!==this.Va||this instanceof S&&this.zf?!1:!0});H.prototype.isMemberOf=H.prototype.Uh=function(a){return a instanceof T?Zn(this,this,a):!1};function Zn(a,b,c){if(b===c||null===c)return!1;var d=b.Va;return null===d||d!==c&&!Zn(a,d,c)?b instanceof S&&(b=b.Md,null!==b)?Zn(a,b,c):!1:!0} -H.prototype.findCommonContainingGroup=H.prototype.II=function(a){if(null===a)return null;t&&w.l(a,H,H,"findCommonContainingGroup:other");if(this===a)return this instanceof T?this:null;for(var b=this;null!==b;)b instanceof T&&Un(b,!0),b=b.Va;for(var c=null,b=a;null!==b;){if(0!==(b.Q&1048576)){c=b;break}b=b.Va}for(b=this;null!==b;)b instanceof T&&Un(b,!1),b=b.Va;return c};w.g(H,"layoutConditions",H.prototype.tF); -w.defineProperty(H,{tF:"layoutConditions"},function(){return this.kr},function(a){var b=this.kr;b!==a&&(t&&w.i(a,"number",H,"layoutConditions"),this.kr=a,this.j("layoutConditions",b,a))});H.prototype.canLayout=function(){if(!this.xA||!this.Ja())return!1;var a=this.layer;return null!==a&&a.Ac||this instanceof S&&this.zf?!1:!0}; -H.prototype.invalidateLayout=H.prototype.K=function(a){void 0===a&&(a=16777215);var b;this.xA&&0!==(a&this.tF)?(b=this.layer,null!==b&&b.Ac||this instanceof S&&this.zf?b=!1:(b=this.h,b=null!==b&&b.ka.sb?!1:!0)):b=!1;if(b)if(b=this.Ck,null!==b){var c=b.Lb;null!==c?c.K():b.K(a)}else a=this.h,null!==a&&(c=a.Lb,null!==c&&c.K())};function Tj(a){if(!a.Ja())return!1;a=a.layer;return null!==a&&a.Ac?!1:!0}w.g(H,"dragComputation",H.prototype.Yz); -w.defineProperty(H,{Yz:"dragComputation"},function(){return this.Bq},function(a){var b=this.Bq;b!==a&&(null!==a&&w.i(a,"function",H,"dragComputation"),this.Bq=a,this.j("dragComputation",b,a))});w.g(H,"shadowOffset",H.prototype.wG);w.defineProperty(H,{wG:"shadowOffset"},function(){return this.um},function(a){var b=this.um;b.L(a)||(t&&w.l(a,x,H,"shadowOffset"),this.um=a=a.ba(),this.pa(),this.j("shadowOffset",b,a))});w.g(H,"shadowColor",H.prototype.shadowColor); -w.defineProperty(H,{shadowColor:"shadowColor"},function(){return this.tm},function(a){var b=this.tm;b!==a&&(t&&w.i(a,"string",H,"shadowColor"),this.tm=a,this.pa(),this.j("shadowColor",b,a))});w.g(H,"shadowBlur",H.prototype.shadowBlur);w.defineProperty(H,{shadowBlur:"shadowBlur"},function(){return this.sm},function(a){var b=this.sm;b!==a&&(t&&w.i(a,"number",H,"shadowBlur"),this.sm=a,this.pa(),this.j("shadowBlur",b,a))}); -function tf(a){0===arguments.length?H.call(this,Mh):H.call(this,a);this.hf="Adornment";this.Jb=null;this.Q&=-257;this.Yg=new x(NaN,NaN);this.ej=new D(y);this.Tb=null}w.Ia(tf,H);w.ja("Adornment",tf);tf.prototype.toString=function(){var a=this.Nh;return"Adornment("+this.Gc+")"+(null!==a?a.toString():"")};tf.prototype.updateRelationshipsFromData=function(){}; -tf.prototype.Et=function(){var a=this.wc.V,b=this.wc;if(a instanceof U&&b instanceof W){var c=a.path,b=c.Ta;a.Et();for(var b=c.Ta,a=this.Ca.q,c=a.length,d=0;da&&(a=1);var b=this.h;if(null!==b&&!b.ee){var c=b.Pb;0!==b.ka.Ve&&c.zl();b.ee=!0;var c=b.ld,d=new F(S);d.add(this);mo(this,d,c,a,this.Qc);b.ee=!1}}; -function mo(a,b,c,d,e){if(1a&&(a=2);var b=this.h;if(null!==b&&!b.ee){var c=b.Pb;0!==b.ka.Ve&&c.zl();b.ee=!0;var d=b.ld,e=new F(S);e.add(this);oo(this,e,d,a,this.Qc,c,this);b.ee=!1}};function oo(a,b,c,d,e,g,h){for(var k=c?a.Iw():a.wg();k.next();){var l=k.value;l.Bc&&(e||l.qg||l.$b(),l=l.gA(a),null!==l&&l!==a&&!b.contains(l)&&(b.add(l),e||(l.Qe(!0),l.rl(),zi(g,l,h)),2a&&(a-=180);break;case uo:a=J.Mt(c+90);90a&&(a-=180);break;case vo:a=J.Mt(c-90);90a&&(a-=180);break;case wo:a=J.Mt(c);if(45a||225a)return 0;90a&&(a-=180)}return J.Mt(a)};w.g(U,"fromNode",U.prototype.Z); -w.defineProperty(U,{Z:"fromNode"},function(){return this.eg},function(a){var b=this.eg;if(b!==a){t&&null!==a&&w.l(a,S,U,"fromNode");var c=this.vd;null!==b&&(this.pg!==b&&jo(b,this,c),xo(this),this.K(Vj));this.eg=a;this.li=null;this.$b();var d=this.h;if(null!==d){var e=this.data,g=d.fa;if(null!==e)if(g instanceof R){var h=null!==a?a.data:null;g.Ax(e,g.Cb(h))}else g instanceof xe&&(h=null!==a?a.data:null,d.ld?g.kh(e,g.Cb(h)):(null!==b&&g.kh(b.data,void 0),g.kh(h,g.Cb(null!==this.pg?this.pg.data:null))))}e= -this.vd;g=this.cA;null!==g&&(h=!0,null!==d&&(h=d.Pa,d.Pa=!0),g(this,c,e),null!==d&&(d.Pa=h));null!==a&&(this.pg!==a&&io(a,this,e),yo(this),this.K(Pj));this.j("fromNode",b,a);zk(this)}});w.g(U,"fromPortId",U.prototype.Rf); -w.defineProperty(U,{Rf:"fromPortId"},function(){return this.xh},function(a){var b=this.xh;if(b!==a){t&&w.i(a,"string",U,"fromPortId");var c=this.vd;null!==c&&ho(this.Z,c);xo(this);this.xh=a;var d=this.vd;null!==d&&ho(this.Z,d);var e=this.h;if(null!==e){var g=this.data,h=e.fa;null!==g&&h instanceof R&&h.gB(g,a)}c!==d&&(this.li=null,this.$b(),g=this.cA,null!==g&&(h=!0,null!==e&&(h=e.Pa,e.Pa=!0),g(this,c,d),null!==e&&(e.Pa=h)));yo(this);this.j("fromPortId",b,a)}}); -w.A(U,{vd:"fromPort"},function(){var a=this.eg;return null===a?null:a.ll(this.xh)});w.g(U,"fromPortChanged",U.prototype.cA);w.defineProperty(U,{cA:"fromPortChanged"},function(){return this.Jq},function(a){var b=this.Jq;b!==a&&(null!==a&&w.i(a,"function",U,"fromPortChanged"),this.Jq=a,this.j("fromPortChanged",b,a))});w.g(U,"toNode",U.prototype.da); -w.defineProperty(U,{da:"toNode"},function(){return this.pg},function(a){var b=this.pg;if(b!==a){t&&null!==a&&w.l(a,S,U,"toNode");var c=this.le;null!==b&&(this.eg!==b&&jo(b,this,c),xo(this),this.K(Vj));this.pg=a;this.li=null;this.$b();var d=this.h;if(null!==d){var e=this.data,g=d.fa;if(null!==e)if(g instanceof R){var h=null!==a?a.data:null;g.Cx(e,g.Cb(h))}else g instanceof xe&&(h=null!==a?a.data:null,d.ld?(null!==b&&g.kh(b.data,void 0),g.kh(h,g.Cb(null!==this.eg?this.eg.data:null))):g.kh(e,g.Cb(h)))}e= -this.le;g=this.rB;null!==g&&(h=!0,null!==d&&(h=d.Pa,d.Pa=!0),g(this,c,e),null!==d&&(d.Pa=h));null!==a&&(this.eg!==a&&io(a,this,e),yo(this),this.K(Pj));this.j("toNode",b,a);zk(this)}});w.g(U,"toPortId",U.prototype.Og); -w.defineProperty(U,{Og:"toPortId"},function(){return this.Lh},function(a){var b=this.Lh;if(b!==a){t&&w.i(a,"string",U,"toPortId");var c=this.le;null!==c&&ho(this.da,c);xo(this);this.Lh=a;var d=this.le;null!==d&&ho(this.da,d);var e=this.h;if(null!==e){var g=this.data,h=e.fa;null!==g&&h instanceof R&&h.kB(g,a)}c!==d&&(this.li=null,this.$b(),g=this.rB,null!==g&&(h=!0,null!==e&&(h=e.Pa,e.Pa=!0),g(this,c,d),null!==e&&(e.Pa=h)));yo(this);this.j("toPortId",b,a)}}); -w.A(U,{le:"toPort"},function(){var a=this.pg;return null===a?null:a.ll(this.Lh)});w.g(U,"toPortChanged",U.prototype.rB);w.defineProperty(U,{rB:"toPortChanged"},function(){return this.Js},function(a){var b=this.Js;b!==a&&(null!==a&&w.i(a,"function",U,"toPortChanged"),this.Js=a,this.j("toPortChanged",b,a))}); -w.defineProperty(U,{wb:"fromSpot"},function(){return null!==this.S?this.S.mj:zc},function(a){null===this.S&&this.Oe();var b=this.S.mj;b.L(a)||(t&&w.l(a,K,U,"fromSpot"),a=a.ba(),this.S.mj=a,this.j("fromSpot",b,a),this.$b())}); -w.defineProperty(U,{ek:"fromEndSegmentLength"},function(){return null!==this.S?this.S.kj:NaN},function(a){null===this.S&&this.Oe();var b=this.S.kj;b!==a&&(t&&w.i(a,"number",U,"fromEndSegmentLength"),0>a&&w.la(a,">= 0",U,"fromEndSegmentLength"),this.S.kj=a,this.j("fromEndSegmentLength",b,a),this.$b())}); -w.defineProperty(U,{$o:"fromEndSegmentDirection"},function(){return null!==this.S?this.S.jj:ao},function(a){null===this.S&&this.Oe();var b=this.S.jj;b!==a&&(t&&w.za(a,S,U,"fromEndSegmentDirection"),this.S.jj=a,this.j("fromEndSegmentDirection",b,a),this.$b())});w.defineProperty(U,{ap:"fromShortLength"},function(){return null!==this.S?this.S.lj:NaN},function(a){null===this.S&&this.Oe();var b=this.S.lj;b!==a&&(t&&w.i(a,"number",U,"fromShortLength"),this.S.lj=a,this.j("fromShortLength",b,a),this.$b())}); -w.defineProperty(U,{yb:"toSpot"},function(){return null!==this.S?this.S.Nj:zc},function(a){null===this.S&&this.Oe();var b=this.S.Nj;b.L(a)||(t&&w.l(a,K,U,"toSpot"),a=a.ba(),this.S.Nj=a,this.j("toSpot",b,a),this.$b())}); -w.defineProperty(U,{mk:"toEndSegmentLength"},function(){return null!==this.S?this.S.Lj:NaN},function(a){null===this.S&&this.Oe();var b=this.S.Lj;b!==a&&(t&&w.i(a,"number",U,"toEndSegmentLength"),0>a&&w.la(a,">= 0",U,"toEndSegmentLength"),this.S.Lj=a,this.j("toEndSegmentLength",b,a),this.$b())}); -w.defineProperty(U,{Wp:"toEndSegmentDirection"},function(){return null!==this.S?this.S.Kj:ao},function(a){null===this.S&&this.Oe();var b=this.S.Kj;b!==a&&(t&&w.za(a,S,U,"toEndSegmentDirection"),this.S.Kj=a,this.j("toEndSegmentDirection",b,a),this.$b())});w.defineProperty(U,{Yp:"toShortLength"},function(){return null!==this.S?this.S.Mj:NaN},function(a){null===this.S&&this.Oe();var b=this.S.Mj;b!==a&&(t&&w.i(a,"number",U,"toShortLength"),this.S.Mj=a,this.j("toShortLength",b,a),this.$b())}); -function zk(a){var b=a.Z,c=a.da;null!==b?null!==c?zo(a,b.II(c)):zo(a,null):zo(a,null)}function zo(a,b){var c=a.Ck;if(c!==b){null!==c&&Vn(c,a);a.Ck=b;null!==b&&Wn(b,a);var d=a.Vz;if(null!==d){var e=!0,g=a.h;null!==g&&(e=g.Pa,g.Pa=!0);d(a,c,b);null!==g&&(g.Pa=e)}!a.qg||a.tD!==c&&a.vD!==c||a.$b()}}U.prototype.rl=function(){var a=this.Va;null!==a&&this.Z!==a&&this.da!==a&&H.prototype.rl.call(this)}; -U.prototype.getOtherNode=U.prototype.gA=function(a){t&&w.l(a,S,U,"getOtherNode:node");var b=this.Z;return a===b?this.da:b};U.prototype.getOtherPort=function(a){t&&w.l(a,P,U,"getOtherPort:port");var b=this.vd;return a===b?this.le:b};w.A(U,{CK:"isLabeledLink"},function(){return null===this.Ae?!1:0=d&&(h=d-1);var l=this.n(h-1),g=this.n(h);J.Lo(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.n(0),g=this.n(1),b=Math.min(e.x,g.x),c=Math.min(e.y,g.y),a.o(e.x,e.y,0,0),a.Zi(g),h=2;hc&&(c=-c)):J.rb(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.Zj(d)),g.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}w.xa(g);b=this.n(h);g=this.n(h+1);b.x===g.x?b.y>g.y?a.o(b.x,b.y-(e/2-c)):a.o(b.x,b.y+(e/2-c)):b.y===g.y?b.x>g.x?a.o(b.x-(e/2-c),b.y):a.o(b.x+(e/2-c),b.y):(e=(e/2-c)/d,a.o(b.x+e*(g.x-b.x),b.y+e*(g.y-b.y)));return a};w.A(U,{DF:"midAngle"},function(){this.updateRoute();return this.computeMidAngle()}); -U.prototype.computeMidAngle=function(){var a=this.oa;if(2>a)return NaN;if(this.computeCurve()===sh&&4<=a&&!this.gc){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),a=this.n(c),b=this.n(c+1),d=this.n(c+2),c=this.n(c+3);return J.dI(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0e?a.Pi(b):b.Pi(d)};w.g(U,"points",U.prototype.points); -w.defineProperty(U,{points:"points"},function(){return this.Vc},function(a){var b=this.Vc;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var e=0;ep&&(u-=180));0>u?u+=360:360<=u&&(u-=360);k&&(v+=Math.abs(p));0===u?r=v:90===u?s=v:180===u?r=-v:270===u?s=-v:(r=v*Math.cos(u*Math.PI/180),s=v*Math.sin(u*Math.PI/180));if(g.ue()&&k){var A=c.qb(Ob,w.M()),E=w.ic(A.x+1E3*r,A.y+1E3*s);this.getLinkPointFromPoint(b,c,A,E,!0,q);w.B(A);w.B(E)}}var v=this.getLinkPoint(d,e,h,!1,l,b,c),B=0,G=0,O=0;if(l||h!==yb||k)A= -this.computeEndSegmentLength(d,e,h,!1),O=this.getLinkDirection(d,e,v,h,!1,l,b,c),k&&(O+=l?0:30,0>p&&(O+=180)),0>O?O+=360:360<=O&&(O-=360),k&&(A+=Math.abs(p)),0===O?B=A:90===O?G=A:180===O?B=-A:270===O?G=-A:(B=A*Math.cos(O*Math.PI/180),G=A*Math.sin(O*Math.PI/180)),h.ue()&&k&&(A=e.qb(Ob,w.M()),E=w.ic(A.x+1E3*B,A.y+1E3*G),this.getLinkPointFromPoint(d,e,A,E,!1,v),w.B(A),w.B(E));e=q;if(l||g!==yb||k)e=new x(q.x+r,q.y+s);c=v;if(l||h!==yb||k)c=new x(v.x+B,v.y+G);!n&&!l&&g===yb&&3k&&(m=-m),r=(0>h?-1:1)*m+q,s=l*(r-q)+u),q=a.x+2*g/3,u=a.y+2*h/3,v=q,B=u,J.I(h,0)?B=0h?-1:1)*m+q,B=l*(v-q)+u),this.Mo(),this.Mh(a),this.cl(r,s),this.cl(v,B),this.Mh(n),this.Ff(0, -this.getLinkPoint(b,c,yb,!0,!1,d,e)),this.Ff(3,this.getLinkPoint(d,e,yb,!1,!1,b,c))):(a=d,d=this.getLinkPoint(b,c,yb,!0,!1,a,e),e=this.getLinkPoint(a,e,yb,!1,!1,b,c),this.hasCurviness()?(h=e.x-d.x,b=e.y-d.y,c=this.computeCurviness(),a=d.x+h/2,n=d.y+b/2,g=a,k=n,J.I(b,0)?k=0c&&(g=-g),g=(0>b?-1:1)*g+a,k=h*(g-a)+n),this.Mh(d),this.cl(g,k)):this.Mh(d),this.Mh(e)));return!0}; -function Fo(a,b){Math.abs(b.x-a.x)>Math.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} -U.prototype.getLinkPointFromPoint=function(a,b,c,d,e,g){void 0===g&&(g=new x);if(null===a||null===b)return g.assign(c),g;a.Ja()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var h=e=0,k=0,l=0;a=null;e=b.U;null===e||e.bg()||(e=e.U);if(null===e)e=d.x,h=d.y,k=c.x,l=c.y;else{a=e.Nf;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.cp(e,h,k,l,g);null!== -a&&g.transform(a);return g};function Go(a,b){var c=b.Zr;null===c&&(c=new Ho,c.port=b,c.Cc=b.V,b.Zr=c);return Io(c,a)} -U.prototype.getLinkPoint=function(a,b,c,d,e,g,h,k){void 0===k&&(k=new x);if(c.kd())return b.qb(c,k),k;if(c.kp()&&(c=Go(this,b),null!==c)){k.assign(c.qp);if(e&&this.Wt===po){var l=Go(this,h);if(c.Mm=m.x&&a.x<=m.x+m.width?k.x=a.x:a.y>=m.y&&a.y<=m.y+m.height&&(k.y=a.y);w.B(c);w.B(l)}}return k}g=b.qb(Ob,w.M());l=c=null;this.oa>(e?6:2)?(l=d?this.n(1):this.n(this.oa-2),e&&(l=Fo(g,l.copy()))): -(c=w.M(),l=h.qb(Ob,c),e&&(l=Fo(g,l)));this.getLinkPointFromPoint(a,b,g,l,d,k);w.B(g);null!==c&&w.B(c);return k}; -U.prototype.getLinkDirection=function(a,b,c,d,e,g,h,k){a:if(d.kd())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.n(1):this.n(this.oa-2),n=g?Fo(l,n.copy()):c):(m=w.M(),n=k.qb(Ob,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.B(l);null!==m&&w.B(m)}d.ue()&&h.Uh(a)&&(c+=180,360<=c&&(c-=360));a=ao;a=e?this.$o:this.Wp;a===ao&&(a=e?b.$o:b.Wp);switch(a){case bo:b=b.ml();c+=b;360<=c&&(c-=360);break;case ao:case ll:b=b.ml();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}; -U.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.kp()&&(a=Go(this,b),null!==a))return a.Ew;a=NaN;a=d?this.ek:this.mk;null!==b&&isNaN(a)&&(a=d?b.ek:b.mk);isNaN(a)&&(a=10);return a};U.prototype.computeSpot=function(a){return a?Do(this,this.vd):Eo(this,this.le)};function Do(a,b){if(null===b)return Ob;var c=a.wb;c.Pc()&&(void 0===b&&(b=a.vd),null!==b&&(c=b.wb));return c===zc?yb:c} -function Eo(a,b){if(null===b)return Ob;var c=a.yb;c.Pc()&&(void 0===b&&(b=a.le),null!==b&&(c=b.yb));return c===zc?yb:c}U.prototype.computeOtherPoint=function(a,b){var c=b.qb(Ob),d;d=b.Zr;d=null!==d?Io(d,this):null;null!==d&&(c=d.qp);return c};U.prototype.computeShortLength=function(a){return a?Jo(this):Ko(this)};function Jo(a){var b=a.ap;isNaN(b)&&(a=a.vd,null!==a&&(b=a.ap));return isNaN(b)?0:b}function Ko(a){var b=a.Yp;isNaN(b)&&(a=a.le,null!==a&&(b=a.Yp));return isNaN(b)?0:b} -U.prototype.ck=function(a,b,c,d,e,g){if(!1===this.Cf)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=g;void 0===g&&(h=w.mh(),h.reset());h.multiply(this.transform);if(this.Lm(a,h))return Wm(this,b,c,e),void 0===g&&w.df(h),!0;if(this.zg(a,h)){var k=!1;if(!this.Wg)for(var l=this.Ca.q,m=l.length;m--;){var n=l[m];if(n.visible||n===this.hc){var p=n.ea,q=this.Ka;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=w.mh();p.set(h);if(n instanceof z)k=n.ck(a,b,c,d,e,p);else if(this.path=== -n){var k=n,r=a,s=d,q=p;if(!1===k.Cf)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,v=q;if(k.Lm(u,v))k=!0;else{if(void 0===v&&(v=k.transform,u.Vj(k.ea))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,A=w.M(),E=w.M(),B=w.M(),G=w.mh();G.set(v);G.KF(k.transform);G.nA();E.x=r;E.y=s;E.transform(G);A.x=q;A.y=s;A.transform(G);v=!1;fn(k,A,E,B)?v=!0:(A.x=r,A.y=u,A.transform(G),fn(k,A,E,B)?v=!0:(E.x=q,E.y=u,E.transform(G),fn(k,A,E,B)?v=!0:(A.x=q,A.y=s,A.transform(G),fn(k,A,E,B)&&(v=!0))));w.df(G); -w.B(A);w.B(E);w.B(B);k=v}}else k=k.Lm(r,q)}else k=ql(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&e.add(n));w.df(p)}}}void 0===g&&w.df(h);return k||null!==this.background||null!==this.el}void 0===g&&w.df(h);return!1};w.A(U,{gc:"isOrthogonal"},function(){return 2===(this.nm.value&2)});w.A(U,{Si:"isAvoiding"},function(){return 4===(this.nm.value&4)});U.prototype.computeCurve=function(){if(null===this.li){var a=this.vd,b=this.gc;this.li=null!==a&&a===this.le&&!b}return this.li?sh:this.Le}; -U.prototype.computeCorner=function(){if(this.Le===sh)return 0;var a=this.ww;if(isNaN(a)||0>a)a=10;return a};U.prototype.computeCurviness=function(){var a=this.ht;if(isNaN(a)){var b=this.of;if(0!==b){var a=10,c=this.h;null!==c&&(a=c.rp);c=Math.abs(b);a=a/2+((c-1)/2|0)*a;0===c%2&&(a=-a);0>b&&(a=-a)}else a=10}return a};U.prototype.computeThickness=function(){var a=this.path;return null!==a?Math.max(a.ib,1):1};U.prototype.hasCurviness=function(){return!isNaN(this.ht)||0!==this.of&&!this.gc}; -U.prototype.adjustPoints=function(a,b,c,d){var e=this.Eo;if(this.gc){if(e===Zl)return!1;e===$l&&(e=Yl)}switch(e){case Zl:var g=this.n(a),h=this.n(c);if(!g.L(b)||!h.L(d)){var e=g.x,g=g.y,k=h.x-e,l=h.y-g,m=Math.sqrt(k*k+l*l);if(!J.I(m,0)){var n=0;J.I(k,0)?n=0>l?-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;J.I(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.Ff(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.aa(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.Ff(c,d)}}return!0;case $l:g=this.n(a);p=this.n(c);if(!g.L(b)||!p.L(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,r=0!==l-k?(q-n)/(l-k):9E9;0!==r&&(s=Math.sqrt(1+1/(r*r)));this.Ff(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.ea.copy(),k=g.ea.copy();if(h.J()&&k.J()){h.Sf(8,8);k.Sf(8,8);h.Zi(a);k.Zi(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 x(c.x,a.y),m=new x(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.Ea(a)||h.Ea(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 x(Math.max((a.x+c.x)/2,a.x),a.y),m=new x(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.bottom)0===d&&(k.Ea(a)||h.Ea(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(0===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=a.x||a.x>=k.left&&a.x<=c.x){if(90===d||270===d)l=new x(Math.min((a.x+c.x)/2,a.x),a.y),m=new x(l.x,c.y)}else l.y=270=== -d||(0===d||180===d)&&c.ya.y||180===d&&c.xa.y||0===d&&c.x>a.x&&k.bottom>a.y)l=new x(a.x,c.y),m=new x((a.x+c.x)/2,c.y),270===d?(l.y=this.computeMidOrthoPosition(a.y,c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.yk.right)? -this.computeMidOrthoPosition(a.y,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.yk.left&&a.xh.right)270===d&&(k.Ea(a)||h.Ea(c))?l.x=this.computeMidOrthoPosition(a.x,c.x,!1):c.xa.x&&(270===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=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new x(a.x,Math.max((a.y+c.y)/2,a.y)),m=new x(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.Ea(a)||h.Ea(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 x(a.x,Math.min((a.y+c.y)/2,a.y)),m=new x(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xk&&0!==Mo(e,c.x,c.y)){No(this,e,c.x,c.y,d,!0);d=this.n(2);if(4>this.oa)0===b||180===b?(d.x=a.x,d.y=c.y):(d.x=c.x,d.y=a.y),this.aa(2,d.x,d.y),this.C(3,d.x,d.y);else if(c=this.n(3),0===b|| -180===b)J.I(d.x,c.x)?(b=0===b?Math.max(d.x,a.x):Math.min(d.x,a.x),this.aa(2,b,a.y),this.aa(3,b,c.y)):J.I(d.y,c.y)?(Math.abs(a.y-d.y)<=e.Gm/2&&(this.aa(2,d.x,a.y),this.aa(3,c.x,a.y)),this.C(2,d.x,a.y)):this.aa(2,a.x,d.y);else if(90===b||270===b)J.I(d.y,c.y)?(b=90===b?Math.max(d.y,a.y):Math.min(d.y,a.y),this.aa(2,a.x,b),this.aa(3,c.x,b)):J.I(d.x,c.x)?(Math.abs(a.x-d.x)<=e.Hm/2&&(this.aa(2,a.x,d.y),this.aa(3,a.x,c.y)),this.C(2,a.x,d.y)):this.aa(2,d.x,a.y);a=!0}else a=!1}else a=!1;a||(this.Mh(l),this.Mh(m))}}; -U.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2};function ng(a){if(!a.Si)return!1;var b=a.points.q,c=b.length;if(4>c)return!1;a=Nk(a.h,!0,a.Va,null);for(var d=1;da){var b=new ed(fd),c=new gd(0,0);b.pb.add(c);return b}var d=!1,b=this.h;null!==b&&0!==b.ka.Ve&&Ao(this)&&(d=!0);var c=b=0,e=this.n(0).copy(),g=e.copy(),b=this.Vc.q,h=this.computeCurve();if(h===sh&&3<=a&&!J.rb(this.kn,0))if(3===a)var k=this.n(1),b=Math.min(e.x,k.x),c=Math.min(e.y,k.y),k=this.n(2),b=Math.min(b,k.x),c=Math.min(c,k.y);else{if(this.gc)for(k=0;k=a&& -(k=a-1),b=this.n(k),g.x=Math.min(b.x,g.x),g.y=Math.min(b.y,g.y);b=g.x;c=g.y}else{for(k=0;kA?r>q?(u.x=E-G,u.y=q-G,v.x=E+s,v.y=q+s):(u.x= -E-G,u.y=q+G,v.x=E+s,v.y=q-s):r>q?(u.x=E+G,u.y=q-G,v.x=E-s,v.y=q+s):(u.x=E+G,u.y=q+G,v.x=E-s,v.y=q-s));J.rb(A,E)&&J.rb(q,r)&&(q>p?(B>E?(u.x=E-G,u.y=q-G,v.x=E+s):(u.x=E+G,u.y=q-G,v.x=E-s),v.y=q+s):(B>E?(u.x=E-G,u.y=q+G,v.x=E+s):(u.x=E+G,u.y=q+G,v.x=E-s),v.y=q-s));if(J.rb(A,E)&&J.rb(E,B)||J.rb(p,q)&&J.rb(q,r))A=.5*(A+B),p=.5*(p+r),u.x=A,u.y=p,v.x=A,v.y=p;1===k?(e.x=.5*(d.x+m.x),e.y=.5*(d.y+m.y)):2===k&&J.rb(d.x,this.n(0).x)&&J.rb(d.y,this.n(0).y)&&(e.x=.5*(d.x+m.x),e.y=.5*(d.y+m.y));N(l,e.x-b,e.y-c, -h.x-b,h.y-c,m.x-b,m.y-c);g.set(h);e.set(a);d=m}}k=d.x;d=d.y;g=this.n(this.oa-1);k=.5*(k+g.x);d=.5*(d+g.y);N(l,a.x-b,a.y-c,k-b,d-c,g.x-b,g.y-c)}else for(k=3;k=a&&(k=a-1),g=this.n(k-1),e=this.n(k),k===a-1&&0!==Ko(this)&&(e=e.copy(),Oo(this,e,!1,J.nk)),N(l,d.x-b,d.y-c,g.x-b,g.y-c,e.x-b,e.y-c);else{g=w.M();g.assign(this.n(0));for(k=1;k=a-1){g!==u&&(0!==Ko(this)&&(u=u.copy(),Oo(this,u,!1,J.nk)),Ro(this,l,-b,-c,g,u,d));break}k=Po(this,u, -k+1,kn.x?u.x-s:u.x+s,G=v.y>u.y?u.y+E:u.y-E,Ro(this,e,h,m,n,new x(q,B),p),yd(e,u.x+h,u.y+m,r+h,G+m),A.o(r,G))):J.I(n.x,u.x)&&J.I(u.y,v.y)?(s=this.computeCorner(),E=Math.min(s,Math.abs(u.y-n.y)/2),E=s=Math.min(E,Math.abs(v.x-u.x)/2),J.I(s,0)?(Ro(this,e,h,m,n,u,p),A.assign(u)): -(q=u.x,G=B=u.y,B=u.y>n.y?u.y-E:u.y+E,r=v.x>u.x?u.x+s:u.x-s,Ro(this,e,h,m,n,new x(q,B),p),yd(e,u.x+h,u.y+m,r+h,G+m),A.o(r,G))):(Ro(this,e,h,m,n,u,p),A.assign(u))}w.B(g)}b=l.s;w.v(l)}return b};function Qo(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return J.rb(a,0)?b:J.rb(b,0)?a:Math.sqrt(a*a+b*b)} -function Oo(a,b,c,d){var e=a.oa;if(!(2>e))if(c){var g=a.n(1);c=g.x-d.x;d=g.y-d.y;g=Qo(b.x,b.y,c,d);0!==g&&(e=2===e?.5*g:g,a=Jo(a),a>e&&(a=e),c=a*(c-b.x)/g,a=a*(d-b.y)/g,b.x+=c,b.y+=a)}else g=a.n(e-2),c=g.x-d.x,d=g.y-d.y,g=Qo(b.x,b.y,c,d),0!==g&&(e=2===e?.5*g:g,a=Ko(a),a>e&&(a=e),c=a*(b.x-c)/g,a=a*(b.y-d)/g,b.x-=c,b.y-=a)} -function Po(a,b,c,d){for(var e=a.oa,g=b;J.rb(b.x,g.x)&&J.rb(b.y,g.y);){if(c>=e)return e-1;g=a.n(c++)}if(!J.rb(b.x,g.x)&&!J.rb(b.y,g.y))return c-1;for(var h=g;J.rb(b.x,g.x)&&J.rb(g.x,h.x)&&(!d||(b.y>=g.y?g.y>=h.y:g.y<=h.y))||J.rb(b.y,g.y)&&J.rb(g.y,h.y)&&(!d||(b.x>=g.x?g.x>=h.x:g.x<=h.x));){if(c>=e)return e-1;h=a.n(c++)}return c-2} -function Ro(a,b,c,d,e,g,h){if(!h&&Ao(a)){h=[];var k=0;a.Ja()&&(k=So(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.Le===ih?L(b,n,p,!1,!1):N(b,l,q,n,q,n,p)}else if(J.I(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.Le===ih?L(b,n,p,!1,!1):N(b,q,l,q,p,n,p)}}b.lineTo(g.x+c,g.y+d)} -function So(a,b,c,d){var e=a.h;if(null===e||b.L(c))return 0;for(e=e.hx;e.next();){var g=e.value;if(null!==g&&g.visible)for(var g=g.Hb.q,h=g.length,k=0;kh.x&&n.x>m.x||m.xh.y&&n.y>m.y||m.yu&&Math.min(h,A)q&&!J.I(h,A)){n.x=u;n.y=q;n=!0;break a}}else if(!J.I(q,s)&&J.I(h,A)&&Math.min(q, -s)h&&Math.min(u,v)p&&!J.I(u,v)){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.B(k)}w.A(U,{qt:"firstPickIndex"},function(){return 2>=this.oa?0:this.gc||Do(this)!==yb?1:0});w.A(U,{ex:"lastPickIndex"},function(){var a=this.oa;return 0===a?0:2>=a?a-1:this.gc||Eo(this)!==yb?a-2:a-1});function Ao(a){a=a.Le;return a===hh||a===ih}function Co(a,b){if(b||Ao(a)){var c=a.h;null===c||c.Tl.contains(a)||null===a.iz||c.Tl.add(a,a.iz)}} -function kh(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Ac){var d=c.h;if(null!==d)for(var e=!1,d=d.hx;d.next();){var g=d.value;if(g.visible)if(g===c)for(var e=!0,h=!1,g=g.Hb.q,k=g.length,l=0;lb.links.count)1===b.links.count&&(c=b.links.q[0],c.yn=null,c.of=0,c.$b()),c=b.Fp,null!==b&&null!==c.oh&&c.oh.remove(b),c=b.Kt,null!==b&&null!==c.oh&&c.oh.remove(b);else for(c=Math.abs(c),a=0===c%2,b=b.links.k;b.next();){var d=b.value,e=Math.abs(d.of),g=0===e%2;e>c&&a===g&&(d.of=0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.jg=Math.floor((a.x-this.me)/this.me)*this.me;this.kg=Math.floor((b-this.ne)/this.ne)*this.ne;this.vr=Math.ceil((c+2*this.me)/this.me)*this.me;this.wr=Math.ceil((d+2*this.ne)/this.ne)*this.ne;a=1+(Math.ceil((this.vr-this.jg)/this.me)|0);b=1+(Math.ceil((this.wr-this.kg)/this.ne)|0);if(null===this.uc||this.Aothis.vr||a+cthis.wr||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.Ao)|0;for(c=Math.min(b+e-1,this.Bo)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.uc[a][e])return!1;return!0}; -function Wo(a,b,c,d,e,g,h,k,l){if(!(bh||cl)){var m,n;m=b|0;n=c|0;var p=a.uc[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.uc[m][n]);)a.uc[m][n]=p,p+=1,e?n+=d:m+=d;m=e?n:m;if(e)if(0m;c+=d)Wo(a,b,c,1,!e,g,h,k,l),Wo(a,b,c,-1,!e,g,h,k,l);else if(0m;b+=d)Wo(a,b,c,1,!e,g,h,k,l),Wo(a,b,c,-1,!e,g,h, -k,l)}}function Xo(a,b,c,d,e,g,h,k,l,m,n){for(var p=b|0,q=c|0,r=a.uc[p][q];0===r&&p>k&&pm&&q=Math.abs(p-d)&&1>=Math.abs(q-e))return a.abort=!0,0;p=b|0;q=c|0;r=a.uc[p][q];b=1;for(a.uc[p][q]=b;0===r&&p>k&&pm&&q=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=g.x;b=g.y;d=g.x+g.width;var p=g.y+g.height,n=n-a.jg,n=n/a.me;b-=a.kg;b/=a.ne;d-=a.jg;d/=a.me;p-=a.kg;p/=a.ne;g=Math.max(0,Math.min(a.Ao,n|0));d=Math.min(a.Ao,Math.max(0,d|0));b=Math.max(0,Math.min(a.Bo,b|0));var p=Math.min(a.Bo,Math.max(0,p|0)),h=h|0,k=k|0,l=l|0, -m=m|0,n=h,q=k,r=0===c||90===c?1:-1;(c=90===c||270===c)?q=Xo(a,h,k,l,m,r,c,g,d,b,p):n=Xo(a,h,k,l,m,r,c,g,d,b,p);if(!a.abort){a:{c=0===e||90===e?1:-1;e=90===e||270===e;for(var r=l|0,s=m|0,u=a.uc[r][s];0===u&&r>g&&rb&&s=Math.abs(r-h)&&1>=Math.abs(s-k)){a.abort=!0;break a}r=l|0;s=m|0;u=a.uc[r][s];for(a.uc[r][s]=999999;0===u&&r>g&&rb&&s=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case w.Jc|w.ad:return c>a&&c<=180+a?180:270;case w.ad|w.Tc:return c>180-a&&c<=360-a?270:0;case w.Tc|w.Sc:return c>a&&c<=180+a?90:0;case w.Sc|w.Jc:return c>180-a&&c<=360-a?180:90;case w.Jc|w.ad|w.Tc:return 90180+a&&c<=360- -a?270:0;case w.ad|w.Tc|w.Sc:return 180a&&180>=c?90:0;case w.Tc|w.Sc|w.Jc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case w.Sc|w.Jc|w.ad:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(w.Jc|w.ad|w.Tc|w.Sc)&&(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} -function Io(a,b){var c=a.Eg;if(0===c.length){a:if(!a.Ep){c=a.Ep;a.Ep=!0;var d,e=null,g=a.Cc,g=g instanceof T?g:null;if(null===g||g.Ld)d=a.Cc.GE(a.port.wd);else{if(!g.ea.J()){a.Ep=c;break a}e=g;d=e.FE()}var h=a.Eg.length=0,k=a.port.qb(Ab,w.M()),l=a.port.qb(Wb,w.M()),g=w.lk(k.x,k.y,0,0);g.Zi(l);w.B(k);w.B(l);k=w.ic(g.x+g.width/2,g.y+g.height/2);for(d=d.k;d.next();)if(l=d.value,l.Ja()){var m=yb,n=l.vd===a.port||l.Z.Uh(e),m=n?Do(l,a.port):Eo(l,a.port);if(m.kp()&&(n=n?l.le:l.vd,null!==n)){var p=n.V;if(null!== -p){var n=l.computeOtherPoint(p,n),p=k.Pi(n),m=Yo(g,m,p,l.gc),q=0;0===m?(q=w.Tc,180Math.abs(M)?(B=Math.abs(M)/ -q,q=Math.abs(M)):B=1;break;case w.Jc:r>Math.abs(O)?(B=Math.abs(O)/r,r=Math.abs(O)):B=1;break;case w.ad:n>Math.abs(M)?(B=Math.abs(M)/n,n=Math.abs(M)):B=1;break;default:case w.Tc:p>Math.abs(O)?(B=Math.abs(O)/p,p=Math.abs(O)):B=1}E=0}var X=u.qp;if(e===co){v=u.link.computeThickness();v*=B;X.set(G);switch(A){case w.Sc:X.x=G.x+M/2+q/2-E-v/2;break;case w.Jc:X.y=G.y+O/2+r/2-E-v/2;break;case w.ad:X.x=G.x+M/2-n/2+E+v/2;break;default:case w.Tc:X.y=G.y+O/2-p/2+E+v/2}E+=v}else v=.5,e===$n&&(v=(u.ep+1)/(u.Mm+1)), -X.x=G.x+M*v,X.y=G.y+O*v}w.B(k);w.B(d);w.B(l);w.B(m);G=a.Eg;for(M=0;Mb.he?1:a.angleb.angle?1:0}; -Ho.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Cc,this.port,yb,b.vd===this.port),d=a.ep;if(0>d)return c;var e=a.Mm;if(1>=e||!b.gc)return c;var b=a.qx,g=a.qp;if(a.he===w.Jc||a.he===w.Sc)d=e-1-d;return((a=a.he===w.Jc||a.he===w.Tc)?b.ye&&(e=k.right);k.bottom>g&&(g=k.bottom)}}isFinite(c)&&isFinite(d)?a.o(c,d,e-c,g-d):(b=b.location,c=this.padding,a.o(b.x+c.left,b.y+c.top,0,0));return a}; -w.g(xh,"padding",xh.prototype.padding); -w.defineProperty(xh,{padding:"padding"},function(){return this.$e},function(a){"number"===typeof a?((isNaN(a)||0>a)&&w.la(a,">= 0",xh,"padding"),a=new eb(a)):(w.l(a,eb,xh,"padding"),(isNaN(a.left)||0>a.left)&&w.la(a.left,">= 0",xh,"padding:value.left"),(isNaN(a.right)||0>a.right)&&w.la(a.right,">= 0",xh,"padding:value.right"),(isNaN(a.top)||0>a.top)&&w.la(a.top,">= 0",xh,"padding:value.top"),(isNaN(a.bottom)||0>a.bottom)&&w.la(a.bottom,">= 0",xh,"padding:value.bottom"));var b=this.$e;b.L(a)||(this.$e= -a=a.ba(),this.j("padding",b,a))});function Re(){0=c-1?(h=0,e=d,g+=k+20,k=0):h++}null!==a&&a.ae("Layout")}this.gf=!0};Re.prototype.FA=function(a){return!a.location.J()||a instanceof T&&a.cz?!0:!1}; -function bp(a,b,c,d,e,g,h,k){for(c=c.k;c.next();){var l=c.value;d&&!l.$w||null!==e&&!e(l)||!l.canLayout()||(g&&l instanceof S?l.zf||(l instanceof T?null===l.Lb?bp(a,b,l.Rc,!1,e,g,h,k):b.add(l):b.add(l)):h&&l instanceof U?b.add(l):!k||!l.Kd()||l instanceof S||b.add(l))}} -Re.prototype.collectParts=function(a){var b=new F(H);a instanceof C?(bp(this,b,a.Gg,!0,null,!0,!0,!0),bp(this,b,a.links,!0,null,!0,!0,!0),bp(this,b,a.hk,!0,null,!0,!0,!0)):a instanceof T?bp(this,b,a.Rc,!1,null,!0,!0,!0):bp(this,b,a.k,!1,null,!0,!0,!0);return b};w.g(Re,"arrangementOrigin",Re.prototype.Gd);w.defineProperty(Re,{Gd:"arrangementOrigin"},function(){return this.hq},function(a){w.l(a,x,Re,"arrangementOrigin");this.hq.L(a)||(this.hq.assign(a),this.K())}); -Re.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.qb(Ab),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a};function ta(){w.jc(this);this.Td=null;this.clear()}w.ja("LayoutNetwork",ta); -ta.prototype.clear=function(){if(this.vertexes)for(var a=this.vertexes.k;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.k;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new F(ua);this.edges=new F(va);this.IA=new ia(S,ua);this.zA=new ia(U,va)}; -ta.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Lb?"("+this.Lb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0}; -ua.smartComparer=function(a,b){t&&w.l(a,ua,ua,"smartComparer:m");t&&w.l(b,ua,ua,"smartComparer:n");if(null!==a){if(null!==b){var c=a.od,d=b.od;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);c=this.spacing.width;isFinite(c)||(c=0);a=this.spacing.height;isFinite(a)||(a=0);null!==b&&b.ac("Layout");d=[];switch(this.alignment){case im:var k= -c,l=a,m=Math.max(this.fl.width,1);if(!isFinite(m))for(var n=m=0;ng-1|| -0h)d.push(new y(0,A,h+k,B)),E=0,v=u,A+=B,B=0;B=Math.max(B,O);O=0;switch(s){case gm:O=-q.width;break;default:O=0}p.moveTo(v+O,A);switch(s){case gm:v-=G;break;default:v+=G}E++}d.push(new y(0,A,h+k,B));break;case hm:k=g;l=c;m=a;n=Math.max(this.fl.width,1);p=A=G=0;q=w.M();for(g=0;g=G&&(h-=G);for(var G=O=0,M=Math.max(this.fl.height,1),ja=p=0,V=!0,Q=w.M(),g=0;gk-1||0h){d.push(new y(0,V?E-p:E,h+l,ja+p+m));for(X=0;XG&&(e.width+=e.x-G,e.x=G)}for(k=g=h=e=0;kd?1:0}; -Zk.smartComparer=function(a,b){t&&w.l(a,H,Zk,"standardComparer:a");t&&w.l(b,H,Zk,"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.Da=0,a.Ra=0);else{var b=new D(kp);b.Zd(a.k);a=new D(kp);var c=new D(kp),d;d=this.sort(b);var e=this.Ey,g=this.lC,h=this.zd,k=this.On,l=this.Fy,m=this.Dq,b=this.Ek,n=this.DD,p=this.sg,q=this.Eu,e=this.Ge,g=this.Lt,h=this.RF;if(!isFinite(h)|| -0>=h)h=NaN;k=this.TD;if(!isFinite(k)||0>=k)k=1;l=this.lh;isFinite(l)||(l=0);m=this.Yh;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Dm&&g===Em?e=Cm:e===Dm&&g!==Em&&(g=Em,e=this.Ge);if((this.direction===pm||this.direction===qm)&&this.sorting!==om){for(var r=0;!(r>=d.length);r+=2){a.add(d.na(r));if(r+1>=d.length)break;c.add(d.na(r+1))}this.direction===pm?(this.Ge===Dm&&a.reverse(),d=new D(kp),d.Zd(a),d.Zd(c)):(this.Ge===Dm&&c.reverse(),d=new D(kp),d.Zd(c),d.Zd(a))}for(var s= -d.length,u=n=0,r=0;rm&&(0===r||r===d.length-1)&&(v/=2);n+=v;u++}if(isNaN(h)||e===Dm){isNaN(b)&&(b=6);if(e!==Cm&&e!==Dm){v=-Infinity;for(r=0;rh?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.Ey=e;this.lC=g;this.zd=h;this.On=k;this.Fy=l;this.Dq=m;this.Ek=b;this.DD=n;this.sg=p;this.Eu=q;b=d;d=this.Ey;e=this.zd;g=this.Fy;k=this.Dq;l=this.Ek;m=this.sg;n=this.Eu;if(this.direction!==pm&&this.direction!==qm||d!==Dm)if(this.direction===pm||this.direction===qm){h=0;switch(d){case Bm:h=180*op(this,e,m,g,n)/Math.PI;break;case Cm:n=b=0;h=a.first();null!==h&&(b=lp(h,Math.PI/2));h=c.first();null!==h&&(n=lp(h,Math.PI/2));h=180*op(this,e,m,g,l+(b+ -n)/2)/Math.PI;break;case Am:h=k/b.length}if(this.direction===pm){switch(d){case Bm:pp(this,a,g,zm);break;case Cm:qp(this,a,g,zm);break;case Am:rp(this,a,k/2,g,zm)}switch(d){case Bm:pp(this,c,g+h,rm);break;case Cm:qp(this,c,g+h,rm);break;case Am:rp(this,c,k/2,g+h,rm)}}else{switch(d){case Bm:pp(this,c,g,zm);break;case Cm:qp(this,c,g,zm);break;case Am:rp(this,c,k/2,g,zm)}switch(d){case Bm:pp(this,a,g+h,rm);break;case Cm:qp(this,a,g+h,rm);break;case Am:rp(this,a,k/2,g+h,rm)}}}else switch(d){case Bm:pp(this, -b,g,this.direction);break;case Cm:qp(this,b,g,this.direction);break;case Am:rp(this,b,k,g,this.direction);break;case Dm:sp(this,b,k,g,this.direction)}else sp(this,b,k,g-k/2,rm)}this.updateParts();this.network=null;this.gf=!0}; -function rp(a,b,c,d,e){var g=a.Dq,h=a.zd;a=a.sg;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;lc){for(g=d+(e===rm?g:-g);0>g;)g+=360;g%=360;180=n.length-1)break;vp(a,l,m,n,p,e,g)||wp(a,l,m,n,p,e,g);l=g.x;m=g.y}w.B(g);a.km++;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.km?a.zd-h/(2*Math.PI):5>n.length&&10=p.length-1)break;vp(a,l,m,p,q,e,n)||wp(a,l,m,p,q,e,n);l=n.x;m=n.y}w.B(n);a.km++;if(!(23a.km?a.zd-g/(2*Math.PI):a.zd-(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 wp(a,b,c,d,e,g,h){var k=a.zd,l=a.sg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.Ek;d=!1;if(0<=b!==(g===rm)){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}jm.prototype.commitLayout=function(){this.commitNodes();this.Bt&&this.commitLinks()}; -jm.prototype.commitNodes=function(){for(var a=this.EH,b=this.network.vertexes.k;b.next();){var c=b.value;c.x+=a.x;c.y+=a.y;c.commit()}};jm.prototype.commitLinks=function(){for(var a=this.network.edges.k;a.next();)a.value.commit()}; -function np(a,b,c,d,e){var g=a.wH;if(.001>Math.abs(a.On-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 mp(a,b,c,d,e){var g=0,g=void 0!==d&&void 0!==e?np(a,1,c,d,e):np(a,1,c);return b/g} -function op(a,b,c,d,e){if(.001>Math.abs(a.On-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}} -jm.prototype.sort=function(a){switch(this.sorting){case mm:break;case nm:a.reverse();break;case km:a.sort(this.comparer);break;case lm:a.sort(this.comparer);a.reverse();break;case om:for(var b=[],c=0;ce&&(e=k,g=h)}else for(h=0;he&&(e=k,g=h);d.add(a.na(g));b[g]=-1;g=a.na(g);e=0;for(h=g.rc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&& -b[e]++;for(g=g.fc;g.next();)e=a.indexOf(g.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(b=0;ba[b].indexOf(l)&&a[b].push(l);for(c=h.rc;c.next();)l=d.indexOf(c.value.fromVertex),l!==b&&0>a[b].indexOf(l)&&a[b].push(l)}h=[];for(b=0;ba[c[p]].indexOf(c[p===c.length-1?0:p+1])&&u.push(p===c.length-1?0:p+1);if(0===u.length)for(p=0;pO.indexOf(V)||QO.indexOf(V)|| -Q=v?l+1:l)),E+=l=v&&l++,G>=v&&G++,l>G&&(O=G,G=l,l=O),G-l<(c.length+2)/2===(lq||q===l||(s=q>l?q-l:l-q,p+=qm-s?1:-1);c.splice(0>p?l:l+1,0,b);e.splice(h,1);h--}else k=!1;if(k)break;else c.push(e[0]),e.splice(0,1)}for(b=0;b=a?a:360,this.K())});w.g(jm,"arrangement",jm.prototype.Ge); -w.defineProperty(jm,{Ge:"arrangement"},function(){return this.bd},function(a){this.bd!==a&&(w.za(a,jm,jm,"arrangement"),a===Dm||a===Cm||a===Bm||a===Am)&&(this.bd=a,this.K())});w.g(jm,"direction",jm.prototype.direction);w.defineProperty(jm,{direction:"direction"},function(){return this.ta},function(a){this.ta!==a&&(w.za(a,jm,jm,"direction"),a===rm||a===zm||a===pm||a===qm)&&(this.ta=a,this.K())});w.g(jm,"sorting",jm.prototype.sorting); -w.defineProperty(jm,{sorting:"sorting"},function(){return this.Ih},function(a){this.Ih!==a&&(w.za(a,jm,jm,"sorting"),a===mm||a===nm||a===km||lm||a===om)&&(this.Ih=a,this.K())});w.g(jm,"comparer",jm.prototype.comparer);w.defineProperty(jm,{comparer:"comparer"},function(){return this.qh},function(a){this.qh!==a&&(w.i(a,"function",jm,"comparer"),this.qh=a,this.K())});w.g(jm,"spacing",jm.prototype.spacing); -w.defineProperty(jm,{spacing:"spacing"},function(){return this.Jh},function(a){this.Jh!==a&&(w.i(a,"number",jm,"spacing"),this.Jh=a,this.K())});w.g(jm,"nodeDiameterFormula",jm.prototype.Lt);w.defineProperty(jm,{Lt:"nodeDiameterFormula"},function(){return this.Mr},function(a){this.Mr!==a&&(w.za(a,jm,jm,"nodeDiameterFormula"),a===Fm||a===Em)&&(this.Mr=a,this.K())});w.A(jm,{FH:"actualXRadius"},function(){return this.zd});w.A(jm,{GH:"actualYRadius"},function(){return this.sg}); -w.A(jm,{hK:"actualSpacing"},function(){return this.Ek});w.A(jm,{EH:"actualCenter"},function(){return isNaN(this.Gd.x)||isNaN(this.Gd.y)?new x(0,0):new x(this.Gd.x+this.FH,this.Gd.y+this.GH)});var Cm;jm.ConstantSpacing=Cm=w.w(jm,"ConstantSpacing",0);var Bm;jm.ConstantDistance=Bm=w.w(jm,"ConstantDistance",1);var Am;jm.ConstantAngle=Am=w.w(jm,"ConstantAngle",2);var Dm;jm.Packed=Dm=w.w(jm,"Packed",3);var rm;jm.Clockwise=rm=w.w(jm,"Clockwise",4);var zm; -jm.Counterclockwise=zm=w.w(jm,"Counterclockwise",5);var pm;jm.BidirectionalLeft=pm=w.w(jm,"BidirectionalLeft",6);var qm;jm.BidirectionalRight=qm=w.w(jm,"BidirectionalRight",7);var mm;jm.Forwards=mm=w.w(jm,"Forwards",8);var nm;jm.Reverse=nm=w.w(jm,"Reverse",9);var km;jm.Ascending=km=w.w(jm,"Ascending",10);var lm;jm.Descending=lm=w.w(jm,"Descending",11);var om;jm.Optimized=om=w.w(jm,"Optimized",12);var Fm;jm.Pythagorean=Fm=w.w(jm,"Pythagorean",13);var Em;jm.Circular=Em=w.w(jm,"Circular",14); -function ip(){this.bp=-Infinity;this.Zp=this.nn=null}ip.prototype.compare=function(a,b){if(0this.bp||Math.abs(a)a&&0g?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new x(n.x+n.width+d.width,n.y),l[1]=new x(n.x,n.y+n.height+d.height),g=2):(p=Bp(l,g, -e,k,n.width,n.height,d),q=l[p],r=new x(q.x+n.width+d.width,q.y),s=new x(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().kb,d=this.network.vertexes.k;d.next();){if(d.value.kb.zg(c)&&(a++,2a.network.vertexes.count)return!1;null===a.rg?a.rg=new D(Hp):a.rg.clear();a.rg.Zd(a.network.vertexes);var c=a.rg;c.sort(function(a,b){return null===a||null===b||a===b?0:b.Xf-a.Xf});for(var d=c.count-1;0<=d&&1>=c.na(d).Xf;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=J.sqrt((m+s+n*n*4/(h*h))/s);h=(m-1)*p/2;m=(m-1)*q/2;g.kb=new y(l-r.x-h,k-r.y-m,p+2*h,q+2*m);g.focus=new x(r.x+h,r.y+m)}a.network=d;return c} -function Gp(a,b,c){t&&(w.l(b,zp,yp,"popNetwork:oldnet"),w.p(c,yp,"popNetwork:level"));for(c=a.network.vertexes.k;c.next();){var d=c.value;d.network=b;if(null!==d.jh){var e=d.jh.na(d.aB);d.Xf=e.Qx;var g=e.xB,h=e.yB;d.kb=new y(d.Da-g,d.Ra-h,e.Tx,e.Px);d.focus=new x(g,h);d.aB--}}for(c=a.network.edges.k;c.next();)c.value.network=b;a.network=b} -function Ip(a,b,c){t&&(w.l(b,Hp,yp,"surroundNode:oldnet"),w.p(c,yp,"surroundNode:level"));var d=b.Km;if(null!==d&&0!==d.count){c=b.Da;var e=b.Ra,g=b.width,h=b.height;null!==b.jh&&0=p.Xf?l++:(k=!0,m++,h+=Math.atan2(b.Ra-p.Ra,b.Da-p.Da))}if(0!==l)for(0>1)+m)*(0===k%2?1:-1);l.Da=c+n*Math.cos(p);l.Ra=e+n*Math.sin(p);k++}}} -function Bp(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,J.sqrt(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,J.sqrt(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.Da,e=d,g=c.Ra,h=g,c=1;ch-g)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.Da-b.Da}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.Ra-b.Ra});for(var h=a.zh,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=Kp(k,e);1>s?(n=a.Qt,null===n&&(a.Qt=n=new za(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(e.ca.right-k.ca.x),n=(1+n)*m):dr?(p=Math.abs(e.ca.bottom-k.ca.y),p=(1+p)*s):ds?(n=a.Qt,null===n&&(a.Qt=n=new za(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.zh/20,50);for(e=0;ed&&(g=d),h<-d?h=-d:h>d&&(h=d),k.Da+=g,k.Ra+=h,c=Math.max(c,g*g+h*h));return c>a.Zz*a.Zz}yp.prototype.moveFixedVertex=function(){}; -yp.prototype.commitLayout=function(){this.iB();this.commitNodes();this.Bt&&this.commitLinks()};yp.prototype.iB=function(){if(this.Dl)for(var a=this.network.edges.k;a.next();){var b=a.value.link;null!==b&&(b.wb=zc,b.yb=zc)}};yp.prototype.commitNodes=function(){var a=0,b=0;if(this.RD){var c=w.$f();this.tg(this.network,c);b=this.Gd;a=b.x-c.x;b=b.y-c.y;w.nc(c)}for(var c=w.$f(),d=this.network.vertexes.k;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.kb),c.x+=a,c.y+=b,e.kb=c;e.commit()}w.nc(c)}; -yp.prototype.commitLinks=function(){for(var a=this.network.edges.k;a.next();)a.value.commit()};yp.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Jn:a};yp.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.In:a};yp.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.Fn:a};yp.prototype.electricalFieldX=function(){return 0};yp.prototype.electricalFieldY=function(){return 0}; -yp.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Hn:a};yp.prototype.gravitationalFieldX=function(){return 0};yp.prototype.gravitationalFieldY=function(){return 0};yp.prototype.isFixed=function(a){return a.isFixed};w.A(yp,{kK:"currentIteration"},function(){return this.ir});w.g(yp,"arrangementSpacing",yp.prototype.kw);w.defineProperty(yp,{kw:"arrangementSpacing"},function(){return this.cg},function(a){w.l(a,fa,yp,"arrangementSpacing");this.cg.L(a)||(this.cg.assign(a),this.K())}); -w.g(yp,"arrangesToOrigin",yp.prototype.RD);w.defineProperty(yp,{RD:"arrangesToOrigin"},function(){return this.iq},function(a){this.iq!==a&&(w.i(a,"boolean",yp,"arrangesToOrigin"),this.iq=a,this.K())});w.g(yp,"setsPortSpots",yp.prototype.Dl);w.defineProperty(yp,{Dl:"setsPortSpots"},function(){return this.Hh},function(a){this.Hh!==a&&(w.i(a,"boolean",yp,"setsPortSpots"),this.Hh=a,this.K())});w.g(yp,"comments",yp.prototype.comments); -w.defineProperty(yp,{comments:"comments"},function(){return this.ph},function(a){this.ph!==a&&(w.i(a,"boolean",yp,"comments"),this.ph=a,this.K())});w.g(yp,"maxIterations",yp.prototype.lx);w.defineProperty(yp,{lx:"maxIterations"},function(){return this.ko},function(a){this.ko!==a&&(w.i(a,"number",yp,"maxIterations"),0<=a&&(this.ko=a,this.K()))});w.g(yp,"epsilonDistance",yp.prototype.Zz); -w.defineProperty(yp,{Zz:"epsilonDistance"},function(){return this.Fq},function(a){this.Fq!==a&&(w.i(a,"number",yp,"epsilonDistance"),0b.toVertex.index&&(this.network.vx(b),b.rev=!0);break;case Sp:for(b=this.network.vertexes.k;b.next();)a=b.value,a.So=-1,a.finish=-1;for(a=this.network.edges.k;a.next();)a.value.forest=!1;this.Hr=0;for(b.reset();b.next();)c=b.value,0===c.rc.count&&eq(this,c);for(b.reset();b.next();)c=b.value,-1===c.So&&eq(this,c);for(a.reset();a.next();)b=a.value,b.forest||(c=b.fromVertex, -d=c.finish,e=b.toVertex,g=e.finish,e.Sos&&0s&&0b[this.Jf]&&(this.pv=b[c]-1,this.Jf=c),b[c]h)for(var p=h+1;pn;p--)l=d[p],l.near===m&&l.Em===m.Em||k++;var m=0,q,r=q=p=l=0,s,u=0,v=0;s=0;var A;if(0<=c)for(n=d[h].Te,m=0;mu||l===u&&q>s)&&k++,vl||u===l&&s>q)&&k++);if(0>=c)for(n=d[h].Me,m=0;mu||l===u&&p>v)&&k++, -sl||u===l&&v>p)&&k++);g[h*e+h]=k;for(n=h+1;n=c)for(k=d[h].Me,A=d[n].Me,m=0;m=c&&(l=k.Te);var m=null;0<=c&&(m=k.Me);var n=0,p=0,q=k.near;null!==q&&q.layer===k.layer&&(n+=q.column-1,p++);if(null!==l)for(q=0;q=c&&(l=k.Te);var m=null;0<=c&&(m=k.Me);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]=n&1?p[m]:p[m-1]+p[m]>>1)}iq(a,b,d);return g}function qq(a,b,c,d,e,g){if(b.component===d){b.component=c;var h=0,k=0;if(e)for(var l=b.fc;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&qq(a,m,c,d,e,g)}if(g)for(l=b.rc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&qq(a,m,c,d,e,g)}} -function rq(a,b,c,d,e,g){if(b.component===d){b.component=c;if(e)for(var h=b.fc;h.next();)rq(a,h.value.toVertex,c,d,e,g);if(g)for(b=b.rc;b.next();)rq(a,b.value.fromVertex,c,d,e,g)}}function bq(a){for(a=a.vertexes.k;a.next();){var b=a.value;if(b.valid)return b}return null}function cq(a){for(a=a.vertexes.k;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.fc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} -function dq(a){for(a=a.vertexes.k;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.rc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function eq(a,b){b.So=a.Hr;a.Hr++;for(var c=b.fc;c.next();){var d=c.value,e=d.toVertex;-1===e.So&&(d.forest=!0,eq(a,e))}b.finish=a.Hr;a.Hr++} -Z.prototype.assignLayers=function(){switch(this.jo){case sq:tq(this);break;case uq:for(var a=0,b=this.network.vertexes.k;b.next();)a=vq(this,b.value),this.ob=Math.max(a,this.ob);for(b.reset();b.next();)a=b.value,a.layer=this.ob-a.layer;break;default:case Wp:tq(this);for(b=this.network.vertexes.k;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.rc.count&&wq(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.ob=-1;for(b.reset();b.next();){var c=b.value;c.layer-= -a;this.ob=Math.max(this.ob,c.layer)}}};function tq(a){for(var b=a.network.vertexes.k;b.next();){var c=xq(a,b.value);a.ob=Math.max(c,a.ob)}}function xq(a,b){var c=0;if(-1===b.layer){for(var d=b.fc;d.next();)var e=d.value,g=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,xq(a,g)+e);b.layer=c}else c=b.layer;return c}function vq(a,b){var c=0;if(-1===b.layer){for(var d=b.rc;d.next();)var e=d.value,g=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,vq(a,g)+e);b.layer=c}else c=b.layer;return c} -function wq(a,b){if(!b.valid){b.valid=!0;for(var c=b.fc;c.next();)wq(a,c.value.toVertex);for(c=a.network.vertexes.k;c.next();)c.value.component=-1;for(var d=b.Te.q,e=d.length,g=0;gk&&qq(a,h.fromVertex,0,-1,!0,!1)}for(qq(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.k;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.Te.q,e=s.length,g=0;gd)&&!p&&(k=m,d=n)}if(0>g){for(c.reset();c.next();)g=c.value,1===g.component&&(g.layer-=e);b.component=0}else k.component=0}}} -function gq(a,b,c){return 90===a.ta?c&&!b.rev||!c&&b.rev?270:90:180===a.ta?c&&!b.rev||!c&&b.rev?0:180:270===a.ta?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0} -Z.prototype.initializeIndices=function(){switch(this.Yn){default:case yq:for(var a=this.network.vertexes.k;a.next();){var b=a.value,c=b.layer;b.index=this.Rd[c];this.Rd[c]++}break;case Xp:a=this.network.vertexes.k;for(b=this.ob;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&zq(this,c);break;case Aq:for(a=this.network.vertexes.k,b=0;b<=this.ob;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Bq(this,c)}}; -function zq(a,b){var c=b.layer;b.index=a.Rd[c];a.Rd[c]++;for(var c=b.Me.Ue(),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=Dq(this,d,-1)||g;e=this.countCrossings();e>=a?lq(this,b):(a=e,b=kq(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Dq(this,d,1)||g;e=this.countCrossings();e>=a?lq(this,b):(a=e,b=kq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Dq(this,d,1)||g;e>=a?lq(this,b):(a=e,b=kq(this));for(g=!0;g;)for(g=!1, -d=h;d<=c;d++)g=Dq(this,d,-1)||g;e>=a?lq(this,b):(a=e,b=kq(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Dq(this,d,0)||g;e>=a?lq(this,b):(a=e,b=kq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Dq(this,d,0)||g;e>=a?lq(this,b):(a=e,b=kq(this))}break;default:case Yp:for(c=this.ob,h=0,k=a+1;(d=this.countCrossings())=h;d--)g=Dq(this,d,-1)||g;e=this.countCrossings();e>=a?lq(this,b):(a=e,b=kq(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Dq(this,d,1)||g;e=this.countCrossings(); -e>=a?lq(this,b):(a=e,b=kq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Dq(this,d,1)||g;e>=a?lq(this,b):(a=e,b=kq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Dq(this,d,-1)||g;e>=a?lq(this,b):(a=e,b=kq(this));for(g=!0;g;)for(g=!1,d=c;d>=h;d--)g=Dq(this,d,0)||g;e>=a?lq(this,b):(a=e,b=kq(this));for(g=!0;g;)for(g=!1,d=h;d<=c;d++)g=Dq(this,d,0)||g;e>=a?lq(this,b):(a=e,b=kq(this))}}lq(this,b)}; -function Cq(a,b,c){t&&(w.p(b,Z,"medianBarycenterCrossingReduction:unfixedLayer"),w.p(c,Z,"medianBarycenterCrossingReduction:direction"));var d=0,e=hq(a,b),g=a.Rd[b],h=pq(a,b,c);c=oq(a,b,c);for(d=0;dg+1&&(q+=4*(E-g),r+=4*(E-(g+1)))}G=d[g].fc.k;for(G.reset();G.next();)if(B=G.value,B.valid&&B.toVertex.layer===b){B=B.toVertex;for(E=0;d[E]!==B;)E++;E===g+1&&(r+=1)}G=d[g+1].rc.k;for(G.reset();G.next();)if(B=G.value,B.valid&&B.fromVertex.layer===b){B=B.fromVertex;for(E=0;d[E]!==B;)E++;Eg+1&&(q+=4*(E-(g+1)),r+=4*(E-g))}G=d[g+1].fc.k;for(G.reset();G.next();)if(B=G.value, -B.valid&&B.toVertex.layer===b){B=B.toVertex;for(E=0;d[E]!==B;)E++;E===g&&(q+=1)}var E=B=0,G=h[d[g].index],O=k[d[g].index],M=h[d[g+1].index],X=k[d[g+1].index];-1!==G&&(B+=Math.abs(G-s),E+=Math.abs(G-A));-1!==O&&(B+=Math.abs(O-s),E+=Math.abs(O-A));-1!==M&&(B+=Math.abs(M-u),E+=Math.abs(M-v));-1!==X&&(B+=Math.abs(X-u),E+=Math.abs(X-v));if(r>1)+8*d;this.Kb*=8}if(0!==(this.wi&Hq))for(b=!0;b;){b=!1;for(a=this.Jf+1;a<=this.ob;a++)b=Iq(this,a,1)||b;for(a= -this.Jf-1;0<=a;a--)b=Iq(this,a,-1)||b;b=Iq(this,this.Jf,0)||b}if(0!==(this.wi&Jq)){for(a=this.Jf+1;a<=this.ob;a++)Kq(this,a,1);for(a=this.Jf-1;0<=a;a--)Kq(this,a,-1);Kq(this,this.Jf,0)}c&&(Lq(this,-1),Lq(this,1));if(0!==(this.wi&Hq))for(b=!0;b;){b=!1;b=Iq(this,this.Jf,0)||b;for(a=this.Jf+1;a<=this.ob;a++)b=Iq(this,a,0)||b;for(a=this.Jf-1;0<=a;a--)b=Iq(this,a,0)||b}}; -function Iq(a,b,c){t&&(w.p(b,Z,"bendStraighten:unfixedLayer"),w.p(c,Z,"bendStraighten:direction"));for(var d=!1;Mq(a,b,c);)d=!0;return d} -function Mq(a,b,c){t&&(w.p(b,Z,"shiftbendStraighten:unfixedLayer"),w.p(c,Z,"shiftbendStraighten:direction"));var d=0,e=hq(a,b),g=a.Rd[b],h=oq(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,v=0,A=0,E=0;if(0>=c)for(var B=e[d].rc.k;B.next();){var G=B.value;G.valid&&G.fromVertex.layer!==b&&(v=jq(G),A=G.portFromColOffset,E=G.portToColOffset,G=G.fromVertex.column,q+=(Math.abs(n+E-(G+A))+1)*v,s+=(Math.abs(r+E-(G+A))+1)*v,u+=(Math.abs(p+E-(G+A))+1)*v)}if(0<=c)for(B=e[d].fc.k;B.next();)G=B.value,G.valid&&G.toVertex.layer!==b&&(v=jq(G),A=G.portFromColOffset,E=G.portToColOffset,G=G.toVertex.column,q+=(Math.abs(n+A-(G+E))+1)*v,s+=(Math.abs(r+A-(G+E))+1)*v,u+=(Math.abs(p+A-(G+E))+1)*v);E=A= -v=0;B=h[e[d].index];G=k[e[d].index];-1!==B&&(v+=Math.abs(B-n),A+=Math.abs(B-r),E+=Math.abs(B-p));-1!==G&&(v+=Math.abs(G-n),A+=Math.abs(G-r),E+=Math.abs(G-p));if(s=c[d]?n=q:p<=c[d]&&(n=p));n!==k&&(h=!0,e[d].column=n)}iq(a,b,e);a.normalize()} -function Nq(a,b){t&&(w.p(b,Z,"packAux:column"),w.p(1,Z,"packAux:direction"));for(var c=!0,d=a.network.vertexes.k;d.next();){var e=d.value,g=a.nodeMinColumnSpace(e,!0),h=a.nodeMinColumnSpace(e,!1);if(e.column-g<=b&&e.column+h>=b){c=!1;break}}e=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(c.column-=1,e=!0);return e} -function Oq(a,b){t&&(w.p(b,Z,"tightPackAux:column"),w.p(1,Z,"tightPackAux:direction"));for(var c=b,c=b+1,d=0,e=[],g=[],d=0;d<=a.ob;d++)e[d]=!1,g[d]=!1;for(var h=a.network.vertexes.k;h.next();){var d=h.value,k=d.column-a.nodeMinColumnSpace(d,!0),l=d.column+a.nodeMinColumnSpace(d,!1);k<=b&&l>=b&&(e[d.layer]=!0);k<=c&&l>=c&&(g[d.layer]=!0)}k=!0;c=!1;for(d=0;d<=a.ob;d++)k=k&&!(e[d]&&g[d]);if(k)for(h.reset();h.next();)e=h.value,e.column>b&&(e.column-=1,c=!0);return c} -function Lq(a,b){t&&w.p(b,Z,"componentPack:direction");for(var c=0;c<=a.Kb;c++)for(;Nq(a,c););a.normalize();for(c=0;ce?lq(a,d):hb)for(c=a.Kb;0<=c;c--)for(d=kq(a),e=nq(a),g=e+1;ee?lq(a,d):hc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.lg);a.lg++;for(d.reset();d.next();)b=d.value,-1===b.component&&(rq(a,b,a.lg,-1,!0,!0),a.lg++);var g=0;b=[];for(g=0;gc)for(k=a.Kb;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} -Z.prototype.commitLayout=function(){if(this.Dl)for(var a=fq(this,!0),b=fq(this,!1),c=this.network.edges.k;c.next();){var d=c.value.link;null!==d&&(d.wb=a,d.yb=b)}this.commitNodes();this.Tz();this.Bt&&this.commitLinks()};function fq(a,b){return 270===a.ta?b?Ac:Dc:90===a.ta?b?Dc:Ac:180===a.ta?b?Bc:Cc:b?Cc:Bc} -Z.prototype.commitNodes=function(){this.Xg=[];this.ig=[];this.If=[];this.Ob=[];for(var a=0;a<=this.ob;a++)this.Xg[a]=0,this.ig[a]=0,this.If[a]=0,this.Ob[a]=0;for(a=this.network.vertexes.k;a.next();){var b=a.value,c=b.layer;this.Xg[c]=Math.max(this.Xg[c],this.nodeMinLayerSpace(b,!0));this.ig[c]=Math.max(this.ig[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.em,c=0;c<=this.ob;c++){var e=d;0>=this.Xg[c]+this.ig[c]&&(e=0);0=Ha.ca.y&&ic<=Ha.ca.bottom&&(Da=Ha.Da+Qf,ic=ic=Ha.ca.x&&ic<=Ha.ca.right&&(Da=Ha.Ra+Qf,ic=icEb.y&&(Sf=tg.y>Eb.y?0:uc.xlc.x&&(Tf=Sg.x>lc.x?0:Ec.yb.layer?1:a.Keb.Ke?1:a.$db.$d?1:0:0}; -Z.prototype.mG=function(a,b){return a instanceof Qq&&b instanceof Qq&&a!==b?a.firstb.first||a.Zhb.Zh||a.Keb.Ke?1:a.$db.$d?1:0:0};Z.prototype.wx=function(a,b){return a instanceof Qq&&b instanceof Qq&&a!==b?a.Ndb.Nd||a.Zhb.Zh||a.Keb.Ke?1:a.$db.$d?1:0:0};Z.prototype.I=function(a,b){t&&(w.p(a,Z,"isApprox:a"),w.p(b,Z,"isApprox:b"));var c=a-b;return-1c}; -function Rq(a,b,c,d){t&&(w.p(a,Z,"isUnoccupied2:px"),w.p(b,Z,"isUnoccupied2:py"),w.p(c,Z,"isUnoccupied2:qx"),w.p(d,Z,"isUnoccupied2:qy"));return!0}function hq(a,b){var c,d=a.Rd[b];if(d>=a.Zg.length){c=[];for(var e=0;ea&&(this.wi=a,this.K()))});w.g(Z,"setsPortSpots",Z.prototype.Dl);w.defineProperty(Z,{Dl:"setsPortSpots"},function(){return this.Hh},function(a){this.Hh!==a&&(w.i(a,"boolean",Z,"setsPortSpots"),this.Hh=a,this.K())});w.g(Z,"linkSpacing",Z.prototype.rp); -w.defineProperty(Z,{rp:"linkSpacing"},function(){return this.qj},function(a){this.qj!==a&&(w.i(a,"number",Z,"linkSpacing"),0<=a&&(this.qj=a,this.K()))});w.A(Z,{oJ:"maxLayer"},function(){return this.ob});w.A(Z,{HK:"maxIndex"},function(){return this.pv});w.A(Z,{GK:"maxColumn"},function(){return this.Kb});w.A(Z,{LK:"minIndexLayer"},function(){return this.Ar});w.A(Z,{IK:"maxIndexLayer"},function(){return this.Jf});var Sp;Z.CycleDepthFirst=Sp=w.w(Z,"CycleDepthFirst",0);var aq; -Z.CycleGreedy=aq=w.w(Z,"CycleGreedy",1);var Wp;Z.LayerOptimalLinkLength=Wp=w.w(Z,"LayerOptimalLinkLength",0);var sq;Z.LayerLongestPathSink=sq=w.w(Z,"LayerLongestPathSink",1);var uq;Z.LayerLongestPathSource=uq=w.w(Z,"LayerLongestPathSource",2);var Xp;Z.InitDepthFirstOut=Xp=w.w(Z,"InitDepthFirstOut",0);var Aq;Z.InitDepthFirstIn=Aq=w.w(Z,"InitDepthFirstIn",1);var yq;Z.InitNaive=yq=w.w(Z,"InitNaive",2);var Eq;Z.AggressiveNone=Eq=w.w(Z,"AggressiveNone",0);var Yp; -Z.AggressiveLess=Yp=w.w(Z,"AggressiveLess",1);var Fq;Z.AggressiveMore=Fq=w.w(Z,"AggressiveMore",2);Z.PackNone=0;var Gq;Z.PackExpand=Gq=1;var Hq;Z.PackStraighten=Hq=2;var Jq;Z.PackMedian=Jq=4;var Zp;Z.PackAll=Zp=7;function Qq(){this.index=this.$d=this.Ke=this.Nd=this.first=this.layer=0;this.link=null;this.Zh=0}w.be(Qq,{layer:!0,first:!0,Nd:!0,Ke:!0,$d:!0,index:!0,link:!0,Zh:!0});function $p(){ta.call(this)}w.Ia($p,ta);w.ja("LayeredDigraphNetwork",$p);$p.prototype.createVertex=function(){return new Sq}; -$p.prototype.createEdge=function(){return new Tq};function Sq(){ua.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.So=NaN;this.Em=0;this.GA=this.HA=null}w.Ia(Sq,ua);w.ja("LayeredDigraphVertex",Sq);function Tq(){va.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}w.Ia(Tq,va);w.ja("LayeredDigraphEdge",Tq); -function Y(){0b.level)return!1;a.removeChild(c.parent,c)}return!0} -Y.prototype.removeChild=function(a,b){if(null!==a&&null!==b){t&&w.l(a,Zq,Y,"removeChild:p");t&&w.l(b,Zq,Y,"removeChild:c");for(var c=a.children,d=0,e=0;eg?Hr(a,k,Aa,B,G):Ir(a,k,Aa,B,G);Aa=V.x;B=V.width;G=V.height;break;case vr:for(m=0;ms&&(QDa&&(Nr(a,-Da,0,Wa,m-1),Or(M,-Da,0),Or(X,-Da,0),Da=0)}n.ma.o(Da,ca);B=Math.max(B,ja);G=Math.max(G,O+(0===Pa?0:A)+Ma.height);Q=ja}else{0s&&(caDa&&(Nr(a,0,-Da,Wa,m-1),Or(M,0,-Da),Or(X,0,-Da),Da=0);n.ma.o(Q,Da);G=Math.max(G,V);B=Math.max(B,O+(0===Pa?0:A)+Ma.width);ca=V}Ha++}0< -Pa&&(b?(G+=Math.max(0,c),Qh&&(h=0),135q&&(q=0),p===wr&&(l+=u/2+a.O.y),k+=d+c):b?(null===a.comments?d>B&&(p=Sr(p,d-B,0),k=p.x,l=p.y,B=d,h=0):B=Qr(a,B,h),0>h&&(k-=h,h=0),135G&&(p=Sr(p,0,e-G),k=p.x,l=p.y,G=e,q=0):G=Rr(a,G,q),0>q&&(l-=q,q=0),k+=d+c);if(0g[0].x?g[2].assign(g[1]):g[1].assign(g[2])),g[3].yg[0].x?g[3].assign(g[2]):g[2].assign(g[3])),p[0].o(h+d,0),p[1].o(p[0].x,e),p[2].yg[0].y?g[2].assign(g[1]):g[1].assign(g[2])),g[3].xg[0].y?g[3].assign(g[2]):g[2].assign(g[3])),p[0].o(0,q+e),p[1].o(d,p[0].y),p[2].xc?Hr(b,e,Ha,O,M):Ir(b,e,Ha,O,M);Ha=M.x;O=M.width;M=M.height;break;case vr:for(k=0;kr&&(jar&&(Vp&&(p=0),135B&&(B=0));b.La.o(p,B);b.cb.o(O,M)}} -function Hr(a,b,c,d,e){t&&w.l(a,Zq,Y,"layoutBusChildrenPosDir:v");var g=b.length;if(0===g)return new y(c,0,d,e);if(1===g){var h=b[0];d=h.cb.width;e=h.cb.height;return new y(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===Cr(a),n=0,p=0,q=0,r=0;rm&&(d-=m),e=Math.max(e,Math.max(E,q)+b+s.height),0>h.ma.x&&(c=as(a,h.ma.x,!1,c,k))):(h.ma.o(d+b,c+k/2-h.O.y-h.La.y),d=Math.max(d,Math.max(A,p)+b+s.width),m=c+k/2-h.O.y-h.La.y,e=Math.max(e,m+s.height),0>m&&(e-=m),0>h.ma.y&&(c=as(a,h.ma.y,!0,c,k))));return new y(c,0,d,e)} -function Ir(a,b,c,d,e){t&&w.l(a,Zq,Y,"layoutBusChildrenNegDir:v");var g=b.length;if(0===g)return new y(c,0,d,e);if(1===g){var h=b[0];d=h.cb.width;e=h.cb.height;return new y(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===Cr(a),n=0,p=0,q=0,r=0;rp&&(d-=p),e=Math.max(e,Math.abs(Math.min(E,q))+l+s.height),0>h.ma.x&&(c=as(a,h.ma.x,!1,c,k))):(h.ma.o(-d-s.width-l,c+k/2-h.O.y-h.La.y),d=Math.max(d,Math.abs(Math.min(A,p))+l+s.width),p=c+k/2-h.O.y-h.La.y,e=Math.max(e,p+s.height),0>p&&(e-=p),0>h.ma.y&&(c=as(a,h.ma.y,!0,c,k))));for(r=0;rd&&(d=c+a.width);0>c&&(d-=c);return d;case Dr:return a.width>b?a.width:b;case Er:return 2*a.O.x>b?a.width:b+a.width-2*a.O.x;case ur:case jr:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case vr:return a.width-a.O.x+a.nodeSpacing/2+b;case wr:return Math.max(a.width,a.O.x+a.nodeSpacing/2+b);default:return b}} -function Rr(a,b,c){t&&w.l(a,Zq,Y,"calculateSubheight:v");switch(a.alignment){case sr:case Pr:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case Dr:return a.height>b?a.height:b;case Er:return 2*a.O.y>b?a.height:b+a.height-2*a.O.y;case ur:case jr:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case vr:return a.height-a.O.y+a.nodeSpacing/2+b;case wr:return Math.max(a.height,a.O.y+a.nodeSpacing/2+b);default:return b}} -function Sr(a,b,c){t&&w.l(a,ba,Y,"alignOffset:align");switch(a){case Pr:b/=2;c/=2;break;case sr:b/=2;c/=2;break;case Dr:c=b=0;break;case Er:break;default:w.m("Unhandled alignment value "+a.toString())}return new x(b,c)}function Kr(a,b,c,d,e,g){t&&w.l(a,Zq,Y,"shiftRelPosAlign:v");t&&w.l(b,ba,Y,"shiftRelPosAlign:align");b=Sr(b,c,d);Nr(a,b.x,b.y,e,g)}function Nr(a,b,c,d,e){t&&w.l(a,Zq,Y,"shiftRelPos:v");if(0!==b||0!==c)for(a=a.children;d<=e;d++){var g=a[d].ma;g.x+=b;g.y+=c}} -function Lr(a,b,c,d){t&&(w.l(b,Zq,Y,"recordMidPoints:v"),w.i(c,"number",Y,"recordMidPoints:x"),w.i(d,"number",Y,"recordMidPoints:y"));var e=b.parent;switch(a.Hf){case Vq:for(a=b.rc;a.next();)b=a.value,b.fromVertex===e&&b.cs.o(c,d);break;case br:for(a=b.fc;a.next();)b=a.value,b.toVertex===e&&b.cs.o(c,d);break;default:w.m("Unhandled path value "+a.Hf.toString())}}function Or(a,b,c){for(var d=0;dp.length||null===q||2>q.length))for(m= -l=0;lv&&e.ye.y&&vb.length||null===l||2>l.length)d=null;else{n=Jr(a,b.length+l.length);for(d=g=e=0;ge;)v=l[g++],n[d++].o(v.x+m,v.y);l=Jr(a,d);for(e=0;ep.length||null===g||2>g.length)e=null;else{n=Jr(a,p.length+g.length);for(m=A=l=0;lg;)e=p[l++], -n[m++].o(e.x,e.y);e=Jr(a,m);for(l=0;lp.length||null===q||2>q.length))for(m=l=0;lg&&e.xe.x&&gb.length||null===l||2>l.length)d=null;else{n=Jr(a,b.length+l.length);for(d=g=e=0;ge;)v=l[g++],n[d++].o(v.x,v.y+m);l=Jr(a,d);for(e=0;ep.length||null===g||2>g.length)e=null;else{n=Jr(a,p.length+g.length);for(m=A=l=0;lg;)e=p[l++],n[m++].o(e.x,e.y);e=Jr(a,m);for(l=0;l=a?0:135>=a?90:225>=a?180:315>=a?270:0} -function Fr(a){t&&w.l(a,Zq,Y,"computeLayerSpacing:v");var b=Cr(a),b=90===b||270===b,c=a.layerSpacing;if(0=a&&(this.va.nodeIndentPastParent=a,this.K()))});w.g(Y,"nodeSpacing",Y.prototype.nodeSpacing);w.defineProperty(Y,{nodeSpacing:"nodeSpacing"},function(){return this.va.nodeSpacing},function(a){this.va.nodeSpacing!==a&&(w.i(a,"number",Y,"nodeSpacing"),this.va.nodeSpacing=a,this.K())}); -w.g(Y,"layerSpacing",Y.prototype.layerSpacing);w.defineProperty(Y,{layerSpacing:"layerSpacing"},function(){return this.va.layerSpacing},function(a){this.va.layerSpacing!==a&&(w.i(a,"number",Y,"layerSpacing"),this.va.layerSpacing=a,this.K())});w.g(Y,"layerSpacingParentOverlap",Y.prototype.layerSpacingParentOverlap); -w.defineProperty(Y,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.va.layerSpacingParentOverlap},function(a){this.va.layerSpacingParentOverlap!==a&&(w.i(a,"number",Y,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.va.layerSpacingParentOverlap=a,this.K()))});w.g(Y,"compaction",Y.prototype.compaction); -w.defineProperty(Y,{compaction:"compaction"},function(){return this.va.compaction},function(a){this.va.compaction!==a&&(w.za(a,Y,Y,"compaction"),a===zr||a===Br)&&(this.va.compaction=a,this.K())});w.g(Y,"breadthLimit",Y.prototype.breadthLimit);w.defineProperty(Y,{breadthLimit:"breadthLimit"},function(){return this.va.breadthLimit},function(a){this.va.breadthLimit!==a&&(w.i(a,"number",Y,"breadthLimit"),0<=a&&(this.va.breadthLimit=a,this.K()))});w.g(Y,"rowSpacing",Y.prototype.rowSpacing); -w.defineProperty(Y,{rowSpacing:"rowSpacing"},function(){return this.va.rowSpacing},function(a){this.va.rowSpacing!==a&&(w.i(a,"number",Y,"rowSpacing"),this.va.rowSpacing=a,this.K())});w.g(Y,"rowIndent",Y.prototype.rowIndent);w.defineProperty(Y,{rowIndent:"rowIndent"},function(){return this.va.rowIndent},function(a){this.va.rowIndent!==a&&(w.i(a,"number",Y,"rowIndent"),0<=a&&(this.va.rowIndent=a,this.K()))});w.g(Y,"commentSpacing",Y.prototype.commentSpacing); -w.defineProperty(Y,{commentSpacing:"commentSpacing"},function(){return this.va.commentSpacing},function(a){this.va.commentSpacing!==a&&(w.i(a,"number",Y,"commentSpacing"),this.va.commentSpacing=a,this.K())});w.g(Y,"commentMargin",Y.prototype.commentMargin);w.defineProperty(Y,{commentMargin:"commentMargin"},function(){return this.va.commentMargin},function(a){this.va.commentMargin!==a&&(w.i(a,"number",Y,"commentMargin"),this.va.commentMargin=a,this.K())});w.g(Y,"setsPortSpot",Y.prototype.setsPortSpot); -w.defineProperty(Y,{setsPortSpot:"setsPortSpot"},function(){return this.va.setsPortSpot},function(a){this.va.setsPortSpot!==a&&(w.i(a,"boolean",Y,"setsPortSpot"),this.va.setsPortSpot=a,this.K())});w.g(Y,"portSpot",Y.prototype.portSpot);w.defineProperty(Y,{portSpot:"portSpot"},function(){return this.va.portSpot},function(a){w.l(a,K,Y,"portSpot");this.va.portSpot.L(a)||(this.va.portSpot=a,this.K())});w.g(Y,"setsChildPortSpot",Y.prototype.setsChildPortSpot); -w.defineProperty(Y,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.va.setsChildPortSpot},function(a){this.va.setsChildPortSpot!==a&&(w.i(a,"boolean",Y,"setsChildPortSpot"),this.va.setsChildPortSpot=a,this.K())});w.g(Y,"childPortSpot",Y.prototype.childPortSpot);w.defineProperty(Y,{childPortSpot:"childPortSpot"},function(){return this.va.childPortSpot},function(a){w.l(a,K,Y,"childPortSpot");this.va.childPortSpot.L(a)||(this.va.childPortSpot=a,this.K())});w.g(Y,"alternateSorting",Y.prototype.bI); -w.defineProperty(Y,{bI:"alternateSorting"},function(){return this.ua.sorting},function(a){this.ua.sorting!==a&&(w.za(a,Y,Y,"alternateSorting"),a===or||a===pr||a===qr||rr)&&(this.ua.sorting=a,this.K())});w.g(Y,"alternateComparer",Y.prototype.QH);w.defineProperty(Y,{QH:"alternateComparer"},function(){return this.ua.comparer},function(a){this.ua.comparer!==a&&(w.i(a,"function",Y,"alternateComparer"),this.ua.comparer=a,this.K())});w.g(Y,"alternateAngle",Y.prototype.KH); -w.defineProperty(Y,{KH:"alternateAngle"},function(){return this.ua.angle},function(a){this.ua.angle!==a&&(w.i(a,"number",Y,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.ua.angle=a,this.K())});w.g(Y,"alternateAlignment",Y.prototype.JH);w.defineProperty(Y,{JH:"alternateAlignment"},function(){return this.ua.alignment},function(a){this.ua.alignment!==a&&(w.za(a,Y,Y,"alternateAlignment"),this.ua.alignment=a,this.K())});w.g(Y,"alternateNodeIndent",Y.prototype.UH); -w.defineProperty(Y,{UH:"alternateNodeIndent"},function(){return this.ua.nodeIndent},function(a){this.ua.nodeIndent!==a&&(w.i(a,"number",Y,"alternateNodeIndent"),0<=a&&(this.ua.nodeIndent=a,this.K()))});w.g(Y,"alternateNodeIndentPastParent",Y.prototype.VH); -w.defineProperty(Y,{VH:"alternateNodeIndentPastParent"},function(){return this.ua.nodeIndentPastParent},function(a){this.ua.nodeIndentPastParent!==a&&(w.i(a,"number",Y,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.ua.nodeIndentPastParent=a,this.K()))});w.g(Y,"alternateNodeSpacing",Y.prototype.WH);w.defineProperty(Y,{WH:"alternateNodeSpacing"},function(){return this.ua.nodeSpacing},function(a){this.ua.nodeSpacing!==a&&(w.i(a,"number",Y,"alternateNodeSpacing"),this.ua.nodeSpacing=a,this.K())}); -w.g(Y,"alternateLayerSpacing",Y.prototype.SH);w.defineProperty(Y,{SH:"alternateLayerSpacing"},function(){return this.ua.layerSpacing},function(a){this.ua.layerSpacing!==a&&(w.i(a,"number",Y,"alternateLayerSpacing"),this.ua.layerSpacing=a,this.K())});w.g(Y,"alternateLayerSpacingParentOverlap",Y.prototype.TH); -w.defineProperty(Y,{TH:"alternateLayerSpacingParentOverlap"},function(){return this.ua.layerSpacingParentOverlap},function(a){this.ua.layerSpacingParentOverlap!==a&&(w.i(a,"number",Y,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.ua.layerSpacingParentOverlap=a,this.K()))});w.g(Y,"alternateCompaction",Y.prototype.PH); -w.defineProperty(Y,{PH:"alternateCompaction"},function(){return this.ua.compaction},function(a){this.ua.compaction!==a&&(w.za(a,Y,Y,"alternateCompaction"),a===zr||a===Br)&&(this.ua.compaction=a,this.K())});w.g(Y,"alternateBreadthLimit",Y.prototype.LH);w.defineProperty(Y,{LH:"alternateBreadthLimit"},function(){return this.ua.breadthLimit},function(a){this.ua.breadthLimit!==a&&(w.i(a,"number",Y,"alternateBreadthLimit"),0<=a&&(this.ua.breadthLimit=a,this.K()))});w.g(Y,"alternateRowSpacing",Y.prototype.ZH); -w.defineProperty(Y,{ZH:"alternateRowSpacing"},function(){return this.ua.rowSpacing},function(a){this.ua.rowSpacing!==a&&(w.i(a,"number",Y,"alternateRowSpacing"),this.ua.rowSpacing=a,this.K())});w.g(Y,"alternateRowIndent",Y.prototype.YH);w.defineProperty(Y,{YH:"alternateRowIndent"},function(){return this.ua.rowIndent},function(a){this.ua.rowIndent!==a&&(w.i(a,"number",Y,"alternateRowIndent"),0<=a&&(this.ua.rowIndent=a,this.K()))});w.g(Y,"alternateCommentSpacing",Y.prototype.OH); -w.defineProperty(Y,{OH:"alternateCommentSpacing"},function(){return this.ua.commentSpacing},function(a){this.ua.commentSpacing!==a&&(w.i(a,"number",Y,"alternateCommentSpacing"),this.ua.commentSpacing=a,this.K())});w.g(Y,"alternateCommentMargin",Y.prototype.NH);w.defineProperty(Y,{NH:"alternateCommentMargin"},function(){return this.ua.commentMargin},function(a){this.ua.commentMargin!==a&&(w.i(a,"number",Y,"alternateCommentMargin"),this.ua.commentMargin=a,this.K())});w.g(Y,"alternateSetsPortSpot",Y.prototype.aI); -w.defineProperty(Y,{aI:"alternateSetsPortSpot"},function(){return this.ua.setsPortSpot},function(a){this.ua.setsPortSpot!==a&&(w.i(a,"boolean",Y,"alternateSetsPortSpot"),this.ua.setsPortSpot=a,this.K())});w.g(Y,"alternatePortSpot",Y.prototype.XH);w.defineProperty(Y,{XH:"alternatePortSpot"},function(){return this.ua.portSpot},function(a){w.l(a,K,Y,"alternatePortSpot");this.ua.portSpot.L(a)||(this.ua.portSpot=a,this.K())});w.g(Y,"alternateSetsChildPortSpot",Y.prototype.$H); -w.defineProperty(Y,{$H:"alternateSetsChildPortSpot"},function(){return this.ua.setsChildPortSpot},function(a){this.ua.setsChildPortSpot!==a&&(w.i(a,"boolean",Y,"alternateSetsChildPortSpot"),this.ua.setsChildPortSpot=a,this.K())});w.g(Y,"alternateChildPortSpot",Y.prototype.MH);w.defineProperty(Y,{MH:"alternateChildPortSpot"},function(){return this.ua.childPortSpot},function(a){w.l(a,K,Y,"alternateChildPortSpot");this.ua.childPortSpot.L(a)||(this.ua.childPortSpot=a,this.K())});var Uq; -Y.PathDefault=Uq=w.w(Y,"PathDefault",-1);var Vq;Y.PathDestination=Vq=w.w(Y,"PathDestination",0);var br;Y.PathSource=br=w.w(Y,"PathSource",1);var or;Y.SortingForwards=or=w.w(Y,"SortingForwards",10);var pr;Y.SortingReverse=pr=w.w(Y,"SortingReverse",11);var qr;Y.SortingAscending=qr=w.w(Y,"SortingAscending",12);var rr;Y.SortingDescending=rr=w.w(Y,"SortingDescending",13);var Pr;Y.AlignmentCenterSubtrees=Pr=w.w(Y,"AlignmentCenterSubtrees",20);var sr; -Y.AlignmentCenterChildren=sr=w.w(Y,"AlignmentCenterChildren",21);var Dr;Y.AlignmentStart=Dr=w.w(Y,"AlignmentStart",22);var Er;Y.AlignmentEnd=Er=w.w(Y,"AlignmentEnd",23);var ur;Y.AlignmentBus=ur=w.w(Y,"AlignmentBus",24);var jr;Y.AlignmentBusBranching=jr=w.w(Y,"AlignmentBusBranching",25);var vr;Y.AlignmentTopLeftBus=vr=w.w(Y,"AlignmentTopLeftBus",26);var wr;Y.AlignmentBottomRightBus=wr=w.w(Y,"AlignmentBottomRightBus",27);var zr;Y.CompactionNone=zr=w.w(Y,"CompactionNone",30);var Br; -Y.CompactionBlock=Br=w.w(Y,"CompactionBlock",31);var Wq;Y.StyleLayered=Wq=w.w(Y,"StyleLayered",40);var nr;Y.StyleLastParents=nr=w.w(Y,"StyleLastParents",41);var mr;Y.StyleAlternating=mr=w.w(Y,"StyleAlternating",42);var lr;Y.StyleRootOnly=lr=w.w(Y,"StyleRootOnly",43);var Yq;Y.ArrangementVertical=Yq=w.w(Y,"ArrangementVertical",50);var cs;Y.ArrangementHorizontal=cs=w.w(Y,"ArrangementHorizontal",51);var ar;Y.ArrangementFixedRoots=ar=w.w(Y,"ArrangementFixedRoots",52);var Xq; -Y.LayerIndividual=Xq=w.w(Y,"LayerIndividual",60);var hr;Y.LayerSiblings=hr=w.w(Y,"LayerSiblings",61);var gr;Y.LayerUniform=gr=w.w(Y,"LayerUniform",62);function $q(){ta.call(this)}w.Ia($q,ta);w.ja("TreeNetwork",$q);$q.prototype.createVertex=function(){return new Zq};$q.prototype.createEdge=function(){return new es}; -function Zq(){ua.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.ma=new x(0,0);this.cb=new fa(0,0);this.La=new x(0,0);this.Np=this.Mp=this.PJ=!1;this.Vt=this.Dt=null;this.sorting=or;this.comparer=gp;this.angle=0;this.alignment=sr;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=Br;this.breadthLimit= -0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=zc;this.setsChildPortSpot=!0;this.childPortSpot=zc}w.Ia(Zq,ua);w.ja("TreeVertex",Zq); -Zq.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.A(Zq,{Jm:"childrenCount"},function(){return this.children.length});w.g(Zq,"relativePosition",Zq.prototype.KJ);w.defineProperty(Zq,{KJ:"relativePosition"},function(){return this.ma},function(a){this.ma.set(a)});w.g(Zq,"subtreeSize",Zq.prototype.cK);w.defineProperty(Zq,{cK:"subtreeSize"},function(){return this.cb},function(a){this.cb.set(a)}); -w.g(Zq,"subtreeOffset",Zq.prototype.bK);w.defineProperty(Zq,{bK:"subtreeOffset"},function(){return this.La},function(a){this.La.set(a)});function es(){va.call(this);this.cs=new x(0,0)}w.Ia(es,va);w.ja("TreeEdge",es); -es.prototype.commit=function(){var a=this.link;if(null!==a&&!a.Si){var b=this.network.Lb,c=null,d=null;switch(b.Hf){case Vq:c=this.fromVertex;d=this.toVertex;break;case br:c=this.toVertex;d=this.fromVertex;break;default:w.m("Unhandled path value "+b.Hf.toString())}if(null!==c&&null!==d)if(b=this.cs,0!==b.x||0!==b.y||c.PJ){var d=c.kb,e=Cr(c),g=Fr(c),h=c.rowSpacing;a.updateRoute();var k=a.Le===sh,l=a.gc,m=0,n,p;a.Fl();if(l||k){for(m=2;4q.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Gr(c))))):c.alignment===Dr?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Gr(c))))):c.alignment===Dr?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Gr(c))))):c.alignment===Dr?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Gr(c))))):c.alignment===Dr?(r=d.left+b.x,0===b.x&&n.xl?h=null:(m=parseFloat(n.getAttribute("cx")),isNaN(m)&&(m=0),n=parseFloat(n.getAttribute("cy")),isNaN(n)&&(n=0),p=new ed(kd),p.ra=0,p.sa=0,p.D=2*l,p.F=2*l,h.position=new x(m-l,n-l),h.Xc=p);break;case "ellipse":p=g;h=new W;l=parseFloat(p.getAttribute("rx"));isNaN(l)||0>l?h=null:(m=parseFloat(p.getAttribute("ry")),isNaN(m)||0>m?h=null:(n=parseFloat(p.getAttribute("cx")),isNaN(n)&&(n=0),p=parseFloat(p.getAttribute("cy")), -isNaN(p)&&(p=0),q=new ed(kd),q.ra=0,q.sa=0,q.D=2*l,q.F=2*m,h.position=new x(n-l,p-m),h.Xc=q));break;case "rect":q=g;h=new W;l=parseFloat(q.getAttribute("width"));if(isNaN(l)||0>l)h=null;else if(m=parseFloat(q.getAttribute("height")),isNaN(m)||0>m)h=null;else{n=parseFloat(q.getAttribute("x"));isNaN(n)&&(n=0);p=parseFloat(q.getAttribute("y"));isNaN(p)&&(p=0);var r=q.getAttribute("rx"),s=q.getAttribute("ry"),q=parseFloat(r);if(isNaN(q)||0>q)q=0;var u=parseFloat(s);if(isNaN(u)||0>u)u=0;null!==r&&""!== -r||null===s||""===s?null===r||""===r||null!==s&&""!==s||(u=q):q=u;q=Math.min(q,l/2);u=Math.min(u,m/2);s=void 0;0===q&&0===u?(s=new ed(jd),s.ra=0,s.sa=0,s.D=l,s.F=m):(s=J.wa/2,r=w.u(),L(r,q,0,!0),r.lineTo(l-q,0),N(r,l-q*s,0,l,u*s,l,u),r.lineTo(l,m-u),N(r,l,m-u*s,l-q*s,m,l-q,m),r.lineTo(q,m),N(r,q*s,m,0,m-u*s,0,m-u),r.lineTo(0,u),N(r,0,u*s,q*s,0,q,0),Ad(r),s=r.s,w.v(r));h.position=new x(n,p);h.Xc=s}break;case "polygon":h=js(g);break;case "polyline":h=js(g)}if(null!==h){if(h instanceof W){m=h;l=gs(a, -g,"fill");null!==l&&-1!==l.indexOf("url")?(l=l.substring(l.indexOf("#")+1,l.length-1),l=a["_brush"+l],m.fill=l instanceof ea?l:"black"):m.fill=null===l?"black":"none"===l?null:l;l=gs(a,g,"stroke");null!==l&&-1!==l.indexOf("url")?(l=l.substring(l.indexOf("#")+1,l.length-1),l=a["_brush"+l],m.stroke=l instanceof ea?l:"black"):m.stroke="none"===l?null:l;l=parseFloat(gs(a,g,"stroke-width"));isNaN(l)||(m.ib=l);l=gs(a,g,"stroke-linecap");null!==l&&(m.EG=l);l=gs(a,g,"stroke-dasharray");if(null!==l&&""!== -l){n=l.split(",");p=[];for(l=0;lg.length)return null;for(var d=null,h=new D(Pd),k=1;kh&&a.y>k&&a.righth&&b.y>k&&b.right=c.XF)){this.D^=4096;var d=!1;if(null!==c){d=c.Ma;c.Ma=!0;var e=c.selection;e.wa();a?e.add(this):e.remove(this);e.freeze()}this.h("isSelected",b,a);this.qd();a=this.FG;null!==a&&a(this);null!==c&&(c.vd(),c.Ma=d)}}}); +G(O,{ig:"isHighlighted"},function(){return 0!==(this.D&524288)},function(a){var b=0!==(this.D&524288);if(b!==a){this.D^=524288;var c=this.g;null!==c&&(c=c.Tu,c.wa(),a?c.add(this):c.remove(this),c.freeze());this.h("isHighlighted",b,a);this.ba()}});G(O,{pk:"isShadowed"},function(){return 0!==(this.D&8192)},function(a){var b=0!==(this.D&8192);b!==a&&(this.D^=8192,this.h("isShadowed",b,a),this.ba())});function ml(a){return 0!==(a.D&32768)}function jp(a,b){a.D=b?a.D|32768:a.D&-32769} +function Qm(a,b){a.D=b?a.D|65536:a.D&-65537}function ck(a){return 0!==(a.D&131072)}O.prototype.Me=function(a){this.D=a?this.D|131072:this.D&-131073};function pp(a,b){a.D=b?a.D|1048576:a.D&-1048577}G(O,{qC:"isAnimated"},function(){return 0!==(this.D&262144)},function(a){var b=0!==(this.D&262144);b!==a&&(this.D^=262144,this.h("isAnimated",b,a))});G(O,{Py:"selectionObjectName"},function(){return this.Gq},function(a){var b=this.Gq;b!==a&&(this.Gq=a,this.gl=null,this.h("selectionObjectName",b,a))}); +G(O,{EG:"selectionAdornmentTemplate"},function(){return this.Eq},function(a){var b=this.Eq;b!==a&&(this instanceof W&&(a.type=si),this.Eq=a,this.h("selectionAdornmentTemplate",b,a))});H(O,{ls:"selectionObject"},function(){if(null===this.gl){var a=this.Py;null!==a&&""!==a?(a=this.Bd(a),this.gl=null!==a?a:this):this instanceof W?(a=this.path,this.gl=null!==a?a:this):this.gl=this}return this.gl}); +G(O,{FG:"selectionChanged"},function(){return this.Fq},function(a){var b=this.Fq;b!==a&&(null!==a&&w(a,"function",O,"selectionChanged"),this.Fq=a,this.h("selectionChanged",b,a))});G(O,{ZC:"resizeAdornmentTemplate"},function(){return this.sq},function(a){var b=this.sq;b!==a&&(this.sq=a,this.h("resizeAdornmentTemplate",b,a))});G(O,{aD:"resizeObjectName"},function(){return this.uq},function(a){var b=this.uq;b!==a&&(this.uq=a,this.Vm=null,this.h("resizeObjectName",b,a))}); +H(O,{$C:"resizeObject"},function(){if(null===this.Vm){var a=this.aD;null!==a&&""!==a?(a=this.Bd(a),this.Vm=null!==a?a:this):this.Vm=this}return this.Vm});G(O,{uG:"resizeCellSize"},function(){return this.tq},function(a){var b=this.tq;b.A(a)||(this.tq=a=a.O(),this.h("resizeCellSize",b,a))});G(O,{xG:"rotateAdornmentTemplate"},function(){return this.vq},function(a){var b=this.vq;b!==a&&(this.vq=a,this.h("rotateAdornmentTemplate",b,a))}); +G(O,{yG:"rotateObjectName"},function(){return this.wq},function(a){var b=this.wq;b!==a&&(this.wq=a,this.Wm=null,this.h("rotateObjectName",b,a))});H(O,{cD:"rotateObject"},function(){if(null===this.Wm){var a=this.yG;null!==a&&""!==a?(a=this.Bd(a),this.Wm=null!==a?a:this):this.Wm=this}return this.Wm});G(O,{text:"text"},function(){return this.Ad},function(a){var b=this.Ad;b!==a&&(this.Ad=a,this.h("text",b,a))}); +G(O,{Ca:"containingGroup"},function(){return this.tj},function(a){if(this.Zc()){var b=this.tj;if(b!==a){null===a||this!==a&&!a.$g(this)||(this===a&&v("Cannot make a Group a member of itself: "+this.toString()),v("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.v(Cl);var c=this.g;null!==b?qp(b,this):this instanceof Wg&&null!==c&&c.Rj.remove(this);this.tj=a;null!==a?rp(a,this):this instanceof Wg&&null!==c&&c.Rj.add(this);this.v(ul);if(null!== +c){var d=this.data,e=c.U;null!==d&&e instanceof Xf&&e.yv(d,e.$a(null!==a?a.data:null))}d=this.NB;null!==d&&(e=!0,null!==c&&(e=c.ya,c.ya=!0),d(this,b,a),null!==c&&(c.ya=e));if(this instanceof Wg)for(c=new Xb(O),Ug(c,this,!0,0,!0),c=c.i;c.next();)if(d=c.value,d instanceof V)for(d=d.Gd;d.next();)Vl(d.value);if(this instanceof V)for(d=this.Gd;d.next();)Vl(d.value);this.h("containingGroup",b,a);null!==a&&a.Cv()}}else v("cannot set the Part.containingGroup of a Link or Adornment")});r=O.prototype; +r.lk=function(){var a=this.Ca;null!==a&&(a.H(),null!==a.ub&&a.ub.H(),a.He())};r.ba=function(){var a=this.g;null!==a&&!dl(this)&&!ml(this)&&this.sa()&&this.Cb.w()&&a.ba(hk(this,this.Cb))};r.Fr=function(a){var b=this.tj;null===b||a||rp(b,this)};r.Gr=function(a){var b=this.tj;null===b||a||qp(b,this)};r.Cl=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.U,null!==b&&b.Ly(a))}}; +G(O,{NB:"containingGroupChanged"},function(){return this.Eo},function(a){var b=this.Eo;b!==a&&(null!==a&&w(a,"function",O,"containingGroupChanged"),this.Eo=a,this.h("containingGroupChanged",b,a))});O.prototype.findSubGraphLevel=function(){return sp(this,this)};function sp(a,b){var c=b.Ca;return null!==c?1+sp(a,c):b instanceof V&&(c=b.ud,null!==c)?sp(a,c):0}O.prototype.findTopLevelPart=function(){return tp(this,this)}; +function tp(a,b){var c=b.Ca;return null!==c?tp(a,c):b instanceof V&&(c=b.ud,null!==c)?tp(a,c):b}H(O,{bv:"isTopLevel"},function(){return null!==this.Ca||this instanceof V&&this.Ie?!1:!0});O.prototype.isMemberOf=O.prototype.$g=function(a){return a instanceof Wg?up(this,this,a):!1};function up(a,b,c){if(b===c||null===c)return!1;var d=b.Ca;return null===d||d!==c&&!up(a,d,c)?b instanceof V&&(b=b.ud,null!==b)?up(a,b,c):!1:!0} +O.prototype.findCommonContainingGroup=O.prototype.dF=function(a){if(null===a)return null;if(this===a)return this instanceof Wg?this:null;for(var b=this;null!==b;)b instanceof Wg&&pp(b,!0),b=b.Ca;for(var c=null,b=a;null!==b;){if(0!==(b.D&1048576)){c=b;break}b=b.Ca}for(b=this;null!==b;)b instanceof Wg&&pp(b,!1),b=b.Ca;return c};G(O,{OF:"layoutConditions"},function(){return this.xp},function(a){var b=this.xp;b!==a&&(this.xp=a,this.h("layoutConditions",b,a))}); +O.prototype.canLayout=function(){if(!this.vC||!this.sa())return!1;var a=this.layer;return null!==a&&a.bc||this instanceof V&&this.Ie?!1:!0};O.prototype.invalidateLayout=O.prototype.v=function(a){void 0===a&&(a=16777215);var b;this.vC&&0!==(a&this.OF)?(b=this.layer,null!==b&&b.bc||this instanceof V&&this.Ie?b=!1:(b=this.g,b=null!==b&&b.V.Ua?!1:!0)):b=!1;if(b)if(b=this.tj,null!==b){var c=b.vb;null!==c?c.v():b.v(a)}else a=this.g,null!==a&&(c=a.vb,null!==c&&c.v())}; +function zl(a){if(!a.sa())return!1;a=a.layer;return null!==a&&a.bc?!1:!0}G(O,{WB:"dragComputation"},function(){return this.Oo},function(a){var b=this.Oo;b!==a&&(null!==a&&w(a,"function",O,"dragComputation"),this.Oo=a,this.h("dragComputation",b,a))});G(O,{KG:"shadowOffset"},function(){return this.jl},function(a){var b=this.jl;b.A(a)||(this.jl=a=a.O(),this.ba(),this.h("shadowOffset",b,a))}); +G(O,{shadowColor:"shadowColor"},function(){return this.il},function(a){var b=this.il;b!==a&&(this.il=a,this.ba(),this.h("shadowColor",b,a))});G(O,{shadowBlur:"shadowBlur"},function(){return this.hl},function(a){var b=this.hl;b!==a&&(this.hl=a,this.ba(),this.h("shadowBlur",b,a))});function Vg(a){0===arguments.length?O.call(this,Yi):O.call(this,a);this.Le="Adornment";this.mb=null;this.D&=-257;this.$f=new z(NaN,NaN);this.ei=new N(D);this.ub=null}yb(Vg,O);vb("Adornment",Vg); +Vg.prototype.toString=function(){var a=this.Wg;return"Adornment("+this.jc+")"+(null!==a?a.toString():"")};Vg.prototype.updateRelationshipsFromData=function(){};Vg.prototype.Tr=function(){var a=this.Xb.J,b=this.Xb;if(a instanceof W&&b instanceof X){var c=a.path,b=c.za;a.Tr();for(var b=c.za,a=this.la.l,c=a.length,d=0;da&&(a=1);var b=this.g;if(null!==b&&!b.Ed){var c=b.rb;0!==b.V.be&&c.tk();b.Ed=!0;var c=b.Kc,d=new Xb(V);d.add(this);Gp(this,d,c,a,this.rc);b.Ed=!1}}; +function Gp(a,b,c,d,e){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.Ed){var c=b.rb;0!==b.V.be&&c.tk();b.Ed=!0;var d=b.Kc,e=new Xb(V);e.add(this);Ip(this,e,d,a,this.rc,c,this);b.Ed=!1}};function Ip(a,b,c,d,e,f,g){for(var h=c?a.Ou():a.Df();h.next();){var k=h.value;k.cc&&(e||k.wf||k.Ab(),k=k.Ux(a),null!==k&&k!==a&&!b.contains(k)&&(b.add(k),e||(k.Zd(!0),k.lk(),ak(f,k,g)),2a&&(a-=180);break;case Op:a=Q.Zr(c+90);90a&&(a-=180);break;case Pp:a=Q.Zr(c-90);90a&&(a-=180);break;case Qp:a=Q.Zr(c);if(45a||225a)return 0;90a&&(a-=180)}return Q.Zr(a)}; +G(W,{M:"fromNode"},function(){return this.kf},function(a){var b=this.kf;if(b!==a){var c=this.Ic;null!==b&&(this.vf!==b&&Dp(b,this,c),Rp(this),this.v(Cl));this.kf=a;this.qh=null;this.Ab();var d=this.g;if(null!==d){var e=this.data,f=d.U;if(null!==e)if(f instanceof Xf){var g=null!==a?a.data:null;f.xv(e,f.$a(g))}else f instanceof Yf&&(g=null!==a?a.data:null,d.Kc?f.ug(e,f.$a(g)):(null!==b&&f.ug(b.data,void 0),f.ug(g,f.$a(null!==this.vf?this.vf.data:null))))}e=this.Ic;f=this.fC;null!==f&&(g=!0,null!==d&& +(g=d.ya,d.ya=!0),f(this,c,e),null!==d&&(d.ya=g));null!==a&&(this.vf!==a&&Cp(a,this,e),Sp(this),this.v(ul));this.h("fromNode",b,a);Vl(this)}}); +G(W,{Ef:"fromPortId"},function(){return this.Gg},function(a){var b=this.Gg;if(b!==a){var c=this.Ic;null!==c&&Bp(this.M,c);Rp(this);this.Gg=a;var d=this.Ic;null!==d&&Bp(this.M,d);var e=this.g;if(null!==e){var f=this.data,g=e.U;null!==f&&g instanceof Xf&&g.Ry(f,a)}c!==d&&(this.qh=null,this.Ab(),f=this.fC,null!==f&&(g=!0,null!==e&&(g=e.ya,e.ya=!0),f(this,c,d),null!==e&&(e.ya=g)));Sp(this);this.h("fromPortId",b,a)}});H(W,{Ic:"fromPort"},function(){var a=this.kf;return null===a?null:a.ek(this.Gg)}); +G(W,{fC:"fromPortChanged"},function(){return this.Wo},function(a){var b=this.Wo;b!==a&&(null!==a&&w(a,"function",W,"fromPortChanged"),this.Wo=a,this.h("fromPortChanged",b,a))}); +G(W,{R:"toNode"},function(){return this.vf},function(a){var b=this.vf;if(b!==a){var c=this.xd;null!==b&&(this.kf!==b&&Dp(b,this,c),Rp(this),this.v(Cl));this.vf=a;this.qh=null;this.Ab();var d=this.g;if(null!==d){var e=this.data,f=d.U;if(null!==e)if(f instanceof Xf){var g=null!==a?a.data:null;f.zv(e,f.$a(g))}else f instanceof Yf&&(g=null!==a?a.data:null,d.Kc?(null!==b&&f.ug(b.data,void 0),f.ug(g,f.$a(null!==this.kf?this.kf.data:null))):f.ug(e,f.$a(g)))}e=this.xd;f=this.wD;null!==f&&(g=!0,null!==d&& +(g=d.ya,d.ya=!0),f(this,c,e),null!==d&&(d.ya=g));null!==a&&(this.kf!==a&&Cp(a,this,e),Sp(this),this.v(ul));this.h("toNode",b,a);Vl(this)}}); +G(W,{wg:"toPortId"},function(){return this.Ug},function(a){var b=this.Ug;if(b!==a){var c=this.xd;null!==c&&Bp(this.R,c);Rp(this);this.Ug=a;var d=this.xd;null!==d&&Bp(this.R,d);var e=this.g;if(null!==e){var f=this.data,g=e.U;null!==f&&g instanceof Xf&&g.Vy(f,a)}c!==d&&(this.qh=null,this.Ab(),f=this.wD,null!==f&&(g=!0,null!==e&&(g=e.ya,e.ya=!0),f(this,c,d),null!==e&&(e.ya=g)));Sp(this);this.h("toPortId",b,a)}});H(W,{xd:"toPort"},function(){var a=this.vf;return null===a?null:a.ek(this.Ug)}); +G(W,{wD:"toPortChanged"},function(){return this.Uq},function(a){var b=this.Uq;b!==a&&(null!==a&&w(a,"function",W,"toPortChanged"),this.Uq=a,this.h("toPortChanged",b,a))});G(W,{Za:"fromSpot"},function(){return null!==this.G?this.G.mi:ee},function(a){null===this.G&&this.Xd();var b=this.G.mi;b.A(a)||(a=a.O(),this.G.mi=a,this.h("fromSpot",b,a),this.Ab())}); +G(W,{fk:"fromEndSegmentLength"},function(){return null!==this.G?this.G.ki:NaN},function(a){null===this.G&&this.Xd();var b=this.G.ki;b!==a&&(0>a&&za(a,">= 0",W,"fromEndSegmentLength"),this.G.ki=a,this.h("fromEndSegmentLength",b,a),this.Ab())});G(W,{Br:"fromEndSegmentDirection"},function(){return null!==this.G?this.G.ji:wp},function(a){null===this.G&&this.Xd();var b=this.G.ji;b!==a&&(this.G.ji=a,this.h("fromEndSegmentDirection",b,a),this.Ab())}); +G(W,{Cr:"fromShortLength"},function(){return null!==this.G?this.G.li:NaN},function(a){null===this.G&&this.Xd();var b=this.G.li;b!==a&&(this.G.li=a,this.h("fromShortLength",b,a),this.Ab())});G(W,{ab:"toSpot"},function(){return null!==this.G?this.G.Oi:ee},function(a){null===this.G&&this.Xd();var b=this.G.Oi;b.A(a)||(a=a.O(),this.G.Oi=a,this.h("toSpot",b,a),this.Ab())}); +G(W,{Bk:"toEndSegmentLength"},function(){return null!==this.G?this.G.Mi:NaN},function(a){null===this.G&&this.Xd();var b=this.G.Mi;b!==a&&(0>a&&za(a,">= 0",W,"toEndSegmentLength"),this.G.Mi=a,this.h("toEndSegmentLength",b,a),this.Ab())});G(W,{ss:"toEndSegmentDirection"},function(){return null!==this.G?this.G.Li:wp},function(a){null===this.G&&this.Xd();var b=this.G.Li;b!==a&&(this.G.Li=a,this.h("toEndSegmentDirection",b,a),this.Ab())}); +G(W,{us:"toShortLength"},function(){return null!==this.G?this.G.Ni:NaN},function(a){null===this.G&&this.Xd();var b=this.G.Ni;b!==a&&(this.G.Ni=a,this.h("toShortLength",b,a),this.Ab())});function Vl(a){var b=a.M,c=a.R;null!==b?null!==c?Tp(a,b.dF(c)):Tp(a,null):Tp(a,null)}function Tp(a,b){var c=a.tj;if(c!==b){null!==c&&qp(c,a);a.tj=b;null!==b&&rp(b,a);var d=a.NB;if(null!==d){var e=!0,f=a.g;null!==f&&(e=f.ya,f.ya=!0);d(a,c,b);null!==f&&(f.ya=e)}!a.wf||a.bB!==c&&a.dB!==c||a.Ab()}} +W.prototype.lk=function(){var a=this.Ca;null!==a&&this.M!==a&&this.R!==a&&O.prototype.lk.call(this)};W.prototype.getOtherNode=W.prototype.Ux=function(a){var b=this.M;return a===b?this.R:b};W.prototype.getOtherPort=function(a){var b=this.Ic;return a===b?this.xd:b};H(W,{bI:"isLabeledLink"},function(){return null===this.Pd?!1:0=d&&(g=d-1);var k=this.j(g-1),f=this.j(g);Q.nn(e.x,e.y,h.x,h.y,k.x,k.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.j(0),f=this.j(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.k(e.x,e.y,0,0),a.Zh(f),g=2;gc&&(c=-c)):Q.Sa(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.Wi(d)),f.push(c),e+=c;for(d=g=c=0;ce/2)break;c+=d;g++}pb(f);b=this.j(g);f=this.j(g+1);b.x===f.x?b.y>f.y?a.k(b.x,b.y-(e/2-c)):a.k(b.x,b.y+(e/2-c)):b.y===f.y?b.x>f.x?a.k(b.x-(e/2-c),b.y):a.k(b.x+(e/2-c),b.y):(e=(e/2-c)/d,a.k(b.x+e*(f.x-b.x),b.y+e*(f.y-b.y)));return a};H(W,{DC:"midAngle"},function(){this.updateRoute();return this.computeMidAngle()}); +W.prototype.computeMidAngle=function(){var a=this.Z;if(2>a)return NaN;if(this.computeCurve()===Ni&&4<=a&&!this.Jb){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),a=this.j(c),b=this.j(c+1),d=this.j(c+2),c=this.j(c+3);return Q.AE(a.x,a.y,b.x,b.y,d.x,d.y,c.x,c.y)}if(0e?a.Ph(b):b.Ph(d)}; +G(W,{points:"points"},function(){return this.nc},function(a){var b=this.nc;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var e=0;en&&(t-=180));0>t?t+=360:360<=t&&(t-=360);h&&(u+=Math.abs(n));0===t?q=u:90===t?s=u:180===t?q=-u:270===t?s=-u:(q=u*Math.cos(t*Math.PI/180),s=u*Math.sin(t*Math.PI/180));if(f.Fd()&&h){var x=c.Ra(Dd,Va()),B=Wa(x.x+1E3*q,x.y+1E3*s);this.getLinkPointFromPoint(b,c,x,B,!0,p);A(x);A(B)}}var u=this.getLinkPoint(d,e,g,!1,k,b,c),y=0,C=0,K=0;if(k||g!==td||h)x=this.computeEndSegmentLength(d, +e,g,!1),K=this.getLinkDirection(d,e,u,g,!1,k,b,c),h&&(K+=k?0:30,0>n&&(K+=180)),0>K?K+=360:360<=K&&(K-=360),h&&(x+=Math.abs(n)),0===K?y=x:90===K?C=x:180===K?y=-x:270===K?C=-x:(y=x*Math.cos(K*Math.PI/180),C=x*Math.sin(K*Math.PI/180)),g.Fd()&&h&&(x=e.Ra(Dd,Va()),B=Wa(x.x+1E3*y,x.y+1E3*C),this.getLinkPointFromPoint(d,e,x,B,!1,u),A(x),A(B));e=p;if(k||f!==td||h)e=new z(p.x+q,p.y+s);c=u;if(k||g!==td||h)c=new z(u.x+y,u.y+C);!m&&!k&&f===td&&3h&&(l=-l),q=(0>g?-1:1)*l+p,s=k*(q-p)+t),p=a.x+2*f/3,t=a.y+2*g/3,u=p,y=t,Q.u(g,0)?y=0g?-1:1)*l+p,y=k*(u-p)+t),this.rn(),this.Vg(a),this.Uj(q,s),this.Uj(u,y),this.Vg(m),this.Ne(0,this.getLinkPoint(b,c,td,!0,!1, +d,e)),this.Ne(3,this.getLinkPoint(d,e,td,!1,!1,b,c))):(a=d,d=this.getLinkPoint(b,c,td,!0,!1,a,e),e=this.getLinkPoint(a,e,td,!1,!1,b,c),this.hasCurviness()?(g=e.x-d.x,b=e.y-d.y,c=this.computeCurviness(),a=d.x+g/2,m=d.y+b/2,f=a,h=m,Q.u(b,0)?h=0c&&(f=-f),f=(0>b?-1:1)*f+a,h=g*(f-a)+m),this.Vg(d),this.Uj(f,h)):this.Vg(d),this.Vg(e)));return!0}; +function Zp(a,b){Math.abs(b.x-a.x)>Math.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.sa()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var g=e=0,h=0,k=0;a=null;e=b.I;null===e||e.gf()||(e=e.I);if(null===e)e=d.x,g=d.y,h=c.x,k=c.y;else{a=e.Ve;e=1/(a.m11*a.m22-a.m12*a.m21);var h=a.m22*e,k=-a.m12*e,l=-a.m21*e,m=a.m11*e,n=e*(a.m21*a.dy-a.m22*a.dx),p=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*h+d.y*l+n;g=d.x*k+d.y*m+p;h=c.x*h+c.y*l+n;k=c.x*k+c.y*m+p}b.Bn(e,g,h,k,f);null!== +a&&f.transform(a);return f};function $p(a,b){var c=b.kq;null===c&&(c=new aq,c.port=b,c.dc=b.J,b.kq=c);return bq(c,a)} +W.prototype.getLinkPoint=function(a,b,c,d,e,f,g,h){void 0===h&&(h=new z);if(c.Jc())return b.Ra(c,h),h;if(c.Fn()&&(c=$p(this,b),null!==c)){h.assign(c.Jn);if(e&&this.sv===Jp){var k=$p(this,g);if(c.Al=l.x&&a.x<=l.x+l.width?h.x=a.x:a.y>=l.y&&a.y<=l.y+l.height&&(h.y=a.y);A(c);A(k)}}return h}f=b.Ra(Dd,Va());k=c=null;this.Z>(e?6:2)?(k=d?this.j(1):this.j(this.Z-2),e&&(k=Zp(f,k.copy()))): +(c=Va(),k=g.Ra(Dd,c),e&&(k=Zp(f,k)));this.getLinkPointFromPoint(a,b,f,k,d,h);A(f);null!==c&&A(c);return h}; +W.prototype.getLinkDirection=function(a,b,c,d,e,f,g,h){a:if(d.Jc())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)?(m=e?this.j(1):this.j(this.Z-2),m=f?Zp(k,m.copy()):c):(l=Va(),m=h.Ra(Dd,l));c=0;c=Math.abs(m.x-k.x)>Math.abs(m.y-k.y)?m.x>=k.x?0:180:m.y>= +k.y?90:270;A(k);null!==l&&A(l)}d.Fd()&&g.$g(a)&&(c+=180,360<=c&&(c-=360));a=wp;a=e?this.Br:this.ss;a===wp&&(a=e?b.Br:b.ss);switch(a){case xp:b=b.gk();c+=b;360<=c&&(c-=360);break;case wp:case Hm:b=b.gk();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.Fn()&&(a=$p(this,b),null!==a))return a.Ku;a=NaN;a=d?this.fk:this.Bk;null!==b&&isNaN(a)&&(a=d?b.fk:b.Bk);isNaN(a)&&(a=10);return a}; +W.prototype.computeSpot=function(a){return a?Xp(this,this.Ic):Yp(this,this.xd)};function Xp(a,b){if(null===b)return Dd;var c=a.Za;c.kc()&&(void 0===b&&(b=a.Ic),null!==b&&(c=b.Za));return c===ee?td:c}function Yp(a,b){if(null===b)return Dd;var c=a.ab;c.kc()&&(void 0===b&&(b=a.xd),null!==b&&(c=b.ab));return c===ee?td:c}W.prototype.computeOtherPoint=function(a,b){var c=b.Ra(Dd),d;d=b.kq;d=null!==d?bq(d,this):null;null!==d&&(c=d.Jn);return c}; +W.prototype.computeShortLength=function(a){return a?cq(this):dq(this)};function cq(a){var b=a.Cr;isNaN(b)&&(a=a.Ic,null!==a&&(b=a.Cr));return isNaN(b)?0:b}function dq(a){var b=a.us;isNaN(b)&&(a=a.xd,null!==a&&(b=a.us));return isNaN(b)?0:b} +W.prototype.Yi=function(a,b,c,d,e,f){if(!1===this.Of)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var g=f;void 0===f&&(g=hb(),g.reset());g.multiply(this.transform);if(this.xl(a,g))return to(this,b,c,e),void 0===f&&jb(g),!0;if(this.Gf(a,g)){var h=!1;if(!this.Yf)for(var k=this.la.l,l=k.length;l--;){var m=k[l];if(m.visible||m===this.Kb){var n=m.Q,p=this.ta;if(!(n.x>p.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=hb();n.set(g);if(m instanceof L)h=m.Yi(a,b,c,d,e,n);else if(this.path===m){var h= +m,q=a,s=d,p=n;if(!1===h.Of)h=!1;else if(p.multiply(h.transform),s)b:{var t=q,u=p;if(h.xl(t,u))h=!0;else{if(void 0===u&&(u=h.transform,t.Vi(h.Q))){h=!0;break b}var p=t.left,q=t.right,s=t.top,t=t.bottom,x=Va(),B=Va(),y=Va(),C=hb();C.set(u);C.IC(h.transform);C.ay();B.x=q;B.y=s;B.transform(C);x.x=p;x.y=s;x.transform(C);u=!1;Co(h,x,B,y)?u=!0:(x.x=q,x.y=t,x.transform(C),Co(h,x,B,y)?u=!0:(B.x=p,B.y=t,B.transform(C),Co(h,x,B,y)?u=!0:(x.x=p,x.y=s,x.transform(C),Co(h,x,B,y)&&(u=!0))));jb(C);A(x);A(B);A(y); +h=u}}else h=h.xl(q,p)}else h=Mm(m,a,d,n);h&&(null!==b&&(m=b(m)),m&&(null===c||c(m))&&e.add(m));jb(n)}}}void 0===f&&jb(g);return h||null!==this.background||null!==this.sl}void 0===f&&jb(g);return!1};H(W,{Jb:"isOrthogonal"},function(){return 2===(this.cl.value&2)});H(W,{mk:"isAvoiding"},function(){return 4===(this.cl.value&4)});W.prototype.computeCurve=function(){if(null===this.qh){var a=this.Ic,b=this.Jb;this.qh=null!==a&&a===this.xd&&!b}return this.qh?Ni:this.me}; +W.prototype.computeCorner=function(){if(this.me===Ni)return 0;var a=this.Kx;if(isNaN(a)||0>a)a=10;return a};W.prototype.computeCurviness=function(){var a=this.Gu;if(isNaN(a)){var b=this.xe;if(0!==b){var a=10,c=this.g;null!==c&&(a=c.hv);c=Math.abs(b);a=a/2+((c-1)/2|0)*a;0===c%2&&(a=-a);0>b&&(a=-a)}else a=10}return a};W.prototype.computeThickness=function(){var a=this.path;return null!==a?Math.max(a.Na,1):1};W.prototype.hasCurviness=function(){return!isNaN(this.Gu)||0!==this.xe&&!this.Jb}; +W.prototype.adjustPoints=function(a,b,c,d){var e=this.er;if(this.Jb){if(e===tn)return!1;e===un&&(e=sn)}switch(e){case tn:var f=this.j(a),g=this.j(c);if(!f.A(b)||!g.A(d)){var e=f.x,f=f.y,h=g.x-e,k=g.y-f,l=Math.sqrt(h*h+k*k);if(!Q.u(l,0)){var m=0;Q.u(h,0)?m=0>k?-Math.PI/2:Math.PI/2:(m=Math.atan(k/Math.abs(h)),0>h&&(m=Math.PI-m));var g=b.x,n=b.y,k=d.x-g,p=d.y-n,q=Math.sqrt(k*k+p*p),h=0;Q.u(k,0)?h=0>p?-Math.PI/2:Math.PI/2:(h=Math.atan(p/Math.abs(k)),0>k&&(h=Math.PI-h));l=q/l;m=h-m;this.Ne(a,b);for(a+= +1;ak?-Math.PI/2:Math.PI/2:(p=Math.atan(k/Math.abs(h)),0>h&&(p=Math.PI-p)),h=p+m,b*=l,this.L(a,g+b*Math.cos(h),n+b*Math.sin(h)));this.Ne(c,d)}}return!0;case un:f=this.j(a);n=this.j(c);if(!f.A(b)||!n.A(d)){var e=f.x,f=f.y,g=n.x,n=n.y,l=(g-e)*(g-e)+(n-f)*(n-f),h=b.x,m=b.y,k=d.x,p=d.y,q=0,s=1,q=0!==k-h?(p-m)/(k-h):9E9;0!==q&&(s=Math.sqrt(1+1/(q*q)));this.Ne(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 g=e.Q.copy(),h=f.Q.copy();if(g.w()&&h.w()){g.Ze(8,8);h.Ze(8,8);g.Zh(a);h.Zh(c);var k,l;if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&h.right>a.x)k=new z(c.x,a.y),l=new z(c.x,(a.y+c.y)/2),180===d?(k.x=this.computeMidOrthoPosition(a.x,c.x,!1),l.x=k.x,l.y=c.y):270===d&&c.ya.y?(k.x=a.xh.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):h.right,l.x=k.x,l.y=c.y):0===d&&a.xh.top&&a.yg.bottom)180===d&&(h.na(a)||g.na(c))?k.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(180===d||270===d)&&(k.y=this.computeMidOrthoPosition(g.bottom,Math.min(c.y,h.top),!0)),l.x=c.x,l.y=k.y;if(k.y>g.top&&k.y=g.left&&c.x<=a.x||a.x<=h.right&&a.x>=c.x){if(90===d||270===d)k=new z(Math.max((a.x+c.x)/2,a.x),a.y),l=new z(k.x,c.y)}else k.y=270===d||(0===d||180===d)&&c.ya.y&&h.lefta.y?(k.x=a.x>h.right?this.computeMidOrthoPosition(a.x,h.right,!1):a.x>h.left&&(270===d&&a.yh.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):h.left,l.x=k.x,l.y=c.y):180===d&&a.x>h.right&&a.y>h.top&&a.yg.bottom)0===d&&(h.na(a)||g.na(c))?k.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(0===d||270===d)&&(k.y=this.computeMidOrthoPosition(g.bottom,Math.min(c.y,h.top),!0)),l.x=c.x,l.y=k.y;if(k.y>g.top&&k.y=a.x||a.x>=h.left&&a.x<=c.x){if(90===d||270===d)k=new z(Math.min((a.x+c.x)/2,a.x),a.y),l=new z(k.x,c.y)}else k.y=270=== +d||(0===d||180===d)&&c.ya.y||180===d&&c.xa.y||0===d&&c.x>a.x&&h.bottom>a.y)k=new z(a.x,c.y),l=new z((a.x+c.x)/2,c.y),270===d?(k.y=this.computeMidOrthoPosition(a.y,c.y,!0),l.x=c.x,l.y=k.y):180===d&&c.xa.x?(k.y=a.yh.right)? +this.computeMidOrthoPosition(a.y,c.y,!0):h.bottom,l.x=c.x,l.y=k.y):90===d&&a.yh.left&&a.xg.right)270===d&&(h.na(a)||g.na(c))?k.x=this.computeMidOrthoPosition(a.x,c.x,!1):c.xa.x&&(270===d||180===d)&&(k.x=this.computeMidOrthoPosition(g.right, +Math.min(c.x,h.left),!1)),l.x=k.x,l.y=c.y;if(k.x>g.left&&k.x=g.top&&c.y<=a.y||a.y<=h.bottom&&a.y>=c.y){if(0===d||180===d)k=new z(a.x,Math.max((a.y+c.y)/2,a.y)),l=new z(c.x,k.y)}else k.x=180===d||(90===d||270===d)&&c.xa.x&&h.top=a.x?(k.y=a.y>h.bottom?this.computeMidOrthoPosition(a.y,h.bottom,!0):a.y>h.top&&(180===d&&a.xh.right)?this.computeMidOrthoPosition(a.y,c.y,!0):h.top,l.x=c.x,l.y=k.y):270===d&&a.y>h.bottom&&a.x>h.left&&a.xg.right)90===d&&(h.na(a)||g.na(c))?k.x=this.computeMidOrthoPosition(a.x, +c.x,!1):c.xa.x&&(90===d||180===d)&&(k.x=this.computeMidOrthoPosition(g.right,Math.min(c.x,h.left),!1)),l.x=k.x,l.y=c.y;if(k.x>g.left&&k.x=a.y||a.y>=h.top&&a.y<=c.y){if(0===d||180===d)k=new z(a.x,Math.min((a.y+c.y)/2,a.y)),l=new z(c.x,k.y)}else k.x=180===d||(90===d||270===d)&&c.xh&&0!==fq(e,c.x,c.y)){gq(this,e,c.x,c.y,d,!0);d=this.j(2);if(4>this.Z)0===b||180===b?(d.x=a.x,d.y=c.y):(d.x=c.x,d.y=a.y),this.L(2,d.x,d.y),this.n(3,d.x,d.y);else if(c=this.j(3),0===b||180=== +b)Q.u(d.x,c.x)?(b=0===b?Math.max(d.x,a.x):Math.min(d.x,a.x),this.L(2,b,a.y),this.L(3,b,c.y)):Q.u(d.y,c.y)?(Math.abs(a.y-d.y)<=e.on/2&&(this.L(2,d.x,a.y),this.L(3,c.x,a.y)),this.n(2,d.x,a.y)):this.L(2,a.x,d.y);else if(90===b||270===b)Q.u(d.y,c.y)?(b=90===b?Math.max(d.y,a.y):Math.min(d.y,a.y),this.L(2,a.x,b),this.L(3,c.x,b)):Q.u(d.x,c.x)?(Math.abs(a.x-d.x)<=e.qn/2&&(this.L(2,a.x,d.y),this.L(3,a.x,c.y)),this.n(2,a.x,d.y)):this.L(2,d.x,a.y);a=!0}else a=!1}else a=!1;a||(this.Vg(k),this.Vg(l))}}; +W.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2};function Fh(a){if(!a.mk)return!1;var b=a.points.l,c=b.length;if(4>c)return!1;a=im(a.g,!0,a.Ca,null);for(var d=1;da){var b=new Ke(Le),c=new Me(0,0);b.Xa.add(c);return b}var d=!1,b=this.g;null!==b&&0!==b.V.be&&Up(this)&&(d=!0);var c=b=0,e=this.j(0).copy(),f=e.copy(),b=this.nc.l,g=this.computeCurve();if(g===Ni&&3<=a&&!Q.Sa(this.eo,0))if(3===a)var h=this.j(1),b=Math.min(e.x,h.x),c=Math.min(e.y,h.y),h=this.j(2),b=Math.min(b,h.x),c=Math.min(c,h.y);else{if(this.Jb)for(h=0;h=a&&(h= +a-1),b=this.j(h),f.x=Math.min(b.x,f.x),f.y=Math.min(b.y,f.y);b=f.x;c=f.y}else{for(h=0;hx?q>p?(t.x=B-C,t.y=p-C,u.x=B+s,u.y=p+s):(t.x=B- +C,t.y=p+C,u.x=B+s,u.y=p-s):q>p?(t.x=B+C,t.y=p-C,u.x=B-s,u.y=p+s):(t.x=B+C,t.y=p+C,u.x=B-s,u.y=p-s));Q.Sa(x,B)&&Q.Sa(p,q)&&(p>n?(y>B?(t.x=B-C,t.y=p-C,u.x=B+s):(t.x=B+C,t.y=p-C,u.x=B-s),u.y=p+s):(y>B?(t.x=B-C,t.y=p+C,u.x=B+s):(t.x=B+C,t.y=p+C,u.x=B-s),u.y=p-s));if(Q.Sa(x,B)&&Q.Sa(B,y)||Q.Sa(n,p)&&Q.Sa(p,q))x=.5*(x+y),n=.5*(n+q),t.x=x,t.y=n,u.x=x,u.y=n;1===h?(e.x=.5*(d.x+l.x),e.y=.5*(d.y+l.y)):2===h&&Q.Sa(d.x,this.j(0).x)&&Q.Sa(d.y,this.j(0).y)&&(e.x=.5*(d.x+l.x),e.y=.5*(d.y+l.y));T(k,e.x-b,e.y-c,g.x- +b,g.y-c,l.x-b,l.y-c);f.set(g);e.set(a);d=l}}h=d.x;d=d.y;f=this.j(this.Z-1);h=.5*(h+f.x);d=.5*(d+f.y);T(k,a.x-b,a.y-c,h-b,d-c,f.x-b,f.y-c)}else for(h=3;h=a&&(h=a-1),f=this.j(h-1),e=this.j(h),h===a-1&&0!==dq(this)&&(e=e.copy(),hq(this,e,!1,Q.ej)),T(k,d.x-b,d.y-c,f.x-b,f.y-c,e.x-b,e.y-c);else{f=Va();f.assign(this.j(0));for(h=1;h=a-1){f!==t&&(0!==dq(this)&&(t=t.copy(),hq(this,t,!1,Q.ej)),kq(this,k,-b,-c,f,t,d));break}h=iq(this,t,h+1,h< +a-3);e=k;g=-b;l=-c;m=f;u=this.j(h);x=f;n=d;Q.u(m.y,t.y)&&Q.u(t.x,u.x)?(s=this.computeCorner(),s=Math.min(s,Math.abs(t.x-m.x)/2),s=B=Math.min(s,Math.abs(u.y-t.y)/2),Q.u(s,0)?(kq(this,e,g,l,m,t,n),x.assign(t)):(p=t.x,y=t.y,q=p,C=y,p=t.x>m.x?t.x-s:t.x+s,C=u.y>t.y?t.y+B:t.y-B,kq(this,e,g,l,m,new z(p,y),n),df(e,t.x+g,t.y+l,q+g,C+l),x.k(q,C))):Q.u(m.x,t.x)&&Q.u(t.y,u.y)?(s=this.computeCorner(),B=Math.min(s,Math.abs(t.y-m.y)/2),B=s=Math.min(B,Math.abs(u.x-t.x)/2),Q.u(s,0)?(kq(this,e,g,l,m,t,n),x.assign(t)): +(p=t.x,C=y=t.y,y=t.y>m.y?t.y-B:t.y+B,q=u.x>t.x?t.x+s:t.x-s,kq(this,e,g,l,m,new z(p,y),n),df(e,t.x+g,t.y+l,q+g,C+l),x.k(q,C))):(kq(this,e,g,l,m,t,n),x.assign(t))}A(f)}b=k.m;F(k)}return b};function jq(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return Q.Sa(a,0)?b:Q.Sa(b,0)?a:Math.sqrt(a*a+b*b)} +function hq(a,b,c,d){var e=a.Z;if(!(2>e))if(c){var f=a.j(1);c=f.x-d.x;d=f.y-d.y;f=jq(b.x,b.y,c,d);0!==f&&(e=2===e?.5*f:f,a=cq(a),a>e&&(a=e),c=a*(c-b.x)/f,a=a*(d-b.y)/f,b.x+=c,b.y+=a)}else f=a.j(e-2),c=f.x-d.x,d=f.y-d.y,f=jq(b.x,b.y,c,d),0!==f&&(e=2===e?.5*f:f,a=dq(a),a>e&&(a=e),c=a*(b.x-c)/f,a=a*(b.y-d)/f,b.x-=c,b.y-=a)} +function iq(a,b,c,d){for(var e=a.Z,f=b;Q.Sa(b.x,f.x)&&Q.Sa(b.y,f.y);){if(c>=e)return e-1;f=a.j(c++)}if(!Q.Sa(b.x,f.x)&&!Q.Sa(b.y,f.y))return c-1;for(var g=f;Q.Sa(b.x,f.x)&&Q.Sa(f.x,g.x)&&(!d||(b.y>=f.y?f.y>=g.y:f.y<=g.y))||Q.Sa(b.y,f.y)&&Q.Sa(f.y,g.y)&&(!d||(b.x>=f.x?f.x>=g.x:f.x<=g.x));){if(c>=e)return e-1;g=a.j(c++)}return c-2} +function kq(a,b,c,d,e,f,g){if(!g&&Up(a)){g=[];var h=0;a.sa()&&(h=lq(a,e,f,g));var k=e.x,k=e.y;if(0n-10)l--,n=Math.max(p-5,f.x);else break;p=f.y-10+d;m=n+c;n=f.y+d;a.me===Di?S(b,m,n,!1,!1):T(b,k,p,m,p,m,n)}else if(Q.u(e.x,f.x))if(e.yn-10)l--,n=Math.max(p-5,f.y);else break;p=f.x-10+c;m=f.x+c;n+=d;a.me===Di?S(b,m,n,!1,!1):T(b,p,k,p,n,m,n)}}b.lineTo(f.x+c,f.y+d)} +function lq(a,b,c,d){var e=a.g;if(null===e||b.A(c))return 0;for(e=e.fv;e.next();){var f=e.value;if(null!==f&&f.visible)for(var f=f.hb.l,g=f.length,h=0;hg.x&&m.x>l.x||l.xg.y&&m.y>l.y||l.yt&&Math.min(g,x)p&&!Q.u(g,x)){m.x=t;m.y=p;m=!0;break a}}else if(!Q.u(p,s)&&Q.u(g,x)&&Math.min(p, +s)g&&Math.min(t,u)n&&!Q.u(t,u)){m.x=n;m.y=g;m=!0;break a}m.x=0;m.y=0;m=!1}m&&(e?c.push(h.x):c.push(h.y));g=l}A(h)}H(W,{yr:"firstPickIndex"},function(){return 2>=this.Z?0:this.Jb||Xp(this)!==td?1:0});H(W,{ev:"lastPickIndex"},function(){var a=this.Z;return 0===a?0:2>=a?a-1:this.Jb||Yp(this)!==td?a-2:a-1});function Up(a){a=a.me;return a===ti||a===Di}function Wp(a,b){if(b||Up(a)){var c=a.g;null===c||c.Jk.contains(a)||null===a.$w||c.Jk.add(a,a.$w)}} +function Fi(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.bc){var d=c.g;if(null!==d)for(var e=!1,d=d.fv;d.next();){var f=d.value;if(f.visible)if(f===c)for(var e=!0,g=!1,f=f.hb.l,h=f.length,k=0;kb.links.count)1===b.links.count&&(c=b.links.l[0],c.dm=null,c.xe=0,c.Ab()),c=b.Sn,null!==b&&null!==c.xg&&c.xg.remove(b),c=b.Xr,null!==b&&null!==c.xg&&c.xg.remove(b);else for(c=Math.abs(c),a=0===c%2,b=b.links.i;b.next();){var d=b.value,e=Math.abs(d.xe),f=0===e%2;e>c&&a===f&&(d.xe=0=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.pf=Math.floor((a.x-this.yd)/this.yd)*this.yd;this.qf=Math.floor((b-this.zd)/this.zd)*this.zd;this.Ip=Math.ceil((c+2*this.yd)/this.yd)*this.yd;this.Jp=Math.ceil((d+2*this.zd)/this.zd)*this.zd;a=1+(Math.ceil((this.Ip-this.pf)/this.yd)|0);b=1+(Math.ceil((this.Jp-this.qf)/this.zd)|0);if(null===this.Ob||this.fnthis.Ip||a+cthis.Jp||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.fn)|0;for(c=Math.min(b+e-1,this.gn)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.Ob[a][e])return!1;return!0}; +function pq(a,b,c,d,e,f,g,h,k){if(!(bg||ck)){var l,m;l=b|0;m=c|0;var n=a.Ob[l][m];if(1<=n&&999999>n)for(e?m+=d:l+=d,n+=1;f<=l&&l<=g&&h<=m&&m<=k&&!(n>=a.Ob[l][m]);)a.Ob[l][m]=n,n+=1,e?m+=d:l+=d;l=e?m:l;if(e)if(0l;c+=d)pq(a,b,c,1,!e,f,g,h,k),pq(a,b,c,-1,!e,f,g,h,k);else if(0l;b+=d)pq(a,b,c,1,!e,f,g,h,k),pq(a,b,c,-1,!e,f,g, +h,k)}}function qq(a,b,c,d,e,f,g,h,k,l,m){for(var n=b|0,p=c|0,q=a.Ob[n][p];0===q&&n>h&&nl&&p=Math.abs(n-d)&&1>=Math.abs(p-e))return a.abort=!0,0;n=b|0;p=c|0;q=a.Ob[n][p];b=1;for(a.Ob[n][p]=b;0===q&&n>h&&nl&&p=Math.abs(g-k)&&1>=Math.abs(h-l))a.abort=!0;else{var m=f.x;b=f.y;d=f.x+f.width;var n=f.y+f.height,m=m-a.pf,m=m/a.yd;b-=a.qf;b/=a.zd;d-=a.pf;d/=a.yd;n-=a.qf;n/=a.zd;f=Math.max(0,Math.min(a.fn,m|0));d=Math.min(a.fn,Math.max(0,d|0));b=Math.max(0,Math.min(a.gn,b|0));var n=Math.min(a.gn,Math.max(0,n|0)),g=g|0,h=h|0,k=k|0, +l=l|0,m=g,p=h,q=0===c||90===c?1:-1;(c=90===c||270===c)?p=qq(a,g,h,k,l,q,c,f,d,b,n):m=qq(a,g,h,k,l,q,c,f,d,b,n);if(!a.abort){a:{c=0===e||90===e?1:-1;e=90===e||270===e;for(var q=k|0,s=l|0,t=a.Ob[q][s];0===t&&q>f&&qb&&s=Math.abs(q-g)&&1>=Math.abs(s-h)){a.abort=!0;break a}q=k|0;s=l|0;t=a.Ob[q][s];for(a.Ob[q][s]=999999;0===t&&q>f&&qb&&s=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case 3:return c>a&&c<=180+a?180:270;case 5:return c>180-a&&c<=360-a?270:0;case 12:return c>a&&c<=180+a?90:0;case 10:return c>180-a&&c<=360-a?180:90;case 7:return 90180+a&&c<=360-a?270:0;case 13:return 180a&&180>=c?90:0;case 14:return c> +a&&c<=180-a?90:c>180-a&&270>=c?180:0;case 11:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&15!==b&&(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} +function bq(a,b){var c=a.Kf;if(0===c.length){a:if(!a.Rn){c=a.Rn;a.Rn=!0;var d,e=null,f=a.dc,f=f instanceof Wg?f:null;if(null===f||f.td)d=a.dc.$B(a.port.bd);else{if(!f.Q.w()){a.Rn=c;break a}e=f;d=e.ZB()}var g=a.Kf.length=0,h=a.port.Ra(ud,Va()),k=a.port.Ra(Hd,Va()),f=db(h.x,h.y,0,0);f.Zh(k);A(h);A(k);h=Wa(f.x+f.width/2,f.y+f.height/2);for(d=d.i;d.next();)if(k=d.value,k.sa()){var l=td,m=k.Ic===a.port||k.M.$g(e),l=m?Xp(k,a.port):Yp(k,a.port);if(l.Fn()&&(m=m?k.xd:k.Ic,null!==m)){var n=m.J;if(null!==n){var m= +k.computeOtherPoint(n,m),n=h.Ph(m),l=rq(f,l,n,k.Jb),p=0;0===l?(p=4,180Math.abs(J)?(y=Math.abs(J)/p,p=Math.abs(J)):y=1;break;case 2:q>Math.abs(K)? +(y=Math.abs(K)/q,q=Math.abs(K)):y=1;break;case 1:m>Math.abs(J)?(y=Math.abs(J)/m,m=Math.abs(J)):y=1;break;default:case 4:n>Math.abs(K)?(y=Math.abs(K)/n,n=Math.abs(K)):y=1}B=0}var ba=t.Jn;if(e===yp){u=t.link.computeThickness();u*=y;ba.set(C);switch(x){case 8:ba.x=C.x+J/2+p/2-B-u/2;break;case 2:ba.y=C.y+K/2+q/2-B-u/2;break;case 1:ba.x=C.x+J/2-m/2+B+u/2;break;default:case 4:ba.y=C.y+K/2-n/2+B+u/2}B+=u}else u=.5,e===vp&&(u=(t.Cn+1)/(t.Al+1)),ba.x=C.x+J*u,ba.y=C.y+K*u}A(h);A(d);A(k);A(l);C=a.Kf;for(J=0;J< +C.length;J++)K=C[J],null!==K&&(K.Ku=a.computeEndSegmentLength(K));a.Rn=c;fb(f)}c=a.Kf}for(f=0;fb.wd?1:a.angleb.angle?1:0}; +aq.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.dc,this.port,td,b.Ic===this.port),d=a.Cn;if(0>d)return c;var e=a.Al;if(1>=e||!b.Jb)return c;var b=a.mv,f=a.Jn;if(2===a.wd||8===a.wd)d=e-1-d;return((a=2===a.wd||4===a.wd)?b.ye&&(e=h.right);h.bottom>f&&(f=h.bottom)}}isFinite(c)&&isFinite(d)?a.k(c,d,e-c,f-d):(b=b.location,c=this.padding,a.k(b.x+c.left,b.y+c.top,0,0));return a}; +G(Si,{padding:"padding"},function(){return this.ge},function(a){"number"===typeof a?((isNaN(a)||0>a)&&za(a,">= 0",Si,"padding"),a=new qd(a)):(ra(a,qd,Si,"padding"),(isNaN(a.left)||0>a.left)&&za(a.left,">= 0",Si,"padding:value.left"),(isNaN(a.right)||0>a.right)&&za(a.right,">= 0",Si,"padding:value.right"),(isNaN(a.top)||0>a.top)&&za(a.top,">= 0",Si,"padding:value.top"),(isNaN(a.bottom)||0>a.bottom)&&za(a.bottom,">= 0",Si,"padding:value.bottom"));var b=this.ge;b.A(a)||(this.ge=a=a.O(),this.h("padding", +b,a))});function lg(){0=c-1?(g=0,e=d,f+=h+20,h=0):g++}null!==a&&a.od("Layout")}this.Ke=!0};lg.prototype.wy=function(a){return!a.location.w()||a instanceof Wg&&a.Uw?!0:!1}; +function vq(a,b,c,d,e,f,g,h){for(c=c.i;c.next();){var k=c.value;d&&!k.bv||null!==e&&!e(k)||!k.canLayout()||(f&&k instanceof V?k.Ie||(k instanceof Wg?null===k.vb?vq(a,b,k.lc,!1,e,f,g,h):b.add(k):b.add(k)):g&&k instanceof W?b.add(k):!h||!k.Zc()||k instanceof V||b.add(k))}} +lg.prototype.collectParts=function(a){var b=new Xb(O);a instanceof M?(vq(this,b,a.Mf,!0,null,!0,!0,!0),vq(this,b,a.links,!0,null,!0,!0,!0),vq(this,b,a.bj,!0,null,!0,!0,!0)):a instanceof Wg?vq(this,b,a.lc,!1,null,!0,!0,!0):vq(this,b,a.i,!1,null,!0,!0,!0);return b};G(lg,{md:"arrangementOrigin"},function(){return this.uo},function(a){ra(a,z,lg,"arrangementOrigin");this.uo.A(a)||(this.uo.assign(a),this.v())}); +lg.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.Ra(ud),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a};function kc(){sb(this);this.ed=null;this.clear()}vb("LayoutNetwork",kc); +kc.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 Xb(lc);this.edges=new Xb(sc);this.Ay=new Fb(V,lc);this.ny=new Fb(W,sc)}; +kc.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}; +lc.smartComparer=function(a,b){if(null!==a){if(null!==b){var c=a.Ec,d=b.Ec;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>=g&&(f=1);c=this.spacing.width;isFinite(c)||(c=0);a=this.spacing.height;isFinite(a)||(a=0);null!==b&&b.Bb("Layout");d=[];switch(this.alignment){case Ln:var h= +c,k=a,l=Math.max(this.pn.width,1);if(!isFinite(l))for(var m=l=0;mf-1|| +0g)d.push(new D(0,x,g+h,y)),B=0,u=t,x+=y,y=0;y=Math.max(y,K);K=0;switch(s){case Jn:K=-p.width;break;default:K=0}n.moveTo(u+K,x);switch(s){case Jn:u-=C;break;default:u+=C}B++}d.push(new D(0,x,g+h,y));break;case Kn:h=f;k=c;l=a;m=Math.max(this.pn.width,1);n=x=C=0;p=Va();for(f=0;f=C&&(g-=C);for(var C=K=0,J=Math.max(this.pn.height,1),ja=n=0,Y=!0,P=Va(),f=0;fh-1||0g){d.push(new D(0,Y?B-n:B,g+k,ja+n+l));for(ba=0;baC&&(e.width+=e.x-C,e.x=C)}for(h=f=g=e=0;hd?1:0}; +um.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.ra=0,a.Ba=0);else{var b=new N(Eq);b.ld(a.i);a=new N(Eq);var c=new N(Eq),d;d=this.sort(b);var e=this.sw,f=this.Sz,g=this.Nc,h=this.tm,k=this.tw,l=this.Qo,b=this.vj,m=this.lB,n=this.yf,p=this.Rs,e=this.We,f=this.jv,g=this.oG;if(!isFinite(g)|| +0>=g)g=NaN;h=this.xE;if(!isFinite(h)||0>=h)h=1;k=this.bh;isFinite(k)||(k=0);l=this.Xh;if(!isFinite(l)||360l)l=360;b=this.spacing;isFinite(b)||(b=NaN);e===Zn&&f===$n?e=Yn:e===Zn&&f!==$n&&(f=$n,e=this.We);if((this.direction===Sn||this.direction===Tn)&&this.sorting!==Rn){for(var q=0;!(q>=d.length);q+=2){a.add(d.Y(q));if(q+1>=d.length)break;c.add(d.Y(q+1))}this.direction===Sn?(this.We===Zn&&a.reverse(),d=new N(Eq),d.ld(a),d.ld(c)):(this.We===Zn&&c.reverse(),d=new N(Eq),d.ld(c),d.ld(a))}for(var s= +d.length,t=m=0,q=0;ql&&(0===q||q===d.length-1)&&(u/=2);m+=u;t++}if(isNaN(g)||e===Zn){isNaN(b)&&(b=6);if(e!==Yn&&e!==Zn){u=-Infinity;for(q=0;qg?(g=q,n=g*h):p=t/(360<=l?s:s-1)}this.sw=e;this.Sz=f;this.Nc=g;this.tm=h;this.tw=k;this.Qo=l;this.vj=b;this.lB=m;this.yf=n;this.Rs=p;b=d;d=this.sw;e=this.Nc;f=this.tw;h=this.Qo;k=this.vj;l=this.yf;m=this.Rs;if(this.direction!==Sn&&this.direction!==Tn||d!==Zn)if(this.direction===Sn||this.direction===Tn){g=0;switch(d){case Xn:g=180*Iq(this,e,l,f,m)/Math.PI;break;case Yn:m=b=0;g=a.first();null!==g&&(b=Fq(g,Math.PI/2));g=c.first();null!==g&&(m=Fq(g,Math.PI/2));g=180*Iq(this,e,l,f,k+(b+ +m)/2)/Math.PI;break;case Wn:g=h/b.length}if(this.direction===Sn){switch(d){case Xn:Jq(this,a,f,Vn);break;case Yn:Kq(this,a,f,Vn);break;case Wn:Lq(this,a,h/2,f,Vn)}switch(d){case Xn:Jq(this,c,f+g,Un);break;case Yn:Kq(this,c,f+g,Un);break;case Wn:Lq(this,c,h/2,f+g,Un)}}else{switch(d){case Xn:Jq(this,c,f,Vn);break;case Yn:Kq(this,c,f,Vn);break;case Wn:Lq(this,c,h/2,f,Vn)}switch(d){case Xn:Jq(this,a,f+g,Un);break;case Yn:Kq(this,a,f+g,Un);break;case Wn:Lq(this,a,h/2,f+g,Un)}}}else switch(d){case Xn:Jq(this, +b,f,this.direction);break;case Yn:Kq(this,b,f,this.direction);break;case Wn:Lq(this,b,h,f,this.direction);break;case Zn:Mq(this,b,h,f,this.direction)}else Mq(this,b,h,f-h/2,Un)}this.updateParts();this.network=null;this.Ke=!0}; +function Lq(a,b,c,d,e){var f=a.Qo,g=a.Nc;a=a.yf;d=d*Math.PI/180;c=c*Math.PI/180;for(var h=b.length,k=0;kc){for(f=d+(e===Un?f:-f);0>f;)f+=360;f%=360;180=m.length-1)break;Pq(a,k,l,m,n,e,f)||Qq(a,k,l,m,n,e,f);k=f.x;l=f.y}A(f);a.$k++;if(!(23Math.abs(q)?Math.abs(k-f)<(m[0].width+m[m.length-1].width)/2&&(g=0):g=0Math.abs(p)?0:p;p=!1;p=Math.abs(f)>Math.abs(n)?0n:0a.$k?a.Nc-g/(2*Math.PI):5>m.length&&10=n.length-1)break;Pq(a,k,l,n,p,e,m)||Qq(a,k,l,n,p,e,m);k=m.x;l=m.y}A(m);a.$k++;if(!(23a.$k?a.Nc-f/(2*Math.PI):a.Nc-(0h){l=b-a;if(l<-h)return g.x=l,g.y=m,!1;n=!0}}else if(l=b-a,l<-h){l=b+a;if(l>h)return g.x=l,g.y=m,!1;n=!0}m=Math.sqrt(1-Math.min(1,l*l/(h*h)))*k;0>c!==n&&(m=-m);if(Math.abs(c-m)>(d[e].height+d[e+1].height)/2)return g.x=l,g.y=m,!1;g.x=l;g.y=m;return!0} +function Qq(a,b,c,d,e,f,g){var h=a.Nc,k=a.yf,l=0,m=0;a=(d[e].height+d[e+1].height)/2+a.vj;d=!1;if(0<=b!==(f===Un)){if(m=c-a,m<-k){m=c+a;if(m>k){g.x=l;g.y=m;return}d=!0}}else if(m=c+a,m>k){m=c-a;if(m<-k){g.x=l;g.y=m;return}d=!0}l=Math.sqrt(1-Math.min(1,m*m/(k*k)))*h;0>b!==d&&(l=-l);g.x=l;g.y=m}Mn.prototype.commitLayout=function(){this.commitNodes();this.av&&this.commitLinks()}; +Mn.prototype.commitNodes=function(){for(var a=this.pE,b=this.network.vertexes.i;b.next();){var c=b.value;c.x+=a.x;c.y+=a.y;c.commit()}};Mn.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()}; +function Hq(a,b,c,d,e){var f=a.hE;if(.001>Math.abs(a.tm-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 g=0,h=0,h=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1)),k=0,l=0;l<=f;l++)k=void 0!==d&&void 0!==e?d+l*e/f:l*Math.PI/(2*f),k=Math.sin(k),g+=Math.sqrt(1-a*a*k*k)*h;return void 0!==d&&void 0!==e?(b>c?b:c)*g:4*(b>c?b:c)*g}function Gq(a,b,c,d,e){var f=0,f=void 0!==d&&void 0!==e?Hq(a,1,c,d,e):Hq(a,1,c);return b/f} +function Iq(a,b,c,d,e){if(.001>Math.abs(a.tm-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,g=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var h=0;;h++){var k=Math.sin(d+h*a),g=g+(b>c?b:c)*Math.sqrt(1-f*f*k*k)*a;if(g>=e)return h*a}} +Mn.prototype.sort=function(a){switch(this.sorting){case Pn:break;case Qn:a.reverse();break;case Nn:a.sort(this.comparer);break;case On:a.sort(this.comparer);a.reverse();break;case Rn:for(var b=[],c=0;ce&&(e=h,f=g)}else for(g=0;ge&&(e=h,f=g);d.add(a.Y(f));b[f]=-1;f=a.Y(f);e=0;for(g=f.Mb;g.next();)e=a.indexOf(g.value.fromVertex),0>e||0<=b[e]&&b[e]++; +for(f=f.Hb;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(b=0;ba[b].indexOf(k)&&a[b].push(k);for(c=g.Mb;c.next();)k=d.indexOf(c.value.fromVertex),k!==b&&0>a[b].indexOf(k)&&a[b].push(k)}g=[];for(b=0;ba[c[n]].indexOf(c[n===c.length-1?0:n+1])&&t.push(n===c.length-1?0:n+1);if(0===t.length)for(n=0;nK.indexOf(Y)||PK.indexOf(Y)||P=u?k+1:k)),B+=k=u&&k++,C>=u&&C++,k>C&&(K=C,C=k,k=K),C-k<(c.length+2)/2===(kp||p===k||(s=p>k?p-k:k-p,n+=pl-s?1:-1);c.splice(0>n?k:k+1,0,b);e.splice(g,1);g--}else h=!1;if(h)break;else c.push(e[0]),e.splice(0,1)}for(b=0;b=a?a:360,this.v())}); +G(Mn,{We:"arrangement"},function(){return this.sc},function(a){this.sc!==a&&(va(a,Mn,Mn,"arrangement"),a===Zn||a===Yn||a===Xn||a===Wn)&&(this.sc=a,this.v())});G(Mn,{direction:"direction"},function(){return this.aa},function(a){this.aa!==a&&(va(a,Mn,Mn,"direction"),a===Un||a===Vn||a===Sn||a===Tn)&&(this.aa=a,this.v())});G(Mn,{sorting:"sorting"},function(){return this.Rg},function(a){this.Rg!==a&&(va(a,Mn,Mn,"sorting"),a===Pn||a===Qn||a===Nn||On||a===Rn)&&(this.Rg=a,this.v())}); +G(Mn,{comparer:"comparer"},function(){return this.zg},function(a){this.zg!==a&&(w(a,"function",Mn,"comparer"),this.zg=a,this.v())});G(Mn,{spacing:"spacing"},function(){return this.Sg},function(a){this.Sg!==a&&(w(a,"number",Mn,"spacing"),this.Sg=a,this.v())});G(Mn,{jv:"nodeDiameterFormula"},function(){return this.Zp},function(a){this.Zp!==a&&(va(a,Mn,Mn,"nodeDiameterFormula"),a===ao||a===$n)&&(this.Zp=a,this.v())});H(Mn,{qE:"actualXRadius"},function(){return this.Nc});H(Mn,{rE:"actualYRadius"},function(){return this.yf}); +H(Mn,{eH:"actualSpacing"},function(){return this.vj});H(Mn,{pE:"actualCenter"},function(){return isNaN(this.md.x)||isNaN(this.md.y)?new z(0,0):new z(this.md.x+this.qE,this.md.y+this.rE)});var Yn;Mn.ConstantSpacing=Yn=I(Mn,"ConstantSpacing",0);var Xn;Mn.ConstantDistance=Xn=I(Mn,"ConstantDistance",1);var Wn;Mn.ConstantAngle=Wn=I(Mn,"ConstantAngle",2);var Zn;Mn.Packed=Zn=I(Mn,"Packed",3);var Un;Mn.Clockwise=Un=I(Mn,"Clockwise",4);var Vn;Mn.Counterclockwise=Vn=I(Mn,"Counterclockwise",5);var Sn; +Mn.BidirectionalLeft=Sn=I(Mn,"BidirectionalLeft",6);var Tn;Mn.BidirectionalRight=Tn=I(Mn,"BidirectionalRight",7);var Pn;Mn.Forwards=Pn=I(Mn,"Forwards",8);var Qn;Mn.Reverse=Qn=I(Mn,"Reverse",9);var Nn;Mn.Ascending=Nn=I(Mn,"Ascending",10);var On;Mn.Descending=On=I(Mn,"Descending",11);var Rn;Mn.Optimized=Rn=I(Mn,"Optimized",12);var ao;Mn.Pythagorean=ao=I(Mn,"Pythagorean",13);var $n;Mn.Circular=$n=I(Mn,"Circular",14);function Cq(){this.zn=-Infinity;this.ko=this.Tl=null} +Cq.prototype.compare=function(a,b){if(0this.zn||Math.abs(a)a&&0f?(e=m.x+m.width/2,h=m.y+m.height/2,k[0]=new z(m.x+m.width+d.width,m.y),k[1]=new z(m.x,m.y+m.height+d.height),f=2):(n=Vq(k,f,e,h,m.width,m.height,d),p=k[n],q=new z(p.x+m.width+d.width, +p.y),s=new z(p.x,p.y+m.height+d.height),n+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().Qa,d=this.network.vertexes.i;d.next();){if(d.value.Qa.Gf(c)&&(a++,2a.network.vertexes.count)return!1;null===a.xf?a.xf=new N($q):a.xf.clear();a.xf.ld(a.network.vertexes);var c=a.xf;c.sort(function(a,b){return null===a||null===b||a===b?0:b.df-a.df});for(var d=c.count-1;0<=d&&1>=c.Y(d).df;)d--;return 1=g))){for(var l=0,m=0,n=k.count-g;ns&&(s=1);l=Q.sqrt((l+s+m*m*4/(g*g))/s);g=(l-1)*n/2;l=(l-1)*p/2;f.Qa=new D(k-q.x-g,h-q.y-l,n+2*g,p+2*l);f.focus=new z(q.x+g,q.y+l)}a.network=d;return c}function Zq(a,b){for(var c=a.network.vertexes.i;c.next();){var d=c.value;d.network=b;if(null!==d.tg){var e=d.tg.Y(d.Oy);d.df=e.Mv;var f=e.gz,g=e.hz;d.Qa=new D(d.ra-f,d.Ba-g,e.Pv,e.Lv);d.focus=new z(f,g);d.Oy--}}for(c=a.network.edges.i;c.next();)c.value.network=b;a.network=b} +function ar(a,b){var c=b.wl;if(null!==c&&0!==c.count){var d=b.ra,e=b.Ba,f=b.width,g=b.height;null!==b.tg&&0=n.df?k++:(h=!0,l++,g+=Math.atan2(b.Ba-n.Ba,b.ra-n.ra))}if(0!==k)for(0>1)+m)*(0===h%2?1:-1);k.ra=d+n*Math.cos(p);k.Ba=e+n*Math.sin(p);h++}}}function Vq(a,b,c,d,e,f,g){var h=9E19,k=-1,l=0;a:for(;lm.y&&a[p].x-m.xm.x&&a[p].y-m.yk+g?(d=d+f-h,e=e-k-g,Q.sqrt(d*d+e*e)):e+ch+l?e>k+g?(d=d-h-l,e=e-k-g,Q.sqrt(d*d+e*e)):e+ck+g?e-(k+g):e+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.ra,e=d,f=c.Ba,g=f,c=1;cg-f)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.ra-b.ra}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.Ba-b.Ba});for(var g=a.Ig,l=0,m=0,n=0,c=0;cg||n-d>g){if(f)break}else if(k-q>g||q-k>g){if(!f)break}else{var s=kr(h,e);1>s?(m=a.qv,null===m&&(a.qv=m=new Ac(0)),l=m.random(),s=m.random(),d>n?(m=Math.abs(e.P.right-h.P.x),m=(1+m)*l):dq?(n=Math.abs(e.P.bottom-h.P.y),n=(1+n)*s):ds?(m=a.qv,null===m&&(a.qv=m=new Ac(0)),l=m.random(),s= +m.random(),m=(d>n?1:-1)*(1+(e.width>h.width)?e.width:h.width)*l,n=(k>q?1:-1)*(1+(e.height>h.height)?e.height:h.height)*s):(l=f.stiffness*(s-f.length),m=(n-d)/s*l,n=(q-k)/s*l),h.forceX+=m,h.forceY+=n,e.forceX-=m,e.forceY-=n;c=0;d=Math.max(a.Ig/20,50);for(e=0;ed&&(f=d),g<-d?g=-d:g>d&&(g=d),h.ra+=f,h.Ba+=g,c=Math.max(c,f*f+g*g));return c>a.YB*a.YB}Sq.prototype.moveFixedVertex=function(){}; +Sq.prototype.commitLayout=function(){this.Ty();this.commitNodes();this.av&&this.commitLinks()};Sq.prototype.Ty=function(){if(this.co)for(var a=this.network.edges.i;a.next();){var b=a.value.link;null!==b&&(b.Za=ee,b.ab=ee)}};Sq.prototype.commitNodes=function(){var a=0,b=0;if(this.wE){var c=bb();this.zf(this.network,c);b=this.md;a=b.x-c.x;b=b.y-c.y;fb(c)}for(var c=bb(),d=this.network.vertexes.i;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.Qa),c.x+=a,c.y+=b,e.Qa=c;e.commit()}fb(c)}; +Sq.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()};Sq.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.om:a};Sq.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.nm:a};Sq.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.km:a};Sq.prototype.electricalFieldX=function(){return 0};Sq.prototype.electricalFieldY=function(){return 0}; +Sq.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.mm:a};Sq.prototype.gravitationalFieldX=function(){return 0};Sq.prototype.gravitationalFieldY=function(){return 0};Sq.prototype.isFixed=function(a){return a.isFixed};H(Sq,{EH:"currentIteration"},function(){return this.tp});G(Sq,{DB:"arrangementSpacing"},function(){return this.hf},function(a){ra(a,Za,Sq,"arrangementSpacing");this.hf.A(a)||(this.hf.assign(a),this.v())}); +G(Sq,{wE:"arrangesToOrigin"},function(){return this.vo},function(a){this.vo!==a&&(w(a,"boolean",Sq,"arrangesToOrigin"),this.vo=a,this.v())});G(Sq,{co:"setsPortSpots"},function(){return this.Qg},function(a){this.Qg!==a&&(w(a,"boolean",Sq,"setsPortSpots"),this.Qg=a,this.v())});G(Sq,{comments:"comments"},function(){return this.yg},function(a){this.yg!==a&&(w(a,"boolean",Sq,"comments"),this.yg=a,this.v())}); +G(Sq,{py:"maxIterations"},function(){return this.Pm},function(a){this.Pm!==a&&(w(a,"number",Sq,"maxIterations"),0<=a&&(this.Pm=a,this.v()))});G(Sq,{YB:"epsilonDistance"},function(){return this.So},function(a){this.So!==a&&(w(a,"number",Sq,"epsilonDistance"),0b.toVertex.index&&(this.network.rv(b),b.rev=!0);break;case nr:for(b=this.network.vertexes.i;b.next();)a=b.value,a.vn=-1,a.finish=-1;for(a=this.network.edges.i;a.next();)a.value.forest=!1;this.Up=0;for(b.reset();b.next();)c=b.value,0===c.Mb.count&&xr(this,c);for(b.reset();b.next();)c=b.value,-1===c.vn&&xr(this,c);for(a.reset();a.next();)b=a.value,b.forest||(c=b.fromVertex, +d=c.finish,e=b.toVertex,f=e.finish,e.vns&&0s&&0b[this.Re]&&(this.Bt=b[c]-1,this.Re=c),b[c]g)for(var n=g+1;nm;n--)k=d[n],k.near===l&&k.tl===l.tl||h++;var l=0,p,q=p=n=k=0,s,t=0,u=0;s=0;var x;if(0<=c)for(m=d[g].$d,l=0;lt||k===t&&p>s)&&h++,uk||t===k&&s>p)&&h++);if(0>=c)for(m=d[g].Vd,l=0;lt||k===t&&n>u)&&h++,sk||t===k&&u>n)&&h++);f[g*e+g]=h;for(m=g+1;m=c)for(h=d[g].Vd,x=d[m].Vd,l=0;l=c&&(k=h.$d);var l=null;0<=c&&(l=h.Vd);var m=0,n=0,p=h.near;null!==p&&p.layer===h.layer&&(m+=p.column-1,n++);if(null!==k)for(p=0;p=c&&(k=h.$d);var l=null;0<=c&&(l=h.Vd);var m=0,n=[],p=h.near;null!==p&&p.layer===h.layer&&(n[m]=p.column-1,m++);if(null!==k)for(p=0;p>1,f[g]=m&1?n[l]:n[l-1]+n[l]>>1)}Br(a,b,d);return f}function Jr(a,b,c,d,e,f){if(b.component===d){b.component=c;var g=0,h=0;if(e)for(var k=b.Hb;k.next();){var h=k.value,l=h.toVertex,g=b.layer-l.layer,h=a.linkMinLength(h);g===h&&Jr(a,l,c,d,e,f)}if(f)for(k=b.Mb;k.next();)h=k.value,l=h.fromVertex,g=l.layer-b.layer,h=a.linkMinLength(h),g===h&&Jr(a,l,c,d,e,f)}} +function Kr(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var g=b.Hb;g.next();)Kr(a,g.value.toVertex,c,d,e,f);if(f)for(b=b.Mb;b.next();)Kr(a,b.value.fromVertex,c,d,e,f)}}function ur(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid)return b}return null}function vr(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.Hb;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} +function wr(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.Mb;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function xr(a,b){b.vn=a.Up;a.Up++;for(var c=b.Hb;c.next();){var d=c.value,e=d.toVertex;-1===e.vn&&(d.forest=!0,xr(a,e))}b.finish=a.Up;a.Up++} +wn.prototype.assignLayers=function(){switch(this.Om){case Lr:Mr(this);break;case Nr:for(var a=0,b=this.network.vertexes.i;b.next();)a=Or(this,b.value),this.Pa=Math.max(a,this.Pa);for(b.reset();b.next();)a=b.value,a.layer=this.Pa-a.layer;break;default:case or:Mr(this);for(b=this.network.vertexes.i;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.Mb.count&&Pr(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.Pa=-1;for(b.reset();b.next();){var c=b.value;c.layer-= +a;this.Pa=Math.max(this.Pa,c.layer)}}};function Mr(a){for(var b=a.network.vertexes.i;b.next();){var c=Qr(a,b.value);a.Pa=Math.max(c,a.Pa)}}function Qr(a,b){var c=0;if(-1===b.layer){for(var d=b.Hb;d.next();)var e=d.value,f=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,Qr(a,f)+e);b.layer=c}else c=b.layer;return c}function Or(a,b){var c=0;if(-1===b.layer){for(var d=b.Mb;d.next();)var e=d.value,f=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,Or(a,f)+e);b.layer=c}else c=b.layer;return c} +function Pr(a,b){if(!b.valid){b.valid=!0;for(var c=b.Hb;c.next();)Pr(a,c.value.toVertex);for(c=a.network.vertexes.i;c.next();)c.value.component=-1;for(var d=b.$d.l,e=d.length,f=0;fh&&Jr(a,g.fromVertex,0,-1,!0,!1)}for(Jr(a,b,1,-1,!0,!0);0!==b.component;){for(var h=0,d=Infinity,k=0,l=null,m=a.network.vertexes.i;m.next();){var n=m.value;if(1===n.component){for(var p=0,q=!1,s=n.$d.l,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 zr(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} +wn.prototype.initializeIndices=function(){switch(this.Dm){default:case Rr:for(var a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;b.index=this.cd[c];this.cd[c]++}break;case pr:a=this.network.vertexes.i;for(b=this.Pa;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Sr(this,c);break;case Tr:for(a=this.network.vertexes.i,b=0;b<=this.Pa;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Ur(this,c)}}; +function Sr(a,b){var c=b.layer;b.index=a.cd[c];a.cd[c]++;for(var c=b.Vd.ae(),d=!0;d;)for(var d=!1,e=0;eg.portFromColOffset&&(d=!0,c[e]=g,c[e+1]=f)}for(e=0;eg.portToColOffset&&(d=!0,c[e]=g,c[e+1]=f)}for(e=0;e=g;d--)f=Wr(this,d,-1)||f;e=this.countCrossings();e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Wr(this,d,1)||f;e=this.countCrossings();e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Wr(this,d,1)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1, +d=g;d<=c;d++)f=Wr(this,d,-1)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Wr(this,d,0)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Wr(this,d,0)||f;e>=a?Er(this,b):(a=e,b=Dr(this))}break;default:case qr:for(c=this.Pa,g=0,h=a+1;(d=this.countCrossings())=g;d--)f=Wr(this,d,-1)||f;e=this.countCrossings();e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Wr(this,d,1)||f;e=this.countCrossings(); +e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Wr(this,d,1)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Wr(this,d,-1)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=c;d>=g;d--)f=Wr(this,d,0)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=g;d<=c;d++)f=Wr(this,d,0)||f;e>=a?Er(this,b):(a=e,b=Dr(this))}}Er(this,b)}; +function Vr(a,b,c){var d=0,e=Ar(a,b),f=a.cd[b],g=Ir(a,b,c);c=Hr(a,b,c);for(d=0;df+1&&(p+=4*(B-f),q+=4*(B-(f+1)))}C=d[f].Hb.i;for(C.reset();C.next();)if(y=C.value,y.valid&&y.toVertex.layer===b){y=y.toVertex;for(B=0;d[B]!==y;)B++;B===f+1&&(q+=1)}C=d[f+1].Mb.i;for(C.reset();C.next();)if(y=C.value,y.valid&&y.fromVertex.layer===b){y=y.fromVertex;for(B=0;d[B]!==y;)B++;Bf+1&&(p+=4*(B-(f+1)),q+=4*(B-f))}C=d[f+1].Hb.i;for(C.reset();C.next();)if(y=C.value, +y.valid&&y.toVertex.layer===b){y=y.toVertex;for(B=0;d[B]!==y;)B++;B===f&&(p+=1)}var B=y=0,C=g[d[f].index],K=h[d[f].index],J=g[d[f+1].index],ba=h[d[f+1].index];-1!==C&&(y+=Math.abs(C-s),B+=Math.abs(C-x));-1!==K&&(y+=Math.abs(K-s),B+=Math.abs(K-x));-1!==J&&(y+=Math.abs(J-t),B+=Math.abs(J-u));-1!==ba&&(y+=Math.abs(ba-t),B+=Math.abs(ba-u));if(q>1)+8*d;this.nb*=8}if(0!==(this.Bh&$r))for(b=!0;b;){b=!1;for(a=this.Re+1;a<=this.Pa;a++)b=as(this,a,1)||b; +for(a=this.Re-1;0<=a;a--)b=as(this,a,-1)||b;b=as(this,this.Re,0)||b}if(0!==(this.Bh&bs)){for(a=this.Re+1;a<=this.Pa;a++)cs(this,a,1);for(a=this.Re-1;0<=a;a--)cs(this,a,-1);cs(this,this.Re,0)}c&&(ds(this,-1),ds(this,1));if(0!==(this.Bh&$r))for(b=!0;b;){b=!1;b=as(this,this.Re,0)||b;for(a=this.Re+1;a<=this.Pa;a++)b=as(this,a,0)||b;for(a=this.Re-1;0<=a;a--)b=as(this,a,0)||b}};function as(a,b,c){for(var d=!1;es(a,b,c);)d=!0;return d} +function es(a,b,c){var d=0,e=Ar(a,b),f=a.cd[b],g=Hr(a,b,-1);if(0c)for(d=0;dd-1||m-e[d-1].column-1>n+a.nodeMinColumnSpace(e[d-1],!1)?m-1:m,n=0,n=d+1>=f||e[d+1].column-m-1>p+a.nodeMinColumnSpace(e[d+1],!0)?m+1:m,s=p=0,t=0,u=0,x=0,B=0;if(0>=c)for(var y=e[d].Mb.i;y.next();){var C=y.value;C.valid&&C.fromVertex.layer!== +b&&(u=Cr(C),x=C.portFromColOffset,B=C.portToColOffset,C=C.fromVertex.column,p+=(Math.abs(m+B-(C+x))+1)*u,s+=(Math.abs(q+B-(C+x))+1)*u,t+=(Math.abs(n+B-(C+x))+1)*u)}if(0<=c)for(y=e[d].Hb.i;y.next();)C=y.value,C.valid&&C.toVertex.layer!==b&&(u=Cr(C),x=C.portFromColOffset,B=C.portToColOffset,C=C.toVertex.column,p+=(Math.abs(m+x-(C+B))+1)*u,s+=(Math.abs(q+x-(C+B))+1)*u,t+=(Math.abs(n+x-(C+B))+1)*u);B=x=u=0;y=g[e[d].index];C=h[e[d].index];-1!==y&&(u+=Math.abs(y-m),x+=Math.abs(y-q),B+=Math.abs(y-n));-1!== +C&&(u+=Math.abs(C-m),x+=Math.abs(C-q),B+=Math.abs(C-n));if(s=c[d]?m=p:n<=c[d]&&(m=n));m!==h&&(g=!0,e[d].column=m)}Br(a,b,e);a.normalize()} +function fs(a,b){for(var c=!0,d=a.network.vertexes.i;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),g=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+g>=b){c=!1;break}}e=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(c.column-=1,e=!0);return e} +function gs(a,b){for(var c=b,c=b+1,d=0,e=[],f=[],d=0;d<=a.Pa;d++)e[d]=!1,f[d]=!1;for(var g=a.network.vertexes.i;g.next();){var d=g.value,h=d.column-a.nodeMinColumnSpace(d,!0),k=d.column+a.nodeMinColumnSpace(d,!1);h<=b&&k>=b&&(e[d.layer]=!0);h<=c&&k>=c&&(f[d.layer]=!0)}h=!0;c=!1;for(d=0;d<=a.Pa;d++)h=h&&!(e[d]&&f[d]);if(h)for(g.reset();g.next();)e=g.value,e.column>b&&(e.column-=1,c=!0);return c} +function ds(a,b){for(var c=0;c<=a.nb;c++)for(;fs(a,c););a.normalize();for(c=0;ce?Er(a,d):gb)for(c=a.nb;0<=c;c--)for(d=Dr(a),e=Gr(a),f=e+1;ee?Er(a,d):gc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.rf);a.rf++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Kr(a,b,a.rf,-1,!0,!0),a.rf++);var f=0;b=[];for(f=0;fc)for(h=a.nb;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} +wn.prototype.commitLayout=function(){if(this.co)for(var a=yr(this,!0),b=yr(this,!1),c=this.network.edges.i;c.next();){var d=c.value.link;null!==d&&(d.Za=a,d.ab=b)}this.commitNodes();this.Ex();this.av&&this.commitLinks()};function yr(a,b){return 270===a.aa?b?fe:ie:90===a.aa?b?ie:fe:180===a.aa?b?ge:he:b?he:ge} +wn.prototype.commitNodes=function(){this.Zf=[];this.of=[];this.Qe=[];this.qb=[];for(var a=0;a<=this.Pa;a++)this.Zf[a]=0,this.of[a]=0,this.Qe[a]=0,this.qb[a]=0;for(a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;this.Zf[c]=Math.max(this.Zf[c],this.nodeMinLayerSpace(b,!0));this.of[c]=Math.max(this.of[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.Vk,c=0;c<=this.Pa;c++){var e=d;0>=this.Zf[c]+this.of[c]&&(e=0);0=Ha.P.y&&Jc<=Ha.P.bottom&&(Ca=Ha.ra+Cg,Jc=Jc=Ha.P.x&&Jc<=Ha.P.right&&(Ca=Ha.Ba+Cg,Jc=Jcmc.y&&(Eg=hh.y>mc.y?0:kd.xUc.x&&(Fg=Kh.x>Uc.x?0:xd.yb.layer?1:a.Udb.Ud?1:a.ndb.nd?1:0:0};wn.prototype.gD=function(a,b){return a instanceof is&&b instanceof is&&a!==b?a.firstb.first||a.dhb.dh||a.Udb.Ud?1:a.ndb.nd?1:0:0}; +wn.prototype.tv=function(a,b){return a instanceof is&&b instanceof is&&a!==b?a.$cb.$c||a.dhb.dh||a.Udb.Ud?1:a.ndb.nd?1:0:0};wn.prototype.u=function(a,b){var c=a-b;return-1c};function Ar(a,b){var c,d=a.cd[b];if(d>=a.ag.length){c=[];for(var e=0;ea&&(this.Bh=a,this.v()))}); +G(wn,{co:"setsPortSpots"},function(){return this.Qg},function(a){this.Qg!==a&&(w(a,"boolean",wn,"setsPortSpots"),this.Qg=a,this.v())});G(wn,{hv:"linkSpacing"},function(){return this.qi},function(a){this.qi!==a&&(w(a,"number",wn,"linkSpacing"),0<=a&&(this.qi=a,this.v()))});H(wn,{VF:"maxLayer"},function(){return this.Pa});H(wn,{qI:"maxIndex"},function(){return this.Bt});H(wn,{pI:"maxColumn"},function(){return this.nb});H(wn,{wI:"minIndexLayer"},function(){return this.Np}); +H(wn,{rI:"maxIndexLayer"},function(){return this.Re});var nr;wn.CycleDepthFirst=nr=I(wn,"CycleDepthFirst",0);var tr;wn.CycleGreedy=tr=I(wn,"CycleGreedy",1);var or;wn.LayerOptimalLinkLength=or=I(wn,"LayerOptimalLinkLength",0);var Lr;wn.LayerLongestPathSink=Lr=I(wn,"LayerLongestPathSink",1);var Nr;wn.LayerLongestPathSource=Nr=I(wn,"LayerLongestPathSource",2);var pr;wn.InitDepthFirstOut=pr=I(wn,"InitDepthFirstOut",0);var Tr;wn.InitDepthFirstIn=Tr=I(wn,"InitDepthFirstIn",1);var Rr; +wn.InitNaive=Rr=I(wn,"InitNaive",2);var Xr;wn.AggressiveNone=Xr=I(wn,"AggressiveNone",0);var qr;wn.AggressiveLess=qr=I(wn,"AggressiveLess",1);var Yr;wn.AggressiveMore=Yr=I(wn,"AggressiveMore",2);wn.PackNone=0;var Zr;wn.PackExpand=Zr=1;var $r;wn.PackStraighten=$r=2;var bs;wn.PackMedian=bs=4;var rr;wn.PackAll=rr=7;function is(){this.index=this.nd=this.Ud=this.$c=this.first=this.layer=0;this.link=null;this.dh=0}zb(is,{layer:!0,first:!0,$c:!0,Ud:!0,nd:!0,index:!0,link:!0,dh:!0}); +function sr(){kc.call(this)}yb(sr,kc);vb("LayeredDigraphNetwork",sr);sr.prototype.createVertex=function(){return new js};sr.prototype.createEdge=function(){return new ks};function js(){lc.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.vn=NaN;this.tl=0;this.xy=this.yy=null}yb(js,lc);vb("LayeredDigraphVertex",js); +function ks(){sc.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}yb(ks,sc);vb("LayeredDigraphEdge",ks);function Z(){0b.level)return!1;a.removeChild(c.parent,c)}return!0}Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){for(var c=a.children,d=0,e=0;ef?Zs(a,h,ya,y,C):$s(a,h,ya,y,C);ya=Y.x;y=Y.width;C=Y.height;break;case Ns:for(l=0;ls&&(PCa&&(et(a,-Ca,0,eb,l-1),ft(J,-Ca,0),ft(ba,-Ca,0),Ca=0)}m.W.k(Ca,ha);y=Math.max(y,ja);C=Math.max(C,K+(0===Ra?0:x)+Pa.height);P=ja}else{0s&&(haCa&&(et(a,0,-Ca,eb,l-1),ft(J,0,-Ca),ft(ba,0,-Ca),Ca=0);m.W.k(P,Ca);C=Math.max(C,Y);y=Math.max(y,K+(0===Ra?0:x)+Pa.width);ha=Y}Ha++}0g&&(g=0),135p&&(p=0),n===Os&&(k+=t/2+a.B.y),h+=d+c):b?(null===a.comments?d>y&&(n=jt(n,d-y,0),h=n.x,k=n.y,y=d,g=0):y=ht(a,y,g),0>g&&(h-=g,g=0),135C&&(n=jt(n,0,e-C),h=n.x,k=n.y,C=e,p=0):C=it(a,C,p),0>p&&(k-=p,p=0),h+=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])),n[0].k(g+d,0),n[1].k(n[0].x,e),n[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])),n[0].k(0,p+e),n[1].k(d,n[0].y),n[2].xc?Zs(b,e,Ha,K,J):$s(b,e,Ha,K,J);Ha=J.x;K=J.width;J=J.height;break;case Ns:for(h=0;hq&&(jaq&&(Yn&&(n=0),135y&&(y=0));b.ua.k(n,y);b.Ga.k(K,J)}} +function Zs(a,b,c,d,e){var f=b.length;if(0===f)return new D(c,0,d,e);if(1===f){var g=b[0];d=g.Ga.width;e=g.Ga.height;return new D(c,0,d,e)}for(var h=a.nodeSpacing,k=a.rowSpacing,l=90===Us(a),m=0,n=0,p=0,q=0;ql&&(d-=l),e=Math.max(e,Math.max(B, +p)+b+s.height),0>g.W.x&&(c=st(a,g.W.x,!1,c,h))):(g.W.k(d+b,c+h/2-g.B.y-g.ua.y),d=Math.max(d,Math.max(x,n)+b+s.width),l=c+h/2-g.B.y-g.ua.y,e=Math.max(e,l+s.height),0>l&&(e-=l),0>g.W.y&&(c=st(a,g.W.y,!0,c,h))));return new D(c,0,d,e)} +function $s(a,b,c,d,e){var f=b.length;if(0===f)return new D(c,0,d,e);if(1===f){var g=b[0];d=g.Ga.width;e=g.Ga.height;return new D(c,0,d,e)}for(var h=a.nodeSpacing,k=a.rowSpacing,l=270===Us(a),m=0,n=0,p=0,q=0;qn&&(d-=n),e=Math.max(e,Math.abs(Math.min(B, +p))+k+s.height),0>g.W.x&&(c=st(a,g.W.x,!1,c,h))):(g.W.k(-d-s.width-k,c+h/2-g.B.y-g.ua.y),d=Math.max(d,Math.abs(Math.min(x,n))+k+s.width),n=c+h/2-g.B.y-g.ua.y,e=Math.max(e,n+s.height),0>n&&(e-=n),0>g.W.y&&(c=st(a,g.W.y,!0,c,h))));for(q=0;qd&&(d=c+a.width);0>c&&(d-=c);return d;case Vs:return a.width>b?a.width:b;case Ws:return 2*a.B.x>b?a.width:b+a.width-2*a.B.x;case Ms:case Bs:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case Ns:return a.width-a.B.x+a.nodeSpacing/2+b;case Os:return Math.max(a.width,a.B.x+a.nodeSpacing/2+b);default:return b}} +function it(a,b,c){switch(a.alignment){case Ks:case gt:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case Vs:return a.height>b?a.height:b;case Ws:return 2*a.B.y>b?a.height:b+a.height-2*a.B.y;case Ms:case Bs:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case Ns:return a.height-a.B.y+a.nodeSpacing/2+b;case Os:return Math.max(a.height,a.B.y+a.nodeSpacing/2+b);default:return b}} +function jt(a,b,c){switch(a){case gt:b/=2;c/=2;break;case Ks:b/=2;c/=2;break;case Vs:c=b=0;break;case Ws:break;default:v("Unhandled alignment value "+a.toString())}return new z(b,c)}function bt(a,b,c,d,e,f){b=jt(b,c,d);et(a,b.x,b.y,e,f)}function et(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].W;f.x+=b;f.y+=c}} +function ct(a,b,c,d){var e=b.parent;switch(a.Pe){case ms:for(a=b.Mb;a.next();)b=a.value,b.fromVertex===e&&b.oq.k(c,d);break;case ts:for(a=b.Hb;a.next();)b=a.value,b.toVertex===e&&b.oq.k(c,d);break;default:v("Unhandled path value "+a.Pe.toString())}}function ft(a,b,c){for(var d=0;dn.length||null===p||2>p.length))for(l=k=0;ku&&e.ye.y&&ub.length||null===k||2>k.length)d=null;else{m=at(a,b.length+k.length);for(d=f=e=0;fe;)u=k[f++],m[d++].k(u.x+l,u.y);k=at(a,d);for(e=0;en.length||null===f||2>f.length)e=null;else{m=at(a,n.length+f.length);for(l=x=k=0;kf;)e=n[k++],m[l++].k(e.x,e.y);e=at(a,l);for(k=0;kn.length||null===p||2>p.length))for(l=k=0;kf&&e.xe.x&&fb.length||null===k||2>k.length)d=null;else{m=at(a, +b.length+k.length);for(d=f=e=0;fe;)u=k[f++],m[d++].k(u.x,u.y+l);k=at(a,d);for(e=0;en.length||null===f||2>f.length)e=null;else{m=at(a,n.length+f.length);for(l=x=k=0;kf;)e=n[k++],m[l++].k(e.x,e.y);e=at(a,l);for(k=0;k=a?0:135>=a?90:225>=a?180:315>=a?270:0} +function Xs(a){var b=Us(a),b=90===b||270===b,c=a.layerSpacing;if(0=a&&(this.ha.nodeIndentPastParent=a,this.v()))});G(Z,{nodeSpacing:"nodeSpacing"},function(){return this.ha.nodeSpacing},function(a){this.ha.nodeSpacing!==a&&(w(a,"number",Z,"nodeSpacing"),this.ha.nodeSpacing=a,this.v())}); +G(Z,{layerSpacing:"layerSpacing"},function(){return this.ha.layerSpacing},function(a){this.ha.layerSpacing!==a&&(w(a,"number",Z,"layerSpacing"),this.ha.layerSpacing=a,this.v())});G(Z,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.ha.layerSpacingParentOverlap},function(a){this.ha.layerSpacingParentOverlap!==a&&(w(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.ha.layerSpacingParentOverlap=a,this.v()))}); +G(Z,{compaction:"compaction"},function(){return this.ha.compaction},function(a){this.ha.compaction!==a&&(va(a,Z,Z,"compaction"),a===Rs||a===Ts)&&(this.ha.compaction=a,this.v())});G(Z,{breadthLimit:"breadthLimit"},function(){return this.ha.breadthLimit},function(a){this.ha.breadthLimit!==a&&(w(a,"number",Z,"breadthLimit"),0<=a&&(this.ha.breadthLimit=a,this.v()))}); +G(Z,{rowSpacing:"rowSpacing"},function(){return this.ha.rowSpacing},function(a){this.ha.rowSpacing!==a&&(w(a,"number",Z,"rowSpacing"),this.ha.rowSpacing=a,this.v())});G(Z,{rowIndent:"rowIndent"},function(){return this.ha.rowIndent},function(a){this.ha.rowIndent!==a&&(w(a,"number",Z,"rowIndent"),0<=a&&(this.ha.rowIndent=a,this.v()))}); +G(Z,{commentSpacing:"commentSpacing"},function(){return this.ha.commentSpacing},function(a){this.ha.commentSpacing!==a&&(w(a,"number",Z,"commentSpacing"),this.ha.commentSpacing=a,this.v())});G(Z,{commentMargin:"commentMargin"},function(){return this.ha.commentMargin},function(a){this.ha.commentMargin!==a&&(w(a,"number",Z,"commentMargin"),this.ha.commentMargin=a,this.v())}); +G(Z,{setsPortSpot:"setsPortSpot"},function(){return this.ha.setsPortSpot},function(a){this.ha.setsPortSpot!==a&&(w(a,"boolean",Z,"setsPortSpot"),this.ha.setsPortSpot=a,this.v())});G(Z,{portSpot:"portSpot"},function(){return this.ha.portSpot},function(a){ra(a,R,Z,"portSpot");this.ha.portSpot.A(a)||(this.ha.portSpot=a,this.v())}); +G(Z,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.ha.setsChildPortSpot},function(a){this.ha.setsChildPortSpot!==a&&(w(a,"boolean",Z,"setsChildPortSpot"),this.ha.setsChildPortSpot=a,this.v())});G(Z,{childPortSpot:"childPortSpot"},function(){return this.ha.childPortSpot},function(a){ra(a,R,Z,"childPortSpot");this.ha.childPortSpot.A(a)||(this.ha.childPortSpot=a,this.v())}); +G(Z,{yH:"alternateSorting"},function(){return this.ga.sorting},function(a){this.ga.sorting!==a&&(va(a,Z,Z,"alternateSorting"),a===Gs||a===Hs||a===Is||Js)&&(this.ga.sorting=a,this.v())});G(Z,{mH:"alternateComparer"},function(){return this.ga.comparer},function(a){this.ga.comparer!==a&&(w(a,"function",Z,"alternateComparer"),this.ga.comparer=a,this.v())}); +G(Z,{gH:"alternateAngle"},function(){return this.ga.angle},function(a){this.ga.angle!==a&&(w(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.ga.angle=a,this.v())});G(Z,{fH:"alternateAlignment"},function(){return this.ga.alignment},function(a){this.ga.alignment!==a&&(va(a,Z,Z,"alternateAlignment"),this.ga.alignment=a,this.v())}); +G(Z,{qH:"alternateNodeIndent"},function(){return this.ga.nodeIndent},function(a){this.ga.nodeIndent!==a&&(w(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.ga.nodeIndent=a,this.v()))});G(Z,{rH:"alternateNodeIndentPastParent"},function(){return this.ga.nodeIndentPastParent},function(a){this.ga.nodeIndentPastParent!==a&&(w(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.ga.nodeIndentPastParent=a,this.v()))}); +G(Z,{sH:"alternateNodeSpacing"},function(){return this.ga.nodeSpacing},function(a){this.ga.nodeSpacing!==a&&(w(a,"number",Z,"alternateNodeSpacing"),this.ga.nodeSpacing=a,this.v())});G(Z,{oH:"alternateLayerSpacing"},function(){return this.ga.layerSpacing},function(a){this.ga.layerSpacing!==a&&(w(a,"number",Z,"alternateLayerSpacing"),this.ga.layerSpacing=a,this.v())}); +G(Z,{pH:"alternateLayerSpacingParentOverlap"},function(){return this.ga.layerSpacingParentOverlap},function(a){this.ga.layerSpacingParentOverlap!==a&&(w(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.ga.layerSpacingParentOverlap=a,this.v()))});G(Z,{lH:"alternateCompaction"},function(){return this.ga.compaction},function(a){this.ga.compaction!==a&&(va(a,Z,Z,"alternateCompaction"),a===Rs||a===Ts)&&(this.ga.compaction=a,this.v())}); +G(Z,{hH:"alternateBreadthLimit"},function(){return this.ga.breadthLimit},function(a){this.ga.breadthLimit!==a&&(w(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.ga.breadthLimit=a,this.v()))});G(Z,{vH:"alternateRowSpacing"},function(){return this.ga.rowSpacing},function(a){this.ga.rowSpacing!==a&&(w(a,"number",Z,"alternateRowSpacing"),this.ga.rowSpacing=a,this.v())}); +G(Z,{uH:"alternateRowIndent"},function(){return this.ga.rowIndent},function(a){this.ga.rowIndent!==a&&(w(a,"number",Z,"alternateRowIndent"),0<=a&&(this.ga.rowIndent=a,this.v()))});G(Z,{kH:"alternateCommentSpacing"},function(){return this.ga.commentSpacing},function(a){this.ga.commentSpacing!==a&&(w(a,"number",Z,"alternateCommentSpacing"),this.ga.commentSpacing=a,this.v())}); +G(Z,{jH:"alternateCommentMargin"},function(){return this.ga.commentMargin},function(a){this.ga.commentMargin!==a&&(w(a,"number",Z,"alternateCommentMargin"),this.ga.commentMargin=a,this.v())});G(Z,{xH:"alternateSetsPortSpot"},function(){return this.ga.setsPortSpot},function(a){this.ga.setsPortSpot!==a&&(w(a,"boolean",Z,"alternateSetsPortSpot"),this.ga.setsPortSpot=a,this.v())}); +G(Z,{tH:"alternatePortSpot"},function(){return this.ga.portSpot},function(a){ra(a,R,Z,"alternatePortSpot");this.ga.portSpot.A(a)||(this.ga.portSpot=a,this.v())});G(Z,{wH:"alternateSetsChildPortSpot"},function(){return this.ga.setsChildPortSpot},function(a){this.ga.setsChildPortSpot!==a&&(w(a,"boolean",Z,"alternateSetsChildPortSpot"),this.ga.setsChildPortSpot=a,this.v())}); +G(Z,{iH:"alternateChildPortSpot"},function(){return this.ga.childPortSpot},function(a){ra(a,R,Z,"alternateChildPortSpot");this.ga.childPortSpot.A(a)||(this.ga.childPortSpot=a,this.v())});var ls;Z.PathDefault=ls=I(Z,"PathDefault",-1);var ms;Z.PathDestination=ms=I(Z,"PathDestination",0);var ts;Z.PathSource=ts=I(Z,"PathSource",1);var Gs;Z.SortingForwards=Gs=I(Z,"SortingForwards",10);var Hs;Z.SortingReverse=Hs=I(Z,"SortingReverse",11);var Is;Z.SortingAscending=Is=I(Z,"SortingAscending",12);var Js; +Z.SortingDescending=Js=I(Z,"SortingDescending",13);var gt;Z.AlignmentCenterSubtrees=gt=I(Z,"AlignmentCenterSubtrees",20);var Ks;Z.AlignmentCenterChildren=Ks=I(Z,"AlignmentCenterChildren",21);var Vs;Z.AlignmentStart=Vs=I(Z,"AlignmentStart",22);var Ws;Z.AlignmentEnd=Ws=I(Z,"AlignmentEnd",23);var Ms;Z.AlignmentBus=Ms=I(Z,"AlignmentBus",24);var Bs;Z.AlignmentBusBranching=Bs=I(Z,"AlignmentBusBranching",25);var Ns;Z.AlignmentTopLeftBus=Ns=I(Z,"AlignmentTopLeftBus",26);var Os; +Z.AlignmentBottomRightBus=Os=I(Z,"AlignmentBottomRightBus",27);var Rs;Z.CompactionNone=Rs=I(Z,"CompactionNone",30);var Ts;Z.CompactionBlock=Ts=I(Z,"CompactionBlock",31);var ns;Z.StyleLayered=ns=I(Z,"StyleLayered",40);var Fs;Z.StyleLastParents=Fs=I(Z,"StyleLastParents",41);var Es;Z.StyleAlternating=Es=I(Z,"StyleAlternating",42);var Ds;Z.StyleRootOnly=Ds=I(Z,"StyleRootOnly",43);var ps;Z.ArrangementVertical=ps=I(Z,"ArrangementVertical",50);var ut; +Z.ArrangementHorizontal=ut=I(Z,"ArrangementHorizontal",51);var ss;Z.ArrangementFixedRoots=ss=I(Z,"ArrangementFixedRoots",52);var os;Z.LayerIndividual=os=I(Z,"LayerIndividual",60);var zs;Z.LayerSiblings=zs=I(Z,"LayerSiblings",61);var ys;Z.LayerUniform=ys=I(Z,"LayerUniform",62);function rs(){kc.call(this)}yb(rs,kc);vb("TreeNetwork",rs);rs.prototype.createVertex=function(){return new qs};rs.prototype.createEdge=function(){return new wt}; +function qs(){lc.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.W=new z(0,0);this.Ga=new Za(0,0);this.ua=new z(0,0);this.$n=this.Zn=this.AG=!1;this.gs=this.Nr=null;this.sorting=Gs;this.comparer=Aq;this.angle=0;this.alignment=Ks;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=Ts;this.breadthLimit= +0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=ee;this.setsChildPortSpot=!0;this.childPortSpot=ee}yb(qs,lc);vb("TreeVertex",qs); +qs.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)};H(qs,{vl:"childrenCount"},function(){return this.children.length});G(qs,{NI:"relativePosition"},function(){return this.W},function(a){this.W.set(a)});G(qs,{YI:"subtreeSize"},function(){return this.Ga},function(a){this.Ga.set(a)});G(qs,{XI:"subtreeOffset"},function(){return this.ua},function(a){this.ua.set(a)}); +function wt(){sc.call(this);this.oq=new z(0,0)}yb(wt,sc);vb("TreeEdge",wt); +wt.prototype.commit=function(){var a=this.link;if(null!==a&&!a.mk){var b=this.network.vb,c=null,d=null;switch(b.Pe){case ms:c=this.fromVertex;d=this.toVertex;break;case ts:c=this.toVertex;d=this.fromVertex;break;default:v("Unhandled path value "+b.Pe.toString())}if(null!==c&&null!==d)if(b=this.oq,0!==b.x||0!==b.y||c.AG){var d=c.Qa,e=Us(c),f=Xs(c),g=c.rowSpacing;a.updateRoute();var h=a.me===Ni,k=a.Jb,l=0,m,n;a.yk();if(k||h){for(l=2;4p.y+c.rowIndent&&(q=Math.min(q,Math.max(m.y,q-Ys(c))))):c.alignment===Vs?(q=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(q=Math.min(q,Math.max(m.x,q-Ys(c))))):c.alignment===Vs?(q=d.left+b.x,0===b.x&&m.xp.y+c.rowIndent&&(q=Math.min(q,Math.max(m.y,q-Ys(c))))):c.alignment===Vs?(q=d.top+b.y,0===b.y&&m.yp.x+c.rowIndent&&(q=Math.min(q,Math.max(m.x,q-Ys(c))))):c.alignment===Vs?(q=d.left+b.x,0===b.x&&m.xk?g=null:(l=parseFloat(m.getAttribute("cx")),isNaN(l)&&(l=0),m=parseFloat(m.getAttribute("cy")),isNaN(m)&&(m=0),n=new Ke(Qe),n.da=0,n.ea=0,n.q=2*k,n.s=2*k,g.position=new z(l-k,m-k),g.yc=n);break;case "ellipse":n=f;g=new X;k=parseFloat(n.getAttribute("rx"));isNaN(k)||0>k?g=null:(l=parseFloat(n.getAttribute("ry")),isNaN(l)||0>l?g=null:(m=parseFloat(n.getAttribute("cx")),isNaN(m)&&(m=0),n=parseFloat(n.getAttribute("cy")), +isNaN(n)&&(n=0),p=new Ke(Qe),p.da=0,p.ea=0,p.q=2*k,p.s=2*l,g.position=new z(m-k,n-l),g.yc=p));break;case "rect":p=f;g=new X;k=parseFloat(p.getAttribute("width"));if(isNaN(k)||0>k)g=null;else if(l=parseFloat(p.getAttribute("height")),isNaN(l)||0>l)g=null;else{m=parseFloat(p.getAttribute("x"));isNaN(m)&&(m=0);n=parseFloat(p.getAttribute("y"));isNaN(n)&&(n=0);var q=p.getAttribute("rx"),s=p.getAttribute("ry"),p=parseFloat(q);if(isNaN(p)||0>p)p=0;var t=parseFloat(s);if(isNaN(t)||0>t)t=0;null!==q&&""!== +q||null===s||""===s?null===q||""===q||null!==s&&""!==s||(t=p):p=t;p=Math.min(p,k/2);t=Math.min(t,l/2);s=void 0;0===p&&0===t?(s=new Ke(Pe),s.da=0,s.ea=0,s.q=k,s.s=l):(s=Q.ia/2,q=E(),S(q,p,0,!0),q.lineTo(k-p,0),T(q,k-p*s,0,k,t*s,k,t),q.lineTo(k,l-t),T(q,k,l-t*s,k-p*s,l,k-p,l),q.lineTo(p,l),T(q,p*s,l,0,l-t*s,0,l-t),q.lineTo(0,t),T(q,0,t*s,p*s,0,p,0),ff(q),s=q.m,F(q));g.position=new z(m,n);g.yc=s}break;case "polygon":g=Bt(f);break;case "polyline":g=Bt(f)}if(null!==g){if(g instanceof X){l=g;k=yt(a,f,"fill"); +null!==k&&-1!==k.indexOf("url")?(k=k.substring(k.indexOf("#")+1,k.length-1),k=a["_brush"+k],l.fill=k instanceof $f?k:"black"):l.fill=null===k?"black":"none"===k?null:k;k=yt(a,f,"stroke");null!==k&&-1!==k.indexOf("url")?(k=k.substring(k.indexOf("#")+1,k.length-1),k=a["_brush"+k],l.stroke=k instanceof $f?k:"black"):l.stroke="none"===k?null:k;k=parseFloat(yt(a,f,"stroke-width"));isNaN(k)||(l.Na=k);k=yt(a,f,"stroke-linecap");null!==k&&(l.QG=k);k=yt(a,f,"stroke-dasharray");if(null!==k&&""!==k){m=k.split(","); +n=[];for(k=0;kf.length)return null;for(var d=null,g=new N(Cf),h=1;h + + + + +
        +

        Minimal GoJS Sample

        +
        +

        + This sample demonstrates buttons that appear when the user hovers over a node with the mouse. + The advantage of using an Adornment is that it keeps the Node template simpler. + That means there are less resources used to create nodes -- only that one adornment can be shown. +

        +

        + However, using a template as the Part.selectionAdornmentTemplate would allow for more + than one set of buttons to be shown simultaneously, one set for each selected node. +

        +

        + This technique does not work on touch devices. +

        +

        + If you want to show such an Adornment on mouseEnter and mouseLeave, rather than on mouseHover, + the code is given in the documentation for the GraphObject.mouseEnter property. +

        +
        + + \ No newline at end of file diff --git a/samples/index.html b/samples/index.html index d0430d385..fa1f98ef9 100644 --- a/samples/index.html +++ b/samples/index.html @@ -145,6 +145,7 @@

        Additional resources

        // minimalXML // require // angular + // hoverButtons // basic (above) arr.push(["classHierarchy", "Class Hierarchy", "Displays the GoJS Class Hierarchy as a series of trees. Double-click to go to the class's API documentation."]); arr.push(["DOMTree", "DOM Tree", "Shows the DOM of this page displayed as a tree. Selection highlights the DOM element in the page."]); @@ -268,9 +269,11 @@

        Additional resources

        arr.push(["../extensions/Fishbone", "Fishbone Layout", "The Fishbone or Ishikawa layout is a tree layout for cause-and-effect relationships.", "Fishbone"]); arr.push(["../extensions/Parallel", "Parallel Layout", "A custom Layout that assumes there is a single 'split' and a single 'merge' node with parallel lines of nodes connecting them.", "Parallel"]); arr.push(["../extensions/Serpentine", "Serpentine Layout", "A custom Layout that positions a chain of nodes in rows of alternating direction.", "Serpentine"]); + arr.push(["../extensions/Spiral", "Spiral Layout", "A custom Layout that positions a chain of nodes in a spiral.", "Spiral"]); arr.push(["../extensions/TreeMap", "Tree Map Layout", "A custom Layout that renders nested Groups into the viewport with each Node having an area proportional to its declared 'size'.", "TreeMap"]); arr.push(["../extensions/Table", "Table Layout", "A custom Layout that arranges Nodes just as a Table Panel arranges GraphObjects.", "Table"]); // + // RealtimeDragSelecting arr.push(["../extensions/DragCreating", "DragCreating", "A custom Tool that lets a user draw a box showing where and how large a new node should be.", "DragCreating"]); arr.push(["../extensions/DragZooming", "DragZooming", "A custom Tool that lets a user draw a box showing what to zoom in to.", "DragZooming"]); arr.push(["../extensions/FreehandDrawing", "Freehand Drawing", "A custom Tool that lets the user interactively draw a line, converting it into a Shape.", "FreehandDrawing"]); @@ -283,9 +286,9 @@

        Additional resources

        arr.push(["../extensions/ColumnResizing", "Column Resizing", "Two custom Tools that let the user resize the width of columns or the height of rows in a Table Panel of a Node.", "ColumnResizing"]); // arr.push(["../extensions/ScrollingTable", "ScrollingTable", "Demonstrates the implementation of a custom Table Panel with a scrollbar implemented in GoJS, including two AutoRepeatButtons.", "ScrollingTable"]); + // Robot // arr.push(["../extensions/Inspector", "Inspector", "A standard customizable way to let the user see and edit properties of data or of Parts.", "Inspector"]); - // Robot // arr.push(["../extensions/BPMN", "BPMN Editor", "The start of a Business Process Model and Notation editor.", "BPMN"]); // diff --git a/samples/macros.html b/samples/macros.html index 91e55d542..52ef67669 100644 --- a/samples/macros.html +++ b/samples/macros.html @@ -105,10 +105,10 @@
        -
        +
        -
        +

        diff --git a/samples/unlisted.html b/samples/unlisted.html index 31cfaa899..d6a081924 100644 --- a/samples/unlisted.html +++ b/samples/unlisted.html @@ -15,6 +15,7 @@

      • Minimal, loading XML from server
      • Minimal, using RequireJS
      • Minimal, using AngularJS
      • +
      • Hover Buttons, showing buttons in an Adornment upon hover over a node

      • Scroll Modes showing infinite scrolling and positionComputation
      • Visual Tree using nested Groups instead of Nodes and Links